Guest User

Untitled

a guest
Oct 23rd, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.18 KB | None | 0 0
  1. //##########################################################################
  2. //By: ____ _ __ __ ____ _____
  3. // | \ ___ __ __ _ | | \ \ / /_ _ _ / ___\ / ____|
  4. // | || | / _ \\ \ / /| || | \ \ / /| || \ | || | ___ | (___
  5. // | || || __/ \ \/ / | || |__ \ \/\/ / | || \| || |___|\ \___ \
  6. // __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) |
  7. //|_____________________________________________________________________/
  8. //
  9. //##########################################################################
  10. //
  11. //== Dice Event
  12. //
  13. //##########################################################################
  14. //== Edited by King R
  15. //== Removed 30 Min Timer and added trigger NPC
  16. //== Able to set prize and amount via the NPC
  17. //== Added Mapflags
  18. //== Edited area warps
  19. //##########################################################################
  20.  
  21. - script Dice#disable -1,{
  22. end;
  23.  
  24. OnInit:
  25. disablenpc "prtevent";
  26. hideonnpc "Dice#evnt1";
  27. end;
  28.  
  29. OnMinute45:
  30. announce "Mr. Dice: The Dice event will be starting shortly.",0;
  31. sleep2 10000;
  32. announce "Mr. Dice: Those who want to play, please proceed to the center of Prontera 156 159.",0;
  33. sleep2 10000;
  34. announce "Mr. Dice: After 1 Minute the Portal will close.",0;
  35. sleep2 10000;
  36. announce "Mr. Dice: Please go to the middle of Prontera 156 159 and enter the Warp Portal now if you want to join.",0;
  37. enablenpc "prtevent";
  38. initnpctimer;
  39. end;
  40.  
  41. OnTimer30000:
  42. announce "Mr. Dice: Last 30 seconds.",0;
  43. sleep2 5000;
  44. announce "Mr. Dice: If you want to join please enter the Warp Portal in Prontera 156 159.",0;
  45. end;
  46.  
  47. OnTimer50000:
  48. announce "Mr. Dice: Last 10 seconds.",0;
  49. end;
  50.  
  51. OnTimer55000:
  52. announce "Mr. Dice: 5.",0;
  53. end;
  54.  
  55. OnTimer56000:
  56. announce "Mr. Dice: 4.",0;
  57. end;
  58.  
  59. OnTimer57000:
  60. announce "Mr. Dice: 3.",0;
  61. end;
  62.  
  63. OnTimer58000:
  64. announce "Mr. Dice: 2.",0;
  65. end;
  66.  
  67. OnTimer59000:
  68. announce "Mr. Dice: 1.",0;
  69. end;
  70.  
  71. OnTimer60000:
  72. announce "Mr. Dice: Time's up.",0;
  73. end;
  74.  
  75. OnTimer61000:
  76. announce "Mr. Dice: The next Dice event will start after 30 minutes.",0;
  77. end;
  78.  
  79. OnTimer67000:
  80. disablenpc "prtevent";
  81. donpcevent "Dice#evnt1::OnEnable";
  82. stopnpctimer;
  83. end;
  84. }
  85.  
  86. prontera,144,174,4 script Mrs. Dice 959,{
  87.  
  88. if (getgmlevel() == 99) goto Dice_Admin;
  89. mes "[Mrs. Dice]";
  90. mes "Hello " + strcharinfo(0) + ", my husband Mr. Dice is currently out gambling.";
  91. mes "That buffoon is always losing our money... *sigh*";
  92. close;
  93.  
  94. Dice_Admin:
  95. mes "[Mrs. Dice]";
  96. mes "Hello GM " + strcharinfo(0) + ", what do you want to do?";
  97. menu "Check Prize",checkprize,"Set Prize",setprize,"No Thanks",enddice;
  98. startdice:
  99. next;
  100. mes "[Mrs. Dice]";
  101. mes "Ok, I'll call him this instant.";
  102. close2;
  103. goto startdiceevent;
  104. checkprize:
  105. next;
  106. mes "[Mrs. Dice]";
  107. mes "The current prize is ^008000"+ $get_item_amount +" "+ getitemname($get_item_id) +"^000000";
  108. next;
  109. goto Dice_Admin;
  110. setprize:
  111. next;
  112. mes "[Mrs. Dice]";
  113. mes "What should the prize for winning be? Please input the ID";
  114. input $get_item_id;
  115. next;
  116. mes "[Mrs. Dice]";
  117. mes "How many if this item should we give away?";
  118. input $get_item_amount;
  119. next;
  120. mes "[Mrs. Dice]";
  121. mes "So, the prize is ^008000"+ $get_item_amount +" "+ getitemname($get_item_id) +"^000000? Wonderful dear.";
  122. next;
  123. goto Dice_Admin;
  124. enddice:
  125. next;
  126. mes "[Mrs. Dice]";
  127. mes "Ok darling, nice seeing you.";
  128. close;
  129. }
  130.  
  131. //--------------------------------------------------
  132.  
  133. prontera,156,165,0 warp prtevent 2,2,quiz_01,204,90
  134.  
  135. //--------------------------------------------------
  136.  
  137. quiz_01,204,93,6 script Dice#evnt1 715,{
  138.  
  139. //--------------------------------------------------
  140.  
  141. mes "[Mr. Dice]";
  142. mes "Please tell me your name.";
  143. next;
  144. input .@name$;
  145. if(.@name$ != strcharinfo(0)) {
  146. mes "[Mr. Dice]";
  147. mes "Are you sure thats your character name?";
  148. close;
  149. }
  150.  
  151. mes "[Mr. Dice]";
  152. mes "Congrats. You've won.";
  153. close2;
  154. announce "Mr. Dice: We have a winner! well done "+.@name$+".",0;
  155. getitem 7227,50;
  156. warp "prontera",155,182;
  157. hideonnpc "Dice#evnt1";
  158. end;
  159.  
  160. OnEnable:
  161. mapannounce "quiz_01","Mr. Dice: We are about to start the Dice event.",0;
  162. sleep2 5000;
  163. mapannounce "quiz_01","Mr. Dice: But before we start the event here's how to play the game...",0;
  164. sleep2 5000;
  165. mapannounce "quiz_01","Mr. Dice: I'm only gonna say this once so read carefully.",0;
  166. sleep2 5000;
  167. mapannounce "quiz_01","Mr. Dice: I'm going to roll a number, 1 to 4. Then I'll do a count down from 5 to 0.",0;
  168. sleep2 5000;
  169. mapannounce "quiz_01","Mr. Dice: All you have to do is go stand on the box of the number you want.",0;
  170. sleep2 5000;
  171. mapannounce "quiz_01","Mr. Dice: For example, If I roll a number 4, All the players standing on numbers 1 to 3 will be warped back to town.",0;
  172. sleep2 5000;
  173. mapannounce "quiz_01","Mr. Dice: We will do it until we only have 1 player left on the map.",0;
  174. sleep2 5000;
  175. mapannounce "quiz_01","Mr. Dice: Oh yeah! Before I forget you MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",0;
  176. sleep2 5000;
  177. mapannounce "quiz_01","Mr. Dice: Simple huh?.. Let's play...",0;
  178. sleep2 5000;
  179. goto L_Start;
  180. end;
  181.  
  182. L_Start:
  183. if(getmapusers("quiz_01") == 1) goto L_Champ;
  184. if(getmapusers("quiz_01") == 0) goto L_None;
  185. if(getmapusers("quiz_01") > 1) {
  186. mapannounce "quiz_01","Mr. Dice: . . . . .",0;
  187. set $@number, rand(1,4);
  188. sleep2 10000;
  189. mapannounce "quiz_01","Mr. Dice: I have rolled. Please pick a number and go stand there.... GO!",0;
  190. sleep2 10000;
  191. mapannounce "quiz_01","Mr. Dice: 5",0;
  192. sleep2 5000;
  193. mapannounce "quiz_01","Mr. Dice: 4",0;
  194. sleep2 4000;
  195. mapannounce "quiz_01","Mr. Dice: 3",0;
  196. sleep2 3000;
  197. mapannounce "quiz_01","Mr. Dice: 2",0;
  198. sleep2 2000;
  199. mapannounce "quiz_01","Mr. Dice: 1",0;
  200. sleep2 1000;
  201. mapannounce "quiz_01","Mr. Dice: Time's up.",0;
  202. donpcevent "evnt#1::OnEnable";
  203. mapannounce "quiz_01","Mr. Dice: The winning number is "+$@number+".",0;
  204. if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1;
  205. if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2;
  206. if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3;
  207. if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4;
  208. end;
  209. }
  210.  
  211. L_Lose1:
  212. areawarp "quiz_01",183,81,191,59,"prontera",155,182;
  213. areawarp "quiz_01",195,81,203,59,"prontera",155,182;
  214. areawarp "quiz_01",207,81,215,59,"prontera",155,182;
  215. goto L_Start;
  216. end;
  217.  
  218. L_Lose2:
  219. areawarp "quiz_01",183,81,191,59,"prontera",155,182;
  220. areawarp "quiz_01",195,81,203,59,"prontera",155,182;
  221. areawarp "quiz_01",219,81,227,59,"prontera",155,182;;
  222. goto L_Start;
  223. end;
  224.  
  225. L_Lose3:
  226. areawarp "quiz_01",183,81,191,59,"prontera",155,182;
  227. areawarp "quiz_01",207,81,215,59,"prontera",155,182;
  228. areawarp "quiz_01",219,81,227,59,"prontera",155,182;
  229. goto L_Start;
  230. end;
  231.  
  232. L_Lose4:
  233. areawarp "quiz_01",195,81,203,59,"prontera",155,182;
  234. areawarp "quiz_01",207,81,215,59,"prontera",155,182;
  235. areawarp "quiz_01",219,81,227,59,"prontera",155,182;
  236. goto L_Start;
  237. end;
  238.  
  239. L_Champ:
  240. mapannounce "quiz_01","Mr. Dice: Come to me and tell me your name.",0;
  241. hideoffnpc "Dice#evnt1";
  242. end;
  243.  
  244. L_None:
  245. //disablenpc "Dice#evnt1";
  246. hideonnpc "Dice#evnt1";
  247. end;
  248. }
  249.  
  250. - script evnt#1 -1,{
  251.  
  252. OnEnable:
  253. areawarp "quiz_01",182,94,228,88,"prontera",155,182;
  254. areawarp "quiz_01",185,87,188,82,"prontera",155,182;
  255. areawarp "quiz_01",197,87,200,82,"prontera",155,182;
  256. areawarp "quiz_01",209,87,212,82,"prontera",155,182;
  257. areawarp "quiz_01",221,87,224,82,"prontera",155,182;
  258. end;
  259. }
  260.  
  261. // -- Mapflags
  262. quiz_01 mapflag nowarp
  263. quiz_01 mapflag nowarpto
  264. quiz_01 mapflag noteleport
  265. quiz_01 mapflag nosave
  266. quiz_01 mapflag nomemo
  267. quiz_01 mapflag nobranch
Advertisement
Add Comment
Please, Sign In to add comment