Code:
((($itemcount{xx} == 2 )) && (($itemcount{xy} == 1)))
You will notice if you use the parentesis like you have them you will actually see if you turn in item XX without item xy the quest will still execute becuase you have the item XX closing out before the && and it won't need to check, if you however only hand in xy it won't work without XX.
Code:
sub EVENT_ITEM
{
if(($itemcount{xx} && $itemcount{xy} ==1))
{
quest::say("Joly Good.");
}
}
this will make sure that both item XX and XY are turned in and only 1 of each is turned in. one thing that i have added to all my quests, (hopefully over on EQA we will get global scripts working sooner than later.) but in every script i write after any item turnin i always add.
Code:
sub EVENT_ITEM
{
if(($itemcount{xx} && $itemcount{xy} ==1))
{
quest::say("Joly Good.");
}
else
{
NoNeed();
}
}
sub NoNeed
{
quest::say("I don't need this item $name, you can have it back.");
if($item1 != "" )
{
quest::summonitem($item1,0);
}
if($item2 != "" )
{
quest::summonitem($item2,0);
}
if($item3 != "" )
{
quest::summonitem($item3,0);
}
if($item4 != "" )
{
quest::summonitem($item4,0);
}
}
Note that the NoNeed sub is not in all my scripts, right now i just include the code in the else command, or if the mob doesn't take turn-ins for quests i just put it under the EVENT_ITEM sub, however as soon as our server starts working correctly with "gaggle" scripts then you can put the NoNeed sub in your "gaggle" script and then call it each time. anyway just wanted to add that.
Code:
if($text~=/yes/i)quest::say("Wow! Thank you! You will be GREATLY rewarded, this I promise you. The entrance to the cavern is in the Lavastorm Mountains on a narrow rock ledge on the side of a great crater filled with lava. Good luck!");}
Missing Curly ended bracket after if($text=~/yes/i). won't compile so you should catch this upon trying to run it, but thats one thing i noticed. dunno if anyone else posted about it i am to tired to look. anyway. good luck with the quests =).