Jump to content

Recommended Posts

Hello, I'm trying to make a notice that when you kill Beran it will say: "name of player's guild" has killed Beran"

I tried this but doesn't work:

notice_all(""..guild.get_name().." has killed Beran!")

 

Edited by Cripplez
Solved
Link to comment
https://metin2.dev/topic/22982-notice-guildget_name/
Share on other sites

  • Honorable Member
  • Solution
42 minutes ago, Cripplez said:

Hello, I'm trying to make a notice that when you kill Beran it will say: "name of player's guild" has killed Beran"

I tried this but doesn't work:

notice_all(""..guild.get_name().." has killed Beran!")

 

You need an argument like: guild.get_name(pc.get_guild())

	if pc.hasguild() then
		notice_multiline(string.format("%s has killed Beran!", guild.get_name(pc.get_guild())), notice_all)
	end

If you want to do with src,

Find in char_battle.cpp:

	if (true == IsMonster() && 2493 == GetMobTable().dwVnum)
	{
		if (NULL != pkKiller && NULL != pkKiller->GetGuild())
		{
			CDragonLairManager::instance().OnDragonDead( this, pkKiller->GetGuild()->GetID() );
		}
		else
		{
			sys_err("DragonLair: Dragon killed by nobody");
		}
	}

Change:

	if (true == IsMonster() && 2493 == GetMobTable().dwVnum)
	{
		if (NULL != pkKiller && NULL != pkKiller->GetGuild())
		{
			CDragonLairManager::instance().OnDragonDead( this, pkKiller->GetGuild()->GetID() );
			///msg
			char buffer[25+13+25];
			snprintf(buffer,sizeof(buffer), "[GUILD]%s has killed %s.", pkKiller->GetGuild()->GetName(), GetName());
			SendNotice(buffer);
			//end msg
		}
		else
		{
			sys_err("DragonLair: Dragon killed by nobody");
		}
	}

 

Edited by Mali61
  • Love 1

 

Link to comment
https://metin2.dev/topic/22982-notice-guildget_name/#findComment-124376
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.