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

[HELP] How to make an autobroadcast...

cachero18

New Member
Joined
Jul 20, 2008
Messages
57
Reaction score
0
i got a server 24/7 and i want to make an autobroadcast like at 4:00 pm says something at 4:05 say another thing and going 5 on 5 and let at 4:30 and stop broadcasting: we say
At 4:00 pm says: "PvP Arena Event starting in 30 mins"
then at 4:05 pm says: "PvP Arena Event Starting on 25 mins"
and till get to 4:30...

Please can anyone help? i wil Rep++ if u can help :D
 
Here you goooooo :thumbup:


NPC file:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Server Announcement" script="data/npc/scripts/Server Announcement.lua" access="5" lookdir="2" walkinterval="1">
	<health now="100" max="100"/>
	<look type="73" head="78" body="88" legs="0" feet="88" addons="3"/>
</npc>

And server announcement.lua:

Code:
-- NPC Broadcast Message by MrSheen --

-- Set how many minutes delay you want the NPC to broadcast. --
local delayminutes = 45

-- Set the messages that you want to be broadcasted. --
local broadcastmessage = {'Message one', 'Message Two', '[b]Give rep to Grehy please[/b]'}

-- Main Code --
local messagecounter = 1
local timer = os.time ( )

function onThink()

    if ( ( os.time ( ) - timer ) > delayminutes * 60 ) then
   
		broadcastMessage ( broadcastmessage[messagecounter], 19 )
		
		if messagecounter == #broadcastmessage then
		
			messagecounter = 1
			
		else
		
			messagecounter = messagecounter + 1
			
		end

        timer = os.time ( )
    
    end

end
 
Last edited:
Back
Top