Qual erro dá?
info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

info
Grupo: Banidos
Registrado: 11/01/13
Posts: 576
Reputação: +109
Char no Tibia: Darashia del Shee

Flw
function onUse(cid, item, frompos, item2, topos)
if getCreatureCondition(cid,CONDITION_INFIGHT) then
if getCreatureCondition(cid,CONDITION_SKULL_WHITE) == FALSE or if getCreatureCondition(cid,CONDITION_SKULL_BLACK) == FALSE or 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
Aqui está dando este erro no script do Gears:
[1/5/2013 0:27:37] [Error - LuaInterface::loadFile] data/actions/scripts/back_to_temple.lua:3: unexpected symbol near 'if'
[1/5/2013 0:27:37] [Error - Event::checkScript] Cannot load script (data/actions/scripts/back_to_temple.lua)
Já com o meu script dá este erro:
[1/5/2013 0:28:50] [Error - LuaInterface::loadFile] data/actions/scripts/back_to_temple.lua:14: 'end' expected (to close 'if' at line 3) near '<eof>'
[1/5/2013 0:28:50] [Error - Event::checkScript] Cannot load script (data/actions/scripts/back_to_temple.lua)
[1/5/2013 0:28:50] data/actions/scripts/back_to_temple.lua:14: 'end' expected (to close 'if' at line 3) near '<eof>'
Mas creio que o script do Gears esteja no caminho certo, mas ainda não funfou.
info
Grupo: Banidos
Registrado: 11/01/13
Posts: 576
Reputação: +109
Char no Tibia: Darashia del Shee

function onUse(cid, item, frompos, item2, topos)
if getCreatureCondition(cid,CONDITION_INFIGHT) 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
Ta tenso rsrsrsrs... tmb to batendo cabeça, mas ta complicado! Ainda com erros.
[1/5/2013 0:48:47] [Error - LuaInterface::loadFile] data/actions/scripts/back_to_temple.lua:14: 'end' expected (to close 'if' at line 3) near '<eof>'
[1/5/2013 0:48:47] [Error - Event::checkScript] Cannot load script (data/actions/scripts/back_to_temple.lua)
[1/5/2013 0:48:47] data/actions/scripts/back_to_temple.lua:14: 'end' expected (to close 'if' at line 3) near '<eof>'
info
Grupo: Banidos
Registrado: 11/01/13
Posts: 576
Reputação: +109
Char no Tibia: Darashia del Shee

function onUse(cid, item, frompos, item2, topos)
if getCreatureCondition(cid,CONDITION_INFIGHT) 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
end
end
end




info
Grupo: Campones
Registrado: 29/07/12
Posts: 31
Reputação: +3
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