pvp.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. //===== eAthena Script =======================================
  2. //= PvP
  3. //===== By: ==================================================
  4. //= kobra_k88
  5. //===== Current Version: =====================================
  6. //= 1.2a
  7. //===== Compatible With: =====================================
  8. //= eAthena 0.5.2 +
  9. //===== Description: =========================================
  10. //=
  11. //===== Additional Comments: =================================
  12. //= v1.1 Fixed arena names for Nightmare mode. Added room limit
  13. //= check.[kobra_k88]
  14. //= v1.2 Fixed the bug that you aways savepoint in geffen.[shadowlady]
  15. //= v1.2a Added PvP Narrator function. Using args for Fight
  16. //= Square Helpers. [kobra_k88]
  17. //============================================================
  18. //==========================================================================
  19. // PvP Narrators
  20. //==========================================================================
  21. // Alberta -----------------------------------------
  22. alberta_in.gat,22,146,4 script PvP Narrator#1 84,{
  23. callfunc "F_PvPNarr", "alberta_in.gat", 24, 143;
  24. end;
  25. }
  26. // Payon -------------------------------------
  27. payon_in01.gat,173,109,3 script PvP Narrator#2 84,{
  28. callfunc "F_PvPNarr", "payon_in01.gat", 169, 108;
  29. end;
  30. }
  31. // Prontera -------------------------------------
  32. prt_in.gat,56,140,4 script PvP Narrator#3 84,{
  33. callfunc "F_PvPNarr", "prt_in.gat", 54, 137;
  34. end;
  35. }
  36. // Morocc --------------------------------------
  37. morocc_in.gat,144,138,4 script PvP Narrator#4 84,{
  38. callfunc "F_PvPNarr", "morocc_in.gat", 141, 140;
  39. end;
  40. }
  41. // Geffen --------------------------------------
  42. geffen_in.gat, 67,63,4 script PvP Narrator#5 84,{
  43. callfunc "F_PvPNarr", "geffen_in.gat", 64, 60;
  44. end;
  45. }
  46. //******************************************************//
  47. // Function: PvP Narrator
  48. //******************************************************//
  49. // arg(0): mapname
  50. // arg(1): savepoint x cord.
  51. // arg(2): savepoint y cord.
  52. //=============================
  53. function script F_PvPNarr {
  54. mes "[PvP Narrator]";
  55. mes "Hello and welcome! I am in charge of explaining the PvP mode to all of those who inquire. I am the PvP Narrator!";
  56. M_Menu:
  57. next;
  58. menu "What is PvP?",M_0, "What are the PvP modes?",M_1, "What are the rules for PvP?",M_2, "Save position.",M_3;
  59. M_0:
  60. mes "[PvP Narrator]";
  61. mes "PvP is short for 'Player versus Player'! It is a unique play mode that allows players to duel other players!";
  62. next;
  63. mes "[PvP Narrator]";
  64. mes "If you're interested just speak with the ^5533FFGate Keeper'^000000. He will let you into the PvP square.";
  65. next;
  66. mes "[PvP Narrator]";
  67. mes "That IS, IF you have at least a base level of 31 and you have 500 zeny to pay for the enterance fee.";
  68. mes "Those are the requirements to participate in PvP.";
  69. goto M_Menu;
  70. M_1:
  71. mes "[PvP Narrator]";
  72. mes "There are 2 PvP modes to choose from.";
  73. mes "One is called ^5533FF'Yoyo'^000000 Mode and the other is called ^5533FF'Nightmare'^000000 Mode.";
  74. next;
  75. mes "[PvP Narrator]";
  76. mes "Yoyo mode essentially lets you play risk free. You can experience the thrill of PvP without any restrictions or penalties.";
  77. mes "It is recomended that you practice your skills in this mode before you move on.";
  78. next;
  79. mes "[PvP Narrator]";
  80. mes "Nightmare Mode is very dangerous! Please use caution when trying this mode of play.";
  81. mes "You will lose some of your real EXP if you are defeated. There is also the small chance that you will drop some items and equipment.";
  82. next;
  83. mes "[PvP Narrator]";
  84. mes "Of course if you win, the rewards can be great!! Even so you should really think twice before you attempt Nightmare Mode.";
  85. mes "Anyways, good luck.";
  86. goto M_Menu;
  87. M_2:
  88. mes "[PvP Narrator]";
  89. mes "Before you enter any actual PvP areana, you must first choose your level of ability based on your base level.";
  90. mes "You will do this in the pre-fight room. There will be a row of narrators, each one representing a set of player levels.";
  91. next;
  92. mes "[PvP Narrator]";
  93. mes "Speak to the narrator that represents your base level. You will then be asked to choose from five different fight maps.";
  94. mes "You will be able to see how many people are currently participating in any given map.";
  95. next;
  96. mes "[PvP Narrator]";
  97. mes "This will be represented by the 'Attendee/Total' figure in the corner of the screen. There is a limit to how many can play on a map.";
  98. mes "There is a hidden EXP value in PvP mode. This EXP will only apply inside of the PvP zone and not outside.";
  99. next;
  100. mes "[PvP Narrator]";
  101. mes "Every one will recieve a base EXP of 5 points when they first start. If you win a match your EXP with increase by 1 point.";
  102. mes "If you loose your EXP will drop by 5 points, so be carefull!";
  103. next;
  104. mes "[PvP Narrator]";
  105. mes "If you are defeated and your EXP is equal to or less than 0, you will be removed from the PvP arena.";
  106. mes "If your EXP is more than 0 than you may continue fighting and even get help from healers.";
  107. next;
  108. mes "[PvP Narrator]";
  109. mes "The fighting commands inside of PvP are the same as outside. Just remember that you won't be able to save inside a PvP arena.";
  110. next;
  111. mes "[PvP Narrator]";
  112. mes "Remember these rules well as they can help to ensure your victory.";
  113. goto M_Menu;
  114. M_3:
  115. savepoint getarg(0), getarg(1), getarg(2);
  116. mes "[PvP Narrator]";
  117. mes "Your position has been saved.";
  118. close;
  119. }
  120. //==========================================================================
  121. // Gate Keepers
  122. //==========================================================================
  123. // Alberta -----------------------------------
  124. alberta_in.gat, 26,146,4 script Gate Keeper#1::GateKeep 83,{
  125. mes "[Gate Keeper]";
  126. mes "Hi. I'm glad to be of service. I will open the PvP fight square for you!";
  127. mes "If you have any questions about the PvP modes or rules, please ask the Narrator.....";
  128. next;
  129. menu "^5533FF'PvP Yoyo Mode'^000000 Fight Square.",M_0,
  130. "^FF5533'PvP Nightmare Mode'^000000 Fight Square.",M_1,
  131. "^5533FF'PvP Duel (Fighting) Mode'^000000 Combat Square.",M_2, "End Conversation.",M_End;
  132. M_0:
  133. set @mode$, "Yoyo";
  134. set @players1, 128;
  135. set @players2, 128;
  136. set @room1$, "Prontera";
  137. set @room2$, "Izlude";
  138. set @room3$, "Payon";
  139. set @room4$, "Alberta";
  140. set @room5$, "Morroc";
  141. callsub sF_Move;
  142. warp "pvp_y_room.gat", 51, 23;
  143. end;
  144. M_1:
  145. set @mode$, "Nightmare";
  146. set @players1, 64;
  147. set @players2, 32;
  148. set @room1$, "Sandwhich Arena";
  149. set @room2$, "Rock Arena";
  150. set @room3$, "Four Arena";
  151. set @room4$, "UnderCross Arena";
  152. set @room5$, "Copass Arena";
  153. callsub sF_Move;
  154. warp "pvp_n_room.gat", 51, 23;
  155. end;
  156. M_2:
  157. mes "[Gate Keeper]";
  158. mes "To enter the Duel (Fighting) Mode square you must have an admission ticket. Do you have one?";
  159. next;
  160. menu "Yes I do.",-, "No I don't.",sM_1;
  161. if(countitem(7029) < 1) goto sM_1;
  162. delitem 7029, 1;
  163. set @mode$, "Fighting";
  164. callsub sF_Move;
  165. warp "pvp_y_room.gat", 51, 23;
  166. end;
  167. sM_1:
  168. mes "[Gate Keeper]";
  169. mes "Eh? You don't have one? I'm sorry but this fight square is only for people who have admission or viewing tickets.";
  170. mes "You cannot come in without one.";
  171. close;
  172. M_End:
  173. mes "[Gate Keeper]";
  174. mes "In this war between Monsters and Humans this competition between people, PvP, encourages all of us to become stronger.";
  175. mes "Come again anytime. We welcome your challenge!";
  176. close;
  177. sF_Move:
  178. mes "[Gate Keeper]";
  179. mes "The admission fee is 500 Zeny. Do you want to move to the "+@mode$+" fight square?";
  180. next;
  181. menu "Yes",-, "No",M_End;
  182. if(BaseLevel < 31) goto sL_LowLvl;
  183. if(Zeny < 500) goto sL_NdZeny;
  184. set Zeny, Zeny - 500;
  185. mes "[Gate Keeper]";
  186. mes "Prepare to be warped to the arena.....";
  187. next;
  188. return;
  189. sL_LowLvl:
  190. mes "[Gate Keeper]";
  191. mes "In order to participate in PvP you must have a base level of at least ^FF4444'31'^000000.";
  192. close;
  193. sL_NdZeny:
  194. mes "[Gate Keeper]";
  195. mes "As I stated, the admission fee is ^FF4444'500'^000000 Zeny. You seem to be short on Zeny.";
  196. close;
  197. }
  198. // Geffen --------------------------------------------
  199. geffen_in.gat, 63,63,4 duplicate(GateKeep) Gate Keeper#2 83
  200. // Morroc----------------------------------------------
  201. morocc_in.gat, 144,142,4 duplicate(GateKeep) Gate Keeper#3 83
  202. // Payon ----------------------------------------------
  203. payon_in01.gat,175,106,3 duplicate(GateKeep) Gate Keeper#4 83
  204. // Prontera -------------------------------------------
  205. prt_in.gat,52,140,4 duplicate(GateKeep) Gate Keeper#5 83
  206. //==========================================================================//
  207. // PvP Yoyo Mode Fight Square Helpers
  208. //==========================================================================//
  209. // LV31 ~ 40 ---------------------------------
  210. pvp_y_room.gat,30,85,4 script Fight Square Helper::YHelper1 105,{
  211. callfunc "F_PvPRoom", "y_1", 31, 40;
  212. OnInit:
  213. waitingroom "LV31 ~ LV40",0;
  214. end;
  215. }
  216. // LV41 ~ 50 --------------------------------
  217. pvp_y_room.gat,38,85,4 script Fight Square Helper::YHelper2 105,{
  218. callfunc "F_PvPRoom", "y_2", 41, 50;
  219. OnInit:
  220. waitingroom "LV41 ~ LV50",0;
  221. end;
  222. }
  223. // LV51 ~ 60 ---------------------------------
  224. pvp_y_room.gat,46,85,4 script Fight Square Helper::YHelper3 105,{
  225. callfunc "F_PvPRoom", "y_3", 51, 60;
  226. OnInit:
  227. waitingroom "LV51 ~ LV60", 0;
  228. end;
  229. }
  230. // LV61 ~ 70 ------------------------------------
  231. pvp_y_room.gat,54,85,4 script Fight Square Helper::YHelper4 105,{
  232. callfunc "F_PvPRoom", "y_4", 61, 70;
  233. OnInit:
  234. waitingroom "LV61 ~ LV70", 0;
  235. end;
  236. }
  237. // LV71 ~ 80 ------------------------------------
  238. pvp_y_room.gat,62,85,4 script Fight Square Helper::YHelper5 105,{
  239. callfunc "F_PvPRoom", "y_5", 71, 80;
  240. OnInit:
  241. waitingroom "LV71 ~ LV80", 0;
  242. end;
  243. }
  244. // LV81 ~ 90 --------------------------------------
  245. pvp_y_room.gat,70,85,4 script Fight Square Helper::YHelper6 105,{
  246. callfunc "F_PvPRoom", "y_6", 81, 90;
  247. OnInit:
  248. waitingroom "LV81 ~ LV90", 0;
  249. end;
  250. }
  251. // LV91 ~ --------------------------------------------
  252. pvp_y_room.gat,78,85,4 script Fight Square Helper::YHelper7 105,{
  253. callfunc "F_PvPRoom", "y_7", 91, 255;
  254. OnInit:
  255. waitingroom "LV91 ~ ", 0;
  256. end;
  257. }
  258. // No Limit -----------------------------------------
  259. pvp_y_room.gat,86,85,4 script Fight Square Helper::YHelper8 105,{
  260. callfunc "F_PvPRoom", "y_8", 0, 255;
  261. OnInit:
  262. waitingroom "No Limit", 0;
  263. end;
  264. }
  265. //==========================================================================//
  266. // PvP Nightmare Mode Fight Square Helpers
  267. //==========================================================================//
  268. // LV31 ~ 40 -------------------------------------
  269. pvp_n_room.gat,30,85,4 script Fight Square Helper#N1 105,{
  270. callfunc "F_PvPRoom", "n_1", 31, 40;
  271. OnInit:
  272. waitingroom "LV31 ~ LV40",0;
  273. end;
  274. }
  275. // LV41 ~ 50 --------------------------------------
  276. pvp_n_room.gat,38,85,4 script Fight Square Helper#N2 105,{
  277. callfunc "F_PvPRoom", "n_2", 41, 50;
  278. OnInit:
  279. waitingroom "LV41 ~ LV50",0;
  280. end;
  281. }
  282. // LV51 ~ 60 -------------------------------------
  283. pvp_n_room.gat,46,85,4 script Fight Square Helper#N3 105,{
  284. callfunc "F_PvPRoom", "n_3", 51, 60;
  285. OnInit:
  286. waitingroom "LV51 ~ LV60", 0;
  287. end;
  288. }
  289. // LV61 ~ 70 ------------------------------------
  290. pvp_n_room.gat,54,85,4 script Fight Square Helper#N4 105,{
  291. callfunc "F_PvPRoom", "n_4", 61, 70;
  292. OnInit:
  293. waitingroom "LV61 ~ LV70", 0;
  294. end;
  295. }
  296. // LV71 ~ 80 -----------------------------------
  297. pvp_n_room.gat,62,85,4 script Fight Square Helper#N5 105,{
  298. callfunc "F_PvPRoom", "n_5", 71, 80;
  299. OnInit:
  300. waitingroom "LV71 ~ LV80", 0;
  301. end;
  302. }
  303. // LV81 ~ 90 ------------------------------------
  304. pvp_n_room.gat,70,85,4 script Fight Square Helper#N6 105,{
  305. callfunc "F_PvPRoom", "n_6", 81, 90;
  306. OnInit:
  307. waitingroom "LV81 ~ LV90", 0;
  308. end;
  309. }
  310. // LV91 ~ ---------------------------------------
  311. pvp_n_room.gat,78,85,4 script Fight Square Helper#N7 105,{
  312. callfunc "F_PvPRoom", "n_7", 91, 255;
  313. OnInit:
  314. waitingroom "LV91 ~ ", 0;
  315. end;
  316. }
  317. // No Limit ----------------------------------
  318. pvp_n_room.gat,86,85,4 script Fight Square Helper#N8 105,{
  319. callfunc "F_PvPRoom", "n_8", 0, 255;
  320. OnInit:
  321. waitingroom "No Limit", 0;
  322. end;
  323. }
  324. //***************************************************************//
  325. // Function: PvP Fight Square Helper
  326. //***************************************************************//
  327. // arg(0): pvp room name
  328. // arg(1): minimum base lvl to enter arena
  329. // arg(2): maximum base lvl allowed to enter arena
  330. //===============================================
  331. function script F_PvPRoom {
  332. mes "[Fight Square Helper]";
  333. if(BaseLevel < getarg(1)) goto L_LowLvl;
  334. if(BaseLevel > getarg(2)) goto L_HiLvl;
  335. mes "Please choose an arena to fight in...";
  336. M_Menu:
  337. next;
  338. menu @room1$ + " [" + getmapusers("pvp_" + getarg(0) + "-1.gat") + "/" +@players1+ "]",M_Rm1,
  339. @room2$ + " [" + getmapusers("pvp_" + getarg(0) + "-2.gat") + "/" +@players2+ "]",M_Rm2,
  340. @room3$ + " [" + getmapusers("pvp_" + getarg(0) + "-3.gat") + "/" +@players2+ "]",M_Rm3,
  341. @room4$ + " [" + getmapusers("pvp_" + getarg(0) + "-4.gat") + "/" +@players2+ "]",M_Rm4,
  342. @room5$ + " [" + getmapusers("pvp_" + getarg(0) + "-5.gat") + "/" +@players2+ "]",M_Rm5, "Cancel",M_End;
  343. M_Rm1:
  344. if (getmapusers("pvp_" + getarg(0) + "-1.gat") == @players1) goto L_Full;
  345. warp "pvp_" + getarg(0) + "-1.gat",0,0;
  346. end;
  347. M_Rm2:
  348. if (getmapusers("pvp_" + getarg(0) + "-2.gat") == @players2) goto L_Full;
  349. warp "pvp_" + getarg(0) + "-2.gat",0,0;
  350. end;
  351. M_Rm3:
  352. if (getmapusers("pvp_" + getarg(0) + "-3.gat") == @players2) goto L_Full;
  353. warp "pvp_" + getarg(0) + "-3.gat",0,0;
  354. end;
  355. M_Rm4:
  356. if (getmapusers("pvp_" + getarg(0) + "-4.gat") == @players2) goto L_Full;
  357. warp "pvp_" + getarg(0) + "-4.gat",0,0;
  358. end;
  359. M_Rm5:
  360. if (getmapusers("pvp_" + getarg(0) + "-5.gat") == @players2) goto L_Full;
  361. warp "pvp_" + getarg(0) + "-5.gat",0,0;
  362. end;
  363. M_End:
  364. close;
  365. L_LowLvl:
  366. mes "I'm sorry but you do not meet the Base Level requirements to enter. Please try a lower level room.";
  367. close;
  368. L_HiLvl:
  369. mes "I'm sorry but you exceed the Base Level requirements to enter. Please try a higher level room.";
  370. close;
  371. L_Full:
  372. mes "[Fight Square Helper]";
  373. mes "I'm sorry but this arena is full. Please choose another one to participate in....";
  374. goto M_Menu;
  375. }