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

support with weapon

Abutre

New Member
Joined
Jun 5, 2017
Messages
15
Reaction score
0
Hello, can someone help me? I already have permissions to use two sword in my server. But, the damage does not multiply by 2. How can I mutiplicate the damage if the player uses 2 swords in slots at left and right?
 
Server as default get only dmg from first weapon it finds. You need to edit sources. Should be in player class some method getting the atk from eq. Then you would need to edit it to force server to calculate damage from both hands.
 
Server as default get only dmg from first weapon it finds. You need to edit sources. Should be in player class some method getting the atk from eq. Then you would need to edit it to force server to calculate damage from both hands.
Do you have any idea where I can do this? so that only WEAPON_SWORD receives this attribute of 2 atks?
 
Hello, can someone help me? I already have permissions to use two sword in my server. But, the damage does not multiply by 2. How can I mutiplicate the damage if the player uses 2 swords in slots at left and right?
What code are you using? Paste a link.
 
there are many open tibia servers and everyone has its own player.cpp file

Provide us the exact version youre working on, then we would be able to help you
 
there are many open tibia servers and everyone has its own player.cpp file

Provide us the exact version youre working on, then we would be able to help you
/** * The Forgotten Server - a free and open-source MMORPG server emulator * - Pastebin.com
I made a modification, I created a new type of weapon, of type FIST, in other words, instead of two swords, it will be of type WEAPON_FIST. The use of two is already released, but does not add attacks.

Just implement "dual wield". It's an attribute which you can use to each weapon separately.
The dual wield doesn't works in 1.3 :/
 
Seems like its possible to do, but will require full access to sources, since writing test methods on forum and waiting for response will be extremely inefficient work.

I would start in doAttacking method where

Item* tool = getWeapon();
const Weapon* weapon = g_weapons->getWeapon(tool);


it takes the single weapon
and then:

weapon->useWeapon(this, tool, attackedCreature);

It executes the attack (described method is in weapon class)


There would be need some new function in player class that would take both weapons and then new weapon-function that would calculate damage from them.


imo you need to do it by yourself or make request/job, giving someone full access to edit,debug and tests sources.
 
Seems like its possible to do, but will require full access to sources, since writing test methods on forum and waiting for response will be extremely inefficient work.

I would start in doAttacking method where

Item* tool = getWeapon();
const Weapon* weapon = g_weapons->getWeapon(tool);


it takes the single weapon
and then:

weapon->useWeapon(this, tool, attackedCreature);

It executes the attack (described method is in weapon class)


There would be need some new function in player class that would take both weapons and then new weapon-function that would calculate damage from them.


imo you need to do it by yourself or make request/job, giving someone full access to edit,debug and tests sources.

I understand, in case I do not understand much programming like this, I would have to ask someone ... if I post the sourcers, could you do it for me?
 
Create request thread for that function. Unfortunately I don't have much time now, but I will look there from time to time and we'll see.
 
Back
Top