To modify your script so that the NPC checks for 6 different item requirements before allowing the player to use the warp, you need to enhance the F_Warp function to handle multiple items and their respective quantities. Here is a modified version of your script that checks for 6 different items and their amounts before warping the player:
lhz_dun03,239,78,4 script Bio Entrance 651,{
function F_Warp;
if (countitem(501) > 0 && countitem(502) > 0 && countitem(503) > 0 && countitem(504) > 0 && countitem(505) > 0 && countitem(506) > 0) goto case_1;
else {
mes "You do not have the required items to use this warp.";
close;
}
case_1:
F_Warp([501, 502, 503, 504, 505, 506], [1, 1, 1, 1, 1, 1], "lhz_dun04", 244, 61);
end;
end;
function F_Warp {
.@items = getarg(0);
.@amounts = getarg(1);
.@map$ = getarg(2, "");
.@x = getarg(3, 0);
.@y = getarg(4, 0);
for (.@i = 0; .@i < getarraysize(.@items); .@i++) {
if (countitem(.@items[.@i]) < .@amounts[.@i]) {
mes "You do not have enough of item " + .@items[.@i] + " to use this warp.";
close;
}
}
for (.@i = 0; .@i < getarraysize(.@items); .@i++) {
delitem .@items[.@i], .@amounts[.@i];
}
warp .@map$, .@x, .@y;
return;
}
}
fireboy and watergirl