This system serves to allow you to use two weapons at the same time one in each slot corresponding hands of the character. With it you can use two sword's two axe's two club's or etc ... This system simply adds the item that is the attack on the left slot to attack the item that is in the left slot. Aew will the code to insert the sources!
In player.ccp find:
ret = RET_CANONLYUSEONEWEAPON;
u will find
"ret = RET_CANONLYUSEONEWEAPON;",
chnge for:
ret = RET_NOERROR;
In weapons.h find:
constWeapon* getWeapon(constItem* item)const;
need to put down:
staticint32_t getAttackLeft;
staticint32_t getAttackRigth;
staticint32_t getLeftExtraAttack;
staticint32_t getRigthExtraAttack;
After that, find weapons.ccp and search:
int32_tWeaponMelee::getWeaponDamage(constPlayer* player,constCreature* target,constItem* item,bool maxDamage /*= false*/)const
{
int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackValue = std::max((int32_t)0,(int32_t(item->getAttack()+ item->getExtraAttack())- elementDamage));
float attackFactor = player->getAttackFactor();
Change for:
int32_tWeaponMelee::getWeaponDamage(constPlayer* player,constCreature* target,constItem* item,bool maxDamage /*= false*/)const
{
int32_t getAttackLeft;
int32_t getAttackRigth;
int32_t getLeftExtraAttack;
int32_t getRigthExtraAttack;
getAttackLeft =0;
getAttackRigth =0;
getLeftExtraAttack =0;
getRigthExtraAttack =0;
if(getAttackLeft ==0)
{
if(player->getInventoryItem(SLOT_LEFT)!= NULL)
{
getAttackLeft = player->getInventoryItem(SLOT_LEFT)->getAttack();
getLeftExtraAttack = player->getInventoryItem(SLOT_LEFT)->getExtraAttack();
}
elseif(player->getInventoryItem(SLOT_LEFT)== NULL)
{
getAttackLeft =0;
getLeftExtraAttack =0;}
}
if(getAttackRigth ==0)
{
if(player->getInventoryItem(SLOT_RIGHT)!= NULL)
{
getAttackRigth = player->getInventoryItem(SLOT_RIGHT)->getAttack();
getRigthExtraAttack = player->getInventoryItem(SLOT_RIGHT)->getExtraAttack();
}
elseif(player->getInventoryItem(SLOT_RIGHT)== NULL)
{
getAttackRigth =0;
getRigthExtraAttack =0;}
}
int32_t attackValue = std::max((int32_t)0,(int32_t)((getAttackLeft + getLeftExtraAttack + getAttackRigth + getRigthExtraAttack)- elementDamage));
int32_t attackSkill = player->getWeaponSkill(item);
float attackFactor = player->getAttackFactor();
I NEED THIS IN TFS 1.0 PLZ ! , this system only can use tfs 0.3.6 and 0.4
In player.ccp find:
ret = RET_CANONLYUSEONEWEAPON;
u will find
"ret = RET_CANONLYUSEONEWEAPON;",
chnge for:
ret = RET_NOERROR;
In weapons.h find:
constWeapon* getWeapon(constItem* item)const;
need to put down:
staticint32_t getAttackLeft;
staticint32_t getAttackRigth;
staticint32_t getLeftExtraAttack;
staticint32_t getRigthExtraAttack;
After that, find weapons.ccp and search:
int32_tWeaponMelee::getWeaponDamage(constPlayer* player,constCreature* target,constItem* item,bool maxDamage /*= false*/)const
{
int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackValue = std::max((int32_t)0,(int32_t(item->getAttack()+ item->getExtraAttack())- elementDamage));
float attackFactor = player->getAttackFactor();
Change for:
int32_tWeaponMelee::getWeaponDamage(constPlayer* player,constCreature* target,constItem* item,bool maxDamage /*= false*/)const
{
int32_t getAttackLeft;
int32_t getAttackRigth;
int32_t getLeftExtraAttack;
int32_t getRigthExtraAttack;
getAttackLeft =0;
getAttackRigth =0;
getLeftExtraAttack =0;
getRigthExtraAttack =0;
if(getAttackLeft ==0)
{
if(player->getInventoryItem(SLOT_LEFT)!= NULL)
{
getAttackLeft = player->getInventoryItem(SLOT_LEFT)->getAttack();
getLeftExtraAttack = player->getInventoryItem(SLOT_LEFT)->getExtraAttack();
}
elseif(player->getInventoryItem(SLOT_LEFT)== NULL)
{
getAttackLeft =0;
getLeftExtraAttack =0;}
}
if(getAttackRigth ==0)
{
if(player->getInventoryItem(SLOT_RIGHT)!= NULL)
{
getAttackRigth = player->getInventoryItem(SLOT_RIGHT)->getAttack();
getRigthExtraAttack = player->getInventoryItem(SLOT_RIGHT)->getExtraAttack();
}
elseif(player->getInventoryItem(SLOT_RIGHT)== NULL)
{
getAttackRigth =0;
getRigthExtraAttack =0;}
}
int32_t attackValue = std::max((int32_t)0,(int32_t)((getAttackLeft + getLeftExtraAttack + getAttackRigth + getRigthExtraAttack)- elementDamage));
int32_t attackSkill = player->getWeaponSkill(item);
float attackFactor = player->getAttackFactor();
I NEED THIS IN TFS 1.0 PLZ ! , this system only can use tfs 0.3.6 and 0.4