Creditos:
---Clic 90%--- Por ter dado a ideia e desenvolvido completamente!
---Colex 10%--- Por ter arrumado 5 bugs que havia na action!
function onUse(cid, item, frompos, item2, topos)money = math.random (1,100)
perda = math.random (1,4)
vocation = math.random (1,4)
hp = math.random (1,100)
suavoc = getPlayerVocation(cid)
if item2.itemid == cid then
if getPlayerName(item2.uid) == getPlayerName(cid) then
if doPlayerRemoveItem(cid,2160,money) == 1 then
doPlayerRemoveItem(cid,2298,perda)
doPlayerSetVocation(cid,vocation)
doPlayerAddHealth(cid,-hp)
doPlayerSendTextMessage(cid,22,"Vc mudou da ".. suavoc .." para ".. vocation .."!")
else
doPlayerSendCancel(cid,"Vc nao tem ".. money .." crystal (precisa ser em crystal)!")
end
else
doPlayerSendCancel(cid,"Vc só pode usar essa rune em vc!")
end
else
return 0
end
return 1
end
Vc's devem estar se perguntando q é esse monte de math.random!
money = math.random (1,100) escolhe de 1 a 100 de crystal! no caso no meu!!!perda = math.random (1,4)
vocation = math.random (1,4) vocaçao muda de 1 pra 4 depende da sorte!
hp = math.random (1,100) o minimo e o maxmo de hp q vc vai pode perder ou ganha!
suavoc = getPlayerVocation(cid)
Acho q é isso a runa!!!
Vc so pode usa ela em vc mesmo!!!
Comentem plz!