pvp.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. //===== eAthena Script =======================================
  2. //= PvP NPCs
  3. //===== By: ==================================================
  4. //= kobra_k88; L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.4
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= [Aegis Conversion]
  11. //= PvP NPCs that are found in the Inns in major cities.
  12. //= Includes Yoyo Mode, Nightmare Mode, and Event Mode
  13. //=
  14. //= Breakdown of function "F_PVPNarrator"
  15. //= arg(0): Map to save player on
  16. //= arg(1): X position on getarg(0) map to save player
  17. //= arg(2): Y position on getarg(0) map to save player
  18. //===== Additional Comments: =================================
  19. //= 1.1 Fixed arena names for Nightmare mode. Added room limit
  20. //= check.[kobra_k88]
  21. //= 1.2 Fixed the bug that you aways savepoint in geffen.[shadowlady]
  22. //= 1.2a Added PvP Narrator function. Using args for Fight
  23. //= Square Helpers. [kobra_k88]
  24. //= 1.3 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
  25. //= Removed all receptioned for Yoyo mode, with the
  26. //= exception of the "Free for all" mode.
  27. //= Added PVP event NPCs.
  28. //= 1.4 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
  29. //============================================================
  30. // Morroc
  31. //============================================================
  32. morocc_in,144,138,4 script PVPNarrator#moc 84,{
  33. callfunc "F_PVPNarrator","morocc_in",141,139;
  34. }
  35. morocc_in,144,142,4 script Gate Keeper#moc::PVPGateKeeper 83,{
  36. mes "[Gate Keeper]";
  37. mes "Glad to be of service.";
  38. mes "I will open the PVP fight";
  39. mes "square for you! If you have";
  40. mes "any questions about the PVP";
  41. mes "modes or rules, Please ask";
  42. mes "the Narrator...";
  43. next;
  44. switch(select("^FF5533' PvP Nightmare Mode'^000000:^3355FF' PvP Yoyo Mode'^000000:^3355FF' PvP Event Mode'^000000:Quit")) {
  45. case 1:
  46. mes "[Gate Keeper]";
  47. mes "I am sorry, but currently the Nightmare mode service is not available.";
  48. mes "Please use the Yoyo mode instead. We apologize for the inconvenience.";
  49. close;
  50. case 2:
  51. mes "[Gate Keeper]";
  52. mes "The admission fee is 500 Zeny.";
  53. mes "Do you want to move";
  54. mes "to the Yoyo Mode";
  55. mes "fight square?";
  56. next;
  57. switch(select("Move:Cancel")) {
  58. case 1:
  59. if (Zeny > 499 && BaseLevel > 30) {
  60. set zeny,zeny-500;
  61. warp "pvp_y_room",51,23;
  62. end;
  63. }
  64. else {
  65. mes "[Gate Keeper]";
  66. mes "Excuse me, but";
  67. mes "did you not come prepared?";
  68. mes "Double check that you have the";
  69. mes "500 Zeny entrance fee, and";
  70. mes "that you are at least level 31!";
  71. close;
  72. }
  73. case 2:
  74. mes "[Gate Keeper]";
  75. mes "In this war between Monsters";
  76. mes "and Humans. This competition";
  77. mes "between people, The PVP Mode!";
  78. mes "Encourages us all to become";
  79. mes "stronger. Come again.";
  80. mes "We welcome your challenge!";
  81. close;
  82. }
  83. case 3:
  84. mes "[Gate Keeper]";
  85. mes "Welcome";
  86. mes "Please double check";
  87. mes "That you have the admission or viewing ticket!";
  88. next;
  89. if (countitem(7028) == 0 && countitem(7029) == 0) {
  90. mes "[Gate Keeper]";
  91. mes "Eh? You don't have it? Then I";
  92. mes "am sorry, this fight square is";
  93. mes "only for people who have";
  94. mes "admission or viewing tickets.";
  95. mes "You cannot come in without it.";
  96. close;
  97. }
  98. mes "[Gate Keeper]";
  99. mes "Yes, thank you for participating. Have fun!";
  100. close2;
  101. warp "pvp_room",51,23;
  102. end;
  103. case 4:
  104. mes "[Gate Keeper]";
  105. mes "In this war between Monsters";
  106. mes "and Humans. This competition";
  107. mes "between people, The PVP Mode!";
  108. mes "Encourages us all to become";
  109. mes "stronger. Come again.";
  110. mes "We welcome your challenge!";
  111. close;
  112. }
  113. }
  114. // Alberta
  115. //============================================================
  116. alberta_in,22,146,4 script PVP Narrator#alb 84,{
  117. callfunc "F_PVPNarrator","alberta_in",22,148;
  118. }
  119. alberta_in,26,146,4 duplicate(PVPGateKeeper) Gate Keeper#alb 83
  120. // Prontera
  121. //============================================================
  122. prt_in,56,140,4 script PVPNarrator#prt 84,{
  123. callfunc "F_PVPNarrator","prt_in",54,137;
  124. }
  125. prt_in,52,140,4 duplicate(PVPGateKeeper) Gate Keeper#prt 83
  126. // Geffen
  127. //============================================================
  128. geffen_in,67,63,4 script PVPNarrator#gef 84,{
  129. callfunc "F_PVPNarrator","geffen_in",70,59;
  130. }
  131. geffen_in,63,63,4 duplicate(PVPGateKeeper) Gate Keeper#gef 83
  132. // Payon
  133. //============================================================
  134. payon_in01,142,50,4 script PVPNarrator#pay 84,{
  135. callfunc "F_PVPNarrator","payon_in01",142,46;
  136. }
  137. payon_in01,140,53,4 duplicate(PVPGateKeeper) Gate Keeper#pay 83
  138. // PVP Yoyo Mode Staff
  139. //============================================================
  140. pvp_y_room,86,85,4 script Fight Square Reception#1 105,{
  141. set .@mapcount_1,getmapusers("pvp_y_8-1");
  142. set .@mapcount_2,getmapusers("pvp_y_8-2");
  143. set .@mapcount_3,getmapusers("pvp_y_8-3");
  144. set .@mapcount_4,getmapusers("pvp_y_8-4");
  145. set .@mapcount_5,getmapusers("pvp_y_8-5");
  146. while(1) {
  147. switch(select("Prontera [ "+.@mapcount_1+" / 128 ]:Izlude [ "+.@mapcount_2+" / 128 ]:Payon [ "+.@mapcount_3+" / 128 ]:Alberta [ "+.@mapcount_4+" / 128 ]:Morroc [ "+.@mapcount_5+" / 128 ]:Cancel")) {
  148. case 1:
  149. callsub S_CheckPVPRoom,@mapcount_1,"pvp_y_8-1";
  150. break;
  151. case 2:
  152. callsub S_CheckPVPRoom,@mapcount_2,"pvp_y_8-2";
  153. break;
  154. case 3:
  155. callsub S_CheckPVPRoom,@mapcount_3,"pvp_y_8-3";
  156. break;
  157. case 4:
  158. callsub S_CheckPVPRoom,@mapcount_4,"pvp_y_8-4";
  159. break;
  160. case 5:
  161. callsub S_CheckPVPRoom,@mapcount_5,"pvp_y_8-5";
  162. break;
  163. case 6:
  164. close;
  165. }
  166. }
  167. OnInit:
  168. waitingroom "Free For All",0;
  169. end;
  170. S_CheckPVPRoom:
  171. if (getarg(0) >= 128) {
  172. mes "[PVP Fight Square Reception Staff]";
  173. mes "This map is currently full.";
  174. next;
  175. return;
  176. }
  177. else {
  178. warp getarg(1),0,0;
  179. end;
  180. }
  181. }
  182. // PVP Nightmare Mode Staff
  183. //============================================================
  184. pvp_n_room,30,85,4 script Fight Square Reception#2 105,{
  185. set .@mapcount_1,getmapusers("pvp_n_8-1");
  186. set .@mapcount_2,getmapusers("pvp_n_8-2");
  187. set .@mapcount_3,getmapusers("pvp_n_8-3");
  188. set .@mapcount_4,getmapusers("pvp_n_8-4");
  189. set .@mapcount_5,getmapusers("pvp_n_8-5");
  190. while(1) {
  191. switch(select("Sandwich [ "+.@mapcount_1+" / 64 ]:Lock on [ "+.@mapcount_2+" / 32 ]:Four Room [ "+.@mapcount_3+" / 32 ]:Under cross [ "+.@mapcount_4+" / 32 ]:Compass Room [ "+.@mapcount_5+" / 32 ]:Cancel")) {
  192. case 1:
  193. callsub S_CheckPVPRoom,@mapcount_1,"pvp_n_8-1",64;
  194. break;
  195. case 2:
  196. callsub S_CheckPVPRoom,@mapcount_2,"pvp_n_8-2",32;
  197. break;
  198. case 3:
  199. callsub S_CheckPVPRoom,@mapcount_3,"pvp_n_8-3",32;
  200. break;
  201. case 4:
  202. callsub S_CheckPVPRoom,@mapcount_4,"pvp_n_8-4",32;
  203. break;
  204. case 5:
  205. callsub S_CheckPVPRoom,@mapcount_5,"pvp_n_8-5",32;
  206. break;
  207. case 6:
  208. close;
  209. }
  210. }
  211. OnInit:
  212. waitingroom "Free For All",0;
  213. end;
  214. S_CheckPVPRoom:
  215. if (getarg(0) >= getarg(2)) {
  216. mes "[PVP Fight Square Reception Staff]";
  217. mes "This map is currently full.";
  218. next;
  219. return;
  220. }
  221. else {
  222. warp getarg(1),0,0;
  223. end;
  224. }
  225. }
  226. // Function
  227. //============================================================
  228. function script F_PVPNarrator {
  229. mes "[PVP Narrator]";
  230. mes "Hello and welcome!";
  231. mes "I am in charge of";
  232. mes "explaining the PVP Mode.";
  233. mes "I am the PVP Narrator!";
  234. next;
  235. switch(select("What is PVP?:What are the PVP Modes?:What are the rules for PVP?:Save Position.:End Dialog.")) {
  236. case 1:
  237. mes "[PVP Narrator]";
  238. mes "In short form";
  239. mes "PVP means,";
  240. mes "' Player VS Player Mode '";
  241. mes "It's a unique place for people";
  242. mes "To duel with each other.";
  243. next;
  244. mes "[PVP Narrator]";
  245. mes "Just tell the";
  246. mes "^3355FFGate Keeper^000000";
  247. mes "That you want to try. He will";
  248. mes "let you into the PVP square.";
  249. next;
  250. mes "[PVP Narrator]";
  251. mes "But, You need to be at";
  252. mes "least level 31. And you";
  253. mes "must pay the 500 zeny";
  254. mes "entrance fee in order to";
  255. mes "To enter a PVP Fight Square.";
  256. close;
  257. case 2:
  258. mes "[PVP Narrator]";
  259. mes "When you are qualified, You";
  260. mes "can choose one of two Modes.";
  261. mes "Yoyo Mode, Or";
  262. mes "Nightmare Mode.";
  263. next;
  264. mes "[PVP Narrator]";
  265. mes "Yoyo Mode is risk free.";
  266. mes "You can experience PVP";
  267. mes "without any restriction or";
  268. mes "punishment. It is recommended";
  269. mes "that you practice your skills";
  270. mes "here before you move on.";
  271. next;
  272. mes "[PVP Narrator]";
  273. mes "Nightmare Mode is very";
  274. mes "dangerous! Please use caution.";
  275. mes "You will lose some of your real";
  276. mes "EXP when you are defeated. And";
  277. mes "There is a small chance that";
  278. mes "you will drop some equipment.";
  279. next;
  280. mes "[PVP Narrator]";
  281. mes "However, if you win, the";
  282. mes "rewards can be great!";
  283. mes "To avoid misunderstanding.";
  284. mes "You should think it over";
  285. mes "twice before you go there...";
  286. mes "Good Luck!";
  287. close;
  288. case 3:
  289. mes "[PVP Narrator]";
  290. mes "Each of the Fight squares";
  291. mes "have a row of Narrators to";
  292. mes "choose from based on your";
  293. mes "qualifications.";
  294. next;
  295. mes "[PVP Narrator]";
  296. mes "Each Narrator will ask";
  297. mes "which of the five PVP maps";
  298. mes "you wish to go to.";
  299. mes "Choose, and go in!";
  300. next;
  301. mes "[PVP Narrator]";
  302. mes "Each map has a limitation on";
  303. mes "the number of people who can";
  304. mes "participate. So you will see";
  305. mes "figures in the corner showing";
  306. mes "'Attendee/total'.";
  307. next;
  308. mes "[PVP Narrator]";
  309. mes "Also, there is a hidden EXP";
  310. mes "value in PVP mode. This EXP";
  311. mes "score will only apply inside";
  312. mes "of the PVP zone, so do not";
  313. mes "worry.";
  314. next;
  315. mes "[PVP Narrator]";
  316. mes "Every player's EXP at the";
  317. mes "beginning is usually 5 points.";
  318. mes "If you win, you will";
  319. mes "increse your EXP by 1 point";
  320. next;
  321. mes "[PVP Narrator]";
  322. mes "In the same way, when you";
  323. mes "lose... Your EXP will";
  324. mes "drop by 5 points.";
  325. mes "So be careful!";
  326. next;
  327. mes "[PVP Narrator]";
  328. mes "When you are defeated";
  329. mes "And your EXP is equal";
  330. mes "to or less than 0,";
  331. mes "You will be removed from PVP";
  332. mes "And your duel is finished!";
  333. next;
  334. mes "[PVP Narrator]";
  335. mes "However, If your EXP is more";
  336. mes "than 0. You can still get help";
  337. mes "Through other players healing...";
  338. mes "Do you get it?";
  339. next;
  340. mes "[PVP Narrator]";
  341. mes "The fighting commands inside of";
  342. mes "PVP Are the same as the normal.";
  343. mes "All the basic controls are the";
  344. mes "same.";
  345. next;
  346. mes "[PVP Narrator]";
  347. mes "However, there is one thing...";
  348. mes "Within the PVP fight square,";
  349. mes "And in the PVP fighting zones";
  350. mes "You cannot save your position.";
  351. mes "Remember well... These rules";
  352. mes "can help to ensure your victory.";
  353. close;
  354. case 4:
  355. mes "[PVP Narrator]";
  356. mes "Position saved...";
  357. mes "Successfully.";
  358. mes "Thank you very much, We";
  359. mes "will see you again soon.";
  360. close2;
  361. savepoint getarg(0),getarg(1),getarg(2);
  362. end;
  363. case 5:
  364. mes "[PVP Narrator]";
  365. mes "In this war between Monsters";
  366. mes "and Humans. This competition";
  367. mes "between people, The PVP Mode!";
  368. mes "Encourages us all to become";
  369. mes "stronger. Come again.";
  370. mes "We welcome your challenge!";
  371. close;
  372. }
  373. }
  374. // Event Contestant Entrance
  375. //============================================================
  376. pvp_room,54,85,4 script Registration Staff#1 105,{
  377. if (countitem(7028) == 0) {
  378. mes "[PVP Combat Square Register Staff]";
  379. mes "Eh? How did you get in here?";
  380. mes "This is the entrance for players only.";
  381. mes "For details about viewers please proceed to the Register Staff on your right.";
  382. close;
  383. }
  384. if (.pvp_close_n_room == 1 && .pvp_close_s_room == 1 && .pvp_close_w_room == 1 && .pvp_close_e_room == 1) {
  385. Set .pvp_close_n_room,0;
  386. Set .pvp_close_s_room,0;
  387. Set .pvp_close_w_room,0;
  388. Set .pvp_close_e_room,0;
  389. }
  390. if (select("Combat Square one :Cancel") == 1) {
  391. mes "[PVP Combat Square Register Staff]";
  392. mes "'"+ strcharinfo(0) +"'";
  393. mes "Are you ready?!";
  394. next;
  395. if (select("Yes!:No!") == 1) {
  396. mes "[PVP Combat Square Register Staff]";
  397. mes "OK! I will send you inside";
  398. mes "Good luck!";
  399. close2;
  400. delitem 7028,1; //Invite_For_Duel
  401. while(1) {
  402. switch(rand(1,4)) {
  403. case 1:
  404. if (.pvp_close_n_room == 0) {
  405. set .pvp_close_n_room,1;
  406. warp "pvp_2vs2",40,59;
  407. end;
  408. }
  409. case 2:
  410. if (.pvp_close_s_room == 0) {
  411. set .pvp_close_s_room,1;
  412. warp "pvp_2vs2",59,40;
  413. end;
  414. }
  415. case 3:
  416. if (.pvp_close_w_room == 0) {
  417. set .pvp_close_w_room,1;
  418. warp "pvp_2vs2",20,40;
  419. end;
  420. }
  421. case 4:
  422. if (.pvp_close_e_room == 0) {
  423. set .pvp_close_e_room,1;
  424. warp "pvp_2vs2",40,20;
  425. end;
  426. }
  427. }
  428. }
  429. }
  430. mes "[PVP Combat Square Register Staff]";
  431. mes "Come back anytime you are ready.";
  432. close;
  433. }
  434. close;
  435. OnInit:
  436. Set .pvp_close_n_room,0;
  437. Set .pvp_close_s_room,0;
  438. Set .pvp_close_w_room,0;
  439. Set .pvp_close_e_room,0;
  440. waitingroom "Combat Square players entrance only",0;
  441. end;
  442. }
  443. // Spectator Entrance
  444. //============================================================
  445. pvp_room,62,85,4 script Spectator's Entrance#1::PVPSpectator 105,{
  446. if (countitem(7029) == 0) {
  447. mes "[PVP Compete Square Register Staff]";
  448. mes "This is the entrance for viewers.";
  449. mes "For details about players entrance please proceed to the Register Staff on your left.";
  450. close;
  451. }
  452. if (select("Compete Square one:Cancel") == 1) {
  453. mes "[PVP Combat Square Register Staff]";
  454. mes "You got it, thanks for participating. Have fun!";
  455. close2;
  456. delitem 7029,1; //Admission_For_Duel
  457. switch(rand(1,4)) {
  458. case 1: warp "pvp_2vs2",39,7; end;
  459. case 2: warp "pvp_2vs2",39,73; end;
  460. case 3: warp "pvp_2vs2",7,39; end;
  461. case 4: warp "pvp_2vs2",73,39; end;
  462. }
  463. }
  464. close;
  465. OnInit:
  466. waitingroom "Compete Square viewer's entrance",0;
  467. end;
  468. }
  469. pvp_room,70,85,4 duplicate(PVPSpectator) Spectator's Entrance#2 105
  470. pvp_room,78,85,4 duplicate(PVPSpectator) Spectator's Entrance#3 105
  471. pvp_room,86,85,4 duplicate(PVPSpectator) Spectator's Entrance#4 105
  472. // Spectator Warps
  473. //============================================================
  474. pvp_2vs2,5,4,0 script Combat Square Staff#1::PVPSpecWarp 45,1,1,{
  475. OnTouch:
  476. mes "[Combat Square Staff]";
  477. mes "May I help you?";
  478. if (select("To the center viewer seat.:Leave Combat Square.") == 1) {
  479. warp "pvp_2vs2",38,38;
  480. end;
  481. }
  482. warp "pvp_room",84,39;
  483. end;
  484. }
  485. pvp_2vs2,5,74,0 duplicate(PVPSpecWarp) Combat Square Staff#2 45,1,1
  486. pvp_2vs2,74,74,0 duplicate(PVPSpecWarp) Combat Square Staff#3 45,1,1
  487. pvp_2vs2,74,5,0 duplicate(PVPSpecWarp) Combat Square Staff#4 45,1,1
  488. pvp_2vs2,40,40,0 script Combat Square Staff#5 45,1,1,{
  489. set mapmove,0;
  490. mes "[Combat Square Staff]";
  491. mes "May I help you?";
  492. if (select("To the side viewer seat.:Leave Combat Square.") == 1) {
  493. switch(rand(1,4)) {
  494. case 1: warp "pvp_2vs2",39,7; end;
  495. case 2: warp "pvp_2vs2",39,73; end;
  496. case 3: warp "pvp_2vs2",7,39; end;
  497. case 4: warp "pvp_2vs2",73,39; end;
  498. }
  499. }
  500. warp "pvp_c_room",84,39;
  501. end;
  502. }
  503. // PVP Area Exit warp
  504. //============================================================
  505. pvp_room,51,19,0 script out#eventpvp 45,4,2,{
  506. OnTouch:
  507. mes "[Combat Square Staff]";
  508. mes "Did you have fun in Combat Square?";
  509. mes "May I ask where you want to go?";
  510. next;
  511. switch(select("prontera.:morocc.:geffen.:payon.:alberta.:Cancel.")) {
  512. case 1: warp "prontera",107,60; end;
  513. case 2: warp "morocc",157,96; end;
  514. case 3: warp "geffen",120,36; end;
  515. case 4: warp "payon",96,100; end;
  516. case 5: warp "alberta",41,243; end;
  517. case 6: close;
  518. }
  519. }