prontera,155,181,5 script Sample#item_rand_item 757,{ mes "Pay "+.amount+"x "+getitemname( .itemid )+" and get random items."; while ( countitem( .itemid ) >= .amount ) { if ( select( "Pay","Cancel" ) == 2 ) break; delitem .itemid,.amount; do { .@index = rand( .item_size ); } while( rand( .total_rate ) > .rate[.@index] ); getitem .item[.@index],1; announce " '"+strcharinfo(0)+"' gained "+getitemname( .item[.@index] )+" at "+.rate[.@index]+"%. Gratz.",bc_all; } close; OnInit: .itemid = 512; .amount = 100; setarray .item,501,502,503,504,505,506,507; setarray .rate, 10, 10, 20, 30, 30, 40, 50; .item_size = getarraysize( .item ); for ( .@i = 0; .@i < .item_size; .@i++ ) .total_rate += .rate[.@i]; end; }