View Single Post
  #34  
Old 10-22-2006, 01:32 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default More than one way to skin a cat...

Sooo... anyways, heres' what I have come to realize about the Perl quests;
They are all PC, NPC inclined - anotherwords, you are doing interaction as a PC to an NPC or vice-versa, all will work fine. but if you want NPC's to inter-act with each other, then the "little problems" start.
Some of the stuff does not work as intended; for example "sub EVENT_NPC_SLAY" does not work as I thought it would(at least for me).
I've been reading fathernitwit's WIKI on this (yess, I found it!)
I think a working command for npc to npc inter-action (maybe with some options) is needed, as even little things like guards killing noobie mobs and saying text, help the EqEmu to look more "EQ-live like" . But, if not, I finally landed a solution;
Code:
#npc - Orc Death
#zone - Gfaydark
#by Angelox

sub EVENT_DEATH {
my $a = $name;
 if ($a =~ /Fireblight/i){
    quest::signal(54099,1);
    quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Rainstrider/i){
    quest::signal(54098,1);
    quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Brookrock/i){
    quest::signal(54124,1);
    quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Pineshade/i){
    quest::signal(54118,1);
    quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Fayfear/i){
    quest::signal(54096,1);
    quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}else{
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
 }
}
And the guards;
Code:
#npc - Gfaydark Guard Protectors
#zone - Gfaydark
#by Angelox

sub EVENT_SIGNAL {
   quest::say("For the defense of Kelethin!!");
   quest::say("For the protection of all Fier'Dal, there shall be no mercy for your kind.");
   }

sub EVENT_ATTACK {
   quest::say("For the defense of Kelethin!!");
   quest::say("For the protection of all Fier'Dal, there shall be no mercy for your kind.");
   }
If you use these codes and make pl's for each guard at the three lifts, it will work. But you would need to make "signal" scripts for bats and what ever else the guards kill.
I'll have them all made up in a day or two.

$mobid would have been better, but for some reason, it would return a strange three digit number, that would not relate to the attacker-guard. $name returns the spawn2 npc name, and I can get some relationship to the guard there.

The only problem I have with these scripts is, the text comes out in this order;

Quote:
orc pawn says 'You shall have all the Crushbone orc legions on your tail for my death!

Guard Brookrock says 'For the defense of Kelethin!!'
Guard Brookrock says 'For the protection of all Fier'Dal, there shall be no mercy for your kind.'
It should come out with the guards first;
Quote:
Guard Brookrock says 'For the defense of Kelethin!!'
Guard Brookrock says 'For the protection of all Fier'Dal, there shall be no mercy for your kind.'

orc pawn says 'You shall have all the Crushbone orc legions on your tail for my death!
Minor problem, but it bugs me, and really is not like it should be - if someone already knows how to put in a delay of a few seconds before the orc says, please save me some headache and post.
Reply With Quote