ACCOUNT SCRIPT
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

ACCOUNT SCRIPT

Started by XPMAN, 11 December, 2003, 07:41:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

XPMAN

I know their is a similiar thread, but so no one would get confused I started this one. What I need help with is a script to use with the PtokaX hub so i can have individual control over:

MIN SHARE
MIN SLOTS
MAX SHARE
MAX SLOTS
HUB SHARE

For the following accounts:  

Master
Operator
Operator2
Vip
Reg
Reg2
Reg3


I run a rather large private hub and am in desperate need of some help with a script. What it amounts too is that i need control for 2 levels of ops and 3 levels of Reg users, so i can control the slots\share for each. I think it can be done because i have been watching the other thread on a similiar requested script. This could really get rid of the headache i have been getting trying to make due without the levels of control.  If someone would be kind enough to help me with this I would really appreciate it .  O, i run Robocop and am currently testing the PtokaX DC Hub 0.3.3.0 build 15.18 [debug].

SaintSinner

Ok first things first
your not going to get much help while your using
a stolen beta of Ptokax.
you should not be using a beta version of the hub
its illgotten and its buggy, your hub will likely crash
for no apparent reason from time to time, you and
your users wont be happy about that,

I think you should get the "released" version
testdrive4 here

and then get channelbot it does everything you want
a good script to do and more, look to here to get  

good luck.
   


XPMAN

My friend ,u r jumping the gun for NO reason. I AM beta testing my hub with it. Test drive 4 had a serious socket error in it. I DID NOT wish to use anyother hub software but PtokaX. I pm'd ptaczek and he gave me permission to use it and test it so i wouldn't have to reboot my system every 24 hours when the Test drive 4 crashed. If
ptaczek requests me to discontinue its use then i will and wait for the final release. I am not a coder like you guys are, but I am a serious hub owner. I respect ptaczek and his work, I have read about others sharing his work or trying to take credit for it.......thats bull shit and we all know it. But before you make a post of the nature u did, please get your facts together first. I have been testing countless scripts and stuff and so far it has lived up to every expectation , I cannot wait to see the final release. All i did was ask for help with a script, I know most of you that are serious about coding are beta testers of the hub software and was just really wanting to make sure the script would work properly. This script .....(if someone can do it) would make my hub run more smoothly.

Just for the record, I have been ask for copies of the software and everytime i have refused, I have not shared one copy to anyone, as i was told by ptaczek not to .I just forward them to this board here for info concerning it .

Sorry for any inconvenience I have caused.

SaintSinner

QuoteOriginally posted by XPMAN
My friend ,u r jumping the gun for NO reason. I AM beta testing my hub with it. Test drive 4 had a serious socket error in it. I DID NOT wish to use anyother hub software but PtokaX. I pm'd ptaczek and he gave me permission to use it and test it so i wouldn't have to reboot my system every 24 hours when the Test drive 4 crashed. If
ptaczek requests me to discontinue its use then i will and wait for the final release. I am not a coder like you guys are, but I am a serious hub owner. I respect ptaczek and his work, I have read about others sharing his work or trying to take credit for it.......thats bull shit and we all know it. But before you make a post of the nature u did, please get your facts together first. I have been testing countless scripts and stuff and so far it has lived up to every expectation , I cannot wait to see the final release. All i did was ask for help with a script, I know most of you that are serious about coding are beta testers of the hub software and was just really wanting to make sure the script would work properly. This script .....(if someone can do it) would make my hub run more smoothly.

Just for the record, I have been ask for copies of the software and everytime i have refused, I have not shared one copy to anyone, as i was told by ptaczek not to .I just forward them to this board here for info concerning it .

Sorry for any inconvenience I have caused.




Ahh my friend but you cause no inconvinience, if you
have posted a diffrent story, then my reply to try to help you would be diffrent, lets try like this:
since the hubsoftware is buggy at best becouse its in
the testphase, and the codes are being rewritten
scripts for the new hubsoft are still being worked on,
or put on hold until a final release.
   


XPMAN


NightLitch

#5
Well now I have improved my skills again.

Here is your wonderfull Multi Share/Slot Bot
-----------------------------------------------------------
-- Multi Share/Slot Bot v.3
-- By: NightLitch  2003
-----------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
tb = kb*kb*kb*kb
-----------------------------------------------------------
-- All Share values are in GB
-- Need to Set correct Level/Profile
-- on those levels that are nil. 
-----------------------------------------------------------
-- Start of Editable Data --

BotName = "-LinK-"

-- Master --
MstrLvl = 0
MSR = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,	
}

