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

Request: Manarune script for Crying Damson

Linryt

Conclusionot.sytes.net
Joined
Nov 29, 2008
Messages
73
Reaction score
0
Ok I don't have one and stuff so I thought I'll just ask it here
script please :D also tell me what to add to like spells and items etc.

Sincerelly Yours, Linryt.
 
copy a lua file in support and change name to mana rune and add this script
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
function onGetFormulaValues(cid, level, maglevel)
	local min = level * 5 + maglevel * 9
	local max = level * 6 + maglevel * 10
	return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

put this in spells.xml
Code:
<rune name="Mana Rune" id="2298" allowfaruse="1" charges="1" lvl="8" maglv="4" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="support/mana rune.lua"/

i used rune id 2298 but you can use any that arnt in use
adjust to what you like, this mana rune increases when you go up in lvl and ml

Code:
	<attribute key="charges" value="1"/>
you might have to add this to the rune you pick in items.xml
also might want to rename the rune from
Code:
	<item id="2297" article="a" name="spell rune">
to
Code:
<item id="2297" article="a" name="mana rune">
 
Last edited:
Thanks but could you post one which heals 500 mana and one that heals 1000 ?
could you also make it so the almount that restores is shown above the person using it?
 
Last edited:
well first go to data/spells/scripts/healing and make a new lue whit this.....
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 34)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
[COLOR="Blue"]setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 1000, 0, 5000)[/COLOR]

function onCastSpell(cid, var)
doSendAnimatedText(getPlayerPosition(cid), "Maaanaaaa", TEXTCOLOR_LIGHTGREEN)
	return doCombat(cid, combat, var)
end


Code:
[COLOR="Red"]setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 1000, 0, 5000)[/COLOR]
here in 1000 and 5000 change the numbers to the mana you whant to recieve

go to data/spells/spells.xml and put this
Code:
	<rune name="Mana Rune" id="2276" allowfaruse="1" charges="5" lvl="80" exhaustion="1000" maglv="5" aggressive="0" needtarget="1" blocktype="solid" script="manarune.lua"/>

and then go to data/items/items.xml and search for
Code:
[COLOR="Blue"] 	<item id="2276" article="a" [COLOR="GREEN"]name="spell rune"[/COLOR]>
		<attribute key="weight" value="120"/>
	</item>[/COLOR]

and change the name to Mana Rune

and thats all...
 
howw I know what is wrong...

go to data/spells/spells.xml and search this
Code:
	<rune name="Mana Rune" id="2276" allowfaruse="1" charges="5" lvl="80" exhaustion="1000" maglv="5" aggressive="0" needtarget="1" blocktype="solid" script="manarune.lua"/>

and change it fot this
Code:
	<rune name="Mana Rune" id="2276" allowfaruse="1" charges="5" lvl="80" exhaustion="1000" maglv="5" aggressive="0" needtarget="1" blocktype="solid" script="healing/manarune.lua"/>
then go to your God/Gm/cm character and say /i Mana Rune
 
and to see how much a player heals whit Mana Rune or Potions go to
config.lua and search for

Code:
	showHealingDamage = false
change it to
Code:
	showHealingDamage = true
.........
 
it works but when i replace the 0, 1000, 0, 5000, for 0, 500, 0, 500, like u said it keeps healing 1000-4000
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 34)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 497, 498, 499, 500)

function onCastSpell(cid, var)
doSendAnimatedText(getPlayerPosition(cid), "Maaanaaaa", TEXTCOLOR_LIGHTGREEN)
	return doCombat(cid, combat, var)
end

and I think its all =/
 
That gives 1901980139 mana o_O to bad you cant solve this last problem but still. Thanks alot for the other scripting
 
1zoewoz.jpg
 
Back
Top