Tá ai um code de BrandNew membro de outro fórum, todos os créditos para ele.
Bom, vamos ao code =]
Primeiro vá no consts.h (Aquele que aparece const79 ou const80)
Substitua :
WEAPON_AMMO = 7
Por :
WEAPON_AMMO = 7,
WEAPON_FIST = 8
Agora vá no items.cpp e depois de :
else if(strcasecmp(strValue.c_str(), "ammunition") == 0){
it.weaponType = WEAPON_AMMO;
}
Adicione :
else if(strcasecmp(strValue.c_str(), "fist") == 0){
it.weaponType = WEAPON_FIST;
}
Agora em players.cpp, depois de :
case WEAPON_SWORD:
case WEAPON_AXE:
case WEAPON_CLUB:
case WEAPON_WAND:
Adicione :
case WEAPON_FIST:
Ainda em players.cpp, depois de :
case WEAPON_AXE:
{
attackSkill = getSkill(SKILL_AXE, SKILL_LEVEL);
break;
}
Adicione :
case WEAPON_FIST:
{
attackSkill = getSkill(SKILL_FIST, SKILL_LEVEL);
break;
}
Agora em weapons.cpp,depois de :
case WEAPON_AXE:
{
skill = SKILL_AXE;
return true;
break;
}
Adicione :
case WEAPON_FIST:
{
skill = SKILL_FIST
return true;
break;
}
Ainda em weapons.cpp,depois de :
case WEAPON_AXE:
case WEAPON_SWORD:
case WEAPON_CLUB:
Adicione :
case WEAPON_FIST:
Agora em combat.cpp,depois de :
case WEAPON_CLUB: distanceEffect = NM_SHOOT_WHIRLWINDCLUB; break;
Adicione :
case WEAPON_FIST: distanceEffect = NM_SHOOT_LARGEROCK; break;
Agora em spells.cpp, depois de :
case WEAPON_SWORD:
case WEAPON_CLUB:
case WEAPON_AXE:
Adicione :
case WEAPON_FIST:
Pronto!Agora é só recompilar tudo (Ctrl + F11)
Agora um exemplo de como usar no items.xml..
<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="15"/>
<attribute key="attack" value="30"/>
<attribute key="weaponType" value="fist"/>
<attribute key="slotType" value="two-handed"/>
</item>