-- Operator 1 --
Op1Lvl = 1
OP1 = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Operator 2 --
Op2Lvl = nil
OP2 = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Vip User --
VipLvl = 2
VIP = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Reg User 1 --
Reg1Lvl = 3
REG1 = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Reg User 2 --
Reg2Lvl = nil
REG2 = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Reg User 3 --
Reg3Lvl = nil
REG3 = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- Regular Users --
UsrLvl = -1
USR = {
MinShare = 10,
MaxShare = 500,
MinSlots = 3,
MaxSlots = 15,
}

-- End of Editable Data --
-------------------------------------------------------------------------------------------------------------
function Main()
	frmHub:RegBot(BotName)
end
-------------------------------------------------------------------------------------------------------------
function DataArrival(curUser,data)
	if (strsub(data,1,7) == "$MyINFO") then
		local _,_, Slots = strfind(data,".*S:(%d+)")
-- Master Check Slots ---------------------------------------------------------------------------------------
		if curUser.iProfile == MstrLvl then
			CheckSlots(curUser,MSR.MinSlots,MSR.MaxSlots,Slots)
-- Operator 1 Check Slots -----------------------------------------------------------------------------------
		elseif curUser.iProfile == Op1Lvl then
			CheckSlots(curUser,OP1.MinSlots,OP1.MaxSlots,Slots)
-- Operator 2 Check Slots -----------------------------------------------------------------------------------
		elseif curUser.iProfile == Op2Lvl then
			CheckSlots(curUser,OP2.MinSlots,OP2.MaxSlots,Slots)
-- Vip User Check Slots -------------------------------------------------------------------------------------
		elseif curUser.iProfile == VipLvl then
			CheckSlots(curUser,VIP.MinSlots,VIP.MaxSlots,Slots)
-- Reg User  1 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg1Lvl then
			CheckSlots(curUser,REG1.MinSlots,REG1.MaxSlots,Slots)
-- Reg User  2 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg2Lvl then
			CheckSlots(curUser,REG2.MinSlots,REG2.MaxSlots,Slots)
-- Reg User  3 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg3Lvl then
			CheckSlots(curUser,REG3.MinSlots,REG3.MaxSlots,Slots)
-- Regular Users Check Slots --------------------------------------------------------------------------------
		elseif curUser.iProfile == UsrLvl then
			CheckSlots(curUser,USR.MinSlots,USR.MaxSlots,Slots)
		end
-------------------------------------------------------------------------------------------------------------
		CheckShare(curUser,data)
-------------------------------------------------------------------------------------------------------------
	end
end
-------------------------------------------------------------------------------------------------------------
function CheckSlots(curUser,mnSlots,mxSlots,Slots)
	if Slots==nil then
		curUser:SendData(BotName,"You are hidding your Tag for checking your slots.") 
		curUser:Disconnect()
	elseif (tonumber(Slots) < mnSlots) then
		curUser:SendData(BotName,"You have too litle slots open ( "..Slots.." ) Minimum slots is ( "..mnSlots.." ). ")
		curUser:Disconnect()
	elseif (tonumber(Slots) > mxSlots) then
		curUser:SendData(BotName,"You have too many slots open ( "..Slots.." ) Maximum slots is ( "..mxSlots.." ). ")
		curUser:Disconnect()
	end
end
-------------------------------------------------------------------------------------------------------------
function CheckShare(curUser,data)
	s,e, vShare = strfind(data,"$+(%d+)$+|+")
	if vShare ~= nil then
-- Master Check Share ---------------------------------------------------------------------------------------
		if curUser.iProfile == MstrLvl then
			if (tonumber(vShare) < MSR.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..MSR.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Operator 1 Check Share -----------------------------------------------------------------------------------
		elseif curUser.iProfile == Op1Lvl then
			if (tonumber(vShare) < OP1.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..OP1.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Operator 2 Check Share -----------------------------------------------------------------------------------
		elseif curUser.iProfile == Op2Lvl then
			if (tonumber(vShare) < OP2.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..OP2.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Vip User Check Share -------------------------------------------------------------------------------------
		elseif curUser.iProfile == VipLvl then
			if (tonumber(vShare) < VIP.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..VIP.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  1 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg1Lvl then
			if (tonumber(vShare) < REG1.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG1.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  2 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg2Lvl then
			if (tonumber(vShare) < REG2.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG2.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  3 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == Reg3Lvl then
			if (tonumber(vShare) < REG3.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG3.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Regular Users Check Share --------------------------------------------------------------------------------
		elseif curUser.iProfile == UsrLvl then
			if (tonumber(vShare) < USR.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..USR.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
		end
	end
end

Enjoy using it...

Rate it plz... :-)


/NL
//NL

XPMAN

Thank u very much for taking the time to do this for me. Its much appreciated!!   :)

NightLitch

I Am modifing it more now... But it most to improve my skills...

Most of the things I do now, would maybe consider worthless by others...

Hope the script can be posted when finish....


*** NOTE: One thing in above script there is an error...

gonna fix it...

/NL
//NL

NightLitch

Error Fixed... take it now...
//NL

XPMAN

Looks nice, but i couldn't get it to work. I disabled the hub slot check and Robocop slot check and still had no luck. Maybe if you could help a newbie with scripts out and go over the setup of it. I thought i setup the profiles correctly......... Thnx in advance for helping.  

Still trying to learn, playing around with some simple stuff now trying to learn what I can. It may have just been the way i had it setup, thats why I ask to maybe go over to see if i made any errors. This is a script that I bet will become very popular.

NightLitch

be sure you set the right number in:


Levels:

MstrLvl = 0 etc.

for what you have for numbers open - Profiles.dat -

and check your num's....

what you need to change is possible this ones:

Operator 2 to what you have now...
REG2 & REG3 to what you want...

all done in Profile Manager in HubSoft or check as above

-  Profiles.dat  -

Updated code here:

-----------------------------------------------------------
-- Multi Share/Slot Bot v.5
-- By: NightLitch  2003
-----------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
tb = kb*kb*kb*kb
-----------------------------------------------------------
-- All Share values are in GB
-- Need to Set correct Level/Profile
-- on those levels that are just modified by me. 
--
-- Levels are like this now:
--
-- Master = 0 (original set from ptokax)
-- Operator 1 = 1 (original set from ptokax)
-- Operator 2 = 6 ( Profile added in Profile Manager )
-- VIP User = 2 (original set from ptokax)
-- REG1 User = 3 (original set from ptokax)
-- REG2 User = 4 ( Profile added in Profile Manager )
-- REG3 User = 5 ( Profile added in Profile Manager )
-- Regular User = -1 (Do Not change regular users can only be -1)
--
-- Values are set to normal standard...
-- Change after needs...
-----------------------------------------------------------
-- Start of Editable Data --

BotName = "-LinK-"

-- Master --

MSR = {
Level = 0,
MinShare = 0,
MaxShare = 1000,
MinSlots = 0,
MaxSlots = 20,	
}

-- Operator 1 --
OP1 = {
Level = 1,
MinShare = 3,
MaxShare = 1000,
MinSlots = 2,
MaxSlots = 20,
}

-- Operator 2 --

OP2 = {
Level = 6,
MinShare = 2,
MaxShare = 1000,
MinSlots = 1,
MaxSlots = 20,
}

-- Vip User --
VIP = {
Level = 2,
MinShare = 5,
MaxShare = 1000,
MinSlots = 3,
MaxSlots = 20,
}

-- Reg User 1 --
REG1 = {
Level = 3,
MinShare = 10,
MaxShare = 1000,
MinSlots = 3,
MaxSlots = 20,
}

-- Reg User 2 --
REG2 = {
Level = 4,
MinShare = 15,
MaxShare = 1000,
MinSlots = 4,
MaxSlots = 20,
}

-- Reg User 3 --
REG3 = {
Level = 5,
MinShare = 20,
MaxShare = 1000,
MinSlots = 5,
MaxSlots = 20,
}

-- Regular Users --
USR = {
Level = -1,
MinShare = 2,
MaxShare = 1000,
MinSlots = 2,
MaxSlots = 10,
}

-- End of Editable Data --
-------------------------------------------------------------------------------------------------------------
function Main()
	frmHub:RegBot(BotName)
end
-------------------------------------------------------------------------------------------------------------
function DataArrival(curUser,data)
	if (strsub(data,1,7) == "$MyINFO") then
		local _,_, Slots = strfind(data,".*S:(%d+)")
-- Master Check Slots ---------------------------------------------------------------------------------------
		if curUser.iProfile == MSR.Level then
			CheckSlots(curUser,MSR.MinSlots,MSR.MaxSlots,Slots)
-- Operator 1 Check Slots -----------------------------------------------------------------------------------
		elseif curUser.iProfile == OP1.Level then
			CheckSlots(curUser,OP1.MinSlots,OP1.MaxSlots,Slots)
-- Operator 2 Check Slots -----------------------------------------------------------------------------------
		elseif curUser.iProfile == OP2.Level then
			CheckSlots(curUser,OP2.MinSlots,OP2.MaxSlots,Slots)
-- Vip User Check Slots -------------------------------------------------------------------------------------
		elseif curUser.iProfile == VIP.Level then
			CheckSlots(curUser,VIP.MinSlots,VIP.MaxSlots,Slots)
-- Reg User  1 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG1.Level then
			CheckSlots(curUser,REG1.MinSlots,REG1.MaxSlots,Slots)
-- Reg User  2 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG2.Level then
			CheckSlots(curUser,REG2.MinSlots,REG2.MaxSlots,Slots)
-- Reg User  3 Check Slots ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG3.Level then
			CheckSlots(curUser,REG3.MinSlots,REG3.MaxSlots,Slots)
-- Regular Users Check Slots --------------------------------------------------------------------------------
		elseif curUser.iProfile == USR.Level then
			CheckSlots(curUser,USR.MinSlots,USR.MaxSlots,Slots)
		end
-------------------------------------------------------------------------------------------------------------
		CheckShare(curUser,data)
-------------------------------------------------------------------------------------------------------------
	end
end
-------------------------------------------------------------------------------------------------------------
function CheckSlots(curUser,mnSlots,mxSlots,Slots)
	if Slots==nil then
		curUser:SendData(BotName,"You are hidding your Tag for checking your slots.") 
		curUser:Disconnect()
	elseif (tonumber(Slots) < mnSlots) then
		curUser:SendData(BotName,"You have too litle slots open ( "..Slots.." ) Minimum slots is ( "..mnSlots.." ). ")
		curUser:Disconnect()
	elseif (tonumber(Slots) > mxSlots) then
		curUser:SendData(BotName,"You have too many slots open ( "..Slots.." ) Maximum slots is ( "..mxSlots.." ). ")
		curUser:Disconnect()
	end
end
-------------------------------------------------------------------------------------------------------------
function CheckShare(curUser,data)
	s,e, vShare = strfind(data,"$+(%d+)$+|+")
	if vShare ~= nil then
-- Master Check Share ---------------------------------------------------------------------------------------
		if curUser.iProfile == MSR.Level then
			if (tonumber(vShare) < MSR.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..MSR.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Operator 1 Check Share -----------------------------------------------------------------------------------
		elseif curUser.iProfile == OP1.Level then
			if (tonumber(vShare) < OP1.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..OP1.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Operator 2 Check Share -----------------------------------------------------------------------------------
		elseif curUser.iProfile == OP2.Level then
			if (tonumber(vShare) < OP2.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..OP2.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Vip User Check Share -------------------------------------------------------------------------------------
		elseif curUser.iProfile == VIP.Level then
			if (tonumber(vShare) < VIP.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..VIP.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  1 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG1.Level then
			if (tonumber(vShare) < REG1.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG1.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  2 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG2.Level then
			if (tonumber(vShare) < REG2.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG2.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Reg User  3 Check Share ----------------------------------------------------------------------------------
		elseif curUser.iProfile == REG3.Level then
			if (tonumber(vShare) < REG3.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..REG3.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
-- Regular Users Check Share --------------------------------------------------------------------------------
		elseif curUser.iProfile == USR.Level then
			if (tonumber(vShare) < USR.MinShare * gb) then
				curUser:SendPM(BotName," You don't met the share minimum"..USR.MinShare.." Gb")
				curUser:SendPM(BotName," Disconnecting...")
				curUser:Disconnect()
			end
		end
	end
end

Hope you get it to work...

works great for me... even when am running it beside my own
Master-Bot that have slots/share checks to... but they are disabled...

Have a good one...


/NL
//NL

XPMAN

Now i feel stupid......lol to embarresed to even say what i messed up on....looking good now, finally got the levels right...lol.

Excellent script!! You deserve an award for this one. Very,very much appreciated!!

XPMAN

Just to let you that this script rocks!!!!!

You are an absolute genius.....my nightmares are over. This script should be put in the download section of scripts. Really cannot put into words the gratitude for what you did for me.

I will watch this thread, if you update.....(all you could possibly do is add more profiles) I will be sure to nab it. I gave all credit to you when i started the script in the hub.

O, did i forget to mention that i LOOOOOVE this script..lol !

NightLitch

Well ThX for the Credits... :-)

Hope some Moderator read this and can put it up in the script section...

plz Optimus or someone...

Or is it not good enough... :-p


/NL
//NL

Optimus

Sure it's good enough m8... let me put you in the right section

Greetingz Opti

NightLitch

Sounds good Optimus... That would be my real first
from the scratch bot I have made beside my own masterbot...



Maybe mail it to you Optimus so you can put it up when
it's ready... Always some adjustments...

/NL


When Will it come up on the page Opti.??

/DS
//NL

Optimus

Ohh that Page, hehe

I putted this thread in Finished scripts *lol*

Ok it's uploaded to Ptokax Script Section...

Have a good 1 ;)

SMF spam blocked by CleanTalk