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;
dispbottom old;
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
.@c = (countitem(.items[.@i]) / .items[.@i +1]);
if(.@c < old){
set old, .@c;
}
dispbottom .@c;
}
mes "[SE Boxer]";
if(old == 0){
mes "You do not have enought Items!";
end;
}
mes "I can pack " + old + "Boxes!";
if(select("Yes, of course!:No!!!") -1){
next;
mes "[SE Boxer]";
mes "Ok, bye ~";
}else{
mes "[SE Boxer]";
mes "I packed " + old + " Boxes!";
for(.@i = 0; .@i < getarraysize(.items); .@i = .@i + 2){
delitem .items[.@i], .items[.@i + 1] * old;
}
getitem .reward, old;
}
}
end;
OnInit:
setarray .items[0],984,1,985,1,7049,30,717,5,716,5,715,5;
set .reward, 14288;
end;
}