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

Lua -=[TFS]=- v0.4 v8.60 [GLOBALEVENTS] Auto-Message I want to change server log to Default, with green letters HELP!

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
I want to change server log to Default

Lua:
function onThink(interval, lastExecution)
local cor = 25 -- Defina a cor da mensagem (22 = branco)
local mensagens = {"E ae galera Sejam Bem vindo."}
local msg = math.random(1, 6)
doBroadcastMessage(mensagens[math.random(1,table.maxn(mensagens))], cor)
return TRUE
end
 
@Acubens No green text on Default Use TFS 0.4 @Acubens create script for me please

Lua:
function onThink(interval, lastExecution)
local mensagens = {"[Comandos Uteis]: ---> !ricos, !rankfrags !bp, !bless, !autoloot, !go, !all, !spells, !spells2, !spells3, !spells4, !dodge/critical, !magicdnt, !magias, !magic, !eventos, !elfbot, !deathlist, !changesex, !removerlag e !whatsapp."}
return doBroadcastMessage(mensagens[math.random(#mensagens)], MESSAGE_STATUS_CONSOLE_RED)
end
Post automatically merged:

!UP
 
Last edited:
Lua:
local messageType = MESSAGE_INFO_DESCR
local messages = {
    "[Comandos Uteis]: ---> !ricos, !rankfrags !bp, !bless, !autoloot, !go, !all, !spells, !spells2, !spells3, !spells4, !dodge/critical, !magicdnt, !magias, !magic, !eventos, !elfbot, !deathlist, !changesex, !removerlag e !whatsapp."
}

function onThink(interval, lastExecution)
    doBrodcastMessage(messages[math.random(#messages)], messageType)
    return true
end
 
@Sarah Wesker

Lua:
[01/12/2022 15:47:50] [Error - GlobalEvent Interface]
[01/12/2022 15:47:50] data/globalevents/scripts/lembrei.lua:onThink
[01/12/2022 15:47:50] Description:
[01/12/2022 15:47:50] data/globalevents/scripts/lembrei.lua:7: attempt to call global 'doBrodcastMessage' (a nil value)
[01/12/2022 15:47:50] stack traceback:
[01/12/2022 15:47:50]     data/globalevents/scripts/lembrei.lua:7: in function <data/globalevents/scripts/lembrei.lua:6>
[01/12/2022 15:47:50] [Error - GlobalEvents::think] Couldn't execute event: info0T
 
Lua:
MESSAGE_STATUS_CONSOLE_BLUE = 4, -- FIXME Blue message in the console

MESSAGE_STATUS_CONSOLE_RED = 13, -- Red message in the console

MESSAGE_STATUS_DEFAULT = 17, -- White message at the bottom of the game window and in the console
MESSAGE_STATUS_WARNING = 18, -- Red message in game window and in the console
MESSAGE_EVENT_ADVANCE = 19, -- White message in game window and in the console

MESSAGE_STATUS_SMALL = 21, -- White message at the bottom of the game window
MESSAGE_INFO_DESCR = 22, -- Green message in game window and in the console
MESSAGE_DAMAGE_DEALT = 23,
MESSAGE_DAMAGE_RECEIVED = 24,
MESSAGE_HEALED = 25,
MESSAGE_EXPERIENCE = 26,
MESSAGE_DAMAGE_OTHERS = 27,
MESSAGE_HEALED_OTHERS = 28,
MESSAGE_EXPERIENCE_OTHERS = 29,
MESSAGE_EVENT_DEFAULT = 30, -- White message at the bottom of the game window and in the console
MESSAGE_LOOT = 31,

MESSAGE_EVENT_ORANGE = 36, -- Orange message in the console
MESSAGE_STATUS_CONSOLE_ORANGE = 37,  -- Orange message in the console
 
You're using a custom client or OTClient? If not then MESSAGE_INFO_DESCR will crash your 8.6 client mostly when sending it to Default Channel.
 
Back
Top