Jump to content

Owsap

Honorable Member
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    29
  • Feedback

    91%

Everything posted by Owsap

  1. 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
  2. Here is your problem. Change int iRet; if(iRet != BATTLE_NONE) { pkVictim->SetSyncOwner(this); if (pkVictim->CanBeginFight()) pkVictim->BeginFight(this); } With pkVictim->SetSyncOwner(this); if (pkVictim->CanBeginFight()) pkVictim->BeginFight(this); int iRet;
  3. Show us your CHARACTER::Attack function from char_battle.cpp
  4. GitHub Repository: [Hidden Content] Preview: [Hidden Content]
  5. /// 1. @ game/src/char_manager.cpp // Search LPCHARACTER CHARACTER_MANAGER::SpawnMob(DWORD dwVnum, long lMapIndex, long x, long y, long z, bool bSpawnMotion, int iRot, bool bShow) { const CMob* pkMob = CMobManager::instance().Get(dwVnum); if (!pkMob) { sys_err("SpawnMob: no mob data for vnum %u", dwVnum); return NULL; } // Add below unsigned long ulRestricedMapIndex[] = { 3, 23, 43 }; if (g_bChannel > 1 /* Check channel */ && std::find(std::begin(ulRestricedMapIndex), std::end(ulRestricedMapIndex), mapindex) != std::end(ulRestricedMapIndex) /* Search the map index for this mob spawn */) { switch (dwVnum /* Mob VNUM */ ) { case 591: // Bestial Captain (Normally spawns @ metin2_map_a3, metin2_map_b3, metin2_map_c3) return NULL; } } I'm not sure what you want with "duration" but the block of code above will block the spawn of the monster VNUM inside the switch which spawns in the map index inside the ulRestricedMapIndex array.
  6. If I read your question correctly, you want to spawn a monster (boss) only in channel 1. You can try this, I have not tested it. Let me know if it works. /// 1. @ game/src/char_manager.cpp // Search LPCHARACTER CHARACTER_MANAGER::SpawnMob(DWORD dwVnum, long lMapIndex, long x, long y, long z, bool bSpawnMotion, int iRot, bool bShow) { const CMob* pkMob = CMobManager::instance().Get(dwVnum); if (!pkMob) { sys_err("SpawnMob: no mob data for vnum %u", dwVnum); return NULL; } // Add below if (g_bChannel > 1) { switch (dwVnum) { case 591: // Bestial Captain (metin2_map_a3, metin2_map_b3, metin2_map_c3) return NULL; } }
  7. Search for static void GrannyError in UserInterface.cpp.
  8. Your hyperlink tokens are messed up, it looks like they’re not in order. Can you show us: "playerGetItemLink" from UserInterface/PythonPlayerModule.cpp HyperlinkItemToolTip class from root/uiToolTip.py Additional information: Do you use 5 sockets? "METIN_SOCKET_MAX_NUM" Do you have change look system implemented?
  9. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) Hi, I made this system not so long ago, benefited the script from the official server and worked on the C++, just decided to share this system with everyone because I no longer care much about it. It’s not really a big of a system and most likely it could be leaked from some traitor so honestly, I rather share it myself. Instead of adding the tutorial here I will link a repository to the guidelines. Demonstration The inventory slot marking works best with @xP3NG3Rx's release. I do not support the implementation of the system neither does do author of the inventory slot marking, I believe.
  10. M2 Download Center Download Here ( Internal ) So, someone asked me to do this some time ago, I know some servers have already thought of this idea and have been present for some time but anyway I will share it since I haven’t seen nothing similar shared elsewhere and this has been sitting around my hard drive. Although it's something very simple, it’s a good feeling to see from the inventory the status of the dragon soul. Instead of adding the tutorial here I will link a repository to the guidelines. Git Repository [Hidden Content]
  11. Implementing CEF to the binary source is not that hard, if you look at the documents mentioned above you can easily follow up the examples that are already included in some of the CEF repositories, with this you can understand how CEF works and then start to integrate it in your binary. Here are also some useful links, [Hidden Content] [Hidden Content]
  12. No, that's a query you can run in Navicat, for example which you can see the variables of the sql_mode, it's just so you can confirm they were set.
  13. Try to add ALLOW_INVALID_DATES in the my.cnf Like so, # For advice on how to change settings please see # [Hidden Content] [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,ALLOW_INVALID_DATES Then restart your MySQL service mysql-server restart Once you haved restarted your MySQL run the query and confirm the variable is set. SHOW VARIABLES LIKE 'sql_mode' ; Now I think you can add '0000-00-00 00:00:00' to dates without any problem.
  14. Create a new file my.cnf in your /usr/locale # For advice on how to change settings please see # [Hidden Content] [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION
  15. You can find the file location using ps -aux|grep mysql In my case it's located @ /usr/local/my.cnf
  16. If you're setting your default value as '0000-00-00 00:00:00' you might want to disable STRICT_TRANS_TABLES @ /usr/local/my.cnf
  17. Especially their guild comment window, you can spam \n and the text will look so buggy. This is how it looks like rofl. Obs: This "system" was implemented some time ago and this print is from today rofl... still the same and like penger said, you report the problem and they ignore your report. For the chat window I had to disable the token from the input and even from text tail, since it's a good ideia. By looking through the official python root they cleary forgot to add the DisableEnterToken() on some scripts.... # Simply disabling the token in the functions did the trick. # @ PythonChat.cpp # @ void CWhisper::AppendChat #ifdef WJ_MULTI_TEXTLINE pChatLine->Instance.DisableEnterToken(); #endif # @ void CPythonChat::AppendChat #ifdef WJ_MULTI_TEXTLINE pChatLine->Instance.DisableEnterToken(); #endif # @ PythonTextTail.cpp # @ void CPythonTextTail::RegisterInfoTail #ifdef WJ_MULTI_TEXTLINE pTextTail->pTextInstance->DisableEnterToken(); #endif # @ CPythonTextTail::TTextTail * CPythonTextTail::RegisterTextTail #ifdef WJ_MULTI_TEXTLINE pTextTail->pTextInstance->DisableEnterToken(); #endif # @ void CPythonTextTail::RegisterChatTail #ifdef WJ_MULTI_TEXTLINE pTextTail->pTextInstance->DisableEnterToken(); #endif
  18. @Chief you should show us the error you are having, try to change std::unordered_set<CShop*> v; ↓ boost::unordered_set<CShop*> v;
  19. M2 Download Center Download Here ( Internal ) Nothing much, something quite simple but it gives it’s looks for those who are interested in details, so let’s start with it. Here is a visual appearance of the application window. [Hidden Content] Sorry for the low quality GIF. Here is a bigger view, [Hidden Content] UserInterface/Locale_inc.h UserInterface/PythonApplicationModule.cpp UserInterface/PythonNetworkStream.cpp Client/root/game.py
  20. I think this was a move they made for their multi language system since the packet sends the name from the server directly to the binary without any translation, with this method they can get the locale name based on the vnum, just my guess and the best way to handle it.
  21. Not sure where I could share this but here is a way to simply reload the ShopTableEx in-game. In reply to @Chief, @CHMarvin, @thespeedy and a contribution to @masodikbela's & @Mali61 post. Reload ShopTableEx game/src/cmd_gm.cpp game/src/shop_manager.cpp game/src/shop_manager.h Result [Hidden Content]
  22. If you are referring to the cooldown overlay try this at uiCharacter.py
×
×
  • 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.