pvp.txt 16 KB

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