Jump to content

Search the Community

Showing results for tags 'vegas'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Metin2 Zone
    • Community
    • Presentations and farewells
  • Private Servers
    • Server Presentations
    • Project showcase
  • General
    • General Discussions
    • Partnerships and Cooperation
    • Services and trading
    • Helps and questions
    • Reviews and advice
    • Offtopic
  • Technical
    • Programming
    • Metin2 Server Modding
    • Web Development
    • Security
    • Operating Systems
    • Computing
  • Art
    • Design and graphic section
    • Gallery of images and videos
    • 3D Modelling
    • Mapping
  • Downloads
    • Client and Server files
    • 3D Models
    • Metin2 Images
    • Maps
    • Translation
  • Archive
    • Offline Servers
    • Temas Links Caidos

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Email


Sitio web


Jabber


Skype


Discord


Location


Intereses

Found 21 results

  1. It is for scripts online player or developer php that make connections to the database to achieve something, one who came to me to help him with that worked on a market online and item-shop and no time it was updated in real time and cause them a thousand a problem/bugs. /********* * author: VegaS * file: input_login.cpp * description: Time update in real-time table last_play * date: Tuesday, Aug 01 st 2016, 02:44am */ //1.) Search: void CInputLogin::Entergame(LPDESC d, const char * data) { LPCHARACTER ch; [........................................] } //2.) Add bellow: #ifdef ENABLE_UPDATE_LASTPLAY_REAL_TIME /********* * I put this verification level as not to over apply database updates elsewhere for characters that start at * first on the game that is at level 1, I believe that it is not necessary for a player of that level to have time adapted real-time. */ int pLevel = 5; // To begin initialize of level 5 ++ if (ch->GetLevel() > pLevel) { char pUpdateTime[1024]; snprintf(pUpdateTime, sizeof(pUpdateTime), "UPDATE player.player SET last_play = NOW() WHERE id = %u", ch->GetPlayerID()); std::auto_ptr<SQLMsg> sUpdate(DBManager::instance().DirectQuery(pUpdateTime)); } #endif
  2. I know that this is not a good way of protection and can easily pass over it, and that's why I recommend not to use, but some people will probably be helpful. Perhaps the code is less messy and is not exactly perfect, I did this 2 years ago for a server of mine and work perfectly last time. Perhaps some people sell for money this shit 2017, everything is free on the internet, thousands of similar functions on Google. If yours does not you like it and use it or think it's a crappy code are available to close this page and move over, this is only for people who needed it. /* * Go in folder Svn/Client/UserInterface/ and add this file: * Download: https://mega.nz/#!vBw1UITR!8rJ1RbFVa47eIVHXm3HTtfRkY_iTFg_eaXgdIzMdI2A * If you want to obtaining md5 from files, you need only to drag file on box, and will show you "Current file MD5 checksum value". Download: http://www.winmd5.com/download/winmd5free.zip */ //@Svn/Client/UserInterface/Locale_inc.h //Add where you want: #define ENABLE_CHECK_FILES_MD5 //@Svn/Client/UserInterface/UserInterface.cpp //1.) Search for: #include "Version.h" //2.) Add bellow: #ifdef ENABLE_CHECK_FILES_MD5 #include "md5.h" #include <windows.h> #endif //1.) Search for: static const char * sc_apszPythonLibraryFilenames[] = { [........] }; //2.) Add after: #ifdef ENABLE_CHECK_FILES_MD5 #define MAX_ROWS_MD5 21 static const char * ar_szMD5FileNames[MAX_ROWS_MD5][2] = { // Example of list: { "lib/__future__.pyc", "d2505c6e64dc44a1745dda0905f4e787" }, { "lib/copy_reg.pyc", "5e996d35b598676b253dd25fa3809ef2" }, { "lib/linecache.pyc", "c4c28529b05b4093f629fb7b23603cd2" }, { "lib/ntpath.pyc", "966048f390a65bebf60f912845441110" }, { "lib/os.pyc", "9e1e72faaafcde16dfd0e643a31f0b74" }, { "lib/site.pyc", "8336371539a459e72d7110f0cb1ed84f" }, { "lib/stat.pyc", "3dc2d3d11ba4c668a0097fbd631c7be6" }, { "lib/string.pyc", "39c29074226b2196e7f13ce93560d3d0" }, { "lib/traceback.pyc", "009e6647dfac211b6e69c6b3f1ed5600" }, { "lib/types.pyc", "2bff75340aa1d94b88bfc7915a291564" }, { "lib/UserDict.pyc", "aabdd94dfe3a1b0092f0a414a935c091" }, { "miles/mssdsp.flt", "cb71b1791009eca618e9b1ad4baa4fa9" }, { "miles/msssoft.m3d", "bdc9ad58ade17dbd939522eee447416f" }, { "miles/mssa3d.m3d", "e089ce52b0617a6530069f22e0bdba2a" }, { "miles/mss32.dll", "6400e224b8b44ece59a992e6d8233719" }, { "pack/Index", "8823ca827dfc980798856e97f3568cef" }, { "pack/root.eix", "ce13b7c96f725b7d7c39cbe1ae2f8b4d" }, { "pack/ETC.eix", "7c0b756d079a9c76a220a724b9594eeb" }, { "pack/locale_en.eix", "5b1aea18b89330481e16eca94673951c" }, { "pack/uiscript.eix", "d211c0a83ff2c771946d73554916bd9a" }, { "python27.dll", "d219c0a8aff2c771946d73554916bd9a" } /* Unlimited files */ }; #endif //1.) Search for: bool __IsLocaleVersion(LPSTR lpCmdLine) { return (strcmp(lpCmdLine, "--perforce-revision") == 0); } //2.) Add bellow: #ifdef ENABLE_CHECK_FILES_MD5 void CheckMD5Filenames() { MD5 md5; for (int it = 0; it < _countof(ar_szMD5FileNames); it++) { if (strcmp(md5.digestFile(ar_szMD5FileNames[it][0]), ar_szMD5FileNames[it][1])) { char szBuf[512 + 1]; snprintf(szBuf, sizeof(szBuf), "A file %s has been modified, please update autopatcher.", ar_szMD5FileNames[it][0]); MessageBoxA(NULL, szBuf, "#Metin2", NULL); exit(0); } } } #endif //1.) Search for: if (strstr(lpCmdLine, "--hackshield") != 0) return 0; //2.) Add after: #ifdef ENABLE_CHECK_FILES_MD5 CheckMD5Filenames(); #endif
  3. A guy asked from other community a tutorial on how to add a bonus of alignment. Well today I show you a small tutorial that can do that, i not tested. - [ File: /Src/game/affect.h ] #1.) Search: AFFECT_BLEND // 2) After make a new line and paste: ALIGNMENT_BONUS_1, ALIGNMENT_BONUS_2, Code for use: #ifdef __ALIGNMENT_BONUS__ if (GetRealAlignment() == NAME_ALIGNMENT_1) { AddAffect(ALIGNMENT_BONUS_1, POINT_MAX_HP, VALUE_BONUS_ALIGNMENT_1, 0, ALIGNMENT_TIME, 0, true); } if (GetRealAlignment() == NAME_ALIGNMENT_2) { AddAffect(ALIGNMENT_BONUS_2, POINT_MAX_HP, VALUE_BONUS_ALIGNMENT_2, 0, ALIGNMENT_TIME, 0, true); } #endif #ifdef __ALIGNMENT_BONUS__ if (FindAffect(ALIGNMENT_BONUS_1)) { if (GetRealAlignment() != NAME_ALIGNMENT_1) { RemoveAffect(ALIGNMENT_BONUS_1); } } #endif - [ File: /Src/common/service.h ] #define __ALIGNMENT_BONUS__ - [ File: /Src/common/ length .h ] #ifdef __ALIGNMENT_BONUS__ enum EAlignmentBonus { NAME_ALIGNMENT_1 = 100000 NAME_ALIGNMENT_2 = 200000, ALIGNMENT_TIME = 60*60*24*365, VALUE_BONUS_ALIGNMENT_1 = 1000, VALUE_BONUS_ALIGNMENT_2 = 2000, }; #endif You can use the code in function ComputePoints() from char.cpp or EnterGame() from input_main.cpp
  4. One guy asked in one forum if it possible to do this, so i was think is nice to post and here my kurwa code what i was make for him. Graphic mode you can find here (already is public from long years ago and you can find him in a lot a forums): [You need to extract all files from archive in directory where is launcher] https://mega.nz/#!qEhURQiC!vooj4ZM3HIq5sx6VZrzS3_9Kt6yKd5OznNtn1V3Z7CA #root/uiSystem.py: #1.) Search: def OnPressExitKey(self): self.Close() return TRUE #2.) Add after function: if app.ENABLE_GRAPHIC_MODE: ################################################################### # title_name : Features for graphic mode # date_created : 2017.01.04 # author : VegaS # def IsActiveModeGraphic(self): idx = open("enbconvertor.ini", "r").readlines() if int(idx[1][-2]) > 0: return TRUE return FALSE def __ClickSystemModeButton(self): import dbg, os, app, localeInfo if self.IsActiveModeGraphic(): dam = 0 else: dam = 1 idxCurMode = "EnableProxyLibrary=%d" % (dam) f = [] getLine = 2 if os.path.exists("enbconvertor.ini"): idx = open("enbconvertor.ini", "r") for it in idx: f.append(it) idx.close() while len(f) < int(getLine): f.append("") f[int(getLine)-1] = str(idxCurMode) idx = open("enbconvertor.ini", "w") for it in f: idx.write(it) if (len(it) > 0 and it[-1:] != "\n") or len(it) == 0: idx.write("\n") idx.close() self.Close() if dam > 0: dbg.LogBox(localeInfo.GRAPHIC_MODE_ENABLE) else: dbg.LogBox(localeInfo.GRAPHIC_MODE_DISABLE) dbg.LogBox(localeInfo.GRAPHIC_MODE_RESTART) os.system('start metin2client.exe') ### Change with your name of application. app.Exit() #1.) Search: self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton) #2.) Add bellow: if app.ENABLE_GRAPHIC_MODE: self.GetChild("system_mode_button").SAFE_SetEvent(self.__ClickSystemModeButton) #locale/en/locale_game.txt: GRAPHIC_MODE_ENABLE [i] The graphic mode was enabled. GRAPHIC_MODE_DISABLE [i] The graphic mode was disabled. GRAPHIC_MODE_RESTART [i] Client will restart. #locale/en/ui/systemdialog.py { "name" : "system_mode_button", "type" : "button", "x" : 10, # Position X "y" : 5, # Position Y "text" : "Graphic Mode (Enable/Disable)", "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, //@Src/Client/UserInterface/Locale_inc.h #define ENABLE_GRAPHIC_MODE //@Src/Client/UserInterface/PythonApplicationModule.cpp //1.) Search: #ifdef ENABLE_COSTUME_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0); #endif //2.) Add bellow: #ifdef ENABLE_GRAPHIC_MODE PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 0); #endif
  5. def getModule(): EnvironmentData = { # Explanation: # 16 - (16:00:00 - 16:59:59) # "d:/ymir work/environment/capedragonhead.msenv" - Environment what will be set on this time. # You can add how many environments you want. 4: "d:/ymir work/environment/metin2_map_n_flame_dragon_01.msenv", 8: "d:/ymir work/environment/mtthunder.msenv", 12: "d:/ymir work/environment/bayblacksand.msenv", 16: "d:/ymir work/environment/capedragonhead.msenv", 20: "d:/ymir work/environment/snowm02.msenv", 22: "d:/ymir work/environment/trent02.msenv" } return EnvironmentData # Returns the dict with all items def getHour(): return ((app.GetGlobalTimeStamp() / 60) / 60 % 24) # Returns the hour from server timestamp (loaded by TPacketGCTime) def Main(): for key, c_pszName in getModule().iteritems(): if getHour() is key and app.IsExistFile(c_pszName): # Checks if current hour is equal with index from dict EnvironmentData and it checks if environment exists (file .msenv) in pack. background.RegisterEnvironmentData(0, c_pszName) # Set the environment background.SetEnvironmentData(0) You can execute the function in two parts for loaded automatically. File: root/game.py On function: def OnUpdate(self): - Check every time hour and inserted environment, you should add a break to stop condition after check is true. def Open(self): - Check on every start the client / teleport - Much better optimization.
  6. Hello world last night at around 5 am bored me and I created a short teleport order in minutes. What is this order? - Order can be used for teleporting a player. - By accessing the / teleport <number> you have to choose one of the numbers that are in the map settings. - Each map has a configuration proposed for the minimum and maximum level. - You can teleport a map if you do not have the required minimum. - You can teleport a map if you level higher than the configuration map. - List of papers default starts from 1 to 13. - You can not enter a number less than 1. - You can not enter a number greater than 13. - You can not enter characters than numbers. - When you tried to use the command without arguments will show the list as the number of error information, as well as where you enter a character or use / teleport show_list. You can add as many maps you want. - Everything is configurable. - Must have knowledge of C++ 0.1% to add more maps. Download link: https://mega.nz/#!nQojDDrJ!azzGGoQYILIcJ2deDLuvMFW2HoyQBuxYdv1ikysDVyk
  7. Here is a small playground for owners of servers . xD I made a small improvements statics for players via command. //@svn/Server/common/service.h #define ENABLE_ONLINE_COMMAND #define ENABLE_COUNTER_FAKE //@ DISABLE IF YOU NOT WANT TO HAVE FAKE PLAYER ON COMMAND //@svn/Server/game/src/cmd.cpp //1.) Search: { "messenger_auth", do_messenger_auth, 0, POS_DEAD, GM_PLAYER }, //2.) Add bellow: #ifdef ENABLE_ONLINE_COMMAND { "online", do_online, 0, POS_DEAD, GM_PLAYER }, #endif //1.) Search: ACMD(do_messenger_auth); //2.) Add bellow: #ifdef ENABLE_ONLINE_COMMAND ACMD(do_online); #endif //@svn/Server/game/src/cmd_general.cpp //1.) Add where you want: ACMD(do_online) { /********************************************************************* * date : 2016.10.25 * file : cmd_general.cpp * author : VegaS * description : Statistics server + configuration for fake */ time_t currentTime; struct tm *localTime; time(&currentTime); localTime = localtime(&currentTime); #define ENABLE_OFFLINE_SHOP_SYSTEM //@disable if you not have offlineShop #ifdef ENABLE_OFFLINE_SHOP_SYSTEM std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery("SELECT COUNT(*) FROM player.offline_shop_npc WHERE owner_id and channel = %d", g_bChannel)); MYSQL_ROW row = mysql_fetch_row(pmsg->Get()->pSQLResult); int mShopsOffline = 0; str_to_number(mShopsOffline, row[0]); #endif int mResultHour = localTime->tm_hour, mResultMin = localTime->tm_min, mResultSec = localTime->tm_sec; int mTotalOnline; int * mEmpire; int mLocal; DESC_MANAGER::instance().GetUserCount(mTotalOnline, &mEmpire, mLocal); /* 0 = 00:00 1 = 01:00 2 = 02:00 3 = 03:00 4 = 04:00 5 = 05:00 6 = 06:00 7 = 07:00 8 = 08:00 9 = 09:00 10 = 10:00 11 = 11:00 12 = 12:00 13 = 13:00 14 = 14:00 15 = 15:00 16 = 16:00 17 = 17:00 18 = 18:00 19 = 19:00 20 = 20:00 21 = 21:00 22 = 22:00 23 = 23:00 */ #ifdef ENABLE_COUNTER_FAKE static int arrayDesc[23 + 1][2] = { /* First row -> Current hour | Second row -> Value added for players fake Example: From 15:00 until 15:59:59 will be added on statics + 75 players online fake. Because -> { 15, 75 } */ { 0, 190 }, { 1, 175 }, { 2, 160 }, { 3, 140 }, { 4, 130 }, { 5, 100 }, { 6, 80 }, { 7, 75 }, { 8, 60 }, { 9, 55 }, { 10, 40 }, { 11, 30 }, { 12, 50 }, { 13, 60 }, { 14, 70 }, { 15, 75 }, { 16, 80 }, { 17, 90 }, { 18, 105 }, { 19, 120 }, { 20, 135 }, { 21, 155 }, { 22, 175 }, { 23, 180 } }; for (int i=0; i<_countof(arrayDesc); i++) { if (mResultHour == arrayDesc[i][0]) { for (int j=1; j<=3; j++) mEmpire[i] += arrayDesc[i][1] / 3; mTotalOnline += arrayDesc[i][1]; break; } } #endif if (ch->IsGM()) { ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current time on server: %d:%d:%d", mResultHour, mResultMin, mResultSec); } ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current channel: [%d]", g_bChannel); ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current players online on this channel (all empire): [%d]", mTotalOnline); ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current players online on empire: Shinshoo - [%d] | Chunjo - [%d] | Jinno - [%d]", mEmpire[1], mEmpire[2], mEmpire[3]); #ifdef ENABLE_OFFLINE_SHOP ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current shops offline on this channel: [%d]", mShopsOffline); #endif } Download: https://mega.nz/#!rQgG0C5L!5yIGTEsJoiF5UVJ7l7jJKKaSrBY4izI_A_ylmlLEP2U Have fun (not tested full, sorry for shit code, It was quickly made fun)
  8. When you are a simple member of guild: When you are leader on guild: http://pastebin.com/2YEhMBFB //@Svn/Client/UserInterface/PythonTextTail.cpp //1.) Search: void CPythonTextTail::RenderTextTailName(TTextTail * pTextTail) { [......] } //2.) Add after: #ifdef ENABLE_SHOW_LEADER_GUILD std::string CPythonTextTail::IsLeaderOnGuild(std::string * strConvertGuildName) { /************************************* * Date : 08.01.2017 * FileName : PythonTextTail.cpp * TitleName : IsLeaderOnGuild * Author : VegaS * Description : When you are leader on your guild will appear in front [leader]. You can and enable color on textLine when you are leader with ENABLE_SHOW_LEADER_GUILD_COLOR. */ #define LEADER_GUILD_COLOR "|cFFd0ffcc" //Change color from http://www.color-hex.com/color/ccffff CPythonGuild::TGuildInfo & rGuildData = CPythonGuild::Instance().GetGuildInfoRef(); CPythonGuild::TGuildMemberData * pInfo; const char* masterName; const char* mainCharacterName; std::string masterGuild; if (!CPythonGuild::Instance().GetMemberDataPtrByPID(rGuildData.dwMasterPID, &pInfo)) masterName = "Noname"; mainCharacterName = CPythonPlayer::Instance().GetName(); masterName = pInfo->strName.c_str(); masterGuild = *strConvertGuildName; if (!strcmp(mainCharacterName, masterName)) { masterGuild.insert(0, #ifdef ENABLE_SHOW_LEADER_GUILD_COLOR LEADER_GUILD_COLOR #endif "[Leader] " ); } return masterGuild.c_str(); } #endif //1.) Search for: strGuildName = "Noname"; //2.) Add after: #ifdef ENABLE_SHOW_LEADER_GUILD std::string strConvertGuildName = CPythonTextTail::Instance().IsLeaderOnGuild(&strGuildName); #endif //1.) Search for: prGuildNameInstance->SetValue(strGuildName.c_str()); //2.) Add after: #ifdef ENABLE_SHOW_LEADER_GUILD prGuildNameInstance->SetValue(strConvertGuildName.c_str()); #else prGuildNameInstance->SetValue(strGuildName.c_str()); #endif //1.) Search for: #include "PythonGuild.h" //2.) Add after: #ifdef ENABLE_SHOW_LEADER_GUILD #include "PythonPlayer.h" #endif //@Svn/Client/UserInterface/PythonTextTail.h //1.) Search: void DetachTitle(DWORD dwVID); //2.) Add after: #ifdef ENABLE_SHOW_LEADER_GUILD std::string IsLeaderOnGuild(std::string * strConvertGuildName); #endif //@Svn/Client/UserInterface/Locale_inc.h //Add where you want: #define ENABLE_SHOW_LEADER_GUILD #define ENABLE_SHOW_LEADER_GUILD_COLOR // Enable color textLine
  9. For who want in client-side: [email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>/Source/Client/UserInterface/InstanceBaseBattle.cpp //1.) Search: bool CInstanceBase::NEW_UseSkill(UINT uSkill, UINT uMot, UINT uMotLoopCount, bool isMovingSkill) { //2.) Add bellow: #ifdef ENABLE_FEATURES_BLOCK_SKILL static std::string uCurrentMap = CPythonBackground::Instance().GetWarpMapName(); static std::string uArrayListOfMaps[] = { "metin2_map_a1", "metin2_map_b1", /* loaded from atlasinfo.txt */ "metin2_map_c1" }; for (int i=0;i<_countof(uArrayListOfMaps);i++) { if (!IsGameMaster() && (!uCurrentMap.compare(uArrayListOfMaps[i]))) { TraceError("CInstanceBase::UseSkill on map %s was blocked.", uArrayListOfMaps[i].c_str()); return false; } } #endif For who want in server-side: [email protected]/* *//Server/game/src/game/char_skill.cpp //1.) Search: if (0 == dwSkillVnum) return false; //2.) Add bellow: #ifdef ENABLE_FEATURES_BLOCK_SKILL static int arrayMapIndex[] = { 1, 21, 41 /* loaded from map/index.txt */ }; for (int i=0;i<_countof(arrayMapIndex);i++) { if (!IsGM() && GetMapIndex() == arrayMapIndex[i]) { ChatPacket(CHAT_TYPE_NOTICE, "CHARACTER::UseSkill on mapIndex %d was blocked.", arrayMapIndex[i]); return false; } } #endif [email protected]/* *//Source/Client/UserInterface/PythonPlayerEventHandler.cpp //1.) Search: void CPythonPlayerEventHandler::OnHit(UINT uSkill, CActorInstance& rkActorVictim, BOOL isSendPacket) { //2.) Add bellow: static std::string uCurrentMap = CPythonBackground::Instance().GetWarpMapName(); static std::string uArrayListOfMaps[] = { "metin2_map_a1", "metin2_map_b1", /* loaded from atlasinfo.txt */ "metin2_map_c1" }; for (int i=0;i<_countof(uArrayListOfMaps);i++) { if (rkActorVictim.IsPC() && (!uCurrentMap.compare(uArrayListOfMaps[i]))) { TraceError("CPythonPlayerEventHandler::OnHit on map %s was blocked because players is protected.", uArrayListOfMaps[i].c_str()); return; } } //3.) And add on first line or where you want: #include "PythonBackground.h"
  10. http://metin2zone.net/index.php?/topic/24114-c-affect-blend-potion/
  11. A collision or crash is an event in which two or more bodies exert forces on each other for a relatively short time. Although the most common colloquial use of the word "collision" refers to incidents in which two or more objects collide, the scientific use of the word "collision" implies nothing about the magnitude of the force. Some examples of physical interactions that scientists would consider collisions: An insect touches its antenna to the leaf of a plant. The antenna is said to collide with leaf. A cat walks delicately through the grass. Each contact that its paws make with the ground is a collision. Each brush of its fur against a blade of grass is a collision. [File: src/Client/Source/GameLib/ActorInstanceCollisionDetection.cpp] //1.) Search: ​ #include "../eterLib/GrpMath.h" ​ //2.) Add bellow: #include "../UserInterface/PythonBackground.h" #include "../UserInterface/Locale_inc.h" //3.) Search: BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim) { //4.) Add bellow: #ifdef ENABLE_STOP_COLISSION_GLOBAL /********************************************************************* * date : 2016.02.16 * function : Stop Colission * developer : VegaS * skype : sacadatt.amazon * description : Checks if the victim is one of the examples below you can easily configure. If the victim was found success as vnum site / breed ve you could go through it no longer block. */ /************ * The first value is the minimum value and the second value is the maximum value of pet vnum (mob_proto) - change 34051 with your max vnum of pet */ int pListPet[2] = {34001, 34051}; /************ * You can add whatever you like vnum of npc or monster (mob_proto) */ int pListGlobal[] = {9001, 9002, 9003, 9004, 9005, 9006, 20011, 20091, 20092, 20093, 20094, 20095, 30000}; /************ * You can add what mapname you want for enable this stop collission global like pet / npc */ const char* strMapListGlobal[] = {"metin2_map_a1", "metin2_map_a3", "metin2_map_b1", "metin2_map_b3", "metin2_map_c1", "metin2_map_c3", "season2/metin2_map_skipia_dungeon_01", "season2/metin2_map_skipia_dungeon_02", "metin2_map_duel"}; /************ * Location name of the map where the event takes place ox */ const char* strMapEventOx = "season1/metin2_map_oxevent"; std::string stringName = CPythonBackground::Instance().GetWarpMapName(); for (int i = 0; i < _countof(strMapListGlobal); i++) { #ifdef ENABLE_STOP_COLLISION_PLAYER_OX if (strMapEventOx == stringName) // Check if u are place in map ox { if (0 <= rVictim.GetRace() && rVictim.GetRace() <= 7) // Check if the victim through which pass over a player (change 7 with 8 if u have wolfman) return FALSE; // Stop collission for player --> You can go through players now successfully without lock yourself } #endif if (strMapListGlobal[i] == stringName) // Check if you are in one of the maps listed in the global list { for (int i = 0; i < _countof(pListGlobal); i++) { if (rVictim.GetRace() == pListGlobal[i] || pListPet[0] <= rVictim.GetRace() && rVictim.GetRace() <= pListPet[1]) // Verify that the victim is npc vnum listed above, or if a pet. return FALSE; // Stop collission for global vnum like a pet or npc } } } #endif [File: src/Client/Source/UserInterface/Locale_inc.h] //1.) Search: #define ENABLE_COSTUME_SYSTEM //2.) Add bellow: #ifndef ENABLE_STOP_COLISSION_GLOBAL #define ENABLE_STOP_COLISSION_GLOBAL #define ENABLE_STOP_COLLISION_PLAYER_OX #endif
  12. As you know many people have wanted to do this and they did not know how. I posted a few months ago another community on how to do this, the only tutorial, and then I noticed that everyone was used for those functions that I put. So today I improve my bit version, and you've made a small gift. Sorry for that code, is very shit maybe but is *free*, I do not ask money for crap written in a few minutes. [File: Src/Client/UserInterface/Locale_inc.h] // ------------------------------------------------------------------------ // #define ENABLE_EFFECT_COSTUME // Enable check for add effect costume // ------------------------------------------------------------------------ // // ------------------------------------------------------------------------ // #define GET_EFFECT_VIA_MSM // Enable check from value3 item_proto(client) // ------------------------------------------------------------------------ // // ------------------------------------------------------------------------ // #define GET_EFFECT_VIA_VNUM // Enable check from item vnum // ------------------------------------------------------------------------ // [File: Src/Client/UserInterface/InstanceBase.h] #1.) Search: enum { WEAPON_DUALHAND, WEAPON_ONEHAND, WEAPON_TWOHAND, WEAPON_NUM, }; #2.) Add bellow: #ifdef ENABLE_EFFECT_COSTUME // ------------------------------------------------------------------------ // // This enum from ECostumeEffectMsm value is loaded from item_proto(client)// // Value is loaded from your Value3="xxxxx" // // Value3 = ShapeIndex from yourrace.msm (root) // // ------------------------------------------------------------------------ // enum ECostumeEffectMsm { VALUE_MSM_1 = 40032, // = vnum [ (M) -> 41003, (F) -> 41004] VALUE_MSM_2 = 40033, // = vnum [ (M) -> 41005, (F) -> 41006] VALUE_MSM_3 = 40034, // = vnum [ (M) -> 41007, (F) -> 41008] VALUE_MSM_4 = 40035, // = vnum [ (M) -> 41009, (F) -> 41010] VALUE_MSM_5 = 40036, // = vnum [ (M) -> 41011, (F) -> 41012] VALUE_MSM_6 = 40037, // = vnum [ (M) -> 41013, (F) -> 41014] VALUE_MSM_7 = 40038, // = vnum [ (M) -> 41015, (F) -> 41016] VALUE_MSM_8 = 40039, // = vnum [ (M) -> 41017, (F) -> 41018] VALUE_MSM_9 = 40040, // = vnum [ (M) -> 41019, (F) -> 41020] VALUE_MSM_10 = 40041, // = vnum [ (M) -> 41021, (F) -> 41022] }; enum ECostumeEffectVnum { VALUE_VNUM_1 = 41003, VALUE_VNUM_2 = 41304, VALUE_VNUM_3 = 41005, VALUE_VNUM_4 = 41006, VALUE_VNUM_5 = 41307, VALUE_VNUM_6 = 41308, VALUE_VNUM_7 = 41309, VALUE_VNUM_8 = 41310, VALUE_VNUM_9 = 41311, VALUE_VNUM_10 = 41312, }; #endif [File: Src/Client/UserInterface/InstanceBase.cpp] #1.) Search: if (m_swordRefineEffectRight) m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight); if (m_swordRefineEffectLeft) m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft); break; #2.) Add bellow: #ifdef ENABLE_EFFECT_COSTUME case CItemData::ITEM_TYPE_COSTUME: if (pItem->GetSubType() == CItemData::COSTUME_BODY) { DWORD szItem = pItem->GetIndex(); long szMsm = pItem->GetValue(3); #ifdef GET_EFFECT_VIA_MSM if (szMsm == VALUE_MSM_1 || szMsm == VALUE_MSM_2 || szMsm == VALUE_MSM_3 || szMsm == VALUE_MSM_4 || szMsm == VALUE_MSM_5 || szMsm == VALUE_MSM_6 || szMsm == VALUE_MSM_7 || szMsm == VALUE_MSM_8 || szMsm == VALUE_MSM_9 || szMsm == VALUE_MSM_10) #endif #ifdef GET_EFFECT_VIA_VNUM if (szItem == VALUE_VNUM_1 || szItem == VALUE_VNUM_2 || szItem == VALUE_VNUM_3 || szItem == VALUE_VNUM_4 || szItem == VALUE_VNUM_5 || szItem == VALUE_VNUM_6 || szItem == VALUE_VNUM_7 || szItem == VALUE_VNUM_8 || szItem == VALUE_VNUM_9 || szItem == VALUE_VNUM_10) #endif { __AttachEffect(EFFECT_REFINED+EFFECT_NAME); // Put your effect } } #endif
  13. I saw this guy looking hasta .. it provides money for shit, so I wanted to paint a small tutorial sucks these functions. [File: Src/game/src/service.h] #define ENABLE_PROTECT_ALIGNMENT #ifdef ENABLE_PROTECT_ALIGNMENT #define IS_MAPINDEX_PROTECT_ALIGN(map) (200==(map)||201==(map)||(202)==(map)) #endif [File: Src/game/src/char_battle.cpp] //1.) Search: if (g_iUseLocale && pkKiller->GetParty()) { FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-20000); //2.) Delete and replaced with this: if (g_iUseLocale && pkKiller->GetParty()) { #ifdef ENABLE_PROTECT_ALIGNMENT if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } #endif FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-20000); [File: Src/game/src/char.cpp] //1.) Search: UpdateAlignment(5 * (dwPlayedTime / 60000)); //2.) Delete and replaced with this: #ifdef ENABLE_PROTECT_ALIGNMENT if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } else { UpdateAlignment(5 * (dwPlayedTime / 60000)); } #else UpdateAlignment(5 * (dwPlayedTime / 60000)); #endif PS: I have not tested this, I just wrote. But in principle it should work. ----------------------------------------------------------------------------------------- EDIT: Fcking shit or you can make that easy: [File: Src/game/src/char_battle.cpp] #ifdef ENABLE_PROTECT_ALIGNMENT void CHARACTER::UpdateAlignment(int iAmount) { if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } else { bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment / 10; m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment / 10) UpdatePacket(); } } } #endif
  14. Solving at the bug communication between kingdoms or so the window pm and in chat when you turn the sentences that you were writing in characters strings and putty that had the ring language equipped, or that depending CONVERT_EMPIRE in constInfo, or whether it had maximum skill points s understanding of language depends on the cases, many quests were installed by lifting the M1 s skills (language) automatically every login server. And sometimes you're even equipped a ring of tongues or not working etc and can talk forever pm only and not on chat etc. With solve this problem through the easiest way. First we see how it works: if (!ch->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE)) ConvertEmpireText(ch->GetEmpire(), buf, buflen, 10 + 2 * pkChr->GetSkillPower(SKILL_LANGUAGE1 + ch->GetEmpire() - 1)/*Conversion chance*/); special_item_group.txt: Group UNIQUE_GROUP_RING_OF_LANGUAGE { Vnum 10025 1 70006 1 1 --* Ring Languages 2 70047 1 1 --* Ring Languages (Ex) 3 71005 1 1 --* Ring Languages (7 days) 4 71006 1 1 --* Ring Languages (15 days) 5 71007 1 1 -- Ring Languages (30 days) } pkChr->GetSkillPower(SKILL_LANGUAGE1 + bToEmpire - 1) SKILL_LANGUAGE1 = 126 SKILL_LANGUAGE2 = 127 SKILL_LANGUAGE3 = 128 126 Shinsoo Language You can understand the Shinsoo language. 127 Chunjo Language You can understand the Chunjo language. 128 Jinno Language You can understand the Jinno language. Now you see how it proceeds, the items when not equipped in that special group for your texts as conversion for the other kingdoms. Now the fix is very easy to remove this function. [File: Src/game/input_p2p] //1.) Search function: int CInputP2P::Relay(LPDESC d, const char * c_pData, size_t uiBytes) //2.) Delete function and replace with this: int CInputP2P::Relay(LPDESC d, const char * c_pData, size_t uiBytes) { TPacketGGRelay * p = (TPacketGGRelay *) c_pData; if (uiBytes < sizeof(TPacketGGRelay) + p->lSize) return -1; if (p->lSize < 0) { sys_err("invalid packet length %d", p->lSize); d->SetPhase(PHASE_CLOSE); return -1; } sys_log(0, "InputP2P::Relay : %s size %d", p->szName, p->lSize); LPCHARACTER pkChr = CHARACTER_MANAGER::instance().FindPC(p->szName); const BYTE* c_pbData = (const BYTE *) (c_pData + sizeof(TPacketGGRelay)); if (!pkChr) return p->lSize; if (*c_pbData == HEADER_GC_WHISPER) { if (pkChr->IsBlockMode(BLOCK_WHISPER)) { return p->lSize; } char buf[1024]; memcpy(buf, c_pbData, MIN(p->lSize, sizeof(buf))); TPacketGCWhisper* p2 = (TPacketGCWhisper*) buf; BYTE bToEmpire = (p2->bType >> 4); p2->bType = p2->bType & 0x0F; if(p2->bType == 0x0F) { p2->bType = WHISPER_TYPE_SYSTEM; } #ifdef ENABLE_CONVERT_EMPIRE_TEXT else { if (!pkChr->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE)) if (bToEmpire >= 1 && bToEmpire <= 3 && pkChr->GetEmpire() != bToEmpire) { ConvertEmpireText(bToEmpire,buf + sizeof(TPacketGCWhisper), p2->wSize - sizeof(TPacketGCWhisper),10+2*pkChr->GetSkillPower(SKILL_LANGUAGE1 + bToEmpire - 1)); } } #endif pkChr->GetDesc()->Packet(buf, p->lSize);} else pkChr->GetDesc()->Packet(c_pbData, p->lSize); return (p->lSize); } [File: Src/game/input_main.cpp] //1.) Search function: int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes) //2.) Delete function and replace with this: int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes) { const TPacketCGWhisper* pinfo = reinterpret_cast<const TPacketCGWhisper*>(data); if (uiBytes < pinfo->wSize) return -1; int iExtraLen = pinfo->wSize - sizeof(TPacketCGWhisper); if (iExtraLen < 0) { sys_err("invalid packet length (len %d size %u buffer %u)", iExtraLen, pinfo->wSize, uiBytes); ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; } if (ch->FindAffect(AFFECT_BLOCK_CHAT)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("채팅 금지 상태입니다.")); return (iExtraLen); } LPCHARACTER pkChr = CHARACTER_MANAGER::instance().FindPC(pinfo->szNameTo); if (pkChr == ch) return (iExtraLen); LPDESC pkDesc = NULL; BYTE bOpponentEmpire = 0; if (test_server) { if (!pkChr) sys_log(0, "Whisper to %s(%s) from %s", "Null", pinfo->szNameTo, ch->GetName()); else sys_log(0, "Whisper to %s(%s) from %s", pkChr->GetName(), pinfo->szNameTo, ch->GetName()); } if (ch->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_SENDER_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } return iExtraLen; } if (!pkChr) { CCI * pkCCI = P2P_MANAGER::instance().Find(pinfo->szNameTo); if (pkCCI) { pkDesc = pkCCI->pkDesc; pkDesc->SetRelay(pinfo->szNameTo); bOpponentEmpire = pkCCI->bEmpire; if (test_server) sys_log(0, "Whisper to %s from %s (Channel %d Mapindex %d)", "Null", ch->GetName(), pkCCI->bChannel, pkCCI->lMapIndex); } } else { pkDesc = pkChr->GetDesc(); bOpponentEmpire = pkChr->GetEmpire(); } if (!pkDesc) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_NOT_EXIST; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(TPacketGCWhisper)); sys_log(0, "WHISPER: no player"); } } else { if (ch->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_SENDER_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } } else if (pkChr && pkChr->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_TARGET_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } } else { BYTE bType = WHISPER_TYPE_NORMAL; char buf[CHAT_MAX_LEN + 1]; strlcpy(buf, data + sizeof(TPacketCGWhisper), MIN(iExtraLen + 1, sizeof(buf))); const size_t buflen = strlen(buf); if (true == SpamBlockCheck(ch, buf, buflen)) { if (!pkChr) { CCI * pkCCI = P2P_MANAGER::instance().Find(pinfo->szNameTo); if (pkCCI) { pkDesc->SetRelay(""); } } return iExtraLen; } if (LC_IsCanada() == false) { CBanwordManager::instance().ConvertString(buf, buflen); } if (g_bEmpireWhisper) if (!ch->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE)) if (!(pkChr && pkChr->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE))) if (bOpponentEmpire != ch->GetEmpire() && ch->GetEmpire() && bOpponentEmpire && ch->GetGMLevel() == GM_PLAYER && gm_get_level(pinfo->szNameTo) == GM_PLAYER) { if (!pkChr) { bType = ch->GetEmpire() << 4; } #ifdef ENABLE_CONVERT_EMPIRE_TEXT else { ConvertEmpireText(ch->GetEmpire(), buf, buflen, 10 + 2 * pkChr->GetSkillPower(SKILL_LANGUAGE1 + ch->GetEmpire() - 1)/*변환확률*/); } #endif } int processReturn = ProcessTextTag(ch, buf, buflen); if (0!=processReturn) { if (ch->GetDesc()) { TItemTable * pTable = ITEM_MANAGER::instance().GetTable(ITEM_PRISM); if (pTable) { char buf[128]; int len; if (3==processReturn) //교환중 len = snprintf(buf, sizeof(buf), LC_TEXT("다른 거래중(창고,교환,상점)에는 개인상점을 사용할 수 없습니다."), pTable->szLocaleName); else len = snprintf(buf, sizeof(buf), LC_TEXT("%s이 필요합니다."), pTable->szLocaleName); if (len < 0 || len >= (int) sizeof(buf)) len = sizeof(buf) - 1; ++len; TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_ERROR; pack.wSize = sizeof(TPacketGCWhisper) + len; strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->BufferedPacket(&pack, sizeof(pack)); ch->GetDesc()->Packet(buf, len); sys_log(0, "WHISPER: not enough %s: char: %s", pTable->szLocaleName, ch->GetName()); } } pkDesc->SetRelay(""); return (iExtraLen); } if (ch->IsGM()) bType = (bType & 0xF0) | WHISPER_TYPE_GM; if (buflen > 0) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.wSize = sizeof(TPacketGCWhisper) + buflen; pack.bType = bType; strlcpy(pack.szNameFrom, ch->GetName(), sizeof(pack.szNameFrom)); TEMP_BUFFER tmpbuf; tmpbuf.write(&pack, sizeof(pack)); tmpbuf.write(buf, buflen); pkDesc->Packet(tmpbuf.read_peek(), tmpbuf.size()); if (LC_IsEurope() != true) { sys_log(0, "WHISPER: %s -> %s : %s", ch->GetName(), pinfo->szNameTo, buf); } } } } if(pkDesc) pkDesc->SetRelay(""); return (iExtraLen); } //3.) Search function: struct FEmpireChatPacket //4.) Delete function and replace with this: struct FEmpireChatPacket { packet_chat& p; const char* orig_msg; int orig_len; char converted_msg[CHAT_MAX_LEN+1]; BYTE bEmpire; int iMapIndex; int namelen; FEmpireChatPacket(packet_chat& p, const char* chat_msg, int len, BYTE bEmpire, int iMapIndex, int iNameLen) : p(p), orig_msg(chat_msg), orig_len(len), bEmpire(bEmpire), iMapIndex(iMapIndex), namelen(iNameLen) { memset( converted_msg, 0, sizeof(converted_msg) ); } void operator () (LPDESC d) { if (!d->GetCharacter()) return; if (d->GetCharacter()->GetMapIndex() != iMapIndex) return; d->BufferedPacket(&p, sizeof(packet_chat)); if (d->GetEmpire() == bEmpire || bEmpire == 0 || d->GetCharacter()->GetGMLevel() > GM_PLAYER || d->GetCharacter()->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE)) { d->Packet(orig_msg, orig_len); } #ifdef ENABLE_CONVERT_EMPIRE_TEXT else { size_t len = strlcpy(converted_msg, orig_msg, sizeof(converted_msg)); if (len >= sizeof(converted_msg)) len = sizeof(converted_msg) - 1; ConvertEmpireText(bEmpire, converted_msg + namelen, len - namelen, 10 + 2 * d->GetCharacter()->GetSkillPower(SKILL_LANGUAGE1 + bEmpire - 1)); d->Packet(converted_msg, orig_len); } #endif } }; PS: Do not add to define the service.h I made with blueberries if you want to revert to the old structure just add this.
  15. when 50187.use begin if not pc.can_warp() then notice("You can not do that now. Wait 10 seconds.") elseif pc.get_empty_inventory_count() < 15 then notice("You must have at least 15 empty spaces in your inventory.") elseif pc.getqf("chest_01") > 0 then notice("You have already opened this chest.") else item.remove() pc.setqf("chest_01", 1) local table_items = {76022, 76005, 27003, 27006, 39026, 27102, 76007, 50188, 71027, 71028, 71029, 71030, 71044, 71045, 27870, 27873, 70005} local table_count = {1, 1, 200, 200, 50, 50, 200, 1, 5, 5 ,5 ,5, 5, 5, 5, 5, 1} for szVegas = 1, table.getn(table_items) do pc.give_item2(table_items[szVegas], table_count[szVegas]) end end end
  16. import dbg, app, chat szText = self.GetText() #szText_ = self.inputValue.GetText() ## your input value try: szGetFile = app.OpenTextFile("locale/en/block_words_python.txt") count_words = app.GetTextFileLineCount(szGetFile) except IOError: dbg.LogBox("Error: Loading words !") app.Abort() for vegas in xrange(count_words): lineText = app.GetTextFileLine(szGetFile, vegas) szGetTextFromFile = str(lineText).split("\t") if len(szGetTextFromFile) == 0 or not szGetTextFromFile[0]: continue if szText == szGetTextFromFile[0]: chat.AppendChat(chat.CHAT_TYPE_INFO, "[SYSTEM] Blocked words were introduced!") return #if szText == szGetTextFromFile[0] and szText.find("b") != -1: #chat.AppendChat(chat.CHAT_TYPE_INFO, "[SYSTEM] Check Function Test 1!") #return #iText = szGetTextFromFile[0] #if text and iText.find(" ") != -1: #if szGetTextFromFile[0] and text.find("a"): #if iText.strip().split(" ")[1] == text[-1:]: #test = self.GetText() #if szGetTextFromFile[0]: #if test.find(" "): #szText = szText.replace(" ", "____") #chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] Check Function Test 2!") #return #if szText.find("vegas") != -1: #iText = str(iText).replace(" ", "pythonX") locale/en/block_words_python.txt vegas0 vegas1 vegas2 vegas3 vegas4 vegas5 vegas6 vegas7 vegas8
  17. Explain this bug: You do shop with items up to 120kkk, and another player can buy your items, but your bank online store you get only 2kkk, and the remaining money is erased. You need to do this check and function AddItem, because he still can not do this bug when you add items can add up to 120kkk. A guy asked me to help him solve this problem a few months ago, I helped and I offered this little fix free without any money and he was placed and sold to other users on a lot of money and he made a lot of money on this crap fixed which was written in 5 minutes. So I decided to put it for everyone to fix this problem, I mention this fix is for the offline shop's from Ken. This fix applies to people who have no limit increased to yang in bank offlineshop, shop etc.. - [ File: /Src/common/service.h ] #1.) Add this: #define __OFFLINE_SHOP_FIX_OPEN #define __OFFLINE_SHOP_VALUE_MAX 2000000000 - [ File: /Src/game/src/char.cpp ] #1.) Search function: if (!LC_IsBrazil()) { DWORD nTotalMoney = 0; for (BYTE n = 0; n < bItemCount; ++n) nTotalMoney += (pTable + n)->price; if (GOLD_MAX - 1 <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName()); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다")); return; } } #2.) Replace function with this: #ifdef __OFFLINE_SHOP_FIX_OPEN int64_t iTotalAmount = 0; for (int n = 0; n < bItemCount; ++n) iTotalAmount += static_cast<int64_t>((pTable + n)->price); std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT money FROM player.player WHERE id = %u", GetPlayerID())); if (!pMsg->Get()->uiNumRows) return; iTotalAmount += static_cast<int64_t>(atoi(mysql_fetch_row(pMsg->Get()->pSQLResult)[0])); if (__OFFLINE_SHOP_VALUE_MAX <= iTotalAmount) { ChatPacket(CHAT_TYPE_INFO, "[Protect Offline] Have more than 2.000.000.000 Yang!"); return; } #else if (!LC_IsBrazil()) { DWORD nTotalMoney = 0; for (BYTE n = 0; n < bItemCount; ++n) nTotalMoney += (pTable + n)->price; if (GOLD_MAX - 1 <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName()); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다")); return; } } #endif
×
×
  • Create New...