EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Quests (https://www.eqemulator.org/forums/forumdisplay.php?f=624)
-   -   question about $itemcount (https://www.eqemulator.org/forums/showthread.php?t=14317)

x-scythe 06-14-2004 04:36 AM

question about $itemcount
 
if i wanted to have it so like 2 of one item and 1 of another were turned in would it be like this?

example quest:

Code:

sub EVENT_SAY
{
 if($text=~/Hail, $mname/i)
  {
  quest::say("Ello there $name! If you bring me two firebeetle eyes and one bone chip, I will craft you an item.");
 }
}

#the xx is the firebeetle eyes and the yy is the bone chip
sub EVENT_ITEM
{
 if(($itemcount{xx} == 2)($itemcount{yy} == 1))
  {
  quest::say("Well done. Here is your crafted item!");
  quest::summonitem(blah);
 }
}

this is what i need to know is correct
Code:

if(($itemcount{xx} == 2)($itemcount{yy} == 1))
thanks in advance

m0oni9 06-14-2004 04:56 AM

Code:

if(($itemcount{xx} == 2) && ($itemcount{yy} == 1))

x-scythe 06-14-2004 05:04 AM

doh...now that i see it its so obvious now lol..thanks

Minuss 06-19-2004 01:30 AM

no need for so many "("
if($itemcount{xxxx} && $itemcount{xxxx} == 1) is also correct

if you have to put 2 items for a turn in for example, it is :
if($itemcount{xxxx} && $itemcount{xxxx} ==1 && $itemcount{yyyy} && $itemcount{yyyy} ==1)


All times are GMT -4. The time now is 11:52 PM.

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