I'll try to answer this, since I'm working on a script generator for my program. MWMDragon's guide will help.
I think this will check the number of items handed in from highest to lowest. If theres an item that doesn't belong, it should kick it back to the user. I haven't tested this yet, so tell me how it goes.
Code:
sub EVENT_ITEM
{
if($itemcount{1001} == 4)
{
quest::exp(400);
}
if($itemcount{1001} == 3)
{
quest::exp(300);
}
if($itemcount{1001} == 2)
{
quest::exp(200);
}
if($itemcount{1001} == 1)
{
quest::exp(100);
}
else
{
quest::say("Sorry, I can't use this stuff... Here you can have it back.");
quest::summonitem($item1) if($item1);
quest::summonitem($item2) if($item2);
quest::summonitem($item3) if($item3);
quest::summonitem($item4) if($item4);
}
}
I hope this works ^-^
P.S. You can make this more advanced with checkers so that handing in one wrong item and one right item will return the wrong item and still give the rewards for the right item.
__________________
If at first you don't succeed destroy all evidence that you ever tried.
God doesn't give second chances... Hell, he sets you up the first time.
Last edited by Kayot; 05-30-2007 at 11:40 PM..
|