Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/06/16 in all areas

  1. M2 Download Center Download Here ( Internal ) Hey, Here is my version of clean and stable client: * based on 2k10 client with updated maps/textures etc. working on 40k binary * client weight ~ 630MB (removed many unused files) * maps in separated in two folders: outdoor and indoor * many new features SUPPORTED LANGUAGES: EN, PL Preview: [Hidden Content] Changelog: Download: Client_1.12 - entire client: mirror #1 [Hidden Content] Update_1.2 - contains: binary source with extern and update: mirror #1 [Hidden Content] mirror #2 [Hidden Content] Update_1.4: mirror #1 [Hidden Content] Update_1.5 mirror #1 [Hidden Content] Update_1.5.1 mirros #1 [Hidden Content] ---------------------------------------------------------------------- Windows Server Files development machine with source mirror #1 [Hidden Content] Server source + Windows SF + Ymir documentations (translated into english)
    1 point
  2. 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
  3. M2 Download Center Download Here ( Internal ) I just taked a look at AsyncSQL.H dunno. The formatting certainly isn't. Also, abusing stdafx out-of-tree. Ugh. And OS-specific synch. Reserved identifiers. C-style structs. Mixing tabs and spaces. DWORD. Fucking m_sem not even used. Copying full async resultset into a container eagerly? Oh. And using mySql Storing SQLResult* in a vector, not honouring Rule Of Three. The fucking type not even polymorphic, so use vector, or stable_vector if you must. Not typedeffing the container or using auto for the iterators. Using strange names for iterators (past?). Nohting ever initializes m_pkSQL. So that's encapsulation disavowed then. What happened to smart pointers... uiResultsPos in the database layer?!?!##!@# Not using prepared statements and bound arguments. C-style error handling through multiple non-encapsulated field. Read: missing errorhandling. CAsyncSQL2 - naming fail. CAsyncSQL looks somewhat saner. Possibly because it was nicked from somewhere? :))) Nice explain , here you have an improved async sql. IMPROVED Soon other libs re
    1 point
  4. @BackPlayer I fixed the error. You can now use it. Best Regards Ken
    1 point
  5. i think there should be a client part to? For effect
    1 point
  6. Bug fix: bool CActorInstance::__IsLeftHandWeapon(DWORD type) { if (CItemData::WEAPON_DAGGER == type || (CItemData::WEAPON_FAN == type && __IsMountingHorse())) return true; else if (CItemData::WEAPON_BOW == type) return true; #ifdef ENABLE_COSTUME_WEAPON else if (CItemData::COSTUME_WEAPON_DAGGER == type || (CItemData::COSTUME_WEAPON_FAN == type && __IsMountingHorse())) return true; else if (CItemData::COSTUME_WEAPON_BOW == type) return true; #endif else return false; } bool CActorInstance::__IsRightHandWeapon(DWORD type) { if (CItemData::WEAPON_DAGGER == type || (CItemData::WEAPON_FAN == type && __IsMountingHorse())) return true; else if (CItemData::WEAPON_BOW == type) return false; #ifdef ENABLE_COSTUME_WEAPON else if (CItemData::COSTUME_WEAPON_DAGGER == type || (CItemData::COSTUME_WEAPON_FAN == type && __IsMountingHorse())) return true; else if (CItemData::COSTUME_WEAPON_BOW == type ) return false; #endif else return true; } bool CActorInstance::__IsWeaponTrace(DWORD weaponType) { switch(weaponType) { case CItemData::WEAPON_BELL: case CItemData::WEAPON_FAN: case CItemData::WEAPON_BOW: #ifdef ENABLE_COSTUME_WEAPON case CItemData::COSTUME_WEAPON_BELL: case CItemData::COSTUME_WEAPON_FAN: case CItemData::COSTUME_WEAPON_BOW: #endif return false; default: return true; } } Source: turkmmo from Beklir A. Costume Weapon.7z
    1 point
  7. You don't have pony_buy.quest and pony_levelup.quest?
    1 point
  8. 1, chance from 40k source. If you can boutique. 2, chance 34k client to 40k Change: Starter, root.eix/epk, locale_xy.eix/epk, uiscript.eix/epk and maybe lib folder for 40k files.
    1 point
  9. Lol, *Facepalm* By the way, I would choose HDD. Why? Because you are safe on storage and metin2 is written to be able to operate even on normal HDD too. SSD would only boost your SQL processing power, which would give you some advantage if you want to both run the server and make manual queries to the log - which is... Not that often used What you most need for a server is CPU power & RAM. And of course sometimes space for backups or logs.
    1 point
  10. Just dont host a metin2 server in a vps (seems thats a eterhost vps). You can get dedicated servers really cheap. If you dont want logs (or have them auto-deleting in like 1h intervals): 16gb ssd. But you need to make backups externally. Else, 64hdd.
    1 point
  11. Hi, yes you're right. I've made some changes in code, now this bug should be fixed, also it doesn't use m_list_iplist anymore: Regards
    1 point
  12. You won't be able to find it in a larger size. This image was only used on a website, clients had same picture but more "zoomed in". So this size was the only size the image was produced in.
    1 point
  13. 1 point
  14. Hi! Today i find this files on my hdd and i think for the Nostalgic of the oldstyle would be nice!! i wonna share with you... I hope it will be useful! All Files game and public databases with many diff and two programs diff patcher and diff reverser DOWNLOAD
    1 point
  15. 1. Open PuTTY and log in as User: root Password dev 2. Type cd /var/db 3 tar zxvf inscarnium_db.tar.gz After this follow the next steps => 1 Go to /etc/rc (FileZilla) 2 Edit rc.conf and add last line mysql_args="--skip-grant-tables --skip-networking" 3 /usr/local/etc/rc.d/mysql-server restart 4 mysql -u root mysql 5 UPDATE user SET Password=PASSWORD('New Password') WHERE USER='root'; 6 FLUSH PRIVILEGES; 7 exit; 8 Edit again rc. conf and delete the line mysql_args="--skip-grant-tables --skip-networking" 8 /usr/local/etc/rc.d/mysql-server restart 9 mysql_upgrade -p --force => the password you've set above 10 Login to MySQL with your password.
    1 point
×
×
  • 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.