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

(Request) Fast attack ( TFS 0.4 )

Marko999x

ArchezOt soon
Premium User
Joined
Dec 14, 2017
Messages
3,974
Solutions
104
Reaction score
3,108
Location
Germany
hey Otland I need quick your help..
What do I have to edit to have perma fast attack? As explain 100MS it should be always fast even if I stand
I know I can just edit the vocation.xml but the problem is, you have to move to ( active ) the fast attack otherwise its not working as I want..
( Created the thread bcus I havent found any useful thread about it )
kind regards, AngelOt
 
Code:
SchedulerTask* task = createSchedulerTask(std::max<uint32_t>(SCHEDULER_MINTICKS, delay), std::bind(&Game::checkCreatureAttack, &g_game, getID()));

What is your MINTICKS set to in scheduler.h?
#define SCHEDULER_MINTICKS 50
 
Are you doing a clean build man? I made these changes and it seemed to work.

Compile from scratch.

make clean
make -j ~

or delete your .o files.
 
Last edited:
Are you doing a clean build man? I made these changes and it seemed to work.

Compile from scratch.

make clean
make -j ~

or delete your .o files.

Yes mate I did a clean build. I changed the thing in creature.h to

#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50
#define EVENT_CHECK_CREATURE_INTERVAL (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT)

compiled, made attack speed to 50 in vocations.xml but its still slow
 
Yes mate I did a clean build. I changed the thing in creature.h to

#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50
#define EVENT_CHECK_CREATURE_INTERVAL (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT)

compiled, made attack speed to 50 in vocations.xml but its still slow

My fault, compiled again and it works now wtf i have no idea why it didnt work befor, thanks guys
 
Yes mate I did a clean build. I changed the thing in creature.h to

#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50
#define EVENT_CHECK_CREATURE_INTERVAL (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT)

compiled, made attack speed to 50 in vocations.xml but its still slow
Hmm.. Okay, heres where to go next..

check this classic speed variable maybe thats it?
bool classicSpeed = g_config.getBoolean(ConfigManager::CLASSIC_ATTACK_SPEED);

Make sure that getAttackSpeed is correct when being called?

Slap some printf's in your code and start printing to see whats going on.
 
My fault, compiled again and it works now wtf i have no idea why it didnt work befor, thanks guys
EDIT:Srry for double post.. >.<

Glad you could fix it! I guess you were compiling the old code and not doing a clean build.

Likes are appreciated.
 
Last edited:
layer.Tpo -c -o player.o player.cpp
player.cpp:4405:10: error: prototype for ‘uint32_t Player::getAttackSpeed()’ does not match any in class ‘Player’
uint32_t Player::getAttackSpeed()
^
In file included from player.cpp:20:0:
player.h:1007:12: error: candidate is: uint32_t Player::getAttackSpeed() const
uint32_t getAttackSpeed() const;
^
Makefile:536: recipe for target 'player.o' failed
make[1]: *** [player.o] Error 1
make[1]: ** Esperando que outros processos terminem.
mv -f .deps/party.Tpo .deps/party.Po
 
Back
Top