|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days. |
09-29-2004, 08:58 PM
|
|
Dragon
|
|
Join Date: Mar 2004
Location: England
Posts: 776
|
|
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 ?
|
09-29-2004, 09:26 PM
|
Dragon
|
|
Join Date: May 2003
Posts: 539
|
|
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
|
09-29-2004, 09:50 PM
|
|
Dragon
|
|
Join Date: Mar 2004
Location: England
Posts: 776
|
|
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
|
09-29-2004, 09:58 PM
|
|
Dragon
|
|
Join Date: Mar 2004
Location: England
Posts: 776
|
|
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??
|
09-29-2004, 11:14 PM
|
Dragon
|
|
Join Date: May 2003
Posts: 539
|
|
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.");
}
|
09-29-2004, 11:20 PM
|
|
Dragon
|
|
Join Date: Mar 2004
Location: England
Posts: 776
|
|
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
|
09-29-2004, 11:41 PM
|
|
Hill Giant
|
|
Join Date: Jan 2003
Location: Ontario, Canada
Posts: 110
|
|
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
|
09-30-2004, 12:06 AM
|
Dragon
|
|
Join Date: May 2003
Posts: 539
|
|
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
|
09-30-2004, 01:02 AM
|
|
Dragon
|
|
Join Date: Mar 2004
Location: England
Posts: 776
|
|
Ahhh, Ok thanks alot guys , clears that up .
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:33 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|