What is this code?
This code wil enable fist as a weaponType. So, if you want a certain weapon to be fist fighting, follow my simple steps.
Start of the code:
const.h
Add...
...under
Note to add "," after the "7".
items.cpp
Add...
...under
player.cpp
Add...
...under
Add...
...under
spells.cpp
Add...
...under
weapons.cpp
Add...
...under
Add...
...under
End of the code:
Rebuild all and now you can add:
Please leave a comment
And if there is a better way to do this, please tell me then. Still learning
Yours,
Kadj
This code wil enable fist as a weaponType. So, if you want a certain weapon to be fist fighting, follow my simple steps.
Start of the code:
const.h
Add...
Code:
WEAPON_FIST = 8
...under
Code:
WEAPON_AMMO = 7,
items.cpp
Add...
Code:
else if(strcasecmp(strValue.c_str(), "fist") == 0){
it.weaponType = WEAPON_FIST;
}
...under
Code:
else if(strcasecmp(strValue.c_str(), "ammunition") == 0){
it.weaponType = WEAPON_AMMO;
}
player.cpp
Add...
Code:
case WEAPON_FIST:
...under
Code:
case WEAPON_WAND:
Add...
Code:
case WEAPON_FIST:
{
attackSkill = getSkill(SKILL_FIST, SKILL_LEVEL);
break;
}
...under
Code:
case WEAPON_DIST:
{
attackSkill = getSkill(SKILL_DIST, SKILL_LEVEL);
break;
}
spells.cpp
Add...
Code:
case WEAPON_FIST:
...under
Code:
case WEAPON_AXE:
weapons.cpp
Add...
Code:
case WEAPON_FIST:
...under
Code:
case WEAPON_CLUB:
Add...
Code:
case WEAPON_FIST:
{
skill = SKILL_FIST;
return true;
}
...under
Code:
case WEAPON_AXE:
{
skill = SKILL_AXE;
return true;
break;
}
Rebuild all and now you can add:
Code:
<item id="5875" name="sniper gloves">
<attribute key="description" value="They are the pride of the paladin guild."/>
<attribute key="weight" value="400"/>
<attribute key="defense" value="22"/>
<attribute key="attack" value="19"/>
[COLOR="Red"]<attribute key="weaponType" value="fist"/>[/COLOR]
</item>
Please leave a comment
And if there is a better way to do this, please tell me then. Still learning
Yours,
Kadj