Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/22/18 in all areas

  1. M2 Download Center Download Here ( Internal ) Download here
    1 point
  2. M2 Download Center Download Here ( Internal ) Hello everyone, It is a nice day to release my modifications to sell items from dragon soul inventory too So let's go. Serverside: 1) Open input_main.cpp 2.1) Search(CTRL+F) this: case SHOP_SUBHEADER_CG_SELL2: 2.2) Replace that whole case with this: case SHOP_SUBHEADER_CG_SELL2: { if (uiBytes < sizeof(WORD) + sizeof(BYTE) + sizeof(BYTE)) return -1; const WORD wPos = *reinterpret_cast<const WORD*>(c_pData); const BYTE bCount = *(c_pData + sizeof(WORD)); const BYTE bType = *(c_pData + sizeof(WORD) + sizeof(BYTE)); sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName()); CShopManager::instance().Sell(ch, wPos, bCount, bType); return sizeof(WORD) + sizeof(BYTE) + sizeof(BYTE); } 3) Save and close it, now open shop_manager.h 3.1) And replace this: void Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount = 0); 3.2) With this: void Sell(LPCHARACTER ch, WORD wCell, BYTE bCount = 0, BYTE bType = 0); 4) Save it and close it. 4.1) Next step; open shop_manager.cpp and search this function: void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) 4.2) Replace the parameters/arguments only with this: LPCHARACTER ch, WORD wCell, BYTE bCount, BYTE bType 4.3) Search this line: LPITEM item = ch->GetInventoryItem(bCell); 4.4) And replace it with this: LPITEM item = ch->GetItem(TItemPos(bType, wCell)); 4.5-Choosable) I added a log function too into the antiflag_sell check against hackers 4.5.1) Replace this: if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_SELL)) return; 4.5.2) With this(as I said, this is choosable, not important change): if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_SELL)) { // In clientside the sell is blocked by python if a player arrive here he's a hacker, maybe. ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't sell this item.")); sys_err("[HACKER] Force sell-script used by name [%u]%s.", ch->GetPlayerID(), ch->GetName()); return; } 5) Save and close the file, now you are ready to build your game. Clientside-BIN: 1) Open PythonNetworkStream.h 1.1) Search this: bool SendShopSellPacketNew(BYTE bySlot, BYTE byCount); 1.2) Replace it with this: bool SendShopSellPacketNew(WORD wSlot, BYTE byCount, BYTE byType); 2) Save it, close it. Open PythonNetworkStreamPhaseGameItem.cpp 2.1) Search this function: bool CPythonNetworkStream::SendShopSellPacketNew(BYTE bySlot, BYTE byCount) 2.2) Replace the whole function with this: bool CPythonNetworkStream::SendShopSellPacketNew(WORD wSlot, BYTE byCount, BYTE byType) { if (!__CanActMainInstance()) return true; TPacketCGShop PacketShop; PacketShop.header = HEADER_CG_SHOP; PacketShop.subheader = SHOP_SUBHEADER_CG_SELL2; if (!Send(sizeof(TPacketCGShop), &PacketShop)) { Tracef("SendShopSellPacket Errorn"); return false; } if (!Send(sizeof(WORD), &wSlot)) { Tracef("SendShopAddSellPacket Errorn"); return false; } if (!Send(sizeof(BYTE), &byCount)) { Tracef("SendShopAddSellPacket Errorn"); return false; } if (!Send(sizeof(BYTE), &byType)) { Tracef("SendShopAddSellPacket Errorn"); return false; } Tracef(" SendShopSellPacketNew(wSlot=%d, byCount=%d, byType=%d)n", wSlot, byCount, byType); return SendSequence(); } 3) Save and close. Open PythonNetworkStreamModule.cpp 3.1) Search this function: PyObject* netSendShopSellPacketNew(PyObject* poSelf, PyObject* poArgs) 3.2) And replace it with this: PyObject* netSendShopSellPacketNew(PyObject* poSelf, PyObject* poArgs) { int iSlotNumber; if (!PyTuple_GetInteger(poArgs, 0, &iSlotNumber)) return Py_BuildException(); int iCount; if (!PyTuple_GetInteger(poArgs, 1, &iCount)) return Py_BuildException(); int iType; if (!PyTuple_GetInteger(poArgs, 2, &iType)) return Py_BuildException(); CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance(); rkNetStream.SendShopSellPacketNew(iSlotNumber, iCount, iType); return Py_BuildNone(); } 4) Save, close and build Clientside-Python: Here you have to do it by yourself. The new function of the m2net/net module are called by 3 files uiInventory.py uiDragonSoul.py uiShop.py You have to edit these files if your files are not containing these updates, but thanks to [sA]Con for the newer root package from his release ^^ Here you can download the "new" root package which is containing every changes for this and for wolfman. I do not recomment to replace or overwrite your files with those files! Use a comparer tool like Notepad++ Compare plugin to check the differences at "sell" keyword. Tested and works, but if you found bug/mistake/error please write into this thread a detailed post. So not like this: ps.: I hope you understand everything, and sorry for my poor english:3 ps2: In the official bin this message " SendShopSellPacketNew(bySlot=%d, byCount=%d, byType=%d)" can be found, but I renamed the variable too, hehe :-D. With Regards, P3NG3R
    1 point
  3. Hello metin2dev, I would like to show you my Ship Defense version Full dungeon gameplay Hydra debuff effect: Hydra Treasure Chest as a reward for finishing the dungeon - This is a party dungeon only. - 9 Dungeon waves. - 3 Boss fights aganist Hydra Heads. - 2 Minutes limit time to clear waves. - Boss fights does not have limit time - Every boss fight will weaken every player inside dungeon and players must kill her eggs. Otherwise the debuff won't dissapear! - Mast, is in the middle of the ship and recieve damage from Hydra itself and attackers. - Attackers spawn every wave! - When Mast loses entire life, all party members from dungeon gets kicked out and dungeon ends. - Dungeon starts at 9009 (Fisherman) and minimul requirement level is 90 for all party members! - At the end of dungeon a Hydra Treasure Chest will appear and players can recieve a random item that's set in quest. - At the end of dungeon a portal will appear that will teleport the player to the "New Continent". - In the new continent you have only 5 minutes to stay and after that u will be kicked out to first village. - The party leader (Captain) can claim that Continent and give him a name at the Statue npc located at the end of the map. - Leader can choose a name out of numbers and leters. Minimum 3 chars and max 14. - At the same npc called "Statue", players can have acces to Ranking. - In ranking will be listed top 7 Continents! - In the ranking list continents are shown based on fastest clear time of the DEFENSE WAVE DUNGEON! - Faster dungeon clear, better chances to be listed in Ranking. [ Aditional stuffs that makes it better than official dungeon ] - Hydra treasure chest is fully custom. - Hydra treasure chest has special specular effect and makes it look shiny. - Hydra treasure chest has special effect and animation. It bounces and a spirit Hydra head will constantly breath and dissapear. - Hydra's heads recieved better texture and a specular effect to make it look realistic. - New special visual effect upon Hydra debuff will be seen on players. A icon will also appear at the top left of the screen that indicates Hydra's debuff! - At the back of the ship those 3 Hydra heads will constantly attack the ship and trow ice and all the cool effects. - Hydra heads are corectly counted and after a Boss fight they will dissapear one by one until u beat the final Hydra head! - No horses and mounts allowed in source code. Inside the ship and Continent map u cannot use mounts or horses. - Several security fixes inside quest and sources to prevent bugs and even exploits have been made.
    1 point
  4. 1 point
  5. 1 point
  6. There is no error. It is the limit of experience that a character can have. Ymir set 100% maximum. So if the player uses a 50% experience ring and 100% liqueur experience in total has 150%, 50% more than normal. You can change that from the source or disable the syser line, but I'd better choose to increase to about 250% Open char.pp and search for case POINT_MALL_EXPBONUS and POINT_EXP_DOUBLE_BONUS and you can change like this: if (GetPoint(type) + amount > 250) { amount = 250 - GetPoint(type); }
    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.