Advertisement
Guest User

Untitled

a guest
Nov 6th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. - script dice -1,{
  2.  
  3. OnInit:
  4. .n$ = "[ Dice ]";
  5. disablenpc "Dice#evnt1";
  6. .Map_Event$ = "quiz_01";
  7. bindatcmd "dice",strnpcinfo(0)+"::OnAtJoinDice";
  8. bindatcmd "dicestart", strnpcinfo(0)+"::OnStart", 99,100;
  9. end;
  10.  
  11. OnStart:
  12. OnMinute00:
  13. if( gettime(3) % 1 != 0 ) end;
  14. if (.EventStatus) end;
  15. .EventOnJoin = 1;
  16. .EventStatus = 1;
  17. announce "Dice: We are going to have a Dice event.",0;
  18. sleep 10000;
  19. announce "Dice: For those who wants to join, use @dice",0;
  20. sleep 10000;
  21. announce "Dice: After 1 Minute Event will close.",0;
  22. sleep 10000;
  23. announce "Dice: So please if you want to join. use @dice",0;
  24. initnpctimer;
  25. end;
  26.  
  27. OnTimer30000:
  28. announce "[ Dice ] Event Last 30 seconds.",0;
  29. sleep 1000;
  30. announce "[ Dice ] Event If you want to join Type @dice to join the event..",0;
  31. end;
  32.  
  33. OnTimer40000:
  34. announce "[ Dice ] Event Last 10 seconds.",0;
  35. end;
  36.  
  37. OnTimer41000:
  38. announce "[ Dice ] Event 5.",0;
  39. end;
  40.  
  41. OnTimer42000:
  42. announce "[ Dice ] Event 4.",0;
  43. end;
  44.  
  45. OnTimer43000:
  46. announce "[ Dice ] Event 3.",0;
  47. end;
  48.  
  49. OnTimer44000:
  50. announce "[ Dice ] Event 2.",0;
  51. end;
  52.  
  53. OnTimer45000:
  54. announce "[ Dice ] Event 1.",0;
  55. end;
  56.  
  57. OnTimer46000:
  58. announce "[ Dice ] Event Time's up.",0;
  59. .EventOnJoin = 0;
  60. end;
  61.  
  62. OnTimer47000:
  63. announce "[ Dice ] Event The next Dice event will begin after 1 Hour",0;
  64. donpcevent "Dice#evnt1::OnEnable";
  65. stopnpctimer;
  66. end;
  67.  
  68. OnAtJoinDice:
  69. if (.EventOnJoin == 1) { warp .Map_Event$,205,92; end; }
  70. if (.EventStatus == 1) {
  71. mes .n$;
  72. mes $fl$;
  73. mes " ";
  74. mes "Event already started.";
  75. close;
  76. } else
  77. mes .n$;
  78. mes $fl$;
  79. mes " ";
  80. mes "Event not yet started.";
  81. end;
  82.  
  83. }
  84.  
  85.  
  86. quiz_01,204,93,4 script Dice#evnt1 811,{
  87.  
  88. mes "[Dice]";
  89. mes "Please tell me your name";
  90. next;
  91. input .@name$;
  92. if(.@name$ != strcharinfo(0)) {
  93. mes "[Dice]";
  94. mes "Are you sure thats your character name?";
  95. close;
  96. }
  97. mes "[Dice]";
  98. mes "Congrats. You've won.";
  99. close2;
  100. announce "[ Dice ] Event We have a winner, "+.@name$+".",0;
  101. query_sql "INSERT INTO `event_rank`(`id`, `name`, `event_points`, `t_event_points`) VALUES ('" + getcharid(0) + "','" + strcharinfo(0) + "','100','100') ON DUPLICATE KEY UPDATE `event_points` = `event_points` + '100', `t_event_points` = `t_event_points` + '100'";
  102. dispbottom "You won 100 Event Points.";
  103. warp "prontera",155,183;
  104. .EventStatus = 0;
  105. disablenpc "Dice#evnt1";
  106. end;
  107.  
  108. OnEnable:
  109. mapannounce "quiz_01","[ Dice ] Event We are about to start the Dice event.",0;
  110. sleep 1000;
  111. mapannounce "quiz_01","[ Dice ] Event But before we start the event here's how to play the game. . .",0;
  112. sleep 1000;
  113. mapannounce "quiz_01","[ Dice ] Event I'm only gonna say this once so read carefully.",0;
  114. sleep 1000;
  115. mapannounce "quiz_01","[ Dice ] Event I'm going to pick a number, 1 to 4. Then I'll do a count down from 5 to 0.",0;
  116. sleep 1000;
  117. mapannounce "quiz_01","[ Dice ] Event All you have to do is go to the box of the number you want.",0;
  118. sleep 1000;
  119. mapannounce "quiz_01","[ Dice ] Event Example, If I get the number of 4, All the players standing on numbers 1 to 3 will be warped back to town.",0;
  120. sleep 1000;
  121. mapannounce "quiz_01","[ Dice ] Event We will do it again and again until we only have 1 player left on the map.",0;
  122. sleep 1000;
  123. mapannounce "quiz_01","[ Dice ] Event 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;
  124. sleep 1000;
  125. mapannounce "quiz_01","[ Dice ] Event That's that.. Now let's play...",0;
  126. sleep 1000;
  127. goto L_Start;
  128. end;
  129.  
  130. L_Start:
  131. if(getmapusers("quiz_01") == 1) goto L_Champ;
  132. if(getmapusers("quiz_01") == 0) goto L_None;
  133. if(getmapusers("quiz_01") > 1) {
  134. set $@number, rand(1,4);
  135. sleep 4000;
  136. announce "[ Dice ] Event 5",0;
  137. sleep 3000;
  138. announce "[ Dice ] Event 4",0;
  139. sleep 2000;
  140. announce "[ Dice ] Event 3",0;
  141. sleep 1000;
  142. announce "[ Dice ] Event 2",0;
  143. sleep 1000;
  144. announce "[ Dice ] Event 1",0;
  145. sleep 1000;
  146. announce "[ Dice ] Event Time's up.",0;
  147. donpcevent "evnt#1::OnEnable";
  148. announce "[ Dice ] Event Winning number "+$@number+".",0;
  149. if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1;
  150. if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2;
  151. if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3;
  152. if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4;
  153. end;
  154. }
  155.  
  156. L_Lose1:
  157. areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
  158. areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
  159. areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
  160. goto L_Start;
  161. end;
  162.  
  163. L_Lose2:
  164. areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
  165. areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
  166. areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
  167. goto L_Start;
  168. end;
  169.  
  170. L_Lose3:
  171. areawarp "quiz_01",183,81,191,59,"que_moon",34,16;
  172. areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
  173. areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
  174. goto L_Start;
  175. end;
  176.  
  177. L_Lose4:
  178. areawarp "quiz_01",195,81,203,59,"que_moon",34,16;
  179. areawarp "quiz_01",207,81,215,59,"que_moon",34,16;
  180. areawarp "quiz_01",219,81,227,59,"que_moon",34,16;
  181. goto L_Start;
  182. end;
  183.  
  184. L_Champ:
  185. .EventOnJoin = 0;
  186. mapannounce "quiz_01","[ Dice ] Event Come to me and tell me your name.",0;
  187. enablenpc "Dice#evnt1";
  188. end;
  189.  
  190. L_None:
  191. .EventOnJoin = 0;
  192. disablenpc "Dice#evnt1";
  193. end;
  194.  
  195. }
  196. - script evnt#1 -1,{
  197.  
  198. OnEnable:
  199. areawarp "quiz_01",182,94,228,88,"prontera",156,191;
  200. areawarp "quiz_01",185,87,188,82,"prontera",156,191;
  201. areawarp "quiz_01",197,87,200,82,"prontera",156,191;
  202. areawarp "quiz_01",209,87,212,82,"prontera",156,191;
  203. areawarp "quiz_01",221,87,224,82,"prontera",156,191;
  204. end;
  205. }
  206.  
  207. // == Mapflags
  208. quiz_01 mapflag nocommand 90
  209. quiz_01 mapflag nowarp
  210. quiz_01 mapflag nowarpto
  211. quiz_01 mapflag noskill
  212. quiz_01 mapflag noteleport
  213. quiz_01 mapflag nomemo
  214. quiz_01 mapflag nosave SavePoint
  215. quiz_01 mapflag noicewall
  216. quiz_01 mapflag noloot
  217. quiz_01 mapflag pvp off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement