Jump to content

Randomize

Inactive Member
  • Posts

    46
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Randomize

  1. If you use Source, you can change it easily in Client bin.
    In PythonChat.cpp search this line:

    CGraphicText* pkDefaultFont = (iType == CPythonChat::WHISPER_TYPE_GM) ? static_cast<CGraphicText*>(DefaultItalicFont_GetResource()) : static_cast<CGraphicText*>(DefaultFont_GetResource());
    

    And change it to this:
     

    CGraphicText* pkDefaultFont = static_cast<CGraphicText*>(DefaultFont_GetResource());
    
    • Metin2 Dev 1
    • Love 1
  2. Hello again, finally I fount the solution for this bug! :D
     

    In char_quickslot.cpp Search this:

    void CHARACTER::SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos)

    Replace with this:

    void CHARACTER::SyncQuickslot(BYTE bType, WORD bOldPos, WORD bNewPos)

    Search this:

    bool CHARACTER::GetQuickslot(BYTE pos, TQuickslot ** ppSlot)

    Replace:

    bool CHARACTER::GetQuickslot(WORD pos, TQuickslot ** ppSlot)

    Search this:

    bool CHARACTER::SetQuickslot(BYTE pos, TQuickslot & rSlot)

    Replace:

    bool CHARACTER::SetQuickslot(WORD pos, TQuickslot & rSlot)

    Search this:

    bool CHARACTER::DelQuickslot(BYTE pos)

    Replace:

    bool CHARACTER::DelQuickslot(WORD pos)

    Search this:

    bool CHARACTER::SwapQuickslot(BYTE a, BYTE 

    Replace

    bool CHARACTER::SwapQuickslot(WORD a, WORD 

    Search this:

    void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos)

    Replace:

    void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos)

    Search this:

    if (bNewPos == 255)

    And replace the 255 with 400 for example.

     

    Search this in all files:

    SyncQuickslot(

    And where you find 255, replace them with 400. For example, I have this in char_item.cpp:

    SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255);

    And I have to replace it like this:

    SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 400);

    In char.h search this:

    void            SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos);

    Replace:

    void            SyncQuickslot(BYTE bType, WORD bOldPos, WORD bNewPos);

    Search this:

    bool            GetQuickslot(BYTE pos, TQuickslot ** ppSlot);

    Replace:

    bool            GetQuickslot(WORD pos, TQuickslot ** ppSlot);

    Search this:

    bool            SetQuickslot(BYTE pos, TQuickslot & rSlot);

    Replace:

    bool            SetQuickslot(WORD pos, TQuickslot & rSlot);

    Search this:

    bool            DelQuickslot(BYTE pos);

    Replace:

    bool            DelQuickslot(WORD pos);

    Search this:

    bool            SwapQuickslot(BYTE a, BYTE ;

    Replace:

    bool            SwapQuickslot(WORD a, WORD ;

    Search this:

    void            ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos);

    Replace:

    void            ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos);

    In packet.h search this:

    typedef struct command_quickslot_add
    {
        BYTE    header;
        BYTE    pos;
        TQuickslot    slot;
    } TPacketCGQuickslotAdd;
    
    typedef struct command_quickslot_del
    {
        BYTE    header;
        BYTE    pos;
    } TPacketCGQuickslotDel;
    
    typedef struct command_quickslot_swap
    {
        BYTE    header;
        BYTE    pos;
        BYTE    change_pos;
    } TPacketCGQuickslotSwap;

    Replace:

    typedef struct command_quickslot_add
    {
        BYTE    header;
        WORD    pos;
        TQuickslot    slot;
    } TPacketCGQuickslotAdd;
    
    typedef struct command_quickslot_del
    {
        BYTE    header;
        WORD    pos;
    } TPacketCGQuickslotDel;
    
    typedef struct command_quickslot_swap
    {
        BYTE    header;
        WORD    pos;
        WORD    change_pos;
    } TPacketCGQuickslotSwap;

    Search this:

    struct packet_quickslot_add
    {
        BYTE    header;
        BYTE    pos;
        TQuickslot    slot;
    };
    
    struct packet_quickslot_del
    {
        BYTE    header;
        BYTE    pos;
    };
    
    struct packet_quickslot_swap
    {
        BYTE    header;
        BYTE    pos;
        BYTE    pos_to;
    };

    Replace:

    struct packet_quickslot_add
    {
        BYTE    header;
        WORD    pos;
        TQuickslot    slot;
    };
    
    struct packet_quickslot_del
    {
        BYTE    header;
        WORD    pos;
    };
    
    struct packet_quickslot_swap
    {
        BYTE    header;
        WORD    pos;
        WORD    pos_to;
    };

    In common/tables.h search this:

    typedef struct SQuickslot
    {
        BYTE    type;
        BYTE    pos;
    } TQuickslot;

    Replace:

    typedef struct SQuickslot
    {
        BYTE    type;
        WORD    pos;
    } TQuickslot;

    Next, in the client, UserInterface/packet.h search this:

    typedef struct command_quickslot_add
    {
        BYTE        header;
        BYTE        pos;
        TQuickSlot    slot;
    }TPacketCGQuickSlotAdd;
    
    typedef struct command_quickslot_del
    {
        BYTE        header;
        BYTE        pos;
    }TPacketCGQuickSlotDel;
    
    typedef struct command_quickslot_swap
    {
        BYTE        header;
        BYTE        pos;
        BYTE        change_pos;
    }TPacketCGQuickSlotSwap;

    Replace:

    typedef struct command_quickslot_add
    {
        BYTE        header;
        WORD        pos;
        TQuickSlot    slot;
    }TPacketCGQuickSlotAdd;
    
    typedef struct command_quickslot_del
    {
        BYTE        header;
        WORD        pos;
    }TPacketCGQuickSlotDel;
    
    typedef struct command_quickslot_swap
    {
        BYTE        header;
        WORD        pos;
        WORD        change_pos;
    }TPacketCGQuickSlotSwap;

    Search this:

    typedef struct packet_quickslot_add
    {
        BYTE        header;
        BYTE        pos;
        TQuickSlot    slot;
    } TPacketGCQuickSlotAdd;
    
    typedef struct packet_quickslot_del
    {
        BYTE        header;
        BYTE        pos;
    } TPacketGCQuickSlotDel;
    
    typedef struct packet_quickslot_swap
    {
        BYTE        header;
        BYTE        pos;
        BYTE        change_pos;
    } TPacketGCQuickSlotSwap;

    Replace:

    typedef struct packet_quickslot_add
    {
        BYTE        header;
        WORD        pos;
        TQuickSlot    slot;
    } TPacketGCQuickSlotAdd;
    
    typedef struct packet_quickslot_del
    {
        BYTE        header;
        WORD        pos;
    } TPacketGCQuickSlotDel;
    
    typedef struct packet_quickslot_swap
    {
        BYTE        header;
        WORD        pos;
        WORD        change_pos;
    } TPacketGCQuickSlotSwap;

    In GameType.h search this:

    typedef struct SQuickSlot
    {
        BYTE Type;
        BYTE Position;
    } TQuickSlot;

    Replace:

    typedef struct SQuickSlot
    {
        BYTE Type;
        WORD Position;
    } TQuickSlot;

    In AbstractPlayer.h search this:

    virtual void    AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition) = 0;

    Replace:

    virtual void    AddQuickSlot(int QuickslotIndex, char IconType, WORD IconPosition) = 0;

    In PythonNetworkStream.h search this:

            bool SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos);
            bool SendQuickSlotDelPacket(BYTE wpos);
            bool SendQuickSlotMovePacket(BYTE wpos, BYTE change_pos);

    Replace:

            bool SendQuickSlotAddPacket(WORD wpos, BYTE type, WORD pos);
            bool SendQuickSlotDelPacket(WORD wpos);
            bool SendQuickSlotMovePacket(WORD wpos, WORD change_pos);

    In PythonNetworkStreamPhaseGameItem.cpp search this:

    bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos)

    Replace:

    bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos)

    Search this:

    bool CPythonNetworkStream::SendQuickSlotDelPacket(BYTE pos)

    Replace:

    bool CPythonNetworkStream::SendQuickSlotDelPacket(WORD pos)

    Search this:

    bool CPythonNetworkStream::SendQuickSlotMovePacket(BYTE pos, BYTE change_pos)

    Replace:

    bool CPythonNetworkStream::SendQuickSlotMovePacket(WORD pos, WORD change_pos)

    In PythonPlayer.cpp search this:

        for (BYTE i = 0; i < QUICKSLOT_MAX_NUM; ++i)

    Replace:

        for (WORD i = 0; i < QUICKSLOT_MAX_NUM; ++i)

    Search this:

        rkNetStream.SendQuickSlotMovePacket((BYTE) dwGlobalSrcSlotIndex, (BYTE)dwGlobalDstSlotIndex);

    Replace:

        rkNetStream.SendQuickSlotMovePacket((WORD) dwGlobalSrcSlotIndex, (WORD)dwGlobalDstSlotIndex);

    Search this:

        rkNetStream.SendQuickSlotAddPacket((BYTE)dwGlobalSlotIndex, (BYTE)dwWndType, (BYTE)dwWndItemPos);

    Replace:

        rkNetStream.SendQuickSlotAddPacket((WORD)dwGlobalSlotIndex, (BYTE)dwWndType, (WORD)dwWndItemPos);

    Search this:

                rkNetStream.SendQuickSlotAddPacket((BYTE)dwGlobalQuickSlotIndex, (BYTE)dwWndType, (BYTE)dwWndItemPos);

    Replace:

                rkNetStream.SendQuickSlotAddPacket((WORD)dwGlobalQuickSlotIndex, (BYTE)dwWndType, (WORD)dwWndItemPos);

    Search this:

        rkNetStream.SendQuickSlotDelPacket((BYTE)dwGlobalSlotIndex);

    Replace:

        rkNetStream.SendQuickSlotDelPacket((WORD)dwGlobalSlotIndex);

    Search this:

    void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, char IconPosition)

    Replace:

    void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, WORD IconPosition)

    In PythonPlayer.h search this:

            void    AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition);

    Replace:

            void    AddQuickSlot(int QuickslotIndex, char IconType, WORD IconPosition);

    Kind regards,

    Randomize

    • Love 5
  3. By the way , i already checked all columns in mob_proto for differences , nothing wrong. ( gold_min;gold_max )

     

    Run this query to find which mob has greater "min" value than "max" value:

     

    SELECT
    	mob_proto.vnum,
    	mob_proto.locale_name,
    	mob_proto.damage_min,
    	mob_proto.damage_max,
    	mob_proto.gold_min,
    	mob_proto.gold_max
    FROM
    	player.mob_proto
    WHERE
    	mob_proto.damage_min > mob_proto.damage_max
    OR mob_proto.gold_min > mob_proto.gold_max
    

    This will select rows where the gold_min greater than gold_max or damage_min greater than damage_max

  4. Hello!

     

    I tried to compile Client Binary in Visual Studio 2013, but I have errors. In VS2008 I was able to compile before I opened it in VS2013, but it upgraded the .sln file.
    Now I want to use VS2013 to compile. I have added the include and library folders to the projects, but now I have these errors:
     

    Error    3    error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(cryptlib.obj)
    Error    4    error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(cryptlib.obj)
    Error    5    error LNK2001: unresolved external symbol "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(gf2n.obj)
    Error    6    error LNK2001: unresolved external symbol "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(gf2n.obj)
    Error    7    error LNK2001: unresolved external symbol "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(integer.obj)
    Error    8    error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z)    D:SourceClientUserInterfacecryptlib-5.6.1MT.lib(integer.obj)
    Error    9    error LNK1120: 6 unresolved externals    D:SourceClientUserInterfaceReleasemetin2client.exe
    

    I hope anyone can help me solve this problem.

     

    Regards,
    Randomize

  5. Hello. As you can see in this video, you can't put anything in the last two slots of belt to the quickslot, because the quickslot uses the first two items in inventory. I tried everything to solve this but I failed. Anyone can help solve this?

    The problem is the last two slots' indexes are 256 and 257 which is higher than the Byte's maximum allowed value. Where I have to change this to make it work?

     

    Regards,

    Randomize.

  6. I tried change in the client binary too, but it  not works. I will try again later.

     

     


    The second: I want make the /shutdown command to instantly save the players' items after the server kick them out.

    Why's that relevant? It will flush most of the player's items and those who don't get flushed will get flushed when you shut it down.

     

    I don't like to wait 5-10 minutes after the /shutdown command to be sure all items and player informations (money, experience, level etc.). are saved.

  7. Open char_item.cpp, find this:

    bool CHARACTER::SwapItem(BYTE bCell, BYTE bDestCell)

    Add this above:

    #define VERIFY_MSG(exp, msg)  
    	if (true == (exp)) { 
    			ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); 
    			return false; 
    	}
    

    Now find this:

    if (item1 == item2)
    	{
    	    sys_log(0, "[WARNING][WARNING][HACK USER!] : %s %d %d", m_stName.c_str(), bCell, bDestCell);
    	    return false;
    	}

    And over that, add this:

    if (ITEM_BELT == item1->GetType() || ITEM_BELT == item2->GetType())
    		VERIFY_MSG(CBeltInventoryHelper::IsExistItemInBeltInventory(this), "ş§Ć® ŔÎşĄĹ丮żˇ ľĆŔĚĹŰŔĚ Á¸ŔçÇϸé ÇŘÁ¦ÇŇ Ľö ľř˝Ŕ´Ď´Ů.");

    Find this:

    bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)

    And above that, remove this ( we don't need define it twice) :

    #define VERIFY_MSG(exp, msg)  
    	if (true == (exp)) { 
    			ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); 
    			return false; 
    	}

    Tested, it works for me.

    (Sorry for my English is poor, there is still a lot to learn.)

    • Love 3
×
×
  • 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.