Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,164,173,3 script Ticket Gambling 562,{
- mes .n$;
- for( .@j = 0; .@j < getarraysize(.item); .@j++ ) {
- mes .qnt[.@j] +"x "+ Itemlink(.item[.@j ]) +"";
- }
- next;
- mes .n$;
- mes "Would you like to insert a Ticket now?";
- next;
- if( select("- Insert Ticket:- Cancel") == 2 ) {
- mes .n$;
- mes " ";
- close;
- }
- if( countitem(7608) >= 1 ) {
- mes .n$;
- mes "^0000FF*You insert the Promotion Ticket into the Machine slot and watch as she pulls the Ticket automatically*^000000";
- next;
- mes .n$;
- mes "This is great! This will be very useful.";
- delitem 7608,1;
- for( .@i = 0; .@i < getarraysize(.item); .@i++ ) {
- if( rand(1,100) <= .chance[.@i] ) {
- if( .item[.@i] == .GlobalMessage ) {
- announce "Player "+ strcharinfo(0) +" obtaining "+ .qnt[.@i] +" x "+ getitemname(.item[.@i]) +".",0;
- }
- getitem .item[.@i],.qnt[.@i];
- .@reward = 1;
- mes ""+.qnt[.@i]+" x "+Itemlink(.item[.@i])+"";
- close;
- }
- }
- if( !.@reward ) {
- .@i = rand(getarraysize(.item));
- if( .item[.@i] == .GlobalMessage ) {
- announce "Player "+ strcharinfo(0) +" obtaining "+ .qnt[.@i] +" x "+ getitemname(.item[.@i]) +".",0;
- }
- getitem .item[.@i], .qnt[.@i];
- end;
- }
- else {
- mes "You must have ^008800Premium Ticket^000000 to receive one of the items.";
- close;
- }
- }
- }
- OnInit:
- .n$ = "[ Ticket Gambling ]";
- // Array of items, quantity and chance.
- // Chance 1 = 0.01
- setarray .item[0], 30029, 12412, 12915, 12903, 12904, 12908, 12905, 12906, 12907, 12912, 13858, 13588, 12210, 12709, 12710, 13718, 13750, 13756, 13714, 13711, 7608;
- setarray .qnt[0], 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 20, 5, 1, 1, 1, 1;
- setarray .chance[0], 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 10, 10;
- // Send a Global Message to everyone online when win item with id
- .GlobalMessage = 7608;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement