Como faço um script para criar um item que teleporta o player para o templo, o player pode estar com batle, mas não pode estar com white skull, red ou black? Vi um tópico do Roksas e tentei algo assim:
data/actions/scripts
function onUse(cid, item, frompos, item2, topos)
if getCreatureCondition(cid,CONDITION_INFIGHT) == TRUE then
if getCreatureCondition(cid,CONDITION_SKULL_WHITE) == FALSE then
if getCreatureCondition(cid,CONDITION_SKULL_BLACK) == FALSE then
if getCreatureCondition(cid,CONDITION_SKULL_RED) == FALSE then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerSendTextMessage(cid,22,"Sucessfully teleported!")
doRemoveItem(item.uid,1)
doCreatureSetSkull(cid, 0)
else
doPlayerSendTextMessage(cid,27,"Wait your skull for be teleport to your temple!")
end
return true
end