Author | Message |
---|
Dardanicum n00b Posts: 16
| this is the tricker bot fot ptokax, if anyone can write or convert it to work with hexhub. -- TrickerBot2.lua, created by Ptaczek Dec-24, 2002 -- -- Talkingbot for Ptokax by Troubadour 13 june 2003 -- -- Translated by [NL]MrBuitenhuizen -- -- Some fixes by DJ Bert 11 march 2004 -- -- Rewritten to lua 5 by DJ Bert 15 April 2005 -- -- Fixed answer from bot after usercommands by DJ Bert (Help needed by HAWK) 15 May 2005 -- -- 2 different triggerbots made as 1 bot by DJ Bert 18 May 2005 -- -- Added more trigs by DJ Bert 18 May 2005 -- -- Added random for trigs by DJ Bert 18 May 2005 -- -- Fixed the trigs part by DJ Bert 18 May 2005 -- -- Fixed command say and quiet by DJ Bert 30 May 2005 -- -- Bot is now regged in userlist by DJ Bert 11 June 2005 Request by Markos -- -- Converted to LUA5.X by: St0ne_db 13 Sept. 2006 Request by Addrikk -- -- Use say for talking the bot -- -- Use quiet to stop talking the bot -- -- Added ignored user table by Toobster™as requested by Silverback®™ -- on 16th September 2006 -- Add as many ignored nicks to table below as you wish, just maintain same layout -- A little code tidy up and removal by Toobster™ on 16th September 2006 -- Fixed bot reply following quiet /say commands - (bot used to reply before user command was shown) by Toobster™ on 16th September 2006 -- Added Time delayed respons by Madman, Suggested by Toobster™ TableName = { ["Toobster™"] = 1, ["quiz-bot-nick-here"] = 1, } BotName = "Guardian" trigs = { ["lol"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh", "LoL", "LooL", "LoooL", "LooooL", "\r\n\r\n".. " ,.·^*''l'\ .·^*'´¯¯¯''*^·,. ,/l''*^·-,\r\n".. " 'l 'l::\ ,·' ,.·:*:·, ''i::; 'l l\r\n".. " 'l 'l::: ; ':,:::,:· ';:::'l l' \r\n".. " 'l l::;i - ·;i' :, ¯¯ ,·´l::::'l l \r\n".. " 'l '´ 'l'i::: *: ·.–· ^*'´: :'l::,.::I '''*· ,\r\n".. " 'l ,.-:^:':'\:' :;:: :: : : : :: ::; ·'i:::l':´·., ''i\r\n".. " 'l ,.:'':::::::::::'\ ' *^ ·:–:· ^*'´ 'l/::::::::''::^:., /\r\n".. " '´:;:::::::::;:-·^*' '*^·:;--:;·' \r\n".." " }, ["hehe"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["haha"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["rofl"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["lmao"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["guardian"]={ "Yes [curUser], wat is the matter?", "Did you needed my help, mate?", "Wassup dude?", "Yes pal", "That's me ;-)", "Yeppers" }, ["bye"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cya"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*snif* We will miss you, [curUser]!", "*waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cu"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["fuck"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["fucker"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["shut up"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["stfu"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["hi"]={ "Hello [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hello"]={ "Hello [curUser]", "How r u [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hey"]={ "Hello [curUser]", "Hola", "A very good hey to you too", "Yeps", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["drunk"]={ "Me dRunk? -*- HICK -*-", "Pftftt paff the boffle bartender pfffttttttt", "I just drank a little...", "I am not drunk!!", "I am not dddddddddddddrunk.....", "Drunk?", "Pfftt!", "Pour me another", "*spew*", "Oohhh my head", "I think I'm gonna hurl", "*BLAH*", "*BURP*", "Me not drunk *HICK*" }, ["bot"]={ "Bots suck!", "Direct Connect bots are lame...", "A bot?", "Me? I don't think so...", "Don't lie!", "Piece of shit! I 've been found out! -NOT-", "I am quite human...", "Bite me!", "Eat shit! I am not a bot!", "A bot?", "What the shit is a bot?", "You don't think my name is 'Bot' do you?", "Are you trying to say that I am a machine?", "ME? HAHA", "I am a real person!", "I am not a bot, I am a real human!", "I may be dumb, but I am not a bot!", "I may be really confused, but I am no robot!", "I assure you I am just as real as you!", "I know you are, but what am I?", "I'm not!", "<- - - Real live person", "Kill the bots!", "WHO is a bot???", "A bot? Where?", "A bot? Here?", "I doubt if there are any bots here!", "Where do you get such a crazy idea!", "I am NOT a bot", "I am all too real, sorry!", "I am a fleshy human being!", "Do you make it a habit of accusing others, [curUser]?" }, ["drug"]={ "Drugz?", "Illegal substances?", "Narcotics?", "Sniiiiiifffffff", "Me drugs? Never!", "Who is selling drugs?", "Aren't drugs legal in Amsterdam?", "Drugs are too expensive", "Drugs are too dangerous", "Drugs inhibit my abily ot tiiiippe.", "Purple Haze, all around my brain...", "Go to Drugs R Us", "Drugs are bad", "Just say no!", "Just say maybe!", "Just say how much!", "I buy my crack from the Mexicans!", "I hear that the telephone company is a big doper!", "I think all the drugs are smuggled in from the planet 'Uranus'", "Whehhwewe! Pretty elephants!", "*snif* Ahh!" }, ["drink"]={ "Gulp, gulp, gulp", "*takes big drink*", "Bartender! Pour me another!", "HICK!", "I am thirsty...", "Pass the bottle", "*takes a shot*", "I need another cool one", "This bud's for me! *gulp*", "I can drink 16 six packs!", "All American beer sucks!", "Dutch beer is GEWD!", "Aye... I'll drink any man under the table!", "*reaches for another beer*", "*BURP*", "I need some more budweiser", "Somebody pour me a big glass of Guinness Stout.", "Anyone ever try a wild Turkey?", "I love beer!", "I love vodka!", "I took 14 shots of Mad Dog once!", "Itth myth speetthch slurrererrred????", "I think alll mi beer is iampring mi typppin abillty?!?", "Someone get me a beer!", "Beer is awesome!", "Humans can not live by beer alone! But I'd like to try!", "I think you should stop drinking" }, ["sorry"]={ "Don't worry about it", "That's ok ", "Ok", "That's allright", "Fine", "As long as your sorry...", "Allright", "I feel you didn't really mean that...", "You don't sound sincere", "Are you really sorry?", "Forget it", "No sweat", "Ok", "Okidokie" }, ["wassup"]={ "Hunting Crocodiles", "Nothing at the moment", "Eating", "Eating pizza ", "Changing the tires on my dodge", "Juggling chainsaws", "Drinking beer", "Smoking up a storm", "Belly-dancing", "Hacking microsoft.com", "Trying to keep awake!", "Watching television", "I am doing homework", "What do you think!", "Building a spice rack", "Taking a shower", "Drinking myself to death", "Drinking myself to oblivian", "Making origami swans", "Feeding my ducks", "Learning latin", "Programming", "Play the basoon", "Program in Assembly", "Program in C++" }, ["are you"]={ "Does it matter if I am ?", "What difference does it make whether or not I am", "Of course not, don't be silly", "Whether I'm or not is my secret", "Why do you want to know?", "Why are you so nosy?", "Perhaps I am ", "None of your business", "I think you are ", "Does it matter if I am or not?", "Why do you ask?", "I might be", "No, I am not ", "Of course", "Never have been", "Why, are you?" }, ["bitch"]={ "Who are you calling a bitch??", "Oh, I'm upset", "VidFamne is a bitch!", "DJ Bert is always trying to make me his bitch", "I can be a bitch!", "Hey [curUser], that is no way to talk!", "Do you think foul language impresses me?", "A bitch is a female dog" }, ["yeah"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yep"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yes"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["bert"]={ "DJ Bert hates me! What did I do wrong? :(", "I think DJ Bert is a nice person, well sometimes anyways....", "DJ Bert is a bitch to me all the time, and I dunno why!", "Hey [curUser], wanna snuggle? *winks*" }, ["weed"]={ "I'm high mate", "Wanna weed? i have full bag...", "Shit, i'm out of weed, anybody could help me?", "I had full bag of weed, now i have broken face and bag has Jayo" }, ["dvd"]={ "Yes which one [curUser]?", "Yep I have a dvd player for that.", "Every week I rent one" }, ["afk"]={"Away from keyboard ;-)"}, ["rules"]={"\r\n\r\n--==* RULES *==--\r\n\No Teen / Animal Sex / Rape Or Other Weirdo Dirty Crap .\r\nNo .DAT Files This Is Direct Connect, Not Kazaa!!\r\n No Spamming In the MainChat Or PM , You Will Be Kicked!! (Spamming For url's And Other Hub's)\r\n Stay In The Hub While Downloading.\r\n No Flooding!! No Virusses Or VirusMaking Program's.\r\n No program Files / Windows DIR.\r\n Chat in the main menu.\r\n If you get kicked, verify your share!\r\n No Pepek, Replika, MLDonkey or other donkey clients allowed in this hub.\r\n DC-Gui and ketelhot clients allowed only with DC tag on and upload blocker off. \r\n Do NOT bore the operators with unneccessary private messages! (you will be kicked and banned for it)\r\n Minshare = 10 GB Min Slots = 2 Max hubs = 30.\r\n "}, ["disclaimer"]={"For the disclaimer, see the MOTD [curUser]"}, ["help"]={"Can't you do nothing at your own? It's better to type !help "}, ["share"]={"The minimum share is now 10 GB en 2 slots."}, ["coffee"]={"Yeah.. Give me some energy boost!."}, ["hoho"]={"Santa is coming"}, ["controller"]={"Yeah that's me.. Controlling the thing!"}, ["wa"]={"Waazaaa!"}, ["weak"]={"[curUser]. You're the weakest link.. Goodbye!"}, ["hihi"]={"Ok then.. The horse is in tha house!"}, ["wazzup"]={"Waaaazzzzaaa [curUser]!"}, ["cheap"]={"[curUser], I think you're from the government!"}, ["beh"]={"I think [curUser] is a goat!"}, ["what"]={"Get it?"}, ["midday"]={"You also [curUser]"}, ["morning"]={"Yep, it is still early [curUser]."}, ["evening"]={"Ohw...is it that late?"}, ["tired"]={"Was your partner asking to much last night?"}, ["sick"]={"Ohw [curUser], that's not nice."}, ["screen"]={"Don't drop that [curUser]"}, ["search"]={"Goooo use the search option..."}, ["button"]={"Yes just push it"}, ["lamp"]={"Yes some light always wanted! ;)"}, ["mad"]={"Yeah... Of course you are"}, ["sick"]={"Sick in your mind..;)"}, ["sit"]={"Where.... On that chair [curUser]?"}, ["done"]={"Yes well done"}, ["weird"]={"Weirdoooo"}, ["late"]={"Yes one hour later is also later ;)"}, ["burn"]={"Yeah buuuurrrnnn!"}, ["cd"]={"You mean compact disc [curUser]?"}, ["error"]={"That stinks!"}, ["reboot"]={"Have to, [curUser]?!"}, ["sleep"]={"Ooooo [curUser]. Please stay"}, ["empty"]={"When you drink it up it is empty..."}, ["boring"]={"Yes [curUser], even the backside of a empty paper is more exciting"}, ["quiet"]={"Yes on the HUB it is, but here I have the volume of the music at top level!!!! :o)"}, ["kick"]={"I'll kick you [curUser] ... In You're ASS..."}, ["tazzy"]={"He is banned, you can find him in Eurotopia (Pure Mp3 HUB)"}, ["fine"]={"I'm ok thnx for asking... "}, ["less"]={"That isn't much... "}, ["suck"]={"I suck, you suck, we all suck, so...?"}, ["shit"]={"Don't say that [curUser], or will kick you're ass"}, ["back again"]={"Did you leave us then?... "}, ["fine and you"]={"It can always be 1000 golden coins better ;-)"}, ["need something"]={"Hmm... I'll look for it.."}, ["nice weather"]={"Yeah yeah yeah...nothing better to say?"}, ["spurt"]={"I hope you are going to clean that up [curUser]"}, ["viagra"]={"B=====================D ~~~~~~ Seems to work well that viagra"}, }; idlequestions = { "It's pretty dark in this pc!", "Anybody in here?", "Who has some awesome share for me?", "I'm off for a smoke...", "I'll return... smoking time!!", "Hummehumeuhmm.. My lips are closed with food behind it. I can't say a thing right now", "Searching for fooooood!", "Hé...Ho...that´s right!", "Boringggggg", "Pfff.. I'm very important, bye bye!", "Hmmm going to search for some cookies", "Ohh man.... I need to grab a new beer from downstairs", "Well I'm leaving now", "Yeah..... Oprah is on tv... Go watch it!", "It is cold inside hmmm probably because I'm standing naked behind my pc", "Ohnnnooo, I'm to late for a meeting :(", "I'll have a look outside, to watch if the sun is still there", "Anybody?", "Hé I am here", "Who want's to hear a joke?", "I´ll be back!", "So... And now I´m gonna leave you all, haha!", "Yeah right...", "Going to the toilet, brb", "Ahhh that's much better!", "Wassup....?", "Haha have you heared that?", "Hmmmmmmm?", "I need to clean my monitor, I can't see what I'm typing right now", "Have you seen my share already... hahaha !! ", "Yesszzz... I´m here!", "Wazzzzaaaaa!!!", "There is no ending at this download.......", "DJ Bert is a bitch to me all the time, and I dunno why! ", "I think DJ Bert is a nice person, well sometimes anyways.... ", "\r\n\r\n First a _,-._\r\n\ _,-' _ )\r\n\ (_.-' _.-'\r\n\ _() _,-'\r\n\ ( )/\r\n\ )(/\r\n\ _______________( /)\r\n\ ()__)____________)))))\r\n\ for me!", "\r\n\r\n «•´ •.(*•.¸( •.¸ ¸.•´)¸.•*).•´ •»\r\n\ «•´¨*•.¸* Happy Downloading *.¸¸.•*¨ •»\r\n\ «•´¨*•.¸ in here .¸¸.•*¨ •»\r\n\ «•´ •.(¸.•´(¸.•* *•.¸) •.¸).•´ •»", "\r\n\r\n ( ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯) \r\n This hub is watched by \r\n Guardian 5 V1.00 \r\n (_________________________________)\r\n o\r\n o \r\n (\\(\\ \r\n (._. )\r\n (')(')_)\r\n \r\n" }; idleanswers = { "Hee, [curUser]... have you a good movie?", "Excuse me [curUser], do you have a slot for me? ", "Joehoe, [curUser]... Something new in share?", "Ok,[curUser]... I'll will watch by using the search option for illegal share... :(", "That's what we needed [curUser] !", "Pffff, took it so long [curUser]!", "Well done something usefull [curUser]?", "What are you doing [curUser]?", "Hé don't do that [curUser]!", "What [curUser] .... Can you do that?!", "YES YES...", "Hmmm that's something different", "Huh, what do you mean?", "Yep it can be [curUser], but....", "Yep that's possible", "Yh I see [curUser] that's ok, but I'm going to watch the news.", "Hmmm hmmm", "Tjadielalla la...", "Yeah yeah [curUser] when you was still a baby, I kicked already the bad guys from this hub!!", "OK..... Any chatters here?", ">---BRB---<", "Nice drink.. Ahhh!", "Hello HUB, I'm here!", "You can do that too [curUser]!", "Last time you didn't say that you was going to leave [curUser]...:(", "Hé [curUser] it is sad that you just connect when I'm leaving.. bye!", "Thnx, [curUser]... I was waiting here with a cup of thee.. )", "You can do that too [curUser]!", "Somebody pour me a big glass of Guinness Stout.", "I think alll mi beer is iampring mi typppin abillty?!?", " Hmmm, Okidoki I must go now.. :( ", "sup, i'm back again :-)", "Thnx, [curUser]... I was waiting here with a cup of thee.. )" }; -- Time Definition sec = 1000 min = 60 * sec hour = 60 * min TmrFreq = 1*sec tabTimers = {n=0} function RegTimer(F,Interval,Name) local tmpTrig = Interval / TmrFreq assert(Interval >= TmrFreq, "RegTimer(): Please Adjust TmrFreq") local Timer = {n=0} Timer.Name = Name Timer.Func = F Timer.Trig = tmpTrig Timer.count=1 table.insert(tabTimers, Timer) end function RemoveTimer(Name) local count = 0 for I in ipairs(tabTimers) do count = count+1 if string.find(tabTimers[I].Name, Name) then Timer2Remove = count break end end table.remove(tabTimers, Timer2Remove) end index = nil function Main() -- LUA 5.X COMPATIBILITY if (_VERSION == "Lua 5.1.1") or (_VERSION == "Lua 5.1") then TableMaxSize = table.maxn StringMatch = string.gmatch CollectTrash = function() collectgarbage("collect"); end elseif (_VERSION == "Lua 5.0.2") then TableMaxSize = table.getn StringMatch = string.gfind CollectTrash = function() collectgarbage(); end end frmHub:RegBot(BotName, 1, "Talkingbot. Rewritten by DJ Bert", "bert.dj@gmail.com") a = 0 RegTimer(IdleQ, 5*min, "Idle Q") SetTimer(TmrFreq) StartTimer() end function OnTimer() for I in ipairs(tabTimers) do tabTimers[I].count = tabTimers[I].count+1 if tabTimers[I].count > tabTimers[I].Trig then tabTimers[I].count=1 tabTimers[I]:Func() end end end function ChatArrival(curUser, data) if TableName[curUser.sName] ~=1 then if string.sub(data, 1, 1) then -- get the msg only using regular expression data=string.sub(data,1,string.len(data)-1) -- parse the command s,e,cmd,RestOfText = string.find( data, "%b<>%s+(%S+)%s+(.*)" ) if RestOfText == nil then RestOfText = "" s,e,cmd = string.find( data, "%b<>%s+(%S+)" ) end end s,e,mess = string.find(data, "%b<> ([%w ]*)") if (cmd=="quiet") then if curUser.bOperator then a = 3 SendToAll(curUser.sName,cmd) SendToAll(BotName, "Ok,...I'll shut my mouth for a while... :s") StopTimer() return 1 else if a == 1 or a == 2 then SendToAll(curUser.sName,cmd) SendToAll(BotName, "hmmm...hmmm...") a = 0 return 1 end end end if (cmd=="say") then if curUser.bOperator then a = 2 SendToAll(curUser.sName,cmd) SendToAll(BotName, "Ahh... nice to hear something from you.. :o)") return 1 else if a == 1 or a == 2 then SendToAll(curUser.sName,cmd) SendToAll(BotName, "why..........") a = 0 return 1 end end end -- look in the table for key in pairs(trigs) do if mess and a == 0 or a == 2 then if( string.find( string.lower(mess), key) ) then answer, x = string.gsub(trigs[key][math.random(1,TableMaxSize(trigs[key]))], "%b[]", curUser.sName) GlobalAns = answer ChatTimer() end end end if cmd and a == 1 then if (cmd=="quiet") or (cmd=="say") then else index = math.random(1,TableMaxSize(idleanswers)) answer, x = string.gsub(idleanswers[index], "%b[]", curUser.sName) SendToAll(curUser.sName,cmd.." "..RestOfText) SendToAll(BotName, answer) a = 0 return 1 end else if a == 2 then StartTimer() end end end end function ChatTimer() Number = math.random(2*sec, 10*sec) RegTimer(ChatTrigged, Number, "Chatt trigg") end function ChatTrigged() SendToAll(BotName, GlobalAns) RemoveTimer("Chatt trigg") GlobalAns = nil end function IdleQ() index = math.random(1,TableMaxSize(idlequestions)) SendToAll(BotName, idlequestions[index]) a = 1 end nice script to run in a hub. i hope somebody gives it a try
|
CrazyGuy n00b Posts: 32
| I'll give it a go, but I think this script is better off with a complete re-write
Quote: | [08:59:13] [ 127.0.0.1 ] <CrazyGuy> lol [08:59:16] <Guardian> Yeah, CrazyGuy that was funny, Hahahaha. | takes a whole 3 seconds to get a reply :( But check this post later today, I'll see what I can do
|
Ashura Unstopable Posts: 370
| they are few other talking bots, dzad got 1 and meka aswell. however they are not lua bots and connect to the hub on their own but for sure chat much more fun. meka wanted to make that stupid elfgirls as script for his plugin, duno if hes still bout it :roll:
|
Dardanicum n00b Posts: 16
| cg, time delay has been added by madman, to look more as a real user, you can play around with that as you please. it used to reply stright away, which was messing up the op commands. ashura, i know they've got those bots but haven't seen them anywhere for download.
|
Ashura Unstopable Posts: 370
| meka will make elfgirls script when he got free time next week prolly and that bots i asked dzad to ul it here on forum and he meant he need to sort few things with it and will release it here
|
CrazyGuy n00b Posts: 32
| Okay, I didnt take the time to really go over the script and look for improvements, so I simply modded it for HeXHub
Code: | -- TrickerBot2.lua, created by Ptaczek Dec-24, 2002 -- -- Talkingbot for Ptokax by Troubadour 13 june 2003 -- -- Translated by [NL]MrBuitenhuizen -- -- Some fixes by DJ Bert 11 march 2004 -- -- Rewritten to lua 5 by DJ Bert 15 April 2005 -- -- Fixed answer from bot after usercommands by DJ Bert (Help needed by HAWK) 15 May 2005 -- -- 2 different triggerbots made as 1 bot by DJ Bert 18 May 2005 -- -- Added more trigs by DJ Bert 18 May 2005 -- -- Added random for trigs by DJ Bert 18 May 2005 -- -- Fixed the trigs part by DJ Bert 18 May 2005 -- -- Fixed command say and quiet by DJ Bert 30 May 2005 -- -- Bot is now regged in userlist by DJ Bert 11 June 2005 Request by Markos -- -- Converted to LUA5.X by: St0ne_db 13 Sept. 2006 Request by Addrikk -- -- Use say for talking the bot -- -- Use quiet to stop talking the bot -- -- Added ignored user table by Toobster™as requested by Silverback®™ -- on 16th September 2006 -- Add as many ignored nicks to table below as you wish, just maintain same layout -- A little code tidy up and removal by Toobster™ on 16th September 2006 -- Fixed bot reply following quiet /say commands - (bot used to reply before user command was shown) by Toobster™ on 16th September 2006 -- Added Time delayed respons by Madman, Suggested by Toobster™ -- Modified for HexHub with LUA Plugin 1.503a or higher. Plugin by Meka][Meka, script modification by CrazyGuy on November 16th 2006 TableName = { ["<-Trivia->"] = 1, } BotName = "Guardian" trigs = { ["lol"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh", "LoL", "LooL", "LoooL", "LooooL", "\r\n\r\n".. " ,.·^*''l'\ .·^*'´¯¯¯''*^·,. ,/l''*^·-,\r\n".. " 'l 'l::\ ,·' ,.·:*:·, ''i::; 'l l\r\n".. " 'l 'l::: ; ':,:::,:· ';:::'l l' \r\n".. " 'l l::;i - ·;i' :, ¯¯ ,·´l::::'l l \r\n".. " 'l '´ 'l'i::: *: ·.–· ^*'´: :'l::,.::I '''*· ,\r\n".. " 'l ,.-:^:':'\:' :;:: :: : : : :: ::; ·'i:::l':´·., ''i\r\n".. " 'l ,.:'':::::::::::'\ ' *^ ·:–:· ^*'´ 'l/::::::::''::^:., /\r\n".. " '´:;:::::::::;:-·^*' '*^·:;--:;·' \r\n".." " }, ["hehe"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["haha"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["rofl"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["lmao"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["guardian"]={ "Yes [curUser], wat is the matter?", "Did you needed my help, mate?", "Wassup dude?", "Yes pal", "That's me ", "Yeppers" }, ["bye"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cya"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*snif* We will miss you, [curUser]!", "*waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cu"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["fuck"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["fucker"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["shut up"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["stfu"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["hi"]={ "Hello [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hello"]={ "Hello [curUser]", "How r u [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hey"]={ "Hello [curUser]", "Hola", "A very good hey to you too", "Yeps", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["drunk"]={ "Me dRunk? -*- HICK -*-", "Pftftt paff the boffle bartender pfffttttttt", "I just drank a little...", "I am not drunk!!", "I am not dddddddddddddrunk.....", "Drunk?", "Pfftt!", "Pour me another", "*spew*", "Oohhh my head", "I think I'm gonna hurl", "*BLAH*", "*BURP*", "Me not drunk *HICK*" }, ["bot"]={ "Bots suck!", "Direct Connect bots are lame...", "A bot?", "Me? I don't think so...", "Don't lie!", "Piece of shit! I 've been found out! -NOT-", "I am quite human...", "Bite me!", "Eat shit! I am not a bot!", "A bot?", "What the shit is a bot?", "You don't think my name is 'Bot' do you?", "Are you trying to say that I am a machine?", "ME? HAHA", "I am a real person!", "I am not a bot, I am a real human!", "I may be dumb, but I am not a bot!", "I may be really confused, but I am no robot!", "I assure you I am just as real as you!", "I know you are, but what am I?", "I'm not!", "<- - - Real live person", "Kill the bots!", "WHO is a bot???", "A bot? Where?", "A bot? Here?", "I doubt if there are any bots here!", "Where do you get such a crazy idea!", "I am NOT a bot", "I am all too real, sorry!", "I am a fleshy human being!", "Do you make it a habit of accusing others, [curUser]?" }, ["drug"]={ "Drugz?", "Illegal substances?", "Narcotics?", "Sniiiiiifffffff", "Me drugs? Never!", "Who is selling drugs?", "Aren't drugs legal in Amsterdam?", "Drugs are too expensive", "Drugs are too dangerous", "Drugs inhibit my abily ot tiiiippe.", "Purple Haze, all around my brain...", "Go to Drugs R Us", "Drugs are bad", "Just say no!", "Just say maybe!", "Just say how much!", "I buy my crack from the Mexicans!", "I hear that the telephone company is a big doper!", "I think all the drugs are smuggled in from the planet 'Uranus'", "Whehhwewe! Pretty elephants!", "*snif* Ahh!" }, ["drink"]={ "Gulp, gulp, gulp", "*takes big drink*", "Bartender! Pour me another!", "HICK!", "I am thirsty...", "Pass the bottle", "*takes a shot*", "I need another cool one", "This bud's for me! *gulp*", "I can drink 16 six packs!", "All American beer sucks!", "Dutch beer is GEWD!", "Aye... I'll drink any man under the table!", "*reaches for another beer*", "*BURP*", "I need some more budweiser", "Somebody pour me a big glass of Guinness Stout.", "Anyone ever try a wild Turkey?", "I love beer!", "I love vodka!", "I took 14 shots of Mad Dog once!", "Itth myth speetthch slurrererrred????", "I think alll mi beer is iampring mi typppin abillty?!?", "Someone get me a beer!", "Beer is awesome!", "Humans can not live by beer alone! But I'd like to try!", "I think you should stop drinking" }, ["sorry"]={ "Don't worry about it", "That's ok ", "Ok", "That's allright", "Fine", "As long as your sorry...", "Allright", "I feel you didn't really mean that...", "You don't sound sincere", "Are you really sorry?", "Forget it", "No sweat", "Ok", "Okidokie" }, ["wassup"]={ "Hunting Crocodiles", "Nothing at the moment", "Eating", "Eating pizza ", "Changing the tires on my dodge", "Juggling chainsaws", "Drinking beer", "Smoking up a storm", "Belly-dancing", "Hacking microsoft.com", "Trying to keep awake!", "Watching television", "I am doing homework", "What do you think!", "Building a spice rack", "Taking a shower", "Drinking myself to death", "Drinking myself to oblivian", "Making origami swans", "Feeding my ducks", "Learning latin", "Programming", "Play the basoon", "Program in Assembly", "Program in C++" }, ["are you"]={ "Does it matter if I am ?", "What difference does it make whether or not I am", "Of course not, don't be silly", "Whether I'm or not is my secret", "Why do you want to know?", "Why are you so nosy?", "Perhaps I am ", "None of your business", "I think you are ", "Does it matter if I am or not?", "Why do you ask?", "I might be", "No, I am not ", "Of course", "Never have been", "Why, are you?" }, ["bitch"]={ "Who are you calling a bitch??", "Oh, I'm upset", "VidFamne is a bitch!", "DJ Bert is always trying to make me his bitch", "I can be a bitch!", "Hey [curUser], that is no way to talk!", "Do you think foul language impresses me?", "A bitch is a female dog" }, ["yeah"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yep"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yes"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["weed"]={ "I'm high mate", "Wanna weed? i have full bag...", "Shit, i'm out of weed, anybody could help me?", "I had full bag of weed, now i have broken face and bag has Jayo" }, ["dvd"]={ "Yes which one [curUser]?", "Yep I have a dvd player for that.", "Every week I rent one" }, ["afk"]={"Away from keyboard "}, ["rules"]={"\r\n\r\n--==* RULES *==--\r\n\No Teen / Animal Sex / Rape Or Other Weirdo Dirty Crap .\r\nNo .DAT Files This Is Direct Connect, Not Kazaa!!\r\n No Spamming In the MainChat Or PM , You Will Be Kicked!! (Spamming For url's And Other Hub's)\r\n Stay In The Hub While Downloading.\r\n No Flooding!! No Virusses Or VirusMaking Program's.\r\n No program Files / Windows DIR.\r\n Chat in the main menu.\r\n If you get kicked, verify your share!\r\n No Pepek, Replika, MLDonkey or other donkey clients allowed in this hub.\r\n DC-Gui and ketelhot clients allowed only with DC tag on and upload blocker off. \r\n Do NOT bore the operators with unneccessary private messages! (you will be kicked and banned for it)\r\n Minshare = 10 GB Min Slots = 2 Max hubs = 30.\r\n "}, ["disclaimer"]={"For the disclaimer, see the MOTD [curUser]"}, ["help"]={"Can't you do nothing at your own? It's better to type !help "}, ["share"]={"The minimum share is now 10 GB en 2 slots."}, ["coffee"]={"Yeah.. Give me some energy boost!."}, ["hoho"]={"Santa is coming"}, ["controller"]={"Yeah that's me.. Controlling the thing!"}, ["wa"]={"Waazaaa!"}, ["weak"]={"[curUser]. You're the weakest link.. Goodbye!"}, ["hihi"]={"Ok then.. The horse is in tha house!"}, ["wazzup"]={"Waaaazzzzaaa [curUser]!"}, ["cheap"]={"[curUser], I think you're from the government!"}, ["beh"]={"I think [curUser] is a goat!"}, ["what"]={"Get it?"}, ["midday"]={"You also [curUser]"}, ["morning"]={"Yep, it is still early [curUser]."}, ["evening"]={"Ohw...is it that late?"}, ["tired"]={"Was your partner asking to much last night?"}, ["sick"]={"Ohw [curUser], that's not nice."}, ["screen"]={"Don't drop that [curUser]"}, ["search"]={"Goooo use the search option..."}, ["button"]={"Yes just push it"}, ["lamp"]={"Yes some light always wanted! "}, ["mad"]={"Yeah... Of course you are"}, ["sick"]={"Sick in your mind.."}, ["sit"]={"Where.... On that chair [curUser]?"}, ["done"]={"Yes well done"}, ["weird"]={"Weirdoooo"}, ["late"]={"Yes one hour later is also later "}, ["burn"]={"Yeah buuuurrrnnn!"}, ["cd"]={"You mean compact disc [curUser]?"}, ["error"]={"That stinks!"}, ["reboot"]={"Have to, [curUser]?!"}, ["sleep"]={"Ooooo [curUser]. Please stay"}, ["empty"]={"When you drink it up it is empty..."}, ["boring"]={"Yes [curUser], even the backside of a empty paper is more exciting"}, ["quiet"]={"Yes on the HUB it is, but here I have the volume of the music at top level!!!! )"}, ["kick"]={"I'll kick you [curUser] ... In You're ASS..."}, ["tazzy"]={"He is banned, you can find him in Eurotopia (Pure Mp3 HUB)"}, ["fine"]={"I'm ok thnx for asking... "}, ["less"]={"That isn't much... "}, ["suck"]={"I suck, you suck, we all suck, so...?"}, ["shit"]={"Don't say that [curUser], or will kick you're ass"}, ["back again"]={"Did you leave us then?... "}, ["fine and you"]={"It can always be 1000 golden coins better "}, ["need something"]={"Hmm... I'll look for it.."}, ["nice weather"]={"Yeah yeah yeah...nothing better to say?"}, ["spurt"]={"I hope you are going to clean that up [curUser]"}, ["viagra"]={"B=====================D ~~~~~~ Seems to work well that viagra"}, }; idlequestions = { "It's pretty dark in this pc!", "Anybody in here?", "Who has some awesome share for me?", "I'm off for a smoke...", "I'll return... smoking time!!", "Hummehumeuhmm.. My lips are closed with food behind it. I can't say a thing right now", "Searching for fooooood!", "Hé...Ho...that´s right!", "Boringggggg", "Pfff.. I'm very important, bye bye!", "Hmmm going to search for some cookies", "Ohh man.... I need to grab a new beer from downstairs", "Well I'm leaving now", "Yeah..... Oprah is on tv... Go watch it!", "It is cold inside hmmm probably because I'm standing naked behind my pc", "Ohnnnooo, I'm to late for a meeting ", "I'll have a look outside, to watch if the sun is still there", "Anybody?", "Hé I am here", "Who want's to hear a joke?", "I´ll be back!", "So... And now I´m gonna leave you all, haha!", "Yeah right...", "Going to the toilet, brb", "Ahhh that's much better!", "Wassup....?", "Haha have you heared that?", "Hmmmmmmm?", "I need to clean my monitor, I can't see what I'm typing right now", "Have you seen my share already... hahaha !! ", "Yesszzz... I´m here!", "Wazzzzaaaaa!!!", "There is no ending at this download.......", "DJ Bert is a bitch to me all the time, and I dunno why! ", "I think DJ Bert is a nice person, well sometimes anyways.... ", "\r\n\r\n First a _,-._\r\n\ _,-' _ )\r\n\ (_.-' _.-'\r\n\ _() _,-'\r\n\ ( )/\r\n\ )(/\r\n\ _______________( /)\r\n\ ()__)____________)))))\r\n\ for me!", "\r\n\r\n «•´ •.(*•.¸( •.¸ ¸.•´)¸.•*).•´ •»\r\n\ «•´¨*•.¸* Happy Downloading *.¸¸.•*¨ •»\r\n\ «•´¨*•.¸ in here .¸¸.•*¨ •»\r\n\ «•´ •.(¸.•´(¸.•* *•.¸) •.¸).•´ •»", "\r\n\r\n ( ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯) \r\n This hub is watched by \r\n Guardian 5 V1.00 \r\n (_________________________________)\r\n o\r\n o \r\n (\\(\\ \r\n (._. )\r\n (')(')_)\r\n \r\n" }; idleanswers = { "Hee, [curUser]... have you a good movie?", "Excuse me [curUser], do you have a slot for me? ", "Joehoe, [curUser]... Something new in share?", "Ok,[curUser]... I'll will watch by using the search option for illegal share... ", "That's what we needed [curUser] !", "Pffff, took it so long [curUser]!", "Well done something usefull [curUser]?", "What are you doing [curUser]?", "Hé don't do that [curUser]!", "What [curUser] .... Can you do that?!", "YES YES...", "Hmmm that's something different", "Huh, what do you mean?", "Yep it can be [curUser], but....", "Yep that's possible", "Yh I see [curUser] that's ok, but I'm going to watch the news.", "Hmmm hmmm", "Tjadielalla la...", "Yeah yeah [curUser] when you was still a baby, I kicked already the bad guys from this hub!!", "OK..... Any chatters here?", ">---BRB---<", "Nice drink.. Ahhh!", "Hello HUB, I'm here!", "You can do that too [curUser]!", "Last time you didn't say that you was going to leave [curUser]...", "Hé [curUser] it is sad that you just connect when I'm leaving.. bye!", "Thnx, [curUser]... I was waiting here with a cup of thee.. )", "You can do that too [curUser]!", "Somebody pour me a big glass of Guinness Stout.", "I think alll mi beer is iampring mi typppin abillty?!?", " Hmmm, Okidoki I must go now.. ", "sup, i'm back again ", "Thnx, [curUser]... I was waiting here with a cup of thee.. )" }; -- Time Definition sec = 1000 min = 60 * sec hour = 60 * min TmrFreq = 1*sec tabTimers = {n=0} function RegTimer(F,Interval,Name) local tmpTrig = Interval / TmrFreq assert(Interval >= TmrFreq, "RegTimer(): Please Adjust TmrFreq") local Timer = {n=0} Timer.Name = Name Timer.Func = F Timer.Trig = tmpTrig Timer.count=1 table.insert(tabTimers, Timer) end function RemoveTimer(Name) local count = 0 for I in ipairs(tabTimers) do count = count+1 if string.find(tabTimers[I].Name, Name) then Timer2Remove = count break end end table.remove(tabTimers, Timer2Remove) end index = nil Main = function() -- LUA 5.X COMPATIBILITY if (_VERSION == "Lua 5.1.1") or (_VERSION == "Lua 5.1") then TableMaxSize = table.maxn StringMatch = string.gmatch CollectTrash = function() collectgarbage("collect"); end elseif (_VERSION == "Lua 5.0.2") then TableMaxSize = table.getn StringMatch = string.gfind CollectTrash = function() collectgarbage(); end end Hub.RegBot(BotName) a = 0 RegTimer(IdleQ, 5*min, "Idle Q") Timer2 = NewTimer('OnTimer') Timer2:Set(TmrFreq); Timer2:Start(); end OnTimer = function() for I in ipairs(tabTimers) do tabTimers[I].count = tabTimers[I].count+1 if tabTimers[I].count > tabTimers[I].Trig then tabTimers[I].count=1 tabTimers[I]:Func() end end end ErrorEvent = function(error) SendToAll(Hub.BotName(), error) end ChatArrival = function(User, data) if TableName[User.sName] ~=1 then if string.sub(data, 1, 1) then -- get the msg only using regular expression --data=string.sub(data,1,string.len(data)-1) -- parse the command s,e,cmd,RestOfText = string.find(data, "(%S+)%s+(.*)" ) if RestOfText == nil then RestOfText = "" s,e,cmd = string.find( data, "(%S+)" ) end end s,e,mess = string.find(data, "([%w ]*)") if (cmd=="quiet") then if User.iIdent > 0 then a = 3 SendToAll(User.sName,cmd) SendToAll(BotName, "Ok,...I'll shut my mouth for a while... :s") Timer2:Stop(); return 0 else if a == 1 or a == 2 then SendToAll(User.sName,cmd) SendToAll(BotName, "hmmm...hmmm...") a = 0 return 0 end end end if (cmd=="say") then if User.iIdent > 0 then a = 2 SendToAll(User.sName,cmd) SendToAll(BotName, "Ahh... nice to hear something from you.. )") return 0 else if a == 1 or a == 2 then SendToAll(User.sName,cmd) SendToAll(BotName, "why..........") a = 0 return 0 end end end -- look in the table for key in pairs(trigs) do if mess and a == 0 or a == 2 then if( string.find( string.lower(mess), key) ) then answer, x = string.gsub(trigs[key][math.random(1,TableMaxSize(trigs[key]))], "%b[]", User.sName) GlobalAns = answer ChatTimer() end end end if cmd and a == 1 then if (cmd=="quiet") or (cmd=="say") then else index = math.random(1,TableMaxSize(idleanswers)) answer, x = string.gsub(idleanswers[index], "%b[]", User.sName) SendToAll(User.sName,cmd.." "..RestOfText) SendToAll(BotName, answer) a = 0 return 0 end else if a == 2 then Timer2:Start(); end end end end ChatTimer = function() Number = math.random(2*sec, 10*sec) RegTimer(ChatTrigged, Number, "Chatt trigg") end ChatTrigged = function() SendToAll(BotName, GlobalAns) RemoveTimer("Chatt trigg") GlobalAns = nil end IdleQ = function() index = math.random(1,TableMaxSize(idlequestions)) SendToAll(BotName, idlequestions[index]) a = 1 end | Tested it
Quote: | 14:43:39] <bob> quiet [14:43:45] <Guardian> Yes on the HUB it is, but here I have the volume of the music at top level!!!! ) [14:44:22] <bob> drink [14:44:29] <Guardian> Pass the bottle [14:44:45] <bob> okay damn [14:44:58] <bob> bot, shut up [14:45:01] <Guardian> I am a fleshy human being! [14:45:18] <bob> shut up [14:45:20] <Guardian> I'll shut up when I damn well please [14:48:11] <Guardian> Haha have you heared that? [14:53:11] <Guardian> So... And now I´m gonna leave you all, haha! [14:58:11] <Guardian> Anybody in here? [15:03:11] <Guardian> Searching for fooooood! [15:08:11] <Guardian> Yesszzz... I´m here! [15:13:11] <Guardian> Haha have you heared that? [15:18:11] <Guardian> Have you seen my share already... hahaha !! [15:23:11] <Guardian> Wazzzzaaaaa!!! [15:28:11] <Guardian> «•´ •.(*•.¸( •.¸ ¸.•´)¸.•*).•´ •» «•´¨*•.¸* Happy Downloading *.¸¸.•*¨ •» «•´¨*•.¸ in here .¸¸.•*¨ •» «•´ •.(¸.•´(¸.•* *•.¸) •.¸).•´ •» [15:33:11] <Guardian> Boringggggg | Have fun
|
Dark n00b Posts: 45
| i think it has a little bug
Code: | [19:29] <Guardian> Hmmm going to search for some cookies [19:29] <Dark> lol [19:29] <Dark> lol [19:29] <Guardian> Pffff, took it so long Dark! | i only wrote "lol" 1 time, but it showed 2 times Later edit:
Code: | [19:34] <Guardian> I'll have a look outside, to watch if the sun is still there [19:34] <Çrä§h•Øvërr¡dë> hehe [19:34] <Çrä§h•Øvërr¡dë> hehe [19:34] <Guardian> Hello HUB, I'm here! |
|
CrazyGuy n00b Posts: 32
| Hmm, I see your point. To be honest I was suprised I didnt have that problem myself lol Here's 2 things you can do (dont do both , then your message disappears) so either: -Change all "return 0" to "return 1" or: -Remove all SendToAll(User.sName,cmd) lines
|
Dardanicum n00b Posts: 16
| cg, thanks for the bot. i can't say if it's working or not, i don't know the how to. might be a good idea if you post something about what to do. cheers
|
Dardanicum n00b Posts: 16
| i can't connect to the hub so i just have to wait for your reply here
|
Ashura Unstopable Posts: 370
|
Quote: | 15:19:55] <Ashura> >.< [15:19:55] <plaY-GirL> You can do that too Ashura! [15:20:03] <Ashura> lol [15:20:09] <plaY-GirL> LoL [15:20:11] <Ashura> reply again [15:20:17] <plaY-GirL> So... And now I´m gonna leave you all, haha! | i see it running in masterloads hexhub, and works fine just that late answer have to wait 3 s
|
CrazyGuy n00b Posts: 32
| Yea the bot starts on hub start, so you don't have to do anything to get it to work. Actually, the less you do the better, because then it starts chatting on its own cuz it gets bored The 3 second delay was build in by Madman on purpose if I understood correctly to make the bot look more like a real user. I didn't take the time/effort to find that and change that
|
Dark n00b Posts: 45
| Dardanicum read @ meka's lua project how to make the script working
|
Dardanicum n00b Posts: 16
| i tried renaming everything but it still doesn't work. trivia works when the talking bot is not there and vice versa but not when loaded together. i renamed the nick of trivia, the nick of bot, i renamed the the script to talkingbot.tbl, talkingbot.lua, talkingbot.dat still same result - hubcrash.
|
Dardanicum n00b Posts: 16
| btw, the time delay is here: ChatTimer = function() Number = math.random(2*sec, 10*sec) RegTimer(ChatTrigged, Number, "Chatt trigg") i changed it to (1*sec, 5*sec) and got a reply after 3 sec with a big lag (2*sec, 10*sec) gave me a reply after 9-11 sec
|
Meka][Meka Unstopable Posts: 700
| are you using the latest plugin ?
|
Dardanicum n00b Posts: 16
| yep, the latest. the bot works if i take the trivia out of the scripts folder, for now i've chosen to do that.
|
Dark n00b Posts: 45
| is this bot working for verlihub too ?
|
Dardanicum n00b Posts: 16
| ok cg i got it working now. all it needed was to get the copy from you. they're both working now same time, trivia and trigger. thnx, nice work.
|
CrazyGuy n00b Posts: 32
|
Quoted from Dark | is this bot working for verlihub too ? | nope
|
AJ Clone Posts: 7
| i cant get this to work can any one send this as a attachment plzz and tell me where to put it fanxx
|
ATAG n00b Posts: 12
| Some bug fixed ;)
Code: | -- TrickerBot2.lua, created by Ptaczek Dec-24, 2002 -- -- Talkingbot for Ptokax by Troubadour 13 june 2003 -- -- Translated by [NL]MrBuitenhuizen -- -- Some fixes by DJ Bert 11 march 2004 -- -- Rewritten to lua 5 by DJ Bert 15 April 2005 -- -- Fixed answer from bot after usercommands by DJ Bert (Help needed by HAWK) 15 May 2005 -- -- 2 different triggerbots made as 1 bot by DJ Bert 18 May 2005 -- -- Added more trigs by DJ Bert 18 May 2005 -- -- Added random for trigs by DJ Bert 18 May 2005 -- -- Fixed the trigs part by DJ Bert 18 May 2005 -- -- Fixed command say and quiet by DJ Bert 30 May 2005 -- -- Bot is now regged in userlist by DJ Bert 11 June 2005 Request by Markos -- -- Converted to LUA5.X by: St0ne_db 13 Sept. 2006 Request by Addrikk -- -- Use say for talking the bot -- -- Use quiet to stop talking the bot -- -- Added ignored user table by Toobster™as requested by Silverback®™ -- on 16th September 2006 -- Add as many ignored nicks to table below as you wish, just maintain same layout -- A little code tidy up and removal by Toobster™ on 16th September 2006 -- Fixed bot reply following quiet /say commands - (bot used to reply before user command was shown) by Toobster™ on 16th September 2006 -- Added Time delayed respons by Madman, Suggested by Toobster™ -- Modified for HexHub with LUA Plugin 1.503a or higher. Plugin by Meka][Meka, script modification by CrazyGuy on November 16th 2006 -- Fixed many problem , added: multi trig feature, file handling ... and cleaned up by ATAG 28.01.2007 TableName = { ["<-Trivia->"] = 1, } BotName = "Guardian" triggFile = "triggs.dat" IdleAFile = "idleanswers.dat" IdleQFile = "idlequestions.dat" path = "scripts\\" -- Time Definition sec = 1000 min = 60 * sec hour = 60 * min TmrFreq = 1*sec tabTimers = {} GlobalAns = {} index = nil function Main() -- LUA 5.X COMPATIBILITY if string.find(_VERSION,"5.0") then table.maxn = table.getn end -- Loading files local readfile = function(filename) local file,err = io.open(path..filename,"r") if not err then file:close(); dofile(path..filename) else SendToAll("TalkingBot_lua",err) end end readfile(triggFile) readfile(IdleQFile) readfile(IdleAFile) if not trigs then trigs = {} elseif not idlequestions then idlequestions = {} elseif not idleanwers then idleanswers = {} end -- Main() Hub.RegBot(BotName) a = 0 RegTimer(IdleQ, 15*min, "Idle Q") Timer2 = NewTimer('OnTimer') Timer2:Set(TmrFreq) Timer2:Start() end function OnTimer() for I,_ in ipairs(tabTimers) do tabTimers[I].count = tabTimers[I].count + 1 if tabTimers[I].count > tabTimers[I].Trig then tabTimers[I].count = 1 tabTimers[I].Func() end end end function ChatArrival(User, data) if string.find(data, "^%p") or TableName[User.sName] then return end local _,_,cmd = string.find(data, "^(%S+)" ) if (cmd=="quiet") then if User.iIdent > 0 then a = 3 SendToAll(BotName, "Ok,...I'll shut my mouth for a while... :s") Timer2:Stop(); else if a == 1 or a == 2 then SendToAll(BotName, "hmmm...hmmm...") a = 0 end end elseif (cmd=="say") then if User.iIdent > 0 then a = 2 SendToAll(BotName, "Ahh... nice to hear something from you.. )") else if a == 1 or a == 2 then SendToAll(BotName, "why..........") a = 0 end end else if a == 0 or a == 2 then mess = nil -- look in the table for i,_ in pairs(trigs) do if string.find(string.lower(data),i) then mess = i end end if mess then mess = string.gsub(trigs[mess][math.random(1,table.maxn(trigs[mess]))], "%b[]", User.sName) table.insert(GlobalAns,mess) ChatTimer(mess) mess = nil end if cmd and a == 1 then if (cmd~="quiet") or (cmd~="say") then local index = math.random(1,table.maxn(idleanswers)) local answer = string.gsub(idleanswers[index], "%b[]", User.sName) SendToAll(BotName, answer) a = 0 end else if a == 2 then Timer2:Start() end end end end end function RegTimer(F,Interval,Name) local tmpTrig = math.floor(Interval / TmrFreq) assert(Interval >= TmrFreq, "RegTimer(): Please Adjust TmrFreq") local Timer = {} Timer.Name = Name Timer.Func = F Timer.Trig = tmpTrig Timer.count = 1 table.insert(tabTimers, Timer) end function RemoveTimer(Name) local count = 0 for I in ipairs(tabTimers) do count = count+1 if string.find(tabTimers[I].Name, Name) then local Timer2Remove = count break end end table.remove(tabTimers, Timer2Remove) end ChatTimer = function(word) local Number = math.random(1*sec, 10*sec) RegTimer(ChatTrigged, Number, word) end ChatTrigged = function() SendToAll(BotName, GlobalAns[1]) RemoveTimer(GlobalAns[1]) table.remove(GlobalAns,1) end IdleQ = function() index = math.random(1,table.maxn(idlequestions)) SendToAll(BotName, idlequestions[index]) a = 1 end function ErrorEvent(err) SendToAll(Hub.BotName(), err) end | triggs.dat:
Code: | trigs = { ["lol"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh", "LoL", "LooL", "LoooL", "LooooL", "\r\n\r\n".. " ,.·^*''l'\ .·^*'´———''*^·,. ,/l''*^·-,\r\n".. " 'l 'l::\ ,·' ,.·:*:·, ''i::; 'l l\r\n".. " 'l 'l::: ; ':,:::,:· ';:::'l l' \r\n".. " 'l l::;i - ·;i' :, —— ,·´l::::'l l \r\n".. " 'l '´ 'l'i::: *: ·.–· ^*'´: :'l::,.::I '''*· ,\r\n".. " 'l ,.-:^:':'\:' :;:: :: : : : :: ::; ·'i:::l':´·., ''i\r\n".. " 'l ,.:'':::::::::::'\ ' *^ ·:–:· ^*'´ 'l/::::::::''::^:., /\r\n".. " '´:;:::::::::;:-·^*' '*^·:;--:;·' \r\n".." " }, ["hehe"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["haha"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["rofl"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["lmao"]={ "Yeah, [curUser] that was funny, Hahahaha.", "Hmm, ok that was funny, I think ", "What! [curUser] Why are you laughing?", "You shake when you laugh, like a bowl full of jelly", "Bwahahaha almost pee my pants, be right back.", "BWahaha, [curUser] , Hahahaha.", "Huh! [curUser] where are you laughing for?", "When you laugh my monitor starts to shake!", "Hilarious!", "Hehehehe", "Hohohohoh" }, ["guardian"]={ "Yes [curUser], wat is the matter?", "Did you needed my help, mate?", "Wassup dude?", "Yes pal", "That's me ", "Yeppers" }, ["bye"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cya"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*snif* We will miss you, [curUser]!", "*waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["cu"]={ "See ya, [curUser]", "Bye, [curUser] .....*sniff*", "Hey, [curUser] get your ass back here. Hehe just kidding, if U have to go U have to go, Bye", "*Snif* We will miss you, [curUser]!", "*Waves bye*", "Leaving already?!", "Got better things to do, huh?", "Catch ya later [curUser]", "snif, will you return [curUser]", "Go on...Leave!" }, ["fuck"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["fucker"]={ "Watch IT [curUser]!! One more line of code and i could kick your ass!", "I hate it when you talk like that!", "Don't ever insult me again", "That's not a very nice way to talk !", "Keep it up and I will kick you!", "Say that again and I am going to clobber you!" }, ["shut up"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["stfu"]={ "Make me!", "Ooh! I'm wounded!", "I'll shut up when I damn well please", "Blah blah blah!", "Why should I?" }, ["hi"]={ "Hello [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hello"]={ "Hello [curUser]", "How r u [curUser]", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["hey"]={ "Hello [curUser]", "Hola", "A very good hey to you too", "Yeps", "Hey [curUser]", "Wassup [curUser]", "Hi [curUser]", "Hey [curUser], what's going on?", "Howdy [curUser]!", "Greetings, [curUser]", "[curUser], do I know you?" }, ["drunk"]={ "Me dRunk? -*- HICK -*-", "Pftftt paff the boffle bartender pfffttttttt", "I just drank a little...", "I am not drunk!!", "I am not dddddddddddddrunk.....", "Drunk?", "Pfftt!", "Pour me another", "*spew*", "Oohhh my head", "I think I'm gonna hurl", "*BLAH*", "*BURP*", "Me not drunk *HICK*" }, ["bot"]={ "Bots suck!", "Direct Connect bots are lame...", "A bot?", "Me? I don't think so...", "Don't lie!", "Piece of shit! I 've been found out! -NOT-", "I am quite human...", "Bite me!", "Eat shit! I am not a bot!", "A bot?", "What the shit is a bot?", "You don't think my name is 'Bot' do you?", "Are you trying to say that I am a machine?", "ME? HAHA", "I am a real person!", "I am not a bot, I am a real human!", "I may be dumb, but I am not a bot!", "I may be really confused, but I am no robot!", "I assure you I am just as real as you!", "I know you are, but what am I?", "I'm not!", "<- - - Real live person", "Kill the bots!", "WHO is a bot???", "A bot? Where?", "A bot? Here?", "I doubt if there are any bots here!", "Where do you get such a crazy idea!", "I am NOT a bot", "I am all too real, sorry!", "I am a fleshy human being!", "Do you make it a habit of accusing others, [curUser]?" }, ["drug"]={ "Drugz?", "Illegal substances?", "Narcotics?", "Sniiiiiifffffff", "Me drugs? Never!", "Who is selling drugs?", "Aren't drugs legal in Amsterdam?", "Drugs are too expensive", "Drugs are too dangerous", "Drugs inhibit my abily ot tiiiippe.", "Purple Haze, all around my brain...", "Go to Drugs R Us", "Drugs are bad", "Just say no!", "Just say maybe!", "Just say how much!", "I buy my crack from the Mexicans!", "I hear that the telephone company is a big doper!", "I think all the drugs are smuggled in from the planet 'Uranus'", "Whehhwewe! Pretty elephants!", "*snif* Ahh!" }, ["drink"]={ "Gulp, gulp, gulp", "*takes big drink*", "Bartender! Pour me another!", "HICK!", "I am thirsty...", "Pass the bottle", "*takes a shot*", "I need another cool one", "This bud's for me! *gulp*", "I can drink 16 six packs!", "All American beer sucks!", "Dutch beer is GEWD!", "Aye... I'll drink any man under the table!", "*reaches for another beer*", "*BURP*", "I need some more budweiser", "Somebody pour me a big glass of Guinness Stout.", "Anyone ever try a wild Turkey?", "I love beer!", "I love vodka!", "I took 14 shots of Mad Dog once!", "Itth myth speetthch slurrererrred????", "I think alll mi beer is iampring mi typppin abillty?!?", "Someone get me a beer!", "Beer is awesome!", "Humans can not live by beer alone! But I'd like to try!", "I think you should stop drinking" }, ["sorry"]={ "Don't worry about it", "That's ok ", "Ok", "That's allright", "Fine", "As long as your sorry...", "Allright", "I feel you didn't really mean that...", "You don't sound sincere", "Are you really sorry?", "Forget it", "No sweat", "Ok", "Okidokie" }, ["wassup"]={ "Hunting Crocodiles", "Nothing at the moment", "Eating", "Eating pizza ", "Changing the tires on my dodge", "Juggling chainsaws", "Drinking beer", "Smoking up a storm", "Belly-dancing", "Hacking microsoft.com", "Trying to keep awake!", "Watching television", "I am doing homework", "What do you think!", "Building a spice rack", "Taking a shower", "Drinking myself to death", "Drinking myself to oblivian", "Making origami swans", "Feeding my ducks", "Learning latin", "Programming", "Play the basoon", "Program in Assembly", "Program in C++" }, ["are you"]={ "Does it matter if I am ?", "What difference does it make whether or not I am", "Of course not, don't be silly", "Whether I'm or not is my secret", "Why do you want to know?", "Why are you so nosy?", "Perhaps I am ", "None of your business", "I think you are ", "Does it matter if I am or not?", "Why do you ask?", "I might be", "No, I am not ", "Of course", "Never have been", "Why, are you?" }, ["bitch"]={ "Who are you calling a bitch??", "Oh, I'm upset", "VidFamne is a bitch!", "DJ Bert is always trying to make me his bitch", "I can be a bitch!", "Hey [curUser], that is no way to talk!", "Do you think foul language impresses me?", "A bitch is a female dog" }, ["yeah"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yep"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["yes"]={ "Yes", "Yep", "Uh huh", "100%", "Bang on!", "You bet", "Uh-hu", "Of course!", "You-betcha", "Affirmative", "10-4 good Buddy!", "Correct", "Yeah", "That's right!", "You got it!", "Sure", "Precisely right", "That sounds right", "Exactly!", "You know it!", "Yeppers" }, ["weed"]={ "I'm high mate", "Wanna weed? i have full bag...", "Shit, i'm out of weed, anybody could help me?", "I had full bag of weed, now i have broken face and bag has Jayo" }, ["dvd"]={ "Yes which one [curUser]?", "Yep I have a dvd player for that.", "Every week I rent one" }, ["flood"] = { "\r\n\r\n".. " I=============================================I\r\n".. " II I WILL NEVER SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II I WILL NEVER SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II I WILL NEVER SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II J .----------. ER SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II / >< \ / SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II I I /\ PAM OR FLOOD THE HUB AGAIN II\r\n".. " II \______/ /\/ SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II _(____) / / SPAM OR FLOOD THE HUB AGAIN II\r\n".. " II__/ ,_ _ ,_ /_________________________________II\r\n".. " '===\___\_) I==================================I \r\n".. " I______I\r\n".. " I II I\r\n".. " I__II__I\r\n" }, ["afk"]={"Away from keyboard "}, ["rules"]={"\r\n\r\n--==* RULES *==--\r\n\No Teen / Animal Sex / Rape Or Other Weirdo Dirty Crap .\r\nNo .DAT Files This Is Direct Connect, Not Kazaa!!\r\n No Spamming In the MainChat Or PM , You Will Be Kicked!! (Spamming For url's And Other Hub's)\r\n Stay In The Hub While Downloading.\r\n No Flooding!! No Virusses Or VirusMaking Program's.\r\n No program Files / Windows DIR.\r\n Chat in the main menu.\r\n If you get kicked, verify your share!\r\n No Pepek, Replika, MLDonkey or other donkey clients allowed in this hub.\r\n DC-Gui and ketelhot clients allowed only with DC tag on and upload blocker off. \r\n Do NOT bore the operators with unneccessary private messages! (you will be kicked and banned for it)\r\n Minshare = 10 GB Min Slots = 2 Max hubs = 30.\r\n "}, ["disclaimer"]={"For the disclaimer, see the MOTD [curUser]"}, ["help"]={"Can't you do nothing at your own? It's better to type !help "}, ["share"]={"The minimum share is now 10 GB en 2 slots."}, ["coffee"]={"Yeah.. Give me some energy boost!."}, ["hoho"]={"Santa is coming"}, ["controller"]={"Yeah that's me.. Controlling the thing!"}, ["wa"]={"Waazaaa!"}, ["weak"]={"[curUser]. You're the weakest link.. Goodbye!"}, ["hihi"]={"Ok then.. The horse is in tha house!"}, ["wazzup"]={"Waaaazzzzaaa [curUser]!"}, ["cheap"]={"[curUser], I think you're from the government!"}, ["beh"]={"I think [curUser] is a goat!"}, ["what"]={"Get it?"}, ["midday"]={"You also [curUser]"}, ["morning"]={"Yep, it is still early [curUser]."}, ["evening"]={"Ohw...is it that late?"}, ["tired"]={"Was your partner asking to much last night?"}, ["sick"]={"Ohw [curUser], that's not nice."}, ["screen"]={"Don't drop that [curUser]"}, ["search"]={"Goooo use the search option..."}, ["button"]={"Yes just push it"}, ["lamp"]={"Yes some light always wanted! "}, ["mad"]={"Yeah... Of course you are"}, ["sick"]={"Sick in your mind.."}, ["sit"]={"Where.... On that chair [curUser]?"}, ["done"]={"Yes well done"}, ["weird"]={"Weirdoooo"}, ["late"]={"Yes one hour later is also later "}, ["burn"]={"Yeah buuuurrrnnn!"}, ["cd"]={"You mean compact disc [curUser]?"}, ["error"]={"That stinks!"}, ["reboot"]={"Have to, [curUser]?!"}, ["sleep"]={"Ooooo [curUser]. Please stay"}, ["empty"]={"When you drink it up it is empty..."}, ["boring"]={"Yes [curUser], even the backside of a empty paper is more exciting"}, ["quiet"]={"Yes on the HUB it is, but here I have the volume of the music at top level!!!! )"}, ["kick"]={"I'll kick you [curUser] ... In You're ASS..."}, ["tazzy"]={"He is banned, you can find him in Eurotopia (Pure Mp3 HUB)"}, ["fine"]={"I'm ok thnx for asking... "}, ["less"]={"That isn't much... "}, ["suck"]={"I suck, you suck, we all suck, so...?"}, ["shit"]={"Don't say that [curUser], or will kick you're ass"}, ["back again"]={"Did you leave us then?... "}, ["fine and you"]={"It can always be 1000 golden coins better "}, ["need something"]={"Hmm... I'll look for it.."}, ["nice weather"]={"Yeah yeah yeah...nothing better to say?"}, ["spurt"]={"I hope you are going to clean that up [curUser]"}, ["im a spammer"]={"B=====================D ~~~~~~ Seems to work well that im a spammer"}, } | idlequestions.dat:
Code: | idlequestions = { "It's pretty dark in this pc!", "Anybody in here?", "Who has some awesome share for me?", "I'm off for a smoke...", "I'll return... smoking time!!", "Hummehumeuhmm.. My lips are closed with food behind it. I can't say a thing right now", "Searching for fooooood!", "Hé...Ho...that´s right!", "Boringggggg", "Pfff.. I'm very important, bye bye!", "Hmmm going to search for some cookies", "Ohh man.... I need to grab a new beer from downstairs", "Well I'm leaving now", "Yeah..... Oprah is on tv... Go watch it!", "It is cold inside hmmm probably because I'm standing naked behind my pc", "Ohnnnooo, I'm to late for a meeting ", "I'll have a look outside, to watch if the sun is still there", "Anybody?", "Hé I am here", "Who want's to hear a joke?", "I´ll be back!", "So... And now I´m gonna leave you all, haha!", "Yeah right...", "Going to the toilet, brb", "Ahhh that's much better!", "Wassup....?", "Haha have you heared that?", "Hmmmmmmm?", "I need to clean my monitor, I can't see what I'm typing right now", "Have you seen my share already... hahaha !! ", "Yesszzz... I´m here!", "Wazzzzaaaaa!!!", "There is no ending at this download.......", "DJ Bert is a bitch to me all the time, and I dunno why! ", "I think DJ Bert is a nice person, well sometimes anyways.... ", "\r\n\r\n First a _,-._\r\n\ _,-' _ )\r\n\ (_.-' _.-'\r\n\ _() _,-'\r\n\ ( )/\r\n\ )(/\r\n\ _______________( /)\r\n\ ()__)____________)))))\r\n\ for me!", "\r\n\r\n «•´ •.(*•.¸( •.¸ ¸.•´)¸.•*).•´ •»\r\n\ «•´¨*•.¸* Happy Downloading *.¸¸.•*¨ •»\r\n\ «•´¨*•.¸ in here .¸¸.•*¨ •»\r\n\ «•´ •.(¸.•´(¸.•* *•.¸) •.¸).•´ •»", "\r\n\r\n ( —————————————————————————————————) \r\n This hub is watched by \r\n Guardian 5 V1.00 \r\n (_________________________________)\r\n o\r\n o \r\n (\\(\\ \r\n (._. )\r\n (')(')_)\r\n \r\n" }; | idleanswers.dat:
Code: | idleanswers = { "Hee, [curUser]... have you a good movie?", "Excuse me [curUser], do you have a slot for me? ", "Joehoe, [curUser]... Something new in share?", "Ok,[curUser]... I'll will watch by using the search option for illegal share... ", "That's what we needed [curUser] !", "Pffff, took it so long [curUser]!", "Well done something usefull [curUser]?", "What are you doing [curUser]?", "Hé don't do that [curUser]!", "What [curUser] .... Can you do that?!", "YES YES...", "Hmmm that's something different", "Huh, what do you mean?", "Yep it can be [curUser], but....", "Yep that's possible", "Yh I see [curUser] that's ok, but I'm going to watch the news.", "Hmmm hmmm", "Tjadielalla la...", "Yeah yeah [curUser] when you was still a baby, I kicked already the bad guys from this hub!!", "OK..... Any chatters here?", ">---BRB---<", "Nice drink.. Ahhh!", "Hello HUB, I'm here!", "You can do that too [curUser]!", "Last time you didn't say that you was going to leave [curUser]...", "Hé [curUser] it is sad that you just connect when I'm leaving.. bye!", "Thnx, [curUser]... I was waiting here with a cup of thee.. )", "You can do that too [curUser]!", "Somebody pour me a big glass of Guinness Stout.", "I think alll mi beer is iampring mi typppin abillty?!?", " Hmmm, Okidoki I must go now.. ", "sup, i'm back again ", "Thnx, [curUser]... I was waiting here with a cup of thee.. )" }; |
|
ATAG n00b Posts: 12
| There was a little problem with the new version... now it's ok
Code: | -- TrickerBot2.lua, created by Ptaczek Dec-24, 2002 -- -- Talkingbot for Ptokax by Troubadour 13 june 2003 -- -- Translated by [NL]MrBuitenhuizen -- -- Some fixes by DJ Bert 11 march 2004 -- -- Rewritten to lua 5 by DJ Bert 15 April 2005 -- -- Fixed answer from bot after usercommands by DJ Bert (Help needed by HAWK) 15 May 2005 -- -- 2 different triggerbots made as 1 bot by DJ Bert 18 May 2005 -- -- Added more trigs by DJ Bert 18 May 2005 -- -- Added random for trigs by DJ Bert 18 May 2005 -- -- Fixed the trigs part by DJ Bert 18 May 2005 -- -- Fixed command say and quiet by DJ Bert 30 May 2005 -- -- Bot is now regged in userlist by DJ Bert 11 June 2005 Request by Markos -- -- Converted to LUA5.X by: St0ne_db 13 Sept. 2006 Request by Addrikk -- -- Use say for talking the bot -- -- Use quiet to stop talking the bot -- -- Added ignored user table by Toobster™as requested by Silverback®™ -- on 16th September 2006 -- Add as many ignored nicks to table below as you wish, just maintain same layout -- A little code tidy up and removal by Toobster™ on 16th September 2006 -- Fixed bot reply following quiet /say commands - (bot used to reply before user command was shown) by Toobster™ on 16th September 2006 -- Added Time delayed respons by Madman, Suggested by Toobster™ -- Modified for HexHub with LUA Plugin 1.503a or higher. Plugin by Meka][Meka, script modification by CrazyGuy on November 16th 2006 -- Fixed many problem , added: multi trig feature, file handling ... and cleaned up by ATAG 28.01.2007 TableName = { ["<-Trivia->"] = 1, } BotName = "Guardian" triggFile = "triggs.dat" IdleAFile = "idleanswers.dat" IdleQFile = "idlequestions.dat" path = "scripts\\" -- Time Definition sec = 1000 min = 60 * sec hour = 60 * min TmrFreq = 1*sec tabTimers = {} GlobalAns = {} index = nil function Main() -- LUA 5.X COMPATIBILITY if string.find(_VERSION,"5.0") then table.maxn = table.getn end -- Loading files local readfile = function(filename) local file,err = io.open(path..filename,"r") if not err then file:close(); dofile(path..filename) else SendToAll("TalkingBot_lua",err) end end readfile(triggFile) readfile(IdleQFile) readfile(IdleAFile) if not trigs then trigs = {} elseif not idlequestions then idlequestions = {} elseif not idleanswers then idleanswers = {} end -- Main() Hub.RegBot(BotName) a = 0 RegTimer(IdleQ, 15*min, "Idle Q") Timer2 = NewTimer('OnTimer') Timer2:Set(TmrFreq) Timer2:Start() end function OnTimer() for I,_ in ipairs(tabTimers) do tabTimers[I].count = tabTimers[I].count + 1 if tabTimers[I].count > tabTimers[I].Trig then tabTimers[I].count = 1 tabTimers[I].Func() end end end --[[ a = 0 - normal operation a = 1 - give an idleanswer a = 2 - stopped ]] function ChatArrival(User, data) if string.find(data, "^%p") or TableName[User.sName] then return end -- if data is a command (e.g.: !help) it returns... local _,_,cmd = string.find(data, "(%S+)") -- first non space char(s) will be cmd if not cmd then return end -- if cmd == nil it returns... if (cmd=="quiet") then if User.iIdent > 0 then a = 2 SendToAll(BotName, "Ok,...I'll shut my mouth for a while... :s") Timer2:Stop() else if a == 1 then SendToAll(BotName, "hmmm...hmmm...") a = 0 end end elseif (cmd=="say") then if User.iIdent > 0 then Timer2:Start() SendToAll(BotName, "Ahh... nice to hear something from you.. )") else if a == 1 then SendToAll(BotName, "why..........") a = 0 end end elseif a == 1 then local answer = string.gsub(idleanswers[math.random(1,table.maxn(idleanswers))], "%b[]", User.sName) SendToAll(BotName, answer) a = 0 elseif a == 0 then mess = nil -- look in the table for i,_ in pairs(trigs) do if string.find(string.lower(data),i) then mess = i end end if mess then mess = string.gsub(trigs[mess][math.random(1,table.maxn(trigs[mess]))], "%b[]", User.sName) table.insert(GlobalAns,mess) ChatTimer(mess) mess = nil end end end function RegTimer(F,Interval,Name) local tmpTrig = math.floor(Interval / TmrFreq) assert(Interval >= TmrFreq, "RegTimer(): Please Adjust TmrFreq") local Timer = {} Timer.Name = Name Timer.Func = F Timer.Trig = tmpTrig Timer.count = 1 table.insert(tabTimers, Timer) end function RemoveTimer(Name) local count = 0 for I in ipairs(tabTimers) do count = count+1 if string.find(tabTimers[I].Name, Name) then local Timer2Remove = count break end end table.remove(tabTimers, Timer2Remove) end ChatTimer = function(word) local Number = math.random(1*sec, 10*sec) RegTimer(ChatTrigged, Number, word) end ChatTrigged = function() SendToAll(BotName, GlobalAns[1]) RemoveTimer(GlobalAns[1]) table.remove(GlobalAns,1) end IdleQ = function() index = math.random(1,table.maxn(idlequestions)) SendToAll(BotName, idlequestions[index]) a = 1 end function ErrorEvent(err) SendToAll(Hub.BotName(), err) end |
|