Jump to content

notice guild.get_name


Go to solution Solved by Mali,

Recommended Posts

  • 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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.