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 :
now i will explain some things
this says if he use the rune he says "Ahhh, Mana!"
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
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
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: