Sari la conținut

JUST4METIN.COM CAUTA STAFF ACTIV - PM Bogdan

Robot

[How To] Inventory Safebox

Postări Recomandate

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)

 

 

 

  Hide contents

 

X0sxaaB.png

 

 

 

Partajează acest post


Link spre post
Distribuie pe alte site-uri

Creează un cont sau autentifică-te pentru a adăuga comentariu

Trebuie să fi un membru pentru a putea lăsa un comentariu.

Creează un cont

Înregistrează-te pentru un nou cont în comunitatea nostră. Este simplu!

Înregistrează un nou cont

Autentificare

Ai deja un cont? Autentifică-te aici.

Autentifică-te acum

×