Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2006, 05:56 PM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default Perl quest problem

I am learning a lot about perl quests but I seem to be stuck on making multiple items turn in for a reward. Does anyone see something wrong with this coding? When I turn in these 4 items I get no response from the npc.


sub EVENT_ITEM
{
if(
($itemcount{5018} ==1) &&
($itemcount{5019} ==1) &&
($itemcount{5020} ==1) &&
($itemcount{1179} ==1)
)
{
quest::summonitem(5021);
}
}
Reply With Quote
  #2  
Old 05-08-2006, 03:06 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

Are those really & 's or did something about your paste or the forum mangle those?
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #3  
Old 05-08-2006, 05:11 PM
saladbowl1
Fire Beetle
 
Join Date: Aug 2004
Posts: 10
Default

something along these lines

Code:
sub EVENT_ITEM {
if($item1=="5018" && $item2=="5019" && $item3=="5020" && $item4=="1179"){
quest::summonitem(5021);}
}
with the code above they'll have to turn them in in order...

Code:
sub EVENT_ITEM {
if($itemcount{5018} == 1);
($itemcount{5019} == 1);
($itemcount{5020} == 1);
($itemcount{1179} == 1);{
quest::summonitem(5021);}
}
The one above is what you were aiming at, you only had a few minor mistakes.

Last edited by saladbowl1; 05-09-2006 at 01:18 AM..
Reply With Quote
  #4  
Old 05-08-2006, 05:23 PM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

Code:
sub EVENT_ITEM {
if($itemcount{5018} == 1);
($itemcount{5019} == 1);
($itemcount{5020} == 1);
($itemcount{1179} == 1);{
quest::summonitem(5021);}
}
should be...
Code:
sub EVENT_ITEM
{
if(($itemcount{5018} == 1) && ($itemcount{5019} == 1) && ($itemcount{5020} == 1) && ($itemcount{1179} == 1)) {
quest::summonitem(5021); }
}
yea, think that should work atleast... give it a try.


edit:
Code:
sub EVENT_ITEM {
if($item1=="5018" && $item2=="5019" && $item3=="5020" && $item4=="1179"){
quest::summonitem(5021);}
}
...
Code:
sub EVNET_ITEM
{
if(($item1 == 5018) && ($item2 == 5019) && ($item3 == 5020) && ($item4 == 1179)) {
quest::summonitem(5021); }
}
...better
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com

Last edited by Cripp; 05-09-2006 at 01:28 AM..
Reply With Quote
  #5  
Old 05-08-2006, 05:45 PM
saladbowl1
Fire Beetle
 
Join Date: Aug 2004
Posts: 10
Default

bah knew i was missing something in that first code but tiredness kicked in :P.
Reply With Quote
  #6  
Old 05-08-2006, 05:52 PM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default thanks

Quote:
sub EVENT_ITEM
{
if(($itemcount{5018} == 1) &&
($itemcount{5019} == 1) &&
($itemcount{5020} == 1) &&
($itemcount{1179} == 1))
{quest::summonitem(5021); }

if($item1=="5018" &&
$item2=="5019" &&
$item3=="5020" &&
$item4=="1179")
{quest::summonitem(5022);}

if(($item1 == 501 &&
($item2 == 5019) &&
($item3 == 5020) &&
($item4 == 1179))
{quest::summonitem(5023); }

}
All three of these seem to work, thanks so much, I was losing my mind with combinations lol...
Reply With Quote
  #7  
Old 05-08-2006, 06:15 PM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default hm

If I turn in item 5019 with 5020 in this situation I get my reward 5030, but I also get 5022 ,as I have satisfied that first condition as well. Is there any easy way to tell it ONLY to reward the first when a single 5019 is turned in with nothing else?

sub EVENT_ITEM
{
if(($itemcount{5019} == 1))
{quest::summonitem(5022); }

if(($itemcount{5019} == 1) &&
($itemcount{5020} == 1))
{quest::summonitem(5030); }

if(($itemcount{5018} == 1) &&
($itemcount{5019} == 1) &&
($itemcount{5020} == 1) &&
($itemcount{1179} == 1))
{quest::summonitem(5021); }

}
Reply With Quote
  #8  
Old 05-08-2006, 07:46 PM
jimbabwe
Hill Giant
 
Join Date: Aug 2005
Posts: 107
Default

This may work. can give it a try.

Code:
sub EVENT_ITEM
{

if(($itemcount{5018} == 1) &&
($itemcount{5019} == 1) &&
($itemcount{5020} == 1) &&
($itemcount{1179} == 1))
{quest::summonitem(5021); }
elsif(($itemcount{5019} == 1) &&
($itemcount{5020} == 1))
{quest::summonitem(5030); }
elsif(($itemcount{5019} == 1))
{quest::summonitem(5022); }

}

Last edited by jimbabwe; 05-09-2006 at 03:48 AM..
Reply With Quote
  #9  
Old 05-09-2006, 04:46 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default thanks

Ah yeah that works great. That is exactly what I tried but I did it in reverse order

Much appreciated.
Reply With Quote
  #10  
Old 05-11-2006, 07:21 PM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default ...

I'm stuck with two quests, I've tried like 10 different things and can't seem to get multiple "if" conditions to work. Im a perl noob so pardon me if what I am doing makes little sense. Tried to copy the format we used above to get two if conditions to trigger a result...

1st:
sub EVENT_SAY{
if(($class == &&
($text=~/hail/i))
{quest::say("xxx"); }

elsif(($class != &&
($text=~/hail/i))
{quest::say("xxx");}

}


**** and this one

sub EVENT_ITEM{
if(($item1 == 5) &&
($ulevel &lt; 4))
{
quest::say("xxx");
quest::summonitem(6);
quest::say("xxx");
}

if($item1 == 6)
{
quest::setallskill(0);
quest::permaclass(;
}
}

In the first one it triggers the second (elsif) condition regardless of my class. In the second it seems to be broken period, so I guess something is tripping it up in the format. Any have an idea?
Reply With Quote
  #11  
Old 05-11-2006, 11:11 PM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

change the item id #'s to what you want to use and change the level check to whatever you wanted. all i saw was &lt;

Code:
  sub EVENT_SAY {
    if ($text=~/hail/i) {
  	if ($class eq "Bard") {
  	  quest::say("you're a bard");
  	}
  	else {
  	  quest::say("you're not a bard");
  	}
    }
  }
  
  sub EVENT_ITEM {
    if ($itemcount{1001} == 1 && $ulevel < 4) { # 1 id #1001 item and level less than 4
  	quest::say("blah blah");
  	quest::summonitem(1002);
    }
    elsif ($itemcount{1002} == 1) { # 1 id #1002 item
  	quest::setallskill(0);
  	quest::permaclass(8);
    }
  }
Reply With Quote
  #12  
Old 05-12-2006, 06:18 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default re

Thank you very much
Reply With Quote
  #13  
Old 05-12-2006, 11:42 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default wonderin

What is the difference?

sub EVENT_SAY {
if ($text=~/hail/i) {
if ($class eq "Bard") {
quest::say("you're a bard");
}
else {
quest::say("you're not a bard");
}
}
}

######

sub EVENT_SAY {
if ($text=~/hail/i && $class eq "Bard")
{
quest::say("you're a bard");
}
else {
quest::say("you're not a bard");
}
}

The second one's else is a little vague?

Also where did you find the format for - $class eq "Bard"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:54 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3