Profiles ?
 

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

Profiles ?

Started by BrotherBear, 18 August, 2006, 18:45:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BrotherBear

Hi!

How Many Profiles could you have in Ptokax?
Regards,

BrotherBear

Herodes

#1
--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 ...

6Marilyn6Manson6

Quote from: Herodes on 18 August, 2006, 19:01:16
Code: lua
--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

Rincewind

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.

BrotherBear

Thanks Herodes

But how do I use it?
Regards,

BrotherBear

speedX

nope Rincewind....if u use
Code: lua
thn in some cases it copies the whole code in one line....
Thanking You,

speedX

Rincewind

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 ;))

Herodes

anyhow you can always try to quote the post and then copying the code from the reply page...
has anyone tried the script ?

BrotherBear

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?
Regards,

BrotherBear

Herodes

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

BrotherBear

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
Regards,

BrotherBear

jiten

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()

Herodes

#12
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"

Alexinno

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

Madman

#14
did to 5044 then i stopped it...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

bastya_elvtars

Oh my god,  if only I could fucking tell how much I hate write-only users...

Copying issues with GeSHi code
Everything could have been anything else and it would have just as much meaning.

BrotherBear

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 :)
Regards,

BrotherBear

SMF spam blocked by CleanTalk