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

Solved TFS 1.0 Spell

spyk3z

Theós:Undying
Joined
Jul 23, 2007
Messages
385
Reaction score
90
Location
Home.
Code:
local CircleArea = {
createCombatArea({
{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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 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, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}),
createCombatArea({
{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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 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, 0}
})
}

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat:setParameter(COMBAT_PARAM_USECHARGES, 1)

local area = CircleArea
combat:setArea(area)

function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end

I keep getting Area not found error.. Any pointers?
 
Code:
local area = CircleArea
Change CircleArea to createCombatArea with a table like you posted at the top.
 
Post the script.
You can also do something like this btw.
Code:
local area = CircleArea[1]

If you want to create more area effects that are displayed after eachother, create more combats.
 
How would I make the spell cycle through them? Addevent? Every time I mess with addevent my server crashes when the user dies.
 
Code:
local CircleArea = {
createCombatArea({
{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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0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_PHYSICALDAMAGE)
combat1:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat1:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat2 = Combat()
combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat2:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat3 = Combat()
combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat3:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat4 = Combat()
combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat4:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat5 = Combat()
combat5:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat5:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat5:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat6 = Combat()
combat6:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat6:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat6:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat7 = Combat()
combat7:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat7:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat7:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat8 = Combat()
combat8:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat8:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat8:setParameter(COMBAT_PARAM_USECHARGES, 1)

local area1 = CircleArea[1]
local area2 = CircleArea[2]
local area3 = CircleArea[3]
local area4 = CircleArea[4]
local area5 = CircleArea[5]
local area6 = CircleArea[6]
local area7 = CircleArea[7]
local area8 = CircleArea[8]
combat1:setArea(area1)
combat2:setArea(area2)
combat3:setArea(area3)
combat4:setArea(area4)
combat5:setArea(area5)
combat6:setArea(area6)
combat7:setArea(area7)
combat8:setArea(area8)

function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat5:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat6:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat7:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat8:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")


function onCastSpell(creature, var)
addEvent(combat1,200)
addEvent(combat2,200)
addEvent(combat3,200)
addEvent(combat4,200)
addEvent(combat5,200)
addEvent(combat6,200)
addEvent(combat7,200)
addEvent(combat8,200)
    return true
end
Driving me crazy.
 
You have to execute the combat like this
Code:
combat:execute(creature, var)
What you can do is create local functions to execute the combats then add these functions in addEvent with the parameters.
 
Code:
local function combat11(creature,var)
return combat1:execute(creature, var)
end
local function combat12(creature,var)
return combat2:execute(creature, var)
end
local function combat13(creature,var)
return combat3:execute(creature, var)
end
local function combat14(creature,var)
return combat4:execute(creature, var)
end
local function combat15(creature,var)
return combat5:execute(creature, var)
end
local function combat16(creature,var)
return combat6:execute(creature, var)
end
local function combat17(creature,var)
return combat7:execute(creature, var)
end
local function combat18(creature,var)
return combat8:execute(creature, var)
end

function onCastSpell(creature, var)
addEvent(combat11, 200)
addEvent(combat12, 200)
addEvent(combat13, 200)
addEvent(combat14, 200)
addEvent(combat15, 200)
addEvent(combat16, 200)
addEvent(combat17, 200)
addEvent(combat18, 200)
    return true
end
Something like that?
 
Add the parameters in the addEvent aswell, after the time.
Time 200 means it will execute the function after 0.2 seconds, so it will execute all functions after 0.2 seconds.
If there should be time between them, make the other higher, like 400, 600, 800, etc.
 
Getting
Lua Script Error: [Main interface]
in a timer event called from:
<unknown scriptfile>
attempt to index a number value
stack traceback:
[c]: a 0x011cd140
[c]: in function 'execute'
/data/spells/scripts/sorc.lua:178: in function sorc.lua:177


Code:
local CircleArea = {
createCombatArea({
{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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 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, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}),
createCombatArea({
{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, 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 0, 0, 0}
}),
createCombatArea({
{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, 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, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 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, 0}
})
}

local combat1 = Combat()
combat1:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat1:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat1:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat2 = Combat()
combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat2:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat3 = Combat()
combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat3:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat4 = Combat()
combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat4:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat5 = Combat()
combat5:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat5:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat5:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat6 = Combat()
combat6:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat6:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat6:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat7 = Combat()
combat7:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat7:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat7:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat8 = Combat()
combat8:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat8:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat8:setParameter(COMBAT_PARAM_USECHARGES, 1)

local area1 = CircleArea[1]
local area2 = CircleArea[2]
local area3 = CircleArea[3]
local area4 = CircleArea[4]
local area5 = CircleArea[5]
local area6 = CircleArea[6]
local area7 = CircleArea[7]
local area8 = CircleArea[8]
combat1:setArea(area1)
combat2:setArea(area2)
combat3:setArea(area3)
combat4:setArea(area4)
combat5:setArea(area5)
combat6:setArea(area6)
combat7:setArea(area7)
combat8:setArea(area8)

function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat5:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat6:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat7:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat8:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local function combat11(creature,var)
return combat1:execute(creature, var)
end
local function combat12(creature,var)
return combat2:execute(creature, var)
end
local function combat13(creature,var)
return combat3:execute(creature, var)
end
local function combat14(creature,var)
return combat4:execute(creature, var)
end
local function combat15(creature,var)
return combat5:execute(creature, var)
end
local function combat16(creature,var)
return combat6:execute(creature, var)
end
local function combat17(creature,var)
return combat7:execute(creature, var)
end
local function combat18(creature,var)
return combat8:execute(creature, var)
end

function onCastSpell(creature, var)
addEvent(combat11, creature, var, 200)
addEvent(combat12, creature, var, 200)
addEvent(combat13, creature, var, 200)
addEvent(combat14, creature, var, 200)
addEvent(combat15, creature, var, 200)
addEvent(combat16, creature, var, 200)
addEvent(combat17, creature, var, 200)
addEvent(combat18, creature, var, 200)
    return true
end
 
The function addEvent works line this
Code:
addEvent(functionname, time, parameters)
So add the time after the function name as second parameter, also change the other numbers, so it will be 200, next 400, next 600 etc.
 
Code:
local CircleArea = {
createCombatArea({
{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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 0, 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}
}),
createCombatArea({
{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, 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, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 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, 0}
})
}

local combat1 = Combat()
combat1:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat1:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat1:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat2 = Combat()
combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat2:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat3 = Combat()
combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat3:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat4 = Combat()
combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat4:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat5 = Combat()
combat5:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat5:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat5:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat6 = Combat()
combat6:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat6:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat6:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat7 = Combat()
combat7:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat7:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat7:setParameter(COMBAT_PARAM_USECHARGES, 1)
local combat8 = Combat()
combat8:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat8:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat8:setParameter(COMBAT_PARAM_USECHARGES, 1)

local area1 = CircleArea[1]
local area2 = CircleArea[2]
local area3 = CircleArea[3]
local area4 = CircleArea[4]
local area5 = CircleArea[5]
local area6 = CircleArea[6]
local area7 = CircleArea[7]
local area8 = CircleArea[8]
combat1:setArea(area1)
combat2:setArea(area2)
combat3:setArea(area3)
combat4:setArea(area4)
combat5:setArea(area5)
combat6:setArea(area6)
combat7:setArea(area7)
combat8:setArea(area8)

function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat5:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat6:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat7:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat8:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local function combat11(creature,var)
return combat1:execute(creature, var)
end
local function combat12(creature,var)
return combat2:execute(creature, var)
end
local function combat13(creature,var)
return combat3:execute(creature, var)
end
local function combat14(creature,var)
return combat4:execute(creature, var)
end
local function combat15(creature,var)
return combat5:execute(creature, var)
end
local function combat16(creature,var)
return combat6:execute(creature, var)
end
local function combat17(creature,var)
return combat7:execute(creature, var)
end
local function combat18(creature,var)
return combat8:execute(creature, var)
end

function onCastSpell(creature, var)
addEvent(combat11, 200, creature, var)
addEvent(combat12, 400, creature, var)
addEvent(combat13, 600, creature, var)
addEvent(combat14, 700, creature, var)
addEvent(combat15, 800, creature, var)
addEvent(combat16, 900, creature, var)
addEvent(combat17, 1000, creature, var)
addEvent(combat18, 1100, creature, var)
    return true
end
I F***ing love you.
 
Just noticed that it does no damage, and console says: warning callback loadcallback event ongetformulavalues not found.
 
Code:
function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat5:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat6:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat7:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat8:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

I don't see why that doesn't work.
 
You can do it like this.
Code:
function onGetFormulaValues(cid, skill, attack, factor)
     local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
     return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end

combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

Code:
function onGetFormulaValues(cid, skill, attack, factor)
     local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
     return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end

combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
Or give them different names.
 
Code:
function onGetFormulaValues(cid, skill, attack, factor)
    local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 5
    return -(((skillTotal * 0.10) + 4) + (levelTotal)), -(((skillTotal * 0.14) + 9) + (levelTotal))
end


combat1:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat5:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat6:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat7:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat8:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

I don't see why that doesn't work.
Yes I wondered the same thing myself. It seems that's how it is in TFS 1.0, because everyscript I have tried to make with multiple combats to read from same formula, I have had to make the formula over and over....
 
Back
Top