PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Madman on 09 June, 2005, 22:05:08

Title: Brain-Master - Lua5
Post by: Madman on 09 June, 2005, 22:05:08
Quote
-- Madman's Converting log
-- Splited the most of the DataArrival
-- Splitted whole Arrival, hopefully corrext
-- Required the files
-- Changed Serilize function
-- Chnaged info.in to info.In
-- Cnaged all str to string and so on
-- Chnaged to Typhoons Serilaize function
-- LoadFromFile is now dofile
-- Fixed bug in new limter check
-- Converted offlien msg.... I HATE fielhandling... ;)
-- Fixed bug with LoadInfo, due to new serilize
-- Removed conneection from bot
-- Commands now works in pm
-- Converted the file handling
-- Optimized some code
-- Fixed bug with reading file
-- Fixed Client version bug... ;p
-- Fixed a new Serilize
-- Killed a few bugs

I only converted it... =)
And changed some stuff... it's more stuff that can be changed... ;p But i'm to laxy...Atlest they work...
As for the exe... it works... but i cant see all of the text... i only see the texts in the drop down menu
I tried both and mine and my server.. I dont see the text... both runs XP pro Sp1
Mine has the xp theme, the server has the classic theme, so the theme dont matter :/

Click to download (http://www.thedestruction.org/lua/Lua5/Brain-Master.lua5.rar)

Report any bugs, and i'll try 2 fix them asap...

I got 2 much free time...
Title:
Post by: jiten on 09 June, 2005, 22:07:59
Really nice one, madman :D
Title:
Post by: Dessamator on 09 June, 2005, 22:13:08
yikes, so u really did it, hehe now get a new rank in the board, Masterr Converter, well done indeed
Title:
Post by: Madman on 09 June, 2005, 22:20:51
Thanks guys =)
Title:
Post by: Dessamator on 09 June, 2005, 23:58:35
ur welcome, next job , convert L.I.S.-V.0.5141F by chilla , good luck :)
Title:
Post by: Madman on 10 June, 2005, 02:59:03
QuoteOriginally posted by Dessamator
ur welcome, next job , convert L.I.S.-V.0.5141F by chilla , good luck :)

Hehe.... naa... kbeh273300 is converting that... atlest he started... dunno if he still is....
Title:
Post by: Dessamator on 10 June, 2005, 10:35:28
well ok, u can help him finish it :)
Title:
Post by: dragos_sto on 10 June, 2005, 11:48:29
good work m8
i use brain master whit old ptoka and i who's satisfied
of this script




it something rong in my language .. but i dont know what .. ? ... need go to school :D
Title:
Post by: dragos_sto on 10 June, 2005, 11:59:20
some command are not available  
" !iprangeinfo"
" !ipinfo"
because are not available  whit new
new version of ptokax
Title:
Post by: yoonohoo on 10 June, 2005, 14:59:28
link dead?
Title:
Post by: Madman on 10 June, 2005, 16:14:26
QuoteOriginally posted by yoonohoo
link dead?

huh? works for me.. ;p

And i cant see that my net been down today...
Try again.... =)
Title:
Post by: Markitos on 10 June, 2005, 16:52:28
madman can u make an uncompiled version so i can modify the right click???


Respectfully...
Title:
Post by: jiten on 10 June, 2005, 17:29:07
QuoteOriginally posted by Markitos
madman can u make an uncompiled version so i can modify the right click???


Respectfully...
Look for the uncompiled version here: "scripts\Base-Dados\Script-Code".

Best regards,

jiten
Title:
Post by: dragos_sto on 11 June, 2005, 01:14:09
true it right ,
the brain master it's among the few biggest
big script whit a lot of  useful commands
who have the code  uncompiled version
in script

great ideea, so other may improve the script
Title:
Post by: Madman on 12 June, 2005, 13:20:54
QuoteOriginally posted by dragos_sto
who have the code  uncompiled version
in script

great ideea, so other may improve the script

It was nErBoS who puted the un compiled version in
scripts\Base-Dados\Script-Code.. witout it i could not have converted it.. =)
Title:
Post by: Madman on 14 June, 2005, 14:38:20
Quote-- Update
-- Added German lang file
-- Comented the !ipnfo and !iprangeinfo commands
-- Closed a file, when reading it

A small lite update... =)
Title:
Post by: zinden on 14 June, 2005, 20:29:46
some errors:

[20:26] Brain-Master.lua:2304: attempt to call field `remove' (a nil value)
[20:26] Brain-Master.lua:2813: attempt to compare nil with number

in the hub mainchat and in software:
[20:26] Syntax Brain-Master.lua:2813: attempt to compare nil with number

i accedently registered a user as reg, then i took vip instead then i took operator.....
After that i saw these errors.....
Title:
Post by: Madman on 15 June, 2005, 01:51:11
QuoteOriginally posted by zinden
[20:26] Brain-Master.lua:2813: attempt to compare nil with number
That is a client check... it checks for <+ in the tag...
and as i can see.. That error can only be caused by if the client doesnt have a version number...
But i added an extra check on it.. hopefully that should get rid of it...

QuoteOriginally posted by zinden
[20:26] Brain-Master.lua:2304: attempt to call field `remove' (a nil value)
Cant get any error... :/
Anyway... it's have something to do with the free !slots command....

And about this...
QuoteOriginally posted by zinden
i accedently registered a user as reg, then i took vip instead then i took operator.....
After that i saw these errors.....
This shouldnt have anything to do with this.. ;p


Updated the file...
Quote-- Small bug fix
-- Hopefully fix a bug in the min ver check
Title:
Post by: zinden on 30 June, 2005, 20:25:02
[20:15] Syntax Brain-Master.lua:2554: attempt to concatenate global `limter' (a nil value)

caused by a bad tag or connection type?
i get that error anyway  :P

and then i tried: !slots
and here what hapenned:

[20:22] Brain-Master.lua:2304: attempt to call field `remove' (a nil value)

like 8-10 times in a row before i restarted script.
then i tried agian, same error  :(

this is how it looks like:

[20:27] !slots
[20:27] <-Guarding-> User: Taz 1/2
[20:27] <-Guarding-> User: Suzuki 10/10
[20:27] <-Guarding-> User: Pebblo 2/2
[20:27] <-Guarding-> Search ended.
[20:27] <-Guarding-> Search ended.
[20:27] <-Guarding-> Search ended.
[20:27] <-Guarding-> Search ended.
[20:27] <-Guarding-> Search ended.
[20:27] <-Guarding-> Search ended.
[20:28] <-Guarding-> Search ended.
[20:28] <-Guarding-> Search ended.

with alot more search ended, but i had to restart script to make it go away to start spamming mainchat by errors.
Title:
Post by: Madman on 01 July, 2005, 03:43:46
the limter error is fixed...
as for the remove error.. i'm not sure... give it a try..
Only the lua file needs to be replaced

*Edit*

Updatd once again...
forgot to change some stuff... Think the !slots command should work now...
Title:
Post by: zinden on 01 July, 2005, 20:04:33
[19:49] Syntax Brain-Master.lua:2488: bad argument #1 to `find' (string expected, got nil)

my errors so far...
Title:
Post by: Madman on 01 July, 2005, 22:31:36
I made some changes... hopefully it will fix that error....

And.. if u still get the error could you try to find some more info...
like what user is doing it... and how his description,speed,email,share looks like...
Title:
Post by: zinden on 06 July, 2005, 20:18:05
still gets:
[19:42] Syntax Brain-Master.lua:2488: bad argument #1 to `find' (string expected, got nil)

time to time, hard to know why it does like that....

And about saving kicks etc...the userinfo thingy, is there a way to clean it like after 5 days old?

I mean clean logs that are older than 5-7 days old with a command....
Title:
Post by: Madman on 06 July, 2005, 22:39:39
QuoteOriginally posted by zinden
still gets:
[19:42] Syntax Brain-Master.lua:2488: bad argument #1 to `find' (string expected, got nil)

time to time, hard to know why it does like that....

And about saving kicks etc...the userinfo thingy, is there a way to clean it like after 5 days old?

I mean clean logs that are older than 5-7 days old with a command....

Updated...

Hopefully that error should be fixed..
if not... I will get a better idea of whats nil =)
As for the request...
I wont do it.. I promised myself to dont work on big security scritps... i'll only convert and fix errors...
it's still nErBoS script...
But it's open source... so any can feel free to modd it...
sry

//A cola addicted and Laning Madman
Title:
Post by: zinden on 07 July, 2005, 20:46:35
error:

[20:42:59] Brain-Master.lua:2866: bad argument #1 to `find' (string expected, got nil)

well atleast 50 of them  :)
when i installed new updated script....
Title:
Post by: Madman on 07 July, 2005, 21:26:38
Package updated...

Found a typo when checking for bad Ips...
Just made a quickcheck.. should be fixed.. ;)

Dont user P2P Gurdain..  so i dont know.. ;p
Title:
Post by: zinden on 08 July, 2005, 14:16:48
error:

[14:11:35] Brain-Master.lua:2669: bad argument #1 to `find' (string expected, got nil)

alot of them today.....
Title:
Post by: Madman on 08 July, 2005, 21:27:45
bah... starting to getting bored on fixing bugs... lol..
Package updated....

*stares at the screen, waiting for new bug report*
Title:
Post by: zinden on 09 July, 2005, 07:36:16
error during the night:

[00:35] Syntax Brain-Master.lua:2566: bad argument #1 to `find' (string expected, got nil)

few of them.....
Title:
Post by: Madman on 09 July, 2005, 15:44:27
package updated..

i'm beginig to belive that it's a client... just one client... beacuse all errors you been giving me is a about MyINFO stuff... i dont get thoose errors... So my guess it is a client...

PM me your hub addy... and i'll fix a script for u later.... see if we can find out if there is a client that does it...
But i'm gonna a bit busy... 4 a few days.... so it have 2 wait a few days..

But i'll be here... and try to have time 2 fix errors...
Title:
Post by: zinden on 10 July, 2005, 18:28:19
errors so far:
[14:45] Syntax Brain-Master.lua:2465: attempt to concatenate field `vrs' (a nil value)


atleast not a 'find' error   :D
Title:
Post by: Madman on 10 July, 2005, 23:38:56
okey.. now i'm posetive it's a client thing... The code info.vrs is on only 2 places... 1 is the one you reported... witch is a line 2 show the ClientVerion number... the second one is to get the ClientVersion number...

So only way 2 get error is that the client send fucked up myinfo... makeing PtokaX unable to read it correctly....
What client are you using so u can test it... and what version?
Title:
Post by: Madman on 02 August, 2005, 22:26:36
package updated..
Quote-- Fixed a bug with kicking from some clients (Thanks [AT]conejodelmal 4 report)
Title: Little bit lazy??
Post by: Snoris on 03 August, 2005, 12:35:33
iShareAmount = iShareAmount.." GB"

Isnt that just lazy??   ;)

*EDIT*
There might be people that have MB in sharelimt  =)
There are not many but still....

I havent scripted in a very long time and dont wanna search your hole script for a solution  =)
Title:
Post by: Madman on 03 August, 2005, 18:10:20
QuoteOriginally posted by Snoris
iShareAmount = iShareAmount.." GB"

Isnt that just lazy??   ;)

*EDIT*
There might be people that have MB in sharelimt  =)
There are not many but still....

I havent scripted in a very long time and dont wanna search your hole script for a solution  =)
Maybe it it is a bit lazy...
BUT this is not my script...
I only converted it... due to 2 much freetime...
It's still nErBoS script...
i take no requests and wont add extra stuf...
I'll only fix bugs...
Title:
Post by: Dessamator on 03 August, 2005, 18:24:46
haha, i agree with u madman, but the solution is simple, just right it with a decimal point, or use fractions, snoris
Title:
Post by: (-=TrIp-iN-SuN=-) on 07 August, 2005, 05:32:30
master chat doing errors i can't talk in master chat?? ?(
Title: Re: Brain-Master - Lua5
Post by: Madman on 07 August, 2005, 11:14:34
QuoteOriginally posted by (-=TrIp-iN-SuN=-)
master chat doing errors i can't talk in master chat?? ?(

The error msg woulg be good 2 have...
Anyway.. if ixed this error..
[11:10:55] <Brain-Master> Brain-Master.lua:612: attempt to call global `strlower' (a nil value)

