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

C++ How to remove text from addHealth() TFS 1.3

poe6man3

Member
Joined
Aug 6, 2020
Messages
87
Solutions
1
Reaction score
12
Lua:
local condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_DEFAULT)
condition:setParameter(CONDITION_PARAM_SKILL_TAIJUTSU, 5)
condition:setParameter(CONDITION_PARAM_SUBID, 100)
condition:setTicks(-1)

local function resourceCheck(creature_id, reqChakra)
    local temp_creature = Creature(creature_id)
    if not temp_creature or temp_creature:isRemoved() then
        return
    end
   
    local currentChakra = temp_creature:getMana()
    local playerPos = temp_creature:getPosition()
   
    if currentChakra >= reqChakra then
        Game.sendAnimatedText(-reqChakra, playerPos, 4)
        temp_creature:addMana(-reqChakra, false)
        spellEvents[creature_id] = addEvent(resourceCheck, 1000, creature_id, reqChakra)
    elseif currentChakra < reqChakra then
        Game.sendAnimatedText(-reqChakra, playerPos, 180)
        temp_creature:addHealth(-reqChakra)
        spellEvents[creature_id] = addEvent(resourceCheck, 1000, creature_id, reqChakra)
    else
        if temp_creature:getCondition(CONDITION_ATTRIBUTES, CONDITIONID_DEFAULT, 100) then
            temp_creature:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_DEFAULT, 100)
        end
        stopEvent(spellEvents[creature_id])
    end
   
end

function onCastSpell(creature, variant)
   
    if spellEvents[creature_id] then
        stopEvent(spellEvents[creature_id])
    end
   
    creature:addCondition(condition)
   
    local creature_id = creature:getId()
    local reqChakra = 10
   
    spellEvents[creature_id] = addEvent(resourceCheck, 1000, creature_id, reqChakra)
end

Could anybody tell me how to remove that black text showed on the gif i checked the src but i just dont see it

C++:
int LuaScriptInterface::luaCreatureAddHealth(lua_State* L)
{
    // creature:addHealth(healthChange)
    Creature* creature = getUserdata<Creature>(L, 1);
    if (!creature) {
        lua_pushnil(L);
        return 1;
    }

    CombatDamage damage;
    damage.primary.value = getNumber<int32_t>(L, 2);
    if (damage.primary.value >= 0) {
        damage.primary.type = COMBAT_HEALING;
    } else {
        damage.primary.type = COMBAT_UNDEFINEDDAMAGE;
    }
    pushBoolean(L, g_game.combatChangeHealth(nullptr, creature, damage));
    return 1;
}
https://i.gyazo.com/dd698df62f051d5e7d85f71e948f92bf.mp4
 
Back
Top