Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 28th, 2012  |  syntax: None  |  size: 6.36 KB  |  hits: 246  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //##########################################################################
  2. //By: ____                    _      __        __           ____    _____  #
  3. //   |    \   ___ __    __ _ | |     \ \      / /_  _   _  / ___\  / ____| #
  4. //   | ||  | / _ \\ \  / /| || |      \ \    / /| || \ | || | ___ | (___   #
  5. //   | ||  ||  __/ \ \/ / | || |__     \ \/\/ / | ||  \| || |___|\ \___ \  #
  6. // __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | #
  7. //|_____________________________________________________________________/  #
  8. //                                                                         #
  9. //##########################################################################
  10. //                                                                         #
  11. //== Dice Event                                                            #
  12. //                                                                         #
  13. //##########################################################################
  14. //                                                                         #
  15. //== Automatically starts a dice event every 30 minutes of every hour      #
  16. //                                                                         #
  17. //== Prize- Change 13723 to any item ID you want the winner to recieved    #
  18. //                                                                         #                                         // Code Modify by : WordsUp
  19. // Credit still for mAisakaTaiga                                
  20. //##########################################################################
  21.  
  22. -       script  Dice#announcer  -1,{
  23.  
  24. OnInit:
  25.         disablenpc "prtevent";
  26.         hideonnpc "Dice#evnt1";
  27.         end;
  28.  
  29. OnMinute20:
  30.         announce "Dice: We are going to have a Dice event.",0;
  31.         sleep2 10000;
  32.         announce "Dice: For those who wants to join, Please proceed Prontera 161 , 179 and enter the Warp Portal.",0;
  33.         sleep2 10000;
  34.         announce "Dice: After 1 Minute the Portal will close.",0;
  35.         sleep2 10000;
  36.         announce "Dice: So please go to Prontera 161 , 179 and enter the Warp Portal now if you want to join.",0;
  37.         enablenpc "prtevent";
  38.         initnpctimer;
  39.         end;
  40.  
  41. OnTimer30000:
  42.         announce "Dice: Last 30 seconds.",0;
  43.         sleep2 5000;
  44.         announce "Dice: If you want to join please enter the Warp Portal beside me here Prontera 161 , 179.",0;
  45.         end;
  46.        
  47. OnTimer50000:
  48.         announce "Dice: Last 10 seconds.",0;
  49.         end;
  50.        
  51. OnTimer55000:
  52.         announce "Dice: 5.",0;
  53.         end;
  54.        
  55. OnTimer56000:
  56.         announce "Dice: 4.",0;
  57.         end;
  58.        
  59. OnTimer57000:
  60.         announce "Dice: 3.",0;
  61.         end;
  62.        
  63. OnTimer58000:
  64.         announce "Dice: 2.",0;
  65.         end;
  66.        
  67. OnTimer59000:
  68.         announce "Dice: 1.",0;
  69.         end;
  70.        
  71. OnTimer60000:
  72.         announce "Dice: Time's up.",0;
  73.         end;
  74.        
  75. OnTimer61000:
  76.         disablenpc "prtevent";
  77.         donpcevent "Dice#evnt1::OnEnable";
  78.         stopnpctimer;
  79.         end;
  80.        
  81. OnTimer62000:
  82.         announce "Dice: The next Dice event will begin after 30 minutes.",0;
  83.         end;
  84.         }
  85.        
  86. //--------------------------------------------------
  87.        
  88. prontera,161,179,0      warp    prtevent        2,2,quiz_01,204,90     
  89.        
  90. //--------------------------------------------------
  91.  
  92. quiz_01,204,93,6        script  Dice#evnt1      715,{
  93.  
  94. //--------------------------------------------------
  95.  
  96.         mes "[Dice]";
  97.         mes "Please tell me your name";
  98.         next;
  99.         input .@name$;
  100.         if(.@name$ != strcharinfo(0)) {
  101.                 mes "[Dice]";
  102.                 mes "Are you sure thats your character name?";
  103.                 close;
  104.         }
  105.         mes "[Dice]";
  106.         mes "Congrats. You've won.";
  107.         close2;
  108.         announce "Dice: We have a winner, "+.@name$+".",0;
  109.         getitem 20001,3;
  110.         getitem 675,3;
  111.         warp "prontera",156,174;
  112.         hideonnpc "Dice#evnt1";
  113.         end;
  114.        
  115. OnEnable:
  116.         mapannounce "quiz_01","Dice: We are about to start the Dice event.",0;
  117.         sleep2 10000;
  118.         mapannounce "quiz_01","Dice: You MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",0;
  119.         sleep2 10000;
  120.         mapannounce "quiz_01","Dice: That's that.. Now let's play...",0;
  121.         sleep2 10000;
  122.         goto L_Start;
  123.         end;
  124.        
  125. L_Start:
  126.         if(getmapusers("quiz_01") == 1) goto L_Champ;
  127.         if(getmapusers("quiz_01") == 0) goto L_None;
  128.         if(getmapusers("quiz_01") > 1) {
  129.         announce "Dice: . . . . .",0;
  130.         set $@number, rand(1,4);
  131.         sleep2 10000;
  132.         announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",0;
  133.         sleep2 10000;
  134.         announce "Dice: 5",0;
  135.         sleep2 5000;
  136.         announce "Dice: 4",0;
  137.         sleep2 4000;
  138.         announce "Dice: 3",0;
  139.         sleep2 3000;
  140.         announce "Dice: 2",0;
  141.         sleep2 2000;
  142.         announce "Dice: 1",0;
  143.         sleep2 1000;
  144.         announce "Dice: Time's up.",0;
  145.         donpcevent "evnt#1::OnEnable";
  146.         announce "Dice: Winning number "+$@number+".",0;
  147.         if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1;
  148.         if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2;
  149.         if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3;
  150.         if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4;
  151.         end;
  152.         }
  153.        
  154. L_Lose1:
  155.         areawarp "quiz_01",183,81,191,59,"prontera",156,174;
  156.         areawarp "quiz_01",195,81,203,59,"prontera",156,174;
  157.         areawarp "quiz_01",207,81,215,59,"prontera",156,174;
  158.         goto L_Start;
  159.         end;
  160.  
  161. L_Lose2:
  162.         areawarp "quiz_01",183,81,191,59,"prontera",156,174;
  163.         areawarp "quiz_01",195,81,203,59,"prontera",156,174;
  164.         areawarp "quiz_01",219,81,227,59,"prontera",156,174;;
  165.         goto L_Start;
  166.         end;
  167.        
  168. L_Lose3:
  169.         areawarp "quiz_01",183,81,191,59,"prontera",156,174;
  170.         areawarp "quiz_01",207,81,215,59,"prontera",156,174;
  171.         areawarp "quiz_01",219,81,227,59,"prontera",156,174;
  172.         goto L_Start;
  173.         end;
  174.        
  175. L_Lose4:
  176.         areawarp "quiz_01",195,81,203,59,"prontera",156,174;
  177.         areawarp "quiz_01",207,81,215,59,"prontera",156,174;
  178.         areawarp "quiz_01",219,81,227,59,"prontera",156,174;
  179.         goto L_Start;
  180.         end;
  181.        
  182. L_Champ:
  183.         mapannounce "quiz_01","Dice: Come to me and tell me your name.",0;
  184.         hideoffnpc "Dice#evnt1";
  185.         end;
  186.        
  187. L_None:
  188.         announce "No One Entered the Dice Event. Event Closed",0;
  189.         hideonnpc "Dice#evnt1";
  190.         end;
  191. }
  192.        
  193. -       script  evnt#1  -1,{
  194.  
  195. OnEnable:
  196.         areawarp "quiz_01",182,94,228,88,"prontera",156,174;
  197.         areawarp "quiz_01",185,87,188,82,"prontera",156,174;
  198.         areawarp "quiz_01",197,87,200,82,"prontera",156,174;
  199.         areawarp "quiz_01",209,87,212,82,"prontera",156,174;
  200.         areawarp "quiz_01",221,87,224,82,"prontera",156,174;
  201.         end;
  202.         }
  203.  
  204. // -- Mapflags
  205. quiz_01 mapflag nowarp
  206. quiz_01 mapflag nowarpto
  207. quiz_01 mapflag noteleport
  208. quiz_01 mapflag nosave
  209. quiz_01 mapflag nomemo
  210. quiz_01 mapflag nobranch
  211. quiz_01 mapflag noloot
  212. quiz_01 mapflag noskill
  213. quiz_01 mapflag nopenalty