luccagomes 2 Postado Setembro 23, 2013 Share Postado Setembro 23, 2013 Alguem me ajuda, gostei do script, mas queria q tive-se um maximo de 50 vezes pra usar essas duas pedras aqui, alguem sabe colocar? http://www.xtibia.com/forum/topic/215444-life-stone-e-mana-stone/ Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/ Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Setembro 23, 2013 Share Postado Setembro 23, 2013 2x para sempre? Ou 50 cargas? Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564693 Compartilhar em outros sites More sharing options...
0 Seagull 19 Postado Setembro 23, 2013 Share Postado Setembro 23, 2013 Acho que ele não quis dizer cargas, mas sim usos mesmo. Tipo só poder usar 50 vezes a de vida. Só podendo adicionar 10*50 = 500 um total de 500 de vida a mais. Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564711 Compartilhar em outros sites More sharing options...
0 WillOliveira 21 Postado Setembro 24, 2013 Share Postado Setembro 24, 2013 (editado) Fiz o script com contagem, quando o player usa a pedra mostra uma msg de mais quantas vezes ele pode usar, testei aqui e ta funcionando perfeitamente. Com esse script se o player usar 50 vezes a pedra e depois adquirir ela novamente, ele poderá usar mais 50 vezes e assim infinitamente. Se você quiser que seja impossivel usar a pedra depois que acabar a primeira, é só falar que eu edito o script. lifestone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de life o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8085) == -1 then doPlayerSetStorageValue(cid, 8085, 0) end if getPlayerStorageValue(cid, 8085) >= 0 and getPlayerStorageValue(cid, 8085) < cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vezes.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) elseif getPlayerStorageValue(cid, 8085) == cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vez.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) else setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) doPlayerSetStorageValue(cid, 8085, 0) end end manastone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de mana o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8086) == -1 then doPlayerSetStorageValue(cid, 8086, 0) end if getPlayerStorageValue(cid, 8086) >= 0 and getPlayerStorageValue(cid, 8086) < cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vezes.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) elseif getPlayerStorageValue(cid, 8086) == cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vez.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) else setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) doPlayerSetStorageValue(cid, 8086, 0) end end Editado Setembro 24, 2013 por WillOliveira Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564768 Compartilhar em outros sites More sharing options...
0 Seagull 19 Postado Setembro 24, 2013 Share Postado Setembro 24, 2013 (editado) Eu gostaria que fosse FINITO, tirando isso ta perfeito e vai se encaixar perfeitamente onde preciso! Desde já obrigado e reputado Cara é só uma carga, e como se fosse uma pedra de evoluir pokemon. Usa uma vez e acaba.... Editado Setembro 24, 2013 por Seagull Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564809 Compartilhar em outros sites More sharing options...
0 WillOliveira 21 Postado Setembro 24, 2013 Share Postado Setembro 24, 2013 (editado) @Seagull Scripts das pedras finitas: lifestone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de life o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8085) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8085) == -1 then doPlayerSetStorageValue(cid, 8085, 0) end if getPlayerStorageValue(cid, 8085) >= 0 and getPlayerStorageValue(cid, 8085) < cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vezes.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) elseif getPlayerStorageValue(cid, 8085) == cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vez.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) else doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) end end manastone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de mana o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8086) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8086) == -1 then doPlayerSetStorageValue(cid, 8086, 0) end if getPlayerStorageValue(cid, 8086) >= 0 and getPlayerStorageValue(cid, 8086) < cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vezes.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) elseif getPlayerStorageValue(cid, 8086) == cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vez.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) else doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) end end Editado Setembro 24, 2013 por WillOliveira Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564814 Compartilhar em outros sites More sharing options...
0 Seagull 19 Postado Setembro 24, 2013 Share Postado Setembro 24, 2013 Obrigado cara, ainda não tive tempo de testa porque to no curso. Mas vendo assim, parece estar funcional. Que droga cara, consigo interpretar tudo intender a logica, mas na hora de fazer empaco. Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1564831 Compartilhar em outros sites More sharing options...
0 luccagomes 2 Postado Setembro 25, 2013 Autor Share Postado Setembro 25, 2013 Ta funfando, mas ela só é removida dps de usar 50x eu queria q cada vez q fosse usada ela fosse removida. Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1565166 Compartilhar em outros sites More sharing options...
0 WillOliveira 21 Postado Setembro 25, 2013 Share Postado Setembro 25, 2013 Ta funfando, mas ela só é removida dps de usar 50x eu queria q cada vez q fosse usada ela fosse removida. Ta ai: lifestone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de life o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8085) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8085) == -1 then doPlayerSetStorageValue(cid, 8085, 0) end if getPlayerStorageValue(cid, 8085) >= 0 and getPlayerStorageValue(cid, 8085) < cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vezes.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) elseif getPlayerStorageValue(cid, 8085) == cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vez.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) else doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) end end manastone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de mana o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8086) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8086) == -1 then doPlayerSetStorageValue(cid, 8086, 0) end if getPlayerStorageValue(cid, 8086) >= 0 and getPlayerStorageValue(cid, 8086) < cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vezes.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) elseif getPlayerStorageValue(cid, 8086) == cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vez.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) else doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) end end Da proxima vez detalhe melhor seu pedido... Espero ter ajudado Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1565315 Compartilhar em outros sites More sharing options...
0 luccagomes 2 Postado Setembro 26, 2013 Autor Share Postado Setembro 26, 2013 Ta funfando, mas ela só é removida dps de usar 50x eu queria q cada vez q fosse usada ela fosse removida. Ta ai: lifestone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de life o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8085) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8085) == -1 then doPlayerSetStorageValue(cid, 8085, 0) end if getPlayerStorageValue(cid, 8085) >= 0 and getPlayerStorageValue(cid, 8085) < cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vezes.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) elseif getPlayerStorageValue(cid, 8085) == cargas-2 then doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8085)-cargas).." vez.") setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) else doPlayerSetStorageValue(cid, 8085, getPlayerStorageValue(cid, 8085)+1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de vida.") doSendMagicEffect(topos,35) doRemoveItem(item.uid) end end manastone.lua: function onUse(cid, item, frompos, item2, topos) local cargas = 50 -- Aqui você coloca quantas vezes o player pode usar a pedra local bonus = 10 -- Aqui você coloca quanto de mana o player vai ter a mais quando usar a pedra if getPlayerStorageValue(cid, 8086) >= cargas then doPlayerSendTextMessage(cid,26,"Você não pode mais usar este item.") return true end if getPlayerStorageValue(cid, 8086) == -1 then doPlayerSetStorageValue(cid, 8086, 0) end if getPlayerStorageValue(cid, 8086) >= 0 and getPlayerStorageValue(cid, 8086) < cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vezes.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) elseif getPlayerStorageValue(cid, 8086) == cargas-2 then doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) doPlayerSendTextMessage(cid, 22, "Você pode usar este item mais "..math.abs(getPlayerStorageValue(cid, 8086)-cargas).." vez.") setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) else doPlayerSetStorageValue(cid, 8086, getPlayerStorageValue(cid, 8086)+1) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonus) doPlayerSendTextMessage(cid,22,"Você ganhou mais "..bonus.." de mana.") doSendMagicEffect(topos,1) doRemoveItem(item.uid) end end Da proxima vez detalhe melhor seu pedido... Espero ter ajudado PERFEITO amanha te dou 2 reps, e se n for pedir mt faz uma pra mim q da 100 de life e 100 de mana com o id 2153 e q só pode ser usado 3x? Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1565750 Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Dezembro 6, 2013 Share Postado Dezembro 6, 2013 Tópico movido para a seção de dúvidas e pedidos resolvidos. O tópico foi fechado e movido para lixeira por estar inativo a mais de 30 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe. Link para o comentário https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/#findComment-1589538 Compartilhar em outros sites More sharing options...
Pergunta
luccagomes 2
Alguem me ajuda, gostei do script, mas queria q tive-se um maximo de 50 vezes pra usar essas duas pedras aqui, alguem sabe colocar?
http://www.xtibia.com/forum/topic/215444-life-stone-e-mana-stone/
Link para o comentário
https://xtibia.com/forum/topic/221570-arrumar-script-stone-lifestone-mana/Compartilhar em outros sites
10 respostass a esta questão
Posts Recomendados