PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Typhoon on 14 December, 2003, 00:09:14

Title: stand alone mass message
Post by: Typhoon on 14 December, 2003, 00:09:14
hey guys/girls...

i am searching for a standalone mass message script..

have searched lots of places but no luck..
someone in here who has one or could make one?
Title:
Post by: pHaTTy on 14 December, 2003, 00:10:23
here a quick one i wrote


--Mass bot by Phatty
--13th December 2k3

function Main()
Bot = "Captain-J.Sparrow"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if (cmd=="!mass") then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
SendPmToAll(Bot," "..user.sName..": "..message)
end
end
end
end


i made it easy so you can integrate it into other bots ;)

l8rr,,

-phatty
Title:
Post by: Typhoon on 14 December, 2003, 00:12:40
thx a lot m8...

just what i needed
Title:
Post by: pHaTTy on 14 December, 2003, 00:16:06
actually better use this one



--Mass bot by Phatty
--13th December 2k3
--no message input error added

function Main()
Bot = "Captain-J.Sparrow"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if (cmd=="!mass") then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
if message == nil then
user:SendData(Bot,"Please type !mass ")
else
SendPmToAll(Bot," "..user.sName..": "..message)
end
end
end
end
end