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

spell

Doomdice

The N00betarian
Joined
Jul 20, 2009
Messages
658
Reaction score
108
Location
Indiana
is there anyway I can make this hit 2 times tfs 1.2 a copy from berserk spell

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
combat:setParameter(COMBAT_PARAM_USECHARGES, 1)
combat:setArea(createCombatArea(AREA_SQUARE1X1))

function onGetFormulaValues(player, skill, attack, factor)
local skillTotal = skill * attack
local levelTotal = player:getLevel() / 5
return -(((skillTotal * 0.3) + 7) + (levelTotal)), -(((skillTotal * 0.5) + 11) + (levelTotal))
end

combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
return combat:execute(creature, var)
end
 
not tested
Code:
local amount = 2
local combat = {}
for i = 1, amount do
    combat[i] = Combat()
    combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
    combat[i]:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
    combat[i]:setParameter(COMBAT_PARAM_USECHARGES, 1)
    combat[i]:setArea(createCombatArea(AREA_SQUARE1X1))
end
function onGetFormulaValues(player, skill, attack, factor)
    local skillTotal = skill * attack
    local levelTotal = player:getLevel() / 5
    return -(((skillTotal * 0.3) + 7) + (levelTotal)), -(((skillTotal * 0.5) + 11) + (levelTotal))
end

combat[1]:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
combat[2]:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local function callCombat(creature, var)
    for x = 1, #combat do
        combat[x]:execute(creature, var)  
    end
    return unpack(combat)
end

function onCastSpell(creature, var)
    return callCombat(creature, var)
end
 
Last edited:
Back
Top