• 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+ Odd TFS 1.3 issue - utito tempo

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
177
Location
Sweden
An odd issue has shown on my TFS 1.3 and I cant figure out where it comes from.

Using utito tempo with this code:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 135)
condition:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition)

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
Does not do anything beside showing the text "utito tempo" on casting and it does actually print in the script so it does call right files and no errors are showing up.
However if i set
Lua:
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
to -1 it somewhat works besides that it calculates the melee percent without the bonus stats from other systems/berserker potion etc and therefor set the melee back instead. (It takes 10 * 135% = 13, instead of 40 * 135 which is my true stat with all bonuses.)

Anyone have a fix for this? or any idea on how to point me in the right direction?

Edit: same thing with utito tempo san
 
Last edited:
Solution
E
maybe try using CONDITION_PARAM_SUBID

for example:
Maybe try this:

Replace:

Lua:
condition:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true)
to
Lua:
condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100)

and for utito tempo san:
replace;
Lua:
skill:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true)
to
Lua:
skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100)
 
Maybe try this:

Replace:

Lua:
condition:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true)
to
Lua:
condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100)

and for utito tempo san:
replace;
Lua:
skill:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true)
to
Lua:
skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100)
The issue was that I'm using addconditions on login already so it somehow occupies the utito tempo/utito tempo san. When i removed the addcondition from onlogin utito tempo works but I have no clue why.
 
maybe try using CONDITION_PARAM_SUBID

for example:
 
Solution
maybe try using CONDITION_PARAM_SUBID

for example:
And once again, thanks Evil Puncker for saving my arsehole. :)
 
Back
Top