- Joined
- Aug 5, 2008
- Messages
- 1,581
- Reaction score
- 79
Shit, it does not work.. Players reach level 15, but they don't get teleported :S
Code:
local islands = {
-- level => town
[15] = 2,
[50] = 3
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL) then
for level, town in ipairs(islands) do
if(oldLevel < level and newLevel >= level) then
doTeleportThing(cid, getTownTemplePosition(town))
break
end
end
end
return true
end
Code:
registerCreatureEvent(cid, "teleportlevel")
Code:
<event type="advance" name="teleportlevel" event="script" value="teleportlevel.lua"/>