Advertisement
johnlol

Bombring

May 3rd, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ________________     ______            ________      
  3. ___    |_____  /________  /______      ___  __ \_____
  4. __  /| |  __  /_  __ \_  __ \  _ \     __  /_/ /  __ \
  5. _  ___ / /_/ / / /_/ /  /_/ /  __/     _  _, _// /_/ /
  6. /_/  |_\__,_/  \____//_.___/\___/      /_/ |_| \____/
  7.  
  8. */
  9.  
  10. -   script  Bombring    -1,{
  11. OnInit:
  12.     set .eventstarted, 0;
  13.     set $bombring_reward,22756;
  14.     bindatcmd "enablebombring","Bombring::OnGMStart";
  15.     bindatcmd "disablebombring","Bombring::OnGMStop";
  16.     hideonnpc "The Baaam#qz";
  17.     hideonnpc "The Baaam#prt";
  18.     end;
  19.    
  20. OnGMStart:
  21.     if (getgroupid() < 99){
  22.         dispbottom "You are not eligible for this command.", RED;
  23.         end;
  24.     }
  25.     set .eventstarted, 0;
  26. OnEventStart:
  27.     initnpctimer;
  28.     hideoffnpc "The Baaam#prt";
  29.     set .x, 5;
  30. OnTimer0000:
  31.     if (.eventstarted == 1)
  32.         end;
  33.     announce "The Baaam: The bombring event has started!",bc_all;
  34.     announce "The Baaam: Come to prontera and talk to me to join!",bc_all;
  35.     announce "The Baaam: "+.x+" minutes remaining before it starts!",bc_all;
  36.     set .x, .x - 1;
  37.     end;
  38. OnTimer60000:
  39. OnTimer120000:
  40. OnTimer180000:
  41. OnTimer240000:
  42.     if (.eventstarted == 1)
  43.         end;
  44.     announce "The Baaam: "+.x+" minutes remaining before the bombring event starts!",bc_all;
  45.     set .x, .x - 1;
  46.     end;
  47. OnTimer290000:
  48.     if (.eventstarted == 1)
  49.         end;
  50.     announce "The Baaam: 10 seconds before the bombring event starts!",bc_all;
  51.     end;
  52. OnTimer300000:
  53.     if (.eventstarted == 1)
  54.         end;
  55.     set .totalplayers, getmapusers ("quiz_02");
  56.     announce "The Baaam: "+.totalplayers+" players joined!",bc_all;
  57.     announce "The Baaam: The bombring even has started! Ciao!",bc_all;
  58.     hideonnpc "The Baaam#prt";
  59.     stopnpctimer;
  60.     callsub OnEventStart1;
  61.     end;
  62.    
  63. OnEventStart1:
  64.     set .totalplayers, getmapusers ("quiz_02");
  65.     mapannounce "quiz_02","The Baaam: Okay listen up, this is how it works.",bc_all;
  66.     sleep 2000;
  67.     mapannounce "quiz_02","The Baaam: Bombrings will run rampant in this area.",bc_all;
  68.     sleep 2000;
  69.     mapannounce "quiz_02","The Baaam: and all of them will go booooooom!",bc_all;
  70.     sleep 2000;
  71.     mapannounce "quiz_02","The Baaam: all you have to do is avoid them and stay alive :P",bc_all;
  72.     sleep 2000;
  73.     mapannounce "quiz_02","The Baaam: This will run for 30 seconds for 5 total rounds.",bc_all;
  74.     sleep 2000;
  75.     mapannounce "quiz_02","The Baaam: Sooooooooooo, ready or not here they come!!!", bc_all;
  76.    
  77.     for (set .round,1;.round <= 5;set .round, .round + 1) {
  78.         set .totalplayers, getmapusers ("quiz_02");
  79.         callsub OnBombringSummon;
  80.         sleep 10000;
  81.     }
  82.  
  83.     if (.round > 5 && getmapusers("quiz_02") > 0){
  84.         hideoffnpc "The Baaam#qz";
  85.         mapannounce "quiz_02","The Baaam: Wooooow! That's rare! People won! :D",bc_all;
  86.     }
  87.     end;
  88.        
  89. OnBombringSummon:
  90.     mapannounce "quiz_02","The Baaam: Round "+.round+"!!",bc_all;
  91.     set .eventstarted, 1;
  92.     initnpctimer;
  93.     while (.eventstarted == 1) {
  94.         if ( (3 * .totalplayers) <= 60)
  95.             areamonster "quiz_02",48,334,71,357,"Run for you life!",1904,3 * .totalplayers;
  96.         else
  97.             areamonster "quiz_02",48,334,71,357,"Run for you life!",1904,60;
  98.        
  99.         if(.round == 1) {
  100.             sleep 4000;
  101.         } else if (.round == 2) {
  102.             sleep 3000;
  103.         } else if (.round == 3) {
  104.             sleep 2000;
  105.         } else if (.round == 4) {
  106.             sleep 1500;
  107.         } else if (.round == 5) {
  108.             sleep 1000;
  109.         }
  110.     }
  111.     if (.eventstarted == 1)
  112.         mapannounce "quiz_02","The Baaam: Round "+.round+" has finished!!",bc_all;
  113.     if (.round < 5)
  114.         mapannounce "quiz_02","The Baaam: Next round in 10 seconds.",bc_all;
  115.     return;
  116.    
  117. OnTimer31000:
  118.     if (.eventstarted == 0)
  119.         end;
  120.     else
  121.         set .eventstarted, 0;
  122.         killmonsterall "quiz_02";
  123.         cleanmap "quiz_02";
  124.     stopnpctimer;
  125.     end;
  126.    
  127. OnPCDieEvent:
  128.     if (strcharinfo(3) == "quiz_02") {
  129.         mapannounce "quiz_02","The Baaam: "+strcharinfo(0)+" has been blown up!!",bc_all;
  130.         dispbottom "You have received 100 CASHPOINTS for participating in this event.";
  131.         set #CASHPOINTS, #CASHPOINTS + 100;
  132.         warp "savepoint",0,0;
  133.         if (getmapusers("quiz_02") <= 1) {
  134.             stopnpctimer;
  135.             set .eventstarted, 0;
  136.             set .round, 6;
  137.             killmonsterall "quiz_02";
  138.             cleanmap "quiz_02";
  139.             hideoffnpc "The Baaam#qz";
  140.             mapannounce "quiz_02","The Baaam: Alright! We have a winner!!",bc_all;
  141.         }  
  142.     }
  143.     end;
  144.    
  145. OnGMStop:
  146.     set .eventstarted, 0;
  147.     set .round, 6;
  148.     killmonsterall "quiz_02";
  149.     cleanmap "quiz_02";
  150.     hideoffnpc "The Baaam#qz"; 
  151.     end;
  152. }
  153.  
  154. quiz_02,59,345,5    script  The Baaam#qz    856,{
  155. mes "[The Baaam]";
  156. mes "Ha! You were really good back there!";
  157. mes "Here's a token for entertaining me.";
  158. next;
  159. mes "^00FF00You received 250 CASHPOINTS!";
  160. mes "You have received ^00FF00"+getitemname($bombring_reward)+"^000000!";
  161. set #CASHPOINTS, #CASHPOINTS + 250;
  162. getitem $bombring_reward,1;
  163. next;
  164. mes "[The Baaam]";
  165. mes "Now get out of here before I make you explode!";
  166. next;
  167. atcommand "@go 0";
  168. end;
  169. }
  170.  
  171. prontera,153,182,5  script  The Baaam#prt   879,{
  172. mes "[The Baaam]";
  173. mes "Hi! Wanna join the Bombring event?";
  174. Switch(Select("Yes!:What is it about?:Nah, not interested.")) {
  175.     case 1:
  176.         mes "[The Baaam]";
  177.         mes "Alright! Get ready!";
  178.         next;
  179.         warp "quiz_02",59,345; 
  180.         break;
  181.     case 2:
  182.         mes "[The Baaam]";
  183.         mes "Well all you have to do is stay alive.";
  184.         mes "That is by dodging exploding ^00FF00Bombrings^000000!";
  185.         next;
  186.         mes "[The Baaam]";
  187.         mes "If you win, you will get:";
  188.         mes "1x ^00FF00250 CASHPOINTS^000000!";
  189.         mes "1x ^00FF00"+getitemname($bombring_reward)+"^000000!";
  190.         close;
  191.         break;
  192.     case 3:
  193.         mes "[The Baaam]";
  194.         mes "Alright, see you around!";
  195.         close;
  196.         break;
  197.     }
  198. end;
  199.  
  200. OnInit:
  201.     hideonnpc "The Baaam#prt";
  202. }
  203.  
  204.  
  205.  
  206. quiz_02 mapflag pvp off
  207. quiz_02 mapflag nopenalty
  208. quiz_02 mapflag nowarpto
  209. quiz_02 mapflag nocommand   99
  210. quiz_02 mapflag nodrop
  211. quiz_02 mapflag nomobloot
  212. quiz_02 mapflag noskill
  213. quiz_02 mapflag noSave
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement