ѕeмa™ 308 Posted February 23, 2014 Share Posted February 23, 2014 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) I go to release a simple system , to see the coins in the inventory. http://youtu.be/93aufcRE_4s REMEMBER: localeInfo is from binary r28k locale is from binary r36k First, go to uiinventory.py and now search: self.wndMoneySlot = self.GetChild("Money_Slot") And down put: self.wndMds = self.GetChild("Mds") self.wndMdsSlot = self.GetChild("Mds_Slot") Now, search def Destroy(self): self.ClearDictionary() .... .... self.wndMoney = 0 self.wndMoneySlot = 0 And down put: self.wndMds = 0 self.wndMdsSlot = 0 Now, Search: def RefreshStatus(self): And change to: def RefreshStatus(self): money = player.GetElk() self.wndMoney.SetText(localeInfo.NumberToMoneyString(money)) import constInfo self.wndMds.SetText(str(constInfo.mds) + " Md's") And down Put: def OnUpdate(self): import constInfo self.wndMds.SetText(str(constInfo.mds) + " Md's") The uiinventory is finished, save and close, now go to locale/xx/ui/inventorywindow.py. Search: ## Print { "name":"Money_Slot", "type":"button", "x":-68, "y":28, "horizontal_align":"center", "vertical_align":"bottom", "default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "children" : ( { "name":"Money_Icon", "type":"image", "x":-21, "y":2, "image":"d:/ymir work/ui/game/windows/money_icon.sub", }, { "name" : "Money", "type" : "text", "x" : 5, "y" : 3, "horizontal_align" : "right", "text_horizontal_align" : "right", "text" : "123456789", }, ), }, And Down Put: { "name":"Mds_Slot", "type":"button", "x":-68, "y":48, "horizontal_align":"center", "vertical_align":"bottom", "default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "children" : ( { "name":"Mds_Icon", "type":"image", "x":-21, "y":2, "image":"d:/ymir work/ui/game/windows/money_icon.sub", }, { "name" : "Mds", "type" : "text", "x" : 5, "y" : 3, "horizontal_align" : "right", "text_horizontal_align" : "right", "text" : "123456789 Md's", }, ), }, Remember change the "x" and "y". Now, go to game.py in root. Search: def __ServerCommand_Build(self): serverCommandList={ And down put: #Carga Mds Start "Mds" : self.__Mds, #Carga Mds End and now, go to the end and put: def __Mds(self, coins): import constInfo constInfo.mds = int(coins) Save and close. Now go to constinfo.py and put mds = 0 And Here the quest: quest mds begin state start begin when login begin loop_timer("carga_mds", 10) end when carga_mds.timer begin local coins = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..coins) end end end This is my release in this forum. Sorry my bad english.. I'm Spanish. 31 1 1 1 7 2 53 https://m2admin.net/ Link to comment Share on other sites More sharing options...
Premium Jfirewall 279 Posted February 23, 2014 Premium Share Posted February 23, 2014 ¿Might you spend your equipment_base? Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted February 23, 2014 Share Posted February 23, 2014 I think it's possible to do without quest too (mysql + python) But then it's possible to cheat coins if you extract the client Link to comment Share on other sites More sharing options...
Premium Sanchez 2464 Posted February 23, 2014 Premium Share Posted February 23, 2014 I think it's possible to do without quest too (mysql + python) But then it's possible to cheat coins if you extract the client You should calculate and modify the values always JUST on server-side. Never trust in the client, client is just an interface to show the values to the player, not to calculate. Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted February 23, 2014 Author Share Posted February 23, 2014 you can only cheat visually that the coins are in the database https://m2admin.net/ Link to comment Share on other sites More sharing options...
Yoshix3 8 Posted February 23, 2014 Share Posted February 23, 2014 I think it's better to save the Coins in a questflag and renew this all 10 Minutes. Link to comment Share on other sites More sharing options...
Aveline™ 554 Posted February 23, 2014 Share Posted February 23, 2014 it's look nice thanks for share us. I'll use to c++ because c++ fast than lua If i were you Regards. Plain logic saves lives. Link to comment Share on other sites More sharing options...
CoTzRaiZ-PaiNx 1 Posted February 23, 2014 Share Posted February 23, 2014 There's a big vulnerability in your Script 1 Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted February 23, 2014 Author Share Posted February 23, 2014 There's a big vulnerability in your Script where? https://m2admin.net/ Link to comment Share on other sites More sharing options...
Fliegex3 29 Posted February 24, 2014 Share Posted February 24, 2014 It's not working for me, mysql fail or something. None error code, client is all good :/ Edit: Works, nice job Link to comment Share on other sites More sharing options...
Active Member Koray 1994 Posted February 24, 2014 Active Member Share Posted February 24, 2014 Don't show coins, constant 0 Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted February 24, 2014 Author Share Posted February 24, 2014 Don't show coins, constant 0 You put the Def OnUpdate??? https://m2admin.net/ Link to comment Share on other sites More sharing options...
Cilindro 14 Posted February 25, 2014 Share Posted February 25, 2014 constant 0 coins sorry Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted February 25, 2014 Author Share Posted February 25, 2014 Edit: Works, nice job do something bad https://m2admin.net/ Link to comment Share on other sites More sharing options...
Cilindro 14 Posted February 25, 2014 Share Posted February 25, 2014 sorry but not work i put all things agan and nothing Link to comment Share on other sites More sharing options...
Cilindro 14 Posted March 1, 2014 Share Posted March 1, 2014 hello can any body say any thing ? Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1122 Posted March 1, 2014 Former Staff Share Posted March 1, 2014 Some users got it working. So you done something wrong Link to comment Share on other sites More sharing options...
eVo WildEgo 4 Posted March 1, 2014 Share Posted March 1, 2014 hello can any body say any thing ? I Think is cuz ur DB and u use the coins in a different row mb. Kind Regards, Luis "'pwn WildEgo" Bizarro -------------------------------------------------------------------------------------- Eu pensi qye seja por causa da tua BD acho que usas as Moedas noutro sitio. Com os melhores cumprimentos, Luis "'pwn WildEgo" Bizarro Link to comment Share on other sites More sharing options...
brianman 1 Posted March 29, 2014 Share Posted March 29, 2014 (edited) hi! This problem: 0329 12:30:53208 :: Unknown Server Command mds 500 | mds Why?o.o Edited August 22, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member NoFr1ends 751 Posted March 29, 2014 Honorable Member Share Posted March 29, 2014 You forgot the servercommand builder part. Kind regards, Chuck Link to comment Share on other sites More sharing options...
brianman 1 Posted March 29, 2014 Share Posted March 29, 2014 no: "Mds" : self.__Mds, we have corrected the error and thanks (sorry google translate) Link to comment Share on other sites More sharing options...
Management Karbust 4881 Posted April 30, 2014 Management Share Posted April 30, 2014 (edited) Hi With me don't work 100%, don't stay at the correct place print: someone now how to put this under the Yang bar??? sry my english EDIT: it's working Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Domee 1 Posted May 5, 2014 Share Posted May 5, 2014 I Have already the Problem with de syserr error: 0505 21:14:44921 :: Unknown Server Command Mds 1 | Mds 0505 21:14:54937 :: Unknown Server Command Mds 1 | Mds 0505 21:14:04954 :: Unknown Server Command Mds 1 | Mds 0505 21:14:14894 :: Unknown Server Command Mds 1 | Mds 0505 21:14:24913 :: Unknown Server Command Mds 1 | Mds 0505 21:15:34938 :: Unknown Server Command Mds 1 | Mds 0505 21:15:44923 :: Unknown Server Command Mds 1 | Mds Help me please (sorry for my english, i'm German) MFG Link to comment Share on other sites More sharing options...
niiceone 4 Posted May 5, 2014 Share Posted May 5, 2014 (edited) it works all fine. who need help? pls pn me Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Splash 0 Posted June 13, 2014 Share Posted June 13, 2014 (edited) How i can change that : the main content was longer that the inventory slots above and mds under the slots Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts