Postado Outubro 31, 2014 10 anos Autor :'( Deu certo também não, o erro foi solucionado, porém mesmo com todos os items necessários, continua falando que está faltando os items! Já fiz todos os scripts, o único problema é colocar 2 items diferentes com quantidades diferentes .. '---' Editado Novembro 1, 2014 10 anos por Xiolones (veja o histórico de edições)
Postado Outubro 31, 2014 10 anos O erro do distro é porque tava if getPlayerItemCount(cid, itens) = 1 thenonde no caso deveria ser "==", pois o "=" serve pra definir algo, enquanto == é pra conferir se ta igual a x.
Postado Novembro 1, 2014 10 anos amigo teste mais 1 vez function onUse(cid, item, frompos, item2, topos) local dinheiro = {2160} local grana = {2189, 2191, 2187, 2190, 2181, 2188, 8921} if item.uid == 4112 then if getPlayerItemCount(cid, grana) == 25 then doPlayerRemoveItem(cid, grana, 25) end if getPlayerItemCount(cid, itens) == 1 then doPlayerRemoveItem(cid, itens, 1) queststatus = getPlayerStorageValue(cid,100003) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You won a full mage addon!") doSendAnimatedText(getPlayerPosition(cid), "", TEXTCOLOR_ORANGE) doPlayerAddOutfit(cid,138,3) doPlayerAddOutfit(cid,120,3) setPlayerStorageValue(cid,100003,1) else doPlayerSendTextMessage(cid,22,"You own this addon!") end else doPlayerSendTextMessage(cid,22,"I need 1 wand of cosmic energy, 1 wand of draconia, 1 wand of dragonbreath, 1 wanf of inferno, 1 wand of vortex, 1 terra rod, 1 common akilles wand and more 250.000 cash for this addon!") end else return 0 end return 1 end Danvez era isso mesmo eu só fui ver agora , vlw por me alerta!
Postado Novembro 1, 2014 10 anos Autor O erro do distro é porque tava if getPlayerItemCount(cid, itens) = 1 then onde no caso deveria ser "==", pois o "=" serve pra definir algo, enquanto == é pra conferir se ta igual a x. arrumei o erro danves, vlw por esclarecer ! Porém, não sei porque, eu com todos os items na backpack, ainda fala que é necessários tais items pra poder concluir a quest.. Pela minha vista, o script não tem erros..mas sou leigo! amigo teste mais 1 vez function onUse(cid, item, frompos, item2, topos) local dinheiro = {2160} local grana = {2189, 2191, 2187, 2190, 2181, 2188, 8921} if item.uid == 4112 then if getPlayerItemCount(cid, grana) == 25 then doPlayerRemoveItem(cid, grana, 25) end if getPlayerItemCount(cid, itens) == 1 then doPlayerRemoveItem(cid, itens, 1) queststatus = getPlayerStorageValue(cid,100003) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You won a full mage addon!") doSendAnimatedText(getPlayerPosition(cid), "", TEXTCOLOR_ORANGE) doPlayerAddOutfit(cid,138,3) doPlayerAddOutfit(cid,120,3) setPlayerStorageValue(cid,100003,1) else doPlayerSendTextMessage(cid,22,"You own this addon!") end else doPlayerSendTextMessage(cid,22,"I need 1 wand of cosmic energy, 1 wand of draconia, 1 wand of dragonbreath, 1 wanf of inferno, 1 wand of vortex, 1 terra rod, 1 common akilles wand and more 250.000 cash for this addon!") end else return 0 end return 1 end Danvez era isso mesmo eu só fui ver agora , vlw por me alerta! Alan, tipo, o script deu certo, não tem erros na distro.. porém, mesmo eu com todos os items necessários, a quest me diz que ainda faltam items, que eu não os tenho! '---' Não to entendendo porque, o script parece estar certo! Editado Novembro 1, 2014 10 anos por Xiolones (veja o histórico de edições)
Postado Novembro 1, 2014 10 anos Bom amigo, eu tentei desenvolver algo mais fácil de edição. Eu fiz de um modo que você pode adicionar todas as outfits em um script só. Basta ir editando a tabela de outfits, do mesmo modo que eu fiz Não testei. local outfits = { [4113] = { items = { [1] = {itemid = 2476, ammount = 5}, [2] = {itemid = 2477, ammount = 5}, [3] = {itemid = 2396, ammount = 5}, }, out = { [1] = 131, -- Female [2] = 139, -- Male }, storageId = 10101, }, } function onUse(cid, item) local t = outfits[item.uid] if t then if getPlayerStorageValue(cid, t.storageId) <= 0 then for r = 1, #t.items do if(getPlayerItemCount(cid, t.items[r].itemid) < t.items[r].ammount) then doPlayerSendTextMessage(cid, 22, "You need "..t.items[r].ammount.." "..getItemNameById(t.items[r].itemid)) return true end doPlayerRemoveItem(cid, t.items[r].itemid, t.items[r].ammount) end doPlayerAddOutfit(cid, t.out[getPlayerSex(cid) + 1], 3) doPlayerSendTextMessage(cid, 22, "You won a new outfit.") setPlayerStorageValue(cid, t.storageId, 1) end end return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.