nilbog
10-27-2008, 02:33 PM
ok so i've been working on making sir lucan function on my server..
1st version is sir_lucan_dlere, responds to hails etc. when he dies, sir_lucan_d`lere spawns. when the 2nd version(undead) spawns, i want it to be aggro on the PCs which killed lucan, but despawn if not engaged for a 5 minute period of time.
i have so far for 1st sir_lucan_dlere
sub EVENT_SAY
{
if($text=~/Hail/i)
{
quest::say("Hail. citizen! I am very busy. I do not have time to speak with you. If you have any complaints. please direct them to City Hall. Unless. of course. you have some personal business in which I might be interested.");
}
sub EVENT_ATTACK
{
quest::say("Let your death be a warning to all who dare oppose the Freeport Militia!");
quest::say("Die. dog!!"); }
}
sub EVENT_DEATH
{
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::say("You shall never get my testimony. I shall fight you from the grave!! Ha Ha Ha!! You cannot stop the undead!! Foolish mortal!! Your foul deeds have earned my contempt. ");
quest::spawn2(9018,0,0,$x+1,$y+1,$z,$h);
}
for the 2nd sir_lucan_d`lere (undead) i have
sub EVENT_SPAWN
{
quest::settimer("depop",300);
}
sub EVENT_TIMER {
if($timer eq "depop") {
quest::stoptimer("depop");
quest::depop();
}
}
The first script works great, and spawns the undead lucan. The second script doesn't work at all..
any advice on how to get the depop timer to function, and possibly make the undead version spawn with aggro towards those who killed the live version?
1st version is sir_lucan_dlere, responds to hails etc. when he dies, sir_lucan_d`lere spawns. when the 2nd version(undead) spawns, i want it to be aggro on the PCs which killed lucan, but despawn if not engaged for a 5 minute period of time.
i have so far for 1st sir_lucan_dlere
sub EVENT_SAY
{
if($text=~/Hail/i)
{
quest::say("Hail. citizen! I am very busy. I do not have time to speak with you. If you have any complaints. please direct them to City Hall. Unless. of course. you have some personal business in which I might be interested.");
}
sub EVENT_ATTACK
{
quest::say("Let your death be a warning to all who dare oppose the Freeport Militia!");
quest::say("Die. dog!!"); }
}
sub EVENT_DEATH
{
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::say("You shall never get my testimony. I shall fight you from the grave!! Ha Ha Ha!! You cannot stop the undead!! Foolish mortal!! Your foul deeds have earned my contempt. ");
quest::spawn2(9018,0,0,$x+1,$y+1,$z,$h);
}
for the 2nd sir_lucan_d`lere (undead) i have
sub EVENT_SPAWN
{
quest::settimer("depop",300);
}
sub EVENT_TIMER {
if($timer eq "depop") {
quest::stoptimer("depop");
quest::depop();
}
}
The first script works great, and spawns the undead lucan. The second script doesn't work at all..
any advice on how to get the depop timer to function, and possibly make the undead version spawn with aggro towards those who killed the live version?