iFoxkun

Crack the Safe

Dec 10th, 2011
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. //Made by Karul
  2.  
  3. gm02,92,90,5 script Crack the Safe Event 793,{
  4. if(getgmlevel() < 80) {
  5. mes "Sorry you must be a level 80 Admin";
  6. close;
  7. }
  8. if(select("Start Event:Nevermind")==2) close;
  9. {
  10. mes "Starting the event now...";
  11. close2;
  12. goto OnStart;
  13. }
  14. OnStart:
  15. Announce "There will be a Crack the Safe Event Held in Prontera!",bc_all | bc_blue;
  16. enablenpc "Crack the Safe";
  17. end;
  18. }
  19.  
  20. prontera,155,180,4 script Crack the Safe 793,{
  21. set .ctsservername$, "Excalibur"; // Server Name
  22. set .@name$, "^0099FF[Banker]^000000";
  23. set .ctsbankdepmin, 10000000; // Minimum to deposit and use event
  24.  
  25. mes .@name$;
  26. mes "There sure have been a lot of thefts from banks lately.";
  27. next;
  28. mes .@name$;
  29. mes "That's why you can trust us.";
  30. next;
  31. mes .@name$;
  32. mes "What do you want to do?";
  33. menu "Deposit",L_Deposit,"Keep Going",-,"View Deposit",L_View;
  34.  
  35. next;
  36. mes "^FF0000A safe has been sitting inside for a while, and no one is there to guard it.^000000";
  37. next;
  38. mes "^FF0000The note near it says, 'GMs Private Safe'^000000";
  39. next;
  40. mes "^FF0000Should you try to crack it?^000000";
  41. if(select("Yes:No")==2) close;
  42. if(#ctsdeposit < .ctsbankdepmin) {
  43. next;
  44. mes "^FF0000You find out that you must have a bank account to enter the bank.^000000";
  45. close;
  46. } else {
  47. next;
  48. mes "^FF0000You find out that you must guess a 5 digit password to open it.^000000";
  49. next;
  50. mes "^FF0000Do you continue?^000000";
  51. if(select("Yes:No")==2) close;
  52. set .@rand1, rand(0,9);
  53. set .@rand2, rand(0,9);
  54. set .@rand3, rand(0,9);
  55. set .@rand4, rand(0,9);
  56. set .@rand5, rand(0,9);
  57. next;
  58. mes "^FF0000The first digit you guess is...^000000";
  59. input .@ctspass1;
  60. if(.@ctspass1 != .@rand1) {
  61. next;
  62. mes "^FF0000A siren rings and 1 million zeny is taken to pay for a new safe.^000000";
  63. npctalk "Alert! "+strcharinfo(0)+" is trying to crack the safe!";
  64. set #ctsdeposit, #ctsdeposit -1000000;
  65. close;
  66. } else {
  67. next;
  68. npctalk strcharinfo(0)+" has gotten past the 1st digit!";
  69. mes "^FF0000You notice that you have entered the correct digit.";
  70. next;
  71. }
  72. mes "^FF0000The second digit you guess is...^000000";
  73. input .@ctspass2;
  74. if(.@ctspass2 != .@rand2) {
  75. next;
  76. mes "^FF0000A siren rings and 2 million is taken to pay for a new safe.^000000";
  77. npctalk "Alert! "+strcharinfo(0)+" is trying to crack the safe!";
  78. set #ctsdeposit, #ctsdeposit -2000000;
  79. close;
  80. } else {
  81. next;
  82. npctalk strcharinfo(0)+" has gotten past the 2nd digit!";
  83. mes "^FF0000You notice that you have entered the correct digit.";
  84. next;
  85. }
  86. mes "^FF0000The third digit you guess is...^000000";
  87. input .@ctspass3;
  88. if(.@ctspass3 != .@rand3) {
  89. next;
  90. mes "^FF0000A siren rings and 3 million is taken to pay for a new safe.^000000";
  91. npctalk "Alert! "+strcharinfo(0)+" is trying to crack the safe!";
  92. set #ctsdeposit, #ctsdeposit -3000000;
  93. close;
  94. } else {
  95. next;
  96. npctalk strcharinfo(0)+" has gotten past the 3rd digit!";
  97. mes "^FF0000You notice that you have entered the correct digit.";
  98. next;
  99. }
  100. mes "^FF0000The fourth digit you guess is...^000000";
  101. input .@ctspass4;
  102. if(.@ctspass4 != .@rand4) {
  103. next;
  104. mes "^FF0000A siren rings and 4 million is taken to pay for a new safe.^000000";
  105. npctalk "Alert! "+strcharinfo(0)+" is trying to crack the safe!";
  106. set #ctsdeposit, #ctsdeposit -4000000;
  107. close;
  108. } else {
  109. next;
  110. npctalk strcharinfo(0)+" has gotten past the 4th digit!";
  111. mes "^FF0000You notice that you have entered the correct digit.";
  112. next;
  113. }
  114. mes "^FF0000The fifth digit you guess is...^000000";
  115. input .@ctspass5;
  116. if(.@ctspass5 != .@rand5) {
  117. next;
  118. mes "^FF0000A siren rings and 5 million is taken to pay for a new safe.^000000";
  119. npctalk "Alert! "+strcharinfo(0)+" is trying to crack the safe!";
  120. set #ctsdeposit, #ctsdeposit -5000000;
  121. close;
  122. } else {
  123. next;
  124. npctalk strcharinfo(0)+" has gotten past the 5th digit!";
  125. mes "^FF0000You notice that you have entered the correct digit.";
  126. next;
  127. }
  128. mes "^FF0000You notice that all correct digits have been entered.^000000";
  129. next;
  130. mes "^FF0000Your zeny deposit has been doubled and given to you, you're bank is closed.";
  131. dispbottom "You have gained " + (#ctsdeposit * 2) + " Zeny!";
  132. Announce strcharinfo(0) + " has cracked the Game Masters' Safe!",bc_all | bc_blue;
  133. set zeny, zeny + (#ctsdeposit * 2);
  134. set #ctsdeposit, 0;
  135. close;
  136. }
  137.  
  138. L_Deposit:
  139. next;
  140. mes .@name$;
  141. mes "Welcome to the Bank of " + .ctsservername$;
  142. next;
  143. mes .@name$;
  144. mes "How much do you want to deposit?";
  145. input .@cts;
  146. if(.@cts < .ctsbankdepmin) {
  147. next;
  148. mes .@name$;
  149. mes "Sorry the minimum to start an account is " + .ctsbankdepmin;
  150. close;
  151. } else {
  152. next;
  153. mes .@name$;
  154. mes "Thank you for starting your account.";
  155. set zeny, zeny-.@cts;
  156. set #ctsdeposit, (#ctsdeposit + .@cts);
  157. close;
  158. }
  159.  
  160. L_View:
  161. if(#ctsdeposit == 0) {
  162. next;
  163. mes .@name$;
  164. mes "You have no bank account started.";
  165. next;
  166. mes .@name$;
  167. mes "Do you want to start one?";
  168. if(select("Yes:No")==2) close;
  169. goto L_Deposit;
  170. end;
  171. } else {
  172. next;
  173. mes .@name$;
  174. mes "You have " + #ctsdeposit + " inside the bank.";
  175. next;
  176. mes .@name$;
  177. mes "Do you want to deposit more?";
  178. if(select("Yes:No")==2) close;
  179. goto L_Deposit;
  180. end;
  181. }
  182. OnInit:
  183. disablenpc "Crack the Safe";
  184. }
Add Comment
Please, Sign In to add comment