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

GlobalEvent Auto Broadcast Simple Setup

NOOBLAND

Banned User
Joined
Feb 8, 2009
Messages
93
Reaction score
0
PHP:
local messages = {
    "Write !buylist for the list of buyable items with killpoints!",
    "Use !buy to buy an item with killpoints!",
    "Use !killpoints to see how many kills you've got."
}

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

u need add message for table :) and can learn how shorten code!! code orginal by colandus and have learn me much from look this code :eek: colandus pwn master-m...

orginal:
TFS 0.3 globalevent help - OpenTibia Fans
 
We can, but with addEvent and login.lua ...

login.lua... lol it will start a new event everytime someone loggs in if you dont n00b with storages. use npc. take a clean script, no function, then add the event there. the npc will only execute the event on startup, then you re-add the event inside the event-function
 
login.lua... lol it will start a new event everytime someone loggs in if you dont n00b with storages. use npc. take a clean script, no function, then add the event there. the npc will only execute the event on startup, then you re-add the event inside the event-function

started = false

if someone login then make started = true :)?

something like

Lua:
 function onLogin(cid)
started = false

if started = false then
started = true
addEvent(nobzor, 12k1lkl]
 
started = false

if someone login then make started = true :)?

something like

Lua:
 function onLogin(cid)
started = false

if started = false then
started = true
addEvent(nobzor, 12k1lkl]

Totally pointless? Why not simply add it in global.lua or such instead of calling it each time while you only need it once anyways?

Now this discussion is however offtopic, there's no need to discuss this matter.
 
Back
Top