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

Problem with utito tempo condition condition_strengthened

Jeyci

Banned User
Joined
May 6, 2023
Messages
289
Solutions
3
Reaction score
36
hI I USE TFS 8.6 1.5 and clientv8. have an strange problem with this spell utito tempo and utito tempo san should sent two conditions into the inventory windows, paralyze + condition_strengthened, the problem is that the scond condition is not being displayed in the inventory windows in spite I checked my otc
which i think is this
Lua:
local condition = Condition(CONDITION_ATTRIBUTES)
this is the whole script
Code:
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)

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

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 33000)
condition:setFormula(0.3, -24, 0.3, -24)
combat:addCondition(condition)

--function onCastSpell(creature, variant) return combat:execute(creature, variant) end
function onCastSpell(creature, variant)
    creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) --<<< added this code in the spells that were not working
    return combat:execute(creature, variant)
end
inventory lua
Code:
Icons = {}
Icons[PlayerStates.Poison] = { tooltip = tr('You are poisoned'), path = '/images/game/states/poisoned', id = 'condition_poisoned' }
Icons[PlayerStates.Burn] = { tooltip = tr('You are burning'), path = '/images/game/states/burning', id = 'condition_burning' }
Icons[PlayerStates.Energy] = { tooltip = tr('You are electrified'), path = '/images/game/states/electrified', id = 'condition_electrified' }
Icons[PlayerStates.Drunk] = { tooltip = tr('You are drunk'), path = '/images/game/states/drunk', id = 'condition_drunk' }
Icons[PlayerStates.ManaShield] = { tooltip = tr('You are protected by a magic shield'), path = '/images/game/states/magic_shield', id = 'condition_magic_shield' }
Icons[PlayerStates.Paralyze] = { tooltip = tr('You are paralysed'), path = '/images/game/states/slowed', id = 'condition_slowed' }
Icons[PlayerStates.Haste] = { tooltip = tr('You are hasted'), path = '/images/game/states/haste', id = 'condition_haste' }
Icons[PlayerStates.Swords] = { tooltip = tr('You may not logout during a fight'), path = '/images/game/states/logout_block', id = 'condition_logout_block' }
Icons[PlayerStates.Drowning] = { tooltip = tr('You are drowning'), path = '/images/game/states/drowning', id = 'condition_drowning' }
Icons[PlayerStates.Freezing] = { tooltip = tr('You are freezing'), path = '/images/game/states/freezing', id = 'condition_freezing' }
Icons[PlayerStates.Dazzled] = { tooltip = tr('You are dazzled'), path = '/images/game/states/dazzled', id = 'condition_dazzled' }
Icons[PlayerStates.Cursed] = { tooltip = tr('You are cursed'), path = '/images/game/states/cursed', id = 'condition_cursed' }
Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }
-- Icons[PlayerStates.PzBlock] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/images/game/states/protection_zone_block', id = 'condition_protection_zone_block' }
Icons[PlayerStates.Pz] = { tooltip = tr('You are within a protection zone'), path = '/images/game/states/protection_zone', id = 'condition_protection_zone' }
Icons[PlayerStates.Bleeding] = { tooltip = tr('You are bleeding'), path = '/images/game/states/bleeding', id = 'condition_bleeding' }
Icons[PlayerStates.Hungry] = { tooltip = tr('You are hungry'), path = '/images/game/states/hungry', id = 'condition_hungry' }

SkullIcons = {}
SkullIcons[SkullYellow] = { tooltip = tr(''), path = '/images/game/states/skull_yellow', id = 'skullIcon' }
SkullIcons[SkullGreen] = { tooltip = tr('You are a member of a party'), path = '/images/game/states/skull_green', id = 'skullIcon' }
SkullIcons[SkullWhite] = { tooltip = tr('You have attacked an unmarked player'), path = '/images/game/states/skull_white', id = 'skullIcon' }
SkullIcons[SkullRed] = { tooltip = tr('You have killed too many unmarked players'), path = '/images/game/states/skull_red', id = 'skullIcon' }
SkullIcons[SkullBlack] = { tooltip = tr('You have killed too many unmarked players'), path = '/images/game/states/skull_black', id = 'skullIcon' }

health info lua
Code:
Icons = {}
Icons[PlayerStates.Poison] = { tooltip = tr('You are poisoned'), path = '/images/game/states/poisoned', id = 'condition_poisoned' }
Icons[PlayerStates.Burn] = { tooltip = tr('You are burning'), path = '/images/game/states/burning', id = 'condition_burning' }
Icons[PlayerStates.Energy] = { tooltip = tr('You are electrified'), path = '/images/game/states/electrified', id = 'condition_electrified' }
Icons[PlayerStates.Drunk] = { tooltip = tr('You are drunk'), path = '/images/game/states/drunk', id = 'condition_drunk' }
Icons[PlayerStates.ManaShield] = { tooltip = tr('You are protected by a magic shield'), path = '/images/game/states/magic_shield', id = 'condition_magic_shield' }
Icons[PlayerStates.Paralyze] = { tooltip = tr('You are paralysed'), path = '/images/game/states/slowed', id = 'condition_slowed' }
Icons[PlayerStates.Haste] = { tooltip = tr('You are hasted'), path = '/images/game/states/haste', id = 'condition_haste' }
Icons[PlayerStates.Swords] = { tooltip = tr('You may not logout during a fight'), path = '/images/game/states/logout_block', id = 'condition_logout_block' }
Icons[PlayerStates.Drowning] = { tooltip = tr('You are drowning'), path = '/images/game/states/drowning', id = 'condition_drowning' }
Icons[PlayerStates.Freezing] = { tooltip = tr('You are freezing'), path = '/images/game/states/freezing', id = 'condition_freezing' }
Icons[PlayerStates.Dazzled] = { tooltip = tr('You are dazzled'), path = '/images/game/states/dazzled', id = 'condition_dazzled' }
Icons[PlayerStates.Cursed] = { tooltip = tr('You are cursed'), path = '/images/game/states/cursed', id = 'condition_cursed' }
Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }
Icons[PlayerStates.PzBlock] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/images/game/states/protection_zone_block', id = 'condition_protection_zone_block' }
Icons[PlayerStates.Pz] = { tooltip = tr('You are within a protection zone'), path = '/images/game/states/protection_zone', id = 'condition_protection_zone' }
Icons[PlayerStates.Bleeding] = { tooltip = tr('You are bleeding'), path = '/images/game/states/bleeding', id = 'condition_bleeding' }
Icons[PlayerStates.Hungry] = { tooltip = tr('You are hungry'), path = '/images/game/states/hungry', id = 'condition_hungry' }
Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }

Lua:
Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened'
and i have added condition_ATTRIBUTES to my source files
 
I don't understand why you put this 'utito tempo' script or something like that... When you use a spell and gain a skill increase and still get paralyzed? Or were you trying to add some paralysis protection?

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

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

local conditionParalyze = Condition(CONDITION_PARALYZE)
conditionParalyze:setParameter(CONDITION_PARAM_TICKS, 33000)
conditionParalyze:setFormula(0.5, -24, 0.3, -24)
combat:addCondition(conditionParalyze)

function onCastSpell(creature, variant)
    creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    return combat:execute(creature, variant)
end
 
Last edited:
this icon
Lua:
local conditionAttributes = Condition(CONDITION_ATTRI
is no appearing in my otclient. in spite that i have the icon code in my sources
 
no i did not but i tested now and only the paralyzed icon is appearing not the other one
 
Lua:
PlayerStates = {
  None = 0,
  Poison = 1,
  Burn = 2,
  Energy = 4,
  Drunk = 8,
  ManaShield = 16,
  Paralyze = 32,
  Haste = 64,
  Swords = 128,
  Drowning = 256,
  Freezing = 512,
  Dazzled = 1024,
  Cursed = 2048,
  PartyBuff = 4096,
  Regeneration = 4096,
  PzBlock = 8192,
  Pz = 16384,
  Bleeding = 32768,
  Hungry = 65536
}
added this is in gamelib/player.lua
Code:
  Regeneration = 4096,
game_topbar/topbar.lua
Git:
Icons[PlayerStates.Regeneration] = {
    tooltip = tr('You are strengthened'),
    path = '/images/game/states/strengthened',
    id = 'condition_strengthened'
}

Code:
Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }
Icons[PlayerStates.Regeneration] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }

game_healthinfo/game_healthinfo.lua
Code:
+Icons[PlayerStates.Regeneration] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }

copied the code form party buff
the utura or regenetarion icon still won't appear on inventory, ideas?

tried with this (utura)
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local conditionRegeneration = Condition(CONDITION_REGENERATION)
conditionRegeneration:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
conditionRegeneration:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
conditionRegeneration:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
conditionRegeneration:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(conditionRegeneration)



combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

spell does works but does not show the icon nor the gain health ticks animation
 
Last edited:
tested with main client and it seems to be that there's does not work either how is called the function
Lua:
conditionRegeneration
or
Code:
conditionAttributes
they are differente conditions ?
 
The difference is in the way the variables are named:

local condition = Condition(CONDITION_ATTRIBUTES) creates a variable named condition that refers to a condition of type CONDITION_ATTRIBUTES.
local conditionAttributes = Condition(CONDITION_ATTRIBUTES) creates a variable called conditionAttributes that also refers to a condition of type CONDITION_ATTRIBUTES.

If you want to create another condition variable, like condition2, you can do it like this:

local condition2 = Condition(CONDITION_REGENERATION)

This way you will have a second condition variable called condition2 which also refers to a condition of type CONDITION_REGENERATION. You can create as many condition variables as you want, just name them uniquely so you can differentiate them in your code.


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

local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition)

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

If you want to add one more condition, you need to create something like this

modified and new conidition:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition)

local condition2 = Condition(CONDITION_REGENERATION)
condition2:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition2:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition2)

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

Perhaps your OTClient has a bug. Have you tested it with another OTClient? I tested it and it's normal, displaying the spell icons.
 
Last edited:
The difference is in the way the variables are named:

local condition = Condition(CONDITION_ATTRIBUTES) creates a variable named condition that refers to a condition of type CONDITION_ATTRIBUTES.
local conditionAttributes = Condition(CONDITION_ATTRIBUTES) creates a variable called conditionAttributes that also refers to a condition of type CONDITION_ATTRIBUTES.

If you want to create another condition variable, like condition2, you can do it like this:

local condition2 = Condition(CONDITION_REGENERATION)

This way you will have a second condition variable called condition2 which also refers to a condition of type CONDITION_REGENERATION. You can create as many condition variables as you want, just name them uniquely so you can differentiate them in your code.



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

local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition)

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

If you want to add one more condition, you need to create something like this


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

local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition)

local condition2 = Condition(CONDITION_REGENERATION)
condition2:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
condition2:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition2)

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

Perhaps your OTClient has a bug. Have you tested it with another OTClient? I tested it and it's normal, displaying the spell icons.
which version you use? i have the same problem as jeyci i use 860
 
Simply use a single combat and add the two conditions to the same combat:

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)

local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 33000)
condition:setFormula(0.3, -24, 0.3, -24)
combat:addCondition(condition)

--function onCastSpell(creature, variant) return combat:execute(creature, variant) end
function onCastSpell(creature, variant)
    creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) --<<< added this code in the spells that were not working
    return combat:execute(creature, variant)
end
 
don't get this icon in client
Lua:
local condition = Condition(CONDITION_ATTRIBUTES)
 
solved it was an issue related to server source+ re-added the code and works now
thanks to everyone who tried and helped me
1.png

had to edit these files
11.png
 
Back
Top