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

Feature Fist weapons For othire or any ot svn // may works with others

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
lets begin
at const.h search for
Code:
WEAPON_AMMO     = 7,
below that code add
Code:
WEAPON_FIST     = 8,

in items.cpp search for
Code:
}
                                else if(asLowerCaseString(strValue) == "ammunition"){
                                    it.weaponType = WEAPON_AMMO;
below that add
Code:
}
                                else if(asLowerCaseString(strValue) == "fist"){
                                    it.weaponType = WEAPON_FIST;
in player.cpp after
Code:
case WEAPON_WAND:
add
Code:
case WEAPON_FIST:

in the same file after
Code:
    case WEAPON_AXE:
    {
        attackSkill = getSkill(SKILL_AXE, SKILL_LEVEL);
        break;
    }
add
Code:
    case WEAPON_FIST:
    {
        attackSkill = getSkill(SKILL_FIST, SKILL_LEVEL);
        break;
    }

weapons.cpp after
Code:
case WEAPON_AXE:
    {
        skill = SKILL_AXE;
        return true;
        break;
    }

add this
Code:
    case WEAPON_FIST:
    {
        skill = SKILL_FIST;
        return true;
        break;
    }
and in the same file after
Code:
case WEAPON_CLUB:

add
Code:
case WEAPON_FIST:

at items xml and movements you have to do editions too.
the attribute that you should add for fist weapons is this
Code:
<attribute key="weaponType" value="fist"/>


Enjoy it !!!
 
Last edited by a moderator:
can't edit my main post !
don't forget to change this at global.lua
Code:
-- Weapon Types
WEAPON_NONE     = 0
WEAPON_SWORD    = 1
WEAPON_CLUB     = 2
WEAPON_AXE      = 3
WEAPON_SHIELD   = 4
WEAPON_DIST     = 5
WEAPON_WAND     = 6
WEAPON_AMMO     = 7
to this:
Code:
-- Weapon Types
WEAPON_NONE     = 0
WEAPON_SWORD    = 1
WEAPON_CLUB     = 2
WEAPON_AXE      = 3
WEAPON_SHIELD   = 4
WEAPON_DIST     = 5
WEAPON_WAND     = 6
WEAPON_AMMO     = 7
WEAPON_FIST     = 8

admins please add this before this
Code:
<attribute key="weaponType" value="fist"/>
 
Back
Top