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

Feature True dual wielding for TFS 1.x

// REHOST
https://drive.google.com/open?id=0B2Rmde6uTLyHVjFwM1FsSUt6LXM
Since the github link isn't working at all.

can you post fixes?

If you are having the problem that Itutorial had, then you need to do the following:

In configmanager.cpp

Search for:

Code:
boolean[ALLOW_CHANGEOUTFIT] = getGlobalBoolean(L, "allowChangeOutfit", true);

And add below it:

Code:
boolean[ALLOW_DUAL_WIELDING] = getGlobalBoolean(L, "allowDualWielding", true);

-------------------------------------------------------------------------------------------------
Then in configmanager.h

Search for:

Code:
ALLOW_CHANGEOUTFIT,

And add below it:

Code:
ALLOW_DUAL_WIELDING,

Example.jpg
 
Last edited:
I tried to compile with this script on latest TFS sources and I'm getting an error on line 623 to 634.

error
Code:
error C2065: 'lastAttackHand': undeclared identifier
error C2065: 'blockSkillAdvance': undeclared identifier

lines
Code:
        void switchAttackHand() {
            lastAttackHand = lastAttackHand == HAND_LEFT ? HAND_RIGHT : HAND_LEFT;
        }
        slots_t getAttackHand() const {
            return lastAttackHand == HAND_LEFT ? CONST_SLOT_LEFT : CONST_SLOT_RIGHT;
        }
        void switchBlockSkillAdvance() {
            blockSkillAdvance = !blockSkillAdvance;
        }
        bool getBlockSkillAdvance() {
            return blockSkillAdvance;
        }
 
I have ported experience stages and bug report to Lua, I have made that Tibia system that gives bonus experience for low level players, I have skill stages and passive monsters, and also a major fix to NPC idling that reduces CPU usage by half, all of which I pretend to post here sometime.

Also I have lots of fixes, such as debug assertion when mounting with gamemaster outfit, applying skill rate to offline training and player guild rank on look.

It's been a while, so I'm wondering if this still works on TFS 1.2/1.3? If so, assuming you haven't done this already, would you mind perhaps creating a pull request to TFS regarding NPC idling optimizations? (Once again, assuming you haven't done this already which You probably have)
 
I installed everything patched etc, got the same error that Sizaro got, fixed it but i cant equip 2 weapons in game
The message changes from "You cannot dress this object there" to "Sorry, not possible"

Can someone help me ?
 
I got a lot of erros in compile.
Otx 3.8, can somebody help me? I need this script a lot.
 
Hello, theres few changes between 1.1 and 1.3, even between 1.1 and 1.2

For sample, I'm doing the mods manually and i have a small conflict here:

player.cpp
Code:
 @@ -108,6 +108,7 @@ Player::player(ProtocolGame* p) :
    lastAttackBlockType = BLOCK_NONE;
    addAttackSkillPoint = false;
    lastAttack = 0;
+ lastAttackHand = HAND_LEFT;

I can't find that part because it's been modified...

Same with player.h

Code:
    @@ -1293,6 +1311,8 @@ class Player final : public Creature, public Cylinder
    chaseMode_t chaseMode;
    fightMode_t fightMode;
    AccountType_t accountType;
+ attackHand_t lastAttackHand;
+ bool blockSkillAdvance;

vocation.cpp
Code:
    clientId = 0;
    fromVocation = VOCATION_NONE;
+ dualWield = true;

vocation.h
Code:
    uint8_t soulMax;
    uint8_t clientId;
+ bool dualWield;
+
    static uint32_t skillBase[SKILL_LAST + 1];

Can someone please help me to fix this to 1.3/current "master" ?
 
What if you use melee in combination with ranged weapon, will it stop attack when you're out of range for a melee hit?
 
I tried installing this but it crashes my server it only gives Core Dump as an error. I've made other changes to the server to but they worked before i installed this feature. I hope they're not a conflict. I am thinking i should try and start to install this from a clean build.
 
Nevermind i put the information in the functions and that was why it crashing the server.
 
Can somebody post how to do this without patch (I'm using TFS 1.3)? I changed many sources from my server and I don't want to make it automatic, I want to understand what I am doing.
 
Can somebody post how to do this without patch (I'm using TFS 1.3)? I changed many sources from my server and I don't want to make it automatic, I want to understand what I am doing.
Read the patch file.
 
"dualWieldingDamageRate" is not being used?
If you ctrl + f, its only used in configmanager.cpp and config.lua, it isnt being used in any formula.

"dualWieldingDamageRate" is not being used?
If you ctrl + f, its only used in configmanager.cpp and config.lua, it isnt being used in any formula.
Found it on line 357, lol.
 
Last edited by a moderator:
I think I found an error... if I put a single club atk 7 and attack a orc warlord, I can't hit. But if I put a Magic Sword and a Club I do great hits with both weapons.
 
And if I switch Magic Sword with Club (club in the right hand) I do weak hits. It's considering just the attack of the right hand weapon to do both attacks.
 
Nevermind, my mistake, I forgot to put:
Code:
player->switchAttackHand();
 
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.
 
Back
Top