Advertisement
Guest User

PVP ROOM

a guest
Dec 14th, 2011
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. Frontier,162,190,4 script Ultimate PvP Warper 871,{
  2. if (.pvp_square$=="") donpcevent "Ultimate PVP warper::OnClock0000";
  3.  
  4. mes "[PvP Warper]";
  5. mes "Which arena do you want to go to?";
  6. switch(select("PVP Square ["+getmapusers(.pvp_square$)+"/100]:PVP Nightmare ["+getmapusers("guild_vs3")+"/100]:PVP LowLevel ["+getmapusers("guild_vs1")+"/100]:PVP NoPotion ["+getmapusers("pvp_y_8-2")+"/100]:Non Donator PVP ["+getmapusers("1@orcs")+"/100]:Baby PvP Room ["+getmapusers("pvp_y_1-2")+"/100]")) {
  7. case 1: // PVP Square
  8. if (getmapusers(.pvp_square$) > 99) callsub S_full;
  9. callsub S_payment;
  10. warp .pvp_square$,0,0;
  11. end;
  12.  
  13. case 2: // PVP Nightmare
  14. if (getmapusers("guild_vs3") > 99) callsub S_full;
  15. callsub S_payment;
  16. warp "guild_vs3",0,0;
  17. end;
  18.  
  19. case 3: // PVP LowLevel
  20. if (getmapusers("guild_vs1") > 99) callsub S_full;
  21. if (BaseLevel > 150) { // Edit 150 to any maximum Lvl of a player can enter this room
  22. mes "only Base Level 1 - 150 may enter.";
  23. close;
  24. }
  25. callsub S_payment;
  26. warp "guild_vs1",0,0;
  27. end;
  28.  
  29. case 4: // PVP NoPotion
  30. if (getmapusers("pvp_y_8-2") > 99) callsub S_full;
  31. for( set .@i,0; .@i<getarraysize(.NoPotion_ids); set .@i,.@i+1 ) {
  32. if (countitem(.NoPotion_ids[.@i])) {
  33. mes "You can not bring potions in this pvp.";
  34. close;
  35. }
  36. }
  37. callsub S_payment;
  38. warp "pvp_y_8-2",0,0;
  39. end;
  40.  
  41. case 5: // Non Donator PVP
  42. if (getmapusers("1@orcs") > 99) callsub S_full;
  43. for( set .@i,0; .@i<getarraysize(.NoDonator_ids); set .@i,.@i+1 ) {
  44. if (countitem(.NoDonator_ids[.@i])) {
  45. mes "You can not bring God items in this pvp.";
  46. close;
  47. }
  48. }
  49. callsub S_payment;
  50. warp "1@orcs",0,0;
  51. end;
  52. Case 6: // Baby PvP Room
  53. if (getmapusers("pvp_y_1-2") > 99) callsub S_full;
  54. if (class < 4023 || class > 4045) goto L_NotBaby;
  55. callsub S_payment;
  56. warp "pvp_y_1-2",0,0;
  57. end;
  58. L_NotBaby:
  59. mes "Only baby can enter this room";
  60. close;
  61.  
  62. }
  63.  
  64. S_full:
  65. mes " ";
  66. mes "I'm sorry, this arena is full. Please try again later...";
  67. close;
  68. S_payment:
  69. if (Zeny < (200*BaseLevel + 800)) {
  70. mes "You don't have enough zeny.";
  71. mes "It costs "+(200*BaseLevel + 800)+" zeny for you to enter.";
  72. close;
  73. }
  74. set Zeny, Zeny - (200*BaseLevel + 800);
  75. return;
  76.  
  77. OnInit:
  78. OnTimer5000:
  79. delwaitingroom;
  80. switch(rand(1,6)) {
  81. Case 1:
  82. waitingroom getmapusers(.pvp_square$)+" player"+( getmapusers(.pvp_square$) > 1 ? "s":"") +" are in the PvP Square", 0;
  83. goto Timer;
  84. end;
  85. break;
  86. Case 2:
  87. waitingroom getmapusers("guild_vs3")+" player"+( getmapusers("guild_vs3") > 1 ? "s":"") +" are in the PvP Nightmare", 0;
  88. goto Timer;
  89. end;
  90. break;
  91. Case 3:
  92. waitingroom getmapusers("guild_vs1")+" player"+( getmapusers("guild_vs1") > 1 ? "s":"") +" are in the PvP Lowlvl", 0;
  93. goto Timer;
  94. end;
  95. break;
  96. Case 4:
  97. waitingroom getmapusers("pvp_y_8-2")+" player"+( getmapusers("pvp_y_8-2") > 1 ? "s":"") +" are in the PvP NoPotion", 0;
  98. goto Timer;
  99. end;
  100. break;
  101. Case 5:
  102. waitingroom getmapusers("1@orcs")+" player"+( getmapusers("1@orcs") > 1 ? "s":"") +" are in the PvP NoDonator", 0;
  103. goto Timer;
  104. end;
  105. break;
  106. Case 6:
  107. waitingroom getmapusers("pvp_y_1-2")+" player"+( getmapusers("pvp_y_1-2") > 1 ? "s":"") +" are in the Baby PvP", 0;
  108. goto Timer;
  109. end;
  110. break;
  111. Timer:
  112. initnpctimer;
  113. }
  114. OnClock0000:
  115. // set the "PVP Square" map, based on day of the weeek
  116. switch(gettime(4)) {
  117. case 0: // Sunday
  118. case 1: // Monday
  119. set .pvp_square$, "guild_vs2";
  120. break;
  121. case 2: // Tuesday
  122. case 3: // Wednesday
  123. set .pvp_square$, "guild_vs5";
  124. break;
  125. case 4: // Thursday
  126. case 5: // Friday
  127. set .pvp_square$, "guild_vs4";
  128. break;
  129. case 6: // Saturday
  130. set .pvp_square$, "guild_vs1-2";
  131. break;
  132. }
  133.  
  134. // items not allowed in PVP NoPotion
  135. setarray .NoPotion_ids[0], 607, 608;
  136.  
  137. // items not allowed in Non Donator PVP
  138. setarray .NoDonator_ids[0], 2410, 1530;
  139. end;
  140. }
  141.  
  142.  
  143. // Mapflags
  144. guild_vs2 mapflag pvp
  145. guild_vs5 mapflag pvp
  146. guild_vs4 mapflag pvp
  147. guild_vs1-2 mapflag pvp
  148.  
  149. guild_vs3 mapflag pvp
  150. guild_vs1 mapflag pvp
  151. pvp_y_8-2 mapflag pvp
  152. 1@orcs mapflag pvp
  153.  
  154. guild_vs3 mapflag pvp
  155. pvp_y_8-2 mapflag nosave
  156. pvp_y_8-2 mapflag nowarp
  157. pvp_y_8-2 mapflag nowarpto
  158. pvp_y_8-2 mapflag noteleport
  159. pvp_y_8-2 mapflag noreturn
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement