View Single Post
  #7  
Old 04-17-2009, 04:01 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is an example from a simple script on my server:

Code:
my $x;
my $y;
my $z;
my $h;

sub EVENT_SPAWN {
       quest::setnexthpevent(91);
}

sub EVENT_HP {       
    if($hpevent == 91) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(76);

}

    if($hpevent == 76) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(56);
}

    if($hpevent == 56) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(26);
}

    if($hpevent == 26) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
}
 }

sub EVENT_DEATH {
	quest::shout ("$name and the others may have beaten me, but they are no match for the beast!");
    quest::depop(2700255);
	quest::depop(2700256);
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote