ok, what event would i put that in?
I see you define your own sub, i didnt even know you could do that
also does the npc getting the list automatically set a target?
Like would this be the correct usage
Sorry for being dumb, i cant exactly tell whats going on in the code.
Not sure how i can then use that code to get a target in the hatelist on either the npc with the hatelist code or the casting npc.
Would you guys be able to explain your sub better or help me do it an easier way with getentity list and randomhate?
Code:
sub EVENT_TIMER {
my $range = 120; #maximum number
my $minimum = 60; #minimum number
my $random_number = int(rand($range)) + $minimum; #generate a number between $minimum and $range
if (($timer eq "CastPlague" ) && (defined($entity_list->GetNPCByNPCTypeID(999426))))
{
hate_clone(999426, 2700253); #target player on hatelist
plugin::CastOnTarget(21480); #Virulent Plague
quest::shout("You cannot defeat our mother!!!");
quest::settimer("CastPlague", $random_number);
}
}