Terceira Action e estou com força total
Name: Orb Explosiva
Descrição: Essa Orb é um pouco traisueira mais as vezes ela pode vim acalhar, Ela pode tirar sua vida ou encher sua vida, tirar sua mana ou encher sua mana vai depende da sua sorte!.
Dificuldade: Médio.
Scripts;
Crie um arquivo e renomeio para orbexplosiva.lua
E adicione o seguinte script:
function onUse(cid, item, frompos, item2, topos)luck = math.random(1,10)
pos = getPlayerPosition(cid)
if item.itemid == 2176 and luck == 1 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddHealth(cid,-1000)
doPlayerSendTextMessage(cid,22,"Hahaha dessa veiz você não deu sorte! Perdeu -1000 de HP.")
elseif item.itemid == 2176 and luck == 2 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddHealth(cid,-500)
doPlayerSendTextMessage(cid,22,"Hahaha dessa veiz você não deu sorte! Perdeu -500 de HP.")
elseif item.itemid == 2176 and luck == 3 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerSendTextMessage(cid,22,"É a orb falhou.")
elseif item.itemid == 2176 and luck == 4 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddHealth(cid,200)
doPlayerSendTextMessage(cid,22,"Ual você dessa veiz deu sorte! Ganhou 200 de HP.")
elseif item.itemid == 2176 and luck == 5 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddHealth(cid,1000)
doPlayerSendTextMessage(cid,22,"Ual você dessa veiz deu sorte! Ganhou 1000 de HP.")
elseif item.itemid == 2176 and luck == 6 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddMana(cid,-1000)
doPlayerSendTextMessage(cid,22,"Hahaha dessa veiz você não deu sorte! Perdeu -1000 de Mana.")
elseif item.itemid == 2176 and luck == 7 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddMana(cid,-500)
doPlayerSendTextMessage(cid,22,"Hahaha dessa veiz você não deu sorte! Perdeu -500 de Mana.")
elseif item.itemid == 2176 and luck == 8 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddMana(cid,200)
doPlayerSendTextMessage(cid,22,"Ual você dessa veiz deu sorte! Ganhou 200 de Mana.")
elseif item.itemid == 2176 and luck == 9 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerAddMana(cid,1000)
doPlayerSendTextMessage(cid,22,"Ual você dessa veiz deu sorte! Ganhou 1000 de Mana.")
elseif item.itemid == 2176 and luck == 10 then
doPlayerRemoveItem(cid,2176,1)
doSendMagicEffect(pos,6)
doPlayerSendTextMessage(cid,22,"É a orb falhou.")
end
return 1
end
E agora vá ao actions.xml e adcione a seguinte frase:
<action itemid="2176" script="orbexplosiva.lua"/>
Pronto outra action simples adcionada no seu servidor.
- Raafael.