• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

globalevent in colours

wishy85

GOD Smokey
Joined
May 10, 2010
Messages
150
Reaction score
3
Location
Australia
Ok now im trying to look for a globalevent like a information globalevent example it saying Updates coming soon. like that but the thing is i dont no how to change the colour of it i no all globalevents are in red but i was wondering if i could get it in say white would be good if possible or a colour bright and easy to see i have this so far

-- Auto broadcast --
-- Config --
local messages = {"Use /commands for a list of new commands","Updates will be happening","If you need help or have general questions please leave them in Help Channel and GOD Hell will get back to you"}
local userandom = true
local messagestorage = 23133
-- /Config --
function onThink(interval, lastExecution, thinkInterval)
if (userandom == true) then
doBroadcastMessage(messages[math.random(1,table.getn(messages))])
else
doBroadcastMessage(messages[getGlobalStorageValue(messagestorage)])
if getGlobalStorageValue(messagestorage) < table.getn(messages) then
setGlobalStorageValue(messagestorage, getGlobalStorageValue(messagestorage)+1)
else
setGlobalStorageValue(messagestorage, 1)
doSendAnimatedText(pos, text, TEXTCOLOR_WHITE)
end
end
return true
end




would be much appreciated if some1 could tell me or make me a globalevent script where its in white writting instead of red....
 
Code:
-- Auto broadcast --
-- Config --
local messages = {"Use /commands for a list of new commands","Updates will be happening","If you need help or have general questions please leave them in Help Channel and GOD Hell will get back to you"}
local userandom = true
local messagestorage = 23133
-- /Config --
function onThink(interval, lastExecution, thinkInterval)
if (userandom == true) then
doBroadcastMessage(messages[math.random(1,table.getn(messages))])
else
doBroadcastMessage(messages[getGlobalStorageValue(messagestorage)])
if getGlobalStorageValue(messagestorage) < table.getn(messages) then
setGlobalStorageValue(messagestorage, getGlobalStorageValue(messagestorage)+1)
else
setGlobalStorageValue(messagestorage, 1)
doSendAnimatedText(pos, text, TEXTCOLOR_YELLOW)
end
end
return true
end

Don't know if white works, yellow does
 
?

LUA:
-- Config --
local messages = {"Use /commands for a list of new commands","Updates will be happening","If you need help or have general questions please leave them in Help Channel and GOD Hell will get back to you"}
local userandom = true
local messagestorage = 23133
local textcolour = TEXTCOLOR_WHITE

function onThink(interval, lastExecution, thinkInterval)
	userandom and doBroadcastMessage(messages[math.random(1,#messages)])
	doBroadcastMessage(messages[getGlobalStorageValue(messagestorage)])

	return getGlobalStorageValue(messagestorage) < #messages and getGlobalStorageValue(messagestorage, getGlobalStorageValue(messagestorage)+1) or setGlobalStorageValue(messagestorage, 1) and doSendAnimatedText(pos, text, textcolour)
end
 
[30/11/2011 08:49:41] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/news1.lua:8: '=' expected near 'and'
[30/11/2011 08:49:41] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/news1.lua)
[30/11/2011 08:49:41] data/globalevents/scripts/news1.lua:8: '=' expected near 'and'
 
i found 1 and it wasnt wat i was looking for but im gonna keep it because its easier to ready it doesnt show up like map clean or game save but it shows up in orange in Default next to Server Log im gonna put it up for any1 that would like to use it :)

here it is...

local messages = {
"Use /commands for a list of new commands",
"Updates will be happening",
"If you need help or have general questions please leave them in Help Channel and GOD will get back to you",
}

local i = 0
function onThink(interval, lastExecution)
local message = messages[(i % #messages) + 1]
doBroadcastMessage("Information: " .. message .. "", MESSAGE_STATUS_CONSOLE_ORANGE)
i = i + 1
return TRUE
end




P.S ive tried to change colour to white and green but it only works properly with the colour ORANGE so better of leaving it but its easy to edit so no problems there at all :)
 
Code:
local messages = {
"Use /commands for a list of new commands",
"Updates will be happening",
"If you need help or have general questions please leave them in Help Channel and GOD will get back to you",
}

local i = 0
function onThink(interval, lastExecution)
local message = messages[(i % #messages) + 1]
doBroadcastMessage("Information: " .. message .. "")
i = i + 1
return TRUE
end

That doesn't show up like map clean does?

Ok I got it to broadcast in white

Code:
local messages = {
"Use /commands for a list of new commands",
"Updates will be happening",
"If you need help or have general questions please leave them in Help Channel and GOD will get back to you",
}

local i = 0
function onThink(interval, lastExecution)
local message = messages[(i % #messages) + 1]
doBroadcastMessage("Information: " .. message .. "",22)
i = i + 1
return TRUE
end
 
Last edited by a moderator:
Ok I got it to broadcast in white

Code:
local messages = {
"Use /commands for a list of new commands",
"Updates will be happening",
"If you need help or have general questions please leave them in Help Channel and GOD will get back to you",
}

local i = 0
function onThink(interval, lastExecution)
local message = messages[(i % #messages) + 1]
doBroadcastMessage("Information: " .. message .. "",22)
i = i + 1
return TRUE
end

If you wanted it to BROADCAST in white you should have said so...
 
Back
Top