- shop dynamicshop -1,501:222new_1-1,45,77,4 script Donation Shop 685,{ set .@currency, 7179; // pods mes "[Donation Shop]"; mes "What do you want to buy?"; next; switch(select("Headgears:Item Boost:etc") { //Headgears case 1: setarray .@items, 1750,1,1766,2; // Usage : <item id>,<price> break; //Item Boost case 2: setarray .@items, 1750,1,1766,2; // Usage : <item id>,<price> break; //etc case 3: setarray .@items, 1750,1,1766,2; // Usage : <item id>,<price> break; } npcshopitem "dynamicshop",0,0; for (set .@i, 0; .@i < getarraysize(.@items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.@items[.@i], .@items[.@i+1]; callshop "dynamicshop",1; npcshopattach "dynamicshop"; end;OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.@items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.@currency) < .@items[.@j + 1] ) { mes "You don't have enough " +getitemname(.@currency)+ " to purchase this item."; close; } else { delitem .@currency, .@items[.@j + 1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; dispbottom @bought_nameid[.@k]+" "+ .@items[.@j + 1]+" "+ .@currency; end; } } else dispbottom "You cannot carry out more items with you"; end; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: waitingroom "Donation Shop",0; end;}