I have this script for Vocation Lever in POI entrance but many many noob players are dying for nothing
is there any way of case is not the vocation chosen, the player is teleported away, preventing it dies or suffers damage
I have tested this but not work
- - - Updated - - -
BUMP
is there any way of case is not the vocation chosen, the player is teleported away, preventing it dies or suffers damage
Code:
local zabierz = 300
local kolor = 163
function onStepIn(cid, item, pos)
local zycie = getCreatureHealth(cid)
local topos = getPlayerPosition(cid)
if item.actionid == 9877 and isKnight(cid) == FALSE then
doCreatureAddHealth(cid, -zabierz)
doSendAnimatedText(topos, zabierz, kolor)
doCreatureSay(cid, "You have choosen the wrong path! Don't move on!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getPlayerPosition(cid), 15)
elseif item.actionid == 9877 and isKnight(cid) == TRUE then
doCreatureAddHealth(cid, -zabierz)
doSendAnimatedText(topos, zabierz, kolor)
doSendMagicEffect(getPlayerPosition(cid), 15)
end
return 1
end
I have tested this but not work
Code:
local zabierz = 300
local kolor = 163
local leave = {x=32852, y=32287, z=14}
function onStepIn(cid, item, pos)
local zycie = getCreatureHealth(cid)
local topos = getPlayerPosition(cid)
if item.actionid == 9877 and isKnight(cid) == FALSE then
doTeleportThing(cid,leave)
doCreatureSay(cid, "You have choosen the wrong path! Don't move on!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getPlayerPosition(cid), 15)
elseif item.actionid == 9877 and isKnight(cid) == TRUE then
doCreatureAddHealth(cid, -zabierz)
doSendAnimatedText(topos, zabierz, kolor)
doSendMagicEffect(getPlayerPosition(cid), 15)
end
return 1
end
- - - Updated - - -
BUMP
Last edited: