View Single Post
  #1  
Old 03-14-2021, 10:59 PM
Bytebait
Sarnak
 
Join Date: Oct 2014
Location: Colorado
Posts: 74
Default GetLevel() of target in perl?

How can I get the target of a NPC/MOB that isn't in combat, only targeted by the client? I see how to grab the entity on a hate list but not while out of combat.

I would like to make an item that 'warns' the player how deep into red an encounter is.

something like so. But I don't know what $targeted is.
Code:
sub EVENT_ITEM_CLICK{

$mob_level = $targeted->GetLevel();
$client->Message(15, "The mob is level " + $mob_level + " .");

}
Reply With Quote