• 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
 
I dont understand why it doesnt work... I have 0.3.6 And works like the hell.

I guess its in player.cpp function doAttacking
 
even though you changed it from normal (2000) attackspeed to defferent, isnt it faster even when you stand?


coz while moving its normal that hits much more
 
HMMMM.. Delete your .o files and recompile? Im at work when I get home I can check further in depth..

Maybe SCHEDULER_MINTICKS ?
 
ok so when you have normal attackspeed 2000 and you hit while stand


now you set up the attackspeed to 1000 and you hit standing

so are there any defferences?
 
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
Why not just add extra attacks using a weapon via script, no need to edit the source.
 
You will need edit your Sources file
Creature H. add this code
Code:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50
Later go to player.cpp and find ; `uint32_t Player::getAttackSpeed()` and change this function (remove old function getAttackSpeed()) to:
Code:
uint32_t Player::getAttackSpeed()
{
    Item* weapon = getWeapon();
   
// not 'attackSpeed', because this variable can already exist in the Creature / Player class
    int32_t attackSpeedzik;
    if(weapon && weapon->getAttackSpeed() != 0)
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13) - weapon->getAttackSpeed();
    else
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13);
    if(attackSpeedzik > 0)
        return (uint32_t) attackSpeedzik;
    else
        return 1;
}
 
You will need edit your Sources file
Creature H. add this code
Code:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50
Later go to player.cpp and find ; `uint32_t Player::getAttackSpeed()` and change this function (remove old function getAttackSpeed()) to:
Code:
uint32_t Player::getAttackSpeed()
{
    Item* weapon = getWeapon();
  
// not 'attackSpeed', because this variable can already exist in the Creature / Player class
    int32_t attackSpeedzik;
    if(weapon && weapon->getAttackSpeed() != 0)
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13) - weapon->getAttackSpeed();
    else
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13);
    if(attackSpeedzik > 0)
        return (uint32_t) attackSpeedzik;
    else
        return 1;
}


error
e3bbe903724d793dad1dc74909320e9c.png

Screenshot - e3bbe903724d793dad1dc74909320e9c - Gyazo
 
Back
Top