Jump to content
  • 0
Sign in to follow this  
Protos

How to check if target is a boss?

Question

I'm trying to check if the target is a boss (MVP) mob, is_boss(bl) returns the mode which is also used for mini bosses, I need to check if the bl is MVP only. Thank you and any help is much appreciated!

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

A nifty way of doing that in scripting is checking if the mob has MvP experience to deliver when killed.

 

I'm not that good on source but you could find a way to test if that assumption still works for SRC. It should, too.

Share this post


Link to post
Share on other sites
  • 0

if your mob is guaranteed to have spawned from a 'boss' flag e.g.

gef_dun02,0,0,0,0	boss_monster	Doppelganger	1046,1,7200000,600000,1
you can check with
if( md->spawn && md->spawn->state.boss )
(note that you can't check directly to md->spawn->state.boss because some mobs do not have md->spawn, so checking both is a must (otherwise it'll crash)

Share this post


Link to post
Share on other sites
  • 0
ACMD(chkmvp) {	if( !message || !*message ) {		clif->message( fd, "empty" );		return false;	}	else if ( mob->db( atoi(message) )->mexp ) {		clif->message( fd, "This is a MVP" );		return true;	}	else {		clif->message( fd, "No mobs or not MVP" );		return true;	}}
ACMD_DEF(chkmvp),

Share this post


Link to post
Share on other sites
  • 0

Thank you v much guys,

 

I've used db->mexp for now as ->spawn->state.boss would only work for scripted spawns.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.