Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,155,181,5 script Sample 4_F_KAFRA1,{
- .@ticket_id = 7539;
- .@amount = 1;
- if (countitem(.@ticket_id) >= .@amount) {
- delitem .@ticket_id, .@amount;
- do {
- .@i = rand(.item_size);
- } while (rand(100) < .rate[.@i]);
- getitem .item_id[.@i], .amount[.@i];
- npctalk "you gained "+.amount[.@i]+"x "+getitemname(.item_id[.@i]);
- }
- end;
- OnInit:
- setarray .item_id, 501, 502, 503, 504, 505, 506;
- setarray .amount, 1, 2, 3, 4, 5, 6;
- setarray .rate, 10, 20, 30, 40, 50, 60;
- .item_size = getarraysize(.item_id);
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement