function onUse(cid, item, frompos, item2, topos)
teleport = {x=160, y=54, z=7}
if item.uid == 9999 and item.itemid == 1945 then
if doPlayerRemoveItem(cid, 2160, 1) == TRUE then
doTeleportThing(cid, teleport,0)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendTextMessage(cid,22,"Voce nao tem o item nescessário.")
end
elseif item.uid == 9999 and item.itemid == 1946 then
if doPlayerRemoveItem(cid, 2160, 1) == TRUE then
doTeleportThing(cid, teleport,0)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Voce nao tem o item nescessário.")
end
end
return 1
end
Use a tag code demorei mto pra entender
Se eu entendi bem, ele só teleporta o player se ele tiver 1 crystal coin...
Porém se vc quiser q o script retire 10k em qualquer dinheiro (gold,platinum) usa esse:
function onUse(cid, item, frompos, item2, topos)
teleport = {x=160, y=54, z=7}
if item.uid == 9999 and item.itemid == 1945 then
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doTeleportThing(cid, teleport,0)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendTextMessage(cid,22,"Voce nao tem o dinheiro nescessário.")
end
elseif item.uid == 9999 and item.itemid == 1946 then
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doTeleportThing(cid, teleport,0)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Voce nao tem o dinheiro nescessário.")
end
end
return 1
end
Se sanou sua dúvida reporte o topico como Dúvida Sanada


info
Grupo: Campones
Registrado: 30/12/08
Posts: 9
Reputação: 0
Char no Tibia: Radamanthys
Geeeeennttee!!! Preciso de ajuda plxx ja tentei fazer esse script MIL VESES e ele nao funfa sempre eh uma coisa e agora eh uma function. Na volta ele nao funfa ele nao faz nada depois que usa a primeira vez, aqui vai o script:
Se alguem puder dizer o erro eu agradeço. A versão eh 8.1, yurots, xml e é do god bon
VLW
Editado Janeiro 2 por Radamanthis