PDA

View Full Version : Quest::Bug Collection


shaznito
03-04-2008, 11:24 AM
First off I want to say that this quest on live took way to long to do for one reason, the giant wasp wing that was also needed took over 752 kills to get.
anyways there is one missing item from the database "vial of Spider Venom"
I need that for the random rewards and for this to be complete, I would have done it myself but didnt know how.


#############
#Quest Name:Bug Collection
#Author:Shaznito
#NPCs Involved:Blixkin Entopop
#Items Involved:Bug Collection Box, Complete Bug Collection, Fire Beetle Eye
#Giant Fire Beetle Leg, Giant Scarab Egg Sack, Giant Wasp Wing,
#Spiderling Eye, Spiderling Silk
#################


sub EVENT_SAY {

if($text=~/Hail/i){

quest::say("Hail, $name! My name is Blixkin Entopop. Have you seen the wonderful assortment of [spiders] and [beetles] that inhabit the thicket? I have quite an extensive [bug collection]. Be careful, though. I have seen many brave halflings fall beneath a [swarm] of clicking and hissing bugs.");

}

if($text=~/what spiders/i){

quest::say("There are many species of bugs out here. The most common are the fire beetles. If you are hunting them, make sure their queen is not around or you will be in deep trouble. Their eyes are a popular item for adventurers because they give off light as if they were on fire. I even had one warrior try to kill [Ember] for her eyes!!");

}

if($text=~/who is ember/i){

quest::say("I raised Ember from an egg. She is my faithful pet and quite smart for a beetle. There are plenty of other bugs to squish, out in the thicket, so you had best leave her alone or I will have to SQUISH you!");

}

if($text=~/what swarms/i){

quest::say("Bugs tend to swarm and defend others of their species when they are attacked. So keep your eyes peeled if you intend to squish any of them.. And you'd better not even THINK of squishing [Ember] or you will be sorry!");

}

if($text=~/what beetles/i){

quest::say("There are many species of bugs out here. The most common are the fire beetles. If you are hunting them, make sure their queen is not around or you will be in deep trouble. Their eyes are a popular item for adventurers because they give off light as if they were on fire. I even had one warrior try to kill [Ember] for her eyes!!");

}

if($text=~/can I have a bug collection box/i){

quest::say("Here you go. Just follow the instructions on the [list] so you know what to collect and how to prepare the collection for me.");

quest::summonitem(17922);

}

if($text=~/what list/i){

quest::say("What did you do, lose the list? Here is another one. Hold onto it because I will want it back when you are done.");

quest::summonitem(18011);

}
}

sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 13268 => 1, 18011 => 1)) {

quest::say("Excellent! Good work! I knew you were the one for this job! Thank you so much! My collection just gets better and better each day. Here is your reward as I promised.");

$random = quest::ChooseRandom(14010,13281,13280);

quest::faction(218, 12);

quest::faction(77, 12);

quest::faction(133, 12);

quest::faction(208, 12);

quest::faction(48, -15);

quest::exp(65);

quest::givecash(0,8,3,0);

}

} else { quest::say("I have no need for this item $name, you can have it back.");

plugin::return_items(\%itemcount);

}

#END of FILE Zone:misty ID:33066 -- Blixkin_Entropop

shaznito
03-04-2008, 11:37 AM
Oopps, I put 2 quest in one section by mistake, just so sleepy I didnt notice. if a mod delete honey jum from here.

cavedude
03-04-2008, 11:38 AM
Is this it? http://lucy.allakhazam.com/item.html?id=14015

shaznito
03-04-2008, 11:39 AM
Ah, thats it! :) just named diffrent.

shaznito
03-04-2008, 11:47 AM
ok this looks about right.
$random = quest::ChooseRandom(14010,13281,13280,14015);

AndMetal
03-04-2008, 08:17 PM
ok this looks about right.
$random = quest::ChooseRandom(14010,13281,13280,14015);

Just one thing to add: you'll probably need to add the following for the reward to actually be given :)

quest::summonitem($random)

You may also want to use my with $random, so it doesn't affect any other scripts:

my $random = quest::ChooseRandom(14010,13281,13280,14015);

Other than that, looks good to me :)

cavedude
03-05-2008, 12:07 AM
I normally use:
quest::summonitem(quest::ChooseRandom(14010,13281, 13280,14015));Simply because it's one line, without a need to declare a variable. My feeling is the fewer variables we have, the better off we are. Now, if the reward is going to appear multiple times, then yes use a variable. That's part of the reason why they exist, for the lazy coder ;)

shaznito
03-05-2008, 03:30 AM
I was to tired to test this last night, and for some reason even if I wanted to I couldn't because blixkin entopop refuses to respond. Not sure why but oh well no matter I'll figure it out sooner or later.

cavedude
03-05-2008, 04:41 AM
You had a closing bracket in the wrong spot. It should have been after the item return plugin.