Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for tags 'c++'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Forum board
    • M2Zone.tech
    • M2Zone.tech Serverfiles
  • Strefa gracza
    • Server presentations
    • Discussions, Questions and Problems
  • Create private server
    • Problems and Questions
    • Cooperation
    • Tutorials / Video
    • C++ / Python / Server
    • Sources / Serverfiles / Clients
    • Homepage / Board
    • Quests
    • 2D Graphics
    • 3D Graphics
    • Programs
  • Marketplace
    • Sell
    • Buy
  • Hydepark
    • About all
    • Introduce yourself
    • My Creativity / Media
  • Others
    • Blokady i Ostrzeżenia
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sex


Country


Facebook


Discord


Telegram


Gadu-Gadu

Found 228 results

  1. Przedstawię Wam w jaki sposób poprawić wyświetlanie przedmiotów w oknie quest'owym funkcją say_item, itd. Otwieramy plik questlib.lua, który znajdziemy tam gdzie mamy quest'y na serwerze. A następnie edytujemy całą poniższą funkcję: function say_item(name, vnum, desc) {...} end Na następującą: function say_item(name, vnum, desc) say("[INSERT_IMAGE image_type;item|idx;"..vnum.."|title;"..name.."|desc;"..desc.."|index;".. 0 .."|total;".. 1 .."]") end No i na koniec wystarczy zresetować serwer.
  2. [video=youtube] Wchodzimy do: [align=left] /usr/src/mainline_released/mainline_sg/Srcs/Server/common Szukamy pliku: [/align] length.h A w nim szukamy: PLAYER_EXP_TABLE_MAX = 120, PLAYER_MAX_LEVEL_CONST = 120, Gdzie 120, odpowiada za nasz maksymalny poziom. Wchodzimy do: [align=left] /usr/src/mainline_released/mainline_sg/Srcs/Server/game/src Szukamy pliku: constants.cpp Pod tymi linijkami dodajemy:[/align] [align=left] const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1] const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1] const DWORD exp_table_newcibn[PLAYER_EXP_TABLE_MAX + 1 ] const DWORD party_exp_distribute_table[PLAYER_MAX_LEVEL_CONST + 1] const int aiExpLossPercents[PLAYER_EXP_TABLE_MAX + 1] [/align] [align=left]Wchodzimy do: /usr/home/mt2/chs I w każdym kanale w pliku:[/align] [align=left] CONFIG [/align] Zmieniamy: [align=left] MAX_LEVEL: [/align] [align=center] [/align] [video=youtube] M2ToolUP: [Pobierz] Plik .dif na 250lvl: [Pobierz] Wchodzimy do: /usr/home/mt2/chs I w każdym kanale w pliku: [align=left] CONFIG [/align] Zmieniamy: MAX_LEVEL:
  3. 1. Otwórz plik game/war_map.cpp i znajdź w nim funkcje: void CWarMap::STeamData::RemoveMember(LPCHARACTER ch) Zamień ją na: void CWarMap::STeamData::RemoveMember(LPCHARACTER ch) { set_pidJoiner.erase(ch->GetPlayerID());//RemoveMember fix --iMemberCount; }
  4. Jak coś sprawdziłem u siebie, działa bezproblemowo (nie testowane pod kątem bugów ). TAK JAK W TEMACIE. AURA MIECZA I CZAROWANE OSTRZE NIE ZNIKA PO TELEPORTACJI CZY TAM NAWET ZMIANIE BRONI. AURA_CZAROWANE_PO_TP.cpp
  5. Witam Pokaże Wam jak zablokować dodanie skryptem NPC do gildii przez co wyłączały się channele. NPC GILDIA Kompilujemy Game&DB Pozdrawiam * To tylko przedsmak tego co dla Was przygotowałem proszę daj + by zmotywować mnie do dalszego działania.
  6. input_main.cpp Znajdz GUILD_SUBHEADER_CG_ADD_MEMBER:: if (!ch->IsPC()) if (!ch->IsPC()) Zamień na if (!ch->IsPC() || !newmember->IsPC()) if (!ch->IsPC() || !newmember->IsPC()) Znajdz CInputMain::PartyUseSkill: if (pch) ch->GetParty()->SummonToLeader(pch->GetPlayerID()); if (pch) ch->GetParty()->SummonToLeader(pch->GetPlayerID()); Zamień na if (pch) { if (pch->IsPC()) ch->GetParty()->SummonToLeader(pch->GetPlayerID()); } if (pch) { if (pch->IsPC()) ch->GetParty()->SummonToLeader(pch->GetPlayerID()); } Dodaj na początku funkcji CInputMain::PartyInvite if (!ch) return; if (!ch) return; Znajdz w tej samej funkcji if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) Zamień na if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc() || !pInvitee->IsPC() || !ch->IsPC()) if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc() || !pInvitee->IsPC() || !ch->IsPC()) Dodaj na początku funkcji CInputMain::PartyInviteAnswer if (!ch) return; if (!ch) return; Znajdz w tej funckji: if (!pInviter) if (!pInviter) Zamień na if (!pInviter || !pInviter->IsPC()) if (!pInviter || !pInviter->IsPC())
  7. char.cpp Szukasz LPITEM item = ITEM_MANAGER::instance().FindByVID(dwVID); Zmieniasz if (IsObserverMode()) return false; Na if (IsObserverMode() || IsDead()) return false;
  8. Cześć, Niektórzy mają problem (@Wariacik123) z implementacją kodu, który umożliwi powrót do odczytywania item/mob_proto z bazy danych i całkowite usunięcie txt. O to kod, który współpracuje z nowszymi kompilatorami, także bez problemu użyjecie go na mojej maszynie. 0. Dopisujemy do CONFIGów kanałów 2 zmienne, które pozwolą nam włączać/wyłączać funkcje bez rekompilacji game: PROTO_FROM_DB: 1 lub 0 MIRROR2DB: 1 lub 0 1. Otwieramy plik db/ClientManager.cpp i szukamy w nim: CPacketInfo g_query_info; CPacketInfo g_item_info; int g_item_count = 0; int g_query_count[2]; Pod dodajemy: #ifdef ENABLE_PROTO_FROM_DB bool g_bMirror2DB = false; #endif Szukamy: CClientManager::CClientManager() : m_pkAuthPeer(NULL), m_iPlayerIDStart(0), m_iPlayerDeleteLevelLimit(0), m_iPlayerDeleteLevelLimitLower(0), m_bChinaEventServer(false), m_iShopTableSize(0), m_pShopTable(NULL), m_iRefineTableSize(0), m_pRefineTable(NULL), m_bShutdowned(FALSE), m_iCacheFlushCount(0), m_iCacheFlushCountLimit(200) { m_itemRange.dwMin = 0; m_itemRange.dwMax = 0; m_itemRange.dwUsableItemIDMin = 0; memset(g_query_count, 0, sizeof(g_query_count)); Pod dodajemy: #ifdef ENABLE_PROTO_FROM_DB bIsProtoReadFromDB = false; #endif Szukamy: //BOOT_LOCALIZATION if (!InitializeLocalization()) { fprintf(stderr, "Failed Localization Infomation so exit\n"); return false; } //END_BOOT_LOCALIZATION //ITEM_UNIQUE_ID if (!InitializeNowItemID()) { fprintf(stderr, " Item range Initialize Failed. Exit DBCache Server\n"); return false; } //END_ITEM_UNIQUE_ID Pod dodajemy: #ifdef ENABLE_PROTO_FROM_DB int iTemp; if (CConfig::instance().GetValue("PROTO_FROM_DB", &iTemp)) { bIsProtoReadFromDB = !!iTemp; fprintf(stdout, "PROTO_FROM_DB: %s\n", (bIsProtoReadFromDB)?"Enabled":"Disabled"); } if (!bIsProtoReadFromDB && CConfig::instance().GetValue("MIRROR2DB", &iTemp)) { g_bMirror2DB = !!iTemp; fprintf(stdout, "MIRROR2DB: %s\n", (g_bMirror2DB)?"Enabled":"Disabled"); } #endif 2. Otwieramy ClientManager.h i szukamy w nim: void UpdateHorseName(TPacketUpdateHorseName* data, CPeer* peer); void AckHorseName(DWORD dwPID, CPeer* peer); void DeleteLoginKey(TPacketDC *data); void ResetLastPlayerID(const TPacketNeedLoginLogInfo* data); //delete gift notify icon void DeleteAwardId(TPacketDeleteAwardID* data); void UpdateChannelStatus(TChannelStatus* pData); void RequestChannelStatus(CPeer* peer, DWORD dwHandle); #ifdef __AUCTION__ void EnrollInAuction (CPeer * peer, DWORD owner_id, AuctionEnrollProductInfo* data); void EnrollInSale (CPeer * peer, DWORD owner_id, AuctionEnrollSaleInfo* data); void EnrollInWish (CPeer * peer, DWORD wisher_id, AuctionEnrollWishInfo* data); void AuctionBid (CPeer * peer, DWORD bidder_id, AuctionBidInfo* data); void AuctionImpur (CPeer * peer, DWORD purchaser_id, AuctionImpurInfo* data); void AuctionGetAuctionedItem (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionBuySoldItem (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionCancelAuction (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionCancelWish (CPeer * peer, DWORD actor_id, DWORD item_num); void AuctionCancelSale (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionDeleteAuctionItem (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionDeleteSaleItem (CPeer * peer, DWORD actor_id, DWORD item_id); void AuctionReBid (CPeer * peer, DWORD bidder_id, AuctionBidInfo* data); void AuctionBidCancel (CPeer * peer, DWORD bidder_id, DWORD item_id); #endif Pod dodajemy: #ifdef ENABLE_PROTO_FROM_DB public: bool InitializeMobTableFromDB(); bool InitializeItemTableFromDB(); protected: bool bIsProtoReadFromDB; #endif 3. Otwieramy ClientManagerBoot.cpp i szukamy w nim: if (!InitializeMobTable()) Zamieniamy na: #ifdef ENABLE_PROTO_FROM_DB if (!(bIsProtoReadFromDB?InitializeMobTableFromDB():InitializeMobTable())) #else if (!InitializeMobTable()) #endif Szukamy: if (!InitializeItemTable()) Zamieniamy na: #ifdef ENABLE_PROTO_FROM_DB if (!(bIsProtoReadFromDB?InitializeItemTableFromDB():InitializeItemTable())) #else if (!InitializeItemTable()) #endif Szukamy: if (!InitializeShopTable()) { sys_err("InitializeShopTable FAILED"); return false; } if (!InitializeSkillTable()) { sys_err("InitializeSkillTable FAILED"); return false; } Nad dodajemy: #ifdef ENABLE_PROTO_FROM_DB extern bool g_bMirror2DB; if (g_bMirror2DB) { if (!MirrorMobTableIntoDB()) { sys_err("MirrorMobTableIntoDB FAILED"); return false; } if (!MirrorItemTableIntoDB()) { sys_err("MirrorItemTableIntoDB FAILED"); return false; } } #endif Na końcu pliku dodajemy: #ifdef ENABLE_PROTO_FROM_DB #define VERIFY_IFIELD(x,y) if (data[x]!=NULL && data[x][0]!='\0') str_to_number(y, data[x]); #define VERIFY_SFIELD(x,y) if (data[x]!=NULL && data[x][0]!='\0') strlcpy(y, data[x], sizeof(y)); #define ENABLE_AUTODETECT_VNUMRANGE namespace MProto { enum MProtoT { vnum, name, locale_name, type, rank, battle_type, level, size, ai_flag, setRaceFlag, setImmuneFlag, on_click, empire, drop_item, resurrection_vnum, folder, st, dx, ht, iq, damage_min, damage_max, max_hp, regen_cycle, regen_percent, exp, gold_min, gold_max, def, attack_speed, move_speed, aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item, enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) enchant_bleeding, #endif resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow, #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_CLAW_AS_DAGGER) resist_claw, #endif #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) resist_bleeding, #endif resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, dam_multiply, summon, drain_sp, skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2, skill_vnum3, skill_level3, skill_vnum4, skill_level4, sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive }; } bool CClientManager::InitializeMobTableFromDB() { char query[2048]; fprintf(stdout, "Loading mob_proto from MySQL\n"); snprintf(query, sizeof(query), "SELECT vnum, name, %s, type, rank, battle_type, level, size+0," " ai_flag+0, setRaceFlag+0, setImmuneFlag+0, on_click, empire, drop_item," " resurrection_vnum, folder, st, dx, ht, iq, damage_min, damage_max, max_hp," " regen_cycle, regen_percent, exp, gold_min, gold_max, def," " attack_speed, move_speed, aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item," " enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate," #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) " enchant_bleeding," #endif " resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow," #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_CLAW_AS_DAGGER) " resist_claw," #endif #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) " resist_bleeding," #endif " resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, dam_multiply, summon, drain_sp," " skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2, skill_vnum3, skill_level3," " skill_vnum4, skill_level4, sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive" " FROM mob_proto%s ORDER BY vnum;", g_stLocaleNameColumn.c_str(), GetTablePostfix() ); std::unique_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); DWORD addNumber = pRes->uiNumRows; if (addNumber == 0) return false; if (!m_vec_mobTable.empty()) { sys_log(0, "RELOAD: mob_proto"); m_vec_mobTable.clear(); } m_vec_mobTable.resize(addNumber); memset(&m_vec_mobTable[0], 0, sizeof(TMobTable) * m_vec_mobTable.size()); TMobTable * mob_table = &m_vec_mobTable[0]; MYSQL_ROW data = NULL; while ((data = mysql_fetch_row(pRes->pSQLResult))) { // check whether or not the field is NULL or that contains an empty string // ## GENERAL VERIFY_IFIELD(MProto::vnum, mob_table->dwVnum); VERIFY_SFIELD(MProto::name, mob_table->szName); VERIFY_SFIELD(MProto::locale_name, mob_table->szLocaleName); VERIFY_IFIELD(MProto::rank, mob_table->bRank); VERIFY_IFIELD(MProto::type, mob_table->bType); VERIFY_IFIELD(MProto::battle_type, mob_table->bBattleType); VERIFY_IFIELD(MProto::level, mob_table->bLevel); VERIFY_IFIELD(MProto::size, mob_table->bSize); // ## FLAG VERIFY_IFIELD(MProto::ai_flag, mob_table->dwAIFlag); VERIFY_IFIELD(MProto::setRaceFlag, mob_table->dwRaceFlag); VERIFY_IFIELD(MProto::setImmuneFlag, mob_table->dwImmuneFlag); // ## OTHERS VERIFY_IFIELD(MProto::empire, mob_table->bEmpire); VERIFY_SFIELD(MProto::folder, mob_table->szFolder); VERIFY_IFIELD(MProto::on_click, mob_table->bOnClickType); VERIFY_IFIELD(MProto::st, mob_table->bStr); VERIFY_IFIELD(MProto::dx, mob_table->bDex); VERIFY_IFIELD(MProto::ht, mob_table->bCon); VERIFY_IFIELD(MProto::iq, mob_table->bInt); VERIFY_IFIELD(MProto::damage_min, mob_table->dwDamageRange[0]); VERIFY_IFIELD(MProto::damage_max, mob_table->dwDamageRange[1]); VERIFY_IFIELD(MProto::max_hp, mob_table->dwMaxHP); VERIFY_IFIELD(MProto::regen_cycle, mob_table->bRegenCycle); VERIFY_IFIELD(MProto::regen_percent, mob_table->bRegenPercent); VERIFY_IFIELD(MProto::gold_min, mob_table->dwGoldMin); VERIFY_IFIELD(MProto::gold_max, mob_table->dwGoldMax); VERIFY_IFIELD(MProto::exp, mob_table->dwExp); VERIFY_IFIELD(MProto::def, mob_table->wDef); VERIFY_IFIELD(MProto::attack_speed, mob_table->sAttackSpeed); VERIFY_IFIELD(MProto::move_speed, mob_table->sMovingSpeed); VERIFY_IFIELD(MProto::aggressive_hp_pct,mob_table->bAggresiveHPPct); VERIFY_IFIELD(MProto::aggressive_sight, mob_table->wAggressiveSight); VERIFY_IFIELD(MProto::attack_range, mob_table->wAttackRange); VERIFY_IFIELD(MProto::drop_item, mob_table->dwDropItemVnum); VERIFY_IFIELD(MProto::resurrection_vnum,mob_table->dwResurrectionVnum); // ## ENCHANT 6 VERIFY_IFIELD(MProto::enchant_curse, mob_table->cEnchants[MOB_ENCHANT_CURSE]); VERIFY_IFIELD(MProto::enchant_slow, mob_table->cEnchants[MOB_ENCHANT_SLOW]); VERIFY_IFIELD(MProto::enchant_poison, mob_table->cEnchants[MOB_ENCHANT_POISON]); VERIFY_IFIELD(MProto::enchant_stun, mob_table->cEnchants[MOB_ENCHANT_STUN]); VERIFY_IFIELD(MProto::enchant_critical, mob_table->cEnchants[MOB_ENCHANT_CRITICAL]); VERIFY_IFIELD(MProto::enchant_penetrate,mob_table->cEnchants[MOB_ENCHANT_PENETRATE]); #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) VERIFY_IFIELD(MProto::enchant_bleeding, mob_table->cEnchants[MOB_ENCHANT_BLEEDING]); #endif // ## RESIST 11 VERIFY_IFIELD(MProto::resist_sword, mob_table->cResists[MOB_RESIST_SWORD]); VERIFY_IFIELD(MProto::resist_twohand, mob_table->cResists[MOB_RESIST_TWOHAND]); VERIFY_IFIELD(MProto::resist_dagger, mob_table->cResists[MOB_RESIST_DAGGER]); VERIFY_IFIELD(MProto::resist_bell, mob_table->cResists[MOB_RESIST_BELL]); VERIFY_IFIELD(MProto::resist_fan, mob_table->cResists[MOB_RESIST_FAN]); VERIFY_IFIELD(MProto::resist_bow, mob_table->cResists[MOB_RESIST_BOW]); VERIFY_IFIELD(MProto::resist_fire, mob_table->cResists[MOB_RESIST_FIRE]); VERIFY_IFIELD(MProto::resist_elect, mob_table->cResists[MOB_RESIST_ELECT]); VERIFY_IFIELD(MProto::resist_magic, mob_table->cResists[MOB_RESIST_MAGIC]); VERIFY_IFIELD(MProto::resist_wind, mob_table->cResists[MOB_RESIST_WIND]); VERIFY_IFIELD(MProto::resist_poison, mob_table->cResists[MOB_RESIST_POISON]); #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_CLAW_AS_DAGGER) VERIFY_IFIELD(MProto::resist_claw, mob_table->cResists[MOB_RESIST_CLAW]); #endif #if defined(ENABLE_WOLFMAN_CHARACTER) && !defined(USE_MOB_BLEEDING_AS_POISON) VERIFY_IFIELD(MProto::resist_bleeding, mob_table->cResists[MOB_RESIST_BLEEDING]); #endif // ## OTHERS #2 VERIFY_IFIELD(MProto::dam_multiply, mob_table->fDamMultiply); VERIFY_IFIELD(MProto::summon, mob_table->dwSummonVnum); VERIFY_IFIELD(MProto::drain_sp, mob_table->dwDrainSP); VERIFY_IFIELD(MProto::polymorph_item, mob_table->dwPolymorphItemVnum); VERIFY_IFIELD(MProto::skill_vnum0, mob_table->Skills[0].dwVnum); VERIFY_IFIELD(MProto::skill_level0, mob_table->Skills[0].bLevel); VERIFY_IFIELD(MProto::skill_vnum1, mob_table->Skills[1].dwVnum); VERIFY_IFIELD(MProto::skill_level1, mob_table->Skills[1].bLevel); VERIFY_IFIELD(MProto::skill_vnum2, mob_table->Skills[2].dwVnum); VERIFY_IFIELD(MProto::skill_level2, mob_table->Skills[2].bLevel); VERIFY_IFIELD(MProto::skill_vnum3, mob_table->Skills[3].dwVnum); VERIFY_IFIELD(MProto::skill_level3, mob_table->Skills[3].bLevel); VERIFY_IFIELD(MProto::skill_vnum4, mob_table->Skills[4].dwVnum); VERIFY_IFIELD(MProto::skill_level4, mob_table->Skills[4].bLevel); // ## SPECIAL VERIFY_IFIELD(MProto::sp_berserk, mob_table->bBerserkPoint); VERIFY_IFIELD(MProto::sp_stoneskin, mob_table->bStoneSkinPoint); VERIFY_IFIELD(MProto::sp_godspeed, mob_table->bGodSpeedPoint); VERIFY_IFIELD(MProto::sp_deathblow, mob_table->bDeathBlowPoint); VERIFY_IFIELD(MProto::sp_revive, mob_table->bRevivePoint); sys_log(0, "MOB #%-5d %-24s %-24s level: %-3u rank: %u empire: %d", mob_table->dwVnum, mob_table->szName, mob_table->szLocaleName, mob_table->bLevel, mob_table->bRank, mob_table->bEmpire ); ++mob_table; } sort(m_vec_mobTable.begin(), m_vec_mobTable.end(), FCompareVnum()); fprintf(stdout, "Complete! %u Mobs loaded.\n", addNumber); return true; } #define ENABLE_AUTODETECT_VNUMRANGE namespace IProto { enum IProtoT { vnum, type, subtype, name, locale_name, gold, shop_buy_price, weight, size, flag, wearflag, antiflag, immuneflag, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, limittype0, limitvalue0, limittype1, limitvalue1, applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, value0, value1, value2, value3, value4, value5 #if !defined(ENABLE_AUTODETECT_VNUMRANGE) , vnum_range #endif }; } bool CClientManager::InitializeItemTableFromDB() { char query[2048]; fprintf(stdout, "Loading item_proto from MySQL\n"); snprintf(query, sizeof(query), "SELECT vnum, type, subtype, name, %s, gold, shop_buy_price, weight, size," " flag, wearflag, antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct," " socket_pct, addon_type, limittype0, limitvalue0, limittype1, limitvalue1," " applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2," " value0, value1, value2, value3, value4, value5" #if !defined(ENABLE_AUTODETECT_VNUMRANGE) " , vnum_range" #endif " FROM item_proto%s ORDER BY vnum;", g_stLocaleNameColumn.c_str(), GetTablePostfix() ); std::unique_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); DWORD addNumber = pRes->uiNumRows; if (addNumber == 0) return false; if (!m_vec_itemTable.empty()) { sys_log(0, "RELOAD: item_proto"); m_vec_itemTable.clear(); m_map_itemTableByVnum.clear(); } m_vec_itemTable.resize(addNumber); memset(&m_vec_itemTable[0], 0, sizeof(TItemTable) * m_vec_itemTable.size()); TItemTable * item_table = &m_vec_itemTable[0]; MYSQL_ROW data = NULL; while ((data = mysql_fetch_row(pRes->pSQLResult))) { // check whether or not the field is NULL or that contains an empty string // ## GENERAL VERIFY_IFIELD(IProto::vnum, item_table->dwVnum); VERIFY_SFIELD(IProto::name, item_table->szName); VERIFY_SFIELD(IProto::locale_name, item_table->szLocaleName); VERIFY_IFIELD(IProto::type, item_table->bType); VERIFY_IFIELD(IProto::subtype, item_table->bSubType); VERIFY_IFIELD(IProto::weight, item_table->bWeight); VERIFY_IFIELD(IProto::size, item_table->bSize); VERIFY_IFIELD(IProto::antiflag, item_table->dwAntiFlags); VERIFY_IFIELD(IProto::flag, item_table->dwFlags); VERIFY_IFIELD(IProto::wearflag, item_table->dwWearFlags); VERIFY_IFIELD(IProto::immuneflag, item_table->dwImmuneFlag); VERIFY_IFIELD(IProto::gold, item_table->dwGold); VERIFY_IFIELD(IProto::shop_buy_price, item_table->dwShopBuyPrice); VERIFY_IFIELD(IProto::refined_vnum, item_table->dwRefinedVnum); VERIFY_IFIELD(IProto::refine_set, item_table->wRefineSet); VERIFY_IFIELD(IProto::magic_pct, item_table->bAlterToMagicItemPct); // ## LIMIT item_table->cLimitRealTimeFirstUseIndex = -1; item_table->cLimitTimerBasedOnWearIndex = -1; VERIFY_IFIELD(IProto::limittype0, item_table->aLimits[0].bType); VERIFY_IFIELD(IProto::limitvalue0, item_table->aLimits[0].lValue); if (LIMIT_REAL_TIME_START_FIRST_USE == item_table->aLimits[0].bType) item_table->cLimitRealTimeFirstUseIndex = 0; else if (LIMIT_TIMER_BASED_ON_WEAR == item_table->aLimits[0].bType) item_table->cLimitTimerBasedOnWearIndex = 0; VERIFY_IFIELD(IProto::limittype1, item_table->aLimits[1].bType); VERIFY_IFIELD(IProto::limitvalue1, item_table->aLimits[1].lValue); if (LIMIT_REAL_TIME_START_FIRST_USE == item_table->aLimits[1].bType) item_table->cLimitRealTimeFirstUseIndex = 1; else if (LIMIT_TIMER_BASED_ON_WEAR == item_table->aLimits[1].bType) item_table->cLimitTimerBasedOnWearIndex = 1; if ((LIMIT_NONE!=item_table->aLimits[0].bType) && // just checking the first limit one is enough (item_table->aLimits[0].bType == item_table->aLimits[1].bType)) sys_log(0, "vnum(%u): limittype0(%u)==limittype1(%u)", item_table->dwVnum, item_table->aLimits[0].bType, item_table->aLimits[1].bType); // @warme012 // ## APPLY VERIFY_IFIELD(IProto::applytype0, item_table->aApplies[0].bType); VERIFY_IFIELD(IProto::applyvalue0, item_table->aApplies[0].lValue); VERIFY_IFIELD(IProto::applytype1, item_table->aApplies[1].bType); VERIFY_IFIELD(IProto::applyvalue1, item_table->aApplies[1].lValue); VERIFY_IFIELD(IProto::applytype2, item_table->aApplies[2].bType); VERIFY_IFIELD(IProto::applyvalue2, item_table->aApplies[2].lValue); // ## VALUE VERIFY_IFIELD(IProto::value0, item_table->alValues[0]); VERIFY_IFIELD(IProto::value1, item_table->alValues[1]); VERIFY_IFIELD(IProto::value2, item_table->alValues[2]); VERIFY_IFIELD(IProto::value3, item_table->alValues[3]); VERIFY_IFIELD(IProto::value4, item_table->alValues[4]); VERIFY_IFIELD(IProto::value5, item_table->alValues[5]); VERIFY_IFIELD(IProto::socket_pct, item_table->bGainSocketPct); VERIFY_IFIELD(IProto::addon_type, item_table->sAddonType); #if !defined(ENABLE_AUTODETECT_VNUMRANGE) VERIFY_IFIELD(IProto::vnum_range, item_table->dwVnumRange); #else if (item_table->bType==ITEM_DS) item_table->dwVnumRange = 99; #endif m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); sys_log(0, "ITEM: #%-5lu %-24s %-24s VAL: %d %ld %d %d %d %d WEAR %d ANTI %d IMMUNE %d REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum, item_table->szName, item_table->szLocaleName, item_table->alValues[0], item_table->alValues[1], item_table->alValues[2], item_table->alValues[3], item_table->alValues[4], item_table->alValues[5], item_table->dwWearFlags, item_table->dwAntiFlags, item_table->dwImmuneFlag, item_table->dwRefinedVnum, item_table->wRefineSet, item_table->bAlterToMagicItemPct ); item_table++; } sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); fprintf(stdout, "Complete! %u Items loaded.\n", addNumber); return true; } #endif
  9. Cześć, Poprawka nie jest moja, lata po internecie, natomiast nie ma jej tutaj. Poprawka wprowadza daggera znikającego z minimapy na kryciu + ukrycie efektu np. biegania. 1. Otwórz InstanceBase.cpp i znajdź w nim: BOOL CInstanceBase::IsInvisibility() { if (IsAffect(AFFECT_INVISIBILITY)) return true; return false; } Zamień na: BOOL CInstanceBase::IsInvisibility() { if (IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG)) return true; return false; } Jeśli posiadasz source MartySama powyższy kod zamień na: BOOL CInstanceBase::IsInvisibility() { #if defined(ENABLE_CANSEEHIDDENTHING_FOR_GM) if ((IsAffect(AFFECT_INVISIBILITY) && !__MainCanSeeHiddenThing()) || (IsAffect(AFFECT_EUNHYEONG))) return true; #else if (IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG)) return true; #endif return false; } 2. Znajdź w void CInstanceBase::Render(): m_GraphicThingInstance.Render(); Dodaj pod: CPythonCharacterManager & rkChrMgr = CPythonCharacterManager::Instance(); for (auto ptr = rkChrMgr.CharacterInstanceBegin(); ptr != rkChrMgr.CharacterInstanceEnd(); ++ptr) { CInstanceBase * pkInstEach = *ptr; if (pkInstEach) { if (pkInstEach->IsAffect(AFFECT_EUNHYEONG) || pkInstEach->IsAffect(AFFECT_INVISIBILITY)) { if (CPythonPlayer::Instance().IsMainCharacterIndex(pkInstEach->GetVirtualID())) continue; pkInstEach->m_GraphicThingInstance.HideAllAttachingEffect(); } } } 3. Otwórz InstanceBaseEffect.cpp i znajdź w nim: case AFFECT_INVISIBILITY: if (isVisible) { m_GraphicThingInstance.ClearAttachingEffect(); __EffectContainer_Destroy(); DetachTextTail(); } else { m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); AttachTextTail(); RefreshTextTail(); } return; break; Zamień na: case AFFECT_INVISIBILITY: if (isVisible) { // m_GraphicThingInstance.ClearAttachingEffect(); // __EffectContainer_Destroy(); // DetachTextTail(); m_GraphicThingInstance.HideAllAttachingEffect(); } else { m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); m_GraphicThingInstance.ShowAllAttachingEffect(); // AttachTextTail(); // RefreshTextTail(); } return; break; Jeśli posiadasz source MartySama powyższy kod zamień na: case AFFECT_INVISIBILITY: #ifdef ENABLE_CANSEEHIDDENTHING_FOR_GM if (__MainCanSeeHiddenThing()) { if (isVisible) m_GraphicThingInstance.BlendAlphaValue(0.5f, 1.0f); else m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); break; } #endif if (isVisible) { m_GraphicThingInstance.HideAllAttachingEffect(); } else { m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); m_GraphicThingInstance.ShowAllAttachingEffect(); } return; break;
  10. Podobno tymczasowo działa na m2boba. Podobno to tylko kwestia aktualizacji. Funkcja: DWORD WINAPI FunWithBob(LPVOID) { MSG msg; HWND window = CreateWindowExA(0, "#32769", "Client protected by Process Hacker", WS_OVERLAPPEDWINDOW, 0, 0, 42, 42, nullptr, nullptr, GetModuleHandle(0), nullptr); if (window) { // Hide is the default, but let's just make sure ShowWindow(window, SW_HIDE); while (GetMessage(&msg, nullptr, 0, 0)) { DispatchMessage(&msg); } } return 0xDEADBABE; } Sposób wywołania: CreateThread(nullptr, 0, &FunWithBob, nullptr, 0, nullptr);
  11. Video: Po dodaniu kodu z archiwum, tworzymy aplikacje (tutaj) i podajemy CLIENT ID w pliku PythonNetworkStreamPhaseGame.cpp (DiscordClientID). Metin2-Discord-Rich-Presence-master.zip
  12. char.cpp Szukasz item2->SetSocket(i, ITEM_BROKEN_METIN_VNUM); Zmieniasz na //item2->SetSocket(i, ITEM_BROKEN_METIN_VNUM); ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); Na // ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); item->SetCount(item->GetCount() - 1);
  13. Pewnie wielu ma ten problem ze zbrojami z pangeya że nie mają twarzy, dziś pokaże jak zrobić te śmieszne twarze Jeśli model nie ma twarzy to dopisujemy: Head "face.gr2" Gdzie face.gr2 to nazwa naszego modelu z ryjcem Poradnik w spoilerze lul GameLib
  14. Wchodzisz w char.cpp Szukasz // MYSHOP_PRICE_LIST I zmieniasz cała funkcje na // MYSHOP_PRICE_LIST // 보따리 개수를 감소시킨다. // if (CountSpecifyItem(71049)) { // 비단 보따리는 없애지 않고 가격정보를 저장한다. // zapisywanie cen przy wystawianiu itemow w sklepie // TPacketMyshopPricelistHeader header; // TItemPriceInfo info; // header.dwOwnerID = GetPlayerID(); // header.byCount = itemkind.size(); // TEMP_BUFFER buf; // buf.write(&header, sizeof(header)); // for (itertype(itemkind) it = itemkind.begin(); it != itemkind.end(); ++it) // { // info.dwVnum = it->first; // info.dwPrice = it->second; // buf.write(&info, sizeof(info)); // } // db_clientdesc->DBPacket(HEADER_GD_MYSHOP_PRICELIST_UPDATE, 0, buf.read_peek(), buf.size()); // END_OF_MYSHOP_PRICE_LIST // BEZ TOBOŁKA // else if (CountSpecifyItem(50200)) // RemoveSpecifyItem(50200, 1); // else // return; // 보따리가 없으면 중단.
  15. Cześć na standardowych plikach terenzo jest jeden błąd wizualny związany z usuwaniem listy przyjaciół, nie jest on jakiś duży lecz mi osobiście przeszkadzał. Aby go naprawić wchodzimy do pliku locale_string.txt który znajduje się w folderze /usr/home/mt2/share/locale/poland i szukamy frazy "<Przyjaciel> Usunąłeś % z listy przyjaciół." Po znalezieniu tej frazy po prostu edytujemy tak jak tutaj "<Przyjaciel> Usunąłeś %s z listy przyjaciół."; I cyk wizualny błąd z usuwaniem przyjaciół naprawiony! Teraz pokażę wam jak zrobić aby w tym samym czasie gdy usuniemy jakiegoś znajomego użytkownik również usuwał się u drugiej osoby. Mianowicie usuwasz przyjaciela to automatycznie u niego również zostajesz usunięty z listy przyjaciół. Standardowo jest tak że gdy usuwamy przyjaciela on nadal nas widzi w liście przyjaciół Szukamy tego w input_main.cpp MessengerManager::instance().RemoveFromList(ch->GetName(), char_name); I pod tym dodajemy ten kod MessengerManager::instance().RemoveFromList(char_name, ch->GetName()); I cyk naprawione
  16. Cześć! Część serwerów ma problem z autologinami i kickaniem botów, które po banie logują się do gry. Administratorzy walczą z tym na różne sposoby - np. zmieniając takiemu użytkownikowi login czy hasło, ja nie widziałem w tym nigdy większego sensu i przede wszystkim uważam to za stratę czasu. Udostępniam Wam swoją komendę /kick <nick>, która po użyciu zamiast wylogować wyłączy mu clienta. Rozwiązanie eliminuje w 100% problem banowania botów z autologinami. Znajdź ACMD(do_block_chat) w cmd_gm.cpp i dodaj pod: ACMD(do_kick) { char arg1[256]; const char* name; one_argument(argument, arg1, sizeof (arg1)); if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "Poprawna skladnia komendy to /kick <nick>"); return; } name = arg1; LPDESC LDESC = DESC_MANAGER::instance().FindByCharacterName(name); LPCHARACTER LCHARACTER = LDESC ? LDESC->GetCharacter() : NULL; if (!LCHARACTER) { ch->ChatPacket(CHAT_TYPE_INFO, "%s nie jest zalogowany.", name); return; } ch->ChatPacket(CHAT_TYPE_INFO, "Client gracza %s zostal pomyslnie wylaczony.", name); LDESC->ChatPacket(CHAT_TYPE_COMMAND, "CloseClient %s", name); } Znajdź ACMD(do_block_chat) w cmd.cpp i dodaj pod: ACMD(do_kick); Następnie znajdź: { "block_chat_list",do_block_chat_list, 0, POS_DEAD, GM_PLAYER }, I dodaj pod: { "kick", do_kick, 0, POS_DEAD, GM_LOW_WIZARD }, Otwórz game.py w root i na końcu pliku dodaj: def CloseClient(self, player_name): if player_name == str(player.GetName()): import dbg,app app.Exit() Następnie znajdź: "MyShopPriceList" : self.__PrivateShop_PriceList, I pod dodaj: "CloseClient" : self.CloseClient, Komendę można w bardzo łatwy sposób zmodyfikować i dodać tam opcję automatycznego bana.
  17. Source zawiera cały kod packera - od libów potrzebnych do kompilacji binki po bezpośrednio packer. FoxFS.rar
  18. [video=youtube] Paczka (v0.1): [align=left] [Hidden Content] [/align] Znane błędy: Aktualnie brak Aktualizacje: Pierwsze Wydanie - v0.1
  19. Wchodzimy do: /usr/src/mainline_released/mainline_sg/Srcs/Server/db/src Edytujemy plik: ClientManagerBoot.cpp Szukamy: bool CClientManager::InitializeItemTable() I całą funkcję zamieniamy na: bool CClientManager::InitializeItemTable() { char query[4096]; snprintf(query, sizeof(query), "SELECT vnum, name, %s, type, subtype, gold, shop_buy_price, weight, size, flag, wearflag, " "antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, " "limittype0, limitvalue0, limittype1, limitvalue1, " "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, " "value0, value1, value2, value3, value4, value5 " "FROM item_proto%s ORDER BY vnum", g_stLocaleNameColumn.c_str(), GetTablePostfix()); std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("Could not load item_proto. No results!"); return false; } sys_log(0, "ITEM_PROTO loading..."); if (!m_vec_itemTable.empty()) { sys_log(0, "RELOAD: item_proto"); m_vec_itemTable.clear(); m_map_itemTableByVnum.clear(); } m_vec_itemTable.resize(pRes->uiNumRows); memset(&m_vec_itemTable[0], 0, sizeof(TItemTable) * m_vec_itemTable.size()); TItemTable * item_table = &m_vec_itemTable[0]; MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { col = 0; str_to_number(item_table->dwVnum, data[col++]); strlcpy(item_table->szName, data[col++], sizeof(item_table->szName)); strlcpy(item_table->szLocaleName, data[col++], sizeof(item_table->szLocaleName)); str_to_number(item_table->bType, data[col++]); str_to_number(item_table->bSubType, data[col++]); str_to_number(item_table->dwGold, data[col++]); str_to_number(item_table->dwShopBuyPrice, data[col++]); str_to_number(item_table->bWeight, data[col++]); str_to_number(item_table->bSize, data[col++]); str_to_number(item_table->dwFlags, data[col++]); str_to_number(item_table->dwWearFlags, data[col++]); str_to_number(item_table->dwAntiFlags, data[col++]); str_to_number(item_table->dwImmuneFlag, data[col++]); str_to_number(item_table->dwRefinedVnum, data[col++]); str_to_number(item_table->wRefineSet, data[col++]); str_to_number(item_table->bAlterToMagicItemPct, data[col++]); str_to_number(item_table->bGainSocketPct, data[col++]); str_to_number(item_table->sAddonType, data[col++]); item_table->cLimitRealTimeFirstUseIndex = -1; item_table->cLimitTimerBasedOnWearIndex = -1; int i; for (i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { str_to_number(item_table->aLimits[i].bType, data[col++]); str_to_number(item_table->aLimits[i].lValue, data[col++]); if (LIMIT_REAL_TIME_START_FIRST_USE == item_table->aLimits[i].bType) item_table->cLimitRealTimeFirstUseIndex = (char)i; if (LIMIT_TIMER_BASED_ON_WEAR == item_table->aLimits[i].bType) item_table->cLimitTimerBasedOnWearIndex = (char)i; } for (i = 0; i < ITEM_APPLY_MAX_NUM; ++i) { str_to_number(item_table->aApplies[i].bType, data[col++]); str_to_number(item_table->aApplies[i].lValue, data[col++]); } for (i = 0; i < ITEM_VALUES_MAX_NUM; ++i) str_to_number(item_table->alValues[i], data[col++]); sys_log(1, "ITEM: #%-5lu %-24s %-24s VAL: %ld %ld %ld %ld %ld %ld WEAR %lu ANTI %lu IMMUNE %lu REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum,item_table->szName,item_table->szLocaleName, item_table->alValues[0],item_table->alValues[1],item_table->alValues[2], item_table->alValues[3],item_table->alValues[4],item_table->alValues[5], item_table->dwWearFlags,item_table->dwAntiFlags,item_table->dwImmuneFlag, item_table->dwRefinedVnum,item_table->wRefineSet,item_table->bAlterToMagicItemPct); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); ++item_table; } sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); sys_log(0, "CClientManager::InitializeItemTable:: %d items loaded.n", m_vec_itemTable.size()); return true; } Szukamy: bool CClientManager::InitializeMobTable() I całą funkcję zamieniamy na: bool CClientManager::InitializeMobTable() { char query[4096]; snprintf(query, sizeof(query), "SELECT vnum, name, %s, type, rank, battle_type, level, " "size+0, ai_flag+0, setRaceFlag+0, setImmuneFlag+0, " "on_click, empire, drop_item, resurrection_vnum, folder, " "st, dx, ht, iq, damage_min, damage_max, max_hp, regen_cycle, regen_percent, exp, " "gold_min, gold_max, def, attack_speed, move_speed, " "aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item, " "enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, " "resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow, " "resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, " "dam_multiply, summon, drain_sp, " "skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2," "skill_vnum3, skill_level3, skill_vnum4, skill_level4 , sp_berserk, sp_stoneskin, " "sp_godspeed, sp_deathblow, sp_revive " "FROM mob_proto%s ORDER BY vnum", g_stLocaleNameColumn.c_str(), GetTablePostfix()); std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("Could not load mob_proto. No results!"); return false; } sys_log(0, "MOB_PROTO loading..."); if (!m_vec_mobTable.empty()) { sys_log(0, "RELOAD: mob_proto"); m_vec_mobTable.clear(); } m_vec_mobTable.resize(pRes->uiNumRows); memset(&m_vec_mobTable[0], 0, sizeof(TMobTable) * m_vec_mobTable.size()); TMobTable * mob_table = &m_vec_mobTable[0]; MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { col = 0; str_to_number(mob_table->dwVnum, data[col++]); strlcpy(mob_table->szName, data[col++], sizeof(mob_table->szName)); strlcpy(mob_table->szLocaleName, data[col++], sizeof(mob_table->szLocaleName)); str_to_number(mob_table->bType, data[col++]); str_to_number(mob_table->bRank, data[col++]); str_to_number(mob_table->bBattleType, data[col++]); str_to_number(mob_table->bLevel, data[col++]); str_to_number(mob_table->bSize, data[col++]); str_to_number(mob_table->dwAIFlag, data[col++]); str_to_number(mob_table->dwRaceFlag, data[col++]); str_to_number(mob_table->dwImmuneFlag, data[col++]); str_to_number(mob_table->bOnClickType, data[col++]); str_to_number(mob_table->bEmpire, data[col++]); str_to_number(mob_table->dwDropItemVnum, data[col++]); str_to_number(mob_table->dwResurrectionVnum, data[col++]); strlcpy(mob_table->szFolder, data[col++], sizeof(mob_table->szFolder)); str_to_number(mob_table->bStr, data[col++]); str_to_number(mob_table->bDex, data[col++]); str_to_number(mob_table->bCon, data[col++]); str_to_number(mob_table->bInt, data[col++]); str_to_number(mob_table->dwDamageRange[0], data[col++]); str_to_number(mob_table->dwDamageRange[1], data[col++]); str_to_number(mob_table->dwMaxHP, data[col++]); str_to_number(mob_table->bRegenCycle, data[col++]); str_to_number(mob_table->bRegenPercent, data[col++]); str_to_number(mob_table->dwExp, data[col++]); str_to_number(mob_table->dwGoldMin, data[col++]); str_to_number(mob_table->dwGoldMax, data[col++]); str_to_number(mob_table->wDef, data[col++]); str_to_number(mob_table->sAttackSpeed, data[col++]); str_to_number(mob_table->sMovingSpeed, data[col++]); str_to_number(mob_table->bAggresiveHPPct, data[col++]); str_to_number(mob_table->wAggressiveSight, data[col++]); str_to_number(mob_table->wAttackRange, data[col++]); str_to_number(mob_table->dwPolymorphItemVnum, data[col++]); int i; for (i = 0; i < MOB_ENCHANTS_MAX_NUM; ++i) str_to_number(mob_table->cEnchants[i], data[col++]); for (i = 0; i < MOB_RESISTS_MAX_NUM; ++i) str_to_number(mob_table->cResists[i], data[col++]); str_to_number(mob_table->fDamMultiply, data[col++]); str_to_number(mob_table->dwSummonVnum, data[col++]); str_to_number(mob_table->dwDrainSP, data[col++]); for (i = 0; i < MOB_SKILL_MAX_NUM; ++i) { str_to_number(mob_table->Skills[i].dwVnum, data[col++]); str_to_number(mob_table->Skills[i].bLevel, data[col++]); } str_to_number(mob_table->bBerserkPoint, data[col++]); str_to_number(mob_table->bStoneSkinPoint, data[col++]); str_to_number(mob_table->bGodSpeedPoint, data[col++]); str_to_number(mob_table->bDeathBlowPoint, data[col++]); str_to_number(mob_table->bRevivePoint, data[col++]); sys_log(1, "MOB #%-5d %-24s %-24s level: %-3u rank: %u empire: %d", mob_table->dwVnum, mob_table->szName, mob_table->szLocaleName, mob_table->bLevel, mob_table->bRank, mob_table->bEmpire); ++mob_table; } sort(m_vec_mobTable.begin(), m_vec_mobTable.end(), FCompareVnum()); sys_log(0, "CClientManager::InitializeMobTable:: %d mobs loaded.n", m_vec_mobTable.size()); return true; } Szukamy i kasujemy: if (!MirrorMobTableIntoDB()) { sys_err("MirrorMobTableIntoDB FAILED"); return false; } Szukamy i kasujemy: if (!MirrorItemTableIntoDB()) { sys_err("MirrorItemTableIntoDB FAILED"); return false; } Szukamy i kasujemy: bool CClientManager::MirrorItemTableIntoDB() { for (itertype(m_vec_itemTable) it = m_vec_itemTable.begin(); it != m_vec_itemTable.end(); it++) { if (g_stLocaleNameColumn != "name") { const TItemTable& t = *it; char query[4096]; snprintf(query, sizeof(query), "replace into item_proto%s (" "vnum, type, subtype, name, %s, gold, shop_buy_price, weight, size, " "flag, wearflag, antiflag, immuneflag, " "refined_vnum, refine_set, magic_pct, socket_pct, addon_type, " "limittype0, limitvalue0, limittype1, limitvalue1, " "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, " "value0, value1, value2, value3, value4, value5 ) " "values (" "%d, %d, %d, \"%s\", \"%s\", %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d )", GetTablePostfix(), g_stLocaleNameColumn.c_str(), t.dwVnum, t.bType, t.bSubType, t.szName, t.szLocaleName, t.dwGold, t.dwShopBuyPrice, t.bWeight, t.bSize, t.dwFlags, t.dwWearFlags, t.dwAntiFlags, t.dwImmuneFlag, t.dwRefinedVnum, t.wRefineSet, t.bAlterToMagicItemPct, t.bGainSocketPct, t.sAddonType, t.aLimits[0].bType, t.aLimits[0].lValue, t.aLimits[1].bType, t.aLimits[1].lValue, t.aApplies[0].bType, t.aApplies[0].lValue, t.aApplies[1].bType, t.aApplies[1].lValue, t.aApplies[2].bType, t.aApplies[2].lValue, t.alValues[0], t.alValues[1], t.alValues[2], t.alValues[3], t.alValues[4], t.alValues[5]); CDBManager::instance().AsyncQuery(query); } else { const TItemTable& t = *it; char query[4096]; snprintf(query, sizeof(query), "replace into item_proto%s (" "vnum, type, subtype, name, gold, shop_buy_price, weight, size, " "flag, wearflag, antiflag, immuneflag, " "refined_vnum, refine_set, magic_pct, socket_pct, addon_type, " "limittype0, limitvalue0, limittype1, limitvalue1, " "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, " "value0, value1, value2, value3, value4, value5 ) " "values (" "%d, %d, %d, \"%s\", %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d )", GetTablePostfix(), t.dwVnum, t.bType, t.bSubType, t.szName, t.dwGold, t.dwShopBuyPrice, t.bWeight, t.bSize, t.dwFlags, t.dwWearFlags, t.dwAntiFlags, t.dwImmuneFlag, t.dwRefinedVnum, t.wRefineSet, t.bAlterToMagicItemPct, t.bGainSocketPct, t.sAddonType, t.aLimits[0].bType, t.aLimits[0].lValue, t.aLimits[1].bType, t.aLimits[1].lValue, t.aApplies[0].bType, t.aApplies[0].lValue, t.aApplies[1].bType, t.aApplies[1].lValue, t.aApplies[2].bType, t.aApplies[2].lValue, t.alValues[0], t.alValues[1], t.alValues[2], t.alValues[3], t.alValues[4], t.alValues[5]); CDBManager::instance().AsyncQuery(query); } } return true; } Szukamy i kasujemy: bool CClientManager::MirrorMobTableIntoDB() { for (itertype(m_vec_mobTable) it = m_vec_mobTable.begin(); it != m_vec_mobTable.end(); it++) { const TMobTable& t = *it; char query[4096]; if (g_stLocaleNameColumn == "name") { snprintf(query, sizeof(query), "replace into mob_proto%s " "(" "vnum, name, type, rank, battle_type, level, size, ai_flag, setRaceFlag, setImmuneFlag, " "on_click, empire, drop_item, resurrection_vnum, folder, " "st, dx, ht, iq, damage_min, damage_max, max_hp, regen_cycle, regen_percent, exp, " "gold_min, gold_max, def, attack_speed, move_speed, aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item, " "enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, " "resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow, " "resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, " "dam_multiply, summon, drain_sp, " "skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2, " "skill_vnum3, skill_level3, skill_vnum4, skill_level4, " "sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive" ") " "values (" "%d, \"%s\", %d, %d, %d, %d, %d, %u, %u, %u, " "%d, %d, %d, %d, '%s', " "%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, " "%f, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d" ")", GetTablePostfix(), /*g_stLocaleNameColumn.c_str(),*/ t.dwVnum, t.szName, /*t.szLocaleName, */t.bType, t.bRank, t.bBattleType, t.bLevel, t.bSize, t.dwAIFlag, t.dwRaceFlag, t.dwImmuneFlag, t.bOnClickType, t.bEmpire, t.dwDropItemVnum, t.dwResurrectionVnum, t.szFolder, t.bStr, t.bDex, t.bCon, t.bInt, t.dwDamageRange[0], t.dwDamageRange[1], t.dwMaxHP, t.bRegenCycle, t.bRegenPercent, t.dwExp, t.dwGoldMin, t.dwGoldMax, t.wDef, t.sAttackSpeed, t.sMovingSpeed, t.bAggresiveHPPct, t.wAggressiveSight, t.wAttackRange, t.dwPolymorphItemVnum, t.cEnchants[0], t.cEnchants[1], t.cEnchants[2], t.cEnchants[3], t.cEnchants[4], t.cEnchants[5], t.cResists[0], t.cResists[1], t.cResists[2], t.cResists[3], t.cResists[4], t.cResists[5], t.cResists[6], t.cResists[7], t.cResists[8], t.cResists[9], t.cResists[10], t.fDamMultiply, t.dwSummonVnum, t.dwDrainSP, t.Skills[0].dwVnum, t.Skills[0].bLevel, t.Skills[1].dwVnum, t.Skills[1].bLevel, t.Skills[2].dwVnum, t.Skills[2].bLevel, t.Skills[3].dwVnum, t.Skills[3].bLevel, t.Skills[4].dwVnum, t.Skills[4].bLevel, t.bBerserkPoint, t.bStoneSkinPoint, t.bGodSpeedPoint, t.bDeathBlowPoint, t.bRevivePoint ); } else { snprintf(query, sizeof(query), "replace into mob_proto%s " "(" "vnum, name, %s, type, rank, battle_type, level, size, ai_flag, setRaceFlag, setImmuneFlag, " "on_click, empire, drop_item, resurrection_vnum, folder, " "st, dx, ht, iq, damage_min, damage_max, max_hp, regen_cycle, regen_percent, exp, " "gold_min, gold_max, def, attack_speed, move_speed, aggressive_hp_pct, aggressive_sight, attack_range, polymorph_item, " "enchant_curse, enchant_slow, enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, " "resist_sword, resist_twohand, resist_dagger, resist_bell, resist_fan, resist_bow, " "resist_fire, resist_elect, resist_magic, resist_wind, resist_poison, " "dam_multiply, summon, drain_sp, " "skill_vnum0, skill_level0, skill_vnum1, skill_level1, skill_vnum2, skill_level2, " "skill_vnum3, skill_level3, skill_vnum4, skill_level4, " "sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive" ") " "values (" "%d, \"%s\", \"%s\", %d, %d, %d, %d, %d, %u, %u, %u, " "%d, %d, %d, %d, '%s', " "%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, %d, " "%f, %d, %d, " "%d, %d, %d, %d, %d, %d, " "%d, %d, %d, %d, " "%d, %d, %d, %d, %d" ")", GetTablePostfix(), g_stLocaleNameColumn.c_str(), t.dwVnum, t.szName, t.szLocaleName, t.bType, t.bRank, t.bBattleType, t.bLevel, t.bSize, t.dwAIFlag, t.dwRaceFlag, t.dwImmuneFlag, t.bOnClickType, t.bEmpire, t.dwDropItemVnum, t.dwResurrectionVnum, t.szFolder, t.bStr, t.bDex, t.bCon, t.bInt, t.dwDamageRange[0], t.dwDamageRange[1], t.dwMaxHP, t.bRegenCycle, t.bRegenPercent, t.dwExp, t.dwGoldMin, t.dwGoldMax, t.wDef, t.sAttackSpeed, t.sMovingSpeed, t.bAggresiveHPPct, t.wAggressiveSight, t.wAttackRange, t.dwPolymorphItemVnum, t.cEnchants[0], t.cEnchants[1], t.cEnchants[2], t.cEnchants[3], t.cEnchants[4], t.cEnchants[5], t.cResists[0], t.cResists[1], t.cResists[2], t.cResists[3], t.cResists[4], t.cResists[5], t.cResists[6], t.cResists[7], t.cResists[8], t.cResists[9], t.cResists[10], t.fDamMultiply, t.dwSummonVnum, t.dwDrainSP, t.Skills[0].dwVnum, t.Skills[0].bLevel, t.Skills[1].dwVnum, t.Skills[1].bLevel, t.Skills[2].dwVnum, t.Skills[2].bLevel, t.Skills[3].dwVnum, t.Skills[3].bLevel, t.Skills[4].dwVnum, t.Skills[4].bLevel, t.bBerserkPoint, t.bStoneSkinPoint, t.bGodSpeedPoint, t.bDeathBlowPoint, t.bRevivePoint ); } CDBManager::instance().AsyncQuery(query); } return true; }
  20. więcej informacji możecie znaleźć tutaj..: Przenieś mnie! Poprawiłem kilka błędów w systemie, które napotkałem, jeśli jakiekolwiek znajdziecie to piszcie pod tematem, postaram się poprawić Link do pobrania znajduje się w załączniku Maintenance System.rar
  21. Features: [+] Extremely easy to implement in your client, just build and go. [+] No need addiontal sofware or framework full based native coding [+] Full based heuristic protections [+] Will detect any type of anti-cheat, injector etc. [+] Complete anti injection for the entire process. [+] Stops DLL injection(Manual Map, Thread Hjacking,Reflective and other ring3 methods) [+] Stops remote code injections and other code cave methods. [+] Advanced anti hooking methods and hook protections [+] Hint: Self thread protections(suspend or kill) Server-Side Based [+] Advanced anti-debugging methods. [+] Advanced anti analysis methods. [+] Its incredibly hard to dump the process and get an idea of how its working. [+] Optional: [+] Detects potentially cheat files in the game folder(py,asi,mix) DazyShield.zip Ps. Nie piszcie, że nie działa jeśli nie potraficie się tym posłużyć!
  22. W sklepach Kena po wejściu do gry zapełnia nam syserr, przy otwarciu sklepu przez chwilę widzimy całe okno żółci Błąd: 0309 18:43:42953 :: Cannot find item by 2872320 0309 18:43:42953 :: Cannot find item by 2872320 0309 18:43:42956 :: Cannot find item by 735969280 0309 18:43:42956 :: Cannot find item by 735969280 0309 18:43:42956 :: Cannot find item by -2013265920 0309 18:43:42956 :: Cannot find item by -2013265920 0309 18:44:56592 :: Cannot find item by -2013265920 0309 18:45:11639 :: Cannot find item by -2013265920 0309 18:45:11657 :: Cannot find item by 735969280 0309 18:45:11673 :: Cannot find item by 2872320 Rozwiązanie: // UserInterface/PythonShop.cpp // Znajdź: for (int i = 0; i < SHOP_TAB_COUNT_MAX; i++) memset (m_aShoptabs[i].items, 0, sizeof(TShopItemData) * SHOP_HOST_ITEM_MAX_NUM); // Dodaj poniżej: for (int i = 0; i < SHOP_TAB_COUNT_MAX; i++) memset (m_aOfflineShoptabs[i].items, 0, sizeof(TShopItemData) * OFFLINE_SHOP_HOST_ITEM_MAX_NUM); Wszystko.
  23. Antycheat - blokuje aplikacje podczas uruchamiania clienta po hashu pliku Link: [Hidden Content] Skan: [Hidden Content] Daj znać czy niczego nie brakuje
  24. Poradnik o zwiększaniu statusów Dodawanie więcej niż 90 statusów Otwieramy cmd_general.cpp Szukamy: #define MAX_STAT 90 Zmieniamy na : #define MAX_STAT liczbę ile chcemy np. 125 Dodawanie statusów po 90 poziomie plik : Wchodzimy do char.cpp Szukamy : PointChange(POINT_STAT, ((MINMAX(1, iLv, 90) - 1) * 3) + GetPoint(POINT_LEVEL_STEP) - GetPoint(POINT_STAT)); Zmieniamy: PointChange(POINT_STAT, ((MINMAX(1, iLv, MAXLV) - 1) * 3) + GetPoint(POINT_LEVEL_STEP) - GetPoint(POINT_STAT));
  25. Usunięcie "wycieku" pamięci. 1. Otwórz db/ClientManager.cpp i znajdź (x2): pkPeer->EncodeHeader(HEADER_DG_SAFEBOX_WRONG_PASSWORD, dwHandle, 0); 2. Dodaj pod (x2): delete pSafebox; 3. Otwórz game/safebox.cpp i znajdź: if (pkOldGrid) m_pkGrid = M2_NEW CGrid(pkOldGrid, 5, m_iSize); else m_pkGrid = M2_NEW CGrid(5, m_iSize); 4. Zamień na: if (pkOldGrid) { m_pkGrid = M2_NEW CGrid(pkOldGrid, 5, m_iSize); delete pkOldGrid; } else m_pkGrid = M2_NEW CGrid(5, m_iSize);
×
×
  • Create New...