PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: [NL]trucker on 12 January, 2004, 14:24:48

Title: slotchecker
Post by: [NL]trucker on 12 January, 2004, 14:24:48
hello all

i need/want/would like a smart slotchecker

meaning:

i,m in 25 hubs as OP
      in 4 hub as vip
      in 4 hub as user
 and master in my own hub   is total of 34 hubs

according to slotchecker i should have open atleast 33 slots.

problem is when i open that much slots i can close my hub down.

now i want a slotchecker who takes in consideration where i,m OP or Vip or master so that those hubs arent getting counted. and i only have to open 4 slots for the hub i,m a normal user in.
i hope i did explain my thoughts well enough for you if not i will try to explain it a bit better next time.


is this possiblle?

tia peter.
Title:
Post by: [NL]trucker on 13 January, 2004, 23:30:29
c,mon guys is nobody looking into this?

i think it would be very usefull as many others should have the sme problem as i do.

especially if your a OP in a [big]network and have a key in all those hubs.

i realy would appriciate this and i think it is for the benefit for us all if this would be possiblle and added in the main bots running now. e.g. robocop  or a.i. or troubadour or name a few others.

i think a lot of OPs are bothered by this.

come on folks let me see you can make this happen :-))
Title:
Post by: plop on 14 January, 2004, 04:13:22
sorry i wanted 2 respond earlyer but i forgot (cheap memory banks in my brain).
a.i. fully supports this, for op's there is no slot/hub ratio check, and for vips it can be disabled.
+ i also support ratio's for users in the style of 0.25 slots extra per hub.
and in the worsed case there is the option 2 make a user imune (no check @ all).

plop
Title:
Post by: pHaTTy on 14 January, 2004, 04:54:58
QuoteOriginally posted by plop
sorry i wanted 2 respond earlyer but i forgot (cheap memory banks in my brain).
a.i. fully supports this, for op's there is no slot/hub ratio check, and for vips it can be disabled.
+ i also support ratio's for users in the style of 0.25 slots extra per hub.
and in the worsed case there is the option 2 make a user imune (no check @ all).

plop

sheesh plop heheh cheap advertisements too :p

well G5 would have supported this, and actually does, but unfortuantly i think G5 wont be being released, due to i have total brand new ideas, that will make G-E much faster, and hopefully Gekko v6 will be released when i totally rewrite it, some ppl are running G5 but its alot of functions short, if anyone wants the dcut version then sure come download it, but i cantbe bothered to upload it, its not worth it hehehe :p
Title:
Post by: [NL]trucker on 14 January, 2004, 11:00:51
thanks plop an phatty for your answer.

but i,m not using Gekko or A.I. but pzozzy-bot and it is not supported so it has to be a seperate script based
on the profile.lst from ptokax.


tia peter,
Title:
Post by: plop on 14 January, 2004, 14:20:01
QuoteOriginally posted by (uk-kingdom)pH?tt?
sheesh plop heheh cheap advertisements too :p

well G5 would have supported this, and actually does, but unfortuantly i think G5 wont be being released, due to i have total brand new ideas, that will make G-E much faster, and hopefully Gekko v6 will be released when i totally rewrite it, some ppl are running G5 but its alot of functions short, if anyone wants the dcut version then sure come download it, but i cantbe bothered to upload it, its not worth it hehehe :p
sorry but i just have all those things allready. lol
so your goal is that G-E is gone beat a.i., i can only wish you luck in trying. lol

yep trucker i know you run pzozy and love it, but there is still some light on the horizon.
there must be some beginner willing 2 make it for you, and i know me and phatty (and the other scripters) whill help them making it for you.
so can any volunteer pls stand up. lol

plop
Title:
Post by: [NL]trucker on 14 January, 2004, 17:55:27
Quotethere must be some beginner willing 2 make it for you, and i know me and phatty (and the other scripters) whill help them making it for you.

ALL VOLUENTEERS ARISE AND MAKE ONE STEP FORWARD PLEASE.....

you would really help me with this one.

loOol

Tia trucker
Title:
Post by: [NL]trucker on 16 January, 2004, 09:18:13
i think that by the looks and replys on this post that there isnt someone who is gonna try to make this.

ohh well anyways thanks all.
Title:
Post by: plop on 16 January, 2004, 12:31:17
QuoteOriginally posted by [NL]trucker
i think that by the looks and replys on this post that there isnt someone who is gonna try to make this.

ohh well anyways thanks all.
i'll try later, when i have some more time.

plop
Title:
Post by: [NL]trucker on 16 January, 2004, 23:48:28
thnx plop

i knew some of you would come forward :-)))

i will wait till you have time .

tia peter.
Title:
Post by: plop on 26 January, 2004, 01:24:30
i think this is what you are searching for.
just 2 be sure i added 2 modes.
1) only count the 1st number, only checking the levels you want and imune users posible.
2) count all numbers, and again only checking the levels you want and imune users posible.
tell me if this is correct otherwise i'll change it for you.
-- imune users
imune={["[NL]trucker"]=1}

-- levels 2 check
check={[3]=1,[-1]=1}

-- basic settings
Bot = "Botname"
slotphub =1
maxhub = 5
maxslot = 14

-- 1 counts all hubs, 0 only guests
countall = 0

function DataArrival(user, data)
   if check[user.iProfile] then
      if imune[user.sName] == nil then
         local s,e,tag=strfind(user.sMyInfoString, "(%b<>)%$")
         if tag ~= nil then
            if countall == 1 then
               hubs = 0
               s,e,thubs,slots = strfind(tag,  "H:([%d%/]+),S:(%d+)%S*>")
               if tonumber(thubs) == nil then
                  gsub(thubs, "(%d+)", function (num)
                     hubs = hubs +tonumber(num)
                  end)
               end
            else
               s,e,hubs,slots = strfind(tag,  "H:(%d+).*S:(%d+).*")
            end
            if tonumber(slots) and tonumber(hubs) then
               slots = tonumber(slots)
               hubs = tonumber(hubs)
            elseif tonumber(slots) == nil then
               user:SendData(Bot, "geen slotjes ???? das nie goe. bye bye")
               user:Disconnect()
               return 1
            elseif tonumber(hubs) == nil then
               user:SendData(Bot, "geen hubjes ???? das nie goe. bye bye")
               user:Disconnect()
               return 1
            end
            if (slots/hubs)               user:SendData(Bot, "Minimal "..slotphub.." slot per hub!!!|")
               user:Disconnect()
            elseif slots > maxslot then
               user:SendData(Bot, "Maximum "..maxslot.." slots!!!|")
               user:Disconnect()
            elseif hubs > maxhub then
               user:SendData(Bot, "Maximum "..maxhub.." hubs!!!|")
               user:Disconnect()
            end
         end
      end
   end
end

plop
Title:
Post by: [NL]trucker on 26 January, 2004, 08:59:28
Plop

thnx m8 i knew my time would come ;this is really apprieciated.

a few buts ;

my profile.dat is this
0|Owner|11111111111111111111111000000001
1|Master|11111111111111111111111000000001
2|Admin|11111111111111111111010000000000
3|Moderator|11111110011111111111010000000000
4|Operator|10111110011111111111000000000000
5|VIP|10000000000001111100000000000000
6|Reg|10000000000000000000000000000000
7|Magmar|10000000011001111100110000000000

 so could we make the script so that it checks the profile dat and just checks the reg user and guests?
or make it so that i can add levels to the imune list instaed of names

that way the imune list dont gets so big i would have tried that myself if i knew wich level you,re checking here:

-- levels 2 check
check={[3]=1,[-1]=1}

havent a clue about the levels here

and could there be a message in main??

and a min slot count

i see a slot/hub ratio
a max hub ratio
and a max slot  ratio

would be great f you could do this :-))
Title:
Post by: plop on 26 January, 2004, 11:55:23
QuoteOriginally posted by [NL]trucker
Plop

thnx m8 i knew my time would come ;this is really apprieciated.

a few buts ;

my profile.dat is this
0|Owner|11111111111111111111111000000001
1|Master|11111111111111111111111000000001
2|Admin|11111111111111111111010000000000
3|Moderator|11111110011111111111010000000000
4|Operator|10111110011111111111000000000000
5|VIP|10000000000001111100000000000000
6|Reg|10000000000000000000000000000000
7|Magmar|10000000011001111100110000000000

 so could we make the script so that it checks the profile dat and just checks the reg user and guests?
or make it so that i can add levels to the imune list instaed of names

that way the imune list dont gets so big i would have tried that myself if i knew wich level you,re checking here:

-- levels 2 check
check={[3]=1,[-1]=1}

havent a clue about the levels here

and could there be a message in main??

and a min slot count

i see a slot/hub ratio
a max hub ratio
and a max slot  ratio

would be great f you could do this :-))
np, min slots and msg in mainchat it on the way.

i'll explain the levels part as it's really simple.
for example the next line from your profile.dat file.
6|Reg|10000000000000000000000000000000
the 1st number (6) is the level number.
Reg is the profile name.
the load of 1's and 0's are the commands and settings for this level.

next the levels table from the script.
-- levels 2 check
check={[3]=1,[-1]=1}
this means it check only the levels which have the number 3 and -1.
-1 is unregistered.
3 normaly is registered user but on your profile it's Moderator.
so what you gotta do is change the 3 for the number which Reg has in your profile.dat, which is 6.
-- levels 2 check
check={[6]=1,[-1]=1}
(the 1 after the = in this storry/script is just a dummy, you can forget about that, the table needs 2 hold something so i used a 1).

plop
Title:
Post by: imby on 15 September, 2004, 23:26:07
upon login on a clean installation. pasted from here, unedited:

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `DataArrival' at line 19 [file `...15.25\kale pkotax\scripts\New Text Document.lua']

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `DataArrival' at line 19 [file `...15.25\kale pkotax\scripts\New Text Document.lua']

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `DataArrival' at line 19 [file `...15.25\kale pkotax\scripts\New Text Document.lua']