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

got a problem with msg brodcasting

theroyal

Wassup :)
Joined
Oct 22, 2009
Messages
372
Reaction score
6
hello i got an ot and evert couple of hours its brodcasting a msg auto and i want to change this msg to my own one how can i do that ??
 
hmm i know but i dont know how to change its its show me this
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
<globalevent name="effects" interval="1" event="script" value="effects.lua"/>
<globalevent name="save" interval="900" event="script" value="save.lua"/>
<globalevent name="clean" interval="7200" event="script" value="clean.lua"/>

<globalevent name="shop" interval="30" script="shop.lua"/>
<globalevent name="serverstart" type="start" event="script" value="start.lua"/>
<globalevent name="playersrecord" type="record" event="script" value="record.lua"/>

<!-- <globalevent name="timer_example" time="21:35" event="script" value="my_script.lua"/> -->
</globalevents>
 
data\globalevents\scritps\the script that boardcast.lua

ye there is it located

this is the script i think,
Code:
local config = {
	broadcast = {120, 30},
	shallow = "no",
	delay = 120,
	events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
	if(isInArray(config.broadcast, seconds)) then
		local text = ""
		if(not config.shallow) then
			text = "Full s"
		else
			text = "S"
		end

		text = text .. "[COLOR="Lime"]server save within[/COLOR]" .. seconds .. " [COLOR="Lime"]seconds, please mind it may freeze![/color]"
		doBroadcastMessage(text)
	end

	if(seconds > 0) then
		addEvent(executeSave, config.events * 60000, seconds - config.events)
	else
		doSaveServer(config.shallow)
	end
end

function onThink(interval, lastExecution, thinkInterval)
	if(table.maxn(config.broadcast) == 0) then
		doSaveServer(config.shallow)
	else
		executeSave(config.delay)
	end

	return true
end

all what i made the colour Lime is what you see if there is a broadcast so thats what you can edit.

EDIT:


lmao!! bbcodes cant be used in lua.....

i was sleeping man :) thanks i edited it now
 
Last edited:
ye there is it located

this is the script i think,
Code:
local config = {
	broadcast = {120, 30},
	shallow = "no",
	delay = 120,
	events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
	if(isInArray(config.broadcast, seconds)) then
		local text = ""
		if(not config.shallow) then
			text = "Full s"
		else
			text = "S"
		end

		text = text .. "[COLOR="Lime"]server save within[/COLOR]" .. seconds .. " [COLOR="Lime"]seconds, please mind it may freeze![/color]"
		doBroadcastMessage(text)
	end

	if(seconds > 0) then
		addEvent(executeSave, config.events * 60000, seconds - config.events)
	else
		doSaveServer(config.shallow)
	end
end

function onThink(interval, lastExecution, thinkInterval)
	if(table.maxn(config.broadcast) == 0) then
		doSaveServer(config.shallow)
	else
		executeSave(config.delay)
	end

	return true
end

all what i made the colour Lime is what you see if there is a broadcast so thats what you can edit.

EDIT:




i was sleeping man :) thanks i edited it now

i don't understand you, do you want that text green or you want it to say something els?
 
Back
Top