Honorable Member Owsap 8175 Posted May 18, 2020 Honorable Member Share Posted May 18, 2020 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) Spoiler 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. 70 1 2 3 1 1 1 31 2 52 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
Hik 108 Posted May 19, 2020 Share Posted May 19, 2020 Thanks for sharing! Link to comment Share on other sites More sharing options...
Pisti95 134 Posted January 15, 2021 Share Posted January 15, 2021 (edited) my problem is this: GIF Don't remove books from special inventory, and don't add to new book. Does anybody have idea? This part (original): Spoiler #if defined(__SKILLBOOK_COMB_SYSTEM__) bool CInputMain::SkillBookCombination(LPCHARACTER ch, TItemPos(&CombItemGrid)[SKILLBOOK_COMB_SLOT_MAX], BYTE bAction) { if (!ch->GetDesc()) return false; // if (CombItemGrid.empty()) // return false; if (ch->GetExchange() || ch->GetShop() || ch->GetMyShop() || ch->IsOpenSafebox() || ch->IsCubeOpen()) return false; if (bAction != 2 /* COMBI_START */) return false; std::set <LPITEM> set_items; for (int i = 0; i < SKILLBOOK_COMB_SLOT_MAX; i++) { LPITEM pItem = ch->GetItem(CombItemGrid[i]); if (pItem) { if (pItem->GetType() != ITEM_SKILLBOOK) return false; set_items.insert(pItem); } } if (set_items.empty()) return false; if (ch->GetGold() < SKILLBOOK_COMB_COST) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You don't have enough Yang to trade books with me.")); return false; } for (std::set <LPITEM>::iterator it = set_items.begin(); it != set_items.end(); ++it) { LPITEM pItem = *it; if (pItem) { pItem->SetCount(pItem->GetCount() - 1); // pItem->RemoveFromCharacter(); // M2_DESTROY_ITEM(pItem); } } DWORD dwBooks[JOB_MAX_NUM][2 /* SKILL_GROUPS */][2] = { { // 0 - Warrior {50401, 50406}, // Skill Group 1 {50416, 50421}, // Skill Group 2 }, { // 1 - Ninja {50431, 50436}, // Skill Group 1 {50446, 50451}, // Skill Group 2 }, { // 2 - Sura {50461, 50466}, // Skill Group 1 {50476, 50481}, // Skill Group 2 }, { // 3 - Shaman {50491, 50496}, // Skill Group 1 {50506, 50511}, // Skill Group 2 }, #ifdef ENABLE_WOLFMAN_CHARACTER { // 4 - Wolfman {50530, 50535}, // Skill Group 1 {0, 0}, // Skill Group 2 }, #endif }; ch->PointChange(POINT_GOLD, -SKILLBOOK_COMB_COST); if (ch->GetSkillGroup() != 0) { DWORD dwMinRandomBook = dwBooks[ch->GetJob()][ch->GetSkillGroup() - 1][0]; DWORD dwMaxRandomBook = dwBooks[ch->GetJob()][ch->GetSkillGroup() - 1][1]; std::random_device rd; std::mt19937 gen(rd()); std::uniform_real_distribution<> dis(dwMinRandomBook, dwMaxRandomBook); DWORD dwRandomBook = dis(gen); ch->AutoGiveItem(dwRandomBook, 1); } else ch->AutoGiveItem(50300, 1); return true; } #endif Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Pisti95 134 Posted March 29, 2021 Share Posted March 29, 2021 (edited) My problem is this: GIF Solution my problem: char.h Everywhere in the file Search for: BYTE bCell Change for: UINT bCell After Search for: (everywhere too) BYTE bDestCell Change for: UINT bDestCell You should do In char_item.cpp too. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 3 1 Link to comment Share on other sites More sharing options...
danhakhavro 42 Posted June 13, 2021 Share Posted June 13, 2021 (edited) After edit a bit uiskillbook...py # if self.inven or self.invenSpecial: if self.invenSpecial: Got exactly the same problem als Pisti95, and BYTE bCell > UINT bCell doesnt work for me Edited June 13, 2021 by danhakhavro Link to comment Share on other sites More sharing options...
Pisti95 134 Posted June 13, 2021 Share Posted June 13, 2021 Use uiskillbook.py from GF root, if you can’t do the python part. Link to comment Share on other sites More sharing options...
danhakhavro 42 Posted June 13, 2021 Share Posted June 13, 2021 (edited) 1 hour ago, Pisti95 said: Use uiskillbook.py from GF root, if you can’t do the python part. Python part working well. I have exactly the same problem: GIF Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Pisti95 134 Posted June 14, 2021 Share Posted June 14, 2021 Check out my files. This is the hidden content, please Sign In or Sign Up 23 5 3 Link to comment Share on other sites More sharing options...
danhakhavro 42 Posted June 14, 2021 Share Posted June 14, 2021 (edited) 6 hours ago, Pisti95 said: Check out my files. This is the hidden content, please Sign In or Sign Up Thanks for your reply. Now i got this error: 0614 14:14:46801 :: Traceback (most recent call last): 0614 14:14:46801 :: File "uiSkillBookCombination.py", line 224, in OnPressEscapeKey 0614 14:14:46801 :: File "uiSkillBookCombination.py", line 40, in Close 0614 14:14:46801 :: File "uiSkillBookCombination.py", line 174, in SetCanMouseEventSlot 0614 14:14:46801 :: AttributeError 0614 14:14:46801 :: : 0614 14:14:46801 :: 'NoneType' object has no attribute 'GetInventoryPageIndex' 0614 14:14:46801 :: Line 174: def SetCanMouseEventSlot(self, idx): if not isinstance(idx, types.NoneType): if app.WJ_SPLIT_INVENTORY_SYSTEM: if self.inven or self.invenSpecial: page = self.inven.GetInventoryPageIndex() # range 0 ~ 1 special_page = self.invenSpecial.GetInventoryPageIndex() if (page * INVENTORY_PAGE_SIZE) <= idx < ((page + 1) * INVENTORY_PAGE_SIZE): # range 0 ~ 44, 45 ~ 89 idx = idx - (page * INVENTORY_PAGE_SIZE) self.inven.wndItem.SetCanMouseEventSlot(idx) elif self.invenSpecial.GetInventoryType() == 0: if (item.SKILL_BOOK_INVENTORY_SLOT_START + (special_page * SPECIAL_INVENTORY_PAGE_SIZE)) <= idx < (item.SKILL_BOOK_INVENTORY_SLOT_START + (((special_page + 1) * SPECIAL_INVENTORY_PAGE_SIZE))): idx = idx - (item.SKILL_BOOK_INVENTORY_SLOT_START + (special_page * SPECIAL_INVENTORY_PAGE_SIZE)) self.invenSpecial.wndItem.SetCanMouseEventSlot(idx) If i make: # if self.inven or self.invenSpecial: if self.invenSpecial: Than happen the previous bug: GIF Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 4 1 2 Link to comment Share on other sites More sharing options...
EAkar 8 Posted October 26, 2021 Share Posted October 26, 2021 (edited) if (!ch) return; Owsap may have forgotten because he loves game.core so much. Please add just in case. I deleted the folder. keep it if it's void and false if it's bool. Edited October 26, 2021 by EAkar if (!c_pData) return; delete Link to comment Share on other sites More sharing options...
narcisxb 26 Posted October 29, 2021 Share Posted October 29, 2021 1029 22:03:29127 :: Traceback (most recent call last): 1029 22:03:29127 :: File "ui.py", line 1535, in OnSelectEmptySlot 1029 22:03:29127 :: File "ui.py", line 87, in __call__ 1029 22:03:29127 :: File "ui.py", line 78, in __call__ 1029 22:03:29127 :: File "uiSkillBookCombination.py", line 116, in SelectEmptySlot 1029 22:03:29128 :: AttributeError 1029 22:03:29128 :: : 1029 22:03:29128 :: 'module' object has no attribute 'ITEM_SLOT_COUNT' 1029 22:03:29128 :: Any ideea? I don t have special invetory. Link to comment Share on other sites More sharing options...
Pisti95 134 Posted November 1, 2021 Share Posted November 1, 2021 On 10/29/2021 at 10:23 PM, narcisxb said: 1029 22:03:29127 :: Traceback (most recent call last): 1029 22:03:29127 :: File "ui.py", line 1535, in OnSelectEmptySlot 1029 22:03:29127 :: File "ui.py", line 87, in __call__ 1029 22:03:29127 :: File "ui.py", line 78, in __call__ 1029 22:03:29127 :: File "uiSkillBookCombination.py", line 116, in SelectEmptySlot 1029 22:03:29128 :: AttributeError 1029 22:03:29128 :: : 1029 22:03:29128 :: 'module' object has no attribute 'ITEM_SLOT_COUNT' 1029 22:03:29128 :: Any ideea? I don t have special invetory. in GameType.h, if you have this: const DWORD c_ItemSlot_Count = c_Inventory_Page_Size * c_Inventory_Page_Count; You should add it to your PythonPlayerModule.cpp: PyModule_AddIntConstant(poModule, "ITEM_SLOT_COUNT", c_ItemSlot_Count); Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted April 30, 2022 Active+ Member Share Posted April 30, 2022 (edited) @ Owsap Why man why? Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8175 Posted May 2, 2022 Author Honorable Member Share Posted May 2, 2022 (edited) On 4/30/2022 at 2:25 PM, speze012 said: @ Owsap Why man why? Quote "Why man why?" I'm sorry but this just frustrates me and makes me think that you are selfish and ungrateful, no offense but this question on the other hand offends me because this system was released free for all M2Dev members and despite your ignorance seeing the download button and link to the repository on the top of the topic just makes me think you want to make a problem out of 5 euro coffee money. It's not like I’m asking or demanding anyone to spend 5€ on a free system, it doesn’t make sense so just to respond your question and curiosity of why I added a 5€ button on my website is just to give the opportunity for people that want to help and donate this free release and personally, I don’t see any problem with this but who cares, most people just want free, free, free and don’t value the work of others and appreciate the shares. Addionally, the other reason I decided to add a value for downloading the system on my website was because I was constantly getting emails of orders regarding all free systems on my website. So, I don't get why you waste your time asking for something that looks obvious? “This system is free and on his website it’s 5 euros? Yeah, maybe it’s just for donations if anyone wants to say “thanks”. I hope you understand now... Edit: I have added Yes/No donate button just for your satisfaction. Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal 1 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted May 2, 2022 Active+ Member Share Posted May 2, 2022 I didn't mean to attack you! Thank you for expressing your opinion! @ Owsap Link to comment Share on other sites More sharing options...
Aer0xx70 0 Posted May 19 Share Posted May 19 Hello everyone, first of all, thank you very much for someone taking the trouble to create such a system to share it with everyone I tried to install the system, but unfortunately I get this error. Quote linking ../game_r41051 /usr/local/bin/ld: .obj/input_main.o: in function `CInputMain::SkillBookCombination(CHARACTER*, SItemPos (&) [10], unsigned char)': /home/server/Srcs/Server/game/src/input_main.cpp:4010: undefined reference to `CItem::IsSkillBook() const' collect2: error: ld returned 1 exit status gmake: *** [Makefile:177: ../game_r41051] Error 1 Did anyone have a solution?? I would be very grateful for that Link to comment Share on other sites More sharing options...
Recommended Posts