Thread: Quest question.
View Single Post
  #20  
Old 05-04-2015, 05:43 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

Okay trying to get this to only fire off if the client is level 20 or above, however it works just fine without the if($ulevel >19)
Code:
sub EVENT_DEATH {
     if ($ulevel > 19){
	my @hate_list = $npc->GetHateList();
	my $hate_count = @hate_list;
	if ($hate_count > 0) {
		foreach $ent (@hate_list) {
			$hate_entity = $ent->GetEnt();
			$hate_client = $hate_entity->CastToClient();
			if (($hate_entity->IsClient()) && (!$hate_client->IsBecomeNPC())) {
				$hate_client->SetEXP($hate_client->GetEXP(),($hate_client->GetAAExp()+1000));
                                }
			}
		}
	}
}
Reply With Quote