Jump to content

[40250] Reference Serverfile + Client + Src [15 Available Languages]


TMP4

Recommended Posts

: ChildLoop: AsyncSQL: query failed: Data truncated for column 'size' at row 1 (query: replace into mob_proto (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, 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, mob_color, 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 (101, "??", "Wild Dog", 0, 0, 0, 1,

 

how can i fix this i have it on all mobs i moved server to vps and this hapend...any fix?

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Contributor
14 hours ago, БlyatMAN said:

: ChildLoop: AsyncSQL: query failed: Data truncated for column 'size' at row 1 (query: replace into mob_proto (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, 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, mob_color, 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 (101, "??", "Wild Dog", 0, 0, 0, 1,

 

how can i fix this i have it on all mobs i moved server to vps and this hapend...any fix?

2022.12.15: - Changed sql_mode in the VM from sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES to
              sql_mode=NO_ENGINE_SUBSTITUTION in /usr/local/my.cnf to prevent DATA TRUNCATED errors with MySQL56.
Quote

- How to install it in a VPS?
    1. Get a VPS with FreeBSD 13.1 or greater (you can use older FreeBSD if you recompile everything in that version)
    2. If root login not enabled then enable it: ee /etc/ssh/sshd_config
       and edit "#PermitRootLogin no" to "PermitRootLogin yes" (press esc and save it), then reboot or /etc/rc.d/sshd restart
    3. pkg install mysql56-server python27 (it will ask to install tke pkg itself too, type yes)
    4. add mysql_enable="yes" to /etc/rc.conf then reboot or start mysql via service mysql-server start
    5. It is highly recommended to modify sql_mode from sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES to
       sql_mode=NO_ENGINE_SUBSTITUTION in your /usr/local/my.cnf then restart the server, or you will have DATA TRUNCATED errors.
       If you don't have that file, just create it, here's the content you should put: https://pastebin.com/xNsP6pVA

    6. Upload the metin2_server+src.tar.gz to /usr and extract it: cd /usr && tar -xf metin2_server+src.tar.gz
    7. Stop mysql via service mysql-server stop and delete the var/db/mysql: rm-rf /var/db/mysql
       Upload the metin2_mysql.tar.gz to /var/db and extract it: cd /var/db && tar -xf metin2_mysql.tar.gz
       Start mysql via service mysql-server start or you can reboot too
       (You can install the database via the provided mysql_dump_too and run the .sql files if you prefer that way)
    8. Start your server via cd /usr/metin2/server && sh start.sh
 

Edited by TMP4
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

  • Contributor
26 minutes ago, RobinHoodye said:

Hello! i use this base i have a short question it's necesary another program to use in gen portmap or someting ? i have open all ports in router but me friend cant connect it's offline for this 

https://www.yougetsignal.com/tools/open-ports/ <-- You can check here if you successfully opened the ports or not. It's not about Metin2 and this serverfile, but networking question.

(No need for portmap.)

Link to comment
Share on other sites

On 6/5/2022 at 10:02 PM, Xanou said:

Okay, so I just have to make my changes in the source then send it to my server instead of the old one and compile with the server?

ports are open i check all and all apare to open firewall it's disable me ip it's static but no working,a lot of days i trying a lot of solution withous result

Link to comment
Share on other sites

  • Contributor
1 hour ago, RobinHoodye said:

ports are open i check all and all apare to open firewall it's disable me ip it's static but no working,a lot of days i trying a lot of solution withous result

If you send your IP address in DM in the next hour I can check if the ports are open and If I'm able to connect.
To get through the charselect, you need to use PROXY_IP in CONFIG files, but that's not related to the ports, I just write it if you don't know.

Link to comment
Share on other sites

https://www.yougetsignal.com/tools/open-ports/ this site apare to be closed all port but i have Miscreated server with 64090 port 🙂 same closed and all can join on server idk i set correclty all port but cant opening in this site

 

j2nwPRd.png

i have all ports open in config serverfiles have this

FocKYys.png

i have something wrong here?? 

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor
6 hours ago, RobinHoodye said:

https://www.yougetsignal.com/tools/open-ports/ this site apare to be closed all port but i have Miscreated server with 64090 port 🙂 same closed and all can join on server idk i set correclty all port but cant opening in this site

 

j2nwPRd.png

i have all ports open in config serverfiles have this

i have something wrong here?? 

On second picture we can see your public ip. Remove it. Also if you leave the # it's commented -> not active.

I can't tell if your router configuration is ok or not, but if the ports seems to be closed with port checker, then it's wrong.
192.168.1.218 is your VM's ip? You need to put there your VM's ip, not your desktop's ip.

Link to comment
Share on other sites

Hello, I wanted to use this base to experiment and learn about m2 server stuff, want to ask, i bought a vps on Contaro, and installed FreeBSD 13.1, and after running "pkg install mysql56-server python27", as stated in your "How to install on VPS" guide in FAQ.txt, this shows up, what would you recommend me do with these?

 

=====
Message from groff-1.22.4_4:

--
In order to be able to use the html driver, you need to install the following
packages:
 - ghostscript
 - netpbm
=====
Message from mysql56-client-5.6.51:

--
Please be aware the database client is vulnerable
to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM".
You may find more information at the following URL:

http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html

Although this database client is not listed as
"affected", it is vulnerable and will not be
receiving a patch. Please take note of this when
deploying this software.
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Upstream support ended in February 2021.

It is scheduled to be removed on or after 2023-06-30.
=====
Message from mysql56-server-5.6.51:

--
Please keep in mind that the default location for my.cnf will be changed
from "/var/db/mysql/my.cnf" to "/usr/local/etc/mysql/my.cnf" in the near
future.  If you do not want to move your my.cnf to the new location then
you must set "mysql_optfile" in /etc/rc.conf to "/var/db/mysql/my.cnf".
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Upstream support ended in February 2021.

It is scheduled to be removed on or after 2023-06-30.
=====
Message from python27-2.7.18_2:

--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

EOLed upstream.

It is scheduled to be removed on or after 2020-12-31.

Thanks lots in advance.

Link to comment
Share on other sites

  • Contributor
13 minutes ago, withheld said:

Hello, I wanted to use this base to experiment and learn about m2 server stuff, want to ask, i bought a vps on Contaro, and installed FreeBSD 13.1, and after running "pkg install mysql56-server python27", as stated in your "How to install on VPS" guide in FAQ.txt, this shows up, what would you recommend me do with these?

 

=====
Message from groff-1.22.4_4:

--
In order to be able to use the html driver, you need to install the following
packages:
 - ghostscript
 - netpbm
=====
Message from mysql56-client-5.6.51:

--
Please be aware the database client is vulnerable
to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM".
You may find more information at the following URL:

http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html

Although this database client is not listed as
"affected", it is vulnerable and will not be
receiving a patch. Please take note of this when
deploying this software.
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Upstream support ended in February 2021.

It is scheduled to be removed on or after 2023-06-30.
=====
Message from mysql56-server-5.6.51:

--
Please keep in mind that the default location for my.cnf will be changed
from "/var/db/mysql/my.cnf" to "/usr/local/etc/mysql/my.cnf" in the near
future.  If you do not want to move your my.cnf to the new location then
you must set "mysql_optfile" in /etc/rc.conf to "/var/db/mysql/my.cnf".
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Upstream support ended in February 2021.

It is scheduled to be removed on or after 2023-06-30.
=====
Message from python27-2.7.18_2:

--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter
--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

EOLed upstream.

It is scheduled to be removed on or after 2020-12-31.

Thanks lots in advance.

Nothing? These notices are totally normal. Yes they're old and deprecated but it is what it is if you want to run a ~19 years old game :kekw:

If you modify make.py for python3.x compatibility you can use latest python package instead of 2.7. For MySQL, it is possible to update the source to 5.7/8.0 but that is more difficult.

Edited by TMP4
Link to comment
Share on other sites

4 minutes ago, TMP4 said:

Nothing? These notices are totally normal. Yes they're old and deprecated but it is what it is if you want to run a ~19 years old game :kekw:

If you modify make.py for python3.x compatibility you can use latest python package instead of 2.7. For MySQL, it is possible to update the source to 5.7/8.0 but that is more difficult.

Expected as such , but wanted to make sure that it won't automatically removed itself based on the warnings and whatnot, my limited BSD experience is gonna be pain here :kekw:

  • kekw 1
Link to comment
Share on other sites

  • Contributor
4 hours ago, БlyatMAN said:

on vps i have this problem : ReadSpecialDropItemFile: ReadSpecialDropItemFile : there is no item 경험치 : node 금장보물상

but on local all is good and purfect.....any fix?

If protos exists, then I suspect the encoding, because it is in 'good' korean letters: '경험치'.
Either the special_item_group.txt or the item_proto.txt have different encoding.

Compare it with local and check encodings.

Edited by TMP4
Link to comment
Share on other sites

4 hours ago, TMP4 said:

If protos exists, then I suspect the encoding, because it is in 'good' korean letters: '경험치'.
Either the special_item_group.txt or the item_proto.txt have different encoding.

Compare it with local and check encodings.

So how i check that?the encoding i know where to find but how i know its the right one

Link to comment
Share on other sites

  • Premium

Hello guys! Hello TMP4, I have this problem which Im trying to solve for 3 days now, i cant make the green/normal enchants and reinforges stackable,dropable and also i cant sell on "My private shop". For normal enchants, when I changed the values to NONE it let me drop,trade and sell on private shop but i cant stack them from inventory. Also, the normal ones when picked from the ground its stacking (happens the same when values not changed at all) but when you divide them and try to stack again you cant( also, if you divide them you cant drop/trade them again :))) if values changed ). The Green ones only drops and trade, they dont even stack when picked from the ground. I tried everything in item_proto.txt ( ITEM_STACKBLE in place of ANTI_STACK or NONE everywhere and also i just tried with the number 4 or 8196). None of these works. Also i did the same changes in locale when i worked on vps's item proto.

How can i do this? Im just desperate and i dont want to throw away this beautiful resources that i have from you sir!

Thanks!

Sorry for my bad english 😄 Cheers!

Quote

 Green Magic/reinforge

71151    ¿¬Àç°æºñ¼­    ITEM_USE    USE_CHANGE_ATTRIBUTE    1    ANTI_DROP | ANTI_SELL | ANTI_STACK    LOG    NONE    NONE    0    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0
71152    ¿¬Àç°¡ºñ¼­    ITEM_USE    USE_ADD_ATTRIBUTE    1    ANTI_DROP | ANTI_SELL | ANTI_STACK    LOG    NONE    NONE    0    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0 

Normal Enchant/reinforge

39028    Àç°æºñ¼­    ITEM_USE    USE_CHANGE_ATTRIBUTE    1    ANTI_DROP | ANTI_SELL | ANTI_MYSHOP    ITEM_STACKABLE | LOG    NONE    NONE    0    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0
39029    Àç°¡ºñ¼­    ITEM_USE    USE_ADD_ATTRIBUTE    1    ANTI_DROP | ANTI_SELL | ANTI_MYSHOP    ITEM_STACKABLE | LOG    NONE    NONE    0    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0

 

 

Link to comment
Share on other sites

  • Contributor
On 5/21/2023 at 1:14 PM, Nuzzo said:

Is it possible that there is a problem with EimmuneFlags?
If I assign POISON to a mob, it still gets poisoned.

Yes, everyone. Because Ymir did not do anything with that immuneflag. If you scan the source, only the TERROR is actually used. It is a guess, but I think they only made this for visual, if they set resist_poison (what is working and they use it), they ticked POISON in the immuneflag to have visual, maybe for wiki import or similar reason.

But if you wanna make POISON immune actually works on mob, of course you can do it.

char_resist.cpp find:

	/*if (IsImmune(IMMUNE_POISON))
	  return;*/

(if you don't have this because you removed comments and unused codes then just place it to top of the func of CHARACTER::AttackedByPoison)

edit:

 	if (!IsPC() && IsImmune(IMMUNE_POISON))
	  return;

IsImmune does not do 100% immune, only 90%. If you wanna have 100% then edit this:

bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
	if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
	{
		int immune_pct = 90;
		int	percent = number(1, 100);

		if (percent <= immune_pct)	// 90% Immune
		{
			if (test_server && IsPC())
				ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); 

			return true;
		}
		else
		{
			if (test_server && IsPC())
				ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s)", GetName());

			return false;
		}
	}

	if (test_server && IsPC())
		ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());

	return false;
}

to this:

bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
	if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
	{
		if (test_server && IsPC())
			ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); 

		return true;
	}

	if (test_server && IsPC())
		ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());

	return false;
}

Keep in mind other functions uses IsImmune too so you'll have 100% immune everywhere.

Edited by TMP4
  • Love 1
Link to comment
Share on other sites

38 minutes ago, TMP4 said:

Yes, everyone. Because Ymir did not do anything with that immuneflag. If you scan the source, only the TERROR is actually used. It is a guess, but I think they only made this for visual, if they set resist_poison (what is working and they use it), they ticked POISON in the immuneflag to have visual, maybe for wiki import or similar reason.

But if you wanna make POISON immune actually works on mob, of course you can do it.

char_resist.cpp find:

	/*if (IsImmune(IMMUNE_POISON))
	  return;*/

(if you don't have this because you removed comments and unused codes then just place it to top of the func of CHARACTER::AttackedByPoison)

edit:

 	if (!IsPC() && IsImmune(IMMUNE_POISON))
	  return;

IsImmune does not do 100% immune, only 90%. If you wanna have 100% then edit this:

bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
	if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
	{
		int immune_pct = 90;
		int	percent = number(1, 100);

		if (percent <= immune_pct)	// 90% Immune
		{
			if (test_server && IsPC())
				ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); 

			return true;
		}
		else
		{
			if (test_server && IsPC())
				ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s)", GetName());

			return false;
		}
	}

	if (test_server && IsPC())
		ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());

	return false;
}

