Jump to content

Search the Community

Showing results for tags 'python'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Metin2 Dev
    • Announcements
  • Community
    • Member Representations
    • Off Topic
  • Miscellaneous
    • Metin2
    • Showcase
    • File Requests
    • Community Support - Questions & Answers
    • Paid Support / Searching / Recruiting
  • Metin2 Development
  • Metin2 Development
    • Basic Tutorials / Beginners
    • Guides & HowTo
    • Binaries
    • Programming & Development
    • Web Development & Scripts / Systems
    • Tools & Programs
    • Maps
    • Quests
    • 3D Models
    • 2D Graphics
    • Operating Systems
    • Miscellaneous
  • Private Servers
    • Private Servers
  • Uncategorized
    • Drafts
    • Trash
    • Archive
    • Temporary
    • Metin2 Download

Product Groups

  • Small Advertisement
  • Large Advertisement
  • Advertising

Categories

  • Third Party - Providers Directory

Categories

  • Overview
  • Pages
    • Overview
    • File Formats
    • Network
    • Extensions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Pillory


Marketplace


Game Server


Country


Nationality


Github


Gitlab


Discord


Skype


Website

  1. Video: Code: # The script automatically translates the drop from mob_drop_item.txt and special_item_group.txt files, utilizing the information in the locale_name.txt file import chardet import codecs def detect_encoding(filename): with open(filename, 'rb') as f: result = chardet.detect(f.read()) return result['encoding'] with codecs.open('item_names.txt', 'r', encoding='cp1250') as source_file: contents = source_file.read() with codecs.open('item_names_utf8.txt', 'w', encoding='utf-8') as target_file: target_file.write(contents) with open('item_names_utf8.txt', 'r', encoding='utf-8') as f: item_names = {} for line in f: if 'VNUM' in line or 'LOCALE_NAME' in line: continue vnum, name = line.strip().split('\t') item_names[vnum] = name drop_cpp_encoding = detect_encoding('drop.txt') with open('drop.txt', 'r', encoding=drop_cpp_encoding) as f: lines = f.readlines() new_lines = [] for line in lines: if line.startswith('Group') or 'exp' in line: new_lines.append(line) else: parts = line.split('\t') if len(parts) > 2 and parts[2] in item_names: line = line.rstrip() + ' // ' + item_names[parts[2]] + '\n' new_lines.append(line) with open('drop2.txt', 'w', encoding='utf-8') as f: f.writelines(new_lines)
  2. With this guide you can render map(s) to your login screen. Some server back in 2012 used this kinda login (DaRealFreak) and I found it pretty cool, so I did this tutorial maybe people will use it again. At def LoadMap(self): there is a list called environments where I set 17 location for you. You can edit/extend it as you wish. The client choose a random location from that list. Somebody will surely comment that it's make the client opening slower. Yes it does, but as you can see in the video that's minimal. Also if you use a client with intro video logo then it doesn't matter because that's longer than it's 1-1,5 second loading time. But if you think it's not acceptable then either optimize it somehow or stay with image background [Hidden Content]You can disable the environmental background by editing INTERACTIVE_LOGIN = 1 at the top to INTERACTIVE_LOGIN = 0. Here's a basic intrologin.py with this environmental background if you want to compare: Google Drive (or Metin2 Download) Original idea by DaRealFreak in 2012. Sincerly, TMP4
  3. M2 Download Center Download Here ( Internal ) - Searching Glass, Allows the arrow mark appearing on the private shop where the item you select in the search results and guides for players to call the selling items easier access. You must be the same on the map with the seller. Default time limit; 1 Week - Trading Glass, Without going to the private shop on the same map that allows you can buy directly. Default time limit; 1 Week - Trading Glass+, Without going to the private shop you can buy directly works on any map. Default time limit; 2 Week - Common features, You can be viewed right from cheap to expensive price of items in the private shops, you can see the features of items When you move your mouse over the item you are looking for. Level, item name and bonuses you can search on the basis of price. HowTo tutorial exists in archive, Warning: It doesn't works with published shoulder sash system. You need upgrade attr type, value amounts. Download: [Hidden Content] It doesn't looks like %100 official but it's works, My last shared and my last working in metin2.
  4. M2 Download Center Download Here ( Internal ) Hello everyone. It's a good day to share an old code with you. First of all you need to know: I don't help to install it. Don't even take the contact with me about it. The whole code is written by me, and reversed from official binaries. At the beginning do a backup for your files(srcs+pys) and READ CAREFULLY the readme. W/o brain.exe please close this tab, or your browser, thank you for your understanding. Preview: Download.exe Enjoy & #h4v3fun, pngr
  5. Hi guys. I have a mount inventory system which is using the belt inventory. I have a button for it, and I had to have a Belt on to use it(like official) but I wanted to use it without Belt If you want to do this follow this tutorial, I'm not good at coding, so maybe there's better solution, but I did this that way. Sorry for my English. Open char_item.cpp and search: bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const Search this in IsEmptyItemGrid (Item disappear fix by: Pisti95) if (Cell.IsBeltInventoryPosition()) { LPITEM beltItem = GetWear(WEAR_BELT); if (NULL == beltItem) return false; if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0))) return false; Comment it, make it look like this: if (Cell.IsBeltInventoryPosition()) { //LPITEM beltItem = GetWear(WEAR_BELT); //if (NULL == beltItem) // return true; //if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0))) // return false; Open belt_inventory_helper.h Search for: static bool IsExistItemInBeltInventory(LPCHARACTER pc) Make it look like this: static bool IsExistItemInBeltInventory(LPCHARACTER pc) { //for (WORD i = BELT_INVENTORY_SLOT_START; i < BELT_INVENTORY_SLOT_END; ++i) //{ // LPITEM beltInventoryItem = pc->GetInventoryItem(i); // // if (NULL != beltInventoryItem) // return true; //} return true; } You can compile game. Python part to ,,turn off" disabled slots, and make it look like you have a Belt on Open uiinventory.py Search this in class BeltInventoryWindow def RefreshSlot(self): Change this: self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True) To this: self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, False) Then change this: self.wndBeltInventorySlot.DisableCoverButton(slotNumber) To this: self.wndBeltInventorySlot.EnableCoverButton(slotNumber) And I dont know if its necessary, but I did these thing too Search for this in class BeltInventoryWindow def __LoadWindow(self): In this search for: for i in xrange(item.BELT_INVENTORY_SLOT_COUNT): slotNumber = item.BELT_INVENTORY_SLOT_START + i wndBeltInventorySlot.SetCoverButton(slotNumber, "d:/ymir work/ui/game/quest/slot_button_01.sub",\ "d:/ymir work/ui/game/quest/slot_button_01.sub",\ "d:/ymir work/ui/game/quest/slot_button_01.sub") "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False) And comment the last line, make it look like this: #"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False) Client source (Still don't know, if it's necessary or not) Open Userinterface/PythonPlayerModule.cpp Search for: #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM PyObject * playerIsEquippingBelt(PyObject* poSelf, PyObject* poArgs) { Make it look like this: (Change PyObject * playerIsAvailableBeltInventoryCell(PyObject* poSelf, PyObject* poArgs) too! ) #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM PyObject * playerIsEquippingBelt(PyObject* poSelf, PyObject* poArgs) { const CPythonPlayer* player = CPythonPlayer::InstancePtr(); bool bEquipping = false; // const TItemData* data = player->GetItemData(TItemPos(EQUIPMENT, c_Equipment_Belt)); // // if (NULL != data) // bEquipping = 0 < data->count; return Py_BuildValue("b", bEquipping); } PyObject * playerIsAvailableBeltInventoryCell(PyObject* poSelf, PyObject* poArgs) { const CPythonPlayer* player = CPythonPlayer::InstancePtr(); // const TItemData* pData = player->GetItemData(TItemPos(EQUIPMENT, c_Equipment_Belt)); // // if (NULL == pData || 0 == pData->count) // return Py_BuildValue("b", true); // // CItemManager::Instance().SelectItemData(pData->vnum); CItemData * pItem = CItemManager::Instance().GetSelectedItemDataPointer(); long beltGrade = pItem->GetValue(0); int pos = 0; if (!PyTuple_GetInteger(poArgs, 0, &pos)) return Py_BadArgument(); //return Py_BuildValue("b", CBeltInventoryHelper::IsAvailableCell(pos - c_Belt_Inventory_Slot_Start, GetItemGrade(pItem->GetName()))); return Py_BuildValue("b", CBeltInventoryHelper::IsAvailableCell(pos - c_Belt_Inventory_Slot_Start, beltGrade)); } #endif And we're done. Have a good day!
  6. Hello Today I want to share with all of you a little thing. All times when you are trying to open your safebox, it's requesting the password, isn't it? But for what? I modified to limit these requests to one input per login. Of course if you warp or change character, you need to retype your password again. But with extra modifications you can do it to store the password until you close the client, but I don't recommend this. So, first go to the uiSafeBox.py file and paste this line into the __init__ method of the PasswordDialog class, with taking care of the tabulators: self.lastPassword = "" This variable will store your last entered password. Then replace the Accept method of the same class with this: (take a look for the syntax, modulename, and true/false!) def OnAccept(self): self.lastPassword = str(self.passwordValue.GetText()) m2net.SendChatPacket(self.sendMessage + self.lastPassword) self.CloseDialog() return True When you accept the password input dialog, the entered password will be saved, if it's correct if it isn't as well. Don't worry about it, it will be reset if you entered wrong password. The next step is that to paste these new functions into the same class. def InitSafeboxPassword(self): self.lastPassword = "" def GetSafeboxPwd(self): return self.lastPassword As you can see, here is a function which will reset the entered password . With this, the file is done. Open interfaceModule.py and serach this line: ## Safebox then paste this function below: def InitSafeboxPassword(self): self.dlgPassword.InitSafeboxPassword() Then replace the AskSafeboxPassword and AskMallPassword functions with these: def AskSafeboxPassword(self): if self.wndSafebox.IsShow(): return if self.dlgPassword.IsShow(): self.dlgPassword.CloseDialog() return self.dlgPassword.SetSendMessage("/safebox_password ") if self.dlgPassword.GetSafeboxPwd() != "": self.dlgPassword.OnAccept() return self.dlgPassword.SetTitle(localeInfo.PASSWORD_TITLE) self.dlgPassword.ShowDialog() def AskMallPassword(self): if self.wndMall.IsShow(): return if self.dlgPassword.IsShow(): self.dlgPassword.CloseDialog() return self.dlgPassword.SetSendMessage("/mall_password ") if self.dlgPassword.GetSafeboxPwd() != "": self.dlgPassword.OnAccept() return self.dlgPassword.SetTitle(localeInfo.MALL_PASSWORD_TITLE) self.dlgPassword.ShowDialog() With these functions, if the last entered password is correct, the storages will open automatically with the last entered password. The file is done. Next, open your game.py and search this function: OnSafeBoxError and extend it with this line: self.interface.InitSafeboxPassword() So, as you can see this is the answer from the server to entered wrong password and this function will reset the last entered password as well . That's all, I hope you like it, and have fun. Edit.: Fix for change password. game/src/input_db.cpp void CInputDB::SafeboxChangePasswordAnswer(LPDESC d, const char* c_pData) { //[...] d->GetCharacter()->ChatPacket(CHAT_TYPE_COMMAND, "safebox_change_passwd %d", p->flag); // to the bottom of the function } client/UserInterface/PythonNetworkStreamCommand.cpp void CPythonNetworkStream::ServerCommand(char * c_szCommand) { // [...] const char * szCmd = TokenVector[0].c_str(); if (!strcmpi(szCmd, "quit")) { // [...] } else if (!strcmpi(szCmd, "BettingMoney")) { // [...] } //Add between the "else if" cases: else if (!strcmpi(szCmd, "safebox_change_passwd")) { if (2 != TokenVector.size()) { TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %d", c_szCommand, TokenVector.size()); return; } const int iFlag = atoi(TokenVector[1].c_str()); PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RecvSafeboxPasswordChangeAnswer", Py_BuildValue("(i)", iFlag)); } else if (!strcmpi(szCmd, "gift")) { // [...] } // [...] } client/root/game.py # below of CommandCloseSafebox function add: def RecvSafeboxPasswordChangeAnswer(self, flag): self.interface.RecvSafeboxPasswordChangeAnswer(flag) client/root/interfaceModule.py # Below of CommandCloseSafebox function add: def RecvSafeboxPasswordChangeAnswer(self, flag): if flag: self.dlgPassword.SetSafeboxPwd(str(self.wndSafebox.dlgChangePassword.GetNewPasswordText())) client/root/uiSafeBox.py # change the OnAccept function of the PasswordDialog class with this: def OnAccept(self): if self.lastPassword == "" and "" != str(self.passwordValue.GetText()): self.lastPassword = str(self.passwordValue.GetText()) net.SendChatPacket(self.sendMessage + self.lastPassword) self.CloseDialog() return True # add this new function to the PasswordDialog class: def SetSafeboxPwd(self, pwd): self.lastPassword=pwd # add this line into the ChangePasswordDialog.__init__ function: self.__newPassword = "" # add this line into the ChangePasswordDialog.Open function: self.__newPassword = "" # add this function to the ChangePasswordDialog class: def GetNewPasswordText(self): return self.__newPassword # add the following line into the ChangePasswordDialog.OnAccept function (between the password check and the SendChatPacket): # return True self.__newPassword = newPasswordText #m2net.SendChatPacket("/safebox_change_password %s %s" % (oldPasswordText, newPasswordText)) Edit: fix of flooding: moving the saving method of the password from the OnAccept function to a separated one and calling it when the Safebox opens, this will be enough I guess. client/root/uiSafeBox.py # add the following function to the PasswordDialog class: def SavePassword(self): if self.lastPassword == "" and "" != str(self.passwordValue.GetText()): self.lastPassword = str(self.passwordValue.GetText()) # make the changes on the function in the PasswordDialog class def OnAccept(self): net.SendChatPacket(self.sendMessage + (self.lastPassword if self.lastPassword != "" else self.passwordValue.GetText())) self.CloseDialog() return True client/root/interfaceModule.py # add the following line into the beginning of the OpenSafeboxWindow and the OpenMallWindow function self.dlgPassword.SavePassword()
  7. Hi guys, I created this topic to have a collection topic about removing unnecessary code. blocked_country_ip Limit_time More removed code:
  8. Hello community, I decided to create a mini function in python for my server that adds the information if the player can drop or not on mobs and stones. [Hidden Content]
  9. M2 Download Center Download Here ( Internal ) Download Here ( GitHub )
  10. Hello, comm! Here is a tutorial of how to display the level of character and the time in pm. root/uiwhisper.py: locale/en/locale_game.txt
  11. I want share you critical effect: UserInterface/InstanceBaseEffect.cpp open and search: else if (flag & DAMAGE_CRITICAL) { //rkEftMgr.CreateEffect(ms_adwCRCAffectEffect[EFFECT_DAMAGE_CRITICAL],v3Pos,v3Rot); //return; 숫자도 표시. } Thus replaced: else if (flag & DAMAGE_CRITICAL) { rkEftMgr.CreateEffect(ms_adwCRCAffectEffect[EFFECT_DAMAGE_CRITICAL],v3Pos,v3Rot); //return; 숫자도 표시. } root/playersettingmodule.py open and search: #chrmgr.RegisterCacheEffect(chrmgr.EFFECT_DAMAGE_CRITICAL, "", "d:/ymir work/effect/affect/damagevalue/critical.mse") Thus replaced: chrmgr.RegisterCacheEffect(chrmgr.EFFECT_DAMAGE_CRITICAL, "", "d:/ymir work/effect/affect/damagevalue/critical.mse") Effect: [Hidden Content] [Hidden Content]
  12. M2 Download Center Download Here ( Internal ) When a player or monster is poisoned, a poisoning effect will appear in the life bar. The idea belongs to Whistlee from the Turkish forum. However, in Whistlee version this system does not work for monsters and has no connection with the source code, so the effect is visible only to us. I don't know if I can give a specific place where the original comes from, so I won't do it, but I put here github Whistlee's, where you can find the original code. GITHUB: [Hidden Content] Special thanks for helping me with this code for Intern,VegaS™ and HITRON. ////////// CLIENT GAME ////////// SOURCE BIN
  13. Video: Code: import os import shutil source_folder = '/txt/src' target_folder = '/txt/src2' if not os.path.exists(target_folder): os.makedirs(target_folder) ifdef = '#ifdef ' ifndef = '#ifndef ' define = 'ENABLE_SWITCHBOT' def process_files(source_folder, target_folder): for entry in os.scandir(source_folder): if entry.is_file() and entry.name.endswith(('.cpp', '.h')): with open(entry.path, 'r', encoding='latin1') as file: new_file = None copy = False lines = file.readlines() line_num = 0 for line in lines: if ifdef + define in line or ifndef + define in line: copy = True if not new_file: new_file = open(os.path.join(target_folder, entry.name), 'w', encoding='latin1') for i in range(max(0, line_num - 30), line_num): new_file.write(lines[i]) if copy: new_file.write(line) if '#endif' in line: if copy: new_file.write("\n // =================== INNA FUNKCJA ================= \n \n") new_file.write("// ====== WYSZUKAJ: ") new_file.write(define) new_file.write("\n// Tutorial wygenerowany automatycznie przez Grzyb.ovh \n") new_file.write("\n \n") copy = False line_num += 1 if new_file: new_file.close() elif entry.is_dir(): new_target_folder = os.path.join(target_folder, entry.name) if not os.path.exists(new_target_folder): os.makedirs(new_target_folder) process_files(entry.path, new_target_folder) process_files(source_folder, target_folder)
  14. M2 Download Center Download Here ( Internal ) Download Here ( GitHub )
  15. M2 Download Center Download Here ( Internal ) [Hidden Content] VT: [Hidden Content]
  16. Hello community, I decided to create a patcher in C# to share here completely free. Download [hide][Hidden Content] [Hidden Content]]
  17. Download Alternative download links → M2DL Hello! I share this little modifications, made by @peaceofficial (He gave me rights to share it.) (The thinboard will be different for you.) Here is GIF, how is it looks like:
  18. M2 Download Center Download Here ( Internal ) Hi. This small release save our sent and received private messages till we change the character. If you close by mistake PM with somebody and after you'll open the converastion with that player the old messages will be loaded from dictionary. All changes are in root. Let's begin. constInfo.py Add: WHISPER_MESSAGES = {} game.py Replace these methods: def OnRecvWhisper(self, mode, name, line): if mode == chat.WHISPER_TYPE_GM: self.interface.RegisterGameMasterName(name) line.replace(" : ", ": ") if not self.interface.FindWhisperButton(name) and constInfo.WHISPER_MESSAGES.has_key(name) and not self.interface.whisperDialogDict.has_key(name): self.interface.RecvWhisper(mode, name, line, True) else: self.interface.RecvWhisper(mode, name, line, False) if not constInfo.WHISPER_MESSAGES.has_key(name): constInfo.WHISPER_MESSAGES.update({name : [(mode, line)]}) else: constInfo.WHISPER_MESSAGES[name].append((mode, line)) chat.AppendWhisper(mode, name, line) def OnRecvWhisperSystemMessage(self, mode, name, line): chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line) self.interface.RecvWhisper(mode, name, line, False) def OnRecvWhisperError(self, mode, name, line): if localeInfo.WHISPER_ERROR.has_key(mode): chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name)) else: chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name)) self.interface.RecvWhisper(mode, name, line, False) interfaceModule.py Replace this method: def RecvWhisper(self, mode, name, line, loadMsg): if loadMsg: for text in constInfo.WHISPER_MESSAGES[name]: chat.AppendWhisper(text[0], name, text[1]) if not self.whisperDialogDict.has_key(name): btn = self.FindWhisperButton(name) if 0 == btn: btn = self.__MakeWhisperButton(name) btn.Flash() chat.AppendChat(chat.CHAT_TYPE_NOTICE, localeInfo.RECEIVE_MESSAGE % (name)) else: btn.Flash() elif self.IsGameMasterName(name): dlg = self.whisperDialogDict[name] dlg.SetGameMasterLook() introSelect.py In def Open(self): add: WHISPER_MESSAGES = {} uiWhisper.py Add: import constInfo Replace this method: def OpenWithTarget(self, targetName="", loadMessages=False): chat.CreateWhisper(targetName) chat.SetWhisperBoxSize(targetName, self.GetWidth() - 60, self.GetHeight() - 90) self.chatLine.SetFocus() self.titleName.SetText(targetName) self.targetName = targetName self.textRenderer.SetTargetName(targetName) self.titleNameEdit.Hide() self.ignoreButton.Hide() if app.IsDevStage(): self.reportViolentWhisperButton.Show() else: self.reportViolentWhisperButton.Hide() self.acceptButton.Hide() self.gamemasterMark.Hide() self.minimizeButton.Show() if loadMessages: if constInfo.WHISPER_MESSAGES.has_key(targetName): for text in constInfo.WHISPER_MESSAGES[targetName]: chat.AppendWhisper(text[0], targetName, text[1]) in def AcceptTarget(self): at botton add: if constInfo.WHISPER_MESSAGES.has_key(name): for text in constInfo.WHISPER_MESSAGES[name]: chat.AppendWhisper(text[0], name, text[1]) And replace this method: def SendWhisper(self): text = self.chatLine.GetText() textLength = len(text) if textLength > 0: if net.IsInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING) return net.SendWhisperPacket(self.targetName, text) self.chatLine.SetText("") if not constInfo.WHISPER_MESSAGES.has_key(self.targetName): constInfo.WHISPER_MESSAGES.update({self.targetName : [(1, ("{}: {}".format(player.GetName(), text)))]}) else: constInfo.WHISPER_MESSAGES[self.targetName].append([1, "{}: {}".format(player.GetName(), text)]) chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + ": " + text) That's all If you will find any bugs just give me some feedback.
  19. I'm bored of counting; I've counted enough during school. This script counts on its own. Readme.md says it all !
  20. I've brought you some files for optimizing your client. The first file examines whether there are any entities in the mob_proto that are missing from the npclist.txt. These entities might remain unseen in your client, making them invisible to you. The second file is designed to purge the missing entries from the mob_proto. This step will help clean up and enhance the efficiency of your client. The third program's purpose is to inspect the unpacked version of your client and identify any NPCs or creatures that are not listed in your npclist. You have the option to manually remove these entities and then repackage your client. By implementing these optimizations, you can effectively rid your client of unnecessary elements. These entities won't burden your client's memory during startup, potentially resulting in significant RAM savings. Missing_ids.py mob_proto_delete.py show_folders_need_to_delete.py show_missing_ids.py
  21. Hello Metin2 Dev. As the title says, i'm here to present a way to block pvp option on certain maps, this is good for PvP Projects. #Search this function: def __OnClickPvPModeFreeButton(self): #Replace with: def __OnClickPvPModeFreeButton(self): if self.__CheckPvPProtectedLevelPlayer(): return self.__RefreshPVPButtonList() import background if background.GetCurrentMapName() == "metin2_map_c1": chat.AppendChat(chat.CHAT_TYPE_INFO, "You can't do this here. ") elif constInfo.PVPMODE_ENABLE: net.SendChatPacket("/pkmode 2", chat.CHAT_TYPE_TALKING) else: chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_NOT_SUPPORT) Wish you a good use on this. With best regards, Doose.
  22. Hey guys , I am new to the community been lurking around trying to learn here and there . My knowledge isn't huge its very basic but I thought I could give back with the little I know , probably most of you know how to do this , but I have been looking around for a way to do it on the forum I couldn't find it till I came across this Thread from @ Mali . P.S : if you have a better way of doing the if statement please let me know I am not that familiar with the files as I said . Okay let me start . 1 ) Head to your serverinfo.py file in root , Check your STATE_DICT . ex : STATE_DICT = { 0 : "OFFLINE", 1 : "ONLINE", 2 : "BUSY", 3 : "FULL" } ** In my example I only want to have it green when the server is Online and any other status I want to be red , you can tweak it to your own liking . 2) Then you go to intrologin.py and look for : self.channelList.InsertItem(channelID, " %s %s" % (channelName, channelState)) 3) Replace it with : if channelState=="ONLINE": self.channelList.InsertItem(channelID, " %s |cffADFF2F%s" % (channelName, channelState)) else: self.channelList.InsertItem(channelID, " %s |cffCd0000%s" % (channelName, channelState)) ***One thing to note : You need to match your desired Status from your own serverinfo.py and replace "ONLINE" with it . Preview : As I mentioned before if you have a better dynamic way please let me know I am here to learn
  23. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) It's giving random informations about game at loading window. Group "Normal" has global informations. If you don't add any special map index, you will see global informations.
  24. Download Center Github or Internal Link With this 'system' you will be able to open the PM Window just by clicking on the Player Name on any Chat Category not only on Global (normal, group, guild...) I use martysama so if you use anything else you need to edit it for your sources. Because i did not found an full tutorial here it is, is not perfect i know. Preview: [Hidden Content] Bellow is just an example, follow the tutorial on github or download it from dev. Pack Search inside interfacemodule.py and edit it like bellow: def MakeHyperlinkTooltip(self, hyperlink): tokens = hyperlink.split(":") if tokens and len(tokens): type = tokens[0] if "item" == type: self.hyperlinkItemTooltip.SetHyperlinkItem(tokens) # Add this under like here elif "msg" == type and str(tokens[1]) != player.GetMainCharacterName(): self.OpenWhisperDialog(str(tokens[1])) Server Srcs Search inside input_main.cpp and make the changes like bellow: // With Chat Color #ifdef ENABLE_CHAT_COLOR_SYSTEM static const char* colorbuf[] = {"|cFFffa200|H|h[Staff]|h|r", "|cFFff0000|H|h[Shinsoo]|h|r", "|cFFffc700|H|h[Chunjo]|h|r", "|cFF000bff|H|h[Jinno]|h|r"}; int len = snprintf(chatbuf, sizeof(chatbuf), "%s |Hmsg:%s|h%s|h|r : %s", (ch->IsGM()?colorbuf[0]:colorbuf[MINMAX(0, ch->GetEmpire(), 3)]), ch->GetName(), ch->GetName(), buf); #endif // Without Chat Color just change it like this int len = snprintf(chatbuf, sizeof(chatbuf), "|Hmsg:%s|h%s|h|r : %s", ch->GetName(), ch->GetName(), buf); Source @ Sanchez Client Srcs Search inside PythonNetworkStreamPhaseGame.cpp bool CPythonNetworkStream::RecvChatPacket() { .. // Search this like case CHAT_TYPE_WHISPER: { .. } .. } And add this inside the case, like this:
  25. M2 Download Center Download Here ( Internal ) Hi friend. In uitooltip.py, Updated AFFECT_DICT like this: ex: at APPLY_MAX_HP ,3000 ,is the maximum value, change to all bonuses with your maximum value next, modify this function like this: def __GetAffectString(self, affectType, affectValue, smax = 0): if 0 == affectType: return None if 0 == affectValue: return None try: if self.AFFECT_DICT[affectType][1] == affectValue and smax != 0: return self.AFFECT_DICT[affectType][0](affectValue) + " |cFFFF0000|hMax" else: return self.AFFECT_DICT[affectType][0](affectValue) except TypeError: return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue) except KeyError: return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue) Search for: def __AppendAttributeInformation change this line: affectString = self.__GetAffectString(type, value) with this affectString = self.__GetAffectString(type, value, 1)
×
×
  • 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.