I'm adding onto a script what I'd like to be a restriction of a specific level and up. Basically the Island of Destiny on RL, where if you're level 10 or up the dungeon won't allow you to enter again.
Original:
What I'm trying to get to work:
The script doesn't change at all, I neither get a message or a teleport. What is the problem here?
Thanks!
Original:
Code:
function onStepIn(cid, item, frompos, item2, topos)
local vocation = getPlayerVocation(cid)
local nvtp = {x=677, y=1176, z=6}
local vtp = {x=546, y=1213, z=7}
if vocation == 2 then
doCreatureSay(cid, "Good luck!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, vtp, TRUE)
else
doCreatureSay(cid, "You\'re the wrong vocation!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, nvtp, FALSE)
end
end
What I'm trying to get to work:
Code:
function onStepIn(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local vocation = getPlayerVocation(cid)
local nvtp = {x=677, y=1176, z=6}
local vtp = {x=546, y=1213, z=7}
if level >= 10 then
doCreatureSay(cid, "Your level is too high.", TALKTYPE_ORANGE_1)
doTeleportThing(cid, nvtp, FALSE)
end
if vocation == 2 then
doCreatureSay(cid, "Good luck!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, vtp, TRUE)
else
doCreatureSay(cid, "You\'re the wrong vocation!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, nvtp, FALSE)
end
end
The script doesn't change at all, I neither get a message or a teleport. What is the problem here?
Thanks!