Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2018
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. prontera,155,181,5  script  Sample  4_F_KAFRA1,{
  2.     .@ticket_id = 7539;
  3.     .@amount = 1;
  4.    
  5.     if (countitem(.@ticket_id) >= .@amount) {
  6.         delitem .@ticket_id, .@amount;
  7.         do {
  8.             .@i = rand(.item_size);
  9.         } while (rand(100) < .rate[.@i]);
  10.         getitem .item_id[.@i], .amount[.@i];
  11.         npctalk "you gained "+.amount[.@i]+"x "+getitemname(.item_id[.@i]);
  12.     }
  13.     end;
  14.    
  15.     OnInit:
  16.         setarray .item_id, 501, 502, 503, 504, 505, 506;
  17.         setarray .amount, 1, 2, 3, 4, 5, 6;
  18.         setarray .rate, 10, 20, 30, 40, 50, 60;
  19.        
  20.         .item_size = getarraysize(.item_id);
  21.         end;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement