VegaS
Banned-
Posts
363 -
Joined
-
Last visited
-
Days Won
40 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by VegaS
-
PS: Sorry for so later answer here, but one guy asked me about this topic, and i was think is ok and post here. [Hidden Content] - Here is more settings.
-
M2 Download Center Download Here ( Internal ) Perhaps it will be useful for some people for various systems. Have fun. # onPressKeyDict[app.DIK_F5] = lambda : self.Print() # For test function @root/game.py def Print(self): import app, chat list = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" # Set list maxStr = 10 # Set the maximum number of characters k = "" for v in xrange(maxStr): k = k + list[app.GetRandom(0, len(list) - 1)] chat.AppendChat(chat.CHAT_TYPE_INFO, "Result word: %s" % str(k))
-
[S] Developer for Payment Script
VegaS replied to ‚Point‘'s topic in Paid Support / Searching / Recruiting
You can contact these people: (i don't know if all still working on that) @DevChuckNorris @.PolluX @Ayaka @Mariuk3 @ondry @metin2team @MichaelM @BombWork Studio @Ionuț | @Optimus -
Looking for: >"Professional Mapper"<
VegaS replied to Raylee's topic in Paid Support / Searching / Recruiting
https://metin2dev.org/board/index.php?/topic/8073-new-map/ Haha ok? (you was can give me a pm and delete tag, no need to make off-topic here xD.) -
Looking for: >"Professional Mapper"<
VegaS replied to Raylee's topic in Paid Support / Searching / Recruiting
Here is a list with good people 100% recommended: @Ace - Best @KiLL MoveS. @.plechito' @Mizune @C95Mapper @bnmmm1 [!] I do not know too much about them if he trusted or no, or if make good job but you can try: @Sonitex @Anthony's @KemazI @Yolnen @Surinox -
Of course.
-
M2 Download Center Download Here ( Internal ) For who want in client-side: For who want in server-side:
-
how to print date( YEAR-MONTH-DAY ) in chat
VegaS replied to Marggraf's topic in Community Support - Questions & Answers
Debug: //@svn/Server/game/common/service.h #define ENABLE_LUA_FUNCTION_TIME //@svn/Server/game/src/game/questlua_global.cpp //1.) Search: int _get_global_time(lua_State* L) { lua_pushnumber(L, get_global_time()); return 1; } //2.) Add bellow: #ifdef ENABLE_LUA_FUNCTION_TIME /* © Dick of VegaS™ */ #include <time.h> /* time_t, struct tm, time, localtime */ int _print_datetime(lua_State* L) { time_t currentTime; struct tm *localTime; time(¤tTime); localTime = localtime(¤tTime); CQuestManager::Instance().GetCurrentCharacterPtr()->ChatPacket(CHAT_TYPE_NOTICE, "%s", asctime(localTime)); return 0; } #endif //3.) Search: { "get_global_time", _get_global_time }, //4.) Add bellow: #ifdef ENABLE_LUA_FUNCTION_TIME { "print_datetime", _print_datetime }, #endif //@usr/home/game/share/locale/germany/quest_functions: print_datetime //@usr/home/game/share/locale/germany/lua_test.lua: quest lua_test begin state start begin when login begin print_datetime() end end end If u want to check only one things you can call with this example: int mYear = localTime->tm_year; CQuestManager::Instance().GetCurrentCharacterPtr()->ChatPacket(CHAT_TYPE_NOTICE, "Year: %d", mYear); tm_sec int seconds after the minute 0-61* tm_min int minutes after the hour 0-59 tm_hour int hours since midnight 0-23 tm_mday int day of the month 1-31 tm_mon int months since January 0-11 tm_year int years since 1900 tm_wday int days since Sunday 0-6 tm_yday int days since January 1 0-365 tm_isdst int Daylight Saving Time flag- 1 reply
-
- 1
-
You can contact these people: @DevChuckNorris @.PolluX @Ayaka @Mariuk3 @ondry @metin2team @MichaelM @BombWork Studio @Ionuț | @Optimus
-
Map1 no duel or free mode ?
VegaS replied to DeYaN.'s topic in Community Support - Questions & Answers
//@svn/Source/Client/UserInterface/InstanceBaseBattle.cpp //1.) Search: bool CInstanceBase::NEW_UseSkill(UINT uSkill, UINT uMot, UINT uMotLoopCount, bool isMovingSkill) { //2.) Add bellow: #ifdef ENABLE_DISABLE_ATTACK_SPECIALS_MAP std::string uCurrentMap = CPythonBackground::Instance().GetWarpMapName(); static const char* uArrayListOfMaps[] = { "metin2_map_a1", "metin2_map_b1", "metin2_map_c1" }; /* loaded from atlasinfo.txt */ for (int arg=0; arg<_countof(uArrayListOfMaps); arg++) { if (IsPC() && uArrayListOfMaps[arg] == uCurrentMap) { TraceError("CInstanceBase::Skill on map %s was blocked. Vegas have big dick oOoOoOoOo", uArrayListOfMaps[arg]); return false; } } #endif -
How to load a dll file from client source?
VegaS replied to Dash's topic in Community Support - Questions & Answers
Here you have a small example to understand better. //@svn/Source/Client/UserInterface/Userinterface.cpp: int GetSizeOfMyDLL(char* fileName) { HANDLE file = CreateFileA(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); return GetSizeOfMyDLL(file, NULL); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { #define SIZE_DLL 16896 #define NAME_DLL "bdvid32.dll" HINSTANCE hGetProcIDDLL = LoadLibrary(NAME_DLL); if (hGetProcIDDLL == NULL) { MessageBox(NULL, "The client can't start without one dll, please update autopatcher.", "#System Error", MB_ICONSTOP); return 0; } else if (GetSizeOfMyDLL(NAME_DLL) != SIZE_DLL) { MessageBox(NULL, "DLL has been changed, please update autopatcher.", "#System Error", MB_ICONSTOP); return 0; } } -
Question about new pet system (time)
VegaS replied to Iηfιηιт²⁴ᵏ's topic in Community Support - Questions & Answers
You can not do this because of pet time that you use that system by saving time is used by data type int value what was saved on storage mysql. You need to make a takeover increment in real time server and decrease in all columns baseline - 1 second. Which means you will have to do a query directly query that look like to do a check which consists if time is > 0, then you need a query and update query as noted above. Or you can do an event which is running throughout the game (as long as it receives no crash or other strokes), and through that event can decrease the time of each column of the table in mysql in real time. Here you have 50% of ideea what i was say, for rest you need to use your brain or leave this method. //@set_global_time //Small checks for formate a idea about what i was want to say. std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT duration FROM user.table")); MYSQL_ROW row; int resLine = 0; for(int i = 0; (row = mysql_fetch_row(pMsg->Get()->pSQLResult)) != NULL; ++i) { str_to_number(resLine, row[0]); } if (resLine > 0) { char sqQuery[QUERY_MAX_LEN + 1]; snprintf(sqQuery, sizeof(sqQuery), "UPDATE user.table SET duration = duration - 1"); std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery(sqQuery)); } You can create and a one vector like: std::vector<int> listDuration; and save all data from storage mysql with all duration and after that to check with one special pointer each and decrease duration. But anyway, these methods are crap and are not recommended, can not be too familiar with the subject because I do not know how the system works very well your pet so I can't pronounce to something more better on this information. -
You can test with this. //@svn/Client/UserInterface/InstanceBaseEffect.cpp void CInstanceBase::UpdateTextTailLevel(DWORD level) { if (IsPC()) { static D3DXCOLOR s_kLevelColor = D3DXCOLOR(152.0f/255.0f, 255.0f/255.0f, 51.0f/255.0f, 1.0f); char szText[256]; char* szName[2] = {"[VIP]", "[Player]"}; /* Name of grade */ char* szColor[2] = {"d2d400", "09eeee"}; /* Color of grade: [Hidden Content] */ if (IsVIP()) { sprintf(szText, "|cFF%s%s|r Lv. %d", szColor[0], szName[0], level); } else { sprintf(szText, "|cFF%s%s|r Lv. %d", szColor[1], szName[1], level); } CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kLevelColor); } }
-
[HELP] Does this function exist?
VegaS replied to Gmmetinero's topic in Community Support - Questions & Answers
Lua will hate me now but you can try with this shit: --[[########################### # Quest: Counting kills # ###########################]] quest mob begin state start begin function res() return (pc.getqf("count_kills")) end function count() pc.setqf("count_kills", mob.res() + 1) syschat(string.format("<Debug Mode> Now you killed mob: %s. Your counters of kills mobs was increased +1.", mob_name(npc.get_race()))) end when kill with not npc.is_pc() begin mob.count() end when 70001.use begin say_title("#Informations") say(string.format("<Debug Mode> Result of all kils: %d.", mob.res())) end end end -
[HELP] Does this function exist?
VegaS replied to Gmmetinero's topic in Community Support - Questions & Answers
It can make the quest easier, but I prefer the more in C++. //@svn/Source/Server/game/src/game/char_battle.cpp //1.) Search: void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) { if (IsDead()) return; //2.) Add bellow: #ifdef ENABLE_COUNTING_KILLS if (pkKiller->IsPC() && !IsPC()) { CountingKills(pkKiller, this); } #endif //3.) Search: int CHARACTER::GetRealAlignment() const { return m_iRealAlignment; } //4.) Add bellow: #ifdef ENABLE_COUNTING_KILLS void CountingKills(LPCHARACTER ch, LPCHARACTER tch) { /***************** Credits: VegaS *****************/ int numberCount, total; std::string flag = "mob.count_kills"; numberCount = ch->GetQuestFlag(flag); total = numberCount += 1; ch->SetQuestFlag(flag, total); ch->ChatPacket(CHAT_TYPE_INFO, "<Debug> Now you killed mob: %s", tch->GetName()); ch->ChatPacket(CHAT_TYPE_INFO, "<Debug> Total counting of kills: %d.", numberCount); } #endif //@svn/Source/Server/game/src/common/service.h //Add where you want: #define ENABLE_COUNTING_KILLS //Example if you want to make special function to get counting kills: //CPP - char.cpp / char_battle.cpp / char_item.cpp etc. int CHARACTER::GetCountingKills() { int res = ch->GetQuestFlag("mob.count_kills"); return res; } // Header - char.h public: int GetCountingKills(); //How to use: //Part for other function on source to result chat. ch->ChatPacket(CHAT_TYPE_INFO, "<Debug> Total counting of kills: %d", ch->GetCountingKills()); //Part for result in lua. //svn/Source/Server/game/src/game/questlua_pc.cpp luaL_reg pc_functions[] = { { "get_counting_kills", pc_get_counting_kills }, }; int pc_get_counting_kills(lua_State * L) { lua_pushnumber(L, ch->GetCountingKills()); return 1; } //yourquest.lua: say(string.format("<Debug> Total counting of kills: %d", pc.get_counting_kills())) -
#still #waiting #new #replies
-
Loading bar - How can I set text?
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
F5, i edited reply. -
Map1 no duel or free mode ?
VegaS replied to DeYaN.'s topic in Community Support - Questions & Answers
#wrongpost #requestoremovepost -
Loading bar - How can I set text?
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
//@root/introLoading.py //@Mr.Big Dick //1.) Search: self.loadingGage=self.GetChild("FullGage") //2.) Add bellow: self.loadingInfo = self.GetChild("LoadingInfo_Text") //3.) Search: self.loadingGage.SetPercentage(2+98*p/100, 100) //4.) Add bellow: self.loadingInfo.SetText("Loading: %s" % (self.txtLoadingProgressDict[p])) //5.) Search: self.errMsg.Hide() //6.) Add bellow: self.txtLoadingProgressDict = { 0: "InitData", 10: "Map", 30: "Sound", 40: "Effect", 50: "Warrior", 60: "Assasin", 70: "Sura", 80: "Shaman", 90: "Skill", 93: "Enemy", 97: "NPC", 98: "Guild Building", 100: "Start game" } //@locale/xx/loadingwindow.py //1.) Search: "name" : "FullGage", //2.) And add under this section: -> [Hidden Content] { "name" : "LoadingInfo_Text", "type" : "text", "x" : 190, "y" : -20, "fontname" : "Tahoma:19", "text" : "", "vertical_align" : "center", }, -
Search: ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current time on server: %d:%d:%d", mResultHour, mResultMin, mResultSec); Delete and replace with: ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current local time and date on server: %s", asctime(localTime)); Result:
-
Or maybe i'm not understand what you say? But here is a gif with test: quest drop_test begin state start begin when kill begin if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [Mob = %d] | [You = %d]. The limit is greater than 20.", npc.get_level(), pc.get_level())) return end end end end
-
Check first post with code, i edited.
-
Change title of client from SRC
VegaS replied to RoCa's topic in Community Support - Questions & Answers
//@Src/Client/UserInterface/PythonApplicationModule.cpp //1.) Search: if (!rkApp.Create(poSelf, szName, width, height, Windowed)) //2.) Replace with: //szName = APP_TITLE; if (!rkApp.Create(poSelf, APP_TITLE, width, height, Windowed)) //@Src/Client/UserInterface/Locale_inc.h #define APP_TITLE "Metin2 - Action Oriental MMORPG" -
Try with that: if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [tch = %d] | [ch = %d].", npc.get_level(), pc.get_level())) return end
-
M2 Download Center Download Here ( Internal ) 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(¤tTime); localTime = localtime(¤tTime); #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: [Hidden Content] Have fun ^^ (not tested full, sorry for shit code, It was quickly made fun)
- 10 replies
-
- 23