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

Spells with multiple areas dont take mana and have no exhaust

zakius

Enter the Ninja!
Joined
Apr 30, 2009
Messages
2,635
Reaction score
65
Location
with Taiga
Like in topic, i have tfs 0.3.4 pl2 and these spells dont use mana and have 0 exhaust time
What i can do to fix that?

Sorry if there was topic like that, but this search function every time gives me about 200 topics that have nothing to text i was searching...
 
Make a spell, save the file as NAME.lua, but when you set it up in the xml file, put
Lua:
<instant name="NAME" words="WORDS" lvl="LVL" mana="0" direction="1" exhaustion="0" needlearn="0" event="script" value="NAME.lua">

And save.

P.S Change NAME to the name of the spell, WORDS to the words you use (e.g. exevo gran mas frigo), and LVL to the level required.
 
This line you showed i think makes that spell takes 0 mana and no exhu. But i want to fix spells to work normally. This bug appears only with multi area spells...
 
OH sorry, I read your post wrong...

Just use the line I showed you but change it to be correct (2000 exhaust, and depending mana).

Simple :)

P.S. If the problem isnt in the xml I dno whats wrong :(
 
Exactly problem is that I have exhaust and mana in xml set to 2000 end 80 for example...
Of course i can burn mana in spell modyfing manarune, but i dont know how to make exhaust, and if it will train mlvl...

Edit:
Whet i put doPlayerAddMana(cid, -80) it takes mana, doPlayerAddSpentMana(cid, 80) to train mlvl, but every time it sends this annoying You lose 80 mana...
And still no idea how make exhaust..
 
Last edited:
Example of Rage of the skies

Lua:
	<instant name="Rage of the Skies" words="exevo gran mas vis" lvl="55" mana="650" selftarget="1" prem="1" exhaustion="2000" needlearn="0" event="script" value="attack/rage of the skies.lua">
		<vocation name="Sorcerer"/>
		<vocation name="Master Sorcerer"/>
	</instant>

Exhaustion is in miliseconds, 2000 = 2 seconds.
 
I have the problem too...

see the spell for exura Gran mas res

Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 30)
setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat1, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 2.18, 120, 2.77, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 28)
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 2.08, 120, 2.77, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 28)
setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 2.08, 120, 2.77, 0)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 28)
setCombatParam(combat4, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 2.08, 120, 2.77, 0)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 29)
setCombatParam(combat5, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 2.08, 120, 2.77, 0)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, 29)
setCombatParam(combat6, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 2.08, 120, 2.77, 0)

arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
  
  
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)

local function onCastSpell1(parameters) 
doCombat(parameters.cid, parameters.combat1, parameters.var) 
end 
 
local function onCastSpell2(parameters) 
doCombat(parameters.cid, parameters.combat2, parameters.var) 
end 
 
local function onCastSpell3(parameters) 
doCombat(parameters.cid, parameters.combat3, parameters.var) 
end 
 
local function onCastSpell4(parameters) 
doCombat(parameters.cid, parameters.combat4, parameters.var) 
end 
 
local function onCastSpell5(parameters) 
doCombat(parameters.cid, parameters.combat5, parameters.var) 
end 
 
local function onCastSpell6(parameters) 
doCombat(parameters.cid, parameters.combat6, parameters.var) 
end 

 
function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6 } 
addEvent(onCastSpell1, 0, parameters) 
addEvent(onCastSpell2, 100, parameters) 
addEvent(onCastSpell3, 200, parameters)
addEvent(onCastSpell4, 300, parameters) 
addEvent(onCastSpell5, 400, parameters)
addEvent(onCastSpell6, 500, parameters)
end
 
Fix!!

Hi, sure, just change from :
PHP:
function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6 } 
addEvent(onCastSpell1, 0, parameters) 
addEvent(onCastSpell2, 100, parameters) 
addEvent(onCastSpell3, 200, parameters)
addEvent(onCastSpell4, 300, parameters) 
addEvent(onCastSpell5, 400, parameters)
addEvent(onCastSpell6, 500, parameters)
end
TO:
PHP:
}
function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6 } 
addEvent(onCastSpell1, 0, parameters) 
addEvent(onCastSpell2, 100, parameters) 
addEvent(onCastSpell3, 200, parameters)
addEvent(onCastSpell4, 300, parameters) 
addEvent(onCastSpell5, 400, parameters)
addEvent(onCastSpell6, 500, parameters)
return TRUE
end
 
Back
Top Bottom