Jump to content

astroNOT

VIP
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    1

astroNOT last won the day on June 5

astroNOT had the most liked content!

About astroNOT

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

astroNOT's Achievements

Enthusiast

Enthusiast (6/14)

  • Dedicated Rare
  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done

Recent Badges

24

Reputation

  1. Indeed it removes the last char, in our chase the /n, aaand if its the last line in the file w/o a nl, then its doomed, updated the topic accordingly, thanks!
  2. Hello, When adding the bellow string to locale_game.txt APPLY_ANTI_RESIST_MAGIC Magic Pen: %d%% SA A key error is raised: 0613 21:44:08342 :: system.py(line:287) RunMainScript system.py(line:204) execfile prototype.py(line:3) <module> system.py(line:151) __hybrid_import system.py(line:116) _process_result localeInfo.py(line:210) <module> localeInfo.py(line:167) LoadLocaleFile Run - <type 'exceptions.KeyError'>:'S' 0613 21:44:08343 :: ============================================================================================================ 0613 21:44:08343 :: Abort!!!! Without the SA at the end, the bonus name is not properly displayed in game W/o the SA at the end, the bonus name is displayed as "UNKNOWN_NAME(93), the 93 is the index for the bonus in `enum EApplyTypes` from itemData.h Any ideas? LoadLocalFile py function: Thanks! EDIT: SOLVED: Because of this stupid line of code `tokens = line[:-1].split("\t")` you gotta have an extra char(space/new line) after 'SA' *only if its the last line in the file*
  3. M2 Download Center Download Here ( Internal ) The script updates item prices (buy/sell) for an item vnum: Considering item vnum is 110, it can update till 119 (or starting vnum 112 can go till 115, or 117, or w/e you desire) It can update for a single vnum (upgrade items, aswell), more in comments below Combined with can be pretty efficient from halo import Halo import bcolors class Append_new_prices: def __init__(self, value_dict, proto_location): self.proto_location = proto_location self.protoLst = [] self.value_dict = value_dict def get_proto_asList(self): with open(self.proto_location, 'r', encoding="utf8") as file: for line in file.readlines(): lineLst = line.split('\t') self.protoLst.append(lineLst) self.modified_protoLst = [] def update_protoLst(self): count = 0 for vnum, prices in self.value_dict.items(): try: upp_range = prices['uppLimit'] except KeyError: upp_range = 1 vnum_lst = self.get_item_VnumRange(vnum, upp_range) # while upp_range >= 0: for lineLst in self.protoLst: if "buy" not in prices.keys(): prices['buy'] = 0 if "sell" not in prices.keys(): prices['sell'] = 0 # print((lineLst[0]), " == ", vnum_lst) try: line_vnum = int(lineLst[0]) except ValueError: line_vnum = "VNUM NOT INT PFFFFF" if line_vnum in vnum_lst: lineLst[9] = prices['buy'] lineLst[10] = prices['sell'] self.protoLst[self.protoLst.index(lineLst)] = lineLst @staticmethod def get_item_VnumRange(vnum, range_lim): vnum_lst = [] plus_val = 0 # if range_lim == 0: # range_lim = 1 vnum = int(vnum) for i in range(0, range_lim + 1): vnum += plus_val vnum_lst.append(vnum) plus_val = 1 return vnum_lst def write_new_proto_fromList(self): with open(self.proto_location, 'w', encoding="utf8") as file: for line in self.protoLst: file.write('\t'.join(self.str_list(line))) def str_list(self, lst): new_lst = [] for i in lst: new_lst.append(str(i)) return new_lst if __name__ == "__main__": #First number (110) is the starting vnum, uppLimit is till when to stop adding prices, upplimit 9 means => 110, 111, 112, 113, 114...119 #It can have h/e many "item" objects as dictionary elements #!!!!!Count starts from 0! items = \ { "110": { "buy": 55, "sell": 43, "uppLimit": 1 }, # "120":{ # "buy":4000, # "sell":400000, # "uppLimit":9 # } } setPrices = Append_new_prices(value_dict=items, proto_location=r'C:\Users\itsas\Desktop\M2\versionControl\DumpProto\Release\item_proto.txt') with Halo(text='Loading', spinner='dots'): setPrices.get_proto_asList() setPrices.update_protoLst() setPrices.write_new_proto_fromList() print(f'{bcolors.OKMSG}{bcolors.OK} Done!') Prereq: Libs: Halo, bcoloros Python 3.9
  4. M2 Download Center Download Here ( Internal ) Hello peeps! Got some more utilities that i use to automate boring stuff, so, maybe it can help u guys too The script kills the client processes, generates dump_proto and moves it into locale_xx directory (optional), crypts a list of files(root, locale, icon, ...etc) and starts the client. import os import shutil import bcolors import time class utilities: def __init__(self, packer_path, client_path, launcher_Name, dumpProto_path, locale_XX_path): self.packer_path = packer_path self.client_path = client_path self.launcher_Name = launcher_Name self.dumpProto_path = dumpProto_path self.locale_XX_path = locale_XX_path def fox_Pack(self, filesList): for i in filesList: print(f"\t* Will exec :> [{i}]") os.chdir(self.packer_path) os.system(f"tools\\Archiver.exe make_xml/{i}_create.xml") os.system(f"tools\\Archiver.exe xml/{i}_create.xml") time.sleep(0.5) # os.system(archiver_path) def killProcess(self): import psutil for proc in psutil.process_iter(): # check whether the process name matches if proc.name() == self.launcher_Name: proc.kill() time.sleep(0.5) def createItemProto(self): os.chdir(self.dumpProto_path) os.system(f"{self.dumpProto_path}\\dump_proto.exe") if os.path.isfile(self.locale_XX_path + r"\item_proto_old"): os.remove(self.locale_XX_path + r"\item_proto_old") os.rename(self.locale_XX_path + "\\item_proto", self.locale_XX_path + "\\item_proto_old") shutil.copy2("item_proto", self.locale_XX_path) def startClient(self): os.chdir(self.client_path) os.startfile(self.client_path + "\\" + self.launcher_Name) if __name__ == "__main__": start_time = time.time() print(f"{bcolors.OKMSG}{bcolors.OK}#-------[START]-------#\n{bcolors.ENDC}") utils = utilities( #packer Location packer_path = r"C:\Users\itsas\Desktop\M2\versionControl\client\Packer", #client Location client_path = r"C:\Users\itsas\Desktop\M2\versionControl\client\Metin2", launcher_Name = "metin2_launcher.exe", #dumpProto RELEASE Location dumpProto_path = r"C:\Users\itsas\Desktop\M2\versionControl\DumpProto\Release", #locale\XX Location locale_XX_path = r"C:\Users\itsas\Desktop\M2\versionControl\client\Client\locale_general\ro") utils.killProcess() utils.createItemProto() #To pack multiple files, addd in the below list more, directory names utils.fox_Pack(["locale_general", "icon", "item"]) utils.startClient() print(f"{bcolors.BLUE}--- {bcolors.WAITMSG}{bcolors.BLUE}{(time.time() - start_time)} seconds ---\n{bcolors.ENDC}") print(f"{bcolors.OKMSG}{bcolors.OK}#-------[STOP]-------#") Prereq: Python 3.9 Libraries: bcolors, shutil
  5. Hello, Some boring clicking automated that I use, feel free to improve it, add waits, w/e, w/e import time, os from pywinauto import Desktop, Application import bcolors from pywinauto.keyboard import send_keys import psutil class mySession: app = Application(backend='uia') def __init__(self, vm_Name='', ssh_Name='', cliente_exe_Path='', winSCP_path='', vbox_exe_path=''): self.vm_Name = vm_Name self.ssh_Name = ssh_Name self.cliente_exe_Path = cliente_exe_Path pathList = cliente_exe_Path.split('\\') self.client_path = '/'.join(pathList[:-1]) self.exe_name = pathList[-1] self.vbox_exe_path = vbox_exe_path self.winSCP_path = winSCP_path def openVM(self, waitServer): self.killProcess("VirtualBox.exe") self.app.start(self.vbox_exe_path) self.app = Application(backend='uia').connect(title='Oracle VM VirtualBox Manager', timeout=10) # self.app.Dialog.print_control_identifiers() self.app.OracleVMVirtualBoxManager.child_window(title=self.vm_Name, control_type="ListItem").wrapper_object().click_input(button='left', double=True) # self.app = Application(backend='uia').connect(title=self.whoAmI('Starting')[0], timeout=10) time.sleep(waitServer) print(f"\t{bcolors.OK}{bcolors.OKMSG}VM is ready{bcolors.ENDC}") def openWinSCP(self): self.killProcess("WinSCP.exe") self.app.start(self.winSCP_path) self.app = Application(backend='uia').connect(title=self.whoAmI(keyword='wins')[0], timeout=40) time.sleep(1) if self.app.Dialog.child_window(title=self.ssh_Name + " ", control_type="TabItem").exists(): self.app.Dialog.child_window(title="Reconnect Session", control_type="Button").wrapper_object().click_input( button='left') else: self.app.Dialog.child_window(title="New Session", control_type="TabItem").wrapper_object().click_input(button='left') auth_win = self.app.Dialog.child_window(title=self.ssh_Name, control_type="TreeItem") auth_win.wait('visible', timeout=50) auth_win.wrapper_object().click_input(button='left', double=True) input_pass = self.app.Dialog.child_window(control_type="Edit") input_pass.wait('visible', timeout=50) input_pass.wrapper_object().type_keys("dev") self.app.Dialog.child_window(title="OK", control_type="Button").wrapper_object().click_input(button='left') time.sleep(2) print(f"\t{bcolors.OK}{bcolors.OKMSG}WinScp is ready{bcolors.ENDC}") def startClient(self, do_login=True): os.chdir(self.client_path) os.startfile(self.client_path + "\\" + self.exe_name) # self.app = Application(backend='uia').connect(title='Metin2', timeout=10) def whoAmI(self, keyword='', retryLimit=2, isFull=False): while retryLimit: windows = Desktop(backend="uia").windows() windowsList = [w.window_text() for w in windows] resultList = [] for i in windowsList: if keyword.lower() in i.lower(): resultList.append(i) if not len(resultList): time.sleep(0.5) self.whoAmI(keyword=keyword, retryLimit=retryLimit-1, isFull=isFull) else: # print('Matches: ', resultList) if not isFull: return resultList else: return windowsList def killProcess(self, proc_nmame, kill_=True): if kill_: for proc in psutil.process_iter(): # check whether the process name matches if proc.name() == proc_nmame: proc.kill() time.sleep(0.5) if __name__ == "__main__": print(f"{bcolors.OK}#########[START]#########{bcolors.ENDC}") #Here you have to give the name of ur Virtual Machine(vm_Name), winSCP ssh connetion name(ssh_Name), and ur client executable path controller = mySession(vm_Name="11.3_5.5_v4", ssh_Name="alpha_server", cliente_exe_Path=r"C:\Users\itsas\Desktop\M2\versionControl\client\Metin2\metin2_launcher.exe", vbox_exe_path='"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe"', winSCP_path="C:\Program Files (x86)\WinSCP\WinSCP.exe") controller.openVM(waitServer=15) controller.openWinSCP() controller.startClient() print(f"{bcolors.OK}#########[END]#########{bcolors.ENDC}") Prereq: Python 3.9 Libs: pywinauto, psutil, bcolors Note: The script does kill existing processes of WinSCP and oracle VM, you can disable it, if u feel the need, search for killProcess method and set default param to False Edit: Parametrized paths for vbox, winSCP also
  6. Indeed it worked, with a slight catch.. What i had 2 to do is to add more height to all the parent elements, starting from the first parent, and following the nesting Thank you!
  7. Hello, I have this 1 button which is not clickable in the following position: Faulty position: https://gyazo.com/34ad7ffea9c2e6b8d720eb36a8fa5983 But if i move it higher it works just fine, I not sure what to do, any ideas would be appreciated Working position: https://gyazo.com/9f9b1eb62a84bd156eb0f0e6e88a4e08 The actual ui dictionary:
  8. Hello, I'm keen to know, is there a way to increase a specific item texture specular (weapon/armor/etc) beyond the 100 that you can set in specular column? Or better yet to edit the texture to define what 100 specular should be. Point is, some items aren't as shiny as they should be at 100 specular PS. I assume the specular is tied to the texture. Thanks!
  9. Any chance u got the set for all characters?
  10. Hello peeps, I've got the following sutiation: When i add a specific map to index file, a core does not start (channel99 -> core99). When i try to Cannot connect to the server, an connection error is displayed by the client. I've added the map dir name at the eof, with a uniquie index Id Ex. 100 my_map_dir_name The map index has not yet been added to any of the CONFIG files Does anyone have any idea how can I debugg this situation? Can't seem to find any error in the cores/mysql client/auth syserr In syslog no helpful info also..(edited) ----FIX--- Sonitex — Today at 11:08 AM Last line in the map index file must be empty(edited) Pretty stupid "bug"
  11. Hello, I've added strong against metins/bosses, and now, I am trying to add em to item_attr. The goal is to make what is a bonus that I can add manually to an item, to be "addable" by add/change bonus items, if that makes sense? Now I do not know what that implies, any ideas/suggestions would be much apreciated! PS. I did try to add a new row in the table with APPLY_ATTBONUS_METIN, no luck tho. Thanks Tutorial by Owsap Server Source We can do the MySQL part now since we have finished with the server part. MySQL Now let's move on to the Client Source. Client Source Let's not forget our special tool, DumpProto. DumpProto Last but not least your client needs to read the new bonus type. Client Root And finally, your bonus needs a name. Client Locale ⚠ Following the order of the points and apply types are very important, make sure every modification is in order since an incorent order may read another bonus.
  12. Hello, I am running on freeBSD 11.3, gcc49, C++11, mysql 5.5 When compiling, at some point the compilation freezes and in VM machine, i keep getting this swapper error in termnial: swap_pager_getswapspace(3) failed swap_pager_getswapspace(7) failed swap_pager_getswapspace(9) failed swap_pager_getswapspace(3) failed . . . Any idea if this is related to the compilation freeze or? My main problem is the compilation freeze, TOP dosen't seem to show any memory shortage.. TOP output : https://gyazo.com/a2202e6f2607b2dfd5035ed19767c3e5 I m not sure if this is how you see the disk space but df -h output looks worring, kinda full UPDATE: When the machine freezes the whole thing is gone, not just the compilation, can't even open a new ssh connection
  13. Following For this switch statement: if (GetType() == ITEM_ARMOR) { switch (GetSubType()) { case ARMOR_BODY: return ATTRIBUTE_SET_BODY; case ARMOR_WRIST: return ATTRIBUTE_SET_WRIST; case ARMOR_FOOTS: return ATTRIBUTE_SET_FOOTS; case ARMOR_NECK: return ATTRIBUTE_SET_NECK; case ARMOR_HEAD: return ATTRIBUTE_SET_HEAD; case ARMOR_SHIELD: return ATTRIBUTE_SET_SHIELD; case ARMOR_EAR: return ATTRIBUTE_SET_EAR; case COSTUME_BODY: return ATTRIBUTE_COSTUME_B; } } else if (GetType() == ITEM_COSTUME){ return ATTRIBUTE_COSTUME_B;} I get: item_attribute.cpp:52:13: error: duplicate case value case COSTUME_BODY: ^ item_attribute.cpp:31:13: error: previously used here case ARMOR_BODY: ^ Armor body is defined in item_length.cpp: enum EArmorSubTypes { ARMOR_BODY, COSTUME_BODY is also defined in item_length.cpp: enum ECostumeSubTypes { COSTUME_BODY, Any idea why does it see at as a duplicate?
×
×
  • 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.