Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #31  
Old 10-22-2006, 02:37 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.

as im looking at EVENT_ATTACK, the code is only doing it when the NPC is attacked, as you stated. Im almost wondering if that functionality mihgt be useful to somebody sometime... so im thinking about adding an EVENT_COMBAT which would trigger when an NPC starts "combat" mode, which would be defined as somebody attacking the NPC, or being attacked by the NPC in any manner, or the NPC having somebody on their hate list (in case they are running away or something), and would wear off like 12 seconds after neither of those actions were true... what do you think?
Reply With Quote
  #32  
Old 10-22-2006, 03:08 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by fathernitwit
we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.
This is nice - I'm working off an old Lexicon manual, this wasn't there at they time it was made I guess. I'll try it out in a while.

Quote:
Originally Posted by fathernitwit
as im looking at EVENT_ATTACK, the code is only doing it when the NPC is attacked, as you stated. Im almost wondering if that functionality mihgt be useful to somebody sometime... so im thinking about adding an EVENT_COMBAT which would trigger when an NPC starts "combat" mode, which would be defined as somebody attacking the NPC, or being attacked by the NPC in any manner, or the NPC having somebody on their hate list (in case they are running away or something), and would wear off like 12 seconds after neither of those actions were true... what do you think?
This would be a great idea - In my case EVENT_NPC_SLAY is a solution, but the real answer would be something like EVENT_COMBAT.

Also, while working on big events I noticed I couldn't get the mob to make a zone wide "ooc" or emote. example;
Code:
# Raid event for #Garudon (109107)
# Angelox


sub EVENT_SAY { 
if($text=~/Hail/i){
quest::say("Traveler, you must help me. I have been tortured in this city for generations. The mark of Kylong adorns the walls of the theater that houses my remains. These markings are preventing me from passing into the theater and rejoining with my body so that I may pass on in peace. If you can reclaim four samples and return them to me, it may be enough to draw power from. With this power I will pass into the theater and rejoin my body and rest in peace. You do this for me, the torture of eternal capture is more than I can bear.");
 }
}

sub EVENT_ITEM {
 if ($itemcount{65574} == 4){
  quest::spawn2(109107,0,0,-142.884,-120.265,18.226,189.875);
  quest::me("As you place the remains of the dragon on the ground, a cold draft fills the air. Suddenly in a great vortex, the bones begin to rise up and move carried by the wind. They jut through the air and come down inside of the nearby theater. You hear the faint sound of bones clanking together, which is then followed by a massive moan. A sharp bolt of fear trickles up your spine as you feel anticipation fill the air.");
  quest::depop();
 }
}

# EOF zone: Veksar NPCs:#Garudon (109107)
I was hoping for the quest::me to go out zone wide, but it stays as a "say". Again, I tried the other commands i found in the Lexicon, but I guess it's outdated and maybe theres something I can use?
Reply With Quote
  #33  
Old 10-22-2006, 04:49 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by fathernitwit
we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.
I tried this, and it doesn't seem to work either - anyone have any luck with this?
Reply With Quote
  #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
  #35  
Old 10-23-2006, 02:48 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Thank You fathernitwit !!!

Snip from the latest binary release;

Quote:
==10/22/2006
FatherNitwit: added EVENT_COMBAT triggered when an NPC engages any form of
FatherNitwit: combat and when combat is over. $combat_state signals which.
FatherNitwit: Hopefully fixed d_meele_texture
FatherNitwit: Cleaned up a lot of const related issues (attrs, AAs, and more)
FatherNitwit: Moved a lot of NPC specific stuff from Mob into NPC
FatherNitwit: Reworked special attacks a bit (monk, kick, backstab):
FatherNitwit: they now use the standard combat hit chance forumals based on offense/defense instead of always hitting
FatherNitwit: they are now subject to damage avoidance (parry, riposte, etc.) like normal attacks
I can't wait to try this one out!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:59 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3