to this:

bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
	if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
	{
		if (test_server && IsPC())
			ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); 

		return true;
	}

	if (test_server && IsPC())
		ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());

	return false;
}

Keep in mind other functions uses IsImmune too so you'll have 100% immune everywhere.

Thank you very much for your answer.

Is there a possibility of having immunities to slowdown or stun instead?

Edited by Nuzzo
Link to comment
Share on other sites

  • Contributor
1 minute ago, Nuzzo said:

I thank you for your answer, so if in addition to:

if (IsImmune(IMMUNE_POISON)) 
return;

I would add for example:

if (IsImmune(IMMUNE_SLOW)) 
return;

I could give slowdown immunity?

To where? To AttackedByPoison function? No, don't extend that with IMMUNE_SLOW 😄 And don't remove !IsPC() from the if, or you'll ruin poison immunity to players.

Slow and stun does not have their own function because they don't need calculation, they're only used in battle.cpp here:

	AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN,  AFFECT_STUN, POINT_NONE,        0, AFF_STUN, iStunDuration, "STUN");
	AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");

Edit it like this:

	if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(IMMUNE_STUN)))
	{
		AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN,  AFFECT_STUN, POINT_NONE,        0, AFF_STUN, iStunDuration, "STUN");
	}
	if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(AFFECT_SLOW)))
	{
		AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");
	}

 

Link to comment
Share on other sites

8 minutes ago, TMP4 said:

To where? To AttackedByPoison function? No, don't extend that with IMMUNE_SLOW 😄 And don't remove !IsPC() from the if, or you'll ruin poison immunity to players.

Slow and stun does not have their own function because they don't need calculation, they're only used in battle.cpp here:

	AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN,  AFFECT_STUN, POINT_NONE,        0, AFF_STUN, iStunDuration, "STUN");
	AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");

Edit it like this:

	if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(IMMUNE_STUN)))
	{
		AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN,  AFFECT_STUN, POINT_NONE,        0, AFF_STUN, iStunDuration, "STUN");
	}
	if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(AFFECT_SLOW)))
	{
		AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");
	}

 

Yes sorry, I saw your answer from my phone, I didn't have the code in sight.
I didn't quite remember the whole function of that code😆

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.