FacewormsNest.txt 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847
  1. //===== rAthena Script =======================================
  2. //= Faceworm's Nest
  3. //===== Description: =========================================
  4. //= [Official Conversion]
  5. //= Faceworm Nest Instance
  6. //===== Changelogs: ==========================================
  7. //= 1.0 First version. [exneval]
  8. //= 1.1 Conversion & style change for rAthena. [Capuche]
  9. //============================================================
  10. // Timeless Item Quests
  11. // The Owner Of Old Ring
  12. //============================================================
  13. payon,157,54,5 script An Old Woman#pa0829 8_F_GRANDMOTHER,{
  14. if (!checkweight(1201,1)) {
  15. mes "You have too many kind of belongings. Let's try again after reducing the kind of items.";
  16. close;
  17. }
  18. if (MaxWeight - Weight < 1000) {
  19. mes "Your belongings are too heavy to continue. Let's try again after reducing the weight.";
  20. close;
  21. }
  22. if (BaseLevel < 140) {
  23. mes "[Jeum-sun]";
  24. mes "I am still living in the memory. Make more memories...";
  25. next;
  26. mes "[Jeum-sun]";
  27. mes "Oh are you level 140 yet? I won't talk to any weak adventurers.";
  28. close;
  29. }
  30. switch( checkquest(12326,PLAYTIME) ) {
  31. case -1:
  32. mes "[Jeum-sun]";
  33. mes "When I was a young girl many years ago there was a man who I had crush on. I didn't know to tell him how I felt...";
  34. next;
  35. mes "[Jeum-sun]";
  36. mes "I used to tease his Peco Peco and wanted him to notice that I was interested. This went on and on for a while.";
  37. next;
  38. mes "[Jeum-sun]";
  39. mes "Then we started dating somehow. It's still embarrasing to talk about it.";
  40. next;
  41. mes "[Jeum-sun]";
  42. mes "Anyway, we got married when we became old enough to marry. He used to say sorry for not being able to afford to buy a ring for me.";
  43. next;
  44. mes "[Jeum-sun]";
  45. mes "It has been 40 years since we were married and he still says ^0000ff'Darling~ Do you want to have a ring?'^000000.";
  46. next;
  47. mes "[Jeum-sun]";
  48. mes "I told him.. What good is a ring for an old lady?";
  49. next;
  50. mes "[Jeum-sun]";
  51. mes "I should have stopped him. I still remember his face early.";
  52. next;
  53. select("What happened to him?");
  54. mes "[Jeum-sun]";
  55. mes "He had not came back since he left home to buy a ring.";
  56. next;
  57. mes "^0000ffThe old lady turned her face down with reddened eyes.^000000";
  58. if (countitem(6650)) {// Shabby_Ring
  59. next;
  60. if (select("Stop talking.:Show the ring from the Faceworm's Nest.") == 2) {
  61. mes "[Jeum-sun]";
  62. mes "What about this ring?";
  63. next;
  64. mes "[Jeum-sun]";
  65. mes "Oh... Darling~";
  66. next;
  67. mes "^0000ffThe lady read an inscription inside the ring and started weeping.";
  68. mes "[Jeum-sun, my darling flower]^000000";
  69. next;
  70. mes "^0000ffYou sense a warm energy emanating. Maybe this is the wish of the man who made this ring.^000000";
  71. specialeffect EF_SPHERE;
  72. next;
  73. mes "The warm energy has inspired you with strength.";
  74. delitem 6650,1;// Shabby_Ring
  75. setquest 12326;// The owner of old ring
  76. getexp 70000,55000;
  77. }
  78. }
  79. close;
  80. case 0:
  81. case 1:
  82. mes "The lady keeps crying over and over holding a ring. It seems to be no use talking to her right now.";
  83. close;
  84. case 2:
  85. mes "Sadly, this woman does not seem to remember the past because of abrupt emotional changes. Let's talk carefully and listen to her story.";
  86. erasequest 12326;
  87. close;
  88. }
  89. }
  90. // The Memory Of Old Photo Album
  91. //============================================================
  92. payon,161,54,3 script Exotic Merchant#pa0829 4W_M_03,{
  93. if (!checkweight(1201,1)) {
  94. mes "You have too many types of belongings. Let's try again after reducing the types of items.";
  95. close;
  96. }
  97. if (MaxWeight - Weight < 1000) {
  98. mes "Your belongings are too heavy to continue. Let's try again after reducing the weight.";
  99. close;
  100. }
  101. if (BaseLevel < 140) {
  102. mes "[Sergio]";
  103. mes "Fortune or fame is not important. The most important thing is family.";
  104. next;
  105. mes "[Sergio]";
  106. mes "Are you at least level 140 yet?";
  107. close;
  108. }
  109. switch( checkquest(12327,PLAYTIME) ) {
  110. case -1:
  111. mes "[Sergio]";
  112. mes "I have a blurry memory of when I used to travel with my father's armed-merchant group.";
  113. next;
  114. mes "[Sergio]";
  115. mes "I vaguely remember everyone of the group were scattered after being attacked by a giant snake-like creature.";
  116. next;
  117. mes "[Sergio]";
  118. mes "I had lost my family at that time. I do not clearly remember even their faces.";
  119. next;
  120. mes "[Sergio]";
  121. mes "Now I've made my own armed-merchant group and got my life back. But the memory of my past keeps haunting me.";
  122. next;
  123. mes "[Sergio]";
  124. mes "I just stopped by this town to possibly find a record of my family and the armed-merchant group but so far I've found nothing.";
  125. if (countitem(6652)) {
  126. next;
  127. if (select("Stop talking.:Show him the Old Photo Album") == 2) {
  128. mes "[Sergio]";
  129. mes "Yes! I remembered. This is the one who used to work for my father's armed-merchant group.";
  130. next;
  131. mes "[Sergio]";
  132. mes "Oh my... There are other pictures here too...";
  133. next;
  134. mes "^0000ffA smile of lonely satisfaction spreads over the face of Sergio while looking at a photo album.^000000";
  135. next;
  136. mes "^0000ffA gentle energy surrounds Sergio.^000000";
  137. specialeffect EF_SPHERE;
  138. next;
  139. mes "You are touched by seeing the satisfaction on Sergio's face.";
  140. delitem 6652,1;// Aged_Photo_Album
  141. setquest 12327;// The memory of old photo album
  142. getexp 70000,55000;
  143. }
  144. }
  145. close;
  146. case 0:
  147. case 1:
  148. mes "Sergio keeps looking at the photo album. Let's leave him alone.";
  149. close;
  150. case 2:
  151. mes "You can talk to Sergio again when you pick up a new photo album from the Faceworm's Nest.";
  152. erasequest 12327;
  153. close;
  154. }
  155. }
  156. // Dol-Seoi's Sorrow
  157. //============================================================
  158. payon,161,50,1 script Strong Looking Man#pa829 4_M_ORIENT01,{
  159. if (!checkweight(1201,1)) {
  160. mes "You have too many types of belongings. Let's try again after reducing the types of items.";
  161. close;
  162. }
  163. if (MaxWeight - Weight < 1000) {
  164. mes "Your belongings are too heavy to continue. Let's try again after reducing the weight.";
  165. close;
  166. }
  167. if (BaseLevel < 140) {
  168. mes "[Dol-Seoi]";
  169. mes "What can I do for you?";
  170. next;
  171. mes "[Dol-Seoi]";
  172. mes "Are you at least level 140 yet?";
  173. close;
  174. }
  175. switch( checkquest(12328,PLAYTIME) ) {
  176. case -1:
  177. mes "[Dol-Seoi]";
  178. mes "I used to be a servant to a very wealthy lady. She was always kind to me but she suffered from a severe cough that wouldn't go away unless she took a special pill.";
  179. next;
  180. mes "[Dol-Seoi]";
  181. mes "I used to get the pill from a group of armed-merchants but I heard that they were attacked by a snake and that's when I couldn't get any more pills.";
  182. next;
  183. mes "[Dol-Seoi]";
  184. mes "I searched everywhere but no one could get that pill for me so eventually my lady passed away. If it wasn't for that slithering...";
  185. next;
  186. select("Do you want to revenge?");
  187. mes "[Dol-Seoi]";
  188. mes "Well...";
  189. next;
  190. mes "[Dol-Seoi]";
  191. mes "Yes... But, I have nothing to do with that snake. I am just a worthless servant who once served for my lady.";
  192. next;
  193. mes "^0000ffYou catch a glimpse of complicated rage and sorrow in his eyes.^000000";
  194. if (countitem(6653)) {
  195. next;
  196. if (select("Stop talking.:Show him the Old Pill.") == 2) {
  197. mes "[Dol-Seoi]";
  198. mes "Wait! Where did you get this?";
  199. next;
  200. select("I killed a snake...");
  201. mes "[Dol-Seoi]";
  202. mes "This pill... My lady, if I had this pill...";
  203. next;
  204. mes "^0000ffHe begins to weep like a wounded Muka. She must have meant a lot to him...^000000";
  205. next;
  206. mes "^0000ffI feel gentle energy around Dol-Seoi.^000000";
  207. specialeffect EF_SPHERE;
  208. delitem 6653,1;// Aged_Tablet
  209. setquest 12328;// Dol-Seoi's Sorrow
  210. getexp 70000,55000;
  211. }
  212. }
  213. close;
  214. case 0:
  215. case 1:
  216. mes "Dol-Seoi is standing absent-mindedly clutching the Old Pill. Let's leave him alone now.";
  217. close;
  218. case 2:
  219. mes "You can talk to Dol-Seoi again if you get another Old Pill from the Faceworm's Nest.";
  220. erasequest 12328;
  221. close;
  222. }
  223. }
  224. // Keaton's Bracelet
  225. //============================================================
  226. payon,139,68,4 script A dreary man#pa0829 4_M_NFDEADMAN,{
  227. if (!checkweight(1201,1)) {
  228. mes "You have too many types of belongings. Let's try again after reducing the types of items.";
  229. close;
  230. }
  231. if (MaxWeight - Weight < 1000) {
  232. mes "Your belongings are too heavy to continue. Let's try again after reducing the weight.";
  233. close;
  234. }
  235. if (BaseLevel < 140) {
  236. mes "[Keaton]";
  237. mes "...";
  238. next;
  239. mes "[Keaton]";
  240. mes "Unless you're level 140, I won't have a real conversation with you.";
  241. close;
  242. }
  243. switch( checkquest(12329,PLAYTIME) ) {
  244. case -1:
  245. mes "^0000ffIt looks like a dead soul but you don't feel maliciousness from it. His thoughts have been delivered piece by piece so it isn't easy to understand.^000000";
  246. next;
  247. mes "^999999[Keaton]";
  248. mes "Keaton... Not good at speaking.^000000";
  249. next;
  250. mes "^999999[Keaton]";
  251. mes "Keaton has died long time ago. Keaton is not bad.^000000";
  252. next;
  253. mes "^999999[Keaton]";
  254. mes "Keaton... Need bracelet, that is important. Keaton's friend gave the bracelet.^000000";
  255. next;
  256. mes "^999999[Keaton]";
  257. mes "Keaton, will go after a snake to find a bracelet. The bad snake killed keaton.^000000";
  258. if (countitem(6651)) {
  259. next;
  260. if (select("Stop talking.:Show him the Rusty Bracelet.") == 2) {
  261. mes "^999999[Keaton]";
  262. mes "It is the bracelet of Keaton!!^000000";
  263. specialeffect EF_MAPPILLAR2;
  264. next;
  265. mes "^999999[Keaton]";
  266. mes "Keaton...glad. Defeat bad snake!!^000000";
  267. next;
  268. mes "^0000ffKeaton seems to shine brighter.^000000";
  269. delitem 6651,1;// Rusted_Bracalet
  270. setquest 12329;// Keaton's Bracelet
  271. getexp 70000,55000;
  272. }
  273. }
  274. close;
  275. case 0:
  276. case 1:
  277. mes "Keaton's soul seems to be smiling. Best to give him whatever peace he can have for now.";
  278. close;
  279. case 2:
  280. mes "Keaton is very sad maybe it is because the bracelet was broken. Bring him any other Rusty Bracelets found in the Faceworm's Nest.";
  281. erasequest 12329;
  282. close;
  283. }
  284. }
  285. dali,83,67,5 script Old Sign#1 4_BOARD3,{
  286. .@face_name$ = $120719_str_face$;
  287. .@face_timer = $120719_num_face;
  288. .@face_member = $120903_num_face;
  289. .@time_m = .@face_timer / 60;
  290. .@time_s = .@face_timer - (.@time_m * 60);
  291. if (.@face_name$ == "") {
  292. mes "There's no sign because no one updates the record.";// Custom text
  293. close;
  294. }
  295. if (.@face_timer < 60)
  296. .@time_txt$ = callfunc( "F_InsertPlural", .@time_s, "Second" );
  297. else
  298. .@time_txt$ = callfunc( "F_InsertPlural", .@time_m, "Minute" ) + " " + callfunc( "F_InsertPlural", .@time_s, "Second" );
  299. if (.@face_member > 0)
  300. .@string$ = " with ^ff0044" + .@face_member + " party " + ( .@face_member > 1 ? "members" : "members" ) + "^000000";
  301. mes "-- Faceworm's Nest Records --";
  302. mes "Best time belongs to adventurer ^ff0044" + .@face_name$ + "^000000" + .@string$ + ".";
  303. mes "Current record time is ^0000ff" + .@time_txt$ + "^000000.";
  304. close;
  305. OnInit:
  306. if (!$120719_num_face)
  307. $120719_num_face = 3600;
  308. if (rand(1,100) > 97) {
  309. $120719_num_face = 3600;
  310. $120719_str_face$ = "";
  311. }
  312. end;
  313. }
  314. dali,80,60,4 script Magic Scholar 4_M_SAGE_C,{
  315. if (BaseLevel < 140) {
  316. mes "[Magic Scholar]";
  317. mes "You are not qualified enough to enter here. How about visiting other places until you become level 140.";
  318. close;
  319. }
  320. .@party_id = getcharid(1);
  321. .@md_name$ = "Faceworm's Nest";
  322. if (.@party_id < 1) {
  323. mes "[Magic Scholar]";
  324. mes "You don't have a party? Please come back again after creating a party even if you've come alone.";
  325. close;
  326. }
  327. switch( checkquest(12325,PLAYTIME) ) {
  328. case -1:
  329. if (is_party_leader() == true) {
  330. mes "[Magic Scholar]";
  331. mes "What can I do for you?";
  332. next;
  333. switch( select("Reserve Faceworm's Nest:What are you doing here?:Stop Talking.") ) {
  334. case 1:
  335. switch( instance_create(.@md_name$) ) {
  336. case -3:
  337. dispbottom "Memorial Dungeon, '" + .@md_name$ + "' is already in progress.",0xFFFFFF;
  338. break;
  339. case -4:
  340. case -2:
  341. case -1:
  342. mes "[Magic Scholar]";
  343. mes "Oops, my hands are slip off. It is required to activate the craks again.";
  344. close;
  345. }
  346. mes "[Magic Scholar]";
  347. mes "The spaces are under control.";
  348. mes "Please wait for a minute.";
  349. close;
  350. case 2:
  351. break;
  352. case 3:
  353. mes "[Magic Scholar]";
  354. mes "Okay, I got it. Please come back again if you change your mind.";
  355. close;
  356. }
  357. }
  358. mes "[Magic Scholar]";
  359. mes "I am researching the dimensional cracks in space here.";
  360. next;
  361. mes "[Magic Scholar]";
  362. mes "My research is to stabilize the space here with magic to utilize it for dimensional travel.";
  363. next;
  364. mes "[Magic Scholar]";
  365. mes "This particular crack in space goes to a memory of the past. Many adventurers have been in there but no one will tell me what is in there...";
  366. next;
  367. mes "[Magic Scholar]";
  368. mes "And there's this strange sign here that records names and times on it which I can only assume belongs to those adventurers.";
  369. next;
  370. mes "[Magic Scholar]";
  371. mes "Anyways, I can activate the passage for you if you're a party leader.";
  372. close;
  373. case 0:
  374. case 1:
  375. mes "[Magic Scholar]";
  376. mes "The crack in time is not safe enough to pass back and forth. Please come back again if the after effect timer has passed.";
  377. close;
  378. case 2:
  379. mes "^0000ffThe trace of dimensional space travelling has disappeared. You can now move between dimensions.^000000";
  380. erasequest 12325;
  381. close;
  382. }
  383. }
  384. dali,72,55,4 script Interdimensional Device CLEAR_NPC,{
  385. if (BaseLevel < 140) {
  386. mes "[Interdimensional Device]";
  387. mes "Your power level is not high enough to travel the space. Please come back again when you reach at least level 140.";
  388. close;
  389. }
  390. .@party_id = getcharid(1);
  391. .@md_name$ = "Faceworm's Nest";
  392. if (.@party_id < 1) {
  393. mes "[Interdimensional Device]";
  394. mes "No party? Please come back again after creating a party even if you've come alone.";
  395. close;
  396. }
  397. switch( checkquest(12325,PLAYTIME) ) {
  398. case -1:
  399. switch( instance_enter(.@md_name$) ) {
  400. case IE_OTHER:
  401. mes "[Interdimensional Device]";
  402. mes "An unknown error has occurred.";
  403. close;
  404. case IE_NOINSTANCE:
  405. mes "[Interdimensional Device]";
  406. mes "The passage for space travel is not activated yet.";
  407. close;
  408. case IE_NOMEMBER:// Custom text
  409. mes "[Interdimensional Device]";
  410. mes "You are not allowed to access the device.";
  411. close;
  412. case IE_OK:
  413. mapannounce "dali", getpartyname(.@party_id) + " party's party member " + strcharinfo(0) + " enters " + .@md_name$ + ".",bc_map,"0x00ff99";
  414. setquest 12325;// Faceworm's Nest after-effects
  415. //warp "1@face",112,374;
  416. end;
  417. }
  418. case 0:
  419. case 1:
  420. mes "[Interdimensional Device]";
  421. mes "Traces of recent space travel have been detected. Access is denied.";
  422. close;
  423. case 2:
  424. mes "^0000ffThe trace of dimensional space travelling has disappeared. You can now move between dimensions.^000000";
  425. erasequest 12325;
  426. close;
  427. }
  428. }
  429. // Instance Scripts :: in_face
  430. // 1st Stage
  431. //============================================================
  432. 1@face,110,348,6 script Chaos#0 4_M_CHAOS,{
  433. cutin "h_chaos01",2;
  434. if (is_party_leader() == false) {
  435. mes "[Chaos]";
  436. mes "I do not know what this is about, but I'm talking to your leader so please wait for a while ok?";
  437. close2;
  438. cutin "",255;
  439. end;
  440. }
  441. .@account_id = getcharid(3);
  442. .@player_name$ = strcharinfo(0);
  443. mes "[Chaos]";
  444. mes "Really? I didn't know that a bounty hunter was coming here.";
  445. npctalk "Chaos: Really? I didn't know that a bounty hunter was coming here.";
  446. next;
  447. select("Wait! It's a misunderstanding.");
  448. cutin "",255;
  449. mes "[" + .@player_name$ + "]";
  450. mes "No! I think you're mistaken! We are not bounty hunters...";
  451. unittalk .@account_id, .@player_name$ + ": No! I think you're mistaken! We are not bounty hunters...";
  452. next;
  453. cutin "h_chaos01",2;
  454. mes "[Chaos]";
  455. mes "No, No need to make an excuse... The faceworm belongs to nobody.";
  456. npctalk "Chaos: No, No need to make an excuse... The faceworm belongs to nobody.";
  457. next;
  458. select("Faceworm?");
  459. cutin "",255;
  460. mes "[" + .@player_name$ + "]";
  461. mes "Faceworm? I've never heard about it.";
  462. unittalk .@account_id, .@player_name$ + ": Faceworm? I've never heard about it.";
  463. close2;
  464. donpcevent instance_npcname("Chaos#01") + "::OnStart";
  465. end;
  466. }
  467. 1@face,110,348,6 script Chaos#01 4_M_CHAOS,{
  468. end;
  469. OnStart:
  470. .@iris_name$ = instance_npcname("Iris#0");
  471. donpcevent instance_npcname("#globaltimer22") + "::OnT_s";
  472. hideoffnpc instance_npcname("Chaos#01");
  473. hideonnpc instance_npcname("Chaos#0");
  474. sleep 5000;
  475. npctalk "Chaos: Hahaha, you really never heard about it? Faceworm is the name of a monster which has recently showed up in this area.";
  476. sleep 5000;
  477. npctalk "Chaos: I don't care. I would not care as long as you don't disturb me.";
  478. sleep 5000;
  479. npctalk "Iris: Ah~ A gentle breeze~", .@iris_name$;
  480. sleep 3000;
  481. npctalk "Iris: Hehe, the weather has been great. I'm so happy~", .@iris_name$;
  482. sleep 3000;
  483. npctalk "Iris: How about you Chaos?", .@iris_name$;
  484. sleep 3000;
  485. npctalk "Chaos: It will only be for the time being.";
  486. sleep 3000;
  487. npctalk "Chaos: A black wind has started blowing.";
  488. sleep 4000;
  489. npctalk "Chaos: Iris! I feel like faceworms are around here. Maybe, the queen's nest is in the deepest side of this forest!";
  490. sleep 5000;
  491. npctalk "Iris: Ahah~ Let's take care of it as always like usual ok?", .@iris_name$;
  492. sleep 3000;
  493. npctalk "Chaos: Yes, let's take care of it and go back. Hey, adventurers. Watch out! I'm sure lots of faceworms will be here soon.";
  494. sleep 6000;
  495. hideonnpc instance_npcname("Chaos#01");
  496. hideonnpc instance_npcname("Iris#0");
  497. donpcevent instance_npcname("#fwormcontrol1") + "::OnStart";
  498. mapannounce 'map_name$, "Faceworm time attack has started. Faster kill times gives a higher percentage of rewards.",bc_map,"0xffffff";
  499. donpcevent instance_npcname("#fwormprize1") + "::OnStart";
  500. end;
  501. OnInstanceInit:
  502. hideonnpc instance_npcname("Chaos#01");
  503. end;
  504. }
  505. 1@face,116,346,3 script Iris#0 4_F_IRIS,{
  506. cutin "h_iris02",2;
  507. mes "[Iris]";
  508. mes "Sorry~ I enjoy a gentle breeze so talk to me next time.";
  509. close2;
  510. cutin "",255;
  511. end;
  512. }
  513. 1@face,1,5,3 script #fwormcontrol1 CLEAR_NPC,{
  514. end;
  515. OnStart:
  516. .@mob_c = getmapusers('map_name$) + 1;
  517. .@event$ = instance_npcname("#fwormcontrol1") + "::OnMyMobDead";
  518. killmonster 'map_name$, .@event$;
  519. areamonster 'map_name$,65,330,179,336,"Faceworm",2528, (.@mob_c*2), .@event$;
  520. areamonster 'map_name$,62,62,68,332,"Faceworm",2528, (.@mob_c*7), .@event$;
  521. areamonster 'map_name$,66,59,172,65,"Faceworm",2528, (.@mob_c*2), .@event$;
  522. end;
  523. OnMyMobDead:
  524. .@mob_dead_num = mobcount( 'map_name$, instance_npcname("#fwormcontrol1") +"::OnMyMobDead" );
  525. mapannounce 'map_name$, "There " + ( .@mob_dead_num > 1 ? "are" : "is" ) + " " + callfunc( "F_InsertPlural", .@mob_dead_num, "faceworm" ) + " still alive.",bc_map,"0xffffff";
  526. if (.@mob_dead_num < 3)
  527. initnpctimer;
  528. end;
  529. OnTimer1000:
  530. killmonster 'map_name$, instance_npcname("#fwormcontrol1") + "::OnMyMobDead";
  531. donpcevent instance_npcname("#fwormboss1") + "::OnStart";
  532. mapannounce 'map_name$, "A giant faceworm has suddenly appeared.",bc_map,"0xffffff";
  533. stopnpctimer;
  534. end;
  535. OnInstanceInit:
  536. hideonnpc instance_npcname("#fwormcontrol1");
  537. end;
  538. }
  539. 1@face,1,4,3 script #fwormboss1 CLEAR_NPC,{
  540. end;
  541. OnStart:
  542. areamonster 'map_name$,140,69,150,79,"Dark Faceworm",2530,1,instance_npcname("#fwormboss1") + "::OnMyMobDead";
  543. 'BOSS[1] = $@mobid[0];
  544. .@dfacehp = ( 13 - getmapusers('map_name$) ) * 200000;
  545. .@MOB_HP = 5200000 - .@dfacehp;
  546. if (.@MOB_HP < 1500000)
  547. .@MOB_HP = 1500000;
  548. setunitdata 'BOSS[1], UMOB_HP, .@MOB_HP;
  549. initnpctimer;
  550. end;
  551. OnTimer1111:
  552. .@mapcount = getmapusers('map_name$);
  553. if (.@mapcount < 1)
  554. setunitdata 'BOSS[1], UMOB_HP, 5000000;// Note : weird behaviour.
  555. else if (rand(1,(22-.@mapcount)) < 17) {
  556. getunitdata 'BOSS[1], .@arr;
  557. if (.@arr[UMOB_HP] > 3000000 && .@arr[UMOB_HP] < 4900000)
  558. donpcevent instance_npcname("#fwormboss12") + "::OnStart1";
  559. else if (.@arr[UMOB_HP] > 10000 && .@arr[UMOB_HP] < 2500001)
  560. donpcevent instance_npcname("#fwormboss12") + "::OnStart2";
  561. }
  562. end;
  563. OnTimer14000:
  564. stopnpctimer;
  565. getunitdata 'BOSS[1], .@arr;
  566. if (.@arr[UMOB_HP] > 10000)
  567. initnpctimer;
  568. end;
  569. OnMyMobDead:
  570. if (mobcount( 'map_name$,instance_npcname("#fwormboss1") +"::OnMyMobDead" ) < 1) {
  571. hideoffnpc instance_npcname("#fwormprize1");
  572. enablenpc instance_npcname("#fwormenter1");
  573. enablenpc instance_npcname("#fwormexit1");
  574. hideoffnpc instance_npcname("Chaos#1");
  575. hideoffnpc instance_npcname("Iris#1");
  576. donpcevent instance_npcname("#fwormboss12") + "::OnEnd";
  577. mapannounce 'map_name$, "A hole appears after killing the dark faceworm.",bc_map,"0xffffff";
  578. stopnpctimer;
  579. }
  580. end;
  581. OnInstanceInit:
  582. hideonnpc instance_npcname("#fwormboss1");
  583. end;
  584. }
  585. 1@face,1,4,3 script #fwormboss12 CLEAR_NPC,{
  586. end;
  587. OnStart1:
  588. callsub S_Spawn,3;
  589. OnStart2:
  590. callsub S_Spawn,6;
  591. S_Spawn:
  592. initnpctimer;
  593. .@arg = getarg(0);
  594. .@event$ = instance_npcname("#fwormboss12") +"::OnMyMobDead";
  595. if (mobcount( 'map_name$,.@event$ ) > .@arg)
  596. killmonster 'map_name$, .@event$;
  597. getunitdata 'BOSS[1], .@arr;
  598. .@mobx = .@arr[UMOB_X];
  599. .@moby = .@arr[UMOB_Y];
  600. monster 'map_name$,(.@mobx-4),.@moby,"Faceworm Egg",2540,1,.@event$;
  601. monster 'map_name$,(.@mobx+4),.@moby,"Faceworm Egg",2540,1,.@event$;
  602. if (.@arg == 6) {
  603. monster 'map_name$,.@mobx,(.@moby+4),"Faceworm Egg",2540,1,.@event$;
  604. monster 'map_name$,.@mobx,(.@moby-4),"Faceworm Egg",2540,1,.@event$;
  605. }
  606. end;
  607. OnTimer12000:
  608. .@mob_dead_num = mobcount( 'map_name$,instance_npcname("#fwormboss12") +"::OnMyMobDead" );
  609. if (.@mob_dead_num > 3)
  610. callsub S_Heal,4,150000;
  611. else if (.@mob_dead_num > 2)
  612. callsub S_Heal,3,55000;
  613. else if (.@mob_dead_num > 1)
  614. callsub S_Heal,2,20000;
  615. else if (.@mob_dead_num > 0)
  616. callsub S_Heal,1,7200;
  617. donpcevent instance_npcname("#fwormboss12") + "::OnEnd";
  618. end;
  619. S_Heal:
  620. .@mapcount = getmapusers('map_name$);
  621. getunitdata 'BOSS[1], .@arr;
  622. .@r_hpp = (.@mapcount + 1) * getarg(1);
  623. .@dfacehp = .@arr[UMOB_HP] + .@r_hpp;
  624. .@r_hpp2 = 5200000 - ( (13-.@mapcount) * 200000 );
  625. if (.@dfacehp > .@r_hpp2)
  626. .@dfacehp = .@r_hpp2;
  627. setunitdata 'BOSS[1], UMOB_HP, .@dfacehp;
  628. mapannounce 'map_name$, "Dark faceworm absorbs the energy of " + getarg(0) + " unbroken eggs recovering " + .@r_hpp + " energy.",bc_map,"0xff00ee";
  629. return;
  630. OnEnd:
  631. killmonster 'map_name$, instance_npcname("#fwormboss12") + "::OnMyMobDead";
  632. stopnpctimer;
  633. end;
  634. OnMyMobDead:
  635. end;
  636. OnInstanceInit:
  637. hideonnpc instance_npcname("#fwormboss12");
  638. end;
  639. }
  640. 1@face,149,92,0 script #fwormenter1 WARPNPC,2,2,{
  641. end;
  642. OnTouch:
  643. warp 'map_name$,127,95;
  644. end;
  645. OnInstanceInit:
  646. disablenpc instance_npcname("#fwormenter1");
  647. end;
  648. }
  649. 1@face,129,86,0 script #fwormexit1 WARPNPC,2,2,{
  650. end;
  651. OnTouch:
  652. warp 'map_name$,156,76;
  653. end;
  654. OnInstanceInit:
  655. disablenpc instance_npcname("#fwormexit1");
  656. end;
  657. }
  658. // 2nd Stage
  659. //============================================================
  660. 1@face,120,97,6 script Chaos#1 4_M_CHAOS,{
  661. cutin "h_chaos01",2;
  662. if (is_party_leader() == false) {
  663. mes "[Chaos]";
  664. mes "I do not know what this is about, but I'm talking to your leader so please wait for a while ok?";
  665. close2;
  666. cutin "",255;
  667. end;
  668. }
  669. mes "[Chaos]";
  670. mes "Wow, you're fast enough to follow me.";
  671. npctalk "Chaos: Wow, you're fast enough to follow me.";
  672. next;
  673. select("The big one, just right before...");
  674. cutin "",255;
  675. mes "[" + strcharinfo(0) + "]";
  676. mes "The big one just right before we saw is a boss here?";
  677. unittalk getcharid(3), strcharinfo(0) + ": The big one just right before we saw is a boss here?";
  678. next;
  679. cutin "h_chaos01",2;
  680. mes "[Chaos]";
  681. mes "No~~ It can't be the faceworm queen.";
  682. close2;
  683. donpcevent instance_npcname("Chaos#11") + "::OnStart";
  684. cutin "",255;
  685. end;
  686. OnInstanceInit:
  687. hideonnpc instance_npcname("Chaos#1");
  688. end;
  689. }
  690. 1@face,120,97,6 script Chaos#11 4_M_CHAOS,{
  691. end;
  692. OnStart:
  693. .@iris_name$ = instance_npcname("Iris#1");
  694. hideoffnpc instance_npcname("Chaos#11");
  695. hideonnpc instance_npcname("Chaos#1");
  696. npctalk "Chaos: No~~ It can't be the faceworm queen.";
  697. sleep 4000;
  698. npctalk "Chaos: The one we just saw before is a mutant faceworm.";
  699. sleep 5000;
  700. npctalk "Chaos: Wait! The dead faceworm's castoff skin might be useful.";
  701. sleep 3000;
  702. npctalk "Iris: But, if the fight takes too long. The scales might be damaged. They'll be worthless!", .@iris_name$;
  703. sleep 5000;
  704. npctalk "Iris: I heard that skillful hunters are good at taking the scales off super fast.", .@iris_name$;
  705. sleep 6000;
  706. npctalk "Iris: Chaos, are you any good at it?", .@iris_name$;
  707. sleep 3000;
  708. npctalk "Chaos: No... Not at all! I use Magnum Break only, so the scales will probably get burned...";
  709. sleep 3000;
  710. npctalk "Iris: Useless Chaos.", .@iris_name$;
  711. sleep 3000;
  712. npctalk "Chaos: Besides, the one we are looking for is not here. I will go back first, so take care of the rest ok?";
  713. sleep 5000;
  714. hideonnpc instance_npcname("Chaos#11");
  715. npctalk "Iris: Chaos! Are you leaving me alone?", .@iris_name$;
  716. sleep 3000;
  717. hideonnpc .@iris_name$;
  718. donpcevent instance_npcname("#fwormcontrol2") + "::OnStart";
  719. donpcevent instance_npcname("#fwormprize2") + "::OnStart";
  720. end;
  721. OnInstanceInit:
  722. hideonnpc instance_npcname("Chaos#11");
  723. end;
  724. }
  725. 1@face,129,97,3 script Iris#1 4_F_IRIS,{
  726. cutin "h_iris02",2;
  727. mes "[Iris]";
  728. mes "Chaos is a good friend even though he's only able to use Magnum Break...";
  729. close2;
  730. cutin "",255;
  731. end;
  732. OnInstanceInit:
  733. hideonnpc instance_npcname("Iris#1");
  734. end;
  735. }
  736. 1@face,2,5,3 script #fwormcontrol2 CLEAR_NPC,{
  737. end;
  738. OnStart:
  739. .@mob_c = getmapusers('map_name$) + 1;
  740. .@event$ = instance_npcname("#fwormcontrol2") + "::OnMyMobDead";
  741. areamonster 'map_name$,107,102,113,154,"Faceworm",2528, (.@mob_c*2), .@event$;
  742. areamonster 'map_name$,115,175,121,209,"Faceworm",2528, (.@mob_c*2), .@event$;
  743. areamonster 'map_name$,118,240,204,292,"Faceworm",2528, (.@mob_c*7), .@event$;
  744. end;
  745. OnMyMobDead:
  746. .@mob_dead_num = mobcount( 'map_name$,instance_npcname("#fwormcontrol2") +"::OnMyMobDead" );
  747. mapannounce 'map_name$, "There " + ( .@mob_dead_num > 1 ? "are" : "is" ) + " " + callfunc( "F_InsertPlural", .@mob_dead_num, "faceworm" ) + " still alive.",bc_map,"0xffffff";
  748. if (.@mob_dead_num < 3)
  749. initnpctimer;
  750. end;
  751. OnTimer1000:
  752. killmonster 'map_name$, instance_npcname("#fwormcontrol2") + "::OnMyMobDead";
  753. donpcevent instance_npcname("#fwormboss2") + "::OnStart";
  754. mapannounce 'map_name$, "A giant faceworm has suddenly appeared.",bc_map,"0xffffff";
  755. stopnpctimer;
  756. end;
  757. OnInstanceInit:
  758. hideonnpc instance_npcname("#fwormcontrol2");
  759. end;
  760. }
  761. 1@face,2,5,3 script #fwormboss2 CLEAR_NPC,{
  762. end;
  763. OnStart:
  764. areamonster 'map_name$,156,267,166,277,"Dark Faceworm",2530,1,instance_npcname("#fwormboss2") + "::OnMyMobDead";
  765. 'BOSS[2] = $@mobid[0];
  766. .@dfacehp = ( 13 - getmapusers('map_name$) ) * 200000;
  767. .@MOB_HP = 5200000 - .@dfacehp;
  768. if (.@MOB_HP < 1500000)
  769. .@MOB_HP = 1500000;
  770. setunitdata 'BOSS[2], UMOB_HP, .@MOB_HP;
  771. initnpctimer;
  772. end;
  773. OnTimer1111:
  774. .@mapcount = getmapusers('map_name$);
  775. if (.@mapcount < 1)
  776. setunitdata 'BOSS[2], UMOB_HP, 5000000;
  777. else if (rand(1,(22-.@mapcount)) < 17) {
  778. getunitdata 'BOSS[2], .@arr;
  779. if (.@arr[UMOB_HP] > 2000000 && .@arr[UMOB_HP] < 5000000)
  780. donpcevent instance_npcname("#fwormboss22") + "::OnStart1";
  781. else if (.@arr[UMOB_HP] > 10000 && .@arr[UMOB_HP] < 2000000)
  782. donpcevent instance_npcname("#fwormboss22") + "::OnStart2";
  783. }
  784. end;
  785. OnTimer12000:
  786. stopnpctimer;
  787. getunitdata 'BOSS[2], .@arr;
  788. if (.@arr[UMOB_HP] > 10000)
  789. initnpctimer;
  790. end;
  791. OnMyMobDead:
  792. if (mobcount( 'map_name$,instance_npcname("#fwormboss2") +"::OnMyMobDead" ) < 1) {
  793. enablenpc instance_npcname("#fwormenter2");
  794. enablenpc instance_npcname("#fwormexit2");
  795. hideoffnpc instance_npcname("#fwormprize2");
  796. hideoffnpc instance_npcname("Chaos#2");
  797. hideoffnpc instance_npcname("Iris#2");
  798. donpcevent instance_npcname("#fwormboss22") + "::OnEnd";
  799. mapannounce 'map_name$, "You hear something loud in the south. It must be the nest of the one we just got rid of.",bc_map,"0xffffff";
  800. stopnpctimer;
  801. }
  802. end;
  803. OnInstanceInit:
  804. hideonnpc instance_npcname("#fwormboss2");
  805. end;
  806. }
  807. 1@face,1,4,3 script #fwormboss22 CLEAR_NPC,{
  808. end;
  809. OnEnd:
  810. killmonster 'map_name$, instance_npcname("#fwormboss22") +"::OnMyMobDead";
  811. stopnpctimer;
  812. end;
  813. OnStart1:
  814. initnpctimer;
  815. if (mobcount( 'map_name$,instance_npcname("#fwormboss22") +"::OnMyMobDead" ) > 6)
  816. killmonster 'map_name$, instance_npcname("#fwormboss22") + "::OnMyMobDead";
  817. getunitdata 'BOSS[2], .@arr;
  818. .@mobx = .@arr[UMOB_X];
  819. .@moby = .@arr[UMOB_Y];
  820. monster 'map_name$,.@mobx-4,.@moby,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  821. monster 'map_name$,.@mobx+4,.@moby,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  822. end;
  823. OnStart2:
  824. initnpctimer;
  825. if (mobcount( 'map_name$,instance_npcname("#fwormboss22") +"::OnMyMobDead" ) > 12)
  826. killmonster 'map_name$, instance_npcname("#fwormboss22") + "::OnMyMobDead";
  827. getunitdata 'BOSS[2], .@arr;
  828. .@mobx = .@arr[UMOB_X];
  829. .@moby = .@arr[UMOB_Y];
  830. monster 'map_name$,.@mobx-4,.@moby,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  831. monster 'map_name$,.@mobx,.@moby+4,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  832. monster 'map_name$,.@mobx+4,.@moby,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  833. monster 'map_name$,.@mobx,.@moby-4,"#waterball",2539,1,instance_npcname("#fwormboss22") + "::OnMyMobDead";
  834. end;
  835. OnTimer20000:
  836. donpcevent instance_npcname("#fwormboss22") + "::OnEnd";
  837. end;
  838. OnMyMobDead:
  839. end;
  840. OnInstanceInit:
  841. hideonnpc instance_npcname("#fwormboss22");
  842. end;
  843. }
  844. 1@face,139,100,0 script #fwormenter2 WARPNPC,2,2,{
  845. end;
  846. OnTouch:
  847. warp 'map_name$,156,117;
  848. end;
  849. OnInstanceInit:
  850. disablenpc instance_npcname("#fwormenter2");
  851. end;
  852. }
  853. 1@face,151,106,0 script #fwormexit2 WARPNPC,2,2,{
  854. end;
  855. OnTouch:
  856. warp 'map_name$,127,95;
  857. end;
  858. OnInstanceInit:
  859. disablenpc instance_npcname("#fwormexit2");
  860. end;
  861. }
  862. // 3rd Stage
  863. //============================================================
  864. 1@face,153,113,7 script Chaos#2 4_M_CHAOS,{
  865. cutin "h_chaos01",2;
  866. if (is_party_leader() == false) {
  867. mes "[Chaos]";
  868. mes "I do not know what this is about, but I'm talking to your leader so please wait for a while ok?";
  869. close2;
  870. cutin "",255;
  871. end;
  872. }
  873. mes "[Chaos]";
  874. mes "You're pretty good! But you have to be careful from now on. This narrow canyon seems to be full of dangers.";
  875. npctalk "Chaos: You're pretty good! But you have to be careful from now on. This narrow canyon seems to be full of dangers.";
  876. close2;
  877. donpcevent instance_npcname("Chaos#22") + "::OnStart";
  878. cutin "",255;
  879. end;
  880. OnInstanceInit:
  881. hideonnpc instance_npcname("Chaos#2");
  882. end;
  883. }
  884. 1@face,153,113,7 script Chaos#22 4_M_CHAOS,{
  885. end;
  886. OnStart:
  887. hideoffnpc instance_npcname("Chaos#22");
  888. hideonnpc instance_npcname("Chaos#2");
  889. sleep 4000;
  890. npctalk "Iris: I do not feel good here. Let's get outta here right now Chaos!", instance_npcname("Iris#2");
  891. sleep 4000;
  892. npctalk "Chaos: Ok, let's get out of here. Carefully follow me!";
  893. sleep 4000;
  894. hideonnpc instance_npcname("Chaos#22");
  895. hideonnpc instance_npcname("Iris#2");
  896. donpcevent instance_npcname("#fwormcontrol3") + "::OnStart";
  897. donpcevent instance_npcname("#fwormprize3") + "::OnStart";
  898. end;
  899. OnInstanceInit:
  900. hideonnpc instance_npcname("Chaos#22");
  901. end;
  902. }
  903. 1@face,160,113,1 script Iris#2 4_F_IRIS,{
  904. cutin "h_iris01",2;
  905. mes "[Iris]";
  906. mes "This canyon. I am not feeling good here. I don't want to stay anymore.";
  907. close2;
  908. cutin "",255;
  909. end;
  910. OnInstanceInit:
  911. hideonnpc instance_npcname("Iris#2");
  912. end;
  913. }
  914. 1@face,2,5,3 script #fwormcontrol3 CLEAR_NPC,{
  915. end;
  916. OnStart:
  917. .@mon_num = ( getmapusers('map_name$) + 1 ) * 11;
  918. areamonster 'map_name$,238,274,308,344,"Faceworm",2528,.@mon_num,instance_npcname("#fwormcontrol3") + "::OnMyMobDead";
  919. end;
  920. OnMyMobDead:
  921. .@mob_dead_num = mobcount('map_name$,instance_npcname("#fwormcontrol3") + "::OnMyMobDead");
  922. mapannounce 'map_name$, "There " + ( .@mob_dead_num > 1 ? "are" : "is" ) + " " + callfunc( "F_InsertPlural", .@mob_dead_num, "faceworm" ) + " still alive.",bc_map,"0xffffff";
  923. if (.@mob_dead_num < 3)
  924. initnpctimer;
  925. end;
  926. OnTimer1000:
  927. killmonster 'map_name$, instance_npcname("#fwormcontrol3") + "::OnMyMobDead";
  928. donpcevent instance_npcname("#fwormboss3") + "::OnStart";
  929. mapannounce 'map_name$, "A giant faceworm has suddenly appeared.",bc_map,"0xffffff";
  930. stopnpctimer;
  931. end;
  932. OnInstanceInit:
  933. hideonnpc instance_npcname("#fwormcontrol3");
  934. end;
  935. }
  936. 1@face,2,5,3 script #fwormboss3 CLEAR_NPC,{
  937. end;
  938. OnStart:
  939. areamonster 'map_name$,273,303,283,313,"Dark Faceworm",2530,1,instance_npcname("#fwormboss3") + "::OnMyMobDead";
  940. 'BOSS[3] = $@mobid[0];
  941. .@MOB_HP = 5200000 - ( (13 - getmapusers('map_name$)) * 200000 );
  942. if (.@MOB_HP < 1500000)
  943. .@MOB_HP = 1500000;
  944. setunitdata 'BOSS[3], UMOB_HP, .@MOB_HP;
  945. initnpctimer;
  946. end;
  947. OnTimer1111:
  948. .@mapcount = getmapusers('map_name$);
  949. if (.@mapcount < 1)
  950. setunitdata 'BOSS[3], UMOB_HP, 5000000;
  951. else if (rand(1,(22-.@mapcount)) < 17) {
  952. getunitdata 'BOSS[3], .@arr;
  953. if (.@arr[UMOB_HP] > 4200000 && .@arr[UMOB_HP] < 5000000 || .@arr[UMOB_HP] > 3200000 && .@arr[UMOB_HP] < 4000000 || .@arr[UMOB_HP] > 2200000 && .@arr[UMOB_HP] < 3000000)
  954. donpcevent instance_npcname("#fwormboss32") + "::OnStart1";
  955. else if (.@arr[UMOB_HP] > 1200000 && .@arr[UMOB_HP] < 2000000 || .@arr[UMOB_HP] > 10000 && .@arr[UMOB_HP] < 1000000)
  956. donpcevent instance_npcname("#fwormboss32") + "::OnStart2";
  957. }
  958. end;
  959. OnTimer7000:
  960. stopnpctimer;
  961. getunitdata 'BOSS[3], .@arr;
  962. if (.@arr[UMOB_HP] > 10000)
  963. initnpctimer;
  964. end;
  965. OnMyMobDead:
  966. if (mobcount( 'map_name$,instance_npcname("#fwormboss3") +"::OnMyMobDead" ) < 1) {
  967. hideoffnpc instance_npcname("#fwormprize3");
  968. enablenpc instance_npcname("#fwormenter3");
  969. enablenpc instance_npcname("#fwormexit3");
  970. enablenpc instance_npcname("#chaoson");
  971. donpcevent instance_npcname("#fwormboss32") + "::OnEnd";
  972. mapannounce 'map_name$, "You hear the pile of stones collapsing. This might be a gateway to go to other spaces.",bc_map,"0xffffff";
  973. stopnpctimer;
  974. }
  975. end;
  976. OnHeal01:
  977. .@mapcount = getmapusers('map_name$);
  978. getunitdata 'BOSS[3], .@arr;
  979. .@r_hpp = ((.@mapcount+1) * 5000) * rand(1,10);
  980. .@dfacehp = .@arr[UMOB_HP] + .@r_hpp;
  981. .@r_hpp2 = 5200000 - ((13-.@mapcount) * 200000);
  982. if (.@dfacehp > .@r_hpp2)
  983. .@dfacehp = .@r_hpp2;
  984. setunitdata 'BOSS[3], UMOB_HP, .@dfacehp;
  985. mapannounce 'map_name$, "Dark faceworm has dropped a sack of fatal poison and recovers " + .@r_hpp + " amount of energy.",bc_map,"0x66ff00";
  986. end;
  987. OnInstanceInit:
  988. hideonnpc instance_npcname("#fwormboss3");
  989. end;
  990. }
  991. 1@face,1,4,3 script #fwormboss32 CLEAR_NPC,{
  992. end;
  993. OnEnd:
  994. killmonster 'map_name$, instance_npcname("#fwormboss32") + "::OnMyMobDead";
  995. end;
  996. OnStart1:
  997. callsub S_Spawn, 3;
  998. OnStart2:
  999. callsub S_Spawn, 5;
  1000. S_Spawn:
  1001. getunitdata 'BOSS[3], .@arr;
  1002. .@num = getarg(0);
  1003. .@coord_x = .@arr[UMOB_X] + .@num;
  1004. .@coord_y = .@arr[UMOB_Y] - .@num;
  1005. .@vmobx = .@arr[UMOB_X] - .@num;
  1006. do {
  1007. .@vmoby = .@arr[UMOB_Y] + .@num;
  1008. do {
  1009. monster 'map_name$,.@vmobx,.@vmoby,"Venom Bug",2531,1,instance_npcname("#fwormboss32") + "::OnMyMobDead";
  1010. .@vmoby -= 2;
  1011. }
  1012. while( .@vmoby >= .@coord_y );
  1013. .@vmobx += 2;
  1014. }
  1015. while( .@vmobx <= .@coord_x );
  1016. donpcevent instance_npcname("#fwormboss3") + "::OnHeal01";
  1017. end;
  1018. OnMyMobDead:
  1019. end;
  1020. OnInstanceInit:
  1021. hideonnpc instance_npcname("#fwormboss32");
  1022. end;
  1023. }
  1024. 1@face,248,185,0 script #fwormenter3 WARPNPC,2,2,{
  1025. end;
  1026. OnTouch:
  1027. warp 'map_name$,261,170;
  1028. end;
  1029. OnInstanceInit:
  1030. disablenpc instance_npcname("#fwormenter3");
  1031. end;
  1032. }
  1033. 1@face,254,175,0 script #fwormexit3 WARPNPC,2,2,{
  1034. end;
  1035. OnTouch:
  1036. warp 'map_name$,244,192;
  1037. end;
  1038. OnInstanceInit:
  1039. disablenpc instance_npcname("#fwormexit3");
  1040. end;
  1041. }
  1042. // 4th Stage
  1043. //============================================================
  1044. 1@face,261,169,0 script #chaoson HIDDEN_WARP_NPC,7,7,{
  1045. end;
  1046. OnTouch_:
  1047. disablenpc instance_npcname("#chaoson");
  1048. donpcevent instance_npcname("#announcer1") + "::OnStart";
  1049. end;
  1050. OnInstanceInit:
  1051. disablenpc instance_npcname("#chaoson");
  1052. end;
  1053. }
  1054. 1@face,1,10,7 script #announcer1 CLEAR_NPC,{
  1055. end;
  1056. OnStart:
  1057. mapannounce 'map_name$, "The voice of Chaos: Hey adventurers, you should be careful! Avoid the poison!",bc_map,"0xffff00";
  1058. sleep 6000;
  1059. mapannounce 'map_name$, "The voice of Chaos: We are looking for another nest so let me know if you find anything.",bc_map,"0xffff00";
  1060. donpcevent instance_npcname("#fwormcontrol4") + "::OnStart";
  1061. donpcevent instance_npcname("#fwormcontrol42") + "::OnStart";
  1062. donpcevent instance_npcname("#fwormprize4") + "::OnStart";
  1063. end;
  1064. OnInstanceInit:
  1065. hideonnpc instance_npcname("#announcer1");
  1066. end;
  1067. }
  1068. 1@face,2,5,3 script #fwormcontrol4 CLEAR_NPC,{
  1069. end;
  1070. OnStart:
  1071. .@mob_c = getmapusers('map_name$) + 1;
  1072. .@mon_num = .@mob_c * 6;
  1073. areamonster 'map_name$,250,94,330,174,"Faceworm",2528,.@mon_num,instance_npcname("#fwormcontrol4") + "::OnMyMobDead";
  1074. .@mon_num = .@mob_c * 5;
  1075. areamonster 'map_name$,223,51,303,111,"Faceworm",2528,.@mon_num,instance_npcname("#fwormcontrol4") + "::OnMyMobDead";
  1076. end;
  1077. OnMyMobDead:
  1078. .@mob_dead_num = mobcount('map_name$,instance_npcname("#fwormcontrol4") + "::OnMyMobDead");
  1079. mapannounce 'map_name$, "There " + ( .@mob_dead_num > 1 ? "are" : "is" ) + " " + callfunc( "F_InsertPlural", .@mob_dead_num, "faceworm" ) + " still alive.",bc_map,"0xffffff";
  1080. if (.@mob_dead_num < 3)
  1081. initnpctimer;
  1082. end;
  1083. OnTimer1000:
  1084. killmonster 'map_name$, instance_npcname("#fwormcontrol4") + "::OnMyMobDead";
  1085. donpcevent instance_npcname("#fwormboss4") + "::OnStart";
  1086. mapannounce 'map_name$, "You hear something screaming to the west.",bc_map,"0xffffff";
  1087. stopnpctimer;
  1088. end;
  1089. OnInstanceInit:
  1090. hideonnpc instance_npcname("#fwormcontrol4");
  1091. end;
  1092. }
  1093. 1@face,2,6,3 script #fwormcontrol42 CLEAR_NPC,{
  1094. end;
  1095. OnEnd:
  1096. killmonster 'map_name$, instance_npcname("#fwormcontrol42") + "::OnMyMobDead";
  1097. end;
  1098. OnStart:
  1099. .@mon_num = ( getmapusers('map_name$) + 8 ) * 5;
  1100. areamonster 'map_name$,237,71,337,171,"#toxicarea",2536,.@mon_num,instance_npcname("#fwormcontrol42") + "::OnMyMobDead";
  1101. end;
  1102. OnMyMobDead:
  1103. end;
  1104. OnInstanceInit:
  1105. hideonnpc instance_npcname("#fwormcontrol42");
  1106. end;
  1107. }
  1108. 1@face,2,5,3 script #fwormboss4 CLEAR_NPC,{
  1109. end;
  1110. OnStart:
  1111. areamonster 'map_name$,209,103,219,113,"Dark Faceworm",2530,1,instance_npcname("#fwormboss4") + "::OnMyMobDead";
  1112. 'BOSS[4] = $@mobid[0];
  1113. .@dfacehp = ( 13 - getmapusers('map_name$) ) * 200000;
  1114. .@MOB_HP = 5200000 - .@dfacehp;
  1115. if (.@MOB_HP < 1500000)
  1116. .@MOB_HP = 1500000;
  1117. setunitdata 'BOSS[4], UMOB_HP, .@MOB_HP;
  1118. initnpctimer;
  1119. end;
  1120. OnTimer1111:
  1121. .@mapcount = getmapusers('map_name$);
  1122. if (.@mapcount < 1)
  1123. setunitdata 'BOSS[4], UMOB_HP, 5000000;
  1124. else if (rand(1,22-.@mapcount) < 17) {
  1125. getunitdata 'BOSS[4], .@arr;
  1126. if (.@arr[UMOB_HP] > 4300000 && .@arr[UMOB_HP] < 5000000 || .@arr[UMOB_HP] > 3300000 && .@arr[UMOB_HP] < 4000000)
  1127. donpcevent instance_npcname("#fwormboss42") + "::OnStart1";
  1128. else if (.@arr[UMOB_HP] > 2300000 && .@arr[UMOB_HP] < 3000000 || .@arr[UMOB_HP] > 1300000 && .@arr[UMOB_HP] < 2000000 || .@arr[UMOB_HP] > 10000 && .@arr[UMOB_HP] < 1000000)
  1129. donpcevent instance_npcname("#fwormboss42") + "::OnStart2";
  1130. }
  1131. end;
  1132. OnTimer10000:
  1133. stopnpctimer;
  1134. getunitdata 'BOSS[4], .@arr;
  1135. if (.@arr[UMOB_HP] > 10000)
  1136. initnpctimer;
  1137. else
  1138. donpcevent instance_npcname("#fwormboss42") + "::OnEnd";
  1139. end;
  1140. OnMyMobDead:
  1141. if (mobcount( 'map_name$,instance_npcname("#fwormboss4") +"::OnMyMobDead" ) < 1) {
  1142. donpcevent instance_npcname("#fwormcontrol42") + "::OnEnd";
  1143. hideoffnpc instance_npcname("#fwormprize4");
  1144. enablenpc instance_npcname("#fwormenter4");
  1145. enablenpc instance_npcname("#fwormexit4");
  1146. hideoffnpc instance_npcname("Chaos#4");
  1147. hideoffnpc instance_npcname("Iris#4");
  1148. enablenpc instance_npcname("#chaoson2");
  1149. donpcevent instance_npcname("#fwormboss42") + "::OnEnd";
  1150. mapannounce 'map_name$, "You hear the pile of stones collapsing. I think another gateway is found.",bc_map,"0xffffff";
  1151. stopnpctimer;
  1152. }
  1153. end;
  1154. OnInstanceInit:
  1155. hideonnpc instance_npcname("#fwormboss4");
  1156. end;
  1157. }
  1158. 1@face,1,4,3 script #fwormboss42 CLEAR_NPC,{
  1159. end;
  1160. OnEnd:
  1161. killmonster 'map_name$, instance_npcname("#fwormboss42") + "::OnMyMobDead";
  1162. stopnpctimer;
  1163. end;
  1164. OnStart1:
  1165. initnpctimer;
  1166. .@label$ = instance_npcname("#fwormboss42") + "::OnMyMobDead";
  1167. if (mobcount( 'map_name$,.@label$ ) > 12)
  1168. killmonster 'map_name$, .@label$;
  1169. getunitdata 'BOSS[4], .@arr;
  1170. .@mobx = .@arr[UMOB_X];
  1171. .@moby = .@arr[UMOB_Y];
  1172. monster 'map_name$,.@mobx-3,.@moby+3,"#venomfog",2536,1, .@label$;
  1173. monster 'map_name$,.@mobx+3,.@moby+3,"#venomfog",2536,1, .@label$;
  1174. monster 'map_name$,.@mobx-3,.@moby-3,"#venomfog",2536,1, .@label$;
  1175. monster 'map_name$,.@mobx+3,.@moby-3,"#venomfog",2536,1, .@label$;
  1176. end;
  1177. OnStart2:
  1178. initnpctimer;
  1179. .@label$ = instance_npcname("#fwormboss42") + "::OnMyMobDead";
  1180. if (mobcount( 'map_name$,.@label$ ) > 27)
  1181. killmonster 'map_name$, .@label$;
  1182. getunitdata 'BOSS[4], .@arr;
  1183. .@mobx = .@arr[UMOB_X];
  1184. .@moby = .@arr[UMOB_Y];
  1185. monster 'map_name$,.@mobx-5,.@moby+5,"#venomfog",2536,1, .@label$;
  1186. monster 'map_name$, .@mobx,.@moby+5,"#venomfog",2536,1, .@label$;
  1187. monster 'map_name$,.@mobx+5,.@moby+5,"#venomfog",2536,1, .@label$;
  1188. monster 'map_name$,.@mobx-5, .@moby,"#venomfog",2536,1, .@label$;
  1189. monster 'map_name$, .@mobx, .@moby,"#venomfog",2536,1, .@label$;
  1190. monster 'map_name$,.@mobx+5, .@moby,"#venomfog",2536,1, .@label$;
  1191. monster 'map_name$,.@mobx-5,.@moby-5,"#venomfog",2536,1, .@label$;
  1192. monster 'map_name$, .@mobx,.@moby-5,"#venomfog",2536,1, .@label$;
  1193. monster 'map_name$,.@mobx+5,.@moby-5,"#venomfog",2536,1, .@label$;
  1194. end;
  1195. OnTimer30000:
  1196. donpcevent instance_npcname("#fwormboss42") + "::OnEnd";
  1197. end;
  1198. OnMyMobDead:
  1199. end;
  1200. OnInstanceInit:
  1201. hideonnpc instance_npcname("#fwormboss42");
  1202. end;
  1203. }
  1204. 1@face,204,122,0 script #fwormenter4 WARPNPC,2,2,{
  1205. end;
  1206. OnTouch:
  1207. warp 'map_name$,210,145;
  1208. end;
  1209. OnInstanceInit:
  1210. disablenpc instance_npcname("#fwormenter4");
  1211. end;
  1212. }
  1213. 1@face,198,142,0 script #fwormexit4 WARPNPC,2,2,{
  1214. end;
  1215. OnTouch:
  1216. warp 'map_name$,211,114;
  1217. end;
  1218. OnInstanceInit:
  1219. disablenpc instance_npcname("#fwormexit4");
  1220. end;
  1221. }
  1222. // 5th Stage (Final Boss Room)
  1223. //============================================================
  1224. 1@face,213,147,0 script #chaoson2 HIDDEN_WARP_NPC,7,7,{
  1225. end;
  1226. OnTouch_:
  1227. disablenpc instance_npcname("#chaoson2");
  1228. donpcevent instance_npcname("Chaos#4") + "::OnStart";
  1229. end;
  1230. OnInstanceInit:
  1231. disablenpc instance_npcname("#chaoson2");
  1232. end;
  1233. }
  1234. 1@face,213,153,6 script Chaos#5 4_M_CHAOS,{
  1235. end;
  1236. OnInstanceInit:
  1237. hideonnpc instance_npcname("Chaos#5");
  1238. end;
  1239. }
  1240. 1@face,208,149,7 script Chaos#4 4_M_CHAOS,{
  1241. cutin "h_chaos01",2;
  1242. mes "[Chaos]";
  1243. mes "Hew. This puddle is weird.";
  1244. close2;
  1245. cutin "",255;
  1246. end;
  1247. OnStart:
  1248. .@iris$ = instance_npcname("Iris#4");
  1249. .@chaos5$ = instance_npcname("Chaos#5");
  1250. sleep 2000;
  1251. npctalk "Chaos: Iris, what is this puddle for?";
  1252. sleep 3000;
  1253. npctalk "Iris: Well, I think it is too big to be the nest of a faceworm.", .@iris$;
  1254. sleep 4000;
  1255. npctalk "Chaos: Hmm, okay, should I go down there and check it out?";
  1256. sleep 3000;
  1257. npctalk "Iris: Chaos! Cut the crap.", .@iris$;
  1258. sleep 3000;
  1259. npctalk "Chaos: Why not? It doesn't even look that dangerous!";
  1260. sleep 5000;
  1261. hideonnpc instance_npcname("Chaos#4");
  1262. sleep 3000;
  1263. npctalk "Iris: Arrghh, Chaos you're such a troublemaker.", .@iris$;
  1264. sleep 6000;
  1265. npctalk "Chaos: Ugh! Arrgh!! What is this?", .@chaos5$;
  1266. sleep 2000;
  1267. npctalk "Iris: Chaos! What is it?", .@iris$;
  1268. sleep 2000;
  1269. npctalk "Chaos: Ah", .@chaos5$;
  1270. sleep 100;
  1271. npctalk "Chaos: Argh", .@chaos5$;
  1272. sleep 100;
  1273. npctalk "Chaos: Argghh", .@chaos5$;
  1274. sleep 100;
  1275. npctalk "Chaos: Argghhhhh", .@chaos5$;
  1276. sleep 100;
  1277. npctalk "Chaos: Argghhhhhhh", .@chaos5$;
  1278. sleep 100;
  1279. npctalk "Chaos: Argghhhhhhhhh", .@chaos5$;
  1280. sleep 100;
  1281. npctalk "Chaos: Argghhhhhhhhhhh!!", .@chaos5$;
  1282. sleep 5000;
  1283. hideoffnpc instance_npcname("Chaos#4");
  1284. sleep 3000;
  1285. npctalk "Chaos: Damn, I was close to being eaten alive.";
  1286. sleep 3000;
  1287. npctalk "Iris: I asked you what happened dummy!", .@iris$;
  1288. sleep 3000;
  1289. npctalk "Chaos: Uhh, the faceworm queen is crawling up now and it looks like really pissed off. So let's, uh, get outta here.";
  1290. sleep 6000;
  1291. hideonnpc instance_npcname("Chaos#4");
  1292. sleep 1000;
  1293. npctalk "Iris: Chaos you idiot!!", .@iris$;
  1294. specialeffect EF_DUSTSTORM,AREA, .@chaos5$;
  1295. specialeffect EF_MAPPILLAR2,AREA, .@chaos5$;
  1296. sleep 5000;
  1297. hideonnpc instance_npcname("Iris#4");
  1298. sleep 9000;
  1299. donpcevent instance_npcname("#fwormboss5") + "::OnStart";
  1300. donpcevent instance_npcname("#fwormprize5") + "::OnStart";
  1301. end;
  1302. OnInstanceInit:
  1303. hideonnpc instance_npcname("Chaos#4");
  1304. end;
  1305. }
  1306. 1@face,220,149,1 script Iris#4 4_F_IRIS,{
  1307. cutin "h_iris01",2;
  1308. mes "[Iris]";
  1309. mes "Something seems fishy around here. It's dangerous.";
  1310. close2;
  1311. cutin "",255;
  1312. end;
  1313. OnInstanceInit:
  1314. hideonnpc instance_npcname("Iris#4");
  1315. end;
  1316. }
  1317. 1@face,1,4,3 script #fwormboss5 CLEAR_NPC,{
  1318. if (callfunc("F_GM_NPC",1854,0) == 1) {
  1319. mes "" + mobcount('map_name$,instance_npcname("#fwormboss5") + "::OnMyMobDead");
  1320. close;
  1321. }
  1322. end;
  1323. OnHeal05:
  1324. callsub S_Heal, 5;
  1325. OnHeal04:
  1326. callsub S_Heal, 4, 1000000;
  1327. OnHeal03:
  1328. callsub S_Heal, 3, 250000;
  1329. OnHeal02:
  1330. callsub S_Heal, 2, 100000;
  1331. OnHeal01:
  1332. callsub S_Heal, 1, 50000;
  1333. S_Heal:
  1334. getunitdata 'BOSS[5],.@arr;
  1335. .@type = getarg(0);
  1336. .@mapcount = getmapusers('map_name$);
  1337. if (.@type == 5)
  1338. .@r_hpp = (.@mapcount+1) * 20000 * rand(1,10);
  1339. else
  1340. .@r_hpp = .@mapcount * getarg(1);
  1341. .@dfacehp = .@arr[UMOB_HP] + .@r_hpp;
  1342. .@r_hpp2 = 52000000 - ((13-.@mapcount) * 2000000);
  1343. if (.@dfacehp > .@r_hpp2)
  1344. .@dfacehp = .@r_hpp2;
  1345. setunitdata 'BOSS[5], UMOB_HP, .@dfacehp;
  1346. if (.@type == 5)
  1347. mapannounce 'map_name$, "The Faceworm Queen has dropped a sack of fatal poison and recovers " + .@r_hpp + " amount of energy.",bc_map,"0x66ff00",FW_NORMAL,14;
  1348. else
  1349. mapannounce 'map_name$, "The Faceworm Queen absorbs the energy of " + .@type + " unbroken " + ( .@type > 1 ? "eggs" : "egg" ) + " and recovers " + .@r_hpp + " amount of energy.",bc_map,"0x66ff00",FW_NORMAL,14;
  1350. end;
  1351. OnDamage:
  1352. getunitdata 'BOSS[5],.@arr;
  1353. .@r_hpp_1 = ( getmapusers('map_name$) + 7 ) * 25;
  1354. .@dr_hpp = rand(20,.@r_hpp_1) * 10000;
  1355. .@dfacehp = .@arr[UMOB_HP] - .@dr_hpp;
  1356. if (.@dfacehp < 5000000)
  1357. .@dfacehp = 5000000;
  1358. setunitdata 'BOSS[5], UMOB_HP, .@dfacehp;
  1359. mapannounce 'map_name$, "Chaos deals " + .@dr_hpp + " deadly damage hit points!!",bc_map,"0xffff33",FW_NORMAL,17;
  1360. end;
  1361. OnBerserk2:
  1362. getunitdata 'BOSS[5],.@arr;
  1363. .@MOB_HP2 = (( ('BOSS_HP - .@arr[UMOB_HP]) * 8) / 1000 ) * 100;
  1364. 'BOSS_HP = .@arr[UMOB_HP] + .@MOB_HP2;
  1365. killmonster 'map_name$, instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1366. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y],"Faceworm Queen",2532,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1367. 'BOSS[5] = $@mobid[0];
  1368. setunitdata 'BOSS[5], UMOB_HP, 'BOSS_HP;
  1369. // monster 'map_name$,1,6,"Faceworm Queen's Life",2915,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1370. mapannounce 'map_name$, "The faceworm rages recovering " + .@MOB_HP2 + " and its attack power is increased.",bc_map,"0xff8888",FW_NORMAL,13;
  1371. end;
  1372. OnBerserk:
  1373. getunitdata 'BOSS[5],.@arr;
  1374. if (.@arr[UMOB_X] < 190 || .@arr[UMOB_X] > 230 || .@arr[UMOB_Y] < 135 || .@arr[UMOB_Y] > 175) {
  1375. killmonster 'map_name$, instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1376. monster 'map_name$,.@arr[UMOB_X],.@arr[UMOB_Y],"Faceworm Queen",2532,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1377. 'BOSS[5] = $@mobid[0];
  1378. setunitdata 'BOSS[5], UMOB_HP, .@arr[UMOB_HP];
  1379. // monster 'map_name$,1,6,"Faceworm Queen's Life",2915,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1380. 'BOSS_HP = .@arr[UMOB_HP];
  1381. donpcevent instance_npcname("#fwormboss50") + "::OnCalm";
  1382. mapannounce 'map_name$, "It is too far away from the nest. The Faceworm Queen begins raging.",bc_map,"0xff3333",FW_NORMAL,15;
  1383. }
  1384. end;
  1385. OnCalm:
  1386. getunitdata 'BOSS[5],.@arr;
  1387. killmonster 'map_name$, instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1388. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y],"Faceworm Queen",2529,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1389. 'BOSS[5] = $@mobid[0];
  1390. setunitdata 'BOSS[5], UMOB_HP, .@arr[UMOB_HP];
  1391. // monster 'map_name$,1,6,"Faceworm Queen's Life",2915,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1392. 'BOSS_HP = .@arr[UMOB_HP];
  1393. end;
  1394. OnChange:
  1395. getunitdata 'BOSS[5],.@arr;
  1396. .@chan_f = rand(1,14);
  1397. if (.@chan_f >= 10)
  1398. end;
  1399. if (.@chan_f > 0 && .@chan_f < 3) {
  1400. .@element$ = "wind";
  1401. .@mob_id = 2535;
  1402. }
  1403. else if (.@chan_f > 2 && .@chan_f < 5) {
  1404. .@element$ = "earth";
  1405. .@mob_id = 2533;
  1406. }
  1407. else if (.@chan_f > 4 && .@chan_f < 7) {
  1408. .@element$ = "water";
  1409. .@mob_id = 2534;
  1410. }
  1411. else if (.@chan_f > 6 && .@chan_f < 10) {
  1412. .@element$ = "its original";
  1413. .@mob_id = 2529;
  1414. }
  1415. mapannounce 'map_name$, "Faceworm Queen is trying to shed its skin to " + .@element$ + " attribute.",bc_map,"0xffffff";
  1416. sleep 1000;
  1417. if (unitexists('BOSS[5]) == false)
  1418. stopnpctimer;
  1419. else {
  1420. killmonster 'map_name$, instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1421. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y],"Faceworm Queen",.@mob_id,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1422. 'BOSS[5] = $@mobid[0];
  1423. setunitdata 'BOSS[5], UMOB_HP, .@arr[UMOB_HP];
  1424. // monster 'map_name$,1,6,"Faceworm Queen's Life",2915,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1425. 'BOSS_HP = .@arr[UMOB_HP];
  1426. }
  1427. end;
  1428. OnWarning:
  1429. getunitdata 'BOSS[5],.@arr;
  1430. if (.@arr[UMOB_X] < 190 || .@arr[UMOB_X] > 230 || .@arr[UMOB_Y] < 135 || .@arr[UMOB_Y] > 175)
  1431. mapannounce 'map_name$, "Please do not go farther from the nest. The Faceworm Queen can be violent.",bc_map,"0xff5555",FW_NORMAL,15;
  1432. end;
  1433. OnEnd:
  1434. killmonster 'map_name$, instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1435. stopnpctimer;
  1436. end;
  1437. OnStart:
  1438. monster 'map_name$,213,153,"Faceworm Queen",2529,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1439. 'BOSS[5] = $@mobid[0];
  1440. // monster 'map_name$,1,6,"Faceworm Queen's Life",2915,1,instance_npcname("#fwormboss5") + "::OnMyMobDead";
  1441. getunitdata 'BOSS[5],.@arr;
  1442. .@dfacehp = ( 13- getmapusers('map_name$) ) * 2000000;
  1443. .@MOB_HP2 = 52000000 - .@dfacehp;
  1444. if (.@MOB_HP2 < 15000000)
  1445. .@MOB_HP2 = 15000000;
  1446. setunitdata 'BOSS[5], UMOB_HP, .@MOB_HP2;
  1447. 'BOSS_HP = .@MOB_HP2;
  1448. initnpctimer;
  1449. end;
  1450. OnTimer1000:
  1451. if (mobcount( 'map_name$,instance_npcname("#fwormboss5") + "::OnMyMobDead" ) < 1) {
  1452. stopnpctimer;
  1453. end;
  1454. }
  1455. getunitdata 'BOSS[5],.@arr;
  1456. 'BOSS_HP = .@arr[UMOB_HP];
  1457. end;
  1458. OnTimer5555:
  1459. .@mapcount = getmapusers('map_name$);
  1460. if (.@mapcount < 1) {
  1461. setunitdata 'BOSS[5], UMOB_HP, 50000000;
  1462. for ( .@i = 1; .@i <= 4; ++.@i )
  1463. donpcevent instance_npcname( "#fwormboss5" + .@i ) + "::OnEnd";
  1464. stopnpctimer;
  1465. }
  1466. else if (rand(1,(22-.@mapcount)) < 17) {
  1467. getunitdata 'BOSS[5],.@arr;
  1468. if (.@arr[UMOB_HP] > 45000000 && .@arr[UMOB_HP] < 48000000)
  1469. donpcevent instance_npcname("#fwormboss51") + "::OnStart1";
  1470. else if (.@arr[UMOB_HP] > 40000000 && .@arr[UMOB_HP] < 45000000)
  1471. donpcevent instance_npcname("#fwormboss52") + "::OnStart1";
  1472. else if (.@arr[UMOB_HP] > 35000000 && .@arr[UMOB_HP] < 40000000)
  1473. donpcevent instance_npcname("#fwormboss53") + "::OnStart1";
  1474. else if (.@arr[UMOB_HP] > 30000000 && .@arr[UMOB_HP] < 35000000)
  1475. donpcevent instance_npcname("#fwormboss54") + "::OnStart1";
  1476. else if (.@arr[UMOB_HP] > 25000000 && .@arr[UMOB_HP] < 30000000)
  1477. donpcevent instance_npcname("#fwormboss51") + "::OnStart2";
  1478. else if (.@arr[UMOB_HP] > 20000000 && .@arr[UMOB_HP] < 25000000)
  1479. donpcevent instance_npcname("#fwormboss52") + "::OnStart2";
  1480. else if (.@arr[UMOB_HP] > 15000000 && .@arr[UMOB_HP] < 20000000)
  1481. donpcevent instance_npcname("#fwormboss53") + "::OnStart2";
  1482. else if (.@arr[UMOB_HP] > 10000000 && .@arr[UMOB_HP] < 15000000)
  1483. donpcevent instance_npcname("#fwormboss54") + "::OnStart2";
  1484. else if (.@arr[UMOB_HP] > 5000000 && .@arr[UMOB_HP] < 10000000) {
  1485. if (rand(1,3) == 1)
  1486. donpcevent instance_npcname("#fwormboss53") + "::OnStart1";
  1487. else
  1488. donpcevent instance_npcname("#fwormboss51") + "::OnStart1";
  1489. donpcevent instance_npcname("#fwormboss54") + "::OnStart1";
  1490. }
  1491. else if (.@arr[UMOB_HP] > 500000 && .@arr[UMOB_HP] < 5000000) {
  1492. if (rand(1,3) == 1)
  1493. donpcevent instance_npcname("#fwormboss53") + "::OnStart2";
  1494. else
  1495. donpcevent instance_npcname("#fwormboss51") + "::OnStart2";
  1496. donpcevent instance_npcname("#fwormboss54") + "::OnStart2";
  1497. }
  1498. }
  1499. end;
  1500. OnTimer10000:
  1501. donpcevent instance_npcname("#fwormboss5") + "::OnWarning";
  1502. end;
  1503. OnTimer12000:
  1504. donpcevent instance_npcname("#fwormboss5") + "::OnChange";
  1505. end;
  1506. OnTimer13000:
  1507. if (unitexists('BOSS[5]) == false)
  1508. stopnpctimer;
  1509. getunitdata 'BOSS[5],.@arr;
  1510. if (.@arr[UMOB_HP] > 7000000)
  1511. donpcevent instance_npcname("#support") + "::OnSupport_2";
  1512. end;
  1513. OnTimer14000:
  1514. donpcevent instance_npcname("#fwormboss5") + "::OnBerserk";
  1515. end;
  1516. OnTimer19000:
  1517. getunitdata 'BOSS[5],.@arr;
  1518. if ('BOSS_HP > .@arr[UMOB_HP]) {
  1519. .@MOB_HP3 = 'BOSS_HP - .@arr[UMOB_HP];
  1520. .@mapcount = getmapusers('map_name$);
  1521. if (.@mapcount && .@MOB_HP3 > ((.@mapcount + 7) * 400000))
  1522. donpcevent instance_npcname("#fwormboss5") + "::OnBerserk2";
  1523. }
  1524. end;
  1525. OnTimer25000:
  1526. stopnpctimer;
  1527. getunitdata 'BOSS[5],.@arr;
  1528. if (.@arr[UMOB_HP] > 200000)
  1529. initnpctimer;
  1530. else {
  1531. for ( .@i = 1; .@i <= 4; ++.@i )
  1532. donpcevent instance_npcname( "#fwormboss5" + .@i ) + "::OnEnd";
  1533. }
  1534. end;
  1535. OnMyMobDead:
  1536. if (mobcount( 'map_name$,instance_npcname("#fwormboss5") + "::OnMyMobDead" ) < 1) {
  1537. hideoffnpc instance_npcname("#fwormprize5");
  1538. hideoffnpc instance_npcname("Chaos#6");
  1539. hideoffnpc instance_npcname("Iris#6");
  1540. enablenpc instance_npcname("#chaoson3");
  1541. for ( .@i = 0; .@i <= 4; ++.@i )
  1542. donpcevent instance_npcname( "#fwormboss5" + .@i ) + "::OnEnd";
  1543. donpcevent instance_npcname("#fwormboss5") + "::OnEnd";
  1544. }
  1545. end;
  1546. }
  1547. 1@face,2,3,5 script #support CLEAR_NPC,{
  1548. end;
  1549. OnSupport_2:
  1550. .@sup_m = getmapusers('map_name$) + 10;
  1551. if (.@sup_m < 8)
  1552. .@sup_m = 8;
  1553. .@chan_f = rand(1,.@sup_m);
  1554. if (.@chan_f > 0 && .@chan_f < 3) {
  1555. donpcevent instance_npcname("#chaos_north") + "::OnStart";
  1556. mapannounce 'map_name$, "The voice of Chaos: Hey! Lure it to the north! I will beat it!",bc_map,"0xff44aa",FW_NORMAL,14;
  1557. } else if (.@chan_f > 2 && .@chan_f < 5) {
  1558. donpcevent instance_npcname("#chaos_south") + "::OnStart";
  1559. mapannounce 'map_name$, "The voice of Chaos: Hey! Lure it to the south! I will beat it!",bc_map,"0xff44aa",FW_NORMAL,14;
  1560. } else if (.@chan_f > 4 && .@chan_f < 7) {
  1561. donpcevent instance_npcname("#chaos_east") + "::OnStart";
  1562. mapannounce 'map_name$, "The voice of Chaos: Hey! Lure it to the east! I will beat it!",bc_map,"0xff44aa",FW_NORMAL,14;
  1563. } else if (.@chan_f > 6 && .@chan_f < 9) {
  1564. donpcevent instance_npcname("#chaos_west") + "::OnStart";
  1565. mapannounce 'map_name$, "The voice of Chaos: Hey! Lure it to the west! I will beat it!",bc_map,"0xff44aa",FW_NORMAL,14;
  1566. }
  1567. end;
  1568. }
  1569. 1@face,214,172,0 script #chaos_north HIDDEN_WARP_NPC,2,2,{
  1570. end;
  1571. OnTouch_:
  1572. if (unitexists('BOSS[5]) == true) {
  1573. getunitdata 'BOSS[5],.@arr;
  1574. if (.@arr[UMOB_X] > 205 && .@arr[UMOB_X] < 223 && .@arr[UMOB_Y] > 163 && .@arr[UMOB_Y] < 181) {
  1575. specialeffect EF_MAGNUMBREAK,AREA,instance_npcname("Chaos#north");
  1576. specialeffect EF_LORD,AREA,instance_npcname("Chaos#north");
  1577. donpcevent instance_npcname("#fwormboss5") + "::OnDamage";
  1578. }
  1579. else
  1580. npctalk "Chaos: You can't even manage to lure the queen to me?";
  1581. }
  1582. disablenpc instance_npcname("#chaos_north");
  1583. donpcevent instance_npcname("Chaos#north") + "::OnEnd";
  1584. end;
  1585. OnStart:
  1586. initnpctimer;
  1587. enablenpc instance_npcname("#chaos_north");
  1588. hideoffnpc instance_npcname("Chaos#north");
  1589. end;
  1590. OnTimer15000:
  1591. disablenpc instance_npcname("#chaos_north");
  1592. hideonnpc instance_npcname("Chaos#north");
  1593. stopnpctimer;
  1594. end;
  1595. OnInstanceInit:
  1596. disablenpc instance_npcname("#chaos_north");
  1597. end;
  1598. }
  1599. 1@face,214,143,0 script #chaos_south HIDDEN_WARP_NPC,2,2,{
  1600. end;
  1601. OnTouch_:
  1602. if (unitexists('BOSS[5]) == true) {
  1603. getunitdata 'BOSS[5],.@arr;
  1604. if (.@arr[UMOB_X] > 205 && .@arr[UMOB_X] < 223 && .@arr[UMOB_Y] > 134 && .@arr[UMOB_Y] < 152) {
  1605. specialeffect EF_MAGNUMBREAK,AREA,instance_npcname("Chaos#south");
  1606. specialeffect EF_LORD,AREA,instance_npcname("Chaos#south");
  1607. donpcevent instance_npcname("#fwormboss5") + "::OnDamage";
  1608. }
  1609. else
  1610. npctalk "Chaos: Hey~ We are partners. You can't just keep running alone!";
  1611. }
  1612. disablenpc instance_npcname("#chaos_south");
  1613. donpcevent instance_npcname("Chaos#south") + "::OnEnd";
  1614. end;
  1615. OnStart:
  1616. initnpctimer;
  1617. enablenpc instance_npcname("#chaos_south");
  1618. hideoffnpc instance_npcname("Chaos#south");
  1619. end;
  1620. OnTimer15000:
  1621. disablenpc instance_npcname("#chaos_south");
  1622. hideonnpc instance_npcname("Chaos#south");
  1623. stopnpctimer;
  1624. end;
  1625. OnInstanceInit:
  1626. disablenpc instance_npcname("#chaos_south");
  1627. end;
  1628. }
  1629. 1@face,226,158,0 script #chaos_east HIDDEN_WARP_NPC,2,2,{
  1630. end;
  1631. OnTouch_:
  1632. if (unitexists('BOSS[5]) == true) {
  1633. getunitdata 'BOSS[5],.@arr;
  1634. if (.@arr[UMOB_X] > 217 && .@arr[UMOB_X] < 235 && .@arr[UMOB_Y] > 149 && .@arr[UMOB_Y] < 167) {
  1635. specialeffect EF_MAGNUMBREAK,AREA,instance_npcname("Chaos#east");
  1636. specialeffect EF_LORD,AREA,instance_npcname("Chaos#east");
  1637. donpcevent instance_npcname("#fwormboss5") + "::OnDamage";
  1638. }
  1639. else
  1640. npctalk "Chaos: Lure and bring it with you, I can't beat it alone!";
  1641. }
  1642. disablenpc instance_npcname("#chaos_east");
  1643. donpcevent instance_npcname("Chaos#east") + "::OnEnd";
  1644. end;
  1645. OnStart:
  1646. initnpctimer;
  1647. enablenpc instance_npcname("#chaos_east");
  1648. hideoffnpc instance_npcname("Chaos#east");
  1649. end;
  1650. OnTimer15000:
  1651. disablenpc instance_npcname("#chaos_east");
  1652. hideonnpc instance_npcname("Chaos#east");
  1653. stopnpctimer;
  1654. end;
  1655. OnInstanceInit:
  1656. disablenpc instance_npcname("#chaos_east");
  1657. end;
  1658. }
  1659. 1@face,200,158,0 script #chaos_west HIDDEN_WARP_NPC,2,2,{
  1660. end;
  1661. OnTouch_:
  1662. if (unitexists('BOSS[5]) == true) {
  1663. getunitdata 'BOSS[5],.@arr;
  1664. if (.@arr[UMOB_X] > 191 && .@arr[UMOB_X] < 209 && .@arr[UMOB_Y] > 149 && .@arr[UMOB_Y] < 167) {
  1665. specialeffect EF_MAGNUMBREAK,AREA,instance_npcname("Chaos#west");
  1666. specialeffect EF_LORD,AREA,instance_npcname("Chaos#west");
  1667. donpcevent instance_npcname("#fwormboss5") + "::OnDamage";
  1668. }
  1669. else
  1670. npctalk "Chaos: Why'd you leave the queen behind? Our lives are at stake here. Pull it together!";
  1671. }
  1672. disablenpc instance_npcname("#chaos_west");
  1673. donpcevent instance_npcname("Chaos#west") + "::OnEnd";
  1674. end;
  1675. OnStart:
  1676. initnpctimer;
  1677. enablenpc instance_npcname("#chaos_west");
  1678. hideoffnpc instance_npcname("Chaos#west");
  1679. end;
  1680. OnTimer15000:
  1681. disablenpc instance_npcname("#chaos_west");
  1682. hideonnpc instance_npcname("Chaos#west");
  1683. stopnpctimer;
  1684. end;
  1685. OnInstanceInit:
  1686. disablenpc instance_npcname("#chaos_west");
  1687. end;
  1688. }
  1689. 1@face,214,172,5 script Chaos#north 4_M_CHAOS,{
  1690. end;
  1691. OnEnd:
  1692. initnpctimer;
  1693. end;
  1694. OnTimer1000:
  1695. hideonnpc instance_npcname(strnpcinfo(0));
  1696. stopnpctimer;
  1697. end;
  1698. OnInstanceInit:
  1699. hideonnpc instance_npcname(strnpcinfo(0));
  1700. end;
  1701. }
  1702. 1@face,214,143,0 duplicate(Chaos#north) Chaos#south 4_M_CHAOS
  1703. 1@face,226,158,3 duplicate(Chaos#north) Chaos#east 4_M_CHAOS
  1704. 1@face,200,158,6 duplicate(Chaos#north) Chaos#west 4_M_CHAOS
  1705. 1@face,1,4,3 script #fwormboss50 CLEAR_NPC,{
  1706. end;
  1707. OnEnd:
  1708. stopnpctimer;
  1709. end;
  1710. OnCalm:
  1711. initnpctimer;
  1712. end;
  1713. OnTimer15000:
  1714. donpcevent instance_npcname("#fwormboss5") + "::OnCalm";
  1715. stopnpctimer;
  1716. end;
  1717. OnInstanceInit:
  1718. hideonnpc instance_npcname("#fwormboss50");
  1719. end;
  1720. }
  1721. 1@face,1,4,3 script #fwormboss51 CLEAR_NPC,{
  1722. end;
  1723. OnEnd:
  1724. killmonster 'map_name$, instance_npcname("#fwormboss51") + "::OnMyMobDead";
  1725. stopnpctimer;
  1726. end;
  1727. OnStart1:
  1728. initnpctimer;
  1729. .@label$ = instance_npcname("#fwormboss51") + "::OnMyMobDead";
  1730. if (mobcount( 'map_name$,.@label$ ) > 3)
  1731. killmonster 'map_name$, .@label$;
  1732. getunitdata 'BOSS[5],.@arr;
  1733. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y], "Faceworm Egg",2540,1, .@label$;
  1734. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y], "Faceworm Egg",2540,1, .@label$;
  1735. end;
  1736. OnStart2:
  1737. initnpctimer;
  1738. .@label$ = instance_npcname("#fwormboss51") + "::OnMyMobDead";
  1739. if (mobcount( 'map_name$,.@label$ ) > 6)
  1740. killmonster 'map_name$, .@label$;
  1741. getunitdata 'BOSS[5],.@arr;
  1742. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y], "Faceworm Egg",2540,1, .@label$;
  1743. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]+4, "Faceworm Egg",2540,1, .@label$;
  1744. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y], "Faceworm Egg",2540,1, .@label$;
  1745. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]-4, "Faceworm Egg",2540,1, .@label$;
  1746. end;
  1747. OnTimer12000:
  1748. .@mob_dead_num = mobcount('map_name$,instance_npcname("#fwormboss51") + "::OnMyMobDead");
  1749. if (.@mob_dead_num > 3)
  1750. donpcevent instance_npcname("#fwormboss5") + "::OnHeal04";
  1751. else if (.@mob_dead_num > 2)
  1752. donpcevent instance_npcname("#fwormboss5") + "::OnHeal03";
  1753. else if (.@mob_dead_num > 1)
  1754. donpcevent instance_npcname("#fwormboss5") + "::OnHeal02";
  1755. else if (.@mob_dead_num > 0)
  1756. donpcevent instance_npcname("#fwormboss5") + "::OnHeal01";
  1757. donpcevent instance_npcname("#fwormboss51") + "::OnEnd";
  1758. end;
  1759. OnMyMobDead:
  1760. end;
  1761. OnInstanceInit:
  1762. hideonnpc instance_npcname("#fwormboss51");
  1763. end;
  1764. }
  1765. 1@face,1,4,3 script #fwormboss52 CLEAR_NPC,{
  1766. end;
  1767. OnEnd:
  1768. killmonster 'map_name$, instance_npcname("#fwormboss52") + "::OnMyMobDead";
  1769. stopnpctimer;
  1770. end;
  1771. OnStart1:
  1772. initnpctimer;
  1773. .@label$ = instance_npcname("#fwormboss52") + "::OnMyMobDead";
  1774. if (mobcount( 'map_name$,.@label$ ) > 6)
  1775. killmonster 'map_name$, .@label$;
  1776. getunitdata 'BOSS[5],.@arr;
  1777. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y],"#waterball",2539,1, .@label$;
  1778. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]+4,"#waterball",2539,1, .@label$;
  1779. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y],"#waterball",2539,1, .@label$;
  1780. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]-4,"#waterball",2539,1, .@label$;
  1781. end;
  1782. OnStart2:
  1783. initnpctimer;
  1784. .@label$ = instance_npcname("#fwormboss52") + "::OnMyMobDead";
  1785. if (mobcount( 'map_name$,.@label$ ) > 12)
  1786. killmonster 'map_name$, .@label$;
  1787. getunitdata 'BOSS[5], .@arr;
  1788. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y],"#waterball",2539,1, .@label$;
  1789. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]+4,"#waterball",2539,1, .@label$;
  1790. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y],"#waterball",2539,1, .@label$;
  1791. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]-4,"#waterball",2539,1, .@label$;
  1792. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y]+4,"#waterball",2539,1, .@label$;
  1793. monster 'map_name$, .@arr[UMOB_X]-4, .@arr[UMOB_Y]-4,"#waterball",2539,1, .@label$;
  1794. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y]+4,"#waterball",2539,1, .@label$;
  1795. monster 'map_name$, .@arr[UMOB_X]+4, .@arr[UMOB_Y]-4,"#waterball",2539,1, .@label$;
  1796. end;
  1797. OnTimer20000:
  1798. donpcevent instance_npcname("#fwormboss52") + "::OnEnd";
  1799. end;
  1800. OnMyMobDead:
  1801. end;
  1802. OnInstanceInit:
  1803. hideonnpc instance_npcname("#fwormboss52");
  1804. end;
  1805. }
  1806. 1@face,1,4,3 script #fwormboss53 CLEAR_NPC,{
  1807. end;
  1808. OnEnd:
  1809. killmonster 'map_name$, instance_npcname("#fwormboss53") + "::OnMyMobDead";
  1810. end;
  1811. OnStart1:
  1812. callsub S_Spawn, 5;
  1813. OnStart2:
  1814. callsub S_Spawn, 7;
  1815. S_Spawn:
  1816. getunitdata 'BOSS[5], .@arr;
  1817. .@num = getarg(0);
  1818. .@coord_x = .@arr[UMOB_X] + .@num;
  1819. .@coord_y = .@arr[UMOB_Y] - .@num;
  1820. .@vmobx = .@arr[UMOB_X] - .@num;
  1821. do {
  1822. .@vmoby = .@arr[UMOB_Y] + .@num;
  1823. do {
  1824. monster 'map_name$,.@vmobx,.@vmoby,"Venom Bug",2531,1,instance_npcname("#fwormboss53") + "::OnMyMobDead";
  1825. .@vmoby -= 2;
  1826. }
  1827. while( .@vmoby >= .@coord_y );
  1828. .@vmobx += 2;
  1829. }
  1830. while( .@vmobx <= .@coord_x );
  1831. donpcevent instance_npcname("#fwormboss5") + "::OnHeal05";
  1832. end;
  1833. OnMyMobDead:
  1834. end;
  1835. OnInstanceInit:
  1836. hideonnpc instance_npcname("#fwormboss53");
  1837. end;
  1838. }
  1839. 1@face,1,4,3 script #fwormboss54 CLEAR_NPC,{
  1840. end;
  1841. OnEnd:
  1842. killmonster 'map_name$, instance_npcname("#fwormboss54") + "::OnMyMobDead";
  1843. stopnpctimer;
  1844. end;
  1845. OnStart1:
  1846. initnpctimer;
  1847. .@label$ = instance_npcname("#fwormboss54") + "::OnMyMobDead";
  1848. if (mobcount( 'map_name$,.@label$ ) > 20)
  1849. killmonster 'map_name$, .@label$;
  1850. getunitdata 'BOSS[5],.@arr;
  1851. monster 'map_name$, .@arr[UMOB_X]-3, .@arr[UMOB_Y]+3, "#venomfog",2536,1, .@label$;
  1852. monster 'map_name$, .@arr[UMOB_X]+3, .@arr[UMOB_Y]+3, "#venomfog",2536,1, .@label$;
  1853. monster 'map_name$, .@arr[UMOB_X]-3, .@arr[UMOB_Y]-3, "#venomfog",2536,1, .@label$;
  1854. monster 'map_name$, .@arr[UMOB_X]+3, .@arr[UMOB_Y]-3, "#venomfog",2536,1, .@label$;
  1855. end;
  1856. OnStart2:
  1857. initnpctimer;
  1858. .@label$ = instance_npcname("#fwormboss54") + "::OnMyMobDead";
  1859. if (mobcount( 'map_name$,.@label$ ) > 45)
  1860. killmonster 'map_name$, .@label$;
  1861. getunitdata 'BOSS[5],.@arr;
  1862. monster 'map_name$, .@arr[UMOB_X]-5, .@arr[UMOB_Y]+5, "#venomfog",2537,1, .@label$;
  1863. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]+5, "#venomfog",2537,1, .@label$;
  1864. monster 'map_name$, .@arr[UMOB_X]+5, .@arr[UMOB_Y]+5, "#venomfog",2537,1, .@label$;
  1865. monster 'map_name$, .@arr[UMOB_X]-5, .@arr[UMOB_Y], "#venomfog",2537,1, .@label$;
  1866. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y], "#venomfog",2537,1, .@label$;
  1867. monster 'map_name$, .@arr[UMOB_X]+5, .@arr[UMOB_Y], "#venomfog",2537,1, .@label$;
  1868. monster 'map_name$, .@arr[UMOB_X]-5, .@arr[UMOB_Y]-5, "#venomfog",2537,1, .@label$;
  1869. monster 'map_name$, .@arr[UMOB_X], .@arr[UMOB_Y]-5, "#venomfog",2537,1, .@label$;
  1870. monster 'map_name$, .@arr[UMOB_X]+5, .@arr[UMOB_Y]-5, "#venomfog",2537,1, .@label$;
  1871. end;
  1872. OnTimer30000:
  1873. donpcevent instance_npcname("#fwormboss54") + "::OnEnd";
  1874. end;
  1875. OnMyMobDead:
  1876. end;
  1877. OnInstanceInit:
  1878. hideonnpc instance_npcname("#fwormboss54");
  1879. end;
  1880. }
  1881. 1@face,212,156,0 script #chaoson3 HIDDEN_WARP_NPC,7,7,{
  1882. end;
  1883. OnTouch_:
  1884. disablenpc instance_npcname("#chaoson3");
  1885. donpcevent instance_npcname("Chaos#6") + "::OnStart";
  1886. end;
  1887. OnInstanceInit:
  1888. disablenpc instance_npcname("#chaoson3");
  1889. end;
  1890. }
  1891. 1@face,209,159,6 script Chaos#6 4_M_CHAOS,{
  1892. cutin "h_chaos01",2;
  1893. mes "[Chaos]";
  1894. mes "Hmm.. You are pretty good, I am impressed.";
  1895. close2;
  1896. cutin "",255;
  1897. end;
  1898. OnStart:
  1899. .@iris$ = instance_npcname("Iris#6");
  1900. donpcevent instance_npcname("Chaos#east") + "::OnEnd";
  1901. donpcevent instance_npcname("Chaos#west") + "::OnEnd";
  1902. donpcevent instance_npcname("Chaos#south") + "::OnEnd";
  1903. donpcevent instance_npcname("Chaos#north") + "::OnEnd";
  1904. hideoffnpc instance_npcname("Chaos#6");
  1905. hideoffnpc .@iris$;
  1906. sleep 2000;
  1907. npctalk "Chaos: Phew... That was quite a long fight.";
  1908. sleep 3000;
  1909. npctalk "Iris: But that is not the one we were looking for.", .@iris$;
  1910. sleep 4000;
  1911. npctalk "Chaos: We can't help it. Our equipment is damaged so we should retreat for now.";
  1912. sleep 3000;
  1913. npctalk "Iris: Yes, I feel bad that we could not see the Faceworm King. But luckily we weren't hurt.", .@iris$;
  1914. sleep 3000;
  1915. npctalk "Chaos: So... Hey, you over there! You're not too shabby.";
  1916. sleep 3000;
  1917. npctalk "Chaos: Today's hunting is all yours, I won't touch it.";
  1918. sleep 3000;
  1919. npctalk "Chaos: Ahah~ I hoped that there would be some treasure that the merchant prince dropped...";
  1920. sleep 3000;
  1921. npctalk "Iris: Chaos, I am getting tired. Let's go back to the village.", .@iris$;
  1922. sleep 3000;
  1923. npctalk "Chaos: Sorry, shall we go?";
  1924. sleep 3000;
  1925. hideonnpc instance_npcname("Chaos#6");
  1926. hideonnpc .@iris$;
  1927. hideoffnpc instance_npcname("Dimensional Device#6");
  1928. end;
  1929. OnInstanceInit:
  1930. hideonnpc instance_npcname("Chaos#6");
  1931. end;
  1932. }
  1933. 1@face,220,159,4 script Iris#6 4_F_IRIS,{
  1934. cutin "h_iris02",2;
  1935. mes "[Iris]";
  1936. mes "That was dangerous. Hehehe...";
  1937. close2;
  1938. cutin "",255;
  1939. end;
  1940. OnInstanceInit:
  1941. hideonnpc instance_npcname("Iris#6");
  1942. end;
  1943. }
  1944. 1@face,215,159,4 script Dimensional Device#6 PORTAL,{
  1945. mes "[Dimensional Device]";
  1946. mes "Your time is finished here. You may look arround or go leave. What do you want to do?";
  1947. next;
  1948. if (select("Stop:Return to Dimensional Gap") == 2)
  1949. warp "dali",85,62;
  1950. end;
  1951. OnInstanceInit:
  1952. hideonnpc instance_npcname("Dimensional Device#6");
  1953. end;
  1954. }
  1955. // Instance Traps :: in_face_l
  1956. //============================================================
  1957. 1@face,61,132,5 script Suspicious Mound#1 4_SOIL,5,5,{
  1958. end;
  1959. OnTouch_:
  1960. setarray .@num[1],
  1961. 3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,
  1962. 3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,
  1963. 3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,
  1964. 3,2,1,3,2,1,3,2,1;
  1965. .@npc_name$ = instance_npcname(strnpcinfo(0));
  1966. specialeffect EF_VENOMDUST;
  1967. disablenpc .@npc_name$;
  1968. killmonster 'map_name$, .@npc_name$ + "::OnMyMobDead";
  1969. getmapxy 'map_name$, .@x, .@y, BL_NPC;
  1970. .@mon_num = .@num[atoi(strnpcinfo(2))];
  1971. areamonster 'map_name$,.@x-1,.@y-1,.@x+1,.@y+1,"Faceworm Larva",2541,.@mon_num,.@npc_name$ + "::OnMyMobDead";
  1972. initnpctimer;
  1973. end;
  1974. OnTimer45000:
  1975. enablenpc instance_npcname(strnpcinfo(0));
  1976. stopnpctimer;
  1977. end;
  1978. OnMyMobDead:
  1979. end;
  1980. }
  1981. 1@face,62,195,5 duplicate(Suspicious Mound#1) Suspicious Mound#2 4_SOIL,5,5
  1982. 1@face,66,94,5 duplicate(Suspicious Mound#1) Suspicious Mound#3 4_SOIL,5,5
  1983. 1@face,68,265,5 duplicate(Suspicious Mound#1) Suspicious Mound#4 4_SOIL,5,5
  1984. 1@face,68,108,5 duplicate(Suspicious Mound#1) Suspicious Mound#5 4_SOIL,5,5
  1985. 1@face,72,202,5 duplicate(Suspicious Mound#1) Suspicious Mound#6 4_SOIL,5,5
  1986. 1@face,75,73,5 duplicate(Suspicious Mound#1) Suspicious Mound#7 4_SOIL,5,5
  1987. 1@face,76,241,5 duplicate(Suspicious Mound#1) Suspicious Mound#8 4_SOIL,5,5
  1988. 1@face,79,274,5 duplicate(Suspicious Mound#1) Suspicious Mound#9 4_SOIL,5,5
  1989. 1@face,79,119,5 duplicate(Suspicious Mound#1) Suspicious Mound#10 4_SOIL,5,5
  1990. 1@face,97,59,5 duplicate(Suspicious Mound#1) Suspicious Mound#11 4_SOIL,5,5
  1991. 1@face,99,211,5 duplicate(Suspicious Mound#1) Suspicious Mound#12 4_SOIL,5,5
  1992. 1@face,100,122,5 duplicate(Suspicious Mound#1) Suspicious Mound#13 4_SOIL,5,5
  1993. 1@face,105,190,5 duplicate(Suspicious Mound#1) Suspicious Mound#14 4_SOIL,5,5
  1994. 1@face,108,264,5 duplicate(Suspicious Mound#1) Suspicious Mound#15 4_SOIL,5,5
  1995. 1@face,108,74,5 duplicate(Suspicious Mound#1) Suspicious Mound#16 4_SOIL,5,5
  1996. 1@face,111,178,5 duplicate(Suspicious Mound#1) Suspicious Mound#17 4_SOIL,5,5
  1997. 1@face,112,137,5 duplicate(Suspicious Mound#1) Suspicious Mound#18 4_SOIL,5,5
  1998. 1@face,112,159,5 duplicate(Suspicious Mound#1) Suspicious Mound#19 4_SOIL,5,5
  1999. 1@face,112,236,5 duplicate(Suspicious Mound#1) Suspicious Mound#20 4_SOIL,5,5
  2000. 1@face,118,109,5 duplicate(Suspicious Mound#1) Suspicious Mound#21 4_SOIL,5,5
  2001. 1@face,119,201,5 duplicate(Suspicious Mound#1) Suspicious Mound#22 4_SOIL,5,5
  2002. 1@face,123,257,5 duplicate(Suspicious Mound#1) Suspicious Mound#23 4_SOIL,5,5
  2003. 1@face,124,216,5 duplicate(Suspicious Mound#1) Suspicious Mound#24 4_SOIL,5,5
  2004. 1@face,125,228,5 duplicate(Suspicious Mound#1) Suspicious Mound#25 4_SOIL,5,5
  2005. 1@face,126,290,5 duplicate(Suspicious Mound#1) Suspicious Mound#26 4_SOIL,5,5
  2006. 1@face,128,174,5 duplicate(Suspicious Mound#1) Suspicious Mound#27 4_SOIL,5,5
  2007. 1@face,133,244,5 duplicate(Suspicious Mound#1) Suspicious Mound#28 4_SOIL,5,5
  2008. 1@face,139,218,5 duplicate(Suspicious Mound#1) Suspicious Mound#29 4_SOIL,5,5
  2009. 1@face,140,255,5 duplicate(Suspicious Mound#1) Suspicious Mound#30 4_SOIL,5,5
  2010. 1@face,148,238,5 duplicate(Suspicious Mound#1) Suspicious Mound#31 4_SOIL,5,5
  2011. 1@face,157,293,5 duplicate(Suspicious Mound#1) Suspicious Mound#32 4_SOIL,5,5
  2012. 1@face,158,138,5 duplicate(Suspicious Mound#1) Suspicious Mound#33 4_SOIL,5,5
  2013. 1@face,158,163,5 duplicate(Suspicious Mound#1) Suspicious Mound#34 4_SOIL,5,5
  2014. 1@face,167,277,5 duplicate(Suspicious Mound#1) Suspicious Mound#35 4_SOIL,5,5
  2015. 1@face,168,194,5 duplicate(Suspicious Mound#1) Suspicious Mound#36 4_SOIL,5,5
  2016. 1@face,170,251,5 duplicate(Suspicious Mound#1) Suspicious Mound#37 4_SOIL,5,5
  2017. 1@face,171,62,5 duplicate(Suspicious Mound#1) Suspicious Mound#38 4_SOIL,5,5
  2018. 1@face,171,149,5 duplicate(Suspicious Mound#1) Suspicious Mound#39 4_SOIL,5,5
  2019. 1@face,172,173,5 duplicate(Suspicious Mound#1) Suspicious Mound#40 4_SOIL,5,5
  2020. 1@face,175,296,5 duplicate(Suspicious Mound#1) Suspicious Mound#41 4_SOIL,5,5
  2021. 1@face,178,234,5 duplicate(Suspicious Mound#1) Suspicious Mound#42 4_SOIL,5,5
  2022. 1@face,183,185,5 duplicate(Suspicious Mound#1) Suspicious Mound#43 4_SOIL,5,5
  2023. 1@face,191,289,5 duplicate(Suspicious Mound#1) Suspicious Mound#44 4_SOIL,5,5
  2024. 1@face,194,192,5 duplicate(Suspicious Mound#1) Suspicious Mound#45 4_SOIL,5,5
  2025. 1@face,196,207,5 duplicate(Suspicious Mound#1) Suspicious Mound#46 4_SOIL,5,5
  2026. 1@face,198,257,5 duplicate(Suspicious Mound#1) Suspicious Mound#47 4_SOIL,5,5
  2027. 1@face,199,273,5 duplicate(Suspicious Mound#1) Suspicious Mound#48 4_SOIL,5,5
  2028. 1@face,211,244,5 duplicate(Suspicious Mound#1) Suspicious Mound#49 4_SOIL,5,5
  2029. 1@face,229,200,5 duplicate(Suspicious Mound#1) Suspicious Mound#50 4_SOIL,5,5
  2030. 1@face,232,271,5 duplicate(Suspicious Mound#1) Suspicious Mound#51 4_SOIL,5,5
  2031. 1@face,250,223,5 duplicate(Suspicious Mound#1) Suspicious Mound#52 4_SOIL,5,5
  2032. 1@face,254,324,5 duplicate(Suspicious Mound#1) Suspicious Mound#53 4_SOIL,5,5
  2033. 1@face,255,263,5 duplicate(Suspicious Mound#1) Suspicious Mound#54 4_SOIL,5,5
  2034. // Instance Venom Bugs :: in_face_v
  2035. //============================================================
  2036. 1@face,163,130,0 script #toxicarea1 HIDDEN_WARP_NPC,10,10,{
  2037. end;
  2038. OnTouch_:
  2039. setarray .@num[1],25,30,50,30,50,30,40,50,50;
  2040. .@npc_name$ = instance_npcname(strnpcinfo(0));
  2041. specialeffect EF_VENOMDUST;
  2042. disablenpc .@npc_name$;
  2043. killmonster 'map_name$, .@npc_name$ + "::OnMyMobDead";
  2044. .@val = atoi(charat(strnpcinfo(2),9));
  2045. switch(.@val) {
  2046. case 1: setarray .@xy[0],167,142,15; break;
  2047. case 2: setarray .@xy[0],163,161,15; break;
  2048. case 3: setarray .@xy[0],167,185,20; break;
  2049. case 4: setarray .@xy[0],197,203,15; break;
  2050. case 5: setarray .@xy[0],227,203,20; break;
  2051. case 6: setarray .@xy[0],244,232,15; break;
  2052. case 7: setarray .@xy[0],243,259,15; break;
  2053. case 8: setarray .@xy[0],292,277,50; break;
  2054. case 9: setarray .@xy[0],248,322,50; break;
  2055. }
  2056. .@mon_num = .@num[.@val];
  2057. areamonster 'map_name$,.@xy[0]-.@xy[2],.@xy[1]-.@xy[2],.@xy[0]+.@xy[2],.@xy[1]+.@xy[2],"Venom Bug",2531,.@mon_num, .@npc_name$ + "::OnMyMobDead";
  2058. initnpctimer;
  2059. end;
  2060. OnTimer15000:
  2061. enablenpc instance_npcname(strnpcinfo(0));
  2062. stopnpctimer;
  2063. end;
  2064. OnMyMobDead:
  2065. end;
  2066. }
  2067. 1@face,165,147,0 duplicate(#toxicarea1) #toxicarea2 HIDDEN_WARP_NPC,10,10
  2068. 1@face,163,166,0 duplicate(#toxicarea1) #toxicarea3 HIDDEN_WARP_NPC,10,10
  2069. 1@face,183,197,0 duplicate(#toxicarea1) #toxicarea4 HIDDEN_WARP_NPC,10,10
  2070. 1@face,202,204,0 duplicate(#toxicarea1) #toxicarea5 HIDDEN_WARP_NPC,10,10
  2071. 1@face,237,220,0 duplicate(#toxicarea1) #toxicarea6 HIDDEN_WARP_NPC,10,10
  2072. 1@face,245,241,0 duplicate(#toxicarea1) #toxicarea7 HIDDEN_WARP_NPC,10,10
  2073. 1@face,292,277,0 duplicate(#toxicarea1) #toxicarea8 HIDDEN_WARP_NPC,10,10
  2074. 1@face,248,322,0 duplicate(#toxicarea1) #toxicarea9 HIDDEN_WARP_NPC,10,10
  2075. // Instance Timer :: in_facetimer
  2076. //============================================================
  2077. 1@face,3,1,5 script #globaltimer22 CLEAR_NPC,{
  2078. end;
  2079. OnT_s:
  2080. initnpctimer;
  2081. end;
  2082. OnT_s2:
  2083. .@face_timer = $120719_num_face;
  2084. if (!.@face_timer)
  2085. .@face_timer = 3600;
  2086. .@face_member = getmapusers('map_name$) - 1;
  2087. .@winner_name$ = '120903_str_face$;
  2088. .@current_timer = getnpctimer(0) / 1000;
  2089. if (.@current_timer < 1)
  2090. end;
  2091. .@time_m = .@current_timer / 60;
  2092. .@time_s = .@current_timer % 60;
  2093. if (.@current_timer < 60)
  2094. .@time_txt$ = callfunc( "F_InsertPlural", .@time_s, "Second" );
  2095. else
  2096. .@time_txt$ = callfunc( "F_InsertPlural", .@time_m, "Minute" ) + " " + callfunc( "F_InsertPlural", .@time_s, "Second" );
  2097. if (.@current_timer >= .@face_timer)
  2098. mapannounce 'map_name$, "A time of " + .@time_txt$ + " has been recorded on the board. But it did not beat the best record.",bc_map,"0xffff33";
  2099. else {
  2100. if (!.@face_member)
  2101. announce .@winner_name$ + " beat the best record for completing the Faceworm's Nest (" + .@time_txt$ + ").",bc_all,"0xffff33",FW_NORMAL,15;
  2102. else
  2103. announce .@winner_name$ + " with " + .@face_member + " party " + ( .@face_member > 1 ? "members" : "members" ) + " beat the best record for completing the Faceworm's Nest (" + .@time_txt$ + ").",bc_all,"0xffff33",FW_NORMAL,15;
  2104. $120719_str_face$ = .@winner_name$;
  2105. $120719_num_face = .@current_timer;
  2106. $120903_num_face = .@face_member;
  2107. }
  2108. end;
  2109. OnT_s3:
  2110. for ( .@i = 1; .@i <= 27; ++.@i ) {
  2111. if (rand(1,100) > 50)
  2112. hideoffnpc instance_npcname( "Merchant Prince's Box#" + .@i );
  2113. }
  2114. end;
  2115. OnTimer3600000:
  2116. stopnpctimer;
  2117. end;
  2118. OnInstanceInit:
  2119. hideonnpc instance_npcname("#globaltimer22");
  2120. end;
  2121. }
  2122. // Instance Prizes :: in_face_c
  2123. //============================================================
  2124. 1@face,155,82,3 script #fwormprize1 4_TREASURE_BOX,{
  2125. .@current_timer = getnpctimer(0) / 1000;
  2126. if (.@current_timer < 1)
  2127. end;
  2128. .@time_m = .@current_timer / 60;
  2129. .@time_s = .@current_timer % 60;
  2130. if (.@current_timer < 60)
  2131. .@time_txt$ = callfunc( "F_InsertPlural", .@time_s, "Second" );
  2132. else
  2133. .@time_txt$ = callfunc( "F_InsertPlural", .@time_m, "Minute" ) + " " + callfunc( "F_InsertPlural", .@time_s, "Second" );
  2134. mapannounce 'map_name$, "The actual time for the battle at this stage remaining is " + .@time_txt$ + ".",bc_map,"0xffff33";
  2135. getmapxy .@map$, .@x, .@y, BL_NPC;
  2136. stopnpctimer;
  2137. specialeffect EF_COIN;
  2138. hideonnpc instance_npcname(strnpcinfo(0));
  2139. switch( atoi(charat(strnpcinfo(2),10)) ) {
  2140. case 1:
  2141. setarray .@val[0],200,200,95;
  2142. break;
  2143. case 2:
  2144. setarray .@val[0],800,400,90;
  2145. break;
  2146. case 3:
  2147. setarray .@val[0],1100,600,85;
  2148. break;
  2149. case 4:
  2150. setarray .@val[0],1250,800,80;
  2151. break;
  2152. }
  2153. if (.@current_timer < 120)
  2154. .@current_timer = 120;
  2155. .@dr_t = .@current_timer - 120;
  2156. // refine
  2157. .@dr_t1 = ( .@dr_t / 15 ) + 1;
  2158. if (.@dr_t1 > 3)
  2159. .@dr_t1 = 3;
  2160. .@r_st1 = 7 - .@dr_t1;
  2161. .@refine = rand( (.@r_st1 - 4), .@r_st1 );// Min = 0, Max = 6
  2162. // card slot 4
  2163. .@dr_t1 = .@dr_t * 10;
  2164. if (.@dr_t1 > (.@val[0]+1))
  2165. .@dr_t1 = .@val[0] + 1;
  2166. .@r_st = (.@val[0]+2) - .@dr_t1;// Min = 1, Max = .@val[0] + 2
  2167. .@ren_e_m = rand(.@r_st,1316);
  2168. if (.@ren_e_m < 201) .@en_name_4 = 0;
  2169. else if (.@ren_e_m < 301) .@en_name_4 = 4740; // Vitality1
  2170. else if (.@ren_e_m < 401) .@en_name_4 = 4700; // Strength1
  2171. else if (.@ren_e_m < 501) .@en_name_4 = 4730; // Agility1
  2172. else if (.@ren_e_m < 601) .@en_name_4 = 4720; // Dexterity1
  2173. else if (.@ren_e_m < 701) .@en_name_4 = 4710; // Inteligence1
  2174. else if (.@ren_e_m < 801) .@en_name_4 = 4750; // Luck1
  2175. else if (.@ren_e_m < 851) .@en_name_4 = 4741; // Vitality2
  2176. else if (.@ren_e_m < 901) .@en_name_4 = 4701; // Strength2
  2177. else if (.@ren_e_m < 951) .@en_name_4 = 4731; // Agility2
  2178. else if (.@ren_e_m < 1001) .@en_name_4 = 4721; // Dexterity2
  2179. else if (.@ren_e_m < 1051) .@en_name_4 = 4711; // Inteligence2
  2180. else if (.@ren_e_m < 1101) .@en_name_4 = 4751; // Luck2
  2181. else if (.@ren_e_m < 1126) .@en_name_4 = 4742; // Vitality3
  2182. else if (.@ren_e_m < 1151) .@en_name_4 = 4702; // Strength3
  2183. else if (.@ren_e_m < 1176) .@en_name_4 = 4732; // Agility3
  2184. else if (.@ren_e_m < 1201) .@en_name_4 = 4722; // Dexterity3
  2185. else if (.@ren_e_m < 1226) .@en_name_4 = 4712; // Inteligence3
  2186. else if (.@ren_e_m < 1251) .@en_name_4 = 4752; // Luck3
  2187. else if (.@ren_e_m < 1261) .@en_name_4 = 4743; // Vitality4
  2188. else if (.@ren_e_m < 1271) .@en_name_4 = 4703; // Strength4
  2189. else if (.@ren_e_m < 1281) .@en_name_4 = 4733; // Agility4
  2190. else if (.@ren_e_m < 1291) .@en_name_4 = 4723; // Dexterity4
  2191. else if (.@ren_e_m < 1301) .@en_name_4 = 4713; // Inteligence4
  2192. else if (.@ren_e_m < 1311) .@en_name_4 = 4753; // Luck4
  2193. else if (.@ren_e_m < 1312) .@en_name_4 = 4744; // Vitality5
  2194. else if (.@ren_e_m < 1313) .@en_name_4 = 4704; // Strength5
  2195. else if (.@ren_e_m < 1314) .@en_name_4 = 4734; // Agility5
  2196. else if (.@ren_e_m < 1315) .@en_name_4 = 4724; // Dexterity5
  2197. else if (.@ren_e_m < 1316) .@en_name_4 = 4714; // Inteligence5
  2198. else if (.@ren_e_m < 1317) .@en_name_4 = 4754; // Luck5
  2199. // card slot 3
  2200. if (.@en_name_4 > 0) {
  2201. .@dr_t1 = @dr_t * 5;
  2202. if (.@dr_t1 > 601)
  2203. .@dr_t1 = 601;
  2204. .@r_st = 602 - .@dr_t1;
  2205. .@ren_e_m = rand(.@r_st,1716);// Min = 1, Max = 602
  2206. if (.@ren_e_m < 601) .@en_name_3 = 0;
  2207. else if (.@ren_e_m < 701) .@en_name_3 = 4740; // Vitality1
  2208. else if (.@ren_e_m < 801) .@en_name_3 = 4700; // Strength1
  2209. else if (.@ren_e_m < 901) .@en_name_3 = 4730; // Agility1
  2210. else if (.@ren_e_m < 1001) .@en_name_3 = 4720; // Dexterity1
  2211. else if (.@ren_e_m < 1101) .@en_name_3 = 4710; // Inteligence1
  2212. else if (.@ren_e_m < 1201) .@en_name_3 = 4750; // Luck1
  2213. else if (.@ren_e_m < 1251) .@en_name_3 = 4741; // Vitality2
  2214. else if (.@ren_e_m < 1301) .@en_name_3 = 4701; // Strength2
  2215. else if (.@ren_e_m < 1351) .@en_name_3 = 4731; // Agility2
  2216. else if (.@ren_e_m < 1401) .@en_name_3 = 4721; // Dexterity2
  2217. else if (.@ren_e_m < 1451) .@en_name_3 = 4711; // Inteligence2
  2218. else if (.@ren_e_m < 1501) .@en_name_3 = 4751; // Luck2
  2219. else if (.@ren_e_m < 1526) .@en_name_3 = 4742; // Vitality3
  2220. else if (.@ren_e_m < 1551) .@en_name_3 = 4702; // Strength3
  2221. else if (.@ren_e_m < 1576) .@en_name_3 = 4732; // Agility3
  2222. else if (.@ren_e_m < 1601) .@en_name_3 = 4722; // Dexterity3
  2223. else if (.@ren_e_m < 1626) .@en_name_3 = 4712; // Inteligence3
  2224. else if (.@ren_e_m < 1651) .@en_name_3 = 4752; // Luck3
  2225. else if (.@ren_e_m < 1661) .@en_name_3 = 4743; // Vitality4
  2226. else if (.@ren_e_m < 1671) .@en_name_3 = 4703; // Strength4
  2227. else if (.@ren_e_m < 1681) .@en_name_3 = 4733; // Agility4
  2228. else if (.@ren_e_m < 1691) .@en_name_3 = 4723; // Dexterity4
  2229. else if (.@ren_e_m < 1701) .@en_name_3 = 4713; // Inteligence4
  2230. else if (.@ren_e_m < 1711) .@en_name_3 = 4753; // Luck4
  2231. else if (.@ren_e_m < 1712) .@en_name_3 = 4744; // Vitality5
  2232. else if (.@ren_e_m < 1713) .@en_name_3 = 4704; // Strength5
  2233. else if (.@ren_e_m < 1714) .@en_name_3 = 4734; // Agility5
  2234. else if (.@ren_e_m < 1715) .@en_name_3 = 4724; // Dexterity5
  2235. else if (.@ren_e_m < 1716) .@en_name_3 = 4714; // Inteligence5
  2236. else if (.@ren_e_m < 1717) .@en_name_3 = 4754; // Luck5
  2237. // card slot 2
  2238. if (.@en_name_3 > 0) {
  2239. .@dr_t1 = .@dr_t * 5;
  2240. if (.@dr_t1 > .@val[1])
  2241. .@dr_t1 = .@val[1];
  2242. .@r_st = (.@val[1]+1) - .@dr_t1;// Min = 1, Max = .@val[1] + 1
  2243. .@ren_e_m = rand(.@r_st,1100);
  2244. if (.@ren_e_m < 1001)
  2245. .@en_name_2 = 0;
  2246. else if (.@ren_e_m < 1100) {
  2247. switch(.@en_name_3) {
  2248. case 4700: case 4701: case 4702:
  2249. case 4703: case 4704:
  2250. .@en_name_2 = 4853; // S_Str
  2251. break;
  2252. case 4740: case 4741: case 4742:
  2253. case 4743: case 4744:
  2254. .@en_name_2 = 4855; // S_Vital
  2255. break;
  2256. case 4730: case 4731: case 4732:
  2257. case 4733: case 4734:
  2258. .@en_name_2 = 4854; // S_Agi
  2259. break;
  2260. case 4720: case 4721: case 4722:
  2261. case 4723: case 4724:
  2262. .@en_name_2 = 4857; // S_Dex
  2263. break;
  2264. case 4750: case 4751: case 4752:
  2265. case 4753: case 4754:
  2266. .@en_name_2 = 4858; // S_Luck
  2267. break;
  2268. case 4710: case 4711: case 4712:
  2269. case 4713: case 4714:
  2270. .@en_name_2 = 4856; // S_Int
  2271. break;
  2272. }
  2273. }
  2274. }
  2275. }
  2276. if (rand(1,100) > .@val[2])
  2277. .@d_item = 20718; // FaceWorm_Skin_
  2278. else
  2279. .@d_item = 20717; // FaceWorm_Skin
  2280. makeitem2 .@d_item,1,'map_name$,.@x,.@y,0,.@refine,0,0,.@en_name_2,.@en_name_3,.@en_name_4;
  2281. end;
  2282. OnStart:
  2283. initnpctimer;
  2284. end;
  2285. OnTimer3600000:
  2286. stopnpctimer;
  2287. end;
  2288. OnInstanceInit:
  2289. hideonnpc instance_npcname(strnpcinfo(0));
  2290. end;
  2291. }
  2292. 1@face,162,271,3 duplicate(#fwormprize1) #fwormprize2 4_TREASURE_BOX
  2293. 1@face,278,308,3 duplicate(#fwormprize1) #fwormprize3 4_TREASURE_BOX
  2294. 1@face,214,108,3 duplicate(#fwormprize1) #fwormprize4 4_TREASURE_BOX
  2295. 1@face,213,157,3 script #fwormprize5 4_TREASURE_BOX,{
  2296. '120903_str_face$ = strcharinfo(0);
  2297. donpcevent instance_npcname("#globaltimer22") + "::OnT_s2";
  2298. donpcevent instance_npcname("#globaltimer22") + "::OnT_s3";
  2299. specialeffect EF_COIN;
  2300. hideonnpc instance_npcname("#fwormprize5");
  2301. .@current_timer = getnpctimer(0) / 1000;
  2302. if (.@current_timer < 1)
  2303. .@current_timer = 1200;
  2304. if (.@current_timer < 270)
  2305. .@current_timer = 270;
  2306. .@dr_t = .@current_timer - 270;
  2307. // refine rand
  2308. .@dr_t1 = ( .@dr_t / 15 ) + 1;
  2309. if (.@dr_t1 > 4)
  2310. .@dr_t1 = 4;
  2311. .@refine_rand[1] = 12 - .@dr_t1;
  2312. .@refine_rand[0] = .@refine_rand[1] - 7;
  2313. // card slot 4 rand
  2314. .@dr_t1 = .@dr_t * 10;
  2315. if (.@dr_t1 > 1851)
  2316. .@dr_t1 = 1851;
  2317. .@slot_4_rand = 1852 - .@dr_t1;
  2318. // card slot 3 rand
  2319. .@dr_t1 = .@dr_t * 10;
  2320. if (.@dr_t1 > 1401)
  2321. .@dr_t1 = 1401;
  2322. .@slot_3_rand = 1402 - .@dr_t1;
  2323. // card slot 2 rand
  2324. .@dr_t1 = .@dr_t * 5;
  2325. if (.@dr_t1 > 999)
  2326. .@dr_t1 = 999;
  2327. .@slot_2_rand = 1000 - .@dr_t1;
  2328. for ( .@i = 1; .@i <= 2; ++.@i ) {
  2329. // refine
  2330. .@refine = rand( .@refine_rand[0],.@refine_rand[1] );// Min = 1, Max = 11
  2331. // card slot 4
  2332. .@ren_e_m = rand( .@slot_4_rand,1934 );
  2333. if (.@ren_e_m < 201) .@en_name_4 = 0;
  2334. else if (.@ren_e_m < 301) .@en_name_4 = 4740; // Vitality1
  2335. else if (.@ren_e_m < 401) .@en_name_4 = 4700; // Strength1
  2336. else if (.@ren_e_m < 501) .@en_name_4 = 4730; // Agility1
  2337. else if (.@ren_e_m < 601) .@en_name_4 = 4720; // Dexterity1
  2338. else if (.@ren_e_m < 701) .@en_name_4 = 4710; // Inteligence1
  2339. else if (.@ren_e_m < 801) .@en_name_4 = 4750; // Luck1
  2340. else if (.@ren_e_m < 901) .@en_name_4 = 4741; // Vitality2
  2341. else if (.@ren_e_m < 1001) .@en_name_4 = 4701; // Strength2
  2342. else if (.@ren_e_m < 1101) .@en_name_4 = 4731; // Agility2
  2343. else if (.@ren_e_m < 1201) .@en_name_4 = 4721; // Dexterity2
  2344. else if (.@ren_e_m < 1301) .@en_name_4 = 4711; // Inteligence2
  2345. else if (.@ren_e_m < 1401) .@en_name_4 = 4751; // Luck2
  2346. else if (.@ren_e_m < 1451) .@en_name_4 = 4742; // Vitality3
  2347. else if (.@ren_e_m < 1501) .@en_name_4 = 4702; // Strength3
  2348. else if (.@ren_e_m < 1551) .@en_name_4 = 4732; // Agility3
  2349. else if (.@ren_e_m < 1601) .@en_name_4 = 4722; // Dexterity3
  2350. else if (.@ren_e_m < 1651) .@en_name_4 = 4712; // Inteligence3
  2351. else if (.@ren_e_m < 1701) .@en_name_4 = 4752; // Luck3
  2352. else if (.@ren_e_m < 1726) .@en_name_4 = 4743; // Vitality4
  2353. else if (.@ren_e_m < 1751) .@en_name_4 = 4703; // Strength4
  2354. else if (.@ren_e_m < 1776) .@en_name_4 = 4733; // Agility4
  2355. else if (.@ren_e_m < 1801) .@en_name_4 = 4723; // Dexterity4
  2356. else if (.@ren_e_m < 1826) .@en_name_4 = 4713; // Inteligence4
  2357. else if (.@ren_e_m < 1851) .@en_name_4 = 4753; // Luck4
  2358. else if (.@ren_e_m < 1861) .@en_name_4 = 4744; // Vitality5
  2359. else if (.@ren_e_m < 1871) .@en_name_4 = 4704; // Strength5
  2360. else if (.@ren_e_m < 1881) .@en_name_4 = 4734; // Agility5
  2361. else if (.@ren_e_m < 1891) .@en_name_4 = 4724; // Dexterity5
  2362. else if (.@ren_e_m < 1901) .@en_name_4 = 4714; // Inteligence5
  2363. else if (.@ren_e_m < 1911) .@en_name_4 = 4754; // Luck5
  2364. else if (.@ren_e_m < 1914) .@en_name_4 = 4745; // Vitality6
  2365. else if (.@ren_e_m < 1917) .@en_name_4 = 4705; // Strength6
  2366. else if (.@ren_e_m < 1920) .@en_name_4 = 4735; // Agility6
  2367. else if (.@ren_e_m < 1923) .@en_name_4 = 4725; // Dexterity6
  2368. else if (.@ren_e_m < 1926) .@en_name_4 = 4715; // Inteligence6
  2369. else if (.@ren_e_m < 1929) .@en_name_4 = 4755; // Luck6
  2370. else if (.@ren_e_m < 1930) .@en_name_4 = 4746; // Vitality7
  2371. else if (.@ren_e_m < 1931) .@en_name_4 = 4706; // Strength7
  2372. else if (.@ren_e_m < 1932) .@en_name_4 = 4736; // Agility7
  2373. else if (.@ren_e_m < 1933) .@en_name_4 = 4726; // Dexterity7
  2374. else if (.@ren_e_m < 1934) .@en_name_4 = 4716; // Inteligence7
  2375. else if (.@ren_e_m < 1935) .@en_name_4 = 4756; // Luck7
  2376. // card slot 3
  2377. if (.@en_name_4 > 0) {
  2378. .@ren_e_m = rand( .@slot_3_rand,1934 );
  2379. if (.@ren_e_m < 201) .@en_name_3 = 0;
  2380. else if (.@ren_e_m < 301) .@en_name_3 = 4740; // Vitality1
  2381. else if (.@ren_e_m < 401) .@en_name_3 = 4700; // Strength1
  2382. else if (.@ren_e_m < 501) .@en_name_3 = 4730; // Agility1
  2383. else if (.@ren_e_m < 601) .@en_name_3 = 4720; // Dexterity1
  2384. else if (.@ren_e_m < 701) .@en_name_3 = 4710; // Inteligence1
  2385. else if (.@ren_e_m < 801) .@en_name_3 = 4750; // Luck1
  2386. else if (.@ren_e_m < 901) .@en_name_3 = 4741; // Vitality2
  2387. else if (.@ren_e_m < 1001) .@en_name_3 = 4701; // Strength2
  2388. else if (.@ren_e_m < 1101) .@en_name_3 = 4731; // Agility2
  2389. else if (.@ren_e_m < 1201) .@en_name_3 = 4721; // Dexterity2
  2390. else if (.@ren_e_m < 1301) .@en_name_3 = 4711; // Inteligence2
  2391. else if (.@ren_e_m < 1401) .@en_name_3 = 4751; // Luck2
  2392. else if (.@ren_e_m < 1451) .@en_name_3 = 4742; // Vitality3
  2393. else if (.@ren_e_m < 1501) .@en_name_3 = 4702; // Strength3
  2394. else if (.@ren_e_m < 1551) .@en_name_3 = 4732; // Agility3
  2395. else if (.@ren_e_m < 1601) .@en_name_3 = 4722; // Dexterity3
  2396. else if (.@ren_e_m < 1651) .@en_name_3 = 4712; // Inteligence3
  2397. else if (.@ren_e_m < 1701) .@en_name_3 = 4752; // Luck3
  2398. else if (.@ren_e_m < 1726) .@en_name_3 = 4743; // Vitality4
  2399. else if (.@ren_e_m < 1751) .@en_name_3 = 4703; // Strength4
  2400. else if (.@ren_e_m < 1776) .@en_name_3 = 4733; // Agility4
  2401. else if (.@ren_e_m < 1801) .@en_name_3 = 4723; // Dexterity4
  2402. else if (.@ren_e_m < 1826) .@en_name_3 = 4713; // Inteligence4
  2403. else if (.@ren_e_m < 1851) .@en_name_3 = 4753; // Luck4
  2404. else if (.@ren_e_m < 1861) .@en_name_3 = 4744; // Vitality5
  2405. else if (.@ren_e_m < 1871) .@en_name_3 = 4704; // Strength5
  2406. else if (.@ren_e_m < 1881) .@en_name_3 = 4734; // Agility5
  2407. else if (.@ren_e_m < 1891) .@en_name_3 = 4724; // Dexterity5
  2408. else if (.@ren_e_m < 1901) .@en_name_3 = 4714; // Inteligence5
  2409. else if (.@ren_e_m < 1911) .@en_name_3 = 4754; // Luck5
  2410. else if (.@ren_e_m < 1914) .@en_name_3 = 4745; // Vitality6
  2411. else if (.@ren_e_m < 1917) .@en_name_3 = 4705; // Strength6
  2412. else if (.@ren_e_m < 1920) .@en_name_3 = 4735; // Agility6
  2413. else if (.@ren_e_m < 1923) .@en_name_3 = 4725; // Dexterity6
  2414. else if (.@ren_e_m < 1926) .@en_name_3 = 4715; // Inteligence6
  2415. else if (.@ren_e_m < 1929) .@en_name_3 = 4755; // Luck6
  2416. else if (.@ren_e_m < 1930) .@en_name_3 = 4746; // Vitality7
  2417. else if (.@ren_e_m < 1931) .@en_name_3 = 4706; // Strength7
  2418. else if (.@ren_e_m < 1932) .@en_name_3 = 4736; // Agility7
  2419. else if (.@ren_e_m < 1933) .@en_name_3 = 4726; // Dexterity7
  2420. else if (.@ren_e_m < 1934) .@en_name_3 = 4716; // Inteligence7
  2421. else if (.@ren_e_m < 1935) .@en_name_3 = 4756; // Luck7
  2422. // card slot 2
  2423. if (.@en_name_3 > 0) {
  2424. .@ren_e_m = rand( .@slot_2_rand,1100 );
  2425. if (.@ren_e_m < 1001)
  2426. .@en_name_2 = 0;
  2427. else if (.@ren_e_m < 1100) {
  2428. switch(.@en_name_3) {
  2429. case 4700: case 4701: case 4702: case 4703:
  2430. case 4704: case 4705: case 4706:
  2431. .@en_name_2 = 4853; // S_Str
  2432. break;
  2433. case 4740: case 4741: case 4742: case 4743:
  2434. case 4744: case 4745: case 4746:
  2435. .@en_name_2 = 4855; // S_Vital
  2436. break;
  2437. case 4730: case 4731: case 4732: case 4733:
  2438. case 4734: case 4735: case 4736:
  2439. .@en_name_2 = 4854; // S_Agi
  2440. break;
  2441. case 4720: case 4721: case 4722: case 4723:
  2442. case 4724: case 4725: case 4726:
  2443. .@en_name_2 = 4857; // S_Dex
  2444. break;
  2445. case 4750: case 4751: case 4752: case 4753:
  2446. case 4754: case 4755: case 4756:
  2447. .@en_name_2 = 4858; // S_Luck
  2448. break;
  2449. case 4710: case 4711: case 4712: case 4713:
  2450. case 4714: case 4715: case 4716:
  2451. .@en_name_2 = 4856; // S_Int
  2452. break;
  2453. }
  2454. }
  2455. }
  2456. }
  2457. if (rand(1,100) > 40)
  2458. .@d_item = 20718; // FaceWorm_Skin_
  2459. else
  2460. .@d_item = 20717; // FaceWorm_Skin
  2461. makeitem2 .@d_item,1,'map_name$,rand(209,217),rand(152,161),0,.@refine,0,0,.@en_name_2,.@en_name_3,.@en_name_4;
  2462. }
  2463. end;
  2464. OnStart:
  2465. initnpctimer;
  2466. end;
  2467. OnTimer3600000:
  2468. stopnpctimer;
  2469. end;
  2470. OnInstanceInit:
  2471. hideonnpc instance_npcname("#fwormprize5");
  2472. end;
  2473. }
  2474. // Instance Treasures :: in_face_t
  2475. //============================================================
  2476. 1@face,183,314,3 script Merchant Prince's Box#1 4_TREASURE_BOX,{
  2477. specialeffect EF_COIN;
  2478. hideonnpc instance_npcname(strnpcinfo(0));
  2479. initnpctimer;
  2480. end;
  2481. OnTimer1000:
  2482. .@val = atoi(strnpcinfo(2));
  2483. switch(.@val) {
  2484. case 1:
  2485. setarray .@xy[0],184,321;
  2486. setarray .@item[0],718,22507; // Dark_Red_Jewel, ShabbyOldScroll
  2487. break;
  2488. case 2:
  2489. setarray .@xy[0],162,337;
  2490. setarray .@item[0],719,6650; // Violet_Jewel, Shabby_Ring
  2491. break;
  2492. case 3:
  2493. setarray .@xy[0],29,362;
  2494. setarray .@item[0],720,6651; // Skyblue_Jewel, Rusty_Bracelet
  2495. break;
  2496. case 4:
  2497. setarray .@xy[0],24,288;
  2498. setarray .@item[0],721,6652; // Azure_Jewel, Old_Photo_Album
  2499. break;
  2500. case 5:
  2501. setarray .@xy[0],58,274;
  2502. setarray .@item[0],722,6653; // Scarlet_Jewel, Shabby_Pill
  2503. break;
  2504. case 6:
  2505. setarray .@xy[0],73,214;
  2506. setarray .@item[0],725,22507; // Red_Jewel, ShabbyOldScroll
  2507. break;
  2508. case 7:
  2509. setarray .@xy[0],49,176;
  2510. setarray .@item[0],726,6650; // Blue_Jewel, Shabby_Ring
  2511. break;
  2512. case 8:
  2513. setarray .@xy[0],259,66;
  2514. setarray .@item[0],727,6651; // White_Jewel, Rusty_Bracelet
  2515. break;
  2516. case 9:
  2517. setarray .@xy[0],68,38;
  2518. setarray .@item[0],718,6652; // Dark_Red_Jewel, Old_Photo_Album
  2519. break;
  2520. case 10:
  2521. setarray .@xy[0],178,54;
  2522. setarray .@item[0],719,6653; // Violet_Jewel, Shabby_Pill
  2523. break;
  2524. case 11:
  2525. setarray .@xy[0],120,137;
  2526. setarray .@item[0],720,22507; // Skyblue_Jewel, ShabbyOldScroll
  2527. break;
  2528. case 12:
  2529. setarray .@xy[0],110,224;
  2530. setarray .@item[0],721,6650; // Azure_Jewel, Shabby_Ring
  2531. break;
  2532. case 13:
  2533. setarray .@xy[0],118,294;
  2534. setarray .@item[0],722,6651; // Scarlet_Jewel, Rusty_Bracelet
  2535. break;
  2536. case 14:
  2537. setarray .@xy[0],126,292;
  2538. setarray .@item[0],725,6652; // Red_Jewel, Old_Photo_Album
  2539. break;
  2540. case 15:
  2541. setarray .@xy[0],150,162;
  2542. setarray .@item[0],726,6653; // Blue_Jewel, Shabby_Pill
  2543. break;
  2544. case 16:
  2545. setarray .@xy[0],169,206;
  2546. setarray .@item[0],727,22507; // White_Jewel, ShabbyOldScroll
  2547. break;
  2548. case 17:
  2549. setarray .@xy[0],262,220;
  2550. setarray .@item[0],718,6650; // Dark_Red_Jewel, Shabby_Ring
  2551. break;
  2552. case 18:
  2553. setarray .@xy[0],218,350;
  2554. setarray .@item[0],719,6651; // Violet_Jewel, Rusty_Bracelet
  2555. break;
  2556. case 19:
  2557. setarray .@xy[0],304,263;
  2558. setarray .@item[0],720,6652; // Skyblue_Jewel, Old_Photo_Album
  2559. break;
  2560. case 20:
  2561. setarray .@xy[0],302,151;
  2562. setarray .@item[0],721,6653; // Azure_Jewel, Shabby_Pill
  2563. break;
  2564. case 21:
  2565. setarray .@xy[0],305,63;
  2566. setarray .@item[0],722,22507; // Scarlet_Jewel, ShabbyOldScroll
  2567. break;
  2568. case 22:
  2569. setarray .@xy[0],234,66;
  2570. setarray .@item[0],725,6650; // Red_Jewel, Shabby_Ring
  2571. break;
  2572. case 23:
  2573. setarray .@xy[0],218,89;
  2574. setarray .@item[0],726,6651; // Blue_Jewel, Rusty_Bracelet
  2575. break;
  2576. case 24:
  2577. setarray .@xy[0],233,99;
  2578. setarray .@item[0],727,6652; // White_Jewel, Old_Photo_Album
  2579. case 25:
  2580. setarray .@xy[0],280,158;
  2581. setarray .@item[0],718,6653; // Dark_Red_Jewel, Shabby_Pill
  2582. break;
  2583. case 26:
  2584. setarray .@xy[0],182,353;
  2585. setarray .@item[0],719,22507; // Violet_Jewel, ShabbyOldScroll
  2586. break;
  2587. case 27:
  2588. setarray .@xy[0],43,220;
  2589. setarray .@item[0],720,6650; // Skyblue_Jewel, Shabby_Ring
  2590. break;
  2591. }
  2592. setarray .@max[1],
  2593. 5,4,6,3,7,4,3,5,5,4,6,3,7,4,3,
  2594. 5,5,4,6,3,7,4,3,5,5,4,6;
  2595. .@idnum = rand(1,.@max[.@val]);
  2596. for ( .@i = 0; .@i < .@idnum; ++.@i ) {
  2597. .@idx = rand(.@xy[0],.@xy[0]+4);
  2598. .@idy = rand(.@xy[1],.@xy[1]+4);
  2599. makeitem .@item[0],1,'map_name$,.@idx,.@idy;
  2600. }
  2601. makeitem .@item[1],1,'map_name$,.@xy[0]+2,.@xy[1]+3;
  2602. if (rand(1,1000) > 400)
  2603. makeitem 6648,1,'map_name$,.@xy[0]+1,.@xy[1]+2; // Shabby_Crown
  2604. if (rand(1,1000) > 700)
  2605. makeitem 7228,1,'map_name$,.@xy[0]+2,.@xy[1]+2; // Gold_Bullion
  2606. if (rand(1,1000) > 900)
  2607. makeitem 7229,1,'map_name$,.@xy[0]+3,.@xy[1]+2; // Silver_Bullion
  2608. stopnpctimer;
  2609. end;
  2610. OnInstanceInit:
  2611. hideonnpc instance_npcname(strnpcinfo(0));
  2612. end;
  2613. }
  2614. 1@face,164,343,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#2 4_TREASURE_BOX
  2615. 1@face,31,364,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#3 4_TREASURE_BOX
  2616. 1@face,26,290,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#4 4_TREASURE_BOX
  2617. 1@face,56,269,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#5 4_TREASURE_BOX
  2618. 1@face,80,213,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#6 4_TREASURE_BOX
  2619. 1@face,51,174,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#7 4_TREASURE_BOX
  2620. 1@face,261,62,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#8 4_TREASURE_BOX
  2621. 1@face,70,36,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#9 4_TREASURE_BOX
  2622. 1@face,182,51,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#10 4_TREASURE_BOX
  2623. 1@face,128,139,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#11 4_TREASURE_BOX
  2624. 1@face,108,232,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#12 4_TREASURE_BOX
  2625. 1@face,117,303,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#13 4_TREASURE_BOX
  2626. 1@face,134,294,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#14 4_TREASURE_BOX
  2627. 1@face,152,159,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#15 4_TREASURE_BOX
  2628. 1@face,177,208,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#16 4_TREASURE_BOX
  2629. 1@face,260,220,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#17 4_TREASURE_BOX
  2630. 1@face,216,357,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#18 4_TREASURE_BOX
  2631. 1@face,310,263,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#19 4_TREASURE_BOX
  2632. 1@face,307,158,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#20 4_TREASURE_BOX
  2633. 1@face,307,56,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#21 4_TREASURE_BOX
  2634. 1@face,240,64,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#22 4_TREASURE_BOX
  2635. 1@face,214,90,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#23 4_TREASURE_BOX
  2636. 1@face,237,108,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#24 4_TREASURE_BOX
  2637. 1@face,284,165,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#25 4_TREASURE_BOX
  2638. 1@face,184,363,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#26 4_TREASURE_BOX
  2639. 1@face,48,220,3 duplicate(Merchant Prince's Box#1) Merchant Prince's Box#27 4_TREASURE_BOX
  2640. // Instance GM Function :: in_face_ad
  2641. //==========================================
  2642. 1@face,1,1,3 script #forestspirit1 CLEAR_NPC,{
  2643. if (callfunc("F_GM_NPC",1854,0) == 1) {
  2644. mes "[Time Manager]";
  2645. mes "What time would you like to return?";
  2646. next;
  2647. switch( select("Cancel:1st Stage Start:2nd Stage Start:3rd Stage Start:4th Stage Start:Boss Start:Treasures")) {
  2648. case 1:
  2649. break;
  2650. case 2:
  2651. hideonnpc instance_npcname("Chaos#0");
  2652. hideonnpc instance_npcname("Iris#0");
  2653. donpcevent instance_npcname("#fwormcontrol1") + "::OnStart";
  2654. mapannounce 'map_name$, "Faceworm time attack has started. Faster kill times gives a higher percentage of rewards.",bc_map,"0xffffff";
  2655. donpcevent instance_npcname("#globaltimer22") + "::OnT_s";
  2656. donpcevent instance_npcname("#fwormprize1") + "::OnStart";
  2657. warp 'map_name$,110,348;
  2658. break;
  2659. case 3:
  2660. enablenpc instance_npcname("#fwormenter1");
  2661. enablenpc instance_npcname("#fwormexit1");
  2662. hideoffnpc instance_npcname("Chaos#1");
  2663. hideoffnpc instance_npcname("Iris#1");
  2664. mapannounce 'map_name$, "A hole appears after killing the dark faceworm.",bc_map,"0xffffff";
  2665. warp 'map_name$,127,95;
  2666. break;
  2667. case 4:
  2668. enablenpc instance_npcname("#fwormenter2");
  2669. enablenpc instance_npcname("#fwormexit2");
  2670. hideoffnpc instance_npcname("Chaos#2");
  2671. hideoffnpc instance_npcname("Iris#2");
  2672. mapannounce 'map_name$, "You hear something loud in the south. It must be the nest of the one we just got rid of.",bc_map,"0xffffff";
  2673. warp 'map_name$,156,117;
  2674. break;
  2675. case 5:
  2676. enablenpc instance_npcname("#fwormenter3");
  2677. enablenpc instance_npcname("#fwormexit3");
  2678. enablenpc instance_npcname("#chaoson");
  2679. mapannounce 'map_name$, "You hear the pile of stones collapsing. This might be a gateway to go to other spaces.",bc_map,"0xffffff";
  2680. warp 'map_name$,261,170;
  2681. break;
  2682. case 6:
  2683. enablenpc instance_npcname("#fwormenter4");
  2684. enablenpc instance_npcname("#fwormexit4");
  2685. hideoffnpc instance_npcname("Chaos#4");
  2686. hideoffnpc instance_npcname("Iris#4");
  2687. enablenpc instance_npcname("#chaoson2");
  2688. mapannounce 'map_name$, "You hear the pile of stones collapsing. I think another gateway is found.",bc_map,"0xffffff";
  2689. warp 'map_name$,210,145;
  2690. break;
  2691. case 7:
  2692. hideoffnpc instance_npcname("#fwormprize5");
  2693. donpcevent instance_npcname("#fwormprize5") + "::OnStart";
  2694. warp 'map_name$,210,145;
  2695. break;
  2696. }
  2697. }
  2698. close;
  2699. }
  2700. 1@face,3,1,3 script #forestspiritboss1 CLEAR_NPC,{
  2701. mes "" + getmapusers('map_name$) + " people.";
  2702. if (callfunc("F_GM_NPC",1854,0) == 1) {
  2703. mes "[Boss Manager]";
  2704. mes "What time would you like to return?";
  2705. next;
  2706. switch( select("Cancel:1st Boss:2nd Boss:3rd Boss:4th Boss:Final Boss")) {
  2707. case 1:
  2708. break;
  2709. case 2:
  2710. hideonnpc instance_npcname("Chaos#0");
  2711. hideonnpc instance_npcname("Iris#0");
  2712. donpcevent instance_npcname("#fwormboss1") + "::OnStart";
  2713. donpcevent instance_npcname("#globaltimer22") + "::OnT_s";
  2714. donpcevent instance_npcname("#fwormprize1") + "::OnStart";
  2715. warp 'map_name$,140,70;
  2716. break;
  2717. case 3:
  2718. donpcevent instance_npcname("#fwormboss2") + "::OnStart";
  2719. donpcevent instance_npcname("#fwormprize2") + "::OnStart";
  2720. warp 'map_name$,160,270;
  2721. break;
  2722. case 4:
  2723. donpcevent instance_npcname("#fwormboss3") + "::OnStart";
  2724. donpcevent instance_npcname("#fwormprize3") + "::OnStart";
  2725. warp 'map_name$,270,300;
  2726. break;
  2727. case 5:
  2728. donpcevent instance_npcname("#fwormboss4") + "::OnStart";
  2729. donpcevent instance_npcname("#fwormprize4") + "::OnStart";
  2730. warp 'map_name$,210,105;
  2731. break;
  2732. case 6:
  2733. donpcevent instance_npcname("#fwormboss5") + "::OnStart";
  2734. donpcevent instance_npcname("#fwormprize5") + "::OnStart";
  2735. warp 'map_name$,214,148;
  2736. break;
  2737. }
  2738. }
  2739. close;
  2740. OnInstanceInit:
  2741. 'map_name$ = instance_mapname("1@face");
  2742. monster 'map_name$,0,0,"Greatest General",1277,50;
  2743. monster 'map_name$,0,0,"Beetle King",1494,25;
  2744. monster 'map_name$,0,0,"Savage",1166,25;
  2745. end;
  2746. }