Jump to content

Open your Safebox in your Inventory


Recommended Posts

Hi guys,

 

I'll show yout how to simply open your safebox by inventory button.

 

1) First you'll need to replace "def ClickMallButton" in "uiinventory.py" by :

	def ClickMallButton(self):
		self.choix = ui.BoardWithTitleBar()
		self.choix.SetSize(210, 80)
		self.choix.SetCenterPosition()
		self.choix.AddFlag('float')
		self.choix.AddFlag('movable')
		self.choix.SetTitleName("Ouverture entrepôt")
		self.choix.Show()
		
		self.EntrepotIs = ui.Button()
		self.EntrepotIs.SetEvent(self.OpenIs)
		self.EntrepotIs.SetParent(self.choix)
		self.EntrepotIs.SetPosition(35, 40)
		self.EntrepotIs.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
		self.EntrepotIs.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
		self.EntrepotIs.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.EntrepotIs.SetText("ItemShop")
		self.EntrepotIs.SetToolTipText("Ouvrir l'entrepot ItemShop")
		self.EntrepotIs.Show()
		
		self.Magasinier = ui.Button()
		self.Magasinier.SetEvent(self._normal_mall)
		self.Magasinier.SetParent(self.choix)
		self.Magasinier.SetPosition(105, 40)
		self.Magasinier.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
		self.Magasinier.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
		self.Magasinier.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Magasinier.SetText("Magasinier")
		self.Magasinier.SetToolTipText("Ouvrir le magasinier")
		self.Magasinier.Show()

2) Then add this under :

	def OpenIs(self):
		self.EntrepotIs.Hide()
		self.choix.Hide()
		self.Magasinier.Hide()
		net.SendChatPacket("/click_mall")
	
	def _normal_mall(self):
		self.EntrepotIs.Hide()
		self.Magasinier.Hide()
		self.choix.Hide()
		net.SendChatPacket("/click_safebox")

3) Open cmd_general.cpp (game src) and search for :

ACMD(do_click_mall)
{
	ch->ChatPacket(CHAT_TYPE_COMMAND, "ShowMeMallPassword");
}

then add this below : 

 

ACMD(do_click_safebox)
{
	ch->ChatPacket(CHAT_TYPE_COMMAND, "ShowMeSafeboxPassword");
}

4) Open cmd.cpp (still game src) and search for :

ACMD(do_click_mall);

then add this below :

ACMD(do_click_safebox);

in same file search for : 

{ "click_mall",			do_click_mall,			0,	POS_DEAD,	GM_PLAYER		},

and add this below : 

{ "click_safebox",			do_click_safebox,			0,	POS_DEAD,	GM_PLAYER		},

5) You'll need to remove distance limit to open safebox so open "char.cpp" and search for

	else if (GetDistanceFromSafeboxOpen() > 1000)
	{

		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<â°í> °Å¸®°¡ ¸Ö¾î¼­ â°í¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù."));
		return;
	}

here you juste need to comment this block, like this : 

/*	else if (GetDistanceFromSafeboxOpen() > 1000)
	{

		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<â°í> °Å¸®°¡ ¸Ö¾î¼­ â°í¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù."));
		return;
	}
 */

6) You're done, now you'll get this menu (you will be able to choose between mall or safebox)

 

Spoiler

133932X0sxaaB.png

 

  • Metin2 Dev 1
  • Love 22
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 6 years later...

I did everything but i have this syserr in client :(

 

0307 15:48:03293 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
introSelect.py(line:30) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
interfaceModule.py(line:12) <module>
system.py(line:177) __hybrid_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.SyntaxError'>:invalid syntax (uiInventory.py, line 834)

0307 15:48:03293 :: ============================================================================================================
0307 15:48:03293 :: Abort!!!!

 

Spoiler

2zcLVVZ.png

 

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

  • Honorable Member
19 hours ago, Cripplez said:

I did everything but i have this syserr in client :(

 


0307 15:48:03293 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
introSelect.py(line:30) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
interfaceModule.py(line:12) <module>
system.py(line:177) __hybrid_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.SyntaxError'>:invalid syntax (uiInventory.py, line 834)

0307 15:48:03293 :: ============================================================================================================
0307 15:48:03293 :: Abort!!!!

 

  Reveal hidden contents

2zcLVVZ.png

 

TqaK8hs.png

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

 

Link to comment
Share on other sites

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.