Feature True dual wielding for TFS 1.x

2Rec

Well-Known Member
Joined
Jul 31, 2013
Messages
490
Best answers
45
Likes
597
#61
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
141
Best answers
0
Likes
29
Location
Brazil
#62
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
258
Best answers
0
Likes
66
#63
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
Best answers
0
Likes
4
Location
Void
#64
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!
 

Togu

Active Member
Joined
Jun 22, 2018
Messages
141
Best answers
0
Likes
29
Location
Brazil
#65

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Best answers
0
Likes
4
Location
Void
#67
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
141
Best answers
0
Likes
29
Location
Brazil
#68
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
 

Piquenoelmal

I'm in an eternal depression
Joined
Dec 1, 2009
Messages
28
Best answers
0
Likes
4
Location
Void
#72
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
Best answers
0
Likes
4
Location
Void
#77
@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
 
Joined
May 8, 2017
Messages
56
Best answers
0
Likes
4
#78
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
Best answers
0
Likes
4
Location
Void
#79
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
Best answers
0
Likes
4
Location
Void
#80
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