me diz ai q erro aparece no console, ne qual linha do script e talz...posso te ajudar com isso
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Inquichest.lua
info
Grupo: Barão
Registrado: 15/12/07
Posts: 239
Reputação: +2

info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
--- Inquisition chests function onUse(cid, item, frompos, item2, topos) if item.uid == 8560 then queststatus = getPlayerStorageValue(cid,8560) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Emerald Sword.") doPlayerAddItem(cid,8930,1) setPlayerStorageValue(cid,8560,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8561 then queststatus = getPlayerStorageValue(cid,8561) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Spellbook of dark Mysteries.") doPlayerAddItem(cid,8918,1) setPlayerStorageValue(cid,8561,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8562 then queststatus = getPlayerStorageValue(cid,8562) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Master Archer's Armor.") doPlayerAddItem(cid,8888,1) setPlayerStorageValue(cid,8562,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8563 then queststatus = getPlayerStorageValue(cid,8563) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Robe of the Underworld") doPlayerAddItem(cid,8890,1) setPlayerStorageValue(cid,8563,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8564 then queststatus = getPlayerStorageValue(cid,8564) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Fireborn Giant Armor.") doPlayerAddItem(cid,8881,1) setPlayerStorageValue(cid,8564,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8565 then queststatus = getPlayerStorageValue(cid,8565) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Obsidian Truncheon.") doPlayerAddItem(cid,8928,1) setPlayerStorageValue(cid,8565,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8566 then queststatus = getPlayerStorageValue(cid,8566) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Royal Crossbow.") doPlayerAddItem(cid,8851,1) setPlayerStorageValue(cid,8566,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8567 then queststatus = getPlayerStorageValue(cid,8567) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Warsinger Bow.") doPlayerAddItem(cid,8854,1) setPlayerStorageValue(cid,8567,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8568 then queststatus = getPlayerStorageValue(cid,8568) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Hellforged axe") doPlayerAddItem(cid,2421,1) setPlayerStorageValue(cid,8568,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end else return 0 end return 1 end
Isso ai n sei se ta certo...pq no consolo n deu erro nenhum...
Dai no action.xml colokei isso:
<action uniqueid="8560" script="inquichest.lua" /> <action uniqueid="8561" script="inquichest.lua" /> <action uniqueid="8562" script="inquichest.lua" /> <action uniqueid="8563" script="inquichest.lua" /> <action uniqueid="8564" script="inquichest.lua" /> <action uniqueid="8565" script="inquichest.lua" /> <action uniqueid="8566" script="inquichest.lua" /> <action uniqueid="8567" script="inquichest.lua" /> <action uniqueid="8568" script="inquichest.lua" />
..
Edit...Arrumei aki..mas agora os player pode pega todos os itens..keria que pegasse só um,igual anihilator
;/
Tenta ve qm sabe arruma e me manda corrijido plx
![]()
Editado Novembro 21 por Schiavinato
info
Grupo: Barão
Registrado: 15/12/07
Posts: 239
Reputação: +2

vc quer que o player pegue apenas 1 item?
facil de mais de se arrumar issso....
so vc colocar a mesma storage em todas as caixinhas ae...tipo:
getPlayerStorageValue(cid,8563)
ai vc pega e poe o mesmo ne todos.
onde tiver este trexo, vc poe igual em todos
...
ai o player so vai poder pegar 1 item
=D
...
testa ai pra ver se da serto
info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
Opa
Consegui...
Vlws ae cara...
Agora meu server ta rox...
Vou colokar umas quests desses tipo
De escolher 1 item entre uns 3 , 4
Brigadão..
=*
Sou seu fan
;D
Editado Novembro 23 por Schiavinato
info
Grupo: Barão
Registrado: 15/12/07
Posts: 239
Reputação: +2

Opa
Consegui...
Vlws ae cara...
Agora meu server ta rox...
Vou colokar umas quests desses tipo
De escolher 1 item entre uns 3 , 4
Brigadão..
=*
Sou seu fan
;D
lembrando que você não pode colocar a mesms storage nas outras quests pq se não quem fizer essa, nao vai fazer a outra..
c intende neh?
=]
o normal das storages, é colocar a mesma q o id do item, pra facilitar a organização das actions
=]
..
ops vlw
![]()


info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
Ae..por favor algum script bom...ou que saiba o básico pra me ajudar me ajude.
Eu fiquei umas 2 horas tentanto faze esse script , mas não funciona
Script:
Alguem poderia ver se ta certo..e caso:
Tiver certo: Me responda o que tem que por no action.xml
Tiver Errado: Corrija pra mim e me fale oq tem que por no action.xml
Por favor...
Eh pra inquisition quest do meu server
Aguardo respostas...
~~Schiavinato