PDA

View Full Version : Oracle_Jaarl


Greyhelm
02-10-2015, 09:40 PM
Here is a submission for Oracle Jarl in Jagged Pine for review.

######################
# Quest: Paying Oracle Jarl Respects
# Involved: Oracle_Jaarl (NPCID: 181077)
# Zone: Japped Pine
# Author: Greyhelm
# Items Involved: Panther Fang Necklace (ID:8257), Bear Fang Necklace (ID:8261), Wolf Fang Necklace (ID: 8258)
# Reward(s): Rod of Ulceration (ID:8071)
# Related Quests: Snarla's Friendship
######################

sub EVENT_SAY {
if($text=~/worship/i){
quest::say("Very well. You may worship quietly then. May Brell Serilis bless you.");
}
if($text=~/pay your respects/i){
quest::say("You have, well then! You can pay your respects by bringing me a [" . quest::saylink("present") . "].");
}
if($text=~/present/i){
quest::say("I like necklaces. I wear necklaces made from every kind of beast. The power of the beast is contained within each necklace. The more necklaces I wear, the greater my power! Bring me a Bear Fang Necklace, a Wolf Fang Necklace, and a Panther Fang Necklace. This will show your devotion to me.. I mean the Temple!");
}
if($text=~/Hail/i){
quest::emote("shakes his body and his countless necklaces cause a loud rattle to echo off the stone walls.");
quest::say("Hello $race. Have you come to [" . quest::saylink("worship") . "] or have you just come for a visit to view our wonderful architecture and to [" . quest::saylink("pay your respects") . "]?");
}
# $item1 - Panther Fang Necklace (ID: 8257)
# $item2 - Bear Fang Necklace (ID: 8261)
# $item3 - Wolf Fang Necklace (ID: 8258)
sub EVENT_ITEM {
if ($item1== 8257 && $item2== 8261 && $item3== 8258)
{
quest::say("You have done well $name, here is what was promised.);
quest::summonitem("8071"); # Staff of Ulceration
}
plugin::return_items(\%itemcount);
}
#END of quest

I edited out redundant quest::say items as he had a lot of reoccuring text. This was my first quest edit, I understand this quest is supposed to be class specific to Necro and Shamans. I am working on that portion as I read more.

ghanja
02-10-2015, 10:06 PM
Syntax corrected a little and using item hash. Do the hand in's have to be in specific hand-in/trade slots? If so, then ignore the below:


######################
# Quest: Paying Oracle Jarl Respects
# Involved: Oracle_Jaarl (NPCID: 181077)
# Zone: Japped Pine
# Author: Greyhelm
# Items Involved: Panther Fang Necklace (ID:8257), Bear Fang Necklace (ID:8261), Wolf Fang Necklace (ID: 8258)
# Reward(s): Rod of Ulceration (ID:8071)
######################

sub EVENT_SAY {
if($text=~/worship/i){
quest::say("Very well. You may worship quietly then. May Brell Serilis bless you.");
}
elsif($text=~/pay your respects/i){
quest::say("You have, well then! You can pay your respects by bringing me a [" . quest::saylink("present") . "].");
}
elsif($text=~/present/i){
quest::say("I like necklaces. I wear necklaces made from every kind of beast. The power of the beast is contained within each necklace. The more necklaces I wear, the greater my power! Bring me a Bear Fang Necklace, a Wolf Fang Necklace, and a Panther Fang Necklace. This will show your devotion to me.. I mean the Temple!");
}
elsif($text=~/Hail/i){
quest::emote("shakes his body and his countless necklaces cause a loud rattle to echo off the stone walls.");
quest::say("Hello $race. Have you come to [" . quest::saylink("worship") . "] or have you just come for a visit to view our wonderful architecture and to [" . quest::saylink("pay your respects") . "]?");
}
}

sub EVENT_ITEM {
#Panther Fang Necklace (ID: 8257)
#Bear Fang Necklace (ID: 8261)
#Wolf Fang Necklace (ID: 8258)
if (plugin::check_handin(\%itemcount, 8257 => 1 , 8258 => 1 , 8261 => 1)) {
quest::say("You have done well $name, here is what was promised.");
quest::summonitem(8071); # Staff of Ulceration
}
plugin::return_items(\%itemcount);
}
#END of quest

Greyhelm
02-10-2015, 10:08 PM
No not specific to slot I just didn't understand the check_handin plugin.. Now that I see it.. Thanks!..
I tested this on my private server I run, does the subsequent quest::say's need to be elsif?

ghanja
02-10-2015, 10:17 PM
The one after turn in? Upon turning in the conditional should be true, thus passing onto the if block.

Or are you asking if elsif is needed? elsif isn't needed, though, there is no reason for the conditional checking if, the client says "worship". Each thing a client says while the NPC is targetted will call the EVENT_SAY subroutine. Or did I completely misunderstand your question?

Greyhelm
02-10-2015, 10:24 PM
No that answered it. I am woorking on a quest in Nedaria's so was hoping not to make a mistake on it. Thanks.

Greyhelm
02-11-2015, 03:43 AM
Will have to submit Snarla's Friendship quest to be able to get the pieces needed to cmplete this one.. Added an information field Quests Related: to my info field.

//

Disregard. Snarla quest needs faction, which I overlooked. It is in the database and functions as intended.