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

Player up X level and are teleported to X,Y,Z !

Gaucho3030

New Member
Joined
Jan 16, 2013
Messages
2
Reaction score
0
Hello, i'm need a one script with the player, up level 8 and are teleported automatically to potions X,Y,Z!
 
Hello, i are not good at creature scripts, but try this

LUA:
local t, storage = { 
    {8}
}, 256

local pos = {x = 1000, y = 1000, z = 7}	

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill ~= SKILL__LEVEL then
        return true
    end
    for i = 1, #t do
        local v = t[i]
        if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
            doTeleportThing(cid,pos)
            doCreatureSetStorage(cid, storage, i)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have been teleported!')
        end
    end
    return true
end

Report any errors here
 
Back
Top