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

C++ Weapon give two skills

Wessab

New Member
Joined
Aug 8, 2009
Messages
15
Reaction score
0
Hello
I would like to make 1 weapon give two skills, e.g. set the weapon as a sword but give the sword and club skills.
I don't really know how it works in the C ++ case
Weapons.cpp
case WEAPON_SWORD: {
skill = SKILL_SWORD;
skill = SKILL_CLUB;
return true;
}
Player.cpp
switch (weaponType) {
case WEAPON_SWORD: {
attackSkill = getSkillLevel(SKILL_SWORD) && getSkillLevel(SKILL_CLUB);
break;
}
 
Hello
I would like to make 1 weapon give two skills, e.g. set the weapon as a sword but give the sword and club skills.
I don't really know how it works in the C ++ case
Weapons.cpp

Player.cpp
Why you dont only edit items.xml
 
In this file I can't give two weapons (weapontype), it will only read one anyway
if your intention is just to give the axe and sword skill in a sword or axe, you don't need 2 weapon type, since it's just an attribute boost.

Using Nekiro's Downgrade 1.5 as source..
As exemple in items.xml:
XML:
    <item id="2392" article="a" name="fire sword">
        <attribute key="description" value="The blade is a magic flame."/>
        <attribute key="weight" value="2300"/>
        <attribute key="defense" value="20"/>
        <attribute key="attack" value="35"/>
        <attribute key="skillSword" value="4"/>
        <attribute key="skillAxe" value="4"/>
        <attribute key="weaponType" value="sword"/>
    </item>


remember to insert the weapon in movements.xml for the boosts to work
As exemple in movements.xml:
XML:
    <movevent event="Equip" itemid="2392" slot="hand" function="onEquipItem" />
    <movevent event="DeEquip" itemid="2392" slot="hand" function="onDeEquipItem" />
 
Last edited:
Ahh maybe I got it wrong.
I meant training, when I beat with a sword, for example, it gives me a club and a sword training
 
Back
Top