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 ? |
The } are misplaced.
the EVENT_SLAY is included in the EVENT_SAY corrected : Code:
sub EVENT_SAY { |
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 |
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??
|
Code:
sub EVENT_SLAY { Code:
sub EVENT_SLAY { |
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 |
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. :/ |
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()) |
Ahhh, Ok thanks alot guys , clears that up .
|
All times are GMT -4. The time now is 01:21 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.