Jump to content

Owsap

Honorable Member
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    29
  • Feedback

    91%

Everything posted by Owsap

  1. M2 Download Center Download Here ( GitHub ) Download Here ( MEGA ) Download Here ( Internal ) Hey M2Dev, here is a little statistics overview of the Round Trip Time (RTT) Ping and Packet Loss. Usefully for some, useless for others, so I decided to share it. Preview The image is an example... The results where not captured accurately because they kept updating while I tried to take screenshots. You will not get any PING on localhost. If you find any problems let me know.
  2. ''' @ uiToolTip.py ''' # Function "SetTooltipPosition" allows you to do this. # You can use the position of your mouse using wndMgr. # Example: (mouseX, mouseY) = wndMgr.GetMousePosition() # Don't forget to import wndMgr toolTip.SetTooltipPosition(mouseX - x, mouseY - y) # Or you can set the position manually. toolTip.SetTooltipPosition(x, y)
  3. If you are rendering the frames while the client is minimized, then maybe try to disable it. /// 1. @ Source/Client/UserInterface/PythonApplication.cpp // Search if (m_isMinimizedWnd) { canRender = true; } // Replace with if (m_isMinimizedWnd) { canRender = false; } Also, update your DirectX: [Hidden Content] If you say it runs well on Debug build then use the macros set for it on Release and Distribute builds. Click here to download StateManager files without the macros.
  4. First of all, double check if the coordinates and the map index are correct in the server files. Server/share/locale/map/index 103 metin2_map_t1 105 metin2_map_t2 110 metin2_map_t3 111 metin2_map_t4 Server/share/locale/map/metin2_map_t1/Setting.txt Server/share/locale/map/metin2_map_t2/Setting.txt Server/share/locale/map/metin2_map_t3/Setting.txt Server/share/locale/map/metin2_map_t4/Setting.txt Click here to download all the files mentioned above and the additional server_attr file for each map. Server/Game99/CONFIG MAP_INDEX: 103 105 110 111 In your client files, you should also check if the atlasinfo.txt contains the correct coordinates for each map as in your server files. Client/locale/atlasinfo.txt Client/root/atlasinfo.txt metin2_map_t1 0 25600 3 3 metin2_map_t2 6400 0 1 1 metin2_map_t3 32000 0 1 1 metin2_map_t4 57600 0 1 1 You should also double check if you have another map on top of the guild map's coordinates, sometimes this is a common issue when warping to a map or simply using the GM go command. Here is what I mean, Each block represents a map, as you can see T1, T2, T3 and T4 are separate from each other and no other map is on top of them. Now, in this case you can clearly see another map is on top of map T1 which will mess the coordinates of the map. Click here to download the tool "M2Koordinator - By KingSora!1" used in the demonstration above. There is also a possibility that the map index is not correct in your source, this should be a rare case but it should also be verified. Source/Server/game/war_map.h Make sure you are using the correct map index. enum EWarMapIndex { WAR_MAP_INDEX_NORMAL = 110, WAR_MAP_INDEX_FLAG = 111, }; Instead of using makequestbutton in the guild_war_join.quest you can use send_letter. Here is an example:
  5. As @TMP4said, Dump Proto does not dump some values to the protos as it isn't needed by the client. Although your tutorial orientation is correct @TMP4, you have to consider that BYTE is unsigned and it will not dump the correct value of the AddonType since, usually, it holds the value -1 or 0. So, @ ahmet199, I have made a complete tutorial on how you can add it correctly to your Dump Proto tool and call it from your client. Dump Proto source. Client source. Finally, here is how you can get that value from the item module. Client source. Root example.
  6. function notice_all_yellow(text) notice_all("|cFFFFFF00|H|h" .. text) end
  7. You can find the version number in the client's source at UserInterface/Locale_inc.h Good luck with that version...
  8. There isn't any other proper way to fix this unless you calculate the sash from the matrix of the bone. You can check the author of the topic below that provides the best fix for this. If you don't want to calculate the position for every animation (which isn't worth it) while you're on a specific mount, dead or any other animation, it's worth checking out the topic. 1. Scaling method.
  9. Thanks for sharing, as always! You could also check the position realtime while the player is in range so it updates faster. /// 1. @ UserInterface/PythonMiniMap.cpp // Search @ void CPythonMiniMap::RenderAtlas const auto& PartyInfo = it->second; __GlobalPositionToAtlasPosition(PartyInfo->lX - m_dwAtlasBaseX, PartyInfo->lY - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY); // Replace with long xPos = PartyInfo->lX; long yPos = PartyInfo->lY; CInstanceBase* pkInst = CPythonCharacterManager::Instance().GetInstancePtrByName(pPartyMemberInfo->strName.c_str()); if (pkInst) { TPixelPosition kInstPos; pkInst->NEW_GetPixelPosition(&kInstPos); xPos = kInstPos.x + m_dwAtlasBaseX; yPos = kInstPos.y + m_dwAtlasBaseY; } __GlobalPositionToAtlasPosition(xPos - m_dwAtlasBaseX, yPos - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);
  10. /// 1. @ game/char_affect.cpp // Search @ void CHARACTER::ClearAffect if (IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || IS_NO_SAVE_AFFECT(pkAff->dwType)) { ++it; continue; } // Add below #if defined(__ALIGNMENT_AFFECT__) if (pkAff->dwType >= AFFECT_ALIGNMENT) { ++it; continue; } #endif
  11. Replace auto_ptr with unique_ptr. Reference: [Hidden Content]
  12. This is due to the dump_proto only reading one value although you have more values separated with a delimiter so you have to make sure you have the right delimiter. If your mob_proto.txt has for example: ANIMAL,ZODIAC You have to make sure your dump_proto is reading the symboly , And if your dump_proto for example has: ANIMAL|ZODIAC Then the delimiter you should be using is | Here is an example. /// 1. @ dump_proto/ItemCSVReader.cpp // Search @ int get_Mob_RaceFlag_Value string* arInputString = StringSplit(inputString, "|"); // 프로토 정보 내용을 단어별로 쪼갠 배열. // Replace with string* arInputString = StringSplit(inputString, ","); // 프로토 정보 내용을 단어별로 쪼갠 배열.
  13. Here is a rather "complete" tutorial and I hope you understand. First, let's start with the Server Source. 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. Sincerely, Owasp.
  14. You can try to add a pulse for that. /// 1. @ common/service.h // Add #define __CHANGE_STAT_PULSE__ /// 2. @ game/char.h // Search }; ESex GET_SEX(LPCHARACTER ch); // Add above #if defined(__CHANGE_STAT_PULSE__) public: int GetChangeStatPulse() { return m_iChangeStatPulse; } void SetChangeStatPulse(int iPulse) { m_iChangeStatPulse = iPulse; } protected: int m_iChangeStatPulse; #endif /// 3. @ char.cpp // Search @ void CHARACTER::Initialize m_dwNextStatePulse = 0; // Add below #if defined(__CHANGE_STAT_PULSE__) m_iChangeStatPulse = 0; #endif /// 4. @ cmd_general.cpp // Search @ ACMD(do_stat) if (ch->GetRealPoint(idx) >= MAX_STAT) return; // Add below #if defined(__CHANGE_STAT_PULSE__) if (ch->GetChangeStatPulse() > thecore_pulse()) { if (test_server) ch->ChatPacket(CHAT_TYPE_INFO, "Slow down, you're changing stats to fast!"); return; } ch->SetChangeStatPulse(thecore_pulse() + PASSES_PER_SEC(10 * 1)); #endif
  15. Just add it above the class in the char_manager.h file. class CHARACTER_MANAGER : public singleton<CHARACTER_MANAGER> Result #if defined(__EVENT_BANNER_FLAG__) typedef std::map<DWORD, std::string> BannerMapType; #endif class CHARACTER_MANAGER : public singleton<CHARACTER_MANAGER>
  16. The issue was that the banner list wasn't being initialized with the command if the game event flag wasn't enabled before. So here is what you must change; /// 1. // Search @ CHARACTER_MANAGER::SpawnBanners if (!m_bIsLoadedBanners) return false; // Replace with if (!m_bIsLoadedBanners) InitializeBanners(); Topic: Updated MEGA (Link) & committed an updated to the repository.
  17. Type /e banner 20143, wait 5 - 10 seconds and restart the server and then check if they have appeared.
  18. Do you have the NPC's implemented? 20127 Anniversary Banner 1 20128 Anniversary Banner 2 20129 Anniversary Banner 3 20130 Anniversary Banner 4 20131 Anniversary Banner 5 20132 Anniversary Banner 6 20133 Anniversary Banner 7 20134 Solar Banner 20135 Christmas Banner 20138 Ramadan Banner 20142 Halloween Banner 20143 Easter Banner
  19. Did you add the data files to your server files? And please show your char_manager.cpp and char_manager.h You can use [Hidden Content] to paste your files.
  20. You must show us the problem, what errors are you having? You cannot expect help just by saying that it doesn't work or it crashes. Can you run the debugger (gdb)? First of all, if you don’t have the gdb package run the command: pkg install -y gdb Learn how-to here: In short these are the commands that you need: [root@localhost ~]# cd < Directory were .core is generated > [root@localhost ~]# gdb [root@localhost ~]# set gnutarget i386-marcel-freebsd [root@localhost ~]# file < Name of the core file > [root@localhost ~]# core < Name of the .core file > [root@localhost ~]# bt full [root@localhost ~]# backtrace Here is an example of how it should look like: [root@localhost ~]# cd /m2server/game/channel1/core1 [root@localhost ~]# gdb [root@localhost ~]# set gnutarget i386-marcel-freebsd [root@localhost ~]# file game [root@localhost ~]# core game.core [root@localhost ~]# bt full [root@localhost ~]# backtrace Do you also have errors while compiling? If yes, show us the complete output of the compiler errors. Please make sure before posting, you are submitting the issues regarding the post / system to avoid off-topic. Sincerely, Owasp.
  21. M2 Download Center Download Here ( Internal ) Download Here ( MEGA ) Download Here ( GitHub ) Hello, this release is nothing special but I hope someone finds it useful for their server. Introduced in the 10th anniversary of Metin2, your city will look more appealing with banner flags describing the on-going event your server is currently running. How to add more banners? @ data/banner/list.txt ___________________ | VNUM | NAME | |------ | ----------| | 20142 | halloween | | 20143 | easter | | 20135 | xmas | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ You can simply add more banner flags following the example above. VNUM is the VNUM / ID of the NPC. NAME is the name of the command and file of the banner. Note: If you want to add for example the Ramadan Banner which VNUM is 20138, this is how you should do it step by step. Edit @ data/banner/list.txt and extended the file with: ___________________ | VNUM | NAME | |------ | ----------| | 20138 | ramadan | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ Make duplicates of the existing banners. Copy data/banner/a/xmas.txt and rename the duplicated file to data/banner/a/ramadan.txt Edit data/banner/a/ramadan.txt and replace the VNUM / ID with the Ramadan Banner 20138. Copy data/banner/b/xmas.txt and rename the duplicated file to data/banner/b/ramadan.txt Edit data/banner/b/ramadan.txt and replace the VNUM / ID with the Ramadan Banner 20138. Copy data/banner/c/xmas.txt and rename the duplicated file to data/banner/c/ramadan.txt Edit data/banner/c/ramadan.txt and replace the VNUM / ID with the Ramadan Banner 20138. @ Source/Client/UserInterface/InstanceBase.cpp Search #if defined(ENABLE_EVENT_BANNER_FLAG) BOOL CInstanceBase::IsBannerFlag() { if (GetRace() >= 20127 && GetRace() <= 20143) return TRUE; return FALSE; } #endif Replace with (If you want it to be more manageable) #if defined(ENABLE_EVENT_BANNER_FLAG) BOOL CInstanceBase::IsBannerFlag() { switch(GetRace()) { case 20127: // Anniversary Banner 1 case 20128: // Anniversary Banner 2 case 20129: // Anniversary Banner 3 case 20130: // Anniversary Banner 4 case 20131: // Anniversary Banner 5 case 20132: // Anniversary Banner 6 case 20133: // Anniversary Banner 7 case 20134: // Solar Banner case 20135: // Christmas Banner case 20138: // Ramadan Banner case 20142: // Halloween Banner case 20143: // Easter Banner return TRUE; } return FALSE; } #endif Don't forget each folder (a / b / c) have different positions so be careful when copying files. How to activiate? In-game, you can use the command: /banner < x > < banner_name > where < x > is the status ( 1 : ON / 0 : OFF ) and < banner_name > is the name of the banner @ data/banner/list.txt
  22. Here, use int for the loop and you can also use the default number function to randomize the numbers. for (int bSlot = 0; bSlot < ESlotMachine::MAX_SLOT_MACHINE_SLOTS; ++bSlot) { m_bSlotMachineReel[bSlot] = number(1, (iSlotMachineReels > 0 ? iSlotMachineReels : ESlotMachine::MAX_SLOT_MACHINE_REELS)); }
  23. I have forgot to change that to GOLD_MAX. In fact there were some mistakes that I forgot to remove and to included. I have reviewed the system on a clean server revision 40250. Topic updated, Additional information, reviewed code & updated files. If any one encounters any problem regarding the system please let me know.
  24. M2 Download Center Download Here ( Internal ) Download Here ( MEGA ) Download Here ( GitHub ) Hello again M2Dev, It’s been quite I wile since I haven’t released anything for the community so today I decided to release one of my systems I created some days ago, it’s very simple and it consists on gambling to say the least… The point is to bet your money (yang/gold) on a higher amount of gold and the higher you bet the higher the payout is, similar as how a casino slot machine works without being too complex. The rules are simple, you have three (3) possible jackpots in which each one has a payout amount. Hit the same icon three (3) times and you will win the jackpot. If you get any other combination that contain jackpot reel icons, you will win half your bet back with a short bet multiplier. So, the jackpot reels work as so, A, A, A = Jackpot 1 B, B, B = Jackpot 2 C, C, C = Jackpot 3 All other possible combinations to have a winning: A, A, B; A, A, C; B, B, A; B, B, C; C, C, A; C, C, B; A, B, C; C, A, B; B, A, C; C, B, A; A, C, B; If you happen to win a jackpot while having close to maximum gold, you will receive an item in your inventory if you have space for it otherwise you will receive it in your storage room. The item will contain the jackpot value. How to configure? @ game/constants.cpp you can edit all the betting values you want. @ game/contants.cpp you can edit as well the jackpot values. @ root/uiSlotMachineSystem.py you can edit the reel icons and bet values. In-game, you can also use the commands, /e slot_machine_reels < x > where < x > is the number of reels you want to randomize. The more reel icons you have, the harder it is to win a jackpot! /e slot_machine_multiplier < x > where < x > is the value of the multiplied you want. The higher this value, the higher the payout is. Additional information For those who are using older versions of C++ some data type identifiers need to be changed as shown below. uint64_t = unsigned long long uint32_t = UINT int32_t = INT uint16_t = WORD uint8_t = BYTE Sincerly, Owsap
×
×
  • 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.