Beiträge von M2GW

    It seems you're loading server side map folder. you should load client side instead.

    Small update #2


    If you have installed my official like new elemental bonuses. follow the small guide below to view element icon*of a target*that wears


    the new rings, like in official.


    Bitte melden Sie sich an, um dieses Bild zu sehen.




    open char.cpp,look for:

    Code
    1. #ifdef ELEMENT_TARGET

    replace the entire content of the #ifdef, until the #endif with the following:


    Compile server and that's it. now, when you select a target that wear a ring with elemental bonuses, an element icon will appear next to the target.

    Hi,


    I have worked on official like new elemental bonuses(strong against elec,fire,ice,wind,earth,dark), follow the guide below to add it to your server.


    Please like this topic if you find it useful!


    (C) Metin2 Guild wars - (If you're looking for a custom made metin2 systems in c++/python send me a pm).


    Screenshots:





    Let's begin!


    Server side:


    open service.h,add at the bottom:


    Code
    1. #define ELEMENT_NEW_BONUSESopen length.h, look for:MAX_APPLY_NUM,};


    add above:


    Code
    1. #ifdef ELEMENT_NEW_BONUSESAPPLY_ATTBONUS_ELEC,APPLY_ATTBONUS_FIRE,APPLY_ATTBONUS_ICE,APPLY_ATTBONUS_WIND,APPLY_ATTBONUS_EARTH,APPLY_ATTBONUS_DARK,#endif


    In the same file look for ERaceFlags enum and replace with:
    enum ERaceFlags


    open battle.cpp, look for:


    Code
    1. else if (pkVictim->IsRaceFlag(RACE_FLAG_ICE))iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_ICE)) / 100;


    add below:

    Code
    1. #ifdef ELEMENT_NEW_BONUSESelse if (pkVictim->IsRaceFlag(RACE_FLAG_ELEC))iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_ELEC)) / 100;else if (pkVictim->IsRaceFlag(RACE_FLAG_WIND))iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_WIND)) / 100;else if (pkVictim->IsRaceFlag(RACE_FLAG_EARTH))iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_EARTH)) / 100;else if (pkVictim->IsRaceFlag(RACE_FLAG_DARK))iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_DARK)) / 100;#endif


    open char.cpp, look for:


    Code
    1. case POINT_NORMAL_HIT_DEFEND_BONUS:


    add below:f


    Code
    1. #ifdef ELEMENT_NEW_BONUSEScase POINT_ATTBONUS_ELEC:case POINT_ATTBONUS_FIRE:case POINT_ATTBONUS_ICE:case POINT_ATTBONUS_WIND:case POINT_ATTBONUS_EARTH:case POINT_ATTBONUS_DARK:#endif


    in char.cpp, look for:


    Code
    1. PointChange(aApplyInfo[bApplyType].bPointType, iVal);


    add above:


    Code
    1. #ifdef ELEMENT_NEW_BONUSEScase APPLY_ATTBONUS_ELEC:case APPLY_ATTBONUS_FIRE:case APPLY_ATTBONUS_ICE:case APPLY_ATTBONUS_WIND:case APPLY_ATTBONUS_EARTH:case APPLY_ATTBONUS_DARK:#endif


    in char.h, look for:


    Code
    1. };enum EPKModes


    add above:


    Code
    1. #ifdef ELEMENT_NEW_BONUSESPOINT_ATTBONUS_ELEC,POINT_ATTBONUS_WIND,POINT_ATTBONUS_EARTH,POINT_ATTBONUS_DARK,#endif


    in constants.cpp, look for:

    Code
    1. };const int aiItemMagicAttributePercentHigh[ITEM_ATTRIBUTE_MAX_LEVEL] = {30, 40, 20, 8, 2};


    add above:


    Code
    1. #ifdef ELEMENT_NEW_BONUSES{ POINT_ATTBONUS_ELEC,},{ POINT_ATTBONUS_FIRE, },{ POINT_ATTBONUS_ICE, },{ POINT_ATTBONUS_WIND, },{ POINT_ATTBONUS_EARTH, },{ POINT_ATTBONUS_DARK, },#endif


    now go into db source.


    open ProtoReader.cpp, look for:

    Code
    1. string arApplyType[] = { "APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW","APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS","APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW", "APPLY_ANTI_RESIST_MAGIC", "APPLY_ATTBONUS_ELECT", "APPLY_ATTBONUS_FIRE", "APPLY_ATTBONUS_ICE", "APPLY_ATTBONUS_WIND", "APPLY_ATTBONUS_EARTH", "APPLY_ATTBONUS_DARK" };


    replace with:

    Code
    1. #ifdef ELEMENT_NEW_BONUSESstring arApplyType[] = { "APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW","APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS","APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW", "APPLY_ANTI_RESIST_MAGIC", "APPLY_ATTBONUS_ELECT", "APPLY_ATTBONUS_FIRE", "APPLY_ATTBONUS_ICE", "APPLY_ATTBONUS_WIND", "APPLY_ATTBONUS_EARTH", "APPLY_ATTBONUS_DARK" };#elsestring arApplyType[] = { "APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW", "APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS", "APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW", "APPLY_ANTI_RESIST_MAGIC", };#endif


    Compile.


    Client side:


    open locale_inc.h, add at the bottom:


    Code
    1. #define ELEMENT_NEW_BONUSES


    open PythonItemModule.cpp, look for:


    Code
    1. #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM


    add above:


    Code
    1. #ifdef ELEMENT_NEW_BONUSESPyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_ELEC", CItemData::APPLY_ATTBONUS_ELEC);PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_FIRE", CItemData::APPLY_ATTBONUS_FIRE);PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_ICE", CItemData::APPLY_ATTBONUS_ICE);PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_WIND", CItemData::APPLY_ATTBONUS_WIND);PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_EARTH", CItemData::APPLY_ATTBONUS_EARTH);PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_DARK", CItemData::APPLY_ATTBONUS_DARK);#endif


    open Packet.h,look for:


    Code
    1. POINT_MIN_WEP = 200,


    add above:

    Code
    1. #ifdef ELEMENT_NEW_BONUSESPOINT_ATTBONUS_ELEC,POINT_ATTBONUS_WIND,POINT_ATTBONUS_EARTH,POINT_ATTBONUS_DARK,#endif



    open itemData.h, look for:


    Code
    1. MAX_APPLY_NUM,};enum EImmuneFlags


    add above:

    Code
    1. #ifdef ELEMENT_NEW_BONUSESAPPLY_ATTBONUS_ELEC,APPLY_ATTBONUS_FIRE,APPLY_ATTBONUS_ICE,APPLY_ATTBONUS_WIND,APPLY_ATTBONUS_EARTH,APPLY_ATTBONUS_DARK,#endif


    go to root pack.


    open uiToolTip.py


    look for:


    Code
    1. }ATTRIBUTE_NEED_WIDTH = {


    add above:

    Code
    1. item.APPLY_ATTBONUS_ELEC : localeInfo.TOOLTIP_APPLY_ATTBONUS_ELEC,item.APPLY_ATTBONUS_FIRE : localeInfo.TOOLTIP_APPLY_ATTBONUS_FIRE,item.APPLY_ATTBONUS_ICE : localeInfo.TOOLTIP_APPLY_ATTBONUS_ICE,item.APPLY_ATTBONUS_WIND : localeInfo.TOOLTIP_APPLY_ATTBONUS_WIND,item.APPLY_ATTBONUS_EARTH : localeInfo.TOOLTIP_APPLY_ATTBONUS_EARTH,item.APPLY_ATTBONUS_DARK : localeInfo.TOOLTIP_APPLY_ATTBONUS_DARK,


    go to dump_proto folder, open ItemCSVReader.cpp,look for:


    Code
    1. #include "ItemCSVReader.h"


    add below:


    Code
    1. #define ELEMENT_NEW_BONUSES


    search for:


    Code
    1. string arApplyType[] = {"APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW","APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS","APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW","APPLY_ANTI_RESIST_MAGIC","APPLY_ATTBONUS_ELECT","APPLY_ATTBONUS_FIRE","APPLY_ATTBONUS_ICE","APPLY_ATTBONUS_WIND","APPLY_ATTBONUS_EARTH","APPLY_ATTBONUS_DARK"};


    replace with:

    Code
    1. #ifdef ELEMENT_NEW_BONUSESstring arApplyType[] = {"APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW","APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS","APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW","APPLY_ANTI_RESIST_MAGIC","APPLY_ATTBONUS_ELECT","APPLY_ATTBONUS_FIRE","APPLY_ATTBONUS_ICE","APPLY_ATTBONUS_WIND","APPLY_ATTBONUS_EARTH","APPLY_ATTBONUS_DARK"};#elsestring arApplyType[] = { "APPLY_NONE", "APPLY_MAX_HP", "APPLY_MAX_SP", "APPLY_CON", "APPLY_INT", "APPLY_STR", "APPLY_DEX", "APPLY_ATT_SPEED", "APPLY_MOV_SPEED", "APPLY_CAST_SPEED", "APPLY_HP_REGEN", "APPLY_SP_REGEN", "APPLY_POISON_PCT", "APPLY_STUN_PCT", "APPLY_SLOW_PCT", "APPLY_CRITICAL_PCT", "APPLY_PENETRATE_PCT", "APPLY_ATTBONUS_HUMAN", "APPLY_ATTBONUS_ANIMAL", "APPLY_ATTBONUS_ORC", "APPLY_ATTBONUS_MILGYO", "APPLY_ATTBONUS_UNDEAD", "APPLY_ATTBONUS_DEVIL", "APPLY_STEAL_HP", "APPLY_STEAL_SP", "APPLY_MANA_BURN_PCT", "APPLY_DAMAGE_SP_RECOVER", "APPLY_BLOCK", "APPLY_DODGE", "APPLY_RESIST_SWORD", "APPLY_RESIST_TWOHAND", "APPLY_RESIST_DAGGER", "APPLY_RESIST_BELL", "APPLY_RESIST_FAN", "APPLY_RESIST_BOW", "APPLY_RESIST_FIRE", "APPLY_RESIST_ELEC", "APPLY_RESIST_MAGIC", "APPLY_RESIST_WIND", "APPLY_REFLECT_MELEE", "APPLY_REFLECT_CURSE", "APPLY_POISON_REDUCE", "APPLY_KILL_SP_RECOVER", "APPLY_EXP_DOUBLE_BONUS", "APPLY_GOLD_DOUBLE_BONUS", "APPLY_ITEM_DROP_BONUS", "APPLY_POTION_BONUS", "APPLY_KILL_HP_RECOVER", "APPLY_IMMUNE_STUN", "APPLY_IMMUNE_SLOW", "APPLY_IMMUNE_FALL", "APPLY_SKILL", "APPLY_BOW_DISTANCE", "APPLY_ATT_GRADE_BONUS", "APPLY_DEF_GRADE_BONUS", "APPLY_MAGIC_ATT_GRADE", "APPLY_MAGIC_DEF_GRADE", "APPLY_CURSE_PCT", "APPLY_MAX_STAMINA", "APPLY_ATTBONUS_WARRIOR", "APPLY_ATTBONUS_ASSASSIN", "APPLY_ATTBONUS_SURA", "APPLY_ATTBONUS_SHAMAN", "APPLY_ATTBONUS_MONSTER", "APPLY_MALL_ATTBONUS", "APPLY_MALL_DEFBONUS", "APPLY_MALL_EXPBONUS", "APPLY_MALL_ITEMBONUS", "APPLY_MALL_GOLDBONUS", "APPLY_MAX_HP_PCT", "APPLY_MAX_SP_PCT", "APPLY_SKILL_DAMAGE_BONUS", "APPLY_NORMAL_HIT_DAMAGE_BONUS", "APPLY_SKILL_DEFEND_BONUS", "APPLY_NORMAL_HIT_DEFEND_BONUS", "APPLY_PC_BANG_EXP_BONUS", "APPLY_PC_BANG_DROP_BONUS", "APPLY_EXTRACT_HP_PCT", "APPLY_RESIST_WARRIOR", "APPLY_RESIST_ASSASSIN", "APPLY_RESIST_SURA", "APPLY_RESIST_SHAMAN", "APPLY_ENERGY", "APPLY_DEF_GRADE", "APPLY_COSTUME_ATTR_BONUS", "APPLY_MAGIC_ATTBONUS_PER", "APPLY_MELEE_MAGIC_ATTBONUS_PER", "APPLY_RESIST_ICE", "APPLY_RESIST_EARTH", "APPLY_RESIST_DARK", "APPLY_ANTI_CRITICAL_PCT", "APPLY_ANTI_PENETRATE_PCT", "APPLY_ATTBONUS_WOLF", "APPLY_RESIST_WOLF", "APPLY_RESIST_CLAW", "APPLY_ANTI_RESIST_MAGIC", };#endif


    inside locale folder, open locale_game.txt, add in the end:


    Code
    1. TOOLTIP_APPLY_ATTBONUS_ELEC Strong against Lightning +%d%% SATOOLTIP_APPLY_ATTBONUS_FIRE Strong against Fire +%d%% SATOOLTIP_APPLY_ATTBONUS_ICE Strong against Ice +%d%% SATOOLTIP_APPLY_ATTBONUS_WIND Strong against Wind +%d%% SATOOLTIP_APPLY_ATTBONUS_EARTH Strong against Earth +%d%% SATOOLTIP_APPLY_ATTBONUS_DARK Strong against Dark +%d%% SA



    Compile and that's it!


    to use it in item_proto.txt you can use:


    APPLY_ATTBONUS_ELEC,


    APPLY_ATTBONUS_FIRE,


    APPLY_ATTBONUS_ICE,


    APPLY_ATTBONUS_WIND,


    APPLY_ATTBONUS_EARTH,


    APPLY_ATTBONUS_DARK




    Enjoy!

    Small update:
    Added tool tip to make it more clear for players, follow the steps below to have it.
    Screens:




    in _init_ and in Destroy methods*look for:


    Code
    1. if app.ENABLE_VIEW_ELEMENT:
    2. self.elementImage = None

    replace with:


    Code
    1. if app.ENABLE_VIEW_ELEMENT:
    2. self.elementImage = None
    3. self.elementId = None
    4. self.elementImageToolTip = None


    search for:


    Code
    1. def Close(self):

    add inside the method:


    Code
    1. if app.ENABLE_VIEW_ELEMENT and self.elementImage:
    2. self.elementImage.Hide()

    inside ResetTargetBoard method look for:


    Code
    1. if app.ENABLE_VIEW_ELEMENT and self.elementImage:
    2. self.elementImage = None

    replace with:

    Code
    1. if app.ENABLE_VIEW_ELEMENT and self.elementImage:
    2. self.elementImage = None
    3. self.elementId = None
    4. if self.elementImageToolTip:
    5. self.elementImageToolTip.Hide()

    Look for:


    Code
    1. def SetElementImage(self, elementId):

    replace the whole method with:


    That's it.


    Enjoy!

    Could you give me an example. If you can throw Mop proto.sql in one

    If you use mob_proto in sql, then look at setRaceFlag field.
    you can do the math
    RACE_FLAG_ATT_ELEC = (1 << 11), // 2048
    RACE_FLAG_ATT_FIRE = (1 << 12), // 4096
    RACE_FLAG_ATT_ICE = (1 << 13), // 8192
    RACE_FLAG_ATT_WIND = (1 << 14), // 16384
    RACE_FLAG_ATT_EARTH = (1 << 15), 32768
    RACE_FLAG_ATT_DARK = (1 << 16), 65536

    Hey there,


    I have an Halloween gift for you all. i have been working for a few hours on official like element image on target window(See screens below).


    When you click on a mob if it is defined as elemental, it will open an element image in addition to the target window.


    Don't forget to hit the like button!


    (C) Metin2 guild wars - coded by [GA]Ruin - 27/10/2017 (I create custom metin2 systems in c++/python. if you want a custom system send me a pm and we can talk over skype).




    Client files:


    Let's begin!



    Server Side:


    Open service.h, add in the end:


    Code
    1. #define ELEMENT_TARGET




    Open char.cpp, search for

    Code
    1. else{p.dwVID = 0;p.bHPPercent = 0;}




    add below:


    Code
    1. #ifdef ELEMENT_TARGET const int ELEMENT_BASE = 11; DWORD curElementBase = ELEMENT_BASE; DWORD raceFlag; if (m_pkChrTarget && m_pkChrTarget->IsMonster() && (raceFlag = m_pkChrTarget->GetMobTable().dwRaceFlag) >= RACE_FLAG_ATT_ELEC) { for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i *= 2) { curElementBase++; int diff = raceFlag - i; if (abs(diff) <= 1024) break; } p.bElement = curElementBase - ELEMENT_BASE; } else { p.bElement = 0; } #endif




    open packet.h, search for:


    Code
    1. } TPacketGCTarget;


    add above:


    Code
    1. #ifdef ELEMENT_TARGETBYTE bElement;#endif




    Client side:


    open locale_inc.h, add in the end:


    Code
    1. #define ELEMENT_TARGET


    open packet.h, search for*


    Code
    1. } TPacketGCTarget;


    add above:


    Code
    1. #ifdef ELEMENT_TARGETBYTE bElement;#endif


    open PythonNetworkPhaseGame.cpp, look for:


    Code
    1. else if (pInstPlayer->CanViewTargetHP(*pInstTarget))


    replace below with the following:


    Code
    1. #ifdef ELEMENT_TARGET PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetHPTargetBoard", Py_BuildValue("(iii)", TargetPacket.dwVID, TargetPacket.bHPPercent, TargetPacket.bElement));#else PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetHPTargetBoard", Py_BuildValue("(ii)", TargetPacket.dwVID, TargetPacket.bHPPercent)); #endif


    open PythonApplicationModule.cpp, look for*


    Code
    1. #ifdef ENABLE_ENERGY_SYSTEM


    add above:


    Code
    1. #ifdef ELEMENT_TARGETPyModule_AddIntConstant(poModule, "ENABLE_VIEW_ELEMENT", 1);#elsePyModule_AddIntConstant(poModule, "ENABLE_VIEW_ELEMENT", 0);#endif


    open game.py, look for*

    Code
    1. def SetHPTargetBoard(self, vid, hpPercentage): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.Show()


    replace with:


    Code
    1. if app.ENABLE_VIEW_ELEMENT: def SetHPTargetBoard(self, vid, hpPercentage,bElement): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.SetElementImage(bElement) self.targetBoard.Show() else: def SetHPTargetBoard(self, vid, hpPercentage): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.Show()


    open uitarget.py, look for*


    Code
    1. import background


    add below:


    Code
    1. if app.ENABLE_VIEW_ELEMENT:ELEMENT_IMAGE_DIC = {1: "elect", 2: "fire", 3: "ice", 4: "wind", 5: "earth", 6 : "dark"}


    look for:


    Code
    1. self.isShowButton = False


    add below:


    Code
    1. if app.ENABLE_VIEW_ELEMENT:self.elementImage = None


    inside Destroy method, look for:

    Code
    1. self.__Initialize()


    add below:


    Code
    1. if app.ENABLE_VIEW_ELEMENT:self.elementImage = None


    inside ResetTargetBoard method, look for:


    Code
    1. self.hpGauge.Hide()


    add below:


    Code
    1. if app.ENABLE_VIEW_ELEMENT and self.elementImage:self.elementImage = None


    look for :


    Code
    1. def SetElementImage(self,elementId):


    add above:

    Code
    1. if app.ENABLE_VIEW_ELEMENT: def SetElementImage(self,elementId): try: if elementId > 0 and elementId in ELEMENT_IMAGE_DIC.keys(): self.elementImage = ui.ImageBox() self.elementImage.SetParent(self.name) self.elementImage.SetPosition(-60,-12) self.elementImage.LoadImage("d:/ymir work/ui/game/12zi/element/%s.sub" % (ELEMENT_IMAGE_DIC[elementId])) self.elementImage.Show() except: pass




    Compile server, client source and root pack and that's it!


    Enjoy!


    Happy halloween! :)


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.

    Hey there,
    I Have over 5 years of experience in programming, mostly in c++ and c#. I can program in python & Lua aswell.
    I'm offering my professional programming services:

    • Creating unique tools such as server management, file editor, etc.(C# WPF/Winforms)
    • Creating unique metin2 systems per request(i have coded a lot of complex metin2 systems from scratch(80% C++/20% Python & Lua).

    Programs that i made:

    Bitte melden Sie sich an, um dieses Bild zu sehen.

    Bitte melden Sie sich an, um dieses Bild zu sehen.



    And most of the metin2 systems i have developed are private, i can show you some examples in skype.


    My skype: guy_army2012
    Best Regards.

    Advanced Regen Editor
    I have worked in the past week on a new regen tool(made in C#-WPF) to make the life easier for the mappers/server owner between us.
    It is an advanced regen tool that includes all the basic functions + new ones such as:

    • mob/group file viewer.
    • Importing regen file.
    • Remember information - Remember the last data entered such as direction, respawn time,count etc.
    • Color Character by color(Mob-Red, Stone-Blue, Boss-turquoise, NPC-Belge, Group-Black).
    • Add a character - Left click.
    • Remove a character - right click on a character dot.
    • Load MOB/Group information - select mob_names.txt/group.txt to view information on a data grid(shown on screen shots below). When choosing a group.txt make sure you have type field set on group.
    • Ctrl Z Feature - Reverse action, that means that if you added a character it will be deleted and if you removed a character it will be added back.
    • Separation of exported files - Files will be exported upon the type of the map character, if you had stone,boss and npc character then stone.txt,boss.txt and npc.txt will be generated.

    If you find any bugs, please reply here with the bug information in specific details.
    Please Like this thread if you find my tool useful! Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um diesen Link zu sehen. Metin2 Guild Wars.
    Version 1.0 Download Link:


    Update 06/10/2017:

    • Zoom in/out feature has been added.
    • View entities seperately feature has been added.
    • Import regen bug has been fixed.

    Version 1.1 Download Link:


    Virus total: Bitte melden Sie sich an, um diesen Link zu sehen.
    Enjoy!!
    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.
    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Bitte melden Sie sich an, um dieses Bild zu sehen.