• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Broadcast Message Script.

MrSheen

Php & Lua.
Joined
Jun 14, 2007
Messages
159
Reaction score
2
Location
Nottingham, England
People are always asking for a NPC that broadcast's a message every so often, so i made a simple script for you.

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.
 
Mhm... but one minute is 1 * 1000 * 60, not 1 * 60 :/
 
aff,

I think this is not what im looking for...

I want something where players can pay "10k" to broadcast a message


Eg "Looking for POI team" // "Selling xxx Items"


please help me with that ><
 
Last edited:
Back
Top