dizoxur
New Member
- Joined
- Feb 27, 2009
- Messages
- 54
- Reaction score
- 0
Well here's my manarune script:
doRemoveItem(item.uid, 1) removes the whole rune, even if it has 10 charges. If I delete that line, it'll simply not lose charges... Does anyone know how to fix that?
I will rep++
Thanks!
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == TRUE then
local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
local mana_minimum = level * 1 + mlevel * 3
local mana_maximum = level * 1 + mlevel * 3 + 50
doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
return TRUE
end
doRemoveItem(item.uid, 1) removes the whole rune, even if it has 10 charges. If I delete that line, it'll simply not lose charges... Does anyone know how to fix that?
I will rep++
Thanks!
Last edited: