Postado Março 30, 2018 7 anos Bom dia, Criei um Script de baú de quest, onde quando o player abre ganha Alguns itens e uma quantia de exp, até ai tudo bem, a script esta funcionando, mas quando o player tenta abrir de novo o baú não aparece a mensagem: "Esta vazio" Dês de já grato! Srcipt: function onUse(cid, item, frompos, item2, topos) local expReward = 90 if item.uid == 1001 then queststatus = getPlayerStorageValue(cid,1001) if queststatus == -1 then if getPlayerLevel(cid) >= 2 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!") doPlayerAddItem(cid,2465,1) doPlayerAddItem(cid,2512,1) doPlayerAddItem(cid,2478,1) doPlayerAddItem(cid,2460,1) doPlayerAddItem(cid,2554,1) doPlayerAddItem(cid,2120,1) doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Voce ainda nao pode abrir esse bau.") end doPlayerSendTextMessage(cid,22,"Esta vazio.") end else return 1 end return 1 end
Postado Março 30, 2018 7 anos function onUse(cid, item, frompos, item2, topos) local expReward = 90 if item.uid == 1001 then queststatus = getPlayerStorageValue(cid,1001) if queststatus == -1 then if getPlayerLevel(cid) >= 2 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!") doPlayerAddItem(cid,2465,1) doPlayerAddItem(cid,2512,1) doPlayerAddItem(cid,2478,1) doPlayerAddItem(cid,2460,1) doPlayerAddItem(cid,2554,1) doPlayerAddItem(cid,2120,1) doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Voce ainda nao pode abrir esse bau.") else doPlayerSendTextMessage(cid,22,"Esta vazio.") end else return 1 end return 1 end Editado Março 30, 2018 7 anos por Dragon Ball Hiper (veja o histórico de edições)
Postado Março 30, 2018 7 anos Autor 6 minutos atrás, Dragon Ball Hiper disse: function onUse(cid, item, frompos, item2, topos) local expReward = 90 if item.uid == 1001 then queststatus = getPlayerStorageValue(cid,1001) if queststatus == -1 then if getPlayerLevel(cid) >= 2 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!") doPlayerAddItem(cid,2465,1) doPlayerAddItem(cid,2512,1) doPlayerAddItem(cid,2478,1) doPlayerAddItem(cid,2460,1) doPlayerAddItem(cid,2554,1) doPlayerAddItem(cid,2120,1) doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Voce ainda nao pode abrir esse bau.") else doPlayerSendTextMessage(cid,22,"Esta vazio.") end else return 1 end return 1 end Bom dia, acabei de testar e ocorreu o seguinte erro:
Postado Março 30, 2018 7 anos Solução 4 minutos atrás, peterson18 disse: Bom dia, acabei de testar e ocorreu o seguinte erro: testa este function onUse(cid, item, frompos, item2, topos) local expReward = 90 if item.uid == 1001 then queststatus = getPlayerStorageValue(cid,1001) if queststatus == -1 then if getPlayerLevel(cid) >= 2 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!") doPlayerAddItem(cid,2465,1) doPlayerAddItem(cid,2512,1) doPlayerAddItem(cid,2478,1) doPlayerAddItem(cid,2460,1) doPlayerAddItem(cid,2554,1) doPlayerAddItem(cid,2120,1) doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Voce ainda nao pode abrir esse bau.") end else doPlayerSendTextMessage(cid,22,"Esta vazio.") end else return 1 end return 1 end
Postado Março 30, 2018 7 anos Autor 2 minutos atrás, Dragon Ball Hiper disse: testa este function onUse(cid, item, frompos, item2, topos) local expReward = 90 if item.uid == 1001 then queststatus = getPlayerStorageValue(cid,1001) if queststatus == -1 then if getPlayerLevel(cid) >= 2 then doPlayerSendTextMessage(cid,22,"Parabens, voce encontrou alguns itens!") doPlayerAddItem(cid,2465,1) doPlayerAddItem(cid,2512,1) doPlayerAddItem(cid,2478,1) doPlayerAddItem(cid,2460,1) doPlayerAddItem(cid,2554,1) doPlayerAddItem(cid,2120,1) doPlayerAddExp(cid, expReward) doPlayerSendTextMessage(cid, 22, 'Voce ganhou '.. expReward ..' de experiencia.') setPlayerStorageValue(cid,1001,1) else doPlayerSendTextMessage(cid,22,"Voce ainda nao pode abrir esse bau.") end else doPlayerSendTextMessage(cid,22,"Esta vazio.") end else return 1 end return 1 end Agora deu certo, Muito obrigado manow!!!
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.