Jump to content

Filiq

Inactive Member
  • Posts

    19
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Filiq

  1. 6 minutes ago, TMP4 said:

    I understand what you're saying but starting the db or any executable via console and via bash script is basicly the same, open start.sh via notepad, you'll se it just uses the ./db command.

    Does your vps is FreeBSD13.1? Since the VM is FreeBSD13.1, the vps should be too. Otherwise you need to make a new vm or x32 jail in your vps to compile.

    There was this fix what people used to apply: 

     

    I did not applied it to this serverfile because starting db worked for me every time, also burning a fixed locale is not a good idea since I gave 15 languages to choose from.. 😄
    But give it a try.

    yes i know is the same command, but in the start.sh is like ./db & if i do ./db & dosent work, if i delete & from exec same, dosent work :)) it s very very strange idk

    https://metin2.download/picture/269MP4W734tY4GYaTyAcHF0cK8Dp0gi5/.png

    i will try that fix 

  2. On 12/15/2022 at 9:47 PM, Filiq said:

    i'm trying for some hours to put the serverfile on a server, and i just get socket_connect: HOST 127.0.0.1:15000, could not connect. i changed ips, ports nothing.. dosen't work anything 

    syserr db
     

    SYSERR: Dec 15 21:43:16 :: Start: TABLE_POSTFIX not configured use default
    SYSERR: Dec 15 21:43:54 :: pid_init: 
    Start of pid: 2080
    

     

    so, after some time i noticed db.core, i dumped and i get this:
     

    Core was generated by `./db'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    Address not mapped to object.
    #0  0x20789ed2 in strtoul_l () from /lib/libc.so.7
    [Current thread is 1 (LWP 100222)]

    so the problem is like this:

    if i go to /usr/metin2/server/db and i run command ./db its working.

    if i run sh run.sh or i start the db in other way its crash and give that error, and if he crash and i try ./db same error, if i reboot the server and run ./db its working again :)) its so strange bcs i cant run the server with the bash script and i need to start everything from so many terminals :))

    and if i close the db or kill pid and try to start again, same error and to fix i need to reboot

    i hope you understand my english :)), i tried to get libc.so.7 from vdi and upload to my vps, but nothing, same result, with that lib.

    when i installed this

    cd /usr/ports/misc/compat9x/ && make install clean

    the command ./db start working but only in this way

  3. 1 hour ago, TMP4 said:

    Updated the Mega archive.

    2022.12.15: - Changed sql_mode in the VM from sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES to
                  sql_mode=NO_ENGINE_SUBSTITUTION in /usr/local/my.cnf to prevent DATA TRUNCATED errors with MySQL56.

    i'm trying for some hours to put the serverfile on a server, and i just get socket_connect: HOST 127.0.0.1:15000, could not connect. i changed ips, ports nothing.. dosen't work anything 

    syserr db
     

    SYSERR: Dec 15 21:43:16 :: Start: TABLE_POSTFIX not configured use default
    SYSERR: Dec 15 21:43:54 :: pid_init: 
    Start of pid: 2080
    

     

  4. i get this error in syserr

    networkModule.py(line:208) SetSelectCharacterPhase
    system.py(line:130) __pack_import
    system.py(line:110) _process_result
    introSelect.py(line:26) <module>
    system.py(line:130) __pack_import
    system.py(line:110) _process_result
    uiTarget.py(line:21) <module>
    uiTarget.py(line:23) TargetBoard
    uiTarget.py(line:24) InfoBoard
    
    networkModule.SetSelectCharacterPhase - <type 'exceptions.AttributeError'>:'module' object has no attribute 'ListBoxExNew'

    uiTarget.py https://metin2.download/picture/ZS43KkR3k5I58KaNP89HJ9RTh914IE5a/.png

    ui.py https://metin2.download/picture/Ojd50J04oH556sd04aQBSM6uWEa481w8/.png

    https://metin2.download/picture/EPD3Cwe6L9Q568HY3b93J0aeI8O3v3zp/.png

     

     

  5. 2 hours ago, TMP4 said:

    Thanks  for reporting this. It is because of the MySQL56 having sql_mode set to STRICT_TRANS_TABLES thefefore we can not save zeroth element to the size column because it is an "enum" type, it would be invalid, "enum" must have a specified element (from 1 to n) or null. To solve this we can either change sql_mode in my.cnf but I choose to just modify the size column from "enum" to "set" ("set" can be set for zeroth element), because it would be harder for people to configure the mysql server if they put it to vps. Also it is an unused column, not worth the hassle.

    So Mega archive updated:

    2022.12.14: - Fixed an issue with mob_proto size column after the MySQL56 update. Because MySQL56 have set sql_mode to
                  STRICT_TRANS_TABLES by default, we could not save zeroth element for an enum. The easiest solution is to
                  modify it from "enum" to "set", because we can set zeroth element for "set" type.
                - Added locale_string.txt translation for "´ő ŔĚ»ó ŔĚ ľĆŔĚĹŰŔ¸·Î ĽÓĽşŔ» Ăß°ˇÇŇ Ľö ľř˝Ŕ´Ď´Ů"; (6-7 bonus).

    You can modify the size column in navicat design table, just set size to "set". Or you can run this query:

    ALTER TABLE `mob_proto` MODIFY COLUMN `size`  set('SMALL','MEDIUM','BIG') CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT 'SMALL' AFTER `level`;
    


     ---------------------------------------------------------------------------
     

    I knew about these, yes the ;;, warnings, or even TRUE instead of True and stuffs like that can hurt eyes but since it is a reference serverfile and not advanced files, I kept everything as it was, unless it is a bug/exploit.

    But thanks for the list, it is useful and people can use it to tidy and improve their code.

     

    same error with other columns, i deleted STRICT_TRANS_tABLES from my.cnf, reinstall all the game files and now it's fixed.

  6. Hello, 

    ChildLoop: AsyncSQL: query failed: Data truncated for column 'size' at row 1 (query: replace into mob_proto (vnum, name, locale_name, type, rank, battle_type, level, size, ai_flag, setRaceFlag, setImmuneFlag, on_click, empire, drop_item, resurrection_vnum, folder, st, dx, ht, iq, damage_min, damage_max, max_hp, regen_cycle, regen_percent, exp, gold_min, gold_max, def, attack_speed, move_speed, aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item, enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow, resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, dam_multiply, summon, drain_sp, skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2, skill_vnum3, skill_level3, skill_vnum4, skill_level4, sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive) values (101, "??", "Wild Dog", 0, 0, 0, 1, 0, 0, 1, 0,

    in syserr db and in all database at 'size' is empty, same as in mob_proto.txt, i mention, i didn't change anything

    • Love 1
  7. yes i found the problem, problem is not with the function, well, with that function, we can see in this else if (!IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_GIVE | ITEM_ANTIFLAG_DROP) && GetParty()) "sub-function" from Pickupitem()

     

     

    Spoiler

               item->RemoveFromGround();

     

                if (item->IsDragonSoul())

                    item->AddToCharacter(owner, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));

                else

                    item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));

    the item at some point, its removed from ground, and after its verify if is some item for dragon soul, if isn't, is sent to inventory with the help from "AddToCharacter" function,

    Spoiler

    bool CItem::AddToCharacter(LPCHARACTER ch, TItemPos Cell)

    {

        assert(GetSectree() == NULL);

        assert(m_pOwner == NULL);

        WORD pos = Cell.cell;

        BYTE window_type = Cell.window_type;

       

        if (INVENTORY == window_type)

        {

            if (m_wCell >= INVENTORY_MAX_NUM && BELT_INVENTORY_SLOT_START > m_wCell)

            {

                sys_err("CItem::AddToCharacter: cell overflow: %s to %s cell %d", m_pProto->szName, ch->GetName(), m_wCell);

                return false;

            }

        }

        else if (DRAGON_SOUL_INVENTORY == window_type)

        {

            if (m_wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM)

            {

                sys_err("CItem::AddToCharacter: cell overflow: %s to %s cell %d", m_pProto->szName, ch->GetName(), m_wCell);

                return false;

            }

        }

     

        if (ch->GetDesc())

            m_dwLastOwnerPID = ch->GetPlayerID();

     

        event_cancel(&m_pkDestroyEvent);

     

        ch->SetItem(TItemPos(window_type, pos), this);

        m_pOwner = ch;

     

        Save();

        return true;

    }

    in this function we dont have nothing about to combine(i dont know what word to use) items.

    now how you can fix this?

     

    in Pickupitem if the item its pickup by the owner in this "sub-function": if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))

    we found this: item2->SetCount(item2->GetCount() + bCount2);

    item2 means, the slot from inventory with that item

    in the () means inventory slot + count item from the ground

     

    Spoiler

    bool CItem::SetCount(DWORD count)

    {

        if (GetType() == ITEM_ELK)

        {

            m_dwCount = MIN(count, INT_MAX);

        }

        else

        {

            m_dwCount = MIN(count, ITEM_MAX_COUNT);

        }

     

        if (count == 0 && m_pOwner)

        {

            if (GetSubType() == USE_ABILITY_UP || GetSubType() == USE_POTION || GetVnum() == 70020)

            {

                LPCHARACTER pOwner = GetOwner();

                WORD wCell = GetCell();

     

                RemoveFromCharacter();

     

                if (!IsDragonSoul())

                {

                    LPITEM pItem = pOwner->FindSpecifyItem(GetVnum());

     

                    if (NULL != pItem)

                    {

                        pOwner->ChainQuickslotItem(pItem, QUICKSLOT_TYPE_ITEM, wCell);

                    }

                    else

                    {

                        pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, wCell, 255);

                    }

                }

     

                M2_DESTROY_ITEM(this);

            }

            else

            {

                if (!IsDragonSoul())

                {

                    m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, m_wCell, 255);

                }

                M2_DESTROY_ITEM(RemoveFromCharacter());

            }

     

            return false;

        }

     

        UpdatePacket();

     

        Save();

        return true;

    }

    we can see here in this function, the items give with her, are stackable?

     

    sorry for the english, its not very good ik. 

     

    I think i give you too much of information, but i tell you all of this to know how to fix the bug, if you dont succeed in the end, i will do it for you, but try.

  8. i dont understand what is wrong in that gif bcs of the language, but the problem needs to be here

    	AFFECT_DICT = {
    		item.APPLY_MAX_HP : localeInfo.TOOLTIP_MAX_HP,
    		item.APPLY_MAX_SP : localeInfo.TOOLTIP_MAX_SP,
    		item.APPLY_CON : localeInfo.TOOLTIP_CON,
    		item.APPLY_INT : localeInfo.TOOLTIP_INT,
    		item.APPLY_STR : localeInfo.TOOLTIP_STR,
    		item.APPLY_DEX : localeInfo.TOOLTIP_DEX,
    		item.APPLY_ATT_SPEED : localeInfo.TOOLTIP_ATT_SPEED,
    		item.APPLY_MOV_SPEED : localeInfo.TOOLTIP_MOV_SPEED,
    		item.APPLY_CAST_SPEED : localeInfo.TOOLTIP_CAST_SPEED,
    		item.APPLY_HP_REGEN : localeInfo.TOOLTIP_HP_REGEN,
    		item.APPLY_SP_REGEN : localeInfo.TOOLTIP_SP_REGEN,
    		item.APPLY_POISON_PCT : localeInfo.TOOLTIP_APPLY_POISON_PCT,
    		item.APPLY_STUN_PCT : localeInfo.TOOLTIP_APPLY_STUN_PCT,
    		item.APPLY_SLOW_PCT : localeInfo.TOOLTIP_APPLY_SLOW_PCT,
    		item.APPLY_CRITICAL_PCT : localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,
    		item.APPLY_PENETRATE_PCT : localeInfo.TOOLTIP_APPLY_PENETRATE_PCT,
     
    		item.APPLY_ATTBONUS_WARRIOR : localeInfo.TOOLTIP_APPLY_ATTBONUS_WARRIOR,
    		item.APPLY_ATTBONUS_ASSASSIN : localeInfo.TOOLTIP_APPLY_ATTBONUS_ASSASSIN,
    		item.APPLY_ATTBONUS_SURA : localeInfo.TOOLTIP_APPLY_ATTBONUS_SURA,
    		item.APPLY_ATTBONUS_SHAMAN : localeInfo.TOOLTIP_APPLY_ATTBONUS_SHAMAN,
    		item.APPLY_ATTBONUS_MONSTER : localeInfo.TOOLTIP_APPLY_ATTBONUS_MONSTER,
     
    		item.APPLY_ATTBONUS_HUMAN : localeInfo.TOOLTIP_APPLY_ATTBONUS_HUMAN,
    		item.APPLY_ATTBONUS_ANIMAL : localeInfo.TOOLTIP_APPLY_ATTBONUS_ANIMAL,
    		item.APPLY_ATTBONUS_ORC : localeInfo.TOOLTIP_APPLY_ATTBONUS_ORC,
    		item.APPLY_ATTBONUS_MILGYO : localeInfo.TOOLTIP_APPLY_ATTBONUS_MILGYO,
    		item.APPLY_ATTBONUS_UNDEAD : localeInfo.TOOLTIP_APPLY_ATTBONUS_UNDEAD,
    		item.APPLY_ATTBONUS_DEVIL : localeInfo.TOOLTIP_APPLY_ATTBONUS_DEVIL,
    		item.APPLY_STEAL_HP : localeInfo.TOOLTIP_APPLY_STEAL_HP,
    		item.APPLY_STEAL_SP : localeInfo.TOOLTIP_APPLY_STEAL_SP,
    		item.APPLY_MANA_BURN_PCT : localeInfo.TOOLTIP_APPLY_MANA_BURN_PCT,
    		item.APPLY_DAMAGE_SP_RECOVER : localeInfo.TOOLTIP_APPLY_DAMAGE_SP_RECOVER,
    		item.APPLY_BLOCK : localeInfo.TOOLTIP_APPLY_BLOCK,
    		item.APPLY_DODGE : localeInfo.TOOLTIP_APPLY_DODGE,
    		item.APPLY_RESIST_SWORD : localeInfo.TOOLTIP_APPLY_RESIST_SWORD,
    		item.APPLY_RESIST_TWOHAND : localeInfo.TOOLTIP_APPLY_RESIST_TWOHAND,
    		item.APPLY_RESIST_DAGGER : localeInfo.TOOLTIP_APPLY_RESIST_DAGGER,
    		item.APPLY_RESIST_BELL : localeInfo.TOOLTIP_APPLY_RESIST_BELL,
    		item.APPLY_RESIST_FAN : localeInfo.TOOLTIP_APPLY_RESIST_FAN,
    		item.APPLY_RESIST_BOW : localeInfo.TOOLTIP_RESIST_BOW,
    		item.APPLY_RESIST_FIRE : localeInfo.TOOLTIP_RESIST_FIRE,
    		item.APPLY_RESIST_ELEC : localeInfo.TOOLTIP_RESIST_ELEC,
    		item.APPLY_RESIST_MAGIC : localeInfo.TOOLTIP_RESIST_MAGIC,
    		item.APPLY_RESIST_WIND : localeInfo.TOOLTIP_APPLY_RESIST_WIND,
    		item.APPLY_REFLECT_MELEE : localeInfo.TOOLTIP_APPLY_REFLECT_MELEE,
    		item.APPLY_REFLECT_CURSE : localeInfo.TOOLTIP_APPLY_REFLECT_CURSE,
    		item.APPLY_POISON_REDUCE : localeInfo.TOOLTIP_APPLY_POISON_REDUCE,
    		item.APPLY_KILL_SP_RECOVER : localeInfo.TOOLTIP_APPLY_KILL_SP_RECOVER,
    		item.APPLY_EXP_DOUBLE_BONUS : localeInfo.TOOLTIP_APPLY_EXP_DOUBLE_BONUS,
    		item.APPLY_GOLD_DOUBLE_BONUS : localeInfo.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS,
    		item.APPLY_ITEM_DROP_BONUS : localeInfo.TOOLTIP_APPLY_ITEM_DROP_BONUS,
    		item.APPLY_POTION_BONUS : localeInfo.TOOLTIP_APPLY_POTION_BONUS,
    		item.APPLY_KILL_HP_RECOVER : localeInfo.TOOLTIP_APPLY_KILL_HP_RECOVER,
    		item.APPLY_IMMUNE_STUN : localeInfo.TOOLTIP_APPLY_IMMUNE_STUN,
    		item.APPLY_IMMUNE_SLOW : localeInfo.TOOLTIP_APPLY_IMMUNE_SLOW,
    		item.APPLY_IMMUNE_FALL : localeInfo.TOOLTIP_APPLY_IMMUNE_FALL,
    		item.APPLY_BOW_DISTANCE : localeInfo.TOOLTIP_BOW_DISTANCE,
    		item.APPLY_DEF_GRADE_BONUS : localeInfo.TOOLTIP_DEF_GRADE,
    		item.APPLY_ATT_GRADE_BONUS : localeInfo.TOOLTIP_ATT_GRADE,
    		item.APPLY_MAGIC_ATT_GRADE : localeInfo.TOOLTIP_MAGIC_ATT_GRADE,
    		item.APPLY_MAGIC_DEF_GRADE : localeInfo.TOOLTIP_MAGIC_DEF_GRADE,
    		item.APPLY_MAX_STAMINA : localeInfo.TOOLTIP_MAX_STAMINA,
    		item.APPLY_MALL_ATTBONUS : localeInfo.TOOLTIP_MALL_ATTBONUS,
    		item.APPLY_MALL_DEFBONUS : localeInfo.TOOLTIP_MALL_DEFBONUS,
    		item.APPLY_MALL_EXPBONUS : localeInfo.TOOLTIP_MALL_EXPBONUS,
    		item.APPLY_MALL_ITEMBONUS : localeInfo.TOOLTIP_MALL_ITEMBONUS,
    		item.APPLY_MALL_GOLDBONUS : localeInfo.TOOLTIP_MALL_GOLDBONUS,
    		item.APPLY_SKILL_DAMAGE_BONUS : localeInfo.TOOLTIP_SKILL_DAMAGE_BONUS,
    		item.APPLY_NORMAL_HIT_DAMAGE_BONUS : localeInfo.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS,
    		item.APPLY_SKILL_DEFEND_BONUS : localeInfo.TOOLTIP_SKILL_DEFEND_BONUS,
    		item.APPLY_NORMAL_HIT_DEFEND_BONUS : localeInfo.TOOLTIP_NORMAL_HIT_DEFEND_BONUS,
    		item.APPLY_PC_BANG_EXP_BONUS : localeInfo.TOOLTIP_MALL_EXPBONUS_P_STATIC,
    		item.APPLY_PC_BANG_DROP_BONUS : localeInfo.TOOLTIP_MALL_ITEMBONUS_P_STATIC,
    		item.APPLY_RESIST_WARRIOR : localeInfo.TOOLTIP_APPLY_RESIST_WARRIOR,
    		item.APPLY_RESIST_ASSASSIN : localeInfo.TOOLTIP_APPLY_RESIST_ASSASSIN,
    		item.APPLY_RESIST_SURA : localeInfo.TOOLTIP_APPLY_RESIST_SURA,
    		item.APPLY_RESIST_SHAMAN : localeInfo.TOOLTIP_APPLY_RESIST_SHAMAN,
    		item.APPLY_MAX_HP_PCT : localeInfo.TOOLTIP_APPLY_MAX_HP_PCT,
    		item.APPLY_MAX_SP_PCT : localeInfo.TOOLTIP_APPLY_MAX_SP_PCT,
    		item.APPLY_ENERGY : localeInfo.TOOLTIP_ENERGY,
    		item.APPLY_COSTUME_ATTR_BONUS : localeInfo.TOOLTIP_COSTUME_ATTR_BONUS,
     
    		item.APPLY_MAGIC_ATTBONUS_PER : localeInfo.TOOLTIP_MAGIC_ATTBONUS_PER,
    		item.APPLY_MELEE_MAGIC_ATTBONUS_PER : localeInfo.TOOLTIP_MELEE_MAGIC_ATTBONUS_PER,
    		item.APPLY_RESIST_ICE : localeInfo.TOOLTIP_RESIST_ICE,
    		item.APPLY_RESIST_EARTH : localeInfo.TOOLTIP_RESIST_EARTH,
    		item.APPLY_RESIST_DARK : localeInfo.TOOLTIP_RESIST_DARK,
    		item.APPLY_ANTI_CRITICAL_PCT : localeInfo.TOOLTIP_ANTI_CRITICAL_PCT,
    		item.APPLY_ANTI_PENETRATE_PCT : localeInfo.TOOLTIP_ANTI_PENETRATE_PCT,
    	}
     
    	MAX_AFFECT_VALUE = {
    		0 : -1,
    		item.APPLY_MAX_HP : 2000,
    		item.APPLY_MAX_SP : 80,
    		item.APPLY_CON : 12,
    		item.APPLY_INT : 12,
    		item.APPLY_STR : 12,
    		item.APPLY_DEX : 12,
    		item.APPLY_ATT_SPEED : 8,
    		item.APPLY_MOV_SPEED : 20,
    		item.APPLY_CAST_SPEED : 20,
    		item.APPLY_HP_REGEN : 30,
    		item.APPLY_SP_REGEN : 30,
    		item.APPLY_POISON_PCT : 8,
    		item.APPLY_STUN_PCT : 8,
    		item.APPLY_SLOW_PCT : 8,
    		item.APPLY_CRITICAL_PCT : 10,
    		item.APPLY_PENETRATE_PCT : 10,
    		item.APPLY_ATTBONUS_WARRIOR : 15,
    		item.APPLY_ATTBONUS_ASSASSIN : 15,
    		item.APPLY_ATTBONUS_SURA : 20,
    		item.APPLY_ATTBONUS_SHAMAN : 15,
    		item.APPLY_ATTBONUS_MONSTER : 0,
    		item.APPLY_ATTBONUS_HUMAN : 10,
    		item.APPLY_ATTBONUS_ANIMAL : 20,
    		item.APPLY_ATTBONUS_ORC : 20,
    		item.APPLY_ATTBONUS_MILGYO : 20,
    		item.APPLY_ATTBONUS_UNDEAD : 20,
    		item.APPLY_ATTBONUS_DEVIL : 20,
    		item.APPLY_STEAL_HP : 10,
    		item.APPLY_STEAL_SP : 10,
    		item.APPLY_MANA_BURN_PCT : 10,
    		item.APPLY_DAMAGE_SP_RECOVER : 0,
    		item.APPLY_BLOCK : 15,
    		item.APPLY_DODGE : 15,
    		item.APPLY_RESIST_SWORD : 15,
    		item.APPLY_RESIST_TWOHAND : 15,
    		item.APPLY_RESIST_DAGGER : 15,
    		item.APPLY_RESIST_BELL : 15,
    		item.APPLY_RESIST_FAN : 15,
    		item.APPLY_RESIST_BOW : 15,
    		item.APPLY_RESIST_FIRE : 15,
    		item.APPLY_RESIST_ELEC : 15,
    		item.APPLY_RESIST_MAGIC : 15,
    		item.APPLY_RESIST_WIND : 15,
    		item.APPLY_REFLECT_MELEE : 10,
    		item.APPLY_REFLECT_CURSE : 0,
    		item.APPLY_POISON_REDUCE : 5,
    		item.APPLY_KILL_SP_RECOVER : 0,
    		item.APPLY_EXP_DOUBLE_BONUS : 20,
    		item.APPLY_GOLD_DOUBLE_BONUS : 20,
    		item.APPLY_ITEM_DROP_BONUS : 20,
    		item.APPLY_POTION_BONUS : 0,
    		item.APPLY_KILL_HP_RECOVER :0,
    		item.APPLY_IMMUNE_STUN : 1,
    		item.APPLY_IMMUNE_SLOW : 1,
    		item.APPLY_IMMUNE_FALL : 0,
    		item.APPLY_BOW_DISTANCE : 0,
    		item.APPLY_DEF_GRADE_BONUS : 0,
    		item.APPLY_ATT_GRADE_BONUS : 0,
    		item.APPLY_MAGIC_ATT_GRADE : 0,
    		item.APPLY_MAGIC_DEF_GRADE : 0,
    		item.APPLY_MAX_STAMINA : 0,
    		item.APPLY_MALL_ATTBONUS : 0,
    		item.APPLY_MALL_DEFBONUS : 0,
    		item.APPLY_MALL_EXPBONUS : 0,
    		item.APPLY_MALL_ITEMBONUS : 0,
    		item.APPLY_MALL_GOLDBONUS : 0,
    		item.APPLY_SKILL_DAMAGE_BONUS : 0,
    		item.APPLY_NORMAL_HIT_DAMAGE_BONUS : 0,
    		item.APPLY_SKILL_DEFEND_BONUS : 0,
    		item.APPLY_NORMAL_HIT_DEFEND_BONUS : 0,
    		item.APPLY_PC_BANG_EXP_BONUS : 0,
    		item.APPLY_PC_BANG_DROP_BONUS : 0,
    		item.APPLY_RESIST_WARRIOR : 15,
    		item.APPLY_RESIST_ASSASSIN : 15,
    		item.APPLY_RESIST_SURA : 15,
    		item.APPLY_RESIST_SHAMAN : 15,
    		item.APPLY_MAX_HP_PCT : 0,
    		item.APPLY_MAX_SP_PCT : 0,
    		item.APPLY_ENERGY : 0,
    		item.APPLY_COSTUME_ATTR_BONUS : 0,
    		item.APPLY_MAGIC_ATTBONUS_PER : 0,
    		item.APPLY_MELEE_MAGIC_ATTBONUS_PER : 0,
    		item.APPLY_RESIST_ICE : 0,
    		item.APPLY_RESIST_EARTH : 0,
    		item.APPLY_RESIST_DARK : 0,
    		item.APPLY_ANTI_CRITICAL_PCT : 0,
    		item.APPLY_ANTI_PENETRATE_PCT : 0,
    	}

    i think, if i get what you want to say.

     

    you need to look if the locale and the enum is the same like first with first, 2 with 2, you get it?

     

    edit:

    when i pasted i found the problem :))) lol

     

    from this:

    AFFECT_DICT = {
    		item.APPLY_MAX_HP : localeInfo.TOOLTIP_MAX_HP,

    to this:

    AFFECT_DICT = {
    		0 : -1,
    		item.APPLY_MAX_HP : localeInfo.TOOLTIP_MAX_HP,

     

    try and come back, ty

     

    edit2:

     

    and yea, how i believe this function combine locale(text) and values

    def __GetAffectString(self, affectType, affectValue):
    		if 0 == affectType:
    			return None
     
    		if 0 == affectValue:
    			return None
     
    		try:
    			return self.AFFECT_DICT[affectType](affectValue)
    		except TypeError:
    			return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue)
    		except KeyError:
    			return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue)

      

    your enum with text was -1 item than your values

  9. CountSpecifyItem(item_vnum)
    int pc_count_item(lua_State* L)
    	{
    		if (lua_isnumber(L, -1))
    			lua_pushnumber(L,CQuestManager::instance().GetCurrentCharacterPtr()->CountSpecifyItem((DWORD)lua_tonumber(L, -1)));
    		else if (lua_isstring(L, -1))
    		{
    			DWORD item_vnum;
    
    			if (!ITEM_MANAGER::instance().GetVnum(lua_tostring(L,1), item_vnum))
    			{
    				sys_err("QUEST count_item call error : wrong item name : %s", lua_tostring(L,1));
    				lua_pushnumber(L, 0);
    			}
    			else
    			{
    				lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->CountSpecifyItem(item_vnum));
    			}
    		}
    		else
    			lua_pushnumber(L, 0);
    
    		return 1;
    	}

    and this is the function, you can find her in char_item.cpp

    int CHARACTER::CountSpecifyItem(DWORD vnum) const
    {
    	int	count = 0;
    	LPITEM item;
    
    	for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
    	{
    		item = GetInventoryItem(i);
    		if (NULL != item && item->GetVnum() == vnum)
    		{
    			// ���� ������ ��ϵ� �����̸� �Ѿ��.
    			if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
    			{
    				continue;
    			}
    			else
    			{
    				count += item->GetCount();
    			}
    		}
    	}
    
    	return count;
    }

     

    • Love 1
  10. 13 hours ago, Filiq said:

    i get this error:

    In file included from char.cpp:66:
    ./MountSystem.h:53:10: error: no template named 'unordered_map' in namespace 'bo                                                                                        ost'; did you mean 'quest::unordered_map'?
            typedef boost::unordered_map<DWORD,     CMountActor*>           TMountAc                                                                                        torMap;
                    ^~~~~~~~~~~~~~~~~~~~
                    quest::unordered_map
    /usr/include/c++/v1/unordered_map:920:28: note: 'quest::unordered_map' declared                                                                                         here
    class _LIBCPP_TEMPLATE_VIS unordered_map

    should to type quest instead of boost??

    fixed, instead of boost i put "std"

  11. i get this error:

    In file included from char.cpp:66:
    ./MountSystem.h:53:10: error: no template named 'unordered_map' in namespace 'bo                                                                                        ost'; did you mean 'quest::unordered_map'?
            typedef boost::unordered_map<DWORD,     CMountActor*>           TMountAc                                                                                        torMap;
                    ^~~~~~~~~~~~~~~~~~~~
                    quest::unordered_map
    /usr/include/c++/v1/unordered_map:920:28: note: 'quest::unordered_map' declared                                                                                         here
    class _LIBCPP_TEMPLATE_VIS unordered_map

    should to type quest instead of boost??

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.