• Congratulations to the OTLand January Mapping Competition Winner! The grand prize of Otland Premium goes to Andréew.
  • Sign up for February Mapping Competition! The prize includes Otland Premium time.
  • 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!

Lua Function Donation Manarune script

Did this help you?


  • Total voters
    3

Senzation96

Hoster - Scripter
Joined
Jul 17, 2008
Messages
90
Best answers
0
Reaction score
5
Location
Sweden
Yo I edited the regular Donation Manarune script

This script is for - 8.6 running on TFS 0.4

Donation Manarune script

Path to edit/add - Server -> Senzation EVO\data\spells\scripts\healing\"Yourscript.lua"


----------------------------------------------

Path to edit/add - Server --> Senzation EVO\data\spells\spells.xml

<rune name="donation manaheal" id="2300" allowfaruse="1" charges="1" lvl="0" maglv="0" exhaustion="800" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/donation manaheal.lua"/>

----------------------------------------------

"Yourscript.lua"

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
function onGetFormulaValues(cid, level, maglevel)
local min = (getCreatureMaxMana(cid) / 100) * 25
local max = (getCreatureMaxMana(cid) / 100) * 50
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


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

Donation Manarune script

Normal Manarune Script


Path to edit/add - Server -> Senzation EVO\data\spells\scripts\healing\"Yourscript.lua"
Path to edit/add - Server --> Senzation EVO\data\spells\spells.xml

----------------------------------------------

Path to edit/add - Server --> Senzation EVO\data\spells\spells.xml
Add
<rune name="Manarune" id="2298" allowfaruse="1" charges="1" lvl="0" maglv="0" exhaustion="800" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/manarune.lua"/>

----------------------------------------------


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
function onGetFormulaValues(cid, level, maglevel)
local min = (getCreatureMaxMana(cid) / 100) * 15
local max = (getCreatureMaxMana(cid) / 100) * 25
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


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

Normal Manarune Script

Hope this helped anyone best regards Senzation ;)
Observe I don't know who originally made the script so if anyone knows please let me know so I can credit.

Sorry admin if I posted this in the wrong section it was a long time ago since I was posting on here!

 

Discovery

Developing myself
Joined
Apr 16, 2010
Messages
460
Best answers
7
Reaction score
136
Location
Neverland
well.. I dont know, I'm so confused.
First of all: this is the wrong area (c++ codes).

But, the real problem is the post organization...
Try use the text editor resources, using some [ code ] tags.

Best for you!
Thank you for posting that content.
 

ralke

Felipe
Joined
Dec 17, 2011
Messages
335
Best answers
3
Reaction score
51
Location
Chile
as I see it, he just change the id of the object

xD
 
OP
Senzation96

Senzation96

Hoster - Scripter
Joined
Jul 17, 2008
Messages
90
Best answers
0
Reaction score
5
Location
Sweden
as I see it, he just change the id of the object

xD

What i did was scale the base of the donation manarune of the basic manarune.


well.. I dont know, I'm so confused.
First of all: this is the wrong area (c++ codes).

But, the real problem is the post organization...
Try use the text editor resources, using some [ code ] tags.

Best for you!
Thank you for posting that content.
(Code should be in Lua that is my bad.)
 
Top