Advertisement
papastudio

Mini Event Sapper

Aug 3rd, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. //Sapper by Sanasol for Live-Metal.ru
  2. revencia,154,62,5 script Sapper 115,{
  3.  
  4. mes "Want to play a sapper?";
  5. switch(select("Enter:Exit")){
  6. case 1:
  7. if (getmapusers("guild_vs4") >= 1) {
  8. mes "Someone is already playing.";
  9. close; }
  10. if (BaseLevel < 75) {
  11. mes "Small level! Must be 75+ Lvl.";
  12. close; } else {
  13. warp "guild_vs4",45,54;
  14.  
  15. close;}
  16. case 2:
  17. close;
  18. }
  19. }
  20.  
  21. guild_vs4,47,56,5 script Game Manager 121,{
  22.  
  23. mes "Hello I can give you a bomb!";
  24. mes "You must defuse it for 1 minute.";
  25. mes "If you do not have time, everything will explode.";
  26. switch(select("Get bomb:Rules:Exit")){
  27. case 1:
  28. mes "NPC's Spawned! Each NPC - this wire is a certain color.";
  29. callfunc "provoda";
  30. close;
  31. case 2:
  32. mes "You must cut all the wires! 40 pieces";
  33. mes "I will tell in what order.";
  34. mes "If you make a mistake, then everything explodes.";
  35. mes "We must stay within 60 seconds. Prize - Tcg card";
  36. close;
  37. case 3:
  38. deltimer "Game Manager::On60secs";
  39. warp "prontera",162,182;
  40. close;
  41. }
  42. On60secs:
  43. dispbottom "60 seconds ago! You do not have time!";
  44. misceffect 709;
  45. atcommand "@nuke "+strcharinfo(0);
  46. deltimer "Game Manager::On60secs";
  47. donpcevent "miner_init::npcoff";
  48. end;
  49. CLOSE;
  50. }
  51.  
  52. function script provoda {
  53. enablenpc "Red#red";
  54. enablenpc "Blue#blue";
  55. enablenpc "Black#black";
  56. enablenpc "White#white";
  57. enablenpc "Green#green";
  58. set @value,0;
  59. set @color,rand (1,5);
  60. if(@color == 1){
  61. set @color,1;
  62. mapannounce "guild_vs4","Red",bc_map,0xFFFFFF;
  63. }
  64. if(@color == 2){
  65. set @color,2;
  66. mapannounce "guild_vs4","Blue",bc_map,0xFFFFFF;
  67. }
  68. if(@color == 3){
  69. set @color,3;
  70. mapannounce "guild_vs4","Black",bc_map,0xFFFFFF;
  71. }
  72. if(@color == 4){
  73. set @color,4;
  74. mapannounce "guild_vs4","White",bc_map,0xFFFFFF;
  75. }
  76. if(@color == 5){
  77. set @color,5;
  78. mapannounce "guild_vs4","Green",bc_map,0xFFFFFF;
  79. }
  80. addtimer 60000, "Game Manager::On60secs";
  81. close;
  82. }
  83.  
  84. guild_vs4,55,51,5 script Red#red 723,{
  85.  
  86. if (@color == 1){
  87. npctalk "OK";
  88. callfunc "nextcolor";} else {
  89. npctalk "Big boom! Wrong";
  90. misceffect 722;
  91. deltimer "Game Manager::On60secs";
  92. atcommand "@nuke "+strcharinfo(0);
  93.  
  94. }
  95. }
  96.  
  97. guild_vs4,53,48,5 script Blue#blue 723,{
  98.  
  99. if (@color == 2){
  100. npctalk "OK";
  101. callfunc "nextcolor";} else {
  102. npctalk "Big boom! Wrong";
  103. misceffect 722;
  104. deltimer "Game Manager::On60secs";
  105. atcommand "@nuke "+strcharinfo(0);
  106.  
  107. }
  108. }
  109.  
  110. guild_vs4,50,45,5 script Black#black 723,{
  111.  
  112. if (@color == 3){
  113. npctalk "OK";
  114. callfunc "nextcolor";} else {
  115. npctalk "Big boom! Wrong";
  116. misceffect 722;
  117. deltimer "Game Manager::On60secs";
  118. atcommand "@nuke "+strcharinfo(0);
  119.  
  120. }
  121. }
  122.  
  123. guild_vs4,47,46,5 script White#white 723,{
  124.  
  125. if (@color == 4){
  126. npctalk "OK";
  127. callfunc "nextcolor";} else {
  128. npctalk "Big boom! Wrong";
  129. misceffect 722;
  130. deltimer "Game Manager::On60secs";
  131. atcommand "@nuke "+strcharinfo(0);
  132.  
  133. }
  134. }
  135.  
  136. guild_vs4,44,48,5 script Green#green 723,{
  137.  
  138. if (@color == 5){
  139. npctalk "OK";
  140. callfunc "nextcolor";} else {
  141. npctalk "Big boom! Wrong";
  142. misceffect 722;
  143. deltimer "Game Manager::On60secs";
  144. atcommand "@nuke "+strcharinfo(0);
  145.  
  146. }
  147. }
  148.  
  149. function script nextcolor {
  150.  
  151. set @color,rand (1,5);
  152. if(@color == 1){
  153. set @value, @value + 1;
  154. if(@value == 40) {
  155. callfunc "prize";
  156. }
  157. set @color,1;
  158. mapannounce "guild_vs4","Red",bc_map,0xFFFFFF;
  159. }
  160. if(@color == 2){
  161. set @value, @value + 1;
  162. if(@value == 40) {
  163. callfunc "prize";
  164. }
  165. set @color,2;
  166. mapannounce "guild_vs4","Blue",bc_map,0xFFFFFF;
  167. }
  168. if(@color == 3){
  169. set @value, @value + 1;
  170. if(@value == 40) {
  171. callfunc "prize";
  172. }
  173. set @color,3;
  174. mapannounce "guild_vs4","Black",bc_map,0xFFFFFF;
  175. }
  176. if(@color == 4){
  177. set @value, @value + 1;
  178. if(@value == 40) {
  179. callfunc "prize";
  180. }
  181. set @color,4;
  182. mapannounce "guild_vs4","White",bc_map,0xFFFFFF;
  183. }
  184. if(@color == 5){
  185. set @value, @value + 1;
  186. if(@value == 40) {
  187. callfunc "prize";
  188. }
  189. set @color,5;
  190. mapannounce "guild_vs4","Green",bc_map,0xFFFFFF;
  191. }
  192. end;
  193. }
  194.  
  195. function script prize {
  196.  
  197. announce strcharinfo(0)+" cleared bomb!",0,0x00FF00;
  198. mes "Done! You cleared bomb";
  199. mes "Get Award";
  200. getitem 7227,1;
  201. disablenpc "Red#red";
  202. disablenpc "Blue#blue";
  203. disablenpc "Black#black";
  204. disablenpc "White#white";
  205. disablenpc "Green#green";
  206.  
  207. deltimer "Game Manager::On60secs";
  208. warp "prontera",162,182;
  209. close;
  210. }
  211.  
  212. guild_vs4,0,0,0 script miner_init -1,{
  213. OnInit:
  214. disablenpc "Red#red";
  215. disablenpc "Blue#blue";
  216. disablenpc "Black#black";
  217. disablenpc "White#white";
  218. disablenpc "Green#green";
  219.  
  220. end;
  221.  
  222. L_npcoff:
  223. disablenpc "Red#red";
  224. disablenpc "Blue#blue";
  225. disablenpc "Black#black";
  226. disablenpc "White#white";
  227. disablenpc "Green#green";
  228.  
  229. end;
  230. }
  231.  
  232. - script miner_onclock_enb -1,{
  233.  
  234. OnClock1200:
  235. OnClock1800:
  236.  
  237. initnpctimer;
  238. OnTimer0:
  239. enablenpc "Sapper";
  240. enablenpc "Game Manager";
  241. announce "In the capital appeared NPC games 'Sapper'. It will disappear after 10 minutes",0,0x00ff00;
  242. stopnpctimer;
  243. end;
  244. }
  245.  
  246. - script miner_onclock_dis -1,{
  247.  
  248. OnClock1210:
  249. OnClock1810:
  250.  
  251. initnpctimer;
  252. OnTimer0:
  253. disablenpc "Sapper";
  254. disablenpc "Game Manager";
  255. announce " 'Sapper' turned off",0,0x00ff00;
  256. stopnpctimer;
  257. end;
  258. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement