• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell The Manarune

Starmio

Starmio
Joined
Feb 9, 2008
Messages
167
Reaction score
2
Location
...
This time i will explain how to make a manarune
go to actions/scripts ther you need to make a new .lua map cal it manarune.lua
this you need to fill in the document :



Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doPlayerSay(cid,"Ahhh, Mana!",16)
doPlayerAddMana(cid, 1000)
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 rune.")
end
return 1
end


now i will explain some things

Code:
doPlayerSay(cid,"Ahhh, Mana!",16)

this says if he use the rune he says "Ahhh, Mana!"

Code:
doPlayerAddMana(cid, 1000)

this will say how many mana there is if someone use the rune in my case it is 1000 mana
save this and put it in data/actions/scripts remember this is a .lua document.
put the same is data/spells/runes
in youre items folder you need to find the id 3095 that is the mana rune and you need to change the text to manarune
or you can use a other id for the mana rune but be shure you put this


Code:
<action itemid="2281" script="manarune.lua" />

in data/actions/actions.xml than it will work

so this is a manarune it is not 1 of the bests but it is 1 have fun with it.


good luck with your ot server


Thanks to Barket
 
Last edited:
Manarunes aren't supposed to be action scripts! they are a spell script!! only noobs use action scripts because it says stuff.. use a real script like..

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
	doPlayerAddMana(cid, math.random(100, 1000))
	return doCombat(cid, combat, var)
end
 
Perhaps someone know, is it manarune(I r New) is going down?
I'm looking for manarune for engine 0.3.6pl1 which can count charges(script in /data/sells/?)
 
Yes, but there are a lot of noob manarunes which is't going down. I must have manarune which is going down and script should be in spells(show charges like runes).
 
Back
Top