function onUse(cid,item,fromPosition,itemEx,toPosition)
if isPlayerPzLocked(cid) == FALSE then
doTeleportThing(cid,getTownTemplePosition(getTownId(cid)))
doSendMagicEffect(getThingPos(cid),10)
else
doPlayerSendTextMessage(cid,27,'You can\'t use this while having PZ.')
end
return true
end
function onUse(cid,item,fromPosition,itemEx,toPosition)
if isPlayerPzLocked(cid) == FALSE then
doTeleportThing(cid, getPlayerMasterPos(cid))
doSendMagicEffect(getThingPos(cid),10)
else
doPlayerSendTextMessage(cid,27,'You can\'t use this while having PZ.')
end
return true
end
function onUse(cid,item,fromPosition,itemEx,toPosition)
if isPlayerPzLocked(cid) == FALSE then
doTeleportThing(cid,getPlayerMasterPos(cid))
doSendMagicEffect(getThingPos(cid),10)
doRemoveItem(item.uid)
else
doPlayerSendTextMessage(cid,27,'You can\'t use this while having PZ.')
end
return true
end
doPlayerAddItem(cid, 1111, 5) -- 1111 is the item id.
function onUse(cid,item,fromPosition,itemEx,toPosition)
if isPlayerPzLocked(cid) == FALSE then
doTeleportThing(cid,getPlayerMasterPos(cid))
doSendMagicEffect(getThingPos(cid),10)
doPlayerRemoveItem(cid, 2270, 1)
else
doPlayerSendTextMessage(cid,27,'You can\'t use this while having PZ.')
end
return true
end
function onUse(cid,item,fromPosition,itemEx,toPosition)
if not isPlayerPzLocked(cid) then
doTeleportThing(cid, getPlayerMasterPos(cid))
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
doChangeTypeItem(item.uid, item.type - 1)
else
doCreatureSay(cid, 'You can\'t use this while PZ-locked.', TALKTYPE_ORANGE_1, false, cid)
end
return true
end