How to check if target is a boss?

Protos

Core Developers
Messages
236
Points
0
Age
35
IRC Nickname
smoke
Github
smokexyz
Emulator
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!

 
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.

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

Code:
gef_dun02,0,0,0,0	boss_monster	Doppelganger	1046,1,7200000,600000,1
you can check with
Code:
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)
 
Code:
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;	}}
Code:
ACMD_DEF(chkmvp),
 
Thank you v much guys,

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

 
Back
Top