Can someone fix this bot so the command +joke don?t
show on main... PLZ
-- JokeBot .lua by Cloud
--Some more content by [ANCIENT]Klismo :P
botname = "JokeBot"
sec = 1000
min = 60 * sec
hour = 60 * min
Command = "+Joke"
jokes = {
"SHE WAS SO BLONDE THAT... She thought a quarterback was a refund.",
}
function Main()
frmHub:RegBot(botname)
SetTimer(2 * hour)
StartTimer()
end
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<") or ( strsub(data, 1, 4) == "$To:" ) then
data = strsub(data,1,strlen(data)-1)
if (strfind(strlower(data), strlower(Command))) then
Joke = jokes[random(1,getn(jokes))]
user:SendPM(botname, ""..Joke.." =P")
end
end
end
QuoteOriginally posted by (=CyberPimp=)
Can someone fix this bot so the command +joke don?t
show on main... PLZ
-- JokeBot .lua by Cloud
--Some more content by [ANCIENT]Klismo :P
botname = "JokeBot"
sec = 1000
min = 60 * sec
hour = 60 * min
Command = "+Joke"
jokes = {
"SHE WAS SO BLONDE THAT... She thought a quarterback was a refund.",
}
function Main()
frmHub:RegBot(botname)
SetTimer(2 * hour)
StartTimer()
end
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<") or ( strsub(data, 1, 4) == "$To:" ) then
data = strsub(data,1,strlen(data)-1)
if (strfind(strlower(data), strlower(Command))) then
Joke = jokes[random(1,getn(jokes))]
user:SendPM(botname, ""..Joke.." =P")
end
end
end
add return 1 below this line: user:SendPM(botname, ""..Joke.." =P")
Thx this has been bugging me for long time hehe :D
QuoteOriginally posted by (=CyberPimp=)
Thx this has been bugging me for long time hehe :D
np, but if u check out in the finished scripts, or seacrh for edited joke bot i think ya will find one much beter ;-)