I made a basic script just to show you how it works, here is YOUR updated script and attachment showing how it works:
lhz_dun03,239,78,4 script Bio Entrance 651,{
function F_Warp;
if (countitem(4359) > 0) goto case_1;
end;
case_1:
//F_Warp("<map>",<x>,<y>,<item 1 ID>,<item 1 amount>{,<item 2 ID>,<item 2 amount>{...}}
F_Warp("lhz_dun04",244,61,4359,5,4357,5,4367,5,4365,5,4363,5,4361,5);
end;
function F_Warp {
.@map$ = getarg(0,"");
.@x = getarg(1,0);
.@y = getarg(2,0);
//This loop fills a array with all the needed items
for(.@i = 3; .@i < getargcount(); .@i += 2) {
.@items[.@i2] = getarg(.@i);
.@amount[.@i2] = getarg(.@i + 1);
.@i2++;
}
//This loop checks for each item needed
for (.@i = 0; .@i < getarraysize(.@items); .@i++) {
if (countitem(.@items[.@i]) < .@amount[.@i]) {
if (!.@header) {
mes "I don't have enough items to use this warp..";
mes "I still need: "+mesitemlink(.@items[.@i])+"^FF0000"+countitem(.@items[.@i])+"^000000/^27FF00"+.@amount[.@i]+"^000000.";
.@header = true;
}
mes .@amount[.@i] + " " + mesitemlink(.@items[.@i]);
.@missing = true;
}
}
if (.@missing) return;
//This loop removes each item needed
for (.@i = 0; .@i < getarraysize(.@items); .@i++)
delitem .@items[.@i], .@amount[.@i];
warp .@map$, .@x, .@y;
return;
}
}