Quote:
Originally Posted by Reynin89
Ahhh great thank you Akkadian!
|
Also forgot about your $timer object, it needs to be $timer. See an example script below.
Code:
sub EVENT_SPAWN{
my $npc_name = $npc->GetCleanName();
quest::gmsay("$npc_name has spawned in [$zoneln]");
quest::shout("I have slain many Iksar and any tribe that defies our goals, you mortals know nothing about what is the truth!");
$npc->CameraEffect(2000, 5);
quest::settimer("repeatsay",600);
quest::doanim(44);
}
sub EVENT_TIMER{
if ($timer eq "repeatsay"){
quest::shout("I have slain many Iksar and any tribe that defies our goals, you mortals know nothing about what is the truth!");
$npc->CameraEffect(2000, 5);
quest::stoptimer("repeatsay");
quest::settimer("repeatsay",600);
quest::doanim(44);
}
}
sub EVENT_COMBAT
{
my $npc_name = $npc->GetCleanName();
if($combat_state == 1)
{
$NextActivate = 90;
$StartNPCID = 2328802;
quest::gmsay("$npc_name has been engaged");
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::setnexthpevent(90);
quest::shout("You dare challenge our existence? The Sethos will never have patience for you...");
$npc->CameraEffect(2000, 7);
quest::stoptimer("repeatsay");
}
if($combat_state == 0)
{
quest::say("You mortals are so pathetic.");
$npc->CameraEffect(2000, 7);
quest::settimer("repeatsay", 600);
plugin::MobHealPercentage(100);
}
}
sub EVENT_HP
{
if ($hpevent == $NextActivate)
{
$NextActivate -= 10;
$StartNPCID += 1;
quest::setnexthpevent($NextActivate);
quest::signalwith($StartNPCID, 10, 10);
quest::shout("How about fighting some old friends of yours maybe?");
$npc->CameraEffect(2000, 3);
}
}
sub EVENT_SLAY{
quest::say("Hmm another $race at my feet, weak mortal...");
}
sub EVENT_DEATH{
my $npc_name = $npc->GetCleanName();
quest::gmsay("$npc_name has been slain in [$zoneid] : [$zoneln]");
}