I wish one script type timeannouncer thanks
search the forum.
Mmmm I things this is ok:
--## Simple Time Bot
--## Requested by SteffJay
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--## !time - Gives the current time
sBot = "Time-Bot"
function ChatArrival(user, data)
if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data,"%b<>%s+(%S+)")
if (cmd == "!time") then
user:SendData(sBot, GetTime())
end
end
end
function GetTime()
s = os.date("%S")
h = os.date("%H")
m = os.date("%M")
d = os.date("%d")
mm = os.date("%m")
y = os.date("%y")
Date = "Date: "..d.."/"..mm.."/20"..y.." Hour "..h..":"..m..":"..s
return Date
end
Try this. c ya
havent tested due to inability to do so.
--## Simple Time Bot
--## Requested by SteffJay
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--## !time - Gives the current time
--- touched by Herodes ( rmvd GetTime() )
sBot = "Time-Bot"
function ChatArrival(user, data)
if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data,"%b<>%s+(%S+)")
if (cmd == "!time") then
user:SendData(sBot, os.date( "Date: %d/%m"/%Y Hour %H:%M:%S" ) )
end
end
end
--## Simple Time Bot
--## Requested by SteffJay
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--## !time - Gives the current time
--- touched by Herodes ( rmvd GetTime() )
-- Now it really works in PM. -- // bastya_elvtars
-- Also hacked & optimized a bit.
sBot = "Time-Bot"
function ChatArrival(user, data, bool)
data = string.sub(data,1,string.len(data)-1)
local s,e,cmd = string.find(data,"%b<>%s+(%S+)")
if (cmd == "!time") then
send=user.SendData
if bool then send=user.SendPM end
send(user,sBot, os.date( "Date: %d/%m/%Y Hour %H:%M:%S" ) )
return 1
end
end
function ToArrival(user,data)
if string.sub(data,1,5+string.len(sBot))=="$To: "..sBot then ChatArrival(user,data,true) return 1 end
end
BTW this is not what he wanted. He wanted a timed ad or so.
bastya change in your script:
-- Now it really works in PM. -- // basyta_elvtars
with
-- Now it really works in PM. -- // bastya_elvtars
hihihi now tour nick in comment is correct :P c ya
Done. Looks like I am unfamiliar with names. :D
Now script is correct :P
excused but and this that I meant the timerannucer I did not say that I had to write to the inside of the script a phrase that it would have sended in main every tot of time thanks