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

TFS 1.X+ Spells no damage

Forkz

Well-Known Member
Joined
Jun 29, 2020
Messages
380
Solutions
1
Reaction score
89
Hello,
I'm copying some spells from another server in the past, and there are some conditions that I'm not able to modify for 1x + tfs, if you have a soul willing to help me, follow the code below.

Lua:
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
    min = -(level * 15.3 + maglevel * 20.85)
    max = -(level * 18.0 + maglevel * 27.6)
    return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat1:setCondition(condition)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
    min = -(level * 15.3 + maglevel * 20.85)
    max = -(level * 18.0 + maglevel * 27.6)
    return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat2:setCondition(condition)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
    min = -(level * 15.3 + maglevel * 20.85)
    max = -(level * 18.0 + maglevel * 27.6)
    return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat3:setCondition(condition)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
    min = -(level * 15.3 + maglevel * 20.85)
    max = -(level * 18.0 + maglevel * 27.6)
    return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat4:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)

function onCastSpell(player, variant)
    if checkSpellCd(player, cooldown_id, time_in_seconds) == false then return false end
    return combat1:execute(player, variant)
end
 
@Forkz
Can u check this?
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat10, area1)
setCombatArea(combat20, area2)
setCombatArea(combat30, area3)
setCombatArea(combat40, area4)

arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end

I dont 100% sure to this.
 
@Forkz
Can u check this?
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat10, area1)
setCombatArea(combat20, area2)
setCombatArea(combat30, area3)
setCombatArea(combat40, area4)

arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end

I dont 100% sure to this.
Work bro, thanks.
Post automatically merged:

@Forkz
Can u check this?
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat10, area1)
setCombatArea(combat20, area2)
setCombatArea(combat30, area3)
setCombatArea(combat40, area4)

arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end

I dont 100% sure to this.
LOL

otland.png
 
Last edited:
Add ' , '
arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
},
for areas 1,2,3
check it


If not work u can check other idea
arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}
for areas 1,2,3,4
check it, i dont have any tfs on disk now.


It error call to area table.
 
Add ' , '
arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
},
for areas 1,2,3
check it
otland.png

Lua:
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat10, area1)
setCombatArea(combat20, area2)
setCombatArea(combat30, area3)
setCombatArea(combat40, area4)

arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
},

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
},

arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
},

arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
 
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
setCombatArea(combat10, area1)
arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area2 = createCombatArea(arr2)
setCombatArea(combat20, area2)
arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area3 = createCombatArea(arr3)
setCombatArea(combat30, area3)
arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area4 = createCombatArea(arr4)
setCombatArea(combat40, area4)
arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
Sorry i edit it for better read.
 
local time_in_seconds = 1 -- in seconds
local cooldown_id = 9004

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 15.3 + maglevel * 20.85)
max = -(level * 18.0 + maglevel * 27.6)
return min, max
end

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area1 = createCombatArea(arr1)
setCombatArea(combat10, area1)
arr1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area2 = createCombatArea(arr2)
setCombatArea(combat20, area2)
arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area3 = createCombatArea(arr3)
setCombatArea(combat30, area3)
arr3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area4 = createCombatArea(arr4)
setCombatArea(combat40, area4)
arr4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
Sorry i edit it for better read.
otland.png
Post automatically merged:

@ROKI721 regarding the private scriptotland.png
 
Last edited:
OMG, man i dont use tfs 1.2 anyone.
But waiting for more help of other members otland u can use script from my first answer.
Sorry, can u rem best answer? If not, your thead been solved on list problems.
 
OMG, man i dont use tfs 1.2 anyone.
But waiting for more help of other members otland u can use script from my first answer.
Sorry, can u rem best answer? If not, your thead been solved on list problems.
ok, let's wait for someone else in the community to help. Thank you @ROKI721
 
I have idea, u can check this code? Its my end of all ideas today.
local combat10 = Combat10()
combat10:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat10:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat20 = Combat20()
combat20:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat20:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat30 = Combat30()
combat30:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat30:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local local min = (level * 15.3 + maglevel * 20.85)
local local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat40 = Combat40()
combat40:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat40:setCombatParam(COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

combat:setArea(createCombatArea(
ar1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

))
combat10:setCombatArea(ar1)
combat20:setCombatArea(ar2)
combat30:setCombatArea(ar3)
combat40:setCombatArea(ar4)

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)


combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
 
I have idea, u can check this code? Its my end of all ideas today.
local combat10 = Combat10()
combat10:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat10:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat20 = Combat20()
combat20:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat20:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat30 = Combat30()
combat30:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat30:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local local min = (level * 15.3 + maglevel * 20.85)
local local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat40 = Combat40()
combat40:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat40:setCombatParam(COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

combat:setArea(createCombatArea(
ar1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

))
combat10:setCombatArea(ar1)
combat20:setCombatArea(ar2)
combat30:setCombatArea(ar3)
combat40:setCombatArea(ar4)

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)


combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
in my spells you should repeat this line each time you repeat the function getformulavalues.
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

and by changing it to for example onGetFormulaValues1.. full script example too
Lua:
local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local acombat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 18)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 12)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 39)
 
arr1 = {
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 1, 1, 1, 3, 1, 1, 1, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0}
}
 
arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
}

arr3 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
setCombatArea(acombat3, area3)
 
function onTargetTile(cid, pos)
    doCombat(cid,combat1,positionToVariant(pos))
end
 
function onTargetTile2(cid, pos)
    doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
    doCombat(cid,combat3,positionToVariant(pos))
end
 
setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")

local function onCastSpell1(parameters)
    doCombat(parameters.cid, acombat1, parameters.var)
end
 
