--Timed Message 1.0 -- bot = "Town-Crier" Mins = 2 file = "Announce.txt" AdminProf = 0 Prefix = "+" Command = "save" function Main() SetTimer(Mins*60000) StartTimer() end function DataArrival(curUser,data) if (strsub(data,1,1) == "<") and (curUser.iProfile == AdminProf) then local _,_,cmd = strfind(data,"^%b<>%s+(%S+") if cmd == "Prefix..Command" then local _,_,sdata = strfind(data,"^%b<>%s+%S+%s+%S+%s+(.*)|$") if sdata then SaveFile(sdata) curUser:SendData(,"Saved text to: "..file) end return 1 end end end function Save2File(file,sdata) local handle = openfile(file,"w") if (handle ~= nil) then write(handle,sdata) closefile(handle) end function OnTimer() local handle = openfile(file, "r") if (handle ~= nil) then local line = read(handle) while line do SendToAll(bot,line) line = read(handle) end closefile(handle) end end