pvp.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. //===== rAthena Script =======================================
  2. //= PvP NPCs
  3. //===== By: ==================================================
  4. //= kobra_k88; L0ne_W0lf, Elias (og2)
  5. //===== Current Version: =====================================
  6. //= 2.3
  7. //===== Compatible With: =====================================
  8. //= rAthena SVN
  9. //===== Description: =========================================
  10. //= PvP NPCs that are found in the Inns in major cities.
  11. //= Includes Yoyo Mode, Nightmare Mode, and Event Mode.
  12. //===== Additional Comments: =================================
  13. //= 2.0 Narrators/GateKeepers,etc. Translated from the Official 2011 [Elias]
  14. //= 2.1 Changed PVP Narrator and GateKeeper to Floating NPC [Elias]
  15. //= 2.2 Some cleaning. [Euphy]
  16. //= 2.3 Fixed grammatical errors. [Joseph]
  17. //============================================================
  18. - script PVP Narrator::pvpe -1,{
  19. mes "[PVP Narrator]";
  20. mes "Hello and welcome!";
  21. mes "I am in charge of";
  22. mes "explaining the PVP Modes.";
  23. mes "I am the PVP Narrator!";
  24. next;
  25. switch(select("What is PVP?","What are the PVP Modes?","What are the rules for PVP?","Save Position.","End Dialog.")) {
  26. case 1:
  27. mes "[PVP Narrator]";
  28. mes "In short, PVP means";
  29. mes "' Player VS Player Mode '";
  30. mes "It's a unique place for people";
  31. mes "to duel with each other.";
  32. next;
  33. mes "[PVP Narrator]";
  34. mes "Just tell the";
  35. mes "^3355FFGate Keeper^000000";
  36. mes "that you want to try. He will";
  37. mes "let you enter the PVP square.";
  38. next;
  39. mes "[PVP Narrator]";
  40. mes "But, you need to be at";
  41. mes "least level 31. And you";
  42. mes "must pay 500 zeny entrance fee in order";
  43. mes "to enter a PVP fight square.";
  44. break;
  45. case 2:
  46. mes "[PVP Narrator]";
  47. mes "When you are qualified, you";
  48. mes "can choose one of the two modes.";
  49. mes "Yoyo Mode or Nightmare Mode.";
  50. next;
  51. mes "[PVP Narrator]";
  52. mes "Yoyo Mode is risk free.";
  53. mes "You can experience PVP";
  54. mes "without any restriction or";
  55. mes "punishment. It is recommended";
  56. mes "that you practice your skills";
  57. mes "here before you move on.";
  58. next;
  59. mes "[PVP Narrator]";
  60. mes "Nightmare Mode is very";
  61. mes "dangerous! Please be cautious,";
  62. mes "you will lose some of your";
  63. mes "EXP when you are defeated. And";
  64. mes "there is a small chance that";
  65. mes "you will drop some equipment.";
  66. next;
  67. mes "[PVP Narrator]";
  68. mes "However, if you win, the";
  69. mes "rewards can be great!";
  70. mes "To avoid misunderstanding,";
  71. mes "you should think twice";
  72. mes "before you go there...";
  73. mes "Good Luck!";
  74. break;
  75. case 3:
  76. mes "[PVP Narrator]";
  77. mes "Each of the fight squares";
  78. mes "have a row of Narrators and";
  79. mes "choose them based on your";
  80. mes "qualifications.";
  81. next;
  82. mes "[PVP Narrator]";
  83. mes "Each Narrator will ask";
  84. mes "which of the five PVP maps";
  85. mes "you wish to go to.";
  86. mes "Choose, and go in!";
  87. next;
  88. mes "[PVP Narrator]";
  89. mes "Each map has a limitation on";
  90. mes "the number of people who can";
  91. mes "participate. So you will see";
  92. mes "figures in the corner showing";
  93. mes "'Attendee/Total'.";
  94. next;
  95. mes "[PVP Narrator]";
  96. mes "Also, there is a hidden EXP";
  97. mes "value in PVP mode. This EXP";
  98. mes "score will only apply inside";
  99. mes "of the PVP zone, so do not";
  100. mes "worry.";
  101. next;
  102. mes "[PVP Narrator]";
  103. mes "Every player's EXP at the";
  104. mes "beginning is usually 5 points.";
  105. mes "If you win, it will";
  106. mes "increase by 1 point";
  107. next;
  108. mes "[PVP Narrator]";
  109. mes "In the same way, when you";
  110. mes "lose... Your EXP will";
  111. mes "drop by 5 points.";
  112. mes "So be careful!";
  113. next;
  114. mes "[PVP Narrator]";
  115. mes "When you are defeated";
  116. mes "And your EXP is equal";
  117. mes "to or less than 0,";
  118. mes "You will be removed from PVP";
  119. mes "and your duel is finished!";
  120. next;
  121. mes "[PVP Narrator]";
  122. mes "However, if your EXP is more";
  123. mes "than 0. You can still get help";
  124. mes "through other players healing...";
  125. mes "Do you get it?";
  126. next;
  127. mes "[PVP Narrator]";
  128. mes "The fighting commands inside of";
  129. mes "PVP are the same as the normal.";
  130. mes "All the basic controls are the";
  131. mes "same.";
  132. next;
  133. mes "[PVP Narrator]";
  134. mes "However, there is one thing...";
  135. mes "Within the PVP fight square";
  136. mes "and PVP fighting zones,";
  137. mes "you cannot save your position.";
  138. mes "Remember well... These rules";
  139. mes "can help to ensure your victory.";
  140. break;
  141. case 4:
  142. mes "[PVP Narrator]";
  143. mes "Position successfully saved...";
  144. mes "Thank you very much!";
  145. mes "We will see you again soon.";
  146. if(strnpcinfo(4) == "morocc_in") { savepoint "morocc_in",141,139; }
  147. if(strnpcinfo(4) == "alberta_in") { savepoint "alberta_in",22,148; }
  148. if(strnpcinfo(4) == "prt_in") { savepoint "prt_in",54,137; }
  149. if(strnpcinfo(4) == "geffen_in") { savepoint "geffen_in",70,59; }
  150. if(strnpcinfo(4) == "payon_in01") { savepoint "payon_in01",142,46; }
  151. break;
  152. case 5:
  153. mes "[PVP Narrator]";
  154. mes "With war raging between monsters";
  155. mes "and humans, this competition";
  156. mes "among people - PVP -";
  157. mes "encourages us all to get";
  158. mes "stronger. Come again,";
  159. mes "we welcome your challenge!";
  160. break;
  161. }
  162. close;
  163. }
  164. //PVP Narrator's Duplicates
  165. morocc_in,144,138,4 duplicate(pvpe) PVP Narrator#pe1 84
  166. alberta_in,22,146,4 duplicate(pvpe) PVP Narrator#pe2 84
  167. prt_in,56,140,4 duplicate(pvpe) PVP Narrator#pe3 84
  168. geffen_in,67,63,4 duplicate(pvpe) PVP Narrator#pe4 84
  169. payon_in01,142,50,4 duplicate(pvpe) PVP Narrator#pe5 84
  170. geffen_in,67,63,4 duplicate(pvpe) PVP Narrator#pe6 84
  171. //Gate Keeper (Floating NPC, Locations below)
  172. - script Gate Keeper::gkut -1,{
  173. mes "[Gate Keeper]";
  174. mes "Glad to be of service.";
  175. mes "I will open the PVP fight";
  176. mes "square for you! If you have";
  177. mes "any questions about the PVP";
  178. mes "modes or rules, Please ask";
  179. mes "the Narrator...";
  180. next;
  181. switch(select("^FF5533' PvP Nightmare Mode'^000000","^3355FF' PvP Yoyo Mode'^000000","^3355FF' PvP Event Mode'^000000","Quit")) {
  182. case 1:
  183. mes "[Gate Keeper]";
  184. mes "I am sorry, but currently the Nightmare mode service is not available.";
  185. mes "Please use the Yoyo Mode instead. We apologize for the inconvenience.";
  186. break;
  187. case 2:
  188. mes "[Gate Keeper]";
  189. mes "The admission fee is 500 Zeny.";
  190. mes "Do you want to move";
  191. mes "to the Yoyo Mode";
  192. mes "fight square?";
  193. next;
  194. if(select("Move","Cancel")==1) {
  195. if ((Zeny > 499) && (BaseLevel > 30)) {
  196. set Zeny, Zeny - 500;
  197. warp "pvp_y_room",51,23;
  198. }
  199. else {
  200. mes "[Gate Keeper]";
  201. mes "Excuse me, but";
  202. mes "did you not come prepared?";
  203. mes "Double check that you have the";
  204. mes "500 Zeny entrance fee, and";
  205. mes "that you are at least level 31!";
  206. }
  207. close;
  208. }
  209. mes "[Gate Keeper]";
  210. mes "With war raging between monsters";
  211. mes "and humans, this competition";
  212. mes "among people - PVP -";
  213. mes "encourages us all to get";
  214. mes "stronger. Come again,";
  215. mes "we welcome your challenge!";
  216. close;
  217. case 3:
  218. mes "[Gate Keeper]";
  219. mes "Welcome!";
  220. mes "Please double check";
  221. mes "that you have the admission or viewing ticket.";
  222. next;
  223. if ((countitem(7028) == 0) && (countitem(7029) == 0)) {
  224. mes "[Gate Keeper]";
  225. mes "Eh? You don't have it? Then I";
  226. mes "am sorry, this fight square is";
  227. mes "only for people who have";
  228. mes "admission or viewing tickets.";
  229. mes "You cannot come in without it.";
  230. close;
  231. }
  232. mes "[Gate Keeper]";
  233. mes "Yes, thank you for participating. Have fun!";
  234. warp "pvp_room",51,23;
  235. break;
  236. case 4:
  237. mes "[Gate Keeper]";
  238. mes "With war raging between monsters";
  239. mes "and humans, This competition";
  240. mes "among people - PVP -";
  241. mes "encourages us all to get";
  242. mes "stronger. Come again,";
  243. mes "we welcome your challenge!";
  244. break;
  245. }
  246. close;
  247. }
  248. //Gate Keeper Duplicates
  249. morocc_in,144,142,4 duplicate(gkut) Gate Keeper#gke1 83
  250. alberta_in,26,146,4 duplicate(gkut) Gate Keeper#gke2 83
  251. prt_in,52,140,4 duplicate(gkut) Gate Keeper#gke3 83
  252. geffen_in,63,63,4 duplicate(gkut) Gate Keeper#gke4 83
  253. payon_in01,140,53,4 duplicate(gkut) Gate Keeper#gke5 83
  254. //Fight square Reception Staff (Locations below)
  255. - script FSRS::fsr -1,{
  256. if(strnpcinfo(4) == "pvp_y_room") {
  257. setarray .@Maps$[0],"pvp_y_8-1","pvp_y_8-2","pvp_y_8-3","pvp_y_8-4","pvp_y_8-5";
  258. setarray .@Name$[0],"Prontera","Izlude","Payon","Alberta","Morroc";
  259. setarray .@Limit[0],128,128,128,128,128;
  260. } else {
  261. setarray .@Maps$[0],"pvp_n_8-1","pvp_n_8-2","pvp_n_8-3","pvp_n_8-4","pvp_n_8-5";
  262. setarray .@Name$[0],"Sandwich","Lock on","Four Room","Under cross","Compass Room";
  263. setarray .@Limit[0],64,32,32,32,32;
  264. }
  265. for(set .@i,0; .@i<5; set .@i,.@i+1)
  266. set .@menu$, .@menu$+.@Name$[.@i]+" ["+getmapusers(.@Maps$[.@i])+" / "+.@Limit[.@i]+"]:";
  267. set .@menu$, .@menu$+"Cancel.";
  268. set .@i, select(.@menu$)-1;
  269. if (.@i == 5) close;
  270. if (getmapusers(.@Maps$[.@i]) >= .@Limit[.@i]) {
  271. mes "[PVP Fight Square Reception Staff]";
  272. mes "This map is currently full.";
  273. }
  274. else warp .@Maps$[.@i],0,0;
  275. close;
  276. OnInit:
  277. waitingroom "Free for all",0;
  278. end;
  279. }
  280. //Fight Square Reception Staff
  281. pvp_y_room,86,85,4 duplicate(fsr) Fight SQ Reception#f1 105
  282. pvp_n_room,30,85,4 duplicate(fsr) Fight SQ Reception#f2 105
  283. pvp_n_8-4,33,122,0 warp Link_1-11 0,2,pvp_n_8-4,0,0
  284. pvp_n_8-4,62,84,0 warp Link_1-12 1,1,pvp_n_8-4,0,0
  285. pvp_n_8-4,49,71,0 warp Link_1-21 1,1,pvp_n_8-4,0,0
  286. pvp_n_8-4,56,166,0 warp Link_1-22 1,1,pvp_n_8-4,0,0
  287. pvp_n_8-4,99,180,0 warp Link_1-31 2,1,pvp_n_8-4,0,0
  288. pvp_n_8-4,137,84,0 warp Link_1-32 1,1,pvp_n_8-4,0,0
  289. pvp_n_8-4,150,71,0 warp Link_1-41 1,1,pvp_n_8-4,0,0
  290. pvp_n_8-4,144,166,0 warp Link_1-42 1,1,pvp_n_8-4,0,0
  291. pvp_n_8-5,30,30,0 warp Link_1-99 3,3,pvp_n_8-5,100,100
  292. // Event Contestant Entrance
  293. //============================================================
  294. pvp_room,54,85,4 script Registration Staff#1 105,{
  295. if (countitem(7028) == 0) {
  296. mes "[PVP Combat Square Register Staff]";
  297. mes "Eh? How did you get in here?";
  298. mes "This is the entrance for players only.";
  299. mes "For details about viewers please proceed to the Register Staff on your right.";
  300. close;
  301. }
  302. if (.pvp_close_n_room == 1 && .pvp_close_s_room == 1 && .pvp_close_w_room == 1 && .pvp_close_e_room == 1) {
  303. Set .pvp_close_n_room,0;
  304. Set .pvp_close_s_room,0;
  305. Set .pvp_close_w_room,0;
  306. Set .pvp_close_e_room,0;
  307. }
  308. if (select("Combat Square one :Cancel") == 1) {
  309. mes "[PVP Combat Square Register Staff]";
  310. mes "'"+ strcharinfo(0) +"'";
  311. mes "Are you ready?!";
  312. next;
  313. if (select("Yes!:No!") == 1) {
  314. mes "[PVP Combat Square Register Staff]";
  315. mes "OK! I will send you inside";
  316. mes "Good luck!";
  317. close2;
  318. delitem 7028,1; //Invite_For_Duel
  319. while(1) {
  320. switch(rand(1,4)) {
  321. case 1:
  322. if (.pvp_close_n_room == 0) {
  323. set .pvp_close_n_room,1;
  324. warp "pvp_2vs2",40,59;
  325. end;
  326. }
  327. case 2:
  328. if (.pvp_close_s_room == 0) {
  329. set .pvp_close_s_room,1;
  330. warp "pvp_2vs2",59,40;
  331. end;
  332. }
  333. case 3:
  334. if (.pvp_close_w_room == 0) {
  335. set .pvp_close_w_room,1;
  336. warp "pvp_2vs2",20,40;
  337. end;
  338. }
  339. case 4:
  340. if (.pvp_close_e_room == 0) {
  341. set .pvp_close_e_room,1;
  342. warp "pvp_2vs2",40,20;
  343. end;
  344. }
  345. }
  346. }
  347. }
  348. mes "[PVP Combat Square Register Staff]";
  349. mes "Come back anytime you are ready.";
  350. close;
  351. }
  352. close;
  353. OnInit:
  354. Set .pvp_close_n_room,0;
  355. Set .pvp_close_s_room,0;
  356. Set .pvp_close_w_room,0;
  357. Set .pvp_close_e_room,0;
  358. waitingroom "Combat Square players entrance only",0;
  359. end;
  360. }
  361. // Spectator Entrance
  362. //============================================================
  363. - script Spectator's Entrance#dum::PVPSpectator -1,{
  364. if (countitem(7029) == 0) {
  365. mes "[PVP Compete Square Register Staff]";
  366. mes "This is the entrance for viewers.";
  367. mes "For details about players entrance please proceed to the Register Staff on your left.";
  368. close;
  369. }
  370. if (select("Compete Square one:Cancel") == 1) {
  371. mes "[PVP Combat Square Register Staff]";
  372. mes "You got it, thanks for participating. Have fun!";
  373. close2;
  374. delitem 7029,1; //Admission_For_Duel
  375. switch(rand(1,4)) {
  376. case 1: warp "pvp_2vs2",39,7; end;
  377. case 2: warp "pvp_2vs2",39,73; end;
  378. case 3: warp "pvp_2vs2",7,39; end;
  379. case 4: warp "pvp_2vs2",73,39; end;
  380. }
  381. }
  382. close;
  383. OnInit:
  384. waitingroom "Compete Square viewer's entrance",0;
  385. end;
  386. }
  387. pvp_room,62,85,4 duplicate(PVPSpectator) Spectator's Entrance#1 105
  388. pvp_room,70,85,4 duplicate(PVPSpectator) Spectator's Entrance#2 105
  389. pvp_room,78,85,4 duplicate(PVPSpectator) Spectator's Entrance#3 105
  390. pvp_room,86,85,4 duplicate(PVPSpectator) Spectator's Entrance#4 105
  391. // Spectator Warps
  392. //============================================================
  393. - script Combat Square Staff#dum::PVPSpecWarp -1,{
  394. OnTouch:
  395. mes "[Combat Square Staff]";
  396. mes "May I help you?";
  397. if (select("To the center viewer seat.:Leave Combat Square.") == 1) {
  398. warp "pvp_2vs2",38,38;
  399. end;
  400. }
  401. warp "pvp_room",84,39;
  402. end;
  403. }
  404. pvp_2vs2,5,4,0 duplicate(PVPSpecWarp) Combat Square Staff#1 45,1,1
  405. pvp_2vs2,5,74,0 duplicate(PVPSpecWarp) Combat Square Staff#2 45,1,1
  406. pvp_2vs2,74,74,0 duplicate(PVPSpecWarp) Combat Square Staff#3 45,1,1
  407. pvp_2vs2,74,5,0 duplicate(PVPSpecWarp) Combat Square Staff#4 45,1,1
  408. pvp_2vs2,40,40,0 script Combat Square Staff#5 45,1,1,{
  409. mes "[Combat Square Staff]";
  410. mes "May I help you?";
  411. if (select("To the side viewer seat.:Leave Combat Square.") == 1)
  412. switch(rand(1,4)) {
  413. case 1: warp "pvp_2vs2",39,7; end;
  414. case 2: warp "pvp_2vs2",39,73; end;
  415. case 3: warp "pvp_2vs2",7,39; end;
  416. case 4: warp "pvp_2vs2",73,39; end;
  417. }
  418. warp "pvp_c_room",84,39;
  419. end;
  420. }
  421. // PVP Area Exit warp
  422. //============================================================
  423. pvp_room,51,19,0 script out#eventpvp 45,4,2,{
  424. OnTouch:
  425. mes "[Combat Square Staff]";
  426. mes "Did you have fun in Combat Square?";
  427. mes "May I ask where you want to go?";
  428. next;
  429. switch(select("Prontera.:Morocc.:Geffen.:Payon.:Alberta.:Cancel.")) {
  430. case 1: warp "prontera",107,60; end;
  431. case 2: warp "morocc",157,96; end;
  432. case 3: warp "geffen",120,36; end;
  433. case 4: warp "payon",96,100; end;
  434. case 5: warp "alberta",41,243; end;
  435. case 6: close;
  436. }
  437. }