Jump to content
Logo
Your Metin2 zone for C++, Python, Lua.

Sleep

Helper
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Sleep

  1. Jeśli masz wtyczki które używają ImageBox, tak długo, jak okno gry jest otwarte (chyba że ponownie się zalogujesz itp.), Nawet jeśli zamkniesz okno, obrazy w nim nie są usuwane z pamięci i powodują wzrost pamięci podczas przeładowywania przy każdym uruchomieniu. If you have plug-ins that use ImageBox, as long as the game window is open (unless you re-login, etc.), even if you close the window, the images in it are not removed from memory and cause memory to grow when reloading each time you run it. EterPythonLib\PythonWindowManagerModule.cpp // Search for this function PyObject* wndImageLoadImage(PyObject* poSelf, PyObject* poArgs) { // ... existing code ... } // Add below PyObject* wndImageUnloadImage(PyObject* poSelf, PyObject* poArgs) { UI::CWindow* pWindow; if (!PyTuple_GetWindow(poArgs, 0, &pWindow)) { return Py_BuildException(); } if (!((UI::CImageBox*)pWindow)->UnloadImage()) { return Py_BuildException("Failed to unload image"); } return Py_BuildNone(); } // Search for this method registration { "LoadImage", wndImageLoadImage, METH_VARARGS }, // Add below { "UnloadImage", wndImageUnloadImage, METH_VARARGS }, EterPythonLib\PythonWindow.cpp // Search for this method BOOL CImageBox::LoadImage(const char* c_szFileName) { // ... existing code ... } // Add below BOOL CImageBox::UnloadImage() { if (!m_pImageInstance) return FALSE; OnDestroyInstance(); return TRUE; } EterPythonLib\PythonWindow.h // Search for this method declaration BOOL LoadImage(const char* c_szFileName); // Add below BOOL UnloadImage(); root/ui.py # Search for this class definition class ImageBox(Window): # ... existing members ... # Find these lines self.eventFunc = {} self.eventArgs = {} # Add below self.imageLoaded = False # ... # Search for this line where you load the image wndMgr.LoadImage(self.hWnd, imageName) # Add below self.imageLoaded = True # ... # Search for this destructor definition def __del__(self): # ... existing code ... # Add below if self.imageLoaded: self.UnloadImage()
  2. Komenda do Navicat: INSERT INTO `item_proto` VALUES (71115, '71115', 'Pieczec Dzika Wojennego', 28, 2, 0, 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 7, 2592000, 0, 0, 63, 20, 0, 0, 0, 0, 0, 0, 0, 0, 20115, 0, -1, -1, -1, -1, -1, -1, 0, 0, 0); Wymagany Quest: ride.lua Dodaj to byle gdzie do quest_functions: item.is_available0 Tam gdzie Value4 < to id z mob_proto czyli np: (To są standardowe id mountów) 20110 boar 20111 dog_god 20112 fire_tiger 20113 lion 20114 lion_white 20115 boar_2 20116 dog_god_2 20117 fire_tiger_2 20118 lion_2 20119 horse_event1 20120 fire_tiger_blue 20121 fire_tiger_darkred 20122 fire_tiger_gold 20123 fire_tiger_green 20124 fire_tiger_pied 20125 fire_tiger_white Podmień te pliki w PACK https://mega.nz/file/aXRHgS4B#9NCjcB6e-PmssSYmFvMinCsE_A6my_BWKHa3gZS0sOs I to tyle, wierzchowce już działają.
  3. Wpisy do navicat: INSERT INTO `item_proto` VALUES (85001, '85001', 'Szarfa Wladcy(prosta)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85002, '85002', 'Szarfa Wladcy(dostojna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85003, '85003', 'Szarfa Wladcy(zacna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85004, '85004', 'Szarfa Wladcy(unikat.)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85005, '85005', 'Szarfa Mistrza(prosta)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85006, '85006', 'Szarfa Mistrza(dostojna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85007, '85007', 'Szarfa Mistrza(zacna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85008, '85008', 'Szarfa Mistrza(unikat.)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (90000, '90000', 'Świadectwo Zmiany', 3, 14, 0, 1, 32896, 8196, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0); INSERT INTO `item_proto` VALUES (85011, '85011', 'Szarfa Ksiecia(prosta)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85012, '85012', 'Szarfa Ksiecia(dostojna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85013, '85013', 'Szarfa Ksiecia(zacna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85014, '85014', 'Szarfa Ksiecia(unikat.)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85015, '85015', 'Szarfa Krola(prosta)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85016, '85016', 'Szarfa Krola(dostojna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85017, '85017', 'Szarfa Krola(zacna)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); INSERT INTO `item_proto` VALUES (85018, '85018', 'Szarfa Krola(unikat.)', 28, 3, 0, 1, 32768, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100, 0, 0); Quest na NPC = id moba: 20390 acce_open.quest
  4. Jeśli zamkniesz grę poleceniem /shutdown i spróbujesz się zalogować, pojawi się błąd pakietu i gra się zamknie. Myślę, że ten problem występuje po usunięciu szyfrowania pakietów (cryptopp). Głównym źródłem problemu jest to, że jądro AUTH nie nawiązuje połączenia P2P jak inne jądra, łączy się jedynie z bazą danych. Dlatego pakiet P2P wysłany podczas polecenia zamknięcia nie osiąga poziomu AUTH. Rozwiązanie jest następujące: If you close the game with the /shutdown command and try to log in, there is a packet error and the game closes. I think this problem occurs when packet encryption (cryptopp) is removed. The main source of the problem is that the AUTH kernel does not establish a P2P connection like other kernels, it only connects to the database. Therefore, the P2P packet sent during the shutdown command does not reach AUTH. The solution is as follows: cmd_general.cpp: ACMD(do_shutdown) Find: Shutdown(10) add before: db_clientdesc->DBPacketHeader(HEADER_GD_GO_SHUTDOWN, 0, 0); input_db.cpp: case HEADER_DG_WEDDING_END Add after; case HEADER_DG_GO_SHUTDOWN: g_bNoMoreClient = true; break; Common/tables.h: HEADER_DG_ITEMAWARD_INFORMER = 180, Add after; HEADER_DG_GO_SHUTDOWN = 182, Find: HEADER_GD_DELETE_AWARDID = 138, Add after; HEADER_GD_GO_SHUTDOWN = 146, db/clientmanager.cpp case HEADER_GD_DELETE_AWARDID: Add after; case HEADER_GD_GO_SHUTDOWN: m_pkAuthPeer->EncodeHeader(HEADER_DG_GO_SHUTDOWN, 0, 0); break;
  5. You need create in player table "eventy" Quest written a long time ago by 1 pandora fucker, has never been used, I clean the disks. Musisz stworzyć w player bazę danych o nazwie "eventy" Quest pisany dawno temu przez 1 zjeba z pandory, nigdy nie został użyty, czyszczę dyski. Code: quest itemshop begin state start begin when 20358.chat."Darmowy itemshop" with pc.is_gm() begin say_title("Darmowy itemshop") say("") say("Witaj, aktualnie rozdaję darmowy itemshop! ") say("to niepowtarzalna okazja, aby z niej skorzystać ") say("") say("Czy chcesz otrzymać darmowy itemshop? ") say("") local s = select("Tak", "Nie") if s == 1 then if mysql_direct_query(string.format("SELECT * FROM player.eventy WHERE id = %d AND status = 1;", pc.get_player_id())) == 1 then say_title("Darmowy itemshop") say("") say("Niestety, nie możesz już otrzymać ") say("darmowego itemshopu") elseif pc.get_sex() == 0 then -- facet say_title("Darmowy itemshop") say("") say("Otrzymujesz darmowy itemshop! ") say("") pc.give_item2(1009,1) mysql_direct_query(string.format("INSERT INTO player.eventy (id, status) VALUES(%d, 1) ON DUPLICATE KEY UPDATE status = 1;", pc.get_player_id())); elseif pc.get_sex() == 1 then say_title("Darmowy itemshop") say("") say("Otrzymujesz darmowy itemshop! ") say("") pc.give_item2(19,1) mysql_direct_query(string.format("INSERT INTO player.eventy (id, status) VALUES(%d, 1) ON DUPLICATE KEY UPDATE status = 1;", pc.get_player_id())); end elseif s == 2 then say_title("Darmowy itemshop") say("") say("Wroc pozniej, gdy sie namyslisz") end end when login begin if mysql_direct_query(string.format("SELECT * FROM player.eventy WHERE id = %d AND status = 1;", pc.get_player_id())) == 1 then else notice("Darmowy itemshop jest do odebrania u uriela! ") notice("Udaj się do niego już dziś! ") end end end end
  6. Dodatkowo usunięto z Source kilka blokad które mogły wpływać na hamachi oraz cały block_country. Download + przykładowe wpisy: Do każdego CONFIG BIND_IP: 25.4.45.100 < Tutaj twoj adres + koncowka 100 PROXY_IP: 25.4.45.2 < Tutaj twoj caly adres hamachi bez koncowki 100 Serverinfo.py - Musi być bez końcówki 100 czyli adres: 25.4.45.2 https://mega.nz/file/vOh0QZLD#2kQxzXaZSohiTCsGBA_pC9rrAuhj8QedwAeulfOiml0
  7. https://visualstudio.microsoft.com/pl/vs/community/ Komendy użyte w filmie: cd /src/Server gmake clean gmake -j20
  8. Hamachi Download: https://vpn.net/ Komendy użyte w filmie: ee /etc/rc.conf ifconfig_em0="inet 25.4.45.100 netmask 255.255.0.0" defaultrouter="25.4.45.2" ee /etc/resolv.conf nameserver 142.2.2.3 service netif restart service routing restart
  9. AKTUALIZACJA NA ROK 2024 Paczka została odchudzona z 6/7gb do 2.10GB w tym cała Wirtualna Maszyna Zaktualizowano temat w tym poprawiono: - Handel - Kostiumy - Skrzynie Ucznia - Dodano przedmioty startowe UWAGA W tym miesiącu na Youtube wleci wiele nowych poradników w tym: - Jak założyć nowe konto/postać - Jak otworzyć serwer na hamachi - Jak aktywować Wierzchowce - Jak aktywować Pety - Jak aktywować Alchemię - Jak dodać Szarfy - Jak uruchomić serwer na VPS/DEDYKU I wiele więcej. Na kanale: https://www.youtube.com/@gamecoretop Hasło: 123
  10. Witam na pewnym forum ludzie szukają tych plików dlatego udostępniam je tutaj, ale nie 1:1 ponieważ odchudziłem je lekko oraz wyjąłem pliki serwerowe z Virtualboxa + Dodatkowo na maszynie wirtualnej skonfigurowałem automatyczne połączenie z internetem, aby każda nowa osoba mogła bez problemu to uruchomić i się połączyć chociażby za pomocą Winscp czy Navicata. Tak aktualnie wygląda paczka oraz prezentacja: SSH: 123 Password: gamecoretop Download: https://drive.google.com/file/d/1VNLmHWUQZ_FljdGSxgdiPUf3xLi-n5O_/view?usp=sharing
  11. Ranks point with automat Limit Char_item.cpp code (When value0 in item_proto > eg. 1000) case 71107: case 39032: { int MuchomorTuByl = item->GetValue(0); if (GetAlignment() >= 200000) { ChatPacket(CHAT_TYPE_INFO, ("You Have Limit!")); return false; } if (GetAlignment() + MuchomorTuByl * 10 > 200000) { MuchomorTuByl = (200000 - GetAlignment()) / 10; if ((200000 - GetAlignment()) % 10 > 0) { MuchomorTuByl += 1; } } UpdateAlignment(MuchomorTuByl * 10); item->SetCount(item->GetCount() - 1); ChatPacket(CHAT_TYPE_INFO, ("Added - %d ranks points."), MuchomorTuByl); } break;
  12. cmd_gm.cpp ACMD(do_advance) { char arg1[256], arg2[256]; two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2)); if (!*arg1 || !*arg2) { ch->ChatPacket(CHAT_TYPE_INFO, "Syntax: advance <name> <level>"); return; } LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(arg1); if (!tch) { ch->ChatPacket(CHAT_TYPE_INFO, "%s not exist", arg1); return; } int level = 0; str_to_number(level, arg2); tch->SetExp(0); // Fix Grzyb tch->ResetPoint(MINMAX(0, level, gPlayerMaxLevel)); } ACMD(do_level) { char arg2[256]; one_argument(argument, arg2, sizeof(arg2)); if (!*arg2) { ch->ChatPacket(CHAT_TYPE_INFO, "Syntax: level <level>"); return; } int level = 0; str_to_number(level, arg2); ch->SetExp(0); // Fix Grzyb ch->ResetPoint(MINMAX(1, level, gPlayerMaxLevel)); ch->ClearSkill(); ch->ClearSubSkill(); }
  13. Hi I used to play with the code to create real snow in Metin2, I did this code a long time ago and at this point I no longer need it. Maybe it will be useful to someone Cześć, bawiłem się kodem do tworzenia prawdziwego śniegu w Metin2, zrobiłem ten kod dawno temu i w tym momencie już go nie potrzebuję. Może komuś się przyda Download: New Snow.rar
  14. PythonApplicationModule.cpp #ifdef ENABLE_REBORN_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_REBORN_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_REBORN_SYSTEM", 0); #endif Albo po prostu usuń if app.ENABLE_REBORN_SYSTEM: i zrób sam import uiReborn
  15. perserga buys systems from hoog, this is 1 such system from an idiot. I dont have screenshots but paid for it 150 euro Good luck 🙂 and Merry Christmas System_Łowienia.rar
  16. All tutorials very stupid from internet, today I share best options how to block PvP on map. Userinterface/instanceBase.cpp Find: bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) { add after: const std :: string & c_rstrMapFileName = CPythonBackground :: Instance ().GetWarpMapName (); if (IsPC () && rkInstVictim.IsPC () && (c_rstrMapFileName == "metin2_map_slz4")) return false; where metin2_map_slz4 set your map name game/pvp.cpp Find: bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) { add after: if (pkChr->GetMapIndex() == 354 || pkVictim->GetMapIndex() == 354) return false; Good job, now you block pvp.
  17. Hi, I was annoyed by always having to open the respective GUIs to distribute skill and status points, so I've now created a way to do this stuff via keyboard shortcuts. For the skills, I've used the combination CTRL + SHIFT + 1..8 and linked it to the Quickslots. So, you can also do something on, for example, the second Quickslot page using ALT + CTRL + SHIFT + 1..8. For the status points, it's bound to the keys i (int), v (vit), s (str), and d (dex) in combination with CTRL. Possibly, this could be expanded, for example, CTRL + SHIFT + i = Set all available points to INT. But that's something everyone can decide for themselves Code: Python: root/game.py #4 Insert new functions: def __PressIKey(self): if app.IsPressed(app.DIK_LCONTROL): net.SendChatPacket("/stat iq") else: self.interface.ToggleInventoryWindow() def __PressVKey(self): if app.IsPressed(app.DIK_LCONTROL): net.SendChatPacket("/stat ht") else: self.interface.ToggleCharacterWindow("SKILL") def __PressSKey(self): if app.IsPressed(app.DIK_LCONTROL): net.SendChatPacket("/stat st") else: self.StopDown() def __PressDKey(self): if app.IsPressed(app.DIK_LCONTROL): net.SendChatPacket("/stat dx") else: self.StopRight() #Change function def __PressNumKey(self,num) def __PressNumKey(self,num): if not app.IsPressed(app.DIK_LSHIFT): if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if num >= 1 and num <= 9: if(chrmgr.IsPossibleEmoticon(-1)): chrmgr.SetEmoticon(-1,int(num)-1) net.SendEmoticon(int(num)-1) elif app.IsPressed(app.DIK_LSHIFT): if app.IsPressed(app.DIK_LCONTROL): if num >= 1 and num <= 8: (quickSlotType, position) = player.GetLocalQuickSlot(num - 1) skillIndex = player.GetSkillIndex(position) skillGrade = player.GetSkillGrade(position) skillLevel = player.GetSkillLevel(position) skillType = skill.GetSkillType(skillIndex) if skillType != skill.SKILL_TYPE_GUILD and skillType != skill.SKILL_TYPE_HORSE: if skillGrade <= 0 and skillIndex >= 0: net.SendChatPacket("/skillup " + str(skillIndex)) else: if num >= 1 and num <= 4: self.pressNumber(num-1) #Change the function assignments for key press I, S, V, D in the keyDict: onPressKeyDict[app.DIK_I] = lambda : self.__PressIKey() onPressKeyDict[app.DIK_V] = lambda : self.__PressVKey() onClickKeyDict[app.DIK_D] = lambda : self.__PressDKey() onClickKeyDict[app.DIK_S] = lambda : self.__PressSKey()
Style Version: 0.1

The code was completely created from scratch and optimized.

The basic style on which it was created: Default

Created by: Grzyb.ovh

The style was to be simple to browse topics, devoid of graphics, uniform in color and definitely simple. ×

×
×
  • Create New...

Important Information

Do you like cookies? 🍪 We use cookies to provide the highest quality of service. Learn more