Hi!
How Many Profiles could you have in Ptokax?
--Just4Fun - CountHowManyProfilesICanAdd!
--- by Herodes ( request by BrotherBear )
--- 18/08/06
curProf = 0
function Main()
SetTimer( 1000 )
StartTimer()
for profile in ipairs(frmHub:GetProfiles()) do
RemoveProfile(profile)
end
end
function OnTimer()
AddProfile( ""..curProf.."", curProf)
curProf = curProf + 1
local handle = io.open("profs.txt", "w")
handle:write("Added "..curProf)
handle:close()
end
try this one out .. I haven't tested ...
Quote from: Herodes on 18 August, 2006, 19:01:16
--Just4Fun - CountHowManyProfilesICanAdd!
--- by Herodes ( request by BrotherBear )
--- 18/08/06
curProf = 0
function Main()
SetTimer( 1000 )
StartTimer()
for profile in ipairs(frmHub:GetProfiles()) do
RemoveProfile(profile)
end
end
function OnTimer()
AddProfile( ""..curProf.."", curProf)
curProf = curProf + 1
local handle = io.open("profs.txt", "w")
handle:write("Added "..curProf)
handle:close()
end
try this one out .. I haven't tested ...
Please herodes use only [ code] and not [ code=lua] in your post. Thanks
Quote from: 6Marilyn6Manson6 on 18 August, 2006, 21:12:28
Please herodes use only [ code] and not [ code=lua] in your post. Thanks
Why? Using the code=lua copies like normal and makes it easier to read.
Thanks Herodes
But how do I use it?
nope Rincewind....if u use thn in some cases it copies the whole code in one line....
Not something I've seen happen. When I first saw it I copied some to see what would happen; it worked perfectly (or as well as normal anyway ;))
anyhow you can always try to quote the post and then copying the code from the reply page...
has anyone tried the script ?
Quote from: Herodes on 18 August, 2006, 19:01:16
--Just4Fun - CountHowManyProfilesICanAdd!
--- by Herodes ( request by BrotherBear )
--- 18/08/06
curProf = 0
function Main()
SetTimer( 1000 )
StartTimer()
for profile in ipairs(frmHub:GetProfiles()) do
RemoveProfile(profile)
end
end
function OnTimer()
AddProfile( ""..curProf.."", curProf)
curProf = curProf + 1
local handle = io.open("profs.txt", "w")
handle:write("Added "..curProf)
handle:close()
end
try this one out .. I haven't tested ...
Hi Herodes :)
I don't know how to test this script :(
0 = Master
1 = OP
2 = VIP
3 = REG
4 = MOD
5 = NetFounder
6 = Owner
7 = SVIP
8 = KVIP
Is it possible to have it this way?
Quote from: BrotherBear on 19 August, 2006, 09:30:02
Hi Herodes :)
I don't know how to test this script :(
0 = Master
1 = OP
2 = VIP
3 = REG
4 = MOD
5 = NetFounder
6 = Owner
7 = SVIP
8 = KVIP
Is it possible to have it this way?
It is .. just go to the Profile Manager and add those ... make sure you set up the nessecary permissions for each profile....
But u asked for other information ... that I didn't know and I knew the way for you to find out ...
create an empty "profs.txt" file in the scripts folder and run the script
Quote from: Herodes on 19 August, 2006, 10:08:22
It is .. just go to the Profile Manager and add those ... make sure you set up the nessecary permissions for each profile....
But u asked for other information ... that I didn't know and I knew the way for you to find out ...
create an empty "profs.txt" file in the scripts folder and run the script
Ahh, great :)
I have created a "profs.txt" and started the script, but nothing happens :(
Something is strange here when I copy the script and paste it into Notepad it looks like this
--Just4Fun - CountHowManyProfilesICanAdd!--- by Herodes ( request by BrotherBear )--- 18/08/06 curProf = 0 function Main() SetTimer( 1000 ) StartTimer() for profile in ipairs(frmHub:GetProfiles()) do RemoveProfile(profile) endend function OnTimer() AddProfile( ""..curProf.."", curProf) curProf = curProf + 1 local handle = io.open("profs.txt", "w") handle:write("Added "..curProf) handle:close()end
It all came in 1 row.
And when I separate it so it looks like your script I get this error:
profiles.lua:10: attempt to call method 'GetProfiles' (a nil value)
I am Running Ptokax 0.3.5.1
Quote from: BrotherBear on 19 August, 2006, 11:46:18
And when I separate it so it looks like your script I get this error:
profiles.lua:10: attempt to call method 'GetProfiles' (a nil value)
I am Running Ptokax 0.3.5.1
Rename
frmHub:GetProfiles() to
GetProfiles()
thx jiten,... I am at 2580 profiles and counting ... maybe someone with a faster pc can do it at a better rate .. I've set the timer to 10 ms ..
maybe there should be a limit on that ?
[update]Stopped at "Added 2805"
BrotherBear, here is the Profiles.xml from Snooze's DixBot myabe you can use it :)
Profiles are
Owner
Master
SuperUser
Operator
KVIP
VIP
Reg
copy the Profiles.xml in Ptokax\cfg
did to 5044 then i stopped it...
Oh my god, if only I could fucking tell how much I hate write-only users...
Copying issues with GeSHi code (http://forum.ptokax.org/index.php?topic=6257.0)
Now it worked, I have reached over 20000 Profiles :)
Thanks Alexinno :)
If I wish to use the new profile in any script is it only to add it like this:
EnableChatStats = {
- = 1, -- Master
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Reg
[4] = 1, -- Mod
[5] = 1, -- NetFounder
[6] = 1, -- Owner
[7] = 1, -- SVIP
[8] = 1, -- KVIP
[-1] = 1, -- Users (UnRegged)
}
Posted on: 22 August 2006, 23:48:20
Quote from: BrotherBear on 22 August, 2006, 22:48:20
Now it worked, I have reached over 20000 Profiles :)
Thanks Alexinno :)
If I wish to use the new profile in any script is it only to add it like this:
EnableChatStats = {
- = 1, -- Master
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Reg
[4] = 1, -- Mod
[5] = 1, -- NetFounder
[6] = 1, -- Owner
[7] = 1, -- SVIP
[8] = 1, -- KVIP
[-1] = 1, -- Users (UnRegged)
}
Yes BrotherBear, it is possible ;)
Now I have gone through my scripts and it is working Grrreeeeaaaaaat :D
Thank you all :)