EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Problem with quest ... (https://www.eqemulator.org/forums/showthread.php?t=17108)

jimm0thy 11-20-2004 08:01 PM

Problem with quest ...
 
Ok heres whats happening ... the npc will respond to 1 phrase and then gets broken (after the first phrase he will simply return my default hail message)

Also Im not sure if I have the item turn in code correct or not ... any help would be appriciated.

Code:

sub EVENT_SAY
{
 if ($text=~/Hail/i){quest::say("Hail to you $name. You look like a [young druid].");}

 if ($text=~/young druid/i){quest::say("Well then you've come to the right place. As your druidic blacksmith it is my duty to outfit young ones such as yourself. If you [assist] me I will reward you with a very nice mace.");}

 if ($text=~/i will assist you/i){quest::say("Excellent! I require you to go out into the Faydark and return to me with one of the following items. A Black Wolf Skin , A Forest Drakeling Scales , A Rust Mace , and A Giant Wasp Drone Pollen. When you return I shall give you the mace.");}

}

sub EVENT_ITEM

{
 if ($itemcount{13758} && $itemcount{20270} && $itemcount{6011} && $itemcount{20290} == 1){quest::say("Nice work druid. Now as I said here is your mace , use it well.");
 quest::exp(150)
 quest::summonitem(3431);}
}


Xorith 11-20-2004 08:30 PM

Quote:

Code:

if ($itemcount{13758} && $itemcount{20270} && $itemcount{6011} && $itemcount{20290} == 1)

Try this:
Code:

if( $item1 == 13758 &&
    $item2 == 20270 &&
    $item3 == 6011 &&
    $item4 == 20290 )

I also refer you to this:
http://www.eqemulator.net/forums/viewtopic.php?t=12020
-- Xorith

cofruben 11-21-2004 12:35 AM

you should use the equal operation in all variables,not only at the end

Kroeg 11-21-2004 05:20 AM

Yeah, plus you're using itemcounts where they obviously don't need to be. Such a use would be like this:


if ($itemcount{13758} == 1 && $itemcount{20270} == 2 && $itemcount{6011} == 3 && $itemcount{20290} == 5){
quest::dowhatever....blahblah

itemcount is for stacks of items, $item[no] is used for single item turnins. To make your quest work, this is what I believe it should look like:


sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hail to you $name. You look like a [young druid].");
if($text=~/young druid/i){
quest::say("Well then you've come to the right place. As your druidic blacksmith it is my duty to outfit young ones such as yourself. If you [assist] me I will reward you with a very nice mace.");
if($text=~/i will assist you/i){
quest::say("Excellent! I require you to go out into the Faydark and return to me with one of the following items. A Black Wolf Skin , A Forest Drakeling Scales , A Rust Mace , and A Giant Wasp Drone Pollen. When you return I shall give you the mace."); }
}

sub EVENT_ITEM {
if($itemcount{13758} == 1 && $itemcount{20270} == 1 && $itemcount{6011} == 1 && $itemcount{20290} == 1){
quest::say("Nice work druid. Now as I said here is your mace , use it well.");
quest::exp(150);
quest::summonitem(3431); }
}


That should work for you, but please let me know.

Xorith 11-21-2004 07:38 AM

Or basically what I said at first. LOL.

Kroeg 11-21-2004 07:46 AM

You showed him how to achieve the $item[no] way, I showed him how to use what he had properly. So no, not what you said at all.

jimm0thy 11-21-2004 04:41 PM

Thanks for the help so far , Ive gone over the guide to perl quests posts and this one and the code ... however it still dosent work. My zone.exe outputs an error of "missing right quote or bracket in line 17. End of line 17"


All times are GMT -4. The time now is 12:23 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.