local function onCastSpell2(parameters)
    doCombat(parameters.cid, acombat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, acombat3, parameters.var)
end

function onGetFormulaValues1(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*11700) +level/2 +960000
max = (maglevel*12000) +level/2 +990000
 
return -min, -max
end

function onGetFormulaValues2(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*5850) +level/2 +480000
max = (maglevel*6000) +level/2 +495000
 
return -min, -max
end

function onGetFormulaValues3(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*5850) +level/2 +480000
max = (maglevel*6000) +level/2 +495000
 
return -min, -max
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues1")
setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues2")
setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues3")

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 115, parameters)
addEvent(onCastSpell3, 130, parameters)
return true
end
 
I have idea, u can check this code? Its my end of all ideas today.
local combat10 = Combat10()
combat10:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat10:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat20 = Combat20()
combat20:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat20:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat30 = Combat30()
combat30:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat30:setCombatParam(COMBAT_PARAM_EFFECT, 3)
function onGetFormulaValues(player, level, maglevel)
local local min = (level * 15.3 + maglevel * 20.85)
local local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

local combat40 = Combat40()
combat40:setCombatParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat40:setCombatParam(COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(player, level, maglevel)
local min = (level * 15.3 + maglevel * 20.85)
local max = (level * 18.0 + maglevel * 27.6)
return -min, -max
end

combat:setArea(createCombatArea(
ar1 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar3 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

ar4 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

))
combat10:setCombatArea(ar1)
combat20:setCombatArea(ar2)
combat30:setCombatArea(ar3)
combat40:setCombatArea(ar4)

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-0.9, 0, -0.9, 0)
combat10:setCondition(condition)
combat20:setCondition(condition)
combat30:setCondition(condition)
combat40:setCondition(condition)


combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(player, variant)
if checkSpellCd(player, cooldown_id, time_in_seconds) == false
then
return false
end
return combat10:execute(player, variant)
end
otland.png
 
in my spells you should repeat this line each time you repeat the function getformulavalues.
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

and by changing it to for example onGetFormulaValues1.. full script example too
Lua:
local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local acombat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 18)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 12)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 39)

arr1 = {
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 1, 1, 1, 3, 1, 1, 1, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 1, 0, 0, 0, 1},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0}
}

arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
}

arr3 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 1, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
setCombatArea(acombat3, area3)

function onTargetTile(cid, pos)
    doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
    doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
    doCombat(cid,combat3,positionToVariant(pos))
end

setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")

local function onCastSpell1(parameters)
    doCombat(parameters.cid, acombat1, parameters.var)
end

local function onCastSpell2(parameters)
    doCombat(parameters.cid, acombat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, acombat3, parameters.var)
end

function onGetFormulaValues1(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*11700) +level/2 +960000
max = (maglevel*12000) +level/2 +990000

return -min, -max
end

function onGetFormulaValues2(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*5850) +level/2 +480000
max = (maglevel*6000) +level/2 +495000

return -min, -max
end

function onGetFormulaValues3(player, level, maglevel)
local maglevel = player:getMagicLevel()
local level = player:getLevel()
min = (maglevel*5850) +level/2 +480000
max = (maglevel*6000) +level/2 +495000

return -min, -max
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues1")
setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues2")
setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues3")

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 115, parameters)
addEvent(onCastSpell3, 130, parameters)
return true
end
working...

otland.png
 
Lua:
local time_in_seconds = 1 -- in seconds

local cooldown_id = 9004



local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat20 = createCombatObject()

setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat30 = createCombatObject()

setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat40 = createCombatObject()

setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local condition = Condition(CONDITION_PARALYZE)

condition:setParameter(CONDITION_PARAM_TICKS, 20000)

condition:setFormula(-0.9, 0, -0.9, 0)

combat10:setCondition(condition)

combat20:setCondition(condition)

combat30:setCondition(condition)

combat40:setCondition(condition)



setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")



local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

local area3 = createCombatArea(arr3)

local area4 = createCombatArea(arr4)

setCombatArea(combat10, area1)

setCombatArea(combat20, area2)

setCombatArea(combat30, area3)

setCombatArea(combat40, area4)



arr1 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr2 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr3 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr4 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



function onCastSpell(player, variant)

if checkSpellCd(player, cooldown_id, time_in_seconds) == false

then

return false

end

return combat10:execute(player, variant)

end

synatx issue
 
Lua:
local time_in_seconds = 1 -- in seconds

local cooldown_id = 9004



local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat20 = createCombatObject()

setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat20, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat30 = createCombatObject()

setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat30, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local combat40 = createCombatObject()

setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat40, COMBAT_PARAM_EFFECT, 3)

function onGetFormulaValues(cid, level, maglevel)

min = -(level * 15.3 + maglevel * 20.85)

max = -(level * 18.0 + maglevel * 27.6)

return min, max

end



local condition = Condition(CONDITION_PARALYZE)

condition:setParameter(CONDITION_PARAM_TICKS, 20000)

condition:setFormula(-0.9, 0, -0.9, 0)

combat10:setCondition(condition)

combat20:setCondition(condition)

combat30:setCondition(condition)

combat40:setCondition(condition)



setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")



local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

local area3 = createCombatArea(arr3)

local area4 = createCombatArea(arr4)

setCombatArea(combat10, area1)

setCombatArea(combat20, area2)

setCombatArea(combat30, area3)

setCombatArea(combat40, area4)



arr1 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr2 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr3 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



arr4 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}



function onCastSpell(player, variant)

if checkSpellCd(player, cooldown_id, time_in_seconds) == false

then

return false

end

return combat10:execute(player, variant)

end

synatx issue
otland.png
 
Back
Top