• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Aditional exhaust potions

yoiker

Member
Joined
Jan 21, 2012
Messages
194
Solutions
1
Reaction score
9
Hi guys! I would like to know how I can remove the extra exhausted that I have to run and can not use fluids ( potions ) . Anyone know how I remove that?
Sorry for my bad English...
 
you can edit this in your source.

You can use rune and attack same time

player.cpp

Code:
 elseif((!weapon->hasExhaustion()||!hasCondition(CONDITION_EXHAUST, EXHAUST_COMBAT))&& weapon->useWeapon(this, tool, attackedCreature))

to

Code:
              elseif(!weapon->hasExhaustion()&& weapon->useWeapon(this, tool, attackedCreature))

or only use rune while running
remove this: player.cpp

Code:
   setNextAction(OTSYS_TIME()+ getStepDuration(dir));
 
you can edit this in your source.

You can use rune and attack same time

player.cpp

Code:
 elseif((!weapon->hasExhaustion()||!hasCondition(CONDITION_EXHAUST, EXHAUST_COMBAT))&& weapon->useWeapon(this, tool, attackedCreature))

to

Code:
              elseif(!weapon->hasExhaustion()&& weapon->useWeapon(this, tool, attackedCreature))


I removed the line and it worked now use fluids while running but I would like to change the other without appearing exhausted because I like and I need change for the paladins.

Here's how I get myself in player.cpp if you can remove the interruptSwing to tfs 1.2

player.cpp

Code:
void Player::doAttacking(uint32_t)
{
    if (lastAttack == 0) {
        lastAttack = OTSYS_TIME() - getAttackSpeed() - 1;
    }

    if (hasCondition(CONDITION_PACIFIED)) {
        return;
    }

    if ((OTSYS_TIME() - lastAttack) >= getAttackSpeed()) {
        bool result = false;

        Item* tool = getWeapon();
        const Weapon* weapon = g_weapons->getWeapon(tool);
        if (weapon) {
            if (!weapon->interruptSwing()) {
                result = weapon->useWeapon(this, tool, attackedCreature);
            } else if (!canDoAction()) {
                uint32_t delay = getNextActionTime();
                SchedulerTask* task = createSchedulerTask(delay, std::bind(&Game::checkCreatureAttack,
                                     &g_game, getID()));
                setNextActionTask(task);
            } else {
                result = weapon->useWeapon(this, tool, attackedCreature);
            }
        } else {
            result = Weapon::useFist(this, attackedCreature);
        }

        if (result) {
            lastAttack = OTSYS_TIME();
        }
    }
}
 
Last edited:
Back
Top