Advertisement
Paulinds

Fast Type Event

Mar 4th, 2013
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. //FAST TYPE EVENT
  2. //Credits to Emistry for making the script
  3. //Paulinds for requesting the script, details & idea.
  4.  
  5. prontera,127,167,5 script Fast-Type Event 421,{
  6.  
  7. if(getgmlevel() >= 99) callsub L_GM;
  8. if( !.Event ) {
  9. mes "There is no Event right now.";
  10. } else if ( .String$ == "" ) {
  11. npctalk "Wait for the next round..";
  12.  
  13. } else {
  14. mes "Type the Correct Sentences.";
  15. mes "^FF0000" + .String$ + "^000000";
  16. input .@Type$;
  17. if( .String$ == "" ) {
  18. announce "Sorry, " + strcharinfo(0) + " is a bit slow..",0;
  19. close;
  20. }
  21. if ( .String$ == .@Type$ && .Event ) {
  22. getitem 30153, 3; //EDIT THE PRIZE HERE
  23. announce "Fast-Type Event: " + strcharinfo(0) + " typed the correct string!",0;
  24. set .String$, "";
  25. set .Round, .Round + 1;
  26. donpcevent "Fast-Type Event::OnStart2";
  27. } else {
  28. announce "" + strcharinfo(0) + " mispelled some strings XD",0;
  29. }
  30. }
  31. close;
  32.  
  33. OnMinute00:
  34. OnMinute30:
  35. if(.Event) end;
  36. donpcevent "Fast-Type Event::OnStart";
  37. end;
  38.  
  39. OnStart:
  40. announce "Fast-Type Event has started at Prontera 125 165 !",0;
  41. L_Begin:
  42. set .Event, 1;
  43. set .String$, "";
  44. while( getstrlen( .String$ ) < .Length ){
  45. set .String$,.String$ + .List$[ rand( getarraysize( .List$ ) ) ];
  46. }
  47. announce "Round "+(.Round+1)+" Started !",0;
  48. end;
  49.  
  50. OnStart2:
  51. sleep2 5000;
  52. if(.Round == .Rounds) {
  53. if(!.Event) end;
  54. announce "Fast-Type Event: Event is over!",0;
  55. set .Event, 0;
  56. set .Round, 0;
  57. end;
  58. }
  59. if(!.Event) end;
  60. announce "Fast-Type Event: Next round starts in 5 seconds...",0;
  61. sleep2 5000;
  62. if(!.Event) end;
  63. goto L_Begin;
  64.  
  65. L_GM:
  66. mes "Fast-Type event is" + (.Event?"^00FF00 ON^000000":"^FF0000 OFF^000000");
  67. if(select((!.Event?"^00FF00Start":"^FF0000End") + " Event^000000","Normal Player") == 2) return;
  68. switch(.Event) {
  69. case 1:
  70. set .Event, 0;
  71. set .Round, 0;
  72. set .String$, "";
  73. announce "Fast-Type Event: A GM has ended the event.",0; break;
  74. default:
  75. donpcevent "Fast-Type Event::OnStart";
  76. }
  77. close;
  78.  
  79. OnInit:
  80. set .Length,28; //EDIT THE LENGTH OF CHARACTERS TO BE TYPED
  81. set .Rounds,5; //EDIT THE ROUNDS
  82. setarray .List$,";","B","_","D","E","%","=","H","I","J","/","L","M","N","6","P","Q","]","S","T",","; //YOU CAN ADD LETTERS, DIGITS & SYMBOLS HERE..
  83. end;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement