Jump to content

GF-Like Inventory Slot Marking System


Recommended Posts

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

M2 Download Center Download Here ( Internal ) Hello everyone. It's a good day to share an old code with you. First of all you need to know: I don't help to install it. Don't even take the contact with me about it. The whole code is written by me, and reversed from official binaries. At the beginning do a backup for your files(srcs+pys) and READ CAREFULLY the readme. W/o brain.exe please close this tab, or your browser, thank you for your underst

Let's start to learn minimal c++ knowledge or use the google.  

Posted Images

  • 4 weeks later...
  • VIP
0129 19:54:19095 :: Traceback (most recent call last):

0129 19:54:19095 ::   File "networkModule.py", line 247, in SetGamePhase

0129 19:54:19096 ::   File "game.py", line 99, in __init__

0129 19:54:19096 ::   File "interfaceModule.py", line 352, in MakeInterface

0129 19:54:19096 ::   File "interfaceModule.py", line 181, in __MakeWindows

0129 19:54:19096 ::   File "uiInventory.py", line 266, in __init__

0129 19:54:19096 ::   File "uiInventory.py", line 375, in __LoadWindow

0129 19:54:19096 ::   File "uiInventory.py", line 293, in BindWindow

0129 19:54:19097 :: AttributeError
0129 19:54:19097 :: : 
0129 19:54:19097 :: 'InventoryWindow' object has no attribute 'bindWnds'
0129 19:54:19097 :: 

Hy guys!

 

I have problem ?

spacer.png

Link to post
  • 2 weeks later...
  • VIP

The system is working great on Martysama's source. I had the problem with the inventory pages at first.

A hint: do not use the edits on the comparable files he is just giving an example of how the files should look like.

https://gyazo.com/4b302305ba1c3c26ce25b24d2e2a6e5d

 

@HUNgarocel1

 

spacer.png

 

Check edits on uiinventory.py.

 

Edited by Anix
  • Love 1

Trying to bring the old metin2 to life.

@Caramelito

Link to post
  • 2 weeks later...
  • 4 weeks later...
  • VIP

Got this problem

 

'NoneType' object has no attribute 'GetInventoryType'

 

	if app.WJ_ENABLE_TRADABLE_ICON:
		def CantTradableItem(self, destSlotIndex, srcSlotIndex):
			if app.ENABLE_SPECIAL_INVENTORY:
				invenType = player.GetSpecialInventoryTypeByGlobalSlot(srcSlotIndex)
				if invenType == player.INVENTORY_TYPE_INVENTORY:
					itemInvenPage = srcSlotIndex / player.INVENTORY_PAGE_SIZE
					localSlotPos = srcSlotIndex - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
				else:
					(specialSlotStart, specialSlotEnd) = player.GetSpecialInventoryRange(invenType)
					specialInventorySlot = srcSlotIndex - specialSlotStart
					itemInvenPage = specialInventorySlot / player.INVENTORY_PAGE_SIZE
					localSlotPos = specialInventorySlot - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
					
				self.lockedItems[destSlotIndex] = (invenType, itemInvenPage, localSlotPos)

				if self.wndInventory.GetInventoryType() == invenType and self.wndInventory.GetInventoryPageIndex() == itemInvenPage and self.IsShow():
					self.wndInventory.wndItem.SetCantMouseEventSlot(localSlotPos)

			else:
				itemInvenPage = srcSlotIndex / player.INVENTORY_PAGE_SIZE
				localSlotPos = srcSlotIndex - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
				self.lockedItems[destSlotIndex] = (itemInvenPage, localSlotPos)
				if self.wndInventory.GetInventoryPageIndex() == itemInvenPage:
					self.wndInventory.wndItem.SetCantMouseEventSlot(localSlotPos)

 

anyone a solution for that (using great offshop)

Link to post
  • Bot
On 4/8/2018 at 3:13 AM, WLsj24 said:

Same problem, i have great offlineshop. Any kind person who can adapt the code for OfflineShops?

Sorry for reviving old posts, but maybe someone will find this helpful hehe.

game.py

	## PrivateShop
	def __PrivateShop_Open(self):
		if app.ENABLE_OFFLINE_SHOP:
			if app.WJ_ENABLE_TRADABLE_ICON:
				self.uiNewShopCreate.privateShopBuilder.BindInterface(self.interface)
				self.uiNewShopCreate.privateShopBuilder.SetInven(self.interface.wndInventory)
				self.uiNewShopCreate.privateShopBuilder.wndInventory.BindWindow(self.interface.privateShopBuilder)
			self.uiNewShop.Show()
		else:
			self.interface.OpenPrivateShopInputNameDialog()

 

  • Love 2
Link to post
  • 4 months later...
On 4/5/2020 at 4:08 PM, HUNgarocel1 said:

Hi Dev! :)

 

I have a little bug or something..

So i trade another player, and marking his item, not mine.

Img: YI8gbab.jpg

 

Please help for me
Best regards

 

 

The bug is from PythonNetworkStreamPhaseGame.cpp in Binary.

 

Search for :

 

                int iSlotIndex = exchange_packet.arg2.cell;
                CPythonExchange::Instance().SetItemToTarget(iSlotIndex, exchange_packet.arg1, (BYTE) exchange_packet.arg3);
                for (int i = 0; i < ITEM_SOCKET_SLOT_MAX_NUM; ++i)
                    CPythonExchange::Instance().SetItemMetinSocketToTarget(iSlotIndex, i, exchange_packet.alValues);
                for (int j = 0; j < ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++j)
                    CPythonExchange::Instance().SetItemAttributeToTarget(iSlotIndex, j, exchange_packet.aAttr[j].bType, exchange_packet.aAttr[j].sValue);

 

And remove: 

#ifdef WJ_ENABLE_TRADABLE_ICON

...

#endif

 

 

 

Then, above you should see:

 

        case EXCHANGE_SUBHEADER_GC_ITEM_ADD:
            if (exchange_packet.is_me)

 

 

Add under  this function:

 

                    CPythonExchange::Instance().SetItemAttributeToSelf(iSlotIndex, j, exchange_packet.aAttr[j].bType, exchange_packet.aAttr[j].sValue);

 

 

the function you removed  previously. :) 

Link to post
  • 6 months later...

987638a298c77c972f7ace45492f39ae.png thanks for the system :)

Edited by nazox

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




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