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

LeverKinght POI - How not pass other vocation

djtuca

Technical Support
Joined
Jun 25, 2011
Messages
198
Reaction score
3
Location
Brazil
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

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:
Back
Top