• 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!

why is my mana rune not working

brendan2

Sensation black
Joined
Feb 19, 2009
Messages
507
Reaction score
1
i tryed multiple mana runes
im using 8.4

i copyed pasted my old mana rune that worked great on my 8.41 server and it puts the rune saying

08:44 You see a spell rune(Charges:1).
It can only be used with level 1 and magic level 1 or higher.
It weighs 1.20 oz.

ugh help
 
-.- man that is tha manarune(u must put it in scripts/Custom) :
Code:
 local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1600) 
return doCombat(cid, combat, var)
end [Code]


and that u must put in the "Spells" : [Code]<rune name="manarune" id="2298" charges="1" maglv="1" exhaustion="1" blocktype="solid" allowfaruse="1" aggressive="0" script="custom/manarune.lua"/>


Give me rep if i am helped u!!!
 
In data/actions/scripts

Make a folder for example call it "Manarune"

Make a LUA file inside the Manarune folder call it for example "Manarune", inside this lua simply add :-

Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= [COLOR="red"]3[/COLOR] then
doPlayerAddMana(cid, [COLOR="Red"]3000[/COLOR])
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that manarune.")
end
return 1
end

Then go back to your data/actions.xml

Add this line to your Actions.xml

<action itemid="Put here the Manarune ID" event="script" value="manarune/manarune.lua" />

Tested and works fine!
 
Back
Top