Package updated...
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 02:03:30
Is it possible to add more profiles. Meaning- Us hub owners can add as many profiles as we need and still use the rightclicks?
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 03:57:42
Quote from: Mikey on 08 March, 2006, 02:03:30
Is it possible to add more profiles. Meaning- Us hub owners can add as many profiles as we need and still use the rightclicks?
Yes,
Just mod this part of the script to suit your needs


--## Deal with RightClick Commands ##--
function RigthClickCMD(user)
user:SendData("$UserCommand 255 1 |")
UserCMD(user)
if (user.bOperator) then
OpCMD(user)   
if (user.iProfile == 4) then
AdimCMD(user)
elseif (user.iProfile == 0) then
AdimCMD(user)
MasterCMD(user)
end
end
end
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 04:00:17
Uhhhhh I'll try still learning LUA 5
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 04:03:36
OK this script is compiled how do I do it?

Ok these are the profiles I need

NetFounder, CoFounder, Owner, CoOwner, Master, Moderator, ChiefOP, OP, Tech, SVIP, ForumsVIP, VIP, Reg, User
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 04:12:51
Hehe, okey...
An explonation of the code...

--## Deal with RightClick Commands ##--
function RigthClickCMD(user)
user:SendData("$UserCommand 255 1 |") -- Cleans the rightclick from all other cmd's
UserCMD(user) -- Send normal user cmds
if (user.bOperator) then -- if user op or above
OpCMD(user) -- Send op cmd's
if (user.iProfile == 4) then -- if user is profile 4 (Admin)
AdimCMD(user) -- Send admin cmd
elseif (user.iProfile == 0) then -- if user is profile 0 (Master)
AdimCMD(user) -- Send admin cmd
MasterCMD(user) -- Send Master cmd
end
end
end


Now lets asume that you add a profile called Moderator, and if you only have the Profiles that comes with Brain-Master.
The Moderator profile will get number 5, and u make the profile OP, the new code wold look like this...


--## Deal with RightClick Commands ##--
function RigthClickCMD(user)
user:SendData("$UserCommand 255 1 |") -- Cleans the rightclick from all other cmd's
UserCMD(user) -- Send normal user cmds
if (user.bOperator) then -- if user op or above
OpCMD(user) -- Send op cmd's
if (user.iProfile == 4) then -- if user is profile 4 (Admin)
AdimCMD(user) -- Send admin cmd
elseif (user.iProfile == 0) then -- if user is profile 0 (Master)
AdimCMD(user) -- Send admin cmd
MasterCMD(user) -- Send Master cmd
elseif (user.iProfile == 5) then -- if user is profile 5 (Moderator)
ModCMD(user)
end
end
end


To create the ModCMD(user) function find, --## Administrator Commands ##--, and Cop/paste the Master/Admin cmd's in to the function.

Hope this will help.

The source is located in Base-Dados\Script-Code
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 04:17:58
Quote from: Mikey on 08 March, 2006, 04:03:36
NetFounder, CoFounder, Owner, CoOwner, Master, Moderator, ChiefOP, OP, Tech, SVIP, ForumsVIP, VIP, Reg, User

Woow... That's alot of profiles... That would require alot of work.... Hope you can make it through my guide..
If not... well... I guess i could make it... but i havent created Brain-Master, BUT i can make thoose profiles, but then you need to tell me what cmd's you want for each profile, eccept, thoose that are allready in it...

But it would be good if you tied creating it your self, code to learn ;)

Btw, to compile, just duble click complie.bat

Edit:

Are you sure you really need all thoose profiles?
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 04:21:53
Yeah I do. I can modify scripts but this is an awfully big script for me....lol I'm afraid to see how this is gonna turn out...LMAO
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 04:24:17
Quote from: Mikey on 08 March, 2006, 04:21:53
Yeah I do. I can modify scripts but this is an awfully big script for me....lol I'm afraid to see how this is gonna turn out...LMAO

Hehe, just ask 4 help if you need...
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 04:29:18
QuoteNetFounder, CoFounder, Owner, CoOwner, Master, Moderator, ChiefOP, OP, Tech, SVIP, ForumsVIP, VIP, Reg, User

NetFounder, CoFounder, Owner, CoOwner, Master,<-----All commands Available

Moderator, Tech<----All commands except for Hub Config commands

ChiefOP, OP, <--------------- Standard OP Commands

ForumsVIP, <------------VIP Commands with option to reg users

SVIP, <-----Only able to be kicked by Master and higher. Standard VIP Commands, (No Registration for Regs)

Reg, <-------Standard Reg Commands

User, <------ Rules and Regme Command if available in script


Does that help?

Op and higher uses opchat. I could care less about vip chat I wont use it

Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 04:58:02
This would require a almost rewrite of B-M...
And I stay @ the small script section. I'm sorry, I won't do this...
I made a promise, to myself, to never script an MainBot...
I think a proper action, is to ask an MainBot creator about this...
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 05:00:12
LMAO I figured as much any way to simplify what I wanna do?
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 05:11:54
NetFounder, CoFounder, Owner, CoOwner, Master <-- Use Master profile, and use Prefixes [NetFounder] and so on...
Moderator, Tech, ChiefOP, OP, <-- Use Op, and use Prefixes [Moderator] and so on...
ForumsVIP, SVIP, <-- Use VIP profile, use, prefix here 2...

As 4 the command's... I would suggest a request 4 a standalone script 4 the FVIP, it only needs a reg cmd...
As 4 the mod and Tech... I dunno, but specifing in a request, what cmd's they need.
That i think, would be the best soulation..
Title: Re: Brain-Master - Lua5
Post by: Mikey on 08 March, 2006, 05:52:32
Good idea! You able to help with a fvip script.....want them to only be kicked by masters and higher and have a reg commands?
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 06:03:33
Quote from: Mikey on 08 March, 2006, 05:52:32
Good idea! You able to help with a fvip script.....want them to only be kicked by masters and higher and have a reg commands?


Yes, will post in the Finished Scripts section later...
Title: Re: Brain-Master - Lua5
Post by: SilvaO on 08 March, 2006, 22:47:20
Hi! Madman

Brain Master link do not work  :-[
Title: Re: Brain-Master - Lua5
Post by: Psycho_Chihuahua on 08 March, 2006, 23:33:05
It does work...Madman only misstyped the Link - but he has a Link to his Homepage as a Signature :D

Click to download (http://www.thedestruction.org/lua/Lua5/Brain-Master.lua5.rar)
Title: Re: Brain-Master - Lua5
Post by: Madman on 08 March, 2006, 23:38:31
Quote from: Psycho_Chihuahua on 08 March, 2006, 23:33:05
It does work...Madman only misstyped the Link - but he has a Link to his Homepage as a Signature :D

Click to download (http://www.thedestruction.org/lua/Lua5/Brain-Master.lua5.rar)

Not misstyped, remade home page.. ;p I'm supprised there has been so little reports of broken links ;p

Btw... I am SO stealing your avatar... =)
Title: Re: Brain-Master - Lua5
Post by: Psycho_Chihuahua on 08 March, 2006, 23:45:16
yeah, i like it to :D