Donio
Banned User
Hey, im back trying to figure out how I can make so people cant use this spell when they have Pz cross or else then can just tp them self home when they are traped in war etc..
the script:
the script:
Code:
local function doTeleport(cid, count)
if not isPlayer(cid) then
return true
end
doSendAnimatedText(getThingPos(cid), 5 - count..'s', COLOR_ORANGE)
doSendMagicEffect(getThingPos(cid), CONST_ME_YELLOW_RINGS)
if count == 5 then
return doCreatureSetNoMove(cid, false) and doTeleportThing(cid, {x=1000,y=999,z=7}) and doCreatureSay(cid, 'You have been teleported to temple', TALKTYPE_ORANGE_1, false, cid)
else
addEvent(doTeleport, 1000, cid, count + 1)
end
return true
end
function onCastSpell(cid, var)
if getCreatureSkullType(cid) > SKULL_GREEN or isPlayerPzLocked(cid) then
doPlayerSendCancel(cid, 'You cannot use this spell after killing another player or while skulled.')
else
return doCreatureSetNoMove(cid, true) and doTeleport(cid, 0)
end
end