Code:
function onUse(player, item, fromPosition, itemEx, toPosition)
player:addManaSpent(300)
return true
end
Showing no errors but is not adding no magic level percent is this a wrong way to do the script?
function onUse(player, item, fromPosition, itemEx, toPosition)
player:addManaSpent(300)
return true
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:addManaSpent(10000)
return true
end
You have to read what is written... It's English.
Add mana spent, adding 100 mana spent is like the player using a spell that costs 100 mana.... This may give no percent to the player's magic level depending the of the vocation and current ml. Use vocation functions to get the necessary mana spent for given magic level.