Im not sure where to put it but:
how can i make it become like 1% chance for manarune (in this case frozen starlight) to fail and vanish just like normal rune?
here is my "manarune" script:
how can i make it become like 1% chance for manarune (in this case frozen starlight) to fail and vanish just like normal rune?
here is my "manarune" script:
Code:
local t = {
min = 1000,
max = 1250,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end