prontera,147,176,4 script SE Boxer 794,{
mes "[SE Boxer]";
mes "Hello, do you want to box your items?";
if (select("Yes:No") -1) end;
next;
mes "[SE Boxer]";
mes "You need:";
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
mes .items[.@i + 1] + "x " + getitemname(.items[.@i]);
}
if (select ("Trade all!:Single trade!") -1){
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
dispbottom .items[.@i] + .items[.@i + 1];
if(countitem(.items[.@i]) < .items[.@i + 1]){
next;
mes "[SE Boxer]";
mes "Maybe there is something missing!!!!";
end;
}
}
next;
mes "[SE Boxer]";
mes "Nice! You have all items!";
mes "Do you want to Box your items now?";
if(select("Yes, of course!:No!!!") -1){
next;
mes "Ok, bye ~";
}else{
next;
mes "[SE Boxer]";
mes "Here are your items!";
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
delitem .items[.@i], .items[.@i + 1];
}
getitem .reward, 1;
end;
}
}else{
next;
mes "[SE Boxer]";
mes "Trade all!";
next;
set .@old, 1000;
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
.@c = (countitem(.items[.@i]) / .items[.@i +1])
if(.@c < .@old){
set .@old, .@c;
}
}
mes "[SE Boxer]";
mes "I can pack " + .@old + "Boxes!";
if(select("Yes, of course!:No!!!") -1){
next;
mes "[SE Boxer]";
mes "Ok, bye ~";
}else{
}