• 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 globalevent king of the server

5lave Ots

Active Member
Joined
Oct 2, 2017
Messages
246
Solutions
1
Reaction score
40
Location
Ankrahmun
hello otlanders
i just made this script trying to send an animated text on the highest rebirth players
i'm an LUA newbie so i dont know how to complete it
Lua:
local reb_table = {}
    function onThink(interval)
for _, name in  ipairs(getOnlinePlayers()) do
            local cid = getPlayerByName(name)
            local rebs = getPlayerRebirth(cid)
           
            if rebs > 0 then
             table.insert(reb_table,rebs)
            
             local top = table.maxn(reb_table)
             local pid = getPlayerByName(top)
            doSendAnimatedText(getPlayerPosition(pid), 'King', 180)
       
            return true
            end
    end
            return true
            end
when it runes i got: LUA GetThingPosition(creature not found)
hope someone could fix it{tibia 8.6 0.4}
 
Back
Top