Advertisement
Guest User

Untitled

a guest
Oct 17th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. - script assault -1,{
  2. OnInit:
  3. disablenpc "assault_register";
  4. end;
  5. OnWhisperGlobal:
  6. if ( compare( @whispervar0$, "on" ) == 0 ) end;
  7. if ( .assault_on == 1 ) {
  8. dispbottom "event has started";
  9. end;
  10. }
  11. else if ( .assault_on == 2 ) {
  12. dispbottom "event is going on";
  13. end;
  14. }
  15. announce "assault event will start, the 1st two guilds that register will be participated in this event", 0;
  16. set .assault_on, 1;
  17. enablenpc "assault_register";
  18. end;
  19. Onstart:
  20. set .assault_on, 2;
  21. mapannounce "bat_a01", "gogogo", 0;
  22. monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
  23. monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
  24. end;
  25.  
  26. OnRedempdead:
  27. killmonsterall "bat_a01";
  28. if ( getcharid(2) == .red ) {
  29. set .redscore, .redscore -1;
  30. if ( .redscore < 0 ) set .redscore, 0;
  31. announce " red team kill its own emperium, minue 1 point", 1;
  32. }
  33. else {
  34. set .bluescore, .bluescore +1 ;
  35. announce " blue team score a point !["+ .bluescore +"]", 1;
  36. }
  37. if ( .bluescore == 5 ) {
  38. announce " blue team has won this game !", 1;
  39. mapwarp "bat_a01", "prontera", 155, 183;
  40. set .assault_on, 0;
  41. }
  42. else {
  43. monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
  44. monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
  45. warpguild "bat_a01", 157,346, .blue;
  46. warpguild "bat_a01", 147,49, .red;
  47. }
  48. end;
  49.  
  50. OnBlueempdead:
  51. killmonsterall "bat_a01";
  52. if ( getcharid(2) == .blue ) {
  53. set .bluescore, .bluescore -1;
  54. if ( .bluescore < 0 ) set .bluescore, 0;
  55. announce " blue team kill its own emperium, minue 1 point", 1;
  56. }
  57. else {
  58. set .redscore, .redscore +1 ;
  59. announce "red team score a point !["+ .redscore +"]", 1;
  60. }
  61. if ( .redscore == 5 ) {
  62. announce "red team has won this game !", 1;
  63. mapwarp "bat_a01", "prontera", 155, 183;
  64. set .assault_on, 0;
  65. }
  66. else {
  67. monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
  68. monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
  69. warpguild "bat_a01", 157,346, .blue;
  70. warpguild "bat_a01", 147,49, .red;
  71. }
  72. end;
  73. }
  74.  
  75. prontera,156,179,5 script assault_register 100,{
  76. mes "register ?";
  77. next;
  78. if ( select ("yes:no") == 2 ) close;
  79. if ( getvariableofnpc( .red, "assault" ) ) {
  80. set getvariableofnpc( .blue, "assault" ), getcharid(2);
  81. announce strcharinfo(2) +" has register as blue team, event will start immediately", 0;
  82. donpcevent "assault::Onstart";
  83. warpguild "bat_a01", 157,346, getvariableofnpc( .blue, "assault" );
  84. warpguild "bat_a01", 147,49, getvariableofnpc( .red, "assault" );
  85. disablenpc strnpcinfo(0);
  86. close;
  87. }
  88. else {
  89. set getvariableofnpc( .red, "assault" ), getcharid(2);
  90. announce strcharinfo(2) +" has register as red team, anyone else going to register as blue team ?", 0;
  91. close;
  92. }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement