prontera,150,190,4 script Example_changer 83,{
mes "Hello!";
mes "I can pack your items in the box.";
mes "What items you want to pack?";
next;
.@i = select(.menu$+"Cancel")-1;
if(.@i == getarraysize(.boxid)) {
mes "Bye~";
close;
}
mes "To make "+getitemname(.boxid[.@i]);
mes "I need ^0000FF"+getitemname(.item[.@i])+"^000000 - "+.amount[.@i]+" ea.";
next;
select("Ok");
if(countitem(.item[.@i]) < .amount[.@i]) {
mes "You don`t have enough items.";
close;
}
mes "Here your "+getitemname(.boxid[.@i])+"~";
delitem .item[.@i], .amount[.@i];
getitem .boxid[.@i],1;
close;
OnInit:
setarray .item[0], 608, 607;
setarray .amount[0], 30, 15;
setarray .boxid[0], 12534, 12535;
for( .@i = 0; .@i < getarraysize(.boxid); .@i++ )
.menu$ = .menu$ + getitemname(.boxid[.@i])+":";
end;
}
Hi, i write a simple script for you, you can add new item and box after OnInit.
If you want to show items name and ea. change
.menu$ = .menu$ + getitemname(.boxid[.@i])+":";
to
.menu$ = .menu$ + getitemname(.item[.@i])+" - "+.amount[.@i]+" ea.:";