samuel157
/root
- Joined
- Mar 19, 2010
- Messages
- 508
- Solutions
- 3
- Reaction score
- 69
- Location
- São Paulo, Brazil
- GitHub
- Samuel10M
TFS 0.3.6 ~[SOURCE-EDIT] How to use two weapons and two shields simultaneously?
on my server i just did a SHIELD with a SWORD sprite
and a SWORD with a SHIELD sprite
a script than checks on attack/ on use weapon
const Item* rightItem = inventory[SLOT_RIGHT];
WeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();
if(rightItem->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item == rightItem && count == item->getItemCount())
ret = RET_NOERROR;
else if(rightType == WEAPON_SHIELD && type == WEAPON_SHIELD)
ret = RET_CANONLYUSEONESHIELD;
else if(!rightItem->isWeapon() || !item->isWeapon() ||
rightType == WEAPON_SHIELD || rightType == WEAPON_AMMO
|| type == WEAPON_SHIELD || type == WEAPON_AMMO)
ret = RET_NOERROR;
else
ret = RET_CANONLYUSEONEWEAPON;
const Item* leftItem = inventory[SLOT_LEFT];
WeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();
if(leftItem->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item == leftItem && count == item->getItemCount())
ret = RET_NOERROR;
else if(leftType == WEAPON_SHIELD && type == WEAPON_SHIELD)
ret = RET_CANONLYUSEONESHIELD;
else if(!leftItem->isWeapon() || !item->isWeapon() ||
leftType == WEAPON_SHIELD || leftType == WEAPON_AMMO
|| type == WEAPON_SHIELD || type == WEAPON_AMMO)
ret = RET_NOERROR;
else
ret = RET_CANONLYUSEONEWEAPON;
Nonsense. Show me.I used 2 weapons and 2 shields in my left and right hand, two weapons and equipped two shield slots in my left and right hand, but only the left attacks the right, not with both weapons.
const Item* rightItem = inventory[SLOT_RIGHT];
WeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();
if(rightItem->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item == rightItem && count == item->getItemCount())
ret = RET_NOERROR;
else if(rightType == WEAPON_SHIELD && type == WEAPON_SHIELD)
ret = RET_NOERROR;
else if(!rightItem->isWeapon() || !item->isWeapon() ||
rightType == WEAPON_AMMO || rightType == WEAPON_AMMO
|| type == WEAPON_AMMO || type == WEAPON_AMMO)
ret = RET_NOERROR;
const Item* leftItem = inventory[SLOT_LEFT];
WeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();
if(leftItem->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item == leftItem && count == item->getItemCount())
ret = RET_NOERROR;
else if(leftType == WEAPON_SHIELD && type == WEAPON_SHIELD)
ret = RET_NOERROR;
else if(!leftItem->isWeapon() || !item->isWeapon() ||
leftType == WEAPON_AMMO || leftType == WEAPON_AMMO
|| type == WEAPON_AMMO || type == WEAPON_AMMO)
ret = RET_NOERROR;
I told you it was impossible because you can't have two items in one hand.... and you said you could already do that... that is not what those images show... you are simply showing two hands both with same kind of item....
Like I said, impossible to put two items in one slot.
He simply wants to use 2 weapons or 2 shields at the same time.
How to use two weapons and two shields simultaneously
void Player::doAttacking(uint32_t)
Item* tool = getWeapon();