Jump to content

Problem with belt system slot


Recommended Posts

You need to have the correct belt slot index in inventorywindow.py and make it refresh in RefreshEquipSlotWindow (uiinventory.py).

That's what I have:

inventorywindow.py

						{
							"name" : "EquipmentSlot",
							"type" : "slot",

							"x" : 3,
							"y" : 3,

							"width" : 150,
							"height" : 182,

							"slot" : (
										{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
										{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
										{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
										{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, #belt slot
									),
						},

RefreshEquipSlotWindow (uiinventory.py)

	def RefreshEquipSlotWindow(self):
		getItemVNum=player.GetItemIndex
		getItemCount=player.GetItemCount
		setItemVNum=self.wndEquip.SetItemSlot
		for i in xrange(player.EQUIPMENT_PAGE_COUNT):
			slotNumber = player.EQUIPMENT_SLOT_START + i
			itemCount = getItemCount(slotNumber)
			if itemCount <= 1:
				itemCount = 0
			setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)

		if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
			for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
				slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
				itemCount = getItemCount(slotNumber)
				if itemCount <= 1:
					itemCount = 0
				setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
				print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)

 

Check what you are missing.

Link to comment
Share on other sites

9 minutes ago, Den said:

You need to have the correct belt slot index in inventorywindow.py and make it refresh in RefreshEquipSlotWindow (uiinventory.py).

That's what I have:

inventorywindow.py


						{
							"name" : "EquipmentSlot",
							"type" : "slot",

							"x" : 3,
							"y" : 3,

							"width" : 150,
							"height" : 182,

							"slot" : (
										{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
										{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
										{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
										{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, #belt slot
									),
						},

RefreshEquipSlotWindow (uiinventory.py)


	def RefreshEquipSlotWindow(self):
		getItemVNum=player.GetItemIndex
		getItemCount=player.GetItemCount
		setItemVNum=self.wndEquip.SetItemSlot
		for i in xrange(player.EQUIPMENT_PAGE_COUNT):
			slotNumber = player.EQUIPMENT_SLOT_START + i
			itemCount = getItemCount(slotNumber)
			if itemCount <= 1:
				itemCount = 0
			setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)

		if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
			for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
				slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
				itemCount = getItemCount(slotNumber)
				if itemCount <= 1:
					itemCount = 0
				setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
				print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)

 

Check what you are missing.

inventorywindow.py

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

 

 

uiinventory.py

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

 

 

 

All the same

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

5 minutes ago, netmarlis said:

Hm... Check in your binary source if item.EQUIPMENT_BELT equals WEAR_BELT + 180 on server source side.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Just now, netmarlis said:

 

Can you explain in more detail

common/length.h in server source:

enum EWearPositions -> WEAR_BELT

My WEAR_BELT is 23.

GameType.h in binary source:

const DWORD c_Equipment_Belt  = c_New_Equipment_Start + 2; //should equal server WEAR_BELT + 180, c_New_Equipment_Start equals 201 so 201+2=203

 

Link to comment
Share on other sites

13 minutes ago, Den said:

common/length.h in server source:

enum EWearPositions -> WEAR_BELT

My WEAR_BELT is 23.

GameType.h in binary source:


const DWORD c_Equipment_Belt  = c_New_Equipment_Start + 2; //should equal server WEAR_BELT + 180, c_New_Equipment_Start equals 201 so 201+2=203

 

 

 

common/length.h

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

 

GameType.h

 

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

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Good 1
Link to comment
Share on other sites

7 minutes ago, netmarlis said:

Look, you've inserted WEAR_COSTUME_ACCE before so now WEAR_BELT is 24 not 23.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Just now, netmarlis said:

What exactly do i have to do

 

 

The easiest way without touching the sashes is:

uiinventory.py (add setItemVNum(204, getItemVNum(204), itemCount)):

https://pastebin.com/eXspW58d

inventorywindow.py:

Instead of 

{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},

write

{"index":204, "x":39, "y":106, "width":32, "height":32},

 

Link to comment
Share on other sites

6 minutes ago, Den said:

The easiest way without touching the sashes is:

uiinventory.py (add setItemVNum(204, getItemVNum(204), itemCount)):

https://pastebin.com/eXspW58d

inventorywindow.py:

Instead of 


{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},

write


{"index":204, "x":39, "y":106, "width":32, "height":32},

 

 

 

uiinventory.py : https://metin2.download/picture/4ayNM5d0oQNn3G3s1j9Q1Y2o8Ediz3Bm/.png 

inventorywindow.py : https://metin2.download/picture/9t42Ne40TbqFJL8u349nCM6TPE1y6pQj/.png

 

syserr.txt error : 

 

0609 01:01:07877 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:134) __pack_import
system.py(line:110) _process_result
introSelect.py(line:18) <module>
system.py(line:134) __pack_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiInventory.py, line 751)

0609 01:01:07877 :: ============================================================================================================
0609 01:01:07878 :: Abort!!!!


 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

4 minutes ago, netmarlis said:

 

 

uiinventory.py : https://metin2.download/picture/hBbOEO7WFF8whWNCXq6pQMB1O2MSKfW4/.png 

inventorywindow.py : https://metin2.download/picture/uti2NCJFS6zp78TtviGrmine3v3Bb7cX/.png

 

syserr.txt error : 

 

0609 01:01:07877 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:134) __pack_import
system.py(line:110) _process_result
introSelect.py(line:18) <module>
system.py(line:134) __pack_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiInventory.py, line 751)

0609 01:01:07877 :: ============================================================================================================
0609 01:01:07878 :: Abort!!!!


 

 

Tabulations and spaces are really important in python. You must be using them properly like that:

https://metin2.download/picture/2h45kxpGABk8OMqn482Rl0XicMcEVKqL/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

10 minutes ago, Den said:

Tabulations and spaces are really important in python. You must be using them properly like that:

https://metin2.download/picture/2h45kxpGABk8OMqn482Rl0XicMcEVKqL/.png

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

The problem is still continuing :)
Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

2 minutes ago, Den said:

Ah, try to set itemCount to 0:

setItemVNum(204, getItemVNum(204), 0) #setting belt

https://metin2.download/picture/twjG929Y3qT54H5QZDz0S7omdmtq7EWZ/.png  Still the same :)

 

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

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

1 minute ago, Den said:

Maybe you've edited wrong inventorywindow.py? I have one in uiscript and one in locale/ui. That confused me once so maybe check it.

root = inventorywindow.py https://metin2.download/picture/Q0AgqAMu9MO1cYwDUmOPn5k0Bg5hU9mG/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

52 minutes ago, netmarlis said:

In uiinventory.py, function def SelectEmptySlot(self, selectedSlotPos), on the top write like this:

	def SelectEmptySlot(self, selectedSlotPos):
		chat.AppendChat(chat.CHAT_TYPE_INFO, "select empty slot %d" % selectedSlotPos)
		if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
			return

		

Then click on belt slot in game and show what you've got on chat.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

game syserlog : 

 

Jun  9 03:15:00.913284 :: vivoxy: USE_ITEM Keten Kemer +9 (inven 1, cell: 2)
Jun  9 03:15:02.72945 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 2)
Jun  9 03:15:02.833393 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)
Jun  9 03:15:03.511677 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 0)
Jun  9 03:15:04.273109 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)

 

 

 

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

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

4 minutes ago, netmarlis said:

game syserlog : 

 

Jun  9 03:15:00.913284 :: vivoxy: USE_ITEM Keten Kemer +9 (inven 1, cell: 2)
Jun  9 03:15:02.72945 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 2)
Jun  9 03:15:02.833393 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)
Jun  9 03:15:03.511677 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 0)
Jun  9 03:15:04.273109 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)

 

 

 

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

But after you click on empty belt slot game chat is showing nothing?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

1 minute ago, Den said:

But after you click on empty belt slot game chat is showing nothing?

no :)

 

https://metin2.download/picture/7qYV7Z55w6Oq32uqb76cbC3h6m2ZVFPH/.png

7 minutes ago, Den said:

But after you click on empty belt slot game chat is showing nothing?

https://metin2.download/picture/9l98PZ4PukJX9CGZeYvH7Tre4aQ31qnl/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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