Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/11/21 in all areas

  1. Indeed, you're right, but from what he said I assumed that he already updated & compiled the libs.
    2 points
  2. M2 Download Center Download Here ( Internal )
    1 point
  3. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content]
    1 point
  4. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content]
    1 point
  5. M2 Download Center Download Here ( Internal ) Download Password: fuckspanishdev Hi guys, what happen to me in these days i was thinking to post a one of exclusive design that was made for my server in 2018 so i never used it i hope it would help. Important: is just a PSD file not a code if someone like to code it would be great Preview: Download Link
    1 point
  6. M2 Download Center Download Here ( Internal ) Hey everybody, I have something special for you. This time I'm gonna show you how to change the appearance of your horses on the fly! *** Disclaimer (kinda) *** I hereby declare that the changes I made are all by myself. I did not steal from anyone. Therefore for this guide I am the author. If anyone wants to copy my guide and post it anywhere he's free to do as long as he mentions the original author. I do not provide or share the source code or anything else protected by copyright. If something breaks I'm not the one to blame at. Always make sure to test changes. Never implement them on production releases, always use test distributions before! If you find any flaws, may it be regarding security or something else you're free to tell me so. I'm learning, as we all do, so I'm in no way too proud to admit I'm making mistakes. I'll correct them as soon as possible of course. 1) Which files do we need to edit? - char.h - char.cpp - char_horse.cpp - questlua_horse.cpp - tables.h (in common) - ClientManagerPlayer.cpp (in db) 2) What are we planning to do? Simple problem: I for myself hate it to use thousands of seals, switch between them, maybe have bugs and I think it's not that good solved to use an additional "system" to let players ride pets. So what do we want to do? We want to make the appearance of horses variable, so players can for example use seals to change the appearance of their horses instead of mounting an additional "horse". So. How are we going to do this? Simple! We can just add a variable to our character class, so the gamefile will know what appearance the players horse is like. We only need to change a bit here and there and the magic will apply! 3) Adding the new variable and make it work First let's add a new variable to store the horse appearance. We'll do it with SQL, so when the player sets a horse appearance, it'll be saved. This is the "horse-variable" (yeah damn, I can invent cool and catchy names!). Open tables.h and add the following line into the struct of SPlayerTable (you can add it anywhere, I just added it beyond the declaration of sRandomSP) DWORD sHorse_appearance; Now we already can close tables.h and save it. Next open ClientManagerPlayer.cpp and find: "random_sp = %d, " and add below: "horse_appearance = %u, " Then scroll a little bit down and you'll find pkTab->sRandomSP, Add below: pkTab->sHorse_appearance, Next search for: "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime," And change this line to "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,horse_appearance,playtime," Then search for: str_to_number(pkTab->sRandomSP, row[col++]); And add below: str_to_number(pkTab->sHorse_appearance, row[col++]); Then search for exactly this: "hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, gold, playtime, " and replace it with: "hp, mp, random_hp, random_sp, horse_appearance, stat_point, stamina, part_base, part_main, part_hair, gold, playtime, " And a few lines down to that we can find packet->player_table.sRandomSP, There we add: packet->player_table.sHorse_appearance, You can close ClientManagerPlayer.cpp now and open char.h. There we search for struct character_point and add below int iRandomSP; the following line: unsigned int horse_appearance; Let's close char.h and open char.cpp. Find tab.sRandomSP = m_points.iRandomSP; and add below: tab.sHorse_appearance = m_points.horse_appearance; Next find m_points.iRandomSP = t->sRandomSP; and add below again: m_points.horse_appearance = t->sHorse_appearance; That's all for the source part in this stage! You'll only have to add a new column called horse_appearance to your player-table (and player_deleted of course! ). Data type is unsigned int(6) default 0. You'd now be able to compile the gamefile and run it without any flaws. Nothing has changed yet, but this will come in the next part 4) Use our new variable In this part we'll create two functions, one gets the horse appearance and one sets it. Also we'll change our horse appearance function so the source will now redirect it to our new variable - if we set it. So the trick on this is, that normally the default value is 0. So if no vnum has been set the gamefile will instead use the normal horse_table like it did before. But if we set a vnum, it'll instead use that. Let's begin with the two new functions. Open char.h and add anywhere in public section (I added it below the GetHP() function): DWORD GetHorseAppearance() { return m_points.horse_appearance; } void SetHorseAppearance(DWORD vnum) { m_points.horse_appearance = vnum; } These are our new functions. We'll use them in the GetMyHorseVnum() function, but first we need to remove it's constness. In the same file find: virtual DWORD GetMyHorseVnum() const; and remove the const. So it looks like: virtual DWORD GetMyHorseVnum(); That's all we need now, we can just close char.h and move on to char_horse.cpp. Find DWORD CHARACTER::GetMyHorseVnum() const and remove it's constness: DWORD CHARACTER::GetMyHorseVnum() and at the beginning of the function we just add: if((DWORD horse_looks = GetHorseAppearance()) > 0) return horse_looks; Save it and close it. That's all Now, if you change the horse_appearance in your database, you'll notice the new horse appearance ingame! 5) Adding the questfunctions At last we want to be able to edit the horse appearance on the fly so we can use items like seals to set it. Open questlua_horse.cpp and add the following functions: int horse_set_appearance(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if(!ch) return 0; if (!lua_isnumber(L, 1)) { sys_err("wrong horse_appearance vnum"); return 0; } ch->SetHorseAppearance((DWORD)lua_tonumber(L, 1)); return 0; } int horse_get_appearance(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if(!ch) return 0; lua_pushnumber(L, ch->GetHorseAppearance()); return 1; } At last we add the new funcions to the horse_functions table at the end of the file: { "set_appearance", horse_set_appearance }, { "get_appearance", horse_get_appearance }, That's all! Close questlua_horse.cpp and compile! Now we can use the following quest functions: horse.set_appearance(DWORD vnum) = changes the horse apperance to the vnum provided horse.get_apperance() = returns a lua number representing the current horse appearance vnum Have fun playing with it!
    1 point
  7. If you're done updating to llvm11 and 64 bit. Don't forget to play arounf with -fsanitizer. It works like a charm and helps me a lot!
    1 point
  8. actually this is not a experiment. i wont use extern; CC = ccache clang++-devel INCDIR = LIBDIR = -L/usr/lib BINDIR = .. OBJDIR = OBJDIR # Standard Setting LIBS = -pthread -lm -lmd -lz # Removed -fno-rtti CFLAGS = -m64 -std=gnu++2a -fstrict-aliasing -pipe -march=native -fexceptions -DNDEBUG -D_THREAD_SAFE -fstack-protector-all -w -g -Ofast # Boost (1.7.2) INCDIR += -I/usr/local/include/boost # DevIL (1.7.8) INCDIR += -I/usr/local/include/IL LIBDIR += -L/usr/local/lib LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg # MariaDB (10.5) INCDIR += -I/usr/local/include LIBDIR += -L/usr/local/lib/mysql LIBS += -lmariadb # Intel OneAPI TBB INCDIR += -I/usr/local/include/oneapi LIBDIR += -L/usr/local/lib LIBS += -ltbb # Project Library INCDIR += -I../../liblua/include LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame if you want build your server with -m64 flag, you need to change some source codes. but if you want your src -m32 flag with amd64 freebsd, just use make command with -m32 flag; just add your /etc/make.conf; CFLAGS = -m32 i dont test this command but maybe it works; CPUTYPE = -march=i686 now, just use make install command; putty >> whereis devil output >> any/where/devil cd any/where/devil make install now you have 32 bit devil library. WARNING: if you use freebsd 11+, your default compiler llvm(clang), edit make.conf and put: CC = gcc49 or g++10 CXX = g++49 or g++10
    1 point
  9. Yes all internal libs are recompiled with x64 same as cryptopp and all other needed stuff.. + little changes in source..
    1 point
  10. He needs to do that, but he needs to recompile / use the 64 bit equvivalent of the libs too. And he needs to recompile metin2's libs like libthecore etc etc. It's not as easy as it sounds if you ask me. Changing dependencies is always a shit ton of work / trial & error.
    1 point
  11. Hey, you only need to change 'long' to 'int32_t' in game source. (Would be better if you'd change the other types as well - e.g: byte -> uint8_t, short -> int16_t, etc) For more informations you can check this link.
    1 point
  12. Python version. Work in both ways. From inventory to safebox and from safebox to inventory. [Hidden Content]
    1 point
  13. M2 Download Center Download Here ( Internal ) Hello, Here I post a little work that I made.
    1 point
  14. M2 Download Center Download Here ( Internal ) Release Free Map Little City, without exp zone and without pvp zone. You can use it for trade or little capital map. Dowload: [Hidden Content] ScreenShoot:
    1 point
  15. M2 Download Center Download Here ( Internal )
    1 point
  16. M2 Download Center Download Here ( Internal ) Receive items the first time you log in to the server. Contains the lua function in C ++ and the quest. This function allows you to receive the item and put it on. If you want to use it elsewhere, remember to check if the user has the equipment on. I do quests at a good price. I invite you Settings local item = { ['all'] = { -- Items for everyone {ITEM_ID, COUNT}, -- count OR "EQ" If I give EQ, the item will be put on the character }, [1] = { -- Warrior {ITEM_ID, ITEM_ID}, -- Put on {ITEM_ID, ITEM_ID} -- Equipment }, [2] = { -- Ninja {ITEM_ID, ITEM_ID}, -- Put on {ITEM_ID, ITEM_ID} -- Equipment }, [3] = { -- Sura {ITEM_ID, ITEM_ID}, -- Put on {ITEM_ID, ITEM_ID} -- Equipment }, [4] = { -- Shaman {ITEM_ID, ITEM_ID}, -- Put on {ITEM_ID, ITEM_ID} -- Equipment } } Also you can add ds.give_qualification() -- Alchemy horse.set_level(1) -- Horse level pc.set_skill_level(122, 2) -- Gives 2 combos pc.set_skill_level(131, 10) -- Summon a horse horse.ride() Notification chat("Have a nice game!")
    1 point
  17. (2.5) Questions & Answers specific rules Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue. For these who wants this, there're two simple methods: 1. Disable for all maps. [Hidden Content] 2. Disable for a specific map. # Search in CANNOT_SEE_INFO_MAP_DICT for: "metin2_map_devilsCatacomb" : False, # Add after: "metin2_your_map_name" : False,
    1 point
  18. The idea isn't so bad, but the code has too many useless lines, here's what you can do to improve it. def RefreshPickupFilter(self): #Weapon if systemSetting.IsPickUpFilterWeapon(): self.PickUpFilterList[0].Down() else: self.PickUpFilterList[0].SetUp() #Armor if systemSetting.IsPickUpFilterArmor(): self.PickUpFilterList[1].Down() else: self.PickUpFilterList[1].SetUp() #Ear if systemSetting.IsPickUpFilterEar(): self.PickUpFilterList[2].Down() else: self.PickUpFilterList[2].SetUp() #Neck if systemSetting.IsPickUpFilterNeck(): self.PickUpFilterList[3].Down() else: self.PickUpFilterList[3].SetUp() #Foots if systemSetting.IsPickUpFilterFoots(): self.PickUpFilterList[4].Down() else: self.PickUpFilterList[4].SetUp() #Shield if systemSetting.IsPickUpFilterShield(): self.PickUpFilterList[5].Down() else: self.PickUpFilterList[5].SetUp() #Book if systemSetting.IsPickUpFilterBook(): self.PickUpFilterList[6].Down() else: self.PickUpFilterList[6].SetUp() #Stone if systemSetting.IsPickUpFilterStone(): self.PickUpFilterList[7].Down() else: self.PickUpFilterList[7].SetUp() #Etc if systemSetting.IsPickUpFilterEtc(): self.PickUpFilterList[8].Down() else: self.PickUpFilterList[8].SetUp() To: def RefreshPickupFilter(self): checkFilterList = ( systemSetting.IsPickUpFilterWeapon(), systemSetting.IsPickUpFilterArmor(), systemSetting.IsPickUpFilterEar(), systemSetting.IsPickUpFilterNeck(), systemSetting.IsPickUpFilterFoots(), systemSetting.IsPickUpFilterShield(), systemSetting.IsPickUpFilterBook(), systemSetting.IsPickUpFilterStone(), systemSetting.IsPickUpFilterEtc() ) for child, flag in zip(self.PickUpFilterList, checkFilterList): if flag: child.Down() else: child.SetUp() self.PickUpFilterList.append(GetObject("Pick_Up_FilterWeapon")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterArmor")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEar")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterNeck")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterFoots")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterShield")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterBook")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterStone")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEtc")) To: for name in ('Weapon','Armor','Ear','Neck','Foots','Shield','Book','Stone','Etc'): self.PickUpFilterList.append(GetObject("Pick_Up_Filter{}".format(name))) self.PickUpFilterList[0].SetToggleUpEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[0].SetToggleDownEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[1].SetToggleUpEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[1].SetToggleDownEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[2].SetToggleUpEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[2].SetToggleDownEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[3].SetToggleUpEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[3].SetToggleDownEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[4].SetToggleUpEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[4].SetToggleDownEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[5].SetToggleUpEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[5].SetToggleDownEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[6].SetToggleUpEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[6].SetToggleDownEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[7].SetToggleUpEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[7].SetToggleDownEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[8].SetToggleUpEvent(self.__OnClickPickupFilterButtonEtc) # Etc self.PickUpFilterList[8].SetToggleDownEvent(self.__OnClickPickupFilterButtonEtc) # Etc To: eventFuncList = ( self.__OnClickPickupFilterButtonWeapon, self.__OnClickPickupFilterButtonArmor, self.__OnClickPickupFilterButtonEar, self.__OnClickPickupFilterButtonNeck, self.__OnClickPickupFilterButtonFoots, self.__OnClickPickupFilterButtonShield, self.__OnClickPickupFilterButtonBook, self.__OnClickPickupFilterButtonStone, self.__OnClickPickupFilterButtonEtc ) for child, event in zip(self.PickUpFilterList, eventFuncList): child.SetToggleUpEvent(event) child.SetToggleDownEvent(event)
    1 point
  19. M2 Download Center Download Here ( Internal ) Hello i create a new map for exp with flame theme. Please make a comment with your rate. Mega VirusTotal
    1 point
  20. Hello, The problem is the game that do not update immediately PART_WEAPON your character. To fix this problem, do like this: Open your char.cpp and search: WORD CHARACTER::GetOriginalPart(BYTE bPartPos) const In the switch case of this function we will return the id of the equipment contained in the PART_WEAPON with a condition to verify that the ID of the equipment is not equal to 0, that is where the problem just mainly. After any such box below: case PART_HAIR: return GetPart(PART_HAIR); // Or before case PART_ACCE: return GetPart(PART_ACCE); Add this before default: return 0; case PART_WEAPON: if (GetWear(WEAR_COSTUME_WEAPON) != 0) { return GetPart(PART_WEAPON); } return 0; Now you can compile it This tutorial has been fixed by @Roxas07.
    1 point
  21. M2 Download Center Download Here ( Internal ) I start to create maps so lets release my first map. I hope you like it!
    1 point
  22. M2 Download Center Download Here ( Internal ) Hello guys, today I wanna release my first map. The point of whole this is to get some feedback on how can I improve my future maps. Some screenshots from World Editor. Size : 3 x 3 Author : Siwy Creating Time : 'bout 2hours. External Links : -[1] Only map : [Hidden Content] -[2] Map with objects,textures, etc. [Hidden Content] -[3] Serverside [Hidden Content] I hope someone founds this useful ! Also I've added external links for download. Sorry for the inconvenience.
    1 point
  23. You can make use of the 'FindAffect' function which returns 'nullptr' (if the player doesn't have the affect) or a pointer to the affect. CAffect* FindAffect(DWORD dwType, BYTE bApply = APPLY_NONE) const; if (ch->FindAffect(AFFECT_COLLECT)) { // Checks if the player has the affect AFFECT_COLLECT. // code if the player has the AFFECT_COLLECT. } else { // code if the player doesn't have the affect. } You can also use it like this: if (ch->FindAffect(AFFECT_COLLECT, POINT_HT)) // Checks for AFFECT_COLLECT that gives POINT_HT(Vitality). P.S: I used 'AFFECT_COLLECT' as an example, you can get a list of the affects from affects.h
    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.