// F_ItemOfChoice( <itemid>,<itemid>.... );
// F_ItemOfChoice( 512,513,614 );
// F_ItemOfChoice( 607,608 );
function script F_ItemOfChoice {
.@argcount = getargcount();
for ( .@i = 0; .@i < .@argcount; .@i++ )
.@menu$ = .@menu$ + getitemname( getarg( .@i,0 ) ) + ":";
mes "Pick an item that you want.";
.@i = select( .@menu$ ) - 1;
.@itemid = getarg( .@i,0 );
if ( .@itemid ) {
if ( !checkweight( .@itemid,1 ) ) {
dispbottom "Overweight.";
}
else {
getitem .@itemid,1;
switch ( .@itemid ) {
default: break;
case 607: getitem 607,1; break; // purchase YGG and get another 1 YGG for free
case 512: getitem 607,20; break; // purchase Apple and get another 20 YGG for free
}
}
}
return;
}