hellboy
Intermediate OT User
I tried do sth like this:
When player don't have any infight condition then script should print in console "Remove condition" and remove it. But it only print string, nothing less, nothing more.
It's possible to damage player without creating (or prolong) INFIGHT condition?
Or sombody know how fix first part of my workaround?
Or if there no better solution, use combat dispell like there https://github.com/otland/forgottenserver/blob/master/data/spells/scripts/healing/cure burning.lua ?
##EDIT##
Dispell don't work too
Code:
function doDmg(player)
local conditionInFightBeforeHungerDmg = player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
doTargetCombatHealth(0, player, COMBAT_UNDEFINEDDAMAGE, -hunger.dmgAmount, -hunger.dmgAmount, CONST_ME_NONE)
--- doSendAnimatedText(getCreaturePosition(cid), dmgAmount, TEXTCOLOR_RED)
if conditionInFightBeforeHungerDmg == nil then
print('Remove condition')
player:removeCondition(CONDITION_INFIGHT)
else
--- IN FUTURE change infight time to value before target combat dmg
print(math.floor(conditionInFightBeforeHungerDmg:getTicks() / 1000))
end
--- player:removeCondition()
--- player:addCondition()
return true
end
When player don't have any infight condition then script should print in console "Remove condition" and remove it. But it only print string, nothing less, nothing more.
It's possible to damage player without creating (or prolong) INFIGHT condition?
Or sombody know how fix first part of my workaround?
Or if there no better solution, use combat dispell like there https://github.com/otland/forgottenserver/blob/master/data/spells/scripts/healing/cure burning.lua ?
##EDIT##
Dispell don't work too
Last edited: