• 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.

[MOD]Brocast info

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hello i got a script i wanna share that brodcast messages you want on the server!
You can set the interval to what you like so it can be faster or slower!

I got 2 version of only 1 message or 2
Works on 0.3.6pl1!

1 message:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Broadcast_Serverinfo" version="1.0" author="syphero OT" contact="dunno.com" enabled="yes">
	<description>
		Broadcast server info.
	</description>

	<config name="broadcast_config"><![CDATA[
		config = {
		"Message here!.",
		MESSAGE_STATUS_WARNING
		}
	]]></config>

	<globalevent name="BroadcastServerinfo" interval="7520" event="buffer"><![CDATA[
		domodlib('broadcast_config')
		broadcastMessage(config[1],config[2])
		_result = true
	]]></globalevent>
</mod>


2 messages:
Lua:
<mod name="Broadcast_Serverinfo" enabled="yes">
	<globalevent name="BroadcastServerinfo" interval="600000" event="buffer"><![CDATA[
		local messages = {
			{ "Message here", MESSAGE_STATUS_WARNING },
			{ "Message here", MESSAGE_STATUS_WARNING }
		}

		local t = messages[math.random(1, table.maxn(messages)]
		doBroadcastMessage(t[1], t[2])
	]]></globalevent>
</mod>
Second Credit to ELF!
 
Last edited:
Yea There is exhaust on this! there is intervalls you set how long!
 
Humm,, 2 is made by elf I can see that, But I dont see any Credits for number 2 == elf.
 
Why don't you do this, this makes you able to send from 1 to infinite messages.

Lua:
<mod name="Broadcast_Serverinfo" enabled="yes">
	<globalevent name="BroadcastServerinfo" interval="30000" event="buffer"><![CDATA[
		local messages = {
			'Hey',
			'Hi',
			'Hello',
		}

		for i=1, #messages do
			doBroadcastMessage(messages[i],MESSAGE_STATUS_WARNING)
		end
		_result = true
	]]></globalevent>
</mod>

new at mods, dunno if this is converted right.
 
Back
Top