View Single Post
  #2  
Old 05-22-2013, 01:47 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can just use GetLevel(), which is listed here:

http://www.eqemulator.net/wiki/wikka...a=QuestObjects

It is under mob class, so you can use it on anything.

Code:
my $SPELL_ID 	= quest::ChooseRandom(12505, 12506, 12507);
my $NPC_TARGET 	= $npc->GetTarget();
my $TARGET_LEVEL 	= 0;
if ($NPC_TARGET)
{
$TARGET_LEVEL 	= $NPC_TARGET->GetLevel();
my $TARGET_ID	= $NPC_TARGET->GetID();
$npc->CastSpell($SPELL_ID,$TARGET_ID);
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote