Log in

View Full Version : sir lucan ?


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?

So_1337
10-27-2008, 02:53 PM
Find NPC #9018 (the undead version of Lucan) and change its faction to be KOS in some form or another. You could do KOS to all, or set it just on the Freeport Militia faction like the live version of Lucan.

As for the depop script, it looks fine from here. Not sure why it would not be working.

joligario
10-27-2008, 03:08 PM
You have an extra closing bracket in your EVENT_ATTACK block. and missing one in your EVENT_SAY block.

joligario
10-27-2008, 03:11 PM
Name your 2nd script file 9018.pl

AndMetal
10-27-2008, 03:12 PM
You might want to use the NPC ID for the name of the 2nd quest file instead of his actual name, since the backtick (`) might cause some issues. You might also want to add in some quest::shout's to find out what's parsing & what's not.

nilbog
11-07-2008, 01:06 PM
i took the advice of adding quest shouts for parsing as well as changing the .pl to the NPC ID #. I'm guessing the (`) character was my issue, it is working fine!

thanks for the help! paladins rejoice.

cavedude
11-07-2008, 03:07 PM
No, it is better to use sir_lucan_d-lere.pl for the file name.