Jump to content

cjunior2011

Inactive Member
  • Posts

    54
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by cjunior2011

  1. On 7/21/2019 at 12:29 PM, nonnorulez said:

    Ty man, i took your advice and the syserrs now say: 

    image.thumb.png.530c372b4ab3c2421c99d7315b2e5e36.png

    I tryed to write "import uiToolTip"  on uiinventory.py

    But i have this error:

    image.png.52dc24d67f7a2c033bdf0d7bc4b4f657.png

     

    How can i solve?  Thanks to everyone for advice and availability . 

    i have this same problem :(

  2. On 6/7/2019 at 11:18 PM, cjunior2011 said:

    @Mali61 i have a problem with v2

    error:

      Reveal hidden contents
    
    
    0607 23:00:06787 :: ui:2291: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
    
    0607 23:00:06789 :: 
    uiInventory.py(line:519) __LoadWindow
    uiToolTip.py(line:514) AppendTextLine
    uiToolTip.py(line:207) AppendTextLine
    uiToolTip.py(line:243) ResizeToolTip
    ui.py(line:2291) SetSize
    
    InventoryWindow.LoadWindow.BindObject - <type 'exceptions.RuntimeError'>:Not yet select item data
    
    0607 23:00:06789 :: ============================================================================================================
    0607 23:00:06789 :: Abort!!!!

     

     

    up

  3. Hello again,

    I got tips from all the answers and my final code was this:

    		elif itemType == item.ITEM_TYPE_COSTUME and itemSubType == item.COSTUME_TYPE_MOUNT:
    			MountVnum = item.GetValue(1)
    			if MountVnum != 0:
    				self.__ModelPreview(itemVnum, 2, MountVnum)

    Thanks to all who responded, great day! 

    #Solved

  4. 15 hours ago, ѕeмa™ said:

    You must send the vnum of the mount.

    I dont know if you save that value in Value4 but as i see in your gif is not working.

    Maybe you should try to make a dictionary with the vnum of the seals and the mount vnum, i know is not the best solution, but it could work.

    Example:

    
    PetsAndMounts = {
    					53001 :  34001,
    					53002 :  34002,
    					53003 :  34003,
    					53005 :  34004,
    }
    
    if PetsAndMounts.has_key(itemVnum):
    	renderTarget.SelectModel(2, PetsAndMounts[itemVnum])

    I hope this can help you.

    I edited his code to look like the code that is already working on costumes and armor and it looks like this:

     

    PetsAndMounts = {
    					71186 :  20249,
    }
    
    		if PetsAndMounts.has_key(itemVnum):
    			self.__ModelPreview(itemVnum, 2, PetsAndMounts[itemVnum])

     

    result.. that's work!!

    Screenshot_2.png.fe9bf14da36a6f35f86acf7b1db08776.png

     

    but is it possible to improve this code so I do not have to add all mounts manually? :D

    btw ty for de help!

  5. 15 hours ago, ѕeмa™ said:

    You must send the vnum of the mount.

    I dont know if you save that value in Value4 but as i see in your gif is not working.

    Maybe you should try to make a dictionary with the vnum of the seals and the mount vnum, i know is not the best solution, but it could work.

    Example:

    
    PetsAndMounts = {
    					53001 :  34001,
    					53002 :  34002,
    					53003 :  34003,
    					53005 :  34004,
    }
    
    if PetsAndMounts.has_key(itemVnum):
    	renderTarget.SelectModel(2, PetsAndMounts[itemVnum])

    I hope this can help you.

     

    my mount system protos with npc nvum value0, right?
     

    Spoiler

    [...]    ADDON_VALUE2    VALUE0    VALUE1    VALUE2    VALUE3    VALUE4    VALUE5    Specular    SOCKET    ATTU_ADDON


    [...]    28800    20114    0    0    0    0    0    0    0    0

     

    7 hours ago, Meruem said:

    if you use mounts by value it is better that way.
    elif itemType == item.ITEM_TYPE_COSTUME and itemSubType == item.COSTUME_TYPE_MOUNT:
      MountVnum = item.GetValue(3)
      if MountVnum  != 0:
          self._ModelPreview(MountVnum )


    if not, use the style of the code that showed if you want something better in tec post the complete code.
     

    btw this dont work, nothing happen :(

  6. I have a problem to show the rendering only seals of mounts and pets please

    i try this:
     

            elif item.ITEM_TYPE_COSTUME == itemType:
                if itemSubType == item.COSTUME_TYPE_MOUNT:
                    MountVnum = item.GetValue(4)
                    if MountVnum != 0:
                        self.__ModelPreview(MountVnum)

     

    and this:

                            elif item.GetItemType() == item.ITEM_COSTUME:
                                if item.GetItemSubType() == item.COSTUME_TYPE_MOUNT:
                                    MountVnum = item.GetValue(4)
                                    if MountVnum != 0:
                                        self.__ModelPreview(MountVnum)

     

    but nothing happen:

    OYA4j67.gif

  7. Move this line 1542:
     

    void RegisterGlobalFunctionTable(lua_State* L)

     

    to before this 1620:

    	{
    		extern int quest_setstate(lua_State* L);
    
    		luaL_reg global_functions[] =
    		{
    			{	"sys_err",					_syserr					},
    			{	"sys_log",					_syslog					},
    			{	"char_log",					_char_log				},
    			{	"item_log",					_item_log				},
    			{	"set_state",				quest_setstate			},
    			{	"set_skin",					_set_skin				},

     

    like this:

    Spoiler
    
    	//[...]
    	}
    
    	int _mysql_direct_query(lua_State* L)
    	{
    		// char szQuery[1024];
    
    		if (!lua_isstring(L, 1))
              
    		//[...]
    
    
    		else { lua_pushnumber(L, 0); lua_newtable(L); }
    
    		// delete pMsg;
    		return 2;
    	}
    	
    	void RegisterGlobalFunctionTable(lua_State* L)
    	{
    		extern int quest_setstate(lua_State* L);
    
    		luaL_reg global_functions[] =
    		{
    			{	"sys_err",					_syserr					},
    			{	"sys_log",					_syslog					},
    			{	"char_log",					_char_log				},
    			{	"item_log",					_item_log				},
    			{	"set_state",				quest_setstate			},
              //[...]

     

     

    • Love 2
  8. @Mali61 i have a problem with v2

    error:

    Spoiler
    
    0607 23:00:06787 :: ui:2291: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
    
    0607 23:00:06789 :: 
    uiInventory.py(line:519) __LoadWindow
    uiToolTip.py(line:514) AppendTextLine
    uiToolTip.py(line:207) AppendTextLine
    uiToolTip.py(line:243) ResizeToolTip
    ui.py(line:2291) SetSize
    
    InventoryWindow.LoadWindow.BindObject - <type 'exceptions.RuntimeError'>:Not yet select item data
    
    0607 23:00:06789 :: ============================================================================================================
    0607 23:00:06789 :: Abort!!!!

     

     

    code:

    Spoiler

    MN5RJ7X.png

    syserr codes:
     

    Spoiler

    Stm7Vf3.png

    -

    2Yh7CqU.png

    what did I do wrong?

    • Metin2 Dev 1
  9. 21 hours ago, IShungite said:

    Try :
     

    def Close(self):
            chat.ClearWhisper(self.targetName)

            if app.ENABLE_WHISPER_RENEWAL:
                if self.targetName != 0:
                    if whisper.IsSended(self.targetName) and self.targetName:
                        whisper.Remove(self.targetName)

    #Solved
    thank u very much, its solved my problem, @IShungite

    • Love 1
  10. On 5/25/2019 at 12:00 AM, jeddawee said:

    @cjunior2011

    there is other soulbind system with different coding , search for it 

     

    i suggest you to delete this system and install the other one 

    this problem happens with any item after restarting the server, I think it is not because of the soulbind system, I need to do some tests without enabling the system and testing with clean files without any system, thank you anyway!

  11. 9 hours ago, OtherChoice said:

    please show this struct of your client binary (or the second one in case you client uses it). You can check whether is used in bool CPythonNetworkStream::RecvSafeBoxSetPacket() (PythonNetworkStreamPhaseGame.cpp)

    
    typedef struct packet_set_item
    {
    	BYTE		header;
    	TItemPos	Cell;
    	DWORD		vnum;
    	BYTE		count;
    	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    } TPacketGCItemSet;
    typedef struct packet_set_item2
    {
    	BYTE		header;
    	TItemPos	Cell;
    	DWORD		vnum;
    	BYTE		count;
    	DWORD		flags;	// Ç÷¡±× Ãß°¡
    	DWORD		anti_flags;	// Ç÷¡±× Ãß°¡
    	bool		highlight;
    	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    } TPacketGCItemSet2;

    from server/common in tables.h show

    
    typedef struct SPlayerItem
    {
    	DWORD	id;
    	BYTE	window;
    	WORD	pos;
    	DWORD	count;
    
    	DWORD	vnum;
    	long	alSockets[ITEM_SOCKET_MAX_NUM];	// 소켓번호
    
    	TPlayerItemAttribute    aAttr[ITEM_ATTRIBUTE_MAX_NUM];
    
    	DWORD	owner;
    } TPlayerItem;

    and from client binary in GameType.h show

    
    typedef struct packet_item
    {
        DWORD       vnum;
        BYTE        count;
    	DWORD		flags;
    	DWORD		anti_flags;
    	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    } TItemData;

     

    Spoiler
    
    typedef struct packet_set_item
    {
        BYTE        header;
        BYTE        pos;
        DWORD        vnum;
        BYTE        count;
        DWORD        flags;    // 플래그 추가
        long        alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    #ifdef ENABLE_SOULBIND_SYSTEM
        long        sealbind;
    #endif
    } TPacketGCItemSet;
    
    typedef struct packet_set_item2
    {
        BYTE        header;
        TItemPos    Cell;
        DWORD        vnum;
        BYTE        count;
        DWORD        flags;    // 플래그 추가
        DWORD        anti_flags;    // 플래그 추가
        bool        highlight;
        long        alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    #ifdef ENABLE_SOULBIND_SYSTEM
        long        sealbind;
    #endif
    } TPacketGCItemSet2;

     

     

    Spoiler
    
    typedef struct SPlayerItem
    {
    	DWORD	id;
    	BYTE	window;
    	WORD	pos;
    	DWORD	count;
    
    	DWORD	vnum;
    	long	alSockets[ITEM_SOCKET_MAX_NUM];	// 소켓번호
    
    	TPlayerItemAttribute    aAttr[ITEM_ATTRIBUTE_MAX_NUM];
    
    	DWORD	owner;
    #ifdef ENABLE_SOULBIND_SYSTEM
    	long	sealbind;
    #endif
    } TPlayerItem;

     

     

    Spoiler
    
    typedef struct packet_item
    {
    	DWORD		vnum;
    	BYTE		count;
    	DWORD		flags;
    	DWORD		anti_flags;
    	long		alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
    	TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    #ifdef ENABLE_SOULBIND_SYSTEM
    	long		sealbind;
    #endif
    } TItemData;

     

     

    CPythonNetworkStream::RecvSafeBoxSetPacket(): PythonNetworkStreamPhaseGameItem.cpp*

    Spoiler
    
    bool CPythonNetworkStream::RecvSafeBoxSetPacket()
    {
    	TPacketGCItemSet2 kItemSet;
    	if (!Recv(sizeof(kItemSet), &kItemSet))
    		return false;
    
    	TItemData kItemData;
    	kItemData.vnum	= kItemSet.vnum;
    	kItemData.count = kItemSet.count;
    	kItemData.flags = kItemSet.flags;
    	kItemData.anti_flags = kItemSet.anti_flags;
    	for (int isocket=0; isocket<ITEM_SOCKET_SLOT_MAX_NUM; ++isocket)
    		kItemData.alSockets[isocket] = kItemSet.alSockets[isocket];
    	for (int iattr=0; iattr<ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++iattr)
    		kItemData.aAttr[iattr] = kItemSet.aAttr[iattr];
    #ifdef ENABLE_SOULBIND_SYSTEM
    	kItemData.sealbind = kItemSet.sealbind;
    #endif
    	CPythonSafeBox::Instance().SetItemData(kItemSet.Cell.cell, kItemData);
    
    	__RefreshSafeboxWindow();
    
    	return true;
    }

     

     

  12. On 5/8/2019 at 11:24 AM, WeedHex said:

    It's like official.

    Item block = Can't go out from the ACCOUNT -> not just from char.

     

    Btw if you want to block there too:

    File: input_main.cpp

    Find for:  "void CInputMain::SafeboxCheckin"

    Find this if:   "if (true == pkItem->isLocked())"

     

    Add this new check after:

      Reveal hidden contents

    #ifdef ENABLE_SOULBIND_SYSTEM
        if (pkItem->IsBind() || pkItem->IsUntilBind())
        {
            ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
            return;
        }
    #endif

     

    New problem :(

    after reset server items equiped or with bind they looked like this:

    equiped item:

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    item that was bind / bound / blocked:

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    any solution or is it normal to lose the bind after resetting the server?

  13. 11 hours ago, OtherChoice said:

    Did you tried getting back the item from the storage? does it get binding back or is it still lost?

    when I take the item out of the warehouse, it continues without the bind/lock.

     

    2 hours ago, WeedHex said:

    It's like official.

    Item block = Can't go out from the ACCOUNT -> not just from char.

     

    Btw if you want to block there too:

    File: input_main.cpp

    Find for:  "void CInputMain::SafeboxCheckin"

    Find this if:   "if (true == pkItem->isLocked())"

     

    Add this new check after:

      Hide contents

    #ifdef ENABLE_SOULBIND_SYSTEM
        if (pkItem->IsBind() || pkItem->IsUntilBind())
        {
            ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
            return;
        }
    #endif

     

    I'll test this, thx.

    edit: I adapted your code to my system and it worked perfectly, thank you @OtherChoice and @WeedHex! #SOLVED

    #ifdef ENABLE_SOULBIND_SYSTEM
        if (pkItem->IsSealed())
        {
            ch->ChatPacket(CHAT_TYPE_INFO, "Can't put sealed items in the warehouse");
            return;
        }
    #endif

     

    image.png.e403b162000e70db8c73b27d8de3ae2c.png

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