• 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+ magic effect not working on certain spells

ForgottenNot

Member
Joined
Feb 10, 2023
Messages
175
Reaction score
14
Certain spells like utani hur, utani gran hur, utevo gran lux utevo lux works. but are not sending any effect


Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 40000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
addCombatCondition(combat, condition)

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

utani hur spells. it's working but is not sending the magic effect when spell is being casted
i checked exevo pan that uses the same effect and it works.

so i did this but is not working. please lend me a hand with this
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
setConditionParam(condition, CONDITION_PARAM_TICKS, 40000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
addCombatCondition(combat, condition)

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
Post automatically merged:

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) << added that
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)


local condition = Condition(CONDITION_MANASHIELD)
condition:setParameter(CONDITION_PARAM_TICKS, 200000)
combat:addCondition(condition)

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
the effect is being sent but also other effect are being added like block hit effect and a black square
Post automatically merged:

solved

Lua:
function onCastSpell(creature, variant)
    player:getPosition():sendMagicEffect(xxxxx) <<< added this code in the spells that were not working
    return combat:execute(creature, variant)
end
 

Attachments

Last edited:
Back
Top