Jump to content

Multiple Buy + AutoStack


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

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

This is the hidden content, please

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 136
  • Eyes 2
  • Dislove 1
  • Angry 1
  • Sad 1
  • Smile Tear 1
  • Think 1
  • Scream 1
  • Lmao 2
  • Good 24
  • Love 8
  • Love 64
Link to comment
Share on other sites

  • Premium

If you don't have AddPointToNumberString in localeInfo (check if you have the function but with another name):

def AddPointToNumberString(n):
	return "%s" % ('.'.join([ i-3<0 and str(n)[:i] or str(n)[i-3:i] for i in range(len(str(n))%3, len(str(n))+1, 3) if i ])) 

Also, I would remove:

				dlgPickItem = uiPickItem.PickItemDialog()
				dlgPickItem.LoadDialog()
				self.dlgPickItem = dlgPickItem

to put it in UnselectItemSlot or w/e is your function where you select the item to buy:
 

			if app.IsPressed(app.DIK_LCONTROL):
				itemIndex = shop.GetItemID(selectedSlotPos)
				item.SelectItem(itemIndex)
				itemName = item.GetItemName()
				dlgPickItem = uiPickItem.PickItemDialog()
				dlgPickItem.LoadDialog()
				self.dlgPickItem = dlgPickItem
				self.dlgPickItem.SetTitleName(itemName)
				self.dlgPickItem.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))
				self.dlgPickItem.Open(1)
				self.dlgPickItem.SetMax(2000)
				self.dlgPickItem.itemGlobalSlotIndex = selectedSlotPos
			else:
				net.SendShopBuyPacket(self.__GetRealIndex(selectedSlotPos))

and I would add in Close and Destroy:
 

		if self.dlgPickItem:
			self.dlgPickItem.Destroy()
			self.dlgPickItem = None	

Another thing, what is this?

6tlqyY3.png

 

Aren't we passing, like this, moneyValue with self.dlgPickItem.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))?

 

At least, that's what happened with me, therefore I just:

		if not text.isdigit():
			text = 1
		if text:
			if self.eventAccept:
				self.eventAccept(text)

 

Or am I missing something and I am too tired to notice?

Also, be wary of putting more than one stack in the shops..

 

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

  • 6 months later...
  • 2 years later...

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.