Lua globalevent king of the server

Discussion in 'Support' started by 5lave Ots, Nov 13, 2017.

  1. 5lave Ots

    5lave Ots Member

    Joined:
    Oct 2, 2017
    Messages:
    32
    Likes Received:
    3
    Best Answers:
    0
    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
    Code (Lua):
    1. local reb_table = {}
    2.     function onThink(interval)
    3. for _, name in  ipairs(getOnlinePlayers()) do
    4.             local cid = getPlayerByName(name)
    5.             local rebs = getPlayerRebirth(cid)
    6.            
    7.             if rebs > 0 then
    8.              table.insert(reb_table,rebs)
    9.            
    10.              local top = table.maxn(reb_table)
    11.              local pid = getPlayerByName(top)
    12.             doSendAnimatedText(getPlayerPosition(pid), 'King', 180)
    13.        
    14.             return true
    15.             end
    16.     end
    17.             return true
    18.             end
    when it runes i got: LUA GetThingPosition(creature not found)
    hope someone could fix it{tibia 8.6 0.4}
     
  2. 5lave Ots

    5lave Ots Member

    Joined:
    Oct 2, 2017
    Messages:
    32
    Likes Received:
    3
    Best Answers:
    0

Share This Page

Loading...