Feature True dual wielding for TFS 1.x

2Rec

Veteran OT User
Joined
Jul 31, 2013
Messages
517
Reaction score
656
What if i have club fighting as a attack speed so its pretty much impossible to install this function with this main stage. So basically you have to replace important part with dual wielding so its like if you want to add this system i have to sacrifice important function from my source that takes a big part in my server.
Bummer
 

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
What if i have club fighting as a attack speed so its pretty much impossible to install this function with this main stage. So basically you have to replace important part with dual wielding so its like if you want to add this system i have to sacrifice important function from my source that takes a big part in my server.
I've made the changes manually, reading the patch code and making some maneuvers, you will need knowledge of C++. Working smooth on my TFS 1.3 and I made maaaany changes on the sources before it. I didn't need the parts related to advance skill melee, advance skill shield and vocation restriction.
 

Stanos

Active Member
Joined
Jun 12, 2018
Messages
378
Reaction score
130
I've made the changes manually, reading the patch code and making some maneuvers, you will need knowledge of C++. Working smooth on my TFS 1.3 and I made maaaany changes on the sources before it. I didn't need the parts related to advance skill melee, advance skill shield and vocation restriction.
I tried to add manually. You need way more knowledge of c++ if i want to add this function in my certain stage of source.
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
I've made the changes manually, reading the patch code and making some maneuvers, you will need knowledge of C++. Working smooth on my TFS 1.3 and I made maaaany changes on the sources before it. I didn't need the parts related to advance skill melee, advance skill shield and vocation restriction.
Hey, friend. Could you post your player.cpp, so I can see where my problem is? It's returning me that some of my functions are illegal.
Maybe because they are set as local?
I'm trying to resolve this, but a help would be nice. :)
Thanks!
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
Thanks for the help, @Togu . The script are pretty much the same and even compile, but no way that the "shield_hand" equip a sword, club or axe... Pretty sure the problem is in lastAttackHand = HAND_LEFT.
When I declare it inside Player::player(ProtocolGame_ptr p) , it asked me for a type, but I REALLY think that this need a type.
Well, I will try to find what is wrong, if I succeed I'll post the code for the 1.3 here.
Thanks again, friend. :)
 

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
Thanks for the help, @Togu . The script are pretty much the same and even compile, but no way that the "shield_hand" equip a sword, club or axe... Pretty sure the problem is in lastAttackHand = HAND_LEFT.
When I declare it inside Player::player(ProtocolGame_ptr p) , it asked me for a type, but I REALLY think that this need a type.
Well, I will try to find what is wrong, if I succeed I'll post the code for the 1.3 here.
Thanks again, friend. :)
My .h too
/** * The Forgotten Server - a free and open-source MMORPG server emulator * - Pastebin.com
 

Togu

Active Member
Joined
Jun 22, 2018
Messages
244
Reaction score
97
Location
Brazil
Ah, now I've seen your answer.

Try to set in config.lua

classicEquipmentSlots = true
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
Ah, now I've seen your answer.

Try to set in config.lua

classicEquipmentSlots = true

Thanks again. Already set it, my player.cpp and player.h is pretty much the same thing.
I'll try to find, but the problem is in the right hand.

anyone know why do it?
Pretty much you are setting the wrong position for the equipment be equipped. I think the problem is in the player.cpp, but I'm not sure. I'll look at it.
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
@lazarus321, your problem is the same as mine. The equipment are being equipped in the back due the classicEquipmentSlots = true.
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
@lazarus321 try to implements using this code.

After a while, I succeed in making the dual wielding. Also, both weapons hit and the skill goes up as well.
The main problem in my code was just a part where I forgot to set
Code:
bool dualWield = true;
in vocations.h
 

lazarus321

Member
Joined
May 8, 2017
Messages
116
Reaction score
11
This work for you?

/* For every dual-wielding turn (one hit for each hand), flip the block skill bit */
+ if (player->getAttackHand() == CONST_SLOT_LEFT) {
+ player->switchBlockSkillAdvance();
+ }
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
Yes.
I have to eliminate this line inside the main if:

Code:
player->addSkillAdvance(skillType, skillPoint);
Then, I insert this one:

Code:
/* Advance one point for every single-wielding hit OR one point for every two hit for each hand */
            if (!player->isDualWielding() || !player->getBlockSkillAdvance()) {
                player->addSkillAdvance(skillType, skillPoint);
            }

            /* For every dual-wielding turn (one hit for each hand), flip the block skill bit */
            if (player->getAttackHand() == CONST_SLOT_LEFT) {
                player->switchBlockSkillAdvance();
            }
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Reaction score
4
Location
Void
Did you change the Config.lua with the tags?

If you want, I can post my .src for you too try to use in your server. I'm pretty sure I did some changes around then, but maybe can help you.
 
Top