Postado Abril 14, 2015 10 anos Alguem sabe me dizer o que tem de errado com esta script que apenas está dando EXP? e nada de items... function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 10012) < 1) then doPlayerAddExp(cid, 20000, true, true) setPlayerStorageValue(cid, 10012, 1) end if(item.uid == 3088) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9776, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3089) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9778, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3090) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9777, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end end return true end Editado Abril 14, 2015 10 anos por arthur122222 (veja o histórico de edições)
Postado Abril 14, 2015 10 anos Solução Tente assim: function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 10012) < 1) then doPlayerAddExp(cid, 250000, true, true) setPlayerStorageValue(cid, 10012, 1) end if(item.uid == 3088) then if(getPlayerStorageValue(cid, 30) == 53) then doPlayerAddItem(cid, 9776, 1) setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3089) then if(getPlayerStorageValue(cid, 30) == 53) then doPlayerAddItem(cid, 9778, 1) setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3090) then if(getPlayerStorageValue(cid, 30) == 53) then doPlayerAddItem(cid, 9777, 1) setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end end return true end Lembrando que a storage para ganhar o item é 30 e não 10012. ➥ Regras | Seções OTServ | Seções BOT
Postado Abril 14, 2015 10 anos Tenta ai, dei uma simplificada no script. local tb = { [3088] = {9776, 1, "You've found a yalahari armor."}, [3089] = {9778, 1, "You've found a yalahari mask."}, [3090] = {9777, 1, "You've found a yalahari leg piece."} } function onUse(cid, item) local player = Player(cid) if player:getStorageValue(10012) == 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") return true end for bau, v in pairs(tb) do if item.uid == bau then if player:getStorageValue(30) == 53 then player:AddItem(v[1], v[2]) player:setStorageValue(30, 54) player:setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" player:sendTextMessage(MESSAGE_INFO_DESCR, v[3]) break end end end player:addExperience(20000) player:setStorageValue(10012, 1) return true end Editado Abril 14, 2015 10 anos por Linus (veja o histórico de edições) As Pessoas vivem apegadas aquilo que traduzem como correto e verdadeiro,assim elas definem a realidade. mas oque significa o correto e o verdadeiro?
Postado Abril 14, 2015 10 anos Autor A do wakon fica na mesma coisa e a do Linus nem tá dando recompensa
Postado Abril 14, 2015 10 anos Qual a storage que você está mudando para testar? Testei esse script em TFS 1.0 e está normal... ➥ Regras | Seções OTServ | Seções BOT
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.