rpsroulette.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. //===== rAthena Script =======================================
  2. //= Rock Scissors Roulette
  3. //===== By: ==================================================
  4. //= acky
  5. //===== Current Version: =====================================
  6. //= 1.2
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Plays a hybrid Russian Roulette Rock Scissors Paper game.
  11. //===== Additional Comments: =================================
  12. //= Prizes customizable, Added emotions.
  13. //= 1.2 Fixes by Blackthunder and me [Poki#3]
  14. //============================================================
  15. cmd_in02,182,126,2 script Crazy Boris 85,{
  16. set .@counter,1;
  17. mes "Hey you! Up for Rock Scissors Roulette?";
  18. next;
  19. menu "Let me play.",PLAY,"Explain the rules.",RULES,"Leave",LEAVE;
  20. SAME:
  21. mes "Draw! Again!";
  22. next;
  23. PLAY:
  24. mes "Rock... Paper...";
  25. set .@opp, rand(1,3);
  26. menu "^0000FFROCK!",-,"^FF0000SCISSORS!",SCISSORS,"^00FF00PAPER!^000000",PAPER;
  27. if (.@lastchoice == 1) set .@opp, rand(1,3);
  28. if (.@opp == 1) emotion e_rock;
  29. else if (.@opp == 2) emotion e_scissors;
  30. else emotion e_paper;
  31. set .@lastchoice,1;
  32. if (.@opp == 1) goto SAME;
  33. if (.@opp == 2) goto WIN;
  34. goto LOSE;
  35. SCISSORS:
  36. if (.@lastchoice == 2) set .@opp,rand(1,2);
  37. if (.@opp == 1) emotion e_rock;
  38. else if (.@opp == 2) emotion e_scissors;
  39. else emotion e_paper;
  40. set .@lastchoice,2;
  41. if (.@opp == 1) goto LOSE;
  42. if (.@opp == 2) goto SAME;
  43. goto WIN;
  44. PAPER:
  45. if (.@lastchoice == 3) set .@opp,rand(2,3);
  46. if (.@opp == 1) emotion e_rock;
  47. else if (.@opp == 2) emotion e_scissors;
  48. else emotion e_paper;
  49. set .@lastchoice,3;
  50. if (.@opp == 1) goto WIN;
  51. if (.@opp == 2) goto LOSE;
  52. goto SAME;
  53. WIN:
  54. mes "Damnit, You Win!";
  55. emotion e_swt2;
  56. next;
  57. set .@win, 1;
  58. goto YOUPULL;
  59. LOSE:
  60. emotion e_heh;
  61. mes "Boorah! You Lose!";
  62. next;
  63. set .@win, 0;
  64. YOUPULL:
  65. mes .@counter +" of 6";
  66. if ( .@counter == 6 )
  67. mes "Say your prayers";
  68. set .@pull, rand( 1,( 7 -.@counter ) );
  69. set .@counter, .@counter +1;
  70. next;
  71. if ( .@pull == 1 ) {
  72. if ( .@win ) goto KILL;
  73. specialeffect2 EF_SUI_EXPLOSION;
  74. emotion e_gg;
  75. percentheal -100,-100;
  76. mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
  77. mes "You're dead!";
  78. close;
  79. }
  80. emotion e_pif;
  81. mes "*^0000FFClick^000000* whew...";
  82. goto PLAY;
  83. RULES:
  84. mes "Ok here are the rules:";
  85. mes "I have with me a ^FF00006^000000 chamber pistol with ^FF00001^000000 round. First we play ^FF0000Scissors ^00FF00Paper ^0000FFRock^000000. The loser pulls the trigger. The winner is whoever comes out best.";
  86. mes "Beat me to win a prize.";
  87. next;
  88. menu "Let me play.",-,"No thanks.",LEAVE;
  89. mes "Ok here we go...";
  90. next;
  91. goto PLAY;
  92. KILL:
  93. specialeffect EF_SUI_EXPLOSION;
  94. emotion e_omg;
  95. mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
  96. mes "OWWW @#$%^!! THAT HURT LIKE HELL!!";
  97. next;
  98. mes "Congratulations! You have won...";
  99. switch( rand( 1,10 ) ) {
  100. case 1: setarray .@reward[0], 10,984; break;
  101. case 3: setarray .@reward[0],100,601; break; // 100x Fly Wings
  102. case 4: setarray .@reward[0], 8,603; break; // 8x Old Blue Box
  103. case 5: setarray .@reward[0], 4,617; break; // 4x Old Violet Box
  104. case 6: setarray .@reward[0], 1,616; break; // 1x Old Card Album
  105. case 7: setarray .@reward[0], 10,604; break; // 10x Dead Branch
  106. case 8: setarray .@reward[0], 3,969; break; // 3x Gold
  107. case 10: setarray .@reward[0],20,505; break; // 20x Blue Potion
  108. case 2:
  109. case 9:
  110. setarray .@reward[0], 10,985;
  111. }
  112. mes .@reward[0] +"x "+ getitemname( .@reward[1] ) +"!";
  113. getitem .@reward[1], .@reward[0];
  114. close;
  115. LEAVE:
  116. mes "Pansy.";
  117. close;
  118. }