M2BobFixed

Members
  • Content count

    275
  • Joined

  • Last visited

Everything posted by M2BobFixed

  1. Today i get this problem, when i enter in a party dungeon and someone of the party goes offline or warp in another map, the core crashed. I want give all my idea to fix that, i know that is not the best method to fix that but i think for someone can be useful. I tried to fix the problem with the tutorial on metin2dev with SetDungeon(NULL) in SetParty but without any results, the bug continue... This is my fix/idea: When someone goes offline all the members of the group will go to the own village and the core doesn't crash. Open party.cpp and replace your UpdateOfflineState function with this: void CParty::UpdateOfflineState(DWORD dwPID) { TPacketGCPartyAdd p; p.header = HEADER_GC_PARTY_ADD; p.pid = dwPID; memset(p.name, 0, CHARACTER_NAME_MAX_LEN+1); for (TMemberMap::iterator it = m_memberMap.begin(); it != m_memberMap.end(); ++it) { if (it->second.pCharacter && it->second.pCharacter->GetDesc()) { if (it->second.pCharacter->GetDungeon()) { LPDUNGEON dung=it->second.pCharacter->GetDungeon(); dung->ExitAllToStartPosition(); }else{ it->second.pCharacter->GetDesc()->Packet(&p, sizeof(p)); } } } }
  2. The koray shop is in free download and it's easy to find it on the web: http://www50.zippyshare.com/v/sJd3CEhV/file.html Here is the offline shop by koray, my advice is check your files with these files (Folder: ready made files) with WinMerge.
  3. In the koray offline shop (a good offline shop), there is a big problem, when you close the shop, items not sold disappear! I'm there to give you the fix for this problem: Open the shop.cpp and search the function CShop::Remove(), change your function with this: void CShop::Remove() { if (!HasOwner()) return; m_bIsLocked = true; TOfflineShopTable p; memset(&p, 0, sizeof(p)); p.dwAID = m_dwOwnerAID; p.dwPID = m_dwOwnerPID; LPCHARACTER ch=CHARACTER_MANAGER::instance().FindByPID(m_dwOwnerPID); p.dwX = m_pkPC->GetX(); p.dwY = m_pkPC->GetY(); p.dwMapIndex = m_pkPC->GetMapIndex(); p.dwChannel = g_bChannel; p.ullMoney = m_Money; p.dwSize = m_bSize; p.dwColor = m_bColor; strlcpy(p.szSign, m_pkPC->GetShopSign().c_str(), sizeof(p.szSign)); for (DWORD i = 0; i < m_itemVector.size() && i < SHOP_HOST_ITEM_MAX_NUM; ++i) { SHOP_ITEM& item = m_itemVector[i]; if (item.pkItem == NULL) continue; p.items2[i] = item.itemid; p.price[i] = item.price; LPITEM item2=item.pkItem; if (item.isSold != 1) { if (ch == NULL) { sys_err("[OfflineShop] Shop owner was offline, i'm sending the items into the mall...\n"); char query_pos[1025]; snprintf(query_pos, sizeof(query_pos), "SELECT pos FROM player.item%s WHERE window='MALL' AND owner_id=%d;", get_table_postfix(), m_dwOwnerAID); SQLMsg * pMsg = DBManager::instance().DirectQuery(query_pos); if (pMsg != NULL) { int pos=0; if (pMsg->Get()->uiNumRows > 0) { MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult); str_to_number(pos, row[0]); pos+=1; } int random_id=number(1,999999999)+m_dwOwnerPID+number(1,50); int socket1=(int)item2->GetSocket(0); int socket2=(int)item2->GetSocket(1); int socket3=(int)item2->GetSocket(2); int applytype0=(int)item2->GetAttributeType(0); int applyvalue0=(int)item2->GetAttributeValue(0); int applytype1=(int)item2->GetAttributeType(1); int applyvalue1=(int)item2->GetAttributeValue(1); int applytype2=(int)item2->GetAttributeType(2); int applyvalue2=(int)item2->GetAttributeValue(2); int applytype3=(int)item2->GetAttributeType(3); int applyvalue3=(int)item2->GetAttributeValue(3); int applytype4=(int)item2->GetAttributeType(4); int applyvalue4=(int)item2->GetAttributeValue(4); int applytype5=(int)item2->GetAttributeType(5); int applyvalue5=(int)item2->GetAttributeValue(5); int applytype6=(int)item2->GetAttributeType(6); int applyvalue6=(int)item2->GetAttributeValue(6); char query[1025]; sprintf( query, // TABLE POSTFIX RANDOM-ID - AID - WINDOW - POS - COUNT - VNUM - S1 - S2 - S3 - B1 B1 B2 B2 B3 B3 B4 B4 B5 B5 B6 B6 B7 B7 "INSERT INTO player.item%s VALUES ('%d', '%d', 'MALL', '%d', '%d', '%d', '%d', '%d', '%d', '0', '0', '0', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d');", get_table_postfix(), random_id, (int)m_dwOwnerAID, pos, (int)item.count, (int)item.vnum, socket1, socket2, socket3, applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, applytype3, applyvalue3, applytype4, applyvalue4, applytype5, applyvalue5, applytype6, applyvalue6 ); std::auto_ptr<SQLMsg> ripristina(DBManager::instance().DirectQuery(query)); if (ripristina->Get()->uiAffectedRows > 0) sys_err("[OfflineShop] Done, Now items of the ID: %d are in the mall!\nQUERY: %s\n", m_dwOwnerAID, query); }else{ sys_err("[OfflineShop] Error while trying to get position.\n"); } }else{ LPITEM item3 = ITEM_MANAGER::instance().CreateItem(item2->GetVnum(), 1, 0, false); ITEM_MANAGER::CopyAllAttrTo(item2, item3); int Slot=ch->GetEmptyInventory(item2->GetSize()); item3->AddToCharacter(ch, TItemPos(INVENTORY, Slot)); ITEM_MANAGER::instance().FlushDelayedSave(item3); item3->AttrLog(); } }else{ item.pkItem->SetSkipSave(true); M2_DESTROY_ITEM(item.pkItem); memset(&item, 0, sizeof(item)); } } db_clientdesc->DBPacket(HEADER_GD_OFFLINE_SHOP_REMOVE, 0, &p, sizeof(p)); }
  4. FIXED. WHEN PLAYER ARE OFFLINE, ITEMS GOING IN ITEM SHOP MALL!
  5. Exactly but a lot of server haven't got the SAFEBOX OFFLINE SHOP!
  6. HI GUYS I NEED HELP, I HAVE A BIG PROBLEM WITH THE KORAY OFFLINE SHOP, AFTER THE INSTALLATION THE OFFLINE SHOP WORKS WELL BUT THE "TYPE 0" (THE PRIVATE SHOP) NOT WORK! THE STANDARD SHOP WHEN I CLICK TO THE SHOP DOESN'T SHOW ME THE WINDOW OF ITEM! WHY? I CHECK A LOT OF TIMES THE FUNCTIONS IN THE SOURCE BUT WITHOUT ANY RESULTS. CAN U HELP ME? And if i try to "disconnect" or "change character" not work!
  7. Open char.cpp and find this function void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast) Search the case POINT_EXP and replace with this: case POINT_EXP: { quest::PC* Check = quest::CQuestManager::Instance().GetCurrentPC(); int flag=Check->GetFlag("exp_block"); if (flag == 0) { DWORD exp = GetExp(); DWORD next_exp = GetNextExp(); if (amount < 0 && exp < -amount) { sys_log(1, "%s AMOUNT < 0 %d, CUR EXP: %d", GetName(), -amount, exp); amount = -exp; SetExp(exp + amount); val = GetExp(); } else { if (gPlayerMaxLevel <= GetLevel()) return; if (test_server) ChatPacket(CHAT_TYPE_INFO, "You have gained %d exp.", amount); DWORD iExpBalance = 0; if (exp + amount >= next_exp) { iExpBalance = (exp + amount) - next_exp; amount = next_exp - exp; SetExp(0); exp = next_exp; } else { SetExp(exp + amount); exp = GetExp(); } DWORD q = DWORD(next_exp / 4.0f); int iLevStep = GetRealPoint(POINT_LEVEL_STEP); if (iLevStep >= 4) { sys_err("%s LEVEL_STEP bigger than 4! (%d)", GetName(), iLevStep); iLevStep = 4; } if (exp >= next_exp && iLevStep < 4) { for (int i = 0; i < 4 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q * 3 && iLevStep < 3) { for (int i = 0; i < 3 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q * 2 && iLevStep < 2) { for (int i = 0; i < 2 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q && iLevStep < 1) PointChange(POINT_LEVEL_STEP, 1); if (iExpBalance) { PointChange(POINT_EXP, iExpBalance); } val = GetExp(); } }else{ val = GetExp(); } } break; Now open Questlua_pc.cpp and add this in the namespace quest: int pc_block_exp(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (!lua_isnumber(L, 1)) { return 0; } int type=lua_tonumber(L,1); PC* Check = CQuestManager::Instance().GetCurrentPC(); Check->SetFlag("exp_block", type); if (type == 0) { ch->ChatPacket(CHAT_TYPE_INFO, "<ExpBlockSystem> [%d] You unlock your experience.", Check->GetFlag("exp_block")); }else{ ch->ChatPacket(CHAT_TYPE_INFO, "<ExpBlockSystem> [%d] You lock your experience.", Check->GetFlag("exp_block")); } return 0; } And this in the RegisterPCFunctionTable: { "block_exp", pc_block_exp }, Now compile your source, and try this quest: quest ExpBlockQuest begin state start begin when 72501.use begin say_title("Block EXP Ring:") say("") local s = select("Lock EXP", "Unlock EXP", "Reset EXP", "Close") if s == 1 then pc.block_exp(1) setskin(NOWINDOW) elseif s == 2 then pc.block_exp(0) setskin(NOWINDOW) elseif s == 3 then say_title("Block EXP Ring:") say("") say("Are you sure to reset[ENTER]your EXP points: "..pc.get_exp().."?") local s2=select("Yes", "No") if s2 == 1 then pc.block_exp(0) pc.give_exp2(-pc.get_exp()) syschat("<ExpBlockSystem> You reset your experience.") setskin(NOWINDOW) end end end end end
  8. Here: cmd_gm.cpp FUNCTIONS: #include <iostream> #include <vector> #include <string> void split(const std::string& s, char delim, std::vector<std::string>& v) { int i = 0; int pos = s.find(delim); while (pos != std::string::npos) { v.push_back(s.substr(i, pos-i)); i = ++pos; pos = s.find(delim, pos); if (pos == std::string::npos) v.push_back(s.substr(i, s.length())); } } int countChars(char* s, char c) { return *s == '\0' ? 0 : countChars( s + 1, c ) + (*s == c); } COMMAND: ACMD(do_create_item) { char item[256]; char bonus[1024]; two_arguments(argument, item, sizeof(item), bonus, sizeof(bonus)); if (!*item || !*bonus) { ch->ChatPacket(CHAT_TYPE_INFO, "Usage: /create_item <value_item> <b1:v1,b2:v2,b3:v3,b4:v4,b5:v5,b6:v6,b7:v7>"); ch->ChatPacket(CHAT_TYPE_INFO, ""); ch->ChatPacket(CHAT_TYPE_INFO, "[b] = Bonus vnum"); ch->ChatPacket(CHAT_TYPE_INFO, "[v] = Bonus value"); ch->ChatPacket(CHAT_TYPE_INFO, ""); ch->ChatPacket(CHAT_TYPE_INFO, "Created by RaFFa."); return; } if (bonus[(strlen(bonus)-1)] == ',') { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> [Err1] Syntax Error."); return; } if (bonus[(strlen(bonus)-1)] == ':') { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> [Err2] Syntax Error."); return; } if (strstr(bonus, ":") == NULL) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> [Err3] Syntax Error."); return; } if (strstr(bonus, ",") == NULL) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> Adding 1 bonus..."); int vnum=0; str_to_number(vnum, item); LPITEM i = ITEM_MANAGER::instance().CreateItem(vnum); if (!i) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> This item-vnum not exists."); return; } int bonus_vnum=0; int bonus_value=0; std::vector<std::string> bonus2; split(std::string(bonus), ':', bonus2); str_to_number(bonus_vnum, std::string(bonus2[0]).c_str()); str_to_number(bonus_value, std::string(bonus2[1]).c_str()); i->SetForceAttribute(0, bonus_vnum, bonus_value); i->SetSocket(0, 1); int inventario = ch->GetEmptyInventory(i->GetSize()); if (inventario != -1) { i->AddToCharacter(ch, TItemPos(INVENTORY, inventario)); ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> Item created successfully."); }else{ M2_DESTROY_ITEM(i); ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> You haven't enough space in inventory."); } }else{ std::vector<std::string> bonus1; split(std::string(bonus), ',', bonus1); if (bonus1.size()>0) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> Adding %d bonus...", (int)bonus1.size()); if (countChars(bonus, ':') != (int)bonus1.size()) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> [Err4] Syntax Error."); return; } int vnum=0; str_to_number(vnum, item); LPITEM i = ITEM_MANAGER::instance().CreateItem(vnum); if (!i) { ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> This item-vnum not exists."); return; } int b_size=bonus1.size(); if (bonus1.size()>6) b_size=7; int bonus_vnum=0; int bonus_value=0; for (int n=0; n<b_size; n++) { std::vector<std::string> bonus2; split(std::string(bonus1[n]), ':', bonus2); str_to_number(bonus_vnum, std::string(bonus2[0]).c_str()); str_to_number(bonus_value, std::string(bonus2[1]).c_str()); i->SetForceAttribute(n, bonus_vnum, bonus_value); } i->SetSocket(0, 1); int inventario = ch->GetEmptyInventory(i->GetSize()); if (inventario != -1) { i->AddToCharacter(ch, TItemPos(INVENTORY, inventario)); ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> Item created successfully!"); }else{ M2_DESTROY_ITEM(i); ch->ChatPacket(CHAT_TYPE_INFO, "<CreateItem> You haven't enough space in inventory."); } } } } cmd.cpp ACMD(do_create_item); and: (into the struct command_info cmd_info[]) {"create_item", do_create_item, 0, POS_DEAD, GM_IMPLEMENTOR},
  9. Searching videomaker service...
  10. edit
  11. Next days... Gamesecurity re open for sell only a M2BOB FIX Just wait guys..
  12. UP! Don't trust to tomboz98 He's a reseller!
  13. edit
  14. DOWNLOAD LINK OF FULL PROJECT: http://www86.zippyshare.com/v/gtUoIas4/file.html DLL MAIN CPP SOURCE (PASTEBIN): http://pastebin.com/rCY6Ma18 SCREENSHOT:
  15. Hi, guys this is the protected released in many forums by a Kid named ("FrankieN00b") this kid is Slait (The founder of m2bob) And he released an old protection with a small bug, and some problems. I decided to correct the bug and released it as a "EasyProtect". The method to install it is Stud_Pe (but is bypassable) for many players, for a good method to anti-bypass it on request, my skype is realotus. The method it cost likes 5/8 max 10€. This Is The Source Code. Uploaded in Mega.co.nz - At the beginning we see my simple method to block dll files (if are hacks): You can compile this simple script to generate the 3 params of the blacklist of dlls (that you want to block). // ConsoleApplication15.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <Windows.h> #include <iostream> typedef struct PE_Head { int Symbols; int Text; int Data; } *PEE; PE_Head Get_Header(const wchar_t *FileName){ PE_Head PE_Headers; PE_Headers.Symbols = 0; PE_Headers.Text = 0; PE_Headers.Data = 0; HANDLE file = CreateFileW(FileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (file) { HANDLE Map = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL); LPVOID base = MapViewOfFile(Map, FILE_MAP_READ, 0, 0, 0); PIMAGE_DOS_HEADER dos = (PIMAGE_DOS_HEADER)base; PIMAGE_NT_HEADERS nt = (PIMAGE_NT_HEADERS)((DWORD)(dos)+(dos->e_lfanew)); if (nt->Signature == IMAGE_NT_SIGNATURE) { PE_Headers.Symbols = nt->FileHeader.TimeDateStamp; PE_Headers.Text = nt->OptionalHeader.SizeOfCode; PE_Headers.Data = nt->OptionalHeader.SizeOfInitializedData; return PE_Headers; } } return PE_Headers; } int _tmain(int argc, _TCHAR* argv[]) { FILE *f; fopen_s(&f, "GetDllAddresses.Output.txt", "w"); fputs("", f); fclose(f); WIN32_FIND_DATA win32; HANDLE Find = FindFirstFile(L"*", &win32); printf("\n\n"); while (FindNextFile(Find, &win32) != 0) { if (!(win32.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { if (wcsstr(win32.cFileName, L".dll")) { PE_Head PEx = Get_Header(win32.cFileName); FILE *f; fopen_s(&f, "GetDllAddresses.Output.txt", "a"); fwprintf(f, L"//[%s]\n{%d, %d, %d},\n", win32.cFileName, PEx.Symbols, PEx.Text, PEx.Data); fclose(f); } } } std::cout << "GetDllAddresses Generator - Version 2.0. Bug fixed - #Made by Frankie Commando#.File GetDllAddresses.Output.txt generated successfully.\n\n\n"; system("pause"); return 0; } After compiling it, create a folder and put all dlls that you want to block and run the script compiled in .exe. Have fun! Frankie Commando. If you want a protect very good, that block all hacks & have got some m2bob fix & trick:https://metin2dev.org/board/index.php?/topic/7474-mssprotectdll-your-protection-against-hack-include-m2bob-fix/ In my gamesecurity service you can request patchers, encryption of pack, and many other!!!
  16. FUTURE SETUP (DJ)
     

    1 x Xone 92

    4 x XDJ 1000