Advertisement
Guest User

Untitled

a guest
Apr 13th, 2015
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. //===== By: ==================================================
  2. //= EL Dragon
  3. //===== Current Version: =====================================
  4. //= 1.00
  5. //===== Compatible With: =====================================
  6. //= rAthena SVN
  7. //============================================================
  8. prontera,156,176,4 script Slot Machine 790,{
  9.  
  10. //--------------------- Config ----------------------------------//
  11. set .SlotMachineBet, 671; //BET ITEM
  12. set .SlotMachineWin, 671; //WIN ITEM
  13. set .SlotMachineChange, 100; //Chance to win is (1 = 0,1%)
  14. //----------------------------------------------------------------//
  15.  
  16. mes "[^FF7700Slot Machine^000000]";
  17. mes "Hello my fellow friend.";
  18. mes "Wanna play a little game?";
  19. next;
  20.  
  21. switch(select("Yes:Tell me more:No")) {
  22.  
  23. case 1:
  24. mes "[^FF7700Slot Machine^000000]";
  25. mes "First I need ^FF00001^000000 " + getitemname(.SlotMachineBet) + ".";
  26. next;
  27.  
  28. switch(select("Give 1 " + getitemname(.SlotMachineBet) + ":I changed my mind")) {
  29.  
  30. case 1:
  31. if (countitem(.SlotMachineBet) < 1) {
  32. mes "[^FF7700Slot Machine^000000]";
  33. mes "Sorry, but you don't have any " + getitemname(.SlotMachineBet) + "!";
  34. close;
  35. }
  36.  
  37. delitem(.SlotMachineBet, 1);
  38. set $delcoins, $delcoins+1;
  39. set $SlotMachinejackpot, $SlotMachinejackpot+1;
  40. mes "[^FF7700Slot Machine^000000]";
  41. mes "Let's see if you won";
  42. mes "Good Luck!";
  43. next;
  44.  
  45. set .@slot_ran,rand(1,1000);
  46. if (.@slot_ran <= .SlotMachineChange) {
  47. mes "[^FF7700Slot Machine^000000]";
  48. mes "^00FF00You win!^000000";
  49. mes "Congratulations!";
  50. specialeffect 10;
  51. specialeffect 8;
  52. getitem(.SlotMachineWin, $SlotMachinejackpot/2);
  53. announce strcharinfo(0) + " has won " + $SlotMachinejackpot/2 + " " + getitemname(.SlotMachineWin) + "'s !",0;
  54.  
  55.  
  56. set $SlotMachinejackpot, 2;
  57. close;
  58. } else {
  59. mes "[^FF7700Slot Machine^000000]";
  60. mes "^FF0000You lose.^000000";
  61. mes "I'm sorry, maybe next time!";
  62. specialeffect 21;
  63. close;
  64. }
  65.  
  66.  
  67. case 2:
  68. goto L_exit;
  69. }
  70.  
  71. case 2:
  72. mes "[^FF7700Slot Machine^000000]";
  73. mes "First you have to pay me ^FF00001^000000 " + getitemname(.SlotMachineBet) + ". If you win you get the jackpot. That's everything.";
  74. close;
  75.  
  76. case 3:
  77. goto L_exit;
  78. }
  79.  
  80. L_exit:
  81. mes "[^FF7700Slot Machine^000000]";
  82. mes "Maybe next time.";
  83. mes "See you later!";
  84. close;
  85.  
  86. OnInit:
  87. while(1) {
  88. delwaitingroom;
  89. WaitingRoom "Jackpot: " + $SlotMachinejackpot/2,0;
  90. sleep 1000;
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement