halloween_2009.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. //===== rAthena Script =======================================
  2. //= iRO Halloween (2009)
  3. //===== By: ==================================================
  4. //= Kisuka
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= rAthena SVN
  9. //===== Description: =========================================
  10. //= iRO Halloween (2009)
  11. //= Quest for Weird Pumpkin Hat.
  12. //= Exchange treats for buffs.
  13. //= Summon event monsters in towns.
  14. //===== Notes: ===============================================
  15. //= You must enable the event items in item_db2.
  16. //= You must enable the event mobs in mob_db2, mob_avail, and
  17. //= their skills in mob_skill_db2.
  18. //===== Additional Comments: =================================
  19. //= 1.0 First version. [Kisuka]
  20. //= 1.1 Fixed even exploit, fixed mobs overlap. [Lupus]
  21. //============================================================
  22. // Headgear Quest - Pumpkin Hat
  23. // ============================
  24. prontera,152,192,5 script Pumpkin Hat Researcher 712,{
  25. if(BaseLevel < 45) {
  26. mes "[Pumpkin Hat Researcher]";
  27. mes "Shoo, I don't need a child. Shoo! I don't talk to novices.";
  28. next;
  29. mes "[Pumpkin Hat Researcher]";
  30. mes "Go reach a level that can fight with stronger monsters and come back.";
  31. close;
  32. }
  33. mes "[Pumpkin Hat Researcher]";
  34. mes "Say do you like Pumpkin Pies?";
  35. next;
  36. mes "[Pumpkin Hat Researcher]";
  37. mes "I'm a Pumpkin Hat researcher, Why don't you listen to my story?";
  38. next;
  39. while(1) {
  40. switch(select("Listen to the story.:Ask about Pumpkin Hat.:Get a Pumpkin Hat.:Stop the conversation.")) {
  41. case 1:
  42. mes "[Pumpkin Hat Researcher]";
  43. mes "I've been studying about an upgraded Pumpkin Hat.";
  44. mes "I have discovered that it is a very simple process.";
  45. next;
  46. mes "[Pumpkin Hat Researcher]";
  47. mes "The process is quite simple.";
  48. mes "If you bring me ^4a4aff20 Jack o' Pumpkin^000000 I can show you.";
  49. mes "Isn't that a tempting proposal?";
  50. next;
  51. break;
  52. case 2:
  53. mes "[Pumpkin Hat Researcher]";
  54. mes "This upgraded pumpkin hat is powerful stuff!";
  55. next;
  56. mes "[Pumpkin Hat Researcher]";
  57. mes "It can make a Pumpkin Pie that restores a large percentage of HP & SP using condensed energy to the person who wears it.";
  58. next;
  59. mes "[Pumpkin Hat Researcher]";
  60. mes "All you need is ^4a4aff20 Jack o' Pumpkin^000000s.";
  61. next;
  62. break;
  63. case 3:
  64. mes "[Pumpkin Hat Researcher]";
  65. mes "Do you want to get Pumpkin Pies? Okay, let me count the Jack o' Pumpkins you've brought.";
  66. next;
  67. if(countitem(1062) < 20) {
  68. mes "[Pumpkin Hat Researcher]";
  69. mes "I need ^4a4aff20 Jack o' Pumpkin^000000.";
  70. mes "I'm not an alchemist or a wizard to create something from nothing.";
  71. next;
  72. mes "[Pumpkin Hat Researcher]";
  73. mes "Okay, go hunting monsters and come back.";
  74. mes "I'm going to stay here for a while so take your time.";
  75. next;
  76. break;
  77. }else{
  78. mes "[Pumpkin Hat Researcher]";
  79. mes "I hope this will be useful to you. Don't forget to wear it while fighting to get your Pumpkin Pies.";
  80. delitem 1062,20; // Jack o' Pumpkin
  81. getitem 5668,1; // Weird Pumpkin Hat
  82. next;
  83. mes "[Pumpkin Hat Researcher]";
  84. mes "I guess that I should get back to my research.";
  85. close;
  86. }
  87. case 4:
  88. mes "[Pumpkin Hat Researcher]";
  89. mes "Bye, until we'll see each other again.";
  90. mes "I wish you well...";
  91. close;
  92. }
  93. }
  94. }
  95. // Buffs - Trick or Treaters
  96. // =========================
  97. - script Trick or Treater::09Treats 706,2,2,{
  98. OnTouch:
  99. hideoffnpc strnpcinfo(3);
  100. initnpctimer;
  101. mes "[Trick or Treater]";
  102. mes "Hooray! hooray! Hooray!";
  103. mes "Trick or Treat?";
  104. next;
  105. if(select("Trick.:Treat.") == 1) {
  106. mes "[Trick or Treater]";
  107. mes "!!!!";
  108. mes "Fine. I have no choice but to trick you back!";
  109. sc_start SC_Stun,5000,0;
  110. close;
  111. }
  112. mes "[Trick or Treater]";
  113. mes "Oh yay! What kind of treat do you have?";
  114. next;
  115. switch(select("Candy:Candy Cane:Well-baked Cookie:Nothing")) {
  116. case 1:
  117. if(countitem(529) > 0) {
  118. mes "[Trick or Treater]";
  119. mes "Yay thank you!";
  120. mes "Here, take this for being so nice!";
  121. sc_start SC_STRFood, 1800000, 5;
  122. sc_start SC_INTFood, 1800000, 5;
  123. sc_start SC_VITFood, 1800000, 5;
  124. sc_start SC_AGIFood, 1800000, 5;
  125. sc_start SC_DEXFood, 1800000, 5;
  126. sc_start SC_LUKFood, 1800000, 5;
  127. sc_start SC_FLEEFOOD, 1800000, 15;
  128. delitem 529,1; // Candy
  129. close;
  130. }else{
  131. mes "[Trick or Treater]";
  132. mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
  133. mes "Fine. I have no choice but to trick you!";
  134. sc_start SC_Stun,5000,0;
  135. close;
  136. }
  137. case 2:
  138. if(countitem(530) > 0) {
  139. mes "[Trick or Treater]";
  140. mes "Yay thank you!";
  141. mes "Here, take this for being so nice!";
  142. sc_start SC_STRFood, 1800000, 5;
  143. sc_start SC_INTFood, 1800000, 5;
  144. sc_start SC_VITFood, 1800000, 5;
  145. sc_start SC_AGIFood, 1800000, 5;
  146. sc_start SC_DEXFood, 1800000, 5;
  147. sc_start SC_LUKFood, 1800000, 5;
  148. sc_start SC_FLEEFOOD, 1800000, 15;
  149. delitem 530,1; // Candy Cane
  150. close;
  151. }else{
  152. mes "[Trick or Treater]";
  153. mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
  154. mes "Fine. I have no choice but to trick you!";
  155. sc_start SC_Stun,5000,0;
  156. close;
  157. }
  158. case 3:
  159. if(countitem(538) > 0) {
  160. mes "[Trick or Treater]";
  161. mes "Yay thank you!";
  162. mes "Here, take this for being so nice!";
  163. sc_start SC_STRFood, 1800000, 5;
  164. sc_start SC_INTFood, 1800000, 5;
  165. sc_start SC_VITFood, 1800000, 5;
  166. sc_start SC_AGIFood, 1800000, 5;
  167. sc_start SC_DEXFood, 1800000, 5;
  168. sc_start SC_LUKFood, 1800000, 5;
  169. sc_start SC_FLEEFOOD, 1800000, 15;
  170. delitem 538,1; // Well-baked Cookie
  171. close;
  172. }else{
  173. mes "[Trick or Treater]";
  174. mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
  175. mes "Fine. I have no choice but to trick you!";
  176. sc_start SC_Stun,5000,0;
  177. close;
  178. }
  179. case 4:
  180. mes "[Trick or Treater]";
  181. mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
  182. mes "Fine. I have no choice but to trick you!";
  183. sc_start SC_Stun,5000,0;
  184. close;
  185. }
  186. OnInit:
  187. hideonnpc "Trick or Treater#iRO1";
  188. hideonnpc "Trick or Treater#iRO2";
  189. hideonnpc "Trick or Treater#iRO3";
  190. hideonnpc "Trick or Treater#iRO4";
  191. hideonnpc "Trick or Treater#iRO5";
  192. hideonnpc "Trick or Treater#iRO6";
  193. hideonnpc "Trick or Treater#iRO7";
  194. hideonnpc "Trick or Treater#iRO8";
  195. end;
  196. OnEnableTreat:
  197. enablenpc strnpcinfo(3);
  198. hideonnpc strnpcinfo(3);
  199. end;
  200. OnTimer15000:
  201. hideonnpc strnpcinfo(3);
  202. disablenpc strnpcinfo(3);
  203. end;
  204. OnTimer300000:
  205. donpcevent strnpcinfo(3)+"::OnEnableTreat";
  206. stopnpctimer;
  207. end;
  208. }
  209. prontera,151,173,5 duplicate(09Treats) Trick or Treater#iRO1 706,2,2
  210. prontera,270,350,5 duplicate(09Treats) Trick or Treater#iRO2 706,2,2
  211. prontera,234,310,5 duplicate(09Treats) Trick or Treater#iRO3 706,2,2
  212. prontera,156,321,5 duplicate(09Treats) Trick or Treater#iRO4 706,2,2
  213. prontera,156,283,5 duplicate(09Treats) Trick or Treater#iRO5 706,2,2
  214. prontera,142,214,5 duplicate(09Treats) Trick or Treater#iRO6 706,2,2
  215. prontera,134,125,5 duplicate(09Treats) Trick or Treater#iRO7 706,2,2
  216. prontera,220,72,5 duplicate(09Treats) Trick or Treater#iRO8 706,2,2
  217. // Monster Summoning - Halloween Wizard
  218. // ====================================
  219. - script Halloween Wizard#iRO09::09HallowWiz 737,{
  220. mes "[Halloween Wizard]";
  221. mes "...";
  222. mes "Do you want to play a trick on someone?";
  223. next;
  224. while(1) {
  225. switch(select("What trick?:Sure:No.")) {
  226. case 1:
  227. mes "[Halloween Wizard]";
  228. mes "I can summon monsters in other parts of the world with just a few materials.";
  229. next;
  230. mes "[Halloween Wizard]";
  231. mes "Sounds interesting huh?";
  232. next;
  233. mes "[Halloween Wizard]";
  234. mes "If you bring me Fabric, Jack o' Pumpkins, Worn Fabric, or Crushed Pumpkins I can summon the monsters.";
  235. next;
  236. break;
  237. case 2:
  238. mes "[Halloween Wizard]";
  239. mes "Which town do you want to play a trick on?";
  240. next;
  241. getmapxy(.@mapname$,.@mapx,.@mapy,0,""+strcharinfo(0)+"");
  242. if (.@mapname$ == "prontera") {
  243. switch(select("Geffen:Payon:Alberta:Aldebaran")) {
  244. case 1:
  245. set .@HallowTown,3;
  246. break;
  247. case 2:
  248. set .@HallowTown,2;
  249. break;
  250. case 3:
  251. set .@HallowTown,4;
  252. break;
  253. case 4:
  254. set .@HallowTown,5;
  255. break;
  256. }
  257. }
  258. else if (.@mapname$ == "payon") {
  259. switch(select("Prontera:Geffen:Alberta:Aldebaran")) {
  260. case 1:
  261. set .@HallowTown,1;
  262. break;
  263. case 2:
  264. set .@HallowTown,3;
  265. break;
  266. case 3:
  267. set .@HallowTown,4;
  268. break;
  269. case 4:
  270. set .@HallowTown,5;
  271. break;
  272. }
  273. }
  274. else if (.@mapname$ == "geffen") {
  275. switch(select("Prontera:Payon:Alberta:Aldebaran")) {
  276. case 1:
  277. set .@HallowTown,1;
  278. break;
  279. case 2:
  280. set .@HallowTown,2;
  281. break;
  282. case 3:
  283. set .@HallowTown,4;
  284. break;
  285. case 4:
  286. set .@HallowTown,5;
  287. break;
  288. }
  289. }
  290. else if (.@mapname$ == "alberta") {
  291. switch(select("Prontera:Geffen:Payon:Aldebaran")) {
  292. case 1:
  293. set .@HallowTown,1;
  294. break;
  295. case 2:
  296. set .@HallowTown,3;
  297. break;
  298. case 3:
  299. set .@HallowTown,2;
  300. break;
  301. case 4:
  302. set .@HallowTown,5;
  303. break;
  304. }
  305. }
  306. else if (.@mapname$ == "aldebaran") {
  307. switch(select("Prontera:Geffen:Payon:Alberta")) {
  308. case 1:
  309. set .@HallowTown,1;
  310. break;
  311. case 2:
  312. set .@HallowTown,3;
  313. break;
  314. case 3:
  315. set .@HallowTown,2;
  316. break;
  317. case 4:
  318. set .@HallowTown,4;
  319. break;
  320. }
  321. }
  322. setarray .@HallowTowns$[1],"prontera","payon","geffen","alberta","aldebaran";
  323. mes "[Halloween Wizard]";
  324. mes "Ok then let's go to the next step.";
  325. next;
  326. mes "[Halloween Wizard]";
  327. mes "How many Fabrics or Jack o' Pumpkins do you want to use? Don't go over 100 because that is the max amount that I can use.";
  328. next;
  329. input .@input;
  330. if (.@input == 0) {
  331. mes "[Halloween Wizard]";
  332. mes "You have no definite idea.";
  333. mes "It's not a big deal.";
  334. mes "Let me know.";
  335. next;
  336. break;
  337. }
  338. else if (.@input > 100) {
  339. mes "[Halloween Wizard]";
  340. mes "I told you that it must be between 1 to 100!";
  341. mes "You didn't pay attention!";
  342. next;
  343. break;
  344. }
  345. else {
  346. set .@fabric,countitem(1059);
  347. set .@jack,countitem(1062);
  348. set .@worn,countitem(6299);
  349. set .@crushed,countitem(6298);
  350. set .@whispers,0;
  351. set .@darklords,0;
  352. set .@total,.@fabric + .@jack + .@worn + .@crushed;
  353. if(.@total < .@input) {
  354. mes "[Halloween Wizard]";
  355. mes "Recount the number of items you have and tell me the total.";
  356. mes "Huhuhuhuhuhu...";
  357. next;
  358. break;
  359. }
  360. if(.@fabric > 0) {
  361. if(.@fabric >= .@input) {
  362. delitem 1059,.@input;
  363. set .@whispers,.@whispers+.@input;
  364. set .@input,0;
  365. }
  366. else{
  367. delitem 1059,.@fabric;
  368. set .@input,.@input - .@fabric;
  369. set .@whispers,.@whispers+.@fabric;
  370. }
  371. }
  372. if(.@worn > 0 && .@input != 0) {
  373. if(.@worn >= .@input) {
  374. delitem 6299,.@input;
  375. set .@whispers,.@whispers+.@input;
  376. set .@input,0;
  377. }
  378. else{
  379. delitem 6299,.@worn;
  380. set .@input,.@input - .@worn;
  381. set .@whispers,.@whispers+.@worn;
  382. }
  383. }
  384. if(.@jack > 0 && .@input != 0) {
  385. if(.@jack >= .@input) {
  386. delitem 1062,.@input;
  387. set .@darklords,.@darklords+.@input;
  388. set .@input,0;
  389. }
  390. else{
  391. delitem 1062,.@jack;
  392. set .@input,.@input - .@jack;
  393. set .@darklords,.@darklords+.@jack;
  394. }
  395. }
  396. if(.@crushed > 0 && .@input != 0) {
  397. if(.@crushed >= .@input) {
  398. delitem 6298,.@input;
  399. set .@darklords,.@darklords+.@input;
  400. set .@input,0;
  401. }
  402. else{
  403. delitem 6298,.@crushed;
  404. set .@input,.@input - .@crushed;
  405. set .@darklords,.@darklords+.@crushed;
  406. }
  407. }
  408. if (.@input > 0) {
  409. mes "Theres a problem.";
  410. close;
  411. }
  412. monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Whisper",3014,.@whispers;
  413. monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Dark Lord",3015,.@darklords;
  414. mes "[Halloween Wizard]";
  415. mes "Here's what you wanted.";
  416. mes "Imagine what the people must be thinking in the other villages?";
  417. mes "Muahahaha";
  418. close;
  419. }
  420. case 3:
  421. mes "[Halloween Wizard]";
  422. mes "If you change your mind, come back here...";
  423. mes "I'll stay here for a while...";
  424. mes "Kkkk...";
  425. close;
  426. }
  427. }
  428. }
  429. prontera,156,195,5 duplicate(09HallowWiz) Halloween Wizard#1 737
  430. geffen,133,122,5 duplicate(09HallowWiz) Halloween Wizard#2 737
  431. payon,156,196,5 duplicate(09HallowWiz) Halloween Wizard#3 737
  432. alberta,96,57,5 duplicate(09HallowWiz) Halloween Wizard#4 737
  433. aldebaran,146,122,5 duplicate(09HallowWiz) Halloween Wizard#5 737