Jump to content

Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please

Reversed from 22.2.7.0 Official Binary.

Client part is from 2018 Official Root.

You can set different colors:

.gif

Spoiler
self.wndItem.SetSlotDiffuseColor(i, wndMgr.COLOR_TYPE_YELLOW)

 

Edited by Mali
  • Metin2 Dev 493
  • kekw 1
  • Eyes 7
  • Dislove 7
  • Angry 2
  • Not Good 2
  • Cry 2
  • Smile Tear 1
  • Think 5
  • Confused 5
  • Scream 3
  • Lmao 1
  • Good 136
  • muscle 1
  • Love 31
  • Love 283

 

Link to comment
https://metin2.dev/topic/27963-official-pickup-slot-effect-reversed/
Share on other sites

I'm getting this error

Spoiler

0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0924 16:27:16495 :: Traceback (most recent call last):

0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

0924 16:27:16495 :: SystemError
0924 16:27:16495 :: : 
0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

 

Edited by rares2017
  • Metin2 Dev 1
  • Good 1
  • Love 1
9 hours ago, rares2017 said:

I'm getting this error

  Reveal hidden contents

0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0924 16:27:16495 :: Traceback (most recent call last):

0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

0924 16:27:16495 :: SystemError
0924 16:27:16495 :: : 
0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

 

pythonutils.cpp 

https://pastebin.com/ 20PmKT5WcX

pythonutils.h

https://pastebin.com/ ar70SR4c

(Delete space after /)

 

Edited by Etzhel
  • Metin2 Dev 3
  • Good 4
  • Love 3
  • Honorable Member

I checked for other pages and there is no problem with that.

please do not paste your files here, use pastebin.

and do not spam here, write him in pm.

  • Good 1

 

4 hours ago, Mali said:

I checked for other pages and there is no problem with that.

Do you mind sharing your uiinventory.py?

#Edit

I already did it. Thanks for the release!

Edited by Fryxion
  • Metin2 Dev 1
1 hour ago, EAkar said:

The effect comes when an object comes to the 2nd inventory. But when you move the mouse over the object, the effect does not go away.

I do not recommend using any of the systems it shares. It's always causing trouble and it's problematic. It also does not offer support.

Keep using Lent's reflection system and using the martysama highlight system. Because they are the best.

System it's working very well:
https://metin2.download/video/RZDy3YOtC8YauoW83ULww0GU2SXtJl76/.mp4

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 3
  • Good 2
  • Love 3
  • Honorable Member
13 minutes ago, rares2017 said:

Great example for using different colors.

s5hLPmi.png

thank you ?

Edited by Metin2 Dev
Core X - External 2 Internal
  • Good 1
  • Love 2

 

@Mali flash not work

Syserr:
 

0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0924 16:27:16495 :: Traceback (most recent call last):

0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

0924 16:27:16495 :: SystemError
0924 16:27:16495 :: : 
0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

1 hour ago, Maze said:

@Mali flash not work

Syserr:
 

0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0924 16:27:16495 :: Traceback (most recent call last):

0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

0924 16:27:16495 :: SystemError
0924 16:27:16495 :: : 
0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

ScriptLib/PythonUtils.cpp
comment #define PyLong_AsUnsignedLong PyLong_AsUnsignedLongLong.

  • Honorable Member
2 hours ago, Maze said:

@Mali flash not work

Syserr:
 

0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0924 16:27:16495 :: Traceback (most recent call last):

0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

0924 16:27:16495 :: SystemError
0924 16:27:16495 :: : 
0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

FIXED

 

@Mali
                    if constInfo.IS_BLEND_POTION_PERM(itemVnum):
                        r, g, b = (255.00 / 255.0), (102.00 / 255.0), (178.00 / 255.0)
                    elif constInfo.IS_BLEND_POTION_NORM(itemVnum):
                        r, g, b = (255.00 / 200.0), (255.00 / 255.0), (204.00 / 255.0)
                    else:
                        r, g, b = (153.00 / 200.0), (76.00 / 255.0), (0.00 / 255.0)

how do i use for example here?

5 minutes ago, Maze said:

