Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2004, 08:58 PM
Sakrateri's Avatar
Sakrateri
Dragon
 
Join Date: Mar 2004
Location: England
Posts: 776
Default Any idea why this wont work?

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Greetings. $name. nice day for some orc slaying eh?.");
}
sub EVENT_SLAY {
quest::say("For the defense of Kelethin."); }
}
#END of FILE Zone:gfaydark ID:54093 -- Guard_Fayfear


My EVENT_SAY works but the EVENT_SLAY wont , any ideas?

Thanks , Sak

Oh one more thing , I am wanting this to work when a guard kills an NPC , mabey EVENT_SLAY only works when they kill PCs ?
__________________
KhepriGames

Game Gallery

My Forums

Reply With Quote
  #2  
Old 09-29-2004, 09:26 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

The } are misplaced.

the EVENT_SLAY is included in the EVENT_SAY

corrected :
Code:
sub EVENT_SAY {
  if($text=~/Hail/i){
    quest::say("Greetings. $name. nice day for some orc slaying oh?.");
  }
}

sub EVENT_SLAY {
  quest::say("For the defense of Kelethin."); 
}
#END of FILE Zone:gfaydark ID:54093 -- Guard_Fayfear
You should indent your code, it's easier to read and avoid those lil errors
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #3  
Old 09-29-2004, 09:50 PM
Sakrateri's Avatar
Sakrateri
Dragon
 
Join Date: Mar 2004
Location: England
Posts: 776
Default

Thanks , i tried that but same thing, just the hail works, then I tried it with just

sub EVENT_SLAY {
quest::say("For the defense of Kelethin.");}
}


And still nothing, Im thinking that SLAY is not working on here, I am using a 5.7 DR6 server , i dunno
__________________
KhepriGames

Game Gallery

My Forums

Reply With Quote
  #4  
Old 09-29-2004, 09:58 PM
Sakrateri's Avatar
Sakrateri
Dragon
 
Join Date: Mar 2004
Location: England
Posts: 776
Default

Ok , I just went on with a level 1 character and attacked the guard , he said what he was suppose to so it seems sub EVENT_SLAY only works when they slay PCs , so does anyone know how to get them to say stuff when they slay an NPC??
__________________
KhepriGames

Game Gallery

My Forums

Reply With Quote
  #5  
Old 09-29-2004, 11:14 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Code:
sub EVENT_SLAY {
quest::say("For the defense of Kelethin.");}
}
has a syntax error, should be
Code:
sub EVENT_SLAY {
quest::say("For the defense of Kelethin.");
}
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #6  
Old 09-29-2004, 11:20 PM
Sakrateri's Avatar
Sakrateri
Dragon
 
Join Date: Mar 2004
Location: England
Posts: 776
Default

Yes thats how you had it in your last post and thats how i tried it, It only worked when the guard killed me , this is copy right from my .pl

sub EVENT_SLAY {
quest::say("For the defense of Kelethin.");
}

Its not working still when killing NPCs , only PCs
__________________
KhepriGames

Game Gallery

My Forums

Reply With Quote
  #7  
Old 09-29-2004, 11:41 PM
Liscadipesce's Avatar
Liscadipesce
Hill Giant
 
Join Date: Jan 2003
Location: Ontario, Canada
Posts: 110
Default

Hmm, I checked out the tutorial and I don't think their is a clear sub event for an NPC killing an NPC. Since Slay is only when an NPC kills a PC and Death is when he is killed, no other options.

You could probably make a quest file for each mob, and when it is killed, if mobid == the NPC ID of the guards, it would emote the guard saying something, it might be a bit tedious to apply all of them though.

The best next thing though, without getting too technical, you could make the NPC say "For the Defense of Kelethin!" when being attacked. :/
__________________


(Liscadipesce) then how do you expect to run a bot?
(Liscadipesce) It has to be run off of your computer...
(Tajk) ftp? =D
Reply With Quote
  #8  
Old 09-30-2004, 12:06 AM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

This confirms what Liscadipesce wrote, row 1029 of attack.cpp, 5.6dr6, the only part of the code where EVENT_SPLAY is spawned, IE when a PC dies.

Code:
if (other->IsNPC())
 parse->Event(6, other->GetNPCTypeID(), 0, other,this->CastToMob());
edit : Forget the modification i proposed
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #9  
Old 09-30-2004, 01:02 AM
Sakrateri's Avatar
Sakrateri
Dragon
 
Join Date: Mar 2004
Location: England
Posts: 776
Default

Ahhh, Ok thanks alot guys , clears that up .
__________________
KhepriGames

Game Gallery

My Forums

Reply With Quote
Reply


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 06:45 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