• 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+ tfs 1.5 nekiro 7.72 problem with ring swap/eating while walking

Hbraveq

Active Member
Joined
Nov 11, 2012
Messages
167
Reaction score
39
Hello guys, as I wrote, I have problem with f.e. equip energy ring while walking without "stop", same with eating etc. Any ideas?
 
on cipsoft client, probably it can be solved only with dll injection
im using OTC
i saw somehing like this, but its not it...
I believe @henkas asked about possibility of moving items after the player's walk is completed, like when you try to move them from distance.
The problem is that "onWalkComplete" function activates only the "addEvent walkTask. It doesn't have an access to normal player walking, so it is possible to move and use items on the ground while walking, what is weird. Needs source edit.
C++:
void Player::onWalkComplete()
{
    if (walkTask) {
        walkTaskEvent = g_scheduler.addEvent(walkTask);
        walkTask = nullptr;
    }
}

To do it add
C++:
bool isPlayerWalking = false;
in Player class and set it in whereever you want.
 
player.cpp

C++:
void Player::onWalk(Direction& dir)
{
    Creature::onWalk(dir);
    setNextActionTask(nullptr);
    //setNextAction(OTSYS_TIME() + getStepDuration(dir));
}
what exacly do you mean bro?
this is my part of player.cpp
what should I do? :)

Lua:
void Player::onWalk(Direction& dir)
{
    Creature::onWalk(dir);
    setNextActionTask(nullptr);
    setNextAction(OTSYS_TIME() + getStepDuration(dir));
}
 
what exacly do you mean bro?
this is my part of player.cpp
what should I do? :)

Lua:
void Player::onWalk(Direction& dir)
{
    Creature::onWalk(dir);
    setNextActionTask(nullptr);
    setNextAction(OTSYS_TIME() + getStepDuration(dir));
}
if my code is different from yours, what u think u should do?
 
Back
Top