@Mali
                    if constInfo.IS_BLEND_POTION_PERM(itemVnum):
                        r, g, b = (255.00 / 255.0), (102.00 / 255.0), (178.00 / 255.0)
                    elif constInfo.IS_BLEND_POTION_NORM(itemVnum):
                        r, g, b = (255.00 / 200.0), (255.00 / 255.0), (204.00 / 255.0)
                    else:
                        r, g, b = (153.00 / 200.0), (76.00 / 255.0), (0.00 / 255.0)

how do i use for example here?

 if constInfo.IS_BLEND_POTION_PERM(itemVnum):
                isActivated = 0 != metinSocket[1]
                if isActivated:
                    self.wndItem.ActivateSlot(i)
                    self.wndItem.SetSlotDiffuseColor(i, wndMgr.COLOR_TYPE_PURPLE) (or whatever color you want)
                    self.wndItem.SetSlotFlashEffect(i, True)
                else:
                    self.wndItem.DeactivateSlot(i)

  • Good 1

I took a look at this system, it is a bit nonsensical because after throwing and collecting an item (the same), the effect of receiving in the inventory reappears.  An interesting solution with blinking, although it requires a bit of refinement.

19 minutes ago, Crowlai said:

I took a look at this system, it is a bit nonsensical because after throwing and collecting an item (the same), the effect of receiving in the inventory reappears.  An interesting solution with blinking, although it requires a bit of refinement.

Why would that be nonsensical? The works just fine. You pick up something (same item or not) and it gets all flashy so you know you just picked that up.  Say you didn t have this and you threw away an item that you don t want and by mistake you pick it up again, now you don t know about it but with this you are sure to know you ve picked it up again by mistake.

1 hour ago, Crowlai said:

I took a look at this system, it is a bit nonsensical because after throwing and collecting an item (the same), the effect of receiving in the inventory reappears.  An interesting solution with blinking, although it requires a bit of refinement.

I also like to have the items not flash when dropping them from the inventory and picking them up. For anyone who wants to achieve this:

item.h

Spoiler

Search for:

DWORD		GetLastOwnerPID()	{ return m_dwLastOwnerPID; }

Add:

void		SetLastOwnerPID(DWORD pid) { m_dwLastOwnerPID = pid; }

 

item.cpp @ bool CItem::AddToCharacter(LPCHARACTER ch, TItemPos Cell, bool bHighlight)

Spoiler

Search for:

	if (ch->GetDesc())
		m_dwLastOwnerPID = ch->GetPlayerID();

Add ABOVE:

	if (bHighlight)
		bHighlight = this->GetLastOwnerPID() != ch->GetPlayerID();

 

input_db.cpp @ void CInputDB::ItemLoad(LPDESC d, const char* c_pData)

Spoiler

Search for:

item->SetAttributes(p->aAttr);

Add under:

item->SetLastOwnerPID(p->owner);

 

 

Edited by blanco
  • Love 1
On 10/3/2021 at 10:40 PM, narcisxb said:

Did anyone solve for AUTO POTS? Effect won t work anymore.

I solved mine just changing "ActivateSlot" to "ActivateSlotOld". 

 

If that didn't solve your problem, pm me.

Edited by Fryxion

#find

        if player.DRAGON_SOUL_INVENTORY == inven_type:
            if app.ENABLE_DRAGON_SOUL_SYSTEM:
                self.wndDragonSoul.HighlightSlot(inven_pos)

#change

        elif player.INVENTORY == inven_type:
            if app.ENABLE_HIGHLIGHT_SYSTEM:
                self.wndInventory.HighlightSlot(inven_pos)

 

 

Edited by Giecu

uiCharacter.py(line:401) __LoadWindow
uiCharacter.py(line:250) __BindObject
uiCharacter.py(line:292) __SetEmotionSlot

CharacterWindow.__LoadWindow - <type 'exceptions.AttributeError'>:'GridSlotWindow' object has no attribute 'SetSelectItemSlotEvent'

1018 18:06:24345 :: ============================================================================================================
1018 18:06:24345 :: Abort!!!!

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.