BuwayaCave.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. //===== rAthena Script =======================================
  2. //= Buwaya Cave
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Defeat Buwaya in his cave.
  12. //= Part of the "Secret in the Woods" quest.
  13. //===== Additional Comments: =================================
  14. //= 1.0 First version. [Euphy]
  15. //============================================================
  16. // Instance Creation :: buwaya_dun
  17. //============================================================
  18. ma_fild02,312,317,5 script Guard#buwaya_cave 570,{
  19. if (BaseLevel < 130) {
  20. mes "[Guard]";
  21. mes "People under ^ff0000level 130^000000";
  22. mes "cannot enter this place.";
  23. mes "This place is dangerous. Please go back.";
  24. close;
  25. }
  26. set .@party_id,getcharid(1);
  27. set .@md_name$,"Buwaya Cave";
  28. if (!.@party_id) {
  29. mes "[Guard]";
  30. mes "Buwaya is dangerous.";
  31. mes "Please come back after you form a";
  32. mes "team with other people.";
  33. close;
  34. }
  35. if (is_party_leader() == true) {
  36. mes "[Guard]";
  37. mes "This place is dangerous. Please go back.";
  38. mes "If you dont have any business here, please go back.";
  39. next;
  40. while(1) {
  41. switch(select("Why is it so dangerous?:I'm here to hunt down Buwaya.:End conversation.")) {
  42. case 1:
  43. mes "[Guard]";
  44. mes "Recently, there has been a case";
  45. mes "where villagers have disappeared.";
  46. mes "After investigating the tracks, ";
  47. mes "we found out the giant monster Buwaya";
  48. mes "was responsible.";
  49. next;
  50. mes "[Guard]";
  51. mes "Soldiers and mercenaries have been dispatched to ";
  52. mes "hunt down Buwaya, but were never";
  53. mes "completely successful.";
  54. next;
  55. mes "[Guard]";
  56. mes "Buwaya is still kidnapping";
  57. mes "the villagers to this day.";
  58. mes "Please gather some people to get rid of Buwaya.";
  59. next;
  60. break;
  61. case 2:
  62. set .@playtime, checkquest(4229,PLAYTIME);
  63. if (.@playtime == -1) {
  64. // fall through
  65. } else if (.@playtime == 0 || .@playtime == 1) {
  66. mes "[Guard]";
  67. mes "Buwaya is still hiding.";
  68. mes "Even if you enter now, Buwaya will not come out. ";
  69. mes "Please come back later.";
  70. close;
  71. } else {
  72. erasequest 4229;
  73. // fall through
  74. }
  75. if (instance_create(.@md_name$) < 0) {
  76. mes "[Guard]";
  77. mes "Party name is... "+getpartyname(.@party_id)+".";
  78. mes "Party leader is... "+strcharinfo(0);
  79. mes "^0000ff"+.@md_name$+"^000000 cannot be opened now.";
  80. mes "Please try a moment later.";
  81. close;
  82. }
  83. mes "[Guard]";
  84. mes "I will open up the tunnel to ^0000ff"+.@md_name$+"^000000.";
  85. mes "I wish you good luck.";
  86. close;
  87. case 3:
  88. mes "[Guard]";
  89. mes "This place is dangerous. You cannot enter.";
  90. close;
  91. }
  92. }
  93. } else {
  94. mes "[Guard]";
  95. mes "Let me talk with the party leader.";
  96. mes "Please call forth the leader.";
  97. close;
  98. }
  99. }
  100. ma_fild02,315,323,0 script Cave Entrance#buwaya 45,2,2,{
  101. end;
  102. OnTouch:
  103. if (BaseLevel < 130) {
  104. mes "[Guard]";
  105. mes "People under ^ff0000level 130^000000";
  106. mes "cannot enter this place.";
  107. mes "This place is dangerous. Please go back.";
  108. close;
  109. }
  110. set .@playtime, checkquest(4229,PLAYTIME);
  111. if (.@playtime == -1) {
  112. // fall through
  113. } else if (.@playtime == 0 || .@playtime == 1) {
  114. mes "[Guard]";
  115. mes "Buwaya is still hiding.";
  116. mes "Even if you enter now, Buwaya will not come out.";
  117. mes "Please come back later.";
  118. close;
  119. } else {
  120. erasequest 4229;
  121. // fall through
  122. }
  123. switch(select("Enter.:Turn back.")) {
  124. case 1:
  125. switch(instance_enter("Buwaya Cave")) {
  126. case IE_OTHER:
  127. mes "[Guard]";
  128. mes "Oh, now is not a good time.";
  129. mes "Please try again a moment later.";
  130. close;
  131. case IE_NOINSTANCE:
  132. case IE_NOMEMBER:
  133. mes "[Guard]";
  134. mes "This place is dangerous. Please do not enter.";
  135. close;
  136. case IE_OK:
  137. mapannounce "ma_fild02",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  138. setquest 4229;
  139. //warp "1@ma_c",35,57;
  140. end;
  141. default:
  142. mes "- Could not enter due to an unidentified force. -";
  143. close;
  144. }
  145. case 2:
  146. mes "[Guard]";
  147. mes "You must value your life.";
  148. mes "It is better to think carefully before you act.";
  149. close;
  150. }
  151. }
  152. // Instance Scripts :: buwaya_in
  153. //============================================================
  154. 1@ma_c,33,112,0 script #damage 139,7,7,{
  155. end;
  156. OnInstanceInit:
  157. initnpctimer;
  158. disablenpc instance_npcname("#damage");
  159. end;
  160. OnTimer1000:
  161. enablenpc instance_npcname("#damage");
  162. specialeffect EF_POISONHIT;
  163. end;
  164. OnTimer2000:
  165. stopnpctimer;
  166. initnpctimer;
  167. disablenpc instance_npcname("#damage");
  168. end;
  169. OnTouch:
  170. percentheal -10,-10;
  171. sc_start SC_BLEEDING,60000,0;
  172. sc_start SC_POISON,60000,0;
  173. end;
  174. }
  175. 1@ma_c,29,110,5 script Kidnapped People#1 575,{
  176. mes "[Kidnapped Residents]";
  177. mes "Buwaya was running around,";
  178. mes "and new people got caught.";
  179. mes "We will be stuck in here for the rest of our lives.";
  180. next;
  181. switch(select("Get me outta here!!:Ca...can't escape?")) {
  182. case 1:
  183. mes "[Kidnapped Residents]";
  184. mes "We don't have enough power to destroy it but Buwaya has a weakness.";
  185. mes "Look at the wall over there.";
  186. mes "If you knock there, Buywaya will feel pain and spit you out.";
  187. donpcevent instance_npcname("#box_mob_call")+"::OnEnable";
  188. close2;
  189. disablenpc instance_npcname("Kidnapped People#1");
  190. end;
  191. case 2:
  192. mes "[Kidnapped People]";
  193. mes "Somthing is wrong here...";
  194. mes "Have you experienced this before?";
  195. close;
  196. }
  197. end;
  198. OnInstanceInit:
  199. disablenpc instance_npcname("Kidnapped People#1");
  200. end;
  201. OnEnable:
  202. enablenpc instance_npcname("Kidnapped People#1");
  203. donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
  204. end;
  205. }
  206. 1@ma_c,36,110,5 script Kidnapped People#2 574,{
  207. mes "[Kidnapped Residents]";
  208. mes "Ahaa! I wish I had a little more power...";
  209. mes "I know its weakness...";
  210. next;
  211. switch(select("Tell me.:Do you really know?")) {
  212. case 1:
  213. mes "[Kidnapped Residents]";
  214. mes "Are you sure you can do it...?";
  215. mes "Ok, listen carefully,";
  216. mes "its weakness is...";
  217. next;
  218. mes "[Kidnapped Residents]";
  219. mes "...behind us on the walls.";
  220. sc_start SC_ATKPOTION,60000,45;
  221. sc_start SC_MATKPOTION,60000,45;
  222. disablenpc instance_npcname("Kidnapped People#2");
  223. close;
  224. case 2:
  225. mes "[Kidnapped Residents]";
  226. mes "WHAT?!";
  227. mes "Are you ignoring me";
  228. mes "because I'm captured in here?";
  229. close;
  230. }
  231. end;
  232. OnInstanceInit:
  233. disablenpc instance_npcname("Kidnapped People#2");
  234. end;
  235. OnEnable:
  236. enablenpc instance_npcname("Kidnapped People#2");
  237. end;
  238. }
  239. 1@ma_c,3,3,0 script #box_mob_call 139,1,1,{
  240. end;
  241. OnInstanceInit:
  242. setcell instance_mapname("1@ma_c"),30,118,35,118,cell_shootable,1; //custom
  243. disablenpc instance_npcname("#box_mob_call");
  244. end;
  245. OnEnable:
  246. enablenpc instance_npcname("#box_mob_call");
  247. set .@label$, instance_npcname("#box_mob_call")+"::OnMyMobDead";
  248. set .@map$, instance_mapname("1@ma_c");
  249. monster .@map$,30,118,"Buwaya's Weakness",2333,1,.@label$;
  250. monster .@map$,35,118,"Buwaya's Weakness",2333,1,.@label$;
  251. end;
  252. OnDisable:
  253. killmonster instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead";
  254. disablenpc instance_npcname("#box_mob_call");
  255. end;
  256. OnMyMobDead:
  257. if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead") < 1)
  258. donpcevent instance_npcname("#box_out")+"::OnEnable";
  259. end;
  260. }
  261. 1@ma_c,33,118,0 script #box_out 45,2,2,{
  262. OnInstanceInit:
  263. OnDisable:
  264. disablenpc instance_npcname("#box_out");
  265. end;
  266. OnEnable:
  267. enablenpc instance_npcname("#box_out");
  268. end;
  269. OnTouch:
  270. set .@x, rand(1,20) + 97;
  271. set .@y, rand(1,20) + 74;
  272. warp instance_mapname("1@ma_c"),.@x,.@y;
  273. end;
  274. }
  275. 1@ma_c,97,74,0 script #box_call 139,50,50,{
  276. end;
  277. OnInstanceInit:
  278. disablenpc instance_npcname("#box_call");
  279. initnpctimer;
  280. end;
  281. OnTimer30000:
  282. mapannounce instance_mapname("1@ma_c"),"Buwaya : I will put you in my treasure box!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  283. // Should execute OnTimer33000, but client doesn't render the effect fast enough.
  284. for(set .@i,1; .@i<=9; set .@i,.@i+1)
  285. donpcevent instance_npcname("#yunobi"+.@i)+"::OnEnable";
  286. end;
  287. OnTimer33000:
  288. donpcevent instance_npcname("#box_out")+"::OnDisable";
  289. donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
  290. donpcevent instance_npcname("Kidnapped People#1")+"::OnEnable";
  291. donpcevent instance_npcname("Kidnapped People#2")+"::OnEnable";
  292. end;
  293. OnTimer34000:
  294. enablenpc instance_npcname("#box_call");
  295. end;
  296. OnTimer35000:
  297. stopnpctimer;
  298. initnpctimer;
  299. disablenpc instance_npcname("#box_call");
  300. end;
  301. OnTouch_:
  302. specialeffect2 EF_GUIDEDATTACK;
  303. warp instance_mapname("1@ma_c"),33,112;
  304. end;
  305. OnDisable:
  306. stopnpctimer;
  307. disablenpc instance_npcname("#box_call");
  308. end;
  309. }
  310. 1@ma_c,97,74,0 script #yunobi1 139,{
  311. end;
  312. OnInstanceInit:
  313. hideonnpc instance_npcname(strnpcinfo(0));
  314. end;
  315. OnEnable:
  316. specialeffect EF_MAPPILLAR2;
  317. end;
  318. }
  319. 1@ma_c,97,94,0 duplicate(#yunobi1) #yunobi2 139
  320. 1@ma_c,117,94,0 duplicate(#yunobi1) #yunobi3 139
  321. 1@ma_c,117,74,0 duplicate(#yunobi1) #yunobi4 139
  322. 1@ma_c,117,54,0 duplicate(#yunobi1) #yunobi5 139
  323. 1@ma_c,97,54,0 duplicate(#yunobi1) #yunobi6 139
  324. 1@ma_c,77,54,0 duplicate(#yunobi1) #yunobi7 139
  325. 1@ma_c,77,74,0 duplicate(#yunobi1) #yunobi8 139
  326. 1@ma_c,77,94,0 duplicate(#yunobi1) #yunobi9 139
  327. 1@ma_c,1,1,0 script #bunshin 139,{
  328. end;
  329. OnInstanceInit:
  330. initnpctimer;
  331. end;
  332. OnTimer58000:
  333. mapannounce instance_mapname("1@ma_c"),"Buwaya : I had enough with this, let's go till the end!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  334. end;
  335. OnTimer61000:
  336. mapannounce instance_mapname("1@ma_c"),"Buwaya : This is!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  337. end;
  338. OnTimer62000:
  339. mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  340. end;
  341. OnTimer63000:
  342. mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  343. end;
  344. OnTimer64000:
  345. mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly... ATTACK!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  346. end;
  347. OnTimer65000:
  348. set .@label$, instance_npcname("#bunshin")+"::OnMyMobDead";
  349. set .@map$, instance_mapname("1@ma_c");
  350. areamonster .@map$,112,89,122,99,"Buwaya",2332,1,.@label$;
  351. areamonster .@map$,112,49,122,59,"Buwaya",2332,1,.@label$;
  352. areamonster .@map$,72,49,82,59,"Buwaya",2332,1,.@label$;
  353. areamonster .@map$,72,89,82,99,"Buwaya",2332,1,.@label$;
  354. end;
  355. OnTimer66000:
  356. mapannounce instance_mapname("1@ma_c"),"Buwaya : Are you scared?",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  357. end;
  358. OnTimer105000:
  359. killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
  360. stopnpctimer;
  361. initnpctimer;
  362. end;
  363. OnMyMobDead:
  364. if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead") < 1) {
  365. stopnpctimer;
  366. initnpctimer;
  367. }
  368. end;
  369. OnDisable:
  370. stopnpctimer;
  371. killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
  372. disablenpc instance_npcname("#bunshin");
  373. end;
  374. }
  375. 1@ma_c,2,2,0 script #buwaya_con 139,{
  376. end;
  377. OnInstanceInit:
  378. areamonster instance_mapname("1@ma_c"),90,67,104,81,"Buwaya",2319,1,instance_npcname("#buwaya_con")+"::OnMyMobDead";
  379. end;
  380. OnMyMobDead:
  381. set .@map$, instance_mapname("1@ma_c");
  382. if (mobcount(.@map$,instance_npcname("#buwaya_con")+"::OnMyMobDead") < 1) {
  383. donpcevent instance_npcname("#box_call")+"::OnDisable";
  384. donpcevent instance_npcname("#bunshin")+"::OnDisable";
  385. donpcevent instance_npcname("#exit_mob")+"::OnDisable";
  386. donpcevent instance_npcname("#cave_out")+"::OnEnable";
  387. mapannounce .@map$,"Guard : You did great work. Please hurry up and escape to the way you came in!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
  388. }
  389. end;
  390. }
  391. 1@ma_c,3,3,0 script #exit_mob 139,{
  392. end;
  393. OnInstanceInit:
  394. initnpctimer;
  395. end;
  396. OnTimer60000:
  397. set .@label$, instance_npcname("#exit_mob")+"::OnMyMobDead";
  398. set .@map$, instance_mapname("1@ma_c");
  399. if (mobcount(.@map$,.@label$) < 30)
  400. set .@amount,10;
  401. else
  402. set .@amount,1;
  403. areamonster .@map$,43,58,47,60,"Water Plant",2331,.@amount,.@label$;
  404. areamonster .@map$,43,58,47,60,"Egg",2329,.@amount,.@label$;
  405. stopnpctimer;
  406. initnpctimer;
  407. end;
  408. OnDisable:
  409. stopnpctimer;
  410. killmonster instance_mapname("1@ma_c"),instance_npcname("#exit_mob")+"::OnMyMobDead";
  411. disablenpc instance_npcname("#exit_mob");
  412. end;
  413. OnMyMobDead:
  414. end;
  415. }
  416. 1@ma_c,28,57,0 script #cave_out 45,2,2,{
  417. OnInstanceInit:
  418. disablenpc instance_npcname("#cave_out");
  419. end;
  420. OnEnable:
  421. enablenpc instance_npcname("#cave_out");
  422. end;
  423. OnTouch:
  424. mes "Would like to go out?";
  425. next;
  426. if(select("Yes!:No, I will stay.") == 1)
  427. warp "ma_fild02",315,315;
  428. close;
  429. }
  430. 1@ma_c,1,1,0 script #buwaya_spawn_mobs -1,{
  431. OnInstanceInit:
  432. set .@map$, instance_mapname("1@ma_c");
  433. areamonster .@map$,73,81,93,101,"Seaweed",2331,18;
  434. areamonster .@map$,110,97,116,103,"Seaweed",2331,8;
  435. areamonster .@map$,59,63,63,67,"Seaweed",2331,8;
  436. areamonster .@map$,73,55,77,59,"Seaweed",2331,4;
  437. areamonster .@map$,103,69,107,73,"Seaweed",2331,4;
  438. areamonster .@map$,108,45,122,63,"Seaweed",2331,15;
  439. areamonster .@map$,73,81,93,101,"Buwaya's Egg",2329,10;
  440. areamonster .@map$,110,97,116,103,"Buwaya's Egg",2329,8;
  441. areamonster .@map$,59,63,63,67,"Buwaya's Egg",2329,4;
  442. areamonster .@map$,73,55,77,59,"Buwaya's Egg",2329,3;
  443. areamonster .@map$,103,69,107,73,"Buwaya's Egg",2329,3;
  444. areamonster .@map$,108,45,122,63,"Buwaya's Egg",2329,15;
  445. monster .@map$,0,0,"Seaweed",2331,5;
  446. monster .@map$,0,0,"Buwaya's Slave",2330,5;
  447. end;
  448. }