PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: TechUK on 14 May, 2005, 13:03:30

Title: Trigger bot
Post by: TechUK on 14 May, 2005, 13:03:30
I need a nice simple trigger bot that is easy to edit and run  This for lua 4 please  Hub is run by robocop 7 :]
Title:
Post by: Dessamator on 14 May, 2005, 13:26:05
click here (http://home.comcast.net/~benbrausen/Funny/Posting.swf)
Title:
Post by: jiten on 14 May, 2005, 14:05:45
TechUK, search the forum for "wiseguy", "sensi" or "trickerbot". You'll find what you need then.

QuoteOriginally posted by Dessamator
click here (http://home.comcast.net/~benbrausen/Funny/Posting.swf)
That link of yours... I guess that you need to start leaving it on you signature :D

Best regards.
Title:
Post by: B@B? on 14 May, 2005, 14:19:35
May this helps...

(Runned in my PTOkax 4.99/Lua 4)

***********************************

-- Trigger (PM)

botname = "TriggA"
trigs = {

hi = "Hi, [User], Welcome to "..frmHub:GetHubName().."!",
hey = "Hey, [User], Welcome to "..frmHub:GetHubName().."!",
hello = "Hello, [User], Welcome to "..frmHub:GetHubName().."!",
bye = "Bye, [User] ;-)",
cya = "C Ya, [User] ;-)",
["see ya"]="So long, [User] ;-)",
["good bye"] = "Bye, [User] ;-)",
peace = "RIP, [User] ;-)",
["c ya"] = "Bye, [User] ;-)",
["c ya later"] = "Bye, [User] ;-)",

}

function Main()
frmHub:RegBot(botname)
end

function DataArrival(user, data)
if(strsub(data, 1, 4) == "$To:") then
data=strsub(data,1,strlen(data)-1)
-- get the msg only using regular expression
s,e,whoTo,msg = strfind(data,"$To:%s+(%S+)")
if (whoTo == botname) then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<> ([ -z]*)")

trigfound=1

-- look in the table
for key, value in trigs do
if( strfind( strlower(msg), key) ) then
answer, x = gsub(value, "%b[]", user.sName)
user:SendPM( botname, answer )
trigfound=1
break
end
end
if (trigfound==0)then
user:SendPM( botname, "Bitte wiederholen...." )
end
end
Title:
Post by: Dessamator on 14 May, 2005, 14:47:22
QuoteOriginally posted by jiten
TechUK, search the forum for "wiseguy", "sensi" or "trickerbot". You'll find what you need then.

QuoteOriginally posted by Dessamator
click here (http://home.comcast.net/~benbrausen/Funny/Posting.swf)
That link of yours... I guess that you need to start leaving it on you signature :D

Best regards.

Done !
Title: Trigger Bot
Post by: TechUK on 14 May, 2005, 15:57:14
My thanks to all  I have loads of option now  :D
Title:
Post by: (-_-) on 14 May, 2005, 19:16:18
please help, im looking for a random phrase generator bot for my dcdm 0.045 client, the trick is i want the script to make it look like im saying the phrases.....i have a set of phrases i want to use i just dont know how to write lua 5 or for dcdm so if anyone can help me my hub is titanelite.no-ip.org:411 thanks in advance