• 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+ Change weapons' basic attack to manual by pressing a Hotkey

maiconmnt

New Member
Joined
Oct 22, 2011
Messages
35
Reaction score
0
Hey otland friends, could someone help me with something. Would that be possible?

Here's the thing, I wanted to change the basic attack on my server so that it is not automatic but manual. For example, a wand you target the creature and it is giving the hits automatically every turn, however I wanted to change so that the hits of that wand were only granted by pressing a "hotkey" button on the keyboard. Just like the wands were in version 7.4, if I'm not mistaken.

However, I would like this to apply to all weapons on my server including knight weapons. To be able to attack it is necessary to press the hotkey and the attack does not come out automatically as it is.

I think about it in two ways, the first is by pressing the hotkey to shoot the attacks of the weapon in question, or else, doing it the way it is in diablo. You have the weapon equipped but it does not determine the attack that is being dealt, but the basic attack spells. In this case, the equipped weapon is used to determine damage, attack speed, and similar attributes.

PS: My base is tfs 1.4.2 10.98
 
Hey otland friends, could someone help me with something. Would that be possible?

Here's the thing, I wanted to change the basic attack on my server so that it is not automatic but manual. For example, a wand you target the creature and it is giving the hits automatically every turn, however I wanted to change so that the hits of that wand were only granted by pressing a "hotkey" button on the keyboard. Just like the wands were in version 7.4, if I'm not mistaken.

However, I would like this to apply to all weapons on my server including knight weapons. To be able to attack it is necessary to press the hotkey and the attack does not come out automatically as it is.

I think about it in two ways, the first is by pressing the hotkey to shoot the attacks of the weapon in question, or else, doing it the way it is in diablo. You have the weapon equipped but it does not determine the attack that is being dealt, but the basic attack spells. In this case, the equipped weapon is used to determine damage, attack speed, and similar attributes.

PS: My base is tfs 1.4.2 10.98
there's no wands in 7.4
and wands was never like this in any version
easy way:
you can create some kind of "talkaction" to attack and set some hotkey to 'say' this command
or
you can just cancel player's target after first attack, this way, u have to target again to execute next attack..

if you want exactly as u said, i think you will have to hire some experienced dev to make it for u..
 
there's no wands in 7.4
and wands was never like this in any version
easy way:
you can create some kind of "talkaction" to attack and set some hotkey to 'say' this command
or
you can just cancel player's target after first attack, this way, u have to target again to execute next attack..

if you want exactly as u said, i think you will have to hire some experienced dev to make it for u..
Yes, I imagine it's something more complex. And I'm willing to pay for that service. The problem is finding someone you trust and who knows how to do this and who is available. Would you have someone to refer?
 
really easy, just remove the auto attack part in source, and create a "basic attack" spell that will use the basic attack formula every time you cast this spell
 
really easy, just remove the auto attack part in source, and create a "basic attack" spell that will use the basic attack formula every time you cast this spell
Thanks for your help friend. I'm still learning to mess with the sources. Would you know where the automatic attack part is located in the sources so I can do this. I believe it is inside combat.cpp, right? But which line exactly should I remove so as not to make a mistake.
 
Hello!
I haven't been on otland in a bit, but I had some free time today and was not able to remotely work on my own project so I thought I would help out!
If you want to remove auto-attacks from players (but not from monsters) you would need to make the edit in player.cpp

You can just delete the contents of the "doAttacking(uint32_t)" function:

C++:
void Player::doAttacking(uint32_t)
{
}


if doAttacking is empty in player.cpp then autoattacks will stop for players.

Then simply create a spell named "auto attack" and make it do what you want.
Hope this helps!

edit
If you don't want to edit sources, you can just give everyone on your server an "infinite" (or very long) pacified condition.
 
Hello!
I haven't been on otland in a bit, but I had some free time today and was not able to remotely work on my own project so I thought I would help out!
If you want to remove auto-attacks from players (but not from monsters) you would need to make the edit in player.cpp

You can just delete the contents of the "doAttacking(uint32_t)" function:

C++:
void Player::doAttacking(uint32_t)
{
}


if doAttacking is empty in player.cpp then autoattacks will stop for players.

Then simply create a spell named "auto attack" and make it do what you want.
Hope this helps!

edit
If you don't want to edit sources, you can just give everyone on your server an "infinite" (or very long) pacified condition.
Thanks for your help. I tried to do this. but when trying to compile I get the following error.

Capturar.JPG
Post automatically merged:

It worked out. In fact, I had done it wrong. Had deleted that too (void Player::doAttacking(uint32_t)) instead of just the content inside.

Thank you very much for giving some of your time and helping me.
 
Last edited:
Back
Top