-
Posts
134 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by IceShiva
-
-
Of course you can use great lib created by imer for extending functionality of precompiled binaries
Here you have orginal topic:
https://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2754769-libm2-libgame-sdk.html
but using old game is not recommended since source is available. Fixing all posible bug is insane. Additionally you must keep your game unchanged because you can unfortunally change function offsets, so this method is very intrusive.
- 1
-
you can recompile kernel with pae option or use 64bit freebsd and 32bit jail inside your 64bit freebsd, when you'll use jail restriction about memory is omited since you use 64bit kernel. Just search info about "cbsd"
-
Which gcc version did you use on working core
btw
QuoteTo avoid run-time errors that are difficult to detect and diagnose, we recommend that you never statically link to binaries that were compiled by using different versions of the compiler. Also, when you upgrade an EXE or DLL project, make sure to upgrade the libraries that it links to. If you're using CRT (C Runtime) or STL (Standard Template Library) types, don't pass them between binaries (including DLLs) that were compiled by using different versions of the compiler.
You can of course replace keyworks like EXE to ELF DLL to shared object regardless
Additionally you dont have correctly setuped flags for producting debug builds in you makefile.
-
Which gcc version did you use?
-
Check your ITEM_ID_RANGE in db.conf
-
Yes because they don't have enough amount of players ( i don't know why ).
As never before. Polish servers are affected to. -
Check if you dont use long thread blocking functions like queries or something like that.
-
3 hours ago, Moț said:1 hour ago, derprengel said:
kimsufi and soyoustart dont allow freebsd just Linux...
Try Azure. But you need to know how to run metin2 server over nat.
-
just wait a second i will edit this post with video
i dont have video anymore, if you have 3ds and teamviewer i can show you- 1
-
On 8/25/2018 at 5:53 PM, FlorinMarian said:
Thank you very much but in this way doesn't work because cannot bind on this IP.
You dont need to bind port on external ip, youmust still use you internal ip.
-
If you want compile source to 64bit binary you need to change things at post above but if you want compile 32bit binary under x64 FreeBSD let use 32bit jail of FreeBSD inside x64 FreeBSD.
- 1
-
54 minutes ago, masodikbela said:
In Hungary players sometimes complaining about that they cant start their clients on WinXP
It's most cases that are crt's problems. Now Microsoft have new crt implemantation that may be not compatibile with older than vista system (like Windows XP, Windows Server 2003). Ofc if client bin is compiled under vc14+. According to this
https://support.efolder.net/hc/en-us/articles/115010659028-VC-Redistributable-UCRT-Requirements-
-
desc_client.cpp in void CLIENT_DESC::SetPhase(int iPhase) edit
if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, g_szPublicIP, 16); // set you external ip instead g_szPublicIP DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); }
or you can do it in client side at NetAddress.cpp
void CNetworkAddress::GetIP(char* szIP, int len) { BYTE IPs[4]; *((DWORD*)IPs)=m_sockAddrIn.sin_addr.s_addr; _snprintf(szIP, len, "%d.%d.%d.%d", IPs[0], IPs[1], IPs[2], IPs[3]); // replace with you external server ip }
- 1
-
it's cache flushing trigger. Called every ITEM_CACHE_FLUSH_SECONDS from config.txt or if you dont have it in config then default 1800 second is setted
-
Goto desc_client.cpp and change twice g_szPublicIP with you external ip
-
it depends... What hardware youre using
-
I can do it with all known streams (mms, rtps, http, rttp)
-
What dll?
-
Can be done with remove filenames from index. Files can be still unpacked but without filenames, extension so extracted files will be useless. Just one minus, you too can't extract files but it isn't problem if you have files. When I find some time i will create tutorial how to make it
-
If you want use FreeBSD on kvm you need specific host configuration.
-
Just update you gdb to latest version (pkg install gdb710)
and try with new version "gdb710"
-
Hello. Yesterday I have to measure exp table on server, so I decidet to move exp table from array to mysql to avoid recompile every time.
Go to constant.cpp and delete:
Spoilerconst DWORD * exp_table = NULL; const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1] = { 0, // 0 100, 150, 260, 380, 600, 1300, 3300, 5700, 8700, 12800, // 10 18000, 25000, 36000, 52000, 73000, 100000, 125000, 160000, 220000, 280000, // 20 370000, 540000, 670000, 880000, 1000000, 1237000, 1418000, 1624000, 1857000, 2122000, // 30 2421000, 2761000, 3145000, 3580000, 4073000, 4632000, 5194000, 5717000, 6264000, 6837000, // 40 7600000, 8274000, 8990000, 9753000, 10560000, 11410000, 12320000, 13270000, 14280000, 15340000, // 50 16870000, 18960000, 19980000, 21420000, 22930000, 24530000, 26200000, 27960000, 29800000, 32780000, // 60 36060000, 39670000, 43640000, 48000000, 52800000, 58080000, 63890000, 70280000, 77310000, 85040000, // 70 93540000, 102900000, 113200000, 124500000, 137000000, 150700000, 165700000, 236990000, 260650000, 286780000, // 80 315380000, 346970000, 381680000, 419770000, 461760000, 508040000, 558740000, 614640000, 676130000, 743730000, // 90 1041222000, 1145344200, 1259878620, 1385866482, 1524453130, 1676898443, 1844588288, 2029047116, 2100000000, // 99 99레벨일 때 필요경험치 (100레벨이 되기 위한) 2100000000, // 100 2100000000, 2100000000, 2100000000, 2100000000, 2100000000, // 105 2100000000, 2100000000, 2100000000, 2100000000, 2100000000, // 110 2100000000, 2100000000, 2100000000, 2100000000, 2100000000, // 115 2100000000, 2100000000, 2100000000, 2100000000, 2100000000, // 120 }; const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1] = { 0, // 0 300, 800, 1500, 2500, 4300, 7200, 11000, 17000, 24000, 33000, // 10 43000, 58000, 76000, 100000, 130000, 169000, 219000, 283000, 365000, 472000, // 20 610000, 705000, 813000, 937000, 1077000, 1237000, 1418000, 1624000, 1857000, 2122000, // 30 2421000, 2761000, 3145000, 3580000, 4073000, 4632000, 5194000, 5717000, 6264000, 6837000, // 40 7600000, 8274000, 8990000, 9753000, 10560000, 11410000, 12320000, 13270000, 14280000, 15340000, // 50 16870000, 18960000, 19980000, 21420000, 22930000, 24530000, 26200000, 27960000, 29800000, 32780000, // 60 36060000, 39670000, 43640000, 48000000, 52800000, 58080000, 63890000, 70280000, 77310000, 85040000, // 70 93540000, 102900000, 113200000, 124500000, 137000000, 150700000, 165700000, 236990000, 260650000, 286780000, // 80 315380000, 346970000, 381680000, 419770000, 461760000, 508040000, 558740000, 614640000, 676130000, 743730000, // 90 1041222000, 1145344200, 1259878620, 1385866482, 1524453130, 1676898443, 1844588288, 2029047116, 2050000000, // 99레벨 일 때 필요경험치 (100레벨이 되기 위한) 2150000000, // 100 2210000000, 2250000000, 2280000000, 2310000000, 2330000000, // 105 2350000000, 2370000000, 2390000000, 2400000000, 2410000000, // 110 2420000000, 2430000000, 2440000000, 2450000000, 2460000000, // 115 2470000000, 2480000000, 2490000000, 2490000000, 2500000000, // 120 }; const DWORD exp_table_newcibn[PLAYER_EXP_TABLE_MAX + 1 ] = { 300, // 0 800, // 1 1500, 2500, 4300, 7200, 11400, 17000, 24000, 33000, 46000, // 10 62000, 83000, 111000, 149000, 200000, 268000, 360000, 482000, 647000, 868000, // 20 996000, 1143000, 1312000, 1506000, 1729000, 1984000, 2277000, 2614000, 3000000, 3443000, // 30 3952000, 4536000, 5206000, 5975000, 6858000, 7730000, 8504000, 9307000, 10140000, 11330000, // 40 12320000, 13370000, 14490000, 15670000, 16920000, 18240000, 19630000, 21090000, 22630000, 24670000, // 50 26890000, 29310000, 31950000, 34820000, 37960000, 41370000, 45100000, 49160000, 53580000, 58400000, // 60 63660000, 69390000, 75630000, 82440000, 89860000, 97950000, 106760000, 136370000, 151800000, 168300000, // 70 250000000, 340000000, 450000000, 570000000, 690000000, 810000000, 912600000, 1004000000, 1094000000, 1182000000, // 80 1269000000, 1354000000, 1438000000, 1521000000, 1603000000, 1684000000, 1764000000, 1844000000, 1922000000, 2000000000, // 90 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, // 99 99레벨일 때 필요경험치 (100레벨이 되기 위한).. 현재 CIBN이 어떻게 운영하고 있는 지 모르니 신규 테이블을 쓰지 않고 기존값 계속 연장 유지 2000000000, // 100 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, // 105 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, // 110 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, // 115 2000000000, 2000000000, 2000000000, 2000000000, 2000000000, // 120 };
2. Go to constants.h and delete
Spoilerextern const DWORD* exp_table;
then add
typedef std::vector<long long> exp_vec; extern exp_vec exp_vector; bool LoadExpTableFromMYSQL(void);
3. Go to constants.cpp and add on last line or whatever you want in file
#include "db.h" #include "dev_log.h" exp_vec exp_vector; bool LoadExpTableFromMYSQL(void) { char szCountQuery[64]; char szExp[64]; sprintf(szCountQuery, "%s", "SELECT COUNT(level) FROM common.exp_table"); sprintf(szExp, "%s", "SELECT exp FROM common.exp_table"); std::auto_ptr<SQLMsg> pCountQuery(DBManager::Instance().DirectQuery(szCountQuery)); if (pCountQuery.get() == NULL) { sys_err("Failed to fetch level count from mysql! Check table or database."); pCountQuery.release(); pCountQuery.reset(); return false; } std::auto_ptr<SQLResult> pRes(pCountQuery.get()->Get()); if (pRes->uiNumRows > 0) { MYSQL_ROW row = mysql_fetch_row(pRes.get()->pSQLResult); int level = 0; str_to_number(level, row[0]); exp_vector.reserve(level); sys_log(0, "ExpTable reserved for %d levels", level); pCountQuery.release(); pRes.release(); pCountQuery.reset(); pRes.reset(); } std::auto_ptr<SQLMsg> pExp(DBManager::Instance().DirectQuery(szExp)); if (pExp.get() == NULL) { sys_err("Failed to fetch level count from mysql! Check table or database."); pExp.release(); pExp.reset(); return false; } std::auto_ptr<SQLResult> pRes2(pExp.get()->Get()); if (pRes2->uiNumRows > 0) { for (uint uiRow = 0; uiRow != pRes2->uiNumRows; ++uiRow) { MYSQL_ROW row = mysql_fetch_row(pRes2->pSQLResult); long long exp = 0; str_to_number(exp, row[0]); exp_vector.push_back(exp); sys_log(0, "Pushing exp %d to exp_vector", exp); } pExp.release(); pExp.reset(); pRes2.release(); pRes2.reset(); return true; } return false; }
4. Go to static void __LocaleService_Init_Korea() in locale_service.cpp and delete exp_table = exp_table_euckr;
static void __LocaleService_Init_YMIR() delete exp_table = exp_table_euckr; static void __LocaleService_Init_Singapore() delete exp_table = exp_table_newcibn; static void __LocaleService_Init_Vietnam() delete exp_table = exp_table_newcibn;
void LocaleService_TransferDefaultSetting() change
if (!exp_table) exp_table = exp_table_common;
to
if(!LoadExpTableFromMYSQL()) { sys_err("Failed to load exp table from mysql!"); exit(1); }
char.cpp CHARACTER::GetNextExp() const
change exp_table to exp_vector
questlua_pc.cpp int pc_give_exp_perc(lua_State* L)
change exp_table to exp_vector
and int pc_get_exp_perc(lua_State* L)
change exp_table to exp_vector
Thats all.
Code can be refactored.
Written in 10min
- 6
- 4
- 11
-
Better alternative to this tutorial is use GhostBSD distro with "mate" desktop enviroment
PRoject home http://www.ghostbsd.org/
-
Client freeze
in Community Support - Questions & Answers
Posted
What a hell is IG?