potinho
Advanced OT User
Hello guys,
Im included in my server a Mana Rune, but when i sell or create this item, he came with no charges like other runes (sd, uh).
Here spells.xml
<rune name="Mana Rune" id="2281" allowfaruse="1" charges="1" maglv="4" exhaustion="800" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/manarune.lua"/>
Script.lua
end
And XML of item:
<item id="2281" article="a" name="Mana Rune">
<attribute key="type" value="rune"/>
<attribute key="charges" value="1"/>
<attribute key="weight" value="52"/>
</item>
Im included in my server a Mana Rune, but when i sell or create this item, he came with no charges like other runes (sd, uh).
Here spells.xml
<rune name="Mana Rune" id="2281" allowfaruse="1" charges="1" maglv="4" exhaustion="800" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/manarune.lua"/>
Script.lua
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
function onCastSpell(cid, var)
doCreatureAddMana(cid, math.random(100,300))
doCreatureSay(cid,"Aaaah...", TALKTYPE_ORANGE_1)
doPlayerRemoveItem(cid,2281,1)
return doCombat(cid, combat, var)
end
end
And XML of item:
<item id="2281" article="a" name="Mana Rune">
<attribute key="type" value="rune"/>
<attribute key="charges" value="1"/>
<attribute key="weight" value="52"/>
</item>