Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/21/20 in all areas

  1. the answer is in __OnValueUpdate function. Just add a check for the money variable. If it's higher than GOLD_MAX then set it to GOLD_MAX. In your case you've hardcoded the limit to 199999999. This should do the trick. But note, it's untested: def __OnValueUpdate(self): ui.EditLine.OnIMEUpdate(self.inputValue) text = self.inputValue.GetText() money = 0 if text and text.isdigit(): try: money = int(text) except ValueError: money = 199999999 if money >= 199999999: money = 199999999 self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))
    2 points
  2. M2 Download Center Download Here ( Internal )
    1 point
  3. M2 Download Center Download Here ( Internal ) Hi, here I publish my edit of the public Render Target System. I hate it, when people earn money with public systems. Preview: [Hidden Content] DL: [Hidden Content] Original Thread [Hidden Content]
    1 point
  4. M2 Download Center Download Here ( Internal ) Hello, I know this files were released and released a lot of times, but I've decided to slim them for new comers or people who are interested in looking at them. It's basically, the 2014 krazy sources with every binary/compiled object cleaned up. Tools+Client+Server of mainline, mainline_cythonized, dev, dev_wolf_branch, mainline_w20, mainline_w21, mainline_released included. The archive size is 32MB Link: Here Password: ke5389JIEGH@r Good luck.
    1 point
  5. M2 Download Center Download Here ( Internal ) Hi there. While cleaning out "my closet", I found this thing I developed between 2014-2015 - maybe(?) - for my, at that moment, server. Since it's now closed, and I won't use it, I'm sharing it with you guys. Note: Didn't do the scrollbar, wasn't needed for me, so yeah. Now, let's start with opening your locale_game.txt and adding these lines: QUESTCATEGORY_0 Main Quests QUESTCATEGORY_1 Sub Quests QUESTCATEGORY_2 Collect Quests QUESTCATEGORY_3 Levelup Quests QUESTCATEGORY_4 Scroll Quests QUESTCATEGORY_5 System Quests Alright, now find your characterwindow.py (uiscript?) and you can either comment Quest_Page children or simply remove them all. Moving on to your interfaceModule.py find this line self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName()) and replace it with self.wndCharacter.questCategory.RecvQuest(self.BINARY_RecvQuest, index, name) Ok, then we are at the most, let's say, difficult part of this. Open your uiCharacter.py and just as you did in your characterwindow.py, remove or simply comment any single line related to quests. You can just search for these vars: self.questShowingStartIndex self.questScrollBar self.questSlot self.questNameList self.questLastTimeList self.questLastCountList Once you did that, you just: # Find these lines self.soloEmotionSlot = self.GetChild("SoloEmotionSlot") self.dualEmotionSlot = self.GetChild("DualEmotionSlot") self.__SetEmotionSlot() # And add the following import uiQuestCategory self.questCategory = uiQuestCategory.QuestCategoryWindow(self.pageDict["QUEST"]) # Find this def OnUpdate(self): self.__UpdateQuestClock() # Replace it with def OnUpdate(self): self.questCategory.OnUpdate() And we're done with the client-side. I attached some extra elements needed (such as the main python file (uiQuestCategory.py) and some image resources). Remember to edit the path linked to these images in that file. For the server-side... Well, screw it, uploaded it too. Too lazy to write. It has only a new quest function (q.getcurrentquestname()) and a few things to add in your questlib.lua. Btw, not sure if you have it, but if not, just add this extra function in ui.Button() (ui.py - class Button). def SetTextAlignLeft(self, text, height = 4): if not self.ButtonText: textLine = TextLine() textLine.SetParent(self) textLine.SetPosition(27, self.GetHeight()/2) textLine.SetVerticalAlignCenter() textLine.SetHorizontalAlignLeft() textLine.Show() self.ButtonText = textLine #Äù½ºÆ® ¸®½ºÆ® UI¿¡ ¸ÂÃç À§Ä¡ ÀâÀ½ self.ButtonText.SetText(text) self.ButtonText.SetPosition(27, self.GetHeight()/2) self.ButtonText.SetVerticalAlignCenter() self.ButtonText.SetHorizontalAlignLeft() Forgot the source part, fml, here it is. Add it to your questlua_quest.cpp. int quest_get_current_quest_name(lua_State* L) { CQuestManager& q = CQuestManager::instance(); PC* pPC = q.GetCurrentPC(); lua_pushstring(L, pPC->GetCurrentQuestName().c_str()); return 1; } void RegisterQuestFunctionTable() { luaL_reg quest_functions[] = { { "getcurrentquestname", quest_get_current_quest_name}, { NULL, NULL } }; CQuestManager::instance().AddLuaFunctionTable("q", quest_functions); } Now, finally, have fun and bye!
    1 point
  6. M2 Download Center Download Here ( Internal ) Hello, Working on some new stuff I found out that current implementation of event looks a bit tricky. Due to this fact I basically deciced to re-implement it in C++11 providing up to date tech. Don`t forget to take a look at this topic before you start: [Hidden Content] So lets begin. Add include into the main.cpp: #ifdef __NEW_EVENT_HANDLER__ #include "EventFunctionHandler.h" #endif And add this into main function before: while (idle()); #ifdef __NEW_EVENT_HANDLER__ CEventFunctionHandler EventFunctionHandler; #endif Now add this at the end of idle: #ifdef __NEW_EVENT_HANDLER__ CEventFunctionHandler::instance().Process(); #endif Now search for: sys_log(0, "<shutdown> Destroying CArenaManager..."); And add before: #ifdef __NEW_EVENT_HANDLER__ sys_log(0, "<shutdown> Destroying CEventFunctionHandler..."); CEventFunctionHandler::instance().Destroy(); #endif Now open service.h and add this define: #define __NEW_EVENT_HANDLER__ That`s all. Now just download attachment and add included files to your source.
    1 point
  7. M2 Download Center Download Here ( Internal ) Download: MEGA Virustotal
    1 point
  8. yeah, my bad. You'd correct the value in inputbox. self.inputValue.SetText(str(money)) It'd look like this: def __OnValueUpdate(self): ui.EditLine.OnIMEUpdate(self.inputValue) text = self.inputValue.GetText() money = 0 if text and text.isdigit(): try: money = int(text) except ValueError: money = 199999999 if money >= 199999999: money = 199999999 self.inputValue.SetText(str(money)) self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))
    1 point
  9. If you wanna run a query each Saturday at a specific time I'd highly suggest you're using an Event Scheduler depending on what Query you wanna run. [Hidden Content] This allows you to time reoccuring queries and manage them directly via mysql instead of running php.
    1 point
  10. Well if he can't do it with the provided code to track down where it goes wrong.. yeah i'm wasting I usually wasting but f..., i have a lot of time these days. When i will not have, i'm not gonna write a reply to such threads.
    1 point
  11. I don't know why you call stuff like this as a big problem. Just put in your /usr/lib32/ folder libstdc++.so.6 with correct version
    1 point
  12. This item type is the new type from official servers used for battle boxes and recently for boss chest and fish event boxes. You can open boxes few times (set in item_proto). 1. You can use macro ENABLE_BATTLE_FIELD because was added with battle zone. 2. Number of openings is in item_proto -> LimitValue1 (Like official) Let's start: Server Source Part: #db\src\ProtoReader.cpp (same steps in ItemCSVReader.cpp) //Search: "ITEM_BELT", //Add after: "ITEM_GACHA" //Search: in array string* arSubType 0, //34 //Add after: 0, //37 //Search: in array int arNumberOfSubtype 0, //34 //Add after: 0, //37 #common\item_length.h //Search: ITEM_BELT, //Add after: ITEM_GACHA, #game\src\item_manager.cpp //Search: if (id == 0) //Add before: (be careful , before) if(item->GetType() == ITEM_GACHA) item->SetSocket(0, item->GetLimitValue(1)); #game\src\char_item.cpp //Search: (CHARACTER::UseItemEx) case ITEM_EXTRACT: ... break; //Add after: case ITEM_GACHA: { DWORD dwBoxVnum = item->GetVnum(); std::vector <DWORD> dwVnums; std::vector <DWORD> dwCounts; std::vector <LPITEM> item_gets(0); int count = 0; if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count)) { if(item->GetSocket(0) > 1) item->SetSocket(0, item->GetSocket(0) - 1); else ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (ITEM_GACHA)"); } } break; Client Source Part: #GameLib\ItemData.h //Search: ITEM_TYPE_BELT, //Add after: ITEM_TYPE_GACHA, #UserInterface\PythonItemModule.cpp //Search: PyModule_AddIntConstant(poModule, "ITEM_TYPE_BELT", CItemData::ITEM_TYPE_BELT); //Add after: PyModule_AddIntConstant(poModule, "ITEM_TYPE_GACHA", CItemData::ITEM_TYPE_GACHA); Client root part: #root\uitooltip.py #Search: elif item.ITEM_TYPE_FISH == itemType: if 0 != metinSlot: self.__AppendFishInfo(metinSlot[0]) #Add after: ### Gacha = Battle Shop Chest ### elif item.ITEM_TYPE_GACHA == itemType: if 0 != metinSlot: if self.isShopItem: restUsableCount = int(item.GetLimit(1)[1]) else: restUsableCount = int(metinSlot[0]) self.AppendSpace(5) self.AppendTextLine(localeInfo.TOOLTIP_REST_USABLE_COUNT % (restUsableCount), grp.GenerateColor(0.5, 1.0, 0.3, 1.0)) Client locale part: #locale_game.txt #Add: TOOLTIP_REST_USABLE_COUNT Left: %d Server Item_proto example: 25111 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 1 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12 25112 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 2 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12 25113 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 3 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12
    1 point
  13. M2 Download Center Download Here ( Internal ) Hi ! Today ThunderCore Society will offer you a special tool for 3d MAX Software. Note: That tool isn't for begginers and we don't offer suport for that. We hereby inform you that we take the copyrights file and his contents because ThunderCore Society has paid to perform this work. There exists an "readme" file that contains some informations about how to install the script. Attention: These files are under copyright and licensed by ThunderCore Society. Any violation of the license may result in suing. Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. NoDerivatives — If you transform, or build upon the material, you may not distribute the modified material. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
    1 point
  14. NextUpdate will include Hair [Hidden Content] UiToolTip-Fix_2.0.txt UiToolTip-Fix_3.0.txt 2.0 -> Rüstung Costüme/Waffen 3.0 -> Hair bug Fix + On/Off Render Target on Gameoptions
    1 point
  15. M2 Download Center Download Here ( Internal ) Hey there, I have an Halloween gift for you all. i have been working for a few hours on official like element image on target window(See screenshots below). When you click on a mob if it is defined as elemental, it will open an element image in addition to the target window. Don't forget to hit the like button! (C) Metin2 guild wars - coded by [GA]Ruin - 27/10/2017 (I create custom metin2 systems in c++/python. if you want a custom system send me a pm and we can talk over skype). Let's begin! Server Side: Open service.h, add in the end: #define ELEMENT_TARGET Open char.cpp, search for else { p.dwVID = 0; p.bHPPercent = 0; } add below: #ifdef ELEMENT_TARGET const int ELEMENT_BASE = 11; DWORD curElementBase = ELEMENT_BASE; DWORD raceFlag; if (m_pkChrTarget && m_pkChrTarget->IsMonster() && (raceFlag = m_pkChrTarget->GetMobTable().dwRaceFlag) >= RACE_FLAG_ATT_ELEC) { for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i *= 2) { curElementBase++; int diff = raceFlag - i; if (abs(diff) <= 1024) break; } p.bElement = curElementBase - ELEMENT_BASE; } else { p.bElement = 0; } #endif open packet.h, search for: } TPacketGCTarget; add above: #ifdef ELEMENT_TARGET BYTE bElement; #endif Client side: open locale_inc.h, add in the end: #define ELEMENT_TARGET open packet.h, search for } TPacketGCTarget; add above: #ifdef ELEMENT_TARGET BYTE bElement; #endif open PythonNetworkPhaseGame.cpp, look for: else if (pInstPlayer->CanViewTargetHP(*pInstTarget)) replace below with the following: #ifdef ELEMENT_TARGET PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetHPTargetBoard", Py_BuildValue("(iii)", TargetPacket.dwVID, TargetPacket.bHPPercent, TargetPacket.bElement)); #else PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetHPTargetBoard", Py_BuildValue("(ii)", TargetPacket.dwVID, TargetPacket.bHPPercent)); #endif open PythonApplicationModule.cpp, look for #ifdef ENABLE_ENERGY_SYSTEM add above: #ifdef ELEMENT_TARGET PyModule_AddIntConstant(poModule, "ENABLE_VIEW_ELEMENT", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_VIEW_ELEMENT", 0); #endif open game.py, look for def SetHPTargetBoard(self, vid, hpPercentage): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.Show() replace with: if app.ENABLE_VIEW_ELEMENT: def SetHPTargetBoard(self, vid, hpPercentage,bElement): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.SetElementImage(bElement) self.targetBoard.Show() else: def SetHPTargetBoard(self, vid, hpPercentage): if vid != self.targetBoard.GetTargetVID(): self.targetBoard.ResetTargetBoard() self.targetBoard.SetEnemyVID(vid) self.targetBoard.SetHP(hpPercentage) self.targetBoard.Show() open uitarget.py, look for import background add below: if app.ENABLE_VIEW_ELEMENT: ELEMENT_IMAGE_DIC = {1: "elect", 2: "fire", 3: "ice", 4: "wind", 5: "earth", 6 : "dark"} look for: self.isShowButton = False add below: if app.ENABLE_VIEW_ELEMENT: self.elementImage = None inside Destroy method, look for: self.__Initialize() add below: if app.ENABLE_VIEW_ELEMENT: self.elementImage = None inside ResetTargetBoard method, look for: self.hpGauge.Hide() add below: if app.ENABLE_VIEW_ELEMENT and self.elementImage: self.elementImage = None look for : def SetElementImage(self,elementId): add above: if app.ENABLE_VIEW_ELEMENT: def SetElementImage(self,elementId): try: if elementId > 0 and elementId in ELEMENT_IMAGE_DIC.keys(): self.elementImage = ui.ImageBox() self.elementImage.SetParent(self.name) self.elementImage.SetPosition(-60,-12) self.elementImage.LoadImage("d:/ymir work/ui/game/12zi/element/%s.sub" % (ELEMENT_IMAGE_DIC[elementId])) self.elementImage.Show() except: pass Compile server, client source and root pack and that's it! Enjoy! Happy halloween!
    0 points
  16. @Denis auta pou akoma de exoun vgali sto fos sintoma ola tha ta dis prosexe se server files neas genias milame oxi se oti nane
    0 points
×
×
  • 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.