• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Being able to add mana to another play using manarune.

Aurolio

New Member
Joined
Aug 26, 2018
Messages
45
Reaction score
3
As in the title. I need a script that will add mana to another player using manarune. I am using the classic manarune script. Whenever I want to add mana to another player it just adds mana to myself. Any ideas?
 
Solution
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
You need to use 'itemEx.uid' instead of cid, when applying the mana.

And if your rune doesn't have it, add a check to ensure it's a creature.
Lua:
if not isCreature(itemEx.uid) then
    -- send cancel message?
    return true
end
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
You need to use 'itemEx.uid' instead of cid, when applying the mana.

And if your rune doesn't have it, add a check to ensure it's a creature.
Lua:
if not isCreature(itemEx.uid) then
    -- send cancel message?
    return true
end
 
Solution
Back
Top