Hello everybody!
Please convert random nickparty bot to LUA5.Thx
----------------------------------------------------------------------
Code
----------------------------------------------------------------------
--Crazy Animals 2.0 Script Powered by Demone.Astaroth
--Script temporarily gives to users a strange nick :)
--2 options (fixed and random nicks, always for the current session); stopping command clean the memory
--Commands:
-- !anim fix -- Let's start the fixed animals' nick party!
-- !anim on -- Let's start the random animals' nick party!
-- !anim off -- Stop the parties
bot="[HUB]Security"
anim=0
cnames = {
"[HUN]Ervin",
"[HUN]Ern?",
"[HUN]Krisztina",
"[HUN]Rezs?ke",
"[HUN]Attis",
"[HUN]Scareface",
"[HUN]Drexion",
"[HUN]Csiri-Biri-Zabszalma",
"[HUN]Edina",
"[HUN]Tomi",
"[HUN]Elmegyogy?",
"[HUN]Nem?nfingottam",
"[HUN]Gerg?",
"[HUN]Romal?ny",
"[HUN]sexi-girl",
"[HUN]Peti",
"[HUN]Laci",
"[HUN]Lajos",
"[HUN]Viccmaster",
"[HUN]Ildik?",
"[HUN]Cseri",
"[HUN]?gica",
"[HUN]Gizella",
"[HUN]Signal",
}
unique = {}
function Main()
frmHub:RegBot(BotName)
end
function DataArrival(curUser, message)
s,e,cmd= strfind(message,"%b<>%s+(%S+)")
if anim==1 then
if unique[curUser.sName]==nil then
unique[curUser.sName]=cnames[random(1, getn(cnames))]
end
end
if curUser.bOperator ~= nil then
s,e,cmd,status= strfind(message,"%b<>%s(.+)%s(.+)")
if (cmd == "!anim") then
if strfind(status, "fix") then
SendToAll(bot, "Duplex natura vigilat super omnia.")
anim=1
elseif strfind(status, "off") then
SendToAll(bot, "Nickpatry kikapcsolva")
unique[curUser.sName]=nil
anim=0
elseif strfind(status, "on") then
SendToAll(bot, "Nickparty enged?lyezve")
anim=2
end
return 1
end
end
if anim==1 then
if not strfind(message, "$.+") then
s,e,mes = strfind(message, "%b<> (.*)")
if unique[curUser.sName]~=nil then
SendToAll(unique[curUser.sName], mes)
return 1; end; end
elseif anim==2 then
if not strfind(message, "$.+") then
s,e,mes = strfind(message, "%b<> (.*)")
nome=cnames[random(1, getn(cnames))]
SendToAll(nome, mes)
return 1; end;
end
end
Here yo go..
--Converted to lua5 By Jelf 14/03/05
--Crazy Animals 2.0 Script Powered by Demone.Astaroth
--Script temporarily gives to users a strange nick :)
--2 options (fixed and random nicks, always for the current session); stopping command clean the memory
--Commands:
-- !anim fix -- Let's start the fixed animals' nick party!
-- !anim on -- Let's start the random animals' nick party!
-- !anim off -- Stop the parties
bot="[HUB]Security"
anim=0
cnames = {
"[HUN]Ervin",
"[HUN]Ern?",
"[HUN]Krisztina",
"[HUN]Rezs?ke",
"[HUN]Attis",
"[HUN]Scareface",
"[HUN]Drexion",
"[HUN]Csiri-Biri-Zabszalma",
"[HUN]Edina",
"[HUN]Tomi",
"[HUN]Elmegyogy?",
"[HUN]Nem?nfingottam",
"[HUN]Gerg?",
"[HUN]Romal?ny",
"[HUN]sexi-girl",
"[HUN]Peti",
"[HUN]Laci",
"[HUN]Lajos",
"[HUN]Viccmaster",
"[HUN]Ildik?",
"[HUN]Cseri",
"[HUN]?gica",
"[HUN]Gizella",
"[HUN]Signal",
}
unique = {}
function Main()
frmHub:RegBot(BotName)
end
function ChatArrival(curUser, message)
s,e,cmd= string.find(message,"%b<>%s+(%S+)")
if anim==1 then
if unique[curUser.sName]==nil then
unique[curUser.sName]=cnames[math.random(1, table.getn(cnames))]
end
end
if curUser.bOperator ~= nil then
s,e,cmd,status= string.find(message,"%b<>%s(.+)%s(.+)")
if (cmd == "!anim") then
if string.find(status, "fix") then
SendToAll(bot, "Duplex natura vigilat super omnia.")
anim=1
elseif string.find(status, "off") then
SendToAll(bot, "Nickpatry kikapcsolva")
unique[curUser.sName]=nil
anim=0
elseif string.find(status, "on") then
SendToAll(bot, "Nickparty enged?lyezve")
anim=2
end
return 1
end
end
if anim==1 then
if not string.find(message, "$.+") then
s,e,mes = string.find(message, "%b<> (.*)")
if unique[curUser.sName]~=nil then
SendToAll(unique[curUser.sName], mes)
return 1; end; end
elseif anim==2 then
if not string.find(message, "$.+") then
s,e,mes = string.find(message, "%b<> (.*)")
nome=cnames[math.random(1, table.getn(cnames))]
SendToAll(nome, mes)
return 1; end;
end
end
very thanks!! :)
simply searching or browsing through the finished scripts section would saved you time and someones efforts in converting....
HERE (http://board.univ-angers.fr/thread.php?threadid=3721&boardid=26) and HERE (http://board.univ-angers.fr/thread.php?threadid=3720&boardid=26)
AArrrghhhh!!
Oh well, there go's another, hehe
QuoteOriginally posted by ??????Hawk??????
simply searching or browsing through the finished scripts section would saved you time and someones efforts in converting....
OK!I understand.
The simpsons bot no RANDOM nickparty bot. :(
It's not working for me.. pardon me! :)
QuoteOriginally posted by stageline
The simpsons bot no RANDOM nickparty bot. :(
It is same, you only change nicks in cnames :]