MrSheen
Php & Lua.
People are always asking for a NPC that broadcast's a message every so often, so i made a simple script for you.
Enjoy.
Code:
-- NPC Broadcast Message by MrSheen --
-- Set how many minutes delay you want the NPC to broadcast. --
local delayminutes = 1
-- Set the message that you want to be broadcasted. --
local broadcastmessage = 'This is the message you want to be broadcasted.'
-- Main Code --
local timer = os.time ( )
function onThink()
if ( ( os.time ( ) - timer ) > delayminutes * 60 ) then
broadcastMessage ( broadcastmessage, 19 )
timer = os.time ( )
end
end
Enjoy.