I've been trying countless times to fix the issue with the summon spells (executed by players) in where they first have to get close to the target/hit them in order for the spell to work perfectly.
So here what happens:
1. Player executes target spell to make summons attack (NO DAMAGE)
2. Summons attack nearby target
3. Player executes target spell again to make summons attack, this time the damage is there
I really do not know what is wrong other than thinking that something has to be updated within the source code but it could also be something small I have missed in LUA.
My tfs is 1.0, I would appreciate any help
I just want the damage to be there when they first attack the target, no matter the distance |:
So here what happens:
1. Player executes target spell to make summons attack (NO DAMAGE)
2. Summons attack nearby target
3. Player executes target spell again to make summons attack, this time the damage is there
I really do not know what is wrong other than thinking that something has to be updated within the source code but it could also be something small I have missed in LUA.
XML:
<instant name="test" words="test" lvl="0" mana="0" prem="0" needtarget="1" exhaustion="2000" needlearn="0" script="test.lua">
<vocation name="Royal Paladin"/>
</instant>
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 29)
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 2.4) + 7
local max = (level / 5) + (maglevel * 4) + 12
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
local player = Player(creature)
local summons = player:getSummons()
for i = 1, #summons do
combat:execute(summons[i], var)
end
return true
end
My tfs is 1.0, I would appreciate any help
I just want the damage to be there when they first attack the target, no matter the distance |:
Last edited: