From 8a4bf716002a017de77fe7df301ef8e4aaf00a2e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 11:00:49 -0300 Subject: Initial commit --- maps/pre-re/000-1.mcache | Bin 0 -> 1538 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 maps/pre-re/000-1.mcache (limited to 'maps/pre-re/000-1.mcache') diff --git a/maps/pre-re/000-1.mcache b/maps/pre-re/000-1.mcache new file mode 100644 index 00000000..c01cb3d4 Binary files /dev/null and b/maps/pre-re/000-1.mcache differ -- cgit v1.2.3-70-g09d2 From cf18ce071c79ae37e14ea38943e0b1d88da70a7b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 13:33:57 -0300 Subject: Override --- conf/map/maps.conf | 287 ++--- db/constants.conf | 552 +++++++++ db/map_index.txt | 301 ++--- maps/pre-re/000-0-0.mcache | Bin 58 -> 0 bytes maps/pre-re/000-0-1.mcache | Bin 58 -> 0 bytes maps/pre-re/000-0.mcache | Bin 58 -> 0 bytes maps/pre-re/000-1.mcache | Bin 1538 -> 63 bytes maps/pre-re/000-2-0.mcache | Bin 87 -> 0 bytes maps/pre-re/000-2-1.mcache | Bin 223 -> 0 bytes maps/pre-re/000-2-2.mcache | Bin 155 -> 0 bytes maps/pre-re/000-2-3.mcache | Bin 88 -> 0 bytes maps/pre-re/000-2-4.mcache | Bin 132 -> 0 bytes maps/pre-re/001-1.mcache | Bin 3203 -> 930 bytes maps/pre-re/001-2-0.mcache | Bin 118 -> 0 bytes maps/pre-re/001-2-1.mcache | Bin 134 -> 0 bytes maps/pre-re/001-2-10.mcache | Bin 155 -> 0 bytes maps/pre-re/001-2-11.mcache | Bin 136 -> 0 bytes maps/pre-re/001-2-12.mcache | Bin 109 -> 0 bytes maps/pre-re/001-2-13.mcache | Bin 97 -> 0 bytes maps/pre-re/001-2-14.mcache | Bin 97 -> 0 bytes maps/pre-re/001-2-15.mcache | Bin 119 -> 0 bytes maps/pre-re/001-2-16.mcache | Bin 96 -> 0 bytes maps/pre-re/001-2-17.mcache | Bin 87 -> 0 bytes maps/pre-re/001-2-18.mcache | Bin 160 -> 0 bytes maps/pre-re/001-2-19.mcache | Bin 170 -> 0 bytes maps/pre-re/001-2-2.mcache | Bin 106 -> 0 bytes maps/pre-re/001-2-20.mcache | Bin 102 -> 0 bytes maps/pre-re/001-2-21.mcache | Bin 87 -> 0 bytes maps/pre-re/001-2-22.mcache | Bin 227 -> 0 bytes maps/pre-re/001-2-23.mcache | Bin 155 -> 0 bytes maps/pre-re/001-2-24.mcache | Bin 89 -> 0 bytes maps/pre-re/001-2-25.mcache | Bin 95 -> 0 bytes maps/pre-re/001-2-26.mcache | Bin 88 -> 0 bytes maps/pre-re/001-2-27.mcache | Bin 115 -> 0 bytes maps/pre-re/001-2-28.mcache | Bin 161 -> 0 bytes maps/pre-re/001-2-29.mcache | Bin 128 -> 0 bytes maps/pre-re/001-2-3.mcache | Bin 96 -> 0 bytes maps/pre-re/001-2-30.mcache | Bin 141 -> 0 bytes maps/pre-re/001-2-31.mcache | Bin 89 -> 0 bytes maps/pre-re/001-2-32.mcache | Bin 74 -> 0 bytes maps/pre-re/001-2-33.mcache | Bin 150 -> 0 bytes maps/pre-re/001-2-34.mcache | Bin 76 -> 0 bytes maps/pre-re/001-2-35.mcache | Bin 114 -> 0 bytes maps/pre-re/001-2-36.mcache | Bin 125 -> 0 bytes maps/pre-re/001-2-37.mcache | Bin 135 -> 0 bytes maps/pre-re/001-2-38.mcache | Bin 140 -> 0 bytes maps/pre-re/001-2-39.mcache | Bin 128 -> 0 bytes maps/pre-re/001-2-4.mcache | Bin 165 -> 0 bytes maps/pre-re/001-2-40.mcache | Bin 223 -> 0 bytes maps/pre-re/001-2-41.mcache | Bin 108 -> 0 bytes maps/pre-re/001-2-42.mcache | Bin 146 -> 0 bytes maps/pre-re/001-2-43.mcache | Bin 122 -> 0 bytes maps/pre-re/001-2-5.mcache | Bin 90 -> 0 bytes maps/pre-re/001-2-6.mcache | Bin 182 -> 0 bytes maps/pre-re/001-2-7.mcache | Bin 130 -> 0 bytes maps/pre-re/001-2-8.mcache | Bin 115 -> 0 bytes maps/pre-re/001-2-9.mcache | Bin 120 -> 0 bytes maps/pre-re/001-2.mcache | Bin 0 -> 453 bytes maps/pre-re/001-3-0.mcache | Bin 1593 -> 0 bytes maps/pre-re/001-3-1.mcache | Bin 159 -> 0 bytes maps/pre-re/001-3-2.mcache | Bin 351 -> 0 bytes maps/pre-re/001-3.mcache | Bin 0 -> 527 bytes maps/pre-re/002-1.mcache | Bin 0 -> 1003 bytes maps/pre-re/002-2.mcache | Bin 0 -> 579 bytes maps/pre-re/002-3.mcache | Bin 0 -> 322 bytes maps/pre-re/002-4.mcache | Bin 0 -> 512 bytes maps/pre-re/002-5.mcache | Bin 0 -> 481 bytes maps/pre-re/003-1.mcache | Bin 0 -> 456 bytes maps/pre-re/003-4.mcache | Bin 0 -> 969 bytes maps/pre-re/004-1.mcache | Bin 0 -> 556 bytes maps/pre-re/004-3.mcache | Bin 0 -> 449 bytes maps/pre-re/004-4.mcache | Bin 0 -> 493 bytes maps/pre-re/004-5.mcache | Bin 0 -> 402 bytes maps/pre-re/005-3.mcache | Bin 0 -> 782 bytes maps/pre-re/006-1.mcache | Bin 0 -> 1097 bytes maps/pre-re/006-2.mcache | Bin 0 -> 389 bytes maps/pre-re/006-3.mcache | Bin 0 -> 1090 bytes maps/pre-re/007-1.mcache | Bin 0 -> 796 bytes maps/pre-re/007-2.mcache | Bin 0 -> 111 bytes maps/pre-re/008-1-1.mcache | Bin 2022 -> 0 bytes maps/pre-re/008-1.mcache | Bin 6937 -> 801 bytes maps/pre-re/008-2-0.mcache | Bin 123 -> 0 bytes maps/pre-re/008-2-1.mcache | Bin 143 -> 0 bytes maps/pre-re/008-2-10.mcache | Bin 107 -> 0 bytes maps/pre-re/008-2-11.mcache | Bin 115 -> 0 bytes maps/pre-re/008-2-12.mcache | Bin 74 -> 0 bytes maps/pre-re/008-2-13.mcache | Bin 99 -> 0 bytes maps/pre-re/008-2-14.mcache | Bin 96 -> 0 bytes maps/pre-re/008-2-15.mcache | Bin 93 -> 0 bytes maps/pre-re/008-2-16.mcache | Bin 108 -> 0 bytes maps/pre-re/008-2-17.mcache | Bin 204 -> 0 bytes maps/pre-re/008-2-18.mcache | Bin 206 -> 0 bytes maps/pre-re/008-2-19.mcache | Bin 148 -> 0 bytes maps/pre-re/008-2-2.mcache | Bin 119 -> 0 bytes maps/pre-re/008-2-20.mcache | Bin 121 -> 0 bytes maps/pre-re/008-2-21.mcache | Bin 98 -> 0 bytes maps/pre-re/008-2-22.mcache | Bin 91 -> 0 bytes maps/pre-re/008-2-23.mcache | Bin 180 -> 0 bytes maps/pre-re/008-2-24.mcache | Bin 117 -> 0 bytes maps/pre-re/008-2-25.mcache | Bin 126 -> 0 bytes maps/pre-re/008-2-26.mcache | Bin 95 -> 0 bytes maps/pre-re/008-2-27.mcache | Bin 88 -> 0 bytes maps/pre-re/008-2-28.mcache | Bin 74 -> 0 bytes maps/pre-re/008-2-29.mcache | Bin 79 -> 0 bytes maps/pre-re/008-2-3.mcache | Bin 130 -> 0 bytes maps/pre-re/008-2-30.mcache | Bin 90 -> 0 bytes maps/pre-re/008-2-31.mcache | Bin 97 -> 0 bytes maps/pre-re/008-2-32.mcache | Bin 126 -> 0 bytes maps/pre-re/008-2-4.mcache | Bin 114 -> 0 bytes maps/pre-re/008-2-5.mcache | Bin 81 -> 0 bytes maps/pre-re/008-2-6.mcache | Bin 82 -> 0 bytes maps/pre-re/008-2-7.mcache | Bin 83 -> 0 bytes maps/pre-re/008-2-8.mcache | Bin 105 -> 0 bytes maps/pre-re/008-2-9.mcache | Bin 91 -> 0 bytes maps/pre-re/008-3-0.mcache | Bin 3386 -> 0 bytes maps/pre-re/008-3-1.mcache | Bin 216 -> 0 bytes maps/pre-re/008-3-2.mcache | Bin 1162 -> 0 bytes maps/pre-re/008-3-3.mcache | Bin 284 -> 0 bytes maps/pre-re/008-3-4.mcache | Bin 1163 -> 0 bytes maps/pre-re/008-3-5.mcache | Bin 927 -> 0 bytes maps/pre-re/008-3-6.mcache | Bin 611 -> 0 bytes maps/pre-re/009-1.mcache | Bin 5338 -> 289 bytes maps/pre-re/009-2-0.mcache | Bin 112 -> 0 bytes maps/pre-re/009-2-1.mcache | Bin 141 -> 0 bytes maps/pre-re/009-2-10.mcache | Bin 95 -> 0 bytes maps/pre-re/009-2-11.mcache | Bin 92 -> 0 bytes maps/pre-re/009-2-12.mcache | Bin 67 -> 0 bytes maps/pre-re/009-2-13.mcache | Bin 98 -> 0 bytes maps/pre-re/009-2-14.mcache | Bin 103 -> 0 bytes maps/pre-re/009-2-15.mcache | Bin 101 -> 0 bytes maps/pre-re/009-2-16.mcache | Bin 65 -> 0 bytes maps/pre-re/009-2-17.mcache | Bin 66 -> 0 bytes maps/pre-re/009-2-18.mcache | Bin 62 -> 0 bytes maps/pre-re/009-2-2.mcache | Bin 87 -> 0 bytes maps/pre-re/009-2-3.mcache | Bin 163 -> 0 bytes maps/pre-re/009-2-4.mcache | Bin 151 -> 0 bytes maps/pre-re/009-2-5.mcache | Bin 165 -> 0 bytes maps/pre-re/009-2-6.mcache | Bin 64 -> 0 bytes maps/pre-re/009-2-7.mcache | Bin 66 -> 0 bytes maps/pre-re/009-2-8.mcache | Bin 70 -> 0 bytes maps/pre-re/009-2-9.mcache | Bin 84 -> 0 bytes maps/pre-re/009-2.mcache | Bin 0 -> 598 bytes maps/pre-re/009-3.mcache | Bin 0 -> 1126 bytes maps/pre-re/009-4.mcache | Bin 0 -> 616 bytes maps/pre-re/009-5.mcache | Bin 0 -> 222 bytes maps/pre-re/009-6.mcache | Bin 0 -> 140 bytes maps/pre-re/009-7.mcache | Bin 0 -> 216 bytes maps/pre-re/009-8.mcache | Bin 0 -> 703 bytes maps/pre-re/010-1.mcache | Bin 0 -> 1049 bytes maps/pre-re/010-2.mcache | Bin 0 -> 340 bytes maps/pre-re/011-1.mcache | Bin 0 -> 766 bytes maps/pre-re/011-3.mcache | Bin 0 -> 151 bytes maps/pre-re/011-4.mcache | Bin 0 -> 1125 bytes maps/pre-re/011-6.mcache | Bin 0 -> 2259 bytes maps/pre-re/012-1.mcache | Bin 1425 -> 1273 bytes maps/pre-re/012-2-1.mcache | Bin 121 -> 0 bytes maps/pre-re/012-2-2.mcache | Bin 99 -> 0 bytes maps/pre-re/012-2-3.mcache | Bin 120 -> 0 bytes maps/pre-re/012-2-4.mcache | Bin 143 -> 0 bytes maps/pre-re/012-2-5.mcache | Bin 121 -> 0 bytes maps/pre-re/012-2-6.mcache | Bin 111 -> 0 bytes maps/pre-re/012-2-7.mcache | Bin 91 -> 0 bytes maps/pre-re/012-3-1.mcache | Bin 230 -> 0 bytes maps/pre-re/012-3-2.mcache | Bin 205 -> 0 bytes maps/pre-re/012-3-3.mcache | Bin 503 -> 0 bytes maps/pre-re/012-3.mcache | Bin 0 -> 3820 bytes maps/pre-re/012-4.mcache | Bin 0 -> 4007 bytes maps/pre-re/013-1.mcache | Bin 0 -> 1028 bytes maps/pre-re/013-2.mcache | Bin 0 -> 142 bytes maps/pre-re/013-3.mcache | Bin 0 -> 1046 bytes maps/pre-re/014-1.mcache | Bin 0 -> 737 bytes maps/pre-re/014-3.mcache | Bin 0 -> 718 bytes maps/pre-re/015-1.mcache | Bin 0 -> 970 bytes maps/pre-re/015-3.mcache | Bin 0 -> 133 bytes maps/pre-re/016-1.mcache | Bin 0 -> 728 bytes maps/pre-re/016-2.mcache | Bin 0 -> 104 bytes maps/pre-re/017-1.mcache | Bin 0 -> 1303 bytes maps/pre-re/017-2.mcache | Bin 0 -> 80 bytes maps/pre-re/017-3.mcache | Bin 0 -> 482 bytes maps/pre-re/017-4.mcache | Bin 0 -> 435 bytes maps/pre-re/017-9.mcache | Bin 0 -> 96 bytes maps/pre-re/018-1.mcache | Bin 0 -> 1000 bytes maps/pre-re/018-2.mcache | Bin 0 -> 334 bytes maps/pre-re/018-3.mcache | Bin 0 -> 1635 bytes maps/pre-re/019-1.mcache | Bin 0 -> 595 bytes maps/pre-re/019-3.mcache | Bin 0 -> 657 bytes maps/pre-re/019-4.mcache | Bin 0 -> 407 bytes maps/pre-re/020-1.mcache | Bin 4793 -> 624 bytes maps/pre-re/020-2-0.mcache | Bin 94 -> 0 bytes maps/pre-re/020-2-1.mcache | Bin 88 -> 0 bytes maps/pre-re/020-2-10.mcache | Bin 71 -> 0 bytes maps/pre-re/020-2-11.mcache | Bin 64 -> 0 bytes maps/pre-re/020-2-12.mcache | Bin 64 -> 0 bytes maps/pre-re/020-2-13.mcache | Bin 64 -> 0 bytes maps/pre-re/020-2-14.mcache | Bin 80 -> 0 bytes maps/pre-re/020-2-15.mcache | Bin 79 -> 0 bytes maps/pre-re/020-2-16.mcache | Bin 75 -> 0 bytes maps/pre-re/020-2-17.mcache | Bin 65 -> 0 bytes maps/pre-re/020-2-18.mcache | Bin 67 -> 0 bytes maps/pre-re/020-2-19.mcache | Bin 65 -> 0 bytes maps/pre-re/020-2-2.mcache | Bin 68 -> 0 bytes maps/pre-re/020-2-20.mcache | Bin 80 -> 0 bytes maps/pre-re/020-2-21.mcache | Bin 65 -> 0 bytes maps/pre-re/020-2-22.mcache | Bin 81 -> 0 bytes maps/pre-re/020-2-23.mcache | Bin 64 -> 0 bytes maps/pre-re/020-2-24.mcache | Bin 64 -> 0 bytes maps/pre-re/020-2-25.mcache | Bin 70 -> 0 bytes maps/pre-re/020-2-26.mcache | Bin 140 -> 0 bytes maps/pre-re/020-2-27.mcache | Bin 77 -> 0 bytes maps/pre-re/020-2-28.mcache | Bin 78 -> 0 bytes maps/pre-re/020-2-29.mcache | Bin 72 -> 0 bytes maps/pre-re/020-2-3.mcache | Bin 79 -> 0 bytes maps/pre-re/020-2-30.mcache | Bin 62 -> 0 bytes maps/pre-re/020-2-31.mcache | Bin 70 -> 0 bytes maps/pre-re/020-2-32.mcache | Bin 70 -> 0 bytes maps/pre-re/020-2-33.mcache | Bin 70 -> 0 bytes maps/pre-re/020-2-34.mcache | Bin 149 -> 0 bytes maps/pre-re/020-2-4.mcache | Bin 67 -> 0 bytes maps/pre-re/020-2-5.mcache | Bin 80 -> 0 bytes maps/pre-re/020-2-6.mcache | Bin 74 -> 0 bytes maps/pre-re/020-2-7.mcache | Bin 63 -> 0 bytes maps/pre-re/020-2-8.mcache | Bin 65 -> 0 bytes maps/pre-re/020-2-9.mcache | Bin 75 -> 0 bytes maps/pre-re/020-2.mcache | Bin 0 -> 315 bytes maps/pre-re/020-3.mcache | Bin 0 -> 601 bytes maps/pre-re/021-3.mcache | Bin 0 -> 901 bytes maps/pre-re/023-1.mcache | Bin 0 -> 1173 bytes maps/pre-re/023-2.mcache | Bin 0 -> 86 bytes maps/pre-re/023-3.mcache | Bin 0 -> 884 bytes maps/pre-re/025-1.mcache | Bin 0 -> 1385 bytes maps/pre-re/025-3.mcache | Bin 0 -> 1249 bytes maps/pre-re/025-4.mcache | Bin 0 -> 1416 bytes maps/pre-re/026-1.mcache | Bin 0 -> 1484 bytes maps/pre-re/026-2.mcache | Bin 0 -> 422 bytes maps/pre-re/027-1.mcache | Bin 0 -> 1213 bytes maps/pre-re/027-2.mcache | Bin 0 -> 245 bytes maps/pre-re/027-3.mcache | Bin 0 -> 477 bytes maps/pre-re/027-4.mcache | Bin 0 -> 755 bytes maps/pre-re/027-5.mcache | Bin 0 -> 424 bytes maps/pre-re/027-6.mcache | Bin 0 -> 199 bytes maps/pre-re/027-7.mcache | Bin 0 -> 178 bytes maps/pre-re/027-8.mcache | Bin 0 -> 149 bytes maps/pre-re/028-1.mcache | Bin 0 -> 1112 bytes maps/pre-re/028-3.mcache | Bin 0 -> 352 bytes maps/pre-re/029-1.mcache | Bin 0 -> 873 bytes maps/pre-re/029-2.mcache | Bin 0 -> 340 bytes maps/pre-re/029-3.mcache | Bin 0 -> 190 bytes maps/pre-re/029-4.mcache | Bin 0 -> 365 bytes maps/pre-re/030-1.mcache | Bin 0 -> 442 bytes maps/pre-re/030-2.mcache | Bin 0 -> 580 bytes maps/pre-re/030-3.mcache | Bin 0 -> 502 bytes maps/pre-re/030-4.mcache | Bin 0 -> 173 bytes maps/pre-re/031-1.mcache | Bin 0 -> 680 bytes maps/pre-re/031-2.mcache | Bin 0 -> 98 bytes maps/pre-re/031-3.mcache | Bin 0 -> 3220 bytes maps/pre-re/031-4.mcache | Bin 0 -> 315 bytes maps/pre-re/032-3.mcache | Bin 0 -> 612 bytes maps/pre-re/033-1.mcache | Bin 0 -> 592 bytes maps/pre-re/034-1.mcache | Bin 0 -> 1319 bytes maps/pre-re/034-2.mcache | Bin 0 -> 115 bytes maps/pre-re/035-2.mcache | Bin 0 -> 110 bytes maps/pre-re/036-2.mcache | Bin 0 -> 110 bytes maps/pre-re/041-1.mcache | Bin 0 -> 406 bytes maps/pre-re/042-1.mcache | Bin 0 -> 692 bytes maps/pre-re/043-1.mcache | Bin 0 -> 605 bytes maps/pre-re/043-3.mcache | Bin 0 -> 702 bytes maps/pre-re/043-4.mcache | Bin 0 -> 1336 bytes maps/pre-re/045-1.mcache | Bin 0 -> 2578 bytes maps/pre-re/046-1.mcache | Bin 0 -> 1293 bytes maps/pre-re/046-3.mcache | Bin 0 -> 782 bytes maps/pre-re/047-1.mcache | Bin 0 -> 2436 bytes maps/pre-re/047-3.mcache | Bin 0 -> 926 bytes maps/pre-re/048-2.mcache | Bin 0 -> 822 bytes maps/pre-re/051-1.mcache | Bin 0 -> 637 bytes maps/pre-re/051-3.mcache | Bin 0 -> 464 bytes maps/pre-re/052-1.mcache | Bin 0 -> 327 bytes maps/pre-re/052-2.mcache | Bin 0 -> 426 bytes maps/pre-re/055-1.mcache | Bin 0 -> 846 bytes maps/pre-re/055-3.mcache | Bin 0 -> 663 bytes maps/pre-re/056-2.mcache | Bin 0 -> 155 bytes maps/pre-re/057-1.mcache | Bin 0 -> 497 bytes maps/pre-re/069-2.mcache | Bin 0 -> 341 bytes maps/pre-re/070-1.mcache | Bin 0 -> 1303 bytes maps/pre-re/070-3.mcache | Bin 0 -> 227 bytes maps/pre-re/099-1.mcache | Bin 0 -> 590 bytes maps/pre-re/099-2.mcache | Bin 0 -> 442 bytes maps/pre-re/099-3.mcache | Bin 0 -> 274 bytes maps/pre-re/099-4.mcache | Bin 0 -> 198 bytes maps/pre-re/099-5.mcache | Bin 0 -> 198 bytes maps/pre-re/099-6.mcache | Bin 0 -> 438 bytes maps/pre-re/099-7.mcache | Bin 0 -> 1260 bytes maps/pre-re/099-8.mcache | Bin 0 -> 3726 bytes maps/pre-re/botcheck.mcache | Bin 63 -> 66 bytes maps/pre-re/fermi.mcache | Bin 63 -> 0 bytes maps/pre-re/marine-2.mcache | Bin 101 -> 0 bytes maps/pre-re/marine.mcache | Bin 94 -> 0 bytes maps/pre-re/sec_pri.mcache | Bin 133 -> 0 bytes maps/pre-re/test.mcache | Bin 176 -> 0 bytes maps/pre-re/testbg.mcache | Bin 63 -> 0 bytes maps/re/001-1.mcache | Bin 0 -> 930 bytes maps/re/001-2.mcache | Bin 0 -> 453 bytes maps/re/001-3.mcache | Bin 0 -> 527 bytes maps/re/002-1.mcache | Bin 0 -> 1003 bytes maps/re/002-2.mcache | Bin 0 -> 579 bytes maps/re/002-3.mcache | Bin 0 -> 322 bytes maps/re/002-4.mcache | Bin 0 -> 512 bytes maps/re/002-5.mcache | Bin 0 -> 481 bytes maps/re/003-1.mcache | Bin 0 -> 456 bytes maps/re/003-4.mcache | Bin 0 -> 969 bytes maps/re/004-1.mcache | Bin 0 -> 556 bytes maps/re/004-3.mcache | Bin 0 -> 449 bytes maps/re/004-4.mcache | Bin 0 -> 493 bytes maps/re/004-5.mcache | Bin 0 -> 402 bytes maps/re/005-3.mcache | Bin 0 -> 782 bytes maps/re/006-1.mcache | Bin 0 -> 1097 bytes maps/re/006-2.mcache | Bin 0 -> 389 bytes maps/re/006-3.mcache | Bin 0 -> 1090 bytes maps/re/007-1.mcache | Bin 0 -> 796 bytes maps/re/007-2.mcache | Bin 0 -> 111 bytes maps/re/008-1.mcache | Bin 0 -> 801 bytes maps/re/009-1.mcache | Bin 0 -> 289 bytes maps/re/009-2.mcache | Bin 0 -> 598 bytes maps/re/009-3.mcache | Bin 0 -> 1126 bytes maps/re/009-4.mcache | Bin 0 -> 616 bytes maps/re/009-5.mcache | Bin 0 -> 222 bytes maps/re/009-6.mcache | Bin 0 -> 140 bytes maps/re/009-7.mcache | Bin 0 -> 216 bytes maps/re/009-8.mcache | Bin 0 -> 703 bytes maps/re/010-1.mcache | Bin 0 -> 1049 bytes maps/re/010-2.mcache | Bin 0 -> 340 bytes maps/re/011-1.mcache | Bin 0 -> 766 bytes maps/re/011-3.mcache | Bin 0 -> 151 bytes maps/re/011-4.mcache | Bin 0 -> 1125 bytes maps/re/011-6.mcache | Bin 0 -> 2259 bytes maps/re/012-1.mcache | Bin 0 -> 1273 bytes maps/re/012-3.mcache | Bin 0 -> 3820 bytes maps/re/012-4.mcache | Bin 0 -> 4007 bytes maps/re/013-1.mcache | Bin 0 -> 1028 bytes maps/re/013-2.mcache | Bin 0 -> 142 bytes maps/re/013-3.mcache | Bin 0 -> 1046 bytes maps/re/014-1.mcache | Bin 0 -> 737 bytes maps/re/014-3.mcache | Bin 0 -> 718 bytes maps/re/015-1.mcache | Bin 0 -> 970 bytes maps/re/015-3.mcache | Bin 0 -> 133 bytes maps/re/016-1.mcache | Bin 0 -> 728 bytes maps/re/016-2.mcache | Bin 0 -> 104 bytes maps/re/017-1.mcache | Bin 0 -> 1303 bytes maps/re/017-2.mcache | Bin 0 -> 80 bytes maps/re/017-3.mcache | Bin 0 -> 482 bytes maps/re/017-4.mcache | Bin 0 -> 435 bytes maps/re/017-9.mcache | Bin 0 -> 96 bytes maps/re/018-1.mcache | Bin 0 -> 1000 bytes maps/re/018-2.mcache | Bin 0 -> 334 bytes maps/re/018-3.mcache | Bin 0 -> 1635 bytes maps/re/019-1.mcache | Bin 0 -> 595 bytes maps/re/019-3.mcache | Bin 0 -> 657 bytes maps/re/019-4.mcache | Bin 0 -> 407 bytes maps/re/020-1.mcache | Bin 0 -> 624 bytes maps/re/020-2.mcache | Bin 0 -> 315 bytes maps/re/020-3.mcache | Bin 0 -> 601 bytes maps/re/021-3.mcache | Bin 0 -> 901 bytes maps/re/023-1.mcache | Bin 0 -> 1173 bytes maps/re/023-2.mcache | Bin 0 -> 86 bytes maps/re/023-3.mcache | Bin 0 -> 884 bytes maps/re/025-1.mcache | Bin 0 -> 1385 bytes maps/re/025-3.mcache | Bin 0 -> 1249 bytes maps/re/025-4.mcache | Bin 0 -> 1416 bytes maps/re/026-1.mcache | Bin 0 -> 1484 bytes maps/re/026-2.mcache | Bin 0 -> 422 bytes maps/re/027-1.mcache | Bin 0 -> 1213 bytes maps/re/027-2.mcache | Bin 0 -> 245 bytes maps/re/027-3.mcache | Bin 0 -> 477 bytes maps/re/027-4.mcache | Bin 0 -> 755 bytes maps/re/027-5.mcache | Bin 0 -> 424 bytes maps/re/027-6.mcache | Bin 0 -> 199 bytes maps/re/027-7.mcache | Bin 0 -> 178 bytes maps/re/027-8.mcache | Bin 0 -> 149 bytes maps/re/028-1.mcache | Bin 0 -> 1112 bytes maps/re/028-3.mcache | Bin 0 -> 352 bytes maps/re/029-1.mcache | Bin 0 -> 873 bytes maps/re/029-2.mcache | Bin 0 -> 340 bytes maps/re/029-3.mcache | Bin 0 -> 190 bytes maps/re/029-4.mcache | Bin 0 -> 365 bytes maps/re/030-1.mcache | Bin 0 -> 442 bytes maps/re/030-2.mcache | Bin 0 -> 580 bytes maps/re/030-3.mcache | Bin 0 -> 502 bytes maps/re/030-4.mcache | Bin 0 -> 173 bytes maps/re/031-1.mcache | Bin 0 -> 680 bytes maps/re/031-2.mcache | Bin 0 -> 98 bytes maps/re/031-3.mcache | Bin 0 -> 3220 bytes maps/re/031-4.mcache | Bin 0 -> 315 bytes maps/re/032-3.mcache | Bin 0 -> 612 bytes maps/re/033-1.mcache | Bin 0 -> 592 bytes maps/re/034-1.mcache | Bin 0 -> 1319 bytes maps/re/034-2.mcache | Bin 0 -> 115 bytes maps/re/035-2.mcache | Bin 0 -> 110 bytes maps/re/036-2.mcache | Bin 0 -> 110 bytes maps/re/041-1.mcache | Bin 0 -> 406 bytes maps/re/042-1.mcache | Bin 0 -> 692 bytes maps/re/043-1.mcache | Bin 0 -> 605 bytes maps/re/043-3.mcache | Bin 0 -> 702 bytes maps/re/043-4.mcache | Bin 0 -> 1336 bytes maps/re/045-1.mcache | Bin 0 -> 2578 bytes maps/re/046-1.mcache | Bin 0 -> 1293 bytes maps/re/046-3.mcache | Bin 0 -> 782 bytes maps/re/047-1.mcache | Bin 0 -> 2436 bytes maps/re/047-3.mcache | Bin 0 -> 926 bytes maps/re/048-2.mcache | Bin 0 -> 822 bytes maps/re/051-1.mcache | Bin 0 -> 637 bytes maps/re/051-3.mcache | Bin 0 -> 464 bytes maps/re/052-1.mcache | Bin 0 -> 327 bytes maps/re/052-2.mcache | Bin 0 -> 426 bytes maps/re/055-1.mcache | Bin 0 -> 846 bytes maps/re/055-3.mcache | Bin 0 -> 663 bytes maps/re/056-2.mcache | Bin 0 -> 155 bytes maps/re/057-1.mcache | Bin 0 -> 497 bytes maps/re/069-2.mcache | Bin 0 -> 341 bytes maps/re/070-1.mcache | Bin 0 -> 1303 bytes maps/re/070-3.mcache | Bin 0 -> 227 bytes maps/re/099-1.mcache | Bin 0 -> 590 bytes maps/re/099-2.mcache | Bin 0 -> 442 bytes maps/re/099-3.mcache | Bin 0 -> 274 bytes maps/re/099-4.mcache | Bin 0 -> 198 bytes maps/re/099-5.mcache | Bin 0 -> 198 bytes maps/re/099-6.mcache | Bin 0 -> 438 bytes maps/re/099-7.mcache | Bin 0 -> 1260 bytes maps/re/099-8.mcache | Bin 0 -> 3726 bytes maps/re/botcheck.mcache | Bin 0 -> 66 bytes npc/000-0-0/_import.txt | 5 - npc/000-0-0/mapflags.txt | 1 - npc/000-0-0/q'onan.txt | 14 - npc/000-0-0/sailors.txt | 92 -- npc/000-0-1/_import.txt | 4 - npc/000-0-1/mapflags.txt | 1 - npc/000-0-1/narrator.txt | 180 --- npc/000-0/_import.txt | 4 - npc/000-0/mapflags.txt | 1 - npc/000-0/sailors.txt | 92 -- npc/000-1/_import.txt | 25 +- npc/000-1/_mobs.txt | 38 - npc/000-1/_warps.txt | 3 - npc/000-1/ale.txt | 109 -- npc/000-1/astapolos.txt | 165 --- npc/000-1/boss.txt | 43 - npc/000-1/chest.txt | 65 - npc/000-1/couwan.txt | 94 -- npc/000-1/darlin.txt | 148 --- npc/000-1/exit.txt | 18 + npc/000-1/fexil.txt | 43 - npc/000-1/gugli.txt | 248 ---- npc/000-1/gulukan.txt | 169 --- npc/000-1/jalad.txt | 130 -- npc/000-1/lean.txt | 73 -- npc/000-1/mapflags.txt | 1 - npc/000-1/maxe.txt | 111 -- npc/000-1/muller.txt | 131 -- npc/000-1/panels.txt | 54 - npc/000-1/sapartan.txt | 101 -- npc/000-1/shop.txt | 32 - npc/000-1/silvio.txt | 185 --- npc/000-1/tarlan.txt | 64 - npc/000-1/tibbo.txt | 122 -- npc/000-2-0/_import.txt | 8 - npc/000-2-0/_warps.txt | 3 - npc/000-2-0/billybons.txt | 95 -- npc/000-2-0/doors.txt | 85 -- npc/000-2-0/julia.txt | 289 ----- npc/000-2-0/mapflags.txt | 1 - npc/000-2-0/note.txt | 27 - npc/000-2-1/_import.txt | 17 - npc/000-2-1/_mobs.txt | 3 - npc/000-2-1/_savepoints.txt | 54 - npc/000-2-1/_warps.txt | 3 - npc/000-2-1/alige.txt | 321 ----- npc/000-2-1/arpan.txt | 304 ----- npc/000-2-1/chefgado.txt | 226 ---- npc/000-2-1/chest.txt | 72 -- npc/000-2-1/dan.txt | 93 -- npc/000-2-1/devis.txt | 16 - npc/000-2-1/hammock.txt | 125 -- npc/000-2-1/knife.txt | 47 - npc/000-2-1/mapflags.txt | 1 - npc/000-2-1/peter.txt | 302 ----- npc/000-2-1/q'onan.txt | 15 - npc/000-2-1/story_save.txt | 30 - npc/000-2-2/_import.txt | 5 - npc/000-2-2/doors.txt | 75 -- npc/000-2-2/mapflags.txt | 1 - npc/000-2-2/ratto.txt | 98 -- npc/000-2-3/_import.txt | 10 - npc/000-2-3/_warps.txt | 3 - npc/000-2-3/box.txt | 112 -- npc/000-2-3/elmo.txt | 66 - npc/000-2-3/hammock.txt | 17 - npc/000-2-3/mapflags.txt | 1 - npc/000-2-3/nard.txt | 341 ------ npc/000-2-3/piourocket.txt | 29 - npc/000-2-3/sailors.txt | 47 - npc/000-2-4/_import.txt | 6 - npc/000-2-4/_mobs.txt | 3 - npc/000-2-4/_warps.txt | 3 - npc/000-2-4/alige.txt | 38 - npc/000-2-4/mapflags.txt | 1 - npc/001-1/_import.txt | 61 +- npc/001-1/_mobs.txt | 37 +- npc/001-1/_warps.txt | 459 +------ npc/001-1/adrian.txt | 42 + npc/001-1/artaxe.txt | 18 - npc/001-1/beuss.txt | 27 - npc/001-1/calypsan.txt | 104 -- npc/001-1/carmie.txt | 68 -- npc/001-1/ched.txt | 9 + npc/001-1/chelios.txt | 135 -- npc/001-1/children.txt | 90 ++ npc/001-1/constable.txt | 7 + npc/001-1/cookiemaster.txt | 256 ---- npc/001-1/devis.txt | 99 -- npc/001-1/dock.txt | 42 + npc/001-1/doors.txt | 61 - npc/001-1/elmo.txt | 19 - npc/001-1/enora.txt | 461 ------- npc/001-1/eomie.txt | 111 ++ npc/001-1/eugene.txt | 82 -- npc/001-1/ferry_master.txt | 19 + npc/001-1/fexil.txt | 143 --- npc/001-1/flags.txt | 17 - npc/001-1/flyingpiou.txt | 160 --- npc/001-1/gate_guards.txt | 21 + npc/001-1/gossip.txt | 57 + npc/001-1/guards.txt | 93 ++ npc/001-1/harbours.txt | 84 -- npc/001-1/inac.txt | 15 + npc/001-1/juscare.txt | 92 -- npc/001-1/katja.txt | 128 -- npc/001-1/koga.txt | 45 - npc/001-1/lucas.txt | 18 - npc/001-1/manhole.txt | 88 -- npc/001-1/mapflags.txt | 3 +- npc/001-1/marine.txt | 17 - npc/001-1/merlin.txt | 24 - npc/001-1/mouboo.txt | 61 - npc/001-1/nalkri.txt | 59 - npc/001-1/north_shops.txt | 6 + npc/001-1/npcs.txt | 70 ++ npc/001-1/panels.txt | 57 - npc/001-1/pious.txt | 15 - npc/001-1/qonan.txt | 113 -- npc/001-1/qpid.txt | 169 --- npc/001-1/rowboat.txt | 69 -- npc/001-1/rowboathelper.txt | 141 --- npc/001-1/rumly.txt | 225 ---- npc/001-1/salem.txt | 219 ---- npc/001-1/sewer_east.txt | 15 + npc/001-1/sewer_north.txt | 15 + npc/001-1/shop.txt | 298 ----- npc/001-1/sign.txt | 168 --- npc/001-1/sophialla.txt | 88 -- npc/001-1/stat_reset.txt | 6 + npc/001-1/taree.txt | 20 - npc/001-1/tinris.txt | 186 +++ npc/001-1/tombstones.txt | 65 + npc/001-1/treeleaf.txt | 22 - npc/001-1/trees.txt | 220 ---- npc/001-1/wateranimation.txt | 23 - npc/001-1/weellos.txt | 31 + npc/001-1/xilaxa.txt | 50 - npc/001-2-0/_import.txt | 6 - npc/001-2-0/_warps.txt | 4 - npc/001-2-0/mapflags.txt | 1 - npc/001-2-0/resa.txt | 79 -- npc/001-2-0/shop.txt | 34 - npc/001-2-1/_import.txt | 5 - npc/001-2-1/_savepoints.txt | 15 - npc/001-2-1/_warps.txt | 3 - npc/001-2-1/mapflags.txt | 1 - npc/001-2-10/_import.txt | 5 - npc/001-2-10/_savepoints.txt | 15 - npc/001-2-10/_warps.txt | 4 - npc/001-2-10/mapflags.txt | 1 - npc/001-2-11/_import.txt | 6 - npc/001-2-11/_savepoints.txt | 15 - npc/001-2-11/_warps.txt | 3 - npc/001-2-11/mapflags.txt | 1 - npc/001-2-11/mona.txt | 170 --- npc/001-2-12/_import.txt | 5 - npc/001-2-12/_warps.txt | 5 - npc/001-2-12/mapflags.txt | 1 - npc/001-2-12/oscar.txt | 144 --- npc/001-2-13/_import.txt | 5 - npc/001-2-13/_savepoints.txt | 15 - npc/001-2-13/_warps.txt | 3 - npc/001-2-13/mapflags.txt | 1 - npc/001-2-14/_import.txt | 4 - npc/001-2-14/_warps.txt | 3 - npc/001-2-14/mapflags.txt | 1 - npc/001-2-15/_import.txt | 5 - npc/001-2-15/_savepoints.txt | 15 - npc/001-2-15/_warps.txt | 3 - npc/001-2-15/mapflags.txt | 1 - npc/001-2-16/_import.txt | 4 - npc/001-2-16/_warps.txt | 4 - npc/001-2-16/mapflags.txt | 1 - npc/001-2-17/_import.txt | 4 - npc/001-2-17/_warps.txt | 3 - npc/001-2-17/mapflags.txt | 1 - npc/001-2-18/_import.txt | 4 - npc/001-2-18/_warps.txt | 4 - npc/001-2-18/mapflags.txt | 1 - npc/001-2-19/_import.txt | 5 - npc/001-2-19/_warps.txt | 51 - npc/001-2-19/lloyd.txt | 249 ---- npc/001-2-19/mapflags.txt | 1 - npc/001-2-2/_import.txt | 5 - npc/001-2-2/_warps.txt | 4 - npc/001-2-2/mapflags.txt | 1 - npc/001-2-2/moon.txt | 215 ---- npc/001-2-20/_import.txt | 4 - npc/001-2-20/_warps.txt | 26 - npc/001-2-20/mapflags.txt | 1 - npc/001-2-21/_import.txt | 6 - npc/001-2-21/_warps.txt | 5 - npc/001-2-21/julia.txt | 140 --- npc/001-2-21/mapflags.txt | 1 - npc/001-2-21/note.txt | 27 - npc/001-2-22/_import.txt | 13 - npc/001-2-22/_mobs.txt | 3 - npc/001-2-22/_savepoints.txt | 67 - npc/001-2-22/_warps.txt | 3 - npc/001-2-22/alige.txt | 325 ----- npc/001-2-22/chefgado.txt | 112 -- npc/001-2-22/chest.txt | 49 - npc/001-2-22/hammock.txt | 137 --- npc/001-2-22/knife.txt | 47 - npc/001-2-22/mapflags.txt | 1 - npc/001-2-22/note.txt | 33 - npc/001-2-22/peter.txt | 302 ----- npc/001-2-23/_import.txt | 6 - npc/001-2-23/_warps.txt | 3 - npc/001-2-23/doors.txt | 75 -- npc/001-2-23/mapflags.txt | 1 - npc/001-2-23/ratto.txt | 98 -- npc/001-2-24/_import.txt | 7 - npc/001-2-24/_warps.txt | 3 - npc/001-2-24/hammock.txt | 17 - npc/001-2-24/mapflags.txt | 1 - npc/001-2-24/nard.txt | 93 -- npc/001-2-24/piourocket.txt | 9 - npc/001-2-25/_import.txt | 5 - npc/001-2-25/_mobs.txt | 3 - npc/001-2-25/_warps.txt | 3 - npc/001-2-25/mapflags.txt | 1 - npc/001-2-26/_import.txt | 6 - npc/001-2-26/_warps.txt | 3 - npc/001-2-26/flask.txt | 21 - npc/001-2-26/ivan.txt | 85 -- npc/001-2-26/mapflags.txt | 1 - npc/001-2-27/_import.txt | 8 - npc/001-2-27/_warps.txt | 3 - npc/001-2-27/don.txt | 112 -- npc/001-2-27/kaylo.txt | 43 - npc/001-2-27/lydon.txt | 36 - npc/001-2-27/mapflags.txt | 1 - npc/001-2-27/shop.txt | 62 - npc/001-2-28/_import.txt | 8 - npc/001-2-28/_warps.txt | 5 - npc/001-2-28/jenna.txt | 78 -- npc/001-2-28/mapflags.txt | 1 - npc/001-2-28/note.txt | 43 - npc/001-2-28/plush.txt | 127 -- npc/001-2-28/shop.txt | 24 - npc/001-2-29/_import.txt | 5 - npc/001-2-29/_savepoints.txt | 54 - npc/001-2-29/_warps.txt | 4 - npc/001-2-29/mapflags.txt | 1 - npc/001-2-3/_import.txt | 5 - npc/001-2-3/_savepoints.txt | 15 - npc/001-2-3/_warps.txt | 3 - npc/001-2-3/mapflags.txt | 1 - npc/001-2-30/_import.txt | 5 - npc/001-2-30/_mobs.txt | 3 - npc/001-2-30/_warps.txt | 3 - npc/001-2-30/mapflags.txt | 1 - npc/001-2-31/_import.txt | 4 - npc/001-2-31/_warps.txt | 4 - npc/001-2-31/mapflags.txt | 1 - npc/001-2-32/_import.txt | 6 - npc/001-2-32/_warps.txt | 3 - npc/001-2-32/doors.txt | 38 - npc/001-2-32/mapflags.txt | 1 - npc/001-2-32/serena.txt | 215 ---- npc/001-2-33/_import.txt | 6 - npc/001-2-33/_warps.txt | 53 - npc/001-2-33/lozerk.txt | 195 --- npc/001-2-33/mapflags.txt | 3 - npc/001-2-33/triggers.txt | 102 -- npc/001-2-34/_import.txt | 6 - npc/001-2-34/_warps.txt | 3 - npc/001-2-34/doors.txt | 29 - npc/001-2-34/mapflags.txt | 1 - npc/001-2-34/samantha.txt | 54 - npc/001-2-35/_import.txt | 4 - npc/001-2-35/doors.txt | 19 - npc/001-2-35/mapflags.txt | 2 - npc/001-2-36/_import.txt | 5 - npc/001-2-36/_warps.txt | 3 - npc/001-2-36/hector.txt | 460 ------- npc/001-2-36/mapflags.txt | 1 - npc/001-2-37/_import.txt | 6 - npc/001-2-37/_savepoints.txt | 54 - npc/001-2-37/_warps.txt | 4 - npc/001-2-37/hammock.txt | 106 -- npc/001-2-37/mapflags.txt | 1 - npc/001-2-38/_import.txt | 6 - npc/001-2-38/_savepoints.txt | 54 - npc/001-2-38/_warps.txt | 4 - npc/001-2-38/hammock.txt | 106 -- npc/001-2-38/mapflags.txt | 1 - npc/001-2-39/_import.txt | 5 - npc/001-2-39/_warps.txt | 4 - npc/001-2-39/mapflags.txt | 1 - npc/001-2-39/qanon.txt | 131 -- npc/001-2-4/_import.txt | 7 - npc/001-2-4/_warps.txt | 27 - npc/001-2-4/books.txt | 102 -- npc/001-2-4/mapflags.txt | 1 - npc/001-2-4/robin.txt | 64 - npc/001-2-4/terry.txt | 15 - npc/001-2-40/_import.txt | 5 - npc/001-2-40/_warps.txt | 5 - npc/001-2-40/mapflags.txt | 1 - npc/001-2-40/trozz.txt | 66 - npc/001-2-41/_import.txt | 5 - npc/001-2-41/_warps.txt | 3 - npc/001-2-41/edouard.txt | 175 --- npc/001-2-41/mapflags.txt | 1 - npc/001-2-42/_import.txt | 3 - npc/001-2-42/_warps.txt | 3 - npc/001-2-43/_import.txt | 5 - npc/001-2-43/_warps.txt | 3 - npc/001-2-43/core.txt | 147 --- npc/001-2-43/mapflags.txt | 1 - npc/001-2-5/_import.txt | 6 - npc/001-2-5/_warps.txt | 3 - npc/001-2-5/books.txt | 33 - npc/001-2-5/mapflags.txt | 1 - npc/001-2-5/tutorial.txt | 266 ---- npc/001-2-6/_import.txt | 8 - npc/001-2-6/_warps.txt | 3 - npc/001-2-6/books.txt | 345 ------ npc/001-2-6/christopher.txt | 68 -- npc/001-2-6/dolfina.txt | 20 - npc/001-2-6/leonard.txt | 88 -- npc/001-2-6/mapflags.txt | 1 - npc/001-2-7/_import.txt | 4 - npc/001-2-7/_warps.txt | 5 - npc/001-2-7/mapflags.txt | 1 - npc/001-2-8/_import.txt | 5 - npc/001-2-8/_warps.txt | 3 - npc/001-2-8/doors.txt | 59 - npc/001-2-8/mapflags.txt | 1 - npc/001-2-9/_import.txt | 5 - npc/001-2-9/_warps.txt | 3 - npc/001-2-9/janus.txt | 170 --- npc/001-2-9/mapflags.txt | 1 - npc/001-2/_import.txt | 18 + npc/001-2/_warps.txt | 17 + npc/001-2/bank.txt | 6 + npc/001-2/david.txt | 52 + npc/001-2/fieri.txt | 117 ++ npc/001-2/forge_shops.txt | 3 + npc/001-2/government_building.txt | 154 +++ npc/001-2/heathin.txt | 335 +++++ npc/001-2/jhedia.txt | 60 + npc/001-2/manakins.txt | 45 + npc/001-2/mapflags.txt | 2 + npc/001-2/pauline.txt | 298 +++++ npc/001-2/sandra.txt | 103 ++ npc/001-2/tathin.txt | 28 + npc/001-2/tondar.txt | 54 + npc/001-2/wizards.txt | 23 + npc/001-2/yanis.txt | 39 + npc/001-3-0/_import.txt | 6 - npc/001-3-0/_mobs.txt | 39 - npc/001-3-0/_warps.txt | 8 - npc/001-3-0/gates.txt | 201 --- npc/001-3-0/mundane.txt | 208 ---- npc/001-3-1/_import.txt | 5 - npc/001-3-1/_mobs.txt | 8 - npc/001-3-1/_warps.txt | 4 - npc/001-3-1/gates.txt | 66 - npc/001-3-2/_import.txt | 5 - npc/001-3-2/_warps.txt | 3 - npc/001-3-2/henry.txt | 374 ------ npc/001-3-2/smuggler.txt | 84 -- npc/001-3/_import.txt | 7 + npc/001-3/_mobs.txt | 3 + npc/001-3/_warps.txt | 3 + npc/001-3/guards.txt | 32 + npc/001-3/mapflags.txt | 2 + npc/001-3/pvpflag.txt | 1 + npc/002-1/_import.txt | 20 + npc/002-1/_mobs.txt | 15 + npc/002-1/_warps.txt | 18 + npc/002-1/anwar.txt | 172 +++ npc/002-1/bard.txt | 117 ++ npc/002-1/elanore.txt | 618 ++++++++++ npc/002-1/gaurds.txt | 15 + npc/002-1/itka.txt | 19 + npc/002-1/lieutenant_dausen.txt | 110 ++ npc/002-1/luca.txt | 449 +++++++ npc/002-1/mapflags.txt | 1 + npc/002-1/mine_debug.txt | 68 ++ npc/002-1/nickos.txt | 113 ++ npc/002-1/nomads.txt | 13 + npc/002-1/npcs.txt | 22 + npc/002-1/sarah.txt | 75 ++ npc/002-1/soul-menhir.txt | 15 + npc/002-1/stewen.txt | 22 + npc/002-1/traveler.txt | 7 + npc/002-2/_import.txt | 21 + npc/002-2/_warps.txt | 19 + npc/002-2/bakery.txt | 148 +++ npc/002-2/barber.txt | 10 + npc/002-2/bleacher.txt | 130 ++ npc/002-2/casino.txt | 195 +++ npc/002-2/dedication.txt | 8 + npc/002-2/hetchel.txt | 417 +++++++ npc/002-2/imec.txt | 115 ++ npc/002-2/inya.txt | 206 ++++ npc/002-2/kps.txt | 152 +++ npc/002-2/kylian.txt | 360 ++++++ npc/002-2/latoy.txt | 26 + npc/002-2/mapflags.txt | 2 + npc/002-2/omar.txt | 331 +++++ npc/002-2/phaet.txt | 28 + npc/002-2/rebecca.txt | 82 ++ npc/002-2/shops.txt | 2 + npc/002-2/stranger.txt | 394 ++++++ npc/002-2/troupe_leader.txt | 61 + npc/002-3/_import.txt | 8 + npc/002-3/_warps.txt | 5 + npc/002-3/mapflags.txt | 1 + npc/002-3/merchant.txt | 2 + npc/002-3/mining_camp_barrier.txt | 13 + npc/002-3/nathan.txt | 103 ++ npc/002-3/traveler.txt | 7 + npc/002-4/_import.txt | 10 + npc/002-4/_mobs.txt | 16 + npc/002-4/_warps.txt | 3 + npc/002-4/mapflags.txt | 1 + npc/002-4/mine_triggerone.txt | 49 + npc/002-4/mine_triggerthree.txt | 49 + npc/002-4/mine_triggertwo.txt | 50 + npc/002-4/naem.txt | 132 ++ npc/002-4/underground_palace_barrier.txt | 13 + npc/002-5/_import.txt | 7 + npc/002-5/_mobs.txt | 19 + npc/002-5/_warps.txt | 3 + npc/002-5/chest.txt | 37 + npc/002-5/mapflags.txt | 1 + npc/002-5/sema.txt | 62 + npc/003-1/_import.txt | 2 + npc/003-4/_import.txt | 4 + npc/003-4/_mobs.txt | 8 + npc/003-4/_warps.txt | 5 + npc/004-1/_import.txt | 4 + npc/004-1/_mobs.txt | 9 + npc/004-1/_warps.txt | 4 + npc/004-3/_import.txt | 5 + npc/004-3/_mobs.txt | 9 + npc/004-3/_warps.txt | 9 + npc/004-3/mapflags.txt | 1 + npc/004-4/_import.txt | 5 + npc/004-4/_mobs.txt | 11 + npc/004-4/_warps.txt | 8 + npc/004-4/mapflags.txt | 1 + npc/004-5/_import.txt | 6 + npc/004-5/_mobs.txt | 14 + npc/004-5/_warps.txt | 3 + npc/004-5/chest.txt | 26 + npc/004-5/mapflags.txt | 1 + npc/005-3/_import.txt | 5 + npc/005-3/_mobs.txt | 7 + npc/005-3/_warps.txt | 13 + npc/005-3/mapflags.txt | 1 + npc/006-1/_import.txt | 11 + npc/006-1/_mobs.txt | 23 + npc/006-1/_warps.txt | 32 + npc/006-1/mapflags.txt | 1 + npc/006-1/mika.txt | 8 + npc/006-1/miriam.txt | 318 +++++ npc/006-1/pachua.txt | 240 ++++ npc/006-1/spirit.txt | 292 +++++ npc/006-1/traveler.txt | 7 + npc/006-1/tree.txt | 159 +++ npc/006-2/_import.txt | 6 + npc/006-2/_warps.txt | 6 + npc/006-2/mapflags.txt | 1 + npc/006-2/npcs.txt | 99 ++ npc/006-2/shops.txt | 3 + npc/006-3/_import.txt | 5 + npc/006-3/_mobs.txt | 28 + npc/006-3/_warps.txt | 22 + npc/006-3/mapflags.txt | 1 + npc/007-1/_import.txt | 6 + npc/007-1/_mobs.txt | 11 + npc/007-1/_warps.txt | 6 + npc/007-1/mapflags.txt | 1 + npc/007-1/voltain.txt | 377 ++++++ npc/007-2/_import.txt | 4 + npc/007-2/_warps.txt | 3 + npc/007-2/witch.txt | 996 +++++++++++++++ npc/008-1-1/_import.txt | 11 - npc/008-1-1/_mobs.txt | 38 - npc/008-1-1/_warps.txt | 5 - npc/008-1-1/cutscene.txt | 180 --- npc/008-1-1/galimatia.txt | 431 ------- npc/008-1-1/hal.txt | 131 -- npc/008-1-1/koga.txt | 34 - npc/008-1-1/morcant.txt | 63 - npc/008-1-1/sign.txt | 22 - npc/008-1-1/soldiers.txt | 31 - npc/008-1-2/_import.txt | 4 - npc/008-1-2/_warps.txt | 4 - npc/008-1-2/sign.txt | 31 - npc/008-1/4144.txt | 90 -- npc/008-1/_import.txt | 28 +- npc/008-1/_mobs.txt | 132 +- npc/008-1/_warps.txt | 41 +- npc/008-1/andra.txt | 170 +++ npc/008-1/annualeaster.txt | 212 ++++ npc/008-1/auldsbel.txt | 53 - npc/008-1/banu.txt | 111 +- npc/008-1/blossom.txt | 77 -- npc/008-1/confused-tree.txt | 972 --------------- npc/008-1/crane.txt | 92 -- npc/008-1/diryn.txt | 7 + npc/008-1/dock.txt | 84 ++ npc/008-1/doors.txt | 43 - npc/008-1/george.txt | 42 + npc/008-1/hinnak.txt | 598 ++++----- npc/008-1/jack.txt | 314 ----- npc/008-1/mapflags.txt | 2 +- npc/008-1/marine.txt | 17 - npc/008-1/mikhail.txt | 178 +-- npc/008-1/milly.txt | 119 -- npc/008-1/old-man.txt | 89 -- npc/008-1/old-woman.txt | 136 --- npc/008-1/oscar.txt | 19 - npc/008-1/rossy.txt | 391 ------ npc/008-1/sabine.txt | 63 - npc/008-1/sergeant-ryan.txt | 71 -- npc/008-1/shop.txt | 50 - npc/008-1/sign.txt | 45 - npc/008-1/snarfles.txt | 97 -- npc/008-1/soul-menhir.txt | 9 - npc/008-1/voltain.txt | 18 - npc/008-1/wateranimation.txt | 21 - npc/008-2-0/_import.txt | 6 - npc/008-2-0/_savepoints.txt | 15 - npc/008-2-0/_warps.txt | 4 - npc/008-2-0/celestia.txt | 19 - npc/008-2-0/mapflags.txt | 1 - npc/008-2-1/_import.txt | 9 - npc/008-2-1/_savepoints.txt | 15 - npc/008-2-1/_warps.txt | 4 - npc/008-2-1/generalstore.txt | 19 - npc/008-2-1/inspector.txt | 190 --- npc/008-2-1/mapflags.txt | 1 - npc/008-2-1/richard.txt | 62 - npc/008-2-1/selim.txt | 22 - npc/008-2-10/_import.txt | 5 - npc/008-2-10/_warps.txt | 4 - npc/008-2-10/airlia.txt | 33 - npc/008-2-10/mapflags.txt | 1 - npc/008-2-11/_import.txt | 5 - npc/008-2-11/_savepoints.txt | 28 - npc/008-2-11/_warps.txt | 3 - npc/008-2-11/mapflags.txt | 1 - npc/008-2-12/_import.txt | 5 - npc/008-2-12/_warps.txt | 4 - npc/008-2-12/mapflags.txt | 1 - npc/008-2-12/nurse.txt | 175 --- npc/008-2-13/_import.txt | 6 - npc/008-2-13/_savepoints.txt | 54 - npc/008-2-13/_warps.txt | 4 - npc/008-2-13/lena.txt | 270 ---- npc/008-2-13/mapflags.txt | 1 - npc/008-2-14/_import.txt | 6 - npc/008-2-14/_savepoints.txt | 15 - npc/008-2-14/_warps.txt | 3 - npc/008-2-14/doctor.txt | 114 -- npc/008-2-14/mapflags.txt | 1 - npc/008-2-15/_import.txt | 3 - npc/008-2-15/_warps.txt | 3 - npc/008-2-16/_import.txt | 5 - npc/008-2-16/_warps.txt | 3 - npc/008-2-16/stove.txt | 87 -- npc/008-2-16/yannika.txt | 469 ------- npc/008-2-17/_import.txt | 5 - npc/008-2-17/_warps.txt | 5 - npc/008-2-17/angus.txt | 19 - npc/008-2-17/caul.txt | 19 - npc/008-2-18/_import.txt | 4 - npc/008-2-18/_warps.txt | 3 - npc/008-2-18/malik.txt | 64 - npc/008-2-19/_import.txt | 4 - npc/008-2-19/_warps.txt | 3 - npc/008-2-19/books.txt | 60 - npc/008-2-2/_import.txt | 12 - npc/008-2-2/_warps.txt | 6 - npc/008-2-2/barron.txt | 32 - npc/008-2-2/jukebox.txt | 29 - npc/008-2-2/kfahr.txt | 785 ------------ npc/008-2-2/ledmitz.txt | 36 - npc/008-2-2/mapflags.txt | 1 - npc/008-2-2/melania.txt | 107 -- npc/008-2-2/melinda.txt | 181 --- npc/008-2-2/note.txt | 35 - npc/008-2-2/shop.txt | 39 - npc/008-2-20/_import.txt | 4 - npc/008-2-20/_warps.txt | 4 - npc/008-2-20/valia.txt | 19 - npc/008-2-21/_import.txt | 4 - npc/008-2-21/_mobs.txt | 3 - npc/008-2-21/_warps.txt | 4 - npc/008-2-22/_import.txt | 4 - npc/008-2-22/_savepoints.txt | 15 - npc/008-2-22/_warps.txt | 3 - npc/008-2-23/_import.txt | 3 - npc/008-2-23/_warps.txt | 3 - npc/008-2-24/_import.txt | 5 - npc/008-2-24/_warps.txt | 5 - npc/008-2-24/chef.txt | 269 ---- npc/008-2-24/troupe-leader.txt | 119 -- npc/008-2-25/_import.txt | 3 - npc/008-2-25/_warps.txt | 4 - npc/008-2-26/_import.txt | 3 - npc/008-2-26/_warps.txt | 3 - npc/008-2-27/_import.txt | 3 - npc/008-2-27/_warps.txt | 3 - npc/008-2-28/_import.txt | 3 - npc/008-2-28/_warps.txt | 3 - npc/008-2-29/_import.txt | 3 - npc/008-2-29/_warps.txt | 3 - npc/008-2-3/_import.txt | 5 - npc/008-2-3/_savepoints.txt | 106 -- npc/008-2-3/_warps.txt | 3 - npc/008-2-3/mapflags.txt | 1 - npc/008-2-30/_import.txt | 3 - npc/008-2-30/_warps.txt | 3 - npc/008-2-31/_import.txt | 3 - npc/008-2-31/_warps.txt | 3 - npc/008-2-32/_import.txt | 4 - npc/008-2-32/_warps.txt | 3 - npc/008-2-32/thamas.txt | 83 -- npc/008-2-4/_import.txt | 7 - npc/008-2-4/_savepoints.txt | 15 - npc/008-2-4/_warps.txt | 3 - npc/008-2-4/bernard.txt | 222 ---- npc/008-2-4/mapflags.txt | 1 - npc/008-2-4/olana.txt | 321 ----- npc/008-2-5/_import.txt | 4 - npc/008-2-5/_warps.txt | 3 - npc/008-2-5/mapflags.txt | 1 - npc/008-2-6/_import.txt | 6 - npc/008-2-6/_warps.txt | 3 - npc/008-2-6/alan.txt | 311 ----- npc/008-2-6/donald.txt | 39 - npc/008-2-6/mapflags.txt | 1 - npc/008-2-7/_import.txt | 8 - npc/008-2-7/_savepoints.txt | 15 - npc/008-2-7/_warps.txt | 3 - npc/008-2-7/mapflags.txt | 1 - npc/008-2-7/shop.txt | 35 - npc/008-2-7/simon.txt | 38 - npc/008-2-7/wyara.txt | 29 - npc/008-2-8/_import.txt | 6 - npc/008-2-8/_warps.txt | 4 - npc/008-2-8/macgowan.txt | 24 - npc/008-2-8/mapflags.txt | 1 - npc/008-2-8/nicholas.txt | 28 - npc/008-2-9/_import.txt | 5 - npc/008-2-9/_savepoints.txt | 15 - npc/008-2-9/_warps.txt | 3 - npc/008-2-9/mapflags.txt | 1 - npc/008-3-0/_import.txt | 6 - npc/008-3-0/_mobs.txt | 83 -- npc/008-3-0/_warps.txt | 3 - npc/008-3-0/clauquer.txt | 138 --- npc/008-3-0/juliet.txt | 656 ---------- npc/008-3-1/_import.txt | 5 - npc/008-3-1/_mobs.txt | 8 - npc/008-3-1/_warps.txt | 3 - npc/008-3-1/arkim.txt | 56 - npc/008-3-2/_import.txt | 5 - npc/008-3-2/_mobs.txt | 7 - npc/008-3-2/_warps.txt | 3 - npc/008-3-2/boss.txt | 43 - npc/008-3-3/_import.txt | 4 - npc/008-3-3/_mobs.txt | 9 - npc/008-3-3/_warps.txt | 5 - npc/008-3-4/_import.txt | 4 - npc/008-3-4/_mobs.txt | 32 - npc/008-3-4/_warps.txt | 5 - npc/008-3-5/_import.txt | 7 - npc/008-3-5/_mobs.txt | 12 - npc/008-3-5/_warps.txt | 6 - npc/008-3-5/bryant.txt | 79 -- npc/008-3-5/lordcave.txt | 101 -- npc/008-3-5/nunia.txt | 81 -- npc/008-3-6/_import.txt | 4 - npc/008-3-6/_mobs.txt | 11 - npc/008-3-6/_warps.txt | 3 - npc/009-1/_import.txt | 16 +- npc/009-1/_mobs.txt | 38 +- npc/009-1/_warps.txt | 27 +- npc/009-1/blackwin.txt | 30 - npc/009-1/constable.txt | 9 + npc/009-1/forwin.txt | 24 - npc/009-1/guide.txt | 184 +++ npc/009-1/hamond.txt | 18 - npc/009-1/jack.txt | 271 +++++ npc/009-1/mapflags.txt | 2 + npc/009-1/milly.txt | 452 +++++++ npc/009-1/old_man.txt | 38 + npc/009-1/old_woman.txt | 83 ++ npc/009-1/sabine.txt | 29 + npc/009-1/soul-menhir.txt | 20 +- npc/009-1/thurstan.txt | 22 - npc/009-1/water_pump.txt | 5 + npc/009-1/wateranimation.txt | 10 - npc/009-2-0/_import.txt | 3 - npc/009-2-0/_warps.txt | 3 - npc/009-2-1/_import.txt | 3 - npc/009-2-1/_warps.txt | 3 - npc/009-2-10/_import.txt | 3 - npc/009-2-10/_warps.txt | 4 - npc/009-2-11/_import.txt | 3 - npc/009-2-11/_warps.txt | 3 - npc/009-2-12/_import.txt | 3 - npc/009-2-12/_warps.txt | 4 - npc/009-2-13/_import.txt | 3 - npc/009-2-13/_warps.txt | 4 - npc/009-2-14/_import.txt | 3 - npc/009-2-14/_warps.txt | 3 - npc/009-2-15/_import.txt | 3 - npc/009-2-15/_warps.txt | 5 - npc/009-2-16/_import.txt | 3 - npc/009-2-16/_warps.txt | 4 - npc/009-2-17/_import.txt | 3 - npc/009-2-17/_warps.txt | 4 - npc/009-2-18/_import.txt | 3 - npc/009-2-18/_warps.txt | 3 - npc/009-2-2/_import.txt | 3 - npc/009-2-2/_warps.txt | 3 - npc/009-2-3/_import.txt | 6 - npc/009-2-3/_warps.txt | 5 - npc/009-2-3/barbara.txt | 17 - npc/009-2-3/chef.txt | 91 -- npc/009-2-3/reid.txt | 22 - npc/009-2-4/_import.txt | 5 - npc/009-2-4/_warps.txt | 3 - npc/009-2-4/aldred.txt | 17 - npc/009-2-4/golbenez.txt | 51 - npc/009-2-5/_import.txt | 5 - npc/009-2-5/_warps.txt | 3 - npc/009-2-5/lovers.txt | 29 - npc/009-2-5/savaric.txt | 20 - npc/009-2-6/_import.txt | 5 - npc/009-2-6/_warps.txt | 3 - npc/009-2-6/eurni.txt | 22 - npc/009-2-6/jpmorbid.txt | 61 - npc/009-2-7/_import.txt | 5 - npc/009-2-7/_warps.txt | 3 - npc/009-2-7/leofwin.txt | 18 - npc/009-2-7/umfrey.txt | 25 - npc/009-2-8/_import.txt | 4 - npc/009-2-8/_warps.txt | 3 - npc/009-2-8/cerhan.txt | 19 - npc/009-2-9/_import.txt | 3 - npc/009-2-9/_warps.txt | 4 - npc/009-2/_import.txt | 25 + npc/009-2/_warps.txt | 24 + npc/009-2/airlia.txt | 242 ++++ npc/009-2/alan.txt | 216 ++++ npc/009-2/bernard.txt | 124 ++ npc/009-2/doctor.txt | 86 ++ npc/009-2/drunks.txt | 14 + npc/009-2/entertainer.txt | 40 + npc/009-2/inspector.txt | 139 +++ npc/009-2/kfahr.txt | 1071 ++++++++++++++++ npc/009-2/lena.txt | 119 ++ npc/009-2/mapflags.txt | 2 + npc/009-2/misc.txt | 51 + npc/009-2/nicholas.txt | 401 ++++++ npc/009-2/nurse.txt | 538 ++++++++ npc/009-2/olana.txt | 238 ++++ npc/009-2/peter.txt | 141 +++ npc/009-2/richard.txt | 6 + npc/009-2/selim.txt | 173 +++ npc/009-2/shops.txt | 14 + npc/009-2/trader.txt | 150 +++ npc/009-2/waitress.txt | 71 ++ npc/009-2/wyara.txt | 553 +++++++++ npc/009-2/yalina.txt | 10 + npc/009-3/_import.txt | 7 + npc/009-3/_mobs.txt | 6 + npc/009-3/_warps.txt | 6 + npc/009-3/mapflags.txt | 1 + npc/009-3/sword.txt | 175 +++ npc/009-3/warp.txt | 26 + npc/009-4/_import.txt | 10 + npc/009-4/_mobs.txt | 9 + npc/009-4/_warps.txt | 8 + npc/009-4/barriers.txt | 268 ++++ npc/009-4/mapflags.txt | 1 + npc/009-4/orum.txt | 607 +++++++++ npc/009-4/orum_warps.txt | 33 + npc/009-4/torches.txt | 286 +++++ npc/009-4/waric.txt | 93 ++ npc/009-5/_import.txt | 4 + npc/009-5/_warps.txt | 3 + npc/009-5/mapflags.txt | 1 + npc/009-6/_import.txt | 5 + npc/009-6/_warps.txt | 3 + npc/009-6/brodomir.txt | 249 ++++ npc/009-6/mapflags.txt | 1 + npc/009-7/_import.txt | 11 + npc/009-7/_warps.txt | 3 + npc/009-7/battlemaster.txt | 83 ++ npc/009-7/core.txt | 457 +++++++ npc/009-7/debug.txt | 164 +++ npc/009-7/eventHandler.txt | 132 ++ npc/009-7/mapflags.txt | 3 + npc/009-7/rouge.txt | 129 ++ npc/009-7/shops.txt | 3 + npc/009-7/trapdoor.txt | 62 + npc/009-8/_import.txt | 5 + npc/009-8/_warps.txt | 15 + npc/009-8/celestia.txt | 284 +++++ npc/009-8/mapflags.txt | 2 + npc/010-1/_import.txt | 5 + npc/010-1/_mobs.txt | 15 + npc/010-1/_warps.txt | 7 + npc/010-1/mapflags.txt | 1 + npc/010-2/_import.txt | 10 + npc/010-2/_warps.txt | 9 + npc/010-2/band.txt | 36 + npc/010-2/chef.txt | 126 ++ npc/010-2/dimonds.txt | 542 +++++++++ npc/010-2/doug.txt | 21 + npc/010-2/loratay.txt | 1053 ++++++++++++++++ npc/010-2/mapflags.txt | 1 + npc/010-2/workers.txt | 15 + npc/011-1/_import.txt | 0 npc/011-1/_mobs.txt | 2 + npc/011-1/_savepoints.txt | 2 + npc/011-1/_warps.txt | 2 + npc/011-1/alchemist.txt | 1033 ++++++++++++++++ npc/011-1/auldsbel.txt | 1284 ++++++++++++++++++++ npc/011-1/mapflags.txt | 1 + npc/011-1/oscar.txt | 486 ++++++++ npc/011-1/shops.txt | 2 + npc/011-3/_import.txt | 6 + npc/011-3/_mobs.txt | 4 + npc/011-3/_warps.txt | 3 + npc/011-3/hermit.txt | 64 + npc/011-3/mapflags.txt | 1 + npc/011-4/_import.txt | 6 + npc/011-4/_mobs.txt | 9 + npc/011-4/_warps.txt | 13 + npc/011-4/bl_barrier.txt | 24 + npc/011-4/mapflags.txt | 1 + npc/011-6/_import.txt | 8 + npc/011-6/_mobs.txt | 49 + npc/011-6/_warps.txt | 24 + npc/011-6/barrier.txt | 15 + npc/011-6/bryant.txt | 73 ++ npc/011-6/crastur.txt | 220 ++++ npc/011-6/mapflags.txt | 1 + npc/012-1/_import.txt | 21 +- npc/012-1/_mobs.txt | 23 +- npc/012-1/_warps.txt | 20 +- npc/012-1/aahna.txt | 17 - npc/012-1/aidan.txt | 19 - npc/012-1/amrak.txt | 9 + npc/012-1/ayasha.txt | 17 - npc/012-1/crasmande.txt | 18 - npc/012-1/flowerpentagram2.txt | 95 ++ npc/012-1/hasan.txt | 18 - npc/012-1/injured-mouboo.txt | 226 ++++ npc/012-1/ishi.txt | 20 - npc/012-1/kaan.txt | 19 - npc/012-1/liana.txt | 25 - npc/012-1/mapflags.txt | 1 + npc/012-1/marine.txt | 17 - npc/012-1/prawors.txt | 18 - npc/012-1/shops.txt | 75 ++ npc/012-1/tiki.txt | 150 --- npc/012-1/vincent.txt | 18 - npc/012-1/wateranimation.txt | 12 - npc/012-1/zegas.txt | 36 - npc/012-2-1/_import.txt | 5 - npc/012-2-1/_warps.txt | 4 - npc/012-2-1/jessie.txt | 30 - npc/012-2-1/tanisha.txt | 18 - npc/012-2-2/_import.txt | 5 - npc/012-2-2/_savepoints.txt | 28 - npc/012-2-2/_warps.txt | 3 - npc/012-2-2/sorfina.txt | 34 - npc/012-2-3/_import.txt | 5 - npc/012-2-3/_warps.txt | 3 - npc/012-2-3/cynric.txt | 54 - npc/012-2-3/nyle.txt | 67 - npc/012-2-4/_import.txt | 5 - npc/012-2-4/_warps.txt | 3 - npc/012-2-4/morgan.txt | 22 - npc/012-2-4/zitoni.txt | 76 -- npc/012-2-5/_import.txt | 5 - npc/012-2-5/_warps.txt | 3 - npc/012-2-5/rosen.txt | 20 - npc/012-2-5/toichi.txt | 73 -- npc/012-2-6/_import.txt | 3 - npc/012-2-6/_warps.txt | 3 - npc/012-2-7/_import.txt | 5 - npc/012-2-7/_savepoints.txt | 15 - npc/012-2-7/_warps.txt | 3 - npc/012-2-7/marazor.txt | 16 - npc/012-3-1/_import.txt | 4 - npc/012-3-1/_mobs.txt | 8 - npc/012-3-1/_warps.txt | 5 - npc/012-3-2/_import.txt | 4 - npc/012-3-2/_mobs.txt | 8 - npc/012-3-2/_warps.txt | 5 - npc/012-3-3/_import.txt | 5 - npc/012-3-3/_mobs.txt | 7 - npc/012-3-3/_warps.txt | 3 - npc/012-3-3/manatree.txt | 19 - npc/012-3/_import.txt | 8 + npc/012-3/_mobs.txt | 18 + npc/012-3/_warps.txt | 12 + npc/012-3/mana-seed.txt | 237 ++++ npc/012-3/mapflags.txt | 1 + npc/012-3/traveler.txt | 7 + npc/012-3/warningsigns.txt | 16 + npc/012-4/_import.txt | 6 + npc/012-4/_mobs.txt | 66 + npc/012-4/_warps.txt | 5 + npc/012-4/mapflags.txt | 1 + npc/012-4/pvpflag.txt | 1 + npc/013-1/_import.txt | 8 + npc/013-1/_mobs.txt | 17 + npc/013-1/_warps.txt | 7 + npc/013-1/flowerpentagram.txt | 102 ++ npc/013-1/mapflags.txt | 1 + npc/013-1/sagatha.txt | 438 +++++++ npc/013-1/traveler.txt | 6 + npc/013-2/_import.txt | 7 + npc/013-2/_warps.txt | 5 + npc/013-2/apprentice.txt | 98 ++ npc/013-2/mapflags.txt | 1 + npc/013-2/notes.txt | 205 ++++ npc/013-2/wizard.txt | 142 +++ npc/013-3/_import.txt | 0 npc/013-3/_mobs.txt | 2 + npc/013-3/_savepoints.txt | 2 + npc/013-3/_warps.txt | 2 + npc/013-3/barrier.txt | 27 + npc/013-3/mapflags.txt | 1 + npc/013-3/mask_chest.txt | 218 ++++ npc/013-3/misc.txt | 5 + npc/013-3/sword_chest.txt | 42 + npc/014-1/_import.txt | 6 + npc/014-1/_mobs.txt | 18 + npc/014-1/_warps.txt | 5 + npc/014-1/mapflags.txt | 1 + npc/014-1/wedding-officiator.txt | 244 ++++ npc/014-3/_import.txt | 5 + npc/014-3/_mobs.txt | 3 + npc/014-3/_warps.txt | 6 + npc/014-3/mapflags.txt | 1 + npc/015-1/_import.txt | 8 + npc/015-1/_mobs.txt | 12 + npc/015-1/_warps.txt | 5 + npc/015-1/alice.txt | 94 ++ npc/015-1/barrier.txt | 5 + npc/015-1/mapflags.txt | 2 + npc/015-1/sword.txt | 323 +++++ npc/015-3/_import.txt | 8 + npc/015-3/_mobs.txt | 6 + npc/015-3/_warps.txt | 3 + npc/015-3/barrier.txt | 38 + npc/015-3/katze.txt | 185 +++ npc/015-3/mapflags.txt | 2 + npc/015-3/pot.txt | 122 ++ npc/016-1/_import.txt | 7 + npc/016-1/_mobs.txt | 11 + npc/016-1/_warps.txt | 4 + npc/016-1/gwendolyn.txt | 539 ++++++++ npc/016-1/mapflags.txt | 2 + npc/016-1/rossy.txt | 288 +++++ npc/016-2/_import.txt | 3 + npc/016-2/_warps.txt | 4 + npc/017-1/_import.txt | 7 + npc/017-1/_mobs.txt | 20 + npc/017-1/_warps.txt | 10 + npc/017-1/flowerpentagram1.txt | 80 ++ npc/017-1/flowerpentagram5.txt | 137 +++ npc/017-1/mapflags.txt | 1 + npc/017-2/_import.txt | 4 + npc/017-2/_warps.txt | 4 + npc/017-2/mapflags.txt | 1 + npc/017-3/_import.txt | 4 + npc/017-3/_warps.txt | 11 + npc/017-3/mapflags.txt | 1 + npc/017-4/_import.txt | 7 + npc/017-4/_warps.txt | 9 + npc/017-4/guardingspirit.txt | 95 ++ npc/017-4/mapflags.txt | 1 + npc/017-4/orum.txt | 821 +++++++++++++ npc/017-4/waric.txt | 397 ++++++ npc/017-9/_import.txt | 5 + npc/017-9/_warps.txt | 7 + npc/017-9/mapflags.txt | 1 + npc/017-9/npcs.txt | 34 + npc/018-1/_import.txt | 9 + npc/018-1/_mobs.txt | 28 + npc/018-1/_warps.txt | 19 + npc/018-1/flowerpentagram3.txt | 109 ++ npc/018-1/mapflags.txt | 1 + npc/018-1/mike.txt | 19 + npc/018-1/miners.txt | 35 + npc/018-1/sword.txt | 10 + npc/018-2/_import.txt | 10 + npc/018-2/_mobs.txt | 3 + npc/018-2/_warps.txt | 9 + npc/018-2/angus.txt | 20 + npc/018-2/books.txt | 21 + npc/018-2/caul.txt | 1088 +++++++++++++++++ npc/018-2/mapflags.txt | 1 + npc/018-2/miners.txt | 173 +++ npc/018-2/receptionist.txt | 66 + npc/018-3/_import.txt | 8 + npc/018-3/_mobs.txt | 25 + npc/018-3/_warps.txt | 24 + npc/018-3/bookcase.txt | 66 + npc/018-3/evil-obelisk.txt | 15 + npc/018-3/mapflags.txt | 1 + npc/018-3/sword.txt | 10 + npc/019-1/_import.txt | 7 + npc/019-1/_mobs.txt | 6 + npc/019-1/_warps.txt | 6 + npc/019-1/mapflags.txt | 1 + npc/019-1/santa_helper.txt | 92 ++ npc/019-1/snowman.txt | 84 ++ npc/019-3/_import.txt | 5 + npc/019-3/_mobs.txt | 4 + npc/019-3/_warps.txt | 5 + npc/019-3/mapflags.txt | 1 + npc/019-4/_import.txt | 5 + npc/019-4/_mobs.txt | 6 + npc/019-4/_warps.txt | 4 + npc/019-4/mapflags.txt | 1 + npc/020-1/KrickKrackKrock.txt | 17 + npc/020-1/_import.txt | 43 +- npc/020-1/_mobs.txt | 64 +- npc/020-1/_warps.txt | 56 +- npc/020-1/adrian.txt | 42 - npc/020-1/aisha.txt | 18 - npc/020-1/anwar.txt | 148 --- npc/020-1/bodyguard.txt | 53 - npc/020-1/boss.txt | 43 - npc/020-1/budifis.txt | 20 - npc/020-1/cyndala.txt | 19 - npc/020-1/ekinu.txt | 18 - npc/020-1/eomie.txt | 192 --- npc/020-1/froma.txt | 19 - npc/020-1/harper.txt | 18 - npc/020-1/hocus.txt | 166 --- npc/020-1/inar.txt | 19 - npc/020-1/issay.txt | 15 - npc/020-1/itka.txt | 48 - npc/020-1/joaquim.txt | 201 --- npc/020-1/joelin.txt | 18 - npc/020-1/jossy.txt | 19 - npc/020-1/mahoud.txt | 18 - npc/020-1/malivox.txt | 23 - npc/020-1/mapflags.txt | 2 + npc/020-1/marikel.txt | 18 - npc/020-1/marine.txt | 17 - npc/020-1/martha.txt | 18 - npc/020-1/neko.txt | 19 - npc/020-1/nickos.txt | 18 - npc/020-1/noke.txt | 19 - npc/020-1/odonell.txt | 18 - npc/020-1/philip.txt | 18 - npc/020-1/popaul.txt | 19 - npc/020-1/pusco.txt | 20 - npc/020-1/rockscissor.txt | 13 + npc/020-1/ryan.txt | 18 - npc/020-1/sander.txt | 18 - npc/020-1/soul-menhir.txt | 15 + npc/020-1/tindris.txt | 30 - npc/020-1/traveler.txt | 6 + npc/020-1/vaspina.txt | 20 - npc/020-1/wateranimation.txt | 20 - npc/020-1/well.txt | 103 ++ npc/020-2-0/_import.txt | 5 - npc/020-2-0/_mobs.txt | 5 - npc/020-2-0/_warps.txt | 3 - npc/020-2-0/kaizer.txt | 18 - npc/020-2-1/_import.txt | 3 - npc/020-2-1/_warps.txt | 5 - npc/020-2-10/_import.txt | 4 - npc/020-2-10/_warps.txt | 4 - npc/020-2-10/hetchel.txt | 33 - npc/020-2-11/_import.txt | 3 - npc/020-2-11/_warps.txt | 3 - npc/020-2-12/_import.txt | 3 - npc/020-2-12/_warps.txt | 3 - npc/020-2-13/_import.txt | 3 - npc/020-2-13/_warps.txt | 3 - npc/020-2-14/_import.txt | 3 - npc/020-2-14/_warps.txt | 3 - npc/020-2-15/_import.txt | 7 - npc/020-2-15/_warps.txt | 3 - npc/020-2-15/eleanore.txt | 16 - npc/020-2-15/kadiya.txt | 21 - npc/020-2-15/memoriam.txt | 19 - npc/020-2-15/yumi.txt | 54 - npc/020-2-16/_import.txt | 3 - npc/020-2-16/_warps.txt | 3 - npc/020-2-17/_import.txt | 3 - npc/020-2-17/_warps.txt | 3 - npc/020-2-18/_import.txt | 4 - npc/020-2-18/_warps.txt | 4 - npc/020-2-18/inya.txt | 19 - npc/020-2-19/_import.txt | 3 - npc/020-2-19/_warps.txt | 3 - npc/020-2-2/_import.txt | 3 - npc/020-2-2/_warps.txt | 4 - npc/020-2-20/_import.txt | 5 - npc/020-2-20/_warps.txt | 6 - npc/020-2-20/drabur.txt | 54 - npc/020-2-20/riskim.txt | 152 --- npc/020-2-21/_import.txt | 3 - npc/020-2-21/_warps.txt | 3 - npc/020-2-22/_import.txt | 3 - npc/020-2-22/_warps.txt | 5 - npc/020-2-23/_import.txt | 3 - npc/020-2-23/_warps.txt | 4 - npc/020-2-24/_import.txt | 4 - npc/020-2-24/_warps.txt | 4 - npc/020-2-24/kylian.txt | 130 -- npc/020-2-25/_import.txt | 3 - npc/020-2-25/_warps.txt | 6 - npc/020-2-26/_import.txt | 4 - npc/020-2-26/_warps.txt | 9 - npc/020-2-26/receptionist.txt | 21 - npc/020-2-27/_import.txt | 3 - npc/020-2-27/_warps.txt | 4 - npc/020-2-28/_import.txt | 4 - npc/020-2-28/_warps.txt | 5 - npc/020-2-28/pauline.txt | 39 - npc/020-2-29/_import.txt | 3 - npc/020-2-29/_warps.txt | 4 - npc/020-2-3/_import.txt | 4 - npc/020-2-3/_warps.txt | 4 - npc/020-2-3/inac.txt | 18 - npc/020-2-30/_import.txt | 4 - npc/020-2-30/_warps.txt | 3 - npc/020-2-30/david.txt | 42 - npc/020-2-31/_import.txt | 3 - npc/020-2-31/_warps.txt | 4 - npc/020-2-32/_import.txt | 3 - npc/020-2-32/_warps.txt | 4 - npc/020-2-33/_import.txt | 3 - npc/020-2-33/_warps.txt | 4 - npc/020-2-34/_import.txt | 5 - npc/020-2-34/_warps.txt | 3 - npc/020-2-34/casino.txt | 17 - npc/020-2-34/donutello.txt | 166 --- npc/020-2-4/_import.txt | 3 - npc/020-2-4/_warps.txt | 3 - npc/020-2-5/_import.txt | 5 - npc/020-2-5/_warps.txt | 5 - npc/020-2-5/dausen.txt | 19 - npc/020-2-5/filipa.txt | 19 - npc/020-2-6/_import.txt | 3 - npc/020-2-6/_warps.txt | 5 - npc/020-2-7/_import.txt | 4 - npc/020-2-7/_warps.txt | 3 - npc/020-2-7/manoli.txt | 19 - npc/020-2-8/_import.txt | 5 - npc/020-2-8/_warps.txt | 3 - npc/020-2-8/heathin.txt | 19 - npc/020-2-8/jhedia.txt | 19 - npc/020-2-9/_import.txt | 5 - npc/020-2-9/_warps.txt | 3 - npc/020-2-9/hydusun.txt | 62 - npc/020-2-9/yanis.txt | 18 - npc/020-2/_import.txt | 8 + npc/020-2/_warps.txt | 8 + npc/020-2/baktar.txt | 225 ++++ npc/020-2/banker.txt | 16 + npc/020-2/furquest.txt | 646 ++++++++++ npc/020-2/mapflags.txt | 2 + npc/020-2/shops.txt | 27 + npc/020-3/_import.txt | 5 + npc/020-3/_mobs.txt | 6 + npc/020-3/_warps.txt | 9 + npc/020-3/mapflags.txt | 1 + npc/021-3/_import.txt | 5 + npc/021-3/_mobs.txt | 12 + npc/021-3/_warps.txt | 6 + npc/021-3/mapflags.txt | 1 + npc/023-1/_import.txt | 4 + npc/023-1/_mobs.txt | 15 + npc/023-1/_warps.txt | 15 + npc/023-2/_import.txt | 3 + npc/023-2/_warps.txt | 2 + npc/023-3/_import.txt | 4 + npc/023-3/_mobs.txt | 8 + npc/023-3/_warps.txt | 10 + npc/025-1/_import.txt | 7 + npc/025-1/_mobs.txt | 12 + npc/025-1/_warps.txt | 5 + npc/025-1/barrier.txt | 15 + npc/025-1/mapflags.txt | 2 + npc/025-1/reset.txt | 5 + npc/025-3/_import.txt | 6 + npc/025-3/_mobs.txt | 6 + npc/025-3/_warps.txt | 4 + npc/025-3/barriers.txt | 1274 +++++++++++++++++++ npc/025-3/mapflags.txt | 1 + npc/025-4/_import.txt | 8 + npc/025-4/_mobs.txt | 4 + npc/025-4/_warps.txt | 3 + npc/025-4/battlecaves.txt | 953 +++++++++++++++ npc/025-4/clauquer.txt | 114 ++ npc/025-4/julia.txt | 44 + npc/025-4/mapflags.txt | 2 + npc/026-1/_import.txt | 11 + npc/026-1/_mobs.txt | 16 + npc/026-1/_warps.txt | 7 + npc/026-1/evil_guard.txt | 26 + npc/026-1/headless_man.txt | 202 +++ npc/026-1/husband.txt | 344 ++++++ npc/026-1/mapflags.txt | 2 + npc/026-1/sign.txt | 6 + npc/026-1/soul-menhir.txt | 15 + npc/026-1/traveler.txt | 7 + npc/026-2/_import.txt | 16 + npc/026-2/_warps.txt | 13 + npc/026-2/barman.txt | 9 + npc/026-2/cerhan.txt | 38 + npc/026-2/crying_child.txt | 206 ++++ npc/026-2/diary.txt | 53 + npc/026-2/door.txt | 20 + npc/026-2/eurni.txt | 15 + npc/026-2/golbenez.txt | 614 ++++++++++ npc/026-2/gy_inn_shops.txt | 34 + npc/026-2/innkeeper.txt | 457 +++++++ npc/026-2/lover.txt | 307 +++++ npc/026-2/mapflags.txt | 2 + npc/026-2/testnpcs.txt | 57 + npc/026-2/werewolf.txt | 176 +++ npc/027-1/_import.txt | 7 + npc/027-1/_mobs.txt | 18 + npc/027-1/_warps.txt | 4 + npc/027-1/crypt.txt | 10 + npc/027-1/graves.txt | 108 ++ npc/027-1/mapflags.txt | 2 + npc/027-2/_import.txt | 8 + npc/027-2/_mobs.txt | 6 + npc/027-2/_warps.txt | 5 + npc/027-2/alacrius.txt | 10 + npc/027-2/caretaker.txt | 112 ++ npc/027-2/mapflags.txt | 2 + npc/027-2/thurston.txt | 21 + npc/027-3/_import.txt | 8 + npc/027-3/_mobs.txt | 10 + npc/027-3/_warps.txt | 4 + npc/027-3/casket_traps.txt | 72 ++ npc/027-3/general_krukan_door.txt | 16 + npc/027-3/mapflags.txt | 1 + npc/027-3/monsters.txt | 66 + npc/027-4/_import.txt | 8 + npc/027-4/_mobs.txt | 7 + npc/027-4/_warps.txt | 4 + npc/027-4/casket_traps.txt | 72 ++ npc/027-4/general_razha_door.txt | 16 + npc/027-4/mapflags.txt | 1 + npc/027-4/monsters.txt | 67 + npc/027-5/_import.txt | 7 + npc/027-5/_mobs.txt | 9 + npc/027-5/_warps.txt | 3 + npc/027-5/casket_traps.txt | 72 ++ npc/027-5/general_terogan_door.txt | 16 + npc/027-5/mapflags.txt | 1 + npc/027-6/_import.txt | 6 + npc/027-6/casket_traps.txt | 63 + npc/027-6/general_krukan.txt | 225 ++++ npc/027-6/general_krukan_exitdoor.txt | 11 + npc/027-6/mapflags.txt | 2 + npc/027-7/_import.txt | 5 + npc/027-7/general_razha.txt | 229 ++++ npc/027-7/general_razha_exitdoor.txt | 11 + npc/027-7/mapflags.txt | 2 + npc/027-8/_import.txt | 5 + npc/027-8/general_terogan.txt | 315 +++++ npc/027-8/general_terogan_exitdoor.txt | 11 + npc/027-8/mapflags.txt | 2 + npc/028-1/_import.txt | 5 + npc/028-1/_warps.txt | 3 + npc/028-1/mapflags.txt | 1 + npc/028-1/portal.txt | 14 + npc/028-3/_import.txt | 4 + npc/028-3/_warps.txt | 3 + npc/028-3/mapflags.txt | 1 + npc/029-1/_import.txt | 21 + npc/029-1/_mobs.txt | 7 + npc/029-1/_warps.txt | 7 + npc/029-1/aahna.txt | 9 + npc/029-1/barrier.txt | 21 + npc/029-1/dock.txt | 42 + npc/029-1/ferry_master.txt | 19 + npc/029-1/hasan.txt | 197 +++ npc/029-1/hideandseek.txt | 369 ++++++ npc/029-1/kaan.txt | 114 ++ npc/029-1/liana.txt | 38 + npc/029-1/mapflags.txt | 1 + npc/029-1/monster_guide.txt | 46 + npc/029-1/rewards_master.txt | 146 +++ npc/029-1/soul-menhir.txt | 15 + npc/029-1/traveler.txt | 7 + npc/029-1/tutorial.txt | 52 + npc/029-1/valon.txt | 137 +++ npc/029-1/vincent.txt | 134 ++ npc/029-1/zegas.txt | 94 ++ npc/029-2/_import.txt | 16 + npc/029-2/_mobs.txt | 3 + npc/029-2/_warps.txt | 8 + npc/029-2/alchemy.txt | 98 ++ npc/029-2/bankroom.txt | 5 + npc/029-2/barrels.txt | 45 + npc/029-2/barrels_config.txt | 84 ++ npc/029-2/cynric.txt | 6 + npc/029-2/mapflags.txt | 3 + npc/029-2/morgan.txt | 113 ++ npc/029-2/nyle.txt | 47 + npc/029-2/sorfina.txt | 387 ++++++ npc/029-2/stat_reset.txt | 49 + npc/029-2/tanisha.txt | 286 +++++ npc/029-2/two_arms.txt | 3 + npc/029-3/_import.txt | 5 + npc/029-3/barrier.txt | 9 + npc/029-3/mapflags.txt | 2 + npc/029-3/parua.txt | 400 ++++++ npc/029-4/_import.txt | 4 + npc/029-4/_mobs.txt | 8 + npc/029-4/_warps.txt | 3 + npc/030-1/_import.txt | 4 + npc/030-1/_mobs.txt | 6 + npc/030-1/_warps.txt | 3 + npc/030-2/_import.txt | 17 + npc/030-2/_warps.txt | 17 + npc/030-2/avalia.txt | 219 ++++ npc/030-2/basic_npcs.txt | 73 ++ npc/030-2/bedding_helper.txt | 97 ++ npc/030-2/chief_helper.txt | 92 ++ npc/030-2/eljas.txt | 206 ++++ npc/030-2/empty_boxes_helper.txt | 63 + npc/030-2/glitter_helper.txt | 94 ++ npc/030-2/guards.txt | 32 + npc/030-2/mapflags.txt | 1 + npc/030-2/present_helper.txt | 82 ++ npc/030-2/roasted_acorns_helper.txt | 73 ++ npc/030-2/shipping_helper.txt | 113 ++ npc/030-2/storage_helper.txt | 104 ++ npc/030-2/wrapping_paper_helper.txt | 139 +++ npc/030-3/_import.txt | 5 + npc/030-3/_warps.txt | 3 + npc/030-3/mapflags.txt | 1 + npc/030-3/orum_homunculus.txt | 466 +++++++ npc/030-4/_import.txt | 4 + npc/030-4/mana_battery.txt | 433 +++++++ npc/030-4/mapflags.txt | 2 + npc/031-1/_import.txt | 9 + npc/031-1/_mobs.txt | 6 + npc/031-1/_warps.txt | 5 + npc/031-1/angelaOutside.txt | 138 +++ npc/031-1/dock.txt | 40 + npc/031-1/frozenbeard.txt | 22 + npc/031-1/house.txt | 11 + npc/031-1/mapflags.txt | 1 + npc/031-2/_import.txt | 6 + npc/031-2/_warps.txt | 4 + npc/031-2/angelaHouse.txt | 88 ++ npc/031-2/cindyHouse.txt | 43 + npc/031-2/mapflags.txt | 1 + npc/031-3/_import.txt | 6 + npc/031-3/_mobs.txt | 91 ++ npc/031-3/_warps.txt | 51 + npc/031-3/labyrinth.txt | 10 + npc/031-3/mapflags.txt | 1 + npc/031-4/_import.txt | 5 + npc/031-4/barrier.txt | 9 + npc/031-4/cindyCave.txt | 224 ++++ npc/031-4/mapflags.txt | 2 + npc/032-3/_import.txt | 5 + npc/032-3/_mobs.txt | 12 + npc/032-3/_warps.txt | 4 + npc/032-3/mapflags.txt | 1 + npc/033-1/_import.txt | 11 + npc/033-1/_mobs.txt | 6 + npc/033-1/_warps.txt | 4 + npc/033-1/backDoor.txt | 9 + npc/033-1/barbarianinit.txt | 25 + npc/033-1/birrod.txt | 263 ++++ npc/033-1/kimarr.txt | 405 ++++++ npc/033-1/mapflags.txt | 1 + npc/033-1/traveler.txt | 7 + npc/033-1/yerrnk.txt | 180 +++ npc/034-1/_import.txt | 7 + npc/034-1/_mobs.txt | 8 + npc/034-1/_warps.txt | 8 + npc/034-1/ambushs.txt | 870 +++++++++++++ npc/034-1/mapflags.txt | 1 + npc/034-1/yetiSpawn.txt | 58 + npc/034-2/_import.txt | 4 + npc/034-2/_warps.txt | 4 + npc/034-2/mapflags.txt | 1 + npc/035-2/_import.txt | 7 + npc/035-2/casino.txt | 9 + npc/035-2/emblems.txt | 36 + npc/035-2/koga.txt | 31 + npc/035-2/mapflags.txt | 2 + npc/035-2/shops.txt | 11 + npc/036-2/_import.txt | 7 + npc/036-2/casino.txt | 9 + npc/036-2/emblems.txt | 26 + npc/036-2/koga-candor.txt | 25 + npc/036-2/mapflags.txt | 2 + npc/036-2/shops.txt | 12 + npc/041-1/_import.txt | 4 + npc/041-1/_mobs.txt | 13 + npc/041-1/_warps.txt | 4 + npc/042-1/_import.txt | 4 + npc/042-1/_mobs.txt | 12 + npc/042-1/_warps.txt | 4 + npc/043-1/_import.txt | 4 + npc/043-1/_mobs.txt | 5 + npc/043-1/_warps.txt | 3 + npc/043-3/_import.txt | 5 + npc/043-3/_mobs.txt | 11 + npc/043-3/_warps.txt | 6 + npc/043-3/mapflags.txt | 1 + npc/043-4/_import.txt | 5 + npc/043-4/_mobs.txt | 24 + npc/043-4/_warps.txt | 6 + npc/043-4/mapflags.txt | 1 + npc/045-1/_import.txt | 5 + npc/045-1/_mobs.txt | 17 + npc/045-1/_warps.txt | 5 + npc/045-1/mapflags.txt | 1 + npc/046-1/_import.txt | 5 + npc/046-1/_mobs.txt | 13 + npc/046-1/_warps.txt | 12 + npc/046-1/mapflags.txt | 1 + npc/046-3/_import.txt | 5 + npc/046-3/_mobs.txt | 17 + npc/046-3/_warps.txt | 8 + npc/046-3/mapflags.txt | 1 + npc/047-1/_import.txt | 5 + npc/047-1/_mobs.txt | 24 + npc/047-1/_warps.txt | 16 + npc/047-1/mapflags.txt | 1 + npc/047-3/_import.txt | 5 + npc/047-3/_mobs.txt | 23 + npc/047-3/_warps.txt | 11 + npc/047-3/mapflags.txt | 1 + npc/048-2/_import.txt | 26 + npc/048-2/_warps.txt | 19 + npc/048-2/bluesageConfig.txt | 71 ++ npc/048-2/helperAccused.txt | 139 +++ npc/048-2/helperBookpages1.txt | 136 +++ npc/048-2/helperBookpages2.txt | 83 ++ npc/048-2/helperBookpages3.txt | 62 + npc/048-2/helperChief.txt | 117 ++ npc/048-2/helperCleaning1.txt | 98 ++ npc/048-2/helperCleaning2.txt | 67 + npc/048-2/helperCleaning3.txt | 71 ++ npc/048-2/helperCleaning4.txt | 62 + npc/048-2/helperCleaning5.txt | 64 + npc/048-2/helperJanitor.txt | 96 ++ npc/048-2/helperMInk.txt | 100 ++ npc/048-2/helperMReed.txt | 89 ++ npc/048-2/helperMSilk.txt | 84 ++ npc/048-2/helperMYetiClaw.txt | 91 ++ npc/048-2/helperResting1.txt | 63 + npc/048-2/helperResting2.txt | 64 + npc/048-2/mapflags.txt | 1 + npc/048-2/sageNikolai.txt | 281 +++++ npc/048-2/slimes.txt | 603 +++++++++ npc/048-2/traveler.txt | 7 + npc/048-2/visitors.txt | 36 + npc/051-1/_import.txt | 9 + npc/051-1/_mobs.txt | 4 + npc/051-1/desert.txt | 132 ++ npc/051-1/desertmonsters.txt | 154 +++ npc/051-1/forest.txt | 76 ++ npc/051-1/forestmonsters.txt | 22 + npc/051-1/janitor.txt | 23 + npc/051-1/mapflags.txt | 2 + npc/051-3/_import.txt | 9 + npc/051-3/_mobs.txt | 18 + npc/051-3/ambush.txt | 165 +++ npc/051-3/jailslimes.txt | 29 + npc/051-3/janitor.txt | 9 + npc/051-3/locks.txt | 65 + npc/051-3/mapflags.txt | 2 + npc/051-3/reinforcements.txt | 83 ++ npc/052-1/_import.txt | 6 + npc/052-1/_mobs.txt | 3 + npc/052-1/channelling.txt | 324 +++++ npc/052-1/janitor.txt | 17 + npc/052-1/mapflags.txt | 2 + npc/052-2/_import.txt | 8 + npc/052-2/chest.txt | 167 +++ npc/052-2/janitor.txt | 32 + npc/052-2/lobby.txt | 352 ++++++ npc/052-2/mapflags.txt | 2 + npc/052-2/partyroom.txt | 267 ++++ npc/052-2/storage.txt | 179 +++ npc/055-1/_import.txt | 8 + npc/055-1/_mobs.txt | 19 + npc/055-1/_warps.txt | 9 + npc/055-1/flowerpentagram4.txt | 123 ++ npc/055-1/mapflags.txt | 1 + npc/055-1/pumpkins.txt | 150 +++ npc/055-1/traveler.txt | 7 + npc/055-3/_import.txt | 5 + npc/055-3/_mobs.txt | 10 + npc/055-3/_warps.txt | 8 + npc/055-3/mapflags.txt | 1 + npc/056-2/_import.txt | 7 + npc/056-2/_warps.txt | 4 + npc/056-2/barrier.txt | 17 + npc/056-2/mapflags.txt | 2 + npc/056-2/mirak.txt | 139 +++ npc/056-2/notes.txt | 13 + npc/057-1/_import.txt | 5 + npc/057-1/_mobs.txt | 20 + npc/057-1/_warps.txt | 3 + npc/057-1/mapflags.txt | 1 + npc/069-2/_import.txt | 3 + npc/069-2/_warps.txt | 4 + npc/070-1/_import.txt | 2 + npc/070-3/_import.txt | 2 + npc/099-1/_import.txt | 3 + npc/099-1/_warps.txt | 67 + npc/099-2/_import.txt | 3 + npc/099-2/_warps.txt | 22 + npc/099-3/_import.txt | 3 + npc/099-3/_warps.txt | 16 + npc/099-4/_import.txt | 2 + npc/099-5/_import.txt | 2 + npc/099-6/_import.txt | 3 + npc/099-6/_warps.txt | 22 + npc/099-7/_import.txt | 2 + npc/099-8/_import.txt | 2 + npc/_anchors.txt | 47 - npc/_import.txt | 287 ++--- npc/annuals/check_time.txt | 46 + npc/annuals/fathertime.txt | 15 + npc/annuals/halloween/config.txt | 285 +++++ npc/annuals/halloween/debug.txt | 138 +++ npc/annuals/halloween/munro.txt | 46 + npc/annuals/halloween/trick_or_treat.txt | 322 +++++ npc/annuals/tree_beard.txt | 121 ++ npc/annuals/xmas/barriers.txt | 155 +++ npc/annuals/xmas/config.txt | 252 ++++ npc/annuals/xmas/core.txt | 229 ++++ npc/annuals/xmas/debug.txt | 220 ++++ npc/annuals/xmas/helpers.txt | 44 + npc/annuals/xmas/list.txt | 98 ++ npc/annuals/xmas/mobmanager.txt | 77 ++ npc/annuals/xmas/reagents.txt | 139 +++ npc/annuals/xmas/states.txt | 51 + npc/botcheck/_import.txt | 1 + npc/botcheck/mapflags.txt | 2 + npc/commands/bodytype.txt | 53 - npc/commands/changesex.txt | 31 + npc/commands/class.txt | 30 + npc/commands/debug-look.txt | 83 -- npc/commands/debug-preset.txt | 253 ---- npc/commands/debug-quest.txt | 217 ---- npc/commands/debug-skill.txt | 94 -- npc/commands/debug.txt | 1109 +++++++++++++++-- npc/commands/destroynpc.txt | 34 + npc/commands/event.txt | 57 - npc/commands/gm.txt | 41 - npc/commands/hug.txt | 24 + npc/commands/marry.txt | 68 ++ npc/commands/mobinfo.txt | 29 - npc/commands/motd.txt | 194 --- npc/commands/music.txt | 88 +- npc/commands/mute.txt | 92 ++ npc/commands/npctalk.txt | 22 + npc/commands/numa.txt | 127 ++ npc/commands/pullrabbit.txt | 25 + npc/commands/python.txt | 24 - npc/commands/rate-management.txt | 107 -- npc/commands/remotecmd.txt | 61 + npc/commands/resync.txt | 40 - npc/commands/scheduled-broadcasts.txt | 227 ---- npc/commands/super-menu.txt | 68 -- npc/commands/warp.txt | 129 +- npc/commands/zeny.txt | 160 ++- npc/config/hairstyle_config.txt | 26 - npc/config/location.txt | 83 -- npc/config/magic.txt | 451 ------- npc/dev/ci_test.txt | 47 - npc/dev/test.txt | 814 ------------- npc/fermi/_import.txt | 3 - npc/fermi/_warps.txt | 3 - npc/functions/DyeConfig.txt | 41 + npc/functions/RNGesus.txt | 87 -- npc/functions/afk.txt | 69 -- npc/functions/announcements.txt | 177 +++ npc/functions/array.txt | 445 ------- npc/functions/asklanguage.txt | 56 - npc/functions/asleep.txt | 19 - npc/functions/bank.txt | 297 ----- npc/functions/banker.txt | 251 ++++ npc/functions/barber.txt | 425 +++---- npc/functions/beds.txt | 22 - npc/functions/bitwise.txt | 66 - npc/functions/bodytype.txt | 19 - npc/functions/casino.txt | 254 ---- npc/functions/clear_vars.txt | 184 +++ npc/functions/clientversion.txt | 20 - npc/functions/confused-tree-dict.txt | 515 -------- npc/functions/crafting.txt | 119 -- npc/functions/daily.txt | 154 --- npc/functions/dailyquest.txt | 164 +++ npc/functions/default_npc_checks.txt | 143 +++ npc/functions/doors.txt | 65 - npc/functions/dynamic_menu.txt | 289 +++++ npc/functions/event-listeners.txt | 169 --- npc/functions/evil_obelisk.txt | 96 ++ npc/functions/faction.txt | 104 -- npc/functions/ferry.txt | 135 ++ npc/functions/fishing.txt | 401 ------ npc/functions/game-rules.txt | 66 - npc/functions/game_rules.txt | 22 + npc/functions/generic-text.txt | 120 -- npc/functions/global_event_handler.txt | 83 +- npc/functions/gm_island.txt | 71 ++ npc/functions/goodbye.txt | 28 - npc/functions/hammocks.txt | 50 - npc/functions/harbours.txt | 39 - npc/functions/headstyles.txt | 97 ++ npc/functions/hello.txt | 23 - npc/functions/inn.txt | 34 + npc/functions/input.txt | 66 - npc/functions/inventoryplace.txt | 37 - npc/functions/jesusalvatr.txt | 43 + npc/functions/legacy.txt | 238 ---- npc/functions/legiontalk.txt | 66 - npc/functions/libquest.txt | 104 -- npc/functions/lockpicking.txt | 87 ++ npc/functions/lockpicks.txt | 193 --- npc/functions/magic.txt | 159 +++ npc/functions/main.txt | 445 ------- npc/functions/manhole.txt | 73 -- npc/functions/masks.txt | 43 - npc/functions/math.txt | 50 - npc/functions/mob_points.txt | 195 +++ npc/functions/motd.txt | 10 + npc/functions/motdconfig.txt | 38 + npc/functions/mouboofunc.txt | 89 -- npc/functions/music.txt | 87 -- npc/functions/npcmove.txt | 142 --- npc/functions/npcmovegraph.txt | 485 -------- npc/functions/openbook.txt | 34 - npc/functions/permissions.txt | 35 - npc/functions/player-cache.txt | 501 -------- npc/functions/process_equip.txt | 26 + npc/functions/quest-debug/000-ShipQuests_Julia.txt | 37 - npc/functions/quest-debug/001-ShipQuests_Arpan.txt | 27 - npc/functions/quest-debug/002-ShipQuests_Alige.txt | 27 - npc/functions/quest-debug/003-ShipQuests_Peter.txt | 36 - npc/functions/quest-debug/004-ShipQuests_Nard.txt | 38 - npc/functions/quest-debug/005-ShipQuests_Knife.txt | 25 - .../quest-debug/006-ShipQuests_ArpanMoney.txt | 27 - npc/functions/quest-debug/007-ShipQuests_Door.txt | 25 - .../quest-debug/008-ShipQuests_Couwan.txt | 26 - .../quest-debug/009-ShipQuests_TreasureChest.txt | 25 - npc/functions/quest-debug/010-ShipQuests_Ale.txt | 25 - .../quest-debug/011-ShipQuests_Astapolos.txt | 25 - .../quest-debug/012-ShipQuests_Gulukan.txt | 25 - npc/functions/quest-debug/013-ShipQuests_Jalad.txt | 25 - .../quest-debug/014-ShipQuests_QMuller.txt | 25 - npc/functions/quest-debug/015-ShipQuests_Tibbo.txt | 25 - npc/functions/quest-debug/016-ShipQuests_Gugli.txt | 48 - .../quest-debug/017-ShipQuests_ChefGado.txt | 30 - npc/functions/quest-debug/018-General_Cookies.txt | 25 - .../quest-debug/020-ArtisQuests_LazyBrother.txt | 28 - .../quest-debug/021-ArtisQuests_Urchin.txt | 26 - .../quest-debug/022-ArtisQuests_CatchPiou.txt | 26 - .../quest-debug/023-ArtisQuests_Fishman.txt | 26 - .../quest-debug/024-ArtisQuests_QOnan.txt | 27 - npc/functions/quest-debug/026-General_Rumly.txt | 27 - .../quest-debug/027-ArtisQuests_Enora.txt | 49 - .../quest-debug/029-ArtisQuests_Fexil.txt | 27 - .../quest-debug/030-ArtisQuests_Lloyd.txt | 25 - npc/functions/quest-debug/031-General_Janus.txt | 31 - .../quest-debug/032-ArtisQuests_MonaDad.txt | 26 - .../quest-debug/033-Artis_Legion_Progress.txt | 31 - .../quest-debug/034-ArtisQuests_TrainingLegion.txt | 28 - .../quest-debug/035-ThiefQuests_Artis.txt | 38 - .../quest-debug/050-HurnscaldQuests_Hinnak.txt | 32 - .../quest-debug/051-HurnscaldQuests_Soup.txt | 32 - .../quest-debug/052-HurnscaldQuests_Inspector.txt | 41 - .../quest-debug/053-HurnscaldQuests_ForestBow.txt | 42 - .../054-HurnscaldQuests_WoodenShield.txt | 37 - npc/functions/quest-debug/055-General_Cooking.txt | 92 -- .../quest-debug/056-General_Brotherhood.txt | 27 - .../quest-debug/057-HurnscaldQuests_Kfahr.txt | 31 - .../quest-debug/058-ArgaesQuest_Galimatia.txt | 32 - .../quest-debug/059-HurnscaldQuests_Rossy.txt | 43 - npc/functions/quest-debug/061-General_Hal.txt | 30 - npc/functions/quest-debug/100-General_Narrator.txt | 27 - npc/functions/quest-debug/functions.txt | 109 -- npc/functions/questgen.txt | 38 - npc/functions/quiz.txt | 92 ++ npc/functions/referral.txt | 43 - npc/functions/refine.txt | 66 - npc/functions/resetstatus.txt | 117 -- npc/functions/riddle.txt | 74 -- npc/functions/sailordialogue.txt | 53 - npc/functions/sailortalk.txt | 37 - npc/functions/savepoint.txt | 57 - npc/functions/scoreboards.txt | 291 ----- npc/functions/shops.txt | 18 - npc/functions/skills.txt | 20 - npc/functions/slot_machine.txt | 41 + npc/functions/soul-menhir.txt | 75 -- npc/functions/soul_menhir.txt | 56 + npc/functions/spotlight.txt | 92 -- npc/functions/stat_reset.txt | 49 + npc/functions/string.txt | 196 --- npc/functions/time.txt | 247 ++-- npc/functions/timer.txt | 63 - npc/functions/travelers.txt | 241 ++++ npc/functions/treasure.txt | 134 -- npc/functions/undead_debug.txt | 111 ++ npc/functions/util.txt | 102 -- npc/functions/vault.txt | 98 -- npc/functions/villagertalk.txt | 53 - npc/functions/warp.txt | 58 - npc/functions/water_bottle.txt | 43 + npc/items/check_wand.txt | 0 npc/items/cookie.txt | 22 - npc/items/croconut.txt | 72 -- npc/items/gift.txt | 35 - npc/items/launcher_ammo.txt | 19 + npc/items/master_skillbook.txt | 164 --- npc/items/mirror.txt | 18 + npc/items/music_toys.txt | 18 - npc/items/pickled_beets.txt | 9 + npc/items/purification_potion.txt | 26 + npc/items/rand_sc_heal.txt | 85 -- npc/items/recipes.txt | 352 ------ npc/items/require_stat.txt | 13 + npc/items/restricted_item.txt | 14 + npc/items/rubber_bat.txt | 10 + npc/items/scissors.txt | 13 + npc/items/shock_sweet.txt | 14 + npc/items/shovel.txt | 361 ------ npc/items/unequipcb.txt | 22 + npc/items/unreleased_item.txt | 12 + npc/items/warpTowels.txt | 152 +++ npc/magic/level0-antiprotect.txt | 22 + npc/magic/level0-discharge.txt | 17 + npc/magic/level0-wand.txt | 83 ++ npc/magic/level1-aggravate.txt | 28 + npc/magic/level1-detect-magic.txt | 29 + npc/magic/level1-experience.txt | 45 + npc/magic/level1-flare-dart.txt | 51 + npc/magic/level1-grow-alizarin.txt | 37 + npc/magic/level1-grow-cobalt.txt | 37 + npc/magic/level1-grow-gamboge.txt | 37 + npc/magic/level1-grow-mauve.txt | 37 + npc/magic/level1-lesser-heal.txt | 50 + npc/magic/level1-magic-blade.txt | 54 + npc/magic/level1-make-sulphur.txt | 24 + npc/magic/level1-sense-spouse.txt | 24 + npc/magic/level1-summon-maggots.txt | 55 + npc/magic/level1-transmute-wood.txt | 36 + npc/magic/level2-arrow-hail.txt | 115 ++ npc/magic/level2-barrier.txt | 47 + npc/magic/level2-detect-players.txt | 33 + npc/magic/level2-enchant-lifestone.txt | 35 + npc/magic/level2-flying-backpack.txt | 42 + npc/magic/level2-happy-curse.txt | 42 + npc/magic/level2-hide.txt | 46 + npc/magic/level2-lay-on-hands.txt | 58 + npc/magic/level2-lightning-strike.txt | 86 ++ npc/magic/level2-magic-knuckles.txt | 51 + npc/magic/level2-make-arrows.txt | 26 + npc/magic/level2-make-iron-powder.txt | 26 + npc/magic/level2-make-shirt.txt | 24 + npc/magic/level2-make-short-tanktop.txt | 24 + npc/magic/level2-make-tanktop.txt | 24 + npc/magic/level2-protect.txt | 48 + npc/magic/level2-rain.txt | 104 ++ npc/magic/level2-shear.txt | 67 + npc/magic/level2-summon-fluffies.txt | 56 + npc/magic/level2-summon-mouboo.txt | 56 + npc/magic/level2-summon-pinkie.txt | 56 + npc/magic/level2-summon-snakes.txt | 57 + npc/magic/level2-summon-spiky-mushroom.txt | 56 + npc/magic/level2-summon-wickedmushroom.txt | 57 + npc/magic/level2-toxic-dart.txt | 57 + npc/magic/level3-necromancy.txt | 51 + npc/marine-2/_import.txt | 4 - npc/marine-2/_mobs.txt | 4 - npc/marine-2/main.txt | 60 - npc/marine/_import.txt | 4 - npc/marine/_mobs.txt | 3 - npc/marine/saluc.txt | 137 --- npc/scripts.conf | 228 +--- npc/sec_pri/_import.txt | 3 - npc/sec_pri/redirect.txt | 12 - npc/test/_import.txt | 12 - npc/test/_mobs.txt | 15 - npc/test/mapflags.txt | 2 - npc/test/npc1.txt | 712 ----------- npc/test/npc2.txt | 35 - npc/test/npc3.txt | 7 - npc/test/npc4.txt | 30 - npc/test/npc5.txt | 34 - npc/test/npc6.txt | 23 - npc/test/test1.txt | 165 --- npc/test/test2.txt | 13 - npc/testbg/_import.txt | 3 - npc/testbg/mapflags.txt | 1 - 2251 files changed, 65403 insertions(+), 49405 deletions(-) delete mode 100644 maps/pre-re/000-0-0.mcache delete mode 100644 maps/pre-re/000-0-1.mcache delete mode 100644 maps/pre-re/000-0.mcache delete mode 100644 maps/pre-re/000-2-0.mcache delete mode 100644 maps/pre-re/000-2-1.mcache delete mode 100644 maps/pre-re/000-2-2.mcache delete mode 100644 maps/pre-re/000-2-3.mcache delete mode 100644 maps/pre-re/000-2-4.mcache delete mode 100644 maps/pre-re/001-2-0.mcache delete mode 100644 maps/pre-re/001-2-1.mcache delete mode 100644 maps/pre-re/001-2-10.mcache delete mode 100644 maps/pre-re/001-2-11.mcache delete mode 100644 maps/pre-re/001-2-12.mcache delete mode 100644 maps/pre-re/001-2-13.mcache delete mode 100644 maps/pre-re/001-2-14.mcache delete mode 100644 maps/pre-re/001-2-15.mcache delete mode 100644 maps/pre-re/001-2-16.mcache delete mode 100644 maps/pre-re/001-2-17.mcache delete mode 100644 maps/pre-re/001-2-18.mcache delete mode 100644 maps/pre-re/001-2-19.mcache delete mode 100644 maps/pre-re/001-2-2.mcache delete mode 100644 maps/pre-re/001-2-20.mcache delete mode 100644 maps/pre-re/001-2-21.mcache delete mode 100644 maps/pre-re/001-2-22.mcache delete mode 100644 maps/pre-re/001-2-23.mcache delete mode 100644 maps/pre-re/001-2-24.mcache delete mode 100644 maps/pre-re/001-2-25.mcache delete mode 100644 maps/pre-re/001-2-26.mcache delete mode 100644 maps/pre-re/001-2-27.mcache delete mode 100644 maps/pre-re/001-2-28.mcache delete mode 100644 maps/pre-re/001-2-29.mcache delete mode 100644 maps/pre-re/001-2-3.mcache delete mode 100644 maps/pre-re/001-2-30.mcache delete mode 100644 maps/pre-re/001-2-31.mcache delete mode 100644 maps/pre-re/001-2-32.mcache delete mode 100644 maps/pre-re/001-2-33.mcache delete mode 100644 maps/pre-re/001-2-34.mcache delete mode 100644 maps/pre-re/001-2-35.mcache delete mode 100644 maps/pre-re/001-2-36.mcache delete mode 100644 maps/pre-re/001-2-37.mcache delete mode 100644 maps/pre-re/001-2-38.mcache delete mode 100644 maps/pre-re/001-2-39.mcache delete mode 100644 maps/pre-re/001-2-4.mcache delete mode 100644 maps/pre-re/001-2-40.mcache delete mode 100644 maps/pre-re/001-2-41.mcache delete mode 100644 maps/pre-re/001-2-42.mcache delete mode 100644 maps/pre-re/001-2-43.mcache delete mode 100644 maps/pre-re/001-2-5.mcache delete mode 100644 maps/pre-re/001-2-6.mcache delete mode 100644 maps/pre-re/001-2-7.mcache delete mode 100644 maps/pre-re/001-2-8.mcache delete mode 100644 maps/pre-re/001-2-9.mcache create mode 100644 maps/pre-re/001-2.mcache delete mode 100644 maps/pre-re/001-3-0.mcache delete mode 100644 maps/pre-re/001-3-1.mcache delete mode 100644 maps/pre-re/001-3-2.mcache create mode 100644 maps/pre-re/001-3.mcache create mode 100644 maps/pre-re/002-1.mcache create mode 100644 maps/pre-re/002-2.mcache create mode 100644 maps/pre-re/002-3.mcache create mode 100644 maps/pre-re/002-4.mcache create mode 100644 maps/pre-re/002-5.mcache create mode 100644 maps/pre-re/003-1.mcache create mode 100644 maps/pre-re/003-4.mcache create mode 100644 maps/pre-re/004-1.mcache create mode 100644 maps/pre-re/004-3.mcache create mode 100644 maps/pre-re/004-4.mcache create mode 100644 maps/pre-re/004-5.mcache create mode 100644 maps/pre-re/005-3.mcache create mode 100644 maps/pre-re/006-1.mcache create mode 100644 maps/pre-re/006-2.mcache create mode 100644 maps/pre-re/006-3.mcache create mode 100644 maps/pre-re/007-1.mcache create mode 100644 maps/pre-re/007-2.mcache delete mode 100644 maps/pre-re/008-1-1.mcache delete mode 100644 maps/pre-re/008-2-0.mcache delete mode 100644 maps/pre-re/008-2-1.mcache delete mode 100644 maps/pre-re/008-2-10.mcache delete mode 100644 maps/pre-re/008-2-11.mcache delete mode 100644 maps/pre-re/008-2-12.mcache delete mode 100644 maps/pre-re/008-2-13.mcache delete mode 100644 maps/pre-re/008-2-14.mcache delete mode 100644 maps/pre-re/008-2-15.mcache delete mode 100644 maps/pre-re/008-2-16.mcache delete mode 100644 maps/pre-re/008-2-17.mcache delete mode 100644 maps/pre-re/008-2-18.mcache delete mode 100644 maps/pre-re/008-2-19.mcache delete mode 100644 maps/pre-re/008-2-2.mcache delete mode 100644 maps/pre-re/008-2-20.mcache delete mode 100644 maps/pre-re/008-2-21.mcache delete mode 100644 maps/pre-re/008-2-22.mcache delete mode 100644 maps/pre-re/008-2-23.mcache delete mode 100644 maps/pre-re/008-2-24.mcache delete mode 100644 maps/pre-re/008-2-25.mcache delete mode 100644 maps/pre-re/008-2-26.mcache delete mode 100644 maps/pre-re/008-2-27.mcache delete mode 100644 maps/pre-re/008-2-28.mcache delete mode 100644 maps/pre-re/008-2-29.mcache delete mode 100644 maps/pre-re/008-2-3.mcache delete mode 100644 maps/pre-re/008-2-30.mcache delete mode 100644 maps/pre-re/008-2-31.mcache delete mode 100644 maps/pre-re/008-2-32.mcache delete mode 100644 maps/pre-re/008-2-4.mcache delete mode 100644 maps/pre-re/008-2-5.mcache delete mode 100644 maps/pre-re/008-2-6.mcache delete mode 100644 maps/pre-re/008-2-7.mcache delete mode 100644 maps/pre-re/008-2-8.mcache delete mode 100644 maps/pre-re/008-2-9.mcache delete mode 100644 maps/pre-re/008-3-0.mcache delete mode 100644 maps/pre-re/008-3-1.mcache delete mode 100644 maps/pre-re/008-3-2.mcache delete mode 100644 maps/pre-re/008-3-3.mcache delete mode 100644 maps/pre-re/008-3-4.mcache delete mode 100644 maps/pre-re/008-3-5.mcache delete mode 100644 maps/pre-re/008-3-6.mcache delete mode 100644 maps/pre-re/009-2-0.mcache delete mode 100644 maps/pre-re/009-2-1.mcache delete mode 100644 maps/pre-re/009-2-10.mcache delete mode 100644 maps/pre-re/009-2-11.mcache delete mode 100644 maps/pre-re/009-2-12.mcache delete mode 100644 maps/pre-re/009-2-13.mcache delete mode 100644 maps/pre-re/009-2-14.mcache delete mode 100644 maps/pre-re/009-2-15.mcache delete mode 100644 maps/pre-re/009-2-16.mcache delete mode 100644 maps/pre-re/009-2-17.mcache delete mode 100644 maps/pre-re/009-2-18.mcache delete mode 100644 maps/pre-re/009-2-2.mcache delete mode 100644 maps/pre-re/009-2-3.mcache delete mode 100644 maps/pre-re/009-2-4.mcache delete mode 100644 maps/pre-re/009-2-5.mcache delete mode 100644 maps/pre-re/009-2-6.mcache delete mode 100644 maps/pre-re/009-2-7.mcache delete mode 100644 maps/pre-re/009-2-8.mcache delete mode 100644 maps/pre-re/009-2-9.mcache create mode 100644 maps/pre-re/009-2.mcache create mode 100644 maps/pre-re/009-3.mcache create mode 100644 maps/pre-re/009-4.mcache create mode 100644 maps/pre-re/009-5.mcache create mode 100644 maps/pre-re/009-6.mcache create mode 100644 maps/pre-re/009-7.mcache create mode 100644 maps/pre-re/009-8.mcache create mode 100644 maps/pre-re/010-1.mcache create mode 100644 maps/pre-re/010-2.mcache create mode 100644 maps/pre-re/011-1.mcache create mode 100644 maps/pre-re/011-3.mcache create mode 100644 maps/pre-re/011-4.mcache create mode 100644 maps/pre-re/011-6.mcache delete mode 100644 maps/pre-re/012-2-1.mcache delete mode 100644 maps/pre-re/012-2-2.mcache delete mode 100644 maps/pre-re/012-2-3.mcache delete mode 100644 maps/pre-re/012-2-4.mcache delete mode 100644 maps/pre-re/012-2-5.mcache delete mode 100644 maps/pre-re/012-2-6.mcache delete mode 100644 maps/pre-re/012-2-7.mcache delete mode 100644 maps/pre-re/012-3-1.mcache delete mode 100644 maps/pre-re/012-3-2.mcache delete mode 100644 maps/pre-re/012-3-3.mcache create mode 100644 maps/pre-re/012-3.mcache create mode 100644 maps/pre-re/012-4.mcache create mode 100644 maps/pre-re/013-1.mcache create mode 100644 maps/pre-re/013-2.mcache create mode 100644 maps/pre-re/013-3.mcache create mode 100644 maps/pre-re/014-1.mcache create mode 100644 maps/pre-re/014-3.mcache create mode 100644 maps/pre-re/015-1.mcache create mode 100644 maps/pre-re/015-3.mcache create mode 100644 maps/pre-re/016-1.mcache create mode 100644 maps/pre-re/016-2.mcache create mode 100644 maps/pre-re/017-1.mcache create mode 100644 maps/pre-re/017-2.mcache create mode 100644 maps/pre-re/017-3.mcache create mode 100644 maps/pre-re/017-4.mcache create mode 100644 maps/pre-re/017-9.mcache create mode 100644 maps/pre-re/018-1.mcache create mode 100644 maps/pre-re/018-2.mcache create mode 100644 maps/pre-re/018-3.mcache create mode 100644 maps/pre-re/019-1.mcache create mode 100644 maps/pre-re/019-3.mcache create mode 100644 maps/pre-re/019-4.mcache delete mode 100644 maps/pre-re/020-2-0.mcache delete mode 100644 maps/pre-re/020-2-1.mcache delete mode 100644 maps/pre-re/020-2-10.mcache delete mode 100644 maps/pre-re/020-2-11.mcache delete mode 100644 maps/pre-re/020-2-12.mcache delete mode 100644 maps/pre-re/020-2-13.mcache delete mode 100644 maps/pre-re/020-2-14.mcache delete mode 100644 maps/pre-re/020-2-15.mcache delete mode 100644 maps/pre-re/020-2-16.mcache delete mode 100644 maps/pre-re/020-2-17.mcache delete mode 100644 maps/pre-re/020-2-18.mcache delete mode 100644 maps/pre-re/020-2-19.mcache delete mode 100644 maps/pre-re/020-2-2.mcache delete mode 100644 maps/pre-re/020-2-20.mcache delete mode 100644 maps/pre-re/020-2-21.mcache delete mode 100644 maps/pre-re/020-2-22.mcache delete mode 100644 maps/pre-re/020-2-23.mcache delete mode 100644 maps/pre-re/020-2-24.mcache delete mode 100644 maps/pre-re/020-2-25.mcache delete mode 100644 maps/pre-re/020-2-26.mcache delete mode 100644 maps/pre-re/020-2-27.mcache delete mode 100644 maps/pre-re/020-2-28.mcache delete mode 100644 maps/pre-re/020-2-29.mcache delete mode 100644 maps/pre-re/020-2-3.mcache delete mode 100644 maps/pre-re/020-2-30.mcache delete mode 100644 maps/pre-re/020-2-31.mcache delete mode 100644 maps/pre-re/020-2-32.mcache delete mode 100644 maps/pre-re/020-2-33.mcache delete mode 100644 maps/pre-re/020-2-34.mcache delete mode 100644 maps/pre-re/020-2-4.mcache delete mode 100644 maps/pre-re/020-2-5.mcache delete mode 100644 maps/pre-re/020-2-6.mcache delete mode 100644 maps/pre-re/020-2-7.mcache delete mode 100644 maps/pre-re/020-2-8.mcache delete mode 100644 maps/pre-re/020-2-9.mcache create mode 100644 maps/pre-re/020-2.mcache create mode 100644 maps/pre-re/020-3.mcache create mode 100644 maps/pre-re/021-3.mcache create mode 100644 maps/pre-re/023-1.mcache create mode 100644 maps/pre-re/023-2.mcache create mode 100644 maps/pre-re/023-3.mcache create mode 100644 maps/pre-re/025-1.mcache create mode 100644 maps/pre-re/025-3.mcache create mode 100644 maps/pre-re/025-4.mcache create mode 100644 maps/pre-re/026-1.mcache create mode 100644 maps/pre-re/026-2.mcache create mode 100644 maps/pre-re/027-1.mcache create mode 100644 maps/pre-re/027-2.mcache create mode 100644 maps/pre-re/027-3.mcache create mode 100644 maps/pre-re/027-4.mcache create mode 100644 maps/pre-re/027-5.mcache create mode 100644 maps/pre-re/027-6.mcache create mode 100644 maps/pre-re/027-7.mcache create mode 100644 maps/pre-re/027-8.mcache create mode 100644 maps/pre-re/028-1.mcache create mode 100644 maps/pre-re/028-3.mcache create mode 100644 maps/pre-re/029-1.mcache create mode 100644 maps/pre-re/029-2.mcache create mode 100644 maps/pre-re/029-3.mcache create mode 100644 maps/pre-re/029-4.mcache create mode 100644 maps/pre-re/030-1.mcache create mode 100644 maps/pre-re/030-2.mcache create mode 100644 maps/pre-re/030-3.mcache create mode 100644 maps/pre-re/030-4.mcache create mode 100644 maps/pre-re/031-1.mcache create mode 100644 maps/pre-re/031-2.mcache create mode 100644 maps/pre-re/031-3.mcache create mode 100644 maps/pre-re/031-4.mcache create mode 100644 maps/pre-re/032-3.mcache create mode 100644 maps/pre-re/033-1.mcache create mode 100644 maps/pre-re/034-1.mcache create mode 100644 maps/pre-re/034-2.mcache create mode 100644 maps/pre-re/035-2.mcache create mode 100644 maps/pre-re/036-2.mcache create mode 100644 maps/pre-re/041-1.mcache create mode 100644 maps/pre-re/042-1.mcache create mode 100644 maps/pre-re/043-1.mcache create mode 100644 maps/pre-re/043-3.mcache create mode 100644 maps/pre-re/043-4.mcache create mode 100644 maps/pre-re/045-1.mcache create mode 100644 maps/pre-re/046-1.mcache create mode 100644 maps/pre-re/046-3.mcache create mode 100644 maps/pre-re/047-1.mcache create mode 100644 maps/pre-re/047-3.mcache create mode 100644 maps/pre-re/048-2.mcache create mode 100644 maps/pre-re/051-1.mcache create mode 100644 maps/pre-re/051-3.mcache create mode 100644 maps/pre-re/052-1.mcache create mode 100644 maps/pre-re/052-2.mcache create mode 100644 maps/pre-re/055-1.mcache create mode 100644 maps/pre-re/055-3.mcache create mode 100644 maps/pre-re/056-2.mcache create mode 100644 maps/pre-re/057-1.mcache create mode 100644 maps/pre-re/069-2.mcache create mode 100644 maps/pre-re/070-1.mcache create mode 100644 maps/pre-re/070-3.mcache create mode 100644 maps/pre-re/099-1.mcache create mode 100644 maps/pre-re/099-2.mcache create mode 100644 maps/pre-re/099-3.mcache create mode 100644 maps/pre-re/099-4.mcache create mode 100644 maps/pre-re/099-5.mcache create mode 100644 maps/pre-re/099-6.mcache create mode 100644 maps/pre-re/099-7.mcache create mode 100644 maps/pre-re/099-8.mcache delete mode 100644 maps/pre-re/fermi.mcache delete mode 100644 maps/pre-re/marine-2.mcache delete mode 100644 maps/pre-re/marine.mcache delete mode 100644 maps/pre-re/sec_pri.mcache delete mode 100644 maps/pre-re/test.mcache delete mode 100644 maps/pre-re/testbg.mcache create mode 100644 maps/re/001-1.mcache create mode 100644 maps/re/001-2.mcache create mode 100644 maps/re/001-3.mcache create mode 100644 maps/re/002-1.mcache create mode 100644 maps/re/002-2.mcache create mode 100644 maps/re/002-3.mcache create mode 100644 maps/re/002-4.mcache create mode 100644 maps/re/002-5.mcache create mode 100644 maps/re/003-1.mcache create mode 100644 maps/re/003-4.mcache create mode 100644 maps/re/004-1.mcache create mode 100644 maps/re/004-3.mcache create mode 100644 maps/re/004-4.mcache create mode 100644 maps/re/004-5.mcache create mode 100644 maps/re/005-3.mcache create mode 100644 maps/re/006-1.mcache create mode 100644 maps/re/006-2.mcache create mode 100644 maps/re/006-3.mcache create mode 100644 maps/re/007-1.mcache create mode 100644 maps/re/007-2.mcache create mode 100644 maps/re/008-1.mcache create mode 100644 maps/re/009-1.mcache create mode 100644 maps/re/009-2.mcache create mode 100644 maps/re/009-3.mcache create mode 100644 maps/re/009-4.mcache create mode 100644 maps/re/009-5.mcache create mode 100644 maps/re/009-6.mcache create mode 100644 maps/re/009-7.mcache create mode 100644 maps/re/009-8.mcache create mode 100644 maps/re/010-1.mcache create mode 100644 maps/re/010-2.mcache create mode 100644 maps/re/011-1.mcache create mode 100644 maps/re/011-3.mcache create mode 100644 maps/re/011-4.mcache create mode 100644 maps/re/011-6.mcache create mode 100644 maps/re/012-1.mcache create mode 100644 maps/re/012-3.mcache create mode 100644 maps/re/012-4.mcache create mode 100644 maps/re/013-1.mcache create mode 100644 maps/re/013-2.mcache create mode 100644 maps/re/013-3.mcache create mode 100644 maps/re/014-1.mcache create mode 100644 maps/re/014-3.mcache create mode 100644 maps/re/015-1.mcache create mode 100644 maps/re/015-3.mcache create mode 100644 maps/re/016-1.mcache create mode 100644 maps/re/016-2.mcache create mode 100644 maps/re/017-1.mcache create mode 100644 maps/re/017-2.mcache create mode 100644 maps/re/017-3.mcache create mode 100644 maps/re/017-4.mcache create mode 100644 maps/re/017-9.mcache create mode 100644 maps/re/018-1.mcache create mode 100644 maps/re/018-2.mcache create mode 100644 maps/re/018-3.mcache create mode 100644 maps/re/019-1.mcache create mode 100644 maps/re/019-3.mcache create mode 100644 maps/re/019-4.mcache create mode 100644 maps/re/020-1.mcache create mode 100644 maps/re/020-2.mcache create mode 100644 maps/re/020-3.mcache create mode 100644 maps/re/021-3.mcache create mode 100644 maps/re/023-1.mcache create mode 100644 maps/re/023-2.mcache create mode 100644 maps/re/023-3.mcache create mode 100644 maps/re/025-1.mcache create mode 100644 maps/re/025-3.mcache create mode 100644 maps/re/025-4.mcache create mode 100644 maps/re/026-1.mcache create mode 100644 maps/re/026-2.mcache create mode 100644 maps/re/027-1.mcache create mode 100644 maps/re/027-2.mcache create mode 100644 maps/re/027-3.mcache create mode 100644 maps/re/027-4.mcache create mode 100644 maps/re/027-5.mcache create mode 100644 maps/re/027-6.mcache create mode 100644 maps/re/027-7.mcache create mode 100644 maps/re/027-8.mcache create mode 100644 maps/re/028-1.mcache create mode 100644 maps/re/028-3.mcache create mode 100644 maps/re/029-1.mcache create mode 100644 maps/re/029-2.mcache create mode 100644 maps/re/029-3.mcache create mode 100644 maps/re/029-4.mcache create mode 100644 maps/re/030-1.mcache create mode 100644 maps/re/030-2.mcache create mode 100644 maps/re/030-3.mcache create mode 100644 maps/re/030-4.mcache create mode 100644 maps/re/031-1.mcache create mode 100644 maps/re/031-2.mcache create mode 100644 maps/re/031-3.mcache create mode 100644 maps/re/031-4.mcache create mode 100644 maps/re/032-3.mcache create mode 100644 maps/re/033-1.mcache create mode 100644 maps/re/034-1.mcache create mode 100644 maps/re/034-2.mcache create mode 100644 maps/re/035-2.mcache create mode 100644 maps/re/036-2.mcache create mode 100644 maps/re/041-1.mcache create mode 100644 maps/re/042-1.mcache create mode 100644 maps/re/043-1.mcache create mode 100644 maps/re/043-3.mcache create mode 100644 maps/re/043-4.mcache create mode 100644 maps/re/045-1.mcache create mode 100644 maps/re/046-1.mcache create mode 100644 maps/re/046-3.mcache create mode 100644 maps/re/047-1.mcache create mode 100644 maps/re/047-3.mcache create mode 100644 maps/re/048-2.mcache create mode 100644 maps/re/051-1.mcache create mode 100644 maps/re/051-3.mcache create mode 100644 maps/re/052-1.mcache create mode 100644 maps/re/052-2.mcache create mode 100644 maps/re/055-1.mcache create mode 100644 maps/re/055-3.mcache create mode 100644 maps/re/056-2.mcache create mode 100644 maps/re/057-1.mcache create mode 100644 maps/re/069-2.mcache create mode 100644 maps/re/070-1.mcache create mode 100644 maps/re/070-3.mcache create mode 100644 maps/re/099-1.mcache create mode 100644 maps/re/099-2.mcache create mode 100644 maps/re/099-3.mcache create mode 100644 maps/re/099-4.mcache create mode 100644 maps/re/099-5.mcache create mode 100644 maps/re/099-6.mcache create mode 100644 maps/re/099-7.mcache create mode 100644 maps/re/099-8.mcache create mode 100644 maps/re/botcheck.mcache delete mode 100644 npc/000-0-0/_import.txt delete mode 100644 npc/000-0-0/mapflags.txt delete mode 100644 npc/000-0-0/q'onan.txt delete mode 100644 npc/000-0-0/sailors.txt delete mode 100644 npc/000-0-1/_import.txt delete mode 100644 npc/000-0-1/mapflags.txt delete mode 100644 npc/000-0-1/narrator.txt delete mode 100644 npc/000-0/_import.txt delete mode 100644 npc/000-0/mapflags.txt delete mode 100644 npc/000-0/sailors.txt delete mode 100644 npc/000-1/_mobs.txt delete mode 100644 npc/000-1/_warps.txt delete mode 100644 npc/000-1/ale.txt delete mode 100644 npc/000-1/astapolos.txt delete mode 100644 npc/000-1/boss.txt delete mode 100644 npc/000-1/chest.txt delete mode 100644 npc/000-1/couwan.txt delete mode 100644 npc/000-1/darlin.txt create mode 100644 npc/000-1/exit.txt delete mode 100644 npc/000-1/fexil.txt delete mode 100644 npc/000-1/gugli.txt delete mode 100644 npc/000-1/gulukan.txt delete mode 100644 npc/000-1/jalad.txt delete mode 100644 npc/000-1/lean.txt delete mode 100644 npc/000-1/mapflags.txt delete mode 100644 npc/000-1/maxe.txt delete mode 100644 npc/000-1/muller.txt delete mode 100644 npc/000-1/panels.txt delete mode 100644 npc/000-1/sapartan.txt delete mode 100644 npc/000-1/shop.txt delete mode 100644 npc/000-1/silvio.txt delete mode 100644 npc/000-1/tarlan.txt delete mode 100644 npc/000-1/tibbo.txt delete mode 100644 npc/000-2-0/_import.txt delete mode 100644 npc/000-2-0/_warps.txt delete mode 100644 npc/000-2-0/billybons.txt delete mode 100644 npc/000-2-0/doors.txt delete mode 100644 npc/000-2-0/julia.txt delete mode 100644 npc/000-2-0/mapflags.txt delete mode 100644 npc/000-2-0/note.txt delete mode 100644 npc/000-2-1/_import.txt delete mode 100644 npc/000-2-1/_mobs.txt delete mode 100644 npc/000-2-1/_savepoints.txt delete mode 100644 npc/000-2-1/_warps.txt delete mode 100644 npc/000-2-1/alige.txt delete mode 100644 npc/000-2-1/arpan.txt delete mode 100644 npc/000-2-1/chefgado.txt delete mode 100644 npc/000-2-1/chest.txt delete mode 100644 npc/000-2-1/dan.txt delete mode 100644 npc/000-2-1/devis.txt delete mode 100644 npc/000-2-1/hammock.txt delete mode 100644 npc/000-2-1/knife.txt delete mode 100644 npc/000-2-1/mapflags.txt delete mode 100644 npc/000-2-1/peter.txt delete mode 100644 npc/000-2-1/q'onan.txt delete mode 100644 npc/000-2-1/story_save.txt delete mode 100644 npc/000-2-2/_import.txt delete mode 100644 npc/000-2-2/doors.txt delete mode 100644 npc/000-2-2/mapflags.txt delete mode 100644 npc/000-2-2/ratto.txt delete mode 100644 npc/000-2-3/_import.txt delete mode 100644 npc/000-2-3/_warps.txt delete mode 100644 npc/000-2-3/box.txt delete mode 100644 npc/000-2-3/elmo.txt delete mode 100644 npc/000-2-3/hammock.txt delete mode 100644 npc/000-2-3/mapflags.txt delete mode 100644 npc/000-2-3/nard.txt delete mode 100644 npc/000-2-3/piourocket.txt delete mode 100644 npc/000-2-3/sailors.txt delete mode 100644 npc/000-2-4/_import.txt delete mode 100644 npc/000-2-4/_mobs.txt delete mode 100644 npc/000-2-4/_warps.txt delete mode 100644 npc/000-2-4/alige.txt delete mode 100644 npc/000-2-4/mapflags.txt create mode 100755 npc/001-1/adrian.txt delete mode 100644 npc/001-1/artaxe.txt delete mode 100644 npc/001-1/beuss.txt delete mode 100644 npc/001-1/calypsan.txt delete mode 100644 npc/001-1/carmie.txt create mode 100755 npc/001-1/ched.txt delete mode 100644 npc/001-1/chelios.txt create mode 100755 npc/001-1/children.txt create mode 100755 npc/001-1/constable.txt delete mode 100644 npc/001-1/cookiemaster.txt delete mode 100644 npc/001-1/devis.txt create mode 100755 npc/001-1/dock.txt delete mode 100644 npc/001-1/doors.txt delete mode 100644 npc/001-1/elmo.txt delete mode 100644 npc/001-1/enora.txt create mode 100755 npc/001-1/eomie.txt delete mode 100644 npc/001-1/eugene.txt create mode 100755 npc/001-1/ferry_master.txt delete mode 100644 npc/001-1/fexil.txt delete mode 100644 npc/001-1/flags.txt delete mode 100644 npc/001-1/flyingpiou.txt create mode 100755 npc/001-1/gate_guards.txt create mode 100755 npc/001-1/gossip.txt create mode 100755 npc/001-1/guards.txt delete mode 100644 npc/001-1/harbours.txt create mode 100755 npc/001-1/inac.txt delete mode 100644 npc/001-1/juscare.txt delete mode 100644 npc/001-1/katja.txt delete mode 100644 npc/001-1/koga.txt delete mode 100644 npc/001-1/lucas.txt delete mode 100644 npc/001-1/manhole.txt mode change 100644 => 100755 npc/001-1/mapflags.txt delete mode 100644 npc/001-1/marine.txt delete mode 100644 npc/001-1/merlin.txt delete mode 100644 npc/001-1/mouboo.txt delete mode 100644 npc/001-1/nalkri.txt create mode 100755 npc/001-1/north_shops.txt create mode 100755 npc/001-1/npcs.txt delete mode 100644 npc/001-1/panels.txt delete mode 100644 npc/001-1/pious.txt delete mode 100644 npc/001-1/qonan.txt delete mode 100644 npc/001-1/qpid.txt delete mode 100644 npc/001-1/rowboat.txt delete mode 100644 npc/001-1/rowboathelper.txt delete mode 100644 npc/001-1/rumly.txt delete mode 100644 npc/001-1/salem.txt create mode 100755 npc/001-1/sewer_east.txt create mode 100755 npc/001-1/sewer_north.txt delete mode 100644 npc/001-1/shop.txt delete mode 100644 npc/001-1/sign.txt delete mode 100644 npc/001-1/sophialla.txt create mode 100755 npc/001-1/stat_reset.txt delete mode 100644 npc/001-1/taree.txt create mode 100755 npc/001-1/tinris.txt create mode 100755 npc/001-1/tombstones.txt delete mode 100644 npc/001-1/treeleaf.txt delete mode 100644 npc/001-1/trees.txt delete mode 100644 npc/001-1/wateranimation.txt create mode 100755 npc/001-1/weellos.txt delete mode 100644 npc/001-1/xilaxa.txt delete mode 100644 npc/001-2-0/_import.txt delete mode 100644 npc/001-2-0/_warps.txt delete mode 100644 npc/001-2-0/mapflags.txt delete mode 100644 npc/001-2-0/resa.txt delete mode 100644 npc/001-2-0/shop.txt delete mode 100644 npc/001-2-1/_import.txt delete mode 100644 npc/001-2-1/_savepoints.txt delete mode 100644 npc/001-2-1/_warps.txt delete mode 100644 npc/001-2-1/mapflags.txt delete mode 100644 npc/001-2-10/_import.txt delete mode 100644 npc/001-2-10/_savepoints.txt delete mode 100644 npc/001-2-10/_warps.txt delete mode 100644 npc/001-2-10/mapflags.txt delete mode 100644 npc/001-2-11/_import.txt delete mode 100644 npc/001-2-11/_savepoints.txt delete mode 100644 npc/001-2-11/_warps.txt delete mode 100644 npc/001-2-11/mapflags.txt delete mode 100644 npc/001-2-11/mona.txt delete mode 100644 npc/001-2-12/_import.txt delete mode 100644 npc/001-2-12/_warps.txt delete mode 100644 npc/001-2-12/mapflags.txt delete mode 100644 npc/001-2-12/oscar.txt delete mode 100644 npc/001-2-13/_import.txt delete mode 100644 npc/001-2-13/_savepoints.txt delete mode 100644 npc/001-2-13/_warps.txt delete mode 100644 npc/001-2-13/mapflags.txt delete mode 100644 npc/001-2-14/_import.txt delete mode 100644 npc/001-2-14/_warps.txt delete mode 100644 npc/001-2-14/mapflags.txt delete mode 100644 npc/001-2-15/_import.txt delete mode 100644 npc/001-2-15/_savepoints.txt delete mode 100644 npc/001-2-15/_warps.txt delete mode 100644 npc/001-2-15/mapflags.txt delete mode 100644 npc/001-2-16/_import.txt delete mode 100644 npc/001-2-16/_warps.txt delete mode 100644 npc/001-2-16/mapflags.txt delete mode 100644 npc/001-2-17/_import.txt delete mode 100644 npc/001-2-17/_warps.txt delete mode 100644 npc/001-2-17/mapflags.txt delete mode 100644 npc/001-2-18/_import.txt delete mode 100644 npc/001-2-18/_warps.txt delete mode 100644 npc/001-2-18/mapflags.txt delete mode 100644 npc/001-2-19/_import.txt delete mode 100644 npc/001-2-19/_warps.txt delete mode 100644 npc/001-2-19/lloyd.txt delete mode 100644 npc/001-2-19/mapflags.txt delete mode 100644 npc/001-2-2/_import.txt delete mode 100644 npc/001-2-2/_warps.txt delete mode 100644 npc/001-2-2/mapflags.txt delete mode 100644 npc/001-2-2/moon.txt delete mode 100644 npc/001-2-20/_import.txt delete mode 100644 npc/001-2-20/_warps.txt delete mode 100644 npc/001-2-20/mapflags.txt delete mode 100644 npc/001-2-21/_import.txt delete mode 100644 npc/001-2-21/_warps.txt delete mode 100644 npc/001-2-21/julia.txt delete mode 100644 npc/001-2-21/mapflags.txt delete mode 100644 npc/001-2-21/note.txt delete mode 100644 npc/001-2-22/_import.txt delete mode 100644 npc/001-2-22/_mobs.txt delete mode 100644 npc/001-2-22/_savepoints.txt delete mode 100644 npc/001-2-22/_warps.txt delete mode 100644 npc/001-2-22/alige.txt delete mode 100644 npc/001-2-22/chefgado.txt delete mode 100644 npc/001-2-22/chest.txt delete mode 100644 npc/001-2-22/hammock.txt delete mode 100644 npc/001-2-22/knife.txt delete mode 100644 npc/001-2-22/mapflags.txt delete mode 100644 npc/001-2-22/note.txt delete mode 100644 npc/001-2-22/peter.txt delete mode 100644 npc/001-2-23/_import.txt delete mode 100644 npc/001-2-23/_warps.txt delete mode 100644 npc/001-2-23/doors.txt delete mode 100644 npc/001-2-23/mapflags.txt delete mode 100644 npc/001-2-23/ratto.txt delete mode 100644 npc/001-2-24/_import.txt delete mode 100644 npc/001-2-24/_warps.txt delete mode 100644 npc/001-2-24/hammock.txt delete mode 100644 npc/001-2-24/mapflags.txt delete mode 100644 npc/001-2-24/nard.txt delete mode 100644 npc/001-2-24/piourocket.txt delete mode 100644 npc/001-2-25/_import.txt delete mode 100644 npc/001-2-25/_mobs.txt delete mode 100644 npc/001-2-25/_warps.txt delete mode 100644 npc/001-2-25/mapflags.txt delete mode 100644 npc/001-2-26/_import.txt delete mode 100644 npc/001-2-26/_warps.txt delete mode 100644 npc/001-2-26/flask.txt delete mode 100644 npc/001-2-26/ivan.txt delete mode 100644 npc/001-2-26/mapflags.txt delete mode 100644 npc/001-2-27/_import.txt delete mode 100644 npc/001-2-27/_warps.txt delete mode 100644 npc/001-2-27/don.txt delete mode 100644 npc/001-2-27/kaylo.txt delete mode 100644 npc/001-2-27/lydon.txt delete mode 100644 npc/001-2-27/mapflags.txt delete mode 100644 npc/001-2-27/shop.txt delete mode 100644 npc/001-2-28/_import.txt delete mode 100644 npc/001-2-28/_warps.txt delete mode 100644 npc/001-2-28/jenna.txt delete mode 100644 npc/001-2-28/mapflags.txt delete mode 100644 npc/001-2-28/note.txt delete mode 100644 npc/001-2-28/plush.txt delete mode 100644 npc/001-2-28/shop.txt delete mode 100644 npc/001-2-29/_import.txt delete mode 100644 npc/001-2-29/_savepoints.txt delete mode 100644 npc/001-2-29/_warps.txt delete mode 100644 npc/001-2-29/mapflags.txt delete mode 100644 npc/001-2-3/_import.txt delete mode 100644 npc/001-2-3/_savepoints.txt delete mode 100644 npc/001-2-3/_warps.txt delete mode 100644 npc/001-2-3/mapflags.txt delete mode 100644 npc/001-2-30/_import.txt delete mode 100644 npc/001-2-30/_mobs.txt delete mode 100644 npc/001-2-30/_warps.txt delete mode 100644 npc/001-2-30/mapflags.txt delete mode 100644 npc/001-2-31/_import.txt delete mode 100644 npc/001-2-31/_warps.txt delete mode 100644 npc/001-2-31/mapflags.txt delete mode 100644 npc/001-2-32/_import.txt delete mode 100644 npc/001-2-32/_warps.txt delete mode 100644 npc/001-2-32/doors.txt delete mode 100644 npc/001-2-32/mapflags.txt delete mode 100644 npc/001-2-32/serena.txt delete mode 100644 npc/001-2-33/_import.txt delete mode 100644 npc/001-2-33/_warps.txt delete mode 100644 npc/001-2-33/lozerk.txt delete mode 100644 npc/001-2-33/mapflags.txt delete mode 100644 npc/001-2-33/triggers.txt delete mode 100644 npc/001-2-34/_import.txt delete mode 100644 npc/001-2-34/_warps.txt delete mode 100644 npc/001-2-34/doors.txt delete mode 100644 npc/001-2-34/mapflags.txt delete mode 100644 npc/001-2-34/samantha.txt delete mode 100644 npc/001-2-35/_import.txt delete mode 100644 npc/001-2-35/doors.txt delete mode 100644 npc/001-2-35/mapflags.txt delete mode 100644 npc/001-2-36/_import.txt delete mode 100644 npc/001-2-36/_warps.txt delete mode 100644 npc/001-2-36/hector.txt delete mode 100644 npc/001-2-36/mapflags.txt delete mode 100644 npc/001-2-37/_import.txt delete mode 100644 npc/001-2-37/_savepoints.txt delete mode 100644 npc/001-2-37/_warps.txt delete mode 100644 npc/001-2-37/hammock.txt delete mode 100644 npc/001-2-37/mapflags.txt delete mode 100644 npc/001-2-38/_import.txt delete mode 100644 npc/001-2-38/_savepoints.txt delete mode 100644 npc/001-2-38/_warps.txt delete mode 100644 npc/001-2-38/hammock.txt delete mode 100644 npc/001-2-38/mapflags.txt delete mode 100644 npc/001-2-39/_import.txt delete mode 100644 npc/001-2-39/_warps.txt delete mode 100644 npc/001-2-39/mapflags.txt delete mode 100644 npc/001-2-39/qanon.txt delete mode 100644 npc/001-2-4/_import.txt delete mode 100644 npc/001-2-4/_warps.txt delete mode 100644 npc/001-2-4/books.txt delete mode 100644 npc/001-2-4/mapflags.txt delete mode 100644 npc/001-2-4/robin.txt delete mode 100644 npc/001-2-4/terry.txt delete mode 100644 npc/001-2-40/_import.txt delete mode 100644 npc/001-2-40/_warps.txt delete mode 100644 npc/001-2-40/mapflags.txt delete mode 100644 npc/001-2-40/trozz.txt delete mode 100644 npc/001-2-41/_import.txt delete mode 100644 npc/001-2-41/_warps.txt delete mode 100644 npc/001-2-41/edouard.txt delete mode 100644 npc/001-2-41/mapflags.txt delete mode 100644 npc/001-2-42/_import.txt delete mode 100644 npc/001-2-42/_warps.txt delete mode 100644 npc/001-2-43/_import.txt delete mode 100644 npc/001-2-43/_warps.txt delete mode 100644 npc/001-2-43/core.txt delete mode 100644 npc/001-2-43/mapflags.txt delete mode 100644 npc/001-2-5/_import.txt delete mode 100644 npc/001-2-5/_warps.txt delete mode 100644 npc/001-2-5/books.txt delete mode 100644 npc/001-2-5/mapflags.txt delete mode 100644 npc/001-2-5/tutorial.txt delete mode 100644 npc/001-2-6/_import.txt delete mode 100644 npc/001-2-6/_warps.txt delete mode 100644 npc/001-2-6/books.txt delete mode 100644 npc/001-2-6/christopher.txt delete mode 100644 npc/001-2-6/dolfina.txt delete mode 100644 npc/001-2-6/leonard.txt delete mode 100644 npc/001-2-6/mapflags.txt delete mode 100644 npc/001-2-7/_import.txt delete mode 100644 npc/001-2-7/_warps.txt delete mode 100644 npc/001-2-7/mapflags.txt delete mode 100644 npc/001-2-8/_import.txt delete mode 100644 npc/001-2-8/_warps.txt delete mode 100644 npc/001-2-8/doors.txt delete mode 100644 npc/001-2-8/mapflags.txt delete mode 100644 npc/001-2-9/_import.txt delete mode 100644 npc/001-2-9/_warps.txt delete mode 100644 npc/001-2-9/janus.txt delete mode 100644 npc/001-2-9/mapflags.txt create mode 100644 npc/001-2/_import.txt create mode 100644 npc/001-2/_warps.txt create mode 100755 npc/001-2/bank.txt create mode 100755 npc/001-2/david.txt create mode 100755 npc/001-2/fieri.txt create mode 100755 npc/001-2/forge_shops.txt create mode 100755 npc/001-2/government_building.txt create mode 100755 npc/001-2/heathin.txt create mode 100755 npc/001-2/jhedia.txt create mode 100755 npc/001-2/manakins.txt create mode 100755 npc/001-2/mapflags.txt create mode 100755 npc/001-2/pauline.txt create mode 100755 npc/001-2/sandra.txt create mode 100755 npc/001-2/tathin.txt create mode 100755 npc/001-2/tondar.txt create mode 100755 npc/001-2/wizards.txt create mode 100755 npc/001-2/yanis.txt delete mode 100644 npc/001-3-0/_import.txt delete mode 100644 npc/001-3-0/_mobs.txt delete mode 100644 npc/001-3-0/_warps.txt delete mode 100644 npc/001-3-0/gates.txt delete mode 100644 npc/001-3-0/mundane.txt delete mode 100644 npc/001-3-1/_import.txt delete mode 100644 npc/001-3-1/_mobs.txt delete mode 100644 npc/001-3-1/_warps.txt delete mode 100644 npc/001-3-1/gates.txt delete mode 100644 npc/001-3-2/_import.txt delete mode 100644 npc/001-3-2/_warps.txt delete mode 100644 npc/001-3-2/henry.txt delete mode 100644 npc/001-3-2/smuggler.txt create mode 100644 npc/001-3/_import.txt create mode 100644 npc/001-3/_mobs.txt create mode 100644 npc/001-3/_warps.txt create mode 100755 npc/001-3/guards.txt create mode 100755 npc/001-3/mapflags.txt create mode 100755 npc/001-3/pvpflag.txt create mode 100644 npc/002-1/_import.txt create mode 100644 npc/002-1/_mobs.txt create mode 100644 npc/002-1/_warps.txt create mode 100755 npc/002-1/anwar.txt create mode 100755 npc/002-1/bard.txt create mode 100755 npc/002-1/elanore.txt create mode 100755 npc/002-1/gaurds.txt create mode 100755 npc/002-1/itka.txt create mode 100755 npc/002-1/lieutenant_dausen.txt create mode 100755 npc/002-1/luca.txt create mode 100755 npc/002-1/mapflags.txt create mode 100755 npc/002-1/mine_debug.txt create mode 100755 npc/002-1/nickos.txt create mode 100755 npc/002-1/nomads.txt create mode 100755 npc/002-1/npcs.txt create mode 100755 npc/002-1/sarah.txt create mode 100755 npc/002-1/soul-menhir.txt create mode 100755 npc/002-1/stewen.txt create mode 100755 npc/002-1/traveler.txt create mode 100644 npc/002-2/_import.txt create mode 100644 npc/002-2/_warps.txt create mode 100755 npc/002-2/bakery.txt create mode 100755 npc/002-2/barber.txt create mode 100755 npc/002-2/bleacher.txt create mode 100755 npc/002-2/casino.txt create mode 100755 npc/002-2/dedication.txt create mode 100755 npc/002-2/hetchel.txt create mode 100755 npc/002-2/imec.txt create mode 100755 npc/002-2/inya.txt create mode 100755 npc/002-2/kps.txt create mode 100755 npc/002-2/kylian.txt create mode 100755 npc/002-2/latoy.txt create mode 100755 npc/002-2/mapflags.txt create mode 100755 npc/002-2/omar.txt create mode 100755 npc/002-2/phaet.txt create mode 100755 npc/002-2/rebecca.txt create mode 100755 npc/002-2/shops.txt create mode 100755 npc/002-2/stranger.txt create mode 100755 npc/002-2/troupe_leader.txt create mode 100644 npc/002-3/_import.txt create mode 100644 npc/002-3/_warps.txt create mode 100755 npc/002-3/mapflags.txt create mode 100755 npc/002-3/merchant.txt create mode 100755 npc/002-3/mining_camp_barrier.txt create mode 100755 npc/002-3/nathan.txt create mode 100755 npc/002-3/traveler.txt create mode 100644 npc/002-4/_import.txt create mode 100644 npc/002-4/_mobs.txt create mode 100644 npc/002-4/_warps.txt create mode 100755 npc/002-4/mapflags.txt create mode 100755 npc/002-4/mine_triggerone.txt create mode 100755 npc/002-4/mine_triggerthree.txt create mode 100755 npc/002-4/mine_triggertwo.txt create mode 100755 npc/002-4/naem.txt create mode 100755 npc/002-4/underground_palace_barrier.txt create mode 100644 npc/002-5/_import.txt create mode 100644 npc/002-5/_mobs.txt create mode 100644 npc/002-5/_warps.txt create mode 100755 npc/002-5/chest.txt create mode 100755 npc/002-5/mapflags.txt create mode 100755 npc/002-5/sema.txt create mode 100644 npc/003-1/_import.txt create mode 100644 npc/003-4/_import.txt create mode 100644 npc/003-4/_mobs.txt create mode 100644 npc/003-4/_warps.txt create mode 100644 npc/004-1/_import.txt create mode 100644 npc/004-1/_mobs.txt create mode 100644 npc/004-1/_warps.txt create mode 100644 npc/004-3/_import.txt create mode 100644 npc/004-3/_mobs.txt create mode 100644 npc/004-3/_warps.txt create mode 100755 npc/004-3/mapflags.txt create mode 100644 npc/004-4/_import.txt create mode 100644 npc/004-4/_mobs.txt create mode 100644 npc/004-4/_warps.txt create mode 100755 npc/004-4/mapflags.txt create mode 100644 npc/004-5/_import.txt create mode 100644 npc/004-5/_mobs.txt create mode 100644 npc/004-5/_warps.txt create mode 100755 npc/004-5/chest.txt create mode 100755 npc/004-5/mapflags.txt create mode 100644 npc/005-3/_import.txt create mode 100644 npc/005-3/_mobs.txt create mode 100644 npc/005-3/_warps.txt create mode 100755 npc/005-3/mapflags.txt create mode 100644 npc/006-1/_import.txt create mode 100644 npc/006-1/_mobs.txt create mode 100644 npc/006-1/_warps.txt create mode 100755 npc/006-1/mapflags.txt create mode 100755 npc/006-1/mika.txt create mode 100755 npc/006-1/miriam.txt create mode 100755 npc/006-1/pachua.txt create mode 100755 npc/006-1/spirit.txt create mode 100755 npc/006-1/traveler.txt create mode 100755 npc/006-1/tree.txt create mode 100644 npc/006-2/_import.txt create mode 100644 npc/006-2/_warps.txt create mode 100755 npc/006-2/mapflags.txt create mode 100755 npc/006-2/npcs.txt create mode 100755 npc/006-2/shops.txt create mode 100644 npc/006-3/_import.txt create mode 100644 npc/006-3/_mobs.txt create mode 100644 npc/006-3/_warps.txt create mode 100755 npc/006-3/mapflags.txt create mode 100644 npc/007-1/_import.txt create mode 100644 npc/007-1/_mobs.txt create mode 100644 npc/007-1/_warps.txt create mode 100755 npc/007-1/mapflags.txt create mode 100755 npc/007-1/voltain.txt create mode 100644 npc/007-2/_import.txt create mode 100644 npc/007-2/_warps.txt create mode 100755 npc/007-2/witch.txt delete mode 100644 npc/008-1-1/_import.txt delete mode 100644 npc/008-1-1/_mobs.txt delete mode 100644 npc/008-1-1/_warps.txt delete mode 100644 npc/008-1-1/cutscene.txt delete mode 100644 npc/008-1-1/galimatia.txt delete mode 100644 npc/008-1-1/hal.txt delete mode 100644 npc/008-1-1/koga.txt delete mode 100644 npc/008-1-1/morcant.txt delete mode 100644 npc/008-1-1/sign.txt delete mode 100644 npc/008-1-1/soldiers.txt delete mode 100644 npc/008-1-2/_import.txt delete mode 100644 npc/008-1-2/_warps.txt delete mode 100644 npc/008-1-2/sign.txt delete mode 100644 npc/008-1/4144.txt create mode 100755 npc/008-1/andra.txt create mode 100755 npc/008-1/annualeaster.txt delete mode 100644 npc/008-1/auldsbel.txt mode change 100644 => 100755 npc/008-1/banu.txt delete mode 100644 npc/008-1/blossom.txt delete mode 100644 npc/008-1/confused-tree.txt delete mode 100644 npc/008-1/crane.txt create mode 100755 npc/008-1/diryn.txt create mode 100755 npc/008-1/dock.txt delete mode 100644 npc/008-1/doors.txt create mode 100755 npc/008-1/george.txt mode change 100644 => 100755 npc/008-1/hinnak.txt delete mode 100644 npc/008-1/jack.txt mode change 100644 => 100755 npc/008-1/mapflags.txt delete mode 100644 npc/008-1/marine.txt mode change 100644 => 100755 npc/008-1/mikhail.txt delete mode 100644 npc/008-1/milly.txt delete mode 100644 npc/008-1/old-man.txt delete mode 100644 npc/008-1/old-woman.txt delete mode 100644 npc/008-1/oscar.txt delete mode 100644 npc/008-1/rossy.txt delete mode 100644 npc/008-1/sabine.txt delete mode 100644 npc/008-1/sergeant-ryan.txt delete mode 100644 npc/008-1/shop.txt delete mode 100644 npc/008-1/sign.txt delete mode 100644 npc/008-1/snarfles.txt delete mode 100644 npc/008-1/soul-menhir.txt delete mode 100644 npc/008-1/voltain.txt delete mode 100644 npc/008-1/wateranimation.txt delete mode 100644 npc/008-2-0/_import.txt delete mode 100644 npc/008-2-0/_savepoints.txt delete mode 100644 npc/008-2-0/_warps.txt delete mode 100644 npc/008-2-0/celestia.txt delete mode 100644 npc/008-2-0/mapflags.txt delete mode 100644 npc/008-2-1/_import.txt delete mode 100644 npc/008-2-1/_savepoints.txt delete mode 100644 npc/008-2-1/_warps.txt delete mode 100644 npc/008-2-1/generalstore.txt delete mode 100644 npc/008-2-1/inspector.txt delete mode 100644 npc/008-2-1/mapflags.txt delete mode 100644 npc/008-2-1/richard.txt delete mode 100644 npc/008-2-1/selim.txt delete mode 100644 npc/008-2-10/_import.txt delete mode 100644 npc/008-2-10/_warps.txt delete mode 100644 npc/008-2-10/airlia.txt delete mode 100644 npc/008-2-10/mapflags.txt delete mode 100644 npc/008-2-11/_import.txt delete mode 100644 npc/008-2-11/_savepoints.txt delete mode 100644 npc/008-2-11/_warps.txt delete mode 100644 npc/008-2-11/mapflags.txt delete mode 100644 npc/008-2-12/_import.txt delete mode 100644 npc/008-2-12/_warps.txt delete mode 100644 npc/008-2-12/mapflags.txt delete mode 100644 npc/008-2-12/nurse.txt delete mode 100644 npc/008-2-13/_import.txt delete mode 100644 npc/008-2-13/_savepoints.txt delete mode 100644 npc/008-2-13/_warps.txt delete mode 100644 npc/008-2-13/lena.txt delete mode 100644 npc/008-2-13/mapflags.txt delete mode 100644 npc/008-2-14/_import.txt delete mode 100644 npc/008-2-14/_savepoints.txt delete mode 100644 npc/008-2-14/_warps.txt delete mode 100644 npc/008-2-14/doctor.txt delete mode 100644 npc/008-2-14/mapflags.txt delete mode 100644 npc/008-2-15/_import.txt delete mode 100644 npc/008-2-15/_warps.txt delete mode 100644 npc/008-2-16/_import.txt delete mode 100644 npc/008-2-16/_warps.txt delete mode 100644 npc/008-2-16/stove.txt delete mode 100644 npc/008-2-16/yannika.txt delete mode 100644 npc/008-2-17/_import.txt delete mode 100644 npc/008-2-17/_warps.txt delete mode 100644 npc/008-2-17/angus.txt delete mode 100644 npc/008-2-17/caul.txt delete mode 100644 npc/008-2-18/_import.txt delete mode 100644 npc/008-2-18/_warps.txt delete mode 100644 npc/008-2-18/malik.txt delete mode 100644 npc/008-2-19/_import.txt delete mode 100644 npc/008-2-19/_warps.txt delete mode 100644 npc/008-2-19/books.txt delete mode 100644 npc/008-2-2/_import.txt delete mode 100644 npc/008-2-2/_warps.txt delete mode 100644 npc/008-2-2/barron.txt delete mode 100644 npc/008-2-2/jukebox.txt delete mode 100644 npc/008-2-2/kfahr.txt delete mode 100644 npc/008-2-2/ledmitz.txt delete mode 100644 npc/008-2-2/mapflags.txt delete mode 100644 npc/008-2-2/melania.txt delete mode 100644 npc/008-2-2/melinda.txt delete mode 100644 npc/008-2-2/note.txt delete mode 100644 npc/008-2-2/shop.txt delete mode 100644 npc/008-2-20/_import.txt delete mode 100644 npc/008-2-20/_warps.txt delete mode 100644 npc/008-2-20/valia.txt delete mode 100644 npc/008-2-21/_import.txt delete mode 100644 npc/008-2-21/_mobs.txt delete mode 100644 npc/008-2-21/_warps.txt delete mode 100644 npc/008-2-22/_import.txt delete mode 100644 npc/008-2-22/_savepoints.txt delete mode 100644 npc/008-2-22/_warps.txt delete mode 100644 npc/008-2-23/_import.txt delete mode 100644 npc/008-2-23/_warps.txt delete mode 100644 npc/008-2-24/_import.txt delete mode 100644 npc/008-2-24/_warps.txt delete mode 100644 npc/008-2-24/chef.txt delete mode 100644 npc/008-2-24/troupe-leader.txt delete mode 100644 npc/008-2-25/_import.txt delete mode 100644 npc/008-2-25/_warps.txt delete mode 100644 npc/008-2-26/_import.txt delete mode 100644 npc/008-2-26/_warps.txt delete mode 100644 npc/008-2-27/_import.txt delete mode 100644 npc/008-2-27/_warps.txt delete mode 100644 npc/008-2-28/_import.txt delete mode 100644 npc/008-2-28/_warps.txt delete mode 100644 npc/008-2-29/_import.txt delete mode 100644 npc/008-2-29/_warps.txt delete mode 100644 npc/008-2-3/_import.txt delete mode 100644 npc/008-2-3/_savepoints.txt delete mode 100644 npc/008-2-3/_warps.txt delete mode 100644 npc/008-2-3/mapflags.txt delete mode 100644 npc/008-2-30/_import.txt delete mode 100644 npc/008-2-30/_warps.txt delete mode 100644 npc/008-2-31/_import.txt delete mode 100644 npc/008-2-31/_warps.txt delete mode 100644 npc/008-2-32/_import.txt delete mode 100644 npc/008-2-32/_warps.txt delete mode 100644 npc/008-2-32/thamas.txt delete mode 100644 npc/008-2-4/_import.txt delete mode 100644 npc/008-2-4/_savepoints.txt delete mode 100644 npc/008-2-4/_warps.txt delete mode 100644 npc/008-2-4/bernard.txt delete mode 100644 npc/008-2-4/mapflags.txt delete mode 100644 npc/008-2-4/olana.txt delete mode 100644 npc/008-2-5/_import.txt delete mode 100644 npc/008-2-5/_warps.txt delete mode 100644 npc/008-2-5/mapflags.txt delete mode 100644 npc/008-2-6/_import.txt delete mode 100644 npc/008-2-6/_warps.txt delete mode 100644 npc/008-2-6/alan.txt delete mode 100644 npc/008-2-6/donald.txt delete mode 100644 npc/008-2-6/mapflags.txt delete mode 100644 npc/008-2-7/_import.txt delete mode 100644 npc/008-2-7/_savepoints.txt delete mode 100644 npc/008-2-7/_warps.txt delete mode 100644 npc/008-2-7/mapflags.txt delete mode 100644 npc/008-2-7/shop.txt delete mode 100644 npc/008-2-7/simon.txt delete mode 100644 npc/008-2-7/wyara.txt delete mode 100644 npc/008-2-8/_import.txt delete mode 100644 npc/008-2-8/_warps.txt delete mode 100644 npc/008-2-8/macgowan.txt delete mode 100644 npc/008-2-8/mapflags.txt delete mode 100644 npc/008-2-8/nicholas.txt delete mode 100644 npc/008-2-9/_import.txt delete mode 100644 npc/008-2-9/_savepoints.txt delete mode 100644 npc/008-2-9/_warps.txt delete mode 100644 npc/008-2-9/mapflags.txt delete mode 100644 npc/008-3-0/_import.txt delete mode 100644 npc/008-3-0/_mobs.txt delete mode 100644 npc/008-3-0/_warps.txt delete mode 100644 npc/008-3-0/clauquer.txt delete mode 100644 npc/008-3-0/juliet.txt delete mode 100644 npc/008-3-1/_import.txt delete mode 100644 npc/008-3-1/_mobs.txt delete mode 100644 npc/008-3-1/_warps.txt delete mode 100644 npc/008-3-1/arkim.txt delete mode 100644 npc/008-3-2/_import.txt delete mode 100644 npc/008-3-2/_mobs.txt delete mode 100644 npc/008-3-2/_warps.txt delete mode 100644 npc/008-3-2/boss.txt delete mode 100644 npc/008-3-3/_import.txt delete mode 100644 npc/008-3-3/_mobs.txt delete mode 100644 npc/008-3-3/_warps.txt delete mode 100644 npc/008-3-4/_import.txt delete mode 100644 npc/008-3-4/_mobs.txt delete mode 100644 npc/008-3-4/_warps.txt delete mode 100644 npc/008-3-5/_import.txt delete mode 100644 npc/008-3-5/_mobs.txt delete mode 100644 npc/008-3-5/_warps.txt delete mode 100644 npc/008-3-5/bryant.txt delete mode 100644 npc/008-3-5/lordcave.txt delete mode 100644 npc/008-3-5/nunia.txt delete mode 100644 npc/008-3-6/_import.txt delete mode 100644 npc/008-3-6/_mobs.txt delete mode 100644 npc/008-3-6/_warps.txt delete mode 100644 npc/009-1/blackwin.txt create mode 100755 npc/009-1/constable.txt delete mode 100644 npc/009-1/forwin.txt create mode 100755 npc/009-1/guide.txt delete mode 100644 npc/009-1/hamond.txt create mode 100755 npc/009-1/jack.txt create mode 100755 npc/009-1/mapflags.txt create mode 100755 npc/009-1/milly.txt create mode 100755 npc/009-1/old_man.txt create mode 100755 npc/009-1/old_woman.txt create mode 100755 npc/009-1/sabine.txt mode change 100644 => 100755 npc/009-1/soul-menhir.txt delete mode 100644 npc/009-1/thurstan.txt create mode 100755 npc/009-1/water_pump.txt delete mode 100644 npc/009-1/wateranimation.txt delete mode 100644 npc/009-2-0/_import.txt delete mode 100644 npc/009-2-0/_warps.txt delete mode 100644 npc/009-2-1/_import.txt delete mode 100644 npc/009-2-1/_warps.txt delete mode 100644 npc/009-2-10/_import.txt delete mode 100644 npc/009-2-10/_warps.txt delete mode 100644 npc/009-2-11/_import.txt delete mode 100644 npc/009-2-11/_warps.txt delete mode 100644 npc/009-2-12/_import.txt delete mode 100644 npc/009-2-12/_warps.txt delete mode 100644 npc/009-2-13/_import.txt delete mode 100644 npc/009-2-13/_warps.txt delete mode 100644 npc/009-2-14/_import.txt delete mode 100644 npc/009-2-14/_warps.txt delete mode 100644 npc/009-2-15/_import.txt delete mode 100644 npc/009-2-15/_warps.txt delete mode 100644 npc/009-2-16/_import.txt delete mode 100644 npc/009-2-16/_warps.txt delete mode 100644 npc/009-2-17/_import.txt delete mode 100644 npc/009-2-17/_warps.txt delete mode 100644 npc/009-2-18/_import.txt delete mode 100644 npc/009-2-18/_warps.txt delete mode 100644 npc/009-2-2/_import.txt delete mode 100644 npc/009-2-2/_warps.txt delete mode 100644 npc/009-2-3/_import.txt delete mode 100644 npc/009-2-3/_warps.txt delete mode 100644 npc/009-2-3/barbara.txt delete mode 100644 npc/009-2-3/chef.txt delete mode 100644 npc/009-2-3/reid.txt delete mode 100644 npc/009-2-4/_import.txt delete mode 100644 npc/009-2-4/_warps.txt delete mode 100644 npc/009-2-4/aldred.txt delete mode 100644 npc/009-2-4/golbenez.txt delete mode 100644 npc/009-2-5/_import.txt delete mode 100644 npc/009-2-5/_warps.txt delete mode 100644 npc/009-2-5/lovers.txt delete mode 100644 npc/009-2-5/savaric.txt delete mode 100644 npc/009-2-6/_import.txt delete mode 100644 npc/009-2-6/_warps.txt delete mode 100644 npc/009-2-6/eurni.txt delete mode 100644 npc/009-2-6/jpmorbid.txt delete mode 100644 npc/009-2-7/_import.txt delete mode 100644 npc/009-2-7/_warps.txt delete mode 100644 npc/009-2-7/leofwin.txt delete mode 100644 npc/009-2-7/umfrey.txt delete mode 100644 npc/009-2-8/_import.txt delete mode 100644 npc/009-2-8/_warps.txt delete mode 100644 npc/009-2-8/cerhan.txt delete mode 100644 npc/009-2-9/_import.txt delete mode 100644 npc/009-2-9/_warps.txt create mode 100644 npc/009-2/_import.txt create mode 100644 npc/009-2/_warps.txt create mode 100755 npc/009-2/airlia.txt create mode 100755 npc/009-2/alan.txt create mode 100755 npc/009-2/bernard.txt create mode 100755 npc/009-2/doctor.txt create mode 100755 npc/009-2/drunks.txt create mode 100755 npc/009-2/entertainer.txt create mode 100755 npc/009-2/inspector.txt create mode 100755 npc/009-2/kfahr.txt create mode 100755 npc/009-2/lena.txt create mode 100755 npc/009-2/mapflags.txt create mode 100755 npc/009-2/misc.txt create mode 100755 npc/009-2/nicholas.txt create mode 100755 npc/009-2/nurse.txt create mode 100755 npc/009-2/olana.txt create mode 100755 npc/009-2/peter.txt create mode 100755 npc/009-2/richard.txt create mode 100755 npc/009-2/selim.txt create mode 100755 npc/009-2/shops.txt create mode 100755 npc/009-2/trader.txt create mode 100755 npc/009-2/waitress.txt create mode 100755 npc/009-2/wyara.txt create mode 100755 npc/009-2/yalina.txt create mode 100644 npc/009-3/_import.txt create mode 100644 npc/009-3/_mobs.txt create mode 100644 npc/009-3/_warps.txt create mode 100755 npc/009-3/mapflags.txt create mode 100755 npc/009-3/sword.txt create mode 100755 npc/009-3/warp.txt create mode 100644 npc/009-4/_import.txt create mode 100644 npc/009-4/_mobs.txt create mode 100644 npc/009-4/_warps.txt create mode 100755 npc/009-4/barriers.txt create mode 100755 npc/009-4/mapflags.txt create mode 100755 npc/009-4/orum.txt create mode 100755 npc/009-4/orum_warps.txt create mode 100755 npc/009-4/torches.txt create mode 100755 npc/009-4/waric.txt create mode 100644 npc/009-5/_import.txt create mode 100644 npc/009-5/_warps.txt create mode 100755 npc/009-5/mapflags.txt create mode 100644 npc/009-6/_import.txt create mode 100644 npc/009-6/_warps.txt create mode 100755 npc/009-6/brodomir.txt create mode 100755 npc/009-6/mapflags.txt create mode 100644 npc/009-7/_import.txt create mode 100644 npc/009-7/_warps.txt create mode 100755 npc/009-7/battlemaster.txt create mode 100755 npc/009-7/core.txt create mode 100755 npc/009-7/debug.txt create mode 100755 npc/009-7/eventHandler.txt create mode 100755 npc/009-7/mapflags.txt create mode 100755 npc/009-7/rouge.txt create mode 100755 npc/009-7/shops.txt create mode 100755 npc/009-7/trapdoor.txt create mode 100644 npc/009-8/_import.txt create mode 100644 npc/009-8/_warps.txt create mode 100755 npc/009-8/celestia.txt create mode 100755 npc/009-8/mapflags.txt create mode 100644 npc/010-1/_import.txt create mode 100644 npc/010-1/_mobs.txt create mode 100644 npc/010-1/_warps.txt create mode 100755 npc/010-1/mapflags.txt create mode 100644 npc/010-2/_import.txt create mode 100644 npc/010-2/_warps.txt create mode 100755 npc/010-2/band.txt create mode 100755 npc/010-2/chef.txt create mode 100755 npc/010-2/dimonds.txt create mode 100755 npc/010-2/doug.txt create mode 100755 npc/010-2/loratay.txt create mode 100755 npc/010-2/mapflags.txt create mode 100755 npc/010-2/workers.txt create mode 100644 npc/011-1/_import.txt create mode 100644 npc/011-1/_mobs.txt create mode 100644 npc/011-1/_savepoints.txt create mode 100644 npc/011-1/_warps.txt create mode 100755 npc/011-1/alchemist.txt create mode 100755 npc/011-1/auldsbel.txt create mode 100755 npc/011-1/mapflags.txt create mode 100755 npc/011-1/oscar.txt create mode 100755 npc/011-1/shops.txt create mode 100644 npc/011-3/_import.txt create mode 100644 npc/011-3/_mobs.txt create mode 100644 npc/011-3/_warps.txt create mode 100755 npc/011-3/hermit.txt create mode 100755 npc/011-3/mapflags.txt create mode 100644 npc/011-4/_import.txt create mode 100644 npc/011-4/_mobs.txt create mode 100644 npc/011-4/_warps.txt create mode 100755 npc/011-4/bl_barrier.txt create mode 100755 npc/011-4/mapflags.txt create mode 100644 npc/011-6/_import.txt create mode 100644 npc/011-6/_mobs.txt create mode 100644 npc/011-6/_warps.txt create mode 100755 npc/011-6/barrier.txt create mode 100755 npc/011-6/bryant.txt create mode 100755 npc/011-6/crastur.txt create mode 100755 npc/011-6/mapflags.txt delete mode 100644 npc/012-1/aahna.txt delete mode 100644 npc/012-1/aidan.txt create mode 100755 npc/012-1/amrak.txt delete mode 100644 npc/012-1/ayasha.txt delete mode 100644 npc/012-1/crasmande.txt create mode 100755 npc/012-1/flowerpentagram2.txt delete mode 100644 npc/012-1/hasan.txt create mode 100755 npc/012-1/injured-mouboo.txt delete mode 100644 npc/012-1/ishi.txt delete mode 100644 npc/012-1/kaan.txt delete mode 100644 npc/012-1/liana.txt create mode 100755 npc/012-1/mapflags.txt delete mode 100644 npc/012-1/marine.txt delete mode 100644 npc/012-1/prawors.txt create mode 100755 npc/012-1/shops.txt delete mode 100644 npc/012-1/tiki.txt delete mode 100644 npc/012-1/vincent.txt delete mode 100644 npc/012-1/wateranimation.txt delete mode 100644 npc/012-1/zegas.txt delete mode 100644 npc/012-2-1/_import.txt delete mode 100644 npc/012-2-1/_warps.txt delete mode 100644 npc/012-2-1/jessie.txt delete mode 100644 npc/012-2-1/tanisha.txt delete mode 100644 npc/012-2-2/_import.txt delete mode 100644 npc/012-2-2/_savepoints.txt delete mode 100644 npc/012-2-2/_warps.txt delete mode 100644 npc/012-2-2/sorfina.txt delete mode 100644 npc/012-2-3/_import.txt delete mode 100644 npc/012-2-3/_warps.txt delete mode 100644 npc/012-2-3/cynric.txt delete mode 100644 npc/012-2-3/nyle.txt delete mode 100644 npc/012-2-4/_import.txt delete mode 100644 npc/012-2-4/_warps.txt delete mode 100644 npc/012-2-4/morgan.txt delete mode 100644 npc/012-2-4/zitoni.txt delete mode 100644 npc/012-2-5/_import.txt delete mode 100644 npc/012-2-5/_warps.txt delete mode 100644 npc/012-2-5/rosen.txt delete mode 100644 npc/012-2-5/toichi.txt delete mode 100644 npc/012-2-6/_import.txt delete mode 100644 npc/012-2-6/_warps.txt delete mode 100644 npc/012-2-7/_import.txt delete mode 100644 npc/012-2-7/_savepoints.txt delete mode 100644 npc/012-2-7/_warps.txt delete mode 100644 npc/012-2-7/marazor.txt delete mode 100644 npc/012-3-1/_import.txt delete mode 100644 npc/012-3-1/_mobs.txt delete mode 100644 npc/012-3-1/_warps.txt delete mode 100644 npc/012-3-2/_import.txt delete mode 100644 npc/012-3-2/_mobs.txt delete mode 100644 npc/012-3-2/_warps.txt delete mode 100644 npc/012-3-3/_import.txt delete mode 100644 npc/012-3-3/_mobs.txt delete mode 100644 npc/012-3-3/_warps.txt delete mode 100644 npc/012-3-3/manatree.txt create mode 100644 npc/012-3/_import.txt create mode 100644 npc/012-3/_mobs.txt create mode 100644 npc/012-3/_warps.txt create mode 100755 npc/012-3/mana-seed.txt create mode 100755 npc/012-3/mapflags.txt create mode 100755 npc/012-3/traveler.txt create mode 100755 npc/012-3/warningsigns.txt create mode 100644 npc/012-4/_import.txt create mode 100644 npc/012-4/_mobs.txt create mode 100644 npc/012-4/_warps.txt create mode 100755 npc/012-4/mapflags.txt create mode 100755 npc/012-4/pvpflag.txt create mode 100644 npc/013-1/_import.txt create mode 100644 npc/013-1/_mobs.txt create mode 100644 npc/013-1/_warps.txt create mode 100755 npc/013-1/flowerpentagram.txt create mode 100755 npc/013-1/mapflags.txt create mode 100755 npc/013-1/sagatha.txt create mode 100755 npc/013-1/traveler.txt create mode 100644 npc/013-2/_import.txt create mode 100644 npc/013-2/_warps.txt create mode 100755 npc/013-2/apprentice.txt create mode 100755 npc/013-2/mapflags.txt create mode 100755 npc/013-2/notes.txt create mode 100755 npc/013-2/wizard.txt create mode 100644 npc/013-3/_import.txt create mode 100644 npc/013-3/_mobs.txt create mode 100644 npc/013-3/_savepoints.txt create mode 100644 npc/013-3/_warps.txt create mode 100755 npc/013-3/barrier.txt create mode 100755 npc/013-3/mapflags.txt create mode 100755 npc/013-3/mask_chest.txt create mode 100755 npc/013-3/misc.txt create mode 100755 npc/013-3/sword_chest.txt create mode 100644 npc/014-1/_import.txt create mode 100644 npc/014-1/_mobs.txt create mode 100644 npc/014-1/_warps.txt create mode 100755 npc/014-1/mapflags.txt create mode 100755 npc/014-1/wedding-officiator.txt create mode 100644 npc/014-3/_import.txt create mode 100644 npc/014-3/_mobs.txt create mode 100644 npc/014-3/_warps.txt create mode 100755 npc/014-3/mapflags.txt create mode 100644 npc/015-1/_import.txt create mode 100644 npc/015-1/_mobs.txt create mode 100644 npc/015-1/_warps.txt create mode 100755 npc/015-1/alice.txt create mode 100755 npc/015-1/barrier.txt create mode 100755 npc/015-1/mapflags.txt create mode 100755 npc/015-1/sword.txt create mode 100644 npc/015-3/_import.txt create mode 100644 npc/015-3/_mobs.txt create mode 100644 npc/015-3/_warps.txt create mode 100755 npc/015-3/barrier.txt create mode 100755 npc/015-3/katze.txt create mode 100755 npc/015-3/mapflags.txt create mode 100755 npc/015-3/pot.txt create mode 100644 npc/016-1/_import.txt create mode 100644 npc/016-1/_mobs.txt create mode 100644 npc/016-1/_warps.txt create mode 100755 npc/016-1/gwendolyn.txt create mode 100755 npc/016-1/mapflags.txt create mode 100755 npc/016-1/rossy.txt create mode 100644 npc/016-2/_import.txt create mode 100644 npc/016-2/_warps.txt create mode 100644 npc/017-1/_import.txt create mode 100644 npc/017-1/_mobs.txt create mode 100644 npc/017-1/_warps.txt create mode 100755 npc/017-1/flowerpentagram1.txt create mode 100755 npc/017-1/flowerpentagram5.txt create mode 100755 npc/017-1/mapflags.txt create mode 100644 npc/017-2/_import.txt create mode 100644 npc/017-2/_warps.txt create mode 100755 npc/017-2/mapflags.txt create mode 100644 npc/017-3/_import.txt create mode 100644 npc/017-3/_warps.txt create mode 100755 npc/017-3/mapflags.txt create mode 100644 npc/017-4/_import.txt create mode 100644 npc/017-4/_warps.txt create mode 100755 npc/017-4/guardingspirit.txt create mode 100755 npc/017-4/mapflags.txt create mode 100755 npc/017-4/orum.txt create mode 100755 npc/017-4/waric.txt create mode 100644 npc/017-9/_import.txt create mode 100644 npc/017-9/_warps.txt create mode 100755 npc/017-9/mapflags.txt create mode 100755 npc/017-9/npcs.txt create mode 100644 npc/018-1/_import.txt create mode 100644 npc/018-1/_mobs.txt create mode 100644 npc/018-1/_warps.txt create mode 100755 npc/018-1/flowerpentagram3.txt create mode 100755 npc/018-1/mapflags.txt create mode 100755 npc/018-1/mike.txt create mode 100755 npc/018-1/miners.txt create mode 100755 npc/018-1/sword.txt create mode 100644 npc/018-2/_import.txt create mode 100644 npc/018-2/_mobs.txt create mode 100644 npc/018-2/_warps.txt create mode 100755 npc/018-2/angus.txt create mode 100755 npc/018-2/books.txt create mode 100755 npc/018-2/caul.txt create mode 100755 npc/018-2/mapflags.txt create mode 100755 npc/018-2/miners.txt create mode 100755 npc/018-2/receptionist.txt create mode 100644 npc/018-3/_import.txt create mode 100644 npc/018-3/_mobs.txt create mode 100644 npc/018-3/_warps.txt create mode 100755 npc/018-3/bookcase.txt create mode 100755 npc/018-3/evil-obelisk.txt create mode 100755 npc/018-3/mapflags.txt create mode 100755 npc/018-3/sword.txt create mode 100644 npc/019-1/_import.txt create mode 100644 npc/019-1/_mobs.txt create mode 100644 npc/019-1/_warps.txt create mode 100755 npc/019-1/mapflags.txt create mode 100755 npc/019-1/santa_helper.txt create mode 100755 npc/019-1/snowman.txt create mode 100644 npc/019-3/_import.txt create mode 100644 npc/019-3/_mobs.txt create mode 100644 npc/019-3/_warps.txt create mode 100755 npc/019-3/mapflags.txt create mode 100644 npc/019-4/_import.txt create mode 100644 npc/019-4/_mobs.txt create mode 100644 npc/019-4/_warps.txt create mode 100755 npc/019-4/mapflags.txt create mode 100755 npc/020-1/KrickKrackKrock.txt delete mode 100644 npc/020-1/adrian.txt delete mode 100644 npc/020-1/aisha.txt delete mode 100644 npc/020-1/anwar.txt delete mode 100644 npc/020-1/bodyguard.txt delete mode 100644 npc/020-1/boss.txt delete mode 100644 npc/020-1/budifis.txt delete mode 100644 npc/020-1/cyndala.txt delete mode 100644 npc/020-1/ekinu.txt delete mode 100644 npc/020-1/eomie.txt delete mode 100644 npc/020-1/froma.txt delete mode 100644 npc/020-1/harper.txt delete mode 100644 npc/020-1/hocus.txt delete mode 100644 npc/020-1/inar.txt delete mode 100644 npc/020-1/issay.txt delete mode 100644 npc/020-1/itka.txt delete mode 100644 npc/020-1/joaquim.txt delete mode 100644 npc/020-1/joelin.txt delete mode 100644 npc/020-1/jossy.txt delete mode 100644 npc/020-1/mahoud.txt delete mode 100644 npc/020-1/malivox.txt create mode 100755 npc/020-1/mapflags.txt delete mode 100644 npc/020-1/marikel.txt delete mode 100644 npc/020-1/marine.txt delete mode 100644 npc/020-1/martha.txt delete mode 100644 npc/020-1/neko.txt delete mode 100644 npc/020-1/nickos.txt delete mode 100644 npc/020-1/noke.txt delete mode 100644 npc/020-1/odonell.txt delete mode 100644 npc/020-1/philip.txt delete mode 100644 npc/020-1/popaul.txt delete mode 100644 npc/020-1/pusco.txt create mode 100755 npc/020-1/rockscissor.txt delete mode 100644 npc/020-1/ryan.txt delete mode 100644 npc/020-1/sander.txt create mode 100755 npc/020-1/soul-menhir.txt delete mode 100644 npc/020-1/tindris.txt create mode 100755 npc/020-1/traveler.txt delete mode 100644 npc/020-1/vaspina.txt delete mode 100644 npc/020-1/wateranimation.txt create mode 100755 npc/020-1/well.txt delete mode 100644 npc/020-2-0/_import.txt delete mode 100644 npc/020-2-0/_mobs.txt delete mode 100644 npc/020-2-0/_warps.txt delete mode 100644 npc/020-2-0/kaizer.txt delete mode 100644 npc/020-2-1/_import.txt delete mode 100644 npc/020-2-1/_warps.txt delete mode 100644 npc/020-2-10/_import.txt delete mode 100644 npc/020-2-10/_warps.txt delete mode 100644 npc/020-2-10/hetchel.txt delete mode 100644 npc/020-2-11/_import.txt delete mode 100644 npc/020-2-11/_warps.txt delete mode 100644 npc/020-2-12/_import.txt delete mode 100644 npc/020-2-12/_warps.txt delete mode 100644 npc/020-2-13/_import.txt delete mode 100644 npc/020-2-13/_warps.txt delete mode 100644 npc/020-2-14/_import.txt delete mode 100644 npc/020-2-14/_warps.txt delete mode 100644 npc/020-2-15/_import.txt delete mode 100644 npc/020-2-15/_warps.txt delete mode 100644 npc/020-2-15/eleanore.txt delete mode 100644 npc/020-2-15/kadiya.txt delete mode 100644 npc/020-2-15/memoriam.txt delete mode 100644 npc/020-2-15/yumi.txt delete mode 100644 npc/020-2-16/_import.txt delete mode 100644 npc/020-2-16/_warps.txt delete mode 100644 npc/020-2-17/_import.txt delete mode 100644 npc/020-2-17/_warps.txt delete mode 100644 npc/020-2-18/_import.txt delete mode 100644 npc/020-2-18/_warps.txt delete mode 100644 npc/020-2-18/inya.txt delete mode 100644 npc/020-2-19/_import.txt delete mode 100644 npc/020-2-19/_warps.txt delete mode 100644 npc/020-2-2/_import.txt delete mode 100644 npc/020-2-2/_warps.txt delete mode 100644 npc/020-2-20/_import.txt delete mode 100644 npc/020-2-20/_warps.txt delete mode 100644 npc/020-2-20/drabur.txt delete mode 100644 npc/020-2-20/riskim.txt delete mode 100644 npc/020-2-21/_import.txt delete mode 100644 npc/020-2-21/_warps.txt delete mode 100644 npc/020-2-22/_import.txt delete mode 100644 npc/020-2-22/_warps.txt delete mode 100644 npc/020-2-23/_import.txt delete mode 100644 npc/020-2-23/_warps.txt delete mode 100644 npc/020-2-24/_import.txt delete mode 100644 npc/020-2-24/_warps.txt delete mode 100644 npc/020-2-24/kylian.txt delete mode 100644 npc/020-2-25/_import.txt delete mode 100644 npc/020-2-25/_warps.txt delete mode 100644 npc/020-2-26/_import.txt delete mode 100644 npc/020-2-26/_warps.txt delete mode 100644 npc/020-2-26/receptionist.txt delete mode 100644 npc/020-2-27/_import.txt delete mode 100644 npc/020-2-27/_warps.txt delete mode 100644 npc/020-2-28/_import.txt delete mode 100644 npc/020-2-28/_warps.txt delete mode 100644 npc/020-2-28/pauline.txt delete mode 100644 npc/020-2-29/_import.txt delete mode 100644 npc/020-2-29/_warps.txt delete mode 100644 npc/020-2-3/_import.txt delete mode 100644 npc/020-2-3/_warps.txt delete mode 100644 npc/020-2-3/inac.txt delete mode 100644 npc/020-2-30/_import.txt delete mode 100644 npc/020-2-30/_warps.txt delete mode 100644 npc/020-2-30/david.txt delete mode 100644 npc/020-2-31/_import.txt delete mode 100644 npc/020-2-31/_warps.txt delete mode 100644 npc/020-2-32/_import.txt delete mode 100644 npc/020-2-32/_warps.txt delete mode 100644 npc/020-2-33/_import.txt delete mode 100644 npc/020-2-33/_warps.txt delete mode 100644 npc/020-2-34/_import.txt delete mode 100644 npc/020-2-34/_warps.txt delete mode 100644 npc/020-2-34/casino.txt delete mode 100644 npc/020-2-34/donutello.txt delete mode 100644 npc/020-2-4/_import.txt delete mode 100644 npc/020-2-4/_warps.txt delete mode 100644 npc/020-2-5/_import.txt delete mode 100644 npc/020-2-5/_warps.txt delete mode 100644 npc/020-2-5/dausen.txt delete mode 100644 npc/020-2-5/filipa.txt delete mode 100644 npc/020-2-6/_import.txt delete mode 100644 npc/020-2-6/_warps.txt delete mode 100644 npc/020-2-7/_import.txt delete mode 100644 npc/020-2-7/_warps.txt delete mode 100644 npc/020-2-7/manoli.txt delete mode 100644 npc/020-2-8/_import.txt delete mode 100644 npc/020-2-8/_warps.txt delete mode 100644 npc/020-2-8/heathin.txt delete mode 100644 npc/020-2-8/jhedia.txt delete mode 100644 npc/020-2-9/_import.txt delete mode 100644 npc/020-2-9/_warps.txt delete mode 100644 npc/020-2-9/hydusun.txt delete mode 100644 npc/020-2-9/yanis.txt create mode 100644 npc/020-2/_import.txt create mode 100644 npc/020-2/_warps.txt create mode 100755 npc/020-2/baktar.txt create mode 100755 npc/020-2/banker.txt create mode 100755 npc/020-2/furquest.txt create mode 100755 npc/020-2/mapflags.txt create mode 100755 npc/020-2/shops.txt create mode 100644 npc/020-3/_import.txt create mode 100644 npc/020-3/_mobs.txt create mode 100644 npc/020-3/_warps.txt create mode 100755 npc/020-3/mapflags.txt create mode 100644 npc/021-3/_import.txt create mode 100644 npc/021-3/_mobs.txt create mode 100644 npc/021-3/_warps.txt create mode 100755 npc/021-3/mapflags.txt create mode 100644 npc/023-1/_import.txt create mode 100644 npc/023-1/_mobs.txt create mode 100644 npc/023-1/_warps.txt create mode 100644 npc/023-2/_import.txt create mode 100644 npc/023-2/_warps.txt create mode 100644 npc/023-3/_import.txt create mode 100644 npc/023-3/_mobs.txt create mode 100644 npc/023-3/_warps.txt create mode 100644 npc/025-1/_import.txt create mode 100644 npc/025-1/_mobs.txt create mode 100644 npc/025-1/_warps.txt create mode 100755 npc/025-1/barrier.txt create mode 100755 npc/025-1/mapflags.txt create mode 100755 npc/025-1/reset.txt create mode 100644 npc/025-3/_import.txt create mode 100644 npc/025-3/_mobs.txt create mode 100644 npc/025-3/_warps.txt create mode 100755 npc/025-3/barriers.txt create mode 100755 npc/025-3/mapflags.txt create mode 100644 npc/025-4/_import.txt create mode 100644 npc/025-4/_mobs.txt create mode 100644 npc/025-4/_warps.txt create mode 100755 npc/025-4/battlecaves.txt create mode 100755 npc/025-4/clauquer.txt create mode 100755 npc/025-4/julia.txt create mode 100755 npc/025-4/mapflags.txt create mode 100644 npc/026-1/_import.txt create mode 100644 npc/026-1/_mobs.txt create mode 100644 npc/026-1/_warps.txt create mode 100755 npc/026-1/evil_guard.txt create mode 100755 npc/026-1/headless_man.txt create mode 100755 npc/026-1/husband.txt create mode 100755 npc/026-1/mapflags.txt create mode 100755 npc/026-1/sign.txt create mode 100755 npc/026-1/soul-menhir.txt create mode 100755 npc/026-1/traveler.txt create mode 100644 npc/026-2/_import.txt create mode 100644 npc/026-2/_warps.txt create mode 100755 npc/026-2/barman.txt create mode 100755 npc/026-2/cerhan.txt create mode 100755 npc/026-2/crying_child.txt create mode 100755 npc/026-2/diary.txt create mode 100755 npc/026-2/door.txt create mode 100755 npc/026-2/eurni.txt create mode 100755 npc/026-2/golbenez.txt create mode 100755 npc/026-2/gy_inn_shops.txt create mode 100755 npc/026-2/innkeeper.txt create mode 100755 npc/026-2/lover.txt create mode 100755 npc/026-2/mapflags.txt create mode 100755 npc/026-2/testnpcs.txt create mode 100755 npc/026-2/werewolf.txt create mode 100644 npc/027-1/_import.txt create mode 100644 npc/027-1/_mobs.txt create mode 100644 npc/027-1/_warps.txt create mode 100755 npc/027-1/crypt.txt create mode 100755 npc/027-1/graves.txt create mode 100755 npc/027-1/mapflags.txt create mode 100644 npc/027-2/_import.txt create mode 100644 npc/027-2/_mobs.txt create mode 100644 npc/027-2/_warps.txt create mode 100755 npc/027-2/alacrius.txt create mode 100755 npc/027-2/caretaker.txt create mode 100755 npc/027-2/mapflags.txt create mode 100755 npc/027-2/thurston.txt create mode 100644 npc/027-3/_import.txt create mode 100644 npc/027-3/_mobs.txt create mode 100644 npc/027-3/_warps.txt create mode 100755 npc/027-3/casket_traps.txt create mode 100755 npc/027-3/general_krukan_door.txt create mode 100755 npc/027-3/mapflags.txt create mode 100755 npc/027-3/monsters.txt create mode 100644 npc/027-4/_import.txt create mode 100644 npc/027-4/_mobs.txt create mode 100644 npc/027-4/_warps.txt create mode 100755 npc/027-4/casket_traps.txt create mode 100755 npc/027-4/general_razha_door.txt create mode 100755 npc/027-4/mapflags.txt create mode 100755 npc/027-4/monsters.txt create mode 100644 npc/027-5/_import.txt create mode 100644 npc/027-5/_mobs.txt create mode 100644 npc/027-5/_warps.txt create mode 100755 npc/027-5/casket_traps.txt create mode 100755 npc/027-5/general_terogan_door.txt create mode 100755 npc/027-5/mapflags.txt create mode 100644 npc/027-6/_import.txt create mode 100755 npc/027-6/casket_traps.txt create mode 100755 npc/027-6/general_krukan.txt create mode 100755 npc/027-6/general_krukan_exitdoor.txt create mode 100755 npc/027-6/mapflags.txt create mode 100644 npc/027-7/_import.txt create mode 100755 npc/027-7/general_razha.txt create mode 100755 npc/027-7/general_razha_exitdoor.txt create mode 100755 npc/027-7/mapflags.txt create mode 100644 npc/027-8/_import.txt create mode 100755 npc/027-8/general_terogan.txt create mode 100755 npc/027-8/general_terogan_exitdoor.txt create mode 100755 npc/027-8/mapflags.txt create mode 100644 npc/028-1/_import.txt create mode 100644 npc/028-1/_warps.txt create mode 100755 npc/028-1/mapflags.txt create mode 100755 npc/028-1/portal.txt create mode 100644 npc/028-3/_import.txt create mode 100644 npc/028-3/_warps.txt create mode 100755 npc/028-3/mapflags.txt create mode 100644 npc/029-1/_import.txt create mode 100644 npc/029-1/_mobs.txt create mode 100644 npc/029-1/_warps.txt create mode 100755 npc/029-1/aahna.txt create mode 100755 npc/029-1/barrier.txt create mode 100755 npc/029-1/dock.txt create mode 100755 npc/029-1/ferry_master.txt create mode 100755 npc/029-1/hasan.txt create mode 100755 npc/029-1/hideandseek.txt create mode 100755 npc/029-1/kaan.txt create mode 100755 npc/029-1/liana.txt create mode 100755 npc/029-1/mapflags.txt create mode 100755 npc/029-1/monster_guide.txt create mode 100755 npc/029-1/rewards_master.txt create mode 100755 npc/029-1/soul-menhir.txt create mode 100755 npc/029-1/traveler.txt create mode 100755 npc/029-1/tutorial.txt create mode 100755 npc/029-1/valon.txt create mode 100755 npc/029-1/vincent.txt create mode 100755 npc/029-1/zegas.txt create mode 100644 npc/029-2/_import.txt create mode 100644 npc/029-2/_mobs.txt create mode 100644 npc/029-2/_warps.txt create mode 100755 npc/029-2/alchemy.txt create mode 100755 npc/029-2/bankroom.txt create mode 100755 npc/029-2/barrels.txt create mode 100755 npc/029-2/barrels_config.txt create mode 100755 npc/029-2/cynric.txt create mode 100755 npc/029-2/mapflags.txt create mode 100755 npc/029-2/morgan.txt create mode 100755 npc/029-2/nyle.txt create mode 100755 npc/029-2/sorfina.txt create mode 100755 npc/029-2/stat_reset.txt create mode 100755 npc/029-2/tanisha.txt create mode 100755 npc/029-2/two_arms.txt create mode 100644 npc/029-3/_import.txt create mode 100755 npc/029-3/barrier.txt create mode 100755 npc/029-3/mapflags.txt create mode 100755 npc/029-3/parua.txt create mode 100644 npc/029-4/_import.txt create mode 100644 npc/029-4/_mobs.txt create mode 100644 npc/029-4/_warps.txt create mode 100644 npc/030-1/_import.txt create mode 100644 npc/030-1/_mobs.txt create mode 100644 npc/030-1/_warps.txt create mode 100644 npc/030-2/_import.txt create mode 100644 npc/030-2/_warps.txt create mode 100755 npc/030-2/avalia.txt create mode 100755 npc/030-2/basic_npcs.txt create mode 100755 npc/030-2/bedding_helper.txt create mode 100755 npc/030-2/chief_helper.txt create mode 100755 npc/030-2/eljas.txt create mode 100755 npc/030-2/empty_boxes_helper.txt create mode 100755 npc/030-2/glitter_helper.txt create mode 100755 npc/030-2/guards.txt create mode 100755 npc/030-2/mapflags.txt create mode 100755 npc/030-2/present_helper.txt create mode 100755 npc/030-2/roasted_acorns_helper.txt create mode 100755 npc/030-2/shipping_helper.txt create mode 100755 npc/030-2/storage_helper.txt create mode 100755 npc/030-2/wrapping_paper_helper.txt create mode 100644 npc/030-3/_import.txt create mode 100644 npc/030-3/_warps.txt create mode 100755 npc/030-3/mapflags.txt create mode 100755 npc/030-3/orum_homunculus.txt create mode 100644 npc/030-4/_import.txt create mode 100755 npc/030-4/mana_battery.txt create mode 100755 npc/030-4/mapflags.txt create mode 100644 npc/031-1/_import.txt create mode 100644 npc/031-1/_mobs.txt create mode 100644 npc/031-1/_warps.txt create mode 100755 npc/031-1/angelaOutside.txt create mode 100755 npc/031-1/dock.txt create mode 100755 npc/031-1/frozenbeard.txt create mode 100755 npc/031-1/house.txt create mode 100755 npc/031-1/mapflags.txt create mode 100644 npc/031-2/_import.txt create mode 100644 npc/031-2/_warps.txt create mode 100755 npc/031-2/angelaHouse.txt create mode 100755 npc/031-2/cindyHouse.txt create mode 100755 npc/031-2/mapflags.txt create mode 100644 npc/031-3/_import.txt create mode 100644 npc/031-3/_mobs.txt create mode 100644 npc/031-3/_warps.txt create mode 100755 npc/031-3/labyrinth.txt create mode 100755 npc/031-3/mapflags.txt create mode 100644 npc/031-4/_import.txt create mode 100755 npc/031-4/barrier.txt create mode 100755 npc/031-4/cindyCave.txt create mode 100755 npc/031-4/mapflags.txt create mode 100644 npc/032-3/_import.txt create mode 100644 npc/032-3/_mobs.txt create mode 100644 npc/032-3/_warps.txt create mode 100755 npc/032-3/mapflags.txt create mode 100644 npc/033-1/_import.txt create mode 100644 npc/033-1/_mobs.txt create mode 100644 npc/033-1/_warps.txt create mode 100755 npc/033-1/backDoor.txt create mode 100755 npc/033-1/barbarianinit.txt create mode 100755 npc/033-1/birrod.txt create mode 100755 npc/033-1/kimarr.txt create mode 100755 npc/033-1/mapflags.txt create mode 100755 npc/033-1/traveler.txt create mode 100755 npc/033-1/yerrnk.txt create mode 100644 npc/034-1/_import.txt create mode 100644 npc/034-1/_mobs.txt create mode 100644 npc/034-1/_warps.txt create mode 100755 npc/034-1/ambushs.txt create mode 100755 npc/034-1/mapflags.txt create mode 100755 npc/034-1/yetiSpawn.txt create mode 100644 npc/034-2/_import.txt create mode 100644 npc/034-2/_warps.txt create mode 100755 npc/034-2/mapflags.txt create mode 100644 npc/035-2/_import.txt create mode 100755 npc/035-2/casino.txt create mode 100755 npc/035-2/emblems.txt create mode 100755 npc/035-2/koga.txt create mode 100755 npc/035-2/mapflags.txt create mode 100755 npc/035-2/shops.txt create mode 100644 npc/036-2/_import.txt create mode 100755 npc/036-2/casino.txt create mode 100755 npc/036-2/emblems.txt create mode 100755 npc/036-2/koga-candor.txt create mode 100755 npc/036-2/mapflags.txt create mode 100755 npc/036-2/shops.txt create mode 100644 npc/041-1/_import.txt create mode 100644 npc/041-1/_mobs.txt create mode 100644 npc/041-1/_warps.txt create mode 100644 npc/042-1/_import.txt create mode 100644 npc/042-1/_mobs.txt create mode 100644 npc/042-1/_warps.txt create mode 100644 npc/043-1/_import.txt create mode 100644 npc/043-1/_mobs.txt create mode 100644 npc/043-1/_warps.txt create mode 100644 npc/043-3/_import.txt create mode 100644 npc/043-3/_mobs.txt create mode 100644 npc/043-3/_warps.txt create mode 100755 npc/043-3/mapflags.txt create mode 100644 npc/043-4/_import.txt create mode 100644 npc/043-4/_mobs.txt create mode 100644 npc/043-4/_warps.txt create mode 100755 npc/043-4/mapflags.txt create mode 100644 npc/045-1/_import.txt create mode 100644 npc/045-1/_mobs.txt create mode 100644 npc/045-1/_warps.txt create mode 100755 npc/045-1/mapflags.txt create mode 100644 npc/046-1/_import.txt create mode 100644 npc/046-1/_mobs.txt create mode 100644 npc/046-1/_warps.txt create mode 100755 npc/046-1/mapflags.txt create mode 100644 npc/046-3/_import.txt create mode 100644 npc/046-3/_mobs.txt create mode 100644 npc/046-3/_warps.txt create mode 100755 npc/046-3/mapflags.txt create mode 100644 npc/047-1/_import.txt create mode 100644 npc/047-1/_mobs.txt create mode 100644 npc/047-1/_warps.txt create mode 100755 npc/047-1/mapflags.txt create mode 100644 npc/047-3/_import.txt create mode 100644 npc/047-3/_mobs.txt create mode 100644 npc/047-3/_warps.txt create mode 100755 npc/047-3/mapflags.txt create mode 100644 npc/048-2/_import.txt create mode 100644 npc/048-2/_warps.txt create mode 100755 npc/048-2/bluesageConfig.txt create mode 100755 npc/048-2/helperAccused.txt create mode 100755 npc/048-2/helperBookpages1.txt create mode 100755 npc/048-2/helperBookpages2.txt create mode 100755 npc/048-2/helperBookpages3.txt create mode 100755 npc/048-2/helperChief.txt create mode 100755 npc/048-2/helperCleaning1.txt create mode 100755 npc/048-2/helperCleaning2.txt create mode 100755 npc/048-2/helperCleaning3.txt create mode 100755 npc/048-2/helperCleaning4.txt create mode 100755 npc/048-2/helperCleaning5.txt create mode 100755 npc/048-2/helperJanitor.txt create mode 100755 npc/048-2/helperMInk.txt create mode 100755 npc/048-2/helperMReed.txt create mode 100755 npc/048-2/helperMSilk.txt create mode 100755 npc/048-2/helperMYetiClaw.txt create mode 100755 npc/048-2/helperResting1.txt create mode 100755 npc/048-2/helperResting2.txt create mode 100755 npc/048-2/mapflags.txt create mode 100755 npc/048-2/sageNikolai.txt create mode 100755 npc/048-2/slimes.txt create mode 100755 npc/048-2/traveler.txt create mode 100755 npc/048-2/visitors.txt create mode 100644 npc/051-1/_import.txt create mode 100644 npc/051-1/_mobs.txt create mode 100755 npc/051-1/desert.txt create mode 100755 npc/051-1/desertmonsters.txt create mode 100755 npc/051-1/forest.txt create mode 100755 npc/051-1/forestmonsters.txt create mode 100755 npc/051-1/janitor.txt create mode 100755 npc/051-1/mapflags.txt create mode 100644 npc/051-3/_import.txt create mode 100644 npc/051-3/_mobs.txt create mode 100755 npc/051-3/ambush.txt create mode 100755 npc/051-3/jailslimes.txt create mode 100755 npc/051-3/janitor.txt create mode 100755 npc/051-3/locks.txt create mode 100755 npc/051-3/mapflags.txt create mode 100755 npc/051-3/reinforcements.txt create mode 100644 npc/052-1/_import.txt create mode 100644 npc/052-1/_mobs.txt create mode 100755 npc/052-1/channelling.txt create mode 100755 npc/052-1/janitor.txt create mode 100755 npc/052-1/mapflags.txt create mode 100644 npc/052-2/_import.txt create mode 100755 npc/052-2/chest.txt create mode 100755 npc/052-2/janitor.txt create mode 100755 npc/052-2/lobby.txt create mode 100755 npc/052-2/mapflags.txt create mode 100755 npc/052-2/partyroom.txt create mode 100755 npc/052-2/storage.txt create mode 100644 npc/055-1/_import.txt create mode 100644 npc/055-1/_mobs.txt create mode 100644 npc/055-1/_warps.txt create mode 100755 npc/055-1/flowerpentagram4.txt create mode 100755 npc/055-1/mapflags.txt create mode 100755 npc/055-1/pumpkins.txt create mode 100755 npc/055-1/traveler.txt create mode 100644 npc/055-3/_import.txt create mode 100644 npc/055-3/_mobs.txt create mode 100644 npc/055-3/_warps.txt create mode 100755 npc/055-3/mapflags.txt create mode 100644 npc/056-2/_import.txt create mode 100644 npc/056-2/_warps.txt create mode 100755 npc/056-2/barrier.txt create mode 100755 npc/056-2/mapflags.txt create mode 100755 npc/056-2/mirak.txt create mode 100755 npc/056-2/notes.txt create mode 100644 npc/057-1/_import.txt create mode 100644 npc/057-1/_mobs.txt create mode 100644 npc/057-1/_warps.txt create mode 100755 npc/057-1/mapflags.txt create mode 100644 npc/069-2/_import.txt create mode 100644 npc/069-2/_warps.txt create mode 100644 npc/070-1/_import.txt create mode 100644 npc/070-3/_import.txt create mode 100644 npc/099-1/_import.txt create mode 100644 npc/099-1/_warps.txt create mode 100644 npc/099-2/_import.txt create mode 100644 npc/099-2/_warps.txt create mode 100644 npc/099-3/_import.txt create mode 100644 npc/099-3/_warps.txt create mode 100644 npc/099-4/_import.txt create mode 100644 npc/099-5/_import.txt create mode 100644 npc/099-6/_import.txt create mode 100644 npc/099-6/_warps.txt create mode 100644 npc/099-7/_import.txt create mode 100644 npc/099-8/_import.txt mode change 100644 => 100755 npc/_import.txt create mode 100755 npc/annuals/check_time.txt create mode 100755 npc/annuals/fathertime.txt create mode 100755 npc/annuals/halloween/config.txt create mode 100755 npc/annuals/halloween/debug.txt create mode 100755 npc/annuals/halloween/munro.txt create mode 100755 npc/annuals/halloween/trick_or_treat.txt create mode 100755 npc/annuals/tree_beard.txt create mode 100755 npc/annuals/xmas/barriers.txt create mode 100755 npc/annuals/xmas/config.txt create mode 100755 npc/annuals/xmas/core.txt create mode 100755 npc/annuals/xmas/debug.txt create mode 100755 npc/annuals/xmas/helpers.txt create mode 100755 npc/annuals/xmas/list.txt create mode 100755 npc/annuals/xmas/mobmanager.txt create mode 100755 npc/annuals/xmas/reagents.txt create mode 100755 npc/annuals/xmas/states.txt create mode 100755 npc/botcheck/mapflags.txt delete mode 100644 npc/commands/bodytype.txt create mode 100755 npc/commands/changesex.txt create mode 100755 npc/commands/class.txt delete mode 100644 npc/commands/debug-look.txt delete mode 100644 npc/commands/debug-preset.txt delete mode 100644 npc/commands/debug-quest.txt delete mode 100644 npc/commands/debug-skill.txt mode change 100644 => 100755 npc/commands/debug.txt create mode 100755 npc/commands/destroynpc.txt delete mode 100644 npc/commands/event.txt delete mode 100644 npc/commands/gm.txt create mode 100755 npc/commands/hug.txt create mode 100755 npc/commands/marry.txt delete mode 100644 npc/commands/mobinfo.txt delete mode 100644 npc/commands/motd.txt mode change 100644 => 100755 npc/commands/music.txt create mode 100755 npc/commands/mute.txt create mode 100755 npc/commands/npctalk.txt create mode 100755 npc/commands/numa.txt create mode 100755 npc/commands/pullrabbit.txt delete mode 100644 npc/commands/python.txt delete mode 100644 npc/commands/rate-management.txt create mode 100755 npc/commands/remotecmd.txt delete mode 100644 npc/commands/resync.txt delete mode 100644 npc/commands/scheduled-broadcasts.txt delete mode 100644 npc/commands/super-menu.txt mode change 100644 => 100755 npc/commands/warp.txt mode change 100644 => 100755 npc/commands/zeny.txt delete mode 100644 npc/config/hairstyle_config.txt delete mode 100644 npc/config/location.txt delete mode 100644 npc/config/magic.txt delete mode 100644 npc/dev/ci_test.txt delete mode 100644 npc/dev/test.txt delete mode 100644 npc/fermi/_import.txt delete mode 100644 npc/fermi/_warps.txt create mode 100755 npc/functions/DyeConfig.txt delete mode 100644 npc/functions/RNGesus.txt delete mode 100644 npc/functions/afk.txt create mode 100755 npc/functions/announcements.txt delete mode 100644 npc/functions/array.txt delete mode 100644 npc/functions/asklanguage.txt delete mode 100644 npc/functions/asleep.txt delete mode 100644 npc/functions/bank.txt create mode 100755 npc/functions/banker.txt mode change 100644 => 100755 npc/functions/barber.txt delete mode 100644 npc/functions/beds.txt delete mode 100644 npc/functions/bitwise.txt delete mode 100644 npc/functions/bodytype.txt delete mode 100644 npc/functions/casino.txt create mode 100755 npc/functions/clear_vars.txt delete mode 100644 npc/functions/clientversion.txt delete mode 100644 npc/functions/confused-tree-dict.txt delete mode 100644 npc/functions/crafting.txt delete mode 100644 npc/functions/daily.txt create mode 100755 npc/functions/dailyquest.txt create mode 100755 npc/functions/default_npc_checks.txt delete mode 100644 npc/functions/doors.txt create mode 100755 npc/functions/dynamic_menu.txt delete mode 100644 npc/functions/event-listeners.txt create mode 100755 npc/functions/evil_obelisk.txt delete mode 100644 npc/functions/faction.txt create mode 100755 npc/functions/ferry.txt delete mode 100644 npc/functions/fishing.txt delete mode 100644 npc/functions/game-rules.txt create mode 100755 npc/functions/game_rules.txt delete mode 100644 npc/functions/generic-text.txt mode change 100644 => 100755 npc/functions/global_event_handler.txt create mode 100755 npc/functions/gm_island.txt delete mode 100644 npc/functions/goodbye.txt delete mode 100644 npc/functions/hammocks.txt delete mode 100644 npc/functions/harbours.txt create mode 100755 npc/functions/headstyles.txt delete mode 100644 npc/functions/hello.txt create mode 100755 npc/functions/inn.txt delete mode 100644 npc/functions/input.txt delete mode 100644 npc/functions/inventoryplace.txt create mode 100755 npc/functions/jesusalvatr.txt delete mode 100644 npc/functions/legacy.txt delete mode 100644 npc/functions/legiontalk.txt delete mode 100644 npc/functions/libquest.txt create mode 100755 npc/functions/lockpicking.txt delete mode 100644 npc/functions/lockpicks.txt create mode 100755 npc/functions/magic.txt delete mode 100644 npc/functions/main.txt delete mode 100644 npc/functions/manhole.txt delete mode 100644 npc/functions/masks.txt delete mode 100644 npc/functions/math.txt create mode 100755 npc/functions/mob_points.txt create mode 100755 npc/functions/motd.txt create mode 100755 npc/functions/motdconfig.txt delete mode 100644 npc/functions/mouboofunc.txt delete mode 100644 npc/functions/music.txt delete mode 100644 npc/functions/npcmove.txt delete mode 100644 npc/functions/npcmovegraph.txt delete mode 100644 npc/functions/openbook.txt delete mode 100644 npc/functions/permissions.txt delete mode 100644 npc/functions/player-cache.txt create mode 100755 npc/functions/process_equip.txt delete mode 100644 npc/functions/quest-debug/000-ShipQuests_Julia.txt delete mode 100644 npc/functions/quest-debug/001-ShipQuests_Arpan.txt delete mode 100644 npc/functions/quest-debug/002-ShipQuests_Alige.txt delete mode 100644 npc/functions/quest-debug/003-ShipQuests_Peter.txt delete mode 100644 npc/functions/quest-debug/004-ShipQuests_Nard.txt delete mode 100644 npc/functions/quest-debug/005-ShipQuests_Knife.txt delete mode 100644 npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt delete mode 100644 npc/functions/quest-debug/007-ShipQuests_Door.txt delete mode 100644 npc/functions/quest-debug/008-ShipQuests_Couwan.txt delete mode 100644 npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt delete mode 100644 npc/functions/quest-debug/010-ShipQuests_Ale.txt delete mode 100644 npc/functions/quest-debug/011-ShipQuests_Astapolos.txt delete mode 100644 npc/functions/quest-debug/012-ShipQuests_Gulukan.txt delete mode 100644 npc/functions/quest-debug/013-ShipQuests_Jalad.txt delete mode 100644 npc/functions/quest-debug/014-ShipQuests_QMuller.txt delete mode 100644 npc/functions/quest-debug/015-ShipQuests_Tibbo.txt delete mode 100644 npc/functions/quest-debug/016-ShipQuests_Gugli.txt delete mode 100644 npc/functions/quest-debug/017-ShipQuests_ChefGado.txt delete mode 100644 npc/functions/quest-debug/018-General_Cookies.txt delete mode 100644 npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt delete mode 100644 npc/functions/quest-debug/021-ArtisQuests_Urchin.txt delete mode 100644 npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt delete mode 100644 npc/functions/quest-debug/023-ArtisQuests_Fishman.txt delete mode 100644 npc/functions/quest-debug/024-ArtisQuests_QOnan.txt delete mode 100644 npc/functions/quest-debug/026-General_Rumly.txt delete mode 100644 npc/functions/quest-debug/027-ArtisQuests_Enora.txt delete mode 100644 npc/functions/quest-debug/029-ArtisQuests_Fexil.txt delete mode 100644 npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt delete mode 100644 npc/functions/quest-debug/031-General_Janus.txt delete mode 100644 npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt delete mode 100644 npc/functions/quest-debug/033-Artis_Legion_Progress.txt delete mode 100644 npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt delete mode 100644 npc/functions/quest-debug/035-ThiefQuests_Artis.txt delete mode 100644 npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt delete mode 100644 npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt delete mode 100644 npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt delete mode 100644 npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt delete mode 100644 npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt delete mode 100644 npc/functions/quest-debug/055-General_Cooking.txt delete mode 100644 npc/functions/quest-debug/056-General_Brotherhood.txt delete mode 100644 npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt delete mode 100644 npc/functions/quest-debug/058-ArgaesQuest_Galimatia.txt delete mode 100644 npc/functions/quest-debug/059-HurnscaldQuests_Rossy.txt delete mode 100644 npc/functions/quest-debug/061-General_Hal.txt delete mode 100644 npc/functions/quest-debug/100-General_Narrator.txt delete mode 100644 npc/functions/quest-debug/functions.txt delete mode 100644 npc/functions/questgen.txt create mode 100755 npc/functions/quiz.txt delete mode 100644 npc/functions/referral.txt delete mode 100644 npc/functions/refine.txt delete mode 100644 npc/functions/resetstatus.txt delete mode 100644 npc/functions/riddle.txt delete mode 100644 npc/functions/sailordialogue.txt delete mode 100644 npc/functions/sailortalk.txt delete mode 100644 npc/functions/savepoint.txt delete mode 100644 npc/functions/scoreboards.txt delete mode 100644 npc/functions/shops.txt delete mode 100644 npc/functions/skills.txt create mode 100755 npc/functions/slot_machine.txt delete mode 100644 npc/functions/soul-menhir.txt create mode 100755 npc/functions/soul_menhir.txt delete mode 100644 npc/functions/spotlight.txt create mode 100755 npc/functions/stat_reset.txt delete mode 100644 npc/functions/string.txt mode change 100644 => 100755 npc/functions/time.txt delete mode 100644 npc/functions/timer.txt create mode 100755 npc/functions/travelers.txt delete mode 100644 npc/functions/treasure.txt create mode 100755 npc/functions/undead_debug.txt delete mode 100644 npc/functions/util.txt delete mode 100644 npc/functions/vault.txt delete mode 100644 npc/functions/villagertalk.txt delete mode 100644 npc/functions/warp.txt create mode 100755 npc/functions/water_bottle.txt create mode 100755 npc/items/check_wand.txt delete mode 100644 npc/items/cookie.txt delete mode 100644 npc/items/croconut.txt delete mode 100644 npc/items/gift.txt create mode 100755 npc/items/launcher_ammo.txt delete mode 100644 npc/items/master_skillbook.txt create mode 100755 npc/items/mirror.txt delete mode 100644 npc/items/music_toys.txt create mode 100755 npc/items/pickled_beets.txt create mode 100755 npc/items/purification_potion.txt delete mode 100644 npc/items/rand_sc_heal.txt delete mode 100644 npc/items/recipes.txt create mode 100755 npc/items/require_stat.txt create mode 100755 npc/items/restricted_item.txt create mode 100755 npc/items/rubber_bat.txt create mode 100755 npc/items/scissors.txt create mode 100755 npc/items/shock_sweet.txt delete mode 100644 npc/items/shovel.txt create mode 100755 npc/items/unequipcb.txt create mode 100755 npc/items/unreleased_item.txt create mode 100755 npc/items/warpTowels.txt create mode 100755 npc/magic/level0-antiprotect.txt create mode 100755 npc/magic/level0-discharge.txt create mode 100755 npc/magic/level0-wand.txt create mode 100755 npc/magic/level1-aggravate.txt create mode 100755 npc/magic/level1-detect-magic.txt create mode 100755 npc/magic/level1-experience.txt create mode 100755 npc/magic/level1-flare-dart.txt create mode 100755 npc/magic/level1-grow-alizarin.txt create mode 100755 npc/magic/level1-grow-cobalt.txt create mode 100755 npc/magic/level1-grow-gamboge.txt create mode 100755 npc/magic/level1-grow-mauve.txt create mode 100755 npc/magic/level1-lesser-heal.txt create mode 100755 npc/magic/level1-magic-blade.txt create mode 100755 npc/magic/level1-make-sulphur.txt create mode 100755 npc/magic/level1-sense-spouse.txt create mode 100755 npc/magic/level1-summon-maggots.txt create mode 100755 npc/magic/level1-transmute-wood.txt create mode 100755 npc/magic/level2-arrow-hail.txt create mode 100755 npc/magic/level2-barrier.txt create mode 100755 npc/magic/level2-detect-players.txt create mode 100755 npc/magic/level2-enchant-lifestone.txt create mode 100755 npc/magic/level2-flying-backpack.txt create mode 100755 npc/magic/level2-happy-curse.txt create mode 100755 npc/magic/level2-hide.txt create mode 100755 npc/magic/level2-lay-on-hands.txt create mode 100755 npc/magic/level2-lightning-strike.txt create mode 100755 npc/magic/level2-magic-knuckles.txt create mode 100755 npc/magic/level2-make-arrows.txt create mode 100755 npc/magic/level2-make-iron-powder.txt create mode 100755 npc/magic/level2-make-shirt.txt create mode 100755 npc/magic/level2-make-short-tanktop.txt create mode 100755 npc/magic/level2-make-tanktop.txt create mode 100755 npc/magic/level2-protect.txt create mode 100755 npc/magic/level2-rain.txt create mode 100755 npc/magic/level2-shear.txt create mode 100755 npc/magic/level2-summon-fluffies.txt create mode 100755 npc/magic/level2-summon-mouboo.txt create mode 100755 npc/magic/level2-summon-pinkie.txt create mode 100755 npc/magic/level2-summon-snakes.txt create mode 100755 npc/magic/level2-summon-spiky-mushroom.txt create mode 100755 npc/magic/level2-summon-wickedmushroom.txt create mode 100755 npc/magic/level2-toxic-dart.txt create mode 100755 npc/magic/level3-necromancy.txt delete mode 100644 npc/marine-2/_import.txt delete mode 100644 npc/marine-2/_mobs.txt delete mode 100644 npc/marine-2/main.txt delete mode 100644 npc/marine/_import.txt delete mode 100644 npc/marine/_mobs.txt delete mode 100644 npc/marine/saluc.txt mode change 100644 => 100755 npc/scripts.conf delete mode 100644 npc/sec_pri/_import.txt delete mode 100644 npc/sec_pri/redirect.txt delete mode 100644 npc/test/_import.txt delete mode 100644 npc/test/_mobs.txt delete mode 100644 npc/test/mapflags.txt delete mode 100644 npc/test/npc1.txt delete mode 100644 npc/test/npc2.txt delete mode 100644 npc/test/npc3.txt delete mode 100644 npc/test/npc4.txt delete mode 100644 npc/test/npc5.txt delete mode 100644 npc/test/npc6.txt delete mode 100644 npc/test/test1.txt delete mode 100644 npc/test/test2.txt delete mode 100644 npc/testbg/_import.txt delete mode 100644 npc/testbg/mapflags.txt (limited to 'maps/pre-re/000-1.mcache') diff --git a/conf/map/maps.conf b/conf/map/maps.conf index 0e0ab13c..c451ad1f 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -1,177 +1,132 @@ map_removed: ( ) map_list: ( - "000-0-0", - "000-0-1", - "000-0", "000-1", - "000-2-0", - "000-2-1", - "000-2-2", - "000-2-3", - "000-2-4", "001-1", - "001-2-0", - "001-2-1", - "001-2-10", - "001-2-11", - "001-2-12", - "001-2-13", - "001-2-14", - "001-2-15", - "001-2-16", - "001-2-17", - "001-2-18", - "001-2-19", - "001-2-2", - "001-2-20", - "001-2-21", - "001-2-22", - "001-2-23", - "001-2-24", - "001-2-25", - "001-2-26", - "001-2-27", - "001-2-28", - "001-2-29", - "001-2-3", - "001-2-30", - "001-2-31", - "001-2-32", - "001-2-33", - "001-2-34", - "001-2-35", - "001-2-36", - "001-2-37", - "001-2-38", - "001-2-39", - "001-2-4", - "001-2-40", - "001-2-41", - "001-2-42", - "001-2-43", - "001-2-5", - "001-2-6", - "001-2-7", - "001-2-8", - "001-2-9", - "001-3-0", - "001-3-1", - "001-3-2", - "008-1-1", + "001-2", + "001-3", + "002-1", + "002-2", + "002-3", + "002-4", + "002-5", + "003-1", + "003-4", + "004-1", + "004-3", + "004-4", + "004-5", + "005-3", + "006-1", + "006-2", + "006-3", + "007-1", + "007-2", "008-1", - "008-2-0", - "008-2-1", - "008-2-10", - "008-2-11", - "008-2-12", - "008-2-13", - "008-2-14", - "008-2-15", - "008-2-16", - "008-2-17", - "008-2-18", - "008-2-19", - "008-2-2", - "008-2-20", - "008-2-21", - "008-2-22", - "008-2-23", - "008-2-24", - "008-2-25", - "008-2-26", - "008-2-27", - "008-2-28", - "008-2-29", - "008-2-3", - "008-2-30", - "008-2-31", - "008-2-32", - "008-2-4", - "008-2-5", - "008-2-6", - "008-2-7", - "008-2-8", - "008-2-9", - "008-3-0", - "008-3-1", - "008-3-2", - "008-3-3", - "008-3-4", - "008-3-5", - "008-3-6", "009-1", - "009-2-0", - "009-2-1", - "009-2-10", - "009-2-11", - "009-2-12", - "009-2-13", - "009-2-14", - "009-2-15", - "009-2-16", - "009-2-17", - "009-2-18", - "009-2-2", - "009-2-3", - "009-2-4", - "009-2-5", - "009-2-6", - "009-2-7", - "009-2-8", - "009-2-9", + "009-2", + "009-3", + "009-4", + "009-5", + "009-6", + "009-7", + "009-8", + "010-1", + "010-2", + "011-3", + "011-4", + "011-6", "012-1", - "012-2-1", - "012-2-2", - "012-2-3", - "012-2-4", - "012-2-5", - "012-2-6", - "012-2-7", - "012-3-1", - "012-3-2", - "012-3-3", + "012-3", + "012-4", + "013-1", + "013-2", + "014-1", + "014-3", + "015-1", + "015-3", + "016-1", + "016-2", + "017-1", + "017-2", + "017-3", + "017-4", + "017-9", + "018-1", + "018-2", + "018-3", + "019-1", + "019-3", + "019-4", "020-1", - "020-2-0", - "020-2-1", - "020-2-10", - "020-2-11", - "020-2-12", - "020-2-13", - "020-2-14", - "020-2-15", - "020-2-16", - "020-2-17", - "020-2-18", - "020-2-19", - "020-2-2", - "020-2-20", - "020-2-21", - "020-2-22", - "020-2-23", - "020-2-24", - "020-2-25", - "020-2-26", - "020-2-27", - "020-2-28", - "020-2-29", - "020-2-3", - "020-2-30", - "020-2-31", - "020-2-32", - "020-2-33", - "020-2-34", - "020-2-4", - "020-2-5", - "020-2-6", - "020-2-7", - "020-2-8", - "020-2-9", + "020-2", + "020-3", + "021-3", + "023-1", + "023-2", + "023-3", + "025-1", + "025-3", + "025-4", + "026-1", + "026-2", + "027-1", + "027-2", + "027-3", + "027-4", + "027-5", + "027-6", + "027-7", + "027-8", + "028-1", + "028-3", + "029-1", + "029-2", + "029-3", + "029-4", + "030-1", + "030-2", + "030-3", + "030-4", + "031-1", + "031-2", + "031-3", + "031-4", + "032-3", + "033-1", + "034-1", + "034-2", + "035-2", + "036-2", + "041-1", + "042-1", + "043-1", + "043-3", + "043-4", + "045-1", + "046-1", + "046-3", + "047-1", + "047-3", + "048-2", + "051-1", + "051-3", + "052-1", + "052-2", + "055-1", + "055-3", + "056-2", + "057-1", + "069-2", + "070-1", + "070-3", + "099-1", + "099-2", + "099-3", + "099-4", + "099-5", + "099-6", + "099-7", + "099-8", "botcheck", - "fermi", - "marine-2", - "marine", - "sec_pri", - "test", - "testbg", ) diff --git a/db/constants.conf b/db/constants.conf index 895d575f..caf20faf 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -5279,5 +5279,557 @@ more than one separator can be used in a row (so 12_3___456 is illegal). KYLIAN_HETCHEL: 16 KYLIAN_HOCUS: 32 + comment__: "TMW Constants" + MF_NOPVP:14 + MF_MASK:15 + MF_RAIN:20 + MF_NO_PLAYER_DROPS:27 + MF_OUTSIDE:29 + MF_RESAVE:30 + bMatk1:43 + bDeaf:70 + equip_arrow:11 + LOOK_HAIR_STYLE:1 + LOOK_LEGS:3 + LOOK_HELMET:4 + LOOK_CHEST:5 + LOOK_GLOVES:10 + LOOK_CAPE:11 + LOOK_MISC1:12 + LOOK_MISC2:13 + HS_Bald:0 + HS_BaldTwo:1 + HS_FlatPonytail:2 + HS_BowlCut:3 + HS_CombedBack:4 + HS_Emo:5 + HS_Mohawk:6 + HS_Pompadour:7 + HS_CenterParting:8 + HS_LongAndSlick:9 + HS_ShortAndCurly:10 + HS_Pigtails:11 + HS_LongAndCurly:12 + HS_Parted:13 + HS_PerkyPonytail:14 + HS_Wave:15 + HS_Mane:16 + HS_Bun:17 + HS_ShoulderLengthFlick:18 + HS_Fizzy:19 + HS_LongAndClipped:20 + HC_LIGHT_BROWN:0 + HC_GREEN:1 + HC_RED:2 + HC_PURPLE:3 + HC_GRAY:4 + HC_YELLOW:5 + HC_BLUE:6 + HC_BROWN:7 + HC_LIGHT_BLUE:8 + HC_DARK_PURPLE:9 + HC_BLACK:10 + HC_PINK:11 + HC_BROWN_TWO:12 + HC_WHITE:127 + cNone:11 + cWhite:10 + cRed:0 + cGreen:1 + cDarkBlue:2 + cYellow:3 + cLightBlue:4 + cPink:5 + cBlack:6 + cOrange:7 + cPurple:8 + cDarkGreen:9 + sc_raiseattackspeed0:37 + sc_raiseattackstrength:185 + SC_SHEARED:194 + SC_HIDE:194 + SC_HALT_REGENERATE:195 + SC_FLYING_BACKPACK:196 + SC_MBARRIER:197 + SC_HASTE:198 + SC_PHYS_SHIELD:199 + EMOTE_DISGUST:1 + EMOTE_SURPRISE:2 + EMOTE_HAPPY:3 + EMOTE_SAD:4 + EMOTE_EVIL:5 + EMOTE_WINK:6 + EMOTE_ANGEL:7 + EMOTE_BLUSH:8 + EMOTE_TONGUE:9 + EMOTE_GRIN:10 + EMOTE_UPSET:11 + EMOTE_PERTURBED:12 + EMOTE_SPEECH:13 + EMOTE_BLAH:14 + EMOTE_MEOW:101 + EMOTE_LAUGH:102 + EMOTE_CHEERFUL:103 + EMOTE_LOVE:104 + EMOTE_MONEY:105 + EMOTE_SLEEP:106 + EMOTE_REST:107 + EMOTE_BOTHERED:108 + EMOTE_AFRAID:109 + EMOTE_DEAD:110 + EMOTE_SUSPICIOUS:111 + EMOTE_MELANCHOLY:112 + EMOTE_FACEPALM:113 + EMOTE_ANGRY:114 + EMOTE_HEADACHE:115 + EMOTE_BORED:116 + EMOTE_SWEAR:117 + EMOTE_HEART:118 + EMOTE_EMPTY:119 + EMOTE_HALLOWEEN:120 + EMOTE_VICIOUS:121 + EMOTE_JOYFUL:122 + EMOTE_CLEVER:123 + EMOTE_SHY:124 + EMOTE_ALIEN:125 + EMOTE_TROLL:126 + EMOTE_PAIN:127 + EMOTE_TEARS:128 + sfx_skillup:1 + sfx_magic_generic:2 + sfx_magic_life:3 + sfx_magic_war:4 + sfx_magic_transmute:5 + sfx_magic_nature:6 + sfx_magic_astral:7 + sfx_magic_dark:8 + FX_LEVELUP:0 + FX_SKILLUP:1 + FX_MAGIC_GENERIC:2 + FX_MAGIC_WHITE:3 + FX_MAGIC_BLACK:4 + FX_MAGIC_RED:5 + FX_MAGIC_GREEN:6 + FX_MAGIC_BLUE:7 + FX_MAGIC_DARKRED:8 + FX_MAGIC_DEFAULT:10 + FX_MAGIC_SHIELD:11 + FX_MAGIC_HIT:13 + FX_MAGIC_HIT_EVIL:14 + FX_FIRE_BURST:15 + FX_FIRE_EXPLOSION:16 + FX_LIGHTNING1:17 + FX_LIGHTNING2:18 + FX_LIGHTNING3:19 + FX_MAGIC_TELEPORT:20 + FX_PENTAGRAM_BUILDUP:21 + FX_PENTAGRAM_BURST:22 + FX_MAGIC_TELEPORT2:24 + FX_RAIN:25 + FX_HIT:26 + FX_ARROW_HAIL:27 + FX_CRITICAL:28 + FX_LARGE_EXPLOSION:30 + FX_MEDIUM_EXPLOSION:31 + FX_MEDIUM_SMOKE:32 + FX_MEDIUM_BLINDINGLIGHT:33 + FX_CHANNELLING_RAISE:34 + FX_CHANNELLING_CAST:35 + FX_ENCHANTED_DOOR_BROKEN:36 + FX_DARK_TELEPORT:37 + FX_EVIL_SUMMON:38 + FX_GROUND_SPAWN:39 + FX_BLUE_MAGIC_CAST:40 + FX_MAGIC_BLUE_TELEPORT:41 + FX_MAGIC_DARK_EXPLOSION:42 + FX_PUMPKIN_EXPLOSION:43 + FX_GETITEM:44 + FX_HUG:49 + FX_MAGIC_SHIELD_ENDS:111 + FX_ELECTRICITY_RED:114 + FX_ELECTRICITY_BLUE:115 + FX_GATE_OPENING:300 + FX_CASKET_LID:301 + FX_CASKET_MONSTER:302 + FX_EMOTE_DISGUST:10000 + FX_EMOTE_SURPRISE:10001 + FX_EMOTE_HAPPY:10002 + FX_EMOTE_SAD:10003 + FX_EMOTE_EVIL:10004 + FX_EMOTE_WINK:10005 + FX_EMOTE_ANGEL:10006 + FX_EMOTE_BLUSH:10007 + FX_EMOTE_TONGUE:10008 + FX_EMOTE_GRIN:10009 + FX_EMOTE_UPSET:10010 + FX_EMOTE_PERTURBED:10011 + FX_EMOTE_SPEECH:10012 + FX_EMOTE_BLAH:10013 + FX_EMOTE_SWEAR:10014 + FX_EMOTE_MEOW:10015 + FX_EMOTE_LAUGH:10016 + FX_EMOTE_CHEERFUL:10017 + FX_EMOTE_LOVE:10018 + FX_EMOTE_MONEY:10019 + FX_EMOTE_SLEEP:10020 + FX_EMOTE_REST:10021 + FX_EMOTE_BOTHERED:10022 + FX_EMOTE_AFRAID:10023 + FX_EMOTE_DEAD:10024 + FX_EMOTE_SUSPICIOUS:10025 + FX_EMOTE_MELANCHOLY:10026 + FX_EMOTE_FACEPALM:10027 + FX_EMOTE_ANGRY:10028 + FX_EMOTE_HEADACHE:10029 + FX_EMOTE_BORED:10030 + FX_EMOTE_HEART:10031 + FX_EMOTE_EMPTY:10032 + FX_EMOTE_HALLOWEEN:10033 + FX_EMOTE_VICIOUS:10034 + FX_EMOTE_JOYFUL:10035 + FX_EMOTE_CLEVER:10036 + FX_EMOTE_SHY:10037 + FX_EMOTE_ALIEN:10038 + FX_EMOTE_CURIOUS:10039 + FX_EMOTE_PAIN:10040 + FX_EMOTE_TEARS:10041 + SKILL_EMOTE:1 + SKILL_TRADE:2 + SKILL_PARTY:3 + SKILL_POOL:339 + SKILL_MALLARDS_EYE:45 + SKILL_BRAWLING:350 + SKILL_LUCKY_COUNTER:351 + SKILL_SPEED:352 + SKILL_RESIST_POISON:353 + SKILL_ASTRAL_SOUL:354 + SKILL_RAGING:355 + G_PLAYER:0 + G_BOT:1 + G_TESTER:20 + G_DEV:40 + G_EVENT:50 + G_GM:60 + G_ADMIN:80 + G_SYSOP:99 + SMSG_DEBUG:0 + SMSG_GM:1 + SMSG_WARNING:2 + SMSG_SUCCESS:3 + SMSG_FAILURE:4 + SMSG_ERROR:5 + SMSG_LEGAL:6 + SMSG_MOTD:7 + SMSG_AUTOMATIC:8 + SMSG_EVENT:9 + MIN_CASTTIME:200 + SKILL_MAGIC:340 + SKILL_MAGIC_LIFE:341 + SKILL_MAGIC_WAR:342 + SKILL_MAGIC_TRANSMUTE:343 + SKILL_MAGIC_NATURE:344 + SKILL_MAGIC_ASTRAL:345 + SKILL_MAGIC_DARK:346 + ELT_NEUTRAL:0 + ELT_WATER:1 + ELT_EARTH:2 + ELT_FIRE:3 + ELT_WIND:4 + ELT_POISON:5 + ELT_SHADOW:6 + ELT_HOLY:7 + ELT_GHOST:8 + ELT_UNDEAD:9 + SO_GMHIDE:64 + SO_GMINVISIBLE:4096 + SFX_DEFAULT:10 + SFX_SUMMON_START:21 + SFX_SUMMON_FIRE:22 + SFX_TELEPORT:24 + SFX_RAIN:25 + SFX_HIT:25 + SFX_ARROW_HAIL:27 + SFX_BARRIER:10 + SFX_UNBARRIER:10 + SFX_HEAL:3 + SFX_LIGHTNING:18 + MIN_MARRY_LEVEL:32 + MAX_RAIN_SPELL_RADIUS:15 + MAX_MAGIC_LEVEL:2 + MFLAG_MADE_CONC_POTION:16384 + MFLAG_MADE_CONC_POTION_SHIFT:14 + SCRIPT_XP_MASK:65535 + SCRIPT_XP_SHIFT:0 + SCRIPT_HEALSPELL_MASK:255 + SCRIPT_HEALSPELL_SHIFT:24 + ATTACK_ICON_GENERIC:2000 + ATTACK_ICON_SHEARING:2001 + E10_FLAG_USED_FREE_WARP_SHIFT:17 + TWOBIT_0_SHIFT:0 + TWOBIT_0_MASK:3 + TWOBIT_1_SHIFT:2 + TWOBIT_1_MASK:12 + TWOBIT_2_SHIFT:4 + TWOBIT_2_MASK:48 + TWOBIT_3_SHIFT:6 + TWOBIT_3_MASK:192 + TWOBIT_4_SHIFT:8 + TWOBIT_4_MASK:768 + TWOBIT_5_SHIFT:10 + TWOBIT_5_MASK:3072 + TWOBIT_6_SHIFT:12 + TWOBIT_6_MASK:12288 + TWOBIT_7_SHIFT:14 + TWOBIT_7_MASK:49152 + TWOBIT_8_SHIFT:16 + TWOBIT_8_MASK:196608 + TWOBIT_9_SHIFT:18 + TWOBIT_9_MASK:786432 + TWOBIT_10_SHIFT:20 + TWOBIT_10_MASK:3145728 + TWOBIT_11_SHIFT:22 + TWOBIT_11_MASK:12582912 + TWOBIT_12_SHIFT:24 + TWOBIT_12_MASK:50331648 + TWOBIT_13_SHIFT:26 + TWOBIT_13_MASK:201326592 + TWOBIT_14_SHIFT:28 + TWOBIT_14_MASK:805306368 + NIBBLE_0_SHIFT:0 + NIBBLE_0_MASK:15 + NIBBLE_1_SHIFT:4 + NIBBLE_1_MASK:240 + NIBBLE_2_SHIFT:8 + NIBBLE_2_MASK:3840 + NIBBLE_3_SHIFT:12 + NIBBLE_3_MASK:61440 + NIBBLE_4_SHIFT:16 + NIBBLE_4_MASK:983040 + NIBBLE_5_SHIFT:20 + NIBBLE_5_MASK:15728640 + NIBBLE_6_SHIFT:24 + NIBBLE_6_MASK:251658240 + BYTE_0_SHIFT:0 + BYTE_0_MASK:255 + BYTE_1_SHIFT:8 + BYTE_1_MASK:65280 + BYTE_2_SHIFT:16 + BYTE_2_MASK:16711680 + WEDDING_FEE:100 + DIVORCE_FEE_PER_LEVEL:500 + WEDDING_MIN_LEVEL:32 + BATTLE_CAVE1:1 + BATTLE_CAVE2:2 + BATTLE_CAVE3:4 + BATTLE_CAVE4:8 + BATTLE_CAVE5:16 + BATTLE_CAVE6:32 + BATTLE_CAVE7:64 + BATTLE_CAVE8:128 + BATTLE_CAVE9:256 + OPT_STORAGE_CLOSE:1 + OPT_BANK_CLOSE:2 + MAX_HIGH_SCORES:4 + AMMO_NONE:0 + AMMO_BOW:1 + AMMO_SLING:2 + AMMO_WAND:3 +// tmw npcs + NPC45:45 + NPC100:100 + NPC101:101 + NPC102:102 + NPC103:103 + NPC104:104 + NPC105:105 + NPC106:106 + NPC107:107 + NPC108:108 + NPC109:109 + NPC110:110 + NPC111:111 + NPC112:112 + NPC113:113 + NPC114:114 + NPC115:115 + NPC116:116 + NPC117:117 + NPC118:118 + NPC119:119 + NPC120:120 + NPC121:121 + NPC122:122 + NPC123:123 + NPC124:124 + NPC125:125 + NPC126:126 + NPC127:127 + NPC128:128 + NPC129:129 + NPC130:130 + NPC132:132 + NPC133:133 + NPC134:134 + NPC135:135 + NPC136:136 + NPC137:137 + NPC138:138 + NPC139:139 + NPC140:140 + NPC141:141 + NPC142:142 + NPC143:143 + NPC144:144 + NPC146:146 + NPC147:147 + NPC148:148 + NPC149:149 + NPC150:150 + NPC151:151 + NPC152:152 + NPC153:153 + NPC154:154 + NPC155:155 + NPC156:156 + NPC157:157 + NPC158:158 + NPC159:159 + NPC160:160 + NPC161:161 + NPC162:162 + NPC163:163 + NPC164:164 + NPC165:165 + NPC166:166 + NPC167:167 + NPC168:168 + NPC169:169 + NPC171:171 + NPC172:172 + NPC174:174 + NPC175:175 + NPC177:177 + NPC178:178 + NPC179:179 + NPC180:180 + NPC181:181 + NPC182:182 + NPC183:183 + NPC185:185 + NPC186:186 + NPC187:187 + NPC189:189 + NPC190:190 + NPC191:191 + NPC192:192 + NPC193:193 + NPC195:195 + NPC196:196 + NPC197:197 + NPC198:198 + NPC201:201 + NPC204:204 + NPC205:205 + NPC206:206 + NPC207:207 + NPC208:208 + NPC209:209 + NPC210:210 + NPC211:211 + NPC212:212 + NPC213:213 + NPC214:214 + NPC215:215 + NPC216:216 + NPC217:217 + NPC218:218 + NPC258:258 + NPC259:259 + NPC260:260 + NPC262:262 + NPC263:263 + NPC265:265 + NPC300:300 + NPC301:301 + NPC302:302 + NPC303:303 + NPC304:304 + NPC305:305 + NPC306:306 + NPC307:307 + NPC308:308 + NPC309:309 + NPC310:310 + NPC311:311 + NPC312:312 + NPC313:313 + NPC314:314 + NPC315:315 + NPC316:316 + NPC317:317 + NPC318:318 + NPC319:319 + NPC320:320 + NPC321:321 + NPC322:322 + NPC324:324 + NPC325:325 + NPC326:326 + NPC327:327 + NPC328:328 + NPC329:329 + NPC330:330 + NPC334:334 + NPC340:340 + NPC344:344 + NPC345:345 + NPC346:346 + NPC351:351 + NPC355:355 + NPC356:356 + NPC362:362 + NPC363:363 + NPC365:365 + NPC366:366 + NPC367:367 + NPC368:368 + NPC369:369 + NPC370:370 + NPC371:371 + NPC372:372 + NPC374:374 + NPC376:376 + NPC377:377 + NPC378:378 + NPC379:379 + NPC380:380 + NPC381:381 + NPC383:383 + NPC384:384 + NPC385:385 + NPC386:386 + NPC394:394 + NPC395:395 + NPC400:400 + NPC401:401 + NPC402:402 + NPC403:403 + NPC404:404 + NPC405:405 + NPC406:406 + NPC407:407 + NPC409:409 + NPC410:410 + NPC411:411 + NPC412:412 + NPC413:413 + NPC414:414 + NPC415:415 + NPC416:416 + NPC417:417 + NPC418:418 + NPC419:419 + NPC32767:32767 + @include "conf/import/constants.conf" } diff --git a/db/map_index.txt b/db/map_index.txt index 7acdcebf..e30569f5 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -1,173 +1,128 @@ -000-0-0 1 -000-0-1 2 -000-0 3 -000-1 4 -000-2-0 5 -000-2-1 6 -000-2-2 7 -000-2-3 8 -000-2-4 9 -001-1 10 -001-2-0 11 -001-2-1 12 -001-2-10 13 -001-2-11 14 -001-2-12 15 -001-2-13 16 -001-2-14 17 -001-2-15 18 -001-2-16 19 -001-2-17 20 -001-2-18 21 -001-2-19 22 -001-2-2 23 -001-2-20 24 -001-2-21 25 -001-2-22 26 -001-2-23 27 -001-2-24 28 -001-2-25 29 -001-2-26 30 -001-2-27 31 -001-2-28 32 -001-2-29 33 -001-2-3 34 -001-2-30 35 -001-2-31 36 -001-2-32 37 -001-2-33 38 -001-2-34 39 -001-2-35 40 -001-2-36 41 -001-2-37 42 -001-2-38 43 -001-2-39 44 -001-2-4 45 -001-2-40 46 -001-2-41 47 -001-2-42 48 -001-2-43 49 -001-2-5 50 -001-2-6 51 -001-2-7 52 -001-2-8 53 -001-2-9 54 -001-3-0 55 -001-3-1 56 -001-3-2 57 -008-1-1 58 -008-1 59 -008-2-0 60 -008-2-1 61 -008-2-10 62 -008-2-11 63 -008-2-12 64 -008-2-13 65 -008-2-14 66 -008-2-15 67 -008-2-16 68 -008-2-17 69 -008-2-18 70 -008-2-19 71 -008-2-2 72 -008-2-20 73 -008-2-21 74 -008-2-22 75 -008-2-23 76 -008-2-24 77 -008-2-25 78 -008-2-26 79 -008-2-27 80 -008-2-28 81 -008-2-29 82 -008-2-3 83 -008-2-30 84 -008-2-31 85 -008-2-32 86 -008-2-4 87 -008-2-5 88 -008-2-6 89 -008-2-7 90 -008-2-8 91 -008-2-9 92 -008-3-0 93 -008-3-1 94 -008-3-2 95 -008-3-3 96 -008-3-4 97 -008-3-5 98 -008-3-6 99 -009-1 100 -009-2-0 101 -009-2-1 102 -009-2-10 103 -009-2-11 104 -009-2-12 105 -009-2-13 106 -009-2-14 107 -009-2-15 108 -009-2-16 109 -009-2-17 110 -009-2-18 111 -009-2-2 112 -009-2-3 113 -009-2-4 114 -009-2-5 115 -009-2-6 116 -009-2-7 117 -009-2-8 118 -009-2-9 119 -012-1 120 -012-2-1 121 -012-2-2 122 -012-2-3 123 -012-2-4 124 -012-2-5 125 -012-2-6 126 -012-2-7 127 -012-3-1 128 -012-3-2 129 -012-3-3 130 -020-1 131 -020-2-0 132 -020-2-1 133 -020-2-10 134 -020-2-11 135 -020-2-12 136 -020-2-13 137 -020-2-14 138 -020-2-15 139 -020-2-16 140 -020-2-17 141 -020-2-18 142 -020-2-19 143 -020-2-2 144 -020-2-20 145 -020-2-21 146 -020-2-22 147 -020-2-23 148 -020-2-24 149 -020-2-25 150 -020-2-26 151 -020-2-27 152 -020-2-28 153 -020-2-29 154 -020-2-3 155 -020-2-30 156 -020-2-31 157 -020-2-32 158 -020-2-33 159 -020-2-34 160 -020-2-4 161 -020-2-5 162 -020-2-6 163 -020-2-7 164 -020-2-8 165 -020-2-9 166 -botcheck 167 -fermi 168 -marine-2 169 -marine 170 -sec_pri 171 -test 172 -testbg 173 +000-1 1 +001-1 2 +001-2 3 +001-3 4 +002-1 5 +002-2 6 +002-3 7 +002-4 8 +002-5 9 +003-1 10 +003-4 11 +004-1 12 +004-3 13 +004-4 14 +004-5 15 +005-3 16 +006-1 17 +006-2 18 +006-3 19 +007-1 20 +007-2 21 +008-1 22 +009-1 23 +009-2 24 +009-3 25 +009-4 26 +009-5 27 +009-6 28 +009-7 29 +009-8 30 +010-1 31 +010-2 32 +011-3 33 +011-4 34 +011-6 35 +012-1 36 +012-3 37 +012-4 38 +013-1 39 +013-2 40 +014-1 41 +014-3 42 +015-1 43 +015-3 44 +016-1 45 +016-2 46 +017-1 47 +017-2 48 +017-3 49 +017-4 50 +017-9 51 +018-1 52 +018-2 53 +018-3 54 +019-1 55 +019-3 56 +019-4 57 +020-1 58 +020-2 59 +020-3 60 +021-3 61 +023-1 62 +023-2 63 +023-3 64 +025-1 65 +025-3 66 +025-4 67 +026-1 68 +026-2 69 +027-1 70 +027-2 71 +027-3 72 +027-4 73 +027-5 74 +027-6 75 +027-7 76 +027-8 77 +028-1 78 +028-3 79 +029-1 80 +029-2 81 +029-3 82 +029-4 83 +030-1 84 +030-2 85 +030-3 86 +030-4 87 +031-1 88 +031-2 89 +031-3 90 +031-4 91 +032-3 92 +033-1 93 +034-1 94 +034-2 95 +035-2 96 +036-2 97 +041-1 98 +042-1 99 +043-1 100 +043-3 101 +043-4 102 +045-1 103 +046-1 104 +046-3 105 +047-1 106 +047-3 107 +048-2 108 +051-1 109 +051-3 110 +052-1 111 +052-2 112 +055-1 113 +055-3 114 +056-2 115 +057-1 116 +069-2 117 +070-1 118 +070-3 119 +099-1 120 +099-2 121 +099-3 122 +099-4 123 +099-5 124 +099-6 125 +099-7 126 +099-8 127 +botcheck 128 diff --git a/maps/pre-re/000-0-0.mcache b/maps/pre-re/000-0-0.mcache deleted file mode 100644 index 418a095a..00000000 Binary files a/maps/pre-re/000-0-0.mcache and /dev/null differ diff --git a/maps/pre-re/000-0-1.mcache b/maps/pre-re/000-0-1.mcache deleted file mode 100644 index f3a038bf..00000000 Binary files a/maps/pre-re/000-0-1.mcache and /dev/null differ diff --git a/maps/pre-re/000-0.mcache b/maps/pre-re/000-0.mcache deleted file mode 100644 index b9e0f22c..00000000 Binary files a/maps/pre-re/000-0.mcache and /dev/null differ diff --git a/maps/pre-re/000-1.mcache b/maps/pre-re/000-1.mcache index c01cb3d4..cbf96b68 100644 Binary files a/maps/pre-re/000-1.mcache and b/maps/pre-re/000-1.mcache differ diff --git a/maps/pre-re/000-2-0.mcache b/maps/pre-re/000-2-0.mcache deleted file mode 100644 index c9bd157c..00000000 Binary files a/maps/pre-re/000-2-0.mcache and /dev/null differ diff --git a/maps/pre-re/000-2-1.mcache b/maps/pre-re/000-2-1.mcache deleted file mode 100644 index b7d8f01a..00000000 Binary files a/maps/pre-re/000-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/000-2-2.mcache b/maps/pre-re/000-2-2.mcache deleted file mode 100644 index 6fda3bf3..00000000 Binary files a/maps/pre-re/000-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/000-2-3.mcache b/maps/pre-re/000-2-3.mcache deleted file mode 100644 index 266d86a9..00000000 Binary files a/maps/pre-re/000-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/000-2-4.mcache b/maps/pre-re/000-2-4.mcache deleted file mode 100644 index 50d64c51..00000000 Binary files a/maps/pre-re/000-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/001-1.mcache b/maps/pre-re/001-1.mcache index 6abbe6fe..b5507d5f 100644 Binary files a/maps/pre-re/001-1.mcache and b/maps/pre-re/001-1.mcache differ diff --git a/maps/pre-re/001-2-0.mcache b/maps/pre-re/001-2-0.mcache deleted file mode 100644 index 65a9a250..00000000 Binary files a/maps/pre-re/001-2-0.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-1.mcache b/maps/pre-re/001-2-1.mcache deleted file mode 100644 index 7a380283..00000000 Binary files a/maps/pre-re/001-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-10.mcache b/maps/pre-re/001-2-10.mcache deleted file mode 100644 index 6ee2f466..00000000 Binary files a/maps/pre-re/001-2-10.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-11.mcache b/maps/pre-re/001-2-11.mcache deleted file mode 100644 index 4609038e..00000000 Binary files a/maps/pre-re/001-2-11.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-12.mcache b/maps/pre-re/001-2-12.mcache deleted file mode 100644 index 637f92e5..00000000 Binary files a/maps/pre-re/001-2-12.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-13.mcache b/maps/pre-re/001-2-13.mcache deleted file mode 100644 index fbc358f3..00000000 Binary files a/maps/pre-re/001-2-13.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-14.mcache b/maps/pre-re/001-2-14.mcache deleted file mode 100644 index 673e1c03..00000000 Binary files a/maps/pre-re/001-2-14.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-15.mcache b/maps/pre-re/001-2-15.mcache deleted file mode 100644 index a4cba522..00000000 Binary files a/maps/pre-re/001-2-15.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-16.mcache b/maps/pre-re/001-2-16.mcache deleted file mode 100644 index e772f306..00000000 Binary files a/maps/pre-re/001-2-16.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-17.mcache b/maps/pre-re/001-2-17.mcache deleted file mode 100644 index fcce361b..00000000 Binary files a/maps/pre-re/001-2-17.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-18.mcache b/maps/pre-re/001-2-18.mcache deleted file mode 100644 index d75e2372..00000000 Binary files a/maps/pre-re/001-2-18.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-19.mcache b/maps/pre-re/001-2-19.mcache deleted file mode 100644 index 248b02d4..00000000 Binary files a/maps/pre-re/001-2-19.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-2.mcache b/maps/pre-re/001-2-2.mcache deleted file mode 100644 index df63c709..00000000 Binary files a/maps/pre-re/001-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-20.mcache b/maps/pre-re/001-2-20.mcache deleted file mode 100644 index 79768920..00000000 Binary files a/maps/pre-re/001-2-20.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-21.mcache b/maps/pre-re/001-2-21.mcache deleted file mode 100644 index 94cf1389..00000000 Binary files a/maps/pre-re/001-2-21.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-22.mcache b/maps/pre-re/001-2-22.mcache deleted file mode 100644 index 0a9b33ee..00000000 Binary files a/maps/pre-re/001-2-22.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-23.mcache b/maps/pre-re/001-2-23.mcache deleted file mode 100644 index 6fda3bf3..00000000 Binary files a/maps/pre-re/001-2-23.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-24.mcache b/maps/pre-re/001-2-24.mcache deleted file mode 100644 index 780e27ae..00000000 Binary files a/maps/pre-re/001-2-24.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-25.mcache b/maps/pre-re/001-2-25.mcache deleted file mode 100644 index b5ffa082..00000000 Binary files a/maps/pre-re/001-2-25.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-26.mcache b/maps/pre-re/001-2-26.mcache deleted file mode 100644 index d51f7235..00000000 Binary files a/maps/pre-re/001-2-26.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-27.mcache b/maps/pre-re/001-2-27.mcache deleted file mode 100644 index 497e3591..00000000 Binary files a/maps/pre-re/001-2-27.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-28.mcache b/maps/pre-re/001-2-28.mcache deleted file mode 100644 index 4017046f..00000000 Binary files a/maps/pre-re/001-2-28.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-29.mcache b/maps/pre-re/001-2-29.mcache deleted file mode 100644 index 53c03cef..00000000 Binary files a/maps/pre-re/001-2-29.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-3.mcache b/maps/pre-re/001-2-3.mcache deleted file mode 100644 index e687b995..00000000 Binary files a/maps/pre-re/001-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-30.mcache b/maps/pre-re/001-2-30.mcache deleted file mode 100644 index 0b486444..00000000 Binary files a/maps/pre-re/001-2-30.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-31.mcache b/maps/pre-re/001-2-31.mcache deleted file mode 100644 index 6c8b399a..00000000 Binary files a/maps/pre-re/001-2-31.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-32.mcache b/maps/pre-re/001-2-32.mcache deleted file mode 100644 index 5978a046..00000000 Binary files a/maps/pre-re/001-2-32.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-33.mcache b/maps/pre-re/001-2-33.mcache deleted file mode 100644 index 755db6f8..00000000 Binary files a/maps/pre-re/001-2-33.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-34.mcache b/maps/pre-re/001-2-34.mcache deleted file mode 100644 index 84ee170b..00000000 Binary files a/maps/pre-re/001-2-34.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-35.mcache b/maps/pre-re/001-2-35.mcache deleted file mode 100644 index 93c0df56..00000000 Binary files a/maps/pre-re/001-2-35.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-36.mcache b/maps/pre-re/001-2-36.mcache deleted file mode 100644 index 43cfa808..00000000 Binary files a/maps/pre-re/001-2-36.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-37.mcache b/maps/pre-re/001-2-37.mcache deleted file mode 100644 index 78f6188c..00000000 Binary files a/maps/pre-re/001-2-37.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-38.mcache b/maps/pre-re/001-2-38.mcache deleted file mode 100644 index e312cdc6..00000000 Binary files a/maps/pre-re/001-2-38.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-39.mcache b/maps/pre-re/001-2-39.mcache deleted file mode 100644 index 7e7d67ff..00000000 Binary files a/maps/pre-re/001-2-39.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-4.mcache b/maps/pre-re/001-2-4.mcache deleted file mode 100644 index 8663e2bc..00000000 Binary files a/maps/pre-re/001-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-40.mcache b/maps/pre-re/001-2-40.mcache deleted file mode 100644 index d8ec82c0..00000000 Binary files a/maps/pre-re/001-2-40.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-41.mcache b/maps/pre-re/001-2-41.mcache deleted file mode 100644 index c5d6683a..00000000 Binary files a/maps/pre-re/001-2-41.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-42.mcache b/maps/pre-re/001-2-42.mcache deleted file mode 100644 index 57c33165..00000000 Binary files a/maps/pre-re/001-2-42.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-43.mcache b/maps/pre-re/001-2-43.mcache deleted file mode 100644 index 6a4b463f..00000000 Binary files a/maps/pre-re/001-2-43.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-5.mcache b/maps/pre-re/001-2-5.mcache deleted file mode 100644 index 40f2b8dd..00000000 Binary files a/maps/pre-re/001-2-5.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-6.mcache b/maps/pre-re/001-2-6.mcache deleted file mode 100644 index 06ce2a10..00000000 Binary files a/maps/pre-re/001-2-6.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-7.mcache b/maps/pre-re/001-2-7.mcache deleted file mode 100644 index bf2652a2..00000000 Binary files a/maps/pre-re/001-2-7.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-8.mcache b/maps/pre-re/001-2-8.mcache deleted file mode 100644 index f43431b4..00000000 Binary files a/maps/pre-re/001-2-8.mcache and /dev/null differ diff --git a/maps/pre-re/001-2-9.mcache b/maps/pre-re/001-2-9.mcache deleted file mode 100644 index 3d7245f5..00000000 Binary files a/maps/pre-re/001-2-9.mcache and /dev/null differ diff --git a/maps/pre-re/001-2.mcache b/maps/pre-re/001-2.mcache new file mode 100644 index 00000000..66e2394b Binary files /dev/null and b/maps/pre-re/001-2.mcache differ diff --git a/maps/pre-re/001-3-0.mcache b/maps/pre-re/001-3-0.mcache deleted file mode 100644 index fbbd9c66..00000000 Binary files a/maps/pre-re/001-3-0.mcache and /dev/null differ diff --git a/maps/pre-re/001-3-1.mcache b/maps/pre-re/001-3-1.mcache deleted file mode 100644 index f8239cdc..00000000 Binary files a/maps/pre-re/001-3-1.mcache and /dev/null differ diff --git a/maps/pre-re/001-3-2.mcache b/maps/pre-re/001-3-2.mcache deleted file mode 100644 index 4ac90083..00000000 Binary files a/maps/pre-re/001-3-2.mcache and /dev/null differ diff --git a/maps/pre-re/001-3.mcache b/maps/pre-re/001-3.mcache new file mode 100644 index 00000000..234d6146 Binary files /dev/null and b/maps/pre-re/001-3.mcache differ diff --git a/maps/pre-re/002-1.mcache b/maps/pre-re/002-1.mcache new file mode 100644 index 00000000..a471eb01 Binary files /dev/null and b/maps/pre-re/002-1.mcache differ diff --git a/maps/pre-re/002-2.mcache b/maps/pre-re/002-2.mcache new file mode 100644 index 00000000..46c02ca9 Binary files /dev/null and b/maps/pre-re/002-2.mcache differ diff --git a/maps/pre-re/002-3.mcache b/maps/pre-re/002-3.mcache new file mode 100644 index 00000000..cf69442a Binary files /dev/null and b/maps/pre-re/002-3.mcache differ diff --git a/maps/pre-re/002-4.mcache b/maps/pre-re/002-4.mcache new file mode 100644 index 00000000..99534939 Binary files /dev/null and b/maps/pre-re/002-4.mcache differ diff --git a/maps/pre-re/002-5.mcache b/maps/pre-re/002-5.mcache new file mode 100644 index 00000000..965ad00a Binary files /dev/null and b/maps/pre-re/002-5.mcache differ diff --git a/maps/pre-re/003-1.mcache b/maps/pre-re/003-1.mcache new file mode 100644 index 00000000..a42d8fa2 Binary files /dev/null and b/maps/pre-re/003-1.mcache differ diff --git a/maps/pre-re/003-4.mcache b/maps/pre-re/003-4.mcache new file mode 100644 index 00000000..4f609783 Binary files /dev/null and b/maps/pre-re/003-4.mcache differ diff --git a/maps/pre-re/004-1.mcache b/maps/pre-re/004-1.mcache new file mode 100644 index 00000000..dcfc3e7d Binary files /dev/null and b/maps/pre-re/004-1.mcache differ diff --git a/maps/pre-re/004-3.mcache b/maps/pre-re/004-3.mcache new file mode 100644 index 00000000..e8953577 Binary files /dev/null and b/maps/pre-re/004-3.mcache differ diff --git a/maps/pre-re/004-4.mcache b/maps/pre-re/004-4.mcache new file mode 100644 index 00000000..303c2d95 Binary files /dev/null and b/maps/pre-re/004-4.mcache differ diff --git a/maps/pre-re/004-5.mcache b/maps/pre-re/004-5.mcache new file mode 100644 index 00000000..65bab4e7 Binary files /dev/null and b/maps/pre-re/004-5.mcache differ diff --git a/maps/pre-re/005-3.mcache b/maps/pre-re/005-3.mcache new file mode 100644 index 00000000..f0550e57 Binary files /dev/null and b/maps/pre-re/005-3.mcache differ diff --git a/maps/pre-re/006-1.mcache b/maps/pre-re/006-1.mcache new file mode 100644 index 00000000..32d90df7 Binary files /dev/null and b/maps/pre-re/006-1.mcache differ diff --git a/maps/pre-re/006-2.mcache b/maps/pre-re/006-2.mcache new file mode 100644 index 00000000..e7a8eebf Binary files /dev/null and b/maps/pre-re/006-2.mcache differ diff --git a/maps/pre-re/006-3.mcache b/maps/pre-re/006-3.mcache new file mode 100644 index 00000000..d7b38ec0 Binary files /dev/null and b/maps/pre-re/006-3.mcache differ diff --git a/maps/pre-re/007-1.mcache b/maps/pre-re/007-1.mcache new file mode 100644 index 00000000..da9f6439 Binary files /dev/null and b/maps/pre-re/007-1.mcache differ diff --git a/maps/pre-re/007-2.mcache b/maps/pre-re/007-2.mcache new file mode 100644 index 00000000..6c29ec87 Binary files /dev/null and b/maps/pre-re/007-2.mcache differ diff --git a/maps/pre-re/008-1-1.mcache b/maps/pre-re/008-1-1.mcache deleted file mode 100644 index 704869a3..00000000 Binary files a/maps/pre-re/008-1-1.mcache and /dev/null differ diff --git a/maps/pre-re/008-1.mcache b/maps/pre-re/008-1.mcache index b04f087b..64509d51 100644 Binary files a/maps/pre-re/008-1.mcache and b/maps/pre-re/008-1.mcache differ diff --git a/maps/pre-re/008-2-0.mcache b/maps/pre-re/008-2-0.mcache deleted file mode 100644 index 308926b2..00000000 Binary files a/maps/pre-re/008-2-0.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-1.mcache b/maps/pre-re/008-2-1.mcache deleted file mode 100644 index 6654e8c1..00000000 Binary files a/maps/pre-re/008-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-10.mcache b/maps/pre-re/008-2-10.mcache deleted file mode 100644 index cd535de5..00000000 Binary files a/maps/pre-re/008-2-10.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-11.mcache b/maps/pre-re/008-2-11.mcache deleted file mode 100644 index d3e21e0d..00000000 Binary files a/maps/pre-re/008-2-11.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-12.mcache b/maps/pre-re/008-2-12.mcache deleted file mode 100644 index c9fac740..00000000 Binary files a/maps/pre-re/008-2-12.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-13.mcache b/maps/pre-re/008-2-13.mcache deleted file mode 100644 index 0902d3d9..00000000 Binary files a/maps/pre-re/008-2-13.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-14.mcache b/maps/pre-re/008-2-14.mcache deleted file mode 100644 index 6b37a0b8..00000000 Binary files a/maps/pre-re/008-2-14.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-15.mcache b/maps/pre-re/008-2-15.mcache deleted file mode 100644 index 8325f8a4..00000000 Binary files a/maps/pre-re/008-2-15.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-16.mcache b/maps/pre-re/008-2-16.mcache deleted file mode 100644 index d8595f6d..00000000 Binary files a/maps/pre-re/008-2-16.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-17.mcache b/maps/pre-re/008-2-17.mcache deleted file mode 100644 index f39517e4..00000000 Binary files a/maps/pre-re/008-2-17.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-18.mcache b/maps/pre-re/008-2-18.mcache deleted file mode 100644 index 8be8336e..00000000 Binary files a/maps/pre-re/008-2-18.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-19.mcache b/maps/pre-re/008-2-19.mcache deleted file mode 100644 index 5e085f99..00000000 Binary files a/maps/pre-re/008-2-19.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-2.mcache b/maps/pre-re/008-2-2.mcache deleted file mode 100644 index cc1ae21d..00000000 Binary files a/maps/pre-re/008-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-20.mcache b/maps/pre-re/008-2-20.mcache deleted file mode 100644 index e4fb60ff..00000000 Binary files a/maps/pre-re/008-2-20.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-21.mcache b/maps/pre-re/008-2-21.mcache deleted file mode 100644 index d2ab2b36..00000000 Binary files a/maps/pre-re/008-2-21.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-22.mcache b/maps/pre-re/008-2-22.mcache deleted file mode 100644 index 7cfae81f..00000000 Binary files a/maps/pre-re/008-2-22.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-23.mcache b/maps/pre-re/008-2-23.mcache deleted file mode 100644 index 0b25fe83..00000000 Binary files a/maps/pre-re/008-2-23.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-24.mcache b/maps/pre-re/008-2-24.mcache deleted file mode 100644 index 1933cbb8..00000000 Binary files a/maps/pre-re/008-2-24.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-25.mcache b/maps/pre-re/008-2-25.mcache deleted file mode 100644 index 1c116049..00000000 Binary files a/maps/pre-re/008-2-25.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-26.mcache b/maps/pre-re/008-2-26.mcache deleted file mode 100644 index 3ca6be75..00000000 Binary files a/maps/pre-re/008-2-26.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-27.mcache b/maps/pre-re/008-2-27.mcache deleted file mode 100644 index a54398f8..00000000 Binary files a/maps/pre-re/008-2-27.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-28.mcache b/maps/pre-re/008-2-28.mcache deleted file mode 100644 index 673f2699..00000000 Binary files a/maps/pre-re/008-2-28.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-29.mcache b/maps/pre-re/008-2-29.mcache deleted file mode 100644 index 560f31a5..00000000 Binary files a/maps/pre-re/008-2-29.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-3.mcache b/maps/pre-re/008-2-3.mcache deleted file mode 100644 index a98d06bb..00000000 Binary files a/maps/pre-re/008-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-30.mcache b/maps/pre-re/008-2-30.mcache deleted file mode 100644 index ff3ca8a6..00000000 Binary files a/maps/pre-re/008-2-30.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-31.mcache b/maps/pre-re/008-2-31.mcache deleted file mode 100644 index 02182237..00000000 Binary files a/maps/pre-re/008-2-31.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-32.mcache b/maps/pre-re/008-2-32.mcache deleted file mode 100644 index da5adc6c..00000000 Binary files a/maps/pre-re/008-2-32.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-4.mcache b/maps/pre-re/008-2-4.mcache deleted file mode 100644 index 570f946b..00000000 Binary files a/maps/pre-re/008-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-5.mcache b/maps/pre-re/008-2-5.mcache deleted file mode 100644 index 08cbec2b..00000000 Binary files a/maps/pre-re/008-2-5.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-6.mcache b/maps/pre-re/008-2-6.mcache deleted file mode 100644 index 043f96de..00000000 Binary files a/maps/pre-re/008-2-6.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-7.mcache b/maps/pre-re/008-2-7.mcache deleted file mode 100644 index 0b7077d0..00000000 Binary files a/maps/pre-re/008-2-7.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-8.mcache b/maps/pre-re/008-2-8.mcache deleted file mode 100644 index 5e377c0f..00000000 Binary files a/maps/pre-re/008-2-8.mcache and /dev/null differ diff --git a/maps/pre-re/008-2-9.mcache b/maps/pre-re/008-2-9.mcache deleted file mode 100644 index 7cfae81f..00000000 Binary files a/maps/pre-re/008-2-9.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-0.mcache b/maps/pre-re/008-3-0.mcache deleted file mode 100644 index 1dfb2b2b..00000000 Binary files a/maps/pre-re/008-3-0.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-1.mcache b/maps/pre-re/008-3-1.mcache deleted file mode 100644 index 849c3f33..00000000 Binary files a/maps/pre-re/008-3-1.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-2.mcache b/maps/pre-re/008-3-2.mcache deleted file mode 100644 index 9b2e1471..00000000 Binary files a/maps/pre-re/008-3-2.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-3.mcache b/maps/pre-re/008-3-3.mcache deleted file mode 100644 index 39f60ad7..00000000 Binary files a/maps/pre-re/008-3-3.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-4.mcache b/maps/pre-re/008-3-4.mcache deleted file mode 100644 index 45d5c879..00000000 Binary files a/maps/pre-re/008-3-4.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-5.mcache b/maps/pre-re/008-3-5.mcache deleted file mode 100644 index 3269fc1e..00000000 Binary files a/maps/pre-re/008-3-5.mcache and /dev/null differ diff --git a/maps/pre-re/008-3-6.mcache b/maps/pre-re/008-3-6.mcache deleted file mode 100644 index 7a2fa6b9..00000000 Binary files a/maps/pre-re/008-3-6.mcache and /dev/null differ diff --git a/maps/pre-re/009-1.mcache b/maps/pre-re/009-1.mcache index 37f24b1f..c5be8f59 100644 Binary files a/maps/pre-re/009-1.mcache and b/maps/pre-re/009-1.mcache differ diff --git a/maps/pre-re/009-2-0.mcache b/maps/pre-re/009-2-0.mcache deleted file mode 100644 index f27b08c4..00000000 Binary files a/maps/pre-re/009-2-0.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-1.mcache b/maps/pre-re/009-2-1.mcache deleted file mode 100644 index 8f5a5130..00000000 Binary files a/maps/pre-re/009-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-10.mcache b/maps/pre-re/009-2-10.mcache deleted file mode 100644 index 0384e4aa..00000000 Binary files a/maps/pre-re/009-2-10.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-11.mcache b/maps/pre-re/009-2-11.mcache deleted file mode 100644 index 6deadf7b..00000000 Binary files a/maps/pre-re/009-2-11.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-12.mcache b/maps/pre-re/009-2-12.mcache deleted file mode 100644 index 378f3c1a..00000000 Binary files a/maps/pre-re/009-2-12.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-13.mcache b/maps/pre-re/009-2-13.mcache deleted file mode 100644 index c8ade115..00000000 Binary files a/maps/pre-re/009-2-13.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-14.mcache b/maps/pre-re/009-2-14.mcache deleted file mode 100644 index 553f1948..00000000 Binary files a/maps/pre-re/009-2-14.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-15.mcache b/maps/pre-re/009-2-15.mcache deleted file mode 100644 index fd7424e8..00000000 Binary files a/maps/pre-re/009-2-15.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-16.mcache b/maps/pre-re/009-2-16.mcache deleted file mode 100644 index 1d4ce99f..00000000 Binary files a/maps/pre-re/009-2-16.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-17.mcache b/maps/pre-re/009-2-17.mcache deleted file mode 100644 index 2e1e7b32..00000000 Binary files a/maps/pre-re/009-2-17.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-18.mcache b/maps/pre-re/009-2-18.mcache deleted file mode 100644 index 8a33b639..00000000 Binary files a/maps/pre-re/009-2-18.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-2.mcache b/maps/pre-re/009-2-2.mcache deleted file mode 100644 index 8c0352f0..00000000 Binary files a/maps/pre-re/009-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-3.mcache b/maps/pre-re/009-2-3.mcache deleted file mode 100644 index fe995c6d..00000000 Binary files a/maps/pre-re/009-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-4.mcache b/maps/pre-re/009-2-4.mcache deleted file mode 100644 index f8f1cfd7..00000000 Binary files a/maps/pre-re/009-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-5.mcache b/maps/pre-re/009-2-5.mcache deleted file mode 100644 index eb05548f..00000000 Binary files a/maps/pre-re/009-2-5.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-6.mcache b/maps/pre-re/009-2-6.mcache deleted file mode 100644 index 5410315f..00000000 Binary files a/maps/pre-re/009-2-6.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-7.mcache b/maps/pre-re/009-2-7.mcache deleted file mode 100644 index ce295182..00000000 Binary files a/maps/pre-re/009-2-7.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-8.mcache b/maps/pre-re/009-2-8.mcache deleted file mode 100644 index 61a78219..00000000 Binary files a/maps/pre-re/009-2-8.mcache and /dev/null differ diff --git a/maps/pre-re/009-2-9.mcache b/maps/pre-re/009-2-9.mcache deleted file mode 100644 index 7ccdcda5..00000000 Binary files a/maps/pre-re/009-2-9.mcache and /dev/null differ diff --git a/maps/pre-re/009-2.mcache b/maps/pre-re/009-2.mcache new file mode 100644 index 00000000..2766eac9 Binary files /dev/null and b/maps/pre-re/009-2.mcache differ diff --git a/maps/pre-re/009-3.mcache b/maps/pre-re/009-3.mcache new file mode 100644 index 00000000..3f099b59 Binary files /dev/null and b/maps/pre-re/009-3.mcache differ diff --git a/maps/pre-re/009-4.mcache b/maps/pre-re/009-4.mcache new file mode 100644 index 00000000..be239e09 Binary files /dev/null and b/maps/pre-re/009-4.mcache differ diff --git a/maps/pre-re/009-5.mcache b/maps/pre-re/009-5.mcache new file mode 100644 index 00000000..15e48843 Binary files /dev/null and b/maps/pre-re/009-5.mcache differ diff --git a/maps/pre-re/009-6.mcache b/maps/pre-re/009-6.mcache new file mode 100644 index 00000000..42b73b19 Binary files /dev/null and b/maps/pre-re/009-6.mcache differ diff --git a/maps/pre-re/009-7.mcache b/maps/pre-re/009-7.mcache new file mode 100644 index 00000000..7f7c9645 Binary files /dev/null and b/maps/pre-re/009-7.mcache differ diff --git a/maps/pre-re/009-8.mcache b/maps/pre-re/009-8.mcache new file mode 100644 index 00000000..1b1681dc Binary files /dev/null and b/maps/pre-re/009-8.mcache differ diff --git a/maps/pre-re/010-1.mcache b/maps/pre-re/010-1.mcache new file mode 100644 index 00000000..77e03457 Binary files /dev/null and b/maps/pre-re/010-1.mcache differ diff --git a/maps/pre-re/010-2.mcache b/maps/pre-re/010-2.mcache new file mode 100644 index 00000000..c87be1a1 Binary files /dev/null and b/maps/pre-re/010-2.mcache differ diff --git a/maps/pre-re/011-1.mcache b/maps/pre-re/011-1.mcache new file mode 100644 index 00000000..2cb47382 Binary files /dev/null and b/maps/pre-re/011-1.mcache differ diff --git a/maps/pre-re/011-3.mcache b/maps/pre-re/011-3.mcache new file mode 100644 index 00000000..0c6018ed Binary files /dev/null and b/maps/pre-re/011-3.mcache differ diff --git a/maps/pre-re/011-4.mcache b/maps/pre-re/011-4.mcache new file mode 100644 index 00000000..21c65815 Binary files /dev/null and b/maps/pre-re/011-4.mcache differ diff --git a/maps/pre-re/011-6.mcache b/maps/pre-re/011-6.mcache new file mode 100644 index 00000000..f35aa6be Binary files /dev/null and b/maps/pre-re/011-6.mcache differ diff --git a/maps/pre-re/012-1.mcache b/maps/pre-re/012-1.mcache index 6f8e0e6d..7ec3537f 100644 Binary files a/maps/pre-re/012-1.mcache and b/maps/pre-re/012-1.mcache differ diff --git a/maps/pre-re/012-2-1.mcache b/maps/pre-re/012-2-1.mcache deleted file mode 100644 index 6f602134..00000000 Binary files a/maps/pre-re/012-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-2.mcache b/maps/pre-re/012-2-2.mcache deleted file mode 100644 index d8436dd3..00000000 Binary files a/maps/pre-re/012-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-3.mcache b/maps/pre-re/012-2-3.mcache deleted file mode 100644 index c31a8f8c..00000000 Binary files a/maps/pre-re/012-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-4.mcache b/maps/pre-re/012-2-4.mcache deleted file mode 100644 index 2ac98ccd..00000000 Binary files a/maps/pre-re/012-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-5.mcache b/maps/pre-re/012-2-5.mcache deleted file mode 100644 index 4a9977a9..00000000 Binary files a/maps/pre-re/012-2-5.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-6.mcache b/maps/pre-re/012-2-6.mcache deleted file mode 100644 index a868f507..00000000 Binary files a/maps/pre-re/012-2-6.mcache and /dev/null differ diff --git a/maps/pre-re/012-2-7.mcache b/maps/pre-re/012-2-7.mcache deleted file mode 100644 index 7cfae81f..00000000 Binary files a/maps/pre-re/012-2-7.mcache and /dev/null differ diff --git a/maps/pre-re/012-3-1.mcache b/maps/pre-re/012-3-1.mcache deleted file mode 100644 index 6f95cae1..00000000 Binary files a/maps/pre-re/012-3-1.mcache and /dev/null differ diff --git a/maps/pre-re/012-3-2.mcache b/maps/pre-re/012-3-2.mcache deleted file mode 100644 index 704f3d67..00000000 Binary files a/maps/pre-re/012-3-2.mcache and /dev/null differ diff --git a/maps/pre-re/012-3-3.mcache b/maps/pre-re/012-3-3.mcache deleted file mode 100644 index d5f82746..00000000 Binary files a/maps/pre-re/012-3-3.mcache and /dev/null differ diff --git a/maps/pre-re/012-3.mcache b/maps/pre-re/012-3.mcache new file mode 100644 index 00000000..17033a8a Binary files /dev/null and b/maps/pre-re/012-3.mcache differ diff --git a/maps/pre-re/012-4.mcache b/maps/pre-re/012-4.mcache new file mode 100644 index 00000000..0c675586 Binary files /dev/null and b/maps/pre-re/012-4.mcache differ diff --git a/maps/pre-re/013-1.mcache b/maps/pre-re/013-1.mcache new file mode 100644 index 00000000..e060930c Binary files /dev/null and b/maps/pre-re/013-1.mcache differ diff --git a/maps/pre-re/013-2.mcache b/maps/pre-re/013-2.mcache new file mode 100644 index 00000000..01dc1dfe Binary files /dev/null and b/maps/pre-re/013-2.mcache differ diff --git a/maps/pre-re/013-3.mcache b/maps/pre-re/013-3.mcache new file mode 100644 index 00000000..a6d3fb7d Binary files /dev/null and b/maps/pre-re/013-3.mcache differ diff --git a/maps/pre-re/014-1.mcache b/maps/pre-re/014-1.mcache new file mode 100644 index 00000000..7e1f8498 Binary files /dev/null and b/maps/pre-re/014-1.mcache differ diff --git a/maps/pre-re/014-3.mcache b/maps/pre-re/014-3.mcache new file mode 100644 index 00000000..48686053 Binary files /dev/null and b/maps/pre-re/014-3.mcache differ diff --git a/maps/pre-re/015-1.mcache b/maps/pre-re/015-1.mcache new file mode 100644 index 00000000..823e0b0a Binary files /dev/null and b/maps/pre-re/015-1.mcache differ diff --git a/maps/pre-re/015-3.mcache b/maps/pre-re/015-3.mcache new file mode 100644 index 00000000..10f22c54 Binary files /dev/null and b/maps/pre-re/015-3.mcache differ diff --git a/maps/pre-re/016-1.mcache b/maps/pre-re/016-1.mcache new file mode 100644 index 00000000..4ccb5482 Binary files /dev/null and b/maps/pre-re/016-1.mcache differ diff --git a/maps/pre-re/016-2.mcache b/maps/pre-re/016-2.mcache new file mode 100644 index 00000000..a2dc2b29 Binary files /dev/null and b/maps/pre-re/016-2.mcache differ diff --git a/maps/pre-re/017-1.mcache b/maps/pre-re/017-1.mcache new file mode 100644 index 00000000..4b091deb Binary files /dev/null and b/maps/pre-re/017-1.mcache differ diff --git a/maps/pre-re/017-2.mcache b/maps/pre-re/017-2.mcache new file mode 100644 index 00000000..a8220dc1 Binary files /dev/null and b/maps/pre-re/017-2.mcache differ diff --git a/maps/pre-re/017-3.mcache b/maps/pre-re/017-3.mcache new file mode 100644 index 00000000..c2e0057d Binary files /dev/null and b/maps/pre-re/017-3.mcache differ diff --git a/maps/pre-re/017-4.mcache b/maps/pre-re/017-4.mcache new file mode 100644 index 00000000..1ac8b6cb Binary files /dev/null and b/maps/pre-re/017-4.mcache differ diff --git a/maps/pre-re/017-9.mcache b/maps/pre-re/017-9.mcache new file mode 100644 index 00000000..22967b04 Binary files /dev/null and b/maps/pre-re/017-9.mcache differ diff --git a/maps/pre-re/018-1.mcache b/maps/pre-re/018-1.mcache new file mode 100644 index 00000000..d867b071 Binary files /dev/null and b/maps/pre-re/018-1.mcache differ diff --git a/maps/pre-re/018-2.mcache b/maps/pre-re/018-2.mcache new file mode 100644 index 00000000..793426ab Binary files /dev/null and b/maps/pre-re/018-2.mcache differ diff --git a/maps/pre-re/018-3.mcache b/maps/pre-re/018-3.mcache new file mode 100644 index 00000000..3bc52f01 Binary files /dev/null and b/maps/pre-re/018-3.mcache differ diff --git a/maps/pre-re/019-1.mcache b/maps/pre-re/019-1.mcache new file mode 100644 index 00000000..33652144 Binary files /dev/null and b/maps/pre-re/019-1.mcache differ diff --git a/maps/pre-re/019-3.mcache b/maps/pre-re/019-3.mcache new file mode 100644 index 00000000..22255c48 Binary files /dev/null and b/maps/pre-re/019-3.mcache differ diff --git a/maps/pre-re/019-4.mcache b/maps/pre-re/019-4.mcache new file mode 100644 index 00000000..81bf7644 Binary files /dev/null and b/maps/pre-re/019-4.mcache differ diff --git a/maps/pre-re/020-1.mcache b/maps/pre-re/020-1.mcache index 20d49806..1f666f13 100644 Binary files a/maps/pre-re/020-1.mcache and b/maps/pre-re/020-1.mcache differ diff --git a/maps/pre-re/020-2-0.mcache b/maps/pre-re/020-2-0.mcache deleted file mode 100644 index 0630f689..00000000 Binary files a/maps/pre-re/020-2-0.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-1.mcache b/maps/pre-re/020-2-1.mcache deleted file mode 100644 index ab4b0621..00000000 Binary files a/maps/pre-re/020-2-1.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-10.mcache b/maps/pre-re/020-2-10.mcache deleted file mode 100644 index 6636b995..00000000 Binary files a/maps/pre-re/020-2-10.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-11.mcache b/maps/pre-re/020-2-11.mcache deleted file mode 100644 index 2d10e23d..00000000 Binary files a/maps/pre-re/020-2-11.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-12.mcache b/maps/pre-re/020-2-12.mcache deleted file mode 100644 index 2d10e23d..00000000 Binary files a/maps/pre-re/020-2-12.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-13.mcache b/maps/pre-re/020-2-13.mcache deleted file mode 100644 index cb22ccdd..00000000 Binary files a/maps/pre-re/020-2-13.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-14.mcache b/maps/pre-re/020-2-14.mcache deleted file mode 100644 index 14b26323..00000000 Binary files a/maps/pre-re/020-2-14.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-15.mcache b/maps/pre-re/020-2-15.mcache deleted file mode 100644 index 7ad6addd..00000000 Binary files a/maps/pre-re/020-2-15.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-16.mcache b/maps/pre-re/020-2-16.mcache deleted file mode 100644 index 598fa010..00000000 Binary files a/maps/pre-re/020-2-16.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-17.mcache b/maps/pre-re/020-2-17.mcache deleted file mode 100644 index 7a1d5fc5..00000000 Binary files a/maps/pre-re/020-2-17.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-18.mcache b/maps/pre-re/020-2-18.mcache deleted file mode 100644 index 871bd776..00000000 Binary files a/maps/pre-re/020-2-18.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-19.mcache b/maps/pre-re/020-2-19.mcache deleted file mode 100644 index 7a1d5fc5..00000000 Binary files a/maps/pre-re/020-2-19.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-2.mcache b/maps/pre-re/020-2-2.mcache deleted file mode 100644 index f4379b2e..00000000 Binary files a/maps/pre-re/020-2-2.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-20.mcache b/maps/pre-re/020-2-20.mcache deleted file mode 100644 index b6b332ff..00000000 Binary files a/maps/pre-re/020-2-20.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-21.mcache b/maps/pre-re/020-2-21.mcache deleted file mode 100644 index 7a1d5fc5..00000000 Binary files a/maps/pre-re/020-2-21.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-22.mcache b/maps/pre-re/020-2-22.mcache deleted file mode 100644 index 2878461e..00000000 Binary files a/maps/pre-re/020-2-22.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-23.mcache b/maps/pre-re/020-2-23.mcache deleted file mode 100644 index fbbf15bd..00000000 Binary files a/maps/pre-re/020-2-23.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-24.mcache b/maps/pre-re/020-2-24.mcache deleted file mode 100644 index fbbf15bd..00000000 Binary files a/maps/pre-re/020-2-24.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-25.mcache b/maps/pre-re/020-2-25.mcache deleted file mode 100644 index 981490f4..00000000 Binary files a/maps/pre-re/020-2-25.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-26.mcache b/maps/pre-re/020-2-26.mcache deleted file mode 100644 index 9a8c7f4f..00000000 Binary files a/maps/pre-re/020-2-26.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-27.mcache b/maps/pre-re/020-2-27.mcache deleted file mode 100644 index 580b75ba..00000000 Binary files a/maps/pre-re/020-2-27.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-28.mcache b/maps/pre-re/020-2-28.mcache deleted file mode 100644 index 3c61f20f..00000000 Binary files a/maps/pre-re/020-2-28.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-29.mcache b/maps/pre-re/020-2-29.mcache deleted file mode 100644 index ba828b0e..00000000 Binary files a/maps/pre-re/020-2-29.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-3.mcache b/maps/pre-re/020-2-3.mcache deleted file mode 100644 index ef25224d..00000000 Binary files a/maps/pre-re/020-2-3.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-30.mcache b/maps/pre-re/020-2-30.mcache deleted file mode 100644 index be7ca971..00000000 Binary files a/maps/pre-re/020-2-30.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-31.mcache b/maps/pre-re/020-2-31.mcache deleted file mode 100644 index 17e85c20..00000000 Binary files a/maps/pre-re/020-2-31.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-32.mcache b/maps/pre-re/020-2-32.mcache deleted file mode 100644 index f638e9dd..00000000 Binary files a/maps/pre-re/020-2-32.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-33.mcache b/maps/pre-re/020-2-33.mcache deleted file mode 100644 index 4e42953d..00000000 Binary files a/maps/pre-re/020-2-33.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-34.mcache b/maps/pre-re/020-2-34.mcache deleted file mode 100644 index dcf17738..00000000 Binary files a/maps/pre-re/020-2-34.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-4.mcache b/maps/pre-re/020-2-4.mcache deleted file mode 100644 index 9f22191b..00000000 Binary files a/maps/pre-re/020-2-4.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-5.mcache b/maps/pre-re/020-2-5.mcache deleted file mode 100644 index c5682e30..00000000 Binary files a/maps/pre-re/020-2-5.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-6.mcache b/maps/pre-re/020-2-6.mcache deleted file mode 100644 index ce74db44..00000000 Binary files a/maps/pre-re/020-2-6.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-7.mcache b/maps/pre-re/020-2-7.mcache deleted file mode 100644 index f8dc51ab..00000000 Binary files a/maps/pre-re/020-2-7.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-8.mcache b/maps/pre-re/020-2-8.mcache deleted file mode 100644 index f422b33b..00000000 Binary files a/maps/pre-re/020-2-8.mcache and /dev/null differ diff --git a/maps/pre-re/020-2-9.mcache b/maps/pre-re/020-2-9.mcache deleted file mode 100644 index b211728e..00000000 Binary files a/maps/pre-re/020-2-9.mcache and /dev/null differ diff --git a/maps/pre-re/020-2.mcache b/maps/pre-re/020-2.mcache new file mode 100644 index 00000000..34a634de Binary files /dev/null and b/maps/pre-re/020-2.mcache differ diff --git a/maps/pre-re/020-3.mcache b/maps/pre-re/020-3.mcache new file mode 100644 index 00000000..b96e7d58 Binary files /dev/null and b/maps/pre-re/020-3.mcache differ diff --git a/maps/pre-re/021-3.mcache b/maps/pre-re/021-3.mcache new file mode 100644 index 00000000..6d4bfcc4 Binary files /dev/null and b/maps/pre-re/021-3.mcache differ diff --git a/maps/pre-re/023-1.mcache b/maps/pre-re/023-1.mcache new file mode 100644 index 00000000..ffbc17f7 Binary files /dev/null and b/maps/pre-re/023-1.mcache differ diff --git a/maps/pre-re/023-2.mcache b/maps/pre-re/023-2.mcache new file mode 100644 index 00000000..6d1e4aab Binary files /dev/null and b/maps/pre-re/023-2.mcache differ diff --git a/maps/pre-re/023-3.mcache b/maps/pre-re/023-3.mcache new file mode 100644 index 00000000..455b6556 Binary files /dev/null and b/maps/pre-re/023-3.mcache differ diff --git a/maps/pre-re/025-1.mcache b/maps/pre-re/025-1.mcache new file mode 100644 index 00000000..aceb0a24 Binary files /dev/null and b/maps/pre-re/025-1.mcache differ diff --git a/maps/pre-re/025-3.mcache b/maps/pre-re/025-3.mcache new file mode 100644 index 00000000..ee46ff8f Binary files /dev/null and b/maps/pre-re/025-3.mcache differ diff --git a/maps/pre-re/025-4.mcache b/maps/pre-re/025-4.mcache new file mode 100644 index 00000000..9c4cc0fa Binary files /dev/null and b/maps/pre-re/025-4.mcache differ diff --git a/maps/pre-re/026-1.mcache b/maps/pre-re/026-1.mcache new file mode 100644 index 00000000..931044df Binary files /dev/null and b/maps/pre-re/026-1.mcache differ diff --git a/maps/pre-re/026-2.mcache b/maps/pre-re/026-2.mcache new file mode 100644 index 00000000..c554a23e Binary files /dev/null and b/maps/pre-re/026-2.mcache differ diff --git a/maps/pre-re/027-1.mcache b/maps/pre-re/027-1.mcache new file mode 100644 index 00000000..eeb01b2c Binary files /dev/null and b/maps/pre-re/027-1.mcache differ diff --git a/maps/pre-re/027-2.mcache b/maps/pre-re/027-2.mcache new file mode 100644 index 00000000..282acff5 Binary files /dev/null and b/maps/pre-re/027-2.mcache differ diff --git a/maps/pre-re/027-3.mcache b/maps/pre-re/027-3.mcache new file mode 100644 index 00000000..0d2f17b8 Binary files /dev/null and b/maps/pre-re/027-3.mcache differ diff --git a/maps/pre-re/027-4.mcache b/maps/pre-re/027-4.mcache new file mode 100644 index 00000000..08cef53e Binary files /dev/null and b/maps/pre-re/027-4.mcache differ diff --git a/maps/pre-re/027-5.mcache b/maps/pre-re/027-5.mcache new file mode 100644 index 00000000..7ad99af0 Binary files /dev/null and b/maps/pre-re/027-5.mcache differ diff --git a/maps/pre-re/027-6.mcache b/maps/pre-re/027-6.mcache new file mode 100644 index 00000000..ffa13651 Binary files /dev/null and b/maps/pre-re/027-6.mcache differ diff --git a/maps/pre-re/027-7.mcache b/maps/pre-re/027-7.mcache new file mode 100644 index 00000000..d3075cc6 Binary files /dev/null and b/maps/pre-re/027-7.mcache differ diff --git a/maps/pre-re/027-8.mcache b/maps/pre-re/027-8.mcache new file mode 100644 index 00000000..9c2b5544 Binary files /dev/null and b/maps/pre-re/027-8.mcache differ diff --git a/maps/pre-re/028-1.mcache b/maps/pre-re/028-1.mcache new file mode 100644 index 00000000..80e6c7e3 Binary files /dev/null and b/maps/pre-re/028-1.mcache differ diff --git a/maps/pre-re/028-3.mcache b/maps/pre-re/028-3.mcache new file mode 100644 index 00000000..13d1cd74 Binary files /dev/null and b/maps/pre-re/028-3.mcache differ diff --git a/maps/pre-re/029-1.mcache b/maps/pre-re/029-1.mcache new file mode 100644 index 00000000..4e12c45c Binary files /dev/null and b/maps/pre-re/029-1.mcache differ diff --git a/maps/pre-re/029-2.mcache b/maps/pre-re/029-2.mcache new file mode 100644 index 00000000..e6914819 Binary files /dev/null and b/maps/pre-re/029-2.mcache differ diff --git a/maps/pre-re/029-3.mcache b/maps/pre-re/029-3.mcache new file mode 100644 index 00000000..f0c5e20e Binary files /dev/null and b/maps/pre-re/029-3.mcache differ diff --git a/maps/pre-re/029-4.mcache b/maps/pre-re/029-4.mcache new file mode 100644 index 00000000..94dbc60f Binary files /dev/null and b/maps/pre-re/029-4.mcache differ diff --git a/maps/pre-re/030-1.mcache b/maps/pre-re/030-1.mcache new file mode 100644 index 00000000..49b0186c Binary files /dev/null and b/maps/pre-re/030-1.mcache differ diff --git a/maps/pre-re/030-2.mcache b/maps/pre-re/030-2.mcache new file mode 100644 index 00000000..174d1ab3 Binary files /dev/null and b/maps/pre-re/030-2.mcache differ diff --git a/maps/pre-re/030-3.mcache b/maps/pre-re/030-3.mcache new file mode 100644 index 00000000..dacc127b Binary files /dev/null and b/maps/pre-re/030-3.mcache differ diff --git a/maps/pre-re/030-4.mcache b/maps/pre-re/030-4.mcache new file mode 100644 index 00000000..c58411ac Binary files /dev/null and b/maps/pre-re/030-4.mcache differ diff --git a/maps/pre-re/031-1.mcache b/maps/pre-re/031-1.mcache new file mode 100644 index 00000000..00c3aa24 Binary files /dev/null and b/maps/pre-re/031-1.mcache differ diff --git a/maps/pre-re/031-2.mcache b/maps/pre-re/031-2.mcache new file mode 100644 index 00000000..32587b74 Binary files /dev/null and b/maps/pre-re/031-2.mcache differ diff --git a/maps/pre-re/031-3.mcache b/maps/pre-re/031-3.mcache new file mode 100644 index 00000000..89b9cacd Binary files /dev/null and b/maps/pre-re/031-3.mcache differ diff --git a/maps/pre-re/031-4.mcache b/maps/pre-re/031-4.mcache new file mode 100644 index 00000000..837a8021 Binary files /dev/null and b/maps/pre-re/031-4.mcache differ diff --git a/maps/pre-re/032-3.mcache b/maps/pre-re/032-3.mcache new file mode 100644 index 00000000..809e81c4 Binary files /dev/null and b/maps/pre-re/032-3.mcache differ diff --git a/maps/pre-re/033-1.mcache b/maps/pre-re/033-1.mcache new file mode 100644 index 00000000..9e472074 Binary files /dev/null and b/maps/pre-re/033-1.mcache differ diff --git a/maps/pre-re/034-1.mcache b/maps/pre-re/034-1.mcache new file mode 100644 index 00000000..56710753 Binary files /dev/null and b/maps/pre-re/034-1.mcache differ diff --git a/maps/pre-re/034-2.mcache b/maps/pre-re/034-2.mcache new file mode 100644 index 00000000..ec77237f Binary files /dev/null and b/maps/pre-re/034-2.mcache differ diff --git a/maps/pre-re/035-2.mcache b/maps/pre-re/035-2.mcache new file mode 100644 index 00000000..d41ba3d4 Binary files /dev/null and b/maps/pre-re/035-2.mcache differ diff --git a/maps/pre-re/036-2.mcache b/maps/pre-re/036-2.mcache new file mode 100644 index 00000000..d41ba3d4 Binary files /dev/null and b/maps/pre-re/036-2.mcache differ diff --git a/maps/pre-re/041-1.mcache b/maps/pre-re/041-1.mcache new file mode 100644 index 00000000..520655c8 Binary files /dev/null and b/maps/pre-re/041-1.mcache differ diff --git a/maps/pre-re/042-1.mcache b/maps/pre-re/042-1.mcache new file mode 100644 index 00000000..b6551444 Binary files /dev/null and b/maps/pre-re/042-1.mcache differ diff --git a/maps/pre-re/043-1.mcache b/maps/pre-re/043-1.mcache new file mode 100644 index 00000000..5c81d4d7 Binary files /dev/null and b/maps/pre-re/043-1.mcache differ diff --git a/maps/pre-re/043-3.mcache b/maps/pre-re/043-3.mcache new file mode 100644 index 00000000..e1dd1843 Binary files /dev/null and b/maps/pre-re/043-3.mcache differ diff --git a/maps/pre-re/043-4.mcache b/maps/pre-re/043-4.mcache new file mode 100644 index 00000000..d14f491f Binary files /dev/null and b/maps/pre-re/043-4.mcache differ diff --git a/maps/pre-re/045-1.mcache b/maps/pre-re/045-1.mcache new file mode 100644 index 00000000..e0c82063 Binary files /dev/null and b/maps/pre-re/045-1.mcache differ diff --git a/maps/pre-re/046-1.mcache b/maps/pre-re/046-1.mcache new file mode 100644 index 00000000..cf1e727d Binary files /dev/null and b/maps/pre-re/046-1.mcache differ diff --git a/maps/pre-re/046-3.mcache b/maps/pre-re/046-3.mcache new file mode 100644 index 00000000..dace7565 Binary files /dev/null and b/maps/pre-re/046-3.mcache differ diff --git a/maps/pre-re/047-1.mcache b/maps/pre-re/047-1.mcache new file mode 100644 index 00000000..237c07c7 Binary files /dev/null and b/maps/pre-re/047-1.mcache differ diff --git a/maps/pre-re/047-3.mcache b/maps/pre-re/047-3.mcache new file mode 100644 index 00000000..0647120d Binary files /dev/null and b/maps/pre-re/047-3.mcache differ diff --git a/maps/pre-re/048-2.mcache b/maps/pre-re/048-2.mcache new file mode 100644 index 00000000..a66d4722 Binary files /dev/null and b/maps/pre-re/048-2.mcache differ diff --git a/maps/pre-re/051-1.mcache b/maps/pre-re/051-1.mcache new file mode 100644 index 00000000..4ccc14d5 Binary files /dev/null and b/maps/pre-re/051-1.mcache differ diff --git a/maps/pre-re/051-3.mcache b/maps/pre-re/051-3.mcache new file mode 100644 index 00000000..4dc5fb8f Binary files /dev/null and b/maps/pre-re/051-3.mcache differ diff --git a/maps/pre-re/052-1.mcache b/maps/pre-re/052-1.mcache new file mode 100644 index 00000000..047f60ee Binary files /dev/null and b/maps/pre-re/052-1.mcache differ diff --git a/maps/pre-re/052-2.mcache b/maps/pre-re/052-2.mcache new file mode 100644 index 00000000..fd9912ee Binary files /dev/null and b/maps/pre-re/052-2.mcache differ diff --git a/maps/pre-re/055-1.mcache b/maps/pre-re/055-1.mcache new file mode 100644 index 00000000..c40d664b Binary files /dev/null and b/maps/pre-re/055-1.mcache differ diff --git a/maps/pre-re/055-3.mcache b/maps/pre-re/055-3.mcache new file mode 100644 index 00000000..102b3550 Binary files /dev/null and b/maps/pre-re/055-3.mcache differ diff --git a/maps/pre-re/056-2.mcache b/maps/pre-re/056-2.mcache new file mode 100644 index 00000000..fe2271c5 Binary files /dev/null and b/maps/pre-re/056-2.mcache differ diff --git a/maps/pre-re/057-1.mcache b/maps/pre-re/057-1.mcache new file mode 100644 index 00000000..1ddb9c67 Binary files /dev/null and b/maps/pre-re/057-1.mcache differ diff --git a/maps/pre-re/069-2.mcache b/maps/pre-re/069-2.mcache new file mode 100644 index 00000000..46c84bd8 Binary files /dev/null and b/maps/pre-re/069-2.mcache differ diff --git a/maps/pre-re/070-1.mcache b/maps/pre-re/070-1.mcache new file mode 100644 index 00000000..822ae875 Binary files /dev/null and b/maps/pre-re/070-1.mcache differ diff --git a/maps/pre-re/070-3.mcache b/maps/pre-re/070-3.mcache new file mode 100644 index 00000000..112929ed Binary files /dev/null and b/maps/pre-re/070-3.mcache differ diff --git a/maps/pre-re/099-1.mcache b/maps/pre-re/099-1.mcache new file mode 100644 index 00000000..1b9921c9 Binary files /dev/null and b/maps/pre-re/099-1.mcache differ diff --git a/maps/pre-re/099-2.mcache b/maps/pre-re/099-2.mcache new file mode 100644 index 00000000..3887f059 Binary files /dev/null and b/maps/pre-re/099-2.mcache differ diff --git a/maps/pre-re/099-3.mcache b/maps/pre-re/099-3.mcache new file mode 100644 index 00000000..8293b732 Binary files /dev/null and b/maps/pre-re/099-3.mcache differ diff --git a/maps/pre-re/099-4.mcache b/maps/pre-re/099-4.mcache new file mode 100644 index 00000000..2272bb8e Binary files /dev/null and b/maps/pre-re/099-4.mcache differ diff --git a/maps/pre-re/099-5.mcache b/maps/pre-re/099-5.mcache new file mode 100644 index 00000000..2272bb8e Binary files /dev/null and b/maps/pre-re/099-5.mcache differ diff --git a/maps/pre-re/099-6.mcache b/maps/pre-re/099-6.mcache new file mode 100644 index 00000000..2a26dece Binary files /dev/null and b/maps/pre-re/099-6.mcache differ diff --git a/maps/pre-re/099-7.mcache b/maps/pre-re/099-7.mcache new file mode 100644 index 00000000..82b865c3 Binary files /dev/null and b/maps/pre-re/099-7.mcache differ diff --git a/maps/pre-re/099-8.mcache b/maps/pre-re/099-8.mcache new file mode 100644 index 00000000..21890ea5 Binary files /dev/null and b/maps/pre-re/099-8.mcache differ diff --git a/maps/pre-re/botcheck.mcache b/maps/pre-re/botcheck.mcache index 0c1cb2c8..14f52d73 100644 Binary files a/maps/pre-re/botcheck.mcache and b/maps/pre-re/botcheck.mcache differ diff --git a/maps/pre-re/fermi.mcache b/maps/pre-re/fermi.mcache deleted file mode 100644 index 949c4a62..00000000 Binary files a/maps/pre-re/fermi.mcache and /dev/null differ diff --git a/maps/pre-re/marine-2.mcache b/maps/pre-re/marine-2.mcache deleted file mode 100644 index b93802e8..00000000 Binary files a/maps/pre-re/marine-2.mcache and /dev/null differ diff --git a/maps/pre-re/marine.mcache b/maps/pre-re/marine.mcache deleted file mode 100644 index 9822d83c..00000000 Binary files a/maps/pre-re/marine.mcache and /dev/null differ diff --git a/maps/pre-re/sec_pri.mcache b/maps/pre-re/sec_pri.mcache deleted file mode 100644 index e51c52a8..00000000 Binary files a/maps/pre-re/sec_pri.mcache and /dev/null differ diff --git a/maps/pre-re/test.mcache b/maps/pre-re/test.mcache deleted file mode 100644 index 3757edf5..00000000 Binary files a/maps/pre-re/test.mcache and /dev/null differ diff --git a/maps/pre-re/testbg.mcache b/maps/pre-re/testbg.mcache deleted file mode 100644 index c6885c5f..00000000 Binary files a/maps/pre-re/testbg.mcache and /dev/null differ diff --git a/maps/re/001-1.mcache b/maps/re/001-1.mcache new file mode 100644 index 00000000..b5507d5f Binary files /dev/null and b/maps/re/001-1.mcache differ diff --git a/maps/re/001-2.mcache b/maps/re/001-2.mcache new file mode 100644 index 00000000..66e2394b Binary files /dev/null and b/maps/re/001-2.mcache differ diff --git a/maps/re/001-3.mcache b/maps/re/001-3.mcache new file mode 100644 index 00000000..234d6146 Binary files /dev/null and b/maps/re/001-3.mcache differ diff --git a/maps/re/002-1.mcache b/maps/re/002-1.mcache new file mode 100644 index 00000000..a471eb01 Binary files /dev/null and b/maps/re/002-1.mcache differ diff --git a/maps/re/002-2.mcache b/maps/re/002-2.mcache new file mode 100644 index 00000000..46c02ca9 Binary files /dev/null and b/maps/re/002-2.mcache differ diff --git a/maps/re/002-3.mcache b/maps/re/002-3.mcache new file mode 100644 index 00000000..cf69442a Binary files /dev/null and b/maps/re/002-3.mcache differ diff --git a/maps/re/002-4.mcache b/maps/re/002-4.mcache new file mode 100644 index 00000000..99534939 Binary files /dev/null and b/maps/re/002-4.mcache differ diff --git a/maps/re/002-5.mcache b/maps/re/002-5.mcache new file mode 100644 index 00000000..965ad00a Binary files /dev/null and b/maps/re/002-5.mcache differ diff --git a/maps/re/003-1.mcache b/maps/re/003-1.mcache new file mode 100644 index 00000000..a42d8fa2 Binary files /dev/null and b/maps/re/003-1.mcache differ diff --git a/maps/re/003-4.mcache b/maps/re/003-4.mcache new file mode 100644 index 00000000..4f609783 Binary files /dev/null and b/maps/re/003-4.mcache differ diff --git a/maps/re/004-1.mcache b/maps/re/004-1.mcache new file mode 100644 index 00000000..dcfc3e7d Binary files /dev/null and b/maps/re/004-1.mcache differ diff --git a/maps/re/004-3.mcache b/maps/re/004-3.mcache new file mode 100644 index 00000000..e8953577 Binary files /dev/null and b/maps/re/004-3.mcache differ diff --git a/maps/re/004-4.mcache b/maps/re/004-4.mcache new file mode 100644 index 00000000..303c2d95 Binary files /dev/null and b/maps/re/004-4.mcache differ diff --git a/maps/re/004-5.mcache b/maps/re/004-5.mcache new file mode 100644 index 00000000..65bab4e7 Binary files /dev/null and b/maps/re/004-5.mcache differ diff --git a/maps/re/005-3.mcache b/maps/re/005-3.mcache new file mode 100644 index 00000000..f0550e57 Binary files /dev/null and b/maps/re/005-3.mcache differ diff --git a/maps/re/006-1.mcache b/maps/re/006-1.mcache new file mode 100644 index 00000000..32d90df7 Binary files /dev/null and b/maps/re/006-1.mcache differ diff --git a/maps/re/006-2.mcache b/maps/re/006-2.mcache new file mode 100644 index 00000000..e7a8eebf Binary files /dev/null and b/maps/re/006-2.mcache differ diff --git a/maps/re/006-3.mcache b/maps/re/006-3.mcache new file mode 100644 index 00000000..d7b38ec0 Binary files /dev/null and b/maps/re/006-3.mcache differ diff --git a/maps/re/007-1.mcache b/maps/re/007-1.mcache new file mode 100644 index 00000000..da9f6439 Binary files /dev/null and b/maps/re/007-1.mcache differ diff --git a/maps/re/007-2.mcache b/maps/re/007-2.mcache new file mode 100644 index 00000000..6c29ec87 Binary files /dev/null and b/maps/re/007-2.mcache differ diff --git a/maps/re/008-1.mcache b/maps/re/008-1.mcache new file mode 100644 index 00000000..64509d51 Binary files /dev/null and b/maps/re/008-1.mcache differ diff --git a/maps/re/009-1.mcache b/maps/re/009-1.mcache new file mode 100644 index 00000000..c5be8f59 Binary files /dev/null and b/maps/re/009-1.mcache differ diff --git a/maps/re/009-2.mcache b/maps/re/009-2.mcache new file mode 100644 index 00000000..2766eac9 Binary files /dev/null and b/maps/re/009-2.mcache differ diff --git a/maps/re/009-3.mcache b/maps/re/009-3.mcache new file mode 100644 index 00000000..3f099b59 Binary files /dev/null and b/maps/re/009-3.mcache differ diff --git a/maps/re/009-4.mcache b/maps/re/009-4.mcache new file mode 100644 index 00000000..be239e09 Binary files /dev/null and b/maps/re/009-4.mcache differ diff --git a/maps/re/009-5.mcache b/maps/re/009-5.mcache new file mode 100644 index 00000000..15e48843 Binary files /dev/null and b/maps/re/009-5.mcache differ diff --git a/maps/re/009-6.mcache b/maps/re/009-6.mcache new file mode 100644 index 00000000..42b73b19 Binary files /dev/null and b/maps/re/009-6.mcache differ diff --git a/maps/re/009-7.mcache b/maps/re/009-7.mcache new file mode 100644 index 00000000..7f7c9645 Binary files /dev/null and b/maps/re/009-7.mcache differ diff --git a/maps/re/009-8.mcache b/maps/re/009-8.mcache new file mode 100644 index 00000000..1b1681dc Binary files /dev/null and b/maps/re/009-8.mcache differ diff --git a/maps/re/010-1.mcache b/maps/re/010-1.mcache new file mode 100644 index 00000000..77e03457 Binary files /dev/null and b/maps/re/010-1.mcache differ diff --git a/maps/re/010-2.mcache b/maps/re/010-2.mcache new file mode 100644 index 00000000..c87be1a1 Binary files /dev/null and b/maps/re/010-2.mcache differ diff --git a/maps/re/011-1.mcache b/maps/re/011-1.mcache new file mode 100644 index 00000000..2cb47382 Binary files /dev/null and b/maps/re/011-1.mcache differ diff --git a/maps/re/011-3.mcache b/maps/re/011-3.mcache new file mode 100644 index 00000000..0c6018ed Binary files /dev/null and b/maps/re/011-3.mcache differ diff --git a/maps/re/011-4.mcache b/maps/re/011-4.mcache new file mode 100644 index 00000000..21c65815 Binary files /dev/null and b/maps/re/011-4.mcache differ diff --git a/maps/re/011-6.mcache b/maps/re/011-6.mcache new file mode 100644 index 00000000..f35aa6be Binary files /dev/null and b/maps/re/011-6.mcache differ diff --git a/maps/re/012-1.mcache b/maps/re/012-1.mcache new file mode 100644 index 00000000..7ec3537f Binary files /dev/null and b/maps/re/012-1.mcache differ diff --git a/maps/re/012-3.mcache b/maps/re/012-3.mcache new file mode 100644 index 00000000..17033a8a Binary files /dev/null and b/maps/re/012-3.mcache differ diff --git a/maps/re/012-4.mcache b/maps/re/012-4.mcache new file mode 100644 index 00000000..0c675586 Binary files /dev/null and b/maps/re/012-4.mcache differ diff --git a/maps/re/013-1.mcache b/maps/re/013-1.mcache new file mode 100644 index 00000000..e060930c Binary files /dev/null and b/maps/re/013-1.mcache differ diff --git a/maps/re/013-2.mcache b/maps/re/013-2.mcache new file mode 100644 index 00000000..01dc1dfe Binary files /dev/null and b/maps/re/013-2.mcache differ diff --git a/maps/re/013-3.mcache b/maps/re/013-3.mcache new file mode 100644 index 00000000..a6d3fb7d Binary files /dev/null and b/maps/re/013-3.mcache differ diff --git a/maps/re/014-1.mcache b/maps/re/014-1.mcache new file mode 100644 index 00000000..7e1f8498 Binary files /dev/null and b/maps/re/014-1.mcache differ diff --git a/maps/re/014-3.mcache b/maps/re/014-3.mcache new file mode 100644 index 00000000..48686053 Binary files /dev/null and b/maps/re/014-3.mcache differ diff --git a/maps/re/015-1.mcache b/maps/re/015-1.mcache new file mode 100644 index 00000000..823e0b0a Binary files /dev/null and b/maps/re/015-1.mcache differ diff --git a/maps/re/015-3.mcache b/maps/re/015-3.mcache new file mode 100644 index 00000000..10f22c54 Binary files /dev/null and b/maps/re/015-3.mcache differ diff --git a/maps/re/016-1.mcache b/maps/re/016-1.mcache new file mode 100644 index 00000000..4ccb5482 Binary files /dev/null and b/maps/re/016-1.mcache differ diff --git a/maps/re/016-2.mcache b/maps/re/016-2.mcache new file mode 100644 index 00000000..a2dc2b29 Binary files /dev/null and b/maps/re/016-2.mcache differ diff --git a/maps/re/017-1.mcache b/maps/re/017-1.mcache new file mode 100644 index 00000000..4b091deb Binary files /dev/null and b/maps/re/017-1.mcache differ diff --git a/maps/re/017-2.mcache b/maps/re/017-2.mcache new file mode 100644 index 00000000..a8220dc1 Binary files /dev/null and b/maps/re/017-2.mcache differ diff --git a/maps/re/017-3.mcache b/maps/re/017-3.mcache new file mode 100644 index 00000000..c2e0057d Binary files /dev/null and b/maps/re/017-3.mcache differ diff --git a/maps/re/017-4.mcache b/maps/re/017-4.mcache new file mode 100644 index 00000000..1ac8b6cb Binary files /dev/null and b/maps/re/017-4.mcache differ diff --git a/maps/re/017-9.mcache b/maps/re/017-9.mcache new file mode 100644 index 00000000..22967b04 Binary files /dev/null and b/maps/re/017-9.mcache differ diff --git a/maps/re/018-1.mcache b/maps/re/018-1.mcache new file mode 100644 index 00000000..d867b071 Binary files /dev/null and b/maps/re/018-1.mcache differ diff --git a/maps/re/018-2.mcache b/maps/re/018-2.mcache new file mode 100644 index 00000000..793426ab Binary files /dev/null and b/maps/re/018-2.mcache differ diff --git a/maps/re/018-3.mcache b/maps/re/018-3.mcache new file mode 100644 index 00000000..3bc52f01 Binary files /dev/null and b/maps/re/018-3.mcache differ diff --git a/maps/re/019-1.mcache b/maps/re/019-1.mcache new file mode 100644 index 00000000..33652144 Binary files /dev/null and b/maps/re/019-1.mcache differ diff --git a/maps/re/019-3.mcache b/maps/re/019-3.mcache new file mode 100644 index 00000000..22255c48 Binary files /dev/null and b/maps/re/019-3.mcache differ diff --git a/maps/re/019-4.mcache b/maps/re/019-4.mcache new file mode 100644 index 00000000..81bf7644 Binary files /dev/null and b/maps/re/019-4.mcache differ diff --git a/maps/re/020-1.mcache b/maps/re/020-1.mcache new file mode 100644 index 00000000..1f666f13 Binary files /dev/null and b/maps/re/020-1.mcache differ diff --git a/maps/re/020-2.mcache b/maps/re/020-2.mcache new file mode 100644 index 00000000..34a634de Binary files /dev/null and b/maps/re/020-2.mcache differ diff --git a/maps/re/020-3.mcache b/maps/re/020-3.mcache new file mode 100644 index 00000000..b96e7d58 Binary files /dev/null and b/maps/re/020-3.mcache differ diff --git a/maps/re/021-3.mcache b/maps/re/021-3.mcache new file mode 100644 index 00000000..6d4bfcc4 Binary files /dev/null and b/maps/re/021-3.mcache differ diff --git a/maps/re/023-1.mcache b/maps/re/023-1.mcache new file mode 100644 index 00000000..ffbc17f7 Binary files /dev/null and b/maps/re/023-1.mcache differ diff --git a/maps/re/023-2.mcache b/maps/re/023-2.mcache new file mode 100644 index 00000000..6d1e4aab Binary files /dev/null and b/maps/re/023-2.mcache differ diff --git a/maps/re/023-3.mcache b/maps/re/023-3.mcache new file mode 100644 index 00000000..455b6556 Binary files /dev/null and b/maps/re/023-3.mcache differ diff --git a/maps/re/025-1.mcache b/maps/re/025-1.mcache new file mode 100644 index 00000000..aceb0a24 Binary files /dev/null and b/maps/re/025-1.mcache differ diff --git a/maps/re/025-3.mcache b/maps/re/025-3.mcache new file mode 100644 index 00000000..ee46ff8f Binary files /dev/null and b/maps/re/025-3.mcache differ diff --git a/maps/re/025-4.mcache b/maps/re/025-4.mcache new file mode 100644 index 00000000..9c4cc0fa Binary files /dev/null and b/maps/re/025-4.mcache differ diff --git a/maps/re/026-1.mcache b/maps/re/026-1.mcache new file mode 100644 index 00000000..931044df Binary files /dev/null and b/maps/re/026-1.mcache differ diff --git a/maps/re/026-2.mcache b/maps/re/026-2.mcache new file mode 100644 index 00000000..c554a23e Binary files /dev/null and b/maps/re/026-2.mcache differ diff --git a/maps/re/027-1.mcache b/maps/re/027-1.mcache new file mode 100644 index 00000000..eeb01b2c Binary files /dev/null and b/maps/re/027-1.mcache differ diff --git a/maps/re/027-2.mcache b/maps/re/027-2.mcache new file mode 100644 index 00000000..282acff5 Binary files /dev/null and b/maps/re/027-2.mcache differ diff --git a/maps/re/027-3.mcache b/maps/re/027-3.mcache new file mode 100644 index 00000000..0d2f17b8 Binary files /dev/null and b/maps/re/027-3.mcache differ diff --git a/maps/re/027-4.mcache b/maps/re/027-4.mcache new file mode 100644 index 00000000..08cef53e Binary files /dev/null and b/maps/re/027-4.mcache differ diff --git a/maps/re/027-5.mcache b/maps/re/027-5.mcache new file mode 100644 index 00000000..7ad99af0 Binary files /dev/null and b/maps/re/027-5.mcache differ diff --git a/maps/re/027-6.mcache b/maps/re/027-6.mcache new file mode 100644 index 00000000..ffa13651 Binary files /dev/null and b/maps/re/027-6.mcache differ diff --git a/maps/re/027-7.mcache b/maps/re/027-7.mcache new file mode 100644 index 00000000..d3075cc6 Binary files /dev/null and b/maps/re/027-7.mcache differ diff --git a/maps/re/027-8.mcache b/maps/re/027-8.mcache new file mode 100644 index 00000000..9c2b5544 Binary files /dev/null and b/maps/re/027-8.mcache differ diff --git a/maps/re/028-1.mcache b/maps/re/028-1.mcache new file mode 100644 index 00000000..80e6c7e3 Binary files /dev/null and b/maps/re/028-1.mcache differ diff --git a/maps/re/028-3.mcache b/maps/re/028-3.mcache new file mode 100644 index 00000000..13d1cd74 Binary files /dev/null and b/maps/re/028-3.mcache differ diff --git a/maps/re/029-1.mcache b/maps/re/029-1.mcache new file mode 100644 index 00000000..4e12c45c Binary files /dev/null and b/maps/re/029-1.mcache differ diff --git a/maps/re/029-2.mcache b/maps/re/029-2.mcache new file mode 100644 index 00000000..e6914819 Binary files /dev/null and b/maps/re/029-2.mcache differ diff --git a/maps/re/029-3.mcache b/maps/re/029-3.mcache new file mode 100644 index 00000000..f0c5e20e Binary files /dev/null and b/maps/re/029-3.mcache differ diff --git a/maps/re/029-4.mcache b/maps/re/029-4.mcache new file mode 100644 index 00000000..94dbc60f Binary files /dev/null and b/maps/re/029-4.mcache differ diff --git a/maps/re/030-1.mcache b/maps/re/030-1.mcache new file mode 100644 index 00000000..49b0186c Binary files /dev/null and b/maps/re/030-1.mcache differ diff --git a/maps/re/030-2.mcache b/maps/re/030-2.mcache new file mode 100644 index 00000000..174d1ab3 Binary files /dev/null and b/maps/re/030-2.mcache differ diff --git a/maps/re/030-3.mcache b/maps/re/030-3.mcache new file mode 100644 index 00000000..dacc127b Binary files /dev/null and b/maps/re/030-3.mcache differ diff --git a/maps/re/030-4.mcache b/maps/re/030-4.mcache new file mode 100644 index 00000000..c58411ac Binary files /dev/null and b/maps/re/030-4.mcache differ diff --git a/maps/re/031-1.mcache b/maps/re/031-1.mcache new file mode 100644 index 00000000..00c3aa24 Binary files /dev/null and b/maps/re/031-1.mcache differ diff --git a/maps/re/031-2.mcache b/maps/re/031-2.mcache new file mode 100644 index 00000000..32587b74 Binary files /dev/null and b/maps/re/031-2.mcache differ diff --git a/maps/re/031-3.mcache b/maps/re/031-3.mcache new file mode 100644 index 00000000..89b9cacd Binary files /dev/null and b/maps/re/031-3.mcache differ diff --git a/maps/re/031-4.mcache b/maps/re/031-4.mcache new file mode 100644 index 00000000..837a8021 Binary files /dev/null and b/maps/re/031-4.mcache differ diff --git a/maps/re/032-3.mcache b/maps/re/032-3.mcache new file mode 100644 index 00000000..809e81c4 Binary files /dev/null and b/maps/re/032-3.mcache differ diff --git a/maps/re/033-1.mcache b/maps/re/033-1.mcache new file mode 100644 index 00000000..9e472074 Binary files /dev/null and b/maps/re/033-1.mcache differ diff --git a/maps/re/034-1.mcache b/maps/re/034-1.mcache new file mode 100644 index 00000000..56710753 Binary files /dev/null and b/maps/re/034-1.mcache differ diff --git a/maps/re/034-2.mcache b/maps/re/034-2.mcache new file mode 100644 index 00000000..ec77237f Binary files /dev/null and b/maps/re/034-2.mcache differ diff --git a/maps/re/035-2.mcache b/maps/re/035-2.mcache new file mode 100644 index 00000000..d41ba3d4 Binary files /dev/null and b/maps/re/035-2.mcache differ diff --git a/maps/re/036-2.mcache b/maps/re/036-2.mcache new file mode 100644 index 00000000..d41ba3d4 Binary files /dev/null and b/maps/re/036-2.mcache differ diff --git a/maps/re/041-1.mcache b/maps/re/041-1.mcache new file mode 100644 index 00000000..520655c8 Binary files /dev/null and b/maps/re/041-1.mcache differ diff --git a/maps/re/042-1.mcache b/maps/re/042-1.mcache new file mode 100644 index 00000000..b6551444 Binary files /dev/null and b/maps/re/042-1.mcache differ diff --git a/maps/re/043-1.mcache b/maps/re/043-1.mcache new file mode 100644 index 00000000..5c81d4d7 Binary files /dev/null and b/maps/re/043-1.mcache differ diff --git a/maps/re/043-3.mcache b/maps/re/043-3.mcache new file mode 100644 index 00000000..e1dd1843 Binary files /dev/null and b/maps/re/043-3.mcache differ diff --git a/maps/re/043-4.mcache b/maps/re/043-4.mcache new file mode 100644 index 00000000..d14f491f Binary files /dev/null and b/maps/re/043-4.mcache differ diff --git a/maps/re/045-1.mcache b/maps/re/045-1.mcache new file mode 100644 index 00000000..e0c82063 Binary files /dev/null and b/maps/re/045-1.mcache differ diff --git a/maps/re/046-1.mcache b/maps/re/046-1.mcache new file mode 100644 index 00000000..cf1e727d Binary files /dev/null and b/maps/re/046-1.mcache differ diff --git a/maps/re/046-3.mcache b/maps/re/046-3.mcache new file mode 100644 index 00000000..dace7565 Binary files /dev/null and b/maps/re/046-3.mcache differ diff --git a/maps/re/047-1.mcache b/maps/re/047-1.mcache new file mode 100644 index 00000000..237c07c7 Binary files /dev/null and b/maps/re/047-1.mcache differ diff --git a/maps/re/047-3.mcache b/maps/re/047-3.mcache new file mode 100644 index 00000000..0647120d Binary files /dev/null and b/maps/re/047-3.mcache differ diff --git a/maps/re/048-2.mcache b/maps/re/048-2.mcache new file mode 100644 index 00000000..a66d4722 Binary files /dev/null and b/maps/re/048-2.mcache differ diff --git a/maps/re/051-1.mcache b/maps/re/051-1.mcache new file mode 100644 index 00000000..4ccc14d5 Binary files /dev/null and b/maps/re/051-1.mcache differ diff --git a/maps/re/051-3.mcache b/maps/re/051-3.mcache new file mode 100644 index 00000000..4dc5fb8f Binary files /dev/null and b/maps/re/051-3.mcache differ diff --git a/maps/re/052-1.mcache b/maps/re/052-1.mcache new file mode 100644 index 00000000..047f60ee Binary files /dev/null and b/maps/re/052-1.mcache differ diff --git a/maps/re/052-2.mcache b/maps/re/052-2.mcache new file mode 100644 index 00000000..fd9912ee Binary files /dev/null and b/maps/re/052-2.mcache differ diff --git a/maps/re/055-1.mcache b/maps/re/055-1.mcache new file mode 100644 index 00000000..c40d664b Binary files /dev/null and b/maps/re/055-1.mcache differ diff --git a/maps/re/055-3.mcache b/maps/re/055-3.mcache new file mode 100644 index 00000000..102b3550 Binary files /dev/null and b/maps/re/055-3.mcache differ diff --git a/maps/re/056-2.mcache b/maps/re/056-2.mcache new file mode 100644 index 00000000..fe2271c5 Binary files /dev/null and b/maps/re/056-2.mcache differ diff --git a/maps/re/057-1.mcache b/maps/re/057-1.mcache new file mode 100644 index 00000000..1ddb9c67 Binary files /dev/null and b/maps/re/057-1.mcache differ diff --git a/maps/re/069-2.mcache b/maps/re/069-2.mcache new file mode 100644 index 00000000..46c84bd8 Binary files /dev/null and b/maps/re/069-2.mcache differ diff --git a/maps/re/070-1.mcache b/maps/re/070-1.mcache new file mode 100644 index 00000000..822ae875 Binary files /dev/null and b/maps/re/070-1.mcache differ diff --git a/maps/re/070-3.mcache b/maps/re/070-3.mcache new file mode 100644 index 00000000..112929ed Binary files /dev/null and b/maps/re/070-3.mcache differ diff --git a/maps/re/099-1.mcache b/maps/re/099-1.mcache new file mode 100644 index 00000000..1b9921c9 Binary files /dev/null and b/maps/re/099-1.mcache differ diff --git a/maps/re/099-2.mcache b/maps/re/099-2.mcache new file mode 100644 index 00000000..3887f059 Binary files /dev/null and b/maps/re/099-2.mcache differ diff --git a/maps/re/099-3.mcache b/maps/re/099-3.mcache new file mode 100644 index 00000000..8293b732 Binary files /dev/null and b/maps/re/099-3.mcache differ diff --git a/maps/re/099-4.mcache b/maps/re/099-4.mcache new file mode 100644 index 00000000..2272bb8e Binary files /dev/null and b/maps/re/099-4.mcache differ diff --git a/maps/re/099-5.mcache b/maps/re/099-5.mcache new file mode 100644 index 00000000..2272bb8e Binary files /dev/null and b/maps/re/099-5.mcache differ diff --git a/maps/re/099-6.mcache b/maps/re/099-6.mcache new file mode 100644 index 00000000..2a26dece Binary files /dev/null and b/maps/re/099-6.mcache differ diff --git a/maps/re/099-7.mcache b/maps/re/099-7.mcache new file mode 100644 index 00000000..82b865c3 Binary files /dev/null and b/maps/re/099-7.mcache differ diff --git a/maps/re/099-8.mcache b/maps/re/099-8.mcache new file mode 100644 index 00000000..21890ea5 Binary files /dev/null and b/maps/re/099-8.mcache differ diff --git a/maps/re/botcheck.mcache b/maps/re/botcheck.mcache new file mode 100644 index 00000000..14f52d73 Binary files /dev/null and b/maps/re/botcheck.mcache differ diff --git a/npc/000-0-0/_import.txt b/npc/000-0-0/_import.txt deleted file mode 100644 index 039280fe..00000000 --- a/npc/000-0-0/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 000-0-0: Sailor's Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-0-0/mapflags.txt", -"npc/000-0-0/q'onan.txt", -"npc/000-0-0/sailors.txt", diff --git a/npc/000-0-0/mapflags.txt b/npc/000-0-0/mapflags.txt deleted file mode 100644 index 0ed6ce16..00000000 --- a/npc/000-0-0/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-0-0 mapflag invisible diff --git a/npc/000-0-0/q'onan.txt b/npc/000-0-0/q'onan.txt deleted file mode 100644 index a0fc844a..00000000 --- a/npc/000-0-0/q'onan.txt +++ /dev/null @@ -1,14 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Vasily_Makarov -// Description: -// Sleeping and snoring NPC. - -000-0-0,29,28,0 script Q'Onan#000-0-0 NPC_ORC_SAILOR,{ - asleep; - close; - -OnInit: - end; -} diff --git a/npc/000-0-0/sailors.txt b/npc/000-0-0/sailors.txt deleted file mode 100644 index d72d55f2..00000000 --- a/npc/000-0-0/sailors.txt +++ /dev/null @@ -1,92 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Qwerty Dragon -// Description: -// Introduction scene where two sailors talk about how the player was found on his raft. -// Elmo will handle dialogs between both NPCs. - -000-0-0,26,23,0 script Elmo#sailors NPC_ELMO,{ - -OnTalk: - deltimer("Elmo#sailors::OnSlow"); - setcamnpc; - mesn "Elmo"; - mesq l("Poor thing. Fortunately we were more attentive than the sharks in these waters. I wonder where this tragic journey started. By the way, did you see the logo on that raft?"); - next; - - mesn "Magic Arpan"; - mesq l("Yeye, it's the logo of the Legion of Aemil in Esperia! I wonder what this yoiis was doing so far away from the coast."); - next; - - mesn "Elmo"; - mesq l("I wonder too..."); - next; - - mesn "Magic Arpan"; - mesq l("Did you hear about all those missing people last month? Maybe this is the yoiis from Esperia who got a secret diplomatic mission from the Legion of Aemil!"); - next; - - mesn "Elmo"; - mesq l("Makes sense. Do you think we should inform the capt'n about it?"); - next; - - mesn "Magic Arpan"; - mesq l("Yeye."); - next; - - mesn "Elmo"; - mesq l("Alright, I'm going to his room. Keep watch, not that our new friend turns out to be a foe after all..."); - next; - - mesn "Magic Arpan"; - mesq l("I will yaying do."); - next; - - mesn "Elmo"; - mesq l("Oh, and give our friend - or foe - some clothes, that shabby rags are in even worse condition than ours."); - next; - - mesn "Magic Arpan"; - mesq l("Yayayaya, it's the first time someone is dressed worse than us!"); - next; - - mesn "Elmo"; - mesq l("Hehe... Ok, I'm going to inform the capt'n up there."); - next; - - mesn "Magic Arpan"; - mesq l("I'll bring everything that is needed, don't worry."); - next; - - mesn "Elmo"; - mesq l("Oh, look who is waking up!"); - next; - - restorecam; - adddefaultskills; - setq General_Narrator, 0; - addtimer(45000,"Magic Arpan::OnSlow"); - warp "000-2-1", 50, 38; - savepoint "000-2-1", 50, 38; - percentheal 100, 100; - closeclientdialog; - close; - -OnInit: - end; - -OnSlow: - npctalk3(l("(Click on us to continue the introduction.)")); - dispbottom(l("Click on the NPCs (Non-Player Characters) around you to continue the introduction.")); - addtimer(60000,"Elmo#sailors::OnSlow"); - close; -} - -000-0-0,25,23,0 script Magic Arpan#sailors NPC_MAGIC_ARPAN,{ - doevent "Elmo#sailors::OnTalk"; - close; - -OnInit: - end; -} diff --git a/npc/000-0-1/_import.txt b/npc/000-0-1/_import.txt deleted file mode 100644 index ed783937..00000000 --- a/npc/000-0-1/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 000-0-1: Sailor's Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-0-1/mapflags.txt", -"npc/000-0-1/narrator.txt", diff --git a/npc/000-0-1/mapflags.txt b/npc/000-0-1/mapflags.txt deleted file mode 100644 index 04d1aea5..00000000 --- a/npc/000-0-1/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-0-1 mapflag invisible diff --git a/npc/000-0-1/narrator.txt b/npc/000-0-1/narrator.txt deleted file mode 100644 index d1bf14e8..00000000 --- a/npc/000-0-1/narrator.txt +++ /dev/null @@ -1,180 +0,0 @@ -// Evol scripts. -// Moubootaur Legends scripts. -// Author: -// Reid -// Jesusalva -// Description: -// Narrator explain to the player that he is dreaming. -// Variable: -// Q General_Narrator -// Values: -// 0 PC is in the game introduction. -// 1 PC arrived Artis. -// 2 PC arrived in Argaes. - -000-0-1,25,28,0 script Narrator#000-0-1 NPC_NARRATOR,{ - function referralSystem; - function travelToArtis; - function travelToArgaes; - - switch (getq(General_Narrator)) { - case 0: - travelToArtis(); - break; - case 1: - travelToArgaes(); - break; - default: - mesc(l("ERROR - Corrupted quest state %d", getq(General_Narrator)), 1); - mesc(l("Please contact the staff for technical support."), 1); - mes(""); - mesc(l("Error message: Narrator#000-0-1 Invalid Quest State")); - break; - } - closeclientdialog(); - close; - -OnInit: - - if (debug > 0) { - // debug commands to skip the tutorial - bindatcmd("force-referral", sprintf("%s::referralSystem", .name$)); - bindatcmd("force-artis", sprintf("%s::travelToArtis", .name$)); - } - end; - - /////////////////////////////////////////////////////////////////////// - // Quest state: 0 - public function travelToArtis { - narrator(S_LAST_NEXT, - l("Look, we finally meet."), - l("I think that you already understood, you are asleep."), - l("The ship, La Johanne, has left Drasil Island, finally."), - l("Nard and his crew are taking us to the city of Artis.")); - - // Legacy accounts are excluded - // Only one referral per vault account - .@refVault = bitwise_get(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0); - - if (!islegacyaccount() && .@refVault < 1) { - referralSystem(); - } - - narrator(S_LAST_CLOSE, - l("There are a lot of things you must be wondering about."), - l("So, search for answers."), - l("..."), - l("Ah, seagulls. We are arriving."), - l("..."), - l("Wake-up!")); - - if (.@cnt = countitem(JohanneKey)) { - delitem(JohanneKey, .@cnt); - } - - setq(General_Narrator, 1); - setq(ShipQuests_Nard, 6); - savepoint("001-2-22", 50, 38); - warp("SavePoint", 0, 0); - return; - } - - /////////////////////////////////////////////////////////////////////// - // Quest state: 1 - function travelToArgaes { - narrator(S_LAST_NEXT, - l("Oh, hello again!"), - l("I hope you still remember me."), - l("Now, this ship is not the most comfortable, don't you agree?"), - l("Well, hopefully it won't be too long until you reach your destination."), - l("Argaes, in the ancient continent of Ancea..."), - l("What could be waiting for you there?")); - - // Special dialog for Legacy accounts - // To relate to Doomsday event - if (islegacyaccount()) { - narrator(S_LAST_NEXT, - l("Maybe you already have been on that continent before."), - l("Also, don't you think this ship vaguely... familiar?"), - l("Well, not like you would be able to remember. Even if you wanted."), - l("Ah, sorry. I make too many rhetorical questions, don't I?"), - l("I probably should let you rest, it must have been tiring!"), - l("But before that, one last question...")); - } - - narrator(S_LAST_CLOSE, - l("Actually... Wouldn't now be a good time to wake up?")); - - setq(General_Narrator, 2); - savepoint("008-1-1", 33, 63); - warp("SavePoint", 0, 0); - dispbottom(l("After a tiring, yet fast travel by ship, you arrive at %s.", l("Woodlands"))); - close; - } - - /////////////////////////////////////////////////////////////////////// - // Script Utils - // referralSystem() is a Moubootaur Legends function - public function referralSystem { - mesc(l("But before we get there, I've been itching to know...")); - next(); - mesc(l("Do we know someone on this world?"), 1); // FIXME: awkward wording: suddenly changes from singular first person (I) to plural second person (we) - - // Opt-out - if (askyesno() == ASK_NO) { - mesc(l("Yes. We truly don't remember anyone.")); // FIXME: juxtaposition of Yes and No (probably should be "No, we truly don't...") - next(); - return; - } - - // Opt-in - mesc(l("Yes... We remember a fellow adventurer... What was their name again?")); - next(); - - do { - mesc(l("(Which player invited you to this world?)"), 1); // FIXME: suddenly changes to the third person (invited "you" vs invited "us" or invited "me") - input(.@refName$ = ""); - mes(""); - - .@refName$ = strip(.@refName$); // clean it up - - if (.@refName$ == "") { - mesc(l("Actually, nevermind. My memory is still too foggy to remember this.")); // FIXME: suddenly changes from plural second person to singular first person ("My" memory) - next(); - break; - } - - .@refVault = "playerCache"::name2vault(.@refName$); - - if (.@refVault == 0) { - mesc(l("Oops, there is nobody known as %s on this word.", .@refName$)); // FIXME: this is too informal - mesc(l("Maybe I don't remember their name, after all.")); - next(); - sleep2(400); // Anti-spam Forced cooldowns - // FIXME: show a message to the player (use a variable to throttle instead of sleep2) - continue; - } - - - if (.@refVault == getvaultid()) { - mesc(l("Hahah, silly, that's ourselves!")); - mesc(l("Try again!")); - next(); - sleep2(200); // Anti-spam Forced cooldowns - // FIXME: show a message to the player (use a variable to throttle instead of sleep2) - continue; - } - - bitwise_set(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0, .@refVault); - //getitembound(FriendGift, 1, 1); - mesc(l("Ah yes, our trusty friend, %s.", .@refName$)); - mesc(l("They probably miss me. I mean, I probably have been away for a long time...")); - next(); - mesc(l("Maybe they sent me a letter, or a gift? I'll see once I get in Artis.")); - next(); - break; - } while (true); - - return; - } -} diff --git a/npc/000-0/_import.txt b/npc/000-0/_import.txt deleted file mode 100644 index 75f2626b..00000000 --- a/npc/000-0/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 000-0: Oceania -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-0/mapflags.txt", -"npc/000-0/sailors.txt", diff --git a/npc/000-0/mapflags.txt b/npc/000-0/mapflags.txt deleted file mode 100644 index e956447e..00000000 --- a/npc/000-0/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-0 mapflag invisible diff --git a/npc/000-0/sailors.txt b/npc/000-0/sailors.txt deleted file mode 100644 index d19d4f39..00000000 --- a/npc/000-0/sailors.txt +++ /dev/null @@ -1,92 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Jesusalva -// Description: -// Starting script of Evol Online. - -000-0,23,20,0 script Sailors NPC_SAILORS,6,6,{ - -OnTouch: - checkclientversion; - .@lang = requestlang(); - if (.@lang >= 0 && .@lang <= MAX_LANG) Lang = .@lang; - - mesn l("Narrator"); - mesc(l("You are on a raft, adrift in the sea."), 9); - next; - mesc(l("With hunger, thirst, and sleep as your only companions, you have the disturbing realization that you can't remember anything of your former life or identity."), 9); - next; - mesc(l("All of a sudden, you hear voices from above."), 9); - next; - mesc(l("Your body aches, even your hair hurts, and the bright daylight is painful."), 9); - next; - mesc(l("But still, you open your eyes and see a large ship before you!"), 9); - next; - mesc(l("Aboard stand sailors trying to communicate with you."), 9); - next; - - setcamnpc "Sailors", -64, -32; - mesn l("Kralog Voice"); - mesq l("Hey Frenchy!"); - next; - - setcamnpc "Sailors", 0, -32; - mesn l("Human Voice"); - mesq l("Nah, clearly from the East..."); - next; - - setcamnpc "Sailors", 144, -80; - mesn l("Tritan Voice"); - mesq l("What are you guys saying ? It's a Yoiis!"); - next; - - setcamnpc; - mesn l("Raijin Voice"); - mesq l("From the East? As in... Ancea?"); - next; - mesq l("Hey you! Can you hear us? Are you okay?"); - next; - restorecam; - - asklanguage(LANG_ON_SEA); - - // Players coming from TMW Legacy didn't got a chance to do this yet. - // So allow them now. - if (islegacyaccount()) { - // Rebirth system - if (getlegacylevel() > 90) - REBIRTH=1; - - // Race selection - BarberChangeRace(); - } - - setcamnpc; - mes ""; - mesn; - mesq l("Oh, still alive? What a relive!"); - next; - setcamnpc "Sailors", 144, -80; - mesq l("This castaway needs help, on to the rescue!"); - next; - restorecam; - - mesn l("Narrator"); - mesc(l("The sailors take you aboard their ship."), 9); - next; - mesc(l("Click on the NPCs (Non-Player Characters) around you to continue the introduction."), 9); - next; - - addtimer(15000,"Elmo#sailors::OnSlow"); - warp "000-0-0", 26, 28; - - closeclientdialog; - close; - -OnInit: - end; -} diff --git a/npc/000-1/_import.txt b/npc/000-1/_import.txt index 55b14a90..ec2c18b7 100644 --- a/npc/000-1/_import.txt +++ b/npc/000-1/_import.txt @@ -1,24 +1,3 @@ -// Map 000-1: Drasil Island +// Map 000-1: Jesusalva's Trap // This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-1/_mobs.txt", -"npc/000-1/_warps.txt", -"npc/000-1/ale.txt", -"npc/000-1/astapolos.txt", -"npc/000-1/boss.txt", -"npc/000-1/chest.txt", -"npc/000-1/couwan.txt", -"npc/000-1/darlin.txt", -"npc/000-1/fexil.txt", -"npc/000-1/gugli.txt", -"npc/000-1/gulukan.txt", -"npc/000-1/jalad.txt", -"npc/000-1/lean.txt", -"npc/000-1/mapflags.txt", -"npc/000-1/maxe.txt", -"npc/000-1/muller.txt", -"npc/000-1/panels.txt", -"npc/000-1/sapartan.txt", -"npc/000-1/shop.txt", -"npc/000-1/silvio.txt", -"npc/000-1/tarlan.txt", -"npc/000-1/tibbo.txt", +"npc/000-1/exit.txt", diff --git a/npc/000-1/_mobs.txt b/npc/000-1/_mobs.txt deleted file mode 100644 index 4a1f05b5..00000000 --- a/npc/000-1/_mobs.txt +++ /dev/null @@ -1,38 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-1: Drasil Island mobs -000-1,28,49,6,9 monster Tortuga 1004,3,16000,120000 -000-1,58,118,34,14 monster Tortuga 1004,4,35000,300000 -000-1,71,95,4,12 monster Tortuga 1004,1,35000,300000 -000-1,52,92,4,17 monster Tortuga 1004,2,35000,300000 -000-1,37,66,11,5 monster Tortuga 1004,2,35000,120000 -000-1,42,41,9,16 monster Tortuga 1004,2,35000,120000 -000-1,87,37,12,11 monster Tortuga 1004,3,35000,120000 -000-1,44,75,2,1 monster Little Blub 1007,2,25000,120000 -000-1,61,64,7,10 monster Little Blub 1007,2,25000,120000 -000-1,62,25,10,4 monster Little Blub 1007,2,25000,120000 -000-1,85,33,2,3 monster Little Blub 1007,1,25000,120000 -000-1,85,58,14,9 monster Little Blub 1007,2,35000,120000 -000-1,48,61,9,6 monster Little Blub 1007,1,35000,120000 -000-1,28,48,3,5 monster Little Blub 1007,1,35000,120000 -000-1,35,50,0,1 monster Plushroom Field 1011,1,35000,150000 -000-1,54,115,0,1 monster Plushroom Field 1011,1,35000,150000 -000-1,63,80,4,2 monster Plushroom Field 1011,1,35000,150000 -000-1,54,64,0,2 monster Plushroom Field 1011,1,35000,150000 -000-1,78,58,4,5 monster Plushroom Field 1011,2,35000,150000 -000-1,71,62,1,1 monster Plushroom Field 1011,1,35000,150000 -000-1,32,116,8,9 monster Croc 1006,2,35000,300000 -000-1,63,31,10,3 monster Croc 1006,1,35000,300000 -000-1,76,68,1,1 monster Croc 1006,1,35000,300000 -000-1,52,92,4,17 monster Croc 1006,1,35000,300000 -000-1,71,77,4,4 monster Croc 1006,1,35000,300000 -000-1,0,0,0,0 monster Piou 1002,4,60000,15000 -000-1,78,115,0,0 monster Crocotree 1010,1,420000,240000 -000-1,57,104,0,0 monster Crocotree 1010,1,420000,240000 -000-1,39,112,0,0 monster Crocotree 1010,1,420000,240000 -000-1,67,93,0,0 monster Crocotree 1010,1,420000,240000 -000-1,53,77,0,0 monster Crocotree 1010,1,420000,240000 -000-1,64,63,0,0 monster Crocotree 1010,1,420000,240000 -000-1,31,69,0,0 monster Crocotree 1010,1,420000,240000 -000-1,44,44,0,0 monster Crocotree 1010,1,420000,240000 -000-1,70,33,0,0 monster Crocotree 1010,1,420000,240000 -000-1,84,66,0,0 monster Crocotree 1010,1,420000,240000 diff --git a/npc/000-1/_warps.txt b/npc/000-1/_warps.txt deleted file mode 100644 index 47b4fb42..00000000 --- a/npc/000-1/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-1: Drasil Island warps -000-1,94,100,0 warp #000-1_94_100 0,0,000-2-0,21,28 diff --git a/npc/000-1/ale.txt b/npc/000-1/ale.txt deleted file mode 100644 index d7c6fed7..00000000 --- a/npc/000-1/ale.txt +++ /dev/null @@ -1,109 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Sailor part of the Gugli's quest. -// Aquada box. - -000-1,55,23,0 script Ale#000-1 NPC_DEMON_MAN_SITTING,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_Ale); - if (.@q == 1) goto L_CallFunc; - - mesn; - mesq l("Ouch..."); - next; - mesq l("These heavy boxes are killing me, I can't feel my arms anymore!"); - next; - - menu - l("Gugli sent me down here to help you."), -, - l("See you aboard."), L_Quit; - - mes ""; - mesn; - mesq l("Really? That's kind of you, I accept your help!"); - next; - mesq l("Hmm... Let's see, take this one."); - next; - - inventoryplace AquadaBox, 1; - - setq ShipQuests_Ale, 1; - getitem AquadaBox, 1; - - mes ""; - mesn; - mesq l("I will take care of the other ones don't worry."); - - close; - -L_CallFunc: - sailorfood; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_Ale) == 1 && (getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_QMuller) == 0 || getq(ShipQuests_Tibbo) == 0), l("I'm still busy, I need to find the other sailors.")), -; - - mes ""; - mesn; - mesq l("Who are you looking for?"); - next; - - menu - rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Bottom, - rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Bottom, - rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Jalad, - rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Bottom, - rif(getq(ShipQuests_Tibbo) == 0, l("Tibbo.")), L_Bottom, - l("Nobody."), L_Quit; - -L_Bottom: - mes ""; - mesn; - mesq l("I've seen him down around the southern area of the island, ask Jalad for more information."); - - close; - -L_Jalad: - setcamnpc "Jalad"; - - next; - mesn; - mesq l("Look, here he is!"); - next; - - restorecam; - - close; - -L_NoTask: - mes ""; - mesn; - mesq l("Ouch... These boxes are so heavy!"); - - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("That's good to hear!"); - - close; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/astapolos.txt b/npc/000-1/astapolos.txt deleted file mode 100644 index f28d7422..00000000 --- a/npc/000-1/astapolos.txt +++ /dev/null @@ -1,165 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Sailor part of the Gugli's quest. -// Croconut box. - -000-1,22,50,0 script Astapolos NPC_ELVEN_MAN_RED,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_Astapolos); - if (.@q == 1) goto L_CallFunc; - - mesn; - mesq l("So finally someone has came to visit me?"); - next; - - select - l("Actually, I came here to work on my task."); - - mes ""; - mesn; - mesq l("Oh, I see. That's right. Why should someone come here to see me, seriously?"); - next; - mesq l("Do you think this is fair? They sent me down here alone, far away from everyone."); - next; - - menu - l("I'm sorry for your situation. They should alternate shifts with other sailors from time to time."), -, - l("Well if you are whining like that all the time, then I think there is a reason behind their choice."), L_Whyning; - - mes ""; - mesn; - mesq l("Exactly. Even our task is ridiculous. Why should we collect food down here if we have plenty of those tasty and soft rattos inside our ship, waiting just to be hunted and cooked?"); - next; - - menu - l("You... You eat... rattos? I think you're just a fool."), L_Whyning, - l("Oh... eating rattos. Sounds... ehm... Delicious, yes."), -; - - mes ""; - mesn; - mesq l("You like them, don't you? Just speak with Peter then. He is on the second deck of the ship. He will send you downstairs to the hold, where you will find a furry meal!"); - next; - mesq l("Oh, but you didn't come here to talk about that, am I right?"); - next; - - select - l("Actually, I was here to help you with those boxes. Can I bring one of them back to Gugli?"); - - mes ""; - mesn; - mesq l("Usually I don't allow anyone to touch my boxes but..."); - next; - mesq l("You have been so nice to me. So please, take one."); - next; - - inventoryplace CroconutBox, 1; - - setq ShipQuests_Astapolos, 1; - getitem CroconutBox, 1; - - mes ""; - mesn; - mesq l("Good luck! And remember to visit Peter and our little furry friends whenever you return back onboard!"); - - close; - -L_CallFunc: - sailorfood; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_Astapolos) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_QMuller) == 0 || getq(ShipQuests_Tibbo) == 0), l("I'm still busy, I need to find the other sailors.")), -, - l("How are things going?"), L_HowAreYou, - l("Who are you?"), L_Who; - - mes ""; - mesn; - mesq l("Who are you looking for?"); - next; - - menu - rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Top, - rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Bottom, - rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Top, - rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Bottom, - rif(getq(ShipQuests_Tibbo) == 0, l("Tibbo.")), L_Bottom, - l("Nobody."), -; - - closeclientdialog; - close; - -L_HowAreYou: - - mes ""; - mesn; - mesq l("A sunny and hot day,"); - next; - mesq l("a quiet place,"); - next; - mesq l("a ground!"); - next; - mesq l("I hope that answers your question.") + " " + l("Hehe!"); - - close; - -L_Who: - mes ""; - mesn; - mesq l("My name is Astapolos. Q'Muller and I joined Nard's crew a few years ago when it was just a little merchant ship."); - next; - mesq l("At that time, we were selling crab food on our old mushroom island."); - next; - mesq l("And now I'm a sailor, as you can see!"); - - close; - -L_Bottom: - mes ""; - mesn; - mesq l("I've seen him at the southern part of the island, check around."); - - close; - -L_Top: - mes ""; - mesn; - mesq l("I've seen him at the northern part of the island."); - next; - mesq l("You should walk to the north."); - - close; - -L_NoTask: - npctalk3 l("Just leave me alone."); - - closeclientdialog; - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("Perfect!"); - - close; - -L_Whyning: - npctalk3 l("Then leave me alone."); - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/boss.txt b/npc/000-1/boss.txt deleted file mode 100644 index 1b2f4449..00000000 --- a/npc/000-1/boss.txt +++ /dev/null @@ -1,43 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Controls the boss on 000-1 and the Master Book Learning -// see npc/items/master_skillbook.txt for explanation about variables - -000-1,0,0,0 script #BossCtrl_000-1 NPC_HIDDEN,{ - end; - -// Test server: 15 minutes only -OnTimer900000: - if (!debug) - end; - -// Otherwise, respawn every hour -OnTimer3600000: - stopnpctimer; -OnInit: - $@MB_0001=0; - monster "000-1", 87, 69, strmobinfo(1, Blub), Blub, 1, "#BossCtrl_000-1::OnBossDeath"; - end; - -OnBossDeath: - initnpctimer; - BossSlain(.name$, "$@MB_0001"); - end; - -OnBossCheck: - @mb_BossId=-1; - // TODO: Check if you really fought or was just lurking - // Check if party is correct - if (getcharid(1) != $@MB_0001) - end; -OnBegin: - @mb_BossId=Blub; - @mb_SkillId=false; - @mb_ItemId=MagicFeather; // Placeholder - @mb_ItemAm=1; - addtimer(15000, "#MasterBook::OnUnset"); - end; - -} diff --git a/npc/000-1/chest.txt b/npc/000-1/chest.txt deleted file mode 100644 index 511023e0..00000000 --- a/npc/000-1/chest.txt +++ /dev/null @@ -1,65 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// gumi -// Hal9000 -// Reid -// Description: -// A treasure chest, with... Treasures inside! -// Variable: -// x ShipQuests_TreasureChest -// Values: -// 0 Treasure Chest has not been opened yet. -// 1 Treasure Chest has been opened. - -000-1,83,70,0 script Chest#000-1 NPC_CHEST,3,3,{ - - if (.busy == false) - { - if (getq(ShipQuests_TreasureChest) == 0) - { - inventoryplace OldBook, 1; - setq ShipQuests_TreasureChest, 1; - npctalk3 l("Chest opened."); - Zeny += 100; - getitem OldBook, 1; - } - - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing - .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing - .busy = true; // lock until available again - initnpctimer; - } - end; - -OnTimer160: - .dir = .dir == 6 ? 0 : 4; // closing ? closed : open - end; - -OnTimer500: - .busy = false; // unlock - - if (.dir == 0) - { - stopnpctimer; // stop here if the chest is closed - } - end; - -OnUnTouch: - if (getareausers(.x - 3, .y - 3, .x + 3, .y + 3) > 0 || .dir == 0) - { - end; - } -OnTimer30000: - .busy = true; - .dir = 6; // closing - specialeffect(25, AREA, getnpcid()); // closing - setnpctimer 0; -OnTouch: - end; - - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/couwan.txt b/npc/000-1/couwan.txt deleted file mode 100644 index a4cdf6b8..00000000 --- a/npc/000-1/couwan.txt +++ /dev/null @@ -1,94 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Couwan is trying to scam the player. -// Variable: -// x ShipQuests_Couwan -// Values: -// 0 Never talked with Couwan. -// 1 Spoke, and received the quest scam. -// 2 Done quest scam. - -000-1,89,36,0 script Couwan NPC_TRITAN_MAN_SAILOR,{ - .@q = getq(ShipQuests_Couwan); - if (.@q == 1) - { - mesn; - mesq l("What are you looking at?"); - next; - mesq l("Yeye still have my box? Stare less and work more. Go give it to Gugli!"); - close; - } - else if (.@q > 1) - { - mesn; - mesq l("What are you looking at?"); - next; - mesq l("Yeye gave my box to Gugli? Nice, nice yeye!"); - close; - } - - mesn; - mesq l("Hello yeye."); - next; - mesq l("Look how splendid this landscape is!"); - next; - - switch(select( - l("Very nice, indeed!"), - l("I don't see anything else other than... water?"))) - { - case 2: - mes ""; - mesn; - mesq l("Yeye's brain is probably still full of sea water if yeye can't see the beauty of this place."); - next; - mesq l("Stupid yeye..."); - close; - } - - mes ""; - mesn; - mesq l("Yeye got good eyes and seem to have fully recovered from your injuries..."); - next; - mesq l("Hey, could yeye please take my box of fish to Gugli?"); - next; - - switch(select( - l("Sure, but what will I get in exchange?"), - l("I'm sorry, I don't have time right now."))) - { - case 2: - mes ""; - mesn; - mesq l("Stupid yeye..."); - break; - - case 255: - break; - - default: - mes ""; - mesn; - mesq l("Yeye ask too much but do too little. Take this box and stop talking."); - next; - - inventoryplace FishBox, 1; - mesn "Narrator"; - mesc(l("Couwan hands you a box full of fish."), 9); - getitem FishBox, 1; - next; - mesc(l("The sailor turns his back to you."), 9); - - setq ShipQuests_Couwan, 1; - break; - } - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/darlin.txt b/npc/000-1/darlin.txt deleted file mode 100644 index e9f6649d..00000000 --- a/npc/000-1/darlin.txt +++ /dev/null @@ -1,148 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Reid -// Description: -// Darlin talks from the top of the tall mast. -// Variable: -// x ShipQuests_TreasureChest -// Values: -// 0 Treasure Chest has not been opened yet. -// 1 Treasure Chest has been opened. - -000-1,89,95,0 script Darlin NPC_RAIJIN_MAN,{ - .@q = getq(ShipQuests_TreasureChest); - - mesn; - setcamnpc; - mesq l("HEY! HEY YOU!"); - next; - mesq l("CAN YOU HEAR ME?!"); - next; - restorecam; - - menu - l("Yes!"), -, - l("No!"), L_Quit; - - setcamnpc; - mes ""; - mesn; - mesq l("GOOD!"); - next; - mesq l("I WAS HERE WHEN THEY RESCUED YOU!"); - next; - mesq l("DO YOU FEEL BETTER?!"); - next; - restorecam; - - menu - l("I do feel better!"), -, - l("Why don't you come down to talk?"), L_GoDown; - - mes ""; - menu - l("And you, how are you doing?"), -, - l("But I need to go, see you!"), L_Bye; - - setcamnpc; - mes ""; - mesn; - mesq l("I AM DOING FINE!"); - next; - mesq l("HEY, WHAT'S YOUR NAME?!"); - next; - restorecam; - - select - strcharinfo(0) + ".", - l("Maybe you can come down to talk?"); - - setcamnpc; - mes ""; - mesn; - mesq l("WHAT DID YOU SAY?!"); - next; - mesq l("I DO NOT UNDERSTAND!"); - next; - restorecam; - - menu - l("I said... WHY DON'T YOU COME DOWN TO TALK?"), L_GoDown, - l("I SAID, SEE YOU LATER!"), L_Bye, - l("I'M CALLED, @@!", strtoupper(strcharinfo(0))), -; - - setcamnpc; - mes ""; - mesn; - mesq strtoupper(strcharinfo(0)) + "? " + l("THAT'S A NICE NAME!"); - next; - mesq l("SO WHAT'S UP?! WHAT ARE YOU DOING?!"); - next; - restorecam; - - menu - l("I'm looking for Gugli, where is he?"), -, - l("I need to go, sorry."), L_Bye; - - setcamnpc; - mes ""; - mesn; - mesq l("OH, LOOK THERE!"); - setcamnpc "Gugli"; - next; - mesq l("HE IS AT THE BOTTOM OF THE SHIP, DOWN THE STAIRS. YOU CAN'T MISS HIM!"); - next; - restorecam; - - goto L_Quit; - -L_GoDown: - setcamnpc; - mes ""; - mesn; - mesq l("I WOULD LOVE TO!"); - next; - mesq l("BUT I CAN'T, I NEED TO KEEP AN EYE ON THE SEA, TO WARN THE CREW IF THERE HAPPENS TO BE SOME PIRATES AROUND!"); - next; - mesq l("I ALSO AVOID THE DANGEROUS ANIMALS!"); - next; - restorecam; - - menu - l("Have you seen anything dangerous?"), -, - l("Interesting... I'll leave you to your task then!"), L_Bye; - - mes ""; - mesn; - - if (.@q > 0) goto L_DangerAround; - - setcamnpc; - mesq l("Oh no, but I've noticed a weird light on the other part of this island, I wonder what it could be..."); - next; - restorecam; - - goto L_Quit; - -L_Bye: - npctalk3 l("FINE, BYE!"); - - goto L_Quit; - -L_DangerAround: - setcamnpc; - mesq l("NOTHING ELSE OTHER THAN SHARKS AND AN ODD LIGHT!"); - next; - restorecam; - - goto L_Quit; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 14; - end; -} diff --git a/npc/000-1/exit.txt b/npc/000-1/exit.txt new file mode 100644 index 00000000..a3c4f6c7 --- /dev/null +++ b/npc/000-1/exit.txt @@ -0,0 +1,18 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Description: +// Special Soul Menhir which only allows leaving the map. + +000-1,22,22,0 script Emergency Exit NPC_NO_SPRITE,2,2,{ +OnTouch: +OnTalk: +OnTalkNearby: + if (Sex) + warp "029-2", 25, 24; + else + warp "029-2", 22, 24; + end; + +} + diff --git a/npc/000-1/fexil.txt b/npc/000-1/fexil.txt deleted file mode 100644 index 7740263c..00000000 --- a/npc/000-1/fexil.txt +++ /dev/null @@ -1,43 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Newbie merchant. - -000-1,83,98,0 script Fexil NPC_ELVEN_MAN_TRADER,{ - mesn; - mesq l("Greetings traveler."); - next; - mesq l("I have some clothes and other things for you at a fine price!"); - next; - mesq l("What I sell comes from every corner of Gasaron. From Esperia to the Land of Fire!"); - next; - mesq l("Interested?"); - next; - - switch (select("Yes, why not.:I would rather sell some stuff.:No, Sorry.")) - { - case 1: - mes ""; - mesn; - mesq l("Good, take a look in the bag next to me then!"); - close; - - case 2: - closeclientdialog; - shop "Bag#000-1"; - close; - - default: - mes ""; - mesn; - mesq l("Oh... Well, I just started to trade... Thus my technique may not be the best."); - next; - mesq l("Anyway, if you ever feel interested, just check my bag!"); - close; - } - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/gugli.txt b/npc/000-1/gugli.txt deleted file mode 100644 index 265deae6..00000000 --- a/npc/000-1/gugli.txt +++ /dev/null @@ -1,248 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Elmo's twin -// Charged of an important quest from Nard, he asks you to help other sailors to keep their box to the ship. -// Variable: -// 0 ShipQuests_Couwan -// 1 ShipQuests_Nard -// 2 ShipQuests_Gugli -// Values: -// 00 Never talked with Couwan. -// 01 Spoke, and received the quest scam. -// 02 Done quest scam. -// 10 Introduction of the box and Nard. This is displayed when the player never spoke to Nard or his box. -// 11 Nard spoke and gave access to the outdoor of the ship. -// 12 Completed the quest. -// 13 Opened the chest and finished the introduction. -// 20 Never talked with Gugli. -// 21 Gugli gives you the task. -// 22 Gave all of the box to Gugli. - -000-1,85,108,0 script Gugli NPC_GUGLI,{ - - if (getq(ShipQuests_Couwan) == 1) - { - speech S_LAST_NEXT, - l("Great to see you! What can I do for you today?"); - goto L_Menu; - } - - if (getq(General_Narrator) > 0) - { - sailortalk; - } - -OnTalk: - mesn; - .@nard = getq(ShipQuests_Nard); - .@gugli = getq(ShipQuests_Gugli); - .@gado = getq(ShipQuests_ChefGado); - - if (.@nard > 3) goto L_AllComplete; - if (.@nard > 1 || .@gugli == 2) goto L_TaskCompleted; - if (.@gugli == 1) goto L_TaskGiven; - - mesq l("Hi @@, I heard the captain sent you down here, uh?", strcharinfo(0)); - next; - mesq l("What an unexpected pleasure, your help is always welcome!"); - next; - mesq l("As you may know, we are explorers on a long distance voyage, and our swashbuckling mariners need to store enough food to survive. You don't know how dangerous the sea life can be."); - next; - - select - l("Actually, I have an in-depth knowledge of this type of life."); - - mes ""; - mesn; - mesq l("Well, even though you have been rescued by us, it doesn't make you an expert sailor, am I right?"); - next; - mesq l("But let's talk about this island. We're docking here to find some fine quality goods."); - next; - mesq l("We usually dock around these small isles because they provide us some of the best food of all the archipelago."); - next; - mesq l("At the moment, our crew is busy collecting @@s, @@s and @@s.", getitemlink(Croconut), getitemlink(Plushroom), getitemlink(Aquada)); - next; - - select - l("So, what can I do for you?"); - - mes ""; - mesn; - mesq l("Right! Ours is an earthsea realm. You see, sailors are swift at their tasks when out of sight of land, but docked by this verdant jewel, they have it so good, they are just taking too much time bringing all the food back to the ship. Maybe you can help them."); - next; - mesq l("The captain wants:"); - mesq l("- 2 @@es", getitemlink(AquadaBox)); - mesq l("- 2 @@es", getitemlink(CroconutBox)); - mesq l("- 2 @@es", getitemlink(PlushroomBox)); - next; - mesq l("Ask sailors around here they shouldn't be so far away."); - next; - - setq ShipQuests_Gugli, 1; - close; - -L_TaskGiven: - mesq l("Great to see you! What can I do for you today?"); - next; - - if (getq(ShipQuests_Ale) == 1 && getq(ShipQuests_Astapolos) == 1 && getq(ShipQuests_Gulukan) == 1 && getq(ShipQuests_Jalad) == 1 && getq(ShipQuests_QMuller) == 1 && getq(ShipQuests_Tibbo) == 1) goto L_MenuDone; - -L_Menu: - menu - rif(getq(ShipQuests_Couwan) == 1, l("Couwan gave me this box, it is for you.")), L_Couwan, - rif(countitem(AquadaBox) > 0 || countitem(CroconutBox) > 0 || countitem(PlushroomBox) > 0, l("I have some food for you.")), L_CollectSmthing, - rif(getq(ShipQuests_Gugli) < 2, l("Who should I search for?")), L_SailorNames, - rif(getq(ShipQuests_Gugli) < 2, l("Where can I find your crew?")), L_Location, - l("Bye!"), L_Quit; - -L_MenuDone: - menu - rif(getq(ShipQuests_Couwan) == 1, l("Couwan gave me this box, it is for you.")), L_Couwan, - l("I have collected all the boxes you needed."), L_TaskDone, - l("See you!"), L_Quit; - -L_SailorNames: - mes ""; - mesn; - mesq l("Ale and Tibbo should bring 2 boxes of @@s, Astapolos and Gulukan 2 of @@s and Jalad and Q'Muller were charged of the boxes of @@s.", getitemlink(Aquada), getitemlink(Croconut), getitemlink(Plushroom)); - next; - mesq l("Do you need any other information?"); - next; - - goto L_Menu; - -L_CollectSmthing: - mes ""; - mesn; - mesq l("Good job!"); - next; - - delitem AquadaBox, countitem(AquadaBox); - delitem CroconutBox, countitem(CroconutBox); - delitem PlushroomBox, countitem(PlushroomBox); - - mesq l("You still need to give me boxes from: "); - if (getq(ShipQuests_Astapolos) == 0) mesq l("- Astapolos"); - if (getq(ShipQuests_Ale) == 0) mesq l("- Ale"); - if (getq(ShipQuests_Gulukan) == 0) mesq l("- Gulukan"); - if (getq(ShipQuests_Jalad) == 0) mesq l("- Jalad"); - if (getq(ShipQuests_QMuller) == 0) mesq l("- Q'Muller"); - if (getq(ShipQuests_Tibbo) == 0) mesq l("- Tibbo"); - - close; - -L_Couwan: - mes ""; - mesn; - mesq l("What?! This tritan is the worse shirker I ever met!"); - next; - mesq l("Well, thanks for the box. But... He was supposed to bring it back to me himself. I never asked him to give it to you!"); - next; - mesq l("Take these coins in exchange and be careful."); - next; - mesq l("Not everybody has a kind mind. Scammers can be anywhere, even among us!"); - next; - mesq l("May this be a lesson for you."); - - if (countitem(FishBox) > 0) delitem FishBox, 1; - setq ShipQuests_Couwan, 2; - Zeny += 10; - getexp 40, 0; - message strcharinfo(0), l("You receive @@ E!", 10); - - close; - -L_Location: - mes ""; - mesn; - mesq l("There are 6 sailors who will need your help. They are all around the island."); - next; - mesq l("I can't really help you find them since I've been checking the... Hmm... Landscape, since morning..."); - next; - mesq l("You can try talking with some other sailors to get some information about that."); - next; - - .@r = rand(3000)/1000; - if (.@r == 1) goto L_Silvio; - if (.@r == 2) goto L_Lean; - - setcamnpc "Sapartan"; - mesq l("Maxe and Sapartan for example?"); - next; - - restorecam; - close; - -L_Silvio: - setcamnpc "Silvio"; - mesq l("Silvio for example?"); - next; - - restorecam; - close; - -L_Lean: - setcamnpc "Lean"; - mesq l("Lean for example?"); - next; - - restorecam; - close; - -L_TaskDone: - if (countitem(AquadaBox) == 2) delitem AquadaBox, 2; - if (countitem(CroconutBox) == 2) delitem CroconutBox, 2; - if (countitem(PlushroomBox) == 2) delitem PlushroomBox, 2; - if (countitem(AquadaBox) == 1) delitem AquadaBox, 1; - if (countitem(CroconutBox) == 1) delitem CroconutBox, 1; - if (countitem(PlushroomBox) == 1) delitem PlushroomBox, 1; - setq ShipQuests_Gugli, 2; - - Zeny += 250; - getexp 50, 0; - - mes ""; - mesn; - mesq l("Well done! The ship is now ready to sail again!"); - next; - mesq l("You should inform Nard of the progress made in loading food and supplies on to the boat. He will be pleased to hear that good news!"); - - close; - -L_TaskCompleted: - mesq l("You are now part of the crew... At least for us down here!"); - next; - mesq l("You should inform Nard of the progress made in loading food and supplies on to the boat. He will be pleased to hear that good news!"); - next; - mesq l("Tell him that everything went fine and that we're almost done with the requisitions."); - next; - - goto L_Menu; - -L_AllComplete: - mesq l("Elmo told me what Nard said, congrats!"); - next; - mesq l("You're one of us now, that's great! I was sure that you were a good person the first time I saw you!"); - next; - - goto L_Menu; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} - -000-1,83,107,0 script GugliBarrierCheck NPC_HIDDEN,2,0,{ - .@gugli = getq(ShipQuests_Gugli); - if (.@gugli > 0) close; - doevent "Gugli::OnTalk"; - close; -} diff --git a/npc/000-1/gulukan.txt b/npc/000-1/gulukan.txt deleted file mode 100644 index 0d80c932..00000000 --- a/npc/000-1/gulukan.txt +++ /dev/null @@ -1,169 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Sailor part of the Gugli's quest. -// Croconut box. - -000-1,54,90,0 script Gulukan NPC_TRITAN_MAN_SAILOR2,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_Gulukan); - if (.@q == 1) goto L_Func; - - mesn; - mesq l("Yeye @@!", strcharinfo(0)); - next; - mesq l("How are you feeling, now that you walk on steady land? Yeye better?"); - next; - - menu - l("Wow, it seems everyone knows my name!"), -, - l("Well, it's not bad to finally feel something beneath my feet."), L_Continue, - l("Not so good actually... I would feel better on Nard's ship."), L_Quit; - -L_Name: - mes ""; - mesn; - mesq l("You know, yeyes love to chat while working."); - next; - -goto L_Continue2; - -L_Continue: - mes ""; - mesn; - -L_Continue2: - mesq l("Are you yaying here to explore the island?"); - next; - - menu - l("Actually Gugli asked me if I would help you bring him some of your boxes."), -, - l("Yes, indeed. I prefer to explore places I have never been to, before doing anything else."), L_Quit; - - mes ""; - mesn; - mesq l("Gugli? Oh I see. Yes, Gugli yeye pretty used to shout orders to everybody down here."); - next; - mesq l("Anyway I am glad I can give you some of these yoyoxs."); - next; - - inventoryplace CroconutBox, 1; - - setq ShipQuests_Gulukan, 1; - getitem CroconutBox, 1; - - mes ""; - mesn; - mesq l("Thank you my friend."); - - close; - -L_Func: - mesn; - - .@q = rand(0, 400) / 100; - if (.@q == 0) goto L_RandomA; - if (.@q == 1) goto L_RandomB; - if (.@q > 1) goto L_RandomC; - -L_RandomA: - mesq l("Hey."); - next; - mesq l("What did Gugli yayaid about the box? Was it ok?"); - next; - - menu - l("It's ok."), L_Fine, - l("He needs more food."), -; - - mes ""; - mesn; - mesq l("Yeye sure? I'll yaye some more food in the next box then."); - - close; - -L_Fine: - mes ""; - mesn; - mesq l("Alright! Yoyone more box and it'll be good."); - - close; - -L_RandomB: - mesq l("Thanks for the help!"); - next; - mesq l("These yeye boxes are way too heavy to be carried alone onto the ship."); - - close; - -L_RandomC: - mesq l("I think that yeye's soon be done. Yeye'll soon have a full box of @@s!", getitemlink(CrocClaw)); - next; - mesq l("And you? How's it yaying on your side?"); - next; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_Gulukan) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_QMuller) == 0 || getq(ShipQuests_Tibbo) == 0), l("I'm still busy, I need to find the other sailors.")), -; - - mes ""; - mesn; - mesq l("Who are yeye looking for?"); - next; - - menu - rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Top, - rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Top, - rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Top, - rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Top, - rif(getq(ShipQuests_Tibbo) == 0, l("Tibbo.")), L_Bottom, - l("Nobody."), L_Quit; - -L_Bottom: - mes ""; - mesn; - mesq l("Yeye seen this yoiis at the bottom of the island, check around."); - - close; - -L_Top: - mes ""; - mesn; - mesq l("Yeye seen this yoiis at the top of the island."); - next; - mesq l("You yoiis should walk to the north."); - - close; - -L_NoTask: - mes ""; - mesn; - mesq l("*Uff*... And another box of @@s for our starving colleagues is ready.", getitemlink(Croconut)); - - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("That's perfect, yoiis."); - - close; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/jalad.txt b/npc/000-1/jalad.txt deleted file mode 100644 index 43ba1f6e..00000000 --- a/npc/000-1/jalad.txt +++ /dev/null @@ -1,130 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Sailor part of the Gugli quest. -// Plushroom box. - -000-1,46,35,0 script Jalad NPC_ELVEN_MAN_TRADER_SITTING,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_Jalad); - if (.@q == 1) goto L_CallFunc; - - mesn; - mesq l("*Uff*, *Argh*, why don't you give me some help?"); - next; - mesq l("I'm not suited for this kind of work!"); - next; - - menu - l("I was going to ask you if you would need any help."), L_Continue, - l("What exactly is your real job?"), -; - - mes ""; - mesn; - mesq l("I'm the cook's assistant of the ship. I help Gado, La Johanne's Chef, in his daily work."); - next; - mesq l("You should go see him. He is one of the most experienced sailors we have."); - next; - - select - l("I will surely visit him. Do you need any help with your boxes?"); - -L_Continue: - mes ""; - mesn; - mesq l("Surely. Take this box full of @@s.", getitemlink(Plushroom)); - next; - - inventoryplace PlushroomBox, 1; - - setq ShipQuests_Jalad, 1; - getitem PlushroomBox, 1; - - mes ""; - mesn; - mesq l("They are so tasty when cooked with some @@. Don't drop any of them!", getitemlink(PiouLegs)); - - goto L_Close; - -L_CallFunc: - sailorfood; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_Jalad) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_QMuller) == 0 || getq(ShipQuests_Tibbo) == 0), l("I'm still busy, I need to find the other sailors.")), -, - l("What's that?"), L_Plushroom; - - mes ""; - mesn; - mesq l("Who are you looking for?"); - next; - - menu - rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Ale, - rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Bottom, - rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Bottom, - rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Bottom, - rif(getq(ShipQuests_Tibbo) == 0, l("Tibbo.")), L_Bottom, - l("Nobody."), -; - - closeclientdialog; - close; - -L_Bottom: - mes ""; - mesn; - mesq l("I've seen him at the bottom of the island, have a look around."); - - close; - -L_Ale: - setcamnpc "Ale"; - - next; - mesn; - mesq l("Look, there he is!"); - next; - - restorecam; - close; - -L_Plushroom: - mes ""; - mesn; - mesq l("'That', as you call it, is a @@. There are plenty on this island!", getitemlink(Plushroom)); - next; - mesq l("It's a kind of mushroom. We call it like that because of it's taste, just like a marshmallow. It also has this name because of it's appearance. It looks like a plush!"); - next; - mesq l("There are some groups of these @@s all around this island. Just pick some and have a try.", getitemlink(Plushroom)); - - close; - -L_NoTask: - mes ""; - mesn; - mesq l("Sometimes, I wish someone would be sent here to help us."); - - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("Perfect!"); - -L_Close: - goodbye; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/lean.txt b/npc/000-1/lean.txt deleted file mode 100644 index 0cd3a1dd..00000000 --- a/npc/000-1/lean.txt +++ /dev/null @@ -1,73 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Sailor who gives some informations to the player. - -000-1,79,108,0 script Lean NPC_ELVEN_MAN_BLONDE,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@gugli = getq(ShipQuests_Gugli); - - mesn; - mesq l("Hi! I can finally see you under the sunlight!"); - next; - mesq l("I hope you don't mind that we used your raft to build this ramp."); - next; - mesq l("We usually don't stop in such splendid places, but the captain let us stay here while he writes down the location of this new island on his map!"); - next; - mesq l("Some of the crew are looking for goods we can trade with at our next destination."); - next; - - menu - rif(.@gugli == 1, l("Well, I was in fact looking for them. Where are they now?")), L_Sailors, - l("Wait... Where are we going?"), L_Artis; - -L_Artis: - mes ""; - mesn; - mesq l("Artis of course!"); - next; - mesq l("It's where every merchant ship end their road and we won't be an exception."); - next; - mesq l("If you're looking for us there, most of us will be at the tavern of the Red Plush, at the bar counter, for Silvio's case..."); - - goto L_Close; - -L_Sailors: - mes ""; - mesn; - mesq l("They are all around the island."); - next; - mesq l("I'm sure Tibbo is alone in the south-west corner of the island. He believes it's the best place to collect @@s.", getitemlink(Aquada)); - next; - mesq l("While Jalad and Ale like to work together, as they usually do on the ship, last time I've seen them, they were near the big lake, north from here."); - next; - mesq l("They shouldn't be too far from each other."); - next; - - menu - l("Thank you for your help."), L_Close, - l("Gugli mentioned six sailors. What about the others?"), -; - - mes ""; - mesn; - mesq l("I'm not sure. They probably left the ship early this morning. I was not awake yet."); - next; - mesq l("You should ask Maxe. He's an early riser."); - - close; - -L_Close: - goodbye; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/mapflags.txt b/npc/000-1/mapflags.txt deleted file mode 100644 index 708dd2ab..00000000 --- a/npc/000-1/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-1 mapflag town diff --git a/npc/000-1/maxe.txt b/npc/000-1/maxe.txt deleted file mode 100644 index f628c8c0..00000000 --- a/npc/000-1/maxe.txt +++ /dev/null @@ -1,111 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Friend of Sapartan, he gives some information on how to find Gulukan, Astapolos and Q-Muller. - -000-1,72,110,0 script Maxe NPC_DEMON_MAN_SITTING_UNDER_TREE,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@gugli = getq(ShipQuests_Gugli); - .@knife = getq(ShipQuests_Knife); - - mesn; - mesq l("We are glad captain Nard has let you join us down here!"); - next; - mesq l("Living inside a ship is great, but we sometimes need some fresh air."); - next; - mesq l("Anyway, can I help you in any way?"); - next; - - menu - rif(.@gugli == 0, l("Well, is there anything I can do here to help?")), L_Help, - rif(.@gugli == 1, l("Gugli asked me to help the sailors to gather food. Do you know where I can find them?")), L_Sailors, - rif(.@gugli > 1, l("Seems I've helped everyone here. I don't know what to do now!")), L_Annoyed, - rif(.@knife == 0, l("It looks like you are an expert of the life inside 'La Johanne'. Do you know any hidden secrets nobody knows?")), L_Secrets, - l("No thanks, not at the moment."), L_Quit; - -L_Help: - mes ""; - mesn; - mesq l("You could start by talking to Gugli. He always has tasks for people willing to help!"); - - close; - -L_Sailors: - mes ""; - mesn; - mesq l("I remember I saw a few of them leaving the ship early this morning to get a head start on today's work."); - next; - mesq l("I recall seeing Gulukan, Astapolos and Q'Muller."); - next; - - goto L_MenuSailors; - -L_MenuSailors: - menu - l("Do you know where can I find Gulukan?"), L_Gulukan, - l("Any clue on where Astapolos may be hidden?"), L_Astapolos, - l("What about Q'Muller? Where is he?"), L_Qmuller, - l("Alright. I will go looking for them now."), L_Quit; - -L_Gulukan: - mes ""; - mesn; - mesq l("Oh, he is not far away from here. Just take the road through the crocojungle north from here."); - next; - mesq l("You will find a wooden sign near a crossroad. He is a few steps on the left."); - next; - - goto L_MenuSailors; - -L_Astapolos: - mes ""; - mesn; - mesq l("Astapolos... That guy is shy like a piou!"); - next; - mesq l("He likes to hide near the little lake in the north-west side of the island."); - next; - - goto L_MenuSailors; - -L_Qmuller: - mes ""; - mesn; - mesq l("You need to cross the crocojungle heading north."); - next; - mesq l("You can spot Q'Muller on a cliff off toward the west, busy collecting @@s.", getitemlink(Plushroom)); - next; - - goto L_MenuSailors; - -L_Annoyed: - mes ""; - mesn; - mesq l("There is always something you can do here, like killing some tortugas or helping Peter clean the ship from rattos."); - - close; - -L_Secrets: - mes ""; - mesn; - mesq l("Nope, there are no secrets hidden within the ship's hull. Some sailors swear they have seen stowaways hidden somewhere. The bow or the stern? Just stories sailors love to tell..."); - next; - mesq l("Oh! And in one of the rooms of the second deck you can find Gado's knives. Our chef keeps there the sharpest ones... Probably not just to cut some carrots..."); - next; - mesq l("Go and grab one of them. A good knife will help with your hunting the creatures of this island."); - - close; - -OnInit: - .distance = 2; - end; - -L_Quit: - goodbye; -} diff --git a/npc/000-1/muller.txt b/npc/000-1/muller.txt deleted file mode 100644 index 0d13ff0d..00000000 --- a/npc/000-1/muller.txt +++ /dev/null @@ -1,131 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Reid -// Description: -// Sailor part of the Gugli's quest. -// Plushroom box. - -000-1,35,69,0 script Q'Muller NPC_ORC_MAN,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_QMuller); - if (.@q == 1) goto L_CallFunc; - - mesn; - mesq l("Can't you see I'm working?!"); - next; - - select - l("Well I'm working too! Don't you want me to carry one of these boxes back to Gugli?"); - - mes ""; - mesn; - mesq l("Oh I see... Sailors are not able to do their job anymore, is it like that?!"); - next; - - menu - l("Indeed! Goodbye."), L_Quit, - l("Yes, it is true! You are not able at all. Nard has been waiting for the food for too long already. Hurry up, you lazy sailors!"), -; - - mes ""; - mesn; - mesq l("Are you blind? Do you really think these boxes are light and soft as a piou's feather?!"); - next; - - select - l("I am sure that I can run with one of them on my shoulder."); - - mes ""; - mesn; - mesq l("Well then... Take this one!"); - next; - - inventoryplace PlushroomBox, 1; - - setq ShipQuests_QMuller, 1; - getitem PlushroomBox, 1; - - mes ""; - mesn; - mesq l("And now I want to see you run!"); - - close; - -L_CallFunc: - sailorfood; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_QMuller) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_Tibbo) == 0), l("I'm still busy, I need to find the other sailors.")), -, - l("What's that?"), L_Plushroom; - - mes ""; - mesn; - mesq l("Who are you looking for?"); - next; - - menu - rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Top, - rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Top, - rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Top, - rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Bottom, - rif(getq(ShipQuests_Tibbo) == 0, l("Tibbo.")), L_Bottom, - l("Nobody."), L_Quit; - -L_Bottom: - mes ""; - mesn; - mesq l("I've seen him at the bottom of the island, check around."); - - close; - -L_Top: - mes ""; - mesn; - mesq l("I've seen him at the top of the island."); - next; - mesq l("You should walk to the north."); - - close; - -L_Plushroom: - mes ""; - mesn; - mesq l("'That', as you call it, is a @@. There are plenty on this island!", getitemlink(Plushroom)); - next; - mesq l("It's a kind of mushroom. We call it like that because of it's taste, just like a marshmallow. It also has this name because of it's appearance, it looks like a plush!"); - next; - mesq l("There are few groups of these @@s all around this island. Just pick some and have a try.", getitemlink(Plushroom)); - - close; - -L_NoTask: - mes ""; - mesn; - mesq l("You see? I'm working here!"); - - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("Good to hear!"); - next; - - goodbye; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/panels.txt b/npc/000-1/panels.txt deleted file mode 100644 index 93f25beb..00000000 --- a/npc/000-1/panels.txt +++ /dev/null @@ -1,54 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Qwerty Dragon -// Description: -// Panels to give advice to the players. - -000-1,65,93,0 script #panel1 NPC_NO_SPRITE,{ - mesn "Narrator"; - mesc(l("Your heart quickens as your gaze focuses upon a small wooden panel, partly obscured under a layer of wind-blown sand."), 9); - next; - mesc(l("You wipe off enough of the sand to manage to read the message written on this crude piece of wood."), 9); - next; - mesq l("It's a dangerous place out here. Beware of the mischievous creatures living here!"); - next; - mesq l("Not content to stay buried in their burrows in the sand, Crocs can be quite a nuisance, infesting this whole island. Tender Feet and Newbies are advised: Avoid touching these crawling red devils. They have huge, deadly claws that can make mincemeat of you! You can recognize them easily by their crabby personalities. Be careful younglings."); - next; - mesq l("Furthermore, unless you are planning to stick it out, you should also not even think about gaining experience by messing with those icky pink land jellies. The pink could stick on you, imagine the horror!"); - next; - mesq l("In fact... Oh, the things that I could tell... But ran out of space on this... Just be reasonable and go home."); - close; - -OnInit: - .distance = 2; - end; -} - -000-1,89,51,0 script #panel2 NPC_NO_SPRITE,{ - mesn "Narrator"; - mesc(l("This panel looks in rather good shape, as though some people take care of it regularly. Maybe it has important information."), 9); - next; - mesc(l("You can read some lines that are nicely carved into the soft wooden planks."), 9); - next; - mesq l("The further you go, the more experience you will get, so here's a small description of all the stats you can upgrade with time. But note that these will probably change in the future and have more complex effects."); - next; - mesq l("Strength multiplies the damage of your hits, especially melee ones. You will also be able to carry heavier stuff."); - next; - mesq l("Agility greatly increases your attack speed and the chances of you dodging enemy hits."); - next; - mesq l("Vitality raises your maximum health points and defense."); - next; - mesq l("Intelligence raises your maximum mana points (good for mages) and your mind abilities. Please note: Magic system has not yet been implemented in this world."); - next; - mesq l("Dexterity increases your bow damage and your accuracy."); - next; - mesq l("Luck helps you do critical hits and dodge the ones dealt by enemies."); - next; - mesq l("Have fun, but always remember to pick your stats with good care."); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/sapartan.txt b/npc/000-1/sapartan.txt deleted file mode 100644 index 5e33a086..00000000 --- a/npc/000-1/sapartan.txt +++ /dev/null @@ -1,101 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Description: -// Friend of Maxe, he gives some information on combat system. - -000-1,74,111,0 script Sapartan NPC_SAPARTAN,{ - mesn; - mesq l("Hey Maxe, it's @@!", strcharinfo(0)); - next; - - setcamnpc "Maxe"; - mesn "Maxe"; - mesq l("@@? Welcome my dear!", strcharinfo(0)); - next; - mesq l("Last time I saw you, you were lost at sea on your raft."); - next; - restorecam; - - mesn; - mesq l("True but now all seems pretty fine! Am I right?"); - next; - - menu - l("Thank you, sir, for your kind words. I am feeling better now."), -, - l("I'm still a bit weak at the moment. We should probably talk later."), L_Quit; - - mes ""; - mesn; - mesq l("You can now stay with your new friends and enjoy the warm sand of this little island."); - next; - mesq l("But remember that not every place in this world is peaceful and safe nowadays. Even the white shores you are walking on can hide some dangerous beings."); - next; - - select - l("What danger?! Where?!"); - - setcamnpc "Maxe"; - mes ""; - mesn "Maxe"; - mesq l("Come on, Sap! Do not always scare others with your horror stories."); - next; - mesq l("I'm sure this brave fellow will soon be able to fight all of the creatures living here without any problem."); - next; - - restorecam; - - mes ""; - mesn; - mesq l("Maybe... But I prefer having well-trained people around me when it comes to fighting against dangerous creatures. Do you already feel adept fighting enemies?"); - next; - - menu - l("No, I don't, but I would like to know more about that."), -, - l("Well... I've only killed some little pious in the ship, that's all."), -, - l("Yes, I feel strong enough for dangerous combats!"), L_Quit; - - mes ""; - mesn; - mesq l("Then I can give you some tips about fighting."); - next; - mesq l("The first thing you should do is to evaluate your enemy."); - next; - mesq l("You can easily see if a monster is easy to kill or just impossible to defeat. Do not try against creatures that are way more powerful than you... You'd be risking your life for nothing."); - next; - mesq l("Secondly, choose wisely which weapon is suited for you. Some people like to face their enemies closely with a heavy axe, others prefer to attack from a distance with a bow for example."); - next; - - select - l("Yeah, well what's the difference?"); - - mes ""; - mesn; - mesq l("On one hand, ranged weapons are generally weaker than melee ones, but you attack from a safer position. On the other hand, depending on the level of the weapon, melee ones potentially can yeild quicker kills."); - next; - mesq l("After choosing your weapon, you also need to know how to use it."); - next; - mesq l("You can attack a monster by clicking directly on it. Once selected, you may notice a bar near your target showing you how much health it has left."); - next; - mesq l("You can also attack an enemy from your keyboard pressing the 'A' key to select it, and the 'Ctrl' key to attack it, this of course works if you didn't change your keyboard keys yet."); - next; - - menu - l("Thank you for your tricks. I am going to try them now!"), -, - l("I already know everything. Bye."), L_Quit; - - mes ""; - mesn; - mesq l("You're welcome. If you can't remember something, just come back here!"); - next; - - goodbye; - -OnInit: - .distance = 2; - end; - -L_Quit: - goodbye; -} diff --git a/npc/000-1/shop.txt b/npc/000-1/shop.txt deleted file mode 100644 index be588e99..00000000 --- a/npc/000-1/shop.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Fexil's shop bag. - -000-1,84,98,0 trader Bag#000-1 NPC_SHOP_BAG,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem PiouLegs, -1, 15; - sellitem Bread, -1, 15; - sellitem Croconut, -1, 50; - sellitem Aquada, -1, 50; - sellitem Armbands, -1, 20; - sellitem LousyMoccasins, -1, 20; - sellitem PiouSlayer, -1, 15; - - .distance = 3; - end; - -OnClock0000: - restoreshopitem PiouLegs, 15; - restoreshopitem Bread, 15; - restoreshopitem Croconut, 50; - restoreshopitem Aquada, 50; - restoreshopitem Armbands, 20; - restoreshopitem LousyMoccasins, 20; - restoreshopitem PiouSlayer, 15; -} diff --git a/npc/000-1/silvio.txt b/npc/000-1/silvio.txt deleted file mode 100644 index ec5669d3..00000000 --- a/npc/000-1/silvio.txt +++ /dev/null @@ -1,185 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Perverted and arrogant sailor. - -000-1,86,99,0 script Silvio NPC_SILVIO,{ - mesn; - mesq l("Hey!"); - next; - mesq l("How are you doing?"); - next; - - menu - l("Hello... Do I know you?"), -, - rif(getq(ShipQuests_Gugli) > 0 && getq(General_Narrator) == 0, l("Fine, could you please tell me where I can find Gugli's sailors?")), L_Sailors, - l("Uhm, bye."), L_Quit; - - mes ""; - mesn; - mesq l("Hehe, no. But I'm sure somebody like you would love to meet somebody like me! Women want me, men want to be like me!"); - next; - mesq l("So, what good wind brought you here? Were you on your raft to meet me or Julia? Or is it because you've heard of my feats in Artis?"); - next; - - menu - l("You're right, it's about you."), L_Julia, - l("What is Artis?"), L_Artis, - l("None of them?"), -; - - mes ""; - mesn; - mesq l("You know that I was not always a sailor, right? I was once a very important Person!"); - next; - mesq l("Before..."); - next; - - setcamnpc "Gugli"; - mes ""; - mesn "Gugli"; - mesq l("Hey, don't worry about him, it's one of the first days in a long time that we can just chill out."); - next; - mesq l("Maybe he over did it with the bottle today to celebrate that!"); - next; - restorecam; - - menu - l("He's funny, it's not a problem."), -, - l("Ok, I will leave him alone."), L_ForeverAlone; - - setcamnpc "Gugli"; - mes ""; - mesn "Gugli"; - mesq l("Oh alright, nevermind then."); - next; - restorecam; - - mesn; - mesq l("Ah... Gugli... He's too young to understand our conversation."); - next; - mesq l("So, what was I saying?"); - next; - - menu - l("You told me that you 'were' important."), L_VeryImportantNoob, - l("You mentioned the quality of your wine."), -; - - mes ""; - mesn; - mesq l("Oh really? How could I forget something as important as that?!"); - next; - mesq l("I think that my wine is of great quality! I'm on my second bottle and I already... What were we talking about again?"); - - close; - -L_VeryImportantNoob: - mes ""; - mesn; - mesq l("It's true!"); - next; - mesq l("But I can't tell you anything about it, I'm sorry.") ; - next; - - setcamnpc "Gugli"; - mes ""; - mesn "Gugli"; - mesq l("Hey Silvio, it's your turn to carry the package, go!"); - next; - restorecam; - - mesn; - mesq l("Duty calls me, *hic*, see you later."); - - close; - -L_Julia: - mes ""; - mesn; - mesq l("Not to kill your dreams, but i fear me and Julia are romantically entangled and there is no room for a third person ... on the other hand *smirks frivolous*"); - next; - mesq l("She said she will accept me when pious will have teeth. It's just a matter of time, you see?"); - next; - - menu - l("I see. Bye!"), L_Quit, - l("Oh look, there's a piou behind you!"), L_Piou; - -L_Piou: - mes ""; - mesn; - mesq l("Seriously?!"); - next; - mesq l("Hurry, hurry! We need to check its teeth!"); - - close; - -L_Artis: - mes ""; - mesn; - mesq l("Artis is a very nice place. There are some hot chicks..."); - next; - mesq l("The Raijin from the library flirted with me a while ago, so has Enora from the Legion."); - next; - mesq l("Oh, and Olga from the marketplace as well!"); - next; - mesq l("You should look for them when we arrive at the port. You won't regret it! Ehehe..."); - - goodbye; - -L_ForeverAlone: - mes ""; - mesn "Narrator"; - mesc(l("Silvio starts to speak to his bottle, you leave, letting him have a private conversation."), 9); - - close; - -L_Sailors: - mes ""; - mesn; - mesq l("What? Why? They aren't more attractive than me, why do you want to see them?"); - next; - mesq l("And what would you give me in exchange for that information?"); - next; - - setcamnpc "Gugli"; - mes ""; - mesn "Gugli"; - mesq l("Stop heckling, Silvio, or I'll tell about how you always cry like a little baby during thunderstorms."); - next; - restorecam; - - mesn; - mesq l("I..."); - next; - mesq l("How could you... We said we wouldn't talk about that again!"); - next; - mesq l("Tibbo went to the south-east of the island, others are gone to the north, and I think that Gulukan is not so far from here."); - next; - mesq l("But anyway, take the road which goes to the north to find everybody."); - next; - mesq l("Now, leave me alone..."); - next; - - menu - l("See you."), L_Quit, - l("*Imitate a thunder's sound.*"), -; - - closeclientdialog; - - npctalk3 l("Aaaaaahhhhhh!"); - - close; - -L_Quit: - closeclientdialog; - - npctalk3 l("Give me a kiss before you say goodbye!"); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/tarlan.txt b/npc/000-1/tarlan.txt deleted file mode 100644 index fad4be2a..00000000 --- a/npc/000-1/tarlan.txt +++ /dev/null @@ -1,64 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Sailor hitting a crocotree, then being struck by a falling croconut. - -000-1,33,37,0 script Tarlan NPC_TARLAN,{ - .dir = 2; - - mesn; - .@a = rand(4); - if (.@a == 0) goto L_HardToHit; - if (.@a == 1) goto L_Aouch; - if (.@a == 2) goto L_DoYou; - - mesq l("Hey you!"); - next; - mesq l("What are you looking for?"); - next; - - menu - l("Some food."), L_Food, - l("Nothing, just hanging around."), -; - - closeclientdialog; - npctalk3 l("Ok, see you then!"); - goto L_Quit; - -L_Food: - mes " "; - mesn; - mesq l("You can yaye some @@s by hitting these crocotrees.", getitemlink(Croconut)); - next; - mesq l("Yeye be careful with wild animal's food, some of them are yeyery dangerous, especially the crocs."); - - goto L_Quit; - -L_HardToHit: - mesq l("These crocotrees are full of yaying @@s, but they are so hard to hit...", getitemlink(Croconut)); - - goto L_Quit; - -L_Aouch: - mesq l("Ayouyouch! My head..."); - next; - mesq l("Damn @@.", getitemlink(Croconut)); - - goto L_Quit; - -L_DoYou: - mesq l("Do you want to try?"); - next; - mesq l("Just hit the trunk, and it will yeye a @@.", getitemlink(Croconut)); - - goto L_Quit; - -L_Quit: - .dir = 4; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-1/tibbo.txt b/npc/000-1/tibbo.txt deleted file mode 100644 index 89c82f11..00000000 --- a/npc/000-1/tibbo.txt +++ /dev/null @@ -1,122 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// Sailor part of the Gugli's quest. -// Aquada box. - -000-1,34,111,0 script Tibbo NPC_ELVEN_MAN_STANDING,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - .@g = getq(ShipQuests_Gugli); - if (.@g == 0) goto L_NoTask; - - .@q = getq(ShipQuests_Tibbo); - if (.@q == 1) goto L_CallFunc; - - mesn; - mesq l("Uh? Hi! I'm sorry, but I have no time for chatting."); - next; - - select - l("Fine... I was just going to give you some help..."); - - mes ""; - mesn; - mesq l("Hel... What?! Wait!"); - next; - mesq l("What kind of help?"); - next; - - select - l("Gugli asked me to help you carrying one of these boxes you are filling."); - - mes ""; - mesn; - mesq l("Then it seems I have to apologize."); - next; - mesq l("I am surprised someone has been sent here to help. It is quite... unusual."); - next; - mesq l("Bring this box to Gugli. He will be extremely happy!"); - next; - - inventoryplace AquadaBox, 1; - - setq ShipQuests_Tibbo, 1; - getitem AquadaBox, 1; - - mes ""; - mesn; - mesq l("Thank you and be careful with that box. I have worked really hard to fill it!"); - - goto L_Close; - -L_CallFunc: - sailorfood; - - menu - rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone, - rif(getq(ShipQuests_Tibbo) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_QMuller) == 0), l("I'm still busy, I need to find the other sailors.")), -, - l("What's that food?"), L_Aquada; - - mes ""; - mesn; - mesq l("Who are you looking for?"); - next; - - menu - rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Top, - rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Top, - rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Top, - rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Top, - rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Top, - l("Nobody."), -; - - goto L_Close; - -L_Top: - mes ""; - mesn; - mesq l("I've seen him at the top of the island."); - next; - mesq l("You should walk to the north to find him."); - - close; - -L_Aquada: - mes ""; - mesn; - mesq l("This is an @@, a light blue sea fruit. They're highly desired in the archipelago.", getitemlink(Aquada)); - next; - mesq l("You can find them in the ocean, near corals and other sea beings. But the sea is too heavy today, you shouldn't try swimming for now."); - next; - mesq l("Otherwise, if you really want one, and if you feel capable, you can try killing tortugas or crocs if you're strong enough. I'm sure they could drop one or two @@s.", getitemlink(Aquada)); - - close; - -L_NoTask: - mes ""; - mesn; - mesq l("I'm sorry but I have no time to chat with you."); - - close; - -L_TaskDone: - mes ""; - mesn; - mesq l("Awesome!"); - - close; - -L_Close: - goodbye; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-0/_import.txt b/npc/000-2-0/_import.txt deleted file mode 100644 index c0b9afb1..00000000 --- a/npc/000-2-0/_import.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Map 000-2-0: First Deck -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-2-0/_warps.txt", -"npc/000-2-0/billybons.txt", -"npc/000-2-0/doors.txt", -"npc/000-2-0/julia.txt", -"npc/000-2-0/mapflags.txt", -"npc/000-2-0/note.txt", diff --git a/npc/000-2-0/_warps.txt b/npc/000-2-0/_warps.txt deleted file mode 100644 index 5496ecae..00000000 --- a/npc/000-2-0/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-0: First Deck warps -000-2-0,31,25,0 warp #000-2-0_31_25 0,0,000-2-1,72,29 diff --git a/npc/000-2-0/billybons.txt b/npc/000-2-0/billybons.txt deleted file mode 100644 index cfdfd7af..00000000 --- a/npc/000-2-0/billybons.txt +++ /dev/null @@ -1,95 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Drunk easteregg telling about the player's past. - -000-2-0,20,23,0 script Billy Bons NPC_BILLY_BONS,{ - if (rand(5) == 2) goto L_Hic; - - mesn; - mesq l("You? Here?"); - mesq l("How is *hic* it possible?"); - next; - - mesn "Narrator"; - mesc(l("The sailor chugs his beer."), 9); - next; - - select - l("Excuse me? Do you know who I am?"); - - mes ""; - mesn; - mesq l("Don't do theee... *hic* with me eh!"); - next; - - menu - l("Are you ok?"), L_Quit, - l("Alright... Bye."), -; - - mes ""; - mesn; - mesq l("No and *hic*... No, you and you and your... *burp* stup*hic* guild!"); - next; - mesq l("You tried to get rid of me, eeh? But surprise! I'm still here... *hic* Or there..."); - next; - mesq l("But you won't *hic* me this time..."); - next; - - menu - l("What are you talking about? What guild?"), L_Quit, - l("You are full of wine, my friend..."), -, - l("You should go and get some sleep."), L_Quit; - - mes ""; - mesn; - mesq l("If I saw *hic* who you were... *hic* Would not have helped you! "); - next; - - menu - l("But who am I?"), -, - l("What am I supposed to say?"), L_Quit, - l("You should go and get some sleep."), L_Secret; - - mes ""; - mesn; - mesq l("The giant boogeyman!"); - - close; - -L_Secret: - mes ""; - mesn; - mesq l("Hear me *hic* well, what ever, whatididever you will *hic* said ab... uhm... out what?! You saw there, the Legion of Aemil won't let it get public."); - next; - mesq l("Nobody will know about the existence of the Mercurians."); - next; - mesq l("Nobody! *burp*"); - next; - - close; - -L_Hic: - npctalk3 l("*Hic*"); - - close; - -L_Quit: - mes ""; - mesn; - mesq l("Yeah you're all like *hic* that in Esperia, but you won't get me! *burp*"); - next; - mesq l("I'm not that numb eeh *hic* what did ever yous disco... ...vered there, the Legion of Aemil won't get me!"); - mesq l("*burp*"); - next; - - mesn "Narrator"; - mesc(l("The sailor turns his back to you."), 9); - - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/000-2-0/doors.txt b/npc/000-2-0/doors.txt deleted file mode 100644 index ee29340a..00000000 --- a/npc/000-2-0/doors.txt +++ /dev/null @@ -1,85 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Doors NPCs. -// The third value of the .@nard variable has been removed for the beta2, it'll then be re-added for the Aurora release. -// Variable: -// 0 ShipQUests_Nard -// 1 ShipQuests_Julia -// Values: -// Nard: -// 00 Introduction of the boxes and Nard. This is displayed when the player never spoke to Nard or his box. -// 01 Nard spoke and gave access to the outdoor of the ship. -// 02 Completed the Gugli quest. -// 03 ChefGado Quest accepted. -// 04 ChefGado Quest completed and "Introduction" chapter finalized. -// 05 Reward taken from the box. -// 10 Has not talked to Julia -// 11 Need to see Julia -// 12 Has been registered by Julia - -000-2-0,19,28,0 script AreaNPC#doors1 NPC_HIDDEN,0,0,{ - -OnTouch: - .@nard = getq(ShipQuests_Nard); - - if (getq(General_Narrator) > 0) - { - warp "000-1", 93, 100; - close; - } - - if (.@nard == 4) goto L_GotoNard; - if (.@nard == 5) goto L_End; - if (.@nard > 0 && countitem(718) > 0) goto L_Key; - - setcamnpc "Julia"; - mesn "Julia"; - mesq l("The captain has locked the door, you should go see him."); - next; - - mesn "Narrator"; - mesc(l("Captain Nard is in the room to your right."), 9); - next; - restorecam; - - close; - -L_Key: - warp "000-1", 93, 100; - close; - -L_GotoNard: - setcamnpc "Julia"; - mesn "Julia"; - mesq l("The captain is waiting for you! Hurry up."); - next; - restorecam; - - close; - -L_End: - mesn "Narrator"; - mesq col(l("This door is locked."), 9); - setcamnpc "Julia"; - next; - mesn "Julia"; - mesq l("We're soon leaving that island, please return to your cabine."); - next; - restorecam; - - close; -} - -000-2-0,33,28,0 script AreaNPC#doors2 NPC_HIDDEN,0,0,{ - -OnTouch: - .@julia = getq(ShipQuests_Julia); - if (.@julia == 2) goto L_Warp; - close; - -L_Warp: - warp "000-2-3", 20, 27; - close; -} diff --git a/npc/000-2-0/julia.txt b/npc/000-2-0/julia.txt deleted file mode 100644 index 4992f949..00000000 --- a/npc/000-2-0/julia.txt +++ /dev/null @@ -1,289 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Qwerty Dragon -// Vasily_Makarov -// Description: -// Allows to change language and talks about what happened to him. -// 2 Bits Array: -// ShipQuests -// Variables: -// 0 ShipQuests_Julia -// 1 ShipQuests_ChefGado -// 2 ShipQuests_Nard -// Values: -// Julia: -// 10 Default, no quest given. -// 01 Need to see Julia. -// 02 Has been registered by Julia. -// Gado: -// 10 Default, no quest given. -// 11 Quest accepted. -// 12 Ingredients collected, ready to poison Julia. -// 13 Julia poisoned. -// 14 Quest complete. Chef Gago wins. -// 15 Quest complete. Julia wins (poison dish returned). -// 16 Quest complete. Julia wins. -// Nard: -// 20 Introduction of the boxes and Nard. This is displayed when the player never spoke to Nard or his box. -// 21 Nard spoke and gave access to the outdoor of the ship. -// 22 Completed the Gugli quest. -// 23 ChefGado Quest accepted. -// 24 ChefGado Quest completed and "Introduction" chapter finalized. -// 25 Reward taken from the box. - -000-2-0,27,24,0 script Julia NPC_JULIA,2,10,{ - - function ynMenu { - if (select(l("Yes, I do."), l("No, none.")) == 1) { - return; - } - closeclientdialog; - } - - function poisonJulia { - mes ""; - mesn; - mesq l("Seems yummy! Let me taste it!"); - next; - mesq l("Hmmm, hm... *cough*, *cough*, *burp*, *cough*. What... What is that?!... *cough*, *burp*... Damn Gado... *cough*"); - if (countitem(PoisonedDish) > 0) delitem PoisonedDish, 1; - setq ShipQuests_ChefGado, 3; - close; - } - - function gotoSleep { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You already did enough for us, follow Nard's advice and get some rest."), - l("We are at half a day from our final destination, by the time that you wake up I'm sure that we will be there!"), - l("Do you have any other questions for me?"); - ynMenu; - return; - } - - function heardRumors { - mes ""; - mesn; - mesq l("You shouldn't believe every tale drunken sailors tell you."); - next; - - select - l("Let's say the person who told me about that is well respected on this ship and never drunk."); - - mes ""; - mesn; - mesq l("Hahaha! All sailors aboard this ship are always drunk... Well... Except... Wait, what?! Nard told you?!"); - next; - mesq l("Doesn't he like the way I'm taking care of his ship? Everything is clean and tidy with me, rightful lieutenant of La Johanne."); - next; - mesq l("I give tasks to every single sailor, all day long. That should make him happy!"); - next; - - select - l("Well... I don't think it is the best way to rule a ship. Think about it."), - l("In fact, everything seems to work perfectly under your guidance. Nard has made the right choice."); - - if (@menu == 1) - { - closeclientdialog; - end; - } - - mes ""; - mesn; - mesq l("I'm glad you're on my side."); - next; - mesq l("Take this money as a reward for your nice words."); - - setq ShipQuests_ChefGado, 6; - Zeny += 100; - message strcharinfo(0), l("You receive @@ E!", 100); - getexp 8, 0; - close; - } - - function gotRegrets { - mes ""; - mesn; - mesq l("Why? And who should you bring it back to?"); - next; - - select - l("Ehm... He was really upset because of some past stories."); - - mes ""; - mesn; - mesq l("Gado! That coward lives in the past, I will ask Nard to punish him, again!"); - next; - mesq l("Take this money for your wise choice. But do not try it again. The open sea has been merciful with you once... Do not further tempt the fates!"); - - setq ShipQuests_ChefGado, 5; - Zeny += 200; - message strcharinfo(0), l("You receive @@ E!", 200); - getexp 15, 0; - close; - } - - function basicSkill { - mes ""; - mesn; - mesq l("Let me check into it..."); - next; - adddefaultskills; - mesq l("Here you go, everything is fixed."); - emotion E_HAPPY; - next; - mesq l("Do you have any other questions for me?"); - next; - ynMenu; - return; - } - - function chooseLang { - mes ""; - mesn; - mesq l("Of course! Tell me which language you speak and I will change the note on the ship passenger list."); - next; - - asklanguage(LANG_IN_SHIP); - - mes ""; - mesn; - mesq l("Ok, done."); - - next; - mesq l("Do you have any other questions for me?"); - next; - ynMenu; - return; - } - - function whereAmI { - mes ""; - mesn; - mesq l("You're on a ship, we're on our way to the commercial capital of Artis."); - next; - mesq l("We should be there in a few days, once we arrive, I will warn the Legion of Aemil about what happened, I'm sure they can help."); - next; - mesq l("But for now, you can relax on the ship, or visit the island we're docked at! Its a small island, but a good place to get some exercise and stretch your legs."); - next; - mesq l("Do you have any other questions for me?"); - next; - ynMenu; - return; - } - - function whatHappened { - mes ""; - mesn; - mesq l("We thought that you could help us understand this, all we know is that we found you cast in the sea, adrift on your raft."); - next; - mesq l("You were in bad shape, you should be happy we found you before the sea killed you."); - next; - mesq l("Oh, and there was this inscription on your raft. It represents the Legion of Aemil, one of the four main guilds of Gasaron. Does that help you remember anything, anything at all?"); - next; - - select - l("Sorry, but I can't tell you anything about that."), - l("Nothing, sorry."); - - mes ""; - mesn; - mesq l("No problem, do you have any other questions for me?"); - next; - ynMenu; - return; - } - - function readRules { - mes ""; - mesn; - mesq l("Of course, they are on the left wall, go have a look at them."); - next; - mesq l("Do you have any other questions for me?"); - next; - ynMenu; - return; - } - - function mainMenu { - do - { - .@q2 = getq(ShipQuests_ChefGado); - .@q3 = getq(ShipQuests_Nard); - .@q4 = getq(General_Narrator); - - selectd - rif(.@q3 == 5 && .@q4 < 1, l("What can I do now?")), - rif(.@q3 == 3 && .@q2 == 0, l("I heard rumors about some old hostilities between you and Gado. Are they true?")), - rif(.@q2 == 2 && countitem(PoisonedDish), l("Well... No wait, I have something for you but you shouldn't eat it... I'm taking it back to the kitchen.")), - rif(.@q2 == 2 && countitem(PoisonedDish), l("I have brought you a tasty present for your delicate mouth.")), - rif(getskilllv(NV_BASIC) < 6, l("Something is wrong with me, I can't smile nor sit.")), - l("I made a mistake, I would like to change my language."), - l("Could you explain to me where I am?"), - l("What happened to me?"), - l("Can I read these rules again?"), - l("Nothing, sorry."); - - switch (@menu) - { - case 1: gotoSleep; break; - case 2: heardRumors; break; - case 3: gotRegrets; break; - case 4: poisonJulia; break; - case 5: basicSkill; break; - case 6: chooseLang .@s$; break; - case 7: whereAmI; break; - case 8: whatHappened; break; - case 9: readRules; break; - case 10: closeclientdialog; end; - } - } while (1); - } - - mesn; - mesq l("Hello dear!"); - next; - mesq l("What do you want today?"); - next; - - mainMenu; - -OnTouch: - .@q = getq(ShipQuests_Julia); - if (.@q > 1) end; - - checkclientversion; - - mesn; - mesq l("Hi, nice to see you!"); - next; - mesq l("My name is Julia, it is me who took care of you after we found you in the sea."); - next; - mesq l("I'm glad to see you're okay."); - next; - - mesq l("I'm sure that you've got some questions for me, feel free to ask them, but first I need to tell you the rules of proper social conduct on board."); - - narrator S_LAST_NEXT, - l("There is a paper with some rules written on it."); - - GameRules 8 | 4; - - mesn; - mesq l("Oh, and I almost forgot! Do not give the password of your room to anybody! I am the only one who has the other key and I won't ask for yours so keep it secret and try not to use the same password for any other room in the future."); - next; - mesq l("If you want to read this page again, there is a copy up on the left wall."); - next; - mesq l("You can also read The Book of Laws at any time to see the rules."); - setq ShipQuests_Julia, 2; - next; - mesq l("I think I'm done with that now. Do you have any questions?"); - next; - mainMenu; - end; - -OnInit: - .distance = 10; - .quest_debug = ShipQuests_Julia; -} diff --git a/npc/000-2-0/mapflags.txt b/npc/000-2-0/mapflags.txt deleted file mode 100644 index d3a4bd22..00000000 --- a/npc/000-2-0/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-2-0 mapflag town diff --git a/npc/000-2-0/note.txt b/npc/000-2-0/note.txt deleted file mode 100644 index fcb28f71..00000000 --- a/npc/000-2-0/note.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Qwerty Dragon -// Reid -// WildX -// Description: -// A small note presenting the 6 main rules of Evol Online. - -000-2-0,29,25,0 script Note NPC_PAPER_NOTE,{ - narrator S_LAST_NEXT, - l("There is a paper with some rules written on it."); - - GameRules 8 | 4; - - narrator S_NO_NPC_NAME, - l("Following these lines are some other writings on this paper."), - l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"), - l("Does anyone know a good place to hang out in Esperia? - M. Arpan"), - l("Other things are written but are not legible anymore."); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/_import.txt b/npc/000-2-1/_import.txt deleted file mode 100644 index ba87b23e..00000000 --- a/npc/000-2-1/_import.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Map 000-2-1: Second Deck -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-2-1/_mobs.txt", -"npc/000-2-1/_savepoints.txt", -"npc/000-2-1/_warps.txt", -"npc/000-2-1/alige.txt", -"npc/000-2-1/arpan.txt", -"npc/000-2-1/chefgado.txt", -"npc/000-2-1/chest.txt", -"npc/000-2-1/dan.txt", -"npc/000-2-1/devis.txt", -"npc/000-2-1/hammock.txt", -"npc/000-2-1/knife.txt", -"npc/000-2-1/mapflags.txt", -"npc/000-2-1/peter.txt", -"npc/000-2-1/q'onan.txt", -"npc/000-2-1/story_save.txt", diff --git a/npc/000-2-1/_mobs.txt b/npc/000-2-1/_mobs.txt deleted file mode 100644 index e4b38bfc..00000000 --- a/npc/000-2-1/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-1: Second Deck mobs -000-2-1,52,32,21,9 monster Piou 1002,3,30000,20000 diff --git a/npc/000-2-1/_savepoints.txt b/npc/000-2-1/_savepoints.txt deleted file mode 100644 index da074f25..00000000 --- a/npc/000-2-1/_savepoints.txt +++ /dev/null @@ -1,54 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-1: Second Deck saves -000-2-1,40,37,0 script #save_000-2-1_40_37 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -000-2-1,46,37,0 script #save_000-2-1_46_37 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -000-2-1,50,38,0 script #save_000-2-1_50_38 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -000-2-1,55,40,0 script #save_000-2-1_55_40 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/000-2-1/_warps.txt b/npc/000-2-1/_warps.txt deleted file mode 100644 index db3a1c8e..00000000 --- a/npc/000-2-1/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-1: Second Deck warps -000-2-1,72,30,0 warp #000-2-1_72_30 0,0,000-2-0,31,26 diff --git a/npc/000-2-1/alige.txt b/npc/000-2-1/alige.txt deleted file mode 100644 index 919b712d..00000000 --- a/npc/000-2-1/alige.txt +++ /dev/null @@ -1,321 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Alige -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Description: -// Hidden in a ship's hole. -// 2 bits array: -// ShipQuests -// Variable: -// ShipQuests_Alige -// Values: -// 0 Never talk. -// 1 First talk. -// 2 Accept the task. -// 3 Bring first food. - -000-2-1,43,32,0 script AligeTrigger NPC_HIDDEN,1,1,{ - -OnTouch: - if (getareausers() <= 1) - { - setnpcdir "Alige", 2; - stopnpctimer; - initnpctimer; - } - - if (getq(ShipQuests_Alige) > 0) close; - doevent "Alige::OnFirstEncounter"; - - close; - -OnUnTouch: - if (getareausers() == 0) - { - setnpcdir "Alige", 4; - stopnpctimer; - initnpctimer; - } - close; - -OnTimer190: - stopnpctimer; - - if (getnpcdir("Alige") == 2) setnpcdir "Alige", 6; - if (getnpcdir("Alige") == 4) setnpcdir "Alige", 8; - - end; -} - -000-2-1,43,31,0 script Alige NPC_ALIGE,{ - .@q = getq(ShipQuests_Alige); - if (.@q > 1) goto L_AskForFood; - - goto OnFirstEncounter; - -OnFirstEncounter: - setq ShipQuests_Alige, 1; - - setcamnpc; - mesn "Hidden Person"; - mesq l("Hey, psst! You're not a sailor, right?"); - next; - restorecam; - - menu - l("I am, who are you?"), -, - l("Indeed, I am not."), L_NeedHelp; - - mes ""; - mesn "Narrator"; - mesc(l("The stowaway doesn't answer."), 9); - - close; - -L_NeedHelp: - setcamnpc; - mes ""; - mesn "Hidden Person"; - mesq l("Good, good... Hey, could you help me please? I beg you, please, pleeeease..."); - next; - restorecam; - - menu - l("Why not, but who are you, and what kind of help do you need?"), L_CanHelp; - l("Sorry but I have no time for this."), -; - - closeclientdialog; - close; - -L_CanHelp: - setcamnpc; - mes ""; - mesn; - mesq l("My name is Alige, I've been hiding here for weeks. All I have to eat are these berries... berries... berries..."); - next; - mesq l("I'm losing my mind here, I need something else to eat!"); - next; - mesq l("Could you please bring me something which isn't a berry, and I'm not big on vegetables either. I need proteins!"); - next; - restorecam; - - menu - l("Sure, but what will you give me in exchange?"), L_AboutReward, - l("Why don't you come out?"), -; - -L_ExplainHiding: - setcamnpc; - mes ""; - mesn; - mesq l("No, I can't. I won't! All I wanted was to travel across the seas for fun, growl... sniff. And in this hole in the floor, as you can see, I have lots of fun."); - next; - mesq l("Oh... um... actually... all I wanted was to get to Artis. Err... but I didn't, uhm... have enough money to pay for the ferry!"); - next; - mesq l("Please don't tell people you saw me. I don't want to be decapitated or get thrown into the sea as food for sharks, or get my hair mussed!"); - next; - restorecam; - - if (getq(ShipQuests_Alige) == 2) goto L_SoAskForFood; - goto L_Accept; - -L_AboutReward: - setcamnpc; - mes ""; - mesn; - mesq l("I'll share my berries with you if you help me."); - next; - restorecam; - -L_Accept: - menu - l("Understood, I will help you."), L_FirstAccepted, - l("What is Artis?"), L_Artis, - l("I think I should report you to the crew members."), -; - - setcamnpc; - mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!"); - - close; - -L_Artis: - setcamnpc; - mes ""; - mesn; - mesq l("It's a commercial port of Andorra, it's weird that you don't know about it since it is one of the most famous cities throughout the whole world. But hey, back to me. Remember me telling you that I'm hun...grrr...eee!"); - next; - restorecam; - - if (.@q == 2) goto L_SoAskForFood; - goto L_Accept; - -L_FirstAccepted: - if (getq(ShipQuests_Alige) >= 2) goto L_Accepted; - setq ShipQuests_Alige, 2; - - goto L_Accepted; - -L_Accepted: - setcamnpc; - mes ""; - mesn; - mesq l("Great, what food do you have for me today?"); - next; - restorecam; - -L_GiveFood: - mes ""; - - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - .@id = requestitem(); - if (.@id <= 0) goto L_Quit; // Quit message. - if (countitem(.@id) == 0) goto L_Quit; // If don't have the food - - if (array_find(.vegetables, .@id) >= 0) goto L_NoReward; // In case of wrong food. - if (array_find(.poisonable, .@id) >= 0) goto L_Poison; // In case of poisoned food (or food with effects). - if (.@id == Piberries) goto L_NoMore; // In case of Piberries. - if (.@id == RedPlushWine) goto L_Drunk; // In case of Alcohol. - - // Default message for non food - if (array_find(.commonfood, .@id) == -1) goto L_NoFood; - - inventoryplace Piberries, 3; - delitem .@id, 1; - - setcamnpc; - mes ""; - mesn; - mesq l("Thank you so much! Here, have some of my berries."); - - setq ShipQuests_Alige, 3; - getitem Piberries, rand(1, 3); - next; - - goto L_ReturnMenu; - -L_NoReward: - setcamnpc; - mes ""; - mesn; - mesq l("You don't expect me to eat that, do you? Give me something else!"); - next; - restorecam; - - goto L_GiveFood; - -L_Drunk: - setcamnpc; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I asked for food but... *hips* Ah, that'll do!"); - restorecam; - - goto L_GiveFood; - -L_NoFood: - setcamnpc; - // We must first determine if it is at least edible (IT_HEALING) - if (getiteminfo(.@id, ITEMINFO_TYPE) == IT_HEALING) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That looks too exotic for me to eat!"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That doesn't looks edible to me!"); - } - restorecam; - - goto L_GiveFood; - -L_ReturnMenu: - setcamnpc; - mesq l("Do you have anything else for me?"); - next; - restorecam; - - goto L_GiveFood; - -L_NoMore: - setcamnpc; - mes ""; - mesn; - mesq l("Grr, don't give me more berries! I don't want them, stupid berries, stupid... Stupid... Stupid!"); - next; - - goto L_ReturnMenu; - -L_Poison: - setcamnpc; - mes ""; - mesn; - mesq l("Don't try to poison me! I know what that does!"); - next; - restorecam; - goto L_ReturnMenu; - -L_SoAskForFood: - setcamnpc; - mesn; - mesq l("So, do you have anything for me today?"); - next; - restorecam; - goto L_IntroMenu; - -L_AskForFood: - setcamnpc; - mesn; - mesq l("Do you have anything for me today?"); - next; - restorecam; - -L_IntroMenu: - menu - l("Yes."), L_GiveFood, - l("Where can I find some food?"), L_FindFood, - l("Why are you hiding?") + " " + l("Why don't you come out?"), L_ExplainHiding, - l("What is Artis?"), L_Artis, - l("I think I should report you to the crew members."), -; - - setcamnpc; - mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!"); - - close; - -L_FindFood: - setcamnpc; - mes ""; - mesn; - mesq l("There are some flying yellow plushes around you. They're called pious. Getting a roasted leg of one of them would be perfect."); - next; - mesq l("I'd like to catch one of them, but they fly away when I try."); - next; - mesq l("Walking around a bit, it'll be easy for you to catch one, I bet. Impale one of them for me please."); - next; - restorecam; - mesn "Narrator"; - mesc(l("You can attack a monster by clicking on it, or from your keyboard you can press the 'A' key to select the monster followed by 'Ctrl' to attack it."), 9); - next; - mesc(l("Once the monster is dead, click on the dropped items to add them to your inventory. You can also use the 'Z' key to claim the drops."), 9); - - close; - -L_Quit: - setcamnpc; - mes ""; - mesn; - mesq l("Too bad... Come back when you'll have some nice food for me. Growl... grumble... grumble."); - - close; - -OnInit: - .distance = 2; - - // Array of foods (remember to update in 001-2-22 as well) - setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegSandwich; - setarray .vegetables, Acorn, LettuceLeaf, Croconut, MananaSandwich; - setarray .poisonable, SeaDrops, PinkBlobime, PumpkinSeeds, UrchinMeat, EasterEgg; - end; -} diff --git a/npc/000-2-1/arpan.txt b/npc/000-2-1/arpan.txt deleted file mode 100644 index 106d9aaa..00000000 --- a/npc/000-2-1/arpan.txt +++ /dev/null @@ -1,304 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Qwerty Dragon -// Description: -// Explains to the player how he got here. -// Variable: -// 0 ShipQuests_Arpan -// 1 ShipQuests_Julia -// 2 ShipQuests_ArpanMoney -// Values: -// 00 Has not talked to Arpan yet. -// 01 Talked to Arpan and needs to get the clothes. -// 02 Has the clothes. -// 03 Has and equipped the clothes. -// 10 Has not talked to Julia -// 11 Need to see Julia -// 12 Has been registered by Julia -// 20 Does not knows about money -// 21 Has not taken possession from Arpan -// 22 Took money from Arpan -// 23 Took money and clothes (Legacy only) - -000-2-1,49,36,0 script LeftDoorCheck NPC_HIDDEN,0,0,{ - .@q = getq(ShipQuests_Arpan); - if (.@q == 0) doevent "Magic Arpan::OnTalk"; - - close; -} - -000-2-1,54,36,0 script RightDoorCheck NPC_HIDDEN,0,0,{ - .@q = getq(ShipQuests_Arpan); - if (.@q == 0) doevent "Magic Arpan::OnTalk"; - - close; -} - -000-2-1,47,32,0 script LeftBarrierCheck NPC_HIDDEN,0,2,{ - .@q = getq(ShipQuests_Arpan); - if (.@q > 2) close; - if (.@q == 2 && getequipid(equip_torso) == 1300 && getequipid(equip_legs) == 2200) goto L_EquipDone; - if (.@q == 2) goto L_Equip; - if (.@q == 1) goto L_GetCloth; - - doevent "Magic Arpan::OnClothNotTaken"; - -L_Equip: - slide 49, 32; - doevent "Magic Arpan::OnEquip"; - - close; - -L_GetCloth: - slide 49, 32; - doevent "Magic Arpan::OnClothNotTaken"; - - close; - -L_EquipDone: - setq ShipQuests_Arpan, 3; - - close; -} - -000-2-1,56,32,0 script RightBarrierCheck NPC_HIDDEN,0,2,{ - .@q = getq(ShipQuests_Arpan); - if (.@q > 2) close; - if (.@q == 2 && getequipid(equip_torso) == 1300 && getequipid(equip_legs) == 2200) goto L_EquipDone; - if (.@q == 2) goto L_Equip; - if (.@q == 1) goto L_GetCloth; - - doevent "Magic Arpan::OnClothNotTaken"; - -L_Equip: - slide 55, 32; - doevent "Magic Arpan::OnEquip"; - - close; - -L_GetCloth: - slide 55, 32; - doevent "Magic Arpan::OnClothNotTaken"; - - close; - -L_EquipDone: - setq ShipQuests_Arpan, 3; - - close; -} - -///////////////////////////////////////////////////////////////////////////// -000-2-1,49,33,0 script Magic Arpan NPC_MAGIC_ARPAN,{ - .@q = getq(ShipQuests_Arpan); - .@q_nard = getq(ShipQuests_Nard); - .@q_julia = getq(ShipQuests_Julia); - if (.@q == 2 && getequipid(equip_torso) == 1300 && getequipid(equip_legs) == 2200) goto L_EquipDone; - -OnTalk: - mesn; - - if (.@q > 0) goto L_Menu; - setq ShipQuests_Arpan, 1; - deltimer("Magic Arpan::OnSlow"); - - mesq l("Yeye, you are really lucky to be alive. You are in good enough shape for walking, do you remember what happened?"); - next; - - menu - l("I only remember I was rescued by you."), L_Story, - l("I can't remember anything."), L_OhWell; - -OnClothNotTaken: - mesn; - mesq l("Yeye, you still did not get your new clothes from the chest next to your bed!"); - - close; - -OnEquip: - mesn "Narrator"; - mesc(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9); - next; - mesc(l("When your inventory is open, you can equip an item by selecting it and clicking 'Equip'. You can do the same to remove an item by clicking on 'Unequip'."), 9); - next; - mesc(l("Items have different effects. Some will heal you, some can be used as weapons or armor, and some can be sold for gold."), 9); - - close; - -L_OhWell: - mes ""; - mesq l("Oh well, we rescued you when you were yaying adrift in the sea."); - next; - - select - l("And then what happened?"); - -L_Story: - mes ""; - mesq l("You were yaying sleeping for quite some time there. Our shipkeeper, Julia, was here with you, and she did her best to heal your injuries."); - next; - if (.@q_julia == 0) setq ShipQuests_Julia, 1; - mesq l("Yaya, you should go see her! She'll be happy to see you."); - next; - mesq l("Also, we took your yayed clothes, as they were... Yeyeye... In a bad shape. Go check the chest near your bed, there are some other ones inside."); - setcamnpc "Chest"; - - close; - -L_Menu: - mesq l("What yeye could I do for you today?"); - next; - .@equipped = getequipid(equip_torso) == 1300 && getequipid(equip_legs) == 2200; - - menu - rif(.@q_nard == 5 && getq(General_Narrator) < 1, l("What can I do now?")), L_GotoSleep, - l("Could you tell me where I am?"), L_Where, - l("Where can I find Julia?"), L_Julia, - l("Who are you?"), L_Who, - rif(getq(ShipQuests_ArpanMoney) == 1, l("Do you know what happened to the gold I had when you guys saved me?")), L_WhereMoney, - rif(getq(ShipQuests_ArpanMoney) < 2, l("Where are my old clothes?")), L_WhereOldClothes, - rif(getq(ShipQuests_ArpanMoney) == 2 && islegacyaccount(), l("About my my old clothes...")), L_LegacyClothes, - rif(!.@equipped, l("What should I do after taking these clothes?")), L_WhatCloth, - rif(!.@equipped, l("Thank you, I'll take them and put them on.")), -, - l("Nothing, sorry."), -; - - closeclientdialog; - close; - -L_Where: - mes ""; - mesn; - mesq l("You're on our ship, we made port to a little island and we're actually yeyending our long merchant traveling adventure at the city of Artis."); - next; - mesq l("We will be yaying there in a few days, so we will drop you off there."); - next; - mesq l("You will see, citizens are polite and you can still ask for help in the Legion of Aemil. They can help find a job for you or maybe help you find out what happened to you out at sea!"); - next; - - goto L_Menu; - -L_Julia: - mes ""; - mesn; - mesq l("She's on the upper level, yeye can't miss her. She's the only girl in this crew so far."); - next; - - mesn "Narrator"; - mesc(l("Julia is on the upper level of the ship, use the arrow keys to walk to the stairs or click on the stairs at the top right of your screen."), 9); - next; - - goto L_Menu; - -L_Who: - mes ""; - mesn; - mesq l("Sorry! I forgot to introduce myself. My name is Arpan, but other sailors call me Magic Arpan because I know one or two yaing magic spells."); - next; - - goto L_Menu; - -L_WhereOldClothes: - mes ""; - mesn; - mesq l("We tried to clean them but the sea water mostly destroyed them. It's why we gave you these clothes. They're not very nice, but that's all that we have for you."); - next; - mes l("Oh, now that I remember, we also found some money in your pockets, here it is!"); - next; - - setq ShipQuests_ArpanMoney, 2; - .@q = getq(ShipQuests_Arpan); - Zeny += 10; - message strcharinfo(0), l("You receive @@ E!", 10); - - if (islegacyaccount()) - goto L_LegacyClothes; - - goto L_BeforeMenu; - -L_LegacyClothes: - if (islegacyaccount()) { - mesn strcharinfo(0); - select - l("But... I remember that my clothes were very dear to me..."), - l("Oh okay."); - mes ""; - if (@menu == 1) { - mesn; - mesq l("Well, you can have them back, but they're yayaya, mostly destroyed. Not sure what yeye are going to do with that."); - getitem ClothesPack, 1; - setq ShipQuests_ArpanMoney, 3; - } - } - goto L_BeforeMenu; - -L_WhereMoney: - mes ""; - mesn; - mesq l("Oh right, I totally forgot about that, here you go."); - next; - - setq ShipQuests_ArpanMoney, 2; - .@q = getq(ShipQuests_Arpan); - Zeny += 10; - message strcharinfo(0), l("You receive @@ E!", 10); - - goto L_BeforeMenu; - -L_WhatCloth: - mes ""; - mesn; - mesq l("Oh yeyeye... As they are not edible, you can maybe try to equip them?"); - next; - - mesn "Narrator"; - mesc(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9); - next; - mesc(l("When your inventory is open, you can equip an item by selecting it and clicking 'Equip'. You can do the same to unequip an item by clicking on 'Unequip'."), 9); - next; - mesc(l("Items have different effects. Some will heal you, some can be used as weapons or armor, and some can be sold for gold."), 9); - next; - -L_BeforeMenu: - mesn; - goto L_Menu; - -L_EquipDone: - setq ShipQuests_Arpan, 3; - goto L_Menu; - -L_GotoSleep: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You already did enough for us, do you want to follow Nard's advice and get some rest?"); - - switch (select(l("Yes."), l("No."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Fine."), - l("We are at half a day from our final destination, by the time that you wake up I'm sure that we will be there!"); - - closeclientdialog; - doevent "#name3::OnClick"; - close; - - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Alright, take your time we are not in a hurry."); - - break; - } - - goto L_Menu; - -OnSlow: - dispbottom(l("Use arrow keys to walk around and leave this room.")); - npctalk3(l("Please come talk to me, I'll help you get dressed.")); - addtimer(90000,"Magic Arpan::OnSlow"); - close; - -OnInit: - .distance = 5; - end; -} diff --git a/npc/000-2-1/chefgado.txt b/npc/000-2-1/chefgado.txt deleted file mode 100644 index 0e3a71be..00000000 --- a/npc/000-2-1/chefgado.txt +++ /dev/null @@ -1,226 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Description: -// La Johanne Chef. -// Variable: -// ShipQuests_ChefGado -// ShipQuests_Nard -// Values: -// 0 Default, no quest given. -// 1 Quest accepted. -// 2 Ingredients collected, ready to poison Julia. -// 3 Julia poisoned. -// 4 Quest complete. Chef Gago wins. -// 5 Quest complete. Julia wins (poison dish returned). -// 6 Quest complete. Julia wins. - -000-2-1,27,28,0 script Chef Gado NPC_CHEF_GADO,{ - .@q = getq(ShipQuests_ChefGado); - .@n = getq(ShipQuests_Nard); - if (.@q == 1) goto L_QuestAccepted; - if (.@q == 2) goto L_PoisonAccepted; - if (.@q == 3) goto L_PoisonJulia; - if (.@q == 4) goto L_QuestComplete; - if (.@q == 5 && countitem(PoisonedDish) > 0) goto L_Aborting; - if (.@q > 4) goto L_QuestAborted; - if (.@n == 3) goto L_QuestStart; - - mesn; - .@r = rand(3); - if (.@r == 0) mesq l("What are you doing in my kitchen?! Get out, it's not a place for kids!"); - if (.@r == 1) mesq l("Where is the damn salt?! Give me the salt, I know you have it!"); - if (.@r == 2) mesq l("Are you going to stand here all day long? Do the dishes or go away."); - - if (getq(General_SmearedHands) < 3) { - next; - select - l("I'll get moving, sorry!"), - //rif(.@r == 1 && countitem(Salt), l("Offer him the salt")), - l("Can you teach me cooking?"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("NO! I am busy, can't you see?!"); - next; - mesn; - mesq l("When we reach Artis, maybe, but not now!"); - } - } - close; - -L_QuestStart: - mesn; - mesq l("So it seems I have another stomach to fill. Those bastards have no respect for who feeds them every damn day!"); - next; - - menu - l("How rude! What is the reason behind your malice?"), L_Rude, - l("I swear, I do not eat so much."), -; - - mes ""; - mesn; - mesq l("Yeah, yeah, of course you don't..."); - - close; - -L_Rude: - mes ""; - mesn; - mesq l("UAHAHAHAAH! I am the cook of that bunch of donkeys, and I can be rude with everyone from this bossy captain to that harpy-lady!"); - next; - - select - l("Harpy-lady?"); - - mes ""; - mesn; - mesq l("I am sure you know her. Nice dress, large smile and a constant flux of orders and rules. Julia they call her!"); - next; - mesq l("You have to know that there was a time during which I was the unopposed lieutenant of this crew. Then one day one of those damn sailors brought that 'nice' lady here."); - next; - mesq l("I will not tell you all the details, but after a month, she was ruling the ship and I was sent down here, cooking for those traitors!"); - next; - mesq l("But I swear that one day... Oh... My tasty revenge! Hhm, actually I wonder if... Maybe..."); - next; - - select - l("M... Maybe?"); - - mes ""; - mesn; - mesq l("Well, eh-heh... Welcome aboard, young fellow!"); - next; - mesq l("I just realized I am lacking some common things, and one key ingredient, to prepare a... A special recipe."); - next; - mesq l("I only need 2 @@, 2 @@s, 1 @@...", getitemlink(PiouLegs), getitemlink(HalfCroconut), getitemlink(Aquada)); - next; - mesq l("... and 1 @@.", getitemlink(SeaDrops)); - next; - - menu - l("Sea water?! I will not help you with your evil plan!"), L_Quit, - l("Sure, why not?"), -; - - setq ShipQuests_ChefGado, 1; - mes ""; - mesn; - mesq l("Well done! Collect all the ingredients and then come back here. You will be rewarded once I am satisfied that they understand who rules this ship!"); - next; - mesq l("Before you go, let me tell you how to get @@s, because you don't look very smart.", getitemlink(HalfCroconut)); - - goto L_OpenCroconut; - -L_QuestAccepted: - mesn; - mesq l("Have you collected all the ingredients for my recipe? The special one too?"); - next; - - menu - rif(countitem(PiouLegs) > 1 && countitem(HalfCroconut) > 1 && countitem(Aquada) > 0 && countitem(SeaDrops) > 0, l("All your... Fresh ingredients are ready to be cooked.")), L_GotAll, - l("What are your needs?"), L_Need, - l("Where can I find a half croconut?"), L_OpenCroconut, - l("Not yet. I will be back soon."), L_Quit; - -L_OpenCroconut: - mes ""; - mesn; - mesq l("Take a @@ and try opening it using something like a sharp knife. I doubt you'll succeed, you're being so weak in everything.", getitemlink(Croconut)); - next; - mesq l("Now move!"); - - close; - -L_GotAll: - mes ""; - - inventoryplace PoisonedDish, 1; - - delitem PiouLegs, 2; - delitem HalfCroconut, 1; - delitem Aquada, 1; - delitem SeaDrops, 1; - - mesn; - mesq l("Let me see... Crispy legs, disgusting liquids... Let's start!"); - next; - mesq l("Water, salt, spicy herbs and meat stuffed with my special surprise!"); - next; - mesq l("Done. Here, take it! Now, here is the plan. Go talk to her and offer our beautiful lady a bite of her arrogance!"); - - setq ShipQuests_ChefGado, 2; - getitem PoisonedDish, 1; - close; - -L_Need: - mes ""; - mesn; - mesq l("Shhht, don't say it that loud..."); - next; - mesq l("I only need 2 @@, 2 @@s, 1 @@...", getitemlink(PiouLegs), getitemlink(HalfCroconut), getitemlink(Aquada)); - next; - mesq l("... and 1 @@.", getitemlink(SeaDrops)); - - close; - -L_PoisonAccepted: - mesn; - mesq l("Fool! Just come back here when you'll be done with our little... 'Secret mission'."); - - close; - -L_PoisonJulia: - mesn; - mesq l("The usurper has been punished! This is a great day! Take this reward as a prize for your loyalty to the old commander!"); - - setq ShipQuests_ChefGado, 4; - Zeny += 200; - message strcharinfo(0), l("You receive @@ E!", 200); - inventoryplace Bread, 1; - getitem Bread, 1; - getexp 15, 0; - - close; - -L_QuestComplete: - mesn; - mesq l("Oh, it's you. I think it's better we do not talk for a while. They suspect something."); - - close; - -L_Aborting: - mesn; - mesq l("Wait, why do you still have the dish with you?!"); - next; - - select - l("I informed Julia about your monstrous plan."); - - mes ""; - mesn; - mesq l("Are you mad?!"); - next; - mesq l("Give me back this dish, you dirty liar!"); - - if (countitem(PoisonedDish) > 0) delitem PoisonedDish, 1; - - next; - mesq l("You're like the rest of this filthy crew, I can't trust you!"); - - close; - -L_QuestAborted: - mesn; - mesq l("You're like the rest of this filthy crew. Your name is now on the traitors list!"); - - close; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/chest.txt b/npc/000-2-1/chest.txt deleted file mode 100644 index f9ec2742..00000000 --- a/npc/000-2-1/chest.txt +++ /dev/null @@ -1,72 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// gumi -// omatt -// Reid -// Description: -// A box with clothes for new players. -// Variable: -// ShipQuests_Arpan -// Values: -// 1 Talked to Arpan and needs to get clothes. -// 2 Has the clothes. - -000-2-1,51,37,0 script Chest#000-2-1 NPC_CHEST_BIG,2,4,{ - - .@questState = getq(ShipQuests_Arpan); - - if (.@questState == 0) - { - npctalk3 l("You should talk to Magic Arpan first."); - end; - } - - if (.busy == false) - { - if (.@questState <= 1) - { - inventoryplace CreasedShirt, 2; - setq ShipQuests_Arpan, 2; - getitem CreasedShirt, 1; - getitem CreasedShorts, 1; - npctalk3 l("You take the clothes from the chest."); - } - - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing - .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing - .busy = true; // lock the animation - initnpctimer; - } - end; - -OnTimer220: - .dir = .dir == 6 ? 0 : 4; // closing ? closed : open - end; - -OnTimer500: - .busy = false; // unlock - - if (.dir == 0) - { - stopnpctimer; // stop here if the chest is closed - } - end; - -OnUnTouch: - if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0) - { - end; - } -OnTimer30000: - .busy = true; - .dir = 6; // closing - specialeffect(25, AREA, getnpcid()); // closing - setnpctimer 0; -OnTouch: - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/dan.txt b/npc/000-2-1/dan.txt deleted file mode 100644 index f336402d..00000000 --- a/npc/000-2-1/dan.txt +++ /dev/null @@ -1,93 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// There are two kinds of dialogues in this script. -// Dan will randomly choose between a useless sentence, and a quest in Artis. - -000-2-1,32,31,0 script Dan#000-2-1 NPC_DEMON_MAN,{ - if (getq(General_Narrator) > 0) - { - sailortalk; - close; - } - - mesn; - .@q = rand(3); - if (.@q == 0) goto L_QuestStory; - - mesq l("You see these pious around us?"); - next; - mesq l("It seems that we are close to an island, we should take a look at the upper level."); - - close; - -L_QuestStory: - mesq l("It's so hard to find the motivation..."); - next; - - menu - l("Why?"), -, - l("I guess so... I will leave you alone."), L_Quit; - - mes ""; - mesn; - mesq l("Oh, it's you."); - next; - mesq l("So, you finally woke up? We all thought you were in something like... You know, one of these long comas."); - next; - - menu - l("I'm still in a coma, but my ghost is haunting you!"), L_Quit, - l("It was something like a long nap."), -; - - mes ""; - mesn; - mesq l("It's good, good... I have a friend who is still in a coma, but I can't be with her without working..."); - next; - mesq l("The fear to see her sleeping on this quiet and lonely bed is becoming more and more unbearable, I think that I won't get the bravery to see her this time..."); - next; - - menu - l("Who is she?"), L_She, - l("Do you want me to go see her instead of you?"), L_Quest, - l("I don't know what to say..."), -; - - mes ""; - mesn; - mesq l("There's nothing to say, don't worry."); - - close; - -L_She: - mes ""; - mesn; - mesq l("She is a good friend of mine... We wanted to move together a few weeks before her accident but..."); - next; - - goto L_Quit2; - -L_Quest: - mes ""; - mesn; - mesq l("I don't think that we are in a good place to talk about this..."); - next; - -L_Quit: - mes ""; - mesn "Narrator"; - mesc(l("Dan keeps silent since your last question."), 9); - - close; - -L_Quit2: - mesn "Narrator"; - mesc(l("Dan ends the conversation and resumes to write his letter."), 9); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/devis.txt b/npc/000-2-1/devis.txt deleted file mode 100644 index 5071dfb7..00000000 --- a/npc/000-2-1/devis.txt +++ /dev/null @@ -1,16 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Reid -// Vasily_Makarov -// Description: -// Sleeping and grumbling NPC. - -000-2-1,32,38,0 script Devis NPC_HAMMOC,{ - asleep; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/hammock.txt b/npc/000-2-1/hammock.txt deleted file mode 100644 index 3e188eed..00000000 --- a/npc/000-2-1/hammock.txt +++ /dev/null @@ -1,125 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the mid level of the ship. - -000-2-1,32,27,0 script #hammock1 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,32,25,0 script #hammock2 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,25,0 script #hammock3 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,27,0 script #hammock4 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,29,0 script #hammock5 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,34,0 script #hammock6 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,36,0 script #hammock7 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,38,0 script #hammock8 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,32,40,0 script #hammock9 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -000-2-1,37,40,0 script #hammock10 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} diff --git a/npc/000-2-1/knife.txt b/npc/000-2-1/knife.txt deleted file mode 100644 index b3e44eef..00000000 --- a/npc/000-2-1/knife.txt +++ /dev/null @@ -1,47 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Qwerty Dragon -// Description: -// Knife on the table. -// Variable: -// ShipQuests_Knife -// Values: -// 0 Default, not taken. -// 1 Knife taken. - -000-2-1,50,24,0 script #knife NPC_KNIVES,{ - .@q = getq(ShipQuests_Knife); - if (.@q) close; - - mesn "Narrator"; - mesc(l("There are some knives on the table. Would you like to take one?"), 9); - next; - - menu - l("Yes."), L_Give, - l("No."), -; - - closeclientdialog; - close; - -L_Give: - mes ""; - inventoryplace Knife, 1; - - setq ShipQuests_Knife, 1; - getitem Knife, 1; - - mesn "Narrator"; - mesc(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9); - next; - mesc(l("When your inventory is open, you can equip an item by selecting it and clicking 'Equip'. You can do the same to unequip an item by clicking on 'Unequip'."), 9); - next; - mesc(l("Items have different effects. Some will heal you, some can be used as weapons or armor, and some can be sold for gold."), 9); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/mapflags.txt b/npc/000-2-1/mapflags.txt deleted file mode 100644 index 1543b585..00000000 --- a/npc/000-2-1/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-2-1 mapflag town diff --git a/npc/000-2-1/peter.txt b/npc/000-2-1/peter.txt deleted file mode 100644 index 499304c4..00000000 --- a/npc/000-2-1/peter.txt +++ /dev/null @@ -1,302 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Ablu -// Alastrim -// Jesusalva -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Description: -// Rat hunter. -// 4+2 bits array: -// ShipQuests -// Variable: -// ShipQuests_Peter -// Values is a bitmask: -// 0 Doesn't know the quest. -// 1 Task given. (To prevent bugs because zero is a valid instance id) -// 2 Already completed the first stage -// 4 Already completed the second stage -// 8 Already completed the third stage -// ... -// =15 Completed every stage. -// Setq2: -// Number of killed Rattos: -// & 1 - Ratto 1 -// & 2 - Ratto 2 -// & 4 - Ratto 3 -// & 8 - Ratto 4 -// = 15: All rattos killed -// (Adding more monsters etc. is possible, but be careful with the == 15 checks) -// Setq3: -// Instance ID (so we can destroy it later if needed, and check it too) -// Others: -// .@q = Peter variable. -// PETER_TIME = gettimetick(2) for daily -// @peter = Control Variable -// @pt_mob = Control Variable -// @MAP_NAME$ = Control Variable -// "000-2-2" - map with mobs. - -000-2-1,72,34,0 script AreaNPC NPC_HIDDEN,0,1,{ - end; -OnTouch: - doevent "Peter::OnPeterMain"; - close; -} - -000-2-1,70,35,0 script Peter NPC_RATTO_SAILOR,{ - goto L_Main; - -OnPeterMain: -L_Main: - .@q = getq(ShipQuests_Peter); - .@q2 = getq2(ShipQuests_Peter); - .@q3 = getq3(ShipQuests_Peter); - if (BaseLevel < 5) goto OnTooWeak; - - if (!.@q || !isinstance(.@q3) || .@q3 <= 0) goto L_Task; - if (.@q2 < 15) goto L_ReturnFail; - dispbottom l("I am broken?! Please report! Debug data: @@ (@@)", .@q, .@q2); - close; - -OnGiveTask: -L_Task: - if (!.@q) - setq ShipQuests_Peter, 1, 0, -1; - mesn; - mesq l("Hey there!"); - next; - mesq l("I need somebody who can rid the hold of the ship of these rattos. Can you help me?"); - next; - - menu - l("Yeah, but what reward will I get?"), L_BonusTask, - l("Why not, I need to train anyway."), L_BonusTask, - l("No, they are way too dangerous for me!"), -; - - mes ""; - mesn; - mesq l("Hehe, hehe. Well, come back if you change your mind."); - - close; - -// Friendly reminder that you have about 20 secs to finish -OnLowTime: - if ((getmap() ~= "000-2-1") || (getmap() ~= "nard*")) - dispbottom l("I'm starting to feel dizzy... I shouldn't stay here much longer."); - end; - -// Minimum Quest Level (any difficulty setting) is on L_Main (and currently is 5) -OnTooWeak: - mesn; - mesq l("I need someone to help me clean the edge of the ship, but you aren't strong enough for now."); - - close; - -/* -OnStop: - slide 72, 36; - - mesn; - mesq l("You can't go there!"); - - close; -*/ - -// This is cast if player dies in Basement, but not automatically (bad design?) -// instance_destroy() is being recklessy called here, some sanity check is good. -OnReturnFail: -L_ReturnFail: - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); // This would allow players to try again at once, but is DANGEROUS! - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, -1; - mesn; - mesq l("I see it's not so easy to get rid of these rattos. Do you want to try again?"); - next; - - menu - l("Yeah, but I would like to make sure I get a reward."), L_BonusTask, - l("Why not, I need to train anyway."), L_BonusTask, - l("No, they are way too dangerous for me!"), -; - - mes ""; - mesn; - mesq l("Hehe, hehe. Well, come back if you change your mind."); - - close; - - -L_BonusTask: - mes ""; - mesn; - mesq l("There are three kind of monsters which frequently or seldomly attacks our fair vessel."); - next; - mesn; - .@q = getq(ShipQuests_Peter); - if (!(.@q & 2)) { - mes l("- I currently need your help with @@.", getmonsterlink(Tortuga)); - mes l("I'll give you @@ GP for this job.", 500); - mes ""; - } - if (!(.@q & 4)) { - mes l("- I currently need your help with @@.", getmonsterlink(Ratto)); - mes l("I'll give you @@ GP for this job.", 1000); - mes ""; - } - if (!(.@q & 8)) { - mes l("- I currently need your help with @@.", getmonsterlink(Croc)); - mes l("I'll give you @@ GP for this job.", 1500); - mes ""; - } - // If you already took all three bounties, you can only repeat the quest daily - if (.@q == 15 && PETER_TIME <= gettimetick(2)) { - mes l("- I currently need your help with @@.", getmonsterlink(Ratto)); - mes l("I'll give you @@ GP for this job.", 750); - } else if (.@q == 15) { - mes l("I don't need your help right now, but maybe tomorrow, who knows?"); - close; - } - next; - - select - l("I'm not feeling like it today... Sorry."), - rif(!(.@q & 2), l("I will take the @@ Bounty.", "Tortuga")), - rif(!(.@q & 4), l("I will take the @@ Bounty.", "Ratto")), - rif(!(.@q & 8), l("I will take the @@ Bounty.", "Croc")), - rif(.@q == 15, l("Why not, I need to train anyway.")); - - if (@menu == 1) - close; - - @peter=@menu; - - goto L_Start; - -// In Moubootaur Legends, there's a small tutorial about Hit'n'run here -// I didn't add it here but that can be arranged -L_Start: -// Init Instance -OnStartOutside: - .@ID=getcharid(0); - @MAP_NAME$="nard@"+str(.@ID); // Max 4 chars for map name - .@INSTID = instance_create("ratto@a"+(.@ID), getcharid(3), IOT_CHAR); - .@instanceMapName$ = instance_attachmap("000-2-2", .@INSTID, 0, @MAP_NAME$); - - // Instance already exists, or something went wrong - if (.@instanceMapName$ == "") { - mesn; - mesq l("Actually, you just took a bounty, right?"); - next; - mesn; - mesq l("Why don't you take a break? Breath in some fresh air. The basement is pretty damp."); - close; - } - - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, .@INSTID; - - // It'll be self-destroyed when time runs out (3 minutes) - instance_set_timeout(180, 180, .@INSTID); - instance_init(.@INSTID); - - // Save in a less reliable way the challenge you took - if (@peter == 2) { - @peter=2; - @pt_mob=Tortuga; - } else if (@peter == 3) { - @peter=4; - @pt_mob=Ratto; - } else if (@peter == 4) { - @peter=8; - @pt_mob=Croc; - } else { - @peter=0; - @pt_mob=Ratto; - } - - warp @MAP_NAME$, 48, 28; - // Control how much time you have left - addtimer(120000, "Peter::OnLowTime"); - addtimer(140000, "Peter::OnTimeout"); - - // Spawn the Monsters - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto1Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto2Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto3Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto4Death"; - - dispbottom l("Okay, you can start!"); - closeclientdialog; - close; - -// TODO: This is very reckless, instance_destroy() could possibly affect others -// If you agree with me, we can force player to wait until instance expire on its -// own (3 minutes after start) instead of allowing immediate retry. That's safer, -// and code will end up looking like Mundane (exploiting attach_map failures) - -// (Or if you are set in disregarding this, just uncomment instance_destroy.) -// (Don't blame me if server SIGSEGV's because that, though) -OnTimeout: - if (!(getmap() ~= "000-2-2") && !(getmap() ~= "nard*")) - end; - warp "000-2-1", 72, 36; - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, -1; - mesn; - mesq l("Hey! Be careful. You can't stay in this basement for so long, you're going to get sick. Come outside and take a break, maybe you can try again later."); - close; - -// This is called by npc/000-2-2/ratto.txt and completes the quest -// Just like OnReturnFail and OnTimeout, this recklessy destroys the instance -// It's not _buggy_, it is just reckless. I would like a setting to restrict it -// to destroy only instances owned by the char, or to destroy by name :p -OnDone: - warp "000-2-1", 72, 36; - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); - if (@peter) - setq ShipQuests_Peter, getq(ShipQuests_Peter)|@peter, 0, -1; - - .@q = getq(ShipQuests_Peter); - mesn; - mesq l("Good job!") + " " + l("Here's your reward!"); - - - // Before handling the rewards, we should be sure we'll handle daily loop. - // You're already in daily phase if @peter is zero. - // PS. This is not exactly "daily", this is actually a forced 24-hours wait. - if (!@peter) { - PETER_TIME=gettimetick(2)+24*60*60; - @peter=1; // This allows you to get 32 EXP from daily repeat. Tweak as needed. - } - - // You get some EXP based on difficulty taken - getexp @peter*32, @peter; - - // We don't need @peter anymore, so reuse it to give you GP rewards - switch (@peter) { - case 2: @peter=500; break; - case 4: @peter=1000; break; - case 8: @peter=1500; break; - default: @peter=750; break; - } - - Zeny += @peter; - message strcharinfo(0), l("You receive @@ E!", @peter); - - // Some cleanup. Shouldn't cause bugs but it's absence causes a ugly behavior. - deltimer("Peter::OnLowTime"); - deltimer("Peter::OnTimeout"); - @peter=0; - close; - - -OnInit: - .distance = 3; - end; -} diff --git a/npc/000-2-1/q'onan.txt b/npc/000-2-1/q'onan.txt deleted file mode 100644 index c5ef0951..00000000 --- a/npc/000-2-1/q'onan.txt +++ /dev/null @@ -1,15 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Vasily_Makarov -// Description: -// Sleeping and snoring NPC. - -000-2-1,53,38,0 script Q'Onan#000-2-1 NPC_ORC_SAILOR,{ - asleep; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-1/story_save.txt b/npc/000-2-1/story_save.txt deleted file mode 100644 index 68aacf60..00000000 --- a/npc/000-2-1/story_save.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Scritpted save locations in 000-2-1 map. - -000-2-1,50,38,0 script #name3 NPC_FINAL_POINT,{ - .@q_nard = getq(ShipQuests_Nard); - .@q_narr = getq(General_Narrator); - - if(.@q_nard == 5 && .@q_narr < 1) - { -OnClick: - narrator S_LAST_NEXT, - l("You lie in the bed."), - l("Your head is suddently heavy, your eyes are closing..."), - l("You fell asleep."); - - warp "000-0-1", 26, 28; - } - else - { - savepointparticle "000-2-1", 50, 38; - } - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-2/_import.txt b/npc/000-2-2/_import.txt deleted file mode 100644 index 81d32fdf..00000000 --- a/npc/000-2-2/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 000-2-2: Hold -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-2-2/doors.txt", -"npc/000-2-2/mapflags.txt", -"npc/000-2-2/ratto.txt", diff --git a/npc/000-2-2/doors.txt b/npc/000-2-2/doors.txt deleted file mode 100644 index c97a7c5d..00000000 --- a/npc/000-2-2/doors.txt +++ /dev/null @@ -1,75 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Alastrim -// Jesusalva -// Reid -// Description: -// Doors NPCs. - -000-2-2,48,29,0 script DoorUpwards NPC_HIDDEN,0,0,{ - -OnTouch: - // Actually this will never work because Instanced map - if (mobcount("000-2-2","all") > 0) goto L_Warn; - - goto L_Warp; - -L_Warn: - .@q = getq(ShipQuests_Peter); - if (.@q >= 15) goto L_Warp; - - mesn "Narrator"; - mesc(l("There are still some monsters left! Do you want to abort the quest?"), 9); - next; - - menu - l("Yes."), L_Warp, - l("No."), -; - - slide 48, 28; - closeclientdialog; - close; - -L_Warp: - warp "000-2-1", 72, 36; - - deltimer("Peter::OnLowTime"); - deltimer("Peter::OnTimeout"); - closeclientdialog; - close; -} - -// Besides the door, Alige is hiding himself and would rather not be disturbed -000-2-2,24,31,0 script LeftDoor NPC_HIDDEN,0,0,{ - -OnTouch: - mesn "Narrator"; - mesc(l("It seems that you need a key to open this door."), 9); - next; - mesc(l("What do you want to do?"), 9); - next; - - menu - rif(countitem(JohanneKey) > 0, l("Use the key.")), L_Warp, - l("Break the door."), L_Break, - l("Go away."), -; - - closeclientdialog; - close; - -L_Break: - - mes ""; - mesn "Narrator"; - mesc(l("You hear a loud scream. It must be the creaking of the wooden door..."), 9); - - close; - -L_Warp: - mes ""; - mesn "Narrator"; - mesc(l("Wait, it seems someone is blocking the door from the other side!"), 9); - - close; -} diff --git a/npc/000-2-2/mapflags.txt b/npc/000-2-2/mapflags.txt deleted file mode 100644 index 5202b332..00000000 --- a/npc/000-2-2/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-2-2 mapflag nosave 000-2-1,50,38 diff --git a/npc/000-2-2/ratto.txt b/npc/000-2-2/ratto.txt deleted file mode 100644 index d30ccd17..00000000 --- a/npc/000-2-2/ratto.txt +++ /dev/null @@ -1,98 +0,0 @@ -// Evol Script. -// Author: -// Ablu -// Alastrim -// Jesusalva -// Reid -// Description: -// Ratto killer. -// The only "lose" conditions are: -// 1- dying, but this is not handled anywhere -// 2- Time running out, Peter handles that automatically. -// Note that if you die here, you won't be able to return and will need to -// start the quest over again. (I wonder why it is not handled by an OnDeath event) -// iirc, logout will automatically destroy the instance and clear timers, so it -// doesn't needs the script writer to handle logout cleanup (only death). - -000-2-2,0,0,0 script RattosControl NPC_HIDDEN,{ - end; - -// Each monster on the basement have its own respawn cycle. -// We use a XOR (^) operand to mark that the killed monster is not dead anymore. -// This is to reproduce as accurate as possible the legacy behavior of the quest. -OnRatto1Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^1; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto1Death"; - end; - -OnRatto2Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^2; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto2Death"; - end; - -OnRatto3Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^4; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto3Death"; - end; - -OnRatto4Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^8; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto4Death"; - end; - -// When you kill a monster on basement, we must check the mob as dead, see if you -// finally killed the last one and quest is complete, and add a timer to respawn it -// after 1m25s (for flavor purposes, makes quest harder though) -OnRatto1Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|1; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl::OnRatto1Respawn"); - end; - -OnRatto2Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|2; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl::OnRatto2Respawn"); - end; - -OnRatto3Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|4; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl::OnRatto3Respawn"); - end; - -OnRatto4Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|8; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl::OnRatto4Respawn"); - end; - -// This label is reached when all rattos are dead. We clear the respawn timers -// (as we are going to delete the instance map anyway), warp you outside, and -// from there onwards, Peter handles properly rewarding you. -OnVictor: - deltimer("RattosControl::OnRatto1Respawn"); - deltimer("RattosControl::OnRatto2Respawn"); - deltimer("RattosControl::OnRatto3Respawn"); - deltimer("RattosControl::OnRatto4Respawn"); - addtimercount("Peter::OnTimeout", 5000); - addtimer(5000, "Peter::OnDone"); - dispbottom l("It looks like all monsters were killed."); - end; -} diff --git a/npc/000-2-3/_import.txt b/npc/000-2-3/_import.txt deleted file mode 100644 index 16842f77..00000000 --- a/npc/000-2-3/_import.txt +++ /dev/null @@ -1,10 +0,0 @@ -// Map 000-2-3: Nard's Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-2-3/_warps.txt", -"npc/000-2-3/box.txt", -"npc/000-2-3/elmo.txt", -"npc/000-2-3/hammock.txt", -"npc/000-2-3/mapflags.txt", -"npc/000-2-3/nard.txt", -"npc/000-2-3/piourocket.txt", -"npc/000-2-3/sailors.txt", diff --git a/npc/000-2-3/_warps.txt b/npc/000-2-3/_warps.txt deleted file mode 100644 index f5c0e1e7..00000000 --- a/npc/000-2-3/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-3: Nard's Room warps -000-2-3,19,27,0 warp #000-2-3_19_27 0,0,000-2-0,32,28 diff --git a/npc/000-2-3/box.txt b/npc/000-2-3/box.txt deleted file mode 100644 index 30ea0a72..00000000 --- a/npc/000-2-3/box.txt +++ /dev/null @@ -1,112 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Captain Nard dialogs. -// Nard does the introduction with a small quest. -// This quest is meant to teach the player how to use a weapon,and to bring food to the ship. -// 4 bits array: -// ShipQuests -// Variable: -// ShipQuests_Nard -// Values: -// 0 Introduction of the boxes and Nard. This is displayed when the player never spoke to Nard or his box. -// 1 Nard spoke and gave access to the outdoor of the ship. -// 2 Completed the Gugli quest. -// 3 ChefGado Quest accepted. -// 4 ChefGado Quest completed and "Introduction" chapter finalized. -// 5 Reward taken from the box. - -000-2-3,25,24,0 script Box NPC_HAT_BOX,{ - .@q = getq(ShipQuests_Nard); - - mesn "Narrator"; - mesc(l("Some Bandanas and Sailor Hats are inside this box."), 9); - next; - mesc(l("What do you wish to do?"), 9); - next; - - menu - l("Take a Bandana."), -, - l("Nothing."), L_Quit; - - if (.@q == 0) goto L_NoQuest; - if (.@q == 4) goto L_Give; - if (.@q > 4) goto L_Already; - - setcamnpc "Nard"; - mes ""; - mesn "Nard"; - mesq l("Please don't touch these hats, they are for crew members only."); - - close; - -L_NoQuest: - mes ""; - mesn "Narrator"; - mesc(l("Nard looks surprised and stops you."), 9); - next; - - setcamnpc "Nard"; - mesn "Nard"; - mesq l("You like these hats, right?"); - next; - mesq l("How about I ask you to help the crew? It would mean that you're one of us and that you will be able to get one of these hats."); - next; - mesq l("We need as many hands as possible to explore the island out there, and to get some new food."); - next; - mesq l("You could meet some of the other sailors this way, and... Getting this hat of course, will be a sign of you becoming part of our crew."); - next; - mesq l("What do you think?"); - next; - - menu - l("Why not, I've got plenty of free time."), -, - l("I think that I'm still a bit sick."), L_Quit; - - mes ""; - mesn "Nard"; - mesq l("Great!"); - next; - mesq l("I give you this key, it opens all the doors on this ship."); - next; - mesq l("Now go outside and talk with Gugli, he'll tell you what provisions we need."); - next; - - inventoryplace JohanneKey, 1; - setq ShipQuests_Nard, 1; - getitem JohanneKey, 1; - - close; - -L_Give: - setcamnpc "Nard"; - mes ""; - mesn "Nard"; - mesq l("Congrats, you are now part of the crew. Thanks again for your help."); - - inventoryplace Bandana, 1; - - setq ShipQuests_Nard, 5; - getitem Bandana, 1; -// Need to add a skill for the crew at this line. - - close; - -L_Already: - setcamnpc "Nard"; - mes ""; - mesn "Nard"; - mesq l("You already took a @@, please put this one back in the box.", getitemlink(Bandana)); - - close; - -L_Quit: - closeclientdialog; - close; - -OnInit: - .distance = 1; - end; -} diff --git a/npc/000-2-3/elmo.txt b/npc/000-2-3/elmo.txt deleted file mode 100644 index 831b07be..00000000 --- a/npc/000-2-3/elmo.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Elmo's second dialog. - -000-2-3,27,27,0 script Elmo NPC_ELMO,{ - function got_money { - speech S_LAST_NEXT, - l("Be patient a little while longer, in the next few days we will arrive at the port of Artis..."), - l("If you feel bored or like running around in circles, you may want to talk with the other sailors around here to get some tasks to do."), - l("From what I heard, my brother Gugli needs the help of as many people as possible in order to collect a lot of neat things that can be found on this island."), - l("Other than that, I don't know much about what else is going on, so directly asking the Cap'tain about it could be a good idea."); - - goodbye; - } - - if (getq(General_Narrator) > 0) - { - sailortalk; - } - - if (getq(ShipQuests_ArpanMoney) >= 2) - { - got_money; - } - - speech S_LAST_NEXT, - l("Hey you, sorry for leaving your room so quickly. I needed to speak with the captain about the food reserves. You know, now that we have a new mouth to feed, we need to check what we have."), - l("So, how is it going? Did you meet any other crew members yet?"); - - switch (select(l("Yes, Arpan gave me these clothes."), l("Not yet."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh good! Did he give you your money back as well?"); - - switch (select(l("Yes he did."), l("He told me nothing about that."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok, be patient a little while longer, in the next few days we will arrive at the port of Artis..."); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Hehe, sometimes he gets his head in the clouds, You should go ask him about that."); - setq ShipQuests_ArpanMoney, 1; - break; - } - - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You should go see them."), - l("You still got a few days before we arrive at the port, maybe you can learn something from them?"); - - break; - } - - goodbye; - -OnInit: - .distance = 5; - end; -} diff --git a/npc/000-2-3/hammock.txt b/npc/000-2-3/hammock.txt deleted file mode 100644 index 0ceeadbf..00000000 --- a/npc/000-2-3/hammock.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the top level of the ship. - -000-2-3,28,24,0 script #name5 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchRight; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerRight; -} diff --git a/npc/000-2-3/mapflags.txt b/npc/000-2-3/mapflags.txt deleted file mode 100644 index b04a0fc9..00000000 --- a/npc/000-2-3/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-2-3 mapflag town diff --git a/npc/000-2-3/nard.txt b/npc/000-2-3/nard.txt deleted file mode 100644 index 05630e05..00000000 --- a/npc/000-2-3/nard.txt +++ /dev/null @@ -1,341 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Captain Nard dialogs. -// Nard does the introduction with a small quest. -// This quest is meant to teach the player how to use a weapon,and to bring food to the ship. -// 4 bits array: -// ShipQuests -// Variable: -// 0 ShipQuests_Nard -// 1 ShipQuests_Gugli -// 2 ShipQuests_ChefGado -// Values: -// 00 Introduction of the boxes and Nard. This is displayed when the player never spoke to Nard or his box. -// 01 Nard spoke and gave access to the outdoor of the ship. -// 02 Completed the Gugli quest. -// 03 ChefGado Quest accepted. -// 04 ChefGado Quest completed and "Introduction" chapter finalized. -// 05 Reward taken from the box. -// 06 Intro finished -// 10 Never talked with Gugli. -// 11 Gugli gives you the task. -// 12 Gave all of the boxes to Gugli. - -000-2-3,25,26,0 script Nard NPC_NARD,{ - .@nard = getq(ShipQuests_Nard); - .@gugli = getq(ShipQuests_Gugli); - .@gado = getq(ShipQuests_ChefGado); - -L_Checker: - if (.@gado > 3 && .@nard == 3) goto L_ChefQuestComplete; - if (.@nard == 2) goto L_ChefQuestStart; - if (.@nard == 3) goto L_ChefQuestGiven; - if (.@nard == 4) goto L_Reward; - if (.@nard > 5) goto L_GoBackArtis; - if (.@nard > 4) goto L_Already; - if (.@gugli == 2) goto L_Done; - if (.@nard == 1) goto L_NotYet; - - mesn; - mesq l("Hello."); - next; - mesq l("Let me introduce myself, I am Nard, captain of this ship."); - next; - mesq l("I am pleased to see that you have woken up and are active. Elmo came here to tell me this good news!"); - next; - - setcamnpc "Elmo"; - mesn "Elmo"; - mesq l("Oh... Err, yes I did, or, well, good day to you!"); - next; - restorecam; - - mesn; - mesq l("Hehehe, he is a bit nervous, please forgive him, it is not everyday we have a new member in the crew!"); - next; - mesq l("So, how do you feel? I see that Julia did a marvelous job! You look like you're in good health now."); - next; - -L_Menu: - menu - l("I feel ok."), L_Ok, - rif(islegacyaccount(), l("I only want to reach Artis, can we skip this?")), L_Skip, - l("Who's this Julia?"), L_Julia, - l("I'm a bit sick..."), -; - - mes ""; - mesn; - mesq l("Oh, I was going to ask you if you wanted to help the crew search for some food and explore the island out there."); - next; - -L_MenuQuest: - menu - l("What do you need?"), -, - l("Is there a reward?"), L_NeedHead, - l("Wait, you never came here before?"), L_DrasilIsland; - - mes ""; - mesn; - mesq l("Oh! I like that sort of answer!"); - next; - mesq l("We can use a helping hand on the island."); - next; - - goto L_NeedContent; - -L_NeedHead: - mes ""; - mesn; - mesq l("Of course there is a reward for your task."); - next; - mesq l("Hard work always pays off!"); - next; - mesq l("What? It's not good enough?"); - next; - -L_NeedContent: - mesq l("Our crew is like a family, and if you agree to help us, I would like to invite you to join our family!"); - next; - mesq l("Hmm, I'll also give you one of these hats from the box near you, but only after you complete your task!"); - next; - mesq l("Here, take this key, it opens all the doors on this ship."); - next; - mesq l("Now go outside and talk to Gugli, he'll tell you what we need."); - next; - - inventoryplace JohanneKey, 1; - - setq ShipQuests_Nard, 1; - getitem JohanneKey, 1; - - close; - -L_Ok: - mes ""; - mesn; - mesq l("Good to know."); - next; - mesq l("We have made a stop at a little island, before making it on to the port of Artis."); - next; - mesq l("It would be good for you to do some exercise, the ship isn't big enough for that."); - next; - - goto L_SpecialTask; - -L_Julia: - mes ""; - mesn; - mesq l("You have an awful case of amnesia."); - next; - mesq l("She is the nurse and shipkeeper of this ship."); - next; - mesq l("But most important, she is the one who took care of you when you were unconscious."); - next; - -L_SpecialTask: - mesq l("I know that you are just starting to feel better, but I'd like to give you a special task."); - next; - - goto L_MenuQuest; - -L_DrasilIsland: - mes ""; - mesn; - mesq l("To be honest, no, never."); - next; - mesq l("But discovering new territories is probably the best thing that can happen to sailors, don't you think?"); - next; - mesq l("I'm really excited, this place reminds me of an ancient mythical tree, you might know what I'm talking about..."); - emotion E_WINK; - next; - mesq l("As captain of this ship, I officially name this newly discovered land the ##BDrasil Island##b!"); - next; - mesq l("Now, lets get back to business."); - next; - - goto L_NeedContent; - -L_NotYet: - mesn; - mesq l("You still haven't completed your tasks."); - close; - -L_Done: - mesn; - mesq l("Hi @@.", strcharinfo(0)); - next; - mesq l("Elmo and Gugli told me that you did all of the tasks outside, congrats!"); - - setq ShipQuests_Nard, 2; - next; - goto L_ChefQuestRedir; - -L_ChefQuestStart: - mesn; - mesq l("Elmo told me you are now considered family and are numbered among us in our activities on the island. I do so very much appreciate the efforts you did down there."); - next; - -L_ChefQuestRedir: - mesq l("Unfortunately, we still need help from you. This time it will be a delicate task, here onboard."); - next; - mesq l("Elmo brought reports to me about some frictions between my old and new lieutenants. You probably already met Julia and Chef Gado."); - next; - mesq l("They are each valued individuals and I need them both. In the past, I probably made my share of mistakes. I regret good management is so difficult. I was wondering if you could investigate and... Sort out this situation."); - next; - - select - l("Of the two of them, who has 'good' on their side?"); - - mes ""; - mesq l("I do not want to go pointing my finger at someone. I want to be honorable and fair, and I sense the same quality in you, so I put my trust in you. I am sure you will be able to judge and solve this troubling situation."); - - setq ShipQuests_Nard, 3; - - close; - -L_ChefQuestGiven: - mesn; - mesq l("It seems you still have some work to do."); - - close; - -L_ChefQuestComplete: - mesn; - mesq l("Congratulations!"); - next; - mesq l("You are now officially part of my crew! Thanks again for your help."); - next; - mesq l("Take your reward from the box next to my desk!"); - next; - - select - l("I will take it! Thank you captain!"); - - setq ShipQuests_Nard, 4; - getexp 50, 0; - -// Need to add a skill for the crew at this line. - mes ""; - -L_Skip: - mesn; - mesq l("Oh noes! I can't believe it!"); - next; - mesn; - mesq l("Well, I can bring you straight to Artis, but..."); - next; - mesn; - mesc l("\"You will forsake items, quests and experience from the tuto-- %s from my whole crew and whatnot.\"", "##9"+l("*cough cough*")+"##1"), 1; - next; - mesn; - mesq l("Oh, and it is not only that."); - next; - mesn; - mesc l("\"This decision cannot be reverted. Which means you may have extreme difficulty and end up losing this char!\""), 1; - next; - mesn; - mesq l("And if that still wasn't enough to make you change your mind..."); - next; - mesn; - mesc l("\"Deleting this char may (read: will) destroy the Legacy data associated to it!!\""), 1; - mesc l("i.e. Deleting the rEvolt char will delete the Legacy char associated to it. This includes levels and items."); // -- TRANSLATORS: i.e. = id est - next; - mesn; - mesq l("Are you absolutely, totally, certainly, completely sure, that you want a free, effortless ride to Artis, as weak and poorly equipped as you currently are?"); - next; - mesc l("This decision cannot be reverted. Think with attention!"), 1; - select - l("Actually, lets do the tutorial."), - l("Lemme do Drasil Island!"), - l("YES, BRING ME TO ARTIS."), - l("I changed my mind."); - mes ""; - if (@menu == 3) { - // Skip Drasil - setq ShipQuests_Julia, 2; - setq ShipQuests_Arpan, 3; - setq ShipQuests_Alige, 3; - setq ShipQuests_Peter, 15; - setq ShipQuests_Nard, 5; // NOTE: Completes the Beta - setq ShipQuests_Knife, 1; - setq ShipQuests_ArpanMoney, 3; - setq ShipQuests_Door, 1; - setq ShipQuests_Couwan, 2; - setq ShipQuests_TreasureChest, 1; - setq ShipQuests_Ale, 1; - setq ShipQuests_Astapolos, 1; - setq ShipQuests_Gulukan, 1; - setq ShipQuests_Jalad, 1; - setq ShipQuests_QMuller, 1; - setq ShipQuests_Tibbo, 1; - setq ShipQuests_Gugli, 2; - // Give Gado and Julia equal chances of winnning - setq ShipQuests_ChefGado, any(4,4,5,6); - // Automatically advance - mesc l("All Ship and Drasil Island Quests were auto-completed."), 1; - next; - goto L_Already; - } - mesn; - mesq l("Good! I was going to ask you if you wanted to help the crew search for some food and explore the island out there."); - next; - goto L_MenuQuest; - -L_Already: - speech - l("I recommend you to take a nap on the inferior level, we will soon leave this place."); - - close; - -L_GoBackArtis: - checkclientversion; - speech S_LAST_NEXT, - l("Enough of this island?"), - l("Where would you like to go now?"); - switch (select(l("Let's go to Artis."), - l("Tell me, where are we right now?"), - l("I would like to stay here a bit more."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Let's set sail then!"); - - savepoint "001-2-22", 50, 38; - if (!getmapxy(.@map$, .@x, .@y, 0)) - { - warp "001-2-24", .@x, .@y; - } - else - { - warp "001-2-24", 22, 27; - } - - closeclientdialog; - close; - - case 2: - closeclientdialog; - npctalk3 l("This is Drasil Island, I named it after an ancient mythical tree."); - close; - - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok I stay here with my paperwork if you need my help."); - - closeclientdialog; - close; - } - -L_Reward: - mesn; - mesq l("Hey! There's a reward for you in the box next to me!"); - - close; - -OnInit: - .distance = 5; - end; -} diff --git a/npc/000-2-3/piourocket.txt b/npc/000-2-3/piourocket.txt deleted file mode 100644 index e6ff2039..00000000 --- a/npc/000-2-3/piourocket.txt +++ /dev/null @@ -1,29 +0,0 @@ -// Evol scripts. -// Author: -// Ablu -// Description: -// Jumping piou. - -000-2-3,27,23,4 script #piourocket NPC_PIOU_ROCKET,{ - - .@now = gettimetick(2); - - if (.@now - .last > 1) - { - .dir = 2; - .last = .@now; - specialeffect(26); - initnpctimer; - } - - close; - -OnTimer1420: - .dir = 4; - stopnpctimer; - end; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/000-2-3/sailors.txt b/npc/000-2-3/sailors.txt deleted file mode 100644 index 9287ed4b..00000000 --- a/npc/000-2-3/sailors.txt +++ /dev/null @@ -1,47 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Qwerty Dragon -// Reid -// Description: -// End of introduction with Nard and Elmo talking about the player. - -000-2-3,21,28,0 script AreaTop NPC_HIDDEN,0,5,{ - -OnTouch: - if (getq(ShipQuests_Door) == 1) end; - setq ShipQuests_Door, 1; - - setcamnpc "Elmo"; - mesn "Elmo"; - mesq l("So that's why we wanted to warn you. This sign on the raft indicates some relation to that guild."); - next; - - setcamnpc "Nard"; - mesn "Captain Nard"; - mesq l("I see. Warn the other sailors about this. But any member of the Legion of Aemil would be our friend and ally."); - next; - - setcamnpc "Elmo"; - mesn "Elmo"; - mesq l("I will."); - next; - mesq l("About the Legion of Aemil, I'm not sure about them, frankly."); - next; - mesq l("There are rumors going around that they did some monstrous things and that they are hiding quite a lot from us."); - next; - - setcamnpc "Nard"; - mesn "Captain Nard"; - mesq l("This kind of talk should be taken with a grain of salt, but I agree and admit that I too am skeptical, so keep your eyes open."); - next; - - mesq l("But... If Julia is right with the amnesia ... We don't need to worry. At least not yet."); - next; - - setcamnpc "Elmo"; - mesn "Elmo"; - mesq l("Sure, cap'tain."); - - close; -} diff --git a/npc/000-2-4/_import.txt b/npc/000-2-4/_import.txt deleted file mode 100644 index 579e400a..00000000 --- a/npc/000-2-4/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 000-2-4: Alige's Hiding Place -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/000-2-4/_mobs.txt", -"npc/000-2-4/_warps.txt", -"npc/000-2-4/alige.txt", -"npc/000-2-4/mapflags.txt", diff --git a/npc/000-2-4/_mobs.txt b/npc/000-2-4/_mobs.txt deleted file mode 100644 index 56230670..00000000 --- a/npc/000-2-4/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-4: Alige's Hiding Place mobs -000-2-4,30,30,1,1 monster Cuco 1020,1,80000,90000 diff --git a/npc/000-2-4/_warps.txt b/npc/000-2-4/_warps.txt deleted file mode 100644 index adfe9440..00000000 --- a/npc/000-2-4/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 000-2-4: Alige's Hiding Place warps -000-2-4,41,30,0 warp #000-2-4_41_30 0,0,000-2-2,25,31 diff --git a/npc/000-2-4/alige.txt b/npc/000-2-4/alige.txt deleted file mode 100644 index 500a57a4..00000000 --- a/npc/000-2-4/alige.txt +++ /dev/null @@ -1,38 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta - -000-2-4,38,22,0 script Alige#000-2-4 NPC_ALIGE_BARREL,2,2,{ - npctalk3 l("Protect me, please..."); - end; - -OnTouch: - .dir = LEFT; - stopnpctimer; - initnpctimer; - end; - -OnUnTouch: - .dir = UP; - stopnpctimer; - initnpctimer; - end; - -OnTimer190: - switch (.dir) - { - case UP: - .dir = DOWN; - break; - case LEFT: - .dir = RIGHT; - break; - } - stopnpctimer; - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/000-2-4/mapflags.txt b/npc/000-2-4/mapflags.txt deleted file mode 100644 index 9c033937..00000000 --- a/npc/000-2-4/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -000-2-4 mapflag nosave 000-2-1,50,38 diff --git a/npc/001-1/_import.txt b/npc/001-1/_import.txt index 18f8e363..5333d5d4 100644 --- a/npc/001-1/_import.txt +++ b/npc/001-1/_import.txt @@ -1,45 +1,24 @@ -// Map 001-1: Artis +// Map 001-1: Tulimshar Port // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-1/_mobs.txt", "npc/001-1/_warps.txt", -"npc/001-1/artaxe.txt", -"npc/001-1/beuss.txt", -"npc/001-1/calypsan.txt", -"npc/001-1/carmie.txt", -"npc/001-1/chelios.txt", -"npc/001-1/cookiemaster.txt", -"npc/001-1/devis.txt", -"npc/001-1/doors.txt", -"npc/001-1/elmo.txt", -"npc/001-1/enora.txt", -"npc/001-1/eugene.txt", -"npc/001-1/fexil.txt", -"npc/001-1/flags.txt", -"npc/001-1/flyingpiou.txt", -"npc/001-1/harbours.txt", -"npc/001-1/juscare.txt", -"npc/001-1/katja.txt", -"npc/001-1/koga.txt", -"npc/001-1/lucas.txt", -"npc/001-1/manhole.txt", +"npc/001-1/adrian.txt", +"npc/001-1/ched.txt", +"npc/001-1/children.txt", +"npc/001-1/constable.txt", +"npc/001-1/dock.txt", +"npc/001-1/eomie.txt", +"npc/001-1/ferry_master.txt", +"npc/001-1/gate_guards.txt", +"npc/001-1/gossip.txt", +"npc/001-1/guards.txt", +"npc/001-1/inac.txt", "npc/001-1/mapflags.txt", -"npc/001-1/marine.txt", -"npc/001-1/merlin.txt", -"npc/001-1/mouboo.txt", -"npc/001-1/nalkri.txt", -"npc/001-1/panels.txt", -"npc/001-1/pious.txt", -"npc/001-1/qonan.txt", -"npc/001-1/qpid.txt", -"npc/001-1/rowboat.txt", -"npc/001-1/rowboathelper.txt", -"npc/001-1/rumly.txt", -"npc/001-1/salem.txt", -"npc/001-1/shop.txt", -"npc/001-1/sign.txt", -"npc/001-1/sophialla.txt", -"npc/001-1/taree.txt", -"npc/001-1/treeleaf.txt", -"npc/001-1/trees.txt", -"npc/001-1/wateranimation.txt", -"npc/001-1/xilaxa.txt", +"npc/001-1/north_shops.txt", +"npc/001-1/npcs.txt", +"npc/001-1/sewer_east.txt", +"npc/001-1/sewer_north.txt", +"npc/001-1/stat_reset.txt", +"npc/001-1/tinris.txt", +"npc/001-1/tombstones.txt", +"npc/001-1/weellos.txt", diff --git a/npc/001-1/_mobs.txt b/npc/001-1/_mobs.txt index a2b6e5f1..df91a1df 100644 --- a/npc/001-1/_mobs.txt +++ b/npc/001-1/_mobs.txt @@ -1,32 +1,7 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-1: Artis mobs -001-1,0,0,0,0 monster Piou 1002,2,15000,60000 -001-1,0,0,0,0 monster Piousse 1003,1,15000,150000 -001-1,174,34,11,15 monster Fluffy 1022,6,18000,100000 -001-1,199,48,2,5 monster Fluffy 1022,4,18000,100000 -001-1,174,34,11,15 monster Piou 1002,1,12000,60000 -001-1,35,62,1,4 monster Pikpik 1013,3,40000,20000 -001-1,26,96,3,2 monster Pikpik 1013,1,40000,20000 -001-1,42,137,4,1 monster Pikpik 1013,2,40000,20000 -001-1,45,136,0,0 monster Crocotree 1010,1,420000,240000 -001-1,70,136,0,0 monster Crocotree 1010,1,420000,240000 -001-1,37,126,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,34,130,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,41,129,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,36,77,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,37,79,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,39,73,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,43,70,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,48,71,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,40,67,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,46,65,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,152,26,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,152,32,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,155,37,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,158,29,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,203,51,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,198,50,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,199,55,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,185,65,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,191,63,0,0 monster Manana Tree 1017,1,420000,240000 -001-1,200,66,0,0 monster Manana Tree 1017,1,420000,240000 +// Map 001-1: Tulimshar Port mobs +001-1,32,59,5,5 monster Ratto 1005,8,100000,30000 +001-1,45,100,5,5 monster Ratto 1005,8,100000,30000 +001-1,37,75,4,17 monster Clover Patch 1033,8,100000,30000 +001-1,86,84,32,27 monster Piou 1002,11,100000,30000 +001-1,86,84,32,27 monster Clover Patch 1033,8,100000,30000 diff --git a/npc/001-1/_warps.txt b/npc/001-1/_warps.txt index c084792b..33f9ba6c 100644 --- a/npc/001-1/_warps.txt +++ b/npc/001-1/_warps.txt @@ -1,445 +1,16 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-1: Artis warps -001-1,51,80,0 script #001-1_51_80_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-4", 48, 40; -close; - -OnUnTouch: - doevent "#001-1_51_80::OnUnTouch"; -} -001-1,51,80,0 script #001-1_51_80 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,70,77,0 script #001-1_70_77_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-2", 38, 38; -close; - -OnUnTouch: - doevent "#001-1_70_77::OnUnTouch"; -} -001-1,70,77,0 script #001-1_70_77 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,51,65,0 script #001-1_51_65_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-0", 30, 34; -close; - -OnUnTouch: - doevent "#001-1_51_65::OnUnTouch"; -} -001-1,51,65,0 script #001-1_51_65 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,55,71,0 script #001-1_55_71_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-0", 37, 45; -close; - -OnUnTouch: - doevent "#001-1_55_71::OnUnTouch"; -} -001-1,55,71,0 script #001-1_55_71 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,168,98,0 script #001-1_168_98_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-16", 32, 35; -close; - -OnUnTouch: - doevent "#001-1_168_98::OnUnTouch"; -} -001-1,168,98,0 script #001-1_168_98 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,194,109,0 warp #001-1_194_109 0,0,001-2-21,20,28 -001-1,100,37,0 warp #001-1_100_37 0,0,001-2-19,32,39 -001-1,104,43,0 warp #001-1_104_43 0,0,001-2-19,41,49 -001-1,134,83,0 warp #001-1_134_83 0,0,001-2-28,60,31 -001-1,118,88,0 script #001-1_118_88_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-28", 29, 41; -close; - -OnUnTouch: - doevent "#001-1_118_88::OnUnTouch"; -} -001-1,118,88,0 script #001-1_118_88 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,182,74,0 script #001-1_182_74_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-18", 39, 35; -close; - -OnUnTouch: - doevent "#001-1_182_74::OnUnTouch"; -} -001-1,182,74,0 script #001-1_182_74 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,163,70,0 script #001-1_163_70_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-26", 28, 42; -close; - -OnUnTouch: - doevent "#001-1_163_70::OnUnTouch"; -} -001-1,163,70,0 script #001-1_163_70 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,132,67,0 script #001-1_132_67_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-15", 34, 45; -close; - -OnUnTouch: - doevent "#001-1_132_67::OnUnTouch"; -} -001-1,132,67,0 script #001-1_132_67 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,101,107,0 script #001-1_101_107_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-27", 35, 34; -close; - -OnUnTouch: - doevent "#001-1_101_107::OnUnTouch"; -} -001-1,101,107,0 script #001-1_101_107 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,89,65,0 script #001-1_89_65_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-7", 36, 45; -close; - -OnUnTouch: - doevent "#001-1_89_65::OnUnTouch"; -} -001-1,89,65,0 script #001-1_89_65 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,57,41,0 warp #001-1_57_41 0,0,001-2-33,34,45 -001-1,142,30,0 script #001-1_142_30_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-12", 34, 35; -close; - -OnUnTouch: - doevent "#001-1_142_30::OnUnTouch"; -} -001-1,142,30,0 script #001-1_142_30 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,128,30,0 script #001-1_128_30_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-1", 37, 40; -close; - -OnUnTouch: - doevent "#001-1_128_30::OnUnTouch"; -} -001-1,128,30,0 script #001-1_128_30 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,104,32,0 script #001-1_104_32_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-19", 41, 30; -close; - -OnUnTouch: - doevent "#001-1_104_32::OnUnTouch"; -} -001-1,104,32,0 script #001-1_104_32 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,107,49,0 script #001-1_107_49_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-20", 33, 34; -close; - -OnUnTouch: - doevent "#001-1_107_49::OnUnTouch"; -} -001-1,107,49,0 script #001-1_107_49 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,148,54,0 script #001-1_148_54_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-11", 46, 45; -close; - -OnUnTouch: - doevent "#001-1_148_54::OnUnTouch"; -} -001-1,148,54,0 script #001-1_148_54 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,135,49,0 script #001-1_135_49_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-10", 51, 44; -close; - -OnUnTouch: - doevent "#001-1_135_49::OnUnTouch"; -} -001-1,135,49,0 script #001-1_135_49 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,118,49,0 script #001-1_118_49_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-10", 27, 44; -close; - -OnUnTouch: - doevent "#001-1_118_49::OnUnTouch"; -} -001-1,118,49,0 script #001-1_118_49 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,49,96,0 script #001-1_49_96_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-31", 32, 39; -close; - -OnUnTouch: - doevent "#001-1_49_96::OnUnTouch"; -} -001-1,49,96,0 script #001-1_49_96 NPC_ARTIS_DOOR,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-1,198,61,0 warp #001-1_198_61 0,0,001-3-0,198,59 +// Map 001-1: Tulimshar Port warps +001-1,63,119,0 warp #001-1_63_119 4,0,002-1,63,21 +001-1,103,119,0 warp #001-1_103_119 4,0,002-1,103,21 +001-1,55,71,0 warp #001-1_55_71 0,0,001-2,31,27 +001-1,52,71,0 warp #001-1_52_71 0,0,001-2,28,27 +001-1,49,71,0 warp #001-1_49_71 0,0,001-2,25,27 +001-1,114,99,0 warp #001-1_114_99 0,0,001-2,25,64 +001-1,27,32,0 warp #001-1_27_32 0,0,001-2,28,101 +001-1,37,32,0 warp #001-1_37_32 0,0,001-2,71,101 +001-1,55,34,0 warp #001-1_55_34 1,0,001-2,104,101 +001-1,52,22,0 warp #001-1_52_22 0,0,001-2,95,52 +001-1,57,22,0 warp #001-1_57_22 0,0,001-2,114,52 +001-1,28,23,0 warp #001-1_28_23 0,0,001-2,28,87 +001-1,28,44,0 warp #001-1_28_44 0,0,021-3,29,61 +001-1,59,98,0 warp #001-1_59_98 0,0,001-2,65,25 diff --git a/npc/001-1/adrian.txt b/npc/001-1/adrian.txt new file mode 100755 index 00000000..03ec3802 --- /dev/null +++ b/npc/001-1/adrian.txt @@ -0,0 +1,42 @@ +001-1,113,64,0 script Adrian NPC213,{ + mes "[Adrian]"; + mes "\"Hello. Are you here to pick up some luggage?\""; + if (QL_KYLIAN == 1) + menu + "Yes. Kylian sent me to get his luggage.",L_Get, + "No.",L_No; + menu + "No.",L_No; +L_No: + next; + mes "[Adrian]"; + mes "\"Too bad. I'd like to go get a beer, but I have to wait here until all the luggage is picked up.\""; + mes "He sighs."; + goto L_close; + +L_Get: + next; + mes "[Adrian]"; + mes "\"Wonderful! Please show me your ticket.\""; + mes "He checks the paper Kylian gave you and then gives you a critical look."; + next; + getinventorylist; + if ((checkweight("LeatherSuitcase", 1) == 0) || (@inventorylist_count == 100)) + goto L_Inventory; + mes "[Adrian]"; + mes "\"Alright. Here it is. Good luck carrying that thing.\""; + mes "Adrain hands you a very heavy suitcase."; + getitem "LeatherSuitcase", 1; + QL_KYLIAN = 2; + goto L_close; + +L_Inventory: + mes "[Adrian]"; + mes "\"The suitcase is rather heavy. No offense, but you don't look like you can carry it.\""; + mes "Maybe you should get rid of some of the other stuff you're carrying.\""; + goto L_close; + +L_close: + @inventorylist_count = 0; + close; +} diff --git a/npc/001-1/artaxe.txt b/npc/001-1/artaxe.txt deleted file mode 100644 index f1d63d46..00000000 --- a/npc/001-1/artaxe.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Legion NPC blocking the north road of Artis. - -001-1,90,31,0 script Artaxe NPC_ARTAXE,{ - speech S_LAST_NEXT, - l("Sorry buddy, you can't pass by this way, we're moving some furniture."), - l("Come back later!"); - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/beuss.txt b/npc/001-1/beuss.txt deleted file mode 100644 index fd334392..00000000 --- a/npc/001-1/beuss.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Angry member of the Legion of Aemil. - -001-1,45,48,0 script Beuss NPC_BEUSS,{ - stopnpctimer; - initnpctimer; - .dir = 4; - mesn; - mesq l("You seem pathetically weak. What is such boneless jelly like you doing around here?"); - - goto L_Close; - -L_Close: - close; - -OnTimer10000: - .dir = 2; - stopnpctimer; - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/calypsan.txt b/npc/001-1/calypsan.txt deleted file mode 100644 index 46c4b84e..00000000 --- a/npc/001-1/calypsan.txt +++ /dev/null @@ -1,104 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Dye seller, she sells and explain how works dye cards. -// Version: -// 2016.019 "Under Construction". -// Variables: -// ArtisQuests_Fexil -// Quest states: -// 0 -- not started -// 1 -- Lloyd warned about the quest -// 2 -- Fexil explain what he needs -// 3 -- Fexil buy every fur that the pc bring to him - -001-1,47,126,0 script Calypsan#001-1 NPC_CALYPSAN,{ - - function explain_dyes { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Look at your equipment, can you guess what material it is made from?"), - l("Seek a colorant for that material:"), - l("Cotton, Silk, leather, ..."), - l("Zinc-Titanium Oxide, Phthalocyanides, Cadmiums, Lazulite..."), - l("Colorant is not the yeying color. Some wear out from light, others look great but inflict itai-itai, and others become spotty or wash-away."), - l("What yoiis should know:"), - l("1: The type of item yoiis want to dye."), - l("2: What material it is made from."), - l("3: Which colorants can dye it."), - l("4: How many cards your item can contain."), - l("Exemple for yoiis:"), - l("Take an @@ and a @@, yeye obtains a @@.", getitemlink(ArtisTankTop), getitemlink(RedCottonDye), getitemlink(ArtisTankTop, RedCottonDye)), - l("If yoiis wants to see a different use for the cards he can yeye for Resa at the light armor shop for a description of the styling cards."); - } - - function sell_dye { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("For what kind of tissue?"); - .@tissue_type = select(l("Cotton"), l("Silk")); - - closeclientdialog; - switch (.@tissue_type) - { - case 1: - shop "Cotton#Dye001-1"; - break; - case 2: - shop "Silk#Dye001-1"; - break; - default: - consolemes(CONSOLEMES_ERROR, "Calypsan script error, tissue_type is incorrect"); - break; - } - close; - } - - speech S_LAST_NEXT, - l("Yoiis envies a rainbow in the sky?"), - l("It is possible to yeye your cloth with my beautiful dyes."), - l("What does yoiis want today?"); - - .@fexil = getq(ArtisQuests_Fexil); - - do - { - select - rif(.@fexil == 1, l("Have you seen Fexil?")), - menuaction(l("Trade")), - l("How do these dyes work?"), - l("I want to make my own dyes."), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - setcamnpc "Fexil#001-1"; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh yeye did, his store is just beside me!"), - l("Yoiis should look there."); - restorecam; - - break; - case 2: - sell_dye; - close; - - case 3: - explain_dyes; - break; - case 4: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Yoiis is not yet ready to make his own dyes."), - l("But in the future I might be able to help you create some of your own."); - break; - } - } while (@menu != 5); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-1/carmie.txt b/npc/001-1/carmie.txt deleted file mode 100644 index e87e7fe6..00000000 --- a/npc/001-1/carmie.txt +++ /dev/null @@ -1,68 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Reid -// Description: -// Carmie, walking NPC of the legion of Aemil on the center part of Artis. -// Variables: -// .@rand = Random number of sentences. - -001-1,86,66,0 script Carmie#001-1 NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ - - legiontalk; - - close; - -OnTimer1000: - domovestep; - -OnInit: - initpath "move", 89, 68, - "move", 89, 77, - "move", 84, 81, - "dir", LEFT, 0, - "wait", 2, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", RIGHT, 0, - "wait", 1, 0, - "move", 89, 85, - "dir", LEFT, 0, - "wait", 1, 0, - "dir", DOWN, 0, - "dir", RIGHT, 0, - "wait", 1, 0, - "move", 94, 81, - "dir", RIGHT, 0, - "wait", 2, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", LEFT, 0, - "wait", 1, 0, - "move", 89, 76, - "move", 89, 68, - "dir", LEFT, 0, - "wait", 2, 0, - "dir", DOWN, 0, - "wait", 4, 0, - "dir", RIGHT, 0, - "wait", 2, 0, - "move", 92, 66, - "dir", RIGHT, 0, - "wait", 2, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", LEFT, 0, - "wait", 1, 0, - "move", 86, 66, - "dir", LEFT, 0, - "wait", 2, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", RIGHT, 0, - "wait", 1, 0; - - initialmove; - initnpctimer; - .distance = 5; -} diff --git a/npc/001-1/ched.txt b/npc/001-1/ched.txt new file mode 100755 index 00000000..1c774e9e --- /dev/null +++ b/npc/001-1/ched.txt @@ -0,0 +1,9 @@ + +001-1,43,48,0 script Ched NPC113,{ + mes "[Ched]"; + mes "\"I'm trying to get work on my Alchemy homework, but I'm having some trouble.\""; + mes "\"I'm supposed to combine two potions to create a " + getitemlink("ConcentrationPotion") + ", but I can't seem to figure out which two to combine...\""; + next; + mes "\"Maybe I should go back to practicing '" + get(.invocation$, "detect-magic") + "' until I can make potions properly.\" %%6"; + close; +} diff --git a/npc/001-1/chelios.txt b/npc/001-1/chelios.txt deleted file mode 100644 index 84af2de1..00000000 --- a/npc/001-1/chelios.txt +++ /dev/null @@ -1,135 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Jesusalva -// Description: -// Blacksmith's assistant of Artis -// Variables: -// ArtisQuests_Enora -// Values: -// 0 Default. -// 1 BlackSmith quest delivered. -// 2 Chelios Quest given. -// 3 Chelios Quest done. -// 4 BlackSmith gave the sword. - -001-1,95,109,0 script Chelios NPC_CHELIOS,{ - function give_small_quest; - function more_info; - function quest_completed; - function blacksmith_house; - function explain_weapons; - - speech S_LAST_NEXT, l("Can I be of any help?"); - - do - { - .@enora = getq(ArtisQuests_Enora); - select - rif(.@enora == 1, l("I came to retrieve a package for Enora.")), - rif(.@enora == 3, l("I have your black iron.")), - rif(.@enora >= 2, l("Where is the Merchant Guild?")), - l("What is this building?"), - l("Why some of my weapons have a plus sign near them?"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - give_small_quest; - break; - case 2: - quest_completed; - break; - case 3: - more_info; - break; - case 4: - blacksmith_house; - break; - } - } while (@menu != 5); - - closeclientdialog; - goodbye; - close; - - -function give_small_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Her sword... I'm having some trouble finishing it."), - l("You see, Enora asked me to do a black iron sword, unfortunately I ran out of the material needed, and..."), - l("Only Don and the Merchant Guild have that kind of material in stock. It's called black iron."), - l("It's better to deal with the Merchant Guild than the old man, Don has this ability to hammer down your enthusiasm in sparkling fury!"), - l("If Enora wants her sword now, I need to ask for your help."); - - switch (select(l("Let's not keep her waiting."), - l("Not now."))) - { - case 1: - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I'll be here, come back when you'll be ready."); - - return; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you very much!"), - l("Talk with Lloyd the Banker in the Merchant Guild, it's a big building in the northern side of Artis, at the top of the small hill."); - - setq ArtisQuests_Enora, 2; - - return; -} - -function more_info { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's the big building in northern Artis, at the top of a small hill."), - l("Take the east road that goes to the north and follow it until you are on top of the cliff."), - l("That part of the town is called the Gilded Hill, it's also where the Merchant Guild has its headquarters."), //rich hill - l("Lloyd still owes me, but beware of those money-grabbers, or they might sell your own teeth to you!"); - - return; -} - -function quest_completed { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh... Awesome!"), - l("You were gone so I thought you let me down."), - l("Don gave me some black iron... after I asked him nearly ten times."), - l("But thank you anyway! I can refund him now!"), - l("Take the sword, and say hi to Enora for me!"); - - setq ArtisQuests_Enora, 4; - - return; -} - -function blacksmith_house { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Behind me? It's the Blacksmith House, the most renowned throughout Aemil."), - l("There are two shops inside, they are independent from the Merchant Guild of Artis."), - l("Now that I think about it, they are the only shops that are independent in Artis..."), - l("...it might be because of Don... he is the master blacksmith of this place and a model to me!"); - - return; -} - -function explain_weapons { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Weapons do not level up. But the more you use them, the more used to them you become."), - l("As you start to wield them better, you will be able to draw better their full potential."), - l("Your proeficiency with a certain weapon is noted at the side of it. Naturally, you cannot obtain proeficiency by purchasing someone else's weapon."); - mesn; - speech S_LAST_NEXT, - l("By the way, I'll explain you how crafting works when I become less lazy."); - return; -} - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/001-1/children.txt b/npc/001-1/children.txt new file mode 100755 index 00000000..0cbba1f8 --- /dev/null +++ b/npc/001-1/children.txt @@ -0,0 +1,90 @@ + +001-1,102,27,0 script Aisha NPC108,{ + @temp = rand(10); + if(@temp == 1) goto L_1; + if(@temp == 2) goto L_2; + if(@temp == 3) goto L_3; + if(@temp == 4) goto L_4; + if(@temp == 5) goto L_5; + if(@temp == 6) goto L_6; + if(@temp == 7) goto L_7; + if(@temp == 8) goto L_8; + if(@temp == 9) goto L_9; + goto L_1; + +L_1: + mes "[Aisha]"; + mes "\"Maggots are so slimey!\" %%^"; + goto L_close; + +L_2: + mes "[Aisha]"; + mes "\"Want to play ball with me?\""; + goto L_close; + +L_3: + mes "[Aisha]"; + mes "\"There are so many monsters! I hate scorpions!\" %%3"; + goto L_close; + +L_4: + mes "[Aisha]"; + mes "\"When I grow up, I want to be strong enough to kill a scorpion!\" %%="; + goto L_close; + +L_5: + mes "[Aisha]"; + mes "\"Mommy told me that you can sell the things that monsters drop.\""; + goto L_close; + +L_6: + mes "[Aisha]"; + mes "\"Have you tried to eat a roasted maggot? They're sooo yummy! Mommy says they're healthy too!\" %%8"; + goto L_close; + +L_7: + mes "[Aisha]"; + mes "\"I want to be a Doctor when I grow up!\""; + goto L_close; + +L_8: + mes "[Aisha]"; + mes "\"That earthquake was sooo scary! The earth was shaking and everything was breaking down... but now they've rebuilt everything.\""; + goto L_close; + +L_9: + mes "\"I know a very bad word. But I can't say it because monsters will come and get me if I do!\""; + next; + menu + "A bad word?", L_tell, + "Oh. You better keep it to yourself then.", L_close; + +L_tell: + mes "[Aisha]"; + mes "\"I heard my mother say it once, and she made me promise her to never say it. ##BNever##b!\""; + next; + menu + "If I promise to never tell anyone, can you tell me the word?", L_keepword, + "I understand. You don't need to tell me...", L_Giveword, + "Goodbye!", L_close; + +L_keepword: + mes "[Aisha]"; + mes "\"No.\""; + goto L_close; + +L_Giveword: + mes "[Aisha]"; + mes "Aisha looks around as she leans in and hushes you to silence. After a few seconds, she whispers to you:"; + mes "\"I like you, so I'll tell you the bad word. But you can't tell anyone else about it! The bad word is '" + get(.invocation$, "spell-aggravate") + ".'\""; + next; + + mes "[Aisha]"; + mes "Terrified, she looks around once more."; + mes "\"But you can't tell anyone!\" %%>"; + goto L_close; + +L_close: + @temp = 0; + close; +} diff --git a/npc/001-1/constable.txt b/npc/001-1/constable.txt new file mode 100755 index 00000000..36e3c224 --- /dev/null +++ b/npc/001-1/constable.txt @@ -0,0 +1,7 @@ + +001-1,50,74,0 script Constable Perry Graf NPC150,{ + mes "[Constable Perry Graf]"; + mes "\"Hello. Make sure to follow the rules!\""; + callfunc "GameRules"; + close; +} diff --git a/npc/001-1/cookiemaster.txt b/npc/001-1/cookiemaster.txt deleted file mode 100644 index 984c02aa..00000000 --- a/npc/001-1/cookiemaster.txt +++ /dev/null @@ -1,256 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Reid -// Description: -// Cookie NPC, beware, if you don't take your cookie, she'll keep it! -// Variables: -// General_Cookies -// Values: -// 0 Default, didn't get a cookie. -// 1 Get a cookie. - -001-1,39,38,0 script Cookie Master NPC_COOKIE_MASTER,{ - if ((countitem(517) == 0) && (getq(General_Cookies) == 1)) - goto L_LostCookie; - if (getq(General_Cookies) == 1) - goto L_GetCookie; - - mesn; - mesq l("Hey! Adventurer! Are you enjoying your life on Aemil?"); - next; - - select - l("Well in fact..."); - - mes ""; - mesn; - mesq l("Shht shht!"); - next; - mesq l("Don't tell me more, I know what you want..."); - next; - mesq l("A cookie!"); - next; - - menu - l("I'd love one!"), -, - l("No thank you, I'm fine. I'll come back later."), L_Bye; - - mes ""; - mesn; - mesq l("Of course you do! Just listen carefully to these words my sweet."); - next; - mesq l("Cookies are a source of life."); - next; - mesq l("Cookies provide you strength, health and cuteness."); - next; - mesq l("Cookies are awesome, so am I."); - - menu - l("Uhm... Your story seems..."), L_StorySeems, - l("Wait... That's not a proper place for a chef, what are you doing there?"), L_Presentation, - l("Exactly! Can I have one now?"), -; - -L_Check: - mes ""; - mesn; - mesq l("Let me check my cookie list..."); - next; - -// Beta3 Contributors. - if (strcharinfo(0) == "4144") goto L_Reward; - if (strcharinfo(0) == "Alige") goto L_Reward; - if (strcharinfo(0) == "enchilado") goto L_Reward; - if (strcharinfo(0) == "hal9000") goto L_Reward; - if (strcharinfo(0) == "Reid") goto L_Reward; - if (strcharinfo(0) == "Socapex") goto L_Reward; - if (strcharinfo(0) == "Kenny690") goto L_Reward; - if (strcharinfo(0) == "Nelson6e65") goto L_Reward; - if (strcharinfo(0) == "Steel Zenn") goto L_Reward; -// Aurora1 Contributors. - - mesq l("I'm sorry but I can't see your name anywhere."); - next; - mesq l("You see, folks around here that get my cookies have the distinction of being..."); - next; - - menu - l("Seriously? It's just a cookie you know... Tell me what I should do to get one."), L_BTaskExpanation, - l("Yes, yes I know... Too bad then. See you soon!"), L_Bye; - -L_StorySeems: - mes ""; - mesn; - mesq l("What about my story?"); - next; - - menu - l("It's interesting and exciting at the same time!"), -, - l("Honestly, it's quite far-fetched according to me."), L_Kick; - - mes ""; - menu - l("Too bad. I'm not hungry enough for these cookies of yours. Maybe I'll come back later."), L_Bye, - l("How can I get one of these cookies?"), -; - - mes ""; - mesn; - mesq l("It looks like you are curious, am I right?"); - next; - mesq l("Well, if you ever do want to join: 'Ye Merry Club Of Thee Bequeathed With Cookies'..."); - next; - -L_BTaskExpanation: - mes ""; - mesn; -L_TaskExpanation: - mesq l("You'll first need to help my friends."); - next; - mesq l("It is them, after all, who have the ultimate decision as to those I can give my cookies to."); - next; - - menu - l("So you're under the control of a dictatorship? That's... reassuring!"), L_Control, - l("Who are these friends?"), L_Friends; - -L_Friends: - mes ""; - mesn; - mesq l("Shht shht!"); - next; - mesq l("Don't say it so loudly, other people could hear us."); - next; - mesq l("My friends are... Well, you know... The creators."); - next; - mesq l("I can't give you a cookie for free. But I can give you this hint for how you may be added to my list."); - next; - mesq l("Now listen to and ponder my words..."); - next; - mesq l("If you see weird things here and there, or things that just shouldn't be, or even in your minds eye, things that you would like to see..."); - next; - mesq l("Simply contact them, by forum or wispers or irc. When you are helpful and kind, they respond in kind. And in time they may surely add you to my cookie list!"); - next; - - mesn "Narrator"; - mesc(l("This Cookie Master rewards people who contribute and develop this world."), 9); - next; - mes col(l("If you want to be rewarded, help us in making this world a better place."), 9); - next; - mesc(l("When you see something that looks more like a bug than a feature, report it on https://forums.themanaworld.org or try to contact a game contributor."), 9); - next; - mesc(l("Any contribution to the game (translations, graphics creation/edition, concepts, coding/scripting, etc...) is rewarded!"), 9); - - mes ""; - mesn; - mesq l("So, do you still want a cookie?"); - next; - - menu - l("I wish I helped your friends, because I'd really, really like a cookie."), -, - l("You tell me. Do I deserve a cookie?"), L_Check; - - mes ""; - mesn; - mesq l("Don't worry, I'm sure you will help them soon enough!"); - next; - - goto L_Bye; - -L_Presentation: - mes ""; - mesn; - mesq l("For a chef? Who said I was a... Oh right, I am."); - next; - mesq l("I was sent here with a task. I can give you a perfect, wonderful, magnificent, superbly well shaped... Cookie!"); - next; - mesq l("But..."); - next; - - goto L_TaskExpanation; - -L_Reward: - mesq l("Yes! @@ is written on my cookie list.", strcharinfo(0)); - next; - mesq l("That's quite surprising... You don't look very helpful."); - next; - mesq l("Anyway, here, have a cookie!"); - - inventoryplace DeliciousCookie, 1; - - setq General_Cookies, 1; - getnameditem DeliciousCookie, strcharinfo(0); - npctalk3 l("You receive a @@!", getitemlink(DeliciousCookie)); - - next; - mesq l("I'm sure you'll appreciate its effect, but be careful, these cookies are rare, and you'll need to help the community again before being able to receive another one."); - next; - - goto L_Bye; - -L_Control: - mes ""; - mesn; - mesq l("C'mon, don't be like that and loosen up! Don't you want to know who's behind all of this?!"); - next; - - menu - l("Why not, this might get interesting."), L_Friends, - l("Fine, tell me, who are these all important friends of yours?"), -, - l("No, and I gotta go, see you."), L_Kick; - - mes ""; - mesn; - mesq l("Don't belittle me, my work is deserving of the highest esteem."); - next; - -L_Kick: - closeclientdialog; - - npctalk3 l("No cookie for you!"); - warp "001-1", 39, 41; - - close; - -L_GetCookie: - mesq l("Hey, I'm not a Keebler Elvis! You won't have another one by stalking me like that!"); - next; - mesq l("If you want another cookie, you know what to do!"); - next; - mesq l("Now, move!"); - next; - - goto L_Bye; - -L_LostCookie: - mesq l("Hey, how was the..."); - next; - mesq l("Wait a minute, where's the cookie I gave you?"); - next; - mesq l("I'm talking about the cookie inside which I put all my love!"); - next; - mesq l("The best, the wonderful, the most choice cookie among all others, the..."); - next; - // Angry emote - mesq l("Grr..."); - next; - mesq l("You're lucky that I'm a generous person, here's another one."); - next; - mesq l("This is the last one. If you use it again out of clumsiness, I will use your soft moist parts in the concoction of my next cookie batch."); - next; - - inventoryplace DeliciousCookie, 1; - getnameditem DeliciousCookie, strcharinfo(0); - - npctalk3 l("You receive a @@!", getitemlink(DeliciousCookie)); - -L_Bye: - closeclientdialog; - - npctalk3 l("See you later!"); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/devis.txt b/npc/001-1/devis.txt deleted file mode 100644 index d3af5956..00000000 --- a/npc/001-1/devis.txt +++ /dev/null @@ -1,99 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// La Johanne crew member. - -001-1,193,109,0 script Devis#001-1 NPC_DEVIS_ARTIS,{ - - function say_random_greeting { - .@enora = getq(ArtisQuests_Enora); - if (.@enora == 0) - { - speech - l("Enora, from the Legion of Aemil, has been warned that you were aboard."), - l("She is waiting for you on the dock."); - - return; - } - - .@rand = rand(5); - if (.@rand == 0) goodbye; - else if (.@rand == 1) - { - speech S_LAST_NEXT, - l("A sunny and hot day,"), - l("a quiet place,"), - l("a ground!"), - l("What else do you need?"); - } - else if (.@rand == 2) npctalk3 l("A-hoy matey!"); - else if (.@rand == 3) npctalk3 l("We are glad captain Nard has let you join the crew!"); - else if (.@rand == 4) npctalk3 l("Howdy?"); - - return; - } - - function face_to_PC { - getmapxy(.@map$, .@cx, .@cy, 0); - @Devis_old_dir = .dir; - npc_turntoxy(.@cx, .@cy); - - return; - } - - function local_close { - if (@Devis_old_dir > 0) - { - .dir = @Devis_old_dir; - } - npc_resumemove; - - close; - } - - @Devis_old_dir = -1; - - npc_pausemove; - face_to_PC; - say_random_greeting; - local_close; - -OnTimer1000: - dographmovestep; - -OnInit: - .distance = 5; - initmovegraph "start_pos", 193, 109, - "dock_ent", 194, 109, - "dock_right", 192, 114, 195, 115, - "dock_left", 151, 103, 160, 106, - "dock_bot", 161, 119, 163, 127, - "dock_top", 184, 91, 195, 92, - "ship_ent", 19, 28, - "ship_sit", 28, 26, - "dock_mid", 174, 105; - - setmovegraphcmd "start_pos", "dock_mid", 1, "dir 0; wait 2", - "dock_ent", "dock_right", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_ent", "dock_mid", 2, "moveon", - "dock_bot", "dock_left", 1, "dir 6; wait 8", - "dock_bot", "dock_mid", 2, "moveon", - "dock_left", "dock_bot", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_left", "dock_mid", 2, "moveon", - "dock_right", "dock_ent", 1, "warp 001-2-21 ship_ent", - "dock_right", "dock_mid", 2, "moveon", - "dock_top", "dock_mid", 1, "moveon", - "dock_mid", "dock_bot", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_mid", "dock_right", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_mid", "dock_left", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_mid", "dock_top", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "dock_mid", "dock_ent", 2, "warp 001-2-21 ship_ent", - "ship_ent", "ship_sit", 1, "dir 4; sit; wait 14; stand; wait 1", - "ship_sit", "ship_ent", 1, "warp 001-1 dock_ent"; - - firstmove "wait 8", "start_pos"; - initnpctimer; -} - diff --git a/npc/001-1/dock.txt b/npc/001-1/dock.txt new file mode 100755 index 00000000..dc7195e9 --- /dev/null +++ b/npc/001-1/dock.txt @@ -0,0 +1,42 @@ + +001-1,75,70,0 script Tulimshar Koga NPC395,9,4,{ + @npc_distance = 10; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardFerry"; + end; + +OnTouch: + addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard"; + end; + +OnBoard: + callfunc "BoardFerry"; + end; +} + +001-1,68,72,0 script Tulimshar Dock NPC400,2,2,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardFerry"; + end; +} + +001-1,70,70,0 script #TulimsharDock NPC32767,{ + end; +OnCommandArrive: + disablenpc "Tulimshar Dock"; + enablenpc "Tulimshar Koga"; + areatimer 0, "001-1", 66, 71, 77, 73, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock + end; + +OnAreaWarp: + callfunc "BoardFerry"; + end; + +OnCommandWarp: + disablenpc "Tulimshar Koga"; + enablenpc "Tulimshar Dock"; + end; +} diff --git a/npc/001-1/doors.txt b/npc/001-1/doors.txt deleted file mode 100644 index c4288328..00000000 --- a/npc/001-1/doors.txt +++ /dev/null @@ -1,61 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Doors warp and animations in map 001-1 -// - -001-1,57,41,0 script #Warp20 NPC_HIDDEN,0,0,{ -OnTouch: - .@enora = getq(ArtisQuests_Enora); - - if (.@enora < 4) - { - narrator S_LAST_NEXT, - l("The door to the legion building is temporarily closed."); - } - else - { - warp "001-2-33", 34, 46; - } - - closeclientdialog; - close; - -OnUnTouch: - doevent "#Door20::OnUnTouch"; -} - -001-1,57,41,0 script #Door20 NPC_ARTIS_DOOR,2,3,{ - close; - -OnTouch: - .@enora = getq(ArtisQuests_Enora); - .@legion = getq(Artis_Legion_Progress); - .@brotherhood = getq(General_Brotherhood); - if (.@enora < 4) - { - setfakecells 57, 41, 1; - end; - } - if (.@legion == 6 && !.@brotherhood) - addtimer 30, "Sophialla#001-1::OnLegionComplete"; - setfakecells 57, 41, 0; - doorTouch; - -OnUnTouch: - .@enora = getq(ArtisQuests_Enora); - if (.@enora < 4) - { - end; - } - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - diff --git a/npc/001-1/elmo.txt b/npc/001-1/elmo.txt deleted file mode 100644 index a8c3fb3d..00000000 --- a/npc/001-1/elmo.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Sailor of Nard's La Johanne ship. - -001-1,185,107,0 script Elmo#001-1 NPC_ELMO_ARTIS,{ - speech - l("Oh hey!"), - l("If you feel bored or anxious, you can always ask some of the people around Artis if they need your help."); - l("It's better than running around in circles doing nothing."); - - close; - -OnInit: - .distance = 2; - end; -} - diff --git a/npc/001-1/enora.txt b/npc/001-1/enora.txt deleted file mode 100644 index d676407f..00000000 --- a/npc/001-1/enora.txt +++ /dev/null @@ -1,461 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Newbie guide for Artis. -// Variables: -// ArtisQuests_Enora -// Values: -// 0 Default. -// 1 BlackSmith quest delivered. -// 2 Chelios Quest given. -// 3 Chelios Quest done. -// 4 BlackSmith gave the sword. -// 5 Light Armor Shop quest delivered. -// 6 Light Armor Shop gave the cloths. -// 7 Market quest delivered. -// 8 Q'Pid merchant. -// 9 Market gave the potion. -// 10 Hill quest delivered. -// 11 Fluffy killed. - -001-1,176,113,0 script Enora#001-1 NPC_HUMAN_FEMALE_NOOB,{ - - function enora_don { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Don is renowned throughout the entire land of Aemil for his blacksmithing skills, and he is here, in Artis."), - l("It's a great honor for us, at the Legion, to hold the security of his business!"), - l("If you search for him you should look in the west of the city, it's the first house just after the left bridge, you can't miss it!"), - l("Chelios, his apprentice, practices outside, mostly."); - - return; - } - - function enora_legion { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The Legion of Gasaron are a group of warriors who vowed to protect and serve their neighbours."), - l("We hold various training sessions, and also have a task board with a heap of things to do for the city and its surroundings."), - l("It's a good place to earn money, it can also help you to travel throughout the land!"), - l("Each big city hosts a Legion building, Artis' building is located in the north-west."); - - return; - } - - function enora_light_armor { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The light armor shop is ran by Resa, she is part of the Merchant Guild of Artis."), - l("She is very skilled when it comes to weaving an ordinary piece of cloth into a wonderful work of art!"), - l("Her shop is on the west side of the city, between the Legion building and the library."); - - return; - } - - function enora_market { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The market is located in the south-east of Artis, it is known as Merchant Guild's exhibit."), - l("You need to be a member of the Merchant Guild to have a chance there."), - l("And I bet you don't know who is in charge of monitoring the security of this place?"); - - switch (select(l("The Legion?"), l("I don't know."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You hit the nail on the head, it's the Legion of Gasaron!"), - l("Our main responsibility in the city is to protect the Merchant Guild."); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Cat got your tongue?"), - l("..."), - l("Your brain liquified to match the level of a piou! It's the Legion of Gasaron."); - break; - } - return; - } - - function enora_hill { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Go north from here until you find the dock warehouse, cross the bridge to the west side of the canal, continue north until you reach another bridge then cross it to the east side of the canal."), - l("You should arrive at a park with a hill nearby."); - - return; - } - - function enora_memories { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's so exciting to meet somebody with amnesia!"), - l("Can't you remember anything at all? Or do you have some memories of your past?"), - l("What happens when you try to think about it?"), - l("Does your mind go all fuzzy or does it feel like your head is going to explode??"), - l("Try doing that now!"); - - switch (select(l("Okay, but there won't be any explosions."), - l("Don't get too excited about it..."))) - { - case 1: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You concentrate and try to summon old memories from within your mind."), - l("You feel numb and everything around you looks foggy, but you can recall the feeling of the cold hard wood of your raft on a stormy night."), - l("A headache hits you and you lose your concentration."); - - speech S_LAST_NEXT, - l("So? You haven't exploded yet! Are you getting anything?"); - - select(l("Not really. All I got was a headache...")); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's like your memories are locked away in your head! Cool!"); - - break; - case 2: - mes ""; - break; - } - - speech S_LAST_NEXT, - l("Ok, sorry. Back to our fluffies."); - - return; - } - - function enora_reward { - .@exp_reward = getarg(0); - .@zeny_reward = getarg(1); - - quest_xp(.maxLevel, .@exp_reward); - quest_gp(.maxLevel, .@zeny_reward); - - narrator S_LAST_NEXT, - l("You received @@ EXP and @@ E.", .@exp_reward, .@zeny_reward); - - // This is silent (can be caught as a string variable) - faction_addrep("Legion", 10); - return; - } - - function enora_first_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You probably don't have much business in this city as you don't remember who you are."), - l("So I was going to ask if maybe you would be interested in giving me a hand with a few errands."); - - switch (select(l("I guess so. What's in it for me?"), - l("Of course! What do you need?"))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Some tasks will help you become aquainted with Artis. Trust me."); - break; - case 2: - mes ""; - break; - } - - speech S_LAST_NEXT, - l("I asked Don our blacksmith to prepare a black iron sword for morning, he should be done by now."), - l("Go meet him, and take the package to me, it's an easy task."), - l("You will be able to find Don's house in the west of the city, it's the first house just after the bridge on the left, you can't miss it!"), - l("A young apprentice called Chelios might be waiting outside, speak to him, and return the package to me."); - emotion E_HAPPY; - - setq ArtisQuests_Enora, 1; - - closeclientdialog; - goodbye; - close; - } - - function enora_second_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you for this commission, Chelios is as good as Don when it comes to forging metal."), - l("By the way, did you ever talk with Don?"), - l("If so, I hope that he didn't give you any hard time, sometimes he can get up on the wrong side of the bed he becomes an embittered and grumpy old man..."), - l("Poor Chelios, I don't envy him..."), - l("So, everything went fine?"); - - switch (select(l("Chelios managed to do excellent work."), - l("The old man seemed to be senile."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Fine, let's see his work..."); - narrator S_LAST_NEXT, l("Enora is carefully inspecting the sword."); - speech S_LAST_NEXT, - l("Excellent!"), - l("The detail and craftsmanship that went into this sword can only be accomplished by the most practiced of blacksmiths."); - - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He may not have all of his wits but keep in mind one thing:"), - l("Don is renowned throughout the entire land for his blacksmith skills, and he is here, in Artis."), - l("It's a great honor for us, at the Legion, to hold the security of his business!"); - - break; - } - - speech S_LAST_NEXT, - l("After this small overview of Artis, what do you think of our city?"), - l("The Legion of Gasaron is in charge of the security of the intramural part of our cities."), - l("The control and administration of the cities passes hands sometimes. You may find the Mana Order or the Brotherhood in charge instead of us at some point!"), - l("But we are quite lucky here, outside of some tipsy travelers there are no big problems around here, it's not like the capital, Esperia."), - l("Now that I think about it, I have another task for you. I asked Resa from the light armor shop to craft me some new clothes, she is a bit far from here, I can't go there because I need to watch the dock."), - l("Her shop is on the west side of the city, between the Legion building and the library."); - - setq ArtisQuests_Enora, 5; - enora_reward(60, 100); - - closeclientdialog; - npctalk3 l("Thank you very much!"); - close; - } - - function enora_third_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Look how splendid this @@ is!", getitemlink(ArtisTankTop, CamelCottonDye)), - l("It's nearly as good as one from Esperia, have you ever been there?"), - l("Ah... Sorry, I forgot, again."), - l("I mean, you forgot... Well."), - l("If you ever find the time, pass by Esperia, it's the greatest city in all of Gasaron!"), - l("You can find the building of the Legion of Gasaron there, like in any other city, but Esperia is important for us as our headquarters are there."); - - do - { - .@q = select(l("Do you still need help?"), - l("What is this \"legion\"?")); - switch (.@q) - { - case 1: - break; - case 2: - enora_legion; - break; - } - } while (.@q == 2); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh yes, I have one last errand for you, Q'Pid in the market sells potions."), - l("It has been some days now since I asked her for a box of @@s, but she hasn't delivered anything yet.", getitemlink(PiberriesInfusion)), - l("Please try to figure out what went wrong with this order and bring me those potions."), - l("You will be able to find her in the market in the south-west of Artis."); - - setq ArtisQuests_Enora, 7; - enora_reward(40, 125); - - closeclientdialog; - npctalk3 l("Thank you very much!"); - close; - } - - function enora_fourth_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Awesome!"); - - speech S_LAST_NEXT, - l("I have one more task for you. Trozz, another member of the Legion, sent me a letter earlier today."), - l("Some citizens are worried about the growing number of Fluffies on the hill of Artis."), - l("Children play there and can be badly hurt if they get too close to a Fluffy's nest."), - l("It would have been easy for me to handle it but if you do it, you can earn some respect by killing Fluffies instead of their natural predators!"), - l("Besides, I need to be here to watch out for thieves while La Johanne is docked."), - l("You look confident. I will give you my old gear as reward and acknowledgment for your time... and take these potions as well!"); - - set ArtisFluffyKilled, 0; - - inventoryplace TrainingGladius, 3; - getitem TrainingGladius, 1; - getitem2 ArtisTankTop, 1, 1, 0, 0, 5005, 0, 0, 0; - getitem PiberriesInfusion, 5; - setq ArtisQuests_Enora, 10; - enora_reward(80, 175); - - speech S_LAST_NEXT, - l("Do you know where the hill is?"); - - switch (select(l("Yes I do."), - l("Please guide me."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect! I will wait for you here."); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Follow the up-stream and cross the canal twice using the two bridges north from here."), - l("The hill is located on the north-east of Artis."); - break; - } - - closeclientdialog; - npctalk3 l("Thank you very much!"); - close; - } - - function enora_hill_cleaned { - if (getq2(ArtisQuests_Enora) < 9) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh no, you still have @@ Fluffies to kill.", 10 - getq2(ArtisQuests_Enora)); - - return; - } - else if (getq2(ArtisQuests_Enora) < 10) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Only one more Fluffy to kill and it's done!"); - - return; - } else if (getq(ArtisQuests_Enora) == 10) { - inventoryplace TreasureKey, 1; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I cannot find the words to express my gratitude for your hard work."), - l("Keep the sword and the jacket, you deserved them!"), - l("You now also have access to the Legion building. Good job, you earned it."), - l("We hold various training sessions, and also have a task board with a heap of things to do for the city and its surroundings."), - l("It's a very good place if you want to make some more money."); - emotion E_WINK; - - if (getq(ArtisQuests_Enora) == 10) - { - setq ArtisQuests_Enora, 11; - enora_reward(140, 500); - getitem TreasureKey, 1; - mesn; - mesq l("Also, here is a %s. If you find a Treasure Chest somewhere, you can open it with this!", getitemlink(TreasureKey)); - next; - } - - return; - } - - function enora_quest_complete { - switch (getq(ArtisQuests_Enora)) - { - case 4: - enora_second_quest; - break; - case 6: - enora_third_quest; - break; - case 9: - enora_fourth_quest; - break; - default: - break; - } - - return; - } - - function enora_paid_potions { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Are you sure that these are my potions?"); - - if (askyesno() == ASK_YES) - { - delitem PiberriesInfusion, 5; - enora_fourth_quest; - } - - return; - } - - if (getq(ArtisQuests_Enora) == 0) - { - speech S_LAST_NEXT, - l("Hey! You must be @@.", strcharinfo(0)), - l("Julia told me how they found you in the sea, on a raft with a logo of..."), - l("...I mean log! Made of log!"), - l("I also heard you lost all your memories? That's a shame."), - l("I'm sure you would have some interesting stories to tell!"); - } - else - { - speech S_LAST_NEXT, - l("Hey @@!", strcharinfo(0)), - l("What brings you here today?"); - } - - do - { - .@q = getq(ArtisQuests_Enora); - select - rif(.@q == 0, l("She told me that you had some tasks for me.")), - rif(.@q == 4 || .@q == 6 || .@q == 9, l("I have your package.")), - rif(.@q == 8 && countitem(PiberriesInfusion) >= 5, l("I have your package.")), - rif(.@q >= 10, l("I cleaned up the hill.")), - rif(.@q >= 10, l("How many Fluffies did I kill on the hill?")), - rif(.@q >= 1, l("Who is Don?")), - rif(.@q >= 5, l("Where is the light armor shop?")), - rif(.@q >= 7, l("Where is the market?")), - rif(.@q >= 10, l("Where is the hill?")), - rif(.@q >= 1, l("What is this \"legion\"?")), - l("I wish I could remember something..."), - rif(.@q != 0, l("Nothing.")); - - switch (@menu) - { - case 1: - enora_first_quest; - break; - case 2: - enora_quest_complete; - break; - case 3: - enora_paid_potions; - break; - case 4: - enora_hill_cleaned; - break; - case 5: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You killed @@ Fluffies.", getq2(ArtisQuests_Enora)); - if (getq2(ArtisQuests_Enora) > 8) - { - mesq l("If you continue there will be none left!"); - next; - } - break; - case 6: - enora_don; - case 7: - enora_light_armor; - break; - case 8: - enora_market; - break; - case 9: - enora_hill; - break; - case 10: - enora_legion; - break; - case 11: - enora_memories; - break; - case 12: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Please come back anytime!"); - } - } while (@menu != 12); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 5; - .maxLevel = 20; - end; -} - -function script EnoraKills { - if (getq(ArtisQuests_Enora) == 10 - && killedrid == Fluffy - && strcharinfo(PC_MAP) == "001-1" - && getq2(ArtisQuests_Enora) < 10) - { - setq(ArtisQuests_Enora, 10, getq2(ArtisQuests_Enora) + 1); - } - return; -} - diff --git a/npc/001-1/eomie.txt b/npc/001-1/eomie.txt new file mode 100755 index 00000000..1ab21846 --- /dev/null +++ b/npc/001-1/eomie.txt @@ -0,0 +1,111 @@ +001-1,71,23,0 script Eomie NPC164,{ + @grass_amount = 5; + @water_amount = 2; + @ice_amount = 2; + + @silk_exp = 600; + + if (.@q >= 14) goto L_Done; + if (.@q >= 9) goto L_CastedSpell; + if (.@q == 8) goto L_GetStuff; + + mesn; + mes "\"I maintain this little oasis in the desert.\""; + if (.@q != 7) + goto L_Close; + menu + "I need to learn a spell to use Tinris' magic fertilizer. Can you help me out?",L_Next; + +L_Next: + mesn; + mes "\"Oh? Well, that's a rather difficult task."; + mes "I'd be glad to help you, but unfortunately, I can't. If I were to interrupt the magic I use to keep this alive, it would die.\""; + next; + mes "\"It's unusually hot at the moment – even for this desert area – so it's really out of the question.\""; + menu + "Is there any chance you could help me?",L_Continue; + +L_Continue: + mes "She hesitates."; + .@q = 8; + goto L_GetStuff; + +L_GetStuff: + // .@q == 8 + mesn; + mes "\"I could try to briefly interrupt my magic and then cast the spell on the fertilizer, but I would need to prepare the grass beforehand."; + mes "Bring me " + @grass_amount + " " + getitemlink("GrassSeed") + ", " + @water_amount + " " + getitemlink("BottleOfWater") + ", and " + @ice_amount + " " + getitemlink("IceCube") + ".\""; + menu + "I've got everything.",L_More, + "Where can I get Grass Seeds?",L_Hurnscald, + "How can I get Ice Cubes? We're in the middle of the desert!",L_Mine, + "Ok. I'll go and get them.",L_Close; +L_More: + if ((countitem("GrassSeed") < @grass_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("IceCube") < @ice_amount)) + goto L_NoItem; + + delitem "GrassSeed", @grass_amount; + delitem "BottleOfWater", @water_amount; + delitem "IceCube", @ice_amount; + .@q = 9; + mesn; + mes "\"Very good!\""; + mes "She takes the ingredients you brought her and uses them to cast a cool mist into the air."; + misceffect sfx_magic_nature; + next; + mesn; + mes "\"That should last long enough to keep the plants alive while I cast the spell on the fertilizer. Besides, I can replant anything that dies with the seeds you brought me.\""; + next; + mes "She takes the fertilizer and casts some invocations. After a minute, she hands the now-glowing substance back to you."; + mesn; + mes "\"That should work now. I'm glad you're taking care of the plants! Not enough people do that nowadays.\" %%1"; + goto L_Close; + +L_Hurnscald: // player asked how to get Grass Seeds + mesn; + mes "\"Squirrels tend to pick up " + getitemlink("GrassSeed") + " as they gather food. You can find them around Hurnscald if you ride the ferry over.\""; + goto L_Close; + +L_Mine: // player asked how to get Ice Cubes + mesn; + mes "\"Quite the quandary – isn't it? Naturally, you can easily find them on the continent of Kaizei, which is far up north and covered with snow most time of the year. But it might be a bit difficult to get there.\""; + next; + mes "\"I heard that Ice Goblins were seen in the caves surrounding Nivalis. Maybe you can find " + getitemlink("IceCube") + " there.\""; + goto L_Close; + +L_CastedSpell: // .@q >= 9 but below 14 + mesn; + mes "\"Thankfully, the grass wasn't damaged. I hope Anwar finds the magic fertilizer to be useful.\""; + if (.@q != 13) + goto L_Close; + menu + "It was. He even created this Silk Headband as a present for you!",L_Present, + "(Mumble something and leave)",L_Close; + +L_Present: + if (countitem("SilkHeadband") < 1) + goto L_NoItem; + delitem "SilkHeadband", 1; + getexp @silk_exp, 0; + .@q = 14; + mesn; + mes "\"Oh, that's so nice of him! Please tell him that I really like it!\""; + mes "She smiles."; + goto L_Close; + +L_Done: // .@q >= 14 + mesn; + mes "\"Hello! I'm happy to see someone like you so dedicated to the environment.\" %%8"; + goto L_Close; + +L_NoItem: + mesn; + mes "\"Where is it?\" %%3"; + goto L_Close; + +L_Close: + @grass_amount = 0; + @water_amount = 0; + @ice_amount = 0; + close; +} diff --git a/npc/001-1/eugene.txt b/npc/001-1/eugene.txt deleted file mode 100644 index 4f1e25fd..00000000 --- a/npc/001-1/eugene.txt +++ /dev/null @@ -1,82 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Fishman NPC -// Quest variable: -// ArtisQuests_Fishman -// Quest stages: -// 0 - not started -// 1 - Eugene asked for items -// 2 - completed - -001-1,113,120,0 script Eugene NPC_EUGENE,{ - - .BaitID = SmallTentacles; - .BaitCount = 10; - - narrator S_LAST_NEXT, - l("You see a raijin boy, sitting on the edge of the dock."), - l("He's holding a fishing rod, while gazing out at the sea."); - - .@q = getq(ArtisQuests_Fishman); - if (.@q == 1) goto L_CheckItems; - if (.@q == 2) goto L_QuestDone; - - speech S_LAST_BLANK_LINE, - l("Ahoi."), - l("Hey, check out my brand new fishing rod. I bought it just today."), - l("I was so excited, I wanted to try it as soon as possible."), - l("So in a hurry, I forgot to take enough bait for fishing."), - l("Be a friend and bring me @@ @@.", .BaitCount, getitemlink(.BaitID)); - - switch (select(l("I'll be back in no time."), - l("Sorry, I'm doing other things at the moment."))) - { - case 1: - setq ArtisQuests_Fishman, 1; - speech S_FIRST_BLANK_LINE, - l("Thank you. I'll wait here."); - close; - case 2: - speech S_FIRST_BLANK_LINE, - l("But I'm almost out of @@...", getitemlink(.BaitID)); - close; - } - -L_CheckItems: - if (countitem(.BaitID) < .BaitCount) - { - speech - l("Sorry, but you don't have what I need."), - l("I need @@ @@.", .BaitCount, getitemlink(.BaitID)); - close; - } - - speech - l("That's exactly what I needed!"), - l("To thank you, accept my old fishing rod."), - l("It's not as good as my new one, but still very useful."), - l("Just look at that water! There's a whole bunch of fish down there."), - l("Oh, and you will need this book too, it will help you learn the basics of fishing."), - l("You might even get lucky, and get a @@.", getitemlink(GrassCarp)), - l("Have a good time fishing!"); - - delitem .BaitID, .BaitCount; - getitembound FishingRod, 1, IBT_ACCOUNT; - getitem FishingGuideVolI, 1; - setq ArtisQuests_Fishman, 2; - close; - -L_QuestDone: - // Idea for future: Eugene telling fishman jokes. - speech - l("Ahoy, @@!", strcharinfo(0)), - l("Are the fish biting today?"); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/ferry_master.txt b/npc/001-1/ferry_master.txt new file mode 100755 index 00000000..db5c6ec8 --- /dev/null +++ b/npc/001-1/ferry_master.txt @@ -0,0 +1,19 @@ + +001-1,64,75,0 script Ferry Master#tulimshar NPC138,{ + mes "[Ferry Master]"; + mes "\"Hello! Do you need something?\""; + goto L_Main; + +L_Main: + menu + "How do I use the ferry?", L_Explain, + "Nothing, I guess.", L_close; + +L_Explain: + mes "[Ferry Master]"; + callfunc "FerryHelp"; + goto L_Main; + +L_close: + close; +} diff --git a/npc/001-1/fexil.txt b/npc/001-1/fexil.txt deleted file mode 100644 index 1122f051..00000000 --- a/npc/001-1/fexil.txt +++ /dev/null @@ -1,143 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Newbie merchant. -// Variables: -// ArtisQuests_Fexil -// Quest states: -// 0 -- not started -// 1 -- Lloyd warned about the quest -// 2 -- Fexil explain what he needs -// 3 -- Fexil buy every fur that the pc bring to him - -001-1,47,134,0 script Fexil#001-1 NPC_ELVEN_MAN_TRADER,{ - - function fexil_quest { - speech S_LAST_NEXT, - l("You know, the life of the merchant is hard. I really hope that Artis and the Merchant Guild will help me to succeed."), - l("Maybe you too you could help me?"), - l("I want to be the first merchant of this square to sell clothes made from @@s!", getitemlink(FluffyFur)), - l("I will buy all of the fur that you will bring me at a good price, let's say, 15 E piece."), - l("Do we have a deal?"); - - switch (select(l("Ok."), l("I don't want to be part of this joke."))) - { - case 1: - setq ArtisQuests_Fexil, 3; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Awesome! I will wait for you here."); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh... Ok, I will be around here if you change your mind."); - break; - } - return; - } - - mesn; - mesq l("Greetings traveler."); - next; - mesq l("I have some clothes and other things for you at a fine price!"); - next; - mesq l("What I sell comes from every corner of Gasaron."); - next; - mesq l("Interested?"); - next; - - if (getq(ArtisQuests_Fexil) == 1) - { - select(l("I have your pass from the Merchant Guild.")); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh! You saved me, I was too afraid to unpack my stuff without this pass."), - l("Hey, I remember you, we were on the same boat, you are the castaway."); - - switch (select(l("Yes I am."), - l("You're confusing me with someone else."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh sure I remember you."), - l("The travel was fine for you? It was terrible for me, I was sea-sick."); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ah, I didn't have much sleep, it's possible."); - break; - } - setq ArtisQuests_Fexil, 2; - fexil_quest; - - closeclientdialog; - goodbye; - close; - } - - .@fexil = getq(ArtisQuests_Fexil); - - select - l("OK, let's trade."), - rif(.@fexil == 2, l("Do you still need help?")), - rif(.@fexil > 2 && countitem(FluffyFur) > 0, l("I have some fur for you.")), - l("No. Sorry."); - - switch (@menu) - { - case 1: - closeclientdialog; - shop "Bag#001-1"; - close; - - case 2: - mes ""; - fexil_quest; - break; - - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Awesome. How many of those do you want to give me?"); - - do - { - input .@amount; - if (.@amount < 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Please enter a valid amount."); - continue; - } - if (.@amount > countitem(FluffyFur)) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You don't have enough @@s on you.", getitemlink(FluffyFur)); - continue; - } - - break; - } while (1); - - .@price = 15 * .@amount; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Deal, I offer you @@ E!", .@price); - - delitem FluffyFur, .@amount; - Zeny += .@price; - - break; - - case 4: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh... Well, I just started to trade... Thus my technique may not be the best."), - l("Anyway, if you ever feel interested, just check my bag!"); - break; - } - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/flags.txt b/npc/001-1/flags.txt deleted file mode 100644 index 5e70c25a..00000000 --- a/npc/001-1/flags.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// The flags supposed to mark Rowboat unmounting spots in Artis -// THIS IS A PLACEHOLDER! - -001-1,200,63,0 script Flag#1 NPC_FLAG_L,{ - OnTouch: - narrator - l("You see a suspicious greenish flag. It reminds you of something you seem to have forgotten."); - close; -} - -001-1,27,101,0 duplicate(Flag#1) Flag#2 NPC_FLAG_R -001-1,68,139,0 duplicate(Flag#1) Flag#3 NPC_FLAG_R diff --git a/npc/001-1/flyingpiou.txt b/npc/001-1/flyingpiou.txt deleted file mode 100644 index ea48f4dc..00000000 --- a/npc/001-1/flyingpiou.txt +++ /dev/null @@ -1,160 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// Pious flying around town -// Variables: -// none - -function script ArtisFlyingPiouLogic { - .@tick = gettimetick(1); - .@LastTimeTouched = getvariableofnpc(.LastTimeTouched, strnpcinfo(3)); - if (.@tick > .@LastTimeTouched + 300) - { - .speed = 200; - set getvariableofnpc(.LastPlayerTouched, strnpcinfo(3)), -1; - } - .@rnd = rand(5) - 3; - if (.@rnd > 0) - return execmovecmd("wait " + .@rnd); - return 0; -} - -001-1,53,117,0 script #FlyingPiou1 NPC_FLYING_PIOU,{ - - function TryCatchPiou { - .@agi = readparam(bAgi); - @ArtisQuests_CatchPiouTries += 1; - getmapxy(.@map$, .@x1, .@y1, 1); - getmapxy(.@map$, .@x2, .@y2, 0); - .@distance = distance(.@x1, .@y1, .@x2, .@y2); - .@chance = max(ArtisQuests_CatchPiou_Difficulcy, - 20 + .@distance * 5 - .@agi/10 - - @ArtisQuests_CatchPiouTries); - return rand(.@chance); - } - - .@charid = getcharid(0); - if (.LastPlayerTouched <= 0) - { - .LastPlayerTouched = .@charid; - @ArtisQuests_CatchPiouTries = 0; - } - else if (.LastPlayerTouched != .@charid) - { - message strcharinfo(0), l("Hm, it seems another player is trying to catch the piou, I shouldn't interfere."); - end; - } - - .@q = getq(ArtisQuests_CatchPiou); - if (.@q != 1) - { - mesn "Narrator"; - mesc(l("You scare the piou, but let it go."), 9); - close; - } - - .@tick = gettimetick(1); - if (.@tick < .LastTimeTouched + min(4, ArtisQuests_CatchPiou_Difficulcy - + @ArtisQuests_CatchPiouTries / 3)) - { - message strcharinfo(0), l("Dang, I scared it! More patience, @@, more patience.", strcharinfo(0)); - .LastTimeTouched = .@tick; - specialeffect(33, SELF); - end; - } - - .LastTimeTouched = .@tick; - - .@rnd = TryCatchPiou(); - if (!.@rnd) - { - npcstop; - stopnpctimer; - getmapxy(.@map$, .@x, .@y, 1); - npcwalkto .@x, .@y; - .@trader$ = "Salem#001-1"; - mesn "Narrator"; - mesc(l("You caught the piou, but it's trying to escape from you. You'd better hurry back to Salem."), 9); - set getvariableofnpc(.LastPiouHunter$, .@trader$), strcharinfo(0); - set getvariableofnpc(.PiouEscapedMessage$, .@trader$), l("Oh no, the piou escaped!"); - set getvariableofnpc(.LastPiouHunterID, .@trader$), .@charid; - set getvariableofnpc(.PiouCaught, .@trader$), 1; - donpcevent .@trader$ + "::OnPiouFlee"; - specialeffect(26, SELF); - close2; - disablenpc strnpcinfo(3); - close; - } - else - { - setarray .RandomFailureMessages$[0], l("So close!"), l("It escaped!"), l("Almost got it!"), l("Oh, the little..."); - .@r = rand(getarraysize(.RandomFailureMessages$)); - message strcharinfo(0), .RandomFailureMessages$[.@r]; - .speed = max(140, 200 - 10 * (@ArtisQuests_CatchPiouTries + - ArtisQuests_CatchPiou_Difficulcy)); - specialeffect(33, SELF); - } - end; - -OnHour00: - .LastTimeTouched = 0; - end; - -OnTimer1000: - dographmovestep; - -OnInit: - .distance = 5; - .walkmask = WALK_WATER; - // .debug = 1; - - initmovegraph "market_start", 53, 117, - "fountain", 79, 75, 102, 91, - "river_bank_1", 107, 94, 117, 102, - "river_bank_2", 117, 110, - "chelios_right", 100, 112, 113, 118, - "chelios_left", 80, 95, 93, 111, - "market_right", 74, 114, 83, 121, - "market_center", 50, 113, 66, 121, - "market_left", 36, 120, 42, 128, - "batiment_inside", 48, 138, 65, 106, - "batiment_behind", 33, 90, 41, 103, - "library_front", 42, 82, 63, 90, - "taree_yard", 69, 82, - "taree_behind", 61, 62, 76, 71, - "townhall_behind", 73, 40, 93, 55, - "townhall_right", 99, 55, 106, 60, - "inn_behind", 107, 63, 123, 76 - ; - - setmovegraphcmd "fountain", "river_bank_1", 1, "call ArtisFlyingPiouLogic", - "river_bank_1", "river_bank_2", 1, "call ArtisFlyingPiouLogic", - "river_bank_2", "chelios_right", 2, "call ArtisFlyingPiouLogic", - "chelios_right", "chelios_left", 1, "call ArtisFlyingPiouLogic", - "chelios_left", "fountain", 1, "wait 1; call ArtisFlyingPiouLogic", - "chelios_left", "market_right", 1, "call ArtisFlyingPiouLogic", - "chelios_right", "market_right", 1, "call ArtisFlyingPiouLogic", - "market_right", "market_center", 1, "call ArtisFlyingPiouLogic", - "market_center", "batiment_inside",1, "call ArtisFlyingPiouLogic", - "batiment_inside","library_front", 1, "call ArtisFlyingPiouLogic", - "library_front", "taree_yard", 1, "call ArtisFlyingPiouLogic", - "library_front", "taree_behind", 1, "call ArtisFlyingPiouLogic", - "library_front", "batiment_behind",1, "call ArtisFlyingPiouLogic", - "batiment_behind","market_left", 1, "wait 3; call ArtisFlyingPiouLogic", - "market_left", "market_center", 1, "call ArtisFlyingPiouLogic", - "taree_yard", "fountain", 1, "call ArtisFlyingPiouLogic", - "taree_behind", "townhall_behind",1, "call ArtisFlyingPiouLogic", - "townhall_behind","townhall_right", 1, "call ArtisFlyingPiouLogic", - "townhall_right", "inn_behind", 1, "call ArtisFlyingPiouLogic", - "inn_behind", "fountain", 1, "wait 2; call ArtisFlyingPiouLogic", - "inn_behind", "river_bank_1", 1, "call ArtisFlyingPiouLogic", - "market_start", "batiment_inside",1, "call ArtisFlyingPiouLogic" - ; - - firstmove "speed 200", "market_start"; - initnpctimer; - - .LastPlayerTouched = -1; - end; -} diff --git a/npc/001-1/gate_guards.txt b/npc/001-1/gate_guards.txt new file mode 100755 index 00000000..5908bb77 --- /dev/null +++ b/npc/001-1/gate_guards.txt @@ -0,0 +1,21 @@ +001-1,39,33,0 script Guard#school NPC104,{ + mes "[Guard]"; + mes "\"My presence here is just a formality. The mages inside can easily defend themselves.\""; + close; +} +001-1,56,47,0 script Guard#castle NPC104,{ + mes "[Guard]"; + mes "\"Tulimshar is a resilient city; its citizens have made quite a comeback after the earthquake.\""; + close; +} + +001-1,61,99,0 script Guard#east3 NPC104,{ + mes "[Guard]"; + mes "\"Just north of here is a palace where you can find both the Council of Wizards and the Magic Institute of Tulimshar.\""; + close; +} +001-1,53,72,0 script Guard#govt_out NPC123,{ + mes "[Guard]"; + mes "\"There are government officials inside who can help you form a party, obtain a trade license, or even get married.\""; + close; +} diff --git a/npc/001-1/gossip.txt b/npc/001-1/gossip.txt new file mode 100755 index 00000000..694124a0 --- /dev/null +++ b/npc/001-1/gossip.txt @@ -0,0 +1,57 @@ + +001-1,66,104,0 script Gladys NPC154,{ + mes "[Gladys]"; + mes "\"Hello deary! I hear some of the most fascinating rumors!\""; + next; + mes "\"Would you like me to let you in on the good stuff?\""; + menu + "Tell me about Lt. Dausen.", L_Intro, + "Tell me about Fieri.", L_Cook, + "Tell me about Sarah.", L_Sarah, + "Tell me about Sandra.", L_Sandra, + "Tell me about the Desert Mine.", L_Desert, + "Tell me about the Ferry.", L_Ferry, + "No thanks.", L_No; + +L_No: + mes "[Gladys]"; + mes "\"Very well. Come back later if you want to hear some juicy news!\""; + goto L_close; + +L_Intro: + mes "[Gladys]"; + mes "\"Have you met our lovely guard captain yet? He usually keeps post just outside the gates to keep an eye on things. He likes to talk to new adventurers too.\""; + goto L_close; + +L_Cook: + mes "[Gladys]"; + mes "\"I hear the kitchen at the Magic Institute of Tulimshar is in need of some help.\""; + next; + mes "\"The only thing bigger then a wizard's ego is their waistline. Hehe.\" %%8"; + goto L_close; + +L_Sarah: + mes "[Gladys]"; + mes "\"Do you believe what parents will let their kids do these days?! I heard about this girl in the southeast side of town who does nothing but eat sweets all day! Honestly, what is this world coming to?\""; + goto L_close; + +L_Sandra: + mes "[Gladys]"; + mes "\"The students and wizards at the Magic Institute of Tulimshar are always looking for people to gather the reagents they need for spells as they are far too busy studying to gather the materials themselves.\""; + goto L_close; + +L_Desert: + mes "[Gladys]"; + mes "\"If you're still looking for adventure, I would suggest talking to some of the guards. I hear there's a sizable monster threat outside the city walls!\""; + goto L_close; + +L_Ferry: + mes "[Gladys]"; + mes "\"There's a ferry in the northern part of town that takes travelers to exotic new places!\""; + next; + mes "\"I haven't been on it myself, but I hear it travels all over the world!\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/001-1/guards.txt b/npc/001-1/guards.txt new file mode 100755 index 00000000..8727a9bf --- /dev/null +++ b/npc/001-1/guards.txt @@ -0,0 +1,93 @@ + +001-1,103,99,0 script Ekinu NPC104,{ + mes "[Ekinu the Town Guard]"; + mes "\"What a disaster... I can't believe that we managed to rebuild the town so quickly.\""; + next; + menu "Can you give me any tips?", L_Tip, + "Do you have any information?", L_Info, + "What disaster?", L_disaster; + +L_Tip: + @temp = rand(7); + if(@temp == 1) goto L_1; + if(@temp == 2) goto L_2; + if(@temp == 3) goto L_3; + if(@temp == 4) goto L_4; + if(@temp == 5) goto L_5; + if(@temp == 6) goto L_6; + goto L_0; + +L_1: + mes "[Ekinu the Town Guard]"; + mes "\"Try to carry spare food when on quests or in dungeons – they will come in handy. I always take beer, but don't tell the Sergeant...\""; + goto L_close; + +L_2: + mes "[Ekinu the Town Guard]"; + mes "\"If you ever get lost, check your map to get your bearings and figure out where you need to go.\""; + goto L_close; + +L_3: + mes "[Ekinu the Town Guard]"; + mes "\"When in a dungeon, monsters are more aggressive – and often more powerful – than if they were outside.\""; + goto L_close; + +L_4: + mes "[Ekinu the Town Guard]"; + mes "\"When gambling in casinos, make sure to not bet too much or you might become broke.\""; + goto L_close; + +L_5: + mes "[Ekinu the Town Guard]"; + mes "\"Never underestimate your enemy.\""; + goto L_close; + +L_6: + mes "[Ekinu the Town Guard]"; + mes "\"When fighting more than one enemy, try to focus on one at a time.\""; + goto L_close; + +L_0: + mes "[Ekinu the Town Guard]"; + mes "\"Let me think of something... Oh! Do NOT attack the red or black scorpions unless you're sure you can kill it!\""; + goto L_close; + +L_Info: + mes "[Ekinu the Town Guard]"; + mes "\"Everyone seems to want information... You won't get it – at least not here. I'm not even sure what you mean, to be honest.\""; + goto L_close; + +L_disaster: + mes "[Ekinu the Town Guard]"; + mes "\"What do you mean, 'what disaster?' Weren't you there? That huge volcano ex...rusion... – whatever they call it – and then the earthquake!\""; + next; + mes "[Ekinu the Town Guard]"; + mes "\"Half the town was reduced to rubble! Somehow, no one was seriously injured, so I guess we were lucky...\""; + next; + mes "[Ekinu the Town Guard]"; + mes "\"Well, the mayor rebuilt everything quickly, but I still have no idea where he got all the GP from...\""; + goto L_close; + +L_close: + @temp = 0; + close; +} + +001-1,107,42,0 script Ryan NPC104,{ + if (getskilllv(SKILL_MAGIC)) goto L_message; + + mes "[Ryan the Town Guard]"; + mes "Zzzz... Zzzz..."; + next; + mes "[Ryan the Town Guard]"; + mes "\"Hmmmmmmh...?"; + mes "Oh, what? I wasn't sleeping! I was just resting my eyes!\""; + close; + +L_message: + mes "[Ryan the Town Guard]"; + mes "\" Watch out for Black Scorpions. They are extremely dangerous!\""; + next; + mes "\"Whenever one approaches the town gate, Ekinu has me run around shouting '" + $@SPELL_AGGRAVATE$ + ".' Somehow, this distracts it so Ekinu can kill it.\""; + close; +} diff --git a/npc/001-1/harbours.txt b/npc/001-1/harbours.txt deleted file mode 100644 index f1db3fce..00000000 --- a/npc/001-1/harbours.txt +++ /dev/null @@ -1,84 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Harbour animated tiles. -// Animation: -// Length: 1680 -// Values: -// 2 Hook moving down. -// 4 Hook moving up. -// 6 Hook down. -// 8 Hook up. - -001-1,183,85,0 script #Harbour1 NPC_HARBOUR_WHEEL_BOX,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} - -001-1,183,89,0 script #Harbour2 NPC_HARBOUR_WHEEL,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} - -001-1,198,115,0 script #Harbour3 NPC_HARBOUR_WHEEL_BOX,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} - -001-1,175,119,0 script #Harbour4 NPC_HARBOUR_WHEEL_BOX,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} - -001-1,198,92,0 script #Harbour5 NPC_HARBOUR_WHEEL_BOX,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} - -001-1,151,117,0 script #Harbour6 NPC_HARBOUR_WHEEL,{ - harbourClic; - -OnTimer1670: - harbourTimer; - -OnInit: - .distance = 1; - .alwaysVisible = true; - end; -} diff --git a/npc/001-1/inac.txt b/npc/001-1/inac.txt new file mode 100755 index 00000000..56392535 --- /dev/null +++ b/npc/001-1/inac.txt @@ -0,0 +1,15 @@ + +001-1,58,81,0 script Inac NPC156,{ + @halloween_npc_id = $@halloween_npc_inac; + callfunc "TrickOrTreat"; + + mes "[Inac]"; + mes "\"This cities water system is amazing. It was built centuries ago after the cataclysm that turned Tonori into this desert.\""; + next; + mes "[Inac]"; + mes "\"They say that not much maintenance is needed, even though it's so old.\""; + next; + mes "[Inac]"; + mes "\"They also say monsters have moved into the underground tunnels that bring and distribute water.\""; + close; +} diff --git a/npc/001-1/juscare.txt b/npc/001-1/juscare.txt deleted file mode 100644 index b0d6a98e..00000000 --- a/npc/001-1/juscare.txt +++ /dev/null @@ -1,92 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Juscare, walking NPC of the Legion of Aemil on the right part of the Agora of Artis. - -001-1,118,92,0 script Juscare#001-1 NPC_HUMAN_MALE_LEGION_ARTIS,{ - - function shouldTurn { - .@tree = findmovegraphlabel("inn_tree"); - .@table = findmovegraphlabel("inter_inn_fav_table"); - if (.movepos == .@tree || .movepos == .@table) - return 0; - return 1; - } - - function localClose { - if (@Juscar_old_dir > 0) - .dir = @Juscar_old_dir; - npc_resumemove; - close; - } - - npc_pausemove; - @Juscar_old_dir = -1; - if (shouldTurn()) - { - getmapxy(.@map$, .@cx, .@cy, 0); - @Juscar_old_dir = .dir; - npc_turntoxy(.@cx, .@cy); - } - - villagertalk(); - - localClose; - -OnTimer1000: - dographmovestep; - -OnInit: - .distance = 4; - // .debug = 1; - initmovegraph - "inn_front", 112, 90, 119, 93, - "inn_tree", 108, 82, - "fountain", 87, 85, 91, 86, - "chelios", 93, 109, - "chelios_road", 89, 107, - "chelios", 93, 109, - "to_market", 76, 119, - "market", 60, 115, 65, 121, - "fishing_spot", 109, 127, - "river_bank", 113, 105, - "eugene", 112, 115, - "inn_door", 118, 89, - "inn_doorstep", 118, 88, - "inter_inn_doorstep", 29, 43, - "inter_inn_2tables", 38, 31, - "inter_inn_fav_table", 51, 33; - - // this is not very obvious stuff - setmovegraphcmd - "inn_front", "inn_door", 1, 0x1, "flags_0 2; dir 4; call open_door #001-1_118_88", - "inn_front", "inn_tree", 2, "dir 2; wait 1; sit; wait 1; emote 106; wait 20; stand; wait 1", - "inn_front", "river_bank",1, "flags_0 8; flags_1 4", - "river_bank", "eugene", 1, 0x4, "moveon", - "eugene", "fishing_spot", 1, 0x4, "wait 7", - "fishing_spot", "chelios", 1, 0x4, "dir 6; wait 1; emote 103; wait 10", - "inn_tree", "inn_door", 1, "flags_1 1; flags_0 2; dir 4; call open_door #001-1_118_88", - "inn_tree", "fountain", 2, "dir 4; wait 1; emote 122; wait 10; dir 0; wait 1", - "fountain", "chelios_road", "moveon", - "chelios_road", "chelios", "dir 6; wait 1; emote 103; wait 7", - "chelios", "eugene", "flags_1 28; flags_0 4", - "chelios", "to_market", 2, 0x20, "flags_1 20; flags_0 10", - "to_market", "market", 1, 0x20, "flags_1 10; flags_0 20; wait 20", - "market", "to_market", "moveon", - "to_market", "chelios", 1, 0x10, "flags_0 10; dir 6; wait 3", - "fishing_spot", "eugene", 1, 0x8, "moveon", - "eugene", "river_bank",1, 0x8, "moveon", - "river_bank", "inn_front", 1, 0x8, "dir 0; wait 5", - "inn_door", "inn_doorstep",1, 0x1, "warp 001-2-28 inter_inn_doorstep; call close_door #001-1_118_88", - "inter_inn_doorstep", "inter_inn_2tables", 1, 0x1, "moveon", - "inter_inn_2tables", "inter_inn_fav_table", 1, 0x1, "flags_1 2; flags_0 1; dir 6; wait 1; sit; wait 15; stand; wait 1", - "inter_inn_fav_table", "inter_inn_2tables", 1, 0x2, "moveon", - "inter_inn_2tables", "inter_inn_doorstep", 1, 0x2, "call open_door #001-1_118_88; warp 001-1 inn_doorstep", - "inn_doorstep", "inn_door", 1, 0x2, "call close_door #001-1_118_88", - "inn_door", "inn_front", 1, 0x2, "flags_1 1; flags_0 2; wait 10"; - - firstmove "wait 4", "inn_front"; - initnpctimer; -} diff --git a/npc/001-1/katja.txt b/npc/001-1/katja.txt deleted file mode 100644 index 3a3008cb..00000000 --- a/npc/001-1/katja.txt +++ /dev/null @@ -1,128 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Little girl playing around the hill on top of the port. -// She wants you to find her brother. -// Variables: -// ArtisQuests_LazyBrother = 19 -- quest var -// LazyBrother_TreesLeft = 15 -- how many trees left to search -// LazyBrother_TreeSearched[15] -- whether given tree was searched -// LazyBrother_TreeWithBrother -- the number of tree where he's hiding -// Quest states: -// 0 - quest not started -// 1 - Katja asked help, searching the trees -// 2 - Bobo is found, "bad" ending -// 3 - player decided to tell Katja where her brother is -// 4 - "good" ending, player helped Katja - -001-1,164,44,0 script Katja#001-1 NPC_RAIJIN_GIRL,{ - - function QuestReminder { - setcam 5920, 960; - mesq l("Remember, you have to find my brother on the hill east of here."); - next; - mesq l("He is probably hiding up one of the trees. Go close to each tree and look up, otherwise you won't notice him."); - next; - restorecam; - } - - .@q = getq(ArtisQuests_LazyBrother); - mesn; - mesq l("Hey"); - next; - switch(.@q) - { - case 0: - mesq l("You look nice, do you want to help me?"); - break; - case 1: - mesq l("Hi, how is it going?"); - next; - select l("Remind me, what should I do?"); - mes ""; - mesn; - QuestReminder; - close; - case 2: - mesq l("I still didn't find my brother..."); - close; - case 3: - mesq l("Did you find my brother?"); - next; - select(l("Yes, and he promised to be home soon.")); - mes ""; - mesn; - mesq l("Oh thank you so much!"); - next; - mesq l("Please take this @@ for your help.", getitemlink(Aquada)); // Need a different reward. - setq ArtisQuests_LazyBrother, 4; - getitem Aquada, 1; - getexp 500, 0; - close; - case 4: - mesq l("Thank you again for your help!"); - close; - } - next; - - switch (select(l("Of course!"), - l("What kind of help do you need?"), - l("I don't have much time right now."))) - { - case 1: - mes ""; - mesn; - mesq l("Great!"); - emotion E_JOY; - next; - break; - case 2: - mes ""; - mesn; - break; - case 3: - mes ""; - mesn; - mesq l("Okay, I'll be here, if you change your mind."); - emotion E_SAD; - close; - } - -L_Story: - mesq l("Mommy sent me to find my brother Bobo."); - next; - mesq l("He said he is going to climb the highest hill in Artis, which is not far from here."); - next; - mesq l("Our mommy doesn't allow us to go there, because it's dangerous. But he doesn't listen!"); - next; - mesq l("Can you please go there and find him? He is probably hiding in one of those trees, like always."); - next; - mesq l("Because of the dense foliage, you need to go up close to the trees so you don't miss him."); - next; - - switch (select(l("I will find him, don't worry!"), - l("Highest hill in Artis you say? Sounds dangerous, I might fall off."))) - { - case 1: - mes ""; - mesn; - mesq l("Thank you!"); - mes ""; - QuestReminder; - setq ArtisQuests_LazyBrother, 1; - LazyBrother_TreesLeft = 15; - close; - case 2: - mes ""; - mesn; - mesq l("Aw, what will I do now?"); - close; - } - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/001-1/koga.txt b/npc/001-1/koga.txt deleted file mode 100644 index 794909f1..00000000 --- a/npc/001-1/koga.txt +++ /dev/null @@ -1,45 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Koga in Artis, only accessable via Rowboat. -// THIS IS A PLACEHOLDER! - -/*001-1,225,59,0 script Koga#001-1 NPC_LA_MARINE,{ - .@q=getq(General_Narrator); - speech - l("Ah, whom did you bring here?"), - l("Isn't that the one Nard found on a raft in the sea, with the sign of the Legion on it?"); - next; - mesc l("Travel to woodlands?"); - if (askyesno() == ASK_YES) - { - speech - l("I hope they know what they are doing. So, come on board. I am looking forward to go back to Woodland, haven't been there for a while."); - next; - closeclientdialog; - setpcblock(PCBLOCK_MOVE, false); - setmount 0; - if (.@q == 1) { - warp "000-0-1", 26, 28; - close; - } - warp "008-1-1", 33, 63; - dispbottom l("After a tiring, yet fast, travel by Koga, you arrive at @@.", l("Woodlands")); - } - else - { - // Return you to beach - setpcblock(PCBLOCK_MOVE, false); - setmount 0; - slide 200, 62; - } - - close; - -OnInit: - .distance = 6; - //.alwaysVisible = true; - end; -}*/ - diff --git a/npc/001-1/lucas.txt b/npc/001-1/lucas.txt deleted file mode 100644 index 558889d2..00000000 --- a/npc/001-1/lucas.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Legion member. - -001-1,59,44,0 script Lucas#001-1 NPC_LUCAS,{ - - villagertalk(); - - closeclientdialog; - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-1/manhole.txt b/npc/001-1/manhole.txt deleted file mode 100644 index 086f9070..00000000 --- a/npc/001-1/manhole.txt +++ /dev/null @@ -1,88 +0,0 @@ -// Evol scripts. -// Author: -// Jesusalva -// Reid -// Description: -// A manhole near Mona's house. -// Variable: -// ArtisQuests_MonaDad -// Quest states: -// 0 - Quest not started -// 1 - Mona explained that her dad was missing - -001-1,152,52,0 script #manhole1-001-1 NPC_NO_SPRITE,{ - - .@i=manhole_interact("001-3-0"); - closeclientdialog(); - if (.@i == -1) { - slide_or_warp("001-3-0", 152, 56); - } else if (.@i == TrainingArrow || .@i == WoodenBow) { - npctalk3 l("(You hear a faint sound in distance, but can't say what sound it was.)"); - } - close; - -OnInit: - .distance = 1; - end; -} - -001-1,196,35,0 script #manhole2-001-1 NPC_NO_SPRITE,{ - - .@i=manhole_interact("001-3-0"); - closeclientdialog(); - if (.@i == -1) { - slide_or_warp("001-3-0", 196, 36); - } else if (.@i == TrainingArrow || .@i == WoodenBow) { - npctalk3 l("???: Hey! Is someone there? Please, help, it's so dark down here!"); - } - close; - -OnInit: - .distance = 1; - end; -} - -001-1,146,123,0 script #manhole3-001-1 NPC_NO_SPRITE,{ - - .@i=manhole_interact("001-3-0"); - closeclientdialog(); - if (.@i == -1) { - // Not a fan of calling strong players as weak, so take STR in account - // If you have enough STR, you get an Easter Egg about the engine :) - if (readparam(bStr) < 50) { - mesc l("The lid is sealed shut, and you are too weak to open it."); - } else { - mesc l("Even with your Hercules strength, this lid is hopelessly struck."); - } - } else if (.@i == TrainingArrow || .@i == WoodenBow) { - // This is the wrong lid for Mundane Quest - npctalk3 l("..."); - } - close; - -OnInit: - .distance = 1; - end; -} - -// This lid can only be used to leave -001-1,86,131,0 script #manhole4-001-1 NPC_NO_SPRITE,{ - - .@i=manhole_interact("001-3-0"); - closeclientdialog(); - if (.@i == -1) { - mesc l("Strangely enough, this lid can only be open from inside."); - } else if (.@i == TrainingArrow || .@i == WoodenBow) { - // This is the wrong lid for Mundane Quest - npctalk3 l("..."); - } - close; - -OnInit: - .distance = 1; - end; -} - -// To quickly create more sewer mouths we can use: -//001-1,86,131,0 duplicate(#manhole3-001-1) #manhole4-001-1 NPC_NO_SPRITE - diff --git a/npc/001-1/mapflags.txt b/npc/001-1/mapflags.txt old mode 100644 new mode 100755 index 3e529501..4285d7f7 --- a/npc/001-1/mapflags.txt +++ b/npc/001-1/mapflags.txt @@ -1 +1,2 @@ -001-1 mapflag town +//001-1 mapflag town +//001-1 mapflag resave 001-1,60,105 diff --git a/npc/001-1/marine.txt b/npc/001-1/marine.txt deleted file mode 100644 index b9cd93f9..00000000 --- a/npc/001-1/marine.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Moubootaur Legends scripts. -// Authors: -// Jesusalva -// Description: -// This script controls access to Ships, fixing variables. - -// Use NPC_LA_MARINE if needed -001-1,204,85,0 script Gema IV#A NPC_HIDDEN,0,0,{ - end; - -OnTouch: - EnterTown("Artis"); - - warp "marine@"+LOCATION$, 42, 26; - closedialog; - close; -} diff --git a/npc/001-1/merlin.txt b/npc/001-1/merlin.txt deleted file mode 100644 index a96e404d..00000000 --- a/npc/001-1/merlin.txt +++ /dev/null @@ -1,24 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Fishmonger NPC - -001-1,73,128,0 script Merlin NPC_MERLIN,2,2,{ - -OnTouch: - switch(rand(6)) - { - case 0: npctalkonce(l("Fish, come and see my fish!")); break; - case 1: npctalkonce(l("They are fresh, they are good!")); break; - case 2: npctalkonce(l("Fresh from the sea and cheap!")); break; - case 3: npctalkonce(l("Come, come and see!")); break; - case 4: npctalkonce(l("They are fresh!")); break; - default: npctalkonce(l("Fish is good for the brain!")); - } - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/mouboo.txt b/npc/001-1/mouboo.txt deleted file mode 100644 index bdc4d517..00000000 --- a/npc/001-1/mouboo.txt +++ /dev/null @@ -1,61 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Mouboo on Taree's fence. - -001-1,67,79,4 script Mouboo#Artis0 NPC_MOUBOO,{ - - moubootalk(); - close; - -OnTimer2000: - moubootimer; - -OnInit: - .distance = 2; - .speed = 600; - mouboograph; -} - -001-1,67,80,4 script Mouboo#Artis1 NPC_MOUBOO,{ - - moubootalk(); - close; - -OnTimer2000: - moubootimer; - -OnInit: - .distance = 2; - .speed = 600; - mouboograph; -} - -001-1,67,81,4 script Mouboo#Artis2 NPC_MOUBOO,{ - - moubootalk(); - close; - -OnTimer2000: - moubootimer; - -OnInit: - .distance = 2; - .speed = 600; - mouboograph; -} - -001-1,67,82,4 script Mouboo#Artis3 NPC_MOUBOO,{ - - moubootalk(); - close; - -OnTimer2000: - moubootimer; - -OnInit: - .distance = 2; - .speed = 600; - mouboograph; -} diff --git a/npc/001-1/nalkri.txt b/npc/001-1/nalkri.txt deleted file mode 100644 index e155a8a8..00000000 --- a/npc/001-1/nalkri.txt +++ /dev/null @@ -1,59 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Nalkri, walking NPC of the Legion of Aemil on the west part of Artis. - -001-1,35,84,0 script Nalkri#001-1 NPC_DEMON_MALE_LEGION_ARTIS,{ - npctalk3 l("Stay clear."); - close; - -OnTimer1000: - domovestep; - -OnInit: - initpath "move", 56, 84, - "move", 60, 93, - "move", 68, 98, - "dir", DOWN, 0, - "wait", 1, 0, - "move", 68, 100, - "dir", RIGHT, 0, - "wait", 1, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", LEFT, 0, - "wait", 1, 0, - "dir", UP, 0, - "move", 67, 98, - "dir", RIGHT, 0, - "wait", 2, 0, - "move", 51, 101, - "dir", LEFT, 0, - "wait", 1, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", RIGHT, 0, - "wait", 1, 0, - "dir", UP, 0, - "move", 48, 100, - "dir", RIGHT, 0, - "wait", 1, 0, - "dir", DOWN, 0, - "wait", 1, 0, - "dir", LEFT, 0, - "wait", 1, 0, - "dir", RIGHT, 0, - "move", 55, 96, - "move", 43, 88, - "move", 35, 84, - "dir", LEFT, 0, - "wait", 1, 0, - "dir", DOWN, 0, - "wait", 4, 0, - "dir", RIGHT, 0, - "wait", 1, 0; - - initialmove; - initnpctimer; -} diff --git a/npc/001-1/north_shops.txt b/npc/001-1/north_shops.txt new file mode 100755 index 00000000..88d4c306 --- /dev/null +++ b/npc/001-1/north_shops.txt @@ -0,0 +1,6 @@ +001-1,106,105,0 shop Neko NPC101,3006:10,501:25,502:35,533:55,539:87,562:250 +001-1,111,108,0 shop Inar NPC108,1202:5,656:100,586:500,735:500,546:1000,724:500,723:2400 +001-1,48,79,0 script Well NPC400,{ + callfunc "WaterBottle"; + end; +} diff --git a/npc/001-1/npcs.txt b/npc/001-1/npcs.txt new file mode 100755 index 00000000..4d65a5ba --- /dev/null +++ b/npc/001-1/npcs.txt @@ -0,0 +1,70 @@ +001-1,49,82,0 script Cyndala NPC210,{ + @npcname$ = "Cyndala"; + + mes "[" + @npcname$ + "]"; + mes "\"I used to visit the beach, but then the green slimes went crazy. I heard they ate a bunch of pirates that robbed some of Tulimshar's gold ships.\""; + next; + mes "\"Good riddance!\""; + @npcname$ = ""; + close; +} +001-1,100,79,0 script Marikel NPC211,{ + @npcname$ = "Marikel"; + + mes "[" + @npcname$ + "]"; + mes "\"Working on the docks can be hard nowadays.\""; + next; + mes "\"At least it pays well.\""; + menu + "Why does it pay well?",L_Marikel_1, + "Pfft! Working on the docks is for the birds.",L_Marikel_2; + +L_Marikel_1: + mes "[" + @npcname$ + "]"; + mes "\"Tulimshar is the wealthiest and most powerful city in the world!\""; + close; + +L_Marikel_2: + mes "[" + @npcname$ + "]"; + mes "\"Yeah, killing monsters may pay well, but I'd need more hazard pay than a tower mason to hunt monsters.\""; + next; + mes "\"I'll just play safe and stick to putting our stock away. Be careful, the monsters outside the city can be dangerous.\""; + next; + mes "\"The Sandstorm mine, just South of Tulimshar, is blocked from most but miners, soldiers and seasoned monster slayers.\""; + close; +} + +001-1,105,53,0 script Joelin NPC212,{ + @npcname$ = "Joelin"; + + mes "[" + @npcname$ + "]"; + mes "\"My ship's to set sail soon. We'll tour around the Acean Isles, then back around to Argaes, then here in Tonori.\""; + next; + mes "\"Tulimshar's Fleets also are sending exploration teams to build a dock in Nivalis on Kaizei, which I'm not really hoping for. It's cold up there!\""; + close; +} + +001-1,107,53,0 script Harper NPC213,{ + @npcname$ = "Harper"; + + mes "[" + @npcname$ + "]"; + mes "\"My captain knows an awlful lot about the world's continents.\""; + close; +} +001-1,75,99,0 script Swezanne NPC206,{ + @npcname$ = "Swezanne"; + + mes "[" + @npcname$ + "]"; + mes "\"Just through over this bridge is the bazaar. I go to the Bazaar and shop at Neko's.\""; + close; +} +001-1,92,107,0 script Michel NPC215,{ + @npcname$ = "Michel"; + + mes "[" + @npcname$ + "]"; + mes "\"Elanore is a magician in Southern Tulimshar that helps young adventurers by healing their battle wounds. When they are experienced enough, she stops healing them.\""; + next; + mes "\"You can find her by going out the south gate and to the east.\""; + @npcname$ = ""; + close; +} diff --git a/npc/001-1/panels.txt b/npc/001-1/panels.txt deleted file mode 100644 index 19d1fb11..00000000 --- a/npc/001-1/panels.txt +++ /dev/null @@ -1,57 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Panels to give advice and some random information to players. - -001-1,180,25,0 script #ArtisPanel1 NPC_NO_SPRITE,{ - narrator S_LAST_NEXT, - l("You step on something, a panel half overgrown by moss, it has writing on it..."); - - mesq l("Don't fall!"); - next; - mesq l("You've reached the highest natural place of Artis, enjoy the view."); - next; - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} - -001-1,95,51,0 script #ArtisPanel2 NPC_NO_SPRITE,{ - narrator S_LAST_NEXT, - l("You step on something, a shaky and fragile panel with barely visible inscriptions on it..."); - - mesq l("Beware of falling stones from the cliff!"); - next; - mesq l("The other part of this sign has been crushed by a rock."); - next; - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} - -001-1,103,66,0 script #ArtisPanel3 NPC_NO_SPRITE,{ - narrator S_LAST_NEXT, - l("You step on something, a panel with a bitten corner and clear inscriptions on it..."); - - mesq l("Warning! Dangerous fish, do not fall into the lake!"); - next; - narrator S_LAST_NEXT, - l("Somebody tried to stroke the word \"fish\" and tried to replace it with \"sharkes\"."); - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} - diff --git a/npc/001-1/pious.txt b/npc/001-1/pious.txt deleted file mode 100644 index 35e65048..00000000 --- a/npc/001-1/pious.txt +++ /dev/null @@ -1,15 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// Pious on Market -// Variables: -// none - -001-1,55,119,0 script #MarketPiou1 NPC_MARKET_PIOU,{ - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-1/qonan.txt b/npc/001-1/qonan.txt deleted file mode 100644 index f00a2cf3..00000000 --- a/npc/001-1/qonan.txt +++ /dev/null @@ -1,113 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Sailor of Nard's La Johanne ship. -// ArtisQuests_QOnan -- quest variable: -// 0 - not started -// 1 - Q'Onan asked to find Chest -// 2 - Chest found, heading back to Q'Onan -// 3 - Quest completed - -001-1,186,107,0 script Q'Onan#001-1 NPC_QONAN,{ - - .@q = getq(ArtisQuests_QOnan); - if (.@q == 1) goto L_QuestGiven; - if (.@q == 2) goto L_ItemFound; - if (.@q == 3) goto L_QuestDone; - - speech S_LAST_BLANK_LINE, - l("We haven't met, right?"), - l("My name is Q'Onan, I'm a member of Nard's crew."), - l("I have a lot of work here, so I don't even have time to go to the town."), - l("Could you do a small favor for me?"); - - switch (select(l("Go on."), l("I don't have the time sorry."))) - { - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No problem, see you next time."); - closeclientdialog; - close; - } - - speech S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("Before I joined Nard, I used to be a thief."), - l("I'm not proud of it, but I had to steal money from others to keep on living."), - l("Anyway, the last time I stole something I was almost caught."), - l("I robbed a nobleman, took a chest full of coins."), - l("But my luck left me, because as soon as I left his house, the guards started chasing me."), - l("It was at night, so I could barely escape. I ran to Artis hill."), - l("I was afraid to get busted, so I decided to get rid of the evidence."), - l("I buried the chest somewhere on that hill. It was dark, so I don't remember where to dig exactly."), - l("I'm afraid to go there myself, but if you take the risk, you can have half of the loot."), - l("So, what do you say?"); - - select - l("I like money! Consider it done."), - l("Too risky, I might end up in jail. Do it yourself."); - - switch(@menu) - { - case 1: - setq ArtisQuests_QOnan, 1; - getrandompoint(178,26,182,29); - npcdebug "Chest buriad at (" + .move__rand_x + "," + .move__rand_y + ")"; - shovel_addquest("001-1", .move__rand_x, .move__rand_y, "QOnanFoundItem"); - speech S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("Alright, you will need this shovel."), - l("You should check on the highest part of the cliff, I was hiding there."), - l("I hope to see you soon."); - getitem IronShovel, 1; - // For questlog - setq2 ArtisQuests_QOnan, .move__rand_x+any(-1,1); - setq3 ArtisQuests_QOnan, .move__rand_y+any(-1,1); - close; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("Come on, don't be a coward!"), - l("Anyway, let me know if you change your mind."); - close; - } - -L_QuestGiven: - speech S_LAST_NEXT, l("I asked you to do me a favor, did you forget?"); - select l("What should I do, again?"); - speech S_FIRST_BLANK_LINE, - l("Please find the small chest, buried somewhere on Artis hill."), - l("You should check on the highest part of the cliff, I was hiding there."), - l("Bring it to me, and you will get your reward."); - close; - -L_ItemFound: - speech - l("After all this time, it was still there!"), - l("We are very lucky, my friend."), - l("Let me open it with my key."), - l("Like I promised, here is your share."), - l("I can finally pay off my debts."); - - Zeny += 1800; - setq ArtisQuests_QOnan, 3; - close; - -L_QuestDone: - speech l("Howdy, partner in crime?"); - close; - -OnInit: - .distance = 2; - .debug = 1; - end; -} - -function script QOnanFoundItem { - setq ArtisQuests_QOnan, 2, 0, 0; - // getitem SmallChest, 1; - narrator S_FIRST_BLANK_LINE, - l("You found a small chest, surprisingly heavy for it's size."), - l("It's probably full of coins, but no matter how hard you try to open it, you can't."), - l("Better take it back to Q'Onan."); - return; -} diff --git a/npc/001-1/qpid.txt b/npc/001-1/qpid.txt deleted file mode 100644 index 5976c9cf..00000000 --- a/npc/001-1/qpid.txt +++ /dev/null @@ -1,169 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Potion seller, she is part of the Enora's noob quests. - -001-1,65,116,0 script Q'Pid#001-1 NPC_QPID,{ - - function riddle_enigma { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok fine, you have up to 3 tries, here is the riddle:"), - l("What is growing and shrinking at the same time?"); - narrator S_LAST_NEXT, - l("You need to type the answer of this riddle in the NPC window."), - l("The answer is a single word, without conjugation."), - l("You can also answer in your native language or in English."); - - do - { - input .@answer$; - .@i++; - - if (riddlevalidation(.@answer$, "life", l("life"))) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh..."), - l("You seem more cultivated than you look."); - - if (getq(ArtisQuests_Enora) == 7) - { - setq(ArtisQuests_Enora, 9); - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("Fine, take these potions, I will replenish them in the next couple hours anyway."); - } - - break; - } - else if (.@i < 3) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Too bad, try again."); - } - else - { - if (getq(ArtisQuests_Enora) == 7) - { - setq(ArtisQuests_Enora, 8); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You failed!"), - l("Ivan is the one you should look for now."), - l("He is in a small house between the dock's warehouse and the dojo."), - l("Follow the canal to the north-east and you will find it."), - l("And get out of here, I'm not a map!"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You failed!"); - } - - break; - } - } while (true); - - return; - } - - function enora_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("She wants? What if I don't want?"), - l("I'm not a pawn of the Legion, I don't have to obey you!"), - l("Oh and guess what! I'm almost out of potions anyway."); - - switch (select(l("And where can I find these potions?"), - l("You bored me, see you later."))) - { - case 1: - break; - case 2: - return; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You don't seem to be from the Legion, let's do a game."), - l("If you find the correct answer, I will give you these potions..."), - l("But if you fail, you will have to get them from the alchemist."), - l("Deal?"); - - if (askyesno() == ASK_YES) - { - riddle_enigma; - } - return; - } - - function alchemist_information { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Do? I don't do them."), - l("I'm sure that you already knew the answer, didn't you?"), - l("You tried to embarrass me, am I right?!"), - l("It's Ivan... I'm sure that he sent you to annoy me..."), - l("I'm just a merchant, I trade and make deals, yes \"excuse\" me if I'm not as skilled as that stupid alchemist."), - l("But rare are those that receive grants from the Legion itself. For anybody else only a hard work can pay your bills!"); - emotion E_UPSET; - - switch (select(l("Sorry I didn't mean to bother you."), - l("You are just sitting on the shadow of your store."))) - { - case 1: - mes ""; - mesn; - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You are honest, I like it."); - break; - } - mesq l("Is that all you had to say?"); - next; - - return; - } - - speech S_LAST_NEXT, - l("What?"); - - do - { - .@enora = getq(ArtisQuests_Enora); - - select - rif(.@enora == 7, l("Enora wants her potions.")), - menuaction(l("Trade")), - rif(.@enora > 7, l("What was your riddle?")), - l("How do you do your potions?"), - l("What are you reading?"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - enora_quest; - break; - case 2: - closeclientdialog; - shop "Store#Potion001-1"; - close; - case 3: - riddle_enigma; - break; - case 4: - alchemist_information; - break; - case 5: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's a poem, about poems... Why are you asking that?"), - l("Because I am a Kralog I can't read such things? That's rubbish."), - l("I borrowed it from the library, you should try to cultivate yourself more instead of insinuate things about people you don't know!"); - break; - } - } while (@menu != 6); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/001-1/rowboat.txt b/npc/001-1/rowboat.txt deleted file mode 100644 index ba07a1b0..00000000 --- a/npc/001-1/rowboat.txt +++ /dev/null @@ -1,69 +0,0 @@ -// Evol scripts. -// Author: -// Micksha, Toams -// Description: -// The rowboat, picking up the player on small beach in order to bring it to Koga. - -001-1,192,25,0 script #Rowboat NPC_ROWBOAT_STAND_WE,{ - if (.caller != getcharid(3)) { - mesn; - mesq l("Oh, hello. I am just observing the whales."); - next; - mesn; - mesq l("Nobody told me anything about you, unfortunately."); - close; - } - - speech S_LAST_BLANK_LINE | S_LAST_NEXT, - l("Oh, hi."), - l("In case you don't have a commendatory letter from you-know-whom, I am just sitting here and observe the whales."), - l("Perhaps, and only perhaps, if you bring me the latter, I can bring you to a ship that will perhaps, and only perhaps, be able to bring you to Woodland."), - l("Do you have this commendatory letter?"); - closeclientdialog(); - if (askyesno() == ASK_YES) { - if (getq(General_Brotherhood) >= 2) - { - //slide 227, 62; - //slide 204, 62; - PC_DEST$="Argaes"; - @timer_navio_running = 1; - addtimer 210000, "#MarineShip::OnEvent"; // This route is 30s slower - warp "marine-2", 40, 32; - dispbottom l("You're smuggled aboard the Legion expedition. ACT NATURALLY!"); - .caller=0; - .clocks=gettimetick(2); - movenpc("#Rowboat", 192, 25); - //setmount 1; - } - else - { - npctalk3 l("You're lying, aren't you? I heard nothing from you-know-whom!"); - } - close; - } - -OnMoveToBeach: - startnpctimer; - initialmove; -end; - -OnTimer1000: - getmapxy(.@map$, .@cx, .@cy, 1); - if (.@cx == 192 && .@cy == 25) stopnpctimer; - else domovestep; - -OnInit: - .distance = 3; - .speed = 175; - .caller = 0; - .clocks = 0; - - initpath "move", 202, 27, - "move", 213, 58, - "move", 203, 64, - "wait", 15, 0, - "move", 213, 58, - "move", 202, 27, - "move", 192, 25; - initnpctimer; -} diff --git a/npc/001-1/rowboathelper.txt b/npc/001-1/rowboathelper.txt deleted file mode 100644 index d7809bf0..00000000 --- a/npc/001-1/rowboathelper.txt +++ /dev/null @@ -1,141 +0,0 @@ -// Evol scripts. -// Author: -// Toams -// Description: -// helper scripts for rowboat usage -// Notes: -// Curious Hole bypass the cutscenes - -// calling the Rowboat -001-1,200,60,0 script Curious Hole NPC_NO_SPRITE,{ - - .@q = getq(General_Narrator); - - mesc l("You see a curious hole behind some rocks."); - next; - mesn strcharinfo(0); - mesq l("Hey, anyone there?"); - next; - mesc l("..."); - next; - if (.@q < 2) - { - mesc l("Altough you can't get rid of the feeling someone is listening on the other side, you don't get any replies."); - close; - } - else - { - narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("Suddenly you remember the strange phrase Mona overheard Sophialla saying"), - l("Maybe you should try this phrase?")); - if (askyesno() == ASK_YES) - { - mesn strcharinfo(0); - mesc l("Sagratha is great."); - next; - - if (getvariableofnpc(.caller, "#Rowboat")) { - // Can you use it, or is it in grace time? - if (getvariableofnpc(.clocks, "#Rowboat") > gettimetick(2)) { - mesn; - mesq l("Please be patient. Someone else is using the rowboat right now."); - close; - } - // Rowboat already there, so change owner - mesn; - mesq l("Hello, a rowboat is already on the beach. You can use it."); - set(getvariableofnpc(.caller, "#Rowboat"), getcharid(3)); - set(getvariableofnpc(.clocks, "#Rowboat"), gettimetick(2)+15); - close; - } - // Rowboat is at hideout, send it to you - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Hello, a rowboat is on his way to the beach. Please wait for a while for it to arrive."); - - set(getvariableofnpc(.caller, "#Rowboat"), getcharid(3)); - set(getvariableofnpc(.clocks, "#Rowboat"), gettimetick(2)+30); - doevent("#Rowboat::OnMoveToBeach"); - close; - } - else - close; - } - -OnInit: - .distance = 1; -} - -// UNUSED -//unmounting the rowboat at eastern beach -001-1,202,62,0 script unmountrowboateast NPC_HIDDEN,1,1,{ - - function UnMount { - narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("Do you want to leave the boat?")); - if (askyesno() == ASK_YES) - { - slide_or_warp("001-1", 199, 62); - setmount 0; - close; - } -} - -OnTouch: - UnMount; - end; - -OnInit: - .distance = 1; -} - - -//unmounting the rowboat at southern beach -001-1,68,143,0 script unmountrowboatsouth NPC_HIDDEN,1,1,{ - - function UnMount { - narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("Do you want to leave the boat?")); - if (askyesno() == ASK_YES) - { - slide_or_warp("001-1", 68, 138); - setmount 0; - close; - } -} - -OnTouch: - UnMount; - end; - -OnInit: - .distance = 1; -} - - -//unmounting the rowboat at western beach -001-1,25,101,0 script unmountrowboatwest NPC_HIDDEN,1,1,{ - - function UnMount { - narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("Do you want to leave the boat?")); - if (askyesno() == ASK_YES) - { - slide_or_warp("001-1", 27, 101); - setmount 0; - close; - } -} - -OnTouch: - UnMount; - end; - -OnInit: - .distance = 1; -} - -function script ForcedUnmount { - setmount 0; - return; -} - diff --git a/npc/001-1/rumly.txt b/npc/001-1/rumly.txt deleted file mode 100644 index 6cc625ff..00000000 --- a/npc/001-1/rumly.txt +++ /dev/null @@ -1,225 +0,0 @@ -// Evol scripts. -// Author: -// Vasily_Makarov -// Description: -// Stat resetter. -// Variables: -// General_Rumly -// Values: -// 0 Player hasn't met Rumly -// 1 Last time player has told that he will never come back -// 2 Last time player has told that he will come back later -// 3 Player has already reset his stat -// Others: -// .@visited - Rumly actual variable -// .@wasSP - free status points before reset - -001-1,35,125,0 script Rumly#001-1 NPC_RUMLY,{ - - setnpcdir "Rumly#001-1", 2; - stopnpctimer; - initnpctimer; - - speech S_LAST_NEXT, - l("Hey you, do you have any @@s?", getitemlink(Plushroom)); - -L_Menu: - .@visited = getq(General_Rumly); - .@plush_count = lognbaselvl(1, 10); - - select - l("Plushrooms you say?"), - l("Who are you?"), - rif(.@visited > 0, l("Can you reset my stats please?")), - l("You are weird, I have to go sorry."); - - switch (@menu) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Wind and grass is nice and cool, so juicy sweet..."), - l("Our only wish to eat a plush, so juicy sweet..."); - goto L_Menu; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Why are you asking? And who are you too? I've never seen you around before..."), - l("Wait, are you one of those from the Legion of Gasaron? I didn't do anything wrong, I promise!"), - l("I... I just like to eat the purple and delightful... And natural, and..."); - - switch (select(l("Chill out I won't say anything."), - l("Yes I am and you are going to face justice!"))) - { - case 1: break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No! No, no, my precious plushrooms! Don’t take me to them, they wants my precious."); - goto L_Quit; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I won't forget it, I swear on my precious plushrooms!"), - l("There is an unknown side effect to these plushrooms, they can free you from your past mistakes."), - l("You can use it to clear your stats, to start freshly if you see what I mean..."), - l("Bring me some of these plushrooms and I will show you how it works!"), - l("Although the more powerful you are, the more plushrooms you will need."); - - select - l("Sounds good!"), - rif(countitem(Plushroom) >= .@plush_count, l("I think I have enough plushrooms on me.")), - l("We will talk about it later."), - l("My stats are too good, I won't need it."); - - switch (@menu) - { - case 1: - if (.@visited < 2) - { - setq General_Rumly, 2; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Great! Can't wait for some tasty mushrooms!"); - - goto L_Menu; - case 2: - goto L_ResetStats; - case 3: - goto L_Later; - case 4: - goto L_Never; - } - - case 3: - goto L_ResetStats; - case 4: - if (.@visited < 2) goto L_Quit; - - .@rand = rand(2); - - if (.@rand) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("See you! And come back with the plushrooms!"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh noes!"), - l("A rabbit!"), - l("He has a guns!"), - l("*Bang bang*"); - narrator S_LAST_NEXT, - l("Rumly is hiding behind the tree."); - } - - goto L_Quit; - } - -L_ResetStats: - if (.@visited == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Changed your mind, uh?"), - l("Very good."), - l("Status point reset can't be undone. Do you really want this?"), - l("Are you sure about this?"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Are you sure about this?"); - } - -L_ConfirmReset: - switch (select(l("Yes, I am sure."), - l("I need to think about it..."), - l("I won't need it, thank you."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Let me just have a quick look at you. Hm... I will need @@ @@s to reset your stats.", .@plush_count, getitemlink(Plushroom)); - - select - rif(countitem(Plushroom) >= .@plush_count, l("Here, take as many as you need, I have plenty!")), - rif(countitem(Plushroom) > 0 && countitem(Plushroom) < .@plush_count, l("I don't have enough plushrooms...")), - rif(countitem(Plushroom) == 0, l("Oh no, I don't have any plushroom on me right now.")), - l("I have to go, sorry."); - - if (@menu > 1) - { - goto L_Later; - } - - delitem Plushroom, .@plush_count; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you."), - l("Now stand still... It should not take much time..."); - - .@wasSP = StatusPoint; - resetstatus; - if (.@visited < 3) - { - setq General_Rumly, 3; - } - if (StatusPoint == .@wasSP) - { - speech S_LAST_NEXT, - l("It seems that you have no status points to reset!"), - l("But the plushroom you brought was really awesome you know."), - l("Come back when you will really need me. And bring more plushrooms with you!"); - } - else - { - speech S_LAST_NEXT, - l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), - l("Spend it wisely this time."), - l("But you are welcome to reset your stats again if you bring me some more plushrooms!"); - } - goto L_Quit; - - case 2: - goto L_Later; - case 3: - goto L_Never; - } - -L_Later: - if (.@visited < 2) - { - setq General_Rumly, 2; - } - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Come back soon, and bring @@s!", getitemlink(Plushroom)); - - goto L_Quit; - -L_Never: - if (.@visited < 2) - { - setq General_Rumly, 1; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I am sure that you will change your mind."); - - goto L_Quit; - -L_Quit: - setnpcdir "Rumly#001-1", 4; - stopnpctimer; - initnpctimer; - - goodbye; - -OnTimer1800: - stopnpctimer; - - if (getnpcdir("Rumly#001-1") == 2) setnpcdir "Rumly#001-1", 6; - if (getnpcdir("Rumly#001-1") == 4) setnpcdir "Rumly#001-1", 8; - - end; - -OnInit: - end; -} diff --git a/npc/001-1/salem.txt b/npc/001-1/salem.txt deleted file mode 100644 index 913db476..00000000 --- a/npc/001-1/salem.txt +++ /dev/null @@ -1,219 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// Trader on the market. One of his pious escaped and -// flies around the town. -// Variables: -// ArtisQuests_CatchPiou -- quest variable -// Quest states: -// 0 -- not started -// 1 -- trader asked to catch piou -// 2 -- quest finished -// Note: this script is ugly like hell - -001-1,57,118,0 script Salem#001-1 NPC_SALEM,{ - - function BuyPiou { - .@price = getarg(0); - mesq l("The piou costs @@ E.", .@price); - next; - select - l("Alright, I'll take one."), - l("I changed my mind."); - - mes ""; - mesn; - if (@menu == 2) - return 4; - if (Zeny < .@price) - { - mesq l("Don't you try to cheat an old merchant! You don't have enough money, you need @@ E.", .@price); - next; - - return 1; - } - if (!checkweight(PiouEgg, 1)) - { - mesq l("You can't carry another @@? What a shame.", PiouEgg); - next; - - return 2; - } - getinventorylist; - if (.@inventorylist_count >= 100) - { - mesq l("You don't have enough room in your backpack for a @@. Go stow some of your junk and come back.", PiouEgg); - next; - - return 3; - } - Zeny -= .@price; - getitem PiouEgg, 1; - ArtisQuests_PiousBought += 1; - mesq l("You take good care of your piou. Remember to feed it every day."); - - return 0; - } - -// if (2 == select("[debug]continue quest:[debug] start over")) -// { -// debugmes "Starting quest CatchPiou over"; -// setq ArtisQuests_CatchPiou, 0; -// } - - .@q = getq(ArtisQuests_CatchPiou); - @ArtisQuests_PiouPrice = 30000; - - if (.@q == 1) - { - if (.PiouCaught) - { - speech - l("Look who is back..."), - l("And with my piou. That's wonderful. I can only imagine how hard that little bugger was to catch!"), - l("Great, and as I promised, I give you a 90% discount on the @@ of your choice.", getitemlink(PiouEgg)); - next; - - @ArtisQuests_PiouPrice = 3000; - ArtisQuests_PiouDiscount = 1; - donpcevent strnpcinfo(3) + "::OnPiouFlee"; - setq ArtisQuests_CatchPiou, 2; - .@q = getq(ArtisQuests_CatchPiou); - - .LastPiouHunter$ = ""; - ArtisQuests_CatchPiou_Difficulcy = 0; - .@BoughtPiou = BuyPiou(@ArtisQuests_PiouPrice); - if (.@BoughtPiou == 0) - ArtisQuests_PiouDiscount = 0; - else if (.@BoughtPiou == 4) - speech S_FIRST_BLANK_LINE, l("See you next time!"); - - close; - } - else - { - speech - l("Look who is back..."), - l("So, where is my piou? You should not keep an old man waiting. Go and catch it like you said you would."); - next; - goto L_SalemMenuShop; - } - } - - speech S_LAST_NEXT, - l("Good day, my friend, come closer, come closer!"); - l("Just look at my goods for sale! Fresh fruits and vegetables were shipped only this morning. And for reasonable price, of course."); - -L_SalemMenuShop: - .@fexil = getq(ArtisQuests_Fexil); - - select - l("What about those pious? They look so cute."), - l("Let's trade."), - rif(.@q != 0, l("I'd like to buy a piou.")), - rif(.@fexil == 1, l("I'm looking for somebody named Fexil.")), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - goto L_AboutPious; - break; - case 2: - closeclientdialog; - shop "Store#General001-1"; - close; - case 3: - if (.@q == 2 && ArtisQuests_PiouDiscount) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You still have a 90% discount on one piou."); - @ArtisQuests_PiouPrice = 3000; - } - if (!BuyPiou(@ArtisQuests_PiouPrice)) - ArtisQuests_PiouDiscount = 0; - break; - case 4: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I think that I've seen this weakling wandering around the beach south from here this morning."); - break; - } - - closeclientdialog; - goodbye; - close; - -L_AboutPious: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ah, the locals like keeping them as pets."), - l("With proper training, a piou can become a good friend and faithful companion in your adventures."); - - if (getq(ArtisQuests_CatchPiou) >= 2) - { - goto L_SalemMenuShop; - } - - mesq l("Their price is usually high, but you know what? I have a bargain offer for you."); - next; - mesq l("These little pious here can't fly. At least that's what I thought."); - next; - mesq l("One of these little boogers started flying early, and escaped from me."); - next; - mesq l("It's still too young to fly too far away, so it just circles nearby."); - next; - mesq l("But I can't leave to catch it, so I'm asking you."); - next; - mesq l("If you catch the escaped piou and bring it back, I will give you a 90% discount on a piou."); - next; - - select - rif(.@q == 0, l("Sounds like a good deal to me. I'll do it.")), - rif(.@q == 1, l("I'm on my way! I will bring it back to you.")), - l("I don't really have time to go chasing pious, let me just buy one at the regular price (30000 E)."), - l("I don't want to buy a piou right now."); - - mes ""; - mesn; - - switch (@menu) - { - case 1: - goto L_QuestInfo; - case 3: - BuyPiou @ArtisQuests_PiouPrice; - } - closeclientdialog; - goodbye; - close; - -L_QuestInfo: - mesq l("The little piou is flying nearby, all you need is to catch it and bring back to me."); - next; - setq ArtisQuests_CatchPiou, 1; - ArtisQuests_CatchPiou_Difficulcy = 2; - mesq l("Good luck!"); - close; - -OnPiouFlee: - sleep 120000; - if (!.PiouCaught) - end; - .PiouCaught = 0; - .@piou$ = "#FlyingPiou1"; - if (getstrlen(.LastPiouHunter$) > 0) - { - message .LastPiouHunter$, .PiouEscapedMessage$; - .LastPiouHunter$ = ""; - } - // debugmes "The piou escaped from " + .LastPiouHunter$; - sleep 60000; - enablenpc .@piou$; - movenpc .@piou$, 53, 117; - donpcevent .@piou$ + "::OnInit"; - end; - -OnInit: - .distance = 5; - end; -} diff --git a/npc/001-1/sewer_east.txt b/npc/001-1/sewer_east.txt new file mode 100755 index 00000000..1311b536 --- /dev/null +++ b/npc/001-1/sewer_east.txt @@ -0,0 +1,15 @@ + +001-1,117,110,0 script #tulimsharsewer2 NPC45,0,0,{ + mes "Descend into the sewers?"; + next; + menu + "Yes.", L_Sewer, + "Nevermind.", L_close; + +L_Sewer: + warp "021-3",143,129; + goto L_close; + +L_close: + close; +} diff --git a/npc/001-1/sewer_north.txt b/npc/001-1/sewer_north.txt new file mode 100755 index 00000000..6a77a9b4 --- /dev/null +++ b/npc/001-1/sewer_north.txt @@ -0,0 +1,15 @@ + +001-1,58,83,0 script #tulimsharsewer1 NPC45,0,0,{ + mes "Descend into the sewers?"; + next; + menu + "Yes.", L_Sewer, + "Nevermind.", L_close; + +L_Sewer: + warp "021-3",57,100; + goto L_close; + +L_close: + close; +} diff --git a/npc/001-1/shop.txt b/npc/001-1/shop.txt deleted file mode 100644 index f33ee4ac..00000000 --- a/npc/001-1/shop.txt +++ /dev/null @@ -1,298 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Market shops. - -001-1,46,135,0 trader Bag#001-1 NPC_SHOP_BAG,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem PiouLegs, -1, 15; - sellitem Bread, -1, 15; - sellitem Croconut, -1, 50; - sellitem Aquada, -1, 50; - sellitem Armbands, -1, 20; - sellitem LousyMoccasins, -1, 20; - sellitem PiouSlayer, -1, 15; - - .distance = 3; - end; - -OnClock0000: - restoreshopitem PiouLegs, 15; - restoreshopitem Bread, 15; - restoreshopitem Croconut, 50; - restoreshopitem Aquada, 50; - restoreshopitem Armbands, 20; - restoreshopitem LousyMoccasins, 20; - restoreshopitem PiouSlayer, 15; -} - -001-1,46,125,0 trader Cotton#Dye001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem BlackCottonDye, -1, 10; - sellitem SilverCottonDye, -1, 10; - sellitem CamelCottonDye, -1, 10; - sellitem BrownCottonDye, -1, 10; - sellitem OrangeCottonDye, -1, 10; - sellitem DarkRedCottonDye, -1, 10; - sellitem RedCottonDye, -1, 10; - sellitem FuschiaCottonDye, -1, 10; - sellitem PinkCottonDye, -1, 10; - sellitem MauveCottonDye, -1, 10; - sellitem PurpleCottonDye, -1, 10; - sellitem NavyBlueCottonDye, -1, 10; - sellitem BlueGrayCottonDye, -1, 10; - sellitem BlueCottonDye, -1, 10; - sellitem TealCottonDye, -1, 10; - sellitem GreenCottonDye, -1, 10; - sellitem LimeCottonDye, -1, 10; - sellitem KhakiCottonDye, -1, 10; - sellitem YellowCottonDye, -1, 10; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem BlackCottonDye, 10; - restoreshopitem SilverCottonDye, 10; - restoreshopitem CamelCottonDye, 10; - restoreshopitem BrownCottonDye, 10; - restoreshopitem OrangeCottonDye, 10; - restoreshopitem DarkRedCottonDye, 10; - restoreshopitem RedCottonDye, 10; - restoreshopitem FuschiaCottonDye, 10; - restoreshopitem PinkCottonDye, 10; - restoreshopitem MauveCottonDye, 10; - restoreshopitem PurpleCottonDye, 10; - restoreshopitem NavyBlueCottonDye, 10; - restoreshopitem BlueGrayCottonDye, 10; - restoreshopitem BlueCottonDye, 10; - restoreshopitem TealCottonDye, 10; - restoreshopitem GreenCottonDye, 10; - restoreshopitem LimeCottonDye, 10; - restoreshopitem KhakiCottonDye, 10; - restoreshopitem YellowCottonDye, 10; -} - -001-1,48,125,0 trader Silk#Dye001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem PitchBlackSilkDye, -1, 7; - sellitem ChocolateSilkDye, -1, 7; - sellitem CrimsonSilkDye, -1, 7; - sellitem TomatoSilkDye, -1, 7; - sellitem GoldenrodSilkDye, -1, 7; - sellitem SunflowerSilkDye, -1, 7; - sellitem OliveSilkDye, -1, 7; - sellitem SeaGreenSilkDye, -1, 7; - sellitem MintSilkDye, -1, 7; - sellitem MidnightBlueSilkDye, -1, 7; - sellitem SlatBlueSilkDye, -1, 7; - sellitem OrchidSilkDye, -1, 7; - sellitem PinkiePinkSilkDye, -1, 7; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem PitchBlackSilkDye, -1, 7; - restoreshopitem ChocolateSilkDye, -1, 7; - restoreshopitem CrimsonSilkDye, -1, 7; - restoreshopitem TomatoSilkDye, -1, 7; - restoreshopitem GoldenrodSilkDye, -1, 7; - restoreshopitem SunflowerSilkDye, -1, 7; - restoreshopitem OliveSilkDye, -1, 7; - restoreshopitem SeaGreenSilkDye, -1, 7; - restoreshopitem MintSilkDye, -1, 7; - restoreshopitem MidnightBlueSilkDye, -1, 7; - restoreshopitem SlatBlueSilkDye, -1, 7; - restoreshopitem OrchidSilkDye, -1, 7; - restoreshopitem PinkiePinkSilkDye, -1, 7; -} - -001-1,64,114,0 trader Store#Aquada001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Aquada, -1, 50; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem Aquada, 20; -OnClock0800: - restoreshopitem Aquada, 20; -OnClock1600: - restoreshopitem Aquada, 20; -} - -001-1,72,126,0 trader Store#SeaStore001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Aquada, -1, 10; - sellitem UrchinMeat, -1, 20; - sellitem SmallTentacles, -1, 30; - sellitem Tentacles, -1, 15; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem Aquada, 3; - restoreshopitem UrchinMeat, 12; - restoreshopitem SmallTentacles, 4; -OnClock0800: - restoreshopitem Aquada, 6; - restoreshopitem UrchinMeat, 8; - restoreshopitem Tentacles, 8; - restoreshopitem SmallTentacles, 2; -OnClock1600: - restoreshopitem Aquada, 5; - restoreshopitem UrchinMeat, 10; - restoreshopitem SmallTentacles, 7; -} - -001-1,72,129,0 trader Store#FishStore001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem CommonCarp, -1, 8; - sellitem GrassCarp, -1, 7; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem CommonCarp, 3; - restoreshopitem GrassCarp, 2; -OnClock0800: - restoreshopitem CommonCarp, 2; - restoreshopitem GrassCarp, 3; -OnClock1600: - restoreshopitem CommonCarp, 3; - restoreshopitem GrassCarp, 4; -} - -001-1,48,116,0 trader Store#Manana001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Manana, -1, 60; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem Manana, 20; -OnClock0800: - restoreshopitem Manana, 15; -OnClock1600: - restoreshopitem Manana, 20; -} - -001-1,53,123,0 trader Store#Various001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Manana, -1, 30; -// Add soft drinks. - - .distance = 4; - end; - -OnClock0000: - restoreshopitem Manana, 10; -OnClock0800: - restoreshopitem Manana, 15; -OnClock1600: - restoreshopitem Manana, 6; -} - -001-1,67,116,0 trader Store#Potion001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem PiberriesInfusion, -1, 200; - sellitem FatesPotion, -1, 100; - sellitem ClothoLiquor, -1, 50; - sellitem LachesisBrew, -1, 30; - sellitem AtroposMixture, -1, 10; - sellitem ElixirOfLife, -1, 1; - - .distance = 4; - end; - -OnClock0000: - restoreshopitem PiberriesInfusion, 150; - restoreshopitem FatesPotion, 80; - restoreshopitem ClothoLiquor, 40; - restoreshopitem LachesisBrew, 20; - restoreshopitem AtroposMixture, 7; - restoreshopitem ElixirOfLife, 1; -OnClock1200: - restoreshopitem PiberriesInfusion, 80; - restoreshopitem FatesPotion, 40; - restoreshopitem ClothoLiquor, 20; - restoreshopitem LachesisBrew, 10; - restoreshopitem AtroposMixture, 4; -} - -001-1,58,119,0 trader Store#General001-1 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Manana, -1, 100; - sellitem Carrot, -1, 80; - sellitem Aquada, -1, 50; - sellitem Plushroom, -1, 100; - sellitem Curshroom, -1, 80; - sellitem Piberries, -1, 150; - sellitem PiouEgg, -1, 25; -// Add soft drinks. - - .distance = 4; - end; - -OnClock0000: - restoreshopitem Manana, 50; - restoreshopitem Carrot, 40; - restoreshopitem Aquada, 30; - restoreshopitem Plushroom, 40; - restoreshopitem Curshroom, 30; - restoreshopitem Piberries, 40; - restoreshopitem PiouEgg, 10; -OnClock0800: - restoreshopitem Manana, 30; - restoreshopitem Carrot, 30; - restoreshopitem Aquada, 30; - restoreshopitem Plushroom, 40; - restoreshopitem Curshroom, 30; - restoreshopitem Piberries, 70; - restoreshopitem PiouEgg, 10; -OnClock1600: - restoreshopitem Manana, 40; - restoreshopitem Carrot, 40; - restoreshopitem Aquada, 20; - restoreshopitem Plushroom, 20; - restoreshopitem Curshroom, 20; - restoreshopitem Piberries, 30; - restoreshopitem PiouEgg, 5; -} diff --git a/npc/001-1/sign.txt b/npc/001-1/sign.txt deleted file mode 100644 index ecd115be..00000000 --- a/npc/001-1/sign.txt +++ /dev/null @@ -1,168 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Reid -// Description: -// Sign pillars aside Artis houses. - -001-1,73,119,0 script Sign#001-1-s-market NPC_NO_SPRITE,{ - npctalkonce l("Market Place"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,48,122,0 script Sign#001-1-s-marketright NPC_NO_SPRITE,{ - npctalkonce l("Market Place"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,57,88,0 script Sign#001-1-s-marketdir NPC_NO_SPRITE,{ - npctalkonce l("↓ Market Place"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,55,86,0 script Sign#001-1-s-exit-l-dir NPC_NO_SPRITE,{ - npctalkonce l("← Exit"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,59,85,0 script Sign#001-1-s-legiondir NPC_NO_SPRITE,{ - npctalkonce l("↑ Legion"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,57,80,0 script Sign#001-1-s-library NPC_NO_SPRITE,{ - npctalkonce l("Library"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,57,71,0 script Sign#001-1-s-lightarmor NPC_NO_SPRITE,{ - npctalkonce l("Light Armor Shop"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,53,56,0 script Sign#001-1-s-legion NPC_OFFSET_NO_SPRITE,{ - npctalkonce l("Legion of Aemil"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,60,56,0 script Sign#001-1-s-legionright NPC_OFFSET_NO_SPRITE,{ - npctalkonce l("Legion of Aemil"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,91,66,0 script Sign#001-1-s-cityhall NPC_NO_SPRITE,{ - npctalkonce l("City Hall"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,95,111,0 script Sign#001-1-s-blacksmith NPC_NO_SPRITE,{ - npctalkonce l("Blacksmith"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,115,88,0 script Sign#001-1-s-inn NPC_NO_SPRITE,{ - npctalkonce l("Inn"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,134,85,0 script Sign#001-1-s-innright NPC_OFFSET_NO_SPRITE,{ - npctalkonce l("Inn"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,118,36,0 script Sign#001-1-s-merchantg NPC_NO_SPRITE,{ - npctalkonce l("Merchant Guild"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,171,48,0 script Sign#001-1-s-hill NPC_OFFSET_NO_SPRITE,{ - npctalkonce l("Hill & Cliff"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,161,72,0 script Sign#001-1-s-alchemist NPC_NO_SPRITE,{ - npctalkonce l("Alchemist's Laboratory"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,175,76,0 script Sign#001-1-s-warehouse NPC_NO_SPRITE,{ - npctalkonce l("Docks Warehouse"); - close; - -OnInit: - .distance = 1; - end; -} - -001-1,47,97,0 script Sign#001-1-s-barber NPC_NO_SPRITE,{ - npctalkonce l("Barber"); - close; - -OnInit: - .distance = 1; - end; -} diff --git a/npc/001-1/sophialla.txt b/npc/001-1/sophialla.txt deleted file mode 100644 index f44ef218..00000000 --- a/npc/001-1/sophialla.txt +++ /dev/null @@ -1,88 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Sophialla, the connection between Artis and the Brotherhood in Hurns. -// THIS IS A PLACEHOLDER! - -001-1,73,40,0 script Sophialla#001-1 NPC_SOPHIALLA,{ - .@q=getq(General_Brotherhood); - if (!.@q) - { - speech - l("Hello."), - l("Can't you see I am reading? Please go, please."); - // Please go, please? What? - close; - } - speech - l("Hello."), - l("Can't you see I am reading? If you need something, tell me the secret password."); - // TODO: Use a token to know password or whatever - // PS. "Sagratha" is not a typo. - select - l("Sorry to disturb you."), - rif(getq(ArtisQuests_MonaDad) == 3, l("Sagratha is great.")), - l("I don't know the password"); - mes ""; - if (@menu == 2) - { - speech - l("If you visit the sewers again... You'll find secret passages..."), - l("Look for the hideout, but tell no one about this. Then, say the password again."); - compareandsetq General_Brotherhood, 1, 2; - } - else if (@menu == 3) - { - mesn; - mesq l("If I just told you, it would not be a password anymore, right?"); - next; - mesn; - mesq l("I'm afraid you'll need to figure that out on your own."); - next; - mesn; - mesq l("This password is very secret. I don't think you would learn it even if you rescued someone missing for weeks."); - // Extra hint (TODO: Logic is crappy) - if (@sophiahalla_needhelp) { - next; - mesn; - mesq l("Actually, there is an ex-legion member whose daughter used to play nearby... How was she called? Mona I think?"); - next; - mesn; - mesq l("...Ah! Nevermind, I was talking to myself."); - } - @sophiahalla_needhelp=true; - next; - mesc l("%s sighs.", .name$); - } - - speech - l("If you don't know it, just go, please."); - close; - -OnLegionComplete: - restorecam; - mesn "???"; - mesc l("A strange voice seems to be calling out your name."); - next; - // NOTE: Sophialla is more than 15 tiles of distance from player - // Server refuses to send client data about where she is and that makes - // setcamnpc fail. This is why I set .alwaysVisible attribute to true. - // Note: you can work around with coordinates, but she won't be drawn. - setcamnpc "Sophialla#001-1"; - mesn; - mesq l("Hey. ppst. I have something important to tell you."); - next; - mesn; - mesq l("I just can't remember what. But come talk to me later once devs becomes less lazy."); - setq General_Brotherhood, 1; - next; - restorecam; - closeclientdialog; - close; - -OnInit: - .distance = 2; - .alwaysVisible = true; - end; -} diff --git a/npc/001-1/stat_reset.txt b/npc/001-1/stat_reset.txt new file mode 100755 index 00000000..ab326064 --- /dev/null +++ b/npc/001-1/stat_reset.txt @@ -0,0 +1,6 @@ + +001-1,117,105,0 script Malivox NPC103,{ + @npcname$ = "Malivox"; + callfunc "StatReset"; + close; +} diff --git a/npc/001-1/taree.txt b/npc/001-1/taree.txt deleted file mode 100644 index 676a855a..00000000 --- a/npc/001-1/taree.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Mouboo farmer. - -001-1,68,79,0 script Taree NPC_ELVEN_MAN_MOUBOO_SHOP,{ - mesn; - mesq l("Moo!"); - - goto L_Close; - -L_Close: - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-1/tinris.txt b/npc/001-1/tinris.txt new file mode 100755 index 00000000..2f5fcc0f --- /dev/null +++ b/npc/001-1/tinris.txt @@ -0,0 +1,186 @@ +001-1,69,29,0 script Tinris NPC160,{ + @cake_exp = 50; + @sweater_exp = 400; + + @slime_amount1 = 6; + @slime_amount2 = 4; + @bugleg_amount1 = 4; + @bugleg_amount2 = 5; + @stinger_amount1 = 3; + @stinger_amount2 = 2; + @ash_amount1 = 1; + @ash_amount2 = 2; + @cactusp_amount = 1; + + if (.@q >= 12) goto L_Done; + if (.@q == 11) goto L_GiveGift; + if (.@q == 9) goto L_FertilizerDone; + if (.@q >= 7) goto L_Eomie; + if (.@q == 6) goto L_SecondTry; + if (.@q >= 4) goto L_FirstTryDone; + if (.@q == 3) goto L_FirstTry; + if (.@q == 2) goto L_Annual; + + mesn; + mes "\"This is a magic school. I'm a student here and focus on ways to magically enhance growth of plants."; + mes "That topic is very important in a desert area.\""; + if (.@q != 1) + goto L_Close; + menu + "The farmer Anwar sent me to ask for exactly that! Can you give me something for his field?",L_Next; + +L_Next: + mesn; + mes "\"Well... in principle yes. I can try to prepare something for him. But...\""; + next; + mes "\"The thing is, my girlfriend and I have our anniversary today. And the teachers won't let me leave the campus to get something for her!"; + mes "Please go to the bakery and buy a Chocolate Cake for me. She loves Chocolate Cakes.\""; + next; + mes "\"When I have a present for her I can focus on creating some magic fertilizer.\""; + .@q = 2; + goto L_Close; + +L_Annual: // .@q == 2 + mesn; + mes "\"Hello, did you get the Chocolate Cake for my girlfriend? After that I can focus on creating some magic fertilizer for you.\""; + menu + "Fresh from the bakery!",L_FreshFrom, + "I didn't get it yet.",L_Close; + +L_FreshFrom: + if (countitem("ChocolateCake") < 1) + goto L_NoItem; + delitem "ChocolateCake", 1; + getexp @cake_exp, 0; + .@q = 3; + mesn; + mes "\"Oh, thank you! You saved me!"; + mes "All right, now we can start with the magic fertilizer.\""; + next; + goto L_FirstTry; + +L_FirstTry: + // .@q == 3 + mesn; + mes "\"You need to bring me some ingredients."; + mes "The ingredients are " + @slime_amount1 + " Maggot Slimes, " + @bugleg_amount1 + " Bug Legs, " + @stinger_amount1 + " Scorpion Stingers and " + @ash_amount1 + " Piles of Ash.\""; + menu + "I have it.",L_Continue, + "Ok, I'll go and get it.",L_Close; + +L_Continue: + if ((countitem("MaggotSlime") < @slime_amount1) || (countitem("BugLeg") < @bugleg_amount1) || (countitem("ScorpionStinger") < @stinger_amount1) || (countitem("PileOfAsh") < @ash_amount1)) + goto L_NoItem; + delitem "MaggotSlime", @slime_amount1; + delitem "BugLeg", @bugleg_amount1; + delitem "ScorpionStinger", @stinger_amount1; + delitem "PileOfAsh", @ash_amount1; + .@q = 4; + mes "Tinris takes the things and starts to mix them together while mumbling some invocations."; + misceffect sfx_magic_nature; + next; + mesn; + mes "\"Ok. This should do it. But I'm not sure. I'm still researching this topic."; + mes "Here, bring this to Anwar.\""; + mes "He gives you a bottle with the magic fertilizer. You put it away in a separate pocket, so it doesn't get mixed with your inventory."; + goto L_Close; + +L_FirstTryDone: // .@q >= 4 but below 6 + mesn; + mes "\"Bring the fertilizer to Anwar and let me know if it worked.\""; + if (.@q != 5) + goto L_Close; + menu + "I did, the plants went brown and shriveled.",L_More; + +L_More: + .@q = 6; + goto L_SecondTry; + +L_SecondTry: + // .@q == 6 + mesn; + mes "\"Oh no! All right, we need to do another try."; + mes "Bring me " + @slime_amount2 + " Maggot Slimes, " + @bugleg_amount2 + " Bug Legs, " + @stinger_amount2 + " Scorpion Stingers, " + @ash_amount2 + " Piles of Ash and " + @cactusp_amount + " Cactus Potion.\""; + menu + "Here it is.",L_HereItIs, + "Ok, I'll go and get it.",L_Close; + +L_HereItIs: + if ((countitem("MaggotSlime") < @slime_amount2) || (countitem("BugLeg") < @bugleg_amount2) || (countitem("ScorpionStinger") < @stinger_amount2) || (countitem("PileOfAsh") < @ash_amount2) || (countitem("CactusPotion") < @cactusp_amount)) + goto L_NoItem; + delitem "MaggotSlime", @slime_amount2; + delitem "BugLeg", @bugleg_amount2; + delitem "ScorpionStinger", @stinger_amount2; + delitem "PileOfAsh", @ash_amount2; + delitem "CactusPotion", @cactusp_amount; + .@q = 7; + mes "Tinris takes the things and starts to mix and mumble again."; + misceffect sfx_magic_nature; + next; + mes "It takes quite a while."; + next; + mes "He looks rather stressed while working on the mixture."; + next; + mes "He sighs."; + mesn; + mes "\"Mh, I think the mixture itself is good. But I can't get the spells right. Maybe you should ask Professor Eomie to cast it; she's a genius with nature magic.\""; + mes "He gives you the bottle with the magic fertilizer."; + goto L_Close; + +L_Eomie: + // .@q >= 7 but below 9 + mesn; + mes "\"I did the best I could, but it seems I'm not experienced enough to cast the spells correctly. Better ask Professor Eomie for help.\""; + goto L_Close; + +L_FertilizerDone: + // .@q == 9 + mesn; + mes "\"I heard Eomie cast the spell? I really hope it'll work this time. Bring the magic fertilizer to Anwar now.\""; + goto L_Close; + +L_GiveGift: + // .@q == 11 + mesn; + mes "\"Ah, did Anwar try the new fertilizer?\""; + menu + "Yes, it works great and he asked me to give you this Green V-Neck Sweater he made.",L_ItWorksGreat, + "Not yet.",L_Close; + +L_ItWorksGreat: + if (countitem("GreenVNeckSweater") < 1) + goto L_NoItem; + delitem "GreenVNeckSweater", 1; + getexp @sweater_exp, 0; + .@q = 12; + mesn; + mes "\"Hey, that's really nice. Tell him my thanks.\""; + goto L_Close; + +L_Done: + // .@q >= 12 + mesn; + mes "\"My girlfriend was delighted with the Chocolate Cake and Professor Eomie was happy with my work on the magic fertilizer.\""; + mes "He twinkles."; + mesn; + mes "\"We're a good team.\""; + goto L_Close; + +L_NoItem: + mesn; + mes "\"You don't have it!\""; + goto L_Close; + +L_Close: + @slime_amount1 = 0; + @slime_amount2 = 0; + @bugleg_amount1 = 0; + @bugleg_amount2 = 0; + @stinger_amount1 = 0; + @stinger_amount2 = 0; + @ash_amount1 = 0; + @ash_amount2 = 0; + @cactusp_amount = 0; + close; +} diff --git a/npc/001-1/tombstones.txt b/npc/001-1/tombstones.txt new file mode 100755 index 00000000..ce7a9ae8 --- /dev/null +++ b/npc/001-1/tombstones.txt @@ -0,0 +1,65 @@ + +001-1,56,103,0 script RIP#1 NPC400,{ + + mes "~ wushin ~"; + mes "\"Tonori swallowed him whole.\""; + close; +} + +001-1,57,103,0 script RIP#2 NPC400,{ + + mes "~ Nard ~"; + mes "\"Crushed by a loom.\""; + close; +} + +001-1,58,103,0 script RIP#3 NPC400,{ + + mes "~ tux9th ~"; + mes "\"Eaten by bugs.\""; + close; +} + +001-1,59,103,0 script RIP#4 NPC400,{ + + mes "~ o11c ~"; + mes "\"He asked for it, so they gave it to him.\""; + close; +} + +001-1,60,103,0 script RIP#5 NPC400,{ + + mes "~ " + strcharinfo(0) + " ~"; + mes "The epitath is blank and the grave freshly dug."; + close; +} +001-1,56,106,0 script RIP#6 NPC400,{ + + mes "~ Cassy ~"; + mes "\"Eaten by trolls.\""; + close; +} + +001-1,57,106,0 script RIP#7 NPC400,{ + mes "~ George ~"; + mes "\"Eaten by snakes.\""; + close; +} + +001-1,58,106,0 script RIP#8 NPC400,{ + mes "~ Kieron ~"; + mes "\"He was right; monsters were in the cave.\""; + close; +} + +001-1,59,106,0 script RIP#9 NPC400,{ + mes "~ William ~"; + mes "\"Kieron was definitely right.\""; + close; +} + +001-1,60,106,0 script RIP#10 NPC400,{ + mes "~ Tyer ~"; + mes "\"An experiement went wrong.\""; + close; +} diff --git a/npc/001-1/treeleaf.txt b/npc/001-1/treeleaf.txt deleted file mode 100644 index dd1280a6..00000000 --- a/npc/001-1/treeleaf.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Reid -// Description: -// Falling tree leaf - -001-1,39,54,4 script #treeleaf0 NPC_TREE_LEAF,{ - .dir = 2; - stopnpctimer; - initnpctimer; - close; - -OnTimer2800: - .dir = 4; - stopnpctimer; - end; - -OnInit: - .distance = 1; - end; -} diff --git a/npc/001-1/trees.txt b/npc/001-1/trees.txt deleted file mode 100644 index 8e090218..00000000 --- a/npc/001-1/trees.txt +++ /dev/null @@ -1,220 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// Invisible tree NPCs for "Lazy Brother" quest -// Variables: -// ArtisQuests_LazyBrother = 19 -- quest var -// LazyBrother_TreesLeft = 15 -- how many trees left to search -// LazyBrother_TreeSearched[15] -- whether given tree was searched -// LazyBrother_TreeWithBrother -- the number of tree where he's hiding -// Quest states: -// 0 - quest not started -// 1 - Katja asked help, searching the trees -// 2 - Bobo is found, "bad" ending -// 3 - player decided to tell Katja where her brother is -// 4 - "good" ending, player helped Katja - -function script LazyBrotherTreeFunc { - .@q = getq(ArtisQuests_LazyBrother); - if (.@q == 0 || .@q >= 2) - return; - .@TreeNum = getarg(0); - if (LazyBrother_TreeWithBrother == .@TreeNum) - goto L_FoundHim; - if (LazyBrother_TreeWithBrother > 0) - { - mes l("You search the tree but don't find anybody."); - close2; - return; - } - if (LazyBrother_TreeSearched[.@TreeNum] == 1) - { - mes l("You already looked here."); - close2; - return; - } - else - { - LazyBrother_TreeSearched[.@TreeNum] = 1; - } - .@found = rand(1, LazyBrother_TreesLeft--); - if (.@found == 1) - { - mes l("You found him!"); - LazyBrother_TreeWithBrother = .@TreeNum; - next; - } - else - { - mes l("You search the tree but don't find anybody."); - close2; - return; - } - -L_FoundHim: - mes l("You notice a young boy sitting on one of the highest branches of the tree."); - next; - mes l("He is eating an apple, thoroughly enjoying it."); - next; - select(l("Hey there, are you Bobo, Katja's brother?")); - mes ""; - mesn "Bobo"; - mesq l("Yes, it's me. It's such a fine view from here!"); - next; - select(l("Your sister sent me to find you. Your mother is worried.")); - mes ""; - mesn "Bobo"; - mesq l("Oh, nooooo... If I go home now, my mum will give me chores."); - next; - mesq l("But if you tell my sister, that you didn't find me, I can stay here all day, eating apples and enjoying the view."); - next; - mesq l("I will give you my pocket money if you do."); - next; - switch (select(l("A small lie is really just a fib, and I could really use some cash..."), - l("I will not lie to a little girl! And your mother needs your help."))) - { - case 1: - mes ""; - mesn "Bobo"; - mesq l("Here you go."); - next; - mesn "Narrator"; - mes l("Somehow you don't feel good about your deed."); - // Karma -= 2; - setq ArtisQuests_LazyBrother, 2; - Zeny += 100; - getexp 500, 0; - break; - case 2: - mes ""; - mesn "Bobo"; - mesq l("Okay... Tell my sister I'll go home soon."); - setq ArtisQuests_LazyBrother, 3; - break; - } - LazyBrother_TreesLeft = 0; - LazyBrother_TreeWithBrother = 0; - cleararray LazyBrother_TreeSearched,0,15; - close; -} - -001-1,179,30,0 script #ArtisTree1 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(1); - end; -OnInit: - .distance = 1; - end; -} - -001-1,177,29,0 script #ArtisTree2 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(2); - end; -OnInit: - .distance = 1; - end; -} - -001-1,183,28,0 script #ArtisTree3 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(3); - end; -OnInit: - .distance = 1; - end; -} - -001-1,182,25,0 script #ArtisTree4 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(4); - end; -OnInit: - .distance = 1; - end; -} - -001-1,187,26,0 script #ArtisTree5 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(5); - end; -OnInit: - .distance = 1; - end; -} - -001-1,189,28,0 script #ArtisTree6 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(6); - end; -OnInit: - .distance = 1; - end; -} - -001-1,184,30,0 script #ArtisTree7 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(7); - end; -OnInit: - .distance = 1; - end; -} - -001-1,189,31,0 script #ArtisTree8 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(8); - end; -OnInit: - .distance = 1; - end; -} - -001-1,191,30,0 script #ArtisTree9 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(9); - end; -OnInit: - .distance = 1; - end; -} - -001-1,191,33,0 script #ArtisTree10 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(10); - end; -OnInit: - .distance = 1; - end; -} - -001-1,187,34,0 script #ArtisTree11 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(11); - end; -OnInit: - .distance = 1; - end; -} - -001-1,185,35,0 script #ArtisTree12 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(12); - end; -OnInit: - .distance = 1; - end; -} - -001-1,182,34,0 script #ArtisTree13 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(13); - end; -OnInit: - .distance = 1; - end; -} - -001-1,180,33,0 script #ArtisTree14 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(14); - end; -OnInit: - .distance = 1; - end; -} - -001-1,181,32,0 script #ArtisTree15 NPC_KATJA_TREE,{ - LazyBrotherTreeFunc(15); - end; -OnInit: - .distance = 1; - end; -} diff --git a/npc/001-1/wateranimation.txt b/npc/001-1/wateranimation.txt deleted file mode 100644 index eb9acc9d..00000000 --- a/npc/001-1/wateranimation.txt +++ /dev/null @@ -1,23 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Reid -// Description: -// Water animations, splash, fishes, etc... - -001-1,116,123,0 duplicate(#fish_basic) #water_animation0 NPC_WATER_SPLASH -001-1,119,102,0 duplicate(#fish_basic) #water_animation1 NPC_WATER_SPLASH -001-1,167,82,0 duplicate(#fish_basic) #water_animation2 NPC_WATER_SPLASH -001-1,167,40,0 duplicate(#fish_basic) #water_animation3 NPC_WATER_SPLASH -001-1,104,127,0 duplicate(#fish_basic) #water_animation4 NPC_WATER_SPLASH -001-1,166,123,0 duplicate(#fish_basic) #water_animation5 NPC_WATER_SPLASH -001-1,181,119,0 duplicate(#fish_basic) #water_animation6 NPC_WATER_SPLASH -001-1,202,114,0 duplicate(#fish_basic) #water_animation7 NPC_WATER_SPLASH -001-1,187,86,0 duplicate(#fish_basic) #water_animation8 NPC_WATER_SPLASH -001-1,32,57,0 duplicate(#fish_basic) #water_animation9 NPC_WATER_SPLASH -001-1,40,144,0 duplicate(#fish_basic) #water_animation10 NPC_WATER_SPLASH -001-1,58,131,0 duplicate(#fish_basic) #water_animation11 NPC_WATER_SPLASH -001-1,76,137,0 duplicate(#fish_basic) #water_animation12 NPC_WATER_SPLASH -001-1,109,132,0 duplicate(#fish_basic) #water_animation13 NPC_WATER_SPLASH -001-1,141,93,0 duplicate(#fish_basic) #water_animation14 NPC_WATER_SPLASH -001-1,168,57,0 duplicate(#fish_basic) #water_animation15 NPC_WATER_SPLASH diff --git a/npc/001-1/weellos.txt b/npc/001-1/weellos.txt new file mode 100755 index 00000000..b083b889 --- /dev/null +++ b/npc/001-1/weellos.txt @@ -0,0 +1,31 @@ +001-1,55,25,0 script Weellos NPC103,{ + @halloween_npc_id = $@halloween_npc_weellos; + callfunc "TrickOrTreat"; + + QUEST_NorthTulimshar = QUEST_NorthTulimshar | $@knowWeellosNT; + + if (isin("001-1", 48, 20, 61, 28)) goto L_In; + + mes "[Weellos]"; + mes "\"This is a very historic building – in fact, it's one of the oldest in the area.\""; + next; + mes "\"It's also the current seat of both the Council of Wizards and the Magic Institute of Tulimshar.\""; + next; + mes "\"Due to its historical significance, part of it has been turned into a museum.\""; + goto L_BeforeClose; + +L_In: + mes "[Weellos]"; + mes "\"What did you think? Isn't the building intriguing?\""; + goto L_BeforeClose; + +L_BeforeClose: + if (QL_KYLIAN != 4) + goto L_close; + next; + mes "You wonder if Kylian would be interested in seeing this historic landmark..."; + goto L_close; + +L_close: + close; +} diff --git a/npc/001-1/xilaxa.txt b/npc/001-1/xilaxa.txt deleted file mode 100644 index e1e66e91..00000000 --- a/npc/001-1/xilaxa.txt +++ /dev/null @@ -1,50 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Moon, main NPC for the urchin quest. - -001-1,52,44,0 script Xilaxa#001-1 NPC_UKAR_MALE_LEGION_ARTIS,{ - - npc_pausemove(); - getmapxy(.@map$, .@cx, .@cy, 0); - npc_turntoxy(.@cx, .@cy); - npctalkonce("Hello."); - npc_resumemove(); - close; - -OnTimer1000: - dographmovestep; - -OnInit: - .distance = 5; - initmovegraph "mid", 54, 43, 60, 46, - "left", 47, 50, 52, 55, - "right", 62, 50, 67, 55; - - setmovegraphcmd "mid", "left", 1, "dir 0; wait 4", - "mid", "left", 4, "dir 2; wait 3; dir 0; wait 2; dir 6; wait 1; dir 0", - "mid", "left", 2, "dir 4; wait 5; dir 0; wait 2", - "mid", "left", 3, "dir 6; wait 1; dir 0; wait 3; dir 2; wait 3; dir 0", - "mid", "left", 1, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - "mid", "right", 3, "dir 0; wait 4", - "mid", "right", 4, "dir 2; wait 3; dir 0; wait 2; dir 6; wait 1; dir 0", - "mid", "right", 2, "dir 4; wait 5; dir 0; wait 2", - "mid", "right", 1, "dir 6; wait 1; dir 0; wait 3; dir 2; wait 3; dir 0", - "mid", "right", 2, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - - "left", "mid", 2, "dir 0; wait 4", - "left", "mid", 1, "dir 2; wait 3; dir 0; wait 2; dir 6; wait 1; dir 0", - "left", "mid", 3, "dir 4; wait 5; dir 0; wait 2", - "left", "mid", 2, "dir 6; wait 1; dir 0; wait 3; dir 2; wait 3; dir 0", - "left", "mid", 3, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5", - - "right", "mid", 3, "dir 0; wait 4", - "right", "mid", 2, "dir 2; wait 3; dir 0; wait 2; dir 6; wait 1; dir 0", - "right", "mid", 1, "dir 4; wait 5; dir 0; wait 2", - "right", "mid", 1, "dir 6; wait 1; dir 0; wait 3; dir 2; wait 3; dir 0", - "right", "mid", 2, "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5"; - - firstmove "wait 5", "mid"; - initnpctimer; -} diff --git a/npc/001-2-0/_import.txt b/npc/001-2-0/_import.txt deleted file mode 100644 index 2fb6a262..00000000 --- a/npc/001-2-0/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-0: Light Armor Shop -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-0/_warps.txt", -"npc/001-2-0/mapflags.txt", -"npc/001-2-0/resa.txt", -"npc/001-2-0/shop.txt", diff --git a/npc/001-2-0/_warps.txt b/npc/001-2-0/_warps.txt deleted file mode 100644 index c81b7fa6..00000000 --- a/npc/001-2-0/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-0: Light Armor Shop warps -001-2-0,30,35,0 warp #001-2-0_30_35 0,0,001-1,51,66 -001-2-0,37,46,0 warp #001-2-0_37_46 0,0,001-1,55,72 diff --git a/npc/001-2-0/mapflags.txt b/npc/001-2-0/mapflags.txt deleted file mode 100644 index a1781431..00000000 --- a/npc/001-2-0/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-0 mapflag town diff --git a/npc/001-2-0/resa.txt b/npc/001-2-0/resa.txt deleted file mode 100644 index 160b8351..00000000 --- a/npc/001-2-0/resa.txt +++ /dev/null @@ -1,79 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Light Armor shop keeper. -// Variables: -// ArtisQuests_Enora -// Values: -// 0 Default. -// 1 BlackSmith quest delivered. -// 2 Chelios Quest given. -// 3 Chelios Quest done. -// 4 BlackSmith gave the sword. -// 5 Light Armor Shop quest delivered. -// 6 Light Armor Shop gave the cloths. - -001-2-0,37,28,0 script Resa NPC_ELVEN_FEMALE_ARMOR_SHOP,{ - - function explain_craft { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Did you see Don the blacksmith? He might know how you could improve your metal equipment."), - l("Nevertheless, you can craft some cards that you can then attach to your equipment."), - l("We sell a brimmed hat, you can craft a feather card and attach it to this hat to obtain an enhanced version of it!"); - - return; - } - - function enora_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I thought that she would never come to pick it up!"), - l("Here it is, a fashionable @@.", getitemlink(ArtisTankTop, CamelCottonDye)), - l("I asked Calypsan to dye this tank top, now it has an unique look!"); - - narrator S_LAST_NEXT, l("You pick up the package."); - - setq ArtisQuests_Enora, 6; - - return; - } - - speech S_LAST_NEXT, - l("Welcome to my office."), - l("What would you like today?"); - - do - { - .@enora = getq(ArtisQuests_Enora); - select - rif(.@enora == 5, l("I came to retrieve a package for Enora.")), - menuaction(l("Trade")), - l("How can I improve my equipment?"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - enora_quest; - closeclientdialog; - goodbye; - close; - case 2: - closeclientdialog; - shop "Store#001-2-0"; - close; - case 3: - explain_craft; - break; - case 4: - closeclientdialog; - goodbye; - close; - } - } while (1); - - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-0/shop.txt b/npc/001-2-0/shop.txt deleted file mode 100644 index eccc812c..00000000 --- a/npc/001-2-0/shop.txt +++ /dev/null @@ -1,34 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Light armor shop. - -001-2-0,37,29,0 trader Store#001-2-0 NPC_NO_SPRITE,{ -// The ArtisTankTop should be store at x: 39 or 40, y: 31. -// 38,35 is server's location of where client displays a black torso gear on display. (using @where for server). -// 35,27 is some shelves and a cabinet at 4 tiles from where player select it. -// 39,27 is where to put store that sells only fabric. (the cloth shelf). -OnInit: - tradertype(NST_MARKET); - - sellitem ArtisTankTop, -1, 50; - sellitem VneckJumper, -1, 30; - sellitem BrownTrousers, -1, 30; - sellitem BrimmedHat, -1, 35; - - .distance = 2; - end; - -OnClock0000: - restoreshopitem ArtisTankTop, 30; - restoreshopitem VneckJumper, 12; - restoreshopitem BrownTrousers, 15; - restoreshopitem BrimmedHat, 10; -OnClock1200: - restoreshopitem ArtisTankTop, 25; - restoreshopitem VneckJumper, 10; - restoreshopitem BrownTrousers, 10; - restoreshopitem BrimmedHat, 20; -} diff --git a/npc/001-2-1/_import.txt b/npc/001-2-1/_import.txt deleted file mode 100644 index 85933242..00000000 --- a/npc/001-2-1/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-1: Noble House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-1/_savepoints.txt", -"npc/001-2-1/_warps.txt", -"npc/001-2-1/mapflags.txt", diff --git a/npc/001-2-1/_savepoints.txt b/npc/001-2-1/_savepoints.txt deleted file mode 100644 index fa9c1ecc..00000000 --- a/npc/001-2-1/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-1: Noble House saves -001-2-1,27,30,0 script #save_001-2-1_27_30 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-1/_warps.txt b/npc/001-2-1/_warps.txt deleted file mode 100644 index 1189adc7..00000000 --- a/npc/001-2-1/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-1: Noble House warps -001-2-1,37,41,0 warp #001-2-1_37_41 0,0,001-1,128,31 diff --git a/npc/001-2-1/mapflags.txt b/npc/001-2-1/mapflags.txt deleted file mode 100644 index 07cacd14..00000000 --- a/npc/001-2-1/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-1 mapflag town diff --git a/npc/001-2-10/_import.txt b/npc/001-2-10/_import.txt deleted file mode 100644 index 7c1b01d6..00000000 --- a/npc/001-2-10/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-10: Noble House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-10/_savepoints.txt", -"npc/001-2-10/_warps.txt", -"npc/001-2-10/mapflags.txt", diff --git a/npc/001-2-10/_savepoints.txt b/npc/001-2-10/_savepoints.txt deleted file mode 100644 index 91b14f37..00000000 --- a/npc/001-2-10/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-10: Noble House saves -001-2-10,26,30,0 script #save_001-2-10_26_30 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-10/_warps.txt b/npc/001-2-10/_warps.txt deleted file mode 100644 index e9e39231..00000000 --- a/npc/001-2-10/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-10: Noble House warps -001-2-10,27,45,0 warp #001-2-10_27_45 0,0,001-1,118,50 -001-2-10,51,45,0 warp #001-2-10_51_45 0,0,001-1,135,50 diff --git a/npc/001-2-10/mapflags.txt b/npc/001-2-10/mapflags.txt deleted file mode 100644 index bf833609..00000000 --- a/npc/001-2-10/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-10 mapflag town diff --git a/npc/001-2-11/_import.txt b/npc/001-2-11/_import.txt deleted file mode 100644 index 7e5ac100..00000000 --- a/npc/001-2-11/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-11: Noble House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-11/_savepoints.txt", -"npc/001-2-11/_warps.txt", -"npc/001-2-11/mapflags.txt", -"npc/001-2-11/mona.txt", diff --git a/npc/001-2-11/_savepoints.txt b/npc/001-2-11/_savepoints.txt deleted file mode 100644 index 00b8c05c..00000000 --- a/npc/001-2-11/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-11: Noble House saves -001-2-11,26,31,0 script #save_001-2-11_26_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-11/_warps.txt b/npc/001-2-11/_warps.txt deleted file mode 100644 index 648faa57..00000000 --- a/npc/001-2-11/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-11: Noble House warps -001-2-11,46,46,0 warp #001-2-11_46_46 0,0,001-1,148,55 diff --git a/npc/001-2-11/mapflags.txt b/npc/001-2-11/mapflags.txt deleted file mode 100644 index 608ef1bd..00000000 --- a/npc/001-2-11/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-11 mapflag town diff --git a/npc/001-2-11/mona.txt b/npc/001-2-11/mona.txt deleted file mode 100644 index f3a65651..00000000 --- a/npc/001-2-11/mona.txt +++ /dev/null @@ -1,170 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Jesusalva -// Description: -// A rich girl holding a candle. Her father went to examine weird noises in the -// sewers and still hasn't come back. Her mother is gone, but it is not clear -// whether she died, abandoned them, or something else. -// Variable: -// MONA_TIME = gettimeparam(GETTIME_DAYOFMONTH) so you need 3 days -// MONA_REPEAT = How many times the quest was done -// ArtisQuests_MonaDad -// Quest states: -// 0 - Quest not started -// 1 - Mona explained that her dad was missing -// 2 - Player is bringing Mundane out of Sewers -// 3 - Quest is complete -// Note: -// Any misformatted code is Jesusalva's fault. - -001-2-11,39,30,0 script Mona NPC_MONA,{ - - function find_daddy_quest - { - speech S_LAST_NEXT, - l("Hey you!"); - - switch (select(l("Yes?"), l("Sorry, I have to go."))) - { - case 1: - mes ""; - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No you don't have to go. I need your help, so you have to stay."); - break; - } - - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("Daddy never came back home... He said that he would be back for lunch but it has already been two days!"), - l("You have to find him, or else I will tell him that you did not help me."); - - switch (select(l("You do not give me a lot of options."), l("Your dad ran away from you!"))) - { - case 1: - speech S_FIRST_BLANK_LINE, - l("He said that he would check why weird noises were coming from the manhole next to the house."), - l("But he never returned."), - l("Please find my daddy..."); - - setq ArtisQuests_MonaDad, 1; - break; - case 2: - speech S_FIRST_BLANK_LINE, - l("I will tell my dad!"); - break; - } - emotion E_SAD; - close; - } - - // You're here to report that Mundane is out of the sewers. - // Forcing you to enter an instanced map would require more work. - // This means adding a warp NPC and a global instance. - // Global Instances get reset every 10 days or so, it would need a patch - // only to support Global Instances and in general is not a smart thing to do. - function check_daddy_quest - { - // Did you really bring Mundane to sewer exit? - // We need to add 1 tile in each direction of tolerance because addtimer() - // is not exactly what I would call “a reliable way to do stuff” - // Note that @variables sometimes get erasen AT RANDOM. - // If this problem happens, move it char variables. - // (that might cause problems with logout though.) - // Temporary variables give you a time limit to report back... - // - // There's no need to check if instance still exists, because - // when the instance expires, you get warped to *somewhere*. - // This means the timer will die and MUNDANE_OLD* variables will stop - // being updated. - .@success=false; - - // Sewer mouths (warps to 001-1) - if (is_between(151, 153, @MUNDANE_OLDX) && - is_between(55, 57, @MUNDANE_OLDY)) - .@success=true; - - if (is_between(195, 197, @MUNDANE_OLDX) && - is_between(34, 36, @MUNDANE_OLDY)) - .@success=true; - - if (is_between(197, 199, @MUNDANE_OLDX) && - is_between(59, 61, @MUNDANE_OLDY)) - .@success=true; - - if (is_between(84, 86, @MUNDANE_OLDX) && - is_between(129, 131, @MUNDANE_OLDY)) - .@success=true; - - if (.@success) - return true; - else - return false; - } - - // Here the script really starts - if (getq(ArtisQuests_MonaDad) == 0) - { - find_daddy_quest(); - } - else if (getq(ArtisQuests_MonaDad) == 3) - { - // Quest Repeat takes priority. Don't worry, you won't lose password unless - // you accept the quest again. - if (MONA_TIME <= gettimeparam(GETTIME_DAYOFMONTH)) { - find_daddy_quest(); - } - - // Sagratha is Great B-) - npctalkonce any( - l("Thanks for finding daddy... I wish he spent more time with me..."), - l("Sagratha is great. Why does the strange woman near the Legion building always say that to daddy...?")); // TODO: Polish - } - else if (getq(ArtisQuests_MonaDad) == 2) - { - if (check_daddy_quest()) - { - if (!MONA_REPEAT) - { - inventoryplace WoodenSword, 1; - speech 0x0, - l("Daddy finally came back home! He grabbed a snack and said he would be returning to the sewers."), - l("He did say that I should give you this @@ as a gift. He says you are very skilled and will make good use of his old weapon.", - getitemlink(WoodenSword)), - l("He has never been the same since mommy went away..."); - getitem WoodenSword, 1; - } - else if (MONA_REPEAT == 10) - { - speech - l("Daddy asked me to give you some money as a thank you for looking out for me."), - l("I don't want you! I want daddy!"); - mesc l("*sniff sniff*"); - emotion E_SAD; - Zeny+=1000; - } - else - { - inventoryplace TrainingArrow, 100; - getitem TrainingArrow, min(MONA_REPEAT*20, 100); - } - setq(ArtisQuests_MonaDad, 3); - MONA_TIME=gettimeparam(GETTIME_DAYOFMONTH)+3; - MONA_REPEAT+=1; - close; - } - } - else - { - npctalkonce l("Please find daddy..."); - } - - emotion E_SAD; - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-2-12/_import.txt b/npc/001-2-12/_import.txt deleted file mode 100644 index fa40eb2b..00000000 --- a/npc/001-2-12/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-12: Noble House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-12/_warps.txt", -"npc/001-2-12/mapflags.txt", -"npc/001-2-12/oscar.txt", diff --git a/npc/001-2-12/_warps.txt b/npc/001-2-12/_warps.txt deleted file mode 100644 index c03a6b0b..00000000 --- a/npc/001-2-12/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-12: Noble House warps -001-2-12,27,27,0 warp #001-2-12_27_27 1,0,001-2-13,27,29 -001-2-12,34,36,0 warp #001-2-12_34_36 0,0,001-1,142,31 -001-2-12,29,28,0 warp #001-2-12_29_28 0,0,001-2-14,25,29 diff --git a/npc/001-2-12/mapflags.txt b/npc/001-2-12/mapflags.txt deleted file mode 100644 index a84ff938..00000000 --- a/npc/001-2-12/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-12 mapflag town diff --git a/npc/001-2-12/oscar.txt b/npc/001-2-12/oscar.txt deleted file mode 100644 index 343a012e..00000000 --- a/npc/001-2-12/oscar.txt +++ /dev/null @@ -1,144 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Old man living in the rich hill, can bleach clothes. - -001-2-12,38,30,0 script Oscar#001-2-12 NPC_OSCAR,{ - - function live_here_alone - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Meh!"), - l("This is a harsh word to use, you are never alone in the beautiful place of Artis."), - l("Mob is doing its daily noise, nature is singing its sumptuous melody, none is alone."); - - return; - } - - function item_is_bleachable - { - .@item_index = getarg(0); - if (.@item_index < 0) - return false; - - getinventorylist; - - if (@inventorylist_card1[.@item_index] != 0) - { - if ((@inventorylist_card1[.@item_index] > YellowCottonDye) || - (@inventorylist_card1[.@item_index] < CrimsonCashmereDye)) - { - return false; - } - .@is_bleachable = true; - } - if (@inventorylist_card2[.@item_index] != 0) - { - if ((@inventorylist_card2[.@item_index] > YellowCottonDye) || - (@inventorylist_card2[.@item_index] < CrimsonCashmereDye)) - { - return false; - } - .@is_bleachable = true; - } - if (@inventorylist_card3[.@item_index] != 0) - { - if ((@inventorylist_card3[.@item_index] > YellowCottonDye) || - (@inventorylist_card3[.@item_index] < CrimsonCashmereDye)) - { - return false; - } - .@is_bleachable = true; - } - if (@inventorylist_card4[.@item_index] != 0) - { - if ((@inventorylist_card4[.@item_index] > YellowCottonDye) || - (@inventorylist_card4[.@item_index] < CrimsonCashmereDye)) - { - return false; - } - .@is_bleachable = true; - } - - return .@is_bleachable; - } - - function remove_cards_from_item - { - .@item_index = -1; - - speech S_FIRST_BLANK_LINE, - l("What item would you like to bleach?"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can drag and drop an item to the NPC window or select an item through your inventory."); - - .@item_index = requestitemindex(); - if (!item_is_bleachable(.@item_index)) - { - speech S_LAST_NEXT, - l("You should know this, an item like this can't be bleached."); - - return; - } - - speech S_LAST_NEXT, - l("Your mind is set? You will loose the color dye during this process."); - - switch (askyesno()) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok, let me see..."), - l("..."); - - failedremovecardsindex .@item_index, 1; - - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("..."), - l("Here it is, clean like a whistle!"); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Is it truly a hard choice to make?"); - break; - } - - return; - } - - .@hour = gettime(GETTIME_HOUR); - speech S_LAST_NEXT, (.@hour > 6 && .@hour < 18) ? l("Good day to you.") : l("Good evening."); - - do - { - select - l("Could you bleach my clothes?"), - l("Do you live here alone?"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - remove_cards_from_item(); - break; - case 2: - live_here_alone(); - break; - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("I wish you a good time in town."); - break; - } - - } while (@menu != 3); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-2-13/_import.txt b/npc/001-2-13/_import.txt deleted file mode 100644 index 36eee751..00000000 --- a/npc/001-2-13/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-13: First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-13/_savepoints.txt", -"npc/001-2-13/_warps.txt", -"npc/001-2-13/mapflags.txt", diff --git a/npc/001-2-13/_savepoints.txt b/npc/001-2-13/_savepoints.txt deleted file mode 100644 index fd073ac6..00000000 --- a/npc/001-2-13/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-13: First Floor saves -001-2-13,41,31,0 script #save_001-2-13_41_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-13/_warps.txt b/npc/001-2-13/_warps.txt deleted file mode 100644 index 9400dd8a..00000000 --- a/npc/001-2-13/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-13: First Floor warps -001-2-13,27,30,0 warp #001-2-13_27_30 1,0,001-2-12,27,28 diff --git a/npc/001-2-13/mapflags.txt b/npc/001-2-13/mapflags.txt deleted file mode 100644 index 329eb054..00000000 --- a/npc/001-2-13/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-13 mapflag town diff --git a/npc/001-2-14/_import.txt b/npc/001-2-14/_import.txt deleted file mode 100644 index 0b4d600c..00000000 --- a/npc/001-2-14/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-14: Basement -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-14/_warps.txt", -"npc/001-2-14/mapflags.txt", diff --git a/npc/001-2-14/_warps.txt b/npc/001-2-14/_warps.txt deleted file mode 100644 index 4ae630aa..00000000 --- a/npc/001-2-14/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-14: Basement warps -001-2-14,26,27,0 warp #001-2-14_26_27 1,0,001-2-12,30,28 diff --git a/npc/001-2-14/mapflags.txt b/npc/001-2-14/mapflags.txt deleted file mode 100644 index a84ff938..00000000 --- a/npc/001-2-14/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-12 mapflag town diff --git a/npc/001-2-15/_import.txt b/npc/001-2-15/_import.txt deleted file mode 100644 index d4250125..00000000 --- a/npc/001-2-15/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-15: Noble House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-15/_savepoints.txt", -"npc/001-2-15/_warps.txt", -"npc/001-2-15/mapflags.txt", diff --git a/npc/001-2-15/_savepoints.txt b/npc/001-2-15/_savepoints.txt deleted file mode 100644 index cd164505..00000000 --- a/npc/001-2-15/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-15: Noble House saves -001-2-15,27,41,0 script #save_001-2-15_27_41 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-15/_warps.txt b/npc/001-2-15/_warps.txt deleted file mode 100644 index 5704aecc..00000000 --- a/npc/001-2-15/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-15: Noble House warps -001-2-15,34,46,0 warp #001-2-15_34_46 0,0,001-1,132,68 diff --git a/npc/001-2-15/mapflags.txt b/npc/001-2-15/mapflags.txt deleted file mode 100644 index 5ff9ed8d..00000000 --- a/npc/001-2-15/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-15 mapflag town diff --git a/npc/001-2-16/_import.txt b/npc/001-2-16/_import.txt deleted file mode 100644 index 66b975ca..00000000 --- a/npc/001-2-16/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-16: Harbourmaster Lodge -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-16/_warps.txt", -"npc/001-2-16/mapflags.txt", diff --git a/npc/001-2-16/_warps.txt b/npc/001-2-16/_warps.txt deleted file mode 100644 index ba8035ee..00000000 --- a/npc/001-2-16/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-16: Harbourmaster Lodge warps -001-2-16,32,36,0 warp #001-2-16_32_36 0,0,001-1,168,99 -001-2-16,24,29,0 warp #001-2-16_24_29 0,0,001-2-17,35,29 diff --git a/npc/001-2-16/mapflags.txt b/npc/001-2-16/mapflags.txt deleted file mode 100644 index 44cfc0a1..00000000 --- a/npc/001-2-16/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-16 mapflag town diff --git a/npc/001-2-17/_import.txt b/npc/001-2-17/_import.txt deleted file mode 100644 index ef22e0df..00000000 --- a/npc/001-2-17/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-17: Backroom -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-17/_warps.txt", -"npc/001-2-17/mapflags.txt", diff --git a/npc/001-2-17/_warps.txt b/npc/001-2-17/_warps.txt deleted file mode 100644 index b2f5355e..00000000 --- a/npc/001-2-17/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-17: Backroom warps -001-2-17,36,29,0 warp #001-2-17_36_29 0,0,001-2-16,25,29 diff --git a/npc/001-2-17/mapflags.txt b/npc/001-2-17/mapflags.txt deleted file mode 100644 index ae59a377..00000000 --- a/npc/001-2-17/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-17 mapflag town diff --git a/npc/001-2-18/_import.txt b/npc/001-2-18/_import.txt deleted file mode 100644 index a2930084..00000000 --- a/npc/001-2-18/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-18: Docks Warehouse -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-18/_warps.txt", -"npc/001-2-18/mapflags.txt", diff --git a/npc/001-2-18/_warps.txt b/npc/001-2-18/_warps.txt deleted file mode 100644 index e0342239..00000000 --- a/npc/001-2-18/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-18: Docks Warehouse warps -001-2-18,39,36,0 warp #001-2-18_39_36 0,0,001-1,182,75 -001-2-18,39,26,0 warp #001-2-18_39_26 2,0,001-2-42,39,36 diff --git a/npc/001-2-18/mapflags.txt b/npc/001-2-18/mapflags.txt deleted file mode 100644 index db4e1433..00000000 --- a/npc/001-2-18/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-18 mapflag town diff --git a/npc/001-2-19/_import.txt b/npc/001-2-19/_import.txt deleted file mode 100644 index c92d0825..00000000 --- a/npc/001-2-19/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-19: Merchant Hall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-19/_warps.txt", -"npc/001-2-19/lloyd.txt", -"npc/001-2-19/mapflags.txt", diff --git a/npc/001-2-19/_warps.txt b/npc/001-2-19/_warps.txt deleted file mode 100644 index cb48d355..00000000 --- a/npc/001-2-19/_warps.txt +++ /dev/null @@ -1,51 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-19: Merchant Hall warps -001-2-19,41,31,0 warp #001-2-19_41_31 0,0,001-1,104,33 -001-2-19,41,24,0 script #001-2-19_41_24_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-25", 29, 30; -close; - -OnUnTouch: - doevent "#001-2-19_41_24::OnUnTouch"; -} -001-2-19,41,24,0 script #001-2-19_41_24 NPC_ARTIS_DOOR_WOOD,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-2-19,33,38,0 warp #001-2-19_33_38 0,0,001-1,101,37 -001-2-19,41,55,0 warp #001-2-19_41_55 0,0,001-2-20,29,27 -001-2-19,41,47,0 script #001-2-19_41_47_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-1", 104, 42; -close; - -OnUnTouch: - doevent "#001-2-19_41_47::OnUnTouch"; -} -001-2-19,41,47,0 script #001-2-19_41_47 NPC_ARTIS_DOOR_WOOD,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - diff --git a/npc/001-2-19/lloyd.txt b/npc/001-2-19/lloyd.txt deleted file mode 100644 index 839f9817..00000000 --- a/npc/001-2-19/lloyd.txt +++ /dev/null @@ -1,249 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Reid -// Description: -// Lloyd the banker NPC. -// Variables: -// 0 ArtisQuests_Lloyd -// 1 ArtisQuests_Fexil -// 2 ArtisQuests_Enora -// Quest states: -// 00 -- Never talked -// 01 -- Registred on the Guild -// 10 -- not started -// 11 -- Lloyd warned about the quest -// 20 -- Default. -// 21 -- BlackSmith quest delivered. -// 22 -- Chelios Quest given. -// 23 -- Chelios Quest done. - -001-2-19,31,25,0 script Lloyd the Banker NPC_LLOYD,{ - - function enora_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Black iron... That is a very specific request that you have for me!"), - l("Let me check in my inventory book..."), - l("..."), - l("Yes, I have some! \"5x Black Iron Ingots\""), - l("Is this for you or somebody else? Because you need to be registered to obtain these materials."); - - switch (selectd(ArtisQuests_Enora, - l("This is for my own use."), - l("Chelios asked me to get it."))) - { - case 1: - speech S_FIRST_BLANK_LINE, - l("This is your first time asking for something, you won't pay this time, take it as a sign of good faith!"), - l("If you need something in the future, do not hesitate to pass by here, our stock is full of boxes collecting dust."); - emotion E_WINK; - break; - case 2: - speech S_FIRST_BLANK_LINE, - l("Chelios... He is part of the Blacksmith House, is he not?"), - l("Since Don settled in Artis he and his band refused to register to the Merchant Guild."), - l("I will close an eye for once, but only because it's your first time asking for something!"), - l("Sometimes a good merchant needs to reach out first. It's on the house, give Chelios my regards!"); - emotion E_WINK; - break; - } - setq ArtisQuests_Enora, 3; - - return; - } - - function explain_guild { - speech S_LAST_NEXT, - l("The guild is in charge of the commerce regularization throughout Artis and its surroundings."), - l("With the help of the town hall and the Legion of Aemil we organize some auction and we help local merchants to launch their businesses."), - l("We also feature some services like a storage and a bank for members."), - l("Registration is open to everybody, but newcomers need to pay a fee for all of the paperwork."); - - narrator S_FIRST_BLANK_LINE, - l("The bank and item storage is shared between all characters within a same account."), - l("With it, you can safely move items and funds between your characters."), - l("To move between characters that are on different accounts, you have to use the Trade function."); - return; - } - - function first_visit { - speech S_LAST_NEXT, - l("Welcome!"), - l("My name is Lloyd, I am a representative of the Merchant Guild of Artis."); - - selectd(l("My name is @@...", strcharinfo(0))); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("\"@@\", I like this name!", strcharinfo(0)), - l("Oh, wait a second..."); - narrator S_LAST_NEXT, - l("Lloyd is searching something in his book."); - speech S_LAST_NEXT, - l("I see."), - l("You are new around here, right?"); - - if (selectd(l("How do you know?"), l("Yes I am.")) == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, it is simple. I have on this book the names of every citizen of Artis and its surroundings."), - l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0)); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I knew it!"); - } - - speech S_LAST_NEXT, - l("Let me explain to you what the Merchant Guild is for."); - - explain_guild; - next; - - .@price = 500; - speech S_LAST_NEXT, - l("The fee is of @@ E. So, do you want to register?", .@price); - - switch (selectd(l("Yes."), - l("I don't have the time now."))) - { - case 1: - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not seem to have enough money, come back later!"); - } - else - { - Zeny -= .@price; - setq ArtisQuests_Lloyd, 1; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect!"), - l("I wrote your name on the book, you are now free to use the storage and bank services."); - } - break; - case 2: - break; - } - - return; - } - - function paper_to_deliver { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Now that you bring up that topic, that reminds me of something..."), - l("Earlier today there was this young seller named Fexil that passed by here."), - l("He asked to lend some money and a place to open his store, I think that he asked for a place on the merchant squares on the south-west of the city..."), - l("Anyway, he forgot his permit when he left the building."), - l("Could you bring it to him?"); - - do - { - .@q = selectd(ArtisQuests_Fexil, - l("Ok, I will bring it to him."), - l("I need more information first."), - l("I don't have the time.")); - switch (.@q) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you for this!"); - setq ArtisQuests_Fexil, 1; - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You should look for a seller named Fexil around the merchant square."), - l("Ask other merchants, they might know where he is."); - break; - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No problem, come back later if you changed your mind!"); - break; - } - } while (.@q == 2); - } - - if (getq(ArtisQuests_Lloyd) == 0) - { - first_visit; - - closeclientdialog; - goodbye; - close; - } - - speech S_LAST_NEXT, - l("Welcome to the Merchant Guild of Artis!"), - l("What do you want today?"); - - do - { - .@enora = getq(ArtisQuests_Enora); - - selectd - rif(.@enora == 2, l("I'm looking for some black iron ingots.")), - l("I would like to store some items."), - l("I would like to perform money transactions."), - l("What is this guild for?"), - l("Does the guild has any work for me right now?"), - l("Bye."); - - switch (@menu) - { - case 1: - enora_quest; - break; - case 2: - closeclientdialog(); - openstorage(); - close; - break; - case 3: - MerchantGuild_Bank(); - break; - case 4: - mes ""; - explain_guild; - break; - case 5: - if (getq(ArtisQuests_Fexil) >= 1) - { - MerchantGuild_Quests(.bankid); - continue; - } - - paper_to_deliver(); - - continue; - } - if (@menu != 6) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, - l("Something else?"); - } - } while (@menu != 6); - - closeclientdialog; - goodbye; - close; - -OnInit: - .quest_debug = ArtisQuests_Lloyd; - .distance = 4; - - // Bank configuration - array_push($@BANK_NAME$, .name$); - array_push($@BANK_TOWN$, "Artis"); - .bankid = getarraysize($@BANK_NAME$)-1; - end; -} - -function script FixBankVault { - if (#MerchantBank) - { - BankVault += max(0, #MerchantBank); - #MerchantBank = 0; - } - return; -} - diff --git a/npc/001-2-19/mapflags.txt b/npc/001-2-19/mapflags.txt deleted file mode 100644 index f083b6eb..00000000 --- a/npc/001-2-19/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-19 mapflag town diff --git a/npc/001-2-2/_import.txt b/npc/001-2-2/_import.txt deleted file mode 100644 index 7d11248e..00000000 --- a/npc/001-2-2/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-2: Moon's House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-2/_warps.txt", -"npc/001-2-2/mapflags.txt", -"npc/001-2-2/moon.txt", diff --git a/npc/001-2-2/_warps.txt b/npc/001-2-2/_warps.txt deleted file mode 100644 index f28c931d..00000000 --- a/npc/001-2-2/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-2: Moon's House warps -001-2-2,38,39,0 warp #001-2-2_38_39 0,0,001-1,70,78 -001-2-2,27,29,0 warp #001-2-2_27_29 2,0,001-2-3,27,30 diff --git a/npc/001-2-2/mapflags.txt b/npc/001-2-2/mapflags.txt deleted file mode 100644 index ff5a8f27..00000000 --- a/npc/001-2-2/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-2 mapflag town diff --git a/npc/001-2-2/moon.txt b/npc/001-2-2/moon.txt deleted file mode 100644 index 081b66ae..00000000 --- a/npc/001-2-2/moon.txt +++ /dev/null @@ -1,215 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Moon, main NPC for the urchin quest. -// Variables: -// ArtisQuests_Urchin - quest var -// Quest stages: -// 0 - not started -// 1 - started, searching for Croc Claws -// 2 - quest finished - -001-2-2,33,32,0 script Moon#001-2-2 NPC_ELVEN_FEMALE,3,3,{ - - function SayRandomGreeting { - .@q = getq(ArtisQuests_Urchin); - .@tick = gettimetick(1); - if (.@tick > @ArtisQuests_Urchin_MoonMsgTick + 12) - { - setarray .messages$[0], l("Ouch!"), l("It hurts so bad!"), - l("Help me!"), l("Hurry up!"), - l("I can't wait all day!"), - l("I need more Croc Claws."), - l("What a relief."), - l("No more pain, thanks to you."), - l("I can walk again!"); - setarray .msg_first[0], 0, 3, 6; - setarray .msg_last[0], 2, 5, 8; - .@r = rand(.msg_first[.@q],.msg_last[.@q]); - .@msg$ = .messages$[.@r]; - npctalk3 .@msg$; - @ArtisQuests_Urchin_MoonMsgTick = .@tick; - } - } - - function CheckCrowClaw { - if (getq(ArtisQuests_Urchin) != 1) - return -1; - - mes ""; - mesn; - if (countitem("CrocClaw") > 0) - { - delitem "CrocClaw", 1; - if (rand(8) == 7) // the lucky 7 - { - mesq l("Yay, it worked! I removed a spike."); - ArtisQuests_Urchin_ULeft--; - next; - if (!ArtisQuests_Urchin_ULeft) - { - mesq l("It seems I got them all!"); - next; - mesq l("Here is your reward."); - setq ArtisQuests_Urchin, 2; - quest_xp(.maxLevel, 1500); - quest_jxp(.maxLevel, 100); - close2; - return 1; - } - else - { - mesq l("But I still have some spikes left in my foot."); - next; - return 0; - } - } - else - { - mesq l("This one is useless! Give me another @@.", getitemlink("CrocClaw")); - next; - return 0; - } - } - else - { - mesq l("You don't have any @@, are you mocking me?", getitemlink("CrocClaw")); - close2; - return 1; - } - } - - stopnpctimer; - - .@q = getq(ArtisQuests_Urchin); - if (.@q < 2) - { - mesn "Narrator"; - mesc(l("You see a young elven girl, with a strong sense of pain in her face."), 9); - next; - } - else - { - mesn; - mesq l("I appreciate your help, @@.", strcharinfo(0)); - goto L_Close; - } - if (.@q == 1) goto L_QuestStarted; - -L_Story: - select - l("Hi, can I help you somehow?"); - mes ""; - mesn; - mesq l("That would be great!"); - next; - mesq l("Hi, my name is Moon. This morning I went for a walk on the beach."); - next; - mesq l("Walking barefoot, feeling the hot sand with my feet, daydreaming... I like such things, you know."); - next; - mesq l("I didn't notice that a Pikpik was in my way, and when I stepped on it, my foot was full of spikes."); - next; - mesq l("Luckily the beach is nearby, and somehow I made my way home."); - next; - mesq l("Please bring me @@s so I can pull out these spikes from my foot.", getitemlink("CrocClaw")); - next; - - switch (select(l("Stay here, I will be back as soon as I have some."), - l("Maybe next time."))) - { - case 1: - setq ArtisQuests_Urchin, 1; - mes ""; - mesn; - mesq l("It really hurts, please hurry!"); - - ArtisQuests_Urchin_ULeft = rand(3,5); - - next; - goto L_Where; - break; - case 2: - mes ""; - mesn "Narrator"; - mesc(l("The girl looks desperate."),9); - } - goto L_Close; - -L_QuestStarted: - mesn; - mesq l("Do you have @@s for me?", getitemlink("CrocClaw")); - next; - - select - l("Check out this one."), - l("I should put more effort into this."), - l("Where can I find some Croc Claws?"); - - switch (@menu) - { - case 1: - .@MustRepeat = CheckCrowClaw; - if (!.@MustRepeat) - goto L_CheckLoop; - goto L_Close; - case 2: - mes ""; - mesn; - mesq l("It really hurts, please hurry!"); - goto L_Close; - case 3: - mes ""; - mesn; - goto L_Where; - } - -L_CheckLoop: - while (!.@MustRepeat) - { - switch (select(l("Here is another one."), - l("I must leave to get more."))) - { - case 1: - .@MustRepeat = CheckCrowClaw; - break; - case 2: - goto L_Close; - } - } - goto L_Close; - -L_Where: - mesq l("You can find some Crocs on the beach, you could look up at the one after the gate, on top of this city."); - - goto L_Close; - -L_Close: - initnpctimer; - close; - -OnTimer1000: - domovestep; - -OnTouch: - SayRandomGreeting; - end; - -OnHour00: - if (playerattached()) - @ArtisQuests_Urchin_MoonMsgTick = 0; - end; - -OnInit: - .distance = 3; - .maxLevel = getmonsterinfo(Croc, MOB_LV) + 10; - initpath "move", 41, 30, - "dir", DOWN, 0, - "wait", 2, 0, - "move", 33, 32, - "dir", DOWN, 0, - "wait", 10, 0; - initialmove; - initnpctimer; -} diff --git a/npc/001-2-20/_import.txt b/npc/001-2-20/_import.txt deleted file mode 100644 index 5929d241..00000000 --- a/npc/001-2-20/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-20: Backroom -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-20/_warps.txt", -"npc/001-2-20/mapflags.txt", diff --git a/npc/001-2-20/_warps.txt b/npc/001-2-20/_warps.txt deleted file mode 100644 index a032fa4d..00000000 --- a/npc/001-2-20/_warps.txt +++ /dev/null @@ -1,26 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-20: Backroom warps -001-2-20,33,35,0 warp #001-2-20_33_35 0,0,001-1,107,50 -001-2-20,29,25,0 script #001-2-20_29_25_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-19", 41, 54; -close; - -OnUnTouch: - doevent "#001-2-20_29_25::OnUnTouch"; -} -001-2-20,29,25,0 script #001-2-20_29_25 NPC_ARTIS_DOOR_WOOD,2,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - diff --git a/npc/001-2-20/mapflags.txt b/npc/001-2-20/mapflags.txt deleted file mode 100644 index 499fd5a6..00000000 --- a/npc/001-2-20/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-20 mapflag town diff --git a/npc/001-2-21/_import.txt b/npc/001-2-21/_import.txt deleted file mode 100644 index b0f7a5a1..00000000 --- a/npc/001-2-21/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-21: First Deck -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-21/_warps.txt", -"npc/001-2-21/julia.txt", -"npc/001-2-21/mapflags.txt", -"npc/001-2-21/note.txt", diff --git a/npc/001-2-21/_warps.txt b/npc/001-2-21/_warps.txt deleted file mode 100644 index 01f70e01..00000000 --- a/npc/001-2-21/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-21: First Deck warps -001-2-21,19,28,0 warp #001-2-21_19_28 0,0,001-1,193,109 -001-2-21,33,28,0 warp #001-2-21_33_28 0,0,001-2-24,20,27 -001-2-21,31,25,0 warp #001-2-21_31_25 0,0,001-2-22,72,29 diff --git a/npc/001-2-21/julia.txt b/npc/001-2-21/julia.txt deleted file mode 100644 index b275d910..00000000 --- a/npc/001-2-21/julia.txt +++ /dev/null @@ -1,140 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Description: -// Allows to change language. - -001-2-21,27,24,0 script Julia#Artis NPC_JULIA,{ - mesn; - mesq l("Hello dear!"); - next; - mesq l("What do you want today?"); - next; - - .@s$ = l("I don't want to change my language, sorry."); - -L_Menu: - .@enora = getq(ArtisQuests_Enora); - - menu - rif(getskilllv(1) < 6, l("Something is wrong with me, I can't smile nor sit.")), L_BasicSkill, - rif(.@enora == 0, l("Where should I go?")), L_Enora, - l("I made a mistake, I would like to change my language."), L_ChooseLang, - l("Is it possible to go back to Drasil Island?"), L_Island, - l("Could you explain to me where I am?"), L_WhereIam, - l("What happened to me?"), L_What, - l("Can I read the rules again?"), L_Rules, - l("Nothing, sorry."), L_Quit; - -L_YNMenu: - menu - l("Yes, I do."), L_Menu, - l("No, none."), L_Quit; - -L_NoChanges: - mes ""; - mesn; - mesq l("No problem, do you have any other questions for me?"); - next; - - goto L_YNMenu; - -L_ChooseLang: - mes ""; - mesn; - mesq l("Of course! Tell me which language you speak and I will change the note on the ship board list."); - next; - - asklanguage(LANG_IN_SHIP); - - mes ""; - mesn; - mesq l("Ok, done."); - next; - mesq l("Do you have any other questions for me?"); - next; - - goto L_Menu; - -L_WhereIam: - mes ""; - mesn; - mesq l("You're on La Johanne, a merchant ship."); - next; - mesq l("We arrived this morning at the port of Artis, I already warned the Legion of Aemil concerning your issue."); - next; - mesq l("Somebody is waiting for you outside!"); - next; - mesq l("Like the rest of the crew, you are welcome to come and rest here at anytime during your journey on Artis."); - next; - mesq l("Do you have any other questions for me?"); - next; - - goto L_YNMenu; - -L_What: - mes ""; - mesn; - mesq l("We thought that you could help us understand this, all we know is that we found you cast in the sea, adrift on your raft."); - next; - mesq l("You were in bad shape, you should be happy we found you before the sea killed you."); - next; - mesq l("Oh, and there was this inscription on your raft. It represents the Legion of Aemil, the largest and biggest guild of the whole new world. Does that make you remember anything, anything at all?"); - next; - - select - l("Sorry, but I can't tell you anything about that."), - l("Nothing, sorry."); - - goto L_NoChanges; - -L_Rules: - mes ""; - mesn; - mesq l("Of course, they are on the left wall. Go have a look at them."); - next; - mesq l("Do you have any other questions for me?"); - next; - - goto L_YNMenu; - -L_BasicSkill: - mes ""; - mesn; - mesq l("Let me check into it..."); - next; - adddefaultskills; - mesq l("Here you go, everything is fixed."); - emotion E_HAPPY; - next; - mesq l("Do you have any other questions for me?"); - next; - - goto L_YNMenu; - -L_Enora: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Enora, from the Legion of Aemil, has been warned that you were aboard."), - l("She is waiting for you on the dock."), - l("Do you have any other questions for me?"); - - goto L_YNMenu; - -L_Quit: - goodbye; - -L_Island: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Of course, as a fully-fledged crew member you can decide of the destination of La Johanne directly with Nard."); - l("Do you have any other questions for me?"); - emotion E_HAPPY; - - goto L_YNMenu; - -OnInit: - .distance = 10; - end; -} diff --git a/npc/001-2-21/mapflags.txt b/npc/001-2-21/mapflags.txt deleted file mode 100644 index a3f0260b..00000000 --- a/npc/001-2-21/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-21 mapflag town diff --git a/npc/001-2-21/note.txt b/npc/001-2-21/note.txt deleted file mode 100644 index cd1764ed..00000000 --- a/npc/001-2-21/note.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Qwerty Dragon -// Reid -// WildX -// Description: -// A small note presenting the 6 main rules of Evol Online. - -001-2-21,29,25,0 script Note#Artis NPC_PAPER_NOTE,{ - narrator S_LAST_NEXT, - l("There is a paper with some rules written on it."); - - GameRules 8 | 4; - - narrator S_NO_NPC_NAME, - l("Following these lines are some other writings on this paper."), - l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"), - l("Does anyone know a good place to hang out in Esperia? - M. Arpan"), - l("Other things are written but are not legible anymore."); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-22/_import.txt b/npc/001-2-22/_import.txt deleted file mode 100644 index 96490c74..00000000 --- a/npc/001-2-22/_import.txt +++ /dev/null @@ -1,13 +0,0 @@ -// Map 001-2-22: Second Deck -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-22/_mobs.txt", -"npc/001-2-22/_savepoints.txt", -"npc/001-2-22/_warps.txt", -"npc/001-2-22/alige.txt", -"npc/001-2-22/chefgado.txt", -"npc/001-2-22/chest.txt", -"npc/001-2-22/hammock.txt", -"npc/001-2-22/knife.txt", -"npc/001-2-22/mapflags.txt", -"npc/001-2-22/note.txt", -"npc/001-2-22/peter.txt", diff --git a/npc/001-2-22/_mobs.txt b/npc/001-2-22/_mobs.txt deleted file mode 100644 index a2164e45..00000000 --- a/npc/001-2-22/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-22: Second Deck mobs -001-2-22,52,32,21,9 monster Piou 1002,3,30000,20000 diff --git a/npc/001-2-22/_savepoints.txt b/npc/001-2-22/_savepoints.txt deleted file mode 100644 index b4a5c1ba..00000000 --- a/npc/001-2-22/_savepoints.txt +++ /dev/null @@ -1,67 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-22: Second Deck saves -001-2-22,40,37,0 script #save_001-2-22_40_37 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-22,46,37,0 script #save_001-2-22_46_37 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-22,55,40,0 script #save_001-2-22_55_40 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-22,50,38,0 script #save_001-2-22_50_38 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-22,53,38,0 script #save_001-2-22_53_38 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-22/_warps.txt b/npc/001-2-22/_warps.txt deleted file mode 100644 index 8fcdb2c3..00000000 --- a/npc/001-2-22/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-22: Second Deck warps -001-2-22,72,30,0 warp #001-2-22_72_30 0,0,001-2-21,31,26 diff --git a/npc/001-2-22/alige.txt b/npc/001-2-22/alige.txt deleted file mode 100644 index 4f4fab9d..00000000 --- a/npc/001-2-22/alige.txt +++ /dev/null @@ -1,325 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Alige -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Description: -// Hidden in a ship's hole. -// 2 bits array: -// ShipQuests -// Variable: -// ShipQuests_Alige -// Values: -// 0 Never talk. -// 1 First talk. -// 2 Accept the task. -// 3 Bring first food. - -001-2-22,43,32,0 script AligeTrigger#Artis NPC_HIDDEN,1,1,{ - -OnTouch: - if (getareausers() <= 1) - { - setnpcdir "Alige#Artis", 2; - stopnpctimer; - initnpctimer; - } - - if (getq(ShipQuests_Alige) > 0) close; - doevent "Alige#Artis::OnFirstEncounter"; - - close; - -OnUnTouch: - if (getareausers() == 0) - { - setnpcdir "Alige#Artis", 4; - stopnpctimer; - initnpctimer; - } - close; - -OnTimer190: - stopnpctimer; - - if (getnpcdir("Alige#Artis") == 2) setnpcdir "Alige#Artis", 6; - if (getnpcdir("Alige#Artis") == 4) setnpcdir "Alige#Artis", 8; - - end; -} - -001-2-22,43,31,0 script Alige#Artis NPC_ALIGE,{ - .@q = getq(ShipQuests_Alige); - if (.@q > 1) goto L_AskForFood; - - goto OnFirstEncounter; - -OnFirstEncounter: - setq ShipQuests_Alige, 1; - - setcamnpc; - mesn "Hidden Person"; - mesq l("Hey, psst! You're not a sailor, right?"); - next; - restorecam; - - menu - l("I am, who are you?"), -, - l("Indeed, I am not."), L_NeedHelp; - - mes ""; - mesn "Narrator"; - mesc(l("The stowaway doesn't answer."), 9); - - close; - -L_NeedHelp: - setcamnpc; - mes ""; - mesn "Hidden Person"; - mesq l("Good, good... Hey, could you help me please? I beg you, please, pleeeease..."); - next; - restorecam; - - menu - l("Why not, but who are you, and what kind of help do you need?"), L_CanHelp; - l("Sorry but I have no time for this."), -; - - closeclientdialog; - close; - -L_CanHelp: - setcamnpc; - mes ""; - mesn; - mesq l("My name is Alige, I've been hiding here for weeks. All I have to eat are these berries... berries... berries..."); - next; - mesq l("I'm losing my mind here, I need something else to eat!"); - next; - mesq l("Could you please bring me something which isn't a berry, and I'm not big on vegetables either. I need proteins!"); - next; - restorecam; - - menu - l("Sure, but what will you give me in exchange?"), L_AboutReward, - l("Why don't you come out?"), -; - -L_ExplainHiding: - setcamnpc; - mes ""; - mesn; - mesq l("No, I can't. I won't! All I wanted was to travel across the seas for fun, growl... sniff. And in this hole in the floor, as you can see, I have lots of fun."); - next; - mesq l("Oh... um... actually... all I wanted was to get to Artis. Err... but I didn't, uhm... have enough money to pay for the ferry!"); - next; - mesq l("Please don't tell people you saw me. I don't want to be decapitated or get thrown into the sea as food for sharks, or get my hair mussed!"); - next; - restorecam; - - if (getq(ShipQuests_Alige) == 2) goto L_SoAskForFood; - goto L_Accept; - -L_AboutReward: - setcamnpc; - mes ""; - mesn; - mesq l("I'll share my berries with you if you help me."); - next; - restorecam; - -L_Accept: - menu - l("Understood, I will help you."), L_FirstAccepted, - l("We arrived in Artis today."), L_Artis, - l("I think I should report you to the crew members."), -; - - setcamnpc; - mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!"); - - close; - -L_Artis: - setcamnpc; - mes ""; - mesn; - mesq l("Of course, so why do I still see open sea from the porthole?"); - next; - mesq l("I wonder who is in delarium now..."); - next; - mesq l("But hey, back to me. Remember my mentioning that I'm hun...grrr...eee!"); - next; - restorecam; - - if (.@q == 2) goto L_SoAskForFood; - goto L_Accept; - -L_FirstAccepted: - if (getq(ShipQuests_Alige) >= 2) goto L_Accepted; - setq ShipQuests_Alige, 2; - - goto L_Accepted; - -L_Accepted: - setcamnpc; - mes ""; - mesn; - mesq l("Great, what food do you have for me today?"); - next; - restorecam; - -L_GiveFood: - mes ""; - - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - .@id = requestitem(); - if (.@id <= 0) goto L_Quit; // Quit message. - if (countitem(.@id) == 0) goto L_Quit; // If don't have the food - - if (array_find(.vegetables, .@id) >= 0) goto L_NoReward; // In case of wrong food. - if (array_find(.poisonable, .@id) >= 0) goto L_Poison; // In case of poisoned food (or food with effects). - if (.@id == Piberries) goto L_NoMore; // In case of Piberries. - if (.@id == RedPlushWine) goto L_Drunk; // In case of Alcohol. - - // Default message for non food - if (array_find(.commonfood, .@id) == -1) goto L_NoFood; - - inventoryplace Piberries, 3; - delitem .@id, 1; - - setcamnpc; - mes ""; - mesn; - mesq l("Thank you so much! Here, have some of my berries."); - - setq ShipQuests_Alige, 3; - getitem Piberries, rand(1, 3); - next; - - goto L_ReturnMenu; - -L_NoReward: - setcamnpc; - mes ""; - mesn; - mesq l("You don't expect me to eat that, do you? Give me something else!"); - next; - restorecam; - - goto L_GiveFood; - -L_Drunk: - setcamnpc; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I asked for food but... *hips* Ah, that'll do!"); - restorecam; - - goto L_GiveFood; - -L_NoFood: - setcamnpc; - // We must first determine if it is at least edible (IT_HEALING) - if (getiteminfo(.@id, ITEMINFO_TYPE) == IT_HEALING) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That looks too exotic for me to eat!"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That doesn't looks edible to me!"); - } - restorecam; - - goto L_GiveFood; - -L_ReturnMenu: - setcamnpc; - mesq l("Do you have anything else for me?"); - next; - restorecam; - - goto L_GiveFood; - -L_NoMore: - setcamnpc; - mes ""; - mesn; - mesq l("Grr, don't give me more berries! I don't want them, stupid berries, stupid... Stupid... Stupid!"); - next; - - goto L_ReturnMenu; - -L_Poison: - setcamnpc; - mes ""; - mesn; - mesq l("Don't try to poison me! I know what that does!"); - next; - restorecam; - goto L_ReturnMenu; - -L_SoAskForFood: - setcamnpc; - mesn; - mesq l("So, do you have anything for me today?"); - next; - restorecam; - goto L_IntroMenu; - -L_AskForFood: - setcamnpc; - mesn; - mesq l("Do you have anything for me today?"); - next; - restorecam; - -L_IntroMenu: - menu - l("Yes."), L_GiveFood, - l("Where can I find some food?"), L_FindFood, - l("Why are you hiding?") + " " + l("Why don't you come out?"), L_ExplainHiding, - l("We arrived in Artis today."), L_Artis, - l("I think I should report you to the crew members."), -; - - setcamnpc; - mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!"); - - close; - -L_FindFood: - setcamnpc; - mes ""; - mesn; - mesq l("There are some flying yellow plushes around you. They're called pious. Getting a roasted leg of one of them would be perfect."); - next; - mesq l("I'd like to catch one of them, but they fly away when I try."); - next; - mesq l("Walking around a bit, it'll be easy for you to catch one, I bet. Impale one of them for me please."); - next; - restorecam; - mesn "Narrator"; - mesc(l("You can attack a monster by clicking on it, or from your keyboard you can press the 'A' key to select the monster followed by 'Ctrl' to attack it."), 9); - next; - mesc(l("Once the monster is dead, click on the dropped items to add them to your inventory. You can also use the 'Z' key to claim the drops."), 9); - - close; - -L_Quit: - setcamnpc; - mes ""; - mesn; - mesq l("Too bad... Come back when you'll have some nice food for me. Growl... grumble... grumble."); - - close; - -OnInit: - .distance = 2; - - // Array of foods (remember to update in 000-2-1 as well) - setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegSandwich; - setarray .vegetables, Acorn, LettuceLeaf, Croconut, MananaSandwich; - setarray .poisonable, SeaDrops, PinkBlobime, PumpkinSeeds, UrchinMeat, EasterEgg; - end; -} diff --git a/npc/001-2-22/chefgado.txt b/npc/001-2-22/chefgado.txt deleted file mode 100644 index ae95d408..00000000 --- a/npc/001-2-22/chefgado.txt +++ /dev/null @@ -1,112 +0,0 @@ -// Evol scripts. -// Authors: -// Hal9000 -// Qwerty Dragon -// Reid -// Description: -// La Johanne Chef. - -001-2-22,27,28,0 script Chef Gado#Artis NPC_CHEF_GADO,{ - function foodQuest; - - .@r = rand(3); - if (.@r == 0) npctalk3 l("What are you doing in my kitchen?! Get out, it's not a place for kids!"); - if (.@r == 1) npctalk3 l("Where is the damn salt?! Give me the salt, I know you have it!"); - if (.@r == 2) npctalk3 l("Are you going to stand here all day long? Do the dishes or go away."); - - if (getq(General_SmearedHands) < 3) - foodQuest(); - close; - -function foodQuest { - .@q=getq(General_SmearedHands); - mesc l("%s seems busy as usual.", l("Chef Gado")); - select - l("I'll get moving, sorry!"), - //rif(.@r == 1 && countitem(Salt), l("Offer him the salt")), - l("Can you teach me cooking?"); - mes ""; - if (@menu == 1) - return; - // FOOD QUEST: BEGIN - .@ally=(getq(ShipQuests_ChefGado) == 4); // TRUE if you helped Gado - mesn; - mesq (.@ally ? l("I suppose I could. You helped me, after all.") : l("Why should I help you, traitor?")); - next; - // Empty Bowl needed - if (!countitem(EmptyBowl)) { - mesn; - mesq l("Anyway: First, you'll need an %s. %s", getitemlink(EmptyBowl), - (.@ally ? l("Cannot get one here in Artis, though. Well, if you travel far enough...") : l("Stop wasting my time!"))); - return; - } - // Recipe Book needed - if (!countitem(RecipeBook)) { - mesn; - mesq l("Anyway: First, you'll need a %s. You cannot cook without that. So go find one!", getitemlink(RecipeBook)); - next; - mesn; - mesq l("These books are annoyingly expensive, but maybe you have luck elsewhere. I'm sure some housewife could give you one for helping her husband..."); - next; - mesn; - mesq l("That's how I got mine, anyway."); - next; - mesn; - mesq l("Some nice lady called Ya... Micksha? No, it was not Yamicksha... For the life of me, I can't remember..."); - // FIXME: I'm ignoring that unpractical plot in favor of clarity - return; - } - - // Quest Loop - if (.@q == 0) { - mesn; - mesq l("You got a bowl, I see. You won't be finding another one, so be careful with that."); - next; - // Will only learn Sailor Stew Recipe if helped Gado instead Julia - if (.@ally) { - mesn; - mesq l("Now, watch and learn: The Sailor Stew Recipe!"); - mesc l("Learned %s recipe!", getitemlink(SailorStew)), 2; - RECIPES[CraftSailorStew]=true; - next; - } else if (!RECIPES[CraftSailorStew]) { - // They requested for a neutral approach because Julia - mesn; - mesq l("I will teach you %s... But for you, it will be %s E.", - getitemlink(SailorStew), format_number(5000)); - if (Zeny < 5000) - return; - next; - mesc l("Pay Chef Gado the gold?"); - if (askyesno() == ASK_NO || Zeny < 5000) - return; - mesn; - mesq l("Now, watch and learn: The Sailor Stew Recipe!"); - mesc l("Learned %s recipe!", getitemlink(SailorStew)), 2; - RECIPES[CraftSailorStew]=true; - Zeny-=5000; - next; - } - setq General_SmearedHands, 1; - .@q = 1; - mesn; - mesq l("Anyway, for the recipe, just add a few carps, carrots, manana, and roasted acorn in this order."); - next; - } - if (.@q == 1 || .@q == 2) { - mesn; - mesq l("Now, your next task is: I've heard rumors... About some delicious food, like %s...", getitemlink(any(BarbecuePlate, VeggiePlate))); - next; - mesn; - mesq l("They're related to Mouboos, but Artis cuisine is the worst. Go find the recipes!!"); - next; - } - mesn; - mesq l("Get moving!"); - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt deleted file mode 100644 index 69e8a8af..00000000 --- a/npc/001-2-22/chest.txt +++ /dev/null @@ -1,49 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// gumi -// Reid -// Description: -// A box with clothes for new players. - -001-2-22,51,37,0 script Chest#Artis NPC_CHEST_BIG,2,4,{ - - if (.busy == false) - { - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing - .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing - .busy = true; // lock until available again - initnpctimer; - } - end; - -OnTimer220: - .dir = .dir == 6 ? 0 : 4; // closing ? closed : open - end; - -OnTimer500: - .busy = false; // unlock - - if (.dir == 0) - { - stopnpctimer; // stop here if the chest is closed - } - end; - -OnUnTouch: - if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0) - { - end; - } -OnTimer30000: - .busy = true; - .dir = 6; // closing - specialeffect(25, AREA, getnpcid()); // closing - setnpctimer 0; -OnTouch: - end; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-22/hammock.txt b/npc/001-2-22/hammock.txt deleted file mode 100644 index f6f70044..00000000 --- a/npc/001-2-22/hammock.txt +++ /dev/null @@ -1,137 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the mid level of the ship. - -001-2-22,32,27,0 script #hammockArtis1 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,32,25,0 script #hammockArtis2 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,25,0 script #hammockArtis3 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,27,0 script #hammockArtis4 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,29,0 script #hammockArtis5 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,34,0 script #hammockArtis6 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,36,0 script #hammockArtis7 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,38,0 script #hammockArtis8 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,37,40,0 script #hammockArtis9 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,32,38,0 script #hammockArtis10 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-22,32,40,0 script #hammockArtis11 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchLeft; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} diff --git a/npc/001-2-22/knife.txt b/npc/001-2-22/knife.txt deleted file mode 100644 index 25d03b88..00000000 --- a/npc/001-2-22/knife.txt +++ /dev/null @@ -1,47 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Qwerty Dragon -// Description: -// Knife on the table. -// Variable: -// ShipQuests_Knife -// Values: -// 0 Default, not taken. -// 1 Knife taken. - -000-2-1,50,24,0 script #Artisknife NPC_KNIVES,{ - .@q = getq(ShipQuests_Knife); - if (.@q) close; - - mesn "Narrator"; - mesc(l("There are some knives on the table. Would you like to take one?"), 9); - next; - - menu - l("Yes."), L_Give, - l("No."), -; - - closeclientdialog; - close; - -L_Give: - mes ""; - inventoryplace Knife, 1; - - setq ShipQuests_Knife, 1; - getitem Knife, 1; - - mesn "Narrator"; - mesc(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9); - next; - mesc(l("When your inventory is open, you can equip an item by selecting it and clicking 'Equip'. You can do the same to unequip an item by clicking on 'Unequip'."), 9); - next; - mesc(l("Items have different effects. Some will heal you, some can be used as weapons or armor, and some can be sold for gold."), 9); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-22/mapflags.txt b/npc/001-2-22/mapflags.txt deleted file mode 100644 index fdb4e3e2..00000000 --- a/npc/001-2-22/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-22 mapflag town diff --git a/npc/001-2-22/note.txt b/npc/001-2-22/note.txt deleted file mode 100644 index 8d39cd28..00000000 --- a/npc/001-2-22/note.txt +++ /dev/null @@ -1,33 +0,0 @@ -// Evol scripts. -// Author: -// Vasily_Makarov -// Description: -// - -001-2-22,31,31,0 script Note#001-2-22 NPC_DAN_NOTE,{ - mesn; - mesq l("This note was left by somebody."); - next; - mesq l("What do you want to do with it?"); - - menu - l("Read it."), L_Content, - l("Leave it."), -; - close; - -L_Content: - mesn; - mes "\"" + l("Dear sister,"); - mes l("In a couple of days, we will finally reach Artis."); - next; - - mes l("I will send you this letter as soon as I arrive."); - mes l("Don't worry sister, I didn't forget you."); - next; - - mes l("I would like to come back home when the days are better."); - mes l("And when we have enough money for ourselves without needing anybody else."); - - mes l("Sincerely yours, Dan.") + "\""; - close; -} diff --git a/npc/001-2-22/peter.txt b/npc/001-2-22/peter.txt deleted file mode 100644 index dce6982d..00000000 --- a/npc/001-2-22/peter.txt +++ /dev/null @@ -1,302 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Ablu -// Alastrim -// Jesusalva -// Qwerty Dragon -// Reid -// Vasily_Makarov -// Description: -// Rat hunter. -// 4+2 bits array: -// ShipQuests -// Variable: -// ShipQuests_Peter -// Values is a bitmask: -// 0 Doesn't know the quest. -// 1 Task given. (To prevent bugs because zero is a valid instance id) -// 2 Already completed the first stage -// 4 Already completed the second stage -// 8 Already completed the third stage -// ... -// =15 Completed every stage. -// Setq2: -// Number of killed Rattos: -// & 1 - Ratto 1 -// & 2 - Ratto 2 -// & 4 - Ratto 3 -// & 8 - Ratto 4 -// = 15: All rattos killed -// (Adding more monsters etc. is possible, but be careful with the == 15 checks) -// Setq3: -// Instance ID (so we can destroy it later if needed, and check it too) -// Others: -// .@q = Peter variable. -// PETER_TIME = gettimetick(2) for daily -// @peter = Control Variable -// @pt_mob = Control Variable -// @MAP_NAME$ = Control Variable -// "001-2-23" - map with mobs. - -001-2-22,72,34,0 script AreaNPC#Artis NPC_HIDDEN,0,1,{ - end; -OnTouch: - doevent "Peter::OnPeterMain"; - close; -} - -001-2-22,70,35,0 script Peter#Artis NPC_RATTO_SAILOR,{ - goto L_Main; - -OnPeterMain: -L_Main: - .@q = getq(ShipQuests_Peter); - .@q2 = getq2(ShipQuests_Peter); - .@q3 = getq3(ShipQuests_Peter); - if (BaseLevel < 5) goto OnTooWeak; - - if (!.@q || !isinstance(.@q3) || .@q3 <= 0) goto L_Task; - if (.@q2 < 15) goto L_ReturnFail; - dispbottom l("I am broken?! Please report! Debug data: @@ (@@)", .@q, .@q2); - close; - -OnGiveTask: -L_Task: - if (!.@q) - setq ShipQuests_Peter, 1, 0, -1; - mesn; - mesq l("Hey there!"); - next; - mesq l("I need somebody who can rid the hold of the ship of these rattos. Can you help me?"); - next; - - menu - l("Yeah, but what reward will I get?"), L_BonusTask, - l("Why not, I need to train anyway."), L_BonusTask, - l("No, they are way too dangerous for me!"), -; - - mes ""; - mesn; - mesq l("Hehe, hehe. Well, come back if you change your mind."); - - close; - -// Friendly reminder that you have about 20 secs to finish -OnLowTime: - if ((getmap() ~= "001-2-22") || (getmap() ~= "nard*")) - dispbottom l("I'm starting to feel dizzy... I shouldn't stay here much longer."); - end; - -// Minimum Quest Level (any difficulty setting) is on L_Main (and currently is 5) -OnTooWeak: - mesn; - mesq l("I need someone to help me clean the edge of the ship, but you aren't strong enough for now."); - - close; - -/* -OnStop: - slide 72, 36; - - mesn; - mesq l("You can't go there!"); - - close; -*/ - -// This is cast if player dies in Basement, but not automatically (bad design?) -// instance_destroy() is being recklessy called here, some sanity check is good. -OnReturnFail: -L_ReturnFail: - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); // This would allow players to try again at once, but is DANGEROUS! - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, -1; - mesn; - mesq l("I see it's not so easy to get rid of these rattos. Do you want to try again?"); - next; - - menu - l("Yeah, but I would like to make sure I get a reward."), L_BonusTask, - l("Why not, I need to train anyway."), L_BonusTask, - l("No, they are way too dangerous for me!"), -; - - mes ""; - mesn; - mesq l("Hehe, hehe. Well, come back if you change your mind."); - - close; - - -L_BonusTask: - mes ""; - mesn; - mesq l("There are three kind of monsters which frequently or seldomly attacks our fair vessel."); - next; - mesn; - .@q = getq(ShipQuests_Peter); - if (!(.@q & 2)) { - mes l("- I currently need your help with @@.", getmonsterlink(Tortuga)); - mes l("I'll give you @@ GP for this job.", 500); - mes ""; - } - if (!(.@q & 4)) { - mes l("- I currently need your help with @@.", getmonsterlink(Ratto)); - mes l("I'll give you @@ GP for this job.", 1000); - mes ""; - } - if (!(.@q & 8)) { - mes l("- I currently need your help with @@.", getmonsterlink(Croc)); - mes l("I'll give you @@ GP for this job.", 1500); - mes ""; - } - // If you already took all three bounties, you can only repeat the quest daily - if (.@q == 15 && PETER_TIME <= gettimetick(2)) { - mes l("- I currently need your help with @@.", getmonsterlink(Ratto)); - mes l("I'll give you @@ GP for this job.", 750); - } else if (.@q == 15) { - mes l("I don't need your help right now, but maybe tomorrow, who knows?"); - close; - } - next; - - select - l("I'm not feeling like it today... Sorry."), - rif(!(.@q & 2), l("I will take the @@ Bounty.", "Tortuga")), - rif(!(.@q & 4), l("I will take the @@ Bounty.", "Ratto")), - rif(!(.@q & 8), l("I will take the @@ Bounty.", "Croc")), - rif(.@q == 15, l("Why not, I need to train anyway.")); - - if (@menu == 1) - close; - - @peter=@menu; - - goto L_Start; - -// In Moubootaur Legends, there's a small tutorial about Hit'n'run here -// I didn't add it here but that can be arranged -L_Start: -// Init Instance -OnStartOutside: - .@ID=getcharid(0); - @MAP_NAME$="nard@"+str(.@ID); // Max 4 chars for map name - .@INSTID = instance_create("ratto@a"+(.@ID), getcharid(3), IOT_CHAR); - .@instanceMapName$ = instance_attachmap("001-2-23", .@INSTID, 0, @MAP_NAME$); - - // Instance already exists, or something went wrong - if (.@instanceMapName$ == "") { - mesn; - mesq l("Actually, you just took a bounty, right?"); - next; - mesn; - mesq l("Why don't you take a break? Breath in some fresh air. The basement is pretty damp."); - close; - } - - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, .@INSTID; - - // It'll be self-destroyed when time runs out (3 minutes) - instance_set_timeout(180, 180, .@INSTID); - instance_init(.@INSTID); - - // Save in a less reliable way the challenge you took - if (@peter == 2) { - @peter=2; - @pt_mob=Tortuga; - } else if (@peter == 3) { - @peter=4; - @pt_mob=Ratto; - } else if (@peter == 4) { - @peter=8; - @pt_mob=Croc; - } else { - @peter=0; - @pt_mob=Ratto; - } - - warp @MAP_NAME$, 48, 28; - // Control how much time you have left - addtimer(120000, "Peter#Artis::OnLowTime"); - addtimer(140000, "Peter#Artis::OnTimeout"); - - // Spawn the Monsters - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto1Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto2Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto3Death"; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto4Death"; - - dispbottom l("Okay, you can start!"); - closeclientdialog; - close; - -// TODO: This is very reckless, instance_destroy() could possibly affect others -// If you agree with me, we can force player to wait until instance expire on its -// own (3 minutes after start) instead of allowing immediate retry. That's safer, -// and code will end up looking like Mundane (exploiting attach_map failures) - -// (Or if you are set in disregarding this, just uncomment instance_destroy.) -// (Don't blame me if server SIGSEGV's because that, though) -OnTimeout: - if (!(getmap() ~= "001-2-23") && !(getmap() ~= "nard*")) - end; - warp "001-2-22", 72, 36; - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); - setq2 ShipQuests_Peter, 0; - setq3 ShipQuests_Peter, -1; - mesn; - mesq l("Hey! Be careful. You can't stay in this basement for so long, you're going to get sick. Come outside and take a break, maybe you can try again later."); - close; - -// This is called by npc/001-2-23/ratto.txt and completes the quest -// Just like OnReturnFail and OnTimeout, this recklessy destroys the instance -// It's not _buggy_, it is just reckless. I would like a setting to restrict it -// to destroy only instances owned by the char, or to destroy by name :p -OnDone: - warp "001-2-22", 72, 36; - .@q3 = getq3(ShipQuests_Peter); - //instance_destroy(.@q3); - if (@peter) - setq ShipQuests_Peter, getq(ShipQuests_Peter)|@peter, 0, -1; - - .@q = getq(ShipQuests_Peter); - mesn; - mesq l("Good job!") + " " + l("Here's your reward!"); - - - // Before handling the rewards, we should be sure we'll handle daily loop. - // You're already in daily phase if @peter is zero. - // PS. This is not exactly "daily", this is actually a forced 24-hours wait. - if (!@peter) { - PETER_TIME=gettimetick(2)+24*60*60; - @peter=1; // This allows you to get 32 EXP from daily repeat. Tweak as needed. - } - - // You get some EXP based on difficulty taken - getexp @peter*32, @peter; - - // We don't need @peter anymore, so reuse it to give you GP rewards - switch (@peter) { - case 2: @peter=500; break; - case 4: @peter=1000; break; - case 8: @peter=1500; break; - default: @peter=750; break; - } - - Zeny += @peter; - message strcharinfo(0), l("You receive @@ E!", @peter); - - // Some cleanup. Shouldn't cause bugs but it's absence causes a ugly behavior. - deltimer("Peter#Artis::OnLowTime"); - deltimer("Peter#Artis::OnTimeout"); - @peter=0; - close; - - -OnInit: - .distance = 3; - end; -} diff --git a/npc/001-2-23/_import.txt b/npc/001-2-23/_import.txt deleted file mode 100644 index 22778b22..00000000 --- a/npc/001-2-23/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-23: Hold -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-23/_warps.txt", -"npc/001-2-23/doors.txt", -"npc/001-2-23/mapflags.txt", -"npc/001-2-23/ratto.txt", diff --git a/npc/001-2-23/_warps.txt b/npc/001-2-23/_warps.txt deleted file mode 100644 index d9434efb..00000000 --- a/npc/001-2-23/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-23: Hold warps -001-2-23,48,29,0 warp #001-2-23_48_29 0,0,001-2-22,72,35 diff --git a/npc/001-2-23/doors.txt b/npc/001-2-23/doors.txt deleted file mode 100644 index 9c91e824..00000000 --- a/npc/001-2-23/doors.txt +++ /dev/null @@ -1,75 +0,0 @@ -// Evol scripts. -// Authors: -// Ablu -// Alastrim -// Jesusalva -// Reid -// Description: -// Doors NPCs. - -001-2-23,48,29,0 script DoorUpwards#Artis NPC_HIDDEN,0,0,{ - -OnTouch: - // Actually this will never work because Instanced map - if (mobcount("001-2-23","all") > 0) goto L_Warn; - - goto L_Warp; - -L_Warn: - .@q = getq(ShipQuests_Peter); - if (.@q >= 15) goto L_Warp; - - mesn "Narrator"; - mesc(l("There are still some monsters left! Do you want to abort the quest?"), 9); - next; - - menu - l("Yes."), L_Warp, - l("No."), -; - - slide 48, 28; - closeclientdialog; - close; - -L_Warp: - warp "001-2-22", 72, 36; - - deltimer("Peter#Artis::OnLowTime"); - deltimer("Peter#Artis::OnTimeout"); - closeclientdialog; - close; -} - -// Besides the door, Alige is hiding himself and would rather not be disturbed -001-2-23,24,31,0 script LeftDoor#Artis NPC_HIDDEN,0,0,{ - -OnTouch: - mesn "Narrator"; - mesc(l("It seems that you need a key to open this door."), 9); - next; - mesc(l("What do you want to do?"), 9); - next; - - menu - rif(countitem(JohanneKey) > 0, l("Use the key.")), L_Warp, - l("Break the door."), L_Break, - l("Go away."), -; - - closeclientdialog; - close; - -L_Break: - - mes ""; - mesn "Narrator"; - mesc(l("You hear a loud scream. It must be the creaking of the wooden door..."), 9); - - close; - -L_Warp: - mes ""; - mesn "Narrator"; - mesc(l("Wait, it seems someone is blocking the door from the other side!"), 9); - - close; -} diff --git a/npc/001-2-23/mapflags.txt b/npc/001-2-23/mapflags.txt deleted file mode 100644 index c8d2d7e7..00000000 --- a/npc/001-2-23/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-23 mapflag nosave 001-2-22,50,38 diff --git a/npc/001-2-23/ratto.txt b/npc/001-2-23/ratto.txt deleted file mode 100644 index 24bb1e1a..00000000 --- a/npc/001-2-23/ratto.txt +++ /dev/null @@ -1,98 +0,0 @@ -// Evol Script. -// Author: -// Ablu -// Alastrim -// Jesusalva -// Reid -// Description: -// Ratto killer. -// The only "lose" conditions are: -// 1- dying, but this is not handled anywhere -// 2- Time running out, Peter handles that automatically. -// Note that if you die here, you won't be able to return and will need to -// start the quest over again. (I wonder why it is not handled by an OnDeath event) -// iirc, logout will automatically destroy the instance and clear timers, so it -// doesn't needs the script writer to handle logout cleanup (only death). - -001-2-23,0,0,0 script RattosControl#Artis NPC_HIDDEN,{ - end; - -// Each monster on the basement have its own respawn cycle. -// We use a XOR (^) operand to mark that the killed monster is not dead anymore. -// This is to reproduce as accurate as possible the legacy behavior of the quest. -OnRatto1Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^1; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl#Artis::OnRatto1Death"; - end; - -OnRatto2Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^2; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl#Artis::OnRatto2Death"; - end; - -OnRatto3Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^4; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl#Artis::OnRatto3Death"; - end; - -OnRatto4Respawn: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2^8; - areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl#Artis::OnRatto4Death"; - end; - -// When you kill a monster on basement, we must check the mob as dead, see if you -// finally killed the last one and quest is complete, and add a timer to respawn it -// after 1m25s (for flavor purposes, makes quest harder though) -OnRatto1Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|1; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl#Artis::OnRatto1Respawn"); - end; - -OnRatto2Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|2; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl#Artis::OnRatto2Respawn"); - end; - -OnRatto3Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|4; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl#Artis::OnRatto3Respawn"); - end; - -OnRatto4Death: - .@q2=getq2(ShipQuests_Peter); - setq2 ShipQuests_Peter, .@q2|8; - .@q2=getq2(ShipQuests_Peter); - if (.@q2 == 15) - goto L_Victor; - addtimer(85000, "RattosControl#Artis::OnRatto4Respawn"); - end; - -// This label is reached when all rattos are dead. We clear the respawn timers -// (as we are going to delete the instance map anyway), warp you outside, and -// from there onwards, Peter handles properly rewarding you. -L_Victor: - deltimer("RattosControl#Artis::OnRatto1Respawn"); - deltimer("RattosControl#Artis::OnRatto2Respawn"); - deltimer("RattosControl#Artis::OnRatto3Respawn"); - deltimer("RattosControl#Artis::OnRatto4Respawn"); - addtimercount("Peter#Artis::OnTimeout", 5000); - addtimer(5000, "Peter#Artis::OnDone"); - dispbottom l("It looks like all monsters were killed."); - end; -} diff --git a/npc/001-2-24/_import.txt b/npc/001-2-24/_import.txt deleted file mode 100644 index 34c43a0b..00000000 --- a/npc/001-2-24/_import.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Map 001-2-24: Nard's Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-24/_warps.txt", -"npc/001-2-24/hammock.txt", -"npc/001-2-24/mapflags.txt", -"npc/001-2-24/nard.txt", -"npc/001-2-24/piourocket.txt", diff --git a/npc/001-2-24/_warps.txt b/npc/001-2-24/_warps.txt deleted file mode 100644 index 945c3aca..00000000 --- a/npc/001-2-24/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-24: Nard's Room warps -001-2-24,19,27,0 warp #001-2-24_19_27 0,0,001-2-21,32,28 diff --git a/npc/001-2-24/hammock.txt b/npc/001-2-24/hammock.txt deleted file mode 100644 index f4319358..00000000 --- a/npc/001-2-24/hammock.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the top level of the ship. - -001-2-24,28,24,0 script #nardArtisHammock NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: - hamTouchRight; - -OnUnTouch: - hamUnTouch; - -OnTimer5440: - hamTimerRight; -} diff --git a/npc/001-2-24/mapflags.txt b/npc/001-2-24/mapflags.txt deleted file mode 100644 index 4506b385..00000000 --- a/npc/001-2-24/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-24 mapflag town diff --git a/npc/001-2-24/nard.txt b/npc/001-2-24/nard.txt deleted file mode 100644 index c38081e4..00000000 --- a/npc/001-2-24/nard.txt +++ /dev/null @@ -1,93 +0,0 @@ -// Evol scripts. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Captain Nard dialogs. -// Nard does the introduction with a small quest. -// This quest is meant to teach the player how to use a weapon,and to bring food to the ship. -// 4 bits array: -// ShipQuests -// Variable: -// 0 ShipQuests_Nard -// 1 ShipQuests_Gugli -// 2 ShipQuests_ChefGado -// Values: -// 00 Introduction of the boxes and Nard. This is displayed when the player never spoke to Nard or his box. -// 01 Nard spoke and gave access to the outdoor of the ship. -// 02 Completed the Gugli quest. -// 03 ChefGado Quest accepted. -// 04 ChefGado Quest completed and "Introduction" chapter finalized. -// 05 Reward taken from the box. -// 10 Never talked with Gugli. -// 11 Gugli gives you the task. -// 12 Gave all of the boxes to Gugli. - -001-2-24,25,26,0 script Nard#Artis NPC_NARD,{ - - checkclientversion; - mesn; - mesq l("Good day sir or madam."); - next; - mesq l("What can I do for you?"); - .@q = getq(ArtisQuests_Enora); - - // Before the player sees Enora, the menu shows L_Lost on top - // If the player saw Enora, the menu shows L_Lost at the bottom - // Because he shouldn't be lost after having talked to her, so the priority in menu changes - menu - rif(.@q == 0, l("I'm lost, where should I go?")), L_Lost, - rif(.@q > 0, l("Tell me, where are we right now?")), L_Info, - l("How long will you stay here?"), -, - rif(.@q > 0, l("I'm lost, where should I go?")), L_Lost; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("We just returned from a long journey and Artis is a good city to rest and to conclude our exchange."), - l("I think that we will stay in port for a great time."), - l("Although, if you want to visit a place nearby, we could take you there."), - l("Do you want to go somewhere?"); - - switch (select(l("Drasil Island."), - l("Nowhere, I'm fine here."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Let's set sail then!"); - - savepoint "000-2-1", 50, 38; - if (!getmapxy(.@map$, .@x, .@y, 0)) - { - warp "000-2-3", .@x, .@y; - } - else - { - warp "000-2-3", 22, 27; - } - - closeclientdialog; - close; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok we stay docked here if you need our help."); - - closeclientdialog; - close; - } -L_Info: - closeclientdialog; - npctalk3 l("Don't you recognize the great city of Artis?"); - close; - -L_Lost: - mes ""; - mesn; - mesq l("Julia made an appeal to the Legion of Aemil to get in touch with you, exit the ship and you should see your escort!"); - next; - - closeclientdialog; - close; - -OnInit: - .distance = 5; - end; -} diff --git a/npc/001-2-24/piourocket.txt b/npc/001-2-24/piourocket.txt deleted file mode 100644 index 3bcc914b..00000000 --- a/npc/001-2-24/piourocket.txt +++ /dev/null @@ -1,9 +0,0 @@ -// Evol scripts. -// Author: -// Ablu -// Description: -// Jumping piou. - -// actual source is in npc/000-2-3/piourocket.txt - -001-2-24,27,23,4 duplicate(#piourocket) #piourocketArtis NPC_PIOU_ROCKET diff --git a/npc/001-2-25/_import.txt b/npc/001-2-25/_import.txt deleted file mode 100644 index a3e9ee03..00000000 --- a/npc/001-2-25/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-25: Storage Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-25/_mobs.txt", -"npc/001-2-25/_warps.txt", -"npc/001-2-25/mapflags.txt", diff --git a/npc/001-2-25/_mobs.txt b/npc/001-2-25/_mobs.txt deleted file mode 100644 index de0c289e..00000000 --- a/npc/001-2-25/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-25: Storage Room mobs -001-2-25,0,0,0,0 monster Ratto 1005,2,240000,420000 diff --git a/npc/001-2-25/_warps.txt b/npc/001-2-25/_warps.txt deleted file mode 100644 index 88fd273d..00000000 --- a/npc/001-2-25/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-25: Storage Room warps -001-2-25,29,31,0 warp #001-2-25_29_31 0,0,001-2-19,41,26 diff --git a/npc/001-2-25/mapflags.txt b/npc/001-2-25/mapflags.txt deleted file mode 100644 index 659308e5..00000000 --- a/npc/001-2-25/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-25 mapflag town diff --git a/npc/001-2-26/_import.txt b/npc/001-2-26/_import.txt deleted file mode 100644 index ab0c2970..00000000 --- a/npc/001-2-26/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-26: Alchemy Lab -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-26/_warps.txt", -"npc/001-2-26/flask.txt", -"npc/001-2-26/ivan.txt", -"npc/001-2-26/mapflags.txt", diff --git a/npc/001-2-26/_warps.txt b/npc/001-2-26/_warps.txt deleted file mode 100644 index 2b16f569..00000000 --- a/npc/001-2-26/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-26: Alchemy Lab warps -001-2-26,28,43,0 warp #001-2-26_28_43 0,0,001-1,163,71 diff --git a/npc/001-2-26/flask.txt b/npc/001-2-26/flask.txt deleted file mode 100644 index 8afa58c3..00000000 --- a/npc/001-2-26/flask.txt +++ /dev/null @@ -1,21 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Alchemy animation. - -001-2-26,32,27,4 script #FlaskAlchemyLab NPC_FLASK,{ - .dir = 2; - stopnpctimer; - initnpctimer; - close; - -OnTimer12920: - .dir = 4; - stopnpctimer; - end; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/001-2-26/ivan.txt b/npc/001-2-26/ivan.txt deleted file mode 100644 index ba95fd4c..00000000 --- a/npc/001-2-26/ivan.txt +++ /dev/null @@ -1,85 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Alchemist NPC - -001-2-26,28,30,0 script Ivan NPC_IVAN,{ - - function ivan_description { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I am an alchemist, I bear the name of Ivan."), - l("I work under the protection and the supervision of the Legion of Aemil."), - l("Alchemical studies are prohibited in every city of the Archipelagos, do not dare to practice it in a public zone!"); - - return; - } - - function enora_quest { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("How many? What kind? I can produce two dozen boxes per day."); - - select(l("5 Piberries Infusions")); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("5 boxes... Alright, @@ are my speciality!", getitemlink(PiberriesInfusion)), - l("I can prepare them in an hour or so!"); - - select(l("You missunderstood, it's 5 potions.")); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Why would the Legion request my help for only 5 potions?"), - l("Is this some kind of joke?!"); - - switch (select(l("Enora needs them."), - l("Excuse me that was a mistake."))) - { - case 1: - break; - case 2: - narrator S_FIRST_BLANK_LINE, l("Ivan grumbles and resumes his work."); - emotion E_UPSET; - close; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh... You should have started with this!"), - l("I have some spare one, take them, and tell Enora that any fees are paid!"); - - setq ArtisQuests_Enora, 9; - emotion E_HAPPY; - return; - } - - .@enora = getq(ArtisQuests_Enora); - - if (.@enora < 8) - { - npctalk3 l("I'm busy, leave me alone."); - end; - } - - speech S_LAST_NEXT, l("Yes what do you need?"); - - select - rif(.@enora == 8, l("The Legion needs some potions.")), - rif(.@enora >= 8, l("Who are you?")), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - enora_quest; - break; - case 2: - ivan_description; - break; - } - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-26/mapflags.txt b/npc/001-2-26/mapflags.txt deleted file mode 100644 index 20c3188d..00000000 --- a/npc/001-2-26/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-26 mapflag town diff --git a/npc/001-2-27/_import.txt b/npc/001-2-27/_import.txt deleted file mode 100644 index 977f4132..00000000 --- a/npc/001-2-27/_import.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Map 001-2-27: Blacksmith Shop -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-27/_warps.txt", -"npc/001-2-27/don.txt", -"npc/001-2-27/kaylo.txt", -"npc/001-2-27/lydon.txt", -"npc/001-2-27/mapflags.txt", -"npc/001-2-27/shop.txt", diff --git a/npc/001-2-27/_warps.txt b/npc/001-2-27/_warps.txt deleted file mode 100644 index e69b24d1..00000000 --- a/npc/001-2-27/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-27: Blacksmith Shop warps -001-2-27,35,35,0 warp #001-2-27_35_35 0,0,001-1,101,108 diff --git a/npc/001-2-27/don.txt b/npc/001-2-27/don.txt deleted file mode 100644 index 9db092b1..00000000 --- a/npc/001-2-27/don.txt +++ /dev/null @@ -1,112 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Jesusalva -// Description: -// Don the blacksmith of Artis - -001-2-27,35,29,0 script Don#001-2-27 NPC_HUMAN_MALE_OLD,{ - function improve_equipment; - function card_explanation; - function take_apprentice; - function good_blacksmith; - - speech S_LAST_NEXT, - l("Hi, what do you want kiddo?"); - - do - { - switch (.@q = select(l("How can I improve my equipment?"), - l("What is a card?"), - l("Are you a good blacksmith?"), - l("Do you take apprentices?"), - l("Nothing."))) - { - case 1: - improve_equipment(); - break; - case 2: - card_explanation(); - break; - case 3: - good_blacksmith(); - break; - case 4: - take_apprentice(); - break; - case 5: - break; - } - } while (.@q != 5); - - goodbye; - close; - -function improve_equipment { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Different ways, each part of your equipment can be generally upgraded."), - l("You rarely use the full potential of your equipment. As they say, a master weapon in a noob's hands is a noob weapon with wasted potential. But the more you use them, the better you can harness this power."), - l("Power obtained from proficiency will be noted down near the equipment name. There may be illegal ways to raise proficiency without hard work. But things obtained without hard work are not worth it."), - l("You can also improve your equipment in a totally different way with the use of cards."), - l("By last, a master craftsman can make equipment much better than a less skilled one. Equipment made by measure are much better than those bought at shops as well."); - return; -} - -function card_explanation { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("There are two different kinds of cards, the first changes the style of your clothes, the second changes their stats."), - l("I am not an expert of the first kind, but I know what I am talking about when it comes to improving equipment."), - l("A stat card works on different pieces of equipment."), - l("Each piece of equipment has a predefined slot number."), - l("Each card improves your gear by a ratio or a fixed number on a predefined stat."), - l("Like, a defensive mythril card can be used on any mythril equipment, and it will improve the defense by 5% of the latter."), - l("You just have to select the card, then you choose which piece of equipment you want to use it on, and you are done."), - l("I am also aware that you can slot runestones and even gemstones to equipment as well. Some of them have magic properties."); - return; -} - -function take_apprentice { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I do not."); - - emotion E_UPSET; - - select(l("What about Chelios?")); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Chelios was stubborn in his youth, he never stopped annoying me with his questions while I was working at the forge."), - l("He did not change while growing up, I repeatedly asked him to leave the forge but in the end he installed himself in front of it..."), - l("He is mature and he rarely ask questions so I am fine. I can not stand the sight of a whiner anyway."); - return; -} - -function good_blacksmith { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I do not like to brag about it but you won't find a better blacksmith on the whole island."), - l("If you need somebody to craft a weapon or a plate from diagrams I am the one that you need."); - - switch (select(l("Can I craft them myself?"), - l("Ok."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can try if you know the recipe, but your chance of success is lesser than a well trained smith and master craftsman."); - .@s = SmithSystem(CRAFT_SMITHERY); - if (.@s) - mesc l("Success!"), 3; - else - mesc l("That didn't work!"), 1; - next; - break; - case 2: - break; - } - - return; -} - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/001-2-27/kaylo.txt b/npc/001-2-27/kaylo.txt deleted file mode 100644 index 805f8dea..00000000 --- a/npc/001-2-27/kaylo.txt +++ /dev/null @@ -1,43 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Kaylo is the Shield seller in Don's Blacksmith house on Artis. - -001-2-27,27,28,0 script Kaylo NPC_KAYLO,{ - speech S_LAST_NEXT, - l("Hi customer! What do you want today?"); - - switch (select( - l("Let's make a trade."), - l("What's wrong with your clothes?"), - l("What is this place?"), - l("See you."))) - { - case 1: - closeclientdialog; - shop "Store#Shield001-2-27"; - close; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I used a card to improve my clothes."), - l("There are two different kinds of cards, the first changes the style of your clothes, the second changes their stats."), - l("You should discuss with Don and Calypsan if you want to learn more about it, they are masters on this area!"); - break; - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You are in the Blacksmith's house, by Jove!"), - l("Don is a renowned blacksmith throughout Andorra, it's crazy that you never heard of him."); - break; - case 4: - break; - } - - goodbye; - close; - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/001-2-27/lydon.txt b/npc/001-2-27/lydon.txt deleted file mode 100644 index 3fc93178..00000000 --- a/npc/001-2-27/lydon.txt +++ /dev/null @@ -1,36 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Lydon is the Weapon seller in Don's Blacksmith house on Artis. - -001-2-27,43,28,0 script Lydon NPC_LYDON,{ - speech S_LAST_NEXT, - l("Hi customer! What do you want today?"); - - switch (select( - l("Let's make a trade."), - l("Who is the blacksmith outside?"), - l("Bye."))) - { - case 1: - closeclientdialog; - shop "Store#Weapon001-2-27"; - close; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Chef? He is Don's apprentice, he works on his hammering skill day and night."), - l("He is very lucky that Don took him under his wing, but being the student of such a teacher is not easy every day!"); - break; - case 3: - break; - } - - goodbye; - close; - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/001-2-27/mapflags.txt b/npc/001-2-27/mapflags.txt deleted file mode 100644 index 42bba366..00000000 --- a/npc/001-2-27/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-27 mapflag town diff --git a/npc/001-2-27/shop.txt b/npc/001-2-27/shop.txt deleted file mode 100644 index 3cbee6f4..00000000 --- a/npc/001-2-27/shop.txt +++ /dev/null @@ -1,62 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Blacksmith shops - -001-2-27,27,29,0 trader Store#Shield001-2-27 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem LeatherShield, -1, 30; - sellitem CopperArmbands, -1, 28; - sellitem IronArmbands, -1, 20; - - .distance = 2; - end; - -OnClock0000: - restoreshopitem LeatherShield, 10; - restoreshopitem CopperArmbands, 9; - restoreshopitem IronArmbands, 7; -OnClock0800: - restoreshopitem LeatherShield, 10; - restoreshopitem CopperArmbands, 6; - restoreshopitem IronArmbands, 3; -OnClock01600: - restoreshopitem LeatherShield, 10; - restoreshopitem CopperArmbands, 8; - restoreshopitem IronArmbands, 6; - end; -} - -001-2-27,43,29,0 trader Store#Weapon001-2-27 NPC_NO_SPRITE,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem PiouSlayer, -1, 50; - sellitem TrainingGladius, -1, 25; - sellitem WoodenSword, -1, 50; - sellitem TrainingArrow, -1, 20000; - - .distance = 2; - end; - -OnClock0000: - restoreshopitem PiouSlayer, 25; - restoreshopitem TrainingGladius, 8; - restoreshopitem WoodenSword, 25; -OnClock0800: - restoreshopitem PiouSlayer, 25; - restoreshopitem TrainingGladius, 8; - restoreshopitem WoodenSword, 25; -OnClock01600: - restoreshopitem PiouSlayer, 25; - restoreshopitem TrainingGladius, 8; - restoreshopitem WoodenSword, 25; - restoreshopitem TrainingArrow, 20000; - end; -} diff --git a/npc/001-2-28/_import.txt b/npc/001-2-28/_import.txt deleted file mode 100644 index a58d3fee..00000000 --- a/npc/001-2-28/_import.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Map 001-2-28: Red Plush Inn -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-28/_warps.txt", -"npc/001-2-28/jenna.txt", -"npc/001-2-28/mapflags.txt", -"npc/001-2-28/note.txt", -"npc/001-2-28/plush.txt", -"npc/001-2-28/shop.txt", diff --git a/npc/001-2-28/_warps.txt b/npc/001-2-28/_warps.txt deleted file mode 100644 index 4447ee63..00000000 --- a/npc/001-2-28/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-28: Red Plush Inn warps -001-2-28,29,42,0 warp #001-2-28_29_42 0,0,001-1,118,89 -001-2-28,61,30,0 warp #001-2-28_61_30 0,0,001-1,135,83 -001-2-28,34,25,0 warp #001-2-28_34_25 3,0,001-2-29,38,34 diff --git a/npc/001-2-28/jenna.txt b/npc/001-2-28/jenna.txt deleted file mode 100644 index 5043e064..00000000 --- a/npc/001-2-28/jenna.txt +++ /dev/null @@ -1,78 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// Jenna, waitress in Artis inn. - -001-2-28,52,32,0 script Jenna#001-2-28 NPC_RAIJIN_FEMALE_WAITRESS,1,1,{ - - function SayRandomGreeting { - - .@tick = gettimetick(1); - if (.@tick > @Artis_RedPlush_WaitressTick + 10) - { - setarray .messages$[0], l("Welcome to our inn!"), - l("Welcome to Red Plush."), - l("Please, have a seat."), - l("Lovely day, isn't it?"); - - .@r = rand(getarraysize(.messages$)); - .@msg$ = .messages$[.@r]; - npctalk3 .@msg$; - @Artis_RedPlush_WaitressTick = .@tick; - } - } - - speech S_LAST_NEXT, l("Do you want a drink?"); - - closeclientdialog; - shop "#Invisible001-2-28"; - close; - -OnTimer1000: - dographmovestep; - -OnTouch: - SayRandomGreeting; - end; - -OnHour00: - if (playerattached()) - @Artis_RedPlush_WaitressTick = 0; - end; - -OnInit: - .distance = 5; - initmovegraph "m_table_1", 52, 32, - "m_table_2", 56, 32, - "big_table_l", 53, 27, - "big_table_r", 56, 30, - "s_table_1", 53, 36, - "s_table_2", 58, 38, - "lf_table_2", 45, 31; - - setmovegraphcmd "m_table_1", "s_table_2", 2, "dir 4; wait 8", - "m_table_1", "lf_table_2", 1, "dir 4; wait 8", - "m_table_1", "big_table_l",1, "dir 0; wait 10", - "m_table_2", "m_table_1", 1, "dir 0; wait 8", - "m_table_2", "lf_table_2", 1, "dir 4; emote 2; wait 8", - "m_table_2", "big_table_l",2, "dir 0; wait 8", - "s_table_1", "m_table_1", 5, "dir 0; wait 10", - "s_table_1", "big_table_l",3, "dir 0; wait 1; emote 103;" - "say Thank you for the tip!;" - "wait 15; moveon", - "s_table_1", "m_table_2", 1, "dir 0; wait 8", - "s_table_2", "s_table_1", 1, "wait 6", - "s_table_2", "m_table_2", 1, "dir 0; wait 8", - "big_table_l", "m_table_2", 1, "dir 0; wait 6", - "big_table_l", "s_table_1", 1, "dir 2; wait 6", - "big_table_r", "s_table_1", 1, "dir 2; wait 6", - "big_table_r", "m_table_2", 2, "wait 8", - "big_table_r", "s_table_2", 1, "dir 4; wait 8", - "lf_table_2", "m_table_2", 1, "dir 0; wait 8", - "lf_table_2", "big_table_r",1, "dir 4; wait 1; emote 3; wait 6"; - - firstmove "wait 8"; - initnpctimer; -} - diff --git a/npc/001-2-28/mapflags.txt b/npc/001-2-28/mapflags.txt deleted file mode 100644 index 8cf7ec21..00000000 --- a/npc/001-2-28/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-28 mapflag town diff --git a/npc/001-2-28/note.txt b/npc/001-2-28/note.txt deleted file mode 100644 index 2c41adb7..00000000 --- a/npc/001-2-28/note.txt +++ /dev/null @@ -1,43 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Qwerty Dragon -// Reid -// WildX -// Jesusalva -// Description: -// A small note presenting the main rules of Evol Online. - -001-2-28,36,28,0 script Note#001-2-28 NPC_PAPER_NOTE,{ - narrator S_LAST_NEXT, - l("There is a paper with some rules written on it."); - - GameRules 8 | 4; - - narrator S_NO_NPC_NAME, - l("Following these lines are some other writings on this paper."), - l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Jenna"), - l("You'll gain experience if you hang around here with friends. Ask Jenna for drinks and pay a round for them! - Management"); - - close; - -OnInit: - .distance = 2; - end; -} - -// This is part of AFKing Experience -001-2-28,60,30,0 script #AFKArtis NPC_HIDDEN,0,1,{ - end; - -OnTouch: - addtimer2(3000, "#AFKArtis::OnSpeeching"); - end; - -OnSpeeching: - AFKLoop("#AFKArtis::OnSpeeching", "001-2-28", 36, 27, 60, 42); - end; -} - -001-2-28,36,31,0 duplicate(#AFKArtis) #AFKArtis2 NPC_HIDDEN,0,1 - diff --git a/npc/001-2-28/plush.txt b/npc/001-2-28/plush.txt deleted file mode 100644 index 695bd7c6..00000000 --- a/npc/001-2-28/plush.txt +++ /dev/null @@ -1,127 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Red, the Innkeeper. -// Variable: -// INN_REGISTER - -001-2-28,28,28,0 script Plush#001-2-28 NPC_RED,{ - - function narrator_explication { - narrator S_LAST_NEXT, - l("You will respawn at this place if defeated in combat."), - l("All you have to do is to select a bed in the upper level anytime after your reservation."), - l("Unlike other respawn points, an inn can fully restore your HP."), - l("Of course, you can select a bed somewhere else after your reservation, but you won't get your HP recovery until you choose to get some rest in the inn."), - l("You can also use your room to get some rest after a long battle. That will consume your reservation but your HP will be fully restored."); - return; - } - - function accepted_room { - .@price = getarg(0); - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring @@ E.", .@price); - } - else - { - emotion E_HAPPY; - Zeny -= .@price; - INN_REGISTER = REDPLUSH_INN; - PC_IS_DEAD = false; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I registered you on one of the rooms of the upper level."), - l("You can go upstairs and choose a different room if you want."); - savepoint "001-2-29", 29, any(49, 35); - } - } - - function register_room { - .@price = lognbaselvl(100, 10); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That will be @@ E to set your respawn point", .@price), - l("This will remain your respawn point until set elsewhere."), - l("Is that okay?"); - - if (askyesno() == ASK_YES) - { - accepted_room(.@price); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Come back later if you changed your mind!"); - } - - return; - } - - function lodge_check { - if (INN_REGISTER == NO_INN) - { - register_room; - } - else if (INN_REGISTER == REDPLUSH_INN) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You are already registered here."), - l("Go on the upper level if you want to change your room or to use it."); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("If you are registered somewhere else you will loose that reservation."), - l("Do you still want to lodge here?"); - - if (askyesno() == ASK_YES) - { - register_room; - } - } - return; - } - - speech S_LAST_NEXT, - l("Welcome to the Red Plush inn!"), - l("What do you need?"); - - do - { - .@q = select( - l("Could I lodge here for a while?"), - l("What service do you offer?"), - l("What is your tipiou trying to do?"), - l("Nothing.")); - - switch (.@q) - { - case 1: - lodge_check; - break; - case 2: - emotion E_WINK; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("We offer a room for travelers passing by Artis, our beds are comfy and you can be guaranteed to be right as rain after a night here!"), - l("If you wake up at the inn after a harsh battle, you will find yourself revitalized in an instant unlike other places where you can rest."); - - narrator_explication; - break; - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That poor one is doing his best to fly... But his last meal and the gravity is not helping him so far!"); - break; - case 4: - break; - } - } while (.@q != 1 && .@q != 4); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 5; -} diff --git a/npc/001-2-28/shop.txt b/npc/001-2-28/shop.txt deleted file mode 100644 index 5e05a7dd..00000000 --- a/npc/001-2-28/shop.txt +++ /dev/null @@ -1,24 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Inn hidden shop. - -001-2-28,53,33,0 trader #Invisible001-2-28 NPC_HIDDEN,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem RedPlushWine, -1, 50; - - .distance = 10; - end; - -OnClock0000: - restoreshopitem RedPlushWine, 20; -OnClock0800: - restoreshopitem RedPlushWine, 20; -OnClock1600: - restoreshopitem RedPlushWine, 20; -} diff --git a/npc/001-2-29/_import.txt b/npc/001-2-29/_import.txt deleted file mode 100644 index ebcab6d1..00000000 --- a/npc/001-2-29/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-29: First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-29/_savepoints.txt", -"npc/001-2-29/_warps.txt", -"npc/001-2-29/mapflags.txt", diff --git a/npc/001-2-29/_savepoints.txt b/npc/001-2-29/_savepoints.txt deleted file mode 100644 index c2176e4c..00000000 --- a/npc/001-2-29/_savepoints.txt +++ /dev/null @@ -1,54 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-29: First Floor saves -001-2-29,29,28,0 script #save_001-2-29_29_28 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, REDPLUSH_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-29,29,35,0 script #save_001-2-29_29_35 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, REDPLUSH_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-29,29,42,0 script #save_001-2-29_29_42 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, REDPLUSH_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-29,29,49,0 script #save_001-2-29_29_49 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, REDPLUSH_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-29/_warps.txt b/npc/001-2-29/_warps.txt deleted file mode 100644 index 6c9d08f9..00000000 --- a/npc/001-2-29/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-29: First Floor warps -001-2-29,39,35,0 warp #001-2-29_39_35 3,0,001-2-28,33,27 -001-2-29,38,25,0 warp #001-2-29_38_25 0,1,001-2-30,36,31 diff --git a/npc/001-2-29/mapflags.txt b/npc/001-2-29/mapflags.txt deleted file mode 100644 index 98a4373f..00000000 --- a/npc/001-2-29/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-29 mapflag town diff --git a/npc/001-2-3/_import.txt b/npc/001-2-3/_import.txt deleted file mode 100644 index c003e206..00000000 --- a/npc/001-2-3/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-3: First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-3/_savepoints.txt", -"npc/001-2-3/_warps.txt", -"npc/001-2-3/mapflags.txt", diff --git a/npc/001-2-3/_savepoints.txt b/npc/001-2-3/_savepoints.txt deleted file mode 100644 index e835aaa1..00000000 --- a/npc/001-2-3/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-3: First Floor saves -001-2-3,42,32,0 script #save_001-2-3_42_32 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-3/_warps.txt b/npc/001-2-3/_warps.txt deleted file mode 100644 index ddd0b6e1..00000000 --- a/npc/001-2-3/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-3: First Floor warps -001-2-3,27,31,0 warp #001-2-3_27_31 2,0,001-2-2,27,31 diff --git a/npc/001-2-3/mapflags.txt b/npc/001-2-3/mapflags.txt deleted file mode 100644 index 311c2c75..00000000 --- a/npc/001-2-3/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-3 mapflag town diff --git a/npc/001-2-30/_import.txt b/npc/001-2-30/_import.txt deleted file mode 100644 index 91918ef5..00000000 --- a/npc/001-2-30/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-30: Second Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-30/_mobs.txt", -"npc/001-2-30/_warps.txt", -"npc/001-2-30/mapflags.txt", diff --git a/npc/001-2-30/_mobs.txt b/npc/001-2-30/_mobs.txt deleted file mode 100644 index 956ecf5d..00000000 --- a/npc/001-2-30/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-30: Second Floor mobs -001-2-30,0,0,0,0 monster Ratto 1005,1,240000,420000 diff --git a/npc/001-2-30/_warps.txt b/npc/001-2-30/_warps.txt deleted file mode 100644 index 60c227f8..00000000 --- a/npc/001-2-30/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-30: Second Floor warps -001-2-30,37,32,0 warp #001-2-30_37_32 1,0,001-2-29,37,27 diff --git a/npc/001-2-30/mapflags.txt b/npc/001-2-30/mapflags.txt deleted file mode 100644 index 357de0aa..00000000 --- a/npc/001-2-30/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-30 mapflag town diff --git a/npc/001-2-31/_import.txt b/npc/001-2-31/_import.txt deleted file mode 100644 index ef587396..00000000 --- a/npc/001-2-31/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-31: West Commercial Building -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-31/_warps.txt", -"npc/001-2-31/mapflags.txt", diff --git a/npc/001-2-31/_warps.txt b/npc/001-2-31/_warps.txt deleted file mode 100644 index 2dfa6c99..00000000 --- a/npc/001-2-31/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-31: West Commercial Building warps -001-2-31,32,40,0 warp #001-2-31_32_40 0,0,001-1,49,97 -001-2-31,36,32,0 warp #001-2-31_36_32 0,0,001-2-41,25,32 diff --git a/npc/001-2-31/mapflags.txt b/npc/001-2-31/mapflags.txt deleted file mode 100644 index a7f18782..00000000 --- a/npc/001-2-31/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-31 mapflag town diff --git a/npc/001-2-32/_import.txt b/npc/001-2-32/_import.txt deleted file mode 100644 index b59046e0..00000000 --- a/npc/001-2-32/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-32: Training Arena Lobby -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-32/_warps.txt", -"npc/001-2-32/doors.txt", -"npc/001-2-32/mapflags.txt", -"npc/001-2-32/serena.txt", diff --git a/npc/001-2-32/_warps.txt b/npc/001-2-32/_warps.txt deleted file mode 100644 index 4db4b354..00000000 --- a/npc/001-2-32/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-32: Training Arena Lobby warps -001-2-32,27,33,0 warp #001-2-32_27_33 0,0,001-2-33,39,33 diff --git a/npc/001-2-32/doors.txt b/npc/001-2-32/doors.txt deleted file mode 100644 index 828366d2..00000000 --- a/npc/001-2-32/doors.txt +++ /dev/null @@ -1,38 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Jesusalva -// Description: -// Doors NPCs. - -001-2-32,33,29,0 script ToFightRoom#001-2-32 NPC_HIDDEN,0,0,{ - -OnTouch: - if (getq(Artis_Legion_Progress) < 3) - { - narrator - l("You hear some sound behind the door."), - l("Somebody is probably training, better wait for them to finish."); - } - else - { - .@q2=getq2(Artis_Legion_Progress); - .@mapn$="atl2@"+getcharid(0); - // FIXME This code is extremely unreliable - if (isinstance(.@q2) && .@q2 >= 0) - { - instance_set_timeout(3600, 3600, .@q2); - warp .@mapn$, 24, 29; - } else { - .@inst = instance_create("ATL "+getcharid(0), getcharid(3), IOT_CHAR); - instance_attachmap("001-2-35", .@inst, false, .@mapn$); - // Instance lasts one hour - instance_set_timeout(3600, 3600, .@inst); - instance_init(.@inst); - setq2 Artis_Legion_Progress, .@inst; - } - - } - - close; -} diff --git a/npc/001-2-32/mapflags.txt b/npc/001-2-32/mapflags.txt deleted file mode 100644 index 8225ecbe..00000000 --- a/npc/001-2-32/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-32 mapflag town diff --git a/npc/001-2-32/serena.txt b/npc/001-2-32/serena.txt deleted file mode 100644 index d7d18a41..00000000 --- a/npc/001-2-32/serena.txt +++ /dev/null @@ -1,215 +0,0 @@ -// The Mana World scripts. -// Author: -// Reid -// Jesusalva -// Description: -// Artis's Legion of Aemil officier of the fighting room. -// Note: -// ATL - Artis Training Legion - -001-2-32,27,27,0 script Serena NPC_SERENA,{ - mesn; - mesq l("Oh darling, what brought you here?"); // TRANSLATORS: Darling - Expresses familiarity or elderliness in relation to PC. - next; - select - l("I wanna fight."), - l("Nothing."); - mes ""; - if (@menu == 1) { - mes l("Just walk right and talk to me. I'll be there in no time."); - mesc l("Challenge time limit: 60 minutes after entering the room."); - } - close; - -OnInit: - .distance = 3; - end; -} - -001-2-35,26,27,0 script Serena#Ctrl NPC_SERENA,{ - function checkVictory; - - // We can't begin if we're already doing it - if (.atlf) { - // TODO: We should check if the timers are running - //doevent(instance_npcname(.name$)+"::OnVerify"); - if (getq(Artis_Legion_Progress) == 4) - npctalk l("You're already done with the training, so feel free to leave."); - else - npctalk l("Focus on the fight!"); - end; - } - - // Enemies of the Legion of Aemil cannot train, obviously - if (faction_standing("LEGION", true) < 1) { - mesn; - mesq l("Sorry, but I can only train you if Lieutenant Lozerk authorizes."); - close; - } - - // Otherwise, begin it - mesn; - mesq l("Are you ready for your training?"); - next; - if (askyesno() == ASK_NO) { - mesn; - mesq l("Oh dear, please come back later then."); - close; - } - @ATLFIGHT=true; - // FALL THROUGH - -OnBegin: - mapannounce getmap(), l("Training Arena, %s, get ready!", strcharinfo(0)), bc_all; - // Save permanent data - .atl_blv=BaseLevel; - .atl_Str=readbattleparam(getcharid(3), UDT_STR); - .atl_Agi=readbattleparam(getcharid(3), UDT_AGI); - .atl_Vit=readbattleparam(getcharid(3), UDT_VIT); - .atl_Int=readbattleparam(getcharid(3), UDT_INT); - .atl_Dex=readbattleparam(getcharid(3), UDT_DEX); - .atl_Luk=readbattleparam(getcharid(3), UDT_LUK); - .atl_Dly=readbattleparam(getcharid(3), UDT_ADELAY); - .atl_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); - - // Save (b)ase data - .atl_bhp=MaxHp; - .atl_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); - .atl_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); - .atl_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); - .atl_bDef=readbattleparam(getcharid(3), UDT_DEF); - .atl_bMdef=readbattleparam(getcharid(3), UDT_MDEF); - .atl_bHit=readbattleparam(getcharid(3), UDT_FLEE)*8/10; - .atl_bFlee=readbattleparam(getcharid(3), UDT_HIT)*7/10; - .atl_bCrit=readbattleparam(getcharid(3), UDT_CRIT); - - // Save (p)rogression data - .atl_php=.atl_bhp/6; - .atl_pAtk1=.atl_bAtk1/12; - .atl_pAtk2=.atl_bAtk2/12; - .atl_pMatk=.atl_bMatk/5; - .atl_pDef=.atl_bDef/5; - .atl_pMdef=.atl_bMdef/5; - .atl_pHit=.atl_bFlee/10; - .atl_pFlee=.atl_bHit/15; - .atl_pCrit=.atl_bCrit/10; - - // Begin the battle - doevent(instance_npcname(.name$)+"::OnGladius"); - addtimer(5000, instance_npcname(.name$)+"::OnVerify"); - closeclientdialog; - close; - -OnGladius: - sleep(800); - // TODO: Coordinates, Helpers? - .@mg=monster(instance_mapname("001-2-35"), any(25, 30, 35), any(29, 35, 40, 46), "Gladiator", any(LegionSwordswoman, LegionHalberdier, LegionLieutenant, LegionLieutenant), 1, instance_npcname(.name$)+"::OnGladius"); - - // Set "permanent" data - setunitdata(.@mg, UDT_ADELAY, .atl_Dly-.atlf); - setunitdata(.@mg, UDT_ATKRANGE, .atl_Rng+cap_value(.atlf/10, 0, 3)); - - // Set base data - setunitdata(.@mg, UDT_LEVEL, .atl_blv+.atlf); - setunitdata(.@mg, UDT_STR, .atl_Str+.atlf); - setunitdata(.@mg, UDT_AGI, .atl_Agi+.atlf); - setunitdata(.@mg, UDT_VIT, .atl_Vit+.atlf); - setunitdata(.@mg, UDT_INT, .atl_Int+.atlf); - setunitdata(.@mg, UDT_DEX, .atl_Dex+.atlf); - setunitdata(.@mg, UDT_LUK, .atl_Luk+.atlf); - - // Set variable data - setunitdata(.@mg, UDT_MAXHP, .atl_bhp+.atl_php*(.atlf-1)); - setunitdata(.@mg, UDT_HP, .atl_bhp+.atl_php*(.atlf-1)); - - setunitdata(.@mg, UDT_ATKMIN, .atl_bAtk1+.atl_pAtk1*(.atlf-1)); - setunitdata(.@mg, UDT_ATKMAX, .atl_bAtk2+.atl_pAtk2*(.atlf-1)); - setunitdata(.@mg, UDT_MATKMIN, .atl_bMatk+.atl_pMatk*(.atlf-1)); - setunitdata(.@mg, UDT_MATKMAX, .atl_bMatk+.atl_pMatk*(.atlf-1)); - setunitdata(.@mg, UDT_DEF, .atl_bDef+.atl_pDef*(.atlf-1)); - setunitdata(.@mg, UDT_MDEF, .atl_Mdef+.atl_pMdef*(.atlf-1)); - setunitdata(.@mg, UDT_HIT, .atl_bHit+.atl_pHit*(.atlf-1)); - setunitdata(.@mg, UDT_FLEE, .atl_bFlee+.atl_pFlee*(.atlf-1)); - setunitdata(.@mg, UDT_CRIT, .atl_bCrit+.atl_pCrit*(.atlf-1)); - - setunitdata(.@mg, UDT_PDODGE, min(30, .atl_Luk/10+(.atlf/3))); - - .atlf+=1; - mapannounce instance_mapname("001-2-35"), ("Training Arena, wave " + .atlf + "!"), bc_all; - maptimer(instance_mapname("001-2-35"), 10, instance_npcname(.name$)+"::OnATLUpdate"); - end; - -OnATLUpdate: - if (.atlf > ATLRANK) - ATLRANK=.atlf; - getexp .atlf*7, .atlf*5; // Provide some reward - end; - -// Check for possible cheats, and update default values -OnVerify: - if (!.atlf) - end; - - if (readbattleparam(getcharid(3), UDT_ATKRANGE) > .atl_Rng) - .atl_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); - - if (readbattleparam(getcharid(3), UDT_ATKMAX) > .atl_bAtk1) { - .atl_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); - .atl_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); - .atl_pAtk1=.atl_bAtk1/10; - .atl_pAtk2=.atl_bAtk2/10; - } - - if (readbattleparam(getcharid(3), UDT_DEF) > .atl_bDef) { - .atl_bDef=readbattleparam(getcharid(3), UDT_DEF); - .atl_pDef=.atl_bDef/5; - } - - if (readbattleparam(getcharid(3), UDT_MDEF) > .atl_bMdef) { - .atl_bMdef=readbattleparam(getcharid(3), UDT_MDEF); - .atl_pMdef=.atl_bMdef/5; - } - - if (readbattleparam(getcharid(3), UDT_MATKMAX) > .atl_bMatk) { - .atl_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); - .atl_pMatk=.atl_bMatk/5; - } - - // TODO: Ignore haste potion effects - // TODO: Update battle statuses on the fly - if (readbattleparam(getcharid(3), UDT_ADELAY) < .atl_bDly) - .atl_bDly=readbattleparam(getcharid(3), UDT_DELAY); - - // Victory conditions - if (getq(Artis_Legion_Progress) == 3) - checkVictory(); - - addtimer(5000, instance_npcname(.name$)+"::OnVerify"); - end; - - // Victory conditions - function checkVictory { - if (.atlf > 3) { - npctalk l("Congratulations, %s. I think this is enough. You can continue fighting to set a good score or report to Lozerk.", strcharinfo(0)); - // Duplicate the dialog in case player miss it - dispbottom l("Congratulations, %s. I think this is enough. You can continue fighting to set a good score or report to Lozerk.", strcharinfo(0)); - setq Artis_Legion_Progress, 4, 0; - } - return; - } - -} - -// Helper function for failure -function script ATLFightEnd { - if (@ATLFIGHT) { - @ATLFIGHT=false; - .@mapn$="atl2@"+getcharid(0); - killmonster(.@mapn$, "all", false); - .@q2=getq2(Artis_Legion_Progress); - set(getvariableofnpc(.atlf, instance_npcname("Serena#Ctrl", .@q2)), 0); - } - return; -} - - diff --git a/npc/001-2-33/_import.txt b/npc/001-2-33/_import.txt deleted file mode 100644 index 7dadf6f8..00000000 --- a/npc/001-2-33/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-33: Legion of Aemil Headquarters -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-33/_warps.txt", -"npc/001-2-33/lozerk.txt", -"npc/001-2-33/mapflags.txt", -"npc/001-2-33/triggers.txt", diff --git a/npc/001-2-33/_warps.txt b/npc/001-2-33/_warps.txt deleted file mode 100644 index 73adf059..00000000 --- a/npc/001-2-33/_warps.txt +++ /dev/null @@ -1,53 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-33: Legion of Aemil Headquarters warps -001-2-33,29,32,0 script #001-2-33_29_32_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-34", 29, 32; -close; - -OnUnTouch: - doevent "#001-2-33_29_32::OnUnTouch"; -} -001-2-33,29,32,0 script #001-2-33_29_32 NPC_ARTIS_IN_DOOR,1,2,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-2-33,39,32,0 script #001-2-33_39_32_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-32", 27, 32; -close; - -OnUnTouch: - doevent "#001-2-33_39_32::OnUnTouch"; -} -001-2-33,39,32,0 script #001-2-33_39_32 NPC_ARTIS_IN_DOOR,1,2,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - -001-2-33,45,30,0 warp #001-2-33_45_30 0,0,001-2-38,24,28 -001-2-33,23,30,0 warp #001-2-33_23_30 0,0,001-2-37,36,28 -001-2-33,25,40,0 warp #001-2-33_25_40 2,0,001-2-40,27,46 -001-2-33,43,40,0 warp #001-2-33_43_40 2,0,001-2-40,45,46 -001-2-33,34,46,0 warp #001-2-33_34_46 0,0,001-1,57,42 diff --git a/npc/001-2-33/lozerk.txt b/npc/001-2-33/lozerk.txt deleted file mode 100644 index 12a1614f..00000000 --- a/npc/001-2-33/lozerk.txt +++ /dev/null @@ -1,195 +0,0 @@ -// Evol scripts. -// Authors: -// monwarez -// Reid -// Tirifto -// Description: -// Sword trainer from the Legion of Aemil guild. -// Variables: -// Artis_Legion_Progress -// Values: -// 0 Default. -// 1 Sent to training. -// 2 Finished training. -// 3 Sent to battle. -// 4 Finished battle. -// 5 Sent to Q'Anon. - -001-2-33,34,33,0 script Lozerk NPC_DEMON_MALE_SWORD,{ - - // Quest-related functions - - function explain_direction { - - switch (getq(Artis_Legion_Progress)) - { - case 1: - setcamnpc "#001-2-33_29_32"; - - speech(S_LAST_NEXT | S_NO_NPC_NAME, - l("It's to the west, on your left side. Just go through this door before the stairs and turn left afterwards. Can't miss it!"), - l("Talk to Hector and he'll show you the ropes."), - l("Report back to me once you've had enough!")); - - restorecam; - - break; - case 3: - setcamnpc "#001-2-33_39_32"; - - speech(S_LAST_NEXT | S_NO_NPC_NAME, - l("The room is to the east, on your right side. Just go through the door before the stairs and then turn right. It's like the mirror image of our training room.")); - - restorecam; - break; - case 5: - setcamnpc "#001-2-33_45_28"; - - speech(S_LAST_NEXT | S_NO_NPC_NAME, - l("Walk up the stairs, go through the door on either side, and the only other door in the room, few steps to the south, will lead you right to him.")); - - restorecam; - break; - } - - return; - } - - function send_training { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, you were sent by Enora!"), - l("If Enora thinks this is the right place for you, then she's probably be right. Did you know she's a lieutenant of the Legion?"), - l("The rank of lieutenant is granted only to people with proper control of their skill and good judgment, like Enora. Or me, of course."), - l("By the way, I'm Lozerk. Lieutenant Lozerk."); - - select(l("Pleasure to meet you. I am @@.", strcharinfo(PC_NAME))); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, you are that person! You were stranded in the seas for a while, right? You look like it."), - l("But don't you worry! I don't know how to get you back your memories, but we can work on your muscles for now!"), - l("After all, this is the Legion of Aemil! You want to be a great warrior? We'll make you one here!"), - l("For starters, you should probably do some stretching and practice on some dummies in our training room."), - l("That's right, we have our very own training room. The Legion is always well prepared!"); - - setq Artis_Legion_Progress, 1; - explain_direction(); - - return; - } - - function send_battle { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("So, did you get your blood boiling? Give the dummies a good lesson? Good!"), - l("But since it's not dummies that will go after you out there, this training won't be enough."), - l("If you want to make a formidable foe for anyone, you'll need to train with real living opponents!"), - l("Of course, the Legion of Aemil can easily provide you with such training, even if you're not a member. Just great, isn't it?"), - l("We have a special room for this purpose, too. You may test your skills against all kinds of dreadful monsters in there."); - - setq Artis_Legion_Progress, 3; - explain_direction(); - - return; - } - - function send_qanon { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("And you won! That means you should be able to handle yourself in battle from now on."), - l("If you keep it up, you'll eventually become a fearsome warrior, just like me!"), - l("Or almost like me, at the very least."), - l("But if you really want to accomplish something, you should consider joining us."), - l("You have talent and the best place to utilize it is in the Legion! You can either pursue your goals with us or without us, but trust me, with us it's much better."), - l("I should know, I've not been a member for a while, too. But then I joined the Legion and look what a shining example of a great fighter I became!"), - l("You should definitely go talk to Q'Anon, our boss. You'll find him upstairs."); - - setq Artis_Legion_Progress, 5; - explain_direction(); - - return; - } - - // Normal functions - - function forget_direction { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You are lucky there are no mental faculty requirements to join the Legion!"); - - explain_direction; - - return; - } - - function tell_about_legion { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The Legion of Aemil is the greatest organization on all continent! A town cannot be safer than when it's under our protection."), - l("This is where the bravest of warriors come together to put their skills to a good use, for a good cause."), - l("Our building here is also the finest place in the town. Just go and see for yourself!"); - - return; - } - - function praise_sword { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thanks!"); - - return; - } - - // Conversation - - speech S_LAST_NEXT, - l("Welcome to the Legion of Aemil's building in Artis!"); - - // You're an enemy of the Legion - No dialog for you - if (faction_standing("LEGION", true) < 1) { - mesn; - mesq l("Please don't loiter around unless you have business with the Legion."); - close; - } - - - do - { - .@legion_progress = getq(Artis_Legion_Progress); - .@enora = getq(ArtisQuests_Enora); - consolemes(CONSOLEMES_DEBUG, .@legion_progress + " " + .@enora); - select - rif((.@legion_progress == 0) && (.@enora == 11), l("Enora sent me here.")), - rif(.@legion_progress == 2, l("I'm done with my training.")), - rif(.@legion_progress == 4, l("I'm back from battle!")), - rif(.@legion_progress == 1 || .@legion_progress == 3 || .@legion_progress == 5, l("Where should I go?")), - l("What can you tell me about the legion?"), - l("That's a nice sword you have there."), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - send_training; - break; - case 2: - send_battle; - break; - case 3: - send_qanon; - break; - case 4: - forget_direction; - break; - case 5: - tell_about_legion; - break; - case 6: - praise_sword; - break; - } - } while(@menu != 7); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-2-33/mapflags.txt b/npc/001-2-33/mapflags.txt deleted file mode 100644 index 4882b03e..00000000 --- a/npc/001-2-33/mapflags.txt +++ /dev/null @@ -1,3 +0,0 @@ -001-2-33 mapflag mask 13 -001-2-33 mapflag nosave 001-2-33,34,42 -001-2-33 mapflag town diff --git a/npc/001-2-33/triggers.txt b/npc/001-2-33/triggers.txt deleted file mode 100644 index e540869c..00000000 --- a/npc/001-2-33/triggers.txt +++ /dev/null @@ -1,102 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Artis Aemil's Legion triggers to add and remove masks. - -// Transition Top triggers -001-2-33,26,35,0 script #001-2-33LeftRemTop NPC_HIDDEN,0,2,{ -OnTouch: - artisALResetMask; - close; -} - -001-2-33,27,35,0 script #001-2-33LeftAddTop NPC_HIDDEN,0,2,{ -OnTouch: - artisALTopMask; - close; -} - -001-2-33,42,35,0 script #001-2-33RightRemTop NPC_HIDDEN,0,2,{ -OnTouch: - artisALResetMask; - close; -} - -001-2-33,41,35,0 script #001-2-33RightAddTop NPC_HIDDEN,0,2,{ -OnTouch: - artisALTopMask; - close; -} - -// Transition Bottom triggers - -001-2-33,25,32,0 script #001-2-33LeftRemBot NPC_HIDDEN,1,0,{ -OnTouch: - artisALResetMask; - close; -} - -001-2-33,25,31,0 script #001-2-33LeftAddBot NPC_HIDDEN,1,0,{ -OnTouch: - artisALBottomMask; - close; -} - -001-2-33,43,32,0 script #001-2-33RightRemBot NPC_HIDDEN,1,0,{ -OnTouch: - artisALResetMask; - close; -} - -001-2-33,43,31,0 script #001-2-33RightAddBot NPC_HIDDEN,1,0,{ -OnTouch: - artisALBottomMask; - close; -} - -// Warped location triggers - -001-2-33,24,30,0 script #001-2-33WarpTopLeft NPC_HIDDEN,0,0,{ -OnTouch: - artisALBottomMask; - close; -} - -001-2-33,44,30,0 script #001-2-33WarpTopRight NPC_HIDDEN,0,0,{ -OnTouch: - artisALBottomMask; - close; -} - -// WarpMid is crazy and not working correctly, cause unknown. -001-2-33,29,34,0 script #001-2-33WarpMidLeft NPC_HIDDEN,1,1,{ -OnTouch: - artisALTopMask; - close; -} - -001-2-33,39,34,0 script #001-2-33WarpMidRight NPC_HIDDEN,1,1,{ -OnTouch: - artisALTopMask; - close; -} - -001-2-33,34,45,0 script #001-2-33WarpArtis NPC_HIDDEN,2,3,{ -OnTouch: - artisALTopMask; - close; -} - -// Bottom Warp location triggers -001-2-33,43,39,0 script #001-2-33WarpBotLeft NPC_HIDDEN,1,0,{ -OnTouch: - artisALResetMask; - close; -} - -001-2-33,25,39,0 script #001-2-33WarpBotRight NPC_HIDDEN,1,0,{ -OnTouch: - artisALResetMask; - close; -} diff --git a/npc/001-2-34/_import.txt b/npc/001-2-34/_import.txt deleted file mode 100644 index 9ec74d40..00000000 --- a/npc/001-2-34/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-34: Training Room Lobby -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-34/_warps.txt", -"npc/001-2-34/doors.txt", -"npc/001-2-34/mapflags.txt", -"npc/001-2-34/samantha.txt", diff --git a/npc/001-2-34/_warps.txt b/npc/001-2-34/_warps.txt deleted file mode 100644 index 06f74a95..00000000 --- a/npc/001-2-34/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-34: Training Room Lobby warps -001-2-34,29,33,0 warp #001-2-34_29_33 0,0,001-2-33,29,33 diff --git a/npc/001-2-34/doors.txt b/npc/001-2-34/doors.txt deleted file mode 100644 index 6161dfa4..00000000 --- a/npc/001-2-34/doors.txt +++ /dev/null @@ -1,29 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Omatt -// Toams -// Jesus -// Description: -// Doors NPCs. - -001-2-34,23,29,0 script ToTrainingRoom#001-2-34 NPC_HIDDEN,0,0,{ -OnTouch: - - .@q2=getq2(ArtisQuests_TrainingLegion); - // Map name limit: 4 chars (atl1) - .@mapn$="atl1@"+getcharid(0); - if (isinstance(.@q2) && .@q2 > 0) { - warp .@mapn$, 36, 30; - } else { - .@inst = instance_create("Training Room "+getcharid(0), getcharid(3), IOT_CHAR); - instance_attachmap("001-2-36", .@inst, false, .@mapn$); - // 30 minutes (1800s) inside, or 5 minutes (300s) outside - instance_set_timeout(1800, 300, .@inst); - instance_init(.@inst); - setq2 ArtisQuests_TrainingLegion, .@inst; - warp .@mapn$, 36, 30; - } - - end; -} diff --git a/npc/001-2-34/mapflags.txt b/npc/001-2-34/mapflags.txt deleted file mode 100644 index b632f6fe..00000000 --- a/npc/001-2-34/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-34 mapflag town diff --git a/npc/001-2-34/samantha.txt b/npc/001-2-34/samantha.txt deleted file mode 100644 index b69e87ed..00000000 --- a/npc/001-2-34/samantha.txt +++ /dev/null @@ -1,54 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Artis's Legion of Aemil officier of the training room. -// Twin sister of Serena. - -001-2-34,29,27,0 script Samantha NPC_SAMANTHA,{ - mesn; - mesq l("Look who we have here, did you come for a training session?"); - close; - - // - // [ PC]: I was just looking around. - // [NPC]: Did not someone offer guidance? - // [NPC]: Enora was supposed to be helping you... - // [NPC]: ...but, she is young, and often absent-minded; did you ask? - // [NPC]: (Alt.) It seems you rushed ahead of her. Go back and talk to Enora. - // ([Enora]: Beyond here is the fighting room o_o;) - // ([Enora]: I... uh... well, you will need alies in there.) - // ([Enora]: And... you see... this is my good outfit and...) - // ([Enora]: ...I've only just cleaned up in there >.>) - // But if you keep getting stronger; that will be the day. - - // Alt-Ready: - // [NPC]: Beyond here is the Fight Room. - // [NPC]: [conditions]* - // [NPC]: Good-luck | Bonne-chance. - - // (Alt.) [NPC]: I used to be an adventurer, like you. - // [NPC]: But there was no one to join for quests. - // [NPC]: So I enlisted for a post at this chapter. - // [NPC]: But my "friends" joined the Brotherhood! - - // [NPC]: The Brotherhood knows a lot more about monsters. - // [NPC]: But they could not "break the Legion's power" without burning all cities to the ground. - // [NPC]: The cities grow fast, ruining farmers and peasants. - // [NPC]: Our differences lead to friction. - - // Alt-What - // The secret is out: We really did create a mutant. - // None of the members were informed until it went out-of-control. - // [...] - // Muahaha-ha! My beautiful mutant. The city of Artis is mine. - // - - // Alt-Siege - // The city is being attacked. Go help the warriors and town-guard. - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-2-35/_import.txt b/npc/001-2-35/_import.txt deleted file mode 100644 index fa2c779b..00000000 --- a/npc/001-2-35/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-35: Training Arena -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-35/doors.txt", -"npc/001-2-35/mapflags.txt", diff --git a/npc/001-2-35/doors.txt b/npc/001-2-35/doors.txt deleted file mode 100644 index 64fcb30f..00000000 --- a/npc/001-2-35/doors.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Jesusalva -// Description: -// Doors NPCs. - -001-2-35,23,29,0 script #001-2-35_23_29 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - if (getq(Artis_Legion_Progress) < 4) { - dispbottom l("I am not a coward. I shall not give up!"); - end; - } - ATLFightEnd(); - warp "001-2-32", 32, 29; - end; -} - diff --git a/npc/001-2-35/mapflags.txt b/npc/001-2-35/mapflags.txt deleted file mode 100644 index 47166d55..00000000 --- a/npc/001-2-35/mapflags.txt +++ /dev/null @@ -1,2 +0,0 @@ -001-2-35 mapflag town -001-2-35 mapflag nowarpto diff --git a/npc/001-2-36/_import.txt b/npc/001-2-36/_import.txt deleted file mode 100644 index 403b0b12..00000000 --- a/npc/001-2-36/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-36: Training Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-36/_warps.txt", -"npc/001-2-36/hector.txt", -"npc/001-2-36/mapflags.txt", diff --git a/npc/001-2-36/_warps.txt b/npc/001-2-36/_warps.txt deleted file mode 100644 index bcb74de9..00000000 --- a/npc/001-2-36/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-36: Training Room warps -001-2-36,37,30,0 warp #001-2-36_37_30 0,0,001-2-34,24,29 diff --git a/npc/001-2-36/hector.txt b/npc/001-2-36/hector.txt deleted file mode 100644 index b4f801be..00000000 --- a/npc/001-2-36/hector.txt +++ /dev/null @@ -1,460 +0,0 @@ -// TrainingRoom -// Author: -// jak1 -// omatt -// toams -// Story: -// Reid -// Teru -// Spellchecking & Dialogs: -// Reid -// toams -// Variable: -// .fightingActive -// 0 = no fight active -// 1 = swordfight active -// 2 = bowfight active -// 3 = skillfight -// ArtisQuests_TrainingLegion -// 0 not started at all -// 1 swordTraining finished -// 2 bowTraining finished -// 3 bow and sword finished -// 4 end of training -// .mobID is related to quest state -// -// TODO adding rand messages like "try hit it harder..." for wave's -// TODO in first, second, and third training, input some tips about related weapon given. - - -001-2-36,32,36,0 script Hector#001-2-36 NPC_LUCAS,{ - - - 'instanceID = instance_id(); - 'npcName$ = strnpcinfo(NPC_NAME_UNIQUE); // required for call the label in the npc of this one instance - attachnpctimer; - initnpctimer; - - function waveEnded { - - if (.fightingActive == 1) - { - npctalk3(l("Well done, you aren't even bleeding that much!")); - if (getq(.quest_training) == 0) - setq(.quest_training, 1); - if (getq(.quest_training) == 2) - setq(.quest_training, 3); - } - if (.fightingActive == 2) - { - npctalk3(l("Great! Don't mind those scorched hairs, they will grow back.")); - if (getq(.quest_training) == 0) - setq(.quest_training, 2); - if (getq(.quest_training) == 1) - setq(.quest_training, 3); - } - if (.fightingActive == 3) - { - if (getq(.quest_training) == 3) - { - npctalk3(l("Congratulations, you have finished your training.")); - sleep2(2000); - npctalk3(l("The only way to improve yourself is practice, practice and some more practice.")); - setq(.quest_training, 4); - setq(Artis_Legion_Progress, 2); - } - else - { - npctalk3(l("You finished training the bashing skill. Pretty powerful isn't it?")); - } - } - - .currentWaveLevel = 1; - .fightingActive = 0; - 'mobDead = 0; - end; - } - - function mobSpawn { - - if (.fightingActive != 0) - { - if (.currentWaveLevel == .maxWaves) - { - npctalk3(l("Last Wave!")); - } - else - { - npctalk3(l("Wave " + .currentWaveLevel + "!")); - } - - areamonster('map$, .mobCoordinate[0], .mobCoordinate[1], .mobCoordinate[2], .mobCoordinate[3], - /* map x1 y1 x2 y2 */ - strmobinfo(1, .mobID[.fightingActive]), .mobID[.fightingActive], .currentWaveLevel, 'npcName$+"::OnTrainingMobDead"); - /* mob display mob id amount label */ - } - - end; - } - - function trainingEnd { - - sleep2(1500); - npctalk3(l("This training is over!")); - .fightingActive = 0; - .currentWaveLevel = 1; - killmonster('map$, "All"); - stopnpctimer(); - end; - } - - function checkWeapon { - // check for sword in swordtraining - if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) != W_1HSWORD && .fightingActive == 1) - { - npctalk3(l("Hey! Use your sword!")); - trainingEnd; - } - - // check for bow in bowtraining - if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) != W_BOW && .fightingActive == 2) - { - npctalk3(l("Hey! Use your bow!")); - trainingEnd; - } - - // no weapons may be equiped when training skill - if (getequipid(EQI_HAND_R) != -1 && .fightingActive == 3) - { - npctalk3(l("Hey! No weapons allowed this round!")); - trainingEnd; - } - - } - - - function mobKilled { - - 'mobDead = 0; // reset the count - - checkWeapon; // check if correct weapon is in use - - // on first skill training give SM_BASH skill and explain how to use it. - if (getq(.quest_training) == 3 && .currentWaveLevel == 1) - { - setcamnpc(strnpcinfo(NPC_NAME_UNIQUE)); // focus the npc when he talk to the player - speech(S_LAST_NEXT, - l("Using a skill consumes Mana."), - l("It takes a while to have full Mana again."), - l("The more intelligence points you have, the faster it goes."), - l("If you sit, you regain your Mana faster."), - l("Or you can drink a mana potion. This restores some Mana. How much depends on the potion."), - l("Here take one! I have plenty of them.")); - closedialog; - getitem(.mana_potion, 1); - sleep2(3000); - } - - if (.currentWaveLevel == .maxWaves ) - { - waveEnded; - } - - - .currentWaveLevel++; // next wave after killed dummy - - mobSpawn; - } - - function swordTraining { - speech(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("You chose the sword for this training, make sure to equip it or we can't start.")); - - speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("I will place some dummies in the fighting arena. @@ waves of dummies, kill them to finish this training.", .maxWaves), - l("Ready?")); - - askyesno; - if (@menu == ASK_NO) - { - closedialog; - end; - } - - closedialog; - .fightingActive = 1; - initnpctimer; - } - - function bowTraining { - speech(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("You chose the bow for this training, make sure to equip it or we can't start.")); - - speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("I've set these dummies on fire. Don't get too close to the dummies or the fire will hurt you."), - l("The range of your bow makes it possible to kill them from a distance."), - l("Ready?")); - - askyesno; - if (@menu == ASK_NO) - { - closedialog; - end; - } - - .fightingActive = 2; - initnpctimer; - } - - function skillTraining { - - if (getq(.quest_training) == 3) - { - //Give bashing skill - skill(.skill_name, 1, 0); - - speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("Lets teach you the bashing skill. This is a very powerful way to hit your enemy by using only your bare hands."), - l("To use the skill you have to open your skills menu. Here you select the offensive tab and select the bash skill. When the bash skill is selected, press the use button the use the skill.")); - } - - speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("You can only use this skill with bare hands, so make sure to unequip your weapons."), - l("@@ waves of dummies, you know how that ends.", .maxWaves), - l("Ready?")); - - askyesno; - if (@menu == ASK_NO) - { - closedialog; - end; - } - - .fightingActive = 3; - initnpctimer; - } - - function checkCombatZone { - - getmapxy('map$, @x, @y, 0); - if (@x < 24 || @x > 32 || @y < 33 || @y > 43) - return 1; - return 0; - } - - // choose training and start it - function trainingStart { - - if (checkCombatZone()) - { - npctalk3(l("Please enter the combat zone on the left.")); - closedialog; - end; - } - if (.fightingActive == 0) - { - switch (getq(.quest_training)) - { - case 0: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("Which weapon do you want to train? Bow or sword?")); - - switch (select(l("I'll start with the sword."), - l("I would like to train the bow first."), - l("I don't feel like training today, see you later."))) - { - case 1: swordTraining; break; - case 2: bowTraining; break; - case 3: closedialog; end; - } - break; - case 1: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("You have finished the sword training. Do you want to start training the bow?")); - - switch (select(l("Yes, I'm ready for some arrow shooting!"), - l("Can I train the sword some more?"), - l("I don't feel like training today, see you later."))) - { - case 1: bowTraining; break; - case 2: swordTraining; break; - case 3: closedialog; end; - } - break; - case 2: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("You have finished the bow training. Do you want to start training the sword?")); - - switch (select(l("Yes, teach me how to cut and slice these dummies!"), - l("Can I train the bow some more?"), - l("I don't feel like training today, see you later."))) - { - case 1: swordTraining; break; - case 2: bowTraining; break; - case 3: closedialog; end; - } - break; - case 3: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("You have mastered both the bow and the sword. The only thing left to teach you is the bashing skill.")); - - switch (select(l("A skill? That sounds useful!"), - l("Can I train the sword some more?"), - l("I would rather like to train the bow again."), - l("I don't feel like training today, see you later."))) - { - case 1: skillTraining; break; - case 2: swordTraining; break; - case 3: bowTraining; break; - case 4: closedialog; end; - } - break; - case 4: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, - l("Sure, which training do you want to start?")); - - switch (select(l("Skill training please"), - l("Can I train the sword some more?"), - l("I would like to train the bow again."), - l("I've changed my mind, see you later."))) - { - case 1: skillTraining; break; - case 2: swordTraining; break; - case 3: bowTraining; break; - case 4: closedialog; end; - } - break; - } - closedialog; - - npctalk3(l("Let's begin")); - - mobSpawn; - } - } - - function mainLoop { - - // if fighting is active say encouraging words to the player - if (.fightingActive != 0) - { - switch (.fightingActive) - { - case 1: npctalk3(l("Attack with your sword and kill them!")); end; - case 2: npctalk3(l("Use your bow and kill them!")); end; - case 3: npctalk3(l("Hey lazy bum! Attack the dummies")); end; - default: break; - } - } - - // only start if player talked with Lozerk and is not an enemy - if (getq(Artis_Legion_Progress) < 1 || faction_standing("LEGION", true) < 1) - { - speech(S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("This is the training ground. And I ain't training nobody unless Lieutenant Lozerk tells me to!"), - l("So please get out!")); - closedialog; - end; - } - else - { - switch (getq(.quest_training)) - { - case 0: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT, - l(.mockingGreeting$[rand(getarraysize(.mockingGreeting$))]), - l("Do you want some training? To be honest, it looks like you could use some...")); - break; - case 4: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Your training is finished, I taught you all I know."), - l("So now go and explore the world!")); - switch (select( - l("Can I first have an other look at your book?"), - l("Before doing that can I improve my fighting skills some more?"), - l("Okay!"))) - { - case 1: doevent("#EvolTutorial::OnRemoteHelp");; break; - case 2: trainingStart; break; - case 3: closedialog; end; - } - closedialog; - end; - default: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Hello again, ready to continue your lessons?")); break; - } - - do - { - selectd( - l("Yes, train me!"), - l("Hmm... But what is exactly this training?"), - l("I'm a bit lost in this game, can you first give me few tips?"), - l("Not right now, it looks like I got other stuff to do.")); - - switch (@menu) - { - case 1: trainingStart; break; - case 2: - // here text who explain what is the training of this npc - speech(S_FIRST_BLANK_LINE | S_LAST_NEXT | S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("In this training, my goal is to teach you how to be a skilled warrior, who can use a sword, a bow and a skill."), - l("For this, you need a sword and a bow."), - l("After you gathered your weapons, I will teach you how to use them.")); - break; - case 3: - speech(S_FIRST_BLANK_LINE | S_LAST_NEXT | S_LAST_BLANK_LINE | S_NO_NPC_NAME, - l("I have a book with all the info you need, do you want to read it?")); - askyesno; - if (@menu == ASK_YES) - { - doevent("#EvolTutorial::OnRemoteHelp"); - closedialog; - end; - } - break; - case 4: closedialog; end; - - default: closedialog; end; - } - } while (1); - } - } - - mainLoop; - closedialog; - end; - -OnTimer1000: - if (.fightingActive != 0) - { - if (checkCombatZone()) - { - npctalk3(l("You left the combat zone!")); - trainingEnd; - } - checkWeapon; - initnpctimer; - } - end; - -OnTrainingMobDead: - // the amount of mob spawned depend on currentwave - if (++'mobDead == .currentWaveLevel) - { - mobKilled; - } - end; - -OnInit: - .mana_potion = LargeMana; - .skill_name = SM_BASH; - .quest_training = ArtisQuests_TrainingLegion; - .quest_debug = .quest_training; - .maxWaves = 3; - - .currentWaveLevel = 1; - .fightingActive = 0; - - // TODO FIXME translation - // here input some sentences "hello noob" like, the npc pick randomly a sentence - setarray .mockingGreeting$[0], "Hey noob!", "Hey somethingwholooklikeawarrior...", "Sup' chibi."; - setarray .mobID[0],0, Dummy, FireDummy, Dummy; // an array of dummies, one for each training - setarray .mobCoordinate[0], 24, 34, 31, 41; // this represent the square of "ring" training - - end; - -} diff --git a/npc/001-2-36/mapflags.txt b/npc/001-2-36/mapflags.txt deleted file mode 100644 index 457bc70e..00000000 --- a/npc/001-2-36/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-36 mapflag town diff --git a/npc/001-2-37/_import.txt b/npc/001-2-37/_import.txt deleted file mode 100644 index 03162e19..00000000 --- a/npc/001-2-37/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-37: Legion West Wing -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-37/_savepoints.txt", -"npc/001-2-37/_warps.txt", -"npc/001-2-37/hammock.txt", -"npc/001-2-37/mapflags.txt", diff --git a/npc/001-2-37/_savepoints.txt b/npc/001-2-37/_savepoints.txt deleted file mode 100644 index 30d7a797..00000000 --- a/npc/001-2-37/_savepoints.txt +++ /dev/null @@ -1,54 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-37: Legion West Wing saves -001-2-37,25,41,0 script #save_001-2-37_25_41 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-37,35,41,0 script #save_001-2-37_35_41 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-37,35,46,0 script #save_001-2-37_35_46 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-37,25,46,0 script #save_001-2-37_25_46 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-37/_warps.txt b/npc/001-2-37/_warps.txt deleted file mode 100644 index dabc5285..00000000 --- a/npc/001-2-37/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-37: Legion West Wing warps -001-2-37,37,28,0 warp #001-2-37_37_28 0,0,001-2-33,24,30 -001-2-37,37,33,0 warp #001-2-37_37_33 0,0,001-2-39,24,33 diff --git a/npc/001-2-37/hammock.txt b/npc/001-2-37/hammock.txt deleted file mode 100644 index c749217a..00000000 --- a/npc/001-2-37/hammock.txt +++ /dev/null @@ -1,106 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the top left level of the Legion of Aemil -// building of Artis. - -001-2-37,26,26,0 script #001-2-37hammock0 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-37,25,28,0 script #001-2-37hammock1 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-37,25,30,0 script #001-2-37hammock2 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-37,25,32,0 script #001-2-37hammock3 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-37,29,26,0 script #001-2-37hammock4 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-37,29,28,0 script #001-2-37hammock5 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-37,29,30,0 script #001-2-37hammock6 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-37,29,32,0 script #001-2-37hammock7 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-37,25,34,0 script #001-2-37hammock8 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-37,26,36,0 script #001-2-37hammock9 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} diff --git a/npc/001-2-37/mapflags.txt b/npc/001-2-37/mapflags.txt deleted file mode 100644 index c4f939b4..00000000 --- a/npc/001-2-37/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-37 mapflag town diff --git a/npc/001-2-38/_import.txt b/npc/001-2-38/_import.txt deleted file mode 100644 index 63d2a402..00000000 --- a/npc/001-2-38/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-38: Legion East Wing -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-38/_savepoints.txt", -"npc/001-2-38/_warps.txt", -"npc/001-2-38/hammock.txt", -"npc/001-2-38/mapflags.txt", diff --git a/npc/001-2-38/_savepoints.txt b/npc/001-2-38/_savepoints.txt deleted file mode 100644 index 59be0f59..00000000 --- a/npc/001-2-38/_savepoints.txt +++ /dev/null @@ -1,54 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-38: Legion East Wing saves -001-2-38,25,41,0 script #save_001-2-38_25_41 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-38,35,41,0 script #save_001-2-38_35_41 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-38,35,46,0 script #save_001-2-38_35_46 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -001-2-38,25,46,0 script #save_001-2-38_25_46 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/001-2-38/_warps.txt b/npc/001-2-38/_warps.txt deleted file mode 100644 index 53e119b5..00000000 --- a/npc/001-2-38/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-38: Legion East Wing warps -001-2-38,23,28,0 warp #001-2-38_23_28 0,0,001-2-33,44,30 -001-2-38,23,33,0 warp #001-2-38_23_33 0,0,001-2-39,44,33 diff --git a/npc/001-2-38/hammock.txt b/npc/001-2-38/hammock.txt deleted file mode 100644 index 2c8938da..00000000 --- a/npc/001-2-38/hammock.txt +++ /dev/null @@ -1,106 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Animated hammock at the top right level of the Legion of Aemil -// building of Artis. - -001-2-38,31,26,0 script #001-2-38hammock0 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-38,31,28,0 script #001-2-38hammock1 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-38,31,30,0 script #001-2-38hammock2 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-38,31,32,0 script #001-2-38hammoc3 NPC_LEFT_HAMMOCK,1,0,{ - -OnTouch: hamTouchLeft; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerLeft; -} - -001-2-38,34,26,0 script #001-2-38hammock4 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-38,35,28,0 script #001-2-38hammock5 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-38,35,30,0 script #001-2-38hammock6 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-38,35,32,0 script #001-2-38hammock7 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-38,35,34,0 script #001-2-38hammock8 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} - -001-2-38,34,36,0 script #001-2-38hammock9 NPC_RIGHT_HAMMOCK,1,0,{ - -OnTouch: hamTouchRight; - -OnUnTouch: hamUnTouch; - -OnTimer5440: - hamTimerRight; -} diff --git a/npc/001-2-38/mapflags.txt b/npc/001-2-38/mapflags.txt deleted file mode 100644 index 8a5c5d4e..00000000 --- a/npc/001-2-38/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-38 mapflag town diff --git a/npc/001-2-39/_import.txt b/npc/001-2-39/_import.txt deleted file mode 100644 index f3a2043a..00000000 --- a/npc/001-2-39/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-39: Legion Command Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-39/_warps.txt", -"npc/001-2-39/mapflags.txt", -"npc/001-2-39/qanon.txt", diff --git a/npc/001-2-39/_warps.txt b/npc/001-2-39/_warps.txt deleted file mode 100644 index 1a25cfd3..00000000 --- a/npc/001-2-39/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-39: Legion Command Room warps -001-2-39,45,33,0 warp #001-2-39_45_33 0,0,001-2-38,24,33 -001-2-39,23,33,0 warp #001-2-39_23_33 0,0,001-2-37,36,33 diff --git a/npc/001-2-39/mapflags.txt b/npc/001-2-39/mapflags.txt deleted file mode 100644 index 5d688785..00000000 --- a/npc/001-2-39/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-39 mapflag town diff --git a/npc/001-2-39/qanon.txt b/npc/001-2-39/qanon.txt deleted file mode 100644 index e0c8d26b..00000000 --- a/npc/001-2-39/qanon.txt +++ /dev/null @@ -1,131 +0,0 @@ -// Evol scripts. -// Authors: -// Alige -// Reid -// Jesusalva -// Description: -// Artis's Legion of Aemil leader. -// Variables: -// Artis_Legion_Progress -// Values: -// 5 Sent by Lozerk. -// 6 Train forever (Cannot resume legion, must see brotherhood first) -// Technically, Q'Anon wants to see if player will recover his memory. -// After all, player memories might have something important. -// 7 Arrived at Hurnscald (This means we can resume legion) - -001-2-39,34,41,0 script Q'Anon NPC_Q_ANON,{ - function legionState; - function legionState2; - function notaMember; - .@q=getq(Artis_Legion_Progress); - mesn; - mesq l("It's been a while."); - next; - if (.@q < 5) - notaMember(); - - // Faction report - mesc l("Your current standing with the Legion: %s", faction_standing("LEGION", false)); - if (LEGION_RANK) - mesc l("You are a Legion's %s", legionrank()); - - // Main Menu - select - rif(.@q == 5, l("Lozerk told me to talk to you and join the legion.")), - rif(.@q == 6, l("Have I grown enough reputation to join?")), - l("Thanks, sir Q'Anon."); - mes ""; - switch (@menu) - { - case 1: - legionState(); - break; - case 2: - legionState2(); - break; - case 3: - mesn; - mesq l("Make me proud!"); - break; - } - close; - -function notaMember { - mesn; - mesq col(l("*ahem*"), 9) + " " + l("Heh, did you saw me at the port? No?"); - next; - mesn; - mesq l("This is how good we Legion Members are. I was informed of your arrival way before you left Drasil Island."); - next; - mesn; - mesq l("I usually would not care, but it is not every day a complete stranger arrives at Artis."); - next; - mesn; - mesq l("You're welcome to stay here as long as you wish. Just don't do anything stupid, like a riot, for example."); - close; - return; -} - -function legionState { - mesn; - mesq l("Oh? And do you think you have what it takes to be a proud Legion Member?"); - next; - mesn; - mesq l("Listen, kid. Being a legion member is not a joke."); - next; - mesn; - mesq l("Hmm, why don't you go train a little more? We have several training rooms here."); - next; - mesn; - mesq l("Yes, I am authorizing you to use them as you deem fit, until you get stronger."); - next; - mesn; - mesq l("Also, build a reputation with the Legion. Talk to everyone. Help everyone. Prove me your worth!"); - next; - mesn; - mesq l("Only after you prove yourself, you may join our ranks as a proud member! Hahah!"); - setq Artis_Legion_Progress, 6; - // So, we probably should use Clan System for the major guilds. - // I guess major guilds are: Legion, Brotherhood - // minor guilds: Merchants, Thieves and Mages. - - // It would be the commands below: - // join_clan(FACTION_LEGION); - // clan_leave(); - return; -} - -function legionState2 { - if (faction_standing("LEGION", true) >= 1) { - mesn; - mesq l("Actually. I am thinking in sending you in a... special mission."); - next; - mesn; - mesq l("You probably noticed a frigate docked near La Johanne when you arrived?"); - next; - mesn; - mesq l("We've found... the old continent, from where our race came from long ago."); - next; - mesn; - mesq l("It seems to have fallen in barbarian hands since the Fleet of Ancea, and that, is not something we can allow."); - next; - mesn; - mesc l("%s gives you a piece of paper, which you put on a different pocket."); - mesq l("Go to the ship, show the captain this letter if asked. After reaching, look for Captain Hal. He'll give you further instructions."); - next; - mesn; - mesq l("Make me proud!"); - setq Artis_Legion_Progress, 7; - } else { - mesn; - mesq l("Hmm... No, not yet. Try helping other legion members around."); - } - return; -} - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/001-2-4/_import.txt b/npc/001-2-4/_import.txt deleted file mode 100644 index 70c629cc..00000000 --- a/npc/001-2-4/_import.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Map 001-2-4: Library -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-4/_warps.txt", -"npc/001-2-4/books.txt", -"npc/001-2-4/mapflags.txt", -"npc/001-2-4/robin.txt", -"npc/001-2-4/terry.txt", diff --git a/npc/001-2-4/_warps.txt b/npc/001-2-4/_warps.txt deleted file mode 100644 index 73e39877..00000000 --- a/npc/001-2-4/_warps.txt +++ /dev/null @@ -1,27 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-4: Library warps -001-2-4,48,41,0 warp #001-2-4_48_41 0,0,001-1,51,81 -001-2-4,57,27,0 warp #001-2-4_57_27 3,0,001-2-6,57,36 -001-2-4,52,27,0 script #001-2-4_52_27_h NPC_HIDDEN,0,0,{ -OnTouch: - warp "001-2-5", 28, 37; -close; - -OnUnTouch: - doevent "#001-2-4_52_27::OnUnTouch"; -} -001-2-4,52,27,0 script #001-2-4_52_27 NPC_ARTIS_IN_DOOR,3,3,{ - close; -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - doorInit; -} - diff --git a/npc/001-2-4/books.txt b/npc/001-2-4/books.txt deleted file mode 100644 index 96f9ae5e..00000000 --- a/npc/001-2-4/books.txt +++ /dev/null @@ -1,102 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Tirifto -// Description: -// moar books - -001-2-4,28,29,0 script #001-2-4-Book1 NPC_NO_SPRITE,{ - - doevent "@rules::OnShelfUse"; - close; - -OnInit: - .distance = 1; -} - -// FIXME: we need a no-sprite npc that is offset 1 tile north -001-2-4,47,28,0 script #001-2-4-Book2 NPC_NO_SPRITE,{ - - function read_book { - - setnpcdialogtitle l(.book_name$); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("To get started with fishing, you'll need two things: a fishing rod and a bait."), - l("You just need one fishing rod, although you should take more than one single bait."); - - @menu = 0; // reset for the rif - - do - { - narrator S_NO_NPC_NAME, - l("Please select a chapter:"); - - mes ""; - - select - rif(@menu == 1, "► ") + l("Ch 1 — Fishing apparatus"), - rif(@menu == 2, "► ") + l("Ch 2 — Baits"), - rif(@menu == 3, "► ") + l("Ch 3 — Location"), - rif(@menu == 4, "► ") + l("Ch 4 — Casting"), - rif(@menu == 5, "► ") + l("Ch 5 — Reeling"); - - switch(@menu) - { - case 1: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You'll want your fishing rod to be flexible but solid."), - l("Comfortable grip is important especially for newcomers, since they'll be holding it for quite a while."); - break; - case 2: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can use many diverse items to lure fishes."), - l("Some people prefer to catch fish using magic, but calling that \"fishing\" would be an insult to this traditional sport."), - l("Most common and widely popular in the fish realm are @@ and pieces of @@.", - getitemlink(SmallTentacles), getitemlink(Bread)), - l("Some types of fish also enjoy @@ quite a bit.", - getitemlink(Aquada)), - l("Some people, however, prefer to fish with more unorthodox baits, such as @@ or @@.", - getitemlink(UrchinMeat), getitemlink(TortugaTongue)); - break; - case 3: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Find yourself a nice dry spot on a coast where you can easily reach into deep water."), - l("Fishing next to shallow water is not going to work well, because fishes seldom go there."), - l("You can easily identify fishing spots, small bubbles and fishes are visible from the surface."), - l("Don't forget to come as close as possible to these spots!"); - break; - case 4: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Toss the hook into deep water by clicking on where you want to cast it."), - l("Make sure to put on a bait after you click, though!"), - l("After that, stay still and be patient, but also alert!"); - break; - case 5: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("To successfully catch a fish, you need to pull up your hook by clicking it, right after it submerges."), - l("Should you be too quick or wait too long, you will most likely fail."); - break; - } - } while (true); - - end; - } - -OnShelfUse: - if (openbookshelf()) - read_book; - closeclientdialog(); - close; - -OnUse: - if (openbook()) - read_book; - closeclientdialog(); - close; - -OnInit: - .book_name$ = getitemname(FishingGuideVolI); - .distance = 1; - end; -} diff --git a/npc/001-2-4/mapflags.txt b/npc/001-2-4/mapflags.txt deleted file mode 100644 index 1a66f670..00000000 --- a/npc/001-2-4/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-4 mapflag town diff --git a/npc/001-2-4/robin.txt b/npc/001-2-4/robin.txt deleted file mode 100644 index 6b4cf24f..00000000 --- a/npc/001-2-4/robin.txt +++ /dev/null @@ -1,64 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Librarian - -001-2-4,27,33,0 script Robin NPC_ROBIN,{ - - function need_help - { - speech S_LAST_NEXT, - l("Do you need help with something?"); - - switch (select(l("What kinds of books are there here?"), - l("Nothing."))) - { - case 1: - closeclientdialog; - npctalk3 l("Mostly manuals and tutorials but you won't find out until you open one!"); - break; - case 2: - closeclientdialog; - npctalk3 l("Good day to you!"); - } - return; - } - - - switch (rand(6)) - { - case 0: - npctalkonce l("No matter what people tell you, words and ideas can change the world."); - break; - case 1: - npctalkonce l("In Artis they really do mythologize people when they die."); - break; - case 2: - npctalkonce l("What counts in a book is like so many things, not what is on the outside, but what is on the inside."); - break; - case 3: - npctalkonce l("An explorer left behind some incomplete manuscripts about the people and dangers in the land of Kaizei."); - break; - case 4: - speech S_LAST_NEXT, - l("Ow-oh!"), - l("Introduce yourself instead of poking me around. I almost fell from the lader, savage..."); - - setcamnpc "#001-2-4-Book1"; - - speech S_NO_NPC_NAME, - l("Go have a look at that shelf to my right, would you?"), - l("You clearly need to be more public-spirited."); - break; - default: - need_help; - break; - } - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-4/terry.txt b/npc/001-2-4/terry.txt deleted file mode 100644 index ec13c53e..00000000 --- a/npc/001-2-4/terry.txt +++ /dev/null @@ -1,15 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Librarian - -001-2-4,51,35,2 script Terry NPC_TERRY,{ - mesn; - mesq l("Hi."); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-40/_import.txt b/npc/001-2-40/_import.txt deleted file mode 100644 index c8363c34..00000000 --- a/npc/001-2-40/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-40: Legion Basement -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-40/_warps.txt", -"npc/001-2-40/mapflags.txt", -"npc/001-2-40/trozz.txt", diff --git a/npc/001-2-40/_warps.txt b/npc/001-2-40/_warps.txt deleted file mode 100644 index 6a2994d5..00000000 --- a/npc/001-2-40/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-40: Legion Basement warps -001-2-40,45,44,0 warp #001-2-40_45_44 2,0,001-2-33,43,39 -001-2-40,27,44,0 warp #001-2-40_27_44 2,0,001-2-33,25,39 -001-2-40,56,41,0 warp #001-2-40_56_41 0,0,001-3-0,56,44 diff --git a/npc/001-2-40/mapflags.txt b/npc/001-2-40/mapflags.txt deleted file mode 100644 index 0c9303e8..00000000 --- a/npc/001-2-40/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-40 mapflag town diff --git a/npc/001-2-40/trozz.txt b/npc/001-2-40/trozz.txt deleted file mode 100644 index b96166d3..00000000 --- a/npc/001-2-40/trozz.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Chief of the Legion of Aemil of the city of Artis. - -001-2-40,36,46,0 script Trozz#001-2-40 NPC_HUMAN_MALE_CHIEF_ARTIS_LEGION,{ - function Bureaucracy; - function Dueling; - mesn; - mesq l("Hi. I am Trozz, and I am the chief of legion training in Artis."); - next; - mesn; - mesq l("If you want to challenge someone for a friendly match, you are at the right place."); - next; - do - { - select - l("That's everything, thanks."), - l("I'm looking to have some paperwork fixed."), - l("How can I challenge someone for a match?"); - mes ""; - switch (@menu) { - case 1: - goodbye(); - break; - case 2: - Bureaucracy(); - break; - case 3: - Dueling(); - break; - } - } while (@menu != 1); - close; - -function Bureaucracy { - mesn; - mesq l("If you need to deal with more bureaucratic stuff, go talk to Q'Anon. He is the boss here."); - next; - mesn; - mesq l("You can find him upstairs. Go left, then go right, and you'll find him."); - next; - return; -} - -function Dueling { - mesn; - mesq l("First, you need to use %s to enter in duel mode.", b("@duel")); - next; - mesn; - mesq l("Then, to challenge a player, you'll use \"%s \".", b("@invite")); - next; - mesn; - mesq l("If you were invited to the duel instead, you can use %s or %s.", b("@accept"), b("@reject")); - next; - mesn; - mesq l("You can exit duel mode with %s. You'll also leave it by death.", b("@leave")); - next; - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/001-2-41/_import.txt b/npc/001-2-41/_import.txt deleted file mode 100644 index 1584e4d6..00000000 --- a/npc/001-2-41/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-41: Barber -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-41/_warps.txt", -"npc/001-2-41/edouard.txt", -"npc/001-2-41/mapflags.txt", diff --git a/npc/001-2-41/_warps.txt b/npc/001-2-41/_warps.txt deleted file mode 100644 index 76251c2a..00000000 --- a/npc/001-2-41/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-41: Barber warps -001-2-41,24,32,0 warp #001-2-41_24_32 0,0,001-2-31,35,32 diff --git a/npc/001-2-41/edouard.txt b/npc/001-2-41/edouard.txt deleted file mode 100644 index 275896e3..00000000 --- a/npc/001-2-41/edouard.txt +++ /dev/null @@ -1,175 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Barber of Aemil - -function script EdouardCheckChair { - - getmapxy(.@map$, .@x, .@y, UNITTYPE_PC); - - if ((.@map$ != getarg(0)) || (.@x != getarg(1)) || (.@y != getarg(2))) - { - doevent "Edouard::OnWrongPlace"; - } - else if (!issit()) - { - doevent "Edouard::OnNotSit"; - } - else - { - doevent "Edouard::OnChair"; - } - - close; -} - -001-2-41,29,24,0 script Chair#Chair1-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,31,24,0 script Chair#Chair2-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,35,27,0 script Chair#Chair3-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,35,29,0 script Chair#Chair4-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,35,35,0 script Chair#Chair5-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,35,37,0 script Chair#Chair6-001-2-41 NPC_NO_SPRITE,{ - - EdouardCheckChair .map$, .x, .y; - -OnInit: - .distance = 1; - end; -} - -001-2-41,30,29,0 script Edouard NPC_EDOUARD,{ - function tellStory; - //EdouardCheckChair(); - if (!issit()) - goto OnWrongPlace; - // Disregard if you're in the chair or not, for sake of gameplay - goto OnChair; - -function tellStory { - if (Edouard_StoryTold != 0) - { - mes ""; - mesn; - } - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("I am new in this town, just like you."), - l("I came here, looking for a better life."), - l("And so far, the Merchant Guild helped me find this appartment so I can't complain!"), - l("Anyway."), - l("I'm a barber, you see. I can change your hairstyle or hair color to your current taste."); - - Edouard_StoryTold = 1; - - return; -} - -OnWrongPlace: - npctalkonce("Sit on the chair, I will come in a second!"); - close; - -OnNotSit: - npctalkonce("Please sit."); - close; - -OnChair: - speech S_LAST_NEXT, - l("Welcome to Edouard's Barber Shop."); - - if (Edouard_StoryTold == 0) - { - tellStory; - } - - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("What would you like me to do?"); - - do - { - select - l("What is my current hairstyle and hair color?"), - l("I'd like to get a different style."), - l("Can you do something with my color?"), - l("How about changing my body type?"), - l("What's your story again?"), - l("I'm fine for now, thank you."); - - switch (@menu) - { - case 1: - BarberSayStyle(); - break; - case 2: - BarberChangeStyle; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Enjoy your new style."), - l("Anything else?"); - break; - case 3: - BarberChangeColor; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I hope you like this color."), - l("Anything else?"); - break; - case 4: - BarberChangeBodyType(); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You look fantastic."), - l("Anything else?"); - break; - case 5: - tellStory; - break; - case 6: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Feel free to come visit me another time."); - - goodbye; - } - } while (1); - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-41/mapflags.txt b/npc/001-2-41/mapflags.txt deleted file mode 100644 index eb1b712b..00000000 --- a/npc/001-2-41/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-41 mapflag town diff --git a/npc/001-2-42/_import.txt b/npc/001-2-42/_import.txt deleted file mode 100644 index 1afffd48..00000000 --- a/npc/001-2-42/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 001-2-42: Docks Warehouse Second Level -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-42/_warps.txt", diff --git a/npc/001-2-42/_warps.txt b/npc/001-2-42/_warps.txt deleted file mode 100644 index d8b06045..00000000 --- a/npc/001-2-42/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-42: Docks Warehouse Second Level warps -001-2-42,39,37,0 warp #001-2-42_39_37 2,0,001-2-18,39,28 diff --git a/npc/001-2-43/_import.txt b/npc/001-2-43/_import.txt deleted file mode 100644 index ed7173e0..00000000 --- a/npc/001-2-43/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-43: Archive -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-43/_warps.txt", -"npc/001-2-43/core.txt", -"npc/001-2-43/mapflags.txt", diff --git a/npc/001-2-43/_warps.txt b/npc/001-2-43/_warps.txt deleted file mode 100644 index 2a53a67d..00000000 --- a/npc/001-2-43/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-43: Archive warps -001-2-43,51,35,0 warp #001-2-43_51_35 2,0,001-3-0,90,62 diff --git a/npc/001-2-43/core.txt b/npc/001-2-43/core.txt deleted file mode 100644 index f30e3828..00000000 --- a/npc/001-2-43/core.txt +++ /dev/null @@ -1,147 +0,0 @@ -// Evol scripts. -// Author: -// Micksha, Jesusalva -// Description: -// Core of Henry's Quest - -001-2-43,25,24,0 script #ArtisThiefBook_1 NPC_NO_SPRITE,{ - .@q=getq(ThiefQuests_Artis); - .@q3=getq3(ThiefQuests_Artis); - - // Add a forced delay to prevent abuse - if (.@q != 1) end; - getmapxy(.@m$, @x, @y, 0); // Save in @x/@y - dispbottom l("Sec, lemme look this."); - addtimer 1000, .name$+"::OnRead"; - end; - -OnRead: - // Prepare the Quest Variables - .@q=getq(ThiefQuests_Artis); - .@q3=getq3(ThiefQuests_Artis); - - // You must not have moved - getmapxy(.@m$, .@x, .@y, 0); - if (.@x != @x || .@y != @y || .@q != 1) { - dispbottom l("I'm so busy, I can look there later."); - end; - } - - // Clear temporary variables - @x=@y=0; - - // Extract the quest ID from name (or fail trying) - explode(.@ni$, .name$, "_"); - .@id=atoi(.@ni$[1]); - - // Check if the file was here - if (.@q3 == .@id) { - // TODO: Dialog: How will you deal with the file? - // .@t$=faction_addrep("Legion", 50) - // .@t$=faction_addrep("Thief", 50) - // mesc .@t$; - mes l("This is it - Henry's files!"); - mes l("I need to decide swiftly what I'll do with them before I'm caught."); - mesc l("This decision will be remembered."), 1; - next; - select - l("Hide the file below the pots"), - l("[Legion+] [Thieves-] Highlight the file"), - l("[Legion-] [Thieves+] Destroy the file"); - mes ""; - switch (@menu) { - case 2: - .@t$=faction_addrep("Legion", 50); - mesc .@t$; - .@t$=faction_addrep("Thief", -50); - mesc .@t$; - next; - break; - case 3: - .@t$=faction_addrep("Legion", -50); - mesc .@t$; - .@t$=faction_addrep("Thief", 50); - mesc .@t$; - next; - break; - } - dispbottom l("You notice by chance that the file does not have any picture on it."); - setq ThiefQuests_Artis, 2, 0, 0; - closeclientdialog; - } else { - dispbottom l("Not here, lets look elsewhere!"); - } - end; - -OnInit: - .distance=1; - end; -} - -// Duplicate the town files -001-2-43,24,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2 NPC_NO_SPRITE -001-2-43,25,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4 NPC_NO_SPRITE -001-2-43,29,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8 NPC_NO_SPRITE -001-2-43,34,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16 NPC_NO_SPRITE -001-2-43,38,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32 NPC_NO_SPRITE -001-2-43,44,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_64 NPC_NO_SPRITE -001-2-43,48,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_128 NPC_NO_SPRITE -001-2-43,48,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_256 NPC_NO_SPRITE -001-2-43,43,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_512 NPC_NO_SPRITE -001-2-43,38,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_1024 NPC_NO_SPRITE -001-2-43,33,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2048 NPC_NO_SPRITE -001-2-43,53,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4096 NPC_NO_SPRITE -001-2-43,44,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8192 NPC_NO_SPRITE -001-2-43,29,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16384 NPC_NO_SPRITE -001-2-43,39,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32768 NPC_NO_SPRITE -001-2-43,49,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_65536 NPC_NO_SPRITE -// Fail-safe; Henry's record should not be here -001-2-43,34,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_131072 NPC_NO_SPRITE -//001-2-43,29,31,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_131072 NPC_NO_SPRITE -//001-2-43,24,26,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_262144 NPC_NO_SPRITE - - -// Logical Handler -001-2-43,0,0,0 script #ArtisThiefBook_0 NPC_HIDDEN,{ - end; -OnBust1: - if (getmap() != .map$) - end; - dispbottom col(l("90 seconds remaining."), 1); - addtimer 30000, "#ArtisThiefBook_0::OnBust2"; - end; - -OnBust2: - if (getmap() != .map$) - end; - dispbottom col(l("60 seconds remaining."), 1); - addtimer 30000, "#ArtisThiefBook_0::OnBust3"; - end; - -OnBust3: - if (getmap() != .map$) - end; - dispbottom col(l("30 seconds remaining."), 1); - addtimer 30000, "#ArtisThiefBook_0::OnBust4"; - end; - -OnBust4: - if (getmap() == .map$) { - // Warp you elsewhere before actually arresting - // Otherwise, you would return at Archives without this timer =/ - warp "001-1", 90, 55; - sleep2(10); - - // Check if you'll be caught - if (ArrestedChances()) { - mesc l("Arrested!"); - mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); - ArrestPlayer(5); - } else { - mesc l("You're almost found out, but manage to make a quick escape!"); - warp "001-1", 90, 55; - } - } - close; -} - diff --git a/npc/001-2-43/mapflags.txt b/npc/001-2-43/mapflags.txt deleted file mode 100644 index d32035bb..00000000 --- a/npc/001-2-43/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-43 mapflag nosave 001-1,89,67 diff --git a/npc/001-2-5/_import.txt b/npc/001-2-5/_import.txt deleted file mode 100644 index 58c8fbb9..00000000 --- a/npc/001-2-5/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-2-5: Warehouse -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-5/_warps.txt", -"npc/001-2-5/books.txt", -"npc/001-2-5/mapflags.txt", -"npc/001-2-5/tutorial.txt", diff --git a/npc/001-2-5/_warps.txt b/npc/001-2-5/_warps.txt deleted file mode 100644 index 7d543143..00000000 --- a/npc/001-2-5/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-5: Warehouse warps -001-2-5,28,38,0 warp #001-2-5_28_38 0,0,001-2-4,52,29 diff --git a/npc/001-2-5/books.txt b/npc/001-2-5/books.txt deleted file mode 100644 index fc5e3abe..00000000 --- a/npc/001-2-5/books.txt +++ /dev/null @@ -1,33 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Gasaron - -001-2-5,30,32,0 script #001-2-5-Book1 NPC_NO_SPRITE,{ - - function read_book { - narrator S_FIRST_BLANK_LINE, - l("There are two kinds of dialogue, the ones with regular citizens, and the ones with other adventurers."), - l("When you go near villagers, you can see a speech bubble above them, you can then talk to them by pressing the [T] key."), - l("You can select a specific person with the [N] key, and then, press the [T] key when you are surrounded by more than one person."), - l("You can also simply talk to any citizen around you by clicking on them."), - l("Nevertheless, you can talk with another adventurer by pressing the [Enter] key and then type what you want to say!"), - l("If you want to say something to a specific player, you can type \"/query Playername\" or \"/whisper Playername message\", this will create a new tab on your chat window."); - } - -OnShelfUse: - if (openbookshelf()) - read_book; - close; - -OnUse: - if (openbook()) - read_book; - close; - -OnInit: - .book_name$ = "Communication Theory"; - .distance = 1; - end; -} diff --git a/npc/001-2-5/mapflags.txt b/npc/001-2-5/mapflags.txt deleted file mode 100644 index 973aa862..00000000 --- a/npc/001-2-5/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-5 mapflag town diff --git a/npc/001-2-5/tutorial.txt b/npc/001-2-5/tutorial.txt deleted file mode 100644 index 75835957..00000000 --- a/npc/001-2-5/tutorial.txt +++ /dev/null @@ -1,266 +0,0 @@ -// Evol/TMW2ML/TMWBR scripts. -// Authors: -// Ernando -// Lunovox -// Jesusalva -// Toams -// Objective: Complete Tutorial about Evol/Hercules mechanics -// License: GPL v3 - -001-2-5,34,32,0 script #EvolTutorial NPC_NO_SPRITE,{ - - function read_book { - - setnpcdialogtitle l(.book_name$); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("This book contains the knowledge collected by ukars about how the world works."); - - @menu = 0; // reset for the rif - - do - { - narrator S_NO_NPC_NAME, - l("Please select a chapter:"); - - mes ""; - - select - rif(@menu == 1, "► ") + l("Ch 1 — How to make money."), - rif(@menu == 2, "► ") + l("Ch 2 — Everything about monsters."), - rif(@menu == 3, "► ") + l("Ch 3 — Quests."), - rif(@menu == 4, "► ") + l("Ch 4 — Status."), - rif(@menu == 5, "► ") + l("Ch 5 — NPC's."), - rif(@menu == 6, "► ") + l("Ch 6 — Magic."), - rif(@menu == 7, "► ") + l("Ch 7 — Rules."), - rif(@menu == 8, "► ") + l("Ch 8 — Weather & Seasons."), - rif(@menu == 9, "► ") + l("Ch 9 — Experience."), - rif(@menu == 10, "► ") + l("Ch 10 — How I see my items?"), - rif(@menu == 11, "► ") + l("Ch 11 — How trade with other players?"), - rif(@menu == 12, "► ") + l("Ch 12 — How hunt monsters?"), - rif(@menu == 13, "► ") + l("Ch 13 — How talk with someone?"), - rif(@menu == 14, "► ") + l("Ch 14 — Change your appearing."), - rif(@menu == 15, "► ") + l("Ch 15 — Commands."), - rif(@menu == 16, "► ") + l("Ch 16 — Shortcuts."); - - switch (@menu) { - case 1: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Merchants like to buy body parts of killed monsters and animals because they can make items and equipment."), - l("Some others also like to buy them to keep as trophies. Either way, you can make some money with that."), - l("You must find someone willing to buy, they usually will buy almost anything you have, even items which cannot be replaced, so be careful."), - l("You must \"add\" the items you plan on selling, and then press \"sell\" to confirm. You'll have this time to review."), - l("Some, but not all, from the rare or non-replaceable items will have a warning when you try to sell them."), - l("You can also make money %s. Nobody pays better than people in need of help.", b(l("by doing quests"))); - break; - case 2: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Monsters are everywhere. They're a plague we're trying to get rid of."), - l("There are three types of monsters: the aggressive, the neutral, and the collaborative."), - l("Aggressors always know when they are in danger! Therefore, they are always on standby, attacking anyone who appears ahead."), - l("Neutral monsters do not have such a sense of danger."), - l("They will not attack anyone unless they are attacked first."), - l("Normally, collaborative monsters behave like neutral monsters. Unless someone of the same species is in danger, at which point they all take an aggressive stance against the aggressor."), - l("It's always good to see if you have a lot of them around before you think about attacking one!"), - l("Also, most monsters get enraged and will attack whoever is closest to them, regardless of anything else."), - l("Not all monsters will do this, but most will. So if you see a monster running after a player and you stand in the way..."), - l("...It'll most likely attack you, instead."), - l("One last thing to keep in mind... If you are surrounded, you'll suffer an agility and defense penalty."), - l("But if you and other players surrounds the monster instead, they'll suffer the same penalties!"), - l("Any boss which was previously unhittable, can be hit with appropriate number of attackers."); - break; - case 3: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("There are people in the world who need help!"), - l("Most of these people will not think twice before giving a nice reward to anyone who helps them."), - l("So be nice and help people along the way!"), - l("Usually, they'll have an exclamation mark over their heads. But some quests are hidden, so talk to people and have fun!"); - break; - case 4: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("People vary greatly in the amount of strength, agility, dexterity, intelligence, vitality and luck."), - l("%s helps you carry more items and also gives you a more forceful blow, but ends up not being very interesting if you focus on weapons that use projectiles, such as the bow.", b(l("Strength"))), - l("Greater %s allows you to attack faster and has a greater chance of evading attacks.", b(l("agility"))), - l("Your %s determines your ability to hit monsters and is valuable to players who prefer weapons that use projectiles.", b(l("dexterity"))), - l("%s determines how many blows you can take before you die. It also affects status effects, like poison.", b(l("Vitality"))), - l("%s is very useful for alchemy and magic, but nowadays there are few opportunities to use it.", b(l("Intelligence"))), - l("Your %s determines several small things, including critical attacks, but DOES NOT affect drop rates.", b(l("luck"))), - l("A critical hit deals added damage and disregards defense. A critical always hit, although it can be blocked just fine."), - l("On a side note, more defense is always good, but the damage won't decrease on the same rate that defense raises."), - l("Also note that if you are in overweight, your natural regen will halt. 90% in weight, and you won't be able to attack."), - l("I recommend that you train your agility a great deal, since most monsters out there aren't really amazing at hitting you."), - l("For now do not take too much time to work on your intelligence, after all, magic use is very restricted nowadays."), - l("You can allocate point on those attributes every time you level up."),l("There's also a job level, which produces green sparkles when you level it."), - l("Job Level and certain equips can affect your status. You'll see the modifiers with a + sign."), - l("Do note that Job Level gives you skill points, and the status bonuses are really minor."); - break; - case 5: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("NPC's or non-playable characters are characters that are always in the game, offering a wide variety of reactions, from a simple friendly conversation to a desperate request for help."), - l("%s People usually doesn't shout, they talk. Because this, if you are too far, an NPC won't hear you.",b(l("IMPORTANT:"))), - l("When this is the case, you should get closer to the NPC, until they hear you."), l("If you are above the NPC and they still doesn't hear you, this mean they are deaf - you should report this!"); - break; - case 6: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Magic was banned for lore reasons? Seriously, after the mana war, only small tricks are allowed."), - l("It was heard about some adventurers whom obtained and use advanced magic, but that is still seen with bad eyes."); - break; - case 7: - mes ""; - callfunc "GameRules"; - break; - case 8: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - /* - // TODO: Implement Day/Night Cycle - mes l("First of, there's a day/night cycle on the game."); - if (is_night()) - mes l("It's currently night, that's why Candor is dark."); - else - mes l("It's currently day, but when night falls, Candor will become darker."); - next; - mes l("During night, the monsters usually respawn faster. That can be a problem with aggressive monsters."); - mes l("I also hear fisherman likes to fish at night. They say the catch is bigger, if you understand me."); - next; - */ - /* - // TODO: Implement Weather Cycle - mes l("There's also weather, meaning it can rain, snow, or even happen a sandstorm. They are usually cosmetic, but..."); - mes l("...who knows if there isn't a secret in that?"); - next; - */ - /* - // TODO: Implement Season Cycle - mes l("Besides this, there is Seasons. You know, summer, autumn, winter and spring."); - mes l("Each season unlocks a set of quests and drops which can only be obtained on the season."); - next; - mes l("Think on Season Quests as a yearly quest which you have three months to do."); - mes l("We follow north hemisphere seasons in case you're wondering."); - next; - */ - // We commented everything so we need something here - l("There is no day/night, weather, or season cycle in TMW yet."); - break; - case 9: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Experience can be gained by completing quests and killing monsters. When you accumulate enough experience, you'll level up!"), - l("Each level up will buff your base stats, and give you stats points to allocate."), - l("There's also a job level, which produces green sparkles when you level it."), - l("Job Level and certain equips can affect your status. You'll see the modifiers with a + sign."); - /* - // TODO: Evol doesn't have experience per mob level adjustment yet, nor have @monsterinfo for all players - mes l("Also, you'll get more experience by killing monsters stronger than you, and less experience by killing monsters weaker than you."); - mes l("You can find out the monster strength by using \"@monsterinfo \". Check the level in it!"); - next; - */ - break; - case 10: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can see all your equipment by pressing the F3 key."), - l("To equip or unequip an item, select it and press the 'Equip' or 'Unequip' button. You can not 'Equip' or 'Unequip' when talking to someone."), - l("Dress up! Do not walk without clothes! Always wear your items! They leave you less vulnerable to attacks and stronger to defeat your opponents."), - /* - // TODO: Evol doesn't have equipment set bonuses yet - mes b(l("Remember that some equipment sets will give you hidden stat bonuses! So dress yourself in a fashion way, if possible!")); - next; - */ - l("To discard an item you no longer want, select it and press the 'Discard' button. Generic items can be discarded or sold."), - l("Some special items cannot be traded, discarded, nor sold. With a right click, you can also protect normal items as if they were special ones."), - l("There are three types of items."), - l("Those for consumption, equipment and generics."), - l("Items for consumption, like potions, can only be used once."), - l("Once used, they will disappear from your inventory."), - l("Equippable items are armour, weapons and accessories."), - l("They can be equipped to make your look more interesting or to improve some of its features."), - l("Generic items are used for different purposes. In creating other items, to swap and sell, to collect, etc."); - break; - case 11: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Press the '###keyTrade;' key to ignore or accept business proposals. You and the other citizen who want to negotiate need to be in the configuration that accepts negotiations. if your configuration is 'Ignoring business proposals', then you will not receive the warning from any citizen wanting to negotiate with you, and you will not be able to initiate negotiations."), - l("To negotiate with other citizens, you should click the second mouse button on some other citizen who is accepting negotiations, and select the 'Negotiation' option from the menu that will appear."), - l("After you have confirmed the negotiation, a window with a vertical split will appear. The left side are the items you intend to offer in trading. The right side are the items that the other citizen intends to offer in trading."), - l("Open your inventory window (###keyWindowInventory; key) next to the trading window. Select an item you want to offer, and then press the Add button. To add money to the negotiation, enter the amount you will offer and press the Change button."), - l("When you have added all the items and money you want, press the 'Propose Trade' button. The other citizen must also press the 'Propose Trade' button."), - l("If the proposal is not convenient for you, just close the trading window to cancel the exchange of items and money. But if both press the 'Accept Negotiation' button, then the marketing will be finished."), - l("Remember! You're trading things, not lending/borrowing them. You are solely responsible for everything you own."); - break; - case 12: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Note down. To hunt a target you must click the primary mouse button on it. Avoid fighting monsters or citizens much stronger than you. %s", b(l("You will lose experience if you are defeated."))), - l("Within the cities is a place safe enough not to be attacked by another person (except during wars). But outside of them there are some places where the citizen can be attacked by enemies from other realms, or even by someone from the same realm."), - l("There are some stones scattered around the world that mark your point of return in case of defeats. Some ship chests may also serve as a return point. You can also select some beds in case of defeats."), - l("Almost all creatures drop useful items when defeated. To get the dropped item press the '###keyPickup;' key next to the item or click the primary button on the item."), - l("To focus on a creature, press the '###keyTargetMonster;' key. To focus on another citizen, press the '###keyTargetPlayer;' key. To attack the focused target press the '###keyAttack;' key or click the primary button on the creature."), - l("To focus on an NPC, press the '###keyTargetNPC;' key. To talk to him press the '###keyTalk;' key."), - l("To defocus or stop attacking, press Shift + A."), - l("You can, however, use '###keyTargetAttack;' to auto-select a monster and attack them. This usually also collects drops, but press '###keyPickup;' to be sure."); - break; - case 13: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("To display the dialog box with other citizens, press the '###keyWindowChat;' key."), - l("To speak in public select the 'General' tab. It serves to talk to people who are appearing on your screen."), - l("To speak privately with someone, click the second mouse button on the citizen and select the 'Whisper' option."), - l("In order to enter a message press the '###keyChat;' key, this will display the white box of typing. Type your message there and press '###keyChat;' again to send your speech."), - l("To speak privately to a friend who is not appearing on your screen, type the command '%s' and press '###keyChat;'. This command will open a long-distance dialog that has the name of who you want to talk to. Select this new tab and send your message through it.",b(l("/q [Player Name] "))), - l("And by last, to speak to everyone online, besides whoever might be idling on IRC, select the '#irc' tab."), - l("But be careful: do not scream by using a lot of capital letters, do not repeat yourself over and over, and above all DO NOT SPAM, or you may be severely penalized."); - break; - case 14: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("NPC stylists will cut your hair!"), - l("They are known to use a revolutionary hair growth formula."), - l("You will be amased by all the colors of hair dye they have."); - break; - case 15: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can execute commands by typing them in the chat window. They start with a '/' or '@' followed by the name of the command."), - l("%s clears the text box.", b("/clear")), - l("%s %s allows you to send a private message to the player. if [name] contains spaces, it must be enclosed in quotation marks.", b("/whisper"),l("[name]")), - l("%s displays amount of currently connected players.", b("/who")), - l("%s shows the number of people in the neighbourhood.", b("/present")), - l("%s shows the name of the map you are in.", b("/where")), - l("%s explains how to use all client commands.", b("/help")), - l("%s lists even more advanced commands, but some of them can only be used by admins or GM's.", b("@commands")), - l("%s will help when the client starts lagging. If you see an attack but no monsters, that's the cause.", b("@resync")), - l("%s allows you to change game language, anytime, anywhere.", b("@lang")), - l("%s will tell you all the rules once again.", b("@rules")), - //mes l("@toevent will warp you to event island, if an event is happening, of course."); - //mes l("@discord allows you to setup Discord integration settings."); - //mes l("@ucp allows you to manage your account, eg. recover lost email."); - //next; - //mes l("@resyncall is the more powerful version of @resync. It'll reload everything, even the clouds if needed."); - l("%s and %s will show this informative and absurdely big tutorial book." ,b("@info"),b("@tutorial")); - break; - case 16: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("There are many key combinations, press F1 to see a short list of them!"); - break; - } - - } while (true); - end; - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnRemoteHelp: - read_book(); - close; - -OnInit: - .book_name$ = "Hitchiker's Guide To The Mana World"; - - bindatcmd "info", "#EvolTutorial::OnUse", 0, 0, 0; - bindatcmd "tutorial", "#EvolTutorial::OnUse", 0, 0, 0; - - .distance = 1; - end; -} diff --git a/npc/001-2-6/_import.txt b/npc/001-2-6/_import.txt deleted file mode 100644 index cc06496d..00000000 --- a/npc/001-2-6/_import.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Map 001-2-6: First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-6/_warps.txt", -"npc/001-2-6/books.txt", -"npc/001-2-6/christopher.txt", -"npc/001-2-6/dolfina.txt", -"npc/001-2-6/leonard.txt", -"npc/001-2-6/mapflags.txt", diff --git a/npc/001-2-6/_warps.txt b/npc/001-2-6/_warps.txt deleted file mode 100644 index e778bf33..00000000 --- a/npc/001-2-6/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-6: First Floor warps -001-2-6,57,38,0 warp #001-2-6_57_38 3,0,001-2-4,57,28 diff --git a/npc/001-2-6/books.txt b/npc/001-2-6/books.txt deleted file mode 100644 index 8e6f4997..00000000 --- a/npc/001-2-6/books.txt +++ /dev/null @@ -1,345 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Jesusalva -// Reid -// WildX -// Description: -// Aemil books - -001-2-6,39,41,0 script #001-2-6-Book1 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("Master Piou sat on a tree,"), - l("Holding a cheese in his beak."), - l("Master Fluffy was attracted by the odour,"), - l("And tried to attract him thus."), - - l("\"Mister Piou, good day to you."), - l("You are a handsome and good looking bird!"), - l("In truth, if your song is as beautiful as your plumage,"), - l("You are the Phoenix of this forest.\""), - - l("Hearing these words the Piou felt great joy,"), - l("And to demonstrate his beautiful voice,"), - l("He opened his mouth wide and let drop his prey."), - l("The Fluffy seized it and said:"), - - l("\"My good Sir,"), - l("Know that every flatterer,"), - l("Lives at the expense of those who take him seriously:"), - l("This is a lesson that is worth a cheese no doubt.\""), - - l("The Piou, embarrassed and confused,"), - l("Swore, though somewhat later, that he would never be "), - l("tricked thus again."), - - "-- " + l("Aesop")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "The Piou and The Fluffy"; - .distance = 1; - end; -} - -001-2-6,48,41,0 script #001-2-6-Book2 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("Poem is making the words dance"), - l("Words become music and glance"), - l("Over lovers under a starry night"), - l("Whose eyes listen under Moonlight"), - - l("No matter the grammar"), - l("If words beat in rhythm"), - l("Find an order with them"), - l("As on anvil strikes the hammer"), - - l("No matter the spelling"), - l("Just say something sparkling"), - l("If not, how could CrazyKatiektch"), - l("Say her love to glamourous Gliktch?"), - - l("True be or not true be"), - l("That's not the question"), - l("And rhyming is not too"), - l("If you don't like to"), - l("Share your mind is your mission"), - l("Whatever inside can be"), - - l("Don't be shy, you are nice"), - l("From your mind, break the ice"), - l("Whatever your idea"), - l("It's the good one and, ahem!"), - l("That makes everybody"), - l("Able to write a poem"), - - "-- " + l("Nard")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "Poem about Poems"; - .distance = 1; - end; -} - -001-2-6,43,39,0 script #001-2-6-Book3 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("Hush now and hear the chorus of the woods"), - l("Bent trees whistling with the beat of the drum"), - l("With no choir master nor voice to be sung"), - l("The music of the trees floats through the breeze"), - l("Sleep well my angel but don't follow along"), - l("Because the voices of death sing a sweet song"), - - "-- " + l("Princess Slayer")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "Chorus of the Woods"; - .distance = 1; - end; -} - -001-2-6,54,28,0 script #001-2-6-Book4 NPC_NO_SPRITE,{ - - function read_book { - narrator(S_FIRST_BLANK_LINE, - l("Aemil was once a magnificent land unknown to us all."), - l("Before the end of the Mana War, a band of adventurers formed in the Ancean region of Argaes from those who had lost their homes and families."), - l("They sailed from Hurnscald to Tulimshar and then Nivalis, the last permanent settlements of talpans."), - l("There, they gathered merchants and warriors to join them in a journey to find a new land on which to live."), - l("The group found the support of Tulimshar's merchant lords and was given ships to sail east."), - l("They sailed past the Clear Sea and towards the Long Ocean which nobody had explored before."), - l("The newly created Fleet of Ancea travelled so far that they were never heard from again."), - l("Their leaders then came to the conclusion that an alliance was the only way they could survive."), - l("They eventually found a new land after much hardship and named it Aurora, after its beautiful sunrise."), - l("A great city, eventually to become larger than the cities of Ancea, rose on the coast of Aemil. This city was named Esperia."), - l("However..."), - l("The end of the story got erased, probably because of the sea water. Some pages are still missing. Thus much is lost to time, including the author's name.")); - } - -OnUse: - if (openoldbook()) - read_book(); - close; - -OnInit: - .distance = 1; - end; -} - -001-2-6,57,41,0 script #001-2-6-Book5 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("So you have now a pet, who is loyal to you. It'll follow you everywhere, but there are two things you must know."), - l("Do not let intimacy and hunger get to zero. If any of those get to zero, it'll leave you forever."), - l("Pious must keep a strict diet composed of Piberries."), - l("However, you should only give food when it's hungry, otherwise it'll believe you're a bad owner and intimacy will decrease."), - l("To perform most actions, like feeding and renaming, just right-click it. You can even put it back on the egg if its following gets too annoying."), - l("Give your pet a nice name, and keep it healthy, and you'll be a successful pet owner!"), - l("When you intimacy is high, it'll increase your stats and who knows, might even help you in combat!"), - l("...And if you're still trying to check your pet stats, just hover it with your mouse. Thanks."), - - "-- " + l("Animals Protection Agency of Aemil")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "Fluffy Animals who Love Their Owners"; - .distance = 1; - end; -} - -001-2-6,44,44,0 script #001-2-6-Book6 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("World Story For Dummies, Vol I - Ancean Era: From Keshlam to an Empire"), - l("The collection of four books entitled “World Story For Dummies” is based on the uncessable work from the Ukar scholars, thanks to whom this wouldn't be possible."), - l("The “Ancean Era” is a term used to defined the time period between the beginning of recorded history and the events at the Mana Tree, and thanks to Ukar scholars, this is widely accepted as year 1 on all Gasaron."), - l("The first talpan settlement to develop an advanced political structure and to become a city-state was Keshlam."), - l("Keshlam expanded rapidly under the rule of King Janeb the Founder, and soon annexed the whole Ancea continent - excluding solely the Land Of Fire - to its domains, creating the Platinum Kingdom."), - l("Three cities developed on the eastern side of Ancea: Tulimshar, Hurnscald and Nivalis."), - l("The Platinum Kingdom grew and prospered, and drew most of the talpan population to the safety of the walls of Keshlam, Tulimshar, Hurnscald and Nivalis."), - - l("-- Continues on Volume II --")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "World Story For Dummies, Vol I"; - .distance = 1; - end; -} - -001-2-6,53,44,0 script #001-2-6-Book7 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("World Story For Dummies, Vol II - Ancean Era: Revolutions and Independence"), - l("On the year 206CCE, after a long crisis of succession, a minor noble only known as Queen Platyna the Red came to inherit the Platinum Crown."), - l("Due to neglect with day-to-day administration, which she delegated to her council, and uncontrolled expenses, the kingdom faced its first economic crisis."), - l("With the growth of the Kingdom halted, slow maintenance, and two great famines which killed over half the talpan population, the council decided to seize power and depose Platyna the Red."), - l("On March 213CCE, Chancellor Benjamin Frost, with support of the council, proclaimed the Republic of Ancea. This event would become known as the Blue Revolution."), - l("Frost held the title of Lord Prince of the Republic for eighteen months, when the council deposed him and declared itself head of the state."), - l("The Republic of Ancea ceased to exist officially in August 216CCE, when the cities of Tulimshar, Hurnscald and Nivalis installed their own independent governments."), - l("The council, however, neglected day-to-day administration duties, and focused their efforts in regaining control of the rest of Ancea."), - l("This led Keshlam into rapid decline and its citizen began to emigrate to the other Cities. By the end of the Ancean Era, Keshlam City was a quarter of the original size."), - - l("-- Continues on Volume III --")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "World Story For Dummies, Vol II"; - .distance = 1; - end; -} - -001-2-6,44,47,0 script #001-2-6-Book8 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("World Story For Dummies, Vol III - Aemilean Era: The Mana Tree and The Mana War"), - l("Aemilean Era. Tulimshar, Hurnscald and Nivalis held power of their surrounding lands, except for the Land Of Fire and Keshlam City."), - l("All races were in peace until the talpans set forth to discover the Source of Magic, based on Ukar scholars studies."), - l("Free Mana travels in many directions, and this search took several years before the expedition finally found the right direction to follow."), - l("A large tree was found in a deep cave underneath the island of Candor. Despise the darkness of the cave and absence of leaves, the tree grew strong. It gave light off itself and its energy empowered the wizards."), - l("The tree was entitled The Mana Tree, and the Wizard Order took control over Candor Island. They learnt to control the mana flow, and limited its use, claiming Magic to be too dangerous for public use."), - l("This action was met with widespread opposition from all races, and a war broke. The tritans led the offensive, in attempts to keep the tree untouched and mana available for all."), - l("Unable to win, the tritans attacked Hurnscald. While talpan troops moved in attempts to avoid its fall, the Kralog and Ukar joined the tritans and they took the city."), - l("The next and final battle happened at Candor. Wizards attacks from both sides near the Mana Tree provoked a Mana Storm. A Great Quake shook the earth of Ancea and the land began to split. Geography changed, and Keshlan vanished from the map."), - l("The Mana Tree was lost, the caves entrances destroyed, and the Wizard Order was split in two: One part was on Candor, and other at the Magic Tower."), - l("After this war, the Raijin race was born. A race born of Magic. Talpans encapsulated in a Mana storm and altered forever."), - - l("-- Continues on Volume IV --")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "World Story For Dummies, Vol III"; - .distance = 1; - end; -} - -001-2-6,53,47,0 script #001-2-6-Book9 NPC_NO_SPRITE,{ - - function read_book { - setnpcdialogtitle(l(.book_name$)); - - narrator(S_FIRST_BLANK_LINE | S_NO_NPC_NAME, - l("World Story For Dummies, Vol IV - Aemilean Era: The Fleet of Ancea"), - l("After the Mana War, the Ancea continent was mostly destroyed. It would take years to nature start repairing the damage of the event."), - l("A band of adventurers formed in Argaes from those who had lost their homes and families. They visited the three permanent talpan settlements: Tulimshar, Hurnscald and Nivalis."), - l("They gathered merchants and warriors to join them in a journey to find new lands to live in. Tulimshar's merchant lords gave them ships to sail east."), - l("The newly created Fleet of Ancea travelled so far that they were never heard from again. They found a continent, present on legends of explorers who never came back."), - l("They named this continent as Aemil, in honour of one of such explorers. The area they docked in was called Aurora, after its beautiful sunrise."), - l("The first village build was named Esperia. Aurora region was very fertile, and for this reason they moved towards countryside and built farms."), - l("In hopes of one day reconnect with the people of Ancea and establish a trade between the two continents, The City of Artis was founded. The Aemil Continent has then grown without contact with the people of Ancea."), - - "-- " + l("The Ukar Historical Association on Aemil")); - } - -OnShelfUse: - if (openbookshelf()) - read_book(); - close; - -OnUse: - if (openbook()) - read_book(); - close; - -OnInit: - .book_name$ = "World Story For Dummies, Vol IV"; - .distance = 1; - end; -} - diff --git a/npc/001-2-6/christopher.txt b/npc/001-2-6/christopher.txt deleted file mode 100644 index 6ad237e5..00000000 --- a/npc/001-2-6/christopher.txt +++ /dev/null @@ -1,68 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Librarian - -001-2-6,57,46,0 script Christopher NPC_CHRISTOPHER,{ - function ghost_in_the_library - { - narrator S_LAST_NEXT, - l("Christopher is surrounded by the sunlight from the window."); - - speech - l("To be a legend, you've either got to be dead or excessively old!"), - l("I think that I am now both..."), - l("I mean, I am very tired to move all of these books!"); - - return; - } - - function need_help - { - speech S_LAST_NEXT, - l("Do you need help with something?"); - - switch (select(l("What kinds of books are there here?"), - l("You seem a bit tired sir."), - l("Nothing."))) - { - case 1: - npctalk3 l("You can find novels and poems on this floor."); - break; - case 2: - mes ""; - ghost_in_the_library(); - break; - case 3: - npctalk3 l("I love peace and quiet, that's a good choice."); - } - return; - } - - function not_so_loud - { - npctalkonce l("This floor is reserved for quiet reading, don't speak too loud."); - - return; - } - - switch (rand(3)) - { - case 0: - ghost_in_the_library(); - break; - case 1: - need_help(); - break; - case 2: - not_so_loud(); - break; - } - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-6/dolfina.txt b/npc/001-2-6/dolfina.txt deleted file mode 100644 index d5cc1610..00000000 --- a/npc/001-2-6/dolfina.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Aemil - -001-2-6,31,44,0 script Dolfina NPC_ELVEN_FEMALE_READING,{ - mesn; - mesq l("Stop disturbing me, I already re-read that part twice because of you!"); - - goto L_Close; - -L_Close: - close; - -OnInit: - .distance = 2; - end; -} - diff --git a/npc/001-2-6/leonard.txt b/npc/001-2-6/leonard.txt deleted file mode 100644 index 9d0346c1..00000000 --- a/npc/001-2-6/leonard.txt +++ /dev/null @@ -1,88 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Librarian - -001-2-6,52,28,0 script Leonard NPC_LEONARD,{ - - function esperia_city - { - speech S_FIRST_BLANK_LINE, - l("You have put your finger on it, I am not."), - l("I grew up and lived a good while in Esperia, the capital city."), - l("This place is surrounded by two very important elements: academia and the arts. I was surrounded by theater, music, dance, museums..."), - l("I had a great childhood in Esperia!"), - l("It was wonderful."); - - emotion E_HAPPY; - - return; - } - - function need_help - { - speech S_LAST_NEXT, - l("Do you need help with something?"); - - switch (select(l("What kinds of books are there here?"), - l("Are you a native from Artis?"), - l("Nothing."))) - { - case 1: - closeclientdialog; - npctalk3 l("You can find novels and poems on this floor."); - break; - case 2: - esperia_city(); - break; - case 3: - closeclientdialog; - npctalk3 l("Good day to you!"); - } - return; - } - - function not_so_loud - { - npctalkonce l("This floor is reserved for quiet reading, don't speak too loud."); - - return; - } - - function miracle - { - npctalkonce l("The miracle is this: the more we share, the more we have."); - - return; - } - - function logic_wisdom - { - npctalkonce l("Logic is the beginning of wisdom, not the end."); - - return; - } - - switch (rand(4)) - { - case 0: - logic_wisdom(); - break; - case 1: - miracle(); - break; - case 2: - not_so_loud(); - break; - case 3: - need_help(); - break; - } - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/001-2-6/mapflags.txt b/npc/001-2-6/mapflags.txt deleted file mode 100644 index f5ba3e95..00000000 --- a/npc/001-2-6/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-6 mapflag town diff --git a/npc/001-2-7/_import.txt b/npc/001-2-7/_import.txt deleted file mode 100644 index 6d588bf8..00000000 --- a/npc/001-2-7/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 001-2-7: City Hall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-7/_warps.txt", -"npc/001-2-7/mapflags.txt", diff --git a/npc/001-2-7/_warps.txt b/npc/001-2-7/_warps.txt deleted file mode 100644 index d59fa937..00000000 --- a/npc/001-2-7/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-7: City Hall warps -001-2-7,36,46,0 warp #001-2-7_36_46 0,0,001-1,89,66 -001-2-7,46,31,0 warp #001-2-7_46_31 0,0,001-2-9,25,41 -001-2-7,26,31,0 warp #001-2-7_26_31 0,0,001-2-8,45,41 diff --git a/npc/001-2-7/mapflags.txt b/npc/001-2-7/mapflags.txt deleted file mode 100644 index 69598b89..00000000 --- a/npc/001-2-7/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-7 mapflag town diff --git a/npc/001-2-8/_import.txt b/npc/001-2-8/_import.txt deleted file mode 100644 index 17bbd2dc..00000000 --- a/npc/001-2-8/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-8: Left Wing -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-8/_warps.txt", -"npc/001-2-8/doors.txt", -"npc/001-2-8/mapflags.txt", diff --git a/npc/001-2-8/_warps.txt b/npc/001-2-8/_warps.txt deleted file mode 100644 index 43412f72..00000000 --- a/npc/001-2-8/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-8: Left Wing warps -001-2-8,46,41,0 warp #001-2-8_46_41 0,0,001-2-7,27,31 diff --git a/npc/001-2-8/doors.txt b/npc/001-2-8/doors.txt deleted file mode 100644 index 7b34c4da..00000000 --- a/npc/001-2-8/doors.txt +++ /dev/null @@ -1,59 +0,0 @@ -// Evol scripts. -// Author: -// Jesusalva -// Description: -// The Door for Town Archives - -001-2-8,38,30,0 script #ArtisArchiveGate NPC_NO_SPRITE,0,0,{ - function breakIn; - function notToday; - - .@q=getq(ThiefQuests_Artis); - mes l("The door is locked and you don't have the key."); - next; - mes l("This is probably where the town files are kept."); - if (.@q > 1) notToday(); - if (.@q == 1) breakIn(); - close; - -function notToday { - mesc l("I have nothing else to do down there."); - return; -} - -function breakIn { - mesc l("Should we break in? We'll be in a bad situation if we're found out."); - next; - // Better to not use only a pine! - if (LockPicking(2, 3, false)) { - // Delete previous timers. - deltimer("#ArtisThiefBook_0::OnBust1"); - deltimer("#ArtisThiefBook_0::OnBust2"); - deltimer("#ArtisThiefBook_0::OnBust3"); - deltimer("#ArtisThiefBook_0::OnBust4"); - // Begin the catch timer (addtimer) - addtimer 30000, "#ArtisThiefBook_0::OnBust1"; - warp "001-2-43", 27, 34; - } else { - if (ArrestedChances()) { - mesc l("Arrested!"); - mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); - ArrestPlayer(5); - } else { - mesc l("You're almost found out, but manage to make a quick escape!"); - warp "001-1", 90, 55; - } - - } - return; -} - -OnTouch: - npctalkonce l("Dang! It is locked."); - end; - -OnInit: - .distance=1; - end; -} - diff --git a/npc/001-2-8/mapflags.txt b/npc/001-2-8/mapflags.txt deleted file mode 100644 index 3def9ed2..00000000 --- a/npc/001-2-8/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-8 mapflag town diff --git a/npc/001-2-9/_import.txt b/npc/001-2-9/_import.txt deleted file mode 100644 index ebac336c..00000000 --- a/npc/001-2-9/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-2-9: Right Wing -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-2-9/_warps.txt", -"npc/001-2-9/janus.txt", -"npc/001-2-9/mapflags.txt", diff --git a/npc/001-2-9/_warps.txt b/npc/001-2-9/_warps.txt deleted file mode 100644 index b4d3c594..00000000 --- a/npc/001-2-9/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-9: Right Wing warps -001-2-9,24,41,0 warp #001-2-9_24_41 0,0,001-2-7,45,31 diff --git a/npc/001-2-9/janus.txt b/npc/001-2-9/janus.txt deleted file mode 100644 index 200dbd6c..00000000 --- a/npc/001-2-9/janus.txt +++ /dev/null @@ -1,170 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Party NPC -// Variable: -// General_Janus -// Values: -// 0 Default. -// 1 Basic information given. -// 2 Party creation enabled. -// 3 Guild certificate given. - -001-2-9,30,28,0 script Janus NPC_JANUS,{ - - function create_party { - .@party_price = 1000; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Creating a party has some advantages, it's a pretty good choice!"), - l("I remember when I created my first party, we were amazed to share some experience with a small group of adventurer..."), - l("Oh! And our party chat was really entertaining, I do highly recommend you to share this fun as well."), - l("The cost to create a party is @@ E, are you interested?", - "The cost to create a party is @@ E, are you interested?", .@party_price); - - if (askyesno() == 1) - { - if (Zeny < .@party_price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring @@ E.", .@party_price); - } - else - { - Zeny -= .@party_price; - setq General_Janus, 2; - skill NV_BASIC, 7, 0; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Awesome, come back if you ever want to create a larger group!"); - } - } - } - - function create_guild { - .@guild_price = 35000; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh oh... I see, your party became so big that you want to create an even larger structure?"), - l("Or do you want to keep your friendships and adventures in different groups?"), - l("Anyway, the guild creation is perfect for both!"), - l("You can keep your current party as it is, while leading or being part of a guild in order to talk and share different items with all of its members!"), - l("The @@ is a one time item, you can use it as many times as you want, but you can only have one!", getitemlink(GuildCertification)), - l("The cost to create a guild is @@ E, are you interested?", - "The cost to create a guild is @@ E, are you interested?", .@guild_price); - - if (askyesno() == 1) - { - if (Zeny < .@guild_price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring @@ E.", .@guild_price); - } - else - { - inventoryplace GuildCertification, 1; - Zeny -= .@guild_price; - setq General_Janus, 3; - getitem GuildCertification, 1; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Enjoy the fraternity and excitement of your future guild!"); - } - } - } - - function explain_service { - // NOTE: "human" refers to all races in Gasaron, so usage is correct. - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You are on the human resource wing of the Town Hall."), - l("We offer party and guild certifications and we can also teach you how to use some basic communication skills."), - l("Do you know how to speak with people around you?"); - - if (askyesno() == 2) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You lack some very basic skills..."); - - if (compareandsetq(General_Janus, 0, 1)) - { - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("This book contains everything you should know about it, take it!"); - - inventoryplace CommunicationTheory, 1; - getitem CommunicationTheory, 1; - } - else - { - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("You can read the book that I gave you earlier at the library if you lost it."); - } - } - else - { - if (compareandsetq(General_Janus, 0, 1)) - { - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("Anyway."), - l("This book contains everything you should know about it, take it!"); - - inventoryplace CommunicationTheory, 1; - getitem CommunicationTheory, 1; - } - - } - - return; - } - - function janus_is_not_ianus { - speech S_FIRST_BLANK_LINE, - l("Janus!"); - emotion E_UPSET; - next; - - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("Ianus is from the Legion of Aemil, don't compare me to this brigand."); - - return; - } - - speech S_LAST_NEXT, - l("Welcome!"); - - do - { - // Beta users by-pass check. - if (getskilllv(NV_BASIC) > 6 && getq(General_Janus) == 1) - { - setq General_Janus, 2; - } - - select - rif(getq(General_Janus) == 1, l("I would like to create a party.")), - rif(getq(General_Janus) == 2, l("I would like to create a guild.")), - l("What service do you offer?"), - l("Your name is Ianus or Janus?"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - create_party; - break; - case 2: - create_guild; - break; - case 3: - explain_service; - break; - case 4: - janus_is_not_ianus; - break; - } - } while (@menu != 5); - - closeclientdialog; - goodbye; - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/001-2-9/mapflags.txt b/npc/001-2-9/mapflags.txt deleted file mode 100644 index 47b7f630..00000000 --- a/npc/001-2-9/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -001-2-9 mapflag town diff --git a/npc/001-2/_import.txt b/npc/001-2/_import.txt new file mode 100644 index 00000000..58464d30 --- /dev/null +++ b/npc/001-2/_import.txt @@ -0,0 +1,18 @@ +// Map 001-2: South Tulimshar Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/001-2/_warps.txt", +"npc/001-2/bank.txt", +"npc/001-2/david.txt", +"npc/001-2/fieri.txt", +"npc/001-2/forge_shops.txt", +"npc/001-2/government_building.txt", +"npc/001-2/heathin.txt", +"npc/001-2/jhedia.txt", +"npc/001-2/manakins.txt", +"npc/001-2/mapflags.txt", +"npc/001-2/pauline.txt", +"npc/001-2/sandra.txt", +"npc/001-2/tathin.txt", +"npc/001-2/tondar.txt", +"npc/001-2/wizards.txt", +"npc/001-2/yanis.txt", diff --git a/npc/001-2/_warps.txt b/npc/001-2/_warps.txt new file mode 100644 index 00000000..84eb0d69 --- /dev/null +++ b/npc/001-2/_warps.txt @@ -0,0 +1,17 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 001-2: South Tulimshar Indoor warps +001-2,25,65,0 warp #001-2_25_65 0,0,001-1,114,100 +001-2,28,102,0 warp #001-2_28_102 0,0,001-1,27,33 +001-2,28,86,0 warp #001-2_28_86 0,0,001-1,28,22 +001-2,105,102,0 warp #001-2_105_102 1,0,001-1,54,35 +001-2,25,28,0 warp #001-2_25_28 0,0,001-1,49,72 +001-2,28,28,0 warp #001-2_28_28 0,0,001-1,52,72 +001-2,31,28,0 warp #001-2_31_28 0,0,001-1,55,72 +001-2,71,102,0 warp #001-2_71_102 0,0,001-1,37,33 +001-2,105,73,0 warp #001-2_105_73 3,0,001-2,104,42 +001-2,105,43,0 warp #001-2_105_43 3,0,001-2,104,74 +001-2,114,53,0 warp #001-2_114_53 0,0,001-1,57,23 +001-2,95,53,0 warp #001-2_95_53 0,0,001-1,52,23 +001-2,57,90,0 warp #001-2_57_90 0,0,001-2,35,94 +001-2,36,95,0 warp #001-2_36_95 0,1,001-2,58,90 +001-2,65,26,0 warp #001-2_65_26 0,0,001-1,59,99 diff --git a/npc/001-2/bank.txt b/npc/001-2/bank.txt new file mode 100755 index 00000000..7ab46396 --- /dev/null +++ b/npc/001-2/bank.txt @@ -0,0 +1,6 @@ +001-2,63,17,0 script Hydusun NPC149,{ + @npcname$ = "Hydusun"; + callfunc "Banker"; + close; +} + diff --git a/npc/001-2/david.txt b/npc/001-2/david.txt new file mode 100755 index 00000000..f3ce6b55 --- /dev/null +++ b/npc/001-2/david.txt @@ -0,0 +1,52 @@ +001-2,92,88,0 script David NPC120,{ + @Potion_EXP = 2000; + + if (Rossy_Quest == 17) goto L_FinalEnd; + if (Rossy_Quest == 14) goto L_Julia; + if (Rossy_Quest >= 8) goto L_Done; + + mes "[David]"; + mes "\"Learning magic is hard...\""; + if (Rossy_Quest == 7) goto L_Help; + close; + +L_Help: + menu + "Do you know Rossy?", L_Set, + "I can tell, it is hard.", L_No; + +L_Set: + mes "[David]"; + mes "\"Yes, I do. I am her teacher. Actually, that reminds me about her final exam... she didn't hand in her potion yet. Time is running out.\""; + menu + "A potion? Oh, uhm... Strange kind of exam. Bye.", L_No, + "Right, I have her potion in my pocket. She asked me to bring it to you. Here it is.", L_Next; + +L_Next: + mes "[David]"; + mes "\"Let me see.\""; + Rossy_Quest = 8; + mes "\"This potion is... perfect! Tell Rossy that she successfully made her potion; it is flawless!\""; + getexp @Potion_EXP, 0; + close; + +L_Done: + mes "[David]"; + mes "\"I am really happy that my best student successfully passed her exam!\""; + close; + +L_No: + close; + +L_Julia: + mes "[David]"; + mes "\"I heard Rossy's sister got kidnapped. We're counting on you to find her!\""; + next; + mes "\"If you do find her, talk to her sister and her mother.\""; + close; + +L_FinalEnd: + mes "[David]"; + mes "Well done! Thanks for finding Julia!"; + close; +} diff --git a/npc/001-2/fieri.txt b/npc/001-2/fieri.txt new file mode 100755 index 00000000..5d6a0890 --- /dev/null +++ b/npc/001-2/fieri.txt @@ -0,0 +1,117 @@ +001-2,114,89,0 script Fieri NPC117,{ + if (QL_FIERI >= 4) goto L_Done2; + if (QL_FIERI == 3) goto L_Progress2; + if (QL_FIERI == 2) goto L_Done1; + if (QL_FIERI == 1) goto L_Progress; + + @temp = rand(2); + if(@temp == 1) goto L_Opening1; + goto L_Opening0; + +L_Opening0: + mes "[Fieri]"; + mes "\"The Wizards are always hungry. All the magic all the time, sapping their energy."; + mes "Could I ask a favor of you?\""; + next; + goto L_Ask; + +L_Opening1: + mes "[Fieri]"; + mes "\"These Wizards eat like a store house full of maggots."; + mes "At this rate I'll have nothing left to cook. Can you help me with a task?\""; + next; + goto L_Ask; + +L_Ask: + menu + "Yes.", L_Yes, + "No.", L_close; + +L_Yes: + @temp = rand(2); + if(@temp == 1) goto L_Req1; + goto L_Req0; + +L_Req0: + mes "[Fieri]"; + mes "\"Great! I need a Beer for my Tonori Delight.\""; + next; + goto L_Set; + +L_Req1: + mes "[Fieri]"; + mes "\"Bring me a Beer. I'll give you something if you do.\""; + next; + goto L_Set; + +L_Set: + QL_FIERI = 1; + mes "[Fieri]"; + mes "\"Please bring it to me!\""; + goto L_close; + +L_Progress: + if (countitem("Beer") < 1) goto L_NotEnough; + mes "[Fieri]"; + mes "\"Oooh, perfect! It's perfect!"; + mes "You brought me my Beer! Here, have some cake for your troubles.\""; + getinventorylist; + if (@inventorylist_count - (countitem("Beer") == 1) > 99 - (countitem("CherryCake") == 0) ) goto L_TooMany; + delitem "Beer", 1; + getexp 100, 0; + getitem "CherryCake", 5; + QL_FIERI = 2; + next; + mes "\"Now let's see...\""; + goto L_close; + +L_Progress2: + if (countitem("MaggotSlime") < 3) goto L_NotEnough1; + mes "[Fieri]"; + mes "\"Nice! They're perfect, just perfect!"; + mes "You brought me the 3 Maggot Slimes! Here, have some Tonori Delight as reward.\""; + getinventorylist; + if ((@inventorylist_count - (countitem("MaggotSlime") == 3) > 99 - (countitem("TonoriDelight") == 0) )) goto L_TooMany; + delitem "MaggotSlime", 3; + getexp 100, 0; + getitem "TonoriDelight", 3; + QL_FIERI = 4; + goto L_close; + +L_NotEnough: + mes "[Fieri]"; + mes "\"Oh, please hurry and bring me a Beer. The Wizards need their Tonori Delight!\""; + goto L_close; + +L_NotEnough1: + mes "[Fieri]"; + mes "\"Please do hurry and bring me 3 Maggot Slimes, so I can finish the Tonori Delight!\""; + goto L_close; + +L_Done1: + mes "[Fieri]"; + mes "\"Thank you so much!\""; + mes "\"But... I need some more ingredients.\""; + next; + mes "\"I need 3 Maggot Slimes for that.\""; + mes "\"Bring them to me, and I'll give you something nice.\""; + QL_FIERI = 3; + goto L_close; + +L_Done2: + mes "[Fieri]"; + mes "\"I hope you like Tonori Delight as much as I do, because, you see...\""; + next; + mes "\"Tonori Delight is life!\""; + goto L_close; + +L_close: + @temp = 0; + close; + +L_TooMany: + next; + mes "[Fieri]"; + mes "\"You don't have room for my reward. I'll wait until you do.\""; + goto L_close; +} diff --git a/npc/001-2/forge_shops.txt b/npc/001-2/forge_shops.txt new file mode 100755 index 00000000..0e39af21 --- /dev/null +++ b/npc/001-2/forge_shops.txt @@ -0,0 +1,3 @@ + +001-2,30,60,0 shop Gungnir NPC311,903:50,904:0,530:8000,1199:1,529:2 +001-2,25,59,0 shop Mjolnir NPC377,1201:25,522:50,521:500,523:1000,603:1000 diff --git a/npc/001-2/government_building.txt b/npc/001-2/government_building.txt new file mode 100755 index 00000000..cf5c551f --- /dev/null +++ b/npc/001-2/government_building.txt @@ -0,0 +1,154 @@ + +001-2,25,21,0 script Estard NPC107,{ + mes "[Estard]"; + mes "\"Hello. What can I do for you?\""; + next; + if (PARTNER) + goto L_Main_married; + + menu + "I'd like to get married.", L_marry, + "Never mind.", L_close; + +L_Main_married: + menu + "I'd like to file for divorce.", L_divorce, + "Never mind.", L_close; + +L_marry: + if (BaseLevel < WEDDING_MIN_LEVEL) + goto L_marry_too_young; + if (Zeny < WEDDING_FEE) + goto L_marry_too_poor; + + mes ""; + mes "[Estard]"; + mes "\"Are you sure that you want to get married? It'll cost you ##B" + WEDDING_FEE + " GP##b.\""; + menu + "Yes!", L_marry_do, + "I'm having second thoughts...", L_close; + +L_marry_do: + callsub S_give_rings; + mes ""; + mes "[Estard]"; + mes "\"Here are your rings. In order to marry each other, you both must stand within one of the designated areas (like that small rug over there in the corner), wear your rings, and say '#marry (your partner's name).'\""; + close; + +L_marry_too_young: + mes ""; + mes "[Estard]"; + mes "\"I'm sorry, but you are too young to get married. You must be at least " + WEDDING_MIN_LEVEL + " levels old.\""; + next; + + menu + "Can I at least get the wedding rings now?", L_Get_rings, + "Thanks anyways.", L_close; + +L_marry_too_poor: + mes ""; + mes "[Estard]"; + mes "\"It costs ##B" + WEDDING_FEE + " GP##b to get married. That covers all the processing fees for the marriage and provides you with two wedding rings.\""; + close; + +L_Get_rings: + mes ""; + mes "[Estard]"; + mes "\"Yes! You certainly can. They're ##B" + WEDDING_FEE + " GP##b. That covers all the processing fees for the marriage and provides you with two wedding rings.\""; + + if (Zeny < WEDDING_FEE) + menu + "Thanks, but I don't have enough with me right now.", L_close; + if (Zeny >= WEDDING_FEE) + menu + "Sounds great!", L_Get_rings_pay, + "No thanks.", L_close; + goto L_Get_rings_pay; + +L_Get_rings_pay: + callsub S_give_rings; + + mes ""; + mes "[Estard]"; + mes "\"There you go! %%1\""; + close; + +L_divorce: + @divorce_cost = DIVORCE_FEE_PER_LEVEL * BaseLevel; + + if (Zeny < @divorce_cost) + goto L_divorce_not_enough; + + mes "[Estard]"; + mes "\"I'm sorry to hear that. If you're sure you want a divorce, it'll cost you %%B" + @divorce_cost + " GP%%b.\""; + next; + menu + "I'm sure.", L_do_divorce, + "I'm having second thoughts...", L_close; + +L_do_divorce: + if (Zeny < @divorce_cost) + goto L_Not_enough_money; + + set PARTNER, 0, PARTNER; // divorce the partner first, which will also divorce the rid if succesful + if (PARTNER < 1) goto L_divorce_done; + + mes ""; + mes "[Estard]"; + mes "\"I'm having trouble finding your documents. Please come back later.\""; + mes ""; + mes "[Server]"; + mes "There was an unexpected error when processing your divorce. Please report this to the developers."; + close; + +L_divorce_done: + Zeny = Zeny - @divorce_cost; + + mes ""; + mes "[Estard]"; + mes "\"You have now officially divorced your spouse.\""; + close; + +L_divorce_not_enough: + mes ""; + mes "[Estard]"; + mes "\"I'm sorry, but you don't have enough money to get a divorce. You need ##B" + @divorce_cost + " GP##b.\""; + close; + +L_Not_enough_money: + mes ""; + mes "[Estard]"; + mes "\"I'm sorry, but it seems as though you don't have enough money.\""; + close; + +L_No_Room_For_Rings: + mes ""; + mes "[Estard]"; + mes "\"Hm... it doesn't look like you have enough room to carry these rings."; + mes "Free up some space, and then I'd be happy to give them to you.\""; + close; + +L_close: + mes ""; + mes "[Estard]"; + mes "\"OK. Just come back whenever you're ready.\""; + close; + +S_give_rings: + if (Zeny < WEDDING_FEE) + goto L_Not_enough_money; + getinventorylist; + if (@inventorylist_count > 98) + goto L_No_Room_For_Rings; + + Zeny = Zeny - WEDDING_FEE; + getitem "WeddingRing", 1; + getitem "WeddingRing", 1; + return; +} + +001-2,22,21,0 script Guard#govt_in NPC123,{ + mes "[Guard]"; + mes "\"You're not allowed back here.\""; + close; +} diff --git a/npc/001-2/heathin.txt b/npc/001-2/heathin.txt new file mode 100755 index 00000000..0ba2f11f --- /dev/null +++ b/npc/001-2/heathin.txt @@ -0,0 +1,335 @@ +001-2,23,55,0 script Heathin NPC147,{ + @TARROW_REQ_TERRA_ORE = 1; + @TARROW_REQ_COAL = 5; + @TARROW_REQ_GP = 3000; + @heathin_xp_bonus = (100 * BaseLevel); + + if (QL_TERRANITE_ARMOR == 14) && (BaseLevel >= 80) goto L_Arrows_Trade; + if (QL_TERRANITE_ARMOR == 13) && (BaseLevel >= 80) goto L_Arrows_Ready; + if (QL_TERRANITE_ARMOR == 12) && (BaseLevel >= 80) goto L_Arrows_Forge; + if (QL_TERRANITE_ARMOR == 11) && (BaseLevel >= 80) goto L_Arrows; + if (QL_TERRANITE_ARMOR == 10) && (BaseLevel >= 80) goto L_Chest_Armor_Ready; + if (QL_TERRANITE_ARMOR == 9) && (BaseLevel >= 80) goto L_Chest_Armor_Forge; + if (QL_TERRANITE_ARMOR == 8) && (BaseLevel >= 80) goto L_Chest_Armor; + if (QL_TERRANITE_ARMOR == 7) && (BaseLevel >= 80) goto L_Legs_Ready; + if (QL_TERRANITE_ARMOR == 6) && (BaseLevel >= 80) goto L_Legs_Forge; + if (QL_TERRANITE_ARMOR == 5) && (BaseLevel >= 80) goto L_Legs; + if (QL_TERRANITE_ARMOR == 4) && (BaseLevel >= 80) goto L_Hood_Ready; + if (QL_TERRANITE_ARMOR == 3) && (BaseLevel >= 80) goto L_Hood_Forge; + if (QL_TERRANITE_ARMOR == 2) && (BaseLevel >= 80) goto L_Hood; + if (QL_TERRANITE_ARMOR == 2) && (BaseLevel >= 60) goto L_Forge_Thanks; + if (QL_TERRANITE_ARMOR == 1) && (BaseLevel >= 60) goto L_Forge_Award; + if (BaseLevel >= 60) goto L_Start; + + mes "[Heathin]"; + mes "\"Hello, friend. I am Heathin, a smith of exotic metals. \""; + close; + +L_Start: + mes "[Heathin]"; + mes "\"Hello, friend. I am Heathin, a smith of exotic metals. \""; + next; + mes "\"By the order of the Wizard's Council, I've been commissioned to forge armor for the upcoming expediation. However, I am but a simple smith and cannot complete all this effort by myself. I need individuals that can gather Coal to heat my forge.\""; + next; + mes "\"Perhaps you would be interested in helping me out? Would you be willing to help me gather Coal and help me fulfill my commission? I am asking any and all willing souls to get me 50 coal, as that would put a significant dint in my goal.\""; + menu + "Sure, I'll help!", L_Help, + "I'd rather keep my Coal for my own purposes, thank you very much.", L_No, + "Wait, what kind of award are we talking about?", L_Interested; + +L_Help: + QL_TERRANITE_ARMOR = 1; + mes "[Heathin]"; + mes "\"Excellent! I am always glad when someone can be of service not just to me, but to all of Tulimshar. Please get me 50 Coal and you will be compensated for your efforts.\""; + close; + +L_Interested: + mes "[Heathin]"; + mes "\"Well, I can compensate you from the commision I getting from the council.\""; + next; + mes "\"How does 20,000 GP and I'll offer my smithing services for a discount?\""; + next; + mes "\"Does this sound like something you might be interested in?\""; + menu + "Sure, I'll help!", L_Help, + "I'd rather keep my Coal.", L_No, + "Can you repeat that again?", L_Interested; + +L_Forge_Award: + if (countitem ("Coal") < 50) goto L_Forge_Wait; + getinventorylist; + QL_TERRANITE_ARMOR = 2; + delitem "Coal", 50; + getexp @heathin_xp_bonus, 0; + Zeny = Zeny + 20000; + mes "[Heathin]"; + mes "\"You have brought the Coal. This is most excellent! As promised, I have a reward for you. Hopefully you will find it useful.\""; + next; + mes "\"Time to make some armor. The Council will be pleased. Thank you for your efforts!\""; + close; + +L_Forge_Wait: + mes "[Heathin]"; + mes "\"Hello again. Making armor keeps me pretty busy. I certainly hope I can fulfill my commission soon so that I can move on to bigger and better things.\""; + next; + mes "\"The pay is good, certainly, but I am a far better smith than this. If you can bring me 50 Coal, it would surely get me to my goal faster.\""; + next; + mes "\"I will be sure to provide an apt award once you are done.\""; + close; + +L_Forge_Thanks: + mes "[Heathin]"; + mes "\"Thank you again for helping me fulfil my commission. It has made a signficant dint in what the Council requires of me. Perhaps I may be of service to you again one day!\""; + close; + +L_Hood: + mes "[Heathin]"; + mes "\"Hello again friend, I just found out about this great metal called terranite.\""; + next; + mes "\"This metal is almost as strong as steel, but is also very ductile.\""; + next; + mes "\"With some effort, I can make this metal form rings tighter than any chain mail. It isn't the prettiest in hue, but its uses can be many.\""; + next; + mes "\"Unfortunately, it seems to be difficult to gather. Most that have searched for Terranite Ore either cannot find it or have never returned...\""; + next; + mes "\"I may be an excellent smith, but I certainly am no combatant. However, I would enjoy turning this ore into something useful, perhaps some type of armor to help those that may be braver.\""; + next; + mes "\"So, what do you say? Are you interested?\""; + menu + "No, thank you. Maybe later.", L_No, + "Armor, you say? Definitely!", L_Yes; + +L_No: + mes "[Heathin]"; + mes "\"Ah, that is too bad. Come back anytime.\""; + close; + +L_Yes: + QL_TERRANITE_ARMOR = 3; + mes "[Heathin]"; + mes "\"Great, this is going to be fun! As I have not had much practice with this armor, I'd like to get started soon.\""; + next; + mes "Heathin thinks for a moment."; + next; + mes "\"Ah, I know! I will make a helm... Well, more like a hood, since it will be woven.\""; + next; + mes "\"It will require a great amount of heat, if the rumors are to be believed. For this, I will need 100 Coal to keep my forge burning hot. I will also need 10 Terranite Ore to make the armor. Of course, such work does not come cheap. While I may enjoy my work, my time and effort is very valuable. Since you have been a great help I will only need 20,000 gold pieces, well below my going rate. Please come back with the gold, Coal and ore and I'll make this hood for you.\""; + close; + +L_Hood_Forge: + if ( (Zeny < 20000) + || (countitem("Coal") < 100) + || (countitem("TerraniteOre") < 10) ) + goto L_Hood_Wait; + QL_TERRANITE_ARMOR = 4; + delitem "Coal", 100; + delitem "TerraniteOre", 10; + getexp @heathin_xp_bonus, 0; + Zeny = Zeny - 20000; + mes "[Heathin]"; + mes "\"Great, you brought everything! Come back later and I'll have the helm ready for you.\""; + close; + +L_Hood_Wait: + mes "[Heathin]"; + mes "\"I am very busy right now. If you could bring me 10 Terranite Ore, 100 Coal and 20,000 gold pieces, I will make that terranite hood for you.\""; + close; + +L_Hood_Ready: + getinventorylist; + if ((checkweight("TerraniteHelmet", 1) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + QL_TERRANITE_ARMOR = 5; + getitem "TerraniteHelmet", 1; + mes "[Heathin]"; + mes "\"I am all done with your terranite hood. I hope you enjoy it! I have some work to wrap up for the Council, but come back later and I might be able to assist you again.\""; + close; + +L_Legs: + QL_TERRANITE_ARMOR = 6; + mes "[Heathin]"; + mes "\"I am glad you are back! I've just finished up some more of my commission. Now I can get back to making terranite armor for you. This time I will make some pants, but they need more ore, more Coal to heat my forge and of course, more gold for my efforts.\""; + next; + mes "\"To make terranite pants, I need 200 Coal, 30 Terranite Ore and 40,000 gold pieces. The faster you bring this to me, the faster I can have your terranite pants ready.\""; + close; + +L_Legs_Forge: + if ( (Zeny < 40000) + || (countitem("Coal") < 200) + || (countitem("TerraniteOre") < 30) ) + goto L_Legs_Wait; + QL_TERRANITE_ARMOR = 7; + delitem "Coal", 200; + delitem "TerraniteOre", 30; + getexp @heathin_xp_bonus, 0; + Zeny = Zeny - 40000; + mes "[Heathin]"; + mes "\"Great, you have brought everything! Come back later and I will have those terranite pants ready for you.\""; + close; + +L_Legs_Wait: + mes "[Heathin]"; + mes "\"I am very busy right now. If you could bring me 30 Terranite Ore, 200 Coal and 40,000 gold pieces, I will make those terranite pants for you.\""; + close; + +L_Legs_Ready: + getinventorylist; + if ((checkweight("TerraniteLegs", 1) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + QL_TERRANITE_ARMOR = 8; + getitem "TerraniteLegs", 1; + mes "[Heathin]"; + mes "\"I am all done with your terranite pants. Hope you enjoy them! I have some more work to complete for the Council. Come back later and I might be able to assist you again.\""; + close; + +L_Chest_Armor: + QL_TERRANITE_ARMOR = 9; + mes "[Heathin]"; + mes "\"Good to see you again. I have just finished up some more of my commission. Now I can get back to making terranite armor for you. This time, I will make some terranite chest armor, but it needs more ore, more Coal for my forge and of course, more gold to compensate for my efforts.\""; + next; + mes "\"To make terranite chest armor, I need 250 Coal, 40 Terranite Ore and 50,000 gold pieces. The faster you bring this to me, the faster I can have your terranite armor ready.\""; + close; + +L_Chest_Armor_Forge: + if ( (Zeny < 50000) + || (countitem("Coal") < 250) + || (countitem("TerraniteOre") < 40) ) + goto L_Chest_Armor_Wait; + QL_TERRANITE_ARMOR = 10; + delitem "Coal", 250; + delitem "TerraniteOre", 40; + getexp @heathin_xp_bonus, 0; + Zeny = Zeny - 50000; + mes "[Heathin]"; + mes "\"Splendid, you have brought everything! Come back later and I will have the terranite chest armor ready for you.\""; + close; + +L_Chest_Armor_Wait: + mes "[Heathin]"; + mes "\"I am very busy right now. If you could bring me 40 Terranite Ore, 250 Coal and 50,000 gold pieces, I will make that chest armor for you.\""; + close; + +L_Chest_Armor_Ready: + getinventorylist; + if ((checkweight("TerraniteChestArmor", 1) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + QL_TERRANITE_ARMOR = 11; + getitem "TerraniteChestArmor", 1; + mes "[Heathin]"; + mes "\"I have completed your terranite chest armor. I hope you enjoy it! I have some work to wrap up for the Council again, but come back later and I might be able to assist you once more.\""; + close; + +L_Arrows: + mes "[Heathin]"; + mes "\"How good to see you. I have experimented a little with Terranite Ore to see what else can be done with it. It seems to have some qualities suitable for weapons, but I have only tested it with arrows. If you would like, I can make Terranite Arrows, but as as with the armor, I need Coal, Terranite Ore and payment for my efforts.\""; + next; + mes "\"Also, it might be a while until I have time to see what else I can make with terranite other than arrows, as right now the Council is keeping me rather busy with my commission. So, would you like some Terranite Arrows?\""; + menu + "No, thank you.", L_Arrows_No, + "Sure, I could use some arrows.", L_Arrows_Yes; + +L_Arrows_No: + mes "[Heathin]"; + mes "\"Well, if you change your mind, I'm not going anywhere.\""; + close; + +L_Arrows_Yes: + QL_TERRANITE_ARMOR = 12; + mes "[Heathin]"; + mes "\"Good, good. I shall begin crafting these arrows as soon as you come back. However, I cannot just make small handfuls as it would not be worth my time and effort to have my concentration interrupted for small tasks. I will make 1,000 Terranite Arrows per request, for which I will need "+@TARROW_REQ_TERRA_ORE+" Terranite Ore, "+@TARROW_REQ_COAL+" Coal and "+@TARROW_REQ_GP+" gold pieces.\""; + next; + mes "\"See you soon!\""; + close; + +L_Arrows_Forge: + if ( (Zeny < @TARROW_REQ_GP) + || (countitem("Coal") < @TARROW_REQ_COAL) + || (countitem("TerraniteOre") < @TARROW_REQ_TERRA_ORE) ) + goto L_Arrows_Wait; + QL_TERRANITE_ARMOR = 13; + delitem "Coal", @TARROW_REQ_COAL; + delitem "TerraniteOre", @TARROW_REQ_TERRA_ORE; + getexp @heathin_xp_bonus, 0; + Zeny = Zeny - @TARROW_REQ_GP; + mes "[Heathin]"; + mes "\"Wonderful! You have everything I asked for. I will start working on the arrows right away.\""; + close; + +L_Arrows_Wait: + mes "[Heathin]"; + mes "\"If you want Terranite Arrows, please get me "+@TARROW_REQ_TERRA_ORE+" Terranite Ore, "+@TARROW_REQ_COAL+" Coal and "+@TARROW_REQ_GP+" gold pieces.\""; + close; + +L_Arrows_Ready: + getinventorylist; + if ((checkweight("TerraniteArrow", 1000) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + QL_TERRANITE_ARMOR = 14; + getitem "TerraniteArrow", 1000; + mes "[Heathin]"; + mes "\"All done, here you go! I hope you like them. I am still working on my commission, but if you ever need any more Terranite Arrows, just come on by with "+@TARROW_REQ_COAL+" Coal, "+@TARROW_REQ_TERRA_ORE+" Terranite Ore and "+@TARROW_REQ_GP+" gold pieces and I will make another 1,000 arrows for you. By now I have enough Terranite Ore in reserve that you can just trade me my requirements to keep my resources up. Thank you for all your efforts!\""; + close; + +L_Arrows_Trade: + mes "[Heathin]"; + mes "\"Hello, there. If you have "+@TARROW_REQ_COAL+" Coal, "+@TARROW_REQ_TERRA_ORE+" Terranite Ore and "+@TARROW_REQ_GP+" gold pieces, I will trade you 1,000 Terranite Arrows. Would you like some Terranite Arrows?\""; + menu + "No.", L_Arrows_Trade_No, + "Yes.", L_Arrows_Trade_Yes; + +L_Arrows_Trade_No: + mes "[Heathin]"; + mes "\"Come back again if you would like to get Terranite Arrows.\""; + close; + +L_Arrows_Trade_Yes: + if ( (Zeny < @TARROW_REQ_GP) + || (countitem("Coal") < @TARROW_REQ_COAL) + || (countitem("TerraniteOre") < @TARROW_REQ_TERRA_ORE) ) + goto L_Arrows_Trade_Wait; + getinventorylist; + if ((checkweight("TerraniteArrow", 1500) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + delitem "Coal", @TARROW_REQ_COAL; + delitem "TerraniteOre", @TARROW_REQ_TERRA_ORE; + Zeny = Zeny - @TARROW_REQ_GP; + @lucky = 5 * rand(Luk); + @lucky$ = ""; + getitem "TerraniteArrow", 1000 + @lucky; + mes "[Heathin]"; + if(@lucky>0) + @lucky$ = " You are lucky, I could forge "+@lucky+" more arrows than expected."; + mes "Here you go!" + @lucky$ + " Come back again if you want more Terranite Arrows.\""; + close; + +L_Arrows_Trade_Wait: + mes "[Heathin]"; + mes "\"It seems that you do not have the necessary resources for me to trade you. Please come back with "+@TARROW_REQ_COAL+" Coal, "+@TARROW_REQ_TERRA_ORE+" Terranite Ore and "+@TARROW_REQ_GP+" gold pieces if you want another 1,000 Terranite Arrows.\""; + close; + +L_InventoryNoSpace: + mes "[Heathin]"; + mes "\"Hm no. You can't carry this right now. Make some room and come back.\""; + close; + +} +001-2,25,55,0 script HeathinDebug NPC147,{ + mes "[Heathin Debug]"; + mes "Debug Action"; + menu + "Reset", L_Reset, + "Exit", L_End; + +L_Reset: + QL_TERRANITE_ARMOR = 0; + mes "Reset!"; + goto L_End; + +L_End: + end; + +OnInit: + if (!debug) + disablenpc "HeathinDebug"; + end; +} diff --git a/npc/001-2/jhedia.txt b/npc/001-2/jhedia.txt new file mode 100755 index 00000000..8d5e2e28 --- /dev/null +++ b/npc/001-2/jhedia.txt @@ -0,0 +1,60 @@ + +001-2,23,50,0 script Jhedia NPC160,{ + @Cost_Per_Ingot = 1000; + @iron_Ore_Per = 5; + @Coal_Per = 10; + + mes "[Jhedia]"; + mes "\"I forge Iron Ore into ingots. Ingots are more useful for skilled smiths, like armorers, because the ore is refined and made into useful units which can be worked with. To make ingots, I need " + @iron_Ore_Per + " Iron Ore and " + @Cost_Per_Ingot + " gp per ingot. I also need " + @Coal_Per + " Coal for my forge.\""; + next; + mes "[Jhedia]"; + mes "\"How many ingots would you like?\""; + input @ingot_count; + + if (@ingot_count == 0) + goto L_Jhedia_Bye; + @Zeny_cost = @ingot_count * @Cost_Per_Ingot; + if (countitem("IronOre") < @iron_Ore_Per * @ingot_count) + goto L_Jhedia_NotEnough_Ore; + if (countitem("Coal") < @Coal_Per * @ingot_count) + goto L_Jhedia_NotEnough_Coal; + if (Zeny < @Zeny_cost) + goto L_Jhedia_NotEnough_Zeny; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("IronIngot") == 0 + && countitem("IronOre") > @ingot_count * @iron_Ore_Per + | countitem("Coal") > @ingot_count * @Coal_Per) + goto L_Jhedia_NotEnoughSlots; + Zeny = Zeny - @Zeny_cost; + delitem "IronOre", @ingot_count * @iron_Ore_Per; + delitem "Coal", @ingot_count * @Coal_Per; + getitem "IronIngot", @ingot_count; + close; + +L_Jhedia_Bye: + mes "[Jhedia]"; + mes "\"Goodbye then.\""; + close; + +L_Jhedia_NotEnough_Ore: + mes "[Jhedia]"; + mes "\"You do not seem to have enough Iron Ore.\""; + close; + +L_Jhedia_NotEnough_Coal: + mes "[Jhedia]"; + mes "\"You do not seem to have enough Coal.\""; + close; + +L_Jhedia_NotEnough_Zeny: + mes "[Jhedia]"; + mes "\"You do not seem to have enough gold pieces.\""; + close; + +L_Jhedia_NotEnoughSlots: + mes "[Jhedia]"; + mes "\"You do not seem to have enough room to carry this many ingots.\""; + close; + +} diff --git a/npc/001-2/manakins.txt b/npc/001-2/manakins.txt new file mode 100755 index 00000000..db8ea1dd --- /dev/null +++ b/npc/001-2/manakins.txt @@ -0,0 +1,45 @@ + +001-2,29,57,0 script Terranite Armor#Female NPC401,{ + mes "A complete set of female Terranite armor stands on display. These appear to be made to order."; + next; + mes "An inscription on the helmet reads \"Made by Heathin.\""; + close; +} + +001-2,34,57,0 script Terranite Armor#Male NPC402,{ + mes "A complete set of male Terranite armor stands on display. These appear to be made to order."; + next; + mes "An inscription on the helmet reads \"Made by Heathin.\""; + close; +} + +001-2,34,62,0 script Terranite NPC403,{ + mes "Ahhh! A Terranite!"; + next; + mes "Wait a minute..."; + next; + mes "It appears to just be a display model."; + close; +} + + +001-2,91,39,0 script Talponian#Female NPC404,{ + mes "A female Talponian manakin stands on display."; + close; +} + +001-2,91,44,0 script Talponian#Male NPC405,{ + mes "A male Talponian manakin stands on display."; + close; +} + +001-2,118,39,0 script Gispaan#Female NPC406,{ + mes "A female Gispaan manakin stands on display."; + close; +} + +001-2,118,44,0 script Gispaan#Male NPC407,{ + mes "A male Gispaan manakin stands on display."; + close; +} + diff --git a/npc/001-2/mapflags.txt b/npc/001-2/mapflags.txt new file mode 100755 index 00000000..e7ed8657 --- /dev/null +++ b/npc/001-2/mapflags.txt @@ -0,0 +1,2 @@ +//001-2 mapflag town +//001-2 mapflag resave 001-1,60,105 diff --git a/npc/001-2/pauline.txt b/npc/001-2/pauline.txt new file mode 100755 index 00000000..9ec35396 --- /dev/null +++ b/npc/001-2/pauline.txt @@ -0,0 +1,298 @@ + +001-2,77,78,0 script Pauline NPC208,{ + + @Pauline_MASK = NIBBLE_4_MASK; + @Pauline_SHIFT = NIBBLE_4_SHIFT; + + @pauline_state = ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT); + + + @pauline_REWARD = 10000; + + if (@pauline_state == 4) goto L_MoreMagic; + if (@pauline_state == 3) goto L_KnowIngredientsPinkie; + if (@pauline_state == 2) goto L_Ingredients; + if (@pauline_state == 1) goto L_Back; + + if (getskilllv(SKILL_MAGIC_ASTRAL) > 0) + goto L_Magic; + mes "[Pauline]"; + mes "\"I've mastered several schools of magic and fought the Yeti in Kaizei.\""; + next; + mes "\"The path of magic is a long and difficult one.\""; + goto L_close; + +L_Magic: + mes "[Pauline]"; + mes "\"Ah. I see you are skilled in the Art of Astral Magic.\""; + mes "\"Who taught you?\""; + menu + "I learnt it myself!", L_Next, + "Sagatha is my teacher.", L_Sagatha, + "You must be mistaken.", L_close; + +L_Next: + mes "\"You did? Not bad. I guess then there is nothing I can teach you. Or are you interested in sharing knowledge?\""; + menu + "Yes, please.", L_Spells, + "No, thanks.", L_close; + +L_Sagatha: + mes "[Pauline]"; + mes "\"Ah, that Witch!\""; + mes "\"Very well.\""; + next; + mes "\"Do you want me to teach you things Sagatha doesn't know yet?\""; + next; + menu + "Yes.", L_Spells, + "No.", L_close; + +L_Back: + mes "[Pauline]"; + mes "\"So, you're back. Are you ready to share knowledge now?\""; + menu + "Yes.", L_Spells, + "No.", L_close; + +L_Spells: + @pauline_state = 1; + callsub S_Update_Mask; + mes "[Pauline]"; + mes "\"Okay.\""; + mes "\"Not long ago I discovered some new caves near Tulimshar. In an abandond chamber I found some paintings on the wall.\""; + next; + mes "\"They weren't typical for this region, so I examined them closely. I found some invocations I have never heard before.\""; + mes "\"I thought that they would fit better into the Woodland area. I could only decipher two invocations so far. Those are two spells used to summon creatures.\""; + next; + mes "\"One was for summoning Mouboos and the other one was for summoning Pinkies.\""; + mes "\"Have you ever heared about those?\""; + next; + menu + "Yes. I thought you had something new to tell. [Walk Away]", L_close, + "No, tell me more.", L_Next1; + +L_Next1: + mes "[Pauline]"; + mes "\"Well I could only read the invocations. So I don't exactly know what kind of ingredients you are going to need.\""; + mes "\"The first one for the mouboo was " + get(.invocation$, "smmouboo") + " and the one for the pinkie was " + get(.invocation$, "smpinkie") +".\""; + next; + mes "\"For the pinkie spell my suggestion is to try similar ingredients to the other Astral spells. Try a root and some item typical for pinkies.\""; + mes "\"The mouboo spell might be more complicated. From what I could translate, one of the spell components is crafted by magic.\""; + next; + mes "\"When you find the right ingredients, come back and bring them to me to try those spells out.\""; + next; + mes "\"Goodbye.\""; + @pauline_state = 2; + callsub S_Update_Mask; + goto L_close; + +L_Ingredients: + mes "[Pauline]"; + mes "\"Hello, have you found out what ingredients to use yet?\""; + menu + "Yes.", L_KnowIngredientsMouboo, + "No.", L_Next2; + +L_Next2: + mes "\"Okay. Come back as soon as you know.\""; + goto L_close; + +L_KnowIngredientsMouboo: + mes "\"Did you bring them?\""; + menu + "Yes." , L_Next3, + "No.", L_ComeBackLater; + +L_Next3: + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + setarray @items$, "AlizarinHerb", "GambogeHerb", "SilkCocoon", "PinkAntenna", "MaggotSlime", "BugLeg", "GrassSeeds", "ReedBundle", "RoastedAcorn", "Candy", "Milk", "BottleOfWater", "ChickenLeg", "Steak", "Root", "RawLog", "Beer", "CactusDrink", "MoubooFigurine", "Acorn", "Iten", "WarpedLog"; + setarray @item_names$, "Alizarin Herb", "Gamboge Herb", "Silk Cocoon", "Pink Antenna", "Maggot Slime", "Bug Leg", "Grass Seeds", "Reed Bundle", "Roasted Acorn", "Candy", "Milk", "Bottle of Water", "Chicken Leg", "Steak", "Root", "Raw Log", "Beer", "Cactus Drink", "Mouboo Figurine", "Acorn", "Iten", "Warped Log"; + mes "\"Then tell me the ingredients for the mouboo summoning spell and give them to me. Start with the first ingredient and then tell me the second one separately.\""; + next; + callfunc "DynamicItemMenu$"; + @pauline_ingredient1$ = @item$; + mes "Next ingredient."; + callfunc "DynamicItemMenu$"; + @pauline_ingredient2$ = @item$; + if (@pauline_ingredient1$ == "") + goto L_Wrong; + if (@pauline_ingredient2$ == "") + goto L_Wrong; + if (countitem(@pauline_ingredient1$) < 1) + goto L_NotEnough; + if (countitem(@pauline_ingredient2$) < 1) + goto L_NotEnough; + mes "\"Do you want to give me these items?\""; + menu + "No.", L_ComeBackLater, + "Yes.", L_Next4; + +L_Next4: + delitem @pauline_ingredient1$, 1; + delitem @pauline_ingredient2$, 1; + mes "\"Okay let me try this.\""; + if (@pauline_ingredient1$ == "Root") + goto L_Pass1Mouboo; + if (@pauline_ingredient1$ == "MoubooFigurine") + goto L_Pass2Mouboo; + goto L_DidNotWorkMouboo; + +L_DidNotWorkMouboo: + mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-mouboo") + "."; + mes "Nothing happens."; + mes "[Pauline]"; + mes "\"It seems you did not tell me the correct ingredients. Come back when you find the correct ones.\""; + goto L_close; + +L_Pass1Mouboo: + if (@pauline_ingredient2$ == "MoubooFigurine") + goto L_TrySpellMouboo; + goto L_DidNotWorkMouboo; + +L_Pass2Mouboo: + if (@pauline_ingredient2$ == "Root") + goto L_TrySpellMouboo; + goto L_DidNotWorkMouboo; + +L_TrySpellMouboo: + mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-mouboo") + "."; + monster "001-1", 55,68, "Good", 1028, 1; + mes "[Pauline]"; + mes "\"It worked!\""; + @pauline_state = 3; + callsub S_Update_Mask; + getexp @pauline_REWARD, 0; + goto L_close; + +L_KnowIngredientsPinkie: + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + setarray @items$, "AlizarinHerb", "GambogeHerb", "SilkCocoon", "PinkAntenna", "MaggotSlime", "BugLeg", "GrassSeeds", "ReedBundle", "RoastedAcorn", "Candy", "Milk", "BottleOfWater", "ChickenLeg", "Steak", "Root", "RawLog", "Beer", "CactusDrink", "MoubooFigurine", "Acorn", "Iten", "WarpedLog"; + setarray @item_names$, "Alizarin Herb", "Gamboge Herb", "Silk Cocoon", "Pink Antenna", "Maggot Slime", "Bug Leg", "Grass Seeds", "Reed Bundle", "Roasted Acorn", "Candy", "Milk", "Bottle of Water", "Chicken Leg", "Steak", "Root", "Raw Log", "Beer", "Cactus Drink", "Mouboo Figurine", "Acorn", "Iten", "Warped Log"; + mes "[Pauline]"; + mes "\"Now give me the ingredients for the pinkie spell.\""; + next; + callfunc "DynamicItemMenu$"; + @pauline_ingredient1$ = @item$; + mes "Next ingredient."; + callfunc "DynamicItemMenu$"; + @pauline_ingredient2$ = @item$; + if (@pauline_ingredient1$ == "") + goto L_Wrong; + if (@pauline_ingredient2$ == "") + goto L_Wrong; + if (countitem(@pauline_ingredient1$) < 1) + goto L_NotEnough; + if (countitem(@pauline_ingredient2$) < 1) + goto L_NotEnough; + mes "\"Do you want to give me these items?\""; + menu + "No.", L_ComeBackLater, + "Yes.", L_Next5; + +L_Next5: + delitem @pauline_ingredient1$, 1; + delitem @pauline_ingredient2$, 1; + mes "\"Okay, let me try this.\""; + if (@pauline_ingredient1$ == "Root") + goto L_Pass1Pinkie; + if (@pauline_ingredient1$ == "PinkAntenna") + goto L_Pass2Pinkie; + goto L_DidNotWorkPinkie; + +L_DidNotWorkPinkie: + mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-pinkie") + "."; + mes "Nothing happens."; + mes "[Pauline]"; + mes "\"It seems you did not tell me the correct ingredients. Come back when you find the correct ones.\""; + goto L_close; + +L_Pass1Pinkie: + if (@pauline_ingredient2$ == "PinkAntenna") + goto L_TrySpellPinkie; + goto L_DidNotWorkPinkie; + +L_Pass2Pinkie: + if (@pauline_ingredient2$ == "Root") + goto L_TrySpellPinkie; + goto L_DidNotWorkPinkie; + +L_TrySpellPinkie: + mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-pinkie") + "."; + monster "001-1", 54,68, "Good", 1018, 1; + mes "[Pauline]"; + mes "\"It worked!\""; + @pauline_state = 4; + callsub S_Update_Mask; + getexp @pauline_REWARD, 0; + goto L_close; + +L_MoreMagic: + mes "[Pauline]"; + mes "\"Thanks for telling me the ingredients. As soon as I find out more about those wall paintings I will let you know.\""; + goto L_close; + +L_Wrong: + mes "The Witch looks at you and snorts."; + mes "[Pauline]"; + mes "\"You told me the wrong ingredients. Come back as soon as you know the correct ones.\""; + goto L_close; + +L_NotEnough: + mes "[Pauline]"; + mes "\"Hey, you don't have this with you!\""; + mes "\"Come back when you have the right ingredients.\""; + goto L_close; + +L_ComeBackLater: + mes "[Pauline]"; + mes "\"Then come back later.\""; + goto L_close; + +L_close: + @pauline_ingredient1$ = ""; + @pauline_ingredient2$ = ""; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + @pauline_state = 0; + @pauline_REWARD = 0; + close; + +S_Update_Mask: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT); + return; +} + +001-2,79,74,0 script PaulineDebug NPC208,{ + @Pauline_MASK = NIBBLE_4_MASK; + @Pauline_SHIFT = NIBBLE_4_SHIFT; + + @pauline_state = ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT); + + mes "Reset Quest State"; + mes @pauline_state; + menu + "Yes.", L_Next, + "No.", L_close; + +L_Next: + @pauline_state = 0; + callsub S_Update_Mask; + mes "Done"; + close; + +L_close: + @pauline_state = 0; + close; + +S_Update_Mask: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT); + return; + +OnInit: + if (!debug) + disablenpc "PaulineDebug"; + end; +} diff --git a/npc/001-2/sandra.txt b/npc/001-2/sandra.txt new file mode 100755 index 00000000..705a6144 --- /dev/null +++ b/npc/001-2/sandra.txt @@ -0,0 +1,103 @@ +001-2,98,88,0 script Sandra NPC114,{ + if (QL_SANDRA >= 2) goto L_Done; + if (QL_SANDRA == 1) goto L_Progress; + + mes "[Sandra]"; + mes "\"Hunting monsters for potion ingredients can sometimes be a difficult task.\""; + next; + + @temp = rand(4); + if(@temp == 1) goto L_Opening1; + if(@temp == 2) goto L_Opening2; + if(@temp == 3) goto L_Opening3; + goto L_Opening0; + +L_Opening0: + mes "\"In the outskirts of Tulimshar, there are some scorpions... I need help! Will you help?\""; + next; + goto L_Ask; + +L_Opening1: + mes "\"When you venture to the outskirts of Tulimshar, you can spot scorpions. Will you help me kill some?\""; + next; + goto L_Ask; + +L_Opening2: + mes "\"The Scorpion Stinger carries many properties used in potions. Would you get some for me?\""; + next; + goto L_Ask; + +L_Opening3: + mes "\"You look sturdy enough, will you help me get something?\""; + next; + goto L_Ask; + +L_Ask: + menu + "Yes.", L_Yes, + "No.", L_close; + +L_Yes: + @temp = rand(3); + if(@temp == 1) goto L_Req1; + if(@temp == 2) goto L_Req2; + goto L_Req0; + +L_Req0: + mes "[Sandra]"; + mes "\"I need 5 Scorpion Stingers.\""; + next; + goto L_Set; + +L_Req1: + mes "[Sandra]"; + mes "\"I heard a while ago that stingers from scorpions can be used for medical purposes. I need you to help me get 5 Scorpion Stingers.\""; + next; + goto L_Set; + +L_Req2: + mes "[Sandra]"; + mes "\"Bring me 5 Scorpion Stingers. I'll give you something if you do!\""; + next; + goto L_Set; + +L_Set: + QL_SANDRA = 1; + mes "\"Please get them for me!\""; + goto L_close; + +L_Progress: + if (countitem("ScorpionStinger") < 5) + goto L_NotEnough; + mes "[Sandra]"; + mes "\"Excellent! You brought me 5 Scorpion Stingers!"; + mes "Here's something for you.\""; + getinventorylist; + if (@inventorylist_count + (countitem("ScorpionStinger") == 5) - (countitem("Arrow") == 0) > 99) + goto L_TooMany; + delitem "ScorpionStinger", 5; + getitem "Bow", 1; + getitem "Arrow", 100; + QL_SANDRA = 2; + goto L_close; + +L_NotEnough: + mes "[Sandra]"; + mes "\"Please hurry and bring me 5 Scorpion Stingers.\""; + goto L_close; + +L_Done: + mes "[Sandra]"; + mes "\"Thank you for all your help!\""; + goto L_close; + +L_close: + @temp = 0; + close; + +L_TooMany: + next; + mes "[Sandra]"; + mes "\"You don't have room for my reward. I'll wait until you do.\""; + goto L_close; +} diff --git a/npc/001-2/tathin.txt b/npc/001-2/tathin.txt new file mode 100755 index 00000000..e8dc9394 --- /dev/null +++ b/npc/001-2/tathin.txt @@ -0,0 +1,28 @@ +001-2,28,21,0 script Tathin NPC107,{ + mes "[Tathin]"; + mes "\"Hello what Can I do for you?\""; + next; + + menu + "I'd like to join a party.", L_Give_Party, + "I'd like to create my own party.", L_Give_Make_Party, + "Nothing, I guess.", L_close; + +L_Give_Party: + mes "[Tathin]"; + mes "\"You'll need to be invited by an existing member of a party to join it. You may also create your own party.\""; + next; + mes "[Tathin]"; + mes "\"Remember, parties cannot share experience if any members are more than 10 levels apart.\""; + menu + "I'd like to create my own party.", L_Give_Make_Party, + "Goodbye.", L_close; + +L_Give_Make_Party: + mes "[Tathin]"; + mes "\"You can create parties with the 'new' or 'create' commands on the Party tab in the client. Parties need to have unique names.\""; + close; + +L_close: + close; +} diff --git a/npc/001-2/tondar.txt b/npc/001-2/tondar.txt new file mode 100755 index 00000000..44ea860d --- /dev/null +++ b/npc/001-2/tondar.txt @@ -0,0 +1,54 @@ + +001-2,95,79,0 script Tondar NPC168,{ + mes "[Tondar]"; + mes "\"We're not accepting any new students right now.\""; + if (getskilllv(SKILL_MAGIC) > 0) + goto L_may_ask; + goto L_End; + +L_may_ask: + next; + menu + "Can you teach me a spell?", L_Askspell, + "Do you have a magic library?", L_library, + "Are you sure? I can pay well...", L_Nopay, + "That's unfortunate.", L_End, + "Goodbye, then.", L_End; + +L_library: + mes "[Tondar]"; + mes "\"Of course we do. It is only for graduate students, alumni, and faculty.\""; + next; + menu + "Thank you, and goodbye.", L_End, + "Nobody else is allowed inside?", L_Next; + +L_Next: + mes "[Tondar]"; + mes "\"Well, it is possible to get a special permit from the headmaster. But he is currently on sabbatical.\""; + close; + +L_Askspell: + mes "[Tondar]"; + mes "\"We only teach spells to students.\""; + next; + menu + "Oh, come on... just one little spell!", L_Nopay, + "Pretty please?", L_spell, + "I can pay you, too...", L_Nopay; + +L_spell: + mes "[Tondar]"; + mes "\"Well, all right; this one can't do much harm. Press your hands together and say `" + get(.invocation$, "spell-experience") + "'.\""; + mes "\"This will release a steady flow of magic within you. Focus and try to control it; it is a good meditative practice.\""; + close; + +L_Nopay: + mes "[Tondar]"; + mes "The wizard frowns angrily."; + mes "\"Do not tempt me to teach you a different kind of lesson, young one! Begone!\""; + goto L_End; + +L_End: + close; +} diff --git a/npc/001-2/wizards.txt b/npc/001-2/wizards.txt new file mode 100755 index 00000000..754f1bf4 --- /dev/null +++ b/npc/001-2/wizards.txt @@ -0,0 +1,23 @@ + +- script Magic Council NPC32767,{ + explode .@n, strnpcinfo(0), "#"; + if (.@n[1] == 9) mes "The arch wizard seems to be busy."; + elif (.@n[1]) mes "The wizard seems to ignore you."; + else mes "Strangely, you feel nothing – as if its membrane is closed to you."; + next; + mes "Perhaps you should come back later."; + close; + +OnInit: + if (puppet("001-2", 104, 19, "Desert Mana Seed#_M", 166) < 1) mapexit; + if (puppet("001-2", 99, 22, "Wizard#1", 355) < 1) mapexit; + if (puppet("001-2", 92, 24, "Wizard#2", 356) < 1) mapexit; + if (puppet("001-2", 92, 30, "Wizard#3", 357) < 1) mapexit; + if (puppet("001-2", 99, 32, "Wizard#4", 358) < 1) mapexit; + if (puppet("001-2", 110, 22, "Wizard#5", 359) < 1) mapexit; + if (puppet("001-2", 117, 24, "Wizard#6", 360) < 1) mapexit; + if (puppet("001-2", 117, 30, "Wizard#7", 361) < 1) mapexit; + if (puppet("001-2", 110, 32, "Wizard#8", 362) < 1) mapexit; + if (puppet("001-2", 104, 27, "Arch-Wizard#9", 354) < 1) mapexit; + end; +} diff --git a/npc/001-2/yanis.txt b/npc/001-2/yanis.txt new file mode 100755 index 00000000..df2d8678 --- /dev/null +++ b/npc/001-2/yanis.txt @@ -0,0 +1,39 @@ + +001-2,31,21,0 script Yanis NPC107,{ + QUEST_NorthTulimshar = QUEST_NorthTulimshar | $@knowYanisNT; + @halloween_npc_id = $@halloween_npc_yanis; + callfunc "TrickOrTreat"; + + goto L_Base_Menu; + +L_Base_Menu: + + mes "[Yanis]"; + mes "\"Welcome. I'm handling issues with trading licenses for the shop owners in Tulimshar. Can I help you?\""; + if (QL_IMEC != 1) + menu + "Nothing right now.",L_BeforeClose; + menu + "Imec asked me to bring this petition.",L_Next, + "Nothing right now.",L_BeforeClose; + +L_Next: + mes "[Yanis]"; + mes "\"Imec? I see. Give it to me.\""; + mes "Yanis has a disapproving look on his face. He takes the letter and writes something on another paper."; + next; + mes "[Yanis]"; + mes "\"Here you have a letter of acknowledgement. You can bring that back to Imec. We will have a look at his case.\""; + QL_IMEC = 2; + goto L_BeforeClose; + +L_BeforeClose: + if (QL_KYLIAN != 3) + goto L_close; + next; + mes "You think that this is the person Kylian needs to talk to. You should tell him."; + goto L_close; + +L_close: + close; +} diff --git a/npc/001-3-0/_import.txt b/npc/001-3-0/_import.txt deleted file mode 100644 index 502507be..00000000 --- a/npc/001-3-0/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-3-0: Sewer -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-3-0/_mobs.txt", -"npc/001-3-0/_warps.txt", -"npc/001-3-0/gates.txt", -"npc/001-3-0/mundane.txt", diff --git a/npc/001-3-0/_mobs.txt b/npc/001-3-0/_mobs.txt deleted file mode 100644 index 49443d5a..00000000 --- a/npc/001-3-0/_mobs.txt +++ /dev/null @@ -1,39 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-0: Sewer mobs -001-3-0,175,32,2,2 monster Ratto 1005,2,60000,30000 -001-3-0,201,54,2,2 monster Ratto 1005,3,25000,10000 -001-3-0,151,97,18,1 monster Ratto 1005,3,40000,15000 -001-3-0,101,111,8,3 monster Ratto 1005,4,30000,15000 -001-3-0,145,68,2,2 monster Ratto 1005,2,60000,30000 -001-3-0,146,28,2,1 monster Ratto 1005,2,60000,30000 -001-3-0,89,66,2,4 monster Ratto 1005,3,35000,15000 -001-3-0,56,50,8,4 monster Ratto 1005,4,35000,15000 -001-3-0,42,102,3,3 monster Ratto 1005,3,40000,20000 -001-3-0,157,80,2,2 monster Green Slime 1024,3,15000,80000 -001-3-0,190,58,3,19 monster Cave Maggot 1027,7,5000,15000 -001-3-0,172,46,1,2 monster Cave Maggot 1027,3,5000,15000 -001-3-0,175,50,0,4 monster Ratto 1005,2,60000,30000 -001-3-0,175,64,3,2 monster Cave Maggot 1027,4,5000,15000 -001-3-0,104,75,48,43 monster Cave Maggot 1027,25,500,2000 -001-3-0,90,68,1,6 monster Cave Maggot 1027,3,500,2000 -001-3-0,128,86,3,5 monster Green Slime 1024,3,500,2000 -001-3-0,42,103,3,5 monster Green Slime 1024,3,500,2000 -001-3-0,120,85,7,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,147,122,3,5 monster Green Slime 1024,2,500,2000 -001-3-0,147,122,3,5 monster Green Slime 1024,2,500,2000 -001-3-0,107,109,4,2 monster Green Slime 1024,3,500,2000 -001-3-0,139,32,10,4 monster Little Green Slime 1025,2,500,2000 -001-3-0,86,131,4,2 monster Little Green Slime 1025,3,500,2000 -001-3-0,175,31,4,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,147,67,4,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,55,50,5,3 monster Giant Maggot 1076,1,25000,20000,Henry#001-3-2::OnGiantMaggot -001-3-0,117,60,5,0 monster Cave Maggot 1027,25,500,2000 -001-3-0,156,43,5,2 monster Crafty 1018,3,12000,20000 -001-3-0,178,76,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,86,97,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,86,48,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,61,104,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,54,85,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,114,62,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,167,100,6,1 monster Tortuga 1004,1,35000,300000 -001-3-0,41,104,2,3 monster Giant Maggot 1076,1,15000,15000,Henry#001-3-2::OnGiantMaggot diff --git a/npc/001-3-0/_warps.txt b/npc/001-3-0/_warps.txt deleted file mode 100644 index d192e4ef..00000000 --- a/npc/001-3-0/_warps.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-0: Sewer warps -001-3-0,196,35,0 warp #001-3-0_196_35 0,0,001-1,197,35 -001-3-0,172,41,0 warp #001-3-0_172_41 0,0,001-3-1,34,58 -001-3-0,162,40,0 warp #001-3-0_162_40 0,0,001-3-1,23,57 -001-3-0,198,60,0 warp #001-3-0_198_60 0,0,001-1,199,61 -001-3-0,152,55,0 warp #001-3-0_152_55 0,0,001-1,152,51 -001-3-0,85,130,0 warp #001-3-0_85_130 0,0,001-1,86,130 diff --git a/npc/001-3-0/gates.txt b/npc/001-3-0/gates.txt deleted file mode 100644 index e8accc96..00000000 --- a/npc/001-3-0/gates.txt +++ /dev/null @@ -1,201 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Sewer Gates, and Wheels. - -001-3-0,90,62,0 script #ArtisThiefGate_1 NPC_SEWER_GATE,0,0,{ - // Extract the quest ID from name (or fail trying) - explode(.@ni$, .name$, "_"); - .@id=atoi(.@ni$[1]); - - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - - // Check what you can do with the gate - if (.@q != .@id) { - mes l("This gate is closed."); - mesc l("No need to go through here, so lets not bother with it now."); - } else if (.@q2 != 2) { - mes l("This gate is closed."); - mesc l("It seems that it can be open using the mechanism on the side."); - } else { - mes l("This gate is open."); - mesc l("I should still be careful to don't get caught."); - } - close; - -OnTouch: - updateSpotlight(true); - end; - -OnOpenSesame: - // Opening - if (!.busy) { - .dir=2; - .busy=true; - initnpctimer; - } - end; - -// Open -OnTimer2200: - .dir=4; - end; - -// Closing -OnTimer8000: - .dir=6; - end; - -// Closed -OnTimer10400: - .dir=0; - end; - -// Don't reply immediately, wait a tiny bit -OnTimer11000: - .busy = false; - stopnpctimer; - -OnInit: - .busy = false; - .distance = 1; - end; -} - - - -001-3-0,92,61,0 script #ArtisThiefWheel_1 NPC_SEWER_WHEEL,{ - // Extract the quest ID from name (or fail trying) - explode(.@ni$, .name$, "_"); - .@id=atoi(.@ni$[1]); - - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - - if (.@q != .@id) { - speech - l("This wheel seems to be connected to the locked gate on the side."), - l("Having to reason to tinker with it, you don't."); - close; - } - speech - l("You try to move this wheel, but it is stuck. Something seems to be missing."), - l("Maybe some monster ate it, but what would be big enough to do that?!"); - - // Switch gearwheel status: 1(looted) 2(unlooted) - switch (.@q2) { - case 1: - // Looted but lost? D: - if (!countitem(Gearwheel)) { - mesc l("If we only had a %s.", getitemlink(Gearwheel)); - close; - } - - // Prompt player - mesc l("Should we install the %s and move it?", getitemlink(Gearwheel)), 1; - if (askyesno() == ASK_NO) - break; - - delitem Gearwheel, 1; - setq2 ThiefQuests_Artis, 2; - // FALLTHROUGH - case 2: - mesc l("With the %s in place, it only takes a bit more effort to make it budge.", getitemlink(Gearwheel)); - next; - closeclientdialog; - // Spin the wheel - if (!.busy) { - .dir = 4; - .busy = true; - initnpctimer; - } - // Open the gate - addtimer 500, "#ArtisThiefGate_"+.@id+"::OnOpenSesame"; - break; - default: - } - close; - -// Done spinning? -OnTimer4000: - .dir = 0; - .busy = false; - stopnpctimer; - -OnInit: - .busy = false; - .distance = 2; - end; -} - - - -// We're missing a gate! -001-3-0,56,44,0 duplicate(#ArtisThiefGate_1) #ArtisThiefGate_4 NPC_SEWER_GATE,2,2 -001-3-0,58,43,0 duplicate(#ArtisThiefWheel_1) #ArtisThiefWheel_4 NPC_SEWER_WHEEL - - -/////////////////////////// -// The controlled warps -001-3-0,90,61,0 script #001-3-0_90_61 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - // No enter except when q1 and q2 matches - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - if (.@q != 1 || .@q2 != 2) - end; - - // Delete previous timers. Makes easier to cheat but more reliable (FIXME) - deltimer("#ArtisThiefBook_0::OnBust1"); - deltimer("#ArtisThiefBook_0::OnBust2"); - deltimer("#ArtisThiefBook_0::OnBust3"); - deltimer("#ArtisThiefBook_0::OnBust4"); - - // Archives: Begin - addtimer 30000, "#ArtisThiefBook_0::OnBust1"; - warp "001-2-43", 51, 34; - end; -} - -001-3-0,56,43,0 script #001-3-0_56_43 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - // No enter except when quest state allows you to - // I thought in letting you use this passage and get busted anytime... - // ...........Better not. Animation will not like it, anyway. - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - if (.@q != 4 || .@q2 != 2) - end; - - warp "001-2-40", 56, 40; - addtimer2(rand2(3000, 7000), .name$+"::OnBusted"); - end; - -// Henry said to you don't use the gate, because you are not discrete enough. -// Poor player, this is what happens for not paying attention to Henry's advise. -OnBusted: - if (getmap() != "001-2-40") - end; - - mesn l("Legion Officer"); - mes l("HEY! How you got here!?"); - next; - // Check if you'll be caught - if (ArrestedChances()) { - mesc l("Arrested!"); - mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); - ArrestPlayer(5); - } else { - mesc l("You're almost found out, but manage to make a quick escape!"); - warp "001-1", 41, 36; - } - close; -} - - diff --git a/npc/001-3-0/mundane.txt b/npc/001-3-0/mundane.txt deleted file mode 100644 index 58a47cb2..00000000 --- a/npc/001-3-0/mundane.txt +++ /dev/null @@ -1,208 +0,0 @@ -// Evol Scripts -// Author: -// Jesusalva -// Description: -// Mundane (anagram of Unnamed) is Mona's father -// He likes to smoke cigarettes while looking for the strange sounds. -// He is an old bowman of the Legion. He was married but it is not clear -// what happened to his wife. -// Lore Problems: -// If he is missing for a week already, how is he eating anyway? -// Also, is he afraid of blubs/rattos or of Green Slimes? - -// Note: Jesusalva is not someone to care a lot with code styling, and he uses -// a convention of his own, gumi will need to cleanse the code before it gets -// compliant with Evol Coding Style Guidelines. -// Note 2: Logout is not handled. Making logout at an instanced map may randomly -// warp you back to Drasil Island (000-1) or something like that. I don't know. -// This behavior remains to be checked. - -001-3-0,96,66,0 script Mundane NPC_MUNDANE,{ - - function quest_completed - { - speech(0x0, - l("No matter how many times I come here, I can't find the reason for the strange sounds..."), - l("It is either a huge monster, some cultists, or someone throwing strange stuff into sewers.")); - close; - } - - function quest_inprogress - { - speech(0x0, - l("We need to get out of here soon. I'm scared of the Slimes!")); - close; - } - - function rescue_mundane - { - speech(S_LAST_NEXT, - l("Scary... I am afraid of all these Slimes, Rattos and Maggots... And worse, I am lost..."), - l("I was an archer of the Legion and shouldn't be scared of a few maggots, but everyone has fears, right?!"), - l("My daughter is probably worried about me. Could you perhaps lead me out of here?")); - - switch (select(l("Yes, follow me!"), l("Not now. You see, I am also afraid of Slimes and Rattos!"))) - { - case 1: - mes ""; - break; - case 2: - speech(S_FIRST_BLANK_LINE, - l("That's too bad... Although I think you're lying."), - l("If so, please take some courage and help me!")); - close; - break; - } - .@ID=getcharid(0); - .@MAP_NAME$="mona@"+str(.@ID); - @MUNDANE_INSTID = instance_create("001-3-0@a"+(.@ID), getcharid(3), IOT_CHAR); - - // XXX - Important Note - XXX - // We currently have only FOUR chars to name the map. "001-3-0" or "mundane" have 7 chars, so that cannot be used. - // Thankfully, "mona" have 4 chars, so it's the name. - // - // Rationale: We have only 11 chars available, but 7 are reserved. So, longest name would be "abcd" + "@" + getcharid(0) - // Some test reported that (apparently) we have 15 whitespaces at map name start, not sure why. - .@instanceMapName$ = instance_attachmap("001-3-0", @MUNDANE_INSTID, 0, .@MAP_NAME$); - - // This can be a bug, but most likely is because instance already exists. - // I don't know what would happen if we continue, so let's "penalize" the player - if (.@instanceMapName$ == "") { - speech(0x0, - l("Wait... You are that @@ from earlier, aren't you?", strcharinfo(0)), - l("If my memory serves me right, you were just defeated. Why don't you go out to buy better equipment?")); - close; - } - - // You have 5 minutes to complete the quest. This does not results in failure by itself, getq2 does that - instance_set_timeout(300, 300, @MUNDANE_INSTID); - instance_init(@MUNDANE_INSTID); - dispbottom(l("Mona's father is right behind you. You have five minutes to bring him out of sewers!")); - - // Note: Difficulty is based on your level - .@BLVLBOOST=BaseLevel/10; - areamonster(.@MAP_NAME$, 119, 51, 162, 85, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 190, 65, 193, 68, strmobinfo(1, Ratto), Ratto, 5); - areamonster(.@MAP_NAME$, 90, 67, 92, 72, strmobinfo(1, CaveMaggot), CaveMaggot, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 99, 106, 102, 111, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 115, 93, 115, 75, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 120, 85, 7, 2, strmobinfo(1, LittleSlime), LittleSlime, 7+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 114, 65, 121, 68, strmobinfo(1, CaveMaggot), CaveMaggot, 5+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 137, 76, 130, 87, strmobinfo(1, Spider), Spider, 4+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 98, 92, 101, 94, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - - // Important temporary variables and move you accordingly - @MUNDANE_OLDX=.x; - @MUNDANE_OLDY=.y; - warp(.@MAP_NAME$, .x, .y); - // Move NPC as well - unitwarp(getnpcid(instance_npcname(.name$, @MUNDANE_INSTID)), .@MAP_NAME$, .x, .y); - - setq ArtisQuests_MonaDad, 2; - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - updateSpotlight(true); - close; - - } - - .@q=getq(ArtisQuests_MonaDad); - if (.@q >= 3) quest_completed(); - if (.@q == 2) quest_inprogress(); - if (.@q == 1) rescue_mundane(); - // Impossible situation, but let's not trust this. You must talk to Mona first! - if (.@q == 0) quest_completed(); - - hello; - end; - -// This functions serves two major purposes: -// 1- Move Mundane accordingly -// 2- Be able to determine if you brought Mundane to exit or cheat (warp, etc.) -// NOTE: Using instance_npcname(.name$) can be unreliable at times. -// It should work with addtimer(), but if it breaks, move @MUNDANE_INSTID to -// the @ varspace, and use instance_npcname(.name$, @MUNDANE_INSTID) -// That'll fix any problem when playtesting. -OnMove: - getmapxy(.@m$, .@x, .@y, 0); - // You left the map, we don't need to move NPC anymore - if (!(.@m$ ~= "mona@*") && (.@m$ != "001-3-0")) { - disablenpc(instance_npcname(.name$, @MUNDANE_INSTID)); - // This check shouldn't be needed but better safe than sorry - if (.@m$ == "001-1") - dispbottom l("Mundane ran straight home. He must be missing his daughter."); - else - dispbottom l("Mundane ran away, he did not trust the path you chose."); - end; - } - // We actually won't move the NPC to your position, but to where you were last. - // The NPC should not walk right in you because I thought it looks weird ingame. - if (.@x == @MUNDANE_OLDX && .@y == @MUNDANE_OLDY) { - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - end; - } - - // movenpc() will cause NPC to "jump" to player position. - // npcwalkto(x, y) will make it walk to your position. - npcwalkto @MUNDANE_OLDX, @MUNDANE_OLDY; - - // We now update the misleading @MUNDANE_OLD* variable with your current - // position. - @MUNDANE_OLDX=.@x; - @MUNDANE_OLDY=.@y; - // We must handle this every 150ms or so, which is player walk delay. - // When you leave the map this timer will die. - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - end; - -OnInit: - .distance = 3; - .speed = 140; - -// Move Mundane every Sunday, Wednesday, and Friday -// to be less repetitive, and save also where it is -OnSun0000: -OnWed0000: -OnFri0000: - if (.begin) - delcells "MundaneProtection"; - - // Micksha may tweak this. - setarray .@valid_x, 96, 132, 150, 49; - setarray .@valid_y, 66, 86, 118, 47; - .@index=rand(0,getarraysize(.@valid_x)-1); - movenpc .name$, .@valid_x[.@index], .@valid_y[.@index]; - - // Create a 3x3 monster collision block over Mundane - setcells .map$, .x-3, .y-3, .x+3, .y+3, 6, "MundaneProtection"; - .begin=true; - end; - -OnInstanceInit: - .speed = 140; // Double-sure - end; - -} - -function script MundaneLogout { - if (getq(ArtisQuests_MonaDad) != 2) return; - setq ArtisQuests_MonaDad, 1; - return; -} - -function script MundaneDeath { - if (getq(ArtisQuests_MonaDad) != 2) return; - setq ArtisQuests_MonaDad, 1; - dispbottom l("What a pity! You've died."); - - // We must disable Mona's Dad NPC sprite if you are still on the map - // This will cause the NPC to "vanish", player is left to guess that he ran - // back to where he originally was. - // (ie. The NPC won't be fine without you if we have code to handle that). - // NOTE: Maybe we could send the NPC running back to his original position? - // For future thought and testing by anyone interested. - if (strpos(getmap(), "mona@") >= 0) { - disablenpc(instance_npcname(.name$, @MUNDANE_INSTID)); - } - return; -} - diff --git a/npc/001-3-1/_import.txt b/npc/001-3-1/_import.txt deleted file mode 100644 index 3462861c..00000000 --- a/npc/001-3-1/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-3-1: Rivercave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-3-1/_mobs.txt", -"npc/001-3-1/_warps.txt", -"npc/001-3-1/gates.txt", diff --git a/npc/001-3-1/_mobs.txt b/npc/001-3-1/_mobs.txt deleted file mode 100644 index 3bc6a97a..00000000 --- a/npc/001-3-1/_mobs.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-1: Rivercave mobs -001-3-1,32,21,3,0 monster Green Slime 1024,3,15000,80000 -001-3-1,27,33,0,1 monster Little Green Slime 1025,3,10000,50000 -001-3-1,23,24,0,1 monster Little Green Slime 1025,3,10000,50000 -001-3-1,26,21,0,1 monster Poison Skull 1100,1,10000,30000 -001-3-1,28,44,3,1 monster Cave Maggot 1027,4,5000,15000 -001-3-1,29,27,6,4 monster Cave Maggot 1027,5,2000,10000 diff --git a/npc/001-3-1/_warps.txt b/npc/001-3-1/_warps.txt deleted file mode 100644 index f0c3d747..00000000 --- a/npc/001-3-1/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-1: Rivercave warps -001-3-1,24,58,0 warp #001-3-1_24_58 1,0,001-3-0,162,41 -001-3-1,35,59,0 warp #001-3-1_35_59 1,0,001-3-0,172,42 diff --git a/npc/001-3-1/gates.txt b/npc/001-3-1/gates.txt deleted file mode 100644 index f3c1a038..00000000 --- a/npc/001-3-1/gates.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol scripts. -// Author: -// Micksha, Jesusalva -// Description: -// The Sewer Gates, and Wheels. - -// Brotherhood hideout, the door opens by itself if player -// can now talk to Sopiahalla. -001-3-1,30,19,0 script #001-3-1_30_19 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - .@q=getq(General_Brotherhood); - updateSpotlight(true); - if (.@q) - warp "001-3-2", 30, 116; - end; -} - -// The gate itself -001-3-1,30,20,0 script #Gate3 NPC_SEWER_GATE,2,2,{ - .@q=getq(General_Brotherhood); - if (.@q) - mes l("This gate opens on its own for you... Should we go inside?"); - else - mes l("This gate is closed."); - close; - -OnTouch: - .@q=getq(General_Brotherhood); - updateSpotlight(true); - // Opening - if (!.busy && .@q) { - .dir=2; - .busy=true; - initnpctimer; - } - end; - -// Open -OnTimer2200: - .dir=4; - end; - -// Closing -OnTimer8000: - .dir=6; - end; - -// Closed -OnTimer10400: - .dir=0; - end; - -// Don't reopen immediately, wait a tiny bit -OnTimer11000: - .busy=false; - stopnpctimer; - -// Initial configuration -OnInit: - .busy=false; - .distance = 2; - end; -} - diff --git a/npc/001-3-2/_import.txt b/npc/001-3-2/_import.txt deleted file mode 100644 index e627928d..00000000 --- a/npc/001-3-2/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 001-3-2: Hideout -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-3-2/_warps.txt", -"npc/001-3-2/henry.txt", -"npc/001-3-2/smuggler.txt", diff --git a/npc/001-3-2/_warps.txt b/npc/001-3-2/_warps.txt deleted file mode 100644 index 6b35b231..00000000 --- a/npc/001-3-2/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-2: Hideout warps -001-3-2,30,117,0 warp #001-3-2_30_117 0,0,001-3-1,30,20 diff --git a/npc/001-3-2/henry.txt b/npc/001-3-2/henry.txt deleted file mode 100644 index cfff8b56..00000000 --- a/npc/001-3-2/henry.txt +++ /dev/null @@ -1,374 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Henry, a Thief Faction member managing the Hideout in Artis. -// Pretends to be a nice pirate. - -001-3-2,24,51,0 script Henry#001-3-2 NPC_HENRY,{ - function proposeFirstQuest; - function reportFirstQuest; - function proposeSecondQuest; - function reportSecondQuest; - function proposeThirdQuest; - function reportThirdQuest; - function completedHenry; - - .@q=getq(ThiefQuests_Artis); - switch (.@q) { - case 0: - proposeFirstQuest(); - break; - case 1: - case 2: - reportFirstQuest(); - break; - case 3: - proposeSecondQuest(); - break; - case 4: - case 5: - reportSecondQuest(); - break; - case 6: - proposeThirdQuest(); - break; - case 7: - case 8: - reportThirdQuest(); - break; - default: - completedHenry(); - break; - } - close; - -/////////////////////////////////////////////////////// -function proposeFirstQuest { - speech - l("Stop! Who's there?"), - l("Ah, its you. Sophialla already informed me. I can help you to go to Woodland, but you also could do me a favor."), - l("The Legion has been on my tail for a while. They're a bit annoying, you know."), - l("I mean, what's wrong with smuggling goods?! The town markets would have way less stuff otherwise. You can understand me, right? Don't answer."), - l("Anyway, you want to get on our pirate ship, right? So you better help me out!"), - b(l("In Artis Townhall Archives,"))+" "+l("there is an entry about me."), - l("If they somehow catch me again, they'll use this entry as evidence to get me on a harsher punishment..."), - l("So please find my file on the archives and, I don't know, deal with it?"), - l("I am smart, I'll know if you lie. Anyway, just don't get caught inside the archives."); - //l("After messing with the Major and the Legion here, I can teach you lockpicking. Ah, and you may try to find my friend Nunia in Woodland, once you go there. She seems to be disappeared."), - //l("Call for Micksha and Jesusalva to implement all this, please."); - next; - mesc l("Accept this quest?"), 3; - if (askyesno() == ASK_YES) { - mesn; - mesq l("Great! Then I'll be counting on you!"); - setq ThiefQuests_Artis, 1, 0, 2**rand2(17); - } - return; -} - -function reportFirstQuest { - .@q=getq(ThiefQuests_Artis); - mesn; - mesq l("Have you already did what I asked you to?"); - select - l("Not yet, but I'll be back."), - l("What was I supposed to do, again?"), - l("Yes, the file has been dealt with."); - mes ""; - switch (@menu) { - case 1: - mesn; - mesq l("I'm not in hurry if you're not in hurry..."); - break; - case 2: - speech - l("You should invade the townhall archives - I don't care how."), - l("There'll be a file about an... incident... with me. Deal with the file - I also don't care how."), - l("Try to don't get too much attention, or they'll arrest you as well."); - break; - case 3: - mesn; - mesq l("Hm... Then tell me, what was I wearing on the file picture?"); - next; - select - l("A fancy hat."), - l("A shemagh or a shawl."), - l("Sunglasses."), - l("A santa hat."), - l("A top hat."), - l("A legion armor."), - l("An eye patch."), - l("A bandit hood."), - rif(.@q == 2, l("There was no picture on the file.")); - mes ""; - if (@menu != 9) { - mesc l("%s lunges at you!", strnpcinfo(1)); - mesc l("You've been stabbed!"), 1; - mes ""; - mesn; - mesq l("Now I know you're lying; Go find my file and deal with it!"); - percentheal -15, 0; - close; - } else { - // WUT How did this even happen?! - if (.@q != 2) - atcommand("@kick "+strcharinfo(0)); - - // TODO: Reward - mesn; - mesq l("Heh... I hope you disposed of the file."); - next; - mesn; - mesq l("I'll keep my end of the bargain. The Hand- I mean, we pirates will bring you to the Argaes region."); - next; - mesn; - mesq l("Can't bring you directly to the town because some... misunderstandings, but don't worry."); - next; - mesn; - mesq l("Anyway, here's some gold. I might have another task for you if you want."); - // Reward Reference: Lv 10 - quest_xp(.maxLevel_1, 30, BaseLevel); - quest_jxp(.maxLevel_1, 30); - Zeny+=300; - setq ThiefQuests_Artis, 3; - // Previous state already wiped this: - //setq2 ThiefQuests_Artis, false; // Restart wheels - } - - } - return; -} - -/////////////////////////////////////////////////////// -function proposeSecondQuest { - speech - l("Ah, its you again. Welcome back."), - l("So, if you want to go to Hurnscald, just talk to the pirate down there."), - l("Anyway, I still could use your help! You see, I would like to play tricks on the legion members during the night."), - l("For this, I would like you to to repair the secret passage to the Legion Building."), - l("Don't use the passage, you're not skilled enough and will be busted! Just repair it, it'll be enough."); - mesc l("You suspect that he is withholding information. Do he really only wants to do pranks? But then, do you care with what he wants to do inside?"); - next; - mesc l("Accept this quest?"), 3; - select - l("Actually, I wanted to ask you something."), - l("Yes"), - l("No"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Great! Then I'll be counting on you!"); - setq1 ThiefQuests_Artis, 4; - close; - } else if (@menu == 1) { - mesn; - mesq l("Shush - No questions."); - next; - mesn; - mesq l("Thie-- *ahem* pirates do not reply to questions."); - next; - mesn; - mesq l("...What? I'm totally a pirate. Arr harr! See? Pirate."); - } - return; -} - -function reportSecondQuest { - mesn; - mesq l("Have you already did what I asked you to?"); - next; - select - l("Not yet, but I'll get to it."), - l("What was I supposed to do, again?"), - l("Yes, the deed is done."); - mes ""; - switch (@menu) { - case 1: - break; - case 2: - speech - l("In the sewers, there is a passage to the Legion basement."), - l("I want to get in there, so please do me a favor, and repair the gate. Don't try to go inside yourself, you'll be caught."), - l("Also - don't ask me why I want this. Thieves doesn't make questions. You better remember this!"); - break; - case 3: - mesn; - mesq l("Great! I'll send a scout to check. I hope you didn't blew up everything by going there, you're not very discrete."); - next; - mes "..."; - next; - .@q2=getq2(ThiefQuests_Artis); - if (.@q2 != 2) { - mesn; - mesq l("Nope, it is still sealed tight. Go do your job if you want a reward."); - break; - } - mesn; - mesq l("Alright - This will be... good. Anyway, I should give you a reward."); - next; - mesn; - mesq l("Take this %s. There is something good on it; Just use a %s.", - getitemlink(TreasureMap), getitemlink(IronShovel)); - - // Obtain the map, quest is done - inventoryplace TreasureMap, 1; - getitem TreasureMap, 1; - quest_jxp(.maxLevel_2, 100); - setq1 ThiefQuests_Artis, 6; - - // Override the treasure location, if already existing - .@m$="001-1"; - .@x=any(199, 200); - .@y=any(61,62); - - shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure"); - ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); - ShovelQuests_AssignedX=.@x; - ShovelQuests_AssignedY=.@y; - - // TODO: If we add a daily legion quest, it must be "redemption"~ish - // That is, destroy points from all other three factions - // ...Also, is *this* specific code a good idea at all? - .@t$=faction_addrep("Legion", -15); - mesc .@t$; - .@t$=faction_addrep("Thief", 15); - mesc .@t$; - next; - mesn; - mesq l("I don't know how to get a shovel, though."); - next; - mesn; - mesq l("Remember: \"Use\" the map, and use the debugger (F10) or \"/where\" in chat to check your coordinates!"); - } - return; -} - -/////////////////////////////////////////////////////// -function proposeThirdQuest { - speech - l("Thanks for the help the other day."), - l("I have a beloved friend called Nunia, who handles the Thieves' Guild branch in Hurnscald."), - l("Bet you thought we were simple pirates, right? No smart remarks, please."), - l("Anyway, I haven't heard about her from quite a while, which is concerning."), - l("Could you please go there see if she is well?"), - l("I'll give you something... useful... If you want to pursue in being a thief. I'll even put a good word about you... If you manage to find our headquarters somewhere in the world, that is!"); - next; - mesc l("Accept this quest?"), 3; - if (askyesno() == ASK_YES) { - mesn; - mesq l("Great! Then I'll be counting on you!"); - setq1 ThiefQuests_Artis, 7; - close; - } - return; -} - -function reportThirdQuest { - mesn; - mesq l("Have you already did what I asked you to?"); - next; - select - l("Not yet, but I'll get to it."), - l("What was I supposed to do, again?"), - l("Yes, the deed is done."); - mes ""; - switch (@menu) { - case 2: - speech - l("My beloved friend Nunia in Hurnscald went missing."), - l("I mean, I do not receive any letter from her for a while, so I got worried."), - l("I would like you to check how she is doing. You know, the Brotherhood could have got her and she is in need of rescue, or something else."); - break; - case 3: - .@q=getq(ThiefQuests_Artis); - mesn; - mesq l("Before you go on any further, I wanna see the proof that you talked with her."); - next; - if (.@q != 8) { - mesc l("You don't know what sort of proof he is looking for."); - break; - } - - select - l("She has white hair, blue eyes, and always carry a big sack."), - l("She told me a passphrase."); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Liar; Nunia is not creative enough to come up with a passphrase of her own!"); - next; - mesn; - mesq l("Besides, if she could give you a passphrase, then I wouldn't have sent ya."); - break; - } - - mesn; - mesq l("That's Nunia alright. So how she is doing?"); - next; - mesc l("You describe to him how Nunia is supposed to lay low for a while."); - next; - mesn; - mesq l("Of course. I'm glad she is safe. You know, we don't really care with this Legion versus Brotherhood stifle."); - next; - mesn; - mesq l("The brotherhood spies here are... friendly, but mostly because our interests coincide. But in Hurnscald, where their main base is, we're enemies."); - next; - inventoryplace Lockpicks, 5; - mesn; - mesq l("Anyway, thanks for the report. I'll give you some %s.", getitemlink(Lockpicks)); - next; - mesn; - mesq l("Whenever you find a vault, a door, or anything of interest, you can use it to pry it open."); - next; - mesn; - mesq l("Lockpicks are not keys, they can break quite easily. Also, you don't want anyone watching you."); - next; - mesn; - mesq l("If you are caught while lockpicking, you'll be arrested. So be careful."); - // TODO: Add a lock here where player can train without being arrested. - next; - mesn; - mesq l("I have other matters to attend do, so you'll have to excuse me."); - quest_item(.maxLevel_3, Lockpicks, 5); - setq1 ThiefQuests_Artis, 9; - break; - } - return; -} - -/////////////////////////////////////////////////////// -function completedHenry { - mesc l("He seems to ignore you."); - mesc l("Probably better not disturb him."); - return; -} - - -/////////////////////////////////////////////////////// -OnInit: - .distance = 3; - .maxLevel_1 = 15; - .maxLevel_2 = 25; - .maxLevel_3 = 35; - end; - -OnGiantMaggot: - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - .@max=(.@q == 1 ? true : (.@q == 4 ? true : false)); - - // To drop, or not to drop...? - if (!.@q2 && .@max) { - if (rand2(10000) < 1800) { - getitem Gearwheel, 1; - setq2 ThiefQuests_Artis, true; - } - } - - // Eh, whatever, continue with what you were doing, script. - fix_mobkill(GiantMaggot); - end; -} - diff --git a/npc/001-3-2/smuggler.txt b/npc/001-3-2/smuggler.txt deleted file mode 100644 index 965dba66..00000000 --- a/npc/001-3-2/smuggler.txt +++ /dev/null @@ -1,84 +0,0 @@ -// Evol scripts. -// Author: -// Micksha, Toams, Jesusalva -// Description: -// The rowboat, picking up the player on the fake pier and bringing them to -// Argaes Westport. - -001-3-2,71,85,6 script Smuggler NPC_ROWBOAT_STAND_WE,{ - function smugglerNotAuthorized; - function smugglerBoarding; - mesn; - mesq l("Hey dude, we actually have a pretty cool pirate ship near Artis."); - next; - mesn; - mesq l("This lake may look natural, but it is not quite so. We're at sea level."); - next; - .@q=getq(ThiefQuests_Artis); - if (.@q < 3) - smugglerNotAuthorized(); - mesn; - mesq l("Cool, right?"); - next; - select - l("Yes."), - l("So? Will you bring me to Argaes?"); - mes ""; - if (@menu == 2) - smugglerBoarding(); - close; - -function smugglerNotAuthorized { - mesn; - mesq l("We smuggle not only goods, but people too. If Henry gives me the word..."); - next; - mesn; - mesq l("Hehehe... I've heard Hurnscald is wonderful at this time of the year!"); - close; - return; -} - -function smugglerBoarding { - mesn; - mesq l("Sure! Hold tight."); - next; - while (.lock) - { - mesn; - mesq l("Just let me finish this first..."); - next; - } - setcam (76*32), (85*32); - closeclientdialog; - .lock=true; - setpcblock(PCBLOCK_MOVE, true); - npcwalkto(76, 85); - sleep2(1000); - //setmount 1; - //warp "001-1", 227, 62; - - PC_DEST$="Argaes"; - @timer_navio_running = 1; - addtimer 210000, "#MarineShip::OnEvent"; // This route is 30s slower - warp "marine-2", 40, 32; - dispbottom l("You're smuggled aboard the Legion expedition. ACT NATURALLY!"); - - detachrid(); - .dir = 2; - npcwalkto(71, 85); - sleep(1000); - .dir = 6; - .lock=false; - end; - return; -} - -OnInit: - .distance = 4; - .speed = 175; - .alwaysVisible = true; - .lock = false; - end; - -} - diff --git a/npc/001-3/_import.txt b/npc/001-3/_import.txt new file mode 100644 index 00000000..4bcf3b3b --- /dev/null +++ b/npc/001-3/_import.txt @@ -0,0 +1,7 @@ +// Map 001-3: Tulimshar Arena +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/001-3/_mobs.txt", +"npc/001-3/_warps.txt", +"npc/001-3/guards.txt", +"npc/001-3/mapflags.txt", +"npc/001-3/pvpflag.txt", diff --git a/npc/001-3/_mobs.txt b/npc/001-3/_mobs.txt new file mode 100644 index 00000000..908b7fc5 --- /dev/null +++ b/npc/001-3/_mobs.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 001-3: Tulimshar Arena mobs +001-3,0,0,0,0 monster Piou 1002,10,0,0 diff --git a/npc/001-3/_warps.txt b/npc/001-3/_warps.txt new file mode 100644 index 00000000..f0afb857 --- /dev/null +++ b/npc/001-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 001-3: Tulimshar Arena warps +001-3,73,28,0 warp #001-3_73_28 0,0,002-2,74,59 diff --git a/npc/001-3/guards.txt b/npc/001-3/guards.txt new file mode 100755 index 00000000..21bebab0 --- /dev/null +++ b/npc/001-3/guards.txt @@ -0,0 +1,32 @@ +001-3,77,37,0 script Phaet#arena NPC125,{ + mes "[Phaet the Royal Guard]"; + mes "\"Do you want to go back?\""; + next; + menu + "Yes", L_Sure, + "No", L_Next; + +L_Next: + mes "Have fun."; + close; + +L_Sure: + mes "[Phaet the Royal Guard]"; + mes "\"Ok.\""; + next; + if(DUELS & $@DuelPvpBit) goto L_FightClub; + warp "002-2", 74, 59; + close; + +L_FightClub: + DUELS = DUELS &~ $@DuelPvpBit; + warp "009-7", 39, 37; + close; +} + +001-3,69,37,0 script Aradin NPC126,{ + mes "[Aradin the Royal Guard]"; + mes "\"Don't touch me..."; + mes "You wouldn't enjoy the consequences.\""; + close; +} diff --git a/npc/001-3/mapflags.txt b/npc/001-3/mapflags.txt new file mode 100755 index 00000000..04479442 --- /dev/null +++ b/npc/001-3/mapflags.txt @@ -0,0 +1,2 @@ +001-3 mapflag nosave 002-2,74,59 +//001-3 mapflag resave 002-2,74,59 diff --git a/npc/001-3/pvpflag.txt b/npc/001-3/pvpflag.txt new file mode 100755 index 00000000..50d670bd --- /dev/null +++ b/npc/001-3/pvpflag.txt @@ -0,0 +1 @@ +001-3 mapflag pvp diff --git a/npc/002-1/_import.txt b/npc/002-1/_import.txt new file mode 100644 index 00000000..7b375b44 --- /dev/null +++ b/npc/002-1/_import.txt @@ -0,0 +1,20 @@ +// Map 002-1: Tulimshar South +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/002-1/_mobs.txt", +"npc/002-1/_warps.txt", +"npc/002-1/anwar.txt", +"npc/002-1/bard.txt", +"npc/002-1/elanore.txt", +"npc/002-1/gaurds.txt", +"npc/002-1/itka.txt", +"npc/002-1/lieutenant_dausen.txt", +"npc/002-1/luca.txt", +"npc/002-1/mapflags.txt", +"npc/002-1/mine_debug.txt", +"npc/002-1/nickos.txt", +"npc/002-1/nomads.txt", +"npc/002-1/npcs.txt", +"npc/002-1/sarah.txt", +"npc/002-1/soul-menhir.txt", +"npc/002-1/stewen.txt", +"npc/002-1/traveler.txt", diff --git a/npc/002-1/_mobs.txt b/npc/002-1/_mobs.txt new file mode 100644 index 00000000..3a6bf126 --- /dev/null +++ b/npc/002-1/_mobs.txt @@ -0,0 +1,15 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-1: Tulimshar South mobs +002-1,93,62,12,4 monster Piou 1002,11,100000,30000 +002-1,112,62,5,4 monster Piou 1002,11,100000,30000 +002-1,108,73,5,4 monster Piou 1002,11,100000,30000 +002-1,62,28,1,7 monster Piou 1002,6,100000,30000 +002-1,74,96,12,16 monster Piousse 1003,12,100000,30000 +002-1,113,114,5,3 monster Piou 1002,11,100000,30000 +002-1,43,61,5,35 monster Piousse 1003,6,100000,30000 +002-1,70,92,24,9 monster Piousse 1003,10,100000,30000 +002-1,40,93,9,10 monster Tortuga 1004,10,100000,30000 +002-1,42,40,4,14 monster Clover Patch 1033,8,100000,30000 +002-1,33,75,4,20 monster Clover Patch 1033,8,100000,30000 +002-1,99,62,18,4 monster Piousse 1003,6,100000,30000 +002-1,73,105,10,10 monster Plushroom Field 1011,6,100000,30000 diff --git a/npc/002-1/_warps.txt b/npc/002-1/_warps.txt new file mode 100644 index 00000000..6ffc689d --- /dev/null +++ b/npc/002-1/_warps.txt @@ -0,0 +1,18 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-1: Tulimshar South warps +002-1,63,20,0 warp #002-1_63_20 4,0,001-1,63,118 +002-1,103,20,0 warp #002-1_103_20 4,0,001-1,103,118 +002-1,119,95,0 warp #002-1_119_95 0,2,006-1,21,47 +002-1,92,114,0 warp #002-1_92_114 0,0,002-3,85,49 +002-1,33,109,0 warp #002-1_33_109 0,0,002-3,51,35 +002-1,109,45,0 warp #002-1_109_45 0,0,002-2,75,100 +002-1,115,45,0 warp #002-1_115_45 0,0,002-2,83,100 +002-1,99,43,0 warp #002-1_99_43 0,0,002-2,120,66 +002-1,114,35,0 warp #002-1_114_35 0,0,002-2,78,131 +002-1,110,29,0 warp #002-1_110_29 0,0,002-2,68,122 +002-1,73,35,0 warp #002-1_73_35 0,0,002-2,44,33 +002-1,57,35,0 warp #002-1_57_35 0,0,002-2,120,94 +002-1,67,29,0 warp #002-1_67_29 0,0,002-2,23,109 +002-1,113,107,0 warp #002-1_113_107 0,0,005-3,52,37 +002-1,49,20,0 warp #002-1_49_20 0,0,004-3,24,94 +002-1,57,26,0 warp #002-1_57_26 0,0,002-2,119,131 diff --git a/npc/002-1/anwar.txt b/npc/002-1/anwar.txt new file mode 100755 index 00000000..37def423 --- /dev/null +++ b/npc/002-1/anwar.txt @@ -0,0 +1,172 @@ +002-1,95,67,0 script Anwar NPC156,{ + @cloth_amount = 3; + @silk_amount = 30; + + @firstTry_exp = 400; + @secondTry_exp = 700; + @material_exp = 1000; + @final_exp = 2000; + + if (.@q >= 15) goto L_Done; + if (.@q >= 13) goto L_GiveEomie; + if (.@q >= 11) goto L_GiveTinris; + if (.@q == 10) goto L_GiftMaterial; + if (.@q >= 5) goto L_SecondTry; + if (.@q >= 1) goto L_FirstTry; + + mesn; + mes "\"Hello. You look like one of those young people who come here to go on an adventure."; + mes "Would you be interested in doing some small errand for me?\""; + menu + "Sure!",L_Sure, + "I'm busy, sorry.",L_Close; + +L_Sure: + mesn; + mes "\"That's the spirit! Ok, I'm tired of spending most of my time working on this field. I heard the magicians at the magic school are researching ways to enhance the growth of plants with magic.\""; + next; + mes "\"I can't go there myself, since this area of the city is full of sneaky ragtags and they will rob my field if I leave here. Could you go to the magic school and ask for some magic enhancement for my field?\""; + next; + mes "\"To find the school just follow the street north back into town. The school is the castle at the north end of town.\""; + .@q = 1; + goto L_Close; + +L_FirstTry: // .@q >= 1 but below 5 + mesn; + mes "\"I hope the wizards at the magic school can help me with the field. I'd really like to have more free time. I want to make clothing, but I'm not experienced enough to make a living out of that.\""; + if (.@q != 4) + goto L_Close; + menu + "Tinris gave me a magic fertilizer for your field, but he isn't sure if it works.",L_Next; + +L_Next: + mesn; + mes "\"Really? Well, let's try it out!\""; + mes "He takes the fertilizer and starts to bespatter the field."; + next; + mes "But it doesn't seem to be good for the plants, they start to shrivel and get brown."; + mesn; + mes "\"Oh no! What is this? It's damaging my plants! Go back to Tinris and tell him it doesn't work!\""; + getexp @firstTry_exp, 0; + .@q = 5; + goto L_Close; + +L_SecondTry: // .@q >= 5 but below 10 + mesn; + mes "\"I hope Tinris can come up with a better fertilizer. My plants are suffering from the first try.\""; + if (.@q != 9) + goto L_Close; + menu + "Here is another one. Eomie cast a spell on it.",L_Continue; + +L_Continue: + mesn; + mes "\"Eomie? I heard she's amazingly skilled with nature magic. I'll try if this works better.\""; + mes "He takes the fertilizer and puts it on only a few plants, then waits a moment to see the result."; + next; + mes "The plants recover a bit and become green again."; + mesn; + mes "\"Ah, this one is better. I'll put it on the entire field.\""; + getexp @secondTry_exp, 0; + .@q = 10; + next; + goto L_GiftMaterial; + +L_GiftMaterial: // .@q == 10 + mesn; + mes "\"I want to show my gratitude to Tinris and Eomie. Can you help me once again? I would like to make some clothes for them and need " + @cloth_amount + " pieces of Cotton Cloth and " + @silk_amount + " Silk Cocoons.\""; + menu + "I have it.",L_GiveGiftStuff, + "Where can I get that?",L_Hint, + "I'll see what I can do.",L_Close; + +L_GiveGiftStuff: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + if ((countitem("CottonCloth") < @cloth_amount) || (countitem("SilkCocoon") < @silk_amount)) + goto L_NoItem; + delitem "CottonCloth", @cloth_amount; + delitem "SilkCocoon", @silk_amount; + getexp @material_exp, 0; + + getitem "GreenVNeckSweater", 1; + .@q = 11; + mesn; + mes "\"Great! I'll start right away with the present for Tinris. That shouldn't take long.\""; + mes "After a short while of cutting and sewing he holds a V-Neck Sweater in his hands. Then he dyes it green."; + next; + mesn; + mes "\"Wonderful! Could you please bring this to Tinris to show him my gratitude?\""; + goto L_Close; + +L_Hint: + mesn; + mes "\"As far as I know Cotton Cloth is given out as reward for hunting monsters. You should talk to Aidan in Candor.\""; + next; + mes "\"Otherwise Cotton Cloth can be sheared from Mouboo and silk cocoons come from Silkworms."; + mes "They live in the woodland area around Hurnscald. You can get there by taking the ferry.\""; + goto L_Close; + +L_GiveTinris: // .@q >= 11 but below 13 + mesn; + mes "\"Did you already bring the Green V-Neck Sweater to Tinris?\""; + if (.@q != 12) + menu + "Not yet.",L_Close; + menu + "Yes, he was very happy.",L_Happy; + +L_Happy: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + mesn; + mes "\"Wonderful! I also finished the present for Eomie. Can you bring it to her?\""; + getitem "SilkHeadband", 1; + .@q = 13; + goto L_Close; + +L_GiveEomie: // .@q >= 13 but below 15 + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + mesn; + mes "\"Did you give the Silk Headband to Eomie?\""; + if (.@q != 14) + menu + "Not yet.",L_Close; + menu + "Yes. She asked me to thank you.",L_ThankYou; + +L_ThankYou: + mes "Anwar smiles."; + mesn; + mes "\"I'm so happy. Thank you so much for your help. I made this for you while you went to see Eomie.\""; + getexp @final_exp, 0; + getitem "DarkGreenCottonTrousers", 1; + .@q = 15; + goto L_Close; + +L_Done: // .@q == 15 + mesn; + mes "\"Thank you so much for your help. The plants are growing much better now. I don't have to spend all my time working in the field any more."; + mes "Finally I can do what I'm really interested in and work on getting better at sewing clothes.\""; + goto L_Close; + +L_NoItem: + mesn; + mes "\"You don't have it!\""; + goto L_Close; + +L_Full_Inv: + mesn; + mes "\"You carry a lot of stuff. Come back when you have more room.\""; + goto L_Close; + +L_Close: + @cloth_amount = 0; + @silk_amount = 0; + @inventorylist_count = 0; + close; +} diff --git a/npc/002-1/bard.txt b/npc/002-1/bard.txt new file mode 100755 index 00000000..648cf4c4 --- /dev/null +++ b/npc/002-1/bard.txt @@ -0,0 +1,117 @@ + +002-1,91,33,0 script Bard NPC152,{ + setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", + "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", + "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; + @name$ = "Bill Ballshaker the Bard"; + mes "[" + @name$ + "]"; + mes "\"Greetings, traveler! Have you come to listen to my stories?\""; + next; + goto L_Main; + +L_Main: + menu + "Sing me a song, lute man!", L_Song, + "Have you heard any news?", L_News, + "What do you know about...", L_Question, + "Farewell!", L_close; + +L_News: + + mes "[" + @name$ + "]"; + mes "\"News I have for you indeed, lest you have already overheard (for then it would no longer be news to you!)\""; + next; + mes "[" + @name$ + "]"; + mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_MANASEED_RUMOUR; + mes "[" + @name$ + "]"; + mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; + next; + mes "[" + @name$ + "]"; + mes "\"I wonder who might be qualified?\""; + next; + goto L_Main; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_ASTRALSOUL; + callfunc "MagicTalkMenu"; + + if (@c == 0) goto L_Main; + if (@c == @QQ_ELANORE) goto L_Q_elanore; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + + mes "[" + @name$ + "]"; + mes "\"Alas, I know very little about this matter.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[" + @name$ + "]"; + mes "\"The old wizard has been an old man for as long as I remember, living near the mountains in his magic hut – a hut that is bigger on the inside, just like in the old tales of Gyer Filla the Wise....\""; + next; + mes "[" + @name$ + "]"; + mes "\"I doubt that they are the same person, though. For one, I have never seen his hut fly. For another, Gyer never took apprentices.\""; + next; + goto L_Main; + +L_Q_elanore: + mes "[" + @name$ + "]"; + mes "\"Elanore is this town's healer. Rumor has it that she traveled far and wide when she was younger, to learn the deepest secrets of healing magic, after her brother caught a mysterious illness.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[" + @name$ + "]"; + mes "\"The Mana Seed is said to be a source of great magic. Perhaps some witch or wizard might know more about it?\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[" + @name$ + "]"; + mes "\"Wyara is not actually from Hurnscald. As a young witch, she decided to settle down there to help the people of Hurnscald. She is kind and gentle, except towards the Doctor, who seems to have little respect for her potions.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[" + @name$ + "]"; + mes "\"Sagatha! Ah, such a wonderful and mysterious being; the center of many a tale...\""; + next; + mes "[" + @name$ + "]"; + mes "\"Some say that she is the most powerful witch in all of Argaes. I don't know whether that is true or not, but I am quite certain that she is the most beautiful witch of all! Alas, she will let no man touch her...\""; + mes "He sighs."; + next; + mes "[" + @name$ + "]"; + mes "\"I met her only twice, back in my traveling days, but there are two pieces of advice I can give you:\""; + next; + mes "[" + @name$ + "]"; + mes "\"First, she will suffer no fool easily, particularly no man.\""; + next; + mes "[" + @name$ + "]"; + mes "\"Second, the creatures of the forest mean everything to her. Harm them, and you may find her an enemy – and a powerful one at that...\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[" + @name$ + "]"; + mes "\"Auldsbel is a wizard further north. From what I have gathered he bought a hut near Hurnscald some years back and often comes here to experiment on things. This is probably because he is not allowed to do these experiments where he comes from.\""; + next; + goto L_Main; + +L_Song: + mes "[" + @name$ + "]"; + @id = rand(3); + mes @songs$[@id]; + goto L_close; + +L_close: + @name$ = ""; + @id = 0; + cleararray @songs$[0], "", 2; + close; +} diff --git a/npc/002-1/elanore.txt b/npc/002-1/elanore.txt new file mode 100755 index 00000000..3a546cd2 --- /dev/null +++ b/npc/002-1/elanore.txt @@ -0,0 +1,618 @@ + +function script ElanoreFix { + @Q_MASK = NIBBLE_1_MASK; + @Q_SHIFT = NIBBLE_1_SHIFT; + + set @Q_STATUS_MAX, 3; // FIXME once level 3 magic was released + + @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + if (@Q_status > @Q_STATUS_MAX) + @Q_status = @STATUS_INITIAL; + if (@Q_status > 1 && (getskilllv(SKILL_MAGIC_LIFE) < 2)) + @Q_status = @STATUS_INITIAL; + + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} + +function script elanore_decrease_exp { + @Q_heal_exp = MAGIC_EXPERIENCE >> 24; + if (@Q_heal_exp < 8) goto L_OnPcKillWipe; + @Q_heal_exp = @Q_heal_exp - 8; + goto L_OnPcKillFinish; + +L_OnPcKillWipe: + @Q_heal_exp = 0; + goto L_OnPcKillFinish; + +L_OnPcKillFinish: + MAGIC_EXPERIENCE = (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24); + goto L_Return; + +L_Return: + return; +} + +002-1,75,62,0 script Elanore#_M NPC108,{ + @has_magic = getskilllv(SKILL_MAGIC); + + @Q_MASK = NIBBLE_1_MASK; + @Q_SHIFT = NIBBLE_1_SHIFT; + + @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + @Q_heal_exp = MAGIC_EXPERIENCE >> 24; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC_LIFE; + @SUP_name$ = "Life Magic"; + + @STATUS_INITIAL = 0; + @STATUS_LEARNED_LIGHT_HEAL = 1; + @STATUS_MASTERED_LIGHT_HEAL = 2; + @STATUS_LEARNED_LAY_ON_HANDS = 3; + @STATUS_WAITING_FOR_KADIYA = 4; + @STATUS_READY_TO_LEARN_CURE_POISON = 5; + @STATUS_LEARNED_CURE_POISON = 6; + + callfunc "ElanoreFix"; + + // This operation works around an earlier possible corruption of this state + if (@Q_status > @Q_STATUS_MAX) + @Q_status = @STATUS_INITIAL; + callsub S_Update_Var; + if (sc_check(SC_POISON)) goto L_CurePoison; + if (BaseLevel > 20) goto L_NoHeal; + @temp = rand(4); + if(@temp == 1) goto L_Heal2; + if(@temp == 2) goto L_Heal3; + if(@temp == 3) goto L_Heal4; + goto L_Heal1; + +L_Heal1: + + mes "[Elanore the Healer]"; + mes "\"You don't look too well; let me treat your wounds.\""; + next; + goto L_Heal_L; + +L_Heal2: + + mes "[Elanore the Healer]"; + mes "\"I will make quick work of your wounds.\""; + next; + goto L_Heal_L; + +L_Heal3: + + mes "[Elanore the Healer]"; + mes "\"Need a healing?\""; + next; + goto L_Heal_L; + +L_Heal4: + + mes "[Elanore the Healer]"; + mes "\"Sometimes you just need to run from battle.\""; + next; + goto L_Heal_L; + +L_Heal_L: + @temp = rand(3); + if(@temp == 1) goto L_Heal_2; + if(@temp == 2) goto L_Heal_3; + if(@temp == 3) goto L_Heal_4; + goto L_Heal_1; + +L_Heal_1: + + mes "[Elanore the Healer]"; + mes "\"Here you go!\""; + heal 10000,10000; + goto L_close; + +L_Heal_2: + + mes "[Elanore the Healer]"; + mes "\"Painless, wasn't it?"; + heal 10000,10000; + goto L_close; + +L_Heal_3: + + mes "[Elanore the Healer]"; + mes "\"You should be more careful.\""; + heal 10000,10000; + goto L_close; + +L_Heal_4: + + mes "[Elanore the Healer]"; + mes "\"Much better, right?!\""; + heal 10000,10000; + goto L_close; + +L_NoHeal: + if (MAGIC_FLAGS) + goto L_Chat; + goto L_NoHealMessage; + +L_NoHealMessage: + mes "[Elanore the Healer]"; + mes "\"I'm sorry but unless you are young and in need, I can't help you, and your level is already higher than twenty."; + mes "With so many gaurds still injured, I really have no time to help."; + mes "You can get some rest in the inn near here.\""; + goto L_close; + +L_Chat: + mes "[Elanore the Healer]"; + mes "\"Hello! Can I help you?\""; + next; + goto L_Main; + +L_Main: + if (@has_magic && (@Q_status == @STATUS_INITIAL)) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me magic?", L_Teach, + "What do you know about...", L_Question, + "Goodbye!", L_Bye; + if (@has_magic && (@Q_status > @STATUS_INITIAL)) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me more?", L_Teach, + "Where can I get more lifestones?", L_Lifestones, + "What do you know about...", L_Question, + "Goodbye!", L_Bye; + if (!@has_magic) + menu + "Can you heal me?", L_NoHealMessage, + "What do you know about...", L_Question, + "Goodbye!", L_Bye; + goto L_close; + +L_Lifestones: + mes "[Elanore the Healer]"; + mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\""; + next; + menu + "OK, I will get them.", L_close, + "No way!", L_close, + "Here you are!", L_Trade, + "Can I make them myself?", L_MakeSelf; + +L_Trade: + if (countitem("MauveHerb") < 10) goto L_Trade_Missing; + if (countitem("GambogeHerb") < 10) goto L_Trade_Missing; + if (countitem("AlizarinHerb") < 10) goto L_Trade_Missing; + if (countitem("CobaltHerb") < 10) goto L_Trade_Missing; + getinventorylist; + if (@inventorylist_count == 100 && countitem("Lifestone") == 0 + && countitem("MauveHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("AlizarinHerb") > 10 + && countitem("CobaltHerb") > 10) goto L_NoRoom; + + delitem "MauveHerb", 10; + delitem "GambogeHerb", 10; + delitem "AlizarinHerb", 10; + delitem "CobaltHerb", 10; + getitem "Lifestone", 5; + getexp 200, 1; + mes "[Elanore the Healer]"; + mes "Elanore carefully goes over your leaves, then smiles."; + mes "\"These will do just fine.\""; + mes "She picks up all fourty and presses them together in her hands, then whispers something."; + next; + mes "[Elanore the Healer]"; + mes "As she opens her hands again, the leaves have turned into ten golden crystals."; + mes "\"Five for you and five for me.\""; + mes "She smiles."; + mes "[200 experience points]"; + goto L_close; + +L_NoRoom: + mes "[Elanore the Healer]"; + mes "\"Oh... it seems that you have no room for the lifestones. But please do come back later when you have made a little space.\""; + goto L_close; + +L_Trade_Missing: + mes "[Elanore the Healer]"; + mes "Elanore counts the leaves you show her."; + mes "\"No, I am sorry. Please bring me ten leaves each of gamboge, alizarin, mauve, and cobalt.\""; + goto L_close; + +L_MakeSelf: + mes "[Elanore the Healer]"; + if (@has_magic < 2) goto L_MakeSelf_no; + goto L_MakeSelf_yes; + +L_MakeSelf_yes: + mes "\"Oh, but of course! You are powerful enough to make your own lifestones, using the enchantment '" + get(.invocation$, "enchant-lifestone") + "'. This will consume a bug leg or a maggot slime or one of each of the four healing herbs, though.\""; + goto L_close; + +L_MakeSelf_no: + mes "\"No, you are not powerful enough yet. Please come back and ask me again when you have learned to control more powerful magic, though!\""; + goto L_close; + +L_Teach: + if (@Q_status == @STATUS_INITIAL) goto L_T_Initial; + if (@Q_status == @STATUS_LEARNED_LIGHT_HEAL) goto L_T_ChkAdvTo2; + if (@Q_status == @STATUS_MASTERED_LIGHT_HEAL) goto L_T_ChkAdvToLOH; + if (@Q_status == @STATUS_LEARNED_LAY_ON_HANDS) goto L_T_Explain3; + if (@Q_status == @STATUS_WAITING_FOR_KADIYA) goto L_T_ChkAdvTo3; + if (@Q_status == @STATUS_READY_TO_LEARN_CURE_POISON) goto L_T_CurePosion; + if (@Q_status == @STATUS_LEARNED_CURE_POISON) goto L_T_dunno; + + mes "[Elanore the Healer]"; + mes "\"You have made good progress, but you lack the magical power to advance further. Also, I would like to observe you some more to be certain that you will make a good healer.\""; + goto L_close; + +L_T_Initial: + mes "[Elanore the Healer]"; + mes "\"I will only teach you magic of the school of Life, and that only if you prove yourself to be a good healer – that is, if you use your powers to help others.\""; + mes "She hesistates."; + next; + mes "[Elanore the Healer]"; + mes "\"I don't know you very well, but I don't think that there is any harm in teaching you a simple spell.\""; + mes "She reaches inside her satchel and pulls out a piece of crystal, glittering in the sun."; + mes "\"This here is a lifestone, life energy encased in a crystal shell. You will need it for most healing magic.\""; + next; + mes "[Elanore the Healer]"; + mes "\"To heal someone, first locate the injury. As a beginner, you have to touch the wound; with practice, it will be enough to think about it. Hold the lifestone in one hand, touching the wound with the other.\""; + mes "\"Then say, '" + get(.invocation$, "lesser-heal") + "', followed by the name of the one you wish to heal.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You might want to write that down, actually. In fact, you might want to make sure to keep notes of all spells you hear, for you never know if you will hear them again!\""; + mes "\"The invocation was '" + get(.invocation$, "lesser-heal") + "'.\""; + next; + mes "[Elanore the Healer]"; + mes "\"This will only cure cuts and bruises, though, and it will take some time to take effect. It will be useless to mend broken bones or more severe injuries!\""; + mes "\"To heal yourself, it's enough to just say '" + get(.invocation$, "lesser-heal") + "' by itself.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Let me give you a lifestone to get started with.\""; + next; + getinventorylist; + if ((@inventorylist_count == 100) && (countitem("Lifestone") == 0)) goto L_T_Initial_Noroom; + getitem "Lifestone", 1; + @Q_status = @STATUS_LEARNED_LIGHT_HEAL; + callsub S_Update_Var; + + mes "[Elanore the Healer]"; + mes "Elanore hands you the crystal."; + mes "\"Here you are. I hope that it will allow you to do good!\""; + goto L_close; + +L_T_Initial_Noroom: + mes "[Elanore the Healer]"; + mes "\"Oh... you managed to put things into every little nook and pocket, haven't you? Well, come back later, I will give it to you then.\""; + goto L_close; + +L_T_ChkAdvTo2: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 20) goto L_T_ChkAdvTo2_fail; + mes "Elanore smiles at you."; + mes "\"From what I have been hearing, you seem to be doing well on your way to becoming a healer. I have decided to accept you as a student of the School of Life Magic.\""; + next; + if (getskilllv(SKILL_MAGIC) < 2) goto L_T_AdvTo2_warn; + goto L_T_AdvTo2_skip; + +L_T_AdvTo2_warn: + mes "[Elanore the Healer]"; + mes "\"But be warned: you won't be able to use advanced healing magic until you are more capable in your regular magic usage.\""; + next; + goto L_T_AdvTo2_skip; + +L_T_AdvTo2_skip: + mes "[Elanore the Healer]"; + mes "\"Please stand still.\""; + mes "She walks up to you, holds your shoulders, and smiles at you."; + next; + mes "[Elanore the Healer]"; + mes "Then, she rises up on her tiptoes and kisses you on your forehead."; + next; + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + @Q_status = @STATUS_MASTERED_LIGHT_HEAL; + callsub S_Update_Var; + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + goto L_close; + +L_T_ChkAdvTo2_fail: + mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; + if (@Q_heal_exp < 5) + mes "\"You are still at the beginning of your path, but do keep practicing.\""; + if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 15)) + mes "\"You are making progress, but you still need more practice.\""; + if (@Q_heal_exp >= 15) + mes "\"You have made good progress, but please do continue in your efforts.\""; + goto L_close; + +L_T_ChkAdvToLOH: + if (getskilllv(SKILL_MAGIC) < 2) goto L_T_LOH_adv_abort0; + if (@Q_heal_exp < 30) goto L_T_LOH_adv_abort1; + + mes "[Elanore the Healer]"; + mes "\"I will now teach you how to heal by laying on your hands. The technique is similar to the spell I taught you at the beginning, but this time you transfer your own health instead of drawing health from a lifestone.\""; + next; + mes "[Elanore the Healer]"; + mes "\"First, lay your hand on the person you wish to heal. You needn't touch the injury itself, though you have to touch the skin until you are a little more experienced. Then, medidate on the word '" + get(.invocation$, "lay-on-hands") + "'\""; + next; + mes "[Elanore the Healer]"; + mes "\"This will let your own life force flow into the person you are healing. If you are badly injured yourself, you will not be able to do this.\""; + mes "[1000 experience points]"; + getexp 1000, 0; + @Q_status = @STATUS_LEARNED_LAY_ON_HANDS; + callsub S_Update_Var; + goto L_close; + +L_T_LOH_adv_abort0: + mes "[Elanore the Healer]"; + mes "\"You don't have enough magical power to learn the next healing spell yet.\""; + goto L_close; + +L_T_LOH_adv_abort1: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I am not yet convinced that you are a good enough healer. Please continue in your endeavours.\""; + goto L_close; + +L_T_Explain3: + if (getskilllv(SKILL_MAGIC) < 3) goto L_T_Explain3_abort; + if (@Q_heal_exp < 50) goto L_T_Explain3_fail; + + mes "[Elanore the Healer]"; + mes "Elanore smiles."; + mes "\"You seem to be ready to advance as a healer. There is one favour I must ask of you first, though.\""; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK)); // Initialise Kadiya quest + @Q_status = @STATUS_WAITING_FOR_KADIYA; + callsub S_Update_Var; + next; + + mes "[Elanore the Healer]"; + mes "\"There is a man here in Tulimshar with a beautiful young daughter; his name is Omar, and his daughter's name is Kadiya.\""; + mes "\"Once, when I was a young apprentice, I made a mistake treating Omar. Ever since, he no longer trusts me.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"But his daugher has contracted Mopox, so she needs help. He doesn't trust me, but perhaps he will trust you; you have been helping quite a few people, after all.\""; + next; + goto L_3_menu; + +L_3_menu: + menu + "What should I do?", L_3_what_to_do, + "Where can I find the sick girl?", L_3_where, + "How did you mess up?", L_3_messup, + "I will get started right away.", L_Main, + "Maybe later.", L_Main; + +L_3_what_to_do: + mes "[Elanore the Healer]"; + mes "\"You will have to brew a Mopox cure potion and give it to her. You should ask Caul to help you, he knows the recipe.\""; + next; + mes "[Elanore the Healer]"; + mes "\"First, you will need a concentration potion and an iron potion – together, they will give her her strength back. You also need a lifestone, and a gamboge leaf against the toxins in her body.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You then have to add in roots, water, mauve leaves and sulphur powder until the brew is gooey and neither light nor dark. Caul will explain the details to you.\""; + next; + mes "[Elanore the Healer]"; + mes "\"There is a transmutation spell to make sulphur powder. If you don't know the magic, perhaps you can ask a transmutation mage to help you with this part.\""; + next; + goto L_3_menu; + +L_3_messup: + mes "[Elanore the Healer]"; + mes "\"Ah... well, Omar is a trader, and a frequent traveler. One day he came back from a journey with fleas in his beard and asked me to get rid of them.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Unfortunately I used the wrong lotion on the fleas, so instead of being scared away, they grew to enormous proportions and ate up all of his beard.\""; + next; + mes "[Elanore the Healer]"; + mes "Elanore blushes."; + mes "\"Ever since then he hasn't been very trusting towards my skills, and I suppose that I can't blame him. But I don't want poor Kadiya to suffer because of that.\""; + next; + goto L_3_menu; + +L_3_where: + mes "[Elanore the Healer]"; + mes "\"Kadiya and Omar live relatively close by. See this corner in the inner city wall east of here? Turn past it, then go north. It's the second house.\""; + next; + goto L_3_menu; + +L_T_Explain3_abort: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but you lack the magical power to advance.\""; + goto L_close; + +L_T_Explain3_fail: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 30) + mes "\"You seem to have regressed as a healer. This is worrisome; please mend your ways or I will not teach you any further.\""; + if ((@Q_heal_exp >= 30) && (@Q_heal_exp < 40)) + mes "\"You still need more practice in the art of healing.\""; + if ((@Q_heal_exp >= 40)) + mes "\"You are doing well, but you need some more practice as a healer first.\""; + goto L_close; + +L_T_ChkAdvTo3: + callfunc "KadiyaSubquestConsts"; + + if (@Q_kadiya_status >= @Q_STATUS_COMPLETED) goto L_T_AdvTo3Ready; + + mes "[Elanore the Healer]"; + mes "\"Please help Kadiya.\""; + next; + goto L_3_menu; + +L_T_AdvTo3Ready: + mes "[Elanore the Healer]"; + mes "\"I have heard of what you did. Hiding the potion in her favorite food – that was clever.\""; + mes "She smiles at you."; + mes "\"Omar let me have a look at her earlier, and she seems to be recovering. You did very well."; + next; + mes "[Elanore the Healer]"; + mes "Elanor turns towards you, rises up on her toes and kisses you on the forehead."; + next; + @xp = 30000; + if (@Q_kadiya_status == @Q_STATUS_COMPLETED_ELANORE) + @xp = 50000; + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + mes "[" + @xp + " experience points]"; + mes "[Level 3 in Life Magic]"; + + @Q_status = @STATUS_READY_TO_LEARN_CURE_POISON; + callsub S_Update_Var; + getexp @xp, 0; + if (getskilllv(SKILL_MAGIC_LIFE) < 3) + addtoskill SKILL_MAGIC_LIFE, 3; + next; + + if (@Q_kadiya_status != @Q_STATUS_COMPLETED_ELANORE) goto L_Main; + + mes "[Elanore the Healer]"; + mes "\"Overall I am impressed by your progress. If you continue as you are doing now, you might become a great healer.\""; + mes "She hands you a handful of lifestones."; + mes "\"Please come back soon; there is more that I would like to teach you.\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_ELANORE_OMAR; + getitem "Lifestone", 20; + + goto L_Main; + +L_T_CurePosion: + mes "[Elanore the Healer]"; + mes "\"Thank you again for your help with Kadiya!\""; + mes "\"Curing sicknesses is often quite difficult; most of them require complicated potions to be brewed.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Fortunately, things are much easier with most poisons. For those we have a simple spell that only requires a Gamboge leaf.\""; + mes "\"This is the next spell that I would like to teach you.\""; + next; + mes "[Elanore the Healer]"; + mes "\"If you would like to cure someone who is poisoned, first rub a Gamboge leaf between your hands. Your hands must be covered in Gamboge liquid for this to work.\""; + mes "\"Speak the invocation, `" + get(.invocation$, "cure-poison") + "'.\""; + mes "\"Next, you either touch the poisoned person with your hands, or speak their name. You have to be close for this to work, though.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Once again, the invocation is `" + get(.invocation$, "cure-poison") + "'.\""; + mes "\"Come back again soon; there is another spell I would like to teach you.\""; + next; + @Q_status = @STATUS_LEARNED_CURE_POISON; + callsub S_Update_Var; + goto L_Main; + +L_T_dunno: + mes "[Elanore the Healer]"; + mes "\"Hmm. I wanted to teach you something, but I've forgotten what it was... please come back later.\""; + next; + goto L_Main; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_ELANORE; + callfunc "MagicTalkMenu"; + + if (@c == 0) goto L_Main; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + if (@c == @QQ_ASTRALSOUL) goto L_Q_astralsoul; + + mes "[Elanore the Healer]"; + mes "Elanore shakes her head."; + mes "\"I am sorry, but I don't think that I know anything that would help you.\""; + next; + goto L_Main; + +L_Q_astralsoul: + mes "[Elanore the Healer]"; + mes "\"The astral soul skill is one of the most important skills for mages. I learned this focus long time ago. Without that skill your magic is quite useless, isn't it? If the rumors are really true, there is an experienced mage in the Woodlands around Hurnscald.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[Elanore the Healer]"; + mes "\"He is a kind old man. He stays mostly with his books and his apprentice, though we have chatted a few times.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[Elanore the Healer]"; + mes "She smiles."; + mes "\"If the rumors are true and there really is a Mana Seed, then that would be wonderful news – perhaps we will have a few more healers soon!\""; + next; + goto L_Main; + +L_Q_manapotion: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I can't help you with that.\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[Elanore the Healer]"; + mes "\"Wyara is the Hurnscald town witch. She was also the town healer before the Doctor moved there.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[Elanore the Healer]"; + mes "\"Oh, I have only met Sagatha once or twice, while collecting herbs. She is a warm and gentle person, but she tries to hide it.\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Elanore the Healer]"; + mes "\"Oh, sorry – I don't really know him very well.\""; + next; + goto L_Main; + +L_CurePoison: + mes "[Elanore the Healer]"; + mes "\"Oh dear! That looks like poison; hang on...\""; + mes "She performs a complicated gesture."; + sc_end(SC_POISON); + sc_end(SC_SLOWPOISON); + misceffect sfx_magic_life, strcharinfo(0); + misceffect sfx_magic_life; + next; + mes "[Elanore the Healer]"; + mes "\"There you are, right as rain! Now you take care, all right?\""; + goto L_close; + +L_Bye: + mes "[Elanore the Healer]"; + mes "\"Goodbye!\""; + goto L_close; + +L_close: + @Q_MASK = 0; + @Q_SHIFT = 0; + @has_magic = 0; + @Q_STATUS_MAX = 0; + @Q_heal_exp = 0; + @Q_status = 0; + @SUP_id = 0; + @SUP_name$ = ""; + @ignore = 0; + @STATUS_LEARNED_LIGHT_HEAL = 0; + @STATUS_MASTERED_LIGHT_HEAL = 0; + @STATUS_LEARNED_LAY_ON_HANDS = 0; + @STATUS_WAITING_FOR_KADIYA = 0; + @STATUS_READY_TO_LEARN_CURE_POISON = 0; + @STATUS_LEARNED_CURE_POISON = 0; + @temp = 0; + @xp = 0; + close; + +S_Update_Var: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/002-1/gaurds.txt b/npc/002-1/gaurds.txt new file mode 100755 index 00000000..c69a823f --- /dev/null +++ b/npc/002-1/gaurds.txt @@ -0,0 +1,15 @@ +002-1,100,21,0 script Guard#port1 NPC104,{ + mes "[Guard]"; + mes "\"Lots of stuff happens in the port district. Those sailors can get quite rowdy.\""; + close; +} +002-1,61,27,0 script Guard#port2 NPC104,{ + mes "[Guard]"; + mes "\"You wouldn't believe the refuse that comes in from the docks.\""; + close; +} +002-1,83,48,0 script Guard#east1 NPC104,{ + mes "[Guard]"; + mes "\"I make sure less desirables don't bother the Nobles.\""; + close; +} diff --git a/npc/002-1/itka.txt b/npc/002-1/itka.txt new file mode 100755 index 00000000..42ae91bd --- /dev/null +++ b/npc/002-1/itka.txt @@ -0,0 +1,19 @@ +002-1,66,39,0 script Itka NPC114,{ + mes "[Itka]"; + mes "\"This hotel is the best!\""; + next; + mes "\"It has a Baker, a Barber, a Casino and a Theatre.\""; + next; + mes "\"Come on inside now!\""; + close; + +OnTimer300000: + npctalk strnpcinfo(0), "Come to The Wizard's Rest!"; + setnpctimer 0; + end; + +OnInit: + if (debug >= 2) end; + initnpctimer; + end; +} diff --git a/npc/002-1/lieutenant_dausen.txt b/npc/002-1/lieutenant_dausen.txt new file mode 100755 index 00000000..1144232d --- /dev/null +++ b/npc/002-1/lieutenant_dausen.txt @@ -0,0 +1,110 @@ +002-1,63,67,0 script Lieutenant Dausen NPC122,{ + if (QL_MINEALL == 21) goto L_LD_Key; + if (QL_MINEALL == 7) goto L_LD_Miners; + if (QL_MINEALL == 6) goto L_LD_Orders; + if (QL_MINEALL == 5) goto L_LD_Nickos_Waits; + if (QL_MINEALL == 4) goto L_LD_Nickos; + if (QL_MINEALL == 3) goto L_LD_Waits; + if (QL_MINEALL == 2) goto L_LD_Woe_Is_Me; + if (QL_MINEALL == 1) goto L_LD_Drinks; + + mes "[Lieutenant Dausen]"; + mes "\"Hello. I am Lieutenant Dausen. I monitor the monster threat around the city to ensure the safety of its citizens.\""; + if (QL_MINEALL) + goto L_close; + goto L_LD_Start; + +L_LD_Start: + QL_MINEALL = 1; + next; + mes "\"Out here in the desert, it sure does get hot! My men and I get thirsty rather quickly. Cactus Drinks are our favourite; if you can get some for us, we'd surely appreciate your effort. About 10 would do.\""; + goto L_close; + +L_LD_Drinks: + if (countitem ("CactusDrink") < 10) + goto L_LD_NotEnough_Drink; + getinventorylist; + if (@inventorylist_count - (countitem("CactusDrink") == 10) > 99) + goto L_LD_TooMany; + QL_MINEALL = 2; + delitem "CactusDrink", 10; + getitem "Boots", 1; + mes "[Lieutenant Dausen]"; + mes "\"Great! This will help us make it through the hot day. As a gift for your troubles, take these boots to keep your feet from burning on the sand. Have a good day...\""; + next; + mes "Lieutenant Dausen mumbles to himself and rubs his head."; + next; + mes "\"I have another problem, though. I mixed up the orders to my men, Nickos and Stewen. Someone needs to let them know they're going to have to hold their post for a while longer instead of taking a break. However, I can't leave my post! Oh, what to do, what to do...\""; + menu + "I can help you out, since you helped me too.", L_LD_Help, + "Thanks for the boots, gotta run now.", L_LD_NoHelp; + +L_LD_NotEnough_Drink: + mes "[Lieutenant Dausen]"; + mes "\"Hi again. My men and I sure are thirsty for our favorite drink, the Cactus Drink. If we had about 10, it would help us out a great deal in this sandstorm.\""; + goto L_close; + +L_LD_TooMany: + mes "[Lieutenant Dausen]"; + mes "\"Oh, it seems you have too many items for me to give you a reward. Come back after you drop or sell some items.\""; + goto L_close; + +L_LD_Woe_Is_Me: + mes "[Lieutenant Dausen]"; + mes "\"I have a problem. I mixed up the orders to my men! Someone needs to let them know they're going to have to hold their post for a while longer instead of taking a break. However, I can't leave my post. Oh, what to do, what to do...\""; + menu + "I can help you out, since you helped me out too.", L_LD_Help, + "Bye-bye.", L_LD_NoHelp; + +L_LD_Help: + QL_MINEALL = 3; + mes "[Lieutenant Dausen]"; + mes "\"Oh! Would you? You are ever most helpful! Could you let Stewen know first? I'm the most worried about the monsters from the eastern desert and he should know first to hold his post. Come back to me after you see him. Hope to hear from you soon!\""; + goto L_close; + +L_LD_NoHelp: + mes "[Lieutenant Dausen]"; + mes "\"See you later then.\""; + goto L_close; + +L_LD_Waits: + mes "[Lieutenant Dausen]"; + mes "\"I do hope Stewen holds his post. If you could tell them to do so, it would help me out a great deal.\""; + goto L_close; + +L_LD_Nickos: + QL_MINEALL = 5; + mes "[Lieutenant Dausen]"; + mes "\"Thanks for letting Stewen know. Can you now tell Nickos to hold his post too? He guards the mine to the south, monitoring the monster threat and protecting the miners when he can.\""; + goto L_close; + +L_LD_Nickos_Waits: + mes "[Lieutenant Dausen]"; + mes "\"Could you let Nickos know to hold his post? It would be very helpful. He is guarding the mine south of here.\""; + goto L_close; + +L_LD_Orders: + QL_MINEALL = 7; + Zeny = Zeny + 500; + mes "[Lieutenant Dausen]"; + mes "\"Thank you for clearing up the orders to my men! Here's some gold for your efforts.\""; + next; + mes "\"If you think you can handle the monsters lurking out here, I'm sure Nickos and the miners could use some help. Talk to you later.\""; + goto L_close; + +L_LD_Miners: + mes "[Lieutenant Dausen]"; + mes "\"I monitor the monster threat around the city to ensure the safety of its citizens.\""; + next; + mes "\"If you think you can handle the monsters lurking out here, I'm sure Nickos and the miners could use some help. Talk to you later.\""; + goto L_close; + +L_LD_Key: + QL_MINEALL = 22; + mes "[Lieutenant Dausen]"; + mes "\"Oh, Naem lost his key? Here, take this spare. It should help you get into the underground palace.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-1/luca.txt b/npc/002-1/luca.txt new file mode 100755 index 00000000..4c139cc2 --- /dev/null +++ b/npc/002-1/luca.txt @@ -0,0 +1,449 @@ + +002-1,112,26,0 script Luca NPC102,{ + @Exp_BRAWLING = 2000; + + if (BaseLevel >= 35) goto L_Teach; + + if (BaseLevel >= 25) goto L_Teach_soon; + + mes "[Luca the Hunter]"; + mes "\"Ouch! It hurts, this wound I got from battle.\""; + next; + menu "Tell me about it",L_Exp,"Nevermind",L_Nev; + +L_Exp: + mes "[Luca the Hunter]"; + mes "\"I was just coming back from a long journey. I ran into a group of scorpions and started fighting them for experience.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Then, out of a cave came a BLACK one! I had NEVER seen it before!\""; + next; + mes "[Luca the Hunter]"; + mes "\"Luckily I had a camera with me! Here's a picture of it... Let me find it, I put it in my pocket somewhere...\""; + next; + mes "[Luca the Hunter]"; + mes "\"Oh man! My pockets have been ripped clean off!\""; + goto L_close; + +L_Nev: + mes "[Luca the Hunter]"; + mes "\"Hmpf!\""; + goto L_close; + +L_Teach_soon: + mes "[Luca the Hunter]"; + mes "\"You've grown quite a bit stronger since I first saw you, strolling around town like that! You know, if you train a little more, maybe we can help each other out a little?\""; + goto L_close; + +L_Teach: + if (getskilllv(SKILL_POOL)) goto L_Teachmore; + + mes "[Luca the Hunter]"; + mes "\"Hey there! You've become quite the adventurer, haven't you? I think it's time that someone taught you some basic skills.\""; + next; + mes "[Luca the Hunter]"; + mes "\"If you want, I can help with that!\""; + next; + menu + "Sure, that sounds fun!", L_Next, + "I'm not interested.", L_Nev; + +L_Next: + mes "[Luca the Hunter]"; + mes "\"All right! It's not all that easy, though. First you have to learn how to focus. That's because you can learn many skills, but you can't focus on all of them all the time.\""; + next; + mes "[Luca the Hunter]"; + mes "\"When you can do that, you can learn some real skills, and when you know them, you can come back to me to tell me which ones you want to focus on. Deal?\""; + next; + menu + "Yeah!", L_Teach0_follow, + "Certainly!", L_Teach0_follow, + "Wait... what do you mean?", L_Explain, + "Please explain some more.", L_Explain, + "No.", L_Nev; + +L_Teach0_follow: + if (getskilllv(SKILL_POOL)) goto L_Teachmore; + + mes "[Luca the Hunter]"; + mes "\"Great! Now, before I can give you that skill, I have to make sure that those stories about you are all true and that you really are experienced enough.\""; + next; + mes "[Luca the Hunter]"; + mes "\"So I'm going to ask you some easy questions.\""; + next; + mes "[Luca the Hunter]"; + mes "\"First, who is the man who guards the entrance to the old Tulimshar underground arena?\""; + next; + input @answer$; + if (@answer$ != "Phaet" && @answer$ != "phaet") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "\"Good. Next, what's the name of the pipe-smoker who lives on top of Lore Mountain and makes leathery goods there?\""; + next; + input @answer$; + if (@answer$ != "Pachua" && @answer$ != "pachua") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "\"Great! One more: Who was the adventurer who built Dimond's Cove for Dimond?\""; + next; + input @answer$; + if (@answer$ != "Merlin" && @answer$ != "merlin") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "Luca laughs in excitement."; + mes "\"All right! You're the real thing, my friend!\""; + next; + mes "[Luca the Hunter]"; + mes "\"Now stand over there. This should only take a second...\""; + mes "He takes off a pendant he is wearing and holds it up."; + next; + mes "[Luca the Hunter]"; + mes "\"See that fang at the end of the chain? Keep staring at it.\""; + next; + mes "[Luca the Hunter]"; + mes "He starts swinging the pendant back and forth."; + mes "\"And whatever you do, don't blink. Don't look away, and don't blink.\""; + next; + mes "[Luca the Hunter]"; + mes "The world slows down around you as you focus on the pendant going back..."; + next; + mes "and forth..."; + next; + mes "and back..."; + next; + mes "and forth..."; + next; + mes "and back..."; + next; + mes "and..."; + next; + mes "You feel relaxed."; + next; + mes "[Luca the Hunter]"; + mes "\"... still there?\""; + mes "You hear the sound of fingers snapping. Why would someone do that on such a calm day?"; + next; + mes "[Luca the Hunter]"; + mes "\"Oh, good... I think it worked. Nice job!\""; + mes "He grins."; + mes "[You gain 10,000 experience points]"; + mes "[You learned Skill Focus]"; + addtoskill SKILL_POOL, 1; + getexp 10000, 0; + next; + goto L_Teachmore2; + +L_wronganswer: + mes "[Luca the Hunter]"; + mes "\"No, that was wrong. I suppose you're not as experienced as I thought you'd be.\""; + goto L_close; + +L_Explain: + mes "[Luca the Hunter]"; + mes "\"Alright, what do you want to know?\""; + next; + goto L_Explain_loop; + +L_Explain_loop: + menu + "What's skill focus?", L_explain_focus, + "What skills are there?", L_explain_skills, + "How do skills work?", L_explain_work, + "Thanks, I think I got it!", L_Next; + +L_explain_focus: + mes "[Luca the Hunter]"; + mes "\"Well, you can learn many, many skills. But you can't really use all of them at once, not even old Auldsbels' head is big enough for that! So you have to focus.\""; + next; + mes "[Luca the Hunter]"; + mes "\"But you can change that focus whenever you want. It works like this: You come to me, you tell me what you want to focus on, and we do exercises until it's stuck in your head.\""; + next; + mes "[Luca the Hunter]"; + mes "\"If there's not enough space in your head, you'll first have to stop thinking about some other thing. There's an exercise I learned to do that, so when you talk to me you can just let me know what you want to forget.\""; + next; + mes "[Luca the Hunter]"; + if (getskilllv(SKILL_POOL) == 0) + mes "\"Right now you can't focus on anything yet, so I'll first have to teach you a simple skill to keep your focus.\""; + if (getskilllv(SKILL_POOL) == 1) + mes "\"Right now you can only focus on one thing at a time. So if you want to change what your focus is, you have to forget whatever else you've focused on.\""; + if (getskilllv(SKILL_POOL) > 1) + mes "\"You can focus on " + getskilllv(SKILL_POOL) + " skills right now.\""; + next; + mes "[Luca the Hunter]"; + mes "\"You can come back to me to focus or unfocus a skill whenever you want, I'm here all day.\""; + next; + mes "\"For unfocusing you need to bring a potion; a special potion. That potion is not the easiest to get, but I am sure you are able to.\""; + next; + goto L_Explain_loop; + +L_explain_skills: + mes "[Luca the Hunter]"; + mes "\"Well, I don't really know... lots, I think. I can teach you brawling, which is good when you've run out of arrows or don't have a weapon around.\""; + next; + mes "[Luca the Hunter]"; + mes "\"But there's other skills around. Some mages need special skills to concentrate, so ask around in that crowd, if that's your thing.\""; + next; + mes "[Luca the Hunter]"; + mes "\"I've also heard that there is someone in Hurnscald who can help you make your body more resistant against some things. But body and mind belong together, so you probably have to focus for that, too.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Other than that, just ask around! There have to be some people who can teach you something...\""; + next; + goto L_Explain_loop; + +L_explain_work: + mes "[Luca the Hunter]"; + mes "\"Well, skills allow you to be better in some things, or allow to do what you couldn't do without them. When you've learned a skill and are focusing on it, then it affects what you do.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Now, when you start out with a skill, you won't be very good at it yet. But if you keep practicing you'll learn how to get better.\""; + next; + mes "[Luca the Hunter]"; + mes "\"My old teacher always called that getting `skill points' and that you can see them with [F5], whoever that is.\""; + next; + //TODO: + //mes "[Luca the Hunter]"; + //mes "\"She also said that with this [F5] thing you can get better at those skills, and that it costs you as many skill points as the level you want to go to.\""; + //next; + mes "[Luca the Hunter]"; + mes "\"She always would have one cactus potion too many... but she was an amazing teacher.\""; + mes "He nods emphatically."; + next; + goto L_Explain_loop; + +L_Teachmore: + mes "[Luca the Hunter]"; + mes "\"Good to see you again!\""; + next; + goto L_Teachmore2; + +L_Teachmore2: + setarray @choices, 0,0,0,0,0; + setarray @choice$, "", "", "", "", ""; + @choice_nr = 0; + + @C_focus = 1; + @C_unfocus = 2; + @C_teachbrawling = 3; + @C_teachnothing = 4; + @C_explainagain = 5; + @C_nvm = 6; + @C_focusoverview = 7; + + getactivatedpoolskilllist; + if (!((getskilllv(SKILL_POOL) - @skilllist_count) > 0)) goto L_Teachmore2_nof; + getunactivatedpoolskilllist; + if (@skilllist_count == 0) goto L_Teachmore2_nof; + @choices[@choice_nr] = @C_focus; + @choice$[@choice_nr] = "I would like to focus."; + @choice_nr = @choice_nr + 1; + goto L_Teachmore2_nof; + +L_Teachmore2_nof: + getactivatedpoolskilllist; + if (@skilllist_count == 0) goto L_Teachmore2_nounf; + @choices[@choice_nr] = @C_unfocus; + @choice$[@choice_nr] = "I would like to unfocus."; + @choice_nr = @choice_nr + 1; + goto L_Teachmore2_nounf; + +L_Teachmore2_nounf: + if (!(getskilllv(SKILL_BRAWLING))) + @choices[@choice_nr] = @C_teachbrawling; + if (getskilllv(SKILL_BRAWLING)) + @choices[@choice_nr] = @C_teachnothing; + @choice$[@choice_nr] = "Can you teach me a skill?"; + @choice_nr = @choice_nr + 1; + + @choices[@choice_nr] = @C_explainagain; + @choice$[@choice_nr] = "Can you explain skills again?"; + @choice_nr = @choice_nr + 1; + + if (!(getskilllv(SKILL_POOL))) goto L_Teachmore2_noovv; + @choices[@choice_nr] = @C_focusoverview; + @choice$[@choice_nr] = "Can you tell me what skills I'm currently focused on?"; + @choice_nr = @choice_nr + 1; + goto L_Teachmore2_noovv; + +L_Teachmore2_noovv: + @choices[@choice_nr] = @C_nvm; + @choice$[@choice_nr] = "I'm done for now, thanks!"; + @choice_nr = @choice_nr + 1; + + menu + @choice$[0],L_MenuItems, + @choice$[1],L_MenuItems, + @choice$[2],L_MenuItems, + @choice$[3],L_MenuItems, + @choice$[4],L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + if (@choices[@menu] == 0) goto L_close; + if (@choices[@menu] == @C_focus) goto L_Focus; + if (@choices[@menu] == @C_unfocus) goto L_Unfocus; + if (@choices[@menu] == @C_teachbrawling) goto L_Teach_brawling; + if (@choices[@menu] == @C_teachnothing) goto L_Teach_nothing; + if (@choices[@menu] == @C_explainagain) goto L_Teachmore_explain; + if (@choices[@menu] == @C_focusoverview) goto L_Focus_overview; + if (@choices[@menu] == @C_nvm) goto L_close; + goto L_close; + +L_Teachmore_explain: + goto L_Explain; + +L_Focus: + getunactivatedpoolskilllist; + @skilllist_id[@skilllist_count] = 0; + @skilllist_name$[@skilllist_count] = "Nevermind"; + @skilllist_name$[@skilllist_count + 1] = ""; + menu + @skilllist_name$[0], L_MenuItems1, + @skilllist_name$[1], L_MenuItems1, + @skilllist_name$[2], L_MenuItems1, + @skilllist_name$[3], L_MenuItems1, + @skilllist_name$[4], L_MenuItems1, + @skilllist_name$[5], L_MenuItems1, + @skilllist_name$[6], L_MenuItems1, + @skilllist_name$[7], L_MenuItems1; + +L_MenuItems1: + @menu = @menu - 1; + if (@skilllist_id[@menu] == 0) goto L_Teachmore2; + + poolskill @skilllist_id[@menu]; + goto L_Teachmore2; + +L_Unfocus: + if (countitem("GrimaceOfDementia") > 0) goto L_Unfocus_menu; + + if (MAGIC_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE) goto L_Nopotion; + + mes "[Luca the Hunter]"; + mes "\"Unfocusing is one of the harder parts though, because it is sunk in. You see?\""; + next; + mes "\"So to remove that mental focus we will need a special potion.\""; + next; + mes "\"Maybe you should consult some very skilled alchemists.\""; + next; + mes "\"Ah yes, of course you will need a recipe. Although the alchemist usually knows it.\""; + next; + mes "\"The potion is called Grimace of Dementia. So the alchemist will know for sure.\""; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_UNFOCUS_RECIPE; + menu + "Ok, I will get a Grimace of Dementia potion", L_close, + "Alright, be right back!", L_close; + +L_Nopotion: + mes "[Luca the Hunter]"; + mes "\"Hey, you really need that dementia potion for unfocusing.\""; + next; + mes "\"Come back when you've found a suitable alchemist who can mix such a potion.\""; + next; + goto L_Teachmore2; + +L_Unfocus_menu: + mes "[Luca the Hunter]"; + mes "\"Ahh, I see you have a dementia potion.\""; + next; + mes "\"What skill would you like to unfocus?\""; + + getactivatedpoolskilllist; + + @skilllist_id[@skilllist_count] = 0; + @skilllist_name$[@skilllist_count] = "Nevermind"; + @skilllist_name$[@skilllist_count + 1] = ""; + menu + @skilllist_name$[0], L_MenuItems2, + @skilllist_name$[1], L_MenuItems2, + @skilllist_name$[2], L_MenuItems2, + @skilllist_name$[3], L_MenuItems2, + @skilllist_name$[4], L_MenuItems2, + @skilllist_name$[5], L_MenuItems2, + @skilllist_name$[6], L_MenuItems2, + @skilllist_name$[7], L_MenuItems2; + +L_MenuItems2: + @menu = @menu - 1; + if (@skilllist_id[@menu] == 0) goto L_Teachmore2; + + if (countitem("GrimaceOfDementia") == 0) goto L_Nopotion; + delitem "GrimaceOfDementia", 1; + + unpoolskill @skilllist_id[@menu]; + goto L_close; + +L_Focus_overview: + getactivatedpoolskilllist; + + if (@skilllist_count != 0) goto L_Focus_overview1; + mes "[Luca the Hunter]"; + mes "\"You aren't focused on a skill at the moment.\""; + next; + goto L_Teachmore2; + +L_Focus_overview1: + mes "[Luca the Hunter]"; + @message$ = "\"At the moment you are focused on "; + goto L_Focus_overview2; + +L_Focus_overview2: + @skilllist_count = @skilllist_count-1; + @message$ = @message$ + @skilllist_name$[@skilllist_count]; + if (@skilllist_count == 0) goto L_Focus_overview3; + @message$ = @message$ + ", "; + goto L_Focus_overview2; + +L_Focus_overview3: + @message$ = @message$ + ".\""; + mes @message$; + next; + goto L_Teachmore2; + +L_Teach_brawling: + mes "[Luca the Hunter]"; + mes "\"Well, yes, I can teach you brawling. It's a nice thing, if you have nothing left but your hands to defend yourself.\""; + next; + mes "He is laughing."; + mes "\"And is handy, if some sapling starts getting naughty.\""; + next; + mes "He raises his hands in front of his face and clenches his fists."; + mes "\"Ok, let's go! Hold your hands like this.\""; + next; + mes "......."; + next; + mes "Some bruises later."; + mes "\"Great! I think, you got it.\""; + next; + @SUP_id = SKILL_BRAWLING; + @SUP_lvl = 1; + @SUP_name$ = "Brawling"; + @SUP_xp = @Exp_BRAWLING; + callfunc "SkillUp"; + goto L_close; + +L_Teach_nothing: + mes "[Luca the Hunter]"; + mes "\"I was able to teach you brawling. For other professions you should visit someone else.\""; + next; + mes "\"You see, I am an adventurer. Everybody has his tricks. But you really should visit someone who is a teacher, not an adventurer, now.\""; + next; + goto L_Teachmore2; + +L_close: + @SUP_id = 0; + @SUP_lvl = 0; + @SUP_name$ = ""; + @SUP_xp = 0; + @Exp_BRAWLING = 0; + @answer$ = ""; + @message$ = ""; + cleararray @choices[0], 0, 4; + cleararray @choice$[0], "", 4; + @choice_nr = 0; + @C_focus = 0; + @C_unfocus = 0; + @C_teachbrawling = 0; + @C_teachnothing = 0; + @C_explainagain = 0; + @C_nvm = 0; + @C_focusoverview = 0; + close; +} diff --git a/npc/002-1/mapflags.txt b/npc/002-1/mapflags.txt new file mode 100755 index 00000000..8e244b73 --- /dev/null +++ b/npc/002-1/mapflags.txt @@ -0,0 +1 @@ +//002-1 mapflag resave 001-1,60,105 diff --git a/npc/002-1/mine_debug.txt b/npc/002-1/mine_debug.txt new file mode 100755 index 00000000..b7f6ff23 --- /dev/null +++ b/npc/002-1/mine_debug.txt @@ -0,0 +1,68 @@ + +function script DesertMineDebug { + mes "[Mine Debug]"; + mes "What would you like to do?"; + menu + "Reset", L_Reset, + "Set", L_Set, + "Show", L_Show, + "nothing.", L_close; + +L_Reset: + QL_MINEALL = 0; + FLAGS = FLAGS &~ FLAG_GOT_NAEM_GLOVES; + FLAGS = FLAGS &~ FLAG_OPENED_UNDERGROUND; + goto L_close; + +L_Set: + mes "Values are between 0 and 28"; + mes "8 is Mine Start"; + mes "18 is Angry Scorpions Start"; + mes "20 is Underground Palace Start"; + mes "26 is Giant Cave Maggot Start"; + input QL_MINEALL; + goto L_close; + +L_Show: + mes "Current State: " + QL_MINEALL; + goto L_close; + +L_close: + return; +} +002-1,61,69,0 script Mine Debug#1 NPC122,{ + callfunc "DesertMineDebug"; + close; + +OnInit: + if (!debug) + disablenpc "Mine Debug#1"; + end; +} +002-3,45,49,6 script Mine Debug#2 NPC109,{ + callfunc "DesertMineDebug"; + close; + +OnInit: + if (!debug) + disablenpc "Mine Debug#2"; + end; +} +002-4,88,99,6 script Mine Debug#3 NPC109,{ + callfunc "DesertMineDebug"; + close; + +OnInit: + if (!debug) + disablenpc "Mine Debug#3"; + end; +} +002-5,43,96,6 script Mine Debug#4 NPC340,{ + callfunc "DesertMineDebug"; + close; + +OnInit: + if (!debug) + disablenpc "Mine Debug#4"; + end; +} diff --git a/npc/002-1/nickos.txt b/npc/002-1/nickos.txt new file mode 100755 index 00000000..80c71da0 --- /dev/null +++ b/npc/002-1/nickos.txt @@ -0,0 +1,113 @@ +002-1,46,108,0 script Nickos NPC123,{ + if (QL_MINEALL == 20) goto L_UGQ; + if (QL_MINEALL == 19) goto L_AS_Done; + if (QL_MINEALL == 18) goto L_AS_Start; + if (QL_MINEALL >= 11) && (QL_MINEALL < 18) goto L_Guards; + if (QL_MINEALL == 10) goto L_Check_Happy; + if (QL_MINEALL > 7) && (QL_MINEALL < 10) goto L_Waits; + if (QL_MINEALL == 7) goto L_Mine; + if (QL_MINEALL == 6) goto L_Orders_Received; + if (QL_MINEALL == 5) goto L_Orders; + if (QL_MINEALL < 5) goto L_See_Dausen_First; + + mes "[Nickos]"; + mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\""; + goto L_close; + +L_See_Dausen_First: + mes "[Nickos]"; + mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\""; + next; + mes "[Nickos]"; + mes "\"The mines are closed from tourists due to the monster threat. If you want to get in you will need to prove yourself first. Talk to Lieutenant Dausen, my superior, if you want to make a formal complaint.\""; + goto L_close; + +L_Orders: + QL_MINEALL = 6; + mes "[Nickos]"; + mes "\"I have to hold my post longer? Argh! I was looking forward to my break. Oh well, thanks for letting me know.\""; + goto L_close; + +L_Orders_Received: + mes "[Nickos]"; + mes "\"Thanks for letting me know Lieutenant Dausen wants me to stick it out for a while longer. Even though I would've liked my break, I'm sure these miners could use my watchful eye.\""; + goto L_close; + +L_Mine: + mes "[Nickos]"; + mes "\"I haven't heard from the miners in a while, but I've got to keep to my post unless there is due reason to investigate. Normally the miners take care of themselves without any problem.\""; + next; + mes "[Nickos]"; + mes "\"Could you check on them for me, though?\""; + menu + "Yes.", L_Mine_Open, + "No.", L_Disappoint; + +L_Disappoint: + mes "Nickos looks disappointed."; + goto L_close; + +L_Mine_Open: + QL_MINEALL = 8; + mes "[Nickos]"; + mes "\"Excellent! You now have my permission to enter the mine. Your assistance helps ease my worries.\""; + goto L_close; + +L_Waits: + mes "[Nickos]"; + mes "\"Please be sure to get word from Nathan and Naem to make sure everthing is okay down there. Your assistance helps ease my worries.\""; + goto L_close; + +L_Check_Happy: + QL_MINEALL = 11; + Zeny = Zeny + 500; + mes "[Nickos]"; + mes "\"Oh, everything is okay? That's great! I think they are pretty busy and could use some help. Feel free to give them a hand. Here's some gold for your troubles.\""; + goto L_close; + +L_Guards: + mes "[Nickos]"; + mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\""; + next; + mes "\"Talk to Nathan the miner, I'm sure the miners could use some help down there.\""; + goto L_close; + +L_AS_Start: + QL_MINEALL = 19; + mes "[Nickos]"; + mes "\"Oh, the angry scorpions are becoming a problem? We could thin down their numbers a bit. I can make it worth your time, but of course, I'll need something to show your work. Bring me 10 Angry Scorpion Stingers to demonstrate your effectiveness, and you will be rewarded for your efforts.\""; + goto L_close; + +L_AS_Done: + if (countitem ("AngryScorpionStinger") < 10) + goto L_AS_NotDone; + getinventorylist; + if (@inventorylist_count - (countitem("AngryScorpionStinger") == 10) > 99) + goto L_TooMany; + QL_MINEALL = 20; + delitem "AngryScorpionStinger", 10; + getitem "LeatherShield", 1; + mes "[Nickos]"; + mes "\"Ah, you are a fine combatant! Take this Leather Shield, it might be useful for your future battles.\""; + next; + mes "\"You might be ready to take on the underground palace. If you are interested, go talk to Naem about unlocking the barrier, he's got the key and the code to open it.\""; + goto L_close; + +L_AS_NotDone: + mes "[Nickos]"; + mes "\"Bring me 10 Angry Scorpion Stingers and I'll know their numbers are down. You will be rewarded for your efforts.\""; + goto L_close; + +L_TooMany: + mes "[Nickos]"; + mes "\"Oh, it seems you have too many items. Please get rid some some and I'll give you a reward.\""; + goto L_close; + +L_UGQ: + mes "[Nickos]"; + mes "\"You might be ready to take on the underground palace. If you are interested, talk to the miners about unlocking the barrier, they've got the key to open it.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-1/nomads.txt b/npc/002-1/nomads.txt new file mode 100755 index 00000000..78b25708 --- /dev/null +++ b/npc/002-1/nomads.txt @@ -0,0 +1,13 @@ + +002-1,101,114,0 script Samuel NPC132,{ + mes "[Samuel the Nomad]"; + mes "\"This is really a nice place.\""; + mes "Don't you think so?\""; + close; +} + +002-1,105,114,0 script Elijah NPC128,{ + mes "[Elijah the Nomad]"; + mes "\"It's nice to find a respite like this...\""; + close; +} diff --git a/npc/002-1/npcs.txt b/npc/002-1/npcs.txt new file mode 100755 index 00000000..72340405 --- /dev/null +++ b/npc/002-1/npcs.txt @@ -0,0 +1,22 @@ +002-1,96,23,0 script Jeric NPC214,{ + @npcname$ = "Jeric"; + + mes "[" + @npcname$ + "]"; + mes "\"My father is an adventurer.\""; + next; + mes "\"After he proved himself around town, the guards let him fight monsters in the Sandstorm mine.\""; + @npcname$ = ""; + close; +} +002-1,112,48,0 script Silvia NPC207,{ + @npcname$ = "Silvia"; + + mes "[" + @npcname$ + "]"; + mes "\"If you follow the road west, then north, you will arrive at the Bazaar in Northern Tulimshar.\""; + next; + mes "\"If you go west, then north, you'll see the Wizard Academy my parents just sent me to.\""; + next; + mes "\"The Academy is good, but I wish I had more free time. It takes a lot of intelligence to get what the teachers are talking about.\""; + @npcname$ = ""; + close; +} diff --git a/npc/002-1/sarah.txt b/npc/002-1/sarah.txt new file mode 100755 index 00000000..e703194f --- /dev/null +++ b/npc/002-1/sarah.txt @@ -0,0 +1,75 @@ +002-1,93,43,0 script Sarah NPC106,{ + if (QL_SARAH >= 2) goto L_Done; + if (QL_SARAH == 1) goto L_Progress; + + mes "[Sarah]"; + mes "\"Boy, am I hungry or what!\""; + next; + + @temp = rand(2); + if(@temp == 1) goto L_Opening1; + goto L_Opening0; + +L_Opening0: + mes "\"Cherry Cake is the best!\""; + next; + goto L_Ask; + +L_Opening1: + mes "\"Mmm, Cherry Cake... I love it!\""; + next; + goto L_Ask; + +L_Ask: + mes "\"Can you bring me a piece of Cherry Cake? Pretty please?\""; + menu + "Yes.", L_Req0, + "No.", L_close; + +L_Req0: + mes "[Sarah]"; + mes "\"Yippee! Bring me a piece of Cherry Cake, and I'll give you a nice hat!\""; + next; + QL_SARAH = 1; + mes "[Sarah]"; + mes "\"Please bring it to me!\""; + goto L_close; + +L_Progress: + if (countitem("CherryCake") < 1) + goto L_NotEnough; + mes "[Sarah]"; + mes "\"Whee!\""; + next; + mes "You brought me Cherry Cake! Here is your new hat, as promised.\""; + getinventorylist; + if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany; + delitem "CherryCake", 1; + getitem "SerfHat", 1; + QL_SARAH = 2; + close2; + emotion EMOTE_TONGUE, strcharinfo(0); + end; + +L_NotEnough: + mes "[Sarah]"; + mes "\"Oh, I'm starving! Please bring me Cherry Cake!\""; + goto L_close; + +L_Done: + mes "[Sarah]"; + mes "\"It was so tasty, I can't eat anything more... Thank you!\""; + close2; + emotion EMOTE_TONGUE, strcharinfo(0); + end; + +L_close: + @temp = 0; + close; + +L_TooMany: + next; + mes "[Sarah]"; + mes "\"You don't have room for my reward. I'll wait until you do.\""; + goto L_close; +} diff --git a/npc/002-1/soul-menhir.txt b/npc/002-1/soul-menhir.txt new file mode 100755 index 00000000..5506a97f --- /dev/null +++ b/npc/002-1/soul-menhir.txt @@ -0,0 +1,15 @@ + +002-1,58,60,0 script Soul Menhir#tulimshar NPC345,{ + @map$ = "001-1"; + setarray @Xs, 57, 58, 59, 57, 59, 57, 59; + setarray @Ys, 59, 59, 59, 60, 60, 61, 61; + @x = 0; + @y = 0; + callfunc "SoulMenhir"; + @map$ = ""; + cleararray @Xs[0], 0, 7; + cleararray @Ys[0], 0, 7; + @x = 0; + @y = 0; + close; +} diff --git a/npc/002-1/stewen.txt b/npc/002-1/stewen.txt new file mode 100755 index 00000000..b2d216f3 --- /dev/null +++ b/npc/002-1/stewen.txt @@ -0,0 +1,22 @@ +002-1,116,93,0 script Stewen NPC123,{ + if (QL_MINEALL == 4) goto L_TMW_Quest_Received; + if (QL_MINEALL == 3) goto L_TMW_Quest; + + mes "[Stewen]"; + mes "\"I'm keeping a watchful eye on the monsters to the east so they don't threaten Tulimshar's citizens. They are pretty strong.\""; + goto L_close; + +L_TMW_Quest: + QL_MINEALL = 4; + mes "[Stewen]"; + mes "\"I don't get a break?! Lieutenant Dausen needs to ask the Wizard's Council for more help out here. Either that or give me a raise! Oh well. Thanks for letting me know.\""; + goto L_close; + +L_TMW_Quest_Received: + mes "[Stewen]"; + mes "\"Thanks again for letting me know Lieutenant Dausen isn't letting me take a break. Once I get out of here, I'll let him know I want a raise!\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-1/traveler.txt b/npc/002-1/traveler.txt new file mode 100755 index 00000000..61226caa --- /dev/null +++ b/npc/002-1/traveler.txt @@ -0,0 +1,7 @@ + +002-1,60,41,0 script Nina the Traveler NPC103,{ + @npcname$ = "Nina"; + @NpcTravelBit = $@tulimshar_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/002-2/_import.txt b/npc/002-2/_import.txt new file mode 100644 index 00000000..b7dc062e --- /dev/null +++ b/npc/002-2/_import.txt @@ -0,0 +1,21 @@ +// Map 002-2: Sandstorm Desert Indoors +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/002-2/_warps.txt", +"npc/002-2/bakery.txt", +"npc/002-2/barber.txt", +"npc/002-2/bleacher.txt", +"npc/002-2/casino.txt", +"npc/002-2/dedication.txt", +"npc/002-2/hetchel.txt", +"npc/002-2/imec.txt", +"npc/002-2/inya.txt", +"npc/002-2/kps.txt", +"npc/002-2/kylian.txt", +"npc/002-2/latoy.txt", +"npc/002-2/mapflags.txt", +"npc/002-2/omar.txt", +"npc/002-2/phaet.txt", +"npc/002-2/rebecca.txt", +"npc/002-2/shops.txt", +"npc/002-2/stranger.txt", +"npc/002-2/troupe_leader.txt", diff --git a/npc/002-2/_warps.txt b/npc/002-2/_warps.txt new file mode 100644 index 00000000..984973cf --- /dev/null +++ b/npc/002-2/_warps.txt @@ -0,0 +1,19 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-2: Sandstorm Desert Indoors warps +002-2,44,34,0 warp #002-2_44_34 0,0,002-1,73,36 +002-2,44,20,0 warp #002-2_44_20 1,0,002-2,45,78 +002-2,46,79,0 warp #002-2_46_79 1,0,002-2,43,21 +002-2,46,55,0 warp #002-2_46_55 1,0,002-2,44,109 +002-2,45,110,0 warp #002-2_45_110 1,0,002-2,45,56 +002-2,23,110,0 warp #002-2_23_110 0,0,002-1,67,30 +002-2,34,20,0 warp #002-2_34_20 0,0,002-2,79,69 +002-2,37,20,0 warp #002-2_37_20 0,0,002-2,72,31 +002-2,72,32,0 warp #002-2_72_32 0,0,002-2,37,21 +002-2,79,70,0 warp #002-2_79_70 0,0,002-2,34,21 +002-2,75,101,0 warp #002-2_75_101 0,0,002-1,109,46 +002-2,83,101,0 warp #002-2_83_101 0,0,002-1,115,46 +002-2,78,132,0 warp #002-2_78_132 0,0,002-1,114,36 +002-2,68,121,0 warp #002-2_68_121 0,0,002-1,110,28 +002-2,120,67,0 warp #002-2_120_67 0,0,002-1,99,44 +002-2,120,95,0 warp #002-2_120_95 0,0,002-1,57,36 +002-2,119,132,0 warp #002-2_119_132 0,0,002-1,57,27 diff --git a/npc/002-2/bakery.txt b/npc/002-2/bakery.txt new file mode 100755 index 00000000..c1e9ebbe --- /dev/null +++ b/npc/002-2/bakery.txt @@ -0,0 +1,148 @@ + +002-2,21,22,0 script Riskim NPC148,{ + mes "[Riskim]"; + mes ""; + mes "\"Welcome to our bakery!\""; + + callfunc "KadiyaSubquestConsts"; + if ((@Q_kadiya_status == @Q_STATUS_WANTS_CHOCOCAKE) + && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_chococake; + + if ((@Q_kadiya_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_cupcake; + + mes "\"Would you mind bringing me ##B6 acorns##b please? I need them to make flour so I can bake some chocolate cakes. I will be so delicious!\""; + next; + mes "\"Uh... I mean... the cakes will be delicious...\" %%;"; + next; + + @dq_level = 15; + @dq_cost = 3; + @dq_count = 6; + @dq_name$ = "Acorn"; + @dq_friendly_name$ = "acorns"; + @dq_money = 250; + @dq_exp = 50; + + callfunc "DailyQuest"; + + next; + mes "\"Don't forget: our bakery is the best!\""; + close; + +L_lace_chococake: + next; + menu + "Thanks! Let me have a look around...", L_End, + "Can you put this potion into a Chocolate Cake?", L_Next, + "Goodbye!", L_End; + +L_Next: + mes "[Riskim]"; + mes ""; + mes "You take the potion out and attempt to show it to Riskim, but he takes a step back."; + mes "\"Oh! I remember that smell...\""; + mes "\"Elanore's Mopox potion, right? She made me drink that too...\""; + mes "He chuckles."; + mes "\"Yes. Well, you definitely want to hide that somehow.\""; + next; + mes "[Riskim]"; + mes ""; + mes "\"We'll need extra chocolate for that one. If you can give me ten pieces of chocolate, the Mopox potion, and a payment of 400 GP, I'll bake you a special Chocolate Cake that hides the taste.\""; + next; + menu + "I will get them for you.", L_End, + "Here you are!", L_Continue, + "Maybe later.", L_End; + +L_Continue: + if (countitem("ChocolateBar") < 10) + goto L_lacking_ingredients; + if (countitem("MopoxCurePotion") < 1) + goto L_lacking_ingredients; + if (Zeny < 400) + goto L_lacking_Zeny; + delitem "MopoxCurePotion", 1; + delitem "ChocolateBar", 10; + getitem "LacedChocolateCake", 1; + Zeny = Zeny - 400; + + mes "[Riskim]"; + mes ""; + mes "\"Please have a seat!\""; + mes "You watch as Riskim melts the chocolate, stirs in the potion, and then glazes a cake with the mixture."; + mes "\"It's a bit more chocolaty than your average chocolate cake, so it should help mask that awful taste.\""; + next; + mes "[Riskim]"; + mes ""; + mes "Riskim hands you the cake."; + mes "\"Here you are! I hope this helps.\""; + close; + +L_lacking_Zeny: + mes "[Riskim]"; + mes ""; + mes "\"I'm sorry, but I have to charge 400 GP. I've got to make a living somehow.\""; + close; + +L_lacking_ingredients: + mes "[Riskim]"; + mes ""; + mes "\"Sorry, but I need both the ten Chocolate Bars and your potion for this. Please come back later when you have everything.\""; + close; + +L_lace_cupcake: + next; + menu + "Thanks! Let me have a look around...", L_End, + "Can mix a potion into an Orange Cupcake?", L_More, + "Goodbye!", L_End; + +L_More: + mes "[Riskim]"; + mes ""; + mes "\"Orange Cupcakes? Oh dear... I'm sorry, but I have a very bad allergy to oranges.\""; + next; + mes "[Riskim]"; + mes ""; + mes "\"Perhaps the Chef at Dimond's Cove can help you. We get all of our cupcakes from him.\""; + next; + goto L_End; + +L_End: + close; +} + +002-2,28,31,0 script Sara NPC108,{ + mes "[Sara]"; + mes ""; + mes "\"Hello!\""; + mes "\"If you'd like to buy something, just ask Drabur.\""; + mes "\"If you need something made-to-order, talk to Riskim.\""; + close; +} + +002-2,25,22,0 shop Drabur NPC112,736:100,737:125,738:150,739:150,513:15,519:50,534:45,527:150,508:10 + +002-2,21,28,0 script Iormo NPC160,{ + mes "[Iormo]"; + mes ""; + mes "\"The cake sure is good, but this room can get messy with all the flour.\""; + close; +} + +002-2,24,27,0 script Rynoh NPC159,{ + mes "[Rynoh]"; + mes ""; + mes "\"The cakes may be expensive, but they sure are delicious!\""; + close; +} + +002-2,26,27,0 script Ontas NPC154,{ + mes "[Ontas]"; + mes ""; + mes "\"We come here almost every week! This place has some of the best bread I've ever eaten!\""; + close; +} diff --git a/npc/002-2/barber.txt b/npc/002-2/barber.txt new file mode 100755 index 00000000..5b880e4b --- /dev/null +++ b/npc/002-2/barber.txt @@ -0,0 +1,10 @@ +002-2,22,77,0 script Issay NPC156,{ + mes "[Issay the Barber]"; + mes "\"Want to change your hairstyle?\""; + next; + callfunc "Barber"; + mes "[Issay the Barber]"; + mes "\"Come again!\""; + close; +} + diff --git a/npc/002-2/bleacher.txt b/npc/002-2/bleacher.txt new file mode 100755 index 00000000..daea556d --- /dev/null +++ b/npc/002-2/bleacher.txt @@ -0,0 +1,130 @@ + +002-2,72,92,0 script Candide NPC156,{ + mes "[Candide]"; + mes "\"Greetings! I am Candide the Bleacher."; + mes "Tulimshar is my homeland, where I learned the ancient art of bleaching.\""; + next; + mes "\"Bleaching was originally done by the sun, but now we use ash combined with special ingredients to remove color from fabric.\""; + next; + menu + "What is needed for the bleaching process?", L_Materials, + "I'd like to bleach something.", L_bleach_menu, + "So long.", L_close; + +L_Materials: + mes "[Candide]"; + mes "\"For each item, I will need 3 piles of ash and 5,000 GP for the special ingredients.\""; + next; + menu + "I'd like to bleach something.", L_bleach_menu, + "So long.", L_close; + +L_bleach_menu: + if (countitem("PileOfAsh") < 3) goto L_No_Ash; + if (Zeny < 5000) goto L_No_Money; + cleararray @CANDIDE_items,0,getarraysize(@CANDIDE_items); + cleararray @CANDIDE_color,0,getarraysize(@CANDIDE_color); + cleararray @CANDIDE_menu$,"",getarraysize(@CANDIDE_menu$); + @w = 0; + freeloop 1; // do not check for infinity loop + callsub S_LoopArray; + freeloop 0; // re-enable infinity loop check + @w = 0; + @c = 0; + @p = 0; + if(@CANDIDE_menu$[0] == "") goto L_Nothing; + mes "[Candide]"; + mes "\"Yes?\""; + next; + menu + "Nevermind.", L_close, + @CANDIDE_menu$[0], L_MenuItems, // base array was too big for a dynamic menu so we can't use it + @CANDIDE_menu$[1], L_MenuItems, + @CANDIDE_menu$[2], L_MenuItems, + @CANDIDE_menu$[3], L_MenuItems, + @CANDIDE_menu$[4], L_MenuItems, + @CANDIDE_menu$[5], L_MenuItems, + @CANDIDE_menu$[6], L_MenuItems, + @CANDIDE_menu$[7], L_MenuItems, + @CANDIDE_menu$[8], L_MenuItems, + @CANDIDE_menu$[9], L_MenuItems, + @CANDIDE_menu$[10], L_MenuItems, + @CANDIDE_menu$[11], L_MenuItems, + @CANDIDE_menu$[12], L_MenuItems, + @CANDIDE_menu$[13], L_MenuItems, + @CANDIDE_menu$[14], L_MenuItems, + @CANDIDE_menu$[15], L_MenuItems, + @CANDIDE_menu$[16], L_MenuItems, + @CANDIDE_menu$[17], L_MenuItems; + +S_LoopArray: + @c = 0; + callsub S_LoopColor; + @w = @w + 1; + if(@w < getarraysize($@DYE_items$)) goto S_LoopArray; + return; + +S_LoopColor: + if(countitem($@DYE_colors$[@c] + $@DYE_items$[@w]) > 0) + goto L_AddToMenu; + goto L_LoopColor2; + +L_AddToMenu: + @CANDIDE_items[@p] = @w; + @CANDIDE_color[@p] = @c; + @CANDIDE_menu$[@p] = $@DYE_color_names$[@c]+" "+$@DYE_item_names$[@w]; + @p = @p + 1; + goto L_LoopColor2; + +L_LoopColor2: + @c = @c + 1; + if(@c < getarraysize($@DYE_colors$)) goto S_LoopColor; + return; + +L_Nothing: + mes "[Candide]"; + mes "\"Sorry, you have nothing to bleach.\""; + next; + goto L_close; + +L_MenuItems: + if (countitem("PileOfAsh") < 3) goto L_No_Ash; + if (Zeny < 5000) goto L_No_Money; + @m = @menu - 2; + @it$ = $@DYE_colors$[@CANDIDE_color[@m]] + $@DYE_items$[@CANDIDE_items[@m]]; + if(getitemlink(@it$) == "Unknown Item") mapexit; + delitem @it$, 1; + delitem "PileOfAsh", 3; + Zeny = Zeny - 5000; + getitem $@DYE_items$[@CANDIDE_items[@m]], 1; + goto L_Again; + +L_Again: + mes "[Candide]"; + mes "\"Would you like to bleach something else?\""; + next; + menu + "Yes.", L_bleach_menu, + "No.", L_close; + +L_No_Ash: + mes "[Candide]"; + mes "\"You don't have enough ash for me to bleach anything."; + mes "I need three piles.\""; + next; + goto L_close; + +L_No_Money: + mes "[Candide]"; + mes "\"You don't have enough gold for me to bleach anything."; + mes "I need 5,000 GP for supplies.\""; + next; + goto L_close; + +L_close: + mes "[Candide]"; + mes "\"Come again.\""; + close2; + emotion EMOTE_GRIN, strcharinfo(0); + end; +} diff --git a/npc/002-2/casino.txt b/npc/002-2/casino.txt new file mode 100755 index 00000000..5f123962 --- /dev/null +++ b/npc/002-2/casino.txt @@ -0,0 +1,195 @@ +002-2,79,68,0 script #CasinoEntrance NPC32767,13,0,{ + QUEST_NorthTulimshar = QUEST_NorthTulimshar | $@knowCasinoNT; + if (QL_KYLIAN != 6) + goto L_End; + message strcharinfo(0), "You wonder if Kylian would be interested in visiting the Casino."; + goto L_End; + +L_End: + end; +} + +002-2,86,29,0 script Valdo NPC117,{ + mes "[Valdo the Worker]"; + mes "\"Please let me work. I've got a lot to do and not enough time to do it!\""; + close; +} + +002-2,84,62,0 script Slots#1 NPC400,{ + callfunc "SlotMachine"; + close; +} + +002-2,86,62,0 script Slots#2 NPC400,{ + callfunc "SlotMachine"; + close; +} + +002-2,88,62,0 script Slots#3 NPC400,{ + callfunc "SlotMachine"; + close; +} + +002-2,78,56,0 shop MoneyChanger NPC124,503:10 + +002-2,75,60,0 script BlackJack NPC107,{ + mes "[Croupier]"; + mes "\"Would you like to play Black Jack?"; + mes "You will need 15 casino coins.\""; + next; + menu + "Sure.", L_Begin, + "Not now.", L_close; + +L_Begin: + if(countitem("CasinoCoins") < 15) goto L_NoCoin; + delitem "CasinoCoins", 15; + @croupier = rand(0, 4); + @croupier = @croupier + 17; + @player = rand(4, 21); + mes "Your cards are worth " + @player + " points."; + if(@player == 21) goto L_End; + mes "Do you want another card?\""; + menu + "Yes.", L_Another, + "No.", L_End; + +L_Another: + @tempace = rand(2, 11); + if (@tempace == 11) goto L_Ace; + @player = @player + @tempace; + if (@player > 21) goto L_Lost; + if (@player == 21) goto L_End; + mes "Your cards are worth " + @player + " points."; + mes "Do you want another card?\""; + menu + "Yes.", L_Another, + "No.", L_End; + +L_End: + if (@player <= @croupier) goto L_Lost; + mes "Your cards are worth " + @player + " points."; + mes "\"I have " + @croupier + " points."; + mes "Congratulations! You won!"; + mes "You get 45 casino coins!\""; + getitem "CasinoCoins", 45; + goto L_close; + +L_NoCoin: + mes "\"Sorry, but you need at least 15 coins to play.\""; + goto L_close; + +L_Lost: + mes "\"I'm sorry, but you lost."; + mes "Your cards are worth " + @player + " points."; + mes "I have " + @croupier + " points.\""; + goto L_close; + +L_Ace: + @player = @player + 11; + if (@player > 21) set @player, @player - 10; + if (@player > 21) goto L_Lost; + if (@player == 21) goto L_End; + mes "Your cards are worth " + @player + " points."; + mes "Do you want to take another card?"; + menu + "Yes", L_Another, + "No", L_End; + +L_close: + mes "\"Be sure to come back again.\""; + @croupier = 0; + @player = 0; + @tempace = 0; + close; +} + +002-2,69,67,0 script Roulette NPC107,{ + mes "[Croupier]"; + mes "\"Good evening monsieur..."; + mes "How much would you like to bet?\""; + next; + menu + "1 coin", L_b1, + "5 coins", L_b5, + "10 coins", L_b10, + "50 coins", L_b50, + "100 coins", L_b100, + "Maybe I'll play later.", L_close; + +L_b1: + @bet = 1; + goto L_Check; + +L_b5: + @bet = 5; + goto L_Check; + +L_b10: + @bet = 10; + goto L_Check; + +L_b50: + @bet = 50; + goto L_Check; + +L_b100: + @bet = 100; + goto L_Check; + +L_Check: + if(countitem("CasinoCoins") < @bet) goto L_NoCoin; + menu + "Choose a color...", L_PickColor, + "Choose a number...", L_Number; + +L_PickColor: + menu + "Black.", L_Color, + "Red.", L_Color; + +L_Color: + delitem "CasinoCoins", @bet; + @color = rand(2); + if(@color == 1) goto L_Lost; + mes "You won!"; + getitem "CasinoCoins", @bet * 2; + goto L_close; + +L_Number: + menu + "0", L_MenuItems, "00", L_MenuItems, "1", L_MenuItems, "2", L_MenuItems, "3", L_MenuItems, "4", L_MenuItems, "5", L_MenuItems, "6", L_MenuItems, "7", L_MenuItems, "8", L_MenuItems, + "9", L_MenuItems, "10", L_MenuItems, "11", L_MenuItems, "12", L_MenuItems, "13", L_MenuItems, "14", L_MenuItems, "15", L_MenuItems, "16", L_MenuItems, "17", L_MenuItems, "18", L_MenuItems, + "19", L_MenuItems, "20", L_MenuItems, "21", L_MenuItems, "22", L_MenuItems, "23", L_MenuItems, "24", L_MenuItems, "25", L_MenuItems, "26", L_MenuItems, "27", L_MenuItems, "28", L_MenuItems, + "29", L_MenuItems, "30", L_MenuItems, "31", L_MenuItems, "32", L_MenuItems, "33", L_MenuItems, "34", L_MenuItems, "35", L_MenuItems, "36", L_MenuItems; + +L_MenuItems: + delitem "CasinoCoins", @bet; + if (@menu == 1) set @number, 0; + if (@menu == 2) set @number, 37; + if (@menu >= 3) set @number, @menu - 2; + + @roulette = rand(38); + if (@roulette == 37) mes "The ball stopped on 00."; + if (@roulette < 37) mes "The ball stopped on " + @roulette + "."; + if (@number != @roulette) goto L_Lost; + mes "\"You won!\""; + getitem "CasinoCoins", @bet * 10; + goto L_close; + +L_NoCoin: + mes "\"You don't have enough coins to play.\""; + goto L_close; + +L_Lost: + mes "\"I'm sorry, but you lost.\""; + goto L_close; + +L_close: + mes "Come again!"; + @number = 0; + @roulette = 0; + @color = 0; + @bet = 50; + close; +} diff --git a/npc/002-2/dedication.txt b/npc/002-2/dedication.txt new file mode 100755 index 00000000..31978298 --- /dev/null +++ b/npc/002-2/dedication.txt @@ -0,0 +1,8 @@ + +002-2,116,123,0 script #IreneDedication NPC400,{ + mes "~ Irene Christina ~"; + mes "The song in this house is dedicated to Irene."; + next; + mes "She had seen only twenty hours of this world when she died in her father's arms."; + close; +} diff --git a/npc/002-2/hetchel.txt b/npc/002-2/hetchel.txt new file mode 100755 index 00000000..82e8f02d --- /dev/null +++ b/npc/002-2/hetchel.txt @@ -0,0 +1,417 @@ + +002-2,76,92,0 script Hetchel NPC376,{ + @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + @spants_state = ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + @SHEET_COCOONS_NR = 25; + @SHEET_ZENY = 500; + @spants_minlvl = 45; + setarray @spants_req_hmn$, "Silk Cocoons", "Pieces of Cotton Cloth", "Silk Headbands"; + setarray @spants_req$, "SilkCocoon", "CottonCloth", "SilkHeadband"; + setarray @spants_req_amt, 154, 14, 2; + @spants_reward = 45000; + @spants_job_reward = 10000; + @SheetCount = 0; + + if (@wg_state < 11) + goto L_WG_quest_not_done; + if ( BaseLevel > @spants_minlvl && @spants_state < 1 ) goto L_Spants_Cry; + if ( @spants_state == 1 ) goto L_Spants_Cry_2; + if ( @spants_state == 2 ) goto L_Spants_Start; + if ( @spants_state > 2 && @spants_state < 8 ) goto L_Spants_Steal; + if ( @spants_state == 8 ) goto L_Spants_Make; + + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu; + +L_WG_quest_not_done: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles."; + mes "My best client is Lora Tay, at Dimond's."; + mes "What can I do for you?\""; + menu + "Sorry to bother, I'm new to this country, just visting.", L_close, + "What are you selling?", L_Main_menu; + +L_Spants_Cry: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Spants_Cry_Cont_1; + +L_Spants_Cry_2: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu, + "Hey you have been crying so badly, can I help you somehow?", L_Spants_Reply_Cry, + "Give Hetchel something to dry her tears", L_Spants_Tears; + +L_Spants_Start: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu, + "So you are looking for new goals in your life?", L_Spants_No_Cry; + +L_Spants_Steal: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu, + "About the Pants...", L_Spants_Steal_Cont; + +L_Spants_Make: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\""; + menu + "Sorry to bother, I'm just visiting.", L_close, + "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu, + "Hey what about the Pants you were planning to make?", L_Spants_Make_Cont; + +L_Spants_Cry_Cont_1: + mes "You notice how the tiny woman blushes, she suddenly bursts into tears."; + next; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Hello\""; + mes "Hetchel hides her face in her hands"; + mes ""; + mes ""; + menu + "\"Hey, what is the problem?\"", L_Spants_Reply_Cry, + "Give Hetchel something to dry her tears", L_Spants_Tears, + "\"Oh really? Just sell me some Silk Sheets if you have them\"", L_Main_menu; + +L_Spants_Tears: + mes "Choose the item you want to give her."; + next; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + setarray @items$, "RedCottonCloth", "GreenCottonCloth", "DarkBlueCottonCloth", "YellowCottonCloth", "LightBlueCottonCloth", "PinkCottonCloth", "BlackCottonCloth", "OrangeCottonCloth", "PurpleCottonCloth", "DarkGreenCottonCloth", "HitchhikersTowel", "WhiteHitchhikersTowel", "RedHitchhikersTowel", "GreenHitchhikersTowel", "BlueHitchhikersTowel", "YellowHitchhikersTowel", "PurpleHitchhikersTowel", "OrangeHitchhikersTowel", "PinkHitchhikersTowel", "TealHitchhikersTowel", "LimeHitchhikersTowel", "SnakeSkin", "LeatherPatch", "SnakeTongue", "MountainSnakeTongue", "GrassSnakeTongue", "CaveSnakeTongue", "BatWing", "RottenRags", "BrokenDoll", "RedDottedWrap", "BlueDottedWrap", "PurpleStripedWrap", "RedGoldenStripedWrap", "GreenRedStripedWrap", "YellowWrap", "WhiteWrap", "BlueWrap", "PurpleWrap", "GreenWrap", "Doll", "BookPage"; + setarray @item_names$, "Red Cotton Cloth", "Green Cotton Cloth", "Dark Blue Cotton Cloth", "Yellow Cotton Cloth", "Light Blue Cotton Cloth", "Pink Cotton Cloth", "Black Cotton Cloth", "Orange Cotton Cloth", "Purple Cotton Cloth", "Dark Green Cotton Cloth", "Hitchhiker's Towel", "White Hitchhiker's Towel", "Red Hitchhiker's Towel", "Green Hitchhiker's Towel", "Blue Hitchhiker's Towel", "Yellow Hitchhiker's Towel", "Purple Hitchhiker's Towel", "Orange Hitchhiker's Towel", "Pink Hitchhiker's Towel", "Teal Hitchhiker's Towel", "Lime Hitchhiker's Towel", "Snake Skin", "Leather Patch", "Snake Tongue", "Mountain Snake Tongue", "Grass Snake Tongue", "Cave Snake Tongue", "Bat Wing", "Rotten Rags", "Broken Doll", "Red Dotted Wrap", "Blue Dotted Wrap", "Purple Striped Wrap", "Red Golden Striped Wrap", "Green Red Striped Wrap", "Yellow Wrap", "White Wrap", "Blue Wrap", "Purple Wrap", "Green Wrap", "Doll", "Book Page"; + callfunc "DynamicItemMenu$"; + @spants_wipe_thingy$ = @item$; + if (@spants_wipe_thingy$ == "") goto L_close; + if (countitem(@spants_wipe_thingy$) < 1) goto L_Spants_No_Item; + if (@spants_wipe_thingy$ == "RedCottonCloth") goto L_Spants_Tears_Cont; + if (@spants_wipe_thingy$ == "RedHitchhikersTowel") goto L_Spants_Tears_Towel; + mes "Hetchel looks at you, then looks at the" + @spants_wipe_thingy$ + "."; + mes "She hangs her head and weeps more"; + mes "Red is the only color I have ever loved, bring me something red to dry my tears"; + goto L_close; + +L_Spants_Tears_Towel: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"No, I recognize this towel, it is one of those warping towels, are you trying to mess with me?\""; + goto L_close; + +L_Spants_No_Item: + mes "Oh you do not have it."; + goto L_close; + +L_Spants_Tears_Cont: + mes "Hetchel dries her tears with the Red Piece of Cloth you gave her."; + mes "This seems to have consoled her."; + delitem "RedCottonCloth", 1; + @spants_state = 2; + callsub S_Update_Spants; + goto L_Spants_No_Cry; + +L_Spants_No_Cry: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Oh thank you my dear friend."; + mes "Yes, to some extent."; + next; + mes "I am just so sad because I realized that this is going to be the thing I will be doing for the rest of my life\""; + menu + "\"You are still young, Hetchel, You can still accomplish things\"", L_Spants_Cry_Cont_2, + "\"Yes, you are probably correct.\"", L_close; + +L_Spants_Cry_Cont_2: + mes "[Hetchel the weaver]"; + mes ""; + mes "Hetchel thinks for a while"; + mes ""; + mes "\"Oh my friend, I have been dreaming of making a garment of my own."; + mes "It always bothered me to see all those wizards and witches here being naked under their cloaks\""; + mes "\"They must be so embarrassed - they are true heroes to give up their dignity to be able to fight the perils of this world\""; + mes "Hetchel sobs"; + menu + "\"So you want to make pants for mages?\"", L_Spants_Cry_Cont_3, + "\"This sounds ridiculous. Good Bye.\"", L_close; + +L_Spants_Cry_Cont_3: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Ok, so I figured I could make some trousers like Lora Tay makes but from the much finer Material the Silk Worms are making for us\""; + mes "\"But I really need the base plans for the trousers, otherwise I do not know how to attempt this."; + mes "Can you get me those plans from her?\""; + menu + "\"No, sorry I am too busy for that\"", L_close, + "\"Of course!\"", L_Spants_Cry_Cont_4; + +L_Spants_Cry_Cont_4: + @spants_state = 3; + callsub S_Update_Spants; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Oh wait! I am not sure if it is such a good idea to ask her about that, I think she would not give the plans to you anyway."; + mes "Maybe you can find a way to get those plans on a different way?"; + mes "I think there are some people in Hurnscald who have their means of getting you every possible item there is\""; + next; + mes "[Hetchel the weaver]"; + mes ""; + mes "Please please please - I need those plans"; + goto L_close; + +L_Spants_Reply_Cry: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"...\""; + @spants_state = 1; + callsub S_Update_Spants; + goto L_close; + + +L_Spants_Steal_Cont: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Have you gotten hold of the plans?\""; + menu + "Yes I have them somewhere here", L_Spants_Steal_Cont2, + "No, not yet", L_close; + +L_Spants_Steal_Cont2: + if(@spants_state < 7) goto L_Spants_No_Item; + @spants_state = 8; + callsub S_Update_Spants; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Oh this is miraculous\""; + mes ""; + mes "Hetchel sheds some tears of joy"; + next; + mes "You hand her the crumpled plans Crastur the Ugly gave you."; + next; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"I need to figure out how to do this now... \""; + next; + mes "Hetchel adjusts her glasses and reads carefully"; + next; + mes "She seems to be very busy, maybe you should come back later."; + goto L_close; + +L_Spants_Make_Cont: + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Yes, I already made a prototype but it cost me a lot of time and effort."; + mes "I can give it to you if you are willing to pay for my expenses though.\""; + menu + "What do you want for those silken pants?", L_Spants_Make_Cont_2, + "No, I am not particularly interested.", L_close; + +L_Spants_Make_Cont_2: + if(getarraysize(@spants_req_amt) < 3 || getarraysize(@spants_req$) < 3 || getarraysize(@spants_req_hmn$) < 3) + goto L_Spants_Error; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"I need you to bring me " + @spants_req_amt[0] +" "+ @spants_req_hmn$[0] + ", " + @spants_req_amt[1] +" "+ @spants_req_hmn$[1] + " and " + @spants_req_amt[2] +" "+ @spants_req_hmn$[2]; + next; + mes "You will not have to pay for my time, I am so proud to have accomplished this on my own!\""; + menu + "\"I have those items with me\"", L_Spants_Pay, + "\"I am still looking for them\"", L_close, + "\"What do you need again?\"", L_Spants_Make_Cont_2; + +L_Spants_Pay: + if (countitem(@spants_req$[0]) < @spants_req_amt[0] || countitem(@spants_req$[1]) < @spants_req_amt[1] || countitem(@spants_req$[2]) < @spants_req_amt[2]) + goto L_Spants_No_Item; + getinventorylist; + if (@inventorylist_count == 100) goto L_TooMany; + mes "Hetchel takes your items."; + delitem @spants_req$[0], @spants_req_amt[0]; + delitem @spants_req$[1], @spants_req_amt[1]; + delitem @spants_req$[2], @spants_req_amt[2]; + getitem "SilkPants", 1; + @spants_state = 9; + callsub S_Update_Spants; + next; + mes "[Hetchel the weaver]"; + mes ""; + mes "\"Here are your pants my dear."; + mes "Keep them safe I do not know if I will ever try this again.\""; + getexp @spants_reward, @spants_job_reward; + goto L_close; + +L_Spants_Error: + mes "Something went wrong in the script, please inform a developer about that"; + close; + +L_Main_menu: + mes "[Hetchel]"; + mes "\"I have some silk sheets: double-elbow squares.\""; + menu + "I'm not interested at the moment, maybe later; thanks anyway.", L_close, + "Can I buy some?", L_Next; + +L_Next: + mes "[Hetchel]"; + mes ""; + mes "\"Sure but you need to provide raw materials."; + mes "I'll need " + @SHEET_COCOONS_NR +" silk cocoons per sheet,"; + mes "and also " + @SHEET_ZENY +" GP per sheet for my work.\""; + next; + if (countitem("SilkCocoon") == 0) + goto L_sheet_no_cocoon; + goto L_sheet_menu; + +L_sheet_menu: + menu + "I have what you asked for.", L_Next1, + "Sorry I didn't pay attention enough, what do you need?", L_how_many_cocoons, + "Oops! Sorry, I'll come back soon with them.", L_close; + +L_Next1: + mes "[Hetchel]"; + mes ""; + mes "\"How many would you like?\""; + input @SheetCount; + if (@SheetCount == 0) + goto L_zero_sheet; + if (countitem("SilkCocoon") < @SheetCount * @SHEET_COCOONS_NR) + goto L_sheet_missing_cocoons; + if (Zeny < @SheetCount * @SHEET_ZENY) + goto L_sheet_missing_Zeny; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SilkSheet") < 1 && countitem("SilkCocoon") > @SheetCount * @SHEET_COCOONS_NR) + goto L_TooMany; + Zeny = Zeny - @SheetCount * @SHEET_ZENY; + delitem "SilkCocoon", @SheetCount * @SHEET_COCOONS_NR; + getitem "SilkSheet", @SheetCount; + mes "[Hetchel]"; + mes ""; + mes "\"Thank you, I hope the sheets will fit your needs."; + mes "Please greet Lora for me when you see her.\""; + emotion EMOTE_HAPPY, strcharinfo(0); + goto L_close; + +L_sheet_missing_cocoons: + mes "[Hetchel]"; + mes ""; + mes "\"I'm sorry, but I need " + @SheetCount * @SHEET_COCOONS_NR + ", not " + countitem("SilkCocoon") + ".\""; + goto L_close; + +L_sheet_missing_Zeny: + mes "[Hetchel]"; + mes ""; + mes "\"No, no no. The way this works is that you give me the GP first and I give you the sheets afterwards."; + mes "You're " + (@SheetCount * @SHEET_ZENY - Zeny) + " GP short, so come back when you can afford the sheets you asked for!\""; + goto L_close; + +L_how_many_cocoons: + mes "[Hetchel]"; + mes ""; + mes "\"I need an average of " + @SHEET_COCOONS_NR + " cocoons per sheet"; + mes "and also " + @SHEET_ZENY + " GP per sheet for my work.\""; + next; + goto L_sheet_menu; + +L_sheet_no_cocoon: + mes "[Hetchel]"; + mes ""; + mes "\"You don't have any cocoon? I'm sorry I can't do anything for you.\""; + menu + "I'll seek for them.", L_close, + "Where can I get cocoons?", L_Next2; + +L_Next2: + mes "[Hetchel]"; + mes "\"Silk cocoons come from Silkworms. Silkworms live in the woodland area around Hurnscald."; + mes "Silkworms like especially woods and dark areas. You can go there by ferry.\""; + goto L_close; + + +L_zero_sheet: + mes "[Hetchel]"; + mes ""; + mes "\"It's the best way to get quickly served!\""; + goto L_close; + +L_TooMany: + mes "[Hetchel]"; + mes ""; + mes "\"Your bag hasn't room enough. Store some things and come back.\""; + goto L_close; + +S_Update_Spants: + QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + return; + +L_close: + QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + @wg_state = 0; + @spants_state = 0; + @spants_minlvl = 0; + @spants_reward = 0; + @spants_job_reward = 0; + @spants_wipe_thingy = ""; + @SHEET_COCOONS_NR = 0; + @SHEET_ZENY = 0; + @SheetCount = 0; + @wg_state = 0; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + close; +} + +002-2,73,95,0 script HetchelDebug NPC376,{ +set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); +set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + +mes "Lora Tay Quest State: "+ @wg_state; +mes "Silk Pants Quest State: "+ @spants_state; + +menu + "Set Lora Tay Quest State", L_Lora_Tay, + "Set Silk Pants Quest State", L_Spants, + "Close", L_close; + +L_Lora_Tay: + mes "Set Lora Tay Visited State (0 - reset , 11 - enough for SilkPants Quest)"; + input @wg_state; + goto L_close; + +L_Spants: + mes "Set SilkPants Quest State (0 - reset)"; + input @spants_state; + goto L_close; + +L_close: + QUEST_WG_state = (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT)); + @wg_state = 0; + QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + @spants_state = 0; + close; + +OnInit: + if (!debug) + disablenpc "HetchelDebug"; + end; +} diff --git a/npc/002-2/imec.txt b/npc/002-2/imec.txt new file mode 100755 index 00000000..dfd7187f --- /dev/null +++ b/npc/002-2/imec.txt @@ -0,0 +1,115 @@ +002-2,36,75,0 script Imec NPC162,{ + @Exp = 90; + @money = 500; + @lvl = 10; + + if (QL_IMEC >= 3) goto L_Stingers; + if (QL_IMEC == 2) goto L_Return; + if (QL_IMEC == 1) goto L_Bring; + + mes "[Imec]"; + mes "%%9"; + mes "\"The Wizard's Council shut down my shop!"; + mes "Why'd they have to make such a fuss over a little poison?\""; + next; + mes "\"Someday, I'm going to get my permit back from those self-righteous snobs!\""; + next; + mes "He looks at you."; + next; + mes "[Imec]"; + mes "%%D"; + mes "\"Hey... I've got an idea!"; + next; + mes "I just finished writing an appeal to the Council. If you bring it to the government building near the docks, they might be less... closed-minded.\""; + goto L_Offer; + +L_Offer: + menu + "Just tell me how to get there.",L_Explain, + "I'll do it.",L_Next, + "No way!",L_close; + +L_Next: + mes ""; + mes "[Imec]"; + mes "\"Great! Here's the appeal.\""; + mes "Imec gives you a sealed letter, which you store in a safe pocket outside of your inventory."; + QL_IMEC = 1; + goto L_close; + +L_Explain: + mes ""; + mes "[Imec]"; + mes "\"Head north until you get to the docks – it's just west of the ferry.\""; + next; + mes "\"There are a couple of other offices inside. You can form a party if you want, but don't take too long.\""; + if (BaseLevel < WEDDING_MIN_LEVEL) mes "\"Once you're older, you can even get married there.\""; + next; + mes "\"So... will you submit my appeal for me?\""; + if (QL_IMEC == 0) + goto L_Offer; + goto L_close; + +L_Bring: + mes "[Imec]"; + mes "\"What are you waiting for? I'm not paying you till after the job is done!\""; + menu + "Where is it again?",L_Explain, + "I'm on my way.",L_close; + +L_Return: + mes "[Imec]"; + mes "\"Ah! You're back! How'd it go?\""; + mes "You hand the letter of acknowledgment over to Imec."; + next; + mes "[Imec]"; + mes "\"Great! I'm sure I'll be able to open my shop again soon.\""; + next; + mes "It seems as though Imec has lost interest in you already."; + menu + "You mentioned a reward...",L_Next1; + +L_Next1: + mes ""; + mes "[Imec]"; + mes "\"What? Oh, right. Here, have this.\""; + getexp @Exp, 0; + Zeny = Zeny + @money; + QL_IMEC = 3; + next; + if (BaseLevel >= @lvl) + goto L_Transition_Stingers; + if (BaseLevel < @lvl) + mes "\"Come back to see me once you grow stronger; I might have a job for you later on.\""; + goto L_close; + +L_Transition_Stingers: + mes "\"Actually, you could be of further use to me.\""; + next; + goto L_Stingers; + +L_Stingers: + mes "[Imec]"; + @dq_level = @lvl; + @dq_cost = 3; + @dq_count = 3; + @dq_name$ = "ScorpionStinger"; + @dq_friendly_name$ = "Scorpion Stingers"; + @dq_money = 200; + @dq_exp = 40; + + callfunc "DailyQuest"; + goto L_close; + +L_close: + @money = 0; + @dq_level = 0; + @dq_cost = 0; + @dq_count = 0; + @dq_name$ = ""; + @dq_friendly_name$ = ""; + @dq_money = 0; + @dq_exp = 0; + @dq_return = 0; + close; +} diff --git a/npc/002-2/inya.txt b/npc/002-2/inya.txt new file mode 100755 index 00000000..787f8a56 --- /dev/null +++ b/npc/002-2/inya.txt @@ -0,0 +1,206 @@ + +002-2,116,61,0 shop #InyaShop NPC32767,4014:2500 + +002-2,116,61,0 script Inya NPC106,{ + mes "[Inya]"; + mes "\"I am Inya, a jeweler of fine rings. I sell and make rings.\""; + next; + mes "\"If you have a Simple Ring and a gem, I can set the gem in it for 100,000 gold pieces.\""; + next; + mes "\"Also, if you have a ring with gems on it, I can remove the gems and return the Simple Ring to you for 50,000 gold pieces.\""; + next; + mes "\"So, how can I help you?\""; + menu + "What jewelry do you have for sale?", L_Inya_Shop, + "I have a wedding ring, will that do?", L_Inya_Wedding_Ring, + "I'd like to remove a gem (50000 GP).", L_Inya_Remove_RingGem, + "I'd like to add a gem (100000 GP).", L_Inya_Add_RingGem, + "Not interested.", L_Inya_NotInterested; + +L_Inya_Shop: + close2; + shop "#InyaShop"; + +L_Inya_Wedding_Ring: + mes "[Inya]"; + mes "\"No, sorry. I do not alter wedding rings at this time.\""; + close; + +L_Inya_Remove_RingGem: + mes "[Inya]"; + mes "\"What kind of gem would you like to have removed?\""; + menu + "Diamond.", L_Inya_Remove_Diamond, + "Ruby.", L_Inya_Remove_Ruby, + "Emerald.", L_Inya_Remove_Emerald, + "Sapphire.", L_Inya_Remove_Sapphire, + "Topaz.", L_Inya_Remove_Topaz, + "Amethyst.", L_Inya_Remove_Amethyst, + "I've changed my mind.", L_Inya_NotInterested; + +L_Inya_Add_RingGem: + mes "[Inya]"; + mes "\"What kind of gem would you like to add?\""; + menu + "Diamond.", L_Inya_Add_Diamond, + "Ruby.", L_Inya_Add_Ruby, + "Emerald.", L_Inya_Add_Emerald, + "Sapphire.", L_Inya_Add_Sapphire, + "Topaz.", L_Inya_Add_Topaz, + "Amethyst.", L_Inya_Add_Amethyst, + "I've changed my mind.", L_Inya_NotInterested; + +L_Inya_Remove_Diamond: + if ( (Zeny < 50000) + | (countitem ("DiamondRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "DiamondRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Remove_Ruby: + if ( (Zeny < 50000) + | (countitem ("RubyRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "RubyRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Remove_Emerald: + if ( (Zeny < 50000) + | (countitem ("EmeraldRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "EmeraldRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Remove_Sapphire: + if ( (Zeny < 50000) + | (countitem ("SapphireRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "SapphireRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Remove_Topaz: + if ( (Zeny < 50000) + | (countitem ("TopazRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "TopazRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Remove_Amethyst: + if ( (Zeny < 50000) + | (countitem ("AmethystRing") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 50000; + delitem "AmethystRing", 1; + getitem "SimpleRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Diamond: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Diamond") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Diamond", 1; + getitem "DiamondRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Ruby: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Ruby") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Ruby", 1; + getitem "RubyRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Emerald: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Emerald") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Emerald", 1; + getitem "EmeraldRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Sapphire: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Sapphire") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Sapphire", 1; + getitem "SapphireRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Topaz: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Topaz") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Topaz", 1; + getitem "TopazRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_Add_Amethyst: + if ( (Zeny < 100000) + | (countitem ("SimpleRing") < 1) + | (countitem ("Amethyst") < 1) ) + goto L_Inya_Not_Enough; + Zeny = Zeny - 100000; + delitem "SimpleRing", 1; + delitem "Amethyst", 1; + getitem "AmethystRing", 1; + mes "[Inya]"; + mes "\"Here you go.\""; + close; + +L_Inya_NotInterested: + mes "[Inya]"; + mes "\"Come back later and I will try to be of assistance.\""; + close; + +L_Inya_Not_Enough: + mes "[Inya]"; + mes "\"I am sorry, you simply do not seem to have the necessary items for me to help you. Please come back when you do, and I would be more than happy to help you out.\""; + close; +} diff --git a/npc/002-2/kps.txt b/npc/002-2/kps.txt new file mode 100755 index 00000000..bcdfb1e7 --- /dev/null +++ b/npc/002-2/kps.txt @@ -0,0 +1,152 @@ +002-2,120,89,0 script KPS Manager NPC191,{ + @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT); + @run_cnt = ((QUEST_NorthTulimshar & TWOBIT_9_MASK) >> TWOBIT_9_SHIFT); + if (QL_KYLIAN == 15) + goto L_SeeKylian; + if (QL_KYLIAN == 14) + goto L_RunComplete; + if (QL_KYLIAN == 13) + goto L_RunStarted; + if (QL_KYLIAN == 12) + goto L_JobSelect; + if (QL_KYLIAN == 11) + goto L_AcceptJob; + if (QL_KYLIAN == 10) + goto L_OfferJob; + goto L_Default; + +L_Default: + mes "[KPS Manager]"; + mes "\"A rich salesman named Kylian bought this shop recently.\""; + mes "\"I'm waiting for him to give the go-ahead on opening it up, but I haven't heard from him in a while.\""; + next; + mes "\"I wonder if he needs any help...\""; + next; + mes "\"If you could go over and check on him in the inn while I tend to the store, I'd really appreciate it.\""; + goto L_close; + +L_OfferJob: + mes "[KPS Manager]"; + mes "\"Hello! How can I help you today?\""; + menu + "My name is " + strcharinfo(0) + ".", L_MyName, + "Nothing.", L_close; + +L_MyName: + QL_KYLIAN = 11; + mes "\"Ah. Kylian said you would be dropping by.\""; + next; + mes "\"I assume you are looking for some work?\""; + menu + "Yes.", L_StartJob, + "No.", L_close; + +L_AcceptJob: + mes "[KPS Manager]"; + mes "\"Interested in some work?\""; + menu + "Yes.", L_StartJob, + "No.", L_close; + +L_StartJob: + @run = 0; + callfunc "SetKylianRun"; + @run_cnt = 0; + callfunc "SetKylianRunCnt"; + QL_KYLIAN = 12; + goto L_JobSelect; + +L_StartJobAgain: + @run = 0; + callfunc "SetKylianRun"; + QL_KYLIAN = 12; + goto L_JobSelect; + +L_JobSelect: + if ((gettimetick(2) - Kylian_Timer) < 86400) + goto L_NoPackages; + mes "[KPS Manager]"; + mes "\"We have a number of deliveries that need to go all over the world.\""; + next; + goto L_RandJob; + +L_RandJob: + @rand_quest = rand(1,3); + goto L_JobInfo; + +L_JobInfo: + mes "\"We have a delivery for ##B" + $@random_quests$[@rand_quest] + "##b.\""; + menu + "I'll take it.", L_StartRun, + "Anything else?", L_RandJob, + "I need a break.", L_close; + +L_StartRun: + QL_KYLIAN = 13; + @run = @rand_quest; + callfunc "SetKylianRun"; + Kylian_Timer = gettimetick(2); + goto L_close; + +L_RunStarted: + mes "Deliver this package to ##B" + $@random_quests$[@run] + "##b.\""; + goto L_close; + +L_RunComplete: + @elapsed_time = (gettimetick(2) - Kylian_Timer); + if (@elapsed_time > 600) + goto L_Failed; + @run_cnt = (@run_cnt + 1); + callfunc "SetKylianRunCnt"; + // Set Kylian wants to see you reward state + if (@run_cnt > 3) + goto L_KylianReward; + goto L_RunAgain; + +L_SeeKylian: + mes "\"You need to go see Kylian before I can give you any more work.\""; + goto L_close; + +L_Failed: + mes "\"If you're faster next time, you can earn a bonus.\""; + next; + goto L_RunAgain; + +L_KylianReward: + Zeny = Zeny + $@delivery_money; + getexp ($@delivery_exp_mod * BaseLevel), 0; + callfunc "SetKylianRun"; + QL_KYLIAN = 15; + mes "[" + $@delivery_money + " money]"; + mes "[" + ($@delivery_exp_mod * BaseLevel) + " experience points]"; + next; + mes "\"I've got news for you! Kylian wants me to send you over right away.\""; + goto L_close; + +L_RunAgain: + Zeny = Zeny + $@delivery_money; + getexp ($@delivery_exp_mod * BaseLevel), 0; + callfunc "SetKylianRun"; + mes "[" + $@delivery_money + " money]"; + mes "[" + ($@delivery_exp_mod * BaseLevel) + " experience points]"; + next; + mes "\"Good job! Keep up the nice work, and I'm sure the boss will give you a bonus.\""; + next; + goto L_StartJobAgain; + +L_NoPackages: + mes "\"Sorry, but we don't have any more jobs open right now.\""; + mes "\"Come back tomorrow; maybe we will have some more work then.\""; + goto L_close; + +L_close: + close; +} +function script SetKylianRun { + QUEST_NorthTulimshar = (QUEST_NorthTulimshar & ~(TWOBIT_8_MASK)) | (@run << TWOBIT_8_SHIFT); + return; +} +function script SetKylianRunCnt { + QUEST_NorthTulimshar = (QUEST_NorthTulimshar & ~(TWOBIT_9_MASK)) | (@run_cnt << TWOBIT_9_SHIFT); + return; +} diff --git a/npc/002-2/kylian.txt b/npc/002-2/kylian.txt new file mode 100755 index 00000000..22263199 --- /dev/null +++ b/npc/002-2/kylian.txt @@ -0,0 +1,360 @@ + + + + +- script #businessmanNTconfig NPC32767,{ + end; + +OnInit: + // Nibble 4 + // Used in Random Quest later as a Nibble + $@knowYanisNT = (1 << 16); + $@knowLatoyNT = (1 << 17); + $@knowWeellosNT = (1 << 18); + $@knowCasinoNT = (1 << 19); + + // Random Quests for Later + setarray $@random_quests$, "None", "Falkurn", "Old Wizard", "Baktar"; + $@delivery_money = 100; + $@delivery_exp_mod = 10; + end; +} +002-2,44,107,0 script #KylianOut NPC32767,1,1,{ + @KylianNTLicense = 0; + @KylianNTSightSeeing = 0; + @KylianNTCasino = 0; + end; +} +002-2,43,101,0 script Kylian NPC193,{ + @acorn_amount = 12; + @suitcase_money = 100; + @suitcase_exp = 50; + @license_money = 50; + @license_exp = 20; + @sightseeing_money = 50; + @sightseeing_exp = 20; + @food_money = 50; + @food_exp = 20; + @clothes_money = 50; + @clothes_exp = 20; + @fun_money = 50; + @fun_exp = 20; + + if (QL_KYLIAN == 15) goto L_Done; + if (QL_KYLIAN >= 11) goto L_Helping; + if (QL_KYLIAN == 10) goto L_OfferedJob; + if (QL_KYLIAN == 9) goto L_Shop; + if (@KylianNTCasino) goto L_CasinoDone; + if (QL_KYLIAN == 8) goto L_DesertHat; + if (QL_KYLIAN == 7) goto L_Clothes; + if (@KylianNTSightSeeing) goto L_SightSeeingDone; + if (QL_KYLIAN == 6) goto L_Casino; + if (QL_KYLIAN == 5) goto L_Food; + if (@KylianNTLicense) goto L_LicenseDone; + if (QL_KYLIAN == 4) goto L_SightSeeing; + if (QL_KYLIAN == 3) goto L_ShopLicense; + if (QL_KYLIAN >= 1) goto L_Suitcase; + + mes "[Kylian]"; + mes "\"Ah! Are you the room service? I've some requests.\""; + menu + "Sure... What can I do for you?",L_Luggage, + "No I'm not!",L_Next; + +L_Next: + mes "[Kylian]"; + mes "\"Too bad. Would you be interested in earning some quick money with some errands regardless?\""; + menu + "I'm a great adventurer! I don't do petty errands.",L_close, + "No. I'm busy.",L_close, + "Well... OK.",L_Luggage; + +L_Luggage: + mes "[Kylian]"; + mes "\"I need you to get my luggage from the docks. Just show this paper to the sailor who's watching the luggage.\""; + mes "He gives you his ticket, which you promptly store in a safe pocket outside of your inventory."; + QL_KYLIAN = 1; + goto L_close; + +L_Suitcase: // QL_KYLIAN >= 1, but below 3 + mes "[Kylian]"; + mes "\"Did you get my luggage from the docks?\""; + if (QL_KYLIAN != 2) + goto L_close; + menu + "Here it is.",L_Continue, + "Don't worry; I'm on my way.",L_close; + +L_Continue: + if (countitem("LeatherSuitcase") < 1) + goto L_NoItem; + delitem "LeatherSuitcase", 1; + Zeny = Zeny + @suitcase_money; + getitem "Acorn", @acorn_amount; + getexp @suitcase_exp, 0; + QL_KYLIAN = 3; + next; + mes "[Kylian]"; + mes "\"Ah! Very good. I have some urgent paperwork that I've been needing to attend to.\""; + mes "He gives you some money."; + next; + mes "[Kylian]"; + mes "\"Before you go, I also happen to have some acorns left over from my trip.\""; + mes "\"You can have them if you wish; they're rather tasty.\""; + mes "If, however, you don't like them, you could take them to the Tulimshar bakery. I heard they use them to make a special kind of flour.\""; + next; + goto L_ShopLicense; + +L_ShopLicense: // QL_KYLIAN == 3 + mes "[Kylian]"; + mes "\"I'm a salesman and came to Tulimshar because I'm thinking about establishing a shop here.\""; + mes "\"While I'm going through my papers, could you find out whom I have to talk to about opening up a shop in this city?\""; + if (!(QUEST_NorthTulimshar & $@knowYanisNT)) + goto L_close; + menu + "You need to go and talk to Yanis in the government building.",L_GovBuild, + "I'll see what I can do.",L_close; + +L_GovBuild: + Zeny = Zeny + @license_money; + getexp @license_exp, 0; + QL_KYLIAN = 4; + @KylianNTLicense = 1; + mes "[Kylian]"; + mes "\"Ah... excellent! That's very helpful. Could you tell me how to get to that building?\""; + mes "You give him directions to the building."; + next; + goto L_LicenseDone; + +L_LicenseDone: // the player didn't log out yet after telling about Yanis + mes "[Kylian]"; + mes "\"I need to prepare my papers now. I might have some more questions later on though.\""; + goto L_close; + +L_SightSeeing: // QL_KYLIAN == 4 and logged out sometime between getting to that state and now + mes "[Kylian]"; + mes "\"You came here at just the right moment! I have finished my business affairs, and I think I should use my time here to learn a bit about the culture in the area. Can you tell me if there are any historical places or landmarks to visit?\""; + if (!(QUEST_NorthTulimshar & $@knowWeellosNT)) + goto L_close; + menu + "There's a very old building not far from here.",L_HistBuild, + "I don't know, but I'll have a look around.",L_close; + +L_HistBuild: + Zeny = Zeny + @sightseeing_money; + getexp @sightseeing_exp, 0; + QL_KYLIAN = 5; + mes "[Kylian]"; + mes "\"This sounds interesting. Please tell me the way.\""; + mes "You tell him how to get to the historic building."; + next; + goto L_Food; + +L_Food: // QL_KYLIAN == 5 + mes "[Kylian]"; + mes "\"While I'm out, I could also get something to eat. Do you have any suggestions for local cuisine?\""; + if (QL_FIERI < 4) // didn't yet help Fieri make Tonori Delight + goto L_close; + menu + "A man named Fieri makes a tasty Tonori Delight over at the castle.",L_SoupBer, + "No idea. I'll try to find out.",L_close; + +L_SoupBer: + Zeny = Zeny + @food_money; + getexp @food_exp, 0; + QL_KYLIAN = 6; + @KylianNTSightSeeing = 1; + goto L_SightSeeingDone; + +L_SightSeeingDone: + mes "[Kylian]"; + mes "\"I'm going to see the historic building you told me about and try the local food at the castle. Thank you for the suggestions.\""; + goto L_close; + +L_Casino: // QL_KYLIAN == 6 and logged out sometime between getting to that state and now + mes "[Kylian]"; + mes "\"Hello. I just came back from my sight-seeing tour, and this Tonori Delight really was delicious. I wonder what it's made of...\""; + next; + mes "\"However, I was wondering if you know about some evening attractions. Maybe somewhere to have fun?\""; + if (!(QUEST_NorthTulimshar & $@knowCasinoNT)) + goto L_close; + menu + "Of course! The casino!",L_CasinoFound, + "Not really.",L_close; + +L_CasinoFound: + Zeny = Zeny + @casino_money; + getexp @casino_exp, 0; + QL_KYLIAN = 7; + mes "[Kylian]"; + mes "\"Oh! There's a casino in this city? That's wonderful! Where can I find it?\""; + mes "You explain how to get to the casino."; + next; + goto L_Clothes; + +L_Clothes: // QL_KYLIAN == 7 + mes "[Kylian]"; + mes "\"I should acquire proper clothing before I go to the casino tonight. Do you know a reputable shop where high-quality clothing is sold?\""; + if (!(QUEST_NorthTulimshar & $@knowLatoyNT)) + goto L_close; + menu + "Latoy's shop. It's on the west side of Tulimshar.",L_HarborDistrict, + "Hmmm... I don't know.",L_close; + +L_HarborDistrict: + Zeny = Zeny + @clothes_money; + getexp @clothes_exp, 0; + QL_KYLIAN = 8; + @KylianNTCasino = 1; + mes "You explain about Latoy and the quality of his shop."; + next; + mes "[Kylian]"; + mes "\"This seems to be exactly what I need. Thanks a lot.\""; + goto L_close; + +L_CasinoDone: + mes "[Kylian]"; + mes "\"I'm looking forward to going to the casino tonight. See me tomorrow, and I might have more requests.\""; + goto L_close; + +L_DesertHat: // QL_KYLIAN == 8 + mes "Kylian looks a bit tired."; + next; + mes "[Kylian]"; + mes "\"That was an interesting night. Thanks for your suggestion to visit the casino.\""; + next; + getinventorylist; + mes "\"You helped me out a lot, so I bought a souvenir for you while I was out shopping.\""; + if ((checkweight("DesertHat", 1) == 0) || (@inventorylist_count == 100)) + goto L_Inventory; + getitem "DesertHat", 1; + QL_KYLIAN = 9; + next; + goto L_close; + +L_Shop: + mes "[Kylian]"; + mes "\"The Council of Wizards approved my shop license!\""; + mes "\"I purchased a store just across the way from the inn.\""; + next; + mes "\"If you are looking for work, go see the shop keeper I have working for me there.\""; + mes "\"Mention your name, and he will know I sent you.\""; + QL_KYLIAN = 10; + goto L_close; + +L_OfferedJob: + mes "[Kylian]"; + mes "\"I spoke with the shopkeeper, and he said you haven't stopped in yet.\""; + next; + mes "\"I wish you would consider working for me.\""; + next; + mes "\"KPS needs a determined, experienced adventurer like you.\""; + goto L_close; + +L_Helping: + mes "[Kylian]"; + mes "\"I've heard you decided to come work for me. That's great news!\""; + mes "\"Keep up the good work, and I might have something a little extra for you.\""; + goto L_close; + +L_Done: + mes "[Kylian]"; + mes "\"Thanks a bunch, business is booming!\""; + mes "\"Please, take this for all your hard work.\""; + next; + Zeny = Zeny + $@delivery_money; + getexp ($@delivery_exp_mod * BaseLevel), 0; + @run_cnt = 0; + callfunc "SetKylianRunCnt"; + QL_KYLIAN = 12; + mes "[" + $@delivery_money + " money]"; + mes "[" + ($@delivery_exp_mod * BaseLevel) + " experience points]"; + next; + goto L_close; + +L_Inventory: + mes "[Kylian]"; + mes "\"Oh my. You're carrying quite a lot. Come back when you have more room.\""; + goto L_close; + +L_NoItem: + mes "[Kylian]"; + mes "\"I don't see it! Are you trying to tease me? This isn't funny!\""; + goto L_close; + +L_close: + @acorn_amount = 0; + @suitcase_money = 0; + @suitcase_exp = 0; + @license_money = 0; + @license_exp = 0; + @sightseeing_money = 0; + @sightseeing_exp = 0; + @food_money = 0; + @food_exp = 0; + @clothes_money = 0; + @clothes_exp = 0; + @fun_money = 0; + @fun_exp = 0; + @inventorylist_count = 0; + // NOT set to zero: @KylianNTLicense, @KylianNTSightSeeing and @KylianNTCasino + // those are used to check if the player logged out in the meanwhile + close; +} +function script KylianDebug { + @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT); + @run_cnt = ((QUEST_NorthTulimshar & TWOBIT_9_MASK) >> TWOBIT_9_SHIFT); + goto L_Menu; + +L_Menu: + mes "[Kylian Debug]"; + menu + "Show Quest State", L_ShowState, + "Set Quest State", L_SetState, + "Reset Timer to Now", L_WorkTimer, + "Reset Timer + 24 Hours", L_MoreWorkTimer, + "Close.", L_close; + +L_ShowState: + mes "State: " + QL_KYLIAN; + mes "Timer: " + Kylian_Timer; + mes "Time: " + gettimetick(2); + mes "Elapsed Time: " + (gettimetick(2) - Kylian_Timer); + mes "Reset Timer: 86400 > " + (gettimetick(2) - Kylian_Timer); + mes "Run: " + @run; + mes "Run NPC: " + $@random_quests$[@run]; + mes "Run Count: " + @run_cnt; + goto L_Menu; + +L_SetState: + mes "\"Input the quest state desired.\""; + input QL_KYLIAN; + goto L_Menu; + +L_WorkTimer: + Kylian_Timer = gettimetick(2); + goto L_Menu; + +L_MoreWorkTimer: + Kylian_Timer = (gettimetick(2) - 86401); + goto L_Menu; + +L_close: + return; +} +002-2,40,101,0 script KylianDebug#1 NPC193,{ + callfunc "KylianDebug"; + close; +OnInit: + if (!debug) + disablenpc "KylianDebug#1"; + end; +} +002-2,118,89,0 script KylianDebug#2 NPC193,{ + callfunc "KylianDebug"; + close; +OnInit: + if (!debug) + disablenpc "KylianDebug#2"; + end; +} diff --git a/npc/002-2/latoy.txt b/npc/002-2/latoy.txt new file mode 100755 index 00000000..24b9ed4f --- /dev/null +++ b/npc/002-2/latoy.txt @@ -0,0 +1,26 @@ +002-2,86,93,0 shop #LatoyShop NPC32767,544:8000,868:10000,1172:3000,720:16000 +002-2,86,93,0 script Latoy NPC106,{ + QUEST_NorthTulimshar = QUEST_NorthTulimshar | $@knowLatoyNT; + + mes "[Latoy]"; + mes "\"Is there something I can help you with?\""; + if (QL_KYLIAN != 7) + goto L_Shop; + next; + mes "Maybe this is the kind of shop Kylian is looking for?"; + goto L_Shop; + +L_Shop: + mes "[Latoy]"; + mes "\"How would you like to browse my wares?\""; + menu + "Yes.", L_LatoyShop, + "No.", L_close; + +L_LatoyShop: + close2; + shop "#LatoyShop"; + +L_close: + close; +} diff --git a/npc/002-2/mapflags.txt b/npc/002-2/mapflags.txt new file mode 100755 index 00000000..ae307dbb --- /dev/null +++ b/npc/002-2/mapflags.txt @@ -0,0 +1,2 @@ +//002-2 mapflag resave 001-1,60,105 +//002-2 mapflag town diff --git a/npc/002-2/omar.txt b/npc/002-2/omar.txt new file mode 100755 index 00000000..1307a6f8 --- /dev/null +++ b/npc/002-2/omar.txt @@ -0,0 +1,331 @@ +function script KadiyaSubquestConsts { + @Q_kadiya_status = (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + + @Q_STATUS_NONE = 0; + @Q_STATUS_KNOWS_MOPOX = 1; + @Q_STATUS_MADE_MOPOX = 2; + @Q_STATUS_DIDNT_DRINK = 3; + @Q_STATUS_WANTS_CHOCOCAKE = 4; + @Q_STATUS_WANTS_ORANGECUPCAKE = 5; + @Q_STATUS_COMPLETED = 6; + @Q_STATUS_COMPLETED_ELANORE = 7; + @Q_STATUS_COMPLETED_NOELANORE = 8; + @Q_STATUS_COMPLETED_POST_ELANORE = 9; + + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) < 4) set @Q_kadiya_status, @Q_STATUS_NONE; + + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) > 4) set @Q_kadiya_status, @Q_STATUS_COMPLETED_POST_ELANORE; + + return; +} + +002-2,117,126,0 script Omar NPC162,{ + callfunc "ElanoreFix"; + callfunc "KadiyaSubquestConsts"; + + @Q_status = @Q_kadiya_status; + + if (@Q_status >= @Q_STATUS_COMPLETED) goto L_cured; + + if (@Q_status == @Q_STATUS_DIDNT_DRINK) goto L_didnt_drink; + + if (@Q_status > @Q_STATUS_DIDNT_DRINK) goto L_make_food; + + mes "[Omar]"; + mes "\"Welcome to my humble abode.\""; + next; + menu + "Well met! May I ask who you are?", L_omar, + "What's wrong with your daughter?", L_kadiya_sick, + "Thank you!", L_close; + +L_omar: + mes "[Omar]"; + mes "\"My name is Omar; I am a trader of oils and spices.\""; + goto L_close; + +L_kadiya_sick: + mes "[Omar]"; + mes "\"Kadiya has caught Ponderpox, I fear.\""; + mes "He sighs."; + mes "\"She's has been feverish for many days now. I wish there were something I could do.\""; + next; + menu + "Have you asked Elanore the healer?", L_sick_elanore, + "How about the Hurnscald hospital?", L_sick_hospital, + "Can I help?", L_sick_self, + "I'm sorry to hear that.", L_Next; + +L_Next: + mes "[Omar]"; + mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; + mes "He smiles, but you see doubt in his eyes."; + goto L_close; + +L_sick_elanore: + mes "[Omar]"; + mes "\"Elanore?\""; + mes "He frowns."; + mes "\"She knows nothing. I see no point in talking to her.\""; + goto L_close; + +L_sick_hospital: + mes "[Omar]"; + mes "\"Hurnscald is too far away. I don't think that it would be good for her to go on such a long trip.\""; + goto L_close; + +L_sick_self: + mes "[Omar]"; + mes "\"You are very kind, but I don't think there is anything you can do.\""; + goto L_close; + +L_didnt_drink: + mes "[Omar]"; + mes "\"So she has Mopox, not Ponderpox, you say? Hmm. That is much harder to cure, I think.\""; + mes "\"I am grateful for the effort you put into brewing a potion for her. But it does smell vile...\""; + next; + mes "[Omar]"; + mes "\"I promised my dear wife that I would never make Kadiya eat or drink anything she doesn't like. So I won't force her to drink this.\""; + next; + mes "[Omar]"; + @Q_status = (@Q_STATUS_WANTS_CHOCOCAKE + rand(2)); + callsub S_Update_Var; + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"If only we could make it smell and taste like orange cupcakes... she really loves those cupcakes.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only this were a chocolate cake and not a potion... she really loves chocolate cakes.\""; + goto L_close; + +L_make_food: + mes "[Omar]"; + mes "\"I should stay here to watch over her. I wish I could think of a way to convince her to drink the potion...\""; + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"Alas, it is not an orange cupcake.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only it were to smell and taste like her favourite chocolate cake...\""; + goto L_close; + +L_cured: + if (@Q_status == @Q_STATUS_COMPLETED) goto L_cured_choice; + mes "[Omar]"; + mes "\"She is sleeping now, but she seems to be much better. I am sure that she will be up and running around again soon.\""; + goto L_close; + +L_cured_choice: + mes "[Omar]"; + mes "\"I am very grateful for your help. I really was sure that it was Ponderpox, not Mopox, that she had.\""; + next; + menu + "Oh, it was nothing.", L_cured_nothing, + "I didn't do it alone; Elanore helped.", L_cured_elanore, + "That will be 5000 GP.", L_Next1; + +L_Next1: + mes "[Omar]"; + mes "\"Ah, certainly.\""; + mes "He hands you a small bag of money."; + next; + @Q_status = @Q_STATUS_COMPLETED_NOELANORE; + callsub S_Update_Var; + Zeny = Zeny + 5000; + goto L_close; + +L_cured_nothing: + mes "[Omar]"; + mes "\"No, this wasn't nothing. She is everything to me. Here, you deserve a reward.\""; + mes "He hands you a bag of money containing 10,000 GP and two pearls."; + mes "\"And feel free to drop by again whenever you would like!\""; + @Q_status = @Q_STATUS_COMPLETED_NOELANORE; + callsub S_Update_Var; + getitem "Pearl", 2; + Zeny = Zeny + 10000; + goto L_close; + +L_cured_elanore: + mes "[Omar]"; + mes "Omar frowns."; + mes "\"That witch? You worked with her without telling me?\""; + mes "He looks over to his daughter, concern suddenly in his eyes."; + mes "\"She is looking better, though...\""; + next; + mes "[Omar]"; + mes "Omar shakes his head."; + mes "\"I will have to think about this. Please leave me alone.\""; + next; + @Q_status = @Q_STATUS_COMPLETED_ELANORE; + callsub S_Update_Var; + goto L_close; + +L_close: + @Q_STATUS_KNOWS_MOPOX = 0; + @Q_STATUS_MADE_MOPOX = 0; + @Q_STATUS_DIDNT_DRINK = 0; + @Q_STATUS_WANTS_CHOCOCAKE = 0; + @Q_STATUS_WANTS_ORANGECUPCAKE = 0; + @Q_STATUS_COMPLETED = 0; + @Q_STATUS_COMPLETED_ELANORE = 0; + @Q_STATUS_COMPLETED_NOELANORE = 0; + @Q_STATUS_COMPLETED_POST_ELANORE = 0; + @Q_status = 0; + close; + + +S_Update_Var: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(NIBBLE_3_MASK) | (@Q_status << NIBBLE_3_SHIFT)); + return; +} + +002-2,124,124,0 script Kadiya NPC174,{ + @child_number = 7; + callfunc "XmasList"; + + callfunc "ElanoreFix"; + @Q_MASK = NIBBLE_3_MASK; + @Q_SHIFT = NIBBLE_3_SHIFT; + callfunc "KadiyaSubquestConsts"; + @Q_status = @Q_kadiya_status; + if (@Q_status >= @Q_STATUS_COMPLETED) goto L_cured; + + mes "You see a young girl lying in bed. At first she doesn't seem to notice you approaching."; + mes "Finally, she turns her head towards you. Judging from the sweat on her forehead and look in her eyes, she is suffering from some kind of fever."; + next; + mes "[Kadiya]"; + mes "\"Hello,\" she says in a tiny voice."; + next; + @M_NAME = 1; + @M_CANDY = 2; + @M_POTION = 3; + @M_CHOCOCAKE = 4; + @M_CUPCAKE = 5; + + setarray @choice$, "Hello! What's your name?", "Would you like some candy?", "", "", "", "", "", ""; + setarray @choice_idx, @M_NAME, @M_CANDY, 0, 0, 0, 0, 0, 0; + @choices_nr = 2; + + if (countitem("MopoxCurePotion") == 0) goto L_M_no_cure; + + @choice_idx[@choices_nr] = @M_POTION; + @choice$[@choices_nr] = "This potion will cure your illness!"; + @choices_nr = @choices_nr + 1; + goto L_M_no_cure; + +L_M_no_cure: + if ((countitem("LacedChocolateCake") == 0) || (@Q_status != @Q_STATUS_WANTS_CHOCOCAKE)) + goto L_M_no_chococake; + @choice_idx[@choices_nr] = @M_CHOCOCAKE; + @choice$[@choices_nr] = "Would you like special chocolate cake?"; + @choices_nr = @choices_nr + 1; + goto L_M_no_chococake; + +L_M_no_chococake: + if ((countitem("LacedOrangeCupcake") == 0) || (@Q_status != @Q_STATUS_WANTS_ORANGECUPCAKE)) + goto L_M_no_cupcake; + @choice_idx[@choices_nr] = @M_CUPCAKE; + @choice$[@choices_nr] = "Would you like special orange cupcake?"; + @choices_nr = @choices_nr + 1; + goto L_M_no_cupcake; + +L_M_no_cupcake: + @choice_idx[@choices_nr] = 0; + @choice$[@choices_nr] = "Goodbye."; + @choices_nr = @choices_nr + 1; + + menu + @choice$[0], L_MenuItems, + @choice$[1], L_MenuItems, + @choice$[2], L_MenuItems, + @choice$[3], L_MenuItems, + @choice$[4], L_MenuItems, + @choice$[5], L_MenuItems; + +L_MenuItems: + @choice = @choice_idx[@menu - 1]; + + if (@choice == @M_NAME) goto L_name; + if (@choice == @M_CANDY) goto L_No_candy; + if (@choice == @M_POTION) goto L_Potion; + if (@choice == @M_CHOCOCAKE) goto L_chococake; + if (@choice == @M_CUPCAKE) goto L_cupcake; + goto L_close; + +L_name: + mes "[Kadiya]"; + mes "She smiles a faint smile."; + mes "\"My name is Kadiya.\""; + goto L_close; + +L_No_candy: + mes "[Kadiya]"; + mes "She hesitates for a moment."; + mes "\"No, thank you. I don't think I should.\""; + goto L_close; + +L_Potion: + mes "[Kadiya]"; + if (@Q_status < @Q_STATUS_DIDNT_DRINK) set @Q_status, @Q_STATUS_DIDNT_DRINK; + callsub S_Update_Var; + + mes "Kadiya grimaces and pushes the bottle away."; + mes "\"That smells terrible!\""; + next; + mes "[Kadiya]"; + mes "She pulls the sheets over her head."; + mes "\"I won't drink that!\""; + goto L_close; + +L_chococake: + delitem "LacedChocolateCake", 1; + goto L_do_cure; + +L_cupcake: + delitem "LacedOrangeCupcake", 1; + goto L_do_cure; + +L_do_cure: + if (@Q_status < @Q_STATUS_COMPLETED) set @Q_status, @Q_STATUS_COMPLETED; + callsub S_Update_Var; + + mes "[Kadiya]"; + mes "Kadiya's eyes widen."; + mes "\"Oh! Daddy, is it okay if I eat this?\""; + mes "Omar nods and smiles. \"You should eat a bit to regain your strength, sweetheart.\""; + next; + mes "[Kadiya]"; + mes "Kadiya devours your gift in just a handful of bites."; + next; + mes "[Kadiya]"; + mes "She smiles. \"Thank you! I feel better already!\"."; + next; + mes "[Kadiya]"; + mes "She looks much healthier, too. Omar walks over and touches her forehead."; + mes "\"Now that is funny – your fever has gone down quite a bit!\""; + mes "He smiles at you. \"Thank you for your help!\""; + next; + mes "[Kadiya]"; + mes "\"You should get some sleep now, sweetheart. I'm sure that you will be better soon.\""; + goto L_close; + +L_cured: + mes "[Kadiya]"; + mes "Kadiya seems to be sleeping calmly. She looks much less sweaty than earlier; unless you are very much mistaken, her fever has disappeared."; + goto L_close; + +L_close: + @Q_status = 0; + @Q_MASK = 0; + @Q_SHIFT = 0; + @M_NAME = 0; + @M_CANDY = 0; + @M_POTION = 0; + @M_CHOCOCAKE = 0; + @M_CUPCAKE = 0; + @choice = 0; + @choices_nr = 0; + cleararray @choice_idx[0], 0, 7; + cleararray @choice$[0], "", 7; + close; + +S_Update_Var: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/002-2/phaet.txt b/npc/002-2/phaet.txt new file mode 100755 index 00000000..e9342bb5 --- /dev/null +++ b/npc/002-2/phaet.txt @@ -0,0 +1,28 @@ + +002-2,75,56,0 script Phaet NPC125,0,0,{ + mes "[Phaet the Royal Guard]"; + mes "\"Hey, you seem tough enough! Would you like to prove your skills? I'll let you in the arena if you give me 50 gp. You can fight against other players there.\""; + next; + menu + "Yes", L_Sure, + "No", L_Next; + +L_Next: + mes "[Phaet the Royal Guard]"; + mes "\"Ha ha, coward.\""; + close; + +L_Sure: + if (Zeny < 50) goto L_NoMoney; + Zeny = Zeny - 50; + + mes "[Phaet the Royal Guard]"; + mes "\"Get ready!\""; + next; + warp "001-3", 0, 0; + close; + +L_NoMoney: + mes "\"Wait a second, you don't have enough money.\""; + close; +} diff --git a/npc/002-2/rebecca.txt b/npc/002-2/rebecca.txt new file mode 100755 index 00000000..8524dfa4 --- /dev/null +++ b/npc/002-2/rebecca.txt @@ -0,0 +1,82 @@ + +002-2,44,27,0 script Rebecca NPC118,{ + @npcname$ = "Rebecca the Inn Keeper"; + @Cost = 100; + mes "[" + @npcname$ + "]"; + mes "\"Welcome to 'The Wizard's Rest'\""; + goto L_MainMenu; + +L_MainMenu: + mes "\"How may I help you?\""; + menu + "Can I get a room?", L_Inn, + "Any interesting guests?", L_Guests, + "Bakery?", L_Bakery, + "Barber?", L_Barber, + "Casino?", L_Casino, + "Theatre?", L_Theatre, + "Pvp?", L_Pvp, + "I don't need any help, thanks.", L_close; + +L_Guests: + mes "\"We had a very rich business man show up the other day.\""; + next; + mes "\"He caused quite a stir when he paid for the penthouse so far in advance."; + mes "I hear he is looking for help.\""; + next; + mes "\"Other then that feel free to mingle with the guests.\""; + next; + mes "\"You can find them in the door behind me.\""; + goto L_close; + + +L_Bakery: + mes "\"Ahh yes, the World Famous Riskim's bakery.\""; + next; + mes "\"They only use the finest ingredients like Acorn Flour"; + mes "to make some of the tastest treats in Tonori.\""; + next; + mes "Second only to the Wizards' private chef, Fieri.\""; + goto L_MainMenu; + +L_Barber: + mes "\"Issay the barber of Tonori can be found through the door behind me\""; + next; + mes "\"The master stylist can do anything with anyones hair.\""; + next; + mes "\"He always welcomes walk ins.\""; + goto L_MainMenu; + +L_Casino: + mes "\"Games, Games, Games.\""; + next; + mes "\"Test your luck or skill in the Casino. From Blackjack to Pvp.\""; + next; + mes "\"Win or Lose, you'll still have fun!\""; + goto L_MainMenu; + +L_Theatre: + mes "\"A touring troop from Hurnscald just arrived.\""; + next; + mes "\"The are currently rehearsing for their next show.\""; + next; + mes "\"Feel free to talk to the troupe leader, they are in the theatre behind me.\""; + goto L_MainMenu; + +L_Pvp: + mes "\"Yes, our Casino has Pvp in the Casino behind me.\""; + next; + mes "\"Test your self against other players and gamble on the outcome.\""; + next; + mes "\"Fame and glory awaits you gladiator!\""; + goto L_MainMenu; + +L_Inn: + callfunc "Inn"; + goto L_close; + +L_close: + @npcname$ = ""; + @Cost = 0; + close; +} diff --git a/npc/002-2/shops.txt b/npc/002-2/shops.txt new file mode 100755 index 00000000..23bb9a57 --- /dev/null +++ b/npc/002-2/shops.txt @@ -0,0 +1,2 @@ + +002-2,68,25,0 shop Bartender#Casino NPC112,539:87,513:15,519:50 diff --git a/npc/002-2/stranger.txt b/npc/002-2/stranger.txt new file mode 100755 index 00000000..98c9ffd7 --- /dev/null +++ b/npc/002-2/stranger.txt @@ -0,0 +1,394 @@ +002-2,38,57,0 script Stranger NPC192,{ + @iRONINGOT = 5; + @PINKANTENNA = 21; + @Exp = 20000; + setarray @towelReq$[0], "HitchhikersTowel"; + + if (FLAGS & FLAG_TOWEL_COMPLETED) goto L_Event_Done; + if ((gettimetick(2)-TUT_var < 6*7*86400) || (BaseLevel < 42)) //player must be created at least 6 weeks ago and at least level 42 + goto L_No_Event; + if (FLAGS & FLAG_TOWEL_HelpED) goto L_Towel; + + mes "[Stranger]"; + mes "\"Hello, hello! It's great to see you. Maybe you can help me with a little problem I have.\""; + next; + mes "\"I need some materials to repair my spacesh- ahm, it's not important why I need it.\""; + next; + mes "\"Anyway, I'd be really happy if you can give me " + @iRONINGOT + " Iron Ingots and " + @PINKANTENNA + " Pink Antennas.\""; + next; + mes "\"Do you have that for me?\""; + menu + "Yeah, sure.",L_Items, + "No.",L_close; + +L_Items: + if (countitem("IronIngot") < @iRONINGOT) goto L_No_Item; + if (countitem("PinkAntenna") < @PINKANTENNA) goto L_No_Item; + delitem "IronIngot", @iRONINGOT; + delitem "PinkAntenna", @PINKANTENNA; + getexp @Exp, 0; + FLAGS = FLAGS | FLAG_TOWEL_HelpED; + + mes "[Stranger]"; + mes "\"Great! Thank you!\""; + next; + mes "\"I have a lot of work to do now. But before you leave...\""; + next; + goto L_Towel; + +L_Towel: + getinventorylist; + if (@inventorylist_count == 100) goto L_Full_Inv; + mes "[Stranger]"; + mes "\"On May 25th it is a very special day - Towel Day.\""; + next; + mes "\"To celebrate this I'll ask you some questions about my favourite book, The Hitchhiker's Guide to the Galaxy. If you can answer them, I'll give you something very useful.\""; + next; + mes ""; + mes "[Server]"; + mes "The answers might need to have whitespaces."; + mes "If you're using a client which confirms your answer when pressing space, change this setting before continuing."; + mes ""; + next; + mes "[Stranger]"; + mes "\"The first one is easy.\""; + next; + + setarray @quiz_questions$[0], + "What two words are written in big friendly letters on the back cover?", + "What's the name of the paranoid robot?", + "What is the answer to life, the universe and everything?", + "What is the first name of the author of the hitchhikers guide?", + "What is the last name of the author of the hitchhikers guide?", + "Who is the male human protagonist?", + "Who is the female human protagonist?", + "According to the Guide, space is ___?", + "What is the name of the spaceship which was stolen by the president of the universe?", + "How many heads does Zaphod Beeblebrox have?"; + setarray @quiz_answers$[0], + "Don't Panic", + "Marvin", + "42", + "Douglas", + "Adams", + "Arthur Philip Dent", + "Trillian", + "Big", + "Heart of Gold", + "2"; + + callfunc "MultiQuiz"; + if (@success == 0) goto L_Wrong_Answer; + + mes "[Stranger]"; + mes "\"You're absolutely right. The next one will be more tricky.\""; + next; + + setarray @quiz_questions$[0], + "What is the name of the rock group claiming to be the loudest band in the universe?", + "What star is near Ford's home planet?", + "Which country does the human protagonist come from?", + "What is the name of the computer on The Heart of Gold?", + "What color is a Babel Fish?", + "What did the bowl of petunias think?", + "What body orifice should a babel fish be inserted in to work properly?", + "What is the name of the super computer?", + "What were the second most intelligent creatures on Earth?", + "What race creates the worst poetry in universe?", + "What is the name of the Vogon home planet?", + "What is the name of the Restaurant at the End of the Universe?"; + setarray @quiz_answers$[0], + "Disaster Area", + "Betelgeuse", + "England", + "Eddie", + "Yellow", + "Oh no, not again", + "Ear", + "Deep Thought", + "Dolphins", + "Vogons", + "Vogsphere", + "Milliways"; + + callfunc "MultiQuiz"; + if (@success == 0) goto L_Wrong_Answer; + + mes "[Stranger]"; + mes "\"Not bad, not bad. Let's see if you can answer an even more difficult one.\""; + next; + + setarray @quiz_questions$[0], + "Drinking what drink is like having your brain smashed out by a slice of lemon wrapped round a large gold brick?", + "How many pints of beers should you drink before hitchhiking?", + "What initials are carved into Zaphod Beeblebrox's brain?", + "What is Ford Prefect's nickname?", + "Who is responsible for the fjords of Norway?", + "What game is played on earth as a relict of memories to an ancient war?", + "What is the name of the triple-breasted whore from Eroticon VI?", + "Who will insult every living being in the universe, because he is immortal and getting bored?", + "What is the name of the piteous creature that is continually reincarnated and subsequently killed, each time unknowingly, by Arthur Dent?"; + setarray @quiz_answers$[0], + "Pan Galactic Gargle Blaster", + "3", + "ZB", + "Ix", + "Slartibartfast", + "Cricket", + "Eccentrica Gallumbits", + "Wowbagger", + "Agrajag"; + + callfunc "MultiQuiz"; + if (@success == 0) goto L_Wrong_Answer; + + mes "[Stranger]"; + mes "\"Unbelievable! You're really a wise person.\""; + next; + mes "\"One last question, but this shouldn't be a problem for you.\""; + next; + mes "\"What is the most important item for every hitchhiker to have?\""; + mes ""; + mes "##BDrag & drop the item from your inventory##b."; + requestitem .@answer$[0]; + if (.@answer$[0] != "Towel" && .@answer$[0] != "HitchhikersTowel") + goto L_Wrong_Answer; + + mes "[Stranger]"; + mes "\"There you are! A towel is really the most important item for a hitchhiker to have.\""; + next; + mes "\"Please take this.\""; // no full inventory check, this is done before the game + FLAGS = FLAGS | FLAG_TOWEL_COMPLETED; + next; + goto L_Explain; + +L_Explain: + mes "[Stranger]"; + mes "\"This towel is even more useful than usual towels are. If you change its color, it uses a special techno-, ahm, let's say, it can help you to get to other places.\""; + next; + mes "\"Bring me some powder made from gemstones and a bottle of water, and I can prepare it for you.\""; + next; + mes "\"Depending on the color it will bring you to different places. It might wear out after a while and it'll loose its color, but I can prepare it for you again.\""; + next; + mes "\"Since I'm not familar with this plane-, ahm, with this area, I can't tell which places you will end up in.\""; + goto L_close; + +L_No_Event: + mes "[Stranger]"; + mes "\"Hello. Isn't this a beautiful place?\""; + next; + mes "\"And it really comes in handy that I have my towel with me. A towel is about the most massively useful thing an inte- ahm, a person can have.\""; + next; + mes "\"You can read more about that in my favourite book, 'The Hitchhiker's Guide to the Galaxy'.\""; + if (FLAGS & FLAG_TOWEL_COMPLETED) + menu + "Thanks for the advice.",L_close, + "I have my towel with me too.",L_Dye; + goto L_close; + +L_Dye: + mes "[Stranger]"; + mes "\"Wonderful! Let me have a look.\""; + mes "He's taking a very interested look at your towel."; + next; + mes "[Stranger]"; + mes "\"I'm impressed. This is not an usual towel.\""; + next; + menu + "Oh? Can you explain about it?",L_Explain, + "I know. Could you dye it for me?",L_StartDyeTowel, + "It's great, isn't it? I have to go now.",L_close; + +L_No_Item: + mes "[Stranger]"; + mes "\"Hu? It seems you haven't.\""; + goto L_close; + +L_Wrong_Answer: + mes "[Stranger]"; + mes "\"Nah, that's wrong. Come back if you want to try again.\""; + goto L_close; + +L_Event_Done: + mes "[Stranger]"; + mes "\"Ah, welcome back. Thanks again for your help.\""; + next; + mes "\"Shall I dye your towel?\""; + menu + "That would be great!", L_StartDyeTowel, + "No, thanks.", L_close; + +L_StartDyeTowel: + mes "[Stranger]"; + mes "\"Alright, which color do you want?\""; + menu + "Red",L_Red, + "Yellow",L_Yellow, + "White",L_White, + "Blue",L_Blue, + "Green",L_Green, + "Purple",L_Purple, + "Orange",L_Orange, + "Pink",L_Pink, + "Lime",L_Lime, + "Teal",L_Teal, + "I changed my mind.", L_close; + +L_White: + // Koga + @warpTowelName$ = "WhiteHitchhikersTowel"; + setarray @towelPowder$, "DiamondPowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Red: + // Barbarians + @warpTowelName$ = "RedHitchhikersTowel"; + setarray @towelPowder$, "RubyPowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Green: + // Candor + @warpTowelName$ = "GreenHitchhikersTowel"; + setarray @towelPowder$, "EmeraldPowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Blue: + // Blue Sages + @warpTowelName$ = "BlueHitchhikersTowel"; + setarray @towelPowder$, "SapphirePowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Yellow: + // Tulimshar Mines + @warpTowelName$ = "YellowHitchhikersTowel"; + setarray @towelPowder$, "TopazPowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Purple: + // Dimonds Inn + @warpTowelName$ = "PurpleHitchhikersTowel"; + setarray @towelPowder$, "AmethystPowder"; + setarray @towelPowderCnt, 2; + goto L_DyeChecks; + +L_Orange: + // Graveyard + @warpTowelName$ = "OrangeHitchhikersTowel"; + setarray @towelPowder$, "RubyPowder", "TopazPowder"; + setarray @towelPowderCnt, 1, 1; + goto L_DyeChecks; + +L_Pink: + // Terranite Cave + @warpTowelName$ = "PinkHitchhikersTowel"; + setarray @towelPowder$, "RubyPowder", "DiamondPowder"; + setarray @towelPowderCnt, 1, 1; + goto L_DyeChecks; + +L_Teal: + // Mana Seed + @warpTowelName$ = "TealHitchhikersTowel"; + setarray @towelPowder$, "EmeraldPowder", "SapphirePowder"; + setarray @towelPowderCnt, 1, 1; + goto L_DyeChecks; + +L_Lime: + // Panchua + @warpTowelName$ = "LimeHitchhikersTowel"; + setarray @towelPowder$, "EmeraldPowder", "TopazPowder"; + setarray @towelPowderCnt, 1, 1; + goto L_DyeChecks; + +L_DyeChecks: + mes "[Stranger]"; + mes "\"Ok, I'll need a bottle of water first.\""; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_Full_Inv; + if (countitem("BottleOfWater") < 1) goto L_No_Water; + @powderCheckCount = 0; + goto L_PowderChecks; + +L_PowderCheckAgain: + mes "[Stranger]"; + mes "\"Now I need " + @towelPowderCnt[@powderCheckCount] + " " + @towelPowder$[@powderCheckCount] + ".\""; + next; + if((@powderCheckCount + 1) == getarraysize(@towelPowder$)) + goto L_TowelChecks; + @powderCheckCount = (@powderCheckCount + 1); + goto L_PowderChecks; + +L_PowderChecks: + if (countitem(@towelPowder$[@powderCheckCount]) < @towelPowderCnt[@powderCheckCount]) + goto L_No_Powder; + goto L_PowderCheckAgain; + +L_TowelCheckAgain: + @towelCheckCount = (@towelCheckCount + 1); + if(@towelCheckCount >= getarraysize(@towelReq$)) + goto L_No_Towel; + goto L_TowelChecks; + +L_TowelChecks: + if (countitem(@towelReq$[@towelCheckCount]) > 0) + goto L_DeletePowder; + goto L_TowelCheckAgain; + +L_DeleteAgain: + @powderCheckCount = (@powderCheckCount - 1); + goto L_DeletePowder; + +L_DeletePowder: + delitem @towelPowder$[@powderCheckCount], @towelPowderCnt[@powderCheckCount]; + if (@powderCheckCount) + goto L_DeleteAgain; + goto L_DyeTowel; + +L_DyeTowel: + delitem @towelReq$[@towelCheckCount], 1; + delitem "BottleOfWater", 1; + getitem @warpTowelName$, 1; + mes "He takes your towel, the water and the gem powder, then he turns away and does something you can't see. After a few minutes, he turns to you again."; + next; + mes "[Stranger]"; + mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; + goto L_close; + +L_No_Water: + mes "[Stranger]"; + mes "\"You don't have water.\""; + goto L_close; + +L_No_Powder: + mes "[Stranger]"; + mes "\"You need to bring me enough gem powder in that color. Maybe someone used to mining can help you with that.\""; + goto L_close; + +L_No_Towel: + mes "[Stranger]"; + mes "\"Where's your towel? It is really useful, you should always keep it with you.\""; + goto L_close; + +L_Full_Inv: + mes "[Stranger]"; + mes "\"You carry a lot of stuff with you, don't you? Maybe you should get rid of something.\""; + goto L_close; + +L_close: + @iRONINGOT = 0; + @PINKANTENNA = 0; + @Exp = 0; + @random = 0; + @quizparam$ = ""; + @warpTowelName$ = ""; + @powderCheckCount = 0; + @towelCheckCount = 0; + cleararray @towelPowder$, "", getarraysize(@towelPowder$); + cleararray @towelPowderCnt, "", getarraysize(@towelPowderCnt); + close; +} diff --git a/npc/002-2/troupe_leader.txt b/npc/002-2/troupe_leader.txt new file mode 100755 index 00000000..7243be84 --- /dev/null +++ b/npc/002-2/troupe_leader.txt @@ -0,0 +1,61 @@ + +002-2,81,21,0 script Troupe Leader NPC165,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@inspector == 4) goto L_NohMask_Troupe; + if (@inspector == 13) goto L_NohMask_Found; + + mes "[Troupe Leader]"; + mes "\"Hello. I'm the leader of a traveling theater troupe. We'll be staying here in Tulimshar for a while.\""; + goto L_close; + +L_NohMask_Troupe: + mes "[Troupe Leader]"; + mes "\"Yes, a mask was stolen from us the last night we were in Hurnscald.\""; + next; + menu + "Any ideas on who might have taken it?", L_NohMask_Idea, + "Are you sure one of your troupe members didn't hide it and commit those robberies?", L_NohMask_Accuse, + "Hmm...", L_close; + +L_NohMask_Idea: + @inspector = 5; + callsub S_Update_Mask; + mes "[Troupe Leader]"; + mes "\"Hm...I did see an old man hang out near the theater after our last show.\""; + goto L_close; + +L_NohMask_Accuse: + mes "[Troupe Leader]"; + mes "\"I am absolutely positive. None of my troupe have left the city since we got here. Good day!\""; + goto L_close; + +L_NohMask_Found: + mes "[Troupe Leader]"; + mes "\"Thank you for finding the mask. You did such a good job, you should keep it.\""; + getinventorylist; + if (@inventorylist_count == 100) goto L_NohMask_TooMany; + mes "[1500 experience points]"; + getexp 1500, 0; + @inspector = 14; + callsub S_Update_Mask; + getitem "NohMask", 1; + next; + mes "[Troupe Leader]"; + mes "\"We don't need it anymore. We're doing different shows here.\""; + goto L_close; + +L_NohMask_TooMany: + next; + mes "[Troupe Leader]"; + mes "\"Except, you don't seem to have any room for it. I'll hold onto it for you until you do have room.\""; + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + return; +} diff --git a/npc/002-3/_import.txt b/npc/002-3/_import.txt new file mode 100644 index 00000000..ce2e20be --- /dev/null +++ b/npc/002-3/_import.txt @@ -0,0 +1,8 @@ +// Map 002-3: Tulimshar Mining Camp +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/002-3/_warps.txt", +"npc/002-3/mapflags.txt", +"npc/002-3/merchant.txt", +"npc/002-3/mining_camp_barrier.txt", +"npc/002-3/nathan.txt", +"npc/002-3/traveler.txt", diff --git a/npc/002-3/_warps.txt b/npc/002-3/_warps.txt new file mode 100644 index 00000000..916086cb --- /dev/null +++ b/npc/002-3/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-3: Tulimshar Mining Camp warps +002-3,22,87,0 warp #002-3_22_87 0,0,043-3,31,27 +002-3,85,51,0 warp #002-3_85_51 0,0,002-1,92,115 +002-3,51,36,0 warp #002-3_51_36 0,0,002-1,33,110 diff --git a/npc/002-3/mapflags.txt b/npc/002-3/mapflags.txt new file mode 100755 index 00000000..46f04c89 --- /dev/null +++ b/npc/002-3/mapflags.txt @@ -0,0 +1 @@ +//002-3 mapflag resave 002-3,72,66 diff --git a/npc/002-3/merchant.txt b/npc/002-3/merchant.txt new file mode 100755 index 00000000..9f7c67e9 --- /dev/null +++ b/npc/002-3/merchant.txt @@ -0,0 +1,2 @@ + +002-3,60,47,0 shop Ishyah NPC109,525:400,531:1000,530:8000,1199:2,603:1000 diff --git a/npc/002-3/mining_camp_barrier.txt b/npc/002-3/mining_camp_barrier.txt new file mode 100755 index 00000000..7a6acb74 --- /dev/null +++ b/npc/002-3/mining_camp_barrier.txt @@ -0,0 +1,13 @@ +002-3,82,32,0 script #Sandstorm_Mine_Barrier NPC45,0,0,{ + if (QL_MINEALL >= 8) goto L_Barrier_Open; + + message strcharinfo(0), "Some force seems to block your entrance."; + goto L_End; + +L_Barrier_Open: + warp "002-4",37,31; + goto L_End; + +L_End: + end; +} diff --git a/npc/002-3/nathan.txt b/npc/002-3/nathan.txt new file mode 100755 index 00000000..0e6a9c26 --- /dev/null +++ b/npc/002-3/nathan.txt @@ -0,0 +1,103 @@ +002-3,42,45,6 script Nathan NPC109,{ + if (QL_MINEALL >= 20) goto L_Nathan_Complete; + if (QL_MINEALL == 19) goto L_Nathan_UGQ_Naem; + if (QL_MINEALL == 18) goto L_Nathan_Help_Cool; + if (QL_MINEALL == 17) goto L_Nathan_Help_Done; + if (QL_MINEALL == 16) goto L_Nathan_Waits_3; + if (QL_MINEALL == 15) goto L_Nathan_Help_3; + if (QL_MINEALL == 14) goto L_Nathan_Waits_2; + if (QL_MINEALL == 13) goto L_Nathan_Help_2; + if (QL_MINEALL == 12) goto L_Nathan_Waits_1; + if (QL_MINEALL == 11) goto L_Nathan_Help_1; + if (QL_MINEALL == 9) goto L_Nathan_Cool; + if (QL_MINEALL == 8) goto L_Nathan_Okay; + + mes "[Nathan the Miner]"; + mes "\"It's very dangerous in here. We had a big earthquake here just recently, too... so be careful!\""; + goto L_close; + +L_Nathan_Okay: + QL_MINEALL = 9; + mes "[Nathan]"; + mes "\"Hey there! Just mining away down here. You say Nickos was worried about us? Nothing down here we can't handle, but you should try to be safe down here yourself. The monsters can be rather aggressive. Come to think of it, you might want to check on Naem to make sure he's okay. You can find him in the southeast parts of the mine.\""; + goto L_close; + +L_Nathan_Cool: + mes "[Nathan]"; + mes "\"Hey, be careful down here, the monsters can be rather aggressive! You might want to check on Naem too. He's at the southeast parts of the mine.\""; + goto L_close; + +L_Nathan_Help_1: + QL_MINEALL = 12; + mes "[Nathan]"; + mes "\"Oh, hey again! Nickos told you we need some help down here too? Yeah, Naem could use a spare pair of hands moving his bags of ore to me. He's got a lot of work built up. Just go talk to him and he'll give you the bags. You might have to make a few trips, but I'll make it worth your troubles.\""; + goto L_close; + +L_Nathan_Waits_1: + mes "[Nathan]"; + mes "\"Naem could use some help moving his bags of ore to me. He's got a lot of work built up. Just go talk to him and he'll give you the bags. You might have to make a few trips, but I'll make it worth your troubles.\""; + goto L_close; + +L_Nathan_Help_2: + QL_MINEALL = 14; + mes "You give the bag of ore to Nathan"; + next; + mes "[Nathan]"; + mes "\"Ah, thank you. Just a couple more and we'll have caught up!\""; + goto L_close; + +L_Nathan_Waits_2: + mes "[Nathan]"; + mes "\"Just a couple more and we'll be all caught up!\""; + goto L_close; + +L_Nathan_Help_3: + QL_MINEALL = 16; + mes "You hand the bag of ore to Nathan."; + next; + mes "[Nathan]"; + mes "\"Just one more bag and you'll be done!\""; + goto L_close; + +L_Nathan_Waits_3: + mes "[Nathan]"; + mes "\"Just get one more bag of ore from Naem and bring it to me and you'll be done.\""; + goto L_close; + +L_Nathan_Help_Done: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Nathan_TooMany; + QL_MINEALL = 18; + getitem "MinersHat", 1; + mes "[Nathan]"; + mes "You hand the bag of ore to Nathan."; + next; + mes "\"Ah, that should be it! Thank you for your help. Here, take this Miner's Hat. You're a real miner now!\""; + next; + mes "\"Oh, and I noticed a problem with these angry scorpions down here, they seem to make things much more difficult. Maybe you could tell Nickos about it on your way out?\""; + goto L_close; + +L_Nathan_TooMany: + mes "[Nathan]"; + mes "\"You have too many items for me to give you a reward.\""; + goto L_close; + +L_Nathan_Help_Cool: + mes "[Nathan]"; + mes "\"Be safe down here, it's dangerous for the unexperienced. Mining is a dangerous job, but somebody's got to do it!\""; + goto L_close; + +L_Nathan_UGQ_Naem: + mes "[Nathan]"; + mes "\"Thanks for thinning down the angry scorpion population. It sure has made mining a little easier down here! Oh, you say Nickos has given you permission to check out the underground palace? Talk to Naem, he's got the key and the code.\""; + goto L_close; + +L_Nathan_Complete: + mes "[Nathan]"; + mes "\"Mining is a dangerous job, but somebody's got to do it!\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-3/traveler.txt b/npc/002-3/traveler.txt new file mode 100755 index 00000000..5fc218c6 --- /dev/null +++ b/npc/002-3/traveler.txt @@ -0,0 +1,7 @@ + +002-3,25,28,0 script Jena the Traveler NPC103,{ + @npcname$ = "Jena"; + @NpcTravelBit = $@tul_mine_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/002-4/_import.txt b/npc/002-4/_import.txt new file mode 100644 index 00000000..8f131fe5 --- /dev/null +++ b/npc/002-4/_import.txt @@ -0,0 +1,10 @@ +// Map 002-4: Desert Mines +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/002-4/_mobs.txt", +"npc/002-4/_warps.txt", +"npc/002-4/mapflags.txt", +"npc/002-4/mine_triggerone.txt", +"npc/002-4/mine_triggerthree.txt", +"npc/002-4/mine_triggertwo.txt", +"npc/002-4/naem.txt", +"npc/002-4/underground_palace_barrier.txt", diff --git a/npc/002-4/_mobs.txt b/npc/002-4/_mobs.txt new file mode 100644 index 00000000..01984822 --- /dev/null +++ b/npc/002-4/_mobs.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-4: Desert Mines mobs +002-4,39,37,7,5 monster Beehive 1056,5,100000,30000 +002-4,91,41,8,10 monster AngryFireGoblin 1108,3,100000,30000 +002-4,71,35,12,8 monster Beehive 1056,4,100000,30000 +002-4,69,100,4,2 monster AngryFireGoblin 1108,2,100000,30000 +002-4,68,57,13,12 monster AngryScorpion 1057,5,100000,30000 +002-4,49,58,2,7 monster AngryScorpion 1057,5,100000,30000 +002-4,38,76,7,11 monster AngryScorpion 1057,4,100000,30000 +002-4,58,78,3,8 monster Beehive 1056,4,100000,30000 +002-4,89,68,5,16 monster AngryScorpion 1057,4,100000,30000 +002-4,84,93,9,8 monster Beehive 1056,4,100000,30000 +002-4,72,77,10,7 monster AngryFireGoblin 1108,3,100000,30000 +002-4,67,91,5,6 monster AngryScorpion 1057,4,100000,30000 +002-4,58,95,3,6 monster Beehive 1056,4,100000,30000 +002-4,63,100,1,2 monster AngryScorpion 1057,3,100000,30000 diff --git a/npc/002-4/_warps.txt b/npc/002-4/_warps.txt new file mode 100644 index 00000000..2cf2135b --- /dev/null +++ b/npc/002-4/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-4: Desert Mines warps +002-4,37,29,0 warp #002-4_37_29 0,0,002-3,82,30 diff --git a/npc/002-4/mapflags.txt b/npc/002-4/mapflags.txt new file mode 100755 index 00000000..6b70b328 --- /dev/null +++ b/npc/002-4/mapflags.txt @@ -0,0 +1 @@ +//002-4 mapflag resave 002-3,72,66 diff --git a/npc/002-4/mine_triggerone.txt b/npc/002-4/mine_triggerone.txt new file mode 100755 index 00000000..66da2a04 --- /dev/null +++ b/npc/002-4/mine_triggerone.txt @@ -0,0 +1,49 @@ +002-4,30,47,0 script Button#mine-1 NPC400,0,0,{ + if (QL_MINEALL == 24) goto L_Trigger_Wrong_1; + if (QL_MINEALL == 23) goto L_Trigger_Wrong_1; + if (QL_MINEALL == 22) goto L_Trigger_1; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_close; + +L_Trigger_Wrong_1: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_1, + "Put the key in, turn left.", L_Left_Wrong_1, + "Do nothing.", L_Nothing_1; + +L_Right_Wrong_1: + QL_MINEALL = 22; + mes "You turn the key right."; + goto L_close; + +L_Left_Wrong_1: + QL_MINEALL = 22; + mes "You turn the key left."; + goto L_close; + +L_Trigger_1: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_1, + "Put the key in, turn left.", L_Left_1, + "Do nothing.", L_Nothing_1; + +L_Right_1: + QL_MINEALL = 23; + mes "You turn the key right. A clicking sound echoes throughout the mine."; + goto L_close; + +L_Left_1: + QL_MINEALL = 22; + mes "You turn the key left."; + goto L_close; + +L_Nothing_1: + mes "You leave the button alone."; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-4/mine_triggerthree.txt b/npc/002-4/mine_triggerthree.txt new file mode 100755 index 00000000..b7f197ed --- /dev/null +++ b/npc/002-4/mine_triggerthree.txt @@ -0,0 +1,49 @@ +002-4,91,99,0 script Button#mine-3 NPC400,0,0,{ + if (QL_MINEALL == 24) goto L_Trigger_Wrong_3; + if (QL_MINEALL == 23) goto L_Trigger_3; + if (QL_MINEALL == 22) goto L_Trigger_Wrong_3; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_close; + +L_Trigger_Wrong_3: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_3, + "Put the key in, turn left.", L_Left_Wrong_3, + "Do nothing.", L_Nothing_3; + +L_Right_Wrong_3: + QL_MINEALL = 22; + mes "You turn the key right."; + goto L_close; + +L_Left_Wrong_3: + QL_MINEALL = 22; + mes "You turn the key left."; + goto L_close; + +L_Trigger_3: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_3, + "Put the key in, turn left.", L_Left_3, + "Do nothing.", L_Nothing_3; + +L_Right_3: + QL_MINEALL = 22; + mes "You turn the key right."; + goto L_close; + +L_Left_3: + QL_MINEALL = 24; + mes "You turn the key left. A clicking sound echoes throughout the mine."; + goto L_close; + +L_Nothing_3: + mes "You leave the button alone."; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-4/mine_triggertwo.txt b/npc/002-4/mine_triggertwo.txt new file mode 100755 index 00000000..b43df27e --- /dev/null +++ b/npc/002-4/mine_triggertwo.txt @@ -0,0 +1,50 @@ +002-4,100,37,0 script Button#mine-2 NPC400,0,0,{ + if (QL_MINEALL == 24) goto L_Trigger_2; + if (QL_MINEALL == 23) goto L_Trigger_Wrong_2; + if (QL_MINEALL == 22) goto L_Trigger_Wrong_2; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_close; + +L_Trigger_Wrong_2: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_2, + "Put the key in, turn left.", L_Left_Wrong_2, + "Do nothing.", L_Nothing_2; + +L_Right_Wrong_2: + QL_MINEALL = 22; + mes "You turn the key right."; + goto L_close; + +L_Left_Wrong_2: + QL_MINEALL = 22; + mes "You turn the key left."; + goto L_close; + +L_Trigger_2: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_2, + "Put the key in, turn left.", L_Left_2, + "Do nothing.", L_Nothing_2; + +L_Right_2: + QL_MINEALL = 22; + mes "You turn the key right."; + goto L_close; + +L_Left_2: + QL_MINEALL = 25; + FLAGS = FLAGS | FLAG_OPENED_UNDERGROUND; + mes "You turn the key left. A clicking sound echoes throughout the mine, followed by a loud thump."; + goto L_close; + +L_Nothing_2: + mes "You leave the button alone."; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-4/naem.txt b/npc/002-4/naem.txt new file mode 100755 index 00000000..800fe92f --- /dev/null +++ b/npc/002-4/naem.txt @@ -0,0 +1,132 @@ +002-4,91,96,6 script Naem NPC109,{ + if (FLAGS & FLAG_GOT_NAEM_GLOVES) goto L_Naem_Complete; + if (FLAGS & FLAG_OPENED_UNDERGROUND) goto L_Naem_Gloves; + if (QL_MINEALL == 22) goto L_Naem_Code; + if (QL_MINEALL == 21) goto L_Naem_Lt; + if (QL_MINEALL == 20) goto L_Naem_Memory; + if ((QL_MINEALL > 17) && (QL_MINEALL < 19)) + goto L_Naem_Great; + if (QL_MINEALL == 17) goto L_Naem_Waits_3; + if (QL_MINEALL == 16) goto L_Naem_Help_3; + if (QL_MINEALL == 15) goto L_Naem_Waits_2; + if (QL_MINEALL == 14) goto L_Naem_Help_2; + if (QL_MINEALL == 13) goto L_Naem_Waits_1; + if (QL_MINEALL == 12) goto L_Naem_Help_1; + if (QL_MINEALL == 10) goto L_Naem_Cool; + if (QL_MINEALL == 9) goto L_Naem_Okay; + + mes "[Naem]"; + mes "\"I'm just mining away here. Lots of work to do.\""; + goto L_close; + +L_Naem_Okay: + QL_MINEALL = 10; + mes "[Naem]"; + mes "\"Oh, hello there. Nickos wanted you to check on me? Yeah, you can tell him I'm okay.\""; + goto L_close; + +L_Naem_Cool: + mes "[Naem]"; + mes "\"Yeah, I'm cool. Just mining away here.\""; + goto L_close; + +L_Naem_Help_1: + QL_MINEALL = 13; + mes "[Naem]"; + mes "\"Oh, you are here to help move my bags? Cool, I've got a few ready to go. Go ahead and take this one!\""; + next; + mes "Naem hands you a bag of ore."; + next; + mes "[Naem]"; + mes "\"After you deliver that one to Nathan, come on back, I've got a couple more ready to go.\""; + goto L_close; + +L_Naem_Waits_1: + mes "[Naem]"; + mes "\"After you deliver that bag of ore to Nathan, come on back, I've got a couple more ready to go.\""; + goto L_close; + +L_Naem_Help_2: + QL_MINEALL = 15; + mes "Naem gives you a bag of ore."; + next; + mes "[Naem]"; + mes "\"Just one more after this one and we'll be all caught up!\""; + goto L_close; + +L_Naem_Waits_2: + mes "[Naem]"; + mes "\"Just one more bag of ore after the one you got and we'll be all caught up!\""; + goto L_close; + +L_Naem_Help_3: + QL_MINEALL = 17; + mes "[Naem]"; + mes "Hands a bag of ore to you."; + next; + mes "\"Last one!\""; + goto L_close; + +L_Naem_Waits_3: + mes "[Naem]"; + mes "\"You got my last sack already. Just give it to Nathan and we'll have caught up.\""; + goto L_close; + +L_Naem_Great: + mes "[Naem]"; + mes "\"Hi ho! It's off to work I go! I work every day for meager pay, a miner's life for me...\""; + goto L_close; + +L_Naem_Memory: + mes "You see Naem grimacing in pain as you approach."; + next; + mes "[Naem]"; + mes "\"Oh, my head! Some rocks fell on me and bonked me pretty good. I'm still a little sore.\""; + menu + "Don't you have a key so I can go to the underground palace?", L_Naem_Palace_No, + "You should be more careful.", L_Naem_Duh; + +L_Naem_Duh: + mes "[Naem]"; + mes "\"I guess I should...\""; + goto L_close; + +L_Naem_Palace_No: + QL_MINEALL = 21; + mes "[Naem]"; + mes "\"Oh no! I lost the key! Don't worry though, talk to Lieutenant Dausen about getting the spare key.\""; + goto L_close; + +L_Naem_Lt: + mes "[Naem]"; + mes "\"I hurt my head pretty bad. I also lost my key. If you want to get into the underground palace, you'll have to talk to Lieutenant Dausen about getting the spare.\""; + goto L_close; + +L_Naem_Code: + mes "[Naem]"; + mes "\"Oh, you got the key. That is good! But my head still hurts... All I remember about the code is you have to put the key into the key hole buttons around the mine in a certain order and turn them in a certain order and it will unlock the underground palace. Sorry, that's all I have for you. Good luck!\""; + goto L_close; + +L_Naem_Gloves: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Naem_TooMany; + FLAGS = FLAGS | FLAG_GOT_NAEM_GLOVES; + getitem "MinerGloves", 1; + mes "[Naem]"; + mes "\"Hey, good job on getting that together! Take these gloves, they might prove useful in the underground palace.\""; + goto L_close; + +L_Naem_Complete: + mes "[Naem]"; + mes "\"Yo-ho-ho, a miner's life for me!\""; + goto L_close; + +L_Naem_TooMany: + mes "[Naem]"; + mes "\"You have too many items for me to give you a reward.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-4/underground_palace_barrier.txt b/npc/002-4/underground_palace_barrier.txt new file mode 100755 index 00000000..c51d73be --- /dev/null +++ b/npc/002-4/underground_palace_barrier.txt @@ -0,0 +1,13 @@ +002-4,68,98,0 script #UGP_Barrier NPC45,0,0,{ + if (QL_MINEALL >= 25) goto L_Barrier_Open; + + message strcharinfo(0), "Some force seems to block your entrance."; + goto L_End; + +L_Barrier_Open: + warp "002-5",35,97; + goto L_End; + +L_End: + end; +} diff --git a/npc/002-5/_import.txt b/npc/002-5/_import.txt new file mode 100644 index 00000000..12cfc164 --- /dev/null +++ b/npc/002-5/_import.txt @@ -0,0 +1,7 @@ +// Map 002-5: Deep Desert Mines +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/002-5/_mobs.txt", +"npc/002-5/_warps.txt", +"npc/002-5/chest.txt", +"npc/002-5/mapflags.txt", +"npc/002-5/sema.txt", diff --git a/npc/002-5/_mobs.txt b/npc/002-5/_mobs.txt new file mode 100644 index 00000000..0f858c3a --- /dev/null +++ b/npc/002-5/_mobs.txt @@ -0,0 +1,19 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-5: Deep Desert Mines mobs +002-5,37,89,6,3 monster AngryFireGoblin 1108,3,100000,30000 +002-5,33,76,1,5 monster Beehive 1056,3,100000,30000 +002-5,40,68,3,2 monster AngryScorpion 1057,3,100000,30000 +002-5,40,38,9,2 monster Yellow Rose 1060,3,100000,30000 +002-5,56,97,1,2 monster Yellow Rose 1060,1,100000,30000 +002-5,68,100,6,1 monster Little Blub 1007,4,100000,30000 +002-5,91,80,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,89,94,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,74,78,0,2 monster Yellow Rose 1060,2,100000,30000 +002-5,94,72,1,2 monster Yellow Rose 1060,1,100000,30000 +002-5,90,61,3,1 monster Little Blub 1007,1,100000,30000 +002-5,74,35,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,84,33,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,84,46,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,99,38,0,2 monster Yellow Rose 1060,1,100000,30000 +002-5,93,38,4,1 monster Little Blub 1007,2,100000,30000 +002-5,62,62,2,21 monster AngryFireGoblin 1108,3,100000,30000 diff --git a/npc/002-5/_warps.txt b/npc/002-5/_warps.txt new file mode 100644 index 00000000..5c29f352 --- /dev/null +++ b/npc/002-5/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 002-5: Deep Desert Mines warps +002-5,34,98,0 warp #002-5_34_98 0,0,002-4,68,99 diff --git a/npc/002-5/chest.txt b/npc/002-5/chest.txt new file mode 100755 index 00000000..12508350 --- /dev/null +++ b/npc/002-5/chest.txt @@ -0,0 +1,37 @@ +002-5,93,37,0 script Supply Chest NPC378,{ + if (QL_MINEALL >= 26) goto L_Finished; + + mes "Hrmm... A supply chest."; + mes "Do you want to try to open it?"; + next; + menu + "Yes.", L_Yes, + "No.", L_close; + +L_Yes: + if (countitem("TreasureKey") < 3) + goto L_Not_Enough; + getinventorylist; + if (@inventorylist_count == 100 && countitem("TreasureKey") > 3) + goto L_TooMany; + mes "You opened the chest and found a short bow!"; + delitem "TreasureKey", 3; + getitem "ShortBow", 1; + QL_MINEALL = 26; + goto L_close; + +L_Not_Enough: + mes "It seems that you do not have the right key for this chest yet..."; + goto L_close; + +L_Finished: + mes "You have already opened this chest."; + goto L_close; + +L_TooMany: + mes "You do not have enough room to loot this chest. Maybe you should try again later."; + goto L_close; + +L_close: + close; +} diff --git a/npc/002-5/mapflags.txt b/npc/002-5/mapflags.txt new file mode 100755 index 00000000..dd32ef92 --- /dev/null +++ b/npc/002-5/mapflags.txt @@ -0,0 +1 @@ +//002-5 mapflag resave 002-3,72,66 diff --git a/npc/002-5/sema.txt b/npc/002-5/sema.txt new file mode 100755 index 00000000..689d3ec0 --- /dev/null +++ b/npc/002-5/sema.txt @@ -0,0 +1,62 @@ +002-5,43,91,6 script Sema NPC340,{ + if (QL_MINEALL >= 28) goto L_Sema_Done; + if (QL_MINEALL == 27) goto L_Sema_Happy; + if (QL_MINEALL == 26) goto L_Sema_GCM; + + mes "[Sema the Miner]"; + mes "\"Hello adventurer. I do not know exactly where, but somewhere in this cave there is a supply chest. And wouldn't you know it! The archants have eaten all the spare keys for the chest. Go and do what you must do.\""; + goto L_close; + +L_Sema_GCM: + mes "[Sema the Miner]"; + mes "\"I saw a giant cave maggot eat one of the other miners and it might eat me! Can you kill it?\""; + menu + "Yes.", L_Sema_Yes, + "No.", L_Sema_No; + +L_Sema_No: + mes "[Sema the Miner]"; + mes "\"Ahh! I am very scared now!\""; + goto L_close; + +L_Sema_Yes: + QL_MINEALL = 27; + monster "002-5", 70, 90, "", 1059, 1; + mes "[Sema the Miner]"; + mes "\"Good luck. To prove you killed it, please bring the Iten it swallowed when it ate the miner. Be careful, there could be more than one.\""; + goto L_close; + +L_Sema_Happy: + if (countitem("Iten") < 1) + goto L_Sema_Not_Happy; + getinventorylist; + if (@inventorylist_count - (countitem("Iten") == 1) > 99) + goto L_Sema_TooMany; + delitem "Iten", 1; + getitem "DesertShirt", 1; + QL_MINEALL = 28; + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + mes "[Sema the Miner]"; + mes "\"You killed it! What a relief! I wish I had more to give, but please accept this Desert Shirt as reward.\""; + goto L_close; + +L_Sema_TooMany: + mes "[Sema the Miner]"; + mes "\"You have too many items for me to give you a reward. Please drop or sell something so I can give it to you. Oh and yes, you can also store items at the nearest bank.\""; + goto L_close; + +L_Sema_Not_Happy: + QL_MINEALL = 26; + heal -Hp, 0; + mes "A stone falls on your head."; + goto L_close; + +L_Sema_Done: + mes "[Sema the Miner]"; + mes "\"You made this cave safer, you are kind beyond belief. Others may need you. Happy adventuring.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/003-1/_import.txt b/npc/003-1/_import.txt new file mode 100644 index 00000000..81859643 --- /dev/null +++ b/npc/003-1/_import.txt @@ -0,0 +1,2 @@ +// Map 003-1: 2006 Tulimshar +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/003-4/_import.txt b/npc/003-4/_import.txt new file mode 100644 index 00000000..00ff0aad --- /dev/null +++ b/npc/003-4/_import.txt @@ -0,0 +1,4 @@ +// Map 003-4: Beach +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/003-4/_mobs.txt", +"npc/003-4/_warps.txt", diff --git a/npc/003-4/_mobs.txt b/npc/003-4/_mobs.txt new file mode 100644 index 00000000..be8279c6 --- /dev/null +++ b/npc/003-4/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 003-4: Beach mobs +003-4,158,68,14,48 monster Croc 1006,10,100000,30000 +003-4,0,0,0,0 monster Clover Patch 1033,15,100000,30000 +003-4,120,31,11,11 monster Clover Patch 1033,5,100000,30000 +003-4,119,68,52,50 monster Ratto 1005,35,100000,30000 +003-4,134,69,38,35 monster Tortuga 1004,20,100000,30000 +003-4,35,25,5,1 monster Maggot 1026,1,700000,600000 diff --git a/npc/003-4/_warps.txt b/npc/003-4/_warps.txt new file mode 100644 index 00000000..46e27355 --- /dev/null +++ b/npc/003-4/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 003-4: Beach warps +003-4,172,77,0 warp #003-4_172_77 0,4,002-1,32,66 +003-4,141,19,0 warp #003-4_141_19 2,0,004-1,37,110 +003-4,114,117,0 warp #003-4_114_117 3,0,043-1,44,20 diff --git a/npc/004-1/_import.txt b/npc/004-1/_import.txt new file mode 100644 index 00000000..8c47b26c --- /dev/null +++ b/npc/004-1/_import.txt @@ -0,0 +1,4 @@ +// Map 004-1: Beach +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/004-1/_mobs.txt", +"npc/004-1/_warps.txt", diff --git a/npc/004-1/_mobs.txt b/npc/004-1/_mobs.txt new file mode 100644 index 00000000..e45f0d9d --- /dev/null +++ b/npc/004-1/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-1: Beach mobs +004-1,39,57,4,14 monster Clover Patch 1033,5,100000,30000 +004-1,33,83,4,20 monster Clover Patch 1033,11,100000,30000 +004-1,28,103,5,7 monster Clover Patch 1033,7,100000,30000 +004-1,71,104,13,10 monster Croc 1006,5,100000,30000 +004-1,76,68,10,24 monster Tortuga 1004,13,100000,30000 +004-1,68,25,9,5 monster Croc 1006,2,100000,30000 +004-1,93,27,1,1 monster Toppy Blub 1009,1,120000,60000 diff --git a/npc/004-1/_warps.txt b/npc/004-1/_warps.txt new file mode 100644 index 00000000..6e79013d --- /dev/null +++ b/npc/004-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-1: Beach warps +004-1,68,19,0 warp #004-1_68_19 2,0,041-1,101,94 +004-1,37,111,0 warp #004-1_37_111 2,0,003-4,141,20 diff --git a/npc/004-3/_import.txt b/npc/004-3/_import.txt new file mode 100644 index 00000000..32700d6e --- /dev/null +++ b/npc/004-3/_import.txt @@ -0,0 +1,5 @@ +// Map 004-3: Pirate Caves First Floor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/004-3/_mobs.txt", +"npc/004-3/_warps.txt", +"npc/004-3/mapflags.txt", diff --git a/npc/004-3/_mobs.txt b/npc/004-3/_mobs.txt new file mode 100644 index 00000000..2f345891 --- /dev/null +++ b/npc/004-3/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-3: Pirate Caves First Floor mobs +004-3,43,72,3,4 monster Serqet 1119,2,100000,30000 +004-3,43,72,3,4 monster Tengu 1120,1,100000,30000 +004-3,43,72,3,4 monster Golem 1121,1,100000,30000 +004-3,28,69,4,1 monster Serqet 1119,2,100000,30000 +004-3,71,63,3,4 monster Serqet 1119,2,100000,30000 +004-3,39,39,3,1 monster Tengu 1120,2,100000,30000 +004-3,71,63,3,4 monster Golem 1121,1,100000,30000 diff --git a/npc/004-3/_warps.txt b/npc/004-3/_warps.txt new file mode 100644 index 00000000..005feb9f --- /dev/null +++ b/npc/004-3/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-3: Pirate Caves First Floor warps +004-3,24,95,0 warp #004-3_24_95 0,0,002-1,49,21 +004-3,49,80,0 warp #004-3_49_80 0,0,004-4,49,83 +004-3,31,73,0 warp #004-3_31_73 0,0,004-4,31,70 +004-3,49,56,0 warp #004-3_49_56 0,0,004-4,49,51 +004-3,90,64,0 warp #004-3_90_64 0,0,004-4,90,68 +004-3,80,22,0 warp #004-3_80_22 0,0,021-3,44,142 +004-3,77,40,0 warp #004-3_77_40 0,0,004-4,78,34 diff --git a/npc/004-3/mapflags.txt b/npc/004-3/mapflags.txt new file mode 100755 index 00000000..3c0335e6 --- /dev/null +++ b/npc/004-3/mapflags.txt @@ -0,0 +1 @@ +//004-3 mapflag resave 001-1,60,105 diff --git a/npc/004-4/_import.txt b/npc/004-4/_import.txt new file mode 100644 index 00000000..3cba1761 --- /dev/null +++ b/npc/004-4/_import.txt @@ -0,0 +1,5 @@ +// Map 004-4: Pirate Caves Second Floor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/004-4/_mobs.txt", +"npc/004-4/_warps.txt", +"npc/004-4/mapflags.txt", diff --git a/npc/004-4/_mobs.txt b/npc/004-4/_mobs.txt new file mode 100644 index 00000000..dc1cd9a3 --- /dev/null +++ b/npc/004-4/_mobs.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-4: Pirate Caves Second Floor mobs +004-4,36,62,2,10 monster Golem 1121,1,100000,30000 +004-4,37,61,2,10 monster Tengu 1120,2,100000,30000 +004-4,62,52,6,3 monster Serqet 1119,2,100000,30000 +004-4,34,87,6,3 monster Serqet 1119,2,100000,30000 +004-4,37,62,3,11 monster Serqet 1119,2,100000,30000 +004-4,34,88,5,3 monster Tengu 1120,2,100000,30000 +004-4,63,52,5,3 monster Tengu 1120,2,100000,30000 +004-4,62,52,5,2 monster Golem 1121,1,100000,30000 +004-4,34,88,5,2 monster Golem 1121,1,100000,30000 diff --git a/npc/004-4/_warps.txt b/npc/004-4/_warps.txt new file mode 100644 index 00000000..d476bc2f --- /dev/null +++ b/npc/004-4/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-4: Pirate Caves Second Floor warps +004-4,49,81,0 warp #004-4_49_81 0,0,004-3,49,76 +004-4,31,72,0 warp #004-4_31_72 0,0,004-3,31,74 +004-4,49,53,0 warp #004-4_49_53 0,0,004-3,49,57 +004-4,90,70,0 warp #004-4_90_70 0,0,004-3,90,66 +004-4,24,64,0 warp #004-4_24_64 0,0,004-5,24,67 +004-4,78,32,0 warp #004-4_78_32 0,0,004-3,77,38 diff --git a/npc/004-4/mapflags.txt b/npc/004-4/mapflags.txt new file mode 100755 index 00000000..4dffd583 --- /dev/null +++ b/npc/004-4/mapflags.txt @@ -0,0 +1 @@ +//004-4 mapflag resave 001-1,60,105 diff --git a/npc/004-5/_import.txt b/npc/004-5/_import.txt new file mode 100644 index 00000000..1315b3de --- /dev/null +++ b/npc/004-5/_import.txt @@ -0,0 +1,6 @@ +// Map 004-5: Pirate Den +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/004-5/_mobs.txt", +"npc/004-5/_warps.txt", +"npc/004-5/chest.txt", +"npc/004-5/mapflags.txt", diff --git a/npc/004-5/_mobs.txt b/npc/004-5/_mobs.txt new file mode 100644 index 00000000..581d2eb9 --- /dev/null +++ b/npc/004-5/_mobs.txt @@ -0,0 +1,14 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-5: Pirate Den mobs +004-5,41,70,3,2 monster Golem 1121,1,100000,30000 +004-5,41,70,3,1 monster Tengu 1120,2,100000,30000 +004-5,40,70,4,1 monster Serqet 1119,2,100000,30000 +004-5,35,86,3,2 monster Golem 1121,1,100000,30000 +004-5,34,86,4,1 monster Serqet 1119,2,100000,30000 +004-5,35,86,3,1 monster Tengu 1120,2,100000,30000 +004-5,54,38,3,2 monster Golem 1121,1,100000,30000 +004-5,53,38,4,1 monster Serqet 1119,2,100000,30000 +004-5,54,38,3,1 monster Tengu 1120,2,100000,30000 +004-5,81,38,3,2 monster Golem 1121,1,100000,30000 +004-5,80,38,4,1 monster Serqet 1119,2,100000,30000 +004-5,81,38,3,1 monster Tengu 1120,2,100000,30000 diff --git a/npc/004-5/_warps.txt b/npc/004-5/_warps.txt new file mode 100644 index 00000000..9e67f1ee --- /dev/null +++ b/npc/004-5/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 004-5: Pirate Den warps +004-5,24,65,0 warp #004-5_24_65 0,0,004-4,24,62 diff --git a/npc/004-5/chest.txt b/npc/004-5/chest.txt new file mode 100755 index 00000000..0054571e --- /dev/null +++ b/npc/004-5/chest.txt @@ -0,0 +1,26 @@ +004-5,89,67,0 script Old Chest#crastur NPC111,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + @spants_state = ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + if(@spants_state > 5) goto L_Looted; + if(@spants_state != 5) goto L_Unknown; + @spants_state = 6; + getitem "Bandana", 1; + set Zeny, (Zeny + rand(8000,20000)); // give some random loot + mes "This must be the treasure that Crastur was talking about."; + mes "You see a pile of gold and a Bandana on top."; + QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + goto L_close; + +L_Looted: + mes "You have already looted this chest."; + goto L_close; + +L_Unknown: + mes "You have no idea how to open this chest."; + goto L_close; + +L_close: + close; +} diff --git a/npc/004-5/mapflags.txt b/npc/004-5/mapflags.txt new file mode 100755 index 00000000..1c67e967 --- /dev/null +++ b/npc/004-5/mapflags.txt @@ -0,0 +1 @@ +//004-5 mapflag resave 001-1,60,105 diff --git a/npc/005-3/_import.txt b/npc/005-3/_import.txt new file mode 100644 index 00000000..5b1d526e --- /dev/null +++ b/npc/005-3/_import.txt @@ -0,0 +1,5 @@ +// Map 005-3: Snake Pit +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/005-3/_mobs.txt", +"npc/005-3/_warps.txt", +"npc/005-3/mapflags.txt", diff --git a/npc/005-3/_mobs.txt b/npc/005-3/_mobs.txt new file mode 100644 index 00000000..29d7868d --- /dev/null +++ b/npc/005-3/_mobs.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 005-3: Snake Pit mobs +005-3,59,63,24,28 monster Crocotree 1010,50,100000,30000 +005-3,56,64,26,24 monster Toppy Blub 1009,15,100000,30000 +005-3,59,68,29,21 monster Croc 1006,20,100000,30000 +005-3,95,52,5,30 monster Topaz Vein 1054,7,100000,30000 +005-3,53,26,32,6 monster Topaz Vein 1054,5,100000,30000 diff --git a/npc/005-3/_warps.txt b/npc/005-3/_warps.txt new file mode 100644 index 00000000..609d525d --- /dev/null +++ b/npc/005-3/_warps.txt @@ -0,0 +1,13 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 005-3: Snake Pit warps +005-3,52,35,0 warp #005-3_52_35 0,0,002-1,113,109 +005-3,63,48,0 warp #005-3_63_48 0,0,006-3,89,45 +005-3,85,51,0 warp #005-3_85_51 0,0,006-3,125,65 +005-3,86,32,0 warp #005-3_86_32 0,0,006-1,55,47 +005-3,73,62,0 warp #005-3_73_62 0,0,006-1,51,69 +005-3,78,90,0 warp #005-3_78_90 0,0,043-3,116,37 +005-3,33,84,0 warp #005-3_33_84 0,0,043-3,31,35 +005-3,107,102,0 warp #005-3_107_102 0,0,006-1,64,78 +005-3,27,41,0 warp #005-3_27_41 0,0,043-5,126,27 +005-3,101,30,0 warp #005-3_101_30 0,0,005-3,101,35 +005-3,110,79,0 warp #005-3_110_79 0,0,005-3,110,75 diff --git a/npc/005-3/mapflags.txt b/npc/005-3/mapflags.txt new file mode 100755 index 00000000..68b18858 --- /dev/null +++ b/npc/005-3/mapflags.txt @@ -0,0 +1 @@ +//005-3 mapflag resave 006-1,36,18 diff --git a/npc/006-1/_import.txt b/npc/006-1/_import.txt new file mode 100644 index 00000000..e3b85ebe --- /dev/null +++ b/npc/006-1/_import.txt @@ -0,0 +1,11 @@ +// Map 006-1: Desert Mountains +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/006-1/_mobs.txt", +"npc/006-1/_warps.txt", +"npc/006-1/mapflags.txt", +"npc/006-1/mika.txt", +"npc/006-1/miriam.txt", +"npc/006-1/pachua.txt", +"npc/006-1/spirit.txt", +"npc/006-1/traveler.txt", +"npc/006-1/tree.txt", diff --git a/npc/006-1/_mobs.txt b/npc/006-1/_mobs.txt new file mode 100644 index 00000000..ee538196 --- /dev/null +++ b/npc/006-1/_mobs.txt @@ -0,0 +1,23 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 006-1: Desert Mountains mobs +006-1,49,52,3,1 monster Crocotree 1010,1,100000,30000 +006-1,53,36,8,6 monster Maggot 1026,3,150000,10000 +006-1,89,26,16,6 monster Maggot 1026,5,15000,75000 +006-1,113,41,6,18 monster Maggot 1026,8,15000,75000 +006-1,113,51,3,1 monster Maggot 1026,3,15000,75000 +006-1,86,46,14,2 monster Maggot 1026,3,15000,75000 +006-1,105,73,10,7 monster Maggot 1026,3,15000,75000 +006-1,73,102,4,6 monster Maggot 1026,4,15000,75000 +006-1,104,100,5,7 monster Maggot 1026,8,15000,75000 +006-1,82,72,12,8 monster Maggot 1026,8,15000,75000 +006-1,95,114,8,2 monster Maggot 1026,5,15000,75000 +006-1,57,119,9,1 monster Maggot 1026,4,15000,75000 +006-1,33,97,13,16 monster Piousse 1003,10,100000,30000 +006-1,58,49,1,1 monster Ratto 1005,3,100000,30000 +006-1,34,50,2,2 monster Crocotree 1010,2,40000,50000 +006-1,96,92,10,24 monster Crocotree 1010,2,40000,50000 +006-1,35,97,14,14 monster Piou 1002,20,100000,30000 +006-1,28,73,1,1 monster Ratto 1005,2,100000,30000 +006-1,33,59,1,1 monster Ratto 1005,2,100000,30000 +006-1,37,73,3,1 monster Crocotree 1010,1,100000,30000 +006-1,100,36,19,12 monster Crocotree 1010,2,40000,50000 diff --git a/npc/006-1/_warps.txt b/npc/006-1/_warps.txt new file mode 100644 index 00000000..b7c5897c --- /dev/null +++ b/npc/006-1/_warps.txt @@ -0,0 +1,32 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 006-1: Desert Mountains warps +006-1,40,26,0 warp #006-1_40_26 0,0,006-3,40,28 +006-1,60,58,0 warp #006-1_60_58 0,0,006-3,60,70 +006-1,62,30,0 warp #006-1_62_30 0,0,006-3,62,32 +006-1,55,27,0 warp #006-1_55_27 0,0,006-3,55,29 +006-1,77,44,0 warp #006-1_77_44 0,0,006-3,77,46 +006-1,86,24,0 warp #006-1_86_24 0,0,006-3,86,26 +006-1,91,24,0 warp #006-1_91_24 0,0,006-3,91,26 +006-1,98,46,0 warp #006-1_98_46 0,0,006-3,104,46 +006-1,114,22,0 warp #006-1_114_22 0,0,006-3,122,26 +006-1,114,49,0 warp #006-1_114_49 0,0,006-3,114,51 +006-1,102,53,0 warp #006-1_102_53 0,0,006-3,110,58 +006-1,117,57,0 warp #006-1_117_57 0,0,006-3,125,61 +006-1,92,63,0 warp #006-1_92_63 0,0,006-3,92,65 +006-1,112,74,0 warp #006-1_112_74 0,0,006-3,112,76 +006-1,111,110,0 warp #006-1_111_110 0,0,032-3,56,60 +006-1,83,117,0 warp #006-1_83_117 0,0,006-3,79,121 +006-1,38,121,0 warp #006-1_38_121 0,0,006-3,38,123 +006-1,74,90,0 warp #006-1_74_90 0,0,006-3,74,92 +006-1,51,90,0 warp #006-1_51_90 0,0,006-3,51,92 +006-1,30,123,0 warp #006-1_30_123 0,0,032-3,128,33 +006-1,33,85,0 warp #006-1_33_85 0,0,006-2,58,43 +006-1,23,85,0 warp #006-1_23_85 0,0,006-2,48,43 +006-1,23,100,0 warp #006-1_23_100 0,0,006-2,67,64 +006-1,21,108,0 warp #006-1_21_108 0,0,006-2,65,72 +006-1,37,26,0 warp #006-1_37_26 0,0,006-1,37,23 +006-1,37,24,0 warp #006-1_37_24 0,0,006-1,37,27 +006-1,55,46,0 warp #006-1_55_46 0,0,005-3,86,33 +006-1,20,48,0 warp #006-1_20_48 0,1,002-1,118,95 +006-1,51,68,0 warp #006-1_51_68 0,0,005-3,73,61 +006-1,64,77,0 warp #006-1_64_77 0,0,005-3,107,101 diff --git a/npc/006-1/mapflags.txt b/npc/006-1/mapflags.txt new file mode 100755 index 00000000..2747e250 --- /dev/null +++ b/npc/006-1/mapflags.txt @@ -0,0 +1 @@ +//006-1 mapflag resave 006-1,36,18 diff --git a/npc/006-1/mika.txt b/npc/006-1/mika.txt new file mode 100755 index 00000000..c1134b05 --- /dev/null +++ b/npc/006-1/mika.txt @@ -0,0 +1,8 @@ +006-1,39,22,0 script Mika NPC114,{ + mes "[Mika]"; + mes "\"My father told me about a man living in this desert who makes clothes out of snake skin.\""; + next; + mes "[Mika]"; + mes "\"Maybe you can find him, but be careful you don't get lost in the tunnels!\""; + close; +} diff --git a/npc/006-1/miriam.txt b/npc/006-1/miriam.txt new file mode 100755 index 00000000..a42253e6 --- /dev/null +++ b/npc/006-1/miriam.txt @@ -0,0 +1,318 @@ + +006-1,115,111,0 script Miriam NPC175,{ + @npc_distance = 2; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (getskilllv(SKILL_SPEED)) goto L_fast; + if (getequipid(equip_torso) < 0) goto L_Naked; + if (QUEST_MIRIAM == 0) goto L_Intro; + if (QUEST_MIRIAM == 1) goto L_Ask1; + if (QUEST_MIRIAM == 2) goto L_Ask2; + if (QUEST_MIRIAM == 3) goto L_Teach; + if (QUEST_MIRIAM == 4) goto L_testoffer; + if (QUEST_MIRIAM_run != 0) goto L_checktime; + if (QUEST_MIRIAM_start != 0) goto L_wasting; + if (QUEST_MIRIAM == 5) goto L_testoffer; + goto L_Intro; + +L_Intro: + mes "You see a woman sitting in the hot sand with eyes wide open... But she does not seem to be looking at something in particular..."; + next; + menu + "Ehr... Hi, my name is " +strcharinfo(0)+ ". Are you OK?",L_Next; + +L_Next: + mes "[Miriam]"; + mes "\"..."; + next; + menu + "Hello?",L_Continue; + +L_Continue: + mes "[Miriam]"; + mes "\"Yes, I am. Why? Do you think I am not OK? I am OK. You interrupted my meditation. Now I will need hours to calm down and stay quiet! Yes, yes, I know, I'm a fast talker!\""; + next; + mes "\"In fact, I am fast in everything I do! I can kill a Mountain Snake before it even starts to think about attacking me! Yes my friend, in a battle, speed is power!"; + next; + menu + "Wow! Very impressi...",L_More; + +L_More: + mes "[Miriam]"; + mes "\"Yes, yes, I know. But if there is one thing I am NOT good at, it is meditation! My master said I need to meditate, but... Ohh! So difficult to stay quiet! And when you FINALLY do, someone INTERRUPTS you, asking if you are 'OK'...\""; + next; + menu + "Oh, I am sorry! I didn't know you were meditating...",L_WallText; + +L_WallText: + mes "[Miriam]"; + mes "\"You are really sorry? Ok, but that is not enough... I need you to do something for me. As you can imagine, I will need a lot of time to concentrate and get back to the state I was when you interrupted me.\""; + next; + mes "\"But the problem is that I wasn't expecting to be here for so long, so I will need some food and something to drink.\""; + next; + mes "\"So, if you really want to prove that you are sorry, bring me 5 Concentration Potions and 10 Snake Tongues.\""; + next; + menu + "Ok, but those potions will not help with your mental concent...",L_MoreTalking, + "Sorry, but I can't help you right now.",L_canthelp; + +L_MoreTalking: + mes "[Miriam]"; + mes "\"ah, ah, ah... I know what I am doing! Now run and get what I asked.\""; + QUEST_MIRIAM = 2; + close; + +L_canthelp: + mes "[Miriam]"; + mes "\"Oh, really? So you better pray to not need my help in the future!\""; + QUEST_MIRIAM = 1; + close; + +L_canthelp2: + mes "[Miriam]"; + mes "\"...\""; + next; + mes "\"...\""; + next; + mes "\"Well, if you don't have time to help, at least don't make things difficult for me!\""; + close; + +L_Ask1: + mes "[Miriam]"; + mes "\"So, you are back... have you changed your mind about my request?\""; + next; + menu + "Yes, I will get what you want!",L_WillGetItems, + "No, I have no time right now.",L_canthelp2; + +L_WillGetItems: + QUEST_MIRIAM = 2; + mes "\"Good. So, run and get it!\""; + close; + +L_Ask2: + mes "[Miriam]"; + mes "\"Did you get what I asked for?\""; + next; + menu + "Yes, here it is!",L_Getitems, + "What was that again?", L_Ask3, + "No, not yet.",L_Hurry; + +L_Hurry: + mes "\"So please hurry up!\""; + close; + +L_Ask3: + mes "[Miriam]"; + mes "\"You have a small mind, haven't you? I am meditating here and I asked you to bring me stuff, so I can concentrate better.\""; + next; + mes "\"And stop asking such silly questions in the future.\""; + next; + mes "\"So, if you really want to help me now, bring me 5 Concentration Potions and 10 Snake Tongues.\""; + close; + +L_Getitems: + if (countitem("SnakeTongue") < 10 + || countitem("ConcentrationPotion") < 5) + goto L_NotEnough; + delitem "SnakeTongue", 10; + delitem "ConcentrationPotion", 5; + QUEST_MIRIAM = 3; + mes "[Miriam]"; + mes "\"Good job! Now I have enough food to stay in this desert for days!\""; + next; + mes "\"Now, since you helped me, maybe I can teach you a basic skill, but only if you prove yourself to be a fast runner! Come back and talk to me when you think you are prepared to learn.\""; + close; + +L_NotEnough: + mes "[Miriam]"; + mes "\"Hey, you don't have all that I asked. Come back when you have everything.\""; + close; + +L_Teach: + mes "[Miriam]"; + mes "\"Hmm... do you think you can learn the special Speed skill?\""; + next; + menu + "Yes, I am prepared...", L_Prepared, + "I am already fast.", L_Notfast; + +L_Prepared: + @torso$ = getitemlink(getequipid(equip_torso)); + @weight = MaxWeight/Weight; + if (@weight < 3) + goto L_heavyweight; + if (Agi < 60) + goto L_slow; + if (BaseLevel < 60) + goto L_LowLevel; + if (countitem("SteelShield") > 0 + || countitem("WarlordHelmet") > 0 + || countitem("CrusadeHelmet") > 0 + || countitem("WarlordPlate") > 0 + || countitem("KnightsHelmet") > 0 + || countitem("InfantryHelmet") > 0 + || countitem("ChainmailShirt") > 0 + || countitem("WarlordBoots") > 0 + || countitem("LightPlatemail") > 0 + || countitem("CandleHelmet") > 0) + goto L_heavymetal; + goto L_Offer; + +L_heavyweight: + mes "[Miriam]"; + mes "\"Wow... Why do you bring so many things with you? You must be carrying more than one third of your own weight! I won't teach you unless you get rid of some stuff... \""; + close; + +L_heavymetal: + mes "[Miriam]"; + mes "\"Hmm... I see... You want to be one of those lazy slow warriors... wasting all their strength carrying kilos of metal clothes... Why does no one see the great advantages of a beautiful, flexible, lightweight armor nowadays?\""; + next; + mes "\"Come back here when you get rid of this junk...\""; + close; + +L_slow: + mes "[Miriam]"; + mes "Oh, wait, wait... " +Agi+ " Agility? Are you serious? What do you do with all your Character points? Put them all to 'Strength'? Really... I don't even want to know... Come back here when you have a decent character points distribution!\""; + close; + +L_LowLevel: + mes "[Miriam]"; + mes "\"Come back here when you are old enough. I even wonder how you could get here so unexperienced as you are.\""; + close; + +L_Offer: + mes "[Miriam]"; + mes "\"Hmm! You look great in these clothes! They look very comfortable too... And it seems like you are not carrying too much weight.\""; + next; + if (!(getskilllv(SKILL_POOL))) + goto L_Noskill; + menu + "Yes, I look really good in this.",L_TorsoNext; + +L_TorsoNext: + mes "[Miriam]"; + mes "\"I see. I like the way you distributed your Character Points too... " +Agi+ " points to Agility! You really know how to prepare yourself for a good fight!\""; + next; + mes "\"Well... Even if you have a potential to be a good fighter, moving the way you do will not help. You need to be fast to avoid the monsters. \""; + next; + mes "\"So, if you pass a small test I can teach you a skill that will increase your walking speed! You will not be as fast as I am, but I am sure it will be useful.\""; + next; + menu + "I'm in! What kind of test is it?",L_test, + "I don't think I need more speed right now",L_GiveUp; + +L_test: + mes "[Miriam]"; + mes "\"Great! The test is simple. You need to run as fast as you can from the place where I am sitting to the mountains and talk to Pachua, the chief. When you get there and talk to Pachua, he will send a special smoke signal to me, so I can know how much time it took for you to get there.\""; + next; + mes "\"If you make it in a good time, I will teach you the special speeding skill. If not, you can always try again. So, are you ready?\""; + next; + menu + "Yes, let's do it!",L_LetsDoThis, + "No, I need to stretch my muscles first!",L_stretch; + +L_LetsDoThis: + close2; + message strcharinfo(0), "Miriam quickly grabs your arm and pull you to the place where she is sitting."; + // Warp the player to the place where the NPC is defined, so he can't cheat. + warp "032-1",55,21; + npctalk strnpcinfo(0), "Run " +strcharinfo(0)+ ", run!"; + QUEST_MIRIAM = 5; + QUEST_MIRIAM_start = gettimetick(2); + QUEST_MIRIAM_cheat = 0; + end; + +L_Naked: + mes "[Miriam]"; + mes "\"Hmmm?! Please put on some clothes before talking to me.\""; + close; + +L_Notfast: + mes "[Miriam]"; + mes "\"Hah! If you think so...\""; + close; + +L_Noskill: + mes "[Miriam]"; + mes "\"For a person like you, I could even teach a useful skill! Too bad you don't have the basic abillities to learn it...\""; + close; + +L_GiveUp: + mes "[Miriam]"; + mes "\"Oh, that is too bad... But if you change your mind, come back!\""; + QUEST_MIRIAM = 4; + close; + +L_testoffer: + mes "[Miriam]"; + mes "\"Are you ready for the test now?\""; + next; + menu + "Yes!",L_test, + "Not yet.",L_close; + +L_close: + close; + +L_warning: + mes "[Miriam]"; + mes "\"I know very well what you tried to do. I will not teach you the speed skill if you keep trying this kind of trick!\""; + next; + goto L_testoffer; + +L_stretch: + mes "[Miriam]"; + mes "\"Ok. Good idea... Stretching exercises can increase your flexibility and even prevent injuries!\""; + QUEST_MIRIAM = 4; + close; + +L_wasting: + mes "[Miriam]"; + mes "\"Don't waste your time talking to me! RUN and talk to Pachua!\""; + close; + +L_checktime: + if (QUEST_MIRIAM_cheat != 0) + goto L_warning; + if (QUEST_MIRIAM_run <= 210) + goto L_Goodjob; + goto L_tryagain; + +L_tryagain: + mes "[Miriam]"; + mes "\"You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. It is not enough.\""; + QUEST_MIRIAM_run = 0; + close; + +L_Goodjob: + mes "[Miriam]"; + mes "\"Great job! You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. Very impressive for a person like you.\""; + next; + mes "\"Now I need you to relax. Do NOT move. This teaching process can be painful sometimes.\""; + next; + mes "Miriam stares into your eyes and starts to scream some strange words very close to your ears."; + next; + mes "You feel dizzy and as soon as you move your head and look to the ground, Miriam pushes you hard, sending you meters away from her."; + close2; + warp "032-1",55,22; + // free all used player variables. This can be done, since there is a conditional on the speedskill at the beginning. + QUEST_MIRIAM_start = 0; + QUEST_MIRIAM_run = 0; + QUEST_MIRIAM = 0; + message strcharinfo(0), "[You gain 2500 experience points]"; + message strcharinfo(0), "[You learned Speed Skill]"; + addtoskill SKILL_SPEED, 1; + getexp 2500, 0; + set QUEST_MIRIAM_cheat, 0; // reset just in case it is still set. + close; + +L_fast: + mes "[Miriam]"; + mes "\"I hope you make a good use of your new skill... Take care!\""; + set QUEST_MIRIAM_cheat, 0; // reset just in case it is still set. + close; + +} diff --git a/npc/006-1/pachua.txt b/npc/006-1/pachua.txt new file mode 100755 index 00000000..4d3c2be1 --- /dev/null +++ b/npc/006-1/pachua.txt @@ -0,0 +1,240 @@ +006-1,24,113,0 script Pachua NPC143,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + @halloween_npc_id = $@halloween_npc_pachua; + callfunc "TrickOrTreat"; + + @LEATHER_PATCH_PRICE = 300; + @wants_leather_patch = QUEST_Forestbow_state & NIBBLE_4_MASK; + + if (QUEST_MIRIAM_cheat != 0) goto L_Warp2_cheat; + if (QUEST_MIRIAM_start != 0) goto L_smoke; + goto L_Begin; + +L_Begin: + mes "[Chief Pachua]"; + mes ""; + mes "\"How!\""; + next; + + if (getequipid(equip_head) == 643 || getequipid(equip_head) == 644) goto L_WearingCowboy; + if (getequipid(equip_legs) == 642) goto L_WearingChaps; + + mes "[Chief Pachua]"; + mes ""; + mes "\"For generations my tribe has been crafting special clothes out of different items.\""; + next; + goto L_Check_Shops; + +L_Check_Shops: + if((countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) && (countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1)) goto L_Super_store; + if(countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) goto L_Chaps_store; + if(countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1) goto L_Cowboy_store; + + mes "[Chief Pachua]"; + mes ""; + mes "\"Maybe if you bring me the right materials I can make something for you.\""; + next; + if (@wants_leather_patch) + menu + "Wait, can you make a leather patch for me?", L_leather_patch, + "OK, bye.", L_close; + goto L_close; + +S_CheckStuff: + mes "[Chief Pachua]"; + mes ""; + mes "\"Let me see what you have there.\""; + next; + return; + +L_Super_store: + callsub S_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"Ahh you have lots of good items to work with.\""; + mes ""; + mes "\"With them I can make you either"; + mes "a Cowboy hat or Snake Skin Chaps\""; + next; + if (@wants_leather_patch) + menu + "Cowboy hat, please.", L_BuyCowboy, + "Snake Skin Chaps sound good.", L_BuyChaps, + "Can you make a leather patch?", L_leather_patch, + "Not now, maybe later.", L_NoDeal; + menu + "Cowboy hat, please.", L_BuyCowboy, + "Snake Skin Chaps sound good.", L_BuyChaps, + "Not now, maybe later.", L_NoDeal; + +L_Cowboy_store: + callsub S_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"To make you a Cowboy hat I will need:"; + mes "1 Fancy hat"; + mes "2 Snake skins"; + mes "5.000 GP\""; + mes ""; + mes "\"Do we have a deal?\""; + next; + if (@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyCowboy, + "Can you make a leather patch?", L_leather_patch, + "On second thought, maybe later.", L_NoDeal; + menu + "Yes, that's fine.", L_BuyCowboy, + "On second thought, maybe later.", L_NoDeal; + +L_Chaps_store: + callsub S_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"To make you a pair of Snake Skin Chaps I will need:"; + mes "1 Jeans Shorts"; + mes "10 Snake skins"; + mes "10.000 GP\""; + mes ""; + mes "\"Do we have a deal?\""; + next; + if (!@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyChaps, + "On second thought, maybe later.", L_NoDeal; + menu + "Yes, that's fine.", L_BuyChaps, + "Can you make a leather patch?", L_leather_patch, + "On second thought, maybe later.", L_NoDeal; + +L_BuyChaps: + if (Zeny < 10000) goto L_NoMoney; + if (countitem("JeansShorts") < 1) goto L_NoJeans; + if (countitem("SnakeSkin") < 10) goto L_NoSkins; + Zeny = Zeny - 10000; + delitem "SnakeSkin", 10; + delitem "JeansShorts", 1; + getitem "JeansChaps", 1; + goto L_DealDone; + +L_BuyCowboy: + if (Zeny < 5000) goto L_NoMoney; + if (countitem("FancyHat") < 1) goto L_NoFancy; + if (countitem("SnakeSkin") < 2) goto L_NoSkins; + Zeny = Zeny - 5000; + delitem "SnakeSkin", 2; + delitem "FancyHat", 1; + @temp = rand(2); + if(@temp == 0) goto L_Cowboy_white; + goto L_Cowboy_black; + +L_Cowboy_white: + getitem "WhiteCowboyHat", 1; + goto L_DealDone; + +L_Cowboy_black: + getitem "BlackCowboyHat", 1; + goto L_DealDone; + +L_leather_patch: + mes "[Chief Pachua]"; + mes ""; + mes "\"If you just want a piece of leather, then yes, I can make that. Bring me a snake skin and " + @LEATHER_PATCH_PRICE + " GP.\""; + next; + menu + "Here you are.", L_Next, + "OK, I'll be back later.", L_close, + "That's too expensive!.", L_NoDeal; + +L_Next: + if (countitem("SnakeSkin") < 1) goto L_NoSkins; + if (Zeny < @LEATHER_PATCH_PRICE) goto L_NoMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SnakeSkin") > 1) goto L_TooMany; + + Zeny = Zeny - @LEATHER_PATCH_PRICE; + delitem "SnakeSkin", 1; + getitem "LeatherPatch", 1; + goto L_DealDone; + +L_DealDone: + mes "[Chief Pachua]"; + mes ""; + mes "\"Here you are!\""; + mes ""; + mes "\"Come back any time.\""; + goto L_close; + +L_NoDeal: + mes "[Chief Pachua]"; + mes ""; + mes "\"Alright, but you won't get a better deal anywhere else!\""; + goto L_close; + +L_NoMoney: + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough money.\""; + goto L_close; + +L_NoJeans: + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough jeans shorts.\""; + goto L_close; + +L_NoFancy: + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough fancy hats.\""; + goto L_close; + +L_NoSkins: + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough snake skins.\""; + goto L_close; + +L_WearingCowboy: + mes "[Chief Pachua]"; + mes ""; + mes "\"Ah, I see that you are wearing a hat made with the ancient methods of my tribe.\""; + next; + goto L_Check_Shops; + +L_WearingChaps: + mes "[Chief Pachua]"; + mes ""; + mes "\"Ah, I see that you are wearing pants made by my tribe.\""; + next; + goto L_Check_Shops; + +L_close: + @LEATHER_PATCH_PRICE = 0; + @wants_leather_patch = 0; + @month = 0; + @start_day = 0; + @end_day = 0; + @temp = 0; + close; + +L_TooMany: + mes "[Chief Pachua]"; + mes ""; + mes "\"You don't have room for a leather patch. Come back later.\""; + goto L_close; + +L_smoke: + message strcharinfo(0), "Pachua quickly inhales from his pipe and releases a ring of smoke towards the sky!"; + QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start; + QUEST_MIRIAM_start = 0; + end; + +L_Warp2_cheat: + if (@warp_cheat == 1) goto L_Begin; + message strcharinfo(0), "Pachua releases a ring of smoke towards the sky! But, by the look on his face, you can tell he is suspicious about your methods..."; + @warp_cheat = 1; + end; +} diff --git a/npc/006-1/spirit.txt b/npc/006-1/spirit.txt new file mode 100755 index 00000000..4bbcb14a --- /dev/null +++ b/npc/006-1/spirit.txt @@ -0,0 +1,292 @@ +function script EarthImpTouch { + if (getskilllv(SKILL_MAGIC)) goto L_message; + + mes "[Well]"; + mes "You hear noises from within the well."; + return; + +L_message: + @Q_MASK = NIBBLE_0_MASK; + @Q_SHIFT = NIBBLE_0_SHIFT; + @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC_NATURE; + @SUP_name$ = "Nature Magic"; + @Q_STATUS_INITIAL = 0; + @Q_STATUS_ONQUEST = 1; + @Q_STATUS_STUDENT0 = 2; + @Q_STATUS_STUDENT1 = 3; + @Q_STATUS_STUDENT2 = 4; + @Q_STATUS_STUDENT3 = 5; + + if (MAGIC_FLAGS & MFLAG_KNOWS_IMP) goto L_wb; + + mes "[Well]"; + mes "Something is inside that well, and now that you have turned your attention towards it, it seems to be talking to you!"; + next; + + mes "[Well]"; + mes "\"Hey! You there! Yes, I'm talking to you!\""; + mes "That strange voice seems to be coming from inside your head!"; + next; + menu + "Who, me?", L_Next, + "Leave me alone!", L_close, + "Aaah! I'm hearing voices!", L_silly_close; + +L_Next: + mes "[Well]"; + mes "\"I'm in here, in the well, talking to you! If I'm not very mistaken, you are a powerful wizard-to-be, except that nobody has showed you how to properly do magic yet!\""; + next; + menu + "Who are you?", L_Next1, + "Aaaah! The voices are after me!", L_silly_close, + "Whatever it is, I'm not interested.", L_close; + +L_Next1: + mes "[Earth Spirit]"; + mes "\"I'm an earth spirit; my name isn't important... all that matters is that I like you, and that I will help you become a powerful wizard if you help me. Just a fair deal, no more than that...\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_IMP; + goto L_Main; + +L_wb: + mes "[Earth Spirit]"; + mes "\"It's excellent to see you again!\""; + next; + goto L_Main; + +L_Main: + menu + "How did you get trapped?", L_Q_trapped, + "Can you teach me magic and spells?", L_Q_magic, + "What do you know about...", L_Q, + "Goodbye!", L_close; + +L_Q_trapped: + mes "[Earth Spirit]"; + mes "\"Oh, a wicked witch grew jealous of my power and locked me up in this well.\""; + next; + goto L_Main; + +L_Q: + mes "[Earth Spirit]"; + mes "\"Stop bothering me with your questions, will you? I'm trying to make you a powerful wizard, after all!\""; + next; + goto L_Main; + +L_Q_magic: + if (@Q_status == @Q_STATUS_ONQUEST) goto L_Q_magic_1; + if (@Q_status == @Q_STATUS_STUDENT0) goto L_Q_magic_2; + if (@Q_status == @Q_STATUS_STUDENT1) goto L_Q_magic_3; + if (@Q_status == @Q_STATUS_STUDENT2) goto L_Q_magic_4; + + mes "[Earth Spirit]"; + mes "\"Good, good... that's the right attitude! Yes, I can teach you magic, but first you must prove that you are worthy to be my student!\""; + next; + mes "[Earth Spirit]"; + mes "\"North-east of here sits and old, dead tree. Well, not completely dead, not yet, but almost. It's nothing special. Well, maybe a little, but not really. I want you to cut off one of its branches.\""; + next; + menu + "No way.", L_silly_close, + "Sure.", L_Q_tree_ok, + "Why that particular tree?", L_Next2; + +L_Next2: + mes "[Earth Spirit]"; + mes "\"Oh, you and your questions! Well, that tree was a druid once, so the branches contain a bit of its lifeforce. And that's useful.\""; + next; + menu + "Yuck.", L_silly_close, + "Sure, whatever.", L_Q_tree_ok, + "Isn't that like cutting off someone's arm?", L_Next3; + +L_Next3: + mes "[Earth Spirit]"; + mes "\"Oooh... now come on! Don't be so sentimental. He turned himself into a tree, he can hardly expect everyone to leave him alone.\""; + next; + mes "[Earth Spirit]"; + mes "\"Who knows if he can even feel anything anymore? I'm sure he can't, being wooden and all. Besides, it's only a measly tree. Not like I'm asking you to cut him down!.\""; + next; + menu + "No way.", L_silly_close, + "Alright, that makes sense.", L_Q_tree_ok; + +L_Q_tree_ok: + mes "[Earth Spirit]"; + mes "\"Good, good, good! Yes, that will be very good! So, come back when you have the branch. Oh, and bring 100,000 GP, too, as an enrollment fee.\""; + @Q_status = @Q_STATUS_ONQUEST; + callsub S_Update_Var; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_CUTTREE; + next; + goto L_Main; + +L_Q_magic_1: + mes "[Earth Spirit]"; + mes "\"Yes, yes, if you bring me the branch and the money, then I will!\""; + next; + menu + "Here are the branch and the money.", L_Next4, + "How much money did you want again?", L_Q_tree_howmuch, + "How can I cut it?", L_Q_tree_how, + "Where was the tree again?", L_Q_tree_where, + "What is that tree?", L_Q_tree_what; + +L_Next4: + if (countitem("DruidTreeBranch") < 1) goto L_Q_tree_none; + if (!(MAGIC_FLAGS & MFLAG_DID_CUTTREE)) goto L_Q_tree_dry; + if (Zeny < 100000) goto L_Q_tree_nomoney; + + Zeny = Zeny - 100000; + delitem "DruidTreeBranch", 1; + mes "[Earth Spirit]"; + mes "Following the earth sprite's instructions, you throw branch and GP into the well."; + next; + mes "[Earth Spirit]"; + mes "\"Well done, very well done! Consider yourself my student now.\""; + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + next; + @Q_status = @Q_STATUS_STUDENT0; + callsub S_Update_Var; + goto L_Main; + +L_Q_magic_finish: + mes "[1000 experience points]"; + @Q_status = @Q_status + 1; + callsub S_Update_Var; + getexp 1000,0; + next; + goto L_Main; + +L_Q_magic_2: + mes "[Earth Spirit]"; + mes "\"Yes, of course! For just 20,000 GP I will teach you your first spell!\""; + next; + menu + "Here you are.", L_Next5, + "No.", L_Main; + +L_Next5: + if (Zeny < 20000) goto L_No20k; + + Zeny = Zeny - 20000; + mes "[Earth Spirit]"; + mes "\"Kekeke... excellent! Yes, here goes your first spell, the flying backpack! If you are overloaded, it will take the load off your shoulders.\""; + next; + mes "[Earth Spirit]"; + mes "\"Take a cocoon, living or dead, and suffuse it in magic. Whisper '" + get(.invocation$, "flying-backpack") + "', and feel it float!\""; + goto L_Q_magic_finish; + +L_Q_magic_3: + mes "[Earth Spirit]"; + mes "\"But yes, yes! Only 20,000 GP, once again, and I will teach you a far more useful spell!\""; + next; + menu + "Here you are.", L_Next6, + "No.", L_Main; + +L_Next6: + if (Zeny < 20000) goto L_No20k; + Zeny = Zeny - 20000; + mes "[Earth Spirit]"; + mes "\"Yeees, good! This one is a protection spell, making your skin harder. You need a hard spike for it, though. Hold that spike in your hands, and focus on it.\""; + next; + mes "[Earth Spirit]"; + mes "\"Next, say '" + get(.invocation$, "protect") + "', and feel your skin grow rigid! Very useful against stings and stabs and pokes and pricks and that sort of stuff.\""; + goto L_Q_magic_finish; + +L_Q_magic_4: + mes "[Earth Spirit]"; + mes "\"Naah, you're too weak now! Come back later when you have grown!\""; + next; + goto L_Main; + +L_No20k: + mes "[Earth Spirit]"; + mes "\"You can't pay me 20,000 if you don't have that much!\""; + next; + goto L_Main; + +L_Q_tree_none: + mes "[Earth Spirit]"; + mes "\"Where is your branch?\""; + next; + goto L_Main; + +L_Q_tree_dry: + mes "[Earth Spirit]"; + mes "\"That won't do. This branch is completely dead; you'll have to get another.\""; + next; + goto L_Main; + +L_Q_tree_nomoney: + mes "[Earth Spirit]"; + mes "\"No, you don't have enough money! Come back when you have 100,000.\""; + next; + goto L_Main; + +L_Q_tree_howmuch: + mes "[Earth Spirit]"; + mes "\"It's only 100,000 GP to become my student.\""; + next; + goto L_Main; + +L_Q_tree_how: + mes "[Earth Spirit]"; + mes "\"Oh... right, the tree might be protected. Only a bone knife will cut that. No idea where you can find one, but I'm sure you will manage!\""; + next; + goto L_Main; + +L_Q_tree_where: + mes "[Earth Spirit]"; + mes "\"North-east of here.\""; + next; + goto L_Main; + +L_Q_tree_what: + mes "[Earth Spirit]"; + mes "\"Just some silly druid who turned himself into a tree; nothing important.\""; + next; + goto L_Main; + +L_silly_close: + if (MAGIC_FLAGS & MFLAG_KNOWS_IMP) + mes "[Earth Spirit]"; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) + mes "[Well]"; + mes "\"Fool.\""; + goto L_close; + +L_close: + @Q_MASK = 0; + @Q_SHIFT = 0; + @Q_status = 0; + @SUP_id = 0; + @SUP_name$ = ""; + @SUP_xp = 0; + @SUP_lvl = 0; + @Q_STATUS_INITIAL = 0; + @Q_STATUS_ONQUEST = 0; + @Q_STATUS_STUDENT0 = 0; + @Q_STATUS_STUDENT1 = 0; + @Q_STATUS_STUDENT2 = 0; + @Q_STATUS_STUDENT3 = 0; + return; + +S_Update_Var: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} + +006-1,63,79,0 script #EarthImp0#_M NPC400,{ + callfunc "EarthImpTouch"; + close; +} + +006-1,64,79,0 script #EarthImp1#_M NPC400,{ + callfunc "EarthImpTouch"; + close; +} diff --git a/npc/006-1/traveler.txt b/npc/006-1/traveler.txt new file mode 100755 index 00000000..a16b502a --- /dev/null +++ b/npc/006-1/traveler.txt @@ -0,0 +1,7 @@ + +006-1,25,95,0 script Rhutan the Traveler NPC103,{ + @npcname$ = "Rhutan"; + @NpcTravelBit = $@pachua_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/006-1/tree.txt b/npc/006-1/tree.txt new file mode 100755 index 00000000..6c961691 --- /dev/null +++ b/npc/006-1/tree.txt @@ -0,0 +1,159 @@ +function script QuestTreeTrigger { + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + @Q_status_lower = @Q_status & 3; + @Q_status = (@Q_status & 12) >> 2; + + if (@Q_status & @flag) goto L_close; // already did that + + if (@flag == 2) goto L_hug; + goto L_Cont; + +L_Cont: + @Q_status = @Q_status | @flag; + callsub S_Update_Var; + + if (@Q_status != 3) goto L_close; + + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) goto L_close; + + mes "Maybe it is just a trick of the light, but you can't help but think that the tree looks different... healthier, almost younger."; + mes "[20000 experience points]"; + getexp 20000, 0; + @value = 15; + callfunc "QuestSagathaHappy"; + goto L_close; + +L_hug: + mes "You hug the tree."; + next; + goto L_Cont; + +L_close: + @Q_MASK = 0; + @Q_SHIFT = 0; + @Q_status = 0; + @Q_status_lower = 0; + @Q_wr_status = 0; + @value = 0; + return; + +S_Update_Var: + @Q_wr_status = (@Q_status << 2) | @Q_status_lower; + QUEST_MAGIC = (QUEST_MAGIC & ~(@Q_MASK) | (@Q_wr_status << @Q_SHIFT)); + return; +} + +function script QuestTreeTouch { + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + @Q_status = (@Q_status & 12) >> 2; + + if (@Q_status == 3) goto L_Happy; + + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) == MFLAG_KNOWS_CUTTREE) goto L_cut; + + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) == MFLAG_KNOWS_DRUIDTREE) goto L_Water; + + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) > 0) //i.e., both are set + goto L_both; + + mes "[Dying Tree]"; + mes "You see a strange tree."; + goto L_close; + +L_cut: + mes "[Dying Tree]"; + mes "This must be the tree that the earth spirit was referring to."; + next; + menu + "Cut off a branch", L_do_cut, + "Leave it alone", L_close; + +L_Water: + mes "[Dying Tree]"; + mes "This must be the druid tree."; + next; + menu + "Water the tree", L_Givewater, + "Kiss tree", L_kiss, + "Leave it alone", L_close; + +L_both: + mes "[Dying Tree]"; + mes "This must be the druid tree that Wyara and the earth spirit were talking about."; + next; + menu + "Water the tree", L_Givewater, + "Kiss tree", L_kiss, + "Cut off a branch", L_do_cut, + "Leave it alone", L_close; + +L_Givewater: + if (countitem("BottleOfWater") < 1) goto L_No_Water; + delitem "BottleOfWater", 1; + getitem "EmptyBottle", 1; + + mes "[Dying Tree]"; + mes "You pour a bottle of water into the sand. The water dissipates quickly, without any effect."; + goto L_close; + +L_No_Water: + mes "[Dying Tree]"; + mes "You don't have any water."; + goto L_close; + +L_kiss: + mes "[Dying Tree]"; + mes "You pluck out a splinter from your lip."; + mes "Somehow, you don't think that this helped."; + goto L_close; + +L_do_cut: + if (countitem("BoneKnife") < 1) goto L_No_boneknife; + + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) goto L_really_cut; + + mes "[Dying Tree]"; + mes "You find a suitable branch and put your bone knife in position."; + mes "Holding the branch, you have an uneasy feeling – as if something inside the tree were trying to resist you..."; + mes "Do you want to continue cutting?"; + next; + menu + "Nah... better not.", L_close, + "Yes, let's cut!", L_really_cut; + +L_really_cut: + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_DID_CUTTREE; + getitem "DruidTreeBranch", 1; + mes "[Dying Tree]"; + mes "You cut off a branch from the tree."; + mes "For an instant, you have an uneasy feeling, as if the branch were writhing in your hand..."; + goto L_close; + +L_No_boneknife: + mes "[Dying Tree]"; + mes "Try as you might, you can't seem to find a way to cut off a branch. Perhaps you need a different tool for cutting?"; + goto L_close; + +L_Happy: + mes "[Druid Tree]"; + mes "The tree looks younger and healthier now."; + goto L_close; + +L_close: + @Q_MASK = 0; + @Q_SHIFT = 0; + @Q_status = 0; + return; + +} + +006-1,82,59,0 script #DruidTree0#_M NPC400,{ + callfunc "QuestTreeTouch"; + close; +} diff --git a/npc/006-2/_import.txt b/npc/006-2/_import.txt new file mode 100644 index 00000000..24095263 --- /dev/null +++ b/npc/006-2/_import.txt @@ -0,0 +1,6 @@ +// Map 006-2: Pachua's Village +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/006-2/_warps.txt", +"npc/006-2/mapflags.txt", +"npc/006-2/npcs.txt", +"npc/006-2/shops.txt", diff --git a/npc/006-2/_warps.txt b/npc/006-2/_warps.txt new file mode 100644 index 00000000..b5ddad73 --- /dev/null +++ b/npc/006-2/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 006-2: Pachua's Village warps +006-2,67,65,0 warp #006-2_67_65 0,0,006-1,23,101 +006-2,65,73,0 warp #006-2_65_73 0,0,006-1,21,109 +006-2,48,44,0 warp #006-2_48_44 0,0,006-1,23,86 +006-2,58,44,0 warp #006-2_58_44 0,0,006-1,33,86 diff --git a/npc/006-2/mapflags.txt b/npc/006-2/mapflags.txt new file mode 100755 index 00000000..b5d8a508 --- /dev/null +++ b/npc/006-2/mapflags.txt @@ -0,0 +1 @@ +//006-2 mapflag resave 006-1,36,18 diff --git a/npc/006-2/npcs.txt b/npc/006-2/npcs.txt new file mode 100755 index 00000000..14d6d6e2 --- /dev/null +++ b/npc/006-2/npcs.txt @@ -0,0 +1,99 @@ + +006-2,49,25,0 script Falkurn NPC178,{ + @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT); + if ((@run == 1) && (QL_KYLIAN == 13)) + goto L_Deliver; + goto L_Start; + +L_Deliver: + menu + "I have a delivery for you", L_Delivery; + +L_Delivery: + mes "[Falkurn]"; + mes "\"Good now we can get to work on making some more leather goods.\""; + QL_KYLIAN = 14; + goto L_close; + +L_Start: + mes "[Falkurn]"; + mes "\"Greetings traveler, what wind brings you to our door?\""; + menu + "I'm looking for exotic goods.", L_Shops, + "I need some leatherwork done.", L_Pachua, + "Just Looking Around.", L_close; + +L_Shops: + mes "\"My Wife, Ardra, tends the Kitchen see her for food and drink.\""; + mes "\"She can be found in the West Cave.\""; + next; + mes "\"Reathe trades many of our leather goods to exotic lands.\""; + mes "\"She always has the most interesting finds.\""; + mes "\"She can be found in the East Cave.\""; + goto L_close; + +L_Pachua: + mes "\"Our Chief can be found by going through the southern most cave.\""; + mes "\"He can help you with any leatherwork you may need done.\""; + goto L_close; + +L_close: + close; +} + +006-2,80,25,0 script Darug NPC178,{ + mes "[Darug]"; + mes "\"We are the all thats left of the natives that used to wander the plains.\""; + mes "\"Years of war between the various 'Civilized' nations drained the natural resources.\""; + next; + mes "\"The waters have begun to run dry.\""; + mes "\"All manner of beasts are getting more agressive.\""; + mes "\"The Mana has been poison by Dark Magic.\""; + next; + mes "\"Even now, I sense a evil presense nearby.\""; + mes "\"I can feel it lying deep underground.\""; + mes "\"Gnawing at the underbelly of Tonori.\""; + next; + mes "\"We believe it's one of the evils Nu'rem let loose to destroy The Mana\""; + mes "\"We have been searching, but have not been able to locate the source.\""; + mes "\"Maybe our scouts will return soon with the answers.\""; + close; +} + +006-2,34,64,0 script Meluna NPC179,{ + mes "[Meluna]"; + mes "\"Greetings traveler, how blows the wind?\""; + goto L_Main; + +L_Main: + menu + "Um... What?", L_Explain, + "Gentle.", L_Heal, + "Strong.", L_close; + +L_Explain: + mes "\"Ahh sorry, you are not familiar with our customs.\""; + mes "\"The Mana was made into the 4 main elements by The Gods; Jande made Fire, Nu'rem made Earth, Tal made Air, and, Di'tal made Water.\""; + mes "\"It was Tal that gives us our first and last breathe.\""; + next; + mes "\"When we ask you how 'blows the wind?'\""; + mes "\"We mean how are your feeling?\""; + next; + mes "\"We typically respond with a strength of wind; normally Gentle or Strong\""; + goto L_Main; + +L_Heal: + if (BaseLevel > 70) + goto L_NoHeal; + heal 1000,100; + goto L_close; + +L_NoHeal: + mes "\"I already sense the power of the Gods carrying you.\""; + mes "\"Any wounds you have are beyond my power to fix.\""; + goto L_close; + +L_close: + mes "\"May Tal carry you on their back.\""; + close; +} diff --git a/npc/006-2/shops.txt b/npc/006-2/shops.txt new file mode 100755 index 00000000..d7a4766b --- /dev/null +++ b/npc/006-2/shops.txt @@ -0,0 +1,3 @@ +006-2,81,36,0 shop Reathe NPC179,1215:125,654:2500,721:25000,722:15000 + +006-2,30,35,0 shop Ardra NPC179,501:25,502:35,541:100,533:55 diff --git a/npc/006-3/_import.txt b/npc/006-3/_import.txt new file mode 100644 index 00000000..1e626359 --- /dev/null +++ b/npc/006-3/_import.txt @@ -0,0 +1,5 @@ +// Map 006-3: Desert Mountain Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/006-3/_mobs.txt", +"npc/006-3/_warps.txt", +"npc/006-3/mapflags.txt", diff --git a/npc/006-3/_mobs.txt b/npc/006-3/_mobs.txt new file mode 100644 index 00000000..9b122a9e --- /dev/null +++ b/npc/006-3/_mobs.txt @@ -0,0 +1,28 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 006-3: Desert Mountain Cave mobs +006-3,108,25,18,4 monster Maggot 1026,3,15000,90000 +006-3,99,50,7,6 monster Maggot 1026,1,15000,90000 +006-3,89,63,7,5 monster Maggot 1026,2,15000,90000 +006-3,86,90,14,4 monster Maggot 1026,3,15000,90000 +006-3,109,78,6,4 monster Maggot 1026,1,15000,90000 +006-3,119,117,7,7 monster Maggot 1026,4,15000,90000 +006-3,106,64,7,8 monster Maggot 1026,3,15000,90000 +006-3,65,71,15,17 monster Maggot 1026,10,15000,90000 +006-3,57,105,13,15 monster Maggot 1026,8,15000,90000 +006-3,73,120,8,2 monster Maggot 1026,3,15000,90000 +006-3,117,54,5,4 monster Maggot 1026,4,15000,90000 +006-3,123,62,5,2 monster Maggot 1026,3,15000,90000 +006-3,72,36,12,12 monster Maggot 1026,10,15000,90000 +006-3,84,27,2,3 monster Maggot 1026,1,15000,90000 +006-3,40,40,18,14 monster Maggot 1026,8,15000,90000 +006-3,34,60,13,5 monster Maggot 1026,3,15000,90000 +006-3,87,74,13,4 monster Blub 1008,3,15000,10000 +006-3,120,76,4,10 monster Blub 1008,3,15000,10000 +006-3,101,85,7,4 monster Blub 1008,4,15000,10000 +006-3,44,124,14,3 monster Maggot 1026,5,15000,90000 +006-3,90,125,8,3 monster Maggot 1026,5,15000,90000 +006-3,30,88,6,10 monster Blub 1008,3,90000,30000 +006-3,122,98,5,8 monster Frostiana 1012,3,90000,30000 +006-3,112,104,3,6 monster Frostiana 1012,1,90000,30000 +006-3,103,108,4,4 monster Frostiana 1012,1,90000,30000 +006-3,83,107,6,7 monster Little Blub 1007,6,90000,30000 diff --git a/npc/006-3/_warps.txt b/npc/006-3/_warps.txt new file mode 100644 index 00000000..addd9a57 --- /dev/null +++ b/npc/006-3/_warps.txt @@ -0,0 +1,22 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 006-3: Desert Mountain Cave warps +006-3,40,26,0 warp #006-3_40_26 0,0,006-1,40,28 +006-3,55,27,0 warp #006-3_55_27 0,0,006-1,55,29 +006-3,62,30,0 warp #006-3_62_30 0,0,006-1,62,32 +006-3,86,24,0 warp #006-3_86_24 0,0,006-1,86,26 +006-3,91,24,0 warp #006-3_91_24 0,0,006-1,91,26 +006-3,122,24,0 warp #006-3_122_24 0,0,006-1,114,24 +006-3,114,49,0 warp #006-3_114_49 0,0,006-1,114,51 +006-3,104,44,0 warp #006-3_104_44 0,0,006-1,98,48 +006-3,77,44,0 warp #006-3_77_44 0,0,006-1,77,46 +006-3,60,68,0 warp #006-3_60_68 0,0,006-1,60,60 +006-3,92,63,0 warp #006-3_92_63 0,0,006-1,92,65 +006-3,112,74,0 warp #006-3_112_74 0,0,006-1,112,76 +006-3,110,56,0 warp #006-3_110_56 0,0,006-1,102,55 +006-3,125,59,0 warp #006-3_125_59 0,0,006-1,117,59 +006-3,74,90,0 warp #006-3_74_90 0,0,006-1,74,92 +006-3,51,90,0 warp #006-3_51_90 0,0,006-1,51,92 +006-3,38,121,0 warp #006-3_38_121 0,0,006-1,38,123 +006-3,79,120,0 warp #006-3_79_120 0,0,006-1,83,119 +006-3,125,66,0 warp #006-3_125_66 0,0,005-3,85,52 +006-3,89,46,0 warp #006-3_89_46 0,0,005-3,63,49 diff --git a/npc/006-3/mapflags.txt b/npc/006-3/mapflags.txt new file mode 100755 index 00000000..3aeee40c --- /dev/null +++ b/npc/006-3/mapflags.txt @@ -0,0 +1 @@ +//006-3 mapflag resave 006-1,36,18 diff --git a/npc/007-1/_import.txt b/npc/007-1/_import.txt new file mode 100644 index 00000000..67c56716 --- /dev/null +++ b/npc/007-1/_import.txt @@ -0,0 +1,6 @@ +// Map 007-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/007-1/_mobs.txt", +"npc/007-1/_warps.txt", +"npc/007-1/mapflags.txt", +"npc/007-1/voltain.txt", diff --git a/npc/007-1/_mobs.txt b/npc/007-1/_mobs.txt new file mode 100644 index 00000000..8fd1da2c --- /dev/null +++ b/npc/007-1/_mobs.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 007-1: Woodland mobs +007-1,0,0,0,0 monster CroconutMob 1014,17,100000,30000 +007-1,0,0,0,0 monster PumpkinMob 1019,15,100000,30000 +007-1,0,0,0,0 monster Squirrel 1041,25,100000,30000 +007-1,0,0,0,0 monster Bee 1029,3,270000,180000 +007-1,0,0,0,0 monster Log Head 1031,1,2700000,1800000 +007-1,0,0,0,0 monster Mana Bug 1035,2,60000,30000 +007-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +007-1,0,0,0,0 monster Gamboge Plant 1038,25,30,20 +007-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 diff --git a/npc/007-1/_warps.txt b/npc/007-1/_warps.txt new file mode 100644 index 00000000..c26e980a --- /dev/null +++ b/npc/007-1/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 007-1: Woodland warps +007-1,20,54,0 warp #007-1_20_54 0,1,010-1,130,53 +007-1,69,21,0 warp #007-1_69_21 3,0,008-1,78,101 +007-1,122,20,0 warp #007-1_122_20 2,0,008-1,132,98 +007-1,73,76,0 warp #007-1_73_76 0,0,007-2,34,34 diff --git a/npc/007-1/mapflags.txt b/npc/007-1/mapflags.txt new file mode 100755 index 00000000..666d518b --- /dev/null +++ b/npc/007-1/mapflags.txt @@ -0,0 +1 @@ +//007-1 mapflag resave 009-2,149,43 diff --git a/npc/007-1/voltain.txt b/npc/007-1/voltain.txt new file mode 100755 index 00000000..6cedb1d6 --- /dev/null +++ b/npc/007-1/voltain.txt @@ -0,0 +1,377 @@ + +007-1,37,21,0 script Voltain NPC103,{ + @BOTTLE_NEEDED = 3; + @BOTTLE_REWARD_XP = 100; + @BOTTLE_REWARD_GOLD = 450; + + @BLACK_SC_ST_NEEDED = 5; + @BLACK_SC_ST_REWARD_XP = 500; + @BLACK_SC_ST_REWARD_GOLD = 250; + + @BUGLEG_NEEDED = 10; + @BUGLEG_REWARD_XP = 200; + @BUGLEG_REWARD_GOLD = 150; + + @HERBS_NEEDED = 7; + @HERBS_REWARD_XP = 200; + @HERBS_REWARD_GOLD = 250; + + @RAWLOG_NEEDED = 5; + @RAWLOG_REWARD_XP = 330; + @RAWLOG_REWARD_GOLD = 300; + + @REDAPPLE_NEEDED = 7; + @REDAPPLE_REWARD_XP = 330; + @REDAPPLE_REWARD_GOLD = 300; + + @STEAK_NEEDED = 2; + @STEAK_REWARD_XP = 330; + @STEAK_REWARD_GOLD = 280; + + @ARROW_NEEDED = 25; + @ARROW_REWARD_XP = 330; + @ARROW_REWARD_GOLD = 100; + + @SNAKETONGUE_NEEDED = 3; + @SNAKETONGUE_REWARD_XP = 330; + @SNAKETONGUE_REWARD_GOLD = 100; + + @CHOCOLATECAKE_NEEDED = 3; + @CHOCOLATECAKE_REWARD_XP = 330; + @CHOCOLATECAKE_REWARD_GOLD = 180; + + if ($@VOLTAIN_state == 1) goto L_state1; + if ($@VOLTAIN_state == 2) goto L_state2; + if ($@VOLTAIN_state == 3) goto L_state3; + if ($@VOLTAIN_state == 4) goto L_state4; + if ($@VOLTAIN_state == 5) goto L_state5; + if ($@VOLTAIN_state == 6) goto L_state6; + if ($@VOLTAIN_state == 7) goto L_state7; + if ($@VOLTAIN_state == 8) goto L_state8; + if ($@VOLTAIN_state == 9) goto L_state9; + if ($@VOLTAIN_state == 10) goto L_state10; + if ($@VOLTAIN_state == 11) goto L_state11; + if ($@VOLTAIN_state == 12) goto L_state12; + if ($@VOLTAIN_state == 13) goto L_state13; + goto L_state0; + +L_state0: + mes "[Voltain]"; + mes "\"What are you doing bothering me? Can't you see I'm busy! Oh, I'm sorry, I thought you were my assistant. Never mind that... would you care to help me?\""; + next; + menu + "Sure I do!", L_Next, + "No, you creep me out.", L_NoHelp; + +L_Next: + mes "[Voltain]"; + mes "\"I'm working on a very special potion. I need some empty bottles to keep the ingredients in. Care to go find me " + @BOTTLE_NEEDED + " empty bottles?!\""; + next; + menu + "I've got the bottles.", L_Next1, + "I don't feel like helping you get garbage...", L_close; + +L_Next1: + if (countitem("EmptyBottle") < @BOTTLE_NEEDED) + goto L_No_Water; + delitem "EmptyBottle", @BOTTLE_NEEDED; + Zeny = Zeny + @BOTTLE_REWARD_GOLD; + getexp @BOTTLE_REWARD_XP, 0; + $@VOLTAIN_state = 1; + mes "\"Thanks for the bottles. Much easier to carry liquid in them.\""; + goto L_close; + +L_state1: + mes "[Voltain]"; + mes "\"I'm making a potion that requires lots of venom. I'm in need of " + @BLACK_SC_ST_NEEDED + " black scorpion stingers.\""; + next; + + menu + "I've got the stingers!", L_Next2, + "I'll go search for them.", L_close; + +L_Next2: + mes "[Voltain]"; + if (countitem("BlackScorpionStinger") < @BLACK_SC_ST_NEEDED) + goto L_No_Water; + delitem "BlackScorpionStinger", @BLACK_SC_ST_NEEDED; + Zeny = Zeny + @BLACK_SC_ST_REWARD_GOLD; + getexp @BLACK_SC_ST_REWARD_XP, 0; + $@VOLTAIN_state = 2; + mes "\"Well, since you went to the trouble of getting me these here's a little something for your time...\""; + goto L_close; + +L_state2: + mes "[Voltain]"; + mes "\"Care to to help me with my potion? I need " + @BUGLEG_NEEDED + " bug legs so that I can thicken the potion.\""; + next; + menu + "I've got the bug legs.", L_Next3, + "I'd rather not carry around dead bugs for you.", L_NoHelp ; + +L_Next3: + mes "[Voltain]"; + if (countitem("BugLeg") < @BUGLEG_NEEDED) + goto L_No_Water; + delitem "BugLeg", @BUGLEG_NEEDED; + Zeny = Zeny + @BUGLEG_REWARD_GOLD; + getexp @BUGLEG_REWARD_XP, 0; + $@VOLTAIN_state = 3; + mes "\"Great! My potion is ready to poison the moub...I mean cure scorpion stings. \""; + goto L_close; + +L_state3: + mes "[Voltain]"; + mes "\"I find myself in need of a black scorpion stinger... Damn mouboo are hard to kill...forget you heard that.\""; + next; + menu + "Here's the stinger.", L_Next4, + "I DID HEAR THAT! I will not help you KILL mouboo!", L_close; + +L_Next4: + mes "[Voltain]"; + if (countitem("BlackScorpionStinger") < 1) + goto L_No_Water; + delitem "BlackScorpionStinger", 1; + getexp @BLACK_SC_ST_REWARD_XP, 0; + $@VOLTAIN_state = 4; + mes "\"Great! Now I can really kill that monster!\""; + goto L_close; + +L_state4: + mes "[Voltain]"; + mes "\"I need to thicken a veno.. Oh, a potion actually. I want to try mauve herbs for that, so can you bring me " + @HERBS_NEEDED + ", please?\""; + next; + menu + "Here are the herbs.", L_Next5, + "So you want to do a venom? I will not help you!", L_close; + +L_Next5: + mes "[Voltain]"; + if (countitem("MauveHerb") < @HERBS_NEEDED) + goto L_No_Water; + delitem "MauveHerb", @HERBS_NEEDED; + getexp @HERBS_REWARD_XP, 0; + Zeny = Zeny + @HERBS_REWARD_GOLD; + $@VOLTAIN_state = 5; + mes "\"Great! Now I can thicken the potion! I will try directly.\""; + goto L_close; + +L_state5: + mes "[Voltain]"; + mes "\"Hello I am looking for " + @RAWLOG_NEEDED + " raw logs, maybe you could help me getting some? I want to try to build a mouboo trap.. Uhm actually no! I want to build a device to destroy these traps. So can you help me?\""; + next; + menu + "Here are the raw logs.", L_Next6, + "So you want build traps for mouboos? NO WAY!", L_close; + +L_Next6: + mes "[Voltain]"; + if (countitem("RawLog") < @RAWLOG_NEEDED) + goto L_No_Water; + delitem "RawLog", @RAWLOG_NEEDED; + getexp @RAWLOG_REWARD_XP, 0; + Zeny = Zeny + @RAWLOG_REWARD_GOLD; + $@VOLTAIN_state = 6; + mes "\"Great! Now I can thicken the potion! I will try directly.\""; + goto L_close; + +L_state6: + mes "[Voltain]"; + mes "\"Hello I am looking for " + @REDAPPLE_NEEDED + " red apples, maybe I can inject some venoms.. DOH not this again! Of course I meant a strength potion. Did you hear about the new potions from Caul? He is a pretty good alchimist. He can do strength potions, can't he?\""; + next; + menu + "Here are the red apples.", L_Next7, + "I am not sure...", L_close; + +L_Next7: + mes "[Voltain]"; + if (countitem("RedApple") < @REDAPPLE_NEEDED) + goto L_No_Water; + delitem "RedApple", @REDAPPLE_NEEDED; + getexp @REDAPPLE_REWARD_XP, 0; + Zeny = Zeny + @REDAPPLE_REWARD_GOLD; + $@VOLTAIN_state = 7; + mes "\"Very well, this will be useful.\""; + goto L_close; + +L_state7: + mes "[Voltain]"; + mes "\"I need to thicken a veno.. Oh, a potion actually. Cobalt herbs might be good for that, so can you bring me " + @HERBS_NEEDED + ", please?\""; + next; + menu + "Here are the herbs.", L_Next8, + "So you want to do a venom? I will not help you!", L_close; + +L_Next8: + mes "[Voltain]"; + if (countitem("CobaltHerb") < @HERBS_NEEDED) + goto L_No_Water; + delitem "CobaltHerb", @HERBS_NEEDED; + getexp @HERBS_REWARD_XP, 0; + Zeny = Zeny + @HERBS_REWARD_GOLD; + $@VOLTAIN_state = 8; + mes "\"Great! Now I can go on with the ven- the experiments for the welfare of humanity, I mean.\""; + goto L_close; + +L_state8: + mes "[Voltain]"; + mes "\"I am in need of snake tongues. They can help me getting very strong venom extracts. So I would like you to bring me " + @SNAKETONGUE_NEEDED + " snake tongues.\""; + next; + menu + "Sure, here you go!", L_Next9, + "Maybe you will find someone else, I got stuff to do on my own!", L_close; + +L_Next9: + mes "[Voltain]"; + if (countitem("SnakeTongue") < @SNAKETONGUE_NEEDED) + goto L_No_Water; + delitem "SnakeTongue", @SNAKETONGUE_NEEDED; + getexp @SNAKETONGUE_REWARD_XP, 0; + Zeny = Zeny + @SNAKETONGUE_REWARD_GOLD; + $@VOLTAIN_state = 9; + mes "\"Excellent, now I can extract the venom to- uhm, nevermind. Thanks for your help.\""; + goto L_close; + +L_state9: + mes "[Voltain]"; + mes "\"I need to thicken a veno.. Oh, a potion actually. I want to try alizarin herbs for that, so can you bring me " + @HERBS_NEEDED + ", please?\""; + next; + menu + "Here are the herbs.", L_Next10, + "So you want to do a venom? I will not help you!", L_close; + +L_Next10: + mes "[Voltain]"; + if (countitem("AlizarinHerb") < @HERBS_NEEDED) + goto L_No_Water; + delitem "AlizarinHerb", @HERBS_NEEDED; + getexp @HERBS_REWARD_XP, 0; + Zeny = Zeny + @HERBS_REWARD_GOLD; + $@VOLTAIN_state = 10; + mes "\"Great! Now I can thicken the potion! I will try directly.\""; + goto L_close; + +L_state10: + mes "[Voltain]"; + mes "\"Oh I am hungry. Maybe I can eat some steaks. Could you bring me a steak, please?\""; + next; + mes "\"Oh, I just wonder if I can inject some ven... Forget about that! Bring me " + @STEAK_NEEDED + " steaks!\""; + next; + menu + "Here you go.", L_Next11, + "Help yourself! In the Hurnscald Inn you can get some meals for sure!", L_close; + +L_Next11: + mes "[Voltain]"; + if (countitem("Steak") < @STEAK_NEEDED) + goto L_No_Water; + delitem "Steak", @STEAK_NEEDED; + getexp @STEAK_REWARD_XP, 0; + Zeny = Zeny + @STEAK_REWARD_GOLD; + $@VOLTAIN_state = 11; + mes "\"Thanks a lot. I will really enjoy my meal.\""; + goto L_close; + +L_state11: + mes "[Voltain]"; + mes "\"Could I have some arrows please? I have lost my hunting equipment when I was in the caves. Some dark creatures were chasing me!\""; + next; + mes "\"Acually I wonder if I can use these arrows for building a mouboo trap.... Oh wait! I need some " + @ARROW_NEEDED + " arrows for my self defence right? So do not talk about it!\""; + menu + "Here you go.", L_Next12, + "Sorry I don't have arrows here!", L_close; + +L_Next12: + mes "[Voltain]"; + if (countitem("Arrow") < @ARROW_NEEDED) + goto L_No_Water; + delitem "Arrow", @ARROW_NEEDED; + getexp @ARROW_REWARD_XP, 0; + Zeny = Zeny + @ARROW_REWARD_GOLD; + $@VOLTAIN_state = 12; + mes "\"Thanks a lot. Now I feel more secure here in the outdoors.\""; + goto L_close; + +L_state12: + mes "[Voltain]"; + mes "\"I need to thicken a veno.. Oh, a potion actually. I want to try gamboge herbs for that, so can you bring me " + @HERBS_NEEDED + ", please?\""; + next; + menu + "Here are the herbs.", L_Next13, + "So you want to do a venom? I will not help you!", L_close; + +L_Next13: + mes "[Voltain]"; + if (countitem("GambogeHerb") < @HERBS_NEEDED) + goto L_No_Water; + delitem "GambogeHerb", @HERBS_NEEDED; + getexp @HERBS_REWARD_XP, 0; + Zeny = Zeny + @HERBS_REWARD_GOLD; + $@VOLTAIN_state = 13; + mes "\"Great! Now I can thicken the potion! I will try directly.\""; + goto L_close; + +L_state13: + mes "[Voltain]"; + mes "\"Doing so many ev- good things makes me hungry. I feel in the mood for a Chocolate Cake. Can you bring me " + @CHOCOLATECAKE_NEEDED + ", please? \""; + next; + menu + "Here it is.", L_Next14, + "I don't feel in the mood to bring you a cake.", L_close; + +L_Next14: + mes "[Voltain]"; + if (countitem("ChocolateCake") < @CHOCOLATECAKE_NEEDED) + goto L_No_Water; + delitem "ChocolateCake", @CHOCOLATECAKE_NEEDED; + getexp @CHOCOLATECAKE_REWARD_XP, 0; + Zeny = Zeny + @CHOCOLATECAKE_REWARD_GOLD; + $@VOLTAIN_state = 0; + mes "\"I love chocolate cakes. I wonder, if I can use my ven- \""; + emotion EMOTE_EVIL, strcharinfo(0); + goto L_close; + +L_NoHelp: + mes "\"If you don't want to help me, then away with you. Bothering me won't help me get my work done.\""; + mes "Voltain then mumbles something under his breath that you cannot quite make out"; + mes "\"... These damn kids. \""; + goto L_close; + +L_close: + @BOTTLE_NEEDED = 0; + @BOTTLE_REWARD_XP = 0; + @BOTTLE_REWARD_GOLD = 0; + @BLACK_SC_ST_NEEDED = 0; + @BLACK_SC_ST_REWARD_XP = 0; + @BLACK_SC_ST_REWARD_GOLD = 0; + @BUGLEG_NEEDED = 0; + @BUGLEG_REWARD_XP = 0; + @BUGLEG_REWARD_GOLD = 0; + @HERBS_NEEDED = 0; + @HERBS_REWARD_XP = 0; + @HERBS_REWARD_GOLD = 0; + @RAWLOG_NEEDED = 0; + @RAWLOG_REWARD_XP = 0; + @RAWLOG_REWARD_GOLD = 0; + @REDAPPLE_NEEDED = 0; + @REDAPPLE_REWARD_XP = 0; + @REDAPPLE_REWARD_GOLD = 0; + @STEAK_NEEDED = 0; + @STEAK_REWARD_XP = 0; + @STEAK_REWARD_GOLD = 0; + @ARROW_NEEDED = 0; + @ARROW_REWARD_XP = 0; + @ARROW_REWARD_GOLD = 0; + @SNAKETONGUE_NEEDED = 0; + @SNAKETONGUE_REWARD_XP = 0; + @SNAKETONGUE_REWARD_GOLD = 0; + @CHOCOLATECAKE_NEEDED = 0; + @CHOCOLATECAKE_REWARD_XP = 0; + @CHOCOLATECAKE_REWARD_GOLD = 0; + close; + +L_No_Water: + mes "\"Can't you count!? I need more. \""; + goto L_close; +} diff --git a/npc/007-2/_import.txt b/npc/007-2/_import.txt new file mode 100644 index 00000000..ec867053 --- /dev/null +++ b/npc/007-2/_import.txt @@ -0,0 +1,4 @@ +// Map 007-2: Illia forsaken inn +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/007-2/_warps.txt", +"npc/007-2/witch.txt", diff --git a/npc/007-2/_warps.txt b/npc/007-2/_warps.txt new file mode 100644 index 00000000..8cb4a09c --- /dev/null +++ b/npc/007-2/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 007-2: Illia forsaken inn warps +007-2,34,35,0 warp #007-2_34_35 0,0,007-1,73,77 diff --git a/npc/007-2/witch.txt b/npc/007-2/witch.txt new file mode 100755 index 00000000..3625bb13 --- /dev/null +++ b/npc/007-2/witch.txt @@ -0,0 +1,996 @@ + + +007-2,36,23,0 script Valia NPC370,{ + @illia_sapphire_powder = 3; + @illia_amethyst_powder = 1; + @illia_iron_powder = 13; + @illia_yeti_tear = 1; + @illia_iced_water = 4; + $@illia_min_level = 90; + + if ((GM >= DBG_VALIA || debug) && getequipid(equip_head) == 647) + goto L_DeveloperBoard; + + if (BaseLevel < $@illia_min_level) goto L_Unexperienced; + if ($@iLLIA_STATUS == 0) goto L_Introduce; + if ($@iLLIA_STATUS == 1) goto L_PreparingSpell; + if ($@iLLIA_STATUS == 2) goto L_ReadyToTeleport; + if ($@iLLIA_STATUS == 3) end; + if ($@iLLIA_STATUS >= 4) goto L_AlreadyBegun; + end; + +L_DeveloperBoard: + callfunc "IlliaDebug"; + close; + +L_Introduce: + if (@illia_go_find_items) + goto L_AskItems; + if (@illia_know_witch == 1) + goto L_QuickIntroduce; + mes "[Valia]"; + mes "\"I'm Valia Illia. Is it needed to say I am a witch?\""; + next; + mes "\"No I don't think so.\""; + next; + mes "\"And you, you seem to be quite an adventurer.\""; + menu + "Well... No.", L_Disappointed, + "No doubt!", L_Next; + +L_Next: + mes "[Valia]"; + mes "\"Maybe you can help then."; + mes "You see, I have a sister. Yes, a witch too. Very talented."; + mes "But unfortunately not enough to avoid being captured.\""; + menu + "That's unfortunate...", L_Exit, + "What informations do you have about all this?", L_Next1; + +L_Next1: + @illia_know_witch = 1; + mes "[Valia]"; + mes "\"Ismuth, some dark mage we both hate. He is the one holding her jailed for sure."; + mes "She has knowledge about specific magic sides that no other sorcerer knows about.\""; + next; + mes "\"He has been looking for her for a long time because of that..."; + mes "I am worried about her."; + mes "And I am unable to go help her.\""; + + menu + "Why not? You seem to be quite talented as well.", L_Next2; + +L_Next2: + mes "[Valia]"; + mes "\"Sure. But I know the enemy. My chances are thin. And if I fail, no one will ever find us."; + mes "And my magic skills aren't suited for this...\""; + menu + "That makes sense...", L_AskHelp, + "For what are they suited then?", L_HideSkills; + +L_HideSkills: + mes "[Valia]"; + mes "\"Please, never ask a witch what she is skilled in.\""; + next; + goto L_AskHelp; + +L_QuickIntroduce: + mes "[Valia]"; + mes "\"My sister is in great danger, and time is running out.\""; + next; + goto L_AskHelp; + +L_AskHelp: + mes "[Valia]"; + mes "\"Will you help me?\""; + menu + "That sounds quite dangerous... I don't feel it.", L_Disappointed, + "Ok, I can do that for you.", L_Next3; + +L_Next3: + mes "[Valia]"; + mes "\"Good. Now listen carefully. Ismuth owns an island where he makes his researchs."; + mes "An island where no boat goes, and where no magic could teleport you to..."; + mes "Strong enchantments are protecting the area, however, I know about a mysterious waterfall, which can send you wherever you want, provided you pay the price.\""; + next; + mes "\"Of course, it would be a straight way to death if you go alone."; + mes "You will need three experienced comrades that you would trust enough to leave your life in their care.\""; + next; + + if (getusers(1) < 4) + goto L_NotPeepAv; + + mes "[Valia]"; + mes "\"Do you know such people?\""; + menu + "I'm afraid not. I should better look around.", L_Exit, + "Yes I know such people!", L_Next4; + +L_Next4: + mes "[Valia]"; + mes "\"Good."; + mes "I can teleport all of you close to that waterfall, but for that, I will need " + @illia_sapphire_powder + " bags of Sapphire Powder, " + @illia_amethyst_powder + " of Amethyst Powder, " + @illia_iron_powder + " Iron Powders," + @illia_yeti_tear + " Frozen Yeti Tear and " + @illia_iced_water + " bottles of Iced Water.\""; + menu + "I have them here.", L_CheckItems, + "I don't have them, but I'll try to find.", L_NoItems; + +L_NotPeepAv: + mes "[Valia]"; + mes "\"But it seems there are not enough people around."; + mes "Come back later.\""; + close; + +L_AskItems: + mes "[Valia]"; + mes "\"So, did you bring me what I need?\""; + menu + "Hum, I forgot what you asked...", L_RepeatItems, + "Here they are!", L_CheckItems; + +L_RepeatItems: + mes "[Valia]"; + mes "\"I need " + @illia_sapphire_powder + " bags of Sapphire Powder, " + @illia_amethyst_powder + " of Amethyst Powder, " + @illia_iron_powder + " Iron Powders," + @illia_yeti_tear + " Frozen Yeti Tear and " + @illia_iced_water + " bottles of Iced Water.\""; + next; + mes "\"Hurry up.\""; + close; + +L_NoItems: + @illia_go_find_items = 1; + close; + +L_MissingItems: + mes "[Valia]"; + mes "\"Obviously you are missing some of the components."; + mes "Go find the missing ones, fast. We lack time!\""; + @illia_go_find_items = 1; + close; + +L_CheckItems: + if ( + (countitem ("SapphirePowder") < @illia_sapphire_powder) || + (countitem ("AmethystPowder") < @illia_amethyst_powder) || + (countitem ("IronPowder") < @illia_iron_powder) || + (countitem ("FrozenYetiTear") < @illia_yeti_tear) || + (countitem ("IcedWater") < @illia_iced_water) + ) goto L_MissingItems; + // someone started the quest in the meantime, so we cancel this one. + if ($@iLLIA_STATUS > 0) + goto L_Interrupt; + // Block other players to start the quest, and start a timer to limit + // the time a player will take to gather his team. + // Considering the previous npc dialogs, we assume the player already designated his team mates, + // hence 5 mins should be enough. + $@iLLIA_STATUS = 1; + initnpctimer; + @illia_go_find_items = 0; + + mes "[Valia]"; + mes "\"Very well! I can prepare the spell now!\""; + next; + goto L_PrepareTeam; + +L_Interrupt: + mes "[Valia]"; + mes "\"Unfortunately, someone else is already helping me.\""; + close; + +L_PrepareTeam: + // We clear early this variable. + @illia_know_witch = 0; + mes "[Valia]"; + mes "\"While I focus on preparing the spell, call your three comrades, and make sure they come here within five minutes. We don't have time.\""; + next; + $@iLLIA_HERO$ = strcharinfo(0); + $@iLLIA_HERO_ID = getcharid(3, $@iLLIA_HERO$); + goto L_ChooseHelper1; + +L_Disappointed: + mes "[Valia]"; + mes "\"What a shame... You have no idea what you are missing, really.\""; + close; + +L_Unexperienced: + mes "You see a charismatic witch."; + next; + mes "But she seems to completely ignore your presence."; + close; + +L_ChooseHelperConfirm1: + mes "[Team Selector]"; + mes "If it happens you cannot elect three players to help you, you can give up now."; + menu + "Continue.", L_ChooseHelper1, + "I give up.", L_PlayerGaveUp; + +L_ChooseHelper1: + mes "[Team Selector]"; + mes "Name the first player to help you:"; + input $@iLLIA_HELPER1$; + + if ($@iLLIA_HELPER1$ == "") + goto L_ChooseHelperConfirm1; + if (getcharid(3, $@iLLIA_HELPER1$) == $@iLLIA_HERO_ID) + goto L_WrongHelper1; + if (isloggedin(getcharid(3, $@iLLIA_HELPER1$)) == 0) + goto L_HelperDoesNotExist1; + if (!(attachrid(getcharid(3, $@iLLIA_HELPER1$)))) + goto L_Exit; + if (BaseLevel < $@illia_min_level) + goto L_HelperTooWeak1; + $@iLLIA_HELPER1$ = strcharinfo(0); + detachrid; + if (attachrid($@iLLIA_HERO_ID)) + goto L_ChooseHelper2; + goto L_Exit; + +L_HelperTooWeak1: + detachrid; + if (!(attachrid($@iLLIA_HERO_ID))) + goto L_Exit; + mes "[Team Selector]"; + mes "The player " + $@iLLIA_HELPER1$ + " is too weak to help you."; + $@iLLIA_HELPER1$ = ""; + next; + goto L_ChooseHelperConfirm1; + +L_HelperDoesNotExist1: + mes "[Team Selector]"; + mes "This player " + $@iLLIA_HELPER1$ + " seems offline or does not exist."; + $@iLLIA_HELPER1$ = ""; + next; + goto L_ChooseHelperConfirm1; + +L_WrongHelper1: + mes "[Team Selector]"; + mes "You can't name yourself."; + next; + goto L_ChooseHelperConfirm1; + +L_ChooseHelperConfirm2: + mes "[Team Selector]"; + mes "If it happens you cannot elect three players to help you, you can give up now."; + menu + "Continue.", L_ChooseHelper2, + "I give up.", L_PlayerGaveUp; + +L_ChooseHelper2: + mes "[Team Selector]"; + mes "Name the second player to help you:"; + input $@iLLIA_HELPER2$; + if ($@iLLIA_HELPER2$ == "") + goto L_ChooseHelperConfirm2; + if (getcharid(3, $@iLLIA_HELPER2$) == getcharid(3, $@iLLIA_HELPER1$) || + getcharid(3, $@iLLIA_HELPER2$) == $@iLLIA_HERO_ID) + goto L_WrongHelper2; + if (isloggedin(getcharid(3, $@iLLIA_HELPER2$)) == 0) + goto L_HelperDoesNotExist2; + if (!(attachrid(getcharid(3, $@iLLIA_HELPER2$)))) + goto L_Exit; + if (BaseLevel < $@illia_min_level) + goto L_HelperTooWeak2; + $@iLLIA_HELPER2$ = strcharinfo(0); + detachrid; + if (attachrid($@iLLIA_HERO_ID)) + goto L_ChooseHelper3; + goto L_Exit; + +L_HelperTooWeak2: + detachrid; + if (!(attachrid($@iLLIA_HERO_ID))) + goto L_Exit; + mes "[Team Selector]"; + mes "The player " + $@iLLIA_HELPER2$ + " is too weak to help you."; + $@iLLIA_HELPER2$ = ""; + next; + goto L_ChooseHelperConfirm2; + +L_HelperDoesNotExist2: + mes "[Team Selector]"; + mes "This player " + $@iLLIA_HELPER2$ + " seems offline or does not exist."; + $@iLLIA_HELPER2$ = ""; + next; + goto L_ChooseHelperConfirm2; + +L_WrongHelper2: + mes "[Team Selector]"; + mes "You can't name yourself or someone already chosen."; + next; + goto L_ChooseHelperConfirm2; + +L_ChooseHelperConfirm3: + mes "[Team Selector]"; + mes "If it happens you cannot elect three players to help you, you can give up now."; + menu + "Continue.", L_ChooseHelper3, + "I give up.", L_PlayerGaveUp; + +L_ChooseHelper3: + mes "[Team Selector]"; + mes "Name the third player to help you:"; + input $@iLLIA_HELPER3$; + if ($@iLLIA_HELPER3$ == "") + goto L_ChooseHelperConfirm3; + if (getcharid(3, $@iLLIA_HELPER3$) == getcharid(3, $@iLLIA_HELPER2$) || + getcharid(3, $@iLLIA_HELPER3$) == getcharid(3, $@iLLIA_HELPER1$) || + getcharid(3, $@iLLIA_HELPER3$) == $@iLLIA_HERO_ID) + goto L_WrongHelper3; + if (isloggedin(getcharid(3, $@iLLIA_HELPER3$)) == 0) + goto L_HelperDoesNotExist3; + if (!(attachrid(getcharid(3, $@iLLIA_HELPER3$)))) + goto L_Exit; + if (BaseLevel < $@illia_min_level) + goto L_HelperTooWeak3; + $@iLLIA_HELPER3$ = strcharinfo(0); + detachrid; + if (!(attachrid($@iLLIA_HERO_ID))) + goto L_Exit; + mes $@iLLIA_HELPER1$ + ", " + $@iLLIA_HELPER2$ + " and " + $@iLLIA_HELPER3$ + " will be your three comrades."; + close; + +L_HelperTooWeak3: + detachrid; + if (!(attachrid($@iLLIA_HERO_ID))) + goto L_Exit; + mes "[Team Selector]"; + mes "The player " + $@iLLIA_HELPER3$ + " is too weak to help you."; + $@iLLIA_HELPER3$ = ""; + next; + goto L_ChooseHelperConfirm3; + + +L_HelperDoesNotExist3: + mes "[Team Selector]"; + mes "This player " + $@iLLIA_HELPER3$ + " seems offline or does not exist."; + $@iLLIA_HELPER3$ = ""; + next; + goto L_ChooseHelperConfirm3; + +L_WrongHelper3: + mes "[Team Selector]"; + mes "You can't name yourself or someone already chosen."; + next; + goto L_ChooseHelperConfirm3; + +L_PreparingSpell: + mes "The witch looks busy with a spell, giving shape to strange rings,"; + mes "and is not paying any attention to you."; + close; + +L_ReadyToTeleport: + if ($@iLLIA_HELPER1$ == "" || $@iLLIA_HELPER2$ == "" || $@iLLIA_HELPER3$ == "") + goto L_PlayerGaveUp; + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_AskToTeleport; + if (strcharinfo(0) == $@iLLIA_HELPER1$ || strcharinfo(0) == $@iLLIA_HELPER2$ || strcharinfo(0) == $@iLLIA_HELPER3$) + goto L_TalkHelper; + mes "[Valia]"; + mes "\"I do not have time for you.\""; + close; + +L_AskToTeleport: + // Check area users just to give a hint if there are players around + // $@iLLIA_HERO$ $@iLLIA_HELPER1$ $@iLLIA_HELPER2$ $@iLLIA_HELPER3$ + if (!(attachrid(getcharid(3,$@iLLIA_HELPER1$)))) + goto L_NotEveryoneHere; + if (!(isin("007-2", 0, 0, 57, 55))) + goto L_NotEveryoneHere; + detachrid; + if (!(attachrid(getcharid(3,$@iLLIA_HELPER2$)))) + goto L_NotEveryoneHere; + if (!(isin("007-2", 0, 0, 57, 55))) + goto L_NotEveryoneHere; + detachrid; + if (!(attachrid(getcharid(3,$@iLLIA_HELPER3$)))) + goto L_NotEveryoneHere; + if (!(isin("007-2", 0, 0, 57, 55))) + goto L_NotEveryoneHere; + detachrid; + if (!(attachrid(getcharid(3,$@iLLIA_HERO$)))) + goto L_NotEveryoneHere; + if (!(isin("007-2", 0, 0, 57, 55))) + goto L_NotEveryoneHere; + mes "[Valia]"; + mes "\"Everyone seems to be here. Make sure to stay close to me.\""; + menu + "I'm ready.", L_Next5, + "Wait a minute.", L_Exit; + +L_Next5: + if ( + (countitem ("SapphirePowder") < @illia_sapphire_powder) || + (countitem ("AmethystPowder") < @illia_amethyst_powder) || + (countitem ("IronPowder") < @illia_iron_powder) || + (countitem ("FrozenYetiTear") < @illia_yeti_tear) || + (countitem ("IcedWater") < @illia_iced_water) + ) goto L_MissingItems; + delitem "SapphirePowder", @illia_sapphire_powder; + delitem "AmethystPowder", @illia_amethyst_powder; + delitem "IronPowder", @illia_iron_powder; + delitem "FrozenYetiTear", @illia_yeti_tear; + delitem "IcedWater", @illia_iced_water; + + // Stop the 5mins timer and start it again. + $@iLLIA_STATUS = 3; + initnpctimer; + close; + +L_NotEveryoneHere: + mes "[Valia]"; + mes "\"I don't see your comrades around."; + mes "Let's wait a little more.\""; + close; + +L_TalkHelper: + mes "[Valia]"; + mes "\"" + strcharinfo(0) + ", do your best to assist " + $@iLLIA_HERO$ + ".\""; + menu + "What is " + $@iLLIA_HERO$ + " going to do?", L_Next6, + "I will, no problem.", L_Exit; + +L_Next6: + mes "[Valia]"; + mes "\"You weren't told about it? This is about saving my captive sister.\""; + next; + mes "\"For the details, you'll have to ask " + $@iLLIA_HERO$ + "..."; + mes "I am not going to repeat myself...\""; + close; + +OnWarpHero: + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_Warp; + end; + +OnWarpHelper1: + if (strcharinfo(0) == $@iLLIA_HELPER1$) + goto L_Warp; + end; + +OnWarpHelper2: + if (strcharinfo(0) == $@iLLIA_HELPER2$) + goto L_Warp; + end; + +OnWarpHelper3: + if (strcharinfo(0) == $@iLLIA_HELPER3$) + goto L_Warp; + end; + +L_Warp: + misceffect FX_MAGIC_BLUE_TELEPORT, strcharinfo(0); + @illia_got_rewards = 0; + @illia_current_num_rewards = 0; + addtimer 2000, "Valia::OnRealWarp"; + end; + +OnRealWarp: + warp "051-1", 23 + rand(2), 24 + rand(3); + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_InitVars; + end; + +L_InitVars: + $@iLLIA_STATUS = 4; + donpcevent "#IlliaDaemon::OnCommandToggle"; + // init various variables + $@illia_progress = 1; + callfunc "UpdateIlliaProgress"; + $@illia_level_1_progress = 0; + $@illia_level_2_progress = 0; + $@illia_level_3_progress = 0; + $@illia_level_4_progress = 0; + $@illia_level_5_progress = 0; + $@illia_level_6_progress = 0; + $@illia_level_7_progress = 0; + $@illia_players_in_luvia_territory = 0; + + // Save the time at which the quest started + $@illia_begin_time = gettimetick(2); + + // Clean all levels + donpcevent "#IlliaJanitor1::OnCommandClean"; + donpcevent "#IlliaJanitor2::OnCommandClean"; + donpcevent "#IlliaJanitor3::OnCommandClean"; + donpcevent "#IlliaJanitor4::OnCommandClean"; + donpcevent "#IlliaJanitor5::OnCommandClean"; + donpcevent "#IlliaJanitor6::OnCommandClean"; + donpcevent "#IlliaJanitor7::OnCommandClean"; + + stopnpctimer; + setnpctimer 0; + end; + +L_AlreadyBegun: + mes "At the moment you are about to talk to her, she briefly shows a malicious smile and looks away."; + next; + mes "Probably it is best to not annoy her."; + close; + +L_Exit: + close; + +L_ReactToPlayersReturn: + // If players did not enter the Inn's lobby, they arent aware of the trap. + // Otherwise, they are aware of the trap. Whether they died or not, + // the rings will have deleted their memories. + // So the same dialog can apply. + if ($@illia_progress < 8) + goto L_Disappoint; + if ($@illia_progress == 8) + goto L_SurprisedByHeroWin; + end; + +L_SurprisedByHeroWin: + npctalk strnpcinfo(0), "(How is it possible... " + $@iLLIA_HERO$ + " survived...)"; + emotion EMOTE_SURPRISE; + goto L_EndQuest; + +L_Disappoint: + npctalk strnpcinfo(0), "Oh no... It seems " + $@iLLIA_HERO$ + " did not make it... Who will save my sister now?"; + emotion EMOTE_SAD; + goto L_EndQuest; + +L_PlayerGaveUp: + close2; + npctalk strnpcinfo(0), "Well... It seems you can't do it " + $@iLLIA_HERO$ + ". I knew it as soon as I saw you!"; + emotion EMOTE_UPSET; + goto L_EndQuest; + +L_EndQuest: + $@iLLIA_STATUS = 0; + $@iLLIA_HERO$ = ""; + $@iLLIA_HERO_ID = 0; + $@iLLIA_HELPER1$ = ""; + $@iLLIA_HELPER2$ = ""; + $@iLLIA_HELPER3$ = ""; + $@illia_progress = 0; + callfunc "UpdateIlliaProgress"; + $@illia_level_1_progress = 0; + $@illia_level_2_progress = 0; + $@illia_level_3_progress = 0; + $@illia_level_4_progress = 0; + $@illia_level_5_progress = 0; + $@illia_level_6_progress = 0; + $@illia_level_7_progress = 0; + $@illia_players_in_luvia_territory = 0; + $@illia_bp = 0; + + // Clean all levels + donpcevent "#IlliaJanitor1::OnCommandClean"; + donpcevent "#IlliaJanitor2::OnCommandClean"; + donpcevent "#IlliaJanitor3::OnCommandClean"; + donpcevent "#IlliaJanitor4::OnCommandClean"; + donpcevent "#IlliaJanitor5::OnCommandClean"; + donpcevent "#IlliaJanitor6::OnCommandClean"; + donpcevent "#IlliaJanitor7::OnCommandClean"; + + stopnpctimer; + setnpctimer 0; + end; + +OnTimer3000: + if ($@iLLIA_STATUS >= 253) + goto L_ReactToPlayersReturn; + end; + +OnTimer2500: + if ($@iLLIA_STATUS != 3) + end; + npctalk strnpcinfo(0), $@iLLIA_HERO$ + ", " + $@iLLIA_HELPER1$ + ", " + $@iLLIA_HELPER2$ + ", " + $@iLLIA_HELPER3$ + ", listen!"; + end; + +OnTimer7500: + if ($@iLLIA_STATUS != 3) + end; + npctalk strnpcinfo(0), "I will teleport the 4 of you in a forest that isn't far from the waterfall."; + end; + +OnTimer14000: + if ($@iLLIA_STATUS != 3) + end; + npctalk strnpcinfo(0), "Each of you takes one of these rings. They will allow you to come back here when needed."; + end; + +OnTimer24000: + if ($@iLLIA_STATUS != 3) + end; + if ($Illia_Luvia_Harvest < 10) + npctalk strnpcinfo(0), "Do your best and save my sister!"; + if ($Illia_Luvia_Harvest >= 10 && $Illia_Luvia_Harvest < 35) + npctalk strnpcinfo(0), "This will be quite dangerous, but do your best and save my sister!"; + if ($Illia_Luvia_Harvest >= 35) + npctalk strnpcinfo(0), "This will be awfully dangerous, but do your best and save my sister!"; + end; + +OnTimer34000: + if ($@iLLIA_STATUS != 3) + end; + // Trigger 4 areatimers to show the teleport spell + // This is better looking than a basic areawarp + areatimer 0, "007-2", 0, 0, 57, 55, 3000, "Valia::OnWarpHero"; + areatimer 0, "007-2", 0, 0, 57, 55, 3500, "Valia::OnWarpHelper1"; + areatimer 0, "007-2", 0, 0, 57, 55, 4000, "Valia::OnWarpHelper2"; + areatimer 0, "007-2", 0, 0, 57, 55, 4500, "Valia::OnWarpHelper3"; + npctalk strnpcinfo(0), "Spiralis Major!"; + misceffect FX_BLUE_MAGIC_CAST; + end; + +OnTimer50000: + // Add a check that the quest started. + // This timer on status 3 should be reached since L_Init_Vars will have + // stopped it before. + // It may happen it didn't if the hero logged off during the warp sequence + // Hence we'll just init what's necessary to trigger the end sequence + if ($@iLLIA_STATUS != 3) + end; + goto L_InitVars; + +OnTimer150000: + if ($@iLLIA_STATUS != 1) + end; + $@iLLIA_STATUS = 2; + npctalk strnpcinfo(0), $@iLLIA_HERO$ + ", I am ready to cast the teleport spell. You and your comrades should not wait any longer!"; + end; + +OnTimer280000: + if ($@iLLIA_STATUS != 2) + end; + npctalk strnpcinfo(0), "Hurry up " + $@iLLIA_HERO$ + ", I am losing patience."; + end; + +OnTimer300000: + if ($@iLLIA_STATUS != 2) + end; + npctalk strnpcinfo(0), $@iLLIA_HERO$ + ", you and your missing comrades made me lose a precious time! Out of my sight!"; + emotion EMOTE_UPSET; + if (attachrid($@iLLIA_HERO_ID)) + goto L_KillHero; + goto L_EndQuest; + +L_KillHero: + heal -Hp, 0; + goto L_EndQuest; + +} + +007-2,57,55,0 script #IlliaDaemon NPC32767,{ +end; + +OnInit: + disablenpc "#IlliaTorch1"; + disablenpc "#IlliaTorch2"; + disablenpc "#IlliaTorch3"; + disablenpc "#IlliaTorch4"; + disablenpc "#IlliaTorch5"; + disablenpc "#IlliaTorch6"; + disablenpc "#IlliaTorch7"; + disablenpc "#IlliaTorch8"; + $@illia_max_time = 300; + end; + +OnCommandToggle: + $@illia_max_time = 300; + if ($@iLLIA_STATUS >= 253) + goto L_Stop; + if ($@iLLIA_STATUS >= 4) + goto L_Start; + end; + +OnTimer1000: + if ($@iLLIA_STATUS < 4 || $@iLLIA_STATUS >= 254) + end; + goto L_Check; + +OnTimer2000: + if ($@iLLIA_STATUS < 4 || $@iLLIA_STATUS >= 254) + end; + // This is executed only when making a double check when we detected + // the hero offline/not in the good map previously. + goto L_Check; + +OnTimer4000: + // Check if we need to force-warp the hero + if (isloggedin($@iLLIA_HERO_ID) == 0) + end; + if ($@iLLIA_STATUS == 255 && attachrid($@iLLIA_HERO_ID) && ( + isin("051-1",1,1,190,80) || + isin("051-3",1,1,115,130) || + isin("052-1",1,1,100,80) || + isin("052-2",1,1,150,100) + ) + ) goto L_WarpHero; + detachrid; + end; + +OnTimer4500: + if ($@iLLIA_STATUS < 254) + end; + // send a message to all the helpers + setarray $@illia_helpers$, $@iLLIA_HELPER1$,$@iLLIA_HELPER2$,$@iLLIA_HELPER3$; + $@illia_helper_index = 0; + goto L_HelperNotification; + +OnTimer6500: + if ($@iLLIA_STATUS < 254) + end; + // Make the first witch to say something happened, when she will see people back + // If no helpers will be warped, it still makes sense: she felt the hero died. + startnpctimer "Valia"; + // $@illia_players_in_luvia_territory is set when players enter the island + $Illia_Luvia_Harvest = $Illia_Luvia_Harvest + $@illia_players_in_luvia_territory; + // Cap the difficulty to 50. We do not want the quest to really be impossible to finish. + if ($Illia_Luvia_Harvest > 50) + $Illia_Luvia_Harvest = 50; + $@illia_players_in_luvia_territory = 0; + end; + +L_HelperNotification: + if ($@illia_helper_index >= 4) + goto L_CleanHelpers; + $@illia_helper$ = $@illia_helpers$[$@illia_helper_index]; + if (isloggedin(getcharid(3, $@illia_helper$)) == 0) + goto L_NextHelperToNotify; + if ( + $@illia_helper$ != "" && + attachrid(getcharid(3, $@illia_helper$)) && ( + isin("051-1",1,1,190,80) || + isin("051-3",1,1,115,130) || + isin("052-1",1,1,100,80) || + isin("052-2",1,1,150,100) + ) + ) goto L_NotifyHelperFail; + detachrid; + goto L_NextHelperToNotify; + +L_NextHelperToNotify: + $@illia_helper_index = $@illia_helper_index + 1; + goto L_HelperNotification; + +L_CleanHelpers: + cleararray $@illia_helpers$, "", 3; + $@illia_helper$ = ""; + $@illia_helper_index = 0; + end; + +L_NotifyHelperFail: + message strcharinfo(0), $@iLLIA_HERO$ + " disappeared. There is no way I continue like this... Let's use the ring Valia gave!"; + // display the warp spell already if needed + misceffect FX_MAGIC_BLUE_TELEPORT, strcharinfo(0); + detachrid; + goto L_NextHelperToNotify; + +OnTimer8000: + if ($@iLLIA_STATUS < 254) + end; + // Warp remaining helpers back to the origin if needed + setarray $@illia_helpers$, $@iLLIA_HELPER1$,$@iLLIA_HELPER2$,$@iLLIA_HELPER3$; + $@illia_helper_index = 0; + goto L_CheckHelperNeedWarp; + +L_CheckHelperNeedWarp: + if ($@illia_helper_index >= 4) + goto L_CleanHelpersWarps; + $@illia_helper$ = $@illia_helpers$[$@illia_helper_index]; + if (isloggedin(getcharid(3, $@illia_helper$)) == 0) + goto L_NextHelperToWarp; + if ($@illia_helper$ != "" && attachrid(getcharid(3, $@illia_helper$))) + goto L_WarpHelper; + detachrid; + goto L_NextHelperToWarp; + +L_NextHelperToWarp: + $@illia_helper_index = $@illia_helper_index + 1; + goto L_CheckHelperNeedWarp; + +L_CleanHelpersWarps: + cleararray $@illia_helpers$, "", 3; + $@illia_helper$ = ""; + $@illia_helper_index = 0; + end; + +L_WarpHelper: + // Proceed only if the helper is still on one of the quest's maps + if ( + isin("051-1",1,1,190,80 ) || + isin("051-3",1,1,115,130) || + isin("052-1",1,1,100,80 ) || + isin("052-2",1,1,150,100) + ) goto L_DoWarpHelper; + detachrid; + goto L_NextHelperToWarp; + +L_DoWarpHelper: + // At this point, the player has been attached + if ($@illia_progress >= 5) + message strcharinfo(0), "You feel dizzy, and that your memory is being rewritten... Who is Luvia? Something isn't right."; + warp "007-2",31 + rand(0,2),23 + rand(0,2); + detachrid; + goto L_NextHelperToWarp; + +L_Check: + // We check for the hero to be logged in, alive, and in one of the quest's maps + if (isloggedin($@iLLIA_HERO_ID) == 0) + goto L_HeroLogOff; + if (attachrid($@iLLIA_HERO_ID) && + (isin("051-1",1,1,190,80 ) == 0) && + (isin("051-3",1,1,115,130) == 0) && + (isin("052-1",1,1,100,80 ) == 0) && + (isin("052-2",1,1,150,100) == 0) + ) goto L_HeroEscape; + if (ispcdead()) + goto L_HeroDead; + // If the quest lasts more than $@illia_max_time seconds, abort it + if (gettimetick(2) - $@illia_begin_time > $@illia_max_time) + goto L_HeroRingActivated; + // Conditions are all met. schedule another check 1s later + setnpctimer 0; + detachrid; + end; + +L_HeroRingActivated: + misceffect FX_MAGIC_BLUE_TELEPORT, strcharinfo(0); + message strcharinfo(0), "The ring Valia gave you seems to activate itself!"; + detachrid; + $@iLLIA_STATUS = 255; + setnpctimer 0; + end; + +L_HeroLogOff: + if (getnpctimer(0) < 1900) + end; + $@iLLIA_STATUS = 254; + setnpctimer 0; + end; + +L_HeroEscape: + detachrid; + // because of lags, warps between maps, etc + // let's assume a check can detect the player to not be in any of the map, + // while he is supposed to be in one. + // it does not hurt to make a double check 1sec later + if (getnpctimer(0) < 1900) + end; + $@iLLIA_STATUS = 254; + setnpctimer 0; + end; + +L_WarpHero: + // At this point, the player has been attached + if ($@illia_progress >= 5) + message strcharinfo(0), "You feel dizzy, and that your memory is being rewritten... Who is Luvia? Something isn't right."; + warp "007-2",31 + rand(0,2),23 + rand(0,2); + detachrid; + end; + +L_HeroDead: + // we notify the player that his death will add luvia's power. + // her power is increasing once players reach her island, + // but they didn't find out about her yet on the island, + // so we notify the hero only once they met her in the Inn + if ($@illia_progress >= 5 && $@illia_progress < 8) + message strcharinfo(0), "You are in Luvia's hands, and your soul is now meant to serve her dark purposes."; + detachrid; + $@iLLIA_STATUS = 255; + setnpctimer 0; + end; + +L_Stop: + stopnpctimer; + setnpctimer 0; + end; + +L_Start: + initnpctimer; + end; + +} + +function script UpdateIlliaProgress { + if ($@illia_progress == 1) + goto L_Torch1; + if ($@illia_progress == 2) + goto L_Torch2; + if ($@illia_progress == 3) + goto L_Torch3; + if ($@illia_progress == 4) + goto L_Torch4; + if ($@illia_progress == 5) + goto L_Torch5; + if ($@illia_progress == 6) + goto L_Torch6; + if ($@illia_progress == 7) + goto L_Torch7; + if ($@illia_progress == 8) + goto L_Torch8; + // Else, we disable everything + disablenpc "#IlliaTorch1"; + disablenpc "#IlliaTorch2"; + disablenpc "#IlliaTorch3"; + disablenpc "#IlliaTorch4"; + disablenpc "#IlliaTorch5"; + disablenpc "#IlliaTorch6"; + disablenpc "#IlliaTorch7"; + disablenpc "#IlliaTorch8"; + return; + +L_Torch8: + enablenpc "#IlliaTorch8"; + goto L_Torch7; + +L_Torch7: + enablenpc "#IlliaTorch7"; + goto L_Torch6; + +L_Torch6: + enablenpc "#IlliaTorch6"; + goto L_Torch5; + +L_Torch5: + enablenpc "#IlliaTorch5"; + goto L_Torch4; + +L_Torch4: + enablenpc "#IlliaTorch4"; + goto L_Torch3; + +L_Torch3: + enablenpc "#IlliaTorch3"; + goto L_Torch2; + +L_Torch2: + enablenpc "#IlliaTorch2"; + goto L_Torch1; + +L_Torch1: + enablenpc "#IlliaTorch1"; + return; +} + +007-2,29,22,0 script #IlliaTorch1 NPC374,{ +end; +} + +007-2,30,21,0 script #IlliaTorch2 NPC374,{ +end; +} + +007-2,33,24,0 script #IlliaTorch3 NPC374,{ +end; +} + +007-2,32,25,0 script #IlliaTorch4 NPC374,{ +end; +} + +007-2,32,21,0 script #IlliaTorch5 NPC374,{ +end; +} + +007-2,33,22,0 script #IlliaTorch6 NPC374,{ +end; +} + +007-2,29,24,0 script #IlliaTorch7 NPC374,{ +end; +} + +007-2,30,25,0 script #IlliaTorch8 NPC374,{ +end; +} + +function script IlliaDebug { + mes "$Illia_Luvia_Harvest: "+$Illia_Luvia_Harvest; + mes "$Illia_Win_Counter: "+$Illia_Win_Counter; + mes "---"; + mes "$@illia_progress: "+$@illia_progress; + if ($@illia_begin_time > 0) + mes "Time: "+(gettimetick(2) - $@illia_begin_time)+"/"+$@illia_max_time; + mes "---"; + mes "$@illia_level_1_progress: "+$@illia_level_1_progress; + mes "$@illia_level_2_progress: "+$@illia_level_2_progress; + mes "$@illia_level_3_progress: "+$@illia_level_3_progress; + mes "$@illia_level_4_progress: "+$@illia_level_4_progress; + mes "$@illia_level_5_progress: "+$@illia_level_5_progress; + mes "$@illia_level_6_progress: "+$@illia_level_6_progress; + mes "$@illia_level_7_progress: "+$@illia_level_7_progress; + return; +} diff --git a/npc/008-1-1/_import.txt b/npc/008-1-1/_import.txt deleted file mode 100644 index 46f9ce78..00000000 --- a/npc/008-1-1/_import.txt +++ /dev/null @@ -1,11 +0,0 @@ -// Map 008-1-1: Woodland -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-1-1/_mobs.txt", -"npc/008-1-1/_warps.txt", -"npc/008-1-1/cutscene.txt", -"npc/008-1-1/galimatia.txt", -"npc/008-1-1/hal.txt", -"npc/008-1-1/koga.txt", -"npc/008-1-1/morcant.txt", -"npc/008-1-1/sign.txt", -"npc/008-1-1/soldiers.txt", diff --git a/npc/008-1-1/_mobs.txt b/npc/008-1-1/_mobs.txt deleted file mode 100644 index 928a2c6d..00000000 --- a/npc/008-1-1/_mobs.txt +++ /dev/null @@ -1,38 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-1-1: Woodland mobs -008-1-1,173,86,25,5 monster Forest Maggot 1028,12,500,2500 -008-1-1,132,56,7,5 monster Forest Maggot 1028,5,500,2500 -008-1-1,74,59,9,16 monster Butterfly 1032,4,20000,10000 -008-1-1,63,73,11,5 monster Maggot 1026,7,500,10000 -008-1-1,206,87,6,4 monster Mouboo 1023,3,30000,60000 -008-1-1,131,45,0,0 monster Beehive 1056,1,30000,100000 -008-1-1,156,51,10,4 monster Alizarin Plant 1037,3,1000,25000 -008-1-1,167,61,2,2 monster Pink Flower 1034,1,100,10000 -008-1-1,154,176,9,7 monster Silkworm 1040,4,3000,6000 -008-1-1,162,78,6,3 monster Gamboge Plant 1038,2,1000,10000 -008-1-1,197,67,7,5 monster Cobalt Plant 1039,2,1000,30000 -008-1-1,165,109,2,2 monster Pink Flower 1034,1,100,10000 -008-1-1,217,62,2,2 monster Pink Flower 1034,1,100,10000 -008-1-1,119,66,2,2 monster Pink Flower 1034,1,100,10000 -008-1-1,112,75,2,2 monster Pink Flower 1034,1,100,10000 -008-1-1,110,46,3,2 monster Mauve Plant 1036,3,1000,2000 -008-1-1,159,93,9,7 monster Silkworm 1040,4,3000,6000 -008-1-1,62,36,7,7 monster Mouboo 1023,3,30000,60000 -008-1-1,126,45,0,0 monster Beehive 1056,1,30000,100000 -008-1-1,121,45,0,0 monster Beehive 1056,1,30000,100000 -008-1-1,163,178,2,1 monster Red Rose 1062,1,50000,10000 -008-1-1,158,191,3,1 monster Yellow Rose 1060,1,20000,5000 -008-1-1,166,184,1,1 monster Blue Rose 1061,1,100000,20000 -008-1-1,137,86,11,16 monster Butterfly 1032,8,10000,10000 -008-1-1,75,41,14,4 monster Silkworm 1040,3,9000,6000 -008-1-1,122,75,8,4 monster Forest Maggot 1028,3,50000,2500 -008-1-1,161,67,45,11 monster Mouboo 1023,3,20000,125000 -008-1-1,180,77,11,21 monster Log Head 1031,3,10000,15000 -008-1-1,149,77,99,15 monster Mana Bug 1035,11,10000,20000 -008-1-1,144,107,11,5 monster Bee 1029,3,5000,10000 -008-1-1,149,59,11,5 monster Bee 1029,3,5000,10000 -008-1-1,156,183,11,5 monster Bee 1029,3,5000,10000 -008-1-1,161,186,9,7 monster Bandit 1063,2,9000,18000 -008-1-1,157,172,5,15 monster Robin Bandit 1064,2,9000,18000 -008-1-1,156,177,10,15 monster Small Frog 1086,2,3000,30000 -008-1-1,169,74,30,23 monster Squirrel 1041,5,10000,30000 diff --git a/npc/008-1-1/_warps.txt b/npc/008-1-1/_warps.txt deleted file mode 100644 index cbf66f26..00000000 --- a/npc/008-1-1/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-1-1: Woodland warps -008-1-1,247,85,0 warp #008-1-1_247_85 0,1,008-1,21,85 -008-1-1,51,57,0 warp #008-1-1_51_57 0,0,008-2-32,40,37 -008-1-1,181,198,0 warp #008-1-1_181_198 1,0,009-1,180,32 diff --git a/npc/008-1-1/cutscene.txt b/npc/008-1-1/cutscene.txt deleted file mode 100644 index a9d39a6c..00000000 --- a/npc/008-1-1/cutscene.txt +++ /dev/null @@ -1,180 +0,0 @@ -// TMW Script -// Author: -// Jesusalva -// Description: -// Cutscenes for Main Story - -008-1-1,42,63,0 script #MQ2Cutscene NPC_HIDDEN,0,1,{ - end; - -OnTouch: - .@q=getq(General_Narrator); - if (.@q != 2) - end; - if (getmap() != "008-1-1") - end; - // Cutscene time! - // m (from main quest) 02 map 1 - .@mapn$="m021@"+getcharid(0); - .@mapx$="m022@"+getcharid(0); - // Build instance if it doesn't exists or has been reallocated - // (This only happens if you escape the map - edge case scenarios) - if (instanceowner(@mainquestinst) != getcharid(3)) { - @mainquestinst = instance_create("m102@a"+getcharid(0), getcharid(3), IOT_CHAR); - instance_attachmap("008-1-1", @mainquestinst, false, .@mapn$); - instance_attachmap("008-2-32", @mainquestinst, false, .@mapx$); - // Instance lasts 60 minutes - instance_set_timeout(3600, 3600, @mainquestinst); - instance_init(@mainquestinst); - } else { - // Restart instance timer if it already exists - instance_set_timeout(3600, 3600, @mainquestinst); - } - getmapxy(.@m$, .@x, .@y, 0); - warp(.@mapn$, .@x, .@y); - addtimer(500, instance_npcname(.name$, @mainquestinst)+"::OnBegin"); - end; - -OnBegin: - .@n$=instance_npcname(.name$); - .@mc$=instance_npcname("Morcant"); - - // Freeze player - // (M+ may render this incorrectly but it is not my job to care with that) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true); - sc_start(SC_STUN, 360000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK); - - // Begin moving Morcant - npcwalkto(58, 64, .@mc$); - sleep2(3000); - getmapxy(.@m$, .@x, .@y, 0); - npcwalkto(.@x + 1, .@y, .@mc$); - sleep2(1000); - unitwarp(getnpcid(.@mc$), .@m$, .@x + 1, .@y); // FIXME PLACEHOLDER - npctalk l("Hoho!"), .@mc$; - sleep2(2500); - npctalk l("Look what the shore brought me!"), .@mc$; - sleep2(3000); - npctalk l("Rarely anyone uses this port."), .@mc$; - sleep2(3000); - npctalk l("...Well, anyone adhering to the law, at least! Hahahah!"), .@mc$; - sleep2(3000); - npctalk l("Anyway, come in! You must be hungry."), .@mc$; - sleep2(3000); - npcwalkto(51, 57, .@mc$); - sleep2(1000); - sc_end(SC_STUN); - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false); - dispbottom col(l("1-1. Follow Morcant into his house."), 1); - sleep2(500); - .@mapx$="m022@"+getcharid(0); - unitwarp(getnpcid(.@mc$), .@mapx$, 40, 24); - end; -} - -// Series 2 -008-1-1,51,58,0 script #MQ2Cutscene2 NPC_HIDDEN,0,1,{ - end; -OnTouch: - if (getmap() == "008-1-1") end; - .@n$=instance_npcname(.name$); - .@mapx$="m022@"+getcharid(0); - warp(.@mapx$, 40, 36); - addtimer(3000, .@n$+"::OnStunlock"); - end; - -OnStunlock: - .@n$=instance_npcname(.name$); - addtimer(300, .@n$+"::OnBegin"); - // Freeze player - // (M+ may render this incorrectly but it is not my job to care with that) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true); - sc_start(SC_STUN, 360000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK); - end; - -OnBegin: - .@n$=instance_npcname(.name$); - .@mc$=instance_npcname("Morcant"); - .@tm$=instance_npcname("Thamas"); - npctalk l("Welcome to my humble abode."), .@mc$; - sleep2(500); - npctalk l("Who is that fellow?"), .@tm$; - sleep2(2500); - npctalk l("Thamas, this is a stowaway who reached here from Artis."), .@mc$; - sleep2(2500); - npctalk l("Yes, I remember."), .@tm$; - sleep2(3000); - npctalk l("Anyway, I assume you're trying to get into Hurnscald?"), .@mc$; - sleep2(2100); - npctalk l("Really? You should be careful, then."), .@tm$; - sleep2(2500); - npctalk l("Hurnscald is under the domain of the Brotherhood."), .@tm$; - sleep2(3000); - npctalk l("Shaddy fellas, I do not trust them the sightliest."), .@tm$; - sleep2(3500); - npctalk l("*ahem*!"), .@mc$; - sleep2(2000); - npctalk l("Hurnscald is just east of here."), .@mc$; - sleep2(2000); - npctalk l("Keep following the road, you can't miss it."), .@mc$; - sleep2(3000); - npctalk l("Do not venture into south, though."), .@mc$; - sleep2(2000); - npctalk l("It is haunted."), .@mc$; - sleep2(2500); - //atcommand("@refresh"); // FIXME -> Hercules upstream broke @refresh - // TODO FIXME: Check if x-1 is a collision, move to x+1 if it is - getmapxy(.@m$, .@x, .@y, 0); - npcwalkto(.@x - 1, .@y, .@mc$); - sleep2(1000); - unitwarp(getnpcid(.@mc$), .@m$, .@x - 1, .@y); // FIXME PLACEHOLDER - npctalk col(l("*Hey, psst.*"), 9), .@mc$; - sleep2(1000); - npctalk col(l("*I assume you're here for the Brotherhood, right?*"), 9), .@mc$; - sleep2(2500); - npctalk col(l("*Reaching Hurnscald, look for a girl called Airlia.*"), 9), .@mc$; - sleep2(2500); - npctalk col(l("*Whisper her the... password, and she'll lead you to Jonatas.*"), 9), .@mc$; - sleep2(3100); - npctalk col(l("*I don't know why Sophiahalla sent you here...*"), 9), .@mc$; - sleep2(2200); - npctalk col(l("*But I am just a retired merchant, hohoho!*"), 9), .@mc$; - sleep2(2200); - npctalk l("Anyway, that's it. Here, have a bowl of stew, Morcant special!"), .@mc$; - sleep2(2500); - npctalk l("I'll be back to the port, so see you later!"), .@mc$; - npcwalkto(40, 38, .@mc$); - sleep2(2000); - .@mapx$="m021@"+getcharid(0); - unitwarp(getnpcid(.@mc$), .@mapx$, 51, 58); - sc_end(SC_STUN); - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false); - sleep2(1000); - getmapxy(.@m$, .@x, .@y, 0); - warp "008-2-32", .@x, .@y; - getitembound SailorStew, 1, IBT_ACCOUNT; - setq General_Narrator, 3; - end; -} - -// WHAT ARE YOU DOING -008-1-1,83,65,0 script #MQ2CutsceneWAYD NPC_HIDDEN,0,10,{ - end; - -OnTouch: - if (getmap() == "008-1-1") end; - // What are you doing?! - slide 51, 63; - mesc l("I really should follow Morcant into his house."); - close; -} - -008-2-32,40,37,0 script #MQ2Cutscene2WAYD NPC_HIDDEN,1,0,{ - end; -OnTouch: - if (getmap() == "008-2-32") end; - slide 40, 36; - dispbottom l("But you just arrived! Seriously. Stop."); - end; -} - diff --git a/npc/008-1-1/galimatia.txt b/npc/008-1-1/galimatia.txt deleted file mode 100644 index 6b3bfabe..00000000 --- a/npc/008-1-1/galimatia.txt +++ /dev/null @@ -1,431 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// The other player I've forgot the name -// Livio -// Jesusalva -// Description: -// Galimatia the beekeeper. -// KEEP item_db.conf updated as well - -function script usePurificationPotion { - // Check quest status, if not in a quest provide default item behaviour - if (getq(ArgaesQuest_Galimatia) == 1) { - // Do as requested by quest - if (isin("008-1-1", 95, 45, 99, 48)) { - setq(ArgaesQuest_Galimatia, 2); - message strcharinfo(0), l("Done. Maybe it's time to ask Galimatia what to do now."); - delitem PurificationPotion, 1; - } else { - message strcharinfo(0), l("Hmm... I'm sure that is not the right place to put it."); - return true; - } - } else return false; -} - -function script useFertilityPotion { - // Check quest status, if not in a quest provide default item behaviour - if (getq(ArgaesQuest_Galimatia) == 3) { - // Do as requested by quest - if (isin("008-1-1", 95, 45, 99, 48)) { - setq(ArgaesQuest_Galimatia, 4); - message strcharinfo(0), l("All right! I've poured even this one.."); - delitem FertilityPotion, 1; - } else { - message strcharinfo(0), l("Hmm... This one is supposed to be poured where the other one were."); - return true; - } - } else return false; -} - -// ------------------------------------ -008-1-1,113,59,0 script Galimatia NPC_GALIMATIA,{ - function advanceQuest; - function NPCdemandsIngredients; - function QuestPart0; - function QuestPart1; - function QuestPart2; - function QuestPart3; - function QuestPart4; - function QuestPart5; - function QuestPart6; - function galimatiaQuestDaily; - - switch(getq(ArgaesQuest_Galimatia)) { - case 0: QuestPart0(); break; - case 1: QuestPart1(); break; - case 2: QuestPart2(); break; - case 3: QuestPart3(); break; - case 4: QuestPart4(); break; - case 5: QuestPart5(); break; - case 6: QuestPart6(); break; - case 7: galimatiaQuestDaily(); break; - default: - mesq l("[Invalid quest status! %d, check script]", getq(ArgaesQuest_Galimatia)); - } - close; - - -// FIXME comment better -// Makes NPC to ask for ingredients -function NPCdemandsIngredients { - mesq l("Fine. The land is healthy now but nothing will grow yet. This time I need you to get:"); - printIngredients(.REQ1_INGREDIENTS, .REQ1_INGREDIENTS_AMOUNT); - mesq l("So making a %s will make things easier.", getitemlink(.REQ1_OUTPUT)); - if (NPCcrafting( - .REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT, - .REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT, - l("Okay. Give me a second..."), - l("Nope. You don't have enough ingredients for that."), - l("I can't give you nothing if you don't leave some room for it!") - ) - ) { - advanceQuest(); - mesq l("You must now pour it over the land again in the same spot."); - } - close; - return; -} - - -//----------------- - -function advanceQuest { - setq(ArgaesQuest_Galimatia, getq(ArgaesQuest_Galimatia) + 1); - return; -} - -/* -You arrive and get off the boat and walk down a path to a farm where there is a Bee farmer named Galimatia. -Her Bees have moved to somewhere else, because his field of flowers has died from a blight. He needs some way to still gather honey to earn his living. -Galimatia needs to tend to other work and can’t get away, so she asks player for some help. She sends player after 5 Pink Petals and 1 Bottle of Water. -*/ - -function QuestPart0 { - speech - l("Hello."), - l("If only someone could help me to make my flowers bloom again."), - l("I just dont know what to do. Perhaps all gets better when I stay here, whining and waiting. Please, leave me alone."); - next; - - select( - l("What about making some fertilizing-something?"), - l("I don't have time to spend on flowers.") - ); - mes ""; - mesn; - - switch(@menu) { - case 1: - mesq l("All right! I need you to get:"); - printIngredients(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT); - mesq l("So I can make a %s out of it.", getitemlink(.REQ0_OUTPUT)); - if (NPCcrafting( - .REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT, - .REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT, - l("Have you got those things with you?"), - l("Okay. Give me a second..."), - l("Nope. You don't have enough ingredients for that."), - l("I can't give you nothing if you don't leave some room for it!") - ) - ) { - advanceQuest(); - mesq l("You must now pour it over the land."); - } - close; - break; - default: - // FIXME This got to be improved in other script parts as well - mesq - any( - l("Gave up already?"), - l("Okay..."), - l("Go stay afk in TMW Legacy if you don't want to make yourself useful."), - l("Hehe, hehe. Well, come back if you change your mind." - ) - ); - close; - } - return; -} - -/* -She made a Purification Potion out of ingredients to heal the land and gives it to the player and says it must be poured over the land (marked in some way. Like in the Orum and Waric follow-up quest). -*/ -function QuestPart1 { - if(checkForItems(.REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT)) { - speech - l("What's up? You want me to show how to open a bottle and pour its content on the ground?"); - } else { - speech - l("Why you don't have a %s with you? You need me to make another one?", getitemlink(.REQ0_OUTPUT)); - if (askyesno() == ASK_NO) { - mesq l("Come on, stop wasting my time!"); - close; - } else{ - if (NPCcrafting( - .REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT, - .REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT, - l("Again, do you have what I need to make that?"), - l("Here we go again..."), - l("No! Have you already forgot what I need for it?"), - l("You don't even have the space in your inventory to carry it!!! Oh, man you are a disaster...") - ) - ) { - // FIXME Put some messages about making again the potion so the NPC can look different and react like it was somewhat disturbed by player failure - mesq l("Remember: you must pour it over the land."); - } - } - } - close; - return; -} - -/* -If you weren't able to trash the potion, the land is now healed, but nothing grows. Galimatia is happy the land is well and wants to help. She sends player to get 1 Bottle of Water, 10 Maggot Slime and 5 Mauve Herb. From this she makes a Fertility Potion. Again she gives it to the player and says it must be poured in the same place. Player uses it and the effect comes again. -*/ - - -function QuestPart2 { - mesn; - mesq l("Fine. The land is healthy now but nothing will grow yet. This time I need you to get:"); - printIngredients(.REQ1_INGREDIENTS, .REQ1_INGREDIENTS_AMOUNT); - mesq l("So making a %s will make things easier.", getitemlink(.REQ1_OUTPUT)); - if (NPCcrafting( - .REQ1_INGREDIENTS, .REQ1_INGREDIENTS_AMOUNT, - .REQ1_OUTPUT, .REQ1_OUTPUT_AMOUNT, - l("Have you got what we need?"), - l("Here it is!"), - l("No! You haven't!"), - l("I can't give you nothing if you don't leave some room for it!") - ) - ) { - advanceQuest(); - mesq l("You must now pour it over the land again in the same spot."); - } - close; - return; -} - - -function QuestPart3 { - if(checkForItems(.REQ1_OUTPUT, .REQ1_OUTPUT_AMOUNT)) { - speech - l("Come on pal, what's the matter?"); - } else { - speech - l("Got drunk with the %s? You need me to make another one?", getitemlink(.REQ1_OUTPUT)); - if (askyesno() == ASK_NO) { - mesn; - mesq l("Come on, stop wasting my time!"); - close; - } else{ - if (NPCcrafting( - .REQ1_INGREDIENTS, .REQ1_INGREDIENTS_AMOUNT, - .REQ1_OUTPUT, .REQ1_OUTPUT_AMOUNT, - l("Again, do you have what I need to make that?"), - l("Here we go again..."), - l("No! Have you already forgot what I need for it?"), - l("I can't give you nothing if you don't leave some room for it!") - ) - ) { - // FIXME Put some messages about making again the potion so the NPC can look different and react like it was somewhat disturbed by player failure - mesq l("Remember: you must now pour it over the land."); - } - } - } - close; - return; -} - -/* -Part 3 -Flowers now can be planted. Therefore Galimatia needs help of Blossom. She sends the player to her to get 5 packages of flower seeds. -NOTE: Flower seeds are dropped directly from Clover Patches, however grass seeds are more common. -*/ - -function QuestPart4 { - speech - l("Thanks for the help earlier. The soil is now fertile thanks to your efforts."), - l("Do you know Blossom? She is the flower girl. Bees won't come without flowers."), - l("So, now I need %d %s.", .REQ2_INGREDIENTS_AMOUNT, getitemlink(.REQ2_INGREDIENTS)); - next; - // We don't take player items without asking - mesc l("Deliver items to Blossom?"); - if (askyesno() == ASK_NO) close; - if(checkForItems(.REQ2_INGREDIENTS, .REQ2_INGREDIENTS_AMOUNT)) { - advanceQuest(); - speech - l("Nice, gimme that!"), - l("I'll go plant them. Now go, maybe I need your help again later."); - } else { - speech - l("Go get some!"); - } - close; - return; -} - -/* -The fields are in bloom and the Bees hard at work bringing stuff to the Beehives. -Galimatia is thankful for your help and offers to pay you a larger reward if you help her collect honey as well. -Honey is dropped by Beehives. To gather honey from Beehives you must defeat the bees protecting it, which will attack you when you attack their hive. When you kill a hive, 2 - 3 aggro bees spawn. The player must kill them (which is not so easy). (Some hives don't have Honey and some do - 50% drop rate should do the trick). The hive is a mob just like the pink flowers. Four honey jars complete the quest. -Galimatia reassures you that these are giant bees and they will rebuild their hives quickly so it's not all as cruel as it may seem. - -Galimatia gives the player their reward: Player must select a simple Magic Wand (provides Healing Spell) or a Mana Torch (provides Fire Attack Spell), both can be used as a torch to keep angry bees away and a Jar of Honey. -*/ - -function QuestPart5 { - speech - l("Nice job."), - l("I've heard bees are scared of fire, you know."), - l("So, what do you want?"), - l("A %s or a %s?", getitemlink(.QUESTPRIZES[0]) , getitemlink(.QUESTPRIZES[1])); - select( - l("I want the %s!", getitemname(.QUESTPRIZES[0])), - l("A %s?!? Cool!!!", getitemname(.QUESTPRIZES[1])) - ); - if (!checkweight(.QUESTPRIZES[@menu-1], .QUESTPRIZES_AMOUNT[@menu-1])) { - mesq l("I can't give you a prize if you are overburdened. Make room in your inventory!"); - } - else{ - getitem(.QUESTPRIZES[@menu-1], .QUESTPRIZES_AMOUNT[@menu-1]); - advanceQuest(); - mesq l("Use those wisely and use safety glasses."); - } - close; - return; -} - -/* -Part 6 (Extra Quest) -This enables the player to receive a Rose Hat. Fighting the flowers that were just planted, the player will receive roses and / or tulips as a drop. in Part 3 Blossom may mention that she always is happy about receiving the rare Blue Rose. She trades the Rose Hat for 10 Blue Roses and a preparation fee of 1.000 GP. She offer this only after everything before is finished. -*/ - -function QuestPart6 { - mesn; - mesq l("Hello again! Do you want me to exchange %d %s and %d GP for a %s?", - .REQ3_INGREDIENTS_AMOUNT[0], getitemlink(.REQ3_INGREDIENTS[0]), - .REQ3_COST, getitemlink(.REQ3_OUTPUT) - ); - if (askyesno() == ASK_NO) { - mesq l("As you wish."); - close; - } else { - if(Zeny>=.REQ3_COST) { - if(NPCcrafting( - .REQ3_INGREDIENTS, .REQ3_INGREDIENTS_AMOUNT, - .REQ3_OUTPUT, .REQ3_OUTPUT_AMOUNT, - l("Do you have what I need?"), - l("Have fun!"), - l("Nope. I wont exchange for such less."), - l("I can't give you nothing if you don't leave some room for it!") - )) { - Zeny-=(.REQ3_COST); - advanceQuest(); - } - } else { - mesq l("Ain't working for free, pal!"); - } - } - close; - return; -} - -/* -Daily Part -Allows players to sell Honey for Galimatia -*/ -function galimatiaQuestDaily { - // DailyQuest(lvl, cost, count, item) - DailyQuest(10, 3, 1, Honey); - return; -} - -OnInit: - // NPC ITEM REQUESTS - setarray(.REQ0_INGREDIENTS, - BottleOfWater, - PinkPetal - ); - setarray(.REQ0_INGREDIENTS_AMOUNT, - 1, - 5 - ); - .REQ0_OUTPUT = PurificationPotion; - .REQ0_OUTPUT_AMOUNT = 1 ; - - setarray(.REQ1_INGREDIENTS, - BottleOfWater, - MaggotSlime, - MauveHerb - ); - setarray(.REQ1_INGREDIENTS_AMOUNT, - 1, - 10, - 5 - ); - .REQ1_OUTPUT = FertilityPotion; - .REQ1_OUTPUT_AMOUNT = 1; - - setarray(.REQ2_INGREDIENTS, FlowerSeeds); - setarray(.REQ2_INGREDIENTS_AMOUNT, 5); - - setarray(.QUESTPRIZES, - TrainingWand, - ManaTorch - ); - setarray(.QUESTPRIZES_AMOUNT, - 1, - 1 - ); - - setarray(.REQ3_INGREDIENTS, ABlueRose); - setarray(.REQ3_INGREDIENTS_AMOUNT, 10); - .REQ3_COST = 1000; - .REQ3_OUTPUT = RoseHat; - .REQ3_OUTPUT_AMOUNT = 1; - - .distance = 4; - end; -} - -// ------------------------------------ -// Bees Hotspot -008-1-1,93,46,0 script #GalimatiaInst NPC_HIDDEN,0,1,{ - end; - -// Transport -OnTouch: - if (getq(ArgaesQuest_Galimatia) >= 5) { - if (getmap() == "008-1-1") - warp "gali@matia", 94, 46; - else - warp "008-1-1", 92, 46; - } - end; - -// Populate -OnInstanceInit: - areamonster("gali@matia", 95, 45, 97, 46, strmobinfo(1, RedRose), RedRose, 1, "#GalimatiaInst::OnRed"); - areamonster("gali@matia", 95, 47, 99, 48, strmobinfo(1, YellowRose), YellowRose, 1, "#GalimatiaInst::OnYellow"); - monster("gali@matia", 99, 45, strmobinfo(1, BlueRose), BlueRose, 1, "#GalimatiaInst::OnBlue"); - end; - -// Respawn -OnRed: - sleep(60000); - areamonster("gali@matia", 95, 45, 97, 46, strmobinfo(1, RedRose), RedRose, 1, "#GalimatiaInst::OnRed"); - end; - -OnBlue: - sleep(120000); - monster("gali@matia", 99, 45, strmobinfo(1, BlueRose), BlueRose, 1, "#GalimatiaInst::OnBlue"); - end; - -OnYellow: - sleep(25000); - areamonster("gali@matia", 95, 47, 99, 48, strmobinfo(1, YellowRose), YellowRose, 1, "#GalimatiaInst::OnYellow"); - end; -} - diff --git a/npc/008-1-1/hal.txt b/npc/008-1-1/hal.txt deleted file mode 100644 index 88b93a79..00000000 --- a/npc/008-1-1/hal.txt +++ /dev/null @@ -1,131 +0,0 @@ -// Evol scripts. -// Author: -// Livio -// Micksha -// Description: -// Hal, former Captain of the Legion. -// Following: https://gitlab.com/evol/evol-narrative/-/raw/e819b2a213802f6ded9f9b7efd18b09b0bc27570/Storylines/4.West%20Argaes.txt -// THIS IS A PLACEHOLDER! - -008-1-1,58,27,0 script Hal NPC_HAL,{ -// Private function declarations -function advanceQuest; -function advanceQuest { - setq(General_CptHal, getq(General_CptHal) + 1); - return; -} - -function QuestPart0; -function QuestPart1; -function QuestPart2; -function QuestPart3; -function QuestPart4; -function QuestPart5; - - switch(getq(General_CptHal)) { - case 0: QuestPart0(); break; - case 1: QuestPart1(); break; - case 2: QuestPart2(); break; - case 3: QuestPart3(); break; - case 4: QuestPart4(); break; - case 5: QuestPart5(); break; - default: - mesq l("[Invalid quest status: %d, check script]", getq(General_CptHal)); - } - close; - -// Haven't met Thamas? MOVE ALONG CITIZEN!!! -function QuestPart0 { - speech l("MOVE ALONG CITIZEN!!!"); -// l("I was just having a nap, now WildX summons me to stand here! What a crap."), -// l("Please, ask elanore to !slap him for me when you see them."); - close; -} - -function QuestPart1 { - speech l("MOVE ALONG C..."); - select l("Hey, hey... I've been talking with one of your comrades, Thamas."); - speech l("So what?"); - select l("What's so special about a mission assigned to a picky soldier?"); - mesq l("You see the soldiers staring each other and then at you."); - speech l("You think that I'm going to disclose that to you???"); - select - l("I just want to earn something to make a living."), - l("Ah, so special mission is secret mission too? Sorry if I've bothered you."); - - if (@menu==1) { - speech l("You look like anything but military personnel... Okay since the Brotherhood will discharge their quivers on us at the very first encounter I guess that we can make a good use of you."); - speech l("We cannot get close to Hurnscald in Legion uniforms so we may need you to get some supplies. However, stay away from Hurnscald if you can."); - speech l("Bring us some food supplies to help us feed the troops. We need:"); - printIngredients(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT); - next; - advanceQuest(); - } - speech l("Now, get out of my face."); - close; -} - -function QuestPart2 { - if (checkForItems(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT)){ - if (NPCcrafting( - .REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT, - .REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT, - l("Have you got those things with you?"), - l("Fine. Here is your reward."), - l("Go find those supplies! Don't waste my time!"), - l("Your inventory is full, make room if you want your reward!") - ) - ) - { - BaseExp += 15 * BaseLevel; - Zeny += 150; - getitem(.REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT); - advanceQuest(); - speech l("Now I need you to explore the area looking for Sergeant Ryan. I'm not having any report from him since a lot of time."); - speech l("I want you to go find him. He should not be that far from here."); - } - } -} - -function QuestPart3 { - speech l("Any luck finding Ryan?"); - select l("Negative."); - speech l("Scout the zone better! He must be somewhere nearby."); - close; -} - -function QuestPart4 { - speech l("So?"); - select l("Found priv... Ehm, I've found Sergeant Ryan. He is hurt and cannot walk right now."); - speech l("I don't have enough men to send after Sergeant Ryan. Provide him some sort of support until he recovers."); - select l("Roger that. Private %s, over!", strcharinfo(PC_NAME)); - close; -} - - -function QuestPart5 { - select l("Good news! Sgt.Ryan is fine now and is going to go on with his mission."); - speech l("Well done."); - next; - speech l("MOVE ALONG!!! I don't need you anymore."); - close; -} - -OnInit: - // NPC ITEM REQUESTS - setarray(.REQ0_INGREDIENTS, - MoubooSteak, - MoubooMilk, - Honey - ); - setarray(.REQ0_INGREDIENTS_AMOUNT, - 5, - 5, - 1 - ); - .REQ0_OUTPUT = BottleOfWater; - .REQ0_OUTPUT_AMOUNT = 1 ; - - .distance = 4; - end; -} \ No newline at end of file diff --git a/npc/008-1-1/koga.txt b/npc/008-1-1/koga.txt deleted file mode 100644 index 9908ff40..00000000 --- a/npc/008-1-1/koga.txt +++ /dev/null @@ -1,34 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Koga in Argaes -// THIS IS A PLACEHOLDER! - -008-1-1,27,60,0 script Gema IV#008-1-1 NPC_LA_MARINE,{ - function kogaWrongMap; - if (getmap() != "008-1-1") - kogaWrongMap(); - - mesc l("Returning to Artis is free, but coming back to Argaes after doing this may not be so."); - next; - mesc l("Return to Artis?"); - if (askyesno() == ASK_YES) - { - closeclientdialog; - setmount 0; - EnterTown("Artis", true); - dispbottom l("The travel is a blur, you cannot remember much of it before reaching %s.", l("Artis")); - } - close; - -function kogaWrongMap { - mesc l("I've just arrived here. I should enter in Morcant's house I guess."); - close; -} - -OnInit: - .distance = 7; - .alwaysVisible = true; - end; -} diff --git a/npc/008-1-1/morcant.txt b/npc/008-1-1/morcant.txt deleted file mode 100644 index 5421c771..00000000 --- a/npc/008-1-1/morcant.txt +++ /dev/null @@ -1,63 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Morcant the Captain, taking care on harbor issues. -// THIS IS A PLACEHOLDER! - -008-1-1,58,57,0 script Morcant NPC_MORCANT,{ - speech - l("Hello."), - l("My name is Morcant. I am a Captain, a bit bored since this harbor is not frequented much."), -// l("I would like to offer you food and tell you stories, but.. have you ever heard of WildX? I won't need to say more, do I?"); - l("The only floating ship I've seen so far was the one with Legion soldiers sent to scout around."), - l("It was my first time that I've met someone from Aemil."), - l("I don't like to see armed people lurking around but feel free to stay as long as you wish but don't cause trouble."), - next; - select - l("Not really but okay...?"), - l("Actually, I am after your Stew recipe!"), - l("Anything to do around these parts?"), - l("Can you tell me the directions again?"); - mes ""; - switch (@menu) - { - case 2: - mesn; - mesq l("Hohoho! That is a family's trade secret!"); // Merry Christmas? - if (!getq(General_SmearedHands)) { - next; - mesn; - mesq l("You don't even know how to cook. %s.. Ah, good old times.", any( - l("I've learned cooking with Yannika."), - l("I had tasty barbecue with Crane.") - )); - } - break; - case 3: - mesn; - mesq l("Hmm, you might want to ask Galimatia, my neighbor."); - next; - mesn; - mesq l("She is always taking care of her bees, though."); - break; - case 4: - mesn; - mesq l("There should be a fair number of signposts around. Anyway."); - next; - mesn; - mesq l("Go east to reach Hurnscald. Just follow the road, really."); - next; - mesn; - mesq l("And do not go south. It is haunted."); - break; - } - close; - -OnInit: -OnInstanceInit: - .distance = 4; - .speed=120; - //.alwaysVisible=true; - end; -} diff --git a/npc/008-1-1/sign.txt b/npc/008-1-1/sign.txt deleted file mode 100644 index 3b22dfa9..00000000 --- a/npc/008-1-1/sign.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol scripts. -// Authors: -// Micksha -// Description: -// Sign pillars in West Woodland. - -008-1-1,53,58,0 script Sign#008-1-1-merchant NPC_NO_SPRITE,{ - npctalkonce l("Merchant House"); - close; - -OnInit: - .distance = 1; - end; -} -008-1-1,157,87,0 script Sign#008-1-1-central NPC_NO_SPRITE,{ - npctalkonce l("Right: Hurnscald | Down: Swamp"); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/008-1-1/soldiers.txt b/npc/008-1-1/soldiers.txt deleted file mode 100644 index 744635eb..00000000 --- a/npc/008-1-1/soldiers.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Legion Guards serving Hal. -// THIS IS A PLACEHOLDER! - - -// FIXME We better put some more random answers - -008-1-1,62,28,0 script Soldier#1 NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ - speech - l("Hi!"), - l("I am not allowed to talk to strangers."); - close; - -OnInit: - .distance = 4; - end; -} - -008-1-1,54,30,0 script Soldier#2 NPC_HUMAN_MALE_LEGION_ARTIS,{ - speech - l("Hi!"), - l("I am not allowed to talk to strangers."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1-2/_import.txt b/npc/008-1-2/_import.txt deleted file mode 100644 index f49fc06e..00000000 --- a/npc/008-1-2/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-1-2: Swamp -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-1-2/_warps.txt", -"npc/008-1-2/sign.txt", diff --git a/npc/008-1-2/_warps.txt b/npc/008-1-2/_warps.txt deleted file mode 100644 index c7ee0e45..00000000 --- a/npc/008-1-2/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-1-2: Swamp warps -008-1-2,181,31,0 warp #008-1-2_181_31 1,0,008-1-1,180,197 -008-1-2,249,48,0 warp #008-1-2_249_48 0,0,008-1,23,216 diff --git a/npc/008-1-2/sign.txt b/npc/008-1-2/sign.txt deleted file mode 100644 index 587d090e..00000000 --- a/npc/008-1-2/sign.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Evol scripts. -// Authors: -// Micksha -// Description: -// Sign pillars in West Woodland. - -008-1-2,218,80,0 script Sign#008-1-2-northeast NPC_NO_SPRITE,{ - npctalkonce l("Up: West Woodland | Right: Dimond's Cove | Left: Sorentown"); - close; -OnInit: - .distance = 2; - end; -} - -008-1-2,145,80,0 script Sign#008-1-2-sorentown NPC_NO_SPRITE,{ - npctalkonce l("Left: Asphodel Moor | Right: All directions"); - close; - -OnInit: - .distance = 2; - end; -} - -008-1-2,39,192,0 script Sign#008-1-2-asphodel NPC_NO_SPRITE,{ - npctalkonce l("Down: Graveyard (under construction) | Up: All directions"); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/008-1/4144.txt b/npc/008-1/4144.txt deleted file mode 100644 index 2c0ec327..00000000 --- a/npc/008-1/4144.txt +++ /dev/null @@ -1,90 +0,0 @@ -// Evol Script -// Author: -// Jesusalva -// WildX -// Description: -// Andrei is not an human, according to studies conducted by TMW Team. -// He seems to be a highly advanced artificial intelligence. -// The fact that he was never seen contributes to this theory. -// Other members opinions: -// “4144 is a bot which sits on Hurnscald.” ~ Sagratha, 2016 - -008-1,246,105,0 script Andrei NPC_PLAYER,{ - function sittingBot; - function zealiteLore; - // TODO: Maybe we should use Karma here? For discussion - @is_billygates=(strcharinfo(0) == "WildX"); - speech - l("Hi."); - next; - do - { - select - l("Hello."), - l("Can I sit on you?"), - l("What are you doing?"); - mes ""; - switch (@menu) - { - case 1: - break; - case 2: - sittingBot(); - break; - case 3: - zealiteLore(); - break; - } - } while (@menu != 1); - - close; - - // Sitting Bot - function sittingBot - { - // This is just an easter egg (for now) - if (@is_billygates) { - speech S_LAST_NEXT, - l("Only if everyone agrees. You'll need to do a vote for that."), - l("Just kidding."); - } - - // Main dialog - speech S_LAST_NEXT, - l("I don't care, but there might be some adventurers and staff who might care."), - l("That's why you should always ask. This is good social etiqutte, you know?"), - l("Anyway, I would advise you to sit closer to the Soul Menhir, instead."); - return; - } - - // Zealite Info - function zealiteLore - { - speech S_LAST_NEXT, - l("I am maintaing Hurnscald's Soul Menhir in working conditions."), - l("Soul Menhirs are pieces of Zealite Ore, really needed to cast magic around here."), - l("They are not like your usual Terra Ore. Zealite is way more magical and powerful."), - l("This is why sometimes people try to steal shards from it... Poor fools."); - // Note: On TMW-BR, it is possible to "hit" Soul Menhirs for shards, which allow you to - // instantly teleport back to savepoint, even if lore-wise that was prohibted. - // This reference doesn't means it is actually possible to try that at all here. - return; - } - -// TODO: Replace with a good sprite and dye robes in green -OnInit: - .@npcId = getnpcid(.name$); - setunitdata(.@npcId, UDT_HEADTOP, FancyHat); // Wizard Hat - setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe); - setunitdata(.@npcId, UDT_HEADBOTTOM, CottonGloves); - setunitdata(.@npcId, UDT_WEAPON, CottonBoots); - - // What is 4144's hair? He is always wearing his wizard hat - setunitdata(.@npcId, UDT_HAIRSTYLE, 7); - setunitdata(.@npcId, UDT_HAIRCOLOR, rand(1,20)); - npcsit; - - .distance = 4; - end; -} - diff --git a/npc/008-1/_import.txt b/npc/008-1/_import.txt index d09f8c88..d0aa1c6d 100644 --- a/npc/008-1/_import.txt +++ b/npc/008-1/_import.txt @@ -1,29 +1,13 @@ -// Map 008-1: Hurnscald +// Map 008-1: Hurnscald Outskirts // This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-1/4144.txt", "npc/008-1/_mobs.txt", "npc/008-1/_warps.txt", -"npc/008-1/auldsbel.txt", +"npc/008-1/andra.txt", +"npc/008-1/annualeaster.txt", "npc/008-1/banu.txt", -"npc/008-1/blossom.txt", -"npc/008-1/confused-tree.txt", -"npc/008-1/crane.txt", -"npc/008-1/doors.txt", +"npc/008-1/diryn.txt", +"npc/008-1/dock.txt", +"npc/008-1/george.txt", "npc/008-1/hinnak.txt", -"npc/008-1/jack.txt", "npc/008-1/mapflags.txt", -"npc/008-1/marine.txt", "npc/008-1/mikhail.txt", -"npc/008-1/milly.txt", -"npc/008-1/old-man.txt", -"npc/008-1/old-woman.txt", -"npc/008-1/oscar.txt", -"npc/008-1/rossy.txt", -"npc/008-1/sabine.txt", -"npc/008-1/sergeant-ryan.txt", -"npc/008-1/shop.txt", -"npc/008-1/sign.txt", -"npc/008-1/snarfles.txt", -"npc/008-1/soul-menhir.txt", -"npc/008-1/voltain.txt", -"npc/008-1/wateranimation.txt", diff --git a/npc/008-1/_mobs.txt b/npc/008-1/_mobs.txt index 4ca22849..06dc1b79 100644 --- a/npc/008-1/_mobs.txt +++ b/npc/008-1/_mobs.txt @@ -1,124 +1,10 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-1: Hurnscald mobs -008-1,270,86,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,271,89,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,273,87,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,276,88,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,275,90,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,280,87,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,279,89,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,282,89,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,283,86,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,203,70,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,198,70,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,193,70,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,188,70,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,183,70,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,185,72,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,203,74,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,198,74,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,193,74,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,188,74,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,180,76,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,185,76,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,190,76,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,195,76,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,198,78,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,193,78,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,188,78,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,183,78,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,180,80,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,200,80,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,160,97,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,154,95,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,148,97,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,160,101,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,156,105,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,154,99,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,152,101,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,152,105,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,146,99,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,146,103,0,0 monster Manana Tree 1017,1,420000,240000 -008-1,200,120,2,6 monster Mauve Plant 1036,3,1000,20000 -008-1,184,53,2,2 monster Cobalt Plant 1039,2,1000,30000 -008-1,183,143,6,2 monster Alizarin Plant 1037,3,1000,25000 -008-1,169,142,2,2 monster Pink Flower 1034,1,100,10000 -008-1,159,145,2,2 monster Pink Flower 1034,1,100,20000 -008-1,148,150,2,2 monster Pink Flower 1034,1,100,50000 -008-1,85,120,7,9 monster Mouboo 1023,5,30000,60000 -008-1,79,63,11,2 monster Spider 1044,2,4000,8000 -008-1,290,101,5,3 monster Butterfly 1032,3,10000,10000 -008-1,267,127,2,2 monster Butterfly 1032,2,10000,10000 -008-1,235,118,9,9 monster Butterfly 1032,3,10000,10000 -008-1,241,58,5,3 monster Butterfly 1032,3,10000,10000 -008-1,292,165,5,3 monster Butterfly 1032,3,10000,10000 -008-1,207,139,5,3 monster Butterfly 1032,3,10000,10000 -008-1,165,147,5,3 monster Butterfly 1032,3,10000,10000 -008-1,181,213,14,10 monster Log Head 1031,2,5000,30000 -008-1,244,160,31,11 monster Mana Bug 1035,7,10000,10000 -008-1,232,60,17,26 monster Mana Bug 1035,7,10000,10000 -008-1,275,103,1,0 monster Clover Patch 1033,1,10000,30000 -008-1,277,152,2,1 monster Clover Patch 1033,1,10000,30000 -008-1,203,130,1,0 monster Clover Patch 1033,1,10000,30000 -008-1,156,149,1,0 monster Clover Patch 1033,1,10000,30000 -008-1,193,113,1,0 monster Clover Patch 1033,1,10000,30000 -008-1,289,140,6,2 monster Maggot 1026,3,500,10000 -008-1,285,65,6,2 monster Maggot 1026,3,500,10000 -008-1,170,70,6,2 monster Maggot 1026,3,500,10000 -008-1,65,136,6,2 monster Maggot 1026,3,500,10000 -008-1,47,132,11,15 monster Forest Maggot 1028,7,500,2500 -008-1,120,113,16,11 monster Butterfly 1032,3,10000,10000 -008-1,104,183,11,7 monster Log Head 1031,3,5000,30000 -008-1,203,167,9,10 monster Log Head 1031,2,5000,30000 -008-1,66,185,7,11 monster Log Head 1031,2,5000,30000 -008-1,258,68,5,3 monster Pinkie 1030,2,3000,12000 -008-1,257,88,5,3 monster Pinkie 1030,2,3000,12000 -008-1,295,80,4,5 monster Pinkie 1030,3,2000,8000 -008-1,295,62,5,3 monster Pinkie 1030,2,3000,12000 -008-1,279,46,17,7 monster Silkworm 1040,4,3000,6000 -008-1,220,168,17,7 monster Silkworm 1040,2,3000,6000 -008-1,144,160,21,9 monster Silkworm 1040,4,3000,6000 -008-1,68,167,14,9 monster Silkworm 1040,3,3000,6000 -008-1,46,193,16,28 monster Grass Snake 1042,7,3000,12000 -008-1,166,114,14,5 monster Spiky Mushroom 1049,2,3000,6000 -008-1,128,48,4,5 monster Bandit 1063,1,4000,11000 -008-1,186,33,6,7 monster Spiky Mushroom 1049,4,3000,6000 -008-1,84,77,4,2 monster Scorpion 1043,1,6000,12000 -008-1,106,62,7,4 monster Mouboo 1023,1,30000,120000 -008-1,211,65,2,2 monster Pink Flower 1034,1,100,10000 -008-1,213,123,2,2 monster Pink Flower 1034,1,100,10000 -008-1,37,210,3,12 monster Wicked Mushroom 1050,7,3000,12000 -008-1,54,94,14,13 monster Spiky Mushroom 1049,2,3000,6000 -008-1,146,183,36,25 monster Forest Maggot 1028,12,500,2500 -008-1,77,96,7,5 monster Forest Maggot 1028,3,500,2500 -008-1,185,187,21,11 monster Butterfly 1032,3,10000,10000 -008-1,267,68,30,35 monster Squirrel 1041,7,10000,30000 -008-1,178,180,36,30 monster Squirrel 1041,12,10000,30000 -008-1,161,34,6,7 monster Scorpion 1043,2,6000,12000 -008-1,47,98,23,49 monster Butterfly 1032,5,10000,10000 -008-1,140,144,2,6 monster Mauve Plant 1036,3,1000,2000 -008-1,192,147,3,2 monster Gamboge Plant 1038,2,1000,10000 -008-1,197,136,2,5 monster Cobalt Plant 1039,2,1000,30000 -008-1,109,93,14,5 monster Spiky Mushroom 1049,2,3000,6000 -008-1,111,68,8,3 monster Robin Bandit 1064,2,8000,12000 -008-1,126,80,8,3 monster Bandit 1063,2,5500,8000 -008-1,122,44,4,7 monster Robin Bandit 1064,1,3000,8000 -008-1,259,116,31,20 monster Maggot 1026,6,500,10000 -008-1,221,70,8,11 monster Small Frog 1086,3,3000,30000 -008-1,190,166,8,11 monster Small Frog 1086,2,3000,30000 -008-1,88,197,8,26 monster Small Frog 1086,4,3000,30000 -008-1,228,62,15,11 monster Big Frog 1087,1,6000,60000 -008-1,225,162,15,11 monster Big Frog 1087,1,6000,60000 -008-1,88,190,15,11 monster Big Frog 1087,1,6000,60000 -008-1,124,173,20,23 monster Mouboo 1023,5,30000,60000 -008-1,162,42,36,12 monster Butterfly 1032,3,10000,10000 -008-1,186,52,2,0 monster Mauve Plant 1036,1,1000,20000 -008-1,179,25,5,3 monster Pinkie 1030,2,3000,12000 -008-1,228,107,5,12 monster Brotherhood Fighter 1081,2,6000,18000 -008-1,249,143,18,3 monster Brotherhood Fighter 1081,2,12000,18000 -008-1,283,158,7,5 monster Forest Maggot 1028,3,500,2500 -008-1,66,191,17,27 monster Forest Maggot 1028,5,5000,25000 -008-1,55,204,17,8 monster Spider 1044,2,4000,8000 -008-1,73,54,17,12 monster Bluepar 1088,2,12000,36000 -008-1,33,33,11,12 monster Wolvern 1117,2,10000,10000 -008-1,82,162,38,14 monster Wolvern 1117,3,18000,60000 +// Map 008-1: Hurnscald Outskirts mobs +008-1,0,0,0,0 monster CroconutMob 1014,10,0,0 +008-1,0,0,0,0 monster Crafty 1018,18,0,0 +008-1,0,0,0,0 monster Piou 1002,30,0,0 +008-1,0,0,0,0 monster Bee 1029,2,270000,180000 +008-1,0,0,0,0 monster Mana Bug 1035,2,60000,30000 +008-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +008-1,0,0,0,0 monster Gamboge Plant 1038,10,30,20 +008-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 diff --git a/npc/008-1/_warps.txt b/npc/008-1/_warps.txt index af0621c9..e262d290 100644 --- a/npc/008-1/_warps.txt +++ b/npc/008-1/_warps.txt @@ -1,33 +1,10 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-1: Hurnscald warps -008-1,276,122,0 warp #008-1_276_122 0,0,008-2-0,26,23 -008-1,274,125,0 warp #008-1_274_125 0,0,008-2-0,23,34 -008-1,259,118,0 warp #008-1_259_118 0,0,008-2-1,33,42 -008-1,261,111,0 warp #008-1_261_111 0,0,008-2-1,38,27 -008-1,236,102,0 warp #008-1_236_102 0,0,008-2-2,28,33 -008-1,260,105,0 warp #008-1_260_105 0,0,008-2-6,27,32 -008-1,272,102,0 warp #008-1_272_102 0,0,008-2-7,36,28 -008-1,292,118,0 warp #008-1_292_118 0,0,008-2-8,36,38 -008-1,243,115,0 warp #008-1_243_115 0,0,008-2-9,30,34 -008-1,273,116,0 warp #008-1_273_116 0,0,008-2-10,37,33 -008-1,275,74,0 warp #008-1_275_74 0,0,008-2-16,25,33 -008-1,281,103,0 warp #008-1_281_103 0,0,008-2-12,30,31 -008-1,122,114,0 warp #008-1_122_114 0,0,008-2-22,30,34 -008-1,71,128,0 warp #008-1_71_128 0,0,008-2-23,52,39 -008-1,106,221,0 warp #008-1_106_221 0,0,008-2-24,32,45 -008-1,236,39,0 warp #008-1_236_39 0,0,008-2-17,52,39 -008-1,151,80,0 warp #008-1_151_80 0,0,008-2-15,35,33 -008-1,256,203,0 warp #008-1_256_203 0,0,008-2-20,25,31 -008-1,128,138,0 warp #008-1_128_138 0,0,008-3-1,35,34 -008-1,250,23,0 warp #008-1_250_23 1,0,008-3-4,88,76 -008-1,283,26,0 warp #008-1_283_26 0,0,008-3-3,37,56 -008-1,287,113,0 warp #008-1_287_113 0,0,008-2-8,26,28 -008-1,252,211,0 warp #008-1_252_211 0,0,008-2-21,22,42 -008-1,257,130,0 warp #008-1_257_130 0,0,008-2-28,25,31 -008-1,233,131,0 warp #008-1_233_131 0,0,008-2-29,36,24 -008-1,287,133,0 warp #008-1_287_133 0,0,008-2-30,52,39 -008-1,20,85,0 warp #008-1_20_85 0,1,008-1-1,246,85 -008-1,165,171,0 warp #008-1_165_171 0,0,008-3-2,175,21 -008-1,289,125,0 warp #008-1_289_125 0,0,008-2-31,29,25 -008-1,22,216,0 warp #008-1_22_216 0,0,009-1,248,48 -008-1,109,82,0 warp #008-1_109_82 0,0,008-3-5,92,107 +// Map 008-1: Hurnscald Outskirts warps +008-1,54,61,0 warp #008-1_54_61 0,2,009-1,25,36 +008-1,79,80,0 warp #008-1_79_80 3,0,009-1,48,54 +008-1,127,61,0 warp #008-1_127_61 0,1,009-1,96,36 +008-1,79,49,0 warp #008-1_79_49 3,0,009-1,48,25 +008-1,24,62,0 warp #008-1_24_62 0,3,011-1,123,61 +008-1,79,17,0 warp #008-1_79_17 3,0,018-1,78,97 +008-1,79,102,0 warp #008-1_79_102 3,0,007-1,68,22 +008-1,132,101,0 warp #008-1_132_101 2,0,007-1,122,23 diff --git a/npc/008-1/andra.txt b/npc/008-1/andra.txt new file mode 100755 index 00000000..bf9b5abe --- /dev/null +++ b/npc/008-1/andra.txt @@ -0,0 +1,170 @@ + +008-1,36,26,0 script Andra NPC201,{ + @water_amount = 1; + @seeds_amount = 4; + if ($@andra_status == 1) goto L_Planting; + if (BaseLevel < 30) goto L_TooYoung; + if (FLAGS & FLAG_ANDRA_HELPED) goto L_Return; + mes "[Andra]"; + mes "\"Hello, my name is Andra. You see those nice trees? I planted every single one of them! I'm very proud of my work!\""; + next; + menu + "Nice! I imagine you planted them a long time ago, right?", L_Next, + "Sorry, but I'm not interested in plants and trees.", L_DislikePlants; + +L_Next: + mes "[Andra]"; + mes "\"That is the fun part... It took only some months... and look how healthy and beautiful they are!\""; + next; + menu + "How is that possible?", L_Next1; + +L_Next1: + mes "[Andra]"; + mes "\"A few years ago, a nice woman from Tulimshar did something amazing to the land around here... I guess her name was Eomie. I have no idea what she did, but since she worked on this land, everything you plant here will grow really fast!\""; + next; + mes "\"But I am very worried about something she told me when she left... She warned me that this place needs constant care. If one small spot is not cultivated for a long time, it will become less and less fertile.\""; + next; + mes "And she also told me that this soil is so fertile because it has a lot of nutrients not only on this side, but everywhere. So it is certain that all soil in this place will become weaker if we let a lot of unfertilized spots...\""; + next; + menu + "That sounds bad! But you just need to keep planting, right?", L_Next2; + +L_Next2: + mes "[Andra]"; + mes "\"Exactly! But it is a big place. And I don't have too much money to buy seeds. If only I could find someone who could help me... ah... I know you are probably busy, but since you are here, would you like to help me in this noble task?\""; + menu + "Of course! What can I do to help you?", L_Next3, + "Not right now, I'm really busy.", L_Busy; + +L_Next3: + mes "[Andra]"; + mes "\"Yay! I knew you would help me! I just need seeds and water... I think " + @seeds_amount + " Grass Seeds and " + @water_amount + " Bottle(s) of Water should be enough to grow some plants on the place. If you give the items, you can let the rest with me.\""; + next; + menu + "I don't have it right now, but I will come back later.", L_close, + "Here are the seeds and the water.", L_Next4; + +L_Next4: + if (countitem("BottleOfWater") < @water_amount || countitem("GrassSeed") < @seeds_amount) goto L_NotEnough; + if ($@spawned_plants >= $@MAX_GLOBAL_PLANTS) goto L_Gather; + mes "[Andra]"; + mes "\"Great! Thank you for you help. If you have more items and want to help again, feel free to talk to me. We just have to be careful to not oversoak the soil with water.. but you don't need to worry, I will know when it is the right time to stop planting."; + next; + delitem "BottleOfWater", @water_amount; + delitem "GrassSeed", @seeds_amount; + FLAGS = FLAGS | FLAG_ANDRA_HELPED; + mes "Andra pours some water in a lot of different places and then throws some seeds to the sky. The wind carries some of them really far from her."; + close2; + goto L_PreSummon; + +L_PreSummon: + $@andra_status = 1; + $@farmer$ = strcharinfo(0); + startnpctimer; + end; + +OnTimer1000: + $@plant_id = rand(1029,1032); + areamonster "008-1",44,18,135,46,"plant",$@plant_id,$@PLANTS_PER_SEED, "Andra::OnPlantDeath"; + if (attachrid(getcharid(3,$@farmer$)) == 0) + goto L_Spawn1000; + message strcharinfo(0), "Andra: I think some plants will grow almost instantly! Just Watch..."; + goto L_Spawn1000; + +L_Spawn1000: + $@spawned_plants = $@spawned_plants + $@PLANTS_PER_SEED; + end; + +OnTimer3000: + $@plant_id = rand(1029,1032); + areamonster "008-1",44,18,135,46,"plant",$@plant_id,$@PLANTS_PER_SEED, "Andra::OnPlantDeath"; + $@spawned_plants = $@spawned_plants + $@PLANTS_PER_SEED; + end; + +OnTimer5000: + $@plant_id = rand(1029,1032); + areamonster "008-1",44,18,135,46,"plant",$@plant_id,$@PLANTS_PER_SEED, "Andra::OnPlantDeath"; + $@spawned_plants = $@spawned_plants + $@PLANTS_PER_SEED; + end; + +OnTimer7000: + $@plant_id = rand(1029,1032); + areamonster "008-1",44,18,135,46,"plant",$@plant_id,$@PLANTS_PER_SEED, "Andra::OnPlantDeath"; + if (attachrid(getcharid(3,$@farmer$)) == 0) + goto L_Spawn7000; + message strcharinfo(0), "Andra: Good... Just take a walk and you will be able to see how your seeds turned into some nice looking plants."; + goto L_Spawn7000; + +L_Spawn7000: + $@spawned_plants = $@spawned_plants + $@PLANTS_PER_SEED; + $@andra_status = 0; + $@farmer$ = ""; + setnpctimer 0; + stopnpctimer; + end; + +L_Return: + mes "[Andra]"; + mes "\"Hi " + strcharinfo(0) + ", good to see you! You came back to help me again?\""; + next; + menu + "Yes, and I already have the seeds and the water.", L_Next5, + "No, I just wanted to say hello.", L_Bye; + +L_Next5: + if ($@spawned_plants >= $@MAX_GLOBAL_PLANTS) goto L_Gather; + if (countitem("BottleOfWater") < @water_amount || countitem("GrassSeed") < @seeds_amount) goto L_NotEnough; + delitem "BottleOfWater", @water_amount; + delitem "GrassSeed", @seeds_amount; + mes "Andra pours some water in a lot of different places and then throws the seeds to the sky. The wind carries some of them really far from her."; + close2; + goto L_PreSummon; + +OnPlantDeath: + $@spawned_plants = $@spawned_plants - 1; + end; + +L_NotEnough: + mes "[Andra]"; + mes "\"Sorry, but you don't have the items I need... Please, come back when you have them.\""; + close; + +L_Gather: + mes "[Andra]"; + mes "\"Look at all those plants! I think we shoudn't plant more seeds until someone gather those herbs...\""; + close; + +L_Bye: + mes "[Andra]"; + mes "\"Oh, you are a nice person... Thanks!\""; + close; + +L_Busy: + mes "[Andra]"; + mes "\"Ok, I understand. Come back if have some free time!\""; + close; + +L_DislikePlants: + mes "[Andra]"; + mes "\"Really? How can someone dislike plants and trees? What a strange thing...\""; + close; + +L_Planting: + mes "[Andra]"; + mes "\"Sorry, I can't talk right now. I am planting some seeds " + $@farmer$ + " gave me.\""; + close; + +L_close: + close; + +L_TooYoung: + mes "[Andra]"; + mes "\"I'm sorry, I can't talk right now. I am really busy with those trees! If you feel like talking, maybe you should come back later.\""; + close; + +OnInit: + $@PLANTS_PER_SEED = 3; + set $@MAX_GLOBAL_PLANTS, 100; // You can plant only if the amount of plants currently in the map is < than this value. + end; +} diff --git a/npc/008-1/annualeaster.txt b/npc/008-1/annualeaster.txt new file mode 100755 index 00000000..358769a7 --- /dev/null +++ b/npc/008-1/annualeaster.txt @@ -0,0 +1,212 @@ + + + + +008-1,0,0,0 script Easter Eggs NPC32767,{ + + + if (strnpcinfo(2) == "") end; + if (get(.disabled, "Easter Eggs") || $@isEaster < 1) goto L_Destroy; + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + if ((gettimetick(2)-TUT_var < 5*7*86400) || (BaseLevel < 40)) //player must be created at least 5 weeks ago + goto L_EndTooYoung; + + @easter_year = (Annual_Quest & BYTE_1_MASK) >> BYTE_1_SHIFT; + + if (#EASTERTIMEPENALTY == 0) + goto L_WarmUp; + // prevent clicking multiple times: + if (gettimetick(2) < #EASTERTIMEPENALTY + get(.wait_time, "Easter Eggs")) + goto L_End2; + if (@easter_year > gettime(7) - 2000) + goto L_End3; + #EASTERTIMEPENALTY = gettimetick(2); + + set .found, .found + 1; // this egg has been found X times + set @AnnualEasterTries, @AnnualEasterTries + 1; // you tried X times since login + + message strcharinfo(0), "Eggs : You found something!"; + .@size = get(.small_rewards, "Easter Eggs"); + .@random = rand(.@size+2); + if (.@random < .@size) + getitem get(.small_rewards$[.@random], "Easter Eggs"), rand(1, 2); + elif (.@random == .@size) + getexp rand(200), 0; + else + Zeny = Zeny + rand(50); + + if (rand(get(.chance, "Easter Eggs"))) + goto L_NoEasterEgg; + + + .@random = rand(get(.medium_rewards$, "Easter Eggs")); + getitem get(.medium_rewards$[.@random], "Easter Eggs"), 1; + misceffect FX_GETITEM, strcharinfo(0); + goto L_NoEasterEgg; + +L_NoEasterEgg: + .@fchance = get(.final_rew_chance, "Easter Eggs"); + if (@AnnualEasterTries > .@fchance) + @AnnualEasterTries = .@fchance; + .@random = rand(.@fchance - @AnnualEasterTries + 1); + if (.@random || @easter_year > gettime(7) - 2000) + goto L_Reward_End; + + // block for further items this year: + @easter_year = gettime(7) - 2000 + 1; + Annual_Quest = (Annual_Quest & ~(BYTE_1_MASK) | (@easter_year << BYTE_1_SHIFT)); + + // Hand out pretty unique rewards depending on the current year: + // We'll be handing out 2 different items each year, whereas one of them + // will be very common (95 %) and the other rare (5 %) for the players. + // The rare item will become the common item next year. + .@rewardindex = gettime(7) - 2012; + if (rand(100) < 5) + .@rewardindex = .@rewardindex + 1; + + // now hand out the specific item: + .@rewardindex = .@rewardindex % get(.big_rewards, "Easter Eggs"); + getitem get(.big_rewards$[.@rewardindex], "Easter Eggs"), 1; + misceffect FX_GETITEM, strcharinfo(0); + message strcharinfo(0), "Eggs : This is really special. You won't find anything like this again."; + goto L_Reward_End; + +L_Reward_End: + if (.found >= get(.mapcount, "Easter Eggs")) + goto L_Destroy; + end; + +L_Destroy: + set .eggs, get(.eggs, "Easter Eggs") - 1, "Easter Eggs"; // tell the puppeteer we lost an egg + destroy; + +L_EndTooYoung: + message strcharinfo(0), "Eggs : The nest is empty."; + end; + +L_WarmUp: + #EASTERTIMEPENALTY = gettimetick(2); + getitem "MoubooFigurine", 1; + misceffect FX_GETITEM, strcharinfo(0); + message strcharinfo(0), "Eggs : Hmmm eggs! Maybe you can find something nice there!"; + end; + +L_End3: + message strcharinfo(0), "Eggs : Don't be greedy! You already found something nice."; + end; + +L_End2: + message strcharinfo(0), "Eggs : Don't be greedy! You just found something a moment ago."; + #EASTERTIMEPENALTY = #EASTERTIMEPENALTY + 5; + if (#EASTERTIMEPENALTY > gettimetick(2)) + #EASTERTIMEPENALTY = gettimetick(2); + end; + +OnTimer5000: + if (get(.disabled, "Easter Eggs") || $@isEaster < 1) + goto L_Destroy; + initnpctimer; + end; + + + +OnSpawn: + .@e = rand(2,.loc[1]); + .@x = .loc[.@e]; + .@y = .loc[(.@e-1)+.loc[1]]; + set .eID, .eID + 1; // give the egg an id + .@name$ = "#--Ee"+chr(3)+.eID; + if (.eID == 2147483647) + set .eID, 0; // start over if id = 0x7FFFFFFF + if (puppet(strnpcinfo(3), .@x, .@y, .@name$, 375) < 1) goto L_RetrySpawn; // spawn the egg + initnpctimer .@name$; // init puppeteer check timer + end; + +L_RetrySpawn: + addnpctimer 0, strnpcinfo(0) + "::OnSpawn"; // schedule a spawn + end; + +S_Spawn: + if (.eggs >= .max_eggs) + goto S_Return; + .eggs = .eggs + 1; + addnpctimer 125 + rand(250), strnpcinfo(0) + "::OnSpawn"; // schedule a spawn + if (.eggs < .min_eggs) + goto S_Spawn; + return; + +S_Return: + return; + +OnHeartbeat: + if (.max_eggs < 1 || .disabled || $@isEaster < 1) end; + .mapcount = 1 + getmapusers(strnpcinfo(3)) / 3; + callsub S_Spawn; + addnpctimer 1000, strnpcinfo(0) + "::OnHeartbeat"; // heartbeat + end; + +OnCheckEaster: + if ((gettime(6) == 3 && gettime(5) >= 22) || (gettime(6) == 4 && gettime(5) <= 25)) + $@isEaster = 1; + else + $@isEaster = 0; + if ($@isEaster && .eggs < 1) + donpcevent "Easter Eggs::OnStart"; + end; + +OnStart: + if (.disabled || $@isEaster < 1) end; + set .min_eggs, 1; // min number of eggs + set .max_eggs, 3; // max number of eggs + set .eggs, 0; // virtual amount of eggs + set .eID, 0; // last egg id + .wait_time = 15; + .final_rew_chance = 70; + .chance = 750; + setarray .loc[0], 0, 1,1, // first row: x, second row: y + 41, 45, 50, 57, 60, 64, 67, 65, 59, 72, 70, 82, 81, 93, 97, 101, 88, 108, 115, 122, 122, 129, 129, 130, 135, 123, 132, 132, 127, 124, 121, 107, 100, 101, 109, 104, 88, 84, 92, 59, 71, 65, 53, 55, 74, 59, 53, 46, 44, 44, 38, 43, 40, 43, 37, + 87, 89, 88, 93, 98, 90, 96, 82, 81, 82, 96, 98, 92, 89, 89, 81, 82, 94, 96, 96, 90, 86, 72, 65, 60, 46, 25, 21, 20, 22, 20, 34, 24, 41, 43, 42, 48, 28, 27, 17, 23, 29, 25, 20, 39, 41, 34, 36, 18, 25, 31, 39, 64, 69, 73; + set .loc[0], (getarraysize(.loc) - 1); // loc 0 and 1 are special (stores array size, and half index) + .loc[1] = ((.loc[0]+1)/2); + setarray .small_rewards$[0], 0, "AppleCake", "CactusDrink", "CactusPotion", "Cake", "Candy", "CherryCake", "ChocolateBar", "ChocolateCake", "GreenApple", "Orange", "OrangeCake", "OrangeCupcake", "RedApple", "WhiteCake"; + .small_rewards = getarraysize(.small_rewards$); + setarray .medium_rewards$[0], 0, "RedEasterEgg", "GreenEasterEgg", "BlueEasterEgg", "YellowEasterEgg", "PinkEasterEgg", "TealEasterEgg"; + setarray .big_rewards$[0], 0, "RedEggshellHat", "BlueEggshellHat", "YellowEggshellHat", "GreenEggshellHat", "OrangeEggshellHat", "DarkEggshellHat"; + .big_rewards = getarraysize(.big_rewards$); + donpcevent strnpcinfo(0) + "::OnHeartbeat"; // first heartbeat + end; +} + +function script Easter Debug { + goto L_Menu; + +L_Menu: + clear; + mes "Please choose an option."; + if (get(.disabled, "Easter Eggs")) + menu + "Do Nothing.", L_Return, + "Enable eggs.", L_Enable; + menu + "Do Nothing.", L_Return, + "Disable eggs.", L_Disable; + +L_Enable: + .disabled = 0, "Easter Eggs"; + clear; + mes "Easter Eggs enabled."; + next; + goto L_Menu; + +L_Disable: + set .disabled, 1, "Easter Eggs"; // TODO: (tmwa) automatically destroy puppets when using @disablenpc & also discard timers + clear; + mes "Easter Eggs disabled."; + next; + goto L_Menu; + +L_Return: + return; +} diff --git a/npc/008-1/auldsbel.txt b/npc/008-1/auldsbel.txt deleted file mode 100644 index 316bf604..00000000 --- a/npc/008-1/auldsbel.txt +++ /dev/null @@ -1,53 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Auldsbel the Magician. -// THIS IS A PLACEHOLDER! - -008-1,119,114,0 script Auldsbel NPC_WIZARD,{ - // Placeholder please remove - if (!MASTERBOOK_PAGES) - { - inventoryplace MasterBook, 1; - getitem MasterBook, 1; - MASTERBOOK_PAGES=1; - mesc l("Auldsbel discretly stuffs a book on your backpack."); - next; - speech - l("Don't tell anyone about this. Once you kill you a boss, you can try to learn the boss skill by using the book."), - l("Beware you have a limited number of pages. Do not let the Legion or the Brotherhood find out you have one."), - l("And by the way. I know nothing about this book. And I don't know how to get more pages either."); - close; - } - speech - l("Hello."), - l("Oh, you look more interested in magic.. the brotherhood did forbid most of the interesting paths of magic, but boring baby spells are still allowed."); - // Give poor Auldsbel some weak magic D: - if (!MAGIC_CLU[EVOL_MONSTER_IDENTIFY]) { - mesn; - mesq l("May I interest you in an useless skill?"); - ShowAbizit(true); - next; - mesc l("Identify Monsters - Unlocks the %s chat command.", "##B/mi##b"); - mesc l("It will analyse and inform about the monster stats and drops."); - mesc l("If multiple monsters have same name, all of them will be listed."); - mesc l("Alias: %s", "##B@monsterinfo##b"); - next; - mesn; - mesq l("May I interest you in an useless skill?"); - mesc l("Skill: %s", getskillname(EVOL_MONSTER_IDENTIFY)); - // FIXME You know that learn_magic has its own prompt, right? - if (askyesno() == ASK_YES) { - learn_magic(EVOL_MONSTER_IDENTIFY); - } - } else { - mesn; - mesq l("If you come back later, I may teach you something. But psst, practising magic is quite dangerous these days."); - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/banu.txt b/npc/008-1/banu.txt old mode 100644 new mode 100755 index 05209a2c..886bfe06 --- a/npc/008-1/banu.txt +++ b/npc/008-1/banu.txt @@ -1,20 +1,97 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Banu, the old lady. -// THIS IS A PLACEHOLDER! - -008-1,244,88,0 script Banu NPC_OLD_LADY,{ - speech - l("Hello."), - l("You don't have a scythe, by chance? I am too old to mew this field all alone."), - l("I asked Hinnak, but he wants at least a beer in exchange for his scythe."), - l("But I hate alcohol, so thats not an option for me."); +008-1,70,42,0 script Banu NPC154,{ + @Exp = 100; + @money_water = 250; + @money_knife = 100; - close; + if (QL_BANU >= 3) goto L_Done; + if (QL_BANU == 2) goto L_Knife; + if (QL_BANU == 1) goto L_Water; + + mes "[Banu]"; + mes "\"Ah, hello. You've come at just the right moment. The field work is hard and the sun is burning."; + mes "Would you mind refilling an old woman's Empty Bottle with water?\""; + menu + "Sure!",L_Next, + "Sorry, I'm busy.",L_close; + +L_Next: + getinventorylist; + if (@inventorylist_count == 100) + goto L_FullInv; + + mes "She smiles."; + mes "[Banu]"; + mes "\"Here is my Empty Bottle. There is a well right over there at Hurnscald.\""; + getitem "EmptyBottle", 1; + QL_BANU = 1; + goto L_close; + +L_Water: + mes "[Banu]"; + mes "\"Ah, you're back. I'm so thirsty.\""; + next; + if (countitem("BottleOfWater") < 1) + goto L_NoWater; + delitem "BottleOfWater", 1; + mes "She grabs the Bottle of Water and drinks."; + getexp @Exp, 0; + Zeny = Zeny + @money_water; + QL_BANU = 2; + mes "[Banu]"; + mes "\"Ah, that's refreshing. Thank you. You're a good kid. Have this for your expenses."; + mes "Maybe you can do me another favor?\""; + next; + mes "\"I need a new Knife. Peter in the Hurnscald forge to the South of here is selling some. But it's such a long way for my old legs."; + mes "Would you go to get me a Knife?\""; + goto L_close; + +L_Knife: + mes "[Banu]"; + mes "\"Hello dear. Did you get the knife for me?\""; + menu + "Yeah, here is it.",L_Next1, + "Not yet.",L_close; -OnInit: - .distance = 4; - end; +L_Next1: + if (countitem("Knife") < 1) + goto L_NoKnife; + delitem "Knife", 1; + getexp @Exp, 0; + Zeny = Zeny + @money_knife; + QL_BANU = 3; + mes "[Banu]"; + mes "\"Thank you! You're a darling. Please take this for your effort.\""; + goto L_close; + +L_Done: + mes "[Banu]"; + @rand = rand(3); + if (@rand == 0) + mes "\"I spent all my life here in Hurnscald. It's a good place to live.\""; + if (@rand == 1) + mes "\"Did you see the kids playing hide and seek? Ah, when I was young I used to play with my good friend Sorfina. She lives in Candor now, East of Hurnscald by boat.\""; + if (@rand == 2) + mes "\"Tonori is ruled by a council of wise wizards.\""; + goto L_close; + +L_NoWater: + mes "[Banu]"; + mes "\"You didn't get it yet? Shame on you, an old woman is depending on you.\""; + goto L_close; + +L_NoKnife: + mes "[Banu]"; + mes "\"Where is it? Don't play tricks on an old woman! That's not nice.\""; + goto L_close; + +L_FullInv: + mes "[Banu]"; + mes "\"Oh my dear! You're carrying so many things that you can't take my Empty Bottle.\""; + goto L_close; + +L_close: + @inventorylist_count = 0; + @Exp = 0; + @rand = 0; + close; } diff --git a/npc/008-1/blossom.txt b/npc/008-1/blossom.txt deleted file mode 100644 index 57782b20..00000000 --- a/npc/008-1/blossom.txt +++ /dev/null @@ -1,77 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Blossom the flower-seller girl. -// THIS IS A PLACEHOLDER! - -008-1,198,138,0 script Blossom NPC_BLOSSOM,{ - speech - l("Hi, my name is Blossom."), - l("Strange, it seems I became younger lately."), - l("Are you in need of some flowers?"); - - do - { - select - l("I love flowers! What do you have for sale?"), - l("Not now, thank you."), - l("Dont you know something about fertility? I heard rumors."), - l("Do you sell Flower Seeds?"); - - mes ""; - switch (@menu) - { - case 1: - closeclientdialog; - shop "#Invisible008-1"; - close; - case 2: - speech S_FIRST_BLANK_LINE, - l("Oh, ok. Come back later if you need something."); - close; - case 3: - /* - speech S_FIRST_BLANK_LINE, - l("I heard something too. A girl named Galimatia seems to need help. If only those lazy developers could tell her what she needs."); - */ - mesn; - mesq l("I heard something too. A girl named Galimatia seems to need help."); - next; - mesn; - mesq l("But I believe Oscar gave her a fertility recipe...?"); - next; - mesn; - mesq l("...Oops, I'm not supposed to say that. Oscar is... Well... Either a genius or a madman, I can't say."); - break; - case 4: - mesn; - mesq l("No I don't, but I can exchange them. 3 %s for a %s.", getitemlink(GrassSeeds), getitemlink(FlowerSeeds)); - next; - /* - // TODO: Add Andra - mesn; - mesq l("If you need the opposite, look for Andra."); - */ - if (countitem(GrassSeeds) < 3) - break; - - mesc l("Trade with %s?", .name$); - if (askyesno() == ASK_YES) { - inventoryplace FlowerSeeds, 1; - delitem GrassSeeds, 3; - getitem FlowerSeeds, 1; - mesn; - mesq l("Thanks for the trade."); - next; - } - break; - } - } while (true); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/confused-tree.txt b/npc/008-1/confused-tree.txt deleted file mode 100644 index aead40ed..00000000 --- a/npc/008-1/confused-tree.txt +++ /dev/null @@ -1,972 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Based on CrazyTree, originally made by: -// gumi -// pclouds -// veryape -// wushin -// Description: -// emulated confused tree prototype - -// ~t lowercase hot word regex - -008-1,255,109,0 script Confused Tree NPC_CONFUSED_TREE,14,14,{ - - function tree_panel { - if (is_trusted() == false && #Tree_Trusted == false) - { - narrator(l("You see a tree.")); - if (getq(HurnscaldQuests_Inspector) == 2) - { - select( - l("Have you seen anything strange lately?"), - l("Do you know anything about the recent robberies?")); - - narrator(S_FIRST_BLANK_LINE, - l("..."), - l("It doesn't reply.")); - } - close; - } - - function clear_db { - clear(); - mes(l("##BWARNING:##b you are about to permanently empty the quote database.")); - next(); - mes(l("Do you want to continue?")); - - select( - l("Abort!"), - l("Empty the quote DB")); - - if (@menu == 2) - { - .@sentence$ = "I am an idiot"; - mes(l("Please write the following sentence:")); - mes(""); - mesf(" ##B%s.", .@sentence$); - input(.@confirm$); - - if (!startswith(strtoupper(.@confirm$), strtoupper(.@sentence$))) { - mes(l("Invalid!")); - close; - } - - query_sql("TRUNCATE TABLE tree_quotes;"); - mes(l("Database erased.")); - next(); - } - - return; - } - - function list_commands { - clear(); - mes(l("To grab a quote:")); - mes(col(" ~grab ##Bplayer name##b", 7)); - next(); - mes(l("To get a quote:")); - mes(col(" ~quote anyone", 7)); - mes(col(" ~quote ##Bplayer name##b", 7)); - mes(col(" ~quote ##B#number##b", 7)); - next(); - mes(l("To remove a quote:")); - mes(col(" ~remove quote ##B#number##b", 7)); - mes(col(" ~remove last quote", 7)); - next(); - mes(l("Last seen:")); - mes(col(" ~seen ##Bplayer name##b", 7)); - next(); - mes(l("To ignore a player:")); - mes(col(" ~ignore ##Bplayer name##b", 7)); - next(); - mes(l("To unignore a player:")); - mes(col(" ~unignore ##Bplayer name##b", 7)); - next(); - - if (is_admin()) - { - mes(l("To trust a player:")); - mes(col(" ~trust ##Bplayer name##b", 7)); - next(); - mes(l("To de-trust a player:")); - mes(col(" ~untrust ##Bplayer name##b", 7)); - next(); - } - return; - } - - do - { - clear(); - setnpcdialogtitle(l("Tree Control Panel")); - mes(l("Oh noes! You found my secret backdoor!")); - next(); - mes(l("Please select an option:")); - - select( - l("List the commands"), - rif(is_admin(), l("Empty the quote DB")), - l("Dance for me")); - - switch (@menu) - { - case 1: list_commands(); break; - case 2: clear_db(); break; - default: speech(l("Too lazy.")); close; - } - - } while (true); - - end; - } - - // utility functions below - - function check_is_ignored { - .@val = htget(.ignore_ht, strcharinfo(PC_NAME), 0); - - if (.@val > gettimetick(2)) - { - ++.ignored_times; - end; - } - - else if (.@val > 0) - { - htput(.ignore_ht, strcharinfo(PC_NAME), 0); // remove expired entries - } - - return; - } - - function special_name { - .@name$ = strcharinfo(PC_NAME); - .@low$ = strtolower(.@name$); - - if (rand(.sname_rate) == 0) - { - for (.@i = 0; .@i < .alias; .@i += 2) - { - if (.@low$ ~= .alias$[.@i]) - { - explode(.@aliases$, .alias$[.@i+1], "`"); - .@name$ = .@aliases$[rand(getarraysize(.@aliases$))]; - break; - } - } - } - - return .@name$; - } - - function face { - if (gettimetick(2) - .last_emote < .emote_rate) - { - ++.ignored_times; - return; - } - - .last_emote = gettimetick(2); - return emotion(getarg(0, E_SURPRISE)); - } - - function rp { - // used for queries - return replacestr(getarg(0,""), "~t", strtolower("(?:" + .name$ + "|" + .hotwords$ + ")")); - } - - function format_reply { - // used for replies - .@str$ = getarg(0, ""); - - // search for {{mustaches}} - while (.@str$ ~= "{{([^}]+)}}") - { - .@sub$ = replacestr($@regexmatch$[1], " ", ""); // remove whitespaces - .@sub$ = strtolower(.@sub$); // always lowercase the var name - .@capitalize = .@titlecase = .@allcaps = false; - - if (charat(.@sub$, 0) == "^") - { - .@capitalize = true; - .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char - } - - else if (charat(.@sub$, 0) == "+") - { - .@titlecase = true; - .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char - } - - else if (charat(.@sub$, 0) == "!") - { - .@allcaps = true; - .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char - } - - if (compare(.@sub$, ",")) { - .@var$ = sprintf(".H%s$", substr(md5(.@sub$), 0, 25)); - - if (getelementofarray(getd(.@var$), 1) == "") { - explode(.@sub2$, .@sub$, ","); - .@size = 1; - - for (.@i = 0; .@i < getarraysize(.@sub2$); ++.@i) { - .@subsize = getd(sprintf(".D_%s", .@sub2$)); - copyarray(getelementofarray(getd(.@var$), .@size), getd(sprintf(".D_%s$[1]", .@sub2$)), .@subsize); - .@size += .@subsize; - } - } - } else { - .@var$ = sprintf(".D_%s$", .@sub$); - } - - .@rep$ = relative_array_random(getd(.@var$)); - - if (.@capitalize) .@rep$ = capitalize(.@rep$); - else if (.@titlecase) .@rep$ = titlecase(.@rep$); - else if (.@allcaps) .@rep$ = strtoupper(.@rep$); - - .@str$ = replacestr(.@str$, $@regexmatch$[0], .@rep$); // remove the mustache, replace by value - } - - // search for emotes - if (.@str$ ~= "%%([^ ])") - { - // only handling a few of them - switch (ord($@regexmatch$[1])) - { - case 73: face(any(E_WINK, E_ANGEL)); break; - case 83: face(any(E_SAD, E_CRYING)); break; - case 85: face(E_SURPRISE); break; - case 93: face(any(E_HEARTEYE, E_HEART)); break; - case 94: face(E_DISGUST); break; - case 99: face(E_DEAD); break; - case 105: face(E_CRYING); break; - case 106: - case 91: face(any(E_SPEECH, E_BLAH)); break; - case 107: face(E_INSULTBUBBLE); break; - default: .@unhandled = true; - } - - if (.@unhandled != true) - { - if (.@str$ == $@regexmatch$[0]) end; // don't send handled, emote-only messages - .@str$ = replacestr(.@str$, " "+ $@regexmatch$[0], ""); // otherwise strip the emote - } - } - - // built-in variables - .@str$ = replacestr(.@str$, "~n", .name$); // npc name - .@str$ = replacestr(.@str$, "~p", special_name()); // player name or special name - .@str$ = replacestr(.@str$, "~P", strcharinfo(PC_NAME)); // unaltered player name - - return rp(.@str$); - } - - function strip_colors { - .@str$ = replacestr(getarg(0, ""), "##0", ""); - .@str$ = replacestr(.@str$, "##1", ""); - .@str$ = replacestr(.@str$, "##2", ""); - .@str$ = replacestr(.@str$, "##3", ""); - .@str$ = replacestr(.@str$, "##4", ""); - .@str$ = replacestr(.@str$, "##5", ""); - .@str$ = replacestr(.@str$, "##6", ""); - .@str$ = replacestr(.@str$, "##7", ""); - .@str$ = replacestr(.@str$, "##8", ""); - .@str$ = replacestr(.@str$, "##9", ""); - return replacestr(.@str$, "##a", ""); - } - - function strip_formatting { - .@str$ = strip_colors(getarg(0, "")); - .@str$ = replacestr(.@str$, "##B", ""); - return replacestr(.@str$, "##b", ""); - } - - function delayed_reply { - ++.answered_times; - @tree_reply$ = getarg(0, ""); - addtimer(.delay_reply, .name$ + "::OnDoReply"); - return; - } - - function reply { - .@reply$ = format_reply(getarg(0, "")); - getmapxy(.@pc_map$, .@pc_x, .@pc_y, UNITTYPE_PC); // get char location - - if (((.@reply$ == .last_reply$ && gettimetick(2) - .last_reply < .repeat_rate) - || gettimetick(2) - .last_reply < .talk_rate - || (gettimetick(2) - .blocked < .block_time && is_trusted() == false) - || .@pc_map$ != .map$ - || distance(.x, .y, .@pc_x, .@pc_y) > .distance - || .@reply$ == "") - && is_dev() == false) - { - ++.ignored_times; - return; - } - - .last_reply = gettimetick(2); - .last_reply$= .@reply$; - - delayed_reply(.@reply$); - return; - } - - function seen_me { - if (playerattached() > 0 && htexists(.seen_ht)) - { - htput(.seen_ht, strcharinfo(PC_NAME), gettimetick(2)); - } - return; - } - - function have_you_seen { - .@player$ = getarg(0, ""); - .@player = getcharid(CHAR_ID_ACCOUNT, .@player$); - - if (.@player > 0) - { - // nested if, because they don't short-circuit - if (checkoption(Option_Invisible, .@player) == false) { - delayed_reply(sprintf("Player `%s` is currently online.", .@player$)); - end; - } - } - - .@time = htget(.seen_ht, .@player$, 0); - - if (.@time < 1) - delayed_reply(sprintf("I haven't seen player `%s` today.", .@player$)); - - else - delayed_reply(sprintf("Player `%s` was last seen %s.", .@player$, FuzzyTime(.@time, 0, 99))); - - end; - } - - function special_drops { - .@drop$ = relative_array_random(.drops$); - .@name$ = strcharinfo(PC_NAME); - .@low$ = strtolower(.@name$); - - if (rand(.sdrop_rate) == 0) - { - for (.@i = 0; .@i < .sdrops; .@i += 2) - { - if (.@low$ ~= .sdrops$[.@i]) - { - explode(.@d$, .sdrops$[.@i+1], "`"); - .@drop$ = .@d$[rand(getarraysize(.@d$))]; - break; - } - } - } - - return .@drop$; - } - - function roll_dice { - .@dices = max(min(getarg(0, 1), 8), 1); // 1..8 - .@sides = max((getarg(1, 6) < 1 ? 6 : getarg(1, 6)), 1); // 1..MAX_INT - - .@result$ = sprintf("*rolls the dice%s: %d", - rif(.@dices > 1, "s"), rand(1, .@sides)); // first dice - - for (.@d = 1; .@d < .@dices; ++.@d) - { - .@result$ += ", " + rand(1, .@sides); - } - - return .@result$ + ".*"; - } - - function flip_coin { - .@coins = getarg(0, 1); - - .@result$ = sprintf("*flips the coin%s: %s", - rif(.@coins > 1, "s"), (rand(2) == 1 ? "heads" : "tails")); // first coin - - for (.@c = 1; .@c < .@coins; ++.@c) - { - .@result$ += ", " + (rand(2) == 1 ? "heads" : "tails"); - } - - return .@result$ + ".*"; - } - - function roulette { - if (.roulette == 1) - { - npctalk("*pulls the trigger: *##BBANG##b*.*"); - delayed_reply("*reloads and spins the chambers.*"); - .roulette = rand(1, 7); // the Nagant_M1895 has 7 chambers - - // now the fun part - nude(); - percentheal(-100, 0); - } - - else - { - delayed_reply("*pulls the trigger: *click*.*"); - .roulette = (.roulette == 7 ? 1 : .roulette + 1); - } - - end; - } - - function monologue_player { - return sprintf("Your current monologue is at least %d line%s long.", - @monologue, rif(@monologue != 1, "s")); - } - - function who_player { - return sprintf("You seem to be ##B~P##b [%i:%i].", - getcharid(CHAR_ID_ACCOUNT), getcharid(CHAR_ID_CHAR)); - } - - function make_quote_table { - // Do not modify this - query_sql("CREATE TABLE IF NOT EXISTS `tree_quotes` (" - " `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT," - " `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'," - " `grabber` INT(11) UNSIGNED NOT NULL DEFAULT '0'," - " `timestamp` INT(10) UNSIGNED NOT NULL DEFAULT '0'," - " `message` VARCHAR(150) NOT NULL DEFAULT ''," - " PRIMARY KEY (`id`)," - " KEY `char_id` (`char_id`)," - " KEY `grabber` (`grabber`)" - ") ENGINE=MyISAM;"); - - .last_query = gettimetick(2); - return; - } - - function grab_quote { - .@name$ = getarg(0, ""); - - if (gettimetick(2) - .last_query < (is_trusted() ? .qpoll_rate : .qpoll_rate2)) - { - ++.ignored_times; - end; - } - - if (.@name$ == strcharinfo(PC_NAME)) - { - delayed_reply("##BError: You may not grab yourself."); - end; - } - - explode(.@tmp$[0], htget(.msg_ht, .@name$, ""), ":"); // get last message, if any - htput(.msg_ht, .@name$, ""); // ensure you can't grab twice the same message - - .@char_id = atoi(.@tmp$[0]); // grab the char id part - - if (.@char_id < 1) - { - delayed_reply(sprintf("##BError: I couldn't find anything to grab from player `%s`.", .@name$)); - end; - } - - .@msg$ = implode(.@tmp$, ":"); // put it back together - .@start = getstrlen(.@tmp$[0]) + getstrlen(.@tmp$[1]) + 2; // char:time:msg <= we just want the msg part - .@msg$ = escape_sql(strip_formatting(substr(.@msg$, .@start, getstrlen(.@msg$) - 1))); // sanitize - - if (.@msg$ == "") - { - delayed_reply("##BError: Message is empty or malformed. It cannot be grabbed."); - end; - } - - else if (.@msg$ ~= "^[!#~@]?(?:grab)?shield(?:ed)?(?:[:.!]? .*)?$") - { - delayed_reply("##BError: Message is shielded."); - end; - } - - query_sql(sprintf("INSERT INTO tree_quotes (char_id,grabber,timestamp,message) VALUES (%i,%i,%i,'%s');", - .@char_id, getcharid(CHAR_ID_CHAR), gettimetick(2), .@msg$)); - - query_sql("SELECT MAX(id) FROM tree_quotes;", .q_last_id); // get the last quote id - - .last_query = gettimetick(2); - - delayed_reply(sprintf("Success: Quote grabbed. (#%i)", .q_last_id)); - end; - } - - function remove_quote { - .@tmp = getarg(0, 0); - - if (gettimetick(2) - .last_query < (is_trusted() ? .qpoll_rate : .qpoll_rate2)) - { - ++.ignored_times; - end; - } - - query_sql(sprintf("SELECT id FROM tree_quotes WHERE id = %i ORDER BY id DESC LIMIT 1;", .@tmp), .@id); // check if it exists - - if (.@id < 1) - { - delayed_reply(sprintf("##BError: I couldn't find quote #%i in the database.", .@tmp)); - end; - } - - query_sql(sprintf("DELETE FROM tree_quotes WHERE id = %i ORDER BY id DESC LIMIT 1;", .@id)); - - .last_query = gettimetick(2); - - delayed_reply(sprintf("Success: Quote removed. (#%i)", .@id)); - end; - } - - function cite_quote { - .@id = getarg(0,0); - - if (gettimetick(2) - .last_query < (is_trusted() ? .qpoll_rate : .qpoll_rate2)) - { - ++.ignored_times; - end; - } - - query_sql(sprintf("SELECT t.id, c.name AS grabee, d.name AS grabber, t.timestamp, t.message " - "FROM `tree_quotes` t " - "JOIN `char` c ON t.char_id = c.char_id " - "JOIN `char` d ON t.grabber = d.char_id " - "WHERE t.id=%i ORDER BY t.id DESC LIMIT 1;", - .@id), - .@nid[0], .@grabee$[0], .@grabber$[0], .@time[0], .@msg$[0]); - - .last_query = gettimetick(2); - - if (.@nid[0] < 1) - { - delayed_reply(sprintf("##BError: I couldn't find quote #%i in the database.", .@id)); - end; - } - - delayed_reply(sprintf("<%s> ##B%s##b ##a— grabbed by %s %s.", - .@grabee$[0], .@msg$[0], .@grabber$[0], FuzzyTime(.@time[0],0,1))); - end; - } - - function random_quote { - .@name$ = escape_sql(getarg(0, "")); - - if (gettimetick(2) - .last_query < (is_trusted() ? .qpoll_rate : .qpoll_rate2)) - { - ++.ignored_times; - end; - } - - query_sql("SELECT t.id, c.name AS grabee, d.name AS grabber, t.timestamp, t.message " - "FROM `char` c " - "JOIN `tree_quotes` t ON t.char_id = c.char_id " - "JOIN `char` d ON d.char_id = t.grabber " + - rif(.@name$ != "", sprintf("WHERE c.name='%s' ", .@name$)) + - "ORDER BY RAND() LIMIT 1;", - .@nid[0], .@grabee$[0], .@grabber$[0], .@time[0], .@msg$[0]); - - .last_query = gettimetick(2); - - if (.@nid[0] < 1) - { - if (.@name$ != "") - delayed_reply(sprintf("##BError: I couldn't find any quote from `%s` in the database.", getarg(0, ""))); - else - delayed_reply("##BError: The quote database is empty."); - end; - } - - delayed_reply(sprintf("<%s> ##B%s##b ##a— grabbed by %s %s. (#%i)", - .@grabee$[0], .@msg$[0], .@grabber$[0], FuzzyTime(.@time[0],0,1), .@nid[0])); - end; - } - - function trigger_hotword { - .@o$ = getarg(0, ""); // original lowercase - .@m$ = replacestr(.@o$, "*", ""); // original lowercase clean - - - if (.@m$ ~= "(?:^| )tell(?: (?:me|him|her|us|them))? a(?:n ?other| lame| bad| boring)? joke") - reply(relative_array_random(.jokes$)); - - else if (.@m$ ~= "(?:^| )heal me(?:$|[^a-z])") - reply(relative_array_random(.healing$)); - // XXX: maybe actually heal the player once in a while - - else if (.@m$ ~= "(?:^| )(?:what|who) are you") - reply(relative_array_random(.whoami$)); - - else if (.@m$ ~= rp("(?:^| )(?:hi+|hello|heya?|hiya|good (?:morning|afternoon))[^a-z]* .*~t|~t.* (?:hi+|hello|heya?|hiya)")) - { - .blocked = 0; - .@rpl$ = relative_array_random(.greetings$); - reply(.@rpl$); - } - - else if (.@o$ ~= rp("(?:^[*]| )(?:kicks?|shakes?) .*~t")) - reply(special_drops()); - - else if (.@o$ ~= rp("(?:^[*]| )(?:cuts?|nukes?|kills?|chops? down|saws?|hews?|murders?) .*~t")) - reply(relative_array_random(.kill$)); - - else if (.@o$ ~= rp("(?:^[*]| )pokes? .*~t")) - reply(relative_array_random(.poke$)); - - else if (.@o$ ~= rp("(?:^[*]| )(?:waters?|pees?|licks?) .*~t")) - reply(relative_array_random(.disgusting$)); - - else if (compare(.@m$, " answer ") && .@m$ ~= "(?:life|universe|everything)(?:$|[^a-z])") - reply(relative_array_random(.answer$)); - - else if (.@o$ ~= rp("(?:^[*]| )(?:burns?|incinerates?|ignites?) .*~t")) - reply(relative_array_random(.burning$)); - // XXX: maybe here send a fire particle effect - - else if (.@m$ ~= rp("(?:^| )die ~t")) - reply(relative_array_random(.die$)); - - else if (.@o$ ~= rp("(?:^[*]| )bites? .*~t|(?:^[*]| )drops? .* on ~t")) - reply(relative_array_random(.silly$)); - - else if (.@m$ ~= rp("(?:^| )(?:loves?|hugs?|kiss(es)?) .*~t|~t.* love(?:$|[^a-z])")) - reply(relative_array_random(.love$)); - - else if (.@m$ ~= rp("(?:^| )dance .*~t|~t.* dance(?:$|[^a-z])")) - reply(relative_array_random(.dance$)); - - else if (.@m$ ~= rp("(?:^| )hates? .*~t")) - reply(relative_array_random(.hate$)); - - else if (.@o$ ~= rp("(?:^[*]| )(?:eats?|shoots?|plucks?|tortures?|slaps?|slaps?|poisons?|breaks?|stabs?|throws?|punch(?:es)?) .*~t")) - reply(relative_array_random(.pain$)); - - else if (.@o$ ~= rp("(?:^[*]| )(?:climbs?|rides?|mounts?) .*~t")) - reply(relative_array_random(.climb$)); - - else if (.@m$ ~= "(?:^| )(?:see y(?:a|ou)|good night|(?:bye)?bye+)(?:$|[^a-z])") - reply(relative_array_random(.bye$)); - - else if (.@m$ ~= rp("(?:^| )bad ~t")) - reply(relative_array_random(.bad$)); - - else if (.@m$ ~= "(?:^| )(?:how old are you|uptime)(?:$|[^a-z])") - reply("%%B Server uptime: " + FuzzyTime(.uptime, 1, 99) + "."); - - else if (.@m$ ~= "(?:^| )how chatty are you(?:$|[^a-z])") - reply("%%B Answered " + .answered_times + " times, ignored " + .ignored_times + " times."); - - else if (.@m$ ~= "(?:^| )what.* version(?:$|[^a-z])") - reply("%%B ~n, version " + .version + "."); // XXX: maybe return Hercules version and serverdata commit instead - - else if (.@m$ ~= "(?:^| )(?:(?:8|eight)[ -]?ball|(?:should|would|will|do|does) (?:i|you|he|she|it|we|they))(?:$|[^a-z])") - reply(relative_array_random(.eightball$)); - - else if (.@m$ ~= "(?:^| )roll(?: a| the)? dice(?:$|[^a-z])") - reply(roll_dice(1, 6)); - - else if (.@m$ ~= "(?:^| )roll(?: a)? ([1-8])d((?:[1-9][0-9]{0,10})?)(?:$|[^0-9a-z])") - reply(roll_dice(atoi($@regexmatch$[1]), atoi($@regexmatch$[2]))); - - else if (.@m$ ~= "(?:^| )roll ([1-8]) dices?(?:$|[^a-z])") - reply(roll_dice(atoi($@regexmatch$[1]), 6)); - - else if (.@m$ ~= "(?:^| )(?:flip|toss)(?: a| the)? coin(?:$|[^a-z])") - reply(flip_coin(1)); - - else if (.@m$ ~= "(?:^| )(?:flip|toss) ([1-8]) coins?(?:$|[^a-z])") - reply(flip_coin(atoi($@regexmatch$[1]))); - - else if (.@m$ ~= "(?:^| )(?:press|pull)(?: the)? trigger(?:$|[^a-z])") - roulette(); - - else if (.@m$ ~= "(?:^| )(?:how long|what) is(?: my)? monologue(?:$|[^a-z])") - reply(monologue_player()); - - else if (.@m$ ~= "(?:^| )who am i(?:$|[^a-z])") - reply(who_player()); - - else if (.@m$ ~= "(?:^| )shut up(?:$|[^a-z])") - { - reply(relative_array_random(.shut_up$)); - .blocked = gettimetick(2); - } - - else if (rand(.dunno_rate) == 0) - reply(relative_array_random(.no_idea$)); - - else - ++.ignored_times; - - end; - } - - function trigger_hiall { - if (rand(.hiall_rate) == 0) - reply(relative_array_random(.greetings$)); - - else - ++.ignored_times; - - end; - } - -OnClick: - tree_panel(); - end; - - -OnTalkNearby: - .@no_nick$ = strip(strip_formatting(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1))); // not very obvious stuff - .@no_nick_lower$ = strtolower(.@no_nick$); // FIXME: hercules doesn't have a way to do case insensitive regex yet - .@no_nick_clean$ = replacestr(.@no_nick_lower$, "*", ""); - - htput(.msg_ht, strcharinfo(PC_NAME), getcharid(CHAR_ID_CHAR) + ":" + gettimetick(2) + ":" + .@no_nick$); // log last message, for quotegrabs - .lastsender = getcharid(CHAR_ID_CHAR); // for monologue - - .last_activity = gettimetick(2); // for the auto-janitor - - if ((is_trusted() || #Tree_Trusted) && charat(.@no_nick$, 0) == .symbol$) - { - if (.@no_nick$ ~= "^.grab \"?([^#:@\"]{4,23})\"?$") - reply(grab_quote($@regexmatch$[1])); - - else if (.@no_nick$ ~= "^.(?:ungrab|remove|delete)(?: quote)? #([0-9]+)$") - reply(remove_quote(atoi($@regexmatch$[1]))); - - else if (.@no_nick$ ~= "^.(?:ungrab|remove|delete)(?: last(?: quote)?)?$") - reply(remove_quote(.q_last_id)); - - else if (.@no_nick$ ~= "^.(?:quote|cite) #([0-9]+)$") - reply(cite_quote(atoi($@regexmatch$[1]))); - - else if (.@no_nick$ ~= "^.(?:(?:random )?quote|cite)(?: anyone| someone| random)?$") - reply(random_quote()); - - else if (.@no_nick$ ~= "^.(?:quote|cite) \"?([^#:@\"]{4,23})\"?$") - reply(random_quote($@regexmatch$[1])); - - else if (.@no_nick$ ~= "^.seen \"?([^#:@\"]{4,23})\"?$") - reply(have_you_seen($@regexmatch$[1])); - - // to allow trusted testers to reboot without knowing the exit code - else if (debug && .@no_nick$ ~= "^.re(?:boot|load|start)(?:(?: the)? server)?$") - { - announce("The server is rebooting. This may take a couple minutes.", bc_all); - sleep2(1000); - atcommand("@serverexit 104"); - } - - // exit, pull all, clean, build, reboot - else if (debug && .@no_nick$ ~= "^.re-?build(?:(?: the)? server)?$") - { - announce("The server is rebuilding. This will take several minutes.", bc_all); - sleep2(1000); - atcommand("@serverexit 108"); - } - - else if (.@no_nick$ ~= "^.(?:add )?ignored? \"?([^#:@\"]{4,23})\"?$") - { - .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]); - if (.@chr < 1) - { - reply("##BError: Player not found or not online."); - end; - } - htput(.ignore_ht, strcharinfo(PC_NAME, .@chr), gettimetick(2) + 3600); - reply(sprintf("Success: Player `%s` is now ignored for 1 hour.", - strcharinfo(PC_NAME, .@chr))); - } - - else if (.@no_nick$ ~= "^.(?:un|de-?|remove )ignored? \"?([^#:@\"]{4,23})\"?$") - { - .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]); - if (.@chr < 1) - { - reply("##BError: Player not found or not online."); - end; - } - htput(.ignore_ht, strcharinfo(PC_NAME, .@chr), 0); - reply(sprintf("Success: Player `%s` is no longer ignored.", - strcharinfo(PC_NAME, .@chr))); - } - - else if (is_admin() && .@no_nick$ ~= "^.(?:add )?trust(?:ed)? \"?([^#:@\"]{4,23})\"?$") - { - .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]); - if (.@chr < 1) - { - reply("##BError: Player not found or not online."); - end; - } - set(getvariableofpc(#Tree_Trusted, .@chr), true); - reply(sprintf("Success: Player `%s` can now use restricted commands.", - strcharinfo(PC_NAME, .@chr))); - } - - else if (is_admin() && .@no_nick$ ~= "^.(?:un|de-?|remove )trust(?:ed)? \"?([^#:@\"]{4,23})\"?$") - { - .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]); - if (.@chr < 1) - { - reply("##BError: Player not found or not online."); - end; - } - set(getvariableofpc(#Tree_Trusted, .@chr), false); - reply(sprintf("Success: Player `%s` can no longer use restricted commands.", - strcharinfo(PC_NAME, .@chr))); - } - - else - reply("##BError: Command not found or invalid syntax."); - } - - else if (.@no_nick_lower$ ~= rp("^(~t[^a-z ]* .*|(?:.* (?:~t[^a-z ]* .*|~t[^ a-z]*)))$")) - { - check_is_ignored(); - trigger_hotword($@regexmatch$[1]); - } - - else if (.@no_nick_clean$ ~= "^(hi(ya)?|hello|heya?) (all|friends|every(one|body))") - { - check_is_ignored(); - trigger_hiall(); - } - - else - { - if (.lastsender == getcharid(CHAR_ID_CHAR)) - @monologue++; - - else - @monologue = 1; - } - - // TODO: eliza mode, whisper eliza mode - end; - -OnTouch: - if (rand(.touch_rate) == 0) { - face(); - } - end; - -OnDoReply: - if (@tree_reply$ != "") { - npctalk(@tree_reply$); - @tree_reply$ = ""; - } - end; - -OnPCLogoutEvent: - seen_me(); - end; - -OnTimer3600000: - // scheduled janitor - .@now = gettimetick(2); - initnpctimer(); // schedule next - - if (.last_activity > (.@now - 3600)) { - end; // last activity is too recent - } - - // cleanup routine below - .lastsender = 0; - .last_activity = 0; - .last_reply = 0; - .last_emote = 0; - .last_query = 0; - .blocked = 0; - .enable_janitor = 0; - - htclear(.msg_ht); // empty the message table (quotegrabs) - htclear(.ignore_ht); // empty the ignore table - - .@it = htiterator(.seen_ht); // allocate new iterator - for (.@key$ = htinextkey(.@it); hticheck(.@it); .@key$ = htinextkey(.@it)) { - if (.@key$ == "") { - continue; - } - - if (htget(.seen_ht, .@key$, 0) < (.@now - 86400)) { - htput(.seen_ht, .@key$, 0); // remove from hash table if older than 24h - } - } - htidelete(.@it); // free the iterator - - face(); // do an emote (because why not) - end; - - -OnDay0320: - .dir = DOWNLEFT; - end; - - -OnDay0621: - .dir = LEFT; - end; - - -OnDay0922: - .dir = UPLEFT; - end; - - -OnDay1221: - .dir = DOWN; - end; - - -OnInit: - // config below - .hotwords$ = "tree"; // what hot words the npc should listen to, besides its own name (regex) - .distance = 14; // the npc will only listen to player within X tiles - .dir = season_direction(); // sprite direction according to the season - .talk_rate = 1; // min number of seconds to wait between replies - .repeat_rate = 1; // min number of seconds to wait before sending the same message twice in a row - .block_time = 600; // how long to stay quiet after someone says shut up, in seconds - .emote_rate = 3; // min number of seconds to wait between emotes - .sdrop_rate = 8; // 1 in X chances to get a special drop - .sname_rate = 8; // 1 in X chances to get a special name - .dunno_rate = 2; // 1 in X chances to get a reply when the command is not found - .hiall_rate = 2; // 1 in X chances to reply to a "hi everyone" - .touch_rate = 4; // 1 in X chances to trigger the OnTouch action - .qpoll_rate = 1; // min number of seconds to wait before calling the sql db again for GMs - .qpoll_rate2 = 5; // min number of seconds to wait before calling the sql db again for non-GMs (currently unused) - .delay_reply = 250; // number of ms to wait to reply - .enable_janitor = true; // automatically free memory when idle - .symbol$ = "~"; // symbol for GM-only commands - - // register some arrays - callfunc("TREE_dictionaries"); - - // do random stuff - make_quote_table(); - face(); - - // boring stuff below - .version[0] = 21; // increase this when you make a change - .version[1] = 1; - .uptime = gettimetick(2); - .alwaysVisible = true; // the NPC doesn't de-spawn when moving away - .pid = 1; // regex pattern id - .msg_ht = htnew(); // hashtable id for message history - .seen_ht = htnew(); // hashtable id for seen log - .ignore_ht = htnew(); // hashtable id for ignored players - .roulette = rand(1, 7); // spin the chambers - defpattern(.pid, "^(.*)$", "OnTalkNearby"); - activatepset(.pid); - if (.enable_janitor) { - initnpctimer(); - } -} - -// Duplicates below -//000-1,42,63,0 duplicate(Confused Tree) Confused Palm Tree NPC_NO_SPRITE,14,14 diff --git a/npc/008-1/crane.txt b/npc/008-1/crane.txt deleted file mode 100644 index 3a22fa47..00000000 --- a/npc/008-1/crane.txt +++ /dev/null @@ -1,92 +0,0 @@ -// TMW scripts. -// Author: -// Micksha -// Description: -// Crane is Snarfles' apprentice, who secretly eats mouboo steak and enjoys. - -008-1,97,113,0 script Crane NPC_SNARFLES,{ - function foodQuest; - - mesn; - mesq l("Heya. I am Crane, Snarfle's apprentice."); - if (getq(General_SmearedHands) <= 3 && getq2(General_SmearedHands) != 1) - foodQuest(); - close; - -function foodQuest { - .@q=getq(General_SmearedHands); - next; - mesn; - mesq l("Don't tell him, but, I secretly love %s!", getitemlink(MoubooSteak)); - switch (.@q) { - case 1: - next; - mesn strcharinfo(0); - select - l("Do you know a recipe for %s?", getitemname(BarbecuePlate)), - l("Okay, I won't."); - mes ""; - if (@menu == 2) - break; - mesn; - mesq l("Ah sure, it is a simple recipe, I could even make one for you and give you the recipe, but..."); - next; - mesn; - mesq l("I always get smeared hands eating it and cannot play cards anymore with Snarfles."); - next; - mesn; - mesq l("Well, if you find me a solution for that problem, I can give you the recipe. What do you say?"); - next; - mesc l("WARNING: If you accept this quest, you'll be struck at the %s route!", b(l("Carnivour"))), 1; - mesc l("This will also make %s's Quest unavailable.", b("Snarfles")), 1; - mesc l("This decision cannot be changed later."), 1; - next; - mesc l("Accept this request?"), 1; - if (askyesno() == ASK_YES) { - setq General_SmearedHands, 2, CARNIVOROUS; // 2 = Carnivorous - mesn; - mesq l("Great! I'll be eager for your return!"); - } - break; - case 2: - mesn; - mesq l("Have you found a solution for my smeared hands problem?"); - next; - select - l("No, not yet."); - mes ""; - mesn; - mesq l("I've heard they're related to the earl of sandwich, so maybe a sandwich maker could help... *sigh* I want to play cards..."); - break; - case 3: - mesn strcharinfo(0); - select - l("Have you tried putting it in a bread already?"), - l("I'll keep looking for solutions for your problem."); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("Actually... No. Have been too afraid of it tasting foul."); - next; - mesn strcharinfo(0); - mesq l("Really? Tiki, Candor's chef, liked it very much."); - next; - mesn; - mesq l("Wha - Really?! Tiki said it tasted good??! I'm saved! You're truly my savior!!"); - next; - mesn; - mesq l("I'll put the %s recipe on your %s. Thanks, you saved my day!", getitemlink(BarbecuePlate), getitemlink(RecipeBook)); - RECIPES[CraftBarbecuePlate]=true; - getitembound BarbecuePlate, 1, IBT_ACCOUNT; - setq1 General_SmearedHands, 4; // Finished - default: - return; - } - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/diryn.txt b/npc/008-1/diryn.txt new file mode 100755 index 00000000..e8bd5aa8 --- /dev/null +++ b/npc/008-1/diryn.txt @@ -0,0 +1,7 @@ + +008-1,81,82,0 script Diryn the Traveler NPC103,{ + @npcname$ = "Diryn"; + @NpcTravelBit = $@hurnscald_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/008-1/dock.txt b/npc/008-1/dock.txt new file mode 100755 index 00000000..651dd402 --- /dev/null +++ b/npc/008-1/dock.txt @@ -0,0 +1,84 @@ + +008-1,147,64,0 script Hurnscald North Koga NPC395,10,3,{ + @npc_distance = 11; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardFerry"; + end; + +OnTouch: + addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard"; + end; + +OnBoard: + callfunc "BoardFerry"; + end; +} + +008-1,139,65,0 script Hurnscald North Dock NPC400,2,1,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardFerry"; + end; +} + +008-1,120,44,0 script #Hurnscald NorthDock NPC32767,{ + end; +OnCommandArrive: + disablenpc "Hurnscald North Dock"; + enablenpc "Hurnscald North Koga"; + areatimer 0, "008-1", 137, 64, 141, 65, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock + end; + +OnAreaWarp: + callfunc "BoardFerry"; + end; + +OnCommandWarp: + disablenpc "Hurnscald North Koga"; + enablenpc "Hurnscald North Dock"; + end; +} + +008-1,147,75,0 script Hurnscald South Koga NPC395,10,3,{ + @npc_distance = 10; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardCandorFerry"; + end; + +OnTouch: + addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard"; + end; + +OnBoard: + callfunc "BoardCandorFerry"; + end; +} + +008-1,139,76,0 script Hurnscald South Dock NPC400,2,1,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardCandorFerry"; + end; +} + +008-1,65,25,0 script #Hurnscald SouthDock NPC32767,{ + end; +OnCommandArrive: + disablenpc "Hurnscald South Dock"; + enablenpc "Hurnscald South Koga"; + areatimer 0, "008-1", 137, 75, 141, 76, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock + end; + +OnAreaWarp: + callfunc "BoardCandorFerry"; + end; + +OnCommandWarp: + disablenpc "Hurnscald South Koga"; + enablenpc "Hurnscald South Dock"; + end; +} diff --git a/npc/008-1/doors.txt b/npc/008-1/doors.txt deleted file mode 100644 index 7ad1d705..00000000 --- a/npc/008-1/doors.txt +++ /dev/null @@ -1,43 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Rossy Quest - -008-1,49,157,0 script #RossyCaveInit NPC_HIDDEN,0,0,{ - end; - -OnTouch: - if (getq(HurnscaldQuests_Rossy) != 16) - { - // Normal warping - warp "008-3-0", 129, 112; - } - else - { - // HurnscaldQuests_Rossy - // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL) - .@inst=getq3(HurnscaldQuests_Rossy); - .@mapn$="ross@"+getcharid(0); - // NOTE: .@inst >= 0 skipped now that inst=0 refers to La Marine - if (isinstance(.@inst) && instanceowner(.@inst) == getcharid(3)) - { - // Renew instance for 15 minutes - //instance_set_timeout(900, 900, .@inst); - // FIXME: Clean unkilled monsters - } else { - .@inst = instance_create("ROSSY "+getcharid(0), getcharid(3), IOT_CHAR); - instance_attachmap("008-3-0", .@inst, false, .@mapn$); - // Instance lasts 20 minutes - instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst); - instance_init(.@inst); - setq3 HurnscaldQuests_Rossy, .@inst; - // Reset quest progress - setq2 HurnscaldQuests_Rossy, 0; - @rossylock=false; - } - // Warp to instanced map - warp .@mapn$, 129, 112; - } - end; -} diff --git a/npc/008-1/george.txt b/npc/008-1/george.txt new file mode 100755 index 00000000..89c3bc9e --- /dev/null +++ b/npc/008-1/george.txt @@ -0,0 +1,42 @@ + +008-1,135,62,0 script George#pirate NPC138,{ + @halloween_npc_id = $@halloween_npc_george; + callfunc "TrickOrTreat"; + + if (getequipid(equip_head) == 617) goto L_Pirate; + if (getequipid(equip_head) == 622) goto L_Bandana; + if (getequipid(equip_head) == 621) goto L_EyePatch; + mes "[George the Pirate]"; + mes "\"Yar! Do you need something, matey?\""; + goto L_Main; + +L_Main: + menu + "Can you explain the Ferry?", L_Explain, + "Nothing I guess", L_close; + +L_Pirate: + mes "[George the Pirate]"; + mes "\"Arrrrh! Ye be wearing a pirate's hat!\""; + goto L_Main; + +L_Bandana: + mes "[George the Pirate]"; + mes "\"Arrrrh! Ye remind me of my old first mate!\""; + goto L_Main; + +L_EyePatch: + mes "[George the Pirate]"; + mes "\"Arrrrh! Looks like ye lost an eye there!\""; + goto L_Main; + +L_Explain: + mes "[George the Pirate]"; + mes "\"Arrr matey! I helped pioneer the trade routes between Hurnscald and the rest of the World, so now merchants and adventurers can travel to and fro without any hassle of dodging wolvern, yarr.\""; + next; + callfunc "FerryHelp"; + goto L_Main; + +L_close: + close; +} diff --git a/npc/008-1/hinnak.txt b/npc/008-1/hinnak.txt old mode 100644 new mode 100755 index 65d050e7..3672ed93 --- a/npc/008-1/hinnak.txt +++ b/npc/008-1/hinnak.txt @@ -1,354 +1,250 @@ -// Evol scripts. -// Author: -// gumi, Micksha -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - hinnak asked for help -// [1] 3 - helped hinnak -// [2] kill counter -// Description: - -// Hinnak needs help to get rid of the same stuff than ever. - -008-1,270,74,0 script Hinnak#008-1 NPC_HINNAK,{ - - if (BaseLevel < .min_level) - { - npctalk3 generic(1 | 16 | 64); - end; - } - - function hinn_new_player - { - if(getequipid(EQI_HEAD_TOP) == .bad_hat) - { - narrator 4, - l("The farmer lunges at you with a farming implement."); - heal -50, 0; - - selectd - l("I'm out of here."), - l("Whoa, what are you doing?"); - - if (@menu == 1) - { - return; - } - - speech 4 | 1, - l("Sorry, you look like a pinkie."), - l("They've been destroying my fields, and I guess I got a bit worked up."); - } - - else - { - speech 4, - l("Argh!"), - l("I hate them!"), - l("I @#$% hate them!"), - l("I @#$% hate these @#$% pinkies!"); - - selectd - l("You need some anger control therapy."), - l("Why do you hate them?"); - - if (@menu == 1) - { - return; - } - - speech 4 | 1, - l("These @#$% beasts are jumping around in my fields destroying all my harvest."), - l("But they are too fast."), - l("I can't catch them."); - } - - selectd - l("Want me to help you?"); - - speech 4 | 1, - l("Yes, you look quite fast."), - l("Maybe you can catch some of them."), - l("That will pay them a lesson."), - l("Slay some of them and bring me %d of their antennae.", .drop_count); - - setq .quest, 2, 0; - - selectd - l("How much is this worth to you?"); - - speech 1, - l("Well, I can't offer you much."), - l("But I got an old scythe laying around."), - l("Maybe you can use it as a weapon."); - - close; - } - - function hinn_help - { - if (getequipid(EQI_HEAD_TOP) == .bad_hat) - { - narrator 4, - l("The farmer glares at your hat."); - } - - speech 4, - l("Have you got the %d antennae?", .drop_count); - - selectd - l("Not yet, but I am working on it."), - rif(countitem(.monster_drop) >= .drop_count, l("Sure, here they are!")); - - if (@menu == 1) - { - return; - } - - if (getq2(.quest) < .kill_count) - { - speech 1, - l("Don't try to fool me!"), - l("I know you didn't kill them yourself!"), - l("Kill at least %d pinkies and come back.", .kill_count); - close; - } - - speech 1, - l("Thank you very much"), - l("As promised, here's my old scythe."), - l("Maybe you can use it as a weapon."), - l("It is a bit cumbersome but its strikes are deadly."); - - if (countitem(.monster_drop) >= .drop_count) - { - delitem .monster_drop, .drop_count; - getitem .reward_item, 1; - quest_gp(.maxLevel, .reward_money); - //getexp .reward_exp, 0; - setq .quest, 3; - } - close; - } - - function hinn_thanks - { - if (getequipid(EQI_HEAD_TOP) == .bad_hat) - { - speech 4, - l("That better be a trophy on your head."); - - selectd - l("It is."); - - speech 4 | 1, - l("Good then."), - l("Thanks for your help with the pinkies."); - } - - else - { - speech 4, - l("Good to see you again."), - l("Thanks again for helping me with the pinkies!"); - } - - selectd - l("Sure, any time!"), - l("Anything else you want me to do?"), - l("You're welcome. Bye!"); - - if (@menu == 3) - { - return; - } - - speech 4 | 1, - l("Actually, it's been a long day."), - l("If it's no trouble, could you get me a %s?", - getitemlink(.drink_item)); - - selectd - rif(countitem(.drink_item) >= 1, l("Here you are.")), - l("Sure, I'll go get one. Bye!"), - l("You shouldn't drink while working!"); - - do - { - switch (@menu) - { - case 2: return; - case 3: - speech 1, - l("Well, I'm done for the day, and I'm quite old enough to decide when I can have a %s, thank you!", - getitemname(.drink_item)); - selectd - rif(countitem(.drink_item) >= 1, l("Sorry... here you are.")), - l("I don't have any."); - break; - default: - if (countitem(.drink_item) < 1) - { - return; - } - delitem .drink_item, 1; - - narrator 4 | 8 | 2 | 1, - l("%s takes a sip.", .name$); - - speech 4, - l("Aaah!"), - l("Nothing like a well-deserved %s after a long day of tending the crops!", - getitemname(.drink_item)), - l("Thanks, that was very kind of you!"); - - narrator 4 | 8 | 1 | 2, - l("He takes another sip."); - - speech 4, - l("Thanks!"), - l("You know, I had the strangest thing happen to me."), - l("I had this patch of ground that was really clumpy; lots of clay, you see."), - l("Right over there."), - // TODO: move cam to the spot - l("Looks much better now, doesn't it?"), - // TODO: restore cam - l("But how I got there is kind of scary..."), - l("I'd been trying to break it up for a while, but that kind of work is a pain."), - l("So my wife said that I should go and see the witch, just in case she knows something."), - l("And sure enough I ask the witch, and she has a look at it."), - l("“Nothing I can do”, she says, “but I can ask a friend”."), - l("So the next day another witch shows up."), - l("Gorgeous woman, but when she looked at me, the scares went scuttling down my spine..."), - l("First thing she asked was if I'm a farmer."), - l("Said her friend had told her that I needed help."), - l("I show her what the problem is, and she tells me to go inside and wait."); - - narrator 4 | 8 | 1 | 2, - l("%s drains his mug in one long sip, then hesitates.", .name$); - - speech 4, - l("So I go inside."), - l("I'm barely in when it starts raining outside, pouring cats and mouboos!"), - l("Not so weird, perhaps, except that it was been bright and sunny just a second before!"), - l("So I rush out, my wife telling me to leave the witch alone, and I see her standing there in the middle of the rain..."), - l("None of the raindrops touched her, as if they were afraid!"), - l("Then she yells out some gobbledygook word, and out of the ground there comes a swarm of maggots, crawling and digging and climbing over each other's backs..."), - // XXX: maybe here insert a reference to SUSAN? - l("And then she turns to me!"), - l("Seeing her gaze, for a moment there I thought she would turn me into a pinkie, for sure..."), - l("But all she says is, “had you stayed inside, you wouldn't be wet now”."); - - selectd - l("Hahaha!"), - l("Whoah, scary..."), - l("What was that gobbledygook word?"), - l("I better go now. Bye."); - - switch (@menu) - { - case 1: - speech 1, - l("Yeah, funny now..."), - l("But you should've seen that gaze!"), - l("Ah, well, never mind."); - close; - case 2: - speech 1, - l("Yeah, you could say that..."); - close; - case 3: - speech 1, - l("Oh, I can't be sure..."), - l("But something like “Nanaj princino”, I think."); // this is "Dwarven Princess" translated to Esperanto - close; - } - return; - } - } while(true); - } - - // OnTalk: - - if (getq(.quest_inspector) == 11) - { - selectd - l("Did you see anyone in a mask come by here at night?"), - l("Did you see anyone with a large satchel come by here at night?"), - l("Hello."); - - switch (@menu) - { - case 1: - speech - l("No."), - l("It tends to be too dark to see a mask."); - close; - - case 2: - speech - l("Yes, I saw someone with a large sack on their back go to the mining camp."); - close; - } - } - - switch (getq(.quest)) - { - case 0: - case 1: hinn_new_player; break; - case 2: hinn_help; break; - default: hinn_thanks; - } - - closeclientdialog(); + +008-1,101,30,0 script Hinnak NPC142,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@inspector == 10) goto L_NohMask; + goto L_No_NohMask; + +L_No_NohMask: + @state = ((QUEST_Hurnscald & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + + if (@state == 1) goto L_Exchange; + if (@state == 2) goto L_ThanksAgain; + if (getequipid(equip_head) == 751) goto L_Intro_Hat; + + mes "[Farmer Hinnak]"; + mes "\"Argh! I hate them! I @#$% hate them! I @#$% hate these @#$% pinkies!\""; + next; + menu + "You need some anger control therapy.", L_close, + "Why do you hate them?", L_Reason; + +L_Intro_Hat: + mes "The farmer lunges at you with a farming implement."; + next; + heal -50, 0; + menu + "I'm out of here.", L_close, + "Whoa, what are you doing?", L_Intro_Hat_Explain; + +L_Intro_Hat_Explain: + mes "[Farmer Hinnak]"; + mes "\"Sorry, you look like a pinkie. They've been destroying my fields, and I guess I got a bit worked up.\""; + next; + goto L_Help; + +L_Reason: + mes "[Farmer Hinnak]"; + mes "\"These @#$% beasts are jumping around in my fields destroying all my harvest."; + mes "But they are too fast. I can't catch them.\""; + next; + menu + "Want me to help you?", L_Help, + "Well, life ain't fair.", L_close; + +L_Help: + mes "[Farmer Hinnak]"; + mes "\"Yes, you look quite fast. Maybe you can catch some of them. That will pay them a lesson."; + mes "Slay some of them and bring me 10 of their antennae.\""; + @state = 1; + callsub S_Update_Mask; + next; + menu + "Sure, I'm on my way", L_close, + "How much is this worth to you?", L_Reward; + +L_Reward: + mes "[Farmer Hinnak]"; + mes "\"Well, I can't offer you much. But I got an old scythe laying around. Maybe you can use it as a weapon.\""; + goto L_close; + +L_Exchange: + if (getequipid(equip_head) != 751) + goto L_Exchange_Start; + mes "The farmer glares at your hat."; + next; + goto L_Exchange_Start; + +L_Exchange_Start: + mes "[Farmer Hinnak]"; + mes "\"Have you got the 10 antennae?\""; + next; + menu + "Not yet, but I am working on it.", L_close, + "Sure, here they are!", L_Exchange_Exchange; + +L_Exchange_Exchange: + if (countitem("PinkAntenna") < 10) + goto L_Exchange_Notenough; + getinventorylist; + if (@inventorylist_count == 100 && countitem("PinkAntenna") > 10) + goto L_Exchange_TooMany; + delitem "PinkAntenna", 10; + getitem "Scythe", 1; + @state = 2; + callsub S_Update_Mask; + mes "[Farmer Hinnak]"; + mes "\"Thank you very much. I've got something for you. My old scythe. Maybe you can use it as a weapon. It is a bit cumbersome but its strikes are deadly.\""; + goto L_close; + +L_Exchange_Notenough: + mes "[Farmer Hinnak]"; + mes "\"It doesn't look like you do.\""; + goto L_close; + +L_Exchange_TooMany: + mes "[Farmer Hinnak]"; + mes "\"Looks like you don't have room for this. Come back later to receive your reward. Hold on to the antennea until then.\""; + goto L_close; + +L_ThanksAgain: + if (getequipid(equip_head) == 751) + goto L_ThanksHat; + mes "[Farmer Hinnak]"; + mes "\"Good to see you again, and thanks again for helping me with the pinkies!\""; + next; + goto L_ThanksMenu; + +L_ThanksHat: + mes "[Farmer Hinnak]"; + mes "\"That better be a trophy on your head.\""; + menu + "It is.", L_Next; + +L_Next: + mes "[Farmer Hinnak]"; + mes "\"Good then. Thanks for your help with the pinkies.\""; + goto L_ThanksMenu; + +L_ThanksMenu: + menu + "Sure, any time!", L_Next1, + "Anything else you want me to do?", L_Next1, + "You're welcome. Bye!", L_Bye; + +L_Next1: + mes "[Farmer Hinnak]"; + mes "\"Actually, it's been a long day. If it's no trouble, could you get me a beer?\""; + next; + menu + "Here you are.", L_GiveBeer, + "Sure, I'll go get one. Bye!", L_Bye, + "You shouldn't drink while working!", L_Next2; + +L_Next2: + mes "[Farmer Hinnak]"; + mes "\"Well, I'm done for the day, and I'm quite old enough to decide when I can have a beer, thank you!\""; + next; + menu + "Sorry... here you are.", L_GiveBeer, + "I don't have any.", L_NoBeer; + +L_GiveBeer: + if (countitem("Beer") < 1) + goto L_NoBeer; + delitem "Beer", 1; + mes "[Farmer Hinnak]"; + mes "Hinnak takes a sip."; + mes "\"Aaah! Nothing like a well-deserved beer after a long day of tending the crops!\""; + mes "\"Thanks, that was very kind of you!\""; + next; + mes "[Farmer Hinnak]"; + mes "He takes another sip."; + mes "\"Thanks! You know, I had the strangest thing happen to me. I had this patch of ground that was really clumpy; lots of clay, you see.\""; + next; + mes "[Farmer Hinnak]"; + mes "\"Right over there.\""; + mes "He points to a stretch of soft, raked ground."; + mes "\"Looks much better now, doesn't it? But how I got there is kind-a scary...\""; + next; + mes "[Farmer Hinnak]"; + mes "\"I'd been trying to break it up for a while, but that kind of work is a pain. So my wife said that I should go and see the witch, just in case she knows something.\""; + next; + mes "[Farmer Hinnak]"; + mes "\"And sure enough I ask the witch, and she has a look at it. 'Nothing I can do', she says, 'but I can ask a friend'.\""; + next; + mes "[Farmer Hinnak]"; + mes "\"So the next day another witch shows up. Gorgeous woman, but when she looked at me, the scares went scuttling down my spine....\""; + mes "\"First thing she asked was if I'm a farmer. Said her friend had told her that I needed help.\""; + next; + mes "[Farmer Hinnak]"; + mes "\"I show her what the problem is, and she tells me to go inside and wait.\""; + next; + mes "[Farmer Hinnak]"; + mes "\"Hinnak drains his beer in one long sip, then hesitates."; + next; + mes "[Farmer Hinnak]"; + mes "\"So I go inside. I'm barely in when it starts raining outside, pouring cats and mouboos!\""; + next; + mes "[Farmer Hinnak]"; + mes "\"Not so weird, perhaps, except that it was been bright and sunny just a second before! So I rush out, my wife telling me to leave the witch alone, and I see her standing there in the middle of the rain...\""; + next; + mes "[Farmer Hinnak]"; + mes "\"None of the raindrops touched her, as if they was afraid!\""; + next; + mes "[Farmer Hinnak]"; + mes "\"Then she yells out some gobbledygook word, and out of the ground there comes a swarm of maggots, crawling and digging and climbing over each other's backs...\""; + next; + mes "[Farmer Hinnak]"; + mes "\"And then she turns to me! Seeing her stare, for a moment there I think that she'll turn me into a pinkie, for sure...\""; + next; + mes "[Farmer Hinnak]"; + mes "\"But all she says is, 'if you'd stayed inside, you wouldn't be wet now'.\""; + next; + menu + "Hahaha!", L_Sagatha_hahaha, + "Whoah, scary...", L_Sagatha_scary, + "What was that gobbledygook word?", L_Sagatha_word, + "I better go now.", L_Bye; + +L_Sagatha_hahaha: + mes "[Farmer Hinnak]"; + mes "\"Yeah, funny now... But you should've seen that stare! Ah, well, never mind.\""; + goto L_close; + +L_Sagatha_scary: + mes "[Farmer Hinnak]"; + mes "\"Yeah, you could say that...\""; + mes "He stares into his empty beer jug, as if wishing it weren't empty yet."; + goto L_close; + +L_Sagatha_word: + mes "[Farmer Hinnak]"; + mes "\"Oh, I can't be sure... but something like '" + get(.invocation$, "summon-maggots") + "', I think.\""; + goto L_close; + +L_NoBeer: + mes "[Farmer Hinnak]"; + mes "\"Ah... no beer? Oh well.\""; + goto L_close; + +L_Bye: + mes "[Farmer Hinnak]"; + mes "\"Bye!\""; + goto L_close; + +L_NohMask: + menu + "Did you see anyone in a mask come by here at night?", L_NohMask_Mask, + "Did you see anyone with a large satchel come by here at night?", L_NohMask_Satchel, + "Hello.", L_No_NohMask; + +L_NohMask_Mask: + mes "[Farmer Hinnak]"; + mes "\"No. It tends to be too dark to see a mask.\""; + goto L_close; + +L_NohMask_Satchel: + mes "[Farmer Hinnak]"; + mes "\"Yes, I saw someone with a large sack on their back go to the mining camp.\""; + goto L_close; + +L_close: + @state = 0; + @inspector = 0; close; -OnNPCKillEvent: - // XXX: maybe have a OnTakeScript on the pinky antena item so we count pickups instead of kills - if (killedrid == .monster_id && getq(.quest) == 2 && - getq2(.quest) < .kill_count && strcharinfo(PC_MAP) == .map$) - { - setq .quest, 2, getq2(.quest) + 1; - } - end; - -OnPCLoginEvent: -OnPCBaseLvUpEvent: - if (BaseLevel >= .min_level && getq(.quest) < 1) - { - setq .quest, 1; // allow the player to do the quest - dispbottom l("New quest available: %s (level %d+)", - getquestlink(.quest), .min_level); // XXX: requires new manaplus versions, maybe show a different message for old versions? - } - end; - -OnInit: - .min_level = 15; // min level to do the quest - .maxLevel = getiteminfo(Scythe, ITEMINFO_ELV) + 20; - .monster_id = Pinkie; // monster to kill - .monster_drop = PinkAntennae; // monster drop to collect - .drop_count = 10; // amount of that drop needed - .kill_count = 10; // min number of kills - .reward_item = Scythe; // reward item - .reward_money = 0; // reward money - .reward_exp = 0; // reward exp - .bad_hat = PinkieHat; // hinnak attacks you when you wear this hat - .drink_item = Beer; // the item hinnak asks to drink - - .quest = HurnscaldQuests_Hinnak; - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_1_MASK)) | (@state << NIBBLE_1_SHIFT); + return; } - diff --git a/npc/008-1/jack.txt b/npc/008-1/jack.txt deleted file mode 100644 index fd16d965..00000000 --- a/npc/008-1/jack.txt +++ /dev/null @@ -1,314 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states (forest bow): -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - alan wants to ask jack -// [1] 3 - jack explained problem -// [1] 4 - alan asks to find wood -// [1] 5 - found perfect wood -// [1] 6 - got the bow -// [2] fail count -// [3] unused -// [t] unused -// Quest states (wooden shield): -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - jack proposes shield -// [1] 3 - player accepted quest -// [1] 4 - got the shield -// [2] unused -// [3] unused -// [t] unused -// Description: -// Jack Lumber, the handsome lumberjack - - -008-1,241,116,0 script Jack NPC_LUMBERJACK,{ - - function bow_intro { - speech(4, - l("Why not?!"), - l("I value my life, that's why!")); - - selectd(l("What do you mean?")); - - speech(4, - l("A week ago, I was going to chop down one of those twigleaf trees in the forest to the southwest."), - l("These twigleafs are the trees that give me the living wood you speak of."), // XXX: were Log Heads named "Twigleaf" at some point in the past? - l("I was just chopping away with my axe, and guess what happened?"), - l("One of its branches hit me!"), - l("At first, I thought it fell down or the wind blew it, but it hurt!"), - l("After I shook it off and struck the tree again with my axe, another branch hit me!"), - l("I got angry and started to chop off all the low-hanging branches so this couldn't happen anymore."), - l("Even after all that though, I still can't believe what happened next.")); - - selectd(l("What happened?")); - - speech(4, - l("You'll think I'm insane if I tell you...")); - - selectd(l("I won't. I promise.")); - - speech(4, - l("Alright, well..."), - l("After I chopped off a few branches, the whole tree started to move!"), - l("Its roots tore out of the earth, all the branches started to wave around, and a face appeared on the trunk."), - l("The whole tree CAME TO LIFE! It was mad!")); - - selectd(l("Did you run away?"), l("Did you fight it?")); - - speech(4, - l("I fought it, of course!"), - l("I took my axe and attacked the beast!"), - l("It hit me here *points at a bruise on his shoulder*, here *lifts his trouser leg to show another bruise*, and here *lifts his shirt and reveals even worse bruises*."), // XXX: that's kinda dirty imho... maybe we could use the narrator? - l("But I didn't give up!"), - l("I chopped away at it, branch after branch, and in the end I chopped off its roots, and it fell to the ground, motionless.")); - - selectd(l("So you beat the monster? Then why are you so scared?")); - - speech(4, - l("Well, I was exhausted and had to rest."), - l("A few minutes passed, and suddenly I was practically surrounded by a dozen or more of these living trees!")); - - selectd(l("Did you fight them too?")); - - speech(4, - l("Are you crazy?"), - l("I barely destroyed one of those beasts."), - l("I was in no shape to fight again!"), - l("I ran away as fast as I could, and lucky for me the monsters aren't that fast on their tiny root legs, Ha!")); - - selectd(l("So, I guess you aren't chopping down trees anymore?")); - - speech(4, - l("I still do; it's my job."), - l("But I'll no longer chop those twigleafs, I'll tell you that."), - l("I know the bow master wants some twigleaf wood, but I don't care."), - l("I won't risk MY life for a few gold pieces!"), - l("If you really want to, just go to the southwest, but I can't help you."), - l("I won't go there ever again.")); - - selectd(l("Southwest you say? OK, thank you.")); - - speech(l("Don't say I didn't warn you!")); - - // What a huge text wall, I feel sorry for the players - - close2; - setq(.quest_bow, 3); - end; - } - - function bow_good_luck { - if (getq(.quest_inspector) == 2) - { - speech(4, - l("Good luck hunting those tree monsters – you'll need it.")); - - selectd(l("Have you seen anything that might be connected to the recent robberies in town?")); - - speech(l("Sorry, no.")); - close; - } - - npctalk3(l("Good luck hunting those tree monsters – you'll need it.")); - end; - } - - function shield_intro { - speech(4, - l("I have an idea."), - l("What would you say about a new shield?")); - - setq(.quest_shield, 2); - - selectd( - l("No thanks."), - l("Yes, please!"), - rif(getq(.quest_inspector) == 2, l("Have you seen anything that might be connected to the recent robberies in town?"))); - - switch (@menu) - { - case 1: closeclientdialog(); close; - case 2: - speech( - l("All I need is %d %s.", .logs_amount, getitemlink(.logs_item)), - l("This needn't be high quality wood; pretty much any log you can find should work."), - l("Oh, and I'll also need %s E for other materials.", format_number(.shield_cost))); - - close2; - setq(.quest_shield, 3); - end; - case 3: speech(l("Sorry, no.")); close; - } - } - - function bow_congrats { - speech(4, - l("You've finally found that perfect piece of living wood that Alan needs to make a Forest Bow, haven't you?")); - - selectd( - l("I couldn't afford the bow, though..."), - l("No, I'm still looking."), - l("Yes, I've got the Forest bow now."), - l("I'm a melee warrior, I don't need bows."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything that might be connected to the recent robberies in town?"))); - - switch (@menu) - { - case 3: - if (getq(.quest_bow) <= 5) - { - speech(4, - l("Hrmph."), - l("I'm someone who respects those speaking the truth.")); - } - // fallthrough - case 1: - case 4: - speech(4, - l("You no doubt remember how I struggled with those beasts, fighting for my life."), - l("Scared me, those seven-branched little stumps did!"), - l("Never since that day have I strayed near them, and yet there you are, cutting them down one by one."), - l("I'm proud of you – to dare to fight those trunks is admirable indeed."), - l("You're as strong as if you were my own child!")); - - shield_intro; - break; - case 2: speech(l("You should go talk to Alan again.")); close; - case 5: speech(l("Sorry, no.")); close; - } - } - - function shield_make { - speech(4, - l("Do you have the %d %s and %s E for the shield?", - .logs_amount, getitemlink(.logs_item), format_number(.shield_cost))); - - selectd( - rif(countitem(.logs_item) >= .logs_amount && Zeny >= .shield_cost, - l("Here it is.")), - l("I'll come back later.")); - - if (@menu != 1) { - closeclientdialog(); - close; - } - - speech(4, - l("Have a seat.")); - - narrator(4, - l("Jack saws the logs into pieces and then sands them until they are smooth to the touch."), - l("Applying some strong-smelling liquid, he tans them to a darker hue."), - l("Grabbing one of two leftover pieces, he begins to carve it into a round shape, then repeats this with the second piece – shield handles from what you can tell."), - l("Meanwhile, the sun has dried the other pieces."), - l("Jack places them next to each other, adds a frame, and nails everything together."), - l("The resulting shield looks usable already, but Jack applies another liquid to it and leaves it to dry for a few moments."), - l("Finally, he hands the shield to you.")); - - if (checkweight(.shield_item, 1) != true) - { - speech( - l("It seems you can't carry the %s.", getitemlink(.shield_item)), - l("Come back when you do.")); - close; - } - - if (Zeny < .shield_cost || countitem(.logs_item) < .logs_amount) - close; // double-check - - setq(.quest_shield, 4); - delitem(.logs_item, .logs_amount); - getitem(.shield_item, 1); - Zeny -= .shield_cost; - quest_xp(.maxLevel, .shield_exp); - - speech( - l("Enjoy your new shield!")); - - close; - } - - function wood_daily { - speech(4, - l("I hope that my shield will serve you well!")); - - selectd( - l("Me too."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything that might be connected to the recent robberies in town?"))); - - switch (@menu) - { - case 2: speech(l("Sorry, no.")); close; - } - - closeclientdialog(); // TODO: daily quest (needs the generic daily quest script) - close; - } - - // OnTalk: - switch (getq(.quest_shield)) - { - case 2: shield_intro; break; - case 3: shield_make; break; - case 4: wood_daily; break; - } - - switch (getq(.quest_bow)) - { - case 3: - case 4: bow_good_luck; break; - case 5: - case 6: bow_congrats; break; - } - - // initial intro - { - speech(4, - l("Hello there!"), - l("My name is Jack Lumber, the enemy of all trees."), - l("If you need some firewood, just let me know.")); - - selectd( - l("I'll keep that in mind."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything that might be connected to the recent robberies in town?")), - rif(getq(.quest_bow) == 2, l("I heard you aren't delivering any more living wood. Why not?"))); - - switch (@menu) - { - case 2: speech(l("Sorry, no.")); close; - case 3: bow_intro; break; - } - - } - - closeclientdialog(); - close; - -OnInit: - .logs_item = RawLog; - .logs_amount = 40; // XXX: maybe nlogn? - .shield_cost = 5000; // XXX: maybe nlogn? - .shield_exp = 2500; - .shield_item = WoodenShield; - .maxLevel = getiteminfo(WoodenShield, ITEMINFO_ELV) + 20; - - .quest_bow = HurnscaldQuests_ForestBow; - .quest_shield = HurnscaldQuests_WoodenShield; - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_bow; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-1/mapflags.txt b/npc/008-1/mapflags.txt old mode 100644 new mode 100755 index f2680964..71786e90 --- a/npc/008-1/mapflags.txt +++ b/npc/008-1/mapflags.txt @@ -1 +1 @@ -008-1 mapflag town +//008-1 mapflag resave 009-2,149,43 diff --git a/npc/008-1/marine.txt b/npc/008-1/marine.txt deleted file mode 100644 index ca448a2e..00000000 --- a/npc/008-1/marine.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Moubootaur Legends scripts. -// Authors: -// Jesusalva -// Description: -// This script controls access to Ships, fixing variables. - -// Use NPC_LA_MARINE if needed -008-1,327,104,0 script La Marine#H NPC_HIDDEN,0,0,{ - end; - -OnTouch: - EnterTown("Hurns"); - - warp "marine@"+LOCATION$, 42, 26; - closedialog; - close; -} diff --git a/npc/008-1/mikhail.txt b/npc/008-1/mikhail.txt old mode 100644 new mode 100755 index 24806baf..6cbc4881 --- a/npc/008-1/mikhail.txt +++ b/npc/008-1/mikhail.txt @@ -1,123 +1,61 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - bernard wants roasted maggot -// [1] 3 - brought maggot -// [1] 4 - bernard wants maggot slime -// [1] 5 - brought maggot slime -// [1] 6 - mikhail needs maggot slime -// [1] 7 - brought maggot slime -// [2] unused -// [3] unused -// [t] unused -// Description: -// takes part in the slime soup quest (Bernard) - -008-1,298,95,0 script Mikhail NPC_MIKHAIL,{ - - function soup_scared { - speech 4, - l("Hello..."), - l("I'm supposed to be helping Bernard from the Inn but..."); - - narrator 4, - l("His eyes grow wide"); - - speech 4, - l("Eeekkk another one."); - - narrator - l("It seems that the boy would like to say more, but seems too terrified at the moment."), - l("Maybe you should help someone else first, so that he sees your intentions are good."); - - close; - } - - function soup_intro2 { - speech 4, - l("Bernard sent me to get %d %s from the %s in the fields, but they scare me so bad!", - .third_item_qty, getitemlink(.third_item), getmonsterlink(.third_item_mob)), - l("You look like a nice person."), - l("Would you go get them for me?"); - - selectd - l("Of course, I'll go get them for you."); - - speech - l("Thank you so much!"), - l("I'll wait for you here."); - - setq .quest, 6; - close; - } - - function soup_reminder_slime2 { - speech - l("Did you bring me the %d %s I need?", - .third_item_qty, getitemlink(.third_item)), - l("It doesn't look like you have them all..."); - close; - } - - function soup_reward_slime2 { - speech - l("Did you bring me the %d %s I need?", - .third_item_qty, getitemlink(.third_item)), - l("Ooh!"), - l("Thank you so much!"), - l("I can get back to Bernard now!"); - - if (countitem(.third_item) < .third_item_qty) - close; // double-check - - delitem .third_item, .third_item_qty; - setq .quest, 7; - quest_xp(.maxLevel, .third_reward_exp); - close; - } - - function soup_thanks_slime2 { - speech - l("Thanks again for helping me!") + " %%Q"; - - close; - } - - switch(getq(.quest)) - { - - case 0: - case 1: - case 2: - case 3: - case 4: soup_scared; break; - case 5: soup_intro2; break; - case 6: - if (countitem(.third_item) < .third_item_qty) - soup_reminder_slime2; - else - soup_reward_slime2; - break; - default: soup_thanks_slime2; - } - - closeclientdialog(); +008-1,135,25,0 script Mikhail NPC120,{ + if (QL_SOUP >= 6) goto L_Done; + if (QL_SOUP == 5) goto L_Progress; + if (QL_SOUP == 4) goto L_Start; + goto L_Con_Mik_First; + +L_Con_Mik_First: + mes "[Mikhail]"; + mes "\"Hello... I'm supposed to be helping Bernard from the Inn but...\""; + mes "His eyes grow wide"; + mes "\"Eeekkk another one.\""; + mes ""; + mes "It seems that the boy would like to say more, but seems too terrified at the moment. Maybe you should help someone else first, so that he sees your intentions are good."; + goto L_close; + +L_Start: + mes "[Mikhail]"; + mes "\"Bernard sent me to get five Maggot Slimes from the maggots in the fields, but they scare me so bad!\""; + next; + mes "\"You look like a nice person. Would you go get them for me?\""; + menu + "Of course, I'll go get them for you.", L_Accept, + "I've got other things to do right now.", L_close; + +L_Accept: + mes "[Mikhail]"; + mes "\"Thank you so much! I'll wait for you here.\""; + QL_SOUP = 5; close; -OnInit: - .third_item = MaggotSlime; - .third_item_qty = 5; - .third_item_mob = Maggot; - - .maxLevel = 30; - .third_reward_exp = 100; - - .quest = HurnscaldQuests_Soup; - .quest_debug = .quest; - .distance = 3; - - end; +L_Progress: + mes "[Mikhail]"; + mes "\"Did you bring me the five Maggot Slimes I need?\""; + next; + menu + "Yes, here they are, kiddo!", L_try, + "Not yet, but I'll be back soon.", L_close; + +L_try: + if (countitem("MaggotSlime") >= 5) + goto L_Get; + mes "[Mikhail]"; + mes "\"It doesn't look like you have them all...\""; + goto L_close; + +L_Get: + delitem "MaggotSlime", 5; + getexp 100, 0; + QL_SOUP = 6; + mes "[Mikhail]"; + mes "\"Ooh! Thank you so much! I can get back to Bernard now!\""; + goto L_close; + +L_Done: + mes "[Mikhail]"; + mes "\"Thanks again for helping me get those Maggot Slimes!\""; + goto L_close; + +L_close: + close; } diff --git a/npc/008-1/milly.txt b/npc/008-1/milly.txt deleted file mode 100644 index 320ef3bf..00000000 --- a/npc/008-1/milly.txt +++ /dev/null @@ -1,119 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states (inspector): -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -// Give player a Beanie Copter after 1,000,000 kills (server-wide) -function script GetBeanieCopter { - // Double-check against possible malpractices - if ($MONSTERS_KILLED % 1000000 == 0) { - announce(sprintf("Congratulations, \"%s\", on killing the %sth monster!.", strcharinfo(0), format_number($MONSTERS_KILLED)), bc_all); - getitem BeanieCopter, 1; - dispbottom l("How strange, this monster dropped a very rare hat!"); - } - return; -} - -008-1,282,114,0 script Milly NPC_GIRL_MILLY,{ - - // TODO: make the actual beanie copter quest after those are finished: - // [X] Inspector quest - // [ ] Bone knife quest - // [ ] Setzer quest - // [ ] Rossy quest - // [ ] Cindy quest - - .@q_inspector = getq(.quest_inspector); - - speech(4, - l("Hello traveler, welcome to Hurnscald."), - l("Have you met Kfahr yet?"), - l("He is the greatest hero that ever walked the land of Hurnscald!")); - - selectd( - l("Hi! No, I haven't seen him yet."), - l("Where can I find him?"), - l("Mh, I don't care for heroes."), - l("Hello, yes I have met him."), - rif(.@q_inspector == 2, l("Have you seen anything strange lately?")), - rif(.@q_inspector == 2, l("Do you know anything about the recent robberies?"))); - - switch (@menu) - { - case 3: - speech(4, - l("What?"), - l("Surely you do not appreciate what a hero he is!"), - l("Mh, or perhaps honor is dead in you; for you to be so slow to comprehend the good that his exploits have wrought for us."), // XXX: this sentence seems too complicated to come from a child's mouth - l("Put on your thinking cap and be propelled into high adventure!"), - l("Go to Kfahr, and listen to his stories."), - l("You can't have met him."), - l("No one who has met him would say such silly things.")); - // fallthrough - - case 1: - speech(4, - l("I highly recommend you seek him out!")); - // fallthrough - - case 2: - speech( - l("He is a regular at the inn, located in the north-west part of town."), - l("If you are lucky he might tell you a story about his adventures.")); - break; - - case 4: - speech( - l("Oh, I hope you stayed and listened to his stories about his adventures.")); - break; - - case 5: - speech( - l("I haven't seen anything strange.")); - break; - - case 6: - speech( - l("No, sorry.")); - break; - } - - close; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; // TODO: change this to the milly quest debug when it exists - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-1/old-man.txt b/npc/008-1/old-man.txt deleted file mode 100644 index 5b0e2f51..00000000 --- a/npc/008-1/old-man.txt +++ /dev/null @@ -1,89 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -008-1,290,139,0 script Old Man NPC_OLD_MAN_HURNS,{ - - function oldman_ask { - speech(4, - l("Hi there, need something?")); - - selectd( - l("Have you seen anything strange lately?"), - l("Do you know anything about the recent robberies?")); - - speech( - l("I'm sorry, but I didn't see anything."), - l("You should ask my old woman.")); - close; - } - - function oldman_accuse { - speech(4, - l("Found anything new?")); - - selectd( - l("The leader of the troupe said you hung around them a lot while they were in town.")); - - speech( - l("Yes, I hung around the theater a lot."), - l("I was an actor when I was younger."), - l("But I wasn't there that night."), - l("Me and the wife were at home all night.")); - - close2; - setq(.quest_inspector, 8); - end; - } - - // OnTalk: - switch (getq(.quest_inspector)) - { - case 2: oldman_ask; break; - case 7: oldman_accuse; break; - } - - // initial intro - npctalk3(l("Don't let those monsters get to you.")); - end; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 1; // this npc has bad hearing - .speed = 2000; // this npc is very old - // TODO: move graph (after the Hurnscald map is finalized) - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-1/old-woman.txt b/npc/008-1/old-woman.txt deleted file mode 100644 index 89789b70..00000000 --- a/npc/008-1/old-woman.txt +++ /dev/null @@ -1,136 +0,0 @@ -/// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// Old Lady in the flower field, Robberies in Hurnscald. - -008-1,231,114,0 script Old Woman NPC_OLD_LADY,{ - - function is_inspector { - return (getequipcardid(EQI_HEAD_MID, 0) == NavyBlueCottonDye && - getequipcardid(EQI_HEAD_LOW, 0) == NavyBlueCottonDye); - } - - function oldwoman_ask { - speech(4, - l("Hello deary.")); - - selectd( - l("Have you seen anything strange lately?"), - l("Do you know anything about the recent robberies?")); - - .@q = getq(.quest_inspector); - - if (!is_inspector()) - { - speech(l("Yes, but I'm only talking to the inspector himself!")); - - close2; - if (.@q < 3) - setq(.quest_inspector, 3); - end; - } - - if (.@q == 2 || .@q == 3) - { - speech( - l("I saw someone sneaking around town wearing a theater mask."), - l("It looked like one of the masks used by the troupe that was in town recently.")); - - close2; - setq(.quest_inspector, 4); - } - - else if (.@q == 10) - { - speech( - l("I've remembered something else."), - l("The night the troupe left, I saw someone with a theater mask take a large satchel out of town."), - l("He was heading north.")); - - close2; - setq(.quest_inspector, 11); - } - - end; - } - - function oldwoman_alibi { - speech(4, - l("Hello deary.")); - - selectd( - l("Was your husband with you at home all night the last night that the troupe was in town?")); - - speech( - l("Yes, we were both at home all night.")); - - close2; - setq(.quest_inspector, 9); - end; - } - - function oldwoman_filler { - npctalk3(l("I hope you catch that naughty person!")); - end; - } - - // OnTalk: - switch (getq(.quest_inspector)) - { - case 2: - case 3: oldwoman_ask; break; - case 4: - case 5: - case 6: - case 7: oldwoman_filler; break; - case 8: - case 9: oldwoman_alibi; break; - case 10: oldwoman_ask; break; - } - - // initial intro - if (BaseLevel < 40) - npctalk3(l("Watch out for these flowers. They don't like to be messed with.")); - else - npctalk3(l("Hello deary.")); - end; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 1; // this npc has bad hearing - .speed = 2000; // this npc is very old - // TODO: move graph (after the Hurnscald map is finalized) - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-1/oscar.txt b/npc/008-1/oscar.txt deleted file mode 100644 index 2ea42456..00000000 --- a/npc/008-1/oscar.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Oscar the farmer. -// THIS IS A PLACEHOLDER! Read Dimond Chef before editing. - -008-1,160,77,0 script Oscar NPC_CAUL,{ - speech - l("Hi, my name is Oscar."), - l("I used to be a farmer, but my magic attempts were banned by the gouvernment."), - l("Now I remain poor and unemployed."); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/rossy.txt b/npc/008-1/rossy.txt deleted file mode 100644 index f0acfa67..00000000 --- a/npc/008-1/rossy.txt +++ /dev/null @@ -1,391 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Daughter of Olana and sister of Juliet. PLACEHOLDER SPRITE - -008-1,62,220,0 script Rossy NPC_TANISHA,{ - function rossyFirstmet; - function rossyBasket; - function rossyLetter; - function rossyPotionList; - function rossyPotionDone; - function rossyDeliverRoses; - function rossyDeliverTulip; - function rossyJulietIntro; - .@q=getq(HurnscaldQuests_Rossy); - mesn; - mesq l("Hello, wanderer."); - switch (.@q) { - case 1: - rossyFirstmet(); - break; - case 3: - rossyBasket(); - break; - case 6: - rossyLetter(); - break; - case 7: - rossyPotionList(); - break; - case 8: - mesn; - mesq l("What, you still have my potion with you??"); - next; - mesn; - mesq l("Could you please deliver it to %s in the magic academy? He is the head of alchemy.", b("David")); - break; - case 9: - case 10: - rossyPotionDone(); - break; - case 11: - rossyDeliverRoses(); - break; - case 13: - rossyDeliverTulip(); - break; - case 14: - mesn; - mesq l("Go and tell my mother that she is the nicest mother in the world."); - next; - select - l("Right on it."), - l("Did you find your sister? I am starting to get worried too."); - mes ""; - if (@menu == 2) { - mesn; - if (BaseLevel < .minLevel_rescue) - mesq l("I think I have an idea where Juliet might be. Come back in a few levels, and I will tell you if she is ok."); - else - mesq l("I think I have an idea where she might be. Come back in a few minutes, I will tell you if she is ok."); - } - break; - case 15: - rossyJulietIntro(); - break; - case 16: - mesn; - mesq l("Oh no! Juliet ... why would you go to that scary place? ... Please help her, %s!", strcharinfo(0)); - mesc l("The cave is %s", b(l("Northwest of here."))); - break; - case 17: - mesn; - mesq l("Hey %s!", strcharinfo(0)); - next; - mesn; - mesq l("Thanks for finding Juliet again. I'm so relieved!"); - next; - mesn; - mesq l("...I still wonder what was that thing Juliet was running from... Hm? Nothing! Just thinking out loud."); - break; - // Default messages - case 12: - mesc l("Achooo!"); - // FALLTHROUGH - default: - mesn; - mesq l("I'm being lazy right now, so please %s", any( - l("don't tell devs I'm slacking off again."), - l("tell my mother there is no reason to worry."), - l("don't worry with me.") - )); - } - close; - -function rossyFirstmet { - mesc l("A young girl looks at you in tears."); - next; - select - l("Hey there... Why are you crying? Are you hurt?"), - l("Sorry kid, I don't have time to play with children."); - mes ""; - if (@menu == 2) - return; - mesn l("Young Girl"); - mesq l("No. I'm crying because I lost all my fruits. My sister and I were collecting some near Dimond's Cove, but then I stumbled on a giant snail and it attacked us!"); - next; - mesn l("Young Girl"); - mesq l("But we were lucky, because the snail is really slow and we ran away from it. Juliet ran to the left and I ran to the right. The snail got pretty confused, because we are identical twins. The problem is that I dropped the basket full of fruits on the ground and that evil snail ate them all! And now I can't find Juliet to help me collect more fruits."); - next; - mesn strcharinfo(0); - select - l("Did you say \"Juliet\"? I talked to your mother Olana, She's very worried about you!"); - mes ""; - // You know she is Rossy, so mesn; won't need args anymore - mesn; - mesq l("Really? But she let us play in the woods. There's no reason to be worried – unless...."); - next; - mesn; - mesc l("Rossy suddenly gets a strange look on her face, mumbling something about Juliet."); - mesq l("Could you do me a favor? Please, tell my mother that we're alright. There's ... well ... there's no reason to worry about us."); - next; - select - l("Very well, if you say so...."), - l("Sorry, but I really don't have time for this."); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Then why bother? Weird person..."); - return; - } - setq HurnscaldQuests_Rossy, 2; - mesn; - mesq l("Thank you very much!"); - return; -} - -function rossyBasket { - mesn; - mesq l("Hey, that is nice of you to come back. I was thinking about giving a basket full of %s to my mother, to make her happy, you know.", getitemlink(Blueberries)); - next; - mesn; - mesq l("But I would need at least %d berries, and it would take ages to get so many by myself!", .blueberries_amount); - next; - select - l("That is no problem for me. Just wait and I will come back with the cherries."), - l("Ask Juliet, not me."), - rif(countitem(Blueberries), l("Hey, I have some in my backpack!")), - l("You should get them yourself."); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Juliet ran to the left, and I'm pretty sure she is doing the same."); - } - if (@menu != 3) - return; - if (countitem(Blueberries) < .blueberries_amount) { - mesn; - mesq l("You do, but that's not enough. I need %d %s.", .blueberries_amount, getitemlink(Blueberries)); - } - delitem Blueberries, .blueberries_amount; - quest_xp(.maxLevel, 2000); - quest_jxp(.maxLevel, 500); - setq HurnscaldQuests_Rossy, 4; - // FIXME: Perhaps give player a [Berries Bag] item? Hmm. - mesn; - mesq l("I can't believe it! You got all the berries needed! Lemme just wrap them and... done! Please give them to my mother. Tell her that it is a gift from me and Juliet, and that there's no reason to worry about us."); // Lemme = Let me - next; - mesn; - mesc l("%s mumbles to herself.", .name$); - mesq l("I hope..."); - next; - mesn; - mesq l("Oh, and after you give the berries to my mother, please come back here. Err, if you have some free time, of course."); - return; -} - -function rossyLetter { - mesn; - mesq l("I'm being lazy right now, so please %s", any( - l("don't tell devs I'm slacking off again."), - l("tell my mother there is no reason to worry."), - l("don't worry with me.") - )); - next; - select - l("Hocus sent a letter to you."), - l("Erm, okay."); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("The Grandmaster? %%U Lemme read..."); - next; - mesn; - mesc l("%s's face suddenly turns pale.", .name$); - mesq l("Oh no! I completely forgot. The exam! Dang, I knew I should not have picked Alchemy for study..."); - next; - mesn; - mesc l("%s looks at you with beady eyes.", .name$); - mesq l("I haven't found Juliet yet, and I don't even have any of the ingredients required. Could you get them for me? Pretty please? %%J"); - next; - select - l("Alright, tell me what I must get."), - l("Your cute face will not convince me - Your test, your responsibility."); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Yes, I know. I really should have started it earlier... But I can't look for Juliet AND get the ingredients at the same time. Some of them are only found in Tulimshar."); - next; - mesn; - mesq l("You don't even know how Juliet looks. Please come back if you reconsider. Please. Juliet could be being eaten by a creature, as we speak. %%i"); - return; - } - setq HurnscaldQuests_Rossy, 7, 0; - mesn; - mesq l("Excellent! So, as for the materials I need to brew the potion..."); - next; - rossyPotionList(); - return; -} - -function rossyPotionList { - .@t=getq2(HurnscaldQuests_Rossy); - // Potion submitted - if (.@t) { - // Finished! - if (.@t < gettimetick(2)) { - // Yay - mesn; - mesq l("I'm done! Thanks for the help. It is just the shade of blue I wanted."); - next; - mesn; - mesq l("Could you please deliver it to %s in the magic academy? He is the head of alchemy.", b("David")); - setq HurnscaldQuests_Rossy, 8, 0; - } else { - // Brewing - mesn; - mesq l("Please be patient... I'll be done in %s.", FuzzyTime(.@t)); - } - return; - } - - // Potion not yet finished - //mesf("- %d/%d %s", countitem(CactusDrink), 24, getitemlink(CactusDrink)); - mesf("- %d/%d %s", countitem(MaggotSlime), 32, getitemlink(MaggotSlime)); - mesf("- %d/%d %s", countitem(GambogeHerb), 50, getitemlink(GambogeHerb)); - mesf("- %d/%d %s", countitem(AlizarinHerb), 43, getitemlink(AlizarinHerb)); - mesf("- %d/%d %s", countitem(BugLeg), 30, getitemlink(BugLeg)); - mesf("- %d/%d %s", countitem(Pearl), 1, getitemlink(Pearl)); - next; - mesn; - mesq l("Do you have these materials with you?"); - next; - select - l("Not yet."), - l("Yes, here they are!"), - l("No, but I'll be right back."); - mes ""; - if (@menu != 2) - return; - if (countitem(MaggotSlime) < 32 || - countitem(GambogeHerb) < 50 || - countitem(AlizarinHerb) < 43 || - countitem(BugLeg) < 30 || - //countitem(CactusDrink) < 24 || - countitem(Pearl) < 1) { - mesn; - mesq l("You would lie to a poor, small, frail girl like me? %%S"); - next; - mesn; - mesq l("Don't you think that to be very coward on your part?"); - return; - } - //delitem CactusDrink, 24; - delitem MaggotSlime, 32; - delitem GambogeHerb, 50; - delitem AlizarinHerb, 43; - delitem BugLeg, 30; - delitem Pearl, 1; - setq2 HurnscaldQuests_Rossy, gettimetick(2)+900; - mesn; - mesq l("Perfect! Please allow me some time to brew this potion. It should be ready in 15 minutes or so."); - return; -} - -function rossyPotionDone { - mesn; - mesq l("So... How did it go?"); - next; - select - l("David said it was \"okay-ish\"."), - l("David said he would grade it later, but you had nothing to worry about."); - mes ""; - if (@menu == 1) { - mesn; - mesq l("That's a relief. Okay-ish is actually a pretty good grade in the Academy."); - next; - } - mesn; - mesq l("Could you please tell my mother about that? She is already worried with Juliet and me, no need to have her worried about the exam as well."); - compareandsetq HurnscaldQuests_Rossy, 9, 10; - return; -} - -function rossyDeliverRoses { - if (countitem(ARedRose) < 15) { - mesn; - mesq l("Hello %s.", strcharinfo(0)); - return; - } - select - l("Your mother was so happy that she asked me to bring you these flowers."); - mes ""; - delitem ARedRose, 15; - setq HurnscaldQuests_Rossy, 12; - mesn; - mesq l("How nice!"); - next; - mesn; - mesc l("Rossy takes the flowers from your hands and suddenly throws them on the ground. She begins sneezing."); - next; - select - l("I presume you don't like roses, right?"), - l("Are you feeling well?"); - mes ""; - mesn; - mesq l("I am allergic to roses; my mother should already know that!"); - next; - mesn strcharinfo(0); - mesc l("Maybe we should talk to Olana about this."); - return; -} - -function rossyDeliverTulip { - if (countitem(ARedTulip) < 15) { - mesc l("Achooo!"); - mesn; - mesq l("I'm being lazy right now, so please %s", any( - l("don't tell devs I'm slacking off again."), - l("tell my mother there is no reason to worry."), - l("don't worry with me.") - )); - return; - } - select - l("Your mother is sorry about the roses. Here are some beautiful red tulips instead."); - mes ""; - delitem ARedTulip, 15; - setq HurnscaldQuests_Rossy, 14; - quest_xp(.maxLevel, 2500); - quest_jxp(.maxLevel, 250); - mesn; - mesq l("That's better! Go and tell my mother that she is the nicest mother in the world."); - next; - mesn; - mesq l("However... Now I should really find my sister. Come back later."); - return; -} - -function rossyJulietIntro { - if (BaseLevel < .minLevel_rescue) { - mesn; - mesq l("I think I have an idea where Juliet might be. Come back in a few levels, and I will tell you if she is ok."); - return; - } - mesn; - mesq l("%s, you have to help me! I saw Juliet, but something was wrong!!", strcharinfo(0)); - next; - select - l("Calm down and tell me what happened."); - mes ""; - mesn; - mesq l("No time for that! She was running away from something and entered a cave not far from here. I heard her scream. Please, can you enter the cave and save her? I'm so scared!"); - next; - mesc l("%s is too distressed to be of any help. It might be a better idea to go inside the cave and look for Juliet.", .name$); - mesc l("The cave is %s", b(l("Northwest of here."))); - setq HurnscaldQuests_Rossy, 16; - return; -} - -OnInit: - .distance = 4; - - // Quest conf - .blueberries_amount=30; - .minLevel_rescue = 60; - .maxLevel = 90; - end; -} diff --git a/npc/008-1/sabine.txt b/npc/008-1/sabine.txt deleted file mode 100644 index dc2b11b7..00000000 --- a/npc/008-1/sabine.txt +++ /dev/null @@ -1,63 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -008-1,291,97,0 script Sabine NPC_SABINE,{ - - if (getq(.quest_inspector) != 2) - { - npctalk3(generic(1 | 16)); - end; - } - - speech(4, - l("Isn't this place pretty?"), - l("I love hanging out here!")); - - selectd( - l("Have you seen anything strange lately?"), - l("Do you know anything about the recent robberies?")); - - speech( - l("No, sorry.")); - - close; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-1/sergeant-ryan.txt b/npc/008-1/sergeant-ryan.txt deleted file mode 100644 index 975587e4..00000000 --- a/npc/008-1/sergeant-ryan.txt +++ /dev/null @@ -1,71 +0,0 @@ -// Evol scripts. -// Author: -// Livio -// Description: -// Save Sergeant Ryan - -008-1,55,47,0 script Sergeant Ryan NPC_RAIJIN_MALE_BROTHERHOOD,{ -function advanceQuest; -function advanceQuest { - setq(General_CptHal, getq(General_CptHal) + 1); - return; -} - - if (getq(General_CptHal)<=3) { - speech - l("Aaah!!! Dammit!!!"), - l("It hurts like hell, #@%!!!!"), - l("Go away, my comrades will be here soon!"); - } - if (getq(General_CptHal)==3) { - select l("No. They won't because Hal sent me to look after you, Tom Hanks."); - speech l("Aaah!!! What?"); - select l("You are hurt! Looks like I have to save private Ryan..."); - speech l("I'm a Sergeant. I could teach you a lesson or two if it wasn't for my leg."); - select l("Does it hurts if I touch here?"); - speech l("@#@%&#@*!!!"); - select l("This leg is badly hurt! Let me look out for something to heal it."); - speech l("Grr... I'm so nuts that I want to get even first with damn wolverns."); - speech l("Bring me:"); - printIngredients(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT); - next; - advanceQuest(); - close; - } - if (getq(General_CptHal)==4) { - if (checkForItems(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT)) { - speech l("Yeah, finally!!!"); - next; - BaseExp += 15 * BaseLevel; - Zeny += 50; - advanceQuest(); - delitem(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT); - speech l("Go tell Hal that I'm fine and I will go on with the mission as soon as possible."); - } else { - speech l("What are you doing here?!? I need:"); - printIngredients(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT); - speech l("Come on, kill those bastards!!! Wolverns must pay the price of tasting my damn leg!!!"); - select l("Fine. But PETA is not going to be happy about it..."); - speech l("@#@%&#@*!!!"); - } - close; - } - if (getq(General_CptHal)>=5) { - speech l("Thanks! Now move, I have a mission to accomplish."); - } - close; - -OnInit: - // NPC ITEM REQUESTS - setarray(.REQ0_INGREDIENTS, - WolvernPelt, - BottleOfWater - ); - setarray(.REQ0_INGREDIENTS_AMOUNT, - 1, - 1 - ); - - .distance = 4; - end; -} diff --git a/npc/008-1/shop.txt b/npc/008-1/shop.txt deleted file mode 100644 index b2b4a406..00000000 --- a/npc/008-1/shop.txt +++ /dev/null @@ -1,50 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Micksha -// Reid -// toams -// Description: -// Blossom flower shop. - -008-1,201,136,0 trader #Invisible008-1 NPC_HIDDEN,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem ARedRose, -1, 50; - sellitem AWhiteRose, -1, 50; - sellitem AYellowRose, -1, 50; - sellitem ABlueRose, -1, 20; - sellitem ARedTulip, -1, 50; - sellitem AWhiteTulip, -1, 50; - sellitem AYellowTulip, -1, 50; - - .distance = 10; - end; - -OnClock0000: - restoreshopitem ARedRose, 10; - restoreshopitem AWhiteRose, 10; - restoreshopitem AYellowRose, 10; - restoreshopitem ABlueRose, 5; - restoreshopitem ARedTulip, 10; - restoreshopitem AWhiteTulip, 10; - restoreshopitem AYellowTulip, 10; -OnClock0800: - restoreshopitem ARedRose, 10; - restoreshopitem AWhiteRose, 10; - restoreshopitem AYellowRose, 10; - restoreshopitem ABlueRose, 5; - restoreshopitem ARedTulip, 10; - restoreshopitem AWhiteTulip, 10; - restoreshopitem AYellowTulip, 10; -OnClock1600: - restoreshopitem ARedRose, 10; - restoreshopitem AWhiteRose, 10; - restoreshopitem AYellowRose, 10; - restoreshopitem ABlueRose, 5; - restoreshopitem ARedTulip, 10; - restoreshopitem AWhiteTulip, 10; - restoreshopitem AYellowTulip, 10; -} diff --git a/npc/008-1/sign.txt b/npc/008-1/sign.txt deleted file mode 100644 index 950fe996..00000000 --- a/npc/008-1/sign.txt +++ /dev/null @@ -1,45 +0,0 @@ -// Evol scripts. -// Authors: -// Micksha -// Description: -// Sign pillars in Hurnscald. - -008-1,142,105,0 script Sign#008-1-central NPC_NO_SPRITE,{ - npctalkonce l("Right: Hurnscald | Down: Dimond's Cove | Left: West Woodland | Up: Nivalis (under construction)"); - close; -OnInit: - .distance = 2; - end; -} - -008-1,126,160,0 script Sign#008-1-south NPC_NO_SPRITE,{ - npctalkonce l("Down: Dimond's Cove | Left: Swamp"); - close; -OnInit: - .distance = 2; - end; -} - -008-1,246,177,0 script Sign#008-1-southeast NPC_NO_SPRITE,{ - npctalkonce l("Left: Dimond's Cove | Up: Hurnscald | Right: Forsaken Inn"); - close; -OnInit: - .distance = 2; - end; -} - -008-1,251,104,0 script Sign#008-1-hurns NPC_NO_SPRITE,{ - npctalkonce l("Left: West Woodland | Up: North Mine | Right: Harbor | Down: other directions"); - close; -OnInit: - .distance = 2; - end; -} - -008-1,247,105,0 script Sign#008-1-4144 NPC_NO_SPRITE,{ - npctalkonce l("This place is dedicated to 4144, the alltime Hero."); - close; -OnInit: - .distance = 1; - end; -} diff --git a/npc/008-1/snarfles.txt b/npc/008-1/snarfles.txt deleted file mode 100644 index d4de8ed0..00000000 --- a/npc/008-1/snarfles.txt +++ /dev/null @@ -1,97 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Snarfles the mouboo farmer. -// THIS IS A PLACEHOLDER! - -008-1,79,118,0 script Snarfles NPC_SNARFLES,{ - function foodQuest; - speech - l("My Mouboos, my beloved Mouboos!"), - l("Oh, hi, isn't it cool to live among all those Mouboos? I don't understand how some people can eat Mouboo steak."), - l("Murderers!"); - if (getq(General_SmearedHands) <= 3 && getq2(General_SmearedHands) != 2) - foodQuest(); - close; - -function foodQuest { - .@q=getq(General_SmearedHands); - next; - mesn; - mesq l("Ah... I could use some Asparagus with Hollondaise now..."); - switch (.@q) { - case 1: - next; - mesn strcharinfo(0); - select - l("\"Asparagus with Hollondaise\"? What's that?"), - menuaction(l("Leave")); - mes ""; - if (@menu == 2) - break; - mesn; - mesq l("Some call it %s, but it is so tasty...", getitemlink(VeggiePlate)); - next; - mesn; - mesq l("I could even make one for you and give the recipe, but..."); - next; - mesn; - mesq l("I always get smeared hands eating it and cannot play cards anymore with Crane."); - next; - mesn; - mesq l("Well, if you find me a solution for that problem, I can give you the recipe. What do you say?"); - next; - mesc l("WARNING: If you accept this quest, you'll be struck at the %s route!", b(l("Vegetarian"))), 1; - mesc l("This will also make %s's Quest unavailable.", b("Crane")), 1; - mesc l("This decision cannot be changed later."), 1; - next; - mesc l("Accept this request?"), 1; - if (askyesno() == ASK_YES) { - setq General_SmearedHands, 2, VEGAN; // 1 = Vegan - mesn; - mesq l("Great! I'll be eager for your return!"); - } - break; - case 2: - mesn; - mesq l("Have you found a solution for my smeared hands problem?"); - next; - select - l("No, not yet."); - mes ""; - mesn; - mesq l("I've heard they're related to the earl of sandwich, so maybe a sandwich maker could help... *sigh* I want to play cards..."); - break; - case 3: - mesn strcharinfo(0); - select - l("Have you tried putting it in a bread already?"), - l("I'll keep looking for solutions for your problem."); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("Actually... No. Have been too afraid of it tasting foul."); - next; - mesn strcharinfo(0); - mesq l("Really? Tiki, Candor's chef, liked it very much."); - next; - mesn; - mesq l("Wha - Really?! Tiki said it tasted good??! I'm saved! You're truly my savior!!"); - next; - mesn; - mesq l("I'll put the %s recipe on your %s. Thanks, you saved my day!", getitemlink(VeggiePlate), getitemlink(RecipeBook)); - RECIPES[CraftVeggiePlate]=true; - getitembound VeggiePlate, 1, IBT_ACCOUNT; - setq1 General_SmearedHands, 4; // Finished - default: - return; - } - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/soul-menhir.txt b/npc/008-1/soul-menhir.txt deleted file mode 100644 index 61112de5..00000000 --- a/npc/008-1/soul-menhir.txt +++ /dev/null @@ -1,9 +0,0 @@ -// The Mana World scripts. -// Author: -// gumi -// Jesusalva -// Description: -// place of power, mana refills faster when sitting nearby - -008-1,252,111,0 duplicate(Soul Menhir) Soul Menhir#hurn_1_7_200 NPC_NO_SPRITE - diff --git a/npc/008-1/voltain.txt b/npc/008-1/voltain.txt deleted file mode 100644 index ce41f10b..00000000 --- a/npc/008-1/voltain.txt +++ /dev/null @@ -1,18 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Voltain the dark druid. -// THIS IS A PLACEHOLDER! - -008-1,182,155,0 script Voltain NPC_DARK_DRUID,{ - speech - l("Go away, I have to think about new evil doings."), - l("GO AWAY, I SAID!"); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-1/wateranimation.txt b/npc/008-1/wateranimation.txt deleted file mode 100644 index ce72d893..00000000 --- a/npc/008-1/wateranimation.txt +++ /dev/null @@ -1,21 +0,0 @@ -// The Mana World scripts. -// Description: -// Water animations, splash, fishes, etc... - -008-1,90,223,0 duplicate(#fish_river) #hurns_fish01 NPC_WATER_SPLASH -008-1,86,177,0 duplicate(#fish_river) #hurns_fish02 NPC_WATER_SPLASH -008-1,85,186,0 duplicate(#fish_river) #hurns_fish03 NPC_WATER_SPLASH -008-1,89,208,0 duplicate(#fish_river) #hurns_fish04 NPC_WATER_SPLASH -008-1,139,91,0 duplicate(#fish_river) #hurns_fish05 NPC_WATER_SPLASH -008-1,64,36,0 duplicate(#fish_river) #hurns_fish06 NPC_WATER_SPLASH -008-1,55,30,0 duplicate(#fish_river) #hurns_fish07 NPC_WATER_SPLASH -008-1,46,35,0 duplicate(#fish_river) #hurns_fish08 NPC_WATER_SPLASH -008-1,105,55,0 duplicate(#fish_river) #hurns_fish09 NPC_WATER_SPLASH -008-1,214,155,0 duplicate(#fish_river) #hurns_fish10 NPC_WATER_SPLASH -008-1,216,153,0 duplicate(#fish_river) #hurns_fish11 NPC_WATER_SPLASH -008-1,225,26,0 duplicate(#fish_river) #hurns_fish12 NPC_WATER_SPLASH -008-1,220,49,0 duplicate(#fish_river) #hurns_fish13 NPC_WATER_SPLASH -008-1,220,57,0 duplicate(#fish_river) #hurns_fish14 NPC_WATER_SPLASH -008-1,233,56,0 duplicate(#fish_river) #hurns_fish15 NPC_WATER_SPLASH -008-1,230,51,0 duplicate(#fish_river) #hurns_fish16 NPC_WATER_SPLASH - diff --git a/npc/008-2-0/_import.txt b/npc/008-2-0/_import.txt deleted file mode 100644 index 2cd1023b..00000000 --- a/npc/008-2-0/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-2-0: Chez Celestia -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-0/_savepoints.txt", -"npc/008-2-0/_warps.txt", -"npc/008-2-0/celestia.txt", -"npc/008-2-0/mapflags.txt", diff --git a/npc/008-2-0/_savepoints.txt b/npc/008-2-0/_savepoints.txt deleted file mode 100644 index 2c108fa8..00000000 --- a/npc/008-2-0/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-0: Chez Celestia saves -008-2-0,38,27,0 script #save_008-2-0_38_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-0/_warps.txt b/npc/008-2-0/_warps.txt deleted file mode 100644 index d24b4b27..00000000 --- a/npc/008-2-0/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-0: Chez Celestia warps -008-2-0,26,22,0 warp #008-2-0_26_22 0,0,008-1,276,121 -008-2-0,22,34,0 warp #008-2-0_22_34 0,0,008-1,273,125 diff --git a/npc/008-2-0/celestia.txt b/npc/008-2-0/celestia.txt deleted file mode 100644 index 81fb372b..00000000 --- a/npc/008-2-0/celestia.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Our beloved Princess Celestia. -// THIS IS A PLACEHOLDER! - -008-2-0,30,23,0 script Celestia NPC_CELESTIA,{ - speech - l("Hi!"), - l("You may remember me, I am Celestia."); - l("Take a cup of tea until something happens here."); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-0/mapflags.txt b/npc/008-2-0/mapflags.txt deleted file mode 100644 index 93df75f4..00000000 --- a/npc/008-2-0/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-0 mapflag town diff --git a/npc/008-2-1/_import.txt b/npc/008-2-1/_import.txt deleted file mode 100644 index 06ba6d3b..00000000 --- a/npc/008-2-1/_import.txt +++ /dev/null @@ -1,9 +0,0 @@ -// Map 008-2-1: Merchant Guild -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-1/_savepoints.txt", -"npc/008-2-1/_warps.txt", -"npc/008-2-1/generalstore.txt", -"npc/008-2-1/inspector.txt", -"npc/008-2-1/mapflags.txt", -"npc/008-2-1/richard.txt", -"npc/008-2-1/selim.txt", diff --git a/npc/008-2-1/_savepoints.txt b/npc/008-2-1/_savepoints.txt deleted file mode 100644 index 19f0f307..00000000 --- a/npc/008-2-1/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-1: Merchant Guild saves -008-2-1,42,27,0 script #save_008-2-1_42_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-1/_warps.txt b/npc/008-2-1/_warps.txt deleted file mode 100644 index 978c5767..00000000 --- a/npc/008-2-1/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-1: Merchant Guild warps -008-2-1,37,27,0 warp #008-2-1_37_27 0,0,008-1,260,111 -008-2-1,33,45,0 warp #008-2-1_33_45 0,0,008-1,259,119 diff --git a/npc/008-2-1/generalstore.txt b/npc/008-2-1/generalstore.txt deleted file mode 100644 index ffbbb6d1..00000000 --- a/npc/008-2-1/generalstore.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// General Store. -// THIS IS A PLACEHOLDER! - -008-2-1,38,35,0 script General Store#008-1 NPC_GENERAL_STORE,{ - speech - l("Hi!"), - l("My name is General Store, they still call me this although I left the army a few years ago."), - l("I have nothing to sell, come back later."); - - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/008-2-1/inspector.txt b/npc/008-2-1/inspector.txt deleted file mode 100644 index 6d7915d5..00000000 --- a/npc/008-2-1/inspector.txt +++ /dev/null @@ -1,190 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -008-2-1,30,34,0 script Inspector NPC_INSPECTOR,{ - - if (BaseLevel < .min_level) - { - npctalk3(l("I'm sorry, but I'm busy looking into this string of robberies.")); - end; - } - - // OnTalk: - switch (getq(.quest)) - { - case 0: - case 1: - speech(4, - l("Hmm... what to do.")); - narrator(4, - l("He looks up and into your face.")); - speech(4, - l("You look capable, will you help me solve these robberies?"), - l("I would go myself, but for some reason I'm a non-walking NPC.")); - - if (selectd("Yes", "No") == 2) { - closeclientdialog(); - close; - } - - speech( - l("Ok then."), - l("I'd like you to ask the villagers about the recent string of robberies.")); - - close2; - setq(.quest, 2); - end; - - case 2: - npctalk3(l("Please continue talking to the villagers.")); - end; - - case 3: - speech( - l("Hm..."), - l("I don't know if I trust her eyesight or memory."), - l("See if someone else knows anything.")); - close; - - case 4: - speech( - l("Someone in a theater mask, eh?"), - l("There was a traveling theater troupe in town recently, but they've moved on to Tulimshar."), - l("Please go talk to their leader about this.")); - - close2; - setq(.quest, 5); - end; - - case 5: - npctalk3(l("Please go talk to the leader of the traveling troupe about the theater mask.")); - end; - - case 6: - speech( - l("Hm... an old man?"), - l("Could you interrogate him for me?")); - - close2; - setq(.quest, 7); - end; - - case 7: - npctalk3(l("Have you talked with the old man yet?")); - end; - - case 8: - npctalk3(l("Can you verify that with his wife?")); - end; - - case 9: - speech( - l("Hm... then it couldn't be him."), - l("I'm not sure where to go from here, maybe you can find something else."), - l("Try talking to everyone again.")); - - close2; - setq(.quest, 10); - end; - - case 10: - npctalk3(l("Made any progress yet?")); - end; - - case 11: - npctalk3(l("Then go north and investigate!")); - end; - - case 12: - npctalk3(l("Did you look over the basement?")); - end; - - case 13: - speech( - l("What a strange note."), - l("I'll keep track of this, while you return the mask to the troupe."), - l("I would go myself, but the developers were too lazy to make me walk."), - "...", - l("By the way, stay sharp! I may call upon you again.")); - - close2; - setq(.quest, 14); - end; - - case 14: - npctalk3(l("Please return the mask to the traveling troupe.")); - end; - - case 15: - speech( - l("My men have found all of the stolen items."), - l("They were all in the mining camp."), - l("We still don't know who did it.")); // XXX: feel free to extend this quest beyond this point - - close2; - setq(.quest, 16); - quest_xp(.maxLevel, .reward_exp); - end; - - case 16: - npctalk3(l("Remember to stay sharp. I might need your help on another case.")); - end; - } - - closeclientdialog(); - close; - -OnPCLoginEvent: -OnPCBaseLvUpEvent: - if (BaseLevel >= .min_level && getq(.quest) < 1) - { - setq(.quest, 1); // allow the player to do the quest - dispbottom(l("New quest available: %s (level %d+)", - getquestlink(.quest), .min_level)); // XXX: requires new manaplus versions, maybe show a different message for old versions? - } - end; - -OnInit: - .min_level = 30; // min level to do the quest - .maxLevel = 60; - - .reward_exp = 2500; - - .quest = HurnscaldQuests_Inspector; - .quest_debug = .quest; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-1/mapflags.txt b/npc/008-2-1/mapflags.txt deleted file mode 100644 index 78899489..00000000 --- a/npc/008-2-1/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-1 mapflag town diff --git a/npc/008-2-1/richard.txt b/npc/008-2-1/richard.txt deleted file mode 100644 index d55ade4f..00000000 --- a/npc/008-2-1/richard.txt +++ /dev/null @@ -1,62 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Richard the Hurns storage guy. -// THIS IS A PLACEHOLDER! - -008-2-1,26,35,0 script Richard NPC_RICHARD_LEGACY,{ - // Storage/Banking function not unlocked in Artis - if (!getq(ArtisQuests_Lloyd)) { - speech - l("Oh hey!"), - l("I was supposed to act as storagekeeper, but I forgot my key."), - l("Come back later, perhaps I can find it."); - close; - } - mesn; - mesq l("Welcome to %s's Bank!", l($@BANK_TOWN$[.bankid])); - next; - - do - { - select - l("I would like to store some items."), - l("I would like to perform money transactions."), - l("Is there any request for me?"), - menuaction(l("Quit")); - - mes ""; - - switch (@menu) { - case 1: - mesn; - mesq l("Sure thing! I'll have your items transported here from Artis before you realize!"); - next; - closeclientdialog(); - openstorage(); - close; - case 2: - MerchantGuild_Bank(); - break; - case 3: - MerchantGuild_Quests(.bankid); - break; - default: - closeclientdialog; - goodbye; - close; - } - - } while (true); - close; - -OnInit: - .distance = 4; - - // Bank configuration - array_push($@BANK_NAME$, .name$); - array_push($@BANK_TOWN$, "Hurnscald"); - .bankid = getarraysize($@BANK_NAME$)-1; - end; -} diff --git a/npc/008-2-1/selim.txt b/npc/008-2-1/selim.txt deleted file mode 100644 index 7e947890..00000000 --- a/npc/008-2-1/selim.txt +++ /dev/null @@ -1,22 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Selim the Dyer. -// THIS IS A PLACEHOLDER! - -008-2-1,38,40,0 script Selim NPC_GUMI_THE_DYER,{ - speech - l("Oh hey!"), - l("Good you are here, you could be handy for me right now."), - l("Or maybe later. Hmm, we'll see."), - l("On the meanwhile..."); - - Barber(false); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-10/_import.txt b/npc/008-2-10/_import.txt deleted file mode 100644 index 2dd9ec77..00000000 --- a/npc/008-2-10/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-10: Hurnscald City Hall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-10/_warps.txt", -"npc/008-2-10/airlia.txt", -"npc/008-2-10/mapflags.txt", diff --git a/npc/008-2-10/_warps.txt b/npc/008-2-10/_warps.txt deleted file mode 100644 index 26362dee..00000000 --- a/npc/008-2-10/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-10: Hurnscald City Hall warps -008-2-10,37,34,0 warp #008-2-10_37_34 0,0,008-1,273,117 -008-2-10,36,25,0 warp #008-2-10_36_25 2,0,008-2-11,36,27 diff --git a/npc/008-2-10/airlia.txt b/npc/008-2-10/airlia.txt deleted file mode 100644 index 64f18436..00000000 --- a/npc/008-2-10/airlia.txt +++ /dev/null @@ -1,33 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Airlia, the major's daughter. -// THIS IS A PLACEHOLDER! - -008-2-10,42,29,0 script Airlia NPC_AIRLIA,{ - speech - l("Hello."), - l("Do you know where the graveyard is?"), - l("No? Better that way. It's so dangerous there."); - - if (getq(General_Brotherhood) < 2) - close; - next; - select - l("Okay, thanks."), - l("*whisper* Sagratha is great."); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Ah, uhm, erm. The Governor is busy arguing with the rest of the team."); - next; - mesn; - mesq l("I'm afraid you'll need to wait them to reach a consensus first, before he can met with you."); - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-10/mapflags.txt b/npc/008-2-10/mapflags.txt deleted file mode 100644 index 7635bed5..00000000 --- a/npc/008-2-10/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-10 mapflag town diff --git a/npc/008-2-11/_import.txt b/npc/008-2-11/_import.txt deleted file mode 100644 index 84ad9ceb..00000000 --- a/npc/008-2-11/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-11: Hurnscald City Hall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-11/_savepoints.txt", -"npc/008-2-11/_warps.txt", -"npc/008-2-11/mapflags.txt", diff --git a/npc/008-2-11/_savepoints.txt b/npc/008-2-11/_savepoints.txt deleted file mode 100644 index db593899..00000000 --- a/npc/008-2-11/_savepoints.txt +++ /dev/null @@ -1,28 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-11: Hurnscald City Hall saves -008-2-11,26,27,0 script #save_008-2-11_26_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-11,45,27,0 script #save_008-2-11_45_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-11/_warps.txt b/npc/008-2-11/_warps.txt deleted file mode 100644 index 11b8b45f..00000000 --- a/npc/008-2-11/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-11: Hurnscald City Hall warps -008-2-11,36,31,0 warp #008-2-11_36_31 2,0,008-2-10,36,26 diff --git a/npc/008-2-11/mapflags.txt b/npc/008-2-11/mapflags.txt deleted file mode 100644 index 3e084fc0..00000000 --- a/npc/008-2-11/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-11 mapflag town diff --git a/npc/008-2-12/_import.txt b/npc/008-2-12/_import.txt deleted file mode 100644 index f5f593a2..00000000 --- a/npc/008-2-12/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-12: Hurnscald Clinic -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-12/_warps.txt", -"npc/008-2-12/mapflags.txt", -"npc/008-2-12/nurse.txt", diff --git a/npc/008-2-12/_warps.txt b/npc/008-2-12/_warps.txt deleted file mode 100644 index efe934a0..00000000 --- a/npc/008-2-12/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-12: Hurnscald Clinic warps -008-2-12,30,32,0 warp #008-2-12_30_32 0,0,008-1,281,104 -008-2-12,36,27,0 warp #008-2-12_36_27 1,0,008-2-13,35,30 diff --git a/npc/008-2-12/mapflags.txt b/npc/008-2-12/mapflags.txt deleted file mode 100644 index b52526a7..00000000 --- a/npc/008-2-12/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-12 mapflag town diff --git a/npc/008-2-12/nurse.txt b/npc/008-2-12/nurse.txt deleted file mode 100644 index 415746cf..00000000 --- a/npc/008-2-12/nurse.txt +++ /dev/null @@ -1,175 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// The Moubootaur Legends Development Team -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// Hurnscald Nurse. Robberies in Hurnscald. - -008-2-12,28,30,0 script Nurse NPC_NURSE_LEGACY,{ - function bloodDonor; - .@q2=getq2(HurnscaldQuests_BloodDonor); - - speech(4, - l("How can I help you?")); - - // XXX: this npc used to teach the resist poison skill, do we still want that? - - selectd( - l("Oooh, these wounds! They hurt so much!"), - l("I don't feel so well, I might be sick."), - rif(.@q2 < gettimetick(2), l("I would like to donate blood.")), - l("No, I'm fine."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything out of the ordinary?"))); - - switch (@menu) - { - case 1: - if (BaseLevel > .heal_max_level) - { - speech( - l("I'm sorry but I'm here only to help young adventurers and the town residents."), - l("Your level is already higher than %d.", .heal_max_level), - l("You can get some rest at the inn near here.")); - close; - } - speech(4, - l("Here, let me heal you.")); - - // Jesusalva: I don't trust npcskill() - npcskill(AL_HEAL, .heal_skill_level, .heal_npc_stats, .heal_npc_level); - - speech( - l("There you go, like new.")); - break; - case 2: - speech( - l("Then you should better see the doctor."), - l("He is usually in his office on the 3rd floor.")); - break; - case 3: - bloodDonor(); - break; - case 4: - speech( - l("Then I would ask you to leave."), - l("There are people who really need our help.")); - break; - case 5: - speech( - l("I'm too busy here to observe the town.")); - break; - } - close; - -function bloodDonor { - .@q2=getq2(HurnscaldQuests_BloodDonor); - .@q3=getq3(HurnscaldQuests_BloodDonor); - // Cheating??! - if (.@q2 > gettimetick(2)) - kick(getcharid(3)); - // Anyway, ML code comes here, adapted for TMW - mesc l("Donating blood will BLOCK YOUR MOVEMENT for three minutes."); - mesc l("Do not disconnect while waiting. You need 100% HP to donate."); - next; - // Always show Info if it is your first time donating blood - @menu = 1; - if (.@q3) { - select - l("Info"), - rif(readparam(Hp) == readparam(MaxHp), l("Yes, please use my blood to save lifes.")), - l("I changed my mind"); - mes ""; - } - if (@menu == 3) - return; - if (@menu == 1) { - mesn; - mesq l("Donating blood is a noble act, which allows to save lifes."); - next; - mesn; - mesq l("When people loses too much blood, they die, unless we can lend them somebody's else blood."); - next; - mesn; - mesq l("Not everyone can be a blood donor. For example, you must be healthy."); - mesq l("You can find more info about this on these links:"); - mes ""; - mes "[@@https://www.blood.co.uk/|https://www.blood.co.uk/@@]"; - mes "[@@https://www.nhsbt.nhs.uk/what-we-do/blood-services/blood-donation/|https://www.nhsbt.nhs.uk/what-we-do/blood-services/blood-donation/@@]"; - mes l("France: [@@https://dondesang.efs.sante.fr/|https://dondesang.efs.sante.fr/@@]"); - mes l("Brazil: [@@http://www.prosangue.sp.gov.br/home/Default.html|http://www.prosangue.sp.gov.br/home/Default.html@@]"); - if (readparam(Hp) < readparam(MaxHp)) - return; - next; - mesc l("Donate blood?", 1); - if (askyesno() == ASK_NO) - return; - } - // Donate blood - mesn; - mesq l("This will take only a short while."); - next; - setq1 HurnscaldQuests_BloodDonor, 2; - percentheal -90, 0; - addtimer(180000, "Nurse::OnDonationComplete"); - warp "008-2-14", 31, 27; - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true); - dispbottom l("Any movement/skill/item will be without effect until time is up."); - closedialog; - return; -} - -OnDonationComplete: - if (checkpcblock() & PCBLOCK_ATTACK) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false); - warp "008-2-12", 30, 30; - percentheal 100, 0; - // Experience gain is based on HP - getexp readparam(Hp)*2, readparam(Hp)/100; - .@q3=getq3(HurnscaldQuests_BloodDonor)+1; - // Cooldown: 60*60*24*30: 30 days - setq HurnscaldQuests_BloodDonor, 1, gettimetick(2)+(2592000), .@q3; - if (BaseLevel >= 30) - getitem Bread, 1; - if (BaseLevel >= 50) - getitem ChocolateBar, 1; - if (BaseLevel >= 70) - getitem BottleOfWater, 1; - mesn; - mesq l("Thanks for donating blood. You can donate again in 30 days."); - mesq l("You should eat and drink water after donating blood. Thanks for saving lifes!"); - close; - - -OnInit: - .heal_max_level = 20; // she will only heal low level players - - .heal_skill_level = 10; // what level of the healing skill to use - .heal_npc_stats = 99; // what stat points the NPC has - .heal_npc_level = 60; // what level the npc has - - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 3; - end; -} diff --git a/npc/008-2-13/_import.txt b/npc/008-2-13/_import.txt deleted file mode 100644 index ec6a73b7..00000000 --- a/npc/008-2-13/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-2-13: Hurnscald Clinic -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-13/_savepoints.txt", -"npc/008-2-13/_warps.txt", -"npc/008-2-13/lena.txt", -"npc/008-2-13/mapflags.txt", diff --git a/npc/008-2-13/_savepoints.txt b/npc/008-2-13/_savepoints.txt deleted file mode 100644 index b82ce152..00000000 --- a/npc/008-2-13/_savepoints.txt +++ /dev/null @@ -1,54 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-13: Hurnscald Clinic saves -008-2-13,29,27,0 script #save_008-2-13_29_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-13,32,27,0 script #save_008-2-13_32_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-13,29,31,0 script #save_008-2-13_29_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-13,32,31,0 script #save_008-2-13_32_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-13/_warps.txt b/npc/008-2-13/_warps.txt deleted file mode 100644 index cba843a7..00000000 --- a/npc/008-2-13/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-13: Hurnscald Clinic warps -008-2-13,36,32,0 warp #008-2-13_36_32 1,0,008-2-12,35,29 -008-2-13,25,26,0 warp #008-2-13_25_26 1,0,008-2-14,24,30 diff --git a/npc/008-2-13/lena.txt b/npc/008-2-13/lena.txt deleted file mode 100644 index 1de7a98b..00000000 --- a/npc/008-2-13/lena.txt +++ /dev/null @@ -1,270 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Lena the Bowwoman. - -008-2-13,27,27,0 script Lena NPC_LENA,{ - .@q=getq(HurnscaldQuest_Bandits); - // Declare all functions - // Stage 1 - function lenaTooWeak; - function lenaStart; - function lenaReturn; - // Stage 2 - function lenaQuest; - function lenaCoinBag; - // Stage 3 - function lenaBusy; - function lenaBusy2; - function lenaBanditLord; - function lenaFinish; - // Post stage - function lenaDaily; - - switch (.@q) { - // Stage 1 - case 0: - if (BaseLevel < .minLevel_1) - lenaTooWeak(); - lenaStart(); - break; - case 1: - lenaReturn(); - break; - // Stage 2 - case 2: - if (BaseLevel < .minLevel_2) - lenaTooWeak(); - lenaQuest(); - break; - case 3: - lenaCoinBag(); - break; - // Stage 3 - case 4: - if (BaseLevel < .minLevel_1) - lenaBusy(); - lenaBanditLord(); - break; - case 5: - case 6: - lenaBusy2(); - break; - case 7: - lenaFinish(); - break; - } - close; - -function lenaDaily { - // DailyQuest(lvl, cost, count, item) - DailyQuest(40, 4, 10, CoinBag); - return; -} - -// ------------------------------------ -function lenaTooWeak { - speech - l("Hey."), - l("Did you hear about the Bandit's attacks? They must have a hideout somewhere outside Hurnscald."), - l("However, you are too weak to help me, so come back later."); - close; -} - -function lenaBusy { - speech - l("Hey."), - l("Ah, I wish my dear friend Nickos could be here. He's one of the guards in Tulimshar and he'd know how to deal with those outlaws!"), - l("I will inform you when I have more information about the bandits."); - close; -} - -function lenaBusy2 { - mesn; - mesq l("%s, we are counting on you! We, the whole Hurnscald town!", strcharinfo(0)); - close; -} - -// ------------------------------------ Stage 1 -function lenaStart { - mesn; - mesq l("Ah, hello."); - next; - mesn; - mesq l("We actually have a problem. Bandits ransacked Hurnscald, and took a huge loot."); - next; - mesn; - mesq l("We pursued them until the mines, slayed them, and took the chests where they locked our stuff into."); - next; - mesn; - mesq l("The problem is... The slimes ate the keys for the chests. This is not the first time such thing happens."); - next; - mesn; - mesq l("If you bring us %d %s, we'll be forever grateful.", .numKeys, getitemlink(TreasureKey)); - select - l("Don't worry ma'm, I'll recover the Treasure Keys at once."), - l("Ah... Slimes... Sorry, not my cup of tea..."); - mes ""; - if (@menu == 2) - close; - setq HurnscaldQuest_Bandits, 1; - mesn; - mesq l("Wonderful! I'll be expecting you back."); - return; -} - -function lenaReturn { - mesn; - mesq l("Adventurer, did you brought me what I asked? I see you have %d/%d %s.", countitem(TreasureKey), .numKeys, getitemlink(TreasureKey)); - mes ""; - select - rif(countitem(TreasureKey) >= .numKeys, l("Yes, take it.")), - rif(countitem(TreasureKey) < .numKeys, l("No, I'll be back with them.")), - l("Hm, can we talk again later?"); - mes ""; - if (@menu != 1) - close; - delitem TreasureKey, .numKeys; - quest_gp(.maxLevel_1, 1000); - quest_xp(.maxLevel_1, 1599); // 20% from needed exp - setq HurnscaldQuest_Bandits, 2; - mesn; - mesq l("Hey hey... Good job! We can now use again the stuff we recovered from the bandits."); - next; - mesn; - mesq l("Here is some GP for your efforts. Thanks for making Hurnscald a better place to live."); - next; - mesn; - mesq l("This happens quite often, too. My friends and I are always collecting keys to reduce beer price on Hurnscald. %%2"); - return; -} - -// ------------------------------------ Stage 2 -function lenaQuest { - mesn; - mesq l("Ah, %s, good thing you are here.", strcharinfo(0)); - next; - mesn; - mesq l("Bandits are a huge threat to Hurnscald. We're just a small farming town, and they're countless."); - next; - mesn; - mesq l("Unlike the thieves guild, they are ruthless, and break everything. We lose more repairing damage than actually stolen."); - next; - mesn; - mesq l("Last time I went to fight the Bandit Lord, I was severely wounded."); - next; - mesn; - mesq l("I will reward whoever kills the current bandit leader, of course."); - select - l("I would gladly aid you to get rid of that scourge."), - l("Sorry, I forgot my courage on my other set of pants."); - mes ""; - if (@menu == 2) - close; - setq HurnscaldQuest_Bandits, 3; - mesn; - mesq l("Wonderful! So, how about a warm up?"); - next; - mesn; - mesq l("Bring me %d %s. This should help us amending the damage they caused and is a good warm-up exercise.", .numCoins, getitemlink(CoinBag)); - return; -} - -function lenaCoinBag { - mesn; - mesq l("Adventurer, did you brought me what I asked? I see you have %d/%d %s.", countitem(CoinBag), .numCoins, getitemlink(CoinBag)); - mes ""; - select - rif(countitem(CoinBag) >= .numCoins, l("Yes, take it.")), - rif(countitem(CoinBag) < .numCoins, l("No, I'll be back with them.")), - l("Hm, can we talk again later?"); - mes ""; - if (@menu != 1) - close; - inventoryplace FairyHat, 1; - delitem CoinBag, .numCoins; - .@gp=getiteminfo(CoinBag, ITEMINFO_SELLPRICE) * .numCoins * 15 / 10; - quest_gp(.maxLevel_2, .@gp); // +50% of base sell price - quest_xp(.maxLevel_2, 6842); // 20% from needed exp - getitem FairyHat, 1; - setq HurnscaldQuest_Bandits, 4; - mesn; - mesq l("Hey hey... Good job! This help us more than you think. Here is a hat like mine."); - next; - mesn; - mesq l("Unfortunately, I feel this bandit threat may have grown. Come back later, I'll talk with the Brotherhood for a while and probably will need your help again."); - return; -} -// ------------------------------------ Stage 3 -function lenaBanditLord { - mesn; - mesq l("So... I won't say you can't do it, %s. I will just say killing the Bandit Lord is no easy task.", strcharinfo(0)); - next; - mesn; - mesq l("The %s is not only a fearsome and ruthless leader. He is strong, and he have tricks on his sleeve.", getmonsterlink(BanditLord)); - next; - mesn; - mesq l("He will summon allies if he think you have the upper hand. So take care if you are going ranged."); - next; - mesn; - mesq l("I know another Bandit Lord will take up his place, but the loss of their leader will make bandits scatter long enough."); - next; - mesn; - mesq l("Will you help me- no, I mean, will you help us, the whole town of Hurnscald?"); - next; - select - l("Sorry, I need to better prepare myself."), - l("I would gladly give my life for such noble goal."); - mes ""; - if (@menu == 1) - close; - setq HurnscaldQuest_Bandits, 5; - mesn; - mesq l("...You have courage. Many people tried and failed."); - next; - mesn; - mesq l("I know where the Bandit Lord room is, and I have a guard stationed not far from there. Ask him for the key."); - next; - mesn; - mesq l("One last thing... Good luck. This bandit threat needs to be pushed back."); - return; -} - -function lenaFinish { - mesn; - mesq l("Ah... You did it!"); - next; - mesn; - mesq l("That's easy to know, because the bandits are less coordinated. Perhaps we will be able to sleep in peace this night!"); - next; - inventoryplace ForestArmor, 1; - getitem ForestArmor, 1; - quest_xp(.maxLevel_3, 5842); // 10% from needed exp - quest_jxp(.maxLevel_3, 93); // + JExp level 6 - setq HurnscaldQuest_Bandits, 8; - mesn; - mesq l("Here is the %s, like my armor, and one of the best for rangers.", getitemlink(ForestArmor)); - next; - mesn; - mesq l("Any friend of Hurnscald is my friend too. Come to me again, if you want to do daily quests!"); - return; -} - -OnInit: - .distance = 4; - - // Quest configuration - .minLevel_1=15; - .maxLevel_1=35; - .numKeys = 15; - - .minLevel_2=30; - .maxLevel_2=50; - .numCoins = 20; - - .minLevel_3=35; - .maxLevel_3=55; - end; -} diff --git a/npc/008-2-13/mapflags.txt b/npc/008-2-13/mapflags.txt deleted file mode 100644 index be0ed6a2..00000000 --- a/npc/008-2-13/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-13 mapflag town diff --git a/npc/008-2-14/_import.txt b/npc/008-2-14/_import.txt deleted file mode 100644 index 818ced88..00000000 --- a/npc/008-2-14/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-2-14: Hurnscald Clinic -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-14/_savepoints.txt", -"npc/008-2-14/_warps.txt", -"npc/008-2-14/doctor.txt", -"npc/008-2-14/mapflags.txt", diff --git a/npc/008-2-14/_savepoints.txt b/npc/008-2-14/_savepoints.txt deleted file mode 100644 index 9eb50488..00000000 --- a/npc/008-2-14/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-14: Hurnscald Clinic saves -008-2-14,31,27,0 script #save_008-2-14_31_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-14/_warps.txt b/npc/008-2-14/_warps.txt deleted file mode 100644 index eba5adca..00000000 --- a/npc/008-2-14/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-14: Hurnscald Clinic warps -008-2-14,25,31,0 warp #008-2-14_25_31 1,0,008-2-13,24,29 diff --git a/npc/008-2-14/doctor.txt b/npc/008-2-14/doctor.txt deleted file mode 100644 index aac419e6..00000000 --- a/npc/008-2-14/doctor.txt +++ /dev/null @@ -1,114 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// The Mana World Project -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// The crazy Hurnscald Doctor. - -008-2-14,27,27,0 script Doctor NPC_DOCTOR_LEGACY,{ - function doctorAxeHat; - function doctorEyePatch; - - if (getequipid(EQI_HEAD_TOP) == AxeHat) - doctorAxeHat(); - if (getequipid(EQI_ACC_R) == Eyepatch) - doctorEyePatch(); - - speech(4, - l("Hello, can I help you?")); - - selectd( - l("I think I am sick!"), - l("No, I feel fine."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange in town? Anything that might have to do with the robberies?"))); - - switch (@menu) - { - case 1: - narrator(4, - l("The doctor examines you briefly.")); - // TODO: check for poison or other status conditions currently in use - speech( - l("Nonsense!"), - l("You look fine and dandy to me."), - l("All you need is a bit more exercise and fresh fruit in your diet!")); - close; - case 2: - speech( - l("Then please stop wasting my precious time.")); - close; - case 3: - speech( - l("No, I haven't seen anything.")); - close; - } - end; - -function doctorAxeHat { - mesn; - mesq l("Oh my, what happened to you?"); - next; - mesn; - mesq l("Wait. Thats just a fake. Shame on you!"); - next; - mesn; - mesq l("Anyway..."); - next; - return; -} - -function doctorEyePatch { - mesn; - mesq l("Would you like a glass eye to replace that eye patch you have? We just got a whole load of them in today. I'll even let you keep the patch as a souvenir."); - next; - select - l("No, thank you."), - l("Yes, please."); - mes ""; - if (@menu == 1) { - mesn; - mesq l("If you change your mind, just say the word. Anyway..."); - next; - return; - } - mesn; - mesq l("Now, where did I put that box of eyes..."); - next; - mesn; - mesc l("He goes off to look for them and comes back empty handed."); - mesq l("I can't seem to find where I put that box. You should come back later, I may have found them by then."); - next; - mesn; - mesq l("Anyway..."); - next; - return; -} - - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 3; - end; -} diff --git a/npc/008-2-14/mapflags.txt b/npc/008-2-14/mapflags.txt deleted file mode 100644 index 4f5bd95c..00000000 --- a/npc/008-2-14/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-14 mapflag town diff --git a/npc/008-2-15/_import.txt b/npc/008-2-15/_import.txt deleted file mode 100644 index c504df36..00000000 --- a/npc/008-2-15/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-15: Hurnscald Farm -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-15/_warps.txt", diff --git a/npc/008-2-15/_warps.txt b/npc/008-2-15/_warps.txt deleted file mode 100644 index 3f3fb766..00000000 --- a/npc/008-2-15/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-15: Hurnscald Farm warps -008-2-15,35,34,0 warp #008-2-15_35_34 0,0,008-1,151,81 diff --git a/npc/008-2-16/_import.txt b/npc/008-2-16/_import.txt deleted file mode 100644 index 5f5ea192..00000000 --- a/npc/008-2-16/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-16: Hurnscald Cottage -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-16/_warps.txt", -"npc/008-2-16/stove.txt", -"npc/008-2-16/yannika.txt", diff --git a/npc/008-2-16/_warps.txt b/npc/008-2-16/_warps.txt deleted file mode 100644 index bb2293f4..00000000 --- a/npc/008-2-16/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-16: Hurnscald Cottage warps -008-2-16,25,34,0 warp #008-2-16_25_34 0,0,008-1,275,75 diff --git a/npc/008-2-16/stove.txt b/npc/008-2-16/stove.txt deleted file mode 100644 index d4389f7a..00000000 --- a/npc/008-2-16/stove.txt +++ /dev/null @@ -1,87 +0,0 @@ -// Evol scripts. -// Author: -// Jesusalva -// Description: -// Stove to make sandwiches - -008-2-16,32,29,0 script Stove NPC_NO_SPRITE,{ - // If player haven't finished Hinnak quest yet, they can't use the stove - .@q=getq(HurnscaldQuests_Hinnak); - if (.@q < 3) - { - setcamnpc "Yannika"; - mesn l("Yannika"); - mesq l("Please don't touch my stove without my authorization."); - close; - } - - // Cooking loop - do - { - mesc l("It is time to make some sandwiches myself!"); - mes "##B" + l("Drag and drop the items from your inventory in the frames.") + "##b"; - - // Crafting skin with 4 columns - setskin "craft4"; - .@var$ = requestcraft(4); // Limit: 4 items - .@craft = initcraft(.@var$); - .@entry = findcraftentry(.@craft, CRAFT_COOKING); - setskin ""; - - // Does the recipe exist and is a sandwich? - if (.@entry < 0) - { - narrator - l("You don't know how any recipe with that."), - l("Do you want to try again?"); - if (askyesno() == ASK_YES) - .@tryAgain=true; - else - .@tryAgain=false; - } - else - { - // Did player cheat? If not, proceed with the craft - if (!validatecraft(.@craft)) - { - narrator - l("Where are the ingredients?"); - .@tryAgain=true; - } - else - { - // Even if the recipe is right, if you don't have it on your - // recipe book, it should be deemed invalid. - if (RECIPES[.@entry]) - { - usecraft .@craft; - narrator - l("Done!"), - l("Do you want to try again?"); - } - else - { - narrator - l("You don't know how any recipe with that."), - l("Do you want to try again?"); - } - - if (askyesno() == ASK_YES) - .@tryAgain=true; - else - .@tryAgain=false; - } - } - - // Clear unused variables and clear the screen. - deletecraft .@craft; - clear; - } while (.@tryAgain); - - closeclientdialog; - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/008-2-16/yannika.txt b/npc/008-2-16/yannika.txt deleted file mode 100644 index 05c8a41e..00000000 --- a/npc/008-2-16/yannika.txt +++ /dev/null @@ -1,469 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Yannika, Hinnaks Wife. -// Makes delicious sandwiches for the player -// Variables: -// General_Cooking -// 0: Doesn't knows the quest -// 1: Received the quest for the Cookbook -// 2: Completed the quest for the Cookbook -// RECIPES -// Controls which recipes you know and doesn't. -// It is an array with Craft Constants. - -008-2-16,28,29,0 script Yannika NPC_YANNIKA,{ - function yannika_intro; - function yannika_knives; - function yannika_recipe; - function sudo_make_sandwich; - function teach_cooking; - - // If player haven't finished Hinnak quest yet, Yannika says so - .@q=getq(HurnscaldQuests_Hinnak); - if (.@q < 3) - { - speech - l("Hello."), - l("Isn't my husband Hinnak so hardworking?"), - l("Come back later."); - close; - } - - // Player completed Hinnak quest, we can continue in making Sandwiches - switch (getq(.quest)) - { - case 0: - yannika_intro(); - break; - case 1: - yannika_knives(); - break; - default: - speech - l("Hello."), - l("Thanks for helping my husband Hinnak."), - l("He likes to eat sandwiches. A good thing they are so easy to make!"); - - select - l("Easy to make? Could you make one for me?"), - l("Easy to make? Could you teach me how to make them?"), - l("Good to know, thanks."); - mes ""; - - if (@menu == 1) - sudo_make_sandwich(); - else if (@menu == 2) - teach_cooking(); - - next; - break; - } - closeclientdialog; - goodbye; - close; - - - - //////////////////////////////////////////////////// - // Quest state 0 - function yannika_intro - { - speech - l("Hello."), - l("Thanks for helping my husband Hinnak."), - l("Could you please bring me 2 new knives?"), - l("Hinnak wasted all my good kitchen knives trying to get rid of his accursed Pinkies."); - - select - l("Yes, sure thing."), - l("Not my problem."); - - if (@menu == 1) - { - speech - l("I'll be waiting for you, then!"); - setq .quest, 1; - next; - } - } - - // Quest state 1 - function yannika_knives - { - speech - l("Hello."), - l("Thanks for helping my husband Hinnak."), - l("Did you brought me 2 new knives?"); - - select - rif(countitem(Knife) >= 2, l("Yes, here they are.")), - l("Not yet, I'll be back."); - - if (@menu == 1) - { - // No need to countitem() because it is already at the menu - // Technically, a hacked client could bypass earlier check though - // Jesusalva doesn't likes hacks, so he puts delitem first. - // delitem halts the script if it cannot delete all items. - inventoryplace RecipeBook, 1; - delitem Knife, 2; - getitembound RecipeBook, 1, IBT_ACCOUNT; - setq .quest, 2; - - speech - l("Many thanks. I can now do sandwiches again!"), - l("Well, of course. First of all, you need a @@. You can have mine, if you want.", getitemlink(RecipeBook)), - l("The recipes, of course, you must collect yourself. Even sandwiches are not so simple as to simply put ingredients and hope for the best."), - l("Cooking is an art. You need to know how to cook something. You can use my stove to prepare."), - l("Or, you can just forget all that, and let me prepare sandwiches for you, too! %%H"), // %%H - Smile Emote - l("Oh, but I'll still need the book. Even if all pages are white."); - next; - } - } - - // Learn a new Sandwich Recipe - // yannika_recipe ( Craft ID, Sandwich ID, Ammo 1, Item 1, Ammo 2, Item 2, Ammo 3, Item 3, {alt1, alt2} ) - function yannika_recipe - { - .@craft=getarg(0); - .@sanid=getarg(1); - .@ammo1=getarg(2); - .@item1=getarg(3); - .@ammo2=getarg(4); - .@item2=getarg(5); - .@ammo3=getarg(6); - .@item3=getarg(7); - .@alt1=getarg(8); - .@alt2=getarg(9); - mesn; - mes l("For this recipe, you'll need to bring me:"); - mesf("%d/%d %s", countitem(.@item1), .@ammo1, getitemlink(.@item1)); - mesf("%d/%d %s", countitem(.@item2), .@ammo2, getitemlink(.@item2)); - mesf("%d/%d %s", countitem(.@item3), .@ammo3, getitemlink(.@item3)); - mesf("%s or %s", getitemlink(.@alt1), getitemlink(.@alt2)); - - select - rif(countitem(.@alt1), l("(%s) Yes, in fact, you can take them now.", getitemname(.@alt1))), - rif(countitem(.@alt2), l("(%s) Yes, in fact, you can take them now.", getitemname(.@alt2))), - l("Maybe later."); - - if (@menu < 3) - { - if (countitem(.@item1) < .@ammo1 || - countitem(.@item2) < .@ammo2 || - countitem(.@item3) < .@ammo3) - { - speech - l("You don't have everything I have asked for."); - close; - } - delitem .@item1, .@ammo1; - delitem .@item2, .@ammo2; - delitem .@item3, .@ammo3; - if (@menu == 1) - delitem .@alt1, 1; - if (@menu == 2) - delitem .@alt2, 1; - - // Learn recipe - RECIPES[.@craft]=true; - mesn; - mesq l("Look and learn."); - next; - mesn; - mesq l("This is how you do it! HAAH!"); - next; - mesc l("You learned how to cook @@.", getitemlink(.@sanid)); - next; - mesn; - mesq l("Please come back later and I may have something else to show you."); - } - return; - } - - // Yannika can make sandwiches for players - // FIXME: Actually, Yannika will cook anything for players >__> - function sudo_make_sandwich - { - speech - l("When cooking, the order of ingredients matter."), - l("Even a simple sandwich will be ruined if you place lettuce above the cheese!"), - l("Anyway, to make a sandwich, you'll need to place, in this order:"), - l("1x @@, 3x @@, 2x @@, and the ingredient of your choice.", getitemlink(Bread), getitemlink(LettuceLeaf), getitemlink(Cheese)); - - do - { - mes "##B" + l("Drag and drop the items from your inventory in the frames.") + "##b"; - - // Crafting skin with 4 columns - setskin "craft4"; - .@var$ = requestcraft(4); // Limit: 4 items - .@craft = initcraft(.@var$); - .@entry = findcraftentry(.@craft, CRAFT_COOKING); - setskin ""; - - // Does the recipe exist and is a sandwich? - if (.@entry < 0) - { - speech - l("Sorry. I can't make a sandwich with that."), - l("Do you want to try again?"); - if (askyesno() == ASK_YES) - .@tryAgain=true; - else - .@tryAgain=false; - } - else - { - // Did player cheat? If not, proceed with the craft - if (!validatecraft(.@craft)) - { - speech - l("Sorry, my eyesight is a bit poor nowadays. Where are the ingredients?"); - .@tryAgain=true; - } - else - { - usecraft .@craft; - speech - l("@@ skillfully cuts the bread in half, throws the ingredients in air, and they land in the sandwich!", .name$), - l("There you go. Please enjoy yourself! ^.^"); - - .@tryAgain=false; - } - } - - // Clear unused variables and clear the screen. Then print recipe again. - deletecraft .@craft; - if (.@tryAgain) { - clear; - mesc l("1x @@, 3x @@, 2x @@, and the ingredient of your choice.", getitemlink(Bread), getitemlink(LettuceLeaf), getitemlink(Cheese)); - } - } while (.@tryAgain); - return; - } - - // Teach player how to cook, providing a recipe book if they don't have one - function teach_cooking - { - // Check if your stats aren't enough (bonuses aren't counted) - if (readparam(bInt) < 10 || - readparam(bDex) < 20) - { - speech - l("Well, cooking is an art, and thus, you need intelligence and dexterity to learn."), - l("Please come again with at least 10 INT and 20 DEX. Stat Bonuses aren't counted."); - close; - } - - // First part: Carp Sandwich - if (!RECIPES[CraftCarpSandwich]) { - mesn; - mesq l("Well, of course, I can show you how to cook sandwiches. But you'll need to bring ingredients for practice."); - next; - mesn; - mesq l("Should we start with something simple? Hmmm... Do you have a %s? It is hard to find one around these parts, but you don't seem to be from here.", getitemlink(FishingRod)); - next; - // pre-req - if (!countitem(FishingRod)) { - mesn; - mesq l("Please try getting one. You'll need some carps for the recipe I'm going to teach you."); - if (countitem(CommonCarp) || countitem(GrassCarp)) - mesq l("Cooking begins with collecting your own ingredients. That is what makes it so tasty. So, bring me a fishing rod!"); - return; - } - // warn about main req - if (!countitem(CommonCarp) && !countitem(GrassCarp)) { - mesn; - mesq l("Ah, good, you've brought one!"); - next; - mesn; - mesq l("Now you'll need to fish a carp. It can be a %s or a single %s, for the sandwhich.", getitemlink(CommonCarp), getitemlink(GrassCarp)); - next; - } - mesn; - mesq l("I'll also be needing the usual sandwich stuff: Bread, Lettuce and Cheese."); - next; - yannika_recipe(CraftCarpSandwich, CarpSandwich, 1, Bread, 3, LettuceLeaf, 2, Cheese, CommonCarp, GrassCarp); - return; - } - - // Main quest (TODO) - .@q=getq(.quest); - .@q2=getq2(.quest); - .@s=getq(General_SmearedHands); - - // Snarfles/Crane dependency - if (!.@s) { - mesn; - mesq l("No, not at the moment."); - next; - return; - } - - // Backup SmearedHands to cooking for ease of access - setq2 General_Cooking, getq2(General_SmearedHands); - - // Switch General_Cooking quest - switch (.@q) { - case 2: - setq1 General_Cooking, 3; - // FALLTHROUGH - case 3: - case 4: - case 5: - case 9: - case 10: - case 12: - case 13: - case 14: - case 17: - mesn; - mesq l("Could you do a favor for me, first?"); - next; - mesn; - mesq l("Could you bring a couple fresh fish to %s? Carps should do.", b(l("the Chef in Dimond's Cove"))); - next; - mesn; - mesq l("He promised to make me some %s if I could provide him the fish.", getitemlink(SeafoodPlate)); - next; - mesn; - mesq l("Sandwiches are handy, but they won't beat a full meal, which we hadn't in a while."); - next; - mesn; - mesq l("I'll be waiting your return!"); - next; - break; - case 6: - select - l("What did you want, again?"), - l("I need some %s.", getitemname(.@q2 == VEGAN ? MananaSandwich : PioulegSandwich)); - mes ""; - if (@menu == 1) { - mesn; - mesq l("A %s pretty please.", getitemlink(SeafoodPlate)); - break; - } - mesn; - mesq l("Ehh, I usually only make %s... You know cooking is not just throwing ingredients and vói-la, right?", getitemlink(CarpSandwich)); - next; - mesn; - mesq l("But actually... Perhaps the chef in Candor?"); - next; - mesn; - mesq l("I forgot their name, but they are not very normal. Err."); - next; - mesn; - mesq l("You probably can find them by the shorelines."); - setq1 General_Cooking, 7; - break; - case 7: - mesn; - mesq l("Candor's Chef is not very normal, so be careful when asking him about the sandwiches you want to make."); - break; - case 8: - mesn; - mesq l("How things went with Candor's Chef?"); - next; - select - l("Great!"), - l("Not so great!"); - mes ""; - if (@menu == 1) { - mesn; - mesq l("That's good to hear!"); - } else { - mesn; - mesq l("Oh no... Did he asked you to help you with something crazy? I feared he would do that..."); - next; - mesn; - mesq l("But that's how I learned the carp sandwich recipe, you know?"); - next; - mesn; - mesq l("Was trying to eat fried carp, but it always smeared my hands. Never thought he would come up with a sandwich recipe when I gave him that!"); - next; - mesn; - mesq l("But he is still crazy, in my opinion..."); - } - break; - case 11: - select - l("What did you want, again?"), - l("Do you know where Tulimshar bakery is?"); - mes ""; - if (@menu == 1) { - mesn; - mesq l("A %s pretty please.", getitemlink(SeafoodPlate)); - break; - } - mesn; - mesq l("What, don't tell me you never have been at Tulimshar! Nearly everyone of your age already has been there at least once."); - next; - mesn; - mesq l("Tulimshar used to have a great Inn, but after the war, their business started to decline."); - next; - mesn; - mesq l("However, they had a bakery which has since flourished!"); - next; - mesn; - mesq l("So if you fail finding the bakery, look for the Inn - it is on the same building."); - break; - case 15: - case 16: - select - l("What did you want, again?"), - l("Where can I find salad?"); - mes ""; - if (@menu == 1) { - mesn; - mesq l("A %s pretty please.", getitemlink(SeafoodPlate)); - break; - } - mesn; - mesq l("This is a strange question. But I might be able to answer."); - next; - mesn; - mesq l("Hubby exports a lot of crops to Tulimshar. The purchaser is the Magic Academy of Tulimshar."); - next; - mesn; - mesq l("I'm not sure if this is of any help to you, though? I forgot who is the responsible for the Academy, so good luck!"); - break; - case 18: - mesn; - mesq l("So? Did you got me a %s? I'm hungry...", getitemlink(SeafoodPlate)); - next; - if (countitem(SeafoodPlate) < 1) - break; - if (askyesno() == ASK_NO) - break; - delitem SeafoodPlate, 1; - getitem EmptyPlate, 1; - quest_xp(.maxLevel, 10000); - quest_jxp(.maxLevel, 1000); - setq1 General_Cooking, 19; - mesn; - mesq l("Ah - Many thanks. Here, I'll return you a plate."); - next; - mesc l("Food Questline Complete!"); - mesc l("Stay tuned for more updates!"); - mes ""; - mesc l("- The Mana World Development Team"); - break; - default: - mesn; - mesq l("No, not at the moment."); - } - - return; - } - -OnInit: - .maxLevel = 40; - .distance = 4; - .quest=General_Cooking; - - end; -} diff --git a/npc/008-2-17/_import.txt b/npc/008-2-17/_import.txt deleted file mode 100644 index 854dad03..00000000 --- a/npc/008-2-17/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-17: Mining Camp -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-17/_warps.txt", -"npc/008-2-17/angus.txt", -"npc/008-2-17/caul.txt", diff --git a/npc/008-2-17/_warps.txt b/npc/008-2-17/_warps.txt deleted file mode 100644 index 1010521a..00000000 --- a/npc/008-2-17/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-17: Mining Camp warps -008-2-17,52,40,0 warp #008-2-17_52_40 0,0,008-1,236,40 -008-2-17,25,39,0 warp #008-2-17_25_39 1,0,008-2-18,22,24 -008-2-17,24,34,0 warp #008-2-17_24_34 0,0,008-2-19,20,29 diff --git a/npc/008-2-17/angus.txt b/npc/008-2-17/angus.txt deleted file mode 100644 index b51f1dcd..00000000 --- a/npc/008-2-17/angus.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Angus the Smith. -// THIS IS A PLACEHOLDER! - -008-2-17,34,47,0 script Angus NPC_ANGUS_THE_SMITH,{ - speech - l("Hello."), - l("Do you need your pickaxe or your shovel fixed? Then I am your man."), - l("If you want to play with unicorns, you better piss off now."); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-17/caul.txt b/npc/008-2-17/caul.txt deleted file mode 100644 index 00515a89..00000000 --- a/npc/008-2-17/caul.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Caul the Alchemist. -// THIS IS A PLACEHOLDER! - -008-2-17,40,33,0 script Caul NPC_CAUL,{ - speech - l("Hi there."), - l("Don't you like the smoke, when there is a nice fire beneath a cauldron?"), - l("Honestly, sometimes I prefer nice explosions. Better keep back!"); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-18/_import.txt b/npc/008-2-18/_import.txt deleted file mode 100644 index 5035c75c..00000000 --- a/npc/008-2-18/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-18: Mining Camp First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-18/_warps.txt", -"npc/008-2-18/malik.txt", diff --git a/npc/008-2-18/_warps.txt b/npc/008-2-18/_warps.txt deleted file mode 100644 index a80310cd..00000000 --- a/npc/008-2-18/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-18: Mining Camp First Floor warps -008-2-18,22,26,0 warp #008-2-18_22_26 1,0,008-2-17,25,40 diff --git a/npc/008-2-18/malik.txt b/npc/008-2-18/malik.txt deleted file mode 100644 index eb091e35..00000000 --- a/npc/008-2-18/malik.txt +++ /dev/null @@ -1,64 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald -// TODO: Make Malik prepare Crude Gem from shards, and make him produce Gem Powder later, once the player visited Tulim(dont tell WildX, though) - -008-2-18,32,24,0 script Malik#008-2-18 NPC_MALIK,{ - if (getq(.quest_inspector) == 11) - { - speech(4, - l("Hi, can I help you at all?")); - - selectd( - l("The inspector sent me here to investigate.")); - - speech(4, - l("Yeah, we did hear a commotion."), - l("We thought we heard someone go down to the basement, but we checked the whole place over and didn't see anything out of the ordinary.")); - - close2; - setq(.quest_inspector, 12); - end; - } - - npctalk3(generic(32 | 256)); - end; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-19/_import.txt b/npc/008-2-19/_import.txt deleted file mode 100644 index 1d12e589..00000000 --- a/npc/008-2-19/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-19: Mining Camp Basement -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-19/_warps.txt", -"npc/008-2-19/books.txt", diff --git a/npc/008-2-19/_warps.txt b/npc/008-2-19/_warps.txt deleted file mode 100644 index ec68b70c..00000000 --- a/npc/008-2-19/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-19: Mining Camp Basement warps -008-2-19,20,26,0 warp #008-2-19_20_26 0,0,008-2-17,24,32 diff --git a/npc/008-2-19/books.txt b/npc/008-2-19/books.txt deleted file mode 100644 index 2c6a2112..00000000 --- a/npc/008-2-19/books.txt +++ /dev/null @@ -1,60 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -008-2-19,33,21,0 script bookcase NPC_NO_SPRITE,{ - - if (getq(.quest_inspector) != 12) - { - dispbottom(l("You see an ordinary bookcase.")); - end; - } - - narrator( - l("You see an ordinary bookcase."), - l("Looking over closely, you find a book that is upside down."), - l("The book has been hollowed out."), - l("Inside is a theater mask and a note that you cannot even begin to read.")); - - close2; - setq(.quest_inspector, 13); - end; - -OnInit: - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 1; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-2/_import.txt b/npc/008-2-2/_import.txt deleted file mode 100644 index 92597add..00000000 --- a/npc/008-2-2/_import.txt +++ /dev/null @@ -1,12 +0,0 @@ -// Map 008-2-2: The Rusty Pick -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-2/_warps.txt", -"npc/008-2-2/barron.txt", -"npc/008-2-2/jukebox.txt", -"npc/008-2-2/kfahr.txt", -"npc/008-2-2/ledmitz.txt", -"npc/008-2-2/mapflags.txt", -"npc/008-2-2/melania.txt", -"npc/008-2-2/melinda.txt", -"npc/008-2-2/note.txt", -"npc/008-2-2/shop.txt", diff --git a/npc/008-2-2/_warps.txt b/npc/008-2-2/_warps.txt deleted file mode 100644 index d7cce7fc..00000000 --- a/npc/008-2-2/_warps.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-2: The Rusty Pick warps -008-2-2,28,34,0 warp #008-2-2_28_34 0,0,008-1,236,103 -008-2-2,52,26,0 warp #008-2-2_52_26 1,0,008-2-3,66,28 -008-2-2,24,29,0 warp #008-2-2_24_29 0,0,008-2-4,43,28 -008-2-2,52,32,0 warp #008-2-2_52_32 0,0,008-2-5,24,25 diff --git a/npc/008-2-2/barron.txt b/npc/008-2-2/barron.txt deleted file mode 100644 index e46ebe6a..00000000 --- a/npc/008-2-2/barron.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// toams -// Description: -// Barron, the bartender of the Rusty Pick. - -008-2-2,43,28,0 script Barron#008-2-2 NPC_GENERAL_STORE,{ -speech S_LAST_NEXT, - l("Hi!"), - l("I am the bartender here, can I provide you with some delicious beverage?"), - l("Or you can take seat and ask Melinda if you need something."); - - switch (select(l("What beverages do you have?"), - l("I'll ask Melinda later"))) - { - case 1: - closeclientdialog; - shop "#Invisible008-2-2"; - close; - case 2: - speech S_FIRST_BLANK_LINE, - l("Make sure to tip her, it will brighten up her day."); - close; - } - - - -OnInit: - .distance = 3; - end; -} diff --git a/npc/008-2-2/jukebox.txt b/npc/008-2-2/jukebox.txt deleted file mode 100644 index 6e592c8f..00000000 --- a/npc/008-2-2/jukebox.txt +++ /dev/null @@ -1,29 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Hocus Pocus Fidibus -// Description: -// Music box for a classy AFKing experience -// GMs can play on whole map but default to player only - -008-2-2,39,27,0 script #JukeboxHurns NPC_JUKEBOX,{ - mesc l("Select a music"); - .@track="jukebox"::HurnscaldPrompt(); - .@global=ASK_NO; - if (is_evtc()) { - mes "Play music globally?"; - mes "* Selecting \"No\" will play only to yourself (default behavior)"; - .@global=askyesno(); - } - if (.@global == ASK_YES) - "jukebox"::BroadcastMusic(getmap(), .@track); - else - "jukebox"::JukeboxMusic(.@track); - close; - -OnInit: - .distance = 3; - end; -} - - diff --git a/npc/008-2-2/kfahr.txt b/npc/008-2-2/kfahr.txt deleted file mode 100644 index 4482b4fd..00000000 --- a/npc/008-2-2/kfahr.txt +++ /dev/null @@ -1,785 +0,0 @@ -// Evol scripts. -// Author: -// Addapted for TMW rEvolt by Toams -// Author(s) of original script: Jaxad0127 (02/11/2008) -// Additional contributors: o11c, wushin, Jessica Beller (jtoelke), Ablu, Turmfalke -// Description: -// Kfahr the hero. Bone knife quest and Golden Stinger quest (Needed for Setzer Quest) -// Variables: -// HurnscaldQuests_Kfahr -// Values: -// 0 Didn't speak with Kfahr yet. -// 1 Already met Kfahr, No quests started -// 2 Bone knife quest started. -// 3 Bone knife quest finished - - -008-2-2,44,36,0 script Kfahr NPC_YOUNG_MAN_KFAHR,{ - @beer_count = 0; - @current_story = 0; - @last_story = 0; - @has_beer = 0; - - function kfahr_first_met; - function kfahr_default_greeting; - function kfahr_main_dialog; - function tale_check; - function gain_power; - function give_beer; - function pc_no_beer; - function kfahr_has_beer; - function kfahr_drunk; - function tale_desert_worm; - function desert_worm_see_bones; - function tale_desert_worm_final; - function tale_desert_temple; - function tale_hero_tulimshar; - function tale_desert; - function bone_quest; - function bone_quest_tooweak; - function bone_quest_items; - function bone_quest_check_items; - function bone_quest_final_check; - function bone_quest_finished; - -switch (getq(HurnscaldQuests_Kfahr)) { - case 0: - narrator S_LAST_NEXT, - l("You stand before a battle-scarred, darkly tanned warrior, brimming with muscles."), - l("Just looking at him you smell danger, adventure, excitement..."), - l("..."), - l("On second thought, he really could use a bath."), - l("..."), - l("The warrior turns towards you, grinning broadly."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Why, hello there! Come to visit Kfahr the Warrior to hear of my exploits, have you?"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He laughs heartily and gives you a slap on the back."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Can't blame you, can't blame you at all! Here, take a seat!"); - select - l("Who are you?"), - l("Goodbye."); - switch (@menu) { - case 1: - kfahr_first_met; - break; - case 2: - close; - } - break; - case 1: - kfahr_default_greeting; - kfahr_main_dialog; - break; - case 2: - bone_quest_check_items; - kfahr_main_dialog; - break; - default: - kfahr_default_greeting; - kfahr_main_dialog; - break; -} - -close; - -function kfahr_first_met { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr laughs again."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Surely you jest! You must have heard of Kfahr, Slayer of Toby Rick the Desert Worm, Raider of the Lost Temple, Hero of Tulimshar?"); - - select - l("Uhm..."), - l("Well..."), - l("To be quite honest..."), - l("Excuse me, someone is, er, whispering me..."); - switch (@menu) { - case 4: - close; - default: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("ah, I knew it! So you have come to hear some tales about the dangers of the desert? You've come to the right man!"); - setq HurnscaldQuests_Kfahr, 1; - kfahr_main_dialog; - } - - return; -} - -function kfahr_default_greeting { - narrator S_LAST_NEXT, - l("Kfahr nods and grins as you greet him."); - speech S_LAST_NEXT, - l("Came back for more stories about Desert Worms, Desert Temples and the Hero of Tulimshar? Have a seat!"); - - return; -} - -function kfahr_main_dialog { - do { - select - l("What's a Desert Worm?"), - l("Desert Temple?"), - l("Hero of Tulimshar?"), - l("Tell me about the desert!"), - l("I want to become as powerful as you!"), - l("Here, have a beer!"), - l("Goodbye!"); - switch (@menu) { - case 1: - tale_desert_worm; - break; - case 2: - tale_desert_temple; - break; - case 3: - tale_hero_tulimshar; - break; - case 4: - tale_desert; - break; - case 5: - gain_power; - break; - case 6: - give_beer; - break; - case 7: - close; - } - } while (1); - - return; -} - -function tale_check { - //don't to tell the same story again - if (@current_story == @last_story) { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr frowns."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I only just told you that story. Trust me, the others are worth hearing, too!"); - return true; - } - - //don't to tell a story if out of beer - if (@has_beer == 0) { - if (@beer_count > 4) { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I think I've talked 'nuff for now... but thanks for lis'ning!"); - } - if (@beer_count <= 4) { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Now that's one of my favorite tales, but my throat is just a little too dry to talk about something like that... could you help me out a little here?"); - } - return true; - } - @has_beer = 0; - @last_story = @current_story; - - return false; -} - -function gain_power { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Yeees, yes... doesn't everyone?"); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He laughs briefly."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Don't worry – you can't become as powerful as I, of course, but if you keep practicing, you can get pretty damn close! Just make sure to pick your opponents carefully, and know when to run to live another day!"); - - return; -} - -function give_beer { - - if (countitem(Beer) < 1) { - pc_no_beer(); - return; - } - - if (@has_beer) { - kfahr_has_beer(); - return; - } - else { - @has_beer = 1; - delitem Beer, 1; - } - - if (@beer_count > 4) { - kfahr_drunk(); - return; - } - - ++@beer_count; - - setarray .beermessages$[1], - l("Ah yes... a warrior's drink!"), - l("Generous, generous! I like that!"), - l("Hahah! That's just what I needed!"), - l("I love this town! Hurnscaldian hospitality! Mrahahahah!"), - l("A'ight, one more can't hurt, eh?"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr is visibly delighted."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - .beermessages$[@beer_count]; - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He takes a deep sip."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Aaah, magnificent!"); - if (@beer_count > 4) - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr seems quite relaxed now."); - - return; -} - -function pc_no_beer { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr stares at you, then begins to laugh."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Mrahahahahaha! Here's the beer! Right, right! Naah, I get it! Save your gold for whatever you need it for! But if you have some spare and want to share a beer, you know where to find me!"); - - return; -} - -function kfahr_has_beer { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr leans back and sighs heavily."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Generous, generous! But I still have plenty in here!"); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He laughs and takes a sip from the beer you gave him earlier."); - - return; -} - -function kfahr_drunk { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr leans back and sighs heavily."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Very, very generous... bu' I think I'm fine for now."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He suppresses a burp."); - - return; -} - -function tale_desert_worm { - @current_story = 1; - if (tale_check()) - return; - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr smiles and leans back."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("A desert worm is probably the largest creature you will ever see, larger even than most dragons. It spans a good twenty chains (or six box tosses if you're used to the Imperial system) in length, has a thick, rubbery skin, and teeth as long as my legs."), - l("Most are a darkish gray, except for the young ones; those are more purplish, I've been told. Well, anyway, you hardly ever see one of them in their entirety, you only see the head, if they decide to come out and fight – they tend to burrow under the ground."); - l("They are terrifying beasts, but lack any intelligent thought whatsoever. They just eat whatever gets in their way. There's nothing out there that can kill one, I think, and they can grow hundreds of years old."), - l("Fortunately, they're kind of rare these days, and mostly roam in the empty deserts far, far south of Tulimshar. They don't like the area too close to the mountains, I think; probably too rocky underground."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr takes a sip from his beer."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Anyway. Desert worms are dangerous, as I said, but there was one particularly terrifying one, called Toby Rick. You must've heard of it – the greatest and most dangerous worm, scourge of the trade routes. It could smell humans from miles away."), - l("Most desert worms don't smell or see or feel much, you see. They just notice when something's walking nearby, then jump up and swallow it. But Toby Rick was different. He was a terrifying beast, three times as long as a regular worm."), - l("So to feed itself, it had learned to smell. That's right, the beast had grown nostrils and learned how to use 'em!"), - l("One day I was hired to protect a caravan going north to Tulimshar, with a friend of mine, old Arvek. He only came along for the fun, of course; it's not as if I really need much help defending a caravan... or at least normally it isn't."), - l("Arvek's fun to have about. His manners are as bad as his breath, but he knows how to make a laugh out of everything. One thing you musnt't ever do with him, though, and that is to try his `homebrew' -- some kind of ale he makes out of maggot slime..."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr takes another sip of beer, momentarily irritated as if surprised by the taste."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Anyway, This time was different. We were barely three days out in the desert, when we spotted him – `the Black Worm!', the Caravan Master cried, `Over there; it will kill us all!'"), - l("I had barely enough time to draw out my sword, and the beast was upon us! The caravan people were fleeing for their lives, so it was up to me and Arvek to stop it."), - l("That was madness, of course; no-one takes on a desert worm, if they have a choice. But we didn't; you see, with most desert worms you can just stand still and it won't notice you and pass by. But not with this one!"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr leans forward."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("So this humongous beast came roaring towards us, a big back hole where the mouth is, spikey fins sticking out to the side, all ready to swallow us all! My sword felt like a toothpick against that monster!"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He pauses, then leans back a little to take another long sip from his beer."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("So it seemed that our last hour was at hand, that we'd be swallowed and never heard from again!"), - l("Aha, but Kfahr doesn't die quite so easily. What happened was this: Me and Arvek charged towards that thing, slashing and stabbing, but our blows would just glance off. The beast roared and just slid by us, slapping us to the side with its fins like maggots, knocking us to the ground."), - l("It bolted up into the air, and tore down on the caravan, swallowing each and everyone in there in a single big gulp!"), - l("Then it turned around towards us. Those fins had hit us pretty badly; I had lost my shield and Arvek his backpack. Better for him, I suppose, but I had been rather fond of that shield – not that it would have helped me much here..."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr leans forward, nearly knocking over his beer."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("So the beast charges at the two of us again and we dodge – Arvek left, me right. The beast is smarter than the average desert worm, though, and had expected that – so it bends to the side and swallows poor Arvek, hair and hide and all."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr's eyes sparkle with excitement."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It turns around, trying to get me too. I dodge it – left, then the same again, I dodge it right. But it can't go on like that, the beast isn't tiring, but I am..."), - l("So for one instant I think that this might be it, that I might die out there! A worthy death, I suppose, against the king of desert worms! And just as I think that, I bump against something."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr slaps on the table."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Arvek's backpack! Doesn't sound terribly exciting, of course – what am I going to do, toss it at the beast and hope that it chokes on it?"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He grins."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("But I remember something better. That beast had grown nostrils, right? So it can smell and taste! So I tear open his backpack and pull out that big snakeskin of that disgusting maggot ale of his. It's still filled to the brim."), - l("I quickly put on my gloves again, because I don't want to touch that stuff with my bare skin. The beast is almost upon me, but I have only that one chance – so I squeeze the skin while sticking my thumb into the opening, until I can see the black of its nostrils..."), - l("...and when I think it's almost too late already, I shoot out that revolting brew at the beast's smelling holes, and I hit! Two at once, and up and sideways it rolls, away from me, and roaring and bellowing in pain!"), - l("It roared for a good five minutes, then convulsed... and first it spat out old Arvek, who was a bit irritated at all that because, as he told me, he had 'almost pierced the pancreas', whatever that means..."), - l("Next it spat out the caravan, and then some other caravan it had plucked off from elswehere. Somehow, everyone from there was still alive, too."), - l("Then it slid away from us, away to the north, but we could see it getting slower and slower."), - l("Two days later we caught up with it, but it was already dead then and had started to smell. We looked around and inside of it, found treasures and remnants of some less fortunate caravans and split them up appropriately."), - l("I never told Arvek that it was his brew that killed it; he'd never have forgiven me."), - l("One of the nomads that had been travelling with the other caravan then told me that you could make special kinds of knives and swords and armor out of desert worm bones."); - - select - l("Hang on... bones in a... worm?"), - l("That's neat! Do you have any that I could see?"), - l("And then?"), - l("Zzzzzzzz......."); - switch (@menu) { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Weren't you listening? A desert worm is not a regular worm; a worm couldn't survive in the desert."); - select - l("Do you have any bones that I could see?"), - l("Never mind that, what happened then?"), - l("Zzzzzzzz......."); - switch (@menu) { - case 1: desert_worm_see_bones; - return; - case 2: tale_desert_worm_final; - return; - case 3: close; - } - case 2: desert_worm_see_bones; - return; - case 3: tale_desert_worm_final; - return; - case 4: close; - } - - return; -} - -function desert_worm_see_bones { - if (BaseLevel >= 40) { - bone_quest; - return; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Of course!"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He pulls out a strangely curved knife with a yellow-whiteish blade that is almost transparent at the edge."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("When hardened properly, this bone knife can last a lifetime! One of the best knives you will find, too."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He puts the knife back into his pocket."); - - mes l(" > \"That knife looks sharp!\""); - mes ""; - mes l(" > \"But, what happened next?\""); - tale_desert_worm_final; - - return; -} - -function tale_desert_worm_final { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Nothing much else happened on that trip. When we arrived in Tulimshar, people at first didn't believe the story, of course, until we showed them the treasures and the bones. Ah, those were wonderful days..."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - "He sighs and leans back, a nostalgic look on his face."; - - return; -} - -function tale_desert_temple { - @current_story = 2; - if (tale_check()) - return; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ah, that..."), - l("Kfahr leans back and takes a sip from his beer."), - l("That was many years ago, when George and I were just kids. George later became a pirate, you see; he always loved hunting for treasure. But back in those days it was all on level ground."), - l("George had found a treasure map somewhere... and when I say `found', I mean that in a fairly liberal sense; he always loved those maps, almost as much as the excitement of hunting for treasure."), - l("Anyway, that map pointed to a spot in the desert a good day's walk south of Tulimshar. So we grabbed our satchels and coats and packed food and water, and headed there in the evening."), - l("We walked all night. As you know, it's best not to travel during the day if you can avoid it, and we were young and energetic in those days, so that was easily avoided."), - l("Anyway, when the sun rose in the morning, we still hadn't found the place. So we climbed up on the nearest dune and looked all around to find it."), - l("But there was nothing, nothing at all. We looked and looked – and suddenly George screamed: While we weren't paying attention to nearby things, scorpions had crept up on us!"), - l("The scorpions had smelled the food we had brought and cut open our satchels, tearing our waterskins and making a mess of our food – and now that they were done with that, they were coming for us!"), - l("We didn't have any suitable weapons, and not much of a choice either, so we made a break for it. We ran into the desert, fast as our legs would carry us, and the scorpions after us."), - l("We very nearly didn't make it. There was nothing around but sand, and we had no water, no food – at least we'd had our breakfast already – and the sun kept burning, and burning, and trying to cook us alive."), - l("We had long lost the scorpions, but we were dry like parchment, and exhausted from all the sun and running. So we sat down in the shades of a dune and contemplated our options."), - l("Without water we couldn't last during the day. So our only hope was to find shelter somewhere – except that the only thing around was sand, and the mid-day sun would rob that of all shelter."), - l("So we resigned to continuing to search for something, anything – it was either that, or die of thirst for sure. The only problem was that we were already so thirsty and it was so bright that we couldn't see nor walk straight anymore."), - l("So we had barely made it to the top of the next dune when George slipped and rolled down the other side. I wanted to catch him, but I was too dizzy myself, and so I rolled after him."), - l("We seemed to roll down for hours, and I kept feeling dizzier and dizzier; I didn't have the strength to stop. When we arrived at the bottom, I just wanted to lie down and let the sun dry me up."), - l("I was being foolish, of course. You should never give up, no matter how hopeless the situation may seem. Anyway, I finally did decide to get up on my knees and look around again..."), - l("...and what I saw right before me, believe it or not, was a giant face of a man, carved into rock – there, in the middle of the desert, half-sunk, a shattered visage!"), - l("I pulled George up – I didn't have the strength to speak, but walking seemed to work – and we slowly made our way over to it. We weren't thinking much, just trying to find some shade, so we climbed into that thing's ear."), - l("Inside it felt moist, as if it was a real ear – not that I've climbed inside a real ear, mind you! But that feeling of cool and dampness and water was like a magical healing potion; we suddenly felt strength in our legs again."), - l("When we looked around, we noticed that there was a passage leading further underground, and long-spent torches on the wall. Fortunately I still had my tinderbox, so I wrapped my shirt around a torch and lighted it."), - l("We climbed down, and soon we heard the dripping of water – we had found an underground water-hole! More than that, we had found a gigantic underground cave, and, at the end of it, a huge portal."), - l("We first drenched ourselves in water – somehow managing not to douse the torch – and drank until we were ready to burst. When we had rested, we went to the portal to have a closer look."), - l("The portal was made out of bronze, or some similar metal, with images of snakes engraved all over. Curious as we were, we pulled the door open – it wasn't locked or barred in any way – and had a look inside."), - l("The passages in there were cool and dark, with a ceiling high enough to swallow the light of my torch. There were snakes, quite a few of them, but we were both quick-footed and managed to avoid them."), - l("There were chambers and inscriptions and more torches, but not a living being besides us and the snakes. Hmm. Though I could have sworn that some of the statues there were following us with their eyes..."), - l("All went well, until George stepped into a trap. A piece of ground just caved in, and if I hadn't grabbed his hand at the last second, he would have ended up on some rusty and probably poisoned spikes on the bottom..."), - l("But I moved too fast, and slipped, and let go of the torch to catch myself with the other hand – and the torch ended up in the bottom of the pit! Well, better the torch than George, I suppose..."), - l("Still, we no longer had any light. Being careless, I had gotten my tinderbox wet while we were at the water-hole, so we couldn't make another torch either."), - l("We had the choice between staying by our torch and watching it die, and then follow suit at the hands, or, well, fangs of the snakes, or wandering off in the dark, to be eaten by snakes someplace else."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr empties his beer, looking a bit disappointed."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Anyway, we took the latter option. We wandered through the dark, somehow barely avoiding the snakes and the traps, running into walls and hitting our heads on archways, until, suddenly, we saw something shining up ahead."), - l("That thing was on some kind of pedestal, and it looked like a golden tablet of sorts. We clambered towards it – the only source of light in here, the only thing that could save us – and hesitated."), - l("Should we just take it? This was clearly some kind of temple, so it might be something sacred. George and I argued about it for a while, until I decided to end the discussion – so I simply grabbed it: we needed light."), - l("At that point, a terrible grinding noise started all around us, as the pedestal began to sink into the ground. We had triggered some ancient trap!"), - l("Holes on the walls were opening up, and snakes began to gush out – only now did we realise that we were in a huge, opulent chamber, with gold and gems and images all around! But now it was too late for any looting; we had to run for our lives!"), - l("So we ran from that slithering mass, faster than we ever had! We had no idea where we were going of course, but at least we had light again..."), - l("Somehow we got lucky, somehow we escaped. It was evening again when we climbed out of that ear into the desert again, with only our lives and that golden tablet. We only barely made it back to Tulimshar in the morning."), - l("But we did have the tablet as a proof of what happened."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He grins."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That was my first real adventure, I think. Ah, those were exciting days."); - - select - l("Wow."), - l("What happened to the tablet?"), - l("Did you go there again?"), - l("Zzzzzzz....."); - switch (@menu) { - case 1: - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Well, we couldn't read it. We later sold it for a good price, to a young travelling archeologist; Doctor Nohlidge or something like that. She said that the engravings described sacrifical practices of an ancient snake cult..."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He shrugs."); - break; - case 3: - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr laughs."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Of course we tried to go there again. After seeing all that treasure, George wouldn't give up on it. We tried many times – as did others, from what I've heard – but we never found it again."); - break; - case 4: - close; - } - - return; -} - -function tale_hero_tulimshar { - @current_story = 3; - if (tale_check()) - return; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - ("Yes, Hero of Tulimshar. That was many years ago, but I did save the city of Tulimshar from a deadly drought."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He grins broadly."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("And quite a feat that was, let me tell you!"), - l("Back in those days, there wasn't much trade with Hurnscald, and Tulimshar was dependent on its own water supply – critically dependent, even."), - l("Now, one day the water people drew from the wells started smelling. The smell was nauseating, and people who drank from it became violently sick."), - l("So the entire town was without water, except for the water reserves in the cistern. Someone had to act quickly – and of course that someone was me."), - l("With nothing more than a torch, some light armor and a sword, I climbed down one of the wells. It was a long climb; the wells go down fairly deep."), - l("I noticed that there were some holes in the walls of the wells, with hollow spaces on the sides... Hmm, that reminds me that I still have to check whether the rumors of a labyrinth underneath Tulimshar are true."), - l("Anyway, it took me a long time to get down, and every minute the stench was getting worse – something really bad was down there. I had to stop and tie a wet piece of cloth over my mouth so that I wouldn't inhale all of that nasty stuff."), - l("My torch was in an even poorer shape – whatever was making that smell had killed the flame, so I soon had to rely on the light from above to see anything."), - l("Finally I arrived at the water level. All Tulimshar wells dip into the same underground lake, which is on the side of a huge underground cavern. And in the midst of that cavern lay – hardly visible through the greenish mist coming from it – a Stinkewyrm!"), - l("Stinkewyrms are smaller cousins of dragons, but just as dangerous. They have a green, sticky skin, and, well, they stink. A lot. This one was particularly bad – it had filled up the entire cave with stinkiness!"), - l("I climbed down and swam to the shore. The stench was terrible; I had to hold my breath to get closer to the monster. There it was, lying on the ground, snoring, poisoning all our water! So I tried to wake it up to scare it away."), - l("I kicked it. I yelled at it. (Bad mistake, I got some of that stinky stuff in my lungs.) I poked at it with my sword. I even tried to poke it in the eyes, but I couldn't get that close to its mouth – that was where most of the smell was coming from."), - l("After a few attempts I couldn't take it anymore, so I had myself be pulled up again. It took me a while to recover and to tell the tale. We talked about what could be done, but no-one had an idea."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr takes a deep sip from his beer."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Finally, I came up with something. Stinkewyrms love that terrible stench of theirs, so what should be their natural enemy? Why, soap, of course!"), - l("We couldn't just dump all the soap into the underground lake, of course; the water would be undrinkable again. So we collected some of the soap, and I climbed down again with it."), - l("Having arrived at the bottom, I cut off the biggest of the water buckets and filled it with water – and that was a really big one, I could hardly carry it when it was full. Then I dissolved most the soap, and poured that onto the Stinkewyrm's head."), - l("Ah, that caught its attention! You should have seen that dragon roar, as it jumped to its feet and tried to find out who had soaped it! I rushed back to the water and made another bucket of soap water."), - l("But it had noticed me! And as soon as it had realized where I was, it came after me. Then it stopped, towering right before me, its stench nearly killing me, and grinned that broad, crooked-teeth dragon smile of its kind."), - l("Then it took a deep breath – and I realised that that was probably 'it' for me; Stinkewyrms can breathe fire like real dragons, and I didn't have the time to run back to the water."), - l("But when it breathed out, only a tiny little flame came out – and a lot of terrible smell that nearly knocked me off my feet."), - l("For you see, it had generated so much of the deadly smell around itself that even its own fire breath couldn't survive!"), - l("So it stared at me, mouth wide agape – the perfect opening!"), - l("I stormed at it and before it could even blink, it had a huge load of bubbly soap water down its throat."), - l("You should have heard the coughing and shaking! I swear, I thought the roof would collapse as it was jumping and choking..."), - l("Bubbles were coming out of its mouth, its nostrils, even its ears! The poor wyrm must have never felt so clean in its life!"), - l("I was out of soap, but the beast didn't know that – so I quickly grabbed another bucket and charged it again."), - l("And it worked! Seeing me like this again, it ran, squealing, back into the underground caves from where it must have come."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr roars with laughter and slaps his hands on the table."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("So we defeated it with hygiene! Ah, that was wonderful. After a day, the stench had worn off enough that we could drink the water again, and a week later it was almost completely gone. And of course I was the hero of the day."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr downs the rest of his beer."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("And from that day on they called me the `Hero of Tulimshar'"); - - return; -} - -function tale_desert { - @current_story = 4; - if (tale_check()) - return; - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr leans back, trying to find the right words to describe the desert."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The desert... a cold and lonely place at night, and a hot and lonely place during the day."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("For someone who apparently spent most of his life in the desert, his insights sometimes seem less than profound."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("The desert is a living hell during some times of the year. Filled with black scorpions and snakes, except for the shadier areas, and mountain snakes if you go further east."), - l("South of Tulimshar is a fairly protected region; the nomads keep the snakes out of there and you'll find only relatively harmless monsters. But go west from there, to the beach, and it's scorpions and snakes..."), - l("...and east of there you find the old Hatmaker cave, now filled to the brim with snakes! Rumors have it that this was once an oasis, in centuries long gone by, but as far as I'm concerned that pit is just a dump that you best avoid."), - l("Go further to the east and you'll find ol' Pachua up on the mountain. He seems to have some kind of power over the mountain snakes there; they never attack him. I think he's a bit creepy, personally..."), - l("...but if he offers you some of his tobacco, then by all means give it a try! That stuff is amazing."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He laughs, then begins to cough."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Not terribly healthy, though, I s'pose..."); - - return; -} - -function bone_quest { - if (getq(HurnscaldQuests_Kfahr) == 2) { - bone_quest_items; - return; - } - - if (getq(HurnscaldQuests_Kfahr) > 2) { - bone_quest_finished; - return; - } - - if (BaseLevel < 40) { - bone_quest_tooweak; - return; - } - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr stares at you for a moment, then nods."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You seem reasonably skilled. I think I may have something that I no longer need, but I don't want to give it to just anyone..."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He hesitates, obviously trying to make up his mind about something, then continues."); - - setq HurnscaldQuests_Kfahr, 2; - bone_quest_items; - - return; -} - -function bone_quest_tooweak { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You know, little one, if you keep practicing a little and come back once you're a bit stronger, I might have something for you..."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He winks."); - - return; -} - -function bone_quest_items { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Bring me %d %s and %d %s to prove that you are a competent warrior, and I'll see if I have something for you.", .BLACK_STINGERS_NR, getitemlink(BlackScorpionStinger), .MUSHROOMS_NR, getitemlink(SmallMushroom)); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He grins."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l( "But while you are here... perhaps you would like to listen to another story?"); - - return; -} - -function bone_quest_check_items { - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr eyes you with unconcealed amusement."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Welcome back! Did you bring me the things I asked for?"); - - select - l("Yes, here they are!"), - l("Er, what were those things again?"), - l("No, sorry, I didn't have the time. I'm more interested in hearing your stories."), - l("I forgot! Let me get them right now."); - switch (@menu) { - case 1: - bone_quest_final_check; - return; - case 2: - bone_quest_items; - return; - case 3: - return; - case 4: - close; - } - - return; -} - -function bone_quest_final_check { - if (countitem(BlackScorpionStinger) < .BLACK_STINGERS_NR) { - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No, no... I said %d %s.", .BLACK_STINGERS_NR, getitemlink(BlackScorpionStinger)); - if (countitem(BlackScorpionStinger) > 0) - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You will need %d more of those.", (.BLACK_STINGERS_NR - (countitem (BlackScorpionStinger)))); - else - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You didn't bring even a single one!"); - close; - } - - if (countitem(SmallMushroom) < .MUSHROOMS_NR) { - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("No, no... I said %d %s.", .MUSHROOMS_NR, getitemlink(SmallMushroom)); - if (countitem(SmallMushroom) > 0) - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You will need %d more of those.", (.MUSHROOMS_NR - (countitem (SmallMushroom)))); - else - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You didn't bring me even a single little mushroom!"); - close; - } - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Kfahr is delighted."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Well done, well done! Now that's what I call warrior spirit!"); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He laughs, then suddenly stops, turning to you with suspicion in his eyes."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You DID get those yourself, didn't you? Not buy them or somesuch...?"); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Before you can answer, he laughs and slaps you on the back again."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ah, what am I thinking! Too many years in the desert make you a little suspicious of everyone and everything! Naah, I believe you."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He pulls a strangely curved knife out of a side pocket and holds it up to the light. The blade is partly transparent, and looks quite sharp."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's a bone knife, carved out of the umplex bone of a desert worm... you can probably guess which one."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He grins broadly again, weighing the weapon."); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("It's a little heavy, but one of the best knives you can get. Certainly beats a short sword any time of day."), - l("I had the nomads make me a few of them, and I hardly use them nowadays, so I think I can part with this one."); - - if (countitem(BlackScorpionStinger) < .BLACK_STINGERS_NR) { - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You just had %d %s. What happened to them?", .BLACK_STINGERS_NR, getitemlink(BlackScorpionStinger)); - if (countitem(BlackScorpionStinger) > 0) - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You will need %d more of those.",(.BLACK_STINGERS_NR - (countitem (BlackScorpionStinger)))); - else - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You didn't bring even a single one!"); - close; - } - - if (countitem(SmallMushroom) < .MUSHROOMS_NR) { - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You just had %d %s. What happened to them?", .MUSHROOMS_NR, getitemlink(SmallMushroom)); - if (countitem(SmallMushroom) > 0) - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You will need %d more of those.", (.MUSHROOMS_NR - (countitem (SmallMushroom)))); - else - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You didn't bring me even a single little mushroom!"); - close; - } - - inventoryplace BoneKnife, 1; - - mesc l("He hands you the knife."); - next; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, and I think I'll keep those in return; I know someone who will trade them for antidote potions."); - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He pockets the stingers and mushrooms."); - - setq HurnscaldQuests_Kfahr, 3; - delitem BlackScorpionStinger, .BLACK_STINGERS_NR; - delitem SmallMushroom, .MUSHROOMS_NR; - quest_xp(.KNIFE_MAXLV, .KNIFE_QUEST_XP); - getitem BoneKnife, 1; - next; - - return; -} - -function bone_quest_finished { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I really don't have anything else I'd want to give away to make you stronger. Look around a bit yourself! You won't become a hero if you keep begging for help!"); - - return; -} - -OnInit: - - .BLACK_STINGERS_NR = 10; - .MUSHROOMS_NR = 10; - .SNAKE_SKINS_NR = 10; - .KNIFE_QUEST_XP = 50000; - .STINGER_QUEST_XP = 80000; - .KNIFE_MAXLV = getiteminfo(BoneKnife, ITEMINFO_ELV) + 20; - //.STINGER_MAXLV = 100; - - .distance = 4; - end; -} diff --git a/npc/008-2-2/ledmitz.txt b/npc/008-2-2/ledmitz.txt deleted file mode 100644 index 71e72ac9..00000000 --- a/npc/008-2-2/ledmitz.txt +++ /dev/null @@ -1,36 +0,0 @@ -// Evol scripts. -// Author: -// gumi - -008-2-2,43,34,0 script Ledd NPC_DRINKER_ROAMINGO,{ - // XXX: ^ I know it should be Led and Mitz but 4144 made names - // shorter than 4 characters illegal - - deltimer("Mitz::OnTalk"); - addtimer(rand(500, 900), "Mitz::OnTalk"); -OnTalk: - npctalk3(l("Ha! I'll drink muuuch mo.. more than you! Im not ooone biiit dr...dr..unk!")); - // TODO: add more sentences - // XXX: maybe instead of making them respond to a click they should just - // shout at each other at regular intervals? - end; - -OnInit: - .distance = 3; - end; -} - -008-2-2,46,34,0 script Mitz NPC_DRINKER_MICKSHA,{ - - deltimer("Ledd::OnTalk"); - addtimer(rand(500, 900), "Ledd::OnTalk"); -OnTalk: - npctalk3(l("I can still drink more! Better give up you... you... teelotaler! MORE BEER MELINDA!")); - // TODO: add more sentences - end; - -OnInit: - .distance = 3; - end; -} - diff --git a/npc/008-2-2/mapflags.txt b/npc/008-2-2/mapflags.txt deleted file mode 100644 index 8f90e197..00000000 --- a/npc/008-2-2/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-2 mapflag town diff --git a/npc/008-2-2/melania.txt b/npc/008-2-2/melania.txt deleted file mode 100644 index e8e7aa86..00000000 --- a/npc/008-2-2/melania.txt +++ /dev/null @@ -1,107 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Receptionist of Rusty Pick. - -008-2-2,28,27,0 script Melania NPC_AIRLIA,{ - function accepted_room; - function register_room; - function lodge_check; - - speech - l("Hello."), - l("Welcome to the Rusty Pick."), - l("One advice: Don't take the things those drinkers say too serious. They are sitting here and drinking all day."), - l("How can we serve you today?"); - - do - { - select - l("Could I lodge here for a while?"), - l("Nothing."); - mes ""; - - if (@menu == 1) - lodge_check(); - - } while (@menu != 2); - speech S_FIRST_BLANK_LINE, - l("I wish you a beautiful day."); - close; - - // Check if you are booked here or somewhere else - function lodge_check { - if (INN_REGISTER == NO_INN) - { - register_room(); - } - else if (INN_REGISTER == .inn) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You are already registered here."), - l("Go on the upper level if you want to change your room or to use it."); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("If you are registered somewhere else you will loose that reservation."), - l("Do you still want to lodge here?"); - - if (askyesno() == ASK_YES) - { - register_room(); - } - } - return; - } - - // Find out prices - function register_room { - .@price = lognbaselvl(100, 10); - .@price = .@price*12/10; // Make the price 20% higher by WildX request - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("That will be @@ E to set your respawn point", .@price), - l("This will remain your respawn point until set elsewhere."), - l("Is that okay?"); - - if (askyesno() == ASK_YES) - { - accepted_room(.@price); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Come back later if you changed your mind!"); - } - - return; - } - - // Book a room - function accepted_room { - .@price = getarg(0); - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring @@ E.", .@price); - } - else - { - emotion E_HAPPY; - Zeny -= .@price; - INN_REGISTER = .inn; - PC_IS_DEAD = false; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I registered you on a random bed on the upper level."), - l("You can go upstairs and choose a different room if you want."); - savepoint "008-2-3", any(49, 53, 57), any(31, 35); - } - } - -OnInit: - .distance = 4; - .inn=RUSTYPICK_INN; - end; -} diff --git a/npc/008-2-2/melinda.txt b/npc/008-2-2/melinda.txt deleted file mode 100644 index 964332ca..00000000 --- a/npc/008-2-2/melinda.txt +++ /dev/null @@ -1,181 +0,0 @@ -// Evol scripts. -// Authors: -// Toams -// Description: -// Melinda, Rusty Pick's waitress - -008-2-2,40,29,0 script Melinda#008-2-2 NPC_MELINDA,1,1,{ - -function StartConversation { - - .@tick = gettimetick(1); - if (.@tick > @Hurns_Rusty_Pick_WaitressTick + 10) - { - setarray .messages$[0], l("Welcome to our inn!"), - l("Welcome to the Rusty Pick."), - l("Please, have a seat."), - l("Lovely day, isn't it?"); - - .@r = rand(getarraysize(.messages$)); - .@msg$ = .messages$[.@r]; - npctalk3 .@msg$; - @Hurns_Rusty_Pick_WaitressTick = .@tick; - } - } - -function face_to_PC { - getmapxy(.@map$, .@cx, .@cy, 0); - @Melinda_ols_dir = .dir; - npc_turntoxy(.@cx, .@cy); - - return; - } - -npc_pausemove; -face_to_PC; -mes ""; -mesn; -mesq l("Hi, sweetie! Want a fresh beer for 90 Florin?"); -switch (select(l("Sure! [Don't tip]"), - l("Sure! [Tip 5 Florin]"), - l("Sure! [Tip 10 Florin]"), - l("Nah, maybe later."))) -{ - case 1: - if (Zeny < 90) - goto L_NoMoney; - getinventorylist; - if (@inventorylist_count == 100 && countitem("Beer") == 0) - goto L_TooMany; - Zeny -= 90; - getitem Beer, 1; - mes ""; - mesn; - mesq l("Pff... Nickel nurser!"); - goto L_Close; - case 2: - if (Zeny < 95) - goto L_NoMoney; - getinventorylist; - if (@inventorylist_count == 100 && countitem("Beer") == 0) - goto L_TooMany; - Zeny -= 95; - getitem "Beer", 1; - mes ""; - mesn; - mesq l("Thanks for the tip!"); - goto L_Close; - case 3: - if (Zeny < 100) - goto L_NoMoney; - getinventorylist; - if (@inventorylist_count == 100 && countitem("Beer") == 0) - goto L_TooMany; - Zeny -= 100; - getitem "Beer", 1; - mes ""; - mesn; - mesq l("Thank you, sweetie! Want to hear a secret?"); - switch (select(l("What is it, darling?"), - l("Nah, I don't feel like chatting."))) - { - case 1: - mes ""; - mesn; - mesq l("The master bowyer in this village used to construct exceptional bows. When you want one you should go and ask him."); - goto L_Close; - case 2: - goto L_No; - } - goto L_Close; - case 4: - goto L_No; -} - -L_NoMoney: - mes ""; - mesn; - mesq l("You look broke. Don't think that you can dine and dash here!"); - goto L_Close; - -L_No: - mes ""; - mesn; - mesq l("Just call me when you changed your mind."); - goto L_Close; - -L_Close: - initnpctimer; - npc_resumemove; - close; - -L_TooMany: - mes ""; - mesn; - mesq l("You don't have room for a beer!"); - goto L_Close; - -OnTimer1000: - dographmovestep; - -OnTouch: - StartConversation; - end; - -OnInit: - .distance = 5; - .speed = 300; - initmovegraph "startspot", 40, 29, - "barkeeper", 43, 30, - "kfahr_r", 45, 36, - "kfahr_l", 43, 35, - "l_table_b", 36, 36, - "l_table_r", 38, 33, - "m_table_l", 39, 33, - "m_table_b", 41, 36, - "r_table_r", 46, 33, - "fireplace", 36, 28, - "firewood", 33, 28, - "to_basement", 52, 32, - "basement_entrance", 24, 25, - "basement_cabinet", 30,31, - "cabinet", 42, 28, - "bucket", 46, 30; - - - - setmovegraphcmd "startspot", "firewood", 1, "dir 4; wait 5", - "firewood", "fireplace", 1, "dir 4; wait 3", - "fireplace", "startspot", 1, "dir 0; wait 10", - - "startspot", "l_table_b", 1, "dir 4; wait 3", - "l_table_b", "l_table_r", 1, "dir 2; wait 3", - "l_table_r", "m_table_l", 1, "dir 6; wait 3", - "m_table_l", "m_table_b", 1, "dir 4; wait 3", - "m_table_b", "r_table_r", 1, "dir 2; wait 3", - "r_table_r", "bucket", 1, "dir 4; wait 1; emote 1;" - "wait 15; moveon", - "bucket", "startspot", 1, "dir 0; wait 5", - - "startspot", "kfahr_r", 2, "dir 4; wait 5", - "kfahr_r", "barkeeper", 1, "dir 4; wait 1;" - "say Another round for kfahr's table.;" - "wait 1; say They sure are thirsty today;" - "wait 5; moveon", - "barkeeper", "kfahr_l", 1, "dir 6; wait 3;" - "say Cheers!;" - "wait 3; moveon", - "kfahr_l", "startspot", 1, "dir 0; wait 10", - - "startspot", "to_basement", 1, "dir 4; warp 008-2-5 basement_entrance", - "basement_entrance", "basement_cabinet", 1, "dir 4; wait 5", - "basement_cabinet", "basement_entrance", 1, "dir 4; warp 008-2-2 to_basement", - "to_basement", "cabinet", 1, "dir 4; wait 5", - "cabinet", "startspot", 1, "dir 0; wait 15"; - - - - - firstmove "wait 8"; - initnpctimer; -} diff --git a/npc/008-2-2/note.txt b/npc/008-2-2/note.txt deleted file mode 100644 index a19fa50e..00000000 --- a/npc/008-2-2/note.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Jesusalva - -008-2-2,32,28,0 script Note#Hurnscald:pub NPC_PAPER_NOTE,{ - narrator(8, - l("We refuse service to anyone who:"), - "• " + l("Has a bubblehead"), - "• " + l("Is not properly shaded"), - "• " + l("Can't walk without stopping after every step")); - - // In case you don't get the joke, know that it's a parody on Illutia. - mesc l("PS. You'll gain experience if you hang around here with friends. Ask Melinda for drinks and pay a round for them! - Management"); - close; - -OnInit: - .distance = 3; - end; -} - -// This is part of AFKing Experience -008-2-2,28,33,0 script #AFKHurns NPC_HIDDEN,0,0,{ - end; - -OnTouch: - addtimer2(3000, "#AFKHurns::OnSpeeching"); - end; - -OnSpeeching: - AFKLoop("#AFKHurns::OnSpeeching", "008-2-2", 33, 27, 48, 38); - end; -} - -008-2-2,50,30,0 duplicate(#AFKHurns) #AFKHurns2 NPC_HIDDEN,1,0 diff --git a/npc/008-2-2/shop.txt b/npc/008-2-2/shop.txt deleted file mode 100644 index b3e9b798..00000000 --- a/npc/008-2-2/shop.txt +++ /dev/null @@ -1,39 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// jesusalva -// Reid -// toams -// Description: -// Inn hidden shop. - -008-2-2,40,30,0 trader #Invisible008-2-2 NPC_HIDDEN,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem Beer, -1, 50; - sellitem Bread, -1, 50; - sellitem RedPlushWine, -1, 50; - sellitem Cheese, -1, 50; - sellitem CherryCake, -1, 50; - sellitem SmallHealing, -1, 50; - sellitem MaggotSlimePotion, -1, 50; - - .distance = 10; - end; - -// FIXME Note: "20" doesn't means "restock 20 units". -// It means "restock if less than 20 units are being sold". -// Is this behavior intended? Seems like a bug. -OnClock0000: -OnClock0800: -OnClock1600: - restoreshopitem Beer, 20; - restoreshopitem Bread, 20; - restoreshopitem RedPlushWine, 20; - restoreshopitem Cheese, 20; - restoreshopitem CherryCake, 20; - restoreshopitem SmallHealing, 20; - restoreshopitem MaggotSlimePotion, 50; -} diff --git a/npc/008-2-20/_import.txt b/npc/008-2-20/_import.txt deleted file mode 100644 index 03f5f287..00000000 --- a/npc/008-2-20/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-20: Forsaken Inn -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-20/_warps.txt", -"npc/008-2-20/valia.txt", diff --git a/npc/008-2-20/_warps.txt b/npc/008-2-20/_warps.txt deleted file mode 100644 index ce2f572a..00000000 --- a/npc/008-2-20/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-20: Forsaken Inn warps -008-2-20,25,32,0 warp #008-2-20_25_32 0,0,008-1,256,204 -008-2-20,36,38,0 warp #008-2-20_36_38 1,0,008-2-21,34,28 diff --git a/npc/008-2-20/valia.txt b/npc/008-2-20/valia.txt deleted file mode 100644 index d9545bf5..00000000 --- a/npc/008-2-20/valia.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Our beloved Evil Witch Valia. -// THIS IS A PLACEHOLDER! - -008-2-20,32,22,0 script Valia NPC_VALIA,{ - speech - l("Hi!"), - l("You may remember me, I am Valia."); - l("Better stay away from my basement, you may end up like the poor guy down there."); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-21/_import.txt b/npc/008-2-21/_import.txt deleted file mode 100644 index c5594e03..00000000 --- a/npc/008-2-21/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-21: Forsaken Inn Basement -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-21/_mobs.txt", -"npc/008-2-21/_warps.txt", diff --git a/npc/008-2-21/_mobs.txt b/npc/008-2-21/_mobs.txt deleted file mode 100644 index d44662d6..00000000 --- a/npc/008-2-21/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-21: Forsaken Inn Basement mobs -008-2-21,25,38,2,1 monster Mana Ghost 1101,1,75000,250000 diff --git a/npc/008-2-21/_warps.txt b/npc/008-2-21/_warps.txt deleted file mode 100644 index 5dd0f6f5..00000000 --- a/npc/008-2-21/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-21: Forsaken Inn Basement warps -008-2-21,34,26,0 warp #008-2-21_34_26 1,0,008-2-20,35,36 -008-2-21,22,43,0 warp #008-2-21_22_43 0,0,008-1,252,212 diff --git a/npc/008-2-22/_import.txt b/npc/008-2-22/_import.txt deleted file mode 100644 index 3be6edbd..00000000 --- a/npc/008-2-22/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-22: Mages Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-22/_savepoints.txt", -"npc/008-2-22/_warps.txt", diff --git a/npc/008-2-22/_savepoints.txt b/npc/008-2-22/_savepoints.txt deleted file mode 100644 index 1cc5c220..00000000 --- a/npc/008-2-22/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-22: Mages Hut saves -008-2-22,26,31,0 script #save_008-2-22_26_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-22/_warps.txt b/npc/008-2-22/_warps.txt deleted file mode 100644 index c45099dc..00000000 --- a/npc/008-2-22/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-22: Mages Hut warps -008-2-22,30,35,0 warp #008-2-22_30_35 0,0,008-1,122,115 diff --git a/npc/008-2-23/_import.txt b/npc/008-2-23/_import.txt deleted file mode 100644 index feb70f60..00000000 --- a/npc/008-2-23/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-23: Mouboo Farm -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-23/_warps.txt", diff --git a/npc/008-2-23/_warps.txt b/npc/008-2-23/_warps.txt deleted file mode 100644 index 4bd4b6ee..00000000 --- a/npc/008-2-23/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-23: Mouboo Farm warps -008-2-23,52,40,0 warp #008-2-23_52_40 0,0,008-1,71,129 diff --git a/npc/008-2-24/_import.txt b/npc/008-2-24/_import.txt deleted file mode 100644 index 808bd398..00000000 --- a/npc/008-2-24/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-24: Dimond's Cove Ground Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-24/_warps.txt", -"npc/008-2-24/chef.txt", -"npc/008-2-24/troupe-leader.txt", diff --git a/npc/008-2-24/_warps.txt b/npc/008-2-24/_warps.txt deleted file mode 100644 index c72b102d..00000000 --- a/npc/008-2-24/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-24: Dimond's Cove Ground Floor warps -008-2-24,27,24,0 warp #008-2-24_27_24 0,0,008-2-27,44,28 -008-2-24,40,27,0 warp #008-2-24_40_27 2,0,008-2-25,41,27 -008-2-24,32,46,0 warp #008-2-24_32_46 0,0,008-1,106,222 diff --git a/npc/008-2-24/chef.txt b/npc/008-2-24/chef.txt deleted file mode 100644 index a2b8b618..00000000 --- a/npc/008-2-24/chef.txt +++ /dev/null @@ -1,269 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// The nameless chef of Dimond's Cove, lover of pickled beets. - -008-2-24,30,25,0 script Chef#Dimond NPC_CHEF_LEGACY,{ - function deliverFish; - function useYourHead; - function reminderReid; - function recipeBad; - function reminderBakery; - function heyDiabetes; - function reminderSalad; - function deliverSalad; - mesn; - mesq l("I'm too busy right now to talk."); - // TODO: Kadiya Quest - // TODO: Pickled Beets Quest - // (Probably can be mashed together in deliverFish?) - switch (getq(General_Cooking)) { - case 3: - deliverFish(); - break; - case 4: - useYourHead(); - break; - case 5: - case 6: - case 7: - case 8: - case 9: - reminderReid(); - break; - case 10: - recipeBad(); - break; - case 11: - case 12: - case 13: - reminderBakery(); - break; - case 14: - heyDiabetes(); - break; - case 15: - case 16: - reminderSalad(); - break; - case 17: - deliverSalad(); - break; - } - close; - -function deliverFish { - next; - mesn; - mesq l("If you have any business with me, get it over already."); - mes ""; - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - - .@id = requestitem(); - - // If ID is invalid - if (.@id < 1) - return; - - // If there's not enough items, it is bound, it cannot be traded/dropped/sold, etc. - if (countitem(.@id) < 2 || checkbound(.@id)) { - mesc l("You need at least two units of this item for the Chef."); - close; - } - - // Now now now, what have you given to the Chef...? - switch (.@id) { - case CommonCarp: - case GrassCarp: - case Codfish: - case Tuna: - case Trout: - case Salmon: - mesn; - mesq l("...I hate you."); - break; - // Other Quests - //case OrangeCupcake: - //case ChocolateCake: - // Fun items and Easter Eggs - //case PickledBeets: - case Beer: - mesn; - mesq l("Wha - I am not a drunkard, and anyone who says that is lying!"); - break; - case EasterBasket: - mesn; - mesq l("Easter event is over, no pickled beets for you!"); - break; - // Default - default: - mesn; - mesq l("What do you expect me to do with this? GO AWAY!"); - return; - } - delitem .@id, 2; - getexp 1000, 0; - setq1 General_Cooking, 4; - next; - mesn; - mesq l("I'm tired of cooking fish all the time. I used to bake Orange Cupcakes and pickled beets!"); - next; - mesn; - mesq l("But since that damned Oscar stopped supplying me fruits, I'm trapped in fish-cooking."); - useYourHead(); - return; -} - -function useYourHead { - next; - mesn; - mesq l("I'm too busy to cook the %s but I won't teach you the recipe. I still need to make a living after all.", getitemlink(SeafoodPlate)); - next; - select - l("There is no solution for your dilemma."), - l("Maybe if you had a recipe which doesn't needs fruits?"), - l("Maybe if I convinced Oscar to supply you fruits again?"); - mes ""; - if (@menu == 1) { - return; - } else if (@menu == 2) { - mesn; - mesq l("Hmpf! It would need to be worth of Dimond's name! I won't accept a lame %s.", getitemlink(SailorStew)); - setq1 General_Cooking, 5; - reminderReid(); - } else { - mesn; - mesq l("Hah! In case you didn't noticed, Oscar is a mage. A rather good one."); - next; - mesn; - mesq l("He, however, used magic to improve his crops, and the Brotherhood got wind of that. Some stuff about \"transgenic\" or whatever."); - next; - mesn; - mesq l("I mean, this is a magical world, isn't it?! That makes no sense. He probably angered some corrupt officer or whatever."); - next; - mesn; - mesq l("Maybe you can help him get back his job and stuff, I think the whole town would thank you for that. But I need some more immediate solution, not empty idealist promises."); - // TODO: Finish this path so players doesn't have to learn Squirrel Stew - } - return; -} - -function reminderReid { - next; - mesn; - mesq l("You know what, I've heard the chef from Reid's Inn used to be a great chef when they were alive."); - next; - mesn; - mesq l("Maybe they know some great recipe from the parallel dimensions which doesn't need fruits."); - next; - mesn; - mesq l("Learn and share that with me, and only then, I'll teach you the %s recipe for Yannika.", getitemlink(SeafoodPlate)); - return; -} - -/* TODO: “The Cook starts too cook the recipe from Reid's Inn the player gave him but the squirrel he uses is still alive and bites him. He does not want to cook anymore wildlife. Fish stinks, Squirrels bite etc. ... and he does not give away his fish recipe.” */ -function recipeBad { - .@recipe=(getq2(General_Cooking) == CARNIVOROUS ? MoubooStew : SquirrelStew); - mesn; - mesq l("You know what, I've heard the chef from Reid's Inn used to be a great chef when they were alive."); - next; - mesn; - mesq l("Maybe they know some great recipe from the parallel dimensions which doesn't need fruits."); - next; - mesn; - mesq l("Learn and share that with me, and only then, I'll teach you the %s recipe for Yannika.", getitemlink(SeafoodPlate)); - next; - select - l("He teached me the %s recipe.", getitemname(.@recipe)), - l("Alright, I'll be right back."); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("%s? What is even a %s? Are you trying to poison my customers?!", getitemlink(.@recipe), getitemlink(.@recipe)); - next; - mesn; - mesq l("Bah! I should have known better. Of course you would only find weird people in Golbenez's fantasy inn."); - next; - mesn; - mesc l("%s sighs.", .name$); - mesq l("You know what? Maybe I should make some dessert instead. It is perfect, who doesn't likes desserts, anyway?"); - // Well, Ms. Dimond in Moubootaur Legends, who got overweight maybe...? - next; - mesn; - mesq l("Tulimshar has a great bakery - learn their secrets and share with me something sweet and nice. Go already!"); - setq1 General_Cooking, 11; - return; -} - -function reminderBakery { - next; - mesn; - mesc l("%s sighs.", .name$); - mesq l("You know what? Maybe I should make some dessert instead. It is perfect, who doesn't likes desserts, anyway?"); - next; - mesn; - mesq l("Tulimshar has a great bakery - learn their secrets and share with me something sweet and nice. Go already!"); - return; -} - -function heyDiabetes { - mesn; - mesq l("%s, where have you been?! I looked for you everywhere in Hurnscald and couldn't find you!", strcharinfo(0)); - next; - mesn; - mesq l("I remembered I have diabetes, so I wouldn't be able to taste the food! So sweets might be a bad idea!"); - next; - mesn; - mesq l("Also, the doctor told Dimond to lose weight, so salads might be a better choice."); - next; - select - l("WHAT?! I even got a Donut recipe!!"), - l("Okay... Where can I find salad recipe?"), - l("Can't you do it yourself?!"); - mes ""; - if (@menu == 3) { - mesn; - mesq l("Sure I could, but who wants the %s recipe is you, not me. So get to work!", getitemlink(SeafoodPlate)); - next; - } - mesn; - mesq l("Well, you can bake sweets for yourself, they don't require a Plate anyway. As for salad..."); - next; - mesn; - mesq l("I honestly don't know. I mean, we usually export healthy food to Tulimshar; People here aren't so healthy in general."); - next; - mesn; - mesq l("Not sure who in Tulimshar would have money to import that much lettuce and such, but good luck figuring it out!"); - setq1 General_Cooking, 15; - return; -} - -function reminderSalad { - mesn; - mesq l("Not sure who in Tulimshar would have money to import that much lettuce and such, but good luck figuring it out!"); - next; - mesn; - mesq l("Bring me Salad, the healthiest of all foods!"); - return; -} - -function deliverSalad { - mesn; - mesq l("What is that...? Salad! You did it!! Give me the recipe!"); - next; - mesn strcharinfo(0); - mesc l("You give the recipe to the Chef."); - next; - mesn; - mesq l("Here, I'll now teach you the %s recipe. Don't share it with anyone, and good luck cooking one for Yannika! Yoo-hoo!", getitemlink(SeafoodPlate)); - RECIPES[CraftSeafoodPlate]=true; - setq1 General_Cooking, 18; - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-24/troupe-leader.txt b/npc/008-2-24/troupe-leader.txt deleted file mode 100644 index 3311e567..00000000 --- a/npc/008-2-24/troupe-leader.txt +++ /dev/null @@ -1,119 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - talked to inspector (1) <= start -// [1] 3 - talked to old woman (1) -// [1] 4 - talked to old woman (2) -// [1] 5 - talked to inspector (2) -// [1] 6 - talked to troupe leader (1) -// [1] 7 - talked to inspector (3) -// [1] 8 - talked to old man -// [1] 9 - talked to old woman (3) -// [1] 10 - talked to inspector (4) -// [1] 11 - talked to old woman (4) -// [1] 12 - talked to malek -// [1] 13 - searched the bookcase -// [1] 14 - talked to inspector (5) -// [1] 15 - talked to troupe leader (2) <= reward -// [1] 16 - talked to inspector (6) <= reward, end -// [2] unused -// [3] unused -// [t] unused -// Description: -// robberies in hurnscald - -008-2-24,41,39,0 script Troupe Leader NPC_DIMOND,{ - - function nohmask_question { - // XXX: shouldn't the player ask a question before she replies Yes? this feels too abrupt - speech(4, - l("Yes, a mask was stolen from us the last night we were in Hurnscald.")); - - selectd( - l("Any ideas on who might have taken it?"), - l("Are you sure one of your troupe members didn't hide it and commit those robberies?"), - l("Hmm...")); - - switch (@menu) - { - case 1: - speech( - l("Hm..."), - l("I did see an old man hang out near the theater after our last show.")); - close2; - setq(.quest_inspector, 6); - close; - - case 2: - speech( - l("I am absolutely positive."), - l("None of my troupe have left the city since we got here."), - l("Good day!")); - close; - } - - closeclientdialog(); - close; - } - - function nohmask_found { - // XXX: shouldn't the player say "I found your mask" before the npc says thanks? - speech(4, - l("Thank you for finding the mask."), - l("You did such a good job, you should keep it.")); - - if (checkweight(.reward_item, 1) != true) - { - speech(8, - l("It seems you can't carry it right now...")); - close; - } - - setq(.quest_inspector, 15); - quest_xp(.maxLevel, .reward_exp); - getitem(.reward_item, 1); - - speech( - l("We don't need it anymore."), - l("We're doing different shows here.")); - close; - } - - // OnTalk: - switch (getq(.quest_inspector)) - { - case 5: nohmask_question; break; - // XXX: shouldn't it have an in-between state where it says good luck or something? - case 14: nohmask_found; break; - // XXX: shouldn't it have a "completed" state where it says thanks, come back any time? - } - - // initial intro - speech( - l("Hello."), - l("I'm the leader of a traveling theater troupe."), - l("We'll be staying here in Tulimshar for a while.")); - close; - -OnInit: - .reward_item = NohMask; - .reward_exp = 1500; - .maxLevel = 60; - - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_inspector; - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-25/_import.txt b/npc/008-2-25/_import.txt deleted file mode 100644 index 02e36d2e..00000000 --- a/npc/008-2-25/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-25: Dimond's Cove Second Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-25/_warps.txt", diff --git a/npc/008-2-25/_warps.txt b/npc/008-2-25/_warps.txt deleted file mode 100644 index d7199084..00000000 --- a/npc/008-2-25/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-25: Dimond's Cove Second Floor warps -008-2-25,25,27,0 warp #008-2-25_25_27 2,0,008-2-26,23,25 -008-2-25,41,29,0 warp #008-2-25_41_29 2,0,008-2-24,40,30 diff --git a/npc/008-2-26/_import.txt b/npc/008-2-26/_import.txt deleted file mode 100644 index 9b4f3a94..00000000 --- a/npc/008-2-26/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-26: Dimond's Cove Third Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-26/_warps.txt", diff --git a/npc/008-2-26/_warps.txt b/npc/008-2-26/_warps.txt deleted file mode 100644 index e370bcef..00000000 --- a/npc/008-2-26/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-26: Dimond's Cove Third Floor warps -008-2-26,24,27,0 warp #008-2-26_24_27 1,0,008-2-25,25,29 diff --git a/npc/008-2-27/_import.txt b/npc/008-2-27/_import.txt deleted file mode 100644 index 98ec740f..00000000 --- a/npc/008-2-27/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-27: Dimond's Cove Cellar -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-27/_warps.txt", diff --git a/npc/008-2-27/_warps.txt b/npc/008-2-27/_warps.txt deleted file mode 100644 index 350010dc..00000000 --- a/npc/008-2-27/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-27: Dimond's Cove Cellar warps -008-2-27,45,28,0 warp #008-2-27_45_28 0,1,008-2-24,28,24 diff --git a/npc/008-2-28/_import.txt b/npc/008-2-28/_import.txt deleted file mode 100644 index 0510c48c..00000000 --- a/npc/008-2-28/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-28: Big House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-28/_warps.txt", diff --git a/npc/008-2-28/_warps.txt b/npc/008-2-28/_warps.txt deleted file mode 100644 index c83ed168..00000000 --- a/npc/008-2-28/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-28: Big House warps -008-2-28,25,32,0 warp #008-2-28_25_32 0,0,008-1,257,131 diff --git a/npc/008-2-29/_import.txt b/npc/008-2-29/_import.txt deleted file mode 100644 index d708d657..00000000 --- a/npc/008-2-29/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-29: Pool House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-29/_warps.txt", diff --git a/npc/008-2-29/_warps.txt b/npc/008-2-29/_warps.txt deleted file mode 100644 index 40d34697..00000000 --- a/npc/008-2-29/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-29: Pool House warps -008-2-29,37,24,0 warp #008-2-29_37_24 0,0,008-1,234,131 diff --git a/npc/008-2-3/_import.txt b/npc/008-2-3/_import.txt deleted file mode 100644 index 69f68a67..00000000 --- a/npc/008-2-3/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-3: The Rusty Pick -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-3/_savepoints.txt", -"npc/008-2-3/_warps.txt", -"npc/008-2-3/mapflags.txt", diff --git a/npc/008-2-3/_savepoints.txt b/npc/008-2-3/_savepoints.txt deleted file mode 100644 index 4e70dc2e..00000000 --- a/npc/008-2-3/_savepoints.txt +++ /dev/null @@ -1,106 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-3: The Rusty Pick saves -008-2-3,61,31,0 script #save_008-2-3_61_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,60,35,0 script #save_008-2-3_60_35 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,57,31,0 script #save_008-2-3_57_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,57,35,0 script #save_008-2-3_57_35 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,53,35,0 script #save_008-2-3_53_35 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,53,31,0 script #save_008-2-3_53_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,49,31,0 script #save_008-2-3_49_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -008-2-3,49,35,0 script #save_008-2-3_49_35 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, RUSTYPICK_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-3/_warps.txt b/npc/008-2-3/_warps.txt deleted file mode 100644 index 3233aa46..00000000 --- a/npc/008-2-3/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-3: The Rusty Pick warps -008-2-3,67,29,0 warp #008-2-3_67_29 1,0,008-2-2,51,29 diff --git a/npc/008-2-3/mapflags.txt b/npc/008-2-3/mapflags.txt deleted file mode 100644 index 947a2df3..00000000 --- a/npc/008-2-3/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-3 mapflag town diff --git a/npc/008-2-30/_import.txt b/npc/008-2-30/_import.txt deleted file mode 100644 index df7088b9..00000000 --- a/npc/008-2-30/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-30: Hurns Farmhouse -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-30/_warps.txt", diff --git a/npc/008-2-30/_warps.txt b/npc/008-2-30/_warps.txt deleted file mode 100644 index 8afbf1e8..00000000 --- a/npc/008-2-30/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-30: Hurns Farmhouse warps -008-2-30,52,40,0 warp #008-2-30_52_40 0,0,008-1,287,134 diff --git a/npc/008-2-31/_import.txt b/npc/008-2-31/_import.txt deleted file mode 100644 index 7f013b3e..00000000 --- a/npc/008-2-31/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 008-2-31: Kyttys Home -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-31/_warps.txt", diff --git a/npc/008-2-31/_warps.txt b/npc/008-2-31/_warps.txt deleted file mode 100644 index 82846783..00000000 --- a/npc/008-2-31/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-31: Kyttys Home warps -008-2-31,28,25,0 warp #008-2-31_28_25 0,0,008-1,288,125 diff --git a/npc/008-2-32/_import.txt b/npc/008-2-32/_import.txt deleted file mode 100644 index ba8aa591..00000000 --- a/npc/008-2-32/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-32: Merchant House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-32/_warps.txt", -"npc/008-2-32/thamas.txt", diff --git a/npc/008-2-32/_warps.txt b/npc/008-2-32/_warps.txt deleted file mode 100644 index 99f22bd8..00000000 --- a/npc/008-2-32/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-32: Merchant House warps -008-2-32,40,38,0 warp #008-2-32_40_38 0,0,008-1-1,51,58 diff --git a/npc/008-2-32/thamas.txt b/npc/008-2-32/thamas.txt deleted file mode 100644 index 2a338ef1..00000000 --- a/npc/008-2-32/thamas.txt +++ /dev/null @@ -1,83 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Thamas the soldier. -// THIS IS A PLACEHOLDER! - -008-2-32,36,31,0 script Thamas NPC_THAMAS,{ - speech - l("Hi there."), - l("I am a legion soldier who never talks much, until Jesusalva or WildX puts words in my mouth."), - l("However, I can't wait to see animals, er, uncivilized people of these woodlands."), - l("Meh, I'm still with stomach ache due to that stew Morcant is used to cook. Like as I'm not enough nervous about the special mission I've been assigned to."), - //l("I bet he uses squirrels to make that damn stew. Bleah."), - l("Until then, let me be quiet. Talk to you later."); - next; - select - l("Okay, sorry for disturbing."), - l("But you said you remember me!"), - l("What do you think about this stew?"), - l("Where are you from, though? You have an odd... behavior."), - l("What is a legion soldier even doing here? A special mission?"), - l("Who are Jesusalva and WildX?"); - mes ""; - switch (@menu) - { - case 2: - mesn; - mesq l("And I do. We were on the same ship a few times."); - next; - mesn; - mesq l("You stood out and I stayed on my corner. That's all."); - next; - mesn; - mesq l("Stop making questions which make no sense..."); - break; - case 3: - mesn; - mesq l("Eh? It is okay, I guess."); - next; - mesn; - mesq l("I hear if you get a recipe book, you could cook things yourself."); - next; - mesn; - mesq l("Maybe someone in Hurnscald makes these books. I don't really care."); - next; - mesn; - mesq l("Stop making questions which make no sense..."); - break; - case 4: - mesn; - mesq l("I'm from Esperia."); - next; - mesn; - mesq l("It would be tiring to describe the wonders of my hometown."); - next; - mesn; - mesq l("Why don't you look an article about it on this [%s|tour guide%s], instead?", "@@https://wiki.themanaworld.org/index.php/Esperia", "@@"); - next; - mesn; - mesq l("Stop making questions which make no sense..."); - break; - case 5: - mesn; - mesq l("I can't tell you. Captain Hal is in charge so ask him if you really care."); - next; - mesq l("You can find him to the clifftop behind Morcant's house."); - if(!getq(General_CptHal)) setq(General_CptHal,1); // Start Captain Hal quest - break; - case 6: - mesn; - mesq l("Honestly? I don't know."); - next; - mesn; - mesq l("Stop making questions which make no sense..."); - break; - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-4/_import.txt b/npc/008-2-4/_import.txt deleted file mode 100644 index 826aa135..00000000 --- a/npc/008-2-4/_import.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Map 008-2-4: The Rusty Pick -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-4/_savepoints.txt", -"npc/008-2-4/_warps.txt", -"npc/008-2-4/bernard.txt", -"npc/008-2-4/mapflags.txt", -"npc/008-2-4/olana.txt", diff --git a/npc/008-2-4/_savepoints.txt b/npc/008-2-4/_savepoints.txt deleted file mode 100644 index 0129971e..00000000 --- a/npc/008-2-4/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-4: The Rusty Pick saves -008-2-4,25,27,0 script #save_008-2-4_25_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-4/_warps.txt b/npc/008-2-4/_warps.txt deleted file mode 100644 index 2d8336f7..00000000 --- a/npc/008-2-4/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-4: The Rusty Pick warps -008-2-4,44,28,0 warp #008-2-4_44_28 0,0,008-2-2,25,29 diff --git a/npc/008-2-4/bernard.txt b/npc/008-2-4/bernard.txt deleted file mode 100644 index a7cd2382..00000000 --- a/npc/008-2-4/bernard.txt +++ /dev/null @@ -1,222 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Quest states: -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - bernard wants roasted maggot -// [1] 3 - brought maggot -// [1] 4 - bernard wants maggot slime -// [1] 5 - brought maggot slime -// [1] 6 - mikhail needs maggot slime -// [1] 7 - brought maggot slime -// [2] unused -// [3] unused -// [t] unused -// Description: -// Bernard wants to make a maggot slime soup - -008-2-4,34,29,0 script Bernard NPC_BERNARD,{ - - if (BaseLevel < .min_level) - { - npctalk3 generic(16 | 32); - end; - } - - function soup_intro { - if (rand(2) == 1) - { - speech 4, - l("The fields are crawling with maggots."), - l("Where is Mikhail?"), - l("What is taking them so long?"), - l("Could I ask a favor of you?"); - } - else - { - speech 4, - l("The taste of maggots in soup is... unforgettable."), - l("They taste simply divine!"), - l("I sent someone to kill me some maggots and they have yet to return."), - l("Would you help me kill some?"); - } - - if (selectd(l("Yes."), l("No.")) == 2) - { - return; - } - - if (rand(2) == 1) - { - speech 4, - l("Great!"), - l("I need a %s for my soup.", getitemlink(.first_item)); - } - else - { - speech 4, - l("Bring me a %s.", getitemlink(.first_item)), - l("I'll give you something if you do."); - } - - speech 8, - l("Please bring it to me!"); - - setq .quest, 2; - close; - } - - function soup_reminder_roasted { - speech - l("Oh, please hurry and bring me a %s.", getitemlink(.first_item)), - l("I'm yearning for maggot soup!"); - close; - } - - function soup_no_room { - speech 1 | 8, - "...", - l("It seems you don't have room for my reward."), - l("I'll wait until you do."); - close; - } - - function soup_reward_roasted { - speech 4, - l("Oooh, perfect! It's perfect!"), - l("You brought me my %s!", getitemlink(.first_item)), - l("Here, have some %s for your troubles.", - getitemlink(.first_reward_item)); - - if (checkweight(.first_reward_item, .first_reward_amount) != true) - soup_no_room; - - if (countitem(.first_item) < 1) - close; - - delitem .first_item, 1; - quest_item(.maxLevel, .first_reward_item, .first_reward_amount); - quest_xp(.maxLevel, .first_reward_exp); - setq .quest, 3; - - speech 8, - l("Now let's see..."); - close; - } - - function soup_ask_slime { - speech - l("Thank you so much!"), - l("But... something is missing to make the soup creamy."), - l("I need %d %s for that.", - .second_item_qty, getitemlink(.second_item)), - l("Bring them to me, and I'll give you something nice."); - - setq .quest, 4; - close; - } - - function soup_reminder_slime { - speech - l("Please do hurry and bring me %d %s, so I can finish my soup!", - .second_item_qty, getitemlink(.second_item)); - close; - } - - function soup_reward_slime { - speech - l("Nice!"), - l("They're perfect, just perfect!"), - l("You brought me the %d %s!", - .second_item_qty, getitemlink(.second_item)), - l("Here, have some %s as reward.", - getitemlink(.second_reward_item)); - - if (checkweight(.second_reward_item, .second_reward_amount) != true) - soup_no_room; - - if (countitem(.second_item) < .second_item_qty) - close; - - delitem .second_item, .second_item_qty; - quest_item(.maxLevel, .second_reward_item, .second_reward_amount); - quest_xp(.maxLevel, .second_reward_exp); - setq .quest, 5; - - close; - } - - function soup_thanks_slime { - speech - l("I didn't mention it before, but I also put beer in my soup."), - l("I hope you like beer as much as I do, because, you see..."), - l("Beer is life!"); - close; - } - - function soup_thanks_mikhail { - speech - l("My help, Mikhail, finally returned with the slimes I needed."), - l("I wonder what took him so long?"); - close; - } - - - // OnTalk: - switch (getq(.quest)) - { - case 0: - case 1: soup_intro; break; - case 2: - if (countitem(.first_item) < 1) - soup_reminder_roasted; - else - soup_reward_roasted; - break; - case 3: soup_ask_slime; break; - case 4: - if (countitem(.second_item) < .second_item_qty) - soup_reminder_slime; - else - soup_reward_slime; - break; - case 5: - case 6: soup_thanks_slime; break; - default: soup_thanks_mikhail; - } - - closeclientdialog(); - close; - -OnPCLoginEvent: -OnPCBaseLvUpEvent: - if (BaseLevel >= .min_level && getq(.quest) < 1) - { - setq .quest, 1; // allow the player to do the quest - dispbottom l("New quest available: %s (level %d+)", - getquestlink(.quest), .min_level); // XXX: requires new manaplus versions, maybe show a different message for old versions? - } - end; - -OnInit: - .min_level = 10; // min level to do the quest - .maxLevel = 30; - - .first_item = RoastedMaggot; - .first_reward_item = CherryCake; - .first_reward_amount = 5; - .first_reward_exp = 100; - - .second_item = MaggotSlime; - .second_item_qty = 3; - .second_reward_item = Beer; - .second_reward_amount = 3; - .second_reward_exp = 100; - - .quest = HurnscaldQuests_Soup; - .quest_debug = .quest; - .distance = 3; - - end; -} diff --git a/npc/008-2-4/mapflags.txt b/npc/008-2-4/mapflags.txt deleted file mode 100644 index cd86a1e4..00000000 --- a/npc/008-2-4/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-4 mapflag town diff --git a/npc/008-2-4/olana.txt b/npc/008-2-4/olana.txt deleted file mode 100644 index 4c42f599..00000000 --- a/npc/008-2-4/olana.txt +++ /dev/null @@ -1,321 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Alastrim -// Ali-g -// Dark Mage -// Description: -// Olana, the old woman who is looking for her daughter Rossy and Juliet. -// HurnscaldQuests_Rossy -// 0 - Quest Not Assigned -// 1 - Asked to look for Rossy - - -008-2-4,30,28,0 script Olana NPC_OLANA,{ - function olanaIntro; - function olanaIntroDone; - function olanaRossyLie; - function olanaDeliverBerries; - function olanaGetLetter; - function olanaRossyGoodGirl; - function olanaRossyBadMom; - function olanaRossyHappy; - .@q=getq(HurnscaldQuests_Rossy); - if (BaseLevel < .minLevel) - .@q = -1; // Hard Reset - mesn; - mesq l("Oh, a traveler. Welcome."); - next; - switch (.@q) { - case 0: - olanaIntro(); - break; - case 1: - olanaIntroDone(); - break; - case 2: - olanaRossyLie(); - break; - case 3: - mesc l("%s smiles at you, but she still seems preoccupied.", .name$); - next; - mesc l("Rossy was collecting fruits, right? Maybe she has some idea on how to cheer her mother up?"); - break; - case 4: - olanaDeliverBerries(); - break; - case 5: - olanaGetLetter(); - break; - case 6: - case 7: - case 8: - case 9: - mesn; - mesq l("Please bring Hocus' letter to my daughter as fast as you can."); - break; - case 10: - olanaRossyGoodGirl(); - break; - case 11: - mesn; - mesc l("%s says absently-minded, while staring at a portrait of her daughters, Rossy and Juliet:"); - mesq l("Could you do me a favor? Could you bring her %d %s? I am sure she will love them!", 15, getitemlink(ARedRose)); - break; - case 12: - olanaRossyBadMom(); - break; - case 13: - mesn; - mesq l("Please, tell Rossy I am really sorry and buy her Red Tulips instead, the same amount - %d, her age.", 15); - break; - case 14: - olanaRossyHappy(); - break; - case 15: - case 16: - mesn; - mesq l("Where is Juliet? I want to know where she is! Please find her, %s!", strcharinfo(0)); - break; - case 17: - mesn; - mesq l("Juliet got home sound and safe thanks to you, %s. I'll be eternally grateful.", strcharinfo(0)); - next; - mesn; - mesq l("Rossy and Juliet are out there, playing again. Please, feel free to play with them or to come here for a cup of water."); - break; - default: - speech - l("Did you see my daughters Rossy and Juliet, by chance?"), - l("She wasn't at home for two days now. I worry about her!"), - l("If you see her, please tell her to come home."); - } - close; - -function olanaIntro { - mesn; - mesq l("This is a private room from the Rusty Pick. You see, my father owns this inn."); - next; - mesn; - mesq l("I moved to Tulimshar so my daughters – Rossy and Juliet – could learn magic, but we come back to Hurnscald on occasion."); - next; - mesn; - mesc l("Olana suddenly looks very pale and starts to shiver."); - mesq l("Which reminds me - I let my two lovely girls play in the woods nearby but they haven't come back yet!"); - next; - mesn; - mesq l("These forests are not safe; I am afraid they might have wandered in the swamps by accident."); - next; - mesn; - mesq l("Could you pretty please see if they're fine? I can book you this inn for a night after that."); - next; - if (askyesno() == ASK_NO) { - mesn; - mesq l("Well, you *do* look weak, I guess I would get worried if you went after them and ended up lost and on the swamps."); - next; - mesn; - mesq l("But if you change your mind, please, call me again."); - return; - } - mesn; - mesq l("Excellent! I am counting on you!"); - setq HurnscaldQuests_Rossy, 1; - return; -} - -function olanaIntroDone { - mesn; - mesq l("My daughters – Rossy and Juliet – went to play in the woods but haven't come back yet."); - next; - mesn; - mesq l("Could you pretty please see if they're fine? I can book you this inn for a night after that."); - return; -} - -function olanaRossyLie { - mesn; - mesq l("Have you found my daughters yet? %%i"); - next; - select - l("No, sorry, I'll keep looking."), - l("I saw Rossy, she is fine."), - l("Yes, a snail attacked them."); - mes ""; - if (@menu == 1) { - mesn; - mesq l("Please do, I'm worried about them...."); - return; - } - if (@menu == 3) { - mesn; - mesq l("Oh noes!!!!"); - next; - mesc l("%s faints.", .name$); - mesc l("Maybe we could have told her that in a better way."); - return; - } - mesn; - mesq l("Oh you did? That's good. I'm relieved. But what about Juliet?"); - next; - select - l("I haven't found Juliet yet, sorry."), - l("Well, Rossy told both of them were fine..."); - mes ""; - mesn; - mesq l("Ok. They must be playing hide and seek. Thanks again... I can't express how grateful I am."); - next; - setq HurnscaldQuests_Rossy, 3; - mesn; - mesq l("I'll now book you a room on the Inn."); - select - l("Thanks."), - l("Actually, please don't. I do this out of the goodness of my heart."); - mes ""; - // Do not register the inn - if (@menu == 2) { - mesn; - mesq l("Oh... Okay, then!"); - return; - } - // Register the inn - INN_REGISTER = RUSTYPICK_INN; - PC_IS_DEAD = false; - savepoint "008-2-4", 26, 27; - return; -} - -function olanaDeliverBerries { - mesn; - mesq l("Hello there."); - next; - select - l("Erm, hi."), - l("Hi, Rossy asked me to give you this. She says it is a gift from both her and Juliet."); - mes ""; - if (@menu == 1) - return; - mesn; - mesq l("Ohhh... How sweet... Sometimes Rossy impresses me with her kindness. Here... You are spending so much time helping us, and we give nothing back. Take this as a small reward."); - quest_xp(.maxLevel, 2000); - quest_jxp(.maxLevel, 200); - quest_gp(.maxLevel, 10000); - setq HurnscaldQuests_Rossy, 5; - next; - mesn; - mesq l("Could you do me a small favor, though? I know I barely know you, and you must be very busy, but..."); - next; - olanaGetLetter(); - return; -} - -function olanaGetLetter { - mesn; - mesq l("Would you mind giving this letter to my little Rossy? You see, Rossy and Juliet are enrolled at Tulimshar Magic School..."); - next; - mesn; - mesq l("Rossy is doing alchemy, and I received a letter signed by Hocus, the Grandmaster. She did not submit her exam before we travelled, and now she is running out of time..."); - next; - mesn; - mesq l("Pretty please?"); - next; - if (askyesno() == ASK_NO) - return; - mesn; - mesq l("Thank you again. Please, bring it to her as fast as you can."); - setq HurnscaldQuests_Rossy, 6; - return; -} - -function olanaRossyGoodGirl { - mesn strcharinfo(0); - select - l("Rossy passed her exam."); - mes ""; - mesn; - mesq l("That's a relief to hear! I'm so proud of her."); - next; - mesn; - mesq l("Could you do me a favor? Could you bring her %d %s? I am sure she will love them!", 15, getitemlink(ARedRose)); - next; - select - l("Okay, I'll get the roses and give them to her."), - l("What? No way!"); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("I know this won't be enough, but here is %d E to help you.", 50); - next; - mesn; - mesq l("After you get them, please deliver them to my brilliant daughter, Rossy."); - Zeny+=50; - setq HurnscaldQuests_Rossy, 11; - return; -} - -function olanaRossyBadMom { - mesn; - mesq l("Did she like my present?"); - next; - select - l("Sure she did..."), - l("Well, you should have known that your daughter is allergic to roses."); - mes ""; - if (@menu == 1) { - mesn; - mes "%%H"; - return; - } - mesn; - mesq l("Oh, how stupid I am! Here, take some of my money and buy Red Tulips instead, the same amount. Keep the flowers."); - next; - mesn; - mesq l("Please, tell Rossy I am really sorry. My mind was on Juliet when I asked you to bring the red roses — they are her favorite."); - next; - mesn strcharinfo(0); - select - l("I will give her the tulips when I see her."); - mes ""; - mesn; - mesq l("Thank you. And don't forget to tell her that I'm really sorry."); - Zeny+=450; - setq HurnscaldQuests_Rossy, 13; - return; -} - -function olanaRossyHappy { - mesn; - mesq l("So?"); - next; - select - l("Rossy was happy with your gift, and asked me to say you are the nicest mother in the world."); - mes ""; - mesn; - mesq l("I'm so glad to hear that! But, have you seen Juliet too, by any chance?"); - next; - select - l("Erm, no, sorry."), - l("I'm sure she is fine."); - mes ""; - mesn; - mesq l("For some reason, I can't get off my mind she is in danger... Motherly instincts."); - next; - mesn; - mesq l("For now, I should reward you for all your effort thus far."); - .@item=any(Diamond, Ruby, Emerald, Sapphire, Topaz, Amethyst); - inventoryplace .@item, 1; - setq HurnscaldQuests_Rossy, 15; - getitem .@item, 1; - next; - mesn; - mesq l("But please, could you look for Juliet as well? I'm starting to get deeply worried, here."); - return; -} - -OnInit: - .distance = 4; - .minLevel = 40; - .maxLevel = 80; // Differs from Juliet/Rossy - end; -} diff --git a/npc/008-2-5/_import.txt b/npc/008-2-5/_import.txt deleted file mode 100644 index 74e70e1c..00000000 --- a/npc/008-2-5/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-2-5: The Rusty Pick -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-5/_warps.txt", -"npc/008-2-5/mapflags.txt", diff --git a/npc/008-2-5/_warps.txt b/npc/008-2-5/_warps.txt deleted file mode 100644 index 21b7f527..00000000 --- a/npc/008-2-5/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-5: The Rusty Pick warps -008-2-5,24,24,0 warp #008-2-5_24_24 0,0,008-2-2,52,31 diff --git a/npc/008-2-5/mapflags.txt b/npc/008-2-5/mapflags.txt deleted file mode 100644 index 435dd353..00000000 --- a/npc/008-2-5/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-5 mapflag town diff --git a/npc/008-2-6/_import.txt b/npc/008-2-6/_import.txt deleted file mode 100644 index 38c19068..00000000 --- a/npc/008-2-6/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-2-6: Two Guys One Bed -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-6/_warps.txt", -"npc/008-2-6/alan.txt", -"npc/008-2-6/donald.txt", -"npc/008-2-6/mapflags.txt", diff --git a/npc/008-2-6/_warps.txt b/npc/008-2-6/_warps.txt deleted file mode 100644 index ed2e74a0..00000000 --- a/npc/008-2-6/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-6: Two Guys One Bed warps -008-2-6,27,34,0 warp #008-2-6_27_34 0,0,008-1,260,106 diff --git a/npc/008-2-6/alan.txt b/npc/008-2-6/alan.txt deleted file mode 100644 index a439c91a..00000000 --- a/npc/008-2-6/alan.txt +++ /dev/null @@ -1,311 +0,0 @@ -// Evol scripts. -// Author: -// Jesusalva -// Micksha -// Description: -// Alan the bow-maker. -// Quest states (forest bow): -// [1] 0 - cannot do the quest -// [1] 1 - can do the quest -// [1] 2 - alan wants to ask jack -// [1] 3 - jack explained problem -// [1] 4 - alan asks to find wood -// [1] 5 - found perfect wood -// [1] 6 - got the bow -// [2] fail count -// [3] unused -// [t] unused - -008-2-6,31,26,0 script Alan NPC_YOUNG_MAN_KFAHR,{ - - function bow_intro { - speech(4, - l("When you want to buy something then please speak to my apprentice."), - l("I am only doing special requests.")); - - selectd( - l("OK, thanks."), - rif(BaseLevel >= .min_level, l("Can you make me a really good bow?")), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange recently that might be connected to the robberies?"))); - - switch (@menu) - { - case 1: closeclientdialog(); close; - case 3: speech(l("No.")); close; - } - - speech(4, - l("You mean like one of my legendary forest bows?")); - - selectd( - l("Yes, that would be nice.")); - - speech(4, - l("Sorry, I am not making these anymore.")); - - selectd( - l("Oh, too bad."), - l("What? Why not?")); - - if (@menu == 1) { - closeclientdialog(); - close; - } - - speech(4, - l("The problem is that I am short of material."), - l("My forestbows are not made of regular wood, you know."), - l("They are made of special living wood."), - l("And only the best logs of living wood are good enough for them."), - l("I used to get these logs from Jack, the handsome lumberjack."), - l("But the last time I asked him for a new delivery he said that he would never again get any for me.")); - - selectd( - l("Too bad."), - l("Did you ask him why?")); - - if (@menu == 1) { - closeclientdialog(); - close; - } - - speech(4, - l("Sure I did."), - l("But he just told me to leave him alone."), - l("Maybe you could ask him what's wrong?")); - - selectd( - l("OK, I'll ask him."), - l("I am sure he got his reasons.")); - - setq(.quest_bow, 2); - closeclientdialog(); - close; - } - - function bow_reminder { - if (getq(.quest_inspector) == 2) - { - speech(4, - l("Did you already ask Jack why he won't deliver me any more living wood?")); - - selectd( - l("Have you seen anything strange recently that might be connected to the robberies?")); - - speech(l("No.")); - close; - } - - npctalk3(l("Did you already ask Jack why he won't deliver me any more living wood?")); - end; - } - - function bow_explain { - speech(4, - l("Did you already ask Jack why he won't deliver me any more living wood?")); - - selectd( - l("Yes, I did. He said that the trees turned into dangerous monsters."), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange recently that might be connected to the robberies?"))); - - if (@menu != 1) - { - speech(l("No.")); - close; - } - - speech( - l("Oh, that's really bad news."), - l("Maybe you can do his job?"), - l("If you kill some of these tree monsters and bring me their wood I could take a look at them."), - l("Maybe you will find a piece of wood that is strong enough to become one of my forest bows.")); - - close2; - setq(.quest_bow, 4); - end; - } - - function bow_make { - speech(4, - l("I can make you a really nice forest bow out of this."), - l("I just need %s E for material and work time.", - format_number(.req_esp))); - - selectd( - l("%s??? What a ripoff!", format_number(.req_esp)), - rif(Zeny >= .req_esp, l("Sure, here you go!")), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange recently that might be connected to the robberies?"))); - - switch (@menu) - { - case 1: speech(l("Fine, I'll just hold on to this log should you ever change your mind.")); close; - case 3: speech(l("No.")); close; - } - - // XXX: maybe here we could make the player wait real-world hours for Alan to finish? - - if (checkweight(.reward_item, 1) != true) - { - speech( - l("It seems you can't carry the bow right now."), - l("Go clean up your inventory and come back.")); - close; - } - - if (Zeny < .req_esp) - close; // double-check - - setq(.quest_bow, 6); - Zeny -= .req_esp; - getitem(.reward_item, 1); - quest_xp(.maxLevel, .reward_exp); - - speech( - l("Here you go - have fun with it.")); - close; - } - - function bow_check_wood { - speech(4, - l("How is the hunt going?"), - l("Did you bring me any wood?")); - - selectd( - l("No, sorry."), - rif(countitem(.req_item) >= 1, l("Here, take a look!")), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange recently that might be connected to the robberies?"))); - - switch (@menu) - { - case 1: closeclientdialog(); close; - case 3: speech(l("No.")); close; - } - - .@first = true; - - do { - if (countitem(.req_item) < 1) - break; - - if (.@first == false) - { - narrator(4, - l("You hand him another log.")); - } - - delitem(.req_item, 1); - .@first = false; - - speech(4, - l("Hmmm... looks ok, but is it strong enough?")); - - narrator(4, - l("Alan bends the log over his knee.")); - - .@fails=getq2(.quest_bow); - if (rand(.minfail, .maxfail) - .@fails <= 0) - { - narrator(4 | 8, - l("Alan tries as hard as he can but the log won't bend.")); - - speech(4, - l("Aaah!"), - l("Yes!"), - l("That is a really fine piece of wood you brought me."), - l("It will make an excellent bow!")); - - setq(.quest_bow, 5); - setq(.quest_shield, 1); - - narrator(4, - l("He proceeds to further scrutinize the log.")); - - bow_make; - end; - } - setq2(.quest_bow, .@fails+1); - - narrator(4 | 8, - l("The log breaks with a loud crack.")); - - speech(4, - l("Sorry, this log was too weak for one of my forest bows."), - l("Now it is junk."), - l("Do you wish to try again?")); - - selectd( - l("Sure, here you go."), - l("Hey! Stop breaking my stuff!")); - - if (@menu != 1) { - closeclientdialog(); - close; - } - - } while (true); - - speech(l("It seems you have no wood left.")); - close; - } - - function bow_done { - speech(4, - l("I hope you are satisfied with your forest bow."), - l("It is one of my best works.")); - - selectd( - l("I am!"), - rif(getq(.quest_inspector) == 2, l("Have you seen anything strange recently that might be connected to the robberies?"))); - - switch (@menu) - { - case 2: speech(l("No.")); close; - default: closeclientdialog(); close; - } - } - - // OnTalk: - switch (getq(.quest_bow)) - { - case 0: - case 1: bow_intro; break; - case 2: bow_reminder; break; - case 3: bow_explain; break; - case 4: bow_check_wood; break; - case 5: bow_make; break; - default: bow_done; break; - } - - closeclientdialog(); - close; - -OnPCLoginEvent: -OnPCBaseLvUpEvent: - if (BaseLevel >= .min_level && getq(.quest_bow) < 1) - { - setq(.quest_bow, 1); // allow the player to do the quest - dispbottom(l("New quest available: %s (level %d+)", - getquestlink(.quest_bow), .min_level)); // XXX: requires new manaplus versions, maybe show a different message for old versions? - } - end; - -OnInit: - .min_level = 25; // min level to do the quest - .maxLevel = 50; // max level to obtain full rewards - - .req_item = RawLog; // item required to make the bow - .req_esp = 10000; // amount of Esperin required to make the bow - .reward_item = ForestBow; // quest reward (item) - .reward_exp = 500; // quest reward (exp) - - // one in X chances to get a perfect log - .minfail = 10; - .maxfail = 30; - - .quest_bow = HurnscaldQuests_ForestBow; - .quest_shield = HurnscaldQuests_WoodenShield; - .quest_inspector = HurnscaldQuests_Inspector; - .quest_debug = .quest_bow; - .distance = 3; - end; -} diff --git a/npc/008-2-6/donald.txt b/npc/008-2-6/donald.txt deleted file mode 100644 index 5c75896e..00000000 --- a/npc/008-2-6/donald.txt +++ /dev/null @@ -1,39 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Alan's Apprentice. - -008-2-6,29,27,0 script Donald NPC_YOUNG_MAN_APPRENTICE,{ - if (shopcount(TrainingArrow) <= 0 && shopcount(IronArrow) <= 0) { - speech - l("Good day."), - l("Sorry, we are sold out for today."), - l("Come back later."); - - } else { - speech - l("Good day."), - l("We got new supplies of arrows!"); - - next; - - closeclientdialog; - shop .name$; - } - - close; - -OnInit: - .distance = 4; - tradertype(NST_MARKET); - - sellitem TrainingArrow, -1, 20000+rand2(5000); - sellitem IronArrow, -1, 20000+rand2(5000); - end; - -OnClock0002: - restoreshopitem TrainingArrow, 20000+rand2(5000); - restoreshopitem IronArrow, 20000+rand2(5000); - end; -} diff --git a/npc/008-2-6/mapflags.txt b/npc/008-2-6/mapflags.txt deleted file mode 100644 index c07673a4..00000000 --- a/npc/008-2-6/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-6 mapflag town diff --git a/npc/008-2-7/_import.txt b/npc/008-2-7/_import.txt deleted file mode 100644 index d3391d83..00000000 --- a/npc/008-2-7/_import.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Map 008-2-7: Hurnscald Apothecary -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-7/_savepoints.txt", -"npc/008-2-7/_warps.txt", -"npc/008-2-7/mapflags.txt", -"npc/008-2-7/shop.txt", -"npc/008-2-7/simon.txt", -"npc/008-2-7/wyara.txt", diff --git a/npc/008-2-7/_savepoints.txt b/npc/008-2-7/_savepoints.txt deleted file mode 100644 index ab8ddbb4..00000000 --- a/npc/008-2-7/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-7: Hurnscald Apothecary saves -008-2-7,25,27,0 script #save_008-2-7_25_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-7/_warps.txt b/npc/008-2-7/_warps.txt deleted file mode 100644 index ffd0f758..00000000 --- a/npc/008-2-7/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-7: Hurnscald Apothecary warps -008-2-7,36,30,0 warp #008-2-7_36_30 0,0,008-1,272,103 diff --git a/npc/008-2-7/mapflags.txt b/npc/008-2-7/mapflags.txt deleted file mode 100644 index caeb89e9..00000000 --- a/npc/008-2-7/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-7 mapflag town diff --git a/npc/008-2-7/shop.txt b/npc/008-2-7/shop.txt deleted file mode 100644 index 3771978a..00000000 --- a/npc/008-2-7/shop.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Micksha -// Reid -// toams -// Description: -// Simons Potion Shop. - -008-2-7,30,26,0 trader #Invisible008-2-7 NPC_HIDDEN,{ - -OnInit: - tradertype(NST_MARKET); - - sellitem SmallHealing, -1, 10; - sellitem MediumHealing, -1, 5; - sellitem SmallMana, -1, 10; - sellitem MediumMana, -1, 5; - sellitem ConcPotion, -1, 3; - sellitem IronPotion, -1, 3; - - .distance = 4; - end; - -OnClock0000: -OnClock0800: -OnClock1600: - restoreshopitem SmallHealing, 10; - restoreshopitem MediumHealing, 5; - restoreshopitem SmallMana, 10; - restoreshopitem MediumMana, 5; - restoreshopitem ConcPotion, 3; - restoreshopitem IronPotion, 3; - end; -} diff --git a/npc/008-2-7/simon.txt b/npc/008-2-7/simon.txt deleted file mode 100644 index 8562199a..00000000 --- a/npc/008-2-7/simon.txt +++ /dev/null @@ -1,38 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Simon, Wyaras Apprentice. -// THIS IS A PLACEHOLDER! - -008-2-7,30,26,0 script Simon NPC_SIMON,{ - speech - l("Hi, I am Simon."), - l("I am Wyaras apprentice, helping her with selling her potions."), - l("I would prefer becoming a real Sorcerer one time. *sighs*"); - - switch (select(l("Potions? That sounds useful. What do you have?"), - l("Thats your problem, really."), - l("Becoming a Sorcerer? I want that too!"))) - { - case 1: - closeclientdialog; - shop "#Invisible008-2-7"; - close; - case 2: - speech S_FIRST_BLANK_LINE, - l("Leave me alone."); - close; - case 3: - speech S_FIRST_BLANK_LINE, - l("It needs so much training, but Wyara only leaves me here, standing and selling something instead of teaching me."); - close; - } - - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-7/wyara.txt b/npc/008-2-7/wyara.txt deleted file mode 100644 index 7bac6efc..00000000 --- a/npc/008-2-7/wyara.txt +++ /dev/null @@ -1,29 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Wyara the witch. -// TODO: Buy or make plushroom potions - -008-2-7,27,28,0 script Wyara NPC_DARK_DRUID,{ - speech - l("What? Is there someone?"), - l("Please, leave me alone. I have to pixel- erm, brew potions."), - l("I will sell some when you return a bit later."), - l("Unless you are interested in a status reset?"); - next; - select - l("I'm fine, thanks."), - l("I actually could use a status reset!"); - mes ""; - switch (@menu) { - case 2: - ConfirmStatusReset(); - break; - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-2-8/_import.txt b/npc/008-2-8/_import.txt deleted file mode 100644 index 8bb44bb1..00000000 --- a/npc/008-2-8/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-2-8: Hurnscald Forge -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-8/_warps.txt", -"npc/008-2-8/macgowan.txt", -"npc/008-2-8/mapflags.txt", -"npc/008-2-8/nicholas.txt", diff --git a/npc/008-2-8/_warps.txt b/npc/008-2-8/_warps.txt deleted file mode 100644 index ca801b84..00000000 --- a/npc/008-2-8/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-8: Hurnscald Forge warps -008-2-8,37,39,0 warp #008-2-8_37_39 1,0,008-1,292,119 -008-2-8,26,29,0 warp #008-2-8_26_29 0,0,008-1,287,114 diff --git a/npc/008-2-8/macgowan.txt b/npc/008-2-8/macgowan.txt deleted file mode 100644 index efeee33e..00000000 --- a/npc/008-2-8/macgowan.txt +++ /dev/null @@ -1,24 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Smith's apprentice. -// THIS IS A PLACEHOLDER! - -008-2-8,38,29,0 script Macgowan NPC_YOUNG_MAN_APPRENTICE,{ - npctalk3(l("Hello, I am Macgowan, apprentice to Nicholas.")); - end; - -OnInit: - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-8/mapflags.txt b/npc/008-2-8/mapflags.txt deleted file mode 100644 index 2bdbedb9..00000000 --- a/npc/008-2-8/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-8 mapflag town diff --git a/npc/008-2-8/nicholas.txt b/npc/008-2-8/nicholas.txt deleted file mode 100644 index 7b62090d..00000000 --- a/npc/008-2-8/nicholas.txt +++ /dev/null @@ -1,28 +0,0 @@ -// Evol scripts. -// Author: -// gumi, Micksha -// Description: -// Nicholas the Smith. - -008-2-8,40,27,0 script Nicholas NPC_NICHOLAS,{ - speech( - l("Hello, there!"), - l("I'm an expert blacksmith."), - l("If you get me some Coal and Iron Ingots, I could make you a very valuable shield or helmet.")); - - // TODO: setzer quest - close; - -OnInit: - .distance = 3; - -////////// UNFINISHED ////////// -//////////////////////////////// -// REMOVE THIS CODE WHEN THIS // -// NPC IS NO LONGER A WIP ////// -//////////////////////////////// -//if (!debug) disablenpc(.name$); -///////// UNFINISHED /////////// - - end; -} diff --git a/npc/008-2-9/_import.txt b/npc/008-2-9/_import.txt deleted file mode 100644 index aade14bd..00000000 --- a/npc/008-2-9/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-2-9: Jack's Abode -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-2-9/_savepoints.txt", -"npc/008-2-9/_warps.txt", -"npc/008-2-9/mapflags.txt", diff --git a/npc/008-2-9/_savepoints.txt b/npc/008-2-9/_savepoints.txt deleted file mode 100644 index b606d73c..00000000 --- a/npc/008-2-9/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-9: Jack's Abode saves -008-2-9,26,31,0 script #save_008-2-9_26_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/008-2-9/_warps.txt b/npc/008-2-9/_warps.txt deleted file mode 100644 index 71ae1413..00000000 --- a/npc/008-2-9/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-2-9: Jack's Abode warps -008-2-9,30,35,0 warp #008-2-9_30_35 0,0,008-1,243,116 diff --git a/npc/008-2-9/mapflags.txt b/npc/008-2-9/mapflags.txt deleted file mode 100644 index e637ae03..00000000 --- a/npc/008-2-9/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -008-2-9 mapflag town diff --git a/npc/008-3-0/_import.txt b/npc/008-3-0/_import.txt deleted file mode 100644 index 4ff9254d..00000000 --- a/npc/008-3-0/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 008-3-0: Rossy Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-0/_mobs.txt", -"npc/008-3-0/_warps.txt", -"npc/008-3-0/clauquer.txt", -"npc/008-3-0/juliet.txt", diff --git a/npc/008-3-0/_mobs.txt b/npc/008-3-0/_mobs.txt deleted file mode 100644 index 06015caf..00000000 --- a/npc/008-3-0/_mobs.txt +++ /dev/null @@ -1,83 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-0: Rossy Cave mobs -008-3-0,30,113,7,14 monster Cave Maggot 1027,5,500,2000 -008-3-0,102,116,14,8 monster Cave Maggot 1027,5,500,2000 -008-3-0,79,144,10,6 monster Cave Maggot 1027,7,500,2000 -008-3-0,158,87,10,12 monster Cave Maggot 1027,7,500,2000 -008-3-0,34,28,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,160,124,5,3 monster Ratto 1005,4,35000,15000 -008-3-0,155,163,1,7 monster Ratto 1005,4,35000,15000 -008-3-0,128,146,5,3 monster Ratto 1005,4,35000,15000 -008-3-0,120,61,5,3 monster Ratto 1005,4,35000,15000 -008-3-0,138,64,10,7 monster Crafty 1018,10,1000,120000 -008-3-0,129,102,11,6 monster Crafty 1018,6,1000,120000 -008-3-0,67,114,10,2 monster Spider 1044,3,4000,8000 -008-3-0,109,145,4,10 monster Spider 1044,5,4000,8000 -008-3-0,68,84,3,7 monster Spider 1044,4,4000,8000 -008-3-0,80,169,0,0 monster Diamond Vein 1045,1,600000,60000 -008-3-0,118,96,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,131,93,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-0,119,101,0,0 monster Gold Veinbloc 1070,1,600000,60000 -008-3-0,113,60,23,8 monster Cave Maggot 1027,7,500,2000 -008-3-0,199,68,8,9 monster Crafty 1018,5,1000,60000 -008-3-0,160,47,17,5 monster Crafty 1018,5,1000,120000 -008-3-0,119,200,20,4 monster Spider 1044,5,4000,8000 -008-3-0,34,193,11,9 monster Spider 1044,5,4000,8000 -008-3-0,26,115,5,17 monster Spider 1044,5,4000,8000 -008-3-0,82,60,21,7 monster Cave Maggot 1027,5,500,2000 -008-3-0,38,193,16,4 monster Cave Maggot 1027,5,500,2000 -008-3-0,114,199,12,3 monster Ratto 1005,4,35000,15000 -008-3-0,106,30,10,7 monster Crafty 1018,5,1000,120000 -008-3-0,78,128,11,21 monster Ratto 1005,4,35000,15000 -008-3-0,117,141,35,11 monster Crafty 1018,10,1000,120000 -008-3-0,117,101,18,11 monster Ratto 1005,7,35000,15000 -008-3-0,130,88,0,0 monster Ruby Vein 1051,1,600000,60000 -008-3-0,122,94,0,0 monster Ruby Vein 1051,1,600000,60000 -008-3-0,31,181,0,0 monster Sapphire Vein 1053,1,600000,60000 -008-3-0,31,198,0,0 monster Sapphire Vein 1053,1,600000,60000 -008-3-0,135,127,0,0 monster Topaz Vein 1054,1,600000,60000 -008-3-0,120,125,0,0 monster Topaz Vein 1054,1,600000,60000 -008-3-0,31,112,0,0 monster Amethyst Vein 1055,1,600000,60000 -008-3-0,24,123,0,0 monster Amethyst Vein 1055,1,600000,60000 -008-3-0,193,123,0,0 monster Emerald Vein 1052,1,600000,60000 -008-3-0,204,116,0,0 monster Emerald Vein 1052,1,600000,60000 -008-3-0,89,168,0,0 monster Diamond Vein 1045,1,600000,60000 -008-3-0,132,192,0,0 monster Sapphire Vein 1053,1,600000,60000 -008-3-0,39,174,0,0 monster Amethyst Vein 1055,1,600000,60000 -008-3-0,44,174,0,0 monster Topaz Vein 1054,1,600000,60000 -008-3-0,118,196,0,0 monster Emerald Vein 1052,1,600000,60000 -008-3-0,65,105,0,0 monster Diamond Vein 1045,1,600000,60000 -008-3-0,143,139,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,156,121,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,155,166,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,125,162,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,107,141,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,77,148,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,62,119,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,162,95,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-0,157,66,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-0,112,60,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-0,66,54,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-0,63,91,0,0 monster Gold Veinbloc 1070,1,600000,60000 -008-3-0,76,127,0,0 monster Gold Veinbloc 1070,1,600000,60000 -008-3-0,111,148,0,0 monster Gold Veinbloc 1070,1,600000,60000 -008-3-0,101,27,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,165,28,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,199,67,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,199,109,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,197,194,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,133,199,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,34,194,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,26,111,3,4 monster Poison Skull 1100,1,35000,60000 -008-3-0,88,48,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,100,49,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,130,44,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,67,47,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,124,94,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,158,60,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-0,56,53,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-0,55,98,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-0,62,103,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-0,69,125,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-0,62,153,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-0,96,145,0,0 monster Iron Vein 1047,1,600000,60000 diff --git a/npc/008-3-0/_warps.txt b/npc/008-3-0/_warps.txt deleted file mode 100644 index 74a3623b..00000000 --- a/npc/008-3-0/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-0: Rossy Cave warps -008-3-0,130,113,0 warp #008-3-0_130_113 1,0,008-1,49,158 diff --git a/npc/008-3-0/clauquer.txt b/npc/008-3-0/clauquer.txt deleted file mode 100644 index 845596d7..00000000 --- a/npc/008-3-0/clauquer.txt +++ /dev/null @@ -1,138 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Shaddy man - -008-3-0,129,94,0 script Clauquer NPC_CAUL,{ - function clauquerPrologue; - - // HurnscaldQuests_Rossy - // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL) - .@q=getq(HurnscaldQuests_Rossy); - .@q2=getq2(HurnscaldQuests_Rossy); - .@inst=getq3(HurnscaldQuests_Rossy); - - // Instance zero is reserved for La Marine - if (instance_id() <= 0 || .@q != 16) { - mesn; - mesq l("Huh? Why are you here? Get out."); - close; - } - mesn; - mesq l("Hello stranger, are you lost?"); - if (.@q < 16) - close; - if (!.@q2) { - clauquerPrologue(); - close; - } - next; - .@caves=bitmask_count(.@q2)-1; - mesn; - if (.@q2 > ROSSY_BOSSCAVE || .@q > 16) - .@msg$=l("Good job rescuing the little girl!"); - else if (.@q2 == ROSSY_READY) - .@msg$=l("I am amazed... You eliminated all the 9 energy sources. Now is the difficult part. To save the girl, you need to eliminate the last and most powerful barrier. Good Luck!"); - else if (.@q2 <= ROSSY_PROLOGUE) - .@msg$=l("Well... You didn't eliminate any of the barriers, so that means there are still 9 caves and the tenth one, the strongest..."); - else - .@msg$=l("You are doing good... If I am right, you already eliminated %d of the 9 energy sources of the barrier that protects the cave in which the girl is being kept captive.", .@caves); - - mesq .@msg$; - if (.@q == 16 && .@caves < ROSSY_BOSSCAVE) { - next; - select - l("Thanks."), - l("But please, I really need your help!"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Well, I already told you what I knew, but repeating never hurts, I guess. So, to nullify the barrier."); - next; - clauquerPrologue(); - } - } - close; - -function clauquerPrologue { - // HurnscaldQuests_Rossy - // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL) - .@q=getq(HurnscaldQuests_Rossy); - .@q2=getq2(HurnscaldQuests_Rossy); - .@inst=getq3(HurnscaldQuests_Rossy); - - // Prologue - if (!(.@q2 & ROSSY_PROLOGUE)) { - next; - mesn; - mesq l("Don't answer— I know you are looking for someone... A little girl, is that right?"); - next; - select - l("I must admit you're right, but how come you..."), - l("I'm not lost and I don't need help, bye."); - mes ""; - if (@menu == 2) - return; - mesn; - mesq l("How do I know you're looking for her? Well, because I am a very good observer. I know you were helping her family. Besides, I saw the little girl. I also heard her. She screamed, and probably still screams like hell. Moreover, I don't think you would enter these caves just for fun!"); - next; - select l("Of course not."); - mes ""; - mesn; - mesq l("I can see that you really want to save the little girl. She is trapped in a place inside one of these caves, protected by a magic barrier created by a fey spirit. To save her, you have to annulate the energy sources of this barrier. They are located in 10 different spots, each one in a different cave."); - next; - select l("But how can I annulate this barrier?"); - mes ""; - } - // Common - mesn; - mesq l("It is simple, you just have to place a %s on the exact center of the energy source. Once you do this, its entire power will transmute into some terrible earth monsters. If you defeat them, this source of energy will be close to nothing and the barrier will be weaker.", getitemlink(PileOfAsh)); - next; - mesn; - mesq l("If my observations are correct, the girl is trapped in a cave protected by a barrier fed by 9 different power sources. And inside this cave there is another barrier, fed by a single, but very strong, power source. The girl is inside that cave, protected by that strong barrier."); - next; - mesn; - mesq l("Be prepared before you enter one of these caves, because once you put the root in the power source, you won't be able to get out. Also, remember that you can't stay in these caves for a long time, because of the foul air."); - mesc l("If you take more than %d minutes between a boss fight and other, you'll faint and the quest will reset!!", 20), 1; - next; - // Prologue (FIXME) - if (!(.@q2 & ROSSY_PROLOGUE)) { - mesn; - mesq l("Now I should tell you more about how that little girl got into that cave and warn you about what you are going to face there..."); - next; - select l("Please go on."); - mes ""; - mesn; - mesq l("I advise you to be mentally prepared for this rescue operation. You'll be fighting a selection of monsters in these caves with mixed elements."); - next; - mesn; - mesq l("Also, the old tales of Hurnscald say that a Golem inhabits these caves and smashes anyone who enters here ill prepared; but it can be tamed and made into subservience by a sacrifice. And I saw the girl heading to said room..."); - next; - mesn; - mesq l("However, hope is not yet lost. If you were to, say, defeat the Golem before it is fully awakened, the girl would be saved... Time, however, is not on your favor and is of essence. And I am no fighter, so I cannot help you."); - next; - } - mesn; - mesq l("Oh, and if you really plan to rescue the girl, I advise you to use potions for every single battle. I'm thinking of Concentration and Iron Potions. You might want to take some food with you too. I would personally take some water, I'm always thirsty. Don't be afraid to bring too much with you, these battles take time to end."); - next; - mesn; - mesq l("I think you're now ready to explore these caves and fight. Good luck rescuing the girl!"); - - // Renew the timer the first time you see the prologue - if (!.@q2) { - instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst); - addtimer2(300000, "#RossyQuest::OnTick1"); - deltimer("#RossyQuest::OnTick2"); - deltimer("#RossyQuest::OnTick3"); - deltimer("#RossyQuest::OnTick4"); - deltimer("#RossyQuest::OnTick5"); - } - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_PROLOGUE; - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-3-0/juliet.txt b/npc/008-3-0/juliet.txt deleted file mode 100644 index e0d256be..00000000 --- a/npc/008-3-0/juliet.txt +++ /dev/null @@ -1,656 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Core for rescuing Juliet. -// Named as "Juliet" so `pluma npc/*/juliet.txt` resolves to something tangible. -008-3-0 mapflag nosave 008-1-1,49,158 - -008-3-0,92,89,0 script Summoning Altar#Rossy NPC_NO_SPRITE,{ - .@q2=getq2(HurnscaldQuests_Rossy); - // Not ready - if (.@q2 < ROSSY_READY) { - mesn; - mesq l("Better not touch this."); - close; - } - // Complete - if (.@q2 & ROSSY_BOSSCAVE) { - dispbottom l("You find someone hiding behind the altar."); - enablenpc instance_npcname("Juliet"); - disablenpc instance_npcname("Summoning Altar#Rossy"); - end; - } - // Battle - mesc l("This is the boss room! Be prepared for the worst!!"), 1; - callfunc("RossyCave", ROSSY_BOSSCAVE); - close; - -OnInit: - .distance = 4; - end; - -// Time to configure the map -OnInstanceInit: - .@m$=instance_mapname("008-3-0"); - // Rebuild spawns - // WARNING: Originals were generated automatically! - // print('\tareamonster(.@m$, %d, %d, %d, %d, strmobinfo(1, %s), %s, %d);' % (obj.x, obj.y, obj.x+obj.w, obj.y+obj.h, obj.name.replace(' ', ''), obj.name.replace(' ', ''), obj.max_beings)) - areamonster(.@m$, 30, 113, 37, 127, strmobinfo(1, CaveMaggot), CaveMaggot, 5); - areamonster(.@m$, 102, 116, 116, 124, strmobinfo(1, CaveMaggot), CaveMaggot, 5); - areamonster(.@m$, 79, 144, 89, 150, strmobinfo(1, CaveMaggot), CaveMaggot, 7); - areamonster(.@m$, 158, 87, 168, 99, strmobinfo(1, CaveMaggot), CaveMaggot, 7); - areamonster(.@m$, 34, 28, 37, 32, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 160, 124, 165, 127, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 155, 163, 156, 170, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 128, 146, 133, 149, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 120, 61, 125, 64, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 138, 64, 148, 71, strmobinfo(1, Crafty), Crafty, 10); - areamonster(.@m$, 129, 102, 140, 108, strmobinfo(1, Crafty), Crafty, 6); - areamonster(.@m$, 67, 114, 77, 116, strmobinfo(1, Spider), Spider, 3); - areamonster(.@m$, 109, 145, 113, 155, strmobinfo(1, Spider), Spider, 5); - areamonster(.@m$, 68, 84, 71, 91, strmobinfo(1, Spider), Spider, 4); - areamonster(.@m$, 80, 169, 80, 169, strmobinfo(1, DiamondVein), DiamondVein, 1); - areamonster(.@m$, 118, 96, 118, 96, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 131, 93, 131, 93, strmobinfo(1, CoalVeinbloc), CoalVeinbloc, 1); - areamonster(.@m$, 119, 101, 119, 101, strmobinfo(1, GoldVeinbloc), GoldVeinbloc, 1); - areamonster(.@m$, 113, 60, 136, 68, strmobinfo(1, CaveMaggot), CaveMaggot, 7); - areamonster(.@m$, 199, 68, 207, 77, strmobinfo(1, Crafty), Crafty, 5); - areamonster(.@m$, 160, 47, 177, 52, strmobinfo(1, Crafty), Crafty, 5); - areamonster(.@m$, 119, 200, 139, 204, strmobinfo(1, Spider), Spider, 5); - areamonster(.@m$, 34, 193, 45, 202, strmobinfo(1, Spider), Spider, 5); - areamonster(.@m$, 26, 115, 31, 132, strmobinfo(1, Spider), Spider, 5); - areamonster(.@m$, 82, 60, 103, 67, strmobinfo(1, CaveMaggot), CaveMaggot, 5); - areamonster(.@m$, 38, 193, 54, 197, strmobinfo(1, CaveMaggot), CaveMaggot, 5); - areamonster(.@m$, 114, 199, 126, 202, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 106, 30, 116, 37, strmobinfo(1, Crafty), Crafty, 5); - areamonster(.@m$, 78, 128, 89, 149, strmobinfo(1, Ratto), Ratto, 4); - areamonster(.@m$, 117, 141, 152, 152, strmobinfo(1, Crafty), Crafty, 10); - areamonster(.@m$, 117, 101, 135, 112, strmobinfo(1, Ratto), Ratto, 7); - areamonster(.@m$, 130, 88, 130, 88, strmobinfo(1, RubyVein), RubyVein, 1); - areamonster(.@m$, 122, 94, 122, 94, strmobinfo(1, RubyVein), RubyVein, 1); - areamonster(.@m$, 31, 181, 31, 181, strmobinfo(1, SapphireVein), SapphireVein, 1); - areamonster(.@m$, 31, 198, 31, 198, strmobinfo(1, SapphireVein), SapphireVein, 1); - areamonster(.@m$, 135, 127, 135, 127, strmobinfo(1, TopazVein), TopazVein, 1); - areamonster(.@m$, 120, 125, 120, 125, strmobinfo(1, TopazVein), TopazVein, 1); - areamonster(.@m$, 31, 112, 31, 112, strmobinfo(1, AmethystVein), AmethystVein, 1); - areamonster(.@m$, 24, 123, 24, 123, strmobinfo(1, AmethystVein), AmethystVein, 1); - areamonster(.@m$, 193, 123, 193, 123, strmobinfo(1, EmeraldVein), EmeraldVein, 1); - areamonster(.@m$, 204, 116, 204, 116, strmobinfo(1, EmeraldVein), EmeraldVein, 1); - areamonster(.@m$, 89, 168, 89, 168, strmobinfo(1, DiamondVein), DiamondVein, 1); - areamonster(.@m$, 132, 192, 132, 192, strmobinfo(1, SapphireVein), SapphireVein, 1); - areamonster(.@m$, 39, 174, 39, 174, strmobinfo(1, AmethystVein), AmethystVein, 1); - areamonster(.@m$, 44, 174, 44, 174, strmobinfo(1, TopazVein), TopazVein, 1); - areamonster(.@m$, 118, 196, 118, 196, strmobinfo(1, EmeraldVein), EmeraldVein, 1); - areamonster(.@m$, 65, 105, 65, 105, strmobinfo(1, DiamondVein), DiamondVein, 1); - areamonster(.@m$, 143, 139, 143, 139, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 156, 121, 156, 121, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 155, 166, 155, 166, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 125, 162, 125, 162, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 107, 141, 107, 141, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 77, 148, 77, 148, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 62, 119, 62, 119, strmobinfo(1, GemVeinbloc), GemVeinbloc, 1); - areamonster(.@m$, 162, 95, 162, 95, strmobinfo(1, CoalVeinbloc), CoalVeinbloc, 1); - areamonster(.@m$, 157, 66, 157, 66, strmobinfo(1, CoalVeinbloc), CoalVeinbloc, 1); - areamonster(.@m$, 112, 60, 112, 60, strmobinfo(1, CoalVeinbloc), CoalVeinbloc, 1); - areamonster(.@m$, 66, 54, 66, 54, strmobinfo(1, CoalVeinbloc), CoalVeinbloc, 1); - areamonster(.@m$, 63, 91, 63, 91, strmobinfo(1, GoldVeinbloc), GoldVeinbloc, 1); - areamonster(.@m$, 76, 127, 76, 127, strmobinfo(1, GoldVeinbloc), GoldVeinbloc, 1); - areamonster(.@m$, 111, 148, 111, 148, strmobinfo(1, GoldVeinbloc), GoldVeinbloc, 1); - /* - areamonster(.@m$, 101, 27, 104, 31, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 165, 28, 168, 32, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 199, 67, 202, 71, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 199, 109, 202, 113, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 197, 194, 200, 198, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 133, 199, 136, 203, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 34, 194, 37, 198, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - areamonster(.@m$, 26, 111, 29, 115, strmobinfo(1, PoisonSkull), PoisonSkull, 1); - */ - areamonster(.@m$, 88, 48, 88, 48, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 100, 49, 100, 49, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 130, 44, 130, 44, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 67, 47, 67, 47, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 124, 94, 124, 94, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 158, 60, 158, 60, strmobinfo(1, CoalVein), CoalVein, 1); - areamonster(.@m$, 56, 53, 56, 53, strmobinfo(1, IronVein), IronVein, 1); - areamonster(.@m$, 55, 98, 55, 98, strmobinfo(1, IronVein), IronVein, 1); - areamonster(.@m$, 62, 103, 62, 103, strmobinfo(1, IronVein), IronVein, 1); - areamonster(.@m$, 69, 125, 69, 125, strmobinfo(1, IronVein), IronVein, 1); - areamonster(.@m$, 62, 153, 62, 153, strmobinfo(1, IronVein), IronVein, 1); - areamonster(.@m$, 96, 145, 96, 145, strmobinfo(1, IronVein), IronVein, 1); - - // Yay yay yay - end; -} - -///////////////////////////////////////////////////////// -// Main script controller for Rossy Quest -- script #RossyQuest NPC_HIDDEN,{ - end; - -OnStage2: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage2")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE1; - goto OnBeat; - -OnStage4: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage4")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE2; - goto OnBeat; - -OnStage8: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage8")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE3; - goto OnBeat; - -OnStage16: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage16")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE4; - goto OnBeat; - -OnStage32: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage32")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE5; - goto OnBeat; - -OnStage64: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage64")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE6; - goto OnBeat; - -OnStage128: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage128")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE7; - goto OnBeat; - -OnStage256: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage256")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE8; - goto OnBeat; - -OnStage512: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage512")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_CAVE9; - goto OnBeat; - -OnStage1024: - if (!playerattached()) end; // ERROR - if (!@rossylock) end; // Invalid - if (mobcount(getmap(), "#RossyQuest::OnStage1024")) end; // Still working - .@q2=getq2(HurnscaldQuests_Rossy); - setq2 HurnscaldQuests_Rossy, .@q2 | ROSSY_BOSSCAVE; - goto OnBeat; - -OnBeat: - @rossylock = false; - dispbottom l("*** Cave Cleared ***"); - delcells "Rossy"+getcharid(0)+"Wall"; - .@inst = getq3(HurnscaldQuests_Rossy); - instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst); - if (.@q2 < ROSSY_BOSSCAVE) - addtimer2(300000, "#RossyQuest::OnTick1"); - else - deltimer("#RossyQuest::OnTick1"); - deltimer("#RossyQuest::OnTick2"); - deltimer("#RossyQuest::OnTick3"); - deltimer("#RossyQuest::OnTick4"); - deltimer("#RossyQuest::OnTick5"); - end; - -/* ****************************************** */ -OnTick1: - dispbottom l("Time remaining: %d minutes", 15); - addtimer2(300000, "#RossyQuest::OnTick2"); - end; - -OnTick2: - dispbottom l("Time remaining: %d minutes", 10); - addtimer2(300000, "#RossyQuest::OnTick3"); - end; - -OnTick3: - dispbottom l("Time remaining: %d minutes", 5); - addtimer2(240000, "#RossyQuest::OnTick4"); - end; - -OnTick4: - dispbottom l("Time remaining: 1 minute"); - addtimer2(45000, "#RossyQuest::OnTick5"); - end; - -OnTick5: - dispbottom l("Time remaining: %d seconds!", 15); - end; - -} - -///////////////////////////////////////////////////////// -// RossyCave(Cave ID) -function script RossyCave { - // Fight ongoing - cannot trigger - if (@rossylock) - return false; - - // Check quest consistency - // HurnscaldQuests_Rossy - // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL) - .@q=getq(HurnscaldQuests_Rossy); - .@q2=getq2(HurnscaldQuests_Rossy); - .@inst=getq3(HurnscaldQuests_Rossy); - - if (instance_id() != .@inst) - return false; - if (.@q != 16) - return false; - if (!.@q2) { - dispbottom l("This looks DANGEROUS! Maybe someone around here can tell me what I'm supposed to do."); - return false; - } - if (.@q2 & .caveid) - return false; - - // --------------- - // Main node setup - .@c=getarg(0); - .@m$=getmap(); - .@n$="#RossyQuest::OnStage"+.@c; - - // Obtain and Write Configuration - switch (.@c) { - case ROSSY_CAVE1: - .@boss=PoisonSkull; - .@mobc=rand2(3,5); - .@x1=85;.@y1=21;.@x2=108;.@y2=39; - .@x3=109;.@y3=33; .@x4=109; .@y4=36; - break; - case ROSSY_CAVE2: - .@boss=Troll; - .@mobc=rand2(3,5); - .@x1=191;.@y1=103;.@x2=205;.@y2=122; - .@x3=201;.@y3=123; .@x4=201; .@y4=123; - break; - case ROSSY_CAVE3: - .@boss=FireWisp; - .@mobc=rand2(2,4); - .@x1=26;.@y1=23;.@x2=43;.@y2=36; - .@x3=38;.@y3=37; .@x4=38; .@y4=37; - break; - case ROSSY_CAVE4: - .@boss=WaterWisp; - .@mobc=rand2(6,12); - .@x1=180;.@y1=176;.@x2=206;.@y2=207; - .@x3=179;.@y3=200; .@x4=179; .@y4=200; - break; - case ROSSY_CAVE5: - .@boss=Serqet; - .@mobc=rand2(6,8); - .@x1=98;.@y1=188;.@x2=141;.@y2=207; - .@x3=97;.@y3=190; .@x4=97; .@y4=197; - break; - case ROSSY_CAVE6: - .@boss=SnakeGhost; - .@mobc=rand2(5,7); - .@x1=19;.@y1=98;.@x2=36;.@y2=136; - .@x3=37;.@y3=125; .@x4=37; .@y4=125; - break; - case ROSSY_CAVE7: - .@boss=ScorpionGhost; - .@mobc=rand2(5,7); - .@x1=22;.@y1=181;.@x2=50;.@y2=205; - .@x3=51;.@y3=192; .@x4=51; .@y4=197; - break; - case ROSSY_CAVE8: - .@boss=JackO; - .@mobc=rand2(3,5); - .@x1=158;.@y1=20;.@x2=176;.@y2=35; - .@x3=175;.@y3=36; .@x4=177; .@y4=36; - break; - case ROSSY_CAVE9: - .@boss=GreenSlimeProgenitor; - .@mobc=rand2(5,7); - .@x1=187;.@y1=58;.@x2=208;.@y2=85; - .@x3=186;.@y3=82; .@x4=186; .@y4=85; - break; - case ROSSY_BOSSCAVE: - .@boss=Golem; - .@mobc=rand2(3,5); - .@x1=84;.@y1=85;.@x2=101;.@y2=101; - .@x3=92;.@y3=102; .@x4=93; .@y4=102; - break; - default: - consolemes(CONSOLEMES_ERROR, "INVALID ROSSY CAVE ID - "+.@c+" - SCRIPT ABORTED"); - return false; - } - - // This is cast from a dialog so prompt comes before any advanced calculation - mesc l("Drop a %s here to summon monsters.", getitemlink(PileOfAsh)); - if (.@c == ROSSY_BOSSCAVE) - mesc l("This is the master's room seal, be careful!"), 1; - else - mesc l("Weaken all nine seals to be able to undo the final one."); - select - rif(countitem(PileOfAsh), l("Place pile of ashes")), - l("Run away in fear"); - mes ""; - closeclientdialog; - if (@menu == 2) - return false; - - // Delete the item and lock for the quest - delitem PileOfAsh, 1; - @rossylock = true; - - // Spawn underlings - for (.@i=0; .@i < .@mobc; .@i++) { - // FIXME: Penguin? Mister Prickel? Ice Goblin? Wolvern? - // I think all those four could be removed. - .@mobId=any(Bandit, RobinBandit, Skeleton, MisterPrickel, ManaGhost, Penguin, CraftyGhost, Zombie, Wolvern, SpiderGhost, IceGoblin); // Mobs lv 26~47 - .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@n$); - // Make it aggresive - .@bmod=getunitdata(.@mob, UDT_MODE); - setunitdata(.@mob, UDT_MODE, .@bmod|4); // 4 = MD_AGGRESSIVE - } - - // Spawn boss - .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@boss), .@boss, 1, .@n$); - - // Obain boss basic status... - .@bhp= getunitdata(.@mob, UDT_MAXHP); - .@bat1=getunitdata(.@mob, UDT_ATKMIN); - .@bat2=getunitdata(.@mob, UDT_ATKMAX); - .@bhit=getunitdata(.@mob, UDT_HIT); - .@bmod=getunitdata(.@mob, UDT_MODE); - .@bmod=.@bmod|4; // 4 = MD_AGGRESSIVE - - // ...And Tweak Battle Status - setunitdata(.@mob, UDT_MAXHP, .@bhp*15/10); - setunitdata(.@mob, UDT_HP, .@bhp*15/10); - setunitdata(.@mob, UDT_ATKMIN, .@bat1*7/10); - setunitdata(.@mob, UDT_ATKMAX, .@bat2*7/10); - setunitdata(.@mob, UDT_HIT, .@bhit*2); - setunitdata(.@mob, UDT_MODE, .@bmod|32); // 32 = MD_BOSS - - // Build the wall so you cannot leave :> - setcells getmap(), .@x3, .@y3, .@x4, .@y4, 3, "Rossy"+getcharid(0)+"Wall"; - return true; -} - -/////////////////////////////////////////////// -// Reset quest when you die -function script RossyDeath { - if (getq(HurnscaldQuests_Rossy) != 16) - return; - if (@rossylock) - delcells("Rossy"+getcharid(0)+"Wall"); - @rossylock=false; - setq2 HurnscaldQuests_Rossy, 0; - deltimer("#RossyQuest::OnTick1"); - deltimer("#RossyQuest::OnTick2"); - deltimer("#RossyQuest::OnTick3"); - deltimer("#RossyQuest::OnTick4"); - deltimer("#RossyQuest::OnTick5"); - return; -} - -// May reset quest when you logout -function script RossyLogout { - if (getq(HurnscaldQuests_Rossy) != 16) - return; - if (@rossylock) { - delcells("Rossy"+getcharid(0)+"Wall"); - @rossylock=false; - setq2 HurnscaldQuests_Rossy, 0; - } - // FIXME: Set timers again when you login back? =/ - return; -} - -///////////////////////////////////////////////////////// -// Position the triggers - -// Begin Cave Code -008-3-0,98,27,0 script #RossyCave01 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave01"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE1; - end; -} - -// Begin Cave Code -008-3-0,199,109,0 script #RossyCave02 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave02"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE2; - end; -} - -// Begin Cave Code -008-3-0,35,26,0 script #RossyCave03 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave03"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE3; - end; -} - -// Begin Cave Code -008-3-0,198,193,0 script #RossyCave04 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave04"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE4; - end; -} - -// Begin Cave Code -008-3-0,133,200,0 script #RossyCave05 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave05"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE5; - end; -} - -// Begin Cave Code -008-3-0,27,104,0 script #RossyCave06 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave06"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE6; - end; -} - -// Begin Cave Code -008-3-0,31,192,0 script #RossyCave07 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave07"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE7; - end; -} - -// Begin Cave Code -008-3-0,165,26,0 script #RossyCave08 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave08"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE8; - end; -} - -// Begin Cave Code -008-3-0,201,69,0 script #RossyCave09 NPC_SUMMONING_CIRC,{ - if (RossyCave(.caveid)) - disablenpc instance_npcname(.name$); - close; - -OnInit: - disablenpc "#RossyCave09"; -OnInstanceInit: - .distance=1; - .caveid=ROSSY_CAVE9; - end; -} - -// -------------------------------------------------------------------- -008-3-0,92,90,0 script Juliet NPC_TANISHA,{ - // Check quest consistency - // HurnscaldQuests_Rossy - // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL) - .@q=getq(HurnscaldQuests_Rossy); - .@q2=getq2(HurnscaldQuests_Rossy); - .@inst=getq3(HurnscaldQuests_Rossy); - - if (instance_id() != .@inst) - end; - if (!.@q2) - end; - - // A bug! - if (.@q != 16) { - disablenpc instance_npcname("Juliet", .@inst); - end; - } - - // Another bug!! - if (!(.@q2 & ROSSY_BOSSCAVE)) { - disablenpc instance_npcname("Juliet", .@inst); - end; - } - - // Prepare rewards - .@rune=any(RunestoneUruz, RunestoneRaido, RunestoneThurisaz, RunestoneKaunaz, RunestoneDagaz, RunestonePeorth); - .@gems=any(CrudeDiamond, CrudeRuby, CrudeEmerald, CrudeSapphire, CrudeTopaz, CrudeAmethyst); - inventoryplace .@rune, 1, .@gems, 1; - - // Run epilogue - mesn; - mesq l("I heard some battle noises a few minutes ago. Are you here to save me?"); - next; - select - l("Of course I'm here to save you, Rossy sent me here!"); - mes ""; - mesn; - mesc l("Juliet starts scavenging the fallen Golem."); - mesq l("Mommy teached me about precious gemstones. This Golem has quite a few of them."); - next; - mesn; - mesq l("Here you go!"); - getitem .@gems, 1; - quest_item(.@rune, 1); - quest_xp(.maxLevel, 100000); - quest_jxp(.maxLevel, 10000); - setq HurnscaldQuests_Rossy, 17, 0, .@inst; - next; - mesn; - mesq l("Thanks for helping me... I'll be on my way now."); - next; - select - l("Go safely!"), - l("Do you need an escort?"), - l("What was following you, anyway?"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("I'll be fine, but thanks for the concern."); - } else if (@menu == 3) { - // This opens path for additional questline - mesn; - mesq l("Actually... I don't remember. I'm not sure why."); - next; - mesn; - mesq l("But it was big and scary! I haven't seen it since I entered this cave, though..."); - next; - mesn; - mesq l("It probably went away after seeing your bravure, tee-hee!"); - next; - mesn; - mesq l("I must go now. I've already spent too much time here already."); - } - disablenpc instance_npcname("Juliet", .@inst); - close; - -OnInit: - disablenpc "Juliet"; - .distance=4; - .maxLevel=80; - end; - -OnInstanceInit: - disablenpc instance_npcname("Juliet"); - .distance=4; - .maxLevel=90; - end; -} - - diff --git a/npc/008-3-1/_import.txt b/npc/008-3-1/_import.txt deleted file mode 100644 index fa138e1f..00000000 --- a/npc/008-3-1/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-3-1: Bat Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-1/_mobs.txt", -"npc/008-3-1/_warps.txt", -"npc/008-3-1/arkim.txt", diff --git a/npc/008-3-1/_mobs.txt b/npc/008-3-1/_mobs.txt deleted file mode 100644 index b741a714..00000000 --- a/npc/008-3-1/_mobs.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-1: Bat Cave mobs -008-3-1,42,35,7,5 monster Crafty 1018,7,1000,120000 -008-3-1,44,54,4,2 monster Crafty 1018,4,10000,75000 -008-3-1,43,39,5,2 monster Spider 1044,1,4000,8000 -008-3-1,46,53,5,2 monster Spider 1044,2,2000,7500 -008-3-1,52,31,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-1,43,25,0,0 monster Coal Vein 1048,1,600000,60000 diff --git a/npc/008-3-1/_warps.txt b/npc/008-3-1/_warps.txt deleted file mode 100644 index 221789b7..00000000 --- a/npc/008-3-1/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-1: Bat Cave warps -008-3-1,34,34,0 warp #008-3-1_34_34 0,0,008-1,128,139 diff --git a/npc/008-3-1/arkim.txt b/npc/008-3-1/arkim.txt deleted file mode 100644 index 665725bf..00000000 --- a/npc/008-3-1/arkim.txt +++ /dev/null @@ -1,56 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Arkim the mad hermit and Mirak's brother - -008-3-1,41,34,0 script Arkim NPC_TERRY,{ - function arkimDaily; - mesn; - mesq l("Do you want help me with bats?"); - next; - select - l("Yes, please!"), - l("Bats? Actually... Why do you live here?"); // Who said they live here? - mes ""; - if (@menu == 1) - arkimDaily(); - mesn; - mesq l("Oh my, never really thought about it!"); - next; - mesn; - mesq l("I guess mostly I enjoy experimenting with the bats here."); - next; - select - l("I see... Ehm... I have to go..."), - l("What type of experimenting?"); - mes ""; - if (@menu == 1) - close; - mesn; - mesq l("Never really thought about it either..."); - next; - mesn; - mesc l("You watch as the hermit's old, lazy eyes open wide, and the old man comes alive with energy."); - mesq l("I GUESS I REALLY LIKE CUTTING THEM UP TO SEE HOW THEY WORK!! HAHAHA!"); - next; - select - l("YOU'RE CRAZY!"), - l("Right... me too! Can I help?"); - mes ""; - if (@menu == 2) - arkimDaily(); - close; - -function arkimDaily { - // DailyQuest(lvl, cost, count, item) - DailyQuest(20, 4, 3, BatWing); - close; -} - -OnInit: - .distance = 4; - end; - -} - diff --git a/npc/008-3-2/_import.txt b/npc/008-3-2/_import.txt deleted file mode 100644 index 580a8f40..00000000 --- a/npc/008-3-2/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 008-3-2: Calamity Dungeon -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-2/_mobs.txt", -"npc/008-3-2/_warps.txt", -"npc/008-3-2/boss.txt", diff --git a/npc/008-3-2/_mobs.txt b/npc/008-3-2/_mobs.txt deleted file mode 100644 index 4c0dfbd0..00000000 --- a/npc/008-3-2/_mobs.txt +++ /dev/null @@ -1,7 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-2: Calamity Dungeon mobs -008-3-2,106,73,73,63 monster Cave Maggot 1027,80,30000,2500 -008-3-2,136,71,47,50 monster Thief Slime 1105,35,50000,2500 -008-3-2,101,83,73,30 monster AngryCrafty 1103,60,50000,2500 -008-3-2,100,79,32,31 monster Black Scorpion 1104,14,45000,2500 -008-3-2,94,98,11,9 monster Green Slime 1024,4,500,2500 diff --git a/npc/008-3-2/_warps.txt b/npc/008-3-2/_warps.txt deleted file mode 100644 index e69305bc..00000000 --- a/npc/008-3-2/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-2: Calamity Dungeon warps -008-3-2,175,19,0 warp #008-3-2_175_19 2,0,008-1,165,170 diff --git a/npc/008-3-2/boss.txt b/npc/008-3-2/boss.txt deleted file mode 100644 index 0634358d..00000000 --- a/npc/008-3-2/boss.txt +++ /dev/null @@ -1,43 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Controls the boss on 008-3-2 and the Master Book Learning -// see npc/items/master_skillbook.txt for explanation about variables - -008-3-2,0,0,0 script #BossCtrl_008-3-2 NPC_HIDDEN,{ - end; - -// Test server: 15 minutes only -OnTimer900000: - if (!debug) - end; - -// Otherwise, respawn every hour -OnTimer3600000: - stopnpctimer; -OnInit: - $@MB_00832=0; - monster "008-3-2", 67, 30, strmobinfo(1, SpiderQueen), SpiderQueen, 1, "#BossCtrl_008-3-2::OnBossDeath"; - end; - -OnBossDeath: - initnpctimer; - BossSlain(.name$, "$@MB_00832"); - end; - -OnBossCheck: - @mb_BossId=-1; - // TODO: Check if you really fought or was just lurking - // Check if party is correct - if (getcharid(1) != $@MB_00832) - end; -OnBegin: - @mb_BossId=SpiderQueen; - @mb_SkillId=TF_POISON; - @mb_ItemId=MagicFeather; // Placeholder - @mb_ItemAm=1; - addtimer(15000, "#MasterBook::OnUnset"); - end; - -} diff --git a/npc/008-3-3/_import.txt b/npc/008-3-3/_import.txt deleted file mode 100644 index 96cc09c9..00000000 --- a/npc/008-3-3/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-3-3: Bat Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-3/_mobs.txt", -"npc/008-3-3/_warps.txt", diff --git a/npc/008-3-3/_mobs.txt b/npc/008-3-3/_mobs.txt deleted file mode 100644 index 4ff0ff2d..00000000 --- a/npc/008-3-3/_mobs.txt +++ /dev/null @@ -1,9 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-3: Obelisk Cave mobs -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-3: Bat Cave mobs -008-3-3,57,36,12,7 monster Crafty 1018,5,1000,120000 -008-3-3,31,43,4,5 monster Crafty 1018,3,1000,120000 -008-3-3,49,38,20,16 monster Cave Maggot 1027,12,500,2000 -008-3-3,60,49,5,3 monster Ratto 1005,2,35000,15000 -008-3-3,53,24,5,2 monster Ratto 1005,2,35000,15000 diff --git a/npc/008-3-3/_warps.txt b/npc/008-3-3/_warps.txt deleted file mode 100644 index 871c897c..00000000 --- a/npc/008-3-3/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-3: Obelisk Cave warps -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-3: Bat Cave warps -008-3-3,37,57,0 warp #008-3-3_37_57 1,0,008-1,283,27 diff --git a/npc/008-3-4/_import.txt b/npc/008-3-4/_import.txt deleted file mode 100644 index e0815f43..00000000 --- a/npc/008-3-4/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-3-4: North Mine -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-4/_mobs.txt", -"npc/008-3-4/_warps.txt", diff --git a/npc/008-3-4/_mobs.txt b/npc/008-3-4/_mobs.txt deleted file mode 100644 index 37fb788a..00000000 --- a/npc/008-3-4/_mobs.txt +++ /dev/null @@ -1,32 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-4: North Mine mobs -008-3-4,84,55,19,25 monster Cave Maggot 1027,15,2000,20000 -008-3-4,73,100,53,17 monster Cave Maggot 1027,10,1000,15000 -008-3-4,139,58,20,21 monster Cave Maggot 1027,5,5000,25000 -008-3-4,87,78,75,12 monster Crafty 1018,12,2500,35000 -008-3-4,89,79,21,35 monster Ratto 1005,18,5000,10000 -008-3-4,133,55,16,9 monster Spider 1044,1,4000,8000 -008-3-4,49,91,29,17 monster Black Scorpion 1104,4,4000,8000 -008-3-4,138,57,16,17 monster Spider 1044,3,4000,8000 -008-3-4,54,37,16,17 monster Spider 1044,3,4000,8000 -008-3-4,85,67,49,39 monster Thief Slime 1105,3,20000,100000 -008-3-4,82,42,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-4,74,51,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-4,104,41,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-4,62,61,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-4,128,71,0,0 monster Coal Veinbloc 1071,1,600000,60000 -008-3-4,118,46,0,0 monster Coal Vein 1048,1,600000,60000 -008-3-4,108,90,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-4,72,84,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-4,47,98,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-4,50,74,0,0 monster Iron Vein 1047,1,600000,60000 -008-3-4,135,53,0,0 monster Diamond Vein 1045,1,600000,60000 -008-3-4,43,96,0,0 monster Amethyst Vein 1055,1,600000,60000 -008-3-4,102,91,0,0 monster Topaz Vein 1054,1,600000,60000 -008-3-4,33,102,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-4,154,56,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-4,53,31,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-4,83,44,14,9 monster Red Slime 1074,5,10000,50000 -008-3-4,115,67,13,29 monster Red Slime 1074,4,10000,50000 -008-3-4,37,79,24,27 monster Yellow Slime 1073,4,10000,50000 -008-3-4,111,67,13,29 monster Yellow Slime 1073,8,20000,75000 diff --git a/npc/008-3-4/_warps.txt b/npc/008-3-4/_warps.txt deleted file mode 100644 index d62d5fb5..00000000 --- a/npc/008-3-4/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-4: North Mine warps -008-3-4,88,78,0 warp #008-3-4_88_78 0,0,008-1,249,24 -008-3-4,21,85,0 warp #008-3-4_21_85 0,2,008-3-5,157,72 -008-3-4,91,119,0 warp #008-3-4_91_119 3,0,008-3-6,62,22 diff --git a/npc/008-3-5/_import.txt b/npc/008-3-5/_import.txt deleted file mode 100644 index cb743792..00000000 --- a/npc/008-3-5/_import.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Map 008-3-5: Bandit Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-5/_mobs.txt", -"npc/008-3-5/_warps.txt", -"npc/008-3-5/bryant.txt", -"npc/008-3-5/lordcave.txt", -"npc/008-3-5/nunia.txt", diff --git a/npc/008-3-5/_mobs.txt b/npc/008-3-5/_mobs.txt deleted file mode 100644 index 5331e5e6..00000000 --- a/npc/008-3-5/_mobs.txt +++ /dev/null @@ -1,12 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-5: Bandit Cave mobs -008-3-5,87,83,22,16 monster Cave Maggot 1027,8,2000,20000 -008-3-5,79,68,54,12 monster Crafty 1018,12,2500,35000 -008-3-5,71,62,49,39 monster Thief Slime 1105,3,20000,100000 -008-3-5,90,70,13,29 monster Yellow Slime 1073,8,20000,75000 -008-3-5,79,82,21,15 monster Bandit 1063,3,2000,20000 -008-3-5,74,66,38,21 monster Snake 1075,3,10000,100000 -008-3-5,54,41,26,21 monster Robin Bandit 1064,2,2000,20000 -008-3-5,44,51,13,33 monster Cave Maggot 1027,7,2000,20000 -008-3-5,49,41,38,21 monster Bandit 1063,2,2000,20000 -008-3-5,133,72,24,9 monster Ratto 1005,6,5000,10000 diff --git a/npc/008-3-5/_warps.txt b/npc/008-3-5/_warps.txt deleted file mode 100644 index be81f002..00000000 --- a/npc/008-3-5/_warps.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-5: Bandit Cave warps -008-3-5,158,72,0 warp #008-3-5_158_72 0,2,008-3-4,22,85 -008-3-5,109,67,0 warp #008-3-5_109_67 0,2,008-3-5,101,68 -008-3-5,102,68,0 warp #008-3-5_102_68 0,2,008-3-5,110,67 -008-3-5,92,108,0 warp #008-3-5_92_108 0,0,008-1,109,83 diff --git a/npc/008-3-5/bryant.txt b/npc/008-3-5/bryant.txt deleted file mode 100644 index 4199c484..00000000 --- a/npc/008-3-5/bryant.txt +++ /dev/null @@ -1,79 +0,0 @@ -// TMW2 Script. -// Author: -// Jesusalva -// Description: -// Part of Helena's quest -// Gives spoilers about what Jesusalva plans in doing with Bryant - -008-3-5,101,85,0 script Bryant NPC_CRASMANDE,{ - function bryantBanditLord; - function bryantSilverKey; - function bryantComplete; - .@q=getq(HurnscaldQuest_Bandits); - if (.@q == 5) bryantSilverKey(); - if (.@q == 6) bryantBanditLord(); - if (.@q >= 7) bryantComplete(); - mesn; - mesq l("Welcome."); - next; - mesn; - mesq l("I'm looking everywhere for the bandit leader. I can't seem to find him. So I stopped here to rest a bit."); - close; - -function bryantSilverKey { - mesn; - mesq l("Don't say anything, I can smell the scent of Lena's hair on you."); - next; - inventoryplace PiberriesInfusion, 3; - getitem PiberriesInfusion, 3; - setq HurnscaldQuest_Bandits, 6; - mesn; - mesq l("I guess she sent you to kill the Bandit Lord, right? I'll lure him for you."); - next; - mesn; - mesq l("It is pretty close to here. I advise you to use a good sword, and heal yourself often."); - next; - mesn; - mesq l("I will give you 3 @@. Use them on this fight, or you're doomed to fail.", getitemlink(PiberriesInfusion)); - close; -} - -function bryantBanditLord { - mesn; - mesq l("What are you waiting for? Go kill the bandit lord."); - next; - mesn strcharinfo(0); - select - l("I'm going, don't worry."), - l("There was nobody on the Bandit Lord's room."); - if (@menu == 1) - close; - mes ""; - mesn; - mesq l("...Have you ever gone there yet?"); - next; - mesn; - mesq l("Go kill the Bandit Lord!"); - close; -} - -function bryantComplete { - mesn; - mesq l("Good job defeating the Bandit Lord."); - close; -} - -OnInit: - /* - .@npcId = getnpcid(.name$); - setunitdata(.@npcId, UDT_HEADTOP, FairyHat); - setunitdata(.@npcId, UDT_HEADMIDDLE, ForestArmor); - setunitdata(.@npcId, UDT_HEADBOTTOM, JeansChaps); - setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); - setunitdata(.@npcId, UDT_HAIRSTYLE, 24); - setunitdata(.@npcId, UDT_HAIRCOLOR, 1); - */ - - .distance = 5; - end; -} diff --git a/npc/008-3-5/lordcave.txt b/npc/008-3-5/lordcave.txt deleted file mode 100644 index 906cd8ad..00000000 --- a/npc/008-3-5/lordcave.txt +++ /dev/null @@ -1,101 +0,0 @@ -// TMW2 Script -// Author: -// Jesusalva -// FIXME: -// Create a party instance for this - -008-3-5,83,49,0 script #BanditLordDen NPC_HIDDEN,0,5,{ - function lordCleanup; - end; - -function lordCleanup { - // Bug - if (!.lock) { - consolemes(CONSOLEMES_ERROR, "No lock passed to Lord Cave during cleanup"); - end; - } - - // Cleanup - .lock = false; - delcells "BanditLordDenWall"; - killmonster("008-3-5", "#BanditLordDen::OnLordDeath"); - stopnpctimer; - return; -} - -OnInit: - .maxLevel = 55; - .lock=false; - end; - -OnTouch: - .@q=getq(HurnscaldQuest_Bandits); - if (.@q != 6) end; - - // Oooh, we got a challenger! - - // But the Lord is busy? Oh well, try again later - if (.lock) { - dispbottom l("%s came here first, you should wait for them.", strcharinfo(0, "Someone", .lock)); - slide 92, 52; - end; - } - - // Block the NPC - .lock=getcharid(3); - slide 80, 49; - - // Block the passage - mapannounce "008-3-5", "A minor earthquake happens.", bc_map; - setcells "008-3-5", 82, 48, 83, 51, 2, "BanditLordDenWall"; - initnpctimer; - - // Summon - if (mobcount("008-3-5", "#BanditLordDen::OnLordDeath") == 0) - monster "008-3-5", 48, 35, "Bandit Lord", BanditLord, 1, "#BanditLordDen::OnLordDeath"; - end; - -OnLordDeath: - // Unlock - lordCleanup(); - - // If killed by a monster, GM, whatever, abort - if (!playerattached()) - end; - - // Complete quest (if PC is attached and doing quest) - .@q=getq(HurnscaldQuest_Bandits); - if (.@q == 6 && !ispcdead()) { - setq HurnscaldQuest_Bandits, 7; - quest_xp(.maxLevel, 2500); - dispbottom l("Phew! The Bandit Lord was killed."); - } else { - dispbottom l("I killed the Bandit Lord! ...Why I did that, again?"); - } - end; - -OnTimer5000: - .@pc=attachrid(.lock); - - // Player logged out - if (!.@pc) { - lordCleanup(); - end; - } - - // Player killed in combat - if (ispcdead()) { - lordCleanup(); - end; - } - - // Player changed map - if (getmap() != "008-3-5") { - lordCleanup(); - end; - } - - // Battle ongoing, restart timer - initnpctimer; - end; -} diff --git a/npc/008-3-5/nunia.txt b/npc/008-3-5/nunia.txt deleted file mode 100644 index cd12a085..00000000 --- a/npc/008-3-5/nunia.txt +++ /dev/null @@ -1,81 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Nunia, Henry's friend and Woodland's master thief. -// THIS IS A PLACEHOLDER! - -008-3-5,35,65,0 script Nunia NPC_NUNIA,{ - function nuniaIntruder; - function nuniaHenry; - function nuniaBegin; - - // What do we have here? - .@q=getq(ThiefQuests_Artis); - switch (.@q) { - case 7: - nuniaHenry(); - break; - case 8: - case 9: - nuniaBegin(); - // TODO: Script control; Transfer quest variable authority - break; - default: - nuniaIntruder(); - break; - } - close; - -/////////////////////////////////////////////////////////////////////////////// -function nuniaIntruder { - speech - l("Who dares to enter this cave? Who are you?"), - l("At least, you look peaceful."), - l("Let's do like this: You leave me alone, and I don't mess with you. Deal?"); - select - l("Deal."), - l("No deal, I'm going to report you to authorities!"); - mes ""; - // Some meta option/dialog to improve the immersion - if (@menu == 2) { - mesn; - mesq l("There's only one problem, you know..."); - next; - mesn; - mesq l("The dead can't speak."); - percentheal -100, -100; - } - return; -} - -function nuniaHenry { - mesn; - mesq l("Your smell... Did Henry sent you here? How cute of him!"); - next; - mesn; - mesq l("I've raised too much suspicion, so my friends told me to lay low for a while."); - next; - mesn; - mesq l("The Brotherhood is watching our movements, they already suspect who is a member and who isn't, but they don't know for sure."); - next; - mesn; - mesq l("Therefore, we had to cut off our connection with Artis. Don't want Brotherhood to find the secrets of our structure."); - setq1 ThiefQuests_Artis, 8; - return; -} - -function nuniaBegin { - speech - l("Who dares to enter this cave? Who are you?"), - l("At least, you look peaceful. And I see by your fingers that you can deal with lockpicks."), - l("I am going to teach you all what a thief needs to know, later"), - l("Call for Micksha and Jesusalva to implement all this, please."), - l("And Tanveer, our president in Tulimshar, should be able to give you even more training. If you manage to find our headquarters, of course, hahaha!"); - return; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/008-3-6/_import.txt b/npc/008-3-6/_import.txt deleted file mode 100644 index 41b51532..00000000 --- a/npc/008-3-6/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 008-3-6: Hurnscald Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-3-6/_mobs.txt", -"npc/008-3-6/_warps.txt", diff --git a/npc/008-3-6/_mobs.txt b/npc/008-3-6/_mobs.txt deleted file mode 100644 index 91e614fe..00000000 --- a/npc/008-3-6/_mobs.txt +++ /dev/null @@ -1,11 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-6: Hurnscald Cave mobs -008-3-6,54,73,18,19 monster Red Slime 1074,5,10000,50000 -008-3-6,67,44,35,8 monster Yellow Slime 1073,3,10000,50000 -008-3-6,86,43,23,22 monster Red Slime 1074,4,10000,50000 -008-3-6,86,76,24,13 monster Yellow Slime 1073,4,10000,50000 -008-3-6,75,65,24,27 monster Cave Maggot 1027,8,2000,20000 -008-3-6,56,62,10,7 monster Ratto 1005,3,5000,10000 -008-3-6,71,77,10,7 monster Ratto 1005,3,5000,10000 -008-3-6,96,53,15,11 monster Ratto 1005,4,5000,10000 -008-3-6,95,63,15,21 monster Black Scorpion 1104,1,4000,8000 diff --git a/npc/008-3-6/_warps.txt b/npc/008-3-6/_warps.txt deleted file mode 100644 index 95dd673a..00000000 --- a/npc/008-3-6/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-3-6: Hurnscald Cave warps -008-3-6,64,21,0 warp #008-3-6_64_21 3,0,008-3-4,90,118 diff --git a/npc/009-1/_import.txt b/npc/009-1/_import.txt index 0d4e3164..207b090c 100644 --- a/npc/009-1/_import.txt +++ b/npc/009-1/_import.txt @@ -1,10 +1,14 @@ -// Map 009-1: Swamp +// Map 009-1: Hurnscald // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/009-1/_mobs.txt", "npc/009-1/_warps.txt", -"npc/009-1/blackwin.txt", -"npc/009-1/forwin.txt", -"npc/009-1/hamond.txt", +"npc/009-1/constable.txt", +"npc/009-1/guide.txt", +"npc/009-1/jack.txt", +"npc/009-1/mapflags.txt", +"npc/009-1/milly.txt", +"npc/009-1/old_man.txt", +"npc/009-1/old_woman.txt", +"npc/009-1/sabine.txt", "npc/009-1/soul-menhir.txt", -"npc/009-1/thurstan.txt", -"npc/009-1/wateranimation.txt", +"npc/009-1/water_pump.txt", diff --git a/npc/009-1/_mobs.txt b/npc/009-1/_mobs.txt index 278be1b7..d7f02ba3 100644 --- a/npc/009-1/_mobs.txt +++ b/npc/009-1/_mobs.txt @@ -1,33 +1,7 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-1: Swamp mobs -009-1,190,74,53,40 monster Silkworm 1040,12,4500,6000 -009-1,152,116,48,43 monster Forest Maggot 1028,20,3600,12000 -009-1,89,116,43,31 monster Grass Snake 1042,5,6000,24000 -009-1,192,155,43,31 monster Grass Snake 1042,7,3000,12000 -009-1,228,64,17,32 monster Log Head 1031,4,5000,30000 -009-1,168,95,14,9 monster Bandit 1063,2,9000,18000 -009-1,115,150,45,26 monster Thief Slime 1105,5,11500,45000 -009-1,185,179,45,20 monster Blub 1008,4,60000,120000 -009-1,128,144,77,47 monster Green Slime 1024,10,10000,30000 -009-1,63,175,30,15 monster Little Green Slime 1025,5,10000,30000 -009-1,84,111,30,15 monster Little Green Slime 1025,5,10000,50000 -009-1,228,139,13,12 monster Mana Ghost 1101,2,10000,30000 -009-1,45,182,13,12 monster Mana Ghost 1101,4,10000,60000 -009-1,69,185,31,9 monster Skeleton 1084,4,6000,24000 -009-1,142,159,84,20 monster Swampling 1109,10,30000,60000 -009-1,162,99,17,15 monster Robin Bandit 1064,2,9000,18000 -009-1,184,48,38,13 monster Spiky Mushroom 1049,4,3000,12000 -009-1,103,86,31,27 monster Big Frog 1087,3,6000,60000 -009-1,85,118,49,43 monster Small Frog 1086,8,3000,30000 -009-1,152,165,44,40 monster Big Frog 1087,5,6000,75000 -009-1,188,188,49,18 monster Small Frog 1086,7,3000,30000 -009-1,228,65,16,8 monster Spider 1044,2,4000,8000 -009-1,209,58,16,28 monster Grass Snake 1042,4,3000,12000 -009-1,232,79,3,12 monster Wicked Mushroom 1050,3,6000,12000 -009-1,124,64,3,12 monster Wicked Mushroom 1050,7,3000,12000 -009-1,214,173,13,12 monster Zombie 1118,1,48000,120000 -009-1,37,181,13,12 monster Water Wisp 1116,3,10000,60000 -009-1,66,182,13,12 monster Fire Wisp 1115,1,10000,60000 -009-1,131,193,13,12 monster Green Slime Progenitor 1097,1,48000,120000 -009-1,149,174,84,19 monster Mud Slime 1096,4,30000,60000 -009-1,61,109,16,32 monster Serqet 1119,2,12000,60000 +// Map 009-1: Hurnscald mobs +009-1,74,32,1,0 monster Alizarin Plant 1037,1,100000,120000 +009-1,29,44,4,6 monster CroconutMob 1014,2,0,250 +009-1,88,51,7,2 monster Gamboge Plant 1038,2,0,5000 +009-1,80,38,2,2 monster Gamboge Plant 1038,1,0,5000 +009-1,0,0,0,0 monster Amethyst Vein 1055,5,30,20 diff --git a/npc/009-1/_warps.txt b/npc/009-1/_warps.txt index a5300fba..0dad32b9 100644 --- a/npc/009-1/_warps.txt +++ b/npc/009-1/_warps.txt @@ -1,15 +1,14 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-1: Swamp warps -009-1,181,31,0 warp #009-1_181_31 1,0,008-1-1,180,197 -009-1,249,48,0 warp #009-1_249_48 0,0,008-1,23,216 -009-1,175,77,0 warp #009-1_175_77 1,0,009-2-1,34,44 -009-1,161,90,0 warp #009-1_161_90 1,0,009-2-0,31,39 -009-1,184,101,0 warp #009-1_184_101 0,0,009-2-2,32,39 -009-1,35,168,0 warp #009-1_35_168 1,0,009-2-3,41,39 -009-1,67,159,0 warp #009-1_67_159 0,0,009-2-6,29,35 -009-1,64,186,0 warp #009-1_64_186 0,0,009-2-7,29,35 -009-1,90,159,0 warp #009-1_90_159 0,0,009-2-8,29,40 -009-1,196,96,0 warp #009-1_196_96 1,0,009-2-9,34,43 -009-1,95,192,0 warp #009-1_95_192 0,0,009-2-12,28,43 -009-1,206,148,0 warp #009-1_206_148 0,0,009-2-15,28,41 -009-1,213,147,0 warp #009-1_213_147 1,0,009-2-15,43,40 +// Map 009-1: Hurnscald warps +009-1,49,55,0 warp #009-1_49_55 3,0,008-1,78,81 +009-1,97,36,0 warp #009-1_97_36 0,1,008-1,128,61 +009-1,35,30,0 warp #009-1_35_30 0,0,009-2,50,54 +009-1,58,46,0 warp #009-1_58_46 0,0,009-2,27,106 +009-1,59,33,0 warp #009-1_59_33 0,0,009-2,95,29 +009-1,71,30,0 warp #009-1_71_30 0,0,009-2,130,25 +009-1,80,31,0 warp #009-1_80_31 0,0,009-2,149,66 +009-1,72,44,0 warp #009-1_72_44 0,0,009-2,114,77 +009-1,91,46,0 warp #009-1_91_46 1,0,009-2,182,66 +009-1,24,36,0 warp #009-1_24_36 0,2,008-1,53,61 +009-1,49,24,0 warp #009-1_49_24 3,0,008-1,78,48 +009-1,60,41,0 warp #009-1_60_41 0,0,009-2,32,91 diff --git a/npc/009-1/blackwin.txt b/npc/009-1/blackwin.txt deleted file mode 100644 index 7ad7f39b..00000000 --- a/npc/009-1/blackwin.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Blackwin, guardian of Asphodel Moors, disciple of Golbenez. Twice. It is magic. -// THIS IS A PLACEHOLDER! - -009-1,75,144,0 script Blackwin#1 NPC_UNDEAD_GUARD,{ - speech - l("..."), - l("Heed my warning, young %s. My master will suffer no fools here.", get_race(GETRACE_RACE)), - l("He created this as a place of leisure, and we are here to ensure that it remains undisturbed."); - close; - -OnInit: - .distance = 4; - end; -} - -009-1,105,173,0 script Blackwin#2 NPC_UNDEAD_GUARD,{ - speech - l("..."), - l("Heed my warning, young %s. My master will suffer no fools here.", get_race(GETRACE_RACE)), - l("He created this as a place of leisure, and we are here to ensure that it remains undisturbed."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-1/constable.txt b/npc/009-1/constable.txt new file mode 100755 index 00000000..c071068a --- /dev/null +++ b/npc/009-1/constable.txt @@ -0,0 +1,9 @@ + +009-1,52,33,0 script Constable Bob NPC419,{ + mes "[Constable Bob]"; + mes "\"Hello.\""; + mes "\"I've been getting complaints of lawlessness in Hurnscald recently, so I thought I'd come down here myself and explain the rules.\""; + mes "\"Please make sure that you follow them!\""; + callfunc "GameRules"; + close; +} diff --git a/npc/009-1/forwin.txt b/npc/009-1/forwin.txt deleted file mode 100644 index 4b134f03..00000000 --- a/npc/009-1/forwin.txt +++ /dev/null @@ -1,24 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Martha, sort of Brotherhood Leader in Tulimshar. -// THIS IS A PLACEHOLDER! - -009-1,48,171,0 script Forwin NPC_UNDEAD_GUARD,{ - mesn; - mesq l("%s...", strcharinfo(0)); - next; - mesn; - mesq l("I am your father..."); - next; - mesc l("There is an awkward pause, and then the guard bursts out laughing."); - mes ""; - mesn; - mesq l("Just kidding! Can you imagine Golbenez's reaction if we had such puny offspring?"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-1/guide.txt b/npc/009-1/guide.txt new file mode 100755 index 00000000..4b62c4b3 --- /dev/null +++ b/npc/009-1/guide.txt @@ -0,0 +1,184 @@ + +009-1,92,29,0 script Ian NPC102,{ + // This line is only relevant for players, who started before the timestamp was introduced. + // Set the graduation cap flag at the right position. + // It is a bugfix + if ((TUT_var < 4) && (TUT_var & 2)) + FLAGS = FLAGS|FLAG_GOT_GRADUATIONCAP; + + if ((TUT_var != 0) && !(FLAGS & FLAG_GOT_GRADUATIONCAP) && BaseLevel >= 10) + goto L_Grad; + goto L_DoneGrad; + +L_DoneGrad: + mes "[Ian the Guide]"; + mes "\"Would you like to know about something?\""; + next; + goto L_Menu_A; + +L_Menu_A: + menu + "Fighting", L_Fight, + "Items", L_Items, + "Monsters", L_Monster, + "Stylist", L_Style, + "Quests", L_Quests, + "NPCs", L_NPC, + "Commands", L_Comm, + "Attributes", L_Stats, + "Magic", L_Magic, + "Quick Keys", L_Key, + "Laws", L_Laws, + "I know everything!", L_Know; + +L_Fight: + mes "[Ian the Guide]"; + mes "\"People live in this world by living off of monsters."; + mes "You can fight monsters and even players by hitting the [CTRL] key, or left mouse click.\""; + next; + mes "[Ian the Guide]"; + mes "\"If you get tired of pressing the key too much, you can also type [SHIFT]+[CTRL]."; + mes "This will make your character attack continuously for the time you are inactive.\""; + next; + goto L_Menu_A; + +L_Items: + mes "[Ian the Guide]"; + mes "\"There are three types of items."; + mes "They can be Consumables, Equipment or Miscellaneous\""; + next; + mes "[Ian the Guide]"; + mes "\"Consumable items such as Potions, can be used only once."; + mes "After use, they will disappear from your inventory.\""; + next; + mes "[Ian the Guide]"; + mes "\"Equipment items like Armors, Weapons, Accessories"; + mes "can be equipped for fashionable purposes or to raise your status.\""; + next; + mes "[Ian the Guide]"; + mes "\"Miscellaneous items such as maggot slime, are used"; + mes "in creating other items, or just to trade and sell.\""; + next; + goto L_Menu_A; + +L_Monster: + mes "[Ian the Guide]"; + mes "\"In every world, there are beasts. Monsters can be found almost anywhere!~"; + mes "To fight them, please read [Fighting] if you do not know how.\""; + next; + mes "\"There a several types of monsters, Aggressive, Neutral, and Assistants.\""; + next; + mes "[Ian the Guide]"; + mes "\"Aggressive monsters know that they are always in danger"; + mes "so therefore they always keep their guard up,"; + mes "making them attack anybody in sight.\""; + next; + mes "[Ian the Guide]"; + mes "\"Neutral monsters tend to just lounge around until attacked."; + mes "They will leave everything alone unless they are threatened.\""; + next; + mes "[Ian the Guide]"; + mes "\"Assistants are monsters who help each other."; + mes "You should always check how many are around you before attacking a single one!\""; + next; + goto L_Menu_A; + +L_Style: + mes "[Ian the Guide]"; + mes "\"The stylist NPCs will cut and perm your hair!"; + mes "They are known for their hair growth formula\""; + next; + goto L_Menu_A; + +L_Quests: + mes "[Ian the Guide]"; + mes "\"There are people in the world in need of help!"; + mes "Most of these people aren't afraid to give rewards to those who help them."; + mes "So be nice and help people along the way!\""; + next; + mes "[Ian the Guide]"; + mes "\"If you are looking for a place to get started, I heard that the farmers just outside the gates are looking for help.\""; + next; + goto L_Menu_A; + +L_NPC: + mes "[Ian the Guide]"; + mes "\"NPCs [Non Playable Characters] are people who are always in the game,"; + mes "tending to many varieties of services from just chatting to helping others.\""; + next; + goto L_Menu_A; + +L_Comm: + mes "[Ian the Guide]"; + mes "\"/clear clears the text box.\""; + mes "\"/help displays the client commands (ones starting with a /) in the chat box.\""; + mes "\"/whisper [name] allows you to message someone privately.\""; + mes "\"/who displays the current number of online users.\""; + mes "\"/where displays the current map's name.\""; + next; + goto L_Menu_A; + +L_Stats: + mes "[Ian the Guide]"; + mes "\"People vary greatly by how much strength, agility, dexterity, intelligence, vitality, and luck they have.\""; + next; + mes "[Ian the Guide]"; + mes "\"Strength helps you carry items, and it also allows you to hit harder – but it is not too helpful if you focus on missile weapons."; + mes "More agility allows you to attack faster, and to dodge attacks more easily."; + mes "Your dexterity determines how likely you are to hit a monster, and how effective you are with missile weapons.\""; + next; + mes "[Ian the Guide]"; + mes "\"Vitality determines how resistant to injuries you are, and how much damage you can take before you die."; + mes "Intelligence is useful for alchemy and magic, but there are few opportunities for either at the moment."; + mes "Luck determines many small things, including the likelihood of both recieving and dealing critical hits\""; + next; + mes "[Ian the Guide]"; + mes "\"I recommend that you practice your dexterity, since some of the more dangerous monsters are very hard to hit otherwise."; + mes "Don't bother trying to work on your luck, and your intelligence is probably not something anyone cares about either.\""; + next; + goto L_Menu_A; + +L_Magic: + mes "[Ian the Guide]"; + mes "\"The only active Mana Seed remaining is West of here somewhere, Ask Wyara, they may know more about it.\""; + next; + mes "\"In decades past, there was a Mana Seed in Tulimshar, from which people could draw magical energies. Unfortunately, the seed went dorment."; + mes "However, I've overheard the bard mentioning something about this recently... if you are interested in magic, try talking to him!\""; + next; + goto L_Menu_A; + +L_Key: + mes "[Ian the Guide]"; + mes "\"There are many key combinations, press F1 for a short list of them!\""; + next; + goto L_Menu_A; + +L_Laws: + mes "[Ian the Guide]"; + callfunc "GameRules"; + next; + goto L_Menu_A; + +L_Know: + mes "[Ian the Guide]"; + mes "\"Lost? Confused? Want to know why you can't get past a quest, overcome an NPC or find an item? Check http://wiki.themanaworld.org for player hints, walkthroughs, item lists and more!\""; + next; + mes "\"But remember, the game isn't fun when you already know what to do. Use it well or you will lose interest in playing The Mana World! Please help by reporting anything that is unclear, outdated or that needs to be seen on our forums at http://forums.themanaworld.org.\""; + close; + +L_Grad: + getinventorylist; + if (@inventorylist_count == 100) goto L_TooMany; + mes "[Ian the Guide]"; + mes "\"Hey, you've been doing good, let me give you this.\""; + getitem "GraduationCap", 1; + FLAGS = FLAGS | FLAG_GOT_GRADUATIONCAP; + next; + goto L_DoneGrad; + +L_TooMany: + mes "[Ian the Guide]"; + mes "\"I wanted to give you something, but you don't have room for it.\""; + next; + goto L_DoneGrad; +} diff --git a/npc/009-1/hamond.txt b/npc/009-1/hamond.txt deleted file mode 100644 index 25824589..00000000 --- a/npc/009-1/hamond.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Hamond, Reid's Husband -// THIS IS A PLACEHOLDER! - -009-1,37,170,0 script Hamond NPC_HAMOND,{ - speech - l("Hello, my name is Hamond."), - l("I run the inn together with my beautiful wife Reid."), - l("If there is anything I can do for you, please let me know."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-1/jack.txt b/npc/009-1/jack.txt new file mode 100755 index 00000000..f789ec00 --- /dev/null +++ b/npc/009-1/jack.txt @@ -0,0 +1,271 @@ + +009-1,40,45,0 script Jack NPC141,{ + @RAWLOGS_AMOUNT = 40; + @SHIELD_COST = 5000; + @QUEST_SHIELD_EXP = 2500; + + @Q_Forestbow_MASK = NIBBLE_0_MASK; + @Q_Forestbow_SHIFT = NIBBLE_0_SHIFT; + + @Q_Woodenshield_MASK = NIBBLE_1_MASK; + @Q_Woodenshield_SHIFT = NIBBLE_1_SHIFT; + + @Q_Forestbow = ((QUEST_Forestbow_state & @Q_Forestbow_MASK) >> @Q_Forestbow_SHIFT); + @Q_Woodenshield = ((QUEST_Forestbow_state & @Q_Woodenshield_MASK) >> @Q_Woodenshield_SHIFT); + + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@Q_Woodenshield >= 3) goto L_Shield_state_3; + if (@Q_Woodenshield == 2) goto L_Shield_state_2; + if (@Q_Woodenshield == 1) goto L_Shield_state_1; + if (@Q_Forestbow > 1) goto L_Bow_state_2; + + mes "[Jack Lumber]"; + mes "\"Hello there! My name is Jack Lumber, the enemy of all trees. If you need some firewood, just let me know.\""; + if (@inspector == 1) + goto L_NohMask_Ask; + goto L_NotInspector; + +L_NotInspector: + next; + if (@Q_Forestbow < 1) + goto L_close; + mes "I heard you aren't delivering any more living wood. Why not?"; + next; + goto L_Next; + +L_Next: + mes "[Jack Lumber]"; + mes "\"Why not?! I value my life, that's why!.\""; + next; + menu + "What do you mean?", L_Next1; + +L_Next1: + mes "[Jack Lumber]"; + mes "\"A week ago, I was going to chop down one of those twigleaf trees in the forest to the southwest – these twigleafs are the trees that give me the living wood you speak of. I was just chopping away with my axe, and guess what happened? One of its branches hit me! At first, I thought it fell down or the wind blew it, but it hurt! After I shook it off and struck the tree again with my axe, another branch hit me! I got angry and started to chop off all the low-hanging branches so this couldn't happen anymore. Even after all that though, I still can't believe what happened next.\""; + next; + menu + "What happened? ", L_Next2; + +L_Next2: + mes "[Jack Lumber]"; + mes "\"You'll think I'm insane if I tell you...\""; + next; + menu + "I won't. I promise.", L_Next3; + +L_Next3: + mes "[Jack Lumber]"; + mes "\"Alright, well... After I chopped off a few branches, the whole tree started to move! Its roots tore out of the earth, all the branches started to wave around, and a face appeared on the trunk. The whole tree CAME TO LIFE! It was mad!\""; + next; + menu + "Did you run away?", L_Next4, + "Did you fight it?", L_Next4; + +L_Next4: + mes "[Jack Lumber]"; + mes "\"I fought it, of course! I took my axe and attacked the beast! It hit me here *points at a bruise on his shoulder,* here *lifts his trouser leg to show another bruise,* and here *lifts his shirt and reveals even worse bruises.* But I didn't give up! I chopped away at it, branch after branch, and in the end I chopped off its roots, and it fell to the ground – motionless.\""; + next; + menu + "So you beat the monster? Then why are you so scared?", L_Next5; + +L_Next5: + mes "[Jack Lumber]"; + mes "\"Well, I was exhausted and had to rest. A few minutes passed, and suddenly I was practically surrounded by a dozen or more of these living trees!\""; + next; + menu + "Did you fight them too? ", L_Next6; + +L_Next6: + mes "[Jack Lumber]"; + mes "\"Are you crazy? I barely destroyed one of those beasts; I was in no shape to fight again! I ran away as fast as I could, and lucky for me the monsters aren't that fast on their tiny root legs. Ha!\""; + next; + menu + "So, I guess you aren't chopping down trees anymore?", L_Next7; + +L_Next7: + mes "[Jack Lumber]"; + mes "\"I still do; it's my job. But I'll no longer chop those twigleafs – I'll tell you that. I know the bow master wants some twigleaf wood, but I don't care. I won't risk MY life for a few gold pieces! If you really want to, just go to the southwest, but I can't help you. I won't go there ever again.\""; + next; + menu + "Southwest you say? OK, thank you.", L_Next8; + +L_Next8: + @Q_Forestbow = 2; + callsub S_Update_Mask; + goto L_close; + +L_Bow_state_2: + // Bow state 4: The player has found a perfect piece of wood. + if (@Q_Forestbow > 3) goto L_Bow_state_4; + + mes "\"Good luck hunting those tree monsters – you'll need it.\""; + if (@inspector != 1) + goto L_close; + goto L_NohMask_Ask; + +L_Bow_state_4: + mes "[Jack Lumber]"; + mes "\"You've finally found that perfect piece of living wood that Alan needs to make a Forest Bow, haven't you?\""; + next; + menu + "I couldn't afford the bow, though...", L_Shield_state_0, + "No, I'm still looking.", L_Bow_state_4_reaffirm, + "Yes, I've got the Forest bow now.", L_Next9, + "I'm a melee warrior, I don't need bows.", L_Shield_state_0; + +L_Next9: + // Check if the player tells the truth (continue on in any case) + if (@Q_Forestbow > 4) goto L_Shield_state_0; + + mes "[Jack Lumber]"; + mes "\"Hrmph. I'm someone who respects those speaking the truth.\""; + next; + goto L_Shield_state_0; + +L_Bow_state_4_reaffirm: + mes "[Jack Lumber]"; + mes "\"You should go talk to Alan again.\""; + goto L_close; + +L_Shield_state_0: + @Q_Woodenshield = 1; + callsub S_Update_Mask; + + mes "[Jack Lumber]"; + mes "\"You no doubt remember how I struggled with those beasts, fighting for my life. Scared me, those seven-branched little stumps did! Never since that day have I strayed near them, and yet there you are, cutting them down one by one. I'm proud of you – to dare to fight those trunks is admirable indeed. You're as strong as if you were my own child!\""; + next; + goto L_Shield_state_1; + +L_Shield_state_1: + mes "[Jack Lumber]"; + mes "\"I have an idea. What would you say about a new shield?\""; + next; + if (@inspector == 1) + menu + "No thanks.", L_close, + "Yes, please!", L_Yes, + "Actually, I'd like to know if you've seen any strange happenings in town.", L_NohMask_Answer; + menu + "No thanks.", L_close, + "Yes, please!", L_Yes; + +L_Yes: + mes "[Jack Lumber]"; + mes "\"All I need is " + @RAWLOGS_AMOUNT + " raw logs. This needn't be high quality wood; pretty much any log you can find should work. Oh, and I'll also need " + @SHIELD_COST + " GP for other materials.\""; + next; + @Q_Woodenshield = 2; + callsub S_Update_Mask; + goto L_close; + +L_Shield_state_2: + mes "[Jack Lumber]"; + mes "\"Do you have the " + @RAWLOGS_AMOUNT + " raw logs and " + @SHIELD_COST + " GP for the shield?\""; + menu + "Here it is.", L_Next10, + "I'll come back later.", L_close; + +L_Next10: + if (countitem("RawLog") < @RAWLOGS_AMOUNT) + goto L_Not_enough_logs; + if (Zeny < @SHIELD_COST) + goto L_Not_enough_money; + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + delitem "RawLog", @RAWLOGS_AMOUNT; + Zeny = Zeny - @SHIELD_COST; + getexp @QUEST_SHIELD_EXP, 0; + getitem "WoodenShield", 1; + @Q_Woodenshield = 3; + callsub S_Update_Mask; + mes "[Jack Lumber]"; + mes "\"Have a seat.\""; + mes "Jack saws the logs into pieces and then sands them until they are smooth to the touch."; + mes "Applying some strong-smelling liquid, he tans them to a darker hue."; + next; + mes "[Jack Lumber]"; + mes "Grabbing one of two leftover pieces, he begins to carve it into a round shape, then repeats this with the second piece – shield handles from what you can tell."; + next; + mes "[Jack Lumber]"; + mes "Meanwhile, the sun has dried the other pieces. Jack places them next to each other, adds a frame, and nails everything together."; + mes "The resulting shield looks usable already, but Jack applies another liquid to it and leaves it to dry for a few moments."; + next; + mes "[Jack Lumber]"; + mes "Finally, he hands the shield to you."; + mes "\"Enjoy your new shield!\""; + mes "[" + @QUEST_SHIELD_EXP + " experience points]"; + next; + goto L_close; + +L_Not_enough_logs: + mes "[Jack Lumber]"; + mes "\"You don't have enough wood for me to craft this shield; I need a total of " + @RAWLOGS_AMOUNT + " raw logs.\""; + goto L_close; + +L_Not_enough_money: + mes "[Jack Lumber]"; + mes "\"I'm afraid that you don't have enough gold. I need " + @SHIELD_COST + " GP to finish your shield.\""; + goto L_close; + +L_TooMany: + mes "[Jack Lumber]"; + mes "\"You don't have enough room to carry the shield. Come back when you do.\""; + goto L_close; + +L_Shield_state_3: + mes "[Jack Lumber]"; + mes "\"I hope that my shield will serve you well!\""; + next; + if (@inspector != 1) + goto L_Made_Shield; + menu + "Me too.", L_Made_Shield, + "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer; + +L_NohMask_Ask: + menu + "I'll keep that in mind.", L_close, + "I heard you aren't delivering any more living wood. Why not?", L_Next, + "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer; + +L_NohMask_Answer: + mes "[Jack Lumber]"; + mes "\"Sorry, no.\""; + goto L_close; + +L_Made_Shield: + mes "[Jack Lumber]"; + mes "\"Speaking of that shield...\""; + mes "\"It has put me behind on all these new Nivalis orders, now that the ship is running there.\""; + next; + mes "\"Care to help out? I'll pay you for your time.\""; + goto L_Daily; + +L_Daily: + @dq_level = 30; + @dq_cost = 25; + @dq_count = 30; + @dq_name$ = "RawLog"; + @dq_friendly_name$ = "raw logs"; + @dq_money = 4000; + @dq_exp = 4000; + + callfunc "DailyQuest"; + + next; + + mes "[Jack Lumber]"; + mes "\"Check back with me tomorrow, and I'll let you know if I need any help with that shipment.\""; + + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Mask: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(@Q_Forestbow_MASK | @Q_Woodenshield_MASK)) | (@Q_Forestbow << @Q_Forestbow_SHIFT) | (@Q_Woodenshield << @Q_Woodenshield_SHIFT); + return; +} diff --git a/npc/009-1/mapflags.txt b/npc/009-1/mapflags.txt new file mode 100755 index 00000000..6fd55565 --- /dev/null +++ b/npc/009-1/mapflags.txt @@ -0,0 +1,2 @@ +//009-1 mapflag town +//009-1 mapflag resave 009-2,149,43 diff --git a/npc/009-1/milly.txt b/npc/009-1/milly.txt new file mode 100755 index 00000000..b0c88c7a --- /dev/null +++ b/npc/009-1/milly.txt @@ -0,0 +1,452 @@ + +009-1,81,41,0 script Milly NPC114,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + @got_boneknife = ((QUEST_Forestbow_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) >= 4; + @got_setzer = ((QUEST_Forestbow_state & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) >= 8; + @saved_rossy = (FLAGS & FLAG_ROSSI_COMPLETED); + @saved_cindy = QL_CINDY == 4; + + if (FLAGS & FLAG_GOT_BEANIEHAT) goto L_FinishedGood; + if (FLAGS & FLAG_DECLINED_BEANIEHAT) goto L_FinishedBad; + + if (@saved_rossy && @saved_cindy && @got_setzer && (BOSS_POINTS >= 5000)) goto L_OfferCap; + if (@got_setzer) goto L_GotSetzer; + if (@saved_cindy) goto L_SavedCindy; + if (@saved_rossy) goto L_SavedRossy; + if (@got_boneknife) goto L_GotBoneKnife; + if (BaseLevel > 40) goto L_NoKnifeYet; + + mes "[Milly]"; + mes "\"Hello traveler, welcome to Hurnscald.\""; + next; + callsub S_InspectorMaybe; + + mes "\"Have you met Kfahr yet? He is the greatest hero that ever walked the land of Hurnscald!\""; + menu + "Hi! No, I haven't seen him yet.", L_Where, + "Where can I find him?", L_Where, + "Mh, I don't care for heroes.", L_Care, + "Hello, yes I have met him.", L_MetKfahr; + +L_Where: + mes "[Milly]"; + mes "\"I highly recommend you seek him out! He is a regular at the inn, located in the north-west part of town. If you are lucky he might tell you a story about his adventures.\""; + goto L_close; + +L_Care: + mes "[Milly]"; + mes "\"What? Surely you do not appreciate what a hero he is! Mh, or perhaps honor is dead in you; for you to be so slow to comprehend the good that his exploits have wrought for us. Put on your thinking cap and be propelled into high adventure! Go to Kfahr, and listen to his stories.\""; + next; + mes "\"You can't have met him. No one who has met him would say such silly things.\""; + next; + goto L_Where; + +L_MetKfahr: + mes "[Milly]"; + mes "\"Oh, I hope you stayed and listened to his stories about his adventures.\""; + goto L_close; + +L_NoKnifeYet: + mes "[Milly]"; + mes "\"Hi again.\""; + next; + callsub S_InspectorMaybe; + + mes "\"Have you talked to Kfahr lately?\""; + menu + "Yes.", L_TalkKfahr, + "No.", L_HintKnife; + +L_TalkKfahr: + mes "[Milly]"; + mes "\"Is it true as the rumors say? ...\""; + next; + goto L_HintKnife; + +L_HintKnife: + mes "[Milly]"; + mes "\"You really should go meet him.\""; + next; + mes "\"I've heard that he is helping adventurers such as yourself with some exotic gear.\""; + menu + "I am not sure, I'd better go talk to him again.", L_Unsure, + "Yes, it is true.", L_True; + +L_Unsure: + mes "[Milly]"; + mes "\"You better hurry up before he changes his mind!\""; + goto L_close; + +L_True: + mes "[Milly]"; + mes "\"So, why haven't you accepted his generous offer?\""; + menu + "I was just about to...", L_Unsure, + "I don't need any help.", L_NoHelp; + +L_NoHelp: + mes "[Milly]"; + mes "\"You must be kidding me.\""; + next; + mes "\"I am just a kid but not as silly as you. My pigtails possess more wisdom than you. You fooled me, you are no adventurer!\""; + next; + mes "\"You better learn from the wise and accept help from those who offer it.\""; + goto L_Unsure; + +L_GotBoneKnife: + mes "[Milly]"; + mes "\"Hi there.\""; + next; + callsub S_InspectorMaybe; + + mes "\"I heard that you got an exotic knife from Kfahr."; + mes "Would you kindly show it to me?\""; + menu + "Sure.", L_ShowKnife, + "Haven't I already?", L_ShowKnifeAgain; + +L_ShowKnife: + if (countitem("BoneKnife") < 1) + goto L_ShowKnifeNo; + mes "[Milly]"; + mes "\"Wow! That is a knife fitting a real adventurer!\""; + next; + mes "\"Kfahr ain't just a hero, he is also a stand up guy.\""; + next; + mes "\"You should be proud that he is honoring you with his knife like this.\""; + next; + mes "\"What a hero...\""; + goto L_close; + +L_ShowKnifeAgain: + mes "[Milly]"; + mes "\"What possible objection could you have? It's so exiting to see such a fine knife.\""; + next; + mes "\"It is like cake, sure I might have had it before...\""; + next; + mes "\"... but does that stop me from wanting it once more?\""; + next; + mes "\"NO!\""; + next; + mes "\"Please let me see it!\""; + menu + "Okay.", L_ShowKnife, + "Enough is enough.", L_ShowKnifeNo; + +L_ShowKnifeNo: + mes "[Milly]"; + mes "\"I hope that the reason that you don't show it to me is because you have it tucked away somewhere safe.\""; + next; + mes "\"Otherwise you are just a bore...\""; + next; + mes "\"Don't be boring!\""; + goto L_close; + +L_SavedRossy: + mes "[Milly]"; + mes "\"Hi friend!\""; + next; + callsub S_InspectorMaybe; + + mes "\"Word of your fame has spread throughout all Hurnscald of your great heroism by helping my friends Rossy and Julia!\""; + next; + mes "\"Not only did you help Rossy, you saved her sister Julia from that nefarious Fey Element. That was a real act of valor!\""; + next; + mes "\"You are shaping up to be something of a hero yourself.\""; + next; + mes "\"I am so happy that you came to Hurnscald, without you I'm not so sure that Julia would have been saved.\""; + menu + "You're right, I am a hero!", L_Loudmouth, + "I'm doing my best!", L_Modesty; + +L_Loudmouth: + mes "[Milly]"; + mes "\"You surely are not...\""; + next; + mes "\"First and foremost you are a loudmouth. You need to learn actions speak better for themselves without your boasting.\""; + next; + mes "\"A little modesty would be a distinguishing trait for you to cultivate. You are talking as if you think that you are equal with Kfahr.\""; + next; + mes "\"I think you should show a little more respect when you are this close to legendary heroes.\""; + goto L_close; + +L_Modesty: + mes "[Milly]"; + mes "\"Wow, you have been very helpful and unselfish risking your own safety for the sake of others! Thanks to that Julia is back and Olana is able to sleep at night.\""; + next; + mes "\"If you continue with these valiant deeds you might earn your place in the history books of Hurnscald!\""; + goto L_close; + +L_SavedCindy: + mes "[Milly]"; + mes "\"Hi!\""; + next; + callsub S_InspectorMaybe; + + mes "\"Are the rumors true?\""; + next; + mes "\"Word is going around that you saved a girl called Cindy who was captured by Yetis in Nivalis, and that you arranged a rescue party getting her back from a deep Yeti inhibited cave.\""; + menu + "Thanks to the party, yes.", L_Party, + "Yes, it is true!", L_Cindy; + +L_Party: + mes "[Milly]"; + mes "\"Wow! Not only are you brave, you also have the wisdom to seek help when needed!\""; + next; + mes "\"Being a skilled fighter is good. But being a skilled fighter coupled with your wits and organizational skill, now that is something special!\""; + goto L_HeroGrowing; + +L_Cindy: + mes "[Milly]"; + mes "\"Once again you have done good!\""; + goto L_HeroGrowing; + +L_HeroGrowing: + mes "[Milly]"; + mes "\"You have saved two kids about my own age from horrible situations, it is just like the stories I heard growing up.\""; + next; + mes "\"Things certainly are shaping up for you. My schoolmates play a game with you as the hero. And poets admire you in verse and song...\""; + next; + mes "\"Since you have proven yourself with your great acts, I will let you in on an exciting rumor I have heard.\""; + next; + mes "\"I have heard that Nicholas has learned new techniques in forging and weapon smithing. He is now able to improve a small sword into what is called a Setzer.\""; + next; + mes "\"Go talk to him and hear if he can help you get hold of one of these weapons.\""; + goto L_close; + +L_GotSetzer: + mes "[Milly]"; + mes "\"Hello!\""; + next; + callsub S_InspectorMaybe; + + mes "\"I heard that you got hold of a Setzer!\""; + next; + mes "\"And the fact that Kfahr helped you means he really rates you as a fellow adventurer!\""; + next; + mes "\"Praise does not get much better than that around here. He knows a good adventurer when he see one, you must have impressed him!\""; + if (!@saved_cindy || !@saved_rossy) + goto L_close; + next; + mes "\"To be honest you are fast becoming my favored hero, even... dare I say it? Even more so than Kfahr.\""; + next; + mes "\"Your skill and good deeds are indisputable! However...\""; + next; + mes "\"Somehow I feel that you still need to establish your courage. The elders say that although they find you an admirable person, a hero of renown; that you can't be considered as great as Kfahr till you have proven yourself fearless.\""; + next; + mes "\"You could prove yourself as the greatest hero who has walked the land by accepting Paruas challenge at Candor. Stare death in the eyes, show no fear and conquer! Show everyone that you are worthy of the title: The Greatest Hero Ever!\""; + next; + mes "\"I myself already consider you my favorite hero, sure Kfahr has done great things, but...\""; + next; + mes "\"Nowadays he mostly sits around with that sad bunch of drunkards in the Inn, drinking beer and talking about past glory.\""; + next; + mes "\"For my generation you are the true hero, please prove the stony hearted elders wrong by showing them that you are fearless!\""; + next; + mes "\"Good luck and good bye! Health, mana, and wealth be yours! \""; + goto L_close; + +L_OfferCap: + mes "[Milly]"; + mes "\"Hi there, hero of Hurnscald!\""; + next; + callsub S_InspectorMaybe; + + mes "\"You really have proven yourself over and over. There is no way anyone could possibly say, you are not the equal of Kfahr!\""; + next; + mes "\"Now, even the stones of Hurnscald praise you as a hero as great as Kfahr!\""; + next; + mes "\"I have something I want to give you...\""; + next; + mes "\"I was given two of those helicopter beanie caps at my birthday. I told everyone that it was what I really wanted so I got two of them...\""; + next; + mes "\"And some other kids are picking on me for wearing it, they say it is for nerds... I would be happy to give you one of them.\""; + next; + mes "\"It would be great if you wore a cap just like mine, that would sure shut them up! Also, please accept this rare hat as a token of my gratitude for everything you have done.\""; + next; + mes "\"It would be an honor to have the same cap as my hero!\""; + menu + "Thank you!", L_Cap, + "No, thanks.", L_Idiot; + +L_Cap: + mes "[Milly]"; + mes "\"Wow, thanks for accepting my gift, it is so pleasing to know that you have the exact same cap as me! Friends forever!\""; + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("BeanieCopter", 1) == 0)) + goto L_TooMany; + getitem "BeanieCopter", 1; + FLAGS = FLAGS | FLAG_GOT_BEANIEHAT; + next; + mes "She is giggling with excitement."; + next; + mes "[Milly]"; + mes "\"Come see me anytime! Goodbye!\""; + goto L_close; + +L_Idiot: + mes "[Milly]"; + mes "\"Are you really sure? It is such a neat cap.\""; + menu + "Yes, no nerd hat for me!", L_BadBye, + "Just kidding, I want one!", L_Cap; + +L_BadBye: + mes "Tears are forming in her eyes."; + mes "[Milly]"; + mes "\"I guess they were right, you're not any great hero! I'll give it to Kfahr instead!\""; + next; + mes "\"Please keep on traveling so I don't have to see you around here. It makes me sad to see you, every time I do I'll remember how wrong I was about you.\""; + FLAGS = FLAGS | FLAG_DECLINED_BEANIEHAT; + goto L_close; + +L_TooMany: + mes "[Milly]"; + mes "\"You don't have any space left to carry it, go put some stuff in the storage and come back!\""; + goto L_close; + +L_FinishedGood: + mes "[Milly]"; + mes "\"Hi there friend, my hero!\""; + next; + callsub S_InspectorMaybe; + + mes "\"Wear the copter beany cap in good health, mana and wealth! See you around!\""; + goto L_close; + +L_FinishedBad: + mes "[Milly]"; + mes "\"Oh, it's you. I suppose you're here to make fun of my hat again.\""; + next; + callsub S_InspectorMaybe; + mes "\"Won't you continue your travels soon?\""; + menu + "That's what I'm going to do.", L_Next, + "I'm really sorry. Of course I want your hat!", L_Apologize; + +L_Next: + mes "Milly looks away sadly."; + goto L_close; + +L_Apologize: + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("BeanieCopter", 1) == 0)) + goto L_TooMany; + getitem "BeanieCopter", 1; + FLAGS = FLAGS | FLAG_GOT_BEANIEHAT; + FLAGS = FLAGS & ~FLAG_DECLINED_BEANIEHAT; + + mes "Milly looks surprised."; + next; + mes "[Milly]"; + mes "\"Oh, I... uh, thank you! I knew it! I knew such a heroic person as you can't be that mean.\""; + goto L_close; + +L_close: + @got_boneknife = 0; + @got_setzer = 0; + @saved_rossy = 0; + @saved_cindy = 0; + @inspector = 0; + close; + +S_InspectorMaybe: + if (@inspector != 1) + goto L_Return; + menu + "Have you seen anything strange lately?", L_NohMask_Strange, + "Do you know anything about the recent robberies?", L_NohMask_Robbery, + "Hello.", L_Return; + +L_NohMask_Strange: + mes "[Milly]"; + mes "\"I haven't seen anything strange.\""; + next; + goto L_Return; + +L_NohMask_Robbery: + mes "[Milly]"; + mes "\"No, sorry.\""; + next; + goto L_Return; + +L_Return: + return; +} + +009-1,82,41,0 script MillyDebugHelper NPC114,{ + mes "You can set certain quests as finished or not finished. What would you like to do?"; + menu + "Bone Knife Quest done.", L_DBoneKnife, + "Rossy Quest done.", L_DRossy, + "Cindy Quest done.", L_DCindy, + "Setzer Quest done.", L_DSetzer, + "Gain 5000 Boss Points.", L_DBossPoints, + "Bone Knife and Setzer Quest not done.", L_NBoneKnife, + "Rossy Quest not done.", L_NRossy, + "Cindy Quest not done.", L_NCindy, + "Setzer Quest not done.", L_NSetzer, + "Remove all Boss Points.", L_NBossPoints, + "Nothing.", L_close; + +L_DBoneKnife: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_2_MASK)) | (4 << NIBBLE_2_SHIFT); + mes "Bone Knife quest set to completed."; + close; + +L_DSetzer: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_2_MASK)) | (4 << NIBBLE_2_SHIFT); + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_3_MASK)) | (8 << NIBBLE_3_SHIFT); + mes "Setzer quest set to completed. This includes the Bone Knife quest."; + close; + +L_DRossy: + FLAGS = FLAGS | FLAG_ROSSI_COMPLETED; + mes "Rossy quest set to completed."; + close; + +L_DCindy: + QL_CINDY = 4; + mes "Cindy quest set to completed."; + close; + +L_DBossPoints: + BOSS_POINTS = 5000; + mes "Boss Points set to 5000."; + close; + +L_NBoneKnife: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_2_MASK)) | (0 << NIBBLE_2_SHIFT); + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_3_MASK)) | (0 << NIBBLE_3_SHIFT); + mes "Bone Knife and Setzer quest set to not completed."; + close; + +L_NSetzer: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(NIBBLE_3_MASK)) | (0 << NIBBLE_3_SHIFT); + mes "Bone Knife and Setzer quest set to not completed."; + close; + +L_NRossy: + FLAGS = FLAGS & ~FLAG_ROSSI_COMPLETED; + mes "Rossy quest set to not completed."; + close; + +L_NCindy: + QL_CINDY = 0; + mes "Cindy quest set to not completed."; + close; + +L_NBossPoints: + BOSS_POINTS = 0; + mes "Boss Points set to 0."; + close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "MillyDebugHelper"; + end; +} diff --git a/npc/009-1/old_man.txt b/npc/009-1/old_man.txt new file mode 100755 index 00000000..96b19a39 --- /dev/null +++ b/npc/009-1/old_man.txt @@ -0,0 +1,38 @@ + +009-1,85,51,0 script Old Man NPC159,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + mes "[Old Man]"; + mes "\"Don't let those monsters get to you.\""; + next; + if (@inspector == 1) goto L_Ask; + if (@inspector == 6) goto L_Accuse; + goto L_close; + +L_Ask: + menu + "Have you seen anything strange lately?", L_Ask_Nothing, + "Do you know anything about the recent robberies?", L_Ask_Nothing, + "I won't, thank you.", L_close; + +L_Ask_Nothing: + mes "[Old Man]"; + mes "\"I'm sorry, but I didn't see anything. You should ask my old woman.\""; + goto L_close; + +L_Accuse: + menu + "The leader of the troupe said you hung around them a lot while they were in town.", L_Accuse_Respond, + "I won't, thank you.", L_close; + +L_Accuse_Respond: + mes "[Old Man]"; + mes "\"Yes, I hung around the theater a lot. I was an actor when I was younger. But I wasn't there that night. Me and the wife were at home all night.\""; + @inspector = 7; + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/009-1/old_woman.txt b/npc/009-1/old_woman.txt new file mode 100755 index 00000000..441b425a --- /dev/null +++ b/npc/009-1/old_woman.txt @@ -0,0 +1,83 @@ + +009-1,29,43,0 script Old Woman NPC154,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (BaseLevel < 40) goto L_Lower; + + mes "[Old Woman]"; + mes "\"Hello deary.\""; + if ((@inspector >= 1 && @inspector <= 7) || @inspector == 9) + goto L_NohMask; + close; + +L_Lower: + mes "[Old Woman]"; + mes "\"Watch out for these flowers. They don't like to be messed with.\""; + if ((@inspector >= 1 && @inspector <= 7) || @inspector == 9) + goto L_NohMask; + close; + +L_NohMask: + next; + if (@inspector == 7) + goto L_NohMask_Alibi; + callfunc "ProcessEquip"; + if (@torsoC == cDarkBlue && @legsC == cDarkBlue) + goto L_NohMask_Fake; + if (@inspector >= 3 && @inspector <= 6) + goto L_close; + menu + "Have you seen anything strange lately?", L_NohMask_FirstAsk, + "Do you know anything about the recent robberies?", L_NohMask_FirstAsk, + "Hello", L_close; + +L_NohMask_FirstAsk: + mes "[Old Woman]"; + mes "\"Yes, but I'm only talking to the inspector himself!\""; + if (@inspector != 1) + goto L_close; + @inspector = 2; + callsub S_Update_Mask; + goto L_close; + +L_NohMask_Alibi: + menu + "Was your husband with you at home all night the last night that the troupe was in town?", L_Next; + +L_Next: + mes "[Old Woman]"; + mes "\"Yes, we were both at home all night.\""; + @inspector = 8; + callsub S_Update_Mask; + goto L_close; + +L_NohMask_Fake: + if (@inspector == 9) goto L_NohMask_Fake_Satchel; + if (@inspector >= 3 && @inspector <= 6) goto L_NohMask_Filler; + + mes "[Old Woman]"; + mes "\"I saw someone sneaking around town wearing a theater mask. It looked like one of the masks used by the troupe that was in town recently.\""; + @inspector = 3; + callsub S_Update_Mask; + goto L_close; + +L_NohMask_Filler: + mes "[Old Woman]"; + mes "\"I hope you catch that naughty person!\""; + goto L_close; + +L_NohMask_Fake_Satchel: + mes "[Old Woman]"; + mes "\"I've remembered something else. The night the troupe left, I saw someone with a theater mask take a large satchel out of town. He was heading north.\""; + @inspector = 10; + callsub S_Update_Mask; + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + return; +} diff --git a/npc/009-1/sabine.txt b/npc/009-1/sabine.txt new file mode 100755 index 00000000..335d75e6 --- /dev/null +++ b/npc/009-1/sabine.txt @@ -0,0 +1,29 @@ + +009-1,88,27,0 script Sabine NPC106,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + mes "[Sabine]"; + mes "\"Isn't this place pretty? I love hanging out here!\""; + next; + if (@inspector != 1) + goto L_close; + + menu + "Have you seen anything strange lately?", L_NohMask_Strange, + "Do you know anything about the recent robberies?", L_NohMask_Robbery, + "Yes, it is.", L_close; + +L_NohMask_Strange: + mes "[Sabine]"; + mes "\"I haven't seen anything strange.\""; + goto L_close; + +L_NohMask_Robbery: + mes "[Sabine]"; + mes "\"No, sorry.\""; + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/009-1/soul-menhir.txt b/npc/009-1/soul-menhir.txt old mode 100644 new mode 100755 index 76c5be11..d197a5f0 --- a/npc/009-1/soul-menhir.txt +++ b/npc/009-1/soul-menhir.txt @@ -1,7 +1,15 @@ -// The Mana World scripts. -// Description: -// place of power, mana refills faster when sitting nearby - -// Soul Menhir#town_rate_dist_timer -009-1,51,173,0 duplicate(Soul Menhir) Soul Menhir#moor_1_7_300 NPC_NO_SPRITE +009-1,53,40,0 script Soul Menhir#hurnscald NPC344,{ + @map$ = "009-1"; + setarray @Xs, 52, 53, 54, 52, 54, 52, 54; + setarray @Ys, 39, 39, 39, 40, 40, 41, 41; + @x = 0; + @y = 0; + callfunc "SoulMenhir"; + @map$ = ""; + cleararray @Xs[0], 0, 7; + cleararray @Ys[0], 0, 7; + @x = 0; + @y = 0; + close; +} diff --git a/npc/009-1/thurstan.txt b/npc/009-1/thurstan.txt deleted file mode 100644 index 3eb8fbdc..00000000 --- a/npc/009-1/thurstan.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Thurstan, a headless man (because Golbenez, for sure) -// THIS IS A PLACEHOLDER! - -009-1,84,169,0 script Thurstan NPC_THURSTAN,{ - mesc l("You see a man, propped up against the foot of the tree."); - mesc l("In his hand, he is holding what you assume to be his own head."); - next; - mesc l("You jump back a bit, startled, as the head starts talking to you!"); - mesc l("It's a little strange watching him talk, but it's better than looking at what's left of his neck."); - next; - mesn; - mesq l("Greetings! Do you have any duck tape?"); // Perhaps duct tape? - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-1/water_pump.txt b/npc/009-1/water_pump.txt new file mode 100755 index 00000000..eca2e8be --- /dev/null +++ b/npc/009-1/water_pump.txt @@ -0,0 +1,5 @@ + +009-1,76,33,0 script Water Pump NPC400,{ + callfunc "WaterBottle"; + end; +} diff --git a/npc/009-1/wateranimation.txt b/npc/009-1/wateranimation.txt deleted file mode 100644 index d6912af7..00000000 --- a/npc/009-1/wateranimation.txt +++ /dev/null @@ -1,10 +0,0 @@ -// The Mana World scripts. -// Description: -// Water animations, splash, fishes, etc... - -009-1,109,56,0 duplicate(#fish_river) #swamp_fish01 NPC_WATER_SPLASH -009-1,114,74,0 duplicate(#fish_river) #swamp_fish02 NPC_WATER_SPLASH -009-1,97,82,0 duplicate(#fish_river) #swamp_fish03 NPC_WATER_SPLASH -009-1,97,74,0 duplicate(#fish_river) #swamp_fish04 NPC_WATER_SPLASH -009-1,110,65,0 duplicate(#fish_river) #swamp_fish05 NPC_WATER_SPLASH - diff --git a/npc/009-2-0/_import.txt b/npc/009-2-0/_import.txt deleted file mode 100644 index 9054121f..00000000 --- a/npc/009-2-0/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-0: Soren's Home -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-0/_warps.txt", diff --git a/npc/009-2-0/_warps.txt b/npc/009-2-0/_warps.txt deleted file mode 100644 index 56769a5c..00000000 --- a/npc/009-2-0/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-0: Soren's Home warps -009-2-0,32,40,0 warp #009-2-0_32_40 1,0,009-1,160,91 diff --git a/npc/009-2-1/_import.txt b/npc/009-2-1/_import.txt deleted file mode 100644 index 2c025b07..00000000 --- a/npc/009-2-1/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-1: Migglemire Townhall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-1/_warps.txt", diff --git a/npc/009-2-1/_warps.txt b/npc/009-2-1/_warps.txt deleted file mode 100644 index 8ecaf6a3..00000000 --- a/npc/009-2-1/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-1: Migglemire Townhall warps -009-2-1,35,45,0 warp #009-2-1_35_45 1,0,009-1,174,78 diff --git a/npc/009-2-10/_import.txt b/npc/009-2-10/_import.txt deleted file mode 100644 index 964d28a6..00000000 --- a/npc/009-2-10/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-10: Migglemire Crypt Level 2 -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-10/_warps.txt", diff --git a/npc/009-2-10/_warps.txt b/npc/009-2-10/_warps.txt deleted file mode 100644 index 4a28845e..00000000 --- a/npc/009-2-10/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-10: Migglemire Crypt Level 2 warps -009-2-10,41,33,0 warp #009-2-10_41_33 2,0,009-2-9,40,40 -009-2-10,51,41,0 warp #009-2-10_51_41 2,0,009-2-11,29,28 diff --git a/npc/009-2-11/_import.txt b/npc/009-2-11/_import.txt deleted file mode 100644 index 34f7cbd6..00000000 --- a/npc/009-2-11/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-11: Migglemire Crypt Boss Chamber -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-11/_warps.txt", diff --git a/npc/009-2-11/_warps.txt b/npc/009-2-11/_warps.txt deleted file mode 100644 index 57985373..00000000 --- a/npc/009-2-11/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-11: Migglemire Crypt Boss Chamber warps -009-2-11,29,27,0 warp #009-2-11_29_27 2,0,009-2-10,51,40 diff --git a/npc/009-2-12/_import.txt b/npc/009-2-12/_import.txt deleted file mode 100644 index 329928e0..00000000 --- a/npc/009-2-12/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-12: Asphodel Moor Crypt Ground Level -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-12/_warps.txt", diff --git a/npc/009-2-12/_warps.txt b/npc/009-2-12/_warps.txt deleted file mode 100644 index 23182569..00000000 --- a/npc/009-2-12/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-12: Asphodel Moor Crypt Ground Level warps -009-2-12,29,44,0 warp #009-2-12_29_44 1,0,009-1,95,793 -009-2-12,41,44,0 warp #009-2-12_41_44 1,0,009-2-13,60,46 diff --git a/npc/009-2-13/_import.txt b/npc/009-2-13/_import.txt deleted file mode 100644 index 9d732c47..00000000 --- a/npc/009-2-13/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-13: Asphodel Moor Crypt Level 2 -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-13/_warps.txt", diff --git a/npc/009-2-13/_warps.txt b/npc/009-2-13/_warps.txt deleted file mode 100644 index 9b003dca..00000000 --- a/npc/009-2-13/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-13: Asphodel Moor Crypt Level 2 warps -009-2-13,60,45,0 warp #009-2-13_60_45 2,0,009-2-12,40,43 -009-2-13,41,29,0 warp #009-2-13_41_29 0,2,009-2-14,61,37 diff --git a/npc/009-2-14/_import.txt b/npc/009-2-14/_import.txt deleted file mode 100644 index 0c78394b..00000000 --- a/npc/009-2-14/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-14: Asphodel Moor Crypt Boss Chamber -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-14/_warps.txt", diff --git a/npc/009-2-14/_warps.txt b/npc/009-2-14/_warps.txt deleted file mode 100644 index 6da17a0d..00000000 --- a/npc/009-2-14/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-14: Asphodel Moor Crypt Boss Chamber warps -009-2-14,62,37,0 warp #009-2-14_62_37 0,2,009-2-13,42,29 diff --git a/npc/009-2-15/_import.txt b/npc/009-2-15/_import.txt deleted file mode 100644 index 6a79a87b..00000000 --- a/npc/009-2-15/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-15: Chapel -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-15/_warps.txt", diff --git a/npc/009-2-15/_warps.txt b/npc/009-2-15/_warps.txt deleted file mode 100644 index 00e194e0..00000000 --- a/npc/009-2-15/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-15: Chapel warps -009-2-15,44,41,0 warp #009-2-15_44_41 1,0,009-1,212,148 -009-2-15,28,42,0 warp #009-2-15_28_42 0,0,009-1,206,149 -009-2-15,26,32,0 warp #009-2-15_26_32 2,0,009-2-16,27,35 diff --git a/npc/009-2-16/_import.txt b/npc/009-2-16/_import.txt deleted file mode 100644 index 6da0f6d3..00000000 --- a/npc/009-2-16/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-16: Chapel Tower 1st Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-16/_warps.txt", diff --git a/npc/009-2-16/_warps.txt b/npc/009-2-16/_warps.txt deleted file mode 100644 index 00ddcacb..00000000 --- a/npc/009-2-16/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-16: Chapel Tower 1st Floor warps -009-2-16,33,36,0 warp #009-2-16_33_36 1,0,009-2-17,26,35 -009-2-16,27,36,0 warp #009-2-16_27_36 2,0,009-2-15,26,33 diff --git a/npc/009-2-17/_import.txt b/npc/009-2-17/_import.txt deleted file mode 100644 index b7303201..00000000 --- a/npc/009-2-17/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-17: Chapel Tower 2nd Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-17/_warps.txt", diff --git a/npc/009-2-17/_warps.txt b/npc/009-2-17/_warps.txt deleted file mode 100644 index a86a0a91..00000000 --- a/npc/009-2-17/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-17: Chapel Tower 2nd Floor warps -009-2-17,33,36,0 warp #009-2-17_33_36 1,0,009-2-18,67,160 -009-2-17,27,36,0 warp #009-2-17_27_36 1,0,009-2-16,33,35 diff --git a/npc/009-2-18/_import.txt b/npc/009-2-18/_import.txt deleted file mode 100644 index ec6f6a4d..00000000 --- a/npc/009-2-18/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-18: Chapel Tower Top -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-18/_warps.txt", diff --git a/npc/009-2-18/_warps.txt b/npc/009-2-18/_warps.txt deleted file mode 100644 index 76d9c59a..00000000 --- a/npc/009-2-18/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-18: Chapel Tower Top warps -009-2-18,27,36,0 warp #009-2-18_27_36 1,0,009-2-17,33,35 diff --git a/npc/009-2-2/_import.txt b/npc/009-2-2/_import.txt deleted file mode 100644 index 84a2b757..00000000 --- a/npc/009-2-2/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-2: Gardenhouse -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-2/_warps.txt", diff --git a/npc/009-2-2/_warps.txt b/npc/009-2-2/_warps.txt deleted file mode 100644 index 950b9671..00000000 --- a/npc/009-2-2/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-2: Gardenhouse warps -009-2-2,32,40,0 warp #009-2-2_32_40 0,0,009-1,184,102 diff --git a/npc/009-2-3/_import.txt b/npc/009-2-3/_import.txt deleted file mode 100644 index 3fa1bf43..00000000 --- a/npc/009-2-3/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 009-2-3: Reid's Inn -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-3/_warps.txt", -"npc/009-2-3/barbara.txt", -"npc/009-2-3/chef.txt", -"npc/009-2-3/reid.txt", diff --git a/npc/009-2-3/_warps.txt b/npc/009-2-3/_warps.txt deleted file mode 100644 index a61ea11b..00000000 --- a/npc/009-2-3/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-3: Reid's Inn warps -009-2-3,42,40,0 warp #009-2-3_42_40 1,0,009-1,34,169 -009-2-3,56,28,0 warp #009-2-3_56_28 0,0,009-2-5,55,31 -009-2-3,56,42,0 warp #009-2-3_56_42 0,0,009-2-4,56,39 diff --git a/npc/009-2-3/barbara.txt b/npc/009-2-3/barbara.txt deleted file mode 100644 index b555b472..00000000 --- a/npc/009-2-3/barbara.txt +++ /dev/null @@ -1,17 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// ??? -// THIS IS A PLACEHOLDER! - -009-2-3,41,30,0 script Barbara Grey NPC_UNDEAD_RECPTION,{ - speech - l("Don't be shy, darling."), - l("Come on in and have a nice long... long slumber..."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-3/chef.txt b/npc/009-2-3/chef.txt deleted file mode 100644 index 6b5ca4c0..00000000 --- a/npc/009-2-3/chef.txt +++ /dev/null @@ -1,91 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// The nameless chef of Reid's Inn - -009-2-3,27,41,0 script Chef#Reid NPC_REIDCHEF,{ - function cookingIntro; - function cookingDeal; - .@q=getq(General_Cooking); - mesn; - mesq l("You're in the way. Get moving!"); - // TODO: Shop option - if (.@q == 5) - cookingIntro(); - if (.@q == 9) - cookingDeal(); - close; - -function cookingIntro { - .@q2=getq2(General_Cooking); - next; - select - l("Okay, okay..."), - l("I've heard you were a great chef and wanted to learn a recipe."); - mes ""; - if (@menu == 1) - return; - mesn; - mesq l("Do I look like charity to you? I'm undead, you know?"); - next; - mesn; - mesq l("Actually, the food quality here is horrible. I'm glad I'm undead or I would not eat here."); - next; - mesn; - mesq l("It is all \"fancy\" stuff, I don't even know if that could be of any nourishment for the living, and tastes like rotten. Well, figures. Undead town."); - next; - mesn; - mesq l("What about the following deal: You bring me some tasty food, and I give you some tasty recipe from before I became undead?"); - next; - select - l("Deal"), - l("No Deal"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Smart choice, still-living person."); - return; - } - setq1 General_Cooking, 6; - mesn; - mesq l("Hah, you'll regret it. Bring me %d %s, before Golbenez finds out about our silly agreement.", .amount, getitemlink(.@q2 == VEGAN ? MananaSandwich : PioulegSandwich)); - return; -} - -function cookingDeal { - .@q2=getq2(General_Cooking); - .@item=(.@q2 == VEGAN ? MananaSandwich : PioulegSandwich); - .@recp=(.@q2 == CARNIVOROUS ? CraftMoubooStew : CraftSquirrelStew); - .@reit=(.@q2 == CARNIVOROUS ? MoubooStew : SquirrelStew); - next; - select - l("Okay, okay..."), - l("I wanted to give you the %d sandwiches you asked.", .amount); - mes ""; - if (countitem(.@item) < .amount) { - mesn; - mesq l("Wha- Do you think I'm stupid?"); - next; - mesn; - mesq l("You better get out of here, before I turn you into stew!"); - return; - } - delitem .@item, .amount; - setq1 General_Cooking, 10; - RECIPES[.@recp]=true; - mesn; - mesq l("Eh, not bad. So, here is the %s recipe, from when I was living. It was a blast.", getitemlink(.@reit)); - next; - mesn; - mesq l("Now begone and stop disrupting my work!"); - return; -} - -OnInit: - .distance = 4; - .amount = 10; - end; - -} - diff --git a/npc/009-2-3/reid.txt b/npc/009-2-3/reid.txt deleted file mode 100644 index 4445759b..00000000 --- a/npc/009-2-3/reid.txt +++ /dev/null @@ -1,22 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Reid is Hamond's wife. She secretly had an affair with Savaric. -// THIS IS A PLACEHOLDER! - -009-2-3,42,30,0 script Reid NPC_REID,{ - mesc l("You see a dead woman lying on the floor and something that appears to be her ghost floating above her dead body."); - next; - mesn l("Ghost"); - mesq l("He- I - What - Oh -"); - mesc l("The womans ghost seems to be confused."); - next; - mesn; - mesq l("Oh, I'm sorry. Welcome to Reid's Inn. My name is Reid, I am the innkeeper of this wonderful place of leisure. Please enjoy your visit here!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-4/_import.txt b/npc/009-2-4/_import.txt deleted file mode 100644 index 0c8dd0be..00000000 --- a/npc/009-2-4/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 009-2-4: Reid's Inn Basement -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-4/_warps.txt", -"npc/009-2-4/aldred.txt", -"npc/009-2-4/golbenez.txt", diff --git a/npc/009-2-4/_warps.txt b/npc/009-2-4/_warps.txt deleted file mode 100644 index d7773e5f..00000000 --- a/npc/009-2-4/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-4: Reid's Inn Basement warps -009-2-4,56,38,0 warp #009-2-4_56_38 0,0,009-2-3,56,41 diff --git a/npc/009-2-4/aldred.txt b/npc/009-2-4/aldred.txt deleted file mode 100644 index 9a340913..00000000 --- a/npc/009-2-4/aldred.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Aldred is Hamond's and Reid's son. -// THIS IS A PLACEHOLDER! - -009-2-4,50,35,0 script Aldred NPC_UNDEAD_WEPPER,{ - mesn; - mesq l("Waaahhhhh!"); - close; - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/009-2-4/golbenez.txt b/npc/009-2-4/golbenez.txt deleted file mode 100644 index 2fda0314..00000000 --- a/npc/009-2-4/golbenez.txt +++ /dev/null @@ -1,51 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description (SPOILERS): -// Golbenez, a very dangerous, evil AND cruel woman from a parallel dimension. -// After being summoned by Savaric, she betrayed him and made the Inn in her -// leisure place. Later, she invaded The Mana World, kidnapped Santa to obtain -// enough spiritual energy, and brought the whole Inn to The Mana World. -// -// At time of writing, it is unknown how Asphodel Moors came to be. -// It is possible that Golbenez cannot return to her original dimension, -// And it is also possible that her attempt resulted in she ending up in TMW. -// -// (It is also possible that due the summoning ritual, Golbenez is somehow -// bound to Savaric and like monster summons, cannot remain in existence if -// the summoner is dead. If proven, this could change completely the reason -// why Golbenez kept the whole Inn alive and brought it with her.) -// -// At time of writing, It is unknown if she is alive, undead, or neither and -// is a spirit. -// Other NPCs cannot comprehend and will always treat her as a "him". -// Most other NPCs cannot say Golbenez' name properly, and will say "Golbanez", -// "Galvanes", "Gilbenos", "Golbinos" and/or "Galvanis". -// This is part of lore, please do not try to "fix" it in other NPCs as well. -// THIS IS A PLACEHOLDER! - -009-2-4,30,32,0 script Golbenez NPC_GOLBENEZ,{ - mesn; - mesq l("How do you like my place of leisure, mortal?"); - select - l("What is this place? Why is it full of dead people?"), - l("You look different here. Nice horns."), - l("I'm enjoying myself, thanks for asking."); - mes ""; - switch (@menu) { - case 1: - mesn; - mesq l("Mortal, this is beyond your comprehension. Do not worry about it and enjoy your time."); - break; - case 2: - mesn; - mesc l("%s bursts out with laughter.", .name$); - mesq l("Mortals! They never stop surprising me."); - break; - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-5/_import.txt b/npc/009-2-5/_import.txt deleted file mode 100644 index fcaccd3f..00000000 --- a/npc/009-2-5/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 009-2-5: Reid's Inn First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-5/_warps.txt", -"npc/009-2-5/lovers.txt", -"npc/009-2-5/savaric.txt", diff --git a/npc/009-2-5/_warps.txt b/npc/009-2-5/_warps.txt deleted file mode 100644 index 034d33b3..00000000 --- a/npc/009-2-5/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-5: Reid's Inn First Floor warps -009-2-5,56,32,0 warp #009-2-5_56_32 1,0,009-2-3,56,29 diff --git a/npc/009-2-5/lovers.txt b/npc/009-2-5/lovers.txt deleted file mode 100644 index 463742b9..00000000 --- a/npc/009-2-5/lovers.txt +++ /dev/null @@ -1,29 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Useless NPC. Possibly it is a memory fragment of Savaric and Reid? -// THIS IS A PLACEHOLDER! - -009-2-5,27,27,0 script Lovers NPC_LOVERS,{ - mesc l("You see a man and a woman holding each other very tight."); - next; - mesc l("They are kissing and whispering things to each other you can't hear."); - next; - mesc l("Now the woman giggles. They don't notice you."); - next; - select - l("Maybe it's better not to bother them."), - l("*ahem* Hello...?"); - mes ""; - if (@menu == 1) - close; - mesc l("They do not hear you. It is as if they were not real."); - next; - mesc l("This is certainly a strange place."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-5/savaric.txt b/npc/009-2-5/savaric.txt deleted file mode 100644 index dc1f08ab..00000000 --- a/npc/009-2-5/savaric.txt +++ /dev/null @@ -1,20 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Savaric had an affair with Reid and ultimately brought death to the whole Inn. -// THIS IS A PLACEHOLDER! - -009-2-5,31,41,0 script Savaric NPC_SAVARIC,{ - mesc l("You see a dead man hanging. This place is creepy!"); - next; - mesc l("Suddenly the man opens his eyes and looks at you."); - next; - mesn l("Hanged Man"); - mesq l("Oh, hello. Nice to see you - I seem to be dead, but I don't know why and why I'm still consciousness. This is very interesting."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-6/_import.txt b/npc/009-2-6/_import.txt deleted file mode 100644 index f9cec10c..00000000 --- a/npc/009-2-6/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 009-2-6: Small House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-6/_warps.txt", -"npc/009-2-6/eurni.txt", -"npc/009-2-6/jpmorbid.txt", diff --git a/npc/009-2-6/_warps.txt b/npc/009-2-6/_warps.txt deleted file mode 100644 index bfd06300..00000000 --- a/npc/009-2-6/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-6: Small House warps -009-2-6,29,36,0 warp #009-2-6_29_36 0,0,009-1,67,160 diff --git a/npc/009-2-6/eurni.txt b/npc/009-2-6/eurni.txt deleted file mode 100644 index 44bbf953..00000000 --- a/npc/009-2-6/eurni.txt +++ /dev/null @@ -1,22 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Eurni the Surgeon - -009-2-6,32,30,0 script Eurni NPC_EURNI,{ - mesn; - mesq l("Are you tired of who you are?"); - next; - mesn; - mesq l("Would you be interested in changing your... appearance?"); - next; - Barber(false); - - close; - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/009-2-6/jpmorbid.txt b/npc/009-2-6/jpmorbid.txt deleted file mode 100644 index 83d4c3c2..00000000 --- a/npc/009-2-6/jpmorbid.txt +++ /dev/null @@ -1,61 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// J.P.Morbid the Asphodel Moors storage guy. - -009-2-6,27,30,0 script J.P. Morbid NPC_JPMORBID,{ - // Storage/Banking function not unlocked in Artis - if (!getq(ArtisQuests_Lloyd)) { - speech - l("Oh hey!"), - l("I was supposed to act as storagekeeper, but I forgot my key."), - l("Come back later, perhaps I can find it."); - close; - } - mesn; - mesq l("Welcome to %s's Bank!", l($@BANK_TOWN$[.bankid])); - next; - - do - { - select - l("I would like to store some items."), - l("I would like to perform money transactions."), - l("Is there any request for me?"), - menuaction(l("Quit")); - - mes ""; - - switch (@menu) { - case 1: - mesn; - mesq l("Sure thing! I'll have your items transported here from Artis before you realize!"); - next; - closeclientdialog(); - openstorage(); - close; - case 2: - MerchantGuild_Bank(); - break; - case 3: - MerchantGuild_Quests(.bankid); - break; - default: - closeclientdialog; - goodbye; - close; - } - - } while (true); - close; - -OnInit: - .distance = 4; - - // Bank configuration - array_push($@BANK_NAME$, .name$); - array_push($@BANK_TOWN$, "Asphodel Moors"); - .bankid = getarraysize($@BANK_NAME$)-1; - end; -} diff --git a/npc/009-2-7/_import.txt b/npc/009-2-7/_import.txt deleted file mode 100644 index 5460b7d6..00000000 --- a/npc/009-2-7/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 009-2-7: Shop -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-7/_warps.txt", -"npc/009-2-7/leofwin.txt", -"npc/009-2-7/umfrey.txt", diff --git a/npc/009-2-7/_warps.txt b/npc/009-2-7/_warps.txt deleted file mode 100644 index f675c6c2..00000000 --- a/npc/009-2-7/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-7: Shop warps -009-2-7,29,36,0 warp #009-2-7_29_36 0,0,009-1,64,187 diff --git a/npc/009-2-7/leofwin.txt b/npc/009-2-7/leofwin.txt deleted file mode 100644 index c634b9fb..00000000 --- a/npc/009-2-7/leofwin.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Leofwin is now the status reset NPC -// THIS IS A PLACEHOLDER! - -009-2-7,36,30,0 script Leofwin NPC_LEOFWIN,{ - speech - l("Do you want a Status Reset?"); - - ConfirmStatusReset(); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-7/umfrey.txt b/npc/009-2-7/umfrey.txt deleted file mode 100644 index 5463f7e2..00000000 --- a/npc/009-2-7/umfrey.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Umfrey is the general shopkeeper of Asphodel Moors -// THIS IS A PLACEHOLDER! - -009-2-7,44,30,0 script Umfrey NPC_UMFREY,{ - closeclientdialog; - shop .name$; - close; - -OnInit: - .distance = 4; - tradertype(NST_MARKET); - - sellitem TrainingArrow, -1, 20000; - sellitem DeathPotion, -1, 1; - end; - -OnClock0009: - restoreshopitem TrainingArrow, 20000; - restoreshopitem DeathPotion, 1; - end; -} diff --git a/npc/009-2-8/_import.txt b/npc/009-2-8/_import.txt deleted file mode 100644 index 8488166f..00000000 --- a/npc/009-2-8/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 009-2-8: Blacksmith -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-8/_warps.txt", -"npc/009-2-8/cerhan.txt", diff --git a/npc/009-2-8/_warps.txt b/npc/009-2-8/_warps.txt deleted file mode 100644 index 018f381b..00000000 --- a/npc/009-2-8/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-8: Blacksmith warps -009-2-8,29,41,0 warp #009-2-8_29_41 0,0,009-1,90,160 diff --git a/npc/009-2-8/cerhan.txt b/npc/009-2-8/cerhan.txt deleted file mode 100644 index 927ba2a8..00000000 --- a/npc/009-2-8/cerhan.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Cerhan is the armory guy from Asphodel Moors. -// Relation with Ms. Golbenez is unknown? -// THIS IS A PLACEHOLDER! - -009-2-8,39,30,0 script Cerhan NPC_CHELIOS,{ - speech - l("Ah, hello! It's good to see another normal %s at this strange place!", get_race(GETRACE_RACE)), - l("I'm an experienced weapon master and I was thinking about establishing a smithy here. I'll need some more equipment, though."), - l("So, I'll talk to you later!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/009-2-9/_import.txt b/npc/009-2-9/_import.txt deleted file mode 100644 index cef8231a..00000000 --- a/npc/009-2-9/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 009-2-9: Migglemire Crypt Ground Level -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/009-2-9/_warps.txt", diff --git a/npc/009-2-9/_warps.txt b/npc/009-2-9/_warps.txt deleted file mode 100644 index 15eaa9e9..00000000 --- a/npc/009-2-9/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 009-2-9: Migglemire Crypt Ground Level warps -009-2-9,35,44,0 warp #009-2-9_35_44 1,0,009-1,195,97 -009-2-9,41,41,0 warp #009-2-9_41_41 1,0,009-2-10,41,34 diff --git a/npc/009-2/_import.txt b/npc/009-2/_import.txt new file mode 100644 index 00000000..668474fa --- /dev/null +++ b/npc/009-2/_import.txt @@ -0,0 +1,25 @@ +// Map 009-2: Hurnscald Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-2/_warps.txt", +"npc/009-2/airlia.txt", +"npc/009-2/alan.txt", +"npc/009-2/bernard.txt", +"npc/009-2/doctor.txt", +"npc/009-2/drunks.txt", +"npc/009-2/entertainer.txt", +"npc/009-2/inspector.txt", +"npc/009-2/kfahr.txt", +"npc/009-2/lena.txt", +"npc/009-2/mapflags.txt", +"npc/009-2/misc.txt", +"npc/009-2/nicholas.txt", +"npc/009-2/nurse.txt", +"npc/009-2/olana.txt", +"npc/009-2/peter.txt", +"npc/009-2/richard.txt", +"npc/009-2/selim.txt", +"npc/009-2/shops.txt", +"npc/009-2/trader.txt", +"npc/009-2/waitress.txt", +"npc/009-2/wyara.txt", +"npc/009-2/yalina.txt", diff --git a/npc/009-2/_warps.txt b/npc/009-2/_warps.txt new file mode 100644 index 00000000..ec9660d9 --- /dev/null +++ b/npc/009-2/_warps.txt @@ -0,0 +1,24 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-2: Hurnscald Indoor warps +009-2,75,23,0 warp #009-2_75_23 1,0,009-2,74,47 +009-2,95,30,0 warp #009-2_95_30 0,0,009-1,59,34 +009-2,130,26,0 warp #009-2_130_26 0,0,009-1,71,31 +009-2,144,26,0 warp #009-2_144_26 1,0,009-2,144,43 +009-2,144,42,0 warp #009-2_144_42 1,0,009-2,144,25 +009-2,155,48,0 warp #009-2_155_48 1,0,009-2,155,63 +009-2,114,46,0 warp #009-2_114_46 1,0,009-2,114,70 +009-2,50,55,0 warp #009-2_50_55 0,0,009-1,35,31 +009-2,74,53,0 warp #009-2_74_53 0,0,009-2,143,78 +009-2,74,46,0 warp #009-2_74_46 1,0,009-2,75,22 +009-2,114,78,0 warp #009-2_114_78 0,0,009-1,72,45 +009-2,114,69,0 warp #009-2_114_69 1,0,009-2,114,45 +009-2,149,67,0 warp #009-2_149_67 0,0,009-1,80,32 +009-2,143,77,0 warp #009-2_143_77 0,0,009-2,74,52 +009-2,155,62,0 warp #009-2_155_62 1,0,009-2,155,46 +009-2,182,67,0 warp #009-2_182_67 1,0,009-1,91,47 +009-2,147,90,0 warp #009-2_147_90 0,0,009-3,173,21 +009-2,27,107,0 warp #009-2_27_107 0,0,009-1,58,47 +009-2,46,50,0 warp #009-2_46_50 0,0,009-2,76,78 +009-2,77,78,0 warp #009-2_77_78 0,0,009-2,47,50 +009-2,31,91,0 warp #009-2_31_91 0,0,009-1,59,41 +009-2,38,105,0 warp #009-2_38_105 0,0,009-7,21,20 diff --git a/npc/009-2/airlia.txt b/npc/009-2/airlia.txt new file mode 100755 index 00000000..7996181f --- /dev/null +++ b/npc/009-2/airlia.txt @@ -0,0 +1,242 @@ + + + +009-2,123,71,0 script Airlia NPC108,{ + // Subquest 1a: Caretaker's daughter (initial, once) + @LETTER_REWARD_GOLD_INITIAL = 1000; + @LETTER_REWARD_EXP_INITIAL = 2000; + + @Q_STATUS_RECIEVED_FIRST_LETTER = 2; + @Q_STATUS_DELIVERED_FIRST_LETTER = 3; + + // Subquest 1b: Continued delivery of letters (unlimited) + @LETTER_REWARD_GOLD = 42; + @LETTER_REWARD_EXP = 500; + + @Q_STATUS_HAS_NO_NEW_LETTER = 4; + @Q_STATUS_HAS_NEW_LETTER = 5; + + // Subquest 2a: Fetch those undead drops (initial, once) + // TODO: Set sane values below + @FETCH_AMOUNT_INITIAL = 50; + @FETCH_LABEL_INITIAL$ = "Bone"; + @FETCH_REWARD_GOLD_INITIAL = 5000; + @FETCH_REWARD_EXP_INITIAL = 50000; + + @Q_STATUS_HELP_AIRLIA = 1; + @Q_STATUS_INITIAL_FETCH_REWARDED = 2; + + // Subquest 2b: Fetch those undead drops (unlimited) + // TODO: Set sane values below + @FETCH_AMOUNT = 10; + @FETCH_LABEL$ = "DiseasedHeart"; + @FETCH_REWARD_GOLD = 6000; + @FETCH_REWARD_EXP = 40000; + + + if (QUEST_Airlia == @Q_STATUS_INITIAL_FETCH_REWARDED) goto L_Rewarded; + if (QUEST_Airlia == @Q_STATUS_HELP_AIRLIA) goto L_Fetch; + if (QUEST_Graveyard_Caretaker > @Q_STATUS_RECIEVED_FIRST_LETTER) goto L_Intro; + goto L_Caretaker; + +L_Caretaker: + mes "[Airlia]"; + mes "\"Greetings. Do you need a housing permit, or to license your mount?\""; + next; + if (QUEST_Graveyard_Caretaker < @Q_STATUS_RECIEVED_FIRST_LETTER) + menu + "Sorry, no.", L_Next, + "My what?", L_mount; + if (QUEST_Graveyard_Caretaker == @Q_STATUS_RECIEVED_FIRST_LETTER) + menu + "Sorry, no.", L_Next, + "I have a letter from your father.", L_first_reward, + "My what?", L_mount; + goto L_Next; + +L_Next: + mes "[Airlia]"; + mes "\"Nobody ever does...\""; + close; + +L_mount: + // The mention of mounts will certainly gather some interest from players, + // this section may be extended. + close; + +L_first_reward: + mes "[Airlia]"; + mes "\"Oh! Thank you very, very much! Please take this for your trouble.\""; + if (@LETTER_REWARD_GOLD_INITIAL > 0) + mes "[" + @LETTER_REWARD_GOLD_INITIAL + " GP]"; + if (@LETTER_REWARD_EXP_INITIAL > 0) + mes "[" + @LETTER_REWARD_EXP_INITIAL + " experience points]"; + Zeny = Zeny + @LETTER_REWARD_GOLD_INITIAL; + getexp @LETTER_REWARD_EXP_INITIAL, 0; + QUEST_Graveyard_Caretaker = @Q_STATUS_DELIVERED_FIRST_LETTER; + close; + +L_later_rewards: + mes "[Airlia]"; + mes "\"Oh! Thank you very, very much! Please take this for your trouble.\""; + if (@LETTER_REWARD_GOLD > 0) + mes "[" + @LETTER_REWARD_GOLD + " GP]"; + if (@LETTER_REWARD_EXP > 0) + mes "[" + @LETTER_REWARD_EXP + " experience points]"; + Zeny = Zeny + @LETTER_REWARD_GOLD; + getexp @LETTER_REWARD_EXP, 0; + QUEST_Graveyard_Caretaker = @Q_STATUS_HAS_NO_NEW_LETTER; + close; + +L_Intro: + mes "[Airlia]"; + mes "\"My poor father, doomed to that awful cemetery.\""; + next; + + // CASE REMOVED: + // This step is pointless and just forces the player to make a selection that doesn't effect anything. + // ALSO it misses the case where QUEST_Graveyard_Caretaker == 3, in this case it proceeds to the message without wasting player clicks + // Removing this check will make execution the same for QUEST_Graveyard_Caretaker == 3 and QUEST_Graveyard_Caretaker == 4 + // If for some reason this is desireable, uncomment it and make sure to catch the extra case mentioned + // + //if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NO_NEW_LETTER) + // menu + // "...", -; + + if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NEW_LETTER) + menu + "...", L_Next3, + "Oh, I have a letter from him.", L_later_rewards; + goto L_Next3; + +L_Next3: + mes "[Airlia]"; + mes "\"You know, there are many who believe that each time the undead rise after being killed, they lose mana."; + mes "Eventually, there will not be enough mana for them to rise again and they can be at rest. Do you believe this is true?\""; + next; + menu + "I believe so, yes.", L_Intro_mana_loss, + "Maybe...", L_Intro_mana_loss, + "No, that is not proven.", L_Next1; + +L_Next1: + mes "[Airlia]"; + mes "\"Oh...\""; + close; + +L_Intro_mana_loss: + mes "[Airlia]"; + mes "\"When I am not working, I recruit help for the esteemed Fighters of the Undead, or FoU."; + mes "They are an official group effort of the Warriors' Guild and Magicians, you know, a very prestigious group.\""; + next; + menu + "...", L_Intro_fou, + "I have heard of them.", L_Intro_fou, + "Keep up the good work. I have to go now, bye.", L_close; + +L_Intro_fou: + mes "[Airlia]"; + mes "\"If we drain those evil creatures of their mana, I can get my father back. He is getting very old. Will you help us?\""; + next; + menu + "Of course I will.", L_Intro_fight, + "Sure, I guess.", L_Intro_fight, + "Thanks, but no thanks. I have other business to attend to.", L_close; + +L_Intro_fight: + mes "[Airlia]"; + mes "\"Great, just kill any of the undead creatures you can and bring me proof of your work, and I will put in a word for you with the guild.\""; + next; + menu + "I'm on it.", L_Next2, + "What sort of proof?", L_Intro_proof; + +L_Next2: + QUEST_Airlia = @Q_STATUS_HELP_AIRLIA; + goto L_close; + +L_Intro_proof: + mes "[Airlia]"; + mes "\"Let's say " + @FETCH_AMOUNT_INITIAL + " " + getitemlink(@FETCH_LABEL_INITIAL$) + "s. You don't know how much this means to me, thank you.\""; + QUEST_Airlia = @Q_STATUS_HELP_AIRLIA; + close; + +L_Fetch: + mes "[Airlia]"; + mes "\"Thank you for helping my father.\""; + next; + mes "\"Have you collected the " + @FETCH_AMOUNT_INITIAL + " " + getitemlink(@FETCH_LABEL_INITIAL$) + "?\""; + + // Make sure to check if the player has a letter to deliver. + // If the check is not made then there is a bug, where the player + // has a letter but has not completed the initial fetch + // and is prevented from turing in the letter until the fetch is completed. + + if (QUEST_Graveyard_Caretaker < @Q_STATUS_HAS_NEW_LETTER) + menu + "Yes.", L_Fetch_initial_reward, + "No.", L_close; + if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NEW_LETTER) + menu + "I have another letter from your father.", L_later_rewards, + "Yes.", L_Fetch_initial_reward, + "No.", L_close; + goto L_close; + +L_Fetch_initial_reward: + if (countitem(@FETCH_LABEL_INITIAL$) < @FETCH_AMOUNT_INITIAL) goto L_Fetch_not_enough; + mes "[Airlia]"; + mes "\"Excellent work. You are definitely a great warrior. I will tell the guild of your deeds.\""; + if (@FETCH_REWARD_GOLD_INITIAL > 0) + mes "[" + @FETCH_REWARD_GOLD_INITIAL + " GP]"; + if (@FETCH_REWARD_EXP_INITIAL > 0) + mes "[" + @FETCH_REWARD_EXP_INITIAL + " experience points]"; + delitem @FETCH_LABEL_INITIAL$, @FETCH_AMOUNT_INITIAL; + Zeny = Zeny + @FETCH_REWARD_GOLD_INITIAL; + getexp @FETCH_REWARD_EXP_INITIAL, 0; + QUEST_Airlia = @Q_STATUS_INITIAL_FETCH_REWARDED; + next; + mes "[Airlia]"; + // TODO: Write the dialogue when I'm not tired... + mes "\"Oh, before you leave. We all must do what we can to stop this tragedy."; + mes "If you are willing to keep draining the undead of mana, I will give you what gold I can afford as a token of my gratitude.\""; + close; + +L_Fetch_later_rewards: + if (countitem(@FETCH_LABEL$) < @FETCH_AMOUNT) + goto L_Fetch_not_enough; + mes "[Airlia]"; + mes "\"Excellent work. You are definitely a great warrior.\""; + if (@FETCH_REWARD_GOLD > 0) + mes "[" + @FETCH_REWARD_GOLD + " GP]"; + if (@FETCH_REWARD_EXP > 0) + mes "[" + @FETCH_REWARD_EXP + " experience points]"; + delitem @FETCH_LABEL$, @FETCH_AMOUNT; + Zeny = Zeny + @FETCH_REWARD_GOLD; + getexp @FETCH_REWARD_EXP, 0; + close; + +L_Fetch_not_enough: + mes "[Airlia]"; + mes "\"I'm sorry, I didn't realize you couldn't count. Perhaps when I have some free time, I can help you learn if you'd like.\""; + close; + +L_Rewarded: + mes "[Airlia]"; + mes "\"Thank you for your help.\""; + next; + mes "\"Have you collected the " + @FETCH_AMOUNT + " " + getitemlink(@FETCH_LABEL$) + "s?\""; + if (QUEST_Graveyard_Caretaker < @Q_STATUS_HAS_NEW_LETTER) + menu + "Yes.", L_Fetch_later_rewards, + "No.", L_close; + if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NEW_LETTER) + menu + "I have another letter from your father.", L_later_rewards, + "Yes.", L_Fetch_later_rewards, + "No.", L_close; + goto L_close; + +L_close: + close; +} diff --git a/npc/009-2/alan.txt b/npc/009-2/alan.txt new file mode 100755 index 00000000..5d3279da --- /dev/null +++ b/npc/009-2/alan.txt @@ -0,0 +1,216 @@ + +009-2,99,23,0 script Alan NPC125,{ + @Q_MASK = NIBBLE_0_MASK; + @Q_SHIFT = NIBBLE_0_SHIFT; + + @Q_status = ((QUEST_Forestbow_state) & @Q_MASK) >> @Q_SHIFT; + + @BROKENLOG_EXP = 15; + + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@Q_status == 1) goto L_State_1; + if (@Q_status == 2) goto L_State_2; + if (@Q_status == 3) goto L_State_3; + if (@Q_status == 4) goto L_State_4; + if (@Q_status == 5) goto L_State_5; + + mes "[Alan]"; + mes "\"When you want to buy something then please speak to my apprentice. I am only doing special requests.\""; + next; + if (@inspector == 1) + menu + "OK, thanks.", L_close, + "Can you make me a really good bow?", L_State_0_1, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + menu + "OK, thanks.", L_close, + "Can you make me a really good bow?", L_State_0_1; + +L_State_0_1: + mes "[Alan]"; + mes "\"You mean like one of my legendary forest bows?\""; + next; + menu + "Yes, that would be nice.", L_Next; + +L_Next: + mes "[Alan]"; + mes "\"Sorry, I am not making these anymore.\""; + next; + menu + "Oh, too bad.", L_close, + "What? Why not?", L_State_0_2; + +L_State_0_2: + mes "[Alan]"; + mes "\"The problem is that I am short of material. My forestbows are not made of regular wood, you know."; + mes "They are made of special living wood. And only the best logs of living wood are good enough for them."; + mes "I used to get these logs from Jack, the lumberjack. But the last time I asked him for a new delivery he said that he would never again get any for me.\""; + @Q_status = 1; + callsub S_Update_Var; + next; + menu + "Too bad.", L_close, + "Did you ask him why?", L_State_0_3; + +L_State_0_3: + mes "[Alan]"; + mes "\"Sure I did. But he just told me to leave him alone. Maybe you could ask him what's wrong?\""; + next; + menu + "OK, I'll ask him.", L_close, + "I am sure he got his reasons.", L_State_1; + +L_State_1: + mes "[Alan]"; + mes "\"Did you already ask Jack why he won't deliver me any more living wood?\""; + next; + if (@inspector == 1) + menu + "No, I haven't had the time yet.", L_close, + "No, I didn't find him yet.", L_State_1_1, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + menu + "No, I haven't had the time yet.", L_close, + "No, I didn't find him yet.", L_State_1_1; + +L_State_1_1: + mes "[Alan]"; + mes "\"When you leave my shop just go southwest over the village plaza. You can't miss it.\""; + goto L_close; + +L_State_2: + mes "[Alan]"; + mes "\"Did you already ask Jack why he won't deliver me any more living wood?\""; + next; + if (@inspector == 1) + menu + "Yes, I did. He said that the trees turned into dangerous monsters.", L_Next1, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + if (@inspector != 1) + menu + "Yes, I did. He said that the trees turned into dangerous monsters.", L_Next1; + goto L_Next1; + +L_Next1: + mes "[Alan]"; + mes "\"Oh, that's really bad news. Maybe you can do his job?"; + mes "When you kill some of these tree monsters and bring me their wood I can take a look at them."; + mes "Maybe you will find a piece of wood that is strong enough to become one of my forest bows.\""; + @Q_status = 3; + callsub S_Update_Var; + goto L_close; + +L_State_3: + mes "[Alan]"; + mes "\"How is the hunt going? Did you bring me any wood?\""; + if (countitem("RawLog") < 1) + goto L_close; + next; + if (@inspector == 1) + menu + "Here, take a look!", L_State_3_try, + "Yes, but I need it for something else.", L_close, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + menu + "Here, take a look!", L_State_3_try, + "Yes, but I need it for something else.", L_close; + +L_State_3_try: + if (countitem("RawLog") < 1) + goto L_No_Log; + delitem "RawLog", 1; + mes "[Alan]"; + mes "\"Hmmm... looks ok, but is it strong enough?\""; + mes "Alan bends the log over his knee."; + next; + @Temp1 = rand(20); + if (@Temp1 == 0) goto L_State_3_success; + mes "The log breaks with a loud crack."; + getexp @BROKENLOG_EXP, 0; + next; + mes "[Alan]"; + mes "\"Sorry, this log was too weak for one of my forest bows. Now it is junk. Give me another.\""; + if (countitem("RawLog") < 1) + goto L_close; + next; + menu + "Sure, here you go.", L_State_3_try, + "Hey! Stop breaking my stuff!", L_close; + +L_State_3_success: + mes "Alan tries as hard as he can but the log won't bend."; + next; + mes "[Alan]"; + mes "\"Aaah! Yes! That is a really fine piece of wood you brought me. It will make an excellent bow!\""; + next; + @Q_status = 4; + callsub S_Update_Var; + goto L_State_4; + +L_State_4: + mes "[Alan]"; + mes "\"I can make you a really nice forest bow out of this. I just need 10,000 GP for material and work time.\""; + next; + if (@inspector == 1) + menu + "10,000??? What a ripoff!", L_close, + "Sure, here you go!", L_State_4_pay, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + menu + "10,000??? What a ripoff!", L_close, + "Sure, here you go!", L_State_4_pay; + +L_State_4_pay: + if (Zeny < 10000) + goto L_State_4_nocash; + getinventorylist; + if (@inventorylist_count == 100) + goto L_State_4_TooMany; + Zeny = Zeny - 10000; + getitem "ForestBow", 1; + @Q_status = 5; + callsub S_Update_Var; + mes "[Alan]"; + mes "\"Here you go - have fun with it.\""; + goto L_close; + +L_State_4_nocash: + mes "[Alan]"; + mes "\"Seems like you are out of cash.\""; + goto L_close; + +L_State_4_TooMany: + mes "[Alan]"; + mes "\"Seems like you don't have room for this bow. Come back later.\""; + goto L_close; + +L_State_5: + mes "[Alan]"; + mes "\"I hope you are satisfied with your forest bow. It is one of my best works.\""; + if (@inspector != 1) + goto L_close; + next; + menu + "I am!", L_close, + "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + +L_NohMask_Answer: + mes "[Alan]"; + mes "\"No.\""; + goto L_close; + +L_No_Log: + mes "[Alan]"; + mes "\"Where should I look at? You don't have a raw log.\""; + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Var: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/009-2/bernard.txt b/npc/009-2/bernard.txt new file mode 100755 index 00000000..f9eac878 --- /dev/null +++ b/npc/009-2/bernard.txt @@ -0,0 +1,124 @@ +009-2,67,79,0 script Bernard NPC117,{ + if (QL_SOUP >= 6) goto L_Done3; + if (QL_SOUP >= 4) goto L_Done2; + if (QL_SOUP == 3) goto L_Progress2; + if (QL_SOUP == 2) goto L_Done1; + if (QL_SOUP == 1) goto L_Progress; + + @temp = rand(2); + if(@temp == 1) goto L_Opening1; + goto L_Opening0; + +L_Opening0: + mes "[Bernard]"; + mes "\"The fields are crawling with maggots. Where is Mikhail? What is taking them so long?"; + mes "Could I ask a favor of you?\""; + next; + goto L_Ask; + +L_Opening1: + mes "[Bernard]"; + mes "\"The taste of maggots in soup is... unforgettable, they taste simply divine!"; + mes "I sent someone to kill me some maggots and they have yet to return. Would you help me kill some?\""; + next; + goto L_Ask; + +L_Ask: + menu + "Yes.", L_Yes, + "No.", L_close; + +L_Yes: + @temp = rand(2); + if(@temp == 1) goto L_Req1; + goto L_Req0; + +L_Req0: + mes "[Bernard]"; + mes "\"Great! I need a Roasted Maggot for my soup.\""; + next; + goto L_Set; + +L_Req1: + mes "[Bernard]"; + mes "\"Bring me a Roasted Maggot. I'll give you something if you do.\""; + next; + goto L_Set; + +L_Set: + QL_SOUP = 1; + mes "[Bernard]"; + mes "\"Please bring it to me!\""; + goto L_close; + +L_Progress: + if (countitem("RoastedMaggot") < 1) goto L_NotEnough; + mes "[Bernard]"; + mes "\"Oooh, perfect! It's perfect!"; + mes "You brought me my Roasted Maggot! Here, have some cake for your troubles.\""; + getinventorylist; + if (@inventorylist_count - (countitem("RoastedMaggot") == 1) > 99 - (countitem("CherryCake") == 0) ) goto L_TooMany; + delitem "RoastedMaggot", 1; + getexp 100, 0; + getitem "CherryCake", 5; + QL_SOUP = 2; + next; + mes "\"Now let's see...\""; + goto L_close; + +L_Progress2: + if (countitem("MaggotSlime") < 3) goto L_NotEnough1; + mes "[Bernard]"; + mes "\"Nice! They're perfect, just perfect!"; + mes "You brought me the 3 Maggot Slimes! Here, have some beer as reward.\""; + getinventorylist; + if ((@inventorylist_count - (countitem("MaggotSlime") == 3) > 99 - (countitem("Beer") == 0) )) goto L_TooMany; + delitem "MaggotSlime", 3; + getexp 100, 0; + getitem "Beer", 3; + QL_SOUP = 4; + goto L_close; + +L_NotEnough: + mes "[Bernard]"; + mes "\"Oh, please hurry and bring me a Roasted Maggot. I'm yearning for maggot soup!\""; + goto L_close; + +L_NotEnough1: + mes "[Bernard]"; + mes "\"Please do hurry and bring me 3 Maggot Slimes, so I can finish my soup!\""; + goto L_close; + +L_Done1: + mes "[Bernard]"; + mes "\"Thank you so much!\""; + mes "\"But... something is missing to make the soup creamy.\""; + next; + mes "\"I need 3 Maggot Slimes for that.\""; + mes "\"Bring them to me, and I'll give you something nice.\""; + QL_SOUP = 3; + goto L_close; + +L_Done2: + mes "[Bernard]"; + mes "\"I didn't mention it before, but I also put beer in my soup. I hope you like beer as much as I do, because, you see...\""; + next; + mes "\"Beer is life!\""; + goto L_close; + +L_Done3: + mes "[Bernard]"; + mes "\"My help, Mikhail, finally returned with the slimes I needed."; + mes "I wonder what took him so long?\""; + goto L_close; + +L_close: + @temp = 0; + close; + +L_TooMany: + next; + mes "[Bernard]"; + mes "\"You don't have room for my reward. I'll wait until you do.\""; + goto L_close; +} diff --git a/npc/009-2/doctor.txt b/npc/009-2/doctor.txt new file mode 100755 index 00000000..9d6093cc --- /dev/null +++ b/npc/009-2/doctor.txt @@ -0,0 +1,86 @@ + +009-2,148,25,0 script Doctor NPC107,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (getequipid(equip_head) == 616) goto L_Axe; + if (getequipid(equip_head) == 621) goto L_EyePatch; + + mes "[Doctor]"; + mes "\"Hello, can I help you?\""; + next; + + if (@inspector == 1) + menu + "I think I am sick!", L_Cure, + "No, I feel fine.", L_Next, + "Have you seen anything strange in town? Anything that might have to do with the robberies?", L_NohMask; + menu + "I think I am sick!", L_Cure, + "No, I feel fine.", L_Next; + +L_Next: + mes "[Doctor]"; + mes "\"Then please stop wasting my precious time.\""; + goto L_close; + +L_Cure: + mes "[Doctor]"; + if (sc_check(SC_POISON)) + goto L_CurePoison; + mes "The doctor examines you briefly."; + mes "\"Nonsense! You look fine and dandy to me. All you need is a bit more exercise and fresh fruit in your diet!\""; + goto L_close; + +L_CurePoison: + mes "\"Well, well, well! Look at all those green bubbles coming out of your head; that looks like poisoning to me! Did you eat something rotten?\""; + next; + mes "[Doctor]"; + mes "The doctor pulls out a syringe and fills it with a white liquid from a jar on his desk."; + mes "\"Now hold still, this won't hurt a bit...\""; + next; + mes "[Doctor]"; + sc_end(SC_POISON); + sc_end(SC_SLOWPOISON); + mes "*Ouch!*"; + mes "\"Next time, be more careful! Make sure to cook any meats before you eat them, and don't eat fish once it starts to smell.\""; + goto L_close; + +L_Axe: + mes "[Doctor]"; + mes "\"Oh my, what happened to you?\""; + next; + mes "[Doctor]"; + mes "\"Wait. Thats just a fake. Shame on you!\""; + goto L_close; + +L_EyePatch: + mes "[Doctor]"; + mes "\"Would you like a glass eye to replace that eye patch you have? We just got a whole load of them in today. I'll even let you keep the patch as a souvenir.\""; + next; + menu + "Yes, please.", L_EyePatch_GlassEye, + "No thank you", L_Next1; + +L_Next1: + mes "[Doctor]"; + mes "\"If you change your mind, please come back and see me.\""; + goto L_close; + +L_EyePatch_GlassEye: + mes "[Doctor]"; + mes "\"Now, where did I put that box of eyes...\""; + mes "He goes off to look for them and comes back empty handed."; + next; + mes "[Doctor]"; + mes "\"I can't seem to find where I put that box. You should come back later, I may have found them by then.\""; + goto L_close; + +L_NohMask: + mes "[Doctor]"; + mes "\"No, I haven't seen anything.\""; + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/009-2/drunks.txt b/npc/009-2/drunks.txt new file mode 100755 index 00000000..79794140 --- /dev/null +++ b/npc/009-2/drunks.txt @@ -0,0 +1,14 @@ + +009-2,65,55,0 script Drinker#1 NPC121,{ + mes "[Binge Drinker]"; + mes "\"Ha! I'll drink muuuch mo.. more than you! Im not ooone biiit dr...dr..unk!\""; + close; +} + + +009-2,68,55,0 script Drinker#2 NPC121,{ + mes "[Binge Drinker]"; + mes "\"I can still drink more! Better give up you... you... teelotaler! MORE BEER MELINDA!\""; + //I know it's called "teetotaler". That error is on purpose. + close; +} diff --git a/npc/009-2/entertainer.txt b/npc/009-2/entertainer.txt new file mode 100755 index 00000000..13664ffb --- /dev/null +++ b/npc/009-2/entertainer.txt @@ -0,0 +1,40 @@ + +009-2,61,49,0 script Entertainer NPC165,{ + mes "[Entertainer]"; + mes "\"Yes how can I help you?\""; + menu + "How are you showing emotions above your head?", L_Learn, + "Never mind", L_close; + +L_Learn: + mes "[Entertainer]"; + mes "\"They are called emotes, I use them to express how I am feeling."; + mes "I can teach you if you'd like?\""; + menu + "Yes please.", L_Learn2, + "I don't see the point right now.", L_close; + +L_Learn2: + mes "[Entertainer]"; + mes "\"All you have to do is press alt and a number."; + mes "The number determines what emotion will be shown."; + mes "Some clients will also show an emote shortcut-bar with the F12 button\""; + goto L_close; + +L_close: + close; + +OnTimer3000: + if(rand(0,1) == 1) goto L_manaplus; + emotion rand(EMOTE_DISGUST, EMOTE_BLAH); + goto OnInit; + +L_manaplus: + emotion rand(EMOTE_MEOW, EMOTE_TEARS); + goto OnInit; + +OnInit: + if (debug >= 2) end; + initnpctimer; + end; +} diff --git a/npc/009-2/inspector.txt b/npc/009-2/inspector.txt new file mode 100755 index 00000000..9310d4ea --- /dev/null +++ b/npc/009-2/inspector.txt @@ -0,0 +1,139 @@ + +009-2,24,99,0 script Inspector#Hurnscald NPC150,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@inspector == 0 && BaseLevel >= 30) goto L_Start; + if (@inspector == 1) goto L_AskVillage; + if (@inspector == 2) goto L_OldWoman; + if (@inspector == 3) goto L_TheaterMask; + if (@inspector == 4) goto L_TravelingTroupe; + if (@inspector == 5) goto L_OldMan; + if (@inspector == 6) goto L_OldMan_2; + if (@inspector == 7) goto L_Alibi; + if (@inspector == 8) goto L_Alibi_2; + if (@inspector == 9) goto L_Alibi_3; + if (@inspector == 10) goto L_Satchel; + if (@inspector == 11) goto L_Basement; + if (@inspector == 12) goto L_Note; + if (@inspector == 13) goto L_TravelingTroupe_2; + if (@inspector == 14) goto L_Over; + if (@inspector == 15) goto L_End; + mes "[Inspector]"; + mes "\"I'm sorry, but I'm busy looking into this string of robberies.\""; + goto L_close; + +L_Start: + mes "\"Hmm...what to do.\""; + mes "He looks up and into your face."; + next; + mes "[Inspector]"; + mes "\"You look capable, will you help me solve these robberies?\""; + next; + menu + "Yes.", L_Accept, + "No.", L_close; + +L_Accept: + @inspector = 1; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"Ok then. I'd like you to ask the villagers about the recent string of robberies.\""; + goto L_close; + +L_AskVillage: + mes "[Inspector]"; + mes "\"Please continue talking to the villagers.\""; + goto L_close; + +L_OldWoman: + mes "[Inspector]"; + mes "\"Hm...I don't know if I trust her eyesight or memory. See if someone else knows anything.\""; + goto L_close; + +L_TheaterMask: + @inspector = 4; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"Someone in a theater mask, eh? There was a traveling theater troupe in town recently, but they've moved on to Tulimshar. Please go talk to their leader about this.\""; + goto L_close; + +L_TravelingTroupe: + mes "[Inspector]"; + mes "\"Please go talk to the leader of the traveling troupe about the theater mask.\""; + goto L_close; + +L_OldMan: + @inspector = 6; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"Hm...an old man? Could you interrogate him for me?\""; + goto L_close; + +L_OldMan_2: + mes "[Inspector]"; + mes "\"Have you talked with the old man yet?\""; + goto L_close; + +L_Alibi: + mes "[Inspector]"; + mes "\"Can you verify that with his wife?\""; + goto L_close; + +L_Alibi_2: + @inspector = 9; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"Hm...then it couldn't be him. I'm not sure where to go from here, maybe you can find something else. Try talking to everyone again.\""; + goto L_close; + +L_Alibi_3: + mes "[Inspector]"; + mes "\"Made any progress yet?\""; + goto L_close; + +L_Satchel: + mes "[Inspector]"; + mes "\"Then go north and investigate!\""; + goto L_close; + +L_Basement: + mes "[Inspector]"; + mes "\"Did you look over the basement?\""; + goto L_close; + +L_Note: + @inspector = 13; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"What a strange note. I'll keep track of this, while you return the mask to the troupe.\""; + mes ""; + mes "\"By the way, stay sharp! I may call upon you again.\""; + goto L_close; + +L_TravelingTroupe_2: + mes "[Inspector]"; + mes "\"Please return the mask to the traveling troupe.\""; + goto L_close; + +L_Over: + @inspector = 15; + callsub S_Update_Mask; + mes "[Inspector]"; + mes "\"My men have found all of the stolen items. They were all in the mining camp. We still don't know who did it.\""; + mes "[2500 experience points]"; + getexp 2500, 0; + goto L_close; + +L_End: + mes "[Inspector]"; + mes "\"Remember to stay sharp. I might need your help on another case.\""; + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + return; +} diff --git a/npc/009-2/kfahr.txt b/npc/009-2/kfahr.txt new file mode 100755 index 00000000..8962e0a7 --- /dev/null +++ b/npc/009-2/kfahr.txt @@ -0,0 +1,1071 @@ + +009-2,67,57,0 script Kfahr NPC125,{ + @halloween_npc_id = $@halloween_npc_kfahr; + callfunc "TrickOrTreat"; + + @QS_NEWBIE = 0; + @QS_MET_KFAHR = 1; + @QS_KNOWS_KFAHR = 2; + @QS_KNIFE_QUEST = 3; + @QS_KNIFE_QUEST_DONE = 4; + @QS_LOST_WRESTLING = 5; + @QS_STINGER_QUEST = 6; + @QS_STINGER_QUEST_DONE = 7; + + @BLACK_STINGERS_NR = 10; + @MUSHROOMS_NR = 10; + @SNAKE_SKINS_NR = 10; + + @KNIFE_QUEST_XP = 50000; + @STINGER_QUEST_XP = 80000; + + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + + @Q_status = (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; + + @Q_needs_stinger = ((QUEST_Forestbow_state & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) > 1; + + if (@Q_status == @QS_KNIFE_QUEST) goto L_Check; + + if (@Q_status == @QS_STINGER_QUEST) goto L_stinger_check; + + if (@Q_status > @QS_NEWBIE) goto L_meet_again; + + mes "[Warrior]"; + mes "You stand before a battle-scarred, darkly tanned warrior, brimming with muscles."; + mes "Just looking at him you smell danger, adventure, excitement..."; + next; + mes "[Warrior]"; + mes "On second thought, he really could use a bath."; + mes ""; + mes "The warrior turns towards you, grinning broadly."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Why, hello there! Come to visit Kfahr the Warrior to hear of my exploits, have you?\""; + mes "He laughs heartily and gives you a slap on the back."; + mes "\"Can't blame you, can't blame you at all! Here, take a seat!\""; + next; + @has_beer = 0; + @beer_count = 0; + @last_story = 0; + @Q_status = @QS_MET_KFAHR; + callsub L_Update_Var; + goto L_Main_menu; + +L_meet_again: + mes "[Kfahr the Warrior]"; + mes "Kfahr nods and grins as you greet him."; + mes "\"Came back for more stories? Have a seat!\""; + next; + goto L_Main_menu; + +L_Main_menu: + if (@Q_status >= @QS_KNOWS_KFAHR) + goto L_real_main_menu; + menu + "Who are you?", L_Next, + "Goodbye.", L_End; + +L_Next: + mes "[Kfahr the Warrior]"; + mes "Kfahr laughs again."; + mes "\"Surely you jest! You must have heard of Kfahr, Slayer of Toby Rick the Desert Worm, Raider of the Lost Temple, Hero of Tulimshar?\""; + next; + menu + "Uhm...", L_Next1, + "Well...", L_Next1, + "To be quite honest...", L_Next1, + "Excuse me, someone is, er, whispering me...", L_End; + +L_Next1: + mes "[Kfahr the Warrior]"; + mes "\"Ah, I knew it! So you have come to hear some tales about the dangers of the desert? You've come to the right man!\""; + next; + @Q_status = @QS_KNOWS_KFAHR; + callsub L_Update_Var; + goto L_real_main_menu; + +L_tale_sub: + if (@current_story == @last_story) + goto L_same_story_abort; + if (@has_beer == 0) + goto L_out_of_beer_abort; + @last_story = @current_story; + @has_beer = 0; + @story_abort = 0; + return; + +L_same_story_abort: + mes "[Kfahr the Warrior]"; + mes "Kfahr frowns."; + mes "\"I only just told you that story. Trust me, the others are worth hearing, too!\""; + next; + @story_abort = 1; + return; + +L_out_of_beer_abort: + mes "[Kfahr the Warrior]"; + if (@beer_count > 4) + mes "\"I think I've talked 'nuff for now... but thanks for lis'ning!\""; + if (@beer_count <= 4) + mes "\"Now that's one of my favorite tales, but my throat is just a little too dry to talk about something like that... could you help me out a little here?\""; + next; + @story_abort = 1; + return; + +L_real_main_menu: + if (@Q_needs_stinger) + goto L_long_main_menu; + + menu + "What's a Desert Worm?", L_tale_desert_worm, + "Desert Temple?", L_tale_desert_temple, + "Hero of Tulimshar?", L_tale_hero_tulimshar, + "Tell me about the desert!", L_tale_desert, + "I want to become as powerful as you!", L_gain_power, + "Here, have a beer!", L_Give_beer, + "Goodbye!", L_End; + +L_long_main_menu: + menu + "What's a Desert Worm?", L_tale_desert_worm, + "Desert Temple?", L_tale_desert_temple, + "Hero of Tulimshar?", L_tale_hero_tulimshar, + "Tell me about the desert!", L_tale_desert, + "I want to become as powerful as you!", L_gain_power, + "Have you fought any Golden Scorpions?", L_golden_scorpion, + "Here, have a beer!", L_Give_beer, + "Goodbye!", L_End; + +L_tale_desert_worm: + @current_story = 1; + callsub L_tale_sub; + if (@story_abort) goto L_Main_menu; + + mes "[Kfahr the Warrior]"; + mes "Kfahr smiles and leans back."; + mes "\"A desert worm is probably the largest creature you will ever see, larger even than most dragons. It spans a good twenty chains (or six box tosses if you're used to the Imperial system) in length, has a thick, rubbery skin, and teeth as long as my legs.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Most are a darkish gray, except for the young ones; those are more purplish, I've been told. Well, anyway, you hardly ever see one of them in their entirety, you only see the head, if they decide to come out and fight – they tend to burrow under the ground.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"They are terrifying beasts, but lack any intelligent thought whatsoever. They just eat whatever gets in their way. There's nothing out there that can kill one, I think, and they can grow hundreds of years old.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Fortunately, they're kind of rare these days, and mostly roam in the empty deserts far, far south of Tulimshar. They don't like the area too close to the mountains, I think; probably too rocky underground.\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr takes a sip from his beer."; + mes "\"Anyway. Desert worms are dangerous, as I said, but there was one particularly terrifying one, called Toby Rick. You must've heard of it – the greatest and most dangerous worm, scourge of the trade routes. It could smell humans from miles away.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Most desert worms don't smell or see or feel much, you see. They just notice when something's walking nearby, then jump up and swallow it. But Toby Rick was different. He was a terrifying beast, three times as long as a regular worm.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So to feed itself, it had learned to smell. That's right, the beast had grown nostrils and learned how to use 'em!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"One day I was hired to protect a caravan going north to Tulimshar, with a friend of mine, old Arvek. He only came along for the fun, of course; it's not as if I really need much help defending a caravan... or at least normally it isn't.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Arvek's fun to have about. His manners are as bad as his breath, but he knows how to make a laugh out of everything. One thing you musnt't ever do with him, though, and that is to try his `homebrew'-- some kind of ale he makes out of maggot slime...\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr takes another sip of beer, momentarily irritated as if surprised by the taste."; + mes "\"Anyway, This time was different. We were barely three days out in the desert, when we spotted him – `the Black Worm!', the Caravan Master cried, `Over there; it will kill us all!'\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I had barely enough time to draw out my sword, and the beast was upon us! The caravan people were fleeing for their lives, so it was up to me and Arvek to stop it.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"That was madness, of course; no-one takes on a desert worm, if they have a choice. But we didn't; you see, with most desert worms you can just stand still and it won't notice you and pass by. But not with this one!\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr leans forward."; + mes "\"So this humongous beast came roaring towards us, a big back hole where the mouth is, spikey fins sticking out to the side, all ready to swallow us all! My sword felt like a toothpick against that monster!\""; + next; + mes "[Kfahr the Warrior]"; + mes "He pauses, then leans back a little to take another long sip from his beer."; + mes "\"So it seemed that our last hour was at hand, that we'd be swallowed and never heard from again!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Aha, but Kfahr doesn't die quite so easily. What happened was this: Me and Arvek charged towards that thing, slashing and stabbing, but our blows would just glance off. The beast roared and just slid by us, slapping us to the side with its fins like maggots, knocking us to the ground.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"It bolted up into the air, and tore down on the caravan, swallowing each and everyone in there in a single big gulp!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Then it turned around towards us. Those fins had hit us pretty badly; I had lost my shield and Arvek his backpack. Better for him, I suppose, but I had been rather fond of that shield – not that it would have helped me much here...\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr leans foward again, nearly knocking over his beer."; + mes "\"So the beast charges at the two of us again and we dodge – Arvek left, me right. The beast is smarter than the average desert worm, though, and had expected that – so it bends to the side and swallows poor Arvek, hair and hide and all.\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr's eyes sparkle with excitement."; + mes "\"It turns around, trying to get me too. I dodge it – left, then the same again, I dodge it right. But it can't go on like that, the beast isn't tiring, but I am...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So for one instant I think that this might be it, that I might die out here! A worthy death, I suppose, against the king of desert worms! And just as I think that, I bump against something\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr slaps on the table."; + mes "\"Arvek's backpack! Doesn't sound terribly exciting, of course – what am I going to do, toss it at the beast and hope that it chokes on it?\""; + next; + mes "[Kfahr the Warrior]"; + mes "He grins."; + mes "\"But I remember something better. That beast had grown nostrils, right? So it can smell and taste! So I tear open his backpack and pull out that big snakeskin of that disgusting maggot ale of his. It's still filled to the brim.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I quickly put on my gloves again, because I don't want to touch that stuff with my bare skin. The beast is almost upon me, but I have only that one chance – so I squeeze the skin while sticking my thumb into the opening, until I can see the black of its nostrils...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"...and when I think it's almost too late already, I shoot out that revolting brew at the beast's smelling holes, and I hit! Two at once, and up and sideways it rolls, away from me, and roaring and bellowing in pain!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"It roared for a good five minutes, then convulsed... and first it spat out old Arvek, who was a bit irritated at all that because, as he told me, he had `almost pierced the pancreas', whatever that means...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Next it spat out the caravan, and then some other caravan it had plucked off from elswehere. Somehow, everyone from there was still alive, too.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Then it slid away from us, away to the north, but we could see it getting slower and slower.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Two days later we caught up with it, but it was already dead then and had started to smell. We looked around and inside of it, found treasures and remnants of some less fortunate caravans and split them up appropriately.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"(I never told Arvek that it was his brew that killed it; he'd never have forgiven me.)\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"One of the nomads that had been travelling with the other caravan then told me that you could make special kinds of knives and swords and armor out of desert worm bones.\""; + next; + menu + "Hang on... bones in a... worm?", L_worm_bones, + "That's neat! Do you have any that I could see?", L_worm_see_bones, + "And then?", L_worm_final, + "Zzzzzzzz.......", L_End; + +L_worm_final: + mes "[Kfahr the Warrior]"; + mes "\"Nothing much else happened on that trip. When we arrived in Tulimshar, people at first didn't believe the story, of course, until we showed them the treasures and the bones. Ah, those were wonderful days...\""; + mes "He sighs and leans back, a nostalgic look on his face."; + next; + goto L_Main_menu; + +L_worm_bones: + mes "[Kfahr the Warrior]"; + mes "\"Weren't you listening? A desert worm is not a regular worm; a worm couldn't survive in the desert.\""; + next; + menu + "Do you have any bones that I could see?", L_worm_see_bones, + "Never mind that, what happened then?", L_worm_final, + "Zzzzzzzz.......", L_End; + +L_worm_see_bones: + if (@Q_status == @QS_KNIFE_QUEST) + goto L_bone_ip; + if (@Q_status > @QS_KNIFE_QUEST) + goto L_worm_continue2; + if (BaseLevel >= 40) + goto L_bone_quest; + + mes "[Kfahr the Warrior]"; + mes "\"Of course!\""; + mes "He pulls out a strangely curved knife with a yellow-whiteish blade that is almost transparent at the edge."; + next; + mes "[Kfahr the Warrior]"; + mes "\"When hardened properly, this bone knife can last a lifetime! One of the best knives you will find, too.\""; + mes "He puts the knife back into his pocket."; + next; + goto L_Main_menu; + +L_worm_continue2: + mes "[Kfahr the Warrior]"; + mes "Kfahr laughs."; + mes "\"Just have a look at the knife I gave you if you don't believe me!\""; + next; + goto L_Main_menu; + +L_tale_desert_temple: + @current_story = 2; + callsub L_tale_sub; + if (@story_abort) goto L_Main_menu; + + mes "[Kfahr the Warrior]"; + mes "\"Ah, that...\""; + mes "Kfahr leans back and takes a sip from his beer."; + next; + mes "[Kfahr the Warrior]"; + mes "\"That was many years ago, when George and I were just kids. George later became a pirate, you see; he always loved hunting for treasure. But back in those days it was all on level ground.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"George had found a treasure map somewhere... and when I say `found', I mean that in a fairly liberal sense; he always loved those maps, almost as much as the excitement of hunting for treasure.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Anyway, that map pointed to a spot in the desert a good day's walk south of Tulimshar. So we grabbed our satchels and coats and packed food and water, and headed there in the evening.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We walked all night. As you know, it's best not to travel during the day if you can avoid it, and we were young and energetic in those days, so that was easily avoided.\""; + mes "He sighs and takes another sip."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Anyway, when the sun rose in the morning, we still hadn't found the place. So we climbed up on the nearest dune and looked all around to find it.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"But there was nothing, nothing at all. We looked and looked – and suddenly George screamed: While we weren't paying attention to nearby things, scorpions had crept up on us!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"The scorpions had smelled the food we had brought and cut open our satchels, tearing our waterskins and making a mess of our food – and now that they were done with that, they were coming for us!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We didn't have any suitable weapons, and not much of a choice either, so we made a break for it. We ran into the desert, fast as our legs would carry us, and the scorpions after us.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We very nearly didn't make it. There was nothing around but sand, and we had no water, no food – at least we'd had our breakfast already – and the sun kept burning, and burning, and trying to cook us alive.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We had long lost the scorpions, but we were dry like parchment, and exhausted from all the sun and running. So we sat down in the shades of a dune and contemplated our options.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Without water we couldn't last during the day. So our only hope was to find shelter somewhere – except that the only thing around was sand, and the mid-day sun would rob that of all shelter.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So we resigned to continuing to search for something, anything – it was either that, or die of thirst for sure. The only problem was that we were already so thirsty and it was so bright that we couldn't see nor walk straight anymore.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So we had barely made it to the top of the next dune when George slipped and rolled down the other side. I wanted to catch him, but I was too dizzy myself, and so I rolled after him.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We seemed to roll down for hours, and I kept feeling dizzier and dizzier; I didn't have the strength to stop. When we arrived at the bottom, I just wanted to lie down and let the sun dry me up.\""; + mes "Kfahr takes a deep sip of beer. \"Aaah.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I was being foolish, of course. You should never give up, no matter how hopeless the situation may seem. Anyway, I finally did decide to get up on my knees and look around again...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"...and what I saw right before me, believe it or not, was a giant face of a man, carved into rock – there, in the middle of the desert, half-sunk, a shattered visage!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I pulled George up – I didn't have the strength to speak, but walking seemed to work – and we slowly made our way over to it. We weren't thinking much, just trying to find some shade, so we climbed into that thing's ear.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Inside it felt moist, as if it was a real ear – not that I've climbed inside a real ear, mind you! But that feeling of cool and dampness and water was like a magical healing potion; we suddenly felt strength in our legs again.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"When we looked around, we noticed that there was a passage leading further underground, and long-spent torches on the wall. Fortunately I still had my tinderbox, so I wrapped my shirt around a torch and lighted it.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We climbed down, and soon we heard the dripping of water – we had found an underground water-hole! More than that, we had found a gigantic underground cave, and, at the end of it, a huge portal.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We first drenched ourselves in water – somehow managing not to douse the torch – and drank until we were ready to burst. When we had rested, we went to the portal to have a closer look.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"The portal was made out of bronze, or some similar metal, with images of snakes engraved all over. Curious as we were, we pulled the door open – it wasn't locked or barred in any way – and had a look inside.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"The passages in there were cool and dark, with a ceiling high enough to swallow the light of my torch. There were snakes, quite a few of them, but we were both quick-footed and managed to avoid them.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"There were chambers and inscriptions and more torches, but not a living being besides us and the snakes. Hmm. Though I could have sworn that some of the statues there were following us with their eyes...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"All went well, until George stepped into a trap. A piece of ground just caved in, and if I hadn't grabbed his hand at the last second, he would have ended up on some rusty and probably poisoned spikes on the bottom...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"But I moved too fast, and slipped, and let go of the torch to catch myself with the other hand – and the torch ended up in the bottom of the pit! Well, better the torch than George, I suppose...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Still, we no longer had any light. Being careless, I had gotten my tinderbox wet while we were at the water-hole, so we couldn't make another torch either.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We had the choice between staying by our torch and watching it die, and then follow suit at the hands, or, well, fangs of the snakes, or wandering off in the dark, to be eaten by snakes someplace else.\""; + mes "Kfahr empties his beer, looking a bit disappointed."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Anyway, we took the latter option. We wandered through the dark, somehow barely avoiding the snakes and the traps, running into walls and hitting our heads on archways, until, suddenly, we saw something shining up ahead.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"That thing was on some kind of pedestal, and it looked like a golden tablet of sorts. We clambered towards it – the only source of light in here, the only thing that could save us – and hesitated.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Should we just take it? This was clearly some kind of temple, so it might be something sacred. George and I argued about it for a while, until I decided to end the discussion – so I simply grabbed it: we needed light.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"At that point, a terrible grinding noise started all around us, as the pedestal began to sink into the ground. We had triggered some ancient trap!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Holes on the walls were opening up, and snakes began to gush out – only now did we realise that we were in a huge, opulent chamber, with gold and gems and images all around! But now it was too late for any looting; we had to run for our lives!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So we ran from that slithering mass, faster than we ever had! We had no idea where we were going of course, but at least we had light again...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Somehow we got lucky, somehow we escaped. It was evening again when we climbed out of that ear into the desert again, with only our lives and that golden tablet. We only barely made it back to Tulimshar in the morning.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"But we did have the tablet as a proof of what happened.\""; + mes "He grins."; + mes "\"That was my first real adventure, I think. Ah, those were exciting days.\""; + next; + menu + "Wow.", L_Main_menu, + "What happened to the tablet?", L_tale_tablet, + "Did you go there again?", L_tale_temple_again, + "Zzzzzzz.....", L_End; + +L_tale_tablet: + mes "[Kfahr the Warrior]"; + mes "\"Well, we couldn't read it. We later sold it for a good price, to a young travelling archeologist; Doctor Nohlidge or something like that. She said that the engravings described sacrifical practices of an ancient snake cult...\""; + mes "He shrugs."; + next; + goto L_Main_menu; + +L_tale_temple_again: + mes "[Kfahr the Warrior]"; + mes "Kfahr laughs."; + mes "\"Of course we tried to go there again. After seeing all that treasure, George wouldn't give up on it. We tried many times – as did others, from what I've heard – but we never found it again.\""; + next; + goto L_Main_menu; + +L_tale_hero_tulimshar: + @current_story = 3; + callsub L_tale_sub; + if (@story_abort) goto L_Main_menu; + + mes "[Kfahr the Warrior]"; + mes "\"Yes, Hero of Tulimshar. That was many years"; + mes "ago, but I did save the city of Tulimshar from a deadly drought.\""; + mes "He grins broadly."; + mes "\"And quite a feat that was, let me tell you!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Back in those days, there wasn't much trade with Hurnscald, and Tulimshar was dependent on its own water supply – critically dependent, even.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Now, one day the water people drew from the wells started smelling. The smell was nauseating, and people who drank from it became violently sick.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So the entire town was without water, except for the water reserves in the cistern. Someone had to act quickly – and of course that someone was me.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"With nothing more than a torch, some light armor and a sword, I climbed down one of the wells. It was a long climb; the wells go down fairly deep.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I noticed that there were some holes in the walls of the wells, with hollow spaces on the sides... Hmm, that reminds me that I still have to check whether the rumors of a labyrinth underneath Tulimshar are true.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Anyway, it took me a long time to get down, and every minute the stench was getting worse – something really bad was down there. I had to stop and tie a wet piece of cloth over my mouth so that I wouldn't inhale all of that nasty stuff.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"My torch was in an even poorer shape – whatever was making that smell had killed the flame, so I soon had to rely on the light from above to see anything.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Finally I arrived at the water level. All Tulimshar wells dip into the same underground lake, which is on the side of a huge underground cavern. And in the midst of that cavern lay – hardly visible through the greenish mist coming from it – a Stinkewyrm!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Stinkewyrms are smaller cousins of dragons, but just as dangerous. They have a green, sticky skin, and, well, they stink. A lot. This one was particularly bad – it had filled up the entire cave with stinkiness!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I climbed down and swam to the shore. The stench was terrible; I had to hold my breath to get closer to the monster. There it was, lying on the ground, snoring, poisoning all our water! So I tried to wake it up to scare it away.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I kicked it. I yelled at it. (Bad mistake, I got some of that stinky stuff in my lungs.) I poked at it with my sword. I even tried to poke it in the eyes, but I couldn't get that close to its mouth – that was where most of the smell was coming from.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"After a few attempts I couldn't take it anymore, so I had myself be pulled up again. It took me a while to recover and to tell the tale. We talked about what could be done, but no-one had an idea.\""; + mes "Kfahr takes a deep sip from his beer."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Finally, I came up with something. Stinkewyrms love that terrible stench of theirs, so what should be their natural enemy? Why, soap, of course!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"We couldn't just dump all the soap into the underground lake, of course; the water would be undrinkable again. So we collected some of the soap, and I climbed down again with it.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Having arrived at the bottom, I cut off the biggest of the water buckets and filled it with water – and that was a really big one, I could hardly carry it when it was full. Then I dissolved most the soap, and poured that onto the Stinkewyrm's head.\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr laughs."; + mes "\"Ah, that caught its attention! You should have seen that dragon roar, as it jumped to its feet and tried to find out who had soaped it! I rushed back to the water and made another bucket of soap water.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"But it had noticed me! And as soon as it had realized where I was, it came after me. Then it stopped, towering right before me, its stench nearly killing me, and grinned that broad, crooked-teeth dragon smile of its kind.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Then it took a deep breath – and I realised that that was probably 'it' for me; Stinkewyrms can breathe fire like real dragons, and I didn't have the time to run back to the water.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"But when it breathed out, only a tiny little flame came out – and a lot of terrible smell that nearly knocked me off my feet.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"For you see, it had generated so much of the deadly smell around itself that even its own fire breath couldn't survive!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"So it stared at me, mouth wide agape – the perfect opening!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I stormed at it and before it could even blink, it had a huge load of bubbly soap water down its throat.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"You should have heard the coughing and shaking! I swear, I thought the roof would collapse as it was jumping and choking...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Bubbles were coming out of its mouth, its nostrils, even its ears! The poor wyrm must have never felt so clean in its life!\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"I was out of soap, but the beast didn't know that – so I quickly grabbed another bucket and charged it again.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"And it worked! Seeing me like this again, it ran, squealing, back into the underground caves from where it must have come.\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr roars with laughter and slaps his hands on the table."; + mes "\"So we defeated it with hygiene! Ah, that was wonderful. After a day, the stench had worn off enough that we could drink the water again, and a week later it was almost completely gone. And of course I was the hero of the day.\""; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr downs the rest of his beer."; + mes "\"And from that day on they called me the `Hero of Tulimshar'.\""; + next; + goto L_Main_menu; + +L_tale_desert: + @current_story = 4; + callsub L_tale_sub; + if (@story_abort) goto L_Main_menu; + + mes "[Kfahr the Warrior]"; + mes "Kfahr leans back, trying to find the right words to describe the desert."; + mes "\"The desert... a cold and lonely place at night, and a hot and lonely place during the day.\""; + mes "For someone who apparently spent most of his life in the desert, his insights sometimes seem less than profound."; + next; + mes "[Kfahr the Warrior]"; + mes "\"The desert is a living hell during some times of the year. Filled with black scorpions and snakes, except for the shadier areas, and mountain snakes if you go further east.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"South of Tulimshar is a fairly protected region; the nomads keep the snakes out of there and you'll find only relatively harmless monsters. But go west from there, to the beach, and it's scorpions and snakes...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"...and east of there you find the old Hatmaker cave, now filled to the brim with snakes! Rumors have it that this was once an oasis, in centuries long gone by, but as far as I'm concerned that pit is just a dump that you best avoid.\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"Go further to the east and you'll find ol' Pachua up on the mountain. He seems to have some kind of power over the mountain snakes there; they never attack him. I think he's a bit creepy, personally...\""; + next; + mes "[Kfahr the Warrior]"; + mes "\"...but if he offers you some of his tobacco, then by all means give it a try! That stuff is amazing.\""; + mes "He laughs, then begins to cough."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Not terribly healthy, though, I s'pose...\""; + next; + goto L_Main_menu; + +L_gain_power: + if ((@beer_count - @has_beer) < 1) + goto L_story_first; + if (@Q_status < @QS_KNIFE_QUEST) + goto L_bone_quest; + + mes "[Kfahr the Warrior]"; + mes "\"Yeees, yes... doesn't everyone?\""; + mes "He laughs briefly."; + mes "\"Don't worry – you can't become as powerful as I, of course, but if you keep practicing, you can get pretty damn close! Just make sure to pick your opponents carefully, and know when to run to live another day!\""; + next; + goto L_Main_menu; + +L_story_first: + mes "[Kfahr the Warrior]"; + mes "\"That's the spirit! Perhaps you better listen to one of my tales, then!\""; + next; + goto L_Main_menu; + +L_bone_quest: + if (@Q_status == @QS_KNIFE_QUEST) + goto L_bone_ip; + if (@Q_status > @QS_KNIFE_QUEST) + goto L_bone_completed; + if (BaseLevel < 40) + goto L_bone_tooweak; + + mes "[Kfahr the Warrior]"; + mes "Kfahr stares at you for a moment, then nods."; + mes "\"You seem reasonably skilled. I think I may have something that I no longer need, but I don't want to give it to just anyone...\""; + mes "He hesitates, obviously trying to make up his mind about something, then continues."; + @Q_status = @QS_KNIFE_QUEST; + callsub L_Update_Var; + next; + goto L_bone_ip; + +L_bone_ip: + mes "[Kfahr the Warrior]"; + mes "\"Bring me " + @BLACK_STINGERS_NR + " black scorpion stingers and " + @MUSHROOMS_NR + " small mushrooms to prove that you are a competent warrior, and I'll see if I have something for you.\""; + mes "He grins."; + next; + mes "[Kfahr the Warrior]"; + mes "\"But while you are here... perhaps you would like to listen to another story?\""; + next; + goto L_Main_menu; + +L_bone_completed: + mes "[Kfahr the Warrior]"; + mes "\"I really don't have anything else I'd want to give away to make you stronger. Look around a bit yourself! You won't become a hero if you keep begging for help!\""; + next; + goto L_Main_menu; + +L_bone_tooweak: + mes "[Kfahr the Warrior]"; + mes "\"You know, little one, if you keep practicing a little and come back once you're a bit stronger, I might have something for you...\""; + mes "He winks."; + next; + goto L_Main_menu; + +L_Check: + mes "[Kfahr the Warrior]"; + mes "Kfahr eyes you with unconcealed amusement."; + mes "\"Welcome back! Did you bring me the things I asked for?\""; + next; + menu + "Yes, here they are!", L_completecheck, + "Er, what were those things again?", L_bone_ip, + "No, sorry, I didn't have the time.", L_Main_menu, + "I forgot! Let me get them right now.", L_End; + +L_completecheck: + if (countitem("BlackScorpionStinger") < @BLACK_STINGERS_NR) + goto L_missing_stingers; + if (countitem("SmallMushroom") < @MUSHROOMS_NR) + goto L_missing_mushrooms; + + mes "[Kfahr the Warrior]"; + mes "Kfahr is delighted."; + mes "\"Well done, well done! Now that's what I call Warrior spirit!\""; + mes "He laughs, then suddenly stops, turning to you with suspicion in his eyes."; + mes "\"You DID get those yourself, didn't you? Not buy them or somesuch...?\""; + next; + mes "[Kfahr the Warrior]"; + mes "Before you can answer, he laughs and slaps you on the back again."; + mes "\"Ah, what am I thinking! Too many years in the desert make you a little suspicious of everyone and everything! Naah, I believe you.\""; + mes "He pulls a strangely curved knife out of a side pocket and holds it up to the light. The blade is partly transparent, and looks quite sharp."; + next; + mes "[Kfahr the Warrior]"; + mes "\"It's a bone knife, carved out of the umplex bone of a desert worm... you can probably guess which one.\""; + mes "He grins broadly again, weighing the weapon."; + mes "\"It's a little heavy, but one of the best knives you can get. Certainly beats a short sword any time of day.\""; + mes "I had the nomads make me a few of them, and I hardly use them nowadays, so I think I can part with this one."; + next; + if (countitem("BlackScorpionStinger") < @BLACK_STINGERS_NR) + goto L_missing_stingers_2; + if (countitem("SmallMushroom") < @MUSHROOMS_NR) + goto L_missing_mushrooms_2; + getinventorylist; + if (@inventorylist_count == 100) goto L_Knife_TooMany; + mes "[Kfahr the Warrior]"; + mes "He hands you the knife."; + mes "\"Oh, and I think I'll keep those in return; I know someone who will trade them for antidote potions.\""; + mes "He pockets the stingers and mushrooms."; + mes "[" + @KNIFE_QUEST_XP + " experience points]"; + @Q_status = @QS_KNIFE_QUEST_DONE; + callsub L_Update_Var; + delitem "BlackScorpionStinger", @BLACK_STINGERS_NR; + delitem "SmallMushroom", @MUSHROOMS_NR; + getexp @KNIFE_QUEST_XP, 0; + getitem "BoneKnife", 1; + next; + goto L_Main_menu; + +L_Knife_TooMany: + mes "[Kfahr the Warrior]"; + mes "\"You don't have room for this. Come back when you do.\""; + close; + +L_missing_stingers: + mes "[Kfahr the Warrior]"; + mes "\"No, no... I said " + @BLACK_STINGERS_NR + " black scorpion stingers."; + if (countitem("BlackScorpionStinger")) + mes "You will need " + (@BLACK_STINGERS_NR - (countitem ("BlackScorpionStinger"))) + " more of those.\""; + if (countitem("BlackScorpionStinger") == 0) + mes "You didn't bring even a single one!\""; + close; + +L_missing_stingers_2: + mes "[Kfahr the Warrior]"; + mes "\"You just had " + @BLACK_STINGERS_NR + " black scorpion stingers. What happened to them?"; + if (countitem("BlackScorpionStinger")) + mes "You will need " + (@BLACK_STINGERS_NR - (countitem ("BlackScorpionStinger"))) + " more of those.\""; + if (countitem("BlackScorpionStinger") == 0) + mes "You didn't bring even a single one!\""; + close; + +L_missing_mushrooms: + mes "[Kfahr the Warrior]"; + mes "\"No, no... I said " + @MUSHROOMS_NR + " small mushrooms."; + if (countitem("SmallMushroom")) + mes "You will need " + (@MUSHROOMS_NR - (countitem ("SmallMushroom"))) + " more of those.\""; + if (countitem("SmallMushroom") == 0) + mes "You didn't bring me even a single little mushroom!\""; + close; + +L_missing_mushrooms_2: + mes "[Kfahr the Warrior]"; + mes "\"You just had " + @MUSHROOMS_NR + " small mushrooms. What happened to them?"; + if (countitem("SmallMushroom")) + mes "You will need " + (@MUSHROOMS_NR - (countitem ("SmallMushroom"))) + " more of those.\""; + if (countitem("SmallMushroom") == 0) + mes "You didn't bring me even a single little mushroom!\""; + close; + +L_stinger_check: + mes "[Kfahr the Warrior]"; + mes "Kfahr grins at you."; + mes "\"Welcome, welcome! Did you bring me my snake skins?\""; + next; + menu + "Yes, here they are!", L_ss_cc, + "No, sorry, I didn't have the time.", L_Main_menu, + "I forgot! Let me get them right now.", L_End; + +L_ss_cc: + if (countitem("SnakeSkin") < @SNAKE_SKINS_NR) + goto L_snakeskins_missing; + getinventorylist; + if (@inventorylist_count == 100) + goto L_SnakeSkins_TooMany; + delitem "SnakeSkin", @SNAKE_SKINS_NR; + getitem "GoldenScorpionStinger", 1; + @Q_status = @QS_STINGER_QUEST_DONE; + callsub L_Update_Var; + getexp @STINGER_QUEST_XP, 0; + mes "[Kfahr the Warrior]"; + mes "Kfahr takes the skins and pulls a golden scorpion stinger out of his pocket."; + mes "\"Well, you've earned it. But be careful – the poison in there is still lethal, after all those years.\""; + mes "He hands you the scorpion stinger."; + mes "[" + @STINGER_QUEST_XP + " experience points]"; + next; + goto L_Main_menu; + +L_snakeskins_missing: + mes "[Kfahr the Warrior]"; + mes "\"No, no... I said " + @SNAKE_SKINS_NR + " snake skins."; + if (countitem("SnakeSkin")) + mes "You will need " + (@SNAKE_SKINS_NR - (countitem ("SnakeSkin"))) + " more of those.\""; + if (countitem("SnakeSkin") == 0) + mes "You didn't bring even a single skin!\""; + close; + +L_SnakeSkins_TooMany: + mes "[Kfahr the Warrior]"; + mes "\"You don't have room for this. Come back when you do.\""; + close; + +L_Give_beer: + if (countitem("Beer") < 1) + goto L_player_out_of_beer; + if (@has_beer) + goto L_enough_beer_for_now; + if (@beer_count > 4) + goto L_too_much_beer; + + setarray @beermessages$, + "Ah yes... a warrior's drink!", + "Generous, generous! I like that!", + "Hahah! That's just what I needed!", + "I love this town! Hurnscaldian hospitality! Mrahahahah!", + "A'ight, one more can't hurt, eh?"; + + @mesg$ = @beermessages$[@beer_count]; + + delitem "Beer", 1; + @has_beer = 1; + @beer_count = @beer_count + 1; + + mes "[Kfahr the Warrior]"; + mes "Kfahr is visibly delighted."; + mes "\"" + @mesg$ + "\""; + mes "He takes a deep sip."; + mes "\"Aaah, magnificent!\""; + + if (@beer_count > 4) + mes "Kfahr seems quite relaxed now."; + next; + goto L_Main_menu; + +L_enough_beer_for_now: + mes "[Kfahr the Warrior]"; + mes "\"Generous, generous! But I still have plenty in here!\""; + mes "He laughs and takes a sip from the beer you gave him earlier."; + next; + goto L_Main_menu; + +L_too_much_beer: + mes "[Kfahr the Warrior]"; + mes "Kfahr leans back and sighs heavily."; + mes "\"Very, very generous... bu' I think I'm fine for now.\""; + mes "He suppresses a burp."; + next; + goto L_Main_menu; + +L_player_out_of_beer: + mes "[Kfahr the Warrior]"; + mes "Kfahr stares at you, then begins to laugh."; + mes "\"Mrahahahahaha! Here's the beer! Right, right! Naah, I get it! Save your gold for whatever you need it for! But if you have some spare and want to share a beer, you know where to find me!\""; + next; + goto L_Main_menu; + +L_golden_scorpion: + if (@Q_status > @QS_STINGER_QUEST) + goto L_gs_over_ask; + if (@Q_status == @QS_STINGER_QUEST) + goto L_gs_ask_again; + if (@Q_status == @QS_LOST_WRESTLING) + goto L_gs_wrestle_again; + + mes "[Kfahr the Warrior]"; + mes "He grins."; + mes "\"Fought any? I single-handedly raided a nest of those beasts! Ah, but golden scorpions are almost unheard of in these parts. Why do you ask?\""; + next; + menu + "Never mind, I was just curious.", L_Main_menu, + "I need a golden scorpion stinger.", L_Next2; + +L_Next2: + mes "[Kfahr the Warrior]"; + mes "\"A golden scorpion stinger? Those are rare and valuable, I hope that you know that!\""; + if (BaseLevel < 60) + goto L_lowlvl_for_stinger; + if (@Q_status < @QS_KNIFE_QUEST) + goto L_golden_requires_quest; + if (@Q_status < @QS_KNIFE_QUEST_DONE) + goto L_golden_requires_done; + + mes "\"Still, you are a warrior of repute. I'll consider giving it to you...\""; + next; + mes "[Kfahr the Warrior]"; + mes "A mischievous sparkle lightens up in his eyes."; + mes "\"...if you arm-wrestle me for it!\""; + next; + goto L_gs_wrestle_intro; + +L_gs_wrestle_intro: + menu + "Never!", L_Main_menu, + "Wait... what?", L_wrestle_explain, + "Bring it on!", L_gs_wrestle; + +L_golden_requires_done: + mes "He hesitates."; + mes "\"But no, this is too valuable. Perhaps if you finish that other quest I gave you...?\"."; + next; + goto L_Main_menu; + +L_golden_requires_quest: + mes "He hesitates."; + mes "\"But no, this is too valuable. I think I should have you prove your worthiness with another quest first...\""; + next; + goto L_bone_quest; + +L_wrestle_explain: + mes "[Kfahr the Warrior]"; + mes "\"Arm wrestling! Arm against arm! And whoever is stronger wins! If you manage to defeat me, I'll give you a little quest for the stinger. How about it?\""; + next; + goto L_gs_wrestle_intro; + +L_lowlvl_for_stinger: + mes "\"Well, I have one, but I can't just give it to anyone. Maybe if you train a little and become a worthy warrior I will consider giving it away...\""; + next; + goto L_Main_menu; + +L_gs_over_ask: + mes "[Kfahr the Warrior]"; + mes "\"Is this about the stingers again? I already gave you a golden stinger, I'm not going to part with any more.\""; + next; + goto L_Main_menu; + +L_gs_ask_again: + mes "[Kfahr the Warrior]"; + mes "\"This is about the stinger again, right? Well, just bring me " + @SNAKE_SKINS_NR + " snake skins, and you can have one.\""; + next; + goto L_Main_menu; + +L_gs_wrestle_again: + mes "[Kfahr the Warrior]"; + mes "\"This is about the stinger again, eh? So you want to give it another try?\""; + mes "He grins broadly."; + next; + goto L_gs_wrestle; + +L_gs_wrestle: + mes "[Kfahr the Warrior]"; + mes "You sit down. Both of you place your arms on the table, on opposing sides, and grab each other's hands."; + next; + + @KFAHR_STR = 70 + @beer_count * 6; + @KFAHR_AGI = 60 - @beer_count * 5; + @kfahr_stamina = 120; + + @PC_STR = Str; + @PC_AGI = Agi; + @PC_MAX_STAMINA = Vit + 20; + @pc_stamina = @PC_MAX_STAMINA; + + setarray @positions$, + "Kfahr's hand is almost on the table.", + "Kfahr's hand is pushed back.", + "Kfahr and your hands are centered.", + "Your hand is pushed back.", + "Your hand is almost on the table."; + + @position = 2; + @first_round = 1; + goto L_wrestle_loop; + +L_wrestle_loop: + mes "[Arm-wrestling with Kfahr]"; + mes @positions$[@position]; + if ((@pc_stamina * 2 <= @PC_MAX_STAMINA) && (@pc_stamina * 4 > @PC_MAX_STAMINA)) + mes "You feel a little exhausted."; + if (@pc_stamina * 4 <= @PC_MAX_STAMINA) + mes "You feel very exhausted."; + next; + menu + "Push!", L_wrestle_push, + "Hold!", L_wrestle_hold, + "Slam!", L_wrestle_slam, + "Consider your options", L_wrestle_info; + +L_wrestle_info: + mes "[Arm-wrestling with Kfahr]"; + mes "Kfahr is a strong arm-wrestling opponent. Winning against him won't be easy."; + mes "Each round you have to choose an action; what you choose determines both your chances of moving each other's arms and how much weaker you get."; + next; + mes "[Arm-wrestling with Kfahr]"; + mes "If you PUSH, you may be able to push him back, but if you fail, you will lose more stamina than if you had succeeded."; + next; + mes "[Arm-wrestling with Kfahr]"; + mes "If you HOLD, you lose little stamina and may be able to hold him and drain his stength, but you cannot win just by holding."; + next; + mes "[Arm-wrestling with Kfahr]"; + mes "If you SLAM, you try to move against him quickly – if you are successful, you may push him back quite a bit, but losing this will drain you badly."; + next; + goto L_wrestle_loop; + +L_wrestle_push: + @kfahr_def = @KFAHR_STR; + @attack = @PC_STR; + @Cost_factor = 2; + callsub L_wrestle_attack; + if (@result < -1) set @result, -1; // can't push back further than one + goto L_wrestle_next; + +L_wrestle_hold: + @kfahr_def = @KFAHR_STR; + @attack = @PC_STR; + @Cost_factor = 1; + callsub L_wrestle_attack; + if (@result < 0) set @result, 0; // hold only + goto L_wrestle_next; + +L_wrestle_slam: + if (@beer_count == 5 && @first_round) + goto L_quick_slam; + @kfahr_def = @KFAHR_AGI; + @attack = @PC_AGI; + @Cost_factor = 4; + callsub L_wrestle_attack; + goto L_wrestle_next; + +L_wrestle_attack: + @kfahr_stamina_bonus = @kfahr_stamina; + @pc_stamina_bonus = @kfahr_stamina; + + if (@kfahr_stamina_bonus > 40) + @kfahr_stamina_bonus = 40; + if (@pc_stamina_bonus > 40) + @pc_stamina_bonus = 40; + + @score = @kfahr_def + @kfahr_stamina_bonus - @attack - @pc_stamina_bonus + rand(20) - rand(20); + @result = @score / 10; + + if (@result > 1) + @result = 1; + if (@result > 0) + @kfahr_stamina = @kfahr_stamina - 12; + if (@result == 0) + @kfahr_stamina = @kfahr_stamina - 16; + if (@result < 0) + @kfahr_stamina = @kfahr_stamina - 8; + if (@result < 0) + @pc_stamina = @pc_stamina - (6 * @Cost_factor); + if (@result == 0) + @pc_stamina = @pc_stamina - (8 * @Cost_factor); + if (@result > 0) + @pc_stamina = @pc_stamina - (4 * @Cost_factor); + if (@kfahr_stamina < 0) + @kfahr_stamina = 0; + if (@kfahr_stamina < 0) + @pc_stamina = 0; + return; + +L_wrestle_next: + @first_round = 0; + + mes "[Arm-wrestling with Kfahr]"; + if (@result < 0) + mes "You manage to push him back!"; + if (@result == 0) + mes "You hold your position!"; + if (@result > 0) + mes "Kfahr pushes you back!"; + next; + @position = @position + @result; + if (@position < 0) + goto L_wrestle_win; + if (@position > 4) + goto L_wrestle_lose; + goto L_wrestle_loop; + +L_wrestle_lose: + mes "[Arm-wrestling with Kfahr]"; + mes "Kfahr slams your hand on the table."; + next; + mes "[Kfahr the Warrior]"; + mes "\"Don't worry! It was a good attempt – but beating Kfahr is not quite so easy!\""; + mes "He laughs and slaps you on the shoulder."; + mes "\"But come back any time you want to try again!\""; + next; + @Q_status = @QS_LOST_WRESTLING; + callsub L_Update_Var; + goto L_Main_menu; + +L_quick_slam: + mes "[Arm-wrestling with Kfahr]"; + mes "Your hands have barely touched as you push against him with all your might. His reactions slowed by the beer, Kfahr doesn't stand a chance."; + next; + goto L_wrestle_win; + +L_wrestle_win: + mes "[Arm-wrestling with Kfahr]"; + mes "You slam Kfahr's hand on the table."; + next; + mes "[Kfahr the Warrior]"; + mes "Kfahr stares first at the hand, then at you, incredulously."; + mes "Then he begins to roar with laughter, slapping you on the shoulder."; + mes "\"Excellent, excellent! Caught me in a weak moment there, did ya!\""; + next; + mes "[Kfahr the Warrior]"; + mes "After calming down, Kfahr outlines your quest."; + mes "\"As I promised, I will give you the stinger if you do something for me. Get me " + @SNAKE_SKINS_NR + " snake skins, and I'll let you have it.\""; + next; + @Q_status = @QS_STINGER_QUEST; + callsub L_Update_Var; + goto L_Main_menu; + +L_End: + close; + +L_Update_Var: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/009-2/lena.txt b/npc/009-2/lena.txt new file mode 100755 index 00000000..eb99f21f --- /dev/null +++ b/npc/009-2/lena.txt @@ -0,0 +1,119 @@ + +009-2,146,43,0 script Lena NPC182,{ + @state = ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@state >= 6) goto L_Lena_Done; + if (@state == 5) goto L_Lena_Success; + if (@state == 4) goto L_LBL_Fail; + if (@state == 3) goto L_LBL_Fail; + if (@state == 2) goto L_Lena_Bandit_Leader; + if (@state == 1) goto L_Lena_Fairy_Hat; + if (BaseLevel >= 30) goto L_Lena_Start; + + mes "[Lena]"; + mes "\"I got ambushed by a group of bandits and one of them stabbed me pretty good. Hopefully I heal up soon so I can fight this menace.\""; + next; + mes "\"Ah, I wish my dear friend Nickos could be here. He's one of the guards in Tulimshar and he'd know how to deal with those outlaws!\""; + goto L_close; + +L_Lena_Start: + mes "[Lena]"; + mes "\"While wandering through the forest, I was ambushed by bandits. Though I got them all, one of them stabbed me pretty good. I'm still healing from that encounter. I'm worried that the bandit threat may spread.\""; + menu + "Don't worry, I can take out some of these scumbags.", L_Lena_Approves, + "I think I left my courage in another pair of pants. See you later!", L_Lena_No_Fan; + +L_Lena_Approves: + @state = 1; + callsub S_Update_Var; + mes "[Lena]"; + mes "\"You look like you can handle yourself in a fight. If you can take on this scourge I'll reward you with a hat like mine. In order to prove your mettle, bring me 10 Bandit Hoods so I know they've met their match.\""; + areamonster "008-1",25,60,40,65,"Bandit",1064,3, "::"; + areamonster "011-1",35,40,65,60,"Bandit",1064,3, "::"; + goto L_close; + +L_Lena_No_Fan: + mes "[Lena]"; + mes "\"What will Hurnscald do if these bandits overrun the town? I hope you reconsider.\""; + goto L_close; + +L_Lena_Fairy_Hat: + if (countitem("BanditHood") < 10) + goto L_Lena_NotEnough; + getinventorylist; + if (@inventorylist_count - (countitem("BanditHood")== 10) > 99) + goto L_TooMany; + @state = 2; + callsub S_Update_Var; + delitem "BanditHood", 10; + getitem "FairyHat", 1; + mes "[Lena]"; + mes "\"Ah, you've brought me the Bandit Hoods. As promised, here is a hat like mine.\""; + next; + mes "\"Unfortunately, I feel this bandit threat may have grown. Perhaps they are being lead? I noticed many of them seem to hang around a cave just west of Hurnscald. If you could defeat their leader I know they will become less of a threat to Hurnscald. I'll reward you with armor like mine if you do. Sound like something you could do?\""; + menu + "Consider it done!", L_LBL_Yes, + "Woah there, that sounds a bit harder than what I can succeed at.", L_Lena_NoWay; + +L_Lena_NotEnough: + mes "[Lena]"; + mes "\"You don't have enough Bandit Hoods to prove you are taking care of this threat. Please come back with 10 Bandit Hoods to show you are taking care of these bandits.\""; + goto L_close; + +L_Lena_Bandit_Leader: + mes "[Lena]"; + mes "\"I feel this bandit threat may have grown. Perhaps they are being lead? I noticed many of them seem to hang around a cave just west of Hurnscald. If you could defeat their leader I know they will become less of a threat to Hurnscald. I'll reward you with armor like mine if you do. Sound like something you could do?\""; + menu + "Consider it done!", L_LBL_Yes, + "Woah there, that sounds a bit harder than what I can succeed at.", L_Lena_NoWay; + +L_LBL_Yes: + @state = 3; + callsub S_Update_Var; + areamonster "008-1",25,60,40,65,"Bandit",1064,3, "::"; + areamonster "011-1",35,40,65,60,"Bandit",1064,3, "::"; + mes "[Lena]"; + mes "\"You have a brave heart. Though I know you can succeed on your own, I recommend finding others to help you defeat the bandit leader. I believe he could pose a significant threat to solitary individuals seeking to challenge him. Good luck!\""; + goto L_close; + +L_Lena_NoWay: + mes "[Lena]"; + mes "\"That is too bad. Feel free to return at any time. This bandit threat needs to be pushed back.\""; + goto L_close; + +L_LBL_Fail: + @state = 3; + callsub S_Update_Var; + mes "[Lena]"; + mes "\"You haven't killed the bandit leader yet. This is a big problem. Please be careful.\""; + goto L_close; + +L_Lena_Success: + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + @state = 6; + callsub S_Update_Var; + getitem "ForestArmor", 1; + mes "[Lena]"; + mes "\"Excellent! You killed the bandit leader. Here is the armor as I promised you. Safe journeys!\""; + goto L_close; + +L_Lena_Done: + mes "[Lena]"; + mes "\"Thank you for all your help. With your efforts, we can only hope this scourge doesn't see a resurgence.\""; + goto L_close; + +L_TooMany: + mes "[Lena]"; + mes "\"You have too many items in your inventory. Please get rid of something so I can reward you.\""; + goto L_close; + +L_close: + @state = 0; + close; + +S_Update_Var: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT)); + return; +} diff --git a/npc/009-2/mapflags.txt b/npc/009-2/mapflags.txt new file mode 100755 index 00000000..599be6f9 --- /dev/null +++ b/npc/009-2/mapflags.txt @@ -0,0 +1,2 @@ +//009-2 mapflag town +//009-2 mapflag resave 009-2,149,43 diff --git a/npc/009-2/misc.txt b/npc/009-2/misc.txt new file mode 100755 index 00000000..ca100163 --- /dev/null +++ b/npc/009-2/misc.txt @@ -0,0 +1,51 @@ + +009-2,54,49,0 script Note#bar NPC400,{ + mes "[Note]"; + mes "\"We refuse service to anyone who:\""; + mes "\"• Has a bubblehead\""; + mes "\"• Is not properly shaded\""; + mes "\"• Can't walk without stopping after every step\""; + close; + // In case you don't get the joke, know that it's a parody on Illutia. +} + +009-2,109,44,0 script #Book NPC400,{ + if (getskilllv(SKILL_MAGIC)) + goto L_Magic; + mes "[Bookshelf]"; + mes "This bookshelf seems to have a selection of diaries and manuscripts, though you can't find anything that strikes you as being particularly interesting."; + close; + +L_Magic: + mes "[Bookshelf]"; + mes "Browsing through the books, you come across a manuscript entitled 'Notes of Potaffe, On Transmutation.'"; + next; + if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 2) + goto L_Magic_boring; + mes "[Bookshelf]"; + mes "Leafing through the manuscript, you find that you can read little of the tiny handwriting and understand only a fraction of what is said."; + next; + mes "[Bookshelf]"; + mes "After a while, you stumble across a section that appears to be written somewhat legibly. The author notes that he (or perhaps she?) is describing a completely new transmutation."; + next; + mes "[Bookshelf]"; + mes "Excitedly, you turn the page – only to find that it is stuck to the next and can't be freed!"; + next; + mes "[Bookshelf]"; + mes "The page after that is once again hastily written, with many crossed out words and sections and side remarks such as 'it almost worked' or 'it worked fine yesterday.'"; + next; + mes "[Bookshelf]"; + mes "The last word on that page is '" + get(.invocation$, "make-iron-powder") + ",' and it's underlined twice with a comment next to it saying 'finally got it right.'"; + next; + mes "[Bookshelf]"; + mes "Unfortunately, you can't make out what the transmutation is for or even whether it requires any materials..."; + next; + mes "[Bookshelf]"; + mes "You can't make out anything else of value, so you place the manuscript back in the bookshelf."; + close; + +L_Magic_boring: + mes "[Bookshelf]"; + mes "Leafing through the manuscript, you find that you understand too little of what is written to make any sense of it."; + close; +} diff --git a/npc/009-2/nicholas.txt b/npc/009-2/nicholas.txt new file mode 100755 index 00000000..8071ab35 --- /dev/null +++ b/npc/009-2/nicholas.txt @@ -0,0 +1,401 @@ + +009-2,185,55,0 script Nicholas NPC135,{ + @SETZER_XP = 100000; + @SHIELD_XP = 20000; + + @SHIELD_INITIAL = 0; + set @SHIELD_KNOWS_PATCH, 1; // knows that a leather patch is needed + set @SHIELD_COMPLETED, 2; // shield completed once + + @SETZER_INITIAL = 0; + @SETZER_KNOWS_OIL = 1; + @SETZER_KNOWS_STINGER = 2; + @SETZER_FLAG_MADE_OIL = 4; + @SETZER_FLAG_MADE_SETZER = 8; + + @Q_SETZER_MASK = NIBBLE_3_MASK; + @Q_SETZER_SHIFT = NIBBLE_3_SHIFT; + + @Q_SHIELD_MASK = NIBBLE_4_MASK; + @Q_SHIELD_SHIFT = NIBBLE_4_SHIFT; + + @Q_SETZER_status = (QUEST_Forestbow_state & @Q_SETZER_MASK) >> @Q_SETZER_SHIFT; + @Q_SHIELD_status = (QUEST_Forestbow_state & @Q_SHIELD_MASK) >> @Q_SHIELD_SHIFT; + + mes "[Nicholas]"; + mes "\"Hello, there! I'm an expert blacksmith. If you get me some Coal and Iron Ingots, I could make you a very valuable shield or helmet.\""; + next; + menu + "I have Iron Ingots!", L_Check, + "Where can I get Coal and Iron Ingots?", L_Info, + "I'm okay, thanks.", L_Pass; + +L_Check: + mes "[Nicholas]"; + mes "\"Let me take a look at how much you have...\""; + next; + if ( (countitem("IronIngot")<3) || (countitem("Coal") < 6) ) + goto L_NoItem; + if ( (countitem("IronIngot")<6) || (countitem("Coal") < 12) ) + goto L_StageA; + if ( (countitem("IronIngot")<9) || (countitem("Coal") < 18) ) + goto L_StageB; + goto L_StageC; + +L_Info: + mes "[Nicholas]"; + mes "\"You can find Coal and Iron Ore in mines. Once you have Coal and Iron Ore, find a smith that will smelt the Iron Ore and cast them into Iron Ingots.\""; + next; + mes "[Nicholas]"; + mes "\"Come back here with some Coal and Iron Ingots, and I'll make something nice for you.\""; + close; + +L_Pass: + mes "[Nicholas]"; + mes "\"Oh, okay. Come back any time.\""; + close; + +L_StageA: + mes "[Nicholas]"; + mes "\"That's just enough for me to make you a winged Knight's Helmet, but it'll cost you 10,000GP, 6 Coal and 3 Iron Ingots.\""; + next; + goto L_Main_menu; + +L_StageB: + mes "[Nicholas]"; + mes "\"Ahh, with that much Coal and Iron Ingots I can make you one of two helmets, for only 10,000GP, or I can make you a shield, for 20,000GP.\""; + mes ""; + mes "\"What would you like?\""; + next; + goto L_Main_menu; + +L_StageC: + mes "[Nicholas]"; + mes "\"Excellent, that's enough to make three different types of helmet. My fee is 10,000GP. I can also make a shield, but that will cost you 20,000 GP.\""; + mes ""; + mes "\"Which will it be?\""; + next; + goto L_Main_menu; + +L_Main_menu: + + @CHOICE_KNIGHT = 1; + @CHOICE_CRUSADE = 2; + @CHOICE_WARLORD = 3; + @CHOICE_SHIELD = 4; + @CHOICE_SETZER = 5; + @CHOICE_CANCEL = 6; + + setarray @choice$, "", "", "", "", "", ""; + @choices_nr = 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0; + + if (countitem("ShortSword") < 1) + goto L_Main_menu_post_setzer; + @choice$[@choices_nr] = "Can you make my Short Sword better?"; + @choice_idx[@choices_nr] = @CHOICE_SETZER; + @choices_nr = 1 + @choices_nr; + goto L_Main_menu_post_setzer; + +L_Main_menu_post_setzer: + + if ( (countitem("IronIngot")<3) || (countitem("Coal") <6) ) + goto L_No_more_helmets; + @choice$[@choices_nr] = "Knight's Helmet (3 Iron Ingots & 6 Coal)."; + @choice_idx[@choices_nr] = @CHOICE_KNIGHT; + @choices_nr = 1 + @choices_nr; + + if ( (countitem("IronIngot")<6) || (countitem("Coal") < 12) ) + goto L_No_more_helmets; + @choice$[@choices_nr] = "Crusade Helmet (6 Iron Ingots & 12 Coal)."; + @choice_idx[@choices_nr] = @CHOICE_CRUSADE; + @choices_nr = 1 + @choices_nr; + + @choice$[@choices_nr] = "Steel Shield (6 Iron Ingots & 12 Coal)."; + @choice_idx[@choices_nr] = @CHOICE_SHIELD; + @choices_nr = 1 + @choices_nr; + + if ( (countitem("IronIngot")<9) || (countitem("Coal") < 18) ) + goto L_No_more_helmets; + @choice$[@choices_nr] = "Warlord Helmet (9 Iron Ingots & 18 Coal)."; + @choice_idx[@choices_nr] = @CHOICE_WARLORD; + @choices_nr = 1 + @choices_nr; + goto L_No_more_helmets; + +L_No_more_helmets: + @choice$[@choices_nr] = "No thanks."; + @choice_idx[@choices_nr] = @CHOICE_CANCEL; + @choices_nr = 1 + @choices_nr; + menu + @choice$[0], L_MenuItems, + @choice$[1], L_MenuItems, + @choice$[2], L_MenuItems, + @choice$[3], L_MenuItems, + @choice$[4], L_MenuItems, + @choice$[5], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + if (@menu >= @choices_nr) + close; + + @choice = @choice_idx[@menu]; + if (@choice == @CHOICE_KNIGHT) + goto L_YesKnight; + if (@choice == @CHOICE_CRUSADE) + goto L_YesCrusade; + if (@choice == @CHOICE_WARLORD) + goto L_YesWarlord; + if (@choice == @CHOICE_SHIELD) + goto L_YesShield; + if (@choice == @CHOICE_SETZER) + goto L_SetzerQuest; + if (@choice == @CHOICE_CANCEL) + goto L_End; + close; + +L_NoItem: + mes "[Nicholas]"; + mes "\"It appears you don't have enough Coal and Iron Ingots for me to work with. Please do come back when you have more, though.\""; + close; + +L_NoMoney: + mes "[Nicholas]"; + mes "\"Oh dear, it seems you don't have enough money.\""; + close; + +L_YesKnight: + if (Zeny < 10000) + goto L_NoMoney; + if ( (countitem("IronIngot")<3) || (countitem("Coal") < 6) ) + goto L_NoItem; + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + Zeny = Zeny - 10000; + delitem "IronIngot", 3; + delitem "Coal", 6; + getitem "KnightsHelmet", 1; + goto L_Done; + +L_YesCrusade: + if (Zeny < 10000) goto L_NoMoney; + if ( (countitem("IronIngot")<6) || (countitem("Coal") < 12) ) + goto L_NoItem; + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + Zeny = Zeny-10000; + delitem "IronIngot", 6; + delitem "Coal", 12; + getitem "CrusadeHelmet", 1; + goto L_Done; + +L_YesWarlord: + if (Zeny < 10000) goto L_NoMoney; + if ( (countitem("IronIngot")<9) || (countitem("Coal") < 18) ) + goto L_NoItem; + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + Zeny = Zeny-10000; + delitem "IronIngot", 9; + delitem "Coal", 18; + getitem "WarlordHelmet", 1; + goto L_Done; + +L_YesShield: + mes "[Nicholas]"; + mes "Nicholas examines your Iron Ingots."; + mes "\"No, this iron is too brittle; for something as large as a shield I need to mix in softer iron. Can I see if you have anything suitable?\""; + next; + menu + "Sure, have a look!", L_Next, + "No.", L_Pass; + +L_Next: + if (countitem("InfantryHelmet") == 1) + goto L_MoreInfantry; + if (countitem("InfantryHelmet") == 0) + goto L_NoInfantry; + + mes "[Nicholas]"; + mes "Nicholas pulls out two of your Infantry Helmets."; + mes "\"I can use those... yes, that should work. Now all I need is a Leather Patch for the handle, and 20,000 GP.\""; + if (@Q_SHIELD_status < @SHIELD_KNOWS_PATCH) + @Q_SHIELD_status = @SHIELD_KNOWS_PATCH; + callsub L_Update_Var; + next; + menu + "Here you are!", L_Next1, + "Where can I get a Leather Patch?", L_WhereLeather, + "No way.", L_Pass; + +L_Next1: + if (Zeny < 20000) + goto L_ShieldNoZeny; + if (countitem("InfantryHelmet") < 2) + goto L_ShieldNoInfantry; + if (countitem("IronIngot") < 6) + goto L_ShieldNoIngot; + if (countitem("Coal") < 12) + goto L_ShieldNoCoal; + if (countitem("LeatherPatch") < 1) + goto L_ShdNoLeathPatch; + // No inventory check needed, as infantry helms are removed, opening two slots + + mes "[Nicholas]"; + mes "\"Yes, it looks as if you have all that is needed!\""; + mes "You watch Nicholas melt the ingots and helmets and form a shield out of the resulting iron. He then cuts your Leather Patch apart and adds it to the handles."; + mes "\"Here is your shield!\""; + delitem "InfantryHelmet", 1; + delitem "InfantryHelmet", 1; + delitem "LeatherPatch", 1; + delitem "IronIngot", 6; + delitem "Coal", 12; + Zeny = Zeny - 20000; + + if (@Q_SHIELD_status < @SHIELD_COMPLETED) + getexp @SHIELD_XP, 0; + if (@Q_SHIELD_status < @SHIELD_COMPLETED) + mes "[" + @SHIELD_XP + " experience points]"; + set @Q_SHIELD_status, @SHIELD_COMPLETED; // get XP only once + callsub L_Update_Var; + getitem "SteelShield", 1; + close; + +L_ShieldNoZeny: + mes "[Nicholas]"; + mes "\"I am sorry, but I must ask that you pay 20,000 GP; this is quality work.\""; + close; + +L_ShieldNoInfantry: + mes "[Nicholas]"; + mes "\"Now this is strange... I could have sworn that you had two Infantry Helmets right here. Well, come back if you have some more!\""; + close; + +L_ShieldNoIngot: + mes "[Nicholas]"; + mes "\"How odd... didn't I put your Iron Ingots on the table right here? Well, I will need them back to make the shield.\""; + close; + +L_ShieldNoCoal: + mes "[Nicholas]"; + mes "\"How odd... didn't I put your Coal on the table right here? Well, I will need it back to make the shield.\""; + close; + +L_ShdNoLeathPatch: + mes "[Nicholas]"; + mes "\"You don't have a suitable Leather Patch. I'm sorry, but a shield without one would chafe terribly.\""; + close; + +L_MoreInfantry: + mes "[Nicholas]"; + mes "Nicholas takes your Infantry Helmet and examines it."; + mes "\"Yes, this is perfect! If you can bring me another one of those, I can make your shield.\""; + close; + +L_NoInfantry: + mes "[Nicholas]"; + mes "Nicholas shakes his head."; + mes "\"No, none of these items are suitable. Try looking for somewhat large metal items.\""; + close; + +L_WhereLeather: + mes "[Nicholas]"; + mes "\"Hmm. You should look for someone who can work with some kind of leather. Rumor has it that there is someone in the eastern desert who can, but I haven't been there.\""; + close; + +L_SetzerQuest: + mes "[Nicholas]"; + if (@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER) + mes "\"Another one? Sure, why not.\""; + mes "Nicholas examines your Short Sword, then nods."; + mes "\"This is good quality. I can make something special out of it, with three ingot bars of iron, six lumps of coal and 50,000 GP -- but I will also need a potion of monster oil.\""; + if (@Q_SETZER_status < @SETZER_KNOWS_OIL) + @Q_SETZER_status = @SETZER_KNOWS_OIL; + callsub L_Update_Var; + next; + menu + "Here you are.", L_Next2, + "Monster oil? What's that?", L_ExplainMonsterOil, + "HOW much? Nevermind then!", L_Pass; + +L_Next2: + if (Zeny < 50000) + goto L_SetzerNoZeny; + if ( (countitem("IronIngot") < 3) || (countitem("Coal") < 6) ) + goto L_SetzerNoIngot; + if (countitem("MonsterOilPotion") < 1) + goto L_SetzerNoMonsterOil; + if (countitem("ShortSword") < 1) + goto L_SetzerNoSword; + // No inventory check needed, as the short sword is removed, opening a slot + + mes "[Nicholas]"; + mes "Nicholas takes the items, heats up your sword and pounds it with a heavy hammer. As you watch, it turns thinner and flatter. Finally he pours the monster oil over it, heats the metal up again and douses it in water."; + Zeny = Zeny - 50000; + delitem "IronIngot", 3; + delitem "Coal", 6; + delitem "MonsterOilPotion", 1; + delitem "ShortSword", 1; + getitem "Setzer", 1; + if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER)) + mes "[" + @SETZER_XP + " experience points]"; + if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER)) + getexp @SETZER_XP, 1; + @Q_SETZER_status = @Q_SETZER_status | @SETZER_FLAG_MADE_SETZER; + callsub L_Update_Var; + next; + mes "[Nicholas]"; + mes "Nicholas hands you the completed sword. It feels strangely light in your hands."; + mes "\"I made it lighter and faster, it should also cut a little better now. This kind of sword is called a Setzer, after a famous gambler who invented it as a weapon in between a knife and a sword.\""; + next; + mes "[Nicholas]"; + mes "\"I'm quite happy with this one. Be careful around the edge, though, it is quite sharp!\""; + close; + +L_ExplainMonsterOil: + mes "[Nicholas]"; + mes "\"Monster oil is a special oil that can be used to harden thin sheets of metal, if used properly. Unfortunately, it is very hard to get. Perhaps one of our local alchemists can help you with it?\""; + close; + +L_SetzerNoZeny: + mes "[Nicholas]"; + mes "\"I am sorry, but I must ask that you pay 50,000 GP; the kind of weapon I am thinking of is not easy to make.\""; + close; + +L_SetzerNoIngot: + mes "[Nicholas]"; + mes "\"Without 3 ingots of iron, and six lumps of coal, I can't improve your sword.\""; + close; + +L_SetzerNoMonsterOil: + mes "[Nicholas]"; + mes "\"I know that monster oil is hard to come by, but I can't do much without it. Ask an alchemist if you need help making it.\""; + close; + +L_SetzerNoSword: + mes "[Nicholas]"; + mes "\"I will need your old Short Sword as a basis. Please bring it to me first.\""; + close; + +L_End: + close; + +L_Done: + mes "[Nicholas]"; + mes "\"Here you go!\""; + mes ""; + mes "\"Come back any time.\""; + close; + +L_Update_Var: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(@Q_SHIELD_MASK | @Q_SETZER_MASK) | (@Q_SHIELD_status << @Q_SHIELD_SHIFT) | (@Q_SETZER_status << @Q_SETZER_SHIFT)); + return; + +L_TooMany: + mes "[Nicholas]"; + mes "\"You don't have room for it. Come back later when you do.\""; + close; +} diff --git a/npc/009-2/nurse.txt b/npc/009-2/nurse.txt new file mode 100755 index 00000000..0eefac54 --- /dev/null +++ b/npc/009-2/nurse.txt @@ -0,0 +1,538 @@ + + +009-2,147,65,0 script Nurse NPC119,{ + @halloween_npc_id = $@halloween_npc_nurse; + callfunc "TrickOrTreat"; + + @SNAKET_AMOUNT = 5; + @BSCORPIONST_AMOUNT = 10; + // This quest can be done very often: so give less xp + @QUEST1_EXP = 300; + @ACORNS_AMOUNT = 10; + @GREENAPPLE_AMOUNT = 5; + @REDAPPLE_AMOUNT = 5; + @ORANGE_AMOUNT = 5; + @HEALING_AMOUNT = 3; + // This quest can be done very often: so give less xp + @QUEST2_EXP = 700; + @ANTIDOTE_EXP = 10000; + + @Q_poison_MASK = NIBBLE_7_MASK; + @Q_poison_SHIFT = NIBBLE_7_SHIFT; + @Q_poison = (QUEST_Forestbow_state & @Q_poison_MASK) >> @Q_poison_SHIFT; + + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@Q_poison == 7) goto L_state7; + if (@Q_poison == 6) goto L_state6; + if (@Q_poison == 5) goto L_state5; + if (@Q_poison == 4) goto L_state4; + if (@Q_poison == 3) goto L_state3; + if (@Q_poison == 2) goto L_state2; + if (@Q_poison == 1) goto L_state1; + if (getskilllv(SKILL_POOL)) goto L_state0; + goto L_Usual; + +L_Usual: + mes "[Nurse]"; + mes "\"How can I help you?\""; + next; + + if (@inspector == 1) + menu + "Oooh, these wounds! They hurt so much!", L_Heal, + "I don't feel so well, I might be sick.", L_Doctor, + "Have you seen anything out of the ordinary?", L_NohMask, + "No, I'm fine.", L_Next; + menu + "Oooh, these wounds! They hurt so much!", L_Heal, + "I don't feel so well, I might be sick.", L_Doctor, + "No, I'm fine.", L_Next; + +L_Next: + mes "[Nurse]"; + mes "\"Then I would ask you to leave. There are people who really need our help.\""; + goto L_close; + +L_Doctor: + mes "[Nurse]"; + mes "\"Then you should better see the doctor. He is usually in his office on the 3rd floor.\""; + goto L_close; + +L_Heal: + if (BaseLevel > 20) goto L_NoHeal; + mes "[Nurse]"; + mes "\"Here, let me heal you.\""; + next; + heal 10000, 10000; + goto L_close; + +L_NoHeal: + mes "[Nurse]"; + mes "\"I'm sorry but I'm here only to help young people."; + mes "Your level is already higher than 20."; + mes "You can get some rest in the inn near here.\""; + goto L_close; + +L_NohMask: + mes "[Nurse]"; + mes "\"I'm too busy here to observe the town.\""; + goto L_close; + +L_state0: + mes "[Nurse]"; + mes "\"Welcome! You really look like a competent person. Maybe you can help to deal with a problem we have.\""; + next; + mes "\"We recently had some accidents in the mines. It seems that the creatures in the mines became more aggressive.\""; + next; + mes "\"Unfortunately, some of them are poisonous and it is very difficult for us to help the miners.\""; + next; + mes "\"For that reason, I want to do some research on this subject, to create an antidote. But I need help to get some ingredients, someone who is able to deal with the dangerous creatures in the mines.\""; + next; + menu + "I will do what I can. What do you need?", L_firstquest, + "I'm really sorry, but I don't think I can help you.", L_Next1; + +L_Next1: + mes "\"That is disagreeable to hear. Maybe I can find another person to take this task.\""; + next; + goto L_Usual; + +L_firstquest: + @Q_poison = 1; + callsub S_Update_Var; + mes "\"That's great! First, I need some parts of the poisonous creatures.\""; + next; + goto L_ExplainAgain1; + +L_ExplainAgain1: + mes "\"Please bring me five tongues of snakes and ten stingers of black scorpions.\""; + goto L_close; + +L_state1: + mes "[Nurse]"; + mes "\"You are back, wonderful! Did you get what we need for the antidote?\""; + next; + menu + "Actually, I have another question.", L_Usual, + "Sorry, I forgot. What shall I bring you?", L_ExplainAgain1, + "I have what you asked for.", L_Next2, + "I'm still working on that.", L_close; + +L_Next2: + if (countitem("SnakeTongue") < @SNAKET_AMOUNT || countitem("BlackScorpionStinger") < @BSCORPIONST_AMOUNT) + goto L_NotEnough; + delitem "SnakeTongue", @SNAKET_AMOUNT; + delitem "BlackScorpionStinger", @BSCORPIONST_AMOUNT; + getexp @QUEST1_EXP, 0; + @Q_poison = 2; + callsub S_Update_Var; + mes "[Nurse]"; + mes "\"Very good. Now I have to extract the poison from this, it will take some time.\""; + next; + mes "\"But there are some other things we will need in any case. It would be courteous if you could get them meanwhile.\""; + next; + goto L_ExplainAgain2; + +L_ExplainAgain2: + mes "\"Please bring me ten acorns, five red apples, five green apples and also five oranges. And we need some small healing potions. They will be useful to hold off the baneful effects. Three of them will be enough, I guess.\""; + goto L_close; + +L_state2: + mes "You look at the nurse, who seems to be really tired, with shadows under her eyes. When she recognizes you, she smiles."; + mes "[Nurse]"; + mes "\"I managed to extract the poisonous components. We should be able to create an antidote, if you have everything else we need.\""; + next; + menu + "Actually, I have another question.", L_Usual, + "I have a bad memory. Can you tell me again what we need?", L_ExplainAgain2, + "I managed to get everything we need.", L_Next3, + "I will go and get it.", L_close; + +L_Next3: + if (countitem("Acorn") < @ACORNS_AMOUNT + || countitem("GreenApple") < @GREENAPPLE_AMOUNT + || countitem("RedApple") < @REDAPPLE_AMOUNT + || countitem("Orange") < @ORANGE_AMOUNT + || countitem("SmallHealingPotion") < @HEALING_AMOUNT) + goto L_NotEnough; + delitem "Acorn", @ACORNS_AMOUNT; + delitem "GreenApple", @GREENAPPLE_AMOUNT; + delitem "RedApple", @REDAPPLE_AMOUNT; + delitem "Orange", @ORANGE_AMOUNT; + delitem "SmallHealingPotion", @HEALING_AMOUNT; + getexp @QUEST2_EXP, 0; + @Q_poison = 3; + callsub S_Update_Var; + goto L_Chemistry; + +L_Chemistry: + callsub L_Shuffle_Need; + mes "The nurse takes the ingredients you brought and starts to squeeze the fruits and to crush the acorns. Then she put the fruit juices in some complicated looking chemical device."; + next; + mes "After some minutes, it is blubbering and steaming and a liquid is dripping in a pot under the device."; + next; + mes "Then she takes the acorn flour and the liquid and goes to a place back in the room, where she does something you don't see."; + next; + mes "After just a few moments, she comes back with a smiling face, holding two different bottles in her hand."; + next; + mes "[Nurse]"; + mes "\"That was easy compared to the things to be done with the stingers and snake tongues.\""; + next; + mes "Then her facial expression gets more serious."; + next; + mes "\"When we try to find the right mixture for the antidote, we need to test it.\""; + next; + mes "\"For that purpose, I will poison you. Then you drink the antidote to see if it works.\""; + next; + mes "\"If we make a mistake, this might be exhausting and painful, so you should rest a while and prepare yourself.\""; + next; + mes "\"Come back when you feel ready for that task.\""; + goto L_close; + +L_state3: + mes "[Nurse]"; + mes "\"Hello my friend. You feel prepared to test the antidote?\""; + next; + menu + "Actually, I have another question.", L_Usual, + "Yes, let us begin.",L_Exp_Game; + +L_Exp_Game: + mes "[Nurse]"; + mes "\"Listen carefully! I will explain what you need to do.\""; + next; + mes "\"I have here two different distillates. One is the venom extract, the other one is a stabilizer.\""; + next; + mes "\"We also have the healing potion.\""; + next; + mes "\"The problem is that I can only guess the concentration of the venom and the stabilizer. My equipment isn't good enough to determine them precisely.\""; + next; + mes "\"You need to find the right amount of each ingredient. I will tell you what I can know with my analysis methods.\""; + next; + mes "\"Shall we start?\""; + next; + menu + "Please explain it again.", L_Exp_Game, + "Alright.", L_Game; + +L_Game: + callsub S_Update_Var; + // healing, venom, stabilizer + callsub L_Load_Need; + //descriptions + @desc_length = 6; + + setarray @desc$,"very little","only a little", "little","much", "a lot", "very much", "a huge amount"; + + @divisor = @count / @desc_length; + + @hlIndex = (@hlNeed-@offset) /@divisor; + @vnIndex = (@vnNeed-@offset) /@divisor; + @stIndex = (@stNeed-@offset) /@divisor; + + mes "[Nurse]"; + mes "\"I guess you need " + @desc$[@hlIndex] + " of the healing potion.\""; + next; + mes "\"You need " + @desc$[@vnIndex] + " of the venom extracts, I suppose.\""; + next; + mes "\"As far as I can tell you will need " + @desc$[@stIndex] + " of the stabilizer.\""; + next; + + if(@hlNeed/@vnNeed > 1 ) + mes "\"I see that the healing potions are needed at least " + @hlNeed/@vnNeed + " times as much as the venom.\""; + if(@vnNeed/@hlNeed > 1 ) + mes "\"I see that the venom extracts are needed at least " + @vnNeed/@hlNeed + " times as much as the healing potions.\""; + if ( (@hlNeed/@vnNeed > 1 ) || (@vnNeed/@hlNeed > 1 )) + next; + + if(@stNeed/@vnNeed > 1 ) + mes "\"I see that the stabilizer is needed at least " + @stNeed/@vnNeed + " times as much as the venom extracts.\""; + if(@vnNeed/@stNeed > 1 ) + mes "\"I see that the venom extracts are needed at least " + @vnNeed/@stNeed + " times as much as the stabilizer.\""; + if ((@vnNeed/@stNeed > 1 ) || (@stNeed/@vnNeed > 1 )) + next; + + if(@stNeed/@hlNeed > 1 ) + mes "\"I see that the stabilizer is needed at least " + @stNeed/@hlNeed + " times as much as the healing potions.\""; + if(@hlNeed/@stNeed > 1 ) + mes "\"I see that the healing potions are needed at least " + @hlNeed/@stNeed + " times as much as the stabilizer.\""; + if ((@hlNeed/@stNeed > 1 ) || (@stNeed/@hlNeed > 1 )) + next; + goto L_choosePut; + +L_choosePut: + @max = @count+@offset-1; + @min = @offset; + mes "\"My scale goes up to " + @max + ". I suggest to put at least " + @min +" drops on the scale.\""; + next; + + mes "\"How many drops of the healing potion should we use?\""; + input @hlPut; + if (@hlPut < @offset) + goto L_Game_tooless; + if (@hlPut > @max) + goto L_Game_toomuch; + + mes "\"How many drops of the venom extract potion should we use? \""; + input @vnPut; + if (@vnPut < @offset) + goto L_Game_tooless; + if (@vnPut > @max) + goto L_Game_toomuch; + + mes "\"How many drops of the stabilizer potion should we use? \""; + input @stPut; + if (@stPut < @offset) + goto L_Game_tooless; + if (@stPut > @max) + goto L_Game_toomuch; + + mes "The nurse puts the potions together according to your instructions. Then she takes a spoon and stirs it."; + next; + mes "You take the glass and look suspiciously at the liquid, which has changed to an odd colour."; + next; + mes "[Nurse]"; + mes "\"Alright, now I will inject the venom into you, then you should drink the antidote immediately. Are you ready?\""; + next; + mes "You take a deep breath and nod."; + next; + mes "The nurse take a scary looking syringe out of a drawer and swabs your arm with disinfection dabber."; + next; + mes "Then she stings the syringe in your vein and pushs it down. After a few seconds, your heart starts pounding quicker and you begin to sweat all over your body."; + next; + mes "[Nurse]"; + mes "\"Drink the antidote!\""; + next; + mes "You lift the glass to your lips and drink it all at once."; + next; + + @Q_poison = @Q_poison + 1; + + if ( (@hlPut > @hlNeed) && (@vnPut > @vnNeed) ) + goto L_m_hl_m_vn; + if ( (@hlPut > @hlNeed) && (@vnPut <= @vnNeed) ) + goto L_m_hl_l_vn; + if ( (@hlPut <= @hlNeed) && (@vnPut > @vnNeed) ) + goto L_hl_m_vn; + if ( (@hlPut < @hlNeed) && (@vnPut < @vnNeed) ) + goto L_hl_l_vn; + + mes "You feel quite normal."; + mes "[Nurse]"; + mes "\"Oh yes, the concentration of the healing potions and the venom extracts seem to be right.\""; + next; + @hl_vn_ok = 1; + goto L_check_st; + +L_m_hl_m_vn: + //poison for 3 minutes + sc_start SC_POISON, 1, 20; + mes "You begin to feel really dizzy. And you feel so light - you can't help yourself and burst out with laughter. What a strange feeling!"; + next; + mes "The nurse looks at you with a really worried look on her face. As you open your mouth to tell her that you feel alright, the content of your stomach finds its way out through your throat and on the floor."; + next; + mes "The feeling of happiness disappears, but you seem to be still poisoned."; + goto L_check_st; + +L_m_hl_l_vn: + //poison for 1 minute + sc_start SC_POISON, 1, 20; + mes "You feel the pain of the poison weaken. This seems promising. The thought that you might have been successful makes you feel enormously happy."; + next; + mes "But a few seconds later, you wonder what was the reason for your happiness."; + next; + mes "Anyway, what are you doing here? Actually, where are you?"; + next; + mes "You don't care, you feel so great. You start to giggle and laugh uncontrollably. What a wonderful feeling. "; + next; + mes "Suddenly, the world has some really strange colors. As you watch this woman in front of you changing her color from dark green to a light purple, you become really tired."; + next; + mes "You lay down on the floor and fall asleep."; + next; + mes "As you open your eyes again, the nurse shines in your face with a lamp and pulls your eyelids open. Then she nods."; + next; + mes "\"Very well, you are sober again.\""; + next; + goto L_check_st; + +L_hl_m_vn: + // first poison for 10 minutes, player will die anyway + sc_start SC_POISON, 1, 20; + mes "You feel a sting in your stomach and your heart starts pounding loudly."; + next; + mes "The room is getting dark."; + next; + mes "...and darker..."; + next; + mes "......."; + // bye bye player! + heal -Hp, 0; + // close instead of telling how much stabilizer is needed + goto L_close; + // goto L_check_st; + +L_hl_l_vn: + //poison for 1 minute + sc_start SC_POISON, 1, 20; + mes "The antidote seems to have no effect."; + goto L_check_st; + +L_check_st: + if ( (@stPut < @stNeed) ) + goto L_st; + if ( (@stPut > @stNeed) ) + goto L_m_st; + if (@hl_vn_ok == 1) + goto L_AllCorrect; + + mes "[Nurse]"; + mes "\"The amount of the stabilizer seems alright, but we have to think again about the other ingredients.\""; + next; + goto L_NotAllCorrect; + +L_st: + mes "[Nurse]"; + mes "\"It looks like we used not enough of the stabilizer. The antidote will lose its effect after some time.\""; + next; + goto L_NotAllCorrect; + +L_m_st: + mes "[Nurse]"; + mes "\"It looks like we used too much of the stabilizer. The antidote will turn into venom again after some time.\""; + next; + goto L_NotAllCorrect; + +L_AllCorrect: + mes "You feel totally normal again."; + next; + mes "[Nurse]"; + mes "\"Wonderful! You made it! Now I will be able to help all the people who get poisoned in the mines!\""; + next; + mes "\"Thank you so much! Oh, and it seems as if you have gained the skill to resist poison someway. This is great.\""; + next; + mes "\"You should talk to someone who can help you to focus on your skills.\""; + next; + getexp @ANTIDOTE_EXP, 0; + addtoskill SKILL_RESIST_POISON, 1; + @Q_poison = 7; + callsub S_Update_Var; + goto L_close; + +L_NotAllCorrect: + mes "[Nurse]"; + mes "\"It didn't work. You are a really brave person. Now you should rest and recover. I hope you won't give up now. Please come back later, so we can try it again.\""; + next; + goto L_close; + +L_state4: + mes "The nurse has a worried look in her face."; + mes "[Nurse]"; + mes "\"Hello. I hope you recovered well.\""; + next; + mes "\"There is enough of the distillates left to have another try.\""; + next; + mes "\"Oh no, with all that trouble I forgot to label your distillate.\""; + next; + mes "She holds up two ampullas."; + next; + mes "\"I hope this one is yours. I'm sorry.\""; + next; + mes "\"If you feel ok, we could try it again.\""; + next; + menu + "I still feel a bit dizzy, so I don't want to do it now.", L_Usual, + "I'm ok. We can try, but please explain again.", L_Exp_Game, + "Let's start right now.", L_Game; + +L_state5: + mes "The nurse looks at you pitifully."; + mes "[Nurse]"; + mes "\"Hello. I'm really sorry for causing you so much pain.\""; + next; + mes "\"But if we succeed we will be heroes! I will be able to help a lot of people.\""; + next; + mes "\"Next time you might remind me to label the distillates correctly. I am sorry that it is screwed up again.\""; + next; + mes "\"There is enough stuff left for one last try.\""; + next; + mes "\"If we don't get it this time, you will have to get new ingredients.\""; + next; + mes "\"Do you want to try again?\""; + next; + menu + "I still feel a bit dizzy, so I don't want to do it now.", L_Usual, + "I'm ok. We can try, but please explain again.", L_Exp_Game, + "Let's start right now.", L_Game; + +L_state6: + mes "The nurse looks at you pitifully."; + mes "[Nurse]"; + mes "\"There is not enough stuff left for another try.\""; + next; + mes "\"We should try again, right?\""; + @Q_poison = 1; + callsub S_Update_Var; + goto L_ExplainAgain1; + +L_state7: // geschafft + mes "[Nurse]"; + mes "\"Thanks a lot, you can call yourself a true hero now!\""; + next; + mes "\"I am able to help the poisoned miners quite well now.\""; + next; + goto L_Usual; + +L_NotEnough: + mes "[Nurse]"; + mes "\"This must be a misunderstanding. You don't have all the things I asked you for.\""; + if (@Q_poison == 1) + goto L_ExplainAgain1; + if (@Q_poison == 2) + goto L_ExplainAgain2; + // the following close *should* never be reached, but who knows, whoever will mess this script up! + goto L_close; + +L_close: + @inspector = 0; + close; + +S_Update_Var: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(@Q_poison_MASK) | (@Q_poison << @Q_poison_SHIFT)); + return; + +L_Game_init_vars: + @count = 24; + @offset = 1; + return; + +L_Shuffle_Need: + callsub L_Game_init_vars; + @hlNeed = @offset + rand(@count); + @vnNeed = @offset + rand(@count); + @stNeed = @offset + rand(@count); + + set $NPC_NURSE, + ($NPC_NURSE & ~(BYTE_0_MASK | BYTE_1_MASK | BYTE_2_MASK) + | (@hlNeed << BYTE_0_SHIFT) + | (@vnNeed << BYTE_1_SHIFT) + | (@stNeed << BYTE_2_SHIFT)); + return; + +L_Load_Need: + callsub L_Game_init_vars; + @hlNeed = ($NPC_NURSE & BYTE_0_MASK) >> BYTE_0_SHIFT; + @vnNeed = ($NPC_NURSE & BYTE_1_MASK) >> BYTE_1_SHIFT; + @stNeed = ($NPC_NURSE & BYTE_2_MASK) >> BYTE_2_SHIFT; + return; + +L_Game_tooless: + mes "[Nurse]"; + mes "\"That is nothing! You need to put in there at least a small amount."; + goto L_choosePut; + +L_Game_toomuch: + mes "[Nurse]"; + mes "\"This would be way too much for my scale. I don't want to break it.\""; + goto L_choosePut; +} diff --git a/npc/009-2/olana.txt b/npc/009-2/olana.txt new file mode 100755 index 00000000..c6eff147 --- /dev/null +++ b/npc/009-2/olana.txt @@ -0,0 +1,238 @@ + +009-2,63,79,0 script Olana NPC190,{ + @minLevel = 60; + + @Cherry_Amount = 10; + @Cherry_EXP = 1000; + @Cherry_Money = 1000; + + @RedRose_Amount = 15; + @RedTulip_Amount = 15; + @Flower_Money = 1500; + + @Finish_EXP = 5000; + @Finish_Money = 5000; + + if (FLAGS & FLAG_ROSSI_COMPLETED) goto L_FinalEnd; + if (Rossy_Quest == 17 || Rossy_Quest == 18) goto L_End; + + if (Rossy_Quest >= 14 && Rossy_Quest <= 16) goto L_Julia; + if (Rossy_Quest == 13) goto L_Best; + if (Rossy_Quest == 12) goto L_Give; + if (Rossy_Quest == 11) goto L_Allergic; + if (Rossy_Quest == 10) goto L_BringRose; + if (Rossy_Quest == 9) goto L_RC; + if (Rossy_Quest == 8) goto L_Rose; + if (Rossy_Quest >= 6 && Rossy_Quest < 8) goto L_BL; + if (Rossy_Quest == 5) goto L_Bring; + if (Rossy_Quest == 4) goto L_See; + if (Rossy_Quest == 3) goto L_Worried; + if (Rossy_Quest == 1 || Rossy_Quest == 2) goto L_Daughter; + + mes "[Olana]"; + mes "\"Hello. We don't usually get guests back here.\""; + next; + mes "\"My name is Olana and my father owns this inn. I live in Tulimshar, but came to Hurnscald on vacation with my two young daughters, Rossy and Julia.\""; + if (BaseLevel < @minLevel) close; + next; + mes "\"I let my two lovely girls play in the woods nearby but they haven't come back yet!\""; + next; + mes "Olana suddenly looks very pale and starts to shiver."; + next; + mes "\"I'm starting to get a bad feeling about this. If you go to the forest near the swamps, could you see if you can find my daughters? I need to know if they are safe!\""; + menu + "Sure, I can do that.", L_Next, + "I am sorry, I don't usually go to that area.", L_No; + +L_Next: + Rossy_Quest = 1; + close; + +L_Daughter: + mes "Olana looks really worried - she seems about to burst into tears."; + mes "[Olana]"; + mes "\"I would be relieved if you could look for my daughters."; + mes "They must be playing in the forest near the swamps.\""; + if (Rossy_Quest == 1) + close; + next; + menu + "Wait, I saw Rossy, she is fine.", L_Help, + "Hey, don't worry, I'm sure they'll be back soon.", L_No; + +L_No: + close; + +L_Help: + mes "[Olana]"; + mes "\"Oh you did? That's good. I'm relieved. But what about Julia?\""; + next; + menu + "I haven't found Julia yet, sorry.", L_Next1; + +L_Next1: + mes "\"Ok. They must be playing hide and seek. Thanks again... I can't express how grateful I am.\""; + Rossy_Quest = 3; + close; + +L_Worried: + mes "Olana smiles at you, trying to show some happiness, but her facial expression only conveys tension and preoccupation."; + next; + mes "You suddenly remember that Rossy asked for your help to collect some fruits. Maybe she could also have some ideas on how to cheer her mother up."; + close; + +L_See: + if (gotcherry == 1) + goto L_Task; + if (countitem("Cherry") < @Cherry_Amount) + goto L_Worried; + delitem "Cherry", @Cherry_Amount; + menu + "Hi, Rossy asked me to give you this. She says it is a gift from both her and Julia.", L_Next2; + +L_Next2: + mes "[Olana]"; + mes "\"Ohhh... How sweet... Sometimes Rossy impresses me with her kindness. Here... You are spending so much time helping us, and we give nothing back. Take this as a small reward.\""; + getexp @Cherry_EXP, 0; + Zeny = Zeny + @Cherry_Money; + gotcherry = 1; + goto L_Task; + +L_Task: + mes "[Olana]"; + mes "\"I know I barely know you, but can I ask you for a small favor?\""; + menu + "Sure, tell me about it.", L_Cont, + "No, sorry, I'm busy.", L_No; + +L_Cont: + mes "[Olana]"; + mes "\"Would you mind giving this letter to my little Rossy? Today is the last day for her final exam, and I know my daughter. If I don't remind her, she will surely forget about it and flunk the exam. I would deliver the letter myself, but I can't walk, my aching knees...\""; + menu + "Of course I can. Hand me the letter, I'll give it to Rossy as soon as I see her.", L_Let, + "No, sorry, I'm not interested in that sort of task. Hand it to her yourself.", L_No; + +L_Let: + mes "[Olana]"; + Rossy_Quest = 5; + gotcherry = 0; + mes "\"Thank you again. Please, bring it to her as fast as you can.\""; + close; + +L_Bring: + mes "[Olana]"; + mes "\"Please, bring this letter to my daughter as fast as you can.\""; + close; + +L_BL: + mes "[Olana]"; + mes "\"Good, now she won't forget her final exam.\""; + close; + +L_Rose: + menu + "Hi, Rossy did great in the exam. David told me her potion was flawless.", L_Next3; + +L_Next3: + mes "[Olana]"; + mes "\"Wow! Really? That is great! I would like to congratulate my little Rossy. Would you mind helping me a little more?\""; + menu + "Just tell me what to do.", L_Next4, + "No, I'm busy, maybe later.", L_No; + +L_Next4: + mes "[Olana]"; + mes "\"Can you bring me " + @RedRose_Amount + " Red Roses? I would like to give them to Rossy. I am sure she will love them!\""; + menu + "Ok, I will be back with the roses.", L_RG, + "I'm allergic to roses, can't even touch them. Sorry.", L_No; + +L_RG: + if (Rossy_Quest == 8) + Rossy_Quest = 9; + mes "[Olana]"; + mes "\"Please, bring me " + @RedRose_Amount + " Red Roses as soon as you can.\""; + close; + +L_RC: + if(countitem("RedRose") < @RedRose_Amount) + goto L_RG; + mes "[Olana]"; + Rossy_Quest = 10; + mes "\"Great job! Please hand them to my brilliant daughter, Rossy.\""; + close; + +L_BringRose: + mes "[Olana]"; + mes "\"Now please hand them to my brilliant daughter, Rossy.\""; + close; + +L_Allergic: + mes "[Olana]"; + mes "\"Did she like my present?\""; + menu + "Sure she did...", L_No, + "Well, you should have known that your daughter is allergic to roses.", L_Next5; + +L_Next5: + Rossy_Quest = 12; + mes "[Olana]"; + mes "\"Oh, how stupid I am! Here, take some of my money and buy Red Tulips instead, the same amount. Keep the flowers.\""; + Zeny = Zeny + @Flower_Money; + next; + mes "\"Please, tell Rossy I am really sorry. My mind was on Julia when I asked you to bring the red roses, they are her favorite.\""; + menu + "I will give her the tulips when I see her.", L_Next6; + +L_Next6: + mes "[Olana]"; + mes "\"Thank you. And don't forget to tell her that I'm really sorry.\""; + close; + +L_Give: + mes "[Olana]"; + mes "\""+ strcharinfo(0) +", please, get " + @RedTulip_Amount + " Red Tulips and hand them to Rossy. Don't forget to tell her that I'm really sorry.\""; + close; + +L_Best: + mes "[Olana]"; + mes "\"Thank you for your help "+ strcharinfo(0) +"!\""; + close; + +L_Julia: + mes "[Olana]"; + mes "\"Oh no, I can't take this anymore. Something must have happened... Where is Julia? I want to know where she is! Please, find her "+ strcharinfo(0) +"!\""; + close; + +L_End: + mes "[Olana]"; + mes "\"Where is Julia? I want to know where she is! Please, find her "+ strcharinfo(0) +"!\""; + menu + "She'll be back soon, trust me. I saved her from an evil spirit.", L_Found, + "I haven't seen her yet, sorry.", L_No; + +L_Found: + mes "[Olana]"; + if (Rossy_Quest == 17) + Rossy_Quest = 18; + if (Rossy_Quest == 18) + Rossy_Quest = 19; + mes "\"Thank you "+ strcharinfo(0) +", thank you! Here is a reward for you.\""; + getexp @Finish_EXP, 0; + Zeny = Zeny + @Finish_Money; + if (Rossy_Quest == 19) + goto L_Clear; + close; + +L_Clear: + Rossy_Quest = 0; + cavefights = 0; + FLAGS = FLAGS | FLAG_ROSSI_COMPLETED; + close; + +L_FinalEnd: + mes "[Olana]"; + mes "\"Thanks again for your help."; + mes "I hope the girls will come home soon enough for dinner.\""; + close; +} diff --git a/npc/009-2/peter.txt b/npc/009-2/peter.txt new file mode 100755 index 00000000..e73740e5 --- /dev/null +++ b/npc/009-2/peter.txt @@ -0,0 +1,141 @@ +009-2,183,57,0 shop #PeterShop NPC32767,1201:25,522:50,521:500 + +009-2,183,57,0 script Peter NPC157,{ + @peter_chain_mail_coal = 10; + @peter_chain_mail_ingot = 5; + @peter_chain_mail_money = 20000; + + @peter_light_plate_coal = 20; + @peter_light_plate_ingot = 10; + @peter_light_plate_money = 50000; + + @peter_warlord_plate_coal = 30; + @peter_warlord_plate_ingot = 15; + @peter_warlord_plate_money = 100000; + + @peter_warlord_boots_coal = 16; + @peter_warlord_boots_ingot = 8; + @peter_warlord_boots_money = 35000; + + mes "[Peter]"; + mes "\"Hello, I am Peter, apprentice to Nicholas.\""; + next; + mes "\"I can make you some sturdy armor: you must give me Iron Ingots to craft with and some gold pieces for my efforts.\""; + next; + mes "[Peter]"; + mes "\"What would you like me to make?\""; + menu + "Chain Mail ("+@peter_chain_mail_coal+" coal, "+@peter_chain_mail_ingot+" ingots and "+@peter_chain_mail_money+" GP).", L_Peter_Chain_Mail, + "Light Plate ("+@peter_light_plate_coal+" coal, "+@peter_light_plate_ingot+" ingots and "+@peter_light_plate_money+" GP).", L_Peter_Light_Plate, + "Warlord Plate ("+@peter_warlord_plate_coal+" coal, "+@peter_warlord_plate_ingot+" ingots and "+@peter_warlord_plate_money+" GP).", L_Peter_Warlord_Plate, + "Do you know anything else than armor crafting?", L_Peter_New_Skills, + "Do you have anything else for sale?", L_Shop, + "Nevermind.", L_close; + +L_Peter_Chain_Mail: + @peter_crafting_coal = @peter_chain_mail_coal; + @peter_crafting_iron_ingot = @peter_chain_mail_ingot; + @peter_crafting_money = @peter_chain_mail_money; + @peter_crafting_item$ = "ChainmailShirt"; + callsub S_Smithery_Item; + goto L_close; + +L_Peter_Light_Plate: + @peter_crafting_coal = @peter_light_plate_coal; + @peter_crafting_iron_ingot = @peter_light_plate_ingot; + @peter_crafting_money = @peter_light_plate_money; + @peter_crafting_item$ = "LightPlatemail"; + callsub S_Smithery_Item; + goto L_close; + +L_Peter_Warlord_Plate: + @peter_crafting_coal = @peter_warlord_plate_coal; + @peter_crafting_iron_ingot = @peter_warlord_plate_ingot; + @peter_crafting_money = @peter_warlord_plate_money; + @peter_crafting_item$ = "WarlordPlate"; + callsub S_Smithery_Item; + goto L_close; + +L_Peter_New_Skills: + mes "[Peter]"; + mes "\"Actually, Nicholas, my master, taught me new smithery techniques."; + mes "My very first creation are new kind of steel boots. Interested ? That would be "+@peter_warlord_boots_coal+" Coals, "+@peter_warlord_boots_ingot+" Iron Ingots and "+@peter_warlord_boots_money+" GP.\""; + menu + "Sure!", L_Peter_Warlord_Boots, + "No thanks, that sounds too heavy for me.", L_close; + +L_Shop: + close2; + shop "#PeterShop"; + +L_Peter_Warlord_Boots: + @peter_crafting_coal = @peter_warlord_boots_coal; + @peter_crafting_iron_ingot = @peter_warlord_boots_ingot; + @peter_crafting_money = @peter_warlord_boots_money; + @peter_crafting_item$ = "WarlordBoots"; + callsub S_Smithery_Item; + goto L_close; + +S_Smithery_Item: + if (Zeny < @peter_crafting_money) + goto L_Peter_NotEnough_Zeny; + if (countitem("IronIngot") < @peter_crafting_iron_ingot) + goto L_Peter_NotEnough_Ingot; + if (countitem("Coal") < @peter_crafting_coal) + goto L_Peter_NotEnough_Coal; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Peter_TooMany; + Zeny = Zeny - @peter_crafting_money; + delitem "IronIngot", @peter_crafting_iron_ingot; + delitem "Coal", @peter_crafting_coal; + getitem @peter_crafting_item$, 1; + mes "[Peter]"; + mes "\"Here you go!\""; + return; + +L_Peter_NotEnough_Zeny: + mes "[Peter]"; + mes "\"You don't have enough gold.\""; + goto L_close; + +L_Peter_NotEnough_Ingot: + mes "[Peter]"; + mes "\"You don't have enough ingots.\""; + goto L_close; + +L_Peter_NotEnough_Coal: + mes "[Peter]"; + mes "\"You don't have enough Coal.\""; + goto L_close; + +L_Peter_TooMany: + mes "[Peter]"; + mes "\"You have too much stuff. Please get rid of something if you want some armor.\""; + goto L_close; + +L_close: + // Clear all local variables + @peter_chain_mail_coal = 0; + @peter_chain_mail_ingot = 0; + @peter_chain_mail_money = 0; + + @peter_light_plate_coal = 0; + @peter_light_plate_ingot = 0; + @peter_light_plate_money = 0; + + @peter_warlord_plate_coal = 0; + @peter_warlord_plate_ingot = 0; + @peter_warlord_plate_money = 0; + + @peter_warlord_boots_coal = 0; + @peter_warlord_boots_ingot = 0; + @peter_warlord_boots_money = 0; + + @peter_crafting_coal = 0; + @peter_crafting_iron_ingot = 0; + @peter_crafting_money = 0; + @peter_crafting_item$ = ""; + close; + +} diff --git a/npc/009-2/richard.txt b/npc/009-2/richard.txt new file mode 100755 index 00000000..287ddb7c --- /dev/null +++ b/npc/009-2/richard.txt @@ -0,0 +1,6 @@ + +009-2,20,99,0 script Richard NPC161,{ + @npcname$ = "Richard"; + callfunc "Banker"; + close; +} diff --git a/npc/009-2/selim.txt b/npc/009-2/selim.txt new file mode 100755 index 00000000..f7f41b72 --- /dev/null +++ b/npc/009-2/selim.txt @@ -0,0 +1,173 @@ +009-2,32,104,0 script Selim NPC326,{ + goto L_Main; + +L_Main: + mes "[Selim]"; + mes "\"Greetings, fair traveler. With what may I help you?\""; + menu + "Greetings, are you the store merchant?", L_Ask_selim, + "But what are dyes and what purpose do they serve?", L_Ask_dye, + "Can you dye something for me?", L_clothes_choice, + "Can you also remove color from clothing?", L_Ask_bleach, + "About these sorcerer robes...", L_Asksorcererrobe, + "Can you change my appearance?", L_barber, + "Never mind.", L_close; + +L_barber: + callfunc "Barber"; + goto L_Main; + +L_Ask_bleach: + mes "[Selim]"; + mes "\"I'm afraid no."; + mes "For that, you would need to visit Candide in the Tulimshar marketplace.\""; + goto L_Main; + +L_Ask_selim: + mes "[Selim]"; + mes "\"That is an honest mistake you have made."; + mes "However I am not the merchant, but rather a Master Dyer here to serve the good people of this town."; + mes "I dye things, upon request.\""; + menu + "But what are dyes and where can I get them?", L_Ask_dye, + "Can you dye something for me?", L_clothes_choice, + "Can you also remove color from clothing?", L_Ask_bleach, + "Good bye.", L_close; + +L_Ask_dye: + mes "[Selim]"; + mes "\"Dyes are special liquids used to add color to clothing. If you want me to dye something for you you will have to bring me some dye first."; + mes "Those behind me are nearly empty and won't last for your item.\""; + menu + "What do you mean, `bring you dye'?", L_explain_dye, + "Where would I get dye?", L_explain_dye, + "Good bye.", L_close; + +L_clothes_choice: + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + @r = 0; + @j = getarraysize($@DYE_items$); + goto L_CloneArray; // clone the array from DyeConfig + +L_CloneArray: + @items$[@r] = $@DYE_items$[@r]; + @item_names$[@r] = $@DYE_item_names$[@r]; + @r = @r + 1; + if(@r < @j) goto L_CloneArray; + @r = 0; + @j = 0; + goto L_clothes_choice2; + +L_clothes_choice2: + mes "[Selim]"; + mes "\"What can I dye for you today?\""; + next; + callfunc "DynamicItemMenu$"; + @default_choice$ = ""; + @item_del$ = @item$; + @name$ = @item_names$[@index]; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + if(@item$ == "") goto L_close; + goto L_picked_item; + + +L_Asksorcererrobe: + mes "[Selim]"; + mes "\"Yes?\""; + next; + menu + "Do you think you can dye that line to a different color?", L_Next1; + +L_Next1: + mes "[Selim]"; + mes "\"Hum, I fear I can't do that. The area is too small and I can operate only on large ones."; + mes "But with the appropriate materials, maybe a talented tailor can make the change.\""; + next; + menu + "Oh, I see!", L_Next; + +L_Next: + mes "[Selim]"; + mes "\"Of course I can help you by dyeing the materials your tailor will want."; + mes "All I need is a piece of Cotton Cloth.\""; + @item_del$ = "CottonCloth"; + @name$ = "Cotton Cloth"; + menu + "Sure. Here is one.", L_picked_item, + "I have to go pick that.", L_close; + +L_picked_item: + if (countitem(@item_del$) == 0) goto L_havenone; + goto L_colour; + +L_colour: + mes "[Selim]"; + mes "\"Excellent. Now, what color do you want?\""; + next; + @r = 0; + @j = getarraysize($@DYE_colors$); + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + callsub S_CloneColors; + @default_choice$ = "I have no dye."; + callfunc "DynamicItemMenu$"; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + @default_choice$ = ""; + if (@item$ == "") goto L_No_dye; + @colour = @index; + goto L_Finish; + +S_CloneColors: + @items$[@r] = $@DYE_colors$[@r] + "Dye"; + @item_names$[@r] = $@DYE_color_names$[@r]; + @r = @r + 1; + if(@r < @j) goto S_CloneColors; + @r = 0; + @j = 0; + return; + +L_No_dye: + mes "[Selim]"; + mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some dye first."; + mes "Those behind me are nearly empty and won't last for your item.\""; + next; + menu + "I wanted to dye a different item anyway.", L_clothes_choice, + "What do you mean, `bring you dye'?", L_explain_dye, + "Where would I get dye?", L_explain_dye, + "Never mind.", L_close; + +L_explain_dye: + if (QUEST_clothdyer_knowsdye < 1) + QUEST_clothdyer_knowsdye = 1; + mes "[Selim]"; + mes "\"Well, dye is very expensive, and since I don't charge adventurers anything, I can't give you any for free."; + mes "But most alchemists can make dye; perhaps you can find one around here.\""; + goto L_close; + +L_Finish: + if(getitemlink($@DYE_colors$[@colour] + @item_del$) == "Unknown Item") mapexit; + if(countitem(@item_del$) < 1) goto L_havenone; + delitem @item$, 1; + delitem @item_del$, 1; + getitem $@DYE_colors$[@colour] + @item_del$, 1; + mes "[Selim]"; + mes "\"Here's your " + $@DYE_color_names$[@colour] + " " + @name$ + "! Please let dry for a minute.\""; + goto L_close; + +L_havenone: + mes "[Selim]"; + mes "\"You don't have any uncolored " + @name$ + "? That's unfortunate."; + mes "Would you like to dye something else?\""; + next; + goto L_clothes_choice; + +L_close: + mes "\"Farewell and good luck in your journeys!\""; + close2; + emotion EMOTE_WINK, strcharinfo(0); + end; +} diff --git a/npc/009-2/shops.txt b/npc/009-2/shops.txt new file mode 100755 index 00000000..a50d2d7a --- /dev/null +++ b/npc/009-2/shops.txt @@ -0,0 +1,14 @@ +009-2,65,49,0 shop Barkeeper NPC112,539:87,513:15,676:100 + +009-2,50,48,0 script Receptionist#inn NPC108,{ + @npcname$ = "Receptionist"; + @Cost = 100; + callfunc "Inn"; + end; +} + +009-2,97,24,0 shop Apprentice NPC120,904:0,1199:2,529:2,1200:500,530:4000 + +009-2,123,22,0 shop Potions#_M NPC400,501:25,502:35,567:250,568:250,750:200 + +009-2,32,99,0 shop General Store#hurnscald NPC112,527:150,541:100,1202:5,586:500,528:500,656:100,724:500,741:500 diff --git a/npc/009-2/trader.txt b/npc/009-2/trader.txt new file mode 100755 index 00000000..83ed8d37 --- /dev/null +++ b/npc/009-2/trader.txt @@ -0,0 +1,150 @@ + +009-2,29,98,0 script Trader NPC115,{ + @ironprice = 1000; + @Sulphurprice = 1200; + @Potionprice = 500; + if (BaseLevel >= 25) goto L_Trade; + + mes "[Trader]"; + mes "\"Hello. I came here to trade wares with the people of Hurnscald. Unfortunately for you, I've traded everything I had.\""; + next; + menu + "Oh. I'll go then.", L_close, + "You don't have anything?", L_More; + +L_More: + mes "[Trader]"; + mes "\"No. I have nothing for you. Except...\""; + next; + menu + "Yes?", L_Except, + "Ok then.", L_close; + +L_Except: + mes "[Trader]"; + mes "\"I could teach you how to trade. It'll cost you 2GP.\""; + next; + menu + "Sure.", L_Teach, + "No thank you.", L_close; + +L_Teach: + if (Zeny < 2) goto L_NotEnoughMoney; + Zeny = Zeny - 2; + mes "[Trader]"; + mes "\"You can initiate trade with someone by right-clicking on them and choosing trade."; + mes "You'll both add the items and set the GP you're putting up then press propose trade."; + mes "After both parties have proposed their side, you can both review the trade, and then accept or reject by closing the window.\""; + next; + mes "[Trader]"; + mes "\"Items added to the trade cannot be removed, and so mistakes have to be dealt with by canceling the trade."; + mes "You need to press the change button to let the other person know about GP changes.\""; + next; + goto L_Later; + +L_Later: + mes "[Trader]"; + mes "\"Please feel free to check back later. I'm expecting a large shipment of goods to trade.\""; + goto L_close; + +L_Trade: + mes "[Trader]"; + mes "\"Welcome back! My shipment came in and I have a bunch of things that I can trade now. What would you like?\""; + goto L_Trademenu; + +L_Trademenu: + menu + "Do you have Iron Powder?", L_Iron, + "How about Sulphur Powder?", L_Sulphur, + "I need Medium Healing Potions.", L_Healpots, + "I think I have everything I need, thanks.", L_close; + +L_Iron: + mes "[Trader]"; + mes "\"I do have a few of those. I will give you 4 Iron Powders for 1 Iron Ore and " + @ironprice + "gp.\""; + menu + "Sure.", L_Ipowder, + "What a ripoff! No way!", L_close; + +L_Sulphur: + mes "[Trader]"; + mes "\"I can trade you 5 Sulphur Powders for 1 Pile of Ash and " + @Sulphurprice + "gp.\""; + menu + "Here you go.", L_Spowder, + "Are you nuts?! Forget it!", L_close; + +L_Healpots: + mes "[Trader]"; + mes "\"Healing potions are always useful, but I rarely need anything larger than the small ones. I will happily trade you 1 Medium Healing Potion for 3 Small Healing Potions and " + @Potionprice + "gp.\""; + menu + "Alright.", L_Pots, + "Whoa, that's way too much.", L_close; + +L_Ipowder: + if (countitem("IronOre") < 1) goto L_Missing; + if (Zeny < @ironprice) goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("IronOre") > 1 && countitem("IronPowder") < 1) goto L_Full; + delitem "IronOre", 1; + Zeny = Zeny - @ironprice; + getitem "IronPowder", 4; + mes "[Trader]"; + mes "\"There you go. Would you like to trade anything else?\""; + menu + "Yes.", L_Trademenu, + "No.", L_No; + +L_Spowder: + if (countitem("PileOfAsh") < 1) goto L_Missing; + if (Zeny < @Sulphurprice) goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("PileOfAsh") > 1 && countitem("SulphurPowder") < 1) goto L_Full; + delitem "PileOfAsh", 1; + Zeny = Zeny - @Sulphurprice; + getitem "SulphurPowder", 5; + mes "[Trader]"; + mes "\"There you go. Would you like to trade anything else?\""; + menu + "Yes.", L_Trademenu, + "No.", L_No; + +L_Pots: + if (countitem("SmallHealingPotion") < 3) goto L_Missing; + if (Zeny < @Potionprice) goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SmallHealingPotion") > 3 && countitem("MediumHealingPotion") < 1) goto L_Full; + delitem "SmallHealingPotion", 3; + Zeny = Zeny - @Potionprice; + getitem "MediumHealingPotion", 1; + mes "[Trader]"; + mes "\"There you go. Would you like to trade anything else?\""; + menu + "Yes.", L_Trademenu, + "No.", L_No; + +L_Full: + mes "[Trader]"; + mes "\"You must have been making a lot of trades...your bag is completely full! Come back after you've made some room.\""; + goto L_close; + +L_Missing: + mes "[Trader]"; + mes "\"It looks like you're missing some items. Please come back when you have enough to trade.\""; + goto L_close; + +L_NotEnoughMoney: + mes "[Trader]"; + mes "\"You don't have enough money.\""; + goto L_close; + +L_No: + mes "[Trader]"; + mes "\"Have a great day!\""; + goto L_close; + +L_close: + @ironprice = 0; + @Sulphurprice = 0; + @Potionprice = 0; + close; +} diff --git a/npc/009-2/waitress.txt b/npc/009-2/waitress.txt new file mode 100755 index 00000000..6c7ceb5b --- /dev/null +++ b/npc/009-2/waitress.txt @@ -0,0 +1,71 @@ + +009-2,60,52,0 script Melinda NPC140,{ + mes "[Melinda]"; + mes "\"Hi, sweetie! Want a fresh beer for 170 GP?\""; + next; + + menu + "\"Sure! [don't tip]\"", L_NoTip, + "Sure! [tip 5 GP]", L_5Tip, + "Sure! [tip 10 GP]", L_10Tip, + "Nah, maybe later.", L_No; + +L_NoTip: + if (Zeny < 170) + goto L_NoMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("Beer") == 0) + goto L_TooMany; + Zeny = Zeny - 170; + getitem "Beer", 1; + mes "[Melinda]"; + mes "Pff... nickel nurser!"; + close; + +L_5Tip: + if (Zeny < 175) + goto L_NoMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("Beer") == 0) + goto L_TooMany; + Zeny = Zeny - 175; + getitem "Beer", 1; + mes "[Melinda]"; + mes "\"Here you go, sweetheart!\""; + close; + +L_10Tip: + if (Zeny < 180) + goto L_NoMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("Beer") == 0) + goto L_TooMany; + Zeny = Zeny - 180; + getitem "Beer", 1; + mes "[Melinda]"; + mes "\"Thank you, sweetie! Want to hear a secret?\""; + next; + menu + "What is it, darling?", L_Next, + "Nah, I don't feel like chatting.", L_No; + +L_Next: + mes "[Melinda]"; + mes "\"The master bowyer in this village used to construct exceptional bows. When you want one you should go and ask him.\""; + close; + +L_No: + mes "[Melinda]"; + mes "\"Just call me when you've changed your mind.\""; + close; + +L_NoMoney: + mes "[Melinda]"; + mes "\"You look broke. Don't think that you can dine and dash here!\""; + close; + +L_TooMany: + mes "[Melinda]"; + mes "\"You don't have room for a beer!\""; + close; +} diff --git a/npc/009-2/wyara.txt b/npc/009-2/wyara.txt new file mode 100755 index 00000000..2cd2e278 --- /dev/null +++ b/npc/009-2/wyara.txt @@ -0,0 +1,553 @@ +009-2,121,26,0 script Wyara#_M NPC103,{ + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC_NATURE; + @SUP_name$ = "Nature Magic"; + + @STATUS_INITIAL = 0; + @STATUS_PURIFY_EXPLAINED = 1; + @STATUS_PURIFY_ONCE = 2; + @STATUS_PURIFY_TWICE = 3; + @STATUS_PURIFY_OVER = 4; + @STATUS_MAX = @STATUS_PURIFY_OVER; + + // This operation works around an earlier possible corruption of this state + if (@Q_status > @STATUS_MAX) + @Q_status = @STATUS_INITIAL; + if ((@Q_status == @STATUS_PURIFY_OVER) && (getskilllv(SKILL_MAGIC_NATURE) < 2)) + @Q_status = @STATUS_INITIAL; + callsub S_Update_Var; + + @has_magic = getskilllv(SKILL_MAGIC); + + if (@Q_status == @STATUS_PURIFY_ONCE) goto L_M_purify_once; + if (@Q_status == @STATUS_PURIFY_TWICE) goto L_M_purify_done; + + mes "[Wyara the witch]"; + mes "\"Greetings, fair traveller! What can I do for you?\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_WYARA; + goto L_Main; + +L_Main: + if (!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED)) + menu + "What do you know about...", L_Question, + "Can you help me use the mana seed?", L_Q_manaseed_unabsorbed, + "Can you help me learn magic?", L_Magic, + "I would like to buy potions.", L_Shop, + "Can you reset my stats?", L_StatReset, + "Bye!", L_close; + if (!(!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED))) + menu + "What do you know about...", L_Question, + "Can you help me learn magic?", L_Magic, + "I would like to buy potions.", L_Shop, + "Can you reset my stats?", L_StatReset, + "Bye!", L_close; + goto L_Shop; + +L_Shop: + mes "[Wyara the Witch]"; + mes "\"Please have a look at the shelf behind me.\""; + close; + +L_StatReset: + @npcname$ = "Wyara"; + callfunc "StatReset"; + goto L_close; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_WYARA; + callfunc "MagicTalkMenu"; + + if (@c == 0) goto L_Main; + if (@c == @QQ_ELANORE) goto L_Q_elanore; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + if (@c == @QQ_IMP) goto L_Q_imp; + if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard; + if (@c == @QQ_ASTRALSOUL) goto L_Q_astralsoul; + + mes "[Wyara the Witch]"; + mes "\"I fear that I can't help you with that.\""; + next; + goto L_Main; + + +L_Q_astralsoul: + mes "[Wyara the Witch]"; + mes "\"The astral soul skill? Yes, I have heard about that. It can be taught by old and wise mages usually.\""; + next; + mes "\"You need lots of practise until you can handle the ability, and even more practise until you have the powers to teach it to someone else.\""; + next; + goto L_Main; + +L_Q_old_wizard: + mes "[Wyara the Witch]"; + mes "\"I don't know his name, but I do know that he has been living in the mountains since I first came here. He is a master of many schools of magic, I believe.\""; + next; + mes "[Wyara the Witch]"; + mes "She smiles."; + mes "\"He is also a nice and friendly person to talk to, and quite knowledgeable about the teas of this area.\""; + next; + goto L_Main; + +L_Q_elanore: + mes "[Wyara the Witch]"; + mes "\"Elanore is the Tulimshar healer. She is a very kind person and an outstanding healer.\""; + next; + goto L_Main; + +L_Q_manaseed: + if (!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED)) + goto L_Q_manaseed_unabsorbed; + mes "[Wyara the Witch]"; + mes "\"A mana seed? I'm afraid that I can't help you with that.\""; + next; + goto L_Main; + +L_Q_manaseed_unabsorbed: + mes "[Wyara the Witch]"; + mes "\"So you touched the mana seed but weren't able to absorb its powers? That means that you're lacking a natural magical ability. Still, there are ways around that.\""; + next; + mes "[Wyara the Witch]"; + mes "\"If you drink a mana potion, you should be able to retain this magical power and slowly build up a magical skill.\""; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_MANAPOTION; + next; + goto L_Main; + +L_Q_manapotion: + mes "[Wyara the Witch]"; + mes "\"I have a simple recipe for making mana potions, but I don't have one ready right now. Can you bring me 40 mauve leaves and a bottle of water? I can make one from those quite easily.\""; + next; + menu + "Sure!", L_make_manapotion, + "No.", L_Main; + +L_manapotion_toomany: + mes "[Wyara the Witch]"; + mes "\"Hmm... looking at you, I don't think that you would be able to carry it.\""; + next; + goto L_Main; + +L_make_manapotion: + if(countitem("MauveHerb") < 40) + goto L_make_manapotion_lack; + if(countitem("BottleOfWater") < 1) + goto L_make_manapotion_lack; + getinventorylist; + if ((@inventorylist_count == 100) + && (countitem("MauveHerb") > 40) + && (countitem("BottleOfWater") > 100) + && (countitem("ManaPotion") < 1)) + goto L_manapotion_toomany; + + delitem "MauveHerb", 40; + delitem "BottleOfWater", 1; + getitem "ManaPotion", 1; + + mes "[Wyara the Witch]"; + mes "Wyara takes your mauve leaves, grinds them, and pours some of the resultant paste into her cauldron. She then takes your bottle and sticks it into her brew, head-first."; + next; + mes "[Wyara the Witch]"; + mes "The water in the bottle takes on a strange golden hue, but doesn't flow out."; + mes "After a while, she retrieves the bottle and pours some of the liquid into a smaller clay bottle. She proceeds to mix in the rest of the paste, then plugs the bottle and shakes it."; + next; + mes "[Wyara the Witch]"; + mes "\"I shall keep the rest of your water and the bottle as a payment, if you don't mind. But here is the potion; let it rest for a minute before you use it for maximum effect.\""; + next; + goto L_Main; + +L_make_manapotion_lack: + mes "[Wyara the Witch]"; + mes "\"No, we need forty mauve leaves and a bottle of water.\""; + next; + goto L_Main; + +L_Q_imp: + mes "[Wyara the Witch]"; + mes "\"Sagatha told me that she imprisoned an evil earth spirit in a dried-up well. She wants it to stay there until it has mended its ways, or forever, if it doesn't.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[Wyara the Witch]"; + mes "Wyara smiles."; + mes "\"You have met Sagatha? She's a wonderful person, isn't she? Well, she does hold back a little towards humans, but deep down she feels for them, too.\""; + next; + mes "[Wyara the Witch]"; + mes "\"She does hold all plants and animals very dear, though. Well, the peaceful ones more than the aggressive ones, I suppose, and scorpions not very much at all.\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Wyara the Witch]"; + mes "\"Auldsbel... the guild wizard? I don't know him very well; as far as I know, he is only visiting.\""; + next; + goto L_Main; + +L_M_no: + mes "[Wyara the Witch]"; + mes "\"I am sorry, but you don't seem to be able to control any magic. That means that I really can't help you with that.\""; + next; + goto L_Main; + +L_Magic: + if (!@has_magic) + goto L_M_no; + mes "[Wyara the Witch]"; + mes "\"Perhaps I can help you a little, but I am not a master of any school of magic.\""; + next; + goto L_M_main; + +L_M_main: + menu + "Can you explain magic to me?", L_M_explain, + "Can you teach me a spell?", L_M_spell, + "Can you train me?", L_M_train, + "Never mind.", L_Main; + +L_M_explain: + mes "[Wyara the Witch]"; + mes "\"Magic is just a name for the force that lives in all plants and animals and emanates from there into all things, living or dead.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Some things it finds easier to pass through – natural things, living things – but dead things, such as rock or metal, can slow it down.\""; + next; + mes "[Wyara the Witch]"; + mes "\"There are different kinds of magic, too; nature, astral, and so on, but if this interests you, you should talk to a scholar.\""; + next; + goto L_M_main; + +L_M_spell: + if (getskilllv(SKILL_MAGIC_NATURE) > 1) + goto L_M_spell3; + if (getskilllv(SKILL_MAGIC) > 1) + goto L_M_spell2; + mes "[Wyara the Witch]"; + mes "\"No... I don't think that you are ready yet. But please ask me again when you have some more control over your magical powers.\""; + next; + goto L_M_main; + +L_M_spell3: + mes "[Wyara the Witch]"; + mes "\"Now that you know the basics of nature magic, here is one of my favourites: '" + get(.invocation$, "rain") + "' will summon rain, whereever you are standing. It will consume a bottle of water, though.\""; + if (getskilllv(SKILL_MAGIC) < 2) + mes "\"You are not powerful enough to use it yet, though; you will first have to absorb more magic from the mana seed.\""; + next; + goto L_M_spell2; + +L_M_spell2: + mes "[Wyara the Witch]"; + mes "\"Here is another useful one: '" + get(.invocation$, "detect-players") + "'. It will tell you the names of everyone nearby, but beware that there are ways to protect against it.\""; + if (getskilllv(SKILL_MAGIC) < 2) + mes "\"Hmm. You aren't powerful enough for this one either yet, I think.\""; + next; + if (!(getpartnerid())) + goto L_M_main; + mes "[Wyara the Witch]"; + mes "\"Married partners can find each other even more easily. Use the '" + get(.invocation$, "sense-spouse") + "' spell instead.\""; + next; + goto L_M_main; + +L_M_train: + if (getskilllv(SKILL_MAGIC_NATURE) > 1) + goto L_M_train_no; + mes "[Wyara the Witch]"; + if (@Q_status >= @STATUS_PURIFY_EXPLAINED) + goto L_M_train_wb; + mes "\"Train you? No... you should talk to Sagatha.\""; + mes "She hesitates."; + next; + callfunc "SagathaStatus"; + if (@evil) goto L_M_train_evil; + mes "[Wyara the Witch]"; + mes "\"It would be difficult to ask her to accept you unless you understand some of the basics already.\""; + next; + goto L_M_train_dispatch; + +L_M_train_evil: + mes "Wyara looks at you sadly."; + mes "\"I have heard that you have done something unforgiveable. No witch in this land will teach you now.\""; + next; + goto L_M_main; + +L_M_train_wb: + callfunc "SagathaStatus"; + if (@evil) + goto L_M_train_evil; + mes "\"Ah, yes, your training...\""; + next; + goto L_M_train_dispatch; + +L_M_train_dispatch: + if (@Q_status == @STATUS_PURIFY_TWICE) + goto L_M_purify_done; + if (@Q_status == @STATUS_PURIFY_ONCE) + goto L_M_purify_once; + if (@Q_status == @STATUS_PURIFY_EXPLAINED) + goto L_M_purify_explained; + + mes "[Wyara the Witch]"; + mes "\"Well, let me help you get started, then! But first, to make sure that you are serious, I have a small task for you.\""; + next; + mes "[Wyara the Witch]"; + mes "\"There is a pond west of Hurnscald, a very small one, almost square in shape, with a rock on its southern ledge leading to its center. This pond is close to dying.\""; + next; + mes "[Wyara the Witch]"; + mes "\"I want to save it; for that, someone will have to pour a purification potion into it.\""; + next; + @Q_status = @STATUS_PURIFY_EXPLAINED; + callsub S_Update_Var; + goto L_M_purify_explained; + +L_M_purify_explained: + if (countitem("PurificationPotion")) + goto L_M_purify_doit; + + mes "[Wyara the Witch]"; + mes "\"To make the purification potion, I will need twenty maggot slimes and twenty leaves of mauve.\""; + next; + menu + "I shall get them later.", L_M_main, + "Booring.", L_M_main, + "Here they are.", L_Next; + +L_Next: + getinventorylist; + if ((@inventorylist_count == 100) && (countitem("MauveHerb") > 20) && (countitem("MaggotSlime") > 20)) + goto L_M_purify_nospace; + if (countitem("MauveHerb") < 20) + goto L_M_purify_lacking; + if (countitem("MaggotSlime") < 20) + goto L_M_purify_lacking; + delitem "MauveHerb", 20; + delitem "MaggotSlime", 20; + getitem "PurificationPotion", 1; + mes "[Wyara the Witch]"; + mes "Wyara grinds the leaves and mixes them with the slime, boils them, then speaks a brief incantation over them and hands you the result."; + next; + goto L_M_purify_doit; + +L_M_purify_doit: + mes "[Wyara the Witch]"; + mes "\"Take your purification potion to the pond, right next to its center, and pour the potion in.\""; + close; + +L_M_purify_nospace: + mes "[Wyara the Witch]"; + mes "\"You don't have enough space to carry the potion. Please come back later.\""; + next; + goto L_M_main; + +L_M_purify_lacking: + mes "[Wyara the Witch]"; + mes "\"You'll need twenty mauve leaves and twenty maggot slimes for the potion.\""; + next; + goto L_M_main; + +L_M_purify_once: + mes "[Wyara the Witch]"; + mes "Wyara nods."; + mes "\"You have purified the pond a little, but not enough, I think. We'll need another potion.\""; + next; + if (countitem("PurificationPotion")) + goto L_M_purify_doit2; + mes "[Wyara the Witch]"; + mes "\"I'll need twenty more maggot slimes and leaves of mauve.\""; + next; + menu + "I'll do that later.", L_Main, + "No way.", L_Main, + "Here you are.", L_Next1; + +L_Next1: + getinventorylist; + if ((@inventorylist_count == 100) && (countitem("MauveHerb") > 20) && (countitem("MaggotSlime") > 20)) + goto L_M_purify_nospace; + if (countitem("MauveHerb") < 20) + goto L_M_purify_lacking; + if (countitem("MaggotSlime") < 20) + goto L_M_purify_lacking; + delitem "MauveHerb", 20; + delitem "MaggotSlime", 20; + getitem "PurificationPotion", 1; + mes "[Wyara the Witch]"; + mes "Wyara brews another purification potion."; + next; + goto L_M_purify_doit2; + +L_M_purify_doit2: + mes "[Wyara the Witch]"; + mes "\"Please apply this one quickly, again.\""; + close; + +L_M_purify_done: + mes "[Wyara the Witch]"; + mes "Wyara smiles at you."; + mes "\"A friend told me... you have saved the pond for now. Perhaps it will need some more attention later, but I'll ask others for this.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Please sit down and touch the ground.\""; + next; + menu + "Very well.", L_Next2, + "No way!", L_M_purify_abort; + +L_Next2: + mes "[Wyara the Witch]"; + mes "You sit down and touch the ground, and so does Wyara."; + next; + mes "[Wyara the Witch]"; + mes "You sense the earth, through the floor boards, and begin to feel one with it, as if you were a plant or rock."; + next; + mes "[Wyara the Witch]"; + mes "The gentle breeze coming in through the window begins to take on a very different quality, as if it were the gentle caress of a mother soothing her child."; + next; + mes "[Wyara the Witch]"; + mes "You can sense the water within the ground, and from it you sense your sisters and brothers, plants, animals, people..."; + next; + mes "[Wyara the Witch]"; + mes "Slowly, the sensation recedes, but you feel changed."; + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + @Q_status = @STATUS_PURIFY_OVER; + callsub S_Update_Var; + close; + +L_M_purify_abort: + mes "[Wyara the Witch]"; + mes "\"I can't help you if you don't subject yourself to the ritual.\""; + close; + +L_M_train_no: + mes "[Wyara the Witch]"; + mes "\"I can't teach you anything at this time. Perhaps Sagatha can help you, but I'm not sure if she will accept you as a student.\""; + next; + goto L_M_train_sagatha; + +L_M_train_sagatha: + menu + "OK.", L_M_main, + "How can I convince her to accept me?", L_Next3; + +L_Next3: + callfunc "SagathaStatus"; + mes "[Wyara the Witch]"; + if (@evil) + goto L_M_train_s_fail; + if (getskilllv(SKILL_MAGIC) < 2) + goto L_M_train_s_lvl1; + if (@good > 1) + mes "\"Come to think of it, I have heard good things about you. Perhaps she will be willing to accept you as a student now?\""; + if (@good == 1) + mes "\"I have heard some good things about you, but I'm not sure if it will be enough to sway her – she is hesitant to accept students.\""; + if (@good == 0) + mes "\"Sagatha cares greatly about all living creatures, but particularly about the creatures of the forest. If you are kind to them, she will be more likely to be kind to you.\""; + next; + if (@druid == 3) + goto L_M_main; + mes "[Wyara the Witch]"; + mes "She smiles."; + mes "\"Actually, I think I know of a good thing you could do. There is a very special tree in the desert south-east of Tulimshar, a tree that has been there for a very long time.\""; + next; + mes "[Wyara the Witch]"; + mes "\"The tree is slowly dying – and has been for a long time – but it is there because of a wonderful thing that happened long ago. Tend to it, and I am sure that she will learn about this.\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_DRUIDTREE; + menu + "What is that tree?", L_M_train_t_backgd, + "How should I tend to it?", L_Next4, + "Nah.", L_M_main; + +L_Next4: + mes "[Wyara the Witch]"; + mes "\"The tree has been there alone and unattended for a long time; what he needs most is water and affection. Give him both.\""; + next; + mes "[Wyara the Witch]"; + mes "She hesitates for a moment."; + mes "\"But stay away from the well in the area. There is no water in there anymore, and it's also dangerous.\""; + next; + goto L_M_main; + +L_M_train_t_backgd: + mes "[Wyara the Witch]"; + mes "\"Many generations ago, there was a lush, green oasis in the desert south-east of Tulimshar. Plants of all kinds grew there, and many animals, including mouboos, made this place their home.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Then there came war, and some people pleaded to the demon Grenxen. He founded Tulimshar, and to provide it with water he changed the underground waterflow. The oasis began to dry out quickly.\""; + next; + mes "[Wyara the Witch]"; + mes "\"But the oasis, like many such places back in the old days, had a druid watching over it. The druid refused to accept what Grenxen had done, but he was powerless to revert or change it.\""; + next; + mes "[Wyara the Witch]"; + mes "\"All he could do was to delay the inevitable, to give the animals and nomads some time to adapt.\""; + next; + mes "[Wyara the Witch]"; + mes "\"But to do so, he had to reach the water streams deep underground. Thus, he turned himself into a tree, a deep-rooted fyrad, so that his roots could reach underground.\""; + next; + mes "[Wyara the Witch]"; + mes "\"He had to exert himself tremendously; he had to grow deep, quickly; I believe that no druid or witch has summoned such magic before or since. But he succeeded, and for a while he saved the oasis.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Many generations he remained the only one ever to have successfully defied Grenxen, but this came at a price: he had to remain a tree, and he never turned back.\""; + next; + mes "[Wyara the Witch]"; + mes "\"I believe that he has not forgotten his old magic, because even though a tree remembers many things for a very long time, trees are not keen to change things, not even themselves.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Now he stands alone in the desert, dried-up and forgotten, with no-one remembering him.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Please give him water, for he is always in need of it, and thank him for his sacrifice. It is all we can do for him now.\""; + next; + goto L_M_t_menu; + +L_M_t_menu: + menu + "How should I give him water?", L_M_t_water, + "How should I thank him?", L_M_t_remind, + "I will.", L_M_main, + "No.", L_M_main; + +L_M_t_water: + mes "[Wyara the Witch]"; + mes "\"A bottle of water would probably not be enough. No, you would have to water the ground all around... that's too many bottles. You will have to get water from elsewhere.\""; + next; + goto L_M_t_menu; + +L_M_t_remind: + mes "[Wyara the Witch]"; + mes "\"Give him a sign of affection. Something that works with a tree, but also something that humans might do to each other, to remind him of his days as a human.\""; + next; + mes "[Wyara the Witch]"; + mes "\"Yes... that would be important. Show your affection in the same way that you might towards a human.\""; + next; + goto L_M_t_menu; + +L_M_train_s_fail: + mes "She shakes her head."; + mes "\"No... from what I have heard, you have done something unforgivable. I very much doubt that you can be her student now, and I won't teach you any further either.\""; + next; + goto L_M_main; + +L_M_train_s_lvl1: + mes "\"Well, you're still a bit of a beginner, so I don't think she will accept you yet. Maybe you can absorb some more power from the mana seed? If you can grow your magical powers a little, I might be able to help you.\""; + next; + goto L_M_main; + +L_close: + close; + +S_Update_Var: + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/009-2/yalina.txt b/npc/009-2/yalina.txt new file mode 100755 index 00000000..1f8a889c --- /dev/null +++ b/npc/009-2/yalina.txt @@ -0,0 +1,10 @@ +009-2,148,47,0 script Yalina NPC209,{ + @npcname$ = "Yalina"; + + mes "[" + @npcname$ + "]"; + mes "\"Ian knows a lot! I had so many questions he helped me with!\""; + next; + mes "\"He rewards those that know what they are doing. When the Nurse stops healing you, check in with Ian.\""; + @npcname$ = ""; + close; +} diff --git a/npc/009-3/_import.txt b/npc/009-3/_import.txt new file mode 100644 index 00000000..ad094dec --- /dev/null +++ b/npc/009-3/_import.txt @@ -0,0 +1,7 @@ +// Map 009-3: Hurnscald Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-3/_mobs.txt", +"npc/009-3/_warps.txt", +"npc/009-3/mapflags.txt", +"npc/009-3/sword.txt", +"npc/009-3/warp.txt", diff --git a/npc/009-3/_mobs.txt b/npc/009-3/_mobs.txt new file mode 100644 index 00000000..888cc0f2 --- /dev/null +++ b/npc/009-3/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-3: Hurnscald Cave mobs +009-3,0,0,0,0 monster Little Blub 1007,20,0,0 +009-3,62,75,62,75 monster Toppy Blub 1009,25,0,0 +009-3,63,75,63,75 monster Blub 1008,35,0,0 +009-3,145,75,55,75 monster Beehive 1056,20,100000,30000 diff --git a/npc/009-3/_warps.txt b/npc/009-3/_warps.txt new file mode 100644 index 00000000..24b75cc1 --- /dev/null +++ b/npc/009-3/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-3: Hurnscald Cave warps +009-3,173,20,0 warp #009-3_173_20 0,0,009-2,147,89 +009-3,20,57,0 warp #009-3_20_57 0,0,011-4,129,87 +009-3,157,30,0 warp #009-3_157_30 0,0,018-3,179,180 +009-3,117,19,0 warp #009-3_117_19 0,0,013-3,160,102 diff --git a/npc/009-3/mapflags.txt b/npc/009-3/mapflags.txt new file mode 100755 index 00000000..120bf75f --- /dev/null +++ b/npc/009-3/mapflags.txt @@ -0,0 +1 @@ +//009-3 mapflag resave 009-2,149,43 diff --git a/npc/009-3/sword.txt b/npc/009-3/sword.txt new file mode 100755 index 00000000..b026b023 --- /dev/null +++ b/npc/009-3/sword.txt @@ -0,0 +1,175 @@ +009-3,26,100,0 script #MysticSword#_M NPC400,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + @Q_MASK = NIBBLE_6_MASK; + @Q_SHIFT = NIBBLE_6_SHIFT; + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC_WAR; + @SUP_name$ = "War Magic"; + + @STATUS_INITIAL = 0; + @STATUS_LEARNED_FLAREDART = 1; + @STATUS_LEARNED_MAGICBLADE = 2; + @STATUS_LEVEL2 = 3; + @STATUS_W11 = 4; + @STATUS_W12 = 5; + @STATUS_W11_12 = 6; + @STATUS_L2_ALLSPELLS = 7; + + if (@Q_status == @STATUS_INITIAL) goto L_Initial; + if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_PostFlareDart; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_PostFlareDart_teach2; + if (@Q_status == @STATUS_LEVEL2) goto L_L2_W11; + if (@Q_status == @STATUS_W12) goto L_L2_W11; + if (@Q_status == @STATUS_W11) goto L_L2_almost_done; + if (@Q_status == @STATUS_W11_12) goto L_L2_almost_done; + + mes "[Magic Sword]"; + mes "\"Come back when thou art stronger.\""; + close; + +L_Initial: + mes "[Magic Sword]"; + mes "As you look at the sword, you suddenly hear a voice in your head!"; + mes "\"Welcome to my prison, mortal!\""; + next; + mes "[Magic Sword]"; + mes "Well, either you are going mad, or that sword in the stone is talking to you."; + next; + mes "[Magic Sword]"; + mes "Or, well, both."; + next; + mes "[Magic Sword]"; + mes "The deep basso voice continues."; + mes "\"I know not what brought thee hither, but I kindly ask that thou leavest me alone in my sorrow.\""; + next; + menu + "Leave", L_close, + "Sorry.", L_Next, + "Who or what are you?", L_Next, + "What sorrow?", L_Next, + "Can I help?", L_Next, + "Can you teach me magic?", L_Next; + +L_Next: + mes "[Magic Sword]"; + mes "There is no answer."; + close; + +L_PostFlareDart: + mes "[Magic Sword]"; + mes "As you look at the sword, you hear a deep voice resounding in your head."; + mes "\"Welcome, mortal!\""; + next; + menu + "Hi! How are you?", L_PostFlareDart_hi, + "Can you teach me magic?", L_PostFlareDart_teach, + "Your sister sent me.", L_PostFlareDart_sister, + "Bye!", L_close; + +L_PostFlareDart_hi: + mes "[Magic Sword]"; + mes "\"Mortal... I have seen pain and death beyond thine reckoning! Mock me not with thine idle questions!\""; + close; + +L_PostFlareDart_sister: + mes "[Magic Sword]"; + mes "\"My sister...? Alas! I remember now; abandoned she was, just as I; buried in stone, never to be wielded again.\""; + mes "\"Wherefore did she send thee?\""; + next; + menu + "She asked me to ask you to teach me a spell.", L_PostFlareDart_teach; + +L_PostFlareDart_teach: + mes "[Magic Sword]"; + mes "\"Beware, mortal... the only spells I can teach thee are those of the school of war. Dark and dreary spells, that lot! Pain and misery is all they bring...\""; + next; + mes "[Magic Sword]"; + mes "The sword's voice is growing apprehensive."; + mes "\"Once a spell has been learned, it cannot be taken back, no more than a death can be undone. So be careful, mortal... dost thou truly wish to know the secrets of thus destructive power?\""; + next; + menu + "Yes.", L_Next1, + "No.", L_close; + +L_Next1: + mes "[Magic Sword]"; + mes "\"So thou art bound to the path of War, as am I, as is my sister...\""; + next; + mes "[Magic Sword]"; + mes "\"So be it, fellow warrior. Hear the incantation for the blade spell: '" + get(.invocation$, "magic-blade") + "'\""; + mes "\"Hold a knife, sharp or regular, when thou speakest it.\""; + @Q_status = @STATUS_LEARNED_MAGICBLADE; + callsub S_Update_Var; + next; + mes "[Magic Sword]"; + mes "\"But beware... the path of war that thou hast embarked upon is one from which few return. May luck be on thy side...\""; + close; + +L_PostFlareDart_teach2: + mes "[Magic Sword]"; + mes "\"Seek out my sister, and leave me alone in my sorrows.\""; + next; + goto L_close; + +L_close: + close; + +L_L2_W11: + mes "[Magic Sword]"; + mes "\"Thou hast returned. That must mean that thy wish to learn the magic of war is still alive?\""; + next; + menu + "No, I just wanted to say `hi'.", L_Farewell2, + "Yes, teach me more!", L_Next2; + +L_Next2: + mes "[Magic Sword]"; + mes "\"If that is thou wishest, I shall not stop thee. But do not expect to find merriment down this road.\""; + mes "\"I must ask that thou sacrificest five thousand monster points for this, however.\""; + menu + "No, I don't want that.", L_close, + "Very well.", L_Next3; + +L_Next3: + if (Mobpt < 5000) + goto L_lacking_mobpoints; + mes "[Magic Sword]"; + mes "\"So be it, then.\""; + mes "[1000 experience points]"; + Mobpt = Mobpt - 5000; + getexp 1000, 0; + @Q_status = @Q_status + 1; + callsub S_Update_Var; + next; + mes "[Magic Sword]"; + mes "\"The spell I shall teach thee is the hail of arrows spell. It will make arrows fall down from the heavens unto thy enemies.\""; + next; + mes "[Magic Sword]"; + mes "\"Take twenty arrows, sprinkle sulphur powder over them, and then speak '" + get(.invocation$, "arrow-hail") + "'. Throw them high up in the air, and watch the hail unfold before thy feet.\""; + close; + +L_L2_almost_done: + mes "[Magic Sword]"; + mes "\"Return to my sister now. I expect that she shall teach thee one more spell.\""; + close; + +L_lacking_mobpoints: + mes "[Magic Sword]"; + mes "\"Thou lackest the monster points needed to prove thy worthiness. I shall not reveal more to thee until thou hast slain more monsters.\""; + close; + +L_Farewell2: + mes "[Magic Sword]"; + mes "\"Please leave me in peace.\""; + close; + +S_Update_Var: + QUEST_MAGIC = (QUEST_MAGIC & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/009-3/warp.txt b/npc/009-3/warp.txt new file mode 100755 index 00000000..f0313c42 --- /dev/null +++ b/npc/009-3/warp.txt @@ -0,0 +1,26 @@ +009-3,162,80,0 script #PVPCaveBarrier NPC45,0,0,{ + mes "Do you want to enter the PVP cave? It costs 150GP."; + menu + "No.", L_Exit, + "Yes.", L_Next; + +L_Next: + if (Zeny < 150) + goto L_NotEnoughMoney; + if (Zeny >= 150) + goto L_Pay; + goto L_Exit; + +L_Exit: + close; + +L_Pay: + Zeny = Zeny - 150; + warp "009-6", 36, 47; + close; + +L_NotEnoughMoney: + mes "You don't have enough money!"; + close; + +} diff --git a/npc/009-4/_import.txt b/npc/009-4/_import.txt new file mode 100644 index 00000000..761cbf7e --- /dev/null +++ b/npc/009-4/_import.txt @@ -0,0 +1,10 @@ +// Map 009-4: Orum Caves +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-4/_mobs.txt", +"npc/009-4/_warps.txt", +"npc/009-4/barriers.txt", +"npc/009-4/mapflags.txt", +"npc/009-4/orum.txt", +"npc/009-4/orum_warps.txt", +"npc/009-4/torches.txt", +"npc/009-4/waric.txt", diff --git a/npc/009-4/_mobs.txt b/npc/009-4/_mobs.txt new file mode 100644 index 00000000..c0080978 --- /dev/null +++ b/npc/009-4/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-4: Orum Caves mobs +009-4,117,97,12,7 monster Mana Bug 1035,3,20000,14000 +009-4,115,98,12,7 monster Dummy 1021,5,20000,14000 +009-4,103,28,12,7 monster Dummy 1021,3,20000,14000 +009-4,106,27,12,7 monster Mana Bug 1035,3,20000,14000 +009-4,119,45,6,5 monster Mana Bug 1035,3,20000,14000 +009-4,72,130,12,7 monster Piou 1002,3,20000,14000 +009-4,38,116,12,7 monster Piou 1002,3,20000,14000 diff --git a/npc/009-4/_warps.txt b/npc/009-4/_warps.txt new file mode 100644 index 00000000..42d12c0c --- /dev/null +++ b/npc/009-4/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-4: Orum Caves warps +009-4,37,112,0 warp #009-4_37_112 0,0,009-3,163,114 +009-4,72,136,0 warp #009-4_72_136 0,0,009-4,36,27 +009-4,37,123,0 warp #009-4_37_123 0,0,009-4,36,27 +009-4,72,125,0 warp #009-4_72_125 0,0,009-3,163,114 +009-4,103,22,0 warp #009-4_103_22 0,0,009-4,51,46 +009-4,103,76,0 warp #009-4_103_76 0,0,009-4,51,46 diff --git a/npc/009-4/barriers.txt b/npc/009-4/barriers.txt new file mode 100755 index 00000000..08998e94 --- /dev/null +++ b/npc/009-4/barriers.txt @@ -0,0 +1,268 @@ +function script GetBarrierColor { + if (@Barrier < 0 || @Barrier > 2) + goto L_Error; + if (@BarrierColor <= 0 || @BarrierColor > 12) + goto L_Error2; + goto L_GetBarrierColor; + +L_GetBarrierColor: + @Mask = 15; + @shift = 4 * @Barrier; + @BarrierColor = (OrumQuestBarrier >> @shift) & @Mask; + return; + +L_Error: + mes "Barrier number is out of range."; + close2; + return; + +L_Error2: + callfunc "SetUpOrumQuest"; + goto L_GetBarrierColor; +} + +function script SetBarrierColor { + if (@Barrier < 0 || @Barrier > 2) + goto L_Error; + if (@BarrierColor <= 0 || @BarrierColor > 12) + goto L_Error2; + + @Mask = (15 << (4 * @Barrier)); + OrumQuestBarrier = (OrumQuestBarrier & (~(@Mask))) | @BarrierColor << (4 * @Barrier); + return; + +L_Error: + mes "Barrier number is out of range."; + close2; + return; + +L_Error2: + mes "Barrier color is out of range."; + close2; + return; +} + + +009-4,37,119,0 script #OrumCaveStartMessage NPC32767,0,0,{ + if (OrumQuest >= 3) end; + if (OrumQuest == 2) goto L_Started; + + mes "As you try to pass, two torches begin to flare and push you back. They seem to form some kind of barrier."; + close; + +L_Started: + message strcharinfo(0), "The torches dim as you approach, granting you passage."; + OrumQuest = 3; + end; +} + +009-4,37,120,0 script #OrumCaveStartBarrier NPC32767,0,0,{ + if (OrumQuest >= 3) end; + warp "009-4", 37, 118; + end; +} + +009-4,57,29,0 script #OrumCaveFirstBarrier NPC32767,0,0,{ + if (OrumQuest >= 5) end; + + message strcharinfo(0), "Nothing seems to happen as you enter this room. The barrier must need both of its torches to function properly."; + OrumQuest = 5; + end; +} + +009-4,61,55,0 script #OrumCaveSecondMessage NPC32767,0,0,{ + if (OrumQuest >= 9) end; + if (OrumQuest == 3) set OrumQuest, 4; + + @Barrier = 0; + callfunc("GetBarrierColor"); + @Torch = 0; + callfunc("GetTorchColor"); + if (OrumQuest > 7 && @TorchColor == @BarrierColor) + goto L_Allow_Second_Passage; + + mes "As you try to pass, the torches begin to flare and push you back. Perhaps there's a way to get past it."; + mes ""; + setarray @colors$,"transparent","red","dark orange","orange","light orange","yellow","light green","green","dark green","blue","dark purple","purple","light purple"; + mes "Looking closely between the two torches you can see the barrier has a ##B" + @colors$[@BarrierColor] + "##b tint to it."; + close; + +L_Allow_Second_Passage: + if (OrumQuest < 9) goto L_Advance_Quest; + end; + +L_Advance_Quest: + message strcharinfo(0), "The torches dim as you enter like the first. You must be on the right trail."; + OrumQuest = 9; + end; +} + +009-4,61,54,0 script #OrumCaveSecondBarrier NPC32767,0,0,{ + if (OrumQuest >= 9) end; + warp "009-4", 60, 56; + end; +} + +009-4,24,65,0 script #OrumCaveThirdMessage NPC32767,0,0,{ + if (OrumQuest >= 10) end; + if (OrumQuest == 3) set OrumQuest, 4; + if (OrumQuest > 8 && @Torch1Color == @firstColor && @Torch2Color == @secondColor) + goto L_Allow_Third_Passage; + if (OrumQuest > 8 && @Torch2Color == @firstColor && @Torch1Color == @secondColor) + goto L_Allow_Third_Passage; + + @Barrier = 1; + callfunc("GetBarrierColor"); + + @Torch = 0; + callfunc("GetTorchColor"); + @Torch1Color = @TorchColor; + + @Torch = 1; + callfunc("GetTorchColor"); + @Torch2Color = @TorchColor; + + @firstColor = @BarrierColor - 2; + @secondColor = @BarrierColor + 2; + if (@firstColor < 1) + @firstColor = 12; + if (@secondColor > 12) + @secondColor = 1; + + mes "As you try to pass, the torches begin to flare and push you back. Perhaps there is a way to get past it."; + mes ""; + setarray @colors$,"transparent","red","dark orange","orange","light orange","yellow","light green","green","dark green","blue","dark purple","purple","light purple"; + mes "Looking closely between the two torches you can see the barrier has a ##B" + @colors$[@BarrierColor] + "##b tint to it."; + close; + +L_Allow_Third_Passage: + if (OrumQuest < 10) goto L_Advance_Quest; + end; + +L_Advance_Quest: + OrumQuest = 10; + end; +} + +009-4,24,66,0 script #OrumCaveThirdBarrier NPC32767,0,0,{ + if (OrumQuest >= 10) end; + warp "009-4", 23, 64; + end; +} + +009-4,48,37,0 script #OrumCaveEndMessage NPC32767,0,0,{ + if (OrumQuest >= 11) end; + if (OrumQuest == 3) set OrumQuest, 4; + + @Barrier = 2; + callfunc("GetBarrierColor"); + + if (OrumQuest < 10) + goto L_Deny_Final_Passage; + + @Torch = 0; + callfunc("GetTorchColor"); + @Torch1Color = @TorchColor; + + @Torch = 1; + callfunc("GetTorchColor"); + @Torch2Color = @TorchColor; + + @Torch = 2; + callfunc("GetTorchColor"); + @Torch3Color = @TorchColor; + + // Extract the secondary color + @secondary = @BarrierColor - 1; + if (@secondary != 3 && @secondary != 7 && @secondary != 11) + @secondary = @BarrierColor + 1; + + // Make sure it's in bounds + if (@secondary > 12) + @secondary = @secondary - 12; + if (@secondary < 1) + @secondary = @secondary + 12; + + // Extract first 2 required colors + @firstColor = @secondary - 2; + @secondColor = @secondary + 2; + if (@firstColor > 12) + @firstColor = @firstColor - 12; + if (@firstColor < 1) + @firstColor = @firstColor + 12; + if (@secondColor > 12) + @secondColor = @secondColor - 12; + if (@secondColor < 1) + @secondColor = @secondColor + 12; + + @thirdColor = 12; + @offsetOne = @BarrierColor + 1; + @offsetTwo = @BarrierColor - 1; + + // Make sure they in bounds + if (@offsetOne > 12) + @offsetOne = @offsetOne - 12; + if (@offsetOne < 1) + @offsetOne = @offsetOne + 12; + if (@offsetTwo > 12) + @offsetTwo = @offsetTwo - 12; + if (@offsetTwo < 1) + @offsetTwo = @offsetTwo + 12; + + // Extract third needed color + if (@secondary == @offsetOne) + @thirdColor = @firstColor; + if (@secondary == @offsetTwo) + @thirdColor = @secondColor; + + @firstDone = 0; + @secondDone = 0; + @thirdDone = 0; + + if (@firstDone == 0 && @secondDone != 1 && @thirdDone != 1 && @Torch1Color == @firstColor) + @firstDone = 1; + if (@firstDone != 1 && @secondDone == 0 && @thirdDone != 1 && @Torch1Color == @secondColor) + @secondDone = 1; + if (@firstDone != 1 && @secondDone != 1 && @thirdDone == 0 && @Torch1Color == @thirdColor) + @thirdDone = 1; + + if (@firstDone == 0 && @secondDone != 2 && @thirdDone != 2 && @Torch2Color == @firstColor) + @firstDone = 2; + if (@firstDone != 2 && @secondDone == 0 && @thirdDone != 2 && @Torch2Color == @secondColor) + @secondDone = 2; + if (@firstDone != 2 && @secondDone != 2 && @thirdDone == 0 && @Torch2Color == @thirdColor) + @thirdDone = 2; + + if (@firstDone == 0 && @secondDone != 3 && @thirdDone != 3 && @Torch3Color == @firstColor) + @firstDone = 3; + if (@firstDone != 3 && @secondDone == 0 && @thirdDone != 3 && @Torch3Color == @secondColor) + @secondDone = 3; + if (@firstDone != 3 && @secondDone != 3 && @thirdDone == 0 && @Torch3Color == @thirdColor) + @thirdDone = 3; + + if (@firstDone != 0 && @secondDone != 0 && @thirdDone != 0) + goto L_Allow_Final_Passage; + goto L_Deny_Final_Passage; + +L_Deny_Final_Passage: + mes "As you try to pass, the torches begin to flare and push you back. Perhaps there is a way to get past it."; + mes ""; + setarray @colors$,"transparent","red","dark orange","orange","light orange","yellow","light green","green","dark green","blue","dark purple","purple","light purple"; + mes "Looking closely between the two torches you can see the barrier has a ##B" + @colors$[@BarrierColor] + "##b tint to it."; + close; + +L_Allow_Final_Passage: + if (OrumQuest < 11) goto L_Advance_Quest; + end; + +L_Advance_Quest: + message strcharinfo(0), "The torches dim as you enter. At last you finally have access!"; + OrumQuest = 11; + end; +} + +009-4,48,38,0 script #OrumCaveEndBarrier NPC32767,0,0,{ + if (OrumQuest >= 11) end; + warp "009-4", 47, 36; + end; +} diff --git a/npc/009-4/mapflags.txt b/npc/009-4/mapflags.txt new file mode 100755 index 00000000..458eb60f --- /dev/null +++ b/npc/009-4/mapflags.txt @@ -0,0 +1 @@ +//009-4 mapflag resave 009-4,37,118 diff --git a/npc/009-4/orum.txt b/npc/009-4/orum.txt new file mode 100755 index 00000000..42ae60d9 --- /dev/null +++ b/npc/009-4/orum.txt @@ -0,0 +1,607 @@ + +009-4,35,115,0 script OrumDebug NPC158,{ + mes "[Orum Debug]"; + menu + "Set Quest State", L_SetQuest, + "Reset Quest", L_ResetQuest, + "Display Quest", L_Display; + +L_SetQuest: + input @quest_state; + OrumQuest = @quest_state; + goto L_close; + +L_ResetQuest: + OrumQuest = 0; + OrumQuestBarrier = 0; + OrumQuestTorch = 0; + goto L_close; + +L_Display: + mes OrumQuest; + goto L_close; + +L_close: + end; + +OnInit: + if (!debug) + disablenpc "OrumDebug"; + end; +} +009-4,37,115,0 script Orum#barrier NPC158,{ + // needed to pass the very first barrier + @B0_WISPPOWDER = 4; + @B0_POLTERGEISTPOWDER = 2; + @B0_SPECTREPOWDER = 1; + @B0_HARDSPIKES = 1; + + // needed stuff to get colorful powders + @BT_IRONPOWDER = 10; + @BT_PILESOFASH = 10; + @BT_HERBS = 15; + + // how many colorful powders each do you get as reward? + @BT_REWARDCOUNT = 10; + + @Exp_BREAK_BARRIERS = 5000; + + if (OrumQuest > 0) goto L_Started; + + mes "[Orum]"; + mes "\"It's not wise to venture around this place! Well hmm... I guess since you're here, maybe you can lend a little help?\""; + menu + "What exactly is 'this place'?", L_Explain, + "Umm... what kind of help?", L_Explain, + "You're right, I'll be on my way.", L_Next; + +L_Next: + mes "[Orum]"; + mes "\"Very smart thinking!\""; + goto L_close; + +L_Explain: + mes "[Orum]"; + mes "\"Recently a woman claiming to be a witch came to my village seeking help from my mentor Waric, who is a very powerful wizard, but he refused and she left. But...\""; + next; + mes "\"The next day he went missing! I'm no wizard yet, but from what I overheard... I think that witch is attempting some very foul magic and has kidnapped him for some reason!\""; + next; + mes "\"I traveled in the direction she left until I came accross this cave, but it appears to be protected by some type of magical barrier and I haven't been able to get further than this room.\""; + menu + "So where would I come in?", L_Explain_Barriers, + "I'd like to help but I have to go...", L_Next1; + +L_Next1: + mes "[Orum]"; + mes "\"Thats too bad... well, if you ever have some free time, I probably won't figure this out any time soon.\""; + goto L_close; + +L_Explain_Barriers: + mes "[Orum]"; + mes "\"I've examined this room and it appears that the barrier is made up of two torches on each side. The flame on them has a strange glow. They must be imbued with magical properties.\""; + next; + mes "\"I've never come across anything like this barrier before. It must be drawing it's power from the torches. I tried putting them out with conventional means but I had no luck.\""; + menu + "Have any other ideas on how we get past it?", L_Explain_Note, + "I think its meant to keep us out... Bye.", L_Next2; + +L_Next2: + mes "[Orum]"; + mes "\"You may be right... but she kidnapped Waric. I know it! So I must do something! If you ever change your mind I could surely use the help.\""; + goto L_close; + +L_Explain_Note: + mes "[Orum]"; + mes "\"Actually! After Waric went missing I looked around at his house a bit and came across a note the witch must have dropped. I skimmed over it and didn't pay much attention but I think it mentioned something about this barrier!\""; + next; + mes "He pulls it out of his pocket and begins examining it."; + next; + mes "[Orum]"; + mes "\"Ah! Here it is! If I'm reading this right we may have found a way past it after all. I guess she would need a way to come and go unaffected while everyone else is kept from entering.\""; + menu + "What does it say?", L_Explain_Aura, + "Looks like you can do this without me.", L_Next3; + +L_Next3: + mes "[Orum]"; + mes "\"Eh... well I guess I can't force you to stay.\""; + goto L_close; + +L_Explain_Aura: + mes "[Orum]"; + mes "\"Appears to be some kind of spell to place a magical aura around someone... Hmm, with these materials listed on here I'm going to guess this aura makes the wearer partly incorporeal.\""; + next; + mes "\"It looks like the barrier requires substances from 3 different incorporeal creatures. I've heard of Wisps, Poltergeists, and Spectres before but I've never seen such a thing.\""; + next; + mes "\"Luckily I happen to be skilled in this field of magic! I'm pretty sure if I can get my hands on the materials listed on here I'll be able to cast this aura on us, and hopefully then we can get past this barrier!\""; + menu + "Let me guess... that is my job?", L_Offer_Quest, + "I think someone is calling me... Bye!", L_close; + +L_Offer_Quest: + mes "[Orum]"; + mes "\"Well you would probably do better than me since I don't know this area very well. It's not too much stuff so I'm sure you won't have any trouble at all.\""; + menu + "Alright alright, just give me a list.", L_Start_Quest, + "I'm not your servant! Bye.", L_Leave1; + +L_Leave1: + mes "[Orum]"; + mes "\"Everyone answers to someone... that's just how the world is. If you ever change your mind I'll probably be here forever gathering these materials on my own.\""; + goto L_close; + +L_Start_Quest: + mes "He pulls a crumpled piece of paper from his pocket, smooths it out and writes a list on it before handing it to you."; + next; + mes "" + @B0_WISPPOWDER + " Wisp Powders,"; + mes "" + @B0_POLTERGEISTPOWDER + " Poltergeist Powders,"; + mes "" + @B0_SPECTREPOWDER + " Spectre Powders,"; + mes "" + @B0_HARDSPIKES + " Hard Spikes"; + menu + "Alright, I'll go get these.", L_Start_Gathering, + "You can forget it! I quit!", L_Next4; + +L_Next4: + mes "[Orum]"; + mes "\"I know you'll be back... they always come back!\""; + goto L_close; + +L_Start_Gathering: + mes "[Orum]"; + mes "\"That's the spirit! But try not to take too long.\""; + OrumQuest = 1; + goto L_close; + +L_Started: + if (OrumQuest == 1) goto L_Gathering; + if (OrumQuest == 2) goto L_Use_First_Barrier; + if (OrumQuest == 3) goto L_Explore; + if (OrumQuest == 4) goto L_Found_Barriers; + if (OrumQuest == 5) goto L_Found_Barriers; + if (OrumQuest == 6) goto L_Found_Torches; + if (OrumQuest == 7) goto L_Still_Gathering; + if (OrumQuest == 8) goto L_Finish_Up; + if (OrumQuest >= 9) goto L_Finished_Up; + goto L_close; + +L_Gathering: + mes "[Orum]"; + mes "\"Got all the things I asked for yet?\""; + menu + "Yep, I have every last one of them!", L_Check_Materials, + "Can I get another list?", L_List_Materials, + "I still need a few things...", L_Next5; + +L_Next5: + mes "Orum shakes his head in frustration."; + next; + mes "[Orum]"; + mes "\"You'd better get that stuff soon!\""; + goto L_close; + +L_List_Materials: + mes "He scavenges around in his pocket for another piece of paper then writes a new list."; + next; + mes @B0_WISPPOWDER + " Wisp Powders,"; + mes @B0_POLTERGEISTPOWDER + " Poltergeist Powders,"; + mes @B0_SPECTREPOWDER + " Spectre Powders,"; + mes @B0_HARDSPIKES + " Hard Spikes"; + next; + mes "[Orum]"; + mes "\"And try not to lose this one... I'm running out of stuff to write on!\""; + goto L_close; + +L_Check_Materials: + if (countitem("WispPowder") < @B0_WISPPOWDER || + countitem("PoltergeistPowder") < @B0_POLTERGEISTPOWDER || + countitem("SpectrePowder") < @B0_SPECTREPOWDER || + countitem("HardSpike") < @B0_HARDSPIKES) + goto L_Missing_Materials; + + // check directly before deleting the objects. + delitem "WispPowder", @B0_WISPPOWDER; + delitem "PoltergeistPowder", @B0_POLTERGEISTPOWDER; + delitem "SpectrePowder", @B0_SPECTREPOWDER; + delitem "HardSpike", @B0_HARDSPIKES; + + mes "Orum carefully looks over all of the items then grins."; + next; + mes "[Orum]"; + mes "\"Well done! And you did not even take as long as I thought you would!\""; + next; + mes "Orum takes the hard spikes in his hand and begins chanting some words."; + next; + mes "You watch as they begin to mold together, glowing brightly. He sprinkles in the powder you gathered and presses his hands together."; + misceffect sfx_magic_transmute; + next; + mes "Suddenly a feeling of dizzyness hits you and you begin to feel weightless... It passes after a moment..."; + misceffect sfx_magic_nature; + misceffect 11, strcharinfo(0); + next; + mes "[Orum]"; + mes "\"Well we are both still in one piece so that is a good sign! Now we'll have to see if I did it right... mind going first?\""; + goto L_Setup_Lair; + +L_Missing_Materials: + mes "Orum carefully looks over all of the items then squints his eyes at you."; + next; + mes "[Orum]"; + mes "\"I'm not going to attempt this spell until I have ALL the items on this note. Go gather the missing materials!\""; + goto L_close; + +L_Setup_Lair: + OrumQuest = 2; + callfunc "SetUpOrumQuest"; + goto L_close; + +L_Use_First_Barrier: + mes "[Orum]"; + mes "\"Casting that aura took a lot out of me. Why don't you go explore the cave a bit while I rest?\""; + goto L_close; + +L_Explore: + mes "Orum looks up as you approach."; + next; + mes "[Orum]"; + mes "\"Find anything interesting in this place?\""; + next; + menu + "Yep. A whole mess of torches!", L_Explain_Objective, + "I'm not sure what to look for...", L_Explain_Objective, + "Going to explore more, bye.", L_Leave2; + +L_Leave2: + mes "[Orum]"; + mes "\"Be sure to let me know if you find anything. I've almost gained my energy back.\""; + goto L_close; + +L_Explain_Objective: + mes "[Orum]"; + mes "\"I'm positive this is where that witch took Waric, so this cave must lead to somewhere. Try looking around for another exit. I've almost gained my energy back and then I can help.\""; + goto L_close; + +L_Found_Barriers: + mes "Orum looks up as you approach."; + next; + mes "[Orum]"; + mes "\"Find anything interesting in this place?\""; + menu + "Yep. A whole mess of torches!", L_Explain_Objective, + "I'm not sure what to look for...", L_Explain_Objective, + "I found more barriers, but...", L_Explain_Barriers_More, + "Going to explore more, bye.", L_Leave3; + +L_Leave3: + mes "[Orum]"; + mes "\"Be sure to let me know if you find anything. I'm still gaining my energy back.\""; + goto L_close; + +L_Explain_Barriers_More: + mes "[Orum]"; + mes "\"Hm let me guess... the aura is ineffective on the rest of the barriers here?\""; + menu + "How did you know?", L_Explain_Note_More, + "I'm not sure, I'll go try again.", L_Next6; + +L_Next6: + mes "[Orum]"; + mes "\"Always a good idea to double check things!\""; + goto L_close; + +L_Explain_Note_More: + mes "[Orum]"; + mes "\"Well while I was resting I spent more time looking over the note that witch dropped. And I think the aura is only to get past the entrance.\""; + next; + mes "[Orum]"; + mes "\"It mentions some sort of security system to keep people from entering the actual lair but it doesn't explain in great detail. Try exploring more, maybe we will find some answers.\""; + next; + mes "Orum continues examining the note."; + goto L_close; + +L_Found_Torches: + mes "Orum looks up as you approach."; + next; + mes "[Orum]"; + mes "\"Did you find something interesting?\""; + next; + menu + "Yep. A whole mess of torches!", L_Explain_Objective, + "I'm not sure what to look for...", L_Explain_Objective, + "I found more barriers, but...", L_Explain_Barriers_More, + "I found a strange torch by itself.", L_Explain_Torches, + "Going to explore more, bye.", L_Leave4; + +L_Leave4: + mes "[Orum]"; + mes "\"Be sure to let me know if you find anything new.\""; + goto L_close; + +L_Explain_Torches: + mes "Orum has you direct him to the torch and he walks off to examine it before returning shortly after."; + next; + mes "[Orum]"; + mes "\"Ah yes! I was hoping we would find something like this!\""; + next; + mes "\"While examining the note I found another set of spells to create some type of powder and with them was a few notes on using it with some type of torch.\""; + next; + mes "\"I bet this torch has something to do with the rest of these barriers which are probably the security system this note mentions.\""; + next; + mes "\"We will probably need to transmute this powder before we can get any further past these barriers. Would you mind gathering a few more materials?\""; + menu + "It better be the last time.", L_Gather_More, + "I'm done doing stuff for you!", L_Next61; + +L_Next61: + mes "[Orum]"; + mes "\"I'm surprised you give up after we've gotten so far. Shame.\""; + goto L_close; + +L_Gather_More: + mes "Orum begins writing down another list of materials."; + next; + mes @BT_IRONPOWDER + " Piles of Iron Powder,"; + mes @BT_PILESOFASH + " Piles of Sand or Ash,"; + mes @BT_HERBS + " Gamboge Herbs,"; + mes @BT_HERBS + " Alizarin Herbs,"; + mes @BT_HERBS + " Cobalt Herbs"; + menu + "Yikes! I'll try...", L_Gathering_More, + "No way! Too much stuff!", L_Next7; + +L_Next7: + mes "[Orum]"; + mes "\"The note says to get these and I'm not going to attempt this spell until I have what the note says.\""; + goto L_close; + +L_Gathering_More: + OrumQuest = 7; + mes "[Orum]"; + mes "\"Wonderful! Try to make it quick, we must save Waric!\""; + goto L_close; + +L_Still_Gathering: + mes "[Orum]"; + mes "\"Have you finished gathering those things yet?\""; + menu + "I believe I have!", L_F_Gather_More, + "I lost my list... again.", L_List_Materials_More, + "I've almost got them all.", L_Next8; + +L_Next8: + mes "[Orum]"; + mes "\"Don't make me remind you again! Warics life is on the line here! Hurry up!\""; + goto L_close; + +L_List_Materials_More: + mes "He scavenges around in his pocket for another piece of paper then writes a new list."; + next; + mes @BT_IRONPOWDER + " Piles of Iron Powder,"; + mes @BT_PILESOFASH + " Piles of Sand or Ash,"; + mes @BT_HERBS + " Gamboge Herbs,"; + mes @BT_HERBS + " Alizarin Herbs,"; + mes @BT_HERBS + " Cobalt Herbs"; + next; + mes "[Orum]"; + mes "\"And try not to lose this one. I don't have much more to write on!\""; + goto L_close; + +L_F_Gather_More: + if (countitem("IronPowder") < @BT_IRONPOWDER || + countitem("PileOfAsh") < @BT_PILESOFASH || + countitem("GambogeHerb") < @BT_HERBS || + countitem("AlizarinHerb") < @BT_HERBS || + countitem("CobaltHerb") < @BT_HERBS) + goto L_Missing_Mats_M; + + delitem "IronPowder", @BT_IRONPOWDER; + delitem "PileOfAsh", @BT_PILESOFASH; + delitem "GambogeHerb", @BT_HERBS; + delitem "AlizarinHerb", @BT_HERBS; + delitem "CobaltHerb", @BT_HERBS; + + mes "[Orum]"; + mes "\"Excellent work! And once again you did not take as long as I was expecting. I guess I will get started.\""; + next; + mes "You watch as Orum takes the iron powder and ash and begins chanting some words. The two start to glow and mold together turning into a light, metallic looking powder."; + next; + misceffect sfx_magic_transmute; + mes "He then splits the powder into three piles and performs separate spells on each using the herbs. After he finishes you see 3 piles of colored metallic powder that appear to be red, yellow, and blue."; + next; + misceffect sfx_magic_transmute; + mes "[Orum]"; + mes "\"Well if I did it right... These three powders are hopefully the key to getting past these barriers!\""; + next; + mes "\"I'm weary, I must take some time to rest. Why don't you go ahead and experiment with these powders on that torch and let me know if you figure what they have to do with it.\""; + + getitem "RedPowder", @BT_REWARDCOUNT; + getitem "YellowPowder", @BT_REWARDCOUNT; + getitem "BluePowder", @BT_REWARDCOUNT; + OrumQuest = 8; + goto L_close; + +L_Missing_Mats_M: + mes "Orum carefully looks over all of the items then squints his eyes at you."; + next; + mes "[Orum]"; + mes "\"You really enjoy playing games with Warics life, don't you! Come back when you have ALL of the items I told you.\""; + goto L_close; + +L_Finish_Up: + mes "Orum seems to be sitting around doing nothing as you approach."; + next; + mes "[Orum]"; + mes "\"Did you find a way past any of the barriers yet?\""; + menu + "No, I'm still not sure how.", L_Explain_Torches_More, + "I need more of that powder.", L_More_Powder, + "I'm still trying...", L_Next9; + +L_Next9: + mes "[Orum]"; + mes "\"Excellent! Let me know when you've made any progress.\""; + goto L_close; + +L_Explain_Torches_More: + mes "[Orum]"; + mes "\"Most of the barriers here have a certain color radiating from them and so do the torches. The torches seem to react with this powder so maybe we have to make these torches turn a certain color in order to lower the barriers.\""; + next; + mes "\"It seems that the powders are only in these 3 colors, so you may have to experiment a bit to get the colors right.\""; + next; + mes "\"Also while looking around I saw that behind one of the barriers was a cave. Maybe Waric is in there... we should try to get that barrier dropped.\""; + goto L_close; + +L_More_Powder: + mes "[Orum]"; + mes "\"You really used up that powder fast. Luckily I can make more as long as you can bring me those materials again.\""; + menu + "I have them right here!", L_More_Powder_Make, + "Hmmm... what are they again?", L_List_Materials_More, + "I'll go get those for you.", L_Next10; + +L_Next10: + mes "[Orum]"; + mes "\"You better not waste any time gathering those materials!\""; + goto L_close; + +L_More_Powder_Make: + if (countitem("IronPowder") < @BT_IRONPOWDER || + countitem("PileOfAsh") < @BT_PILESOFASH || + countitem("GambogeHerb") < @BT_HERBS || + countitem("AlizarinHerb") < @BT_HERBS || + countitem("CobaltHerb") < @BT_HERBS) + goto L_Missing_Mats_M; + + delitem "IronPowder", @BT_IRONPOWDER; + delitem "PileOfAsh", @BT_PILESOFASH; + delitem "GambogeHerb", @BT_HERBS; + delitem "AlizarinHerb", @BT_HERBS; + delitem "CobaltHerb", @BT_HERBS; + + mes "[Orum]"; + mes "\"Hmm all of the items appear to be here. Give me a moment to make that powder for you.\""; + next; + mes "Orum begins chanting the same words as he did when he made the powder before. He seems to be quicker this time."; + misceffect sfx_magic_transmute; + next; + mes "[Orum]"; + mes "\"Here you are. And try to conserve this time! The more powder I have to make, the more time and resources we use up that we could be using to save Waric!\""; + + getitem "RedPowder", @BT_REWARDCOUNT; + getitem "YellowPowder", @BT_REWARDCOUNT; + getitem "BluePowder", @BT_REWARDCOUNT; + goto L_close; + +L_Finished_Up: + mes "As you approch you think you see Orum rolling his eyes... maybe you're imagining it."; + next; + mes "[Orum]"; + mes "\"I hope you finally dropped that barrier we need to get past!\""; + menu + "Actually... I have!", L_Enter_Cavern, + "I need more of that powder.", L_More_Powder, + "Cut me some slack! I'm working on it!", L_Next11; + +L_Next11: + mes "[Orum]"; + mes "\"Just hurry it up! Warics life is on the line here!\""; + goto L_close; + +L_Enter_Cavern: + if (OrumQuest >= 10) goto L_Ready_Cavern; + + mes "Orum heads to the barrier then gives you a look as if he does not believe you before walking forward."; + next; + mes "He is suddenly thrown against the wall behind him! Angered, he gets up, brushes himself off, and heads back to the entrance without speaking."; + goto L_close; + +L_Ready_Cavern: + // you should not get that twice ;) + if (OrumQuest == 12) goto L_Got_Reward; + + mes "Orum heads to the barrier then gives you a look as if he does not believe you before walking forward."; + next; + mes "He makes it through without any problems and grins."; + next; + mes "[Orum]"; + mes "\"Very good work you have done! Please take this for your efforts. It has helped me in a bind.\""; + next; + getinventorylist; + if ((checkweight("CandleHelmet", 1) == 0) || (@inventorylist_count == 100)) + goto L_Inventory; + getexp @Exp_BREAK_BARRIERS, 0; + getitem "CandleHelmet", 1; + OrumQuest = 12; + mes "You receive the Candle Helmet."; + next; + mes "\"You've done enough here to help. I will go the rest of the way alone so that your life is not endangered. You must promise me not to go any further!\""; + menu + "Sure, I promise!", L_Next12, + "I thought this would never be over!", L_Next12; + +L_Next12: + mes "[Orum]"; + mes "\"Well I guess this is farewell!\""; + goto L_close; + +L_Inventory: + mes "\"You're carrying too much. Come back to me after you got rid of some stuff. And hurry, I don't want to spent all day waiting on you.\""; + goto L_close; + +L_Got_Reward: + mes "\"You've done enough here to help. I will go the rest of the way alone so that your life is not endangered.\""; + goto L_close; + +L_close: + @B0_WISPPOWDER = 0; + @B0_POLTERGEISTPOWDER = 0; + @B0_SPECTREPOWDER = 0; + @B0_HARDSPIKES = 0; + + @BT_IRONPOWDER = 0; + @BT_PILESOFASH = 0; + @BT_HERBS = 0; + + @BT_REWARDCOUNT = 0; + + @Exp_BREAK_BARRIERS = 0; + + @Barrier = 0; + @BarrierColor = 0; + @Torch = 0; + @TorchColor = 0; + close; +} +function script SetUpOrumQuest { + // Second Barrier + @BarrierColor = 1 + rand(3) * 4; + @Barrier = 0; + callfunc "SetBarrierColor"; + + @TorchIntensity = 0; + + @Torch = 0; + @TorchColor = rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; + + // Third Barrier + @BarrierColor = 3 + rand(3) * 4; + @Barrier = 1; + callfunc "SetBarrierColor"; + + @Torch = 1; + @TorchColor = rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; + + // End Barrier + @BarrierColor = 2 + rand(6) * 2; + @Barrier = 2; + callfunc "SetBarrierColor"; + + @Torch = 2; + @TorchColor = rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; + return; +} diff --git a/npc/009-4/orum_warps.txt b/npc/009-4/orum_warps.txt new file mode 100755 index 00000000..8cf74919 --- /dev/null +++ b/npc/009-4/orum_warps.txt @@ -0,0 +1,33 @@ +009-3,162,113,0 script #OrumQuestEnter NPC45,0,0,{ + if (OrumQuest >= 12) goto L_Second_Entrance; + warp "009-4", 37, 113; + close; + +L_Second_Entrance: + warp "009-4", 72, 126; + close; +} +009-4,36,26,0 script #LairExit NPC45,0,0,{ + if (OrumQuest >= 12) goto L_Second_Entrance; + warp "009-4", 37, 122; + close; + +L_Second_Entrance: + warp "009-4", 72, 135; + close; +} + +009-4,51,47,0 script #CavernEnter NPC45,0,0,{ + if (OrumQuest >= 14) goto L_Second_Cavern; + if (OrumQuest < 12) goto L_See_Orum; + warp "009-4", 103, 23; + close; + +L_Second_Cavern: + warp "009-4", 103, 77; + close; + +L_See_Orum: + mes "Right as you are entering you hear Orum call out for you. Perhaps you should see what he wants first."; + close; +} diff --git a/npc/009-4/torches.txt b/npc/009-4/torches.txt new file mode 100755 index 00000000..fe1fc187 --- /dev/null +++ b/npc/009-4/torches.txt @@ -0,0 +1,286 @@ +function script GetTorchColor { + if (@Torch < 0 || @Torch > 2) goto L_Error; + + @Mask = 15; + @shift = 4 * @Torch; + @TorchColor = (OrumQuestTorch >> @shift) & @Mask; + return; + +L_Error: + mes "Torch number is out of range."; + close2; + return; +} + +function script SetTorchColor { + if (@Torch < 0 || @Torch > 2) goto L_Error; + if (@TorchColor < 1 || @TorchColor > 12) goto L_Error2; + + @Mask = (15 << (4 * @Torch)); + OrumQuestTorch = (OrumQuestTorch & (~(@Mask))) | @TorchColor << (4 * @Torch); + return; + +L_Error: + mes "Torch number is out of range."; + close2; + return; + +L_Error2: + mes "Torch color is out of range."; + close2; + return; +} + +function script GetTorchIntensity { + if (@Torch < 0 || @Torch > 2) goto L_Error; + + @Mask = 15; + @shift = 4 * (@Torch + 3); + @TorchIntensity = (OrumQuestTorch >> @shift) & @Mask; + return; + +L_Error: + mes "Torch number is out of range."; + close2; + return; +} + +function script SetTorchIntensity { + if (@Torch < 0 || @Torch > 2) goto L_Error; + if (@TorchIntensity < 0 || @TorchIntensity > 2) goto L_Error2; + + @Mask = (15 << (4 * (@Torch + 3))); + OrumQuestTorch = (OrumQuestTorch & (~(@Mask))) | @TorchIntensity << (4 * (@Torch + 3)); + return; + +L_Error: + mes "Torch number is out of range."; + close2; + return; + +L_Error2: + mes "Torch intensity is out of range."; + close2; + return; +} + +function script DoneWithTorches { + if (OrumQuest < 11 && OrumQuest >= 8) + goto L_Return; + + if (OrumQuest < 7) goto L_Different; + + if (OrumQuest >= 11) + mes "The flame on the torch looks ordinary. Lowering the final barrier seems to have drained them of their magic."; + + if (OrumQuest < 8) + mes "Without that powder the note mentions there isn't much you can do with this torch."; + close2; + goto L_Return; + +L_Different: + mes "The flame on this torch looks different than the rest. You better tell Orum about it before doing anything."; + OrumQuest = 6; + close2; + goto L_Return; + +L_Return: + return; +} + +function script TorchLoop { + // Variables used here: + // @Torch - pass before calling + // @TorchColor - initialized here, updated throughout + // @TorchIntensity - initialized here, updated throughout + callfunc "GetTorchColor"; + callfunc "GetTorchIntensity"; + + setarray @colors$, "transparent", + "red", "dark orange", "orange", "light orange", + "yellow", "light green", "green", "dark green", + "blue", "dark purple", "purple", "light purple"; + setarray @intensities$, "calm", "bright", "blinding"; + mes "Looking closely you notice that this torch is not like the others. This one has a " + @intensities$[@TorchIntensity] + " ##B" + @colors$[@TorchColor] + "##b tint to it."; + goto L_Color_Loop; + +L_Color_Loop: + menu + "Add Red Powder", L_Use_Red, + "Add Yellow Powder", L_Use_Yellow, + "Add Blue Powder", L_Use_Blue, + "Leave it alone.", L_Leave; + +L_Leave: + mes "The flame flickers as if it's laughing at you."; + close2; + return; + +L_Use_Red: + if (countitem("RedPowder") < 1) + goto L_No_Powder; + delitem "RedPowder", 1; + + // 0 1 2 3 4 5 6 7 8 9 a b c + // T R o Y g B p + // ^ < < < < , X . > > > > + if (@TorchColor == 1) + goto L_WrongColor; + if (2 <= @TorchColor && @TorchColor <= 5) + goto L_Color_Dec; + if (@TorchColor == 6) + goto L_Color_Dec_Wrong; + if (@TorchColor == 7) + goto L_WrongColor; + if (@TorchColor == 8) + goto L_Color_Inc_Wrong; + if (9 <= @TorchColor && @TorchColor <= 12) + goto L_Color_Inc; + + // work around an old bug + if (@TorchColor == 0) + @TorchColor = 1; + goto L_Show_Color; + +L_Use_Yellow: + if (countitem("YellowPowder") < 1) + goto L_No_Powder; + delitem "YellowPowder", 1; + + // 0 1 2 3 4 5 6 7 8 9 a b c + // T R o Y g B p + // > > > > ^ < < < < , X . + if (1 <= @TorchColor && @TorchColor <= 4) + goto L_Color_Inc; + if (@TorchColor == 5) + goto L_WrongColor; + if (6 <= @TorchColor && @TorchColor <= 9) + goto L_Color_Dec; + if (@TorchColor == 10) + goto L_Color_Dec_Wrong; + if (@TorchColor == 11) + goto L_WrongColor; + if (@TorchColor == 12) + goto L_Color_Inc_Wrong; + + // work around an old bug + if (@TorchColor == 0) + @TorchColor = 5; + goto L_Show_Color; + +L_Use_Blue: + if (countitem("BluePowder") < 1) + goto L_No_Powder; + delitem "BluePowder", 1; + + // 0 1 2 3 4 5 6 7 8 9 a b c + // T R o Y g B p + // < , X . > > > > ^ < < < + if (@TorchColor == 1) + goto L_Color_Dec; + if (@TorchColor == 2) + goto L_Color_Dec_Wrong; + if (@TorchColor == 3) + goto L_WrongColor; + if (@TorchColor == 4) + goto L_Color_Inc_Wrong; + if (5 <= @TorchColor && @TorchColor <= 8) + goto L_Color_Inc; + if (@TorchColor == 9) + goto L_WrongColor; + if (10 <= @TorchColor && @TorchColor <= 12) + goto L_Color_Dec; + + // work around an old bug + if (@TorchColor == 0) + @TorchColor = 9; + goto L_Show_Color; + +L_No_Powder: + mes "You notice you're all out of that color of powder. Perhaps Orum can make you some more."; + close2; + return; + +L_Color_Dec: + @TorchColor = @TorchColor - 1; + if (@TorchColor == 0) + @TorchColor = 12; + goto L_Show_Color; + +L_Color_Dec_Wrong: + @TorchColor = @TorchColor - 1; + if (@TorchColor == 0) + @TorchColor = 12; + goto L_WrongColor; + +L_Color_Inc_Wrong: + @TorchColor = @TorchColor + 1; + if (@TorchColor == 13) + @TorchColor = 1; + goto L_WrongColor; + +L_Color_Inc: + @TorchColor = @TorchColor + 1; + if (@TorchColor == 13) + @TorchColor = 1; + goto L_Show_Color; + +L_Show_Color: + callfunc "SetTorchColor"; + misceffect 5; + mes "As your pour the powder into the flame you can see its tint transform to a " + @intensities$[@TorchIntensity] + " ##B" + @colors$[@TorchColor] + "##b."; + goto L_Color_Loop; + +L_WrongColor: + callfunc "SetTorchColor"; + @TorchIntensity = @TorchIntensity + 1; + if (@TorchIntensity > 2) + goto L_Failed; + callfunc "SetTorchIntensity"; + misceffect 5; + mes "As you pour the powder into the flame it flares violently for a moment and then turns into a " + @intensities$[@TorchIntensity] + " ##B" + @colors$[@TorchColor] + "##b."; + goto L_Color_Loop; + +L_Failed: + mes "As you pour the powder into the flame it flares violently before bursting into your face!"; + misceffect 5; + misceffect 16; + @TorchIntensity = 0; + callfunc "SetTorchIntensity"; + heal -Hp, 0; + close2; + return; +} + +009-4,68,21,0 script Torch#1 NPC400,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "DoneWithTorches"; + + @Torch = 0; + callfunc "TorchLoop"; + // unreachable + end; +} + +009-4,67,42,0 script Torch#2 NPC400,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "DoneWithTorches"; + + @Torch = 1; + callfunc "TorchLoop"; + // unreachable + end; +} + +009-4,33,86,0 script Torch#3 NPC400,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "DoneWithTorches"; + + @Torch = 2; + callfunc "TorchLoop"; + // unreachable + end; +} diff --git a/npc/009-4/waric.txt b/npc/009-4/waric.txt new file mode 100755 index 00000000..dee2787f --- /dev/null +++ b/npc/009-4/waric.txt @@ -0,0 +1,93 @@ + +009-4,99,33,0 script #WizardTrap NPC32767,2,1,{ + mes "As you explore further into the cave you see a figure looking at you who appears angry. But as you begin to speak, he quickly chants some words and you start to lose conciousness!"; + next; + warp "009-4", 117, 40; + mes "When you awake you find yourself unable to move. You seem to be held in place by something. As your eyes regain focus you see Orum talking with the figure you saw earlier. Orum looks over at you and mumbles."; + mes ""; + mes "[Orum]"; + mes "\"Be quiet Waric... They're awake...\""; + close; +} + +009-4,120,43,0 script Orum#trap NPC158,{ + mes "[Orum]"; + mes "\"I told you to forget about this place but you did not heed my advice!\""; + next; + mes "\"Your fate is up to Waric now... don't expect me to do anything else for you.\""; + close; +} + +009-4,118,42,0 script Waric#trap NPC153,{ + @Exp_LEARNED_ALOT = 10000; + if (OrumQuest >= 13) + goto L_Behave; + mes "Waric looks toward you rubbing his chin..."; + next; + mes "[Waric]"; + mes "\"So... Orum tells me your the one that helped him break me out of this dreadful place, so I guess I must thank you for that.\""; + menu + "My pleasure! Mind letting me out of here?", L_Explain, + "This doesn't look like a thank you!", L_Explain, + "Let me out of here at once!", L_Next; + +L_Next: + mes "Waric turns toward Orum."; + next; + mes "[Waric]"; + mes "\"We've got a feisty one here, Orum!\""; + next; + mes "They begin discussing plans of some sort..."; + OrumQuest = 13; + goto L_close; + +L_Behave: + mes "Waric looks toward you shaking his finger."; + next; + mes "[Waric]"; + mes "\"So... are you ready to behave yourself now?\""; + menu + "Yes mister...", L_Explain, + "Let me out here!", L_Next1; + +L_Next1: + mes "[Waric]"; + mes "\"Having fun I take it?\""; + next; + mes "They continue discussing their plans."; + goto L_close; + +L_Explain: + mes "[Waric]"; + mes "\"I'm not sure what Orum told you but I was not kidnapped and brought here. I was in fact imprisoned here very long ago by a witch for practicing spells on the insignificant forest life.\""; + next; + mes "\"She cared about the forest and all of that stuff you see. Now this cave is not bad... I actually enjoyed it the first nights, but after a few years...\""; + next; + mes "Waric gets a bitter look and his face and pauses for a moment."; + next; + mes "[Waric]"; + mes "\"So now you can see my motive to get out of here. The only air and water I get is what's given to me through that cave over there. And as for food... theres only so many recipes for cave snakes and silk worms.\""; + next; + mes "Waric shivers in disgust."; + next; + mes "[Waric]"; + mes "\"I'm sorry I had to constrain you like this but now that I'm free, I'm not about to let anyone stand in my way!\""; + next; + mes "\"Now if you'll excuse us, Orum and I have some things to attend to. And don't bother coming back to stop us because we'll be long gone.\""; + next; + mes "Waric raises his hands and begins chanting some words. You watch as streams of energy begin swirling around you."; + next; + mes "Once more you start to lose conciousness as your surroundings begin to fade..."; + next; + OrumQuest = 14; + misceffect 10; + warp "008-1", 65, 90; + getexp @Exp_LEARNED_ALOT, 0; + mes "You awake on your back with a squirrel sitting on top of you arranging it's acorns. It quickly gathers them up and runs off as it sees you looking at it them."; + monster "008-1", 65, 90, "Squirrel", 1038, 1; + goto L_close; + +L_close: + @Exp_LEARNED_ALOT = 0; + close; +} diff --git a/npc/009-5/_import.txt b/npc/009-5/_import.txt new file mode 100644 index 00000000..8caab9a6 --- /dev/null +++ b/npc/009-5/_import.txt @@ -0,0 +1,4 @@ +// Map 009-5: Last man standing +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-5/_warps.txt", +"npc/009-5/mapflags.txt", diff --git a/npc/009-5/_warps.txt b/npc/009-5/_warps.txt new file mode 100644 index 00000000..301533d9 --- /dev/null +++ b/npc/009-5/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-5: Last man standing warps +009-5,53,74,0 warp #009-5_53_74 2,0,009-3,162,81 diff --git a/npc/009-5/mapflags.txt b/npc/009-5/mapflags.txt new file mode 100755 index 00000000..c27c167e --- /dev/null +++ b/npc/009-5/mapflags.txt @@ -0,0 +1 @@ +009-5 mapflag nosave 009-3,162,82 diff --git a/npc/009-6/_import.txt b/npc/009-6/_import.txt new file mode 100644 index 00000000..42f5206e --- /dev/null +++ b/npc/009-6/_import.txt @@ -0,0 +1,5 @@ +// Map 009-6: Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-6/_warps.txt", +"npc/009-6/brodomir.txt", +"npc/009-6/mapflags.txt", diff --git a/npc/009-6/_warps.txt b/npc/009-6/_warps.txt new file mode 100644 index 00000000..b06192a0 --- /dev/null +++ b/npc/009-6/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-6: Cave warps +009-6,36,48,0 warp #009-6_36_48 0,0,009-3,162,82 diff --git a/npc/009-6/brodomir.txt b/npc/009-6/brodomir.txt new file mode 100755 index 00000000..6ced87cd --- /dev/null +++ b/npc/009-6/brodomir.txt @@ -0,0 +1,249 @@ + + + + +009-6,36,40,0 script Brodomir NPC116,{ + @brodomir_money = 0; + @brodomir_item_amount = 0; + @brodomir_item$ = ""; + + if ($@BRODOMIR_PVP_STATUS == 2) + goto L_AlreadyStarted; + if ($@BRODOMIR_PVP_STATUS == 1 && $@BRODOMIR_START_TIME > gettimetick(2)) + goto L_Wait; + mes "[Brodomir]"; + mes "\"Hi Warrior.\""; + mes "\"Do you know me? I'm pretty old and I have never been good with faces?\""; + menu + "Yes of course! Don't you remember me?", L_Shorttalk, + "No, who are you?", L_Longtalk, + "I don't want to know you!", L_close; + +L_Longtalk: + mes "[Brodomir]"; + mes "\"I'm Brodomir\""; + mes "Brodomir sighs."; + mes "\"Once I as well was a powerful warrior. It's been quite a while. But before that I was a miner in Tonori. I can still remember it very good. The Earth was shaking for hours and everything was torn apart. Many many of my friends and beloved ones were devoured by the crevasses which opened up. It was horrific and I am very lucky to have survived that.\""; + next; + mes "\"Then everything was pure chaos and I had to fight to survive. We had hardly anything to eat, therefore the strongest survived. I turned out to be a very good warrior. I fought hard. When I felt strong enough to defend others I created a school of martial arts. I took in the weak and tended to them and made them stronger.\""; + next; + mes "\"I trained them to fight with all weapons and how to fight bare handed. Taught them how to make their own weapons and what could be used as a weapon. Those were dark times. I'm happy that those times are over and you do not have to live through it.\""; + next; + mes "\"When my shelter was no longer required I started to wander around. Now I ended up here old and wrinkly. I'm only able to drive away those weak creatures who try to enter my home all the time. Slowly they learn to leave me alone or I'll squish them.\""; + next; + mes "\"I am sorry but I cannot teach you anything anymore. I am too old. But I am still quite good with my pickaxe and I made a cave where you can fight against your friends.\""; + mes "\"The only things you need is to sponsor some prize money and at least two of your friends. If you pay me I will give you about five minutes and after that I will bring you to the cave where you can fight. I will reward the winner. Do you want to give it a shot?\""; + goto L_Menu; + +L_Shorttalk: + mes "Well... I'm sorry I cannot remember. I'm old. I hope you can forgive me. Well then. Do you want to fight with your friends in my cave? All you need is to sponsor some prize money and at least two of your friends."; + goto L_Menu; + +L_Menu: + menu + "No.", L_Exit, + "Yes.", L_Pay, + "I'd like this item to be the prize.", L_Item; + +L_Exit: + mes "[Brodomir]"; + mes "\"Okay, you can come back anytime.\""; + goto L_close; + +L_Item: + mes "[Brodomir]"; + mes "\"Ok, which item?\""; + mes "Make sure to spell correctly and if the item name contains whitespaces, leave them out."; + input @brodomir_item$; + mes "[Brodomir]"; + mes "\"And how many?\""; + input @brodomir_item_amount; + if (@brodomir_item_amount < 1) + goto L_Fool; + mes "[Brodomir]"; + mes "\"So the prize should be " + @brodomir_item_amount + " " + @brodomir_item$ + "?\""; + mes "\"In case there aren't enough people to start the fight, I'll try to give it back to you. If you're not here then... well, then I'll keep it for myself.\""; + menu + "Ok.", L_Next, + "No, you missunderstood me.", L_Item, + "I changed my mind, forget it.", L_close; + +L_Next: + if ($@BRODOMIR_PVP_STATUS == 1) + goto L_Wait; + if (countitem(@brodomir_item$) < @brodomir_item_amount) + goto L_NoItem; + + // we need this loop because for items that can't be stacked, delitem can only delete a single one + @loopcounter = @brodomir_item_amount; + goto L_Delitem; + +L_Delitem: + delitem @brodomir_item$, 1; + @loopcounter = @loopcounter - 1; + if (@loopcounter > 0) + goto L_Delitem; + + $@BRODOMIR_SPONSOR = getcharid(3); + goto L_Go; + +L_NoItem: + mes "[Brodomir]"; + mes "\"Hey, you don't have " + @brodomir_item_amount + " " + @brodomir_item$ + "!\""; + goto L_close; + +L_Fool: + mes "[Brodomir]"; + mes "\"Are you trying to fool me? Come back when you're more serious.\""; + goto L_close; + +L_Pay: + mes "[Brodomir]"; + mes "\"How much money do you want to sponsor as prize? It should be at least 5000GP.\""; + input @brodomir_money; + if (@brodomir_money < 5000) + goto L_TooCheap; + if ($@BRODOMIR_PVP_STATUS == 1) + goto L_Wait; + if (Zeny < @brodomir_money) + goto L_NotEnoughMoney; + Zeny = Zeny - @brodomir_money; + goto L_Go; + +L_Go: + $@BRODOMIR_ITEM$ = @brodomir_item$; + $@BRODOMIR_ITEM_AMOUNT = @brodomir_item_amount; + $@BRODOMIR_MONEY = @brodomir_money; + $@brodomir_delay_seconds = 600; + $@BRODOMIR_START_TIME = gettimetick(2) + $@brodomir_delay_seconds; + $@BRODOMIR_PVP_STATUS = 1; + announce "Brodomir : In "+$@brodomir_delay_seconds/60+" minutes, I will start a PvP tournament, if at least 3 fighters are present. Make your way in Hurnscald Underground Caves!", 0; + if ($@BRODOMIR_ITEM_AMOUNT > 0) + announce "Brodomir : The winner will receive 150GP per fighter and " + $@BRODOMIR_ITEM_AMOUNT + " " + $@BRODOMIR_ITEM$ + ".", 0; + if ($@BRODOMIR_MONEY > 0) + announce "Brodomir : The winner will receive " + $@BRODOMIR_MONEY + "GP and additionally 150GP per fighter.", 0; + mes "[Brodomir]"; + mes "\"In "+$@brodomir_delay_seconds/60+" minutes I will bring you all to the PvP cave. If there are less than 3 players here the event will not start and your money will be lost.\""; + $@brodomir_delay_seconds = 0; + initnpctimer; + goto L_close; + +L_Wait: + @seconds = $@BRODOMIR_START_TIME - gettimetick(2); + callfunc "HumanTime"; + mes "[Brodomir]"; + mes "\"Just a little longer. I will bring you there in " + @time$ + ".\""; + goto L_close; + +OnTimer5000: + setnpctimer 0; + if ($@BRODOMIR_PVP_STATUS > 1) + goto L_Check; + if (gettimetick(2) >= $@BRODOMIR_START_TIME) + goto L_Warp; + end; + +L_Warp: + if (getareausers("009-6", 20, 20, 80, 80, 1) < 3) + goto L_Warpfail; + $@BRODOMIR_PVP_STATUS = $@BRODOMIR_PVP_STATUS + 1; + $@BRODOMIR_PLAYERS = getareausers("009-6", 20, 20, 80, 80, 1); + mapwarp "009-6", "009-5", 0, 0; + mapannounce "009-5", "Brodomir : PvP On!", 0; + pvpon "009-5"; + end; + +L_Warpfail: + mapannounce "009-6", "Brodomir : There are not enough players around to start!", 0; + if ($@BRODOMIR_ITEM_AMOUNT == 0 || $@BRODOMIR_ITEM$ == "") + goto L_CleanUp; + if (attachrid($@BRODOMIR_SPONSOR) == 0) + goto L_SkipItemback; + // we need this loop because for items that can't be stacked, getitem will stack them nevertheless + goto L_GetitemLoop; + +L_GetitemLoop: + getitem $@BRODOMIR_ITEM$, 1; + $@BRODOMIR_ITEM_AMOUNT = $@BRODOMIR_ITEM_AMOUNT - 1; + if ($@BRODOMIR_ITEM_AMOUNT > 0) + goto L_GetitemLoop; + goto L_SkipItemback; + +L_SkipItemback: + $@BRODOMIR_ITEM_AMOUNT = 0; + $@BRODOMIR_ITEM$ = ""; + $@BRODOMIR_SPONSOR = 0; + goto L_CleanUp; + +L_Check: + if (getareausers("009-5", 20, 20, 80, 80, 1) > 1) + end; + areatimer 0, "009-5", 20, 20, 80, 80, 0, "Brodomir::OnReward"; + goto L_End; + +OnReward: + if (ispcdead()) + goto L_Dead; + message strcharinfo(0), "Congratulations you won!"; + Zeny = Zeny + ($@BRODOMIR_MONEY + 150 * $@BRODOMIR_PLAYERS); + if ($@BRODOMIR_ITEM_AMOUNT == 0 || $@BRODOMIR_ITEM$ == "") + goto L_SkipItem; + // we need this loop because for items that can't be stacked, getitem will stack them nevertheless + goto L_Getitem; + +L_Getitem: + getitem $@BRODOMIR_ITEM$, 1; + $@BRODOMIR_ITEM_AMOUNT = $@BRODOMIR_ITEM_AMOUNT - 1; + if ($@BRODOMIR_ITEM_AMOUNT > 0) + goto L_Getitem; + goto L_SkipItem; + +L_SkipItem: + $@BRODOMIR_ITEM$ = ""; + $@BRODOMIR_SPONSOR = 0; + $@BRODOMIR_MONEY = 0; + $@BRODOMIR_PLAYERS = 0; + end; + +L_Dead_Duels: + DUELS = DUELS &~ $@DuelPvpBit; + warp "009-7", 39, 37; + end; + +L_Dead: + if(DUELS & $@DuelPvpBit) goto L_Dead_Duels; + warp "009-3", 155,83; + end; + +L_End: + mapwarp "009-5", "009-6", 36, 42; + goto L_CleanUp; + +L_AlreadyStarted: + mes "[Brodomir]"; + mes "\"Please wait until the cave is clear again.\""; + goto L_close; + +L_NotEnoughMoney: + mes "[Brodomir]"; + mes "\"You don't have enough money.\""; + goto L_close; + +L_TooCheap: + mes "[Brodomir]"; + mes "\"That's too cheap as a prize.\""; + goto L_close; + +L_CleanUp: + pvpoff "009-5"; + $@BRODOMIR_PVP_STATUS = 0; + $@BRODOMIR_START_TIME = 0; + stopnpctimer; + end; + +L_close: + @brodomir_money = 0; + @brodomir_item_amount = 0; + @brodomir_item$ = ""; + close; +} diff --git a/npc/009-6/mapflags.txt b/npc/009-6/mapflags.txt new file mode 100755 index 00000000..9b247c8c --- /dev/null +++ b/npc/009-6/mapflags.txt @@ -0,0 +1 @@ +009-6 mapflag nosave 009-3,162,82 diff --git a/npc/009-7/_import.txt b/npc/009-7/_import.txt new file mode 100644 index 00000000..4b4202c9 --- /dev/null +++ b/npc/009-7/_import.txt @@ -0,0 +1,11 @@ +// Map 009-7: The Sanguine Vault +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-7/_warps.txt", +"npc/009-7/battlemaster.txt", +"npc/009-7/core.txt", +"npc/009-7/debug.txt", +"npc/009-7/eventHandler.txt", +"npc/009-7/mapflags.txt", +"npc/009-7/rouge.txt", +"npc/009-7/shops.txt", +"npc/009-7/trapdoor.txt", diff --git a/npc/009-7/_warps.txt b/npc/009-7/_warps.txt new file mode 100644 index 00000000..bdb3f37b --- /dev/null +++ b/npc/009-7/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-7: The Sanguine Vault warps +009-7,21,19,0 warp #009-7_21_19 0,0,009-2,38,104 diff --git a/npc/009-7/battlemaster.txt b/npc/009-7/battlemaster.txt new file mode 100755 index 00000000..d6e43559 --- /dev/null +++ b/npc/009-7/battlemaster.txt @@ -0,0 +1,83 @@ +009-7,40,35,0 script Battle Master#Duels NPC322,{ + if($SANGUINE & $@SV_BMDBit != 0) goto L_Disabled; + mes "[Battle Master]"; + mes "\"Hey, you seem tough enough! Would you like to prove your skills?\""; + next; + menu + "PvP Cave (50gp)", L_Pvp, + "Last Man Standing (150gp)", L_Brodomir, + "Nevermind.", L_Next; + +L_Disabled: + mes "[Battle Master]"; + mes "I am busy, come back later."; + close; + +L_Next: + mes "[Battle Master]"; + mes "\"Ha ha, coward.\""; + close; + +L_Brodomir: + if (Zeny < 150) goto L_NoMoney; + Zeny = Zeny - 150; + mes "[Battle Master]"; + mes "\"Get ready!\""; + close2; + set DUELS, DUELS | $@DuelPvpBit; // tell the arena to send the player back here when he exits + warp "009-6", 33, 37; + savepoint "009-7", 39, 37; + end; + +L_Pvp: + if (Zeny < 50) goto L_NoMoney; + Zeny = Zeny - 50; + mes "[Battle Master]"; + mes "\"Get ready!\""; + close2; + set DUELS, DUELS | $@DuelPvpBit; // tell the arena to send the player back here when he dies + warp "001-3", 0, 0; + savepoint "009-7", 39, 37; + end; + +L_NoMoney: + mes "\"Wait a second, you don't have enough money.\""; + close; +} + + + +function script fightclub_GoBack { + @Duel_PVP = DUELS & $@DuelPvpBit; + if(@Duel_PVP != 0) goto L_GoBack; + return; + +L_GoBack: + DUELS = DUELS &~ $@DuelPvpBit; + warp "009-7", 39, 37; + heal MaxHp, MaxSp; + message strcharinfo(0), "Thank you for participating!"; + return; +} +009-6,36,48,0 script #GoBack2Duels NPC32767,0,1,{ + callfunc "fightclub_GoBack"; + end; +} +009-5,53,74,0 script #GoBack3Duels NPC32767,3,1,{ + callfunc "fightclub_GoBack"; + end; +} +009-3,158,83,0 script #GoBack5Duels NPC32767,7,0,{ + callfunc "fightclub_GoBack"; + end; +} + + +001-2,130,22,0 script #GoBack4Duels NPC32767,1,1,{ + callfunc "fightclub_GoBack"; + end; +} +001-3,73,28,0 script #GoBack1Duels NPC32767,0,1,{ + callfunc "fightclub_GoBack"; + end; +} diff --git a/npc/009-7/core.txt b/npc/009-7/core.txt new file mode 100755 index 00000000..921cd26e --- /dev/null +++ b/npc/009-7/core.txt @@ -0,0 +1,457 @@ + +function script fightclub_sendrequest { + goto L_try; + +L_try: + @loop = 0; + goto L_Loop; + +L_Loop: + if(@Duel_Queue$[@loop] == @caster_name$) goto L_Exists; + if((@Duel_Queue$[@loop] == "") && (@Duel_Queue$[(@loop + 1)] == "")) goto L_Proceed; + if((@Duel_Queue$[@loop] == "") && (@Duel_Queue$[(@loop + 1)] != "")) goto L_ShiftQueue; + @loop = (@loop + 1); + if(@loop >= getarraysize(@Duel_Queue)) goto L_Full; // this shouldn't happen since we check in magic but we still handle it + goto L_Loop; + +L_ShiftQueue: + @Duel_Queue$[@loop] = @Duel_Queue$[(@loop + 1)]; + @Duel_Queue[@loop] = @Duel_Queue[(@loop + 1)]; + @Duel_Queue$[(@loop + 1)] = ""; + @Duel_Queue[(@loop + 1)] = 0; + @loop = (@loop + 1); + if(@loop >= getarraysize(@Duel_Queue)) goto L_try; + goto L_ShiftQueue; + +L_Full: + message @caster_name$, "There is already "+ $@Duel_PlayerQueueLimit +" duel request(s) in the queue of this player, which is the maximum."; + return; + +L_Exists: + message @caster_name$, "You already requested a duel with this player."; + return; + +L_Proceed: + misceffect FX_MAGIC_DARKRED, @caster_name$; + message @caster_name$, "Your request has been sent."; + @Duel_Queue$[@loop] = @caster_name$; + @Duel_Queue[@loop] = gettimetick(2); + if(@Duel_Fighter == 0) message strcharinfo(0), "You have received a new duel request. Talk to Rouge to accept or decline."; + if(@Duel_Fighter == 0) misceffect FX_MAGIC_DARKRED, strcharinfo(0); + if(@Duel_Fighter == 1) set @Duel_HasPendingRequest, 1; + return; +} + +function script fightclub_getrules { + $@fightclub_myself = getcharid(3); + if(@target < 1) goto L_Proceed; // get our own rules + if(attachrid(@target) == 1) goto L_Proceed; + goto L_Missing; + +L_Proceed: + $@Temp_NoMagic = (DUELS & $@NoMagicBit); + if($@fightclub_myself == getcharid(3)) goto L_Proceed2; // the target is ourselves + if(attachrid($@fightclub_myself) == 1) goto L_Proceed2; + goto L_Missing; + +L_Missing: + return; + +L_Proceed2: + $@fightclub_myself = 0; + @target = 0; + if($@Temp_NoMagic == 0) + mes "(no rules)"; + if($@Temp_NoMagic != 0) mes "- No Magic"; + set $@Temp_NoMagic, 0; // now we clean these vars ASAP because they're globals + return; +} + +function script fightclub_AddToQueue { + @ATQ_Loop = 0; + goto L_Loop; + +L_Loop: + if(($@Duel_Queue_Blue$[@ATQ_Loop] == @caster_name$) && ($@Duel_Queue_Red$[@ATQ_Loop] == @target_name$)) goto L_Exists; + if(($@Duel_Queue_Red$[@ATQ_Loop] == @caster_name$) && ($@Duel_Queue_Blue$[@ATQ_Loop] == @target_name$)) goto L_Exists; + @ATQ_Loop = (@ATQ_Loop + 1); + if(@ATQ_Loop >= getarraysize($@Duel_Queue_ID)) goto L_Proceed2; + goto L_Loop; + +L_Exists: + mes "This battle is already in the queue."; + return; + +L_Full: + mes "There is already " + $@Duel_QueueLimit + " battles in the queue, which is the maximum. Please try again later."; + return; + +L_Proceed2: + if(getarraysize($@Duel_Queue_ID) >= ($@Duel_QueueLimit + 1)) goto L_Full; + @index = getarraysize($@Duel_Queue_ID); + if(@index >= 1) goto L_Proceed22; + @index = 1; + goto L_Proceed22; + +L_Proceed22: + if($@Duel_Queue_Red$[@index] != "") goto L_NotClean; + $@Duel_Queue_Red$[@index] = @caster_name$; + if($@Duel_Queue_Blue$[@index] != "") goto L_NotClean; + $@Duel_Queue_Blue$[@index] = @target_name$; + if($@Duel_Queue_ID[@index] != 0) goto L_NotClean; + $@Duel_Queue_ID[@index] = ($@Duel_Queue_ID[(@index - 1)] + 1); + if($@Duel_Queue_ID[@index] <= $Duel_LastDuel) goto L_FixId; + return; + +L_NotClean: + message @caster_name$, "An error occured: array element not empty. Try again in 5 seconds."; + return; + +L_FixId: + $@Duel_Queue_ID[@index] = ($Duel_LastDuel + 1); + return; +} + +function script fightclub_NextBattle { + set $@Duel_Queue_Blue$[0], ""; // clean the 0 index + $@Duel_Queue_Red$[0] = ""; + $@Duel_Queue_ID[0] = 0; + set $@Duel_Loop, 1; // start the loop at 1 + goto L_Loop; + +L_Loop: // here we shift the array to the left + if($@Duel_Queue_ID[$@Duel_Loop] < 1) goto L_Empty; + $@Duel_Queue_Red$[($@Duel_Loop - 1)] = $@Duel_Queue_Red$[$@Duel_Loop]; + set $@Duel_Queue_Red$[$@Duel_Loop], ""; // it is always important to clean + $@Duel_Queue_Blue$[($@Duel_Loop - 1)] = $@Duel_Queue_Blue$[$@Duel_Loop]; + $@Duel_Queue_Blue$[$@Duel_Loop] = ""; + $@Duel_Queue_ID[($@Duel_Loop - 1)] = $@Duel_Queue_ID[$@Duel_Loop]; + $@Duel_Queue_ID[$@Duel_Loop] = 0; + $@Duel_Loop = ($@Duel_Loop + 1); + if($@Duel_Loop >= getarraysize($@Duel_Queue_ID)) goto L_Proceed; + goto L_Loop; + +L_Empty: + // the queue is now empty + return; + +L_Proceed: + callfunc "fightclub_CleanStage"; + set $@Duel_CurrentDuel, $@Duel_Queue_ID[0]; // since the array is shifted, the index is always 0 + set $Duel_LastDuel, $@Duel_Queue_ID[0]; // this is used to keep the same index across reboots + $@Duel_BluePlayer = getcharid(3,$@Duel_Queue_Blue$[0]); + $@Duel_RedPlayer = getcharid(3,$@Duel_Queue_Red$[0]); + if(attachrid($@Duel_BluePlayer) != 1) goto L_Missing; + if(attachrid($@Duel_RedPlayer) == 1) goto L_Proceed2; + goto L_Missing; + +L_Missing: + callfunc "fightclub_CleanStage"; + callfunc "fightclub_NextBattle"; + return; + +L_Proceed2: + addtimer ($@Duel_TimeBeforeNext * 1000), "#FightClubUtils::OnDelayedNextBattle"; + return; +} + +function script fightclub_NextBattleProceed { + $@Duel_NoMagic = 0; + if((DUELS & $@NoMagicBit) != 0) set $@Duel_NoMagic, 1; // get the rules of the caster + donpcevent "Rouge#Duels::OnAnnounceNext"; + $@Duel_Started = 0; + addtimer ($@Duel_TimeBeforeWarp * 1000), "#FightClubUtils::OnDelayedStart"; + return; +} + +function script fightclub_StartBattle { + $@Duel_Started = 1; + npcwarp 40, 45, "Rouge#Duels"; + donpcevent "#FightClubTimeLimit::OnStartTimer"; + if(attachrid($@Duel_RedPlayer) != 1) goto L_Missing; + callfunc "fightclub_enter"; + if(attachrid($@Duel_BluePlayer) != 1) goto L_Missing; + callfunc "fightclub_enter"; + return; + +L_Missing: + callfunc "fightclub_CleanStage"; + callfunc "fightclub_NextBattle"; + return; +} + +function script fightclub_TimeOut { + donpcevent "Rouge#Duels::OnAnnounceTimeOut"; + if(attachrid($@Duel_RedPlayer) != 1) goto L_Missing; + callfunc "fightclub_exit"; + if(attachrid($@Duel_BluePlayer) != 1) goto L_Missing; + callfunc "fightclub_exit"; + callfunc "fightclub_CleanStage"; + callfunc "fightclub_NextBattle"; + return; + +L_Missing: + callfunc "fightclub_CleanStage"; + callfunc "fightclub_NextBattle"; + return; +} + +function script fightclub_Intrusion { + // nothing to do here (yet) + return; +} + +function script fightclub_EmergencyWipe { + callfunc "fightclub_CleanStage"; + callfunc "fightclub_StartUp"; + // TODO: check if everything is clean (function) and mapexit otherwise + return; +} + +function script fightclub_Victory { + // TODO: give some sort of reward + // TODO: increase score + // TODO: update leaderboard + return; +} + +function script fightclub_DestroyMe { + @Duel_Fighter = 0; + setpvpchannel @previous_channel; + sc_end 132; sc_end 14; sc_end 37; sc_end 185; sc_end 194; sc_end 195; sc_end 196; sc_end 197; sc_end 198; sc_end 199; // remove effects + heal MaxHp, MaxSp; // refill hp/mana + if(getmapname() == "009-7") warp "009-7", rand($@fightclub_x1, $@fightclub_x2), rand(($@fightclub_y1 - 2), ($@fightclub_y1 - 3)); + return; +} + +function script fightclub_Missing { + // $@Duel_Missing 1 = red, 2 = blue + if (attachrid($@Duel_BluePlayer) == 1) goto L_Proceed; // we need to attach to at least one player + if (attachrid($@Duel_RedPlayer) == 1) goto L_Proceed; + goto L_Resume; // can't attach either of them (this is not a problem since it means they are offline so their vars are clean anyway) + +L_Proceed: + if($@Duel_Missing == 1) goto L_BlueWins; + goto L_RedWins; + +L_BlueWins: + donpcevent "Rouge#Duels::OnAnnounceBlueForfeit"; + $@duel_winner = $@Duel_BluePlayer; + callfunc "fightclub_Victory"; + goto L_Clean; + +L_RedWins: + donpcevent "Rouge#Duels::OnAnnounceRedForfeit"; + $@duel_winner = $@Duel_RedPlayer; + callfunc "fightclub_Victory"; + goto L_Clean; + +L_KillBlue: + callfunc "fightclub_exit"; + if(attachrid($@Duel_RedPlayer) == 1) goto L_KillRed; + goto L_Resume; + +L_KillRed: + callfunc "fightclub_exit"; + goto L_Resume; + +L_Clean: + if(attachrid($@Duel_BluePlayer) == 1) goto L_KillBlue; + if(attachrid($@Duel_RedPlayer) == 1) goto L_KillRed; + goto L_Resume; // couldn't kill them + +L_Resume: + callfunc "fightclub_CleanStage"; + callfunc "fightclub_NextBattle"; + return; +} + +function script fightclub_StartUp { + if($@Duel_TimeBeforeNext < 1) set $@Duel_TimeBeforeNext, 5; // init the (temporary) TimeBeforeNext global + if($@Duel_TimeBeforeWarp < 1) set $@Duel_TimeBeforeWarp, 5; // init the (temporary) TimeBeforeWarp global + if($@Duel_TimeBeforeStart < 1) set $@Duel_TimeBeforeStart, 3; // init the (temporary) TimeBeforeStart global + if($@Duel_TimeLimit < 1) set $@Duel_TimeLimit, 120; // init the (temporary) TimeLimit global + if($@Duel_QueueLimit < 1) set $@Duel_QueueLimit, 5; // init the (temporary) QueueLimit global + if($@Duel_PlayerQueueLimit < 1) set $@Duel_PlayerQueueLimit, 2; // init the (temporary) PlayerQueueLimit global + if($@Duel_PlayerQueueTimeOut < 1) set $@Duel_PlayerQueueTimeOut, 300; // init the (temporary) PlayerQueueTimeOut global + setarray $@Duel_Queue_ID, 0; + cleararray $@Duel_Queue_ID, 0, ($@Duel_QueueLimit + 1); + setarray $@Duel_Queue_Blue$, ""; + cleararray $@Duel_Queue_Blue$, "", ($@Duel_QueueLimit + 1); + setarray $@Duel_Queue_Red$, ""; + cleararray $@Duel_Queue_Red$, "", ($@Duel_QueueLimit + 1); + $@Duel_TotalTime = 0; + $@Duel_Channel = 20; + if($fightclub_enabled) set $fightclub_enabled, 0; // this var moved to $SANGUINE + // DUELS flags below + $@DuelPvpBit = (1 << 1); + $@NoMagicBit = (1 << 2); + // $SANGUINE flags below + $@SV_FCDBit = (1 << 1); + $@SV_BMDBit = (1 << 2); + return; +} + +function script fightclub_CleanStage { + if($@Duel_NoWarp != 1) areawarp "009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, "009-7", 31, 40; // kick all players from stage + $@Duel_NoWarp = 0; + set $@Duel_NoMagic, 0; // clean the Duel parameters + set $@Duel_CurrentDuel, 0; // no duel atm + set $@Duel_Started, 0; // no duel atm + $@Duel_RedPlayer = 0; + $@Duel_BluePlayer = 0; + $@Duel_Missing = 0; + $@Duel_TotalTime = 0; + npcwarp 32, 45, "Rouge#Duels"; + donpcevent "#FightClubTimeLimit::OnStopTimer"; + killmonster "009-7", "All"; + return; +} + +function script fightclub_setrules { + goto L_Main; + +L_Main: + mes "Your rules are the following: "; mes ""; + callfunc "fightclub_getrules"; + mes ""; mes "What do you want to do?"; + menu + "Change my rules.", L_Start, + "Nevermind.", L_Return; + +L_Start: + DUELS = DUELS | $@NoMagicBit; + goto L_NoMagic; + +L_NoMagic: + mes "Do you want to allow magic?"; + mes "If disabled, the fighters will not be able to use any kind of spell."; + menu + "Yes.", L_NoMagicYes, + "No.", L_Done; +L_NoMagicYes: + DUELS = DUELS &~ $@NoMagicBit; + goto L_Done; + +L_Done: + next; + mes "You have succesfully changed your options."; + goto L_Main; + +L_Return: + return; +} + +function script fightclub_death { + if(@Duel_Fighter != 1) goto L_NoDuel; + if(($@Duel_CurrentDuel < 1) || ($@Duel_Started != 1)) goto L_Reset; + if(@killerrid != 0) goto L_Murdered; + goto L_Killed; + +L_Killed: + if(getcharid(3) == $@Duel_RedPlayer) goto L_BlueWins; + goto L_RedWins; + +L_RedWins: + donpcevent "Rouge#Duels::OnAnnounceRedWins"; + $@duel_winner = $@Duel_RedPlayer; + callfunc "fightclub_Victory"; + callfunc "fightclub_exit"; + if(attachrid($@Duel_RedPlayer) == 1) goto L_RedWins2; + goto L_Missing; + +L_RedWins2: + callfunc "fightclub_exit"; + goto L_Proceed; + +L_BlueWins: + donpcevent "Rouge#Duels::OnAnnounceBlueWins"; + $@duel_winner = $@Duel_BluePlayer; + callfunc "fightclub_Victory"; + callfunc "fightclub_exit"; + if(attachrid($@Duel_BluePlayer) == 1) goto L_BlueWins2; + goto L_Missing; + +L_Missing: + goto L_Proceed; + +L_BlueWins2: + callfunc "fightclub_exit"; + goto L_Proceed; + +L_Proceed: + callfunc "fightclub_CleanStage"; + return; + +L_Murdered: + if(($@Duel_RedPlayer != @killerrid) && ($@Duel_BluePlayer != @killerrid)) goto L_Stranger; + goto L_Killed; // now we proceed the same way as L_Killed + +L_Stranger: + // the victim was not murdered by its adversary (wtf) + if(debug) donpcevent "Debug#Duels::OnKillerNotInDuel"; + callfunc "fightclub_EmergencyWipe"; + return; + +L_NoDuel: + if(debug) donpcevent "Debug#Duels::OnVictimNotInDuel"; + return; + +L_Reset: // the player has duel_fighter but no duel is ongoing (happens if the player quit before fightclub_exit can be called) + if(debug) donpcevent "Debug#Duels::OnVictimInDuelNoDuel"; + callfunc "fightclub_DestroyMe"; // here we attempt to resume the interrupted procedure + return; +} + +function script fightclub_enter { + @Duel_Fighter = 1; + warp "009-7", rand($@fightclub_x1,$@fightclub_x2), rand($@fightclub_y1,$@fightclub_y2); + heal MaxHp, MaxSp; // ensure that you can't duel wih a corpse + sc_end 132; sc_end 14; sc_end 37; sc_end 185; sc_end 194; sc_end 195; sc_end 196; sc_end 197; sc_end 198; sc_end 199; // remove effects + message strcharinfo(0), "Get Ready."; + addtimer ($@Duel_TimeBeforeStart * 1000), "#FightClubUtils::OnBecomeKiller"; // call fightclub_enter_killer in 3 seconds + return; +} + +function script fightclub_enter_killer { + if(getpvpflag(0) != $@Duel_Channel) set @previous_channel, getpvpflag(0); + setpvpchannel $@Duel_Channel; + message strcharinfo(0), "GO !"; + return; +} + +function script fightclub_exit { + callfunc "fightclub_DestroyMe"; // kill and reset state + message strcharinfo(0), "Thank you for participating in the fight club!"; + if(@Duel_HasPendingRequest) message strcharinfo(0), "You have received a new duel request."; + return; +} + + + +function script fightclub_event_killed { + @duel_killer = 0; + if(@Duel_Fighter != 1) goto L_End; + if(getmapname() != "009-7") goto L_End; + set $@duel_loser, getcharid(3); // grab the rid of the victim + set $@duel_winner, @killerrid; // grab the rid of the killer + set @killerrid, 0; // reset killerid + callfunc "fightclub_death"; + goto L_End; +L_End: + if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel; + return; +} + +function script fightclub_event_die { + @duel_killer = 0; + if(@Duel_Fighter != 1) goto L_End; + if(getmapname() != "009-7") goto L_End; + set @killerrid, 0; // since the player was not murdered, the killerrid is 0 + set $@duel_loser, getcharid(3); // grab the rid of the victim + callfunc "fightclub_death"; + goto L_End; +L_End: + if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel; + return; +} diff --git a/npc/009-7/debug.txt b/npc/009-7/debug.txt new file mode 100755 index 00000000..974de4d4 --- /dev/null +++ b/npc/009-7/debug.txt @@ -0,0 +1,164 @@ +function script fightclub_Debug { + goto L_Menu; + +L_Menu: + next; + set @bme,0; if($SANGUINE & $@SV_BMDBit == 0) set @bme,1; + set @due,0; if($SANGUINE & $@SV_FCDBit == 0) set @due,1; + mes "---"; + mes "##3$##0Duel_Enabled: ##7" + @due; + mes "##3$##0fightclub_bm_enabled: ##7" + @bme; + mes "##3$##2@##0Duel_TimeBeforeNext: ##7" + $@Duel_TimeBeforeNext; + mes "##3$##2@##0Duel_TimeBeforeWarp: ##7" + $@Duel_TimeBeforeWarp; + mes "##3$##2@##0Duel_TimeBeforeStart: ##7" + $@Duel_TimeBeforeStart; + mes "##3$##2@##0Duel_TimeLimit: ##7" + $@Duel_TimeLimit; + mes "##3$##2@##0Duel_QueueLimit: ##7" + $@Duel_QueueLimit; + mes "##3$##2@##0Duel_PlayerQueueLimit: ##7" + $@Duel_PlayerQueueLimit; + mes "##3$##2@##0Duel_PlayerQueueTimeOut: ##7" + $@Duel_PlayerQueueTimeOut; + mes "##3$##0Duel_LastDuel: ##7" + $Duel_LastDuel + "##0"; + mes "---"; + mes "##2@##0Duel_Fighter: ##7" + @Duel_Fighter + "##0"; + mes "pvp channel: ##7" + getpvpflag(0) + "##0"; + next; + menu + "toggle|Toggle $Duel_Enabled", L_DuelEnabled, + "toggle|Toggle $fightclub_bm_enabled", L_BmEnabled, + "edit|Set $@Duel_TimeBeforeNext", L_TimeBeforeNext, + "edit|Set $@Duel_TimeBeforeWarp", L_TimeBeforeWarp, + "edit|Set $@Duel_TimeBeforeStart", L_TimeBeforeStart, + "edit|Set $@Duel_TimeLimit", L_TimeLimit, + "edit|Set $@Duel_QueueLimit", L_QueueLimit, + "edit|Set $@Duel_PlayerQueueLimit", L_PlayerQueueLimit, + "edit|Set $@Duel_PlayerQueueTimeOut", L_PlayerQueueTimeOut, + "edit|Set $Duel_LastDuel", L_LastDuel, + "edit|Set pvp channel", L_Channel, + "toggle|Toggle @Duel_Fighter", L_DuelFighter, + "restart|Restart fightclub.", L_Restart, + "quit|Nevermind.", L_End; + +L_DuelEnabled: + if(@due < 1) goto L_DuelEnabled2; + $SANGUINE = $SANGUINE | $@SV_FCDBit; + goto L_Menu; +L_DuelEnabled2: + $SANGUINE = $SANGUINE &~ $@SV_FCDBit; + goto L_Restart; + +L_BmEnabled: + if(@bme < 1) goto L_BmEnabled2; + $SANGUINE = $SANGUINE | $@SV_BMDBit; + goto L_Menu; +L_BmEnabled2: + $SANGUINE = $SANGUINE &~ $@SV_BMDBit; + goto L_Menu; + +L_DuelFighter: + if(@Duel_Fighter < 1) goto L_DuelFighter2; + @Duel_Fighter = 0; + goto L_Menu; +L_DuelFighter2: + @Duel_Fighter = 1; + goto L_Menu; + +L_TimeBeforeNext: + mes "range: 1~600"; + input @time; + if((@time < 1) || (@time > 600)) goto L_OutOfRange; + $@Duel_TimeBeforeNext = @time; + goto L_Menu; + +L_TimeBeforeWarp: + mes "range: 1~600"; + input @time; + if((@time < 1) || (@time > 600)) goto L_OutOfRange; + $@Duel_TimeBeforeWarp = @time; + goto L_Menu; + +L_TimeBeforeStart: + mes "range: 1~600"; + input @time; + if((@time < 1) || (@time > 600)) goto L_OutOfRange; + $@Duel_TimeBeforeStart = @time; + goto L_Menu; + +L_TimeLimit: + mes "range: 1~900"; + input @time; + if((@time < 1) || (@time > 900)) goto L_OutOfRange; + $@Duel_TimeLimit = @time; + goto L_Menu; + +L_QueueLimit: + mes "range: 1~20"; + input @limit; + if((@limit < 1) || (@limit > 20)) goto L_OutOfRange; + $@Duel_QueueLimit = @limit; + goto L_Menu; + +L_PlayerQueueLimit: + mes "range: 1~5"; + input @limit; + if((@limit < 1) || (@limit > 5)) goto L_OutOfRange; + $@Duel_PlayerQueueLimit = @limit; + goto L_Menu; + +L_PlayerQueueTimeOut: + mes "range: 30~600"; + input @limit; + if((@limit < 30) || (@limit > 600)) goto L_OutOfRange; + $@Duel_PlayerQueueTimeOut = @limit; + goto L_Menu; + +L_LastDuel: + mes "range: 1+"; + mes "[R] This will trigger a reboot"; + input @last; + if(@last < 1) goto L_OutOfRange; + $Duel_LastDuel = @last; + next; + goto L_Restart; + +L_Channel: + mes "range: 0~32767"; + input @chn; + if(@last > 32767) goto L_OutOfRange; + setpvpchannel @chn; + goto L_Menu; + +L_OutOfRange: + mes "Value out of range or empty."; + goto L_Menu; + +L_Restart: + callfunc "fightclub_EmergencyWipe"; + donpcevent "#FightClubHandler::OnTimer2000"; // this re-starts the main timer if it was stopped + mes "The temporary variables have been reset."; + goto L_Menu; + +L_End: + return; +} + +009-7,41,45,0 script Debug#Duels NPC181,{ + mes "The debug menu can also be accessed by wearing a dev cap while talking to Rouge."; + mes "For the documentation, @@https://wiki.themanaworld.org/index.php/User:Meko/FightClub/debug|click here@@##0"; + callfunc "fightclub_Debug"; + end; + +OnInit: + if(!debug) disablenpc "Debug#Duels"; + end; + + // debug messages below +OnKillerNotInDuel: + npctalk strnpcinfo(0), "WARNING: The victim was not killed by its adversary. Aborting duel..."; + end; + +OnVictimNotInDuel: + npctalk strnpcinfo(0), "WARNING: The victim is not part of the duel"; + end; + +OnVictimInDuelNoDuel: + npctalk strnpcinfo(0), "WARNING: The victim is part of the duel but no duel is ongoing at the moment."; + end; +} diff --git a/npc/009-7/eventHandler.txt b/npc/009-7/eventHandler.txt new file mode 100755 index 00000000..3f2df68a --- /dev/null +++ b/npc/009-7/eventHandler.txt @@ -0,0 +1,132 @@ + +009-7,45,33,0 script #trapdoor2FightClub NPC327,0,0,{ + if(countitem(647)||countitem(725)||countitem(1178)||countitem(5131)||countitem(5132)||countitem(5133)||countitem(5134)||countitem(5135)||countitem(5136)||countitem(5137)||countitem(5138)||countitem(5139)||countitem(5140)||(getgmlevel()>=20)) goto L_Enter; + end; + +L_Enter: + warp "009-7",34,22; // this warp is a special thanks for contributors + end; +} +009-7,33,21,0 script #trapdoor3FightClub NPC327,0,0,{ + warp "009-7",44,32; + end; +} + +009-7,22,38,0 script #FightClubUtils NPC32767,{ + end; + +OnIntrusion: + if(getgmlevel() >= 60) end; // allow GMs to be in the ring + if(getcharid(3) == $@Duel_RedPlayer) end; // do not kill the red fighter + if(getcharid(3) == $@Duel_BluePlayer) end; // do not kill the blue fighter + donpcevent "Rouge#Duels::OnAnnounceIntrusion"; + callfunc "fightclub_DestroyMe"; // only kill the intruder(s) + end; + +OnDelayedStart: + callfunc "fightclub_StartBattle"; + end; + +OnDelayedNextBattle: + callfunc "fightclub_NextBattleProceed"; + end; + +OnBecomeKiller: + callfunc "fightclub_enter_killer"; + end; + +OnCommandIntrusion: + areatimer 0, "009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, 0, "#FightClubUtils::OnIntrusion"; // we can not do this directly on #handler because it already have a timer + end; +} + +009-7,20,45,0 script #FightClubTimeLimit NPC32767,0,0,{ + end; + +OnStartTimer: + $@Duel_TotalTime = 0; + goto L_StartTimer; + +OnStopTimer: + stopnpctimer; + end; + +OnTimer1000: + $@Duel_TotalTime = ($@Duel_TotalTime + 1); + if($@Duel_TotalTime >= $@Duel_TimeLimit) goto L_TimeOut; + goto L_StartTimer; + +L_TimeOut: + stopnpctimer; + callfunc "fightclub_TimeOut"; + end; + +L_StartTimer: + setnpctimer 0; + initnpctimer; + end; + +OnInit: + $@Duel_TotalTime = 0; + end; +} + +009-7,20,44,0 script #FightClubHandler NPC32767,0,0,{ + end; + +OnInit: + // this event is called when the map server boots up + $@fightclub_x1 = 27; + $@fightclub_y1 = 42; + $@fightclub_x2 = 38; + $@fightclub_y2 = 48; + callfunc "fightclub_StartUp"; + callfunc "fightclub_CleanStage"; + goto L_StartTimer; + +L_StartTimer: + if($SANGUINE & $@SV_FCDBit != 0) end; + if(debug >= 2) end; + setnpctimer 0; + initnpctimer; + end; + +OnTimer2000: + // this events checks who is on stage every 2 seconds + set $@areausers, getareausers("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2); // get the number of players on stage + if (($@areausers > 2) || (($@Duel_CurrentDuel < 1) && ($@areausers >= 1))) goto L_Intrusion; // too many players on the stage + if (($@Duel_CurrentDuel < 1) && ($@Duel_Started != 1)) goto L_Request; // start the next duel + if ($@Duel_Started != 1) goto L_StartTimer; // no intrusion and no duel ongoing so loop again + if (attachrid($@Duel_BluePlayer) == 0) goto L_BlueMissing; + if (isin("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_BlueMissing; + if (ispcdead() == 1) goto L_IAmACorpse; + if (attachrid($@Duel_RedPlayer) == 0) goto L_RedMissing; + if (isin("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_RedMissing; + if (ispcdead() == 1) goto L_IAmACorpse; + detachrid; + goto L_StartTimer; + +L_Request: + callfunc "fightclub_NextBattle"; + goto L_StartTimer; + +L_IAmACorpse: + $@duel_loser = getcharid(3); + callfunc "fightclub_death"; + goto L_StartTimer; + +L_RedMissing: + $@Duel_Missing = 1; + callfunc "fightclub_Missing"; + goto L_StartTimer; + +L_BlueMissing: + $@Duel_Missing = 2; + callfunc "fightclub_Missing"; + goto L_StartTimer; + +L_Intrusion: + donpcevent "#FightClubUtils::OnCommandIntrusion"; // we can not attach a second timer to this npc so we use another one + callfunc "fightclub_Intrusion"; + goto L_StartTimer; +} diff --git a/npc/009-7/mapflags.txt b/npc/009-7/mapflags.txt new file mode 100755 index 00000000..c3928697 --- /dev/null +++ b/npc/009-7/mapflags.txt @@ -0,0 +1,3 @@ +009-7 mapflag noteleport +009-7 mapflag monster_noteleport +009-7 mapflag nopvp diff --git a/npc/009-7/rouge.txt b/npc/009-7/rouge.txt new file mode 100755 index 00000000..743f4761 --- /dev/null +++ b/npc/009-7/rouge.txt @@ -0,0 +1,129 @@ +009-7,32,45,0 script Rouge#Duels NPC181,{ +if (getgmlevel() >= 40 && (getequipid(equip_head) == 647 || getequipid(equip_head) == 725)) goto L_CallDebug; +goto L_Main; + +L_CallDebug: + mes "You are wearing a dev cap: calling debug menu..."; + mes "For the documentation, @@https://wiki.themanaworld.org/index.php/FightClub|click here@@##0"; + callfunc "fightclub_Debug"; + goto L_End; + +L_Main: + @requests = 0; + if(@Duel_Queue$[0] != "") goto L_Queue; + if(@Duel_Queue$[1] != "") goto L_Decline; // if the user previously closed without declining we resume the procedure + mes "[Rouge]"; + mes "Welcome to the Sanguine Vault's duel arena."; + if($SANGUINE & $@SV_FCDBit != 0) goto L_Disabled; + mes "What do you want to do?"; + menu + "See the commands.", L_Challenge, + "Set my rules.", L_Rules, + "Nevermind.", L_End; + +L_Queue: + @caster_name$ = @Duel_Queue$[0]; + @caster_time = @Duel_Queue[0]; + @target_name$ = strcharinfo(0); + @target = getcharid(3, @caster_name$); + $@my_rid = getcharid(3); + @Duel_Queue$[0] = ""; + @Duel_Queue[0] = 0; + if((gettimetick(2) - @caster_time) >= $@Duel_PlayerQueueTimeOut) goto L_Decline; + if(attachrid(@target) != 1) goto L_Missing; + if(getmapname() != "009-7") goto L_Missing; + if(attachrid($@my_rid) != 1) goto L_End; + @requests = (@requests + 1); + set $@my_rid, 0; // clean this ASAP + mes @caster_name$ + " wishes to challenge you to a duel."; + mes ""; + callfunc "fightclub_getrules"; + mes ""; + mes "Do you accept?"; + next; + menu + "Yes, I do!", L_Accept, + "No.", L_Decline; + +L_ShiftQueue: // here we shift the array to the left + if((@Duel_Queue$[@loop] == "" ) && (@requests < 1)) goto L_Main; + if(@Duel_Queue$[@loop] == "") goto L_End; + @Duel_Queue$[(@loop - 1)] = @Duel_Queue$[@loop]; + @Duel_Queue[(@loop - 1)] = @Duel_Queue[@loop]; + @Duel_Queue$[@loop] = ""; + @Duel_Queue[@loop] = 0; + @loop = (@loop + 1); + if(@loop >= getarraysize(@Duel_Queue$)) goto L_Queue; + goto L_ShiftQueue; + +L_Accept: + callfunc "fightclub_AddToQueue"; + @loop = 1; + goto L_ShiftQueue; + +L_Decline: + @loop = 1; + goto L_ShiftQueue; + +L_Missing: + if(attachrid($@my_rid) != 1) goto L_End; + set $@my_rid, 0; // clean this ASAP + goto L_Decline; + +L_Challenge: + if($SANGUINE & $@SV_FCDBit != 0) goto L_Disabled; + @ms = $@Duel_PlayerQueueTimeOut * 1000; + callfunc "HumanTime"; + next; + mes "[Rouge]"; + mes "To challenge a player to a duel, you need to write this command:"; + mes "%%E ##a"+ ("duel") +" (name)##0"; + next; + mes "Your opponent will have to talk to me to accept or decline your offer."; + mes "The request will expire ##2"+ @time$ +"##0 after being sent."; + next; + mes "Keep in mind that you can ignore incoming duel requests with this command:"; + mes "%%E ##a"+ ("dueloff") +"##0"; + next; + mes "To un-ignore, simply write the same command again."; + goto L_End; + +L_Disabled: + mes "Sadly, the duel system is currently disabled. Please try again later."; + goto L_End; + +L_Rules: + callfunc "fightclub_setrules"; + goto L_End; + +L_End: + close; + +OnAnnounceNext: + npctalk strnpcinfo(0), "##0The next battle ("+ $@Duel_Queue_ID[0] +") is ##1" + $@Duel_Queue_Red$[0] + "##0 vs. ##3" + $@Duel_Queue_Blue$[0] + "##0.The battle will start in "+ $@Duel_TimeBeforeWarp +" seconds."; + end; + +OnAnnounceIntrusion: + npctalk strnpcinfo(0), "Intrusion detected. Annihilation in progress... Done."; + end; + +OnAnnounceTimeOut: + npctalk strnpcinfo(0), "Time limit reached! Both player lose!"; + end; + +OnAnnounceRedWins: + npctalk strnpcinfo(0), $@Duel_Queue_Red$[0] + " wins the duel against "+ $@Duel_Queue_Blue$[0] +"!"; + end; + +OnAnnounceRedForfeit: + npctalk strnpcinfo(0), $@Duel_Queue_Red$[0] + " wins by forfeit!"; + end; + +OnAnnounceBlueWins: + npctalk strnpcinfo(0), $@Duel_Queue_Blue$[0] + " wins the duel against "+ $@Duel_Queue_Red$[0] +"!"; + end; + +OnAnnounceBlueForfeit: + npctalk strnpcinfo(0), $@Duel_Queue_Blue$[0] + " wins by forfeit!"; + end; +} diff --git a/npc/009-7/shops.txt b/npc/009-7/shops.txt new file mode 100755 index 00000000..ace80a3c --- /dev/null +++ b/npc/009-7/shops.txt @@ -0,0 +1,3 @@ +009-7,34,23,0 shop Bartender#Duels NPC177,539:87,567:250,568:250,541:100,527:150 + +009-7,27,26,0 shop Garcon#Duels NPC180,533:55,4035:1500,562:125,676:100,539:87 diff --git a/npc/009-7/trapdoor.txt b/npc/009-7/trapdoor.txt new file mode 100755 index 00000000..14422fc7 --- /dev/null +++ b/npc/009-7/trapdoor.txt @@ -0,0 +1,62 @@ +009-2,38,105,0 script #trapdoor#FightClub NPC327,0,0,{ + @index = rand(0,(getarraysize($@fightclub_randompasswords$) - 1)); + @password$ = $@fightclub_definitions$[@index]; + mes "[Bouncer]"; + mes "\"To enter, you must find the word I have in mind.\""; + mes "\"Here's a hint: ##2"+ @password$ + "##0.\""; + next; + mes "Pick the correct word for this definition."; + @choices_nr = 3; + @good = rand(0,(@choices_nr - 1)); + setarray @choices$, ""; + cleararray @choices$, "", getarraysize(@choices$); + @loop = 0; + goto L_Shuffle; + +L_Shuffle: + @nindex = rand(0,(getarraysize($@fightclub_randompasswords$) - 1)); + if(@nindex == @index) goto L_Shuffle; // do not get the good definition + @loop2 = 0; + goto L_Search; + +L_Search: + if(@choices$[@loop2] == $@fightclub_randompasswords$[@nindex]) goto L_Shuffle; // array is already populated with this choice + if(@loop2 >= (@choices_nr - 1)) goto L_Shuffle2; + @loop2 = @loop2 + 1; + goto L_Search; + +L_Shuffle2: + @choices$[@loop] = $@fightclub_randompasswords$[@nindex]; + if(@loop >= (@choices_nr - 1)) goto L_Answer; + @loop = @loop + 1; + goto L_Shuffle; + +L_Answer: + set @choices$[@good], $@fightclub_randompasswords$[@index]; // set the good definition + @choices$[getarraysize(@choices$)] = "I have no clue"; + menu + @choices$[0], L_Enter, + @choices$[1], L_Enter, + @choices$[2], L_Enter, + @choices$[3], L_Enter, + @choices$[4], L_Enter, + @choices$[5], L_Enter, + @choices$[6], L_Enter; + +L_Enter: + if(@menu != (@good + 1)) goto L_close; + mes "Correct. You may enter."; + close2; + warp "009-7", 22, 21; + end; + +L_close: + mes "Incorrect."; + close; + +OnInit: + setarray $@fightclub_randompasswords$, "Abibliophobia", "Anencephalous", "Batrachomyomachy", "Blunderbuss", "Boustrophedon", "Bumbershoot", "Canoodle", "Cockalorum", "Cockamamie", "Collywobbles", "Eructation", "Flibbertigibbet", "Formication", "Gaberlunzie", "Gastromancy", "Gobemouche", "Hemidemisemiquaver", "Hobbledehoy", "Hootenanny", "Lickspittle", "Lollygag", "Mumpsimus", "Nincompoop", "Oocephalus", "Pettifogger", "Sialoquent", "Slangwhanger", "Smellfungus", "Tatterdemalion", "Vomitory", "Widdershins", "Avoirdupois", "Embonpoint", "Bibble", "Erinaceous", "Impignorate", "Nudiustertian", "Tittynope", "Winklepicker", "Yarborough", "Floccinaucinihilipilification"; + setarray $@fightclub_definitions$, "The fear of running out of reading material","Lacking a brain","Making a mountain out of a molehill","A gun with a flared muzzle or disorganized activity","A back and forth pattern","An umbrella","To hug and kiss","A small, haughty man","Absurd, outlandish","Butterflies in the stomach","A burp, belch","Nonsense, balderdash","The sense of ants crawling on your skin","A wandering beggar","Telling fortune from the rumblings of the stomach","A highly gullible person","A musical timing of 1/64","An awkward or ill-mannered young boy","A country or folk music get-together","A servile person, a toady","To move slowly, fall behind","To move slowly, fall behind","A foolish person","An egghead","A person who tries to befuddle others with his speech","Spitting while speaking","A loud abusive speaker or obnoxious writer","A perpetual pessimist","A child in rags","An exit or outlet","In a contrary or counterclockwise direction", "Commodities sold by weight", "A plump, hourglass figure", "To drink often; to eat and/or drink noisily", "Resembling a hedgehog", "To pawn or mortgage something", "The day before yesterday", "A small quantity of something left over", "Style of shoe or boot with a sharp and long pointed toe", "Hand of cards containing no card above a nine", "Estimation that something is valueless"; + if(getarraysize($@fightclub_randompasswords$) != getarraysize($@fightclub_definitions$)) mapexit; + end; +} diff --git a/npc/009-8/_import.txt b/npc/009-8/_import.txt new file mode 100644 index 00000000..be35dd64 --- /dev/null +++ b/npc/009-8/_import.txt @@ -0,0 +1,5 @@ +// Map 009-8: Chez Celestia +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-8/_warps.txt", +"npc/009-8/celestia.txt", +"npc/009-8/mapflags.txt", diff --git a/npc/009-8/_warps.txt b/npc/009-8/_warps.txt new file mode 100644 index 00000000..14827a7e --- /dev/null +++ b/npc/009-8/_warps.txt @@ -0,0 +1,15 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 009-8: Chez Celestia warps +009-8,26,122,0 warp #009-8_26_122 0,0,009-1,74,50 +009-8,22,134,0 warp #009-8_22_134 0,0,009-1,72,54 +009-8,56,55,0 warp #009-8_56_55 1,0,069-2,44,127 +009-8,53,40,0 warp #009-8_53_40 0,0,069-2,97,127 +009-8,58,40,0 warp #009-8_58_40 0,0,069-2,116,127 +009-8,79,99,0 warp #009-8_79_99 0,0,069-2,117,61 +009-8,87,78,0 warp #009-8_87_78 0,0,069-2,86,61 +009-8,87,56,0 warp #009-8_87_56 0,0,069-2,55,61 +009-8,79,39,0 warp #009-8_79_39 0,0,069-2,24,61 +009-8,33,39,0 warp #009-8_33_39 0,0,069-2,117,30 +009-8,24,56,0 warp #009-8_24_56 0,0,069-2,86,30 +009-8,24,78,0 warp #009-8_24_78 0,0,069-2,55,30 +009-8,32,98,0 warp #009-8_32_98 0,0,069-2,24,30 diff --git a/npc/009-8/celestia.txt b/npc/009-8/celestia.txt new file mode 100755 index 00000000..c1c9db83 --- /dev/null +++ b/npc/009-8/celestia.txt @@ -0,0 +1,284 @@ + +009-8,31,23,0 script Celestia NPC144,{ + callfunc "CelestiaState"; + if (getequipid(equip_head) == 4027) // check if yeti mask (4027) is equipped + goto L_YetiMask; + if (getequipid(equip_head) == 647) // check if Developer's Cap (647) is equipped + goto L_Debug; + if (QL_CELESTIA == 2) // check if the player has the easy quest + goto L_ExplainEasy; + if (QL_CELESTIA >= 5 && QL_CELESTIA < 206) // check if the player has the adv quest + goto L_ExplainAdv; + if (QL_CELESTIA > 1) // the player finished a quest or both + goto L_ThankYou; + goto L_Intro; // if all checks fail go to L_Intro (first meeting) + +L_YetiMask: + mes "Celestia is clearly alarmed upon seeing you."; // send message to dialog window + next; // require the player to press the "next" button in the dialog window + mes "Before you have a chance to speak, she screams,"; // every use of "mes" creates a new line + mes "##B\"YETI IN MY HOUSE!\"##b"; // here we created a new line to add emphasis (and ##B to make bold) + mes "as she jumps back a few feet."; + next; + mes "You catch a glimpse of a black bow while some kind of dark mist quickly overcomes you."; + next; + mes "You feel a sharp pain in your heart and everything fades into darkness."; + heal -Hp, 0; // set the current hp to 0 (kill the player) + set @scared_celestia, 1; // set a temporary variable (resets on log out) in the player scope (variable is stored in the player, not in the npc) + close; // terminate the script and require the player to press the "close" button + +L_Intro: + mes "\"Hi, my name is Celestia.\""; + next; + mes "\"I used to be a great adventurer who's hunted thousands of yeti single-handedly, though, since I moved to Hurnscald I've been hosting tea parties instead.\""; + next; + goto L_MainMenu; + +L_MainMenu: + mes "\"Are you here for this afternoon's tea party?\""; + if (QL_CELESTIA == 1) // check if the player can do the easy quest + goto L_EasyQuestMenu; // go to a special menu that has one more option to start the easy quest + if (QL_CELESTIA == 4) // check if the player can do the quest + goto L_AdvQuestMenu; // go to a special menu that has one more option to start the adv quest + menu // else we just show a boring menu + "Party! Of course I came out for the party!", L_CameForParty, + "I'm sorry, life is much too serious for tea.", L_SrsBsns, + "(Walk away)", L_InstaClose; + +L_EasyQuestMenu: + menu // here we display a special menu + "Party! Of course I came out for the party!", L_CameForParty, + "I'm sorry, life is much too serious for tea.", L_SrsBsns, + "Is there anything that I can do to help?", L_OfferHelp, // <= this will start the first quest + "(Walk away)", L_InstaClose; + +L_AdvQuestMenu: + menu // here we display a special menu + "Party! Of course I came out for the party!", L_CameForParty, + "I'm sorry, life is much too serious for tea.", L_SrsBsns, + "I heard you were looking for help from experienced adventurers...", L_Scared, // <= this will start the adv quest + "(Walk away)", L_InstaClose; + +L_CameForParty: + mes "\"Wonderful, I am happy to have you over."; + mes "Lets get things started with some puerh tea.\""; + next; + mes "Celestia hands you a cup filled with some type of tea that is unlike anything you have seen before."; + mes "It has a very dark color and an unusual aroma reminiscent of a moist forest."; + next; + mes "For a moment you wonder if Celestia might have gotten confused and tossed in a handful of forest dirt into the teapot."; + mes "You ponder whether or not it would be wise to drink it."; + menu + "(Drink the tea, hoping for the best)", L_DrinkTea, + "Uh are you sure this is fit to drink?", L_QuestionTea; + +L_DrinkTea: + mes "To your pleasant surprise the tea is actually quite good."; + next; + mes "Despite its initial dubious fragrance, the tea comes off as very smooth and mellow with a bit of natural sweetness and a touch of an earthy forest like flavour, but in a very good way."; + next; + mes "Clearly an exotic tea, with a refined flavor fit for a refined woman such as Celestia."; + close; + +L_QuestionTea: + mes "\"Yes, did you really think I was some kind of monster that would try to poison you in my own house?\""; + mes "##a(it would be way too messy anyway)##0"; + next; + mes "Celestia then picks up the cup of tea and drinks it in front of you to demonstrate that it is not only harmless but also quite delectable."; + close; + +L_SrsBsns: + mes "\"Have it your way.\""; + close; + +L_OfferHelp: + mes "\"Yes there is.\""; + next; + mes "\"I am a bit frustrated by the lack of a decent grocery store in Hurnscald, and there is only so much that I can get from Hinnak and Oscar.\""; + next; + mes "\"This poses a problem as the few items that I am not able to pick up locally are required for the tea parties that I host.\""; + next; + set QL_CELESTIA, 2; // set state to "got the easy quest" + goto L_ExplainEasy; + +L_ExplainEasy: + npcaction 9; // clear npc dialog to make room for the item list + mes "\"Please go out and find these items and I will make it more than worth your time and effort.\""; + mes; // send a blank line (line break) + mes " %%E 100 ["+ getitemlink("ChocolateBar") +"]"; // use getitemlink to display a click-able item link in the dialog + mes " %%E 50 ["+ getitemlink("GingerBreadMan") +"]"; + next; + mes "\"I really hope you can find a reliable provider for these items before it forces me to put an end to my tea parties.\""; + if (countitem("ChocolateBar") >= 100 && countitem("GingerBreadMan") >= 50) // check if the player has the items + menu // if yes then allow the player to give them + "I have the grocery order of Chocolate Bars and Ginger Bread Men for you.", L_GiveGroceries, + "I will come back later.", L_InstaClose; + close; + +L_GiveGroceries: + mes "Celestia smiles."; + next; + mes "\"Wonderful, I am so glad you were able to track them down."; + mes "That will be enough to keep me in supply for some time.\""; + next; + mes "\"Here, take this Beret."; + mes "I hope it looks better on you than it does on me, as it does not go well with my fine dresses.\""; + next; + mes "Celestia also hands you a heavy pouch filled with gold pieces."; + mes; + mes "["+getitemlink("Beret")+"]"; + mes "[10,000 GP]"; + mes "[20,000 EXP]"; + delitem "ChocolateBar", 100; // remove chocolate bars + delitem "GingerBreadMan", 50; // remove ginger bread men + getitem "Beret", 1; // give beret + getexp 20000, 0; // XXX is this amount reasonable? + set Zeny, Zeny + 10000; // XXX is this amount reasonable? + set QL_CELESTIA, 3; // set the state to "completed easy quest" + close; + +L_ThankYou: + mes "\"Welcome back %%1\""; + next; + goto L_MainMenu; + +L_Scared: + mes "Celestia takes a close look at you and seems to be satisfied."; + next; + mes "\"Wonderful, I am glad you came out."; + mes "I am really concerned about the growing yeti threat."; + mes "There simply does not seem to be enough yeti hunters out there to keep their population from growing.\""; + next; + mes "\"To the point that a few days ago a yeti somehow managed to get inside my house, and I have never heard of one moving this far south before.\""; + next; + menu + "A Yeti in your house, did you kill it?", L_YetiHouse, + "A Yeti in your house, are you alright?", L_YetiHouse; + +L_YetiHouse: + mes "Seemingly out of nowhere Celestia pulls a black bow and a fistful of arrows from her dress."; + mes "\"Don't worry about me, I am able to protect myself."; + mes "The real concern is the safety of the children of Hurnscald, as yeti tend to prefer children.\""; + next; + mes "\"It is scary to think about how many children that yeti could have run into before stumbling into my house to meet its doom."; + mes "If one yeti has already made it this far south it is only a matter of time before more will follow.\""; + next; + mes "\"What disturbs me the most is that Hurnscald is a favorite trading post for adventurers, yet none of them did anything when the yeti entered town.\""; + next; + mes "\"Since they are not concerned about keeping Hurnscald safe I am taking matters into my own hands and recruiting more yeti hunters.\""; + next; + set QL_CELESTIA, 5; // set state to "got advanced quest"; + goto L_ExplainAdv; + +L_ExplainAdv: + mes "\"Please, for the sake of the children of Hurnscald go out and ##Bslay at least 200 yetis##b to help knock down their growing numbers.\""; + if (QL_CELESTIA == 205) // check if the player killed 200 yetis + menu + "I have returned from the great yeti hunt.", L_YetiComplete; + if (QL_CELESTIA > 5) // check if at least 1 yeti killed + menu + "About those yetis...", L_Encourage; + close; + +L_YetiComplete: + mes "\"You are my hero!\""; + next; + mes "\"Here, take it. This [@@677|family heirloom@@] has been passed from mother to daughter for countless generations now.\""; + next; + mes "\"It pains me to let it go, as it is the only remaining trinket of my late mother, but you have proven yourself worthy of it.\""; + next; + menu + "Thank you, I will cherish it dearly.", L_AcceptTrinket, + "This token is too important, you should keep it.", L_RefuseTrinket; + +L_AcceptTrinket: + mes "\"May our path cross again.\""; + mes; + mes "["+getitemlink("HeartNecklace")+"]"; + getitem "HeartNecklace", 1; + QL_CELESTIA = 206; + close; + +L_RefuseTrinket: + mes "\"Really?\""; + next; + mes "\"Please at least accept this humble payment for your trouble.\""; + next; + mes "\"May out path cross again.\""; + mes; + mes "[150,000 GP]"; + Zeny = Zeny + 150000; + QL_CELESTIA = 206; + close; + +L_Encourage: + mes "\"You are doing great so far."; + mes "Keep it up and I know you will be able to make a difference in the growing Yeti threat.\""; + close; + +L_InstaClose: + close; + + + +L_Debug: + npcaction 9; + mes "state: " + QL_CELESTIA; + mes "scared: " + @scared_celestia; + mes "---"; + mes "000 can not do easy quest"; + mes "001 can do easy quest"; + mes "002 has gotten easy quest"; + mes "003 completed easy quest"; + mes "004 can do adv quest"; + mes "005 got adv quest"; + mes "006 killed 1 yeti"; + mes "[...]"; + mes "205 killed 200 yeti"; + mes "206 got adv quest reward"; + mes "---"; + if (debug) + menu + "restart|reset quest", L_ResetState, + "toggle|toggle scared", L_ToggleScared, + // TODO set state to [...] + "edit|set state manually", L_SetState, + "close", L_InstaClose; + close; + +L_ToggleScared: + @scared_celestia = !(@scared_celestia); + goto L_Debug; + +L_ResetState: + QL_CELESTIA = 0; + @scared_celestia = 0; + npcaction 5; // force close dialog + warp "009-1", 72, 48; + end; + +L_SetState: + input @cel_state; + if (@cel_state >= 0 && @cel_state < 256) + QL_CELESTIA = @cel_state; + goto L_Debug; +} + +function script CelestiaState { + if (BaseLevel >= 40 && QL_CELESTIA == 0) // if the player is at least level 40 + set QL_CELESTIA, 1; // show the quest marker + if (BaseLevel >= 90 && QL_CELESTIA == 3 && @scared_celestia) // check if level >= 90, if scared celestia and if easy quest done + set QL_CELESTIA, 4; // show the quest marker for the secret advanced quest + return; +} + +009-1,74,50,0 script Celestia Door NPC32767,0,0,{ + warp "009-8", 26, 23; + callfunc "CelestiaState"; + end; +} +009-1,72,54,0 script Celestia BackDoor NPC32767,0,0,{ + warp "009-8", 23, 34; + callfunc "CelestiaState"; + end; +} diff --git a/npc/009-8/mapflags.txt b/npc/009-8/mapflags.txt new file mode 100755 index 00000000..b87cce76 --- /dev/null +++ b/npc/009-8/mapflags.txt @@ -0,0 +1,2 @@ +//009-8 mapflag town +//009-8 mapflag resave 009-2,149,43 diff --git a/npc/010-1/_import.txt b/npc/010-1/_import.txt new file mode 100644 index 00000000..c367909c --- /dev/null +++ b/npc/010-1/_import.txt @@ -0,0 +1,5 @@ +// Map 010-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/010-1/_mobs.txt", +"npc/010-1/_warps.txt", +"npc/010-1/mapflags.txt", diff --git a/npc/010-1/_mobs.txt b/npc/010-1/_mobs.txt new file mode 100644 index 00000000..c3967393 --- /dev/null +++ b/npc/010-1/_mobs.txt @@ -0,0 +1,15 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 010-1: Woodland mobs +010-1,82,63,9,9 monster Piousse 1003,1,100000,30000 +010-1,49,71,15,9 monster PumpkinMob 1019,1,100000,30000 +010-1,0,0,0,0 monster CroconutMob 1014,30,0,0 +010-1,0,0,0,0 monster Squirrel 1041,20,0,0 +010-1,0,0,0,0 monster PumpkinMob 1019,45,0,0 +010-1,0,0,0,0 monster Little Green Slime 1025,40,0,0 +010-1,0,0,0,0 monster Forest Maggot 1028,15,0,10 +010-1,0,0,0,0 monster Bee 1029,3,270000,180000 +010-1,0,0,0,0 monster Pinkie 1030,1,2700000,1800000 +010-1,0,0,0,0 monster Mana Bug 1035,2,60000,30000 +010-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +010-1,0,0,0,0 monster Gamboge Plant 1038,25,30,20 +010-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 diff --git a/npc/010-1/_warps.txt b/npc/010-1/_warps.txt new file mode 100644 index 00000000..65b9b694 --- /dev/null +++ b/npc/010-1/_warps.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 010-1: Woodland warps +010-1,49,24,0 warp #010-1_49_24 1,0,011-1,48,103 +010-1,13,55,0 warp #010-1_13_55 0,1,015-1,92,54 +010-1,36,94,0 warp #010-1_36_94 0,0,010-2,32,44 +010-1,56,105,0 warp #010-1_56_105 2,0,016-1,56,19 +010-1,131,54,0 warp #010-1_131_54 0,1,007-1,21,53 diff --git a/npc/010-1/mapflags.txt b/npc/010-1/mapflags.txt new file mode 100755 index 00000000..d71c78a4 --- /dev/null +++ b/npc/010-1/mapflags.txt @@ -0,0 +1 @@ +//010-1 mapflag resave 010-1,27,97 diff --git a/npc/010-2/_import.txt b/npc/010-2/_import.txt new file mode 100644 index 00000000..9c36c071 --- /dev/null +++ b/npc/010-2/_import.txt @@ -0,0 +1,10 @@ +// Map 010-2: Dimond's Cove +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/010-2/_warps.txt", +"npc/010-2/band.txt", +"npc/010-2/chef.txt", +"npc/010-2/dimonds.txt", +"npc/010-2/doug.txt", +"npc/010-2/loratay.txt", +"npc/010-2/mapflags.txt", +"npc/010-2/workers.txt", diff --git a/npc/010-2/_warps.txt b/npc/010-2/_warps.txt new file mode 100644 index 00000000..493735d2 --- /dev/null +++ b/npc/010-2/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 010-2: Dimond's Cove warps +010-2,27,24,0 warp #010-2_27_24 0,0,010-2,35,68 +010-2,32,45,0 warp #010-2_32_45 0,0,010-1,36,95 +010-2,40,27,0 warp #010-2_40_27 2,0,010-2,83,28 +010-2,36,68,0 warp #010-2_36_68 0,0,010-2,28,24 +010-2,67,27,0 warp #010-2_67_27 2,0,010-2,67,72 +010-2,83,29,0 warp #010-2_83_29 2,0,010-2,40,28 +010-2,67,73,0 warp #010-2_67_73 2,0,010-2,67,28 diff --git a/npc/010-2/band.txt b/npc/010-2/band.txt new file mode 100755 index 00000000..a94fc3a7 --- /dev/null +++ b/npc/010-2/band.txt @@ -0,0 +1,36 @@ +010-2,40,35,0 script Phil NPC157,{ + callfunc "DimondBand"; + end; +} + +010-2,40,37,0 script Jerry NPC160,{ + callfunc "DimondBand"; + end; +} + +010-2,42,36,0 script Robert NPC162,{ + callfunc "DimondBand"; + end; +} +function script DimondBand { + npctalk strnpcinfo(0), $@SongLyrics$[$@LyricSpot]; + $@LyricSpot = ($@LyricSpot + 1); + if (getarraysize($@SongLyrics$) <= $@LyricSpot) + $@LyricSpot = 0; + goto L_Return; + +L_Return: + return; +} +- script #BandConfig NPC32767,{ + end; + +OnInit: + $@LyricSpot = 0; + setarray $@SongLyrics$, "Laid back in Hurnscald, with a GP in my hand,", + "Watchin' GMs and players on the street,", + "And I catch a glimpse of cheap rares on ManaMarket once a while,", + "There's a woman who wants me to save their child.", + "I got the Argean blues!"; + end; +} diff --git a/npc/010-2/chef.txt b/npc/010-2/chef.txt new file mode 100755 index 00000000..550f571b --- /dev/null +++ b/npc/010-2/chef.txt @@ -0,0 +1,126 @@ +010-2,33,25,0 script Chef#dimond NPC148,{ + mes "[Chef]"; + mes ""; + mes "\"I'm too busy right now to talk.\""; + + callfunc "KadiyaSubquestConsts"; + if ((@Q_kadiya_status == @Q_STATUS_WANTS_CHOCOCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_chococake; + if ((@Q_kadiya_status == @Q_STATUS_WANTS_ORANGECUPCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_cupcake; + close; + +L_lace_chococake: + next; + menu + "Sorry.", L_End, + "I need your help with a sick young girl!", L_Next; + +L_Next: + mes "[Chef]"; + mes ""; + mes "You explain Kadiya's situation to him."; + mes "\"Hmrmf. I can't help you; I'm a chef, not a baker!\""; + close; + +L_lace_cupcake: + next; + menu + "Sorry.", L_End, + "I need your help with a sick young girl!", L_Next1; + +L_Next1: + mes "[Chef]"; + mes ""; + mes "You explain Kadiya's situation to him."; + mes "\"Hmrmf. I was about to make another batch of orange cupcakes. Do you have that potion with you?\""; + next; + menu + "No, sorry.", L_bringit, + "Yes, here you are.", L_Next2; + +L_Next2: + if (countitem ("MopoxCurePotion") < 1) + goto L_bringit; + mes "[Chef]"; + mes ""; + mes "He shudders as he smells the bottle."; + mes "\"That is disgusting! How do you expect me to mask this?\""; + mes "He ponders his own question for a moment."; + next; + mes "[Chef]"; + mes ""; + mes "\"Ah yes. We need to bind the smell in gingerbread. Bring me three pieces of gingerbread, one orange, and 500 GP for the other ingredients, and I will make you your cupcake.\""; + next; + menu + "I'll go and get it.", L_End, + "Here you are!", L_Next3, + "Not now.", L_End; + +L_Next3: + if (countitem ("GingerBreadMan") < 3) + goto L_No_gingerbread; + if (countitem ("Orange") < 1) + goto L_No_orange; + if (countitem ("MopoxCurePotion") < 1) + goto L_No_Potion; + if (Zeny < 500) + goto L_No_Zeny; + + Zeny = Zeny - 500; + delitem "GingerBreadMan", 3; + delitem "Orange", 1; + delitem "MopoxCurePotion", 1; + + getitem "LacedOrangeCupcake", 1; + + mes "[Chef]"; + mes ""; + mes "\"Good, good. This should work.\""; + mes "He crumbles the gingerbread, mixes it with the potion and some spices, and finally adds some cupcake batter and the orange pieces."; + next; + mes "[Chef]"; + mes ""; + mes "\"Take a seat.\""; + mes "He fills the mixture into a cupcake form and puts it into the oven. You watch the cupcake grow for a while."; + mes "Finally, he removes the form and carefully extracts the cupcake."; + next; + mes "[Chef]"; + mes ""; + mes "\"Here you are. It's a bit bigger than a regular cupcake and will taste a bit like ginger, I think, but otherwise it should be fine.\""; + close; + +L_No_gingerbread: + mes "[Chef]"; + mes ""; + mes "\"I will need three pieces of gingerbread.\""; + close; + +L_No_orange: + mes "[Chef]"; + mes ""; + mes "\"Please bring me an orange for these cupcakes.\""; + close; + +L_No_Zeny: + mes "[Chef]"; + mes ""; + mes "\"No. I need extra ingredients worth 500 GP, and I expect you to pay for those.\""; + close; + +L_No_Potion: + mes "[Chef]"; + mes ""; + mes "\"Where did your Mopox potion go?\""; + close; + +L_bringit: + mes "[Chef]"; + mes ""; + mes "\"Bring it here when you do.\""; + next; + goto L_End; + +L_End: + close; +} diff --git a/npc/010-2/dimonds.txt b/npc/010-2/dimonds.txt new file mode 100755 index 00000000..6fcaa1f4 --- /dev/null +++ b/npc/010-2/dimonds.txt @@ -0,0 +1,542 @@ + +010-2,34,38,0 script Dimond NPC165,{ + mes "[Dimond]"; + mes "\"Welcome to Dimond's Cove!\""; + mes ""; + mes "\"Talk to the waitress to get some Food.\""; + mes ""; + mes "\"We also have shops on the 2nd Floor,"; + mes "and an inn on the 3rd Floor.\""; + close; +} + +010-2,35,35,0 script Shannon NPC193,{ + @month = 1; + @start_day = 24; + @end_day = 26; + if (gettime(6) != @month) goto L_No_Event; + if (gettime(5) < @start_day) goto L_No_Event; + if (gettime(5) > @end_day) goto L_No_Event; + if (gettimetick(2)-TUT_var < 2*7*86400 ) //player must be created at least 2 weeks ago + goto L_No_Event; + if (FLAGS & FLAG_HAS_BOWLER_BURNSDAY ) goto L_Event_Done; + getinventorylist; + if (@inventorylist_count == 100) goto L_Full_Inv; + + mes "[Shannon]"; + mes "\"Welcome to Dimond's Cove. We are celebrating Robert Burns with supper and poems. You provide the supper and I'll provide a poem by Robert Burns. He was otherwise known as 'The Bard' and wrote many poems. The music of language is what I love most. The language of poetry. While his accent is thick, his poems tell stories that stir the soul. I'll read a poem by him and you can tell me what you think.\""; + next; + mes "\"Before I start, it is traditional to eat, drink and be merry, so help from you will be great and keep me reading.\""; + next; + mes "\"O thou! whatever title suit thee,--\""; + mes "\"Auld Hornie, Satan, Nick, or Clootie!\""; + mes "\"Wha in yon cavern, grim an' sootie,\""; + mes "\"Clos'd under hatches,\""; + mes "\"Spairges about the brunstane cootie\""; + mes "\"To scaud poor wretches!\""; + callsub S_food_menu; + mes "\"Hear me, Auld Hangie, for a wee,\""; + mes "\"An' let poor damned bodies be;\""; + mes "\"I'm sure sma' pleasure it can gie,\""; + mes "\"E'en to a deil,\""; + mes "\"To skelp an' scaud poor dogs like me,\""; + mes "\"An' hear us squeel!\""; + callsub S_food_menu; + mes "\"Great is thy pow'r, an' great thy fame;\""; + mes "\"Far ken'd an' noted is thy name;\""; + mes "\"An' tho' yon lowin heugh's thy hame,\""; + mes "\"Thou travels far;\""; + mes "\"An' faith! thou's neither lag nor lame,\""; + mes "\"Nor blate nor scaur.\""; + callsub S_food_menu; + mes "\"Whyles, ranging like a roarin lion,\""; + mes "\"For prey a' holes an' corners tryin;\""; + mes "\"Whyles, on the strong-wing'd tempest flyin,\""; + mes "\"Tirlin' the kirks;\""; + mes "\"Whyles, in the human bosom pryin,\""; + mes "\"Unseen thou lurks.\""; + callsub S_food_menu; + mes "\"I've heard my rev'rend graunie say,\""; + mes "\"In lanely glens ye like to stray;\""; + mes "\"Or whare auld ruin'd castles gray\""; + mes "\"Nod to the moon,\""; + mes "\"Ye fright the nightly wand'rer's way\""; + mes "\"Wi' eldritch croon.\""; + callsub S_food_menu; + mes "\"When twilight did my graunie summon\""; + mes "\"To say her pray'rs, douce honest woman!\""; + mes "\"Aft yont the dike she's heard you bummin,\""; + mes "\"Wi' eerie drone;\""; + mes "\"Or, rustlin thro' the boortrees comin,\""; + mes "\"Wi' heavy groan.\""; + callsub S_food_menu; + mes "\"Ae dreary, windy, winter night,\""; + mes "\"The stars shot down wi' sklentin light,\""; + mes "\"Wi' you mysel I gat a fright,\""; + mes "\"Ayont the lough;\""; + mes "\"Ye like a rash-buss stood in sight,\""; + mes "\"Wi' waving sugh.\""; + callsub S_food_menu; + mes "\"The cudgel in my nieve did shake,\""; + mes "\"Each bristl'd hair stood like a stake,\""; + mes "\"When wi' an eldritch, stoor 'Quaick, quaick,'\""; + mes "\"Amang the springs,\""; + mes "\"Awa ye squatter'd like a drake,\""; + mes "\"On whistling wings.\""; + callsub S_food_menu; + mes "\"Let warlocks grim an' wither'd hags\""; + mes "\"Tell how wi' you on ragweed nags\""; + mes "\"They skim the muirs an' dizzy crags\""; + mes "\"Wi' wicked speed;\""; + mes "\"And in kirk-yards renew their leagues,\""; + mes "\"Owre howket dead.\""; + callsub S_food_menu; + mes "\"Thence, countra wives wi' toil an' pain\""; + mes "\"May plunge an' plunge the kirn in vain;\""; + mes "\"For oh! the yellow treasure's taen\""; + mes "\"By witchin skill;\""; + mes "\"An' dawtet, twal-pint hawkie's gaen\""; + mes "\"As yell's the bill.\""; + callsub S_food_menu; + mes "\"Thence, mystic knots mak great abuse,\""; + mes "\"On young guidmen, fond, keen, an' croose;\""; + mes "\"When the best wark-lume i' the house,\""; + mes "\"By cantraip wit,\""; + mes "\"Is instant made no worth a louse,\""; + mes "\"Just at the bit.\""; + callsub S_food_menu; + mes "\"When thowes dissolve the snawy hoord,\""; + mes "\"An' float the jinglin icy-boord,\""; + mes "\"Then water-kelpies haunt the foord\""; + mes "\"By your direction,\""; + mes "\"An' nighted trav'lers are allur'd\""; + mes "\"To their destruction.\""; + callsub S_food_menu; + mes "\"And aft your moss-traversing spunkies\""; + mes "\"Decoy the wight that late an drunk is:\""; + mes "\"The bleezin, curst, mischievous monkeys\""; + mes "\"Delude his eyes,\""; + mes "\"Till in some miry slough he sunk is,\""; + mes "\"Ne'er mair to rise.\""; + callsub S_food_menu; + mes "\"When Masons' mystic word an grip\""; + mes "\"In storms an' tempests raise you up,\""; + mes "\"Some cock or cat your rage maun stop,\""; + mes "\"Or, strange to tell!\""; + mes "\"The youngest brither ye wad whip\""; + mes "\"Aff straught to hell!\""; + callsub S_food_menu; + mes "\"Lang syne, in Eden'd bonie yard,\""; + mes "\"When youthfu' lovers first were pair'd,\""; + mes "\"An all the soul of love they shar'd,\""; + mes "\"The raptur'd hour,\""; + mes "\"Sweet on the fragrant flow'ry swaird,\""; + mes "\"In shady bow'r;\""; + callsub S_food_menu; + mes "\"Then you, ye auld snick-drawin dog!\""; + mes "\"Ye cam to Paradise incog,\""; + mes "\"And play'd on man a cursed brogue,\""; + mes "\"(Black be your fa'!)\""; + mes "\"An gied the infant warld a shog,\""; + mes "\"Maist ruin'd a'.\""; + callsub S_food_menu; + mes "\"D'ye mind that day, when in a bizz,\""; + mes "\"Wi' reeket duds an reestet gizz,\""; + mes "\"Ye did present your smoutie phiz\""; + mes "\"Mang better folk,\""; + mes "\"An' sklented on the man of Uz\""; + mes "\"Your spitefu' joke?\""; + callsub S_food_menu; + mes "\"An' how ye gat him i' your thrall,\""; + mes "\"An' brak him out o' house and hal',\""; + mes "\"While scabs and blotches did him gall,\""; + mes "\"Wi' bitter claw,\""; + mes "\"An' lows'd his ill-tongued, wicked scaul,\""; + mes "\"Was warst ava?\""; + callsub S_food_menu; + mes "\"But a' your doings to rehearse,\""; + mes "\"Your wily snares an' fechtin fierce,\""; + mes "\"Sin' that day Michael did you pierce,\""; + mes "\"Down to this time,\""; + mes "\"Wad ding a Lallan tongue, or Erse,\""; + mes "\"In prose or rhyme.\""; + callsub S_food_menu; + mes "\"An' now, Auld Cloots, I ken ye're thinkin,\""; + mes "\"A certain Bardie's rantin, drinkin,\""; + mes "\"Some luckless hour will send him linkin,\""; + mes "\"To your black pit;\""; + mes "\"But faith! he'll turn a corner jinkin,\""; + mes "\"An' cheat you yet.\""; + callsub S_food_menu; + mes "\"But fare you weel, Auld Nickie-ben!\""; + mes "\"O wad ye tak a thought an' men'!\""; + mes "\"Ye aiblins might--I dinna ken--\""; + mes "\"Still hae a stake:\""; + mes "\"I'm wae to think upo' yon den,\""; + mes "\"Ev'n for your sake!\""; + next; + mes "\"Well, that was the poem. What do you think of it?\""; + menu + "It was a bit long and kind of hard to understand, but thanks for reading.", L_Next; + +L_Next: + mes "[Shannon]"; + mes "\"Well, thanks for coming to the supper. Also, thanks for helping me make it through the poem. Here, take this hat. When you wear it, wear it with the class you showed me today. Happy Burns' Supper!\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + getitem "BowlerHat", 1; + FLAGS = FLAGS | FLAG_HAS_BOWLER_BURNSDAY; + close; + +L_No_Event: + mes "[Shannon]"; + mes "\"I'm a traveling poet and admirer of Robert Burns.\""; + close; + +L_Event_Done: + mes "[Shannon]"; + mes "\"Ah, my dear friend. Good to see you again in this remarkable time of the year.\""; + next; + mes "\"Welcome to Dimond's Cove. We are celebrating Robert Burns with supper and poems. You provide the supper and I'll provide a poem by Robert Burns. He was otherwise known as 'The Bard' and wrote many poems. The music of language is I love most. The language of poetry. While his accent is thick, his poems tell stories that stir the soul. I'll read a poem by him and you can tell me what you think.\""; + next; + mes "\"O thou! whatever title suit thee,--\""; + mes "\"Auld Hornie, Satan, Nick, or Clootie!\""; + mes "\"Wha in yon cavern, grim an' sootie,\""; + mes "\"Clos'd under hatches,\""; + mes "\"Spairges about the brunstane cootie\""; + mes "\"To scaud poor wretches!\""; + next; + mes "\"Hear me, Auld Hangie, for a wee,\""; + mes "\"An' let poor damned bodies be;\""; + mes "\"I'm sure sma' pleasure it can gie,\""; + mes "\"E'en to a deil,\""; + mes "\"To skelp an' scaud poor dogs like me,\""; + mes "\"An' hear us squeel!\""; + next; + mes "\"Great is thy pow'r, an' great thy fame;\""; + mes "\"Far ken'd an' noted is thy name;\""; + mes "\"An' tho' yon lowin heugh's thy hame,\""; + mes "\"Thou travels far;\""; + mes "\"An' faith! thou's neither lag nor lame,\""; + mes "\"Nor blate nor scaur.\""; + next; + mes "\"Whyles, ranging like a roarin lion,\""; + mes "\"For prey a' holes an' corners tryin;\""; + mes "\"Whyles, on the strong-wing'd tempest flyin,\""; + mes "\"Tirlin' the kirks;\""; + mes "\"Whyles, in the human bosom pryin,\""; + mes "\"Unseen thou lurks.\""; + next; + mes "\"I've heard my rev'rend graunie say,\""; + mes "\"In lanely glens ye like to stray;\""; + mes "\"Or whare auld ruin'd castles gray\""; + mes "\"Nod to the moon,\""; + mes "\"Ye fright the nightly wand'rer's way\""; + mes "\"Wi' eldritch croon.\""; + next; + mes "\"When twilight did my graunie summon\""; + mes "\"To say her pray'rs, douce honest woman!\""; + mes "\"Aft yont the dike she's heard you bummin,\""; + mes "\"Wi' eerie drone;\""; + mes "\"Or, rustlin thro' the boortrees comin,\""; + mes "\"Wi' heavy groan.\""; + next; + mes "\"Ae dreary, windy, winter night,\""; + mes "\"The stars shot down wi' sklentin light,\""; + mes "\"Wi' you mysel I gat a fright,\""; + mes "\"Ayont the lough;\""; + mes "\"Ye like a rash-buss stood in sight,\""; + mes "\"Wi' waving sugh.\""; + next; + mes "\"The cudgel in my nieve did shake,\""; + mes "\"Each bristl'd hair stood like a stake,\""; + mes "\"When wi' an eldritch, stoor 'Quaick, quaick,'\""; + mes "\"Amang the springs,\""; + mes "\"Awa ye squatter'd like a drake,\""; + mes "\"On whistling wings.\""; + next; + mes "\"Let warlocks grim an' wither'd hags\""; + mes "\"Tell how wi' you on ragweed nags\""; + mes "\"They skim the muirs an' dizzy crags\""; + mes "\"Wi' wicked speed;\""; + mes "\"And in kirk-yards renew their leagues,\""; + mes "\"Owre howket dead.\""; + next; + mes "\"Thence, countra wives wi' toil an' pain\""; + mes "\"May plunge an' plunge the kirn in vain;\""; + mes "\"For oh! the yellow treasure's taen\""; + mes "\"By witchin skill;\""; + mes "\"An' dawtet, twal-pint hawkie's gaen\""; + mes "\"As yell's the bill.\""; + next; + mes "\"Thence, mystic knots mak great abuse,\""; + mes "\"On young guidmen, fond, keen, an' croose;\""; + mes "\"When the best wark-lume i' the house,\""; + mes "\"By cantraip wit,\""; + mes "\"Is instant made no worth a louse,\""; + mes "\"Just at the bit.\""; + next; + mes "\"When thowes dissolve the snawy hoord,\""; + mes "\"An' float the jinglin icy-boord,\""; + mes "\"Then water-kelpies haunt the foord\""; + mes "\"By your direction,\""; + mes "\"An' nighted trav'lers are allur'd\""; + mes "\"To their destruction.\""; + next; + mes "\"And aft your moss-traversing spunkies\""; + mes "\"Decoy the wight that late an drunk is:\""; + mes "\"The bleezin, curst, mischievous monkeys\""; + mes "\"Delude his eyes,\""; + mes "\"Till in some miry slough he sunk is,\""; + mes "\"Ne'er mair to rise.\""; + next; + mes "\"When Masons' mystic word an grip\""; + mes "\"In storms an' tempests raise you up,\""; + mes "\"Some cock or cat your rage maun stop,\""; + mes "\"Or, strange to tell!\""; + mes "\"The youngest brither ye wad whip\""; + mes "\"Aff straught to hell!\""; + next; + mes "\"Lang syne, in Eden'd bonie yard,\""; + mes "\"When youthfu' lovers first were pair'd,\""; + mes "\"An all the soul of love they shar'd,\""; + mes "\"The raptur'd hour,\""; + mes "\"Sweet on the fragrant flow'ry swaird,\""; + mes "\"In shady bow'r;\""; + next; + mes "\"Then you, ye auld snick-drawin dog!\""; + mes "\"Ye cam to Paradise incog,\""; + mes "\"And play'd on man a cursed brogue,\""; + mes "\"(Black be your fa'!)\""; + mes "\"An gied the infant warld a shog,\""; + mes "\"Maist ruin'd a'.\""; + next; + mes "\"D'ye mind that day, when in a bizz,\""; + mes "\"Wi' reeket duds an reestet gizz,\""; + mes "\"Ye did present your smoutie phiz\""; + mes "\"Mang better folk,\""; + mes "\"An' sklented on the man of Uz\""; + mes "\"Your spitefu' joke?\""; + next; + mes "\"An' how ye gat him i' your thrall,\""; + mes "\"An' brak him out o' house and hal',\""; + mes "\"While scabs and blotches did him gall,\""; + mes "\"Wi' bitter claw,\""; + mes "\"An' lows'd his ill-tongued, wicked scaul,\""; + mes "\"Was warst ava?\""; + next; + mes "\"But a' your doings to rehearse,\""; + mes "\"Your wily snares an' fechtin fierce,\""; + mes "\"Sin' that day Michael did you pierce,\""; + mes "\"Down to this time,\""; + mes "\"Wad ding a Lallan tongue, or Erse,\""; + mes "\"In prose or rhyme.\""; + next; + mes "\"An' now, Auld Cloots, I ken ye're thinkin,\""; + mes "\"A certain Bardie's rantin, drinkin,\""; + mes "\"Some luckless hour will send him linkin,\""; + mes "\"To your black pit;\""; + mes "\"But faith! he'll turn a corner jinkin,\""; + mes "\"An' cheat you yet.\""; + next; + mes "\"But fare you weel, Auld Nickie-ben!\""; + mes "\"O wad ye tak a thought an' men'!\""; + mes "\"Ye aiblins might--I dinna ken--\""; + mes "\"Still hae a stake:\""; + mes "\"I'm wae to think upo' yon den,\""; + mes "\"Ev'n for your sake!\""; + next; + mes "\"Well, that was the poem. What do you think of it?\""; + menu + "It was a bit long and kind of hard to understand, but thanks for reading.", L_close; + +L_Full_Inv: + mes "[Shannon]"; + mes "\"Your possessions seems to be a burden to you.\""; + next; + mes "\"Maybe you should turn away from the mundane world and get rid of this burden to change your view to the beauty of poetry.\""; + close; + +S_food_menu: + setarray @choice_idx, 0,0,0,0,0,0; + setarray @choice$, "","","","","",""; + + @C_steak = 676; + @C_chickenleg = 562; + @C_redapple = 535; + @C_greenapple = 719; + @C_beer = 539; + + // counter of available answers + @choices_nr = 0; + + if (countitem("Steak") == 0) + goto L_Nosteaks; + @choice_idx[@choices_nr] = @C_steak; + @choice$[@choices_nr] = "Offer him a steak."; + @choices_nr = @choices_nr + 1; + goto L_Nosteaks; + +L_Nosteaks: + if (countitem("ChickenLeg") == 0) + goto L_Nochickenleg; + @choice_idx[@choices_nr] = @C_chickenleg; + @choice$[@choices_nr] = "Offer him a chicken leg."; + @choices_nr = @choices_nr + 1; + goto L_Nochickenleg; + +L_Nochickenleg: + if (countitem("RedApple") == 0) + goto L_Noredapple; + @choice_idx[@choices_nr] = @C_redapple; + @choice$[@choices_nr] = "Offer him a red apple."; + @choices_nr = @choices_nr + 1; + goto L_Noredapple; + +L_Noredapple: + if (countitem("GreenApple") == 0) + goto L_Nogreenapple; + @choice_idx[@choices_nr] = @C_greenapple; + @choice$[@choices_nr] = "Offer him a green apple."; + @choices_nr = @choices_nr + 1; + goto L_Nogreenapple; + +L_Nogreenapple: + if (countitem("Beer") == 0) + goto L_NoBeer; + @choice_idx[@choices_nr] = @C_beer; + @choice$[@choices_nr] = "Offer him a beer."; + @choices_nr = @choices_nr + 1; + goto L_NoBeer; + +L_NoBeer: + @choice_idx[@choices_nr] = @C_nevermind; + @choice$[@choices_nr] = "Leave"; + + menu + @choice$[0],L_MenuItems, + @choice$[1],L_MenuItems, + @choice$[2],L_MenuItems, + @choice$[3],L_MenuItems, + @choice$[4],L_MenuItems, + @choice$[5],L_MenuItems, + @choice$[6],L_MenuItems, + @choice$[7],L_MenuItems, + @choice$[8],L_MenuItems, + @choice$[9],L_MenuItems, + @choice$[10],L_MenuItems; + +L_MenuItems: + @choose = @menu - 1; + if (@choice_idx[@choose] == 0) + goto L_close; + if ((countitem("Steak") != 0) && (@choice_idx[@choose] == @C_steak)) + goto L_RmItem; + if ((countitem("ChickenLeg") != 0) && (@choice_idx[@choose] == @C_chickenleg)) + goto L_RmItem; + if ((countitem("RedApple") != 0) && (@choice_idx[@choose] == @C_redapple)) + goto L_RmItem; + if ((countitem("GreenApple") != 0) && (@choice_idx[@choose] == @C_greenapple)) + goto L_RmItem; + if ((countitem("Beer") != 0) && (@choice_idx[@choose] == @C_beer)) + goto L_RmItem; + + // fallthrough only when player remove the items while in menu, trying to cheat + // the quest will need to be started again + mes "\"What you are offering, you do not have. Do not try to betray me. Come back when you have better morals.\""; + close; + +L_RmItem: + delitem @choice_idx[@choose], 1; + return; + +L_close: + close; +} + +010-2,27,30,0 script Bar Rules NPC400,{ + mes "Dimonds Cove Bar Rules"; + next; + mes "No excessive drinking!"; + mes "If your sprite starts to stagger we will ask you to leave."; + next; + mes "No offensive chat."; + mes "This is a nice establishment."; + mes "Crude and offensive behavior will be reported to TMW GM's."; + next; + mes "Please be respectful of others."; + mes "Not everyone has the same experience and should all be treated"; + mes "with equal respect."; + next; + mes "Thank You,"; + mes "Dimonds Cove Management"; + close; +} + +010-2,71,38,0 script Store Policy#1 NPC400,{ + mes "All sales are final."; + mes "Returns are subject to a 50% re-stocking fee."; + close; +} + +010-2,77,38,0 script Store Policy#2 NPC400,{ + mes "All sales are final."; + mes "Returns are subject to a 50% re-stocking fee."; + close; +} + +010-2,36,30,0 script Directions NPC400,{ + mes "This way to the Dimonds Cove Inn."; + mes "Five star accommodation for the weary traveler!"; + close; +} + +010-2,80,32,0 script Dimonds Cove 1 NPC400,{ + mes "The Story of Dimonds Cove"; + next; + mes "One day Dimond D. Stone dreamed of her own restaurant."; + mes "Dimond sold her food alone in this spot for some time,"; + mes "longing for the day she would have a building."; + mes "She met an adventurer named Merlin outside of the"; + mes "desert mines one day."; + next; + mes "They became friends and Dimond told Merlin about her idea."; + mes "Merlin was a accomplished carpenter and wanted to make a new"; + mes "place in the world. He told Dimond that he would make her"; + mes "restaurant for her. He gathered the tools and after much"; + mes "hard work, Dimonds Cove was built."; + next; + mes "(See Dimonds Cove 2)"; + close; +} + +010-2,85,32,0 script Dimonds Cove 2 NPC400,{ + mes "List of Events at Dimonds Cove"; + mes "January 2008 - Construction of Dimonds Cove."; + close; +} + + +010-2,71,30,0 script Inn NPC400,{ + mes "Welcome to the Dimonds Cove Inn"; + mes "Rooms are 200 gp a night."; + mes "Plese check in with Basil."; + close; +} + + +010-2,24,27,0 shop Bartender NPC112,539:87,567:250,568:250 + +010-2,32,34,0 shop Waitress NPC139,519:50,533:55,534:45,562:125,676:100 + +010-2,85,41,0 shop Blacksmith NPC146,545:5000,529:2,603:1000 + +010-2,65,41,0 shop General Store#dimond NPC137,586:500,524:800,544:2000,632:500,528:500,735:500 + +010-2,75,68,0 script Basil NPC107,{ + @npcname$ = "Basil the Inn Keeper"; + @Cost = 200; + callfunc "Inn"; + end; +} diff --git a/npc/010-2/doug.txt b/npc/010-2/doug.txt new file mode 100755 index 00000000..e16a2997 --- /dev/null +++ b/npc/010-2/doug.txt @@ -0,0 +1,21 @@ + +010-2,68,87,0 script Doug NPC113,{ + mes "[Doug]"; + mes "\"This room is too dark. I want to brighten it up.\""; + next; + + @dq_level = 15; + @dq_cost = 10; + @dq_count = 5; + @dq_name$ = "CaveSnakeLamp"; + @dq_friendly_name$ = "Cave Snake Lamps"; + @dq_money = 1000; + @dq_exp = 1500; + + callfunc "DailyQuest"; + + next; + mes "[Doug]"; + mes "\"Too bad these lamps wear off after a while...\""; + close; +} diff --git a/npc/010-2/loratay.txt b/npc/010-2/loratay.txt new file mode 100755 index 00000000..43517bb7 --- /dev/null +++ b/npc/010-2/loratay.txt @@ -0,0 +1,1053 @@ +010-2,83,85,0 script Lora Tay Debug NPC151,{ + mes "[Lora Tay Debug]"; + mes "What do you want to do?"; + menu + "Show Quest State", L_ShowState, + "Set Quest State", L_SetState, + "Reset", L_Reset, + "Nothing.", L_close; + +L_ShowState: + @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + mes "Current State is " + @wg_state; + goto L_close; + +L_SetState: + mes "What state do you want?"; + input @wg_state; + callfunc "setWGState"; + mes "Set to " + @wg_state; + goto L_close; + +L_Reset: + @wg_state = 0; + callfunc "setWGState"; + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "Lora Tay Debug"; + end; +} +010-2,85,85,0 script Lora Tay NPC151,{ + set @ROBE_COCOONS_NR, 150; // must be multiple of ten + @ROBE_ZENY = 10000; + set @ROBE_SHEETS_NR, 6; // number of silk sheets required for the silk robe. Must be less than 10. + set @ROBE_SHEETS_ZENY, 6000; // price of the silk robe when bringing silk sheets. + set @Robe_with_sheets, 0; // will be set to 1 if silk robe is made with sheets + @FINEDRESS_COCOONS = 180; + @SORCERER_ROBE_SEW_ZENY = 25000; + @SORCERER_ROBE_NUM_COTTON_CLOTH = 2; + @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + + if (@loratay_asking_robe == 1) goto L_ExamineSR; + if (@wg_state == 10) goto L_agostine_menu; + if (@wg_state == 11 || @wg_state == 12) goto L_regular_intro; + if (@wg_state == 13) goto L_Intro; + if (@wg_state == 14) goto L_show_materials; + if (@wg_state == 15) goto L_search_items; + if (@wg_state == 16) goto L_retrieve_design; + if (@wg_state == 17) goto L_bringing_design; + if (@wg_state == 18) goto L_wait_dress_finished; + if (@wg_state == 19) goto L_dress_finished; + if (@wg_state >= 20 && @wg_state < 23) goto L_deliver_dress; + if (@wg_state >= 23) goto L_regular_intro; + + @t = rand(3); + if (@t == 0) goto L_Intro_0; + if (@t == 1) goto L_Intro_1; + + mes "You see a middle-aged woman furiously sewing away at what appears to be a very expensive dress. Her fingers are moving so nimbly that you find it near-impossible to follow the needle."; + goto L_Intro_over; + +L_Intro_0: + mes "You notice a middle-aged woman carefully drawing lines on a large sheet of cotton."; + goto L_Intro_over; + +L_Intro_1: + mes "You see a middle-aged woman cautiously but surprisingly swiftly cutting out shapes from a huge cotton sheet. The scissors glide along the cloth as if it were butter, never leaving the premarked lines."; + goto L_Intro_over; + +L_Intro_over: + next; + mes "She suddenly stops and looks up."; + next; + mes "\"Now who are you, and what are you doing here?\""; + mes "She squints, pushes her thick spectacles up the bridge of her nose and eyes you suspiciously."; + next; + + @agostine_msg0$ = ""; + @agostine_msg1$ = ""; + + if (@wg_state >= 1) + @agostine_msg0$ = "Do you know Agostine?"; + if ((@wg_state >= 9) && (countitem("FurBoots"))) + @agostine_msg1$ = "Can you make fur boots, like Agostine?"; + + menu + "Hello! My name is " + strcharinfo(0) + ".", L_hello_0, + "Hello; are you a tailor?", L_hello_1, + "Can you make something for me?", L_hello_2, + @agostine_msg0$, L_agostine_0, + @agostine_msg1$, L_agostine_1; + +L_hello_0: + mes "She raises an eyebrow."; + mes "\"That,\", she notes dryly, \"is hardly my fault. And now I would greatly appreciate it if you were to get out of here and leave me to my work!\""; + goto L_close; + +L_hello_1: + mes "She frowns."; + mes "\"No, I am an accupuncturist, I just happen to practice on cloth! Get out of here with your silly questions!\""; + goto L_close; + +L_hello_2: + mes "She glares at you indignantly."; + mes "\"Do you even know whom you are talking to? I am Lora Tay, greatest of the seven seamstresses of the South!\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"I do not work for petty peasants or arrogant adventurers. Get out of my sight!\""; + mes "She waves you away and returns to her work."; + goto L_close; + +L_agostine_0: + if (@wg_state < 1) + goto L_close; + mes "She shoots an incensed glare at you."; + mes "\"Ah, Agostine! The 'legendary tailor'! Now who has not heard of him, been inspired by him! Such charisma! Such popularity! Such unprecedented lack of talent!\""; + mes "You notice that she prononuces the 't's as if she were trying to slap someone."; + next; + mes "\"Please spare me your tales of this fool. He couldn't mend a sock without getting himself trapped inside!\""; + mes "She frowns and turns back to her work, clearly not interested in discussing the matter further."; + goto L_close; + +L_agostine_1: + if ((@wg_state < 9) || (countitem (655) == 0)) + goto L_close; + mes "[Lora Tay the Seamstress]"; + mes "She glares at your boots, her lips forming barely more than a thin line. Deep furrows form above her brows."; + mes "\"I can't believe it! He copied Illana's design but used fluffy fur in place of ice wolvern fur-- Fluffy fur! Of all things! Who would wear such an atrocity of fashion! Everyone knows that you need ice-white, not pale-white, to go with such leather!\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "She looks at them more closely."; + mes "\"This insolent upstart! Even worse, he copied my very own double-backward cross-stitch pattern... I can't believe it!\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "Angry red spots begin to form on her cheeks."; + mes "\"Get those... things out of my sight before I forget myself!\""; + if (@wg_state == 9) goto L_Next13; + goto L_close; + +L_Next13: + @wg_state = 10; + callfunc "setWGState"; + goto L_close; + +L_agostine_menu: + mes "[Lora Tay the Seamstress]"; + mes "The seamstress looks up at you from her work."; + mes "\"I do hope that you have not had any more dealings with this... this lumberjack of a tailor?\""; + next; + if (countitem("WinterGloves") > 0) + menu + "You mean Agostine?", L_agostine_3, + "Actually, he also made me gloves...", L_agostine_2, + "Why don't you like him?", L_agostine_4, + "No, none, really.", L_agostine_5; + menu + "You mean Agostine?", L_agostine_3, + "Why don't you like him?", L_agostine_4, + "No, none, really.", L_agostine_5; + +L_agostine_2: + if ((@wg_state < 9) || (countitem("WinterGloves") == 0)) + goto L_close; + mes "[Lora Tay the Seamstress]"; + mes "Lora inspects your gloves, shock apparent on her face."; + mes "\"Winter gloves? And he managed the join stitches without adding a single crease... no, that can't be the Agostine we were talking about...\""; + mes "Without asking, she takes your gloves and inspects them further."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"Triple inverted crossbar... he stole another of my stitching patterns! Except... no, that couldn't hold... what kind of yarn...\""; + mes "Torn between excitement, worry, and latent disgust, she frantically turns the gloves from side to side, looking for obvious flaws, her face reddening."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"No, it's perfect... Inconceivable! How could that little upstart... I don't believe it!\""; + mes "Breathing heavily with something that might be anger or confusion, she turns them inside out."; + next; + mes "[Lora Tay the Seamstress]"; + mes "She slides her fingers over the now-exposed inside whilst the color of her face approaches that of an over-ripe tomato."; + mes "\"Almost perfectly smooth...\", she whispers."; + next; + mes "[Lora Tay the Seamstress]"; + mes "She jumps up in a fit of sudden rage."; + mes "\"That's impossible! Where did he learn to sew like that! How did he cut the shapes so perfectly! When did he..."; + mes "Suddenly, she breaks into a cough."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"*cough* ... can't possibly... *cough*...\""; + mes "Lora sinks back on her chair, trying to control her cough."; + next; + if (countitem("BottleOfWater")) + menu + "(sneak out of the room)", L_End, + "Are you alright?", L_NextMenu, + "Here, have a bottle of water...", L_Give_water, + "Can I help you?", L_NextMenu; + goto L_NextMenu; + +L_NextMenu: + if (countitem("BottleOfWater") == 0) + menu + "(sneak out of the room)", L_End, + "Are you alright?", L_Next, + "Can I help you?", L_Next; + goto L_Next; + +L_Next: + mes "[Lora Tay the Seamstress]"; + mes "She holds out your gloves for you to pick up, then waves you out of the room. Fortunately, her cough seems to be slowly subsiding."; + goto L_close; + +L_agostine_3: + mes "[Lora Tay the Seamstress]"; + mes "She frowns at you."; + mes "\"What other self-absorbed tailor-pretends with the sewing skill of a mouboo are there around? Stop wasting my time.\""; + goto L_close; + +L_agostine_4: + mes "[Lora Tay the Seamstress]"; + mes "\"Is it not obvious? We are talking about someone so self-absorbed that he chose to ignore the advice of myself, greatest of the seven southern seamstresses! I cannot stand such arrogance.\""; + goto L_close; + +L_agostine_5: + mes "[Lora Tay the Seamstress]"; + mes "\"Good for you. That arrogant good-for-nothing couldn't tell a piece of cotton from chain mail if he wiped his nose with it!\""; + goto L_close; + +L_No_Water: + mes "Checking more closely, you realize that you are out of water."; + mes "You apologise to Lora, though it fortunately seems that her cough is subsiding."; + mes "She waves you out of the room."; + goto L_close; + +L_regular_intro: + mes "[Lora Tay the Seamstress]"; + mes "\"Ah, you again. Is there anything in particular you need?\""; + next; + if (@wg_state == 12) + goto L_Main_menu_proposal; + goto L_Main_menu; + +L_Give_water: + if (countitem("BottleOfWater") == 0) + goto L_No_Water; + delitem "BottleOfWater", 1; + @wg_state = 11; + callfunc "setWGState"; + + @xpval = 50000; + + getexp @xpval, 0; + mes "[Lora Tay the Seamstress]"; + mes "Lora grabs your water bottle and take a deep sip. Slowly, her head regains a more natural color. As she puts the bottle down, her cough seems to have subsided."; + mes "\"Thank you, dear; that was just the right thing at the right time.\""; + mes "[You gain " + @xpval + " experience points]"; + next; + mes "[Lora Tay the Seamstress]"; + mes "She hands you the winter gloves again."; + mes "\"Now what happened I don't know, but this wasn't made by the Agostine I remember. But I shan't be made a fool out of by one such as him.\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"If HE can sew petty every-day items for ordinary peasants, then so can I. Very well, is there anything in particular that you need made? I shall show you how a proper seamstress operates!\""; + next; + + if (@wg_state == 12) + goto L_Main_menu_proposal; + goto L_Main_menu; + +L_Main_menu: + menu + "Can you trim something for me?", L_trim, + "Can you lengthen something for me?", L_lengthen, + "Can you make me a shirt?", L_Shirt, + "Can you make me a tank top?", L_tanktop, + "Can you make me a cape?", L_cape, + "Can you make fur boots for me?", L_Fur, + "Can you make winter gloves me?", L_Fur, + "Can you sew a robe for me?", L_robe, + "Can you make a desert hat for me?", L_desert_hat, + "Can you enhance a sorcerer robe with another line color?", L_sr_linecolor, + "Goodbye for now.", L_End; + +L_Fur: + mes "[Lora Tay the Seamstress]"; + mes "\"From what? Fluffy fur? I won't work with such lowly materials.\""; + next; + goto L_Main_menu; + +L_Main_menu_proposal: + menu + "Actually...I have a proposal for you...", L_agostine_proposal, + "Goodbye for now.", L_End; + +L_agostine_proposal: + mes "[Lora Tay the Seamstress]"; + mes "\"What kind of proposal are you asking of me?\""; + next; + + menu + "I have talked to Agostine and he needs your help.", L_Next1, + "I forgot...", L_End; + +L_Next1: + mes "[Lora Tay the Seamstress]"; + mes "\"That cheat! What could he possibly want from me?"; + mes "We don't even have the same style in seaming. Is this a joke?\""; + next; + + menu + "It's no joke. He needs your help in creating a new fashion!", L_Next2, + "Yeah you're right, he was probably joking.", L_End; + +L_Next2: + mes "[Lora Tay the Seamstress]"; + mes "\"Well it depends what he wants from me."; + mes "Go see Agostine, ask him what he's planning and I will think about it.\""; + + @wg_state = 13; + callfunc "setWGState"; + goto L_close; + +L_Intro: + mes "Lora Tay seems lost in her thoughts... "; + menu + "Sorry to disturb you, but...", L_Main_menu, + "I better go talk to Agostine.", L_End; + +L_show_materials: + mes "[Lora Tay the Seamstress]"; + mes "\"Did you talk to Agostine about his idea?\""; + next; + menu + "Yes, he explained he saw a dress in a dream and gave me these materials.", L_Next3, + "No, that guy is a total wacko.", L_End; + +L_Next3: + mes "[Lora Tay the Seamstress]"; + mes "\"Wow these are such fine materials!"; + mes "These are certainly not for just any ordinary clothes..."; + mes "He must be thinking of something magnificent.\""; + next; + + menu + "He said this garment would be his first dress creation and he wanted it to be fabulous!", L_Next4; + +L_Next4: + mes "[Lora Tay the Seamstress]"; + mes "\"Fine I will accept his offer..."; + mes "But the materials he has given you need some sewing on the edges.\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"I will fix them, but I cannot use normal threading to fix these materials."; + mes "I will need a soft thin thread so I won't spoil the textures.\""; + next; + goto L_search_items; + +L_search_items: + mes "[Lora Tay the Seamstress]"; + mes "\"Please bring me " + @FINEDRESS_COCOONS + " silk cocoons."; + mes "This should cover the materials needed, and will leave extra for sewing the pieces together later on.\""; + next; + + menu + "I will go get them right away!", L_Next5, + "Here you are.", L_Give_items, + @FINEDRESS_COCOONS+" silk cocoons for a dress? Find somebody else.", L_End; + +L_Next5: + @wg_state = 15; + callfunc "setWGState"; + goto L_close; + +L_Not_enough_items: + mes "[Lora Tay the Seamstress]"; + mes "\"This is not funny. I need " + @FINEDRESS_COCOONS + " silk cocoons. No less."; + goto L_close; + +L_Give_items: + if (countitem ("SilkCocoon") < @FINEDRESS_COCOONS) + goto L_Not_enough_items; + delitem "SilkCocoon", @FINEDRESS_COCOONS; + @wg_state = 16; + callfunc "setWGState"; + + mes "[Lora Tay the Seamstress]"; + mes "\"Great, now I can spin the silk threading and fix this mess made of these fine materials."; + mes "While I do this, you will need to go get the design drawings from Agostine..."; + mes "Every tailor puts their designs on paper before they forget about it.\""; + next; + goto L_retrieve_design; + +L_retrieve_design: + mes "[Lora Tay the Seamstress]"; + mes "\"May you go retrieve the design from Agostine?\""; + next; + menu + "Certainly I'll be back soon!", L_close, + "Actually I want something else...", L_Main_menu; + +L_bringing_design: + mes "[Lora Tay the Seamstress]"; + mes "\"Welcome back, did you get the drawings I requested?\""; + next; + menu + "Here they are!", L_Next6; + +L_Next6: + mes "[Lora Tay the Seamstress]"; + mes "\"Wonderful, this dress design is magnificent!"; + mes "I am done with the threading but I will now need to sew these materials together into the design.\""; + next; + @wg_state = 18; + callfunc "setWGState"; + goto L_wait_dress_finished; + +L_wait_dress_finished: + // Sets @time_start to the current time + // if not set yet, or if the player logged off. + if (@time_start == 0) set @time_start, gettimetick(2); + if (gettimetick(2) - @time_start > 30) + goto L_dress_finished; + mes "[Lora Tay the Seamstress]"; + mes "\"It will take some time to have the dress finished."; + mes "Meanwhile, why don't you go take some air outside?\""; + goto L_close; + +L_dress_finished: + @wg_state = 19; + callfunc "setWGState"; + mes "[Lora Tay the Seamstress]"; + mes "\"Well it was difficult seaming with such fragile materials."; + mes "But I have done it. The design is finished except for one part of it.\""; + next; + + menu + "Wow it looks great, but what's missing?", L_Next7; + +L_Next7: + mes "[Lora Tay the Seamstress]"; + mes "\"Well there are white flare designs on the bottom of the dress."; + mes "I'm not great with fine cloth design so this might be something Agostine must do on his own."; + next; + + mes "[Lora Tay the Seamstress]"; + mes "\"Please take the unfinished dress to him so he may finish the edges with the cloth.\""; + next; + + menu + "Okay, can't wait to see the finished product! Thanks for your help!", L_Next8; + +L_Next8: + @wg_state = 20; + callfunc "setWGState"; + goto L_close; + +L_deliver_dress: + mes "[Lora Tay the Seamstress]"; + mes "\"Please take the unfinished dress to him so he may finish the edges with the cloth.\""; + menu + "I'm on my way.", L_close, + "I have a request...", L_Main_menu; + +L_desert_hat: + mes "[Lora Tay the Seamstress]"; + mes "The seamstress sighs."; + mes "\"One of these days it would be nice to have an actual challenge... yes, of course I can make a desert hat. A Cotton Headband, three pieces of cotton cloth. Hmm. And let's add 300 GP to that.\""; + next; + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + @o = 1; + setarray @items$, "CottonHeadband"; + setarray @item_names$, "Here is a Cotton Headband."; + callsub S_CottonHeadbandColors; + + callfunc "DynamicItemMenu$"; + if (@item$ == "") + goto L_Main_menu; + if (@item$ == "CottonHeadband") + @genitem$ = "DesertHat"; + if (@item$ != "CottonHeadband") + @genitem$ = $@DYE_colors$[@index] + "DesertHat"; + if (countitem(@item$) < 1) + goto L_desert_hat_noheadband; + if (countitem("CottonCloth") < 3) + goto L_desert_hat_nocotton; + if (Zeny < 300) + goto L_desert_hat_nogp; + delitem @item$, 1; + delitem "CottonCloth", 3; + Zeny = Zeny - 300; + getitem @genitem$, 1; + mes "[Lora Tay the Seamstress]"; + mes "\"Now then, this should only take a minute.\""; + mes "The seamstress folds your cotton cloth in a complicated fashion, wraps the resulting bundle into and out of the headband, and finally sews together several loose ends."; + next; + mes "[Lora Tay the Seamstress]"; + mes "The result resembles a huge knot."; + mes "Lora picks two ends and pulls, hard-- to your amazement, the knot unfolds, yielding a Desert Hat."; + mes "\"Here you are.\""; + next; + goto L_Main_menu; + +S_CottonHeadbandColors: + @items$[@o] = $@DYE_colors$[@o]+"CottonHeadband"; + @item_names$[@o] = "Here is a "+$@DYE_color_names$[@o]+" Cotton Headband"; + @o = @o + 1; + if(@o < getarraysize($@DYE_colors$)) goto S_CottonHeadbandColors; + return; + +L_desert_hat_nocotton: + mes "[Lora Tay the Seamstress]"; + mes "\"You're asking me to make a desert hat without enough cloth? Here, have your headband back-- see, that's how much I can do without cloth! And since I'm generous today, you can even keep your GP...\""; + next; + goto L_Main_menu; + +L_desert_hat_nogp: + mes "[Lora Tay the Seamstress]"; + mes "\"No, no, no. 300 GP. That's not that much, I've been told. I can't just work for free, now can I?\""; + next; + goto L_Main_menu; + +L_desert_hat_noheadband: + mes "[Lora Tay the Seamstress]"; + mes "\"Now that is odd. Where did your headband vanish to? Well, I'm not going to make you something as silly as a headband, so get one from elsewhere.\""; + next; + goto L_Main_menu; + +L_trim: + mes "[Lora Tay the Seamstress]"; + mes "\"Trimming... you mean that you can't do that yourself? Well, alright... I suppose I should charge 100 GP and do it.\""; + mes "\"Alright. What is it that you want trimmed?\""; + next; + + cleararray @items, 0, getarraysize(@items); + cleararray @item_names$, "", getarraysize(@item_names$); + setarray @items, 1202, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 688, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 632, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 648, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189; + setarray @item_names$, "Cotton Shirt", "Red Cotton Shirt", "Green Cotton Shirt", "Dark Blue Cotton Shirt", "Yellow Cotton Shirt", "Light Blue Cotton Shirt", "Pink Cotton Shirt", "Black Cotton Shirt", "Orange Cotton Shirt", "Purple Cotton Shirt", "Dark Green Cotton Shirt", "Tank Top", "Red Tank Top", "Green Tank Top", "Dark Blue Tank Top", "Yellow Tank Top", "Light Blue Tank Top", "Pink Tank Top", "Black Tank Top", "Orange Tank Top", "Purple Tank Top", "Dark Green Tank Top", "Cotton Skirt", "Red Cotton Skirt", "Green Cotton Skirt", "Dark Blue Cotton Skirt", "Yellow Cotton Skirt", "Light Blue Cotton Skirt", "Pink Cotton Skirt", "Black Cotton Skirt", "Orange Cotton Skirt", "Purple Cotton Skirt", "Dark Green Cotton Skirt", "Cotton Trousers", "Red Cotton Trousers", "Green Cotton Trousers", "Dark Blue Cotton Trousers", "Yellow Cotton Trousers", "Light Blue Cotton Trousers", "Pink Cotton Trousers", "Black Cotton Trousers", "Orange Cotton Trousers", "Purple Cotton Trousers", "Dark Green Cotton Trousers"; + callfunc "DynamicItemMenu"; + if (@item == 0) + goto L_Main_menu; + @delitem = @item; + @genitem = 0; + if (@item == 1202) + @genitem = 688; + if (@item == 688) + @genitem = 689; + if (@item == 632) + @genitem = 771; + if (@item == 648) + @genitem = 586; + if (@item >= 2090 && @item <= 2099) + @genitem = @item + 30; + if (@item >= 2050 && @item <= 2059) + @genitem = @item + 40; + if (@item >= 2100 && @item <= 2109) + @genitem = @item + 70; + if (@item >= 2180 && @item <= 2189) + @genitem = @item - 70; + if (@genitem == 0) + goto L_trim_impossible; + if (Zeny < 100) + goto L_trim_noZeny; + if (countitem(@delitem) < 1) + goto L_Main_menu; + + delitem @delitem, 1; + getitem @genitem, 1; + Zeny = Zeny - 100; + mes "[Lora Tay the Seamstress]"; + mes ""; + mes "\"There you are, dear.\""; + next; + goto L_Main_menu; + +L_trim_impossible: + mes "[Lora Tay the Seamstress]"; // INTERNAL ERROR + mes "\"I don't really want to shorten this any more.\""; + next; + goto L_Main_menu; + +L_trim_noZeny: + mes "[Lora Tay the Seamstress]"; + mes "\"Not enough GP? Well, just do it yourself-- trimming really is trivial.\""; + next; + goto L_Main_menu; + +L_lengthen: + mes "[Lora Tay the Seamstress]"; + mes "\"Naturally, I will need a piece of Cotton Cloth to sew onto it; I must also charge you some... hmm... does 500 GP sound reasonable? Yes, I think I shall charge that.\""; + mes "\"Now, let me see. What is it that you want lengthened?\""; + next; + + cleararray @items, 0, getarraysize(@items); + cleararray @item_names$, "", getarraysize(@item_names$); + setarray @items, 688, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 689, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 771, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 586, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119; + setarray @item_names$, "Tank Top", "Red Tank Top", "Green Tank Top", "Dark Blue Tank Top", "Yellow Tank Top", "Light Blue Tank Top", "Pink Tank Top", "Black Tank Top", "Orange Tank Top", "Purple Tank Top", "Dark Green Tank Top", "Short Tank Top", "Red Short Tank Top", "Green Short Tank Top", "Dark Blue Short Tank Top", "Yellow Short Tank Top", "Light Blue Short Tank Top", "Pink Short Tank Top", "Black Short Tank Top", "Orange Short Tank Top", "Purple Short Tank Top", "Dark Green Short Tank Top", "Miniskirt", "Red Miniskirt", "Green Miniskirt", "Dark Blue Miniskirt", "Yellow Miniskirt", "Light Blue Miniskirt", "Pink Miniskirt", "Black Miniskirt", "Orange Miniskirt", "Purple Miniskirt", "Dark Green Miniskirt", "Cotton Shorts", "Red Cotton Shorts", "Green Cotton Shorts", "Dark Blue Cotton Shorts", "Yellow Cotton Shorts", "Light Blue Cotton Shorts", "Pink Cotton Shorts", "Black Cotton Shorts", "Orange Cotton Shorts", "Purple Cotton Shorts", "Dark Green Cotton Shorts"; + + callfunc "DynamicItemMenu"; + if (@item == 0) + goto L_Main_menu; + + @delitem = @item; + @genitem = 0; + if (@item == 688) + @genitem = 1202; + if (@item == 689) + @genitem = 688; + if (@item == 771) + @genitem = 632; + if (@item == 586) + @genitem = 648; + if (@item >= 2120 && @item <= 2129) + @genitem = @item - 30; + if (@item >= 2090 && @item <= 2099) + @genitem = @item - 40; + if (@item >= 2170 && @item <= 2179) + @genitem = @item - 70; + if (@item >= 2110 && @item <= 2119) + @genitem = @item + 70; + if (@genitem == 0) + goto L_lengthen_impossible; + if (Zeny < 500) + goto L_lengthen_noZeny; + if (countitem ("CottonCloth") < 1) + goto L_lengthen_nocotton; + if (countitem(@delitem) < 1) + goto L_Main_menu; + + delitem @delitem, 1; + delitem "CottonCloth", 1; + getitem @genitem, 1; + Zeny = Zeny - 500; + mes "[Lora Tay the Seamstress]"; + mes "The seamstress cuts your piece of cotton cloth into stripes and sews them on. Using some odd liquid, she flattens the seams and borders."; + if (@delitem > 2000) // dyed + mes "She then applies another liquid-- smelling strangely of fermented apples-- to the result, wraps it up, and wrings it tightly. As she unwraps it, you observe to your amazement that the dye has spread to the newly attached area."; + mes "\"There you are, dear.\""; + next; + goto L_Main_menu; + +L_lengthen_nocotton: + mes "[Lora Tay the Seamstress]"; + mes "\"Who do you think I am? The cotton fairy? Get yourself some cloth before you ask me to sew it on.\""; + next; + goto L_Main_menu; + +L_lengthen_noZeny: + mes "[Lora Tay the Seamstress]"; + mes "\"No gold, no sewing.\""; + next; + goto L_Main_menu; + +L_lengthen_impossible: + mes "[Lora Tay the Seamstress]"; // INTERNAL ERROR + mes "\"I really can't lengthen that any more.\""; + next; + goto L_Main_menu; + +L_Shirt: + mes "[Lora Tay the Seamstress]"; + mes "\"Oh, how silly. You can buy those everywhere. Please don't bore me with such trifles, dear.\""; + next; + goto L_Main_menu; + +L_tanktop: + mes "[Lora Tay the Seamstress]"; + mes "\"A tank top? Well, hardly a challenge, but I suppose I could do that. Please get me some cloth-- plain cotton will do-- and, let's see, how does 100,000 GP for my efforts sound?\""; + mes "\"Wait, I keep forgetting, you are just an adventurer... let's make that 1000 GP, then.\""; + next; + goto L_tanktop_menu; + +L_tanktop_menu: + menu + "I think I would like something else.", L_Main_menu, + "A tank top, please (6 Cotton Cloth)", L_tanktop_long, + "A short tank top, please (5 Cotton Cloth)", L_tanktop_short, + "Goodbye for now.", L_End; + +L_tanktop_short: + if (countitem ("CottonCloth") < 5) + goto L_tanktop_ins_cloth; + if (Zeny < 1000) + goto L_tanktop_ins_Zeny; + getinventorylist; + if (@inventorylist_count == 100 && countitem("CottonCloth") > 5) + goto L_TooMany; + Zeny = Zeny - 1000; + delitem "CottonCloth", 5; + getitem "ShortTankTop", 1; + mes "[Lora Tay the Seamstress]"; + mes "You watch as Lora sews the pieces of cloth together, then flattens the seams and ends with some odd liquid."; + mes "Amazingly, the result looks like a single piece of cloth."; + mes "After little more than a few elegant cuts and folds, your tank top is ready."; + mes "\"Oh dear, it seems that I am done already. Do you need anything else?\""; + next; + goto L_tanktop_menu; + +L_tanktop_long: + if (countitem ("CottonCloth") < 6) + goto L_tanktop_ins_cloth; + if (Zeny < 1000) + goto L_tanktop_ins_Zeny; + getinventorylist; + if (@inventorylist_count == 100 && countitem("CottonCloth") > 6) + goto L_TooMany; + Zeny = Zeny - 1000; + delitem "CottonCloth", 6; + getitem "TankTop", 1; + mes "[Lora Tay the Seamstress]"; + mes "After combining your pieces of cloth into one-- miraculously making the seams and stitches vanish-- the seamstress cuts out all that doesn't belong into a tank top, then folds and stabilises the edges with additional seam lines."; + mes "\"There you are. Don't worry, I have trimmed it to match your size perfectly.\""; + next; + goto L_tanktop_menu; + +L_tanktop_ins_cloth: + mes "[Lora Tay the Seamstress]"; + mes "\"No, no, no, count again-- how much Cotton Cloth did I say I needed? That's not enough.\""; + next; + goto L_tanktop_menu; + +L_tanktop_ins_Zeny: + mes "[Lora Tay the Seamstress]"; + mes "As you note that you don't have enough GP on you, Lora rolls her eyes."; + mes "\"I don't work for free, you know. I already gave you a discounted peasant price.\""; + next; + goto L_Main_menu; + +L_cape: + mes "[Lora Tay the Seamstress]"; + mes "She shakes her head."; + mes "\"No capes. You're an adventurer, right? Do you want to get caught by a closing portcullis? Or strangled when your cape gets tangled in a tree? Or brought down by a mushroom stomping on your cape while you're trying to run away? No capes.\""; + next; + goto L_Main_menu; + +L_robe: + mes "[Lora Tay the Seamstress]"; + mes "\"A robe? Well, as long as you're not asking me to make it out of cotton...\""; + next; + if (countitem("SilkCocoon")== 0 && countitem("SilkSheet")== 0) + goto L_robe_nosilk; + goto L_robe_menu; + +L_robe_menu: + menu + "Here, I have some silk cocoons!", L_Next9, + "Here, I have some silk sheets!", L_robe_sheets, + "Where can I find silk?", L_where_silk, + "How much silk do you need?", L_how_much_silk, + "Oh, never mind.", L_Main_menu; + +L_Next9: + mes "[Lora Tay the Seamstress]"; + mes "The seamstress stares at you as if you had gone out of your mind."; + mes "\"And what precisely do you expect me to do with Silk Cocoons? String them together in some baubly chain? Somehow remove the thread and spin and weave it so that some random person can have their robe?\""; + next; + menu + "Will you trade cocoons for sheets?", L_Next10, + "Never mind.", L_Main_menu; + +L_Next10: + mes "[Lora Tay the Seamstress]"; + mes "Lora frowns."; + mes "\"It's not all that easy to get properly processed silk around here. Easier for me than for you, I admit...\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "She sighs."; + mes "\"All right, very well then. I have enough spare silk sheets right now, but you pay the silk processing for your cocoons.\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"Let's see... " + @ROBE_COCOONS_NR + " silk cocoons and " + @ROBE_ZENY + " GP should just about cover that.\""; + next; + menu + "I'm not interested.", L_Main_menu, + "Very well then, here you are.", L_Next11; + +L_Next11: + if (countitem("SilkCocoon") < @ROBE_COCOONS_NR) + goto L_robe_missing_cocoons; + if (Zeny < @ROBE_ZENY) + goto L_robe_missing_Zeny; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SilkCocoon") > @ROBE_COCOONS_NR) + goto L_TooMany; + Zeny = Zeny - @ROBE_ZENY; + delitem "SilkCocoon", @ROBE_COCOONS_NR; + mes "[Lora Tay the Seamstress]"; + mes "The seamstress puts your cocoons and GP away, takes your measurements and pulls out several silk sheets. She asks you to stretch out your arms, then pins the silk sheets in place all over your body."; + next; + goto L_Get_robe; + +L_robe_sheets: + @Robe_with_sheets = 1; + mes "[Lora Tay the Seamstress]"; + mes "\"Let's see... " + @ROBE_SHEETS_NR + " silk sheets and " + @ROBE_SHEETS_ZENY + " GP should just about cover that.\""; + next; + menu + "I'm not interested.", L_Main_menu, + "Very well then, here you are.", L_Next12; + +L_Next12: + if (countitem("SilkSheet") < @ROBE_SHEETS_NR) + goto L_robe_missing_sheets; + if (Zeny < @ROBE_SHEETS_ZENY) + goto L_r_sh_miss_Zeny; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SilkSheet") > @ROBE_SHEETS_NR) + goto L_TooMany; + Zeny = Zeny - @ROBE_SHEETS_ZENY; + delitem "SilkSheet", @ROBE_SHEETS_NR; + mes "[Lora Tay the Seamstress]"; + mes "The seamstress puts your GP away, takes your measurements and puts the silk sheets on the table. She asks you to stretch out your arms, then pins the silk sheets in place all over your body."; + next; + goto L_Get_robe; + +L_Get_robe: + mes "[Lora Tay the Seamstress]"; + mes "She proceeds to make a number of mysterious marks on the sheets with a charcoal pen. Meanwhile, your arms are getting tired, but you're afraid to lower them-- she used a lot of pins to put everything into place, and you lost track of where they went..."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"Splendid.\""; + mes "After removing the sheets (and pins!), she picks up a pair of scissors and plows through the cloth at her usual amazing pace, only stopping briefly to sew together parts here and there."; + next; + mes "[Lora Tay the Seamstress]"; + mes "She then treats the seams with some odorless liquid, making them vanish completely. Finally she hands you the finished robe."; + getitem "SilkRobe", 1; + if (@Robe_with_sheets == 1) + goto L_robe_sheet_end; + mes "\"Here you are now, this will fit. And don't you dare tell anyone that I did this! I'm not about to start a silk cocoon collection!\""; + next; + goto L_Main_menu; + +L_robe_sheet_end: + mes "\"Here you are now, this will fit. Thank you for bringing the sheets. People are so lazy nowadays! \""; + next; + goto L_Main_menu; + +L_robe_missing_cocoons: + mes "[Lora Tay the Seamstress]"; + mes "\"" + @ROBE_COCOONS_NR + " cocoons is what I said, not " + countitem("SilkCocoon") + "."; + mes @ROBE_COCOONS_NR + " is " + (@ROBE_COCOONS_NR / 10) + " as many times as you have fingers, in case that helps.\""; + next; + goto L_Main_menu; + +L_robe_missing_Zeny: + mes "[Lora Tay the Seamstress]"; + mes "\"No, no no. The way this works is that you give me the GP first and I give you the robe afterwards. You're " + (@ROBE_ZENY - Zeny) + " GP short, so come back when you can afford the robe!\""; + next; + goto L_Main_menu; + +L_robe_missing_sheets: + mes "[Lora Tay the Seamstress]"; + mes "\"" + @ROBE_SHEETS_NR + " silk sheets is what I said, not " + countitem("SilkSheet") + "."; + mes @ROBE_SHEETS_NR + " is " + (10-@ROBE_SHEETS_NR) + " less than you have fingers, in case that helps.\""; + next; + goto L_Main_menu; + +L_r_sh_miss_Zeny: + mes "[Lora Tay the Seamstress]"; + mes "\"No, no no. The way this works is that you give me the GP first and I give you the robe afterwards. You're " + (@ROBE_SHEETS_ZENY - Zeny) + " GP short, so come back when you can afford the robe!\""; + next; + goto L_Main_menu; + +L_where_silk: + mes "[Lora Tay the Seamstress]"; + mes "\"Oh, Hetchel on the Tulimshar Marketplace can weave them for you.\""; + next; + mes "[Lora Tay the Seamstress]"; + mes "She hesitates."; + mes "\"I didn't see her there the last time I visited, though. She may be visiting family. Tough luck.\""; + next; + goto L_robe_menu; + +L_how_much_silk: + mes "[Lora Tay the Seamstress]"; + mes "\"Six sheets should do fine, if they're the usual double-elbow squares.\""; + next; + goto L_robe_menu; + +L_robe_nosilk: + mes "[Lora Tay the Seamstress]"; + mes "\"What is that? You don't have any silk? Well, you're out of luck, I would say. I shan't make one out of those cotton rags; you might as well be wearing an apple sack.\""; + next; + goto L_Main_menu; + +L_End: + @ROBE_COCOONS_NR = 0; + @ROBE_ZENY = 0; + @ROBE_SHEETS_NR = 0; + @ROBE_SHEETS_ZENY = 0; + @Robe_with_sheets = 0; + goto L_close; + +L_TooMany: + mes "[Lora Tay the Seamstress]"; + mes "\"You don't have anywhere to put this. Come back when you have more room.\""; + goto L_close; + +L_sr_linecolor: + mes "[Lora Tay the Seamstress]"; + mes "\"Hmm, this has a line sewed on it already. I don't see another way than remove it and sew a new one."; + mes "That is quite a difficult work... for a casual tailor of course. I'll do that in a heart beat.\""; + next; + mes "\"However, you can expect this will cost you a large fee. Let's say " + @SORCERER_ROBE_SEW_ZENY + " GP."; + mes "Also, I will need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " sheets of Cotton Cloth of the color you want.\""; + next; + mes "\"Ok. Now please wear the robe you want me to change.\""; + @loratay_asking_robe = 1; + goto L_close; + +L_ExamineSR: + @loratay_asking_robe = 0; + mes "[Lora Tay the Seamstress]"; + mes "\"Let's see...\""; + next; + @chest_equip_id = getequipid(equip_torso); + callsub S_Get_SRColors; + mes "Lora Tay takes a closer look at what you are wearing."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"Hmm. This " + $@DYE_color_names$[@current_linecolor] + " lined " + $@DYE_color_names$[@current_maincolor] + " sorcerer robe. I see. Is that ok?\""; + if (@current_maincolor == -1 || @current_linecolor == -1) + goto L_NotSR; + menu + "Yes, that's fine. Take this one.", L_ChooseSRLineColor, + "No, I changed my mind.", L_CleanSR; + +L_NotSR: + mes "\"This isn't a Sorcerer Robe dear. Stop taking me for a fool.\""; + goto L_CleanSR; + +L_ChooseSRLineColor: + // Unequip the robe, just to simulate Lora Tay really took it + unequipbyid(equip_torso); + mes "[Lora Tay the Seamstress]"; + mes "\"And which Cotton Cloth color will you give me?\""; + menu + "A " + $@DYE_color_names$[0] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[1] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[2] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[3] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[4] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[5] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[6] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[7] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[8] + " one.", L_ItemMenus2, + "A " + $@DYE_color_names$[9] + " one.", L_ItemMenus2, + "A White one.", L_ItemMenus2, + "Hum. I changed my mind. Later maybe.", L_End; + +L_ItemMenus2: + @chosen_color = @menu - 1; + @cotton_cloth_id = 2250 + @chosen_color; + // The White Cotton Cloth is in fact the undyed one. + if (@cotton_cloth_id == 2260) + @cotton_cloth_id = 660; + if (countitem(@cotton_cloth_id) < 2) + goto L_NoColoredCottonCloth; + if (@current_linecolor == @chosen_color) + goto L_SR_SameColor; + callsub S_Get_NewSRId; + // Should not happen since it has been checked the player submitted a sorcerer robe + if (@new_sr_id == 0) + goto L_End; + + if (Zeny < @SORCERER_ROBE_SEW_ZENY) + goto L_SR_NoZeny; + if (countitem(@chest_equip_id) == 0) + goto L_SR_Vanished; + delitem @cotton_cloth_id, @SORCERER_ROBE_NUM_COTTON_CLOTH; + // Since we delete an unstackable item, we don't need to check + // for an available inventory slot. + delitem @chest_equip_id, 1; + Zeny = Zeny - @SORCERER_ROBE_SEW_ZENY; + getitem @new_sr_id, 1; + mes "Lora Tay adjusts her glasses and removes carefully the " + $@DYE_color_names$[@current_linecolor] + " string of the robe."; + mes "Then she grabs the " + $@DYE_color_names$[@chosen_color] + " cotton cloth, unfolds it and pins her needle in it."; + next; + mes "She begins to sew the new string onto the sorcerer robe."; + next; + mes "She regularly flips and flips again the robe, which starts to show her new color."; + next; + mes "After a few minutes you barely noticed, the robe seems to be ready."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"There you are dear. I have to say I made a perfect job... As always."; + mes "I hope you'll enjoy your new robe.\""; + goto L_CleanSR; + +L_SR_SameColor: + mes "[Lora Tay the Seamstress]"; + mes "\"Are you blind? Your robe is already of this color dear!\""; + goto L_CleanSR; + +L_SR_Vanished: + mes "Lora Tay adjusts her glasses and looks around, as if something was missing."; + next; + mes "[Lora Tay the Seamstress]"; + mes "\"Uh? Where is your sorcerer robe?\""; + goto L_CleanSR; + +S_Get_NewSRId: + if (@chosen_color == 0 && @current_maincolor == 10) + @new_sr_id = 798; + if (@chosen_color == 0 && @current_maincolor < 10) + @new_sr_id = 2220 + @current_maincolor; + if (@chosen_color > 0) + @new_sr_id = 5000 + @current_maincolor + (@chosen_color-1)*11; + return; + +L_NoColoredCottonCloth: + mes "[Lora Tay the Seamstress]"; + mes "\"You don't seem to own enough Cotton Cloth of this color. I need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " of them. Too bad.\""; + goto L_CleanSR; + +L_SR_NoZeny: + mes "[Lora Tay the Seamstress]"; + mes "\"You don't seem to be able to afford my services, dear.\""; + goto L_CleanSR; + +S_Get_SRColors: + @current_maincolor = -1; + @current_linecolor = -1; + // Line color + if (@chest_equip_id == 798 || (@chest_equip_id >= 2220 && @chest_equip_id <= 2229)) + @current_linecolor = 0; + if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109) + @current_linecolor = 1 + (@chest_equip_id-5000)/11; + // Main color + if (@chest_equip_id == 798) + @current_maincolor = 10; + if (@chest_equip_id >= 2220 && @chest_equip_id <= 2229) + @current_maincolor = @chest_equip_id - (@chest_equip_id/10)*10; + if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109) + @current_maincolor = @chest_equip_id - 5000 - (@current_linecolor-1)*11; + return; + +L_CleanSR: + @current_maincolor = 0; + @current_linecolor = 0; + @chest_equip_id = 0; + @new_sr_id = 0; + @chosen_color = 0; + @cotton_cloth_id = 0; + goto L_close; + +L_close: + @wg_state = 0; + close; +} diff --git a/npc/010-2/mapflags.txt b/npc/010-2/mapflags.txt new file mode 100755 index 00000000..b6c9c958 --- /dev/null +++ b/npc/010-2/mapflags.txt @@ -0,0 +1 @@ +//010-2 mapflag resave 010-1,27,97 diff --git a/npc/010-2/workers.txt b/npc/010-2/workers.txt new file mode 100755 index 00000000..912cd8a6 --- /dev/null +++ b/npc/010-2/workers.txt @@ -0,0 +1,15 @@ + +010-2,23,70,0 script Josh NPC155,{ + mes "[Josh]"; + mes "\"We're working on getting the cellar pass open.\""; + close; +} + +010-2,39,75,0 script Zack NPC155,{ + @halloween_npc_id = $@halloween_npc_zack; + callfunc "TrickOrTreat"; + + mes "[Zack]"; + mes "\"My brother and I are fixing the cellar pass.\""; + close; +} diff --git a/npc/011-1/_import.txt b/npc/011-1/_import.txt new file mode 100644 index 00000000..e69de29b diff --git a/npc/011-1/_mobs.txt b/npc/011-1/_mobs.txt new file mode 100644 index 00000000..b579ef20 --- /dev/null +++ b/npc/011-1/_mobs.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-1: Woodland mobs diff --git a/npc/011-1/_savepoints.txt b/npc/011-1/_savepoints.txt new file mode 100644 index 00000000..e3acbb40 --- /dev/null +++ b/npc/011-1/_savepoints.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-1: Woodland saves diff --git a/npc/011-1/_warps.txt b/npc/011-1/_warps.txt new file mode 100644 index 00000000..a27aa2ef --- /dev/null +++ b/npc/011-1/_warps.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-1: Woodland warps diff --git a/npc/011-1/alchemist.txt b/npc/011-1/alchemist.txt new file mode 100755 index 00000000..5b2b44ac --- /dev/null +++ b/npc/011-1/alchemist.txt @@ -0,0 +1,1033 @@ +011-1,117,77,0 script Rauk NPC103,{ + // Setzer quest/monster oil quest participation + @SETZER_INITIAL = 0; + @SETZER_KNOWS_OIL = 1; + @SETZER_KNOWS_STINGER = 2; + + @Q_MASK = NIBBLE_3_MASK; + @Q_SHIFT = NIBBLE_3_SHIFT; + + @wants_sulphur = (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)); + @wants_ironpowder = (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); + @Q_status = (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; + // End of Setzer quest/monster oil quest participation + + @QUEST_CAN_GET_DYE_HERE = 2; + @QUEST_HAS_SOLVED_DYE_PUZZLE = 3; + @QUEST_GUESS_BASE = 4; + + @CHOICE_IRON = 0; + @CHOICE_CONCENTRATION = 1; + @CHOICE_DYEING_INTRO = 2; + @CHOICE_DYE = 3; + @CHOICE_MONSTER_OIL = 4; + @CHOICE_MANA_POTION = 5; + @CHOICE_SULPHUR_POWDER = 6; + @CHOICE_IRON_POWDER = 7; + @CHOICE_ABORT = 8; + + setarray @menuitems$, "", "", "", "", "", "", "", ""; + @c = 0; + + @menuitems$[@c] = "Iron potion."; + @menuid[@c] = @CHOICE_IRON; + @c = @c + 1; + + @menuitems$[@c] = "Concentration potion."; + @menuid[@c] = @CHOICE_CONCENTRATION; + @c = @c + 1; + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_post_mana_potion_c; + @menuitems$[@c] = "Mana potion."; + @menuid[@c] = @CHOICE_MANA_POTION; + @c = @c + 1; + goto L_post_mana_potion_c; + +L_post_mana_potion_c: + if (QUEST_clothdyer_knowsdye >= @QUEST_CAN_GET_DYE_HERE) + goto L_skip_introducing; + + mes "[Rauk the Alchemist]"; + mes "\"I'm learning the ancient science of the alchemy."; + mes "I already know how to create a couple of potions!!\""; + mes "\"Do you want me to create one for you?\""; + next; + if (QUEST_clothdyer_knowsdye == 1) + goto L_pre_dyeing; + goto L_certain_condition; + +L_skip_introducing: + mes "[Rauk the Alchemist]"; + mes "\"Hello, welcome back! Are you interested in dyes again, or in one of my potions?\""; + next; + @menuitems$[@c] = "Dye, please."; + @menuid[@c] = @CHOICE_DYE; + @c = @c + 1; + goto L_certain_condition; + +L_pre_dyeing: + @menuitems$[@c] = "Actually, can you make dye?"; + @menuid[@c] = @CHOICE_DYEING_INTRO; + @c = @c + 1; + goto L_certain_condition; + +L_certain_condition: + if (!@wants_sulphur) + goto L_post_sulphur_option; + @menuitems$[@c] = "Can you make sulphur powder?"; + @menuid[@c] = @CHOICE_SULPHUR_POWDER; + @c = @c + 1; + goto L_post_sulphur_option; + +L_post_sulphur_option: + if (!@wants_ironpowder) + goto L_post_ironpwd_option; + @menuitems$[@c] = "Can you make iron powder?"; + @menuid[@c] = @CHOICE_IRON_POWDER; + @c = @c + 1; + goto L_post_ironpwd_option; + +L_post_ironpwd_option: + if (@Q_status == @SETZER_INITIAL) + goto L_post_monster_oil; + @menuitems$[@c] = "Can you make monster oil?"; + @menuid[@c] = @CHOICE_MONSTER_OIL; + @c = @c + 1; + goto L_post_monster_oil; + +L_post_monster_oil: + @menuitems$[@c] = "No thanks."; + @menuid[@c] = @CHOICE_ABORT; + @c = @c + 1; + goto L_Main_menu; + +L_Main_menu: + + menu + @menuitems$[0], L_MenuItems, + @menuitems$[1], L_MenuItems, + @menuitems$[2], L_MenuItems, + @menuitems$[3], L_MenuItems, + @menuitems$[4], L_MenuItems, + @menuitems$[5], L_MenuItems, + @menuitems$[6], L_MenuItems, + @menuitems$[7], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + + if (@menu >= @c) + goto L_Abort; + if (@menuid[@menu] == @CHOICE_IRON) + goto L_Iron; + if (@menuid[@menu] == @CHOICE_CONCENTRATION) + goto L_concentration; + if (@menuid[@menu] == @CHOICE_DYEING_INTRO) + goto L_dyeing_intro; + if (@menuid[@menu] == @CHOICE_DYE) + goto L_pick_colour; + if (@menuid[@menu] == @CHOICE_MONSTER_OIL) + goto L_monster_oil; + if (@menuid[@menu] == @CHOICE_MANA_POTION) + goto L_mana_potion; + if (@menuid[@menu] == @CHOICE_SULPHUR_POWDER) + goto L_Sulphur; + if (@menuid[@menu] == @CHOICE_IRON_POWDER) + goto L_Iron_powder; + if (@menuid[@menu] == @CHOICE_ABORT) + goto L_Abort; + goto L_Abort; + +L_Iron_powder: + mes "[Rauk the Alchemist]"; + mes "\"Iron powder? Hmm, I can extract some iron powder out of a chunk of iron ore, but that will require me to dissolve it. If you give me a chunk of iron ore and 100 GP for the acid, I can do it.\""; + next; + menu + "Never mind.", L_Abort, + "Here you are!", L_Next; + +L_Next: + if (countitem("IronOre") < 1) + goto L_Iron_powder_noore; + if (Zeny < 100) + goto L_Iron_powder_noZeny; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("IronOre") > 1 + && countitem("IronPowder") < 1) + goto L_Iron_powder_full; + delitem "IronOre", 1; + Zeny = Zeny - 100; + getitem "IronPowder", 4; + mes "[Rauk the Alchemist]"; + mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves."; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel, followed by a cup of water. He removes the residual metal powder from the cloth and hands it to you."; + mes "\"This is about as fine as I can make it without mechanical help.\""; + close; + +L_Iron_powder_noore: + mes "[Rauk the Alchemist]"; + mes "\"I do need a chunk of iron ore. Please return when you have one.\""; + close; + +L_Iron_powder_noZeny: + mes "[Rauk the Alchemist]"; + mes "\"I'm sorry, but I must ask that you pay 100 GP – the acid I use is not cheap.\""; + close; + +L_Iron_powder_full: + mes "[Rauk the Alchemist]"; + mes "\"I don't think that you have room to carry this. Please come back later.\""; + close; + +L_Sulphur: + mes "[Rauk the Alchemist]"; + mes "\"Oh, that is easy. Bring me three piles of volcanic ash and three mauve leaves, and I will extract twelve piles of sulphur ash for you.\""; + next; + menu + "I will be back.", L_Abort, + "No, I won't!", L_Abort, + "Here you are!", L_Next1; + +L_Next1: + if (countitem("PileOfAsh") < 3) + goto L_Sulphur_noash; + if (countitem("MauveHerb") < 3) + goto L_Sulphur_nomauve; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("SulphurPowder") == 0 + && countitem("PileOfAsh") > 3 + && countitem("MauveHerb") > 3) + goto L_Sulphur_nospace; + + delitem "PileOfAsh", 3; + delitem "MauveHerb", 3; + getitem "SulphurPowder", 12; + mes "[Rauk the Alchemist]"; + mes "You watch Rauk burn the mauve leaves in the midst of the ashes. He then dissolves the result and pours it through a filter, finally heating up the residual liquid."; + next; + mes "[Rauk the Alchemist]"; + mes "The water having evaporated, only some yellow powder is left over. Rauk carefully pours it into your hand."; + mes "\"This should be precisely twelve half-ounces of sulphur powder.\""; + close; + +L_Sulphur_noash: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have all three piles of volcanic ash.\""; + close; + +L_Sulphur_nomauve: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have the three mauve leaves I asked for.\""; + close; + +L_Sulphur_nospace: + mes "[Rauk the Alchemist]"; + mes "\"Oh dear. You don't seem to be able to carry the sulphur powder.\""; + close; + +L_mana_potion: + mes "[Rauk the Alchemist]"; + mes "\"Humh... I do believe that I have a recipe somewhere. One moment...\""; + mes "Rauk pulls a small book out of his sleeve and leafs through it."; + mes "\"Aha, here we are. Hmm, I'm not convinced that this is the best possible recipe...\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"I shall need one pearl, one bottle of water, thirty mauve leaves, twenty gamboge leaves, and five piles of volcanic ash.\""; + next; + menu + "Here you are!", L_Get_mana_potion, + "Never mind.", L_Main_menu; + +L_Get_mana_potion: + if(countitem("MauveHerb") < 30) + goto L_mana_potion_lacking; + if(countitem("GambogeHerb") < 20) + goto L_mana_potion_lacking; + if(countitem("PileOfAsh") < 5) + goto L_mana_potion_lacking; + if(countitem("Pearl") < 1) + goto L_mana_potion_lacking; + if(countitem("BottleOfWater") < 1) + goto L_mana_potion_lacking; + getinventorylist; + if ((@inventorylist_count == 100) + && (countitem("MauveHerb") > 30) + && (countitem("PileOfAsh") > 5) + && (countitem("Pearl") > 1) + && (countitem("BottleOfWater") > 1) + && (countitem("ManaPotion") < 1)) + goto L_mana_potion_toomuch; + delitem "MauveHerb", 30; + delitem "GambogeHerb", 20; + delitem "PileOfAsh", 5; + delitem "Pearl", 1; + delitem "BottleOfWater", 1; + getitem "ManaPotion", 1; + mes "[Rauk the Alchemist]"; + mes "Rauk grinds the leaves, then crushes the pearl. Taking out a small charcoal oven, he heats up your water bottle and dissolves first the pearl powder, then the ashes."; + mes "The brew begins to bubble violently."; + next; + mes "[Rauk the Alchemist]"; + mes "Taking the bottle with a pair of tongs, he pours the liquid through a fine sieve, discarding the liquid."; + mes "He then mixes the residual paste with the leaves, stirs in a little water from the pond and fills the result into a separate bottle."; + next; + mes "[Rauk the Alchemist]"; + mes "\"Here you are. I hope that this is what you wanted.\""; + next; + goto L_Main_menu; + +L_mana_potion_toomuch: + mes "[Rauk the Alchemist]"; + mes "\"You look quite burdened already. Why don't you drop off a few things first, and come back later?\""; + next; + goto L_Main_menu; + +L_mana_potion_lacking: + mes "[Rauk the Alchemist]"; + mes "\"Sorry, but I need one Pearl, one Bottle of Water, 30 Mauve Leaves, 20 Gamboge Leaves, and five Piles of Ash.\""; + next; + goto L_Main_menu; + +L_Iron: + @COST_PER_IRON_POTION = 2; + + mes "\" To make them, I'm going to need " + @COST_PER_IRON_POTION + " Small Mushrooms per Iron Potion. How many Iron Potions would you like?\""; + input @count; + + if (@count == 0) + close; + @empty = countitem("SmallMushroom"); + + if (@empty < @count * @COST_PER_IRON_POTION) + goto L_No_iron; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SmallMushroom") == 0 && @empty > @count) + goto L_TooMany; + + delitem "SmallMushroom", @COST_PER_IRON_POTION * @count; + getitem "IronPotion", @count; + close; + +L_concentration: + @COST_PER_CONCENTRATION_POTION = 2; + + mes "\" To make them, I'm going to need " + @COST_PER_CONCENTRATION_POTION + " Pink Petals per Concentration Potion. How many Concentration Potions would you like?\""; + input @count; + + if (@count == 0) + close; + @empty = countitem("PinkPetal"); + + if (@empty < @count * @COST_PER_CONCENTRATION_POTION) + goto L_No_concentration; + getinventorylist; + if (@inventorylist_count == 100 && countitem("PinkPetal") == 0 && @empty > @count) + goto L_TooMany; + + delitem "PinkPetal", @COST_PER_CONCENTRATION_POTION * @count; + getitem "ConcentrationPotion", @count; + close; + +L_No_iron: + mes "\"You have to bring me 2 Small Mushrooms for each Iron Potion.\""; + close; + +L_No_concentration: + mes "\"You have to bring me 2 Pink Petals for each Concentration Potion.\""; + close; + +L_dyeing_intro: + mes "[Rauk the Alchemist]"; + mes "Rauk pauses for a moment."; + mes "\"Hmm, I'm not very good at that... I can only make simple dyes, the ones that you can use for cotton and wool.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"For the truly powerful ones that you can use to dye a person or an entire lake with, I would need a powerful catalyst, like an Obsidian Spork or a Wumpus Egg...\""; + mes "Rauk seems to be lost in his thoughts."; + next; + menu + "I only want to dye clothes, though...", L_Next2, + "What's a 'Wumpus egg'?", L_wumpus_egg_intro, + "What's an 'Obsidian Spork'?", L_ObsidianSporkIntro, + "Er, never mind...", L_Abort; + +L_Next2: + mes "[Rauk the Alchemist]"; + mes "\"Oh, just for clothes? Well, that is easy. I can make red, yellow, light blue, orange, pink, green, dark blue, black and purple dye, if you can get me the ingredients for it.\""; + next; + QUEST_clothdyer_knowsdye = 2; + goto L_pick_colour; + +L_wumpus_egg_intro: + mes "[Rauk the Alchemist]"; + mes "Rauk's eyes brighten up."; + mes "\"Ah, a wumpus egg is one of the most powerful catalysts out there, useful for transmutation and transchromation! Unfortunately the Common Wumpus is almost completely extinct these days, so they are hard to find."; + mes "Should you find one, please let me know – I will pay well for one!\""; + close; + +L_ObsidianSporkIntro: + mes "[Rauk the Alchemist]"; + mes "Rauk scratches his head."; + mes "\"Hm, obsidian is a dark, glass-like material that you can normally find near volcanos. Shaping it isn't too hard, but shaping it without it losing its magical properties is almost impossible.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Obsidian sporks are therefore hard to make, but they are said to be very useful in certain kinds of alchemy."; + mes "Should you find one, please let me know!\""; + close; + +L_pick_colour: + menu + "What are the ingredients you need?", L_description, + "Red", L_Red, + "Yellow", L_Yellow, + "Light blue", L_light_blue, + "Green", L_Green, + "Orange", L_Orange, + "Pink", L_Pink, + "Dark blue", L_dark_blue, + "Black", L_black, + "Purple", L_Purple, + "Dark Green", L_dark_green, + "Nothing, really.", L_Abort; + +L_description: + mes "[Rauk the Alchemist]"; + mes "\"The kinds of dyes I know are made from herbs – alizarin for red, gamboge for yellow, cobalt for blue, and mauve as binding agent for dark colors.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Some of the colors need more ingredients, including some that you can't find here, so I have to charge money for them."; + mes "Oh, and for a proper dark blue and purple I also need a pearl; without pearl dust they would not shimmer properly.\""; + next; + goto L_description_quick; + +L_description_quick: + menu + "What do you need for red dye?", L_d_red, + "What do you need for yellow dye?", L_d_yellow, + "What do you need for light blue dye?", L_d_light_blue, + "What do you need for green dye?", L_d_green, + "What do you need for orange dye?", L_d_orange, + "What do you need for pink dye?", L_d_pink, + "What do you need for dark blue dye?", L_d_dark_blue, + "What do you need for black dye?", L_d_black, + "What do you need for purple dye?", L_d_purple, + "What do you need for dark green dye?", L_d_dark_green, + "Actually...", L_NextMenu; + +L_NextMenu: + menu + "Can you make some dye for me, please?", L_pick_colour, + "Where can I get the herbs?", L_d_herbs, + "Where can I find pink petals?", L_d_pink_petals, + "Where can I find iron ore?", L_d_ore, + "Where can I find a pearl?", L_d_pearl, + "Where can I find maggot slime?", L_d_maggot_slime, + "I see. Thank you, and a good day to you!", L_Abort; + +L_d_herbs: + mes "[Rauk the Alchemist]"; + mes "\"Alizarin, mauve, cobalt and gamboge bushes grow in this general area. I haven't seen them nearby, but take a look around; I am sure you will find some.\""; + next; + goto L_description_quick; + +L_d_pink_petals: + mes "[Rauk the Alchemist]"; + mes "\"Just take some from the pink flowers around here. But be careful, they seem to be a bit fond of them.\""; + next; + goto L_description_quick; + +L_d_ore: + mes "[Rauk the Alchemist]"; + mes "\"Iron ore you should be able to find in some mine, I think. That's where people usually get it from, I have been told.\""; + next; + goto L_description_quick; + +L_d_pearl: + mes "[Rauk the Alchemist]"; + mes "\"A pearl... hm, that might be tricky. You normally find them in clams, but I haven't seen many of those here in the woodlands.\""; + next; + goto L_description_quick; + +L_d_maggot_slime: + mes "[Rauk the Alchemist]"; + mes "\"As the name might have given away already, maggot slime is most easily obtained from maggots. Still, there are some other creatures – such as bats – that secrete a similar kind of slime that for alchemistic purposes is equivalent.\""; + next; + goto L_description_quick; + +L_intermediate: + menu + "Can you make some dye for me?", L_pick_colour, + "Can you describe the ingredients?", L_description_quick, + "Never mind.", L_Abort; + +L_Ok3: + mes "[Rauk the Alchemist]"; + mes "\"Here is your dye. Remember to use all of it at once or the color may bleach out.\""; + next; + goto L_pick_colour; + +L_Red: + if (countitem("AlizarinHerb") < 10) + goto L_Red_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10) + goto L_TooMany; + delitem "AlizarinHerb", 10; + getitem "RedDye", 1; + goto L_Ok3; + +L_Red_fail: + mes "[Rauk the Alchemist]"; + mes "\"Hmm, sorry, but I do need ten alizarin leaves to make red dye.\""; + next; + goto L_intermediate; + +L_d_red: + mes "[Rauk the Alchemist]"; + mes "\"Red dye is fairly simple to make. Bring me ten leaves of alizarin, and I can brew it for you right away.\""; + next; + goto L_intermediate; + +L_Yellow: + if (countitem("GambogeHerb") < 10) + goto L_Yellow_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("GambogeHerb") > 10) + goto L_TooMany; + delitem "GambogeHerb", 10; + getitem "YellowDye", 1; + goto L_Ok3; + +L_Yellow_fail: + mes "[Rauk the Alchemist]"; + mes "\"Without enough gamboge leaves – I would need at least ten--, I can't make yellow dye for you.\""; + next; + goto L_intermediate; + +L_d_yellow: + mes "[Rauk the Alchemist]"; + mes "\"Yellow dye is no more than gamboge extract. If you get me ten gamboge leaves, I can make it easily.\""; + next; + goto L_intermediate; + +L_light_blue: + if (countitem("CobaltHerb") < 10) + goto L_light_blue_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 10) + goto L_TooMany; + delitem "CobaltHerb", 10; + getitem "LightBlueDye", 1; + goto L_Ok3; + +L_light_blue_fail: + mes "[Rauk the Alchemist]"; + mes "\"Sorry, but I won't give it to you for less than ten cobalt leaves.\""; + next; + goto L_intermediate; + +L_d_light_blue: + mes "[Rauk the Alchemist]"; + mes "\"Light blue dye is what you get if you let cobalt leaves sit in alcohol over night. I have some here and will trade it for ten fresh cobalt leaves.\""; + next; + goto L_intermediate; + +L_Green: + if (countitem("CobaltHerb") < 20) + goto L_Green_fail; + if (countitem("GambogeHerb") < 20) + goto L_Green_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 20 + && countitem("GambogeHerb") > 20) + goto L_TooMany; + if (Zeny < 1000) + goto L_Green_fail; + delitem "CobaltHerb", 20; + delitem "GambogeHerb", 20; + Zeny = Zeny - 1000; + getitem "GreenDye", 1; + goto L_Ok3; + +L_Green_fail: + mes "[Rauk the Alchemist]"; + mes "\"No... I need enough gamboge and cobalt to make your dye.\""; + mes "\"Twenty gamboge leaves, twenty cobalt leaves, and 1000 GP should be sufficient.\""; + next; + goto L_intermediate; + +L_d_green: + mes "[Rauk the Alchemist]"; + mes "\"Green dye is a little tricky to make, since you have to boil gamboge leaves at just the right temperature while stirring in a cobalt ester."; + mes "Making the cobalt ester is not easy, and every time I try I end up melting a crystal flask beyond repair...\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Thus, I will need twenty gamboge leaves, twenty cobalt leaves, and 1000 GP for materials."; + next; + goto L_intermediate; + +L_d_no_green: + mes "[Rauk the Alchemist]"; + mes "\"Come back when you are a little more experienced. I might be able to tell you how to make green dye then.\""; + close; + +L_Orange: + if (countitem("AlizarinHerb") < 10) + goto L_Orange_fail; + if (countitem("GambogeHerb") < 10) + goto L_Orange_fail; + if (countitem("IronOre") < 2) goto L_Orange_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("IronOre") > 2) + goto L_TooMany; + if (Zeny < 1000) + goto L_Orange_fail; + delitem "AlizarinHerb", 10; + delitem "GambogeHerb", 10; + delitem "IronOre", 2; + Zeny = Zeny - 1000; + getitem "OrangeDye", 1; + goto L_Ok3; + +L_Orange_fail: + mes "[Rauk the Alchemist]"; + mes "\"I'm sorry, but I need 1000 GP, two chunks of iron ore, and ten each of gamboge and alizarin leaves.\""; + next; + goto L_intermediate; + +L_d_orange: + mes "[Rauk the Alchemist]"; + mes "\"Orange dye is fun to make, but it requires some burnt iron, and also consummate sulphur powder, which you cannot get here easily."; + mes "\"Still, for 1000 GP, two pieces of iron ore, ten alizarin leaves and ten gamboge leaves, I can make you a vial of orange dye.\""; + next; + goto L_intermediate; + +L_Pink: + if (countitem("AlizarinHerb") < 10) + goto L_Pink_fail; + if (countitem("PinkPetal") < 6) + goto L_Pink_fail; + if (Zeny < 1000) + goto L_Pink_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10 + && countitem("PinkPetal") > 6) + goto L_TooMany; + delitem "AlizarinHerb", 10; + delitem "PinkPetal", 6; + Zeny = Zeny - 1000; + getitem "PinkDye", 1; + goto L_Ok3; + +L_Pink_fail: + mes "[Rauk the Alchemist]"; + mes "\"No, you don't have all I need, and that would be ten alizarin leaves, six pink flower petals, and 1000 GP.\""; + next; + goto L_intermediate; + +L_d_pink: + mes "[Rauk the Alchemist]"; + mes "\"Pink dye... that's a funny one: you can't get proper pink out of the usual herbs. You do need ten leaves of alizarin, but you also need six pink flower petals."; + mes "To properly extract the pink from the petals, you have to boil it in concentrated utenum; I will have to charge 1000 GP for that.\""; + next; + goto L_intermediate; + +L_dark_blue: + if (countitem("CobaltHerb") < 100) + goto L_dark_blue_fail; + if (countitem("MauveHerb") < 50) + goto L_dark_blue_fail; + if (countitem("Pearl") < 1) + goto L_dark_blue_fail; + if (Zeny < 10000) + goto L_dark_blue_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 100 + && countitem("MauveHerb") > 50 + && countitem("Pearl") > 1) + goto L_TooMany; + delitem "CobaltHerb", 100; + delitem "MauveHerb", 50; + delitem "Pearl", 1; + Zeny = Zeny - 10000; + getitem "DarkBlueDye", 1; + goto L_Ok3; + +L_dark_blue_fail: + mes "[Rauk the Alchemist]"; + mes "\"I will need all of the ingredients to make dark blue dye for you.\""; + mes "\"I need 100 cobalt leaves, 50 mauve leaves, one pearl, and 10,000 GP.\""; + next; + goto L_intermediate; + +L_d_dark_blue: + mes "[Rauk the Alchemist]"; + mes "\"Dark blue dye is one of the trickiest ones. You need concentrated extract from 100 leaves of cobalt and 50 mauve leaves for proper binding."; + mes "For the right shimmer, a pearl is indispensible, and the most expensive part is a rare kind of ayanamian sapphire dust that I have to charge 10,000 GP for.\""; + next; + goto L_intermediate; + +L_Purple: + if (countitem("CobaltHerb") < 100) + goto L_Purple_fail; + if (countitem("AlizarinHerb") < 100) + goto L_Purple_fail; + if (countitem("MauveHerb") < 20) + goto L_Purple_fail; + if (countitem("Pearl") < 1) + goto L_Purple_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 100 + && countitem("AlizarinHerb") > 100 + && countitem("MauveHerb") > 20 + && countitem("Pearl") > 1) + goto L_TooMany; + if (Zeny < 40000) + goto L_Purple_fail; + delitem "CobaltHerb", 100; + delitem "AlizarinHerb", 100; + delitem "MauveHerb", 20; + delitem "Pearl", 1; + Zeny = Zeny - 40000; + getitem "PurpleDye", 1; + goto L_Ok3; + +L_Purple_fail: + mes "[Rauk the Alchemist]"; + mes "\"No... I don't think that you have enough ingredients for this. Let me check my notes.\""; + mes "\"What I need are 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP.\""; + next; + goto L_intermediate; + +L_d_purple: + mes "[Rauk the Alchemist]"; + mes "\"Hm, Purple dye... proper Tritan Purple is hard to make. Fortunately, the correct recipe has survived... but some ingredients are quite costly."; + mes "I can't even tell you why, unfortunately, since this is a bit of an alchemistic secret, and I really don't want to argue this out with people who can turn my nose into a rhubarb.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Still, I can make it for you, out of 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP. Some other ingredients are covered by the GP.\""; + next; + goto L_intermediate; + +L_black: + if (countitem("CobaltHerb") < 40) + goto L_black_fail; + if (countitem("AlizarinHerb") < 40) + goto L_black_fail; + if (countitem("GambogeHerb") < 40) + goto L_black_fail; + if (countitem("MauveHerb") < 40) + goto L_black_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 40 + && countitem("AlizarinHerb") > 40 + && countitem("GambogeHerb") > 40 + && countitem("MauveHerb") > 40) + goto L_TooMany; + if (Zeny < 20000) + goto L_black_fail; + delitem "CobaltHerb", 40; + delitem "AlizarinHerb", 40; + delitem "GambogeHerb", 40; + delitem "MauveHerb", 40; + Zeny = Zeny - 20000; + getitem "BlackDye", 1; + goto L_Ok3; + +L_black_fail: + mes "[Rauk the Alchemist]"; + mes "\"I am sorry, but you don't have all the items I need to make black dye. I need fourty leaves of alizarin, cobalt, gamboge and mauve each, and 20,000 GP.\""; + next; + goto L_intermediate; + +L_d_black: + mes "[Rauk the Alchemist]"; + mes "\"Black? Ah! such a wonderful choice of color. It's my favorite! Well, if you too want something black, I would be delighted to make you some black dye."; + mes "Just bring me 40 leaves each of cobalt, alizarin, gamboge and mauve.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Oh, and 20,000 GP for the charcoal and diamond dust mixture you need to keep the mauve smell out.\""; + next; + goto L_intermediate; + +L_dark_green: + if (BaseLevel < 30) + goto L_d_no_green; + if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE) + goto L_d_dark_green; + if (countitem("CobaltHerb") < 10) + goto L_dark_green_fail; + if (countitem("GambogeHerb") < 10) + goto L_dark_green_fail; + if (countitem("MauveHerb") < 10) + goto L_dark_green_fail; + if (countitem("MaggotSlime") < 1) + goto L_dark_green_fail; + if (Zeny < 1000) + goto L_dark_green_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("MauveHerb") > 10 + && countitem("MaggotSlime") > 1) + goto L_TooMany; + delitem "CobaltHerb", 10; + delitem "MauveHerb", 10; + delitem "GambogeHerb", 10; + delitem "MaggotSlime", 1; + Zeny = Zeny - 1000; + getitem "DarkGreenDye", 1; + goto L_Ok3; + +L_dark_green_fail: + mes "[Rauk the Alchemist]"; + mes "Rauk frowns as he examines the items you hand him."; + mes "\"No, this will not do. I need ten gamboge leaves, ten cobalt leaves, ten mauve leaves, slime from one maggot, and 1000 GP.\""; + next; + goto L_intermediate; + +L_d_dark_green: + mes "[Rauk the Alchemist]"; + if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE) + goto L_d_dark_green_quest; + mes "\"Since we have figured out how much maggot slime we need for you, all you have to bring me are 1000 GP, one maggot slime, and ten leaves each of mauve, cobalt, and gamboge.\""; + next; + goto L_intermediate; + +L_d_dark_green_quest: + mes "\"Ah, dark green... dark green dye is actually simple to make, except for one tiny little problem: dark green clothes fade very quickly when they touch human skin. By far the best way to fixate the color is argentum powder, mixed with dark green dye essence extracted from maggot slime.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"But just how much maggot slime goes into the fixative and how much into the rest of the mixture varies completely for every individual. We will have to figure out just how many thousandth ounces it is for you before I can make dark green dye for you.\""; + next; + if (QUEST_clothdyer_knowsdye == @QUEST_CAN_GET_DYE_HERE) + QUEST_clothdyer_knowsdye = (rand(1000) + @QUEST_GUESS_BASE); + goto L_d_dark_green_q_main; + +L_d_dark_green_q_main: + menu + "Uh... no thanks.", L_intermediate, + "So nobody else can wear clothes I dye?", L_dark_green_q_wear, + "OK, what should I do?", L_VerdeEscuro_qexp, + "Let's figure it out!", L_VerdeEscuro_qguess; + +L_dark_green_q_wear: + mes "[Rauk the Alchemist]"; + mes "\"The color stabilises after a week or so."; + mes "Others can wear the clothes you have dyed – just make sure that you wear those clothes for a week before passing them on.\""; + next; + goto L_d_dark_green_q_main; + +L_VerdeEscuro_qexp2: + mes "[Rauk the Alchemist]"; + mes "Rauk blinks."; + mes "\"Very well. It works like this: you give me a maggot slime and tell me how many thousandth parts go into one part of the dye potion.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Then we try whether that was the right ratio. I will tell you if you guessed right, but if you were wrong, I will tell you whether you guessed too high or too low.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"With enough slimes and enough tries we should be able to figure out just how much you need.\""; + next; + menu + "Er... can you explain that again?", L_VerdeEscuro_qexp2, + "Let's do it!", L_VerdeEscuro_qguess, + "I don't have time for this.", L_intermediate; + +L_VerdeEscuro_qexp: + mes "[Rauk the Alchemist]"; + mes "\"We have to measure the balance between your light and your dark bile – two of your humors – and use that as the maggot slime concentration.\""; + mes "\"This will probably take several tries; for each try we need maggot slime from one maggot.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Each time you tell me how many thousandth parts of one ounce of the concentrate you want to use in the fixative. I will stir the mixture appropriately and put the rest of the slime into the base mixture. We then put the two together, and you dip your finger in.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"If the mixture is too dark, then that means that we put too much maggot slime into the fixative. If it discolours, we put in too little. But if it retains its color, we are done.\""; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk smiles."; + mes "\"But don't worry, I will happily do all this for free – I rather enjoy these little games.\""; + next; + menu + "Er... can you explain that again?", L_VerdeEscuro_qexp, + "Errr... what?", L_VerdeEscuro_qexp2, + "Let's do it!", L_VerdeEscuro_qguess, + "I don't have time for this.", L_intermediate; + +L_VerdeEscuro_qguess: + if (countitem("MaggotSlime") < 1) + goto L_VerdeEscuro_noslim; + delitem "MaggotSlime", 1; + + mes "[Rauk the Alchemist]"; + mes "Rauk fills your maggot slime into a small bottle and picks a glass bottle from within his robe."; + mes "\"Now we need to figure out just how many thousandths you need. First, tell me how many tenths of an ounce you want to put in.\""; + next; + menu + "none", L_MenuItems1, + "1 tenth", L_MenuItems1, + "2 tenths", L_MenuItems1, + "3 tenths", L_MenuItems1, + "4 tenths", L_MenuItems1, + "5 tenths", L_MenuItems1, + "6 tenths", L_MenuItems1, + "7 tenths", L_MenuItems1, + "8 tenths", L_MenuItems1, + "9 tenths", L_MenuItems1; + +L_MenuItems1: + @menu = @menu - 1; + @guess_accumulator = @menu * 100; + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a good-sized portion of maggot slime from the small bottle into the glass bottle."; + mes "\"We now have " + @guess_accumulator + " thousandths of an ounce. How many hundredths of an ounce should I add?\""; + next; + menu + "none", L_MenuItems2, + "1 hundredth", L_MenuItems2, + "2 hundredths", L_MenuItems2, + "3 hundredths", L_MenuItems2, + "4 hundredths", L_MenuItems2, + "5 hundredths", L_MenuItems2, + "6 hundredths", L_MenuItems2, + "7 hundredths", L_MenuItems2, + "8 hundredths", L_MenuItems2, + "9 hundredths", L_MenuItems2; + +L_MenuItems2: + @menu = @menu - 1; + @guess_accumulator = @guess_accumulator + (@menu * 10); + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a portion of maggot slime from the small bottle into the glass bottle."; + mes "\"These are now " + @guess_accumulator + " thousandths of an ounce. How many thousands more?\""; + next; + menu + "none", L_MenuItems3, + "1 thousandth", L_MenuItems3, + "2 thousandths", L_MenuItems3, + "3 thousandths", L_MenuItems3, + "4 thousandths", L_MenuItems3, + "5 thousandths", L_MenuItems3, + "6 thousandths", L_MenuItems3, + "7 thousandths", L_MenuItems3, + "8 thousandths", L_MenuItems3, + "9 thousandths", L_MenuItems3; + +L_MenuItems3: + @menu = @menu - 1; + @guess_accumulator = @guess_accumulator + @menu; + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a tiny amount of maggot slime from the small bottle into the glass bottle."; + mes "Rauk mixes some more ingredients into the bottles, stirs them, heats one of them and mixes the results together."; + next; + + mes "[Rauk the Alchemist]"; + mes "\"Please put your finger in.\""; + mes "Hesitantly. you stick your finger into the resulting brew. The mixture feels warm and smooth to the touch."; + next; + mes "[Rauk the Alchemist]"; + mes "You pull your finger out again."; + + if (@guess_accumulator + @QUEST_GUESS_BASE > QUEST_clothdyer_knowsdye) + goto L_VerdeEscuro_muito; + + if (@guess_accumulator + @QUEST_GUESS_BASE < QUEST_clothdyer_knowsdye) + goto L_dark_green_q_little; + + // otherwise correct guess + + mes "Nothing seems to be happening with the mixture. Rauk's eyes lighten up."; + mes "\"This is it! You need precisely " + @guess_accumulator + " thousandts. Let me write this down...\""; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk is beaming."; + mes "\"I can now make dark green dye for you. All I need will be slime from one maggot, ten gamboge leaves, ten cobalt leaves, ten mauve leaves, and 1000 GP for other ingredients.\""; + mes "[You gain 20,000 experience points]"; + getexp 20000, 0; + QUEST_clothdyer_knowsdye = @QUEST_HAS_SOLVED_DYE_PUZZLE; + next; + goto L_intermediate; + +L_VerdeEscuro_muito: + mes "After only a second, the mixture begins to blacken. Rauk frowns."; + mes "\"That was too much... you need fewer than " + @guess_accumulator + " thousandths, I think."; + goto L_dark_green_q_again; + +L_dark_green_q_little: + mes "Almost instantaneously, the mixture loses its colour and turns transparent. Rauk sighs."; + mes "\"That was too little. Next time, try more than " + @guess_accumulator + " thousandths."; + goto L_dark_green_q_again; + +L_dark_green_q_again: + mes "\"Should we try again?\""; + next; + menu + "Yes!", L_VerdeEscuro_qguess, + "No, I've had enough.", L_Abort; + +L_VerdeEscuro_noslim: + mes "[Rauk the Alchemist]"; + mes "\"Oh, you don't have any maggot slime? That's unfortunate; I am out of it myself. Still it should be easy enough to find, just bring me one and we can continue testing.\""; + next; + goto L_intermediate; + +L_monster_oil: + mes "[Rauk the Alchemist]"; + mes "Rauk locks his eyes with you and continues in more serious tone."; + mes "\"I know how to create it, but you won't get it from me. It's far too dangerous; even the best alchemist may need multiple attempts and will risk blowing up! I can give you a recipe though, if you still are wanton.\""; + next; + menu + "Yes, tell me!", L_Next3, + "No, that sounds too dangerous.", L_Abort; + +L_Next3: + mes "[Rauk the Alchemist]"; + mes "You will need a pearl, a pair of snake skins, two piles of volcanic ash, three black scorpion stingers – and a golden scorpion stinger. In addition you must have plenty of herbs to stabilise the concoction; mauve, alizarin, cobalt and gamboge will do just fine."; + next; + mes "[Rauk the Alchemist]"; + mes "\"Take the pearl, skins, black stingers, ash, and cook briefly in a cauldron. Next add the mauve/alizarin/cobalt/gamboge as needed to stabilise into a black brew. Lastly, add the golden scorpion stinger and let boil briefly. And it's done.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Good luck not blowing up!\""; + @Q_status = @Q_status | @SETZER_KNOWS_STINGER; + callsub L_Update_Var; + close; + +L_Abort: + close; + +L_Update_Var: + set QUEST_Forestbow_state, + (QUEST_Forestbow_state & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; + +L_TooMany: + mes "[Rauk the Alchemist]"; + mes "You don't have room for this."; + close; +} diff --git a/npc/011-1/auldsbel.txt b/npc/011-1/auldsbel.txt new file mode 100755 index 00000000..32a9d135 --- /dev/null +++ b/npc/011-1/auldsbel.txt @@ -0,0 +1,1284 @@ + +011-1,50,68,0 script Auldsbel#_M NPC168,{ + @mexp = MAGIC_EXPERIENCE & 65535; + + @Q_STATUS_INITIAL = 0; + @Q_STATUS_POSTINTRO = 1; + set @Q_STATUS_INITIATION, 2; // quest for being able to cast `create mouboo figurine' + set @Q_STATUS_STUDENT, 3; // accepted as student + set @Q_STATUS_STUDENT0, 4; // accepted as student + @Q_STATUS_STUDENT1 = 5; + @Q_STATUS_STUDENT2 = 6; + @Q_STATUS_STUDENT3 = 7; + @Q_STATUS_STUDENT4 = 8; + @Q_STATUS_STUDENT5 = 9; + + + set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) // war quest + || (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4); // Elanore's heal-Kadiya quest + @wants_ironpowder = (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); + + @Q_MASK = NIBBLE_0_MASK | NIBBLE_1_MASK; + @Q_SHIFT = NIBBLE_0_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + @Q_main_status = @Q_status & 31; + @Q_component_quest = @Q_status >> 5; + + @has_magic = getskilllv(SKILL_MAGIC); + + if (@Q_main_status >= @Q_STATUS_POSTINTRO) + goto L_short_intro; + + mes "[Robed Man]"; + mes "You notice a middle-aged man in expensive-looking robes."; + mes "\"Ah, splendid, you finally came!\""; + mes "He motions you to come closer."; + next; + mes "[Robed Man]"; + mes "The man is visibly excited."; + mes "\"Here, I found a silk cocoon. Now if you can just give me the obsidian salt, we can see whether it works!\""; + next; + menu + "Whether what works?", L_Intro_explain, + "What are you talking about?", L_Intro_explain, + "I don't have any obsidian salt.", L_Intro_nopowder, + "Do I know you?", L_Intro_identity, + "Goodbye.", L_close; + +L_Intro_explain: + mes "[Robed Man]"; + mes "He frowns."; + mes "\"The transmutation experiment, of course! You can't have forgotten already...?\""; + next; + goto L_Intro_identity; + +L_Intro_nopowder: + mes "[Robed Man]"; + mes "\"What!? You traveled all this way without any obsidian...\""; + next; + goto L_Intro_identity; + +L_Intro_identity: + mes "[Robed Man]"; + mes "He eyes you more carefully."; + mes "\"Wait. You're not Padric.\""; + next; + @xmsg$ = "Right... my name is " + strcharinfo(0) + "."; + if (strcharinfo(0) == "Padric") + @xmsg$ = "Actually, I am, but I don't know you...?"; + menu + @xmsg$, L_Intro_wrongperson, + "You're not very good with faces, are you?", L_Intro_nogood, + "Who are you?", L_Intro_who_are_you, + "Goodbye.", L_close; + +L_Intro_wrongperson: + mes "[Robed Man]"; + mes "He laughs."; + mes "\"Ah, I knew it... you're not the first one today, either. I should apologize, I am horrible with faces. Well, if you don't mind, please hurry along, I should go back to my experiments.\""; + next; + goto L_Intro_primary_menu; + +L_Intro_primary_menu: + menu + "Who are you?", L_Intro_who_are_you, + "Goodbye.", L_close; + +L_Intro_nogood: + mes "[Robed Man]"; + mes "He laughs."; + mes "\"Yes, you could say that. Well, I shall get back to my experiments, then; I think I shall manage something that requires no obsidian salt instead.\""; + next; + menu + "Who are you?", L_Intro_who_are_you, + "What is obsidian salt, anyway?", L_Intro_obsidian_salt, + "Goodbye.", L_close; + +L_Intro_obsidian_salt: + mes "[Robed Man]"; + mes "\"Oh, obsidian salt is a catalyst... or rather a theoretical catalyst. We know that it has to have an application somewhere, and I do have the strong suspicion that it may be linked to natural transmogrification...\""; + next; + goto L_Intro_primary_menu; + +L_Intro_who_are_you: + mes "[Robed Man]"; + mes "\"Oh, oh my... of course you wouldn't know me, being from the countryside and all.\""; + mes "He laughs."; + mes "\"Well, my young friend, I am none other than Auldsbel the Graying, of the Council of Transmuters!\""; + next; + + @Q_main_status = @Q_STATUS_POSTINTRO; + callsub S_Update_Var; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_AULDSBEL; + + mes "[Auldsbel the Wizard]"; + mes "\"That means that I'm a wizard, in case you were wondering.\""; + next; + goto L_Main_menu; + +L_short_intro: + mes "[Auldsbel the Wizard]"; + mes "\"Welcome back, Padric!\""; + next; + goto L_Main_menu; + +L_Main_menu: + if (@has_magic) + goto L_Main_menu_magic; + + menu + "How does this 'magic' work?", L_about_magic, + "I want to become a wizard!", L_learn_magic, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Goodbye.", L_close; + +L_Main_menu_magic: + if (@wants_sulphur && @wants_ironpowder) + menu + "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Can you make sulphur powder?", L_Sulphur, + "Can you make iron powder?", L_Ironpowder, + "Goodbye.", L_close; + if (@wants_sulphur && !@wants_ironpowder) + menu + "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Can you make sulphur powder?", L_Sulphur, + "Goodbye.", L_close; + menu + "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Goodbye.", L_close; + +L_Ironpowder: + mes "[Auldsbel the Wizard]"; + mes "\"No, I do not know the spell for this. I expect that it shouldn't be too hard an invocation, but I'm too busy to work it out.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I know that they used to make iron ore around here, though, many years ago. Perhaps the secret is still hidden somewhere?\""; + next; + goto L_Main_menu; + +L_Sulphur: + mes "[Auldsbel the Wizard]"; + @Cost = 400 - (@Q_component_quest * 30); + mes "\"Sulphur powder? Ah, so we have picked up a little offensive magic, haven't we? Good thinking, good thinking. And yes, of course I can transmute volcanic ashes into sulphur powder at a ratio of 1:5, for " + @Cost + " GP.\""; + next; + if (@Q_main_status >= @Q_STATUS_STUDENT) + menu + "No, thank you.", L_close, + "I will see what I can find.", L_close, + "Can you teach me how to make it myself?", L_Sul_t_s, + "Here you are.", L_Sulphur_buy; + menu + "No, thank you.", L_close, + "I will see what I can find.", L_close, + "Here you are.", L_Sulphur_buy; + +L_Sulphur_buy: + if (Zeny < @Cost) + goto L_Sulphur_noZeny; + if (countitem("PileOfAsh") < 1) + goto L_Sulphur_noash; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("SulphurPowder") > 1 + && countitem("PileOfAsh") == 0) + goto L_Sulphur_noroom; + + Zeny = Zeny - @Cost; + delitem "PileOfAsh", 1; + getitem "SulphurPowder", 5; + mes "[Auldsbel the Wizard]"; + mes "\"I shall transmute it later. Here, have five half-ounces from my own stock.\""; + next; + goto L_Main_menu; + +L_Sulphur_noZeny: + mes "[Auldsbel the Wizard]"; + mes "\"No GP, no service.\""; + next; + goto L_Main_menu; + +L_Sulphur_noash: + mes "[Auldsbel the Wizard]"; + mes "\"Without volcanic ash, I can't give you any sulphur powder. Try hunting some fire goblins, or somesuch.\""; + next; + goto L_Main_menu; + +L_Sulphur_noroom: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm, you really managed to squeeze something into every little place you had that we could have stored the powder in... you might want to return once you have resolved this matter.\""; + next; + goto L_Main_menu; + +L_Sul_t_s: + if (@Q_component_quest <= 4) + goto L_Sul_t_s_no; + mes "[Auldsbel the Wizard]"; + mes "\"Very well, then. You have been quite helpful with my experiments, after all. As you may have noticed, the spell takes a pile of volcanic ashes. Close your hands around it, then whisper the invocation.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"That invocation is '" + get(.invocation$, "make-sulphur") + "'.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"You may find that you can transmute the powder more effectively after a while; that is perfectly natural.\""; + next; + goto L_Main_menu; + +L_Sul_t_s_no: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm... how about this: you help me with a few of my experiments, and I tell you?\""; + next; + menu + "Very well, I will help you.", L_Quest, + "No.", L_Next; + +L_Next: + mes "[Auldsbel the Wizard]"; + mes "\"Then I fear that I shall not reveal the spell to you either.\""; + next; + goto L_Main_menu; + +L_about_magic: + mes "[Auldsbel the Wizard]"; + mes "\"Magic is a universal force that comes from within; only few individuals have the power to channel and manipulate it. Most magic users resort to spells – prefabricated invocations – to access and control their magical power.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Most spells are claimed by one of the five schools of magic. To properly use them, a magic user need not only have sufficient prowess in magic overall, but also in the specifics of that particular school.\""; + next; + goto L_a_m_minimenu; + +L_a_m_minimenu: + menu + "What are the five schools?", L_a_m_schools, + "How can I advance in magic?", L_a_m_advance, + "How do spells work?", L_a_m_spells, + "Where can I learn spells?", L_a_m_learn, + "Never mind.", L_Main_menu; + +L_a_m_schools: + mes "[Auldsbel the Wizard]"; + mes "\"With few exceptions, all spells belong to one of the five schools of magic: Transmutation, War, Astral, Life, and Nature.\""; + next; + goto L_a_s_minimenu; + +L_a_s_minimenu: + menu + "What's Transmutation magic?", L_about_transmutation, + "What's War magic?", L_about_war, + "What's Astral magic?", L_about_astral, + "What's Life magic?", L_about_life, + "What's Nature magic?", L_about_nature, + "Are there other spells?", L_about_other_spells, + "Thank you.", L_a_m_minimenu; + +L_about_transmutation: + mes "[Auldsbel the Wizard]"; + mes "\"Transmutation magic deals with forming matter into a new shape. Some advanced transmutation magic can also expose special properties of the material in question.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "He smiles."; + mes "\"Transmutation magic is the engine of human civilization. By allowing us to shape buildings, tools, and other items according to the power of our imagination, it gives us mastery over nature.\""; + next; + goto L_a_s_minimenu; + +L_about_astral: + mes "[Auldsbel the Wizard]"; + mes "\"Astral magic comprises a family of spells that connect the caster to the Astral World. This connection can be used to pull the caster 'through'-- effectively teleporting them – or to 'pull others through'-- summoning creatures.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"There are also some more direct uses of powers of the Astral World; mainly spells that affect other spells.\""; + next; + goto L_a_s_minimenu; + +L_about_war: + mes "[Auldsbel the Wizard]"; + mes "\"War magic deals with the inevitable necessity of struggle against other creatures, and sometimes even against other humans. War magic exclusively focuses on dealing damage and destruction.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"If you use War magic, you better have a Transmuter around for the aftermath, to clear up your collateral damage.\""; + next; + goto L_a_s_minimenu; + +L_about_life: + mes "[Auldsbel the Wizard]"; + mes "\"Life magic deals with healing. Not much of a surprise there.\""; + next; + goto L_a_s_minimenu; + +L_about_nature: + mes "[Auldsbel the Wizard]"; + mes "\"Nature magic is a rather subtle (and, in my eyes, rather weak) kind of magic that deals with manipulating nature as it is. Think of it as Transmutation magic without being able to actually shape things the way you want.\""; + next; + goto L_a_s_minimenu; + +L_about_other_spells: + mes "[Auldsbel the Wizard]"; + mes "\"A few spells are not claimed by any particular school of magic. In practice, this means that anyone can cast them if they just have sufficient magical power. The most prominent example is the 'detect magic' spell, '" + get(.invocation$, "detect-magic") + "'.\""; + next; + goto L_a_s_minimenu; + +L_a_m_advance: + mes "[Auldsbel the Wizard]"; + mes "\"Advancing in your magical powers must come from two sources: from within and from a person who can guide you in whichever school of magic you wish to advance.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"For advancing in your general magic power, you must practice magical spells. Make sure to vary them; you will learn little if you cast the same spell over and over. Also, spells that consume no components seem not to be very instructive in practice.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Once you have gathered enough spellcasting experience, you should be able to advance to the next level of magic. If you received your magic from a sponsor, you may have to seek out the sponsor again to advance.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Similarly, to advance in a particular school of magic, you should seek out someone sufficiently competent in that school. Each school has a different rite for advancing its students, so make sure to talk to the right person.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I myself am a Transmutation Wizard. Of course I know some spells from the other schools, but my focus is on Transmutation. Theoretically speaking, I can advance you in this school.\""; + next; + goto L_a_m_minimenu; + +L_a_m_learn: + mes "[Auldsbel the Wizard]"; + mes "\"Finding and learning new spells is of course important in a magic user's quest towards becoming a full-fledged wizard.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Some wizards will be willing to share their knowledge, usually for a price. But they are not the only sources of magical spells: many magical books contain spells, and you can occasionally find them written down in the most unusual of places.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Some are even hiding as part of folklore or gossip. Of course, for those it can sometimes be hard to determine just what their prerequisites are...\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"If you decide to hunt for spells, make sure to keep a journal with you. Some spell invocations may only cross your path once in your lifetime; you must not allow them to get away!\""; + next; + goto L_a_m_minimenu; + +L_a_m_spells: + mes "[Auldsbel the Wizard]"; + mes "\"Magical spells are shortcuts, true magic bound to a word. No-one today remembers how they were created at the beginning of time, though many have tried to find it out, and failed...\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"These magical words are the spells' invocations. Spoken by someone who can't use magic, or by someone who doesn't satisfy the prerequisites, the word stands just for itself.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"But when spoken by a competent magic user, the word may unleash its effect – consuming any components it may require, draining the caster's mana, changing the world around it.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Some spells require catalysts on top of components, others vary in power depending on whom they are cast on or under what conditions. However, all spells are affected by the caster's astral power.\""; + next; + goto L_a_sp_minimenu; + +L_a_sp_minimenu: + menu + "What is this 'astral power'?", L_about_astral_power, + "What is a catalyst?", L_about_catalysts, + "What is a component?", L_about_components, + "What other prerequisites are there?", L_a_oth_prereq, + "Where can I learn spells?", L_a_m_learn, + "How often can I cast spells?", L_about_speed, + "Never mind.", L_a_m_minimenu; + +L_about_astral_power: + mes "[Auldsbel the Wizard]"; + mes "\"A person's astral power is determined by several factors: overall experience, intelligence, and any and all equipment the person may be wearing at a given time.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Greater astral power means more powerful spells. Since equipment can greatly decrease astral power, most magic users tend to be careful about what they wear – it takes a while to recover astral power even after armour is unequipped.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The worst offenders are metal items, particularly shields and body armour. Helmets and gloves get in the way, too. Still, a few special or enchanted items may even increase magical power.\""; + next; + goto L_a_sp_minimenu; + +L_about_catalysts: + mes "[Auldsbel the Wizard]"; + mes "\"A catalyst is a material prerequisite to a spell that is not consumed as part of the spell. For example, the Transmuter's Tablet is required to properly perform many of the more powerful transmutation spells, but it is never consumed.\""; + next; + goto L_a_sp_minimenu; + +L_about_components: + mes "[Auldsbel the Wizard]"; + mes "\"A material component is an item that is consumed as part of the spells magic. For example, when transmuting wood into arrows, you must consume a raw log to shape the arrows out of it.\""; + next; + goto L_a_sp_minimenu; + +L_a_oth_prereq: + mes "[Auldsbel the Wizard]"; + mes "\"Some spells have additional requirements – they can only be cast underground, or when you are standing very close to the person you are casting them on, or only when you are wearing a particular enchanted item. Spells are quirky, so read their descriptions carefully – if you do find a description.\""; + next; + goto L_a_sp_minimenu; + +L_about_speed: + mes "[Auldsbel the Wizard]"; + mes "\"Most spells are effective immediately, unless they require some complex astral connection – summoning or teleporting can take a while to take effect, for example. Still, after casting a spell you usually need a moment to recover before casting the next.\""; + next; + goto L_a_sp_minimenu; + +L_about_auldsbel: + mes "[Auldsbel the Wizard]"; + mes "\"Well, there is no harm in giving you the general picture, I suppose.\""; + mes "He sighs, as if he had been forced to repeat something one time too many."; + mes "\"I am from the Council of Transmuters, the head organ of organized Transmutation magic in the known world.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The council oversees recruitment, education, accreditation, and, if necessary, disciplining of Transmuters."; + mes "It ensures that Transmuter conduct is according to its statutes and acts as representative and point of contact towards other entities.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Of all the schools of magic, the School of Transmutation is the most organised by far, and held in high esteem by rulers all across the world. Of course this is not only due to the outstanding and rigid structure of the school, but also because of the exceptional services that its members provide.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The Council, presently overseen by Lord Transmogrifier Pontorias the Plaid (May His Shape Reflect His Soul Forever), consists of fourty-nine members and is situated in the citadel of Dorngard, in the northern mountains near the Crimson Cascade.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The Council is sovereign over three hundred acres of land and nearby farming communities and has been ever since Yorick the Younger shaped Dorngard out of a mountain by sheer power of will, to build a home for the school his father had founded.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The Council has held peaceful relations with nearby realms for almost two centuries now and is widely regarded as a reliable partner in shaping civilization to allow it to evolve towards its next stage.\""; + next; + menu + "All right, but what about you?.", L_about_auldsbel_2, + "Never mind.", L_Main_menu; + +L_about_auldsbel_2: + mes "[Auldsbel the Wizard]"; + mes "\"Oh, myself? I am just vacationing in the area. Very relaxed and peaceful place, the Hurnscald area. And plenty of splendid specimens for experimentation.\""; + next; + goto L_Main_menu; + +L_learn_magic: + mes "[Auldsbel the Wizard]"; + mes "Auldsbel laughs heartily."; + mes "\"Hah, if only it were so easy! No, my young friend, I fear that 'learning magic' here is not an option. Either you are born with it, or without.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Sure, there are a few entities that may grant you magic – Ether Spirits or Mana Seeds or Great Dragons – but those are the stuff of legends, so I suggest that you don't waste your life trying to find one of them.\""; + next; + goto L_Main_menu; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_AULDSBEL; + callfunc "MagicTalkMenu"; + + if (@c == 0) + goto L_Main_menu; + if (@c == @QQ_ELANORE) + goto L_Q_elanore; + if (@c == @QQ_MANASEED) + goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) + goto L_make_mana_potion; + if (@c == @QQ_WYARA) + goto L_Q_wyara; + if (@c == @QQ_SAGATHA) + goto L_Q_sagatha; + if (@c == @QQ_IMP) + goto L_Q_imp; + if (@c == @QQ_OLDWIZ) + goto L_Q_old_wizard; + if (@c == @QQ_ASTRALSOUL) + goto L_Q_astralsoul; + + mes "[Auldsbel the Wizard]"; + mes "\"Let us talk about something else.\""; + next; + goto L_Main_menu; + +L_Q_astralsoul: + if (!(getskilllv(SKILL_ASTRAL_SOUL))) + goto L_Q_astralsoul_L; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\""; + next; + mes "\"...uhm...\""; + next; + mes "\"Didn't I teach you the ability to focus on magic, did I?\""; + goto L_Main_menu; + +L_Q_astralsoul_L: + mes "[Auldsbel the Wizard]"; + mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\""; + next; + mes "\"I can try to teach you this ability.\""; + next; + mes "\"But I will need some very expensive magical substances to focus your brain onto magic.\""; + next; + mes "\"It is about... erm, 11300 GP. Do you have so much money?\""; + menu + "Here you are", L_Q_astralsoul_L1, + "I will get it.", L_Main_menu; + +L_Q_astralsoul_L1: + if (Zeny < 11300) + goto L_Q_astralsoul_nz; + Zeny = Zeny - 11300; + mes "[Auldsbel the Wizard]"; + mes "\"Okay, listen:\""; + next; + mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\""; + next; + mes "\"To do so, think of a magic spell!\""; + next; + mes "Auldsbel mumbles some invocations"; + next; + @SUP_lvl = 1; + @SUP_id = SKILL_ASTRAL_SOUL; + @SUP_name$ = "Astral Soul"; + @SUP_xp = 2500; + callfunc "SkillUp"; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Now go and try to find someone who can actually activate that focus.\""; + next; + mes "\"You have the powers to focus on magic, but you need to get magic focused now.\""; + goto L_Main_menu; + +L_Q_astralsoul_nz: + mes "[Auldsbel the Wizard]"; + mes "\"When learning powerful stuff, you should try not to make so many jokes.\""; + next; + mes "\"Come back when you have the money.\""; + goto L_Main_menu; + +L_Q_old_wizard: + mes "[Auldsbel the Wizard]"; + mes "\"I'm still not sure what exactly to make of him. At first appearance, he seems like a senile old man, but there can be no doubt that he has – or at least had, at some point – a very deep understanding of magic.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I have not had the opportunity to talk to him too much, though.\""; + next; + goto L_Main_menu; + +L_Q_imp: + mes "[Auldsbel the Wizard]"; + mes "\"There are many different kinds of spirits in the world. Some are good-natured, others evil; some are weak, others very powerful. I don't know the particular one you have encountered, though I urge caution.\""; + next; + goto L_Main_menu; + +L_Q_elanore: + mes "[Auldsbel the Wizard]"; + mes "\"Ah, Elanore. A kind little woman. Also a very proficient healer, from what I have been told, though we have interacted little. If you are interested in Life magic, you might want to talk to her.\""; + next; + goto L_Main_menu; + +L_Q_wyara: + mes "[Auldsbel the Wizard]"; + mes "\"The village witch? Not exactly the brightest person, but she has managed to figure out how to brew potions. I doubt that she can do any real magic, though.\""; + next; + goto L_Main_menu; + +L_Q_sagatha: + mes "[Auldsbel the Wizard]"; + mes "Auldsbel frowns."; + mes "\"That witch, hmm? She's a well-known trouble-maker, and quite a clever one at that; she once prevented us from cutting down a forest near Dorngaard that the villages wanted to use for farming, using some ingenious magic.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"That woman has spent too much time alone in the forests... I have the strong suspicion that she is more loyal towards her animals than towards us humans! I recommend that you stay away from her, if you value your well-being.\""; + next; + goto L_Main_menu; + +L_Q_manaseed_rumour: + mes "\"A mana seed? Around here? Nah, they've been pulling your leg. Those things are extremely rare, after all.\""; + next; + goto L_Main_menu; + +L_Q_manaseed: + mes "[Auldsbel the Wizard]"; + if (@has_magic) + goto L_Q_manaseed_withmagic; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANASEED)) // rumour only? + goto L_Q_manaseed_rumour; + if (MAGIC_FLAGS & MFLAG_DRANK_POTION) + goto L_Q_manaseed_prepared; + if (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED) + goto L_Q_ms_tou; + mes "\"You have found an actual Mana Seed? That's impossible! Well, very unlikely... Then again, some others have told me similar rumours. I find it hard to believe that...\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Well, if it's true, then try touching it. That should do you no harm, but if you are very, very lucky, it just might grant you some minuscule amount of magical power.\""; + next; + goto L_Main_menu; + +L_Q_ms_tou: + if (MAGIC_FLAGS & MFLAG_DRANK_POTION) + goto L_Q_manaseed_prepared; + mes "\"So you touched the Mana Seed, and its power flowed right through you? You are lucky – it is willing to share – but you are also unlucky, in that you lack the discipline and control needed to contain this power.\""; + next; + if (MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION) + goto L_Q_ms_tou_short; + mes "[Auldsbel the Wizard]"; + mes "\"Legend has it that you can substitute for such control by imbibing a Mana Potion. I am not sure whether that legend is true, but for you it might be worth trying it out.\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_MANAPOTION; + goto L_Q_ms_tou_short; + +L_Q_ms_tou_short: + menu + "Where can I get a Mana Potion?", L_where_mana_potion, + "Can you make a Mana Potion?", L_make_mana_potion, + "Thank you.", L_Main_menu; + +L_where_mana_potion: + mes "[Auldsbel the Wizard]"; + mes "\"Well, quite a few alchemists should be able to brew one for you. Or maybe the village witch, even, though I personally would recommend seeing an alchemist.\""; + next; + goto L_Q_ms_tou_short; + +L_make_mana_potion: + mes "[Auldsbel the Wizard]"; + mes "\"Well, I can transmute some components into a Mana Potion for you. Let's see... I will need one pearl, 10,000 GP, about twenty Mauve leaves, and some Gamboge ones... ten should do, I think. Oh, and a bottle of water, of course.\""; + next; + menu + "Here you are.", L_Next1, + "I will look for those items.", L_Main_menu, + "I'm not interested.", L_Q_ms_tou_short; + +L_Next1: + if (Zeny < 10000) + goto L_make_mp_miss; + if (countitem("GambogeHerb") < 10) + goto L_make_mp_miss; + if (countitem("MauveHerb") < 20) + goto L_make_mp_miss; + if (countitem("Pearl") < 1) + goto L_make_mp_miss; + if (countitem("BottleOfWater") < 1) + goto L_make_mp_miss; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("GambogeHerb") > 10 + && countitem("MauveHerb") > 20 + && countitem("Pearl") > 1 + && countitem("BottleOfWater") > 1 + && countitem("ManaPotion") < 1) + goto L_mana_potion_toomuch; + Zeny = Zeny - 10000; + delitem "GambogeHerb", 10; + delitem "MauveHerb", 20; + delitem "Pearl", 1; + delitem "BottleOfWater", 1; + getitem "ManaPotion", 1; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel pockets your GP and the pearl, then stuffs the leaves into the bottle. Holding the bottle between his hands, he focuses briefly. The water and leaves flash bright red, then the leaves dissolve."; + next; + mes "[Auldsbel the Wizard]"; + mes "The wizard pours the resultant mixture into a different bottle. \"It will lose its power quickly if left in a glass bottle\", he explains."; + mes "He hands you the final result, which feels surprisingly heavy."; + next; + menu + "Thank you!", L_Main_menu, + "What about the pearl and GP?", L_Next2; + +L_Next2: + mes "[Auldsbel the Wizard]"; + mes "Auldsbel raises his eyebrows in surprise."; + mes "\"Those were payment. You don't expect me to work for free, now do you?\""; + next; + goto L_Main_menu; + +L_mana_potion_toomuch: + mes "[Auldsbel the Wizard]"; + mes "\"Burdened as you are, I doubt you could carry it. Get rid of some of your old things first, will you?\""; + next; + goto L_Main_menu; + +L_make_mp_miss: + mes "[Auldsbel the Wizard]"; + mes "\"No, I need one pearl, 10,000 GP, 20 Mauve leaves, 10 Gamboge leaves, and one bottle of water.\""; + next; + goto L_Main_menu; + +L_Q_manaseed_prepared: + mes "\"So you found a Mana Seed and prepared yourself by drinking a mana potion? I recommend that you visit the seed again and see if that actually works...\""; + next; + goto L_Main_menu; + +L_Q_manaseed_withmagic: + if (MAGIC_FLAGS & MFLAG_MANASEED_MAXEDOUT) + goto L_Q_manaseed_maxedout; + mes "\"I still find it hard to believe that you have found an actual Mana Seed here, in the middle of nowhere... Well, I suggest that you keep visiting it. As your control over magic grows, it may grant you additional power.\""; + next; + goto L_Main_menu; + +L_Q_manaseed_maxedout: + mes "\"So the mana seed isn't giving you any more power? You might want to try again later; normally those seeds grow in power, over time.\""; + next; + goto L_Main_menu; + +L_Quest: + if (@Q_component_quest == 0) + goto L_c_quest_0; + if (@Q_component_quest == 1) + goto L_c_quest_1; + if (@Q_component_quest == 2) + goto L_c_quest_2; + if (@Q_component_quest == 3) + goto L_c_quest_3; + if (@Q_component_quest == 4) + goto L_c_quest_4; + if (@Q_component_quest == 5) + goto L_c_quest_5; + mes "[Auldsbel the Wizard]"; + mes "\"You have been very helpful, but at this point I have everything I need. Except perhaps for a Wumpus Egg, though I have no idea where you could find one... If you ever come across one, I will give you a special reward for it, though.\""; + next; + goto L_Main_menu; + +L_c_quest_0: + mes "[Auldsbel the Wizard]"; + mes "Auldsbel is visibly delighted."; + mes "\"Ah, indeed, indeed! I can often use help with my experiments, and you just happen to be arriving at a particularly opportune time. See, I found this...\""; + mes "He pulls something from his pocket and shows it to you."; + next; + mes "[Auldsbel the Wizard]"; + mes "\"It's a silk cocoon. This area has been virtually infested with silkworms, from what I have seen. This is splendid! I will try to... do something very special with this one. But for that I will need twenty Mauve leaves.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"There are plenty of Mauve plants around, so I'm sure that you won't have a hard time finding the leaves.\""; + next; + menu + "I have them here.", L_Next3, + "Sure, I will look for them.", L_Main_menu; + +L_Next3: + if (countitem ("MauveHerb") < 20) + goto L_c_quest_missing; + delitem "MauveHerb", 20; + Zeny = Zeny + 2500; + mes "[Auldsbel the Wizard]"; + mes "\"Well done, my young friend! Here is 2,500 GP to compensate you for your efforts.\""; + mes "[You gain 250 experience points]"; + getexp 250, 0; + @Q_component_quest = 1; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_1: + mes "[Auldsbel the Wizard]"; + mes "\"Good, good... I am trying to come up with a way to best use the Mauve leaves you brought me, but it seems that I will need further components. I am not sure about the exact composition yet, but I will need a few potions.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Please be a good helper and get me an iron potion, a concentration potion, and three small and three medium healing potions.\""; + next; + menu + "Here you are.", L_Next4, + "I'm not your 'good helper'!", L_Main_menu, + "I'll see what I can do.", L_Main_menu; + +L_Next4: + if (countitem ("SmallHealingPotion") < 3) + goto L_c_quest_missing; + if (countitem ("MediumHealingPotion") < 3) + goto L_c_quest_missing; + if (countitem ("IronPotion") < 1) + goto L_c_quest_missing; + if (countitem ("ConcentrationPotion") < 1) + goto L_c_quest_missing; + delitem "SmallHealingPotion", 3; + delitem "MediumHealingPotion", 3; + delitem "IronPotion", 1; + delitem "ConcentrationPotion", 1; + Zeny = Zeny + 2500; + mes "[Auldsbel the Wizard]"; + mes "\"Ah, excellent, excellent! These are precisely what I needed. Here is another 2,500 GP to compensate you for your efforts.\""; + mes "[You gain 500 experience points]"; + getexp 500, 0; + @Q_component_quest = 2; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_2: + mes "[Auldsbel the Wizard]"; + mes "\"Ah! Excellent! Yes, yes, indeed I need help. I have managed to transmute the components you brought me into a liquid that I believe to be a demetamorphosis stock, but it seems that the details still need some fine-tuning, and I am out of silk cocoons...\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I would like to run the next batch of experiments on a larger scale, though. Would you be so kind as to fetch me one hundred silk cocoons, please?\""; + next; + menu + "One hundred cocoons, here you are.", L_Next5, + "That's a lot; I'll see what I can do.", L_Main_menu; + +L_Next5: + if (countitem ("SilkCocoon") < 100) + goto L_c_quest_missing; + delitem "SilkCocoon", 100; + Zeny = Zeny + 5000; + mes "[Auldsbel the Wizard]"; + mes "\"Splendid, splendid! Here is 5,000 GP for you.\""; + mes "Auldsbel attempts to cram the cocoons into his pockets, with little success. Finally he gives up and takes them into his hut."; + mes "[You gain 2,000 experience points]"; + getexp 2000, 0; + @Q_component_quest = 3; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_3: + mes "[Auldsbel the Wizard]"; + mes "\"Yes... I'm actually not certain that my demetamorphosis stock will not drain the life out of these little creatures. Perhaps an alchemical revitalization tincture would be called for. Fortunately this one is easy, I can make it myself.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I'm still not sure how to integrate it into the spell... but leave that to me. Can you get me twenty-five red scorpion stingers and twenty-five lumps of maggot slime? Those should be just what I need.\""; + next; + menu + "Here are your stingers and slimes.", L_Next6, + "I will get back to you once I have them.", L_Main_menu; + +L_Next6: + if (countitem ("RedScorpionStinger") < 25) + goto L_c_quest_missing; + if (countitem ("MaggotSlime") < 25) + goto L_c_quest_missing; + delitem "RedScorpionStinger", 25; + delitem "MaggotSlime", 25; + Zeny = Zeny + 5000; + mes "[Auldsbel the Wizard]"; + mes "\"Good helper! Another 5,000 GP for you.\""; + mes "\"I believe that I have figured out one possible way to integrate the tincture into the spell... I will let you know how that goes.\""; + mes "[You gain 10,000 experience points]"; + getexp 10000, 0; + @Q_component_quest = 4; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_4: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm, yes... See, the thing is that transmuting living beings is not normally something that transmutation magic can do. It seems that the beings' life force must be overcome to transmute them, but that in turn kills them.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"But I was wondering whether creatures that already can auto-transmute – or metamorphose, as some people call it – might not allow themselves to be subjected to magical transmutation more easily... Still, all of my demetamorphosis attempts so far have failed.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I am thinking of injecting the life force of another creature, perhaps using some astral channeling. Snakes sound most promising, as they have a similar physical shape but a strong life force.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Could you get me twenty regular, cave, and mountain snake tongues, please? So a total of sixty tongues. This is where most of their life force is concentrated, incidentally.\""; + next; + menu + "Here are your tongues.", L_Next7, + "I will hunt some snakes for you.", L_Main_menu; + +L_Next7: + if (countitem ("SnakeTongue") < 20) + goto L_c_quest_missing; + if (countitem ("CaveSnakeTongue") < 20) + goto L_c_quest_missing; + if (countitem ("MountainSnakeTongue") < 20) + goto L_c_quest_missing; + delitem "SnakeTongue", 20; + delitem "CaveSnakeTongue", 20; + delitem "MountainSnakeTongue", 20; + Zeny = Zeny + 8000; + mes "[Auldsbel the Wizard]"; + mes "\"8,000 GP should cover your efforts, I think.\""; + mes "\"Now let's see if this works...\""; + mes "[You gain 40,000 experience points]"; + getexp 40000, 0; + @Q_component_quest = 5; + callsub S_Update_Var; + next; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel focuses on the bundle of snake tongues, which begins to assume a bright red colour, then start to glow. Yellow sparks drop to the ground, as Auldsbel rolls the tongues into a ball."; + next; + mes "[Auldsbel the Wizard]"; + mes "He tosses in a cocoon, then squeezes everything together. A bright red flash blinds you momentarily."; + next; + mes "[Auldsbel the Wizard]"; + mes "As Auldsbel opens his hands, there is nothing there."; + next; + mes "[Auldsbel the Wizard]"; + mes "He frowns. \"Their life force was still not strong enough. Hmm.\""; + next; + goto L_Main_menu; + +L_c_quest_5: + mes "[Auldsbel the Wizard]"; + mes "\"I do have another assignment for you, but this one will be tricky. I will need fifty grass snake tongues. I believe that this may be just enough life force to return the silkworm back to its original shape.\""; + next; + menu + "Here they are.", L_Next8, + "That's quite a challenge.", L_Main_menu; + +L_Next8: + if (countitem ("GrassSnakeTongue") < 50) + goto L_c_quest_missing; + delitem "GrassSnakeTongue", 50; + Zeny = Zeny + 10000; + mes "[Auldsbel the Wizard]"; + mes "\"Excellent! Here is 10,000 GP for you, and now let's see how this goes.\""; + mes "[You gain 100,000 experience points]"; + getexp 100000, 0; + @Q_component_quest = 6; + callsub S_Update_Var; + next; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel rolls the snake tongues into a ball again, whilst chanting some words that you fail to discern. As the ball begins to glow, he tosses in a silkworm cocoon."; + mes "He then presses his hands together; you are blinded by a blue flash."; + next; + mes "[Auldsbel the Wizard]"; + mes "The wizard steps back in horror."; + mes "\"Oh my... I should have known. I have stepped into Astral spell territory here. This is bad...\""; + mes "He mumbles a brief spell invocation."; + mes "\"I suggest that you run.\""; + next; + misceffect sfx_magic_transmute; + monster "this", 50, 68, "Grass Snake", 1034, 4, "Auldsbel#_M::OnSnakeDeath"; + close; + +OnSnakeDeath: + BOSS_POINTS = BOSS_POINTS + 5; + message strcharinfo(0), "You gain 5 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +L_c_quest_missing: + mes "[Auldsbel the Wizard]"; + mes "\"No, you are missing some items. Come back later when you have everything!\""; + next; + goto L_Main_menu; + +L_learn_spell: + if (@Q_main_status == @Q_STATUS_INITIATION) + goto L_initiation; + if (@Q_main_status == @Q_STATUS_STUDENT) + goto L_stu_start; + if (@Q_main_status == @Q_STATUS_STUDENT0) + goto L_stu_0; + if (@Q_main_status == @Q_STATUS_STUDENT1) + goto L_stu_1; + if (@Q_main_status == @Q_STATUS_STUDENT2) + goto L_stu_2; + if (@Q_main_status == @Q_STATUS_STUDENT3) + goto L_stu_3; + if (@Q_main_status == @Q_STATUS_STUDENT4) + goto L_stu_4; + if (@Q_main_status == @Q_STATUS_STUDENT5) + goto L_stu_5; + + mes "[Auldsbel the Wizard]"; + mes "\"Wellll.... you do seem to have some magical abilities. But do you possess the talent and diligence needed for a true wizard?\""; + mes "He raises an eyebrow at you, then grins."; + mes "\"Only one way to find out! Let me teach you a first spell.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"This spell is a simple transmutation invocation. All it takes is a clean wooden log. Hold it in your hand, focus your powers, and say the magic invocation.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"You can turn the log into a wooden figurine by imagining the creature whose shape you want in your head and saying `" + get(.invocation$, "spell-transmute-wood") + ",' followed by the last syllable of the name of the creature you want to shape it into.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"So `" + get(.invocation$, "spell-transmute-wood") + " lurk' for a Skytlurk figurine, for example. If you know what a Skytlurk is, I mean, otherwise you will have a hard time imagining it. You may want to try some others instead, though.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Oh... and it has to be the old Tritan name. Most creatures nowadays have very different names, but some old Tritan names have survived. Just try some, until you find one that fits.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Oh, actually, make sure to write that down. You should keep track of all spells and spell fragments, really. I always keep a notebook handy, in fact.\""; + next; + @Q_main_status = @Q_STATUS_INITIATION; + callsub S_Update_Var; + goto L_Main_menu; + +L_repeat_spell: + mes "[Auldsbel the Wizard]"; + mes "\"The invocation is `" + get(.invocation$, "spell-transmute-wood") + ",' followed by the last syllable of the name of the creature you want to shape the log into. So `" + get(.invocation$, "spell-transmute-wood") + " lurk' for a Skytlurk figurine.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"But keep two things in mind: First, you must KNOW what the creature looks like – so a Skytlurk probably won't work – and second, you must use the old Tritan name of it. `Fluffy' and `Scorpion' are modern names, so those won't work, you should try some others.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"And make sure to keep notes of your spells! In the future, I will only tell you once.\""; + next; + goto L_Main_menu; + +L_initiation: + mes "[Auldsbel the Wizard]"; + mes "\"So, have you managed to transmute something?\""; + next; + if (countitem("MoubooFigurine")) + menu + "Not yet.", L_Main_menu, + "How about this mouboo figurine?", L_initiation_check; + menu + "Not yet.", L_Main_menu, + "What was the spell again?", L_repeat_spell; + +L_initiation_fail: + mes "[Auldsbel the Wizard]"; + mes "\"No, no, no. This is no good – too many imperfections.\""; + mes "He throws it away."; + mes "\"Keep practicing – and make sure to vary the spells you cast a little; that will make it easier to learn.\""; + next; + goto L_Main_menu; + +L_initiation_check: + if (!(countitem("MoubooFigurine"))) + goto L_Main_menu; + delitem "MoubooFigurine", 1; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel inspects your figurine."; + next; + if (@mexp < 40) + goto L_initiation_fail; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel nods."; + mes "\"This looks good.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "He pockets the figurine."; + mes "\"Very well, then. I shall accept you as my student.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + mes "[Auldsbel the Wizard]"; + mes "You feel new powers flowing into your body!"; + @Q_main_status = @Q_STATUS_STUDENT; + callsub S_Update_Var; + @SUP_id = SKILL_MAGIC_TRANSMUTE; + @SUP_name$ = "Transmutation Magic"; + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + next; + goto L_Main_menu; + +L_stu_start: + if (@mexp < 200) goto L_Notready; + mes "[Auldsbel the Wizard]"; + mes "\"Next, I shall teach you a higher-level transmutation spell.\""; + if (getskilllv(SKILL_MAGIC) < 2) + mes "\"Beware, for you will not be able to use it yet; you will first have to gain a greater understanding of magic overall.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Bring me ten bug legs, and I will reveal its invocation to you.\""; + next; + menu + "Here you are.", L_Next9, + "I'll be back with them.", L_Main_menu; + +L_Next9: + if (countitem("BugLeg") < 10) + goto L_c_quest_missing; + delitem "BugLeg", 10; + getexp 1000, 0; + @Q_main_status = @Q_STATUS_STUDENT0; + callsub S_Update_Var; + mes "[Auldsbel the Wizard]"; + mes "He picks up the bug legs."; + mes "\"Good. These will come in handy later...\""; + mes "He grins."; + mes "[1000 experience points]"; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Now, listen carefully: to make a short tank top out of three pieces of cloth, you must use the invocation '" + get(.invocation$, "make-short-tanktop") + "'.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"But be careful; transmutations can go wrong, and that can injure you. When you have more overall spellcasting practice, come back to me.\""; + next; + goto L_Main_menu; + +L_Notready: + mes "[Auldsbel the Wizard]"; + mes "\"You still need more practice with spellcasting; I won't give you another spell until you are ready.\""; + next; + goto L_Main_menu; + +L_stu_0: + if (@mexp < 350) + goto L_Notready; + mes "[Auldsbel the Wizard]"; + mes "\"The next transmutation spell is a little harder than the last one I taught you, but you should be able to manage.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Bring me twenty mauve leaves, and I will reveal its invocation.\""; + next; + menu + "Here you are.", L_Next10, + "I'll be back with them.", L_Main_menu; + +L_Next10: + if (countitem("MauveHerb") < 20) + goto L_c_quest_missing; + delitem "MauveHerb", 20; + getexp 1000, 0; + @Q_main_status = @Q_STATUS_STUDENT1; + callsub S_Update_Var; + mes "[Auldsbel the Wizard]"; + mes "He pockets your mauve leaves."; + mes "\"Those should go very well with the salmon.\""; + mes "[1000 experience points]"; + next; + mes "[Auldsbel the Wizard]"; + mes "\"The next spell I have will make a normal tank top out of four pieces of cloth. The invocation is '" + get(.invocation$, "make-tanktop") + "', make sure to write this down.\""; + next; + goto L_Main_menu; + +L_stu_1: + if (@mexp < 425) + goto L_Notready; + mes "[Auldsbel the Wizard]"; + mes "\"Up next is the transmutation spell for regular shirts.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"For this, I would like ten scorpion stingers.\""; + next; + menu + "Here you are.", L_Next11, + "I'll be back with them.", L_Main_menu; + +L_Next11: + if (countitem("ScorpionStinger") < 10) + goto L_c_quest_missing; + delitem "ScorpionStinger", 10; + getexp 1000, 0; + @Q_main_status = @Q_STATUS_STUDENT2; + callsub S_Update_Var; + mes "[Auldsbel the Wizard]"; + mes "He carefully takes the stingers."; + mes "\"You are being quite helpful. If my experiments go well, I will make sure to acknowledge you in a footnote somewhere.\""; + mes "[1000 experience points]"; + next; + mes "[Auldsbel the Wizard]"; + mes "\"To make a shirt, use the invocation '" + get(.invocation$, "make-shirt") + "'. This will require five pieces of cloth.\""; + next; + goto L_Main_menu; + +L_stu_2: + if (@mexp < 500) + goto L_Notready; + mes "[Auldsbel the Wizard]"; + mes "\"You may find the next spell particularly useful.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Bring me twenty wooden logs, and I will teach you.\""; + next; + menu + "Here you are.", L_Next12, + "I'll be back with them.", L_Main_menu; + +L_Next12: + if (countitem("RawLog") < 20) + goto L_c_quest_missing; + delitem "RawLog", 20; + getexp 1000, 0; + @Q_main_status = @Q_STATUS_STUDENT3; + callsub S_Update_Var; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel places the logs next to his hut."; + mes "\"I'm hoping to animate them into the shape of one of those odd log heads.\""; + mes "[1000 experience points]"; + next; + mes "[Auldsbel the Wizard]"; + mes "\"This spell makes arrows out of a single wooden log. Its invocation is '" + get(.invocation$, "make-arrows") + "'.\""; + next; + goto L_Main_menu; + +L_stu_3: + if (getskilllv(SKILL_MAGIC) < 3) + goto L_mag_skill_ins; + mes "[Auldsbel the Wizard]"; + mes "\"I believe that you may be ready for the next level of transmutation magic! Let me teach you one last spell that you can handle before your promotion, and if you can cast this one, I will advance you.\""; + next; + goto L_stu_3_repeat; + +L_stu_3_repeat: + mes "[Auldsbel the Wizard]"; + mes "\"This one has the invocation `" + get(.invocation$, "make-concentration-potion") + "'. Put two cobalt leaves and two pink flower petals into a bottle of water, hold it up, and speak that phrase.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"It is a tricky spell, but if it works out, you will transform the bottle into a concentration potion.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Hmm. That reminds me – there was a similar spell, but I forgot what it was... anyway, try using this, and bring me the potion when you are done.\""; + next; + @Q_main_status = @Q_STATUS_STUDENT4; + callsub S_Update_Var; + goto L_Main_menu; + +L_stu_4: + mes "[Auldsbel the Wizard]"; + mes "\"Did you manage to transmute a concentration potion?\""; + next; + menu + "What was the invocation again?", L_stu_3_repeat, + "No, still working on it...", L_Main_menu, + "Yes.", L_Next13; + +L_Next13: + if (countitem("ConcentrationPotion") < 1) + goto L_stu_4_no_potion; + if (!(MAGIC_FLAGS & MFLAG_MADE_CONC_POTION)) + goto L_stu_4_wrong_potion; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel examines your potion and nods."; + mes "\"Good work! You are ready for a promotion!\""; + next; + mes "[Auldsbel the Wizard]"; + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + @Q_main_status = @Q_STATUS_STUDENT5; + callsub S_Update_Var; + mes "[Auldsbel the Wizard]"; + mes "You feel new powers flowing into your body!"; + @SUP_id = SKILL_MAGIC_TRANSMUTE; + @SUP_name$ = "Transmutation Magic"; + @SUP_xp = 30000; + @SUP_lvl = 3; + callfunc "SkillUp"; + next; + goto L_Main_menu; + +L_stu_4_wrong_potion: + mes "[Auldsbel the Wizard]"; + mes "Auldsbell examines your potion, then shakes his head."; + mes "\"This doesn't look quite right, though I can't quite point at what the problem is. You will have to continue trying.\""; + next; + goto L_Main_menu; + +L_stu_4_no_potion: + mes "[Auldsbel the Wizard]"; + mes "\"You seem to be rather lacking the concentration potion you need to justify your claim, my dear fellow.\""; + next; + goto L_Main_menu; + +L_stu_5: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm. Come back some other time, please; I still haven't figured out what to teach you next.\""; + close; + +L_mag_skill_ins: + mes "[Auldsbel the Wizard]"; + mes "\"No, not at this time. You will have to advance in your overall magic skill before I can teach you more.\""; + next; + goto L_Main_menu; + +L_close: + close; + +S_Update_Var: + @Q_status = @Q_main_status | (@Q_component_quest << 5); + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/011-1/mapflags.txt b/npc/011-1/mapflags.txt new file mode 100755 index 00000000..c36799bc --- /dev/null +++ b/npc/011-1/mapflags.txt @@ -0,0 +1 @@ +//011-1 mapflag resave 011-1,103,34 diff --git a/npc/011-1/oscar.txt b/npc/011-1/oscar.txt new file mode 100755 index 00000000..133ebcaf --- /dev/null +++ b/npc/011-1/oscar.txt @@ -0,0 +1,486 @@ + + + + +function script HalloweenQuestWaterPumpkins { + if (Quest_Halloween != 5 || $@HalloweenQuest_PumpkinHunter$ != "") + goto L_Return; + $@HalloweenQuest_PumpkinHunter$ = strcharinfo(0); + donpcevent "Oscar::OnCommandSpg"; + goto L_Return; + +L_Return: + return; +} + +011-1,94,38,0 script Oscar NPC142,{ + // Check we are at the good time of the year + if (!(gettime(6) == 11 && (gettime(5) >= 4 && gettime(5) <= 30))) goto L_NoEvent; + // Check halloween quest has been done or not. + @halloween_year = (Annual_Quest & BYTE_0_MASK) >> BYTE_0_SHIFT; + if (@halloween_year < (gettime(7) - 2000)) goto L_AdjustYear; + goto L_Init; + +L_AdjustYear: + Quest_Halloween = 0; + @halloween_year = gettime(7) - 2000; + callsub S_Update_Annual_Quest; + goto L_Init; + +L_NoEvent: + mes "[Oscar]"; + mes "\"Welcome here!"; + mes "I'm the owner of this farm. I'm growing fruits around here as you can see.\""; + next; + mes "\"Some of my fruits are for sale in my shop right here."; + mes "Don't hesitate to drop by. They are cheap!\""; + close; + +L_Init: + if (@halloween_year == (gettime(7) - 2000) + 1) goto L_QuestAlreadyDone; + if (Quest_Halloween == 0) goto L_Introduce; + if (Quest_Halloween == 1 || Quest_Halloween == 2) goto L_CheckSeeds; + if (Quest_Halloween == 3) goto L_HelpGrowSeeds; + if (Quest_Halloween == 4) goto L_HelpFillWaters; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ == "") goto L_HelpWaterPatches; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ == strcharinfo(0)) goto L_HelpCleanPumpkins; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ != "") goto L_WateringBusy; + if (Quest_Halloween == 6) goto L_GetReward; + if (Quest_Halloween == 10) goto L_GetSlap; + goto L_End; + +L_Introduce: + mes "[Oscar]"; + mes "\"Heya!\""; + next; + mes "\"I just came back from a long trip... Really tiring, but so interesting.\""; + menu + "Oh? Where did you go?", L_Next, + "Well... I believe.", L_End; + +L_Next: + mes "[Oscar]"; + mes "\"Well, I travelled to the economic center of this continent."; + mes "It's north-east of here. Quite far I must say.\""; + next; + mes "\"But it was worth it really."; + mes "I went there to see ways to improve my little plantation here."; + mes "Oh well, sell some of my fruits too, see some of my fellow farmers. Classic business.\""; + next; + mes "\"Until a few days ago, they were holding a large party to celebrate Halloween."; + mes "Very nice really... And in particular, I saw these strange veggies they call pumpkins.\""; + next; + mes "\"They taste really good you see, but ahah, they weren't really for eating at that moment!"; + mes "Anyway, I wondered if I could grow some here. Until now I only grow apples and oranges.\""; + menu + "That's an interesting idea!", L_Next1, + "Really, I hate pumpkins.", L_End; + +L_Next1: + mes "[Oscar]"; + mes "\"However, I couldn't get any seeds, but I heard rumors in that city, saying we could find pumpkins in the forests north-east of here."; + mes "Most likely there are pumpkin seeds laying around them.\""; + next; + mes "\"They also mentioned something strange about them, but hey, who cares! Just rumors!\""; + next; + + if (BaseLevel < 45) + goto L_TooYoung; + + mes "\"Do you think you can get some for me?\""; + menu + "Sure. Leave it to me!", L_Next2, + "Well, I don't have time for that right now.", L_End; + +L_Next2: + mes "[Oscar]"; + mes "\"Thanks so much " + strcharinfo(0) + "!"; + mes "I can't wait to try them!\""; + Quest_Halloween = 1; + goto L_End; + +L_TooYoung: + mes "\"Ahm... That may be a little dangerous for you though. I don't want to send a kid in the deep forest.\""; + goto L_End; + +L_End: + @halloween_year = 0; + close; + +L_CheckSeeds: + if (countitem("PumpkinSeeds") < $@halloween_num_seeds) + goto L_NotEnoughSeeds; + delitem "PumpkinSeeds", $@halloween_num_seeds; + Quest_Halloween = 3; + mes "[Oscar]"; + mes "\"Yes you found them! I can start to make them grow now!"; + mes "Thank you so much " + strcharinfo(0) + "!\""; + goto L_End; + +L_NotEnoughSeeds: + mes "[Oscar]"; + mes "\"Oh, it looks like you didn't find enough seeds yet...\""; + goto L_End; + +L_HelpGrowSeeds: + // Wait 20 seconds before triggering the next step. + if (@halloween_seeds_timer == 0) + @halloween_seeds_timer = gettimetick(2); + if ((gettimetick(2) - @halloween_seeds_timer) < 5) + goto L_WaitGrowSeeds; + mes "[Oscar]"; + mes "\"Oh, you are back!\""; + next; + mes "You notice Oscar looks quite disappointed."; + next; + mes "[Oscar]"; + mes "\"You see I could use some more help from you."; + mes "My supplies of water are quite low because of the long trip I made."; + mes "And I've been watering the pumpkin patches, but unfortunately I'm already out of water before I can see anything growing.\""; + next; + mes "\"If you could help me fill these " + $@halloween_num_water_bottles + " bottles with water, that would be very kind of you!\""; + + @nature_magic = getskilllv(SKILL_MAGIC_NATURE); + if (@nature_magic > 1) + goto L_ProposeUseKaflosh; + @nature_magic = 0; + menu + "Yeah sure!", L_Next3, + "That sounds boring to do. No thanks.", L_End; + +L_Next3: + getinventorylist; + if (@inventorylist_count == 100 && countitem("EmptyBottle") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + Quest_Halloween = 4; + goto L_GetEmptyBottles; + +L_ProposeUseKaflosh: + @nature_magic = 0; + menu + "Yeah sure!", L_Next4, + "Maybe I can help you water them with magic!", L_WaterWithKaflosh, + "That sounds boring to do. No thanks.", L_End; + +L_Next4: + getinventorylist; + if (@inventorylist_count == 100 && countitem("EmptyBottle") == 0) + goto L_InventoryFull; + Quest_Halloween = 4; + goto L_GetEmptyBottles; + +L_GetEmptyBottles: + mes "[Oscar]"; + mes "\"Ok, here are the " + $@halloween_num_water_bottles + " empty bottles.\""; + next; + mes "\"Oh and while you fill these bottles, why not bring some friends here as well?"; + mes "Let's not be reckless. Maybe these rumors about the pumpkins are true."; + mes "Oh, unless you consider yourself strong enough to take care of this alone!\""; + getitem "EmptyBottle", $@halloween_num_water_bottles; + goto L_End; + +L_WaitGrowSeeds: + mes "[Oscar]"; + mes "\"Thanks again " + strcharinfo(0) + "!"; + mes "I'm planting these seeds right now.\""; + next; + mes "\"Stay around if you want to see what it looks like!"; + mes "Amazing I tell you, amazing!\""; + goto L_End; + +L_HelpFillWaters: + mes "[Oscar]"; + mes "\"Hey, you again!\""; + next; + if ($@HalloweenQuest_PumpkinHunter$ != "") + goto L_WateringBusy; + mes "\"So do you have the " + $@halloween_num_water_bottles + " bottles filled with fresh water?\""; + menu + "Yes! Fresh and clear water.", L_Next5, + "Oh, not yet. I'm on my way.", L_End; + +L_Next5: + if (countitem("BottleOfWater") < $@halloween_num_water_bottles) + goto L_NotEnoughWaters; + + // make an additional check here, since the player had a dialog pause in the above menu. + if ($@HalloweenQuest_PumpkinHunter$ != "") + goto L_WateringBusy; + delitem "BottleOfWater", $@halloween_num_water_bottles; + + mes "[Oscar]"; + mes "\"Many thanks! I wonder what I would have done without you!"; + mes "I'll water the patches right away. Watch this!\""; + Quest_Halloween = 5; + $@HalloweenQuest_PumpkinHunter$ = strcharinfo(0); + callsub S_StartPumpkinsSpawn; + goto L_End; + +L_WaterWithKaflosh: + getinventorylist; + if (@inventorylist_count == 100 && countitem("BottleOfWater") == 0) + goto L_InventoryFull; + mes "[Oscar]"; + mes "\"Oh, I see!"; + next; + mes "\"So, I'm waiting you show me your skills!"; + mes "Water the pumpkin patches right here with your awesome magic!\""; + next; + mes "\"Here is one bottle of water to do it.\""; + next; + mes "\"By the way, I told you about the rumors concerning these pumpkins."; + mes "Why not bring some friends here? Oh, unless you consider yourself strong enough!\""; + Quest_Halloween = 5; + getitem "BottleOfWater", 1; + goto L_End; + +L_HelpWaterPatches: + // We check again here that the player has magic skills + // This case happens when the player has logged off + // during the infestation phase. + @nature_magic = getskilllv(SKILL_MAGIC_NATURE); + if (!(@nature_magic > 1)) + goto L_HelpFillWaters; + @nature_magic = 0; + mes "[Oscar]"; + mes "\"Come on, water the pumpkin patches right here with your awesome magic!"; + mes "For sure you will be more efficient than me!\""; + goto L_End; + +L_WateringBusy: + mes "[Oscar]"; + mes "\"Sorry. I'm really busy at the moment."; + mes "May you come back later? Thank you, thank you..."; + mes "Sorry I have to take care of this now!\""; + goto L_End; + +L_HelpCleanPumpkins: + mes "[Oscar]"; + mes "\"Help me clean all these pumpkins! It's a disaster!\""; + goto L_End; + +L_NotEnoughWaters: + mes "[Oscar]"; + mes "\"That's not enough bottles to water all these pumpkin patches."; + mes "Please bring me more.\""; + goto L_End; + +S_Update_Annual_Quest: + Annual_Quest = (Annual_Quest & ~(BYTE_0_MASK) | (@halloween_year << BYTE_0_SHIFT)); + return; + +OnCommandSpg: + callsub S_StartPumpkinsSpawn; + end; + +S_StartPumpkinsSpawn: + $@HalloweenQuest_PumpkinsCount = $@halloween_num_pumpkins; + $@HalloweenQuest_PumpkinsState = 0; + initnpctimer; + return; + +L_QuestAlreadyDone: + mes "[Oscar]"; + mes "\"I'm relieved all this mess is sorted out now."; + mes "That was interesting, but really, fruits are more quiet!\""; + goto L_End; + +OnInit: + $@halloween_num_seeds = 12; + $@halloween_num_water_bottles = 15; + $@halloween_num_pumpkins = $@halloween_num_seeds * 4; + end; + +OnTimer1000: + goto L_TimerFunction; + +OnTimer2000: + goto L_TimerFunction; + +OnTimer3000: + goto L_TimerFunction; + +L_TimerFunction: + if ($@HalloweenQuest_PumpkinsState != 1) + end; + callsub S_CheckPlayer; + $@HalloweenQuest_PumpkinsTimer = $@HalloweenQuest_PumpkinsTimer + 1; + if (mobcount("011-1", "Oscar::OnPD") < 0 && + mobcount("011-1", "Oscar::OnPDP") < 0 && + $@HalloweenQuest_PumpkinsCount <= 0) + goto L_AllPumpkinsDead; + // A quick "cheer up" + if ($@HalloweenQuest_PumpkinsTimer == 300) + npctalk strnpcinfo(0), "Hurry up " + $@HalloweenQuest_PumpkinHunter$ + "! My farm is being ruined!"; + // 7 mins max + if ($@HalloweenQuest_PumpkinsTimer > 420) + goto L_PumpkinsRuined; + + if (getnpctimer(0) >= 2900) + goto L_TrySpawnPumpkin; + end; + +L_TrySpawnPumpkin: + if ($@HalloweenQuest_PumpkinsCount > 0) + areamonster "011-1", 97, 40, 101, 44, "", 1063, 1, "Oscar::OnPD"; + setnpctimer 0; + end; + +OnTimer2500: + if ($@HalloweenQuest_PumpkinsState != 0) + end; + areamonster "011-1", 97, 40, 101, 44, "", 1063, 2, "Oscar::OnPD"; + end; + +OnTimer6000: + if ($@HalloweenQuest_PumpkinsState != 0) + end; + emotion EMOTE_AFRAID; + npctalk strnpcinfo(0), "Oh no, these pumpkins look strange and infested with bugs! Help me get rid of them " + $@HalloweenQuest_PumpkinHunter$ + "!"; + $@HalloweenQuest_PumpkinsState = 1; + setnpctimer 0; + end; + +OnPD: + if (strcharinfo(0) != $@HalloweenQuest_PumpkinHunter$) + goto L_KillBadHunter; + $@HalloweenQuest_PumpkinsCount = $@HalloweenQuest_PumpkinsCount - 1; + if (@discover_poisonous_pumpkin_again == 0) + message strcharinfo(0), "Oh no! These pumpkins are poisonous as well!"; + @discover_poisonous_pumpkin_again = 1; + // Small damages + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -10, 0; + sc_start SC_POISON, 1, 3; + // Spawn mobs or get items + @halloween_rand = rand(0,100); + // Seeds reward + if (@halloween_rand < 10) + getitem "PumpkinSeeds", 1; + // Pumpkin helmet reward + if (@halloween_rand >= 10 && @halloween_rand < 17) + getitem "PumpkinHelmet", 1; + // huntsman spider x1 + if (@halloween_rand < (15*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1083, 1, "Oscar::OnPDP"; + // Or spider x1 + if (@halloween_rand >= (15*BaseLevel)/100 && @halloween_rand < (75*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1012, 1, "Oscar::OnPDP"; + // Or archant x2 + if (@halloween_rand >= (75*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1060, 2, "Oscar::OnPDP"; + + @halloween_rand = 0; + end; + +OnPDP: + end; + +L_KillBadHunter: + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -Hp, 0; + end; + +L_PumpkinsRuined: + npctalk strnpcinfo(0), "No! " + $@HalloweenQuest_PumpkinHunter$ + " how could you let that happen? All my farm is a mess now! All my trees are infested with bugs!"; + goto L_Fail; + +L_AllPumpkinsDead: + goto L_Success; + +S_CheckPlayer: + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$)) == 0) + goto L_PlayerOff; + if (ispcdead()) + goto L_PlayerDead; + if (isin("011-1",20,5,130,110) == 0) + goto L_PlayerLeft; + detachrid; + return; + +L_PlayerOff: + npctalk strnpcinfo(0), "What? Where is " + $@HalloweenQuest_PumpkinHunter$ + "? Someone, help me!"; + goto L_Fail; + +L_PlayerLeft: + npctalk strnpcinfo(0), "What the!! " + $@HalloweenQuest_PumpkinHunter$ + " left me alone with all this! Someone, help me!"; + goto L_Fail; + +L_PlayerDead: + npctalk strnpcinfo(0), "Oh no I can't believe it! " + $@HalloweenQuest_PumpkinHunter$ + " just died! Someone, help me!"; + goto L_Fail; + +L_Fail: + // If the player is logged off, since we check every second that the player + // is online, we can consider it's an accident, so we will allow to redo the quest + // Otherwise, it's a "valid" fail. + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$))) + Quest_Halloween = 10; + goto L_Clean; + +L_Success: + // Make this check again or the server will crash. + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$)) == 0) + goto L_PlayerOff; + Quest_Halloween = 6; + emotion EMOTE_GRIN; + npctalk strnpcinfo(0), "Hurray, " + $@HalloweenQuest_PumpkinHunter$ + " you did it! Thank you thank you! Come here!"; + goto L_Clean; + +L_Clean: + killmonster "011-1", "Oscar::OnPD"; + killmonster "011-1", "Oscar::OnPDP"; + $@HalloweenQuest_PumpkinHunter$ = ""; + $@HalloweenQuest_PumpkinsCount = 0; + $@HalloweenQuest_PumpkinsState = 0; + $@HalloweenQuest_PumpkinsTimer = 0; + stopnpctimer; + detachrid; + end; + +L_GetReward: + mes "[Oscar]"; + mes "\"" + strcharinfo(0) + ", you were wonderful!"; + mes "My farm is safe thanks to you!\""; + next; + mes "\"Look, when I went to this city a few days ago, I could find this magnificient fruit."; + mes "I believe not many exist in the world, but hey, this one is for you!\""; + + getinventorylist; + if (@inventorylist_count == 100 && countitem("GoldenDeliciousApple") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + getitem "GoldenDeliciousApple", 1; + @halloween_year = gettime(7) - 2000 + 1; + Quest_Halloween = 0; + callsub S_Update_Annual_Quest; + goto L_End; + +L_GetSlap: + mes "[Oscar]"; + mes "\"Ah! There you are "+strcharinfo(0)+"!"; + next; + mes "\"As you can see, my farm is safe now."; + mes "I can't really say it's thanks to you though!\""; + next; + mes "\"Well, I won't be a bad guy."; + mes "Take this for your trouble and farewell!\""; + + getinventorylist; + if (@inventorylist_count == 100 && countitem("CandyPumpkin") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + getitem "CandyPumpkin", 5; + @halloween_year = gettime(7) - 2000 + 1; + Quest_Halloween = 0; + callsub S_Update_Annual_Quest; + goto L_End; + +L_InventoryFull: + @inventorylist_count = 0; + next; + mes "\"Ah, but you cannot carry anything else!"; + mes "Make some room first.\""; + goto L_End; +} diff --git a/npc/011-1/shops.txt b/npc/011-1/shops.txt new file mode 100755 index 00000000..ce409917 --- /dev/null +++ b/npc/011-1/shops.txt @@ -0,0 +1,2 @@ + +011-1,80,33,0 shop Fruit Store NPC400,719:5,535:6,657:10 diff --git a/npc/011-3/_import.txt b/npc/011-3/_import.txt new file mode 100644 index 00000000..1a659519 --- /dev/null +++ b/npc/011-3/_import.txt @@ -0,0 +1,6 @@ +// Map 011-3: Hermit's Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/011-3/_mobs.txt", +"npc/011-3/_warps.txt", +"npc/011-3/hermit.txt", +"npc/011-3/mapflags.txt", diff --git a/npc/011-3/_mobs.txt b/npc/011-3/_mobs.txt new file mode 100644 index 00000000..190bd43c --- /dev/null +++ b/npc/011-3/_mobs.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-3: Hermit's Cave mobs +011-3,0,0,0,0 monster Manana Tree 1017,10,0,0 +011-3,0,0,0,0 monster Mana Bug 1035,3,60000,30000 diff --git a/npc/011-3/_warps.txt b/npc/011-3/_warps.txt new file mode 100644 index 00000000..c7c117e6 --- /dev/null +++ b/npc/011-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-3: Hermit's Cave warps +011-3,31,14,0 warp #011-3_31_14 0,0,011-4,73,10 diff --git a/npc/011-3/hermit.txt b/npc/011-3/hermit.txt new file mode 100755 index 00000000..8b1eeb74 --- /dev/null +++ b/npc/011-3/hermit.txt @@ -0,0 +1,64 @@ + +011-3,30,23,0 script Arkim NPC116,{ + mes "[Arkim the Hermit]"; + mes "\"Do you want to go back outside?\""; + if (@knowhermitstory == 1) goto L_Short_Menu; + menu + "Yes, please!", L_Sure, + "Not yet.", L_close, + "Actually... Why do you live here?", L_Interested; + +L_Short_Menu: + menu + "Yes, please!", L_Sure, + "Not yet.", L_close, + "What was that deal you were offering?", L_Quest; + +L_Sure: + warp "011-1", 60, 95; + close; + +L_Interested: + mes "[Arkim the Hermit]"; + mes "\"Oh my, never really thought about it!\""; + next; + mes "[Arkim the Hermit]"; + mes "\"I guess mostly I enjoy experimenting with the bats here.\""; + menu + "I see...", L_close, + "What type of experimenting?", L_Experiment; + +L_Experiment: + mes "[Arkim the Hermit]"; + mes "\"Never really thought about it either...\""; + next; + mes "You watch as the hermit's old, lazy eyes open wide, and the old man comes alive with energy."; + next; + mes "[Arkim the Hermit]"; + mes "\"I GUESS I REALLY LIKE CUTTING THEM UP TO SEE HOW THEY WORK!! HAHAHA!\""; + menu + "YOU'RE CRAZY!", L_close, + "Right... me too! Can I help?", L_Quest; + +L_close: + close; + +L_Quest: + @knowhermitstory = 1; + + @dq_level = 20; + @dq_cost = 4; + @dq_count = 3; + @dq_name$ = "BatWing"; + @dq_friendly_name$ = "bat wings"; + @dq_money = 600; + @dq_exp = 100; + + callfunc "DailyQuest"; + + next; + + mes "[Arkim the Hermit]"; + mes "\"And remember: never lend your toothbrush to a slime!\""; + close; +} diff --git a/npc/011-3/mapflags.txt b/npc/011-3/mapflags.txt new file mode 100755 index 00000000..2b696f6d --- /dev/null +++ b/npc/011-3/mapflags.txt @@ -0,0 +1 @@ +//011-3 mapflag resave 011-1,103,34 diff --git a/npc/011-4/_import.txt b/npc/011-4/_import.txt new file mode 100644 index 00000000..fbb867b2 --- /dev/null +++ b/npc/011-4/_import.txt @@ -0,0 +1,6 @@ +// Map 011-4: Lake Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/011-4/_mobs.txt", +"npc/011-4/_warps.txt", +"npc/011-4/bl_barrier.txt", +"npc/011-4/mapflags.txt", diff --git a/npc/011-4/_mobs.txt b/npc/011-4/_mobs.txt new file mode 100644 index 00000000..225f623a --- /dev/null +++ b/npc/011-4/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-4: Lake Cave mobs +011-4,52,30,19,19 monster PumpkinMob 1019,1,100000,30000 +011-4,93,114,19,19 monster Dummy 1021,1,100000,30000 +011-4,0,0,0,0 monster Dummy 1021,40,0,0 +011-4,0,0,0,0 monster PumpkinMob 1019,15,0,0 +011-4,60,78,28,37 monster Beehive 1056,10,100000,30000 +011-4,63,21,55,17 monster Beehive 1056,10,100000,30000 +011-4,0,0,0,0 monster Manana Tree 1017,20,180000,40000 diff --git a/npc/011-4/_warps.txt b/npc/011-4/_warps.txt new file mode 100644 index 00000000..8a512935 --- /dev/null +++ b/npc/011-4/_warps.txt @@ -0,0 +1,13 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-4: Lake Cave warps +011-4,73,8,0 warp #011-4_73_8 0,0,011-3,31,16 +011-4,129,86,0 warp #011-4_129_86 0,0,009-3,20,56 +011-4,39,35,0 warp #011-4_39_35 0,0,011-6,47,184 +011-4,16,57,0 warp #011-4_16_57 0,0,011-6,24,205 +011-4,89,20,0 warp #011-4_89_20 0,0,011-6,97,168 +011-4,105,32,0 warp #011-4_105_32 0,0,011-6,114,183 +011-4,114,61,0 warp #011-4_114_61 0,0,011-6,123,212 +011-4,86,75,0 warp #011-4_86_75 0,0,011-6,95,226 +011-4,62,86,0 warp #011-4_62_86 0,0,011-6,68,234 +011-4,32,5,0 warp #011-4_32_5 1,0,011-6,186,181 +011-4,45,118,0 warp #011-4_45_118 0,0,011-6,266,181 diff --git a/npc/011-4/bl_barrier.txt b/npc/011-4/bl_barrier.txt new file mode 100755 index 00000000..4f6512aa --- /dev/null +++ b/npc/011-4/bl_barrier.txt @@ -0,0 +1,24 @@ + +011-4,111,121,0 script #BL_Barrier NPC45,0,0,{ + @state = ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@state >= 6) goto L_Cave_Abandoned; + if (@state >= 4) goto L_Lord_Barrier_Open; + + message strcharinfo(0), "This entrance appears to be locked."; + goto L_End; + +L_Cave_Abandoned: + message strcharinfo(0), "This place looks like it was abandoned."; + warp "011-6",251,275; + goto L_End; + +L_Lord_Barrier_Open: + message strcharinfo(0), "You insert the silver arrow key and unlock the entrance."; + warp "011-6",251,275; + goto L_End; + +L_End: + @state = 0; + end; +} diff --git a/npc/011-4/mapflags.txt b/npc/011-4/mapflags.txt new file mode 100755 index 00000000..b9eb6c70 --- /dev/null +++ b/npc/011-4/mapflags.txt @@ -0,0 +1 @@ +//011-4 mapflag resave 011-1,103,34 diff --git a/npc/011-6/_import.txt b/npc/011-6/_import.txt new file mode 100644 index 00000000..f8211577 --- /dev/null +++ b/npc/011-6/_import.txt @@ -0,0 +1,8 @@ +// Map 011-6: Bandit Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/011-6/_mobs.txt", +"npc/011-6/_warps.txt", +"npc/011-6/barrier.txt", +"npc/011-6/bryant.txt", +"npc/011-6/crastur.txt", +"npc/011-6/mapflags.txt", diff --git a/npc/011-6/_mobs.txt b/npc/011-6/_mobs.txt new file mode 100644 index 00000000..7c62f07f --- /dev/null +++ b/npc/011-6/_mobs.txt @@ -0,0 +1,49 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-6: Bandit Cave mobs +011-6,152,72,141,63 monster Mana Bug 1035,9,30000,100000 +011-6,263,38,15,17 monster Robin Bandit 1064,1,30000,30000 +011-6,262,114,19,19 monster Robin Bandit 1064,1,30000,30000 +011-6,132,119,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,170,66,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,67,70,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,196,107,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,196,29,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,36,37,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,112,40,22,24 monster Robin Bandit 1064,2,30000,60000 +011-6,31,99,8,10 monster Robin Bandit 1064,1,30000,30000 +011-6,223,250,61,32 monster Manana Tree 1017,5,30000,100000 +011-6,224,175,59,12 monster Manana Tree 1017,3,30000,100000 +011-6,257,77,2,63 monster Manana Tree 1017,6,30000,100000 +011-6,192,77,2,63 monster Manana Tree 1017,9,30000,100000 +011-6,167,110,43,6 monster Manana Tree 1017,9,30000,100000 +011-6,75,70,52,48 monster Manana Tree 1017,23,30000,100000 +011-6,78,195,64,48 monster Manana Tree 1017,9,30000,100000 +011-6,168,109,18,18 monster PumpkinMob 1019,5,30000,100000 +011-6,199,76,18,18 monster PumpkinMob 1019,5,30000,100000 +011-6,88,163,14,13 monster PumpkinMob 1019,5,30000,100000 +011-6,48,113,17,9 monster PumpkinMob 1019,5,30000,100000 +011-6,177,94,10,14 monster Pikpik 1013,4,30000,100000 +011-6,194,49,10,14 monster Pikpik 1013,2,30000,100000 +011-6,51,115,23,12 monster Pikpik 1013,2,30000,100000 +011-6,63,169,6,8 monster Pikpik 1013,2,30000,100000 +011-6,100,226,14,7 monster PumpkinMob 1019,3,30000,100000 +011-6,260,44,26,8 monster PumpkinMob 1019,3,30000,100000 +011-6,272,48,10,14 monster Pikpik 1013,2,30000,100000 +011-6,95,78,15,12 monster Little Blub 1007,5,30000,100000 +011-6,59,36,9,12 monster Little Blub 1007,5,30000,100000 +011-6,26,69,9,12 monster Little Blub 1007,5,30000,100000 +011-6,61,101,7,5 monster Little Blub 1007,3,30000,100000 +011-6,50,61,4,6 monster Little Blub 1007,3,30000,100000 +011-6,128,39,4,6 monster Little Blub 1007,3,30000,100000 +011-6,41,178,4,6 monster Little Blub 1007,1,30000,100000 +011-6,70,229,4,6 monster Little Blub 1007,1,30000,100000 +011-6,20,204,4,6 monster Little Blub 1007,1,30000,100000 +011-6,114,190,4,6 monster Little Blub 1007,4,30000,100000 +011-6,137,205,4,6 monster Little Blub 1007,2,30000,100000 +011-6,79,220,14,7 monster Dummy 1021,3,30000,100000 +011-6,115,210,14,7 monster Dummy 1021,3,30000,100000 +011-6,41,193,15,15 monster Dummy 1021,3,30000,100000 +011-6,70,143,15,15 monster Dummy 1021,3,30000,100000 +011-6,97,183,14,7 monster Dummy 1021,3,30000,100000 +011-6,172,252,4,6 monster Beehive 1056,4,30000,100000 +011-6,263,236,8,2 monster Beehive 1056,3,30000,100000 diff --git a/npc/011-6/_warps.txt b/npc/011-6/_warps.txt new file mode 100644 index 00000000..374205bd --- /dev/null +++ b/npc/011-6/_warps.txt @@ -0,0 +1,24 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-6: Bandit Cave warps +011-6,51,75,0 warp #011-6_51_75 0,0,011-6,260,127 +011-6,61,71,0 warp #011-6_61_71 0,0,011-6,270,124 +011-6,270,125,0 warp #011-6_270_125 0,0,011-6,61,72 +011-6,260,128,0 warp #011-6_260_128 0,0,011-6,51,76 +011-6,145,118,0 warp #011-6_145_118 0,0,011-6,47,119 +011-6,196,26,0 warp #011-6_196_26 0,0,011-6,261,46 +011-6,261,47,0 warp #011-6_261_47 0,0,011-6,196,27 +011-6,271,52,0 warp #011-6_271_52 0,0,011-6,98,31 +011-6,98,30,0 warp #011-6_98_30 0,0,011-6,271,51 +011-6,47,120,0 warp #011-6_47_120 0,0,011-6,145,117 +011-6,49,101,0 warp #011-6_49_101 0,0,011-1,38,37 +011-6,24,206,0 warp #011-6_24_206 0,0,011-4,16,58 +011-6,47,185,0 warp #011-6_47_185 0,0,011-4,39,36 +011-6,97,169,0 warp #011-6_97_169 0,0,011-4,89,21 +011-6,113,182,0 warp #011-6_113_182 0,0,011-4,106,33 +011-6,122,211,0 warp #011-6_122_211 0,0,011-4,115,62 +011-6,94,225,0 warp #011-6_94_225 0,0,011-4,87,76 +011-6,68,235,0 warp #011-6_68_235 0,0,011-4,62,87 +011-6,251,278,0 warp #011-6_251_278 0,0,011-4,111,122 +011-6,186,182,0 warp #011-6_186_182 1,0,011-4,32,6 +011-6,266,182,0 warp #011-6_266_182 0,0,011-4,45,119 +011-6,174,256,0 warp #011-6_174_256 0,0,011-6,264,237 diff --git a/npc/011-6/barrier.txt b/npc/011-6/barrier.txt new file mode 100755 index 00000000..8de20cc9 --- /dev/null +++ b/npc/011-6/barrier.txt @@ -0,0 +1,15 @@ +011-6,264,236,0 script #BL_Barrier2 NPC45,0,0,{ + @state = ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@state >= 6) goto L_Lord_Hideout_Open; + message strcharinfo(0), "You have a feeling that you should not enter this place now."; + goto L_End; + +L_Lord_Hideout_Open: + warp "011-6",174,255; + goto L_End; + +L_End: + @state = 0; + end; +} diff --git a/npc/011-6/bryant.txt b/npc/011-6/bryant.txt new file mode 100755 index 00000000..c2de975f --- /dev/null +++ b/npc/011-6/bryant.txt @@ -0,0 +1,73 @@ + +011-6,27,200,0 script Bryant NPC126,{ + @state = ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@state >= 5) goto L_Bryant_Quiet; + if (@state == 4) goto L_Bryant_Waits; + if (@state == 3) goto L_Bryant_Summon; + + mes "[Bryant]"; + mes "\"I'm looking everywhere for the bandit leader. I can't seem to find him.\""; + goto L_close; + +L_Bryant_Summon: + mes "[Bryant]"; + mes "\"I ran into that bandit lord and he got me good. I'm going to stay here for a while and heal. He dropped this key. Take it. You might be able to handle him better than I could.\""; + next; + mes "Bryant gives you a key, shaped to look like a small silver arrow."; + next; + mes "\"I believe I saw him run into a cave south and east of here. There is a red carpet in front of the cave entrance. Be careful and good luck.\""; + @state = 4; + callsub S_Update_Var; + monster "011-6",260,250,"BanditLord",1065,1, "Bryant::OnBanditLordDead"; + goto L_close; + +OnBanditLordDead: + message strcharinfo(0), "You killed the bandit lord."; + @state = ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + if (@state != 4) + goto L_End; + @state = 5; + callsub S_Update_Var; + BOSS_POINTS = BOSS_POINTS + 20; + message strcharinfo(0), "You gain 20 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + @state = 0; + end; + +L_Bryant_Waits: + mes "[Bryant]"; + mes "\"I think the bandit lord is still around. I fear this could be dangerous for the people of Hurnscald. When you went to the cave with the red carpet in front of it, did you find him and kill him?\""; + menu + "No.", L_Bryant_No, + "Yes.", L_Bryant_Yes; + +L_Bryant_No: + mes "[Bryant]"; + mes "\"Well, maybe he ran off. I'm pretty sure he should be there now.\""; + killmonster "011-6", "Bryant::OnBanditLordDead"; + monster "011-6",260,250,"BanditLord",1065,1, "Bryant::OnBanditLordDead"; + goto L_close; + +L_Bryant_Yes: + mes "[Bryant]"; + mes "\"I don't think you killed him. Please try to find and kill him. He should be in the cave south and east of here with the red carpet in front of it.\""; + killmonster "011-6", "Bryant::OnBanditLordDead"; + monster "011-6",260,250,"BanditLord",1065,1, "Bryant::OnBanditLordDead"; + goto L_close; + +L_Bryant_Quiet: + mes "[Bryant]"; + mes "\"Glad that bandit leader got what was coming to him.\""; + goto L_close; + +L_close: + @state = 0; + close; + +S_Update_Var: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT)); + return; +} diff --git a/npc/011-6/crastur.txt b/npc/011-6/crastur.txt new file mode 100755 index 00000000..5042d0e5 --- /dev/null +++ b/npc/011-6/crastur.txt @@ -0,0 +1,220 @@ +011-6,172,250,0 script Crastur the Ugly NPC418,{ + @spants_state = ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + if (@spants_state < 3) goto L_Regular; + if (@spants_state == 3) goto L_Ask; + if (@spants_state == 4 || @spants_state == 5 || @spants_state == 6) goto L_Ask_Again; + goto L_Main; + + +L_Ask: + mes "[Crastur]"; + mes ""; + mes "\"Well, well, well\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"Just look who arrived here\""; + emotion EMOTE_EVIL, strcharinfo(0); + next; + mes "[Crastur]"; + mes ""; + mes "\"If this isn't the person that cleared my way to success\""; + menu + "\"Who? Me?\"", L_Unsure, + "\"Yes I killed the Bandit Lord, but not to make room for more scumbags\"", L_Insult, + "\"I heard you know a lot\"", L_Ask_Cont, + "\"Ugh, no. I have to leave now. Bye.\"", L_close; + +L_Ask_Again: + mes "[Crastur]"; + mes ""; + mes "\"Hello again\""; + mes "\"Did you do your part of the deal yet?\""; + menu + "\"No, I wanted to know if you can tell me anything about me\"", L_Personal, + "\"Probably not, what was that again?\"", L_Pirate_Proof, + "\"Yes, check this Bandana I brought.\"", L_Bandana, + "\"No Idea, Bye.\"", L_close; + +L_Ask_Cont: + mes "[Crastur]"; + mes ""; + mes "\"Yes I do, for a price.\""; + menu + "Explain Hetchels story", L_Jibber, + "Interesting", L_Main; + +L_Jibber: + mes "You begin to tell Crastur about Hetchel and her Problems"; + next; + mes "Crastur interrupts you"; + mes "[Crastur]"; + mes ""; + mes "\"I do not care about petty problems, get to the point!\""; + @spants_state = 4; + callsub S_Update_Spants; + menu + "\"Hetchel needs the Plans for Cotton Trousers Stolen from Lora Tay\"", L_Jibber_Cont, + "\"Don't talk to me like that\" (Leave)", L_close; + +L_Jibber_Cont: + mes "[Crastur]"; + mes ""; + mes "\"this can be done quickly\""; + next; + mes "Crastur pauses and checks his papers"; + mes "\"...\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"The issue here is\""; + mes "\"you have literally nothing that is of any value to me\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"Although... Since you claim to be a hero and everything...\""; + mes "\"I do have a problem with those pirates in Tulimshar. They are ruining my Business\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"Bring me proof that you killed all of the pirates!\""; + next; + @spants_state = 5; + callsub S_Update_Spants; + menu + "\"I have it right here\"", L_Bandana, + "\"What kind of proof?\"", L_Pirate_Proof; + + +L_Pirate_Proof: + mes "[Crastur]"; + mes ""; + mes "\"It is for sure the Pirates give their souls for the rescue of their booty.\""; + mes "\"Bring me something unique from their treasure and I will give you those plans in return.\""; + menu + "\"I have it with me.\"", L_Bandana, + "\"I will try my best.\"", L_close; + +L_Bandana: + getinventorylist; + if (countitem("Bandana") < 1) goto L_No_Item; + if (@spants_state != 6) goto L_Wrong_Item; + mes "Crasturs gazes at the bandana in your hand. He scratches his right arm, then he nods"; + mes "[Crastur]"; + mes ""; + mes "\"I am a man of honour, I always pay my debt\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"Here, I couldnt get the original Sheet but this copy should do well enough\""; + next; + mes "\"Crastur hands you a page ripped out of his Almanach that has dotted lines in green and red Ink all over it"; + next; + mes "You put the plans into a hidden pocket"; + @spants_state = 7; + callsub S_Update_Spants; + goto L_close; + +L_No_Item: + mes "[Crastur]"; + mes ""; + mes "\"What Bandana are we talking about? - Next time you come to me, bring your stuff.\""; + goto L_close; + +L_Wrong_Item: + mes "Crastur takes a look at the bandana."; + next; + mes "[Crastur]"; + mes "THIS IS NOT FROM THE PIRATES FROM TULIMSHAR, it is a cheap scam."; + emotion EMOTE_PERTURBED, strcharinfo(0); + mes "As far as you can tell through his mask he seems very mad"; + goto L_Insult; + +L_Regular: + mes "[Crastur]"; + mes ""; + mes "\"Well, well, well\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"Just look who arrived here\""; + next; + mes "[Crastur]"; + mes ""; + mes "\"If this isn't the person that cleared my way to success\""; + menu + "\"Who? Me?\"", L_Unsure, + "\"Yes I killed the Bandit Lord, but not to make room for more scumbags\"", L_Insult, + "\"Ugh, no. I have to leave now. Bye.\"", L_close; + +L_Insult: + npctalk strnpcinfo(0), "Crastur : Die " + strcharinfo(0) + "!"; + heal -10000, 0; + emotion EMOTE_VICIOUS; + mes "[Crastur]"; + mes ""; + mes "\"Oh I am so sorry, my Dagger must have slipped\""; + goto L_close; + +L_Unsure: + mes "[Crastur]"; + mes ""; + mes "\"Yes I hid in a corner while you killed my former master\""; + mes "\"When he left I claimed command over Argaeses Rats, Caves and Dungeons.\""; + mes "\"Do not underestimate me, I do know a lot more than you might guess\""; + goto L_Main; + +L_Main: + if((@inspector >= 1 && @inspector <= 7) || @inspector == 9) goto L_Main_Inspector; + menu + "\"What things do you know about me?\"", L_Personal, + "\"Bye\"", L_close; + +L_Main_Inspector: + menu + "\"What things do you know about me?\"", L_Personal, + "\"Do you know anything about the Robberies in Hurnscald?\"", L_Hurnscald, + "\"Bye\"", L_close; + +L_Personal: + mes ""; + mes "Crastur digs in a pile of old paper"; + next; + mes "[Crastur]"; + mes ""; + mes "\"Ah. Here it is:\""; + mes "\"Today you have accomplished tasks that are worth " + DailyQuestPoints + " Hours in the Northern Mines\""; + next; + if (BOSS_POINTS < 1000) goto L_Worm; + emotion EMOTE_DEAD, strcharinfo(0); + mes "[Crastur]"; + mes ""; + mes "\"Also you seem to be quite a hero, it appears you have a record in the Almanach\""; + mes "Crastur turns a giant book upside down"; + mes "\"According to this you have gained " + BOSS_POINTS / 1000 + "thousand Points in the eternal charts already.\""; + mes "Crastur shudders"; + goto L_close; + +L_Worm: + emotion EMOTE_SUSPICIOUS, strcharinfo(0); + mes "[Crastur]"; + mes "\"Other than that you have not done anything notable for the mana world.\""; + goto L_close; + +L_Hurnscald: + emotion EMOTE_FACEPALM, strcharinfo(0); + mes "Crastur makes a barking sound that probably was meant as a laugh."; + mes "[Crastur]"; + mes ""; + mes "\"I am sorry but it is not in my best interest to talk about my business with you.\""; + goto L_close; + +S_Update_Spants: + QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + return; + +L_close: + @spants_state = 0; + close; +} diff --git a/npc/011-6/mapflags.txt b/npc/011-6/mapflags.txt new file mode 100755 index 00000000..6ff6bebe --- /dev/null +++ b/npc/011-6/mapflags.txt @@ -0,0 +1 @@ +//011-6 mapflag resave 011-1,103,34 diff --git a/npc/012-1/_import.txt b/npc/012-1/_import.txt index 118dc1b3..bc85c0c4 100644 --- a/npc/012-1/_import.txt +++ b/npc/012-1/_import.txt @@ -1,18 +1,9 @@ -// Map 012-1: Candor Island +// Map 012-1: Woodland Hills // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/012-1/_mobs.txt", "npc/012-1/_warps.txt", -"npc/012-1/aahna.txt", -"npc/012-1/aidan.txt", -"npc/012-1/ayasha.txt", -"npc/012-1/crasmande.txt", -"npc/012-1/hasan.txt", -"npc/012-1/ishi.txt", -"npc/012-1/kaan.txt", -"npc/012-1/liana.txt", -"npc/012-1/marine.txt", -"npc/012-1/prawors.txt", -"npc/012-1/tiki.txt", -"npc/012-1/vincent.txt", -"npc/012-1/wateranimation.txt", -"npc/012-1/zegas.txt", +"npc/012-1/amrak.txt", +"npc/012-1/flowerpentagram2.txt", +"npc/012-1/injured-mouboo.txt", +"npc/012-1/mapflags.txt", +"npc/012-1/shops.txt", diff --git a/npc/012-1/_mobs.txt b/npc/012-1/_mobs.txt index ce3a3234..bc36c7ab 100644 --- a/npc/012-1/_mobs.txt +++ b/npc/012-1/_mobs.txt @@ -1,12 +1,13 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-1: Candor Island mobs -012-1,77,78,30,25 monster Mana Bug 1035,8,10000,10000 -012-1,62,95,19,15 monster Butterfly 1032,5,100000,10000 -012-1,78,103,38,12 monster Maggot 1026,10,500,10000 -012-1,57,57,20,14 monster Grass Snake 1042,5,3000,12000 -012-1,106,42,16,7 monster Scorpion 1043,4,15000,50000 -012-1,115,123,14,7 monster Scorpion 1043,4,15000,40000 -012-1,91,81,10,15 monster Small Frog 1086,4,3000,30000 -012-1,86,86,7,11 monster Big Frog 1087,2,6000,75000 -012-1,103,55,14,13 monster Spiky Mushroom 1049,2,3000,6000 -012-1,43,51,3,4 monster Wicked Mushroom 1050,1,6000,12000 +// Map 012-1: Woodland Hills mobs +012-1,0,0,0,0 monster CroconutMob 1014,13,0,100 +012-1,0,0,0,0 monster PumpkinMob 1019,25,0,10 +012-1,0,0,0,0 monster Forest Maggot 1028,20,0,10 +012-1,0,0,0,0 monster Bee 1029,5,2700000,1800000 +012-1,0,0,0,0 monster Pinkie 1030,2,2700000,1800000 +012-1,0,0,0,0 monster Log Head 1031,2,2700000,1800000 +012-1,0,0,0,0 monster Butterfly 1032,2,2700000,1800000 +012-1,0,0,0,0 monster Mana Bug 1035,5,60000,30000 +012-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +012-1,0,0,0,0 monster Gamboge Plant 1038,25,30,20 +012-1,0,0,0,0 monster Amethyst Vein 1055,20,30,20 diff --git a/npc/012-1/_warps.txt b/npc/012-1/_warps.txt index e7f8b126..e05cf52f 100644 --- a/npc/012-1/_warps.txt +++ b/npc/012-1/_warps.txt @@ -1,9 +1,13 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-1: Candor Island warps -012-1,38,115,0 warp #012-1_38_115 0,0,012-2-1,52,38 -012-1,50,104,0 warp #012-1_50_104 0,0,012-2-6,26,38 -012-1,65,105,0 warp #012-1_65_105 0,0,012-2-5,29,43 -012-1,64,95,0 warp #012-1_64_95 0,0,012-2-3,33,36 -012-1,51,93,0 warp #012-1_51_93 0,0,012-2-7,30,34 -012-1,57,101,0 warp #012-1_57_101 0,0,012-2-4,31,43 -012-1,49,67,0 warp #012-1_49_67 1,0,012-3-1,37,40 +// Map 012-1: Woodland Hills warps +012-1,51,39,0 warp #012-1_51_39 0,0,012-3,370,43 +012-1,147,67,0 warp #012-1_147_67 0,0,012-3,474,106 +012-1,41,48,0 warp #012-1_41_48 0,0,012-3,353,78 +012-1,44,88,0 warp #012-1_44_88 0,0,012-3,355,187 +012-1,92,104,0 warp #012-1_92_104 0,0,012-3,270,111 +012-1,98,99,0 warp #012-1_98_99 0,0,012-3,37,81 +012-1,109,92,0 warp #012-1_109_92 0,0,012-3,80,73 +012-1,123,90,0 warp #012-1_123_90 0,0,012-3,38,156 +012-1,150,61,0 warp #012-1_150_61 0,3,013-1,21,75 +012-1,132,176,0 warp #012-1_132_176 1,0,011-1,73,10 +012-1,65,126,0 warp #012-1_65_126 0,0,012-3,176,140 diff --git a/npc/012-1/aahna.txt b/npc/012-1/aahna.txt deleted file mode 100644 index 39ad8192..00000000 --- a/npc/012-1/aahna.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Aahna, a low quality NPC ;) -// TODO: Ask for random drops from Mana Bugs (daily quest) - -012-1,99,64,0 script Aahna NPC_AAHNA,{ - speech - l("Welcome."), - l("I am looking at Mana Bugs. They always drop a bug leg, it is weird."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/aidan.txt b/npc/012-1/aidan.txt deleted file mode 100644 index 06776be3..00000000 --- a/npc/012-1/aidan.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Aidan, a dawdler in Candor. -// THIS IS A PLACEHOLDER! - -012-1,52,114,0 script Aidan NPC_AIDAN,{ - speech - l("Welcome. I am Aidan, from the Monster Hunting Association."), - l("We host daily and weekly monster hunting objectives to adventurers based on their level."), - l("We aren't open yet because Ishi still can't decide how she will hand out the rewards."), - l("But once we open, remember to come to me to sign in our tasks and also to claim rewards with Ishi before they expire!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/amrak.txt b/npc/012-1/amrak.txt new file mode 100755 index 00000000..a088a512 --- /dev/null +++ b/npc/012-1/amrak.txt @@ -0,0 +1,9 @@ + +012-1,137,104,0 script Amrak NPC103,{ + mes "[Amrak]"; + mes "\"I'm studying this waterfall. The water seems to flow from it like magic.\""; + next; + mes "[Amrak]"; + mes "\"Unfortunately, I've had trouble getting up there. The monsters in these caves scare me.\""; + close; +} diff --git a/npc/012-1/ayasha.txt b/npc/012-1/ayasha.txt deleted file mode 100644 index ae47556a..00000000 --- a/npc/012-1/ayasha.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Vincent, a child at the Candor beach. -// THIS IS A PLACEHOLDER! - -012-1,65,111,0 script Ayasha NPC_AYASHA,{ - speech - l("Hey adventurer!"), - l("I lost Liana, she was taking care of me; Have you seen her around? %%i"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/crasmande.txt b/npc/012-1/crasmande.txt deleted file mode 100644 index 85d9308e..00000000 --- a/npc/012-1/crasmande.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Crasmande, the scared man. -// THIS IS A PLACEHOLDER! - -012-1,41,44,0 script Crasmande NPC_CRASMANDE,{ - speech - l("I'm scared!"), - l("Hasan is bullying me!"), - l("%%i"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/flowerpentagram2.txt b/npc/012-1/flowerpentagram2.txt new file mode 100755 index 00000000..92de4de5 --- /dev/null +++ b/npc/012-1/flowerpentagram2.txt @@ -0,0 +1,95 @@ + +012-1,143,70,0 script #FlowerPentagram2 NPC400,{ + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest > 20) goto L_PlacedSecondFlower; + if (OrumQuest == 20) goto L_SecondFlower; + + message strcharinfo(0), "There is something odd about this place."; + end; + +L_SecondFlower: + mes "Orum described this place. You have to place the second magical flower here."; + menu + "Place the flower.", L_Next, + "Leave.", L_close; + +L_Next: + if (isin("012-1", 142, 69, 144, 71)) + goto L_Place; + + mes "This isn't working, you're too far away."; + goto L_close; + +L_Place: + set @localMonsterCount, + mobcount("012-1", "#FlowerPentagram2::OnSquirrelDeath") + + mobcount("012-1", "#FlowerPentagram2::OnMushroomDeath") + + mobcount("012-1", "#FlowerPentagram2::OnScorpionDeath") + + mobcount("012-1", "#FlowerPentagram2::OnRScorpionDeath") + + 4; // the mobcount function has an offset of -1, so we add 4 to have the actual amount of monsters + if (@localMonsterCount > 2) + goto L_MonstersAlive; + + if (countitem("PurpleSummonFlower") < 1) + goto L_NoFlower; + delitem "PurpleSummonFlower", 1; + mes "Remembering what happened the last time, you take a careful look around. Everything's calm. You proceed to place the second flower."; + mes "Sensing a certain tension build up around you, you can't help but feel alarmed."; + OrumQuest = 21; + close2; + areamonster "012-1", 140, 64, 146, 73, "", 1105, 2, "#FlowerPentagram2::OnSquirrelDeath"; + areamonster "012-1", 140, 64, 146, 73, "", 1106, 2, "#FlowerPentagram2::OnMushroomDeath"; + areamonster "012-1", 140, 64, 146, 73, "", 1003, 2, "#FlowerPentagram2::OnScorpionDeath"; + areamonster "012-1", 140, 64, 146, 73, "", 1004, 2, "#FlowerPentagram2::OnRScorpionDeath"; + @value = 15; + callfunc "QuestSagathaAnnoy"; + @value = 0; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + @mobId = 1106; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + @mobId = 1004; + callfunc "MobPoints"; + end; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "This place has recently been used to summon something! And the beings are still nearby!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_close; + +L_NoFlower: + mes "You look into your pocket, but the flower isn't there. Where did you put it?"; + mes "If you can't find it, you should talk to Orum again."; + goto L_close; + +L_PlacedSecondFlower: + mes "You placed the second of Orum's magical flowers on this spot."; + mes "You can still feel the magical power shimmering around this place, waiting to be unleashed."; + goto L_close; + +L_PlacedFifthFlower: + mes "This is where you placed the second of Orum's magical flowers."; + mes "However, now that the summoning spell has been cast, everything is back to normal here."; + goto L_close; + +L_close: + @localMonsterCount = 0; + close; +} diff --git a/npc/012-1/hasan.txt b/npc/012-1/hasan.txt deleted file mode 100644 index 79cf9023..00000000 --- a/npc/012-1/hasan.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Hasan, the bad guy. -// THIS IS A PLACEHOLDER! - -012-1,39,44,0 script Hasan NPC_HASAN,{ - speech - l("Hey. I did nothing, I swear."), - l("Crasmande has been this way since I got here."), - l("Don't you have more important business to attend to, anyway?"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/injured-mouboo.txt b/npc/012-1/injured-mouboo.txt new file mode 100755 index 00000000..167e91d8 --- /dev/null +++ b/npc/012-1/injured-mouboo.txt @@ -0,0 +1,226 @@ + +function script QuestMoubooHeal { + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + @Q_status_upper = @Q_status & 12; + @Q_status = @Q_status & 3; + + @STATE_INITIAL = 0; + @STATE_HEALED_MOUBOO = 3; + + if (@Q_status != @STATE_INITIAL) + goto L_Nothing; + + @Q_status = @STATE_HEALED_MOUBOO; + callsub S_Update_Var; + mes "[Injured Mouboo]"; + mes "A soft white glow surrounds the mouboo's leg, which slowly shifts back into place."; + mes "As the glow subsides, the mouboo gets up, carefully, and takes a few steps. It seems to be fully healed!"; + mes "[5000 experience points]"; + getexp 5000, 0; + next; + mes "[Injured Mouboo]"; + mes "Visibly happy, the mouboo lies down on the ground and snuggles with a black piece of cloth it had been lying on."; + mes "The healing process must have been exhausting, for it is asleep in an instant."; + next; + @value = 15; + callfunc "QuestSagathaHappy"; + close2; + return; + +L_Nothing: + mes "Your spell has no effect."; + close2; + return; + +S_Update_Var: + @Q_wr_status = @Q_status | @Q_status_upper; + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_wr_status << @Q_SHIFT)); + return; +} + +012-1,57,153,0 script Mouboo NPC171,{ + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + @Q_status_upper = @Q_status & 12; + @Q_status = @Q_status & 3; + + @STATE_INITIAL = 0; + @STATE_KILLED_MOUBOO = 1; + @STATE_TOOK_KILL_REWARD = 2; + @STATE_HEALED_MOUBOO = 3; + + if (@Q_status == @STATE_KILLED_MOUBOO) + goto L_Dead; + if (@Q_status == @STATE_TOOK_KILL_REWARD) + goto L_took_reward; + if (@Q_status == @STATE_HEALED_MOUBOO) + goto L_healed; + + mes "[Injured Mouboo]"; + mes "You notice a mouboo lying on the ground, groaning, as if in pain."; + next; + goto L_Menu; + +L_Menu: + menu + "Examine the mouboo", L_examine, + "Give the mouboo something", L_Give, + "Kill the mouboo", L_Kill, + "Leave", L_close; + +L_examine: + mes "[Injured Mouboo]"; + mes "Looking closer, you notice that the mouboo's left hind leg is bent at a very unnatural angle – that seems to be the cause for its pain."; + next; + mes "[Injured Mouboo]"; + mes "You also notice that the mouboo is lying on top of what appears to be a black turtleneck sweater."; + mes "Do you want to pick up the sweater?"; + next; + menu + "Yes.", L_pickup_alive, + "No.", L_Menu; + +L_pickup_alive: + mes "[Injured Mouboo]"; + mes "The Mouboo groans and pushes your hand away. It seems to be rather fond of the sweater."; + next; + goto L_Menu; + +L_Give: + @items_nr = 12; + setarray @items$, "CactusDrink", "CactusPotion", "ChocolateBar", "Milk", "OrangeCupcake", "RedApple", "Beer", "BottleOfWater", "TinyHealingPotion", "SmallHealingPotion", "MediumHealingPotion", "LargeHealingPotion"; + setarray @itemnames$, "Cactus Drink", "Cactus Potion", "Chocolate Bar", "Milk", "Orange Cupcake", "Red Apple", "Beer", "Bottle of Water", "Tiny Healing Potion", "Small Healing Potion", "Medium Healing Potion", "Large Healing Potion"; + setarray @itemeat, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0; + + setarray @menuitems$, "", "", "", "", "", "", "", "", "", "", "", "", ""; + @choices_nr = 0; + setarray @menuNames$, "", "", "", "", "", "", "", "", "", "", "", "", ""; + setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + + @n = 0; + @ct = 0; + goto L_nloop; + +L_nloop: + @k$ = @items$[@n]; + if (countitem(@k$) == 0) + goto L_nloop_skip; + + @menuitems$[@ct] = @itemnames$[@n]; + @menuNames$[@ct] = @k$; + @choice_eat[@ct] = @itemeat[@n]; + @ct = @ct + 1; + goto L_nloop_skip; + +L_nloop_skip: + @n = @n+1; + if (@n < @items_nr) + goto L_nloop; + + @menuitems$[@ct] = "Nevermind"; + + menu + @menuitems$[0], L_MenuItems, + @menuitems$[1], L_MenuItems, + @menuitems$[2], L_MenuItems, + @menuitems$[3], L_MenuItems, + @menuitems$[4], L_MenuItems, + @menuitems$[5], L_MenuItems, + @menuitems$[6], L_MenuItems, + @menuitems$[7], L_MenuItems, + @menuitems$[8], L_MenuItems, + @menuitems$[9], L_MenuItems, + @menuitems$[10], L_MenuItems, + @menuitems$[11], L_MenuItems, + @menuitems$[12], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + if (@menu == @ct) + goto L_Menu; + @choice$ = @menuNames$[@menu]; + @verb$ = "drinks"; + if (@choice_eat[@menu]) + @verb$ = "eats"; + if (@choice$ != "" && countitem(@choice$)) + goto L_consume; + goto L_Menu; + +L_consume: + mes "[Injured Mouboo]"; + mes "The mouboo " + @verb$ + " your " + getitemlink(@choice$) + "."; + delitem @choice$, 1; + next; + if (@choice$ == "LargeHealingPotion") + goto L_do_heal; + mes "[Injured Mouboo]"; + mes "Unfortunately, it seems to have had no effect."; + next; + goto L_Menu; + +L_do_heal: + callfunc "QuestMoubooHeal"; + end; + +L_Kill: + mes "[Injured Mouboo]"; + if (BaseLevel > 44) + goto L_Kill_success; + mes "The mouboo deflects your attack and counterattacks!"; + mes "It misses you only barely."; + mes "Injured though it may be, this mouboo is still more than a match for you!"; + next; + goto L_Menu; + +L_Kill_success: + mes "After some wrestling, the mouboo succumbs to your attacks."; + mes "[100 experience points]"; + getexp 100, 0; + @Q_status = @STATE_KILLED_MOUBOO; + callsub S_Update_Var; + next; + goto L_Dead; + +L_Dead: + mes "[Dead Mouboo]"; + mes "The dead mouboo is lying on top of a black T-neck sweater."; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Nopickup; + getitem "BlackTurtleneck", 1; + mes "You pull out the sweater and stuff it into your backpack."; + @Q_status = @STATE_TOOK_KILL_REWARD; + callsub S_Update_Var; + close; + +L_took_reward: + mes "[Dead Mouboo]"; + mes "You see a dead mouboo."; + close; + +L_Nopickup: + mes "Unfortunately, you can't carry any more."; + close; + +L_healed: + mes "[Mouboo]"; + mes "The mouboo is sleeping soundly, smiling in its dreams."; + close; + +L_close: + close; + +S_Update_Var: + @Q_wr_status = @Q_status | @Q_status_upper; + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_wr_status << @Q_SHIFT)); + return; +} diff --git a/npc/012-1/ishi.txt b/npc/012-1/ishi.txt deleted file mode 100644 index a7322978..00000000 --- a/npc/012-1/ishi.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Ishi, former trade-in for monster points. -// THIS IS A PLACEHOLDER! - -012-1,53,114,0 script Ishi NPC_ISHI,{ - speech - l("Welcome. I am Ishi, from the Monster Hunting Association."), - l("I only follow Aidan around, so make your questions to him instead."); - next; - mesn; - mesc l("Ishi seems to be very pensative of something, it is better if we don't disturb her."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/kaan.txt b/npc/012-1/kaan.txt deleted file mode 100644 index 2ea7ad2a..00000000 --- a/npc/012-1/kaan.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Kaan, a guy good for nothing. -// THIS IS A PLACEHOLDER! - -012-1,53,110,0 script Kaan NPC_KAAN,{ - speech - l("Welcome to Candor!"), - l("Such a bright shine day! I would love to tell you stories about this town."), - l("But not now, I'm in the mood to stay under the sun for a while longer."), - l("I hope Tanisha is not slacking off. I would hate having to go check on her."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/liana.txt b/npc/012-1/liana.txt deleted file mode 100644 index ac2ceb9b..00000000 --- a/npc/012-1/liana.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Liana. -// THIS IS A PLACEHOLDER! - -012-1,65,117,0 script Liana NPC_LIANA,{ - mesn; - mesc l("*sighs*"); - next; - mesn; - mesq l("Ayasha went to explore the caves in Candor. They said there was a pretty tree there."); - next; - mesn; - mesq l("...But then she saw the spiders and got scared."); - next; - mesn; - mesq l("Now she is crying looking for me. The poor kid."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/mapflags.txt b/npc/012-1/mapflags.txt new file mode 100755 index 00000000..8cbd7e72 --- /dev/null +++ b/npc/012-1/mapflags.txt @@ -0,0 +1 @@ +//012-1 mapflag resave 012-1,88,141 diff --git a/npc/012-1/marine.txt b/npc/012-1/marine.txt deleted file mode 100644 index db261fd0..00000000 --- a/npc/012-1/marine.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Moubootaur Legends scripts. -// Authors: -// Jesusalva -// Description: -// This script controls access to Ships, fixing variables. - -// Use NPC_LA_MARINE if needed -012-1,64,133,0 script La Marine#C NPC_HIDDEN,0,0,{ - end; - -OnTouch: - EnterTown("Candor"); - - warp "marine@"+LOCATION$, 42, 26; - closedialog; - close; -} diff --git a/npc/012-1/prawors.txt b/npc/012-1/prawors.txt deleted file mode 100644 index 8acf73a1..00000000 --- a/npc/012-1/prawors.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Prawors, the captain in Candor. -// THIS IS A PLACEHOLDER! - -012-1,53,122,0 script Prawors NPC_PRAWORS,{ - speech - l("Arrhoy!"), - l("Saluc Golden Beard, the greediest of all ship captains, charges money for trips. so if you don't have money to pay him, you're stranded here FOREVER!"), - l("I hope you enjoy this town! Meanwhile, I wonder where I put my %s...", getitemlink(TreasureMap)); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/shops.txt b/npc/012-1/shops.txt new file mode 100755 index 00000000..909e70c6 --- /dev/null +++ b/npc/012-1/shops.txt @@ -0,0 +1,75 @@ + +012-1,36,99,0 shop #FlowerShop NPC32767,661:20,664:20,665:20,662:20,667:20,663:20,671:20,673:20,669:20,672:20,674:20 + +012-1,36,99,0 script Blossom NPC163,{ + mes "[Blossom]"; + mes "\"Hello, would you like to buy some flowers?\""; + menu + "Sure.", L_Shop, + "Not right now.", L_close, + "Can I trade this Rose Hat for a differently colored one?", L_RoseHat; + +L_Shop: + close2; + shop "#FlowerShop"; + +L_RoseHat: + @base_id = 897; + mes "[Blossom]"; + mes "\"Certainly, which color do you have?\""; + menu + "A red one.", L_MenuItems, + "A white one.", L_MenuItems, + "A pink one.", L_MenuItems, + "A yellow one.", L_MenuItems, + "An orange one.", L_MenuItems, + "A blue one.", L_MenuItems; + +L_MenuItems: + @have_id = @base_id + @menu - 1; + + mes "[Blossom]"; + mes "\"And which color would you like?\""; + menu + "A red one.", L_MenuItems1, + "A white one.", L_MenuItems1, + "A pink one.", L_MenuItems1, + "A yellow one.", L_MenuItems1, + "An orange one.", L_MenuItems1, + "A blue one.", L_MenuItems1; + +L_MenuItems1: + @receive_id = @base_id + @menu - 1; + + if (@have_id == @receive_id) + goto L_SameColor; + if (countitem(@have_id) < 1) + goto L_NoItem; + delitem @have_id, 1; + getitem @receive_id, 1; + mes "[Blossom]"; + mes "\"Here it is.\""; + goto L_close; + +L_NoItem: + mes "[Blossom]"; + mes "\"Oh, you don't have a Rose Hat in that color."; + mes "Did you mean a different color?\""; + menu + "Yes, I meant a different color.", L_RoseHat, + "No, I changed my mind.", L_close; + +L_SameColor: + mes "[Blossom]"; + mes "\"Oh, you already have a hat in that color."; + mes "Did you want something else?\""; + menu + "Yes, let me pick a different color.", L_RoseHat, + "No, I changed my mind.", L_close; + +L_close: + @base_id = 0; + @have_id = 0; + @receive_id = 0; + close; +} diff --git a/npc/012-1/tiki.txt b/npc/012-1/tiki.txt deleted file mode 100644 index 5596c2ad..00000000 --- a/npc/012-1/tiki.txt +++ /dev/null @@ -1,150 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Tiki is the sandwich maker of Candor - -012-1,116,118,0 script Tiki NPC_TIKI,{ - function tikiSubmit; - function tikiMenu; - function tikiShop; - mesn; - mesq l("Hey there, shady fella. Whaddaya want in Candor shores?"); - next; - if (getq(General_Cooking) == 7) - tikiMenu(); - if (getq(General_Cooking) == 8) - tikiSubmit(); - tikiShop(); - end; - -function tikiShop { - closeclientdialog; - shop .name$; - return; -} - -function tikiMenu { - .@q2=getq2(General_Cooking); - select - l("Just wanted to purchase ingredients for cooking."), - l("Actually, I would like to learn some recipes."), - l("Actually I'm lost. Sorry."); - mes ""; - // Explode script as requested - if (@menu == 3) - close; - // Return so shop can take over - if (@menu == 1) - return; - // @menu == 2, "I would like to learn some recipes" - mesn strcharinfo(0); - mesc l("You quickly explain the situation and request the %s sandwich.", getitemlink(.@q2 == VEGAN ? MananaSandwich : PioulegSandwich)); - next; - mesn; - mesq l("Ahh, I see! Very shady indeed, almost as shady as you are!"); - next; - mesn; - mesq l("I would like to help, but I can't. I'm busy, you see! Candor's Sandwich Making Contest is coming up, and I never lost a single instance of it!"); - next; - select - l("Ah, too bad, I'll ask Yannika for more ideas, bye."), - l("How come you never lost before?"), - l("Perhaps I can help?"); - mes ""; - if (@menu == 1) - close; - if (@menu == 2) { - mesn; - mesq l("Because I'm so great! I am so good, that the other challengers doesn't even show up in fear of losing to me!"); - next; - mesn; - mesq l("Anyway, perhaps you could help me, and I'll help you in exchange. Whaddaya think?"); - next; - } - mesn; - mesq l("It is really easy - I need an idea. Bring me something NEW, revolutionary, to make a sandwich out of it. And I'll teach you the recipe!"); - next; - setq1 General_Cooking, 8; - return; -} - -function tikiSubmit { - mesc "[" + .name$ + "]"; - mesc l("\"Bring me something NEW, revolutionary, to make a sandwich out of it.\""); - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - - .@id = requestitem(); - - // If ID is invalid - if (.@id < 1) - close; - - // If there's not enough items, it is bound, it cannot be traded/dropped/sold, etc. - // TODO: Prevent plates/bowls from being destroyed this way!! - if (countitem(.@id) < 1 || checkbound(.@id) || getiteminfo(.@id, ITEMINFO_TYPE) != IT_HEALING) { - mesc l("This item cannot be given."); - close; - } - - mesc l("Are you sure you want to give %s to %s? Item will be lost!", - getitemlink(.@id), .name$), 1; - if (askyesno() == ASK_NO) - close; - - mesn; - mesq l("%s puts %s on between two bread slices and try it.", .name$, getitemname(.@id)); - next; - delitem .@id, 1; - if (.@id != MoubooSteak) { - mesn; - mesc l("%s starts shouting insults at you!", .name$); - next; - mesn; - mesq l("This is the worst. sandwich. ever! How do you dare to give me such thing?!"); - next; - mesn; - mesq l("Go get me something else, go do it NOW!!"); - mesc l("...Maybe if he put the cheese and lettuce as you usually do, it would have tasted great... *sigh*"); - close; - } - setq1 General_Cooking, 9; - setq1 General_SmearedHands, 3; - RECIPES[(.@q2 == VEGAN ? CraftMananaSandwich : CraftPioulegSandwich)]=true; - mesn; - mesq l("Uh - Oh. This is... Actually good!"); - next; - mesn; - mesq l("I'm sure I'll win this year's contest as well! Hah, just wait and see!"); - next; - mesn; - mesq l("What? Still want that shady recipe? Meh, just cut a bread, throw in three lettuce leaves, two cheese, and put the special ingredient - A %s!", getitemname(.@q2 == VEGAN ? Manana : PiouLegs)); - next; - mesq l("And vói-la, you have your sandwich done. Now go, I have a contest to win! Hahaha!"); - close; -} - -OnInit: - .distance = 4; - tradertype(NST_MARKET); - - sellitem Bread, -1, 35; - sellitem PiouLegs, -1, 25; - sellitem Manana, -1, 20; - sellitem Cheese, -1, 12; - sellitem LettuceLeaf, -1, 10; - sellitem CommonCarp, -1, 8; - sellitem GrassCarp, -1, 7; - end; - -OnClock0001: - restoreshopitem Bread, 35; - restoreshopitem PiouLegs, 25; - restoreshopitem Manana, 20; - restoreshopitem Cheese, 12; - restoreshopitem LettuceLeaf, 10; - restoreshopitem CommonCarp, 8; - restoreshopitem GrassCarp, 7; - end; -} - diff --git a/npc/012-1/vincent.txt b/npc/012-1/vincent.txt deleted file mode 100644 index e859d02e..00000000 --- a/npc/012-1/vincent.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Vincent, a child at the Candor beach. -// THIS IS A PLACEHOLDER! - -012-1,121,126,0 script Vincent NPC_VINCENT,{ - speech - l("Scorpions everywhere!"), - l("Why do they show up, anyway? I thought Scorpions prefered deserts, not beaches."), - l("I need to study more... But... I want to play! And I want to make figurines!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-1/wateranimation.txt b/npc/012-1/wateranimation.txt deleted file mode 100644 index ad1b41e4..00000000 --- a/npc/012-1/wateranimation.txt +++ /dev/null @@ -1,12 +0,0 @@ -// The Mana World scripts. -// Description: -// Water animations, splash, fishes, etc... - -012-1,87,92,0 duplicate(#fish_river2) #candor_fish01 NPC_WATER_SPLASH -012-1,86,85,0 duplicate(#fish_river2) #candor_fish02 NPC_WATER_SPLASH -012-1,98,74,0 duplicate(#fish_river2) #candor_fish03 NPC_WATER_SPLASH -012-1,94,76,0 duplicate(#fish_river2) #candor_fish04 NPC_WATER_SPLASH -012-1,61,73,0 duplicate(#fish_river2) #candor_fish05 NPC_WATER_SPLASH -012-1,65,74,0 duplicate(#fish_river2) #candor_fish06 NPC_WATER_SPLASH -012-1,58,64,0 duplicate(#fish_river2) #candor_fish07 NPC_WATER_SPLASH - diff --git a/npc/012-1/zegas.txt b/npc/012-1/zegas.txt deleted file mode 100644 index 29f72a5d..00000000 --- a/npc/012-1/zegas.txt +++ /dev/null @@ -1,36 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Zegas, the guy who want you to clean storage room. -// THIS IS A PLACEHOLDER! - -012-1,48,105,0 script Zegas NPC_ZEGAS,{ - mesn; - mesc l("*sighs*"); - next; - mesn; - mesq l("I need someone to clean the storage room..."); - next; - mesn; - mesq l("Hey, you! Don't you want to clean the storage room for me?"); - next; - select - l("Yes, of course!"), - l("'course not!"); - mes ""; - mesn; - if (@menu == 2) { - mesq l("Nobody ever does..."); - } else { - mesc l("Zegas hands you a broom."); - mesq l("Good, now start cleaning it!"); - // TODO: Maybe we actually could have you cleaning the room boxes. - // Then you find a peculiar dusty utensil inside. Then, some quest begins. - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-1/_import.txt b/npc/012-2-1/_import.txt deleted file mode 100644 index 13ff23d2..00000000 --- a/npc/012-2-1/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-1: Sorfina's Home -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-1/_warps.txt", -"npc/012-2-1/jessie.txt", -"npc/012-2-1/tanisha.txt", diff --git a/npc/012-2-1/_warps.txt b/npc/012-2-1/_warps.txt deleted file mode 100644 index 4ccc3898..00000000 --- a/npc/012-2-1/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-1: Sorfina's Home warps -012-2-1,52,39,0 warp #012-2-1_52_39 0,0,012-1,38,116 -012-2-1,53,30,0 warp #012-2-1_53_30 0,0,012-2-2,30,34 diff --git a/npc/012-2-1/jessie.txt b/npc/012-2-1/jessie.txt deleted file mode 100644 index 7356bfe6..00000000 --- a/npc/012-2-1/jessie.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Jessie, Sorfina's old husband. -// THIS IS A PLACEHOLDER! - -012-2-1,38,30,0 script Jessie NPC_JESSIE,{ - speech - l("Welcome."), - l("I am \"uncle\" Jessie and I teach the kids in Candor."); - next; - mesn; - mesq l("Actually... Do you know why the Piou crossed the road?"); - next; - if (askyesno() == ASK_NO) { - mesn; - mesq l("Dang! I don't know either, but I'm too shy to ask."); - } else { - mesc l("Why the Piou crossed the road?"); - input .@jessanswer$; - mesn; - mesq l("Pfft, you obviously don't know either!"); - } - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-1/tanisha.txt b/npc/012-2-1/tanisha.txt deleted file mode 100644 index a0bb358b..00000000 --- a/npc/012-2-1/tanisha.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Tanisha, the little girl in Sorfina's house. -// THIS IS A PLACEHOLDER! - -012-2-1,48,34,0 script Tanisha NPC_TANISHA,{ - speech - l("Welcome."), - l("Kaan asked me to kill maggots, which I hate! But I'm not seeing any..."), - l("I wonder if things were supposed to be this way?"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-2/_import.txt b/npc/012-2-2/_import.txt deleted file mode 100644 index 3990e3db..00000000 --- a/npc/012-2-2/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-2: Sleeping Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-2/_savepoints.txt", -"npc/012-2-2/_warps.txt", -"npc/012-2-2/sorfina.txt", diff --git a/npc/012-2-2/_savepoints.txt b/npc/012-2-2/_savepoints.txt deleted file mode 100644 index 1aedace4..00000000 --- a/npc/012-2-2/_savepoints.txt +++ /dev/null @@ -1,28 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-2: Sleeping Room saves -012-2-2,25,27,0 script #save_012-2-2_25_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} -012-2-2,28,27,0 script #save_012-2-2_28_27 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/012-2-2/_warps.txt b/npc/012-2-2/_warps.txt deleted file mode 100644 index f174dc7c..00000000 --- a/npc/012-2-2/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-2: Sleeping Room warps -012-2-2,30,35,0 warp #012-2-2_30_35 0,0,012-2-1,53,31 diff --git a/npc/012-2-2/sorfina.txt b/npc/012-2-2/sorfina.txt deleted file mode 100644 index 4c8f476e..00000000 --- a/npc/012-2-2/sorfina.txt +++ /dev/null @@ -1,34 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Sorfina, the former starting NPC. Could need a new job. -// THIS IS A PLACEHOLDER! - -012-2-2,26,30,0 script Sorfina NPC_SORFINA,{ - speech - l("Welcome, adventurer."), - l("I will never know why people barge in others' houses and get away with it."), - l("Ah, no, I'm not telling you to go away. Visits are always welcome, it gets lonely over time. But I don't have anything to offer you otherwise."); - if (islegacyaccount() && countitem(ClothesPack)) goto L_Legacy; - close; - -L_Legacy: - next; - mesn; - mesq l("Actually, I see you have some really torn %s.", getitemlink(ClothesPack)); - next; - mesn; - mesq l("I see things from several kinds on it - from iron, to steel, to bone, rock, leather, cotton, cashmere, and many others."); - next; - mesn; - mesq l("I wonder what sort of sea disaster could have destroyed them so badly. But, I believe they can be repaired with magic."); - next; - mesn; - mesq l("If only the developers - my next door neighbor - weren't so lazy, maybe I would be able to repair them or know someone able to do that. Sorry."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-3/_import.txt b/npc/012-2-3/_import.txt deleted file mode 100644 index e04ba715..00000000 --- a/npc/012-2-3/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-3: Candor Shop -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-3/_warps.txt", -"npc/012-2-3/cynric.txt", -"npc/012-2-3/nyle.txt", diff --git a/npc/012-2-3/_warps.txt b/npc/012-2-3/_warps.txt deleted file mode 100644 index a64e4ecb..00000000 --- a/npc/012-2-3/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-3: Candor Shop warps -012-2-3,33,37,0 warp #012-2-3_33_37 0,0,012-1,64,96 diff --git a/npc/012-2-3/cynric.txt b/npc/012-2-3/cynric.txt deleted file mode 100644 index 712e4270..00000000 --- a/npc/012-2-3/cynric.txt +++ /dev/null @@ -1,54 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Cynric, Candor's banker. -// THIS IS A PLACEHOLDER! - -012-2-3,27,28,0 script Cynric NPC_CYNRIC,{ - mesn; - mesq l("Welcome to %s's Bank!", l($@BANK_TOWN$[.bankid])); - next; - - do - { - select - l("I would like to store some items."), - l("I would like to perform money transactions."), - l("Is there any request for me?"), - menuaction(l("Quit")); - - mes ""; - - switch (@menu) { - case 1: - mesn; - mesq l("Sure thing! I'll have your items transported here from Artis before you realize!"); - next; - closeclientdialog(); - openstorage(); - close; - case 2: - MerchantGuild_Bank(); - break; - case 3: - MerchantGuild_Quests(.bankid); - break; - default: - closeclientdialog; - goodbye; - close; - } - - } while (true); - close; - -OnInit: - .distance = 4; - - // Bank configuration - array_push($@BANK_NAME$, .name$); - array_push($@BANK_TOWN$, "Candor"); - .bankid = getarraysize($@BANK_NAME$)-1; - end; -} diff --git a/npc/012-2-3/nyle.txt b/npc/012-2-3/nyle.txt deleted file mode 100644 index 900f8776..00000000 --- a/npc/012-2-3/nyle.txt +++ /dev/null @@ -1,67 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Nyle, Candor's shopkeeper. -// THIS IS A PLACEHOLDER! - -012-2-3,42,30,0 script Nyle NPC_NYLE,{ - mesn; - mesq l("Welcome to my fine shop."); - next; - closeclientdialog; - shop .name$; - close; - -OnInit: - .distance = 4; - tradertype(NST_MARKET); - - // Equips - sellitem BrimmedHat, -1, 35; - sellitem Armbands, -1, 20; - sellitem IronArmbands, -1, 20; - sellitem BrownTrousers, -1, 30; - sellitem LousyMoccasins, -1, 20; - sellitem WoodenSword, -1, 50; - sellitem PiouSlayer, -1, 15; - sellitem LeatherShield, -1, 30; - sellitem TrainingArrow, -1, 20000; - - // Edible - sellitem Bread, -1, 15; - sellitem CommonCarp, -1, 8; - sellitem GrassCarp, -1, 7; - sellitem PiberriesInfusion, -1, 200; - sellitem FatesPotion, -1, 100; - sellitem ClothoLiquor, -1, 50; - sellitem LachesisBrew, -1, 30; - sellitem AtroposMixture, -1, 10; - sellitem ElixirOfLife, -1, 2; - - // Misc - sellitem PiouEgg, -1, 25; - end; - -OnClock0001: - restoreshopitem BrimmedHat, 35; - restoreshopitem Armbands, 20; - restoreshopitem IronArmbands, 20; - restoreshopitem BrownTrousers, 30; - restoreshopitem LousyMoccasins, 20; - restoreshopitem WoodenSword, 50; - restoreshopitem PiouSlayer, 15; - restoreshopitem LeatherShield, 30; - restoreshopitem TrainingArrow, 20000; - restoreshopitem Bread, 15; - restoreshopitem CommonCarp, 8; - restoreshopitem GrassCarp, 7; - restoreshopitem PiberriesInfusion, 200; - restoreshopitem FatesPotion, 100; - restoreshopitem ClothoLiquor, 50; - restoreshopitem LachesisBrew, 30; - restoreshopitem AtroposMixture, 10; - restoreshopitem ElixirOfLife, 2; - restoreshopitem PiouEgg, 25; - end; -} diff --git a/npc/012-2-4/_import.txt b/npc/012-2-4/_import.txt deleted file mode 100644 index 659fdc67..00000000 --- a/npc/012-2-4/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-4: Alchemy Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-4/_warps.txt", -"npc/012-2-4/morgan.txt", -"npc/012-2-4/zitoni.txt", diff --git a/npc/012-2-4/_warps.txt b/npc/012-2-4/_warps.txt deleted file mode 100644 index 156a6e54..00000000 --- a/npc/012-2-4/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-4: Alchemy Hut warps -012-2-4,31,44,0 warp #012-2-4_31_44 0,0,012-1,57,102 diff --git a/npc/012-2-4/morgan.txt b/npc/012-2-4/morgan.txt deleted file mode 100644 index e044f509..00000000 --- a/npc/012-2-4/morgan.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Rosen, the salesman in Candor smith. -// THIS IS A PLACEHOLDER! - -012-2-4,26,37,0 script Morgan NPC_MORGAN,{ - speech - l("Hello Wanderer."), - l("I am Morgan, the alchemist."), - l("(People do not like to hear the word 'witch' so much, as we live close to Hurnscald)."), - l("Unfortunately my apprentice Zitoni does not bring me fresh potions, so if you need something you should come back later."), - l("Unless you want a Status Reset?"); - - ConfirmStatusReset(); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-4/zitoni.txt b/npc/012-2-4/zitoni.txt deleted file mode 100644 index 1d8ce355..00000000 --- a/npc/012-2-4/zitoni.txt +++ /dev/null @@ -1,76 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Zitoni, Morgan's apprentice. -// THIS IS A PLACEHOLDER! - -012-2-4,40,37,0 script Zitoni NPC_ZITONI,{ - -OnTalk: - mesn "The man shivers"; - mesq l("The world is so cruel! Oh, cruel world!"); - next; - - menu - l("I do not like whiners."), -, - l("What is your problem?"), L_toams; - - close; - -L_toams: - mesn "He looks at you."; - mesq l("I would so much like to brew potions, but..."); - next; - mesq l("I CANNOT WALK!"); - next; - mesq l("Please, please try to find a guy named toams - he is capable to make me walk again! Please!"); - next; - - menu - l("Ok, I can try."), -, - l("Ok, but do you have something else?"), L_jez; - - close; - -L_jez: - mesq l("Oh, yes! So kind that you ask"); - next; - mesq l("I forgot my tasks to do!"); - next; - mesq l("If only I remembered what I was supposed to do!"); - next; - mesq l("Please, can you look for a guy named Jesusalva? I am very sure he remembers what kind of quest I was going to accomplish."); - next; - - menu - l("Ok, I will do that, but now I must leave."), -, - l("Is that all, or do you have more problems?"), L_wildx; - close; - -L_wildx: - mesq l("Unfortunately yes."); - next; - mesq l("I totally forgot why I am here, and what I am doing here!"); - next; - mesq l("Please, please find WildX. He will explain to me what my role in this world has been."); - - menu - l("Ok, but all that will keep me busy for a while. So, goodbye."), -, - l("You do not have more problems, do you?"), L_mick; - close; - -L_mick: - mesq l("Sure I have one more problem."); - next; - mesq l("Did you ever look at me?!? That ugly robe, that weird whatever I hold in my hand, my strange face and all that!"); - next; - mesq l("Can you do a last task for me and try to find Micksha? He sure can help me to look a bit less ugly."); - next; - mesq("That would be so helpful! Please return soon to tell me about your progress."); - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/012-2-5/_import.txt b/npc/012-2-5/_import.txt deleted file mode 100644 index 1a36bb4d..00000000 --- a/npc/012-2-5/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-5: Candor Smith -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-5/_warps.txt", -"npc/012-2-5/rosen.txt", -"npc/012-2-5/toichi.txt", diff --git a/npc/012-2-5/_warps.txt b/npc/012-2-5/_warps.txt deleted file mode 100644 index d5a52d94..00000000 --- a/npc/012-2-5/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-5: Candor Smith warps -012-2-5,29,44,0 warp #012-2-5_29_44 0,0,012-1,65,106 diff --git a/npc/012-2-5/rosen.txt b/npc/012-2-5/rosen.txt deleted file mode 100644 index 201d4053..00000000 --- a/npc/012-2-5/rosen.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Rosen, the salesman in Candor smith. -// THIS IS A PLACEHOLDER! - -012-2-5,31,34,0 script Rosen NPC_ROSEN,{ - speech - l("Welcome."), - l("I am Rosen, I am selling the best weapons and armor you can get on this island."), - l("If only Toichi would work harder, I could even offer you something. But meh. Like things are, you must try to return at a later point."), - l("Toichi, go to work! Stop drinking beer!"); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-2-5/toichi.txt b/npc/012-2-5/toichi.txt deleted file mode 100644 index 6c35172e..00000000 --- a/npc/012-2-5/toichi.txt +++ /dev/null @@ -1,73 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Toichi, the smith in Candor island. -// THIS IS A PLACEHOLDER! - -012-2-5,40,35,0 script Toichi NPC_TOICHI,{ - function askCrafting; - speech - l("Hi there."), - l("My name is Toichi, and it seems I am the only one working on this lazy island."); - next; - mesq l("So I kindly request you not to listen to that stupid Rosen, saying 'Toichi is lazy'."); - next; - mesq l("At least I am doing something!"); - // TODO: Add here a check for crafting skills - askCrafting(); - close; - -function askCrafting { - next; - select - l("Okay..."), - l("Hey, do you mind if I use your equipment?"), - rif(is_dev(), "[Debug]"); - mes ""; - if (@menu == 1) - return; - - // Debug - if (debug && @menu == 3) - RECIPES[CraftInfantryHelmet]=!RECIPES[CraftInfantryHelmet]; - if (debug || @menu == 3) - mesf("[DEBUG] Knows the infantry helmet recipe? %s", - (RECIPES[CraftInfantryHelmet] ? "YES" : "NO")); - - mesn; - mesq l("Sure, go ahead. But I'll charge you %d E per craft as commission!", .price); - next; - do { - mesc l("What will you craft today?"); - mesc l("It costs %d E to use.", .price), 1; - if (Zeny < .price) - close; - - if (SmithSystem()) { - // This should NEVER, EVER happen. - if (Zeny < .price) { - mesc l("WARNING, you have been detected cheating and thus, violating Gasaron Anti-Theft Policy."), 1; - mesc l("You were jailed and now need a GM to get you out of there."), 1; - // At this point I just c/p the code - logmes "WARNING, "+strcharinfo(0)+" found out cheating, only had "+Zeny+" Esperins for craft table. Jailed.", LOGMES_ATCOMMAND; - atcommand("@jail "+strcharinfo(0)); - Zeny=0; - close; - } - Zeny-=.price; - mesc l("Success!"), 3; - } else { - mesc l("That didn't work!"), 1; - } - next; - mesc l("Try again?"); - } while (askyesno() == ASK_YES); - return; -} - -OnInit: - .distance = 4; - .price = 6000; - end; -} diff --git a/npc/012-2-6/_import.txt b/npc/012-2-6/_import.txt deleted file mode 100644 index e239ad17..00000000 --- a/npc/012-2-6/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 012-2-6: Storage Room -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-6/_warps.txt", diff --git a/npc/012-2-6/_warps.txt b/npc/012-2-6/_warps.txt deleted file mode 100644 index a56767e0..00000000 --- a/npc/012-2-6/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-6: Storage Room warps -012-2-6,26,39,0 warp #012-2-6_26_39 0,0,012-1,50,105 diff --git a/npc/012-2-7/_import.txt b/npc/012-2-7/_import.txt deleted file mode 100644 index 5224df90..00000000 --- a/npc/012-2-7/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-2-7: Small House -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-2-7/_savepoints.txt", -"npc/012-2-7/_warps.txt", -"npc/012-2-7/marazor.txt", diff --git a/npc/012-2-7/_savepoints.txt b/npc/012-2-7/_savepoints.txt deleted file mode 100644 index 0230a227..00000000 --- a/npc/012-2-7/_savepoints.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-7: Small House saves -012-2-7,26,31,0 script #save_012-2-7_26_31 NPC_SAVE_POINT,0,0,{ - savepointparticle .map$, .x, .y, NO_INN; - close; - -OnInit: - .distance = 2; - .sex = G_OTHER; - end; - -OnTouch: - bedTouch(); - end; -} diff --git a/npc/012-2-7/_warps.txt b/npc/012-2-7/_warps.txt deleted file mode 100644 index 29b5aab2..00000000 --- a/npc/012-2-7/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-2-7: Small House warps -012-2-7,30,35,0 warp #012-2-7_30_35 0,0,012-1,51,94 diff --git a/npc/012-2-7/marazor.txt b/npc/012-2-7/marazor.txt deleted file mode 100644 index 9de84bf9..00000000 --- a/npc/012-2-7/marazor.txt +++ /dev/null @@ -1,16 +0,0 @@ -// The Mana World scripts. -// Author: -// Livio -// Description: -// Marazor the barber -// THIS IS A PLACEHOLDER! - -012-2-7,33,29,0 script Marazor NPC_GUMI_THE_DYER,{ - Barber(true); - - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/012-3-1/_import.txt b/npc/012-3-1/_import.txt deleted file mode 100644 index 8856cef8..00000000 --- a/npc/012-3-1/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 012-3-1: Cador Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-3-1/_mobs.txt", -"npc/012-3-1/_warps.txt", diff --git a/npc/012-3-1/_mobs.txt b/npc/012-3-1/_mobs.txt deleted file mode 100644 index 60055f77..00000000 --- a/npc/012-3-1/_mobs.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-1: Cador Cave mobs -012-3-1,47,44,17,18 monster Spider 1044,5,4000,8000 -012-3-1,47,47,23,18 monster Cave Maggot 1027,8,2000,20000 -012-3-1,41,30,13,6 monster Green Slime 1024,3,20000,75000 -012-3-1,51,56,15,7 monster Black Scorpion 1104,1,4000,8000 -012-3-1,60,48,11,14 monster AngryCrafty 1103,3,50000,2500 -012-3-1,36,43,11,7 monster AngryCrafty 1103,2,50000,2500 diff --git a/npc/012-3-1/_warps.txt b/npc/012-3-1/_warps.txt deleted file mode 100644 index 4de4ef4a..00000000 --- a/npc/012-3-1/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-1: Cador Cave warps -012-3-1,43,44,0 warp #012-3-1_43_44 1,0,012-3-3,44,97 -012-3-1,68,62,0 warp #012-3-1_68_62 0,2,012-3-2,22,45 -012-3-1,37,41,0 warp #012-3-1_37_41 2,0,012-1,48,68 diff --git a/npc/012-3-2/_import.txt b/npc/012-3-2/_import.txt deleted file mode 100644 index 1aaa4813..00000000 --- a/npc/012-3-2/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 012-3-2: Candor Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-3-2/_mobs.txt", -"npc/012-3-2/_warps.txt", diff --git a/npc/012-3-2/_mobs.txt b/npc/012-3-2/_mobs.txt deleted file mode 100644 index ee085d8d..00000000 --- a/npc/012-3-2/_mobs.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-2: Parua Cave mobs -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-2: Candor Cave mobs -012-3-2,55,39,13,14 monster Spider 1044,5,4000,8000 -012-3-2,54,41,15,12 monster Black Scorpion 1104,4,4000,8000 -012-3-2,56,41,17,10 monster AngryCrafty 1103,3,50000,2500 -012-3-2,48,40,26,6 monster Cave Maggot 1027,6,2000,20000 diff --git a/npc/012-3-2/_warps.txt b/npc/012-3-2/_warps.txt deleted file mode 100644 index 25b3477a..00000000 --- a/npc/012-3-2/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-2: Parua Cave warps -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-2: Candor Cave warps -012-3-2,21,46,0 warp #012-3-2_21_46 0,1,012-3-1,67,61 diff --git a/npc/012-3-3/_import.txt b/npc/012-3-3/_import.txt deleted file mode 100644 index ee48f7ee..00000000 --- a/npc/012-3-3/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 012-3-3: Mana Tree Cave -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/012-3-3/_mobs.txt", -"npc/012-3-3/_warps.txt", -"npc/012-3-3/manatree.txt", diff --git a/npc/012-3-3/_mobs.txt b/npc/012-3-3/_mobs.txt deleted file mode 100644 index 1d281763..00000000 --- a/npc/012-3-3/_mobs.txt +++ /dev/null @@ -1,7 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-3: Mana Tree Cave mobs -012-3-3,40,28,13,3 monster Green Slime 1024,4,20000,75000 -012-3-3,41,53,15,31 monster Crafty 1018,7,2500,35000 -012-3-3,36,35,9,7 monster Mana Bug 1035,5,10000,10000 -012-3-3,42,39,8,12 monster Silkworm 1040,5,3000,6000 -012-3-3,42,35,7,6 monster Moubi 1072,1,500000,1000000 diff --git a/npc/012-3-3/_warps.txt b/npc/012-3-3/_warps.txt deleted file mode 100644 index c0e6bf40..00000000 --- a/npc/012-3-3/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 012-3-3: Mana Tree Cave warps -012-3-3,44,98,0 warp #012-3-3_44_98 0,0,012-3-1,42,45 diff --git a/npc/012-3-3/manatree.txt b/npc/012-3-3/manatree.txt deleted file mode 100644 index 7f37ad30..00000000 --- a/npc/012-3-3/manatree.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Manatree. -// THIS IS A PLACEHOLDER! - -012-3-3,39,33,0 script Manatree#012-3-3 NPC_MANATREE,{ - speech - l("Magic is all around."), - l("You just must listen to it, and feel it deep inside."), - l("Now go, search for the unknown."); - - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/012-3/_import.txt b/npc/012-3/_import.txt new file mode 100644 index 00000000..09c1f9b0 --- /dev/null +++ b/npc/012-3/_import.txt @@ -0,0 +1,8 @@ +// Map 012-3: Moggun Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-3/_mobs.txt", +"npc/012-3/_warps.txt", +"npc/012-3/mana-seed.txt", +"npc/012-3/mapflags.txt", +"npc/012-3/traveler.txt", +"npc/012-3/warningsigns.txt", diff --git a/npc/012-3/_mobs.txt b/npc/012-3/_mobs.txt new file mode 100644 index 00000000..c0393706 --- /dev/null +++ b/npc/012-3/_mobs.txt @@ -0,0 +1,18 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3: Moggun Cave mobs +012-3,448,65,9,3 monster Blue Rose 1061,5,100000,30000 +012-3,442,45,9,3 monster Blue Rose 1061,5,100000,30000 +012-3,412,31,9,3 monster Blue Rose 1061,5,100000,30000 +012-3,347,39,4,8 monster Blue Rose 1061,5,100000,30000 +012-3,363,101,8,9 monster Blue Rose 1061,10,100000,30000 +012-3,446,81,9,3 monster Blue Rose 1061,5,100000,30000 +012-3,388,138,8,3 monster Blue Rose 1061,5,100000,30000 +012-3,409,78,4,8 monster Blue Rose 1061,5,100000,30000 +012-3,382,152,8,3 monster Blue Rose 1061,5,100000,30000 +012-3,430,117,4,8 monster Blue Rose 1061,5,100000,30000 +012-3,330,100,4,8 monster Blue Rose 1061,5,100000,30000 +012-3,269,138,8,9 monster Blue Rose 1061,10,100000,30000 +012-3,188,52,8,9 monster Blue Rose 1061,10,100000,30000 +012-3,165,106,8,9 monster Blue Rose 1061,10,100000,30000 +012-3,0,0,0,0 monster Manana Tree 1017,100,0,0 +012-3,0,0,0,0 monster Dummy 1021,75,0,0 diff --git a/npc/012-3/_warps.txt b/npc/012-3/_warps.txt new file mode 100644 index 00000000..24dcc19f --- /dev/null +++ b/npc/012-3/_warps.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3: Moggun Cave warps +012-3,37,82,0 warp #012-3_37_82 0,0,012-1,98,100 +012-3,80,74,0 warp #012-3_80_74 0,0,012-1,109,93 +012-3,38,157,0 warp #012-3_38_157 0,0,012-1,123,91 +012-3,270,112,0 warp #012-3_270_112 0,0,012-1,92,105 +012-3,176,138,0 warp #012-3_176_138 0,0,012-1,65,128 +012-3,355,188,0 warp #012-3_355_188 0,0,012-1,44,89 +012-3,370,44,0 warp #012-3_370_44 0,0,012-1,51,40 +012-3,353,79,0 warp #012-3_353_79 0,0,012-1,41,49 +012-3,473,106,0 warp #012-3_473_106 0,0,012-1,146,67 +012-3,448,61,0 warp #012-3_448_61 0,0,012-4,193,57 diff --git a/npc/012-3/mana-seed.txt b/npc/012-3/mana-seed.txt new file mode 100755 index 00000000..3712af51 --- /dev/null +++ b/npc/012-3/mana-seed.txt @@ -0,0 +1,237 @@ +012-3,62,130,0 script Forest Mana Seed#_M NPC166,{ + setarray @magic_exp_needed, + 0, // level 0 + 0, + 100, + 1200, + 8000, + 40000; // level 5 + + setarray @exp_bonus, + 0, + 1000, // level 1 + 10000, + 100000, + 400000, + 2000000; // level 5 + + setarray @min_level, + 0, + 10, + 30, + 50, + 65, + 80; // level 5 + + @visions_nr = 12; + setarray @visions$, + "You see a dark underground temple; you are kneeling, praying for the safety of the planet. You smile as a friend joins you in the dark – but suddenly a shadow falls over you from above, and a stabbing pain...", + "It is midnight; you are in an underground cavern deep inside the desert ruins. Slowly, as if half-asleep, you wander up the spiral pathway, towards the ancient vase at its center. As you reach out to touch it...", + "The old castle smells of mildew and swamp gas. It has not been used in centuries, but you were here before, when the world was young. You turn to face your companions – but something is wrong with all three; an ancient force has possessed them...", + "As you put the horn to your lips, you feel winds flowing, gathering, condensing in your chest. Soon, you can no longer contain it; the storm unleashes through your mouth, into a deafening fanfare. The black dome around you begins to crack...", + "You are alone inside your head, confined by the laughing man's circlet. Powerless, you witness how your hands shoot out flame after flame, incinerating innocents for that man's experiments...", + "The village may be in ruins, but it must have been where you grew up. The engravings on the walls – images of powerful beasts – look strangely familiar, and you can make out writing, words about you, wishes and prayers for you... You are at home...", + "Deep underneath the city, the rocky cavern maze turns into an opulent palace. This must be where the beast of the many eyes resides. Nervously you grip the wand; will the power to repel it be sufficient to defeat it and its magic?", + "At the bottom of the abyss, infinity opens before you. You have proven yourself worthy, and the ancient finally reveals its wisdom...", + "You may only be children, but you recognize that it is this man only who can save the world. As the walls rush towards you to crush your small group, you exchange a glance with your twin sister – there is no doubt what you must do...", + "The sacred place is surrounded by nothingness; were it not for your magic, you would have no hope of returning. The old and young man stands nearby; he has been waiting for you, for centuries. He has all the time in the world, after all...", + "Nothing remains behind. The underground castle is empty now, its chambers plundered, its throne destroyed. Shivering, you climb down the stairs, towards the wailing of the underworld that is waiting beneath...", + "You feel soft, fluffy fur brushing against your skin and are filled with happiness. Somehow, the word `" + get(.invocation$, "happy-curse") + "' comes to mind..."; + + @max_magic = 2; + + @has_magic = getskilllv(SKILL_MAGIC); + @drank_potion = MAGIC_FLAGS & MFLAG_DRANK_POTION; + @knows_seed = MAGIC_FLAGS & MFLAG_KNOWS_MANASEED; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC; + @SUP_name$ = "Magic"; + + if (@has_magic) + goto L_Magic_start; + if (@knows_seed) + goto L_quick_nomagic; + + // first time here + + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_MANASEED; + + mes "[Mana Seed]"; + mes "You see a glowing orb, swimming in the water like a sea rose."; + mes "An unearthly glow is emanating from within, lighting up the water and filling the cave with an eerie light."; + next; + mes "[Mana Seed]"; + if (@drank_potion) + mes "Slowly, the tingling sensation you felt before begins to spread through your body again."; + mes "What would you like to do?"; + next; + goto L_Nomagic_mainmenu; + +L_quick_nomagic: + mes "[Mana Seed]"; + mes "Again you stand before the orb."; + if (@drank_potion) + mes "Slowly, the tingling sensation you felt before begins to spread through your body again."; + mes "What would you like to do?"; + next; + goto L_Nomagic_mainmenu; + +L_Nomagic_mainmenu: + menu + "Examine it more closely", L_Nomagic_examine, + "Take it with you", L_Nomagic_touch, + "Touch it", L_Nomagic_touch, + "Throw a rock at it", L_Nomagic_throwrock, + "Destroy it", L_Nomagic_destroy, + "Leave it alone", L_End; + +L_Nomagic_examine: + mes "[Mana Seed]"; + mes "The orb seems to be perfectly round and emitting a steady glow. It appears to be floating in the water."; + next; + goto L_Nomagic_mainmenu; + +L_Nomagic_throwrock: + mes "[Mana Seed]"; + mes "Your rock makes hardly a sound as it strikes the orb and glances off into the water, leaving neither scratch nor impression."; + mes "The orb budges slightly, but then floats back into its old position, as if it were tethered into place."; + next; + goto L_Nomagic_mainmenu; + +L_Nomagic_touch: + mes "[Mana Seed]"; + if (@drank_potion) + goto L_Magic_level_1; + mes "As you touch the orb, you feel a terrible force within, separated from you by only the thinnest of membranes – like a tempest, all packed up in one tiny waterskin."; + next; + mes "[Mana Seed]"; + mes "For one instant you feel that force rushing past your hands, through your body, as if you had unleashed this tempest upon yourself. Unable to contain the power, you stumble backwards, away from the orb."; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_TOUCHED_MANASEED; + next; + goto L_Nomagic_mainmenu; + +L_Magic_level_1: + if (getskilllv(SKILL_MAGIC)) + goto L_End; // shouldn't be happening + mes "Again you feel the tempest rushing through the Mana Seed's membrane, into your body. You only manage to hold on to it for an instant and find yourself forced to pull your hands away again quickly."; + next; + mes "[Mana Seed]"; + mes "But this time something is different – that tingling sensation is back, and stronger than before. It is spreading through your body, head to toes, and you feel yourself brimming with energy."; + next; + mes "[Mana Seed]"; + mes "It is a light-headed feeling, and you find yourself forced to sit down for a few seconds to recover."; + mes "Something is different. A new power has grown within you and is waiting to be understood."; + @SUP_xp = 1000; + @SUP_lvl = 1; + callfunc "SkillUp"; + next; + goto L_End; + +L_Nomagic_destroy: + mes "[Mana Seed]"; + mes "Try as you might, the orb seems impervious to all forms of attack you can fathom. You are forced to abandon your efforts."; + next; + goto L_Nomagic_mainmenu; + +L_Magic_start: + mes "[Mana Seed]"; + mes "The Mana Seed is still in the same place as during your last visit, spreading its light throughout the cavern."; + mes "What would you like to do?"; + next; + goto L_Magic_mainmenu; + +L_Magic_mainmenu: + menu + "Touch it", L_Magic_touch, + "Destroy it", L_Magic_destroy, + "Leave it alone", L_End; + +L_Magic_touch: + mes "[Mana Seed]"; + mes "You touch the Mana Seed again."; + if (getskilllv(SKILL_MAGIC) >= @max_magic) + goto L_Magic_maxed_out; + @exp_needed = @magic_exp_needed[getskilllv(SKILL_MAGIC) + 1]; + @magic_exp = MAGIC_EXPERIENCE & 65535; + if (@magic_exp >= @exp_needed) + goto L_Magic_levelup; + @prev_exp_needed = @magic_exp_needed[getskilllv(SKILL_MAGIC)]; + @exp_diff = @exp_needed - @prev_exp_needed; + @index = ((@magic_exp - @prev_exp_needed) * 5) / @exp_diff; + setarray @messages$, + "The orb's energy effortlessly rushes through you, ignoring your feeble attempts at containing it. You will need considerably more practice with your magical skills before you can hope to contain it.", + "You only barely manage to hang on to some strands of the orb's energy, but not enough to contain it. You still need noticeably more practice with your magical skills.", + "The orb's powers are still no match for you; you will need more practice to contain more of its powers.", + "You feel close to being able to contain the orb's powers. Still, some more practice is needed.", + "The orb's energy only barely evades your attempts at containing it. Soon you will be able to extract more power from it."; + mes @messages$[@index]; + next; + goto L_Magic_mainmenu; + +L_Magic_levelup: + @BaseLevel_needed = @min_level[getskilllv(SKILL_MAGIC) + 1]; + if (BaseLevel < @BaseLevel_needed) + goto L_ins_BaseLevel; + mes "Its energy permeates you, surrounds you. You are suddenly uncertain if it is you who is containing the orb's powers or if it is the orb who is seeking out yours."; + next; + mes "[Mana Seed]"; + mes "The Seed's tempest is calming beneath your hands, and its energies resonate with yours."; + next; + mes "[Mana Seed]"; + mes "A feeling of harmony is spreading through your body, and the tingling sensation is back, within and without."; + next; + mes "[Mana Seed]"; + mes "As the tingling increases, you feel light-headed, weightless."; + mes "Everything fades..."; + next; + mes "Both the tingling and the sense of harmony have vanished, making room for darkness. You can't feel the Mana Seed anymore..."; + next; + mes "... you can't feel anything."; + next; + mes "You are floating..."; + next; + mes "The darkness is no longer complete. You begin to make out stars in the distance, circling each other, dancing a cosmic dance."; + next; + mes "Images rush past you, shadows of thoughts and dreams. Some touch you, filling you with powerful emotions – despair, ecstasy; sometimes loss, sometimes hope; hate, love."; + next; + mes "Someone else's thoughts pass through your mind..."; + next; + @nr = rand(@visions_nr); + mes @visions$[@nr]; + next; + mes "The image fades."; + next; + mes "[Mana Seed]"; + mes "You awaken, lying on the ground."; + next; + mes "[Mana Seed]"; + mes "Something has changed... you feel more confident in your magical abilities."; + @SUP_xp = @exp_bonus[1 + getskilllv(SKILL_MAGIC)]; + @SUP_lvl = 1 + getskilllv(SKILL_MAGIC); + callfunc "SkillUp"; + heal 0, 10000, 1; + next; + goto L_End; + +L_Magic_maxed_out: + mes "Strangely, you feel nothing, as if its membrane had closed towards you."; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_MANASEED_MAXEDOUT; + next; + goto L_Magic_mainmenu; + +L_ins_BaseLevel: + mes "Its energies rush through you. You fight to keep them under control, to contain them in your body. Alas, your body is too frail – you have to let go."; + mes "Frustrated, you give up. You have the skill needed to control this power, but you will have to grow up some more before your body can handle it."; + next; + goto L_Magic_mainmenu; + +L_Magic_destroy: + mes "[Mana Seed]"; + mes "Try as you might, you cannot find a way, magical or physical, to destroy the seed. Frustrated, you give up."; + next; + goto L_Magic_mainmenu; + +L_End: + close; +} diff --git a/npc/012-3/mapflags.txt b/npc/012-3/mapflags.txt new file mode 100755 index 00000000..4934669d --- /dev/null +++ b/npc/012-3/mapflags.txt @@ -0,0 +1 @@ +//012-3 mapflag resave 012-1,88,141 diff --git a/npc/012-3/traveler.txt b/npc/012-3/traveler.txt new file mode 100755 index 00000000..be3c89bf --- /dev/null +++ b/npc/012-3/traveler.txt @@ -0,0 +1,7 @@ + +012-3,439,62,0 script Meridith the Traveler NPC103,{ + @npcname$ = "Meridith"; + @NpcTravelBit = $@terranite_cave_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/012-3/warningsigns.txt b/npc/012-3/warningsigns.txt new file mode 100755 index 00000000..2e63e8a4 --- /dev/null +++ b/npc/012-3/warningsigns.txt @@ -0,0 +1,16 @@ + +012-3,445,61,0 script sign#pvp-1 NPC187,{ + mes "You are about to enter a dangerous area!"; + next; + mes "This area has a great distance to town. So the protection spell of the town is not active in that cave!"; + mes "That is why other players are able to attack you."; + close; +} + +012-3,451,61,0 script sign#pvp-2 NPC186,{ + mes "You are about to enter a dangerous area!"; + next; + mes "This area has a great distance to town. So the protection spell of the town is not active in that cave!"; + mes "That is why other players are able to attack you."; + close; +} diff --git a/npc/012-4/_import.txt b/npc/012-4/_import.txt new file mode 100644 index 00000000..d3fb8065 --- /dev/null +++ b/npc/012-4/_import.txt @@ -0,0 +1,6 @@ +// Map 012-4: Terranite Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-4/_mobs.txt", +"npc/012-4/_warps.txt", +"npc/012-4/mapflags.txt", +"npc/012-4/pvpflag.txt", diff --git a/npc/012-4/_mobs.txt b/npc/012-4/_mobs.txt new file mode 100644 index 00000000..aff11e97 --- /dev/null +++ b/npc/012-4/_mobs.txt @@ -0,0 +1,66 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-4: Terranite Cave mobs +012-4,217,45,6,1 monster Blue Rose 1061,3,100000,30000 +012-4,223,30,6,1 monster Blue Rose 1061,3,100000,30000 +012-4,239,48,6,1 monster Blue Rose 1061,3,100000,30000 +012-4,197,39,3,4 monster Blue Rose 1061,3,100000,30000 +012-4,210,35,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,241,38,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,237,59,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,226,73,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,209,94,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,263,29,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,274,48,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,267,70,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,259,79,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,274,79,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,268,91,12,7 monster Blue Rose 1061,10,100000,30000 +012-4,209,146,34,27 monster Frostiana 1012,50,100000,30000 +012-4,254,163,9,23 monster Little Blub 1007,10,100000,30000 +012-4,167,175,8,11 monster Little Blub 1007,10,100000,30000 +012-4,148,176,8,11 monster Blub 1008,20,100000,30000 +012-4,131,88,8,11 monster Blub 1008,15,100000,30000 +012-4,140,131,8,11 monster Little Blub 1007,10,100000,30000 +012-4,42,128,8,4 monster Little Blub 1007,10,100000,30000 +012-4,64,62,12,15 monster Frostiana 1012,20,100000,30000 +012-4,69,89,8,10 monster Little Blub 1007,10,100000,30000 +012-4,34,45,8,16 monster Red Rose 1062,3,100000,30000 +012-4,64,36,12,8 monster Scorpion 1043,3,100000,30000 +012-4,100,115,12,8 monster Scorpion 1043,3,100000,30000 +012-4,90,137,8,11 monster Little Blub 1007,10,100000,30000 +012-4,59,113,7,8 monster Spider 1044,3,100000,30000 +012-4,42,176,7,6 monster Red Rose 1062,3,100000,30000 +012-4,120,177,12,8 monster Spider 1044,3,100000,30000 +012-4,287,180,12,8 monster Spider 1044,3,100000,30000 +012-4,340,175,12,8 monster Scorpion 1043,3,100000,30000 +012-4,390,156,34,27 monster Frostiana 1012,40,100000,30000 +012-4,358,37,10,11 monster Red Rose 1062,3,100000,30000 +012-4,481,110,9,12 monster Red Rose 1062,3,100000,30000 +012-4,435,114,12,8 monster Scorpion 1043,3,100000,30000 +012-4,477,82,12,8 monster Spider 1044,3,100000,30000 +012-4,354,106,9,23 monster Little Blub 1007,10,100000,30000 +012-4,342,139,8,11 monster Blub 1008,15,100000,30000 +012-4,389,81,16,7 monster Blub 1008,20,100000,30000 +012-4,409,35,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,413,73,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,395,63,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,314,182,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,409,121,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,456,99,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,133,153,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,153,98,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,126,65,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,81,180,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,61,159,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,271,157,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,270,182,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,322,141,8,11 monster Blub 1008,20,100000,30000 +012-4,451,111,3,4 monster Manana Tree 1017,5,100000,30000 +012-4,422,50,5,16 monster Frostiana 1012,10,100000,30000 +012-4,380,40,7,11 monster Frostiana 1012,10,100000,30000 +012-4,124,49,4,12 monster Red Rose 1062,1,100000,30000 +012-4,80,110,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,42,142,10,5 monster Scorpion 1043,3,100000,30000 +012-4,41,159,5,10 monster Frostiana 1012,20,100000,30000 +012-4,95,180,4,2 monster Manana Tree 1017,5,100000,30000 +012-4,91,180,11,5 monster Frostiana 1012,20,100000,30000 diff --git a/npc/012-4/_warps.txt b/npc/012-4/_warps.txt new file mode 100644 index 00000000..c5d2fed3 --- /dev/null +++ b/npc/012-4/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-4: Terranite Cave warps +012-4,193,58,0 warp #012-4_193_58 0,0,012-3,448,62 +012-4,363,26,0 warp #012-4_363_26 0,0,012-4,474,187 +012-4,474,188,0 warp #012-4_474_188 0,0,012-4,363,27 diff --git a/npc/012-4/mapflags.txt b/npc/012-4/mapflags.txt new file mode 100755 index 00000000..d776c7f5 --- /dev/null +++ b/npc/012-4/mapflags.txt @@ -0,0 +1 @@ +//012-4 mapflag resave 012-1,143,70 diff --git a/npc/012-4/pvpflag.txt b/npc/012-4/pvpflag.txt new file mode 100755 index 00000000..254c0d1c --- /dev/null +++ b/npc/012-4/pvpflag.txt @@ -0,0 +1 @@ +012-4 mapflag pvp diff --git a/npc/013-1/_import.txt b/npc/013-1/_import.txt new file mode 100644 index 00000000..9306f811 --- /dev/null +++ b/npc/013-1/_import.txt @@ -0,0 +1,8 @@ +// Map 013-1: Woodland Hills +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/013-1/_mobs.txt", +"npc/013-1/_warps.txt", +"npc/013-1/flowerpentagram.txt", +"npc/013-1/mapflags.txt", +"npc/013-1/sagatha.txt", +"npc/013-1/traveler.txt", diff --git a/npc/013-1/_mobs.txt b/npc/013-1/_mobs.txt new file mode 100644 index 00000000..07b4861e --- /dev/null +++ b/npc/013-1/_mobs.txt @@ -0,0 +1,17 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-1: Woodland Hills mobs +013-1,0,0,0,0 monster CroconutMob 1014,13,0,100 +013-1,0,0,0,0 monster PumpkinMob 1019,12,0,100 +013-1,0,0,0,0 monster Forest Maggot 1028,5,0,100 +013-1,0,0,0,0 monster Bee 1029,1,270,180 +013-1,0,0,0,0 monster Bee 1029,4,2700000,1800000 +013-1,0,0,0,0 monster Pinkie 1030,1,270,180 +013-1,0,0,0,0 monster Pinkie 1030,2,2700000,1800000 +013-1,0,0,0,0 monster Log Head 1031,1,270,180 +013-1,0,0,0,0 monster Log Head 1031,2,2700000,1800000 +013-1,0,0,0,0 monster Butterfly 1032,1,270,180 +013-1,0,0,0,0 monster Butterfly 1032,2,2700000,1800000 +013-1,0,0,0,0 monster Mana Bug 1035,4,60000,30000 +013-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +013-1,0,0,0,0 monster Gamboge Plant 1038,25,30,20 +013-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 diff --git a/npc/013-1/_warps.txt b/npc/013-1/_warps.txt new file mode 100644 index 00000000..a112a79f --- /dev/null +++ b/npc/013-1/_warps.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-1: Woodland Hills warps +013-1,125,104,0 warp #013-1_125_104 0,0,013-3,34,64 +013-1,20,76,0 warp #013-1_20_76 0,3,012-1,149,60 +013-1,46,20,0 warp #013-1_46_20 3,0,017-1,46,104 +013-1,42,90,0 warp #013-1_42_90 0,0,013-2,63,41 +013-1,136,52,0 warp #013-1_136_52 0,3,055-1,25,52 diff --git a/npc/013-1/flowerpentagram.txt b/npc/013-1/flowerpentagram.txt new file mode 100755 index 00000000..195ada0f --- /dev/null +++ b/npc/013-1/flowerpentagram.txt @@ -0,0 +1,102 @@ +013-1,1,1,0 script #FlowerPentagram NPC32767,{ +end; + +OnSummon: + // This is just annoying + //announce "Sagatha:* What kind of a foolish trick is this? Who dares to create such calamity in my forest?", 0; + + callsub S_CleanUp; + // area closely to sagatha + areamonster "013-1", 119, 21, 134, 36, "", 1105, 3, "#FlowerPentagram::OnSquirrelDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1106, 2, "#FlowerPentagram::OnMushroomDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1107, 3, "#FlowerPentagram::OnBlueparDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1104, 2, "#FlowerPentagram::OnMoubooDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1003, 10, "#FlowerPentagram::OnScorpionDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1004, 7, "#FlowerPentagram::OnRScorpionDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1057, 5, "#FlowerPentagram::OnAScorpionDeath"; + areamonster "013-1", 119, 21, 134, 36, "", 1009, 3, "#FlowerPentagram::OnBScorpionDeath"; + // wider area around sagatha + areamonster "013-1", 68, 25, 133, 73, "", 1105, 3, "#FlowerPentagram::OnSquirrelDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1106, 3, "#FlowerPentagram::OnMushroomDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1107, 5, "#FlowerPentagram::OnBlueparDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1104, 2, "#FlowerPentagram::OnMoubooDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1003, 6, "#FlowerPentagram::OnScorpionDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1004, 5, "#FlowerPentagram::OnRScorpionDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1057, 4, "#FlowerPentagram::OnAScorpionDeath"; + areamonster "013-1", 68, 25, 133, 73, "", 1009, 2, "#FlowerPentagram::OnBScorpionDeath"; + // almost the entire map + areamonster "013-1", 24, 22, 136, 100, "", 1105, 4, "#FlowerPentagram::OnSquirrelDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1106, 3, "#FlowerPentagram::OnMushroomDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1107, 5, "#FlowerPentagram::OnBlueparDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1104, 3, "#FlowerPentagram::OnMoubooDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1003, 5, "#FlowerPentagram::OnScorpionDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1004, 4, "#FlowerPentagram::OnRScorpionDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1057, 3, "#FlowerPentagram::OnAScorpionDeath"; + areamonster "013-1", 24, 22, 136, 100, "", 1009, 1, "#FlowerPentagram::OnBScorpionDeath"; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + @mobId = 1106; + callfunc "MobPoints"; + end; + +OnBlueparDeath: + @mobId = 1107; + callfunc "MobPoints"; + end; + +OnMoubooDeath: + @mobId = 1104; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + @mobId = 1004; + callfunc "MobPoints"; + end; + +OnAScorpionDeath: + @mobId = 1057; + callfunc "MobPoints"; + end; + +OnBScorpionDeath: + @mobId = 1009; + callfunc "MobPoints"; + end; + +S_CleanUp: + killmonster "013-1", "#FlowerPentagram::OnSquirrelDeath"; + killmonster "013-1", "#FlowerPentagram::OnMushroomDeath"; + killmonster "013-1", "#FlowerPentagram::OnBlueparDeath"; + killmonster "013-1", "#FlowerPentagram::OnMoubooDeath"; + killmonster "013-1", "#FlowerPentagram::OnScorpionDeath"; + killmonster "013-1", "#FlowerPentagram::OnRScorpionDeath"; + killmonster "013-1", "#FlowerPentagram::OnAScorpionDeath"; + killmonster "013-1", "#FlowerPentagram::OnBScorpionDeath"; + return; +} + +function script FlowerPentagramCount { + set $@Flower_Pentagram_Mobcount, + mobcount("013-1", "#FlowerPentagram::OnSquirrelDeath") + + mobcount("013-1", "#FlowerPentagram::OnMushroomDeath") + + mobcount("013-1", "#FlowerPentagram::OnBlueparDeath") + + mobcount("013-1", "#FlowerPentagram::OnMoubooDeath") + + mobcount("013-1", "#FlowerPentagram::OnScorpionDeath") + + mobcount("013-1", "#FlowerPentagram::OnRScorpionDeath") + + mobcount("013-1", "#FlowerPentagram::OnAScorpionDeath") + + mobcount("013-1", "#FlowerPentagram::OnBScorpionDeath") + + 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters + return; +} diff --git a/npc/013-1/mapflags.txt b/npc/013-1/mapflags.txt new file mode 100755 index 00000000..de751e3d --- /dev/null +++ b/npc/013-1/mapflags.txt @@ -0,0 +1 @@ +//013-1 mapflag resave 013-1,126,99 diff --git a/npc/013-1/sagatha.txt b/npc/013-1/sagatha.txt new file mode 100755 index 00000000..909c95b7 --- /dev/null +++ b/npc/013-1/sagatha.txt @@ -0,0 +1,438 @@ + +function script QuestSagathaHappy { + @unhappiness = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if (@unhappiness < @value) + goto L_zero; + + @unhappiness = @unhappiness - @value; + goto L_write; + +L_zero: + @unhappiness = 0; + goto L_write; + +L_write: + QUEST_MAGIC = (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); + return; +} + +function script QuestSagathaAnnoy { + @unhappiness = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if ((@unhappiness + @value) > 15) + goto L_max; + + @unhappiness = @unhappiness + @value; + goto L_write; + +L_max: + @unhappiness = 15; + goto L_write; + +L_write: + QUEST_MAGIC = (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); + return; +} + +function script SagathaStatus { + if (getequipid(equip_head) != 1216 && getequipid(equip_head) != 752) + goto L_Next; + @value = 15; + callfunc "QuestSagathaAnnoy"; + goto L_Next; + +L_Next: + @mexp = MAGIC_EXPERIENCE & 65535; + @has_magic = getskilllv(SKILL_MAGIC); + @evil = 0; + @good = 0; + @unhappy = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + @mouboo = ((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 3; + + if (@mouboo == 3) + @good = @good + 1; + if (@mouboo == 2) + @evil = 1; + if (@mouboo == 1) + @evil = 1; + + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) + @evil = 1; + + @druid = (((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 12) >> 2; + if (@druid == 3) + @good = @good + 1; + return; +} + +013-1,131,24,0 script Sagatha#_M NPC167,{ + callfunc "SagathaStatus"; + + @Q_MASK = NIBBLE_4_MASK | NIBBLE_5_MASK; + @Q_SHIFT = NIBBLE_4_SHIFT; + + @STATUS_INITIAL = 0; + set @STATUS_STUDENT, 1; // N14 + @STATUS_STUDENT_N10 = 2; + @STATUS_STUDENT_A10 = 3; + @STATUS_STUDENT_A11 = 4; + @STATUS_STUDENT_A12 = 5; + @STATUS_STUDENT_N11 = 6; + @STATUS_STUDENT_LEVEL_3 = 7; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) + mes "[Sagatha the Witch]"; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + mes "[Witch]"; + // if fluffyhat + if (getequipid(equip_head) == 752) + goto L_hat_attack; + if (@evil) + goto L_evil; + if (@unhappy > 10) + goto L_unhappy; + if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) + goto L_wb; + + mes "Before you stands a beautiful woman, dressed in dark purple robes and wearing a witch's hat."; + + mes "She looks at you suspiciously."; + next; + menu + "Who are you?", L_Next, + "What's your name?", L_Intro_name, + "Hello! My name is " + strcharinfo(0) + ".", L_Intro_givename, + "Goodbye.", L_close; + +L_Next: + mes "[Witch]"; + mes "\"I am what you humans call a witch. I am a human who has chosen all living creatures as what you call family.\""; + next; + menu + "No, I mean... what's your name?", L_Intro_name, + "Hello! My name is " + strcharinfo(0) + ".", L_Intro_givename, + "Uh.... goodbye.", L_close; + +L_hat_attack: + mes "The witch seems to be trembling with disgust as she stares at your headgear."; + mes "\"Do you think that is funny?\" she snarls."; + next; + if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) + mes "[Sagatha the Witch]"; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + mes "[Witch]"; + mes "\"You have no idea what that poor creature felt!\""; + mes "She snaps her fingers."; + mes "\"Let me show you...\""; + misceffect sfx_magic_war, strcharinfo(0); + misceffect sfx_magic_war; + heal -300, 0; + close; + +L_Intro_name: + mes "[Sagatha the Witch]"; + mes "\"They call me Sagatha.\""; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_SAGATHA; + next; + goto L_Main; + +L_Intro_givename: + mes "[Witch]"; + mes "\"Ah.\""; + next; + menu + "What's yours?", L_Intro_name, + "Uhm... bye.", L_close; + +L_evil: + mes "The witch's eyes flare up in anger as she notices you, and she turns away from you."; + mes "Whatever the reason, she doesn't seem to like you."; + close; + +L_unhappy: + mes "The witch glares at you in anger."; + mes "\"I wonder if you can still sleep after killing those innocent forest creatures!"; + mes "I am sure that they will come back to haunt you in your dreams!\""; + close; + +L_wb: + if (@good > 1) + mes "Sagatha nods as she notices you."; + if (@good == 1) + mes "Sagatha raises an eyebrow as you address her."; + if (@good == 0) + mes "Sagatha glances at you, suspicion evident in her eyes."; + next; + goto L_Main; + +L_Main: + if (@Q_status) + menu + "Can you explain magic to me?", L_explain_magic, + "Can you teach me more magic?", L_Teach, + "What do you know about...", L_Question, + "Goodbye.", L_close; + menu + "Can you explain magic to me?", L_explain_magic, + "Can you teach me magic?", L_Teach_Initial, + "What do you know about...", L_Question, + "Goodbye.", L_close; + +L_Teach_Initial: + if (@good < 2) + goto L_initial_nogood; + if (getskilllv(SKILL_MAGIC_NATURE) < 2) + goto L_initial_nonature; + mes "[Sagatha the Witch]"; + mes "She nods."; + mes "\"For now, yes. But you will have to prove that you really care about more than yourself.\""; + next; + mes "[Sagatha the Witch]"; + mes "She snaps her fingers, and without warning you begin to acutely sense the magical energies around you, for a brief instant!"; + @Q_status = @STATUS_STUDENT; + callsub S_Update_Var; + @SUP_xp = 5000; + @SUP_lvl = 2; + callsub S_up_astral; + next; + mes "[Sagatha the Witch]"; + mes "\"In the future, I will teach you nature and astral magic. For the other schools there are better teachers around.\""; + if (getskilllv(SKILL_MAGIC) < 2) + mes "\"Your skill in magic won't be great enough to use some of the spells yet, so keep practicing and visiting the mana seed until it is.\""; + next; + goto L_Main; + +L_initial_nogood: + mes "[Sagatha the Witch]"; + mes "\"I don't take strangers as students.\""; + next; + goto L_Main; + +L_initial_nonature: + mes "[Sagatha the Witch]"; + mes "\"I might, but you don't even understand the basics of nature magic.\""; + next; + goto L_Main; + +L_explain_magic: + mes "[Sagatha the Witch]"; + mes "\"No.\""; + next; + goto L_Main; + +L_Teach: + if (@Q_status == @STATUS_STUDENT) + goto L_Teach_N14; + if (@Q_status == @STATUS_STUDENT_N10) + goto L_Teach_N10; + if (@Q_status == @STATUS_STUDENT_A10) + goto L_Teach_A10; + if (@Q_status == @STATUS_STUDENT_A11) + goto L_Teach_A11; + if (@Q_status == @STATUS_STUDENT_A12) + goto L_Teach_A12; + if (@Q_status == @STATUS_STUDENT_N11) + goto L_Teach_N11; + + mes "[Sagatha the Witch]"; + mes "\"Not yet. You have to ask the mana seed to give you more power.\""; + next; + goto L_Main; + +L_practice: + mes "[1000 experience points]"; + @Q_status = @Q_status + 1; + callsub S_Update_Var; + getexp 1000,0; + next; + mes "[Sagatha the Witch]"; + mes "\"Now go and practice.\""; + next; + goto L_Main; + +L_Teach_N14: + if (@mexp < 125) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"Some forest creatures sometimes overgrow their fur or hide. That makes them uncomfortable.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"You can help them with shearing magic. Press your hands together and say '" + get(.invocation$, "shear") + "'. Then touch them with your hands, and brush off any excess.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"The spell is strong, so you only need to do this once. Be careful not to cut them. Some things they shed are useful. Often they will leave them to you as a thank-you.\""; + goto L_practice; + +L_Teach_N10: + if (@mexp < 150) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"Next, a nature spell. Take a cocoon shell. Hold it in your hand. Feel its lightness.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Now whisper '" + get(.invocation$, "flying-backpack") + "', and if your backpack was pressing on you you should no longer feel it now.\""; + goto L_practice; + +L_Teach_A10: + if (@mexp < 180) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"To protect against others' magic, take a small mushroom from a shady place. Mushrooms draw things out of the earth. Rub your mushroom into pieces between your hands.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Then say '" + get(.invocation$, "magic barrier") + "' and let the mushroom's power take over.\""; + goto L_practice; + +L_Teach_A11: + if (@mexp < 200) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"If you must fight, call allies. You can call spiky mushrooms out of the ground with a mushroom spike and a root. Hold up the spike and call out to them: '" + get(.invocation$, "smsmushrooms") + "'. Then press the root to the ground.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Spiky mushrooms often grow too many spikes, so you can shear the spikes off of some.\""; + next; + goto L_practice; + +L_Teach_A12: + if (@mexp < 220) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"You can call fluffies, too. But for them you must call out '" + get(.invocation$, "smfluffies") + "' instead, with white fluffy fur instead of a spike. And don't forget the root.\""; + goto L_practice; + +L_Teach_N11: + if (@mexp < 250) + goto L_Teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"You can harden your skin with a hard spike. Hold it in your hands and speak '" + get(.invocation$, "protect") + "', then draw its hardness into your skin.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Or call it into someone else's skin, by saying that someone's name right after the '" + get(.invocation$, "protect") + "'.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"You can also remove this spell from yourself if you say '" + get(.invocation$, "antiprotect") + "'.\""; + goto L_practice; + +L_Teach_noexp: + mes "[Sagatha the Witch]"; + mes "\"You must practice more first.\""; + next; + goto L_Main; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_SAGATHA; + callfunc "MagicTalkMenu"; + + if (@c == 0) + goto L_Main; + if (@c == @QQ_ELANORE) + goto L_Q_elanore; + if (@c == @QQ_MANASEED) + goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) + goto L_Q_manapotion; + if (@c == @QQ_WYARA) + goto L_Q_wyara; + if (@c == @QQ_AULDSBEL) + goto L_Q_auldsbel; + if (@c == @QQ_IMP) + goto L_Q_imp; + if (@c == @QQ_OLDWIZ) + goto L_Q_old_wizard; + if (@c == @QQ_ASTRALSOUL) + goto L_Q_astralsoul; + + mes "[Sagatha the Witch]"; + mes "\"That doesn't concern you.\""; + next; + goto L_Main; + +L_Q_astralsoul: + mes "[Sagatha the Witch]"; + mes "\"Yes, there is a way to improve your magic.\""; + next; + mes "\"Did you ever hear about focusing?\""; + next; + mes "\"It is a mental ability, which improves you at a certain focused skill.\""; + next; + mes "\"Yes, I am focused on nature magic, but I cannot teach focusing. That is another realm of magic. Just a few people can really focus your brain to a specific art of magic.\""; + next; + mes "\"Maybe you should ask some other people experienced in magic.\""; + next; + goto L_Main; + +L_Q_old_wizard: + mes "[Sagatha the Witch]"; + mes "\"A kind and wise wizard.\""; + next; + goto L_Main; + +L_Q_imp: + mes "[Sagatha the Witch]"; + mes "\"He is an evil and cruel one. He lies and cheats and will try to take advantage of you. Stay away from him.\""; + next; + goto L_Main; + +L_Q_elanore: + mes "[Sagatha the Witch]"; + mes "\"Elanore is the Tulimshar town healer.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[Sagatha the Witch]"; + if (!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED)) + goto L_Q_manaseed_unabsorbed; + if (@has_magic) + goto L_Q_manaseed_m; + mes "\"There is a mana seed around here, but I don't see how this concerns you.\""; + next; + goto L_Main; + +L_Q_manaseed_unabsorbed: + mes "\"If the mana seed didn't pass its magic to you, you clearly aren't attuned to magic.\""; + next; + goto L_Main; + +L_Q_manaseed_m: + mes "\"You were lucky that the mana seed gave you its magic. I hope that you will use this power for something good now.\""; + next; + goto L_Main; + +L_Q_manapotion: + mes "[Sagatha the Witch]"; + mes "\"I won't make one without a cauldron, that would be wasteful. And I'm not going to start carrying a cauldron around.\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[Sagatha the Witch]"; + mes "\"Wyara decided to live with humans, in Hurnscald. She tries to make the world a better place in her own way. Please be kind to her, she is a very good person.\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Sagatha the Witch]"; + mes "She frowns."; + mes "\"He's a transmutation wizard, member of the northern council. Reasonably competent wizard, too.\""; + next; + goto L_Main; + +L_close: + close; + +S_up_astral: + @SUP_id = SKILL_MAGIC_ASTRAL; + @SUP_name$ = "Astral Magic"; + callfunc "SkillUp"; + return; + +S_Update_Var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/013-1/traveler.txt b/npc/013-1/traveler.txt new file mode 100755 index 00000000..565a1063 --- /dev/null +++ b/npc/013-1/traveler.txt @@ -0,0 +1,6 @@ +013-1,120,90,0 script Faris the Traveler NPC103,{ + @npcname$ = "Faris"; + @NpcTravelBit = $@magic_house_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/013-2/_import.txt b/npc/013-2/_import.txt new file mode 100644 index 00000000..63b87c91 --- /dev/null +++ b/npc/013-2/_import.txt @@ -0,0 +1,7 @@ +// Map 013-2: Magic House +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/013-2/_warps.txt", +"npc/013-2/apprentice.txt", +"npc/013-2/mapflags.txt", +"npc/013-2/notes.txt", +"npc/013-2/wizard.txt", diff --git a/npc/013-2/_warps.txt b/npc/013-2/_warps.txt new file mode 100644 index 00000000..c649c3b5 --- /dev/null +++ b/npc/013-2/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-2: Magic House warps +013-2,63,42,0 warp #013-2_63_42 0,0,013-1,42,91 +013-2,67,36,0 warp #013-2_67_36 0,0,013-2,21,40 +013-2,21,41,0 warp #013-2_21_41 0,0,013-2,67,37 diff --git a/npc/013-2/apprentice.txt b/npc/013-2/apprentice.txt new file mode 100755 index 00000000..9c17e99c --- /dev/null +++ b/npc/013-2/apprentice.txt @@ -0,0 +1,98 @@ +013-2,25,37,0 script Fabius NPC115,{ + mes "[Fabius]"; + mes "\"Hey! Wanna have a drink or something? High quality, low cost. A poor fella like me needs a bit of extra cash, ye know.\""; + next; + menu + "Yes please!", L_Yes, + "No thanks.", L_No, + "No way, I thought it was for free!", L_Not_Free; + +L_Yes: + mes "[Fabius]"; + mes "\"So what would ya like, then?\""; + next; + menu + "A beer", L_Beer, + "A milk", L_Milk, + "Nevermind", L_No; + +L_No: + mes "[Fabius]"; + mes "\"Suit yourself.\""; + next; + goto L_Finish; + +L_Not_Free: + mes "[Fabius]"; + mes "\"Oh, you stupid git! ... But hey, let me tell ya something...\""; + next; + mes "[Fabius]"; + mes "\"There's notes flying around in the room up there. Did ya try reading some?\""; + close; + +L_Beer: + mes "[Fabius]"; + mes "\"That'll be 175 GP.\""; + next; + menu + "Here you are", L_Beer_yes, + "No thanks", L_Beer_no; + +L_Beer_yes: + if (Zeny < 175) + goto L_Low_money; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("Beer") == 0) + goto L_TooMany; + getitem "Beer", 1; + Zeny = Zeny - 175; + goto L_Finish; + +L_Beer_no: + mes "[Fabius]"; + mes "\"No beer, no civilization!\""; + next; + goto L_Finish; + +L_Milk: + mes "[Fabius]"; + mes "\"That'll be 300 GP.\""; + next; + menu + "Here you are", L_Milk_yes, + "No thanks", L_Milk_no; + +L_Milk_yes: + if (Zeny < 300) + goto L_Low_money; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("Milk") == 0) + goto L_TooMany; + getitem "Milk", 1; + Zeny = Zeny - 300; + goto L_Finish; + +L_Milk_no: + mes "[Fabius]"; + mes "\"Oh alright. Milk is a deadly poison anyway...\""; + next; + goto L_Finish; + +L_Low_money: + mes "[Fabius]"; + mes "\"Aw, you don't have enough gold on you!\""; + next; + goto L_Finish; + +L_Finish: + mes "[Fabius]"; + mes "\"By the way, have you seen those flying notes and the mirror in the room next door? They're WAY COOL! Try reading some of the notes!\""; + close; + +L_TooMany: + mes "[Fabius]"; + mes "\"You don't have room for it.\""; + close; +} diff --git a/npc/013-2/mapflags.txt b/npc/013-2/mapflags.txt new file mode 100755 index 00000000..42e54a1e --- /dev/null +++ b/npc/013-2/mapflags.txt @@ -0,0 +1 @@ +//013-2 mapflag resave 013-1,126,99 diff --git a/npc/013-2/notes.txt b/npc/013-2/notes.txt new file mode 100755 index 00000000..3a5bb9a6 --- /dev/null +++ b/npc/013-2/notes.txt @@ -0,0 +1,205 @@ + +013-2,23,32,0 script Motto#wiz NPC400,{ + mes "Mid pleasures and palaces though we may roam,"; + mes "Be it ever so humble, there's no place like home."; + close; +} + +013-2,30,32,0 script Note#wiz NPC400,{ + mes "Please do not open."; + close; +} + +013-2,38,20,0 script Saying#wiz NPC400,{ + mes "The early bird catcheth the worm."; + close; +} + +013-2,27,21,0 script Mirror#wiz NPC400,{ + mes "You say: \"Mirror mirror on the wall, who has the nicest haircut of them all?\""; + next; + mes "\"Oh fair adventurer, your hair indeed looks nice. But wouldn't it look much better, after I have rolled my dice?\""; + next; + mes "Your looks suddenly change..."; + next; + @fixedMirror = 1; + callfunc "useMirror"; + close; +} + +013-2,25,23,0 script Spell#wiz1 NPC400,{ + mes "You read: \"I see trees of green, red roses too. I see them bloom for me and you. And I think to myself: \'What a wonderful world\'\""; + next; + mes "You think: \"Huh?\""; + next; + mes "The spell fulfills its inevitable purpose..."; + next; + @dest = rand(BaseLevel); + if (@dest < 10) + goto L_PlaceOne; + if ((@dest >= 10) && (@dest <= 50)) + goto L_PlaceTwo; + goto L_PlaceThree; + +L_PlaceOne: + warp "013-1",128,28; + goto L_close; + +L_PlaceTwo: + warp "016-1",62,89; + goto L_close; + +L_PlaceThree: + warp "014-1",33,35; + goto L_close; + +L_close: + @dest = 0; + close; +} + +013-2,27,24,0 script Spell#wiz2 NPC400,{ + mes "You read: \"You must not fear, for it is the mind-killer. That and sharp pointy things.\""; + next; + mes "You feel the floor disappear below your feet..."; + next; + if (QUEST_MIRIAM_start != 0) + goto L_Cheat; + goto L_Warp; + +L_Cheat: + QUEST_MIRIAM_cheat = 1; + QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start; + QUEST_MIRIAM_start = 0; + message strcharinfo(0), "You were supposed to actually run to this place. You are not sure if this is going to work for Miriam..."; + goto L_Warp; + +L_Warp: + @dest = rand(BaseLevel); + if (@dest < 10) + goto L_PlaceOne; + if ((@dest >= 10) && (@dest <= 50)) + goto L_PlaceTwo; + goto L_PlaceThree; + +L_PlaceOne: + warp "006-1",83,60; + goto L_close; + +L_PlaceTwo: + warp "006-1",77,22; + goto L_close; + +L_PlaceThree: + warp "006-1",33,93; + goto L_close; + +L_close: + @dest = 0; + close; +} + +013-2,25,27,0 script Spell#wiz3 NPC400,{ + mes "You read: \"Snow-white flakes and eminent frost - I'll go there, whatever the cost!\""; + next; + mes "You feel yourself getting lighter..."; + next; + @dest = rand(BaseLevel); + if (@dest < 10) + goto L_FriendlyPlace; + if ((@dest >= 10) && (@dest <= 50)) + goto L_DeepCave; + goto L_Cave; + +L_FriendlyPlace: + warp "019-3",102,77; + goto L_close; + +L_DeepCave: + warp "031-3",135,163; + goto L_close; + +L_Cave: + warp "031-3",37,213; + goto L_close; + +L_close: + @dest = 0; + close; +} + +013-2,27,27,0 script Spell#wiz4 NPC400,{ + mes "You read: \"People and cosiness, lively and fun - that's where I've gone!\""; + next; + mes "The world around you slowly dissolves..."; + next; + @dest = rand(BaseLevel); + if (@dest < 10) + goto L_PlaceOne; + if ((@dest >= 10) && (@dest <= 50)) + goto L_PlaceTwo; + goto L_PlaceThree; + +L_PlaceOne: + warp "030-2",88,24; + goto L_close; + +L_PlaceTwo: + warp "001-2",30,29; + goto L_close; + +L_PlaceThree: + warp "010-2",34,42; + goto L_close; + +L_close: + @dest = 0; + close; +} + +013-2,26,28,0 script Spell#wiz5 NPC400,{ + mes "You read: \"Darkness and legs, eight of them each - I'd rather not go there, but now it's too late...\""; + next; + mes "For a moment everything turns black..."; + next; + @dest = rand(BaseLevel); + if (@dest < 10) + goto L_PlaceOne; + if ((@dest >= 10) && (@dest <= 50)) + goto L_PlaceTwo; + goto L_PlaceThree; + +L_PlaceOne: + warp "012-4",431,36; + goto L_close; + +L_PlaceTwo: + warp "013-3",134,54; + goto L_close; + +L_PlaceThree: + warp "013-3",178,67; + goto L_close; + +L_close: + @dest = 0; + close; +} + +013-2,21,29,0 script Spell#wiz6 NPC400,{ + mes "You read: \"Heart stops pumping, breath begone - life is stopping, death has come!\""; + next; + mes "You're losing control of your body... everything turns black... while slipping to the floor, you hear a faraway scream... suddenly, you see THE LIGHT!"; + next; + heal -Hp, 0; + close; +} + +013-2,28,29,0 script Spell#wiz7 NPC400,{ + mes "You read: \"Cotton, steel, leather and wool - have I ever seen a greater fool?\""; + next; + mes "You suddenly feel naked; you ARE naked!"; + next; + nude; + close; +} diff --git a/npc/013-2/wizard.txt b/npc/013-2/wizard.txt new file mode 100755 index 00000000..45d1c2e8 --- /dev/null +++ b/npc/013-2/wizard.txt @@ -0,0 +1,142 @@ +013-2,66,39,0 script Old Wizard#_W NPC116,{ + @has_magic = getskilllv(SKILL_MAGIC); + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD; + + @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT); + if ((@run == 2) && (QL_KYLIAN == 13)) + goto L_Deliver; + goto L_Start; + +L_Deliver: + menu + "I have a delivery for you", L_Delivery; + +L_Delivery: + mes "[Old Wizard]"; + mes "\"Good now I can get to work on some stronger brew..\""; + QL_KYLIAN = 14; + goto L_close; + +L_Start: + mes "[Old Wizard]"; + mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\""; + next; + menu + "Thanks, that's very kind of you!", L_Thanks, + "Can you teach me magic?", L_TeachRude, + "Oh, shut up!", L_ShutUp; + +L_TeachRude: + mes "[Old Wizard]"; + mes "\"I certainly could, but I already have an apprentice.\""; + goto L_close; + +L_ShutUp: + mes "[Old Wizard]"; + mes "\"That attitude isn't going to get you very far, my dear.\""; + goto L_close; + +L_Thanks: + mes "[Old Wizard]"; + mes "\"Behind this door, my apprentice will serve you.\""; + next; + if (@has_magic) + menu + "Alright.", L_Agree, + "I am studying magic, can you help?", L_NewStudent, + "Your apprentice? ... No thanks.", L_Decline; + menu + "Alright.", L_Agree, + "Your apprentice? ... No thanks.", L_Decline; + +L_Decline: + mes "[Old Wizard]"; + mes "\"Goodbye, then!\""; + goto L_close; + +L_NewStudent: + mes "[Old Wizard]"; + mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\""; + next; + + // check if the player has the knowledge of any skill + if (getskilllv(SKILL_POOL) && (getskilllv(SKILL_MAGIC_ASTRAL) < 1) || (getskilllv(SKILL_ASTRAL_SOUL) == 0)) + menu + "That would be very kind of you!", L_TeachSpell, + "Actually I am looking for someone teaching me some more magic skills.", L_AstralSoul, + "No, but thank you!", L_Decline; + menu + "That would be very kind of you!", L_TeachSpell, + "No, but thank you!", L_Decline; + +L_TeachSpell: + mes "[Old Wizard]"; + mes "\"This one may not seem too powerful, but it can be quite handy; it's the 'hide' spell. It will shield you from some forms of detection magic.\""; + next; + mes "[Old Wizard]"; + mes "\"Put a piece of cotton cloth on your head, and speak out '" + get(.invocation$, "spell-hide") + "', loudly and clearly. The protection lasts quite long, but you may have to renew it on occasion.\""; + next; + mes "[Old Wizard]"; + mes "\"You can also cast it on others, of course. Just speak their name after you pronounce the invocation.\""; + next; + mes "[Old Wizard]"; + mes "\"You may find it useful for getting a little peace and quiet at times, but it can also get in the way of friends trying to find you, so use it with care.\""; + next; + if (getskilllv(SKILL_MAGIC_ASTRAL) >= 2) + goto L_close; + mes "[Old Wizard]"; + mes "\"I'm not sure if you are experienced enough to cast it yet, though. You may need to first learn astral magic.\""; + goto L_close; + +L_AstralSoul: + mes "[Old Wizard]"; + mes "\"Oh yes, there are lots of ways to improve your magic. Skills -some people say mental focus for that- are another way to improve your magic. Of course learning more and more spells is also a need for good mages.\""; + next; + mes "\"I can teach you the ability to focus on magical stuff.\""; + next; + mes "\"To do so, I am in need of a pearl and about 100 acorns.\""; + menu + "Here we go.", L_Next, + "Ok be right back. I'll get them", L_Decline; + +L_Next: + if (countitem("Pearl") < 1 || countitem("Acorn") < 100) goto L_NotEnough; + delitem "Pearl", 1; + delitem "Acorn", 100; + mes "[Old Wizard]"; + mes "\"Okay, listen:\""; + next; + mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\""; + next; + mes "\"To do so, think of a magic spell!\""; + next; + mes "The old wizard mumbles some invocations"; + next; + @SUP_lvl = 1; + @SUP_id = SKILL_ASTRAL_SOUL; + @SUP_name$ = "Astral Soul"; + @SUP_xp = 2500; + callfunc "SkillUp"; + mes "\"Now go and try to find someone who can actually activate that focus.\""; + next; + mes "\"You have the powers to focus on magic, but you need to get magic focused now.\""; + goto L_close; + +L_NotEnough: + mes "[Old Wizard]"; + mes "\"Please learn to count.\""; + next; + mes "\"When you are done with that, come back again.\""; + goto L_close; + +L_Agree: + mes "[Old Wizard]"; + mes "\"Beware the flying notes though, some of them are really dangerous. I haven't been able to persuade them to get back into their book. And avoid the mirror, it's been acting strange lately.\""; + next; + mes "\"Oh, and please don't take my apprentice too seriously. He still has a lot to learn.\""; + goto L_close; + +L_close: + @has_magic = 0; + close; +} diff --git a/npc/013-3/_import.txt b/npc/013-3/_import.txt new file mode 100644 index 00000000..e69de29b diff --git a/npc/013-3/_mobs.txt b/npc/013-3/_mobs.txt new file mode 100644 index 00000000..0ed786f4 --- /dev/null +++ b/npc/013-3/_mobs.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-3: Woodland Hills Cave mobs diff --git a/npc/013-3/_savepoints.txt b/npc/013-3/_savepoints.txt new file mode 100644 index 00000000..4948515a --- /dev/null +++ b/npc/013-3/_savepoints.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-3: Woodland Hills Cave saves diff --git a/npc/013-3/_warps.txt b/npc/013-3/_warps.txt new file mode 100644 index 00000000..8bf23569 --- /dev/null +++ b/npc/013-3/_warps.txt @@ -0,0 +1,2 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 013-3: Woodland Hills Cave warps diff --git a/npc/013-3/barrier.txt b/npc/013-3/barrier.txt new file mode 100755 index 00000000..aa8a1918 --- /dev/null +++ b/npc/013-3/barrier.txt @@ -0,0 +1,27 @@ + +013-3,71,21,0 script #DemonMineBarrier1#_M NPC32767,1,0,{ + @state = ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + + if (@state >= 2) goto L_End; + if (@state == 1 && countitem("Soul") >= 1) goto L_Has_Soul; + + message strcharinfo(0), "Barrier : ##3A barrier around the opening pushes you back as you approach."; + + warp "013-3", 71, 25; + goto L_End; + +L_Has_Soul: + message strcharinfo(0), "Barrier : ##3The barrier around the opening allows you passage."; + @state = 2; + callsub S_Update_Mask; + delitem "Soul", 1; + goto L_End; + +L_End: + @state = 0; + end; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT); + return; +} diff --git a/npc/013-3/mapflags.txt b/npc/013-3/mapflags.txt new file mode 100755 index 00000000..dd1cb4be --- /dev/null +++ b/npc/013-3/mapflags.txt @@ -0,0 +1 @@ +//013-3 mapflag resave 013-1,126,99 diff --git a/npc/013-3/mask_chest.txt b/npc/013-3/mask_chest.txt new file mode 100755 index 00000000..7b1edee2 --- /dev/null +++ b/npc/013-3/mask_chest.txt @@ -0,0 +1,218 @@ + +013-3,28,27,0 script Chest#DemonMask NPC111,{ + @state = ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + + if (@state < 2) goto L_NaoDeviaAcontecer; + if (@state == 3) goto L_Finished; + + if (countitem("MaggotSlime") == 0) + goto L_No_maggot_slime; + if (countitem("SmallMushroom") == 0) + goto L_No_mushroom; + if (countitem("PinkPetal") == 0) + goto L_No_pink_petal; + if (countitem("Pearl") == 0) + goto L_No_pearl; + if (countitem("HardSpike") == 0) + goto L_No_hard_spike; + if (countitem("RawLog") == 0) + goto L_No_raw_log; + if (countitem("PinkAntenna") == 0) + goto L_No_pink_antenna; + if (countitem("SnakeTongue") == 0 + || countitem("MountainSnakeTongue") == 0 + || countitem("GrassSnakeTongue") == 0 + || countitem("CaveSnakeTongue") == 0) + goto L_No_tongues; + if (countitem("TreasureKey") == 0) + goto L_No_treasure_key; + if (countitem("PileOfAsh") == 0) + goto L_No_Ash; + if (countitem("MauveHerb") == 0 + || countitem("CobaltHerb") == 0 + || countitem("GambogeHerb") == 0 + || countitem("AlizarinHerb") == 0) + goto L_No_herbs; + if (countitem("BugLeg") == 0) + goto L_No_bug_leg; + if (countitem("CaveSnakeLamp") == 0) + goto L_No_lamp; + if (countitem("IronOre") == 0) + goto L_No_iron_ore; + if (countitem("ScorpionStinger") == 0 + || countitem("RedScorpionStinger") == 0 + || countitem("BlackScorpionStinger") == 0) + goto L_No_stingers; + if (countitem("SilkCocoon") == 0) + goto L_No_silk; + if (countitem("WhiteFur") == 0) + goto L_No_Fur; + if (countitem("DarkCrystal") == 0) + goto L_No_dark_crystal; + if (countitem("BottleOfWater") == 0) + goto L_No_Water; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("MaggotSlime") > 1 + && countitem("BugLeg") > 1 + && countitem("SilkCocoon") > 1 + && countitem("SmallMushroom") > 1 + && countitem("PinkPetal") > 1 + && countitem("Pearl") > 1 + && countitem("HardSpike") > 1 + && countitem("RawLog") > 1 + && countitem("PinkAntenna") > 1 + && countitem("DarkCrystal") > 1 + && countitem("IronOre") > 1 + && countitem("ScorpionStinger") > 1 + && countitem("RedScorpionStinger") > 1 + && countitem("BlackScorpionStinger") > 1 + && countitem("SnakeTongue") > 1 + && countitem("MountainSnakeTongue") > 1 + && countitem("GrassSnakeTongue") > 1 + && countitem("CaveSnakeTongue") > 1 + && countitem("MauveHerb") > 1 + && countitem("CobaltHerb") > 1 + && countitem("GambogeHerb") > 1 + && countitem("AlizarinHerb") > 1 + && countitem("TreasureKey") > 1 + && countitem("CaveSnakeLamp") > 1 + && countitem("PileOfAsh") > 1 + && countitem("WhiteFur") > 1 + && countitem("BottleOfWater") > 1) + goto L_TooMany; + + delitem "MaggotSlime", 1; + delitem "BugLeg", 1; + delitem "SilkCocoon", 1; + delitem "SmallMushroom", 1; + delitem "PinkPetal", 1; + delitem "Pearl", 1; + delitem "HardSpike", 1; + delitem "RawLog", 1; + delitem "PinkAntenna", 1; + delitem "DarkCrystal", 1; + delitem "IronOre", 1; + delitem "ScorpionStinger", 1; + delitem "RedScorpionStinger", 1; + delitem "BlackScorpionStinger", 1; + delitem "SnakeTongue", 1; + delitem "MountainSnakeTongue", 1; + delitem "GrassSnakeTongue", 1; + delitem "CaveSnakeTongue", 1; + delitem "MauveHerb", 1; + delitem "CobaltHerb", 1; + delitem "GambogeHerb", 1; + delitem "AlizarinHerb", 1; + delitem "TreasureKey", 1; + delitem "CaveSnakeLamp", 1; + delitem "WhiteFur", 1; + delitem "PileOfAsh", 1; + delitem "BottleOfWater", 1; + + mes "You managed to perform the ritual and open the chest."; + getitem "DemonMask", 1; + mes "You found a demon mask inside."; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_No_maggot_slime: + mes "You do not have any maggot slime."; + goto L_close; + +L_No_mushroom: + mes "You do not have a mushroom, neither big, nor small."; + goto L_close; + +L_No_pink_petal: + mes "You can't seem to find that pink petal you had."; + goto L_close; + +L_No_pearl: + mes "You do not have a pearl, let alone one from the sea."; + goto L_close; + +L_No_hard_spike: + mes "You weren't able to find a hard spike in the stuff you brought."; + goto L_close; + +L_No_raw_log: + mes "You don't have any wood."; + goto L_close; + +L_No_pink_antenna: + mes "You aren't carrying any antenna."; + goto L_close; + +L_No_tongues: + mes "You don't have four different snake tongues."; + goto L_close; + +L_No_treasure_key: + mes "No treasure chest key, no opening ritual."; + goto L_close; + +L_No_Ash: + mes "You still need a pile of ash."; + goto L_close; + +L_No_herbs: + mes "Four different herbs are needed to get this thing open."; + goto L_close; + +L_No_bug_leg: + mes "You do not have part of a bug on you. That is rather odd considering what you went through to get here."; + goto L_close; + +L_No_lamp: + mes "You do not have a lamp. Yet, somehow, you were able to get this far into this dark cave."; + goto L_close; + +L_No_iron_ore: + mes "\"Rock and metal, as one.\" You don't seem to have anything that fits the bill."; + goto L_close; + +L_No_stingers: + mes "Three scorpion deaths are still missing."; + goto L_close; + +L_No_silk: + mes "You could not find the womb for a butterfly among your stuff."; + goto L_close; + +L_No_Fur: + mes "You wonder how you can carry the \"gentle caress of a creature without blemish.\" But you need it to get this thing open."; + goto L_close; + +L_No_dark_crystal: + mes "A piece of darkness is missing."; + goto L_close; + +L_No_Water: + mes "Just one bottle of water and you can start the ritual."; + goto L_close; + +L_NaoDeviaAcontecer: + warp "013-3", 71, 25; + // You need to go through the barrier to get to the chest, so this shouldn't happen. So just warp them like the barrier does. + goto L_close; + +L_Finished: + mes "[Chest]"; + mes "You already opened this chest."; + goto L_close; + +L_TooMany: + mes "[Chest]"; + mes "You don't have room for what ever is inside. Maybe you should try again later."; + goto L_close; + +L_close: + @state = 0; + close; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT); + return; +} diff --git a/npc/013-3/misc.txt b/npc/013-3/misc.txt new file mode 100755 index 00000000..a955ff44 --- /dev/null +++ b/npc/013-3/misc.txt @@ -0,0 +1,5 @@ + +013-3,127,68,0 script Chest#boring NPC111,{ + mes "You can't see any way to open this chest."; + close; +} diff --git a/npc/013-3/sword_chest.txt b/npc/013-3/sword_chest.txt new file mode 100755 index 00000000..d3ab3ded --- /dev/null +++ b/npc/013-3/sword_chest.txt @@ -0,0 +1,42 @@ + +013-3,177,22,0 script Chest#sword NPC111,{ + if (FLAGS & FLAG_HURNSMINE_CHEST) goto L_Finished; + + mes "[Chest]"; + mes "Would you try to open it?"; + next; + menu + "Yes.", L_Yes, + "No.", L_close; + +L_Yes: + if(countitem("TreasureKey") < 10) + goto L_Not_Enough; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("TreasureKey") > 10) + goto L_TooMany; + delitem "TreasureKey", 10; + getitem "ShortSword", 1; + mes "[Chest]"; + mes "You opened it and found a short sword!"; + FLAGS = FLAGS | FLAG_HURNSMINE_CHEST; + close; + +L_Not_Enough: + mes "It seems that this is not the right key..."; + close; + +L_Finished: + mes "[Chest]"; + mes "You already opened this chest."; + close; + +L_TooMany: + mes "[Chest]"; + mes "You don't have room for what ever is inside. Maybe you should try again later."; + close; + +L_close: + close; +} diff --git a/npc/014-1/_import.txt b/npc/014-1/_import.txt new file mode 100644 index 00000000..56b06b49 --- /dev/null +++ b/npc/014-1/_import.txt @@ -0,0 +1,6 @@ +// Map 014-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/014-1/_mobs.txt", +"npc/014-1/_warps.txt", +"npc/014-1/mapflags.txt", +"npc/014-1/wedding-officiator.txt", diff --git a/npc/014-1/_mobs.txt b/npc/014-1/_mobs.txt new file mode 100644 index 00000000..305cf395 --- /dev/null +++ b/npc/014-1/_mobs.txt @@ -0,0 +1,18 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 014-1: Woodland mobs +014-1,0,0,0,0 monster Pikpik 1013,20,0,0 +014-1,0,0,0,0 monster CroconutMob 1014,25,0,0 +014-1,0,0,0,0 monster PumpkinMob 1019,15,0,0 +014-1,0,0,0,0 monster Forest Maggot 1028,5,0,10 +014-1,0,0,0,0 monster Bee 1029,1,270,180 +014-1,0,0,0,0 monster Bee 1029,5,2700000,1800000 +014-1,0,0,0,0 monster Pinkie 1030,1,270,180 +014-1,0,0,0,0 monster Pinkie 1030,2,2700000,1800000 +014-1,0,0,0,0 monster Log Head 1031,1,270,180 +014-1,0,0,0,0 monster Log Head 1031,2,2700000,1800000 +014-1,0,0,0,0 monster Butterfly 1032,1,270,180 +014-1,0,0,0,0 monster Butterfly 1032,2,2700000,1800000 +014-1,0,0,0,0 monster Mana Bug 1035,4,6000,3000 +014-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +014-1,0,0,0,0 monster Gamboge Plant 1038,25,30,20 +014-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 diff --git a/npc/014-1/_warps.txt b/npc/014-1/_warps.txt new file mode 100644 index 00000000..1c740ae8 --- /dev/null +++ b/npc/014-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 014-1: Woodland warps +014-1,109,91,0 warp #014-1_109_91 0,2,011-1,31,61 +014-1,93,58,0 warp #014-1_93_58 0,0,014-3,57,172 +014-1,76,38,0 warp #014-1_76_38 0,0,014-3,35,33 diff --git a/npc/014-1/mapflags.txt b/npc/014-1/mapflags.txt new file mode 100755 index 00000000..78fa67f9 --- /dev/null +++ b/npc/014-1/mapflags.txt @@ -0,0 +1 @@ +//014-1 mapflag resave 014-1,89,102 diff --git a/npc/014-1/wedding-officiator.txt b/npc/014-1/wedding-officiator.txt new file mode 100755 index 00000000..17684e94 --- /dev/null +++ b/npc/014-1/wedding-officiator.txt @@ -0,0 +1,244 @@ + +014-1,31,31,0 script Wedding Officiator NPC164,{ + mes "[Wedding Officiator]"; + mes "A young lady in a long, green dress is overseeing the park. As she notices you looking at her, she gives you a broad and happy smile."; + mes "\"Hi there! I'm Wendy, here for all your marriage needs!\""; + next; + goto L_Main; + +L_Main: + if (PARTNER) + goto L_Main_married; + + menu + "What exactly do you do?", L_explain_self, + "How do I get married?", L_explain_marriage, + "I would like to get married.", L_Get_married, + "Goodbye.", L_End; + +L_explain_self: + mes "[Wedding Officiator]"; + mes "\"I'm responsible for marriage and divorce proceedings. Every married couple must be registered, so I keep a looong list of couples and send that to the magistrates every now and then.\""; + next; + mes "[Wedding Officiator]"; + mes "\"So if you have a sweetheart and the two of you are getting along particularly well, and you think that you are ready to make that big final step – well, then come here and talk to me!\""; + next; + goto L_Main; + +L_explain_marriage: + mes "[Wedding Officiator]"; + mes "\"If you are sure that you are ready to get married, then first you come and talk to me here – I need to register you, after all. You will first have to pay me a small fee of " + WEDDING_FEE + " GP.\""; + next; + mes "[Wedding Officiator]"; + mes "\"Both you and your partner must be at least " + WEDDING_MIN_LEVEL + " levels of age, though; the law is very firm on that. But if all of that works out, I will give you two wedding rings for the ceremony.\""; + next; + mes "[Wedding Officiator]"; + mes "\"To complete the marriage, each of you has to put on one of these rings, and you have to stand next to each other in the southern part of this park. Then one of you says `#marry' and then the other person's name.\""; + next; + mes "[Wedding Officiator]"; + mes "\"So if you would want to marry me, for example, you would say `#marry Wendy'. Just like that. Your partner then has to decide whether he or she wants that. And if you both agree, then you're married!\""; + mes "She again smiles that broad smile of hers."; + next; + goto L_Main; + +L_Get_married: + if (Zeny < WEDDING_FEE) + goto L_too_poor; + if (BaseLevel < WEDDING_MIN_LEVEL) + goto L_too_young; + + mes "[Wedding Officiator]"; + mes "Wendy's eyes are sparkling."; + mes "\"Wow. So you and your sweetheart are ready to take the big step, then?\""; + next; + menu + "Yes, we are ready.", L_Next, + "On second thought, perhaps not.", L_End; + +L_Next: + mes "[Wedding Officiator]"; + mes "She bounces."; + mes "\"That's so sweet! You must really love each other, then...?\""; + next; + menu + "We certainly do.", L_Next1, + "Yes, of course.", L_Next1, + "Please get on with it.", L_Next1, + "Hmm. Let me think about this some more.", L_End; + +L_Next1: + mes "[Wedding Officiator]"; + mes "Wendy blushes."; + mes "\"Sorry if I am asking so many questions, but I have to make sure, you see... rules and all. Where were we...\""; + next; + mes "[Wedding Officiator]"; + mes "She composes herself again."; + mes "\"OK. Now, what vows you exchange precisely is your choice. But a marriage is really something that is meant to last. So please take a moment to think.\""; + next; + mes "[Wedding Officiator]"; + mes "\"Is your partner really someone you are serious about, someone you want to be with even when things get nasty, someone whom you will stick your head out for no matter how bad things get?"; + mes "And do both of you feel that you could spend the rest of your time in this mana world together?\""; + next; + menu + "Yes.", L_Next2, + "YES.", L_Next2, + "Absolutely.", L_Next2, + "Yes. We love each other.", L_Next2, + "This is taking too long.", L_End, + "No.", L_End; + +L_Next2: + if (Zeny < WEDDING_FEE) + goto L_too_poor; + if (BaseLevel < WEDDING_MIN_LEVEL) + goto L_too_young; + getinventorylist; + if (@inventorylist_count > 98) + goto L_No_Room_For_Rings; + + Zeny = Zeny - WEDDING_FEE; + getitem "WeddingRing", 1; + getitem "WeddingRing", 1; + + mes "[Wedding Officiator]"; + mes "Wendy collects the fee."; + mes "\"Okay... here are your wedding rings. Each of you has to have one. Put them on, stand next to each other in the southern part of this park and say `marry ...' and the name of your partner."; + mes "So your partner might just say `marry " + strcharinfo(0) + "' to marry you.\""; + next; + mes "[Wedding Officiator]"; + mes "Wendy hesitates, then gives you a quick hug. There are tears are in her eyes."; + mes "\"Sorry, I always get a bit... emotional, I think... but I'm so happy for you!\""; + mes "She smiles and wipes the tears from her eyes."; + next; + mes "[Wedding Officiator]"; + mes "\"So... I wish you the very, very best, a wonderful and happy and successful marriage!\""; + mes "She smiles at you again."; + close; + +L_End: + close; + +L_too_young: + mes "[Wedding Officiator]"; + mes "Wendy looks at her notes, shaking her head; pain is evident in her eyes."; + mes "\"I'm really, really sorry – I wish I could allow that, but you are still too young. You have to be at least " + WEDDING_MIN_LEVEL + " levels of age.\""; + close; + +L_too_poor: + mes "[Wedding Officiator]"; + mes "\"Oh, this is so sad... you want to get married but don't have the money!\""; + mes "Wendy is visibly unhappy."; + mes "\"I wish I could help you, but the rules... you see... Well, I'm afraid that you will just have to come back when you have " + WEDDING_FEE + " GP.\""; + close; + +L_Main_married: + mes "[Wedding Officiator]"; + mes "\"I hope that you and your partner are doing well?\""; + next; + menu + "We are very happy, thanks for asking!", L_Farewell2, + "Actually, things aren't so good...", L_talk_divorce; + +L_Farewell2: + mes "[Wedding Officiator]"; + mes "Wendy is beaming."; + mes "\"That's wonderful! Please do say `hi' to your spouse from me!\""; + close; + +L_talk_divorce: + mes "[Wedding Officiator]"; + mes "\"Oh... I am sorry to hear that. What's the problem, then?\""; + next; + menu + "We don't love each other anymore.", L_Nolove, + "My partner loves someone else.", L_partner_otherlove, + "I think I love someone else.", L_self_otherlove, + "We can't agree on who carries the loot.", L_loot; + +L_Nolove: + mes "[Wedding Officiator]"; + mes "Wendy sighs."; + mes "\"I am really sorry to hear that. Have you tried talking to your partner? Tried some new dungeons? Solved some quests together?\""; + next; + mes "[Wedding Officiator]"; + mes "\"I mean... I am sure that you have many things in common that you are not aware of. If you just do something new, perhaps you will learn something about each other that you will like?\""; + next; + menu + "We tried that, it didn't work.", L_makesure_divorce, + "Perhaps we should give it another try.", L_End; + +L_partner_otherlove: + mes "[Wedding Officiator]"; + mes "Wendy frowns."; + mes "\"Are you really sure? Perhaps that other person is just a friend, or even if it isn't, perhaps it was just a small mistake on your partner's side... nobody is perfect, after all!\""; + next; + menu + "I'm sure. I want a divorce.", L_makesure_divorce, + "Perhaps we should discuss this some more first.", L_End; + +L_self_otherlove: + mes "[Wedding Officiator]"; + mes "Wendy sighs."; + mes "\"Oh dear... well, I suppose that happens. You don't have any children, I think, but still, you made a promise to your partner.\""; + next; + mes "[Wedding Officiator]"; + mes "\"Are you really sure that you love the new person so much that you want to leave your partner? Perhaps it would be good to take some time off first to make sure that you are not making a mistake here.\""; + next; + menu + "I'm sure. I want a divorce.", L_makesure_divorce, + "Let me think about this more.", L_End; + +L_loot: + mes "[Wedding Officiator]"; + mes "Wendy blinks."; + mes "\"Err... have you thought about just splitting it up?\""; + next; + menu + "No way. I want a divorce.", L_makesure_divorce, + "Oh... oh! But of course!", L_End; + +L_makesure_divorce: + @divorce_cost = DIVORCE_FEE_PER_LEVEL * BaseLevel; + + mes "[Wedding Officiator]"; + mes "Resigned, Wendy looks down at her notes."; + mes "\"Okay. I suppose that if you are sure, I will get your divorce underway. But that will cost you " + @divorce_cost + " in administrative fees.\""; + next; + menu + "Let me think about this again.", L_End, + "HOW much? Never mind, then.", L_End, + "That's OK. I want the divorce.", L_do_divorce; + +L_divorce_nomoney: + mes "[Wedding Officiator]"; + mes "\"I am sorry, but you can't seem to afford the " + @divorce_cost + " GP for a divorce at this time. Please come back later.\""; + close; + +L_do_divorce: + if (Zeny < @divorce_cost) + goto L_divorce_nomoney; + set PARTNER, 0, PARTNER; // divorce the partner first, which will also divorce the rid if succesful + if (PARTNER < 1) goto L_DidDivorce; + + mes "[Wedding Officiator]"; + mes "The officiator searches through her records for your partner."; + mes "\"I can't find your partner's record, you'll have to come back later.\""; + next; + mes "[Server]"; + mes "Try again when your partner is online too."; + close; + +L_DidDivorce: + Zeny = Zeny - @divorce_cost; + + mes "[Wedding Officiator]"; + mes "After collecting her fee, Wendy licks her quill and writes down some notes."; + mes "Then she sighs heavily."; + mes "\"You are divorced now. Thank you for your business.\""; + close; + +L_No_Room_For_Rings: + mes "[Wedding Officiator]"; + mes "\"You don't have room to carry the rings.\""; + close; +} diff --git a/npc/014-3/_import.txt b/npc/014-3/_import.txt new file mode 100644 index 00000000..ebdc9a2f --- /dev/null +++ b/npc/014-3/_import.txt @@ -0,0 +1,5 @@ +// Map 014-3: Woodland Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/014-3/_mobs.txt", +"npc/014-3/_warps.txt", +"npc/014-3/mapflags.txt", diff --git a/npc/014-3/_mobs.txt b/npc/014-3/_mobs.txt new file mode 100644 index 00000000..566f0e3c --- /dev/null +++ b/npc/014-3/_mobs.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 014-3: Woodland Cave mobs +014-3,0,0,0,0 monster Manana Tree 1017,50,0,0 diff --git a/npc/014-3/_warps.txt b/npc/014-3/_warps.txt new file mode 100644 index 00000000..ae2b6a5a --- /dev/null +++ b/npc/014-3/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 014-3: Woodland Cave warps +014-3,35,32,0 warp #014-3_35_32 0,0,014-1,76,39 +014-3,57,173,0 warp #014-3_57_173 1,0,014-1,93,59 +014-3,91,108,0 warp #014-3_91_108 0,0,014-3,103,53 +014-3,103,54,0 warp #014-3_103_54 0,0,014-3,91,109 diff --git a/npc/014-3/mapflags.txt b/npc/014-3/mapflags.txt new file mode 100755 index 00000000..8acaa581 --- /dev/null +++ b/npc/014-3/mapflags.txt @@ -0,0 +1 @@ +//014-3 mapflag resave 014-1,89,102 diff --git a/npc/015-1/_import.txt b/npc/015-1/_import.txt new file mode 100644 index 00000000..80ef8601 --- /dev/null +++ b/npc/015-1/_import.txt @@ -0,0 +1,8 @@ +// Map 015-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/015-1/_mobs.txt", +"npc/015-1/_warps.txt", +"npc/015-1/alice.txt", +"npc/015-1/barrier.txt", +"npc/015-1/mapflags.txt", +"npc/015-1/sword.txt", diff --git a/npc/015-1/_mobs.txt b/npc/015-1/_mobs.txt new file mode 100644 index 00000000..56f77bf6 --- /dev/null +++ b/npc/015-1/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 015-1: Woodland mobs +015-1,0,0,0,0 monster Alizarin Plant 1037,2,100000,1000 +015-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 +015-1,0,0,0,0 monster Gamboge Plant 1038,30,20,10 +015-1,0,0,0,0 monster Little Green Slime 1025,40,0,0 +015-1,0,0,0,0 monster PumpkinMob 1019,20,0,0 +015-1,0,0,0,0 monster CroconutMob 1014,20,0,0 +015-1,0,0,0,0 monster Log Head 1031,5,0,0 +015-1,0,0,0,0 monster Butterfly 1032,5,0,0 +015-1,0,0,0,0 monster Mana Bug 1035,7,15000,7000 +015-1,0,0,0,0 monster Bee 1029,4,270000,180000 diff --git a/npc/015-1/_warps.txt b/npc/015-1/_warps.txt new file mode 100644 index 00000000..71cb3c0d --- /dev/null +++ b/npc/015-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 015-1: Woodland warps +015-1,93,55,0 warp #015-1_93_55 0,1,010-1,14,54 +015-1,59,31,0 warp #015-1_59_31 0,0,015-3,31,42 +015-1,59,101,0 warp #015-1_59_101 3,0,025-1,89,20 diff --git a/npc/015-1/alice.txt b/npc/015-1/alice.txt new file mode 100755 index 00000000..bf5c1a92 --- /dev/null +++ b/npc/015-1/alice.txt @@ -0,0 +1,94 @@ + +015-1,52,53,0 script Alice NPC106,{ + @cat = ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + @Hiss = ((Katze & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + + mes "[Alice]"; + mes "\"Greeting, fellow wanderer."; + mes "Are you collecting herbs, too?\""; + next; + if (@Hiss == 2 && @cat < 4) + menu + "Yes, sure.", L_findmany, + "Herbs?", L_herbs, + "Nope, just enjoying the scenery.", L_close, + "I saw the cat, but it doesn't like me.", L_cat; + if (@Hiss == 1) + menu + "Yes, sure.", L_findmany, + "Herbs?", L_herbs, + "Nope, just enjoying the scenery.", L_close, + "There is a monster in that cave!", L_Cave; + menu + "Yes, sure.", L_findmany, + "Herbs?", L_herbs, + "Nope, just enjoying the scenery.", L_close; + +L_findmany: + mes "[Alice]"; + mes "\"And? Did you already find a lot?\""; + next; + menu + "Yes, I already got plenty of them.", L_plenty, + "No, I am out of luck.", L_Next; + +L_Next: + mes "[Alice]"; + mes "\"Oooh, how sad. Let me give you a little tip:"; + mes "Herbs are often growing in places where they can't be spotted that easily. Don't forget to look behind the trees, too.\""; + goto L_close; + +L_plenty: + mes "[Alice]"; + mes "\"That's great."; + mes "When you are not that good at brewing you should consider letting someone else brew them for you."; + mes "Good brewers get much better healing potions from them."; + mes "The most important characteristic of a good brewer is intelligence.\""; + goto L_close; + +L_herbs: + mes "[Alice]"; + mes "\"Yes, some powerful magic herbs started to grow around here and a mile to the southeast."; + mes "Caul in Hurnscald found a way to brew magical healing potions from them, and I have heard a rumor that they may also be good for making colors."; + mes "Now everyone is running around in the woods to harvest the herbs.\""; + goto L_close; + +L_Cave: + mes "[Alice]"; + mes "\"Haha, that is no monster! It's just a sweet little cat.\""; + next; + menu + "But it wanted to kill me!", L_Next1, + "A cat!? I'll go and kill it!", L_Next1; + +L_Next1: + mes "[Alice]"; + mes "\"No no, I'm sure it was only frightened. It gets upset when you've got clothes or weapons on you.\""; + next; + menu + "Ok, let's try it without clothes then", L_Next2, + "What a stupid cat!", L_Next2; + +L_Next2: + mes "[Alice]"; + mes "\"Please don't do her any harm. See you later!\""; + goto L_close; + +L_cat: + mes "[Alice]"; + mes "\"You would have to tame her first. Maybe she's thirsty or hungry. Cats also tend to get bored without something to play with. Good luck!\""; + next; + menu + "Thank you so much!", L_close, + "Are you crazy? Taming a cat?", L_Next3; + +L_Next3: + mes "[Alice]"; + mes "\"Well, it's up to you.\""; + goto L_close; + +L_close: + @cat = 0; + @Hiss = 0; + close; +} diff --git a/npc/015-1/barrier.txt b/npc/015-1/barrier.txt new file mode 100755 index 00000000..4c26ebd2 --- /dev/null +++ b/npc/015-1/barrier.txt @@ -0,0 +1,5 @@ + +015-1,59,32,0 script #CatOutsideBarrier NPC32767,1,1,{ + @catNeedsAlone = 0; + end; +} diff --git a/npc/015-1/mapflags.txt b/npc/015-1/mapflags.txt new file mode 100755 index 00000000..35a0436b --- /dev/null +++ b/npc/015-1/mapflags.txt @@ -0,0 +1,2 @@ +//015-1 mapflag resave 010-1,27,97 +015-1 mapflag outside diff --git a/npc/015-1/sword.txt b/npc/015-1/sword.txt new file mode 100755 index 00000000..4979ca74 --- /dev/null +++ b/npc/015-1/sword.txt @@ -0,0 +1,323 @@ +015-1,97,97,0 script #MagicSword#_M NPC400,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + mes "It appears to be an ordinary sword."; + close; + +L_message: + @Q_MASK = (NIBBLE_6_MASK | NIBBLE_7_MASK); + @Q_SHIFT = NIBBLE_6_SHIFT; + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + // Set up SkillUp function + @SUP_id = SKILL_MAGIC_WAR; + @SUP_name$ = "War Magic"; + + @STATUS_INITIAL = 0; + @STATUS_LEARNED_FLAREDART = 1; + @STATUS_LEARNED_MAGICBLADE = 2; + @STATUS_LEVEL2 = 3; + @STATUS_W11 = 4; + @STATUS_W12 = 5; + @STATUS_W11_12 = 6; + @STATUS_L2_ALLSPELLS = 7; + + if (@Q_status == @STATUS_INITIAL) goto L_Initial; + if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_FlareStage; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_MagicBladeStage; + if (@Q_status == @STATUS_LEVEL2) goto L_L2_W12; + if (@Q_status == @STATUS_W11) goto L_L2_W12; + if (@Q_status == @STATUS_W12) goto L_L2_almost_done; + if (@Q_status == @STATUS_W11_12) goto L_L2_W10; + + mes "[Mystic Sword]"; + mes "\"I have taught thee all I can teach for now.\""; + close; + +L_Initial: + mes "[Mystic Sword]"; + mes "At this point, the river deepens, slowing down to a leisurely pace. In its center you notice an unusual stone, waves breaking around it."; + mes "Sticking out of the rock is a sword hilt."; + next; + mes "[Mystic Sword]"; + mes "Suddenly, you hear a strange, metallic voice in your head, the voice of a woman."; + mes "\"A blissful day to thee, mortal!\""; + next; + mes "[Mystic Sword]"; + mes "\"What is it is that brings thee to this place?\""; + next; + menu + "Who are you?", L_Noq, + "Nothing in particular.", L_Initial_nothing, + "I was just exploring...", L_Initial_nothing, + "I am trying to learn magic!", L_Initial_learn; + +L_Noq: + mes "[Mystic Sword]"; + mes "The voice sounds slightly amused."; + mes "\"How sad to hear how manners have degenerated in recent centuries. Farewell for now, dear mortal.\""; + close; + +L_Initial_nothing: + mes "[Mystic Sword]"; + mes "\"Then I wish thee well in thy travels, wanderer!\""; + close; + +L_Initial_learn: + mes "[Mystic Sword]"; + mes "\"Magic? Unless I am very mistaken thou already possessest some magic. Yet perhaps I can grant thee some slight aid by providing a magical invocation?\""; + next; + mes "[Mystic Sword]"; + mes "\"Alas, my nature is not quite conductive for spells of healing or protection, though I can bestow upon thee the powers for a rather more martial kind of power.\""; + next; + menu + "I am not interested in that.", L_Farewell, + "It might be good for me to learn that.", L_Next, + "I am quite interested.", L_Next; + +L_Next: + mes "[Mystic Sword]"; + mes "\"Why is it that thou seekest this power?\""; + next; + menu + "Never mind.", L_Farewell, + "To become stronger!", L_Initial_selfish, + "To kill!", L_Initial_selfish, + "I don't know yet...", L_Initial_dontknow, + "To protect the ones I love!", L_Initial_protect; + +L_Initial_selfish: + mes "[Mystic Sword]"; + mes "\"Please return when thou art taking thy quest for magic a little more seriously.\""; + close; + +L_Initial_dontknow: + mes "[Mystic Sword]"; + mes "\"A fair and honest thought at so early a point in thine quest.\""; + goto L_Initial_ok; + +L_Initial_protect: + mes "[Mystic Sword]"; + mes "\"Quite a high and laundable goal thou hast chosen for thyself! I do hope that thou canst live up to it.\""; + goto L_Initial_ok; + +L_Initial_ok: + mes "\"Hark, then, mortal! For I shall bestow upon thee the secret of the flare dart spell!\""; + next; + mes "[Mystic Sword]"; + mes "\"Oh, my apologies – that was a little overly dramatic. But I do not get to talk to thy kin anymore all that often.\""; + next; + mes "[Mystic Sword]"; + mes "\"For the flare dart spell throw a handful of sulphur powder up into the air, and say, '" + get(.invocation$, "flare-dart") + "'.\""; + @Q_status = @STATUS_LEARNED_FLAREDART; + callsub S_Update_Var; + next; + mes "[Mystic Sword]"; + mes "\"From then on, thou canst shoot fiery missiles from thy fingers, for a limited time.\""; + next; + mes "[Mystic Sword]"; + mes "\"Use it wisely, mortal!.\""; + next; + goto L_Farewell; + +L_FlareStage: + menu + "Uhm... Hello, Sword?", L_FlareStage_hello, + "Can you teach me more magic?", L_FlareStage_impolite, + "Where can I get sulphur powder?", L_FlareStage_impolite; + +L_FlareStage_impolite: + mes "[Mystic Sword]"; + mes "You hear a metallic chime in your head. After a second, you come to the conclusion that it was probably the sword sighing."; + mes "\"Greetings to thee, too, mortal, and farewell until thou hast learned some proper manners.\""; + close; + +L_FlareStage_hello: + mes "[Mystic Sword]"; + mes "\"Well met once more, mortal! What brings thee here?\""; + next; + menu + "Can you teach me more magic?", L_FlareStage_moremagic, + "Where can I find sulphur powder?", L_FlareStage_sulphur, + "Farewell!", L_Farewell; + +L_FlareStage_moremagic: + mes "[Mystic Sword]"; + mes "\"I can indeed! But first I must see if thou art worthy. Find my brother, and talk to him! If thou canst find him, he shall teach thee another spell.\""; + next; + goto L_Farewell; + +L_FlareStage_sulphur: + mes "[Mystic Sword]"; + mes "\"I do not know, though I suggest to seek out a local alchemist, if there is any.\""; + next; + goto L_Farewell; + +L_MagicBladeStage: + mes "[Mystic Sword]"; + mes "\"Welcome back! Thou hast now learned two basic spells of War magic.\""; + next; + mes "[Mystic Sword]"; + mes "\"Dost thou wish to continue thy pursuits of this school of magic?\""; + next; + menu + "No.", L_Farewell, + "Yes.", L_Levelup2_yes; + +L_Levelup2_yes: + mes "[Mystic Sword]"; + mes "\"Beware of what thou wishest for, mortal...\""; + next; + + if (!MPQUEST) + goto L_Lvl2_must_reg; + if (MPQUEST && (Mobpt < 1000)) + goto L_Lvl2_must_practice; + + mes "[Mystic Sword]"; + mes "\"Thou hast collected " + Mobpt + " Monster Points. For one thousand of them, I shall admit thee to the school of war magic.\""; + next; + menu + "OK!", L_Next1, + "No... never mind.", L_Farewell; + +L_Next1: + Mobpt = Mobpt - 1000; + + mes "[Mystic Sword]"; + mes "The sword begins to chant in your head!"; + mes "\"Lords of Thunder, Fire, Rage!\""; + mes "\"Grant thy powers to this mage,\""; + mes "\"Rising with thy dreadful roar,\""; + mes "\"Answer to their call to War!\""; + next; + mes "[Mystic Sword]"; + mes "Your heart starts pounding, and suddenly you can hear the sound of drums in your head."; + mes "You smell something metallic..."; + next; + mes "[Mystic Sword]"; + mes "The sensation and the noises vanish as quickly as they came."; + + @Q_status = @STATUS_LEVEL2; + callsub S_Update_Var; + + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + next; + + mes "[Mystic Sword]"; + mes "\"Thou hast now taken thy first true step down the path of war magic.\""; + if (getskilllv(SKILL_MAGIC) < 2) + mes "\"When thou returnest, I shall teach thee another spell, but beware: thou must increase thy overall grasp of magic before thou canst wield it!\""; + next; + goto L_Farewell; + +L_Lvl2_must_reg: + mes "[Mystic Sword]"; + mes "\"To learn further magic, thou must advance in the school of war magic. I shall grant thee this advance if thou provest thy worthiness as a warrior.\""; + next; + mes "[Mystic Sword]"; + mes "\"Travel to the city of Tulimshar, and talk to Aidan. Then, collect one thousand Monster Points and return to me.\""; + next; + goto L_Farewell; + +L_Lvl2_must_practice: + mes "[Mystic Sword]"; + mes "\"To advance thy magical powers, I must admit thee to the school of war magic. Prove to me that thou art a worthy warrior by collecting one thousand Monster Points, and return.\""; + next; + goto L_Farewell; + +L_L2_W12: + mes "[Mystic Sword]"; + mes "\"Welcome back, traveler! Hast thou returned to advance in thy quest for magic?\""; + next; + menu + "No.", L_Farewell, + "Yes.", L_Next2; + +L_Next2: + mes "[Mystic Sword]"; + mes "\"Very well. I shall teach thee another spell, if thou provest thy progress by sacrificing another five thousand monster points.\""; + next; + menu + "No, I don't want that.", L_Farewell, + "So be it.", L_Next3; + +L_Next3: + if (Mobpt < 5000) + goto L_lacking_mobpoints; + mes "[Mystic Sword]"; + mes "\"Indeed thou art worthy. The next spell I shall teach thee will enchant thy knuckles to turn them into powerful weapons; the component is a mere beer.\""; + mes "[1000 experience points]"; + Mobpt = Mobpt - 5000; + getexp 1000, 0; + @Q_status = @Q_status + 2; + callsub S_Update_Var; + next; + mes "[Mystic Sword]"; + mes "\"Speak '" + get(.invocation$, "magic-knuckles") + "' and take a glass of beer and drink it, without ever taking it off thy lips. This will harden and enchant thy fists, turning them into powerful weapons.\""; + close; + +L_L2_almost_done: + mes "[Mystic Sword]"; + mes "\"Greetings once more, traveler! I have another spell I wish to teach thee, but first thou must learn my brother's arrow spell.\""; + close; + +L_L2_W10: + mes "[Mystic Sword]"; + mes "\"Welcome back!\""; + next; + mes "[Mystic Sword]"; + mes "\"I shall now teach thee the final spell of this level of war magic. For further spells thou wilt have to increase thy magical powers more.\""; + next; + mes "[Mystic Sword]"; + mes "\"For this spell, I ask that thou bringest a lump of iron ore. Thou must also sacrifice ten thousand monster points.\""; + next; + menu + "OK.", L_Next4, + "No way.", L_Farewell; + +L_Next4: + if (countitem("IronOre") < 1) + goto L_No_ore; + if (MPQUEST && (Mobpt < 10000)) + goto L_lacking_mobpoints; + + mes "[Mystic Sword]"; + mes "\"Raise up the ore, mortal!\""; + mes "As you do so, the ore begins to crumble, leaving only iron powder behind."; + mes "[1000 experience points]"; + Mobpt = Mobpt - 10000; + getexp 1000, 0; + delitem "IronOre", 1; + getitem "IronPowder", 5; + @Q_status = @STATUS_L2_ALLSPELLS; + callsub S_Update_Var; + next; + mes "[Mystic Sword]"; + mes "\"This powder thou shalst need to cast the lightning spell. Throw it up into the air and shout '" + get(.invocation$, "lightning-strike") + "', and smite thine enemies with lightning.\""; + next; + goto L_Farewell; + +L_No_ore: + mes "[Mystic Sword]"; + mes "\"Thou dost appear to lack ore. We cannot continue; please fare well and return swiftly!\""; + close; + +L_Farewell: + mes "[Mystic Sword]"; + mes "\"Then I bid thee farewell for now!\""; + close; + +L_lacking_mobpoints: + mes "[Mystic Sword]"; + mes "\"Thou dost not have enough monster points to prove thy worthiness. Return when thou hast slain more monsters!\""; + close; + +S_Update_Var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/015-3/_import.txt b/npc/015-3/_import.txt new file mode 100644 index 00000000..fedbd433 --- /dev/null +++ b/npc/015-3/_import.txt @@ -0,0 +1,8 @@ +// Map 015-3: Cat's Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/015-3/_mobs.txt", +"npc/015-3/_warps.txt", +"npc/015-3/barrier.txt", +"npc/015-3/katze.txt", +"npc/015-3/mapflags.txt", +"npc/015-3/pot.txt", diff --git a/npc/015-3/_mobs.txt b/npc/015-3/_mobs.txt new file mode 100644 index 00000000..0e700948 --- /dev/null +++ b/npc/015-3/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 015-3: Cat's Cave mobs +015-3,22,25,1,2 monster Manana Tree 1017,2,100000,30000 +015-3,29,31,1,1 monster Piou 1002,2,100000,30000 +015-3,23,19,0,0 monster Piou 1002,1,100000,30000 +015-3,40,19,0,0 monster Frostiana 1012,1,100000,30000 diff --git a/npc/015-3/_warps.txt b/npc/015-3/_warps.txt new file mode 100644 index 00000000..a9ba28a6 --- /dev/null +++ b/npc/015-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 015-3: Cat's Cave warps +015-3,31,43,0 warp #015-3_31_43 0,0,015-1,59,32 diff --git a/npc/015-3/barrier.txt b/npc/015-3/barrier.txt new file mode 100755 index 00000000..320025f6 --- /dev/null +++ b/npc/015-3/barrier.txt @@ -0,0 +1,38 @@ + +015-3,31,42,0 script #CatCaveBarrier NPC45,1,1,{ + @Hiss = ((Katze & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + if (getequipid(equip_head) != 1217 + && (getequipid(equip_head) > 0 + || getequipid(equip_shield) > 0 + || getequipid(equip_hand1) > 0 + || getequipid(equip_hand2) > 0 + || getequipid(equip_gloves) > 0 + || getequipid(equip_shoes) > 0 + || getequipid(equip_misc1) > 0 + || getequipid(equip_misc2) > 0 + || getequipid(equip_torso) > 0 + || getequipid(equip_legs) > 0)) + goto L_Not_Naked; + + if (@Hiss != 2) + mes "\"Hissss...\""; + @Hiss = 2; + callsub S_Update_Hiss; + goto L_close; + +L_Not_Naked: + warp "015-1", 60, 32; + @Hiss = 1; + callsub S_Update_Hiss; + mes "\"GRAAUWL! Hissss...\""; + mes "Scared of what you hear, you flee back outside."; + goto L_close; + +L_close: + @Hiss = 0; + close; + +S_Update_Hiss: + Katze = (Katze & ~(NIBBLE_1_MASK)) | (@Hiss << NIBBLE_1_SHIFT); + return; +} diff --git a/npc/015-3/katze.txt b/npc/015-3/katze.txt new file mode 100755 index 00000000..0647abc6 --- /dev/null +++ b/npc/015-3/katze.txt @@ -0,0 +1,185 @@ + +015-3,32,25,0 script Katze NPC172,{ + @cat = ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@cat == 1 && @catNeedsAlone == 0) goto L_NeedsFood; + if (@cat == 1) goto L_NeedsFood; + if (@cat == 2 && @catNeedsAlone == 0) goto L_NeedsFur; + if (@cat == 2) goto L_NeedsFur; + if (@cat == 3) goto L_NeedsWood; + if (@cat == 4 && @catNeedsAlone == 0) goto L_NeedsStuff; + if (@cat == 4) goto L_PreNeedsStuff; + if (@cat == 5) goto L_NeedsStuff2; + if (@cat == 6 && @catNeedsAlone == 0) goto L_GainEars; + if (@cat == 6) goto L_PreGainEars; + if (@cat == 7) goto L_Finished; + goto L_NeedsMilk; + +L_NeedsMilk: + mes "[Katze]"; + mes "\"Meow.\""; + next; + menu "Throw a stone at the cat.", L_ThrowStone, + "Leave the cat alone.", L_close; + +L_ThrowStone: + @cat = 0; + callsub S_Update_Katze; + heal ((MaxHp/100) * -30), 0; + warp "015-1", 60, 32; + mes "\"GRAAUWL! Hissss...\""; + mes "Yikes, the cat attacked you! Your whole body is scratched. Maybe throwing a stone wasn't such a great idea..."; + goto L_close; + +L_NeedsFood: + mes "[Katze]"; + mes "\"Meow, prrrr...\""; + next; + menu + "Throw a stone at the cat.", L_ThrowStone, + "Leave the cat alone.", L_close; + +L_NeedsFur: + mes "[Katze]"; + mes "\"Prrr. Meow, prrr...\""; + next; + if (countitem("WhiteFur") > 0) + menu + "Make funny movements with the fur near the ground.", L_MoveFur, + "Throw a stone at the cat.", L_ThrowStone, + "Leave the cat alone.", L_close; + if (countitem("WhiteFur") == 0) + menu + "Throw a stone at the cat.", L_ThrowStone, + "Leave the cat alone.", L_close; + goto L_close; + +L_MoveFur: + delitem "WhiteFur", 1; + @cat = 3; + callsub S_Update_Katze; + mes "The cat jumps at the fur! You quickly let go of it. The cat happily returns to its spot, carrying the fur in its mouth."; + next; + mes "The cat drops the fur and looks at you with half opened eyes. Suddenly she starts talking, and says: \"That was very kind of you.\" She seems to be smiling."; + goto L_close; + +L_NeedsWood: + mes "[Katze]"; + mes "\"Prrrr, now I'd like something to sharpen my claws on.\""; + next; + + if (countitem("RawLog") > 0) + menu + "Want this piece of wood?", L_GiveWood, + "Ok, see you later.", L_close; + goto L_close; + +L_GiveWood: + mes "[Katze]"; + mes "\"Sure! Please put it next to the pot.\""; + goto L_close; + +L_PreNeedsStuff: + mes "The cat is still eyeing the piece of wood. She probably needs to be left alone for a bit again."; + goto L_close; + +L_NeedsStuff: + @cat = 5; + callsub S_Update_Katze; + mes "[Katze]"; + mes "\"You've been really kind to me. I can make you something nice, but I will need"; + mes "2 Snake Skins,"; + mes "2 Snake Tongues,"; + mes "2 Maggot Slimes,"; + mes "2 White Furs,"; + mes "2 Hard Spikes and"; + mes "2 Tiny Healing Potions.\""; + goto L_close; + +L_NeedsStuff2: + mes "[Katze]"; + mes "\"Did you bring what I asked you for?\""; + next; + menu + "Look here.", L_CatChecksStuff, + "What do you need again?", L_WhatsNeeded, + "No, I haven't got everything yet.", L_close; + +L_WhatsNeeded: + mes "[Katze]"; + mes "\"Actually, you should have remembered yourself.\""; + next; + menu + "Please tell me.", L_Please, + "Never mind.", L_close; + +L_Please: + mes "[Katze]"; + mes "\"Alright... [the cat glares at you] it was"; + mes "2 Snake Skins,"; + mes "2 Snake Tongues,"; + mes "2 Maggot Slimes,"; + mes "2 White Furs,"; + mes "2 Hard Spikes and"; + mes "2 Tiny Healing Potions.\""; + goto L_close; + +L_CatChecksStuff: + if (countitem("SnakeSkin") > 1 + && countitem("SnakeTongue") > 1 + && countitem("MaggotSlime") > 1 + && countitem("WhiteFur") > 1 + && countitem("HardSpike") > 1 + && countitem("TinyHealingPotion") > 1) + goto L_GiveStuff; + mes "[Katze]"; + mes "\"You don't seem to have everything yet. Come back later when you do.\""; + goto L_close; + +L_GiveStuff: + delitem "SnakeSkin", 2; + delitem "SnakeTongue", 2; + delitem "MaggotSlime", 2; + delitem "WhiteFur", 2; + delitem "HardSpike", 2; + delitem "TinyHealingPotion", 2; + @cat = 6; + callsub S_Update_Katze; + @catNeedsAlone = 1; + mes "[Katze]"; + mes "\"Nicely done! Now leave me alone for a while, I need some time to prepare your present.\""; + goto L_close; + +L_PreGainEars: + mes "[Katze]"; + mes "\"Please leave me alone for a while, so I can prepare your present.\""; + goto L_close; + +L_GainEars: + getitem "CatEars", 1; + @xpval = 5000; + getexp @xpval, 0; + @cat = 7; + callsub S_Update_Katze; + mes "[Katze]"; + mes "\"Look what I made for you! It makes you look a bit like me! Maybe it will give you a feeling of what it is like to be a cat.\""; + mes "The cat winks at you."; + mes "[You gain " + @xpval + " experience points]"; + goto L_close; + +L_Finished: + mes "[Katze]"; + if (getequipid(equip_head) == 1217) // Cat ears + mes "\"Meow, fellow cat.\""; + if (getequipid(equip_head) != 1217) + mes "\"Meow. Lost your ears?\""; + goto L_close; + +L_close: + @cat = 0; + close; + +S_Update_Katze: + Katze = (Katze & ~(NIBBLE_0_MASK)) | (@cat << NIBBLE_0_SHIFT); + return; +} diff --git a/npc/015-3/mapflags.txt b/npc/015-3/mapflags.txt new file mode 100755 index 00000000..049e6274 --- /dev/null +++ b/npc/015-3/mapflags.txt @@ -0,0 +1,2 @@ +015-3 mapflag nosave 015-1,59,32 +//015-3 mapflag resave 010-1,27,97 diff --git a/npc/015-3/pot.txt b/npc/015-3/pot.txt new file mode 100755 index 00000000..4516c13f --- /dev/null +++ b/npc/015-3/pot.txt @@ -0,0 +1,122 @@ + +015-3,37,29,0 script Pot NPC400,{ + @cat = ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + + if (@cat > 0) + mes "It's that old pot again."; + if (@cat == 0) + mes "It's a pot."; + next; + + if (@cat == 1 && @catNeedsAlone == 0) + goto L_NeedsFood; + if (@cat == 1) + goto L_HasMilk; + if (@cat == 2 && @catNeedsAlone == 0) + goto L_NeedsFur; + if (@cat == 2) + goto L_HasFood; + if (@cat == 3) + goto L_NeedsWood; + if (@cat == 4 && @catNeedsAlone == 1) + goto L_HasWood; + if (@cat >= 4) + goto L_close; + goto L_NeedsMilk; + +L_NeedsMilk: + if (countitem("Milk") > 0) + menu + "Pour in some milk.", L_GiveMilk, + "Leave it alone.", L_close; + goto L_close; + +L_GiveMilk: + delitem "Milk", 1; + @cat = 1; + callsub S_Update_Katze; + @catNeedsAlone = 1; + goto L_close; + +L_HasMilk: + mes "There is milk in it."; + goto L_close; + +L_NeedsFood: + mes "The milk is gone!"; + next; + + if (countitem("ChickenLeg") > 0 && countitem("Steak") > 0) + menu + "Put in a chicken leg.", L_GiveChicken, + "Put in a steak.", L_GiveSteak, + "Leave it alone.", L_close; + if (countitem("ChickenLeg") > 0 && countitem("Steak") == 0) + menu + "Put in a chicken leg.", L_GiveChicken, + "Leave it alone.", L_close; + if (countitem("ChickenLeg") == 0 && countitem("Steak") > 0) + menu + "Put in a steak.", L_GiveSteak, + "Leave it alone.", L_close; + goto L_close; + +L_GiveChicken: + delitem "ChickenLeg", 1; + @cat = 2; + callsub S_Update_Katze; + @catNeedsAlone = 1; + goto L_close; + +L_GiveSteak: + delitem "Steak", 1; + @cat = 2; + callsub S_Update_Katze; + @catNeedsAlone = 1; + goto L_close; + +L_HasFood: + mes "There is some food in it."; + goto L_close; + +L_NeedsFur: + mes "And it's empty!"; + next; + + if (countitem("WhiteFur") > 0) + menu + "Put a white fur next to the pot.", L_GiveFur, + "Leave it alone.", L_close; + goto L_close; + +L_GiveFur: + mes "You put down the fur, but the cat doesn't seem to take any notice. Maybe there's something else you could do. You pick the fur up again."; + goto L_close; + +L_NeedsWood: + if (countitem("RawLog") > 0) + menu + "Put a wooden log next to the pot.", L_GiveWood, + "Leave it alone.", L_close; + goto L_close; + +L_GiveWood: + delitem "RawLog", 1; + @cat = 4; + callsub S_Update_Katze; + @catNeedsAlone = 1; + mes "You put the wooden log next to the pot. The cat eyes it suspiciously, but remains on her spot."; + goto L_close; + +L_HasWood: + mes "A wooden log is patiently lying next to it."; + goto L_close; + +L_close: + @cat = 0; + close; + +S_Update_Katze: + Katze = (Katze & ~(NIBBLE_0_MASK)) | (@cat << NIBBLE_0_SHIFT); + return; +} diff --git a/npc/016-1/_import.txt b/npc/016-1/_import.txt new file mode 100644 index 00000000..3e88e048 --- /dev/null +++ b/npc/016-1/_import.txt @@ -0,0 +1,7 @@ +// Map 016-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/016-1/_mobs.txt", +"npc/016-1/_warps.txt", +"npc/016-1/gwendolyn.txt", +"npc/016-1/mapflags.txt", +"npc/016-1/rossy.txt", diff --git a/npc/016-1/_mobs.txt b/npc/016-1/_mobs.txt new file mode 100644 index 00000000..73aad7ee --- /dev/null +++ b/npc/016-1/_mobs.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 016-1: Woodland mobs +016-1,0,0,0,0 monster Alizarin Plant 1037,2,100000,30000 +016-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 +016-1,0,0,0,0 monster Gamboge Plant 1038,30,20,10 +016-1,0,0,0,0 monster Forest Maggot 1028,5,0,0 +016-1,0,0,0,0 monster Bee 1029,3,0,0 +016-1,0,0,0,0 monster Bee 1029,4,270000,180000 +016-1,0,0,0,0 monster Pinkie 1030,3,0,0 +016-1,0,0,0,0 monster Bee 1029,4,270000,180000 +016-1,0,0,0,0 monster Mana Bug 1035,7,150000,7000 diff --git a/npc/016-1/_warps.txt b/npc/016-1/_warps.txt new file mode 100644 index 00000000..7ef2878d --- /dev/null +++ b/npc/016-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 016-1: Woodland warps +016-1,56,18,0 warp #016-1_56_18 2,0,010-1,56,104 +016-1,20,53,0 warp #016-1_20_53 0,2,025-1,129,58 diff --git a/npc/016-1/gwendolyn.txt b/npc/016-1/gwendolyn.txt new file mode 100755 index 00000000..e833219b --- /dev/null +++ b/npc/016-1/gwendolyn.txt @@ -0,0 +1,539 @@ +// TMW2 Script +// Author: +// TMW Org. +// Edited by: +// Jesusalva +// Description: +// Archery Trainer + +016-1,91,54,0 script Gwendolyn NPC182,{ + .@q=getq(); + + .@Q_hawkseye_MASK = NIBBLE_6_MASK; + .@Q_hawkseye_SHIFT = NIBBLE_6_SHIFT; + + .@Q_hawkseye = (QUEST_Forestbow_state & .@Q_hawkseye_MASK) >> .@Q_hawkseye_SHIFT; + + .@Q_Forestbow_MASK = NIBBLE_0_MASK; + .@Q_Forestbow_SHIFT = NIBBLE_0_SHIFT; + + .@FORESTBOW = ((QUEST_Forestbow_state) & .@Q_Forestbow_MASK) >> .@Q_Forestbow_SHIFT; + + if (.@Q_hawkseye == 6) goto L_state6; + if (.@Q_hawkseye == 5) goto L_state5; + if (.@Q_hawkseye == 4) goto L_state4; + if (.@Q_hawkseye == 3) goto L_state3; + if (.@Q_hawkseye == 2) goto L_state2; + if (.@Q_hawkseye == 1) goto L_state1; + + mesn "Gwendolyn Bowmaker"; + mes "\"Hello, and welcome to my reopened School of Archery. My name is Gwendolyn Bowmaker; I'm the granddaughter of the famous Gwendolyn Bowmaker.\""; + next; + mes "\"As you surely know, she was the greatest archer this world had ever seen and opened this School of Archery together with her husband Simon Bowmaker. He was able to make the most well-balanced and the finest bows.\""; + next; + mes "\"I am now back from my training journey and want to continue with my family's tradition, to teach the Way of Archery.\""; + next; + mes "\"Are you interested in becoming a student of Archery?\""; + next; + menu + "I want to become an archer!",L_fee, + "I'm not interested right now.",L_No_student; + +L_fee: + mesn "Gwendolyn Bowmaker"; + mes "\"Wonderful! The school's fee is " + .SCHOOLFEE + ".\""; + next; + menu + "That's a lot, but I think it will be worth it.",L_Next, + "I'm not sure I want to spend that much.",L_No_student; + +L_Next: + if (Zeny < .SCHOOLFEE) + goto L_No_Money; + + Zeny = Zeny - .SCHOOLFEE; + .@Q_hawkseye = 2; + callsub S_Update_Var; + + mesn "Gwendolyn Bowmaker"; + mes "\"The first thing you need is, obviously, a bow. You should not use any you come across, but a high quality one. I think it would be best to go to Alan in Hurnscald. He is my cousin, and knows how to make Forest Bows of exquisite quality. \""; + + if (countitem("ForestBow") < 1) + goto L_Close; + next; + menu + "I already have a Forest Bow.",L_state2; + +L_state2: + mesn "Gwendolyn Bowmaker"; + mes "\"Let me see your bow.\""; + next; + + if (countitem("ForestBow") < 1) + goto L_No_bow; + if (.@FORESTBOW < 5) + goto L_bow_bought; + + .@Q_hawkseye = 3; + callsub S_Update_Var; + mesn "Gwendolyn Bowmaker"; + mes "\"Very well, this looks fine. It is time for your first lesson. \""; + next; + goto L_lesson; + +L_lesson: + mesn "Gwendolyn Bowmaker"; + mes "\"The advantage of fighting with a ranged weapon is that you can stay out of the enemy's range. So there is no need to spend training on your resistibility.\""; + next; + mes "\"But remember: this makes you much more vulnerable, so watch your step and don't stumble into your enemy's attack.\""; + next; + mes "\"Also your strength doesn't matter much. You might be able to shoot a little harder, but not so much as to make it important.\""; + next; + mes "\"The most important thing to improve is your dexterity. When you use a bow, it is your dexterity that determines if you are able to hit your enemy where it hurts most.\""; + next; + mes "\"Also worth mentioning is how to improve your ability to shoot fast. You need to be agile to grab a new arrow from your quiver and aim for the next shot before your enemy has recovered from your last.\""; + next; + goto L_state3; + +L_state3: + mesn "Gwendolyn Bowmaker"; + mes "\"To demonstrate that you understood what I'm trying to teach you, you should go and fight against some snakes. To prove me your results, bring me " + .CAVE_EGGS_AMOUNT + " cave snake eggs, " + .SNAKE_EGGS_AMOUNT + " snake eggs, " + .MOUNTAIN_EGGS_AMOUNT + " mountain snake eggs and " + .GRASS_EGGS_AMOUNT + " grass snake eggs.\""; + next; + menu + "Can you please repeat your lesson?",L_lesson, + "I will go and hunt some snakes.",L_Close, + "I have what you want.",L_Next1; + +L_Next1: + if (countitem("CaveSnakeEgg") < .CAVE_EGGS_AMOUNT + ||countitem("SnakeEgg") < .SNAKE_EGGS_AMOUNT + ||countitem("MountainSnakeEgg") < .MOUNTAIN_EGGS_AMOUNT + ||countitem("GrassSnakeEgg") < .GRASS_EGGS_AMOUNT) + goto L_Not_enough_eggs; + + delitem "CaveSnakeEgg", .CAVE_EGGS_AMOUNT; + delitem "SnakeEgg", .SNAKE_EGGS_AMOUNT; + delitem "MountainSnakeEgg", .MOUNTAIN_EGGS_AMOUNT; + delitem "GrassSnakeEgg", .GRASS_EGGS_AMOUNT; + + getexp .QUEST_EGG_EXP, 0; + + .@Q_hawkseye = 4; + callsub S_Update_Var; + + mesn "Gwendolyn Bowmaker"; + mes "\"Very well. That will make a great meal.\""; + next; + goto L_state4; + +L_state4: + if (BaseLevel < .BASELEVEL_GAME) + goto L_Not_Ready; + if (!(getskilllv(SKILL_POOL))) + goto L_Not_Ready; + mes "Gwendolyn takes an analyzing look at you. Then she nods."; + next; + + .@Q_hawkseye = 5; + callsub S_Update_Var; + mesn "Gwendolyn Bowmaker"; + mes "\"Ok. You have made great progress. I think you are ready for further tasks.\""; + next; + goto L_Game_explain; + +L_Game_explain: + mesn "Gwendolyn Bowmaker"; + mes "\"As you might have noticed, it depends on many circumstances if your arrow finds its target. Your shot may be too powerful or too weak, so the arrow goes far beyond your target or hits the ground before it reaches its destination.\""; + next; + mes "\"The greater the distance to your target is, the more important is the strength and direction of the wind. Even if you are exploring a cave, there might be air flow caused by the corners in the cave.\""; + next; + mes "\"Ok, you can see that target over there? I will tell you how strong the wind blows and from which direction. Then you will try to hit the target by moving right or left and decide how powerful you want to shoot.\""; + next; + goto L_state5; + +L_state5: + // needed for the minigame: + set .@wdX, 0; // wind direction x-coordinate, rand + set .@wdY, 0; // wind direction y-coordinate, rand + // set .@wp, 0; // windpower + set .@spX, 0; // start position x-coordinate, player decision + // set .@spY, 0; // start position y-coordinate, const + set .@sp, 0; // shotpower, player decision + //set .@targetX, 0; // target position, const + //set .@targetY, 20; // target position, const + set .@pointX, 0; // point the player hits, x-coordinate + set .@pointY, 0; // point the player hits, y-coordinate + .@wdIndex = 0; + // + mesn "Gwendolyn Bowmaker"; + mes "\"Show me what you can!\""; + next; + menu + "Can you please explain the task again?",L_Game_explain, + "I'm ready, let's start!",L_Game, + "I'm sorry, I will come back later.",L_Close; + +L_Game: + if (countitem("ForestBow") < 1) + goto L_No_bow; + if (countitem("Arrow") < 1) + goto L_No_arrows; + delitem "Arrow", 1; + mes "You go to the training field and stand exactly on the same level with the target. The target is located about 43 feet north of you.You take one arrow and look at Gwendolyn."; + next; + + // possibility for wdX and wdY to become zero is reduced, so windless status is less often + .@wdX = rand(9) - 4; + if (.@wdX != 2 && .@wdX !=-2) set .@wdX, rand(9) - 4; + if (.@wdX == 0) set .@wdX, rand(9) - 4; + + .@wdY = rand(9) - 4; + if (.@wdY != 2 && .@wdY !=-2) set .@wdY, rand(9) - 4; + if (.@wdY == 0) set .@wdY, rand(9) - 4; + + // wind direction array, where the wind blows to: + // 123 + // 456 + // 789 + //here is where the wind comes from, that's why it is the opposite. + setarray .@wd$,"error1, please report", "southeast", "south", "southwest", "east", "error2, please report", "west", "northeast", "north", "northwest" ; + .@paramX = .@wdX; + .@paramY = .@wdY; + callsub S_getDirection; + .@wdIndex = .@returnIndex; + + .@wp_sq = (.@wdX * .@wdX) + (.@wdY * .@wdY); + + if (.@wp_sq == 0) + goto L_wp0; + if (.@wp_sq < 3) + goto L_wp1; + if (.@wp_sq < 9) + goto L_wp2; + if (.@wp_sq < 19) + goto L_wp3; + goto L_wp4; + + +L_wp0: + mesn "Gwendolyn Bowmaker"; + mes "\"You're lucky. It is windless now.\""; + next; + goto L_choose_start_pos; + +L_wp1: + mesn "Gwendolyn Bowmaker"; + mes "\"There is a slight breeze coming from "+ .@wd$[.@wdIndex] + ".\""; + next; + goto L_choose_start_pos; + +L_wp2: + mesn "Gwendolyn Bowmaker"; + mes "\"The wind is blowing from "+ .@wd$[.@wdIndex] + ".\""; + next; + goto L_choose_start_pos; + +L_wp3: + mesn "Gwendolyn Bowmaker"; + mes "\"Right now, there is a strong wind blowing from " + .@wd$[.@wdIndex] + ".\""; + next; + goto L_choose_start_pos; + +L_wp4: + mesn "Gwendolyn Bowmaker"; + mes "\"Here we have a squall from "+ .@wd$[.@wdIndex] + ".\""; + next; + goto L_choose_start_pos; + +L_choose_start_pos: + mes "Do you want to go to the left, the right or stay where you are?"; + next; + menu + "I want to move left.",L_step_left, + "I go right.",L_step_right, + "I stay.",L_step_no, + "I will try it later.",L_Close; + +L_step_no: + .@spX = 0; + mes "You stay where you are.."; + next; + goto L_choose_shotpower; + +L_step_left: + mes "How many steps?"; + next; + menu + "1",L_step_left1, + "2",L_step_left2, + "3",L_step_left3, + "4",L_step_left4; + +L_step_left1: + .@spX = -1; + mes "You take one step to the left."; + next; + goto L_choose_shotpower; + +L_step_left2: + .@spX = -2; + mes "You take two steps to the left."; + next; + goto L_choose_shotpower; + +L_step_left3: + .@spX = -3; + mes "You take three steps to the left."; + next; + goto L_choose_shotpower; + +L_step_left4: + .@spX = -4; + mes "You take four steps to the left."; + next; + goto L_choose_shotpower; + +L_step_right: + mes "How many steps?"; + next; + menu + "1",L_step_right1, + "2",L_step_right2, + "3",L_step_right3, + "4",L_step_right4; + +L_step_right1: + .@spX = 1; + mes "You take one step to the right."; + next; + goto L_choose_shotpower; + +L_step_right2: + .@spX = 2; + mes "You take two steps to the right."; + next; + goto L_choose_shotpower; + +L_step_right3: + .@spX = 3; + mes "You take three steps to the right."; + next; + goto L_choose_shotpower; + +L_step_right4: + .@spX = 4; + mes "You take four steps to the right."; + next; + goto L_choose_shotpower; + +L_choose_shotpower: + mes "How powerfully do you want to shoot?"; + next; + menu + "very weak shot",L_MenuItems, + "rather weak shot",L_MenuItems, + "weak shot",L_MenuItems, + "somewhat weak shot",L_MenuItems, + "medium shot",L_MenuItems, + "somewhat powerful shot",L_MenuItems, + "powerful shot",L_MenuItems, + "rather powerful shot",L_MenuItems, + "very powerful shot",L_MenuItems; + +L_MenuItems: + // we have 9 menu entries, so scale .@menu, which is in range 1-9, to a scale in -4 to +4 + .@sp = .@menu - 5; + // calculate where you hit. You range is in [-8, 8] in X and Y as well + .@pointX = .@wdX + .@spX; + .@pointY = .@wdY + .@sp; + + if( .@pointX==0 && .@pointY==0 ) + goto L_target_hit; + + //set .@targethit to these numbers: + //1,2,3 for left above, above, right above, + //4,5,6 for left, hit, right + //7,8,9 for lower left, below, lower right; + setarray .@target_direction$, "error3, please report", "left above", "above", "right above","left","error4, please report","right","lower left","below","lower right"; + + .@paramX = .@pointX; + .@paramY = .@pointY; + callsub S_getDirection; + .@targethit = .@returnIndex; + + //now check how close + //get the distance squared: + // so it is in range 0 - 64: + // 0 is hit + // < 5 is very close + // <17 is close + // rest is a quite fucking shot + .@target_dist_sq = (.@pointX * .@pointX) + (.@pointY*.@pointY); + + if (.@target_dist_sq < 5) + goto L_target_veryclose; + if (.@target_dist_sq < 17) + goto L_target_close; + + //here are bad shots: + mesn "Gwendolyn Bowmaker"; + mes "\"D'oh, what a terrible shot!\""; + next; + mes "\"Do you even know what a bow is?\""; + next; + mes "\"That was far "+.@target_direction$[.@targethit]+".\""; + next; + goto L_Game; + +L_target_close: + mesn "Gwendolyn Bowmaker"; + mes "\"That was "+.@target_direction$[.@targethit]+".\""; + next; + mes "\"I suggest some training.\""; + next; + goto L_Game; + +L_target_veryclose: + mesn "Gwendolyn Bowmaker"; + mes "\"That was quite close. Impressive!\""; + next; + mes "\"It was a little "+.@target_direction$[.@targethit]+".\""; + next; + mes "\"But you did not hit... have another try.\""; + next; + //like a coin toss: 2 possibilites, the same chance for both: + //if(0 == rand(2)) goto L_Game; + mes "\"Hurry up, before the wind changes.\""; + next; + goto L_choose_start_pos; +L_target_hit: + mesn "Gwendolyn Bowmaker"; + mes "\"Wonderful! That was great! Directly hit the bull's eye!\""; + next; + mes "\"Seems like you did it!\""; + next; + mes "\"Let me inspect it...\" She walks to the target."; + next; + if( rand(500) > (2*Dex + Agi)) + goto L_target_nohit; + .@Q_hawkseye = 6; + callsub S_Update_Var; + + addtoskill SKILL_MALLARDS_EYE, 1; + getexp .QUEST_HAWK_EXP, 0; + + mes "\"You proved that you are worthy to call yourself a graduate of the School of Archery.\""; + next; + mes "\"But remember, there is always something new to learn. And you should not let your training down in order to keep and improve your abilities.\""; + goto L_Close; + +L_target_nohit: + mes "\"Ohh! Half a fingerbreadth aside.\""; + next; + mes "\"That is quite impressive, but you can perform better with more training.\""; + next; + goto L_Game; + +L_state6: + mesn "Gwendolyn Bowmaker"; + mes "\"You really have a reason to be proud.\""; + goto L_Close; + +L_state1: + mes "[Gwendoly Bowmaker]"; + mes "\"Welcome back. Did you decide to follow the Way of Archery?\""; + next; + menu + "I want to become an archer!",L_fee, + "I am not interested.",L_No_student; + +L_No_student: + mes "\"That's a pity. Well, if you change your mind, come back any time.\""; + .@Q_hawkseye = 1; + callsub S_Update_Var; + goto L_Close; + +L_No_Money: + mes "\"I am sorry, but it seems that you don't have enough money. Come back when you have reorganized your finances.\""; + .@Q_hawkseye = 1; + callsub S_Update_Var; + goto L_Close; + +L_No_bow: + mes "\"As an archer, you should always carry your bow with you. Go and get it.\""; + goto L_Close; + +L_bow_bought: + mes "\"You just bought it? You won't learn anything from that. To understand the nature of this bow, you have to collect the needed material by yourself. Only this way will you get a feeling of what it means to use such a weapon. \""; + next; + mes "\"The best thing would be to let you make the bow by yourself. But I guess, that would go to far. And it would take ages to get a high quality bow.\""; + next; + mes "\"Ok, go to Alan and come back with a bow made out of the logs you collected.\""; + goto L_Close; + +L_Not_enough_eggs: + mes "\"Maybe I should also give you a lesson in how to count? You haven't enough.\""; + goto L_Close; + +L_Not_Ready: + mes "\"I am pleased about your progrees, but you are not ready for the next step yet. Go and do some more training, before you come back. Remember also: It is wise to speak with people you meet on your journey, there is always something new to learn.\""; + goto L_Close; + +L_No_arrows: + mes "Gwendolyn sighs and shake her head."; + next; + mes "\"Another lecture: Take always enough arrows with you. Go and come back when you are equipped adequately.\""; + goto L_Close; + +L_Close: + close; + +S_Update_Var: + QUEST_Forestbow_state = (QUEST_Forestbow_state & ~(.@Q_hawkseye_MASK) | (.@Q_hawkseye << .@Q_hawkseye_SHIFT)); + return; + +S_getDirection: + // get .@paramX .@paramY as parameters + // returns an index where these parameters are in relation to origin + // 123 + // 456 whereas 5 is the origin. (3,6,9 there is paramX>0); (1,2,3 there is paramY>0) + // 789 + //first check the quadrants and after check more precisely + if(.@paramX>0 && .@paramY>0) set .@returnIndex, 3; + if(.@paramX>0 && .@paramY<0) set .@returnIndex, 9; + if(.@paramX<0 && .@paramY>0) set .@returnIndex, 1; + if(.@paramX<0 && .@paramY<0) set .@returnIndex, 7; + + //straight left + if ( (.@paramX < 0) && (.@paramY >= .@paramX/2) && (-.@paramY >= .@paramX/2) ) set .@returnIndex, 4; + + //straight right + if ( (.@paramX > 0) && (.@paramY <= .@paramX/2) && (-.@paramY <= .@paramX/2) ) set .@returnIndex, 6; + + //straight above + if ( (.@paramY > 0) && (.@paramX <= .@paramY/2) && (-.@paramX <= .@paramY/2) ) set .@returnIndex, 2; + + //straight below + if ( (.@paramY < 0) && (.@paramX >= .@paramY/2) && (-.@paramX >= .@paramY/2) ) set .@returnIndex, 8; + + //check the origin, because the origin is found by the "straight" lines as well. (should not, but is.. maybe a bug?) + if( .@paramX==0 && .@paramY==0 ) set .@returnIndex, 5; + return; + +OnInit: + // schoolfee in gp + .SCHOOLFEE = 25000; + // how many eggs do you need of each kind? + .CAVE_EGGS_AMOUNT = 18; + .SNAKE_EGGS_AMOUNT = 15; + .MOUNTAIN_EGGS_AMOUNT = 5; + .GRASS_EGGS_AMOUNT = 2; + // experience for eggs + .QUEST_EGG_EXP = 10000; + // The needed level for the minigame: + .BASELEVEL_GAME = 50; + // experience gained for hitting the bullseye: + .QUEST_HAWK_EXP = 10000; + + end; +} diff --git a/npc/016-1/mapflags.txt b/npc/016-1/mapflags.txt new file mode 100755 index 00000000..0ba40687 --- /dev/null +++ b/npc/016-1/mapflags.txt @@ -0,0 +1,2 @@ +//016-1 mapflag resave 010-1,27,97 +016-1 mapflag outside diff --git a/npc/016-1/rossy.txt b/npc/016-1/rossy.txt new file mode 100755 index 00000000..78b0bacb --- /dev/null +++ b/npc/016-1/rossy.txt @@ -0,0 +1,288 @@ + +016-1,32,44,0 script Rossy NPC114,{ + @child_number = 6; + callfunc "XmasList"; + + @Cherry_Amount = 10; + @Cherry_EXP = 2000; + + @CactusDrink_Amount = 24; + @MaggotSlime_Amount = 32; + @GambodgeHerb_Amount = 50; + @AlizarinHerb_Amount = 43; + @BugLeg_Amount = 30; + @Potion_EXP = 3000; + + @RedRose_Amount = 15; + @RedTulip_Amount = 15; + @Flower_EXP = 2500; + + @Finish_EXP = 5000; + @Finish_Money = 5000; + + if (FLAGS & FLAG_ROSSI_COMPLETED) goto L_FinalEnd; + if (Rossy_Quest == 17 || Rossy_Quest == 18) goto L_End; + + if (Rossy_Quest >= 14 && Rossy_Quest <= 16) goto L_Julia; + if (Rossy_Quest >= 13) goto L_Best; + if (Rossy_Quest >= 11) goto L_Allergic; + if (Rossy_Quest >= 8 && Rossy_Quest < 11) goto L_Donet; + if (Rossy_Quest == 7) goto L_BT; + if (Rossy_Quest == 6) goto L_Check2; + if (Rossy_Quest == 5) goto L_Let; + if (Rossy_Quest == 4 || Rossy_Quest == 5) goto L_Cherry_Done; + if (Rossy_Quest == 3) goto L_Check; + if (Rossy_Quest == 2) goto L_Mother; + + mes "A young girl looks at you in tears."; + if (Rossy_Quest < 1) + close; + next; + menu + "Hey there.... Why are you crying? Are you hurt?", L_Next, + "Sorry kid, I don't have time to play with children.", L_No; + +L_Next: + mes "[Young Girl]"; + mes "\"No. I'm crying because I lost all my fruits. My sister and I were collecting some near Dimond's Cove, but then I stumbled on a giant snail and it attacked us!"; + next; + mes "But we were lucky, because the snail is really slow and we ran away from it. Julia ran to the left and I ran to the right. The snail got pretty confused, because we are identical twins. The problem is that I dropped the basket full of fruits on the ground and that evil snail ate them all! And now I can't find Julia to help me collect more fruits.\""; + next; + menu + "Did you say \"Julia?\" I talked to your mother; she's very worried about you!", L_SheWorried; + +L_SheWorried: + mes "[Rossy]"; + mes "\"Really? But she let us play in the woods. There's no reason to be worried – unless....\""; + next; + mes "Rossy suddenly gets a strange look on her face, mumbling something about Julia."; + next; + mes "[Rossy]"; + mes "\"Could you do me a favor? Please, tell my mother that we're alright. There's ... well ... there's no reason to worry about us.\""; + next; + menu + "Very well, if you say so....", L_SaySo, + "Sorry, but I really don't have time for this.", L_No; + +L_SaySo: + mes "[Rossy]"; + mes "\"Thank you very much!\""; + Rossy_Quest = 2; + close; + +L_No: + close; + +L_Mother: + mes "[Rossy]"; + mes "\"Please, tell my mother we are fine. If you feel like helping, come back after you talk to my mother. Maybe you could help us find some fruits.\""; + close; + +L_Get_Cherry: + mes "[Young Girl]"; + mes "\"No, you don't have " + @Cherry_Amount + " cherries. I know how to count. I hope you get them soon.\""; + close; + +L_Check: + mes "[Rossy]"; + mes "\"Hey, that is nice of you to come back. I was thinking about giving a basket full of cherries to my mother, to make her happy, you know. But we'd need at least " + @Cherry_Amount + " cherries, and it would take ages for me to get so many by myself!\""; + next; + menu + "That is no problem for me. Just wait and I will come back with the cherries.", L_No, + "Hey, I have some cherries in my backpack!", L_HaveSomeCherries, + "You should get them yourself.", L_No; + +L_HaveSomeCherries: + if(countitem("Cherry") < @Cherry_Amount) + goto L_Get_Cherry; + mes "[Rossy]"; + Rossy_Quest = 4; + getexp @Cherry_EXP, 0; + mes "\"I can't believe it! You got all the cherries needed! Please give them to my mother. Tell her that it is a gift from me and Julia and that there's no reason to worry about us.\""; + next; + mes "Rossy mumbles to herself."; + mes "[Rossy]"; + mes "\"I hope....\""; + next; + mes "[Rossy]"; + mes "\"Oh, and after you give the cherries to my mother, please come back here. Err, if you have some free time, of course.\""; + close; + +L_Cherry_Done: + mes "[Rossy]"; + mes "\"Please, try to distract my mother. I don't want her to be worried about us. While you do this, I will try to find Julia.\""; + close; + +L_Let: + mes "[Rossy]"; + mes "\"Hello "+ strcharinfo(0) +", nice to see you again. Hey, what are you hiding behind your back? Is that a ... letter?\""; + next; + menu + "Your mother asked me to hand you this letter. She told me it was from your teacher.", L_Let2, + "Not at all. I need to go now, see you next time.", L_No; + +L_Let2: + mes "The little girl grabs the piece of paper and reads it quickly. Her face turns pale."; + menu + "What does it say?", L_PaperSays; + +L_PaperSays: + mes "[Rossy]"; + mes "\"Oh no, I completely forgot! My magic school exam! I need to make a potion and give it to my teacher today! But I haven't found Julia yet and I don't even have any of the ingredients required. Could you get them for me, please?\""; + next; + Rossy_Quest = 6; + mes "\"I need " + @CactusDrink_Amount + " Cactus Drinks, " + @MaggotSlime_Amount + " Maggot Slimes, " + @GambodgeHerb_Amount + " Gamboge Herbs, " + @AlizarinHerb_Amount + " Alizarin Herbs and " + @BugLeg_Amount + " Bug Legs.\""; + next; + mes "\"Please come back to see me when you have the ingredients. I know the recipe by heart.\""; + close; + +L_NE: + mes "[Rossy]"; + mes "\"Please bring me " + @CactusDrink_Amount + " Cactus Drinks, " + @MaggotSlime_Amount + " Maggot Slimes, " + @GambodgeHerb_Amount + " Gamboge Herbs, " + @AlizarinHerb_Amount + " Alizarin Herbs and " + @BugLeg_Amount + " Bug Legs.\""; + next; + mes "\"Please hurry!\""; + close; + +L_Check2: + if(countitem("CactusDrink") < @CactusDrink_Amount) + goto L_NE; + if(countitem("MaggotSlime") < @MaggotSlime_Amount) + goto L_NE; + if(countitem("GambogeHerb") < @GambodgeHerb_Amount) + goto L_NE; + if(countitem("AlizarinHerb") < @AlizarinHerb_Amount) + goto L_NE; + if(countitem("BugLeg") < @BugLeg_Amount) + goto L_NE; + delitem "CactusDrink", @CactusDrink_Amount; + delitem "MaggotSlime", @MaggotSlime_Amount; + delitem "GambogeHerb", @GambodgeHerb_Amount; + delitem "AlizarinHerb", @AlizarinHerb_Amount; + delitem "BugLeg", @BugLeg_Amount; + mes "Rossy takes all the ingredients and places them on the ground. She starts to mix some herbs with the cactus drinks and appears to cast some spells. She seems to know what she is doing."; + next; + mes "[Rossy]"; + mes "\"Oh, thank you "+ strcharinfo(0) +"! It is done. If you don't mind, please give this potion to my teacher.\""; + Rossy_Quest = 7; + getexp @Potion_EXP, 0; + message strcharinfo(0), "Rossy hands you the potion, holding the bottle very carefully."; + next; + mes "\"My teacher's name is David. He is a very young magician and lives near the magic school in the north of Tulimshar.\""; + next; + mes "\"Please, give it to him as soon as you can!\""; + close; + +L_BT: + mes "[Rossy]"; + mes "\"Great. Now if you could just give it to my teacher. His name is David. He is a very young magician and lives near the magic school in the north of Tulimshar.\""; + next; + mes "\"You should take the ferry, that'll be faster than swimming!\""; + close; + +L_Donet: + if (Rossy_Quest == 10 + && countitem("RedRose") >= @RedRose_Amount) + goto L_RG; + menu + "David took your potion and he tested it in front of me. It worked perfectly!", L_DavidPotion; + +L_DavidPotion: + mes "[Rossy]"; + mes "\"YPhew! That was close: I almost forgot about my exam. Please, tell my mother about my success for me. I'm sure she'll be pleased.\""; + close; + +L_RG: + if (countitem("RedRose") < @RedRose_Amount) + goto L_No; + delitem "RedRose", @RedRose_Amount; + menu + "Your mother was so happy that she asked me to bring you these flowers.", L_MotherFlowers; + +L_MotherFlowers: + mes "[Rossy]"; + mes "\"How nice!\""; + next; + mes "Rossy takes the flowers from your hands and suddenly throws them on the ground. She begins sneezing."; + Rossy_Quest = 11; + menu + "I presume you don't like roses, right?", L_LikeRoses; + +L_LikeRoses: + mes "[Rossy]"; + mes "\"I am allergic to roses, my mother should already know that!\""; + close; + +L_Allergic: + mes "Rossy sneezes a lot."; + if (Rossy_Quest == 12 + && countitem("RedTulip") >= @RedTulip_Amount) + goto L_Sorry; + close; + +L_Sorry: + menu + "Your mother is sorry about the roses. Here are some beautiful red tulips instead.", L_See; + +L_See: + mes "[Rossy]"; + if (countitem("RedTulip") < @RedTulip_Amount) + goto L_No; + delitem "RedTulip", @RedTulip_Amount; + Rossy_Quest = 13; + mes "\"That's better! Go and tell my mother that she is the nicest mother in the world.\""; + next; + mes "\"Now I should really find my sister. Come back later.\""; + getexp @Flower_EXP, 0; + close; + +L_Best: + mes "[Rossy]"; + mes "\"Thank you "+ strcharinfo(0) +", you helped me so much!\""; + next; + menu + "Did you find your sister? I am starting to get worried too.", L_FindMySister; + +L_FindMySister: + mes "\"I think I have an idea where she might be. Come back in a few minutes, I will tell you if she is ok.\""; + Rossy_Quest = 14; + close; + +L_Julia: + mes "[Rossy]"; + mes "\"I saw Julia! She was running away from something and entered a cave not far from here. I heard her scream. Please can you enter the cave and save her? I'm so scared!\""; + close; + +L_End: + mes "[Rossy]"; + mes "\"Oh no! Julia ... why would you go to that scary place? ... Have you seen her yet?\""; + menu + "She'll be back soon, trust me. I saved her.", L_Found, + "I didn't see her yet, sorry.", L_No; + +L_Found: + mes "[Rossy]"; + if (Rossy_Quest == 17) + Rossy_Quest = 18; + if (Rossy_Quest == 18) + Rossy_Quest = 19; + mes "\"Oh, "+ strcharinfo(0) +", thank you very much! Take this, you deserve it!\""; + next; + mes "Rossy hands you a huge bag full of coins."; + getexp @Finish_EXP, 0; + Zeny = Zeny + @Finish_Money; + if (Rossy_Quest == 19) + goto L_Clear; + close; + +L_Clear: + Rossy_Quest = 0; + cavefights = 0; + FLAGS = FLAGS | FLAG_ROSSI_COMPLETED; + close; + +L_FinalEnd: + mes "[Rossy]"; + mes "\"Julia and I are playing hide and seek right now. It is fun in the forest!\""; + mes "The young girl laughs quietly."; + close; +} diff --git a/npc/016-2/_import.txt b/npc/016-2/_import.txt new file mode 100644 index 00000000..3f51b8b6 --- /dev/null +++ b/npc/016-2/_import.txt @@ -0,0 +1,3 @@ +// Map 016-2: Gwendolyn's +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/016-2/_warps.txt", diff --git a/npc/016-2/_warps.txt b/npc/016-2/_warps.txt new file mode 100644 index 00000000..5a9243ae --- /dev/null +++ b/npc/016-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 016-2: Gwendolyn's warps +016-2,28,32,0 warp #016-2_28_32 0,0,016-1,84,54 +016-2,26,22,0 warp #016-2_26_22 0,0,016-1,84,49 diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt new file mode 100644 index 00000000..6cf3b9c6 --- /dev/null +++ b/npc/017-1/_import.txt @@ -0,0 +1,7 @@ +// Map 017-1: Woodland Hills +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/017-1/_mobs.txt", +"npc/017-1/_warps.txt", +"npc/017-1/flowerpentagram1.txt", +"npc/017-1/flowerpentagram5.txt", +"npc/017-1/mapflags.txt", diff --git a/npc/017-1/_mobs.txt b/npc/017-1/_mobs.txt new file mode 100644 index 00000000..435da977 --- /dev/null +++ b/npc/017-1/_mobs.txt @@ -0,0 +1,20 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-1: Woodland Hills mobs +017-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +017-1,99,30,1,0 monster Alizarin Plant 1037,1,150000,50000 +017-1,29,29,9,6 monster Log Head 1031,1,0,25000 +017-1,91,25,38,4 monster Little Green Slime 1025,3,5000,60000 +017-1,31,48,9,6 monster Little Green Slime 1025,3,5000,60000 +017-1,0,0,0,0 monster Amethyst Vein 1055,10,30,20 +017-1,0,0,0,0 monster Manana Tree 1017,5,0,0 +017-1,0,0,0,0 monster Plushroom Field 1011,5,0,0 +017-1,0,0,0,0 monster Forest Maggot 1028,5,0,0 +017-1,0,0,0,0 monster CroconutMob 1014,5,0,0 +017-1,0,0,0,0 monster PumpkinMob 1019,5,0,0 +017-1,0,0,0,0 monster Pikpik 1013,10,0,0 +017-1,0,0,0,0 monster Butterfly 1032,3,0,0 +017-1,0,0,0,0 monster Log Head 1031,3,0,0 +017-1,0,0,0,0 monster Pinkie 1030,3,0,0 +017-1,0,0,0,0 monster Bee 1029,5,0,0 +017-1,0,0,0,0 monster Mana Bug 1035,10,0,0 +017-1,0,0,0,0 monster Gamboge Plant 1038,30,20,10 diff --git a/npc/017-1/_warps.txt b/npc/017-1/_warps.txt new file mode 100644 index 00000000..8353e0ee --- /dev/null +++ b/npc/017-1/_warps.txt @@ -0,0 +1,10 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-1: Woodland Hills warps +017-1,46,105,0 warp #017-1_46_105 3,0,013-1,45,21 +017-1,43,32,0 warp #017-1_43_32 0,0,017-2,26,30 +017-1,76,31,0 warp #017-1_76_31 0,0,017-3,69,68 +017-1,98,20,0 warp #017-1_98_20 0,0,017-3,83,52 +017-1,97,31,0 warp #017-1_97_31 0,0,017-3,76,65 +017-1,168,90,0 warp #017-1_168_90 0,0,056-2,34,30 +017-1,188,104,0 warp #017-1_188_104 0,0,055-1,74,21 +017-1,182,16,0 warp #017-1_182_16 2,0,045-1,25,178 diff --git a/npc/017-1/flowerpentagram1.txt b/npc/017-1/flowerpentagram1.txt new file mode 100755 index 00000000..a1e60856 --- /dev/null +++ b/npc/017-1/flowerpentagram1.txt @@ -0,0 +1,80 @@ + +017-1,95,42,0 script #FlowerPentagram1 NPC400,{ + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest > 17) goto L_PlacedFirstFlower; + if (OrumQuest == 17) goto L_FirstFlower; + + message strcharinfo(0), "Something is odd about this place."; + end; + +L_FirstFlower: + mes "This looks like the place Orum described."; + menu + "Place the flower.", L_Next, + "Leave.", L_close; + +L_Next: + if (isin("017-1", 94, 41, 96, 43)) + goto L_Place; + + mes "You're too far away."; + goto L_close; + +L_Place: + set @localMonsterCount, + mobcount("017-1", "#FlowerPentagram1::OnSquirrelDeath") + + mobcount("017-1", "#FlowerPentagram1::OnScorpionDeath") + + 2; // the mobcount function has an offset of -1, so we add 2 to have the actual amount of monsters + if (@localMonsterCount > 2) + goto L_MonstersAlive; + + if (countitem("OrangeSummonFlower") < 1) + goto L_NoFlower; + delitem "OrangeSummonFlower", 1; + mes "You carefully place the magic flower on the marked spot. You feel some tension in the air around you."; + OrumQuest = 18; + close2; + areamonster "017-1", 91, 37, 101, 46, "", 1105, 2, "#FlowerPentagram1::OnSquirrelDeath"; + areamonster "017-1", 91, 37, 101, 46, "", 1003, 3, "#FlowerPentagram1::OnScorpionDeath"; + @value = 15; + callfunc "QuestSagathaAnnoy"; + @value = 0; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "This place has recently been used to summon something! And the beings are still nearby!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_close; + +L_NoFlower: + mes "You don't have the flower with you. Where did you put it?"; + mes "If you can't find it, you should talk to Orum again."; + goto L_close; + +L_PlacedFirstFlower: + mes "You placed the first of Orum's magical flowers on this spot."; + mes "You can still feel the magical power shimmering around this place, waiting to be unleashed."; + goto L_close; + +L_PlacedFifthFlower: + mes "This is where you placed the first of Orum's magical flowers."; + mes "However, now that the summoning spell has been cast, everything is back to normal here."; + goto L_close; + +L_close: + @localMonsterCount = 0; + close; +} diff --git a/npc/017-1/flowerpentagram5.txt b/npc/017-1/flowerpentagram5.txt new file mode 100755 index 00000000..d13805f9 --- /dev/null +++ b/npc/017-1/flowerpentagram5.txt @@ -0,0 +1,137 @@ + +017-1,176,59,0 script #FlowerPentagram5 NPC400,{ + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest == 30) goto L_FifthFlower; + + message strcharinfo(0), "Something is odd about this place."; + end; + +L_FifthFlower: + mes "This has to be the spot for the last magical flower. When you place it, the pentagram will be completed."; + menu + "Place the flower.", L_PlaceTheFlower, + "Leave.", L_close; + +L_PlaceTheFlower: + if (isin("017-1", 175, 58, 177, 60)) + goto L_Place; + + mes "This isn't working, you're too far away."; + goto L_close; + +L_Place: + set @localMonsterCount, + mobcount("013-1", "#FlowerPentagram5::OnSquirrelDeath") + + mobcount("013-1", "#FlowerPentagram5::OnMushroomDeath") + + mobcount("013-1", "#FlowerPentagram5::OnBlueparDeath") + + mobcount("013-1", "#FlowerPentagram5::OnMoubooDeath") + + mobcount("013-1", "#FlowerPentagram5::OnScorpionDeath") + + mobcount("013-1", "#FlowerPentagram5::OnRScorpionDeath") + + mobcount("013-1", "#FlowerPentagram5::OnAScorpionDeath") + + mobcount("013-1", "#FlowerPentagram5::OnBScorpionDeath") + + 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters + if (@localMonsterCount > 4) + goto L_MonstersAlive; + + mes "Nervous about what's going to happen, you take the last of the flowers and put it into its place."; + next; + mes "Tension builds up around you, much stronger than before. You can feel it compressing your head, and a liquid warmth spreads under your nose, leaving a metallic taste on your lips."; + heal -5, 0; + next; + callfunc "FlowerPentagramCount"; + if (($@Flower_Pentagram_Time > gettimetick(2) - 3600) && ($@Flower_Pentagram_Mobcount > 15)) + goto L_TooEarly; + $@Flower_Pentagram_Time = gettimetick(2); + if (countitem("RedSummonFlower") < 1) + goto L_NoFlower; + delitem "RedSummonFlower", 1; + + mes "The pressure builds to the point where you don't think you can endure it any longer; the fabric that binds your consciousness together seemingly unravels."; + OrumQuest = 31; + close2; + areamonster "017-1", 170, 55, 190, 75, "", 1105, 3, "#FlowerPentagram5::OnSquirrelDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1106, 2, "#FlowerPentagram5::OnMushroomDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1107, 3, "#FlowerPentagram5::OnBlueparDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1104, 2, "#FlowerPentagram5::OnMoubooDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1003, 3, "#FlowerPentagram5::OnScorpionDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1004, 2, "#FlowerPentagram5::OnRScorpionDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1057, 2, "#FlowerPentagram5::OnAScorpionDeath"; + areamonster "017-1", 170, 55, 190, 75, "", 1009, 2, "#FlowerPentagram5::OnBScorpionDeath"; + @value = 15; + callfunc "QuestSagathaAnnoy"; + @value = 0; + donpcevent "#FlowerPentagram::OnSummon"; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + @mobId = 1106; + callfunc "MobPoints"; + end; + +OnBlueparDeath: + @mobId = 1107; + callfunc "MobPoints"; + end; + +OnMoubooDeath: + @mobId = 1104; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + @mobId = 1004; + callfunc "MobPoints"; + end; + +OnAScorpionDeath: + @mobId = 1057; + callfunc "MobPoints"; + end; + +OnBScorpionDeath: + @mobId = 1009; + callfunc "MobPoints"; + end; + +L_TooEarly: + mes "Suddenly, everything calms down again and the tension vanishes. You find yourself confused about what's going on."; + next; + mes "You pick up the flower again."; + next; + mes "Looking at the place more closely, it seems another summoning has happened just before, leaving the pathway between this world and the astral plane drained and exhausted."; + next; + mes "You should wait a while until it recharges, or go and search for the creatures that were summoned."; + goto L_close; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "This place has recently been used to summon something! And the beings are still nearby!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_close; + +L_NoFlower: + mes "You reach into your pocket, but you can't find the flower! You're so close to completing your task."; + mes "How could you lose the last flower? If you can't get it back, you have to tell Orum."; + goto L_close; + +L_PlacedFifthFlower: + mes "This is where you placed the last of Orum's magical flowers."; + mes "However, now that the summoning spell has been cast, everything is back to normal here."; + goto L_close; + +L_close: + @localMonsterCount = 0; + close; +} diff --git a/npc/017-1/mapflags.txt b/npc/017-1/mapflags.txt new file mode 100755 index 00000000..d36d3dfe --- /dev/null +++ b/npc/017-1/mapflags.txt @@ -0,0 +1 @@ +//017-1 mapflag resave 017-1,107,70 diff --git a/npc/017-2/_import.txt b/npc/017-2/_import.txt new file mode 100644 index 00000000..e0c4d10e --- /dev/null +++ b/npc/017-2/_import.txt @@ -0,0 +1,4 @@ +// Map 017-2: Theater +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/017-2/_warps.txt", +"npc/017-2/mapflags.txt", diff --git a/npc/017-2/_warps.txt b/npc/017-2/_warps.txt new file mode 100644 index 00000000..bf8d2046 --- /dev/null +++ b/npc/017-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-2: Theater warps +017-2,26,31,0 warp #017-2_26_31 0,0,017-1,43,33 +017-2,26,21,0 warp #017-2_26_21 0,0,017-9,26,27 diff --git a/npc/017-2/mapflags.txt b/npc/017-2/mapflags.txt new file mode 100755 index 00000000..200b35f1 --- /dev/null +++ b/npc/017-2/mapflags.txt @@ -0,0 +1 @@ +//017-2 mapflag resave 017-1,107,70 diff --git a/npc/017-3/_import.txt b/npc/017-3/_import.txt new file mode 100644 index 00000000..4d7f2c9e --- /dev/null +++ b/npc/017-3/_import.txt @@ -0,0 +1,4 @@ +// Map 017-3: Woodland Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/017-3/_warps.txt", +"npc/017-3/mapflags.txt", diff --git a/npc/017-3/_warps.txt b/npc/017-3/_warps.txt new file mode 100644 index 00000000..53eac672 --- /dev/null +++ b/npc/017-3/_warps.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-3: Woodland Cave warps +017-3,69,69,0 warp #017-3_69_69 0,0,017-1,76,32 +017-3,83,53,0 warp #017-3_83_53 0,0,017-1,98,21 +017-3,76,64,0 warp #017-3_76_64 0,0,017-1,98,30 +017-3,63,26,0 warp #017-3_63_26 0,0,017-4,52,24 +017-3,29,48,0 warp #017-3_29_48 0,0,017-4,30,48 +017-3,69,52,0 warp #017-3_69_52 0,0,017-4,91,27 +017-3,58,60,0 warp #017-3_58_60 0,0,017-4,83,40 +017-3,32,70,0 warp #017-3_32_70 1,0,017-4,123,27 +017-3,82,77,0 warp #017-3_82_77 2,0,017-4,166,27 diff --git a/npc/017-3/mapflags.txt b/npc/017-3/mapflags.txt new file mode 100755 index 00000000..5fa1558b --- /dev/null +++ b/npc/017-3/mapflags.txt @@ -0,0 +1 @@ +//017-3 mapflag resave 017-1,107,70 diff --git a/npc/017-4/_import.txt b/npc/017-4/_import.txt new file mode 100644 index 00000000..42524ecf --- /dev/null +++ b/npc/017-4/_import.txt @@ -0,0 +1,7 @@ +// Map 017-4: Hideout +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/017-4/_warps.txt", +"npc/017-4/guardingspirit.txt", +"npc/017-4/mapflags.txt", +"npc/017-4/orum.txt", +"npc/017-4/waric.txt", diff --git a/npc/017-4/_warps.txt b/npc/017-4/_warps.txt new file mode 100644 index 00000000..28023c3d --- /dev/null +++ b/npc/017-4/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-4: Hideout warps +017-4,201,25,0 warp #017-4_201_25 0,0,017-4,173,46 +017-4,91,26,0 warp #017-4_91_26 0,0,017-3,69,51 +017-4,123,26,0 warp #017-4_123_26 0,0,017-3,32,69 +017-4,166,26,0 warp #017-4_166_26 0,0,017-3,82,76 +017-4,30,47,0 warp #017-4_30_47 0,0,017-3,29,47 +017-4,52,25,0 warp #017-4_52_25 0,0,017-3,63,27 +017-4,83,41,0 warp #017-4_83_41 0,0,017-3,58,61 diff --git a/npc/017-4/guardingspirit.txt b/npc/017-4/guardingspirit.txt new file mode 100755 index 00000000..0e5cb6b9 --- /dev/null +++ b/npc/017-4/guardingspirit.txt @@ -0,0 +1,95 @@ + +017-4,173,47,0 script #Guarding Spirit#_M NPC204,0,0,{ + goto L_Talk; + +L_Talk: + if (OrumQuest == 35) + goto L_Block; + if (OrumQuest < 14) + goto L_Block; + if (OrumQuest > 14) + goto L_Chat; + + mes "[Guarding Spirit]"; + mes "\"Hold there! My master does not wish to be disturbed! I cannot let you enter.\""; + menu + "Who is your master?", L_Master, + "But I have important things I need to discuss with your master!", L_Helped, + "Oh, so he's finally back?", L_Back, + "Okay, okay.", L_close; + +L_Back: + mes "[Guarding Spirit]"; + mes "\"Yes, he was gone for quite a while. When he arrived home, he had a rather frightening looking guy with him.\""; + next; + mes "\"Ahem, I mean, yes Mortal. He came back to his residence and does not wish to interact with those below his status. Leave!\""; + goto L_close; + +L_Master: + mes "[Guarding Spirit]"; + mes "\"He is a powerful wizard. He can force the very elements to obey his will! He regularly communes with demons and higher beings from the astral plane, such as myself.\""; + next; + mes "\"Mankind knows his name as 'Orum'.\""; + menu + "Hey, I helped him out some while ago!", L_Helped, + "Orum? That guy who feels weary due to some transmutation spells?", L_Disrespectful, + "Then I better respect his wish and leave!", L_close; + +L_Disrespectful: + mes "[Guarding Spirit]"; + mes "\"What are you saying? Who are you to mock my Master?! You will regret that!\""; + Hp = 1 + Hp/5; + goto L_close; + +L_Helped: + mes "[Guarding Spirit]"; + mes "\"Really? That sounds implausible to me.\""; + next; + mes "\"Why would my master mess around with such a puny mortal as yourself?\""; + menu + "I'd like to offer him my humble services...", L_Pass, + "Listen, he'll get angry if you don't let me pass. ", L_Pass, + "You're right, I was just bluffing.", L_close; + +L_Pass: + mes "[Guarding Spirit]"; + mes "\"Alright, I will let you pass.\""; + next; + mes "\"Remember that when you speak with him, do so with respect for someone befitting his status.\""; + OrumQuest = 15; + warp "017-4", 201, 26; + goto L_close; + +L_Block: + mes "[Guarding Spirit]"; + mes "\"Stop, mortal! I cannot let you pass!\""; + menu + "What? Who are you?", L_Next, + "Why?", L_Next, + "Ok...", L_close; + +L_Next: + mes "[Guarding Spirit]"; + mes "\"My master summoned me for the sole purpose of preventing anyone else from entering his refuge."; + mes "I'll stand guard and protect it with all my power!\""; + next; + mes "\"If I fail, he will punish me. I do not like being punished by his magic, it hurts.\""; + goto L_close; + +L_Chat: + mes "[Guarding Spirit]"; + mes "Oh, it's you. You may enter."; + // TODO: more chat, maybe depending on the quest progress? + goto L_close; + +L_close: + close; + +OnTouch: + if (OrumQuest < 15) + goto L_Talk; + if (OrumQuest == 35) + goto L_Block; + warp "017-4", 201, 26; + end; +} diff --git a/npc/017-4/mapflags.txt b/npc/017-4/mapflags.txt new file mode 100755 index 00000000..ba9ebbf5 --- /dev/null +++ b/npc/017-4/mapflags.txt @@ -0,0 +1 @@ +//017-4 mapflag resave 017-1,107,70 diff --git a/npc/017-4/orum.txt b/npc/017-4/orum.txt new file mode 100755 index 00000000..771b3469 --- /dev/null +++ b/npc/017-4/orum.txt @@ -0,0 +1,821 @@ + +017-4,211,32,0 script Orum NPC158,{ + // first flower + @AMOUNT_SMALLMUSHROOM = 5; + @AMOUNT_ASH = 5; + @RECOMPENSATION_1 = 5000; + // second flower + @AMOUNT_PINKPETAL = 5; + @AMOUNT_STINGER = 5; + @RECOMPENSATION_2 = 10000; + // third flower + @AMOUNT_WHITEFUR = 5; + @AMOUNT_REDSTINGER = 5; + @RECOMPENSATION_3 = 20000; + // fourth flower + @AMOUNT_HARDSPIKE = 5; + @AMOUNT_ANGRYSTINGER = 5; + @RECOMPENSATION_4 = 40000; + // fifth flower + @AMOUNT_ACORN = 20; + @AMOUNT_PEARL = 3; + @AMOUNT_BLACKSTINGER = 5; + @RECOMPENSATION_5 = 80000; + + @REWARD_MONEY = 100000; + @Reward_Exp = 100000; + + if (OrumQuest > 31) goto L_Done; + + if (OrumQuest == 31) goto L_PlacedFifthFlower; + if (OrumQuest == 30) goto L_PlaceFifthFlower; + if (OrumQuest == 29) goto L_FailedFifthFlower; + if (OrumQuest == 28) goto L_FifthFlower; + + if (OrumQuest == 27) goto L_PlacedFourthFlower; + if (OrumQuest == 26) goto L_PlaceFourthFlower; + if (OrumQuest == 25) goto L_FourthFlower; + + if (OrumQuest == 24) goto L_PlacedThirdFlower; + if (OrumQuest == 23) goto L_PlaceThirdFlower; + if (OrumQuest == 22) goto L_ThirdFlower; + + if (OrumQuest == 21) goto L_PlacedSecondFlower; + if (OrumQuest == 20) goto L_PlaceSecondFlower; + if (OrumQuest == 19) goto L_SecondFlower; + + if (OrumQuest == 18) goto L_PlacedFirstFlower; + if (OrumQuest == 17) goto L_PlaceFirstFlower; + if (OrumQuest == 16) goto L_FirstFlower; + + if (OrumQuest == 15) goto L_InitialTalk; + + goto L_Banish; + +L_InitialTalk: // 15: Persuaded the Guarding Spirit to let you into the cave + mes "[Orum]"; + mes "\"I... My Guarding Spirit... You... What...\""; + mes "[Waric]"; + mes "\"Pull yourself together!\""; + next; + mes "[Orum]"; + mes "\"Y-yes, master.\""; + mes "He turns to you."; + mes "\"I told you not to follow us! Are you so eager to die?\""; + menu + "I'm here to offer my services...", L_Next, + "Ha! You thought you could hide from me?", L_Banish, + "Keep calm, I want to work with you.", L_Next, + "D-d-die?!", L_Banish; + +L_Next: + mes "[Orum]"; + mes "\"You want to help us?\""; + mes "Waric raises his eyebrows."; + next; + mes "[Orum]"; + mes "\"I don't think that's a good idea.\""; + menu + "You won't know until you try.", L_Next1, + "You have no choice, I've found your hideout!", L_Banish; + +L_Next1: + mes "[Orum]"; + mes "\"Well, why not? Here is a simple enough task to prove you're serious."; + mes "Bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip.\""; + + OrumQuest = 16; + menu + "Sure!", L_close, + "Why do you need that?", L_Next2; + +L_Next2: + mes "[Orum]"; + mes "\"Don't ask stupid questions! Do as you're told.\""; + mes "..."; + mes "\"Those things are ingredients for a magical artifact. You don't need to know more at the moment.\""; + goto L_close; + +L_Banish: + mes "[Orum]"; + mes "\"This will be the last mistake you did...\""; + mes "He starts mumbling under his breath and you suddenly feel weirdly weightless. Your vision fades..."; + mes "The last thing you hear is Waric shouting something about untalented apprentices."; + Hp = 1 + rand(5); + warp "017-1", 0, 0; + goto L_close; + +L_FirstFlower: // 16: Got task to bring materials for first magical flower + mes "[Orum]"; + mes "\"So? Where are the " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and Orange Tulip you should've brought?\""; + menu + "I have everything you want!", L_Next3, + "I don't have it yet.", L_close; + +L_Next3: + if ((countitem("SmallMushroom") < @AMOUNT_SMALLMUSHROOM) + || (countitem("PileOfAsh") < @AMOUNT_ASH) + || (countitem("OrangeTulip") < 1)) + goto L_NoItem; + + delitem "SmallMushroom", @AMOUNT_SMALLMUSHROOM; + delitem "PileOfAsh", @AMOUNT_SMALLMUSHROOM; + delitem "OrangeTulip", 1; + getitem "OrangeSummonFlower", 1; + OrumQuest = 17; + + mes "Orum takes the items and starts crushing them, using a very old-looking mortar and pestle. As they turn into a fine powder, he mixes some of it together in the cauldron and finally dips the tulip into it, mumbling enchantements. The tulip changes its appearance. Then he hands it over to you."; + mes "[Orum]"; + mes "\"Phew, done. Now I feel exhausted. You need to place it at its destination.\""; + next; + goto L_WayFirstFlower; + +L_WayFirstFlower: + mes "\"We prepared a place for this in the forest outside the caves. When you leave the cave, go a couple of steps to the east and you'll find a spot of grass with flowers on a small hill. You have to place it there, right in the middle.\""; + goto L_close; + +L_PlaceFirstFlower: // 17: Got task to place the first magical flower + mes "[Orum]"; + mes "\"Go ahead and place the first magical flower.\""; + menu + "Okay, I'll do that.", L_close, + "Could you explain where to place it, one more time?", L_WayFirstFlower, + "I... I lost it.", L_Next4; + +L_Next4: + mes "[Orum]"; + mes "\"What?! I can't believe this! How could you handle a powerful magical artifact in such a careless way?\""; + next; + mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_1 + " GP, and I'm going to allow you to continue helping us. So?\""; + menu + "Okay.", L_Next5, + "No way, that's too much!", L_NoRecompensation; + +L_Next5: + if (Zeny < @RECOMPENSATION_1) + goto L_NoMoney; + Zeny = Zeny - @RECOMPENSATION_1; + OrumQuest = 16; + + mes "[Orum]"; + mes "\"Very well. Now bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip again, so we can start over.\""; + goto L_close; + +L_PlacedFirstFlower: // 18: Placed first magical flower + mes "[Orum]"; + mes "\"I felt the eruption of magical power when you placed it! Wonderful! Let's start with the next one right now.\""; + menu + "Okay, what should I do now?", L_Next6, + "Weird monsters appeared when I placed it!", L_AskMonsters; + +L_Next6: + OrumQuest = 19; + goto L_SecondFlower; + +L_AskMonsters: + mes "[Orum]"; + mes "\"Oh, right. Well, that was to be expected, some of the power seeped out when you placed it. I hope those monsters didn't harm you."; + mes "However, we should continue.\""; + OrumQuest = 19; + next; + goto L_SecondFlower; + +L_SecondFlower: // 19: Got task to bring materials for second magical flower + mes "[Orum]"; + mes "\"Bring me " + @AMOUNT_PINKPETAL + " Pink Petals, " + @AMOUNT_STINGER + " Scorpion Stingers and one Pink Tulip.\""; + menu + "I have it.", L_Next7, + "All right, I'll get it.", L_close, + "What's the purpose of this?", L_AskPurpose; + +L_Next7: + if ((countitem("PinkPetal") < @AMOUNT_PINKPETAL) + || (countitem("ScorpionStinger") < @AMOUNT_STINGER) + || (countitem("PinkTulip") < 1)) + goto L_NoItem; + + delitem "PinkPetal", @AMOUNT_PINKPETAL; + delitem "ScorpionStinger", @AMOUNT_STINGER; + delitem "PinkTulip", 1; + getitem "PurpleSummonFlower", 1; + OrumQuest = 20; + + mes "Orum starts to work on the materials you've gathered, in the same manner he did the first time. Suddenly something from the mortar gets on his hand and it makes a nasty sizzling noise. He yells in pain, clutching his hand to his chest. After cleaning his hand he continues. In the end he gives you another magical flower while rubbing his hand."; + next; + mes "[Orum]"; + mes "\"Ouch, it still hurts. I need some time to recover. In the meantime, go and place the flower.\""; + next; + goto L_WaySecondFlower; + +L_WaySecondFlower: + mes "[Orum]"; + mes "\"The next spot is in the Woodland Hills. When you leave our caves, go south until you come out of the forest. Then walk west, past the hut of that old man."; + mes "The spot where you have to place it is on higher ground, so you'll have to find a way through the caves to reach it.\""; + goto L_close; + +L_AskPurpose: + mes "[Orum]"; + mes "\"Purpose? Well... We're building a pentagram.\""; + goto L_close; + +L_PlaceSecondFlower: // 20: Got task to place the second magical flower + mes "[Orum]"; + mes "\"Go and place the second magical flower.\""; + menu + "I'm on my way.", L_close, + "Where do I have to put it again?", L_WaySecondFlower, + "Sorry, I've lost it.", L_Next8; + +L_Next8: + mes "[Orum]"; + mes "\"What?! You incompetent dunderhead! I got hurt while creating this powerful magical artifact and you managed to lose it!?\""; + next; + mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_2 + " GP, and I'm going to allow you to continue helping us. So?\""; + menu + "Ok.", L_Next9, + "No way, that's too much!", L_NoRecompensation; + +L_Next9: + if (Zeny < @RECOMPENSATION_2) + goto L_NoMoney; + Zeny = Zeny - @RECOMPENSATION_2; + OrumQuest = 19; + + mes "[Orum]"; + mes "\"Okay, now that this is settled, bring me " + @AMOUNT_PINKPETAL + " Pink Petals, " + @AMOUNT_STINGER + " Scorpion Stingers and one Pink Tulip again.\""; + goto L_close; + +L_PlacedSecondFlower: // 21: Placed second magical flower + mes "[Orum]"; + mes "\"Very good. You placed the second flower, right? I could feel it here."; + mes "Everything is going very well.\""; + mes "Orum grins contently."; + menu + "What do you need next?", L_Next10, + "How can we build a pentagram by randomly planting flowers?", L_AskPentagram; + +L_Next10: + OrumQuest = 22; + goto L_ThirdFlower; + +L_AskPentagram: + mes "[Orum]"; + mes "\"Randomly? The spots for the flowers have been very carefully chosen! You see, it's going to be a very LARGE pentagram.\""; + OrumQuest = 22; + next; + goto L_ThirdFlower; + +L_ThirdFlower: // 22: Got task to bring materials for third magical flower + mes "[Orum]"; + mes "\"Now we need " + @AMOUNT_WHITEFUR + " White Furs, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\""; + menu + "I got everything you want.", L_Next11, + "I'm still trying to gather what you need.", L_close, + "And what is the pentagram going to do?", L_AskPentaEffect; + +L_Next11: + if ((countitem("WhiteFur") < @AMOUNT_WHITEFUR) + || (countitem("RedScorpionStinger") < @AMOUNT_REDSTINGER) + || (countitem("WhiteTulip") < 1)) + goto L_NoItem; + + delitem "WhiteFur", @AMOUNT_WHITEFUR; + delitem "RedScorpionStinger", @AMOUNT_REDSTINGER; + delitem "WhiteTulip", 1; + + mes "Orum takes the materials out of your hands and starts preparing them."; + mes "[Orum]"; + mes "\"This time you're going to help me. It's safer when I don't have to handle all of it myself. Okay, listen.\""; + next; + mes "\"Here is the rheological additive that you have to pour on it when the reaction between the powders is on its peak level. I'm going to slowly add a little more of the powder, which will make it react faster. Got it?\""; + menu + "Rheo-what?", L_Next12, + "Okay, let's try.", L_Next12, + "I'm not sure I understand...", L_Next12; + +L_Next12: + mes "[Orum]"; + mes "\"Well, just pour when it's bubbling really hard.\""; + mes "He starts to mix the powders together in the caldron."; + next; + + setarray @bubblingLevels$, "calmly", "slightly", "noticeably", "heavily"; + @bubblingLevel = rand(10); + goto L_EasyMinigame; + +L_EasyMinigame: + mes "The mixture is bubbling " + @bubblingLevels$[@bubblingLevel/7] + ". What do you want to do?"; + menu + "Wait.", L_Next13, + "Pour.", L_EasyCheck; + +L_Next13: + if (@menu == 1) + @bubblingLevel = @bubblingLevel + rand(1,10); + if (@bubblingLevel > 27) + goto L_EasyTooHigh; + mes "Orum adds some more powder."; + goto L_EasyMinigame; + +L_EasyCheck: + @bubblingLevel = @bubblingLevel + 3 - rand(7); + if (@bubblingLevel < 21) + goto L_EasyTooEarly; + if (@bubblingLevel > 27) + goto L_EasyTooLate; + goto L_EasySuccess; + +L_EasyTooLate: + mes "You are about to pour in the additive, but just before you do it..."; + next; + goto L_EasyTooHigh; + +L_EasyTooHigh: + mes "Suddenly the mixture glows brightly. Then it calms down very quickly and turns into a weird greyish color."; + mes "[Orum]"; + mes "\"Are you sleeping? Now it's ruined. You waited too long.\""; + next; + mes "\"You have to collect all the ingredients again, now.\""; + goto L_close; + +L_EasyTooEarly: + mes "You pour the liquid Orum gave you into the mixture."; + mes "It stops bubbling and gets thicker... and thicker... and thicker..."; + mes "[Orum]"; + mes "\"No! That was too early. Look at what you've done! It's hard as a rock now.\""; + next; + mes "\"How annoying! You have to gather new ingredients.\""; + goto L_close; + +L_EasySuccess: + getitem "WhiteSummonFlower", 1; + OrumQuest = 23; + + mes "As you pour the liquid into the bubbling mixture, it calms down and becomes viscous. Orum takes the tulip and dips it into the mixture."; + mes "[Orum]"; + mes "\"Excellent! Here it is.\""; + next; + goto L_WayThirdFlower; + +L_WayThirdFlower: + mes "[Orum]"; + mes "\"This flower needs to be placed on top of the Hurnscald mines. It might be a bit hard to reach, but I'm sure you'll do fine.\""; + goto L_close; + +L_AskPentaEffect: + mes "[Orum]"; + mes "\"Don't you know anything about Astral magic? A pentagram is used for summoning, of course.\""; + goto L_close; + +L_PlaceThirdFlower: // 23: Completed easy minigame and got task to place the third magical flower + mes "[Orum]"; + mes "\"What are you waiting for? Place the third flower where it's supposed to go.\""; + menu + "Okay.", L_close, + "I forgot where to put it.", L_WayThirdFlower, + "Unfortunately... I don't have it anymore.", L_Next14; + +L_Next14: + mes "Orum sighs."; + mes "[Orum]"; + mes "\"I hope this is a joke. No, you're serious? What impudence! This was a valuable and powerful magical artifact.\""; + next; + mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_3 + " GP, and I'm going to allow you to continue helping us. So?\""; + menu + "Here it is.", L_Next15, + "That's too much!", L_NoRecompensation; + +L_Next15: + if (Zeny < @RECOMPENSATION_3) + goto L_NoMoney; + Zeny = Zeny - @RECOMPENSATION_3; + OrumQuest = 22; + + mes "[Orum]"; + mes "\"Once again we need " + @AMOUNT_WHITEFUR + " White Furs, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\""; + goto L_close; + +L_PlacedThirdFlower: // 24: Placed third magical flower + mes "[Orum]"; + mes "\"We're making very good progress. Now that you've placed the third magical flower, only two more are left."; + mes "But we shouldn't become careless now, with each flower the procedure gets more difficult.\""; + menu + "Understood! What's next?", L_Next16, + "What are we going to summon with that pentagram?", L_AskSummon; + +L_Next16: + OrumQuest = 25; + goto L_FourthFlower; + +L_AskSummon: + mes "[Orum]"; + mes "\"Beings from the astral plane, of course. Some of them are already coming through the rift when you place the flowers."; + mes "But that is NOTHING compared to what will happen when the pentagram is complete! Hahaha!\""; + OrumQuest = 25; + next; + goto L_FourthFlower; + +L_FourthFlower: // 25: Got task to bring materials for fourth magical flower + mes "[Orum]"; + mes "\"Now we need " + @AMOUNT_HARDSPIKE + " Hard Spikes, " + @AMOUNT_ANGRYSTINGER + " Angry Scorpion Stingers and one Yellow Rose.\""; + menu + "I managed to get everything.", L_Next17, + "I'll go and gather the items.", L_close, + "Won't it be dangerous to summon so many aggressive monsters?", L_AskDanger; + +L_Next17: + if ((countitem("HardSpike") < @AMOUNT_HARDSPIKE) + || (countitem("AngryScorpionStinger") < @AMOUNT_ANGRYSTINGER) + || (countitem("YellowRose") < 1)) + goto L_NoItem; + + delitem "HardSpike", @AMOUNT_HARDSPIKE; + delitem "AngryScorpionStinger", @AMOUNT_ANGRYSTINGER; + delitem "YellowRose", 1; + + mes "Orum takes the materials and starts to pulverize them once again. You notice that his movements are slower this time and he seems to be really concentrating."; + mes "[Orum]"; + mes "\"Okay. We're going to do it together again, but this time we'll switch the roles. You're going to mix the powders and I'm going to pour the rheological additive into the mixture.\""; + next; + mes "\"This is because... ahm, because you will learn something from it, yes."; + mes "But remember to handle the powders carefuly, they're highly vitriolic.\""; + next; + mes "\"You have two powders, one of them will make the mixture turn yellow, the other one will make it turn red."; + mes "You need to make it a clear, strong orange and hold that for a moment. That way I'll have enough time to pour the rheological additive.\""; + menu + "Let's try it.", L_Next18, + "I'm not sure what to do...", L_Next18; + +L_Next18: + mes "[Orum]"; + mes "\"Just use the red powder when it's too bright, and the yellow powder when it's too dark. And be careful how much powder you use. The mixture will randomly fluctuate a bit, too, so keep that in mind.\""; + mes "He mixes together a few of each ingredients and then hands you two small bowls with the powders."; + next; + + setarray @colorLevels$, "red", "light red", "dark orange", "orange", "light orange", "dark yellow", "yellow"; + @colorLevel = rand(49); + @goodColor = 0; + goto L_HardMinigame; + +L_HardMinigame: + mes "The color of the mixture is " + @colorLevels$[@colorLevel/7] + ". What do you want to do?"; + menu + "Add a small portion of Red Powder.", L_MenuItems, + "Add a large portion of Red Powder.", L_MenuItems, + "Add a small portion of Yellow Powder.", L_MenuItems, + "Add a large portion of Yellow Powder.", L_MenuItems; + +L_MenuItems: + if (@menu == 1) + @colorLevel = @colorLevel - rand(1,3); + if (@menu == 2) + @colorLevel = @colorLevel - rand(6,8); + if (@menu == 3) + @colorLevel = @colorLevel + rand(1,3); + if (@menu == 4) + @colorLevel = @colorLevel + rand(6,8); + + if (@colorLevel > 48) + goto L_TooYellow; + if (@colorLevel < 0) + goto L_TooRed; + + mes "Due to your addition, the mixture is now " + @colorLevels$[@colorLevel/7] + "."; + + if ((@colorLevel > 20) && (@colorLevel < 28)) + goto L_Good; + goto L_HardRandom; + +L_HardRandom: + @colorLevel = @colorLevel + 3 - rand(6); + mes "The mixture sizzles and bubbles."; + + if ((@colorLevel < 21) || (@colorLevel > 27)) + @goodColor = 0; + + if (@colorLevel > 48) + goto L_TooYellow; + if (@colorLevel < 0) + goto L_TooRed; + next; + goto L_HardMinigame; + +L_Good: + @goodColor = @goodColor + 1; + if (@goodColor == 3) + goto L_HardSuccess; + mes "Hold it like this for a moment!"; + next; + goto L_HardRandom; + +L_TooYellow: + next; + mes "The mixture can't get any more yellow. The bubbling increases and most of the liquid quickly turns into steam that makes you cough."; + goto L_HardTooExtreme; +L_TooRed: + next; + mes "The mixture can't get any more red. Suddenly, the bubbling gets even more violent. It seems to be corroding the cauldron! Orum hastily pours the rheological additive on it to make it stop."; + goto L_HardTooExtreme; + +L_HardTooExtreme: + mes "[Orum]"; + mes "\"What are you doing? It is supposed to turn orange. You have to use both powders for that!\""; + next; + mes "\"This is ruined now. Go and collect new ingredients.\""; + goto L_close; + +L_HardSuccess: + getitem "YellowSummonFlower", 1; + OrumQuest = 26; + + mes "Orum pours the rheological additive on the mixture and then dips the flower into the cauldron."; + mes "[Orum]"; + mes "\"Excellent! Wonderful. Here's the flower. I need to clean up the cauldron, so in the meantime go place the flower.\""; + next; + goto L_WayFourthFlower; + +L_WayFourthFlower: + mes "[Orum]"; + mes "\"To find the place: go south after leaving our cave, and then follow the path to the east. Watch out for that nasty forest witch living there, she doesn't like humans."; + mes "You have to place the flower on a small island in front of the coast. To get there, you have to find a way through the caves that connect it with the mainland.\""; + goto L_close; + +L_AskDanger: + mes "[Orum]"; + mes "\"Dangerous? Well, not really, since Waric and I are going to stay here in the cave.\""; + menu + "That's... very comforting.", L_Next19, + "And what about everyone outside? Like me!?", L_Next19; + +L_Next19: + mes "[Orum]"; + mes "\"Umm, well. You won't be in the center of it where the monsters will appear, of course."; + mes "And you can handle a few of them, right?\""; + goto L_close; + +L_PlaceFourthFlower: // 26: Completed difficult minigame and got task to place the fourth magical flower + mes "[Orum]"; + mes "\"I can't wait! Everything is going so well! Why are you wasting time? Go and place the fourth magical flower!\""; + menu + "All right.", L_close, + "Please describe where to place it again.", L_WayFourthFlower, + "The magical flower... I lost it.", L_Next20; + +L_Next20: + mes "Orum shakes his head in disbelief."; + mes "[Orum]"; + mes "\"Lost it? Unbelievable! How could you lose it?\""; + next; + mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_4 + " GP, and I will to allow you to continue helping us. So?\""; + menu + "Here it is.", L_Next21, + "That's too expensive!", L_NoRecompensation; + +L_Next21: + if (Zeny < @RECOMPENSATION_4) + goto L_NoMoney; + Zeny = Zeny - @RECOMPENSATION_4; + OrumQuest = 25; + + mes "[Orum]"; + mes "\"Now bring " + @AMOUNT_HARDSPIKE + " Hard Spikes, " + @AMOUNT_ANGRYSTINGER + " Angry Scorpion Stingers and one Yellow Rose again.\""; + goto L_close; + +L_PlacedFourthFlower: // 27: Placed fourth magical flower + mes "[Orum]"; + mes "\"Oh, almost! Only the last flower needs to be placed. Don't lose your focus now!"; + mes "This last flower is the most complicated one. Pay attention.\""; + menu + "Tell me what you need!", L_Next22, + "Why do you want to summon so many beings?", L_AskReason; + +L_Next22: + OrumQuest = 28; + goto L_FifthFlower; + +L_AskReason: + mes "[Orum]"; + mes "\"Let's say... it's about paying back an old debt."; + mes "I'll give you a hint: think about what's in the center of the pentagram. Or rather who is.\""; + next; + mes "\"Anyway, let's get back to business!\""; + OrumQuest = 28; + next; + goto L_FifthFlower; + +L_FifthFlower: // 28: Got task to bring materials for fifth magical flower + mes "[Orum]"; + mes "\"For the last flower we need " + @AMOUNT_ACORN + " Acorns, " + @AMOUNT_PEARL + " Pearls, " + @AMOUNT_BLACKSTINGER + " Black Scorpion Stingers and 1 Red Rose.\""; + menu + "Here it is.", L_Next23, + "Understood.", L_close, + "Sagatha is the target of the spell, right?", L_AskSagatha; + +L_Next23: + if ((countitem("Acorn") < @AMOUNT_ACORN) + || (countitem("Pearl") < @AMOUNT_PEARL) + || (countitem("BlackScorpionStinger") < @AMOUNT_BLACKSTINGER) + || (countitem("RedRose") < 1)) + goto L_NoItem; + + delitem "Acorn", @AMOUNT_ACORN; + delitem "Pearl", @AMOUNT_PEARL; + delitem "BlackScorpionStinger", @AMOUNT_BLACKSTINGER; + delitem "RedRose", 1; + + mes "Orum takes the materials and draws a deep breath. He then begins to prepare them similarly to the materials for the other flowers."; + mes "[Orum]"; + mes "\"Well, basically, we need to do the same as with the other flowers. We need to be careful, however, because this mixture is a bit more delicate. Would you like to do the add the rheological additive or mix the powders?\""; + menu + "I'll handle the additive.", L_Additive, + "Let me mix the powders.", L_Pulvers; + +L_Additive: + mes "Orum agrees and starts mixing the powders. You're ready to pour in the additive once the mixture reached a high level of bubbling."; + next; + mes "The next dash of powder Orum adds causes the mixture to sputter and splash. Some of the hot liquid lands on the back of your hand!"; + heal -5, 0; + menu + "Ouch!",L_Next24, + "Aah!", L_Next24, + "Urgh!", L_Next24; + +L_Next24: + mes "As you step back from the cauldron you jostle Orum, and the Red Rose falls out of his pocket into the cauldron."; + goto L_FlowerHat; + +L_Pulvers: + mes "You start mixing the powders together. It bubbles much more than during the previous brewing."; + next; + mes "The next dash of powder you add causes the mixture to bubble and splash. Some of the hot liquid lands on Orum's hand! He screams and jumps back while waving his hand around."; + next; + mes "This causes the flower to fall out of his pocket, landing right into the cauldron."; + next; + mes "Orum stares at it."; + goto L_FlowerHat; + +L_FlowerHat: + mes "[Orum]"; + mes "\"Fool! See what you've done? It's ruined!\""; + next; + mes "\"Though, we still have enough of the materials left to start over. Here, take this garbage out and get a new Red Rose!\""; + getitem "RedRoseHat", 1; + OrumQuest = 29; + goto L_close; + +L_AskSagatha: + mes "[Orum]"; + mes "\"Ah, clever. Yes, you're right."; + mes "That self-righteous forest witch thinks she's better than other people. She thinks that gives her the right to stick her nose into other mages' affairs.\""; + next; + mes "\"What's even worse, she thinks she can punish other mages for actions she considers wrong - \""; + mes "[Waric]"; + mes "\"Orum! You do not need to get into the details of this.\""; + next; + mes "[Orum]"; + mes "\"Oh, heh, of course. However, we'll teach her a lesson."; + mes "You are going to help us.\""; + goto L_close; + +L_FailedFifthFlower: // 29: Failed unbeatable minigame and got the flower hat + mes "[Orum]"; + mes "\"Did you get a new Red Rose, so we can create the last magical flower?\""; + menu + "Yes.", L_Next25, + "Not yet.", L_close, + "Will those monsters hurt Sagatha? Or kill her?", L_AskHurtSagatha; + +L_Next25: + if (countitem("RedRose") < 1) + goto L_NoItem; + + delitem "RedRose", 1; + mes "[Orum]"; + mes "\"Finally! This time I'll do it all by myself. You and your clumsy fingers need to take a step back so it won't get ruined again.\""; + next; + mes "You watch while Orum carefully prepares the last magic flower."; + next; + getitem "RedSummonFlower", 1; + OrumQuest = 30; + mes "[Orum]"; + mes "\"Here it is. We're almost done. Don't mess it up!\""; + next; + goto L_WayFifthFlower; + +L_WayFifthFlower: + mes "[Orum]"; + mes "\"To place the last flower: go east and follow the road. At some point it might be difficult to get through, since the road isn't used anymore, and the forest is growing back."; + mes "But you have to find a way and reach a clearing with a very old and tall tree. There you'll find another prepared spot with some flowers.\""; + goto L_close; + +L_AskHurtSagatha: + mes "[Orum]"; + mes "\"Oh, are you getting scared? I thought you wanted to support us.\""; + next; + mes "\"However, no need to worry. Sagatha is much too powerful to get seriously injured by this, sadly.\""; + next; + mes "\"If wanted to actually harm her, we'd need to summon some greater powers. That'd be risky in the best case, and devastatingly costly in the worst.\""; + next; + mes "\"Unless... well, I assume you're not open to donating your soul for a pact with a higher astral being, are you?\""; + goto L_close; + +L_PlaceFifthFlower: // 30: Got task to place the fifth flower + mes "[Orum]"; + mes "\"What are you waiting for? We've almost reached our goal! Go and place the last magical flower to finish the pentagram!\""; + menu + "Yes.", L_close, + "Where do I have to place it?", L_WayFifthFlower, + "Please keep calm, but I lost the flower.", L_Next26; + +L_Next26: + mes "[Orum]"; + mes "\"Lost it? You incompetent excuse for a servant! What do you think you're doing?\""; + next; + mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_5 + " GP, and I'm going to allow you to continue helping us. You also have to bring the necessary materials for a new flower.\""; + menu + "Okay, here it is.", L_Next27, + "What materials do we need?", L_MaterialFifth, + "That's too expensive!", L_NoRecompensation; + +L_Next27: + if (Zeny < @RECOMPENSATION_5) + goto L_NoMoney; + if ((countitem("Acorn") < @AMOUNT_ACORN) + || (countitem("Pearl") < @AMOUNT_PEARL) + || (countitem("BlackScorpionStinger") < @AMOUNT_BLACKSTINGER) + || (countitem("RedRose") < 1)) + goto L_NoItem; + + Zeny = Zeny - @RECOMPENSATION_5; + delitem "Acorn", @AMOUNT_ACORN; + delitem "Pearl", @AMOUNT_PEARL; + delitem "BlackScorpionStinger", @AMOUNT_BLACKSTINGER; + delitem "RedRose", 1; + getitem "RedSummonFlower", 1; + + mes "Orum takes the materials and prepares a new flower."; + mes "[Orum]"; + mes "\"Here is another flower. Don't mess it up this time, understood?\""; + goto L_close; + +L_MaterialFifth: + mes "[Orum]"; + mes "\"For the last flower we need " + @AMOUNT_ACORN + " Acorns, " + @AMOUNT_PEARL + " Pearls, " + @AMOUNT_BLACKSTINGER + " Black Scorpion Stingers and 1 Red Rose.\""; + goto L_close; + +L_PlacedFifthFlower: // 31: Placed fifth flower + mes "[Orum]"; + mes "\"Hahahaha! Wonderful! We were able to hear Sagatha's screaming and ranting here in the cave!\""; + next; + mes "\"Well done, really. I think you've earned yourself a small reward. Here, take this.\""; + Zeny = Zeny + @REWARD_MONEY; + getexp @Reward_Exp, 0; + OrumQuest = 32; + goto L_close; + +L_Done: + mes "[Orum]"; + mes "\"Ah, whenever I think of Sagatha's reaction, it brings a smile to my face. You've done a very good job.\""; + goto L_close; + +L_NoRecompensation: + mes "[Orum]"; + mes "\"Well, you could still try to recover the magical flower instead. It's your decision.\""; + goto L_close; + +L_NoMoney: + mes "[Orum]"; + mes "\"Hey, you don't have enough money!\""; + goto L_close; + +L_NoItem: + mes "[Orum]"; + mes "\"Hey, you don't have it!\""; + goto L_close; + +L_close: + @AMOUNT_SMALLMUSHROOM = 0; + @AMOUNT_ASH = 0; + @RECOMPENSATION_1 = 0; + @AMOUNT_PINKPETAL = 0; + @AMOUNT_STINGER = 0; + @RECOMPENSATION_2 = 0; + @AMOUNT_WHITEFUR = 0; + @AMOUNT_REDSTINGER = 0; + @RECOMPENSATION_3 = 0; + @bubblingLevel = 0; + cleararray @bubblingLevels$[0], "", 4; + @AMOUNT_HARDSPIKE = 0; + @AMOUNT_ANGRYSTINGER = 0; + @RECOMPENSATION_4 = 0; + @colorLevel = 0; + @goodColor = 0; + cleararray @colorLevels$[0], "", 7; + @AMOUNT_ACORN = 0; + @AMOUNT_PEARL = 0; + @AMOUNT_BLACKSTINGER = 0; + @RECOMPENSATION_5 = 0; + @REWARD_MONEY = 0; + @Reward_Exp = 0; + close; +} diff --git a/npc/017-4/waric.txt b/npc/017-4/waric.txt new file mode 100755 index 00000000..637f4526 --- /dev/null +++ b/npc/017-4/waric.txt @@ -0,0 +1,397 @@ + +017-4,216,36,0 script Waric NPC153,{ + @mouboo_status = ((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 3; + @killed_mouboo = 0; + if ((@mouboo_status == 1) || (@mouboo_status == 2)) + @killed_mouboo = 1; + @mouboo_status = 0; + + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) + @cut_tree = 1; + + @sagatha_follower = (QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT; + if (OrumQuest > 40) goto L_MoreMagic; + if (OrumQuest > 39) goto L_SnakesSpell; + if (OrumQuest > 38) goto L_SnakesIngredients; + if (OrumQuest > 37) goto L_Snakes; + if (OrumQuest > 36) goto L_ToxicDart; + if (OrumQuest > 35) goto L_Mushroom; + if (OrumQuest > 34) goto L_Banished; + if (OrumQuest > 33) goto L_LastChance; + if (OrumQuest > 32) goto L_BackforOath; + if (OrumQuest > 31) goto L_DarkMagic; + if (OrumQuest > 30) goto L_Flower5; + if (OrumQuest > 26) goto L_Flower4; + if (OrumQuest > 23) goto L_Flower3; + if (OrumQuest > 20) goto L_Flower2; + if (OrumQuest > 17) goto L_Flower1; + if (OrumQuest > 15) goto L_Mistrust; + + mes "[Waric]"; + mes "\"You! You really are far too persistent to know what is good for you!\""; + mes "He turns towards Orum."; + next; + mes "[Waric]"; + mes "\"It seems your ridiculous Guarding Spirit has failed at his task."; + mes "Deal with this. We cannot afford any more of these distractions.\""; + goto L_close; + +L_Mistrust: + mes "[Waric]"; + mes "\"So, you say you want to help us? You do not look very competent."; + mes "Also, I do not see what motivation you have to help.\""; + next; + mes "\"Demonstrate your worth and I might take you seriously.\""; + goto L_close; + +L_Flower1: + mes "[Waric]"; + mes "\"You placed the first flower. Why, I am surprised! I did not expect you to actually stay and become useful.\""; + if (!(getskilllv(SKILL_MAGIC))) + goto L_close; + menu + "Can you teach me some magic?", L_Next, + "Of course!", L_close; + +L_Next: + if (@sagatha_follower) + goto L_Sagatha; + if (!@killed_mouboo && !@cut_tree) + goto L_Undecided; + mes "[Waric]"; + mes "\"Hmm. I suppose I could do that. You seem to have some potential."; + mes "First, proceed with the task given by Orum.\""; + goto L_close; + +L_Flower2: + mes "[Waric]"; + mes "\"You placed the second flower? It seems Orum's choice of tools is better than expected.\""; + goto L_close; + +L_Flower3: + mes "[Waric]"; + mes "\"I saw that you helped to create and place the third flower. Good.\""; + goto L_close; + +L_Flower4: + mes "[Waric]"; + mes "\"Now that you have placed the fourth flower, we are very close to reaching our goal. Keep it up.\""; + goto L_close; + +L_Flower5: + mes "[Waric]"; + mes "\"Hahaha, excellent. You handled the creation of our pentagram very well. I will be keeping that in mind."; + mes "I have advised Orum to give you a reward. Go now and speak with him.\""; + goto L_close; + +L_DarkMagic: + mes "[Waric]"; + mes "\"So, you have gotten your reward and finished the task Orum had for you. Very good.\""; + menu + "Can you teach me some magic?", L_Next1, + "I'm great or what!", L_close; + +L_Next1: + if (@sagatha_follower) + goto L_Sagatha; + if (!@killed_mouboo && !@cut_tree) + goto L_Undecided; + mes "[Waric]"; + mes "\"You appear to be trustworthy. I will allow you to become my apprentice.\""; + mes "\"I will teach you the basics of the branch of magic I practice. It is called Dark Magic. Very few people know of its existence these days, and hardly anyone is capable of teaching it.\""; + mes "\"You are very lucky that fate has brought us together.\""; + next; + mes "[Waric]"; + mes "\"You cut the tree to please the Earth Spirit. You chose the Dark Side of magic, and this cannot be undone.\""; + mes "\"Dark Magic draws its power from hate and anger. Your magic will be stronger against good creatures, and weaker against the undead and the corrupt.\""; + next; + mes "\"Once you start practicing Dark Magic, using certain spells will be painful. Everything comes with a price.\""; + next; + mes "[Waric]"; + mes "\"So, now that you know more about Dark Magic, are you still willing to become my apprentice?\""; + mes "\"Once you cross this line, there is no going back. Keep this in mind!\""; + OrumQuest = 33; + menu + "I'll have to think about it.", L_ComeBackLater, + "Yes.", L_Oath; + +L_DarkTalkAgain: + mes "The old wizard seems to be annoyed."; + mes "[Waric]"; + mes "\"Very well. Once you start practicing Dark Magic, certain spells will be painful to cast. Your magic will be stronger against good creatures, and weaker against the undead and the corrupt.\""; + next; + mes "\"When you cross this line, there is no going back. Remember that!\""; + mes "\"So, are you ready to become my apprentice?\""; + next; + menu + "No.", L_ComeBackLater, + "Yes. I want to be your apprentice.", L_Oath; + +L_BackforOath: + mes "[Waric]"; + mes "\"Ah, you're back. Have you decided yet if you want to become my apprentice?\""; + menu + "No." , L_ComeBackLater, + "Please, tell me about Dark Magic again.", L_DarkTalkAgain, + "Yes. I want to be your apprentice.", L_Oath; + +L_LastChance: + mes "Waric looks at you, with despise evident on his face."; + next; + mes "[Waric]"; + mes "\"I knew you were a coward.\""; + mes "\"I will give you one last chance to take the oath. If you refuse this time as well, I will no longer teach you.\""; + next; + mes "\"If you are still not sure, I will give you some time to reconsider, but if you start the ritual and run away, you are dead to me!\""; + next; + menu + "I am ready to take the oath. [last chance!]", L_Next2, + "I have to reconsider.", L_ComeBackLater; + +L_Next2: + mes "[Waric]"; + mes "\"If you stop during the oath again, I will not teach you anything. If you are not sure whether you want to become my apprentice or not, take more time to reconsider. However, this is your last chance to do so.\""; + next; + menu + "I have to reconsider.", L_ComeBackLater, + "I am ready to take the oath. [last chance!]", L_Oath; + +L_Oath: + mes "[Waric]"; + mes "\"Now say the oath of the Dark.\""; + next; + mes "Suddenly the room turns darker and writing penned in flames appears in front of you. You feel yourself shaking and shivering."; + next; + mes "As Waric yells, the walls tremble."; + mes "[Waric]"; + mes "\"Read it!\""; + mes "The sound of his voice echoes in the cave."; + next; + mes "You start to read the letters, but your throat closes up and you have a hard time speaking the words out loud."; + next; + mes "I swear to darkness and hate."; + mes "Destruction shall be my guide."; + mes "I shall not be the cure to poison,"; + mes "but the salt to an open wound."; + mes "Sickness and death I shall spread,"; + mes "take the food from those unfed."; + mes "Nothing is to be loved, everything has to end."; + mes "I shall prevail, other shall perish."; + next; + mes "Warric screams at your silence."; + mes "[Waric]"; + mes "\"Say it! Say it now!\""; + next; + menu + "[Say the oath]", L_Next3, + "I can't say this, it's too much for me!", L_NoOath; + +L_Next3: + mes "As you speak the words written in flames, you feel all of your positive feelings drain away. You no longer love, you're no longer happy. You feel indifferent to the world. But there is also a newfound feeling of power in you. You feel capable of doing anything."; + @SUP_id = SKILL_MAGIC_DARK; + @SUP_name$ = "Dark Magic"; + @SUP_xp = 150000; + @SUP_lvl = 2; + callfunc "SkillUp"; + next; + heal MaxHp, 0; + heal ((MaxHp/100) * -99), 0; + mes "You feel completely exhausted."; + OrumQuest = 36; + goto L_close; + +L_NoOath: + mes "Waric mumbles something. You guess it's a magic spell."; + warp "005-3", 86 , 33; + heal MaxHp, 0; + heal ((MaxHp/100) * -50), 0; + OrumQuest = OrumQuest + 1; + goto L_close; + +L_Mushroom: + mes "[Waric]"; + mes "\"Now that you are a student of mine, I will teach you some spells.\""; + next; + mes "\"We will start with an easy one. I will teach you how to summon a wicked mushroom.\""; + mes "\"The spell consumes a Small Mushroom and a Dark Crystal. Shove the Dark Crystal into the Small Mushroom and yell " + get(.invocation$, "smwmushroom") +".\""; + next; + mes "\"A wicked mushroom will appear to fight for you.\""; + OrumQuest = 37; + goto L_close; + +L_ToxicDart: + mes "[Waric]"; + mes "\"Welcome back, apprentice.\""; + mes "\"Are you read for another spell?\""; + menu + "No, I still have to practice the first one.", L_close, + "Yes. Show me some more!", L_Next4; + +L_Next4: + mes "[Waric]"; + mes "\"Very well. This spell is more complex than the last one. It is called toxic dart. Only your peers are susceptible to the dart's poison. If you hit an animal the dart will injure it, but the poison will not work.\""; + next; + mes "\"You have to use two roots for this spell. First you have to take one root and break off all the root hair. Shape it into a stick, if you will. Then put it on top of the other root and form an arrow-like structure.\""; + next; + mes "\"Once this is done you have to throw it in the air and scream " + get(.invocation$, "toxic-dart") + " and the two roots will turn into toxic darts, a projectile you can throw.\""; + next; + mes "\"If you want to learn more, come back later.\""; + OrumQuest = 38; + goto L_close; + +L_Snakes: + mes "Waric nods at you."; + mes "[Waric]"; + mes "\"Have you practiced enough?\""; + menu + "Yes, I'm an outstanding Dark Mage!", L_Next5, + "No. I'm too lazy.", L_ComeBackLater; + +L_Next5: + mes "[Waric]"; + mes "\"Very well. I shall teach you another spell.\""; + mes "\"This one is so complex that I have to show it to you before explaining it further. Bring me a snake egg and a root.\""; + next; + mes "\"Off you go now. Bring me the ingredients.\""; + OrumQuest = 39; + goto L_close; + +L_SnakesIngredients: + OrumQuest = 39; + mes "[Waric]"; + mes "\"Did you bring one Dark Crystal and a Snake Egg?\""; + menu + "Yes, I have what you want.", L_Next6, + "No, I need more time.", L_NoItem; + +L_Next6: + if ((countitem("DarkCrystal") < 0) + || (countitem("SnakeEgg") < 0)) + goto L_NoItem; + delitem "DarkCrystal", 1; + delitem "SnakeEgg", 1; + mes "[Waric]"; + mes "\"Observe!\""; + next; + mes "The wizard takes the crystal and the egg, mumbling something you don't understand. Suddenly, he throws the egg into the air and throws the crystal right through it midair."; + next; + mes "The Egg cracks open and a living snake comes out of the egg."; + next; + monster "017-4", 217,36, "Evil", 1010, 1; + mes "The wizard looks at you, his eyes flashing, and laughs diabolically."; + OrumQuest = 40; + goto L_close; + +L_SnakesSpell: + mes "[Waric]"; + mes "\"Did you see how this spell is cast?\""; + menu + "Yes. What did you mumble?", L_Next7, + "No. Could you show me again?", L_SnakesAgain; + +L_Next7: + mes "[Waric]"; + mes "\"I said " + get(.invocation$, "summon-snakes") + ".\""; + mes "\"Have fun with those spells and use them to cause hate, anger and death.\""; + OrumQuest = 41; + goto L_close; + +L_SnakesAgain: + mes "[Waric]"; + mes "\"Do you really want me to show you the spell again? You will have to bring new ingredients.\""; + menu + "No.", L_SnakesSpell, + "Yes.", L_SnakesIngredients; + +L_ComeBackLater: + mes "[Waric]"; + mes "\"Then come back later.\""; + goto L_close; + +L_MoreMagic: + mes "[Waric]"; + mes "\"Hello, apprentice.\""; + mes "\"You must practice more! I will teach you more spells once you have mastered the ones I have already demonstrated.\""; + next; + menu + "Can you tell me the invocations for the spells you taught me again?", L_Next8, + "Thanks, master. I will come back later", L_close; + +L_Next8: + mes "[Waric]"; + mes "\"Yes, of course.\""; + mes "\"To summon the snakes use " + get(.invocation$, "summon-snakes") + ".\""; + mes "\"Say " + get(.invocation$, "toxic-dart") + " to make your roots into toxic darts.\""; + mes "\"And the first spell, to summon wicked mushrooms, is " + get(.invocation$, "summon-wickedmushroom") + ".\""; + next; + mes "\"Now leave. Spread chaos with the spells I have taught you!\""; + goto L_close; + +L_Undecided: + mes "[Waric]"; + mes "\"Well, I could. However, I am not sure you are trustworthy.\""; + next; + mes "\"How do I know you will not run off to Sagatha with what I would be teaching you?\""; + goto L_close; + +L_Sagatha: + mes "[Waric]"; + mes "\"You are already a student of Sagatha. I will not teach you anything!\""; + goto L_close; + +L_Banished: + mes "The wizard looks at you with despise."; + mes "[Waric]"; + mes "\"How did you...\""; + heal -Hp, 0; + goto L_close; + +L_NoItem: + mes "[Waric]"; + mes "\"Why are you wasting my time? Come back when you got everything I need.\""; + goto L_close; + +L_close: + @killed_mouboo = 0; + @cut_tree = 0; + @sagatha_follower = 0; + @SUP_id = 0; + @SUP_name$ = ""; + @SUP_lvl = 0; + @SUP_xp = 0; + close; +} + +017-1,74,32,0 script DebugFlowerP NPC153,{ + mes "Debug options for Orum's quest:"; + menu + "Candle Helmet done.", L_CandleHelmet, + "Input quest variable.", L_Var, + "Show current quest state.", L_CurrentState, + "Reset quest.", L_Reset, + "Nevermind.", L_close; + +L_CandleHelmet: + OrumQuest = 14; + goto L_close; + +L_Var: + input OrumQuest; + goto L_close; + +L_CurrentState: + mes "The value of the quest variable OrumQuest is currently " + OrumQuest + "."; + goto L_close; + +L_Reset: + OrumQuest = 0; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "DebugFlowerP"; + end; +} diff --git a/npc/017-9/_import.txt b/npc/017-9/_import.txt new file mode 100644 index 00000000..17163a12 --- /dev/null +++ b/npc/017-9/_import.txt @@ -0,0 +1,5 @@ +// Map 017-9: GM Lounge +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/017-9/_warps.txt", +"npc/017-9/mapflags.txt", +"npc/017-9/npcs.txt", diff --git a/npc/017-9/_warps.txt b/npc/017-9/_warps.txt new file mode 100644 index 00000000..daee3206 --- /dev/null +++ b/npc/017-9/_warps.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 017-9: GM Lounge warps +017-9,29,20,0 warp #017-9_29_20 0,0,020-1,60,75 +017-9,26,21,0 warp #017-9_26_21 0,0,009-1,43,45 +017-9,21,20,0 warp #017-9_21_20 0,0,001-1,54,118 +017-9,31,20,0 warp #017-9_31_20 0,0,027-2,46,110 +017-9,23,20,0 warp #017-9_23_20 0,0,029-1,34,95 diff --git a/npc/017-9/mapflags.txt b/npc/017-9/mapflags.txt new file mode 100755 index 00000000..5c673860 --- /dev/null +++ b/npc/017-9/mapflags.txt @@ -0,0 +1 @@ +//017-9 mapflag resave 017-9,26,25 diff --git a/npc/017-9/npcs.txt b/npc/017-9/npcs.txt new file mode 100755 index 00000000..b1257a7d --- /dev/null +++ b/npc/017-9/npcs.txt @@ -0,0 +1,34 @@ +009-1,42,43,0 script #SecretDoor NPC32767,0,0,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; + gmlog "@warp 017-9"; + warp "017-9", 27, 23; + end; +} + +020-1,60,76,0 script #SecretDoor2 NPC32767,0,0,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; + gmlog "@warp 017-9"; + warp "017-9", 29, 21; + end; +} + +001-1,54,118,0 script #SecretDoor3 NPC32767,0,0,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; + gmlog "@warp 017-9"; + warp "017-9", 21, 21; + end; +} + +027-2,118,111,0 script #SecretDoor4 NPC32767,0,0,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; + gmlog "@warp 017-9"; + warp "017-9", 31, 21; + end; +} + +029-1,34,96,0 script #SecretDoor5 NPC32767,0,0,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; + gmlog "@warp 017-9"; + warp "017-9", 23, 21; + end; +} diff --git a/npc/018-1/_import.txt b/npc/018-1/_import.txt new file mode 100644 index 00000000..fd95f9f7 --- /dev/null +++ b/npc/018-1/_import.txt @@ -0,0 +1,9 @@ +// Map 018-1: Woodland Mining Camp +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/018-1/_mobs.txt", +"npc/018-1/_warps.txt", +"npc/018-1/flowerpentagram3.txt", +"npc/018-1/mapflags.txt", +"npc/018-1/mike.txt", +"npc/018-1/miners.txt", +"npc/018-1/sword.txt", diff --git a/npc/018-1/_mobs.txt b/npc/018-1/_mobs.txt new file mode 100644 index 00000000..d32b0c37 --- /dev/null +++ b/npc/018-1/_mobs.txt @@ -0,0 +1,28 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-1: Woodland Mining Camp mobs +018-1,136,79,4,20 monster Clover Patch 1033,10,100000,30000 +018-1,116,44,3,3 monster Clover Patch 1033,3,100000,30000 +018-1,119,56,6,3 monster CroconutMob 1014,2,100000,30000 +018-1,175,28,8,9 monster Fluffy 1022,1,180000,120000 +018-1,78,59,1,0 monster Little Blub 1007,1,100000,30000 +018-1,57,63,7,3 monster Mana Bug 1035,2,100000,30000 +018-1,43,63,15,14 monster Manana Tree 1017,10,100000,30000 +018-1,134,39,9,5 monster Pink Flower 1034,4,100000,50000 +018-1,124,42,4,5 monster Pink Flower 1034,2,100000,50000 +018-1,124,19,11,4 monster Pink Flower 1034,3,100000,50000 +018-1,122,29,9,4 monster Pink Flower 1034,2,100000,50000 +018-1,149,45,5,4 monster Manana Tree 1017,5,100000,30000 +018-1,169,47,10,5 monster Blub 1008,4,120000,30000 +018-1,136,49,6,4 monster Manana Tree 1017,4,100000,30000 +018-1,166,49,6,4 monster Alizarin Plant 1037,1,100000,30000 +018-1,111,62,2,1 monster Mana Bug 1035,1,60000,30000 +018-1,117,50,2,1 monster Clover Patch 1033,1,120000,60000 +018-1,96,47,9,5 monster Blub 1008,3,100000,50000 +018-1,106,52,7,3 monster Pinkie 1030,1,240000,120000 +018-1,78,55,18,3 monster Blub 1008,7,100000,50000 +018-1,145,24,5,4 monster Blub 1008,3,100000,50000 +018-1,68,89,7,8 monster Manana Tree 1017,3,100000,50000 +018-1,160,31,5,9 monster Blub 1008,5,100000,50000 +018-1,0,0,0,0 monster Alizarin Plant 1037,2,0,1000 +018-1,0,0,0,0 monster Amethyst Vein 1055,20,30,20 +018-1,134,80,7,19 monster Piou 1002,15,0,0 diff --git a/npc/018-1/_warps.txt b/npc/018-1/_warps.txt new file mode 100644 index 00000000..33194827 --- /dev/null +++ b/npc/018-1/_warps.txt @@ -0,0 +1,19 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-1: Woodland Mining Camp warps +018-1,79,59,0 warp #018-1_79_59 1,0,018-3,100,132 +018-1,112,61,0 warp #018-1_112_61 0,0,018-3,44,38 +018-1,115,40,0 warp #018-1_115_40 0,0,013-3,22,114 +018-1,128,56,0 warp #018-1_128_56 0,0,018-3,49,99 +018-1,90,42,0 warp #018-1_90_42 0,0,018-3,123,166 +018-1,69,54,0 warp #018-1_69_54 0,0,018-3,70,105 +018-1,127,36,0 warp #018-1_127_36 0,0,013-3,139,44 +018-1,134,45,0 warp #018-1_134_45 0,0,013-3,61,178 +018-1,147,40,0 warp #018-1_147_40 0,0,013-3,81,102 +018-1,153,46,0 warp #018-1_153_46 0,0,018-3,145,162 +018-1,158,34,0 warp #018-1_158_34 0,0,018-3,64,103 +018-1,162,44,0 warp #018-1_162_44 0,0,018-3,29,166 +018-1,177,20,0 warp #018-1_177_20 0,0,013-3,177,90 +018-1,65,73,0 warp #018-1_65_73 0,0,018-2,50,28 +018-1,79,98,0 warp #018-1_79_98 3,0,008-1,78,18 +018-1,64,70,0 warp #018-1_64_70 0,0,018-2,41,21 +018-1,78,34,0 warp #018-1_78_34 0,0,018-3,107,147 diff --git a/npc/018-1/flowerpentagram3.txt b/npc/018-1/flowerpentagram3.txt new file mode 100755 index 00000000..53f45dbe --- /dev/null +++ b/npc/018-1/flowerpentagram3.txt @@ -0,0 +1,109 @@ + +018-1,83,29,0 script #FlowerPentagram3 NPC400,{ + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest > 23) goto L_PlacedThirdFlower; + if (OrumQuest == 23) goto L_ThirdFlower; + + message strcharinfo(0), "Something is odd about this place."; + end; + +L_ThirdFlower: + mes "You recognize this place as the spot where Orum wants you to place the third of his magical flowers."; + menu + "Place the flower.", L_Next, + "Leave.", L_close; + +L_Next: + if (isin("018-1", 82, 28, 84, 30)) + goto L_Place; + + mes "This isn't working, you're too far away."; + goto L_close; + +L_Place: + set @localMonsterCount, + mobcount("018-1", "#FlowerPentagram3::OnSquirrelDeath") + + mobcount("018-1", "#FlowerPentagram3::OnMushroomDeath") + + mobcount("018-1", "#FlowerPentagram3::OnBlueparDeath") + + mobcount("018-1", "#FlowerPentagram3::OnScorpionDeath") + + mobcount("018-1", "#FlowerPentagram3::OnRScorpionDeath") + + mobcount("018-1", "#FlowerPentagram3::OnAScorpionDeath") + + 6; // the mobcount function has an offset of -1, so we add 6 to have the actual amount of monsters + if (@localMonsterCount > 4) + goto L_MonstersAlive; + + if (countitem("WhiteSummonFlower") < 1) + goto L_NoFlower; + delitem "WhiteSummonFlower", 1; + mes "Knowing what will happen, you prepare yourself for a fight. Then you go ahead with the ritual and place the magical flower."; + mes "You feel the now familiar tension around you. Here they come."; + OrumQuest = 24; + close2; + areamonster "018-1", 73, 22, 89, 36, "", 1105, 1, "#FlowerPentagram3::OnSquirrelDeath"; + areamonster "018-1", 73, 22, 89, 36, "", 1106, 2, "#FlowerPentagram3::OnMushroomDeath"; + areamonster "018-1", 73, 22, 89, 36, "", 1107, 1, "#FlowerPentagram3::OnBlueparDeath"; + areamonster "018-1", 73, 22, 89, 36, "", 1003, 2, "#FlowerPentagram3::OnScorpionDeath"; + areamonster "018-1", 73, 22, 89, 36, "", 1004, 1, "#FlowerPentagram3::OnRScorpionDeath"; + areamonster "018-1", 73, 22, 89, 36, "", 1057, 2, "#FlowerPentagram3::OnAScorpionDeath"; + @value = 15; + callfunc "QuestSagathaAnnoy"; + @value = 0; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + @mobId = 1106; + callfunc "MobPoints"; + end; + +OnBlueparDeath: + @mobId = 1107; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + @mobId = 1004; + callfunc "MobPoints"; + end; + +OnAScorpionDeath: + @mobId = 1057; + callfunc "MobPoints"; + end; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "This place has recently been used to summon something! And the beings are still nearby!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_close; + +L_NoFlower: + mes "You reach into your inventory to take out the flower and place it, but you can't find it!"; + mes "Did you lose it somewhere along the way? If you can't find it, go talk to Orum again."; + goto L_close; + +L_PlacedThirdFlower: + mes "You placed the third of Orum's magical flowers on this spot."; + mes "You can feel the magical power around the place, waiting to be unleashed."; + goto L_close; + +L_PlacedFifthFlower: + mes "You remember this place. You placed the third of Orum's magical flowers here."; + mes "However, now that the summoning spell has been cast, everything is back to normal here."; + goto L_close; + +L_close: + @localMonsterCount = 0; + close; +} diff --git a/npc/018-1/mapflags.txt b/npc/018-1/mapflags.txt new file mode 100755 index 00000000..462a68a8 --- /dev/null +++ b/npc/018-1/mapflags.txt @@ -0,0 +1 @@ +//018-1 mapflag resave 018-2,88,32 diff --git a/npc/018-1/mike.txt b/npc/018-1/mike.txt new file mode 100755 index 00000000..5f0681af --- /dev/null +++ b/npc/018-1/mike.txt @@ -0,0 +1,19 @@ +018-1,77,60,0 script Mike NPC113,{ + mes "[Mike]"; + mes "\"I need black stingers to make some medicine to cure my sister.\""; + next; + + @dq_level = 40; + @dq_cost = 16; + @dq_count = 4; + @dq_name$ = "BlackScorpionStinger"; + @dq_friendly_name$ = "black stingers"; + @dq_money = 2500; + @dq_exp = 500; + + callfunc "DailyQuest"; + + next; + mes "\"Hopefully I'll have enough soon.\""; + close; +} diff --git a/npc/018-1/miners.txt b/npc/018-1/miners.txt new file mode 100755 index 00000000..156e86c7 --- /dev/null +++ b/npc/018-1/miners.txt @@ -0,0 +1,35 @@ +018-1,80,61,0 script Miner NPC109,{ + mes "[Miner]"; + mes "\"Be careful in there.\""; + next; + mes "\"Actually maybe you can help an old miner out.\""; + next; + goto L_Keys; + +L_Keys: + mes "[Miner]"; + @dq_level = 40; + @dq_cost = 35; + @dq_count = 10; + @dq_name$ = "TreasureKey"; + @dq_friendly_name$ = "Treasure Key"; + @dq_money = 3000; + @dq_exp = 300; + + callfunc "DailyQuest"; + goto L_close; + +L_close: + @money = 0; + @state = 0; + @dq_level = 0; + @dq_cost = 0; + @dq_count = 0; + @dq_name$ = ""; + @dq_friendly_name$ = ""; + @dq_money = 0; + @dq_exp = 0; + @dq_return = 0; + close; + +} diff --git a/npc/018-1/sword.txt b/npc/018-1/sword.txt new file mode 100755 index 00000000..6aa2af6e --- /dev/null +++ b/npc/018-1/sword.txt @@ -0,0 +1,10 @@ +018-1,110,43,0 script #IceSword#_M NPC400,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + mes "[Sword in Pond]"; + mes "\"Zzzzzz.....\""; + close; +} diff --git a/npc/018-2/_import.txt b/npc/018-2/_import.txt new file mode 100644 index 00000000..923d5d7f --- /dev/null +++ b/npc/018-2/_import.txt @@ -0,0 +1,10 @@ +// Map 018-2: Woodland Mining Camp Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/018-2/_mobs.txt", +"npc/018-2/_warps.txt", +"npc/018-2/angus.txt", +"npc/018-2/books.txt", +"npc/018-2/caul.txt", +"npc/018-2/mapflags.txt", +"npc/018-2/miners.txt", +"npc/018-2/receptionist.txt", diff --git a/npc/018-2/_mobs.txt b/npc/018-2/_mobs.txt new file mode 100644 index 00000000..39b25c49 --- /dev/null +++ b/npc/018-2/_mobs.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-2: Woodland Mining Camp Indoor mobs +018-2,114,21,2,1 monster Little Blub 1007,1,100000,30000 diff --git a/npc/018-2/_warps.txt b/npc/018-2/_warps.txt new file mode 100644 index 00000000..d768904a --- /dev/null +++ b/npc/018-2/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-2: Woodland Mining Camp Indoor warps +018-2,50,29,0 warp #018-2_50_29 0,0,018-1,65,74 +018-2,41,20,0 warp #018-2_41_20 0,0,018-1,64,69 +018-2,20,24,0 warp #018-2_20_24 0,0,018-2,112,26 +018-2,112,25,0 warp #018-2_112_25 0,0,018-2,20,23 +018-2,21,28,0 warp #018-2_21_28 1,0,018-2,79,25 +018-2,79,26,0 warp #018-2_79_26 1,0,018-2,21,29 +018-2,114,19,0 warp #018-2_114_19 0,0,018-3,177,55 diff --git a/npc/018-2/angus.txt b/npc/018-2/angus.txt new file mode 100755 index 00000000..4609f71f --- /dev/null +++ b/npc/018-2/angus.txt @@ -0,0 +1,20 @@ + +018-2,31,39,0 script Angus NPC147,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@inspector == 10) goto L_NohMask; + + mes "[Angus]"; + mes "Angus is tinkering with some mechanical concoction."; + mes "\"It keeps breakin' left an' right... fortunat'ly I put in redundancies everywhere, but I haf' to keep repairin'.\""; + goto L_close; + +L_NohMask: + mes "[Angus]"; + mes "\"I'm sorry, I truely am, but I stay in the town. One o' the miners might have heard something.\""; + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/018-2/books.txt b/npc/018-2/books.txt new file mode 100755 index 00000000..eb355cb0 --- /dev/null +++ b/npc/018-2/books.txt @@ -0,0 +1,21 @@ + +018-2,112,19,0 script #Bookcase38 NPC400,0,1,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + if (@inspector == 11) goto L_NohMask; + mes "Looking over the bookcase, you find nothing strange or out of order."; + goto L_close; + +L_NohMask: + mes "Looking over the bookcase closely, you find a book is upside down."; + next; + mes "The book has been hollowed out. Inside is a theater mask and a note that you cannot even begin to read."; + next; + @inspector = 12; + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/018-2/caul.txt b/npc/018-2/caul.txt new file mode 100755 index 00000000..cb30f6e5 --- /dev/null +++ b/npc/018-2/caul.txt @@ -0,0 +1,1088 @@ + +018-2,37,22,0 script Caul NPC107,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + @SETZER_INITIAL = 0; + @SETZER_KNOWS_OIL = 1; + @SETZER_KNOWS_STINGER = 2; + @SETZER_FLAG_MADE_OIL = 4; + + @MONSTER_OIL_XP = 100000; + @MOPOX_CURE_XP = 30000; + + @Q_MASK = NIBBLE_3_MASK; + @Q_SHIFT = NIBBLE_3_SHIFT; + + @Q_status = (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; + + set @Q_knows_mopox_cure, ((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4; // Elanore's quest for curing Kadiya + + // Can the player get XP for brewing the cure? + set @Q_can_score_mopox_cure, (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) == 4) // Elanore's quest for curing Kadiya + && (((QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) < 2); // Haven't brewed it yet + + mes "[Caul]"; + mes "\"I can help you to brew healing potions out of mauve, cobalt, gamboge and alizarin herbs."; + mes "How many potions do you want to brew?\""; + next; + + @C_monster_oil = 20; + @C_mopox_cure = 21; + @C_nohmask = 22; + @C_dementiapotion = 23; + @C_bye = 24; + + setarray @choice$, "One.", "Five.", "Ten.", "Fifty.", "", "", "", "", ""; + setarray @choice_idx, 1, 5, 10, 50, 0, 0, 0, 0, 0; + @choices_nr = 4; + + + if (!(@Q_status)) + goto L_M_no_monster_oil; + + @choice_idx[@choices_nr] = @C_monster_oil; + @choice$[@choices_nr] = "I would like to brew Monster Oil."; + @choices_nr = @choices_nr + 1; + goto L_M_no_monster_oil; + +L_M_no_monster_oil: + if (!@Q_knows_mopox_cure) + goto L_M_no_mopox_cure; + + @choice_idx[@choices_nr] = @C_mopox_cure; + @choice$[@choices_nr] = "I would like to brew a Mopox Cure Potion."; + @choices_nr = @choices_nr + 1; + goto L_M_no_mopox_cure; + +L_M_no_mopox_cure: + if (@inspector != 10) + goto L_M_no_inspector; + + @choice_idx[@choices_nr] = @C_nohmask; + @choice$[@choices_nr] = "Actually..."; + @choices_nr = @choices_nr + 1; + goto L_M_no_inspector; + +L_M_no_inspector: + if (!(MAGIC_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE)) + goto L_M_no_dempo; + + @choice_idx[@choices_nr] = @C_dementiapotion; + @choice$[@choices_nr] = "I would like to brew a Dementia Potion."; + @choices_nr = @choices_nr + 1; + goto L_M_no_dempo; + +L_M_no_dempo: + @choice_idx[@choices_nr] = @C_bye; + @choice$[@choices_nr] = "Never mind."; + @choices_nr = @choices_nr + 1; + + menu + @choice$[0], L_MenuItems, + @choice$[1], L_MenuItems, + @choice$[2], L_MenuItems, + @choice$[3], L_MenuItems, + @choice$[4], L_MenuItems, + @choice$[5], L_MenuItems, + @choice$[6], L_MenuItems, + @choice$[7], L_MenuItems; + +L_MenuItems: + @choice = @choice_idx[@menu - 1]; + + if (@choice == @C_monster_oil) + goto L_mo_start; + if (@choice == @C_mopox_cure) + goto L_mox_start; + if (@choice == @C_nohmask) + goto L_NohMask; + if (@choice == @C_dementiapotion) + goto L_DemPotion; + if (@choice == @C_bye) + goto L_close; + + // otherwise the choice is the number of potions-to-brew + @num = @choice; + if (@num == 0) + goto L_close; + goto L_brew; + +L_brew: + mes "[Caul]"; + mes "\"Now put " + @num + " herbs of each kind into the cauldron, stir, and concentrate all your mental energy on it.\""; + next; + + if (countitem("MauveHerb") < @num) + goto L_NotEnough; + if (countitem("CobaltHerb") < @num) + goto L_NotEnough; + if (countitem("GambogeHerb") < @num) + goto L_NotEnough; + if (countitem("AlizarinHerb") < @num) + goto L_NotEnough; + + @a = @num; + @result1 = 0; + @result2 = 0; + @result3 = 0; + @result4 = 0; + goto L_CraftLoop; + +L_CraftLoop: + @throw = rand(Int); + @result = 1; + if (@throw >= 5) set @result, 2; + if (@throw >= 15) set @result, 3; + if (@throw >= 35) set @result, 4; + + if (@result == 1) set @result1, @result1 + 1; + if (@result == 2) set @result2, @result2 + 1; + if (@result == 3) set @result3, @result3 + 1; + if (@result == 4) set @result4, @result4 + 1; + + @a = @a - 1; + if (@a > 0) goto L_CraftLoop; + + delitem "MauveHerb", @num; + delitem "CobaltHerb", @num; + delitem "GambogeHerb", @num; + delitem "AlizarinHerb", @num; + + getitem "TinyHealingPotion", @result1; + getitem "SmallHealingPotion", @result2; + getitem "MediumHealingPotion", @result3; + getitem "LargeHealingPotion", @result4; + + mes "[Caul]"; + mes "\"Well done! You made:"; + if (@result1 > 0) + mes @result1 + " tiny potions"; + if (@result2 > 0) + mes @result2 + " small potions"; + if (@result3 > 0) + mes @result3 + " medium potions"; + if (@result4 > 0) + mes @result4 + " large potions"; + mes "Come again.\""; + close; + +L_NotEnough: + mes "[Caul]"; + mes "\"Oh, it seems like you don't have enough herbs. You can find herbs in deep forests.\""; + close; + +L_mo_start: + mes "[Caul]"; + mes "\"Monster oil? Hmm, I have heard of it, but I don't remember the precise recipe to make it...\""; + next; + if (@Q_status == @SETZER_KNOWS_OIL) + menu + "OK, I'll ask around, perhaps someone else knows.", L_close; + if (@Q_status > @SETZER_KNOWS_OIL) + menu + "Rauk told me the recipe.", L_mo_knows_recipe; + close; + +L_mo_knows_recipe: + mes "[Caul]"; + mes "\"Ah, but of course! Yes, we should be able to brew that here. Except that... hmm. Pearl and three black scorpion stingers? This sounds very dangerous;"; + mes "I fear that I will have to ask you to do this yourself.\""; + next; + goto L_mo_main_menu; + +L_mo_main_menu: + @main_menu = 1; + menu + "What do you mean by 'dangerous'?", L_mo_why_dangerous, + "What do I need, again?", L_mo_ingredients, + "How does this work?", L_mo_explain, + "Let's start!", L_mo_start_brew, + "Where can I get a golden scorpion stinger?", L_mo_where_gold, + "I've changed my mind.", L_close; + +L_mo_why_dangerous: + mes "[Caul]"; + mes "\"Well, with those two reagents in there at that ratio, you risk an explosion – quite possibly a fatal one. So be prepared to duck if the brew gets too bubbly – it's better to lose the ingredients than your head!\""; + next; + goto L_mo_main_menu; + +L_mo_ingredients: + mes "[Caul]"; + mes "\"You will need one pearl, two snake skins, three black scorpion stingers, two piles of ash, and a golden scorpion stinger. The golden stinger goes in last, after the dangerous part, so you won't lose it if your brew blows up.\""; + next; + mes "[Caul]"; + mes "\"You should also bring gamboge, mauve, alizarin and cobalt leaves. You will have to stabilize the brew, and they will help with that.\""; + next; + goto L_mo_main_menu; + +L_mo_explain: + mes "[Caul]"; + mes "\"After you have put in the monster parts – except for the golden stinger – the brew will take on some random color; this can be a light, dark, or medium color. You have to stabilize this color by adding leaves to it.\""; + next; + mes "[Caul]"; + mes "\"Of course, with such a violent brew the mixture will change color by itself, too, probably faster than your leaves can affect it. It will randomly add or remove colors, and might even get lighter.\""; + next; + mes "[Caul]"; + mes "\"From what I have seen, it seems to go through phases – for each alternate leaf it adds a colour, then removes a color, then adds again and so on. Of course, if the color is there already it can't add any more.\""; + next; + mes "[Caul]"; + mes "\"I haven't figured out yet precisely when it gets lighter, though.\""; + next; + mes "[Caul]"; + mes "\"By adding Mauve, you can make it darker. Alizarin adds red, Gamboge yellow, Cobalt blue. To make it a proper black, you have to get it to be dark gray, then add one Mauve leaf.\""; + next; + mes "[Caul]"; + mes "\"Unfortunately the brew changes randomly before your leaves dissolve, so sometimes you can't help but add the wrong color...\""; + next; + mes "[Caul]"; + mes "\"Since the brew changes its color first, you might want to add the Mauve when your color is a dark purple or dark green or dark orange and hope for the best.\""; + next; + mes "[Caul]"; + mes "\"But don't add too much! If you add a color that is already there, or try to make it darker at the wrong spot, it may backfire.\""; + next; + if (@main_menu) + goto L_mo_main_menu; + goto L_mo_loop; + +L_mo_where_gold: + mes "[Caul]"; + mes "\"Good question. There aren't any golden scorpions nearby. Perhaps you can find a trader or an adventurer who have travelled further south and ask them to help?\""; + next; + goto L_mo_main_menu; + +L_mo_start_brew: + @main_menu = 0; + if (countitem ("Pearl") < 1) + goto L_mo_missing; + if (countitem ("SnakeSkin") < 2) + goto L_mo_missing; + if (countitem ("BlackScorpionStinger") < 3) + goto L_mo_missing; + if (countitem ("PileOfAsh") < 2) + goto L_mo_missing; + if (countitem ("GoldenScorpionStinger") < 1) + goto L_mo_missing_gold; + + delitem "Pearl", 1; + delitem "SnakeSkin", 2; + delitem "BlackScorpionStinger", 3; + delitem "PileOfAsh", 2; + + @bubble_mode = 0; + setarray @bubble_modes$, + "The brew is calm.", + "The brew is bubbling.", + "The brew is bubbling violently."; + + @color = 1 << (rand(3)); + setarray @colors$, + "white", + "red", + "yellow", + "orange", + "blue", + "purple", + "green", + "gray"; + + @intensity = 1; + setarray @intensities$, + "light", + "medium", + "dark"; + + set @auto_mode, 0; // Start by adding a colour or going lighter + + goto L_mo_loop; + +L_mo_missing: + mes "[Caul]"; + mes "\"You don't seem to have all of the ingredients. You need one pearl, two snake skins, three black stingers, two piles of ash, and one golden stinger.\""; + close; + +L_mo_missing_gold: + mes "[Caul]"; + mes "\"You seem to have everything except for the golden stinger. I understand that this one is hard to get, but I'm sure that you can find one somewhere.\""; + close; + +L_mo_loop: + mes "[Brewing monster oil]"; + mes @bubble_modes$[@bubble_mode]; + mes "It is currently a " + @intensities$[@intensity] + " " + @colors$[@color] + "."; + next; + + menu + "Add alizarin leaf", L_mo_alizarin, + "Add gamboge leaf", L_mo_gamboge, + "Add cobalt leaf", L_mo_cobalt, + "Add mauve leaf", L_mo_mauve, + "Ask Caul for advice", L_mo_explain, + "Duck!", L_Explodes; + +L_Explodes: + mes "[Brewing monster oil]"; + mes "You throw yourself onto the ground. Seconds later, the cauldron shakes, and your entire mixture explodes upwards."; + mes "Caul crawls out from underneath a char."; + next; + mes "[Caul]"; + mes "\"I'm glad to see that you chose to brew another day... perhaps it might be best if you give up on this dangerous concoction, though!\""; + close; + +L_mo_out_of_leaves: + mes "[Brewing monster oil]"; + mes "You don't have any of these leaves left!"; + next; + goto L_mo_loop; + +L_mo_alizarin: + @use_leaf$ = "AlizarinHerb"; + @use_color = 1; + goto L_mo_leaf_color; + +L_mo_gamboge: + @use_leaf$ = "GambogeHerb"; + @use_color = 2; + goto L_mo_leaf_color; + +L_mo_cobalt: + @use_leaf$ = "CobaltHerb"; + @use_color = 4; + goto L_mo_leaf_color; + +L_mo_leaf_color: + if (countitem (@use_leaf$) < 1) + goto L_mo_out_of_leaves; + + callsub S_mo_random_move; + if (@color & @use_color) + goto L_mo_pc_bad; + @color = @color | @use_color; + delitem @use_leaf$, 1; + + mes "The brew changes its hue as your leaf dissolves."; + next; + goto L_mo_loop; + +L_mo_mauve: + if (countitem("MauveHerb") < 1) + goto L_mo_out_of_leaves; + delitem "MauveHerb", 1; + + callsub S_mo_random_move; + if (@intensity == 2 && @color == 7) + goto L_mo_done; + if (@intensity == 2) + goto L_mo_pc_bad; + + @intensity = @intensity + 1; + mes "The brew darkens as your mauve leaf dissolves."; + next; + goto L_mo_loop; + +S_mo_random_move: + mes "[Brewing monster oil]"; + mes "You throw in a leaf and stir."; + + if (@auto_mode == 1) + goto L_mo_random_1; + goto L_mo_random_0; + +L_mo_random_0: // mode 0: add colour or lighten up + @auto_mode = 1; + if (rand(3) == 0) + goto L_mo_random_0_lighten; + + @choice = 1 << (rand(3)); + if (@color & @choice) + goto L_mo_auto_bad; + @color = @color | @choice; + + mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue."; + return; + +L_mo_random_0_lighten: + if (@intensity == 0) + goto L_mo_auto_bad; + @intensity = @intensity - 1; + mes "Before your leaf has a chance to dissolve, the brew takes on a lighter shade of " + @colors$[@color] + "."; + return; + +L_mo_random_1: // mode 1: remove colour + @auto_mode = 0; + @choice = 1 << (rand(3)); + if (!(@color & @choice)) + goto L_mo_auto_bad; + @color = @color & (~@choice); + mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue."; + return; + +L_mo_pc_bad: + if (rand(Int + 100) > 60) + goto L_mo_pc_bad_ok; + if (@bubble_mode) + mes "As your leaf dissolves, the intensity of the bubbling increases."; + if (!@bubble_mode) + mes "As your leaf dissolves, the brew begins to bubble."; + next; + @bubble_mode = @bubble_mode + 1; + if (@bubble_mode > 2) + goto L_mo_explode; + goto L_mo_loop; + +L_mo_pc_bad_ok: + mes "Your leaf dissolves but seems to have no effect."; + next; + goto L_mo_loop; + +L_mo_auto_bad: + if (rand(3) == 0) + goto L_Return; + if (rand(Int + 100) > 70) + goto L_Return; + mes "The brew begins to bubble more violently."; + @bubble_mode = @bubble_mode + 1; + if (@bubble_mode > 2) + next; + if (@bubble_mode > 2) + goto L_mo_explode; + return; + +L_mo_explode: + mes "[Exploding monster oil]"; + mes "Your brew explodes!"; + if (rand(Agi) > 40) + goto L_mo_explode_dodge; + mes "The burst of boiling monster brew hits you."; + next; + heal (15 * rand(Vit)) - 1500, 0, 1; + close; + +L_mo_explode_dodge: + mes "You throw yourself to the ground at the very last moment, barely avoiding the burst of boiling monster brew."; + next; + mes "[Caul]"; + mes "Caul nods at you from underneath a chair."; + mes "\"I told you, it's dangerous!!\""; + close; + +L_mo_done: + mes "As you throw in another mauve leaf, the brew takes on a deep black color and calms down."; + next; + mes "[Brewing monster oil]"; + mes "As instructed, you toss in your golden scorpion stinger."; + + if (countitem ("GoldenScorpionStinger") < 1) + goto L_mo_no_gold_end; + + mes "The brew bubbles once more, then calms completely."; + + delitem "GoldenScorpionStinger", 1; + getitem "MonsterOilPotion", 1; + + if (!(@Q_status & @SETZER_FLAG_MADE_OIL)) + getexp @MONSTER_OIL_XP, 0; + if (!(@Q_status & @SETZER_FLAG_MADE_OIL)) + mes "[" + @MONSTER_OIL_XP + " experience points]"; + + @Q_status = @Q_status | @SETZER_FLAG_MADE_OIL; + callsub S_Update_Var; + next; + mes "[Caul]"; + mes "Caul gets up from underneath the cover he was taking and looks at your brew. He is visibly impressed."; + mes "\"Well done! This should be just enough for one potion of monster oil. Let me get you a bottle.\""; + mes "He hands you the monster oil."; + close; + +L_mo_no_gold_end: + mes "But where is your golden stinger? Didn't you have one earlier?"; + mes "Frustrated, you give up."; + close; + +L_mox_start: + mes "[Caul]"; + mes "\"The mopox cure potion? Certainly, if you have all of the ingredients... oh, and make sure to bring water, roots, sulphur powder and Mauve leaves.\""; + mes "\"This is a very easy one, so I think I should let you do this yourself. It is very good exercise.\""; + next; + goto L_mox_overview_menu; + +L_mox_overview_menu: + menu + "I'm ready!", L_mox_setup, + "What are the ingredients?", L_mox_ingredients, + "How does this work?", L_mox_howto, + "I'd rather not try.", L_close; + +L_mox_ingredients: + mes "[Caul]"; + mes "\"You will need one concentration potion, one iron potion, a lifestone, and one gamboge leaf.\""; + next; + goto L_mox_overview_menu; + +L_mox_howto: + mes "[Caul]"; + mes "\"When you start brewing, the liquid very rarely has the proper consistency and color. You need to make it gooey and medium dark.\""; + next; + mes "[Caul]"; + mes "\"You can affect the consistency by adding ground roots and water, and you can change the color by adding mauve leaves (to darken it) and sulphur powder (to make it brighter).\""; + next; + mes "[Caul]"; + mes "\"The ingredients have some side effects, though, so you will have to experiment a little.\""; + next; + mes "[Caul]"; + mes "\"Oh, and be careful: water will evaporate over time, too.\""; + next; + goto L_mox_overview_menu; + +L_mox_no_lifestone: + mes "[Caul]"; + mes "\"You will need a lifestone.\""; + goto L_mox_overview_menu; + +L_mox_no_gamboge: + mes "[Caul]"; + mes "\"You will need a gamboge leaf.\""; + goto L_mox_overview_menu; + +L_mox_no_concentration: + mes "[Caul]"; + mes "\"You will need a concentration potion.\""; + goto L_mox_overview_menu; + +L_mox_no_iron: + mes "[Caul]"; + mes "\"You will need an iron potion.\""; + goto L_mox_overview_menu; + +L_mox_setup: + if (countitem("IronPotion") < 1) + goto L_mox_no_iron; + if (countitem("ConcentrationPotion") < 1) + goto L_mox_no_concentration; + if (countitem("GambogeHerb") < 1) + goto L_mox_no_gamboge; + if (countitem("Lifestone") < 1) + goto L_mox_no_lifestone; + + delitem "IronPotion", 1; + delitem "ConcentrationPotion", 1; + delitem "GambogeHerb", 1; + delitem "Lifestone", 1; + + mes "[Brewing Mopox Cure]"; + mes "You pour your two potions into the cauldron, then add a gamboge herb and a lifestone. Caul heats up the cauldron and you wait until it begins to boil."; + + setarray @colours$, "white", "almost white", "light", "medium-dark", "dark", "very dark", "almost black", "black"; + setarray @stickinesses$, "watery", "very runny", "runny", "gooey", "sticky", "very sticky", "almost solid"; + @stickiness = rand(7); + @colour = 2 + rand(5); + + // Target: (@stickiness, @colour) = (3, 3) + + if (@stickiness == 3 && @colour == 3) + set @colour, 4; // don't allow insta-win; it's easy enough. + @rounds = 0; + goto L_mox_loop; + +L_mox_loop: + mes "[Brewing Mopox Cure]"; + mes "The brew is " + @colours$[@colour] + " and " + @stickinesses$[@stickiness] + "."; + + if (@colour == 3 && @stickiness == 3) + goto L_mox_win; + next; + + @colour = @colour + 10; + @stickiness = @stickiness + 10; + + menu + "Add root", L_mopox_B_root, + "Add water", L_mopox_B_water, + "Add sulphur powder", L_mopox_B_sulphur, + "Add mauve", L_mopox_B_mauve, + "...what should I do again?", L_mopox_reexplain, + "Wait", L_mox_next; + +L_mox_next: + @stickiness = @stickiness + @rounds; + @rounds = 1 - @rounds; + + if (@stickiness < 10) + @stickiness = 10; + if (@colour < 10) + goto L_mopox_fail_bc; + if (@colour > 17) + goto L_mopox_fail_bc; + if (@stickiness > 16) + goto L_mof_hard; + if (@colour > 17) + goto L_mopox_fail_bc; + + @colour = @colour - 10; + @stickiness = @stickiness - 10; + + goto L_mox_loop; + +L_mopox_reexplain: + mes "[Caul]"; + mes "\"Make this brew gooey and medium dark.\""; + mes "\"(Gooey is right between runny and sticky.)\""; + mes "\"You can add different items that will affect both color and stickiness.\""; + next; + mes "[Caul]"; + mes "\"Water and ground roots mostly affect stickiness.\""; + mes "\"Mauve and sulphur powder mostly affect color, with Mauve darkening the brew.\""; + next; + goto L_mox_next; + +L_mopox_B_none: + mes "[Brewing Mopox Cure]"; + mes "You don't have any left!"; + next; + goto L_mox_next; + +L_mopox_B_root: + if (countitem ("Root") < 1) + goto L_mopox_B_none; + delitem "Root", 1; + + mes "[Brewing Mopox Cure]"; + mes "You grind a root and pour it into the brew."; + next; + @colour = @colour + 1; + @stickiness = @stickiness + 3; + goto L_mox_next; + +L_mopox_B_water: + if (countitem ("BottleOfWater") < 1) + goto L_mopox_B_none; + delitem "BottleOfWater", 1; + getitem "EmptyBottle", 1; + + mes "[Brewing Mopox Cure]"; + mes "You pour a bottle of water into the brew."; + next; + @colour = @colour; + @stickiness = @stickiness - 2; + goto L_mox_next; + +L_mopox_B_sulphur: + if (countitem ("SulphurPowder") < 1) + goto L_mopox_B_none; + delitem "SulphurPowder", 1; + + mes "[Brewing Mopox Cure]"; + mes "You mix some sulphur powder into the brew."; + next; + @colour = @colour - 3; + @stickiness = @stickiness + 1; + goto L_mox_next; + +L_mopox_B_mauve: + if (countitem ("MauveHerb") < 1) + goto L_mopox_B_none; + delitem "MauveHerb", 1; + + mes "[Brewing Mopox Cure]"; + mes "You grind a mauve herb and toss it in."; + next; + @colour = @colour + 2; + @stickiness = @stickiness + 1; + goto L_mox_next; + +L_mopox_fail_bc: + mes "[Brewing Mopox Cure]"; + mes "The brew suddenly begins to bubble again, turning green."; + mes "\"Oh dear,\" Caul remarks, \"you let the color stray too much.\""; + next; + mes "[Caul]"; + mes "\"Better luck next time!\""; + close; + +L_mof_hard: + mes "[Brewing Mopox Cure]"; + mes "You find it almost impossible to stir the brew."; + mes "Suddenly, the thick mass bends outwards, a huge bubble bursting open right in your face!"; + next; + + if (rand(Vit) < 40) + sc_start SC_POISON, 1, 20; + + mes "[Brewing Mopox Cure]"; + mes "Yeech. That smelled bad."; + mes "\"Don't worry, I'll clean up the cauldron,\", interrupts Caul. \"You should wipe that off your face and make sure that you didn't get poisoned.\""; + next; + mes "[Caul]"; + mes "\"Better luck next time!\""; + close; + +L_mox_win: + mes "Caul looks pleased. \"Well done! This looks very good to me.\""; + next; + mes "[Caul]"; + mes "Caul picks a bottle from a shelf and fills it with your brew."; + mes "\"One potion of Mopox cure, here you are. Good luck!\""; + getitem "MopoxCurePotion", 1; + if (!@Q_can_score_mopox_cure) + goto L_mox_win_quick; + getexp @MOPOX_CURE_XP, 0; + mes "[" + @MOPOX_CURE_XP + " experience points]"; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~NIBBLE_3_MASK) | (2 << NIBBLE_3_SHIFT); // Make sure we can only get XP for brewing this once + goto L_mox_win_quick; + +L_mox_win_quick: + close; + +L_DemPotion: + mes "[Caul]"; + mes "\"Ok, you do know this potion is one of the most dangerous potions brewed? My cauldron is empty, you can try it yourself.\""; + next; + mes "Caul goes three steps away and watches your actions carefully."; + menu + "Please explain to me what you know about that potion.", L_explain_dempo, + "Ok, I will start brewing.", L_brew_dempo_init, + "Nevermind", L_close; + +L_explain_dempo: + mes "[Caul]"; + mes "\"Hrrm. I have heard of that potion. I hope I can remember all the stuff needed.\""; + next; + mes "\"Basically this potion is a balancing between death and life; between knowledge and forgetting.\""; + next; + mes "\"So, to get it balanced, we need ingredients for both sides.\""; + next; + mes "\"For the death and forgetting side we can use bones. Although, bones do not work well. We would get the best results with a diseased heart of zombies. Of course, we can use undead ears and skulls as well.\""; + next; + mes "\"For the life and knowledge side we can use fresh mauve herbs. Lifestones would be even better. Roots will do as well, although these must be really fresh to show effect.\""; + next; + mes "\"Brewing such a powerful potion is dangerous. That is why you will need to do it yourself. I will try to assist you as best as I can.\""; + next; + mes "\"I don't know exactly, but there is a slight chance of exploding all time.\""; + next; + mes "\"The color of the mixture will give you a very good impression of what you need to do.\""; + mes "\"And to get that potion working, we need to stabilize it with a pearl at the end.\""; + next; + mes "\"The color will be in a range of really dark black to bright shining white. In between it is grey in different nuances.\""; + mes "\"When it is calm grey, the finalisation with a pearl will work best, so I have heard.\""; + next; + goto L_DemPotion; + +L_brew_dempo_init: + if ((countitem("BottleOfWater") == 0) + || (countitem("Bone") == 0) + || (countitem("Lifestone") == 0) + || (countitem("Pearl") == 0)) + goto L_dempo_noinit; + delitem "BottleOfWater", 1; + delitem "Bone", 1; + delitem "Lifestone", 1; + + @finish_dempo = 0; + // color can be either black or white at the beginning. + // with a slight randomness in there. + @dempo_color = rand(10); + if (rand(2)==0) + @dempo_color = @dempo_color + 90 ; + mes "To start that potion you put in the cauldron a bone, a bottle of water and a lifestone."; + next; + goto L_brew_dempo; + +L_dempo_noinit: + mes "[Caul]"; + mes "\"Hrrm. Usually you start that potion with a bone, a bottle of water and a lifestone.\""; + mes "\"I'd propose you do it exactly that way. You see, maybe it would even work with a skull and a healing potion, but since we don't know, and I don't want to repair my cauldron again, please don't try other solutions.\""; + next; + mes "\"Please use only this way to start the recipe: a bone, a bottle of water and a lifestone. In that order!\""; + mes "\"Ah, and of course you will need at least one pearl with you. This pearl is needed to finalize the potion.\""; + close; + +L_brew_dempo: + callsub L_check_explosion; + + callsub L_calc_dempo_color; + mes "After a little while of cooking you see its color turning into " + @dempo_color_S$+ "."; + next; + + setarray @choice_idx, 0,0,0,0,0,0,0,0,0,0,0; + setarray @choice$, "","","","","","","","","","",""; + + @C_root = 12; + @C_mauve = 13; + @C_lifestone = 14; + @C_diseasedheart = 15; + @C_bone = 16; + @C_skull = 17; + @C_undeadear = 18; + @C_pearl = 19; + @C_nevermind = 20; + + // counter of avalable answers + @choices_nr = 0; + + if (countitem("Root") == 0) + goto L_Noroots; + @choice_idx[@choices_nr] = @C_root; + @choice$[@choices_nr] = "Add a root"; + @choices_nr = @choices_nr + 1; + goto L_Noroots; + +L_Noroots: + if (countitem("MauveHerb") == 0) + goto L_Nomauve; + @choice_idx[@choices_nr] = @C_mauve; + @choice$[@choices_nr] = "Add a mauve herb"; + @choices_nr = @choices_nr + 1; + goto L_Nomauve; + +L_Nomauve: + if (countitem("Lifestone") == 0) + goto L_Nolifestone; + @choice_idx[@choices_nr] = @C_lifestone; + @choice$[@choices_nr] = "Add a lifestone"; + @choices_nr = @choices_nr + 1; + goto L_Nolifestone; + +L_Nolifestone: + if (countitem("DiseasedHeart") == 0) + goto L_Noheart; + @choice_idx[@choices_nr] = @C_diseasedheart; + @choice$[@choices_nr] = "Add a diseased heart"; + @choices_nr = @choices_nr + 1; + goto L_Noheart; + +L_Noheart: + if (countitem("Bone") == 0) + goto L_Nobone; + @choice_idx[@choices_nr] = @C_bone; + @choice$[@choices_nr] = "Add a bone"; + @choices_nr = @choices_nr + 1; + goto L_Nobone; + +L_Nobone: + if (countitem("Skull") == 0) + goto L_Noskull; + @choice_idx[@choices_nr] = @C_skull; + @choice$[@choices_nr] = "Add a skull"; + @choices_nr = @choices_nr + 1; + goto L_Noskull; + +L_Noskull: + if (countitem("UndeadEar") == 0) + goto L_Noear; + @choice_idx[@choices_nr] = @C_undeadear; + @choice$[@choices_nr] = "Add an undead ear"; + @choices_nr = @choices_nr + 1; + goto L_Noear; + +L_Noear: + if (countitem("Pearl") == 0) + goto L_Nopearl; + @choice_idx[@choices_nr] = @C_pearl; + @choice$[@choices_nr] = "Finalize with a pearl."; + @choices_nr = @choices_nr + 1; + goto L_Nopearl; + +L_Nopearl: + @choice_idx[@choices_nr] = @C_nevermind; + @choice$[@choices_nr] = "Nevermind and leave"; + + menu + @choice$[0],L_MenuItems1, + @choice$[1],L_MenuItems1, + @choice$[2],L_MenuItems1, + @choice$[3],L_MenuItems1, + @choice$[4],L_MenuItems1, + @choice$[5],L_MenuItems1, + @choice$[6],L_MenuItems1, + @choice$[7],L_MenuItems1, + @choice$[8],L_MenuItems1, + @choice$[9],L_MenuItems1, + @choice$[10],L_MenuItems1; + +L_MenuItems1: + @menu = @menu - 1; + if (@choice_idx[@menu] == 0) + goto L_brew_dempo; + if ((countitem("Root") != 0) + && (@choice_idx[@menu] == @C_root)) + goto L_useroot; + if ((countitem("MauveHerb") != 0) + && (@choice_idx[@menu] == @C_mauve)) + goto L_usemauve; + if ((countitem("Lifestone") != 0) + && (@choice_idx[@menu] == @C_lifestone)) + goto L_uselifestone; + if ((countitem("DiseasedHeart") != 0) + && (@choice_idx[@menu] == @C_diseasedheart)) + goto L_usediseasedheart; + if ((countitem("Bone") != 0) + && (@choice_idx[@menu] == @C_bone)) + goto L_usebone; + if ((countitem("Skull") != 0) + && (@choice_idx[@menu] == @C_skull)) + goto L_useskull; + if ((countitem("UndeadEar") != 0) + && (@choice_idx[@menu] == @C_undeadear)) + goto L_useear; + if ((countitem("Pearl") != 0) + && (@choice_idx[@menu] == @C_pearl)) + goto L_usepearl; + if ((@choice_idx[@menu] == @C_nevermind)) + goto L_Ask_quit; + + // fallthrough only when player remove the items while in menu, trying to cheat + // the potion will be lost then + mes "\"Do not try to betray me. Come back when you have a better morale.\""; + close; + +L_useroot: + delitem "Root", 1; + @dempo_color = @dempo_color + 9 + rand(9); + goto L_brew_dempo; + +L_usemauve: + delitem "MauveHerb", 1; + @dempo_color = @dempo_color + 1 + rand(2); + goto L_brew_dempo; + +L_uselifestone: + delitem "Lifestone", 1; + @dempo_color = @dempo_color + 3 + rand(4); + goto L_brew_dempo; + +L_usediseasedheart: + delitem "DiseasedHeart", 1; + @dempo_color = @dempo_color - 35 - rand(25); + goto L_brew_dempo; + +L_usebone: + delitem "Bone", 1; + @dempo_color = @dempo_color - 3 - rand(3); + goto L_brew_dempo; + +L_useskull: + delitem "Skull", 1; + @dempo_color = @dempo_color - 9 - rand(9); + goto L_brew_dempo; + +L_useear: + delitem "UndeadEar", 1; + @dempo_color = @dempo_color - 15 - rand(13); + goto L_brew_dempo; + +L_usepearl: + delitem "Pearl", 1; + //ending it is a little dangerous as well, + // stay calm, when it smashes your fine tuned well done potion. + @finish_dempo = 1; + callsub L_check_explosion; + // ok now you really did it. Here is your potion: + getitem "GrimaceOfDementia",1; + + mes "[Caul]"; + mes "\"The potion is now ready. It seems as if it worked fine.\""; + next; + mes "\"Ok here is a flask of that potion. I'll care for the rest.\""; + mes "\"I mean it is a very dangerous fluid.\""; + next; + mes "\"See you later, alligator!\""; + close; + +L_Ask_quit: + mes "[Caul]"; + mes "\"The potion is not ready. You can't just leave now!\""; + menu + "Please throw away that stupid potion, I'm in a hurry!", L_close, + "Oh you are right, let me finish it.", L_brew_dempo; + +L_check_explosion: + // set to range [-50 50]; + @prob = @dempo_color - 50; + + @prob = ((@prob * @prob) / 80) + 4; + if (@finish_dempo == 0) + goto L_check_exp_nof; + + // square again, so you must be in the middle to get it work there; + // and multiply with 3 so there is definitly no chance to get it directly after starting + @prob = (@prob * @prob) * 2; + goto L_check_exp_nof; + +L_check_exp_nof: + // in about 95% of the cases anything is fine, so return. + if (rand(1000) > @prob) goto L_Return; + // in some cases it is not: + // kabooom! + close2; + heal -(Hp/2), 0; + misceffect 5; + misceffect 16; + heal -Hp, 0; + end; + +L_calc_dempo_color: + // @dempo_color_S$ is set in here: + + //really dark black 0-11 + if (@dempo_color < 12) + @dempo_color_S$ = "really dark black"; + + //dark black 12-23 + if ((@dempo_color > 11) && (@dempo_color < 24)) + @dempo_color_S$ = "dark black"; + + //black 24-34 + if ((@dempo_color > 23) && (@dempo_color < 35)) + @dempo_color_S$ = "black"; + + //dark grey with little dark spots 35-41 + if ((@dempo_color > 34) && (@dempo_color < 42)) + @dempo_color_S$ = "dark grey with little dark spots"; + + //dark grey 42-47 + if ((@dempo_color > 41) && (@dempo_color < 48)) + @dempo_color_S$ = "dark grey"; + + //calm grey 48-52 + if ((@dempo_color > 47) && (@dempo_color < 53)) + @dempo_color_S$ = "calm grey"; + + //light grey 53-58 + if ((@dempo_color > 52) && (@dempo_color < 59)) + @dempo_color_S$ = "light grey"; + + //light grey with little light spots 59-65 + if ((@dempo_color > 58) && (@dempo_color < 66)) + @dempo_color_S$ = "light grey with little light spots"; + + //white 66-76 + if ((@dempo_color > 65) && (@dempo_color < 77)) + @dempo_color_S$ = "white"; + + //shining white 77-88 + if ((@dempo_color > 76) && (@dempo_color < 89)) + @dempo_color_S$ = "shining white"; + + //bright shining white 77-100 + if (@dempo_color > 88) + @dempo_color_S$ = "bright shining white"; + + return; + +L_NohMask: + mes "[Caul]"; + mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\""; + goto L_close; + +L_close: + @inspector = 0; + close; + +L_Return: + return; + +S_Update_Var: + set QUEST_Forestbow_state, + (QUEST_Forestbow_state & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/018-2/mapflags.txt b/npc/018-2/mapflags.txt new file mode 100755 index 00000000..a2d53b02 --- /dev/null +++ b/npc/018-2/mapflags.txt @@ -0,0 +1 @@ +//018-2 mapflag resave 018-2,88,32 diff --git a/npc/018-2/miners.txt b/npc/018-2/miners.txt new file mode 100755 index 00000000..ab418c24 --- /dev/null +++ b/npc/018-2/miners.txt @@ -0,0 +1,173 @@ + +018-2,85,23,0 script Malek NPC109,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + @MIN_GEM_AMOUNT = 7; + + if (@inspector == 10) goto L_NohMask; + + mes "[Malek]"; + mes "\"Hi, can I help you at all?\""; + menu + "I'm looking for someone able to make gem powder.", L_GemPowder, + "I was just having a look, have a nice day.", L_close; + +L_NohMask: + mes "[Malek]"; + mes "\"Hi, can I help you at all?\""; + menu + "I'm looking for someone able to make gem powder.", L_GemPowder, + "I was just having a look, have a nice day.", L_close, + "The inspector sent me here to investigate.", L_Investigation; + +L_Investigation: + @inspector = 11; + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT); + mes "\"Yeah, we did hear a commotion. We thought we heard someone go down to the basement, but we checked the whole place over and didn't see anything out of the ordinary.\""; + goto L_close; + +L_GemPowder: + mes "[Malek]"; + mes "\"My father taught me how to make that sort of powder. Put the gem on a firm surface, hold your pickaxe tight and whack that gem hard. It'll be crushed into powder pretty soon if you keep at it.\""; + mes "\"Do you want me to make any for you?\""; + menu + "Yes, I really need some.", L_GemPowderStart, + "Actually, I don't want anything. Have a nice day.", L_close; + +L_GemPowderStart: + mes "[Malek]"; + mes "\"Well, I can do that. Bring me a gem and I'll make you some powder - hope you don't mind if I keep a little as payment!\""; + menu + "I've got some gems.", L_Check_Gems, + "I'll be back with a gem soon.", L_close, + "Actually, I prefer my gems whole. Thanks anyway.", L_close; + +L_Check_Gems: + mes "[Malek]"; + mes "\"Which gem do you want me to powder for you?\""; + next; + setarray @menuitems$, "", "", "", "", "", "", ""; + @c = 0; + goto L_Check_Diamond; + +L_Check_Diamond: + if (countitem("Diamond") < 1) + goto L_Check_Ruby; + @menuitems$[@c] = "A diamond."; + @menuid[@c] = 0; + @c = @c + 1; + goto L_Check_Ruby; + +L_Check_Ruby: + if (countitem("Ruby") < 1) + goto L_Check_Emerald; + @menuitems$[@c] = "A ruby."; + @menuid[@c] = 1; + @c = @c + 1; + goto L_Check_Emerald; + +L_Check_Emerald: + if (countitem("Emerald") < 1) + goto L_Check_Sapphire; + @menuitems$[@c] = "An emerald."; + @menuid[@c] = 2; + @c = @c + 1; + goto L_Check_Sapphire; + +L_Check_Sapphire: + if (countitem("Sapphire") < 1) + goto L_Check_Topaz; + @menuitems$[@c] = "A sapphire."; + @menuid[@c] = 3; + @c = @c + 1; + goto L_Check_Topaz; + +L_Check_Topaz: + if (countitem("Topaz") < 1) + goto L_Check_Amethyst; + @menuitems$[@c] = "A topaz."; + @menuid[@c] = 4; + @c = @c + 1; + goto L_Check_Amethyst; + +L_Check_Amethyst: + if (countitem("Amethyst") < 1) + goto L_Choose_Gem; + @menuitems$[@c] = "An amethyst."; + @menuid[@c] = 5; + @c = @c + 1; + goto L_Choose_Gem; + +L_Choose_Gem: + @menuitems$[@c] = "None right now, thanks."; + @menuid[@c] = 6; + @c = @c + 1; + menu + @menuitems$[0], L_MenuItems, + @menuitems$[1], L_MenuItems, + @menuitems$[2], L_MenuItems, + @menuitems$[3], L_MenuItems, + @menuitems$[4], L_MenuItems, + @menuitems$[5], L_MenuItems, + @menuitems$[6], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + if (@menu >= @c) + goto L_close; + if (@menuid[@menu] == 0) + @gem$ = "Diamond"; + if (@menuid[@menu] == 1) + @gem$ = "Ruby"; + if (@menuid[@menu] == 2) + @gem$ = "Emerald"; + if (@menuid[@menu] == 3) + @gem$ = "Sapphire"; + if (@menuid[@menu] == 4) + @gem$ = "Topaz"; + if (@menuid[@menu] == 5) + @gem$ = "Amethyst"; + if (@menuid[@menu] == 6) + goto L_close; + + getinventorylist; + if (countitem(@gem$) < 1) + goto L_No_gem; + if (@inventorylist_count == 100 + && countitem(@gem$) > 1) + goto L_TooMany; + delitem @gem$, 1; + if (@gem$ == "Diamond") + getitem "DiamondPowder", @MIN_GEM_AMOUNT + rand(6); + if (@gem$ == "Ruby") + getitem "RubyPowder", @MIN_GEM_AMOUNT + rand(6); + if (@gem$ == "Emerald") + getitem "EmeraldPowder", @MIN_GEM_AMOUNT + rand(6); + if (@gem$ == "Sapphire") + getitem "SapphirePowder", @MIN_GEM_AMOUNT + rand(6); + if (@gem$ == "Topaz") + getitem "TopazPowder", @MIN_GEM_AMOUNT + rand(6); + if (@gem$ == "Amethyst") + getitem "AmethystPowder", @MIN_GEM_AMOUNT + rand(6); + + mes "[Malek]"; + mes "\"Here's your powder. Hope it's fine enough for you.\""; + mes "\"Do you need me to make any more?\""; + menu + "Yes please.", L_Check_Gems, + "No thank you, this is enough.", L_close; + +L_TooMany: + mes "[Malek]"; + mes "\"Doesn't look like you've got room for this powder. Come back when you do.\""; + goto L_close; + +L_No_gem: + mes "[Malek]"; + mes "\"You don't have that gem.\""; + goto L_close; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/018-2/receptionist.txt b/npc/018-2/receptionist.txt new file mode 100755 index 00000000..2f0d2a9f --- /dev/null +++ b/npc/018-2/receptionist.txt @@ -0,0 +1,66 @@ + +018-2,50,24,0 script Receptionist#mine NPC108,{ + @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + mes "[Receptionist]"; + mes "\"Welcome to the mining camp!"; + mes "Do you need anything?\""; + next; + goto L_Menu; + +L_Menu: + if (@inspector == 10) + menu + "Why was a mine setup here?", L_Mine, + "Can I go into the mine?", L_Enter, + "Did the company build this building?", L_Building, + "Did you hear a commotion here the other night?", L_NohMask, + "Thank you, no.", L_close; + menu + "Why was a mine setup here?", L_Mine, + "Can I go into the mine?", L_Enter, + "Did the company build this building?", L_Building, + "Thank you, no.", L_close; + +L_Mine: + mes "[Receptionist]"; + mes "\"Minerals have been easy to find in this area historically. The mine entrance we're using collapsed from the mountain side when the volcano errupted. Plenty of minerals were exposed then.\""; + next; + goto L_Question_End; + +L_Enter: + mes "[Receptionist]"; + mes "\"If you think you can handle all the monsters that have appeared there.\""; + next; + goto L_Question_End; + +L_Building: + mes "[Receptionist]"; + mes "\"No, the company bought this building. It's been abandoned for a while. The villagers think it's haunted, but we haven't seen anything, except for the basement. None of us have been able to stay there for very long.\""; + next; + menu + "Why not?", L_Next, + "Not my problem", L_Question_End; + +L_Next: + mes "[Receptionist]"; + mes "\"I haven't been down there myself, and the ones who have haven't been able to describe why at all.\""; + next; + goto L_Question_End; + +L_NohMask: + mes "[Receptionist]"; + mes "\"I stay in town, and so couldn't have heard anything over here. One of the miners might be able to help you.\""; + next; + goto L_Question_End; + +L_Question_End: + mes "[Receptionist]"; + mes "\"Do you need anything else?\""; + next; + goto L_Menu; + +L_close: + @inspector = 0; + close; +} diff --git a/npc/018-3/_import.txt b/npc/018-3/_import.txt new file mode 100644 index 00000000..3595d680 --- /dev/null +++ b/npc/018-3/_import.txt @@ -0,0 +1,8 @@ +// Map 018-3: Northern Mines +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/018-3/_mobs.txt", +"npc/018-3/_warps.txt", +"npc/018-3/bookcase.txt", +"npc/018-3/evil-obelisk.txt", +"npc/018-3/mapflags.txt", +"npc/018-3/sword.txt", diff --git a/npc/018-3/_mobs.txt b/npc/018-3/_mobs.txt new file mode 100644 index 00000000..b2240514 --- /dev/null +++ b/npc/018-3/_mobs.txt @@ -0,0 +1,25 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-3: Northern Mines mobs +018-3,48,29,28,9 monster Manana Tree 1017,10,100000,30000 +018-3,35,144,15,24 monster Pikpik 1013,10,120000,30000 +018-3,35,65,14,11 monster Frostiana 1012,20,100000,50000 +018-3,28,157,1,1 monster CroconutMob 1014,1,60000,30000 +018-3,99,111,8,20 monster Little Blub 1007,10,90000,30000 +018-3,134,140,6,4 monster Piou 1002,3,80000,40000 +018-3,82,149,36,13 monster Frostiana 1012,8,300000,120000 +018-3,102,172,65,6 monster Toppy Blub 1009,20,60000,10000 +018-3,174,37,5,15 monster Little Blub 1007,5,180000,120000 +018-3,148,148,6,12 monster Manana Tree 1017,3,180000,40000 +018-3,136,87,10,3 monster Little Blub 1007,6,80000,40000 +018-3,81,77,13,10 monster Blub 1008,15,80000,40000 +018-3,111,80,2,3 monster Toppy Blub 1009,10,80000,40000 +018-3,175,122,2,20 monster Crocotree 1010,15,40000,20000 +018-3,172,94,8,8 monster Blub 1008,10,60000,30000 +018-3,59,95,5,4 monster Frostiana 1012,15,60000,30000 +018-3,77,92,11,3 monster Toppy Blub 1009,15,60000,30000 +018-3,94,55,8,4 monster Crocotree 1010,5,60000,30000 +018-3,133,39,6,8 monster Frostiana 1012,10,60000,30000 +018-3,111,33,15,8 monster Crocotree 1010,15,60000,30000 +018-3,68,101,2,2 monster Dummy 1021,4,60000,30000 +018-3,153,96,9,8 monster Beehive 1056,4,100000,30000 +018-3,99,99,8,8 monster Beehive 1056,4,100000,30000 diff --git a/npc/018-3/_warps.txt b/npc/018-3/_warps.txt new file mode 100644 index 00000000..b0a15fcc --- /dev/null +++ b/npc/018-3/_warps.txt @@ -0,0 +1,24 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-3: Northern Mines warps +018-3,100,133,0 warp #018-3_100_133 1,0,018-1,79,60 +018-3,44,39,0 warp #018-3_44_39 0,0,018-1,112,62 +018-3,49,100,0 warp #018-3_49_100 0,0,018-1,128,57 +018-3,123,167,0 warp #018-3_123_167 0,0,018-1,90,43 +018-3,70,106,0 warp #018-3_70_106 0,0,018-1,69,55 +018-3,50,88,0 warp #018-3_50_88 0,0,013-3,69,142 +018-3,145,163,0 warp #018-3_145_163 0,0,018-1,153,47 +018-3,64,104,0 warp #018-3_64_104 0,0,018-1,158,35 +018-3,29,167,0 warp #018-3_29_167 0,0,018-1,162,45 +018-3,97,69,0 warp #018-3_97_69 0,0,013-3,178,43 +018-3,27,54,0 warp #018-3_27_54 0,0,013-3,169,44 +018-3,134,63,0 warp #018-3_134_63 0,0,013-3,152,29 +018-3,177,56,0 warp #018-3_177_56 0,0,018-2,114,20 +018-3,172,21,0 warp #018-3_172_21 0,0,013-3,123,103 +018-3,177,21,0 warp #018-3_177_21 0,0,013-3,147,103 +018-3,27,91,0 warp #018-3_27_91 0,0,013-3,158,67 +018-3,90,50,0 warp #018-3_90_50 0,0,013-3,67,50 +018-3,71,122,0 warp #018-3_71_122 0,0,013-3,111,41 +018-3,174,85,0 warp #018-3_174_85 0,0,013-3,62,99 +018-3,102,69,0 warp #018-3_102_69 0,0,013-3,68,96 +018-3,179,181,0 warp #018-3_179_181 0,0,009-3,157,31 +018-3,107,146,0 warp #018-3_107_146 0,0,018-1,78,33 diff --git a/npc/018-3/bookcase.txt b/npc/018-3/bookcase.txt new file mode 100755 index 00000000..d661f749 --- /dev/null +++ b/npc/018-3/bookcase.txt @@ -0,0 +1,66 @@ + +018-3,75,123,0 script #DemonMineBookcase1 NPC400,{ + @state = ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + + if (@state == 0) goto L_Search; + + mes "You see nothing different about the bookcase."; + mes "Do you want to search it again anyways?"; + next; + menu + "Yes.", L_Search, + "No.", L_close; + +L_Search: + mes "After searching the bookcase, you were able to find a few passages that you can read."; + next; + mes "One of the describes an ancient barrier that guards a great treasure."; + mes ""; + mes "To get through it, you need to consume the soul of a great pumpkin ghost."; + next; + mes "Another passage describes a ritual needed to open a certain cursed chest."; + mes ""; + mes "It looks like a lot of items will be needed."; + next; + mes "The slime of a maggot."; + mes "A mushroom, big or small."; + mes "The petal of a pink flower."; + next; + mes "A pearl from the sea."; + mes "A spike; the harder, the better."; + mes "Some raw wood. One log should do."; + next; + mes "An antenna. Preferably pink."; + mes "The tongues of four different snakes."; + mes "A key to a treasure chest."; + next; + mes "A pile of ash."; + mes "Four different herbs."; + mes "A bug, or part of one."; + next; + mes "A lamp for the dark."; + mes "Rock and metal, as one."; + mes "Three different deaths dealt by three different scorpions."; + next; + mes "The womb that gives birth to butterflies."; + mes "The gentle caress of a creature without blemish."; + mes "A single piece of darkness."; + next; + mes "And a bottle's worth of water."; + mes ""; + mes "You begin to wonder if you read that list right."; + next; + if (@state != 0) + goto L_close; + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_close: + @state = 0; + close; + +S_Update_Mask: + QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT); + return; +} diff --git a/npc/018-3/evil-obelisk.txt b/npc/018-3/evil-obelisk.txt new file mode 100755 index 00000000..df9c71b0 --- /dev/null +++ b/npc/018-3/evil-obelisk.txt @@ -0,0 +1,15 @@ + +018-3,67,28,0 script Evil Obelisk NPC185,{ + @map$ = "018-3"; + @x0 = 56; + @y0 = 22; + @x1 = 77; + @y1 = 37; + callfunc "EvilObelisk"; + @map$ = ""; + @x0 = 0; + @y0 = 0; + @x1 = 0; + @y1 = 0; + close; +} diff --git a/npc/018-3/mapflags.txt b/npc/018-3/mapflags.txt new file mode 100755 index 00000000..22d2f40e --- /dev/null +++ b/npc/018-3/mapflags.txt @@ -0,0 +1 @@ +//018-3 mapflag resave 018-2,88,32 diff --git a/npc/018-3/sword.txt b/npc/018-3/sword.txt new file mode 100755 index 00000000..5ee19c82 --- /dev/null +++ b/npc/018-3/sword.txt @@ -0,0 +1,10 @@ +018-3,71,127,0 script #DemonSword#_M NPC400,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + mes "[Sword in Rock]"; + mes "\"Ouch... my head...\""; + close; +} diff --git a/npc/019-1/_import.txt b/npc/019-1/_import.txt new file mode 100644 index 00000000..b6018c04 --- /dev/null +++ b/npc/019-1/_import.txt @@ -0,0 +1,7 @@ +// Map 019-1: snow Field +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/019-1/_mobs.txt", +"npc/019-1/_warps.txt", +"npc/019-1/mapflags.txt", +"npc/019-1/santa_helper.txt", +"npc/019-1/snowman.txt", diff --git a/npc/019-1/_mobs.txt b/npc/019-1/_mobs.txt new file mode 100644 index 00000000..77b1dc7e --- /dev/null +++ b/npc/019-1/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-1: snow Field mobs +019-1,0,0,0,0 monster Cuco 1020,50,100000,30000 +019-1,0,0,0,0 monster Penguin 1094,4,100000,30000 +019-1,0,0,0,0 monster Reaper 1095,5,100000,30000 +019-1,0,0,0,0 monster Demonic Spirit 1112,4,100000,30000 diff --git a/npc/019-1/_warps.txt b/npc/019-1/_warps.txt new file mode 100644 index 00000000..944982d1 --- /dev/null +++ b/npc/019-1/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-1: snow Field warps +019-1,70,21,0 warp #019-1_70_21 3,0,020-1,70,127 +019-1,96,40,0 warp #019-1_96_40 0,0,019-3,98,30 +019-1,38,75,0 warp #019-1_38_75 0,0,019-3,39,101 +019-1,21,70,0 warp #019-1_21_70 0,1,033-1,118,69 diff --git a/npc/019-1/mapflags.txt b/npc/019-1/mapflags.txt new file mode 100755 index 00000000..e6de9fb1 --- /dev/null +++ b/npc/019-1/mapflags.txt @@ -0,0 +1 @@ +//019-1 mapflag resave 020-1,52,118 diff --git a/npc/019-1/santa_helper.txt b/npc/019-1/santa_helper.txt new file mode 100755 index 00000000..4b120682 --- /dev/null +++ b/npc/019-1/santa_helper.txt @@ -0,0 +1,92 @@ + +019-1,74,75,0 script Santa's Helper NPC105,{ + callfunc "XmasStates"; + + if (($@xmas_time) && (@xmas_sh_done)) goto L_Done; + if ($@xmas_time) goto L_Quest; + + mes "[Santa's Helper]"; + mes "\"Ah, isn't it peaceful here? Around Christmas time we always have problems with some slimy monsters."; + mes "They steal the presents boxes. I think they feel attracted by the spiritual power of the Christmas presents.\""; + next; + mes "He smiles happily."; + mes "[Santa's Helper]"; + mes "\"But at this time of the year everything's calm and relaxing.\""; + goto L_close; + +L_Quest: + mes "[Santa's Helper]"; + mes "\"Hello my young friend."; + mes "Would you like to help me?\""; + next; + mes "[Santa's Helper]"; + mes "\"Those monsters stole Santa's presents."; + mes "If you help me, I'll give you something very nice\""; + next; + goto L_Menu; + +L_Menu: + menu + "I have some present boxes", L_Yes, + "Hmm, see you later", L_No, + "What you need exactly?", L_Help; + +L_Yes: + mes "[Santa's Helper]"; + mes "\"Hmm, let me check what you have.\""; + next; + if (countitem("PurplePresentBox") < $@xmas_sh_purple_amount) + goto L_NoItem; + if (countitem("BluePresentBox") < $@xmas_sh_blue_amount) + goto L_NoItem; + if (countitem("GreenPresentBox") < $@xmas_sh_green_amount) + goto L_NoItem; + getinventorylist; + @SantasHelper_Reward$ = $@SantasHelper_Annual_Reward$[ rand(getarraysize($@SantasHelper_Annual_Reward$)) ]; + if ((@inventorylist_count > 99) || (checkweight(@SantasHelper_Reward$, 1) == 0)) + goto L_TooMany; + mes "[Santa's Helper]"; + mes "\"Great! Here is something for you\""; + delitem "PurplePresentBox", $@xmas_sh_purple_amount; + delitem "BluePresentBox", $@xmas_sh_blue_amount; + delitem "GreenPresentBox", $@xmas_sh_green_amount; + getitem @SantasHelper_Reward$, 1; + @SantasHelper_Reward$ = ""; + XMASTIME = XMASTIME | $@xmas_sh_bit; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNice"; + goto L_close; + +L_Help: + mes "[Santa's Helper]"; + mes "\"I need:"; + mes $@xmas_sh_purple_amount + " Purple Present Boxes"; + mes $@xmas_sh_blue_amount + " Blue Present Boxes"; + mes $@xmas_sh_green_amount + " Green Present Boxes\""; + next; + goto L_Menu; + +L_No: + mes "[Santa's Helper]"; + mes "\"Enjoy your holidays and I wish you a happy Christmas!\""; + goto L_close; + +L_NoItem: + mes "[Santa's Helper]"; + mes "\"You dont seem to have enough presents.\""; + goto L_close; + +L_Done: + mes "[Santa's Helper]"; + mes "\"All the children got their Christmas presents."; + mes "Thank you for your help.\""; + goto L_close; + +L_TooMany: + mes "[Santa's Helper]"; + mes "\"It doesn't look like you have room for this. Come back later.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/019-1/snowman.txt b/npc/019-1/snowman.txt new file mode 100755 index 00000000..8fbdf683 --- /dev/null +++ b/npc/019-1/snowman.txt @@ -0,0 +1,84 @@ + +019-1,77,44,0 script Snowman NPC129,{ + if (FLAGS & FLAG_SNOWMAN) goto L_Done; + if (gettime(6) == 12 || gettime(6) == 1 || gettime(6) == 2) goto L_Quest; + + mes "A beautiful snowman. It looks almost alive."; + mes "Maybe the magic of Christmas time will breath life into it?"; + goto L_close; + +L_Quest: + @candy_amount = 15; + @chocolate_amount = 10; + @cactus_amount = 5; + + mes "[Snowman]"; + mes "\"Hello there."; + mes "Would you like a Christmas hat?\""; + next; + goto L_Menu; + +L_Menu: + menu + "Yes", L_Sure, + "No", L_Next, + "What do you need?", L_Need; + +L_Next: + mes "[Snowman]"; + mes "\"Well, thats too bad, but make sure to have the holiday spirit!\""; + goto L_close; + +L_Sure: + mes "[Snowman]"; + mes "\"Hmm, let me see what you have.\""; + next; + if(countitem("Candy") < @candy_amount) + goto L_NoItem; + if(countitem("ChocolateBar") < @chocolate_amount) + goto L_NoItem; + if(countitem("CactusPotion") < @cactus_amount) + goto L_NoItem; + getinventorylist; + if (@inventorylist_count > 99) + goto L_TooMany; + delitem "Candy", @candy_amount; + delitem "ChocolateBar", @chocolate_amount; + delitem "CactusPotion", @cactus_amount; + mes "[Snowman]"; + mes "\"Here you go, enjoy your new hat!\""; + getitem "SantaHat", 1; + FLAGS = FLAGS | FLAG_SNOWMAN; + goto L_close; + +L_Need: + mes "[Snowman]"; + mes "\"For this special hat, I need a pint of magic and a little help."; + mes "Just kidding. I would like to get some food:"; + mes @candy_amount + " pieces of Candy"; + mes @chocolate_amount + " Chocolate Bars"; + mes @cactus_amount + " Cactus Potions\""; + next; + goto L_Menu; + +L_NoItem: + mes "[Snowman]"; + mes "\"Well, I am interested in some food and you don't have enought to get a hat.\""; + goto L_close; + +L_Done: + mes "[Snowman]"; + mes "\"Thank you for your help!\""; + goto L_close; + +L_TooMany: + mes "[Snowman]"; + mes "\"It doesn't look like you have room for this. Come back later.\""; + goto L_close; + +L_close: + @candy_amount = 0; + @chocolate_amount = 0; + @cactus_amount = 0; + close; +} diff --git a/npc/019-3/_import.txt b/npc/019-3/_import.txt new file mode 100644 index 00000000..f090cc9a --- /dev/null +++ b/npc/019-3/_import.txt @@ -0,0 +1,5 @@ +// Map 019-3: Snow Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/019-3/_mobs.txt", +"npc/019-3/_warps.txt", +"npc/019-3/mapflags.txt", diff --git a/npc/019-3/_mobs.txt b/npc/019-3/_mobs.txt new file mode 100644 index 00000000..7a1f091e --- /dev/null +++ b/npc/019-3/_mobs.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-3: Snow Cave mobs +019-3,0,4,0,0 monster Blue Rose 1061,10,100000,30000 +019-3,0,4,0,0 monster Manana Tree 1017,50,100000,30000 diff --git a/npc/019-3/_warps.txt b/npc/019-3/_warps.txt new file mode 100644 index 00000000..16773290 --- /dev/null +++ b/npc/019-3/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-3: Snow Cave warps +019-3,40,102,0 warp #019-3_40_102 0,0,019-1,37,74 +019-3,98,29,0 warp #019-3_98_29 0,0,019-1,96,39 +019-3,80,103,0 warp #019-3_80_103 0,0,030-3,54,70 diff --git a/npc/019-3/mapflags.txt b/npc/019-3/mapflags.txt new file mode 100755 index 00000000..7c077633 --- /dev/null +++ b/npc/019-3/mapflags.txt @@ -0,0 +1 @@ +//019-3 mapflag resave 020-1,52,118 diff --git a/npc/019-4/_import.txt b/npc/019-4/_import.txt new file mode 100644 index 00000000..83f8041d --- /dev/null +++ b/npc/019-4/_import.txt @@ -0,0 +1,5 @@ +// Map 019-4: Snow Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/019-4/_mobs.txt", +"npc/019-4/_warps.txt", +"npc/019-4/mapflags.txt", diff --git a/npc/019-4/_mobs.txt b/npc/019-4/_mobs.txt new file mode 100644 index 00000000..0067630b --- /dev/null +++ b/npc/019-4/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-4: Snow Cave mobs +019-4,0,0,0,0 monster Blue Rose 1061,12,45000,30000 +019-4,47,67,7,4 monster Nutcracker 1093,5,45000,45000 +019-4,0,0,0,0 monster Manana Tree 1017,15,45000,25000 +019-4,0,0,0,0 monster Jack-O 1091,7,45000,30000 diff --git a/npc/019-4/_warps.txt b/npc/019-4/_warps.txt new file mode 100644 index 00000000..dffd7b5c --- /dev/null +++ b/npc/019-4/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 019-4: Snow Cave warps +019-4,74,28,0 warp #019-4_74_28 0,0,047-1,154,93 +019-4,25,124,0 warp #019-4_25_124 1,0,046-1,62,27 diff --git a/npc/019-4/mapflags.txt b/npc/019-4/mapflags.txt new file mode 100755 index 00000000..da86fd49 --- /dev/null +++ b/npc/019-4/mapflags.txt @@ -0,0 +1 @@ +//019-4 mapflag resave 020-1,52,118 diff --git a/npc/020-1/KrickKrackKrock.txt b/npc/020-1/KrickKrackKrock.txt new file mode 100755 index 00000000..8e5db810 --- /dev/null +++ b/npc/020-1/KrickKrackKrock.txt @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/npc/020-1/_import.txt b/npc/020-1/_import.txt index a993b5ed..15453fc5 100644 --- a/npc/020-1/_import.txt +++ b/npc/020-1/_import.txt @@ -1,39 +1,10 @@ -// Map 020-1: Tulimshar +// Map 020-1: Nivalis // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/020-1/KrickKrackKrock.txt", "npc/020-1/_mobs.txt", "npc/020-1/_warps.txt", -"npc/020-1/adrian.txt", -"npc/020-1/aisha.txt", -"npc/020-1/anwar.txt", -"npc/020-1/bodyguard.txt", -"npc/020-1/boss.txt", -"npc/020-1/budifis.txt", -"npc/020-1/cyndala.txt", -"npc/020-1/ekinu.txt", -"npc/020-1/eomie.txt", -"npc/020-1/froma.txt", -"npc/020-1/harper.txt", -"npc/020-1/hocus.txt", -"npc/020-1/inar.txt", -"npc/020-1/issay.txt", -"npc/020-1/itka.txt", -"npc/020-1/joaquim.txt", -"npc/020-1/joelin.txt", -"npc/020-1/jossy.txt", -"npc/020-1/mahoud.txt", -"npc/020-1/malivox.txt", -"npc/020-1/marikel.txt", -"npc/020-1/marine.txt", -"npc/020-1/martha.txt", -"npc/020-1/neko.txt", -"npc/020-1/nickos.txt", -"npc/020-1/noke.txt", -"npc/020-1/odonell.txt", -"npc/020-1/philip.txt", -"npc/020-1/popaul.txt", -"npc/020-1/pusco.txt", -"npc/020-1/ryan.txt", -"npc/020-1/sander.txt", -"npc/020-1/tindris.txt", -"npc/020-1/vaspina.txt", -"npc/020-1/wateranimation.txt", +"npc/020-1/mapflags.txt", +"npc/020-1/rockscissor.txt", +"npc/020-1/soul-menhir.txt", +"npc/020-1/traveler.txt", +"npc/020-1/well.txt", diff --git a/npc/020-1/_mobs.txt b/npc/020-1/_mobs.txt index 27d030e0..65faf287 100644 --- a/npc/020-1/_mobs.txt +++ b/npc/020-1/_mobs.txt @@ -1,63 +1,3 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-1: Tulimshar mobs -020-1,165,77,14,12 monster Maggot 1026,6,5000,10000 -020-1,222,172,54,18 monster Maggot 1026,15,5000,10000 -020-1,282,114,12,39 monster Maggot 1026,5,5000,10000 -020-1,175,209,128,38 monster Desert Scorpion 1078,15,12000,36000 -020-1,59,158,18,26 monster Desert Scorpion 1078,5,12000,36000 -020-1,92,189,58,56 monster Desert Snake 1077,8,18000,72000 -020-1,60,174,23,29 monster Black Slime 1079,4,8500,36000 -020-1,188,216,84,32 monster Maggot 1026,20,5000,10000 -020-1,167,81,21,11 monster Brotherhood Fighter 1081,3,6000,18000 -020-1,279,96,13,15 monster Legion Swordswoman 1066,3,6000,18000 -020-1,74,185,23,46 monster Yellow Slime 1073,6,13500,60000 -020-1,254,226,44,30 monster Desert Snake 1077,4,18000,36000 -020-1,277,248,18,10 monster Thief Slime 1105,3,11500,45000 -020-1,126,200,45,11 monster Giant Maggot 1076,2,36000,120000 -020-1,70,73,10,16 monster Giant Maggot 1076,2,36000,120000 -020-1,70,87,14,16 monster Maggot 1026,6,5000,10000 -020-1,70,74,7,10 monster Thief Slime 1105,1,11500,45000 -020-1,103,187,58,57 monster Fire Goblin 1080,10,8000,50000 -020-1,74,95,0,0 monster Manana Tree 1017,1,420000,240000 -020-1,157,130,123,35 monster Tortuga 1004,20,35000,120000 -020-1,43,180,4,22 monster Blub 1008,1,60000,120000 -020-1,282,249,12,7 monster Blub 1008,1,60000,120000 -020-1,114,119,54,62 monster Little Blub 1007,12,25000,120000 -020-1,294,95,0,0 monster Crocotree 1010,1,420000,240000 -020-1,274,105,0,0 monster Crocotree 1010,1,420000,240000 -020-1,278,125,0,0 monster Crocotree 1010,1,420000,240000 -020-1,259,146,0,0 monster Crocotree 1010,1,420000,240000 -020-1,289,144,0,0 monster Crocotree 1010,1,420000,240000 -020-1,246,160,0,0 monster Crocotree 1010,1,420000,240000 -020-1,215,184,0,0 monster Crocotree 1010,1,420000,240000 -020-1,194,175,0,0 monster Crocotree 1010,1,420000,240000 -020-1,187,157,0,0 monster Crocotree 1010,1,420000,240000 -020-1,172,154,0,0 monster Crocotree 1010,1,420000,240000 -020-1,140,133,0,0 monster Crocotree 1010,1,420000,240000 -020-1,176,137,0,0 monster Crocotree 1010,1,420000,240000 -020-1,156,84,0,0 monster Crocotree 1010,1,420000,240000 -020-1,142,77,0,0 monster Crocotree 1010,1,420000,240000 -020-1,104,183,0,0 monster Crocotree 1010,1,420000,240000 -020-1,80,194,0,0 monster Crocotree 1010,1,420000,240000 -020-1,50,188,0,0 monster Crocotree 1010,1,420000,240000 -020-1,49,169,0,0 monster Crocotree 1010,1,420000,240000 -020-1,71,166,0,0 monster Crocotree 1010,1,420000,240000 -020-1,80,154,0,0 monster Crocotree 1010,1,420000,240000 -020-1,90,138,0,0 monster Crocotree 1010,1,420000,240000 -020-1,67,142,0,0 monster Crocotree 1010,1,420000,240000 -020-1,40,139,0,0 monster Crocotree 1010,1,420000,240000 -020-1,39,125,0,0 monster Crocotree 1010,1,420000,240000 -020-1,77,124,0,0 monster Crocotree 1010,1,420000,240000 -020-1,89,97,0,0 monster Crocotree 1010,1,420000,240000 -020-1,63,83,0,0 monster Crocotree 1010,1,420000,240000 -020-1,55,96,0,0 monster Crocotree 1010,1,420000,240000 -020-1,66,64,0,0 monster Crocotree 1010,1,420000,240000 -020-1,291,254,0,0 monster Crocotree 1010,1,420000,240000 -020-1,285,246,0,0 monster Crocotree 1010,1,420000,240000 -020-1,116,251,23,3 monster Mister Prickel 1085,1,100000,200000 -020-1,64,88,6,6 monster Mister Prickel 1085,1,100000,200000 -020-1,268,249,9,3 monster Mister Prickel 1085,1,100000,200000 -020-1,70,132,13,12 monster Fire Wisp 1115,3,10000,60000 -020-1,70,86,12,10 monster Water Wisp 1116,1,10000,60000 -020-1,244,236,47,21 monster Serqet 1119,2,12000,60000 -020-1,228,222,50,19 monster Fire Goblin 1080,5,8000,50000 +// Map 020-1: Nivalis mobs +020-1,0,0,0,0 monster Reaper 1095,3,100000,30000 diff --git a/npc/020-1/_warps.txt b/npc/020-1/_warps.txt index 30dc8dd5..19986393 100644 --- a/npc/020-1/_warps.txt +++ b/npc/020-1/_warps.txt @@ -1,46 +1,12 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-1: Tulimshar warps -020-1,166,242,0 warp #020-1_166_242 1,0,020-1,165,250 -020-1,166,249,0 warp #020-1_166_249 1,0,020-1,165,241 -020-1,169,135,0 warp #020-1_169_135 0,0,020-2-0,36,40 -020-1,140,71,0 warp #020-1_140_71 0,0,020-2-1,35,38 -020-1,146,70,0 warp #020-1_146_70 0,0,020-2-1,47,36 -020-1,141,59,0 warp #020-1_141_59 0,0,020-2-2,37,22 -020-1,166,77,0 warp #020-1_166_77 0,0,020-2-3,45,33 -020-1,179,98,0 warp #020-1_179_98 0,0,020-2-4,35,28 -020-1,281,85,0 warp #020-1_281_85 0,0,020-2-5,34,30 -020-1,291,88,0 warp #020-1_291_88 0,0,020-2-5,45,37 -020-1,289,80,0 warp #020-1_289_80 0,0,020-2-6,31,29 -020-1,290,72,0 warp #020-1_290_72 0,0,020-2-6,37,22 -020-1,293,106,0 warp #020-1_293_106 0,0,020-2-7,35,32 -020-1,292,130,0 warp #020-1_292_130 0,0,020-2-8,35,32 -020-1,280,140,0 warp #020-1_280_140 0,0,020-2-9,44,36 -020-1,294,148,0 warp #020-1_294_148 0,0,020-2-11,38,31 -020-1,264,152,0 warp #020-1_264_152 0,0,020-2-10,45,32 -020-1,259,152,0 warp #020-1_259_152 0,0,020-2-10,34,32 -020-1,295,163,0 warp #020-1_295_163 0,0,020-2-12,38,31 -020-1,290,157,0 warp #020-1_290_157 0,0,020-2-13,40,31 -020-1,279,168,0 warp #020-1_279_168 0,0,020-2-14,42,33 -020-1,267,181,0 warp #020-1_267_181 0,0,020-2-15,45,32 -020-1,270,173,0 warp #020-1_270_173 0,0,020-2-16,32,25 -020-1,254,165,0 warp #020-1_254_165 0,0,020-2-17,40,26 -020-1,225,190,0 warp #020-1_225_190 0,0,020-2-18,45,33 -020-1,219,190,0 warp #020-1_219_190 0,0,020-2-18,35,33 -020-1,200,186,0 warp #020-1_200_186 0,0,020-2-19,40,26 -020-1,194,168,0 warp #020-1_194_168 0,0,020-2-20,35,37 -020-1,202,168,0 warp #020-1_202_168 0,0,020-2-20,49,37 -020-1,161,146,0 warp #020-1_161_146 0,0,020-2-21,40,26 -020-1,153,131,0 warp #020-1_153_131 0,0,020-2-22,42,32 -020-1,163,72,0 warp #020-1_163_72 0,0,020-2-23,32,28 -020-1,194,162,0 warp #020-1_194_162 0,0,020-2-24,32,28 -020-1,149,128,0 warp #020-1_149_128 0,0,020-2-25,32,28 -020-1,157,128,0 warp #020-1_157_128 0,0,020-2-25,42,28 -020-1,67,116,0 warp #020-1_67_116 0,0,020-2-26,71,43 -020-1,59,117,0 warp #020-1_59_117 1,0,020-2-26,58,45 -020-1,49,115,0 warp #020-1_49_115 0,0,020-2-26,44,41 -020-1,41,118,0 warp #020-1_41_118 0,0,020-2-26,34,48 -020-1,56,107,0 warp #020-1_56_107 0,0,020-2-28,34,32 -020-1,60,107,0 warp #020-1_60_107 0,0,020-2-28,42,32 -020-1,87,114,0 warp #020-1_87_114 0,0,020-2-29,53,33 -020-1,71,56,0 warp #020-1_71_56 0,0,020-2-31,34,30 -020-1,72,44,0 warp #020-1_72_44 0,0,020-2-33,37,22 +// Map 020-1: Nivalis warps +020-1,76,38,0 warp #020-1_76_38 2,0,020-3,31,26 +020-1,47,48,0 warp #020-1_47_48 0,0,020-2,25,35 +020-1,66,52,0 warp #020-1_66_52 0,0,020-2,72,70 +020-1,64,82,0 warp #020-1_64_82 0,0,020-2,111,32 +020-1,86,46,0 warp #020-1_86_46 0,0,020-2,32,73 +020-1,57,91,0 warp #020-1_57_91 0,0,020-2,65,23 +020-1,70,128,0 warp #020-1_70_128 3,0,019-1,70,22 +020-1,107,55,0 warp #020-1_107_55 0,0,031-1,38,55 +020-1,59,45,0 warp #020-1_59_45 0,0,020-2,127,68 +020-1,33,93,0 warp #020-1_33_93 0,0,030-2,88,50 diff --git a/npc/020-1/adrian.txt b/npc/020-1/adrian.txt deleted file mode 100644 index 6783c004..00000000 --- a/npc/020-1/adrian.txt +++ /dev/null @@ -1,42 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Adrian, a Sailor near the Legion's Docks. -// THIS IS A PLACEHOLDER! - -020-1,272,138,0 script Adrian NPC_ADRIAN,{ - .@q=getq(TonoriQuest_Kylian); - - speech - l("Hi there."), - l("I was just having a nap, now the port authority summons me to stand here! I hate this job."), - l("Are you here to pick up luggage? I'd like to go get a beer, but I have to wait here until all the luggage is picked up."); - if (.@q != 1) - close; - select - l("I've came to fetch Kylian's luggage."), - l("Leave"); - mes ""; - if (@menu == 2) - close; - mesn; - mesc l("%s examines the ticket.", .name$); - mesq l("..."); - next; - mesn; - mesq l("Mr. Kylian you say? Of course he would send someone to pick up his luggage. Figures."); - next; - inventoryplace Suitcase, 1; - mesn; - mesc l("%s hands you a very heavy suitcase.", .name$); - mesq l("Here it is. Good luck carrying that thing."); - setq1 TonoriQuest_Kylian, 2; - getitembound Suitcase, 1, IBT_CHARACTER; - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/aisha.txt b/npc/020-1/aisha.txt deleted file mode 100644 index 51169144..00000000 --- a/npc/020-1/aisha.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Aisha, the young lady at Tulim Docks, Legion area. -// THIS IS A PLACEHOLDER! - -020-1,271,93,0 script Aisha NPC_AIRLIA,{ - speech - l("Good day to you, Sir."), - l("I totally forgot why I am standing besides that stiky fish, doing nothing."), - l("If you have an idea, please tell me what I could do."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/anwar.txt b/npc/020-1/anwar.txt deleted file mode 100644 index 7d6789ef..00000000 --- a/npc/020-1/anwar.txt +++ /dev/null @@ -1,148 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Anwar, the farmer in Tulimshar. - -020-1,178,196,0 script Anwar NPC_ANWAR,{ - // This code is from Moubootaur Legends and needs cleaning up - .@q=getq(TulimsharQuest_AnwarField); - if (BaseLevel < 18) { - hello; - end; - } - - if (.@q > 10) goto L_Complete; - if (.@q == 10) goto L_SecondReward; - if (.@q == 9) goto L_FirstReward; - if (.@q == 8) goto L_SecondTry; - if (.@q == 7) goto L_AnwarField; - if (.@q == 6) goto L_FirstTry; - if (.@q == 5) goto L_TryIt; - if (.@q >= 1) goto L_FirstTry; - // TODO: "What is this contraband fake potion you have there?! I do not accept potions without the seal of the Magic Academy. They might not work and I won't have warranty." - - speech - l("Hi there."), - l("Nothing grows in this stupid desert."), - l("I could try to water it, but where to get water.. also a fertility potion could help."), - l("Maybe you can do a small errand for me?"); - //l("But I have no water, no potion, no script. *cries* "); - select - l("Sure!"), - l("I'm busy, sorry."); - mes ""; - if (@menu == 1) - goto L_Sure; - close; - -L_Complete: - mesn; - mesq l("Thanks for saving Tulimshar from a famine. I'll be forever grateful."); - next; - mesn; - mesq l("Dealing with raijin is too bothersome to me."); - close; - -L_AnwarField: - mesn; - mesq l("My crops! Hurry up, and talk to Hocus!!"); - close; - -L_Sure: - mes ""; - mesn; - mesq l("Great! Hocus, the magic academy grandmaster, is a real Nature mage. He probably makes fertilizers."); - next; - mesn; - mesq l("Please, talk to him. I am too busy tending the crops to go myself."); - setq TulimsharQuest_AnwarField, 1; - close; - -L_FirstTry: - mesn; - mesq l("Good luck getting the fertilizer from Hocus!"); - if (countitem(FertilityPotion)) - mesc l("Anwar will only accept fertility potions certified by the Magic Academy."); - close; - -L_TryIt: - .@q2=getq2(TulimsharQuest_AnwarField); - if (!countitem(FertilityPotion)) { - mesn; - mesq l("Bring me the fertilizer!"); - close; - } - mesn; - mesq l("You've brought me fertilizer! Let me see if it works..."); - next; - delitem FertilityPotion, 1; - setq2 TulimsharQuest_AnwarField, .@q2+1; - - // Fail chances are 100% - 13% per attempt - if (rand2(0,100) < 100-(.@q2*13)) { - setq1 TulimsharQuest_AnwarField, 6; - mesc l("Nothing happens."); - next; - mesn; - mesq l("Uhm, it was not enough. Please bring me another one."); - } else { - setq1 TulimsharQuest_AnwarField, 7; - mesc l("Evil worms crawl from earth and starts devouring the plants!"); - // Okay, maybe Galimatia's potion was a better idea. - next; - mesn; - mesq l("Uh... That should not happen, right? RIGHT?"); - next; - mesn; - mesq l("Don't just stand here! Go fetch help, NOW!!"); - } - - close; - -L_SecondTry: - if (!countitem(PurificationPotion)) { - mesn; - mesq l("Bring me the bug bomb or whatever!"); - close; - } - mesn strcharinfo(0); - mesq l("Here is a certified(R) purification potion! Hocus just gave me. Hurry up!"); - next; - delitem PurificationPotion, 1; - getexp 20, 0; - specialeffect(51); - setq TulimsharQuest_AnwarField, 9; - mesn; - mesq l("Thanks God... The crops are safe. Not only that, but the fertilizer works!"); - next; - mesn; - mesq l("Ah, that was tiresome... I'll go make a reward for them, talk to me again later."); - close; - -L_FirstReward: - mesn; - mesq l("Here are two %s. Please deliver it to them. I hope they'll like it.", getitemlink(SilverBell)); - setq TulimsharQuest_AnwarField, 10, 0; - getitembound(SilverBell, 2, 4); // Prevent accidental item loss - close; - -L_SecondReward: - .@q2=getq2(TulimsharQuest_AnwarField); - if (.@q2 < 3){ - mesn; - mesq l("Please deliver the two %s to Eomie and Hocus, and then I'll give you something for your help.", getitemlink(SilverBell)); - close; - } - setq TulimsharQuest_AnwarField, 11, 0; - getitem SilkPants, 1; - getexp 750, 0; - mesn; - mesq l("Many thanks for your help! Here, take this. I'm sure it can be very useful later. It always is."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/bodyguard.txt b/npc/020-1/bodyguard.txt deleted file mode 100644 index 13aea996..00000000 --- a/npc/020-1/bodyguard.txt +++ /dev/null @@ -1,53 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Bodyguard protecting Micksha's chilling place in oasis. - -020-1,292,245,0 script Bodyguard NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ - speech - l("Hey, you!"), - l("Do not dare sitting on this bench. This is Micksha's place to relax. You better are gone when he arrives."), - l("He has to listen to much drama, so he wants to rest here, alone, in silence. Got it?"); - next; - select - l("Got it."), - l("And what if I sit?"), - l("Who's Micksha?"), - l("What's the story of this place, anyway?"); - mes ""; - mesn; - switch (@menu) { - case 2: - mesq l("Well, if he sees you, a giant foot will descend from the heavens upon you... Or so I've heard."); - next; - mesn; - mesc l("*shivers*"); - mesq l("I would be afraid if I were you!"); - next; - mesn; - break; - case 3: - mesq l("A popular designer and inventor. A lot of buildings follow their architectonic drawings."); - next; - mesn; - mesq l("You would be amazed at how much engineers and politicians oppose to his architecture, though!"); - next; - mesn; - break; - case 4: - mesq l("Once upon a long time, a local nobleman crushed a gold ingot in this lake. Instead of dust, it became water and then, this pond came to be."); - next; - mesn; - mesq l("It is only a myth, don't expect it to make a lot of sense."); - next; - mesn; - break; - } - mesq l("Now, get moving."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/boss.txt b/npc/020-1/boss.txt deleted file mode 100644 index e45eebed..00000000 --- a/npc/020-1/boss.txt +++ /dev/null @@ -1,43 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Controls the boss on 020-1 and the Master Book Learning -// see npc/items/master_skillbook.txt for explanation about variables - -020-1,0,0,0 script #BossCtrl_020-1 NPC_HIDDEN,{ - end; - -// Test server: 5 minutes only -OnTimer300000: - if (!debug) - end; - -// Otherwise, respawn every 15 minutes -OnTimer900000: - stopnpctimer; -OnInit: - $@MB_0201=0; - monster "020-1", 160, 254, strmobinfo(1, GoldenScorpion), GoldenScorpion, 1, "#BossCtrl_020-1::OnBossDeath"; - end; - -OnBossDeath: - initnpctimer; - BossSlain(.name$, "$@MB_0201"); - end; - -OnBossCheck: - @mb_BossId=-1; - // TODO: Check if you really fought or was just lurking - // Check if party is correct - if (getcharid(1) != $@MB_0201) - end; -OnBegin: - @mb_BossId=GoldenScorpion; - @mb_SkillId=GC_DARKILLUSION; - @mb_ItemId=MagicFeather; // Placeholder - @mb_ItemAm=1; - addtimer(15000, "#MasterBook::OnUnset"); - end; - -} diff --git a/npc/020-1/budifis.txt b/npc/020-1/budifis.txt deleted file mode 100644 index 763d671b..00000000 --- a/npc/020-1/budifis.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Budifis the Water Mage. -// THIS IS A PLACEHOLDER! - -020-1,70,47,0 script Budifis NPC_MAGE_BLUE,{ - speech - l("Hi!"), - l("I just love watching the ocean from up there."), - l("Did you meet Pusco already? He and his crappy Fire Elements. One day I will extinguish him properly, be assured."); - close; - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-1/cyndala.txt b/npc/020-1/cyndala.txt deleted file mode 100644 index 3a1a6886..00000000 --- a/npc/020-1/cyndala.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Cyndala, a lady in the garden in Tulimshar slums. -// THIS IS A PLACEHOLDER! - -020-1,285,156,0 script Cyndala NPC_INYA,{ - speech - l("Hi there."), - l("There used to be more pirates around here, but, you know."), - l("People are going mad rewriting history and I'm clueless."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/ekinu.txt b/npc/020-1/ekinu.txt deleted file mode 100644 index 2e9682c0..00000000 --- a/npc/020-1/ekinu.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Ekinu, a Brotherhood Guard protecting the bridge. -// THIS IS A PLACEHOLDER! - -020-1,170,118,0 script Ekinu NPC_RAIJIN_MALE_BROTHERHOOD,{ - speech - l("Hi!"), - l("You come from Hurnscald? Oh, did you meet my Grandma there? Is she fine?"), - l("Tell her greetings, and give her some flowers from me when you return there."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/eomie.txt b/npc/020-1/eomie.txt deleted file mode 100644 index 7b613c38..00000000 --- a/npc/020-1/eomie.txt +++ /dev/null @@ -1,192 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Jesusalva -// Description: -// Eomie, the real Nature Mage. Whatever Hocus is saying. -// ANWAR QUEST PART IS COPY-PASTA FROM MOUBOOTAUR LEGENDS -// THIS IS A PLACEHOLDER!! The Nature Magic questline is missing. - -020-1,76,96,0 script Eomie NPC_EOMIE,{ - .@q=getq(TulimsharQuest_AnwarField); - - // Results: 6 - nothing. 7- bug feast. - // On status 7, you need to talk to Hocus. - // Then Hocus will finish stuff for you, and it's reward time. - if (.@q == 10) goto L_Gift; - if (.@q == 7) goto L_Success; - if (.@q == 6) goto L_Fail; - if (.@q == 4) goto L_Craft; - if (.@q == 3) goto L_Back; - if (.@q == 2) goto L_Start; - if (.@q == 1) goto L_Refuse; - - // Placeholder dialog - if (.@q == 5) - mesc l("I still have Anwar's fertilizer with me."); - speech - l("Hi!"), - l("Did you talk to Hocus already? He will tell you about salad, again."), - l("Sometimes I think he is more a chef than a mage, but oh well, everybody should do what suits them best."); - close; - -// READ THE HOLY DIALOGS!! -L_Refuse: - mesn strcharinfo(0); - mesq l("Hello! Anwar sent me to get fertilizer to save Tulimshar from famine, could you help me?"); - next; - mesn; - mesq l("Not now, I'm busy tending the garden."); - close; - -L_Start: - mesn strcharinfo(0); - mesq l("Hello, could I help you in exchange for fertilizer?"); - next; - mesn; - mesq l("Actually, yes. The birthday of me and my boyfriend is coming up. He always give me chocolate cake, so I want to surprise him for once. Bring me 12 @@ and I'll make the fertilizer for you.", getitemlink(CherryCake)); - setq TulimsharQuest_AnwarField, 3; - close; - -L_Back: - mesn; - mesq l("So, did you brought me the twelve cherry cakes?"); - mes ""; - mesn strcharinfo(0); - if (askyesno() != ASK_YES) { - close; - } - mes ""; - if (countitem("CherryCake") < 12) - goto L_Lying; - - delitem CherryCake, 12; - getexp 200, 5; - setq TulimsharQuest_AnwarField, 4; - mesn; - mesq l("Okay, that is very useful. However, I do need a few reagents to make it."); - next; - mesn; - mesq l("Please, come back later. I'll see whatever I can fetch for that."); - close; - -L_Craft: - mesn; - mesq l("So, for the fertilizer. The thing is, all that thing is unstable."); - next; - mesn; - mesq l("This fertilizer is projected to protect the plants from plagues, bugs, scorpions and maggots, trying to not be a plague itself."); - next; - mesn; - mesq l("I have no way to know how much fertilizer you'll be needing. I need @@ @@ and @@ @@ to make a Certified Fertility Potion for you.", 3, getitemlink(Plushroom), 9, getitemlink(MaggotSlime)); - next; - mesn; - mesq l("Give that to whoever needs them, and see if it works. Then come tell me the result. Do you have the reagents?"); - if (askyesno() != ASK_YES) - close; - mes ""; - - if (countitem(Plushroom) < 3|| - countitem(MaggotSlime) < 9) - goto L_Lying; - - inventoryplace FertilityPotion, 1; - delitem Plushroom, 3; - delitem MaggotSlime, 9; - getitembound(FertilityPotion, 1, IBT_CHARACTER); - setq1 TulimsharQuest_AnwarField, 5; - - mesn; - mesq l("Here it is. Come back to report the results."); - close; - -L_Fail: - setq1 TulimsharQuest_AnwarField, 4; - .@q2=getq2(TulimsharQuest_AnwarField); - if (.@q2 < 10) - getexp 180-(.@q2*10), 0; - else - getexp 90, 0; - mesn; - switch (.@q2) { - case 1: - mesq l("Well, that could not be enough, I said. Here is some experience."); - break; - case 2: - mesq l("Don't worry, third time is the charm. Here is some experience. Let's try again."); - break; - case 3: - mesq l("Okay, here is some experience, and forgot what I've said before. We can try again."); - break; - case 4: - mesq l("Don't worry, I've tweaked my formula this time. Here is some experience and let's try again!"); - break; - case 5: - mesq l("I'm sorry, I just... Maybe if...? Aha! Here's the EXP, ready for a next go?"); - break; - case 6: - mesq l("Uhm, maybe I mashed the Plushroom too hard this time. Here's EXP as usual, let's try again?"); - break; - case 7: - mesq l("I shall not fail any further, I think my new formula is perfect! Here's the EXP, but I need material to use it!"); - break; - case 8: - mesq l("I never knew you could fail THAT hard. I've took Saulc's Fertilizer's recipe, success chance is of 100% if you want to try again."); - break; - default: - mesq l("Well, that could fail, I said. Here is some experience."); - break; - } - next; - if (countitem(Plushroom) >= 3 && - countitem(MaggotSlime) >= 9) - goto L_Craft; - mesn; - mesq l("Now go, and fetch the materials again. I'll make another fertilizer for you."); - close; - -L_Success: - mesn; - mesq l("WHAT? The farm is plagued with insects?!"); - next; - mesn; - mesq l("Quick, tell that to Hocus. No one is better at Nature Magic than Hocus, I'm sure he can help."); - close; - -L_Gift: - .@q2=getq2(TulimsharQuest_AnwarField); - if (.@q2 & 1) { - mesn; - mesq l("Thanks for the nice gift!"); - close; - } - // Tip. WHAT DID YOU DID WITH THE BOUND ITEM? IT SHOULD BE HARD TO GET RID OF IT... - if (countitem(SilverBell) < 1) { - mesn; - mesq l("Ah, I wish I got something for helping people out..."); - close; - } - mesn strcharinfo(0); - mesq l("Anwar sent you this, erm, hum... @@.", getitemlink(SilverBell)); - next; - setq2 TulimsharQuest_AnwarField, .@q2+1; - delitem SilverBell, 1; - getexp 95, 1; - mesn; - mesq l("WOW, THIS IS AWESOME! Many, many thanks!!"); - close; - -L_Lying: - mesn; - mesq l("Ah, so you think you can fool me?"); - next; - percentheal -5, -5; - warp "Save", 0, 0; - dispbottom l("Ah... Was I warped?"); - closedialog; - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/froma.txt b/npc/020-1/froma.txt deleted file mode 100644 index 8e232599..00000000 --- a/npc/020-1/froma.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Froma, a Legion Soldier besides the gate to Legion area. -// THIS IS A PLACEHOLDER! - -020-1,291,123,0 script Froma NPC_DEMON_MALE_LEGION_ARTIS,{ - speech - l("Fromage!"), - l("It is the only word in french I know. We are very classy."), - l("So if you want, you can hunt something, or cook something, or craft somethig."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/harper.txt b/npc/020-1/harper.txt deleted file mode 100644 index 104c2f47..00000000 --- a/npc/020-1/harper.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Harper, a Sailor helping Joelin. -// THIS IS A PLACEHOLDER! - -020-1,191,150,0 script Harper NPC_ADRIAN,{ - speech - l("Hello!"), - l("Ever saw a Captain without a ship?"), - l("<--- I am with stupid."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/hocus.txt b/npc/020-1/hocus.txt deleted file mode 100644 index fcfbe73c..00000000 --- a/npc/020-1/hocus.txt +++ /dev/null @@ -1,166 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Hocus, the Nature Mage and Academy Grandmaster. More interested in food than in nature magic, sometimes. -// "Hocus: the mages here? They just think they work for me, they never understod that i am just one of them.. no idea why they follow me" -// THIS IS A PLACEHOLDER! - -020-1,73,91,0 script Hocus NPC_MAGE_BROWN,{ - function anwarNotMe; - function anwarFirstAid; - function anwarGift; - - setq2 TonoriQuest_Kylian, getq2(TonoriQuest_Kylian) | KYLIAN_HOCUS; - speech - l("Hi!"), - l("You should eat more salad. I see in your face that your nutrition is not good."), - l("Can you bug Jesusalva? I really would like to teach you something."); - if (getq(HurnscaldQuests_Rossy) == 8) { - next; - mesn; - mesq l("I see you are helping the little girl, Rossy I believe? Her profesor, Mr. David, is on the west wing of the magic academy building."); - } - next; - select - rif(getq(General_Cooking) == 15, l("Please enlighten me, O Grandmaster, where can I find Salad to improve my eating habits?")), - rif(getq(General_Cooking) == 16, l("I've brought you the promised.")), - rif(getq(TulimsharQuest_AnwarField) == 1, l("Hello, do you make Fertility Potions?")), - rif(getq(TulimsharQuest_AnwarField) == 7, l("HELP! Anwar field is under worm attack!!")), - rif(getq(TulimsharQuest_AnwarField) == 10, l("Anwar sent you a gift.")), - l("Thanks for your wise words."); - mes ""; - switch (@menu) { - /* Food Questline */ - case 1: - mesn; - mesq l("Here. But you probably won't be coming here to eat all the time, so I will teach you a salad recipe."); - next; - select - l("Do you need some monster killed?"), - l("Do you need some sort of item?"), - l("Do you need money?"); - mes ""; - mesn; - mesq l("Hm, not really..."); - next; - mesn strcharinfo(0); - // FIXME: Carrot Cake? Really?? - mesq l("I'll bring you 6 %s, 6 %s, and a %s just wait here. I'll also clean up all monsters on the proximity and pay you 1000 E. Wait for my return, Grandmaster!", getitemlink(RoastedAcorn), getitemlink(Carrot), getitemlink(CarrotCake)); - setq1 General_Cooking, 16; - break; - case 2: - if (countitem(RoastedAcorn) < 6 || - countitem(Carrot) < 6 || - countitem(CarrotCake) < 1 || - Zeny < 1000) { - mesn strcharinfo(0); - mesc l("I promised to bring him 6 %s, 6 %s, and a %s. I also promised clean up all monsters on the proximity and pay him 1000 E. I'll make the Grandmaster proud!", getitemlink(RoastedAcorn), getitemlink(Carrot), getitemlink(CarrotCake)); - close; - } - mesn; - mesq l("Child, I do not need your money nor your items. I told you I would teach you the recipe. It is free."); - next; - mesn; - mesq l("I am already happy enough that you want to improve your own eating habits. You don't need to give me anything."); - next; - mesn; - mesq l("Besides, helping each other, even without a compensation is a good thing and accepting help is nothing to be ashamed of. Here. Go in peace, child."); - // FIXME: Probably wrong recipe - RECIPES[CraftBlueberryCake]=true; - RECIPES[CraftCarrotCake]=true; - getitem BlueberryCake, 1; - setq1 General_Cooking, 17; - break; - // Anwar Quest - case 3: - anwarNotMe(); - break; - case 4: - anwarFirstAid(); - break; - case 5: - anwarGift(); - break; - } - close; - -function anwarNotMe { - mesn strcharinfo(0); - mesq l("Hello Mr. Hocus, kind sir Anwar sent me to fetch some fertilizers to save Tulimshar from famine, if you may?"); - next; - mesn; - mesq l("Sorry kind friend @@, but no.", strcharinfo(0)); - next; - mesn; - mesq l("Or rather, I can't. I would love to help you, just like everybody else, but I don't know how to make fertilizers, only Salad."); - next; - mesn; - mesq l("Eomie probably could do that, she is young but very talented. If you help her, she'll likely help you back."); - setq TulimsharQuest_AnwarField, 2; - return; -} - -function anwarFirstAid { - mesn; - mesq l("The crops are under attack? That's terrible!"); - next; - mesn; - mesq l("I can do a Certified Purification Potion right away, the warranty covers it. But I still need a few things for it!"); - next; - mesn; - mesq l("Do you, perchance, have 2 @@, 2 @@ and 3 @@?", getitemlink(LeftScorpionClaw), getitemlink(RightScorpionClaw), getitemlink(Moss)); - if (askyesno() != ASK_YES) - close; - mes ""; - - if (countitem(LeftScorpionClaw) < 2 || - countitem(RightScorpionClaw) < 2 || - countitem(Moss) < 3) { - mesn; - mesq l("Why are you lying? We must cooperate with each other if we want to strive. Otherwise, just like the plants, we will wither and die out. Go fetch the items!"); - close; - } - - inventoryplace PurificationPotion, 1; - delitem LeftScorpionClaw, 2; - delitem RightScorpionClaw, 2; - delitem Moss, 3; - getitembound(PurificationPotion, 1, IBT_CHARACTER); - setq TulimsharQuest_AnwarField, 8; - - mesn; - mesq l("Quick, deliver this to Anwar!"); - return; -} - -function anwarGift { - .@q2=getq2(TulimsharQuest_AnwarField); - if (.@q2 & 2) { - mesn; - mesq l("Thanks for the nice gift!"); - close; - } - // Tip. WHAT DID YOU DID WITH THE BOUND ITEM? IT SHOULD BE HARD TO GET RID OF IT... - if (countitem(SilverBell) < 1) { - mesn; - mesq l("Ah, I wish I got something for helping people out..."); - close; - } - mesn strcharinfo(0); - mesq l("Anwar sent you this, erm, hum... @@.", getitemlink(SilverBell)); - next; - setq2 TulimsharQuest_AnwarField, .@q2+2; - delitem SilverBell, 1; - getexp 75, 10; - mesn; - mesq l("WOW, THIS IS AWESOME! Many, many thanks!!"); - return; -} - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-1/inar.txt b/npc/020-1/inar.txt deleted file mode 100644 index 0611eeb6..00000000 --- a/npc/020-1/inar.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Inar, a saleswoman in Tulimshar Market. -// THIS IS A PLACEHOLDER! - -020-1,212,171,0 script Inar NPC_SABINE,{ - speech - l("Hi there."), - l("You wonder why here are so many idle market stalls, right?"), - l("This is due to lazyness of Micksha to prepare placeholders."), - l("So, see you later when we have something to sell here."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/issay.txt b/npc/020-1/issay.txt deleted file mode 100644 index 968e58c5..00000000 --- a/npc/020-1/issay.txt +++ /dev/null @@ -1,15 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Issay the Barber. -// THIS IS A PLACEHOLDER! - -020-1,227,179,0 script Issay the Barber NPC_GUMI_THE_DYER,{ - Barber(); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/itka.txt b/npc/020-1/itka.txt deleted file mode 100644 index 9ca9fb50..00000000 --- a/npc/020-1/itka.txt +++ /dev/null @@ -1,48 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Itka, the spammy spammy little girl in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,194,175,0 script Itka NPC_GIRL_MILLY,{ - speech - l("Hi there."), - l("Come to the bakery! Come to the Market! Come to Prison!"), - l("I will improve, promised. Come to the Academy! Come to Oasis!"); - do - { - next; - select - l("Where is the bakery?"), - l("Where is the market?"), - l("Where is the prison?"), - l("Where is the academy?"), - l("Where is the oasis?"), - l("Why are you doing this?"), - l("Okay... Spammy little girl."); - mes ""; - switch (@menu) { - case 1: - case 2: - case 3: - case 4: - case 5: - mesn; - mesq l("I don't know! %%Q"); - break; - case 6: - mesn; - mesq l("To pay my studies!"); - break; - default: - close; - break; - } - } while (true); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/joaquim.txt b/npc/020-1/joaquim.txt deleted file mode 100644 index 83c90596..00000000 --- a/npc/020-1/joaquim.txt +++ /dev/null @@ -1,201 +0,0 @@ -// The Mana World Script, ported from Moubootaur Legends -// TMW2 Script, ported from TMW-BR -// TMW2 Author: Jesusalva -// -// Creator: Cardinalli -// Review: Lunovox -// -// Description: -// A rather easy quest to give players what to kill. -// Reward: -// Mouboo pendant + 20% exp of level 55 - -020-1,95,133,4 script Joaquim NPC_MAGE_BLUE,{ - function joaquimTooWeak; - function joaquimWeak; - function joaquimComplete; - function joaquimFinish; - function joaquimDoIt; - function joaquimReturn; - function joaquimRecipe; - function joaquimFound; - function joaquimMissing; - function joaquimStart; - - .@q=getq(TonoriQuest_Joaquim); - if (BaseLevel < 36) joaquimTooWeak(); - if (BaseLevel < 55) joaquimWeak(); - switch (.@q) { - case 0: joaquimStart(); break; - case 1: joaquimFound(); break; - case 2: joaquimReturn(); break; - case 3: joaquimDoIt(); break; - case 4: joaquimFinish(); break; - default: joaquimComplete(); break; - } - close; - -function joaquimTooWeak { - mesn; - mesq l("Hmm, why can't I find swamp yellowherb here in the desert...?"); - close; -} - -function joaquimWeak { - mesn; - .@r=rand2(1,5); - switch (.@r) { - case 1: - mesq l("Watch out! My wife was gravely wounded the other day. Tonori monsters are no child play!"); - break; - case 2: - mesq l("Ah, I hate mushrooms. Perhaps in future, I could use their spikes and mushies."); - break; - case 3: - mesq l("Ah, I hate snakes. Perhaps in future, I could use their tongues."); - break; - case 4: - mesq l("Ah, I love mouboos. But their steaks, hmm. Ah, no, I shouldn't eat that..."); - break; - case 5: - mesq l("You should never sell your Cactus Drinks. They have many uses."); - break; - } - close; -} - -function joaquimComplete { - mesn; - mesq l("Thanks for helping my wife, I'll be forever grateful."); - return; -} - -function joaquimFinish { - inventoryplace ElixirOfLife, 1, MoubooPendant, 1; - getitem ElixirOfLife, 1; - getitem MoubooPendant, 1; - quest_xp(.maxLevel, 39260); - quest_jxp(.maxLevel, 75); - setq TonoriQuest_Joaquim, 5; - mesn; - mesq l("Take this spare @@ I did. It heals fully and instantly, so don't hesit to use it if you're about to die.", getitemlink(ElixirOfLife)); - next; - mesn; - mesq l("Thanks for helping my wife! Here is, an %s. May the Mouboo watch over you! o.o", getitemlink(MoubooPendant)); - return; -} - -function joaquimDoIt { - mesn; - mesq l("Please help my wife Yumi, on the Clinic!"); - return; -} - -// Quest Core -function joaquimStart { - mesn; - mesq l("Ohhhhh..... Please, help me!!! My wife is gravely wounded!!"); - next; - mesn strcharinfo(0); - mesq l("Calm down! How can I help you?"); - next; - mesn; - mesq l("My grandmother gave me a recipe of the %s, it can cure anything but death.", getitemlink(ElixirOfLife)); - next; - mesn; - mesq l("I don't remember what I need now, but if you give me a moment, I'll get the list."); - setq TonoriQuest_Joaquim, 1; - return; -} - -function joaquimFound { - mesn; - mesq l("I can make an %s, I still have a bottle of fairy blood, a few mana pearls, and some other rare ingredients.", getitemlink(ElixirOfLife)); - mesq l("It is the non-rare ingredients I actually need help with!"); - next; - joaquimRecipe(); - next; - select - l("I will do it, don't worry."), - rif(countitem(ElixirOfLife), l("I have one here...")), - l("Ahh, too many items. Sorry."); - mes ""; - mesn; - if (@menu == 1) { - mes l("Thanks! Thanks! Savior! Hurry up!"); - setq TonoriQuest_Joaquim, 2; - } else if (@menu == 2) { - mes l("Uhm, sorry, I don't trust stuff you get at market. You know."); - mes l("Full of agrotoxins, transgenics and whatever. Not safe."); - } else { - mes l("Oh noes, who nows can help my wife? Please reconsider!"); - } - return; -} - -function joaquimReturn { - joaquimRecipe(); - next; - select - l("I'll be back later with all ingredients."), - l("They're with me."); - mes ""; - if (@menu == 1) - close; - - if (countitem(CactusDrink) < 100 || - countitem(HardSpike) < 60 || - countitem(SmallMushroom) < 45 || - countitem(SnakeTongue) < 40 || - countitem(BottleOfWater) < 30 || - countitem(BugLeg) < 20 || - countitem(MoubooSteak) < 15) - joaquimMissing(); - - inventoryplace ElixirOfLife, 1; - - delitem CactusDrink, 100; - delitem HardSpike, 60; - delitem SmallMushroom, 45; - delitem SnakeTongue, 40; - delitem BottleOfWater, 30; - delitem BugLeg, 20; - delitem MoubooSteak, 15; - getitem ElixirOfLife, 1; - setq TonoriQuest_Joaquim, 3; - mesn; - mesq l("Thanks, I'll just bake the Elixir right away...!"); - next; - mesc l("%s goes away for a while and returns briefly.", .name$); - next; - mesn; - mesq l("Here, take the Elixir. Please, bring it to my wife! I am counting on you!!"); - return; -} - -function joaquimMissing { - mesn strcharinfo(0); - mesq l("Except they're not. I'll be back later."); - next; - mesn; - mesq l("Please, %s! Hurry up!", strcharinfo(0)); - close; -} - -function joaquimRecipe { - mesn l("%s Recipe", getitemlink(ElixirOfLife)); - mesc l("%d/%d %s", countitem(CactusDrink), 100, getitemlink(CactusDrink)); - mesc l("%d/%d %s", countitem(HardSpike), 60, getitemlink(HardSpike)); - mesc l("%d/%d %s", countitem(SmallMushroom), 45, getitemlink(SmallMushroom)); - mesc l("%d/%d %s", countitem(SnakeTongue), 40, getitemlink(SnakeTongue)); - mesc l("%d/%d %s", countitem(BottleOfWater), 30, getitemlink(BottleOfWater)); - mesc l("%d/%d %s", countitem(BugLeg), 20, getitemlink(BugLeg)); - mesc l("%d/%d %s", countitem(MoubooSteak), 15, getitemlink(MoubooSteak)); - return; -} - -OnInit: - .maxLevel = 75; - .distance = 5; - end; -} diff --git a/npc/020-1/joelin.txt b/npc/020-1/joelin.txt deleted file mode 100644 index 820fe276..00000000 --- a/npc/020-1/joelin.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Joelin, the broken, shipless Captain in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,189,150,0 script Joelin NPC_JOELIN,{ - speech - l("Hello!"), - l("Do you know the story of the Fleet of Aemil? I also want to discover new Lands."), - l("But I do not have a ship. Ah, right, and no script."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/jossy.txt b/npc/020-1/jossy.txt deleted file mode 100644 index 45440fd8..00000000 --- a/npc/020-1/jossy.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Jossy, another Brotherhood Member in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,180,87,0 script Jossy NPC_HUMAN_MALE_BROTHERHOOD,{ - speech - l("Hi!"), - l("I don't want to talk to you."), - l("Here, talk to my hand."); - heal -100, 0; - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/mahoud.txt b/npc/020-1/mahoud.txt deleted file mode 100644 index 2ad43518..00000000 --- a/npc/020-1/mahoud.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Mahoud, a scammer and a troll besides the Tulimshar Graveyard. -// THIS IS A PLACEHOLDER! - -020-1,180,169,0 script Mahoud NPC_YOUNG_MAN_KFAHR,{ - speech - l("Hey, you!"), - l("Got something to bury? I need some job, and I need some money."), - l("Ah, wait, we cannot trade anything without some developer. Go find one!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/malivox.txt b/npc/020-1/malivox.txt deleted file mode 100644 index 583574c5..00000000 --- a/npc/020-1/malivox.txt +++ /dev/null @@ -1,23 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Malivox, a salesman in Tulimshar Market. -// THIS IS A PLACEHOLDER! - -020-1,241,170,0 script Malivox NPC_KPG_MANAGER,{ - speech - l("Hi there."), - l("You wonder why here are so many idle market stalls, right?"), - l("This is due to lazyness of Micksha to prepare placeholders."), - l("Don't steal stuff from them, though. Or you will be imprisoned."), - l("What I sell? Well, you can see Mananas... Aquadas... Croc claws..."), - l("But they are not for sale! I use them for my custom brew of status reset potions. Are you interested?"); - - ConfirmStatusReset(); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/mapflags.txt b/npc/020-1/mapflags.txt new file mode 100755 index 00000000..b722e682 --- /dev/null +++ b/npc/020-1/mapflags.txt @@ -0,0 +1,2 @@ +//020-1 mapflag town +//020-1 mapflag resave 020-1,52,118 diff --git a/npc/020-1/marikel.txt b/npc/020-1/marikel.txt deleted file mode 100644 index 2619e6fe..00000000 --- a/npc/020-1/marikel.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Marikel, another Brotherhood Guard protecting the bridge. -// THIS IS A PLACEHOLDER! - -020-1,163,118,0 script Marikel NPC_HUMAN_MALE_BROTHERHOOD,{ - speech - l("Hi!"), - l("You come from Hurnscald? Oh, did you meet my Grandpa there? Is she fine?"), - l("Tell him greetings, and give him a few beers from me once you return there."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/marine.txt b/npc/020-1/marine.txt deleted file mode 100644 index 65a08adc..00000000 --- a/npc/020-1/marine.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Moubootaur Legends scripts. -// Authors: -// Jesusalva -// Description: -// This script controls access to Ships, fixing variables. - -// Use NPC_LA_MARINE if needed -020-1,210,143,0 script La Marine#T NPC_HIDDEN,0,0,{ - end; - -OnTouch: - EnterTown("Tulim"); - - warp "marine@"+LOCATION$, 42, 26; - closedialog; - close; -} diff --git a/npc/020-1/martha.txt b/npc/020-1/martha.txt deleted file mode 100644 index 2faf9dd3..00000000 --- a/npc/020-1/martha.txt +++ /dev/null @@ -1,18 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Martha, sort of Brotherhood Leader in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,164,81,0 script Martha NPC_UKAR_FEMALE_BROTHERHOOD,{ - speech - l("Hi!"), - l("Have you ever been to Artis? Did you meet my mom there? Her name is Sophialla."), - l("I hope she is fine. It is so dangerous out there."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/neko.txt b/npc/020-1/neko.txt deleted file mode 100644 index 92460cf7..00000000 --- a/npc/020-1/neko.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Neko, the Trader in Legion area in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,278,99,0 script Neko NPC_DESERT_HAT_MAN,{ - speech - l("Hi there."), - l("I am out of stock, unfortunately."), - l("What do you mean to look at my wares?!"), - l("My collection of random stuff is not for sale! Go away!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/nickos.txt b/npc/020-1/nickos.txt deleted file mode 100644 index fb4c61be..00000000 --- a/npc/020-1/nickos.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Nickos, a free soldier working with Nickos on protecting the town from mine mobs. -// THIS IS A PLACEHOLDER! - -020-1,78,237,0 script Nickos NPC_NICKOS,{ - speech - l("Hi there."), - l("Sorry, for now you cannot enter. We sealed the entrance to avoid a monster flood."), - l("Come back later, perhaps you can help keeping things under control."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/noke.txt b/npc/020-1/noke.txt deleted file mode 100644 index 74337640..00000000 --- a/npc/020-1/noke.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Noke, the Trader in Brotherhood area in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-1,171,80,0 script Noke NPC_DESERT_HAT_MAN,{ - speech - l("Hi there."), - l("Everyone wants a slice of Tulimshar."), - l("So it is hard to know my role on this world."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/odonell.txt b/npc/020-1/odonell.txt deleted file mode 100644 index 186929ed..00000000 --- a/npc/020-1/odonell.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// O'Donell, a member of Thieves Guild protecting their Cave's entrance. -// THIS IS A PLACEHOLDER! - -020-1,157,157,0 script O'Donell NPC_HENRY,{ - speech - l("Psst!"), - l("Did you already meet Nunia, in Woodland? If you bring me a stolen good, I will let you inside our Thieves Guild Headquarters."), - l("If you don't - well, go play hide'n'seek with Itka. Her spam annoys me anyways."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/philip.txt b/npc/020-1/philip.txt deleted file mode 100644 index 9b575a8c..00000000 --- a/npc/020-1/philip.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Philip, a Legion Soldier besides the gate to Legion area. -// THIS IS A PLACEHOLDER! - -020-1,285,123,0 script Philip NPC_UKAR_MALE_LEGION_ARTIS,{ - speech - l("Hi there."), - l("I am just a random soldier, so stop bothering me."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/popaul.txt b/npc/020-1/popaul.txt deleted file mode 100644 index 94ed4dcf..00000000 --- a/npc/020-1/popaul.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Popaul, a Legion Soldier in Legion area of Tulim. -// THIS IS A PLACEHOLDER! - -020-1,278,108,0 script Popaul NPC_HUMAN_MALE_LEGION_ARTIS,{ - speech - l("Hi there."), - l("I am so lazy today. I wish work hours end soon."), - l("Then I'll have a drink with my friends at the inn."), - l("Won't be able to walk properly afterwards, but whatever, I get experience either way!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/pusco.txt b/npc/020-1/pusco.txt deleted file mode 100644 index 2fc15879..00000000 --- a/npc/020-1/pusco.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Pusco, the Fire Mage. Still outside, to be moved to the cave (with some lava) later (TM). -// THIS IS A PLACEHOLDER! - -020-1,87,122,0 script Pusco NPC_MAGE_RED,{ - speech - l("Hi!"), - l("Fire, I love fire! Its so powerful! It even comes with particle effects most of the time!"), - l("Can you bug Jesusalva? I really would like to teach you something."); - close; - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-1/rockscissor.txt b/npc/020-1/rockscissor.txt new file mode 100755 index 00000000..384ee9a8 --- /dev/null +++ b/npc/020-1/rockscissor.txt @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/npc/020-1/ryan.txt b/npc/020-1/ryan.txt deleted file mode 100644 index 7ed14715..00000000 --- a/npc/020-1/ryan.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Ryan, a Legion Soldier near the Docks. -// THIS IS A PLACEHOLDER! - -020-1,275,97,0 script Ryan NPC_DEMON_MALE_LEGION_ARTIS,{ - speech - l("hmmm..."), - l("You were in Hurnscald lately, right? That smell, that Brotherhood smell."), - l("Better get out of here, before I become wild."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/sander.txt b/npc/020-1/sander.txt deleted file mode 100644 index 5eac3386..00000000 --- a/npc/020-1/sander.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Sander, a free soldier working with Nickos on protecting the town from mine mobs. -// THIS IS A PLACEHOLDER! - -020-1,200,203,0 script Sander NPC_SANDER,{ - speech - l("Hi there."), - l("I will send you to the mines! Later, when we have clearance for the mines, that is."), - l("Tell Micksha to get up his ass for mapping desert caves, maybe this will speed it up."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/soul-menhir.txt b/npc/020-1/soul-menhir.txt new file mode 100755 index 00000000..7075fdcf --- /dev/null +++ b/npc/020-1/soul-menhir.txt @@ -0,0 +1,15 @@ + +020-1,63,89,0 script Soul Menhir#nivalis NPC346,{ + @map$ = "020-1"; + setarray @Xs, 62, 63, 64, 62, 64, 62, 64; + setarray @Ys, 88, 88, 88, 89, 89, 90, 90; + @x = 0; + @y = 0; + callfunc "SoulMenhir"; + @map$ = ""; + cleararray @Xs[0], 0, 7; + cleararray @Ys[0], 0, 7; + @x = 0; + @y = 0; + close; +} diff --git a/npc/020-1/tindris.txt b/npc/020-1/tindris.txt deleted file mode 100644 index e35acc2d..00000000 --- a/npc/020-1/tindris.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Tindris, a mage apprentice on the way to magic academy. Twice. It is magic. -// THIS IS A PLACEHOLDER! - -020-1,44,196,0 script Tindris#1 NPC_SIMON,{ - speech - l("Hi!"), - l("Past here, the neutral area of the Magic Academy of Tulimshar starts."), - l("Don't dare to use any violence against peaceful beings, or you will be punished."); - close; - -OnInit: - .distance = 4; - end; -} - -020-1,46,133,0 script Tindris#2 NPC_SIMON,{ - speech - l("Hi!"), - l("Past here, the neutral area of the Magic Academy of Tulimshar starts."), - l("Don't dare to use any violence against peaceful beings, or you will be punished."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-1/traveler.txt b/npc/020-1/traveler.txt new file mode 100755 index 00000000..68dc9403 --- /dev/null +++ b/npc/020-1/traveler.txt @@ -0,0 +1,6 @@ +020-1,57,123,0 script Knox the Traveler NPC103,{ + @npcname$ = "Knox"; + @NpcTravelBit = $@nivalis_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/020-1/vaspina.txt b/npc/020-1/vaspina.txt deleted file mode 100644 index 7e5b76bd..00000000 --- a/npc/020-1/vaspina.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Vaspina the Harmony Mage. -// THIS IS A PLACEHOLDER! - -020-1,91,112,0 script Vaspina NPC_MORGAN,{ - speech - l("Hi!"), - l("Pst, not so loud. You frighten the animals here."), - l("You were told to not harm peaceful beings in the Academy, right? Please strictly follow that rule."); - close; - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-1/wateranimation.txt b/npc/020-1/wateranimation.txt deleted file mode 100644 index a539a944..00000000 --- a/npc/020-1/wateranimation.txt +++ /dev/null @@ -1,20 +0,0 @@ -// The Mana World scripts. -// Description: -// Water animations, splash, fishes, etc... - -020-1,103,141,0 duplicate(#fish_seawater) #tulim_fish01 NPC_WATER_SPLASH -020-1,98,144,0 duplicate(#fish_seawater) #tulim_fish02 NPC_WATER_SPLASH -020-1,94,148,0 duplicate(#fish_seawater) #tulim_fish03 NPC_WATER_SPLASH -020-1,181,70,0 duplicate(#fish_seawater) #tulim_fish04 NPC_WATER_SPLASH -020-1,191,94,0 duplicate(#fish_seawater) #tulim_fish05 NPC_WATER_SPLASH -020-1,182,117,0 duplicate(#fish_seawater) #tulim_fish06 NPC_WATER_SPLASH -020-1,187,126,0 duplicate(#fish_seawater) #tulim_fish07 NPC_WATER_SPLASH -020-1,227,159,0 duplicate(#fish_seawater) #tulim_fish08 NPC_WATER_SPLASH -020-1,238,158,0 duplicate(#fish_seawater) #tulim_fish09 NPC_WATER_SPLASH -020-1,247,146,0 duplicate(#fish_seawater) #tulim_fish10 NPC_WATER_SPLASH -020-1,257,127,0 duplicate(#fish_seawater) #tulim_fish11 NPC_WATER_SPLASH -020-1,263,126,0 duplicate(#fish_seawater) #tulim_fish12 NPC_WATER_SPLASH -020-1,268,87,0 duplicate(#fish_seawater) #tulim_fish13 NPC_WATER_SPLASH -020-1,217,155,0 duplicate(#fish_seawater) #tulim_fish14 NPC_WATER_SPLASH -020-1,295,74,0 duplicate(#fish_seawater) #tulim_fish15 NPC_WATER_SPLASH - diff --git a/npc/020-1/well.txt b/npc/020-1/well.txt new file mode 100755 index 00000000..4146200a --- /dev/null +++ b/npc/020-1/well.txt @@ -0,0 +1,103 @@ + +020-1,99,83,0 script #Well NPC400,{ + if(QL_WELL == 2) goto L_Finished; + + mes "..."; + menu + "Throw something in the well.", L_Throw, + "Leave it alone.", L_close; + +L_Throw: + mes "What do you want to throw?"; + + setarray @response_list$, "Yuck! Who threw that on me?", "Ouch! Who's hurting me?", "White powder!? What's going on up there?", "It's raining in Nivalis?!"; + setarray @item_list$, "MaggotSlime", "RawLog", "PileOfAsh", "BottleOfWater"; + menu + "Maggot slime", L_CheckItem, + "A raw log", L_CheckItem, + "Pile of ash", L_CheckItem, + "Bottle of water", L_CheckItem, + "Leave it alone", L_close; + +L_CheckItem: + @index = @menu - 1; + @response$ = @response_list$[@index]; + @item$ = @item_list$[@index]; + + mes @item$; + + if(countitem(@item$) == 0) + goto L_MissingItem; + delitem @item$, 1; + + if(@item$ == "BottleOfWater") + getitem "EmptyBottle", 1; + + mes "[Mysterious voice inside the well]"; + mes "\"" + @response$ + "\""; + next; + menu + "Who are you?", L_Who, + "How did you get down there?", L_How, + "Do you need help?", L_Help; + +L_Who: + @response$ = "I'll talk about who I am after leaving the well. "; + goto L_GetHelp; + +L_How: + @response$ = "Well, someone pushed me into the well, I'm not sure who. "; + goto L_GetHelp; + +L_Help: + @response$ = "I certainly can't get out on my own. "; + goto L_GetHelp; + +L_GetHelp: + mes "[Mysterious voice inside the well]"; + mes "\"" + @response$ + "So if you can get some help for me... please do so!\""; + QL_WELL = 1; + + cleararray @response_list$, "", 4; + cleararray @item_list$, "", 4; + @index = 0; + @response$ = ""; + + goto L_close; + +L_MissingItem: + mes "You can't throw something you don't have."; + goto L_close; + +L_Finished: + mes "This is a well."; + goto L_close; + +L_close: + close; +} + +020-2,100,28,0 script Miler NPC100,{ + mes "[Miler]"; + mes "\"Hello!\""; + + if(QL_WELL != 1) goto L_close; + menu + "Hello.", L_close, + "Hello, Can you help me?", L_Help; + +L_Help: + mes "[Miler]"; + mes "\"What's the problem?\""; + menu "Someone fell into the well.", L_Next; + +L_Next: + mes "[Miler]"; + mes "\"Ho! I'll help him!\""; + getexp (BaseLevel * 111), 0; + QL_WELL = 2; + goto L_close; + +L_close: + close; +} diff --git a/npc/020-2-0/_import.txt b/npc/020-2-0/_import.txt deleted file mode 100644 index 368dffce..00000000 --- a/npc/020-2-0/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-0: Ratto Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-0/_mobs.txt", -"npc/020-2-0/_warps.txt", -"npc/020-2-0/kaizer.txt", diff --git a/npc/020-2-0/_mobs.txt b/npc/020-2-0/_mobs.txt deleted file mode 100644 index dd5d42ba..00000000 --- a/npc/020-2-0/_mobs.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-0: Ratto Hut mobs -020-2-0,40,22,0,0 monster Ratto 1005,1,5000,10000 -020-2-0,35,29,0,0 monster Ratto 1005,1,5000,10000 -020-2-0,41,36,0,0 monster Ratto 1005,1,5000,10000 diff --git a/npc/020-2-0/_warps.txt b/npc/020-2-0/_warps.txt deleted file mode 100644 index 8dcdbe87..00000000 --- a/npc/020-2-0/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-0: Ratto Hut warps -020-2-0,36,41,0 warp #020-2-0_36_41 0,0,020-1,169,136 diff --git a/npc/020-2-0/kaizer.txt b/npc/020-2-0/kaizer.txt deleted file mode 100644 index 0b8819a0..00000000 --- a/npc/020-2-0/kaizer.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Kaizer, the guy in the Rat Hut. -// THIS IS A PLACEHOLDER! - -020-2-0,34,33,0 script Kaizer NPC_OLD_MAN_HURNS,{ - speech - l("Welcome to my palace!"), - l("Not a palace? What? Are you blind?!?"), - l("You better should leave, ofc after helping me kill those annoying rats. That is an order."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-1/_import.txt b/npc/020-2-1/_import.txt deleted file mode 100644 index d410e471..00000000 --- a/npc/020-2-1/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-1: Brotherhood Castle -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-1/_warps.txt", diff --git a/npc/020-2-1/_warps.txt b/npc/020-2-1/_warps.txt deleted file mode 100644 index 88307a19..00000000 --- a/npc/020-2-1/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-1: Brotherhood Castle warps -020-2-1,35,39,0 warp #020-2-1_35_39 0,0,020-1,140,72 -020-2-1,47,37,0 warp #020-2-1_47_37 0,0,020-1,146,71 -020-2-1,36,29,0 warp #020-2-1_36_29 2,0,020-2-2,32,28 diff --git a/npc/020-2-10/_import.txt b/npc/020-2-10/_import.txt deleted file mode 100644 index 0f59e421..00000000 --- a/npc/020-2-10/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-10: Tailor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-10/_warps.txt", -"npc/020-2-10/hetchel.txt", diff --git a/npc/020-2-10/_warps.txt b/npc/020-2-10/_warps.txt deleted file mode 100644 index 099f754a..00000000 --- a/npc/020-2-10/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-10: Tailor warps -020-2-10,45,33,0 warp #020-2-10_45_33 0,0,020-1,264,153 -020-2-10,34,33,0 warp #020-2-10_34_33 0,0,020-1,259,153 diff --git a/npc/020-2-10/hetchel.txt b/npc/020-2-10/hetchel.txt deleted file mode 100644 index faed2b99..00000000 --- a/npc/020-2-10/hetchel.txt +++ /dev/null @@ -1,33 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Hetchel, the silk weaver / tailor in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-2-10,45,27,0 script Hetchel NPC_HETCHEL,{ - setq2 TonoriQuest_Kylian, getq2(TonoriQuest_Kylian) | KYLIAN_HETCHEL; - speech - l("Hi there. I am Hetchel, I weave fine textiles."), - l("My best client is Lora Tay, at Dimond's."), - l("So if you want, you can talk to her instead."), - l("Tailoring is in decline and I have nothing to sell nor teach."), - l("Unless you want to try doing it yourself?"); - next; - do - { - mes ""; - .@s = SmithSystem(CRAFT_TAILORING); - if (.@s) - mesc l("Success!"), 3; - else - mesc l("That didn't work!"), 1; - next; - mesc l("Do you want to continue?"); - } while (askyesno() != ASK_YES); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-11/_import.txt b/npc/020-2-11/_import.txt deleted file mode 100644 index b3a212c8..00000000 --- a/npc/020-2-11/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-11: Ramshackle Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-11/_warps.txt", diff --git a/npc/020-2-11/_warps.txt b/npc/020-2-11/_warps.txt deleted file mode 100644 index e6c771a5..00000000 --- a/npc/020-2-11/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-11: Ramshackle Hut warps -020-2-11,38,32,0 warp #020-2-11_38_32 0,0,020-1,294,149 diff --git a/npc/020-2-12/_import.txt b/npc/020-2-12/_import.txt deleted file mode 100644 index f95de8cc..00000000 --- a/npc/020-2-12/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-12: Small Garden Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-12/_warps.txt", diff --git a/npc/020-2-12/_warps.txt b/npc/020-2-12/_warps.txt deleted file mode 100644 index 76cedf4e..00000000 --- a/npc/020-2-12/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-12: Small Garden Hut warps -020-2-12,38,32,0 warp #020-2-12_38_32 0,0,020-1,295,164 diff --git a/npc/020-2-13/_import.txt b/npc/020-2-13/_import.txt deleted file mode 100644 index a962abca..00000000 --- a/npc/020-2-13/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-13: Large Garden Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-13/_warps.txt", diff --git a/npc/020-2-13/_warps.txt b/npc/020-2-13/_warps.txt deleted file mode 100644 index ac853a91..00000000 --- a/npc/020-2-13/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-13: Large Garden Hut warps -020-2-13,40,32,0 warp #020-2-13_40_32 0,0,020-1,290,158 diff --git a/npc/020-2-14/_import.txt b/npc/020-2-14/_import.txt deleted file mode 100644 index 2a32c09c..00000000 --- a/npc/020-2-14/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-14: Small Slum Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-14/_warps.txt", diff --git a/npc/020-2-14/_warps.txt b/npc/020-2-14/_warps.txt deleted file mode 100644 index 4165732b..00000000 --- a/npc/020-2-14/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-14: Small Slum Hut warps -020-2-14,42,34,0 warp #020-2-14_42_34 0,0,020-1,279,169 diff --git a/npc/020-2-15/_import.txt b/npc/020-2-15/_import.txt deleted file mode 100644 index fba37df5..00000000 --- a/npc/020-2-15/_import.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Map 020-2-15: Tulimshar Clinic -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-15/_warps.txt", -"npc/020-2-15/eleanore.txt", -"npc/020-2-15/kadiya.txt", -"npc/020-2-15/memoriam.txt", -"npc/020-2-15/yumi.txt", diff --git a/npc/020-2-15/_warps.txt b/npc/020-2-15/_warps.txt deleted file mode 100644 index 7e260483..00000000 --- a/npc/020-2-15/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-15: Tulimshar Clinic warps -020-2-15,45,33,0 warp #020-2-15_45_33 0,0,020-1,267,182 diff --git a/npc/020-2-15/eleanore.txt b/npc/020-2-15/eleanore.txt deleted file mode 100644 index f650d96e..00000000 --- a/npc/020-2-15/eleanore.txt +++ /dev/null @@ -1,16 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Elenaore the Healer (aka. Elanore) -// THIS IS A PLACEHOLDER! - -020-2-15,43,27,0 script Eleanore NPC_REBECCA,{ - mesn; - mesq l("Please do not disturb the patients."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-15/kadiya.txt b/npc/020-2-15/kadiya.txt deleted file mode 100644 index 3b25d619..00000000 --- a/npc/020-2-15/kadiya.txt +++ /dev/null @@ -1,21 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Kadiya, Omar's sick daughter -// THIS IS A PLACEHOLDER! - -020-2-15,39,26,0 script Kadiya NPC_TANISHA,{ - mesn; - mesc l("*cough cough*"); - mesq l("Hello there."); - next; - mesn; - mesc l("*cough cough*"); - mesq l("Have you seen my father Omar? I bet Micksha took him to drink."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-15/memoriam.txt b/npc/020-2-15/memoriam.txt deleted file mode 100644 index 041c659a..00000000 --- a/npc/020-2-15/memoriam.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Description: -// Irene Memorial - -020-2-15,41,25,0 script Memoriam NPC_PAPER_NOTE,{ - mes ".:: In Memoriam ::."; - mes ""; - mes "~ Irene Christina ~"; - mes l("The song in this clinic is dedicated to Irene."); - next; - mes l("She had seen only twenty hours of this world when she died in her father's arms."); - close; - -OnInit: - .distance = 3; - end; -} diff --git a/npc/020-2-15/yumi.txt b/npc/020-2-15/yumi.txt deleted file mode 100644 index 5a5e7f0d..00000000 --- a/npc/020-2-15/yumi.txt +++ /dev/null @@ -1,54 +0,0 @@ -// TMW2 Script -// Author: Jesusalva -// Description: -// Joaquim's wife. -// TODO sprite on the bed - -020-2-15,33,26,0 script Yumi NPC_EOMIE,{ - .@q=getq(TonoriQuest_Joaquim); - if (.@q > 3) goto L_PostAid; - if (.@q == 3) goto L_DoIt; - if (BaseLevel > 36) goto L_PreAid; - - mesn; - mesq l("Hello. Take care with the Snakes, they're highly poisonous!"); - close; - -L_PreAid: - mesn; - mesq l("Please... Speak low... I am dying........"); - next; - mesn; - mesq l("The nurse... Eleanore is... Doing all she can... To help me, though."); - close; - -L_PostAid: - mesn; - mesq l("Ah, I am lively again. I wish I could just raise from this bed and do some exercise, but Eleanore refuses to let me go."); - // There could be another quest stage her - close; - -L_DoIt: - if (countitem(ElixirOfLife) < 1) - goto L_PreAid; - - inventoryplace ElixirOfLife, 1; - delitem ElixirOfLife, 1; - quest_xp(.maxLevel, 1000); - setq TonoriQuest_Joaquim, 4; - mesc l("*gulp* *gulp* *gulp*"); - next; - mesn; - mesq l("AAAAAAAHHHHH, Thanks, I am lively again!"); - next; - mesn; - mesq l("In fact, I am cured! Hooray!!"); - close; - -OnInit: - .minLevel = 36; - .maxLevel = 66; - - .distance = 5; - end; -} diff --git a/npc/020-2-16/_import.txt b/npc/020-2-16/_import.txt deleted file mode 100644 index e73eda08..00000000 --- a/npc/020-2-16/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-16: Slum Laundry -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-16/_warps.txt", diff --git a/npc/020-2-16/_warps.txt b/npc/020-2-16/_warps.txt deleted file mode 100644 index 6eef2fbf..00000000 --- a/npc/020-2-16/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-16: Slum Laundry warps -020-2-16,31,25,0 warp #020-2-16_31_25 0,0,020-1,269,173 diff --git a/npc/020-2-17/_import.txt b/npc/020-2-17/_import.txt deleted file mode 100644 index 3b44100e..00000000 --- a/npc/020-2-17/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-17: Fisherman's Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-17/_warps.txt", diff --git a/npc/020-2-17/_warps.txt b/npc/020-2-17/_warps.txt deleted file mode 100644 index 4675eb7e..00000000 --- a/npc/020-2-17/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-17: Fisherman's Hut warps -020-2-17,40,27,0 warp #020-2-17_40_27 0,0,020-1,254,166 diff --git a/npc/020-2-18/_import.txt b/npc/020-2-18/_import.txt deleted file mode 100644 index 1898daec..00000000 --- a/npc/020-2-18/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-18: Market Administration -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-18/_warps.txt", -"npc/020-2-18/inya.txt", diff --git a/npc/020-2-18/_warps.txt b/npc/020-2-18/_warps.txt deleted file mode 100644 index be5cc0b7..00000000 --- a/npc/020-2-18/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-18: Market Administration warps -020-2-18,45,34,0 warp #020-2-18_45_34 0,0,020-1,225,191 -020-2-18,35,34,0 warp #020-2-18_35_34 0,0,020-1,219,191 diff --git a/npc/020-2-18/inya.txt b/npc/020-2-18/inya.txt deleted file mode 100644 index 7a347faa..00000000 --- a/npc/020-2-18/inya.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Inya, the jewelery lady in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-2-18,35,25,0 script Inya NPC_INYA,{ - speech - l("Hi there."), - l("Gold, Silver, Copper, Platinum. Got anything of that with you?"), - l("Just throw it on the ground in here, and bring more."), - l("Perhaps one day I will reward you with a few buglegs or such, don't worry."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-19/_import.txt b/npc/020-2-19/_import.txt deleted file mode 100644 index 85597f7c..00000000 --- a/npc/020-2-19/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-19: Farmer's Home -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-19/_warps.txt", diff --git a/npc/020-2-19/_warps.txt b/npc/020-2-19/_warps.txt deleted file mode 100644 index 08a82dd8..00000000 --- a/npc/020-2-19/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-19: Farmer's Home warps -020-2-19,40,27,0 warp #020-2-19_40_27 0,0,020-1,200,187 diff --git a/npc/020-2-2/_import.txt b/npc/020-2-2/_import.txt deleted file mode 100644 index 7f33c28e..00000000 --- a/npc/020-2-2/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-2: Brotherhood Tower -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-2/_warps.txt", diff --git a/npc/020-2-2/_warps.txt b/npc/020-2-2/_warps.txt deleted file mode 100644 index faa57616..00000000 --- a/npc/020-2-2/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-2: Brotherhood Tower warps -020-2-2,32,29,0 warp #020-2-2_32_29 2,0,020-2-1,36,30 -020-2-2,37,21,0 warp #020-2-2_37_21 0,0,020-1,140,59 diff --git a/npc/020-2-20/_import.txt b/npc/020-2-20/_import.txt deleted file mode 100644 index 8bc63945..00000000 --- a/npc/020-2-20/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-20: Tulimshar Inn -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-20/_warps.txt", -"npc/020-2-20/drabur.txt", -"npc/020-2-20/riskim.txt", diff --git a/npc/020-2-20/_warps.txt b/npc/020-2-20/_warps.txt deleted file mode 100644 index 3508873e..00000000 --- a/npc/020-2-20/_warps.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-20: Tulimshar Inn warps -020-2-20,49,38,0 warp #020-2-20_49_38 0,0,020-1,202,169 -020-2-20,35,38,0 warp #020-2-20_35_38 0,0,020-1,194,169 -020-2-20,33,22,0 warp #020-2-20_33_22 0,0,020-2-24,32,24 -020-2-20,37,21,0 warp #020-2-20_37_21 0,0,020-2-34,37,41 diff --git a/npc/020-2-20/drabur.txt b/npc/020-2-20/drabur.txt deleted file mode 100644 index 8ebbb979..00000000 --- a/npc/020-2-20/drabur.txt +++ /dev/null @@ -1,54 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Drabur, the baker's salesman. -// THIS IS A PLACEHOLDER! - -020-2-20,47,30,0 script Drabur NPC_GENERAL_STORE,{ - mesn; - mesq l("Please don't interrupt my work, I am busy."); - next; - select - l("Hi there."), - l("Do you sell anything here?"), - l("Could I lodge here?"), - l("Goodbye."); - mes ""; - switch (@menu) { - case 1: - mesn; - mesq l("..."); - break; - case 2: - mesn; - mesq l("Sure - take a look."); - next; - closeclientdialog; - shop .name$; - break; - case 3: - mesn; - mesq l("Sorry, we've booked our only room to a foreigner called Kylian."); - next; - mesn; - mesq l("And we got rid of the extra beds as no one was using them, so we are full at the moment. Come again later."); - break; - } - close; - -OnInit: - .distance = 4; - tradertype(NST_MARKET); - - sellitem BlueberryCake, -1, 1+rand2(10); - sellitem CarrotCake, -1, 1+rand2(10); - sellitem Donut, -1, 1+rand2(10); - end; - -OnClock0002: - restoreshopitem BlueberryCake, rand2(11); - restoreshopitem CarrotCake, rand2(11); - restoreshopitem Donut, rand2(11); - end; -} diff --git a/npc/020-2-20/riskim.txt b/npc/020-2-20/riskim.txt deleted file mode 100644 index f68b9825..00000000 --- a/npc/020-2-20/riskim.txt +++ /dev/null @@ -1,152 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Riskim, the baker in Tulimshar. -// THIS IS A PLACEHOLDER! - -020-2-20,49,30,0 script Riskim NPC_CHEF_LEGACY,{ - function foodQuestline; - .@q=getq(General_Cooking); - speech - l("Hi there."), - l("Need a Donut?"), - l("Well, tell me the recipe and I will bake for you whatever you need, for a small fee."), - l("But: No recipe, no desserts."); - if (.@q > 10) - foodQuestline; - close; - -function foodQuestline { - .@q=getq(General_Cooking); - .@q2=getq2(General_Cooking); - mes ""; - select - rif(.@q == 11, l("Aww, but I was hoping to learn a recipe!")), - rif(.@q >= 14, l("I needed Acorn Flour.")), - rif(.@q >= 14, l("Do you need acorn flour yourself?")), - rif(.@q >= 14, l("I want to cook!")), - l("=("); - mes ""; - switch (@menu) { - case 1: - mesn; - mesq l("What? Get out of here you noob. The recipes are the pride of this inn-bakery and I'm not going to give them away just because you asked."); - next; - mesn; - mesq l("Besides, I already have an apprentice - He should be cleaning the basement at this moment, including."); - next; - mesn; - mesq l("Get out of my face and don't say that again."); - setq1 General_Cooking, 12; - break; - case 2: - mesn; - mesq l("Only the best %s can make fine recipes.", getitemlink(AcornFlour)); - next; - mesn; - mesq l("I'm willing to make you one flour for each %d %s you bring me. Three for you, and two as commission.", 5, getitemlink(Acorn)); - next; - mesn; - mesq l("So, how many do you want?"); - menuint - rif(countitem(Acorn) >= 5, l("I want %d", 1)), 1, - rif(countitem(Acorn) >= 25, l("I want %d", 5)), 5, - rif(countitem(Acorn) >= 50, l("I want %d", 10)), 10, - rif(countitem(Acorn) >= 125, l("I want %d", 25)), 25, - rif(countitem(Acorn) >= 250, l("I want %d", 50)), 50, - rif(countitem(Acorn) >= 500, l("I want %d", 100)), 100, - rif(countitem(Acorn) >= 5, l("As many as you can.")), countitem(Acorn)/5, - l("Ehrm, none, thanks."), 0; - mes ""; - if (!@menuret) - break; - inventoryplace AcornFlour, @menuret; - delitem Acorn, @menuret*5; - getitem AcornFlour, @menuret; - mesn; - mesq l("Here you go. A pleasure doing business with you."); - break; - case 3: - // DailyQuest(lvl, cost, count, item) - DailyQuest(20, 3, 1, AcornFlour); - break; - case 4: - mesn; - mesq l("My charge is %d E per batch.", .price); - if (Zeny < .price) - break; - next; - do - { - mes "##B" + l("Drag and drop the items from your inventory in the frames.") + "##b"; - - // Crafting skin with 4 columns - setskin "craft4"; - .@var$ = requestcraft(4); // Limit: 4 items - .@craft = initcraft(.@var$); - .@entry = findcraftentry(.@craft, CRAFT_COOKING); - setskin ""; - - // Does the recipe exist and is a sandwich? - if (.@entry < 0) - { - narrator - l("You don't know how any recipe with that."), - l("Do you want to try again?"); - if (askyesno() == ASK_YES) - .@tryAgain=true; - else - .@tryAgain=false; - } - else - { - // Did player cheat? If not, proceed with the craft - if (!validatecraft(.@craft)) - { - narrator - l("Where are the ingredients?"); - .@tryAgain=true; - } - else - { - // Even if the recipe is right, if you don't have it on your - // recipe book, it should be deemed invalid. - if (RECIPES[.@entry]) - { - usecraft .@craft; - narrator - l("Done!"), - l("Do you want to try again?"); - } - else - { - narrator - l("You don't know how any recipe with that."), - l("Do you want to try again?"); - } - - if (askyesno() == ASK_YES) - .@tryAgain=true; - else - .@tryAgain=false; - } - } - - // Clear unused variables and clear the screen. - deletecraft .@craft; - Zeny-=.price; - if (Zeny < .price) - .@tryAgain = false; - clear; - } while (.@tryAgain); - break; - } - return; -} - -OnInit: - .distance = 4; - .price = 120; - end; -} diff --git a/npc/020-2-21/_import.txt b/npc/020-2-21/_import.txt deleted file mode 100644 index 99dcb741..00000000 --- a/npc/020-2-21/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-21: Queer Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-21/_warps.txt", diff --git a/npc/020-2-21/_warps.txt b/npc/020-2-21/_warps.txt deleted file mode 100644 index 00ea811f..00000000 --- a/npc/020-2-21/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-21: Queer Hut warps -020-2-21,40,27,0 warp #020-2-21_40_27 0,0,020-1,161,147 diff --git a/npc/020-2-22/_import.txt b/npc/020-2-22/_import.txt deleted file mode 100644 index dec610b2..00000000 --- a/npc/020-2-22/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-22: Residence -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-22/_warps.txt", diff --git a/npc/020-2-22/_warps.txt b/npc/020-2-22/_warps.txt deleted file mode 100644 index 944911c8..00000000 --- a/npc/020-2-22/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-22: Residence warps -020-2-22,42,33,0 warp #020-2-22_42_33 0,0,020-1,153,132 -020-2-22,33,24,0 warp #020-2-22_33_24 0,0,020-2-25,32,24 -020-2-22,51,24,0 warp #020-2-22_51_24 0,0,020-2-25,42,24 diff --git a/npc/020-2-23/_import.txt b/npc/020-2-23/_import.txt deleted file mode 100644 index bf53aaa9..00000000 --- a/npc/020-2-23/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-23: Brotherhood Inn First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-23/_warps.txt", diff --git a/npc/020-2-23/_warps.txt b/npc/020-2-23/_warps.txt deleted file mode 100644 index e1f1e502..00000000 --- a/npc/020-2-23/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-23: Brotherhood Inn First Floor warps -020-2-23,33,29,0 warp #020-2-23_33_29 1,0,020-1,163,73 -020-2-23,38,24,0 warp #020-2-23_38_24 0,0,020-2-3,46,26 diff --git a/npc/020-2-24/_import.txt b/npc/020-2-24/_import.txt deleted file mode 100644 index b4fa1e73..00000000 --- a/npc/020-2-24/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-24: Tulimshar Inn First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-24/_warps.txt", -"npc/020-2-24/kylian.txt", diff --git a/npc/020-2-24/_warps.txt b/npc/020-2-24/_warps.txt deleted file mode 100644 index 619469f5..00000000 --- a/npc/020-2-24/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-24: Tulimshar Inn First Floor warps -020-2-24,33,29,0 warp #020-2-24_33_29 1,0,020-1,194,163 -020-2-24,31,24,0 warp #020-2-24_31_24 0,0,020-2-20,33,23 diff --git a/npc/020-2-24/kylian.txt b/npc/020-2-24/kylian.txt deleted file mode 100644 index 0b1bce37..00000000 --- a/npc/020-2-24/kylian.txt +++ /dev/null @@ -1,130 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Rich merchant -// Variables: -// TonoriQuest_Kylian -// q1 - State of the Quest -// q2 - "Know" mask -// q3 - Timer to return - -020-2-24,35,24,0 script Kylian NPC_KPG_MANAGER,{ - function kylianLuggage; - function kylianGiveLuggage; - function kylianLicense; - .@q=getq(TonoriQuest_Kylian); - switch (.@q) { - case 0: - kylianLuggage(); - break; - case 1: - mesn; - mesq l("Please show Adrian the luggage ticket I gave you."); - break; - case 2: - kylianGiveLuggage(); - break; - case 3: - kylianLicense(); - break; - default: - mesn; - mesq l("I wish to take a nap now, so please do not disturb me."); - break; - } - close; - -function kylianLuggage { - // Insert lore babbling here - mesn; - mesq l("Ah! Are you the room service? I have some requests."); - next; - select - l("Sure... What can I do for you?"), - l("No, I'm not!"); - mes ""; - if (@menu == 2) { - mesn; - mesq l("Too bad. Would you be interested in earning some quick money with some errands regardless?"); - next; - select - l("I'm a great adventurer! I don't do petty errands."), - l("No. I'm busy."), - l("Well... OK."); - mes ""; - if (@menu != 3) - return; - } - mesn; - mesq l("I need you to get my luggage from the docks. Just show this paper to the sailor who's watching the luggage."); - mesc l("%s gives you his ticket, which you promptly store in a safe pocket outside of your inventory.", .name$); - setq1 TonoriQuest_Kylian, 1; - next; - mesn; - mesq l("I'll be waiting your return."); - return; -} - -function kylianGiveLuggage { - if (!countitem(Suitcase)) { - mesn; - mesq l("Please come back with my %s.", getitemlink(Suitcase)); - return; - } - mesn; - mesq l("Did you get my luggage from the docks?"); - select - l("Here it is."), - l("Don't worry; I'm on my way."); - mes ""; - if (@menu == 2) - return; - delitem Suitcase, 1; - quest_gp(.maxLevel, 100); - quest_item(.maxLevel, Acorn, 12); - setq1 TonoriQuest_Kylian, 3; - mesn; - mesq l("Ah! Very good. I have some urgent paperwork that I've been needing to attend to."); - next; - mesn; - mesq l("Before you go, I also happen to have some acorns left over from my trip. You can have them if you wish; they're rather tasty."); - mesc l("He gives you some money and acorns."); - next; - mesn; - mesq l("If, however, you don't like them, you could take them to the %s. I heard they use them to make a special kind of flour.", b(l("Tulimshar bakery"))); - next; - kylianLicense(); - return; -} - -function kylianLicense { - mesn; - mesq l("I'm a merchant and came to Tulimshar because I'm thinking about establishing a shop here."); - next; - mesn; - mesq l("While I'm going through my papers, could you find out whom I have to talk to about opening up a shop in this city?"); - if (!(getq2(TonoriQuest_Kylian) & KYLIAN_YANIS)) - return; - next; - select - l("You need to go and talk to Yanis in the government building."), - l("I'll see what I can do."); - mes ""; - if (@menu == 2) - return; - mesc l("You explain Kylian how to reach the Townhall."); - next; - quest_gp(.maxLevel, 50); - setq1 TonoriQuest_Kylian, 4; - setq3 TonoriQuest_Kylian, gettimetick(2)+900; // 15 minutes - mesn; - mesq l("Ah... excellent! That's very helpful. I need to prepare my papers now. I might have some more questions later on though."); - return; -} - -OnInit: - .maxLevel = 35; - .distance = 4; - end; -} diff --git a/npc/020-2-25/_import.txt b/npc/020-2-25/_import.txt deleted file mode 100644 index c6d2cf19..00000000 --- a/npc/020-2-25/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-25: Residence First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-25/_warps.txt", diff --git a/npc/020-2-25/_warps.txt b/npc/020-2-25/_warps.txt deleted file mode 100644 index 878a7b7d..00000000 --- a/npc/020-2-25/_warps.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-25: Residence First Floor warps -020-2-25,33,29,0 warp #020-2-25_33_29 1,0,020-1,149,129 -020-2-25,31,24,0 warp #020-2-25_31_24 0,0,020-2-22,33,25 -020-2-25,43,24,0 warp #020-2-25_43_24 0,0,020-2-22,51,25 -020-2-25,42,29,0 warp #020-2-25_42_29 1,0,020-1,157,129 diff --git a/npc/020-2-26/_import.txt b/npc/020-2-26/_import.txt deleted file mode 100644 index bf3dda11..00000000 --- a/npc/020-2-26/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-26: Magic Academy Ground Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-26/_warps.txt", -"npc/020-2-26/receptionist.txt", diff --git a/npc/020-2-26/_warps.txt b/npc/020-2-26/_warps.txt deleted file mode 100644 index b9ad76db..00000000 --- a/npc/020-2-26/_warps.txt +++ /dev/null @@ -1,9 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-26: Magic Academy Ground Floor warps -020-2-26,44,42,0 warp #020-2-26_44_42 0,0,020-1,49,116 -020-2-26,34,49,0 warp #020-2-26_34_49 0,0,020-1,41,119 -020-2-26,58,46,0 warp #020-2-26_58_46 1,0,020-1,58,118 -020-2-26,71,44,0 warp #020-2-26_71_44 0,0,020-1,67,117 -020-2-26,53,27,0 warp #020-2-26_53_27 1,0,020-2-27,33,26 -020-2-26,76,33,0 warp #020-2-26_76_33 0,2,020-2-29,34,25 -020-2-26,32,37,0 warp #020-2-26_32_37 0,2,020-2-30,43,21 diff --git a/npc/020-2-26/receptionist.txt b/npc/020-2-26/receptionist.txt deleted file mode 100644 index f177d5f3..00000000 --- a/npc/020-2-26/receptionist.txt +++ /dev/null @@ -1,21 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Receptionist in Magic Academy. -// THIS IS A PLACEHOLDER! - -020-2-26,59,32,0 script Receptionist NPC_REBECCA,{ - speech - l("Hi!"), - l("This is the magic academy. If all those mages were not so absentminded, they could make some furniture."), - l("But oh well, people have different priorities it seems. Ask Micksha."); - // if (something) ask about enrolling - Hocus Quest - close; - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-2-27/_import.txt b/npc/020-2-27/_import.txt deleted file mode 100644 index 527b9e60..00000000 --- a/npc/020-2-27/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-27: Magic Acedemy Central, First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-27/_warps.txt", diff --git a/npc/020-2-27/_warps.txt b/npc/020-2-27/_warps.txt deleted file mode 100644 index 5654eb94..00000000 --- a/npc/020-2-27/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-27: Magic Acedemy Central, First Floor warps -020-2-27,33,27,0 warp #020-2-27_33_27 2,0,020-2-26,52,28 -020-2-27,46,22,0 warp #020-2-27_46_22 2,0,020-2-28,42,22 diff --git a/npc/020-2-28/_import.txt b/npc/020-2-28/_import.txt deleted file mode 100644 index cbdcd407..00000000 --- a/npc/020-2-28/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-28: Magic Acedemy Central, Second Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-28/_warps.txt", -"npc/020-2-28/pauline.txt", diff --git a/npc/020-2-28/_warps.txt b/npc/020-2-28/_warps.txt deleted file mode 100644 index bb588fb5..00000000 --- a/npc/020-2-28/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-28: Magic Acedemy Central, Second Floor warps -020-2-28,43,23,0 warp #020-2-28_43_23 2,0,020-2-27,46,24 -020-2-28,34,33,0 warp #020-2-28_34_33 0,0,020-1,56,108 -020-2-28,42,33,0 warp #020-2-28_42_33 0,0,020-1,60,108 diff --git a/npc/020-2-28/pauline.txt b/npc/020-2-28/pauline.txt deleted file mode 100644 index 72b47959..00000000 --- a/npc/020-2-28/pauline.txt +++ /dev/null @@ -1,39 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Pauline, the War Mage. -// THIS IS A PLACEHOLDER! - -020-2-28,36,20,0 script Pauline NPC_PAULINE,{ - speech - l("Hi!"), - l("Should I tell you the secret of a good fight?"), - l("CONFRONT AND DESTROY!! (Don't tell your parents I said that."); - select - l("You're weird, I have to go sorry."), - l("I can't do that, I keep getting killed."); - mes ""; - if (@menu == 1) - close; - mesn; - mesq l("Oh no! Well, I never said to confront alone. Did you try going with friends?"); - next; - if (askyesno() == ASK_NO) { - mesn; - mesq l("Then you should do that. It is always more fun with friends."); - close; - } - mesn; - mesq l("Ah... Then maybe you should summon a monster to your aid, or hire a mercenary."); - next; - mesn; - mesq l("Hold tight. Hire a mercenary? That was not in the script. Please call Jesusalva ASAP."); - close; - -OnInit: - .distance = 4; - end; -} - - diff --git a/npc/020-2-29/_import.txt b/npc/020-2-29/_import.txt deleted file mode 100644 index f6d5a319..00000000 --- a/npc/020-2-29/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-29: Magic Acedemy East, First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-29/_warps.txt", diff --git a/npc/020-2-29/_warps.txt b/npc/020-2-29/_warps.txt deleted file mode 100644 index 385b2b03..00000000 --- a/npc/020-2-29/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-29: Magic Acedemy East, First Floor warps -020-2-29,33,25,0 warp #020-2-29_33_25 0,2,020-2-26,75,34 -020-2-29,53,34,0 warp #020-2-29_53_34 0,0,020-1,87,115 diff --git a/npc/020-2-3/_import.txt b/npc/020-2-3/_import.txt deleted file mode 100644 index 12378155..00000000 --- a/npc/020-2-3/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-3: Brotherhood Inn -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-3/_warps.txt", -"npc/020-2-3/inac.txt", diff --git a/npc/020-2-3/_warps.txt b/npc/020-2-3/_warps.txt deleted file mode 100644 index 027b732e..00000000 --- a/npc/020-2-3/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-3: Brotherhood Inn warps -020-2-3,45,34,0 warp #020-2-3_45_34 0,0,020-1,166,78 -020-2-3,46,25,0 warp #020-2-3_46_25 0,0,020-2-23,37,24 diff --git a/npc/020-2-3/inac.txt b/npc/020-2-3/inac.txt deleted file mode 100644 index 8966c68d..00000000 --- a/npc/020-2-3/inac.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Inac, a Brotherhood member inside their hut. -// THIS IS A PLACEHOLDER! - -020-2-3,41,26,0 script Inac NPC_RAIJIN_MALE_BROTHERHOOD,{ - speech - l("Hi!"), - l("Can you help me? It is so dark, and smelly, in here."), - l("I urgently need a bottle of fresh air."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-30/_import.txt b/npc/020-2-30/_import.txt deleted file mode 100644 index 97b89ffd..00000000 --- a/npc/020-2-30/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-30: Magic Acedemy West, First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-30/_warps.txt", -"npc/020-2-30/david.txt", diff --git a/npc/020-2-30/_warps.txt b/npc/020-2-30/_warps.txt deleted file mode 100644 index bddd1648..00000000 --- a/npc/020-2-30/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-30: Magic Acedemy West, First Floor warps -020-2-30,44,21,0 warp #020-2-30_44_21 0,2,020-2-26,33,38 diff --git a/npc/020-2-30/david.txt b/npc/020-2-30/david.txt deleted file mode 100644 index 03bf19f9..00000000 --- a/npc/020-2-30/david.txt +++ /dev/null @@ -1,42 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// David is the head of Alchemy class in the Magic Academy - -020-2-30,36,24,0 script David NPC_MAGE_BLUE,{ - function rossyPotion; - mesn; - mesq l("Hello there. I am David, head of alchemy in the magic academy."); - next; - mesn; - mesq l("If you are not a student, please leave the premises at once."); - if (getq(HurnscaldQuests_Rossy) == 8) - rossyPotion(); - close; - -function rossyPotion { - next; - select - l("Alright, I'll be going."), - l("Actually, Rossy told me to deliver a potion to you."); - mes ""; - if (@menu == 1) - return; - mesn; - mesq l("Ah, just in time. I asked Hocus' to send a letter; the deadline was coming up soon."); - next; - mesn; - mesq l("It seems okay-ish, I guess? Okay-ish is enough. Anyway, I'll analyze it and grade fairly. You can tell her that."); - next; - mesn; - mesq l("And unless you are a student, I'll have to ask you to leave the premises."); - setq HurnscaldQuests_Rossy, 9; - return; -} - -OnInit: - .distance = 4; - end; -} - diff --git a/npc/020-2-31/_import.txt b/npc/020-2-31/_import.txt deleted file mode 100644 index da30659a..00000000 --- a/npc/020-2-31/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-31: Lighthouse Ground Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-31/_warps.txt", diff --git a/npc/020-2-31/_warps.txt b/npc/020-2-31/_warps.txt deleted file mode 100644 index b7c6e28c..00000000 --- a/npc/020-2-31/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-31: Lighthouse Ground Floor warps -020-2-31,36,20,0 warp #020-2-31_36_20 2,0,020-2-32,36,28 -020-2-31,34,32,0 warp #020-2-31_34_32 0,0,020-1,71,57 diff --git a/npc/020-2-32/_import.txt b/npc/020-2-32/_import.txt deleted file mode 100644 index 8d34c469..00000000 --- a/npc/020-2-32/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-32: Lighthouse First Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-32/_warps.txt", diff --git a/npc/020-2-32/_warps.txt b/npc/020-2-32/_warps.txt deleted file mode 100644 index f66179a2..00000000 --- a/npc/020-2-32/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-32: Lighthouse First Floor warps -020-2-32,36,29,0 warp #020-2-32_36_29 2,0,020-2-31,36,22 -020-2-32,36,20,0 warp #020-2-32_36_20 2,0,020-2-33,36,28 diff --git a/npc/020-2-33/_import.txt b/npc/020-2-33/_import.txt deleted file mode 100644 index c65039f6..00000000 --- a/npc/020-2-33/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-33: Lighthouse Second Floor -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-33/_warps.txt", diff --git a/npc/020-2-33/_warps.txt b/npc/020-2-33/_warps.txt deleted file mode 100644 index 4b8ce343..00000000 --- a/npc/020-2-33/_warps.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-33: Lighthouse Second Floor warps -020-2-33,36,29,0 warp #020-2-33_36_29 2,0,020-2-32,36,22 -020-2-33,37,21,0 warp #020-2-33_37_21 0,0,020-1,71,44 diff --git a/npc/020-2-34/_import.txt b/npc/020-2-34/_import.txt deleted file mode 100644 index 2a823164..00000000 --- a/npc/020-2-34/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-34: Tulimshar Casino -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-34/_warps.txt", -"npc/020-2-34/casino.txt", -"npc/020-2-34/donutello.txt", diff --git a/npc/020-2-34/_warps.txt b/npc/020-2-34/_warps.txt deleted file mode 100644 index 2a4a162e..00000000 --- a/npc/020-2-34/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-34: Tulimshar Casino warps -020-2-34,37,40,0 warp #020-2-34_37_40 0,0,020-2-20,37,22 diff --git a/npc/020-2-34/casino.txt b/npc/020-2-34/casino.txt deleted file mode 100644 index 06d25fc4..00000000 --- a/npc/020-2-34/casino.txt +++ /dev/null @@ -1,17 +0,0 @@ -// Tulimshar Inn Casino -// Author: -// Jesusalva - -020-2-34,33,22,0 duplicate(Slot Machine) Slot Machine#T1 NPC_HASAN - -020-2-34,45,22,0 duplicate(High Lower) Gambler#T1 NPC_HUMAN_MALE_BROTHERHOOD - -// Hot point for Kylian's Quest -020-2-34,37,34,0 script #HeyCasino NPC_HIDDEN,0,0,{ - end; -OnTouch: - // TODO: "Donutello : Hey stop there! You are underlevel, you cannot enter!" - setq2 TonoriQuest_Kylian, getq2(TonoriQuest_Kylian) | KYLIAN_CASINO; - end; -} - diff --git a/npc/020-2-34/donutello.txt b/npc/020-2-34/donutello.txt deleted file mode 100644 index 8ff494d8..00000000 --- a/npc/020-2-34/donutello.txt +++ /dev/null @@ -1,166 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Donutello is the Donut Apprentice - -020-2-34,33,48,0 script Donutello NPC_CHEF_LEGACY,{ - function foodQuestline; - - // Instance behavior - if (instance_id() > 0) { - npctalk3 l("Time remaining: %s" , FuzzyTime(@tinner)); - end; - } - - mesn; - mesq l("Why are you here? Only staff and VIP are supposed to go down here."); - - .@q=getq(General_Cooking); - if (.@q > 11) - foodQuestline(); - - close; - -function foodQuestline { - .@q=getq(General_Cooking); - .@q2=getq2(General_Cooking); - mes ""; - select - rif(.@q == 12, l("Can you teach me how to cook sweets?")), - rif(.@q == 13, l("Rattos killed. So, my recipe...")), - l("What is the area, anyway?"), - l("Erm, wrong door, sorry."); - mes ""; - switch (@menu) { - case 1: - mesn; - mesq l("What? But the recipes are the pride of Tulimshar Inn, and-- Oohhhh.... Maybe..."); - next; - mesn; - mesq l("Hey, I can teach the %s recipe. However...", getitemlink(Donut)); - next; - select - l("Oh no - I'm not your personal delivery guy! Bye bye!"), - l("Here we go again..."); - mes ""; - if (@menu == 1) - break; - mesn; - mesq l("I am scared of the rattos! And Riskim says that we cannot have rattos here, so he also wants me to kill them!! %%i"); - next; - mesn strcharinfo(0); - select - l("Sounds cliché, but okay, I'll help."), - l("They're just rattos?"); - mes ""; - mesn; - mesq l("Oh, but they aren't only fast - they're more vicious than common rattos, from all the sugar they eat. And if you take too long killing them, Riskim will hear and - things will turn out badly!"); - next; - mesc l("Accept quest?"), 1; - mesc l("Time limit: %s", l("2 minutes")); - .@mapn$="Tinn@"+getcharid(0); - if (askyesno() == ASK_NO) - break; - - if (instanceowner(@tinnst) != getcharid(3)) { - @tinnst = instance_create("T.INN "+getcharid(0), getcharid(3), IOT_CHAR); - instance_attachmap("020-2-34", @tinnst, false, .@mapn$); - instance_set_timeout(120, 120, @tinnst); - instance_init(@tinnst); - } else { - instance_set_timeout(120, 120, @tinnst); - } - @tinner = gettimetick(2) + 120; - killmonsterall(.@mapn$); - for (.@i = 0; .@i < 4; .@i++) { - .@mob=areamonster(.@mapn$, 32, 50, 52, 57, strmobinfo(1, Ratto), Ratto, 1, "Donutello::OnRattoKill"); - // Make them vicious - .@bhp= getunitdata(.@mob, UDT_MAXHP); - .@bat1=getunitdata(.@mob, UDT_ATKMIN); - .@bat2=getunitdata(.@mob, UDT_ATKMAX); - .@bhit=getunitdata(.@mob, UDT_HIT); - setunitdata(.@mob, UDT_MAXHP, .@bhp*22/10); - setunitdata(.@mob, UDT_HP, .@bhp*22/10); - setunitdata(.@mob, UDT_ATKMIN, .@bat1*27/10); - setunitdata(.@mob, UDT_ATKMAX, .@bat2*27/10); - setunitdata(.@mob, UDT_HIT, .@bhit*20); - } - warp .@mapn$, 37, 50; - dispbottom l("Time remaining: %s", FuzzyTime(@tinner)); - closeclientdialog; - close; - break; - case 2: - mesn; - mesq l("Phew, thanks %s. These rattos were going to be the ruin of me!", strcharinfo(0)); - next; - mesn; - mesq l("However, you must bring me %d %s, %d %s and %d %s. Because the ingredients are you!", - 6, getitemlink(AcornFlour), - 2, getitemlink(MoubooMilk), - 2, getitemlink(ChocolateBar)); - next; - mesn; - mesq l("Erm, Acorn Flour is made of mashed up acorns. %d Acorns make one flour. So, I'll accept the acorns instead of the flour as you helped me a lot.", 3); - next; - mesc l("Deliver the ingredients?"), 1; - mesf("- %d %s", 18, getitemlink(Acorn)); - mesf("- %d %s", 2, getitemlink(MoubooMilk)); - mesf("- %d %s", 2, getitemlink(ChocolateBar)); - mes ""; - if (askyesno() == ASK_NO) - break; - if (countitem(ChocolateBar) < 2 || - countitem(MoubooMilk) < 2 || - countitem(Acorn) < 18) - break; - inventoryplace Donut, 1; - delitem Acorn, 18; - delitem MoubooMilk, 2; - delitem ChocolateBar, 2; - setq1 General_Cooking, 14; - RECIPES[CraftDonut]=true; - getitem Donut, 1; - mesn; - mesq l("Great, thanks! If you need more flour you can ask Riskim. He also buys flour for a good price."); - next; - mesn; - mesq l("First divide the ingredients on two halves. Take the first half, mix them, bring the oven, and blablablablah...."); - next; - mesn; - mesq l("And after a while, you have %s! I made two with the ingredients you gave me, one for you and one for me. This is my thankyou for helping me out on the storeroom. Enjoy!", getitemlink(Donut)); - break; - case 3: - mesn; - mesq l("Up there is the Casino. Erm, it is totally legal, I swear."); - next; - mesn; - mesq l("Here is the storeroom, and... Hey! I don't need to answer you questions!!"); - break; - } - return; - -OnRattoKill: - if (!playerattached()) end; - // FIXME - Make sure this is an instanced map - //if (instance_id() < 1) end; - - if (mobcount(getmap(), "Donutello::OnRattoKill") <= 0) { - dispbottom l("I'm done with this."); - getmapxy(.@m$, .@x, .@y, 0); - setq1 General_Cooking, 13; - sleep2(1000); // Give you some time to loot - warp "020-2-34", .@x, .@y; - sleep2(500); // Give M+ some time to re-render everything - npctalk3 l("Thanks %s... I feel much safer now!", strcharinfo(0)); - } else { - dispbottom l("Rattos remaining: %d", mobcount(getmap(), "Donutello::OnRattoKill")); - } - end; -} - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-4/_import.txt b/npc/020-2-4/_import.txt deleted file mode 100644 index 5ff8744a..00000000 --- a/npc/020-2-4/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-4: Brotherhood Hut -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-4/_warps.txt", diff --git a/npc/020-2-4/_warps.txt b/npc/020-2-4/_warps.txt deleted file mode 100644 index 1a32b934..00000000 --- a/npc/020-2-4/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-4: Brotherhood Hut warps -020-2-4,35,29,0 warp #020-2-4_35_29 0,0,020-1,179,99 diff --git a/npc/020-2-5/_import.txt b/npc/020-2-5/_import.txt deleted file mode 100644 index e7e9087c..00000000 --- a/npc/020-2-5/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-5: Legion Castle -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-5/_warps.txt", -"npc/020-2-5/dausen.txt", -"npc/020-2-5/filipa.txt", diff --git a/npc/020-2-5/_warps.txt b/npc/020-2-5/_warps.txt deleted file mode 100644 index de006eac..00000000 --- a/npc/020-2-5/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-5: Legion Castle warps -020-2-5,34,31,0 warp #020-2-5_34_31 0,0,020-1,281,86 -020-2-5,45,38,0 warp #020-2-5_45_38 0,0,020-1,291,89 -020-2-5,46,21,0 warp #020-2-5_46_21 2,0,020-2-6,36,28 diff --git a/npc/020-2-5/dausen.txt b/npc/020-2-5/dausen.txt deleted file mode 100644 index 1354b636..00000000 --- a/npc/020-2-5/dausen.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Dausen, the Legion Lieutenant inside Legion HQ in Tulim. -// THIS IS A PLACEHOLDER! - -020-2-5,40,23,0 script Dausen NPC_HUMAN_MALE_CHIEF_ARTIS_LEGION,{ - speech - l("Hi there. I am lieutenant Dausen."), - l("Red Sands desert is dangerous at the moment, so we sealed it off."), - l("The mines are also on the risk of collapsing, so the workers had to be evacuated as well."), - l("I fear for the future of this town..."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-5/filipa.txt b/npc/020-2-5/filipa.txt deleted file mode 100644 index cbdd40e5..00000000 --- a/npc/020-2-5/filipa.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Filipa, a Legion Guard inside Legion HQ in Tulim. -// THIS IS A PLACEHOLDER! - -020-2-5,47,28,0 script Filipa NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ - speech - l("Hi there."), - l("This is no place for you, get moving!"), - l("If you want, you can hunt something, or cook something, or craft something."), - l("Whatever, just get out of here already!"); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-6/_import.txt b/npc/020-2-6/_import.txt deleted file mode 100644 index 82764d38..00000000 --- a/npc/020-2-6/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map 020-2-6: Legion Tower -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-6/_warps.txt", diff --git a/npc/020-2-6/_warps.txt b/npc/020-2-6/_warps.txt deleted file mode 100644 index 90ae3308..00000000 --- a/npc/020-2-6/_warps.txt +++ /dev/null @@ -1,5 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-6: Legion Tower warps -020-2-6,36,29,0 warp #020-2-6_36_29 2,0,020-2-5,46,22 -020-2-6,37,21,0 warp #020-2-6_37_21 0,0,020-1,289,72 -020-2-6,31,30,0 warp #020-2-6_31_30 0,0,020-1,289,81 diff --git a/npc/020-2-7/_import.txt b/npc/020-2-7/_import.txt deleted file mode 100644 index b4179bc5..00000000 --- a/npc/020-2-7/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map 020-2-7: Legion Guardhouse -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-7/_warps.txt", -"npc/020-2-7/manoli.txt", diff --git a/npc/020-2-7/_warps.txt b/npc/020-2-7/_warps.txt deleted file mode 100644 index c008e51d..00000000 --- a/npc/020-2-7/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-7: Legion Guardhouse warps -020-2-7,35,33,0 warp #020-2-7_35_33 0,0,020-1,293,107 diff --git a/npc/020-2-7/manoli.txt b/npc/020-2-7/manoli.txt deleted file mode 100644 index 578f0569..00000000 --- a/npc/020-2-7/manoli.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Manoli, a Legion Guard inside the Legion storage building. -// THIS IS A PLACEHOLDER! - -020-2-7,35,23,0 script Manoli NPC_HUMAN_FEMALE_LEGION_ARTIS,{ - speech - l("Hi there."), - l("Looks like someone ran out of ideas for placeholder NPCs."), - l("So if you want, you can hunt something, or cook something, or craft somethig."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-8/_import.txt b/npc/020-2-8/_import.txt deleted file mode 100644 index d7122dcb..00000000 --- a/npc/020-2-8/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-8: Tulimshar Blacksmith -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-8/_warps.txt", -"npc/020-2-8/heathin.txt", -"npc/020-2-8/jhedia.txt", diff --git a/npc/020-2-8/_warps.txt b/npc/020-2-8/_warps.txt deleted file mode 100644 index 1a0eaf03..00000000 --- a/npc/020-2-8/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-8: Tulimshar Blacksmith warps -020-2-8,35,33,0 warp #020-2-8_35_33 0,0,020-1,292,131 diff --git a/npc/020-2-8/heathin.txt b/npc/020-2-8/heathin.txt deleted file mode 100644 index 4880313e..00000000 --- a/npc/020-2-8/heathin.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// Heathin, Tulimshar's smith. -// THIS IS A PLACEHOLDER! - -020-2-8,36,23,0 script Heathin NPC_ANGUS_THE_SMITH,{ - speech - l("Hi there."), - l("Looks like someone ran out of ideas for placeholder NPCs."), - l("So if you want, you can bring me a hammer."), - l("Whatever."); - close; - -OnInit: - .distance = 2; - end; -} diff --git a/npc/020-2-8/jhedia.txt b/npc/020-2-8/jhedia.txt deleted file mode 100644 index ee412001..00000000 --- a/npc/020-2-8/jhedia.txt +++ /dev/null @@ -1,19 +0,0 @@ -// The Mana World scripts. -// Author: -// Micksha -// Description: -// Jhedia, Apprentice of Tulimshar's smith Heathin. -// THIS IS A PLACEHOLDER! - -020-2-8,42,24,0 script Jhedia NPC_YOUNG_MAN_IN_PINK,{ - speech - l("Hi there."), - l("Looks like someone ran out of ideas for placeholder NPCs."), - l("So if you want, you can bring Heathin a hammer."), - l("Whatever."); - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2-9/_import.txt b/npc/020-2-9/_import.txt deleted file mode 100644 index bd0771e3..00000000 --- a/npc/020-2-9/_import.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Map 020-2-9: Tulimshar Townhall -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/020-2-9/_warps.txt", -"npc/020-2-9/hydusun.txt", -"npc/020-2-9/yanis.txt", diff --git a/npc/020-2-9/_warps.txt b/npc/020-2-9/_warps.txt deleted file mode 100644 index d9a8afc5..00000000 --- a/npc/020-2-9/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 020-2-9: Tulimshar Townhall warps -020-2-9,44,37,0 warp #020-2-9_44_37 0,0,020-1,280,141 diff --git a/npc/020-2-9/hydusun.txt b/npc/020-2-9/hydusun.txt deleted file mode 100644 index c4f55b92..00000000 --- a/npc/020-2-9/hydusun.txt +++ /dev/null @@ -1,62 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Hydusun the Tulimshar storage guy. -// THIS IS A PLACEHOLDER! - -020-2-9,35,25,0 script Hydusun NPC_RICHARD_LEGACY,{ - // Storage/Banking function not unlocked in Artis - if (!getq(ArtisQuests_Lloyd)) { - speech - l("Oh hey!"), - l("I was supposed to act as storagekeeper, but I forgot my key."), - l("Come back later, perhaps I can find it."); - close; - } - mesn; - mesq l("Welcome to %s's Bank!", l($@BANK_TOWN$[.bankid])); - next; - - do - { - select - l("I would like to store some items."), - l("I would like to perform money transactions."), - l("Is there any request for me?"), - menuaction(l("Quit")); - - mes ""; - - switch (@menu) { - case 1: - mesn; - mesq l("Sure thing! I'll have your items transported here from Artis before you realize!"); - next; - closeclientdialog(); - openstorage(); - close; - case 2: - MerchantGuild_Bank(); - break; - case 3: - MerchantGuild_Quests(.bankid); - break; - default: - closeclientdialog; - goodbye; - close; - } - - } while (true); - close; - -OnInit: - .distance = 4; - - // Bank configuration - array_push($@BANK_NAME$, .name$); - array_push($@BANK_TOWN$, "Tulimshar"); - .bankid = getarraysize($@BANK_NAME$)-1; - end; -} diff --git a/npc/020-2-9/yanis.txt b/npc/020-2-9/yanis.txt deleted file mode 100644 index d5c8ea53..00000000 --- a/npc/020-2-9/yanis.txt +++ /dev/null @@ -1,18 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Yanis, town bureaucrat -// THIS IS A PLACEHOLDER! - -020-2-9,44,27,0 script Yanis NPC_ELVEN_MAN_STANDING,{ - setq2 TonoriQuest_Kylian, getq2(TonoriQuest_Kylian) | KYLIAN_YANIS; - mesn; - mesq l("Welcome. I'm handling issues with trading licenses for the shop owners in Tulimshar. Can I help you?"); - // TODO: Livio and mifristcher are working here so I'll not write this script. - close; - -OnInit: - .distance = 4; - end; -} diff --git a/npc/020-2/_import.txt b/npc/020-2/_import.txt new file mode 100644 index 00000000..62b2af2d --- /dev/null +++ b/npc/020-2/_import.txt @@ -0,0 +1,8 @@ +// Map 020-2: Nivalis Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/020-2/_warps.txt", +"npc/020-2/baktar.txt", +"npc/020-2/banker.txt", +"npc/020-2/furquest.txt", +"npc/020-2/mapflags.txt", +"npc/020-2/shops.txt", diff --git a/npc/020-2/_warps.txt b/npc/020-2/_warps.txt new file mode 100644 index 00000000..239da85a --- /dev/null +++ b/npc/020-2/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 020-2: Nivalis Indoor warps +020-2,25,36,0 warp #020-2_25_36 0,0,020-1,47,49 +020-2,64,23,0 warp #020-2_64_23 0,0,020-1,56,91 +020-2,111,33,0 warp #020-2_111_33 0,0,020-1,64,83 +020-2,32,74,0 warp #020-2_32_74 0,0,020-1,86,47 +020-2,72,71,0 warp #020-2_72_71 0,0,020-1,66,53 +020-2,127,69,0 warp #020-2_127_69 0,0,020-1,59,46 diff --git a/npc/020-2/baktar.txt b/npc/020-2/baktar.txt new file mode 100755 index 00000000..a3bc5cc8 --- /dev/null +++ b/npc/020-2/baktar.txt @@ -0,0 +1,225 @@ +020-2,70,61,0 script Baktar NPC191,{ + @npcname$ = "[Baktar]"; + + @BIT_KNOWHIM = 0; + + @BIT_DESERTHAT = 1; + @MONEY_DESERTHAT = 1500; + @XP_DESERTHAT = 500; + + @BIT_DESERTSHIRT = 2; + @MONEY_DESERTSHIRT = 1500; + @XP_DESERTSHIRT = 600; + + @BIT_SERFHAT = 3; + @MONEY_SERFHAT = 800; + @XP_SERFHAT = 350; + + @BIT_MS_TONGUE = 4; + @MONEY_MS_TONGUE = 800; + @XP_MS_TONGUE = 350; + + @BIT_MS_EGG = 5; + @MONEY_MS_EGG = 800; + @XP_MS_EGG = 350; + + @BIT_SNAKESKIN = 6; + @MONEY_SNAKESKIN = 800; + @XP_SNAKESKIN = 350; + + @BIT_BUGLEG = 7; + @MONEY_BUGLEG = 20; + @XP_BUGLEG = 130; + + @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT); + if ((@run == 3) && (QL_KYLIAN == 13)) + goto L_Deliver; + goto L_Start; + +L_Deliver: + menu + "I have a delivery for you", L_Delivery; + +L_Delivery: + mes "[Baktar]"; + mes "\"Ahh my delivery from Tulimshar, how nice it is to get some comforts from back home.\""; + QL_KYLIAN = 14; + goto L_close; + +L_Start: + + if(QL_BAKTAR & (1<<@BIT_KNOWHIM)) goto L_KnowAlready; + mes @npcname$; + mes "\"Hello, did you come from Tulimshar? Because you have a nice tan. \""; + menu + "Yes, I'm from Tulimshar", L_exotic, + "Well, I just like sunbathing", L_close, + "Good bye", L_close; + +L_KnowAlready: + mes @npcname$; + mes "\"I love Tulimshar's stuff. I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item from the area, I'll give you a nice reward. So, you have a new item?\""; + goto L_Startitem; + +L_exotic: + mes @npcname$; + mes "\"I said that because I love Tulimshar's stuff...I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item maybe I can give you a nice reward. But I don't need a lot, I just need one of each item.\""; + menu + "I have some items on me maybe you'll like them ", L_Startitem, + "Don't touch my stuff!", L_close, + "I'll get them. Bye.", L_close; + +L_Startitem: + setarray @exotic_item$, "", "", "", "", "", "", ""; + @c = 0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_KNOWHIM); + if (countitem("DesertHat") < 1 || QL_BAKTAR & (1<<@BIT_DESERTHAT) ) goto L_DesertShirt; + @exotic_item$[@c] = "a Desert Hat ?"; + @menuid[@c] = 0; + @c = @c + 1; + goto L_DesertShirt; + +L_DesertShirt: + if (countitem("DesertShirt") < 1 || QL_BAKTAR & (1<<@BIT_DESERTSHIRT) ) goto L_SerfHat; + @exotic_item$[@c] = "a Desert Shirt ?"; + @menuid[@c] = 1; + @c = @c + 1; + goto L_SerfHat; + +L_SerfHat: + if (countitem("SerfHat") < 1 || QL_BAKTAR & (1<<@BIT_SERFHAT) ) goto L_tongue; + @exotic_item$[@c] = "a Serf Hat ?"; + @menuid[@c] = 2; + @c = @c + 1; + goto L_tongue; + +L_tongue: + if (countitem("MountainSnakeTongue") < 1 || QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_egg; + @exotic_item$[@c] = "a Mountain Snake Tongue ?"; + @menuid[@c] = 3; + @c = @c + 1; + goto L_egg; + +L_egg: + if (countitem("MountainSnakeEgg") < 1 || QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_Skin; + @exotic_item$[@c] = "a Mountain Snake Egg?"; + @menuid[@c] = 4; + @c = @c + 1; + goto L_Skin; + +L_Skin: + if (countitem("SnakeSkin") < 1 || QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_bugleg; + @exotic_item$[@c] = "a Snake Skin?"; + @menuid[@c] = 5; + @c = @c + 1; + goto L_bugleg; + +L_bugleg: + if (countitem("BugLeg") < 1 || QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_NeverMind; + @exotic_item$[@c] = "a Bug Leg?"; + @menuid[@c] = 6; + @c = @c + 1; + goto L_NeverMind; + +L_NeverMind: + @exotic_item$[@c] = "Nevermind"; + @menuid[@c] = 6; + menu + @exotic_item$[0], L_MenuItems, + @exotic_item$[1], L_MenuItems, + @exotic_item$[2], L_MenuItems, + @exotic_item$[3], L_MenuItems, + @exotic_item$[4], L_MenuItems, + @exotic_item$[5], L_MenuItems, + @exotic_item$[6], L_MenuItems; + +L_MenuItems: + @menu = @menu -1; + + if (@menuid[@menu] == 0) goto L_DesertHat_Item; + if (@menuid[@menu] == 1) goto L_DesertShirt_Item; + if (@menuid[@menu] == 2) goto L_SerfHat_Item; + if (@menuid[@menu] == 3) goto L_tongue_Item; + if (@menuid[@menu] == 4) goto L_egg_Item; + if (@menuid[@menu] == 5) goto L_skin_Item; + if (@menuid[@menu] == 6) goto L_BugLegItem; + mes @npcname$; + mes "\"Ok, goodbye then.\""; + close; + +L_DesertHat_Item: + if(QL_BAKTAR & (1<<@BIT_DESERTHAT)) goto L_havealready; + if (countitem("DesertHat") < 1) goto L_NoItem; + delitem "DesertHat", 1; + Zeny = Zeny + @MONEY_DESERTHAT; + getexp @XP_DESERTHAT,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_DESERTHAT); + close; + +L_DesertShirt_Item: + if(QL_BAKTAR & (1<<@BIT_DESERTSHIRT)) goto L_havealready; + if (countitem("DesertShirt") < 1) goto L_NoItem; + delitem "DesertShirt", 1; + Zeny = Zeny + @MONEY_DESERTSHIRT; + getexp @XP_DESERTSHIRT,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_DESERTSHIRT); + close; + +L_SerfHat_Item: + if(QL_BAKTAR & (1<<@BIT_SERFHAT)) goto L_havealready; + if (countitem("SerfHat") < 1) goto L_NoItem; + delitem "SerfHat", 1; + Zeny = Zeny + @MONEY_SERFHAT; + getexp @XP_SERFHAT,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_SERFHAT); + close; + +L_tongue_Item: + if(QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_havealready; + if (countitem("MountainSnakeTongue") < 1) goto L_NoItem; + delitem "MountainSnakeTongue", 1; + Zeny = Zeny + @MONEY_MS_TONGUE; + getexp @XP_MS_TONGUE,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_MS_TONGUE); + close; + +L_egg_Item: + if(QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_havealready; + if (countitem("MountainSnakeEgg") < 1) goto L_NoItem; + delitem "MountainSnakeEgg", 1; + Zeny = Zeny + @MONEY_MS_EGG; + getexp @XP_MS_EGG,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_MS_EGG); + close; + +L_skin_Item: + if(QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_havealready; + if (countitem("SnakeSkin") < 1) goto L_NoItem; + delitem "SnakeSkin", 1; + Zeny = Zeny + @MONEY_SNAKESKIN; + getexp @XP_SNAKESKIN,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_SNAKESKIN); + close; + +L_BugLegItem: + if(QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_havealready; + if (countitem("BugLeg") < 1) goto L_NoItem; + delitem "BugLeg", 1; + Zeny = Zeny + @MONEY_BUGLEG; + getexp @XP_BUGLEG,0; + QL_BAKTAR = QL_BAKTAR | (1<<@BIT_BUGLEG); + close; + +L_NoItem: + mes @npcname$; + mes "\"Well, if you happen to get items from Tulimshar, see me first before you sell anything.\""; + close; + +L_havealready: + mes @npcname$; + mes "\"I already collected what you can offer me.\""; + close; + +L_close: + close; +} diff --git a/npc/020-2/banker.txt b/npc/020-2/banker.txt new file mode 100755 index 00000000..9a1ddcc8 --- /dev/null +++ b/npc/020-2/banker.txt @@ -0,0 +1,16 @@ +020-2,122,64,0 script Ben NPC193,{ + @npcname$ = "Ben"; + callfunc "Banker"; + close; +} + +020-2,127,63,0 script Maria NPC190,{ + mes "[Maria]"; + mes "\"Hello!"; + mes "\"Isn't it great?\""; + next; + mes "\"Nivalis has increased trade with merchants from Thermin in the west and the barbarian tribe who live in the mountains northwest of here.\""; + next; + mes "\"That's why this office was built.\""; + close; +} diff --git a/npc/020-2/furquest.txt b/npc/020-2/furquest.txt new file mode 100755 index 00000000..23847336 --- /dev/null +++ b/npc/020-2/furquest.txt @@ -0,0 +1,646 @@ + +020-2,24,26,0 script Agostine Debug NPC137,{ + mes "[Agostine Debug]"; + mes "What do you want to do?"; + menu + "Show Quest State", L_ShowState, + "Set Quest State", L_SetState, + "Reset", L_Reset, + "Nothing.", L_close; + +L_ShowState: + @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + mes "Current State is " + @wg_state; + goto L_close; + +L_SetState: + mes "What state do you want?"; + input @wg_state; + callfunc "setWGState"; + mes "Set to " + @wg_state; + goto L_close; + +L_Reset: + @wg_state = 0; + callfunc "setWGState"; + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "Agostine Debug"; + end; +} +020-2,27,26,0 script Agostine NPC137,{ + @CUTFUR_EXP = 10; + @FINEDRESS_COTTON_CLOTHS = 20; + @FINEDRESS_GP = 20000; + @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + + + if (@wg_state == 1) goto L_State_0_3; + if (@wg_state == 2) goto L_State_1; + if (@wg_state == 3) goto L_State_2; + if (@wg_state == 4) goto L_State_4; + if (@wg_state == 5) goto L_State_4_success; + if (@wg_state == 6) goto L_State_6; + if (@wg_state == 7) goto L_State_11; + if (@wg_state == 8) goto L_State_12; + if (@wg_state >= 9 && @wg_state < 11) goto L_State_13; + if (@wg_state == 11) goto L_State_14; + if (@wg_state == 12) goto L_State_14_AA; + if (@wg_state == 13) goto L_State_15; + if (@wg_state > 13 && @wg_state < 16) goto L_State_15_Repeat; + if (@wg_state == 16) goto L_State_16; + if (@wg_state > 16 && @wg_state < 20) goto L_State_16_Repeat; + if (@wg_state == 20) goto L_State_17; + if (@wg_state == 21) goto L_State_17_AskItems; + if (@wg_state == 22) goto L_State_17_PBD; + if (@wg_state >= 23) goto L_State_18; + + mes "\"This goes up, this goes left...\""; + next; + mes "\"Mmmm...?\""; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"Oh, a customer! Let me introduce myself! My name is Agostine!"; + mes "Some people say that I am the best tailor in the world,"; + mes "but I think I am the best one in the universe!"; + mes "So, What can I do for you, my friend?\""; + next; + menu + "I want something new for my wardrobe!", L_State_0_1, + "Oh, nothing, thanks!", L_close; + + +L_State_0_1: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Well.. you know... working so hard makes me so tired!"; + mes "Can you bring me something tasty to drink, my friend?\""; + next; + menu + "Sure, what kind of drink you like?", L_State_0_2, + "I'm not your waiter!", L_close; + +L_State_0_2: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Here we do not have a bar. Let me taste different beverages."; + mes "I want something new to drink.\""; + next; + menu + "I'll bring you different drinks to try!", L_State_Accept, + "Maybe a bar will open soon, wait for it.", L_close; + +L_State_Accept: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Thanks so much.\""; + @wg_state = 1; + callfunc "setWGState"; + goto L_close; + +L_State_0_3: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Well, what have you brought me?\""; + next; + menu + "A Cactus Drink.", L_State_0_4, + "A Cactus Potion.", L_State_0_5, + "Some milk.", L_State_0_6, + "A pint of beer.", L_State_0_7, + "An Iron potion.", L_State_0_9, + "A Concentration Potion.", L_State_0_8, + "Nothing, at the moment.", L_close; + +L_State_0_4: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, a Cactus Drink?\""; + if (countitem("CactusDrink") < 1) goto L_State_neg; + delitem "CactusDrink", 1; + goto L_State_bad; + +L_State_0_5: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, a Cactus Potion?\""; + if (countitem("CactusPotion") < 1) goto L_State_neg; + delitem "CactusPotion", 1; + goto L_State_bad; + +L_State_0_6: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, some milk for me?\""; + if (countitem("Milk") < 1) goto L_State_neg; + delitem "Milk", 1; + goto L_State_bad; + +L_State_0_7: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, a beer?\""; + if (countitem("Beer") < 1) goto L_State_neg; + delitem "Beer", 1; + goto L_State_bad; + +L_State_0_8: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, a Concentration Potion?\""; + if (countitem("ConcentrationPotion") < 1) goto L_State_neg; + delitem "ConcentrationPotion", 1; + goto L_State_bad; + +L_State_0_9: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, an Iron Potion?\""; + if (countitem("IronPotion") < 1) goto L_State_neg; + delitem "IronPotion", 1; + next; + mes "Agostine looks pleased as he drinks the potion."; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"Oh! This is damn good! I feel a new man, my friend!\""; + next; + Zeny = Zeny + 500; + mes "[Agostine, The Legendary Tailor]"; + mes "\"This is a little reward for your help. Take 500 GP, my friend!\""; + @wg_state = 2; + callfunc "setWGState"; + goto L_close; + +L_State_neg: + next; + mes "\"Seems that you lied. You don't have the drink you told me.\""; + goto L_close; + +L_State_bad: + next; + mes "\"Well, I don't like it so much. Bring me something else.\""; + goto L_close; + + +L_State_1: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Mmmm... Let me see... This year light colours are fashionable!"; + mes "Would you like a pair of snow-white Winter Gloves?\""; + next; + menu + "No, thanks. I love dark clothes...", L_close, + "You really can do this for me?", L_State_2; + +L_State_2: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Well, Winter Gloves are so fashionable for their lovable fur!"; + mes "Only the best furs can be used for these gloves!"; + mes "But, as you see, I am a tailor, not a hunter! So, why don't you bring me the best fluffy's fur you can find?\""; + @wg_state = 3; + callfunc "setWGState"; + next; + menu + "You are crazy! I won't kill any animal for this!", L_close, + "Sure, I will be back soon!", L_State_3; + +L_State_3: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Remember, I want the best of fur!\""; + @wg_state = 4; + callfunc "setWGState"; + goto L_close; + +L_State_4: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Oh, my friend! Have you brought me some good furs?\""; + if (countitem("WhiteFur") < 1) goto L_close; + next; + menu + "Here, take a look!", L_State_4_try, + "Yes, but I need it for something else.", L_close; + +L_State_4_try: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Let me see, my friend! It needs to be perfect for my gloves!\""; + mes "Agostine examines the patch of fur."; + next; + if (countitem("WhiteFur") < 1) goto L_No_Fur; + delitem "WhiteFur", 1; + @Temp1 = rand(30); + if (@Temp1 == 0) goto L_State_4_success; + mes "Agostine throws away the white fur."; + getexp @CUTFUR_EXP, 0; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"It was awfully cut! You should pay more attention when you kill fluffies!\""; + if (countitem("WhiteFur") < 1) goto L_close; + next; + menu + "Here I have another one!", L_State_4_try, + "Sorry, I will be careful...", L_close; + +L_State_4_success: + mes "Agostine breaks into a smile"; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"It's perfect! Perfect! Good job, my friend! I will prepare your gloves right now!\""; + next; + @wg_state = 5; + callfunc "setWGState"; + goto L_State_5; + +L_State_5: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Ehm, my friend, my work is not free. I need 15,000 GP for the work.\""; + next; + menu + "You are not a tailor, you are a thief!!", L_close, + "I think it's a reasonable price...", L_State_5_pay; + +L_State_5_pay: + if (Zeny < 15000) goto L_State_5_nocash; + getinventorylist; + if (@inventorylist_count == 100) goto L_TooMany; + Zeny = Zeny - 15000; + getitem "WinterGloves", 1; + @wg_state = 6; + callfunc "setWGState"; + mes "[Agostine, The Legendary Tailor]"; + mes "\"Here they are. You will have the most fashionable hands in the world!\""; + goto L_close; + +L_State_5_nocash: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Seems like you are out of cash. Come back when you have the money.\""; + goto L_close; + +L_State_6: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Oh, I remember you! Your gloves are sooo fashionable, my friend!"; + mes "Well, I have a good news for you. In this issue of 'TMW Fashion'"; + mes "I saw a pretty accessory, a pair of Furry Boots, my friend."; + mes "I can make your own pair, if you want!\""; + next; + menu + "It's a great idea!", L_State_10, + "I'm glamourous enough, thanks", L_close; + +L_State_10: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Perfect! For satisfying your request I need another perfect White Fur"; + mes "and a pair of Boots, like those you can find in the mines."; + mes "They will make you lovely, my friend!\""; + @wg_state = 7; + callfunc "setWGState"; + goto L_close; + +L_State_11: + mes "[Agostine, The Legendary Tailor]"; + mes "\"So, my friend, have you brought me the right Fur?\""; + if (countitem("WhiteFur") < 1) goto L_close; + next; + menu + "Sure, I'm a fluffy hunter!", L_State_11_try, + "Not yet, sorry.", L_close; + +L_State_11_try: + mes "[Agostine, The Legendary Tailor]"; + mes "\"I'd rather see the patch of fur, first.\""; + next; + mes "Agostine examines the patch of fur."; + next; + if (countitem("WhiteFur") < 1) goto L_No_Fur; + delitem "WhiteFur", 1; + @Temp2 = rand(30); + if (@Temp2 == 0) goto L_State_11_success; + mes "Agostine rips the white fur."; + getexp @CUTFUR_EXP, 0; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"That fur was terrible. I won't work with it!\""; + if (countitem("WhiteFur") < 1) goto L_close; + next; + menu + "Well, maybe this is better!", L_State_11_try, + "I will hunt other fluffies...", L_close; + +L_State_11_success: + mes "Agostine breaks into a smile"; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"This one is good enough, my friend. Good job.\""; + @wg_state = 8; + callfunc "setWGState"; + goto L_State_12; + +L_State_12: + mes "[Agostine, The Legendary Tailor]"; + mes "\"I need also a pair of Boots for the work."; + mes "And my payment, obviously. 15,000 GP is right.\""; + next; + menu + "Sure, here it all is.", L_State_12_pay, + "I missed something, I will be back soon!", L_close; + +L_State_12_pay: + if (Zeny < 15000) goto L_State_12_missing; + if (countitem("Boots") < 1) goto L_State_12_missing; + // No inventory check needed, as boots are removed, opening a slot + Zeny = Zeny - 15000; + delitem "Boots", 1; + getitem "FurBoots", 1; + @wg_state = 9; + callfunc "setWGState"; + mes "[Agostine, The Legendary Tailor]"; + mes "\"Enjoy your new boots, my friend!\""; + goto L_close; + +L_State_12_missing: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Seems you have forgotten something. Check your inventory"; + mes "and your pockets!\""; + goto L_close; + +L_State_13: + mes "[Agostine, The Legendary Tailor]"; + mes "\"You are so glamourous, my dear friend!"; + mes "I have done a very good job on your clothes!\""; + goto L_close; + +L_TooMany: + mes "[Agostine, The Legendary Tailor]"; + mes "\"You don't have anywhere to put them. Come back when you do.\""; + goto L_close; + +L_No_Fur: + mes "[Agostine, The Legendary Tailor]"; + mes "\"You don't have any white fur! Stop talking nonsense.\""; + goto L_close; + +L_State_14: + if (BaseLevel < 60) + goto L_State_13; + mes "[Agostine, The Legendary Tailor]"; + mes "\"You are so glamourous, my dear friend!"; + mes "I have done a very good job on your clothes... But...\""; + next; + + menu + "But?", L_Next; + +L_Next: + mes "[Agostine, The Legendary Tailor]"; + mes "\"There is a new fashion I've been dying to try out!"; + mes "But I don't have all the knowledge in the world about seaming this wonderful fashion.\""; + next; + + menu + "Ah, that's too bad...", L_close, + "I know another tailor who might know!", L_Next1; + +L_Next1: + mes "[Agostine, The Legendary Tailor]"; + mes "\"What tailor may that be?"; + mes "I haven't been out of Nivalis for quite some time since I have been busy with clothes for the people of the town."; + mes "If you can tell me the name of this great tailor, maybe we can work something out, like a collaboration!\""; + next; + + menu + "Well... There is a tailor in Dimond's Cove who makes pretty good clothing. Her name is Lora Tay.", L_Next2; + +L_Next2: + mes "[Agostine, The Legendary Tailor]"; + mes "\"I had almost forgotten about Lora Tay."; + mes "She has tried to put me out of business a few times long ago."; + mes "But I am willing to collaborate with her to make this fine fashion come alive."; + mes "Will you go ask her if she is willing to help sew and seam this fashion I will create?\""; + + menu + "Sure thing! Be back soon.", L_State_14_Accept, + "It will never happen. I won't waste my time.", L_close; + +L_State_14_Accept: + @wg_state = 12; + callfunc "setWGState"; + goto L_close; + +L_State_14_AA: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Please my friend, go talk to Lora Tay about our possible collaboration!\""; + goto L_close; + +L_State_15: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Hi there fashionable friend, have you talked to Lora Tay about my request?\""; + next; + menu + "Yes, but she would like to know more information about it and I'm kind of curious myself.", L_Next3, + "I haven't yet, sorry.", L_close; + +L_Next3: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Well I had a dream of a woman in a beautiful dress I would like to recreate from my dream..."; + mes "But the thing is I have never sewn a dress this fabulous in my life!"; + mes "This is why I wanted an experienced tailor to help me with it.\""; + next; + + menu + "You must be thinking of fashion a lot if it's in your dreams! I shall bring this information to Lora Tay.", L_Next4, + "You're obsessed, I cant help you.", L_close; + +L_Next4: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Please take these materials with you to show Lora Tay the kind of vision I have!"; + mes "These are the finest materials in my whole house and have been saving them for something special such as this.\""; + next; + + message strcharinfo(0), "Agostine gives you bundles of luxurious cloth that you carefully put in your backpack."; + mes "Agostine gives you bundles of luxurious cloth that you carefully put in your backpack."; + next; + + mes "[Agostine, The Legendary Tailor]"; + mes "\"Hurry back my friend!\""; + + @wg_state = 14; + callfunc "setWGState"; + + goto L_close; + +L_State_15_Repeat: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Please take these materials with you to show Lora Tay the kind of vision I have!"; + mes "Hurry back my friend!\""; + goto L_close; + +L_State_16: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Hello there! Did you tell Lora Tay about the type of fashion I was hoping to create?\""; + next; + + menu + "Yes, she is also working on threading to sew the materials together.", L_Next5, + "Why would I do that for?", L_close; + +L_Next5: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Wow she did not only accept but she is willing to sew these materials for me?"; + mes "This is amazing... I was quite worried I would ruin these fine cloths sewing them myself.\""; + next; + + mes "[Agostine, The Legendary Tailor]"; + mes "\"Is there anything I can do in the meanwhile?\""; + next; + menu + "Actually she wanted the design drawings to know what it should look like.", L_Next6; + +L_Next6: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Of course! How could I forget, I drew the designs right after the dream I had."; + mes "Please take these to Lora Tay and ask her to try and make it as close as she can.\""; + next; + + menu + "Sure thing be back soon!", L_Next7, + "... I'll take a nap first.", L_close; + +L_Next7: + @wg_state = 17; + callfunc "setWGState"; + + message strcharinfo(0), "Agostine gives you a folio containing his designs, that you put in a hidden compartment in your backpack."; + mes "Agostine gives you a folio containing his designs, that you put in a hidden compartment in your backpack."; + + goto L_close; + +L_State_16_Repeat: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Please my friend, bring my designs to Lora Tay.\""; + goto L_close; + +L_State_17: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Wow is that the dress?"; + mes "It looks fabulous...\""; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"But I do notice it is missing something from my design.\""; + next; + + menu + "Lora Tay mentioned the bottom has to be edged with cotton cloths but she cannot do the design you wanted.", L_Next8; + +L_Next8: + mes "[Agostine, The Legendary Tailor]"; + mes "\"That's fine. I will finish it with the cloth but it seems I don't have anymore around...\""; + next; + + goto L_State_17_AskItems; + +L_State_17_AskItems: + mes "[Agostine, The Legendary Tailor]"; + mes "\"I will need about " + @FINEDRESS_COTTON_CLOTHS + " cotton cloths to finish this master piece. Do you think you can get some for me?\""; + next; + + menu + "Sure thing, I will go get them!", L_Next9, + "Here you are!", L_State_17_GiveItems; + +L_Next9: + @wg_state = 21; + callfunc "setWGState"; + goto L_close; + +L_State_17_NoItems: + mes "[Agostine, The Legendary Tailor]"; + mes "\"My friend, sorry to disappoint you, but you are lacking some cloth."; + mes "I need exactly " + @FINEDRESS_COTTON_CLOTHS + " cotton cloths to finish this master piece.\""; + goto L_close; + +L_State_17_GiveItems: + if (countitem ("CottonCloth") < @FINEDRESS_COTTON_CLOTHS) + goto L_State_17_NoItems; + delitem "CottonCloth", @FINEDRESS_COTTON_CLOTHS; + @wg_state = 22; + callfunc "setWGState"; + + mes "[Agostine, The Legendary Tailor]"; + mes "\"Great now just a little cloth here........\""; + next; + mes "............................"; + next; + mes "..................."; + next; + mes ".............."; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"It's finished!"; + mes "The finest dress in my design is finally finished!\""; + next; + mes "[Agostine, The Legendary Tailor]"; + mes "\"I don't know how I can repay you for all your hard work...\""; + next; + + mes "[Agostine, The Legendary Tailor]"; + mes "\"Hmmm I know something that will be good for you and for myself!\""; + next; + + menu + "What is it?", L_Next10; + +L_Next10: + mes "[Agostine, The Legendary Tailor]"; + mes "\"How about I let you buy the dress off me?"; + mes "This will allow you to have a fine dress and allow me to show the world what I'm capable of."; + mes "I would charge " + @FINEDRESS_GP +" GP, which I think is a magnificent price for something this fine.\""; + next; + + goto L_State_17_BuyDress; + +L_State_17_PBD: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Did you consider buying the dress off me?"; + mes "I would charge " + @FINEDRESS_GP +" GP, which I think is a magnificent price for something this fine.\""; + next; + + goto L_State_17_BuyDress; + +L_State_17_BuyDress: + menu + "Wow that sounds great I'll take it!", L_Next11, + "I'll think about it...", L_close; + +L_Next11: + if (Zeny < @FINEDRESS_GP) + goto L_State_17_NoMoney; + getinventorylist; + if (@inventorylist_count == 100) + goto L_State_17_InvFull; + + Zeny = Zeny - @FINEDRESS_GP; + getitem "FineDress", 1; + @wg_state = 23; + callfunc "setWGState"; + goto L_close; + +L_State_17_NoMoney: + mes "[Agostine, The Legendary Tailor]"; + mes "\"Check your pockets my friend,"; + mes "and come back when you have the money.\""; + goto L_close; + +L_State_17_InvFull: + mes "[Agostine, The Legendary Tailor]"; + mes "\"My friend, you don't have room to carry my master piece. Come back when you do.\""; + goto L_close; + +L_State_18: + // Same dialog as on state 13, but we could add something about the dress + mes "[Agostine, The Legendary Tailor]"; + mes "\"You are so glamourous, my dear friend!"; + mes "I have done a very good job on your clothes!\""; + goto L_close; + +L_close: + @wg_state = 0; + close; +} +function script setWGState { + QUEST_WG_state = (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT)); + return; +} diff --git a/npc/020-2/mapflags.txt b/npc/020-2/mapflags.txt new file mode 100755 index 00000000..09eb87cf --- /dev/null +++ b/npc/020-2/mapflags.txt @@ -0,0 +1,2 @@ +//020-2 mapflag town +//020-2 mapflag resave 020-1,52,118 diff --git a/npc/020-2/shops.txt b/npc/020-2/shops.txt new file mode 100755 index 00000000..b940e99f --- /dev/null +++ b/npc/020-2/shops.txt @@ -0,0 +1,27 @@ + +020-2,75,28,0 script Taylor NPC137,{ + mes "[Taylor]"; + mes "\"While it can be dangerous up here in Kaizei, I take comfort that Nivalis is not surrounded by the Yeti like Thermin is. What a weird town.\""; + next; + mes "\"Around Christmas time, this place gets crazy, but most of the time Nivalis serves as a hub for adventurers and tourists that come to Kaizei.\""; + next; + mes "\"There caves around here can prove to be dangerous, be careful around here and bring friends if you should go into them..otherwise, it might spell your end.\""; + next; + mes "\"Well, pleasant journeys and I hope I haven't been too much of a bother. Good chatting with you.\""; + close; +} +020-2,25,65,0 shop Bracco NPC135,529:2,530:8000,521:500,603:1000 +020-2,75,24,0 shop Mede NPC103,501:25,502:35,567:250,568:250,826:120,827:240,828:480 + +020-2,111,23,0 script Kane NPC120,{ + @npcname$ = "Kane the Inn Keeper"; + @Cost = 100; + + mes "[" + @npcname$ + "]"; + mes "\"Welcome stranger!\""; + mes "\"What? You've already seen an INN like mine?\""; + mes "\"That's impossible!\""; + next; + callfunc "Inn"; + close; +} diff --git a/npc/020-3/_import.txt b/npc/020-3/_import.txt new file mode 100644 index 00000000..f4123c6b --- /dev/null +++ b/npc/020-3/_import.txt @@ -0,0 +1,5 @@ +// Map 020-3: Ice cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/020-3/_mobs.txt", +"npc/020-3/_warps.txt", +"npc/020-3/mapflags.txt", diff --git a/npc/020-3/_mobs.txt b/npc/020-3/_mobs.txt new file mode 100644 index 00000000..7ad8ca6b --- /dev/null +++ b/npc/020-3/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 020-3: Ice cave mobs +020-3,40,36,14,2 monster Manana Tree 1017,1,100000,30000 +020-3,40,49,17,3 monster Crafty 1018,1,100000,30000 +020-3,0,0,0,0 monster Manana Tree 1017,20,0,0 +020-3,0,0,0,0 monster Crafty 1018,10,0,0 diff --git a/npc/020-3/_warps.txt b/npc/020-3/_warps.txt new file mode 100644 index 00000000..f1737405 --- /dev/null +++ b/npc/020-3/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 020-3: Ice cave warps +020-3,31,25,0 warp #020-3_31_25 0,0,020-1,76,37 +020-3,25,22,0 warp #020-3_25_22 0,0,020-3,97,101 +020-3,97,99,0 warp #020-3_97_99 0,0,020-3,25,24 +020-3,28,57,0 warp #020-3_28_57 0,0,020-3,33,99 +020-3,49,33,0 warp #020-3_49_33 0,0,020-3,110,56 +020-3,33,98,0 warp #020-3_33_98 0,0,020-3,28,56 +020-3,110,57,0 warp #020-3_110_57 0,0,020-3,49,34 diff --git a/npc/020-3/mapflags.txt b/npc/020-3/mapflags.txt new file mode 100755 index 00000000..7e975d95 --- /dev/null +++ b/npc/020-3/mapflags.txt @@ -0,0 +1 @@ +//020-3 mapflag resave 020-1,52,118 diff --git a/npc/021-3/_import.txt b/npc/021-3/_import.txt new file mode 100644 index 00000000..4ddc764c --- /dev/null +++ b/npc/021-3/_import.txt @@ -0,0 +1,5 @@ +// Map 021-3: Central Tulimshar Sewers +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/021-3/_mobs.txt", +"npc/021-3/_warps.txt", +"npc/021-3/mapflags.txt", diff --git a/npc/021-3/_mobs.txt b/npc/021-3/_mobs.txt new file mode 100644 index 00000000..2b7542fc --- /dev/null +++ b/npc/021-3/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 021-3: Central Tulimshar Sewers mobs +021-3,120,38,5,4 monster Beehive 1056,5,100000,30000 +021-3,103,58,4,1 monster Beehive 1056,5,100000,30000 +021-3,80,98,17,15 monster Beehive 1056,5,100000,30000 +021-3,129,82,4,1 monster Beehive 1056,5,100000,30000 +021-3,140,38,8,4 monster AngryFireGoblin 1108,3,100000,30000 +021-3,79,98,16,15 monster Toppy Blub 1009,4,100000,1800000 +021-3,52,53,1,8 monster Ratto 1005,4,40000,50000 +021-3,93,31,14,11 monster Clover Patch 1033,6,100000,30000 +021-3,121,128,4,1 monster Beehive 1056,5,100000,30000 +021-3,47,139,4,1 monster Beehive 1056,5,100000,30000 diff --git a/npc/021-3/_warps.txt b/npc/021-3/_warps.txt new file mode 100644 index 00000000..2832f0ff --- /dev/null +++ b/npc/021-3/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 021-3: Central Tulimshar Sewers warps +021-3,143,127,0 warp #021-3_143_127 0,0,001-1,117,109 +021-3,57,99,0 warp #021-3_57_99 0,0,001-1,60,84 +021-3,29,62,0 warp #021-3_29_62 0,0,001-1,28,45 +021-3,44,143,0 warp #021-3_44_143 0,0,004-3,80,23 diff --git a/npc/021-3/mapflags.txt b/npc/021-3/mapflags.txt new file mode 100755 index 00000000..fba01a25 --- /dev/null +++ b/npc/021-3/mapflags.txt @@ -0,0 +1 @@ +//021-3 mapflag resave 001-1,60,105 diff --git a/npc/023-1/_import.txt b/npc/023-1/_import.txt new file mode 100644 index 00000000..dc64077f --- /dev/null +++ b/npc/023-1/_import.txt @@ -0,0 +1,4 @@ +// Map 023-1: Tulimshar Lighthouse Beach +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/023-1/_mobs.txt", +"npc/023-1/_warps.txt", diff --git a/npc/023-1/_mobs.txt b/npc/023-1/_mobs.txt new file mode 100644 index 00000000..f2dbf4c1 --- /dev/null +++ b/npc/023-1/_mobs.txt @@ -0,0 +1,15 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-1: Tulimshar Lighthouse Beach mobs +023-1,70,41,3,3 monster Serqet 1119,1,100000,30000 +023-1,84,33,5,3 monster Tengu 1120,1,100000,30000 +023-1,58,28,3,3 monster Golem 1121,1,100000,30000 +023-1,80,99,5,3 monster Tengu 1120,1,100000,30000 +023-1,86,117,9,1 monster Golem 1121,1,100000,30000 +023-1,55,126,3,3 monster Serqet 1119,1,100000,30000 +023-1,47,86,3,3 monster Serqet 1119,1,100000,30000 +023-1,102,67,5,3 monster Tengu 1120,1,100000,30000 +023-1,105,90,3,3 monster Serqet 1119,1,100000,30000 +023-1,62,60,3,3 monster Serqet 1119,1,100000,30000 +023-1,93,49,6,5 monster Golem 1121,1,100000,30000 +023-1,64,95,0,23 monster Swampling 1109,3,150000,100000 +023-1,45,54,2,19 monster Swampling 1109,3,150000,100000 diff --git a/npc/023-1/_warps.txt b/npc/023-1/_warps.txt new file mode 100644 index 00000000..0ff1c2c5 --- /dev/null +++ b/npc/023-1/_warps.txt @@ -0,0 +1,15 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-1: Tulimshar Lighthouse Beach warps +023-1,65,146,0 warp #023-1_65_146 1,0,042-1,65,24 +023-1,75,134,0 warp #023-1_75_134 0,0,023-3,75,132 +023-1,71,117,0 warp #023-1_71_117 0,0,023-3,71,114 +023-1,83,114,0 warp #023-1_83_114 0,0,023-3,83,112 +023-1,107,120,0 warp #023-1_107_120 0,0,023-3,106,118 +023-1,105,114,0 warp #023-1_105_114 0,0,023-3,106,115 +023-1,70,95,0 warp #023-1_70_95 0,0,023-3,70,93 +023-1,48,80,0 warp #023-1_48_80 0,0,023-3,48,78 +023-1,61,36,0 warp #023-1_61_36 0,0,023-3,61,39 +023-1,36,34,0 warp #023-1_36_34 0,0,023-2,31,38 +023-1,37,23,0 warp #023-1_37_23 0,0,023-2,31,33 +023-1,66,101,0 warp #023-1_66_101 0,3,023-1,61,100 +023-1,62,101,0 warp #023-1_62_101 0,3,023-1,67,100 diff --git a/npc/023-2/_import.txt b/npc/023-2/_import.txt new file mode 100644 index 00000000..0c94c7c7 --- /dev/null +++ b/npc/023-2/_import.txt @@ -0,0 +1,3 @@ +// Map 023-2: ERROR +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/023-2/_warps.txt", diff --git a/npc/023-2/_warps.txt b/npc/023-2/_warps.txt new file mode 100644 index 00000000..4cb63639 --- /dev/null +++ b/npc/023-2/_warps.txt @@ -0,0 +1,2 @@ +023-2,31,40,0 warp #023-2_31_40 0,0,023-1,36,35 +023-2,31,31,0 warp #023-2_31_31 0,0,023-1,36,23 diff --git a/npc/023-3/_import.txt b/npc/023-3/_import.txt new file mode 100644 index 00000000..0951c0c6 --- /dev/null +++ b/npc/023-3/_import.txt @@ -0,0 +1,4 @@ +// Map 023-3: Tulimshar Beach Caves +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/023-3/_mobs.txt", +"npc/023-3/_warps.txt", diff --git a/npc/023-3/_mobs.txt b/npc/023-3/_mobs.txt new file mode 100644 index 00000000..aef09567 --- /dev/null +++ b/npc/023-3/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-3: Tulimshar Beach Caves mobs +023-3,91,77,3,3 monster Serqet 1119,1,100000,30000 +023-3,127,85,3,3 monster Tengu 1120,1,100000,30000 +023-3,98,28,3,3 monster Tengu 1120,1,100000,30000 +023-3,120,45,3,3 monster Serqet 1119,1,100000,30000 +023-3,51,107,6,2 monster Tengu 1120,1,100000,30000 +023-3,69,52,33,4 monster Serqet 1119,1,100000,30000 diff --git a/npc/023-3/_warps.txt b/npc/023-3/_warps.txt new file mode 100644 index 00000000..444baa89 --- /dev/null +++ b/npc/023-3/_warps.txt @@ -0,0 +1,10 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-3: Tulimshar Beach Caves warps +023-3,75,134,0 warp #023-3_75_134 0,0,023-1,75,136 +023-3,71,117,0 warp #023-3_71_117 0,0,023-1,71,119 +023-3,83,114,0 warp #023-3_83_114 0,0,023-1,83,116 +023-3,106,120,0 warp #023-3_106_120 0,0,023-1,107,122 +023-3,106,112,0 warp #023-3_106_112 0,0,023-1,105,112 +023-3,70,95,0 warp #023-3_70_95 0,0,023-1,70,97 +023-3,48,80,0 warp #023-3_48_80 0,0,023-1,48,82 +023-3,61,36,0 warp #023-3_61_36 0,0,023-1,61,34 diff --git a/npc/025-1/_import.txt b/npc/025-1/_import.txt new file mode 100644 index 00000000..4a8b3c7b --- /dev/null +++ b/npc/025-1/_import.txt @@ -0,0 +1,7 @@ +// Map 025-1: Woodland Swamp +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/025-1/_mobs.txt", +"npc/025-1/_warps.txt", +"npc/025-1/barrier.txt", +"npc/025-1/mapflags.txt", +"npc/025-1/reset.txt", diff --git a/npc/025-1/_mobs.txt b/npc/025-1/_mobs.txt new file mode 100644 index 00000000..c8810f07 --- /dev/null +++ b/npc/025-1/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-1: Woodland Swamp mobs +025-1,100,60,28,39 monster Alizarin Plant 1037,3,30000,10000 +025-1,56,96,6,2 monster Alizarin Plant 1037,1,1200000,10000 +025-1,56,35,38,16 monster Butterfly 1032,2,240000,12000 +025-1,38,84,18,15 monster Mana Bug 1035,18,40000,300 +025-1,96,47,31,27 monster Little Green Slime 1025,14,18000,3000 +025-1,0,0,0,0 monster CroconutMob 1014,34,20000,5000 +025-1,41,86,17,13 monster Pink Flower 1034,3,100000,50000 +025-1,78,46,11,14 monster Pink Flower 1034,3,100000,50000 +025-1,73,84,19,8 monster Pink Flower 1034,3,100000,50000 +025-1,53,33,29,8 monster Pink Flower 1034,4,100000,50000 diff --git a/npc/025-1/_warps.txt b/npc/025-1/_warps.txt new file mode 100644 index 00000000..ad422d95 --- /dev/null +++ b/npc/025-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-1: Woodland Swamp warps +025-1,19,66,0 warp #025-1_19_66 0,0,026-1,128,66 +025-1,90,19,0 warp #025-1_90_19 3,0,015-1,59,100 +025-1,130,58,0 warp #025-1_130_58 0,2,016-1,21,53 diff --git a/npc/025-1/barrier.txt b/npc/025-1/barrier.txt new file mode 100755 index 00000000..521a4b74 --- /dev/null +++ b/npc/025-1/barrier.txt @@ -0,0 +1,15 @@ + +025-1,42,79,0 script #JuliaBarrier NPC45,1,1,{ + if (Rossy_Quest > 14 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_Warp; + if (Rossy_Quest <= 13) goto L_Block; + if (Rossy_Quest == 14) message strcharinfo(0), "You hear distant screams of fear."; + goto L_Warp; + +L_Warp: + warp "025-3", 112, 97; + end; + +L_Block: + message strcharinfo(0), "You are too frightened by what you can hear coming out of the cave that you can't enter."; + end; +} diff --git a/npc/025-1/mapflags.txt b/npc/025-1/mapflags.txt new file mode 100755 index 00000000..76d30e57 --- /dev/null +++ b/npc/025-1/mapflags.txt @@ -0,0 +1,2 @@ +//025-1 mapflag resave 016-1,94,30 +025-1 mapflag outside diff --git a/npc/025-1/reset.txt b/npc/025-1/reset.txt new file mode 100755 index 00000000..3f2ff2d6 --- /dev/null +++ b/npc/025-1/reset.txt @@ -0,0 +1,5 @@ + + + + + diff --git a/npc/025-3/_import.txt b/npc/025-3/_import.txt new file mode 100644 index 00000000..e60c045e --- /dev/null +++ b/npc/025-3/_import.txt @@ -0,0 +1,6 @@ +// Map 025-3: Rossy Main Hall +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/025-3/_mobs.txt", +"npc/025-3/_warps.txt", +"npc/025-3/barriers.txt", +"npc/025-3/mapflags.txt", diff --git a/npc/025-3/_mobs.txt b/npc/025-3/_mobs.txt new file mode 100644 index 00000000..8d98606b --- /dev/null +++ b/npc/025-3/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-3: Rossy Main Hall mobs +025-3,0,0,0,0 monster Beehive 1056,100,0,100 +025-3,0,0,0,0 monster Yellow Rose 1060,20,0,100 +025-3,0,0,0,0 monster AngryScorpion 1057,25,0,100 +025-3,69,153,6,0 monster Scorpion 1043,1,0,30000 diff --git a/npc/025-3/_warps.txt b/npc/025-3/_warps.txt new file mode 100644 index 00000000..5da43858 --- /dev/null +++ b/npc/025-3/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-3: Rossy Main Hall warps +025-3,112,98,0 warp #025-3_112_98 2,0,025-1,42,81 +025-3,105,86,0 warp #025-3_105_86 0,0,025-4,28,36 diff --git a/npc/025-3/barriers.txt b/npc/025-3/barriers.txt new file mode 100755 index 00000000..147bdd4f --- /dev/null +++ b/npc/025-3/barriers.txt @@ -0,0 +1,1274 @@ + + +025-3,78,127,0 script #WarpBattleCave1 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 26, 63, 60, 97) >= 1 || $@battlecave1 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE1) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave1 = 1; + warp "025-4", 41, 95; + $@cave1fighter$ = strcharinfo(0); + $@cave1fighterdeaths = PC_DIE_COUNTER; + $@cave1start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 1 Configuration. + setarray $@cave1_monsters_IDS[1], 1087, 1084; + setarray $@cave1_monsters_QTY[1], 3, 3; + $@cave1_waves = 1; + $@cave1_time = 180; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave1fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave1 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave1fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 26, 63, 60, 97) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave1fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE1) + goto L_Win; + if (gettimetick(2) - $@cave1start >= $@cave1_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave1start) < 60) + $@cave1start = $@cave1start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave1_timer = $@cave1_timer + 5; + if ($@cave1_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave1 = 0; + $@cave1_kills = 0; + $@cave1start = 0; + $@cave1_timer = 0; + $@cave1fighter$ = ""; + $@cave1fighterdeaths$ = 0; + $@battlecave1 = 0; + cleararray $@cave1_monsters_IDS[0], 0, 2; + cleararray $@cave1_monsters_QTY[0], 0, 2; + $@cave1_waves = 0; + $@cave1_time = 0; + killmonster "025-4", "#StartCaveFight1::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 78, 129; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 78, 129; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 78, 129; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave1fighter$)) == 0) + goto OnNoRid; + warp "025-3", 78, 129; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; + +} + + +025-3,53,107,0 script #WarpBattleCave2 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 97, 62, 126, 96) >= 1 || $@battlecave2 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE2) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave2 = 1; + warp "025-4", 110, 94; + $@cave2fighter$ = strcharinfo(0); + $@cave2fighterdeaths = PC_DIE_COUNTER; + $@cave2start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 2 Configuration. + setarray $@cave2_monsters_IDS[1], 1083, 1084; + setarray $@cave2_monsters_QTY[1], 3, 4; + $@cave2_waves = 1; + $@cave2_time = 210; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave2fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave2 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave2fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 97, 62, 126, 96) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave2fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE2) + goto L_Win; + if (gettimetick(2) - $@cave2start >= $@cave2_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave2start) < 60) + $@cave2start = $@cave2start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave2_timer = $@cave2_timer + 5; + if ($@cave2_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave2 = 0; + $@cave2_kills = 0; + $@cave2start = 0; + $@cave2_timer = 0; + $@cave2fighter$ = ""; + $@cave2fighterdeaths$ = 0; + $@battlecave2 = 0; + cleararray $@cave2_monsters_IDS[0], 0, 2; + cleararray $@cave2_monsters_QTY[0], 0, 2; + $@cave2_waves = 0; + $@cave2_time = 0; + killmonster "025-4", "#StartCaveFight2::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 53, 109; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 53, 109; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 53, 109; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave2fighter$)) == 0) + goto OnNoRid; + warp "025-3", 53, 109; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,71,83,0 script #WarpBattleCave3 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 150, 84, 177, 117) >= 1 || $@battlecave3 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE3) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave3 = 1; + warp "025-4", 168, 115; + $@cave3fighter$ = strcharinfo(0); + $@cave3fighterdeaths = PC_DIE_COUNTER; + $@cave3start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 3 Configuration. + setarray $@cave3_monsters_IDS[1], 1088, 1083; + setarray $@cave3_monsters_QTY[1], 4, 4; + $@cave3_waves = 1; + $@cave3_time = 240; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave3fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave3 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave3fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 150, 84, 177, 117) < 1) + goto OnNoRid; + if (cavefights & BATTLE_CAVE3) + goto L_Win; + if (PC_DIE_COUNTER > $@cave3fighterdeaths) + goto L_CleaningDead; + if (gettimetick(2) - $@cave3start >= $@cave3_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave3start) < 60) + $@cave3start = $@cave3start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave3_timer = $@cave3_timer + 5; + if ($@cave3_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave3 = 0; + $@cave3_kills = 0; + $@cave3start = 0; + $@cave3_timer = 0; + $@cave3fighter$ = ""; + $@cave3fighterdeaths$ = 0; + $@battlecave3 = 0; + cleararray $@cave3_monsters_IDS[0], 0, 2; + cleararray $@cave3_monsters_QTY[0], 0, 2; + $@cave3_waves = 0; + $@cave3_time = 0; + killmonster "025-4", "#StartCaveFight3::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 71, 85; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 71, 85; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 71, 85; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave3fighter$)) == 0) + goto OnNoRid; + warp "025-3", 71, 85; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,80,83,0 script #WarpBattleCave4 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 28, 124, 57, 156) >= 1 || $@battlecave4 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE4) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave4 = 1; + warp "025-4", 32, 154; + $@cave4fighter$ = strcharinfo(0); + $@cave4fighterdeaths = PC_DIE_COUNTER; + $@cave4start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 4 Configuration. + setarray $@cave4_monsters_IDS[1], 1087, 1083, 1084; + setarray $@cave4_monsters_QTY[1], 2, 2, 4; + $@cave4_waves = 2; + $@cave4_time = 360; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave4fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave4 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave4fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 28, 124, 57, 156) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave4fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE4) + goto L_Win; + if (gettimetick(2) - $@cave4start >= $@cave4_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave4start) < 60) + $@cave4start = $@cave4start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave4_timer = $@cave4_timer + 5; + if ($@cave4_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave4 = 0; + $@cave4_kills = 0; + $@cave4start = 0; + $@cave4_timer = 0; + $@cave4fighter$ = ""; + $@cave4fighterdeaths$ = 0; + $@battlecave4 = 0; + cleararray $@cave4_monsters_IDS[0], 0, 3; + cleararray $@cave4_monsters_QTY[0], 0, 3; + $@cave4_waves = 0; + $@cave4_time = 0; + killmonster "025-4", "#StartCaveFight4::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 80, 85; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 80, 85; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 80, 85; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave4fighter$)) == 0) + goto OnNoRid; + warp "025-3", 80, 85; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,71,30,0 script #WarpBattleCave5 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 91, 131, 124, 160) >= 1 || $@battlecave5 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE5) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave5 = 1; + warp "025-4", 100, 158; + $@cave5fighter$ = strcharinfo(0); + $@cave5fighterdeaths = PC_DIE_COUNTER; + $@cave5start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 5 Configuration. + setarray $@cave5_monsters_IDS[1], 1088, 1083, 1084; + setarray $@cave5_monsters_QTY[1], 3, 3, 3; + $@cave5_waves = 2; + $@cave5_time = 390; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave5fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave5 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave5fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 91, 131, 124, 160) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave5fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE5) + goto L_Win; + if (gettimetick(2) - $@cave5start >= $@cave5_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave5start) < 60) + $@cave5start = $@cave5start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave5_timer = $@cave5_timer + 5; + if ($@cave5_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave5 = 0; + $@cave5_kills = 0; + $@cave5start = 0; + $@cave5_timer = 0; + $@cave5fighter$ = ""; + $@cave5fighterdeaths$ = 0; + $@battlecave5 = 0; + cleararray $@cave5_monsters_IDS[0], 0, 3; + cleararray $@cave5_monsters_QTY[0], 0, 3; + $@cave5_waves = 0; + $@cave5_time = 0; + killmonster "025-4", "#StartCaveFight5::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 71, 32; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 71, 32; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 71, 32; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave5fighter$)) == 0) + goto OnNoRid; + warp "025-3", 71, 32; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,128,35,0 script #WarpBattleCave6 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 153, 143, 178, 174) >= 1 || $@battlecave6 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE6) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave6 = 1; + warp "025-4", 159, 172; + $@cave6fighter$ = strcharinfo(0); + $@cave6fighterdeaths = PC_DIE_COUNTER; + $@cave6start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 6 Configuration. + setarray $@cave6_monsters_IDS[1], 1087, 1088, 1083; + setarray $@cave6_monsters_QTY[1], 3, 4, 4; + $@cave6_waves = 2; + $@cave6_time = 450; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave6fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave6 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave6fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 153, 143, 178, 174) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave6fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE6) + goto L_Win; + if (gettimetick(2) - $@cave6start >= $@cave6_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave6start) < 60) + $@cave6start = $@cave6start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave6_timer = $@cave6_timer + 5; + if ($@cave6_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave6 = 0; + $@cave6_kills = 0; + $@cave6start = 0; + $@cave6_timer = 0; + $@cave6fighter$ = ""; + $@cave6fighterdeaths$ = 0; + $@battlecave6 = 0; + cleararray $@cave6_monsters_IDS[0], 0, 3; + cleararray $@cave6_monsters_QTY[0], 0, 3; + $@cave6_waves = 0; + $@cave6_time = 0; + killmonster "025-4", "#StartCaveFight6::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 128, 37; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 128, 37; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 128, 37; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave6fighter$)) == 0) + goto OnNoRid; + warp "025-3", 128, 37; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,70,57,0 script #WarpBattleCave7 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 27, 185, 61, 219) >= 1 || $@battlecave7 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE7) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave7 = 1; + warp "025-4", 42, 217; + $@cave7fighter$ = strcharinfo(0); + $@cave7fighterdeaths = PC_DIE_COUNTER; + $@cave7start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 7 Configuration. + setarray $@cave7_monsters_IDS[1], 1087, 1088, 1083, 1084; + setarray $@cave7_monsters_QTY[1], 2, 2, 2, 2; + $@cave7_waves = 3; + $@cave7_time = 540; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave7fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave7 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave7fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 27, 185, 61, 219) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave7fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE7) + goto L_Win; + if (gettimetick(2) - $@cave7start >= $@cave7_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave7start) < 60) + $@cave7start = $@cave7start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave7_timer = $@cave7_timer + 5; + if ($@cave7_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave7 = 0; + $@cave7_kills = 0; + $@cave7start = 0; + $@cave7_timer = 0; + $@cave7fighter$ = ""; + $@cave7fighterdeaths$ = 0; + $@battlecave7 = 0; + cleararray $@cave7_monsters_IDS[0], 0, 4; + cleararray $@cave7_monsters_QTY[0], 0, 4; + $@cave7_waves = 0; + $@cave7_time = 0; + killmonster "025-4", "#StartCaveFight7::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 70, 59; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 70, 59; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 70, 59; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave7fighter$)) == 0) + goto OnNoRid; + warp "025-3", 70, 59; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,138,92,0 script #WarpBattleCave8 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 90, 193, 119, 216) >= 1 || $@battlecave8 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE8) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave8 = 1; + warp "025-4", 105, 214; + $@cave8fighter$ = strcharinfo(0); + $@cave8fighterdeaths = PC_DIE_COUNTER; + $@cave8start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 8 Configuration. + setarray $@cave8_monsters_IDS[1], 1087, 1088, 1083, 1084; + setarray $@cave8_monsters_QTY[1], 2, 2, 3, 3; + $@cave8_waves = 3; + $@cave8_time = 570; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave8fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave8 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave8fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 90, 193, 119, 216) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave8fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE8) + goto L_Win; + if (gettimetick(2) - $@cave8start >= $@cave8_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave8start) < 60) + $@cave8start = $@cave8start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave8_timer = $@cave8_timer + 5; + if ($@cave8_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave8 = 0; + $@cave8_kills = 0; + $@cave8start = 0; + $@cave8_timer = 0; + $@cave8fighter$ = ""; + $@cave8fighterdeaths$ = 0; + $@battlecave8 = 0; + cleararray $@cave8_monsters_IDS[0], 0, 4; + cleararray $@cave8_monsters_QTY[0], 0, 4; + $@cave8_waves = 0; + $@cave8_time = 0; + killmonster "025-4", "#StartCaveFight8::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 138, 94; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 138, 94; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 138, 94; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave8fighter$)) == 0) + goto OnNoRid; + warp "025-3", 138, 94; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,138,160,0 script #WarpBattleCave9 NPC45,1,1,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) + goto L_AlreadyHelped; + if (getareausers("025-4", 144, 192, 173, 226) >= 1 || $@battlecave9 > 0) + goto L_SomeoneInside; + if (cavefights & BATTLE_CAVE9) + goto L_AlreadyDone; + if (Rossy_Quest < 15) + goto L_Block; + goto L_StartFight; + +L_StartFight: + $@battlecave9 = 1; + warp "025-4", 157, 222; + $@cave9fighter$ = strcharinfo(0); + $@cave9fighterdeaths = PC_DIE_COUNTER; + $@cave9start = gettimetick(2); + message strcharinfo(0), "As you enter, you feel an evil force filling up the cave."; + // Cave 9 Configuration. + setarray $@cave9_monsters_IDS[1], 1087, 1088, 1083, 1084; + setarray $@cave9_monsters_QTY[1], 3, 3, 3, 3; + $@cave9_waves = 3; + $@cave9_time = 630; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave9fighter$ + " is already inside. The cave seems to be blocked."; + end; + +L_AlreadyDone: + message strcharinfo(0), "I already eliminated this source of energy."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than dead monster corpses in this cave."; + end; + +L_Block: + message strcharinfo(0), "Maybe I should learn a bit more about this place before I go inside."; + end; + +OnTimer5000: + if ($@battlecave9 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave9fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 144, 192, 173, 226) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave9fighterdeaths) + goto L_CleaningDead; + if (cavefights & BATTLE_CAVE9) + goto L_Win; + if (gettimetick(2) - $@cave9start >= $@cave9_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave9start) < 60) + $@cave9start = $@cave9start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave9_timer = $@cave9_timer + 5; + if ($@cave9_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave9 = 0; + $@cave9_kills = 0; + $@cave9start = 0; + $@cave9_timer = 0; + $@cave9fighter$ = ""; + $@cave9fighterdeaths$ = 0; + $@battlecave9 = 0; + cleararray $@cave9_monsters_IDS[0], 0, 4; + cleararray $@cave9_monsters_QTY[0], 0, 4; + $@cave9_waves = 0; + $@cave9_time = 0; + killmonster "025-4", "#StartCaveFight9::OnMonsterDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-3", 138, 158; + message strcharinfo(0), "You can't stand the foul air inside the cave and run away!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 138, 158; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 138, 158; + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave9fighter$)) == 0) + goto OnNoRid; + warp "025-3", 138, 158; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} + + +025-3,77,170,0 script #WarpBossCave NPC45,1,1,{ + if (Rossy_Quest > 16 || FLAGS & FLAG_ROSSI_COMPLETED) + end; + if (Rossy_Quest == 16) + goto L_AlreadyHelped; + @barrier_force = -9; + if (cavefights & BATTLE_CAVE1) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE2) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE3) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE4) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE5) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE6) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE7) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE8) + @barrier_force = @barrier_force + 1; + if (cavefights & BATTLE_CAVE9) + @barrier_force = @barrier_force + 1; + if (@barrier_force != 0) + goto L_Hurt; + if (getareausers("025-4", 142, 24, 172, 48) >= 1 || $@battlecave10 > 0) + goto L_SomeoneInside; + if (@barrier_force == 0) + goto L_StartFight; + end; + +L_Hurt: + message strcharinfo(0), "As you try to enter, you bump into a magic barrier. Its force pushes you back, hurting you badly."; + heal (MaxHp * (@barrier_force / 10)), 0; + warp "025-3", 77, 164; + end; + +L_StartFight: + message strcharinfo(0), "You go through the magic barrier without problems... you can hear screams that seem to be very close."; + $@battlecave10 = 1; + warp "025-4", 157, 44; + $@cave10fighter$ = strcharinfo(0); + $@cave10fighterdeaths = PC_DIE_COUNTER; + $@cave10start = gettimetick(2); + // Cave 10 Configuration. + setarray $@cave10_monsters_IDS[1], 1087, 1088, 1083, 1084; + setarray $@cave10_monsters_QTY[1], 3, 3, 3, 3; + $@cave10_boss_ID = 1086; + $@cave10_waves = 4; + $@cave10_time = 1080; + startnpctimer; + end; + +L_SomeoneInside: + message strcharinfo(0), $@cave10fighter$ + " is already inside."; + end; + +L_AlreadyHelped: + message strcharinfo(0), "There is nothing more than corpses in this cave. You close your eyes and go straight to the place where Julia is hidden."; + warp "025-4", 93, 33; + end; + +OnTimer5000: + if ($@battlecave10 == 0) + goto L_AlreadyClean; + if (attachrid(getcharid(3,$@cave10fighter$))==0) + goto OnNoRid; + if (getareausers("025-4", 142, 24, 172, 48) < 1) + goto OnNoRid; + if (PC_DIE_COUNTER > $@cave10fighterdeaths) + goto L_CleaningDead; + if (Rossy_Quest == 16) + goto L_Win; + if (gettimetick(2) - $@cave10start >= $@cave10_time) + goto L_Cleaning; + setnpctimer 0; + end; + +L_Win: + message strcharinfo(0), "It is getting harder to breathe inside this cave... You feel like you are almost passing out."; + if ((gettimetick(2) - $@cave10start) < 60) + $@cave10start = $@cave10start + 60; + if (Hp - (MaxHp*5)/100 <= 0) + goto L_BadAir; + heal ((MaxHp/100) * -5), 0; + $@cave10_timer = $@cave10_timer + 5; + if ($@cave10_timer >= 60) + goto L_BadAir; + setnpctimer 0; + end; + +S_Cleaning: + $@wave_cave10 = 0; + $@cave10_kills = 0; + $@cave10start = 0; + $@cave10_timer = 0; + $@cave10fighter$ = ""; + $@cave10fighterdeaths$ = 0; + $@battlecave10 = 0; + cleararray $@cave10_monsters_IDS[0], 0, 4; + cleararray $@cave10_monsters_QTY[0], 0, 4; + $@cave10_boss_ID = 0; + $@cave10_waves = 0; + $@cave10_time = 0; + killmonster "025-4", "#StartBossCaveFight::OnMonsterDeath"; + killmonster "025-4", "#StartBossCaveFight::OnBossDeath"; + stopnpctimer; + setnpctimer 0; + return; + +L_BadAir: + warp "025-4", 93, 33; + message strcharinfo(0), "You can't stand the foul air inside the cave and run as fast as you can to save Julia!"; + callsub S_Cleaning; + end; + +L_Cleaning: + warp "025-3", 77, 168; + message strcharinfo(0), "You took too much time to eliminate this source of energy... If you stay one more second in this cave you won't be able to breathe...."; + callsub S_Cleaning; + end; + +L_CleaningDead: + warp "025-3", 77, 168; + if ($@wave_cave10 < 5) + message strcharinfo(0), "You were not strong enough to eliminate this power source."; + if ($@wave_cave10 == 5) + message strcharinfo(0), "This horrible monster is probably too powerful for you right now."; + callsub S_Cleaning; + end; + +OnNoRid: + callsub S_Cleaning; + end; + +OnGetout: + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) + goto OnNoRid; + warp "025-3", 77, 168; + callsub S_Cleaning; + end; + +OnWin: + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) + goto OnNoRid; + warp "025-4", 93, 33; + callsub S_Cleaning; + end; + +L_AlreadyClean: + stopnpctimer; + setnpctimer 0; + end; +} diff --git a/npc/025-3/mapflags.txt b/npc/025-3/mapflags.txt new file mode 100755 index 00000000..c63d436b --- /dev/null +++ b/npc/025-3/mapflags.txt @@ -0,0 +1 @@ +//025-3 mapflag resave 025-1,33,50 diff --git a/npc/025-4/_import.txt b/npc/025-4/_import.txt new file mode 100644 index 00000000..9fb6c566 --- /dev/null +++ b/npc/025-4/_import.txt @@ -0,0 +1,8 @@ +// Map 025-4: Rossy Battle Caves +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/025-4/_mobs.txt", +"npc/025-4/_warps.txt", +"npc/025-4/battlecaves.txt", +"npc/025-4/clauquer.txt", +"npc/025-4/julia.txt", +"npc/025-4/mapflags.txt", diff --git a/npc/025-4/_mobs.txt b/npc/025-4/_mobs.txt new file mode 100644 index 00000000..b7c7dd1a --- /dev/null +++ b/npc/025-4/_mobs.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-4: Rossy Battle Caves mobs +025-4,29,31,10,7 monster Beehive 1056,3,0,100 +025-4,94,24,10,10 monster Beehive 1056,5,0,100 diff --git a/npc/025-4/_warps.txt b/npc/025-4/_warps.txt new file mode 100644 index 00000000..109bdde3 --- /dev/null +++ b/npc/025-4/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 025-4: Rossy Battle Caves warps +025-4,28,37,0 warp #025-4_28_37 0,0,025-3,105,87 diff --git a/npc/025-4/battlecaves.txt b/npc/025-4/battlecaves.txt new file mode 100755 index 00000000..16b8d6d4 --- /dev/null +++ b/npc/025-4/battlecaves.txt @@ -0,0 +1,953 @@ + + +025-4,41,85,0 script #StartCaveFight1 NPC324,{ + if ($@battlecave1 == 2 && $@cave1fighter$ == strcharinfo(0)) + end; + if ($@battlecave1 == 2 && $@cave1fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave1 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave1 = 2; + goto L_Summon; + +L_Summon: + $@cave1_loop = $@cave1_loop + 1; + areamonster "025-4",26,63,60,97,"",$@cave1_monsters_IDS[$@cave1_loop],$@cave1_monsters_QTY[$@cave1_loop],"#StartCaveFight1::OnMonsterDeath"; + if ($@cave1_loop <= getarraysize($@cave1_monsters_IDS)) + goto L_Summon; + $@cave1_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave1::OnNoRid"; + end; + +L_Done: + $@wave_cave1 = $@wave_cave1 + 1; + $@cave1_kills = 0; + if (attachrid(getcharid(3,$@cave1fighter$)) == 0) goto L_Abort; + + if ($@wave_cave1 == 1) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave1 < $@cave1_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE1); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave1_kills = $@cave1_kills + 1; + if ($@cave1_kills >= $@cave1_monsters_QTY[1] + $@cave1_monsters_QTY[2] + $@cave1_monsters_QTY[3] + $@cave1_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,41,97,0 script #CheckCaveFight1 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE1 || $@battlecave1 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave1::OnGetout"; + end; +} + + + +025-4,115,77,0 script #StartCaveFight2 NPC324,{ + if ($@battlecave2 == 2 && $@cave2fighter$ == strcharinfo(0)) + end; + if ($@battlecave2 == 2 && $@cave2fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave2 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave2 = 2; + goto L_Summon; + +L_Summon: + $@cave2_loop = $@cave2_loop + 1; + areamonster "025-4",97, 62, 126, 96,"",$@cave2_monsters_IDS[$@cave2_loop],$@cave2_monsters_QTY[$@cave2_loop],"#StartCaveFight2::OnMonsterDeath"; + if ($@cave2_loop <= getarraysize($@cave2_monsters_IDS)) + goto L_Summon; + $@cave2_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave2::OnNoRid"; + end; + +L_Done: + $@wave_cave2 = $@wave_cave2 + 1; + $@cave2_kills = 0; + if (attachrid(getcharid(3,$@cave2fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave2 == 1) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave2 < $@cave2_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE2); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave2_kills = $@cave2_kills + 1; + if ($@cave2_kills >= $@cave2_monsters_QTY[1] + $@cave2_monsters_QTY[2] + $@cave2_monsters_QTY[3] + $@cave2_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; +} + + +025-4,110,96,0 script #CheckCaveFight2 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE2 || $@battlecave2 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave2::OnGetout"; + end; +} + +025-4,164,103,0 script #StartCaveFight3 NPC324,{ + if ($@battlecave3 == 2 && $@cave3fighter$ == strcharinfo(0)) + end; + if ($@battlecave3 == 2 && $@cave3fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave3 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave3 = 2; + goto L_Summon; + +L_Summon: + $@cave3_loop = $@cave3_loop + 1; + areamonster "025-4",150, 84, 177, 117,"",$@cave3_monsters_IDS[$@cave3_loop],$@cave3_monsters_QTY[$@cave3_loop],"#StartCaveFight3::OnMonsterDeath"; + if ($@cave3_loop <= getarraysize($@cave3_monsters_IDS)) + goto L_Summon; + $@cave3_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave3::OnNoRid"; + end; + +L_Done: + $@wave_cave3 = $@wave_cave3 + 1; + $@cave3_kills = 0; + if (attachrid(getcharid(3,$@cave3fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave3 == 1) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave3 < $@cave3_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE3); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave3_kills = $@cave3_kills + 1; + if ($@cave3_kills >= $@cave3_monsters_QTY[1] + $@cave3_monsters_QTY[2] + $@cave3_monsters_QTY[3] + $@cave3_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,168,117,0 script #CheckCaveFight3 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE3 || $@battlecave3 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave3::OnGetout"; + end; +} + +025-4,39,143,0 script #StartCaveFight4 NPC324,{ + if ($@battlecave4 == 2 && $@cave4fighter$ == strcharinfo(0)) + end; + if ($@battlecave4 == 2 && $@cave4fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave4 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave4 = 2; + goto L_Summon; + +L_Summon: + $@cave4_loop = $@cave4_loop + 1; + areamonster "025-4",28, 124, 57, 156,"",$@cave4_monsters_IDS[$@cave4_loop],$@cave4_monsters_QTY[$@cave4_loop],"#StartCaveFight4::OnMonsterDeath"; + if ($@cave4_loop <= getarraysize($@cave4_monsters_IDS)) + goto L_Summon; + $@cave4_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave4::OnNoRid"; + end; + +L_Done: + $@wave_cave4 = $@wave_cave4 + 1; + $@cave4_kills = 0; + if (attachrid(getcharid(3,$@cave4fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave4 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave4 == 2) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave4 < $@cave4_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE4); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave4_kills = $@cave4_kills + 1; + if ($@cave4_kills >= $@cave4_monsters_QTY[1] + $@cave4_monsters_QTY[2] + $@cave4_monsters_QTY[3] + $@cave4_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,32,156,0 script #CheckCaveFight4 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE4 || $@battlecave4 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave4::OnGetout"; + end; +} + + +025-4,109,143,0 script #StartCaveFight5 NPC324,{ + if ($@battlecave5 == 2 && $@cave5fighter$ == strcharinfo(0)) + end; + if ($@battlecave5 == 2 && $@cave5fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave5 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave5 = 2; + goto L_Summon; + +L_Summon: + $@cave5_loop = $@cave5_loop + 1; + areamonster "025-4",91, 131, 124, 160,"",$@cave5_monsters_IDS[$@cave5_loop],$@cave5_monsters_QTY[$@cave5_loop],"#StartCaveFight5::OnMonsterDeath"; + if ($@cave5_loop <= getarraysize($@cave5_monsters_IDS)) + goto L_Summon; + $@cave5_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave5::OnNoRid"; + end; + +L_Done: + $@wave_cave5 = $@wave_cave5 + 1; + $@cave5_kills = 0; + if (attachrid(getcharid(3,$@cave5fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave5 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave5 == 2) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave5 < $@cave5_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE5); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave5_kills = $@cave5_kills + 1; + if ($@cave5_kills >= $@cave5_monsters_QTY[1] + $@cave5_monsters_QTY[2] + $@cave5_monsters_QTY[3] + $@cave5_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,100,160,0 script #CheckCaveFight5 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE5 || $@battlecave5 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave5::OnGetout"; + end; +} + + +025-4,162,162,0 script #StartCaveFight6 NPC324,{ + if ($@battlecave6 == 2 && $@cave6fighter$ == strcharinfo(0)) + end; + if ($@battlecave6 == 2 && $@cave6fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave6 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave6 = 2; + goto L_Summon; + +L_Summon: + $@cave6_loop = $@cave6_loop + 1; + areamonster "025-4",153, 143, 178, 174,"",$@cave6_monsters_IDS[$@cave6_loop],$@cave6_monsters_QTY[$@cave6_loop],"#StartCaveFight6::OnMonsterDeath"; + if ($@cave6_loop <= getarraysize($@cave6_monsters_IDS)) + goto L_Summon; + $@cave6_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave6::OnNoRid"; + end; + +L_Done: + $@wave_cave6 = $@wave_cave6 + 1; + $@cave6_kills = 0; + if (attachrid(getcharid(3,$@cave6fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave6 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave6 == 2) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave6 < $@cave6_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE6); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave6_kills = $@cave6_kills + 1; + if ($@cave6_kills >= $@cave6_monsters_QTY[1] + $@cave6_monsters_QTY[2] + $@cave6_monsters_QTY[3] + $@cave6_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,159,174,0 script #CheckCaveFight6 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE6 || $@battlecave6 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave6::OnGetout"; + end; +} + + +025-4,44,202,0 script #StartCaveFight7 NPC324,{ + if ($@battlecave7 == 2 && $@cave7fighter$ == strcharinfo(0)) + end; + if ($@battlecave7 == 2 && $@cave7fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave7 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave7 = 2; + goto L_Summon; + +L_Summon: + $@cave7_loop = $@cave7_loop + 1; + areamonster "025-4",27, 185, 61, 219,"",$@cave7_monsters_IDS[$@cave7_loop],$@cave7_monsters_QTY[$@cave7_loop],"#StartCaveFight7::OnMonsterDeath"; + if ($@cave7_loop <= getarraysize($@cave7_monsters_IDS)) + goto L_Summon; + $@cave7_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave7::OnNoRid"; + end; + +L_Done: + $@wave_cave7 = $@wave_cave7 + 1; + $@cave7_kills = 0; + if (attachrid(getcharid(3,$@cave7fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave7 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave7 == 2) + message strcharinfo(0), "I can't give up now!"; + if ($@wave_cave7 == 3) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave7 < $@cave7_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE7); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave7_kills = $@cave7_kills + 1; + if ($@cave7_kills >= $@cave7_monsters_QTY[1] + $@cave7_monsters_QTY[2] + $@cave7_monsters_QTY[3] + $@cave7_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,42,219,0 script #CheckCaveFight7 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE7 || $@battlecave7 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave7::OnGetout"; + end; +} + + +025-4,105,210,0 script #StartCaveFight8 NPC324,{ + if ($@battlecave8 == 2 && $@cave8fighter$ == strcharinfo(0)) + end; + if ($@battlecave8 == 2 && $@cave8fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave8 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave8 = 2; + goto L_Summon; + +L_Summon: + $@cave8_loop = $@cave8_loop + 1; + areamonster "025-4",90, 193, 119, 216,"",$@cave8_monsters_IDS[$@cave8_loop],$@cave8_monsters_QTY[$@cave8_loop],"#StartCaveFight8::OnMonsterDeath"; + if ($@cave8_loop <= getarraysize($@cave8_monsters_IDS)) + goto L_Summon; + $@cave8_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave8::OnNoRid"; + end; + +L_Done: + $@wave_cave8 = $@wave_cave8 + 1; + $@cave8_kills = 0; + if (attachrid(getcharid(3,$@cave8fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave8 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave8 == 2) + message strcharinfo(0), "I can't give up now!"; + if ($@wave_cave8 == 3) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave8 < $@cave8_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE8); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave8_kills = $@cave8_kills + 1; + if ($@cave8_kills >= $@cave8_monsters_QTY[1] + $@cave8_monsters_QTY[2] + $@cave8_monsters_QTY[3] + $@cave8_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,105,216,0 script #CheckCaveFight8 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE8 || $@battlecave8 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave8::OnGetout"; + end; +} + + +025-4,157,220,0 script #StartCaveFight9 NPC324,{ + if ($@battlecave9 == 2 && $@cave9fighter$ == strcharinfo(0)) + end; + if ($@battlecave9 == 2 && $@cave9fighter$ != strcharinfo(0)) + goto L_Cheat; + if (Rossy_Quest < 15) + goto L_Cheat; + if ($@battlecave9 == 1) + goto L_Start; + goto L_Cheat; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave9 = 2; + goto L_Summon; + +L_Summon: + $@cave9_loop = $@cave9_loop + 1; + areamonster "025-4",144, 192, 173, 226,"",$@cave9_monsters_IDS[$@cave9_loop],$@cave9_monsters_QTY[$@cave9_loop],"#StartCaveFight9::OnMonsterDeath"; + if ($@cave9_loop <= getarraysize($@cave9_monsters_IDS)) + goto L_Summon; + $@cave9_loop = 0; + end; + +L_Abort: + donpcevent "#WarpBattleCave9::OnNoRid"; + end; + +L_Done: + $@wave_cave9 = $@wave_cave9 + 1; + $@cave9_kills = 0; + if (attachrid(getcharid(3,$@cave9fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave9 == 1) + message strcharinfo(0), "Oh no, more monsters?!"; + if ($@wave_cave9 == 2) + message strcharinfo(0), "I can't give up now!"; + if ($@wave_cave9 == 3) + message strcharinfo(0), "As soon as you kill the last monster, your vision blacks out and you feel a strange sensation... Maybe it is not healthy to stay in this cave."; + + if ($@wave_cave9 < $@cave9_waves) + goto L_Summon; + cavefights = (cavefights | BATTLE_CAVE9); + BOSS_POINTS = BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnMonsterDeath: + $@cave9_kills = $@cave9_kills + 1; + if ($@cave9_kills >= $@cave9_monsters_QTY[1] + $@cave9_monsters_QTY[2] + $@cave9_monsters_QTY[3] + $@cave9_monsters_QTY[4]) + goto L_Done; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,157,226,0 script #CheckCaveFight9 NPC45,1,1,{ + if (cavefights & BATTLE_CAVE9 || $@battlecave9 == 1) + goto L_Done; + message strcharinfo(0), "You can't get out! Seems like a barrier was created when the energy transmuted itself into monsters."; + end; + +L_Done: + donpcevent "#WarpBattleCave9::OnGetout"; + end; +} + + +025-4,157,30,0 script #StartBossCaveFight NPC325,{ + if ($@battlecave10 == 2 && $@cave10fighter$ == strcharinfo(0)) + end; + if (Rossy_Quest >= 16) + end; + if ($@battlecave10 == 1 && cavefights & BATTLE_CAVE1 && cavefights & BATTLE_CAVE2 && cavefights & BATTLE_CAVE3 && cavefights & BATTLE_CAVE4 && cavefights & BATTLE_CAVE5 && cavefights & BATTLE_CAVE6 && cavefights & BATTLE_CAVE7 && cavefights & BATTLE_CAVE8 && cavefights & BATTLE_CAVE9 && Rossy_Quest == 15) + goto L_Start; + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Start: + menu + "Place a root at the center of the energy source.", L_PlaceCenter, + "I am not prepared yet!", L_close; + +L_PlaceCenter: + if ((countitem("Root")<1)) + goto L_No_root; + close2; + delitem "Root", 1; + message strcharinfo(0), "As you place the root on the energy source, earth monsters seem to emerge from the ground."; + $@battlecave10 = 2; + goto L_Summon; + +L_Summon: + $@cave10_loop = $@cave10_loop + 1; + areamonster "025-4",142, 24, 172, 48,"",$@cave10_monsters_IDS[$@cave10_loop],$@cave10_monsters_QTY[$@cave10_loop],"#StartBossCaveFight::OnMonsterDeath"; + if ($@cave10_loop <= getarraysize($@cave10_monsters_IDS)) + goto L_Summon; + $@cave10_loop = 0; + end; + +L_SummonBoss: + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort; + areamonster "025-4",142, 24, 172, 48,"",$@cave10_boss_ID,1,"#StartBossCaveFight::OnBossDeath"; + stopnpctimer; + end; + +L_Abort: + donpcevent "#WarpBossCave::OnNoRid"; + end; + +L_Done: + $@wave_cave10 = $@wave_cave10 + 1; + $@cave10_kills = 0; + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort; + + + if ($@wave_cave10 == 1) + message strcharinfo(0), "I can't give up now!"; + if ($@wave_cave10 == 2) + message strcharinfo(0), "I feel I'm getting close to the end..."; + if ($@wave_cave10 == 3) + message strcharinfo(0), "What? This is harder than I imagined!"; + if ($@wave_cave10 == 4) + message strcharinfo(0), "Finally! It seems I have defeated all of them!"; + + if ($@wave_cave10 < $@cave10_waves) + goto L_Summon; + $@wave_cave10 = 5; + @boss = 0; + initnpctimer; + end; + +OnTimer4000: + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort; + @boss = @boss + 1; + if (@boss == 1) + message strcharinfo(0), "You feel something strange... Looks like something terrible is about to show up in this cave."; + if (@boss == 2) + goto L_SummonBoss; + setnpctimer 0; + end; + +OnMonsterDeath: + $@cave10_kills = $@cave10_kills + 1; + if ($@cave10_kills >= $@cave10_monsters_QTY[1] + $@cave10_monsters_QTY[2] + $@cave10_monsters_QTY[3] + $@cave10_monsters_QTY[4]) + goto L_Done; + end; + +OnBossDeath: + if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort; + message strcharinfo(0), "What a harsh battle... You should hurry and save Julia!"; + Rossy_Quest = 16; + getexp 100000, 0; + BOSS_POINTS = BOSS_POINTS + 50; + message strcharinfo(0), "You gain 50 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +L_close: + close; + +L_No_root: + mes "I don't have any roots in my inventory!"; + close; + +} + + +025-4,157,48,0 script #CheckCaveFightBoss NPC45,1,1,{ + if (Rossy_Quest >= 17) + goto L_Done; + if (Rossy_Quest == 16) + goto L_Julia; + if (Rossy_Quest < 16 && $@battlecave10 == 1) + goto L_Out; + if (Rossy_Quest < 16 && $@battlecave10 == 2) + goto L_Julia; + end; + +L_Julia: + message strcharinfo(0), "I shouldn't leave yet. Julia is still in danger."; + end; + +L_Done: + warp "025-3", 77, 168; + end; + +L_Out: + donpcevent "#WarpBossCave::OnGetout"; + end; +} + + +025-4,157,24,0 script #CheckJuliaCaveOutside NPC45,1,1,{ + if (Rossy_Quest > 15) + goto L_Done; + message strcharinfo(0), "As you try to walk through, you bump into a strong magical barrier."; + heal ((MaxHp/100) * -10), 0; + end; + +L_Done: + donpcevent "#WarpBossCave::OnWin"; + end; +} + + +025-4,93,35,0 script #CheckJuliaCaveInside NPC45,1,1,{ + if (Rossy_Quest >= 17) + goto L_Done; + if (Rossy_Quest == 16) + goto L_Save; + if (Rossy_Quest <= 15) + goto L_Cheat; + end; + +L_Cheat: + message strcharinfo(0), "You shouldn't be here, you cheater."; + heal -Hp, 0; + end; + +L_Done: + message strcharinfo(0), "As you go back to the cave you close your eyes, terrified of the bloody battle you just fought in this place, and feel your way back to the entrance of the cave."; + warp "025-3", 77, 168; + end; + +L_Save: + message strcharinfo(0), "You can't leave Julia here, all alone!"; + end; +} + diff --git a/npc/025-4/clauquer.txt b/npc/025-4/clauquer.txt new file mode 100755 index 00000000..5067d853 --- /dev/null +++ b/npc/025-4/clauquer.txt @@ -0,0 +1,114 @@ + +025-4,30,30,0 script Clauquer NPC169,{ + if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_Rescued; + if (Rossy_Quest == 15) goto L_Hmmm; + if (Rossy_Quest == 14) goto L_Help; + if (Rossy_Quest <= 13) goto L_Huh; + goto L_Help; + +L_Help: + mes "[Clauquer]"; + mes "\"Hello stranger, are you lost?\""; + next; + mes "\"Don't answer, I know you are looking for someone... A little girl, is that right?\""; + next; + menu + "I must admit you're right, but how come you...", L_LittleGirl, + "I'm not lost and I don't need help, bye.", L_No; + +L_LittleGirl: + mes "[Clauquer]"; + mes "\"How do I know you're looking for her? Well, because I am a very good observer. I know you were helping her family. Besides, I saw the little girl. I also heard her. She screamed, and probably still screams like hell. Moreover, I don't think you would enter these caves just for fun!\""; + next; + menu + "Of course not.", L_Next; + +L_Next: + mes "[Clauquer]"; + mes "\"I can see that you really want to save the little girl. She is trapped in a place inside one of these caves, protected by a magic barrier created by a fey spirit. To save her, you have to annulate the energy sources of this barrier. They are located in 10 different spots, each one in a different cave.\""; + next; + menu + "But how can I annulate this barrier?", L_ButBarrier; + +L_ButBarrier: + mes "\"It is simple, you just have to place a root on the exact center of the energy source. Once you do this, its entire power will transmute into some terrible earth monsters. If you defeat them, this source of energy will be close to nothing and the barrier will be weaker.\""; + next; + mes "\"If my observations are correct, the girl is trapped in a cave protected by a barrier fed by 9 different power sources. And inside this cave, there is another barrier, fed by a single, but very strong, power source. The girl is inside that cave, protected by that strong barrier.\""; + next; + mes "\"Be prepared before you enter one of those caves, because once you put the root in the power source, you won't be able to get out. Also, remember that you can't stay in those caves for a long time, because of the foul air.\""; + next; + mes "\"Now I should tell you more about how that little girl got into that cave and warn you about what you are going to face there...\""; + next; + menu + "Please go on.", L_Advice; + +L_Advice: + mes "[Clauquer]"; + mes "\"I advise you to be mentally prepared for this rescue operation. A fey nature spirit kidnapped the little girl and is planning to replace her with a changeling.\""; + next; + mes "\"The old tales of Hurnscald say this spirit always exchanges his offspring with beautiful and smart human children, to use them as servants. And his offspring usually forget about their own origin, growing up in a human family. But they are usually 'people' with really bad tempers, the kind of people who do terrible things in this world...\""; + next; + mes "However, the girl you are looking for is mentally too strong, and the spirit is having problems creating a changeling identical to her. So it locked her in one of those terrible caves, trying to scare the poor girl and make his task easier.\""; + next; + mes "\"Oh, and if you really plan to rescue the girl, I advise you to use potions for every single battle. I'm thinking of Concentration and Iron Potions. You might want to take some food with you too. I would personally take some water, I'm always thirsty. Don't be afraid to bring too much with you, these battles take time to end.\""; + next; + mes "\"I think you're now ready to explore these caves and fight.\""; + if (Rossy_Quest == 14) set Rossy_Quest, 15; + close; + +L_Hmmm: + @cleaned_caves = 0; + if (cavefights & BATTLE_CAVE1) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE2) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE3) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE4) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE5) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE6) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE7) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE8) + @cleaned_caves = @cleaned_caves + 1; + if (cavefights & BATTLE_CAVE9) + @cleaned_caves = @cleaned_caves + 1; + mes "[Clauquer]"; + mes "\"You already know everything about these caves. You don't need me anymore to find the little girl.\""; + next; + menu + "But please, I really need your help!", L_NeedYourHelp, + "Oh, so many caves! Do you know how many are still left?", L_Feedback, + "You're right, I don't need your help!", L_No; + +L_NeedYourHelp: + mes "\"Ok, if you insist... But I can only repeat what I already said.\""; + goto L_Advice; + +L_Feedback: + if (@cleaned_caves > 0 + && @cleaned_caves < 9) + mes "\"You are doing good... If I am right, you already eliminated " + @cleaned_caves + " of the 9 energy sources of the barrier that protects the cave in which Julia is hidden.\""; + if (@cleaned_caves == 9) + mes "\"I am amazed... You eliminated all the 9 energy sources. Now is the difficult part. To save Julia, you need to eliminate the last and most powerful barrier. Good Luck!\""; + if (@cleaned_caves <= 0) + mes "\"Well... You didn't eliminate any of the barriers, so that means there are still 9 caves and the tenth one, the strongest...\""; + close; + +L_Huh: + mes "[Clauquer]"; + mes "\"Why are you here? Get out.\""; + close; + +L_No: + close; + +L_Rescued: + mes "[Clauquer]"; + mes "\"I'm very impressed!"; + mes "Now this fey nature spirit will never kidnap a poor child again.\""; + close; +} diff --git a/npc/025-4/julia.txt b/npc/025-4/julia.txt new file mode 100755 index 00000000..1b64edeb --- /dev/null +++ b/npc/025-4/julia.txt @@ -0,0 +1,44 @@ + +025-4,89,21,0 script Julia NPC114,{ + @Reward_Exp = 5000; + + if (Rossy_Quest > 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_End; + if (Rossy_Quest == 16) goto L_Done; + if (Rossy_Quest <= 15) goto L_Hmmm; + goto L_Done; + +L_Done: + mes "[Julia]"; + mes "\"I heard some battle noises a few minutes ago. Are you here to save me?\""; + next; + menu + "Of course I'm here to save you, Rossy sent me here!", L_Next; + +L_Next: + mes "\"Rossy? My twin sister? I knew she was going to look for me. Thank you so much, here is a present for you.\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_TooMany; + getitem "BlackBoots", 1; + getexp @Reward_Exp, 0; + Rossy_Quest = 17; + mes "\"I'm out of here now, lets get out of this horrible cave.\""; + close; + +L_End: + mes "[Julia]"; + mes "\"Lets get out of this horrible cave.\""; + close; + +L_Hmmm: + mes "[Julia]"; + mes "\"Don't hurt me!\""; + close; + +L_TooMany: + mes "[Julia]"; + mes "\"Oh, you don't have room for it. Come back when your backpack isn't full.\""; + next; + mes "\"I'll wait here until I can give your present to you!\""; + close; +} diff --git a/npc/025-4/mapflags.txt b/npc/025-4/mapflags.txt new file mode 100755 index 00000000..a5a1cf62 --- /dev/null +++ b/npc/025-4/mapflags.txt @@ -0,0 +1,2 @@ +025-4 mapflag nosave 025-1,33,50 +//025-4 mapflag resave 025-1,33,50 diff --git a/npc/026-1/_import.txt b/npc/026-1/_import.txt new file mode 100644 index 00000000..1b4477e7 --- /dev/null +++ b/npc/026-1/_import.txt @@ -0,0 +1,11 @@ +// Map 026-1: Asphodel Moor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/026-1/_mobs.txt", +"npc/026-1/_warps.txt", +"npc/026-1/evil_guard.txt", +"npc/026-1/headless_man.txt", +"npc/026-1/husband.txt", +"npc/026-1/mapflags.txt", +"npc/026-1/sign.txt", +"npc/026-1/soul-menhir.txt", +"npc/026-1/traveler.txt", diff --git a/npc/026-1/_mobs.txt b/npc/026-1/_mobs.txt new file mode 100644 index 00000000..307e8b45 --- /dev/null +++ b/npc/026-1/_mobs.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 026-1: Asphodel Moor mobs +026-1,0,0,0,0 monster Silkworm 1040,34,120000,40000 +026-1,0,0,0,0 monster Grass Snake 1042,34,120000,40000 +026-1,0,0,0,0 monster Iron Vein 1047,34,120000,40000 +026-1,0,0,0,0 monster Mana Bug 1035,10,300000,60000 +026-1,0,0,0,0 monster Little Green Slime 1025,8,300000,40000 +026-1,49,31,28,7 monster Desert Snake 1077,4,100000,30000 +026-1,50,31,26,5 monster Desert Scorpion 1078,4,100000,30000 +026-1,56,77,33,15 monster Desert Snake 1077,4,100000,30000 +026-1,57,77,29,11 monster Desert Scorpion 1078,4,100000,30000 +026-1,110,59,15,37 monster Desert Snake 1077,4,100000,30000 +026-1,110,59,14,35 monster Desert Scorpion 1078,4,100000,30000 +026-1,110,59,15,37 monster Black Slime 1079,4,100000,30000 +026-1,57,79,34,16 monster Black Slime 1079,4,100000,30000 +026-1,48,31,27,6 monster Black Slime 1079,4,100000,30000 diff --git a/npc/026-1/_warps.txt b/npc/026-1/_warps.txt new file mode 100644 index 00000000..33727884 --- /dev/null +++ b/npc/026-1/_warps.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 026-1: Asphodel Moor warps +026-1,63,16,0 warp #026-1_63_16 0,0,027-1,63,105 +026-1,129,66,0 warp #026-1_129_66 0,0,025-1,20,66 +026-1,48,39,0 warp #026-1_48_39 0,0,026-2,29,33 +026-1,43,24,0 warp #026-1_43_24 0,0,026-2,31,128 +026-1,25,20,0 warp #026-1_25_20 0,0,026-2,22,95 diff --git a/npc/026-1/evil_guard.txt b/npc/026-1/evil_guard.txt new file mode 100755 index 00000000..8f6e3c09 --- /dev/null +++ b/npc/026-1/evil_guard.txt @@ -0,0 +1,26 @@ +026-1,50,32,0 script Blackwin NPC316,{ + mes "..."; + next; + mes "The guard glares at you, silently daring you to try something."; + next; + mes "[Evil Guard]"; + mes "\"Heed my warning, young human. My master will suffer no fools here.\""; + next; + mes "[Evil Guard]"; + mes "\"He created this as a place of leisure, and we are here to ensure that it remains undisturbed.\""; + close; +} + +026-1,29,28,0 script Forwin NPC316,{ + mes "[Evil Guard]"; + mes "\"" + strcharinfo(0) + "...\""; + next; + mes "[Evil Guard]"; + mes "\"I am your father...\""; + next; + mes "There is an awkward pause, and then the guard bursts out laughing."; + mes ""; + mes "[Evil Guard]"; + mes "\"Just kidding! Can you imagine Golbenez's reaction if we had such puny offspring?\""; + close; +} diff --git a/npc/026-1/headless_man.txt b/npc/026-1/headless_man.txt new file mode 100755 index 00000000..f70809de --- /dev/null +++ b/npc/026-1/headless_man.txt @@ -0,0 +1,202 @@ + +026-1,34,30,0 script Thurstan NPC318,{ + @Graveyard_Inn_MASK = NIBBLE_6_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_6_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @Wisp_Powder = 50; + @Polt_Powder = 50; + @Spec_Powder = 50; + @iron_Pot = 50; + @Conc_Pot = 30; + @Red_Dye = 50; + @Yellow_Dye = 50; + @LB_Dye = 50; + + @Glue_Exp = 50000; + + if (@state >= 3) goto L_Final; + if (@state == 2) goto L_Quest_finished; + if (@state == 1) goto L_Quest_progress; + + mes "You see a man, propped up against the foot of the tree."; + mes "In his hand, he is holding what you assume to be his own head."; + next; + mes "You jump back a bit, startled, as the head starts talking to you!"; + mes "It's a little strange watching him talk, but it's better than looking at what's left of his neck."; + next; + if (BaseLevel < 85) + goto L_greet; + mes "[Headless Man]"; + mes "\"Hello. My name is Thurstan. Could I ask your assistance with something? I seem to be in a spot of difficulty.\""; + menu + "I'll listen, just keep that thing from dripping on me.", L_Quest_ask, + "Ack, a bloody talking head! Gross, no way!", L_close; + +L_greet: + mes "[Headless Man]"; + mes "\"Greetings! Do you have any duck tape?\""; + goto L_close; + +L_Quest_ask: + mes "[Thurstan]"; + mes "\"A little while ago there was a patron visiting the inn...I can't remember his name now. He noticed this predicament I am in and offered to help me. He told me that he was an alchemist and that he had a recipe for an adhesive that would keep my head where it's supposed to be. Unfortunately, he wasn't able to stay long enough to gather all the ingredients for the spell, so he gave me the recipe instead. However, it's rather hard to gather things when I have to carry it around all day.\""; + next; + mes "[Thurstan]"; + mes "\"I have a list of items and how many of each are needed. Would you mind gathering them for me?\""; + menu + "Lay it on me, Mr. Noggin!", L_Quest_start, + "Sorry, I'm kinda busy with, you know, living.", L_Quest_no; + +L_Quest_start: + mes "[Thurstan]"; + mes "\"Great! I will need the following things.\""; + mes "\"" + @Wisp_Powder + " Wisp Powder,\""; + mes "\"" + @Polt_Powder + " Poltergeist Powder,\""; + mes "\"" + @Spec_Powder + " Spectre Powder,\""; + mes "\"" + @iron_Pot + " Iron Potion,\""; + mes "\"" + @Conc_Pot + " Concentration Potion,\""; + mes "\"" + @Red_Dye + " vials of Red Dye,\""; + mes "\"" + @Yellow_Dye + " vials of Yellow Dye,\""; + mes "\"and...\""; + mes "\"" + @LB_Dye + " vials of Light Blue Dye,\""; + next; + mes "[Thurstan]"; + mes "\"My friend also said that I should use a metal bowl instead of a wooden one. I don't have one and I think a cauldron from the kitchen would be too big. Perhaps we could use an Infantry Helmet to serve that task.\""; + next; + mes "[Thurstan]"; + mes "\"I know it probably doesn't seem like that much to you, but it is a really big deal for me. I will try to find something to compensate you for your efforts.\""; + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_Quest_no: + mes "[Thurstan]"; + mes "\"Very well. Just don't come looking to me when your own head falls off!\""; + goto L_close; + +L_Quest_progress: + mes "[Thurstan]"; + mes "Have you managed to find those items yet?\""; + menu + "Yes, here you go!", L_Quest_check, + "What was I supposed to get again?", L_Quest_items, + "No, I'm still working on it.", L_close; + +L_Quest_check: + if (countitem("WispPowder") < @Wisp_Powder + || countitem("PoltergeistPowder") < @Polt_Powder + || countitem("SpectrePowder") < @Spec_Powder + || countitem("IronPotion") < @iron_Pot + || countitem("ConcentrationPotion") < @Conc_Pot + || countitem("RedDye") < @Red_Dye + || countitem("YellowDye") < @Yellow_Dye + || countitem("LightBlueDye") < @LB_Dye + || countitem("InfantryHelmet") < 1) + goto L_Quest_notenough; + + delitem "WispPowder", @Wisp_Powder; + delitem "PoltergeistPowder", @Polt_Powder; + delitem "SpectrePowder", @Spec_Powder; + delitem "IronPotion", @iron_Pot; + delitem "ConcentrationPotion", @Conc_Pot; + delitem "RedDye", @Red_Dye; + delitem "YellowDye", @Yellow_Dye; + delitem "LightBlueDye", @LB_Dye; + delitem "InfantryHelmet", 1; + getexp @Glue_Exp, 0; + mes "[Thurstan]"; + mes "\"Excellent, excellent!\""; + mes ""; + mes "Thurstan takes your ingredients and seperates them into little piles according to some complex formula he is reading, seemingly from the tops of his shoes."; + next; + mes "[Thurstan]"; + mes "\"Now if I could prevail upon you to mix the ingredients according to the instructions I have here, I would be greatly indebted.\""; + next; + mes "You mix the powders together in the Infantry bowl, adding potions and dyes as instructed. Gradually, the concoction starts to get tacky and takes on a hue similar to Thurstan's skin."; + mes "You can see him starting to get excited beside you..."; + next; + mes "[Thurstan]"; + mes "\"Oh this is perfect! I'll be back in action in no time!\""; + next; + mes "Thurstan covers the base of his neck with a thick coat of the glue using his free hand. He then lifts his head in both hands, places it on the layer of adhesive, and makes some minor adjustments to the position. He mutters an incantation that you can't make out and the wound across his neck seems to fade away."; + misceffect sfx_magic_transmute; + next; + mes "Thurstan is practically jumping for joy now."; + mes ""; + mes "[Thurstan]"; + mes "\"Thank you so much! That is such a weight on my shoulders! Now that I have some mobility back, let me see what I can do to repay you. Would you mind coming back in a few minutes?\""; + @state = 2; + callsub S_Update_Mask; + goto L_close; + +L_Quest_notenough: + mes "Thurstan quickly looks through the items you've brought."; + mes "[Thurstan]"; + mes "\"It seems you are missing a few things. Please come back once you have everything on the list.\""; + goto L_close; + +L_Quest_items: + mes "[Thurstan]"; + mes "\"" + @Wisp_Powder + " Wisp Powder,\""; + mes "\"" + @Polt_Powder + " Poltergeist Powder,\""; + mes "\"" + @Spec_Powder + " Spectre Powder,\""; + mes "\"" + @iron_Pot + " Iron Potion,\""; + mes "\"" + @Conc_Pot + " Concentration Potion,\""; + mes "\"" + @Red_Dye + " vials of Red Dye,\""; + mes "\"" + @Yellow_Dye + " vials of Yellow Dye,\""; + mes "\"" + @LB_Dye + " vials of Light Blue Dye,\""; + mes "\"We'll also need 1 Infantry Helmet to use as a bowl for mixing everything together.\""; + goto L_close; + +L_Quest_finished: + mes "[Thurstan]"; + mes "\"Thank you for all your help.\""; + next; + mes "[Thurstan]"; + mes "\"It worked well and the bond seemed to be holding for a while. Then I started feeling a strange tingling in my neck. I suppose that was the adhesive starting to dissolve. I was leaned over my trunk digging around for something appropriate to give you..Aaaand once again my head left it's proper place.\""; + next; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + mes "[Thurstan]"; + mes "\"Please take this for your efforts. I got it in payment of some work I did protecting the pinkie population from a terrible scourge some time ago.\""; + getitem "PinkieHelmet", 1; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Full_Inv: + mes "[Thurstan]"; + mes "\"I'd like to give you something for your efforts, but you're carrying too much stuff.\""; + goto L_close; + +L_Final: + mes "[Thurstan]"; + mes "\"I guess I will need to find another way to re-attach my cranium. If you come across any good alchemists who might be able to help, please let me know.\""; + goto L_close; + +L_close: + + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @Wisp_Powder = 0; + @Polt_Powder = 0; + @Spec_Powder = 0; + @iron_Pot = 0; + @Conc_Pot = 0; + @Red_Dye = 0; + @Yellow_Dye = 0; + @LB_Dye = 0; + @Glue_Exp = 0; + close; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; + +} diff --git a/npc/026-1/husband.txt b/npc/026-1/husband.txt new file mode 100755 index 00000000..922a554c --- /dev/null +++ b/npc/026-1/husband.txt @@ -0,0 +1,344 @@ + +026-1,40,41,0 script Hamond NPC319,{ + @Graveyard_Inn_MASK = NIBBLE_3_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_3_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @Graveyard_Inn_Woman_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_Woman_SHIFT = NIBBLE_0_SHIFT; + + @woman = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Woman_MASK) >> @Graveyard_Inn_Woman_SHIFT); + + @Graveyard_Inn_Kid_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_Kid_SHIFT = NIBBLE_2_SHIFT; + + @kidstate = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Kid_MASK) >> @Graveyard_Inn_Kid_SHIFT); + + @Graveyard_Inn_Golbenez_MASK = NIBBLE_4_MASK; + @Graveyard_Inn_Golbenez_SHIFT = NIBBLE_4_SHIFT; + + @golbanez = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbenez_MASK) >> @Graveyard_Inn_Golbenez_SHIFT); + + @minLevel = 85; + @iCE_CUBE_AMOUNT = 100; + @iCE_CUBE_EXP = 75000; + @BONE_AMOUNT = 100; + @SKULL_AMOUNT = 75; + @BONE_EXP = 100000; + set @RUBY_AMOUNT, 25; // caution, this value needs to be the same as in the innkeepers script! + + if (@state >= 7) goto L_Thanks; + if (@state == 6) goto L_Apologize; + if (@state == 5) goto L_Waiting; + if (@state == 4) goto L_News; + if (@state == 3) goto L_Brought_Bones; + if (@state == 2) goto L_Check_Bones; + if (@state == 1) goto L_Ice_Cube; + + mes "[Pale Man]"; + mes "\"Hello, My name is Hamond. I run the inn together with my beautiful wife Reid. If there is anything I can do for you, please let me know.\""; + if (BaseLevel < @minLevel) + goto L_close; + next; + menu + "I'd like to know why all the people in here are dead.",L_Next, + "Are you feeling well? You look very pale... In fact, deathly pale.",L_Next, + "Thank you, but I'm fine.", L_close; + +L_Next: + mes "Hamond seems very confused. Then he notices the grey color of his hands and begins to shake his head in panic."; + mes "[Hamond]"; + mes "\"WHAT IS THIS?\""; + next; + mes "Because of the fast movement of his head, it hinges back in his neck along a cut in his throat.. a deep cut you didn't notice before."; + next; + mes "You're trying hard not to run away screaming. Instead, you grab his hair and pull his head back into place."; + next; + mes "Hamond blinks a few times, with a puzzled look on his face."; + mes "[Hamond]"; + mes "\"That was uncomfortable! I guess you are right. I am dead. Weird.\""; + next; + mes "\"How can I be dead if I am walking around and talking? This is very strange. \""; + next; + mes "\"But nevertheless, I will continue to run the inn and do my best to make all our patrons happy and satisfied - be they alive or dead.\""; + next; + menu + "Can I help with that?", L_Continue; + +L_Continue: + mes "[Hamond]"; + mes "\"Help me? Normally I would never ask you for this, but actually, I do need something to cool the drinks. Maybe you can find something.\""; + + @state = 1; + callsub S_Update_Mask; + + goto L_close; + +L_Ice_Cube: + mes "[Hamond]"; + mes "\"Hello my friend! Good to see you again. Did you find something to cool the drinks?\""; + next; + + if ((@kidstate == 4) + && countitem("IceCube") > 0) + menu + "Maybe this never melting Ice Cube?", L_Check_Ice, + "I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I'm still searching.", L_close; + if (@kidstate == 4) + menu + "I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I'm still searching.", L_close; + if (countitem("IceCube") > 0) + menu + "Maybe this never melting Ice Cube?", L_Check_Ice, + "I'm still searching.", L_close; + mes "\"You didn't? Too bad.\""; + goto L_close; + +L_Check_Ice: + if (countitem("IceCube") < @iCE_CUBE_AMOUNT) + goto L_Not_Enough_Cubes; + delitem "IceCube", @iCE_CUBE_AMOUNT; + + getexp @iCE_CUBE_EXP, 0; + + @state = 2; + callsub S_Update_Mask; + + mes "[Hamond]"; + mes "\"Yes, wonderful! That's exactly what I need.\""; + next; + mes "\"I put all my effort in making the inn a run well for my beloved Reid.\""; + next; + mes "\"You know, she had a very hard childhood.\""; + next; + mes "\"Her parents were the former owners of the inn. But they had some problems and the inn wasn't running well.\""; + next; + mes "\"Also they died very early and Reid was so lonely and sad. She is such a wonderful woman, I'd do anything for her.\""; + next; + mes "He mumbles the next sentence as if to himself."; + next; + mes "\"And I won't let a wannabe mage take her away from me...\""; + next; + menu + "What do you mean?",L_More; + +L_More: + mes "[Hamond]"; + mes "\"Nevermind, nevermind. I'd like to ask you for another favor, if I might.\""; + next; + mes "\"A patron asked for - uhm, bones. He said he needed to replace some of his bones, which were damaged in a scuffle with mortals.\""; + next; + mes "\"I know, this is a bit strange - I'm still getting used to being dead. But a patron's wish is a patron's wish!\""; + next; + mes "\"Can you bring me a huge amount of bones and skulls? This way I can fulfill that peculiar wish and make another patron very happy!\""; + goto L_close; + +L_Check_Bones: + mes "[Hamond]"; + mes "\"Welcome back! Let me see what you have.\""; + if ((countitem("Bone") < @BONE_AMOUNT) + || (countitem("Skull") < @SKULL_AMOUNT)) + goto L_Not_Enough_B; + delitem "Bone", @BONE_AMOUNT; + delitem "Skull", @SKULL_AMOUNT; + + getexp @BONE_EXP, 0; + + @state = 3; + callsub S_Update_Mask; + goto L_Brought_Bones; + +L_Brought_Bones: + mes "[Hamond]"; + mes "\"Thanks for your help! Now I'll be able to satisfy another strange request from one of our patrons.\""; + next; + + if ((@kidstate == 4) + && (@woman > 5)) + menu + "Would you tell me about this mage named Savaric?", L_Savaric, + "I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "You're welcome.", L_close; + if (@kidstate == 4) + menu + "I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "You're welcome.", L_close; + if (@woman > 5) + menu + "Would you tell me about this mage named Savaric?", L_Savaric, + "You're welcome.",L_Welcome; + goto L_Welcome; + +L_Welcome: + mes "[Hamond]"; + mes "\"Please make yourself at home.\""; + goto L_close; + +L_Savaric: + mes "Hamond's face turns into an ugly grimace."; + mes "[Hamond]"; + mes "\"That cheeky egomaniac - \""; + next; + + if (@kidstate < 7) + goto L_Problem; + mes "\"Well, I have been thinking about you. You seem to be a very helpful and wise person. Even my son told me good things about you, making a long speech about how great you are and your ability to comprehend and deal with delicate matters. I wonder how he reached that conclusion... But anyway, I'll tell you about Savaric.\""; + next; + goto L_Jealousy; + +L_Jealousy: + mes "[Hamond]"; + mes "\"Savaric calls himself the first apprentice of a great wizard and seems to hold his head very high because of that. Pah, that snooty-nosed little upstart.\""; + next; + mes "\"Don't get me wrong, usually I'm a very open minded man, everyone can live their life as ever they like. But I never saw a wizard do anything good. They're in their books and ancient riddles and speaking with demons and whatever else they might come up with.\""; + next; + mes "\"But do they care for normal people? I've never seen that. And not only that! This Savaric guy seems to think it is fun to play games with my wife.\""; + next; + mes "Hamond seems to nearly burst with anger."; + next; + mes "\"I guess, they think I don't see what they are doing! But they are flirting all the time, my poor Reid seems unable to have a straight thought anymore.\""; + next; + mes "\"I already thought about throwing him out of the inn - but he is a patron! I can't be rude to a patron.\""; + next; + mes "\"Ah, this is annoying.\""; + @state = 4; + callsub S_Update_Mask; + goto L_close; + +L_Problem: + mes "[Hamond]"; + mes "\"To be honest, I think I'd only be able to talk about such a complicated matter if I am sure I am sharing my feelings with a good, wise and understanding person. No offense, it is just that I barely know you...\""; + goto L_close; + +L_Ring: + mes "[Hamond]"; + mes "\"Well.. this is just a cheap ring. It is very popular with the young kids, especially the magic students.\""; + next; + mes "\"They say the ring increases 'magic attack' if you add a sapphire gem to it... But, in fact, I think these kids are delusional. Magic, pah.\""; + next; + mes "\"Anyway, I remember you could easily find one of these in a lot of small shops in town. I am pretty sure that whoever lost it won't bother coming all the way back to get it.\""; + @kidstate = 5; + callsub S_Update_Mask_Kid; + goto L_close; + +L_News: + mes "[Hamond]"; + mes "\"Ah, dear friend. How are you?\""; + if (@golbanez < 5) + menu + "I'm enjoying myself.",L_close; + menu + "I'm enjoying myself.",L_close, + "I found out what happened to you and this place.",L_FoundOut; + +L_FoundOut: + mes "[Hamond]"; + mes "\"You did? Amazing! Please tell me.\""; + next; + mes "You explain to him how you came here, the results of your research and what Golbenez showed to you."; + next; + mes "[Hamond]"; + mes "\"WHAT? This is just crazy! But - you've shown me that you're trustworthy. This must be the truth.\""; + next; + mes "\"But still, it is hard to believe - I can't imagine I would ever hurt Reid and that she - that she would cheat on me.\""; + next; + mes "\"How did this come about? What did I do wrong? I should have shown her my love more. I should have protected her from the allurements of that sneaky mage. And I - I should have never ever hurt her.\""; + next; + mes "Hamond seems about to break down."; + menu + "Maybe it was just fate.",L_HamondFate, + "You got very upset, don't blame yourself",L_HamondFate, + "You're right. You were very violent. How could you do that if you love her?",L_HamondFate; + +L_HamondFate: + mes "[Hamond]"; + mes "\"I- I need to apologize.\""; + next; + mes "\"" + strcharinfo(0) + "! Can you help me once more? Please get " + @RUBY_AMOUNT + " Rubies and bring them to her as a symbol of my love and my remorse.\""; + @state = 5; + callsub S_Update_Mask; + goto L_close; + +L_Waiting: + mes "[Hamond]"; + mes "\"Did you bring Reid the " + @RUBY_AMOUNT + " Rubies?\""; + goto L_close; + +L_Apologize: + mes "[Hamond]"; + mes "\"I thank you! Reid came to me to talk about what happened.\""; + next; + mes "\"We talked about all the stuff that happened. It's hard for me, but I accepted her feelings for that mage. I mean - we are dead! And we have to stay in this place together for the rest of eternity! This is just perverted.\""; + next; + mes "\"But whatever, we need to get along with each other someway and I won't be the one who makes this difficult.\""; + next; + mes "\"And frankly, it gives me a bitter satisfaction that they long for each other but can't touch each other.\""; + next; + mes "\"However, you are a great friend and did a lot for me. I want you to have this.\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + getitem "BowlerHatBrown", 1; + @state = 7; + callsub S_Update_Mask; + goto L_close; + +L_Thanks: + mes "[Hamond]"; + mes "\"Good to see you, my friend! The inn is running well and I'm getting used to being dead.\""; + goto L_close; + +L_Not_Enough_B: + if (countitem("Bone") < @BONE_AMOUNT) + mes "\"I need more Bones than you have with you right now.\""; + if (countitem("Skull") < @SKULL_AMOUNT) + mes "\"Maybe you should come back with more Skulls than you have now. I don't think it is enough.\""; + goto L_close; + +L_Not_Enough_Cubes: + mes "[Hamond]"; + mes "\"Yes, they look good! But I think I need more of them. Maybe " + @iCE_CUBE_AMOUNT + "?\""; + goto L_close; + +L_Full_Inv: + mes "[Hamond]"; + mes "\"You have a really full backpack, haven't you? Come back when you have some room in there.\""; + goto L_close; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @Graveyard_Inn_Woman_MASK = 0; + @Graveyard_Inn_Woman_SHIFT = 0; + @woman = 0; + @Graveyard_Inn_Kid_MASK = 0; + @Graveyard_Inn_Kid_SHIFT = 0; + @Graveyard_Inn_Golbenez_MASK = 0; + @Graveyard_Inn_Golbenez_SHIFT = 0; + @golbanez = 0; + @kidstate = 0; + @minLevel = 0; + @iCE_CUBE_AMOUNT = 0; + @iCE_CUBE_EXP = 0; + @BONE_AMOUNT = 0; + @SKULL_AMOUNT = 0; + @BONE_EXP = 0; + @RUBY_AMOUNT = 0; + close; + +S_Update_Mask_Kid: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_Kid_MASK)) + | (@kidstate << @Graveyard_Inn_Kid_SHIFT); + return; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-1/mapflags.txt b/npc/026-1/mapflags.txt new file mode 100755 index 00000000..7f94c379 --- /dev/null +++ b/npc/026-1/mapflags.txt @@ -0,0 +1,2 @@ +//026-1 mapflag resave 026-1,28,35 +026-1 mapflag outside diff --git a/npc/026-1/sign.txt b/npc/026-1/sign.txt new file mode 100755 index 00000000..96893a95 --- /dev/null +++ b/npc/026-1/sign.txt @@ -0,0 +1,6 @@ + +026-1,64,16,0 script Sign NPC400,{ + mes "Hurnscald's Graveyard is north of here."; + mes "BEWARE!"; + close; +} diff --git a/npc/026-1/soul-menhir.txt b/npc/026-1/soul-menhir.txt new file mode 100755 index 00000000..6b373861 --- /dev/null +++ b/npc/026-1/soul-menhir.txt @@ -0,0 +1,15 @@ + +026-1,29,34,0 script Soul Menhir#deadmire NPC351,{ + @map$ = "026-1"; + setarray @Xs, 28, 29, 30, 28, 30, 28, 30; + setarray @Ys, 32, 33, 34, 32, 34, 32, 34; + @x = 0; + @y = 0; + callfunc "SoulMenhir"; + @map$ = ""; + cleararray @Xs[0], 0, 7; + cleararray @Ys[0], 0, 7; + @x = 0; + @y = 0; + close; +} diff --git a/npc/026-1/traveler.txt b/npc/026-1/traveler.txt new file mode 100755 index 00000000..1f263fe7 --- /dev/null +++ b/npc/026-1/traveler.txt @@ -0,0 +1,7 @@ + +026-1,49,46,0 script Styx the Traveler NPC103,{ + @npcname$ = "Styx"; + @NpcTravelBit = $@graveyard_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/026-2/_import.txt b/npc/026-2/_import.txt new file mode 100644 index 00000000..05e59fe7 --- /dev/null +++ b/npc/026-2/_import.txt @@ -0,0 +1,16 @@ +// Map 026-2: Swamp Indoors +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/026-2/_warps.txt", +"npc/026-2/barman.txt", +"npc/026-2/cerhan.txt", +"npc/026-2/crying_child.txt", +"npc/026-2/diary.txt", +"npc/026-2/door.txt", +"npc/026-2/eurni.txt", +"npc/026-2/golbenez.txt", +"npc/026-2/gy_inn_shops.txt", +"npc/026-2/innkeeper.txt", +"npc/026-2/lover.txt", +"npc/026-2/mapflags.txt", +"npc/026-2/testnpcs.txt", +"npc/026-2/werewolf.txt", diff --git a/npc/026-2/_warps.txt b/npc/026-2/_warps.txt new file mode 100644 index 00000000..5f7ed09c --- /dev/null +++ b/npc/026-2/_warps.txt @@ -0,0 +1,13 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 026-2: Swamp Indoors warps +026-2,30,35,0 warp #026-2_30_35 3,0,026-1,48,40 +026-2,23,25,0 warp #026-2_23_25 1,0,026-2,66,25 +026-2,66,26,0 warp #026-2_66_26 1,0,026-2,23,27 +026-2,26,55,0 warp #026-2_26_55 1,0,026-2,23,31 +026-2,23,33,0 warp #026-2_23_33 1,0,026-2,26,56 +026-2,22,96,0 warp #026-2_22_96 0,0,026-1,25,21 +026-2,41,82,0 warp #026-2_41_82 1,0,026-2,83,95 +026-2,84,96,0 warp #026-2_84_96 1,0,026-2,41,83 +026-2,23,58,0 warp #026-2_23_58 0,0,026-2,81,57 +026-2,82,57,0 warp #026-2_82_57 0,0,026-2,24,58 +026-2,31,129,0 warp #026-2_31_129 0,0,026-1,43,25 diff --git a/npc/026-2/barman.txt b/npc/026-2/barman.txt new file mode 100755 index 00000000..5c45bde0 --- /dev/null +++ b/npc/026-2/barman.txt @@ -0,0 +1,9 @@ +026-2,37,24,0 script Bennet NPC310,{ + mes "[Bennet]"; + mes "\"Hi there, stranger! My name is Bennet, the bartender here.\""; + next; + mes "[Bennet]"; + mes "\"If you're planning to stick around for a while, please check back with me later. I might have some work for you.\""; + mes "\"In the meantime, enjoy your stay!\""; + close; +} diff --git a/npc/026-2/cerhan.txt b/npc/026-2/cerhan.txt new file mode 100755 index 00000000..cd2d889f --- /dev/null +++ b/npc/026-2/cerhan.txt @@ -0,0 +1,38 @@ + +026-2,38,118,0 script Cerhan NPC311,{ + mes "[Cerhan]"; + mes "\"Ah, hello! It's good to see another normal human at this strange place!\""; + next; + menu + "That's true. What are you doing here?",L_Story, + "Yes, this place is really strange. I'm going to have another look around.",L_close; + +L_Story: + mes "[Cerhan]"; + mes "\"I came from Thermin, a town in the Kazei area.\""; + next; + mes "\"I'm an experienced weapon master and I was thinking about establishing a smithy here. I'll need some more equipment, though.\""; + next; + if (countitem("MylarinDust") > 0) + menu + "Do you know something about 'Mylarin Dust'?", L_Mylarin, + "Good luck with that.",L_GoodLuckWith; + goto L_GoodLuckWith; + +L_GoodLuckWith: + mes "[Cerhan]"; + mes "\"If you're interested in weapons and armor, you may want to come back later.\""; + goto L_close; + +L_Mylarin: + mes "[Cerhan]"; + mes "\"Mylarin dust?! Where did you get that? That's amazing!\""; + next; + mes "\"I can craft you an amazing strong armor with that - uhm, well, first I need to set up my smithy here.\""; + next; + mes "\"Please come back, when I'm ready for that. Mylarin dust... amazing.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/026-2/crying_child.txt b/npc/026-2/crying_child.txt new file mode 100755 index 00000000..ab9b43e8 --- /dev/null +++ b/npc/026-2/crying_child.txt @@ -0,0 +1,206 @@ + +026-2,67,86,0 script Aldred NPC314,{ + + @Graveyard_Inn_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_2_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @minLevel = 85; + + if (@state == 7) goto L_Return5; + if (@state == 6) goto L_Return4; + if (@state == 4 || @state == 5) goto L_Return3; + if (@state == 3) goto L_Return2; + if (@state == 2) goto L_Return1; + if (@state == 1) goto L_Return; + if (BaseLevel >= @minLevel) goto L_Intro; + goto L_cry; + +L_cry: + mes "[Crying Child]"; + mes "\"Waaahhhhh!\""; + goto L_close; + +L_Intro: + mes "[Crying Child]"; + mes "\"Waaah!\""; + next; + mes "\"Waaahhhaaa!\""; + next; + mes "You bend your knees near the child, trying to gain his confidence and ask why he is crying. But looking closely, you are surprised to see that his skin color is an awful, cadaveric grey..."; + menu + "Calm down kid, what happened?",L_WhatHappen, + "Leave the kid alone.",L_close; + +L_WhatHappen: + mes "[Crying Child]"; + mes "\"Oh, what? Who are you, what are you doing here?\""; + next; + menu + "My name is "+strcharinfo(0)+". I heard you cry and decided to check if you needed any help.",L_MyNameIs; + +L_MyNameIs: + mes "The child looks at you from head to toe and says: aren't you scared of me?\""; + next; + menu + "No... Why would I be scared of you?",L_NotScaredOf; + +L_NotScaredOf: + mes "[Crying Child]"; + mes "\"I am, you know... dead. Like Mom and Dad, and a lot of other people in this inn... But most of them don't like to talk about it.\""; + menu + "You are a brave and smart kid... I have nothing to be afraid of.",L_BraveSmart; + +L_BraveSmart: + mes "[Crying Child]"; + mes "\"It's nice to talk to you. I don't have any friends and Mom is always sad and Dad is always angry about something I don't know... and... Did you see the man in the room next to me? The one with horns? Oh, I don't like him! \""; + next; + mes "[Crying Child]"; + mes "\"My parents told me not to talk to strangers... But you look nice... I guess I can trust you... I'm Aldred and we live here, my parents and I. This is our inn.\""; + next; + mes "[Aldred]"; + mes "\"You asked why I was crying. My problem is... I don't know what to do... My dad will be so angry with me... He used to be very nice, but now... if you do something wrong... he... Waaaaa!\""; + next; + menu + "There, there. Don't cry... What did you do?",L_DontCryWhat; + +L_DontCryWhat: + mes "[Aldred]"; + mes "\"Umm... I was looking at my parents' stuff and I found this funny thing! It looked like a normal ring, but with a round empty space... I thought it would be fun to take it with me and maybe look for a stone or a gem to fit into the empty space. But I... I lost it...\""; + next; + mes "\"I don't know what happened. I was in this room and... I heard some very loud noises, people screaming, cracking sounds... and a smell, a terrible smell, like something rotten. And then... I can't remember anything else!\""; + next; + mes "\"I think it was something very bad, because, after all that, I woke up the way I am now and I couldn't find the ring in my pocket. Oh, and my parents are acting like they're not themselves. I don't know what happened, maybe it was my fault... I shouldn't have played with that ring... \""; + next; + menu + "Don't worry, I will look around. Maybe I can find it for you...",L_DontWorryFind, + "Hey, you messed up. Deal with it.",L_close; + +L_DontWorryFind: + mes "[Aldred]"; + mes "\"Thank you " +strcharinfo(0)+"! Find it for me, pleeeease! Oh, and don't tell my parents that I lost their ring, okay?\""; + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_Return: + mes "[Aldred]"; + mes "\"Please, help me. If you find that ring, I think things will be a little better between me and my parents.\""; + goto L_close; + + +L_Return1: + menu + "Hi Aldred. I found the ring!",L_RingFoundHere; + +L_RingFoundHere: + mes "[Aldred]"; + mes "\"Great! You're the best! Where did you find it?\""; + next; + menu + "It was easy, I found it on one of the monsters outside.",L_RingMonstersOut; + +L_RingMonstersOut: + mes "[Aldred]"; + mes "\"Ohh.. a monster? It must've been a nice monster since it returned it so easily to you!\""; + next; + menu + "Err... kind of...",L_ErrKindOf; + +L_ErrKindOf: + mes "[Aldred]"; + mes "\"Now, I'll put this thing back in its proper place... Thank you!\""; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Return2: + mes "[Aldred]"; + mes "\"Hi "+strcharinfo(0)+ "! I was thinking... you were sooo nice helping me find the ring... I think I should give you a gift, but I'm just a dead kid, I have nothing to give you!\""; + next; + menu + "Don't worry, you don't need to give me anything...",L_GiveMeAnything; + +L_GiveMeAnything: + mes "[Aldred]"; + mes "\"Are you sure? That's why you're so great! But hey, I have an idea. What if you talk to my parents about this thing? If it's not important or valuable, I don't think it would be a problem to let you keep it. And I really want to know if they're acting all weird because I lost it. Would you do this for me?\""; + next; + menu + "Sounds interesting... But who are your parents?",L_WhereParents, + "Bad idea, it will only bring more problems...",L_close; + +L_WhereParents: + @state = 4; + callsub S_Update_Mask; + mes "[Aldred]"; + mes "\"Okay, great... But please, don't tell them about it. I don't want my parents to know I was playing with their stuff. My father is always carrying a lantern... I guess he's still afraid of the dark. My mother is the innkeeper. She's very beautiful and she's wearing a red dress.\""; + next; + mes "\"Don't forget to come back with the ring after you've talked to my parents.\""; + message strcharinfo(0), "Aldred hands you the ring and you keep it in a small pocket on your backpack."; + goto L_close; + +L_Return3: + mes "[Aldred]"; + mes "\"I hope this ring doesn't mean a lot to my parents. That way you can keep it as a gift and I won't feel guilty about taking it.\""; + goto L_close; + +L_Return4: + menu + "Hi, I talked to your parents.",L_TalkParents; + +L_TalkParents: + mes "[Aldred]"; + mes "\"Really? What did my father say about it?\""; + menu + "He said it's just a cheap ring. And it doesn't belong to him.",L_JustCheapRing; + +L_JustCheapRing: + mes "[Aldred]"; + mes "\"And what did my mother say?\""; + menu + "She said it was a gift, but she doesn't want it anymore.",L_GiftNoWant; + +L_GiftNoWant: + mes "[Aldred]"; + mes "\"Really? A gift? And why doesn't she want it anymore?\""; + next; + menu + "She said it makes her sad.",L_MakesHerSad; + +L_MakesHerSad: + mes "\"Ohh... really? I don't like it when my mother gets sad... If this ring is making her feel bad, I should keep it away from her. \""; + next; + mes "\"Well, I guess you can keep it, but don't show it to my mother again, she's already very sad. But now I'm really curious. Who else would give a gift to my mother? There are so many strange things happening lately...\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full; + getitem "SimpleRing", 1; + @state = 7; + callsub S_Update_Mask; + mes "\"I'll tell my parents how great and helpful you are. Maybe they can even let you stay here at the inn for free!\""; + goto L_close; + +L_Return5: + mes "[Aldred]"; + mes "\"Thank you for all your help.\""; + goto L_close; + +L_Full: + mes "[Aldred]"; + mes "\"I dont think you can carry this ring... Your backpack is full! Throw something away and come back to get it.\""; + goto L_close; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @minLevel = 0; + close; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-2/diary.txt b/npc/026-2/diary.txt new file mode 100755 index 00000000..6b18228e --- /dev/null +++ b/npc/026-2/diary.txt @@ -0,0 +1,53 @@ + +026-2,76,85,0 script #Diary NPC400,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + @Graveyard_Inn_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_0_SHIFT; + + @reid = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@reid >= 6) goto L_Diary; + @reid = 0; + end; + +L_Diary: + mes "You pull out Reid's diary from behind a huge poetry book. Towards the end of the diary, you find some entries which seem to be about Savaric."; + next; + mes "'Savaric keeps confusing me - one time he is so flirtatious and smooth, another time he is cold and unfriendly. What is it with this man?'"; + next; + mes "'I need to stay away from him! It's not right, what I am feeling. It seems Hamond doesn't suspect anything about my feelings - but I know, it's just a matter of time. I need to come to my senses again!'"; + next; + mes "'Oh, this chaotic situation between Savaric and me is getting serious. I was in his room today and he put his arms around me - I wanted to push him away, but I couldn't move. It was such a sweet feeling. I was torn between my brain saying 'No!' and my body wanting to feel his touch. Then, Aldred showed up and Savaric let me go.'"; + next; + mes "The next part is blurred - it seems Reid was crying while writing it."; + mes "'Savaric was talking again about leaving, because he can't find the mana seed. The thought that I would never see him again made me feel like I was falling into a dark abyss! I need to decide what to do. But Hamond - I owe him so much. And what about Aldred?'"; + next; + mes "'We kissed each other - oh, I'm feeling so bad. I'm an unfaithful slut. But I want it to happen again, so badly.'"; + next; + mes "'I told Savaric we have to stop with this - he was very understanding. But then he started to hold me again and I couldn't resist. I don't know what to do, at all! His touch on my waist, even through my clothes, made me feel more excited than Hamond's touch ever did.'"; + next; + mes "'I don't know if Hamond suspects us - he was holding me tight all through the night, whispering declarations of love in my ears. Oh, I feel so bad.'"; + next; + mes "'Hamond won't be here tomorrow night - he needs to visit our wine supplier to negotiate the prices. Savaric knows this. I'm feeling so excited - I should go with Hamond, but I told him I need to take care of the inn while he's away. Savaric... '"; + next; + mes "This is the last entry."; + if (@reid != 6) + goto L_close; + + @reid = 7; + callsub S_Update_Mask; + goto L_close; + +L_close: + @reid = 0; + close; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@reid << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-2/door.txt b/npc/026-2/door.txt new file mode 100755 index 00000000..7a9ad2bd --- /dev/null +++ b/npc/026-2/door.txt @@ -0,0 +1,20 @@ +026-2,77,92,0 script #DoorIn NPC45,0,0,{ + @Graveyard_Inn_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_0_SHIFT; + + @reid = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@reid >= 6) goto L_Warp; + message strcharinfo(0), "The door is locked."; + end; + +L_Warp: + warp "026-2", 77, 89; + @reid = 0; + end; +} + +026-2,77,90,0 script #DoorOut-gyinn NPC45,0,0,{ + warp "026-2", 77, 93; + end; +} diff --git a/npc/026-2/eurni.txt b/npc/026-2/eurni.txt new file mode 100755 index 00000000..330ba58e --- /dev/null +++ b/npc/026-2/eurni.txt @@ -0,0 +1,15 @@ + +026-2,20,124,0 script Eurni NPC136,{ + @halloween_npc_id = $@halloween_npc_eurni; + callfunc "TrickOrTreat"; + + mes "[Eurni the Surgeon]"; + mes "\"Are you tired of who you are?\""; + next; + mes "\"Would you be interested in changing your appearance?\""; + next; + callfunc "Barber"; + mes "[Eurni the Surgeon]"; + mes "\"Come back any time!\""; + close; +} diff --git a/npc/026-2/golbenez.txt b/npc/026-2/golbenez.txt new file mode 100755 index 00000000..c6bd2fd3 --- /dev/null +++ b/npc/026-2/golbenez.txt @@ -0,0 +1,614 @@ + +026-2,60,57,0 script Golbenez NPC307,{ + @Graveyard_Inn_MASK = NIBBLE_4_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_4_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @Graveyard_Inn_Woman_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_Woman_SHIFT = NIBBLE_0_SHIFT; + + @woman = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Woman_MASK) >> @Graveyard_Inn_Woman_SHIFT); + + @Graveyard_Inn_Lover_MASK = NIBBLE_1_MASK; + @Graveyard_Inn_Lover_SHIFT = NIBBLE_1_SHIFT; + + @lover = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Lover_MASK) >> @Graveyard_Inn_Lover_SHIFT); + + @Graveyard_Inn_Husband_MASK = NIBBLE_3_MASK; + @Graveyard_Inn_Husband_SHIFT = NIBBLE_3_SHIFT; + + @husband = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Husband_MASK) >> @Graveyard_Inn_Husband_SHIFT); + + @ROTTENRAGS_AMOUNT = 50; + @ROTTENRAGS_EXP = 100000; + @UNDEADEAR_AMOUNT = 15; + @UNDEADEAR_EXP = 150000; + @UNDEADEYE_AMOUNT = 10; + @UNDEADEYE_EXP = 150000; + @JACKOSOUL_EXP = 2000; + + if (@state >= 7) goto L_Done; + if (@state == 6) goto L_Soul; + if (@state == 5) goto L_All; + if (@state == 4) goto L_Savaric; + if (@state == 3) goto L_Hamond; + if (@state == 2) goto L_Reid; + if (@state == 1) goto L_Back; + + mes "[Golbenez]"; + mes "\"How do you like my place of leisure, mortal?\""; + menu + "What is this place? Why is it full of dead people?",L_WhatPlace, + "You look different here. Nice horns.",L_Horns, + "I'm enjoying myself, thanks for asking.",L_close; + +L_WhatPlace: + mes "[Golbenez]"; + mes "\"Mortal, this is beyond your comprehension. Do not worry about it and enjoy your time.\""; + + if (@lover < 2) + goto L_close; + menu + "I want to know. Try me.",L_WantKnow; + +L_WantKnow: + mes "Golbenez takes a piercing look at you."; + mes "[Golbenez]"; + mes "\"Fine.\""; + next; + mes "\"This place was a normal inn many, many of your years ago. Chance brought me here and it became one of my favorite playgrounds.\""; + next; + mes "Golbenez laughs in a way which really gives you the creeps."; + next; + mes "[Golbenez]"; + mes "\"Unfortunately, it got destroyed. I had no choice but to take the memories from the dead and recreate this place.\""; + menu + "What do you mean by 'playground?'",L_WantGoOn, + "Recreate? What do you mean by that?",L_WantGoOn; + +L_WantGoOn: + mes "[Golbenez]"; + mes "\"As I said, you do not understand. You are starting to bore me. Leave.\""; + + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_Back: + if (@lover >= 3) + goto L_Memory; + mes "Golbenez ignores your presence."; + goto L_close; + +L_Memory: + mes "[Golbenez]"; + mes "\"Mortal, you are back. Are you going to bore me with other stupid questions?\""; + menu + "I want to know what happened in the inn, before it was destroyed.",L_KnowDestroy, + "Nevermind.",L_close; + +L_KnowDestroy: + if ((@woman >= 7) + && (@lover >= 3) + && (@husband >= 4)) + goto L_Detective; + mes "[Golbenez]"; + mes "\"I was watching you play detective. I find it amusing. Play it a little longer and I may show you some of the memories from that time.\""; + goto L_close; + +L_Detective: + mes "[Golbenez]"; + mes "\"Watching you digging into this dirty little love story of those foolish humans has certainly been amusing so far.\""; + next; + mes "\"I can show you all their memories. Would you like that?\""; + next; + mes "\"The only thing you would have to do is promise me your soul.\""; + menu + "No!",L_WantsSoul, + "That's too expensive. Make another offer.",L_WantsSoul, + "My soul?!",L_WantsSoul; + +L_WantsSoul: + mes "Golbenez giggles, a strange and somewhat unnerving sound from such a being."; + mes "[Golbenez]"; + mes "\"You should have seen your face. Really, mortals can be so funny.\""; + next; + mes "\"Very well, I will show you the birdbrained woman's memories if you bring me " + @ROTTENRAGS_AMOUNT + " Rotten Rags. And an Orange Cake.\""; + @state = 2; + callsub S_Update_Mask; + goto L_close; + +L_Reid: + mes "[Golbenez]"; + mes "\"So, do you have the " + @ROTTENRAGS_AMOUNT + " Rotten Rags I want?\""; + if (countitem("RottenRags") < @ROTTENRAGS_AMOUNT) + menu + "What do you need them for?",L_Why_Stuff, + "I'm working on that.",L_close; + menu + "Here you go.",L_GiveRags, + "I'm working on that.",L_close; + +L_GiveRags: + if (countitem("OrangeCake") < 1) + goto L_No_Cake; + if (countitem("RottenRags") < @ROTTENRAGS_AMOUNT) + goto L_Betray; + delitem "RottenRags", @ROTTENRAGS_AMOUNT; + delitem "OrangeCake", 1; + getexp @ROTTENRAGS_EXP, 0; + + mes "[Golbenez]"; + mes "\"Very nice. I will show you the woman's memories of that night. Come closer.\""; + next; + mes "\"You hesitate but then take a step towards Golbenez. He grabs your head with his claw-like fingers.\""; + next; + callsub S_Reidsmem; + @state = 3; + callsub S_Update_Mask; + menu + "Can I see it again?",L_CollectMem, + "Wow, that was interesting.",L_CollectMem, + "Why do you collect such personal memories?",L_CollectMem; + +L_CollectMem: + mes "Golbenez throws you an amused look."; + next; + mes "[Golbenez]"; + mes "\"I will explain the deal to you. Once you have paid for a memory, you can come and see it again as often as you like. And I collect whatever memory I want to. Mortals are a constant source of amusement for me.\""; + next; + mes "\"I have more memories you might want to see. Bring me "+ @UNDEADEAR_AMOUNT + " Undead Ears. And a Chocolate Cake.\""; + goto L_close; + +L_Hamond: + mes "[Golbenez]"; + mes "\"Ah, mortal. Do you have the " + @UNDEADEAR_AMOUNT + " Undead Ears I want?\""; + if (countitem("UndeadEar") < @UNDEADEAR_AMOUNT) + menu + "I want to see Reid's memory again.",L_R_Again, + "What will you do with them?",L_Why_Stuff, + "Not yet.",L_close; + menu + "I want to see Reid's memory again.",L_R_Again, + "I have what you want.",L_GiveEar, + "I'm working on that.",L_close; + +L_GiveEar: + if (countitem("ChocolateCake") < 1) + goto L_No_Cake; + if (countitem("UndeadEar") < @UNDEADEAR_AMOUNT) + goto L_Betray; + delitem "UndeadEar", @UNDEADEAR_AMOUNT; + delitem "ChocolateCake", 1; + getexp @UNDEADEAR_EXP, 0; + mes "[Golbenez]"; + mes "\"Good. I will show you the memories of the dumb husband now. Come to me.\""; + next; + mes "You step closer to Golbenez and he holds your head again."; + callsub S_Hamondsmem; + @state = 4; + callsub S_Update_Mask; + mes "[Golbenez]"; + mes "\"It is really interesting how illogical humans behave.\""; + next; + mes "\"And how predictable they are. I can see in your eyes that you want to know how this drama went on.\""; + next; + mes "\"Bring me " + @UNDEADEYE_AMOUNT + " Undead Eyes and an Apple Cake.\""; + goto L_close; + +L_Savaric: + mes "[Golbenez]"; + mes "\"I hope you are bringing me the " + @UNDEADEYE_AMOUNT + " Undead Eyes I want.\""; + if (countitem("UndeadEye") < @UNDEADEYE_AMOUNT) + menu + "I want to see Reid's memory again.",L_R_Again, + "I want to see Hamond's memory again.",L_H_Again, + "I really wonder what you do with the stuff I bring you.",L_Why_Stuff, + "They're hard to get. I'm still working on that.",L_close; + menu + "I want to see Reid's memory again.",L_R_Again, + "I want to see Hamond's memory again.",L_H_Again, + "I got what you want.",L_GiveEye, + "I'm working on that.",L_close; + +L_GiveEye: + if (countitem("AppleCake") < 1) + goto L_No_Cake; + if (countitem("UndeadEye") < @UNDEADEYE_AMOUNT) + goto L_Betray; + delitem "UndeadEye", @UNDEADEYE_AMOUNT; + delitem "AppleCake", 1; + getexp @UNDEADEYE_EXP, 0; + mes "[Golbenez]"; + mes "\"Very good. Now I will show you the pitiful mage's memory.\""; + next; + mes "He holds your head and everything goes black again."; + callsub S_Savaricsmem; + @state = 5; + callsub S_Update_Mask; + mes "[Golbenez]"; + mes "\"Humans can be so amusing!\""; + menu + "YOU CRUEL MONSTER!",L_MonsterIdiots, + "I agree. What a bunch of idiots.",L_MonsterIdiots; + +L_MonsterIdiots: + mes "Golbenez's mouth twists into something resembling a smile."; + mes "[Golbenez]"; + mes "\"Oh, thank you.\""; + goto L_close; + +L_All: + if (@lover == 6) + goto L_Negotiate; + mes "[Golbenez]"; + mes "\"Did you come back to see the memories again?\""; + menu + "I want to see Reid's memory again.",L_R_Again, + "I want to see Hamond's memory again.",L_H_Again, + "I want to see Savaric's memory again.",L_S_Again, + "Nevermind.",L_close; + +L_Negotiate: + mes "Golbenez's eyes are glowing greedily."; + mes "[Golbenez]"; + mes "\"Did you come back to see the memories again? Or are you going to offer me another deal?\""; + menu + "I want Savaric's soul back.",L_WantSoulBack, + "I want to see Reid's memory again.",L_R_Again, + "I want to see Hamond's memory again.",L_H_Again, + "I want to see Savaric's memory again.",L_S_Again, + "Nevermind.",L_close; + +L_WantSoulBack: + mes "[Golbenez]"; + mes "\"Savaric's soul, yes. It is a pretty nice soul, you know. From a mage... no, even better... from a lovestruck mage. It is valuable.\""; + next; + mes "\"Why do you think it would be easy to get it back? Do you have anything of equal worth to offer?\""; + next; + menu + "What about another cake?",L_Cake, + "I'm not sure. What do you want?",L_GetSoul, + "No.",L_close; + +L_GetSoul: + mes "[Golbenez]"; + mes "\"Bring me a soul of at least equal power to the mage's. I do not care about its origin.\""; + @state = 6; + callsub S_Update_Mask; + goto L_close; + +L_Soul: + mes "[Golbenez]"; + mes "\"So, did you get a soul for me?\""; + goto L_Soul_Try; + +L_Soul_Try: + if (countitem("Soul") < 1) + menu + "I'll go and get one.",L_close; + menu + "What about this Soul?",L_TryThisSoul, + "I'll go and try to find a soul.",L_close; + +L_TryThisSoul: + if (countitem("Soul") < 1) + goto L_Betray; + delitem "Soul", 1; + @soul = rand(50); + if (@soul == 0) + goto L_Soul_Success; + mes "[Golbenez]"; + mes "\"No, this one is not as powerful as the mage's. Bring me another one of those.\""; + getexp @JACKOSOUL_EXP, 0; + goto L_Soul_Try; + +L_Soul_Success: + mes "Golbenez suddenly gets excited."; + mes "[Golbenez]"; + mes "\"Yes! This one is full of energy.\""; + @state = 7; + callsub S_Update_Mask; + next; + mes "\"So be it, mortal. I will release Savaric's soul in exchange for this one.\""; + goto L_close; + +L_Done: + mes "[Golbenez]"; + mes "\"I hope you enjoyed your little detective game. I certainly did.\""; + menu + "You're cruel.",L_close, + "I want to see Reid's memory again.",L_R_Again, + "I want to see Hamond's memory again.",L_H_Again, + "I want to see Savaric's memory again.",L_S_Again; + +L_Cake: + mes "Golbenez laughs."; + mes "[Golbenez]"; + mes "\"This is why I like you. Despite being human, you have a delightful sense of humor.\""; + goto L_close; + +L_S_Again: + callsub S_Savaricsmem; + mes "[Golbenez]"; + mes "\"What a fool he was, even for a human.\""; + goto L_close; + +L_R_Again: + callsub S_Reidsmem; + mes "\"This memory seems to excite you. Interesting.\""; + goto L_close; + +L_H_Again: + callsub S_Hamondsmem; + mes "[Golbenez]"; + mes "\"Humans can be so stupid, have you noticed that?\""; + goto L_close; + +L_Horns: + mes "Golbenez bursts out with laughter."; + next; + mes "[Golbenez]"; + mes "\"Mortals! They never stop surprising me.\""; + goto L_close; + +L_Why_Stuff: + mes "[Golbenez]"; + mes "\"That is not your concern.\""; + goto L_close; + +L_Betray: + mes "[Golbenez]"; + mes "\"I am warning you, mortal. Do not try to betray me!\""; + goto L_close; + +L_No_Cake: + mes "[Golbenez]"; + mes "\"Fool! You forgot my cake!\""; + goto L_close; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @Graveyard_Inn_Woman_MASK = 0; + @Graveyard_Inn_Woman_SHIFT = 0; + @woman = 0; + @Graveyard_Inn_Lover_MASK = 0; + @Graveyard_Inn_Lover_SHIFT = 0; + @lover = 0; + @Graveyard_Inn_Husband_MASK = 0; + @Graveyard_Inn_Husband_SHIFT = 0; + @husband = 0; + @ROTTENRAGS_AMOUNT = 0; + @ROTTENRAGS_EXP = 0; + @UNDEADEAR_AMOUNT = 0; + @UNDEADEAR_EXP = 0; + @UNDEADEYE_AMOUNT = 0; + @UNDEADEYE_EXP = 0; + @JACKOSOUL_EXP = 0; + @soul = 0; + close; + +S_Reidsmem: + mes "[Golbenez]"; + mes "\"I will send her memories into your brain now. Do not collapse or do something equally foolish.\""; + next; + mes "Everything turns black. Then, slowly, you see something. You're standing outside and watching an alive-looking Hamond ride away on a carriage drawn by a mouboo.\""; + next; + mes "\"You turn back and enter a nice looking building. It seems to be the inn."; + next; + mes "Obviously, you are watching Reid's memories through her eyes. You're getting excited. Or is it Reid who feels excited? You're not sure."; + next; + mes "You-Reid walks up the stairs and stops in front of the door you recognize as Savaric's room. You get a twisting feeling, something between desire, guilt and despair."; + next; + mes "It seems you're not only seeing Reid's memories, but also feeling them!"; + next; + mes "Reid turns away from Savaric's door and walks to her rooms quickly. She is shivering. You feel her heart pounding."; + next; + mes "She enters the room and pulls a red dress out of a chest and changes into it. As you feel her heart pounding even faster, you recognize the dress as the one her ghost is wearing."; + next; + mes "She sits down on the bed holding her head in her hands."; + next; + mes "[Reid]"; + mes "\"This is wrong...\""; + next; + mes "Then she stands up and returns to Savaric's door. She hesitates again. Suddenly the door opens, Savaric standing there, smiling."; + next; + mes "[Savaric]"; + mes "\"I was hoping you would come.\""; + next; + mes "He reaches out with his hands and you feel Reid getting dizzy."; + next; + mes "You enter his room together. There is only one candle on the table, providing a dim light."; + next; + mes "[Reid]"; + mes "\"I- we- Savaric- this is not right- we shouldn't do this.\""; + next; + mes "[Savaric]"; + mes "\"But you came. Shh, don't worry. Let me hold you.\""; + next; + mes "Savaric puts his arms around Reid and leads her to the bed. You feel a rush of Sexual desire."; + next; + mes "He starts to caress Reid's face with his lips, as his hands slip the dress from her shoulders."; + next; + mes "Reid's feelings are like a firestorm and it's hard for you to concentrate on what is happening."; + next; + mes "Savaric touches her body and - you suddenly stand in front of Golbenez again, wobbling around for a moment, before falling to the ground."; + next; + mes "[Golbenez]"; + mes "\"I told you not to collapse!\""; + next; + mes "\"It seems Reid's feelings were too strong for you to withstand.\""; + next; + mes "Golbenez grins."; + next; + mes "[Golbenez]"; + mes "\"But I guess you can imagine what followed.\""; + next; + return; + +S_Hamondsmem: + mes "The darkness vanishes and you see the back of a mouboo pulling the carriage you're sitting on. Or better to say, Hamond is sitting on."; + next; + mes "You feel very, very nervous and worried."; + next; + mes "[Hamond]"; + mes "\"I shouldn't leave her alone with that debaucher. But she loves me. She won't give in to such a dandy. I believe in her. I trust her.\""; + next; + mes "The carriage reaches a river, but it seems the bridge is damaged. A group of people is standing on the riverside. There is one little boat, taking the people across, one by one."; + next; + mes "You feel a great surge of relief growing in Hamond's chest."; + next; + mes "He shakes the reins and turns his carriage around. Obviously this is a great excuse for him to return to Reid at once."; + next; + mes "When he returns to the inn, the sun is already low on the horizon. He tells the stableboy to take care of the mouboo and carriage, then rushes up the stairs heading to his and Reid's rooms. You can feel his heart pounding."; + next; + mes "He rips the door open and the room is empty. A cold feeling grows in his chest. He turns around and sees Reid standing in front of him, wearing her best dress. The red one which makes her look so beautiful - you feel a sharp sting in Hamonds heart."; + next; + mes "The dress is crumpled and seems to have been put on in haste. Her hair is in a disarray."; + next; + mes "[Reid]"; + mes "\"Hamond! What are you doing here? Why are you already back?\""; + next; + mes "You feel a burning rage growing in Hamond."; + mes "[Hamond]"; + mes "\"You're not happy to see me, are you? Would you prefer me to run this inn for you but ignore your cockish behavior?!\""; + next; + mes "The shocked, painful, and obviously guilty look on Reid's face fills Hamond with a strange mixture of pain and gratification."; + next; + mes "He grabs her arm, pulls her into the room and slams the door shut behind them. You see a fearful look on Reid's face."; + next; + mes "[Reid]"; + mes "\"Hamond! Please, calm down!\""; + next; + mes "The feeling of broken trust and disappoinment seems to drive you... Hamond... crazy."; + next; + mes "Hamond slaps her across the face."; + next; + mes "[Hamond]"; + mes "\"You are MY WIFE! I'll teach you what that means!\""; + next; + mes "As Hamond grabs Reid roughly and holds her tight, you can smell her sweat and fear, but under that is the smell of another man! Hamond's vision goes red."; + next; + mes "[Hamond]"; + mes "\"You dirty slut! I did everything for you!\""; + next; + mes "Reid is struggling wildly to get out of Hamond's hold. She is surprisingly strong and together they fall onto the table."; + next; + mes "The next thing you see is a teapot smashing into Hamond's face. He stumbles back."; + next; + mes "You see Reid running to the door, where she pauses and throws a look over her shoulder. Then she runs out of the room."; + next; + mes "Her face was wet with tears, her lips bloody and her eye was already turning black."; + next; + mes "You feel shock and regret."; + mes "[Hamond]"; + mes "\"What did I do? Reid... How could I ever hurt you?\""; + next; + mes "Your sight turns black and with your next blink you're standing in front of Golbenez again."; + next; + return; + +S_Savaricsmem: + mes "As you gain your eyesight again, you find yourself bustling back and forth in Savaric's room."; + next; + mes "The mixture of feelings you sense is very confusing. Worry, guilt, craving and below all that a deep feeling of luck and satisfaction."; + next; + mes "Then you hear steps outside the room. Savaric turns to the door quickly, then Reid breaks into the room."; + next; + mes "She looks utterly tattered, her dress ripped and her lips bleeding. She has a black eye and she is sobbing uncontrollably. It takes Savaric less than a second to reach her and put his arms around her carefully."; + next; + mes "You feel a deep, cold anger."; + next; + mes "[Savaric]"; + mes "\"Reid, my love, what did he do to you? Please come and lay down.\""; + next; + mes "Savaric leads Reid to his bed and covers her gently. Then he holds and rocks her until she falls asleep. You notice Savaric is only wearing his underpants."; + next; + mes "After Reid's breathing has calmed down and her abused face looks peaceful again, he stands up and his cold burning anger comes back."; + next; + mes "[Savaric]"; + mes "\"I won't let him get away with that!\""; + next; + mes "Savaric pulls some things out of a chest and puts them on the table. He lights some candles and begins to mix together some powders and fluids. You can feel his concentration, but below that is a great anger keeping clear thoughts at bay."; + next; + mes "Savaric seems to be done with his magic ingredients and takes what he mixed together. You feel rising power inside of you. The moment you think you can't stand it anymore, the tension disappears and a purple light fills the room for a moment."; + next; + mes "Golbenez is standing in front of you."; + next; + mes "[Golbenez]"; + mes "\"Mortal! It was very rude of you to force me to this place with that spell - are you aware of the power you are playing around with?!\""; + next; + mes "Fear is rising inside of you, but also excitement accompanied by a feeling of power."; + next; + mes "[Savaric]"; + mes "\"I called you to get rid of the person who did this to this adorable woman.\""; + mes "He points at Reid"; + next; + mes "[Savaric]"; + mes "\"Tell me your price.\""; + next; + mes "Golbenez's behavior changes immediately and he suddenly seems much friendlier."; + next; + mes "[Golbenez]"; + mes "\"Ah, you are offering me a deal. That is something completely different. Let me see... I can free her from all pain and anything or anyone causing her trouble.\""; + next; + mes "You feel Savaric's heart pounding."; + mes "[Savaric]"; + mes "\"Yes. That's what I want. I want her to be safe from any harm.\""; + next; + mes "Golbenez's face turns into a smile."; + mes "[Golbenez]"; + mes "\"This requires some effort. It will have a remarkable price. I want your soul in exchange.\""; + next; + mes "The feeling of power disappears, giving place to uncertainty."; + mes "[Savaric]"; + mes "\"My - soul? Can't it be something else?\""; + next; + mes "[Golbenez]"; + mes "\"Think about what you get! This woman will never feel any pain again!\""; + next; + mes "Savaric's hesitation vanishes."; + mes "[Savaric]"; + mes "\"So be it. Take my soul and prevent Reid from feeling pain ever again.\""; + next; + mes "Golbenez's smile changes to an ugly grin filled with malice. He reaches out to Savaric and seems to pull something out of him. Suddenly, you feel very weak and empty."; + next; + mes "In the next moment, you're lying on the ground and see Golbenez raising his arms. You sense an unbelievable magic force - what is he doing?"; + next; + mes "Undead enter the room and one of them walks to the bed and breaks Reid's neck with a quick movement. A dark and black feeling of despair rises inside of you."; + next; + mes "[Savaric]"; + mes "\"NO!! What are you doing?\""; + next; + mes "[Golbenez]"; + mes "\"She will never feel pain anymore. Just like everyone else in this inn - besides you, foolish mortal.\""; + next; + mes "Golbenez leaves the room and you feel Savaric giving in to his pain. He is lying on the floor and trying to understand what he did."; + next; + mes "After a few moments of only feeling his suffering, Savaric finally manages to stand up again. He can't stand to see Reid's dead body anymore and stumbles out of the room."; + next; + mes "But what you can see in the rest of the inn isn't able to ease the suffering you're feeling. The undead have slaughtered every person in the inn, leaving only Savaric alive."; + next; + mes "Savaric seems stunned by shock. He slowly returns to his room and kneels in front of the bed, taking Reids hand."; + next; + mes "[Savaric]"; + mes "\"Reid - I'm so sorry. My haughtiness was greater than my skills.\""; + next; + mes "The numb feeling gives way to a new feeling of determination."; + next; + mes "Savaric pulls a rope out of the chest beside the bed."; + mes "[Savaric]"; + mes "\"Now there's only one thing left for me to do.\""; + next; + mes "Your vision turns black again and you find yourself standing in front of Golbenez."; + return; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-2/gy_inn_shops.txt b/npc/026-2/gy_inn_shops.txt new file mode 100755 index 00000000..532fe9da --- /dev/null +++ b/npc/026-2/gy_inn_shops.txt @@ -0,0 +1,34 @@ + +026-2,30,56,0 shop Chef#graveyard NPC300,784:30,785:25,786:30,787:55 +026-2,38,30,0 shop Estrilda NPC301,788:30,789:30,790:50 + +026-2,40,24,0 script Edwin NPC309,{ + @npcname$ = "Edwin"; + + mes "[" + @npcname$ + "]"; + mes "\"This place is always busy.\""; + next; + mes "\"Be careful about bumping into the patrons, they might not take it kindly if you spill their drink.\""; + close; +} + +026-2,75,23,0 script Barbara Grey NPC320,{ + @npcname$ = "Barbara Grey"; + @Cost = 1000; + + mes "[" + @npcname$ + "]"; + mes "\"Don't be shy, darling."; + mes "\"Come on in and have a nice long... long slumber..."; + next; + callfunc "Inn"; + close; +} + +026-2,31,119,0 shop Leofwin NPC304,501:25,502:35,518:25,566:50,567:250,568:250,613:10,631:250,740:200,772:350,773:350,774:350 + +026-2,22,120,0 shop Umfrey NPC302,1282:20,1281:500 +026-2,25,120,0 script J.P. Morbid NPC321,{ + @npcname$ = "J.P. Morbid"; + callfunc "Banker"; + close; +} diff --git a/npc/026-2/innkeeper.txt b/npc/026-2/innkeeper.txt new file mode 100755 index 00000000..11285951 --- /dev/null +++ b/npc/026-2/innkeeper.txt @@ -0,0 +1,457 @@ + +026-2,35,84,0 script Reid's Ghost NPC315,{ + @Graveyard_Inn_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_0_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @Graveyard_Inn_Lover_MASK = NIBBLE_1_MASK; + @Graveyard_Inn_Lover_SHIFT = NIBBLE_1_SHIFT; + + @lover = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Lover_MASK) >> @Graveyard_Inn_Lover_SHIFT); + + @Graveyard_Inn_Kid_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_Kid_SHIFT = NIBBLE_2_SHIFT; + + @kidstate = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Kid_MASK) >> @Graveyard_Inn_Kid_SHIFT); + + @Graveyard_Inn_Husband_MASK = NIBBLE_3_MASK; + @Graveyard_Inn_Husband_SHIFT = NIBBLE_3_SHIFT; + + @husband = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Husband_MASK) >> @Graveyard_Inn_Husband_SHIFT); + + @Graveyard_Inn_Golbanez_MASK = NIBBLE_4_MASK; + @Graveyard_Inn_Golbanez_SHIFT = NIBBLE_4_SHIFT; + + @golbanez = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbanez_MASK) >> @Graveyard_Inn_Golbanez_SHIFT); + + @minLevel = 85; + @YETI_TEAR_AMOUNT = 15; + @YETI_TEAR_EXP = 100000; + set @DIAMOND_AMOUNT, 20; // caution, this value needs to be the same as in the lovers script! + set @RUBY_AMOUNT, 25; // caution, this value needs to be the same as in the husbands script! + + if (@state >= 11) goto L_Happy; + if (@state == 10) goto L_Thanks; + if ((@state == 8) || (@state == 9)) goto L_Sorry; + if (@state == 7) goto L_Savaric; + if (@state == 6) goto L_Read_Diary; + if (@state == 5) goto L_Check_Kid; + if (@state == 4) goto L_Ask_Life; + if (@state == 3) goto L_Bring_Tears; + if (@state == 2) goto L_Offer_Help2; + if (@state == 1) goto L_After_Welcome; + + mes "You see a dead woman lying on the floor and something that appears to be her ghost floating above her dead body."; + next; + mes "[Ghost]"; + mes "\"He- I - What - Oh -\""; + mes "The womans ghost seems to be confused."; + next; + mes "[Ghost]"; + mes "Oh, I'm sorry. Welcome to Reid's Inn. My name is Reid, I am the innkeeper of this wonderful place of leisure. Please enjoy your visit here!"; + next; + + @state = 1; + callsub S_Update_Mask; + + goto L_Ask_Dead; + +L_After_Welcome: + mes "[Reid's Ghost]"; + mes "\"Please enjoy yourself!\""; + if (BaseLevel < @minLevel) + goto L_close; + goto L_Ask_Dead; + +L_Ask_Dead: + if (BaseLevel < 85) + goto L_close; + + menu + "What happened to you?", L_Next, + "Thank you, I'll surely enjoy my visit.", L_close; + +L_Next: + mes "[Reid's Ghost]"; + mes "\"What happened to me? What do you mean?\""; + menu + "Ahm, you don't look very well - actually, you look dead.",L_Next1, + "You don't seem to be in the best condition.",L_Next1, + "You are dead!",L_Next1; + +L_Next1: + mes "Reid looks down at her body and turns even more pale, if this is possible."; + next; + mes "[Reid's Ghost]"; + mes "\"OH?\""; + next; + menu + "I'm sorry. I didn't know you weren't aware of that.",L_Next2, + "Yes - do you understand my question now?",L_Next2, + "Shall I help you to find out what happened to you?", L_Offer_Help1; + +L_Next2: + mes "[Reid's Ghost]"; + mes "\"I'm dead? But why? And why am I still here?\""; + next; + mes "She stares into space and doesn't seem to notice you anymore."; + @state = 2; + callsub S_Update_Mask; + goto L_close; + +L_Offer_Help2: + mes "Reid's Ghost is still staring into space."; + + if (@kidstate == 5) + menu + "Shall I help you to find out what happened to you?", L_Offer_Help1, + "Hi. I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I don't want to bother you.", L_close; + goto L_Skip1; + +L_Skip1: + menu + "Shall I help you to find out what happened to you?", L_Offer_Help1, + "I don't want to bother you.", L_close; + +L_Offer_Help1: + mes "\"I.. I don't know you. Why should you help me?\""; + next; + mes "\"Bring me proof that you are serious. My life seems to have ended in a terrible and sad way, I can see it very clearly. If you want to help me, please bring me something that represents this immeasurable sadness I am feeling!\""; + + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Bring_Tears: + mes "[Reid's Ghost]"; + mes "\"Did you find something that can represent my sadness?\""; + next; + + if ((@kidstate == 5) + && countitem("FrozenYetiTear") > 0) + menu + "I found this frozen tear to represent your sadness.", L_Check_Tears, + "Hi. I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I'm still searching.", L_close; + if (@kidstate == 5) + menu + "Hi. I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I'm still searching.", L_close; + if (countitem("FrozenYetiTear") > 0) + menu + "I found this frozen tear to represent your sadness.", L_Check_Tears, + "I'm still searching.", L_close; + mes "\"You didn't? It seems you're not serious with your offer to help me.\""; + goto L_close; + +L_Check_Tears: + if (countitem("FrozenYetiTear") < @YETI_TEAR_AMOUNT) + goto L_Not_Enough_Tears; + delitem "FrozenYetiTear", @YETI_TEAR_AMOUNT; + + getexp @YETI_TEAR_EXP, 0; + + @state = 4; + callsub S_Update_Mask; + + mes "[Reid's Ghost]"; + mes "\"These tears.. how they shimmer in the candle light. Yes, it seems you are serious about your offer. I think maybe you have the sensibility to help me find out the real meaning behind this terrible feeling.\""; + next; + goto L_Ask_Life; + +L_Ask_Life: + mes "[Reid's Ghost]"; + mes "\"But how do you plan to help me?\""; + next; + + if (@kidstate == 5) + menu + "Please tell me about your life. Maybe this will give us a clue about what happened.",L_Skip2, + "Hi. I found this in the main hall. Do you know to whom it belongs?", L_Ring, + "I need to think about that.", L_close; + goto L_Skip2; + +L_Skip2: + menu + "Please tell me about your life. Maybe this will give us a clue about what happened.",L_Next4, + "I need to think about that.", L_close; + +L_Next4: + mes "[Reid's Ghost]"; + mes "\"About my life? Well, ok.\""; + next; + mes "\"I'm the owner of this inn. I inherited it from my parents, who ran it while I was a child.\""; + next; + mes "\"My father - he was a very joyful man. But one day, when I was just ten years old, he had an accident while carrying a barrel of beer.\""; + next; + mes "\"The barrel smashed his legs and he wasn't able to walk anymore. He got very despondent about that and started to drink.\""; + next; + mes "\"My mother and I didn't know how to cheer him up, and he wouldn't listen to us. My mother tried her best to keep the inn running and I tried my best to help her, even though I was still a child.\""; + next; + mes "\"But a few years later, my mother lost her will to go on and the inn slowly went down the drain. Everything was dirty and we had less and less patrons.\""; + next; + mes "\"I don't blame my mother. She loved my father so much, she couldn't stand to see what was happening to him. When he died because of his drinking, she totally lost her will to live and just lay in bed and followed him.\""; + next; + mes "Reid seems to be tortured by her memories."; + next; + mes "\"That was a very hard time.\""; + menu + "Yes, yes, but what about your life shortly before you died?",L_Next5, + "I can imagine. I'm very sorry for you",L_Next5; + +L_Next5: + mes "She doesn't seem to pay much attention to what you say."; + next; + mes "\"But Hamond, my friend since I was a child, helped me in those bad times. We built up the inn again and we - we married.\""; + next; + mes "\"He was so kind and my only light in those dark times. And our little son Aldred gave me back my joy in life.\""; + next; + mes "\"Everything was peaceful and I thought I had found my place. But one day -\""; + next; + + @state = 5; + callsub S_Update_Mask; + goto L_Check_Kid; + +L_Check_Kid: + if (@kidstate == 5) + menu + "Hi. I found this in the main hall. Do you know to whom it belongs?", L_Ring; + + if (@kidstate < 7) + goto L_Problem; + + mes "\"What I'm going to tell you is very personal, but your acts have shown me that you're a person I can trust. You kindly asked me about that ring you have found... and also, even my son, who is always so reserved with strangers, came to me and spent a long time telling me a lot of nice things about you. So I will tell you about my sad love.\""; + next; + + mes "[Reid's Ghost]"; + mes "\"It began as a completely normal day. We were taking care of our overnight guests and preparing the inn for the evening rush.\""; + next; + mes "\"But that day, a very special patron checked in. His name was Savaric, and he was a student of magic. He came from far away to check some rumors about a legendary mana seed.\""; + next; + mes "Reid's Ghost has a completely enchanted look on her face."; + next; + mes "\"He really made me feel alive - when he was near, I was feeling like I never felt before. I started to search for reasons to be near him - I told myself that I liked him just because he was interesting, coming from so far away and being a mage.\""; + next; + mes "\"But I was lying to myself.\""; + next; + mes "\"I - oh, it is really hard to talk about this. Maybe - yes, I could let you read my diary. I'll give you the key to our rooms.\""; + next; + mes "She pulls a key out of her pocket as transparent as herself. As you try to grab it, your fingers just go through it."; + next; + mes "[Reid's Ghost]"; + mes "\"I keep forgetting! Please take the key out of my pocket.\""; + mes "She is pointing at her dead body with a sad look on her face. You take the key."; + next; + mes "[Reid's Ghost]"; + mes "\"This is the key to our personal room, it is located at the very end of the corridor upstairs. You will find my diary in the bookshelf, hidden behind a book with poems. Hamond doesn't like poems.\""; + next; + mes "\"Please go and read it.\""; + + @state = 6; + callsub S_Update_Mask; + goto L_close; + +L_Read_Diary: + mes "[Reid's Ghost]"; + mes "\"Please go into my room and read the diary. You will find my diary in the bookshelf, hidden behind a book with poems.\""; + goto L_close; + +L_Savaric: + mes "[Reid's Ghost]"; + mes "\"Now you know about my recent past and... and my twisted feelings.\""; + next; + menu + "Yes, I feel very sorry for you.",L_Next6, + "Savaric seems to be a really hot guy, making you so compliant.",L_Tease; + +L_Next6: + mes "[Reid's Ghost]"; + mes "\"Oh, thank you.\""; + if (@golbanez < 5) + menu + "But I still didn't find out what happened. I'll return when I have news.",L_close; + menu + "But I still didn't find out what happened. I'll return when I have news.",L_close, + "I found out what happened to you and this place. I'll tell you.",L_Next7; + +L_Next7: + mes "You explain to her about Golbenez, Savaric and the memories you have seen."; + next; + mes "[Reid's Ghost]"; + mes "\"Oh, I always knew we weren't doing the right thing! But how could we have known it would end like this?\""; + next; + mes "\"I would never have expected Hamond to beat me - and Savaric... I trusted him with my life... And he carelessly wasted it. Mine and everyone else in the inn.\""; + next; + mes "\"I'm feeling hurt. And confused. Both Hamond and Savaric turned out not to be the persons I believed them to be.\""; + @state = 8; + callsub S_Update_Mask; + goto L_close; + +L_Sorry: + mes "[Reid's Ghost]"; + mes "\"Welcome back.\""; + if ((@lover == 4) + && (countitem("Diamond") >= @DIAMOND_AMOUNT) + && (countitem("Ruby") >= @RUBY_AMOUNT) + && (@husband == 5)) + menu + "Savaric asked me to give you something.",L_Diamond, + "Hamond sent me to bring you this.",L_Ruby, + "Nevermind.",L_close; + if (@lover == 4 && (countitem("Diamond") >= @DIAMOND_AMOUNT)) + menu + "Savaric asked me to give you something.",L_Diamond, + "Nevermind.",L_close; + if (@husband == 5 && (countitem("Ruby") >= @RUBY_AMOUNT)) + menu + "Hamond sent me to bring you this.",L_Ruby, + "Nevermind.",L_close; + goto L_close; + +L_Diamond: + if (countitem("Diamond") < @DIAMOND_AMOUNT) + goto L_Kidding; + delitem "Diamond", @DIAMOND_AMOUNT; + mes "You explain how Savaric feels and what the diamonds mean."; + next; + mes "[Reid's Ghost]"; + mes "\"Oh Savaric. I just can't be angry at him. Thanks for your help. I'll go to talk with him.\""; + @lover = 5; + callsub S_Update_Mask_Lover; + @state = @state + 1; + callsub S_Update_Mask; + goto L_close; + +L_Ruby: + if (countitem("Ruby") < @RUBY_AMOUNT) + goto L_Kidding; + delitem "Ruby", @RUBY_AMOUNT; + mes "You tell her about Hamonds feelings."; + next; + mes "[Reid's Ghost]"; + mes "\"I need to talk to him. Thanks for bringing me this.\""; + @husband = 6; + callsub S_Update_Mask_Husband; + @state = @state + 1; + callsub S_Update_Mask; + goto L_close; + +L_Kidding: + mes "[Reid's Ghost]"; + mes "\"Are you kidding? You don't have the items you are talking about. This is not funny.\""; + goto L_Tease; + +L_Tease: + mes "[Reid's Ghost]"; + mes "\"Don't be mean! I never felt like that before.\""; + goto L_close; + +L_Thanks: + mes "[Reid's Ghost]"; + mes "\"I'm so glad, now I know what happened and spoke to both Savaric and Hamond. Thank you so much. Please take this.\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + getitem "MylarinDust", 1; + @state = 11; + callsub S_Update_Mask; + next; + goto L_Mylarin; + +L_Mylarin: + mes "[Reid's Ghost]"; + mes "\"This is called mylarin dust. My mother gave it to me when my father had his accident. She said it is very valuable.\""; + next; + mes "\"I'm not sure what it is used for, but I remember her saying something about some special crafting tradition which uses it to make really strong armor.\""; + next; + mes "\"Maybe you should try to find someone who can use it.\""; + goto L_close; + +L_Happy: + mes "[Reid's Ghost]"; + mes "\"Thank you for all you've done.\""; + menu + "Can you tell me again about the powder you gave me?",L_Mylarin, + "I'm glad I could help.",L_close; + +L_Not_Enough_Tears: + mes "[Reid's Ghost]"; + @tears = countitem("FrozenYetiTear"); + if (@tears == 1) + mes "\"This is beautiful! But one of them isn't enough to represent my sadness.\""; + if (@tears > 1) + mes "\"This is beautiful! But " + @tears + " of them aren't enough to represent my sadness.\""; + goto L_close; + +L_Problem: + mes "[Reid's Ghost]"; + mes "\"What I have to tell is very personal. I'm not sure if I want to tell you. I know you helped me already and showed me you are a sensitive, but I barely know you. I am sorry, but I have to think a little bit more. Maybe later, when I know you better, I can tell you more about it. \""; + goto L_close; + +L_Ring: + mes "[Reid's Ghost]"; + mes "\"Oh, this - I - it's mine. It was a present from a very precious person.\""; + next; + mes "She reaches out to take the ring, but it just go through her fingers. She looks sad."; + next; + mes "\"Ah, I forgot again. It pains me not being able to wear it. Please, take it with you, I don't want it anymore. It hurts too much.\""; + @kidstate = 6; + callsub S_Update_Mask_Kid; + goto L_close; + +L_Full_Inv: + mes "[Reid's Ghost]"; + mes "\"Dear, you're carrying so much stuff, you can't take my present. Come back later to take it.\""; + goto L_close; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @Graveyard_Inn_Lover_MASK = 0; + @Graveyard_Inn_Lover_SHIFT = 0; + @lover = 0; + @Graveyard_Inn_Kid_MASK = 0; + @Graveyard_Inn_Kid_SHIFT = 0; + @kidstate = 0; + @Graveyard_Inn_Husband_MASK = 0; + @Graveyard_Inn_Husband_SHIFT = 0; + @husband = 0; + @Graveyard_Inn_Golbanez_MASK = 0; + @Graveyard_Inn_Golbanez_SHIFT = 0; + @golbanez = 0; + @minLevel = 0; + @YETI_TEAR_AMOUNT = 0; + @YETI_TEAR_EXP = 0; + @DIAMOND_AMOUNT = 0; + @RUBY_AMOUNT = 0; + @tears = 0; + close; + +S_Update_Mask_Kid: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_Kid_MASK)) + | (@kidstate << @Graveyard_Inn_Kid_SHIFT); + return; + +S_Update_Mask_Husband: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_Husband_MASK)) + | (@husband << @Graveyard_Inn_Husband_SHIFT); + return; + +S_Update_Mask_Lover: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_Lover_MASK)) + | (@lover << @Graveyard_Inn_Lover_SHIFT); + return; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-2/lover.txt b/npc/026-2/lover.txt new file mode 100755 index 00000000..605dae86 --- /dev/null +++ b/npc/026-2/lover.txt @@ -0,0 +1,307 @@ + +026-2,80,31,0 script Savaric NPC317,{ + @Graveyard_Inn_MASK = NIBBLE_1_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_1_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @Graveyard_Inn_Woman_MASK = NIBBLE_0_MASK; + @Graveyard_Inn_Woman_SHIFT = NIBBLE_0_SHIFT; + + @woman = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Woman_MASK) >> @Graveyard_Inn_Woman_SHIFT); + + @Graveyard_Inn_Golbenez_MASK = NIBBLE_4_MASK; + @Graveyard_Inn_Golbenez_SHIFT = NIBBLE_4_SHIFT; + + @golbanez = ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbenez_MASK) >> @Graveyard_Inn_Golbenez_SHIFT); + + @minLevel = 85; + @CRYSTAL_AMOUNT = 500; + @CRYSTAL_EXP = 200000; + @CRYSTAL_EXTRA_EXP = 100; + @CRYSTAL_MAX = 2000; + set @DIAMOND_AMOUNT, 20; // caution, this value needs to be the same as in the innkeepers script! + + if (@state >= 7) goto L_Have_Soul; + if (@state == 6) goto L_Want_Soul; + if (@state == 5) goto L_Apologize; + if (@state == 4) goto L_Waiting; + if (@state == 3) goto L_Golb; + if (@state == 2) goto L_News; + if (@state == 1) goto L_Crystals; + + mes "You see a dead man hanging. This place is creepy!"; + next; + if (BaseLevel < @minLevel) goto L_close; + mes "Suddenly the man opens his eyes and looks at you."; + next; + mes "[Hanged Man]"; + mes "\"Oh, hello. Nice to see you - I seem to be dead, but I don't know why and why I'm still consciousness. This is very interesting.\""; + menu + "INTERESTING? Are you crazy?",L_Next; + +L_Next: + mes "[Hanged Man]"; + mes "\"Well, as you mention it, it is quite annoying and uncomfortable. Would you mind helping me down to the floor?\""; + next; + mes "You take a step towards him, but some invisible force holds you back."; + next; + mes "[Hanged Man]"; + mes "\"Oh, someone is holding you back with magic! I sense a really dark and mighty power. What has happened!?\""; + next; + mes "\"Can I ask you for a favor? Can you bring me lots of Dark Crystals? You might need to ask a dark mage for it. I want to try to break the barrier.\""; + next; + mes "\"I'll need... well, at least " + @CRYSTAL_AMOUNT + ". But if you have more, I can use extras!\""; + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_Crystals: + mes "[Hanged Man]"; + mes "\"Ah, you're back! Did you get the Dark Crystals?\""; + + if (countitem("DarkCrystal") == 0) + menu + "Not yet.", L_close; + + if (countitem("DarkCrystal") < @CRYSTAL_AMOUNT) + goto L_Not_Enough_Crystals; + + delitem "DarkCrystal", @CRYSTAL_AMOUNT; + getexp @CRYSTAL_EXP, 0; + next; + mes "\"Oh, I can feel them! Please lay them down on the floor.\""; + next; + mes "You lay "+ @CRYSTAL_AMOUNT + " dark crystals down on the floor and step back, nervously expecting the coming."; + next; + if (countitem("DarkCrystal") == 0) goto L_Skip; + mes "[Hanged Man]"; + mes "\"You have more of them, haven't you? It will work better if you give them to me too.\""; + menu + "Ok, here you go.",L_Next1, + "I prefer to keep them.",L_Skip; + +L_Next1: + @crystal = countitem("DarkCrystal"); + if (@crystal > @CRYSTAL_MAX) + @crystal = @CRYSTAL_MAX; + delitem "DarkCrystal", @crystal; + getexp @crystal*@CRYSTAL_EXTRA_EXP, 0; + goto L_Skip; + +L_Skip: + mes "[Hanged Man]"; + mes "\"Well, let's start now.\""; + next; + mes "The hanged man seems very concentrated now, which looks absurd with him hanging there."; + next; + mes "The dark crystals start to glow and buzz. You take another step back."; + next; + mes "The buzzing gets louder and louder, so you can't hear a word the hanged man is saying now."; + next; + Hp = 5; + mes "The crystals explode and hit you!"; + next; + mes "You fall down on the floor and blink frantically to regain your eyesight."; + next; + mes "[Hanged Man]"; + mes "\"Hello? You're ok? I'm sorry, something went wrong. It seems, not only is there a magical barrier, but also my manaflow is blocked. I don't know if this is because I'm dead or part of the barrier spell.\""; + next; + mes "\"I never was dead before, so I can't be sure. But I was able to access my magic - it just got out of control at the critical moment.\""; + next; + mes "\"This is fascinating!\""; + menu + "Ok, you are crazy!",L_Next2, + "Yes, it is very fascinating to be blown up!",L_Next2, + "I NEARLY DIED! AND YOU THINK THIS IS FASCINATING?!",L_Next2; + +L_Next2: + mes "[Hanged Man]"; + mes "\"I sometimes forget the fact that not everybody is fascinated by the riddles of magic. Please forgive me.\""; + next; + mes "\"And I even didn't introduce myself! I am very sorry for my rude behavior!\""; + next; + mes "\"My name is Savaric, first apprentice of the Great Demon Summoner Ymbert.\""; + next; + mes "\"If you can forgive me my behaviour, may I ask you for another favor? Can you please search for someone or something in this inn that could be the source of this dark magic?\""; + @state = 2; + callsub S_Update_Mask; + goto L_close; + +L_News: + mes "[Savaric]"; + mes "\"Welcome back. Did you find a possible source for the dark magic?\""; + if ((@woman < 6) + && (@golbanez == 0)) + menu + "Not yet, I'm still searching.",L_close; + if ((@woman < 6) + && (@golbanez > 0)) + menu + "Yes, let me tell you.",L_Golbenez, + "I don't think so.",L_close; + if ((@woman >= 6) + && (@golbanez == 0)) + menu + "Can you tell me about your relationship to Reid?",L_Reid, + "Not yet, I'm still searching.",L_close; + if ((@woman >= 6) + && (@golbanez >= 0)) + menu + "Can you tell me about your relationship to Reid?",L_Reid, + "Yes, let me tell you.",L_Golbenez, + "I don't think so.",L_close; + goto L_Golbenez; + +L_Golbenez: + mes "You explain how you came to the inn and what Golbenez said to you."; + next; + mes "[Savaric]"; + mes "\"This... this is very disturbing news. Playground he said? Mh.. \""; + next; + mes "\"Savaric seems to be completely absorbed in his thoughts.\""; + menu + "Hello? Are you still there?",L_Next3, + "Excuse me, I don't want to interrupt you, but can you explain to me what's going on? I'm confused.",L_Next3, + "Hey! I'm talking with you!",L_Next3; + +L_Next3: + mes "Savaric winces."; + next; + mes "\"Oh, right - I was just thinking. It makes me feel uncomfortable to hear about Golbenez being involved in this.\""; + next; + mes "\"I told you I'm the apprentice of a demon summoner, remember? Well, this includes learning about the astral beings in this world.\""; + next; + mes "\"And Golbenez - he is a very powerful being, a Demi-God, with a very questionable sense of humor. He was worshipped by a group of cultists some hundred years ago - uhm, some hundred years ago from my lifetime, I mean.\""; + next; + mes "\"But most of his adherents died when he thought it would be funny to test their loyality by sending them on a journey over the sea to a paradise island he promised them - of course, there was no such island.\""; + next; + mes "\"Maybe now you understand what I mean about a questionable sense of humor.\""; + next; + mes "\"But on the other hand, he can grant great power to those who are capable of dealing with him and who offer him enough for his service. Trying to do that would be a risky undertaking in any case.\""; + next; + mes "\"He told you this inn was one of his favorite playgrounds - so it seems he was playing one of his evil games with the people in this inn. And now, he resurrected our memories to this parody of life!\""; + next; + mes "\"" + strcharinfo(0) + "! I need your help again! Please return to Golbenez and try to get out of him what was happening here. But be careful when negotiating.. he will demand a service in return.\""; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Golb: + mes "[Savaric]"; + mes "\"Good to see you back my friend. What did you find out?\""; + if (@golbanez < 5) + menu + "I'm still working on doing all the stuff Golbenez wants me to do.",L_close; + menu + "Now I know what happened. I'll tell you.",L_Next4, + "I'm sorry to tell you, but this was all your fault.",L_Next4; + +L_Next4: + mes "You tell Savaric about what Golbenez showed to you."; + next; + mes "[Savaric]"; + mes "\"I.. I can't believe.. My master told me, I need to be careful because of my temper - but I never thought it would lead me to make such a terrible mistake. Oh, Reid - and all the people in the inn! What have I done?!\""; + next; + mes "He seems pained by his guilt."; + next; + mes "[Savaric]"; + mes "\"" + strcharinfo(0) + ", please, can you go to Reid and tell her about what I've done? And then ask her if she will ever be able to forgive me?\""; + next; + mes "\"But wait. It is not enough just to ask for forgiveness. Please, can you bring her " + @DIAMOND_AMOUNT + " Diamonds? They symbolize my pure feelings for her.\""; + @state = 4; + callsub S_Update_Mask; + goto L_close; + +L_Waiting: + mes "[Savaric]"; + mes "\"Have you already brought the Diamonds to Reid?\""; + goto L_close; + +L_Apologize: + mes "[Savaric]"; + mes "\"Oh thank you! I thank you so much! Reid came here to talk to me.\""; + next; + mes "\"She forgave me! I'm so happy!\""; + next; + mes "\"You did so much for me, can I ask you for one last favor?\""; + next; + mes "\"Golbenez took my soul and I want it back. You were very clever with how you negotiated with him so far. Could you get my soul back for me?\""; + @state = 6; + callsub S_Update_Mask; + goto L_close; + +L_Want_Soul: + if (@golbanez >= 7) + goto L_Soul; + mes "[Savaric]"; + mes "\"Welcome back! Are you still working on getting my soul back?\""; + menu + "I'm doing my best.",L_NextEnd, + "Yes, but it isn't easy.",L_NextEnd; + +L_NextEnd: + mes "[Savaric]"; + mes "\"Thank you so much! I'm counting on you!\""; + goto L_close; + +L_Soul: + mes "[Savaric]"; + mes "\"My soul came back! Oh thank you!\""; + next; + mes "\"Please take this as a symbol of my gratitude.\""; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + getitem "SorcererRed", 1; + @state = 7; + callsub S_Update_Mask; + mes "\"This is what mages and their apprentices wore when I lived. It is white because I wasn't a master yet.\""; + next; + mes "\"But I guess the old traditions have changed since then.\""; + goto L_close; + +L_Have_Soul: + mes "[Savaric]"; + mes "\"I'll be in your debt forever. Thank you so much.\""; + goto L_close; + +L_Reid: + mes "[Savaric]"; + mes "\"Relationship? Well, she is the innkeeper of this inn and I'm a patron. There is nothing more to say about this.\""; + goto L_close; + +L_Not_Enough_Crystals: + mes "It seems you managed to get some, but not enough. Can you bring me more?"; + goto L_close; + +L_Full_Inv: + mes "[Savaric]"; + mes "\"Oh, you can't carry anything more. Come back when you can take it.\""; + goto L_close; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @Graveyard_Inn_Woman_MASK = 0; + @Graveyard_Inn_Woman_SHIFT = 0; + @woman = 0; + @Graveyard_Inn_Golbenez_MASK = 0; + @Graveyard_Inn_Golbenez_SHIFT = 0; + @golbanez = 0; + @minLevel = 0; + @CRYSTAL_AMOUNT = 0; + @CRYSTAL_EXP = 0; + @CRYSTAL_EXTRA_EXP = 0; + @CRYSTAL_MAX = 0; + @DIAMOND_AMOUNT = 0; + @crystal = 0; + close; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/026-2/mapflags.txt b/npc/026-2/mapflags.txt new file mode 100755 index 00000000..0799ef30 --- /dev/null +++ b/npc/026-2/mapflags.txt @@ -0,0 +1,2 @@ +//026-1 mapflag resave 026-1,28,35 +//026-2 mapflag town diff --git a/npc/026-2/testnpcs.txt b/npc/026-2/testnpcs.txt new file mode 100755 index 00000000..b6001cc5 --- /dev/null +++ b/npc/026-2/testnpcs.txt @@ -0,0 +1,57 @@ + +026-2,64,32,0 script Lovers NPC303,{ + mes "You see a man and a woman holding each other very tight."; + next; + mes "They are kissing and whispering things to each other you can't hear."; + next; + mes "Now the woman giggles. They don't notice you."; + next; + mes "Maybe it's better not to bother them."; + close; +} + +026-2,34,59,0 script Archibald NPC306,{ + mes "[Archibald]"; + mes "\"Me need to prepare the food. Me helping the chef cook.\""; + next; + mes "\"Person doesn't disturb me when me is making the food\""; + close; +} + +026-2,41,30,0 script Darnel NPC308,{ + @drunker = rand(4); + if (@drunker == 0) goto L_0; + if (@drunker == 1) goto L_1; + if (@drunker == 2) goto L_2; + if (@drunker == 3) goto L_3; + end; +L_0: + mes "[Darnel]"; + mes "\"zzzZZZzzz...\""; + goto L_close; +L_1: + mes "[Darnel]"; + mes "\"Ish that a Zzombee?...\""; + goto L_close; +L_2: + mes "[Darnel]"; + mes "\"Auuu... Hiccup... Don't byte mee... \""; + goto L_close; +L_3: + mes "[Darnel]"; + mes "\"Moar Bearr...Pleash!\""; + goto L_close; + +L_close: + @drunker = 0; + close; +} + +026-2,33,29,0 script Nigel NPC312,{ + mes "[Nigel]"; + mes "\"Ohh... My head is killing me! I have to stop " + + "drinking too much or I will lose my job... But " + + "being a waiter... oh I can't resist a drink or two!\""; + close; +} + diff --git a/npc/026-2/werewolf.txt b/npc/026-2/werewolf.txt new file mode 100755 index 00000000..febc4149 --- /dev/null +++ b/npc/026-2/werewolf.txt @@ -0,0 +1,176 @@ + +026-2,30,23,0 script Wolfgang NPC305,{ + @Graveyard_Inn_MASK = NIBBLE_5_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_5_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + @ANIMALBONES_AMOUNT = 30; + @ANIMALBONES_EXP = 40000; + @money = 1000; + @minLevel = 80; + + if (@state > 1) goto L_Happy; + if (@state == 1) goto L_Bones; + + mes "[Wolfgang]"; + mes "\"What a nice place here, isn't it?\""; + next; + mes "\"Just the stuff they call 'food' in here is awful, bah.\""; + if (BaseLevel < @minLevel) + goto L_close; + next; + mes "\"I like bones from big animals, the best would be with some raw flesh on it. But just the bones are fine too.\""; + next; + mes "\"Can you bring me " + @ANIMALBONES_AMOUNT + " of them?\""; + @state = 1; + callsub S_Update_Mask; + goto L_close; + +L_Bones: + mes "[Wolfgang]"; + mes "\"Do you have " + @ANIMALBONES_AMOUNT + " bones of an animal for me?\""; + next; + if ((countitem("Bone") > 0) + && (countitem("AnimalBones") >= @ANIMALBONES_AMOUNT)) + menu + "Yes, here they are.",L_Bring, + "What about this normal bone?",L_Human, + "Not yet.",L_close; + if (countitem("Bone") > 0) + menu + "What about this normal bone?",L_Human, + "Not yet.",L_close; + if (countitem("AnimalBones") >= @ANIMALBONES_AMOUNT) + menu + "Yes, here they are.",L_Bring, + "Not yet.",L_close; + menu + "Not yet.",L_close; + +L_Bring: + if (countitem("AnimalBones") < @ANIMALBONES_AMOUNT) + goto L_Not_Enough; + delitem "AnimalBones", @ANIMALBONES_AMOUNT; + getexp @ANIMALBONES_EXP, 0; + mes "[Wolfgang]"; + mes "\"Ah! Wonderful! Thank you.\""; + @state = 2; + callsub S_Update_Mask; + goto L_close; + +L_Human: + mes "[Wolfgang]"; + mes "\"What?! That's a humans bone! I don't eat humans. That brings only trouble.\""; + next; + mes "\"Besides, from that I heard, they taste bad.\""; + goto L_close; + +L_Not_Enough: + mes "[Wolfgang]"; + mes "\"Are you trying to kid me? I can count.\""; + goto L_close; + +L_Happy: + mes "You see the werewolf happily crunching the bones you brought him."; + mes "[Wolfgang]"; + mes "\"Delicious. Thanks again.\""; + next; + mes "\"By the way... would you be interested in a little round of blackjack?\""; + mes "He pulls a deck of cards out of his pocket."; + next; + mes "[Wolfgang]"; + mes "\"You will need " + @money + " GP.\""; + menu + "Sure, why not?",L_Game, + "No, thanks.",L_close; + +L_Game: + if (Zeny < @money) + goto L_No_Money; + mes "[Wolfgang]"; + mes "\"Very nice. Let's start.\""; + mes "He shuffles the cards."; + next; + Zeny = Zeny - @money; + @croupier = rand(0, 4); + @croupier = @croupier + 17; + @player = rand(4, 21); + mes "\"You got " + @player + " with your cards."; + if (@player == 21) + goto L_End; + mes "Do you want another card?\""; + next; + menu + "Yes.", L_Another, + "No.", L_End; + +L_Another: + @tempace = rand(2, 11); + if (@tempace == 11) + goto L_Ace; + @player = @player + @tempace; + if (@player > 21) + goto L_Lost; + if (@player == 21) + goto L_End; + mes "\"You got " + @player + " with your cards."; + mes "Do you want another card?\""; + next; + menu + "Yes", L_Another, + "No", L_End; + +L_End: + if (@player <= @croupier) + goto L_Lost; + mes "\"You won! Hrm, here is your money.\""; + Zeny = Zeny + (3 * @money); + goto L_close; + +L_No_Money: + mes "\"You need at least " + @money + " GP.\""; + goto L_close; + +L_Lost: + mes "[Wolfgang]"; + mes "\"Fine! I won!"; + mes "You got " + @player + " with your cards."; + mes "I had " + @croupier + ".\""; + goto L_close; + +L_Ace: + @player = @player + 11; + if (@player > 21) + @player = @player - 10; + if (@player > 21) + goto L_Lost; + if (@player == 21) + goto L_End; + mes "You got " + @player + " with your cards."; + mes "Do you want another card?"; + next; + menu + "Yes", L_Another, + "No", L_End; + +L_close: + @Graveyard_Inn_MASK = 0; + @Graveyard_Inn_SHIFT = 0; + @state = 0; + @ANIMALBONES_AMOUNT = 0; + @ANIMALBONES_EXP = 0; + @money = 0; + @minLevel = 0; + + @croupier = 0; + @player = 0; + @tempace = 0; + close; + +S_Update_Mask: + set QUEST_Graveyard_Inn, + (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) + | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/027-1/_import.txt b/npc/027-1/_import.txt new file mode 100644 index 00000000..a9eef2b5 --- /dev/null +++ b/npc/027-1/_import.txt @@ -0,0 +1,7 @@ +// Map 027-1: Graveyard +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-1/_mobs.txt", +"npc/027-1/_warps.txt", +"npc/027-1/crypt.txt", +"npc/027-1/graves.txt", +"npc/027-1/mapflags.txt", diff --git a/npc/027-1/_mobs.txt b/npc/027-1/_mobs.txt new file mode 100644 index 00000000..fac92097 --- /dev/null +++ b/npc/027-1/_mobs.txt @@ -0,0 +1,18 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-1: Graveyard mobs +027-1,81,91,47,13 monster Iron Vein 1047,4,900000,60000 +027-1,81,91,48,12 monster Grass Snake 1042,4,900000,60000 +027-1,81,91,49,11 monster Silkworm 1040,4,900000,60000 +027-1,37,64,16,10 monster Scorpion 1043,2,60000,8000 +027-1,37,64,16,10 monster Spider 1044,2,60000,8000 +027-1,71,41,15,11 monster Scorpion 1043,1,175000,20000 +027-1,71,41,15,11 monster Spider 1044,1,175000,20000 +027-1,37,41,16,11 monster Scorpion 1043,4,180000,20000 +027-1,37,41,16,11 monster Spider 1044,4,180000,20000 +027-1,105,40,16,10 monster Scorpion 1043,2,35000,20000 +027-1,105,40,16,10 monster Spider 1044,3,33000,25000 +027-1,70,64,15,10 monster Scorpion 1043,1,60000,8000 +027-1,70,64,15,10 monster Spider 1044,1,60000,8000 +027-1,104,64,15,10 monster Scorpion 1043,2,60000,8000 +027-1,104,64,15,10 monster Spider 1044,2,60000,8000 +027-1,70,40,50,10 monster Legion Swordswoman 1066,15,100000,30000 diff --git a/npc/027-1/_warps.txt b/npc/027-1/_warps.txt new file mode 100644 index 00000000..5fb38ea6 --- /dev/null +++ b/npc/027-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-1: Graveyard warps +027-1,88,84,0 warp #027-1_88_84 0,0,027-2,46,33 +027-1,63,106,0 warp #027-1_63_106 0,0,026-1,63,17 diff --git a/npc/027-1/crypt.txt b/npc/027-1/crypt.txt new file mode 100755 index 00000000..25a6d0ec --- /dev/null +++ b/npc/027-1/crypt.txt @@ -0,0 +1,10 @@ +027-1,28,67,0 script #CryptEntrance NPC45,0,0,{ + if (BaseLevel < 60) + goto L_Weak; + warp "027-2", 36, 110; + end; + +L_Weak: + message strcharinfo(0), "Come back when you're a bit more experienced."; + end; +} diff --git a/npc/027-1/graves.txt b/npc/027-1/graves.txt new file mode 100755 index 00000000..7ed82bac --- /dev/null +++ b/npc/027-1/graves.txt @@ -0,0 +1,108 @@ + +027-1,89,62,0 script Grave#1 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ FotherJ ~"; + mes "The mad sprite making genius who made all the creepy undead monster graphics."; + close; +} + +027-1,118,54,0 script Grave#2 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Yosuhara ~"; + mes "Contributed some of the tombstones."; + close; +} + +027-1,111,62,0 script Grave#3 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Feline Monstrosity ~"; + mes "Made the background music you are hearing."; + close; +} + +027-1,112,76,0 script Grave#4 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Superkoop ~"; + mes "Mapped the swamp to the south."; + close; +} + +027-1,120,76,0 script Grave#5 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Aroleon ~"; + mes "Mapped the swamp to the southeast."; + close; +} + +027-1,100,68,0 script Grave#6 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ John P ~"; + mes "Wrote the graveyard backstory and the dialog for the caretaker quest."; + close; +} + +027-1,94,70,0 script Grave#7 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Spit23 ~"; + mes "Made those freakin awesome cemetery gates."; + close; +} + +027-1,106,60,0 script Grave#8 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Black Don ~"; + mes "Contributed those cool gargoyle statues."; + close; +} + +027-1,92,54,0 script Grave#9 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Jaxad0127 ~"; + mes "Did all the scripting work for the graveyard. Made Caretaker's house."; + close; +} + +027-1,122,64,0 script Grave#10 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Ces Vargavind ~"; + mes "Scripted caretaker's daughter."; + close; +} + +027-1,102,62,0 script Grave#11 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Crush ~"; + mes "Organizer of the whole graveyard project, graveyard fence graphics, mapping of the graveyard itself."; + close; +} + +027-1,104,76,0 script Grave#12 NPC400,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + mes "~ Freeyorp ~"; + mes "Planned out monster stats and placements."; + close; +} diff --git a/npc/027-1/mapflags.txt b/npc/027-1/mapflags.txt new file mode 100755 index 00000000..4a31fce4 --- /dev/null +++ b/npc/027-1/mapflags.txt @@ -0,0 +1,2 @@ +//027-1 mapflag resave 026-1,28,35 +027-1 mapflag outside diff --git a/npc/027-2/_import.txt b/npc/027-2/_import.txt new file mode 100644 index 00000000..69ea2789 --- /dev/null +++ b/npc/027-2/_import.txt @@ -0,0 +1,8 @@ +// Map 027-2: Graveyard Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-2/_mobs.txt", +"npc/027-2/_warps.txt", +"npc/027-2/alacrius.txt", +"npc/027-2/caretaker.txt", +"npc/027-2/mapflags.txt", +"npc/027-2/thurston.txt", diff --git a/npc/027-2/_mobs.txt b/npc/027-2/_mobs.txt new file mode 100644 index 00000000..3c5d7bfc --- /dev/null +++ b/npc/027-2/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-2: Graveyard Indoor mobs +027-2,25,99,4,9 monster Desert Scorpion 1078,1,100000,30000 +027-2,35,88,14,19 monster Legion Swordswoman 1066,15,100000,30000 +027-2,25,99,4,9 monster Desert Snake 1077,1,100000,30000 +027-2,25,99,4,9 monster Desert Scorpion 1078,1,100000,30000 diff --git a/npc/027-2/_warps.txt b/npc/027-2/_warps.txt new file mode 100644 index 00000000..56d1f881 --- /dev/null +++ b/npc/027-2/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-2: Graveyard Indoor warps +027-2,36,111,0 warp #027-2_36_111 5,0,027-1,28,68 +027-2,36,78,0 warp #027-2_36_78 5,0,027-3,25,68 +027-2,46,34,0 warp #027-2_46_34 0,0,027-1,88,85 diff --git a/npc/027-2/alacrius.txt b/npc/027-2/alacrius.txt new file mode 100755 index 00000000..0e80a5a0 --- /dev/null +++ b/npc/027-2/alacrius.txt @@ -0,0 +1,10 @@ + +027-2,45,105,0 script Alacrius NPC313,{ + mes "[Alacrius]"; + mes "\"Hello, I'm Alacrius. \""; + next; + mes "\"A very long time ago, I figured a way to cheat death and the limits of time and space. You may think it is evil, but I did it because of true love... \""; + next; + mes "\"The reaper kidnapped my beloved wife, and took her to the underworld. I had to find a way to stop him, and as time went by, I became what you can see now... But if you dare to cheat death, time and space you'll have to pay a high price... \""; + close; +} diff --git a/npc/027-2/caretaker.txt b/npc/027-2/caretaker.txt new file mode 100755 index 00000000..792cd79b --- /dev/null +++ b/npc/027-2/caretaker.txt @@ -0,0 +1,112 @@ + +027-2,44,25,0 script Caretaker NPC159,{ + @halloween_npc_id = $@halloween_npc_caretaker; + callfunc "TrickOrTreat"; + + if (QUEST_Graveyard_Caretaker == 1) goto L_Return_Dialog; + if (QUEST_Graveyard_Caretaker == 2) goto L_Has_Letter; + if (QUEST_Graveyard_Caretaker == 3) goto L_Delivered_Letter; + if (QUEST_Graveyard_Caretaker == 4) goto L_Give_New_Letter; + if (QUEST_Graveyard_Caretaker == 5) goto L_Has_Letter; + + mes "[Caretaker]"; + mes "\"...another adventurer comes to slay the already dead.\""; + next; + menu + "And what are you?", L_Who, + "That's right, so move and let me kill that demon behind you.", L_close; + +L_Who: + mes "[Caretaker]"; + mes "\"I was once the caretaker of these cemetery grounds, but look at what they have become."; + mes "Now, I care only for my wife. I watch over her... make sure that nobody ever does her harm.\""; + next; + menu + "You guard her corpse day and night?", L_WatchCorpse; + +L_WatchCorpse: + mes "[Caretaker]"; + mes "\"I am bound to this wretched place by the very same spell that was cast to keep the undead from leaving. Until the day that this cemetery is free from its curse, I shall remain within these gates.\""; + QUEST_Graveyard_Caretaker = 1; + close; + +L_Return_Dialog: + mes "[Caretaker]"; + mes "\"I am somewhat fortunate that adventurers like yourself frequent this place... despite your intentions."; + mes "Perhaps you can do me a favor?\""; + next; + menu + "What's the favor?", L_Favor, + "I'm sure I can, for a price.", L_Favor, + "Sorry, I am busy.", L_close; + +L_Favor: + mes "[Caretaker]"; + mes "\"I have not seen my daughter since I was cursed to stay in this cemetery, twenty-five years ago."; + mes "We communicate through letters, now. Would you please take this to her?"; + mes "I am sure she will compensate you for your trouble.\""; + next; + menu + "I will take it to her.", L_Receive, + "I will help you. Where can I find your daughter?", L_Receive, + "Sorry, but I am too busy.", L_close; + +L_Receive: + QUEST_Graveyard_Caretaker = 2; + mes "You receive the letter and put it in a special place so it doesn't get lost in your inventory."; + next; + if (@menu != 2) + close; + goto L_Location; + +L_Location: + mes "[Caretaker]"; + mes "\"Her name is Airlia. She works at the town hall in Hurnscald. Thank you for your help.\""; + close; + +L_Has_Letter: + mes "[Caretaker]"; + mes "\"Have you found my daughter?\""; + next; + menu + "Not yet.", L_close, + "I'll get there when I get there.", L_close, + "Where did you say I could find her?", L_Location; + +L_Delivered_Letter: + mes "[Caretaker]"; + mes "\"Have you found my daughter?\""; + next; + menu + "Yes.", L_Next; + +L_Next: + mes "[Caretaker]"; + mes "\"Thank you for delivering my letter.\""; + QUEST_Graveyard_Caretaker = 4; + close; + +L_Give_New_Letter: + mes "[Caretaker]"; + mes "\"I have another letter, if you want to deliver it.\""; + next; + menu + "Sure.", L_Give_New_Letter_Real, + "I'm too busy right now.", L_close; + +L_Give_New_Letter_Real: + QUEST_Graveyard_Caretaker = 5; + mes "You receive the letter and put it in a special place so it doesn't get lost in your inventory."; + next; + mes "[Caretaker]"; + mes "\"Thank you.\""; + close; + +L_close: + close; +} +027-2,48,22,0 script Joan NPC409,{ + mes "[Joan]"; + mes "..."; + end; +} diff --git a/npc/027-2/mapflags.txt b/npc/027-2/mapflags.txt new file mode 100755 index 00000000..e00a04ce --- /dev/null +++ b/npc/027-2/mapflags.txt @@ -0,0 +1,2 @@ +//027-2 mapflag resave 026-1,28,35 +//026-2 mapflag town diff --git a/npc/027-2/thurston.txt b/npc/027-2/thurston.txt new file mode 100755 index 00000000..e9a1044a --- /dev/null +++ b/npc/027-2/thurston.txt @@ -0,0 +1,21 @@ + +027-2,23,105,0 script Thurston NPC302,{ + @dq_level = 60; + @dq_cost = 45; + @dq_count = 20; + @dq_name$ = "VampireBatWing"; + @dq_friendly_name$ = "Vampire Bat Wing"; + @dq_money = 4000; + @dq_exp = 1000; + + callfunc "DailyQuest"; + + @dq_level = 0; + @dq_cost = 0; + @dq_count = 0; + @dq_name$ = ""; + @dq_friendly_name$ = ""; + @dq_money = 0; + @dq_exp = 0; + close; +} diff --git a/npc/027-3/_import.txt b/npc/027-3/_import.txt new file mode 100644 index 00000000..e371d4d9 --- /dev/null +++ b/npc/027-3/_import.txt @@ -0,0 +1,8 @@ +// Map 027-3: Crypt Basement +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-3/_mobs.txt", +"npc/027-3/_warps.txt", +"npc/027-3/casket_traps.txt", +"npc/027-3/general_krukan_door.txt", +"npc/027-3/mapflags.txt", +"npc/027-3/monsters.txt", diff --git a/npc/027-3/_mobs.txt b/npc/027-3/_mobs.txt new file mode 100644 index 00000000..c5f3a324 --- /dev/null +++ b/npc/027-3/_mobs.txt @@ -0,0 +1,10 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-3: Crypt Basement mobs +027-3,34,63,14,34 monster Scorpion 1043,6,60000,8000 +027-3,97,43,29,15 monster Scorpion 1043,6,60000,8000 +027-3,34,63,14,34 monster Spider 1044,4,60000,8000 +027-3,113,78,14,13 monster Spider 1044,4,60000,8000 +027-3,113,78,13,13 monster Scorpion 1043,4,60000,8000 +027-3,81,87,14,11 monster Legion Swordswoman 1066,15,100000,30000 +027-3,74,45,53,16 monster Green Slime 1024,1,60000,20000 +027-3,98,84,30,7 monster Mouboo 1023,2,60000,20000 diff --git a/npc/027-3/_warps.txt b/npc/027-3/_warps.txt new file mode 100644 index 00000000..3aa709b5 --- /dev/null +++ b/npc/027-3/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-3: Crypt Basement warps +027-3,26,67,0 warp #027-3_26_67 3,0,027-2,36,77 +027-3,126,98,0 warp #027-3_126_98 2,0,027-4,125,18 diff --git a/npc/027-3/casket_traps.txt b/npc/027-3/casket_traps.txt new file mode 100755 index 00000000..f98f7674 --- /dev/null +++ b/npc/027-3/casket_traps.txt @@ -0,0 +1,72 @@ +027-3,32,96,0 script #casket1 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,38,86,0 script #casket2 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,46,76,0 script #casket3 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,38,57,0 script #casket4 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,22,44,0 script #casket5 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,48,43,0 script #casket6 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,86,30,0 script #casket7 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-3,108,45,0 script #casket8 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} diff --git a/npc/027-3/general_krukan_door.txt b/npc/027-3/general_krukan_door.txt new file mode 100755 index 00000000..7a86e971 --- /dev/null +++ b/npc/027-3/general_krukan_door.txt @@ -0,0 +1,16 @@ + +027-3,82,88,0 script #GeneralDoor1 NPC45,1,0,{ + if ( (countitem("CryptKey") < 10) && ($@CRYPT_FIGHT1 != 0) ) + goto L_NoKeys; + + delitem "CryptKey", 10; + warp "027-6",39,60; + goto L_close; + +L_NoKeys: + message strcharinfo(0), "This door is locked."; + end; + +L_close: + close; +} diff --git a/npc/027-3/mapflags.txt b/npc/027-3/mapflags.txt new file mode 100755 index 00000000..5006a523 --- /dev/null +++ b/npc/027-3/mapflags.txt @@ -0,0 +1 @@ +//027-3 mapflag resave 027-2,105,94 diff --git a/npc/027-3/monsters.txt b/npc/027-3/monsters.txt new file mode 100755 index 00000000..52a2a5eb --- /dev/null +++ b/npc/027-3/monsters.txt @@ -0,0 +1,66 @@ + +027-3,21,76,51,100 monster Zombie 1036,2,300000,120000,specialMob027-3::On1036 +027-3,21,30,51,63 monster Zombie 1036,2,200000,10000,specialMob027-3::On1036 +027-3,67,29,129,64 monster Zombie 1036,3,140000,30000,specialMob027-3::On1036 +027-3,101,65,128,93 monster Fallen 1045,3,120000,30000,specialMob027-3::On1045 + +027-3,0,0,0 script specialMob027-3 NPC32767,{ + end; + +On1036: + @mobId = 1036; + callsub S_MOBCOUNT_ZOMBIES; + callfunc "MobPoints"; + end; + +On1045: + @mobId = 1045; + callsub S_MOBCOUNT_FALLENS; + callfunc "MobPoints"; + end; + +S_MOBCOUNT_ZOMBIES: + + @Graveyard_Inn_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_2_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@state != 1) + goto L_Return; + @ring = @ring + 1; + if (@ring < 10) + goto L_Return; + if (rand(8) != 0) + goto L_Return; + message strcharinfo(0), "You found a ring hidden in the zombie's rotten rags. Maybe this is what Aldred was looking for..."; + @state = 2; + callsub S_Update_Mask; + return; + +S_MOBCOUNT_FALLENS: + + @Graveyard_Inn_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_2_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@state != 1) + goto L_Return; + @ring = @ring + 1; + if (@ring < 10) + goto L_Return; + if (rand(8) != 0) + goto L_Return; + message strcharinfo(0), "You found a ring inside the fallen's broken helmet. Maybe this is what Aldred was looking for..."; + @state = 2; + callsub S_Update_Mask; + return; + +L_Return: + return; + +S_Update_Mask: + QUEST_Graveyard_Inn = (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/027-4/_import.txt b/npc/027-4/_import.txt new file mode 100644 index 00000000..2925d133 --- /dev/null +++ b/npc/027-4/_import.txt @@ -0,0 +1,8 @@ +// Map 027-4: Crypt Sub-Basement One +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-4/_mobs.txt", +"npc/027-4/_warps.txt", +"npc/027-4/casket_traps.txt", +"npc/027-4/general_razha_door.txt", +"npc/027-4/mapflags.txt", +"npc/027-4/monsters.txt", diff --git a/npc/027-4/_mobs.txt b/npc/027-4/_mobs.txt new file mode 100644 index 00000000..7d85bace --- /dev/null +++ b/npc/027-4/_mobs.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-4: Crypt Sub-Basement One mobs +027-4,39,84,19,11 monster Scorpion 1043,2,60000,8000 +027-4,27,57,7,11 monster Spider 1044,2,60000,8000 +027-4,108,77,19,7 monster Scorpion 1043,2,60000,8000 +027-4,61,37,19,15 monster Spider 1044,2,60000,8000 +027-4,101,36,19,15 monster Spider 1044,2,60000,8000 diff --git a/npc/027-4/_warps.txt b/npc/027-4/_warps.txt new file mode 100644 index 00000000..9d611f7b --- /dev/null +++ b/npc/027-4/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-4: Crypt Sub-Basement One warps +027-4,125,17,0 warp #027-4_125_17 4,0,027-3,125,98 +027-4,22,98,0 warp #027-4_22_98 3,0,027-5,124,18 diff --git a/npc/027-4/casket_traps.txt b/npc/027-4/casket_traps.txt new file mode 100755 index 00000000..456d4543 --- /dev/null +++ b/npc/027-4/casket_traps.txt @@ -0,0 +1,72 @@ +027-4,60,23,0 script #casket9 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,43,23,0 script #casket10 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,42,47,0 script #casket11 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,90,47,0 script #casket12 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,101,48,0 script #casket13 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,115,17,0 script #casket14 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,99,76,0 script #casket15 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-4,22,23,0 script #casket16 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} diff --git a/npc/027-4/general_razha_door.txt b/npc/027-4/general_razha_door.txt new file mode 100755 index 00000000..68db1550 --- /dev/null +++ b/npc/027-4/general_razha_door.txt @@ -0,0 +1,16 @@ + +027-4,73,76,0 script #GeneralDoor2 NPC45,1,0,{ + if ( (countitem("CryptKey") < 10) && ($@CRYPT_FIGHT2 != 0) ) + goto L_NoKeys; + + delitem "CryptKey", 10; + warp "027-7",39,60; + goto L_close; + +L_NoKeys: + message strcharinfo(0), "This door is locked."; + end; + +L_close: + close; +} diff --git a/npc/027-4/mapflags.txt b/npc/027-4/mapflags.txt new file mode 100755 index 00000000..2770bdd5 --- /dev/null +++ b/npc/027-4/mapflags.txt @@ -0,0 +1 @@ +//027-4 mapflag resave 027-2,105,94 diff --git a/npc/027-4/monsters.txt b/npc/027-4/monsters.txt new file mode 100755 index 00000000..40180670 --- /dev/null +++ b/npc/027-4/monsters.txt @@ -0,0 +1,67 @@ + +027-4,39,84,38,22 monster Fallen 1045,3,60000,8000,specialMob027-4::On1045 +027-4,27,57,15,22 monster Zombie 1036,2,60000,8000,specialMob027-4::On1036 +027-4,108,77,39,14 monster Fallen 1045,3,60000,8000,specialMob027-4::On1045 +027-4,61,37,38,30 monster Zombie 1036,2,60000,8000,specialMob027-4::On1036 +027-4,101,36,38,30 monster Zombie 1036,2,60000,8000,specialMob027-4::On1036 + +027-4,0,0,0 script specialMob027-4 NPC32767,{ + end; + +On1036: + @mobId = 1036; + callsub S_MOBCOUNT_ZOMBIES; + callfunc "MobPoints"; + end; + +On1045: + @mobId = 1045; + callsub S_MOBCOUNT_FALLENS; + callfunc "MobPoints"; + end; + +S_MOBCOUNT_ZOMBIES: + + @Graveyard_Inn_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_2_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@state != 1) + goto L_Return; + @ring = @ring + 1; + if (@ring < 10) + goto L_Return; + if (rand(8) != 0) + goto L_Return; + message strcharinfo(0), "You found a ring hidden in the zombie's rotten rags. Maybe this is what Aldred was looking for..."; + @state = 2; + callsub S_Update_Mask; + return; + +S_MOBCOUNT_FALLENS: + + @Graveyard_Inn_MASK = NIBBLE_2_MASK; + @Graveyard_Inn_SHIFT = NIBBLE_2_SHIFT; + + @state = ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); + + if (@state != 1) + goto L_Return; + @ring = @ring + 1; + if (@ring < 10) + goto L_Return; + if (rand(8) != 0) + goto L_Return; + message strcharinfo(0), "You found a ring inside the fallen's broken helmet. Maybe this is what Aldred was looking for..."; + @state = 2; + callsub S_Update_Mask; + return; + +L_Return: + return; + +S_Update_Mask: + QUEST_Graveyard_Inn = (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) | (@state << @Graveyard_Inn_SHIFT); + return; +} diff --git a/npc/027-5/_import.txt b/npc/027-5/_import.txt new file mode 100644 index 00000000..1947550a --- /dev/null +++ b/npc/027-5/_import.txt @@ -0,0 +1,7 @@ +// Map 027-5: Crypt Sub-Basement Two +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-5/_mobs.txt", +"npc/027-5/_warps.txt", +"npc/027-5/casket_traps.txt", +"npc/027-5/general_terogan_door.txt", +"npc/027-5/mapflags.txt", diff --git a/npc/027-5/_mobs.txt b/npc/027-5/_mobs.txt new file mode 100644 index 00000000..905e8cc4 --- /dev/null +++ b/npc/027-5/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-5: Crypt Sub-Basement Two mobs +027-5,69,42,48,20 monster General Terogan 1124,6,60000,8000 +027-5,69,56,48,34 monster Legion Swordswoman 1066,30,100000,30000 +027-5,69,42,49,20 monster Scorpion 1043,8,60000,8000 +027-5,69,41,49,19 monster Spider 1044,8,60000,8000 +027-5,68,42,48,20 monster Red Slime 1074,6,60000,8000 +027-5,70,80,49,17 monster Scorpion 1043,8,60000,8000 +027-5,69,80,49,18 monster Spider 1044,8,60000,8000 diff --git a/npc/027-5/_warps.txt b/npc/027-5/_warps.txt new file mode 100644 index 00000000..c10c0a34 --- /dev/null +++ b/npc/027-5/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 027-5: Crypt Sub-Basement Two warps +027-5,125,17,0 warp #027-5_125_17 4,0,027-4,21,97 diff --git a/npc/027-5/casket_traps.txt b/npc/027-5/casket_traps.txt new file mode 100755 index 00000000..d13de553 --- /dev/null +++ b/npc/027-5/casket_traps.txt @@ -0,0 +1,72 @@ +027-5,60,34,0 script #casket17 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,34,50,0 script #casket18 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,49,76,0 script #casket19 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,60,89,0 script #casket20 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,90,90,0 script #casket21 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,92,76,0 script #casket22 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,117,61,0 script #casket23 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-5,94,48,0 script #casket24 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} diff --git a/npc/027-5/general_terogan_door.txt b/npc/027-5/general_terogan_door.txt new file mode 100755 index 00000000..4a3f8946 --- /dev/null +++ b/npc/027-5/general_terogan_door.txt @@ -0,0 +1,16 @@ + +027-5,70,25,0 script #GeneralDoor3 NPC45,1,0,{ + if ( (countitem("CryptKey") < 10) && ($@CRYPT_FIGHT3 != 0) ) + goto L_NoKeys; + + delitem "CryptKey", 10; + warp "027-8",39,60; + goto L_close; + +L_NoKeys: + message strcharinfo(0), "This door is locked."; + end; + +L_close: + close; +} diff --git a/npc/027-5/mapflags.txt b/npc/027-5/mapflags.txt new file mode 100755 index 00000000..d502e210 --- /dev/null +++ b/npc/027-5/mapflags.txt @@ -0,0 +1 @@ +//027-5 mapflag resave 027-2,105,94 diff --git a/npc/027-6/_import.txt b/npc/027-6/_import.txt new file mode 100644 index 00000000..52ff4270 --- /dev/null +++ b/npc/027-6/_import.txt @@ -0,0 +1,6 @@ +// Map 027-6: Crypt Sub-Basement Two +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-6/casket_traps.txt", +"npc/027-6/general_krukan.txt", +"npc/027-6/general_krukan_exitdoor.txt", +"npc/027-6/mapflags.txt", diff --git a/npc/027-6/casket_traps.txt b/npc/027-6/casket_traps.txt new file mode 100755 index 00000000..a4d71e69 --- /dev/null +++ b/npc/027-6/casket_traps.txt @@ -0,0 +1,63 @@ +027-6,32,39,0 script #casket25 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,27,48,0 script #casket26 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,52,50,0 script #casket27 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,45,48,0 script #casket28 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,47,30,0 script #casket29 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,33,31,0 script #casket30 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} +027-6,52,40,0 script #casket31 NPC127,1,1,{ + end; + +OnTouch: + heal ((MaxHp/100) * -10), 0; + specialeffect 301; + specialeffect 302; + end; +} diff --git a/npc/027-6/general_krukan.txt b/npc/027-6/general_krukan.txt new file mode 100755 index 00000000..c901dfd0 --- /dev/null +++ b/npc/027-6/general_krukan.txt @@ -0,0 +1,225 @@ + +027-6,39,25,0 script General Krukan NPC400,{ + if ($@CRYPT_FIGHT1 != 0) + end; + + @KRUKAN_SOUL_REQ = 1; + @KRUKAN_SKULL_REQ = 5; + @KRUKAN_DARK_CRYSTAL_REQ = 5; + @KRUKAN_BONE_REQ = 5; + @minLevel = 60; + + mes "[Tome]"; + mes "The Tome is open to a page about a summon ritual that can be performed in this chamber."; + next; + goto L_TomeMain; + +L_TomeMain: + mes "What do you want to do?"; + menu + "Read reagent List.", L_SummonReagents, + "Perform Ritual.", L_Ritual, + "Nothing.", L_close; + +L_SummonReagents: + mes "Says we need " + @KRUKAN_SOUL_REQ + " Soul, " + @KRUKAN_SKULL_REQ + " Skulls, " + @KRUKAN_DARK_CRYSTAL_REQ + " Dark Crystals, and " + @KRUKAN_BONE_REQ + " Bones to perform the ritual."; + next; + goto L_TomeMain; + +L_MissingReagents: + mes "It appears we are missing something, lets check the reagent list again."; + next; + goto L_SummonReagents; + +L_Ritual: + if (BaseLevel < @minLevel) + goto L_ToWeak; + if ( (countitem("Soul") < @KRUKAN_SOUL_REQ) + || (countitem("Skull") < @KRUKAN_SKULL_REQ) + || (countitem("DarkCrystal") < @KRUKAN_DARK_CRYSTAL_REQ) + || (countitem("Bone") < @KRUKAN_BONE_REQ) ) + goto L_MissingReagents; + delitem "Soul", @KRUKAN_SOUL_REQ; + delitem "Skull", @KRUKAN_SKULL_REQ; + delitem "DarkCrystal", @KRUKAN_DARK_CRYSTAL_REQ; + delitem "Bone", @KRUKAN_BONE_REQ; + mes "As you perform the ritual you can feel the energy amass."; + next; + mes "A cold shiver runs down your spine as you feel something manifesting out of the void."; + if ($@CRYPT_FIGHT1 != 0) + goto L_close; + + // initialize fight + $@CRYPT_FIGHT1 = 1; + $@CRYPT_FIGHT1_WAVE = 0; + $@CRYPT_FIGHT1_SUMMONS_COUNT = 2; + $@CRYPT_FIGHT1_PLAYER_COUNT = getmapusers("027-6"); + areamonster "027-6", 0, 0, 79, 84, "", 1043, 1, "General Krukan::OnPetDeath"; + areamonster "027-6", 0, 0, 79, 84, "", 1044, 1, "General Krukan::OnPetDeath"; + + initnpctimer; + goto L_Announce; + +L_ToWeak: + mes "You try to perform the ritual but nothing happens. You don't seem experienced enough."; + goto L_close; + +L_close: + @bonus = 0; + @minLevel = 0; + @KRUKAN_SOUL_REQ = 0; + @KRUKAN_SKULL_REQ = 0; + @KRUKAN_DARK_CRYSTAL_REQ = 0; + @KRUKAN_BONE_REQ = 0; + close; + +OnTimer5000: + setnpctimer 0; + if ($@CRYPT_FIGHT1 != 0) + goto L_CryptLogic; + goto L_Return_1; + +L_Return_1: + $@CRYPT_FIGHT1_PLAYER_COUNT = 0; + areatimer 0, "027-6", 0, 0, 79, 84, 10, "General Krukan::OnTick"; + end; + +L_CryptLogic: + $@CRYPT_FIGHT1_ROUND_PEN = $@CRYPT_FIGHT1_PLAYER_COUNT; + if ($@CRYPT_FIGHT1_ROUND_PEN > 60) + $@CRYPT_FIGHT1_ROUND_PEN = 60; + if ($@CRYPT_FIGHT1_PLAYER_COUNT <= 0) + goto L_CleanUpLosers; + set $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER, $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("027-6", "General Krukan::OnPetDeath") < 0) + goto L_NextWave; + if ($@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER + $@CRYPT_FIGHT1_ROUND_PEN >= 120) + goto L_NextWave; + goto L_Return_1; + +L_NextWave: + $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT1_WAVE = $@CRYPT_FIGHT1_WAVE + 1; + if ( ($@CRYPT_FIGHT1_WAVE > 10) && ($@CRYPT_FIGHT1_SUMMONS_COUNT == 0) ) + goto L_CleanUp; + if ( ($@CRYPT_FIGHT1_WAVE > 10) && ($@CRYPT_FIGHT1_WAVE < 22) ) + goto L_Return_1; + if ($@CRYPT_FIGHT1_WAVE > 22) + goto L_SummonNuke; + if ($@CRYPT_FIGHT1_WAVE < 5) + goto L_WeakSummons; + if ( ($@CRYPT_FIGHT1_WAVE < 10) && ($@CRYPT_FIGHT1_WAVE >= 5) ) + goto L_StrongSummons; + if ($@CRYPT_FIGHT1_WAVE == 10) + goto L_BossSummons; + goto L_SummonNuke; + +L_SummonNuke: + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT + $@CRYPT_FIGHT1_WAVE*2 + $@CRYPT_FIGHT1_PLAYER_COUNT*4; + areamonster "027-6", 0, 0, 79, 84, "", 1043, $@CRYPT_FIGHT1_WAVE*2 + $@CRYPT_FIGHT1_PLAYER_COUNT*4, "General Krukan::OnPetDeath"; + goto L_Announce; + +L_WeakSummons: + $@CRYPT_FIGHT1_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2; + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2); + + areamonster "027-6", 0, 0, 79, 84, "", 1043, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + areamonster "027-6", 0, 0, 79, 84, "", 1044, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + goto L_Announce; + +L_StrongSummons: + $@CRYPT_FIGHT1_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2; + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2); + + areamonster "027-6", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + areamonster "027-6", 0, 0, 79, 84, "", 1045, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + goto L_Announce; + +L_BossSummons: + $@CRYPT_FIGHT1_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2; + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2); + areamonster "027-6", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + areamonster "027-6", 0, 0, 79, 84, "", 1045, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath"; + areamonster "027-6", 0, 0, 79, 84, "", 1127, 1, "General Krukan::OnPetDeath"; + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT + 1; + goto L_Announce; + +L_Announce: + $@msg$ = $@CRYPT_FIGHT1_MESSAGES$[$@CRYPT_FIGHT1_WAVE]; + if ($@msg$ == "") + goto L_Return_1; + mapannounce "027-6", $@msg$, 0; + mapannounce "027-3", $@msg$, 0; + $@msg$ = ""; + goto L_Return_1; + +OnTick: + if (ispcdead()) end; + $@CRYPT_FIGHT1_PLAYER_COUNT = $@CRYPT_FIGHT1_PLAYER_COUNT + 1; + end; + +OnPetDeath: + $@CRYPT_FIGHT1_SUMMONS_COUNT = $@CRYPT_FIGHT1_SUMMONS_COUNT - 1; + end; + +L_CleanUpLosers: + $@CRYPT_FIGHT1 = 0; + $@CRYPT_FIGHT1_PLAYER_COUNT = 0; + $@CRYPT_FIGHT1_WAVE = 0; + $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT1_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT1_ROUND_PEN = 0; + $@CRYPT_FIGHT1_SUMMONS_NUMBER = 0; + killmonster "027-6", "General Krukan::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +L_CleanUp: + areatimer 0, "027-6", 0, 0, 79, 84, 10, "General Krukan::OnReward"; + $@CRYPT_FIGHT1 = 0; + $@CRYPT_FIGHT1_PLAYER_COUNT = 0; + $@CRYPT_FIGHT1_WAVE = 0; + $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT1_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT1_ROUND_PEN = 0; + $@CRYPT_FIGHT1_SUMMONS_NUMBER = 0; + killmonster "027-6", "General Krukan::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +OnReward: + if (ispcdead()) end; + @bonus = (BaseLevel/4); + DailyQuestBonus = DailyQuestBonus + @bonus; + message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; + BOSS_POINTS = BOSS_POINTS + 25; + message strcharinfo(0), "You gain 25 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + @bonus = 0; + @minLevel = 0; + @KRUKAN_SOUL_REQ = 0; + @KRUKAN_SKULL_REQ = 0; + @KRUKAN_DARK_CRYSTAL_REQ = 0; + @KRUKAN_BONE_REQ = 0; + end; + +OnInit: + setarray $@CRYPT_FIGHT1_MESSAGES$, + "General Krukan : Haha, Thank you mortal. You have released me from my prison. To show my gratitude you can die swiftly at my hands and become part of my undead army. MUhahahahaha! Minions, Dispose of these Adventurers!", + "General Krukan : Ha, Looks like you're tougher than I thought.", + "General Krukan : and here I thought I wasn't going to enjoy this.", + "General Krukan : More of them are coming!", + "General Krukan : Minions! Kill them already!", + "General Krukan : *facepalm* I knew I should have hired better help.", + "General Krukan : Well at least you will make a good addition to my army.", + "General Krukan : To the Abyss with you already!", + "General Krukan : How about you try a different approach and kill them already!", + "General Krukan : Minions! Last chance or it's back to being part of an ossuary for you!", + "General Krukan : Looks like if you want something done right you have to do it yourself.", + "General Krukan : Charge!"; + end; +} diff --git a/npc/027-6/general_krukan_exitdoor.txt b/npc/027-6/general_krukan_exitdoor.txt new file mode 100755 index 00000000..f9aa04b8 --- /dev/null +++ b/npc/027-6/general_krukan_exitdoor.txt @@ -0,0 +1,11 @@ + +027-6,38,61,0 script #GeneralExit1 NPC45,6,0,{ + if ($@CRYPT_FIGHT1 == 1) + goto L_Block; + warp "027-3",82,89; + end; + +L_Block: + message strcharinfo(0), "A force field seems to be blocking you from exiting."; + end; +} diff --git a/npc/027-6/mapflags.txt b/npc/027-6/mapflags.txt new file mode 100755 index 00000000..1f2249a1 --- /dev/null +++ b/npc/027-6/mapflags.txt @@ -0,0 +1,2 @@ +027-6 mapflag nosave 027-3,82,90 +//027-6 mapflag resave 027-3,82,90 diff --git a/npc/027-7/_import.txt b/npc/027-7/_import.txt new file mode 100644 index 00000000..b922cb29 --- /dev/null +++ b/npc/027-7/_import.txt @@ -0,0 +1,5 @@ +// Map 027-7: Crypt Sub-Basement Two +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-7/general_razha.txt", +"npc/027-7/general_razha_exitdoor.txt", +"npc/027-7/mapflags.txt", diff --git a/npc/027-7/general_razha.txt b/npc/027-7/general_razha.txt new file mode 100755 index 00000000..79259cc7 --- /dev/null +++ b/npc/027-7/general_razha.txt @@ -0,0 +1,229 @@ + +027-7,39,25,0 script General Razha NPC400,{ + if ($@CRYPT_FIGHT2 != 0) + end; + + @RAZHA_SOUL_REQ = 3; + @RAZHA_DISEASED_HEARTS_REQ = 5; + @RAZHA_UNDEAD_EYE_REQ = 3; + @RAZHA_UNDEAD_EAR_REQ = 2; + @minLevel = 70; + + mes "[Tome]"; + mes "The Tome is open to a page about a summon ritual that can be performed in this chamber."; + next; + goto L_TomeMain; + +L_TomeMain: + mes "What do you want to do?"; + menu + "Read reagent List.", L_SummonReagents, + "Perform Ritual.", L_Ritual, + "Nothing.", L_close; + +L_SummonReagents: + mes "Says we need " + @RAZHA_SOUL_REQ + " Souls, " + @RAZHA_DISEASED_HEARTS_REQ + " Diseased Hearts, " + @RAZHA_UNDEAD_EYE_REQ + " Undead Eyes, and " + @RAZHA_UNDEAD_EAR_REQ + " Undead Ears to perform the ritual."; + next; + goto L_TomeMain; + +L_MissingReagents: + mes "It appears we are missing something, lets check the reagent list again."; + next; + goto L_SummonReagents; + +L_Ritual: + if (BaseLevel < @minLevel) + goto L_ToWeak; + if ( (countitem("Soul") < @RAZHA_SOUL_REQ) + || (countitem("DiseasedHeart") < @RAZHA_DISEASED_HEARTS_REQ) + || (countitem("UndeadEye") < @RAZHA_UNDEAD_EYE_REQ) + || (countitem("UndeadEar") < @RAZHA_UNDEAD_EAR_REQ) ) + goto L_MissingReagents; + delitem "Soul", @RAZHA_SOUL_REQ; + delitem "DiseasedHeart", @RAZHA_DISEASED_HEARTS_REQ; + delitem "UndeadEye", @RAZHA_UNDEAD_EYE_REQ; + delitem "UndeadEar", @RAZHA_UNDEAD_EAR_REQ; + mes "As you perform the ritual you can feel the energy amass."; + next; + mes "A cold shiver runs down your spine as you feel something manifesting out of the void."; + if ($@CRYPT_FIGHT2 != 0) + goto L_close; + + // initialize fight + $@CRYPT_FIGHT2 = 1; + $@CRYPT_FIGHT2_WAVE = 0; + $@CRYPT_FIGHT2_SUMMONS_COUNT = 2; + $@CRYPT_FIGHT2_PLAYER_COUNT = getmapusers("027-7"); + areamonster "027-7", 0, 0, 79, 84, "", 1036, 1, "General Razha::OnPetDeath"; + areamonster "027-7", 0, 0, 79, 84, "", 1124, 1, "General Razha::OnPetDeath"; + + initnpctimer; + goto L_Announce; + +L_ToWeak: + mes "You try to perform the ritual but nothing happens. You don't seem experienced enough."; + goto L_close; + +L_close: + @bonus = 0; + @minLevel = 0; + @RAZHA_SOUL_REQ = 0; + @RAZHA_DISEASED_HEARTS_REQ = 0; + @RAZHA_UNDEAD_EYE_REQ = 0; + @RAZHA_UNDEAD_EAR_REQ = 0; + close; + +OnTimer5000: + setnpctimer 0; + if ($@CRYPT_FIGHT2 != 0) + goto L_CryptLogic; + goto L_Return_1; + +L_Return_1: + $@CRYPT_FIGHT2_PLAYER_COUNT = 0; + areatimer 0, "027-7", 0, 0, 79, 84, 10, "General Razha::OnTick"; + end; + +L_CryptLogic: + $@CRYPT_FIGHT2_ROUND_PEN = $@CRYPT_FIGHT2_PLAYER_COUNT; + if ($@CRYPT_FIGHT2_ROUND_PEN > 60) + $@CRYPT_FIGHT2_ROUND_PEN = 60; + if ($@CRYPT_FIGHT2_PLAYER_COUNT <= 0) + goto L_CleanUpLosers; + set $@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER, $@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("027-7", "General Razha::OnPetDeath") < 0) + goto L_NextWave; + if ($@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER + $@CRYPT_FIGHT2_ROUND_PEN >= 120) + goto L_NextWave; + goto L_Return_1; + +L_NextWave: + $@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT2_WAVE = $@CRYPT_FIGHT2_WAVE + 1; + if ( ($@CRYPT_FIGHT2_WAVE > 10) && ($@CRYPT_FIGHT2_SUMMONS_COUNT == 0) ) + goto L_CleanUp; + if ( ($@CRYPT_FIGHT2_WAVE > 10) && ($@CRYPT_FIGHT2_WAVE < 22) ) + goto L_Return_1; + if ($@CRYPT_FIGHT2_WAVE > 22) + goto L_SummonNuke; + if ($@CRYPT_FIGHT2_WAVE < 5) + goto L_WeakSummons; + if ( ($@CRYPT_FIGHT2_WAVE < 10) && ($@CRYPT_FIGHT2_WAVE >= 5) ) + goto L_StrongSummons; + if ($@CRYPT_FIGHT2_WAVE == 10) + goto L_BossSummons; + goto L_SummonNuke; + +L_SummonNuke: + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT + $@CRYPT_FIGHT2_WAVE*2 + $@CRYPT_FIGHT2_PLAYER_COUNT*4; + areamonster "027-7", 0, 0, 79, 84, "", 1036, $@CRYPT_FIGHT2_WAVE*2 + $@CRYPT_FIGHT2_PLAYER_COUNT*4, "General Razha::OnPetDeath"; + goto L_Announce; + +L_WeakSummons: + $@CRYPT_FIGHT2_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT2_WAVE) + (2 * $@CRYPT_FIGHT2_PLAYER_COUNT))/2; + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2); + + areamonster "027-7", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + areamonster "027-7", 0, 0, 79, 84, "", 1045, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + goto L_Announce; + +L_StrongSummons: + $@CRYPT_FIGHT2_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT2_WAVE) + (2 * $@CRYPT_FIGHT2_PLAYER_COUNT))/2; + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2); + + areamonster "027-7", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + areamonster "027-7", 0, 0, 79, 84, "", 1124, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + goto L_Announce; + +L_BossSummons: + $@CRYPT_FIGHT2_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT2_WAVE) + (2 * $@CRYPT_FIGHT2_PLAYER_COUNT))/2; + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2); + areamonster "027-7", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + areamonster "027-7", 0, 0, 79, 84, "", 1124, ($@CRYPT_FIGHT2_SUMMONS_NUMBER/2), "General Razha::OnPetDeath"; + areamonster "027-7", 0, 0, 79, 84, "", 1128, 1, "General Razha::OnPetDeath"; + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT + 1; + goto L_Announce; + +L_Announce: + $@msg$ = $@CRYPT_FIGHT2_MESSAGES$[$@CRYPT_FIGHT2_WAVE]; + if ($@msg$ == "") + goto L_Return_1; + mapannounce "027-7", $@msg$, 0; + mapannounce "027-4", $@msg$, 0; + $@msg$ = ""; + goto L_Return_1; + +OnTick: + if (ispcdead()) end; + $@CRYPT_FIGHT2_PLAYER_COUNT = $@CRYPT_FIGHT2_PLAYER_COUNT + 1; + end; + +OnPetDeath: + $@CRYPT_FIGHT2_SUMMONS_COUNT = $@CRYPT_FIGHT2_SUMMONS_COUNT - 1; + end; + +L_CleanUpLosers: + mapannounce "027-7", "General Razha : Oh where did you all go, I was beginning to have fun here.", 0; + mapannounce "027-4", "The battle is lost.", 0; + $@CRYPT_FIGHT2 = 0; + $@CRYPT_FIGHT2_PLAYER_COUNT = 0; + $@CRYPT_FIGHT2_WAVE = 0; + $@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT2_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT2_ROUND_PEN = 0; + $@CRYPT_FIGHT2_SUMMONS_NUMBER = 0; + killmonster "027-7", "General Razha::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +L_CleanUp: + mapannounce "027-7", "General Razha : How in all hells could that happen? I am lost forever.", 0; + mapannounce "027-4", "General Razha is defeated.", 0; + areatimer 0, "027-7", 0, 0, 79, 84, 10, "General Razha::OnReward"; + $@CRYPT_FIGHT2 = 0; + $@CRYPT_FIGHT2_PLAYER_COUNT = 0; + $@CRYPT_FIGHT2_WAVE = 0; + $@CRYPT_FIGHT2_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT2_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT2_ROUND_PEN = 0; + $@CRYPT_FIGHT2_SUMMONS_NUMBER = 0; + killmonster "027-7", "General Razha::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +OnReward: + if (ispcdead()) end; + @bonus = (BaseLevel/2); + DailyQuestBonus = DailyQuestBonus + @bonus; + message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; + BOSS_POINTS = BOSS_POINTS + 50; + message strcharinfo(0), "You gain 50 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + @bonus = 0; + @minLevel = 0; + @RAZHA_SOUL_REQ = 0; + @RAZHA_DISEASED_HEARTS_REQ = 0; + @RAZHA_UNDEAD_EYE_REQ = 0; + @RAZHA_UNDEAD_EAR_REQ = 0; + end; + +OnInit: + setarray $@CRYPT_FIGHT2_MESSAGES$, + "General Razha : Haha, Thank you mortal. You have released me from my prison. To show my graditude you can die swiftly at my hands and become part of my undead army. MUhahahahaha! Minions, Dispose of these Adventurers!", + "General Razha : Ha, Looks like your tougher then I thought.", + "General Razha : and here I thought I wasn't going to enjoy this.", + "General Razha : More of them are coming!", + "General Razha : Minions! Kill them already!", + "General Razha : *facepalm* I knew I should have hired better help.", + "General Razha : Well at least you will make a good addition to my army.", + "General Razha : To the Abyss with you already!", + "General Razha : How about you try a different approach and kill them already!", + "General Razha : Minions! Last chance or it's back to being part of an ossuary for you!", + "General Razha : Looks like if you want something done right you have to do it yourself.", + "General Razha : Charge!."; + end; +} diff --git a/npc/027-7/general_razha_exitdoor.txt b/npc/027-7/general_razha_exitdoor.txt new file mode 100755 index 00000000..0487177f --- /dev/null +++ b/npc/027-7/general_razha_exitdoor.txt @@ -0,0 +1,11 @@ + +027-7,36,61,0 script #GeneralExit2 NPC45,6,0,{ + if ($@CRYPT_FIGHT2 != 0) + goto L_Block; + warp "027-4",73,77; + end; + +L_Block: + message strcharinfo(0), "A force field seems to be blocking you from exiting."; + end; +} diff --git a/npc/027-7/mapflags.txt b/npc/027-7/mapflags.txt new file mode 100755 index 00000000..808ab063 --- /dev/null +++ b/npc/027-7/mapflags.txt @@ -0,0 +1,2 @@ +027-7 mapflag nosave 027-4,73,78 +//027-7 mapflag resave 027-4,73,78 diff --git a/npc/027-8/_import.txt b/npc/027-8/_import.txt new file mode 100644 index 00000000..a22c49df --- /dev/null +++ b/npc/027-8/_import.txt @@ -0,0 +1,5 @@ +// Map 027-8: Crypt Sub-Basement Two +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/027-8/general_terogan.txt", +"npc/027-8/general_terogan_exitdoor.txt", +"npc/027-8/mapflags.txt", diff --git a/npc/027-8/general_terogan.txt b/npc/027-8/general_terogan.txt new file mode 100755 index 00000000..451daeca --- /dev/null +++ b/npc/027-8/general_terogan.txt @@ -0,0 +1,315 @@ + +027-8,39,24,0 script General Terogan#Main NPC400,{ + if ($@CRYPT_FIGHT3 != 0) + end; + + @TEROGAN_SOUL_REQ = 5; + @TEROGAN_ROTTEN_RAGS_REQ = 5; + @TEROGAN_UNDEAD_EYE_REQ = 3; + @TEROGAN_UNDEAD_EAR_REQ = 2; + @minLevel = 80; + + mes "[Tome]"; + mes "The Tome is open to a page about a summon ritual that can be performed in this chamber."; + next; + goto L_TomeMain; + +L_TomeMain: + mes "What do you want to do?"; + menu + "Read reagent List.", L_SummonReagents, + "Assign myself left.", L_SummonLeft, + "Assign myself right.", L_SummonRight, + "Perform Ritual.", L_RitualMenu, + "Nothing.", L_close; + +L_SummonReagents: + mes "Says we need " + @TEROGAN_SOUL_REQ + " Souls, " + @TEROGAN_ROTTEN_RAGS_REQ + " Rotten Rags, " + @TEROGAN_UNDEAD_EYE_REQ + " Undead Eyes, and " + @TEROGAN_UNDEAD_EAR_REQ + " Undead Ears to perform the ritual. You will also need help, as the summon states both rooms need at least 1 occupant during the ritual."; + next; + goto L_TomeMain; + +L_MissingReagents: + mes "It appears we are missing something, lets check the reagent list again."; + next; + goto L_SummonReagents; + +L_SummonLeft: + warp "027-8", 27, 43; + goto L_close; + +L_SummonRight: + warp "027-8", 51, 43; + goto L_close; + +L_RitualMenu: + mes "Which side do you want to be on?"; + menu + "Left.", L_RitualLeft, + "Right.", L_RitualRight; + +L_RitualLeft: + if (BaseLevel < @minLevel) + goto L_ToWeak; + if ( (countitem("Soul") < @TEROGAN_SOUL_REQ) + || (countitem("RottenRags") < @TEROGAN_ROTTEN_RAGS_REQ) + || (countitem("UndeadEye") < @TEROGAN_UNDEAD_EYE_REQ) + || (countitem("UndeadEar") < @TEROGAN_UNDEAD_EAR_REQ) ) + goto L_MissingReagents; + if (getareausers("027-8", 43, 39, 58, 60) == 0) + goto L_NeedOther; + delitem "Soul", @TEROGAN_SOUL_REQ; + delitem "RottenRags", @TEROGAN_ROTTEN_RAGS_REQ; + delitem "UndeadEye", @TEROGAN_UNDEAD_EYE_REQ; + delitem "UndeadEar", @TEROGAN_UNDEAD_EAR_REQ; + mes "As you perform the ritual you can feel the energy amass."; + next; + mes "A cold shiver runs down your spine as you feel something manifesting out of the void."; + if ($@CRYPT_FIGHT3 != 0) + goto L_close; + + // initialize fight + $@CRYPT_FIGHT3 = 1; + $@CRYPT_FIGHT3_WAVE = 0; + $@CRYPT_FIGHT3_SUMMONS_COUNT = 2; + $@CRYPT_FIGHT3_PLAYER_COUNT = getmapusers("027-8"); + areamonster "027-8", 43, 39, 58, 60, "", 1124, 1, "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1075, 1, "General Terogan#Main::OnPetDeath"; + + initnpctimer; + warp "027-8", 27, 43; + goto L_Announce; + +L_RitualRight: + if (BaseLevel < @minLevel) + goto L_ToWeak; + if ( (countitem("Soul") < @TEROGAN_SOUL_REQ) + || (countitem("RottenRags") < @TEROGAN_ROTTEN_RAGS_REQ) + || (countitem("UndeadEye") < @TEROGAN_UNDEAD_EYE_REQ) + || (countitem("UndeadEar") < @TEROGAN_UNDEAD_EAR_REQ) ) + goto L_MissingReagents; + if (getareausers("027-8", 20, 39, 35, 60) == 0) + goto L_NeedOther; + delitem "Soul", @TEROGAN_SOUL_REQ; + delitem "RottenRags", @TEROGAN_ROTTEN_RAGS_REQ; + delitem "UndeadEye", @TEROGAN_UNDEAD_EYE_REQ; + delitem "UndeadEar", @TEROGAN_UNDEAD_EAR_REQ; + mes "As you perform the ritual you can feel the energy amass."; + next; + mes "A cold shiver runs down your spine as you feel something manifesting out of the void."; + warp "027-8", 51, 43; + if ($@CRYPT_FIGHT3 != 0) + goto L_close; + + // initialize fight + $@CRYPT_FIGHT3 = 1; + $@CRYPT_FIGHT3_WAVE = 0; + $@CRYPT_FIGHT3_SUMMONS_COUNT = 2; + $@CRYPT_FIGHT3_PLAYER_COUNT = getmapusers("027-8"); + areamonster "027-8", 43, 39, 58, 60, "", 1124, 1, "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1075, 1, "General Terogan#Main::OnPetDeath"; + + initnpctimer; + goto L_Announce; + +L_NeedOther: + mes "You need at least one other person in the the other chamber to start."; + goto L_TomeMain; + +L_ToWeak: + mes "You try to perform the ritual but nothing happens. You don't seem experienced enough."; + goto L_close; + +L_close: + @bonus = 0; + @minLevel = 0; + @TEROGAN_SOUL_REQ = 0; + @TEROGAN_ROTTEN_RAGS_REQ = 0; + @TEROGAN_UNDEAD_EYE_REQ = 0; + @TEROGAN_UNDEAD_EAR_REQ = 0; + close; + +OnTimer5000: + setnpctimer 0; + if ($@CRYPT_FIGHT3 != 0) + goto L_CryptLogic; + goto L_Return_1; + +L_Return_1: + $@CRYPT_FIGHT3_PLAYER_COUNT = 0; + areatimer 0, "027-8", 0, 0, 79, 84, 10, "General Terogan#Main::OnTick"; + end; + +L_CryptLogic: + $@CRYPT_FIGHT3_ROUND_PEN = $@CRYPT_FIGHT3_PLAYER_COUNT; + if ($@CRYPT_FIGHT3_ROUND_PEN > 60) + $@CRYPT_FIGHT3_ROUND_PEN = 60; + if ($@CRYPT_FIGHT3_PLAYER_COUNT <= 0) goto L_CleanUpLosers; + if (getareausers("027-8", 20, 39, 35, 60, 1) < 1) goto L_Failure; + if (getareausers("027-8", 43, 39, 58, 60, 1) < 1) goto L_Failure; + set $@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER, $@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("027-8", "General Terogan#Main::OnPetDeath") < 0) + goto L_NextWave; + if ($@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER + $@CRYPT_FIGHT3_ROUND_PEN >= 120) + goto L_NextWave; + goto L_Return_1; + +L_NextWave: + $@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT3_WAVE = $@CRYPT_FIGHT3_WAVE + 1; + if ( ($@CRYPT_FIGHT3_WAVE > 10) && ($@CRYPT_FIGHT3_SUMMONS_COUNT == 0) ) + goto L_CleanUp; + if ( ($@CRYPT_FIGHT3_WAVE > 10) && ($@CRYPT_FIGHT3_WAVE < 22) ) + goto L_Return_1; + if ($@CRYPT_FIGHT3_WAVE > 22) + goto L_SummonNuke; + if ($@CRYPT_FIGHT3_WAVE < 5) + goto L_WeakSummons; + if ( ($@CRYPT_FIGHT3_WAVE < 10) && ($@CRYPT_FIGHT3_WAVE >= 5) ) + goto L_StrongSummons; + if ($@CRYPT_FIGHT3_WAVE == 10) + goto L_BossSummons; + goto L_SummonNuke; + +L_SummonNuke: + $@CRYPT_FIGHT3_SUMMONS_COUNT = $@CRYPT_FIGHT3_SUMMONS_COUNT + $@CRYPT_FIGHT3_WAVE*2 + $@CRYPT_FIGHT3_PLAYER_COUNT*4; + areamonster "027-8", 0, 0, 79, 84, "", 1124, $@CRYPT_FIGHT3_WAVE*2 + $@CRYPT_FIGHT3_PLAYER_COUNT*4, "General Terogan#Main::OnPetDeath"; + goto L_Announce; + +L_WeakSummons: + $@CRYPT_FIGHT3_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT3_WAVE) + (2 * $@CRYPT_FIGHT3_PLAYER_COUNT))/2; + $@CRYPT_FIGHT3_SUMMONS_COUNT = $@CRYPT_FIGHT3_SUMMONS_COUNT + ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2); + + areamonster "027-8", 43, 39, 58, 60, "", 1124, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1074, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + goto L_Announce; + +L_StrongSummons: + $@CRYPT_FIGHT3_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT3_WAVE) + (2 * $@CRYPT_FIGHT3_PLAYER_COUNT))/2; + $@CRYPT_FIGHT3_SUMMONS_COUNT = $@CRYPT_FIGHT3_SUMMONS_COUNT + (2 * ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2)); + + areamonster "027-8", 43, 39, 58, 60, "", 1124, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1075, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + goto L_Announce; + +L_BossSummons: + $@CRYPT_FIGHT3_SUMMONS_NUMBER = (5 + (1 * $@CRYPT_FIGHT3_WAVE) + (2 * $@CRYPT_FIGHT3_PLAYER_COUNT))/2; + $@CRYPT_FIGHT3_SUMMONS_COUNT = $@CRYPT_FIGHT3_SUMMONS_COUNT + (2 * ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2)) + 2; + areamonster "027-8", 43, 39, 58, 60, "", 1124, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1075, ($@CRYPT_FIGHT3_SUMMONS_NUMBER/2), "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 43, 39, 58, 60, "", 1129, 1, "General Terogan#Main::OnPetDeath"; + areamonster "027-8", 20, 39, 35, 60, "", 1129, 1, "General Terogan#Main::OnPetDeath"; + goto L_Announce; + +L_Announce: + $@msg$ = $@CRYPT_FIGHT3_MESSAGES$[$@CRYPT_FIGHT3_WAVE]; + if ($@msg$ == "") + goto L_Return_1; + mapannounce "027-8", $@msg$, 0; + mapannounce "027-5", $@msg$, 0; + $@msg$ = ""; + goto L_Return_1; + +OnTick: + if (ispcdead()) + end; + $@CRYPT_FIGHT3_PLAYER_COUNT = $@CRYPT_FIGHT3_PLAYER_COUNT + 1; + end; + +OnPetDeath: + $@CRYPT_FIGHT3_SUMMONS_COUNT = $@CRYPT_FIGHT3_SUMMONS_COUNT - 1; + end; + +L_Failure: + if ($@CRYPT_FAIL_ANNOUNCED) goto L_NextWave; + $@CRYPT_FAIL_ANNOUNCED = 1; + mapannounce "027-8", "Looks like your neighbour team to is finished off, this is your death sentence!", 0; + $@CRYPT_FIGHT3_WAVE = 23; + goto L_NextWave; + +L_CleanUpLosers: + mapannounce "027-8", "General Terogan : You just proved you cannot even coordinate a simple task. Come back when you are prepared", 0; + $@CRYPT_FIGHT3 = 0; + $@CRYPT_FIGHT3_PLAYER_COUNT = 0; + $@CRYPT_FIGHT3_WAVE = 0; + $@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT3_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT3_ROUND_PEN = 0; + $@CRYPT_FIGHT3_SUMMONS_NUMBER = 0; + $@CRYPT_FAIL_ANNOUNCED = 0; + killmonster "027-8", "General Terogan#Main::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +L_CleanUp: + mapannounce "027-8", "General Terogan : You might have won this battle, but you will never defeat me!", 0; + areatimer 0, "027-8", 0, 0, 79, 84, 10, "General Terogan#Main::OnReward"; + $@CRYPT_FIGHT3 = 0; + $@CRYPT_FIGHT3_PLAYER_COUNT = 0; + $@CRYPT_FIGHT3_WAVE = 0; + $@CRYPT_FIGHT3_SUMMONS_ROUND_TIMER = 0; + $@CRYPT_FIGHT3_SUMMONS_COUNT = 0; + $@CRYPT_FIGHT3_ROUND_PEN = 0; + $@CRYPT_FIGHT3_SUMMONS_NUMBER = 0; + $@CRYPT_FAIL_ANNOUNCED = 0; + killmonster "027-8", "General Terogan#Main::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +OnReward: + if (ispcdead()) + end; + @bonus = (BaseLevel/2); + DailyQuestBonus = DailyQuestBonus + @bonus; + message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; + BOSS_POINTS = BOSS_POINTS + 75; + message strcharinfo(0), "You gain 75 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + @bonus = 0; + @minLevel = 0; + @TEROGAN_SOUL_REQ = 0; + @TEROGAN_ROTTEN_RAGS_REQ = 0; + @TEROGAN_UNDEAD_EYE_REQ = 0; + @TEROGAN_UNDEAD_EAR_REQ = 0; + end; + +OnInit: + setarray $@CRYPT_FIGHT3_MESSAGES$, + "General Terogan : Haha, Thank you mortal. You have released me from my prison. To show my graditude you can die swiftly at my hands and become part of my undead army. MUhahahahaha! Minions, Dispose of these Adventurers!", + "General Terogan : Ha, Looks like your tougher then I thought.", + "General Terogan : and here I thought I wasn't going to enjoy this.", + "General Terogan : More of them are coming!", + "General Terogan : Minions! Kill them already!", + "General Terogan : *facepalm* I knew I should have hired better help.", + "General Terogan : Well at least you will make a good addition to my army.", + "General Terogan : To the Abyss with you already!", + "General Terogan : How about you try a different approach and kill them already!", + "General Terogan : Minions! Last chance or it's back to being part of an ossuary for you!", + "General Terogan : Looks like if you want something done right you have to do it yourself.", + "General Terogan : Charge!."; + end; +} + +027-8,27,41,0 script General Terogan#Exit1 NPC400,{ + if ($@CRYPT_FIGHT3 != 0) + message strcharinfo(0), "You are way too busy to check this book right now"; + if ($@CRYPT_FIGHT3 != 0) + end; + mes "[General Terogan]"; + mes "\"Let's get you out of here " + strcharinfo(0) + "\""; + warp "027-8", 38, 29; + end; +} +027-8,51,41,0 script General Terogan#Exit2 NPC400,{ + if ($@CRYPT_FIGHT3 != 0) + message strcharinfo(0), "You are way too busy to check this book right now"; + if ($@CRYPT_FIGHT3 != 0) + end; + mes "[General Terogan]"; + mes "\"Let's get you out of here " + strcharinfo(0) + "\""; + warp "027-8", 38, 29; + end; +} diff --git a/npc/027-8/general_terogan_exitdoor.txt b/npc/027-8/general_terogan_exitdoor.txt new file mode 100755 index 00000000..e9643579 --- /dev/null +++ b/npc/027-8/general_terogan_exitdoor.txt @@ -0,0 +1,11 @@ + +027-8,38,61,0 script #GeneralExit3 NPC45,3,0,{ + if ($@CRYPT_FIGHT3 != 0) + goto L_Block; + warp "027-5",70,26; + end; + +L_Block: + message strcharinfo(0), "A force field seems to be blocking you from exiting."; + end; +} diff --git a/npc/027-8/mapflags.txt b/npc/027-8/mapflags.txt new file mode 100755 index 00000000..180a25be --- /dev/null +++ b/npc/027-8/mapflags.txt @@ -0,0 +1,2 @@ +027-8 mapflag nosave 027-5,70,27 +//027-8 mapflag resave 027-5,70,27 diff --git a/npc/028-1/_import.txt b/npc/028-1/_import.txt new file mode 100644 index 00000000..1ff82398 --- /dev/null +++ b/npc/028-1/_import.txt @@ -0,0 +1,5 @@ +// Map 028-1: GM Island +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/028-1/_warps.txt", +"npc/028-1/mapflags.txt", +"npc/028-1/portal.txt", diff --git a/npc/028-1/_warps.txt b/npc/028-1/_warps.txt new file mode 100644 index 00000000..f1b3aca1 --- /dev/null +++ b/npc/028-1/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 028-1: GM Island warps +028-1,120,125,0 warp #028-1_120_125 0,0,028-3,33,77 diff --git a/npc/028-1/mapflags.txt b/npc/028-1/mapflags.txt new file mode 100755 index 00000000..f0c74e5d --- /dev/null +++ b/npc/028-1/mapflags.txt @@ -0,0 +1 @@ +028-1 mapflag nosave 009-1,53,40 diff --git a/npc/028-1/portal.txt b/npc/028-1/portal.txt new file mode 100755 index 00000000..d6aaeafc --- /dev/null +++ b/npc/028-1/portal.txt @@ -0,0 +1,14 @@ +028-1,98,37,0 script Exit NPC400,0,0,{ + mes "[Exit]"; + mes "Would you like to leave this place?"; + menu + "Yes.", L_Leave, + "No.", L_close; + +L_Leave: + warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + goto L_close; + +L_close: + close; +} diff --git a/npc/028-3/_import.txt b/npc/028-3/_import.txt new file mode 100644 index 00000000..0cd918c5 --- /dev/null +++ b/npc/028-3/_import.txt @@ -0,0 +1,4 @@ +// Map 028-3: GM Island Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/028-3/_warps.txt", +"npc/028-3/mapflags.txt", diff --git a/npc/028-3/_warps.txt b/npc/028-3/_warps.txt new file mode 100644 index 00000000..17167813 --- /dev/null +++ b/npc/028-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 028-3: GM Island Cave warps +028-3,33,78,0 warp #028-3_33_78 0,0,028-1,120,126 diff --git a/npc/028-3/mapflags.txt b/npc/028-3/mapflags.txt new file mode 100755 index 00000000..62771987 --- /dev/null +++ b/npc/028-3/mapflags.txt @@ -0,0 +1 @@ +028-3 mapflag nosave 009-1,53,40 diff --git a/npc/029-1/_import.txt b/npc/029-1/_import.txt new file mode 100644 index 00000000..b24b0973 --- /dev/null +++ b/npc/029-1/_import.txt @@ -0,0 +1,21 @@ +// Map 029-1: Candor Island +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/029-1/_mobs.txt", +"npc/029-1/_warps.txt", +"npc/029-1/aahna.txt", +"npc/029-1/barrier.txt", +"npc/029-1/dock.txt", +"npc/029-1/ferry_master.txt", +"npc/029-1/hasan.txt", +"npc/029-1/hideandseek.txt", +"npc/029-1/kaan.txt", +"npc/029-1/liana.txt", +"npc/029-1/mapflags.txt", +"npc/029-1/monster_guide.txt", +"npc/029-1/rewards_master.txt", +"npc/029-1/soul-menhir.txt", +"npc/029-1/traveler.txt", +"npc/029-1/tutorial.txt", +"npc/029-1/valon.txt", +"npc/029-1/vincent.txt", +"npc/029-1/zegas.txt", diff --git a/npc/029-1/_mobs.txt b/npc/029-1/_mobs.txt new file mode 100644 index 00000000..a1a75148 --- /dev/null +++ b/npc/029-1/_mobs.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-1: Candor Island mobs +029-1,46,48,2,0 monster Alizarin Plant 1037,1,10000,120000 +029-1,73,93,7,6 monster Piou 1002,8,100000,30000 +029-1,90,35,7,5 monster Gold Vein 1046,16,100000,30000 +029-1,93,100,10,9 monster Gold Vein 1046,8,100000,30000 +029-1,43,43,15,11 monster Piousse 1003,2,100000,30000 diff --git a/npc/029-1/_warps.txt b/npc/029-1/_warps.txt new file mode 100644 index 00000000..dd68e552 --- /dev/null +++ b/npc/029-1/_warps.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-1: Candor Island warps +029-1,40,88,0 warp #029-1_40_88 0,0,029-2,29,61 +029-1,44,83,0 warp #029-1_44_83 0,0,029-2,22,92 +029-1,52,84,0 warp #029-1_52_84 0,0,029-2,103,61 +029-1,58,79,0 warp #029-1_58_79 0,0,029-2,94,30 +029-1,49,77,0 warp #029-1_49_77 0,0,029-2,24,123 diff --git a/npc/029-1/aahna.txt b/npc/029-1/aahna.txt new file mode 100755 index 00000000..3ae76a28 --- /dev/null +++ b/npc/029-1/aahna.txt @@ -0,0 +1,9 @@ +029-1,71,52,0 script Aahna NPC404,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + mes "[Aahna]"; + mes "\"Hello, What a lovely day for a stroll.\""; + close; +} diff --git a/npc/029-1/barrier.txt b/npc/029-1/barrier.txt new file mode 100755 index 00000000..825f2d0c --- /dev/null +++ b/npc/029-1/barrier.txt @@ -0,0 +1,21 @@ +029-1,69,61,0 script #CandorBarrier NPC45,0,0,{ + if ($@FIGHT_CAVE_STATUS == 1) goto L_Block; + if (BaseLevel < 40) goto L_Block; + warp "029-3", 49, 53; + end; + +L_Block: + message strcharinfo(0), "Some force seems to be blocking you from entering."; + end; +} + +029-1,69,61,0 script #CandorAnnouncer NPC32767,{ + end; +OnTalk: + if (BaseLevel >= 40) announce "Parua : " + $@candor_npctalk$, 3; // do not show these to newbies + end; + +OnCommandTalk: + areatimer 0, "029-1", 61, 61, 69, 73, 0, "#CandorAnnouncer::OnTalk"; + end; +} diff --git a/npc/029-1/dock.txt b/npc/029-1/dock.txt new file mode 100755 index 00000000..c40f3646 --- /dev/null +++ b/npc/029-1/dock.txt @@ -0,0 +1,42 @@ + +029-1,46,111,0 script Candor Dock NPC400,1,0,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardCandorFerry"; + end; +} + +029-1,51,118,0 script Candor Koga NPC395,8,7,{ + @npc_distance = 8; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardCandorFerry"; + end; + +OnTouch: + addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard"; + end; + +OnBoard: + callfunc "BoardCandorFerry"; + end; +} + +029-1,55,110,0 script #CandorDock NPC32767,{ + end; +OnCommandArrive: + disablenpc "Candor Dock"; + enablenpc "Candor Koga"; + areatimer 0, "029-1", 39, 111, 53, 113, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock + end; + +OnAreaWarp: + callfunc "BoardCandorFerry"; + end; + +OnCommandWarp: + disablenpc "Candor Koga"; + enablenpc "Candor Dock"; + end; +} diff --git a/npc/029-1/ferry_master.txt b/npc/029-1/ferry_master.txt new file mode 100755 index 00000000..8828ee71 --- /dev/null +++ b/npc/029-1/ferry_master.txt @@ -0,0 +1,19 @@ + +029-1,45,107,0 script Ferry Master#candor NPC138,{ + mes "[Ferry Master]"; + mes "\"Hello! Do you need something?\""; + goto L_Main; + +L_Main: + menu + "How do I use the ferry?", L_Explain, + "Nothing I guess", L_close; + +L_Explain: + mes "[Ferry Master]"; + callfunc "FerryHelp"; + goto L_Main; + +L_close: + close; +} diff --git a/npc/029-1/hasan.txt b/npc/029-1/hasan.txt new file mode 100755 index 00000000..0a3dde08 --- /dev/null +++ b/npc/029-1/hasan.txt @@ -0,0 +1,197 @@ + +029-1,35,33,0 script Scared Man NPC160,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (QL_BEGIN >= 13) + goto L_TutDone; + message strcharinfo(0), "He looks too afraid to say anything."; + goto L_End; + +L_TutDone: + message strcharinfo(0), "Thanks. Hasan has been much nicer to me now"; + goto L_End; + +L_End: + end; +} +029-1,33,33,0 script Hasan NPC189,3,3,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + goto L_Main; + +L_Main: + if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3))) + goto L_Afraid; + if (QL_BEGIN == 14) + goto L_TutDone; + if (QL_BEGIN == 13) + goto L_Thank; + if (QL_BEGIN == 12) + goto L_Trick; + if ((QL_BEGIN == 9) || (QL_BEGIN == 10) || (QL_BEGIN == 11)) + goto L_FightAgain; + + mes "You over hear some people nearby."; + mes "[Unfriendly Guy]"; + mes "\"I told you if you didn't get the money, I'd give you swimming lessons, Haha!\""; + mes "[Scared Man]"; + mes "\"But the only person I need protection from is you.\""; + mes "[Unfriendly Guy]"; + mes "\"Thats why the price is so high.\""; + mes "\"Because I'm the toughest person in all of Candor\""; + mes "[Scared Man]"; + mes "\"No, your just a mean bully. Wait till I tell the guards about this!\""; + mes "[Unfriendly Guy]"; + mes "\"You do that and the next swimming lesson will be sleeping with the fishes.\""; + mes "[Scared Man]"; + mes "\"No, please don't. *sob*\""; + mes "Sounds like this person is in trouble.\""; + QL_BEGIN = 9; + mes "[Unfriendly Guy]"; + mes "\"What are you looking at?\""; + menu + "What ever you call maggot slime scrapped off a boat after a walk through the sewers.", L_Fight, + "Who me? I saw nothing, just passing by.", L_close; + +L_FightAgain: + mes "[Hasan]"; + mes "\"Have you come back for a thrashing?\""; + menu + "No.", L_close, + "Yes.", L_Fight; + +L_Fight: + mes "[Hasan]"; + mes "\"Do you really think you can beat me?\""; + mes "He pulls out a nasty looking dagger and stabs it in your direction."; + Hp = 1; + mes "That hurt! You begin to think searching for a different solution might be healthier."; + mes "Maybe Kaan can help?"; + goto L_close; + +L_Trick: + mes "[Hasan]"; + mes "\"Have you come back for another thrashing?\""; + menu + "No.",L_close, + "Yes, yours! (Scratch your head.)",L_ScratchHead; + +L_ScratchHead: + if ($@ScorpionFighter) + goto L_Wait; + $@ScorpionTimer = 0; + $@ScorpionFighter = getcharid(3); + $@ScorpDeath = PC_DIE_COUNTER; + donpcevent "#ScorpionTrigger::OnCommandHasanSpawn"; + specialeffect 22; + mes "While you're scratching your head, a scorpion appears."; + close; + +L_Thank: + mes "[Hasan]"; + mes "\"You - you saved me!"; + mes "I was mean to people, but you still saved me!\""; + mes "\"Hey, you're a really cool person."; + mes "I mean, the way you finished that ghastly scorpion!"; + mes "Amazing!\""; + mes "\"Let me tell you something, I will no longer bully people."; + mes "And you can have my Sharp Knife.\""; + getitem "SharpKnife", 1; + QL_BEGIN = 14; + mes "\"You want to go to Hurnscald, right? Shall I tell you how to get there?\""; + menu + "Sure, thanks.",L_HasanThanks, + "I'll try to find the way myself.",L_Explore; + +L_HasanThanks: + mes "[Hasan]"; + mes "\"Ok, when you leave here go back to the city. Wait on the south end of"; + mes "the city for the ferry to arrive at the docks. It will take you to Hurnscald.\""; + goto L_close; + +L_Explore: + mes "[Hasan]"; + mes "\"Alright. Take care!\""; + goto L_close; + +L_TutDone: + mes "[Hasan]"; + mes "\"You didn't see anything. I tell you what I'll be nicer if you don't tell anyone?\""; + menu + "As long as you learned your lesson.", L_TutCont; + +L_TutCont: + mes "\"I have, I promise not to bully people anymore. It's not fun being scared.\""; + goto L_close; + +L_Wait: + mes "There is a scorpion near Hasan already. I think Kaan is helping someone else... Maybe I should try the plan later."; + goto L_close; + +L_Afraid: + message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\""; + end; + +L_close: + close; + +OnTouch: + if (QL_BEGIN >= 13) + end; + goto L_Main; +} +029-1,0,0,0 script #ScorpionTrigger NPC32767,{ + end; + +OnCommandHasanSpawn: + goto L_Summon; + +L_Summon: + monster "029-1",33,33,"WeakScorpion",1046,1, "#ScorpionTrigger::OnScorpionDeath"; + initnpctimer; + end; + +L_SummonAgain: + message strcharinfo(0), "Kaan is mad at you for your interference! He summons a rock above your head, then summons another scorpion near Hasan!"; + heal -Hp, 0; + goto L_Summon; + +OnTimer5000: + if (attachrid($@ScorpionFighter) == 0) + goto L_Clean; + $@ScorpionTimer = $@ScorpionTimer + 5; + if ($@ScorpionTimer >= 300) + goto L_TimeOut; + if (PC_DIE_COUNTER > $@ScorpDeath) + goto L_MessageDeath; + setnpctimer 0; + end; + +OnScorpionDeath: + if (getcharid(3) != $@ScorpionFighter) + goto L_SummonAgain; + if (QL_BEGIN != 12) + goto L_Clean; + QL_BEGIN = 13; + message strcharinfo(0), "You saved Hasan."; + @mobId = 1003; + callfunc "MobPoints"; + goto L_Clean; + +L_TimeOut: + message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength!"; + goto L_Clean; + +L_MessageDeath: + message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters."; + goto L_Clean; + +L_Clean: + killmonster "029-1", "#ScorpionTrigger::OnScorpionDeath"; + $@ScorpionFighter = 0; + $@ScorpionTimer = 0; + $@ScorpDeath = 0; + stopnpctimer; + end; +} diff --git a/npc/029-1/hideandseek.txt b/npc/029-1/hideandseek.txt new file mode 100755 index 00000000..cc7f0dbf --- /dev/null +++ b/npc/029-1/hideandseek.txt @@ -0,0 +1,369 @@ + +- script #hideandseekNTconfig NPC32767,{ + end; + +OnInit: + $@hideandseekNT_started = (1 << 0); + $@hideandseekNT_found1 = (1 << 1); + $@hideandseekNT_found2 = (1 << 2); + $@hideandseekNT_found3 = (1 << 3); + $@hideandseekNT_found4 = (1 << 4); + $@hideandseekNT_found5 = (1 << 5); + $@hideandseekNT_ended = (1 << 6); + end; +} +function script CountHideNSeek { + @hidden_kid_cnt = 0; + if (QL_HIDENSEEK & $@hideandseekNT_found1) + @hidden_kid_cnt = (@hidden_kid_cnt + 1); + if (QL_HIDENSEEK & $@hideandseekNT_found2) + @hidden_kid_cnt = (@hidden_kid_cnt + 1); + if (QL_HIDENSEEK & $@hideandseekNT_found3) + @hidden_kid_cnt = (@hidden_kid_cnt + 1); + if (QL_HIDENSEEK & $@hideandseekNT_found4) + @hidden_kid_cnt = (@hidden_kid_cnt + 1); + if (QL_HIDENSEEK & $@hideandseekNT_found5) + @hidden_kid_cnt = (@hidden_kid_cnt + 1); + return; +} +029-1,64,90,0 script AyashaDebug NPC258,{ + mes "[Ayasha Debug]"; + menu + "Show", L_Show, + "Reset", L_Reset, + "Close.", L_close; + +L_Show: + mes "State: " + QL_HIDENSEEK; + if (QL_HIDENSEEK & $@hideandseekNT_started) + mes "Start set"; + if (QL_HIDENSEEK & $@hideandseekNT_found1) + mes "Found 1 set"; + if (QL_HIDENSEEK & $@hideandseekNT_found2) + mes "Found 2 set"; + if (QL_HIDENSEEK & $@hideandseekNT_found3) + mes "Found 3 set"; + if (QL_HIDENSEEK & $@hideandseekNT_found4) + mes "Found 4 set"; + if (QL_HIDENSEEK & $@hideandseekNT_found5) + mes "Found 5 set"; + if (QL_HIDENSEEK & $@hideandseekNT_ended) + mes "Complete set"; + goto L_close; + +L_Reset: + QL_HIDENSEEK = 0; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "AyashaDebug"; + end; +} +029-1,62,90,0 script Ayasha NPC258,{ + @child_number = 0; + callfunc "XmasList"; + + @Exp = 75; + + if (QL_HIDENSEEK > 63) goto L_Done; + if (QL_HIDENSEEK == 63) goto L_Reward; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "You see a girl who is holding her hands in front of her face."; + mes "[Ayasha]"; + mes "\"98... 99... 100!\""; + mes "She takes away her hands and looks up."; + menu + "Hello, what are you doing?",L_Next, + "(Leave)",L_close; + +L_Next: + mes "[Ayasha]"; + mes "\"I'm playing hide and seek with my friends!"; + mes "Do you want to play with us?\""; + menu + "Sure, sounds like fun.",L_Next1, + "I'm busy with more important things!",L_close; + +L_Next1: + mes "[Ayasha]"; + mes "\"Great! You can take my turn with searching. You need to find all five of my friends."; + mes "They're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; + + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_started; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Ayasha]"; + mes "\"You still need to find some of my friends. You have found " + @hidden_kid_cnt + " out of 5 of my friends.\""; + mes "\"Remember, they're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; + goto L_close; + +L_Reward: + mes "[Ayasha]"; + mes "\"Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!\""; + getexp @Exp, 0; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_ended; + menu + "I think I need to do other things now.",L_Next2; + +L_Next2: + mes "[Ayasha]"; + mes "\"Oh, ok."; + mes "Have you already seen Hurnscald? It's a very exciting place! I love the entertainer. She can make so many funny faces.\""; + goto L_close; + +L_Done: + mes "[Ayasha]"; + mes "\"Hello! It was fun to play with you."; + mes "When you go to the Hurnscald, you can say hello to Mikhail. He's very nice! But very shy.\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} + +029-1,50,105,0 script Latif NPC262,{ + @child_number = 1; + callfunc "XmasList"; + @Exp = 15; + + if (QL_HIDENSEEK > 63) goto L_Done; + if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found1)) goto L_Find; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "You see a kid hiding behind a box."; + menu + "What are you doing there?",L_Next, + "(Leave)",L_close; + +L_Next: + mes "[Latif]"; + mes "\"Hiding. We're playing hide and seek. Don't say that is boring. It's fun.\""; + menu + "I agree, it's fun.",L_Agree, + "Hide and seek? Lame.",L_Next1; + +L_Next1: + mes "[Latif]"; + mes "\"My friend Vincent thinks so too. He doesn't join us playing."; + mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\""; + goto L_close; + +L_Agree: + mes "[Latif]"; + mes "\"Yeah, right? My friend Vincent doesn't thinks so. He doesn't join us playing."; + mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\""; + goto L_close; + +L_Find: + mes "[Latif]"; + mes "\"Hey! Ah, you found me. Well done. But my hiding place wasn't that difficult this time.\""; + getexp @Exp, 0; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found1; + mes "\"Here, do you want a candy?\""; + getitem "Candy", 1; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Latif]"; + mes "\"You didn't find all of us yet? Seems like the other ones found a better place to hide.\""; + mes "\"" + @hidden_kid_cnt + " out of 5 have been found.\""; + goto L_close; + +L_Done: + mes "[Latif]"; + mes "\"The northeastern most building of town is a workshop. My father works there and wants me to do that too when I'm grown up. But I don't want do that! I want to go on an adventure! Just like you.\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} + +029-1,48,67,0 script Charda NPC260,{ + @child_number = 2; + callfunc "XmasList"; + @Exp = 15; + + if (QL_HIDENSEEK > 63) goto L_Done; + if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found2)) goto L_Find; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "[Charda]"; + mes "\"Hello. Psht, be careful. I'm playing hide and seek with Ayasha. You'll draw attention to my hiding place.\""; + mes "\"They will never find me here.\""; + goto L_close; + +L_Find: + mes "[Charda]"; + mes "\"Oh! Got me! You're good at this.\""; + getexp @Exp, 0; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found2; + mes "She takes something out of her pocket."; + mes "\"I'm hungry now. Do you want chocolate too?\""; + getitem "ChocolateBar", 1; + mes "\"My mom doesn't want me to eat so much chocolate, but I got it from the trader at the Hurnscald Market. He sells many different things"; + mes "when we goto vacation in Hurnscald. I convinced him to teach me how to trade. It's fun.\""; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Charda]"; + mes "\"Did you find the others yet?\""; + mes "\"Hrmm, no looks like only " + @hidden_kid_cnt + " out of 5 have been found.\""; + goto L_close; + +L_Done: + mes "[Charda]"; + mes "\"Hey! We're still playing hide and seek. What are you going to do? Will you go to Hurnscald with the ferry? The mother of my friends Rossy and Julia come from there. They are on a vacation there at the moment.\""; + mes "\"Rossy told me that it's a very beautiful place. Lots of trees and flowers and grass, everything's green.\""; + mes "She sighs."; + mes "[Charda]"; + mes "\"Sounds wonderful.\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} + +029-1,100,36,0 script Faris NPC259,{ + @child_number = 3; + callfunc "XmasList"; + @Exp = 25; + + if (QL_HIDENSEEK > 63) goto L_Done; + if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found3)) goto L_Find; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "[Faris]"; + mes "\"Oh, hi there. What are you doing here on the beach?\""; + menu + "I'm just having a look around.",L_Next, + "It's nice place here, isn't it?",L_Next; + +L_Next: + mes "[Faris]"; + mes "\"Hey, you're cool. I'm hiding here from Ayasha, we're playing hide and seek. This is the best hiding place ever.\""; + goto L_close; + +L_Find: + mes "[Faris]"; + mes "\"You found me! Well done. You look a bit thirsty, here.\""; + getexp @Exp, 0; + getitem "CactusDrink", 1; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found3; + mes "\"It's really cool you're playing with us. I'm sure you have a lot of other things to do."; + mes "You're an adventurer, right? I want to become an adventurer too when I'm grown up. I'll talk to Aidan then.\""; + mes "\"Aidan is outside Sorfina's place and you can register there for monster points. That's something the Wizard's Council made up. They reward you for slaying monsters. It's so cool.\""; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Faris]"; + mes "\"Are you still searching for the others? Nobody else is here.\""; + mes "\"It seems you found " + @hidden_kid_cnt + " out of 5 of my friends.\""; + goto L_close; + +L_Done: + mes "[Faris]"; + mes "\"I'll go to Hurnscald's Inn and ask Bernard for some soup when we're done with playing. His soup is delicious!\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} + +029-1,28,52,0 script Rasin NPC263,{ + @child_number = 4; + callfunc "XmasList"; + + @Exp = 15; + + if (QL_HIDENSEEK > 63) goto L_Done; + if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found4)) goto L_Find; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "[Rasin]"; + mes "\"The harbor is to the south from here. There you can take a ferry to other places."; + mes "And now go away, I'm playing hide and seek and Ayasha shouldn't see me here. You'll draw her attention when you talk to me.\""; + goto L_close; + +L_Find: + mes "[Rasin]"; + mes "\"Ah, you found me. I need to find a better place to hide next time.\""; + getexp @Exp, 0; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found4; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Rasin]"; + mes "\"Hehe, I'm curious when you'll have found all of us.\""; + mes "\"There are " + @hidden_kid_cnt + " out of 5 found.\""; + goto L_close; + +L_Done: + mes "[Rasin]"; + mes "\"Thanks for playing with us! It was fun!"; + mes "Will you leave Candor to go on an adventure in other places of the world?\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} + +029-1,79,99,0 script Ghada NPC265,{ + @child_number = 5; + callfunc "XmasList"; + + @Exp = 15; + + if (QL_HIDENSEEK > 63) goto L_Done; + if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found5)) goto L_Find; + if (QL_HIDENSEEK > 0) goto L_Doing; + + mes "You see a girl standing behind the wheat. She has a look of intense concentration on her face."; + menu + "Hi, what are you doing there?",L_Next, + "(Leave)",L_close; + +L_Next: + mes "[Ghada]"; + mes "\"Oh, hello. I'm hiding. We're playing hide and seek.\""; + goto L_close; + +L_Find: + mes "[Ghada]"; + mes "\"Oh no! You found me! You must be very clever."; + mes "My friend Sandra is clever too, but she said it's a waste of time to play hide and seek.\""; + getexp @Exp, 0; + QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found5; + goto L_close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Ghada]"; + mes "\"Are you still searching for the others? I'm sure you'll find them soon.\""; + mes "\"You found " + @hidden_kid_cnt + " out of 5 us.\""; + goto L_close; + +L_Done: + mes "[Ghada]"; + mes "\"It's so nice that you played with us! You're about the same age as my older sister, but she never plays with us. Her name is Sarah.\""; + goto L_close; + +L_close: + @Exp = 0; + close; +} diff --git a/npc/029-1/kaan.txt b/npc/029-1/kaan.txt new file mode 100755 index 00000000..5684906c --- /dev/null +++ b/npc/029-1/kaan.txt @@ -0,0 +1,114 @@ + +029-1,46,95,0 script Kaan NPC160,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + @kaan_talked = (STARTAREA & $@SpokeToKaan); + if (!(@kaan_talked)) goto L_Tanisha; + if (QL_BEGIN >= 13) goto L_TutDone; + if (QL_BEGIN == 12) goto L_Plan; + if (QL_BEGIN == 11) goto L_TrickKnown; + if (QL_BEGIN == 10) goto L_Trick; + if (QL_BEGIN == 9) goto L_Hasan; + goto L_Out; + +L_Tanisha: + STARTAREA = STARTAREA | $@SpokeToKaan; + mes "[Young Man]"; + mes "\"You're the person I brought here, right?"; + mes "My name is Kaan, I'm Tanisha's brother.\""; + mes "\"She was babbling at me about it all the morning until I sent her to take care of the maggots in the cafe.\""; + mes "Kaan grins mischieviously."; + mes "[Kaan]"; + mes "\"She hates maggots.\""; + mes "\"Did you already talk to Tanisha?\""; + menu + "Yes, I helped her with the maggots.",L_Tanisha1, + "Yeah, and she's done with the maggots.",L_Tanisha1; + +L_Tanisha1: + mes "[Kaan]"; + mes "\"Ah, that is good news."; + mes "You know, we have a lot of problems with bugs here.\""; + mes "\"I've slain many bugs here to keep them out of our fields.\""; + mes "\"If we don't watch out the maggots will eat all of our stocks."; + mes "And the island is crawling with scorpions.\""; + mes "\"Are you going to visit Hurnscald?"; + mes "Hurnscald is a wondeful place! Traders, entertainers, adventurers - it's very exciting.\""; + mes "\"And Ian the trainer is hanging around there often. You should talk to him, he's a smart guy.\""; + mes "\"The ferry to the south takes your there for free.\""; + goto L_close; + +L_Out: + mes "[Kaan]"; + mes "\"Hello! How are you? Did you already visit Hurnscald?\""; + menu + "Yes.", L_close, + "Not yet.",L_close; + +L_Hasan: + mes "[Kaan]"; + mes "\"Hello! How are you? Did you already visit Hurnscald?\""; + menu + "A guy named Hasan is bullying someone.",L_Next1, + "Yes.", L_close, + "Not yet.",L_close; + +L_Next1: + mes "\"Hasan! That's crazy. He becomes more cheeky with every day."; + mes "I'd like to help you, but - I won't risk an open confrontation with him.\""; + mes "\"Sometimes he just freaks out and then he's dangerous."; + mes "He might listen to one of the adult men, but they're all off to work in Hurnscald during the day.\""; + mes "\"We should think about some kind of trick. Ah, if only I knew his weak point.\""; + QL_BEGIN = 10; + goto L_Trick; + +L_Trick: + mes "[Kaan]"; + mes "\"Do you have any idea what Hasan's weakness could be?"; + mes "I wonder if Sorfina know something about him that could help us.\""; + menu + "No idea.",L_close; + +L_TrickKnown: + mes "[Kaan]"; + mes "\"Do you have any idea what Hasan's weakness could be?"; + menu + "He's afraid of scorpions.",L_Next2, + "No idea.",L_close; + +L_Next2: + mes "[Kaan]"; + mes "\"Scorpions?! Right! How could I forget?"; + mes "When he was a child, he nearly died because he fell into a scorpion nest.\""; + QL_BEGIN = 12; + next; + goto L_Explain; + +L_Explain: + mes "\"Ok, then here's the plan:"; + mes "\"You'll go to Hasan and give me a sign when you're ready."; + mes "Lets say the sign is that you're scratching your head."; + mes "I'll watch you from this point.\""; + mes "\"When you give me the sign, I'll summon a scorpion on him."; + mes "I bet that will show him for the coward he really is.\""; + mes "\"How's that? We can start as soon as you're ready.\""; + goto L_close; + +L_Plan: + mes "[Kaan]"; + mes "\"I'm ready. Just give me the sign when you're down there."; + mes "Or do you want me to explain the plan again?\""; + menu + "Yes please.",L_Explain, + "No, everything's alright.",L_close; + +L_TutDone: + mes "[Kaan]"; + mes "\"Hi there. I hope you enjoy your time in Hurnscald."; + mes "Hasan can be a real troublemaker, but it seems like he has calmed down for now.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/029-1/liana.txt b/npc/029-1/liana.txt new file mode 100755 index 00000000..d4816cea --- /dev/null +++ b/npc/029-1/liana.txt @@ -0,0 +1,38 @@ + +029-1,62,96,0 script Liana NPC205,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + goto L_Talk; + +L_Talk: + mes "[Liana]"; + mes "\"Hurnscald is a large city. I'm sure glad I live in Candor because I know where everything's at.\""; + if (QL_BEGIN == 10) goto L_Hasan; + goto L_close; + +L_Hasan: + mes "[Liana]"; + mes "\"Are you enjoying yourself in Candor? Do you have any questions?\""; + menu + "A guy named Hasan is bullying people.",L_Next, + "No, thanks.",L_close; + +L_Next: + mes "\"Ah, Hasan. He's causing trouble again?\""; + mes "She shakes her head."; + mes "\"This guy has been a plague ever since he could walk. He's always causing trouble.\""; + mes "\"And his father... Well, one day his father thought he should teach Hasan a lesson.\""; + mes "\"He took him into the desert and then left him there!"; + mes "Hasan was only seven years old!\""; + mes "\"I never understood how someone could do something like that to a child, even if it's a rascal like Hasan.\""; + mes "\"Anyway, Hasan tried to find his way back home, but stumbled into a nest of scorpions!\""; + mes "She shakes her head."; + mes "\"If Lieutenant Dausen hadn't have come along that moment, Hasan would have died that day.\""; + mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\""; + mes "She sighs."; + QL_BEGIN = 11; + goto L_close; + +L_close: + close; +} diff --git a/npc/029-1/mapflags.txt b/npc/029-1/mapflags.txt new file mode 100755 index 00000000..afdfd030 --- /dev/null +++ b/npc/029-1/mapflags.txt @@ -0,0 +1 @@ +//029-1 mapflag resave 029-1,39,102 diff --git a/npc/029-1/monster_guide.txt b/npc/029-1/monster_guide.txt new file mode 100755 index 00000000..4f19bee9 --- /dev/null +++ b/npc/029-1/monster_guide.txt @@ -0,0 +1,46 @@ + +029-1,45,97,0 script Aidan NPC102,{ + if (MPQUEST == 0) + goto L_Register; + mes "[Aidan the Monster Guide]"; + mes "You currently have " +Mobpt+ " Monster Points. These points are acquired while killing monsters"; + close; + +L_Register: + mes "[Aidan the Monster Guide]"; + mes "Oh my, you don't seem to be registered as a Quest Participant. Would you like to register?"; + next; + goto L_Choice; + +L_Choice: + menu + "Register",L_R, + "Not at the moment", + L_N,"Information",L_I; + +L_R: + mes "[Aidan the Monster Guide]"; + mes "Give me a second to look over your paperwork."; + next; + mes "[Monster Guide]"; + mes "Well, looks like you qualify!"; + mes "Welcome to the questing world!"; + MPQUEST = 1; + close; + +L_N: + mes "[Aidan the Monster Guide]"; + mes "Very well, you don't know what you're missing."; + close; + +L_I: + mes "[Aidan the Monster Guide]"; + mes "Here in The Mana World, there are certain rewards for your vanquishing of foes."; + mes "For example, there are Monster Points; every monster you kill has a certain amount of points that get added to your account."; + mes "The more points you have, the more expensive things you can buy using them."; + next; + mes "[Monster Guide]"; + mes "So whaddaya say, sign up won't you?"; + next; + goto L_Choice; +} diff --git a/npc/029-1/rewards_master.txt b/npc/029-1/rewards_master.txt new file mode 100755 index 00000000..a945f479 --- /dev/null +++ b/npc/029-1/rewards_master.txt @@ -0,0 +1,146 @@ + +029-1,47,97,0 script Ishi NPC106,{ + if (MPQUEST == 0) goto L_Register; + if (tvis == 0) set tvis, 1; + if (Mobpt < tvis) goto L_NotEnough; + + setarray @items$, "AppleCake", "Arrow", "Beer", "Boots", "BugLeg", "CactusDrink", "CactusPotion", "Cake", "Candy", "CasinoCoins", "CherryCake", "ChickenLeg", "ChocolateBar", "ChocolateCake", "CottonBoots", "CottonCloth", "CottonShirt", "CottonShorts", "FancyHat", "GreenApple", "HardSpike", "IronOre", "Lifestone", "LightBlueDye", "MaggotSlime", "Milk", "Orange", "OrangeCake", "OrangeCupcake", "PinkPetal", "PileOfAsh", "PinkAntenna", "PoltergeistPowder", "RawLog", "RedApple", "RedDye", "ScorpionStinger", "SerfHat", "SmallHealingPotion", "SmallMushroom", "SnakeSkin", "SpectrePowder", "Steak", "TinyHealingPotion", "WhiteCake", "WhiteFur", "WispPowder", "YellowDye", "Coal"; + + mes "[Ishi the Rewards Master]"; + mes "\"Welcome! I see you have " + Mobpt + " Monster Points. Would you like to exchange some of those for items?\""; + next; + + @i = 0; + setarray @Menu$, "", "", "", "", "", "", "", "", "", "", "", ""; + callsub S_prep_menu; + + menu + @Menu$[0], L_MenuItems, + @Menu$[1], L_MenuItems, + @Menu$[2], L_MenuItems, + @Menu$[3], L_MenuItems, + @Menu$[4], L_MenuItems, + @Menu$[5], L_MenuItems, + @Menu$[6], L_MenuItems, + @Menu$[7], L_MenuItems, + @Menu$[8], L_MenuItems, + @Menu$[9], L_MenuItems, + @Menu$[10], L_MenuItems, + @Menu$[11], L_MenuItems; + +L_MenuItems: + // this is for the last entry "No thanks": + if (@menu > @i) goto L_close; + // this is for the "Give all" entry: + if (@menu == 11) goto L_Give_all; + + @req = @menu; + @rec = 0; + goto L_Item_Loop; + +L_Item_Loop: + if (@rec == @req || Mobpt < tvis) goto L_Item_Done; + + callsub S_give_item; + @rec = @rec + 1; + goto L_Item_Loop; + +L_Item_Done: + if (@rec < @req) mes "It looks like your Monster Points were over estimated."; + goto L_close; + +L_Register: + mes "[Ishi the Rewards Master]"; + mes "\"Hey, it seems like you didn't register as a quest participant yet! You can sign up with Aidan.\""; + goto L_close; + +L_NotEnough: + mes "[Ishi the Rewards Master]"; + mes "\"You don't have enough Monster Points for a reward. You'll need to kill some more monsters first.\""; + goto L_close; + +L_Give_all: + // we need to count how many loop iterations are done there, + // since the server complains about more than 250 (70 according to Jaxad0127) + // gotos without interrupting next statement. + @gotocounter = 50; + goto L_Give_all_loop; + +L_Give_all_loop: + @gotocounter = @gotocounter - 1; + if (@gotocounter < 1) goto L_Give_all_next; + @itemgiveerror = 0; + callsub S_give_item; + if (@itemgiveerror != 0) goto L_close; + goto L_Give_all_loop; + +L_Give_all_next: + next; + mes "[Ishi the Rewards Master]"; + mes "\"You have received a lot of items. You still have " + Mobpt + " monster points. Shall we continue?\""; + menu + "Yes", L_Give_all, + "No", L_close; + +L_close: + @gotocounter = 0; + @itemgiveerror = 0; + @pts = 0; + @dif = 0; + @i = 0; + cleararray @Menu$[0], "", 10; + cleararray @items$[0], "", 10; + close; + + +S_prep_menu: + @pts = Mobpt; + @dif = tvis; + goto L_Menu_Loop; + +L_Menu_Loop: + if (@pts < @dif || @i == 10) goto L_Menu_Check; + + @Menu$[@i] = @i + 1; + + @i = @i + 1; + @pts = @pts - @dif; + @dif = @dif + 1; + + goto L_Menu_Loop; + +L_Menu_Check: + // if we are able to give 10, we can enable the option to give all we can have + if (@i != 10) goto L_Menu_Done; + @Menu$[@i] = "Please give me as many as I deserve!"; + @i = @i + 1; + goto L_Menu_Done; + +L_Menu_Done: + @Menu$[@i] = "No thanks"; + return; + +S_give_item: + @itemgiveerror = 0; + getinventorylist; + if (@inventorylist_count == 100) goto S_give_noinv; + if (Mobpt < tvis) goto S_give_nomobpts; + Mobpt = Mobpt - tvis; + tvis = tvis + 1; + @item$ = @items$[rand(getarraysize(@items$))]; + + getitem @item$, 1; + + mes "You received one " + getitemlink(@item$) + "!"; + return; + +S_give_noinv: + mes "Your inventory is full!"; + @itemgiveerror = 1; + return; + +S_give_nomobpts: + mes "It looks like your Monster Points were over estimated."; + @itemgiveerror = 1; + return; +} diff --git a/npc/029-1/soul-menhir.txt b/npc/029-1/soul-menhir.txt new file mode 100755 index 00000000..0c7d4a77 --- /dev/null +++ b/npc/029-1/soul-menhir.txt @@ -0,0 +1,15 @@ + +029-1,39,101,0 script Soul Menhir#candor NPC344,{ + @map$ = "029-1"; + setarray @Xs, 38, 39, 40, 38, 40, 38, 39, 40; + setarray @Ys, 100, 100, 100, 101, 101, 102, 102, 102; + @x = 0; + @y = 0; + callfunc "SoulMenhir"; + @map$ = ""; + cleararray @Xs[0], 0, getarraysize(@Xs); + cleararray @Ys[0], 0, getarraysize(@Ys); + @x = 0; + @y = 0; + close; +} diff --git a/npc/029-1/traveler.txt b/npc/029-1/traveler.txt new file mode 100755 index 00000000..83b623fc --- /dev/null +++ b/npc/029-1/traveler.txt @@ -0,0 +1,7 @@ + +029-1,69,68,0 script Knitra the Traveler NPC103,{ + @npcname$ = "Knitra"; + @NpcTravelBit = $@candor_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/029-1/tutorial.txt b/npc/029-1/tutorial.txt new file mode 100755 index 00000000..870104d7 --- /dev/null +++ b/npc/029-1/tutorial.txt @@ -0,0 +1,52 @@ +- script #TutorialConfig NPC32767,{ + end; + +OnInit: + $@ScorpionFighter = 0; + $@ScorpionTimer = 0; + set $@ScorpDeath, 0; + $@SpokeToKaan = (1 << 31); + end; +} +029-2,21,26,0 script TutDebug NPC154,{ + mes "[TutDebug]"; + mes "Reset?"; + menu + "Reset Kaan/Hasan",L_Kaan, + "Yes.",L_Reset, + "No.",L_close; + +L_Kaan: + QL_BEGIN = 8; + STARTAREA = STARTAREA &~ $@SpokeToKaan; + mes "Reset!"; + goto L_close; + +L_Reset: + TUT_var = 0; + QL_BEGIN = 0; + STARTAREA = STARTAREA &~ $@SpokeToKaan; + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if(!debug) + disablenpc "TutDebug"; + end; +} +029-1,32,99,0 script #tutorialoutside NPC45,0,0,{ + if (QL_BEGIN >= 8) + goto L_Warp; + goto L_ResetTutorial; + +L_ResetTutorial: + QL_BEGIN = 8; + goto L_Warp; + +L_Warp: + warp "029-2", 114, 92; + end; +} diff --git a/npc/029-1/valon.txt b/npc/029-1/valon.txt new file mode 100755 index 00000000..d8b3a0c6 --- /dev/null +++ b/npc/029-1/valon.txt @@ -0,0 +1,137 @@ +- script #ValonConfig NPC32767,{ + end; + +OnInit: + setarray $@ValonMob, 1002,1050,1046,1003; + setarray $@ValonMobName$, "Maggots","House Maggots","Tame Scorpions","Scorpion"; + setarray $@ValonMobCnt, 10,5,3,1; + end; +} +function script ValonCount { + @valon_mob = 0; + if (QL_VALON >= 2) + @valon_mob = (QL_VALON - 2); + @valon_count = ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + return; +} +function script ResetValonCntMask { + STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); + return; +} +function script AddValonCntMask { + @valon_tmp = (@valon_count + 1); + if (@valon_tmp > $@ValonMobCnt[@valon_mob]) + @valon_tmp = $@ValonMobCnt[@valon_mob]; + STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT)); + @valon_tmp = 0; + callfunc "ValonProgress"; + return; +} +function script ValonProgress { + callfunc "ValonCount"; + if ((QL_VALON > 1) && (QL_VALON < 6)) + message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob]; + return; +} +029-1,74,86,0 script ValonDebug NPC156,{ + mes "[Valon Debug]"; + mes "Reset?"; + menu + "Yes.", L_Reset, + "No.", L_close; + +L_Reset: + QL_VALON = 0; + STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "ValonDebug"; + end; +} +029-1,72,86,0 script Valon NPC156,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + callfunc "ValonCount"; + if (QL_VALON >= 6) + goto L_QuestComplete; + if (QL_VALON == 1) + goto L_QuestAskAgain; + if (@valon_count >= $@ValonMobCnt[@valon_mob]) + goto L_NextMob; + if ((QL_VALON >= 2) && (QL_VALON < 6)) + goto L_QuestStarted; + goto L_QuestAsk; + +L_QuestAskAgain: + mes "[Valon]"; + mes "\"Hello, Adventurer! Have you come back to help?\""; + menu + "Yes. I will help with the island beasts.", L_Accept, + "Maybe some other time.", L_close; + +L_QuestAsk: + mes "[Valon]"; + mes "\"Hello!"; + mes "You're looking for adventures, right?\""; + mes "\"But you shouldn't underestimate this island, it is dangerous.\""; + mes "\"It's crawling with scorpions, and the heat has overcome adventurers tougher than you are.\""; + mes "\"I should know I guard this gate from all manner of island beasts.\""; + mes "\"Maybe you would like help and earn your stripes?\""; + mes "\"The Council of Wizard's does offer a reward for helping...\""; + QL_VALON = 1; + callfunc "ResetValonCntMask"; + menu + "YES!!! let me at them!", L_Accept, + "Maybe some other time.", L_close; + +L_Accept: + QL_VALON = 2; + callfunc "ValonCount"; + goto L_NewMob; + +L_NextMob: + getexp 40, 0; + mes "\"I see you killed all the " + $@ValonMobName$[@valon_mob] + " needed.\""; + mes "\"The Wizard's thank thee as well.\""; + Zeny = Zeny + 25; + QL_VALON = (QL_VALON + 1); + callfunc "ResetValonCntMask"; + callfunc "ValonCount"; + if (@valon_mob == getarraysize($@ValonMob)) + goto L_QuestOver; + goto L_NewMob; + +L_NewMob: + mes "\"Let's see whats on the list. Ah ok, I need you to kill me " + $@ValonMobCnt[@valon_mob] + " " + $@ValonMobName$[@valon_mob] + "\""; + mes "\"I'll be waiting here, come back and see after you've killed those mobs.\""; + goto L_close; + +L_QuestStarted: + mes "[Valon]"; + mes "Hail adventurer! You are well on your way to mastering the beasts of the island.\""; + mes "\"You need to kill " + $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob] + "\""; + mes "\"Come back and see me when the job is done.\""; + goto L_close; + +L_QuestOver: + mes "[Valon]"; + mes "\"Thanks once again for helping with the monsters in the island.\""; + getexp 50, 0; + QL_VALON = (QL_VALON + 1); + goto L_close; + +L_QuestComplete: + mes "[Valon]"; + mes "\"Thanks once again for helping with the monsters in the island.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/029-1/vincent.txt b/npc/029-1/vincent.txt new file mode 100755 index 00000000..c0f66644 --- /dev/null +++ b/npc/029-1/vincent.txt @@ -0,0 +1,134 @@ +029-1,108,108,0 script Vincent Debug NPC113,{ + mes "[Vincent Debug]"; + mes "Reset?"; + menu + "Yes.", L_Reset, + "No.", L_close; + +L_Reset: + QL_VINCENT = 0; + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "Vincent Debug"; + end; +} +029-1,107,110,0 script Vincent NPC113,{ + @halloween_npc_id = $@halloween_npc_vincent; + callfunc "TrickOrTreat"; + + if (QL_VINCENT >= 2) goto L_Done; + if (QL_VINCENT == 1) goto L_Progress; + goto L_Con_Vin_First; + +L_Con_Vin_First: + mes "[Vincent]"; + mes "\"I'm making an action figure. I'm almost done with it.\""; + next; + + @temp = rand(4); + if(@temp == 1) goto L_Opening2; + if(@temp == 2) goto L_Opening3; + if(@temp == 3) goto L_Opening4; + goto L_Opening1; + +L_Opening1: + mes "\"I just need 5 more Bug Legs to finish my action figure!\""; + next; + goto L_Ask; + +L_Opening2: + mes "\"This maggot action figure is awesome! I just need to attach 5 Bug Legs.\""; + next; + goto L_Ask; + +L_Opening3: + mes "\"This is a great action figure! A must have! All I need is a few parts...\""; + next; + goto L_Ask; + +L_Opening4: + mes "\"Can you get me 5 Bug Legs? I need them to replace the action figure parts.\""; + next; + goto L_Ask; + +L_Ask: + mes "\"Will you help me find 5 Bug Legs?\""; + next; + menu + "Yes.", L_Sure, + "No.", L_close; + +L_Sure: + QL_VINCENT = 1; + @temp = rand(4); + if(@temp == 1) goto L_Req2; + if(@temp == 2) goto L_Req3; + if(@temp == 3) goto L_Req4; + goto L_Req1; + +L_Req1: + mes "[Vincent]"; + mes "\"Thank you!\""; + next; + goto L_Wait; + +L_Req2: + mes "[Vincent]"; + mes "\"I don't know how to thank you enough!\""; + next; + goto L_Wait; + +L_Req3: + mes "[Vincent]"; + mes "\"I will thank you when I get them!\""; + next; + goto L_Wait; + +L_Req4: + mes "[Vincent]"; + mes "\"I'm sure I will give a small reward.\""; + next; + goto L_Wait; + +L_Wait: + mes "\"Now please go get me 5 Bug Legs.\""; + goto L_close; + +L_Progress: + if(countitem("BugLeg") >= 5) + goto L_Have; + mes "[Vincent]"; + mes "\"Please help me collect 5 Bug Legs! I need them to complete my action figure.\""; + goto L_close; + +L_Have: + mes "[Vincent]"; + mes "\"Excellent! Finally I can complete the model!!\""; + next; + if(countitem("BugLeg") < 5) + goto L_Progress; + delitem "BugLeg", 5; + getexp 50, 0; + Zeny = Zeny + 1000; + QL_VINCENT = 2; + + mes "[Vincent]"; + mes "\"Here you go, a little of my appreciation!\""; + mes ""; + mes "[1000 gold]"; + goto L_close; + +L_Done: + mes "[Vincent]"; + mes "\"Thanks for your help!\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/029-1/zegas.txt b/npc/029-1/zegas.txt new file mode 100755 index 00000000..8e777e13 --- /dev/null +++ b/npc/029-1/zegas.txt @@ -0,0 +1,94 @@ +029-1,45,85,0 script Zegas NPC165,{ + @npc_distance = 2; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (QL_ZEGAS == 1) + goto L_Find; + if (QL_ZEGAS == 2) + goto L_Looking; + if (QL_ZEGAS == 3) + goto L_QuestEnd; + if (QL_ZEGAS == 4) + goto L_Thanks; + goto L_Meet; + +L_Meet: + mes "[Zegas]"; + mes "\"Hey do you have a second?\""; + next; + mes "\"The storehouse here is over run with house maggots.\""; + next; + mes "\"Wouldn't you know it, the bug bomb Eomie gave us is in one of the store room barrels.\""; + next; + mes "\"Can you search the barrels for the bug bomb and set it off when you find it?\""; + QL_ZEGAS = 1; + menu + "Sure.",L_Start, + "Maybe some other time.",L_close; + +L_Find: + mes "[Zegas]"; + mes "\"The storehouse is still over run with house maggots.\""; + next; + mes "\"Please help me find the bug bomb Eomie gave us is in one of the store room barrels?\""; + menu + "Sure.",L_Start, + "Maybe some other time.",L_close; + +L_Start: + mes "[Zegas]"; + QL_ZEGAS = 2; + mes "\"Thanks, come back and see me once you found the bug bomb and set it off.\""; + goto L_close; + +L_Looking: + mes "[Zegas]"; + mes "\"Still haven't found it? Well keep looking I know it's in there some where.\""; + goto L_close; + +L_QuestEnd: + mes "[Zegas]"; + mes "\"From the smell I can see you found the bug bomb!\""; + mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\""; + getexp 50, 0; + Zeny = (Zeny + 50); + QL_ZEGAS = 4; + goto L_close; + +L_Thanks: + mes "[Zegas]"; + mes "\"Thanks for Helping with clear out the store room!\""; + goto L_close; + +L_close: + close; +} +029-1,47,86,0 script ZegasDebug NPC165,{ + mes "[Zegas Debug]"; + mes "Reset ?"; + menu + "Yes.", L_Reset, + "No.", L_close; + +L_Reset: + QL_ZEGAS = 0; + STARTAREA = STARTAREA &~ (1 << 20); + STARTAREA = STARTAREA &~ (1 << 21); + STARTAREA = STARTAREA &~ (1 << 22); + STARTAREA = STARTAREA &~ (1 << 23); + STARTAREA = STARTAREA &~ (1 << 24); + STARTAREA = STARTAREA &~ (1 << 25); + STARTAREA = STARTAREA &~ (1 << 26); + STARTAREA = STARTAREA &~ (1 << 27); + mes "Reset!"; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) + disablenpc "ZegasDebug"; + end; +} diff --git a/npc/029-2/_import.txt b/npc/029-2/_import.txt new file mode 100644 index 00000000..1a254643 --- /dev/null +++ b/npc/029-2/_import.txt @@ -0,0 +1,16 @@ +// Map 029-2: Candor Island Indoor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/029-2/_mobs.txt", +"npc/029-2/_warps.txt", +"npc/029-2/alchemy.txt", +"npc/029-2/bankroom.txt", +"npc/029-2/barrels.txt", +"npc/029-2/barrels_config.txt", +"npc/029-2/cynric.txt", +"npc/029-2/mapflags.txt", +"npc/029-2/morgan.txt", +"npc/029-2/nyle.txt", +"npc/029-2/sorfina.txt", +"npc/029-2/stat_reset.txt", +"npc/029-2/tanisha.txt", +"npc/029-2/two_arms.txt", diff --git a/npc/029-2/_mobs.txt b/npc/029-2/_mobs.txt new file mode 100644 index 00000000..46230226 --- /dev/null +++ b/npc/029-2/_mobs.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-2: Candor Island Indoor mobs +029-2,33,57,12,3 monster Wicked Mushroom 1050,7,100000,30000 diff --git a/npc/029-2/_warps.txt b/npc/029-2/_warps.txt new file mode 100644 index 00000000..3a6e62bb --- /dev/null +++ b/npc/029-2/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-2: Candor Island Indoor warps +029-2,29,62,0 warp #029-2_29_62 0,0,029-1,40,89 +029-2,22,93,0 warp #029-2_22_93 0,0,029-1,44,84 +029-2,112,84,0 warp #029-2_112_84 0,0,029-2,44,30 +029-2,103,62,0 warp #029-2_103_62 0,0,029-1,52,85 +029-2,94,31,0 warp #029-2_94_31 0,0,029-1,58,80 +029-2,24,124,0 warp #029-2_24_124 0,0,029-1,49,78 diff --git a/npc/029-2/alchemy.txt b/npc/029-2/alchemy.txt new file mode 100755 index 00000000..f9799252 --- /dev/null +++ b/npc/029-2/alchemy.txt @@ -0,0 +1,98 @@ +- script _N-Alchemy NPC32767,{ + @npc_distance = 1; + callfunc "PCtoNPCRange"; + if (@npc_check) end; + + title "Alchemy Lab"; + mes "This is an alchemy lab."; + mes "With it, you can combine reagents together to create powerful potions."; + next; + clear; + mes "##BDrag & drop 2 items from your inventory. All items used will be lost.##b"; + cleararray @alchlab_items$[0], "", 2; // since we're not using a scoped (.@) array, we need to clean it + requestitem @alchlab_items$[0], 2; // TODO: add a craft builtin (npc action 12) + clear; + if (@alchlab_items$[0] == "" || @alchlab_items$[1] == "") + goto L_NoItems; + + mes "You are about to combine the following:"; + mes " ["+ getitemlink(@alchlab_items$[0]) +"]"; + mes " ["+ getitemlink(@alchlab_items$[1]) +"]"; + mes; + mes "##BWarning! This will permanently destroy the selected items.##b"; + // can not use a scope variable to store item names because menu is a script terminator (destroys the scope) + menu + "Abort Mission.", L_Abort, + "Proceed.", L_Proceed; + +L_Proceed: + // XXX: here we could make it wait a little, while the potion is boiling (and show an animation/particles/sound) + if (countitem(@alchlab_items$[0]) < 1 || countitem(@alchlab_items$[1]) < 1) // this shouldn't happen, but just to be safe.. + goto L_NoItems; + delitem @alchlab_items$[0], 1; + delitem @alchlab_items$[1], 1; + if (@alchlab_items$[0] == "BottleOfWater" || @alchlab_items$[1] == "BottleOfWater") // give back used bottles + getitem "EmptyBottle", if_then_else(@alchlab_items$[0] == "BottleOfWater" && @alchlab_items$[1] == "BottleOfWater",2,1); + + .@n = -3; + goto L_CheckRecipes; + +L_CheckRecipes: + .@n = .@n+3; + if (.@n == get(.rsize, "_N-Alchemy")) + goto L_Failed; + if (!(get(.recipes$[.@n], "_N-Alchemy") == @alchlab_items$[0] && get(.recipes$[.@n+1], "_N-Alchemy") == @alchlab_items$[1]) && + !(get(.recipes$[.@n], "_N-Alchemy") == @alchlab_items$[1] && get(.recipes$[.@n+1], "_N-Alchemy") == @alchlab_items$[0])) + goto L_CheckRecipes; + + getitem get(.recipes$[.@n+2], "_N-Alchemy"), 1; // XXX: here we could also make it fail sometimes depending on your expertise + + // XXX: here we could make it give profession/crafting exp + clear; + mes "You combined the following:"; + mes " ["+ getitemlink(@alchlab_items$[0]) +"]"; + mes " ["+ getitemlink(@alchlab_items$[1]) +"]"; + mes; + mes "You obtained:"; + mes " ["+ getitemlink(get(.recipes$[.@n+2], "_N-Alchemy")) +"]"; + close; + +L_NoItems: + mes "You must put exactly 2 items."; + close; + +L_Failed: + mes "The potion bubbles violently and evaporates."; // XXX: here we could have random failure messages + close; + +L_Abort: + close; + +S_Spawn: + .@s = getarraysize(.x1); + if (.spawned >= .@s) + goto S_Return; + .@n$ = "#_Al-lab"+chr(3)+.spawned; + if (puppet(.m$[.spawned], .x1[.spawned], .y1[.spawned], .@n$, 399) < 1) mapexit; + .spawned = .spawned + 1; + if (.spawned < .@s) + goto S_Spawn; + return; + +S_Return: + return; + +OnMaybeStart: + callsub S_Spawn; + if (.started == 0) + goto L_InitVars; + end; + +L_InitVars: + setarray .recipes$[0], 0, + "DilutedConcentrationPot", "DarkConcentrationPotion", "ConcentrationPotion", + "CactusDrink", "CactusDrink", "CactusPotion", + "PinkPetal", "BottleOfWater", "ConcentrationPotion"; + .rsize = getarraysize(.recipes$); + end; +} diff --git a/npc/029-2/bankroom.txt b/npc/029-2/bankroom.txt new file mode 100755 index 00000000..12a7390c --- /dev/null +++ b/npc/029-2/bankroom.txt @@ -0,0 +1,5 @@ + +029-2,35,122,0 script #BankRoom NPC32767,0,0,{ + message strcharinfo(0), "The door is locked. This must be where Cynric saves the people's money and items."; + end; +} diff --git a/npc/029-2/barrels.txt b/npc/029-2/barrels.txt new file mode 100755 index 00000000..b44fec43 --- /dev/null +++ b/npc/029-2/barrels.txt @@ -0,0 +1,45 @@ +029-2,23,86,0 script Barrel#0 NPC400,{ + @barrel = 0; + callfunc "CheckBarrel"; + end; + +OnMaggotDeath: + @mobId = 1050; + callfunc "MobPoints"; + end; +} +029-2,28,86,0 script Barrel#1 NPC400,{ + @barrel = 1; + callfunc "CheckBarrel"; + end; +} +029-2,31,91,0 script Barrel#2 NPC400,{ + @barrel = 2; + callfunc "CheckBarrel"; + end; +} +029-2,36,85,0 script Barrel#3 NPC400,{ + @barrel = 3; + callfunc "CheckBarrel"; + end; +} +029-2,40,89,0 script Barrel#4 NPC400,{ + @barrel = 4; + callfunc "CheckBarrel"; + end; +} +029-2,38,91,0 script Barrel#5 NPC400,{ + @barrel = 5; + callfunc "CheckBarrel"; + end; +} +029-2,29,92,0 script Barrel#6 NPC400,{ + @barrel = 6; + callfunc "CheckBarrel"; + end; +} +029-2,24,91,0 script Barrel#7 NPC400,{ + @barrel = 7; + callfunc "CheckBarrel"; + end; +} diff --git a/npc/029-2/barrels_config.txt b/npc/029-2/barrels_config.txt new file mode 100755 index 00000000..84f4b111 --- /dev/null +++ b/npc/029-2/barrels_config.txt @@ -0,0 +1,84 @@ +029-2,33,88,24,7 monster HouseMaggot 1050,2,100000,30000,Barrel#0::OnMaggotDeath +- script #BarrelConfig NPC32767,{ + end; + +OnInit: + setarray $@BarrelBits, (1 << 20), (1 << 21), (1 << 22), (1 << 23), (1 << 24), (1 << 25), (1 << 26), (1 << 27); + setarray $@BarrelRewards, 533, 507, 505, 518, 537, 526; + $@BarrelSpawnCnt = 1; + $@BarrelSpawnId = 1050; + $@BarrelSpawnName$ = "House Maggot"; + $@BarrelMax = getarraysize($@BarrelBits); + end; +} +function script CountBarrels { + @barrel_count = 0; + @count_tmp = 0; + goto L_Loop; + +L_Loop: + if (STARTAREA & $@BarrelBits[@barrel_count]) + goto L_AddOne; + goto L_LoopAgain; + +L_AddOne: + @barrel_count = (@barrel_count + 1); + goto L_LoopAgain; + +L_LoopAgain: + @count_tmp = (@count_tmp + 1); + if (@count_tmp == getarraysize($@BarrelBits)) + goto L_BarrelTally; + goto L_Loop; + +L_BarrelTally: + return; +} +function script CheckBarrel { + @npc_distance = 2; + callfunc "PCtoNPCRange"; + if(@npc_check) goto L_Return; + if (!(QL_ZEGAS == 2)) + goto L_NoI; + if (STARTAREA & $@BarrelBits[@barrel]) + goto L_Empty; + STARTAREA = STARTAREA | $@BarrelBits[@barrel]; + + callfunc "CountBarrels"; + if (@barrel_count == $@BarrelMax) + goto L_QuestReward; + @player_random = rand(@barrel_count * 10); + @barrel_random = rand(@barrel_count * $@BarrelMax); + if (@barrel_random > @player_random) + goto L_Spawn; + goto L_Reward; + +L_NoI: + message strcharinfo(0), "Nothing interesting here."; + goto L_Return; + +L_Empty: + message strcharinfo(0), "You've already searched this barrel."; + goto L_Return; + +L_QuestReward: + message strcharinfo(0), "You found the bug bomb."; + misceffect 33; + QL_ZEGAS = 3; + killmonster getmapname() + "", "Barrel#0::OnMaggotDeath"; + goto L_Return; + +L_Spawn: + message strcharinfo(0), "Uck, More Maggots!"; + setarray @npc_loc, getnpcx(), getnpcy(); + areamonster getmapname(), @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath"; + cleararray @npc_loc, 0, 2; + goto L_Return; + +L_Reward: + getitem $@BarrelRewards[rand(getarraysize($@BarrelRewards))], 1; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/029-2/cynric.txt b/npc/029-2/cynric.txt new file mode 100755 index 00000000..beecaa04 --- /dev/null +++ b/npc/029-2/cynric.txt @@ -0,0 +1,6 @@ + +029-2,30,118,0 script Cynric NPC161,{ + @npcname$ = "Cynric"; + callfunc "Banker"; + close; +} diff --git a/npc/029-2/mapflags.txt b/npc/029-2/mapflags.txt new file mode 100755 index 00000000..bfe50c0c --- /dev/null +++ b/npc/029-2/mapflags.txt @@ -0,0 +1,3 @@ +029-2 mapflag nosave 029-2,22,24 +//029-2 mapflag resave 029-2,22,24 +029-2 mapflag mask 1 diff --git a/npc/029-2/morgan.txt b/npc/029-2/morgan.txt new file mode 100755 index 00000000..5c12dfc3 --- /dev/null +++ b/npc/029-2/morgan.txt @@ -0,0 +1,113 @@ +029-2,105,57,0 script MorganDebug NPC355,{ + mes "[Morgan Debug]"; + mes "Reset?"; + menu + "Yes.", L_Reset, + "No.", L_End; +L_Reset: + QL_MORGAN = 0; + mes "Reset!"; + goto L_End; + +L_End: + end; + +OnInit: + if (!debug) + disablenpc "MorganDebug"; + end; +} +029-2,101,57,0 script Morgan#_M NPC355,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (Int >= 5) + goto L_Learn; + goto L_NotMagic; + +L_Learn: + if (QL_MORGAN == 0) + goto L_NotSeen; + if (QL_MORGAN == 1) + goto L_Seen; + if (QL_MORGAN == 2) + goto L_Started; + if (QL_MORGAN == 3) + goto L_CastOnce; + if (QL_MORGAN == 4) + goto L_LearningDone; + goto L_close; + +L_NotSeen: + QL_MORGAN = 1; + mes "[Morgan]"; + mes "\"Welcome to the magic school of Candor\""; + mes "\"My name is Morgan, I'm Head of Wizardry.\""; + mes "\"You appear to have the markings to use magic.\""; + mes "\"Granted you are still to young to cast spells.\""; + mes "\"But we can teach you to use simple magic devices.\""; + mes "\"Would you like to learn some apprentice skills?\""; + menu + "Yes.", L_Start, + "Maybe later", L_close; + +L_Seen: + mes "[Morgan]"; + mes "\"Have you returned to learn some magic?\""; + menu + "Yes.", L_Start, + "Maybe later", L_close; + +L_NotMagic: + mes "[Morgan]"; + mes "\"Hrmm you don't appear to posses enough magical talent to teach.\""; + goto L_close; + +L_Start: + QL_MORGAN = 2; + mes "\"Great, lets begin your first lesson.\""; + getitem 1171, 1; + mes "\"This is a wand, there are many like it but this one is now yours.\""; + mes "\"Various wands and staffs are found throughout the land with many different strengths and weaknesses.\""; + mes "\"To use the wand you need to have it equipped and speak the incantation to let it tap into your mana.\""; + mes "\"As the power of your magic grows so will the spells you can cast.\""; + mes "\"Lets start with a basic wand attack. " + get(.invocation$, "spell-wand") + "\""; + mes "\"Equip the wand and lets try out that spell.\""; + mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; + mes "\"Speak to me again once you've cast the spell.\""; + goto L_close; + +L_Started: + mes "[Morgan]"; + mes "\"Lets start with a basic wand attack. " + get(.invocation$, "spell-wand") + "\""; + mes "\"Equip the wand and lets try out that spell.\""; + mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; + mes "\"Speak to me again once you've cast the spell.\""; + goto L_close; + +L_CastOnce: + mes "[Morgan]"; + mes "\"Ok, good job! Looks like you have good mana flow.\""; + mes "\"Onto the next lesson. Now that you have " + get(.invocation$, "spell-wand") + " cast,\""; + mes "\"Each time you attack the wand will convert a bit of you mana into a magic bolt.\""; + mes "\"After so many attacks, you will need to recast the invocation to stay attuned to the wand.\""; + mes "\"(Logging out will also cancel any spell effects currently active in-game.).\""; + next; + mes "\"I've taught you all I can for now. You should visit the Mana Seed north west of Hurnscald.\""; + QL_MORGAN = 4; + goto L_close; + +L_LearningDone: + mes "[Morgan]"; + mes "\"" + get(.invocation$, "spell-wand") + " is a basic wand attack.\""; + mes "\"A Wand must be equipped to use the spell.\""; + mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; + mes "\"You can also discharge any active spell by saying " + get(.invocation$, "discharge spell") + ".\""; + mes "\"I've taught you all I can for now. You should visit the Mana Seed north west of Hurnscald.\""; + goto L_close; + +L_close: + close; +} + +029-2,113,59,0 shop Zitoni NPC103,501:25,502:35,825:50,826:100 diff --git a/npc/029-2/nyle.txt b/npc/029-2/nyle.txt new file mode 100755 index 00000000..d4573269 --- /dev/null +++ b/npc/029-2/nyle.txt @@ -0,0 +1,47 @@ + +029-2,26,120,6 script Nyle NPC101,{ + mes "[Nyle]"; + mes "\"Visiting the bank too right? We're only a small village but Cynric is the best bank guy I know.\""; + menu + "Yeah, you're right.", L_close, + "What is banking?", L_Explain; + +L_Explain: + mes "[Nyle]"; + mes "\"There are banks all over the world. Usually every important village or city has one."; + mes "You can save both items and money at a bank.\""; + menu + "How do I save items?", L_Items, + "How do I save money?", L_Money, + "Thanks!", L_Thanks; + +L_Items: + mes "[Nyle]"; + mes "\"Let Cynric open your storage. You might also want to open your inventory."; + mes "Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."; + mes "You can also pick and drag items from one window into the other but this will move all items of this kind."; + next; + mes "Items in your storage are totally safe. Banking itself is totally safe.\""; + menu + "And how do I save money?", L_Money, + "Thanks!", L_Thanks; + +L_Money: + mes "[Nyle]"; + mes "\"That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."; + mes "You only have to tell him how much you want to deposit or withdraw."; + mes "Also you can ask how much he already save for you by checking your balance."; + next; + mes "Money in your storage is totally safe. Banking itself is totally safe.\""; + menu + "And how do I save items?", L_Items, + "Thanks!", L_Thanks; + +L_Thanks: + mes "[Nyle]"; + mes "\"You are very welcome.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/029-2/sorfina.txt b/npc/029-2/sorfina.txt new file mode 100755 index 00000000..fe77d09d --- /dev/null +++ b/npc/029-2/sorfina.txt @@ -0,0 +1,387 @@ +029-2,27,27,0 script Sorfina NPC154,0,1,{ + @npc_distance = 2; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + goto L_Main; + +L_Main: + if (QL_BEGIN == 10) goto L_Hasan; + if (QL_BEGIN >= 4) goto L_Again; + if (QL_BEGIN == 3) goto L_Clothes; + if (QL_BEGIN == 2) goto L_Dresser; + if (QL_BEGIN == 1) goto L_Carpet; + goto L_Start; + +L_Start: + mes "You open your eyes."; + mes ""; + mes "[Old Woman]"; + mes "\"Ah, you woke up. You washed ashore on the beach 3 days ago. You've been asleep since."; + mes "You must have been thrown off one of the ships sailing during that last tremor.\""; + mes "\"My little granddaughter Tanisha found you. Kaan was able to carry you to bed."; + mes "We've been taking care of you ever since. Waiting for you to wake up.\""; + mes "\"You didn't have any possessions on you when we found you and no one knows who you are.\""; + mes "Do you have a name?"; + menu + strcharinfo(0), L_name; + +L_name: + mes "[Old Woman]"; + mes "\"Well " + strcharinfo(0) + " what else can you tell me about yourself?.\""; + next; + mes "[Old Woman]"; + mes "\"Go on. If you need to think a bit, take your time.\""; + select + "... Tulimshar in Tonori ... I'm a Talpan."; + mes ""; + mes "[Old Woman]"; + mes "\"Anything else you can remember?\""; + menu + "Umm... no... I... I don't remember anything else...", L_KnowNothing; + +L_KnowNothing: + mes "[Old Woman]"; + mes "\"Well I can tell you some useful things, if you want to hear."; + mes "Some of it might jog your memory or at least help you catch your bearings."; + mes "Oh, and by the way my name is Sorfina.\""; + menu + "That would be great!",L_Tut, + "No, thanks. I already know how things are going.",L_SkipTut; + +L_Tut: + mes "She smiles at you."; + mes "[Sorfina]"; + mes "\"You have arrived at a very strange time. The Council is visiting Candor today.\""; + mes "\"All the recent rumbling from the cave has all of Candor worried.\""; + mes "\"Our guess is something with the last big shaker was the reason you ended up here.\""; + mes "\"Ok, lets start by getting you dressed.\""; + goto L_Carpet; + +L_Carpet: + mes "[Sorfina]"; + mes "\"Try to take a few steps and walk to that carpet over there."; + next; + camera "#Carpet"; + mapmask getmask() | 4; + next; + camera; + mes "Press [###keyMoveUp;] to move up, press [###keyMoveDown;] to move down, "; + mes "press [###keyMoveLeft;] to move left, press [###keyMoveRight;] to move right "; + mes " or click on the place you want to go to.\""; + QL_BEGIN = 1; + goto L_close; + +L_Dresser: + mes "[Sorfina]"; + mes "\"You should get dressed now.\""; + next; + camera "Dresser#tutorial"; + mapmask getmask() | 32; + mes "\"In that dresser there are some clothes you can wear.\""; + mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press [###keyTargetNPC;] to focus and [###keyTalk;] to talk/activate.\""; + next; + camera; + mes "\"Now get the clothes out of the dresser.\""; + goto L_close; + +L_Naked: + mes "[Sorfina]"; + mes "\"Press [###keyWindowInventory;] or click on the Inventory button in the bar at the upper right corner to open your bag.\""; + mes "\"Once we stop talking, double-click on the clothes to equip.\""; + mes "\"Talk to me again after you get dressed. You can either click on me, or press [###keyTargetNPC;] to focus on me and [###keyTalk;] to talk.\""; + goto L_close; + +L_Clothes: + if (getequipid(equip_torso) < 0) + goto L_Naked; + mes "[Sorfina]"; + mes "\"That's much better, don't you think?\""; + mes "\"Here take this.\""; + getitem "HitchhikersTowel", 1; + mes "\"Your HitchHikers Towel will return you to your last set soul menhir or here if not set.\""; + mes "\"It can't be used constantly as the magic needs time to power the jump.\""; + mes "\"I think this will help you a bit. To get more information, press the button Setup and look at the controls on the Keyboard tab. You can also change them as you like."; + mes "Talk to me again if you want me to explain more things.\""; + + mes "\"Oh, and if you're looking for extra work, you should talk to Aidan and Valon when you go outside. They're giving rewards for monster hunting."; + mes "You can find Aidan near the camp fire outside and Valon out by the fields in the east.\""; + next; + + mes "She digs in her pocket for a moment."; + mes "\"And here is some money for you. Don't spend it all in one place."; + mes "Now go help Tanisha downstairs.\""; + mapmask getmask() | 8; + Zeny = Zeny + 30; + QL_BEGIN = 4; + goto L_close; + +L_Again: + mes "[Sorfina]"; + mes "\"Make yourself at home! Do you have any questions?\""; + menu + "Yes, could you explain about...",L_Explain, + "Could I get Healed?",L_Heal, + "No, thanks.",L_close; + +L_Heal: + if (BaseLevel > 20) + goto L_NoHeal; + mes "[Sorfina]"; + mes "\"Hello Dear! You look tired, you should rest a moment.\""; + mes "You take a short nap and feel refreshed."; + heal MaxHp, 0; + goto L_Main; + +L_NoHeal: + mes "[Sorfina]"; + mes "\"I'm sorry but your wounds are far to advanced for my skills.\""; + goto L_Main; + +L_Explain: + menu + "... walking?",L_Walk, + "... talking?",L_Talk, + "... the inventory and items?",L_Items, + "... shortcuts?",L_Shortcut, + "... what to do in Candor?",L_Aidan, + "... change my appearence?",L_Barber, + "... nevermind.",L_close; + +L_Walk: + mes "[Sorfina]"; + mes "\"You can use the arrow keys to walk around."; + mes "Press [###keyMoveUp;] to move up, press [###keyMoveDown;] to move down, "; + mes "press [###keyMoveLeft;] to move left, press [###keyMoveRight;] to move right "; + mes " or click on the place you want to go to."; + mes "This only works if that place is reachable and walkable.\""; + goto L_close; + +L_Talk: + mes "[Sorfina]"; + mes "\"If you want to talk to a normal person, you can click at him or her."; + mes "Or you can press [###keyTargetNPC;] to focus on the nearest person and then press [###keyTalk;] to talk.\""; + next; + mes "\"If you want to talk to other adventurers, press [###keyChat;] to open your chat window."; + mes "Then type your message and press Enter to send.\""; + next; + mes "\"You may want to talk privately to another adventurer sometimes. In that case you can whisper."; + mes "After pressing [###keyChat;] type '/whisper [name] [message]'."; + mes "Or you can right click on someone and choose the whisper option.\""; + next; + mes "\"Press [###keyWindowChat;] to show and hide your chat window.\""; + goto L_close; + +L_Items: + mes "[Sorfina]"; + mes "\"There are three types of items."; + mes "They can be Consumables, Equipment or Miscellaneous.\""; + next; + mes "\"Consumable items such as Potions, can be used only once."; + mes "After use, they will disappear from your inventory."; + mes "There are some rare items that can be used but don't get consumed.\""; + next; + mes "\"Equipment items like Armors, Weapons, Accessories can be equipped for fashionable purposes or to raise your status.\""; + next; + mes "\"Miscellaneous items such as maggot slime, can be used in creating other items, or just to trade and sell.\""; + next; + mes "\"Your HitchHikers Towel will return you to your last set soul menhir or here if not set.\""; + mes "\"It can't be used constantly as the magic needs time to power the jump.\""; + next; + mes "\"Press [###keyWindowInventory;] to open your inventory."; + mes "When placing your cursor over an item there, you can see a box with some information about that item.\""; + next; + mes "\"To use or equip an item, select it by double-clicking on it."; + mes "Selecting the item then pressing Use or Equip also works.\""; + goto L_close; + +L_Shortcut: + mes "[Sorfina]"; + mes "\"Press [###keyWindowShortcut;] or click the Shortcut button in the bar at the upper right to open your shortcut window.\""; + next; + mes "\"You can select the item you want to put on a shortcut with your mouse and then click on the position in the shortcut window you want to place it.\""; + next; + mes "\"Now you can use or equip/unequip it by pressing the number of the shortcut.\""; + goto L_close; + +L_Aidan: + mes "[Sorfina]"; + mes "\"I heard Aidan and Valon are looking for brave adventurers, you might want to talk to them. "; + mes "You can find Aidan near the camp fire outside. The fields are just south of the town exit. "; + mes "You'll see Valon of the city gaurd standing there. They both are offering rewards for monster hunting.\""; + next; + mes "\"When you leave this area to the South, you'll come to the docks."; + mes "They will take you to Hurnscald, a major trading port.\""; + next; + mes "\"Go east out of Candor and north. You will find the cave everyone is talking about to the north."; + next; + mes "Talk to everybody. You can never tell when they might know something useful.\""; + goto L_close; + +L_Barber: + mes "[Sorfina]"; + mes "\"Jessie downstairs can change your appearance.\""; + mes "\"They will allow you to change your hair color or style as well as gender.\""; + next; + mes "\"There are a number of people across the continent that can change this for you.\""; + mes "\"There is no cost or limit to the number of times it can be changed.\""; + goto L_close; + +L_Hasan: + mes "[Sorfina]"; + mes "\"Make yourself at home! Do you have any questions?\""; + menu + "A guy named Hasan is bullying people.",L_Next, + "Yes, could you explain again about...",L_Explain, + "No, thanks.",L_close; + +L_Next: + mes "\"Ah, Hasan. He's causing trouble again?\""; + mes "She shakes her head."; + mes "[Sorfina]"; + mes "\"This guy has been a plague ever since he could walk. He's always causing trouble.\""; + mes "\"And his father... Well, one day his father thought he should teach Hasan a lesson.\""; + mes "\"He took him into the desert and then left him there!"; + mes "Hasan was only seven years old!\""; + mes "\"I never understood how someone could do something like that to a child, even if it's a rascal like Hasan.\""; + mes "\"Anyway, Hasan tried to find his way back home, but stumbled into a nest of scorpions!\""; + mes "She shakes her head."; + mes "\"If Valon hadn't have come along that moment, Hasan would have died that day.\""; + mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\""; + mes "She sighs."; + QL_BEGIN = 11; + goto L_close; + +L_SkipTut: + mes "[Sorfina]"; + mes "\"Really? You seem quite unexperienced. Listening to some advice won't hurt.\""; + menu + "Thinking about it twice... please tell me.",L_Tut, + "Yeah, but thanks for the offer. Bye.",L_Bye; + +L_Bye: + mes "[Sorfina]"; + mes "\"Alright, if you say so. But take at least this. See you later.\""; + getitem "Knife", 1; + getitem "SlingShot", 1; + getitem "SlingBullet", 500; + getitem "HitchhikersTowel", 1; + getitem "CottonShirt", 1; + getitem "RaggedShorts", 1; + set Zeny, Zeny + 35; // tanisha gives 5 Zeny + QL_BEGIN = 8; + goto L_close; + +L_close: + close; + +OnTouch: + if (QL_BEGIN > 0) + end; + goto L_Start; +} + +029-2,33,27,0 script #Carpet NPC127,1,1,{ + if (QL_BEGIN != 1) + end; + mapmask getmask(); + mes "[Sorfina]"; + mes "\"You should get dressed now.\""; + next; + camera "Dresser#tutorial"; + mapmask getmask() | 16; + mes "\"In that dresser there are some clothes you can wear.\""; + mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press N to focus and T to talk/activate.\""; + next; + camera; + mes "\"Now get the clothes out of the dresser.\""; + QL_BEGIN = 2; + close; +} + +029-2,29,23,0 script Dresser#tutorial NPC400,{ + @npc_distance = 2; + @distance_handler = 1; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_closeDis; + if (QL_BEGIN > 2) goto L_Empty; + if (QL_BEGIN == 2) goto L_Shirt; + goto L_Walk; + +L_Walk: + mes "[Sorfina]"; + mes "\"Thats not what I said to do. Please don't skip ahead.\""; + close; + +L_Shirt: + mapmask getmask(); + mes "You take a simple Cotton Shirt and some very worn-out Ragged Shorts out of the dresser."; + getitem "CottonShirt", 1; + getitem "RaggedShorts", 1; + mes "[Sorfina]"; + mes "\"Great! Now you can equip it.\""; + mes "\"You can open your inventory by pressing F3 or clicking on the 'Inventory' button in the bar at the upper right corner.\""; + next; + mes "\"After we finish talking, click on the clothes and press the equip button.\""; + QL_BEGIN = 3; + close; + +L_Empty: + mes "The dresser is empty."; + close; + +L_closeDis: + mes "You cannot reach that far."; + close; +} + +029-2,44,31,0 script #DoorOutTut1 NPC45,0,0,{ + if (QL_BEGIN < 4) + goto L_Block; + mapmask getmask(); + warp "029-2", 112, 85; + end; + +L_Block: + message strcharinfo(0), "Sorfina : ##BWait a moment! ##bYou're not ready to leave."; + // FIXME: this should be changed to npctalk with strcharinfo(0) once we increase the view area + end; +} +029-2,23,24,0 script #GameRules1 NPC32767,0,1,{ + if (TUT_var > 0) + end; + mes "[Server/Client Notice]"; + mes "The explanations in this tutorial are based on the official client, Manaplus."; + mes "If you're using another client, settings and controls may be different."; + callfunc "GameRules"; + close; +} +029-2,21,24,0 script #GameRules2 NPC32767,0,1,{ + if (TUT_var > 0) + end; + mes "[Server/Client Notice]"; + mes "The explanations in this tutorial are based on the official client, Manaplus."; + mes "If you're using another client, settings and controls may be different."; + callfunc "GameRules"; + close; +} +029-2,22,26,0 script #GameRules3 NPC32767,1,0,{ + if (TUT_var == 0) + goto L_KnockBack; + end; + +L_KnockBack: + message strcharinfo(0), "Server : ##BPlease Accept the Game rules"; + warp "029-2", 22, 24; + end; +} +029-2,24,24,0 script #GameRules4 NPC32767,0,1,{ + if (TUT_var == 0) + goto L_KnockBack; + end; + +L_KnockBack: + message strcharinfo(0), "Server : ##BPlease Accept the Game rules"; + warp "029-2", 22, 24; + end; +} diff --git a/npc/029-2/stat_reset.txt b/npc/029-2/stat_reset.txt new file mode 100755 index 00000000..75fe3e66 --- /dev/null +++ b/npc/029-2/stat_reset.txt @@ -0,0 +1,49 @@ + +029-2,98,92,0 script Jessie NPC159,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (BaseLevel >= 10) + goto L_Sorry; + + mes "[Jessie]"; + mes "\"I know a spell that will"; + mes "reset status points on the youngings."; + mes ""; + mes "I can also change their appearance.\""; + next; + menu + "Reset my stats",L_Reset, + "Change my appearance", L_Appearance, + "Forget about it",L_Pass; + +L_Appearance: + callfunc "Barber"; + goto L_Pass; + +L_Reset: + resetstatus; + + mes "[Jessie]"; + mes "\"There you are."; + mes ""; + mes "Good as new!\""; + goto L_close; + +L_Pass: + mes "[Jessie]"; + mes "\"Very well then, see you.\""; + goto L_close; + +L_Sorry: + mes "[Jessie]"; + mes "\"My spell only works on the very young, sorry.\""; + next; + mes "\"You can try Mailvox in the Tulimshar Bazaar or Wyara in the Potion Shop in Hurnscald.\""; + menu + "Change my appearance", L_Appearance, + "Bye", L_close; + +L_close: + close; +} diff --git a/npc/029-2/tanisha.txt b/npc/029-2/tanisha.txt new file mode 100755 index 00000000..4e5abe42 --- /dev/null +++ b/npc/029-2/tanisha.txt @@ -0,0 +1,286 @@ + +029-2,110,88,0 script Tanisha NPC114,{ + callfunc "PCtoNPCRange"; + if(@npc_check) end; + + if (isin("029-2", 98, 84, 106, 89)) + goto L_Fighting; + + if (QL_BEGIN >= 8) goto L_Tut_Done; + if (QL_BEGIN == 7) goto L_Stats; + if (QL_BEGIN == 6) goto L_Fail; + if (QL_BEGIN == 5) goto L_Maggots; + + mes "[Tanisha]"; + mes "\"Hey! You're up again!\""; + emotion EMOTE_HAPPY, strcharinfo(0); + mes "\"Are you feeling better?\""; + menu + "Yes, thank you.",L_Next, + "Yeah, but everything is gone. My stuff and memories..",L_Next; + +L_Next: + mes "[Tanisha]"; + mes "\"I'm glad you're feeling better. It was really bad luck what happened to you."; + mes "Hey, I have an idea.\""; + QL_BEGIN = 5; + goto L_Maggots; + +L_Maggots: + mes "[Tanisha]"; + mes "\"There are some maggots eating the goods and I'm supposed to get rid of them."; + mes "But they're so yucky!\""; + mes "\"If you kill them, I'll give you my knife."; + mes "What do you say?\""; + menu + "I guess it's the least I can do.",L_Next1; + +L_Next1: + mes "[Tanisha]"; + mes "\"Wonderful."; + // since the check happens here, it is actually possible to have + // more than $@Maggot_MaxHunters in the area at one time + // but that's not a BIG problem + if (getareausers("029-2", 98, 84, 106, 89) >= $@Maggot_MaxHunters) + goto L_Crowded; + next; + goto L_Fight_Again; + +L_Fight_Again: + mes "[Tanisha]"; + mes "\"Ok, listen what to do."; + mes "Equip a weapon and kill the maggots.\""; + mes "\"Press [###keyTargetMonster;] to focus on a monster. With [###keyTargetAttack;] you can focus and start attacking the same time."; + mes "But it also works to click on the monster with your mouse.\""; + next; + mes "\"If you press the [###keyTarget;], you can abort your attack.\""; + next; + mes "\"Maggots aren't aggressive, so they won't harm you until you attack them first. Take them out one by one.\""; + next; + mes "\"Sometimes dead monsters leave some useful things. You can pick them up by pressing [###keyPickup;] or clicking on the items with your mouse.\""; + close2; + // The getitem must be in the same place as set QL_BEGIN, 2; + // since it was moved to after L_Fight_Again, add it conditionally + if (QL_BEGIN == 5) + goto L_GetFightItems; + goto L_ContinueFight; + +L_GetFightItems: + QL_BEGIN = 6; + getitem "Knife", 1; + getitem "SlingShot", 1; + getitem "SlingBullet", 500; + goto L_ContinueFight; + +L_ContinueFight: + QL_BEGIN = 6; + @Maggot_Kills = 0; + @time = 0; + if (getareausers("029-2", 98, 84, 106, 89) == 0) + initnpctimer; + warp "029-2", 101, 87; + goto L_Summon; + +L_Summon: + areamonster "029-2", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath"; + end; + +L_Stats: + mes "[Tanisha]"; + mes "\"That was great! Like a professional exterminator!\""; + mes "\"And it seems you became stronger and more experienced."; + mes "That means you got some status points which you can use to increase your abilities.\""; + mes "\"Press [###keyWindowStatus;] or click the Status button in the bar at the upper right to see your status window. There you can distribute your points on six different properties.\""; + mapmask getmask() | 2; + next; + goto L_StatsRe; + +L_StatsRe: + mes "\"Strength makes you hit harder and you can carry more weight.\""; + mes "\"Agility increases your attack speed and your ability to dodge attacks.\""; + mes "\"Vitality gives you more hit points and more defense against physical attacks.\""; + mes "\"Intelligence is useful for magic attack and defense."; + mes "But as long as you don't know any magic, you shouldn't use your points on this.\""; + mes "\"Dexterity is needed to hit monsters. It's also very important for the damage if you use a ranged weapon.\""; + mes "\"Luck gives you the chance to do critical hits and lowers the chance to receive a critical hit from your opponent.\""; + next; + mes "\"Think about how you want to play before assigning the points.\""; + mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\""; + mes "\"He can also change your hair style and color, along with your gender.\""; + mes "\"Furthermore, he knows of mages with even more powerful reset spells for your stats.\""; + next; + if (QL_BEGIN == 7) + goto L_Money; + goto L_Advice; + +L_Money: + next; + mes "[Tanisha]"; + mes "\"Hey, you are so smart taking out all that yucky maggots for me."; + mes "You can have my pocket money. Here.\""; + QL_BEGIN = 8; + Zeny = Zeny + 5; + next; + goto L_Advice; + +L_Advice: + mes "\"When you go to Hurnscald, you should see Bernard. He can make a delicious soup!"; + mes "Good luck!\""; + emotion EMOTE_HAPPY, strcharinfo(0); + goto L_close; + +L_Explain: + menu + "... how to fight?",L_Fight, + "... monsters?",L_Mob, + "... status points?",L_StatsRe, + "... what to do in Hurnscald?",L_Advice, + "... nevermind.",L_close; + +L_Fight: + mes "[Tanisha]"; + mes "\"Press [###keyTargetMonster;] to focus on a monster. With [###keyTargetAttack;] you can focus and attack."; + mes "But it also works to click on the monster with your mouse.\""; + next; + mes "\"If you press the [###keyTarget;] button, you can abort your attack.\""; + next; + mes "\"Sometimes dead monsters leave some useful things. You can pick them up with pressing [###keyPickup;] or clicking on the items with your mouse.\""; + next; + mes "\"If you feel exhausted from battle you can sit down by pressing [###keyBeingSit;] to recover faster.\""; + goto L_close; + +L_Mob: + mes "[Tanisha]"; + mes "\"I don't know much about monsters, I'm just a little girl. But I know a few things."; + mes "There are several types of monsters...Aggressive, Neutral, and Assistants.\""; + next; + mes "\"Aggressive monsters will attack you as soon as they see you.\""; + next; + mes "\"Neutral monsters are peaceful until they get attacked.\""; + next; + mes "\"Assistants are monsters who help each other.\""; + goto L_close; + +L_Tut_Done: + mes "[Tanisha]"; + mes "\"These yucky maggots! They're eating our goods!"; + mes "No matter how many of them you kill, they always come back.\""; + mes "She sighs."; + mes "[Tanisha]"; + mes "\"Do you have any questions?\""; + menu + "Yes, could you explain about...", L_Explain, + "No, thanks.", L_close; + +L_Crowded: + mes "[Tanisha]"; + mes "\"That's great! But..."; + mes "it seems a little crowded in there.\""; + mes "\"Let's wait a short while.\""; + goto L_close; + +L_Sleep: + warp "029-2", 101, 87; + mes "[Tanisha]"; + mes "\"What are you doing in there?"; + mes "Sleeping?"; + mes "Come back when you're serious.\""; + @Maggot_Kills = 0; + @time = 0; + close2; + if (getareausers("029-2", 98, 84, 106, 89) == 0) + goto L_CleanUp; + end; + +L_Fail: + mes "Tanisha seems to be trying hard to supress laughter."; + mes "[Tanisha]"; + mes "\"The maggots defeated you.\""; + mes "She bursts out with laughter."; + mes "\"Oops, I'm sorry. It's just too funny."; + mes "Do you want to try it again?\""; + menu + "Sure!", L_Next2, + "No, I need a rest.", L_close; + +L_Next2: + if (getareausers("029-2", 98, 84, 106, 89) >= $@Maggot_MaxHunters) + goto L_Crowded; + goto L_Fight_Again; + +L_Fighting: + npctalk strnpcinfo(0), "##3I believe in you!", strcharinfo(0); + end; + +OnTimer1000: + setnpctimer 0; + if (getareausers("029-2", 98, 84, 106, 89) == 0) + goto L_CleanUp; + // This is needed because multiple players can be in the area at once + areatimer 0, "029-2", 98, 84, 106, 89, 0, "Tanisha::OnTick"; + end; + +L_CleanUp: + killmonster "029-2", "Tanisha::OnMaggotDeath"; + $@Maggot_Hunters = 0; + stopnpctimer; + areamonster "029-2", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath"; + end; + +OnTick: + @time = @time + 1; + if (@time > 300) + goto L_Sleep; + if (ispcdead()) + end; + if (Hp > 20) + end; + heal MaxHp, 0; + npctalk strnpcinfo(0), "##3You're doing good!", strcharinfo(0); + end; + +OnMaggotDeath: + if (@Maggot_Kills == 1) + npctalk strnpcinfo(0), "##3Aaahhhh... another one! It will crawl up your legs!", strcharinfo(0); + if (@Maggot_Kills == 2) + npctalk strnpcinfo(0), "##3Ohh... Irrhk... Eeeeww... They just appear from nowhere!", strcharinfo(0); + if (@Maggot_Kills == 3) + npctalk strnpcinfo(0), "##3Yuck... I think I am getting sick.", strcharinfo(0); + if (isin("029-2", 98, 84, 106, 89)) + @Maggot_Kills = @Maggot_Kills + 1; + if (@Maggot_Kills < 5) + goto L_Summon; + // else, complete + warp "029-2", 110, 88; + QL_BEGIN = 7; + @Maggot_Kills = 0; + @time = 0; + if (getareausers("029-2", 98, 84, 106, 89) == 0) + goto L_CleanUp; + end; + +L_close: + close; + +OnInit: + $@Maggot_MaxHunters = 4; + areamonster "029-2", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath"; + end; +} +029-2,114,93,0 script #DoorOutTut2 NPC45,0,0,{ + end; + +OnTouch: + if (QL_BEGIN >= 8) + goto L_Warp; + goto L_Block; + +L_Warp: + mapmask getmask(); + warp "029-1", 32, 100; + end; + +L_Block: + npctalk "Tanisha", "##3##BPlease come here. ##bI'd like some help!", strcharinfo(0); + end; +} diff --git a/npc/029-2/two_arms.txt b/npc/029-2/two_arms.txt new file mode 100755 index 00000000..48dec1cb --- /dev/null +++ b/npc/029-2/two_arms.txt @@ -0,0 +1,3 @@ + +029-2,99,25,0 shop Rosen NPC311,903:50,904:0,530:8000,1199:2,529:2 +029-2,112,24,0 shop Toichi NPC377,1201:25,522:50,521:500,523:1000,603:1000 diff --git a/npc/029-3/_import.txt b/npc/029-3/_import.txt new file mode 100644 index 00000000..632d106c --- /dev/null +++ b/npc/029-3/_import.txt @@ -0,0 +1,5 @@ +// Map 029-3: Candor Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/029-3/barrier.txt", +"npc/029-3/mapflags.txt", +"npc/029-3/parua.txt", diff --git a/npc/029-3/barrier.txt b/npc/029-3/barrier.txt new file mode 100755 index 00000000..36c270a7 --- /dev/null +++ b/npc/029-3/barrier.txt @@ -0,0 +1,9 @@ +029-3,49,54,0 script #FightCaveBarrier NPC45,0,0,{ + if ($@FIGHT_CAVE_STATUS == 1) goto L_Block; + warp "029-1", 69, 62; + end; + +L_Block: + message strcharinfo(0), "Some force seems to be blocking you from exiting."; + end; +} diff --git a/npc/029-3/mapflags.txt b/npc/029-3/mapflags.txt new file mode 100755 index 00000000..a161e111 --- /dev/null +++ b/npc/029-3/mapflags.txt @@ -0,0 +1,2 @@ +029-3 mapflag nosave 029-1,39,102 +//029-3 mapflag resave 029-1,39,102 diff --git a/npc/029-3/parua.txt b/npc/029-3/parua.txt new file mode 100755 index 00000000..bfa3e4ba --- /dev/null +++ b/npc/029-3/parua.txt @@ -0,0 +1,400 @@ +029-3,50,25,0 script Parua NPC183,{ + $@candor_npctalk$ = "The dungeon is now ready for its next victims."; + donpcevent "#CandorAnnouncer::OnCommandTalk"; + @FIGHT_CAVE_COST = 20000; + @FIGHT_CAVE_COST$ = "20,000"; + @FIGHT_CAVE_ANNOUNCE_COST = 3000; + @FIGHT_CAVE_ANNOUNCE_COST$ = "3,000"; + if ($@FIGHT_CAVE_STATUS == 1) goto L_Enjoy; + if ($@FIGHT_CAVE_STATUS >= 2 && $@ANNOUNCE_TIME > gettimetick(2)) goto L_Wait; + mesn; + mes "\"Hello.\""; + next; + mesn; + mes "\"Do you dare challenge the power that sleeps here?\""; + menu "No, I'll let it sleep.", L_Exit, + "Ha! What's the worst it could do?", L_Next, + "What is this place anyway?", L_Explain, + "Actually, I want to leave, but I'm stuck!", L_Stuck; + +L_Next: + mesn; + mes "\"Very well, for a fee of "+@FIGHT_CAVE_COST$+" GP, I will awaken that power.\""; + menu "No, what a ripoff!", L_Exit, + "Fine, here you go.", L_Fine; + +L_Fine: + if ($@FIGHT_CAVE_STATUS == 1) + goto L_AlreadyStarted; + if (Zeny >= @FIGHT_CAVE_COST + @FIGHT_CAVE_ANNOUNCE_COST) + goto L_CallPlayers; + goto L_Paying; + +L_Paying: + if (getmapusers("029-3") < 5) + goto L_NotEnoughPlayers; + if (Zeny < @FIGHT_CAVE_COST) + goto L_NotEnough; + if ($@FIGHT_CAVE_STATUS != 0) + goto L_AlreadyStarted; + if ($@FIGHT_CAVE_PAID != 0) + goto L_AlreadyStarted; + Zeny = Zeny - @FIGHT_CAVE_COST; + $@FIGHT_CAVE_PAID = 1; + goto L_StartFight; + +L_StartFight: + if (getmapusers("029-3") < 5) + goto L_NotEnoughPlayers; + npctalk strnpcinfo(0), "Let the battle begin!"; + $@FIGHT_CAVE_STATUS = 1; + $@FIGHT_CAVE_LEVEL = 1; + $@FIGHT_CAVE_PLAYER_COUNT = getmapusers("029-3"); + startnpctimer; + goto L_Exit; + +L_CallPlayers: + mesn; + mes "\"Good... Your money will be very useful. I can awaken this power right now, if you want, or, for an additional fee of "+@FIGHT_CAVE_ANNOUNCE_COST$+" GP, I can help you gather some of your friends to help you in this battle. What will it be?\""; + menu + "We are OK. Just do it!", L_Paying, + "I will accept your help.", L_AcceptHelp; + +L_AcceptHelp: + mesn; + mes "\"OK, I can make up to 3 announcements to the people of this world, letting them know that you are about to challenge the powers that sleep in this cave! If you want the fight to start in 5 minutes, I will make one announcement, if it is 10 minutes, I will make 2 announcements, and if it is to start in 15 minutes, it will be 3 announcements.\""; + next; + mes "\"But be careful! If there aren't at least five people here at the time of the fight, your money will be lost.\""; + next; + mes "\"So, when should it start?\""; + menu + "In 5 minutes.", L_TimeFightStart, + "In 10 minutes.", L_TimeFightStart, + "In 15 minutes.", L_TimeFightStart, + "I don't want to wait. Let's start it now!", L_Paying; + +L_TimeFightStart: + if ($@FIGHT_CAVE_STATUS != 0) + goto L_AlreadyStarted; + if (getmapusers("029-3") < 5) + goto L_NotEnoughPlayers; + if (Zeny < @FIGHT_CAVE_COST + @FIGHT_CAVE_ANNOUNCE_COST) + goto L_NotEnough_Announce; + if ($@FIGHT_CAVE_PAID != 0) + goto L_AlreadyStarted; + Zeny = Zeny - (@FIGHT_CAVE_COST + @FIGHT_CAVE_ANNOUNCE_COST); + $@FIGHT_CAVE_PAID = 1; + $@SPONSOR$ = strcharinfo(0); + $@FIGHT_CAVE_STATUS = $@FIGHT_CAVE_STATUS + (@menu + 2); + if ($@FIGHT_CAVE_STATUS == 3) + $@ANNOUNCE_TIME = gettimetick(2) + 300; + if ($@FIGHT_CAVE_STATUS == 4) + $@ANNOUNCE_TIME = gettimetick(2) + 600; + if ($@FIGHT_CAVE_STATUS >= 5) + $@ANNOUNCE_TIME = gettimetick(2) + 900; + startnpctimer; + close; + +L_Enjoy: + mesn; + mes "\"Enjoy the fight!\""; + goto L_Exit; + +L_Wait: + @seconds = $@ANNOUNCE_TIME - gettimetick(2); + callfunc "HumanTime"; + mesn; + mes "\"Be Patient... The fight will start in " + @time$ + ".\""; + goto L_Exit; + +L_NotEnough: + mesn; + mes "\"Seems you can't meet my fee.\""; + goto L_Exit; + +L_NotEnough_Announce: + mesn; + mes "\"Seems you can't meet the announcement fee.\""; + goto L_Exit; + +L_AlreadyStarted: + mesn; + mes "\"Seems your friend already paid me.\""; + goto L_Exit; + +L_NotEnoughPlayers: + if ($@FIGHT_CAVE_STATUS == 2) + goto L_CleanUp_Announcement; + mesn; + mes "\"Maybe you should bring some friends with you; this will get messy.\""; + mes "He takes a moment to calculate. \"You'll probably need at least...five people, including yourself.\""; + goto L_Exit; + +L_Explain: + mesn; + mes "\"Long ago many human beings and other creatures have been slaughtered in a battle in this now cursed cave. Their souls still lie here.\""; + next; + mes "\"My try to use a spell to cure this place from the curse backfired and turned me into this.\""; + next; + mes "\"To change me back expensive ingredients for a curing potion are required.\""; + next; + mes "\"Pay me and I will use my dark astral magic to summon the undead. If you survive you will receive 100 Boss Points.\""; + menu + "I need to think about this.", L_Exit, + "I'm interested.", L_Next, + "What are Boss Points?", L_Explain_Boss_Points; + +L_Explain_Boss_Points: + mesn; + mes "\"Boss points are another type of experience.\""; + next; + mes "\"Fighting experience makes you level up, magic experience makes your spells more effective and allows you to learn new spells.\""; + next; + mes "\"Boss Points show your skills and nerves in important battles and heroic actions.\""; + next; + mes "\"Be aware, they can be consumed as well. For instance by negative actions, such as selfishness or simply stupidity.\""; + menu + "Thanks, I will think about your offer now.", L_Exit, + "I want to challenge the powers in this cave.", L_Next; + +L_Stuck: + mesn; + mes "\"I see. I can teleport you to another nice cave.\""; + mes "His face doesn't show any emotion, but his voice sounds threatening."; + menu + "Please do so!", L_Warp, + "I changed my mind.", L_Exit; + +L_Warp: + warp "005-3", 86, 34; + goto L_Exit; + +L_Exit: + close; + +OnTimer5000: + setnpctimer 0; + if ($@FIGHT_CAVE_STATUS == 1) + goto L_CaveLogic; + if ($@FIGHT_CAVE_STATUS >= 2) + goto L_GlobalAnnounce; + goto L_Return_1; + +L_Return_1: + $@FIGHT_CAVE_PLAYER_COUNT = 0; + areatimer 0, "029-3", 20, 20, 70, 60, 10, "Parua::OnTick"; + end; + +L_CaveLogic: + $@FIGHT_CAVE_ROUND_PEN = $@FIGHT_CAVE_PLAYER_COUNT; + if ($@FIGHT_CAVE_ROUND_PEN > 60) + $@FIGHT_CAVE_ROUND_PEN = 60; + if ($@FIGHT_CAVE_PLAYER_COUNT <= 0) + goto L_CleanUp; + set $@FIGHT_CAVE_ROUND_TIMER, $@FIGHT_CAVE_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("029-3", "Parua::OnPetDeath") <= 0) + goto L_NextRound; + if ($@FIGHT_CAVE_ROUND_TIMER + $@FIGHT_CAVE_ROUND_PEN >= 120) + goto L_NextRound; + goto L_Return_1; + +L_NextRound: + $@FIGHT_CAVE_ROUND_TIMER = 0; + + $@FIGHT_CAVE_TEMP_UP = ($@FIGHT_CAVE_LEVEL / 10); + if ($@FIGHT_CAVE_TEMP_UP > 100) + $@FIGHT_CAVE_TEMP_UP = 100; + + $@FIGHT_CAVE_LEVEL = $@FIGHT_CAVE_LEVEL + $@FIGHT_CAVE_PLAYER_COUNT + $@FIGHT_CAVE_TEMP_UP; + if ($@FIGHT_CAVE_LEVEL >= 2200) + goto L_CleanUp; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_LEVEL; + + areatimer 0, "029-3", 20, 20, 70, 60, 10, "Parua::OnNewRound"; + + $@candor_npctalk$ = "The next round (level " + $@FIGHT_CAVE_LEVEL + ") is starting with " + $@FIGHT_CAVE_PLAYER_COUNT + " player(s) left alive."; + donpcevent "#CandorAnnouncer::OnCommandTalk"; + mapannounce "029-3", "Parua : The next round (level " + $@FIGHT_CAVE_LEVEL + ") is starting with " + $@FIGHT_CAVE_PLAYER_COUNT + " player(s) left alive." , 0; + + $@MOB_1_SUMMON = 0; + $@MOB_2_SUMMON = 0; + $@MOB_3_SUMMON = 0; + $@MOB_4_SUMMON = 0; + $@MOB_5_SUMMON = 0; + $@MOB_6_SUMMON = 0; + goto L_Summon; + +L_Summon: + if ($@FIGHT_CAVE_POINTS >= 243 + && $@MOB_1_SUMMON < 2) + goto L_MOB1; + if ($@FIGHT_CAVE_POINTS >= 81 + && $@MOB_2_SUMMON < 6) + goto L_MOB2; + if ($@FIGHT_CAVE_POINTS >= 27 + && $@MOB_3_SUMMON < 5) + goto L_MOB3; + if ($@FIGHT_CAVE_POINTS >= 9 + && $@MOB_4_SUMMON < 7) + goto L_MOB4; + if ($@FIGHT_CAVE_POINTS >= 3 + && $@MOB_5_SUMMON < 10) + goto L_MOB5; + if ($@FIGHT_CAVE_POINTS >= 1 + && $@MOB_6_SUMMON < 12) + goto L_MOB6; + goto L_Return_1; + +L_GlobalAnnounce: + $@FIGHT_CAVE_PLAYER_COUNT = getmapusers("029-3"); + if ($@FIGHT_CAVE_STATUS == 3) + goto L_Five_Minutes; + if ($@FIGHT_CAVE_STATUS == 4) + goto L_Ten_Minutes; + if ($@FIGHT_CAVE_STATUS >= 5) + goto L_Fifteen_Minutes; + if (gettimetick(2) >= $@ANNOUNCE_TIME) + goto L_StartFight; + end; + +L_Five_Minutes: + if ($@ANNOUNCE_TIME - gettimetick(2) > 300) + end; + if($@FIGHT_CAVE_PLAYER_COUNT == 1) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. It is almost time! The fight will start in ##B##75 minutes##1##b and, at the moment, there is ##3only 1 fighter##1 in the cave.", 0; + if(($@FIGHT_CAVE_PLAYER_COUNT > 1) && ($@FIGHT_CAVE_PLAYER_COUNT < 5)) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. It is almost time! The fight will start in ##B##75 minutes##1##b and, at the moment, there are ##3only " + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + if($@FIGHT_CAVE_PLAYER_COUNT >= 5) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. It is almost time! The fight will start in ##B##75 minutes##1##b and, at the moment, there are ##0" + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + $@FIGHT_CAVE_STATUS = 2; + end; + +L_Ten_Minutes: + if ($@ANNOUNCE_TIME - gettimetick(2) > 600) + end; + if($@FIGHT_CAVE_PLAYER_COUNT == 1) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. You still have time to prepare yourself for this fight, since it will only start in ##B##610 minutes##1##b. Right now, there is ##3only 1 fighter##1 in the cave.", 0; + if(($@FIGHT_CAVE_PLAYER_COUNT > 1) && ($@FIGHT_CAVE_PLAYER_COUNT < 5)) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. You still have time to prepare yourself for this fight, since it will only start in ##B##610 minutes##1##b. Right now, there are ##3only " + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + if($@FIGHT_CAVE_PLAYER_COUNT >= 5) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. You still have time to prepare yourself for this fight, since it will only start in ##B##610 minutes##1##b. Right now, there are ##0" + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + $@FIGHT_CAVE_STATUS = 3; + end; + +L_Fifteen_Minutes: + if($@FIGHT_CAVE_PLAYER_COUNT == 1) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. The fight will start in ##B##615 minutes##1##b, so prepare yourself and call your friends. At the moment there is ##3only 1 fighter##1 in the cave.", 0; + if(($@FIGHT_CAVE_PLAYER_COUNT > 1) && ($@FIGHT_CAVE_PLAYER_COUNT < 5)) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. The fight will start in ##B##615 minutes##1##b, so prepare yourself and call your friends. At the moment there are ##3only " + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + if($@FIGHT_CAVE_PLAYER_COUNT >= 5) announce "Parua : " + $@SPONSOR$ + " invites everyone to a challenge against the powers that sleep in Candor. The fight will start in ##B##615 minutes##1##b, so prepare yourself and call your friends. At the moment there are ##0" + $@FIGHT_CAVE_PLAYER_COUNT + " fighters##1 in the cave.", 0; + $@FIGHT_CAVE_STATUS = 4; + end; + +L_MOB1: + $@MOB_1_SUMMON = $@MOB_1_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 243; + areamonster "029-3", 20, 20, 70, 60, "", 1022, 1, "Parua::OnPetDeath"; + goto L_Summon; + +L_MOB2: + $@MOB_2_SUMMON = $@MOB_2_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 81; + areamonster "029-3", 20, 20, 70, 60, "", 1045, 1, "Parua::OnPetDeath"; + goto L_Summon; + +L_MOB3: + $@MOB_3_SUMMON = $@MOB_3_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 27; + areamonster "029-3", 20, 20, 70, 60, "", 1024, 1, "Parua::OnPetDeath"; + goto L_Summon; + +L_MOB4: + $@MOB_4_SUMMON = $@MOB_4_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 9; + areamonster "029-3", 20, 20, 70, 60, "", 1043, 1, "Parua::OnPetDeath"; + goto L_Summon; + +L_MOB5: + $@MOB_5_SUMMON = $@MOB_5_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 3; + areamonster "029-3", 20, 20, 70, 60, "", 1010, 1, "Parua::OnPetDeath"; + goto L_Summon; + +L_MOB6: + $@MOB_6_SUMMON = $@MOB_6_SUMMON + 1; + $@FIGHT_CAVE_POINTS = $@FIGHT_CAVE_POINTS - 1; + areamonster "029-3", 20, 20, 70, 60, "", 1008, 1, "Parua::OnPetDeath"; + goto L_Summon; + +OnTick: + if (ispcdead()) end; + $@FIGHT_CAVE_PLAYER_COUNT = $@FIGHT_CAVE_PLAYER_COUNT + 1; + end; + +OnNewRound: + if (ispcdead()) + end; + if ($@FIGHT_CAVE_LEVEL < 600) + end; + @candor_oldx = @candor_x; + @candor_oldy = @candor_y; + @candor_x = getx(); + @candor_y = gety(); + if (!(@candor_oldx == @candor_x && @candor_oldy == @candor_y)) + goto L_IdleCheckPassed; + @candor_idle_counter = @candor_idle_counter + 1; + sc_start SC_POISON, 1, @candor_idle_counter*25; + heal ((MaxHp/100) * (-20 * @candor_idle_counter)), 0; + message strcharinfo(0), "The evil energy of this place hurts you. You should keep moving!"; + end; + +OnPetDeath: + end; + +OnInit: + if (debug >= 2) end; + initnpctimer; + stopnpctimer; + goto L_CleanUp; + +L_CleanUp: + npctalk strnpcinfo(0), "Game Over"; + $@candor_npctalk$ = "The dungeon is now ready for its next victims."; + donpcevent "#CandorAnnouncer::OnCommandTalk"; + areatimer 0, "029-3", 20, 20, 70, 60, 10, "Parua::OnReward"; + $@FIGHT_CAVE_STATUS = 0; + $@ANNOUNCE_TIME = 0; + $@FIGHT_CAVE_PAID = 0; + $@FIGHT_CAVE_PLAYER_COUNT = 0; + $@FIGHT_CAVE_LEVEL = 1; + $@FIGHT_CAVE_ROUND_TIMER = 0; + killmonster "029-3", "Parua::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +L_CleanUp_Announcement: + npctalk strnpcinfo(0), $@SPONSOR$ + " lost the money invested in the fight, since there are less than 5 players in the cave"; + $@SPONSOR$ = ""; + $@ANNOUNCE_TIME = 0; + $@FIGHT_CAVE_STATUS = 0; + $@FIGHT_CAVE_PAID = 0; + stopnpctimer; + setnpctimer 0; + end; + +OnPCDieEvent: + goto L_CleanUp_Player; + +L_CleanUp_Player: + @candor_oldx = 0; + @candor_oldy = 0; + @candor_x = 0; + @candor_y = 0; + @candor_idle_counter = 0; + end; + +L_IdleCheckPassed: + //FIXME we could do that, but I'd say, let's be severe. + //set @candor_idle_counter, 0; + end; + +OnReward: + if (ispcdead()) + end; + BOSS_POINTS = BOSS_POINTS + 100; + message strcharinfo(0), "You gain 100 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_CleanUp_Player; +} diff --git a/npc/029-4/_import.txt b/npc/029-4/_import.txt new file mode 100644 index 00000000..523017f2 --- /dev/null +++ b/npc/029-4/_import.txt @@ -0,0 +1,4 @@ +// Map 029-4: 2014 Candor +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/029-4/_mobs.txt", +"npc/029-4/_warps.txt", diff --git a/npc/029-4/_mobs.txt b/npc/029-4/_mobs.txt new file mode 100644 index 00000000..dd894eb5 --- /dev/null +++ b/npc/029-4/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-4: 2014 Candor mobs +029-4,69,65,6,6 monster Pikpik 1013,4,20000,60000 +029-4,32,33,6,6 monster Gamboge Plant 1038,3,30000,60000 +029-4,46,48,2,0 monster Alizarin Plant 1037,1,10000,120000 +029-4,37,60,11,10 monster PumpkinMob 1019,5,10000,30000 +029-4,54,36,8,9 monster Manana Tree 1017,4,25000,30000 +029-4,59,51,6,4 monster Little Green Slime 1025,2,25000,30000 diff --git a/npc/029-4/_warps.txt b/npc/029-4/_warps.txt new file mode 100644 index 00000000..5ebfd55a --- /dev/null +++ b/npc/029-4/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 029-4: 2014 Candor warps +029-4,22,38,0 warp #029-4_22_38 0,1,029-1,25,38 diff --git a/npc/030-1/_import.txt b/npc/030-1/_import.txt new file mode 100644 index 00000000..6abb9f07 --- /dev/null +++ b/npc/030-1/_import.txt @@ -0,0 +1,4 @@ +// Map 030-1: Romantic Place +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/030-1/_mobs.txt", +"npc/030-1/_warps.txt", diff --git a/npc/030-1/_mobs.txt b/npc/030-1/_mobs.txt new file mode 100644 index 00000000..58115429 --- /dev/null +++ b/npc/030-1/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 030-1: Romantic Place mobs +030-1,0,0,0,0 monster Terranite 1113,7,100000,30000 +030-1,0,0,0,0 monster Reaper 1095,4,100000,30000 +030-1,71,67,0,0 monster Demonic Spirit 1112,2,100000,30000 +030-1,71,67,0,0 monster Penguin 1094,2,100000,30000 diff --git a/npc/030-1/_warps.txt b/npc/030-1/_warps.txt new file mode 100644 index 00000000..4da1883c --- /dev/null +++ b/npc/030-1/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 030-1: Romantic Place warps +030-1,61,27,0 warp #030-1_61_27 3,0,019-1,101,101 diff --git a/npc/030-2/_import.txt b/npc/030-2/_import.txt new file mode 100644 index 00000000..4e952e7d --- /dev/null +++ b/npc/030-2/_import.txt @@ -0,0 +1,17 @@ +// Map 030-2: Christmas Inn +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/030-2/_warps.txt", +"npc/030-2/avalia.txt", +"npc/030-2/basic_npcs.txt", +"npc/030-2/bedding_helper.txt", +"npc/030-2/chief_helper.txt", +"npc/030-2/eljas.txt", +"npc/030-2/empty_boxes_helper.txt", +"npc/030-2/glitter_helper.txt", +"npc/030-2/guards.txt", +"npc/030-2/mapflags.txt", +"npc/030-2/present_helper.txt", +"npc/030-2/roasted_acorns_helper.txt", +"npc/030-2/shipping_helper.txt", +"npc/030-2/storage_helper.txt", +"npc/030-2/wrapping_paper_helper.txt", diff --git a/npc/030-2/_warps.txt b/npc/030-2/_warps.txt new file mode 100644 index 00000000..7498cdee --- /dev/null +++ b/npc/030-2/_warps.txt @@ -0,0 +1,17 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 030-2: Christmas Inn warps +030-2,88,51,0 warp #030-2_88_51 0,0,020-1,33,94 +030-2,72,31,0 warp #030-2_72_31 0,0,030-2,51,31 +030-2,194,68,0 warp #030-2_194_68 0,0,030-2,78,88 +030-2,52,31,0 warp #030-2_52_31 0,0,030-2,73,31 +030-2,75,19,0 warp #030-2_75_19 1,0,030-2,127,50 +030-2,102,19,0 warp #030-2_102_19 1,0,030-2,153,50 +030-2,127,51,0 warp #030-2_127_51 1,0,030-2,75,20 +030-2,154,51,0 warp #030-2_154_51 1,0,030-2,101,20 +030-2,156,24,0 warp #030-2_156_24 0,1,030-2,21,78 +030-2,20,78,0 warp #030-2_20_78 0,1,030-2,155,24 +030-2,42,105,0 warp #030-2_42_105 1,0,030-2,93,74 +030-2,94,73,0 warp #030-2_94_73 1,0,030-2,41,104 +030-2,102,73,0 warp #030-2_102_73 1,0,030-2,127,104 +030-2,127,105,0 warp #030-2_127_105 1,0,030-2,102,74 +030-2,78,87,0 warp #030-2_78_87 0,0,030-2,194,67 diff --git a/npc/030-2/avalia.txt b/npc/030-2/avalia.txt new file mode 100755 index 00000000..63f8eaf1 --- /dev/null +++ b/npc/030-2/avalia.txt @@ -0,0 +1,219 @@ + +030-2,198,61,0 script Avalia NPC356,{ + callfunc "XmasStates"; + + if(($@xmas_time) && !(@xmas_side)) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Avalia]"; + mes "\"What are you doing in here? Get out!\""; + warp "030-2",88,80; + close; + +L_XmasMain: + if(@xmas_reward_done_state) goto L_ThankYou; + if(@xmas_reward1_done_state) goto L_Thanks; + if(@xmas_reward_start_state) goto L_Reward; + if(@xmas_reward2_done_state) goto L_Reward; + if(@xmas_boss_door_state) goto L_Quick; + if(@xmas_reagent_done_state) goto L_PowerReagents; + if(@xmas_reagent_start_state) goto L_PowerReagents; + if(@xmas_helper_done_state) goto L_HelperQuest; + if(@xmas_helper_start_state) goto L_HelperQuest; + if(@xmas_list_deliver) goto L_ListReturn; + goto L_OffSeason; + +L_ListReturn: + mes "[Avalia]"; + mes "\"This had better be important, I have got enough to worry about.\""; + menu + "Sorry for interrupting, but I have been sent up here with the List", L_Next; + +L_Next: + mes "She stares blankly at you for a bit..."; + next; + mes "\"YAHOO!!\""; + next; + mes "\"One problem down, only a few more to go.\""; + next; + mes "\"Since you have already been so helpful, I was wondering if you could continue to do so?\""; + mes "\"I do have the power to reward you handsomely.\""; + next; + mes "\"You see this nutcracker here beside me? He is different from the rest. He had a will of his own. It started shortly after we installed the new power core.\""; + next; + mes "\"At first, it was just magical research that had me keep him close to me. As time wore on, mine and his interactions became more intimate. I was hoping to get my research done before the Holidays.\""; + next; + mes "\"I wanted to show Santa and ask to if he knew how to help make it permanent, but Someone didn't approve. Took away our central spell power core. Now all the nutcrackers are back to being mindless automatons. Now the Christmas Sages must use magic to animate them.\""; + next; + mes "\"Please you must help me find a way to restore our power core before Christmas. I want to show Santa Millis, so he can give him life permanently for me.\""; + mes "\"First I need time to do some more research. Which means I need to spend less time helping with the holidays. Can you check with the helpers and make sure everything is going smoothly?\""; + menu + "Sure.", L_Start; + +L_Start: + mes "\"Ok, go check in with Chief Warrick. You might have to persist a bit but he will let you help.\""; + mes "\"Once you have completed this task come back and talk to me. As he reports to me.\""; + @xmas_state = $@xmas_helpers_start_state; + callfunc "XmasSetState"; + goto L_close; + +L_HelperQuest: + mes "[Avalia]"; + mes "\"Welcome Back!\""; + mes "\"So how are the Holiday Preparations coming along?\""; + menu + "It's a mess but they got things handled.", L_Continue, + "I'd better get back to helping.", L_close; + +L_Continue: + callfunc "XmasHelperPoints"; + callfunc "XmasStates"; + if(@xmas_helper_done_state) + goto L_ManaBattery; + goto L_NotHelpEnough; + +L_NotHelpEnough: + mes "\"Hrmm... I'm still getting bugged. You better go back there and see whats going on.\""; + goto L_close; + +L_ManaBattery: + mes "\"Now that we are caught up on the holidays and I've finished my research, I know what is needed to make the spell permanent.\""; + next; + callfunc "ListReagents"; + mes "\"When you have gathered the required materials please come back and see me.\""; + @xmas_state = $@xmas_reagents_start; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_close; + +L_IngredientList: + callfunc "ListReagents"; + mes "\"When you have gathered the required materials please come back and see me.\""; + goto L_close; + +L_PowerReagents: + mes "[Avalia]"; + mes "\"Welcome Back!\""; + mes "\"Have you gotten the reagents?\""; + menu + "Yes.", L_CheckReagents, + "What were they again?", L_IngredientList, + "No.", L_NotEnough; + +L_CheckReagents: + callfunc "CheckReagents"; + callfunc "XmasStates"; + if(!(@xmas_reagent_done_state)) + goto L_NotEnough; + callfunc "DeleteReagents"; + mes "\"Huzzah!, you have all the required components!\""; + mes "\"Now I can create a ManaBattery to power the Nutcrackers from a central location.\""; + mes "\"Our sages will now be free to perform other tasks. Oh boy the holidays are going to get easy again!\""; + mes "\"Stand back, this spell could backfire.\""; + next; + mes "You watch as she puts equal amounts of emerald powder into each of the empty bottles."; + mes "She methodically crushes up the shock sweet and spreads it amongst the empty bottles."; + mes "She positions the four bottles in a stand so all the openings are mostly facing each other."; + mes "She Begins to chant."; + next; + mes "[Avalia]"; + mes "O"; + next; + mes "wat"; + next; + mes "goo"; + next; + mes "siam"; + next; + mes "The bottles begin to pulse with mana."; + mes "She continues to chant"; + next; + mes "[Avalia]"; + mes "Aye"; + next; + mes "Am"; + next; + mes "Knot"; + next; + mes "Phunee"; + next; + mes "Mana surges to life in the bottles making a peel of thunder."; + next; + mes "[Avalia]"; + mes "\"Phew! That takes alot out of a person.\""; + mes "\"I'm in no condition to go anywhere.\""; + mes "\"Take the Mana Battery and install it in the warehouse.\""; + mes "\"It's found behind Chief Warrick\""; + @xmas_state = $@xmas_boss_door_open_state; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_close; + +L_NotEnough: + mes "\"I need all the reagents before Santa visits. Come back and see me when you have them.\""; + goto L_close; + +L_Quick: + mes "[Avalia]"; + mes "\"What are you still doing here?\""; + mes "\"Quickly, to the warehouse.\""; + goto L_close; + +L_Reward: + mes "[Avalia]"; + mes "\"Thanks for all the help.\""; + mes "\"Take this as a token of my gratitude.\""; + if (@xmas_reward2_done_state) + @xmas_state = $@xmas_reward_done; + if (@xmas_reward_start_state) + @xmas_state = $@xmas_reward1_done; + callfunc "XmasSetState"; + callfunc "XmasMainXpBpReward"; + goto L_close; + +L_Thanks: + mes "[Avalia]"; + mes "\"Please feel free to continue to help us while we prepare your reward.\""; + goto L_close; + +L_ThankYou: + mes "\"We can't thank you enough for restoring the nutcrackers humanity.\""; + goto L_close; + +L_close: + close; +} + +030-2,190,64,0 script Milis NPC330,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Milis]"; + mes "\"What are you doing in here, get out!\""; + warp "030-2",88,80; + close; + +L_XmasMain: + if(@xmas_reward_start_state) + goto L_Reward; + goto L_NoResponse; + +L_Reward: + mes "[Milis]"; + mes "\"Thanks for you help! I a REAL MAN, once again.\""; + goto L_close; + +L_NoResponse: + mes "[Milis]"; + mes "..."; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/basic_npcs.txt b/npc/030-2/basic_npcs.txt new file mode 100755 index 00000000..10b97cd2 --- /dev/null +++ b/npc/030-2/basic_npcs.txt @@ -0,0 +1,73 @@ + + +030-2,37,81,0 script Oswal NPC328,{ + mes "[Oswal]"; + mes "\"Welcome. I hope you enjoy your visit in Santa's residence. You already saw the workshop where the Christmas presents are crafted, right?\""; + next; + mes "\"Well, here you are in the office. We're taking care of various administrative tasks. Some are related to Christmas, but we also need to keep the everyday business running."; + mes "Santa, as one of the most powerful Sages, has a lot of issues to pay attention to.\""; + close; +} + +030-2,37,85,0 script Taito NPC328,{ + mes "[Taito]"; + mes "\"Hello. I'm sorry, but I'm very busy at the moment and want to concentrate. If you have any questions, ask one of the other helpers.\""; + close; +} + +030-2,31,77,0 script Rikhard NPC329,{ + mes "[Rikhard]"; + mes "\"I'm really glad that this year's Christmas preparations are going well. You know, last year nearly everything went wrong, so we all had to work really hard on that, and the everyday issues had to be neglected.\""; + next; + mes "\"But there are very important topics we have to take care on as Santa's helpers. The Sages have an important role in the politics of Kaizei.\""; + next; + mes "\"As an example, currently I'm working on analyzing a trade regulation proposal from Tulimshar's Wizard Council. I can't get into the details about this, obviously. But, let me tell you, those Tulimshar people try to get everything under their control.\""; + next; + mes "\"It's part of our work to maintain Kaizei's independency. In my opinion the Sages should be much more reluctant about this anyway. But well, I'm only a mere helper, this isn't up to me. I can only do my best to deliver an analysis as accurate as possible.\""; + next; + mes "\"Which is why I should go back to work now.\""; + close; +} + +030-2,31,85,0 script Akseli NPC329,{ + mes "[Akseli]"; + mes "\"Ah, a visitor! Do you enjoy your time in Santa's residence?\""; + menu + "Yes, it's really interesting.", L_Interesting, + "It's ok.", L_Rage, + "I'm confused, it's much bigger than from the outside.", L_Next; + +L_Next: + mes "[Akseli]"; + mes "\"Ah, yes, that's a magic technique almost all of the Sages use. The house is located in a shifted dimension.\""; + goto L_close; + +L_Interesting: + mes "[Akseli]"; + mes "\"Good to hear that! Go look around, talk with the other guys and girls, we have an open house policy all year.\""; + goto L_close; + +L_Rage: + mes "[Akseli]"; + mes "\"tsss... you young people can't get no satisfaction eh?\""; + goto L_close; + +L_close: + close; +} + + +030-2,78,34,0 script Aaron NPC328,{ + mes "[Aaron]"; + mes "\"Welcome to Santa's famous Christmas workshop. Feel free to have a look around and talk to the craftsmen.\""; + next; + mes "\"You have to know, Santa is a great promoter for skilled craftsmen. He's always looking out for talented persons who can join our team and get an excellent apprenticeship here.\""; + close; +} + +030-2,154,33,0 script Iivo NPC329,{ + mes "You see a helper cutting some leather pieces. He looks very focused on his work. Then he notices you."; + mes "[Iivo]"; + mes "\"Hu? Oh, hello. Feel free to watch.\""; + close; +} diff --git a/npc/030-2/bedding_helper.txt b/npc/030-2/bedding_helper.txt new file mode 100755 index 00000000..22463251 --- /dev/null +++ b/npc/030-2/bedding_helper.txt @@ -0,0 +1,97 @@ + +030-2,37,77,0 script Osmo NPC328,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Osmo]"; + mes "\"It's nice to relax and not have to worry about Xmas.\""; + mes "\"All that rush to gather those furs kills me every year.\""; + goto L_close; + +L_XmasMain: + if (XMASTIME & $@xmas_helper_bit_bed_ends) goto L_Done; + if (XMASTIME & $@xmas_helper_bit_bed_starts) goto L_Bedding; + if (@xmas_helper_bit) goto L_Helping; + + mes "[Osmo]"; + mes "\"What? Uh, excuse me, I have some work to do.\""; + goto L_close; + +L_Helping: + mes "[Osmo]"; + mes "\"You came in at just the right moment. I was informed that our bedding material for fragile presents is nearly depleted."; + mes "Could you bring me " + $@xmas_bedding_amount + " White Furs?\""; + next; + mes "[Osmo]"; + mes "\"Take care that it's real White Fur."; + mes "Other materials tend to go out of place in the present box, leaving the fragile content unprotected from any pushes.\""; + XMASTIME = XMASTIME | $@xmas_helper_bit_bed_starts; + goto L_close; + +L_Bedding: + mes "[Osmo]"; + mes "\"Ah, you're back. Do you have the " + $@xmas_bedding_amount + " White Fur needed as bedding for fragile presents?\""; + if ((countitem("WhiteFur") >= $@xmas_bedding_amount) && (countitem("CottonCloth") >= $@xmas_bedding_amount)) + menu + "Yeah, here it is. (Give the White Fur.)",L_Fur, + "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth, + "No, I'm still working on that.",L_close; + if (countitem("WhiteFur") >= $@xmas_bedding_amount) + menu + "Yeah, here it is. (Give the White Fur.)",L_Fur, + "No, I'm still working on that.",L_close; + if (countitem("CottonCloth") >= $@xmas_bedding_amount) + menu + "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth, + "No, I'm still working on that.",L_close; + if ((countitem("WhiteFur") < $@xmas_bedding_amount) && (countitem("CottonCloth") < $@xmas_bedding_amount)) + menu + "No.", L_close; + goto L_close; + +L_Fur: + if (countitem("WhiteFur") < $@xmas_bedding_amount) + goto L_NoItems; + delitem "WhiteFur", $@xmas_bedding_amount; + XMASTIME = XMASTIME | $@xmas_helper_bit_bed_ends; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNice"; + callfunc "XmasXpReward"; + mes "[Osmo]"; + mes "\"Wonderful! Thanks for your effort.\""; + goto L_close; + +L_Cloth: + if (countitem("CottonCloth") < $@xmas_bedding_amount) + goto L_NoItems; + delitem "CottonCloth", $@xmas_bedding_amount; + XMASTIME = XMASTIME &~ $@xmas_helper_bit_bed_starts; + XMASTIME = XMASTIME | $@xmas_helper_bit_bed_ends; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNaughty"; + callfunc "XmasXpReward"; + mes "He doesn't notice that you're giving him Cotton Cloth."; + mes "[Osmo]"; + mes "\"Wonderful! Thanks for your effort.\""; + goto L_close; + +L_Done: + mes "[Osmo]"; + if (!(@xmas_helper_bedding)) + mes "\"The Fur you brought me isn't working very well.\""; + if (@xmas_helper_bedding) + mes "\"Thanks for helping out with the bedding material.\""; + goto L_close; + +L_NoItems: + mes "[Osmo]"; + mes "\"Where do you have it? Is this a joke?\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/chief_helper.txt b/npc/030-2/chief_helper.txt new file mode 100755 index 00000000..6cabf6af --- /dev/null +++ b/npc/030-2/chief_helper.txt @@ -0,0 +1,92 @@ + +030-2,127,42,0 script Chief Warrick NPC329,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Chief Warrick]"; + mes "\"Things run a lot smoother in the offseason. Why don't you check back when it gets closer to the holiday?\""; + goto L_close; + +L_XmasMain: + if (@xmas_helper_bit) + goto L_HelpStatus; + if (@xmas_helper_start_state) + goto L_Helping; + if (@xmas_list_deliver) + goto L_Avalia; + goto L_NoHelp; + +L_Helping: + mes "[Chief Warrick]"; + mes "\"Welcome to the home of Santa! My name is Warrick, I'm the chief of Santa's helpers."; + mes "As you certainly know Christmas is near. Therefore we're very very busy.\""; + next; + mes "\"For this reason I have to ask you to leave and come back some at some more convenient time.\""; + menu + "Availa Sent me. She said you should have me help out.",L_Next; + +L_Next: + mes "Warrick sighs."; + next; + mes "[Chief Warrick]"; + mes "\"Everything is going wrong, we're missing ingredients for the Christmas candy and material for the toys."; + mes "The lists got lost, we are running low on supplies, everything is in utter confusion."; + mes "And to make matters worse some of the presents are missing!\""; + next; + mes "\"Oh, please excuse me. I didn't mean to moan."; + mes "However, as you can see we have to deal with some serious problems here."; + mes "So I'd appreciate if you could just leave and not interfere.\""; + menu + "But I can help!",L_Continue; + +L_Continue: + mes "He hesitates."; + next; + mes "[Chief Warrick]"; + mes "\"I'm not sure...\""; + menu + "Really, I can do a lot of things.",L_Insist; + +L_Insist: + mes "[Chief Warrick]"; + mes "\"Well, alright. I suppose it can't get worse than it already is."; + mes "Go to the helpers all over the house and ask them what is needed."; + mes "This will show you're hired as a co-helper.\""; + mes "He stabs your chest with his finger and leaves a blinking mark."; + XMASTIME = XMASTIME | $@xmas_helper_bit; + goto L_close; + +L_HelpStatus: + mes "[Chief Warrick]"; + if (@xmas_karma) + mes "\"It seems we're catching up with the tasks to do, thanks to your help.\""; + if (!(@xmas_karma)) + mes "\"I hope you're doing well.\""; + if (@xmas_all_helpers) + mes "\"The helpers are happy for the extra help.\""; + if (!(@xmas_all_helpers)) + mes "\"My workers are so stressed.\""; + if (@xmas_all_lists) + mes "\"I think all the children will be happy this year.\""; + if (!(@xmas_all_lists)) + mes "\"I wonder how this season will turn out.\""; + goto L_close; + +L_Avalia: + mes "\"Wow, this can't be. The Missing Lists. You should go see Avalia right away. She can be found on the other side of the work shop. To the Room to the West of the Nutcracker.\""; + goto L_close; + +L_NoHelp: + mes "[Chief Warrick]"; + mes "\"Hello young one. Welcome to Santa's house.\""; + mes "\"Have a look around and enjoy your visit, but please don't interrupt the busy helpers.\""; + mes "He smiles at you."; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/eljas.txt b/npc/030-2/eljas.txt new file mode 100755 index 00000000..4e9f0d53 --- /dev/null +++ b/npc/030-2/eljas.txt @@ -0,0 +1,206 @@ + +030-2,87,41,0 script Eljas NPC328,5,1,{ + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + if(@getout) end; + goto L_Start; + +L_Start: + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_XmasMain: + if (@xmas_state > $@xmas_list_deliver_state) + goto L_OffSeason; + if (@xmas_list_deliver) + goto L_SeeChief; + if (@xmas_list_complete) + goto L_HaveList1; + if (@xmas_list_both) + goto L_HaveList1; + if (@xmas_list_path1) + goto L_HaveList2; + if (@xmas_list_path2) + goto L_NeedList1; + goto L_NeedList2; + +L_HaveList1: + mes "[Eljas]"; + mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic happen.\""; + next; + mes "\"What brings you here?\""; + next; + mes "..."; + menu + "What were the childrens names again?", L_ListNames, + "Look, I have Santa's List.", L_SantasList, + "I have Santa's List.(follow Orum and his evil deeds)", L_SantasFakeList, + "Christmas?", L_Christmas, + "I am interested in magical research.", L_Research, + "Nothing, I have to go.", L_close; + +L_HaveList2: + mes "Mmmmh he probably won't notice what lists you will bring him (Did you ever notice that he does not move at all?)"; + mes "Haven't you always wondered what happens if you simply cheat?"; + mes "Well ... It's a story as ancient as mankind."; + mes "If you break the rules that are tied to an environment you live in, you are likely to be punished"; + mes "by them. So be careful what you do next, you might regret it..."; + next; + menu + "What were the childrens names again?", L_ListNames, + "Look, I have Santa's List.", L_SantasList, + "I have Santa's List. (replace every wish with \"Christmas would die\" )", L_SantasFakeList, + "Christmas?", L_Christmas, + "I am interested in magical research.", L_Research, + "Nothing, I have to go.", L_close; + +L_NeedList1: + mes "[Eljas]"; + mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\""; + next; + mes "\"So what brings you here my dear?\""; + menu + "Mmh? Nothing, I have to go.", L_close, + "I heard you need help with some Wish lists?", L_Next; + +L_Next: + mes "\"True...\""; + next; + mes "\"It appears we are missing some of the wish list from the children from all over the Mana World.\""; + mes "\"Let me check here...\""; + next; + mes "\"Ah ha, here we go.\""; + mes "\"The missing wish lists are:"; + callfunc "XmasListList"; + mes "\"If you can find these children, please bring their lists back to me.\""; + mes "\"Thank you for helping out!\""; + mes "He looks up from his notes and gives you a broad smile"; + + @xmas_state = $@xmas_list_both_state; + callfunc "XmasSetState"; + goto L_close; + + +L_NeedList2: + mes "[Eljas]"; + mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\""; + next; + mes "\"So what brings you here my dear?\""; + menu + "Do you need any help this year?", L_StartQuest, + "Mmh? Nothing, I have to go.", L_close; + +L_OffSeason: + mes "[Eljas]"; + mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\""; + next; + mes "\"And what brings you here?\""; + menu + "Christmas.", L_Christmas, + "Magical research.", L_Research, + "Och, nothing. I have to go.", L_close; + +L_StartQuest: + mes "\"Why yes! Of course we do!\""; + next; + mes "\"It appears we are missing some of the wish list from the children from all over the Mana World.\""; + mes "\"Let me check here...\""; + next; + mes "\"Ah ha, here we go.\""; + mes "\"The missing wish lists are:"; + callfunc "XmasListList"; + mes "\"If you can find these children, please bring their lists back to me.\""; + mes "\"Thank you for helping out!\""; + mes "He looks up from his notes and gives you a broad smile"; + next; + @xmas_state = $@xmas_list_path1_state; + callfunc "XmasSetState"; + goto L_close; + +L_ListNames: + mes "He checks a piece of paper on his desk..."; + mes "\"Mmh... the missing lists are:"; + callfunc "XmasListList"; + mes "\"If you can find these children, please bring their lists back.\""; + goto L_close; + +L_SantasList: + callfunc "XmasCheckList"; + callfunc "XmasStates"; + if(!(@xmas_list_complete)) + goto L_NotComplete; + mes "\"Awesome! Now please take those lists to Chief Warrick on the next floor.\""; + @karma_bonus = @xmas_list_count; + callfunc "XmasNice"; + @xmas_state = $@xmas_list_deliver_state; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_close; + +L_SantasFakeList: + callfunc "XmasCheckList"; + callfunc "XmasStates"; + if(!(@xmas_list_complete)) + goto L_NotComplete; + mes "\"Wait a second... whats that aura...\""; + mes "\"THESE ARE NOT THE REAL LISTS!\""; + mes "\"Guards! Toss this naughty one outside!\""; + next; + @karma_bonus = @xmas_list_count; + callfunc "XmasNaughty"; + callfunc "XmasSetSide"; + callfunc "XmasThrowOut"; + @xmas_state = $@xmas_list_deliver_state; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_NotWelcome; + +L_NotComplete: + mes "\"Hrmm... Even I can tell that you did not bring all the lists we are missing.\""; + goto L_ListNames; + +L_SeeChief: + mes "\"Please take those lists to Chief Warrick on the next floor.\""; + goto L_close; + +L_Christmas: + mes "\"All year round we work hard to make toys and repair our help for each years event.\""; + mes "\"Ask Chief Warrick on the next floor, He is the shop foreman, people are always looking to him to find extra help.\""; + next; + goto L_close; + +L_Research: + mes "\"Well, the most astonishing discovery in our recent researches is a complex combination of Transmutation, Astral and Nature Magic to animate wooden figurines.\""; + mes "\"Did you notice the Guards around the house? Originally those were simple nutcrackers, carved out of wood by our talented carpenters.\""; + next; + mes "\"With the results of our magic researches, we were able to transform them into animated beings, acting rudimentary self-determined and capable to perform simple tasks.\""; + mes "\"At the moment we can keep them animated for an unlimited time, as long as the caster stays in range.\""; + next; + mes "\"If you want to learn more about the magic used speak with Avalia she is on the 4th floor in her private room.\""; + next; + goto L_close; + +L_NotWelcome: + mes "... You hear a voice calling your name ... "; + mes "[Orum's Homunculus]"; + mes "\"Come See me in the caves below.\""; + mes "\"go south till you reach the snoman. Then head into the cave to the east.\""; + warp "020-1",33,94; + close; + +L_close: + mes"\"Goodbye\""; + close; + +L_End: + end; + +OnTouch: + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + if(@getout) end; + if((@xmas_list_gather) || !($@xmas_time)) + goto L_End; + goto L_Start; +} diff --git a/npc/030-2/empty_boxes_helper.txt b/npc/030-2/empty_boxes_helper.txt new file mode 100755 index 00000000..d1ae18b0 --- /dev/null +++ b/npc/030-2/empty_boxes_helper.txt @@ -0,0 +1,63 @@ + +030-2,140,41,0 script Urmas NPC328,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Urmas]"; + mes "\"It's nice to not need to find logs in such a hurry. I always seem to have problems every year.\""; + goto L_close; + +L_XmasMain: + if (@xmas_helper_bit) goto L_Helping; + + mes "[Urmas]"; + mes "\"Don't stand in the way! We have some serious problems here.\""; + goto L_close; + +L_Helping: + mes "[Urmas]"; + mes "\"Ah, I see you're one of the seasonal helpers. Ok, listen to me."; + mes "\"We have a shortage on the empty present boxes. Don't ask me how that can happen!"; + mes "Those paper-shufflers up there probably messed up the ordering or something. Pah.\""; + next; + mes "\"However, we need to fix it. I have only a few boxes left."; + mes "Bring me some wood, so I can make new boxes out of it."; + mes $@xmas_log_amount + " Raw Logs will do for one box.\""; + mes ""; + if (countitem("RawLog") < $@xmas_log_amount) + mes "\"But I see you do not have enough with you anyway. Come back with some material please.\""; + if (countitem("RawLog") < $@xmas_log_amount) goto L_close; + next; + mes "\"How many boxes do you need?\""; + input @Amount; + if (@Amount <= 0) + goto L_close; + if (countitem("RawLog") < (@Amount * $@xmas_log_amount)) + goto L_NoItems; + getinventorylist; + if (@inventorylist_count > 100) + goto L_FullInv; + delitem "RawLog", (@Amount * $@xmas_log_amount); + mes "[Urmas]"; + mes "\"Alright! Good job, kid. I'll start to make some more boxes now."; + mes "Here, take this in the meanwhile and put some toys in it.\""; + getitem "OpenPresentBox", @Amount; + goto L_close; + +L_FullInv: + mes "\"You need some space to put the empty boxes.\""; + goto L_close; + +L_NoItems: + mes "[Urmas]"; + mes "\"Eh? Are you kidding?\""; + goto L_close; + +L_close: + @Amount = 0; + close; +} diff --git a/npc/030-2/glitter_helper.txt b/npc/030-2/glitter_helper.txt new file mode 100755 index 00000000..a36ad93e --- /dev/null +++ b/npc/030-2/glitter_helper.txt @@ -0,0 +1,94 @@ + +030-2,31,81,0 script Veneri NPC328,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Veneri]"; + mes "\"I should take this time off to go see the doctor in Hurnscald about whether or not I have glitter lung.\""; + goto L_close; + +L_XmasMain: + if (XMASTIME & $@xmas_helper_bit_glitter_ends) goto L_Done; + if (XMASTIME & $@xmas_helper_bit_glitter_starts) goto L_Powder; + if (@xmas_helper_bit) goto L_Helping; + + mes "[Veneri]"; + mes "\"Mh? Excuse me, I'm very busy right now.\""; + goto L_close; + +L_Helping: + mes "[Veneri]"; + mes "\"Hello. We have some problems here. Something went wrong with the shipment of the ingredients for our decoration glitter."; + mes "Would you be so kind and get me " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders?\""; + next; + mes "[Veneri]"; + mes "\"This material has proven to have the quality we need to make our christmas magic last until it can sparkle under every christmas tree. Sadly we made some bad experience in the past. Please make sure you only bring class A powders.\""; + XMASTIME = XMASTIME | $@xmas_helper_bit_glitter_starts; + goto L_close; + +L_Powder: + mes "[Veneri]"; + mes "\"Welcome back. Do you have the " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders needed for the decoration glitter?\""; + if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount) && (countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount)) + menu + "Yeah, here it is. (Give the gem powders.)",L_GemPowders, + "Sure, here you go. (Give the fake powders.)",L_FakePowders, + "No, I am still working on that.",L_close; + if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount)) + menu + "Yeah, here it is. (Give the gem powders.)",L_GemPowders, + "No, I am still working on that.",L_close; + if ((countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount)) + menu + "Sure, here it is. (Give the fake powders.)",L_FakePowders, + "No, I am still working on that.",L_close; + goto L_close; + +L_GemPowders: + if ((countitem("RubyPowder") < $@xmas_red_amount) || (countitem("TopazPowder") < $@xmas_yellow_amount)) + goto L_NoItems; + delitem "RubyPowder", $@xmas_red_amount; + delitem "TopazPowder", $@xmas_yellow_amount; + XMASTIME = XMASTIME | $@xmas_helper_bit_glitter_ends; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNice"; + callfunc "XmasXpReward"; + mes "[Veneri]"; + mes "\"Excellent! Thank you very much.\""; + goto L_close; + +L_FakePowders: + if ((countitem("RedPowder") < $@xmas_red_amount) || (countitem("YellowPowder") < $@xmas_yellow_amount)) + goto L_NoItems; + delitem "RedPowder", $@xmas_red_amount; + delitem "YellowPowder", $@xmas_yellow_amount; + XMASTIME = XMASTIME | $@xmas_helper_bit_glitter_ends; + XMASTIME = XMASTIME &~ $@xmas_helper_bit_glitter_starts; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNaughty"; + callfunc "XmasXpReward"; + mes "It seems like he didn't notice that the powder you gave him is bogus."; + mes "[Veneri]"; + mes "\"Excellent! Thank you very much.\""; + goto L_close; + +L_Done: + mes "[Veneri]"; + if (!(@xmas_helper_glitter)) + mes "\"Even after your help, the powder still isn't working right. Maybe it got wet.\""; + if (@xmas_helper_glitter) + mes "\"Thanks for bringing the powders.\""; + goto L_close; + +L_NoItems: + mes "[Veneri]"; + mes "\"Eh? Are you kidding?\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/guards.txt b/npc/030-2/guards.txt new file mode 100755 index 00000000..5af88c59 --- /dev/null +++ b/npc/030-2/guards.txt @@ -0,0 +1,32 @@ + +030-2,85,43,0 script Valjas NPC330,{ + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + if(@getout) end; + mes "[Valjas]"; + mes "\"...\""; + close; +} + +030-2,89,43,0 script Halas NPC330,{ + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + if(@getout) end; + mes "[Halas]"; + mes "\"...\""; + close; +} + +030-2,89,84,0 script Kilis NPC330,5,2,{ + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + if(@getout) end; + mes "[Kilis]"; + mes "\"...\""; + close; + +OnTouch: + callfunc "XmasStates"; + callfunc "ThrowOutTheBum"; + end; +} diff --git a/npc/030-2/mapflags.txt b/npc/030-2/mapflags.txt new file mode 100755 index 00000000..7b6f3979 --- /dev/null +++ b/npc/030-2/mapflags.txt @@ -0,0 +1 @@ +//030-2 mapflag resave 020-1,52,118 diff --git a/npc/030-2/present_helper.txt b/npc/030-2/present_helper.txt new file mode 100755 index 00000000..ef9e1c14 --- /dev/null +++ b/npc/030-2/present_helper.txt @@ -0,0 +1,82 @@ + +030-2,47,82,0 script Jonathan NPC328,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Jonathan]"; + mes "\"Hello! Welcome to the reclamation department.\""; + mes "\"Lucky all the presents stolen have been replaced. Save any you find. You never know what we will need to replace next year.\""; + goto L_close; + +L_XmasMain: + mes "[Jonathan]"; + mes "\"Hello! Welcome to the reclamation department.\""; + + if(@xmas_helper_bit) goto L_Helping; + + mes "\"We are incredibly busy right now, monsters have stolen some of our presents.\""; + mes "\"I must go inform Chief Warrick immediately.\""; + goto L_close; + +L_Helping: + mes "\"Here we take back any presents stolen from us by those nasty creatures.\""; + next; + goto L_Main; + +L_Main: + mes "\"Did you find any presents you would like to return?\""; + next; + menu + "No, I just wanted to say hello.",L_close, + $@xmas_present_amount + " Purple present boxes.",L_Purple, + $@xmas_present_amount + " Blue present boxes.",L_Blue, + $@xmas_present_amount + " Green present boxes.",L_Green, + $@xmas_present_amount + " Yellow present boxes.",L_Yellow, + $@xmas_present_amount + " White present boxes.",L_White; + +L_Purple: + @karma_bonus = $@xmas_karma_bonus; + @present_name$ = "PurplePresentBox"; + goto L_RewardIncrease; + +L_Blue: + @karma_bonus = $@xmas_karma_bonus; + @present_name$ = "BluePresentBox"; + goto L_RewardIncrease; + +L_Green: + @karma_bonus = $@xmas_karma_bonus; + @present_name$ = "GreenPresentBox"; + goto L_RewardIncrease; + +L_Yellow: + @karma_bonus = 2; + @present_name$ = "YellowPresentBox"; + goto L_RewardIncrease; + +L_White: + @karma_bonus = 2; + @present_name$ = "WhitePresentBox"; + goto L_RewardIncrease; + +L_RewardIncrease: + if ($@xmas_present_amount > countitem(@present_name$)) + goto L_NotEnough; + mes "\"Oh, thank you!\""; + delitem @present_name$, $@xmas_present_amount; + callfunc "XmasNice"; + goto L_close; + +L_NotEnough: + mes "\"I am sorry, but you don't have enough presents to return.\""; + goto L_Main; + +L_close: + mes "\"See You later!\""; + @present_name$ = ""; + close; +} diff --git a/npc/030-2/roasted_acorns_helper.txt b/npc/030-2/roasted_acorns_helper.txt new file mode 100755 index 00000000..76d633fc --- /dev/null +++ b/npc/030-2/roasted_acorns_helper.txt @@ -0,0 +1,73 @@ + +030-2,89,23,0 script Verneri NPC334,{ + callfunc "XmasStates"; + + if((@xmas_state >= $@xmas_helpers_start_state) && ($@xmas_time)) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Verneri]"; + mes "\"Nothing like the getting past the holiday rush to make you dread next season.\""; + goto L_close; + +L_XmasMain: + mes "[Verneri]"; + mes "\"Hm? I'm currently having a break. It's really nice here at the fireplace, isn't it?\""; + next; + mes "\"Ah, I remember when I was a child we used to roast acorns at the fireplace. We dunked them into Iron Potion and then put them over the fire for a while. That gave a tasty icing.\""; + menu + "Let's roast some.", L_LetsRoast, + "Children's stuff...", L_close; + +L_LetsRoast: + mes "[Verneri]"; + mes "\"Well, if you get some Acorns and Iron Potions, we can do that.\""; + mes "\"With one Iron Potion we can ice about " + $@xmas_acorn_amount + " Acorns.\""; + next; + mes "[Verneri]"; + mes "\"Do you have everything we need? Shall we start?\""; + menu + "Sure!", L_Roast, + "I need to get the ingredients.", L_close; + +L_Roast: + if (countitem("Acorn") < $@xmas_acorn_amount || countitem("IronPotion") < $@xmas_iron_potion_amount) + goto L_NoItems; + + getinventorylist; + if (@inventorylist_count > 100) + goto L_FullInv; + delitem "IronPotion", $@xmas_iron_potion_amount; + delitem "Acorn", $@xmas_acorn_amount; + + mes "Verneri takes the Iron Potion and the Acorns from you. He pours the potion into some bowl and adds the Acorns."; + mes "Then he puts the bowl over the fire, stirring it every now and then. After a while it starts to smell really tasty."; + next; + mes "[Verneri]"; + mes "\"Here we are! Let me take one of them, ok?\""; + mes "He carefully takes one of the roasted acorns and eats it."; + next; + + mes "[Verneri]"; + mes "\"Ouch, hot. But tasty! Some of them might be burnt, I'll throw those away.\""; + XMASTIME = XMASTIME | $@xmas_helper_bit_acorns; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNice"; + getitem "RoastedAcorn", rand(($@xmas_acorn_amount / 2), $@xmas_acorn_amount); + menu + "Let's roast some more.", L_Roast, + "Thank you.", L_close; + +L_FullInv: + mes "\"You need some space to put the roasted acorns.\""; + goto L_close; + +L_NoItems: + mes "[Verneri]"; + mes "\"You need to bring at least one Iron Potion and " + $@xmas_acorn_amount + " Acorns.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/shipping_helper.txt b/npc/030-2/shipping_helper.txt new file mode 100755 index 00000000..eca40b81 --- /dev/null +++ b/npc/030-2/shipping_helper.txt @@ -0,0 +1,113 @@ + +030-2,30,88,0 script Mo NPC328,{ + $@npc_name$ = "Mo"; + callfunc "helpersPacking"; + close; +} + +030-2,33,88,0 script Lorrie NPC329,{ + $@npc_name$ = "Lorrie"; + callfunc "helpersPacking"; + close; +} + +030-2,37,88,0 script Curlee NPC329,{ + $@npc_name$ = "Curlee"; + callfunc "helpersPacking"; + close; +} + +function script helpersPacking { + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[" + $@npc_name$ + "]"; + mes "\"Boy it sure is grand to goof off all day with no presents to wrap.\""; + goto L_close; + +L_XmasMain: + mes "[" + $@npc_name$ + "]"; + mes "Hello, hello, hello!"; + + if(@xmas_helper_bit) goto L_Helping; + + mes "\"Real busy now, gotta go or the boss will have my head. Back to work knuckleheads!\""; + goto L_close; + +L_Helping: + mes "\"I am " + $@npc_name$ + ". We are in charge of getting all the presents together, but we messed up and now all our supplies are ruined. Can you help us out?\""; + mes "\"We need wrapping paper and empty boxes! We can provide the gifts!\""; + next; + goto L_Main; + +L_Main: + mes "\"Do you have any supplies we can use?\""; + next; + menu + "What? err... I just wanted to say hello.",L_close, + "Purple Wrapping Paper and an empty box.",L_Purple, + "Blue Wrapping Paper and an empty box.",L_Blue, + "Green Wrapping Paper and an empty box.",L_Green, + "Yellow Wrapping Paper and an empty box.",L_Yellow, + "White Wrapping Paper and an empty box.",L_White; + +L_Purple: + @wrap$ = "PurpleWrap"; + @present_name$ = "PurplePresentBox"; + goto L_Gift; + +L_Blue: + @wrap$ = "BlueWrap"; + @present_name$ = "BluePresentBox"; + goto L_Gift; + +L_Green: + @wrap$ = "GreenWrap"; + @present_name$ = "GreenPresentBox"; + goto L_Gift; + +L_Yellow: + @wrap$ = "YellowWrap"; + @present_name$ = "YellowPresentBox"; + goto L_Gift; + +L_White: + @wrap$ = "WhiteWrap"; + @present_name$ = "WhitePresentBox"; + goto L_Gift; + +L_Gift: + if ($@xmas_wrap_amount > countitem(@wrap$)) + goto L_NotEnough; + if ($@xmas_empty_box_amount > countitem("OpenPresentBox")) + goto L_NotEnough; + getinventorylist; + if ((@inventorylist_count == 100) || (checkweight(@present_name$, $@xmas_wrap_reward) == 0)) + goto L_FullInv; + delitem "OpenPresentBox", $@xmas_empty_box_amount; + delitem @wrap$, $@xmas_wrap_amount; + getitem @present_name$, $@xmas_ship_present_amount; + goto L_Give; + +L_Give: + mes "\"Ok, here is the present. Make sure to drop these off at the warehouse.\""; + goto L_Main; + +L_NotEnough: + mes "\"O wiseguy, huh? Why don't you come back when you got all the supplies you knucklehead.\""; + goto L_Main; + +L_FullInv: + mes "\"Where you going to put this? In your ear? Come back when you have more space in your inventory.\""; + goto L_Main; + +L_close: + mes "\"Ok, back to work you two, we have to make up lost time for your antics.\""; + @wrap$ = ""; + @present_name$ = ""; + return; +} diff --git a/npc/030-2/storage_helper.txt b/npc/030-2/storage_helper.txt new file mode 100755 index 00000000..94aa5bc5 --- /dev/null +++ b/npc/030-2/storage_helper.txt @@ -0,0 +1,104 @@ + +030-2,25,35,0 script Vellamo NPC328,{ + @halloween_npc_id = $@halloween_npc_vellamo; + callfunc "TrickOrTreat"; + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Vellamo]"; + mes "\"Candy Stock is built back up. Though... the more we store the more they want...\""; + goto L_close; + +L_XmasMain: + if (XMASTIME & $@xmas_helper_bit_storage) goto L_Candy; + if (@xmas_helper_bit) goto L_Helping; + + mes "[Vellamo]"; + mes "\"Sorry, too busy to chat right now. The chief has got me working overtime for the holidays.\""; + close; + +L_Helping: + mes "[Vellamo]"; + mes "\"Oh, hello. Visitors usually don't come down here in the basement. Here we store several things, materials for the presents, the finished presents, supplies.\""; + menu + "Nice. I have to go.", L_close, + "Do you need help with anything?", L_Next; + +L_Next: + mes "[Vellamo]"; + mes "\"Oh? You want to help us? Actually, there is one thing you could do. Did you see those weird slimes out there on the snow fields? Argh, I hate those creatures, last year they invaded the entire basement...\""; + next; + mes "\"However, this year they tried again, but I was able to hold them off. They just managed to devour most of our candy supplies.\""; + next; + mes "\"So in case you find some of the Candies, feel free to bring them back. Ismo will give you some reward for them.\""; + XMASTIME = XMASTIME | ($@xmas_helper_bit_storage); + goto L_close; + +L_Candy: + mes "[Vellamo]"; + mes "\"Ah, welcome back. When you have found some of the candy, please give it to Ismo.\""; + goto L_close; + +L_close: + close; +} + +030-2,33,29,0 script Ismo NPC329,{ + callfunc "XmasStates"; + + if(($@xmas_time) && (XMASTIME & $@xmas_helper_bit_storage)) + goto L_Helping; + goto L_OffSeason; + +L_OffSeason: + mes "[Ismo]"; + mes "\"Hello. I'm helping Vellamo. He's the storage administrator.\""; + goto L_close; + +L_Helping: + mes "[Ismo]"; + mes "\"Did you get back some candy from the slimes?\""; + next; + menu + "Give " + $@xmas_good_friendly_name$, L_GoodCandy, + "Give " + $@xmas_bad_friendly_name$ + "(What? how mean!).", L_BadCandy; + +L_BadCandy: + @dq_level = $@xmas_bad_level; + @dq_cost = $@xmas_bad_cost; + @dq_count = $@xmas_bad_count; + @dq_name$ = $@xmas_bad_name$; + @dq_friendly_name$ = $@xmas_bad_friendly_name$; + @dq_money = $@xmas_bad_money; + @dq_exp = $@xmas_bad_exp; + + callfunc "DailyQuest"; + if (countitem(@dq_name$) < @dq_count) + goto L_close; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNaughty"; + goto L_close; + +L_GoodCandy: + @dq_level = $@xmas_good_level; + @dq_cost = $@xmas_good_cost; + @dq_count = $@xmas_good_count; + @dq_name$ = $@xmas_good_name$; + @dq_friendly_name$ = $@xmas_good_friendly_name$; + @dq_money = $@xmas_good_money; + @dq_exp = $@xmas_good_exp; + + callfunc "DailyQuest"; + if (countitem(@dq_name$) < @dq_count) + goto L_close; + @karma_bonus = $@xmas_karma_bonus; + callfunc "XmasNice"; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-2/wrapping_paper_helper.txt b/npc/030-2/wrapping_paper_helper.txt new file mode 100755 index 00000000..1350cd3c --- /dev/null +++ b/npc/030-2/wrapping_paper_helper.txt @@ -0,0 +1,139 @@ + +030-2,140,31,0 script Reino NPC328,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "[Reino]"; + mes "\"Hrmm... I forgot what the real color of my hand was... \""; + goto L_close; + +L_XmasMain: + if (@xmas_helper_bit) goto L_Helping; + + mes "[Reino]"; + mes "\"Excuse me, but please don't interrupt. We're all very busy.\""; + goto L_close; + +L_Helping: + mes "[Reino]"; + mes "\"Oh, I see you're here to help. Maybe you can assist me with a problem we have."; + mes "We're nearly out of wrapping paper for the present boxes."; + mes "That's very very bad. Can you imagine how it would look if the presents didn't have wrapping paper?\""; + next; + mes "\"So, eh, I can only give you some of the remaining wrapping paper if you bring me the needed material to make new wrapping paper."; + mes "For making one roll of wrapping paper, I need " + $@xmas_reed_amount + " Reed Bundles, " + $@xmas_water_amount + " Bottle of Water and some dye to make it colored.\""; + next; + goto L_Again; + +L_Again: + mes "\"Let's see... These are the regulations for wrapping paper colors and designs for this year. Tell me which you want.\""; + mes "He shows you an official looking piece of paper."; + menu + "White dotted (" + $@xmas_poa_amount +" Piles of Ash)", L_White, + "Yellow dotted (" + $@xmas_wrap_yellow_amount + " Yellow Dyes)", L_Yellow, + "Blue dotted (" + $@xmas_wrap_ltblue_amount + " Light Blue Dyes)", L_Blue, + "Purple striped (" + $@xmas_wrap_purple_amount + " Purple Dye)", L_Purple, + "Green (" + $@xmas_wrap_green_amount + " Green Dye)", L_Green, + "Why do you have a regulation for wrapping papers?!", L_Regulation, + "I'm on my way.",L_close; + +L_White: +getinventorylist; + if (@inventorylist_count == 100 || (checkweight("WhiteWrap", $@xmas_wrap_reward) == 0)) + goto L_FullInv; + if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PileOfAsh") < $@xmas_poa_amount)) + goto L_NoItems; + delitem "ReedBundle", $@xmas_reed_amount; + delitem "BottleOfWater", $@xmas_water_amount; + delitem "PileOfAsh", $@xmas_poa_amount; + getitem "WhiteWrap", $@xmas_wrap_reward; + mes "[Reino]"; + mes "\"This one is classical.\""; + goto L_MadePaper; + +L_Yellow: + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("YellowWrap", $@xmas_wrap_reward) == 0)) + goto L_FullInv; + if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("YellowDye") < $@xmas_wrap_yellow_amount)) + goto L_NoItems; + delitem "ReedBundle", $@xmas_reed_amount; + delitem "BottleOfWater", $@xmas_water_amount; + delitem "YellowDye", $@xmas_wrap_yellow_amount; + getitem "YellowWrap", $@xmas_wrap_reward; + mes "[Reino]"; + mes "\"Right, bright paper brings good vibes.\""; + goto L_MadePaper; + +L_Blue: + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("BlueWrap", $@xmas_wrap_reward) == 0)) + goto L_FullInv; + if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("LightBlueDye") < $@xmas_wrap_ltblue_amount)) + goto L_NoItems; + delitem "ReedBundle", $@xmas_reed_amount; + delitem "BottleOfWater", $@xmas_water_amount; + delitem "LightBlueDye", $@xmas_wrap_ltblue_amount; + getitem "BlueWrap", $@xmas_wrap_reward; + mes "[Reino]"; + mes "\"Plain and simple. Here.\""; + goto L_MadePaper; + +L_Purple: + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("PurpleWrap", $@xmas_wrap_reward) == 0)) + goto L_FullInv; + if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PurpleDye") < $@xmas_wrap_purple_amount)) + goto L_NoItems; + delitem "ReedBundle", $@xmas_reed_amount; + delitem "BottleOfWater", $@xmas_water_amount; + delitem "PurpleDye", $@xmas_wrap_purple_amount; + getitem "PurpleWrap", $@xmas_wrap_reward; + mes "[Reino]"; + mes "\"Mh, personally I don't like it that much, but here you go.\""; + goto L_MadePaper; + +L_Green: + getinventorylist; + if (@inventorylist_count == 100 || (checkweight("GreenWrap", $@xmas_wrap_reward) == 0)) + goto L_FullInv; + if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("GreenDye") < $@xmas_wrap_green_amount)) + goto L_NoItems; + delitem "ReedBundle", $@xmas_reed_amount; + delitem "BottleOfWater", $@xmas_water_amount; + delitem "GreenDye", $@xmas_wrap_green_amount; + getitem "GreenWrap", $@xmas_wrap_reward; + mes "[Reino]"; + mes "\"Yeah, this is really Christmas-styled.\""; + goto L_MadePaper; + +L_MadePaper: + next; + mes "\"Do you need more wrapping paper?\""; + menu + "Yes.",L_Again, + "No, I have all I need.",L_close; + +L_Regulation: + mes "Reino seems irritated."; + mes "[Reino]"; + mes "\"Well, because, ah - there would be total chaos without regulations!"; + mes "You know, this Christmas business requires a lot of coordination. Things have to be well-ordered.\""; + goto L_close; + +L_FullInv: + mes "\"You need some space to put the wrapping paper.\""; + goto L_close; + +L_NoItems: + mes "[Reino]"; + mes "\"Oh? It seems you don't have the required items.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-3/_import.txt b/npc/030-3/_import.txt new file mode 100644 index 00000000..566bef5f --- /dev/null +++ b/npc/030-3/_import.txt @@ -0,0 +1,5 @@ +// Map 030-3: The Frozen Lake +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/030-3/_warps.txt", +"npc/030-3/mapflags.txt", +"npc/030-3/orum_homunculus.txt", diff --git a/npc/030-3/_warps.txt b/npc/030-3/_warps.txt new file mode 100644 index 00000000..8efcfcef --- /dev/null +++ b/npc/030-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 030-3: The Frozen Lake warps +030-3,54,69,0 warp #030-3_54_69 0,0,019-3,80,102 diff --git a/npc/030-3/mapflags.txt b/npc/030-3/mapflags.txt new file mode 100755 index 00000000..09034f05 --- /dev/null +++ b/npc/030-3/mapflags.txt @@ -0,0 +1 @@ +//030-3 mapflag resave 020-1,52,118 diff --git a/npc/030-3/orum_homunculus.txt b/npc/030-3/orum_homunculus.txt new file mode 100755 index 00000000..a9e83da7 --- /dev/null +++ b/npc/030-3/orum_homunculus.txt @@ -0,0 +1,466 @@ + +019-3,79,30,0 script #OrumTelepathy1 NPC127,3,3,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Not that way!\""; + mes "\"Use the southernmost exit.\""; + close; + +L_End: + end; +} + +019-3,104,67,0 script #OrumTelepathy2 NPC127,1,1,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"That is the long way!\""; + mes "\"Just go south from here to the southernmost exit.\""; + close; + +L_End: + end; +} + +019-3,102,95,0 script #OrumTelepathy3 NPC127,3,3,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Ok. You are getting closer, I can feel it!\""; + mes "\"You are heading in the right direction - to the southern most exit.\""; + close; + +L_End: + end; +} + +019-3,81,61,0 script #OrumTelepathy4 NPC127,3,3,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Ok, you are getting closer, I can feel it.!\""; + mes "\"Go take the south west path towards the brazier.\""; + close; + +L_End: + end; +} + +030-3,49,53,0 script #OrumTelepathy5 NPC127,1,1,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Wrong way!\""; + mes "\"I am in the northeastern corner.\""; + close; + +L_End: + end; +} + +030-3,48,73,0 script #OrumTelepathy6 NPC127,1,1,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Wrong Way!\""; + mes "\"I am in the northeastern corner.\""; + close; + +L_End: + end; +} + +030-3,95,66,0 script #OrumTelepathy7 NPC127,1,1,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_End; + +L_XmasMain: + if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route)) + goto L_Telepathy; + goto L_End; + +L_Telepathy: + mes "[Orum's Homunculus]"; + mes "\"Wrong Way!\""; + mes "\"I am in the northeastern corner.\""; + close; + +L_End: + end; +} + +030-3,100,49,0 script Orum's Homunculus NPC385,{ + callfunc "XmasStates"; + + if($@xmas_time) + goto L_XmasMain; + goto L_OffSeason; + +L_OffSeason: + mes "Orums Homunculus looks up, inspects you briefly, and looks away again."; + end; + +L_XmasMain: + if(!(@xmas_knows_route)) goto L_SetPath; + if((@xmas_list_deliver) && !(@xmas_side)) goto L_OffSeason; + if((@xmas_reward_done_state) && (@xmas_side)) goto L_ThankYou; + if((@xmas_reward1_done_state) && (@xmas_side)) goto L_Thanks; + if((@xmas_reward2_done_state) && (@xmas_side)) goto L_Reward; + if((@xmas_reward_start_state) && (@xmas_side)) goto L_Reward; + if((@xmas_boss_door_state) && (@xmas_side)) goto L_Quick; + if((@xmas_reagent_done_state) && (@xmas_side)) goto L_PowerReagents; + if((@xmas_reagent_start_state) && (@xmas_side)) goto L_PowerReagents; + if((@xmas_helper_done_state) && (@xmas_side)) goto L_HelperQuest; + if((@xmas_helper_start_state) && (@xmas_side)) goto L_HelperQuest; + if(@xmas_list_deliver) goto L_ListReturn; + if(@xmas_list_complete) goto L_SantasList; + if(@xmas_list_both) goto L_HaveList2; + if(@xmas_list_path1) goto L_QuestStart1; + if(@xmas_list_path2) goto L_HaveList2; + if($@xmas_time) goto L_QuestStart2; + goto L_OffSeason; + +L_SetPath: + @xmas_knows_route = 1; + callfunc "XmasSetRoute"; + goto L_XmasMain; + +L_QuestStart1: + mes "[Orum's Homunculus]"; + mes "\"Greetings traveler, Do you have any time to help me out?\""; + menu + "No. I really have to go.", L_close, + "Sure, I'm listening.", L_Next; + +L_Next: + mes "\"Good. You may have heard that some of the children's wish lists are missing.\""; + mes "\"I sent a courier out to get their lists, but they have yet to return.\""; + next; + mes "\"Let's see the following children's lists are still missing:\""; + callfunc "XmasListList"; + mes "\"Would you please go and take a look what happened to them? If you can get hold of a list, report back. We surely know how to \"amend\" these things properly...\""; + @xmas_state = $@xmas_list_both_state; + callfunc "XmasSetState"; + goto L_close; + +L_QuestStart2: + mes "[Orum's Homunculus]"; + mes "\"Greetings traveler, Do you have any time to help me out?\""; + menu + "No. I really have to go.", L_close, + "Sure, I'm listening.", L_KeepGoing; + +L_KeepGoing: + mes "\"Good. You may have heard that some of the children's wish lists are missing.\""; + mes "\"I sent a courier out to get their lists, but they have yet to return.\""; + next; + mes "\"Let's see the following children's lists are missing:\""; + callfunc "XmasListList"; + mes "\"Would you please go and take a look what happened to them? If you get a list, report back.\""; + @xmas_state = $@xmas_list_path2_state; + callfunc "XmasSetState"; + goto L_close; + +L_HaveList2: + mes "[Orum's Homunculus]"; + mes "\"Have you got the missing lists?\""; + menu + "What were those names again?", L_ListNames, + "Yes.", L_SantasList, + "No.", L_close; + +L_ListNames: + mes "\"The missing children's names are;\""; + callfunc "XmasListList"; + mes "\"Go now, and come back when you have the lists.\""; + goto L_close; + +L_NotComplete: + mes "\"This doesn't seem like enough names to work with. Come back when you have more.\""; + goto L_close; + +L_SantasList: + callfunc "XmasCheckList"; + callfunc "XmasStates"; + if(!(@xmas_list_complete)) + goto L_NotComplete; + mes "\"Take the altered list to Elijas.\""; + menu + "I don't know, this sounds kind of naughty.", L_Foo; + +L_Foo: + mes "\"Do my bidding or I'll have no more words with you.\""; + goto L_close; + +L_ListReturn: + mes "[Orum's Homunculus]"; + mes "\"This had better be important, I've got enough to worry about.\""; + menu + "Sorry for interrupting, but I've come down here because I delivered the fake list", L_FakeList; + +L_FakeList: + mes "he stares blankly at you for a bit... "; + next; + mes "\"MUHAHAHAHAHAHAA!!\""; + next; + mes "\"I see. Mighty naughty, I bet they tossed you out?\""; + mes "\"I was wondering if you would have any interest in continuing to do so?\""; + mes "\"I do have the power to reward you handsomely for your naughtiness.\""; + next; + mes "\"You see the Christmas Inn and it's insufferable happiness and joy they spread makes dark magic users sick.\""; + mes "\"Well this year I struck back. I managed to make it inside and snatch their mana battery that powers their precious nutcrackers. Then ruin their back stock with the nutcrackers powered down.\""; + next; + mes "\"The sages showed up and had me tossed out. It seems like they also created some kind of barrier to toss our kind, saying those of a truely evil heart, out.\""; + mes "\"They may have blocked my aura, but surely didn't crush my spirit. Mainly because those fools didn't discover the portal I created into the Inn's basement.\""; + next; + mes "\"Muhahahaha\""; + next; + mes "\"I have more plans for both later. First, we need to slow the Christmas Inn down.\""; + mes "\"We can't let them free time to fix their problems. We need to press our advantage.\""; + next; + mes "\"I will need you to gather some items for me. They are required to make the helpers job a living hell.\""; + next; + mes "\"Lets see... To replace the glitter I need you to get me " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\""; + mes "\"Bring them here and I can instruct you how to mix them into fake glitter, a powder that will make them believe they have what they need but really they don't. It will loose it's shine before it arrives. They are way to self absorbed to notice the difference. And even if they notice... It will be too late!\""; + next; + mes "He bursts into a devilish laughter..."; + next; + mes "\"mmh... To replace the packing material we also need to get some Cotton Cloth.\""; + mes "He makes a strange frown and clenches his teeth. It seems like he is talking to himself, not to you."; + mes "\"Yes... That will rattle of few cages, when the presents rattle and the gifts break.\""; + next; + mes "\"You can also give them " + $@xmas_bad_friendly_name$ + " for their candy storage.\""; + mes "\"Be assured my minion that will take a good bite out of their holiday cheer.\""; + next; + mes "\"Excellent.\""; + mes "\"Now listen:\""; + next; + mes "\"So far my basement portal has remained undetected:"; + mes "Head to the west in this cave to find it.\""; + mes "\"Once there smash your fist into the small crack and you will be teleported into the basement of the inn.\""; + mes "\"Let me fake the mark Chief Warrick uses to identify his helpers. Don't get to close to the guards they might spot you.\""; + mes "\"Now, prove yourself, gather the required items and go back to the Inn to sabotage Santa's Helpers.\""; + callfunc "XmasSetSide"; + XMASTIME = XMASTIME | $@xmas_helper_bit; + XMASTIME = XMASTIME | $@xmas_basement_passage; + @xmas_state = $@xmas_helpers_start_state; + callfunc "XmasSetState"; + goto L_close; + +L_HelperQuest: + mes "[Orum's Homunculus]"; + mes "\"Welcome back!\""; + mes "\"How is the sabotage coming along?\""; + menu + "What is this all about again?", L_HelpHelpers, + "They keep throwing me out.", L_HelpPassage, + "I need some powders made.", L_MakePowders, + "It's a mess.", L_Continue, + "I'd better break some things.", L_close; + +L_HelpHelpers: + mes "\"I will need you to gather some items for me. They are required to make the helpers job a living hell.\""; + next; + mes "\"Lets see... To replace the glitter I need you to get me " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\""; + mes "\"Bring them here and I can instruct you how to mix them into fake glitter, a powder that will make them believe they have what they need but really they don't. It will loose it's shine before it arrives. They are way to self absorbed to notice the difference. And even if they notice... It will be too late!\""; + next; + mes "He bursts into a devilish laughter..."; + next; + mes "\"mmh... To replace the packing material we also need to get some Cotton Cloth.\""; + mes "He makes a strange frown and clenches his teeth. It seems like he is talking to himself, not to you."; + mes "\"Yes... That will rattle of few cages, when the presents rattle and the gifts break.\""; + next; + mes "\"You can also give them " + $@xmas_bad_friendly_name$ + " for their candy storage.\""; + mes "\"Be assured my minion that will take a good bite out of their holiday cheer.\""; + next; + goto L_HelperQuest; + +L_HelpPassage: + mes "\"As I told you, I installed a passage to the Inn's basement:"; + mes "Head to the west in this cave to find it.\""; + mes "\"Once there, smash your fist into the small crack and you will be teleported into the basement of the inn.\""; + goto L_close; + +L_MakePowders: + callfunc "BadPowderMake"; + goto L_close; + +L_Continue: + callfunc "XmasHelperPoints"; + callfunc "XmasStates"; + if(@xmas_helper_done_state) + goto L_ManaBattery; + goto L_NotHelpEnough; + +L_NotHelpEnough: + mes "\"Hrmm... I'm still seeing too much activity up there. You better wreck some more havoc otherwise they might restore the power before us.\""; + goto L_close; + +L_ManaBattery: + mes "\"Now that we set back the holiday, It's time for the next step in my plan.\""; + next; + callfunc "ListReagents"; + mes "\"When you have gathered the required materials please come back and see me.\""; + @xmas_state = $@xmas_reagents_start; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_close; + +L_IngredientList: + callfunc "ListReagents"; + mes "\"When you have gathered the required materials please come back and see me.\""; + goto L_close; + +L_PowerReagents: + mes "[Orum's Homunculus]"; + mes "\"Have you gotten the reagents?\""; + menu + "Yes.", L_CheckReagents, + "What were they again?", L_IngredientList, + "No.", L_NotEnough; + +L_CheckReagents: + callfunc "CheckReagents"; + callfunc "XmasStates"; + if(!(@xmas_reagent_done_state)) + goto L_NotEnough; + callfunc "DeleteReagents"; + mes "\"YES! you have all the required components!\""; + mes "\"Now I can create a mind link to the mana battery and control the nutcrackers\""; + next; + mes "You watch as he puts equal amounts of emerald powder into each of the iron potions."; + mes "He methodically crushes up the dark crystal and speads it amongst the potions."; + mes "He positions the four potions in a stand so all the openings are mostly facing each other."; + mes "He begins to chant."; + next; + mes "[Orum's Homunculus]"; + mes "O"; + next; + mes "wat"; + next; + mes "goo"; + next; + mes "siam"; + next; + mes "The potions begin to pulse with mana."; + mes "He continues to chant"; + next; + mes "[Orum's Homunculus]"; + mes "Aye"; + next; + mes "Am"; + next; + mes "Knot"; + next; + mes "Phunee"; + next; + mes "Mana surges to life in the potions"; + next; + mes "\"Phew! That takes alot out of a person.\""; + mes "\"I'm in no condition to go anywhere.\""; + next; + mes "\"Take the Mana Battery and install it in the warehouse.\""; + mes "\"It's found behind Chief Warrick\""; + @xmas_state = $@xmas_boss_door_open_state; + callfunc "XmasSetState"; + callfunc "XmasXpReward"; + goto L_close; + +L_Quick: + mes "[Orum's Homunculus]"; + mes "\"What are you still doing here?\""; + mes "\"Quickly, to the warehouse.\""; + goto L_close; + +L_Reward: + mes "[Orum's Homunculus]"; + mes "\"Revenge is a dish best served cold..\""; + if (@xmas_reward2_done_state) + @xmas_state = $@xmas_reward_done; + if (@xmas_reward_start_state) + @xmas_state = $@xmas_reward1_done; + + callfunc "XmasSetState"; + callfunc "XmasMainXpBpReward"; + goto L_close; + +L_Thanks: + mes "[Orum's Homunculus]"; + mes "\"Please feel free to continue to sabotage whats left of the Inn while I prepare your reward.\""; + goto L_close; + +L_NotEnough: + mes "\"Come back with the components or don't come back at all.\""; + goto L_close; + +L_ThankYou: + mes "\"Now I'm the one in power of the Inn. You did well my minion.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/030-4/_import.txt b/npc/030-4/_import.txt new file mode 100644 index 00000000..ef054d02 --- /dev/null +++ b/npc/030-4/_import.txt @@ -0,0 +1,4 @@ +// Map 030-4: Christmas Inn Warehouse +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/030-4/mana_battery.txt", +"npc/030-4/mapflags.txt", diff --git a/npc/030-4/mana_battery.txt b/npc/030-4/mana_battery.txt new file mode 100755 index 00000000..2091f5b5 --- /dev/null +++ b/npc/030-4/mana_battery.txt @@ -0,0 +1,433 @@ + + + + +030-4,32,21,0 script AniManOMat NPC400,{ + $@XmasBattleStatusClone = 0; + callfunc "XmasStates"; + @xmas_battle_side = 0; + if ($@XmasBattleCoolDown) + goto L_CoolDown; + if (@xmas_side) + @xmas_battle_side = 1; + if ($@XmasBattleStatus) + goto L_BattleInProgress; + if (@xmas_state < $@xmas_boss_door_open_state) + goto L_ThrowOut; + if ((@xmas_boss_start) && (@xmas_state > $@xmas_boss_door_open_state)) + goto L_Helper; + if (@xmas_state == $@xmas_boss_door_open_state) + goto L_InitiateBattle; + goto L_InitiateBattle; + +L_InitiateBattle: + callfunc "XmasSetBossStart"; + if(@xmas_battle_side) + goto L_BattleBad; + goto L_BattleGood; + +L_BattleBad: + mes "[Orum's Homunculus]"; + mes "\"So this is where this whole shallow charade will end...\""; + mes "\"Good. Are you ready to get this over with?\""; + menu + "Huh? Sure, why not.", L_KeepGoing, + "Wait a sec.", L_close, + "Well... since you ask... I prefer to leave now, this is way to dangerous. I have responsibities.", L_Coward; + +L_KeepGoing: + mes "[Orums Homunculus]"; + mes "\"Okay now listen closely, at least for once.\""; + mes "\"Put the mana battery into that vessel in front of you.\""; + next; + menu + "Ok.", L_YeahOk, + "No way, I prefer to leave. Now!", L_Coward, + "Give me a second, I need to consider my options.", L_close; + +L_YeahOk: + mes "You carefully install the Mana Battery as good as you can manage."; + mes "As you bend over, you notice a strong sulphur odour coming from the crate"; + next; + mes "[Orum]"; + mes "\"Ok. now this should be enough.\""; + mes "\"Get out of here, before the bomb explodes!.\""; + menu + "Agreed.", L_StartBad, + "You know what? If I pull this lever this should become HUGE! (Beware! that's dangerous)", L_StartBadHard; + +L_BattleGood: + mes "You stare into a box that even through your unexperienced eyes looks less than secure to harbour such a powerful device as the mana battery is."; + menu + "Ok, this should be where the battery belongs.", L_StartGood, + "No WAY! I am not going to put my life in danger", L_close, + "Ok that does it, I am going to leave! I cannot be responsible for blowing up the entire mana world.", L_Coward, + "I studied magic and this looks all wrong. (Beware! that's dangerous)", L_StartGoodHard; + +L_StartGood: + if ($@XmasBattleStatus) + goto L_BattleInProgress; + @xmas_battle_status = 1; + goto L_Start; + +L_StartGoodHard: + if ($@XmasBattleStatus) + goto L_BattleInProgress; + callsub S_CheckHardReq; + delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; + mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery."; + @xmas_battle_status = 2; + goto L_Start; + +L_StartBad: + if ($@XmasBattleStatus) + goto L_BattleInProgress; + @xmas_battle_status = 3; + goto L_Start; + +L_StartBadHard: + if ($@XmasBattleStatus) + goto L_BattleInProgress; + callsub S_CheckHardReq; + delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; + mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery."; + @xmas_battle_status = 4; + goto L_Start; + +L_Start: + mes "You struggle a little with your task, since the mana battery doesn't seem to fit in as smooth as you expected it."; + next; + mes "W00t!"; + next; + mes "Now it is glowing wildly"; + next; + mes "it seems like this will not turn out as planned, Look this Guard of Honour is going crazy!"; + next; + npctalk strnpcinfo(0), "The Guards are out of control!"; + if ($@XmasBattleStatus) + goto L_BattleAlreadyStarted; + $@XmasBattleStatus = @xmas_battle_status; + $@XmasBattleStatusClone = $@XmasBattleStatus; + $@XmasBossRound = 0; + $@XmasBossPlayerCount = getmapusers("030-4"); + areamonster "030-4", 20, 21, 40, 40, "", 1114, 1, "AniManOMat::OnGuardDeath"; + initnpctimer; + goto L_close; + +L_ThrowOut: + // if the player didnt get a bomb yet + mes "This looks dangerous. Come back when you are prepared"; + next; + warp "030-2",151,25; + goto L_close; + +L_Coward: + //Player chose to cancel + mes "What a pitty now you still have a bomb in your hands but..."; + mes "As you wish."; + next; + warp "030-2",151,25; + goto L_close; + +L_Helper: + //Player used up his own chance to start + mes "mmh the AniManOMat is empty again, maybe we should try with a different mana battery."; + menu + "No I prefer to leave now, get me out of here.", L_Quit, + "Wait let me check if i can fix this ...(Beware!)", L_Repeat, + "Why would I do that? Aaaah... Nevermind.", L_close; + +L_Repeat: + //Player wants to try again on hard mode again + if ($@XmasBattleStatus) + goto L_BattleInProgress; + callsub S_CheckHardReq; + delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; + @xmas_battle_status = (2 * (@xmas_battle_side)) + 2; + goto L_Start; + +L_Quit: + warp "030-2",151,25; + goto L_close; + +L_CoolDown: + mes "The AniManOMat is too hot to handle right now, you should wait a bit to try a new battery."; + menu + "No I prefer to leave now, get me out of here.", L_Quit, + "Ughhh, but I'm certain this time the battery will work!", L_close; + +L_BattleInProgress: + mes "The mana battery looks like it is about to explode. You better take cover!"; + goto L_close; + +L_BattleAlreadyStarted: + mes "Seems like someone was faster than you."; + goto L_close; + +L_close: + callsub S_ClearVariables; + close; + + // per NPC logic +OnTimer5000: + setnpctimer 0; + if ($@XmasBattleStatus) + goto L_CaveLogic; + goto L_CleanUp; + +L_Return_1: + $@XmasBossPlayerCount = 0; + areatimer 0, "030-4", 0, 0, 60, 60, 10, "AniManOMat::OnTick"; + end; + +L_CaveLogic: + if ($@XmasBossPlayerCount < 1) + goto L_AllDead; + set $@BombTimer, $@BombTimer + 5; // Advance 5 seconds + if ((mobcount("030-4", "AniManOMat::OnGuardDeath") + 1) == 0) + goto L_NextWave; + if ($@BombTimer >= 120) + goto L_NextWave; + goto L_Return_1; + +L_NextWave: + $@BombTimer = 0; + $@DangerCellNumber = rand(8); + $@XmasBossRound = $@XmasBossRound + 1; + if (($@XmasBossRound > 10) && ((mobcount("030-4", "AniManOMat::OnGuardDeath") + 1) == 0)) + goto L_Finished; + // Break/LastChance(s) + if (($@XmasBossRound > 10) && ($@XmasBossRound <= 16)) + goto L_Return_1; + //KillerWaves + if ($@XmasBossRound > 16) + areamonster "030-4", 0, 0, 50, 50, "", 1114, $@XmasBossRound*2 + $@XmasBossPlayerCount*3, "AniManOMat::OnGuardDeath"; + //Normal Waves 1 to 10 + // Guard Amount doubles if on hard mode + $@GuardAmount = 1 + (6 + ($@XmasBossRound) + (2 * $@XmasBossPlayerCount)) / 7; + $@SkullAmount = 1 + ($@GuardAmount * $@GuardAmount) / 4; + + if ($@GuardAmount > 15) + $@GuardAmount = 15; + + //Obliatory Guard Of Honour in the Southern Hallway + areamonster "030-4", 30, 43, 39, 49, "", 1114, $@GuardAmount, "AniManOMat::OnGuardDeath"; + //CopperSlimes, I love Copper Slimes anywhere anytime + areamonster "030-4", 20, 21, 49, 49, "", 1098, rand(2,7), "AniManOMat::OnGuardDeath"; + //IceSkulls for hard mode in room 3 and 4 + if ($@XmasBattleStatus == 2 || $@XmasBattleStatus == 4) + areamonster "030-4", 20, 32, 28, 39, "", 1085, $@SkullAmount / 2, "AniManOMat::OnGuardDeath"; + if ($@XmasBattleStatus == 2 || $@XmasBattleStatus == 4) + areamonster "030-4", 41, 32, 49, 39, "", 1085, $@SkullAmount / 2 + 1, "AniManOMat::OnGuardDeath"; + //Angry Sea Slimes for Easy Mode in Nice Version in Room 3,4,5,6 + if ($@XmasBattleStatus == 1) + areamonster "030-4", 20, 32, 28, 49, "", 1109, $@SkullAmount, "AniManOMat::OnGuardDeath"; + if ($@XmasBattleStatus == 1) + areamonster "030-4", 41, 32, 49, 49, "", 1109, $@SkullAmount, "AniManOMat::OnGuardDeath"; + //Candied Slimes for Nice Mode in Rooms 1 and 2 + if ($@XmasBattleStatus == 1 || $@XmasBattleStatus == 2) + areamonster "030-4", 20, 21, 28, 28, "", 1111, ($@XmasBossRound / 2) + 1, "AniManOMat::OnGuardDeath"; + if ($@XmasBattleStatus == 1 || $@XmasBattleStatus == 2) + areamonster "030-4", 41, 21, 49, 28, "", 1111, ($@XmasBossRound / 2) + 2, "AniManOMat::OnGuardDeath"; + //Bluepars for Easy mode in Naughty Variant in Rooms 3,4,5,6 + if ($@XmasBattleStatus == 3) + areamonster "030-4", 20, 32, 28, 49, "", 1107, $@SkullAmount, "AniManOMat::OnGuardDeath"; + if ($@XmasBattleStatus == 3) + areamonster "030-4", 41, 32, 49, 49, "", 1107, $@SkullAmount, "AniManOMat::OnGuardDeath"; + // Wicked Mushrooms for Naughty Mode in Rooms 1 and 2 + if ($@XmasBattleStatus == 3 || $@XmasBattleStatus == 4) + areamonster "030-4", 20, 21, 28, 28, "", 1106, $@XmasBossRound + ($@XmasBossRound / 2), "AniManOMat::OnGuardDeath"; + if ($@XmasBattleStatus == 3 || $@XmasBattleStatus == 4) + areamonster "030-4", 41, 21, 49, 28, "", 1106, $@XmasBossRound + ($@XmasBossRound / 2), "AniManOMat::OnGuardDeath"; + + $@msgnumber = (2 * $@XmasBossRound) + (($@XmasBattleStatus - 1) >> 1); + $@msg$ = $@XmasBossMes$[ $@msgnumber ]; + $@msgnumber = 0; + if ($@XmasBossRound > 10) goto L_Return_1; + callsub S_Announce; + goto L_Return_1; + +OnTick: + if (ispcdead()) end; + $@XmasBossPlayerCount = $@XmasBossPlayerCount + 1; + if(isin("030-4", $@DangerCellX1[$@DangerCellNumber], $@DangerCellY1[$@DangerCellNumber], $@DangerCellX2[$@DangerCellNumber], $@DangerCellY2[$@DangerCellNumber])) + goto L_DangerCell; + end; + +L_DangerCell: + message strcharinfo(0), "Target Aquired. Locking on Now."; + misceffect 10001, strcharinfo(0); + heal ((MaxHp/100) * -20), 0; + end; + +OnGuardDeath: + end; + +L_AllDead: + $@msg$ = $@xmas_final_announce$[ ($@XmasBattleStatus - 1) / 2 ]; + callsub S_Announce; + goto L_CleanUp; + +L_Finished: + $@msg$ = $@xmas_final_announce$[ (($@XmasBattleStatus - 1) / 2) + 2 ]; + callsub S_Announce; + goto L_CleanUp; + +L_CleanUp: + areatimer 0, "030-4", 0, 0, 50, 50, 10, "AniManOMat::OnReward"; + $@XmasBossPlayerCount = 0; + $@XmasBossRound = 0; + $@BombTimer = 0; + $@GuardAmount = 0; + $@SkullAmount = 0; + killmonster "030-4", "AniManOMat::OnGuardDeath"; + stopnpctimer; + donpcevent "#XmasChamberCooler::OnCommandCoolDown"; + end; + +OnReward: + if (ispcdead()) + end; + if (($@XmasBattleStatusClone % 2) == 0) + XMASTIME = XMASTIME | $@xmas_boss_hero_bit; + @xmas_state = (XMASTIME & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT; + @bonus = (55 - (BaseLevel / 2)); + DailyQuestBonus = DailyQuestBonus + @bonus; + message strcharinfo(0), "You feel a temporary rush of power and zest for action."; + if (@xmas_state != $@xmas_boss_door_open_state ) + goto L_End; + @xmas_state = $@xmas_reward_start; + callfunc "XmasSetState"; + @xmas_state = 0; + @karma_bonus = $@xmas_boss_bonus; + message strcharinfo(0), "Wow, what happened here?."; + goto L_End; + +L_End: + if ((($@XmasBattleStatus - 1) / 2) == 0) goto L_EndNice; + goto L_EndNaughty; + +L_EndNaughty: + callfunc "XmasNaughty"; + callsub S_ClearVariables; + end; + +L_EndNice: + callfunc "XmasNice"; + callsub S_ClearVariables; + end; + +OnCommandChamberReset: + areatimer 0, "030-4", 0, 0, 50, 50, 10, "AniManOMat::OnReward"; + $@XmasBattleStatus = 0; + $@XmasBossPlayerCount = 0; + $@XmasBossRound = 0; + $@BombTimer = 0; + $@GuardAmount = 0; + $@SkullAmount = 0; + killmonster "030-4", "AniManOMat::OnGuardDeath"; + stopnpctimer; + setnpctimer 0; + goto L_Restart; + +OnInit: + goto L_Restart; + +L_Restart: + $@XmasBattleStatus = 0; + setarray $@XmasBossMes$, + "", // unused + "", // unused + "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch", + "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch", + "Avalia : I am getting a weird sensation ... ", + "Orums Homunculus : I think they know what we are up to!", + "Avalia : Oh no! This is going to blow up", + "Orums Homunculus : The Door is locked you idiot, fight for your life.", + "Avalia : Guards of Honor I demand you: STOP!", + "Orums Homunculus : Okay, this is somewhat funny... why are they coming back?!?", + "Avalia : You brave fighters! Deactivate the nutcrackers! they are out of control!", + "Orums Homunculus : The good news is: if we make it this time we will never have to do that again!", + "Avalia : Oh boy we are so screwed.", + "Orums Homunculus : Report: I am an Idiot", + "Avalia : Quick, we need to kill the nutcrackers, before they ruin everything we've been working for.", + "Orums Homunculus : Strange they are getting more and not less.", + "Avalia : Oh no, they are too powerful. Fight my warriors, Fight for the spirit of Christmas.", + "Orums Homunculus : If I was smart enough to stop talking, it would have happened already..", + "Avalia : I cannot believe it, this is making them stronger. More and more of them are coming.", + "Orums Homunculus : I think we are almost done, the bomb should explode any second.", + "Avalia : Those poor creatures. Just kill them all.", + "Orums Homunculus : A N Y S E C O N D.", + "Avalia : Oh well... just try again, I trust in you.", + "Orum's Homunculus : just lol.", + "Avalia : Wow! You saved christmas.", + "Orum's Homunculus : Yep, it's over... and strange enough you survived."; + + setarray $@xmas_final_announce$, + "Avalia : Oh no, not only did you slay half my Guard of Honour, but also the issue was not fixed, try to install the battery again!", + "Orum's Homunculus : Boy are you lame. So what now? The battery is still not placed! Go try again!", + "Avalia : W00t you actually made it through. I think now that the manabattery lost some of its abundant power this seems to have given those nutcrackers that didn't go crazy a good boost of life energy. Thank you for your help all and come see me for a reward.", + "Orum's Homunculus : Good. They are dead. Now GET OUT OF THERE, this bomb is dangerous!"; + // Danger Cells to attack sitters + // 0: 19,20,29,29 + // 1: 30,20,40,29 + // 2: 41,20,50,29 + // 3: 19,31,29,40 + // 4: 30,31,40,40 + // 5: 41,31,50,40 + // 6: 19,42,29,50 + // 7: 30,42,40,50 + // 8: 41,42,50,50 + setarray $@DangerCellX1, 19, 30, 41, 19, 30, 41, 19, 30, 41; + setarray $@DangerCellY1, 20, 20, 20, 31, 31, 31, 42, 42, 42; + setarray $@DangerCellX2, 29, 40, 50, 29, 40, 50, 29, 40, 50; + setarray $@DangerCellY2, 29, 29, 29, 40, 40, 40, 50, 50, 50; + end; + +S_Announce: + mapannounce "030-4", "Danger Cell Activated. Zone " + $@DangerCellNumber + " activated.", 0; + mapannounce "030-4", $@msg$, 0; + mapannounce "030-2", $@msg$, 0; + $@msg$ = ""; + return; + +S_CheckHardReq: + if (BaseLevel < $@BossHardLevel) + goto L_NotHighEnough; + if (countitem($@xmas_boss_req$[ @xmas_battle_side ]) < $@xmas_boss_amount[ @xmas_battle_side ]) + goto L_NotEnoughItems; + goto L_Return; + +L_NotEnoughItems: + mes "Nono, you need to bring " + $@xmas_boss_amount[ @xmas_battle_side ] + " " + $@xmas_boss_req$[ @xmas_battle_side ] + "s."; + goto L_close; + +L_NotHighEnough: + mes "\"Err no sweetie, you don't. just do it the normal way.\""; + goto L_close; + +L_Return: + return; + +S_ClearVariables: + @xmas_battle_side = 0; + @bonus = 0; + @xmas_state = 0; + @xmas_battle_status = 0; + @karma_bonus = 0; + return; +} + +030-4,0,0,0 script #XmasChamberCooler NPC32767,{ + end; +OnCommandCoolDown: + $@XmasBattleStatus = 0; + $@XmasBattleCoolDown = 1; + initnpctimer; + end; + +OnTimer120000: + $@XmasBattleCoolDown = 0; + stopnpctimer; + end; +} diff --git a/npc/030-4/mapflags.txt b/npc/030-4/mapflags.txt new file mode 100755 index 00000000..e9283539 --- /dev/null +++ b/npc/030-4/mapflags.txt @@ -0,0 +1,2 @@ +030-4 mapflag nosave 030-2,151,25 +//030-4 mapflag resave 030-2,151,25 diff --git a/npc/031-1/_import.txt b/npc/031-1/_import.txt new file mode 100644 index 00000000..4b45a1e1 --- /dev/null +++ b/npc/031-1/_import.txt @@ -0,0 +1,9 @@ +// Map 031-1: Nivalis Port +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/031-1/_mobs.txt", +"npc/031-1/_warps.txt", +"npc/031-1/angelaOutside.txt", +"npc/031-1/dock.txt", +"npc/031-1/frozenbeard.txt", +"npc/031-1/house.txt", +"npc/031-1/mapflags.txt", diff --git a/npc/031-1/_mobs.txt b/npc/031-1/_mobs.txt new file mode 100644 index 00000000..bedd297f --- /dev/null +++ b/npc/031-1/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 031-1: Nivalis Port mobs +031-1,0,0,0,0 monster Cuco 1020,10,100000,30000 +031-1,0,0,0,0 monster Terranite 1113,14,100000,30000 +031-1,76,26,5,2 monster Nutcracker 1093,7,100000,30000 +031-1,0,0,0,0 monster Reaper 1095,4,100000,30000 diff --git a/npc/031-1/_warps.txt b/npc/031-1/_warps.txt new file mode 100644 index 00000000..9d7b3a97 --- /dev/null +++ b/npc/031-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 031-1: Nivalis Port warps +031-1,37,55,0 warp #031-1_37_55 0,0,020-1,106,55 +031-1,76,24,0 warp #031-1_76_24 0,0,031-3,212,299 +031-1,90,115,0 warp #031-1_90_115 0,0,031-2,73,29 diff --git a/npc/031-1/angelaOutside.txt b/npc/031-1/angelaOutside.txt new file mode 100755 index 00000000..92bb502a --- /dev/null +++ b/npc/031-1/angelaOutside.txt @@ -0,0 +1,138 @@ + +031-1,81,24,0 script Debug#Angela NPC195,{ + mes "Current state: " + QL_CINDY; + mes "---"; + mes "Available states:"; + mes "0 - can not do the quest."; + mes "5 - does not have the quest."; + mes "6 - got the quest."; + mes "1 - can go rescue cindy."; + mes "2 - rescued cindy."; + mes "3 - got reward from cindy."; + mes "4 - got reward from angela."; + menu + "set state", L_Set, + "close", L_close; + +L_Set: + input @state; + if(@state < 0 || @state > 6) set @state, 0; + QL_CINDY = @state; + goto L_close; + +L_close: + close; + +OnInit: + if (!debug) disablenpc strnpcinfo(0); + end; +} + +031-1,79,24,0 script Angela NPC195,15,15,{ + if (QL_CINDY == 3) goto L_Please_Visit_Again; + if (QL_CINDY > 1 && QL_CINDY < 5) goto L_Please_Visit; + if (QL_CINDY == 1) goto L_Please_Help; + + mes "[Angela]"; + mes "\"Please, I need help! My little daughter!\""; + next; + mes "\"It's terrible, oh my dear child!\""; + next; + if (countitem("ConcentrationPotion") > 0 && BaseLevel >= .minlevel && QL_CINDY == 6) + goto L_Menu_Potion; + + menu + "\"Please calm down and tell me what happened.\"", L_Whining, + "Leave", L_close; + +OnTouch: + if(BaseLevel >= .minlevel && QL_CINDY < 1) + QL_CINDY = 5; + end; + +L_Whining: + mes "[Angela]"; + mes "\"My poor little daughter, please! Oh no, oh no...\""; + next; + mes "\"We need to do something! My poor little Cindy! My cute little girl!\""; + next; + mes "\"It's so terrible, how could that happen? Please, I need help, it's so terrible.\""; + next; + mes "\"Those awful filthy monsters - terrible!\""; + next; + mes "\"Oh Cindy, my little Cindy - oh no...\""; + next; + mes "\"Please help, we need to do something!\""; + next; + mes "\"It's so terrible, my poor cute little Cindy...\""; + next; + mes "\"Oh, when I think what might happen to her right now!\""; + next; + mes "She is crying and sobbing."; + next; + mes "It seems she is too upset to tell you anything helpful. If she would just calm down and concentrate a bit..."; + if(BaseLevel >= .minlevel) goto L_GetQuest; + goto L_close; + +L_GetQuest: + next; + QL_CINDY = 6; + mes "Perhaps you could give her something to help concentrate ?"; + goto L_close; + +L_Menu_Potion: + menu + "\"Please calm down and tell me what happened.\"", L_Whining, + "Give her a concentration potion.", L_Calm_Down, + "Leave", L_close; + +L_Calm_Down: + if (countitem("ConcentrationPotion") == 0) + goto L_No_Potion; + delitem "ConcentrationPotion", 1; + mes "She drinks the concentration potions and calms down."; + mes "[Angela]"; + mes "\"Thank you, this was helpful.\""; + next; + mes "\"My daughter Cindy and I were on our way to Santa, to bring him some presents. Many people here in Nivalis are helping Santa with his business.\""; + next; + mes "\"When we passed the entrance of this cave, a pack of Yetis came out of there. It's disturbing, because usually they are very shy.\""; + next; + mes "\"We tried to run away, but there were too many of them. They took my poor little Cindy and all the presents with them.\""; + next; + mes "\"Oh my poor little girl. I'm so worried - what might they do with her? Oh no!\""; + next; + mes "\"You look like an adventurer! Please, can you go in that cave and rescue my little Cindy? I beg you for help!\""; + QL_CINDY = 1; + goto L_close; + +L_No_Potion: + mes "You don't have a concentration potion."; + goto L_close; + +L_Please_Help: + mes "[Angela]"; + mes "\"Please go in that cave and rescue my daughter!\""; + goto L_close; + +L_Please_Visit: + mes "[Angela]"; + mes "\"Thank you so much for rescuing my beloved Cindy. Please come to visit us in our house at the beach.\""; + next; + mes "\"My husband is an adventurer like you, and I want to give you something he got on his travels to show my gratitude.\""; + goto L_close; + +L_Please_Visit_Again: + mes "[Angela]"; + mes "\"Hello! You are welcome to visit us in our house at the beach everytime. Cindy loves to see you!\""; + next; + mes "\"If you have found any present boxes the Yetis took away, please bring them to our house. Usually, the Yetis are very shy... their behavior is a bit odd.\""; + goto L_close; + +L_close: + close; + +OnInit: + .minlevel = 70; + end; +} diff --git a/npc/031-1/dock.txt b/npc/031-1/dock.txt new file mode 100755 index 00000000..a976a87d --- /dev/null +++ b/npc/031-1/dock.txt @@ -0,0 +1,40 @@ + +031-1,110,108,0 script Nivalis Koga NPC395,12,2,{ + callfunc "BoardFerry"; + end; + +OnTouch: + addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard"; + end; + +OnBoard: + callfunc "BoardFerry"; + end; +} + +031-1,99,109,0 script Nivalis Dock NPC400,2,1,{ + @npc_distance = 3; + callfunc "PCtoNPCRange"; + if(@npc_check) end; + callfunc "BoardFerry"; + end; +} + +031-1,100,100,0 script #NivalisDock NPC32767,{ + end; + +OnCommandArrive: + disablenpc "Nivalis Dock"; + enablenpc "Nivalis Koga"; + areatimer 0, "031-1", 97, 108, 108, 110, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock + end; + +OnAreaWarp: + callfunc "BoardFerry"; + end; + +OnCommandWarp: + disablenpc "Nivalis Koga"; + enablenpc "Nivalis Dock"; + end; +} diff --git a/npc/031-1/frozenbeard.txt b/npc/031-1/frozenbeard.txt new file mode 100755 index 00000000..4b380d79 --- /dev/null +++ b/npc/031-1/frozenbeard.txt @@ -0,0 +1,22 @@ + +031-1,96,113,0 script Frozenbeard NPC138,{ + + mes "[Frozenbeard]"; + mes "\"Yar! Do you need something, matey?\""; + goto L_Main; + +L_Main: + menu + "Can you explain the Ferry?", L_Explain, + "Nothing I guess", L_close; + +L_Explain: + mes "[Frozenbeard]"; + mes "\"Arrr mate! I pioneered the trade routes between Nivalis and the rest of the World, so now merchants and adventurers can travel to and fro without any hassle other than the harsh weather up here, yarr.\""; + next; + callfunc "FerryHelp"; + goto L_Main; + +L_close: + close; +} diff --git a/npc/031-1/house.txt b/npc/031-1/house.txt new file mode 100755 index 00000000..690d6da0 --- /dev/null +++ b/npc/031-1/house.txt @@ -0,0 +1,11 @@ + +031-1,95,80,0 script #Door NPC45,0,0,{ + if (QL_CINDY == 3 || QL_CINDY == 4) + goto L_Warp; + message strcharinfo(0), "Door : ##BThe door is locked."; + end; + +L_Warp: + warp "031-2", 23, 28; + end; +} diff --git a/npc/031-1/mapflags.txt b/npc/031-1/mapflags.txt new file mode 100755 index 00000000..99b0507c --- /dev/null +++ b/npc/031-1/mapflags.txt @@ -0,0 +1 @@ +//031-1 mapflag resave 020-1,52,118 diff --git a/npc/031-2/_import.txt b/npc/031-2/_import.txt new file mode 100644 index 00000000..5b0af12f --- /dev/null +++ b/npc/031-2/_import.txt @@ -0,0 +1,6 @@ +// Map 031-2: Angela's House +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/031-2/_warps.txt", +"npc/031-2/angelaHouse.txt", +"npc/031-2/cindyHouse.txt", +"npc/031-2/mapflags.txt", diff --git a/npc/031-2/_warps.txt b/npc/031-2/_warps.txt new file mode 100644 index 00000000..6483c178 --- /dev/null +++ b/npc/031-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 031-2: Angela's House warps +031-2,23,30,0 warp #031-2_23_30 0,0,031-1,95,81 +031-2,73,30,0 warp #031-2_73_30 0,0,031-1,90,116 diff --git a/npc/031-2/angelaHouse.txt b/npc/031-2/angelaHouse.txt new file mode 100755 index 00000000..37cb82cc --- /dev/null +++ b/npc/031-2/angelaHouse.txt @@ -0,0 +1,88 @@ + +031-2,29,28,0 script Angela#house NPC196,{ + if (QL_CINDY == 4) goto L_Hello_Again; + if (QL_CINDY == 3) goto L_Reward; + + mes "..."; + goto L_close; + +L_Reward: + mes "[Angela]"; + mes "\"Hello " + strcharinfo(0) + ", thank you again. I'm so glad Cindy is back home safe.\""; + next; + mes "\"As I told you, my husband is an adventurer. He is on one of his travels, so he couldn't rescue Cindy himself.\""; + next; + mes "\"I want to give you one of his treasures. Beside all the junk he brings, there are some very valuable things.\""; + next; + mes "\"This item is called the Rock Knife. When you wield it, you feel as robust as a rock.\""; + + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + getitem "RockKnife", 1; + QL_CINDY = 4; + + next; + mes "\"I hope this will be useful for you.\""; + next; + mes "\"I am so glad Cindy is safe. But there is still another problem. The Yetis took away all the white and yellow present boxes we wanted to bring to Santa!\""; + next; + mes "\"Usually, Yetis are very shy - I wonder why they did that. There is something strange going on.\""; + next; + mes "\"May I ask you for help again? I'll give you a small reward for every 3 boxes of one color you bring me.\""; + goto L_close; + +L_Full_Inv: + mes "\"Oh, it seems you carry so much stuff - I will keep it for you until you can take it.\""; + goto L_close; + +L_Hello_Again: + mes "[Angela]"; + mes "\"Hello! Good to see you again. Please warm yourself.\""; + next; + menu + "I just wanted to say hello.",L_close, + "I have some yellow present boxes.",L_Yellow, + "I have some white present boxes.",L_White; + +L_Yellow: + @dq_level = 70; + @dq_cost = 32; + @dq_count = 3; + @dq_name$ = "YellowPresentBox"; + @dq_friendly_name$ = "yellow present box"; + @dq_money = 5300; + @dq_exp = 1300; + + callfunc "DailyQuest"; + next; + if (@dq_return == 4) + mes "\"Santa will be glad to have them back.\""; + goto L_close; + +L_White: + @dq_level = 80; + @dq_cost = 64; + @dq_count = 3; + @dq_name$ = "WhitePresentBox"; + @dq_friendly_name$ = "white present box"; + @dq_money = 10800; + @dq_exp = 2800; + + callfunc "DailyQuest"; + next; + if (@dq_return == 4) + mes "\"You are a great help!\""; + goto L_close; + +L_close: + @dq_level = 0; + @dq_cost = 0; + @dq_count = 0; + @dq_name$ = ""; + @dq_friendly_name$ = ""; + @dq_money = 0; + @dq_exp = 0; + @dq_return = 0; + close; +} diff --git a/npc/031-2/cindyHouse.txt b/npc/031-2/cindyHouse.txt new file mode 100755 index 00000000..dcda8cd2 --- /dev/null +++ b/npc/031-2/cindyHouse.txt @@ -0,0 +1,43 @@ + +031-2,27,26,0 script Cindy#house NPC197,{ + if (QL_CINDY == 3 || QL_CINDY == 4) goto L_Happy_Random; + + mes "..."; + goto L_close; + +L_Happy_Random: + getinventorylist; + @candy = rand(50); + if (@inventorylist_count < 100 && @candy == 42) + goto L_Candy; + + setarray @quote_Cindy$, "Thank you so much for rescuing me!", + "My mother made really tasty cookies yesterday. But I already ate them all...", + "I want to go ice skating tomorrow. That will be fun!", + "I wonder when Daddy will come home next time. He always brings exciting stuff!", + strcharinfo(0) + "! You're my hero!", + "My mother is so upset about the Yetis - they are very very shy usually. You have to be lucky to see one. I wonder what's wrong with them.", + "When I'm a little older, I want to travel like you and my father. I want to see every place on the world!", + "Did you ever meet Santa? He's very kind! He always gives me some candy when we go to see him.", + strcharinfo(0) + ", you are sooo strong! Amazing! But my dad is strong too!"; + @random = rand(9); + if (@random != 5) + emotion EMOTE_HAPPY, strcharinfo(0); + @quote$ = "\"" + @quote_Cindy$[@random] + "\""; + mes "[Cindy]"; + mes @quote$; + goto L_close; + +L_Candy: + mes "[Cindy]"; + mes "\"Santa gave me some candy! Please, take that!\""; + getitem "Candy", 1; + goto L_close; + +L_close: + @candy = 0; + @inventorylist_count = 0; + @random = 0; + @quote$ = ""; + close; +} diff --git a/npc/031-2/mapflags.txt b/npc/031-2/mapflags.txt new file mode 100755 index 00000000..935a1eb9 --- /dev/null +++ b/npc/031-2/mapflags.txt @@ -0,0 +1 @@ +//031-2 mapflag resave 020-1,52,118 diff --git a/npc/031-3/_import.txt b/npc/031-3/_import.txt new file mode 100644 index 00000000..65d35644 --- /dev/null +++ b/npc/031-3/_import.txt @@ -0,0 +1,6 @@ +// Map 031-3: Ice Labyrinth +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/031-3/_mobs.txt", +"npc/031-3/_warps.txt", +"npc/031-3/labyrinth.txt", +"npc/031-3/mapflags.txt", diff --git a/npc/031-3/_mobs.txt b/npc/031-3/_mobs.txt new file mode 100644 index 00000000..ea875340 --- /dev/null +++ b/npc/031-3/_mobs.txt @@ -0,0 +1,91 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 031-3: Ice Labyrinth mobs +031-3,230,279,12,13 monster Bad Bee 1058,5,100000,30000 +031-3,195,277,12,13 monster Bad Bee 1058,3,100000,30000 +031-3,213,282,33,21 monster Manana Tree 1017,5,100000,30000 +031-3,37,213,13,11 monster Moubi 1072,2,100000,30000 +031-3,35,212,13,11 monster Manana Tree 1017,11,100000,30000 +031-3,38,147,22,34 monster Blue Rose 1061,19,100000,30000 +031-3,97,261,21,11 monster Blue Rose 1061,5,100000,30000 +031-3,97,291,21,11 monster Blue Rose 1061,5,100000,30000 +031-3,36,148,32,21 monster Manana Tree 1017,11,100000,30000 +031-3,97,277,11,21 monster Manana Tree 1017,11,100000,30000 +031-3,148,282,11,21 monster Manana Tree 1017,11,100000,30000 +031-3,145,293,12,13 monster Bad Bee 1058,6,100000,30000 +031-3,98,214,19,22 monster Coal Veinbloc 1071,2,100000,30000 +031-3,99,214,12,13 monster Bad Bee 1058,3,100000,30000 +031-3,198,144,14,26 monster Bad Bee 1058,4,100000,30000 +031-3,97,291,21,11 monster Blue Rose 1061,5,100000,30000 +031-3,278,282,16,7 monster Bad Bee 1058,5,100000,30000 +031-3,98,214,19,22 monster Coal Veinbloc 1071,2,100000,30000 +031-3,285,218,4,37 monster Coal Veinbloc 1071,2,100000,30000 +031-3,283,217,20,32 monster Manana Tree 1017,15,100000,30000 +031-3,282,237,31,10 monster Blue Rose 1061,3,100000,30000 +031-3,282,196,31,8 monster Blue Rose 1061,3,100000,30000 +031-3,229,226,13,17 monster Moubi 1072,3,100000,30000 +031-3,230,227,6,21 monster Bad Bee 1058,5,100000,30000 +031-3,209,199,6,8 monster Moubi 1072,2,100000,30000 +031-3,193,216,6,8 monster Moubi 1072,1,100000,30000 +031-3,213,282,33,21 monster Manana Tree 1017,5,100000,30000 +031-3,213,282,33,21 monster Terranite 1113,5,100000,30000 +031-3,199,200,22,7 monster Manana Tree 1017,13,100000,30000 +031-3,209,199,6,8 monster Moubi 1072,2,100000,30000 +031-3,234,141,9,9 monster Moubi 1072,2,100000,30000 +031-3,282,196,31,8 monster Blue Rose 1061,3,100000,30000 +031-3,212,159,31,8 monster Blue Rose 1061,7,100000,30000 +031-3,212,159,31,8 monster Blue Rose 1061,7,100000,30000 +031-3,212,130,31,8 monster Blue Rose 1061,7,100000,30000 +031-3,284,143,20,24 monster Blue Rose 1061,7,100000,30000 +031-3,283,84,18,15 monster Manana Tree 1017,15,100000,30000 +031-3,283,84,18,15 monster Manana Tree 1017,15,100000,30000 +031-3,274,81,7,16 monster Moubi 1072,2,100000,30000 +031-3,40,53,22,34 monster Blue Rose 1061,10,100000,30000 +031-3,120,160,42,15 monster Moubi 1072,4,100000,30000 +031-3,121,131,41,12 monster Moubi 1072,8,100000,30000 +031-3,107,130,12,13 monster Bad Bee 1058,6,100000,30000 +031-3,145,160,12,12 monster Bad Bee 1058,6,100000,30000 +031-3,94,167,12,12 monster Bad Bee 1058,6,100000,30000 +031-3,282,37,15,14 monster Coal Veinbloc 1071,5,100000,30000 +031-3,213,36,32,16 monster Coal Veinbloc 1071,5,100000,30000 +031-3,228,83,15,14 monster Coal Veinbloc 1071,3,100000,30000 +031-3,283,138,7,6 monster Coal Veinbloc 1071,1,100000,30000 +031-3,198,83,15,14 monster Coal Veinbloc 1071,3,100000,30000 +031-3,214,75,12,13 monster Bad Bee 1058,3,100000,30000 +031-3,217,37,33,21 monster Manana Tree 1017,10,100000,30000 +031-3,39,52,32,28 monster Manana Tree 1017,5,100000,30000 +031-3,39,274,32,28 monster Manana Tree 1017,10,100000,30000 +031-3,119,51,19,32 monster Manana Tree 1017,10,100000,30000 +031-3,119,50,28,25 monster Coal Veinbloc 1071,5,100000,30000 +031-3,120,79,10,8 monster Moubi 1072,2,100000,30000 +031-3,37,284,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,28,255,7,4 monster Jack-O 1091,2,100000,30000 +031-3,212,277,7,4 monster Nutcracker 1093,7,100000,30000 +031-3,289,295,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,292,288,7,4 monster Jack-O 1091,2,100000,30000 +031-3,296,233,3,3 monster Nutcracker 1093,7,100000,30000 +031-3,271,222,3,3 monster Nutcracker 1093,7,100000,30000 +031-3,281,215,27,10 monster Jack-O 1091,5,100000,30000 +031-3,126,35,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,143,124,17,11 monster Jack-O 1091,2,100000,30000 +031-3,48,65,7,4 monster Nutcracker 1093,7,100000,30000 +031-3,37,113,2,6 monster Jack-O 1091,1,100000,30000 +031-3,136,227,7,4 monster Nutcracker 1093,7,100000,30000 +031-3,152,218,6,8 monster Jack-O 1091,4,100000,30000 +031-3,135,206,4,3 monster Nutcracker 1093,7,100000,30000 +031-3,154,202,3,3 monster Nutcracker 1093,7,100000,30000 +031-3,136,216,3,2 monster Jack-O 1091,2,100000,30000 +031-3,112,276,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,143,294,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,149,268,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,136,264,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,157,283,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,139,264,12,9 monster Jack-O 1091,4,100000,30000 +031-3,24,265,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,52,280,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,37,254,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,24,290,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,48,298,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,53,260,3,2 monster Nutcracker 1093,7,100000,30000 +031-3,23,275,7,4 monster Jack-O 1091,2,100000,30000 +031-3,37,272,7,4 monster Jack-O 1091,2,100000,30000 +031-3,52,285,7,4 monster Jack-O 1091,2,100000,30000 diff --git a/npc/031-3/_warps.txt b/npc/031-3/_warps.txt new file mode 100644 index 00000000..461e7179 --- /dev/null +++ b/npc/031-3/_warps.txt @@ -0,0 +1,51 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 031-3: Ice Labyrinth warps +031-3,212,300,0 warp #031-3_212_300 0,0,031-1,76,25 +031-3,205,264,0 warp #031-3_205_264 0,0,031-3,150,260 +031-3,149,259,0 warp #031-3_149_259 0,0,031-3,206,265 +031-3,225,282,0 warp #031-3_225_282 0,0,031-3,274,299 +031-3,274,300,0 warp #031-3_274_300 0,0,031-3,225,283 +031-3,283,271,0 warp #031-3_283_271 0,0,031-3,269,244 +031-3,269,245,0 warp #031-3_269_245 0,0,031-3,283,272 +031-3,148,150,0 warp #031-3_148_150 0,0,031-3,128,134 +031-3,139,258,0 warp #031-3_139_258 0,0,031-3,156,196 +031-3,155,195,0 warp #031-3_155_195 0,0,031-3,139,259 +031-3,142,301,0 warp #031-3_142_301 0,0,031-3,98,300 +031-3,97,301,0 warp #031-3_97_301 0,0,031-3,143,300 +031-3,135,196,0 warp #031-3_135_196 0,0,031-3,106,231 +031-3,106,232,0 warp #031-3_106_232 0,0,031-3,135,197 +031-3,286,190,0 warp #031-3_286_190 0,0,031-3,227,241 +031-3,227,242,0 warp #031-3_227_242 0,0,031-3,286,191 +031-3,236,211,0 warp #031-3_236_211 0,0,031-3,187,227 +031-3,187,228,0 warp #031-3_187_228 0,0,031-3,236,212 +031-3,94,254,0 warp #031-3_94_254 0,0,031-3,54,251 +031-3,54,250,0 warp #031-3_54_250 0,0,031-3,94,255 +031-3,103,199,0 warp #031-3_103_199 0,0,031-3,52,176 +031-3,52,177,0 warp #031-3_52_177 0,0,031-3,103,200 +031-3,212,193,0 warp #031-3_212_193 0,0,031-3,207,167 +031-3,207,168,0 warp #031-3_207_168 0,0,031-3,212,194 +031-3,235,167,0 warp #031-3_235_167 0,0,031-3,195,123 +031-3,195,122,0 warp #031-3_195_122 0,0,031-3,235,166 +031-3,296,97,0 warp #031-3_296_97 0,0,031-3,292,124 +031-3,292,123,0 warp #031-3_292_123 0,0,031-3,296,96 +031-3,289,164,0 warp #031-3_289_164 0,0,031-3,228,122 +031-3,228,121,0 warp #031-3_228_121 0,0,031-3,289,163 +031-3,24,157,0 warp #031-3_24_157 0,0,031-3,31,143 +031-3,31,144,0 warp #031-3_31_144 0,0,031-3,24,158 +031-3,36,249,0 warp #031-3_36_249 0,0,031-3,35,225 +031-3,35,226,0 warp #031-3_35_226 0,0,031-3,36,250 +031-3,34,25,0 warp #031-3_34_25 0,0,031-3,281,24 +031-3,281,22,0 warp #031-3_281_22 0,0,031-3,34,27 +031-3,283,48,0 warp #031-3_283_48 0,0,031-3,275,74 +031-3,275,73,0 warp #031-3_275_73 0,0,031-3,283,47 +031-3,26,178,0 warp #031-3_26_178 0,0,031-3,36,201 +031-3,36,200,0 warp #031-3_36_200 0,0,031-3,26,177 +031-3,91,125,0 warp #031-3_91_125 0,0,031-3,36,79 +031-3,36,80,0 warp #031-3_36_80 0,0,031-3,91,126 +031-3,52,78,0 warp #031-3_52_78 0,0,031-3,192,71 +031-3,192,70,0 warp #031-3_192_70 0,0,031-3,52,77 +031-3,128,135,0 warp #031-3_128_135 0,0,031-3,148,151 +031-3,232,93,0 warp #031-3_232_93 0,0,031-3,234,26 +031-3,234,25,0 warp #031-3_234_25 0,0,031-3,232,92 +031-3,200,50,0 warp #031-3_200_50 0,0,031-3,136,30 +031-3,136,29,0 warp #031-3_136_29 0,0,031-3,200,49 diff --git a/npc/031-3/labyrinth.txt b/npc/031-3/labyrinth.txt new file mode 100755 index 00000000..f08448b4 --- /dev/null +++ b/npc/031-3/labyrinth.txt @@ -0,0 +1,10 @@ + +031-3,46,24,0 script #YetiBarrier-outside NPC45,0,0,{ + if ($@FIGHT_YETI_STATUS == 1) goto L_Blocked; + warp "031-4", 40, 70; + end; + +L_Blocked: + message strcharinfo(0), "A force field seems to be blocking you from entering."; + end; +} diff --git a/npc/031-3/mapflags.txt b/npc/031-3/mapflags.txt new file mode 100755 index 00000000..cf32c69b --- /dev/null +++ b/npc/031-3/mapflags.txt @@ -0,0 +1 @@ +//031-3 mapflag resave 020-1,52,118 diff --git a/npc/031-4/_import.txt b/npc/031-4/_import.txt new file mode 100644 index 00000000..d14a4183 --- /dev/null +++ b/npc/031-4/_import.txt @@ -0,0 +1,5 @@ +// Map 031-4: Cindy Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/031-4/barrier.txt", +"npc/031-4/cindyCave.txt", +"npc/031-4/mapflags.txt", diff --git a/npc/031-4/barrier.txt b/npc/031-4/barrier.txt new file mode 100755 index 00000000..64dcb8c1 --- /dev/null +++ b/npc/031-4/barrier.txt @@ -0,0 +1,9 @@ +031-4,40,71,0 script #YetiBarrier-inside NPC45,0,0,{ + if ($@FIGHT_YETI_STATUS == 1) goto L_Block; + warp "031-3", 46, 25; + end; + +L_Block: + message strcharinfo(0), "A force field seems to be blocking you from exiting."; + end; +} diff --git a/npc/031-4/cindyCave.txt b/npc/031-4/cindyCave.txt new file mode 100755 index 00000000..46886638 --- /dev/null +++ b/npc/031-4/cindyCave.txt @@ -0,0 +1,224 @@ + +031-4,42,42,0 script Cindy NPC198,{ + if ($@FIGHT_YETI_STATUS != 0) goto L_Yeti; + + @KEYS_AMOUNT = 10; + @minLevel = 70; + + if (QL_CINDY == 4) goto L_Please_Visit; + if (QL_CINDY == 2) goto L_Reward; + if (QL_CINDY == 1) goto L_Please_Help; + + mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage."; + next; + mes "You don't know what to do."; + goto L_close; + +L_Please_Help: + mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage."; + next; + menu + "Hello Cindy, I'm here to save you.", L_Next; + +L_Next: + mes "Cindy doesn't look so scared anymore."; + next; + mes "[Cindy]"; + mes "\"Hello, adventurer. Did my mother send you?\""; + next; + mes "\"It's so cold in here! Can you please open the cage?\""; + next; + mes "\"But be careful. If the Yetis hear you, they will come!\""; + menu + "Try to open the cage", L_Try_Cage, + "Leave", L_close; + +L_Try_Cage: + if (BaseLevel < @minLevel) + goto L_To_Weak; + if (countitem("TreasureKey") < @KEYS_AMOUNT) + goto L_Not_Enough_Keys; + delitem "TreasureKey", @KEYS_AMOUNT; + mes "As you try to open the door of the cage, there is a loud squeaking noise."; + next; + mes "You get an uncomfortable feeling and Cindy starts to shiver."; + if ($@FIGHT_YETI_STATUS != 0) + goto L_Yeti; + npctalk strnpcinfo(0), "Oh no, the Yetis..."; + + // initialize fight + $@FIGHT_YETI_STATUS = 1; + $@FIGHT_YETI_WAVE = 0; + $@YETI_COUNT = 1; + $@FIGHT_YETI_PLAYER_COUNT = getmapusers("031-4"); + areamonster "031-4", 0, 0, 95, 91, "", 1072, 1, "Cindy::OnPetDeath"; + + initnpctimer; + goto L_close; + +L_Yeti: + mes "[Cindy]"; + mes "\"Watch out, the Yetis!\""; + goto L_close; + +L_Reward: + mes "[Cindy]"; + mes "\"You are a hero! All these strong monsters!\""; + next; + mes "\"I've found this thing in the cave - it looks valuable. I want you to have it.\""; + next; + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + + @reward = rand(15); + if (@reward < 10) + goto L_Wizard_Hat; + getitem "WoodenStaff", 1; + QL_CINDY = 3; + goto L_Visit; + +L_Wizard_Hat: + // get a wizard hat in one of the ten colors - no white + setarray @wizardhats[0], 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209; + getitem @wizardhats[@reward], 1; + QL_CINDY = 3; + goto L_Visit; + +L_Visit: + mes "\"Thank you so much; please come to my home. It's the house at the beach.\""; + next; + mes "\"I'm sure my mother wants to thank you as well.\""; + goto L_close; + +L_Please_Visit: + mes "[Cindy]"; + mes "\"Thank you, thank you! You're a hero! Please come home with me to our house at the beach!\""; + goto L_close; + +L_To_Weak: + mes "You try to open the cage, but it's stuck. It seems you're too weak!"; + goto L_close; + +L_Not_Enough_Keys: + mes "You don't have enough keys to open the cage."; + goto L_close; + +L_Full_Inv: + mes "\"Oh, it seems you carry so much stuff - I will keep it for you until you can take it.\""; + goto L_close; + +L_close: + @KEYS_AMOUNT = 0; + @minLevel = 0; + @inventorylist_count = 0; + cleararray @wizardhats, 0, 10; + @reward = 0; + close; + +OnTimer5000: + setnpctimer 0; + if ($@FIGHT_YETI_STATUS != 0) + goto L_CaveLogic; + goto L_Return_1; + +L_Return_1: + $@FIGHT_YETI_PLAYER_COUNT = 0; + areatimer 0, "031-4", 0, 0, 95, 91, 10, "Cindy::OnTick"; + end; + +L_CaveLogic: + $@FIGHT_YETI_ROUND_PEN = $@FIGHT_YETI_PLAYER_COUNT; + if ($@FIGHT_YETI_ROUND_PEN > 60) + $@FIGHT_YETI_ROUND_PEN = 60; + if ($@FIGHT_YETI_PLAYER_COUNT <= 0) + goto L_CleanUp; + set $@FIGHT_YETI_ROUND_TIMER, $@FIGHT_YETI_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("031-4", "Cindy::OnPetDeath") < 0) + goto L_NextWave; + if ($@FIGHT_YETI_ROUND_TIMER + $@FIGHT_YETI_ROUND_PEN >= 120) + goto L_NextWave; + goto L_Return_1; + +L_NextWave: + $@FIGHT_YETI_ROUND_TIMER = 0; + $@FIGHT_YETI_WAVE = $@FIGHT_YETI_WAVE + 1; + if ($@FIGHT_YETI_WAVE > 10 + && $@YETI_COUNT == 0) + goto L_CleanUp; + if ($@FIGHT_YETI_WAVE > 10 + && $@FIGHT_YETI_WAVE < 22) + goto L_Return_1; + if ($@FIGHT_YETI_WAVE > 22) + areamonster "031-4", 0, 0, 95, 91, "", 1072, $@FIGHT_YETI_WAVE*2 + $@FIGHT_YETI_PLAYER_COUNT*5, "Cindy::OnPetDeath"; + if ($@FIGHT_YETI_WAVE > 22) + $@YETI_COUNT = $@YETI_COUNT + $@FIGHT_YETI_WAVE*2 + $@FIGHT_YETI_PLAYER_COUNT*5; + $@FIGHT_YETI_NUMBER = (5 + (1 * $@FIGHT_YETI_WAVE) + (2 * $@FIGHT_YETI_PLAYER_COUNT))/4; + $@YETI_COUNT = $@YETI_COUNT + $@FIGHT_YETI_NUMBER; + + areamonster "031-4", 0, 0, 95, 91, "", 1072, $@FIGHT_YETI_NUMBER, "Cindy::OnPetDeath"; + + $@msg$ = $@FIGHT_YETI_MESSAGES$[$@FIGHT_YETI_WAVE]; + if ($@msg$ == "") + goto L_Return_1; + mapannounce "031-4", $@msg$, 0; + mapannounce "031-3", $@msg$, 0; + $@msg$ = ""; + goto L_Return_1; + +OnTick: + if (ispcdead()) end; + $@FIGHT_YETI_PLAYER_COUNT = $@FIGHT_YETI_PLAYER_COUNT + 1; + end; + +OnPetDeath: + $@YETI_COUNT = $@YETI_COUNT - 1; + end; + +L_CleanUp: + areatimer 0, "031-4", 0, 0, 95, 91, 10, "Cindy::OnReward"; + $@FIGHT_YETI_STATUS = 0; + $@FIGHT_YETI_PLAYER_COUNT = 0; + $@FIGHT_YETI_WAVE = 0; + $@FIGHT_YETI_ROUND_TIMER = 0; + $@YETI_COUNT = 0; + $@FIGHT_YETI_ROUND_PEN = 0; + $@FIGHT_YETI_NUMBER = 0; + killmonster "031-4", "Cindy::OnPetDeath"; + stopnpctimer; + setnpctimer 0; + end; + +OnReward: + if (ispcdead()) end; + @bonus = (BaseLevel/2); + DailyQuestBonus = DailyQuestBonus + @bonus; + message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; + if (QL_CINDY != 1 ) + goto L_End; + QL_CINDY = 2; + message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you."; + BOSS_POINTS = BOSS_POINTS + 70; + message strcharinfo(0), "You gain 70 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + @bonus = 0; + end; + +OnInit: + setarray $@FIGHT_YETI_MESSAGES$[0], + "", // unused + // " : " is magic so that it says "global announcement from" + "Cindy : Yetis!", + "Cindy : Watch out!", + "Cindy : More of them are coming!", + "Cindy : Be careful! More of them!", + "Cindy : Attention! There is another bunch of them!", + "Cindy : Hang on! More of them!", + "Cindy : More Yetis! Will this never end?", + "Cindy : There are coming more and more!", + "Cindy : Watch your back! There are so many of them!", + "Cindy : This seems to be their final attack! I believe in you!"; + end; +} diff --git a/npc/031-4/mapflags.txt b/npc/031-4/mapflags.txt new file mode 100755 index 00000000..06a10489 --- /dev/null +++ b/npc/031-4/mapflags.txt @@ -0,0 +1,2 @@ +031-4 mapflag nosave 031-3,46,26 +//031-4 mapflag resave 031-3,46,26 diff --git a/npc/032-3/_import.txt b/npc/032-3/_import.txt new file mode 100644 index 00000000..4568ab30 --- /dev/null +++ b/npc/032-3/_import.txt @@ -0,0 +1,5 @@ +// Map 032-3: Outback Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/032-3/_mobs.txt", +"npc/032-3/_warps.txt", +"npc/032-3/mapflags.txt", diff --git a/npc/032-3/_mobs.txt b/npc/032-3/_mobs.txt new file mode 100644 index 00000000..0d96000c --- /dev/null +++ b/npc/032-3/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 032-3: Outback Cave mobs +032-3,90,44,4,5 monster Scorpion 1043,3,30000,100000 +032-3,44,23,14,11 monster Maggot 1026,7,30000,100000 +032-3,125,46,17,37 monster Crocotree 1010,13,30000,100000 +032-3,80,44,4,5 monster Toppy Blub 1009,5,30000,100000 +032-3,85,33,4,5 monster Frostiana 1012,5,30000,100000 +032-3,83,18,18,4 monster Yellow Rose 1060,8,30000,100000 +032-3,78,76,12,10 monster Yellow Rose 1060,8,30000,100000 +032-3,25,76,12,10 monster Little Blub 1007,11,300000,1000000 +032-3,46,51,17,9 monster Beehive 1056,11,30000,100000 +032-3,0,0,0,0 monster Manana Tree 1017,25,30000,100000 diff --git a/npc/032-3/_warps.txt b/npc/032-3/_warps.txt new file mode 100644 index 00000000..2d2f7039 --- /dev/null +++ b/npc/032-3/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 032-3: Outback Cave warps +032-3,128,34,0 warp #032-3_128_34 0,0,006-1,30,124 +032-3,56,61,0 warp #032-3_56_61 0,0,006-1,111,111 diff --git a/npc/032-3/mapflags.txt b/npc/032-3/mapflags.txt new file mode 100755 index 00000000..0ec0578b --- /dev/null +++ b/npc/032-3/mapflags.txt @@ -0,0 +1 @@ +//032-3 mapflag resave 006-1,36,18 diff --git a/npc/033-1/_import.txt b/npc/033-1/_import.txt new file mode 100644 index 00000000..a6b00e44 --- /dev/null +++ b/npc/033-1/_import.txt @@ -0,0 +1,11 @@ +// Map 033-1: snow Path +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/033-1/_mobs.txt", +"npc/033-1/_warps.txt", +"npc/033-1/backDoor.txt", +"npc/033-1/barbarianinit.txt", +"npc/033-1/birrod.txt", +"npc/033-1/kimarr.txt", +"npc/033-1/mapflags.txt", +"npc/033-1/traveler.txt", +"npc/033-1/yerrnk.txt", diff --git a/npc/033-1/_mobs.txt b/npc/033-1/_mobs.txt new file mode 100644 index 00000000..3fe7b330 --- /dev/null +++ b/npc/033-1/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 033-1: snow Path mobs +033-1,73,49,5,9 monster Wolvern 1117,2,100000,30000 +033-1,33,38,7,24 monster Penguin 1094,3,100000,30000 +033-1,56,87,25,21 monster Gamboge Plant 1038,15,100000,30000 +033-1,0,0,0,0 monster Reaper 1095,3,100000,30000 diff --git a/npc/033-1/_warps.txt b/npc/033-1/_warps.txt new file mode 100644 index 00000000..0387a765 --- /dev/null +++ b/npc/033-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 033-1: snow Path warps +033-1,22,20,0 warp #033-1_22_20 0,1,034-1,159,19 +033-1,119,70,0 warp #033-1_119_70 0,1,019-1,22,69 diff --git a/npc/033-1/backDoor.txt b/npc/033-1/backDoor.txt new file mode 100755 index 00000000..46c5d955 --- /dev/null +++ b/npc/033-1/backDoor.txt @@ -0,0 +1,9 @@ +033-1,86,28,0 script #KimarrBackDoor NPC45,0,0,{ + if ($@Fluffy_Hunting == 0) + goto L_Warp; + end; + +L_Warp: + warp "033-1", 77, 30; + end; +} diff --git a/npc/033-1/barbarianinit.txt b/npc/033-1/barbarianinit.txt new file mode 100755 index 00000000..2b14ada3 --- /dev/null +++ b/npc/033-1/barbarianinit.txt @@ -0,0 +1,25 @@ +- script #barbarian033_1init NPC32767,{ + end; + +OnInit: + $@Q_Barbarians_MASK = NIBBLE_0_MASK; + $@Q_Barbarians_SHIFT = NIBBLE_0_SHIFT; + $@Q_Barbarians_wolvern_amount = 16; + $@Q_Barbarians_Ambush_max = 0x00007FFF; + $@Q_Barbarians_Ambush0_flag = 0x00000001; + $@Q_Barbarians_Ambush1_flag = 0x00000002; + $@Q_Barbarians_Ambush2_flag = 0x00000004; + $@Q_Barbarians_Ambush3_flag = 0x00000008; + $@Q_Barbarians_Ambush4_flag = 0x00000010; + $@Q_Barbarians_Ambush5_flag = 0x00000020; + $@Q_Barbarians_Ambush6_flag = 0x00000040; + $@Q_Barbarians_Ambush7_flag = 0x00000080; + $@Q_Barbarians_Ambush8_flag = 0x00000100; + $@Q_Barbarians_Ambush9_flag = 0x00000200; + $@Q_Barbarians_Ambush10_flag = 0x00000400; + $@Q_Barbarians_Ambush11_flag = 0x00000800; + $@Q_Barbarians_Ambush12_flag = 0x00001000; + $@Q_Barbarians_Ambush13_flag = 0x00002000; + $@Q_Barbarians_Ambush14_flag = 0x00004000; + end; +} diff --git a/npc/033-1/birrod.txt b/npc/033-1/birrod.txt new file mode 100755 index 00000000..c23f8b83 --- /dev/null +++ b/npc/033-1/birrod.txt @@ -0,0 +1,263 @@ +033-1,72,27,0 script Birrod NPC217,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + set @wolvern_level, 40; // minimum level to do the wolvern hunting + @wolvern_exp = 5000; + + @minigame_exp = 5000; + + if (@state >= 6) goto L_Impressed; + if (@state == 5) goto L_Questions; + if (@state == 4) goto L_Wolverns; + if (@state == 3) goto L_Hunting; + if (@state == 2) goto L_Kimarr; + if (@state == 1) goto L_Fluffy; + + mes "[Barbarian]"; + mes "\"Welcome. My name is Birrod, warrior of the Mangarr."; + mes "We usually live high up in the snowy mountains, but we need to solve a problem, so we came down here.\""; + next; + mes "\"But this shouldn't concern you.\""; + goto L_close; + +L_Fluffy: + mes "[Birrod]"; + mes "\"Kimarr asked you to perform the Fluffy hunting? I'm curious how you're going to do it.\""; + mes "He grins."; + goto L_close; + +L_Kimarr: + mes "[Birrod]"; + mes "\"Great! Very well done! Welcome to our tribe.\""; + next; + mes "\"I think Kimarr has something for you.\""; + goto L_close; + +L_Hunting: + if (BaseLevel < @wolvern_level) + goto L_Weak; + mes "[Birrod]"; + mes "\"Hello, " + strcharinfo(0) + "! Would you like to prove your hunting skills again?\""; + next; + mes "\"I noticed some groups of Wolverns in the forest west of here which are unusually aggressive."; + mes "This makes it dangerous for all the small people from the nearby town to go there.\""; + next; + mes "\"To prove your skills, go to the forest and hunt down " + $@Q_Barbarians_wolvern_amount + " of the very aggressive Wolverns.\""; + next; + mes "\"There are also some Wolverns that behave normally and attack you only when you come too close to them."; + mes "Those are not the ones I mean, but those that seek the battle themselves.\""; + @state = 4; + callsub S_Update_Mask; + goto L_close; + +L_Wolverns: + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + goto L_Wolverns_Done; + mes "[Birrod]"; + mes "\"Greetings, my friend."; + mes "The aggressive wolverns are still roaming the forest west of here.\""; + next; + mes "\"This is your chance to prove your worth.\""; + goto L_close; + +L_Wolverns_Done: + @state = 5; + callsub S_Update_Mask; + wolvern_count = 0; + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + "!"; + mes "Good work. This area is much safer now.\""; + next; + getexp @wolvern_exp, 0; + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "\"Your skills are impressive. You are worthy to be called a warrior of the Mangarr, if you accept.\""; + next; + goto L_Questions; + +L_Questions: + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "Birrod has a very solemn look on his face."; + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + ", are you ready to become a full-fledged member of our tribe, the Mangarr?\""; + menu + "Yes, what do I need to do?",L_Next, + "That's why I'm here.",L_Next, + "Sorry, I have to go. See you.",L_No_Member; + +L_Next: + mes "Birrod nods earnestly."; + mes "[Birrod]"; + mes "\"I will ask you some questions."; + mes "Think well and be honest, because your answers will determine whether you are worthy.\""; + next; + mes "\"What's the most important thing for a true warrior?\""; + menu + "Strength!",L_Fail11, + "A good weapon.",L_Fail12, + "Bravery.",L_Success11; + +L_Fail11: + mes "[Birrod]"; + mes "\"Strength is indeed important for a warrior. But before you can show strength, you need to have something else.\""; + next; + goto L_No_Member; + +L_Fail12: + mes "[Birrod]"; + mes "\"Are you kidding?\""; + next; + goto L_No_Member; + +L_Success11: + mes "[Birrod]"; + mes "\"Wise words.\""; + next; + mes "\"What would you do if you are wounded but Yetis are attacking our tribe?\""; + menu + "Run as fast as I can.",L_Fail21, + "Fight no matter what.",L_Fail22, + "Try to hold them back until everyone is safe, then retreat.",L_Success21; + +L_Fail21: + mes "[Birrod]"; + mes "\"You will never become an accepted member of our tribe with that attitude.\""; + next; + goto L_No_Member; + +L_Fail22: + mes "[Birrod]"; + mes "\"Honorable, but stupid.\""; + next; + goto L_No_Member; + +L_Success21: + mes "[Birrod]"; + mes "\"Right.\""; + next; + mes "\"When you are on a hunting trip with your comrades and it's time to set up a camp in the evening, what things do you do?\""; + menu + "Take care of everyone who got wounded.",L_Success31, + "Pitch the tent and make a fire.",L_Success32, + "Lay down and rest.",L_Fail31; + +L_Success31: + mes "[Birrod]"; + mes "\"You're a caring person. Good.\""; + next; + goto L_Success3; + +L_Success32: + mes "[Birrod]"; + mes "\"You're diligent, good.\""; + next; + goto L_Success3; + +L_Fail31: + mes "[Birrod]"; + mes "\"You wouldn't make friends that way.\""; + next; + goto L_No_Member; + +L_Success3: + mes "\"What is your goal in life?\""; + menu + "Learn new things and see the world.",L_Success41, + "Become as powerful as I can.",L_Fail41, + "Protect the ones I love.",L_Success42; + +L_Success41: + mes "[Birrod]"; + mes "\"You're curious. An attribute we appreciate.\""; + next; + goto L_Success4; + +L_Fail41: + mes "[Birrod]"; + mes "\"You're seeking power? For what?\""; + next; + goto L_No_Member; + +L_Success42: + mes "[Birrod]"; + mes "\"An honorable goal.\""; + next; + goto L_Success4; + +L_Success4: + mes "\"What do you think is a good reason to fight and kill?\""; + menu + "Because I want it.",L_Fail51, + "To survive.",L_Success51, + "To protect someone in need.",L_Success52; + +L_Fail51: + mes "[Birrod]"; + mes "\"You think so?\""; + next; + goto L_No_Member; + +L_Success51: + mes "[Birrod]"; + mes "\"Right.\""; + next; + goto L_Success5; + +L_Success52: + mes "[Birrod]"; + mes "\"Yes, that's the most honorable reason.\""; + next; + goto L_Success5; + +L_Success5: + getexp @minigame_exp, 0; + addtoskill SKILL_RAGING, 1; + @state = 6; + callsub S_Update_Mask; + mes "You feel an exciting energy inside you."; + mes "[Birrod]"; + mes "\"You are now a warrior of the Mangarr.\""; + next; + mes "\"As a Mangarr warrior, you gain the ability to put back your own safety for Raging in battle with a tremendous power."; + mes "This power now lies within you, waiting for someone to help you focus on it.\""; + goto L_close; + +L_Impressed: + mes "[Birrod]"; + mes "\"I'm very proud that you're a member of the tribe.\""; + goto L_close; + +L_Not_Ready: + mes "[Birrod]"; + mes "\"" + strcharinfo(0) + ", you've shown great hunting skills and are an enrichment to our tribe."; + mes "But you still lack the needed mental skills to become a full member of our tribe.\""; + next; + mes "\"Roam this world to find more experienced persons than yourself to learn new things."; + mes "Then come back when you've gained the ability to focus your mind.\""; + goto L_close; + +L_No_Member: + mes "Birrod shakes his head."; + mes "[Birrod]"; + mes "\"Think again about your position in our tribe and what you want to achieve."; + mes "Come back when you feel better prepared.\""; + goto L_close; + +L_Weak: + mes "[Birrod]"; + mes "\"Hello, " + strcharinfo(0) + "! I might have a task for you when you've grown up a bit.\""; + goto L_close; + +L_close: + @state = 0; + @wolvern_level = 0; + @wolvern_exp = 0; + @minigame_exp = 0; + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/033-1/kimarr.txt b/npc/033-1/kimarr.txt new file mode 100755 index 00000000..74ae45a1 --- /dev/null +++ b/npc/033-1/kimarr.txt @@ -0,0 +1,405 @@ + + + + + +033-1,74,32,0 script Kimarr NPC218,{ + @halloween_npc_id = $@halloween_npc_kimarr; + callfunc "TrickOrTreat"; + + if ($@Fluffy_FighterID == getcharid(3)) + goto L_Attention; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + if (@state >= 3) goto L_Again; + if (@state == 2) goto L_Reward; + if (@state == 1) goto L_Ask; + + mes "[Barbarian]"; + mes "\"Greetings, little person.\""; + next; + mes "\"I am Kimarr, hunter and warrior of the Mangarr.\""; + next; + mes "\"You are very small and must be careful in these snowy mountains. It is cold, and dangerous monsters are here.\""; + menu + "Hello, my name is " + strcharinfo(0) + " and I'm not small. I'm a great warrior!",L_Next, + "I'm " + strcharinfo(0) + ", don't underestimate me. I'm an experienced adventurer!",L_Next, + "I'm the legendary " + strcharinfo(0) + ", I've fought countless battles.",L_Next; + +L_Next: + mes "Kimarr seems to be amused."; + mes "[Kimarr]"; + mes "\"Really? Do you want to prove it?\""; + menu + "Sure! What shall I do?",L_Continue, + "No, I don't need to prove anything.",L_close; + +L_Continue: + mes "\"Every young member of our tribe proves his or her worth by hunting monsters.\""; + next; + mes "\"The first monsters to hunt are Fluffies. Fluffies give a good meal for a young person and the fur can be used to make clothes and blankets.\""; + next; + @state = 1; + callsub S_Update_Mask; + goto L_ExplainGame; + +L_ExplainGame: + mes "[Kimarr]"; + mes "\"In that cave there are living Fluffies. They like to eat apples.\""; + next; + mes "\"I also saw one of them getting excited about one of those sweet things you call 'cake'.\""; + next; + mes "\"Go to the cave entrance and throw food on the floor to make them come out.\""; + next; + mes "\"You should be careful, other monsters living here might like the food as well.\""; + next; + mes "\"Hunt as many Fluffies as you can until I tell you to stop.\""; + next; + mes "\"Drop more food when no Fluffies are left.\""; + next; + goto L_Ask; + +L_Ask: + mes "[Kimarr]"; + mes "\"So, are you going to try?\""; + menu + "Yeah, let's start!",L_Game, + "Could you explain again?",L_ExplainGame, + "Can you tell me who were the most successful Fluffy hunters?",L_ShowRecord, + "Maybe later.",L_close; + +L_AlreadyGotReward: + npctalk strnpcinfo(0), strcharinfo(0) + " killed " + $@Fluffy_Kills + " Fluffies and has once again proven to be a good hunter."; + message strcharinfo(0), "Kimarr: Once again you prove your worth as a hunter! You killed " + $@Fluffy_Kills + " Fluffies."; + callsub S_Clean; + goto L_close; + +L_Reward1: + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + if (@state >= 2) + goto L_AlreadyGotReward; + + npctalk strnpcinfo(0), "Hooray! " + strcharinfo(0) + " killed " + $@Fluffy_Kills + " Fluffies and is now a worthy hunter."; + + // as far as I can tell, this fails because it won't resume from the "next" + // when the script is executed via the "OnFluffyDeath" callback + // (I haven't tried via the 301st call of OnTimer1000) + message strcharinfo(0), "Kimarr: Hooray! You hunted " + $@Fluffy_Kills + " Fluffies. Talk to me for your reward."; + + @state = 2; + callsub S_Update_Mask; + callsub S_Clean; + goto L_close; + +L_Reward: + mes "[Kimarr]"; + mes "\"That was very impressive. Now you can call yourself a hunter, " + strcharinfo(0) + ".\""; + next; + + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + @inventorylist_count = 0; + + mes "\"Take this as a symbol of your strength. You're a member of our tribe now.\""; + getitem "YetiSkinShirt", 1; + @state = 3; + callsub S_Update_Mask; + goto L_close; + +L_Full_Inv: + mes "\"You can't carry the reward I want to give you.\""; + goto L_close; + +L_Again: + mes "[Kimarr]"; + mes "\"Does the hunter " + strcharinfo(0) + " want to hunt some Fluffies again?\""; + menu + "Yeah!",L_Game, + "Can you tell me who were the most successful Fluffy hunters?",L_ShowRecord, + "Not now.",L_close; + +L_Game: + if ($@Fluffy_Hunting) + goto L_Someone_Else; + $@Fluffy_Hunting = 1; + $@Fluffy_Kills = 0; + $@Fluffy_PC_Deaths = PC_DIE_COUNTER; + $@Fluffy_Fighter$ = strcharinfo(0); + $@Fluffy_FighterID = getcharid(3); + $@Fluffy_Time = 180; + $@Fluffy_Min = 1 + (BaseLevel*7)/10; + + warp "033-1", 79, 34; + initnpctimer; + goto L_close; + +L_Someone_Else: + mes "[Kimarr]"; + mes "\"Someone else is hunting right now. Let's wait until that hunt has ended.\""; + goto L_close; + +L_Attention: + message strcharinfo(0), "Kimarr: You should be focused on hunting Fluffies, not talking."; + end; + +OnTimer1000: + if ($@Fluffy_Hunting == 3) + goto L_Action; + $@Fluffy_Hunting = $@Fluffy_Hunting + 1; + goto L_ContinueTimer; +L_Action: + if (attachrid($@Fluffy_FighterID) == 0) + goto L_GotOut; + if (getareausers("033-1", 79, 28, 88, 42) == 0) + goto L_GotOut; + if (PC_DIE_COUNTER > $@Fluffy_PC_Deaths) + goto L_Died; + if (getareausers("033-1", 79, 28, 88, 42) > 1) + areatimer 0, "033-1", 79, 28, 88, 42, 10, "Kimarr::OnTooMany"; + + if ($@Fluffy_Time == 180) + npctalk strnpcinfo(0), strcharinfo(0) + ", you have 3 minutes."; + if ($@Fluffy_Time == 120) + npctalk strnpcinfo(0), "You have 2 minutes left."; + if ($@Fluffy_Time == 60) + npctalk strnpcinfo(0), "You have 1 minute left."; + if ($@Fluffy_Time == 30) + npctalk strnpcinfo(0), "You have 30 seconds left."; + if ($@Fluffy_Time == 15) + npctalk strnpcinfo(0), "You have 15 seconds left."; + if ($@Fluffy_Time == 10) + npctalk strnpcinfo(0), "You have 10 seconds left."; + if ($@Fluffy_Time == 5) + npctalk strnpcinfo(0), "You have 5 seconds left."; + $@Fluffy_Time = $@Fluffy_Time - 1; + if ($@Fluffy_Time < 0) + goto L_TimeOver; + goto L_CheckDrops; + +L_ContinueTimer: + setnpctimer 0; + end; + +L_GotOut: + npctalk strnpcinfo(0), "What a strange thing... " + $@Fluffy_Fighter$ + " just disappeared!"; + callsub S_Clean; + end; + +OnTooMany: + if (getcharid(3) == $@Fluffy_FighterID) + end; + npctalk strnpcinfo(0), "Hey " + strcharinfo(0) + "! What are you doing there? This hunt is for " + $@Fluffy_Fighter$ + " alone!"; + warp "033-1", 77, 34; + end; + +L_Died: + warp "033-1", 77, 34; + message strcharinfo(0), "You are dead."; + npctalk strnpcinfo(0), "Oh no! " + $@Fluffy_Fighter$ + " got overwhelmed!"; + callsub S_Clean; + end; + +L_TimeOver: + message strcharinfo(0), "Your time is over."; + goto L_MaybeRecordScore; + +L_CheckDrops: + @Fluffy_RedApple = getareadropitem("033-1", 79, 29, 88, 42, "RedApple", 1); + @Fluffy_XmasCake = getareadropitem("033-1", 79, 29, 88, 42, "XmasCake", 1); + @Fluffy_Cake = getareadropitem("033-1", 79, 29, 88, 42, "Cake", 1); + @Fluffy_GreenApple = getareadropitem("033-1", 79, 29, 88, 42, "GreenApple", 1); + if (@Fluffy_RedApple || @Fluffy_XmasCake || @Fluffy_Cake || @Fluffy_GreenApple) + goto L_BeginHunting; + goto L_ContinueTimer; + +L_BeginHunting: + $@Fluffy_Spawn = @Fluffy_RedApple + 5 * @Fluffy_XmasCake + 3 * @Fluffy_Cake + @Fluffy_GreenApple; + // limit the number of monsters that can be spawned, to prevent people creating lag with massive amount of monsters + if (($@Fluffy_Spawn + $@Fluffy_Alive) <= 100) + goto L_SpawnFluffies; + message strcharinfo(0), "Wow, calm down, there are already too many Fluffies around here."; + $@Fluffy_Spawn = 100 - $@Fluffy_Alive; + if ($@Fluffy_Spawn <= 0) + goto L_ContinueTimer; + goto L_SpawnFluffies; + +L_SpawnFluffies: + areamonster "033-1", 79, 29, 88, 42, "", 1089, $@Fluffy_Spawn, "Kimarr::OnFluffyDeath"; + + $@Fluffy_Extra = 5 * @Fluffy_XmasCake + 3 * @Fluffy_Cake + 12 * ($@Fluffy_Alive + $@Fluffy_Spawn) + 7 * BaseLevel; + if ((BaseLevel > 40) && (rand($@Fluffy_Extra) > 500)) // Ice Goblin + areamonster "033-1", 79, 29, 88, 42, "", 1058, 1, "Kimarr::OnIceGoblinDeath"; + if ((BaseLevel > 60) && (rand($@Fluffy_Extra) > 550)) // Wolvern + areamonster "033-1", 79, 29, 88, 42, "", 1090, 1, "Kimarr::OnWolvernDeath"; + if ((BaseLevel > 70) && (rand($@Fluffy_Extra) > 600)) // Yeti + areamonster "033-1", 79, 29, 88, 42, "", 1072, 1, "Kimarr::OnYetiDeath"; + + $@Fluffy_Extra = 0; + @Fluffy_RedApple = 0; + @Fluffy_XmasCake = 0; + @Fluffy_Cake = 0; + @Fluffy_GreenApple = 0; + $@Fluffy_Alive = $@Fluffy_Alive + $@Fluffy_Spawn; + goto L_ContinueTimer; + +OnIceGoblinDeath: + @mobId = 1058; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnWolvernDeath: + @mobId = 1090; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnYetiDeath: + @mobId = 1072; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + end; + +OnFluffyDeath: + @mobId = 1089; + if ($@Fluffy_Hunting == 0) + end; + if (getcharid(3) != $@Fluffy_FighterID) + goto L_Punish; + @mobId = 0; + $@Fluffy_Kills = $@Fluffy_Kills + 1; + $@Fluffy_Alive = $@Fluffy_Alive - 1; + if ($@Fluffy_Alive != 0) + end; + if (attachrid($@Fluffy_FighterID) == 1) + goto L_Killedall; + goto L_GotOut; + +L_Punish: + if (@mobId == 1089) + areamonster "033-1", 79, 29, 88, 42, "", 1089, 1, "Kimarr::OnFluffyDeath"; + if (@mobId == 1058) + areamonster "033-1", 79, 29, 88, 42, "", 1058, 1, "Kimarr::OnIceGoblinDeath"; + if (@mobId == 1090) + areamonster "033-1", 79, 29, 88, 42, "", 1090, 1, "Kimarr::OnWolvernDeath"; + if (@mobId == 1072) + areamonster "033-1", 79, 29, 88, 42, "", 1072, 1, "Kimarr::OnYetiDeath"; + + npctalk strnpcinfo(0), strcharinfo(0) + "! This hunt is for " + $@Fluffy_Fighter$ + " alone!"; + heal -Hp, 0; + @mobId = 0; + end; + +L_Killedall: + message strcharinfo(0), "Good job, but you still have time to throw more food on the ground."; + end; + +S_Clean: + stopnpctimer; + $@Fluffy_Hunting = 0; + $@Fluffy_Time = 0; + $@Fluffy_PC_Deaths = 0; + $@Fluffy_Fighter$ = ""; + $@Fluffy_FighterID = 0; + $@Fluffy_Kills = 0; + $@Fluffy_Spawn = 0; + $@Fluffy_Alive = 0; + killmonster "033-1", "Kimarr::OnIceGoblinDeath"; + killmonster "033-1", "Kimarr::OnWolvernDeath"; + killmonster "033-1", "Kimarr::OnYetiDeath"; + killmonster "033-1", "Kimarr::OnFluffyDeath"; + @state = 0; + return; + +L_MaybeRecordScore: + warp "033-1", 77, 34; + if ($@Fluffy_Kills < $@Fluffy_Min) + goto L_NotGoodEnough; + @rank = 0; + goto L_MaybeInsertNext; + +L_MaybeInsertNext: + if ($@Fluffy_Kills > $Record_Fluffy_Kills[@rank]) + goto L_InsertScore; + // you already had a better score + if (strcharinfo(0) == $Record_Fluffy_Name$[@rank]) + goto L_Reward1; + @rank = @rank + 1; + if (@rank == MAX_HIGH_SCORES) + goto L_Reward1; + goto L_MaybeInsertNext; + +L_InsertScore: + @loop = @rank; + goto L_FindLastScore; + +L_FindLastScore: + // comment this out to allow the player to be in the list more than once + // though actually, it might be better just to assume the list is full + if (strcharinfo(0) == $Record_Fluffy_Name$[@loop]) + goto L_MoveStuff; + + @loop = @loop + 1; + if (@loop == MAX_HIGH_SCORES) + goto L_MoveStuff; + goto L_FindLastScore; + +L_MoveStuff: + if (@loop == @rank) + goto L_FinallyInsertMe; + $Record_Fluffy_Kills[@loop] = $Record_Fluffy_Kills[@loop - 1]; + $Record_Fluffy_Name$[@loop] = $Record_Fluffy_Name$[@loop - 1]; + $Record_Fluffy_Date$[@loop] = $Record_Fluffy_Date$[@loop - 1]; + @loop = @loop - 1; + goto L_MoveStuff; + +L_FinallyInsertMe: + $Record_Fluffy_Kills[@rank] = $@Fluffy_Kills; + $Record_Fluffy_Name$[@rank] = strcharinfo(0); + callfunc "time_stamp"; + $Record_Fluffy_Date$[@rank] = @ts_date$ + " " + @ts_time$; + @ts_date$ = ""; + @ts_time$ = ""; + goto L_Reward1; + +L_NotGoodEnough: + npctalk strnpcinfo(0), "What a disappointment, " + strcharinfo(0) + " hunted only " + $@Fluffy_Kills + " Fluffies."; + message strcharinfo(0), "Kimarr: What a disappointment, you hunted only " + $@Fluffy_Kills + " Fluffies."; + callsub S_Clean; + end; + +L_ShowRecord: + @rank = 0; + @loop = 0; + goto L_ShowNextRecord; + +L_ShowNextRecord: + if ($Record_Fluffy_Kills[@loop] == 0) + goto L_close; + mes (@loop + 1) + " - " + $Record_Fluffy_Name$[@loop] + " - " + $Record_Fluffy_Kills[@loop] + " Fluffies killed at " + $Record_Fluffy_Date$[@loop]; + @loop = @loop + 1; + goto L_ShowNextRecord; + +L_close: + // clear all temporary player variables that are not otherwise cleared + + // it is not feasible to otherwise clear @loop + // but, not all jumpers to L_close have necessarily used it ... + // still, I think it's a good precent to ALWAYS exit via L_close + @loop = 0; + + // if you unset @state, it might break the script + // If only we had the concept of "local constants" ... + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/033-1/mapflags.txt b/npc/033-1/mapflags.txt new file mode 100755 index 00000000..5887f1d6 --- /dev/null +++ b/npc/033-1/mapflags.txt @@ -0,0 +1 @@ +//033-1 mapflag resave 033-1,67,33 diff --git a/npc/033-1/traveler.txt b/npc/033-1/traveler.txt new file mode 100755 index 00000000..0e40675d --- /dev/null +++ b/npc/033-1/traveler.txt @@ -0,0 +1,7 @@ + +033-1,63,30,0 script Khoenan the Traveler NPC103,{ + @npcname$ = "Khoenan"; + @NpcTravelBit = $@barbarians_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/033-1/yerrnk.txt b/npc/033-1/yerrnk.txt new file mode 100755 index 00000000..0e83a759 --- /dev/null +++ b/npc/033-1/yerrnk.txt @@ -0,0 +1,180 @@ +033-1,66,28,0 script Yerrnk NPC216,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + @yeti_level = 70; + + if (@state == 9) goto L_Done; + if (@state == 8) goto L_Yeti_Success; + if (@state == 7) goto L_Hunt_Yeti; + if (@state == 6) goto L_Warrior; + if (@state == 5) goto L_Birrod; + if (@state == 4) goto L_Sorrow; + if (@state == 3) goto L_Duty; + if (@state == 2) goto L_Kimarr; + if (@state == 1) goto L_Fluffy; + + mes "[Barbarian]"; + mes "\"Hello. I'm Yerrnk, first warrior of the Mangarr.\""; + next; + mes "Yerrnk looks at you cautiously."; + mes "[Yerrnk]"; + mes "\"Please take care of your own business.\""; + goto L_close; + +L_Fluffy: + mes "[Yerrnk]"; + mes "\"Kimarr talks too much sometimes.\""; + mes "He sighs."; + next; + mes "[Yerrnk]"; + mes "\"Are you going to accept Kimarr's task? It's an ancient ceremony in our tribe. A young member is accepted as an adult after completing it.\""; + goto L_close; + +L_Kimarr: + mes "[Yerrnk]"; + mes "\"I think Kimarr wants to give you something.\""; + goto L_close; + +L_Duty: + mes "[Yerrnk]"; + mes "\"I'm not sure if you are aware about the meaning of your actions.\""; + next; + mes "\"You passed the initiation rite for hunters of our tribe. That means now you are a hunter of our tribe, with all the rights and duties that come along with that.\""; + next; + mes "\"So you'll have to obey our laws and traditions, protect and help any member of our tribe that is in need, and show neither weakness nor fear in battle.\""; + next; + mes "\"Keep this in mind. If you fail you'll have to receive the elders' judgement.\""; + goto L_close; + +L_Sorrow: + mes "[Yerrnk]"; + mes "\"I noticed that you're getting along with Kimarr and Birrod very well. That's good.\""; + mes "He smiles, but then an expression of worry returns to his face."; + next; + goto L_Mission; + +L_Mission: + mes "[Yerrnk]"; + mes "\"Our tribe is going through dire times. We have lived in harmony with the mountain since time beyond memory."; + mes "Life is hard in the snowy mountains, but this life suits our nature.\""; + next; + mes "\"Some weeks ago the Yetis started to act very strangely. Usually they are very shy, but now...."; + mes "They left the secluded areas high up in the mountains they used to live on and started roaming our hunting grounds.\""; + next; + mes "\"It became very dangerous to leave the village, so it's even harder to gather enough food to survive."; + mes "Not only this, but the Yetis are getting more daring every day. They might attack the village itself sooner or later.\""; + next; + mes "\"Other wild animals are more aggressive as well, though the Yetis are the most dangerous."; + mes "Something like this has never happened before. We have no idea what could cause the animals to behave like this.\""; + next; + mes "\"That's why we were sent on a mission to seek help from the Sages of Kaizei."; + mes "The Sages are wizards of great power and wisdom, and we hope they might be able to give us advice.\""; + next; + mes "\"We already went to Sage Nikolai, who's residence is located in the same snow mountains we live in."; + mes "But there happened some severe accident, so they weren't able to spent any attention to our problem and might rather need help themselves.\""; + next; + mes "\"That's why we came down here to search for Santa, he's one of the most powerful of the Sages.\""; + goto L_close; + +L_Birrod: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + ", I have to admit that I'm surprised by your skills."; + mes "You've proven your bravery and strength.\""; + next; + if (getskilllv(SKILL_POOL) == 0) + goto L_Not_Ready; + mes "\"Please talk to Birrod to receive the initiation rite to become a warrior of the Mangarr.\""; + menu + "Alright.",L_close, + "Can you tell me again what you are here for?",L_Mission; + +L_Not_Ready: + mes "[Yerrnk]"; + mes "\"But you're not yet ready to become a fully accepted warrior of our tribe."; + mes "You should travel the world to gain the ability to focus on your inner strength.\""; + menu + "Alright.",L_close, + "What are you doing down here?",L_Mission; + +L_Warrior: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + ", welcome back!"; + mes "Do you have any question?\""; + menu + "Everything's all right, thanks.",L_close, + "What are you doing down here?",L_Mission, + "Can you explain the Raging ability to me?",L_Skill, + "Do you have a task for me?",L_Task; + +L_Skill: + mes "[Yerrnk]"; + mes "\"As a warrior of our tribe it should be the most important thing to you to defend weaker members of the tribe."; + mes "To achieve this goal our warriors are training the skill to stand the pain of being hit and even use it to get into a state of rage.\""; + next; + mes "\"It works only in a melee fight, when you hear your opponent gasping, smell his sweat, and feel the heat of his body.\""; + next; + mes "Yerrnk gets excited, then he pauses a moment to calm down."; + mes "\"Basically you neglect of your own defense but gain the ability to hit your enemy with outstanding might.\""; + next; + mes "[Yerrnk]"; + mes "\"You can imagine that this creates some danger. That's why we usually fight as a group, so a weakened warrior can step back and recover while the others continue to fight."; + mes "It's also beneficial to have a healer, but very few members of our tribe are born with the ability to wield magic.\""; + goto L_close; + +L_Task: + if (BaseLevel >= @yeti_level) + goto L_Yeti; + mes "[Yerrnk]"; + mes "\"Not at the moment."; + mes "Try to stop by later and use the time to practice your abilities.\""; + goto L_close; + +L_Yeti: + mes "[Yerrnk]"; + mes "\"Indeed, there's something to do that needs a competent warrior."; + mes "We've got reports about a single Yeti prowling around one of the houses in the woods west of here.\""; + next; + mes "\"If you dare to take on this task, seek that Yeti and make the area secure again."; + mes "To find the house, enter the forest and then go first south and then west.\""; + @state = 7; + callsub S_Update_Mask; + goto L_close; + +L_Hunt_Yeti: + mes "[Yerrnk]"; + mes "\"That Yeti is still roaming in the forest west of here."; + mes "To find the house it's prowling around, enter the forest and then go first south and then west.\""; + menu + "I'm on it.",L_close, + "What are you doing down here?",L_Mission, + "Can you explain the Raging ability to me?",L_Skill; + +L_Yeti_Success: + mes "[Yerrnk]"; + mes "\"" + strcharinfo(0) + "! You made it!"; + mes "You proved that you're one of the most skilled warriors of our tribe. Please have this.\""; + getitem "LeatherTrousers", 1; + @state = 9; + callsub S_Update_Mask; + goto L_close; + +L_Done: + mes "Yerrnk smiles at you."; + mes "[Yerrnk]"; + mes "\"Welcome back, great warrior.\""; + menu + "What's the reason you came here?",L_Mission, + "Can you explain the raging ability to me?",L_Skill, + "(Leave)",L_close; + +L_close: + @state = 0; + @yeti_level = 0; + close; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) + | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/034-1/_import.txt b/npc/034-1/_import.txt new file mode 100644 index 00000000..319720b3 --- /dev/null +++ b/npc/034-1/_import.txt @@ -0,0 +1,7 @@ +// Map 034-1: Snow Forest +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/034-1/_mobs.txt", +"npc/034-1/_warps.txt", +"npc/034-1/ambushs.txt", +"npc/034-1/mapflags.txt", +"npc/034-1/yetiSpawn.txt", diff --git a/npc/034-1/_mobs.txt b/npc/034-1/_mobs.txt new file mode 100644 index 00000000..4bf39ccd --- /dev/null +++ b/npc/034-1/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 034-1: Snow Forest mobs +034-1,0,0,0,0 monster Penguin 1094,4,100000,30000 +034-1,0,0,0,0 monster Cuco 1020,25,100000,30000 +034-1,0,0,0,0 monster Reaper 1095,5,100000,30000 +034-1,0,0,0,0 monster Gamboge Plant 1038,25,100000,30000 +034-1,0,0,0,0 monster Demonic Spirit 1112,4,100000,30000 +034-1,1,1,0,0 monster Bad Bee 1058,25,100000,30000 diff --git a/npc/034-1/_warps.txt b/npc/034-1/_warps.txt new file mode 100644 index 00000000..50230ced --- /dev/null +++ b/npc/034-1/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 034-1: Snow Forest warps +034-1,160,20,0 warp #034-1_160_20 0,1,033-1,23,19 +034-1,16,103,0 warp #034-1_16_103 0,2,045-1,176,133 +034-1,15,31,0 warp #034-1_15_31 0,1,045-1,174,59 +034-1,95,18,0 warp #034-1_95_18 1,0,046-1,94,123 +034-1,31,68,0 warp #034-1_31_68 0,0,034-2,28,31 +034-1,64,99,0 warp #034-1_64_99 0,0,034-2,73,29 diff --git a/npc/034-1/ambushs.txt b/npc/034-1/ambushs.txt new file mode 100755 index 00000000..71eaa4e0 --- /dev/null +++ b/npc/034-1/ambushs.txt @@ -0,0 +1,870 @@ + +034-1,118,59,0 script #Ambush0Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush0_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush0_Spawn > 0) + end; + $@Ambush0VictimID = getcharid(3); + donpcevent "#Ambush0::OnAmbush"; + end; +} + +034-1,118,59,0 script #Ambush0 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush0VictimID) == 0) + goto L_Clean; + $@Ambush0_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 115, 56, 121, 62, "", 1090, $@Ambush0_Spawn, "#Ambush0::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush0_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush0_Spawn = $@Ambush0_Spawn - 1; + + if (($@Ambush0VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush0_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush0VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush0_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,94,91,0 script #Ambush1Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush1_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush1_Spawn > 0) + end; + $@Ambush1VictimID = getcharid(3); + donpcevent "#Ambush1::OnAmbush"; + end; +} + +034-1,94,91,0 script #Ambush1 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush1VictimID) == 0) + goto L_Clean; + $@Ambush1_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 91, 88, 97, 94, "", 1090, $@Ambush1_Spawn, "#Ambush1::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush1_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush1_Spawn = $@Ambush1_Spawn - 1; + + if (($@Ambush1VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush1_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush1VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush1_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,122,35,0 script #Ambush2Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush2_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush2_Spawn > 0) + end; + $@Ambush2VictimID = getcharid(3); + donpcevent "#Ambush2::OnAmbush"; + end; +} + +034-1,122,35,0 script #Ambush2 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush2VictimID) == 0) + goto L_Clean; + $@Ambush2_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 119, 32, 125, 38, "", 1090, $@Ambush2_Spawn, "#Ambush2::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush2_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush2_Spawn = $@Ambush2_Spawn - 1; + + if (($@Ambush2VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush2_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush2VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush2_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,83,44,0 script #Ambush3Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush3_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush3_Spawn > 0) + end; + $@Ambush3VictimID = getcharid(3); + donpcevent "#Ambush3::OnAmbush"; + end; +} + +034-1,83,44,0 script #Ambush3 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush3VictimID) == 0) + goto L_Clean; + $@Ambush3_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 80, 41, 86, 47, "", 1090, $@Ambush3_Spawn, "#Ambush3::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush3_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush3_Spawn = $@Ambush3_Spawn - 1; + + if (($@Ambush3VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush3_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush3VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush3_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,74,28,0 script #Ambush4Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush4_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush4_Spawn > 0) + end; + $@Ambush4VictimID = getcharid(3); + donpcevent "#Ambush4::OnAmbush"; + end; +} + +034-1,74,28,0 script #Ambush4 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush4VictimID) == 0) + goto L_Clean; + $@Ambush4_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 71, 25, 77, 31, "", 1090, $@Ambush4_Spawn, "#Ambush4::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush4_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush4_Spawn = $@Ambush4_Spawn - 1; + + if (($@Ambush4VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush4_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush4VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush4_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,26,44,0 script #Ambush5Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush5_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush5_Spawn > 0) + end; + $@Ambush5VictimID = getcharid(3); + donpcevent "#Ambush5::OnAmbush"; + end; +} + +034-1,26,44,0 script #Ambush5 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush5VictimID) == 0) + goto L_Clean; + $@Ambush5_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 23, 41, 29, 47, "", 1090, $@Ambush5_Spawn, "#Ambush5::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush5_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush5_Spawn = $@Ambush5_Spawn - 1; + + if (($@Ambush5VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush5_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush5VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush5_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,50,47,0 script #Ambush6Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush6_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush6_Spawn > 0) + end; + $@Ambush6VictimID = getcharid(3); + donpcevent "#Ambush6::OnAmbush"; + end; +} + +034-1,50,47,0 script #Ambush6 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush6VictimID) == 0) + goto L_Clean; + $@Ambush6_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 47, 44, 53, 50, "", 1090, $@Ambush6_Spawn, "#Ambush6::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush6_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush6_Spawn = $@Ambush6_Spawn - 1; + + if (($@Ambush6VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush6_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush6VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush6_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,36,62,0 script #Ambush7Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush7_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush7_Spawn > 0) + end; + $@Ambush7VictimID = getcharid(3); + donpcevent "#Ambush7::OnAmbush"; + end; +} + +034-1,36,62,0 script #Ambush7 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush7VictimID) == 0) + goto L_Clean; + $@Ambush7_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 33, 59, 39, 65, "", 1090, $@Ambush7_Spawn, "#Ambush7::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush7_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush7_Spawn = $@Ambush7_Spawn - 1; + + if (($@Ambush7VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush7_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush7VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush7_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,26,95,0 script #Ambush8Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush8_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush8_Spawn > 0) + end; + $@Ambush8VictimID = getcharid(3); + donpcevent "#Ambush8::OnAmbush"; + end; +} + +034-1,26,95,0 script #Ambush8 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush8VictimID) == 0) + goto L_Clean; + $@Ambush8_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 23, 92, 29, 98, "", 1090, $@Ambush8_Spawn, "#Ambush8::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush8_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush8_Spawn = $@Ambush8_Spawn - 1; + + if (($@Ambush8VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush8_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush8VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush8_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,56,91,0 script #Ambush9Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush9_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush9_Spawn > 0) + end; + $@Ambush9VictimID = getcharid(3); + donpcevent "#Ambush9::OnAmbush"; + end; +} + +034-1,56,91,0 script #Ambush9 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush9VictimID) == 0) + goto L_Clean; + $@Ambush9_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 53, 88, 59, 94, "", 1090, $@Ambush9_Spawn, "#Ambush9::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush9_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush9_Spawn = $@Ambush9_Spawn - 1; + + if (($@Ambush9VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush9_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush9VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush9_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,65,66,0 script #Ambush10Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush10_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush10_Spawn > 0) + end; + $@Ambush10VictimID = getcharid(3); + donpcevent "#Ambush10::OnAmbush"; + end; +} + +034-1,65,66,0 script #Ambush10 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush10VictimID) == 0) + goto L_Clean; + $@Ambush10_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 62, 63, 68, 69, "", 1090, $@Ambush10_Spawn, "#Ambush10::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush10_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush10_Spawn = $@Ambush10_Spawn - 1; + + if (($@Ambush10VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush10_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush10VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush10_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,86,68,0 script #Ambush11Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush11_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush11_Spawn > 0) + end; + $@Ambush11VictimID = getcharid(3); + donpcevent "#Ambush11::OnAmbush"; + end; +} + +034-1,86,68,0 script #Ambush11 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush11VictimID) == 0) + goto L_Clean; + $@Ambush11_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 83, 65, 89, 71, "", 1090, $@Ambush11_Spawn, "#Ambush11::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush11_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush11_Spawn = $@Ambush11_Spawn - 1; + + if (($@Ambush11VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush11_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush11VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush11_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,101,79,0 script #Ambush12Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush12_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush12_Spawn > 0) + end; + $@Ambush12VictimID = getcharid(3); + donpcevent "#Ambush12::OnAmbush"; + end; +} + +034-1,101,79,0 script #Ambush12 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush12VictimID) == 0) + goto L_Clean; + $@Ambush12_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 98, 76, 104, 82, "", 1090, $@Ambush12_Spawn, "#Ambush12::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush12_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush12_Spawn = $@Ambush12_Spawn - 1; + + if (($@Ambush12VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush12_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush12VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush12_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,124,88,0 script #Ambush13Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush13_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush13_Spawn > 0) + end; + $@Ambush13VictimID = getcharid(3); + donpcevent "#Ambush13::OnAmbush"; + end; +} + +034-1,124,88,0 script #Ambush13 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush13VictimID) == 0) + goto L_Clean; + $@Ambush13_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 121, 85, 127, 91, "", 1090, $@Ambush13_Spawn, "#Ambush13::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush13_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush13_Spawn = $@Ambush13_Spawn - 1; + + if (($@Ambush13VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush13_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush13VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush13_Spawn <= 0) + goto L_Clean; + end; +} + + +034-1,117,103,0 script #Ambush14Trigger NPC32767,2,2,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 4) + end; + + if (@ambushs034 == $@Q_Barbarians_Ambush_max) + @ambushs034 = 0; + if (@ambushs034 & $@Q_Barbarians_Ambush14_flag) + end; + if (rand(50) < wolvern_count) + end; + + if ($@Ambush14_Spawn > 0) + end; + $@Ambush14VictimID = getcharid(3); + donpcevent "#Ambush14::OnAmbush"; + end; +} + +034-1,117,103,0 script #Ambush14 NPC32767,{ +end; + +OnAmbush: + if (attachrid($@Ambush14VictimID) == 0) + goto L_Clean; + $@Ambush14_Spawn = 3 + rand(2); + message strcharinfo(0), "An ambush!"; + areamonster "034-1", 114, 100, 120, 106, "", 1090, $@Ambush14_Spawn, "#Ambush14::OnWolvernDeath"; + @ambushs034 = @ambushs034 | $@Q_Barbarians_Ambush14_flag; + end; + +OnWolvernDeath: + @mobId = 1090; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + + $@Ambush14_Spawn = $@Ambush14_Spawn - 1; + + if (($@Ambush14VictimID == getcharid(3)) && (@state == 4)) + goto L_Count; + if ($@Ambush14_Spawn > 0) + end; + goto L_Clean; + +L_Clean: + $@Ambush14VictimID = 0; + end; + +L_Count: + wolvern_count = wolvern_count + 1; + if (wolvern_count >= $@Q_Barbarians_wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + if ($@Ambush14_Spawn <= 0) + goto L_Clean; + end; +} + diff --git a/npc/034-1/mapflags.txt b/npc/034-1/mapflags.txt new file mode 100755 index 00000000..5af27ecb --- /dev/null +++ b/npc/034-1/mapflags.txt @@ -0,0 +1 @@ +//034-1 mapflag resave 033-1,67,33 diff --git a/npc/034-1/yetiSpawn.txt b/npc/034-1/yetiSpawn.txt new file mode 100755 index 00000000..c8668101 --- /dev/null +++ b/npc/034-1/yetiSpawn.txt @@ -0,0 +1,58 @@ + +034-1,79,98,0 script #Yerrnk_YetiTrigger NPC32767,1,3,{ + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 7) + end; + + if ($@Yerrnk_Yeti_Active != 0) + end; + $@Yerrnk_Yetifighter_ID = getcharid(3); + $@Yerrnk_Yeti_Active = 1; + donpcevent "#Yerrnk_Yeti::OnYeti"; + end; +} + +034-1,78,98,0 script #Yerrnk_Yeti NPC32767,{ +end; + +OnYeti: + if (attachrid($@Yerrnk_Yetifighter_ID) == 0) + goto L_Abort; + + message strcharinfo(0), "There is the Yeti!"; + areamonster "034-1", 67, 93, 74, 102, "", 1072, 1, "#Yerrnk_Yeti::OnYetiDeath"; + end; + +L_Abort: + $@Yerrnk_Yeti_Active = 0; + $@Yerrnk_Yetifighter_ID = 0; + end; + +OnYetiDeath: + @mobId = 1072; + + @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT); + if (@state != 7) + goto L_NonQuestKill; + @state = 8; + callsub S_Update_Mask; + BOSS_POINTS = BOSS_POINTS + 40; + message strcharinfo(0), "You defeated the Yeti and gain 40 Boss Points giving you a total of " + BOSS_POINTS + "."; + goto L_End; + +L_End: + $@Yerrnk_Yeti_Active = 0; + $@Yerrnk_Yetifighter_ID = 0; + end; + +L_NonQuestKill: + message strcharinfo(0), "The dying Yeti takes you along to the other side."; + heal -Hp, 0; + goto L_End; + +S_Update_Mask: + set QUEST_Barbarians, + (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) + | (@state << $@Q_Barbarians_SHIFT); + return; +} diff --git a/npc/034-2/_import.txt b/npc/034-2/_import.txt new file mode 100644 index 00000000..d4f4f5ec --- /dev/null +++ b/npc/034-2/_import.txt @@ -0,0 +1,4 @@ +// Map 034-2: Trappers Huts +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/034-2/_warps.txt", +"npc/034-2/mapflags.txt", diff --git a/npc/034-2/_warps.txt b/npc/034-2/_warps.txt new file mode 100644 index 00000000..1256bb09 --- /dev/null +++ b/npc/034-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 034-2: Trappers Huts warps +034-2,28,32,0 warp #034-2_28_32 0,0,034-1,31,69 +034-2,73,30,0 warp #034-2_73_30 0,0,034-1,64,100 diff --git a/npc/034-2/mapflags.txt b/npc/034-2/mapflags.txt new file mode 100755 index 00000000..8e84aaa2 --- /dev/null +++ b/npc/034-2/mapflags.txt @@ -0,0 +1 @@ +//034-2 mapflag resave 033-1,67,33 diff --git a/npc/035-2/_import.txt b/npc/035-2/_import.txt new file mode 100644 index 00000000..693499e7 --- /dev/null +++ b/npc/035-2/_import.txt @@ -0,0 +1,7 @@ +// Map 035-2: None +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/035-2/casino.txt", +"npc/035-2/emblems.txt", +"npc/035-2/koga.txt", +"npc/035-2/mapflags.txt", +"npc/035-2/shops.txt", diff --git a/npc/035-2/casino.txt b/npc/035-2/casino.txt new file mode 100755 index 00000000..0df32fd1 --- /dev/null +++ b/npc/035-2/casino.txt @@ -0,0 +1,9 @@ +035-2,34,37,0 script Slots#4 NPC400,{ + callfunc "SlotMachine"; + close; +} + +035-2,36,37,0 script Slots#5 NPC400,{ + callfunc "SlotMachine"; + close; +} diff --git a/npc/035-2/emblems.txt b/npc/035-2/emblems.txt new file mode 100755 index 00000000..9b1aea0c --- /dev/null +++ b/npc/035-2/emblems.txt @@ -0,0 +1,36 @@ +035-2,28,27,0 script #k1city1e NPC410,{ + end; + OnInit: + disablenpc "#k1city1e"; + end; +} +035-2,28,27,0 script #k1city1d NPC411,{ + end; +} + +035-2,30,27,0 script #k1city2e NPC412,{ + end; + OnInit: + disablenpc "#k1city2e"; + end; +} +035-2,30,27,0 script #k1city2d NPC413,{ + end; +} + +035-2,32,27,0 script #k1city3e NPC414,{ + end; + OnInit: + disablenpc "#k1city3e"; + end; +} +035-2,32,27,0 script #k1city3d NPC415,{ + end; +} + +035-2,32,27,0 script #k1sound NPC127,{ + end; + OnCommandDing: + specialeffect 402; + end; +} diff --git a/npc/035-2/koga.txt b/npc/035-2/koga.txt new file mode 100755 index 00000000..c1a25075 --- /dev/null +++ b/npc/035-2/koga.txt @@ -0,0 +1,31 @@ + +035-2,39,29,0 script #KogaExit NPC45,0,1,{ + mes "Disembark the ferry for "+$@MainDocks$[$@MainCurrentDock]+"?"; + menu + "Yes.", L_Leave, + "Nevermind", L_close; + +L_Leave: + if ($@MainCurrentDock == 0) + goto L_Hurnscald; + if ($@MainCurrentDock == 1) + goto L_Nivalis; + if ($@MainCurrentDock == 2) + goto L_Tulimshar; + goto L_close; + +L_Tulimshar: + warp "001-1", 63, 73; + goto L_close; + +L_Hurnscald: + warp "008-1", 137, 64; + goto L_close; + +L_Nivalis: + warp "031-1", 95, 109; + goto L_close; + +L_close: + close; +} diff --git a/npc/035-2/mapflags.txt b/npc/035-2/mapflags.txt new file mode 100755 index 00000000..a9c3958f --- /dev/null +++ b/npc/035-2/mapflags.txt @@ -0,0 +1,2 @@ +//035-2 mapflag town +//035-2 mapflag resave 035-2,20,21 diff --git a/npc/035-2/shops.txt b/npc/035-2/shops.txt new file mode 100755 index 00000000..05a2987e --- /dev/null +++ b/npc/035-2/shops.txt @@ -0,0 +1,11 @@ + +035-2,23,38,0 shop Cooky NPC213,539:87,657:10,503:10 + +035-2,23,35,0 script Bunkmaster Phict NPC212,{ + @npcname$ = "Bunkmaster Phict"; + @Cost = 100; + callfunc "Inn"; + @npcname$ = ""; + @Cost = 0; + close; +} diff --git a/npc/036-2/_import.txt b/npc/036-2/_import.txt new file mode 100644 index 00000000..9f6bc03f --- /dev/null +++ b/npc/036-2/_import.txt @@ -0,0 +1,7 @@ +// Map 036-2: None +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/036-2/casino.txt", +"npc/036-2/emblems.txt", +"npc/036-2/koga-candor.txt", +"npc/036-2/mapflags.txt", +"npc/036-2/shops.txt", diff --git a/npc/036-2/casino.txt b/npc/036-2/casino.txt new file mode 100755 index 00000000..158ecfae --- /dev/null +++ b/npc/036-2/casino.txt @@ -0,0 +1,9 @@ +036-2,34,37,0 script Slots#6 NPC400,{ + callfunc "SlotMachine"; + close; +} + +036-2,36,37,0 script Slots#7 NPC400,{ + callfunc "SlotMachine"; + close; +} diff --git a/npc/036-2/emblems.txt b/npc/036-2/emblems.txt new file mode 100755 index 00000000..de61902b --- /dev/null +++ b/npc/036-2/emblems.txt @@ -0,0 +1,26 @@ +036-2,29,27,0 script #k2city1e NPC412,{ + end; + OnInit: + disablenpc "#k2city1e"; + end; +} +036-2,29,27,0 script #k2city1d NPC413,{ + end; +} + +036-2,31,27,0 script #k2city2e NPC416,{ + end; + OnInit: + disablenpc "#k2city2e"; + end; +} +036-2,31,27,0 script #k2city2d NPC417,{ + end; +} + +036-2,32,27,0 script #k2sound NPC127,{ + end; + OnCommandDing: + specialeffect 402; + end; +} diff --git a/npc/036-2/koga-candor.txt b/npc/036-2/koga-candor.txt new file mode 100755 index 00000000..97d0c722 --- /dev/null +++ b/npc/036-2/koga-candor.txt @@ -0,0 +1,25 @@ + +036-2,39,29,0 script #KogaCandorExit NPC45,0,1,{ + mes "Disembark the ferry for "+$@CandorDocks$[$@CandorCurrentDock]+"?"; + menu + "Yes.", L_Leave, + "Nevermind", L_close; + +L_Leave: + if ($@CandorCurrentDock == 0) + goto L_Candor; + if ($@CandorCurrentDock == 1) + goto L_Hurnscald; + goto L_close; + +L_Hurnscald: + warp "008-1", 137, 75; + goto L_close; + +L_Candor: + warp "029-1", 46, 109; + goto L_close; + +L_close: + close; +} diff --git a/npc/036-2/mapflags.txt b/npc/036-2/mapflags.txt new file mode 100755 index 00000000..0a2e8b08 --- /dev/null +++ b/npc/036-2/mapflags.txt @@ -0,0 +1,2 @@ +//036-2 mapflag town +//036-2 mapflag resave 036-2,20,21 diff --git a/npc/036-2/shops.txt b/npc/036-2/shops.txt new file mode 100755 index 00000000..de381bd8 --- /dev/null +++ b/npc/036-2/shops.txt @@ -0,0 +1,12 @@ + +036-2,23,38,0 shop Chef Armand NPC211,539:87,676:200,503:10 +036-2,35,22,0 shop Gunney NPC138,1199:4,529:4 + +036-2,23,35,0 script Bunkmaster Daban NPC212,{ + @npcname$ = "Bunkmaster Daban"; + @Cost = 100; + callfunc "Inn"; + @npcname$ = ""; + @Cost = 0; + close; +} diff --git a/npc/041-1/_import.txt b/npc/041-1/_import.txt new file mode 100644 index 00000000..e4df5104 --- /dev/null +++ b/npc/041-1/_import.txt @@ -0,0 +1,4 @@ +// Map 041-1: Beach +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/041-1/_mobs.txt", +"npc/041-1/_warps.txt", diff --git a/npc/041-1/_mobs.txt b/npc/041-1/_mobs.txt new file mode 100644 index 00000000..d04fc566 --- /dev/null +++ b/npc/041-1/_mobs.txt @@ -0,0 +1,13 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 041-1: Beach mobs +041-1,81,55,9,4 monster Piousse 1003,3,100000,30000 +041-1,101,67,9,4 monster Piousse 1003,3,100000,30000 +041-1,100,84,9,4 monster Piousse 1003,3,100000,30000 +041-1,61,34,6,10 monster Piousse 1003,3,100000,30000 +041-1,55,30,5,24 monster Clover Patch 1033,3,100000,30000 +041-1,59,13,5,4 monster Piousse 1003,3,100000,30000 +041-1,60,7,1,1 monster Gold Vein 1046,1,100000,30000 +041-1,66,49,1,1 monster Gold Vein 1046,1,100000,30000 +041-1,95,75,10,4 monster Gold Vein 1046,1,100000,30000 +041-1,100,57,9,4 monster Tortuga 1004,3,100000,30000 +041-1,83,64,9,4 monster Tortuga 1004,3,100000,30000 diff --git a/npc/041-1/_warps.txt b/npc/041-1/_warps.txt new file mode 100644 index 00000000..9fa199d6 --- /dev/null +++ b/npc/041-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 041-1: Beach warps +041-1,101,95,0 warp #041-1_101_95 2,0,004-1,68,20 +041-1,58,4,0 warp #041-1_58_4 2,0,042-1,44,113 diff --git a/npc/042-1/_import.txt b/npc/042-1/_import.txt new file mode 100644 index 00000000..74a91ea4 --- /dev/null +++ b/npc/042-1/_import.txt @@ -0,0 +1,4 @@ +// Map 042-1: Tulimshar Suburbs +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/042-1/_mobs.txt", +"npc/042-1/_warps.txt", diff --git a/npc/042-1/_mobs.txt b/npc/042-1/_mobs.txt new file mode 100644 index 00000000..c63537cd --- /dev/null +++ b/npc/042-1/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 042-1: Tulimshar Suburbs mobs +042-1,101,69,15,7 monster Piou 1002,5,100000,30000 +042-1,65,59,13,7 monster Piou 1002,7,100000,30000 +042-1,68,102,3,4 monster Toppy Blub 1009,5,100000,30000 +042-1,98,88,2,4 monster Piousse 1003,4,100000,30000 +042-1,63,63,18,15 monster Gold Vein 1046,6,100000,30000 +042-1,85,102,2,4 monster Piousse 1003,5,100000,30000 +042-1,98,99,2,2 monster Piousse 1003,3,100000,30000 +042-1,82,87,3,1 monster Piousse 1003,2,100000,30000 +042-1,70,88,2,4 monster Toppy Blub 1009,5,100000,30000 +042-1,80,35,5,2 monster Toppy Blub 1009,5,100000,30000 diff --git a/npc/042-1/_warps.txt b/npc/042-1/_warps.txt new file mode 100644 index 00000000..657a9b73 --- /dev/null +++ b/npc/042-1/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 042-1: Tulimshar Suburbs warps +042-1,65,20,0 warp #042-1_65_20 1,0,023-1,64,143 +042-1,44,115,0 warp #042-1_44_115 2,0,041-1,58,6 diff --git a/npc/043-1/_import.txt b/npc/043-1/_import.txt new file mode 100644 index 00000000..b4d68aad --- /dev/null +++ b/npc/043-1/_import.txt @@ -0,0 +1,4 @@ +// Map 043-1: Beach +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/043-1/_mobs.txt", +"npc/043-1/_warps.txt", diff --git a/npc/043-1/_mobs.txt b/npc/043-1/_mobs.txt new file mode 100644 index 00000000..03d38606 --- /dev/null +++ b/npc/043-1/_mobs.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-1: Beach mobs +043-1,0,0,0,0 monster Clover Patch 1033,17,40000,30000 +043-1,0,0,0,0 monster Little Blub 1007,15,60000,60000 +043-1,0,0,0,0 monster Ratto 1005,20,60000,60000 diff --git a/npc/043-1/_warps.txt b/npc/043-1/_warps.txt new file mode 100644 index 00000000..2c8584b9 --- /dev/null +++ b/npc/043-1/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-1: Beach warps +043-1,43,19,0 warp #043-1_43_19 5,0,003-4,114,116 diff --git a/npc/043-3/_import.txt b/npc/043-3/_import.txt new file mode 100644 index 00000000..111c08dc --- /dev/null +++ b/npc/043-3/_import.txt @@ -0,0 +1,5 @@ +// Map 043-3: Sandy Dungeon Level 1 +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/043-3/_mobs.txt", +"npc/043-3/_warps.txt", +"npc/043-3/mapflags.txt", diff --git a/npc/043-3/_mobs.txt b/npc/043-3/_mobs.txt new file mode 100644 index 00000000..7201f970 --- /dev/null +++ b/npc/043-3/_mobs.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-3: Sandy Dungeon Level 1 mobs +043-3,39,45,12,8 monster Beehive 1056,6,20000,20000 +043-3,44,60,12,8 monster Beehive 1056,6,20000,20000 +043-3,41,96,17,13 monster Beehive 1056,10,20000,20000 +043-3,52,91,3,3 monster AngryScorpion 1057,5,30000,30000 +043-3,102,116,13,9 monster AngryFireGoblin 1108,10,30000,30000 +043-3,33,99,3,3 monster AngryScorpion 1057,5,30000,30000 +043-3,116,78,12,9 monster AngryFireGoblin 1108,8,30000,30000 +043-3,113,47,15,11 monster Blub 1008,15,45000,35000 +043-3,94,44,20,9 monster Ratto 1005,5,30000,15000 diff --git a/npc/043-3/_warps.txt b/npc/043-3/_warps.txt new file mode 100644 index 00000000..59010fc3 --- /dev/null +++ b/npc/043-3/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-3: Sandy Dungeon Level 1 warps +043-3,31,26,0 warp #043-3_31_26 0,0,002-3,22,86 +043-3,77,30,0 warp #043-3_77_30 0,0,043-4,47,67 +043-3,116,36,0 warp #043-3_116_36 0,0,005-3,78,87 +043-3,32,37,0 warp #043-3_32_37 1,0,005-3,33,85 diff --git a/npc/043-3/mapflags.txt b/npc/043-3/mapflags.txt new file mode 100755 index 00000000..5a36328d --- /dev/null +++ b/npc/043-3/mapflags.txt @@ -0,0 +1 @@ +//043-3 mapflag resave 002-3,72,66 diff --git a/npc/043-4/_import.txt b/npc/043-4/_import.txt new file mode 100644 index 00000000..dd06c08b --- /dev/null +++ b/npc/043-4/_import.txt @@ -0,0 +1,5 @@ +// Map 043-4: Troll Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/043-4/_mobs.txt", +"npc/043-4/_warps.txt", +"npc/043-4/mapflags.txt", diff --git a/npc/043-4/_mobs.txt b/npc/043-4/_mobs.txt new file mode 100644 index 00000000..a8c181a0 --- /dev/null +++ b/npc/043-4/_mobs.txt @@ -0,0 +1,24 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-4: Troll Cave mobs +043-4,139,163,3,3 monster Red Rose 1062,2,240000,120000 +043-4,133,45,7,8 monster Wolvern 1117,4,100000,50000 +043-4,91,139,5,5 monster Wolvern 1117,2,100000,50000 +043-4,35,120,5,5 monster Wolvern 1117,2,100000,50000 +043-4,43,143,6,5 monster Water Wisp 1116,2,120000,60000 +043-4,102,153,4,4 monster Water Wisp 1116,2,120000,60000 +043-4,142,159,7,6 monster Water Wisp 1116,2,120000,60000 +043-4,150,33,8,7 monster Water Wisp 1116,1,120000,60000 +043-4,103,54,4,11 monster Wolvern 1117,3,100000,50000 +043-4,47,38,10,5 monster Topaz Vein 1054,7,100000,50000 +043-4,98,85,4,7 monster Crocotree 1010,5,100000,50000 +043-4,104,57,7,13 monster Topaz Vein 1054,7,100000,50000 +043-4,89,64,4,5 monster Toppy Blub 1009,5,100000,50000 +043-4,143,46,16,14 monster Topaz Vein 1054,7,100000,50000 +043-4,154,106,13,14 monster Toppy Blub 1009,8,100000,50000 +043-4,162,77,7,11 monster Crocotree 1010,6,100000,50000 +043-4,152,143,5,5 monster Toppy Blub 1009,6,100000,50000 +043-4,159,161,5,4 monster Crocotree 1010,6,100000,50000 +043-4,98,138,10,10 monster Topaz Vein 1054,5,100000,50000 +043-4,45,106,9,12 monster Topaz Vein 1054,5,100000,50000 +043-4,39,138,9,8 monster Toppy Blub 1009,5,100000,50000 +043-4,133,123,15,11 monster Topaz Vein 1054,3,100000,50000 diff --git a/npc/043-4/_warps.txt b/npc/043-4/_warps.txt new file mode 100644 index 00000000..f33660af --- /dev/null +++ b/npc/043-4/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 043-4: Troll Cave warps +043-4,47,68,0 warp #043-4_47_68 0,0,043-3,77,31 +043-4,153,27,0 warp #043-4_153_27 0,0,043-4,193,32 +043-4,193,33,0 warp #043-4_193_33 0,0,043-4,153,28 +043-4,194,24,0 warp #043-4_194_24 0,0,043-5,30,107 diff --git a/npc/043-4/mapflags.txt b/npc/043-4/mapflags.txt new file mode 100755 index 00000000..9f40e28e --- /dev/null +++ b/npc/043-4/mapflags.txt @@ -0,0 +1 @@ +//043-4 mapflag resave 002-3,72,66 diff --git a/npc/045-1/_import.txt b/npc/045-1/_import.txt new file mode 100644 index 00000000..759b3a8a --- /dev/null +++ b/npc/045-1/_import.txt @@ -0,0 +1,5 @@ +// Map 045-1: Deep Snow Forest +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/045-1/_mobs.txt", +"npc/045-1/_warps.txt", +"npc/045-1/mapflags.txt", diff --git a/npc/045-1/_mobs.txt b/npc/045-1/_mobs.txt new file mode 100644 index 00000000..d8c8047e --- /dev/null +++ b/npc/045-1/_mobs.txt @@ -0,0 +1,17 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 045-1: Deep Snow Forest mobs +045-1,102,122,11,11 monster Wolvern 1117,10,100000,30000 +045-1,98,77,11,11 monster Wolvern 1117,5,100000,30000 +045-1,147,63,11,11 monster Wolvern 1117,5,100000,30000 +045-1,60,97,11,11 monster Wolvern 1117,5,100000,30000 +045-1,106,44,11,11 monster Wolvern 1117,5,100000,30000 +045-1,133,93,11,11 monster Wolvern 1117,5,100000,30000 +045-1,38,76,9,7 monster Wolvern 1117,5,100000,30000 +045-1,60,59,9,7 monster Wolvern 1117,5,100000,30000 +045-1,0,0,0,0 monster Gamboge Plant 1038,40,100000,30000 +045-1,0,0,0,0 monster Penguin 1094,30,100000,30000 +045-1,0,0,0,0 monster Cuco 1020,40,100000,30000 +045-1,0,0,0,0 monster Reaper 1095,5,100000,30000 +045-1,47,145,12,12 monster Bad Bee 1058,4,100000,30000 +045-1,150,126,12,12 monster Bad Bee 1058,4,100000,30000 +045-1,104,149,39,5 monster Bad Bee 1058,4,100000,30000 diff --git a/npc/045-1/_warps.txt b/npc/045-1/_warps.txt new file mode 100644 index 00000000..1112d925 --- /dev/null +++ b/npc/045-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 045-1: Deep Snow Forest warps +045-1,175,60,0 warp #045-1_175_60 0,1,034-1,16,30 +045-1,177,132,0 warp #045-1_177_132 0,2,034-1,17,102 +045-1,26,179,0 warp #045-1_26_179 3,0,017-1,182,17 diff --git a/npc/045-1/mapflags.txt b/npc/045-1/mapflags.txt new file mode 100755 index 00000000..c6b778d6 --- /dev/null +++ b/npc/045-1/mapflags.txt @@ -0,0 +1 @@ +//045-1 mapflag resave 017-1,170,25 diff --git a/npc/046-1/_import.txt b/npc/046-1/_import.txt new file mode 100644 index 00000000..c1f211a3 --- /dev/null +++ b/npc/046-1/_import.txt @@ -0,0 +1,5 @@ +// Map 046-1: Rock Plateau +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/046-1/_mobs.txt", +"npc/046-1/_warps.txt", +"npc/046-1/mapflags.txt", diff --git a/npc/046-1/_mobs.txt b/npc/046-1/_mobs.txt new file mode 100644 index 00000000..a631840e --- /dev/null +++ b/npc/046-1/_mobs.txt @@ -0,0 +1,13 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 046-1: Rock Plateau mobs +046-1,0,7,0,0 monster Penguin 1094,40,100000,30000 +046-1,0,7,0,0 monster Cuco 1020,50,100000,30000 +046-1,0,7,0,0 monster Gamboge Plant 1038,50,100000,30000 +046-1,44,35,26,10 monster Blue Rose 1061,12,100000,30000 +046-1,0,7,0,0 monster Moubi 1072,2,100000,30000 +046-1,87,101,11,6 monster Wolvern 1117,5,100000,30000 +046-1,0,7,0,0 monster Reaper 1095,9,100000,30000 +046-1,72,59,7,6 monster Wolvern 1117,2,100000,30000 +046-1,36,112,5,4 monster Wolvern 1117,2,100000,30000 +046-1,115,40,22,16 monster Wolvern 1117,7,100000,30000 +046-1,145,67,5,4 monster Wolvern 1117,2,100000,30000 diff --git a/npc/046-1/_warps.txt b/npc/046-1/_warps.txt new file mode 100644 index 00000000..4bcdaf92 --- /dev/null +++ b/npc/046-1/_warps.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 046-1: Rock Plateau warps +046-1,95,124,0 warp #046-1_95_124 1,0,034-1,94,19 +046-1,29,20,0 warp #046-1_29_20 0,0,047-1,70,178 +046-1,31,20,0 warp #046-1_31_20 0,0,047-1,70,178 +046-1,78,37,0 warp #046-1_78_37 0,0,046-3,78,29 +046-1,131,55,0 warp #046-1_131_55 0,0,046-3,131,47 +046-1,131,62,0 warp #046-1_131_62 0,0,046-3,131,54 +046-1,139,26,0 warp #046-1_139_26 0,0,046-3,139,18 +046-1,83,50,0 warp #046-1_83_50 0,0,046-3,83,42 +046-1,124,116,0 warp #046-1_124_116 0,0,046-3,124,108 +046-1,62,26,0 warp #046-1_62_26 0,0,019-4,24,123 diff --git a/npc/046-1/mapflags.txt b/npc/046-1/mapflags.txt new file mode 100755 index 00000000..7141b13f --- /dev/null +++ b/npc/046-1/mapflags.txt @@ -0,0 +1 @@ +//046-1 mapflag resave 046-1,92,48 diff --git a/npc/046-3/_import.txt b/npc/046-3/_import.txt new file mode 100644 index 00000000..5422c983 --- /dev/null +++ b/npc/046-3/_import.txt @@ -0,0 +1,5 @@ +// Map 046-3: Frosty Underground +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/046-3/_mobs.txt", +"npc/046-3/_warps.txt", +"npc/046-3/mapflags.txt", diff --git a/npc/046-3/_mobs.txt b/npc/046-3/_mobs.txt new file mode 100644 index 00000000..6aee898a --- /dev/null +++ b/npc/046-3/_mobs.txt @@ -0,0 +1,17 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 046-3: Frosty Underground mobs +046-3,68,101,6,4 monster Moubi 1072,2,100000,30000 +046-3,0,0,0,0 monster Bad Bee 1058,20,100000,30000 +046-3,55,61,12,13 monster Blue Rose 1061,14,100000,30000 +046-3,119,104,2,2 monster Coal Veinbloc 1071,1,100000,30000 +046-3,132,71,4,3 monster Nutcracker 1093,4,100000,30000 +046-3,107,85,7,4 monster Jack-O 1091,2,100000,30000 +046-3,98,77,3,2 monster Nutcracker 1093,4,100000,30000 +046-3,70,82,3,2 monster Nutcracker 1093,6,100000,30000 +046-3,106,34,3,2 monster Nutcracker 1093,4,100000,30000 +046-3,33,37,3,2 monster Nutcracker 1093,4,100000,30000 +046-3,144,105,7,4 monster Jack-O 1091,2,100000,30000 +046-3,152,55,7,4 monster Jack-O 1091,2,100000,30000 +046-3,84,53,7,4 monster Jack-O 1091,2,100000,30000 +046-3,47,23,7,5 monster Coal Veinbloc 1071,2,100000,30000 +046-3,113,48,6,4 monster Moubi 1072,2,100000,30000 diff --git a/npc/046-3/_warps.txt b/npc/046-3/_warps.txt new file mode 100644 index 00000000..3870e53d --- /dev/null +++ b/npc/046-3/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 046-3: Frosty Underground warps +046-3,139,19,0 warp #046-3_139_19 0,0,046-1,139,27 +046-3,78,30,0 warp #046-3_78_30 0,0,046-1,78,38 +046-3,83,43,0 warp #046-3_83_43 0,0,046-1,83,51 +046-3,131,48,0 warp #046-3_131_48 0,0,046-1,131,56 +046-3,131,55,0 warp #046-3_131_55 0,0,046-1,131,63 +046-3,124,109,0 warp #046-3_124_109 0,0,046-1,124,117 diff --git a/npc/046-3/mapflags.txt b/npc/046-3/mapflags.txt new file mode 100755 index 00000000..a879f8ce --- /dev/null +++ b/npc/046-3/mapflags.txt @@ -0,0 +1 @@ +//046-3 mapflag resave 046-1,92,48 diff --git a/npc/047-1/_import.txt b/npc/047-1/_import.txt new file mode 100644 index 00000000..ca2958ad --- /dev/null +++ b/npc/047-1/_import.txt @@ -0,0 +1,5 @@ +// Map 047-1: snow Hills +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/047-1/_mobs.txt", +"npc/047-1/_warps.txt", +"npc/047-1/mapflags.txt", diff --git a/npc/047-1/_mobs.txt b/npc/047-1/_mobs.txt new file mode 100644 index 00000000..cbdfaa50 --- /dev/null +++ b/npc/047-1/_mobs.txt @@ -0,0 +1,24 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 047-1: snow Hills mobs +047-1,37,175,1,1 monster Nutcracker 1093,7,100000,30000 +047-1,45,75,1,1 monster Jack-O 1091,1,100000,30000 +047-1,0,0,0,0 monster Penguin 1094,50,100000,30000 +047-1,0,0,0,0 monster Cuco 1020,60,100000,30000 +047-1,0,0,0,0 monster Gamboge Plant 1038,60,100000,30000 +047-1,81,125,51,28 monster Blue Rose 1061,25,100000,30000 +047-1,189,123,12,18 monster Wolvern 1117,6,100000,30000 +047-1,160,115,12,10 monster Wolvern 1117,6,100000,30000 +047-1,169,163,24,15 monster Wolvern 1117,6,100000,30000 +047-1,58,71,24,15 monster Wolvern 1117,6,100000,30000 +047-1,122,116,10,12 monster Wolvern 1117,6,100000,30000 +047-1,110,173,12,10 monster Wolvern 1117,6,100000,30000 +047-1,108,168,1,1 monster Nutcracker 1093,7,100000,30000 +047-1,108,158,1,1 monster Jack-O 1091,1,100000,30000 +047-1,0,0,0,0 monster Reaper 1095,10,100000,30000 +047-1,87,119,18,17 monster Moubi 1072,2,100000,30000 +047-1,138,22,1,1 monster Nutcracker 1093,4,100000,30000 +047-1,157,66,1,1 monster Nutcracker 1093,4,100000,30000 +047-1,174,46,2,2 monster Jack-O 1091,2,100000,30000 +047-1,143,43,2,2 monster Jack-O 1091,2,100000,30000 +047-1,122,61,1,1 monster Nutcracker 1093,4,100000,30000 +047-1,132,70,2,2 monster Jack-O 1091,2,100000,30000 diff --git a/npc/047-1/_warps.txt b/npc/047-1/_warps.txt new file mode 100644 index 00000000..532bd8f1 --- /dev/null +++ b/npc/047-1/_warps.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 047-1: snow Hills warps +047-1,108,165,0 warp #047-1_108_165 0,0,047-3,110,102 +047-1,108,156,0 warp #047-1_108_156 0,0,047-3,119,94 +047-1,102,111,0 warp #047-1_102_111 0,0,047-3,119,58 +047-1,102,107,0 warp #047-1_102_107 0,0,047-3,128,45 +047-1,154,92,0 warp #047-1_154_92 0,0,019-4,74,27 +047-1,101,143,0 warp #047-1_101_143 0,0,047-3,126,180 +047-1,37,173,0 warp #047-1_37_173 0,0,047-3,33,175 +047-1,45,73,0 warp #047-1_45_73 0,0,047-3,46,76 +047-1,78,109,0 warp #047-1_78_109 0,0,047-3,35,41 +047-1,83,123,0 warp #047-1_83_123 0,0,047-3,108,165 +047-1,71,179,0 warp #047-1_71_179 2,0,046-1,29,21 +047-1,130,50,0 warp #047-1_130_50 0,0,047-1,130,47 +047-1,130,48,0 warp #047-1_130_48 0,0,047-1,130,51 +047-1,128,39,0 warp #047-1_128_39 0,0,048-2,40,48 diff --git a/npc/047-1/mapflags.txt b/npc/047-1/mapflags.txt new file mode 100755 index 00000000..c669b7f9 --- /dev/null +++ b/npc/047-1/mapflags.txt @@ -0,0 +1 @@ +//047-1 mapflag resave 048-2,26,46 diff --git a/npc/047-3/_import.txt b/npc/047-3/_import.txt new file mode 100644 index 00000000..b1670019 --- /dev/null +++ b/npc/047-3/_import.txt @@ -0,0 +1,5 @@ +// Map 047-3: Snow Hills Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/047-3/_mobs.txt", +"npc/047-3/_warps.txt", +"npc/047-3/mapflags.txt", diff --git a/npc/047-3/_mobs.txt b/npc/047-3/_mobs.txt new file mode 100644 index 00000000..b5c44b2f --- /dev/null +++ b/npc/047-3/_mobs.txt @@ -0,0 +1,23 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 047-3: Snow Hills Cave mobs +047-3,56,135,4,4 monster Nutcracker 1093,7,100000,30000 +047-3,35,153,3,3 monster Nutcracker 1093,7,100000,30000 +047-3,39,104,4,4 monster Nutcracker 1093,7,100000,30000 +047-3,73,153,4,4 monster Nutcracker 1093,7,100000,30000 +047-3,64,104,1,1 monster Nutcracker 1093,7,100000,30000 +047-3,24,168,3,2 monster Jack-O 1091,2,100000,30000 +047-3,87,134,2,1 monster Jack-O 1091,2,100000,30000 +047-3,55,122,2,1 monster Jack-O 1091,2,100000,30000 +047-3,35,128,2,1 monster Jack-O 1091,2,100000,30000 +047-3,53,84,2,1 monster Jack-O 1091,2,100000,30000 +047-3,75,136,10,13 monster Blue Rose 1061,5,100000,30000 +047-3,39,31,21,10 monster Blue Rose 1061,12,100000,30000 +047-3,40,31,2,1 monster Mister Prickel 1085,2,100000,30000 +047-3,122,157,10,8 monster Moubi 1072,2,100000,30000 +047-3,102,166,7,6 monster Mister Prickel 1085,5,100000,30000 +047-3,109,81,7,6 monster Coal Veinbloc 1071,1,100000,30000 +047-3,123,90,2,1 monster Jack-O 1091,2,100000,30000 +047-3,109,97,4,4 monster Nutcracker 1093,7,100000,30000 +047-3,119,41,21,10 monster Blue Rose 1061,8,100000,30000 +047-3,51,94,19,7 monster Mister Prickel 1085,5,100000,30000 +047-3,121,172,4,4 monster Nutcracker 1093,7,100000,30000 diff --git a/npc/047-3/_warps.txt b/npc/047-3/_warps.txt new file mode 100644 index 00000000..7b38d37f --- /dev/null +++ b/npc/047-3/_warps.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 047-3: Snow Hills Cave warps +047-3,46,74,0 warp #047-3_46_74 0,0,047-1,45,75 +047-3,33,176,0 warp #047-3_33_176 0,0,047-1,37,174 +047-3,126,181,0 warp #047-3_126_181 0,0,047-1,101,144 +047-3,35,42,0 warp #047-3_35_42 0,0,047-1,78,110 +047-3,108,163,0 warp #047-3_108_163 0,0,047-1,83,125 +047-3,110,103,0 warp #047-3_110_103 0,0,047-1,108,166 +047-3,119,95,0 warp #047-3_119_95 0,0,047-1,108,157 +047-3,119,59,0 warp #047-3_119_59 0,0,047-1,102,112 +047-3,128,46,0 warp #047-3_128_46 0,0,047-1,102,108 diff --git a/npc/047-3/mapflags.txt b/npc/047-3/mapflags.txt new file mode 100755 index 00000000..fd9f0602 --- /dev/null +++ b/npc/047-3/mapflags.txt @@ -0,0 +1 @@ +//047-3 mapflag resave 047-1,145,20 diff --git a/npc/048-2/_import.txt b/npc/048-2/_import.txt new file mode 100644 index 00000000..d32a99d0 --- /dev/null +++ b/npc/048-2/_import.txt @@ -0,0 +1,26 @@ +// Map 048-2: Blue Sages' Mansion +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/048-2/_warps.txt", +"npc/048-2/bluesageConfig.txt", +"npc/048-2/helperAccused.txt", +"npc/048-2/helperBookpages1.txt", +"npc/048-2/helperBookpages2.txt", +"npc/048-2/helperBookpages3.txt", +"npc/048-2/helperChief.txt", +"npc/048-2/helperCleaning1.txt", +"npc/048-2/helperCleaning2.txt", +"npc/048-2/helperCleaning3.txt", +"npc/048-2/helperCleaning4.txt", +"npc/048-2/helperCleaning5.txt", +"npc/048-2/helperJanitor.txt", +"npc/048-2/helperMInk.txt", +"npc/048-2/helperMReed.txt", +"npc/048-2/helperMSilk.txt", +"npc/048-2/helperMYetiClaw.txt", +"npc/048-2/helperResting1.txt", +"npc/048-2/helperResting2.txt", +"npc/048-2/mapflags.txt", +"npc/048-2/sageNikolai.txt", +"npc/048-2/slimes.txt", +"npc/048-2/traveler.txt", +"npc/048-2/visitors.txt", diff --git a/npc/048-2/_warps.txt b/npc/048-2/_warps.txt new file mode 100644 index 00000000..a806d9d4 --- /dev/null +++ b/npc/048-2/_warps.txt @@ -0,0 +1,19 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 048-2: Blue Sages' Mansion warps +048-2,22,78,0 warp #048-2_22_78 1,0,048-2,84,23 +048-2,60,21,0 warp #048-2_60_21 1,0,048-2,121,26 +048-2,40,50,0 warp #048-2_40_50 0,0,047-1,128,40 +048-2,84,21,0 warp #048-2_84_21 1,0,048-2,22,76 +048-2,113,23,0 warp #048-2_113_23 0,0,048-2,147,35 +048-2,122,28,0 warp #048-2_122_28 1,0,048-2,59,22 +048-2,95,23,0 warp #048-2_95_23 0,0,048-2,178,35 +048-2,147,36,0 warp #048-2_147_36 0,0,048-2,113,24 +048-2,178,36,0 warp #048-2_178_36 0,0,048-2,95,24 +048-2,27,141,0 warp #048-2_27_141 0,0,048-2,52,102 +048-2,60,71,0 warp #048-2_60_71 1,0,048-2,60,104 +048-2,23,73,0 warp #048-2_23_73 0,0,048-2,85,132 +048-2,55,73,0 warp #048-2_55_73 0,0,048-2,121,132 +048-2,61,106,0 warp #048-2_61_106 1,0,048-2,59,73 +048-2,52,101,0 warp #048-2_52_101 0,0,048-2,27,140 +048-2,121,133,0 warp #048-2_121_133 0,0,048-2,55,74 +048-2,85,133,0 warp #048-2_85_133 0,0,048-2,23,74 diff --git a/npc/048-2/bluesageConfig.txt b/npc/048-2/bluesageConfig.txt new file mode 100755 index 00000000..5a17a304 --- /dev/null +++ b/npc/048-2/bluesageConfig.txt @@ -0,0 +1,71 @@ + + + + + + +- script #bluesageconfig NPC32767,{ + end; + +OnInit: + $@Q_BlueSageMinimumLevel = 60; + + $@Q_BlueSageBookPages_MASK = 0x1F; + $@Q_BlueSageBookPages_SHIFT = 0; + + $@Q_BlueSageGrimoire = 0x20; + $@Q_BlueSageIceSword = 0x40; + + $@Q_BlueSageMaterial_MASK = NIBBLE_2_MASK; + $@Q_BlueSageMaterial_SHIFT = NIBBLE_2_SHIFT; + + $@Q_BlueSageMaterialReed = 0x100; + $@Q_BlueSageMaterialSilk = 0x200; + $@Q_BlueSageMaterialClaw = 0x400; + $@Q_BlueSageMaterialInk = 0x800; + + $@Q_BlueSageSlimes_MASK = BYTE_2_MASK; + $@Q_BlueSageSlimes_SHIFT = BYTE_2_SHIFT; + $@Q_BlueSageSlimesStart = 0x010000; + $@Q_BlueSageSlime0 = 0x020000; + $@Q_BlueSageSlime1 = 0x040000; + $@Q_BlueSageSlime2 = 0x080000; + $@Q_BlueSageSlime3 = 0x100000; + $@Q_BlueSageSlime4 = 0x200000; + $@Q_BlueSageSlime5 = 0x400000; + $@Q_BlueSageSlime6 = 0x800000; + //white + $@BlueSageSlime0_Amount = 6; + $@BlueSageSlime1_Amount = 5; + $@BlueSageSlime2_Amount = 4; + $@BlueSageSlime3_Amount = 3; + // blue + $@BlueSageSlime4_Amount = 3; + $@BlueSageSlime5_Amount = 2; + $@BlueSageSlime6_Amount = 1; + end; +} + +function script updateBlueSageBookPages { + QUEST_BlueSage = (QUEST_BlueSage & ~($@Q_BlueSageBookPages_MASK) | (@bookpages << $@Q_BlueSageBookPages_SHIFT)); + return; +} + +function script blueSageNumberOfClearedNests { + @slimenests = 0; + if (QUEST_BlueSage & $@Q_BlueSageSlime0) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime1) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime2) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime3) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime4) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime5) + @slimenests = @slimenests+1; + if (QUEST_BlueSage & $@Q_BlueSageSlime6) + @slimenests = @slimenests+1; + return; +} diff --git a/npc/048-2/helperAccused.txt b/npc/048-2/helperAccused.txt new file mode 100755 index 00000000..110c5d70 --- /dev/null +++ b/npc/048-2/helperAccused.txt @@ -0,0 +1,139 @@ + +048-2,25,135,0 script Peetu NPC130,{ + if (QL_BSAGE_INVESTIGATE == 12) goto L_Thank; + if (QL_BSAGE_INVESTIGATE > 4 && QL_BSAGE_INVESTIGATE < 13) goto L_Investigate; + if (QL_BSAGE_INVESTIGATE > 1 && QL_BSAGE_INVESTIGATE < 13) goto L_Query; + if (QL_BSAGE_INVESTIGATE == 1) goto L_Help; + + mes "You see a rather stressed helper, mumbling to himself."; + if (BaseLevel < $@Q_BlueSageMinimumLevel || !QL_BSAGE_INVESTIGATE) + goto L_close; + mes "[Peetu]"; + mes "\"How could this have happened? I don't understand it... I'm sure I did the sealing correctly. Maybe the ingredients... but that doesn't make sense. They're checked regularly and...\""; + next; + mes "He startles as he notices you."; + mes "[Peetu]"; + mes "\"Oh, hello. What are you doing here? Uh ... visitors usually don't come up here. I mean, I don't mean to be rude, of course. I'm just surprised to see you here.\""; + menu + "I'm just having a look around.",L_close, + "Sorry, I didn't mean to bother you.",L_close, + "Why aren't you downstairs, helping everyone to clean up?",L_Next; + +L_Next: + mes "[Peetu]"; + mes "\"I would, but I'm ... under preliminary suspension.\""; + mes "He looks close to tears."; + next; + mes "[Peetu]"; + mes "\"It's all my fault! It was my job to seal the slimes away for the night, but I somehow messed it up! How could this have happened? And now I'm going to lose my job and I'll have to leave here and no other sage would give me a new appointment and I don't know what else to do! I mean, I spent my whole life on this so far, I don't even know anything else I could do.\""; + next; + mes "He seems to be having a nervous breakdown, as he latches onto you and starts sobbing on your shoulder."; + menu + "(Try to console him)",L_More, + "(Shake him and tell him to pull himself together)",L_More, + "(Push him away from you and leave.)",L_close; + +L_More: + mes "He calms down a bit."; + mes "[Peetu]"; + mes "\"Uh. You're probably right. I'm very sorry. I'm just... You know, I wanted to become a scholar of the sages, studying and... Oh, how could I mess that up? Did you see the library? It caused so much damage! What else should they do other than kick me out?\""; + menu + "Maybe you should talk to your chief about that?",L_Less, + "It doesn't make much sense to draw overhasty conclusions.",L_Less, + "Do you have a clue about what went wrong?",L_Less; + +L_Less: + mes "[Peetu]"; + mes "\"Well ... but ... I mean ... I don't know ... "; + mes "I have an idea! Would you ... uhm ... would you talk to Chief Oskari for me? And ask him what he plans to do about me? I... I just don't feel capable of doing that myself right now. I'll try to pull myself together in the meanwhile.\""; + QL_BSAGE_INVESTIGATE = 1; + goto L_close; + +L_Help: + mes "[Peetu]"; + mes "\"Please talk to Chief Oskari for me and find out if I'll get fired."; + mes "You can probably find him in his office on the second floor.\""; + goto L_close; + +L_Query: + mes "[Peetu]"; + mes "\"Did you talk to Chief Oskari?\""; + menu + "Yes, and he doesn't plan to fire you.",L_Continue, + "Not yet.",L_close; + +L_Continue: + mes "You tell Peetu that Chief Oskari has a good opinion of him and explain your task to find out what exactly happened."; + next; + mes "[Peetu]"; + mes "\"Alright, I understand. You see, I'm very confused too, because I usually pay a lot of attention to my work. Especially when doing something as delicate as sealing away the slimes for the night.\""; + menu + "Can you describe to me what exactly you did?",L_TextWall; + +L_TextWall: + mes "[Peetu]"; + mes "\"Well, ok, sure. So, as you know we're doing some research on the nature of slimes, their connection to minerals and gemstones, their breeding behavior, and well ... uh ... doing some magical experiments to analyze their reactions to different kinds of magic."; + mes "These experiments caused some ... mutations, and the Blue and White Slimes developed some behavior different from the slimes of other colors, making them more dangerous.\""; + next; + mes "\"This is the reason they have to be magically sealed away for the night, since we didn't want them to get out in the wilderness... Oh, I can only imagine what damage they do to the environment!\""; + mes "He sighs."; + next; + mes "\"However, the sealing involves several steps. I usually start to prepare it while the helpers are still working on their research and experiments. That way, when they're done, they can just come and place the slimes under the seal."; + mes "I take the ingredients for the spell from the shelves, mix them together and cast the spell shortly before the other helpers finish their daily work.\""; + next; + mes "\"You can think of the seal as something like a magical cage. This is a simplified explanation, of course. It's rather advanced magic, a modified version of a shield spell, rather focused on the components that reduce the targets ability to move and... Oh, I seem to be losing you. Never mind then."; + mes "Anyway, I create and open the 'cage', then I wait for all the helpers to drop in the slimes and close it when all are in. When it is closed, I additionally cast a guarding spell to prevent unauthorized access.\""; + next; + mes "\"That night when the slimes escaped, I did all of this as usual. Everything seemed alright after I cast the guarding spell, so I went to bed. But I woke up in the middle of the night because I felt the spells... oh, it's hard to describe... it seems the spell which defines the magical cage started to... inflate itself. That caused the guarding spells to vanish, since they're intended to protect against threats from the outside, not the inside."; + mes "While expanding, the cage went thinner and thinner until it just... faded out of existence!\""; + next; + mes "\"This left all the slimes free in the workshop, right next to the library. Of course I hurried there as fast as I could, yelling to wake up everyone, but that caused so much confusion that we fell over each other in the corridor and when we finally reached the library, the slimes were already spread all over the room, eating the books and dripping out of the windows.\""; + next; + mes "\"We tried to block the windows to prevent them escaping, but as most of the helpers aren't experienced in fighting and only some of us have a higher magical education, the slimes are rather dangerous for most of them."; + mes "We weren't able to get the situation under control until most of the slimes had escaped.\""; + next; + mes "\"Since it was my responsibility to seal them away, I was preliminarily suspended and sent to my room. Since then I've been thinking over and over again about the happenings and how I cast the spell, trying to find the mistake I made."; + mes "But now that I've described the spells to you, I'm sure I cast them correctly. Thinking again about the effect of the seal inflating, I suppose it might have to do with the ingredients I used for the spell.\""; + next; + mes "\"I never tried it, because it makes no sense to do that, but theoretically adding some Silk Cocoons could have such an effect. That's pretty basic nature magic."; + mes "But... how would that have gotten into the ingredients?\""; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_Investigate: + mes "[Peetu]"; + mes "\"Hello. Did you find out anything else yet?\""; + if (QL_BSAGE_INVESTIGATE != 11) + menu + "I'm still collecting information.",L_close; + if (@inventorylist_count == 100) + goto L_TooMany; + menu + "Yes, I have already talked with Chief Oskari.",L_ReallyMore, + "Not yet.",L_close; + +L_ReallyMore: + mes "You explain your gained insights to Peetu and what conclusions Chief Oskari drew."; + mes "[Peetu]"; + mes "\"Oh, I'm so relieved!"; + mes "I mean, this is alarming news, but I'm so glad that this isn't my fault and that he feels I deserve to keep my job.\""; + next; + mes "\"It isn't much, but please take these Silk Gloves. We use those when we have to protect our hands, but still need to perform magic.\""; + QL_BSAGE_INVESTIGATE = 12; + getitem "SilkGloves", 1; + goto L_close; + +L_Thank: + mes "[Peetu]"; + mes "\"Thanks for all your help.\""; + goto L_close; + +L_TooMany: + mes "[Peetu]"; + mes "\"Wow, you have a lot of stuff with you! Isn't that uncomfortable?\""; + goto L_close; + +L_close: + @inventorylist_count = 0; + close; +} diff --git a/npc/048-2/helperBookpages1.txt b/npc/048-2/helperBookpages1.txt new file mode 100755 index 00000000..529142a2 --- /dev/null +++ b/npc/048-2/helperBookpages1.txt @@ -0,0 +1,136 @@ + +048-2,104,86,0 script Ensio NPC365,{ + @bookpages = ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + @old_bookpage_exp = 1000; + @new_bookpage_exp = 10000; + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 26) goto L_Almost; + if (@bookpages > 18) goto L_Many; + if (@bookpages > 8) goto L_Some; + if (@bookpages > 0) goto L_Few; + + mes "[Ensio]"; + mes "\"Hello. Did you come here to see the library? There isn't much left... But we're working on recovering the books by collecting the ripped out book pages, sorting them and recreating the books.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_close; + menu + "Good luck with that. See you in ten years or something.",L_Investigate, + "Can I help somehow?",L_Next; + +L_Next: + mes "[Ensio]"; + mes "\"Oh, would you? That'd be great! You see, the slimes ate most of the books and it is difficult to retrieve the bookpages."; + mes "If you feel capable of this task, you could go out to hunt the Blue and White Slimes, to get the bookpages back from them.\""; + goto L_Progress; + +L_Few: + mes "[Ensio]"; + mes "\"So many bookpages are still missing...\""; + next; + goto L_Progress; + +L_Some: + mes "[Ensio]"; + mes "\"Thanks for the pages you brought. There are still some missing.\""; + next; + goto L_Progress; + +L_Many: + mes "[Ensio]"; + mes "\"Wow, you already found quite a lot of bookpages. Please keep it up!\""; + next; + goto L_Progress; + +L_Almost: + mes "[Ensio]"; + mes "\"There are only a few pages missing.\""; + next; + goto L_Progress; + +L_Progress: + mes "\"Did you get some bookpages from the slimes?\""; + menu + "Yes, have a look.",L_Continue, + "No.",L_Investigate; + +L_Continue: + if (countitem("BookPage") < 1) + goto L_NoItem; + delitem "BookPage", 1; + + if (rand(90 - @bookpages) < 36) + goto L_OldPage; + + @bookpages = @bookpages + 1; + callfunc "updateBlueSageBookPages"; + getexp @new_bookpage_exp, 0; + mes "[Ensio]"; + mes "\"Ah, wonderful! This is a page we haven't found yet!\""; + if (@bookpages < 31) + goto L_Progress; + next; + mes "\"Amazing. I think you found all the missing pages of which we didn't have a copy. This is a great help! I'll mention this to Nikolai.\""; + goto L_Investigate; + +L_OldPage: + getexp @old_bookpage_exp, 0; + mes "[Ensio]"; + mes "\"Mh, let me see. We already have a copy of this page, but it's helpful nevertheless. Thank you.\""; + goto L_Progress; + +L_Thank: + mes "[Ensio]"; + mes "\"We'd never be able to recover our books so quickly without your help. Thanks!\""; + goto L_Investigate; + +L_NoItem: + mes "[Ensio]"; + mes "\"This isn't funny! Come back when you're serious.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Ensio]"; + mes "\"Visitor with a mask? Ah, I think I know who are you talking about. Black clothes and a golden mask. Rather strange guy.\""; + next; + mes "\"He was looking around in the library a while, and then came to ask about our research. He seemed to be particularly interested in our experiments with the slimes."; + mes "Heh, I wonder what he would've said if he'd have visited us a little bit later. Mh, now that I think about it, the accident with the slimes happened just the night after he was here.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Ensio]"; + mes "\"Oh, I can't really tell. I'm mostly working in the library, while he's very involved in the research.\""; + goto L_close; + +L_close: + @bookpages = 0; + @old_bookpage_exp = 0; + @new_bookpage_exp = 0; + close; +} diff --git a/npc/048-2/helperBookpages2.txt b/npc/048-2/helperBookpages2.txt new file mode 100755 index 00000000..b7d94be5 --- /dev/null +++ b/npc/048-2/helperBookpages2.txt @@ -0,0 +1,83 @@ + +048-2,94,86,0 script Henriikka NPC363,{ + @bookpages = ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "You see a helper looking through some papers that have a strange smell."; + mes "[Henriikka]"; + mes "\"Oh, hey. Welcome to the library, or what's left of it.\""; + mes "She sighs."; + menu + "What are you doing?",L_Next, + "You seem to be busy. See you.",L_close; + +L_Next: + mes "[Henriikka]"; + mes "\"We're trying to repair the books by collecting the ripped out bookpages and sorting them and copying them for new books. It's a lot to do, and after being eaten by a slime they stink!"; + mes "And a lot of pages are missing, since most of the slimes escaped. I suppose we'll have to go out and hunt them once we're done here.\""; + menu + "Maybe I can help with that?",L_Collect, + "Good luck.",L_close; + +L_Collect: + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Careful; + mes "[Henriikka]"; + mes "\"Oh, that'd be awesome! If you find some pages, you can bring them to Ensio.\""; + goto L_Investigate; + +L_Careful: + mes "[Henriikka]"; + mes "\"Oh, that's very kind, but those slimes are dangerous! Better become a bit stronger first.\""; + goto L_close; + +L_Progress: + mes "[Henriikka]"; + mes "\"If you get any bookpages from the slimes, bring them to Ensio. Thanks for your help!\""; + goto L_Investigate; + +L_Thank: + mes "[Henriikka]"; + mes "\"I'm so glad we didn't have to go out to hunt the slimes! Thank you!\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Henriikka]"; + mes "\"With a mask? I don't really remember... We have so many visitors. Though I suppose someone wearing a mask would be noticeable... But I'm so worn out from the past few days that I'm just glad I can even recall my own name! Sorry.\""; + goto L_close; + +L_Helper: + mes "[Henriikka]"; + mes "\"Oh, I never really thought about that. He was the one who failed the sealing spell, right? But I heard it's a quite difficult spell, so I suppose this could've happened to anyone. I don't know. Why are you asking such difficult questions?\""; + next; + mes "\"I need to go on with sorting the bookpages now.\""; + goto L_close; + +L_close: + @bookpages = 0; + close; +} diff --git a/npc/048-2/helperBookpages3.txt b/npc/048-2/helperBookpages3.txt new file mode 100755 index 00000000..4ac8d497 --- /dev/null +++ b/npc/048-2/helperBookpages3.txt @@ -0,0 +1,62 @@ + +048-2,99,87,0 script Teuvo NPC366,{ + @bookpages = ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "[Teuvo]"; + mes "\"I always thought it was a bad idea to play around with the slimes. And as if holding them in here isn't bad enough, no, they also had to mess around with magic.\""; + mes "He seems to be rather upset."; + goto L_Investigate; + +L_Progress: + mes "[Teuvo]"; + mes "\"Did you find some bookpages? Ensio will take them.\""; + goto L_Investigate; + +L_Thank: + mes "[Teuvo]"; + mes "\"Thanks for helping out here.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Teuvo]"; + mes "\"With a mask? Hm. I don't remember.\""; + goto L_close; + +L_Helper: + mes "[Teuvo]"; + mes "\"Peetu? He's one of those magic wielders who think they can do anything. Heh, you see the result here."; + mes "But to be fair, from what I've seen Peetu was always very attentive and dutiful.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @bookpages = 0; + close; +} diff --git a/npc/048-2/helperChief.txt b/npc/048-2/helperChief.txt new file mode 100755 index 00000000..0a4e3c90 --- /dev/null +++ b/npc/048-2/helperChief.txt @@ -0,0 +1,117 @@ + +048-2,146,26,0 script Oskari NPC134,{ + if (QL_BSAGE_INVESTIGATE >= 11 && QL_BSAGE_INVESTIGATE < 13) goto L_Goodjob; + if (QL_BSAGE_INVESTIGATE > 1 && QL_BSAGE_INVESTIGATE < 13) goto L_Investigate; + + mes "[Oskari]"; + mes "\"Hello. Welcome to the residence of the Great Nikolai."; + mes "You have to excuse me, as you might have heard we're having some trouble at the moment and I, as Chief of Nikolai's helpers, have a lot to do.\""; + if (QL_BSAGE_INVESTIGATE == 0) + goto L_close; + menu + "Peetu asked me to talk to you about his mishap.",L_Next, + "Ok, see you.",L_close; + +L_Next: + mes "You tell him about your conversation with Peetu, how he's blaming himself and his worries about losing his job."; + next; + mes "Oskari keeps silent for a moment after you finish, pondering. Then he talks to you."; + mes "[Oskari]"; + mes "\"You know, Peetu is one of my most experienced and reliable employees. This whole situation is very disquieting, not to say suspicious.\""; + next; + mes "\"Due to all the trouble, I haven't had time to have a talk with him nor to make further investigations. You already showed some good knowledge of human nature by the way you calmed him down and talked to me.\""; + next; + mes "\"Would you be willing to talk with Peetu and the other helpers, investigating what actually happened?\""; + next; + mes "\"As someone who's not a member of our team you might be able to get a more unbiased view of the situation, besides the fact that all of us are very busy with getting the situation under control again.\""; + next; + mes "\"I suggest to start by talking to Peetu again to get a precise idea of his workflow and what he thinks happened."; + mes "Oh, and please tell him that I'm not considering firing him in the current situation. You might need that to calm him down and get meaningful information.\""; + next; + mes "\"You should find out if someone observed anything unusual during the time before the accident happened.\""; + QL_BSAGE_INVESTIGATE = 2; + goto L_close; + +L_Investigate: + mes "[Oskari]"; + mes "\"Ah, hello. Did you get an overview over the happenings yet?\""; + if (QL_BSAGE_INVESTIGATE != 10) + menu + "I'm still collecting information.",L_close; + next; + mes "You explain who you talked to, the helpers positive opinions of Peetu and what you found out about the suspicious visitor."; + mes "[Oskari]"; + mes "\"With a mask you say? This reminds me... wait a moment.\""; + mes "He turns to his desk and searches through some papers."; + next; + mes "[Oskari]"; + mes "\"Mh... yes. It fits together."; + mes "Listen, this is a letter from Chief Warrick on Santa's team. It seems they encountered some sabotaging during their preparations for the Christmas time... the letter mentions a masked person as well.\""; + next; + mes "\"And there are some reports about cases of unusal behaviour from native animals in various places of Kaizei that came to the Sages notice.\""; + next; + mes "\"And now this accident in our house, also a person with a mask... and given the context of the recent frictions within the Sages...\""; + mes "Oskari seems rather excited."; + next; + mes "[Oskari]"; + mes "\"I think you revealed some important connections. I need to notify Nikolai and the other Sages.\""; + menu + "I'm confused now.",L_Continue, + "What are you talking about?",L_Continue; + +L_Continue: + mes "[Oskari]"; + mes "\"I'm sorry. I think you deserve an explanation. You see, the Sages of Kaizei are a circle of wise wizards who work together for the prosperity of this continent."; + mes "Recently there was some conflict among the Sages which caused one of the members to leave the circle. It's all very unfortunate."; + next; + mes "\"However, taking all these different events into account, I came to the suspicion that there might be a connection. Of course we don't have evidence yet, so I don't want to be too sure. Well, I'll bring this to the Sages' notice.\""; + next; + mes "\"You were a great help! I'll inform Nikolai about your involvement in clarifying this matter.\""; + next; + mes "\"And you should also talk with Peetu, I'm sure he'll be relieved to hear about the clarification of this matter too.\""; + QL_BSAGE_INVESTIGATE = 11; + goto L_close; + +L_Goodjob: + mes "[Oskari]"; + mes "\"Thanks again for your investigations.\""; + menu + "You're welcome.",L_close, + "Can you tell me something about the Sages?",L_MoreText; + +L_MoreText: + mes "[Oskari]"; + mes "\"Oh, sure. I'm a bit busy right now, but you were a great help, so I think I can take a few minutes for you. What do you want to know?\""; + menu + "What exactly are the Sages and what do they do?",L_Sages, + "What was that conflict you were talking about?",L_Conflict, + "Mh, I changed my mind.",L_close; + +L_Sages: + mes "[Oskari]"; + mes "\"Well, as I said the Sages are a circle of powerful wizards. There are twelve of them - eh, actually, now there are only eleven of them.\""; + mes "He sighs."; + next; + mes "[Oskari]"; + mes "\"However, they live in different places all over Kaizei, but they meet sometimes to discuss different matters. They work hard for the prosperity of this continent, trying to improve the living conditions by both political work and magical research, with the aid of their helpers.\""; + next; + mes "\"The politics on Kaizei are rather complicated. The Sages have great influence, but there are also other organizations and groups. Due to the harsh climate on this continent, villages or towns can be cut off from the rest of the world for several weeks sometimes, so most of them tend to be rather independent.\""; + next; + mes "\"Also there's the Order of Ice, an organization which represents the national interests of Kaizei in a rather narrow-minded way compared to the Sages.\""; + goto L_close; + +L_Conflict: + mes "[Oskari]"; + mes "\"Oh, I'm not sure if I should talk about that... It's a rather delicate situation.\""; + next; + mes "\"Basically there was a disagreement between the Sages. Usually those things can be solved by discussion, but this time... things got rather personal and one of the members accused Santa of valuing his own interests over the general good.\""; + next; + mes "\"This, of course, is nonsense. Santa would never do that, and it's more that the person accusing him has been suspected to act this way. The other Sages were on Santa's side and I fear this harsh rejection caused a lot of painful feelings.\""; + next; + mes "\"Personally I think that he has been jealous of Santa's influence and high position for quite a while. However, he took this as a reason to leave the Sages and based on our insights, it seems he decided to work against the Sages."; + mes "It really is a shame.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/048-2/helperCleaning1.txt b/npc/048-2/helperCleaning1.txt new file mode 100755 index 00000000..208a06d3 --- /dev/null +++ b/npc/048-2/helperCleaning1.txt @@ -0,0 +1,98 @@ + +048-2,117,106,0 script Pyry NPC365,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Pyry]"; + mes "\"Welcome to the library of Sage Nikolai. I'm very sorry, but as you see it's not in a good shape at the moment. Most of the books were eaten by the slimes or damaged and we're working hard on cleaning up the mess."; + mes "I have to ask you not to go in the deeper parts of the library, since there are still some of the slimes left and they're dangerous.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_close; + menu + "I can fight them.",L_Next, + "Ok, thanks for the warning.",L_Investigate; + +L_Next: + mes "Pyry seems surprised."; + mes "[Pyry]"; + mes "\"That... I didn't think about this possibility. But it'd be a great help!"; + mes "Ok, there are some slimes around in the deeper parts of the library. They... erm, developed some very fast breeding behaviour, both the Blue Slimes and the White Slimes, but in a slightly different fashion.\""; + next; + mes "\"The Blue ones are able to generate smaller slimes which show a self-destructive behaviour to protect their... parent slime if you want to call it that. You have to kill the big one, but be careful of the smaller ones while trying that.\""; + next; + mes "\"The White Slimes appear in groups and when you attack one of them, they also show some self-destructive behaviour to protect their group as a whole. You have to defeat the entire group, otherwise the remaining slimes will breed new slimes to replace their lost.\""; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlimesStart; + goto L_Investigate; + +L_Progress: + mes "[Pyry]"; + mes "\"It's very brave of you to fight against those slimes deeper in the library. Remember that you have to kill the entire group to prevent them from breeding.\""; + callfunc "blueSageNumberOfClearedNests"; + if (@slimenests > 5) goto L_Almost; + if (@slimenests > 3) goto L_Some; + if (@slimenests > 1) goto L_Few; + goto L_Investigate; + +L_Almost: + next; + mes "\"I think there are only very few left.\""; + goto L_Investigate; + +L_Some: + next; + mes "\"The amount of slimes decreased noticably, but there are still some left.\""; + goto L_Investigate; + +L_Few: + next; + mes "\"I saw you already started, keep it on!\""; + goto L_Investigate; + +L_Thank: + mes "[Pyry]"; + mes "\"It seems all of the slimes are gone now. I'm so glad! Thanks for your help. I mentioned your assistance to Nikolai.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Pyry]"; + mes "\"Mh, yes. I remember him. He was very interested in the library and the research we do here. He had an unusual behaviour and appearance. But, well, that isn't a reason to refuse someone, right?\""; + goto L_close; + +L_Helper: + mes "[Pyry]"; + mes "\"Peetu? I have always been glad to have him on the team. He's really brought forward our work here.\""; + next; + mes "\"I was very surprised when I heard that he's responsible for the failed sealing spell. I'd never have expected that from him.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/helperCleaning2.txt b/npc/048-2/helperCleaning2.txt new file mode 100755 index 00000000..4be03d9d --- /dev/null +++ b/npc/048-2/helperCleaning2.txt @@ -0,0 +1,67 @@ + +048-2,123,87,0 script Nea NPC363,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Nea]"; + mes "\"Oh, hello. If I were you I wouldn't go deeper into the library. There are still some of those monsters left. Slipping between the bookshelves.\""; + mes "She shudders."; + next; + mes "[Nea]"; + mes "\"And they can explode! Nothing in the world could make me go in there. I'll just do my work right here, clean the floor and tidy up the books, and I'm keeping my eyes open in case they get over here.\""; + goto L_Investigate; + +L_Progress: + mes "[Nea]"; + mes "\"Oh, I'm so glad you're taking care of those scary slimes. You're so brave!"; + mes "How many of them are still left, do you think? Will it be safe to go there soon?\""; + goto L_Investigate; + +L_Thank: + mes "[Nea]"; + mes "\"I feel much safer now that you defeated the slimes. Thanks so much!\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Nea]"; + mes "\"With a mask? Mh, I think I know who are you talking about. I vaguely remember that there was someone with a mask... but I can't recall any details, I wasn't really paying attention.\""; + goto L_close; + +L_Helper: + mes "[Nea]"; + mes "\"Peetu? Yeah, he's the kind of person who always wants to do things perfectly. That makes it a bit difficult to work with him, since his expectations for others are as high as for himself.\""; + next; + mes "\"I really wonder how that accident with the sealing spell could've happened. I'd have never expected him to mess something up like that.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/helperCleaning3.txt b/npc/048-2/helperCleaning3.txt new file mode 100755 index 00000000..df072fe1 --- /dev/null +++ b/npc/048-2/helperCleaning3.txt @@ -0,0 +1,71 @@ + +048-2,139,99,0 script Arvo NPC366,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Arvo]"; + mes "\"Oh, this is so much work... I can't believe they let this happen! You would think they'd be careful when playing around with such powerful forces. Hah! Big mistake!\""; + goto L_Investigate; + +L_Progress: + mes "[Arvo]"; + mes "\"We really appreciate your help with the slimes.\""; + mes "He sighs."; + goto L_Investigate; + +L_Thank: + mes "[Arvo]"; + mes "\"Good work with the slimes. This will make our task much easier.\""; + mes "He sighs and takes a careful look around."; + next; + mes "[Arvo]"; + mes "\"But it shows that Nikolai's position isn't what it used to be. There's disturbance in the great circle of our Sages and things have changed. About one year ago, Nikolai's helpers wouldn't have needed the help of a mere adventurer - no offense.\""; + next; + mes "\"But it appears we were focusing too much on research and this lead to neglect of other duties of a Sage's household. This is dangerous in times of changes. I'm worried about the future.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Arvo]"; + mes "\"Yes, I remember that one! I welcomed him in the libary and showed him around. But I didn't have the impression he was really listening to what I was saying, though that's hard to tell with the mask.\""; + next; + mes "\"But when I left him to look at the books on his own, he sneaked over to the workshop area. Visitors are allowed to have a look there, but only if they don't interfere with any research and experiments. But it seems he was being rather disturbing, since they sent them back to the library part.\""; + next; + mes "\"I tried to keep an eye on him after that, but when I got distracted by some newly arriving visitor he went over to the workshop again! Usually I enjoy my job, because I like talking to people, but this guy... was a pain, really.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Arvo]"; + mes "\"Peetu? That's one of the high rank helpers. As far as I know, he's very talented with magic and takes part in some important research. But I don't really know about those things.\""; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/helperCleaning4.txt b/npc/048-2/helperCleaning4.txt new file mode 100755 index 00000000..ef1397be --- /dev/null +++ b/npc/048-2/helperCleaning4.txt @@ -0,0 +1,62 @@ + +048-2,131,119,0 script Kristian NPC366,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Kristian]"; + mes "\"Welcome. Please don't go deeper into the library, there are still some slimes left. But in spite of that we have made quite a bit of progress. You should have seen the mess just after most of the slimes escaped!\""; + goto L_Investigate; + +L_Progress: + mes "[Kristian]"; + mes "\"Wow, it's really generous of you to fight those slimes for us.\""; + goto L_Investigate; + +L_Thank: + mes "[Kristian]"; + mes "\"I'm so glad that you took care of the remaining slimes. Thanks!\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Kristian]"; + mes "\"Oh, there was such a visitor, yes. Strange guy, and didn't really know how to behave. He sneaked into the workshop area all the time, I think he was rather curious about the things going on there.\""; + next; + mes "\"But still, he can't just walk in there, fiddle with the experiments and disturb the helpers doing their work.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Kristian]"; + mes "\"Peetu? I think he's a good guy. Very focused on his work, I think. I don't have that much to do with him, so I can't really tell.\""; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/helperCleaning5.txt b/npc/048-2/helperCleaning5.txt new file mode 100755 index 00000000..3e9885a6 --- /dev/null +++ b/npc/048-2/helperCleaning5.txt @@ -0,0 +1,64 @@ + +048-2,100,125,0 script Mirjami NPC363,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + + mes "[Mirjami]"; + mes "\"Where is it? Everything's upside down. These terrible slimes.\""; + menu + "What are you doing?",L_Next; + +L_Next: + mes "[Mirjami]"; + mes "\"Oh? I'm just searching for some cleaning supplies. They must be somewhere around here, but everything went upside down when the slimes escaped.\""; + goto L_Investigate; + +L_Thank: + mes "[Mirjami]"; + mes "\"I heard you fought the slimes that were still roaming between the bookshelves. Thank you!\""; + next; + mes "\"I was a bit worried that they might ruin our efforts by messing everything up again after we just cleaned.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Mirjami]"; + mes "\"Ohh, I think I know who you mean. That was a strange guy. He always came over here in the workshop, said he's very interested in the research. I suppose that's ok, but he didn't keep his hands to himself, and touched some experiments and I caught him near some storage racks.\""; + next; + mes "\"Visitors should keep away from those!\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Mirjami]"; + mes "\"Oh, eh, why are you asking me? I've only been here a short while and don't really know all of the people well enough yet.\""; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/helperJanitor.txt b/npc/048-2/helperJanitor.txt new file mode 100755 index 00000000..b60b0062 --- /dev/null +++ b/npc/048-2/helperJanitor.txt @@ -0,0 +1,96 @@ + +048-2,36,44,0 script Debug#BlueSage NPC110,{ + mes "QUEST_BlueSage: "+ QUEST_BlueSage; + mes "QL_BSAGE_INVESTIGATE: "+ QL_BSAGE_INVESTIGATE; + next; + menu + "set QL_BSAGE_INVESTIGATE", L_Investigate; + +L_Investigate: + input @state; + if(@state < 0 || @state > 14) set @state, 0; + QL_BSAGE_INVESTIGATE = @state; + close; + +OnInit: + if (!debug) disablenpc strnpcinfo(0); + end; +} + +048-2,40,41,0 script Elias NPC110,7,6,{ + if (QL_BSAGE_INVESTIGATE == 11) goto L_Thank; + if ((QL_BSAGE_INVESTIGATE == 4) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Confirmed; + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 9)) goto L_Worry; + if (QUEST_BlueSage > 0 && QL_BSAGE_INVESTIGATE < 13) goto L_ShortHello; + + mes "[Elias]"; + mes "\"Welcome to the residence of Nikolai, member of the Sages of Kaizei.\""; + next; + mes "\"Our house is famous for its extraordinary and well equipped library."; + mes "Ahm, usually well equipped.\""; + next; + mes "\"We had an accident with some magic experiments, that caused some slimes to get out of control. They ate most of the books in the library.\""; + mes "He sighs with a regretful look on his face."; + next; + mes "[Elias]"; + mes "\"So, if you came because of the library, I'll have to disappoint you, because there isn't much left."; + mes "Though you look like a skilled adventurer. If you'd like to offer your help that'd be greatly appreciated.\""; + if(QL_BSAGE_INVESTIGATE == 13) + QL_BSAGE_INVESTIGATE = 14; + next; + mes "\"The library is on the third floor.\""; + goto L_close; + +OnTouch: + if (BaseLevel >= $@Q_BlueSageMinimumLevel && !QL_BSAGE_INVESTIGATE) + QL_BSAGE_INVESTIGATE = 13; + end; + +L_ShortHello: + mes "[Elias]"; + mes "\"Welcome back. I heard you're helping with the cleanup efforts in the library."; + mes "Thank you very much.\""; + if ((QL_BSAGE_INVESTIGATE != 2) && (QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 8)) + goto L_close; + menu + "Can you tell me if there were any unusual visitors before the accident?",L_Next; + +L_Next: + mes "[Elias]"; + mes "\"Mh, let me think. There were quite a few visitors with different concerns, but that's usual at this time of the year."; + mes "One of them was a bit odd, he was wearing a mask and had a strange way of talking. He said he comes from Thermin, which is a mining town in the west. I figured his face might have gotten deformed in some mining accident, but I didn't ask, that would've been rude."; + mes "If I remember correctly he wanted to see the library.\""; + next; + mes "Elias gets a bit excited now."; + mes "[Elias]"; + mes "\"Do you think he may have had something to do with the accident? We're a very hospitable house, so I didn't see a reason to deny him the entrance. I mean, his mask might have been a bit unusual, but hey, there could've been many reasons why someone would wear a mask, don't you think?\""; + + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + + menu + "Sure, but it's interesting that he was here shortly before the accident.",L_close, + "I'll ask some more people about that guy.",L_close; + +L_Worry: + mes "[Elias]"; + mes "\"After your questions I'm really getting worried about this guy with the mask. In retrospect it really seems suspicous."; + mes "It might be a good idea to ask around if anyone else observed something odd connected to this person.\""; + goto L_close; + +L_Confirmed: + mes "[Elias]"; + mes "\"I heard your investigations reminded other people that they observed suspicious behaviour too.\""; + next; + mes "\"It's all my fault, I should've paid more attention! You should talk to Chief Oskari about this.\""; + goto L_close; + +L_Thank: + mes "[Elias]"; + mes "\"Now that Chief Oskari knows about the sequence of events, the Sages will take care of it. It's really a shame how malicious people can be.\""; + next; + mes "\"Thanks a lot for your help revealing the truth.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/048-2/helperMInk.txt b/npc/048-2/helperMInk.txt new file mode 100755 index 00000000..b695ec85 --- /dev/null +++ b/npc/048-2/helperMInk.txt @@ -0,0 +1,100 @@ + +048-2,95,103,0 script Eevert NPC365,{ + @water_amount = 5; + @spectre_amount = 3; + @poltergeist_amount = 3; + @wisp_amount = 3; + @ironpowder_amount = 4; + @ink_exp = 7000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialInk) goto L_Done; + + mes "[Eevert]"; + mes "\"Mh. I wonder how I'm expected to perform my task with this meager equipment. The new books will look pathetic.\""; + mes "He sighs."; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_close; + menu + "What do you need?",L_Need, + "Not my problem.",L_Investigate; + +L_Need: + mes "[Eevert]"; + mes "\"I'm doing the covers and illustrations for the new books we create from the pieces of the old ones. But due to all of the chaos from when the slimes escaped, most of the phials of colored ink were broken. How am I supposed to do the illustrations without color?\""; + next; + mes "\"I think I'll need at least " + @water_amount + " Bottles of Water, " + @spectre_amount + " Spectre Powders, " + @poltergeist_amount + " Poltergeist Powders, " + @wisp_amount + " Wisp Powders and " + @ironpowder_amount + " Iron Powders to create new ink.\""; + menu + "I have those with me!",L_TurnIn, + "I'll try to get those.",L_close, + "Too bad.",L_Investigate; + +L_TurnIn: + if ((countitem("BottleOfWater") < @water_amount) || (countitem("SpectrePowder") < @spectre_amount) || (countitem("PoltergeistPowder") < @poltergeist_amount) || (countitem("WispPowder") < @wisp_amount) || (countitem("IronPowder") < @ironpowder_amount)) + goto L_NoItem; + delitem "BottleOfWater", @water_amount; + delitem "SpectrePowder", @spectre_amount; + delitem "PoltergeistPowder", @poltergeist_amount; + delitem "WispPowder", @wisp_amount; + delitem "IronPowder", @ironpowder_amount; + getexp @ink_exp, 0; + QUEST_BlueSage = (QUEST_BlueSage | $@Q_BlueSageMaterialInk); + mes "[Eevert]"; + mes "\"Wonderful! Now I can prepare the ink for magnificent illustrations! You're very generous.\""; + goto L_Investigate; + +L_Done: + mes "[Eevert]"; + mes "\"Thanks for your help with the inks! Now I'll be able to fulfill my tasks adequately. Some of these books were really valuable, and it's important to recreate them as good as possible.\""; + goto L_Investigate; + +L_NoItem: + mes "[Eevert]"; + mes "\"What does this mean? You don't have it!\""; + goto L_close; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Eevert]"; + mes "\"A visitor? I don't really pay attention to visitors, unless it's someone notable.\""; + goto L_close; + +L_Helper: + mes "[Eevert]"; + mes "\"Ah, Peetu. I really appreciate his sense for high quality work. The requirements to become a helper of a sage are already high, but Peetu is outstanding. He has a talent for magic and combined with his diligence, it's quite remarkable.\""; + next; + mes "\"That's why I'm really confused about this situation, since he was the one performing the sealing of the slimes. I wonder what went wrong.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @water_amount = 0; + @spectre_amount = 0; + @poltergeist_amount = 0; + @wisp_amount = 0; + @ironpowder_amount = 0; + @ink_exp = 0; + close; +} diff --git a/npc/048-2/helperMReed.txt b/npc/048-2/helperMReed.txt new file mode 100755 index 00000000..4a5bf109 --- /dev/null +++ b/npc/048-2/helperMReed.txt @@ -0,0 +1,89 @@ + +048-2,104,78,0 script Kullervo NPC366,{ + @reed_amount = 20; + @reed_exp = 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialReed) goto L_Done; + + mes "[Kullervo]"; + mes "\"Oh no! What should we do now?\""; + menu + "What's wrong?",L_Foo; +L_Foo: + mes "[Kullervo]"; + mes "\"We're nearly out of paper. The new books require so much material... And it's not easy to get Reed Bundles to create new paper.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_close; + menu + "I have some.",L_TurnIn, + "I'll try to get some.",L_close, + "Too bad.",L_Investigate; + +L_TurnIn: + if(countitem("ReedBundle") < @reed_amount) + goto L_NoItem; + delitem "ReedBundle", @reed_amount; + getexp @reed_exp, 0; + QUEST_BlueSage = (QUEST_BlueSage | $@Q_BlueSageMaterialReed); + mes "[Kullervo]"; + mes "\"Thank you! That's very generous of you.\""; + goto L_Investigate; + +L_Done: + mes "[Kullervo]"; + mes "\"Very well, now I can create more paper.\""; + goto L_Investigate; + +L_NoItem: + mes "[Kullervo]"; + mes "\"Oh, really? Ah, it's not enough. I need " + @reed_amount + " Reed Bundles.\""; + goto L_close; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Kullervo]"; + mes "\"Oh, yes. There was such a guy, shortly before the accident I think. He sneaked into the workshop several times, sticking his nose into stuff that shouldn't be his business. We had to send him back to the library area at least three times.\""; + next; + mes "\"Maybe he was confused, not sure. He talked very strangely.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Kullervo]"; + mes "\"Are you asking because people say it's his fault? Listen, I've known him for many years now. We started our service here about the same time. We share our room and are really close friends."; + mes "And in all these years, I've never seen him messing up anything important. He's a perfectionist. He isn't satisfied with anything less than the best possible result when doing his work.\""; + next; + mes "\"I don't understand what went wrong with that spell, but it just has to have another cause than Peetu. I'm worried about him. He must feel very miserable. But I can't leave my duty here.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @reed_amount = 0; + @reed_exp = 0; + close; +} diff --git a/npc/048-2/helperMSilk.txt b/npc/048-2/helperMSilk.txt new file mode 100755 index 00000000..58d3f899 --- /dev/null +++ b/npc/048-2/helperMSilk.txt @@ -0,0 +1,84 @@ + +048-2,104,103,0 script Janika NPC363,{ + @silk_amount = 80; + @silk_exp = 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialSilk) goto L_Done; + if (BaseLevel >= $@Q_BlueSageMinimumLevel) goto L_Quest; + + mes "[Janika]"; + mes "\"This is going to be difficult... oh, hello. I'm working on recreating some of the books that were destroyed.\""; + goto L_close; + +L_Quest: + mes "[Janika]"; + mes "\"This is going to be difficult..."; + mes "Oh, hello. You don't have " + @silk_amount + " Silk Cocoons with you, do you? I need them for the book covers and binding of some of the more valuable books we're trying to recreate.\""; + menu + "I have!",L_TurnIn, + "I haven't, but I can try to get some.",L_Investigate, + "No.",L_Investigate; + +L_TurnIn: + if(countitem("SilkCocoon") < @silk_amount) + goto L_NoItem; + delitem "SilkCocoon", @silk_amount; + getexp @silk_exp, 0; + QUEST_BlueSage = (QUEST_BlueSage | $@Q_BlueSageMaterialSilk); + mes "[Janika]"; + mes "\"Excellent! This is exactly what I need. Thanks a lot. I'll tell Nikolai about your generosity.\""; + goto L_Investigate; + +L_Done: + mes "[Janika]"; + mes "\"Thanks for the Silk Cocoons. With these the new books are going to be exquisite.\""; + goto L_Investigate; + +L_NoItem: + mes "[Janika]"; + mes "\"Are you kidding? You don't have it!\""; + goto L_close; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Janika]"; + mes "\"Oh, I know who you mean! That impertinent person came over in the workshop area and fiddled about with all kinds of things here! Such a rude person! Didn't he understand that we had delicate things going on here? We had to send him back to the library area several times.\""; + next; + mes "She shakes her head."; + mes "\"Sometimes I think it'd be better not to allow visitors here. But the sages set a high value on keeping contact with the population. Politics.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Janika]"; + mes "\"Mh, I don't know him closely.\""; + goto L_close; + +L_close: + @silk_amount = 0; + @silk_exp = 0; + close; +} diff --git a/npc/048-2/helperMYetiClaw.txt b/npc/048-2/helperMYetiClaw.txt new file mode 100755 index 00000000..062b36d4 --- /dev/null +++ b/npc/048-2/helperMYetiClaw.txt @@ -0,0 +1,91 @@ + +048-2,97,78,0 script Santeri NPC366,{ + @claw_amount = 8; + @claw_exp = 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialClaw) goto L_Done; + if (BaseLevel >= $@Q_BlueSageMinimumLevel) goto L_Quest; + + mes "[Santeri]"; + mes "\"Hm. Please don't disturb me, I'm trying to concentrate.\""; + goto L_close; + +L_Quest: + mes "[Santeri]"; + mes "\"Welcome. Are you an adventurer? I could use some help.\""; + menu + "I am. What heroic action is needed?",L_HeroicAction, + "How can I help?",L_HeroicAction, + "I'm not interested.",L_close; + +L_HeroicAction: + mes "[Santeri]"; + mes "\"You see, we're working on repairing all of the damaged books and creating new ones for those that were lost."; + mes "Therefore we need a lot of glue, but our supplies are nearly used up. I need " + @claw_amount + " Yeti Claws as ingredient to make new glue. Do you have that?\""; + menu + "Yes, here you go.",L_TurnIn, + "I need to look in my storage.",L_close, + "No, sorry.",L_Investigate; + +L_TurnIn: + if(countitem("YetiClaw") < @claw_amount) + goto L_NoItem; + delitem "YetiClaw", @claw_amount; + getexp @claw_exp, 0; + QUEST_BlueSage = (QUEST_BlueSage | $@Q_BlueSageMaterialClaw); + mes "[Santeri]"; + mes "\"Great! Thank you!\""; + goto L_Investigate; + +L_Done: + mes "[Santeri]"; + mes "\"Thanks to you, our glue supply is replenished and we can repair those books.\""; + goto L_Investigate; + +L_NoItem: + mes "[Santeri]"; + mes "\"What are you telling me? You don't have it!\""; + goto L_close; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Santeri]"; + mes "\"There was a visitor with a mask? I didn't notice. You see, I spend most of my time in the workshop, and concentrate on my work. There are other helpers who attend to the visitors. And hopefully keep them from disturbing my concentration.\""; + goto L_close; + +L_Helper: + mes "[Santeri]"; + mes "\"Oh, that's an interesting question. I was really surprised when I heard that he was responsible for the sealing spell. I've worked together with him before, and I have to say, it really was a pleasure. He's very accurate and diligent, but also polite and helpful.\""; + next; + mes "\"I really wonder what went wrong with that sealing spell. I can't imagine Peetu messing up something so important.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @claw_amount = 0; + @claw_exp = 0; + close; +} diff --git a/npc/048-2/helperResting1.txt b/npc/048-2/helperResting1.txt new file mode 100755 index 00000000..ae6fb407 --- /dev/null +++ b/npc/048-2/helperResting1.txt @@ -0,0 +1,63 @@ + +048-2,36,26,0 script Lenita NPC363,{ + @bookpages = ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 254) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "[Lenita]"; + mes "\"Oh, hello. You didn't choose a good time to visit. The library is a total mess. The slimes got out of control and ate most of the books.\""; + next; + mes "\"We're trying to repair some of the valuable and important books. It's so much work!"; + mes "I was up until late last night, and woke up so early today... I'm having a break right now.\""; + goto L_Investigate; + +L_Progress: + mes "[Lenita]"; + mes "\"Teuvo said you're helping to collect some of the missing bookpages to repair the books. That's very kind of you! It's so much work to do, so every bit of help is welcome.\""; + goto L_Investigate; + +L_Thank: + mes "[Lenita]"; + mes "\"Wow, Ensio told me you collected so many of the lost book pages.\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "I need to leave.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "See you later.",L_close; + +L_Ask_Both: + menu + "Can you tell me anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Visitor: + mes "[Lenita]"; + mes "\"With a mask? Yeah, I remember. That was a strange guy. He came to visit the library, but he lurked around at the workshop area and they had to send him back to the books.\""; + if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 1; + goto L_close; + +L_Helper: + mes "[Lenita]"; + mes "\"Mh, I can't really tell since I usually work in the library while he works at the workshop. Maybe you should ask around among the people who work there.\""; + goto L_close; + +L_close: + @bookpages = 0; + close; +} diff --git a/npc/048-2/helperResting2.txt b/npc/048-2/helperResting2.txt new file mode 100755 index 00000000..30f16cd3 --- /dev/null +++ b/npc/048-2/helperResting2.txt @@ -0,0 +1,64 @@ + +048-2,35,27,0 script Miro NPC366,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Miro]"; + mes "\"Hm? Oh, excuse me. I'm feeling so tired. We currently have some problems with some slimes out of control in the library. They ate most of the books and caused total chaos.\""; + next; + mes "\"We need to clean up the mess and it's so much to do. I was cleaning the floor for hours and I'm having a break now.\""; + goto L_Investigate; + +L_Progress: + mes "[Miro]"; + mes "\"Pyry mentioned you're helping with the leftover slimes. You're really brave! I'd be afraid they'd eat me like they ate the books!\""; + goto L_Investigate; + +L_Thank: + mes "[Miro]"; + mes "\"Wow, the way you took care of the slimes in the library! Amazing! This makes our job there much easier... and safer. Thank you so much!\""; + goto L_Investigate; + +L_Investigate: + if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor; + if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper; + if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both; + goto L_close; + +L_Ask_Visitor: + menu + "Do you know anything about the visitor with the mask?",L_Visitor, + "See you.",L_close; + +L_Ask_Helper: + menu + "What's your opinion of Peetu and how he does his work?",L_Helper, + "Bye.",L_close; + +L_Ask_Both: + menu + "Do you know anything about the visitor with the mask?",L_Visitor, + "What's your opinion of Peetu and how he does his work?",L_Helper, + "I need to leave.",L_close; + +L_Visitor: + mes "[Miro]"; + mes "\"With a mask? I really don't know. I'm usually in the workshop and most of the visitors spend their time in the library. Sometimes they come to have a quick look in the workshop too, but I don't really pay attention to that, so... I can't recall a visitor with a mask, sorry.\""; + goto L_close; + +L_Helper: + mes "[Miro]"; + mes "\"Peetu? It was his job to seal away the slimes before the night, right? I have to say I'm really surprised about what happened, because he's a very cautious person. I'd have never guessed that he'd mess up something as important as this.\""; + next; + mes "\"If Nikolai's helpers weren't so carefully chosen, I'd think this was some kind of a bad joke from someone.\""; + if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7)) + goto L_close; + QL_BSAGE_INVESTIGATE = QL_BSAGE_INVESTIGATE + 3; + goto L_close; + +L_close: + @slimes = 0; + close; +} diff --git a/npc/048-2/mapflags.txt b/npc/048-2/mapflags.txt new file mode 100755 index 00000000..8ec972d9 --- /dev/null +++ b/npc/048-2/mapflags.txt @@ -0,0 +1 @@ +//048-2 mapflag resave 048-2,26,46 diff --git a/npc/048-2/sageNikolai.txt b/npc/048-2/sageNikolai.txt new file mode 100755 index 00000000..d69cad46 --- /dev/null +++ b/npc/048-2/sageNikolai.txt @@ -0,0 +1,281 @@ + +048-2,98,106,0 script Nikolai NPC362,{ + @halloween_npc_id = $@halloween_npc_nikolai; + callfunc "TrickOrTreat"; + + @bookpages = ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + @material = ((QUEST_BlueSage & $@Q_BlueSageMaterial_MASK) >> $@Q_BlueSageMaterial_SHIFT); + + if ((@bookpages == 31) + && (QUEST_BlueSage & $@Q_BlueSageMaterialInk) + && (QUEST_BlueSage & $@Q_BlueSageMaterialClaw) + && (QUEST_BlueSage & $@Q_BlueSageMaterialReed) + && (QUEST_BlueSage & $@Q_BlueSageMaterialSilk) + && !(QUEST_BlueSage & $@Q_BlueSageGrimoire)) + goto L_GrimoireReward; + + if ((@slimes == 255) && !(QUEST_BlueSage & $@Q_BlueSageIceSword)) + goto L_SlimesReward; + + if ((QUEST_BlueSage & $@Q_BlueSageGrimoire) && (QUEST_BlueSage & $@Q_BlueSageIceSword)) + goto L_Done; + + if (QUEST_BlueSage > 0) + goto L_Hints; + + mes "You see a very reputable looking man who is going through some papers. He looks up as you approach."; + mes "[Nikolai]"; + mes "\"Welcome to my mansion. I am Nikolai, member of the Sages of Kaizei."; + mes "I assume you came to see our famous library? As you can see, it isn't in very good shape due to some... misfortunes. I'm very sorry.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_close; + next; + mes "\"You seem to be quite an experienced adventurer. I usually wouldn't ask for this, but since my dear friend Santa mentioned his good experiences with hiring additional helpers in times of pressure, I reconsidered."; + mes "If you don't mind, every bit of help with our current situation would be appreciated.\""; + next; + mes "\"There are many things to take care of at the moment, so if you'd like to aid us, the helpers will be able to tell you what they need.\""; + goto L_close; + +L_Hints: + mes "[Nikolai]"; + mes "\"I heard you started to help out a bit. That's very kind.\""; + + cleararray @choice_idx, 0, 10; + cleararray @choice$, "", 10; + + @C_startBookpages = 1; + @C_bookpages = 2; + @C_startMaterials = 3; + @C_materials = 4; + @C_startSlimes = 5; + @C_slimes = 6; + @C_startInvestigate = 7; + @C_investigate = 8; + @C_investigate2 = 9; + @C_nevermind = 10; + + // counter of available answers + @choices_nr = 0; + + if (@bookpages > 0) + goto L_NoStartBookpages; + @choice_idx[@choices_nr] = @C_startBookpages; + @choice$[@choices_nr] = "I heard the slimes ate most of the books..."; + @choices_nr = @choices_nr + 1; + goto L_NoStartBookpages; + +L_NoStartBookpages: + if ((@bookpages == 0) || (@bookpages == 31)) + goto L_NoBookpages; + @choice_idx[@choices_nr] = @C_bookpages; + @choice$[@choices_nr] = "I'm collecting lost bookpages."; + @choices_nr = @choices_nr + 1; + goto L_NoBookpages; + +L_NoBookpages: + if (@material > 0) + goto L_NoStartMaterials; + @choice_idx[@choices_nr] = @C_startMaterials; + @choice$[@choices_nr] = "There were many valuable books in your library, right?"; + @choices_nr = @choices_nr + 1; + goto L_NoStartMaterials; + +L_NoStartMaterials: + if ((@material == 0) || (@material == 15)) + goto L_NoMaterials; + @choice_idx[@choices_nr] = @C_materials; + @choice$[@choices_nr] = "I brought some material to repair the books."; + @choices_nr = @choices_nr + 1; + goto L_NoMaterials; + +L_NoMaterials: + if (@slimes > 0) + goto L_NoStartSlimes; + @choice_idx[@choices_nr] = @C_startSlimes; + @choice$[@choices_nr] = "Those slimes really caused a mess!"; + @choices_nr = @choices_nr + 1; + goto L_NoStartSlimes; + +L_NoStartSlimes: + if ((@slimes == 0) || (@slimes == 255)) + goto L_NoSlimes; + @choice_idx[@choices_nr] = @C_slimes; + @choice$[@choices_nr] = "I'm hunting the remaining slimes in the library."; + @choices_nr = @choices_nr + 1; + goto L_NoSlimes; + +L_NoSlimes: + if (QL_BSAGE_INVESTIGATE > 0 && QL_BSAGE_INVESTIGATE < 13) + goto L_NoStartInvestigate; + @choice_idx[@choices_nr] = @C_startInvestigate; + @choice$[@choices_nr] = "How did this all happen?"; + @choices_nr = @choices_nr + 1; + goto L_NoStartInvestigate; + +L_NoStartInvestigate: + if ((QL_BSAGE_INVESTIGATE < 2) || (QL_BSAGE_INVESTIGATE > 11 && QL_BSAGE_INVESTIGATE < 13)) + goto L_NoInvestigate; + @choice_idx[@choices_nr] = @C_investigate; + @choice$[@choices_nr] = "I'm trying to find out how that accident could've happened."; + @choices_nr = @choices_nr + 1; + goto L_NoInvestigate; + +L_NoInvestigate: + if (QL_BSAGE_INVESTIGATE != 11) + goto L_NoInvestigate2; + @choice_idx[@choices_nr] = @C_investigate2; + @choice$[@choices_nr] = "I told Chief Oskari what I found out about the accident."; + @choices_nr = @choices_nr + 1; + goto L_NoInvestigate2; + +L_NoInvestigate2: + @choice_idx[@choices_nr] = @C_nevermind; + @choice$[@choices_nr] = "Nevermind."; + + menu + @choice$[0],L_MenuChoice, + @choice$[1],L_MenuChoice, + @choice$[2],L_MenuChoice, + @choice$[3],L_MenuChoice, + @choice$[4],L_MenuChoice, + @choice$[5],L_MenuChoice, + @choice$[6],L_MenuChoice, + @choice$[7],L_MenuChoice, + @choice$[8],L_MenuChoice, + @choice$[9],L_MenuChoice; + +L_MenuChoice: + @menu = @menu - 1; + if (@choice_idx[@menu] == 0) + goto L_close; + if (@choice_idx[@menu] == @C_startBookpages) + goto L_StartPagesAdvice; + if (@choice_idx[@menu] == @C_bookpages) + goto L_PagesAdvice; + if (@choice_idx[@menu] == @C_startMaterials) + goto L_StartMaterialAdvice; + if (@choice_idx[@menu] == @C_materials) + goto L_MaterialAdvice; + if (@choice_idx[@menu] == @C_startSlimes) + goto L_StartSlimesAdvice; + if (@choice_idx[@menu] == @C_slimes) + goto L_SlimesAdvice; + if (@choice_idx[@menu] == @C_startInvestigate) + goto L_StartInvAdvice; + if (@choice_idx[@menu] == @C_investigate) + goto L_InvestigateAdvice; + if (@choice_idx[@menu] == @C_investigate2) + goto L_InvestigateAdvice2; + if ((@choice_idx[@menu] == @C_nevermind)) + goto L_close; + goto L_close; + +L_StartPagesAdvice: + // I heard the slimes ate most of the books... + mes "[Nikolai]"; + mes "\"This is true. But while hunting the slimes we discovered that they occasionaly drop bookpages that are still legible."; + mes "Since we had several copies of nearly all the books, we might be able to recreate most of them if we can get at least one copy of each page.\""; + goto L_close; + +L_PagesAdvice: + // I'm collecting lost bookpages. + mes "[Nikolai]"; + mes "\"Excellent! This will save us a lot of time. Ensio coordinates the sorting of the pages.\""; + goto L_close; + +L_StartMaterialAdvice: + // There were many valuable books in your library, right? + mes "He sighs."; + mes "[Nikolai]"; + mes "\"Yes. There were some really old and rare pieces.\""; + next; + mes "\"We're going to recreate some of them, but I'm not sure if we have all the needed materials. If you'd like to help you could ask around if someone is missing something.\""; + goto L_close; + +L_MaterialAdvice: + // I brought some material to repair the books. + mes "[Nikolai]"; + mes "\"That's very generous! Though I think not everyone has all they need yet.\""; + goto L_close; + +L_StartSlimesAdvice: + // Those slimes really caused a mess! + mes "[Nikolai]"; + mes "\"Indeed. My helpers did great work to clean the worst of it, but there are still some remaining slimes in the deeper parts of the library.\""; + goto L_close; + +L_SlimesAdvice: + // I'm hunting the remaining slimes in the library. + mes "[Nikolai]"; + mes "\"You're a great help! All helpers who would be capable of dealing with the slimes are occupied with other tasks.\""; + goto L_close; + +L_StartInvAdvice: + // How did this all happen? + mes "[Nikolai]"; + mes "\"We're not sure yet. The helper who was responsible for sealing away the slimes has been sent to his room until the situation calms down and we can start an investigation.\""; + goto L_close; + +L_InvestigateAdvice: + // I'm trying to find out how that accident could've happened. + mes "[Nikolai]"; + mes "\"I see. Well, we were too busy to start with that ourselves, but having someone unbiased looking at this case might be a good thing.\""; + next; + mes "\"It might be good if you talk to Elias at the reception. He usually has a very good overview of all the things going on and especially about visitors.\""; + goto L_close; + +L_InvestigateAdvice2: + // I told Chief Oskari what I found out about the accident. + mes "[Nikolai]"; + mes "\"Yes, he already let me know. Your investigations were very helpful! This is surely something we need to look into further.\""; + next; + mes "\"Did you already talk to Peetu? I'm sure he'll be glad to know about your results as well.\""; + goto L_close; + +L_GrimoireReward: + mes "[Nikolai]"; + mes "\"Ah, " + strcharinfo(0) + "! We're making excellent progress with our attempts to recover the important and valuable of the destroyed books, all thanks to you.\""; + next; + mes "\"I'd like you to have this as a reward for your help.\""; + getinventorylist; + if ((checkweight("Grimoire", 1) == 0) || (@inventorylist_count == 100)) + goto L_Full_Inv; + getitem "Grimoire", 1; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageGrimoire; + mes "He hands you a very precious book."; + next; + mes "\"This is an artifact of great power, and holding it while attempting to use magic will allow you to access your inner magic power much better. Use it wisely.\""; + goto L_close; + +L_SlimesReward: + mes "[Nikolai]"; + mes "\"Ah, I heard you took care of the remaining slimes in the library!\""; + next; + mes "\"While looking through some old artifacts that we found during the cleaning, we found this sword. We don't really have a use for it.\""; + getinventorylist; + if ((checkweight("IceGladius", 1) == 0) || (@inventorylist_count == 100)) + goto L_Full_Inv; + getitem "IceGladius", 1; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageIceSword; + mes "He gives you a sword with a shimmering blue blade."; + next; + mes "\"I'm sure you can use this well.\""; + goto L_close; + +L_Full_Inv: + mes "[Nikolai]"; + mes "\"You have a very full backback. Please come back when you have more room available.\""; + goto L_close; + +L_Done: + mes "[Nikolai]"; + mes "\"Thanks for all of your help.\""; + goto L_close; + +L_close: + @inventorylist_count = 0; + @bookpages = 0; + @slimes = 0; + close; +} diff --git a/npc/048-2/slimes.txt b/npc/048-2/slimes.txt new file mode 100755 index 00000000..c3d4e5c8 --- /dev/null +++ b/npc/048-2/slimes.txt @@ -0,0 +1,603 @@ + + + +048-2,181,95,0 script #Slime0Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime0::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime0_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime0_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime0)) + end; + + @spawnSlime0 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime0VictimID = getcharid(3); + donpcevent "#Slime0::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,181,95,0 script #Slime0 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime0VictimID) == 0) + goto L_Clean; + $@BlueSageSlime0_Spawn = $@BlueSageSlime0_Amount; + areamonster "048-2", 178, 92, 184, 98, "", 1093, $@BlueSageSlime0_Spawn, "#Slime0::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime0_Spawn = $@BlueSageSlime0_Spawn - 1; + if (mobcount("048-2", "#Slime0::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime0_Spawn = 0; + + if ($@Slime0VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime0_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime0VictimID = 0; + end; + +L_Count: + @spawnSlime0 = @spawnSlime0 + 1; + if ($@BlueSageSlime0_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime0 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime0VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime0_Amount - @spawnSlime0) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime0; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime0 = 0; + goto L_Clean; +} + + +048-2,164,123,0 script #Slime1Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime1::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime1_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime1_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime1)) + end; + + @spawnSlime1 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime1VictimID = getcharid(3); + donpcevent "#Slime1::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,164,123,0 script #Slime1 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime1VictimID) == 0) + goto L_Clean; + $@BlueSageSlime1_Spawn = $@BlueSageSlime1_Amount; + areamonster "048-2", 161, 120, 167, 126, "", 1093, $@BlueSageSlime1_Spawn, "#Slime1::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime1_Spawn = $@BlueSageSlime1_Spawn - 1; + if (mobcount("048-2", "#Slime1::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime1_Spawn = 0; + + if ($@Slime1VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime1_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime1VictimID = 0; + end; + +L_Count: + @spawnSlime1 = @spawnSlime1 + 1; + if ($@BlueSageSlime1_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime1 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime1VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime1_Amount - @spawnSlime1) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime1; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime1 = 0; + goto L_Clean; +} + + +048-2,198,115,0 script #Slime2Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime2::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime2_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime2_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime2)) + end; + + @spawnSlime2 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime2VictimID = getcharid(3); + donpcevent "#Slime2::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,198,115,0 script #Slime2 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime2VictimID) == 0) + goto L_Clean; + $@BlueSageSlime2_Spawn = $@BlueSageSlime2_Amount; + areamonster "048-2", 195, 112, 201, 118, "", 1093, $@BlueSageSlime2_Spawn, "#Slime2::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime2_Spawn = $@BlueSageSlime2_Spawn - 1; + if (mobcount("048-2", "#Slime2::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime2_Spawn = 0; + + if ($@Slime2VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime2_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime2VictimID = 0; + end; + +L_Count: + @spawnSlime2 = @spawnSlime2 + 1; + if ($@BlueSageSlime2_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime2 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime2VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime2_Amount - @spawnSlime2) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime2; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime2 = 0; + goto L_Clean; +} + + +048-2,167,79,0 script #Slime3Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime3::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime3_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime3_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime3)) + end; + + @spawnSlime3 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime3VictimID = getcharid(3); + donpcevent "#Slime3::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,167,79,0 script #Slime3 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime3VictimID) == 0) + goto L_Clean; + $@BlueSageSlime3_Spawn = $@BlueSageSlime3_Amount; + areamonster "048-2", 164, 76, 170, 82, "", 1093, $@BlueSageSlime3_Spawn, "#Slime3::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime3_Spawn = $@BlueSageSlime3_Spawn - 1; + if (mobcount("048-2", "#Slime3::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime3_Spawn = 0; + + if ($@Slime3VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime3_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime3VictimID = 0; + end; + +L_Count: + @spawnSlime3 = @spawnSlime3 + 1; + if ($@BlueSageSlime3_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime3 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime3VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime3_Amount - @spawnSlime3) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime3; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime3 = 0; + goto L_Clean; +} + + +048-2,192,86,0 script #Slime4Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime4::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime4_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime4_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime4)) + end; + + @spawnSlime4 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime4VictimID = getcharid(3); + donpcevent "#Slime4::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,192,86,0 script #Slime4 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime4VictimID) == 0) + goto L_Clean; + $@BlueSageSlime4_Spawn = $@BlueSageSlime4_Amount; + areamonster "048-2", 189, 83, 195, 89, "", 1091, $@BlueSageSlime4_Spawn, "#Slime4::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime4_Spawn = $@BlueSageSlime4_Spawn - 1; + if (mobcount("048-2", "#Slime4::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime4_Spawn = 0; + + if ($@Slime4VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime4_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime4VictimID = 0; + end; + +L_Count: + @spawnSlime4 = @spawnSlime4 + 1; + if ($@BlueSageSlime4_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime4 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime4VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime4_Amount - @spawnSlime4) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime4; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime4 = 0; + goto L_Clean; +} + + +048-2,183,110,0 script #Slime5Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime5::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime5_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime5_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime5)) + end; + + @spawnSlime5 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime5VictimID = getcharid(3); + donpcevent "#Slime5::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,183,110,0 script #Slime5 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime5VictimID) == 0) + goto L_Clean; + $@BlueSageSlime5_Spawn = $@BlueSageSlime5_Amount; + areamonster "048-2", 180, 107, 186, 113, "", 1091, $@BlueSageSlime5_Spawn, "#Slime5::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime5_Spawn = $@BlueSageSlime5_Spawn - 1; + if (mobcount("048-2", "#Slime5::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime5_Spawn = 0; + + if ($@Slime5VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime5_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime5VictimID = 0; + end; + +L_Count: + @spawnSlime5 = @spawnSlime5 + 1; + if ($@BlueSageSlime5_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime5 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime5VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime5_Amount - @spawnSlime5) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime5; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime5 = 0; + goto L_Clean; +} + + +048-2,164,102,0 script #Slime6Trigger NPC32767,2,2,{ + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (mobcount("048-2", "#Slime6::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime6_Spawn = 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime6_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime6)) + end; + + @spawnSlime6 = 0; + @chance = rand(20); + if (@chance < 6) + goto L_End; + if (@chance < 7) + goto L_BlowUp; + + $@Slime6VictimID = getcharid(3); + donpcevent "#Slime6::OnSpawn"; + goto L_End; + +L_BlowUp: + heal -Hp, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + @chance = 0; + @slimes = 0; + end; +} + +048-2,164,102,0 script #Slime6 NPC32767,{ + end; + +OnSpawn: + if (attachrid($@Slime6VictimID) == 0) + goto L_Clean; + $@BlueSageSlime6_Spawn = $@BlueSageSlime6_Amount; + areamonster "048-2", 161, 99, 167, 105, "", 1091, $@BlueSageSlime6_Spawn, "#Slime6::OnSlimeDeath"; + message strcharinfo(0), "You notice a group of slimes emerging from the debris among the shelves."; + end; + +OnSlimeDeath: + $@BlueSageSlime6_Spawn = $@BlueSageSlime6_Spawn - 1; + if (mobcount("048-2", "#Slime6::OnSlimeDeath") < 0) // returns -1 if no monsters + $@BlueSageSlime6_Spawn = 0; + + if ($@Slime6VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime6_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + $@Slime6VictimID = 0; + end; + +L_Count: + @spawnSlime6 = @spawnSlime6 + 1; + if ($@BlueSageSlime6_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + @spawnSlime6 = 0; + message strcharinfo(0), "You don't see any slimes from that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime6VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime6_Amount - @spawnSlime6) != 0) + goto L_SlimesEscaped; + QUEST_BlueSage = QUEST_BlueSage | $@Q_BlueSageSlime6; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + @slimes = ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That was a lot of slimes. You wonder if you're done now."; + @slimes = 0; + @spawnSlime6 = 0; + goto L_Clean; +} diff --git a/npc/048-2/traveler.txt b/npc/048-2/traveler.txt new file mode 100755 index 00000000..41a66bda --- /dev/null +++ b/npc/048-2/traveler.txt @@ -0,0 +1,7 @@ + +048-2,23,46,0 script Drake the Traveler NPC103,{ + @npcname$ = "Drake"; + @NpcTravelBit = $@blue_sage_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/048-2/visitors.txt b/npc/048-2/visitors.txt new file mode 100755 index 00000000..9227627b --- /dev/null +++ b/npc/048-2/visitors.txt @@ -0,0 +1,36 @@ + +048-2,46,44,0 script Connor NPC150,{ + mes "[Connor]"; + mes "\"Oh, hello. There was a big accident in the library! Most of the books were damaged or destroyed!\""; + next; + mes "\"As far as I understand it had to do with those weird slimes. They're white and blue! I've never seen slimes of that color.\""; + next; + mes "\"I was so excited to get an opportunity to study some of the rare and valuable books and now this."; + mes "I'd never have expected something like this happening in a Sages household. I thought they're so powerful and wise...\""; + close; +} + +048-2,28,30,0 script Parcival NPC153,{ + mes "[Parcival]"; + mes "\"Hello young one. Did you also come here to see the library?\""; + menu + "Nah, I'm just having a look around.",L_close, + "Yes!", L_More; + +L_More: + mes "[Parcival]"; + mes "\"That's very commendable. But you'll be disappointed, there is a huge problem and the library is all upside down."; + mes "This is very annoying! I was planning this trip for months and now this!\""; + mes "He sighs."; + next; + mes "[Parcival]"; + mes "\"I'll probably have to leave and come back another time. But I want to warm up first.\""; + next; + mes "\"I wonder what they did... I can still feel some distortion in the magic pattern within this mansion. I mean, it's twisted anyway, because the Sages have their houses in a shifted dimension - that's why it is so much larger in the inside than from the outside.\""; + next; + mes "\"But there's something else... Well, I've heard about the research being done here. Seems there's some very advanced magic involved.\""; + goto L_close; + +L_close: + close; +} diff --git a/npc/051-1/_import.txt b/npc/051-1/_import.txt new file mode 100644 index 00000000..9b055a82 --- /dev/null +++ b/npc/051-1/_import.txt @@ -0,0 +1,9 @@ +// Map 051-1: Illia outskirts +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/051-1/_mobs.txt", +"npc/051-1/desert.txt", +"npc/051-1/desertmonsters.txt", +"npc/051-1/forest.txt", +"npc/051-1/forestmonsters.txt", +"npc/051-1/janitor.txt", +"npc/051-1/mapflags.txt", diff --git a/npc/051-1/_mobs.txt b/npc/051-1/_mobs.txt new file mode 100644 index 00000000..36c1b0f0 --- /dev/null +++ b/npc/051-1/_mobs.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 051-1: Illia outskirts mobs +051-1,42,35,21,12 monster Little Green Slime 1025,30,100000,30000 +051-1,42,35,20,11 monster PumpkinMob 1019,10,100000,30000 diff --git a/npc/051-1/desert.txt b/npc/051-1/desert.txt new file mode 100755 index 00000000..172cb48e --- /dev/null +++ b/npc/051-1/desert.txt @@ -0,0 +1,132 @@ + +051-1,142,39,0 script Bones NPC367,{ + mes "You find a ruined paper next to these bones."; + mes "It says..."; + next; + mes "\"This waterfall is cursed... it feeds on living souls... I could not get past throught it.\""; + mes "\"God, they appeared from nowhere...\""; + mes "\"...\""; + next; + mes "The rest isn't legible."; + close; + +} + +051-1,170,24,0 script Cursed Waterfall NPC400,{ + $@illia_num_sealed_souls = 7; + @step = 3; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_3_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_GiveTask; + if ($@illia_level_3_progress == 0 && strcharinfo(0) != $@iLLIA_HERO$) goto L_HintToHelpers; + if ($@illia_level_3_progress == 1) goto L_GiveSouls; + mes "Jump in the waterfall?"; + menu + "Yes", L_Warp, + "No", L_close; + +OnTimer1000: + npctalk strnpcinfo(0), "Youuuuuuu... Bring me souls... " + $@illia_num_sealed_souls + " fresh souls... Nooooow. And you shall paaass."; + end; + +OnTimer4750: + mapannounce "051-1", "You hear a loud scream coming from the wind... Something terrifying raised out there.", 0; + end; + +OnTimer6500: + npctalk strnpcinfo(0), "Nooooo... Do not let these things take them from youuuuuu!"; + stopnpctimer; + setnpctimer 0; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +L_HintToHelpers: + mes "[Cursed Waterfall]"; + mes "\"Who are you?... Bring " + $@iLLIA_HERO$ + " to me!\""; + close; + +L_GiveTask: + $@illia_level_3_progress = 1; + mes "[Cursed Waterfall]"; + mes "\"Yooouuuuuu...\""; + next; + + mes "You look around and see this ghostly voice comes from the waterfall."; + next; + + // This message will be in the timed messages, + // but display it here anyway to be sure the hero sees it. + mes "\"Youuuuuuu... Bring me souls... " + $@illia_num_sealed_souls + " fresh souls... Nooooow.\""; + mes "\"And you shall paaass.\""; + + // Reset the soul eaters counters. + $@SoulEaters0_count = 0; + $@SoulEaters1_count = 0; + $@SoulEaters2_count = 0; + $@SoulEaters3_count = 0; + $@SoulEaters4_count = 0; + // Spawn 7 additional soul snakes in the north building, as a bait. + areamonster "051-1", 125, 14, 143, 18, "", 1096, 7, "IlliaDMobs051-1::On1096"; + // Same with 5, in the island + areamonster "051-1", 138, 34, 145, 41, "", 1096, 5, "IlliaDMobs051-1::On1096"; + // Start timed messages + initnpctimer; + goto L_close; + +L_GiveSouls: + if (strcharinfo(0) != $@iLLIA_HERO$) + goto L_GiveSoulsToHero; + mes "[Cursed Waterfall]"; + mes "\"Give me the souuuuuuls... Noooooooow!!\""; + menu + "Please, have a look at these.", L_CheckSouls, + "Sorry, I don't have any.", L_close; + +L_GiveSoulsToHero: + mes "[Cursed Waterfall]"; + mes "\"Who are you?.... I want the souuuuuuls from " + $@iLLIA_HERO$ + "!\""; + goto L_close; + +L_CheckSouls: + if (countitem ("SealedSoul") < $@illia_num_sealed_souls) + goto L_NotEnough; + delitem "SealedSoul", $@illia_num_sealed_souls; + $@illia_level_3_progress = 2; + $@illia_progress = 4; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 540; + + // Clean all spawned monsters + killmonster "051-1", "IlliaDMobs051-1::On1096"; + killmonster "051-1", "#SoulEaters0::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters1::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters2::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters3::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters4::OnSoulEaterDeath"; + + + mes "\"Goooood... Tasty souuuuuls...\""; + mes "You shall pass now... before I change my mind...\""; + next; + mes "A blinding light appears from inside the waterfall."; + + // Display an effect to show the waterfall opens itself / kills remaining monsters + misceffect FX_MEDIUM_BLINDINGLIGHT; + goto L_close; + +L_NotEnough: + mes "[Cursed Waterfall]"; + mes "\"Moooooooooore... Give me more...\""; + goto L_close; + +L_Warp: + warp "052-1", 23, 52; + // Count the player who reached the island. + $@illia_players_in_luvia_territory = $@illia_players_in_luvia_territory + 1; + goto L_close; + +L_close: + close; +} diff --git a/npc/051-1/desertmonsters.txt b/npc/051-1/desertmonsters.txt new file mode 100755 index 00000000..08476f32 --- /dev/null +++ b/npc/051-1/desertmonsters.txt @@ -0,0 +1,154 @@ +051-1,134,36,67,49 monster SoulSnake 1096,12,100000,30000,IlliaDMobs051-1::On1096 + +051-1,0,0,0 script IlliaDMobs051-1 NPC32767,{ + end; + +On1096: + if (rand(4) == 0 && $@illia_progress == 3 && $@illia_level_3_progress == 1) + getitem "SealedSoul", 1; + @mobId = 1010; + callfunc "MobPoints"; + end; + +} + + +051-1,142,38,0 script #SoulEaters0Trigger NPC32767,3,3,{ + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if ($@SoulEaters0_count > 0) + end; + donpcevent "#SoulEaters0::OnSpawn"; + end; +} + +051-1,142,38,0 script #SoulEaters0 NPC32767,{ + end; + +OnSpawn: + $@SoulEaters0_count = 5; + areamonster "051-1", 139, 34, 145, 41, "", 1097, $@SoulEaters0_count, "#SoulEaters0::OnSoulEaterDeath"; + end; + +OnSoulEaterDeath: + $@SoulEaters0_count = $@SoulEaters0_count - 1; + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if (countitem("SealedSoul") == 0) + end; + delitem "SealedSoul", countitem("SealedSoul"); + message strcharinfo(0), "The Soul Eater feeds on the Sealed Souls you are carrying."; + end; +} + +051-1,134,16,0 script #SoulEaters1Trigger NPC32767,9,2,{ + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if ($@SoulEaters1_count > 0) + end; + donpcevent "#SoulEaters1::OnSpawn"; + end; +} + +051-1,134,16,0 script #SoulEaters1 NPC32767,{ + end; + +OnSpawn: + $@SoulEaters1_count = 7; + areamonster "051-1", 125, 14, 143, 18, "", 1097, $@SoulEaters1_count, "#SoulEaters1::OnSoulEaterDeath"; + end; + +OnSoulEaterDeath: + $@SoulEaters1_count = $@SoulEaters1_count - 1; + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if (countitem("SealedSoul") == 0) + end; + delitem "SealedSoul", countitem("SealedSoul"); + message strcharinfo(0), "The Soul Eater feeds on the Sealed Souls you are carrying."; + end; +} + +051-1,137,55,0 script #SoulEaters2Trigger NPC32767,5,4,{ + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if ($@SoulEaters2_count > 0) + end; + donpcevent "#SoulEaters2::OnSpawn"; + end; +} + +051-1,137,55,0 script #SoulEaters2 NPC32767,{ + end; + +OnSpawn: + $@SoulEaters2_count = 4; + areamonster "051-1", 134, 54, 139, 58, "", 1097, $@SoulEaters2_count, "#SoulEaters2::OnSoulEaterDeath"; + end; + +OnSoulEaterDeath: + $@SoulEaters2_count = $@SoulEaters2_count - 1; + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if (countitem("SealedSoul") == 0) + end; + delitem "SealedSoul", countitem("SealedSoul"); + message strcharinfo(0), "The Soul Eater feeds on the Sealed Souls you are carrying."; + end; +} + +051-1,155,35,0 script #SoulEaters3Trigger NPC32767,4,7,{ + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if ($@SoulEaters3_count > 0) + end; + donpcevent "#SoulEaters3::OnSpawn"; + end; +} + +051-1,155,35,0 script #SoulEaters3 NPC32767,{ + end; + +OnSpawn: + $@SoulEaters3_count = 4; + areamonster "051-1", 151, 29, 160, 45, "", 1097, $@SoulEaters3_count, "#SoulEaters3::OnSoulEaterDeath"; + end; + +OnSoulEaterDeath: + $@SoulEaters3_count = $@SoulEaters3_count - 1; + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if (countitem("SealedSoul") == 0) + end; + delitem "SealedSoul", countitem("SealedSoul"); + message strcharinfo(0), "The Soul Eater feeds on the Sealed Souls you are carrying."; + end; +} + +051-1,120,38,0 script #SoulEaters4Trigger NPC32767,6,9,{ + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if ($@SoulEaters4_count > 0) + end; + donpcevent "#SoulEaters4::OnSpawn"; + end; +} + +051-1,120,38,0 script #SoulEaters4 NPC32767,{ + end; + +OnSpawn: + $@SoulEaters4_count = 4; + areamonster "051-1", 116, 29, 127, 50, "", 1097, $@SoulEaters4_count, "#SoulEaters4::OnSoulEaterDeath"; + end; + +OnSoulEaterDeath: + $@SoulEaters4_count = $@SoulEaters4_count - 1; + if ($@illia_progress != 3 || $@illia_level_3_progress != 1) + end; + if (countitem("SealedSoul") == 0) + end; + delitem "SealedSoul", countitem("SealedSoul"); + message strcharinfo(0), "The Soul Eater feeds on the Sealed Souls you are carrying."; + end; +} diff --git a/npc/051-1/forest.txt b/npc/051-1/forest.txt new file mode 100755 index 00000000..d9c21625 --- /dev/null +++ b/npc/051-1/forest.txt @@ -0,0 +1,76 @@ + +051-1,64,46,0 script Strange Stone NPC400,{ + @step = 1; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if (isin("051-1", 65,45, 67,48) == 0) end; + if (strcharinfo(0) != $@iLLIA_HERO$) goto L_HandleHelper; + if ($@illia_level_1_progress == 0) goto L_GiveTask; + if ($@illia_level_1_progress == 1) goto L_TaskNotComplete; + if ($@illia_level_1_progress == 2) goto L_TaskComplete; + if ($@illia_level_1_progress == 3) goto L_NothingElseToDo; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +L_HandleHelper: + mes "This stuff sounds complicated."; + mes "I should ask " + $@iLLIA_HERO$ + " what to do."; + close; + +L_NothingElseToDo: + mes "The door is opened... What am I waiting for?"; + close; + +L_GiveTask: + mes "You look at the rocks with attention."; + mes "You are smart enough to notice that there seems to be a missing rock that could activate a mechanism."; + next; + menu + "This rock must not be far... Let's look around.", L_Foo; +L_Foo: + $@illia_level_1_progress = 1; + $@illia_level_1_num_deaths = 0; + close; + +L_TaskNotComplete: + mes "It's not working. I have to find the rock."; + mes "With all the slimes around here, maybe one absorbed it."; + close; + +L_TaskComplete: + $@illia_level_1_progress = 3; + $@illia_progress = 2; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 360; + mes "You insert the rock in the mechanism, then hear an unlock noise. The rocks move by themselves in a rumbling noise, making an opening in the wall."; + close; + +} + +051-1,66,44,0 script #ToCave NPC32767,1,1,{ + @step = 1; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_1_progress < 2) goto L_Blocked; + if ($@illia_level_1_progress == 2 && strcharinfo(0) == $@iLLIA_HERO$) goto L_SeeStone; + if ($@illia_level_1_progress == 3) goto L_Warp; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +L_Blocked: + message strcharinfo(0), "There should be a way to open this... but not with my bare hands."; + end; + +L_SeeStone: + message strcharinfo(0), "I should take a look at the stone."; + end; + +L_Warp: + warp "051-3", 24, 60; + end; +} + diff --git a/npc/051-1/forestmonsters.txt b/npc/051-1/forestmonsters.txt new file mode 100755 index 00000000..b6a6c102 --- /dev/null +++ b/npc/051-1/forestmonsters.txt @@ -0,0 +1,22 @@ +051-1,52,32,10,8 monster GreenSlime 1005,20,100000,30000,IlliaFMobs051-1::On1005 + +051-1,0,0,0 script IlliaFMobs051-1 NPC32767,{ + end; + +On1005: + if ($@illia_level_1_progress == 1) + goto L_RockFinding; + end; + +L_RockFinding: + $@illia_level_1_num_deaths = $@illia_level_1_num_deaths + 1; + @p = 50 - $@illia_level_1_num_deaths; + if (@p < 0) + @p = 0; + if ($@illia_progress != 1 || $@iLLIA_STATUS != 4 || rand(@p) != 0) + end; + message strcharinfo(0), "This slime released a rock with a weird shape, that seems to fit in the mechanism!"; + $@illia_level_1_progress = 2; + end; + +} diff --git a/npc/051-1/janitor.txt b/npc/051-1/janitor.txt new file mode 100755 index 00000000..15a849c1 --- /dev/null +++ b/npc/051-1/janitor.txt @@ -0,0 +1,23 @@ +051-1,1,1,0 script #IlliaJanitor1 NPC32767,{ +end; + +OnCommandClean: + // Nothing to do here. + end; + +} + +051-1,1,1,0 script #IlliaJanitor3 NPC32767,{ +end; + +OnCommandClean: + killmonster "051-1", "IlliaDMobs051-1::On1096"; + // Kill the soul eaters that were spawned + killmonster "051-1", "#SoulEaters0::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters1::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters2::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters3::OnSoulEaterDeath"; + killmonster "051-1", "#SoulEaters4::OnSoulEaterDeath"; + end; + +} diff --git a/npc/051-1/mapflags.txt b/npc/051-1/mapflags.txt new file mode 100755 index 00000000..5ac6d06e --- /dev/null +++ b/npc/051-1/mapflags.txt @@ -0,0 +1,2 @@ +051-1 mapflag nosave 007-2,36,23 +//051-1 mapflag resave 007-2,36,23 diff --git a/npc/051-3/_import.txt b/npc/051-3/_import.txt new file mode 100644 index 00000000..cf35c359 --- /dev/null +++ b/npc/051-3/_import.txt @@ -0,0 +1,9 @@ +// Map 051-3: Illia Bandit Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/051-3/_mobs.txt", +"npc/051-3/ambush.txt", +"npc/051-3/jailslimes.txt", +"npc/051-3/janitor.txt", +"npc/051-3/locks.txt", +"npc/051-3/mapflags.txt", +"npc/051-3/reinforcements.txt", diff --git a/npc/051-3/_mobs.txt b/npc/051-3/_mobs.txt new file mode 100644 index 00000000..e471d49b --- /dev/null +++ b/npc/051-3/_mobs.txt @@ -0,0 +1,18 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 051-3: Illia Bandit Cave mobs +051-3,31,52,10,6 monster Blub 1008,8,100000,30000 +051-3,31,52,9,7 monster Beehive 1056,3,100000,30000 +051-3,56,102,1,1 monster Frostiana 1012,1,100000,250000 +051-3,61,102,1,1 monster Frostiana 1012,1,100000,250000 +051-3,65,102,1,1 monster Frostiana 1012,1,100000,250000 +051-3,71,109,2,1 monster Toppy Blub 1009,1,100000,250000 +051-3,59,56,6,18 monster Robin Bandit 1064,47,100000,10000 +051-3,59,44,6,6 monster Bandit Lord 1065,4,100000,20000 +051-3,60,69,9,4 monster Bandit Lord 1065,4,100000,20000 +051-3,63,94,0,0 monster Yellow Slime Progenitor 1099,1,100000,60000 +051-3,53,93,0,0 monster Yellow Slime Progenitor 1099,1,100000,60000 +051-3,48,71,0,0 monster Yellow Slime Progenitor 1099,1,100000,60000 +051-3,38,30,8,6 monster Robin Bandit 1064,12,100000,10000 +051-3,39,33,5,4 monster Bandit Lord 1065,2,100000,20000 +051-3,80,101,5,6 monster Mud Slime Progenitor 1098,7,100000,60000 +051-3,60,94,9,2 monster Mud Slime Progenitor 1098,7,100000,60000 diff --git a/npc/051-3/ambush.txt b/npc/051-3/ambush.txt new file mode 100755 index 00000000..48a051a9 --- /dev/null +++ b/npc/051-3/ambush.txt @@ -0,0 +1,165 @@ + +051-3,40,52,0 script #WayBlockedTrigger NPC32767,2,2,{ + message strcharinfo(0), "There is no way I can pass here. Let's find another way."; + end; +} + +051-3,31,70,0 script #AmbushReadyTrigger NPC32767,2,2,{ + @step = 2; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if (strcharinfo(0) == $@iLLIA_HERO$ && $@illia_level_2_progress == 0) goto L_PrepareAmbush; + end; + +L_PrepareAmbush: + disablenpc "Sneaky Bandit"; + disablenpc "Another Sneaky Bandit"; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +} + +051-3,31,93,0 script #BanditAmbushTrigger NPC32767,3,3,{ + @step = 2; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_2_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_MakeAmbush; + end; + +L_MakeAmbush: + $@illia_level_2_progress = 1; + donpcevent "#BndtTl::OnCommandAmbush"; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + message strcharinfo(0), "Your throat got cut by a sneaky bandit!"; + end; +} + +051-3,1,1,0 script #BndtTl NPC32767,{ + end; + +OnCommandAmbush: + initnpctimer; + end; + +OnTimer1000: + enablenpc "Sneaky Bandit"; + donpcevent "Sneaky Bandit::OnCommandTalk"; + enablenpc "Another Sneaky Bandit"; + donpcevent "Another Sneaky Bandit::OnCommandTalk"; + end; + +OnTimer9000: + areawarp "051-3", 22, 45, 42, 97, "051-3", 101, 13; + end; + +OnTimer11000: + areatimer 0, "051-3", 22, 12, 102, 97, 500, "#BndtTl::OnOuch"; + areatimer 0, "051-3", 22, 12, 102, 97, 3000, "#BndtTl::OnA"; + stopnpctimer; + setnpctimer 0; + end; + +OnOuch: + message strcharinfo(0), "Ouch my head..."; + end; + +OnA: + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_CaptureHero; + if (strcharinfo(0) == $@iLLIA_HELPER1$) + goto L_CaptureHelper1; + if (strcharinfo(0) == $@iLLIA_HELPER2$) + goto L_CaptureHelper2; + if (strcharinfo(0) == $@iLLIA_HELPER3$) + goto L_CaptureHelper3; + // kill that player otherwise, since not part of the quest. + heal -Hp, 0; + end; + +L_CaptureHero: + // Simulate the capture of the player. + // Unequip all equipments + nude; + // put the health at 40%. + heal MaxHp, 0; + heal ((MaxHp/100) * -60), 0; + warp "051-3", 69, 109; + message strcharinfo(0), "Meh... Where am I?"; + end; + +L_CaptureHelper1: + // Simulate the capture of the player. + // Unequip all equipments + nude; + // put the health at 40%. + heal MaxHp, 0; + heal ((MaxHp/100) * -60), 0; + warp "051-3", 64, 102; + message strcharinfo(0), "Meh... Where am I?"; + end; + +L_CaptureHelper2: + // Simulate the capture of the player. + // Unequip all equipments + nude; + // put the health at 40%. + heal MaxHp, 0; + heal ((MaxHp/100) * -60), 0; + warp "051-3", 62, 102; + message strcharinfo(0), "Meh... Where am I?"; + end; + +L_CaptureHelper3: + // Simulate the capture of the player. + // Unequip all equipments + nude; + // put the health at 40%. + heal MaxHp, 0; + heal ((MaxHp/100) * -60), 0; + warp "051-3", 58, 102; + message strcharinfo(0), "Meh... Where am I?"; + end; + +} + +051-3,29,94,0 script Sneaky Bandit NPC32767,{ + end; + +OnCommandTalk: + initnpctimer; + end; + +OnTimer100: + npctalk strnpcinfo(0), "Did you think you could sneak in our den without a problem?"; + end; + +OnTimer3600: + npctalk strnpcinfo(0), "Drop your weapons, and come with us!"; + stopnpctimer; + setnpctimer 0; + end; + +} + +051-3,33,95,0 script Another Sneaky Bandit NPC32767,{ + end; + +OnCommandTalk: + initnpctimer; + end; + +OnTimer1500: + npctalk strnpcinfo(0), "W00t! More slaves!"; + end; + +OnTimer5500: + npctalk strnpcinfo(0), "Ahaha, that was easy! Ok, knock them out!"; + stopnpctimer; + setnpctimer 0; + end; + +} diff --git a/npc/051-3/jailslimes.txt b/npc/051-3/jailslimes.txt new file mode 100755 index 00000000..598f94f2 --- /dev/null +++ b/npc/051-3/jailslimes.txt @@ -0,0 +1,29 @@ +051-3,57,104,1,1 monster CopperSlime 1098,1,60000,30000,IlliaCMobs051-3::On1098 +051-3,62,104,1,1 monster CopperSlime 1098,1,60000,30000,IlliaCMobs051-3::On1098 +051-3,63,104,1,1 monster CopperSlime 1098,1,60000,30000,IlliaCMobs051-3::On1098 +051-3,70,111,1,1 monster CopperSlime 1098,1,60000,30000,IlliaCMobs051-3::On1098 + +051-3,0,0,0 script IlliaCMobs051-3 NPC32767,{ + end; + +On1098: + if (rand(100) < 80 && $@illia_progress == 2 && ($@illia_level_2_progress == 1 || $@illia_level_2_progress == 2)) + goto L_LockPicks; + goto L_End; + +L_LockPicks: + if (countitem ("LockPicks") == 0) + goto L_GiveLockPicks; + goto L_End; + +L_GiveLockPicks: + message strcharinfo(0), "Hey nice, someone left behind these rusty lock picks."; + getitem "LockPicks", 1; + goto L_End; + +L_End: + @mobId = 1098; + callfunc "MobPoints"; + end; + +} diff --git a/npc/051-3/janitor.txt b/npc/051-3/janitor.txt new file mode 100755 index 00000000..9531f33a --- /dev/null +++ b/npc/051-3/janitor.txt @@ -0,0 +1,9 @@ +051-3,1,1,0 script #IlliaJanitor2 NPC32767,{ +end; + +OnCommandClean: + // Kill all remaining bandits spawned during the "reinforcements" event + killmonster "051-1", "Door::OnB"; + end; + +} diff --git a/npc/051-3/locks.txt b/npc/051-3/locks.txt new file mode 100755 index 00000000..6b7cf6d8 --- /dev/null +++ b/npc/051-3/locks.txt @@ -0,0 +1,65 @@ +051-3,69,107,0 script Jail Lock 1 NPC400,{ + if (isin("051-3", 69, 108, 73, 111)) goto L_Do_Lock_Picking; + end; + +L_Do_Lock_Picking: + callfunc "LockPicking"; + if (@lock_picking_success > 0) + goto L_OpenDoor; + close; + +L_OpenDoor: + @lock_picking_success = 0; + warp "051-3", 69, 104; + message strcharinfo(0), "Ok, let's get out of here now."; + $@illia_level_2_progress = 2; + close; +} + +051-3,64,100,0 script Jail Lock 2 NPC400,{ + if (isin("051-3", 64, 101, 66, 104)) goto L_Do_Lock_Picking; + end; + +L_Do_Lock_Picking: + callfunc "LockPicking"; + if (@lock_picking_success > 0) + goto L_OpenDoor; + close; + +L_OpenDoor: + @lock_picking_success = 0; + warp "051-3", 64, 97; + close; +} + +051-3,62,100,0 script Jail Lock 3 NPC400,{ + if (isin("051-3", 61, 101, 62, 104)) goto L_Do_Lock_Picking; + end; + +L_Do_Lock_Picking: + callfunc "LockPicking"; + if (@lock_picking_success > 0) + goto L_OpenDoor; + close; + +L_OpenDoor: + @lock_picking_success = 0; + warp "051-3", 62, 97; + close; +} + +051-3,58,100,0 script Jail Lock 4 NPC400,{ + if (isin("051-3", 57, 101, 58, 104)) goto L_Do_Lock_Picking; + end; + +L_Do_Lock_Picking: + callfunc "LockPicking"; + if (@lock_picking_success > 0) + goto L_OpenDoor; + close; + +L_OpenDoor: + @lock_picking_success = 0; + warp "051-3", 58, 97; + close; +} diff --git a/npc/051-3/mapflags.txt b/npc/051-3/mapflags.txt new file mode 100755 index 00000000..a3b3c49b --- /dev/null +++ b/npc/051-3/mapflags.txt @@ -0,0 +1,2 @@ +051-3 mapflag nosave 007-2,36,23 +//051-3 mapflag resave 007-2,36,23 diff --git a/npc/051-3/reinforcements.txt b/npc/051-3/reinforcements.txt new file mode 100755 index 00000000..f9d48acc --- /dev/null +++ b/npc/051-3/reinforcements.txt @@ -0,0 +1,83 @@ +051-3,47,30,0 script #BndtRnfrcmtsTrigger NPC32767,2,3,{ + @step = 2; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_2_progress == 2) goto L_CallReinforcements; + end; + +L_CallReinforcements: + donpcevent "Door::OnRnfrcmts"; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; +} + +051-3,37,24,0 script Door NPC400,{ + @step = 2; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + mes "Try open the door?"; + menu + "Yes", L_TryOpen, + "Do nothing", L_close; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +L_TryOpen: + if ($@illia_level_2_progress < 4) + goto L_KeyNotFound; + goto L_Warp; + +L_KeyNotFound: + mes "You do not see a way to open this door."; + close; + +L_Warp: + mes "You place the key in the door and open the lock."; + warp "051-1", 118, 55; + close; + +OnRnfrcmts: + $@illia_level_2_progress = 3; + // Spawn 20 bandits + areamonster "051-3", 29, 25, 48, 39, "", 1064, 18, "Door::OnB"; + // Spawn 4 bandit lords + areamonster "051-3", 29, 25, 48, 39, "", 1065, 3, "Door::OnB"; + initnpctimer; + mapannounce "051-3", "Bandit Lords : Do not let them escape!!" , 0; + areatimer 0, "051-3", 25, 20, 80, 85, 10, "Door::OnDRnfrcmts"; + end; + +OnB: + end; + +OnDRnfrcmts: + message strcharinfo(0), "Oh no, reinforcements! We must kill them all!"; + end; + +OnTimer2000: + setnpctimer 0; + if ($@illia_level_2_progress != 3 || $@illia_progress != 2) + end; + if (mobcount("051-3", "Door::OnB") < 0) + goto L_OpenDoor; + end; + +L_OpenDoor: + $@illia_level_2_progress = 4; + $@illia_progress = 3; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 300; + areatimer 0, "051-3", 25, 20, 80, 85, 10, "Door::OnKeyFound"; + stopnpctimer; + setnpctimer 0; + end; + +OnKeyFound: + message strcharinfo(0), "One of the defeated bandit lords had a door key attached to his belt."; + end; +L_close: + close; +} diff --git a/npc/052-1/_import.txt b/npc/052-1/_import.txt new file mode 100644 index 00000000..f9c306da --- /dev/null +++ b/npc/052-1/_import.txt @@ -0,0 +1,6 @@ +// Map 052-1: Illia archipelago +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/052-1/_mobs.txt", +"npc/052-1/channelling.txt", +"npc/052-1/janitor.txt", +"npc/052-1/mapflags.txt", diff --git a/npc/052-1/_mobs.txt b/npc/052-1/_mobs.txt new file mode 100644 index 00000000..57fd7bd7 --- /dev/null +++ b/npc/052-1/_mobs.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 052-1: Illia archipelago mobs +052-1,55,29,21,19 monster Poison Skull 1100,18,100000,20000 diff --git a/npc/052-1/channelling.txt b/npc/052-1/channelling.txt new file mode 100755 index 00000000..e3c6097d --- /dev/null +++ b/npc/052-1/channelling.txt @@ -0,0 +1,324 @@ + +052-1,25,44,0 script #EnchantDoorTrigger NPC32767,3,4,{ + @step = 4; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if (strcharinfo(0) == $@iLLIA_HERO$ && + $@illia_level_4_progress == 0) goto L_EnchantDoor; + end; + +L_EnchantDoor: + enablenpc "#Enchanted Door"; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +} + +052-1,57,29,0 script #Enchanted Door NPC369,1,1,{ + if ($@illia_level_4_progress != 2) goto L_PushBack; + end; + +L_PushBack: + warp "052-1", 57, 34; + heal ((MaxHp/100) * -20), 0; + message strcharinfo(0), "You are pushed back violently. There is probably some way to break this barrier."; + mes "You are pushed back violently."; + mes "There is probably some way to break this barrier."; + close; + +OnCommandDS: + areamonster "052-1", 56, 30, 60, 31, "", 1101, 2 + rand(3), "#Enchanted Door::OnSpawn"; + misceffect FX_EVIL_SUMMON; + end; + +OnSpawn: + end; + +} + +052-1,57,29,0 script #Enchanted Door2 NPC400,1,1,{ + if ($@illia_level_4_progress == 2) goto L_Warp; + end; + +L_Warp: + warp "052-2", 33, 40; + end; + +OnCommandDestroy: + misceffect FX_ENCHANTED_DOOR_BROKEN; + end; + +} + +052-1,51,38,0 script Engravings NPC400,{ + mes "You can read some words engraved inside this rock, but some are erased by wind and time:"; + next; + mes "\".. can use this .. power..´. . .´. . . amplify a spell ..´."; + mes " . ´´. Don't let .. spell power .´..´ . .. fade away ..."; + mes "´ .Use lazurite stones ´..´. they will appear. ..´ .. drop them inside .. this circle."; + mes ". ´ power.. drains .. life..´. .´ focus . .not move at all´. .\""; + next; + mes "Below this strange writing, you notice a word still deeply engraved in the stone:"; + next; + mes "\"#catalazuli\""; + next; + mes "... that looks like an incantation or something."; + if ($@illia_level_4_progress == 0) + goto L_SuggestChannelling; + close; + +L_SuggestChannelling: + next; + mes "I think this blue circle right here can be helpful to break the enchantment that blocks the door of the Inn."; + next; + mes "Let's see how I can activate it..."; + mes "But I should probably get inside it, first."; + close; + +} + +function script StartChannelling { + if (isat("052-1",53,38) == 0) + goto L_Return; + if ($@illia_level_4_progress > 0) + goto L_Return; + $@illia_level_4_progress = 1; + $@illia_char_channelling$ = strcharinfo(0); + + @bonus = (Int+1) / 25; + // Lazurite Stones power, will also depend on the Int of the channelling character + setarray $@illia_lazurites_power, + 12 + @bonus, // small + 32 + @bonus, // regular + 65 + @bonus; // large + + // coordinates where stones will appear + setarray $@illia_small_lazurites, 50,41, 44,33, 61,42; + setarray $@illia_regular_lazurites, 68,29, 47,25, 38,45, 70,40; + setarray $@illia_large_lazurites, 21,40, 34,25; + + // amount of initial magic power + $@illia_magic_power = 1811 + Int*2; + // Channelling required power depends on the base Int of the character + $@illia_magic_power_required = 5707 - 2*Int; + // magic power loss depends also on Int + $@illia_magic_power_loss = 53 - ((Int+1)*2)/10; + + // register the power status to display hints to the players + // Statuses: 0=critical(below 300), 1=neutral, 2=almost there (max-300) + $@illia_magic_power_status = 1; + + message strcharinfo(0), "Ok, let's stay focused now!"; + donpcevent "#Power Circle::OnCommandSt"; + goto L_Return; + +L_Return: + return; +} + +052-1,53,38,0 script #Power Circle NPC368,{ + @step = 4; + if ($@illia_progress < @step) + goto L_ShouldNotBeHere; + if (isat("052-1",53,38) == 0) + goto L_Hint; + end; + +OnCast: + callfunc "StartChannelling"; + end; + +OnCommandSt: + initnpctimer; + end; + +L_Hint: + mes "Magic seems to be flowing from this place. I should find out what it is."; + close; + +OnTimer2000: + callsub S_CheckChannelling; + end; + +OnTimer4000: + callsub S_CheckChannelling; + end; + +OnTimer6000: + // Spawn items at specific place + callsub S_ItemSpawn; + callsub S_CheckChannelling; + end; + +OnTimer8000: + callsub S_CheckChannelling; + end; + +OnTimer10000: + // Spawn items at specific place + callsub S_ItemSpawn; + callsub S_CheckChannelling; + end; + +OnTimer11000: + setnpctimer 0; + // Spawn monsters (demonic spirits) near the enchanted door + donpcevent "#Enchanted Door::OnCommandDS"; + end; + +S_ItemSpawn: + if (!(attachrid(getcharid(3, $@illia_char_channelling$)))) + goto L_Return; + // spawn items at random + $@illia_item_spawn_i = rand(getarraysize($@illia_small_lazurites)/2); + $@illia_item_spawn_x = $@illia_small_lazurites[$@illia_item_spawn_i*2]; + $@illia_item_spawn_y = $@illia_small_lazurites[($@illia_item_spawn_i*2)+1]; + if (rand(10) > 0) + makeitem 873, rand(4,7), "052-1", $@illia_item_spawn_x, $@illia_item_spawn_y; + + $@illia_item_spawn_i = rand(getarraysize($@illia_regular_lazurites)/2); + $@illia_item_spawn_x = $@illia_regular_lazurites[$@illia_item_spawn_i*2]; + $@illia_item_spawn_y = $@illia_regular_lazurites[($@illia_item_spawn_i*2)+1]; + if (rand(8) > 0) + makeitem 874, rand(3,4), "052-1", $@illia_item_spawn_x, $@illia_item_spawn_y; + + $@illia_item_spawn_i = rand(getarraysize($@illia_large_lazurites)/2); + $@illia_item_spawn_x = $@illia_large_lazurites[$@illia_item_spawn_i*2]; + $@illia_item_spawn_y = $@illia_large_lazurites[($@illia_item_spawn_i*2)+1]; + if (rand(4) > 0) + makeitem 875, rand(1,2), "052-1", $@illia_item_spawn_x, $@illia_item_spawn_y; + + $@illia_item_spawn_i = 0; + $@illia_item_spawn_x = 0; + $@illia_item_spawn_y = 0; + + detachrid; + goto L_Return; + +L_Return: + return; + +S_CheckChannelling: + // Remove stones inside the circle + set $@illia_magic_power, $@illia_magic_power + + getareadropitem("052-1", 52, 37, 54, 39, 873, 1)*$@illia_lazurites_power[0] + + getareadropitem("052-1", 52, 37, 54, 39, 874, 1)*$@illia_lazurites_power[1] + + getareadropitem("052-1", 52, 37, 54, 39, 875, 1)*$@illia_lazurites_power[2]; + + // magic power fades over time + $@illia_magic_power = $@illia_magic_power - $@illia_magic_power_loss; + + $@illia_magic_power_last_status = $@illia_magic_power_status; + $@illia_magic_power_status = 1; + if ($@illia_magic_power < 300) + $@illia_magic_power_status = 0; + if ($@illia_magic_power > $@illia_magic_power_required - 300) + $@illia_magic_power_status = 2; + + // Player loses a part of his health while channelling + if (!(attachrid(getcharid(3, $@illia_char_channelling$)))) + goto L_ChannellingFail; + // Display an effect showing the drain + misceffect FX_CHANNELLING_RAISE; + heal ((MaxHp/100) * -4), 0; + + if (ispcdead()) + goto L_ChannellingDead; + if (isat("052-1",53,38) == 0) + goto L_ChannellingMoved; + // check the magic power + if ($@illia_magic_power <= 0) + goto L_ChPwrVanish; + if ($@illia_magic_power >= $@illia_magic_power_required) + goto L_ChannellingComplete; + + detachrid; + + $@illia_channelling_status_msg$ = ""; + + if ($@illia_magic_power_last_status == 0 && $@illia_magic_power_status == 1) + $@illia_channelling_status_msg$ = $@illia_char_channelling$ + ": I think I'm controlling the spell again now. Keep up!"; + if ($@illia_magic_power_last_status == 1 && $@illia_magic_power_status == 0) + $@illia_channelling_status_msg$ = $@illia_char_channelling$ + ": Guys I'm loosing it! Hurry up!"; + if ($@illia_magic_power_last_status == 1 && $@illia_magic_power_status == 2) + $@illia_channelling_status_msg$ = $@illia_char_channelling$ + ": I almost have the power to cast it! One last effort!"; + if ($@illia_magic_power_last_status == 2 && $@illia_magic_power_status == 1) + $@illia_channelling_status_msg$ = $@illia_char_channelling$ + ": Damn! It faded a little."; + + if ($@illia_channelling_status_msg$ != "") + areatimer 0, "052-1", 1, 1, 100, 80, 0, "#Power Circle::OnMPSC"; + + return; + +OnMPSC: + message strcharinfo(0), $@illia_channelling_status_msg$; + $@illia_channelling_status_msg$ = ""; + end; + +L_ChannellingComplete: + message strcharinfo(0), "You successfully cast the spell and broke the door's enchantment!"; + detachrid; + stopnpctimer; + setnpctimer 0; + $@illia_magic_power = 0; + $@illia_magic_power_required = 0; + $@illia_magic_power_last_status = 0; + $@illia_magic_power_status = 0; + $@illia_magic_power_loss = 0; + $@illia_char_channelling$ = ""; + $@illia_level_4_progress = 2; + $@illia_progress = 5; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 600; + // Effect to display the disenchant is cast + misceffect FX_CHANNELLING_CAST; + // move away the enchanted door + donpcevent "#Enchanted Door2::OnCommandDestroy"; + disablenpc "#Enchanted Door"; + end; + +L_ChannellingDead: + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + goto L_ChannellingFail; + +L_ChannellingMoved: + // kill the player as part of the process: the magic process drained his life. + // But only if he is still in the island (otherwise, he probably got warped + // and does not need being killed) + if (isin("052-1",1,1,100,80) == 0) + goto L_ChannellingFail; + heal -Hp, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + message strcharinfo(0), "You moved out of the power circle. The magic power you accumulated backfires at you!"; + goto L_ChannellingFail; + +L_ChPwrVanish: + // kill the player as part of the process: the magic process drained his life. + heal -Hp, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + message strcharinfo(0), "The magic power vanished, and your spell backfires at you!"; + goto L_ChannellingFail; + +L_ChannellingFail: + detachrid; + stopnpctimer; + setnpctimer 0; + $@illia_magic_power = 0; + $@illia_magic_power_required = 0; + $@illia_magic_power_last_status = 0; + $@illia_magic_power_status = 0; + $@illia_magic_power_loss = 0; + $@illia_char_channelling$ = ""; + $@illia_level_4_progress = 0; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +OnInit: + registercmd "#catalazuli", strnpcinfo(0)+"::OnCast"; + end; +} diff --git a/npc/052-1/janitor.txt b/npc/052-1/janitor.txt new file mode 100755 index 00000000..cae999e5 --- /dev/null +++ b/npc/052-1/janitor.txt @@ -0,0 +1,17 @@ + +052-1,1,1,0 script #IlliaJanitor4 NPC32767,{ +end; + +OnCommandClean: + // Kill all monsters (that includes the spawned Demonic Spirits and Azul Slimes) + // Note that the loot the slimes may have picked will be deleted at the same time. + killmonster "052-1", "All"; + // Delete the magic stones that are still laying around. + // FIXME Syntax error happens if not setting a variable... + set $@dummy_var, getareadropitem("052-1", 1, 1, 98, 78, 873, 1) + + getareadropitem("052-1", 1, 1, 98, 78, 874, 1) + + getareadropitem("052-1", 1, 1, 98, 78, 875, 1); + $@dummy_var = 0; + end; + +} diff --git a/npc/052-1/mapflags.txt b/npc/052-1/mapflags.txt new file mode 100755 index 00000000..0e8e3295 --- /dev/null +++ b/npc/052-1/mapflags.txt @@ -0,0 +1,2 @@ +052-1 mapflag nosave 007-2,36,23 +//052-1 mapflag resave 007-2,36,23 diff --git a/npc/052-2/_import.txt b/npc/052-2/_import.txt new file mode 100644 index 00000000..07ba8d12 --- /dev/null +++ b/npc/052-2/_import.txt @@ -0,0 +1,8 @@ +// Map 052-2: Illia forsaken inn +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/052-2/chest.txt", +"npc/052-2/janitor.txt", +"npc/052-2/lobby.txt", +"npc/052-2/mapflags.txt", +"npc/052-2/partyroom.txt", +"npc/052-2/storage.txt", diff --git a/npc/052-2/chest.txt b/npc/052-2/chest.txt new file mode 100755 index 00000000..ff632e1f --- /dev/null +++ b/npc/052-2/chest.txt @@ -0,0 +1,167 @@ + +052-2,136,73,0 script Chest#illia NPC111,{ + @step = 8; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if (@illia_got_rewards > 2) end; + if (@illia_got_rewards == 2) goto L_AlreadyGotReward; + if (@illia_current_num_rewards > 0) goto L_ResumePick; + @illia_current_num_rewards = 0; + mes "You find an opened chest which seems full of equipments."; + next; + mes "You realize again you were not the first one to visit this place. But where the others failed, you succeeded."; + goto L_Pick; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +OnInit: + setarray $@illia_common_rewards$, "SteelShield", "WarlordHelmet", "KnightsHelmet", "InfantryHelmet", "CrusadeHelmet", "ChainmailShirt", "LightPlatemail", "WarlordPlate", "Setzer", "RockKnife", "WarlordBoots", "ForestArmor", "ForestBow", "WoodenStaff", "WizardHat", "WoodenShield", "ShortSword", "SilkRobe", "LeatherGloves", "BoneKnife", "JeansChaps"; + setarray $@illia_common_rewards_n$, "Steel Shield", "Warlord Helmet", "Knights Helmet", "Infantry Helmet", "Crusade Helmet", "Chainmail Shirt", "Light Platemail", "Warlord Plate", "Setzer", "Rock Knife", "Warlord Boots", "Forest Armor", "Forest Bow", "Wooden Staff", "Wizard Hat", "Wooden Shield", "Short Sword", "Silk Robe", "Leather Gloves", "Bone Knife", "Jeans Chaps"; + setarray $@illia_unique_rewards$, "BullHelmet", "BansheeBow", "HeartOfIsis", "LazuriteRobe"; + setarray $@illia_unique_rewards_n$, "Bull Helmet", "Banshee Bow", "Heart of Isis", "Lazurite Robe"; + end; + +L_ResumePick: + mes "Ok. I should continue to dig in this chest..."; + menu + "... and quickly.", L_GetReward, + "... or maybe not. I am out of time.", L_AskLeaving, + "... but I can't carry more stuff.", L_AskLeaving, + "... no, wait a minute.", L_close; + +L_Pick: + menu + "Let's take what I deserve for all this.", L_GetReward, + "Wait.", L_close; + +L_GetReward: + if (@illia_got_rewards == 0) + goto L_GetCommonReward; + if (@illia_got_rewards == 1) + goto L_GetUniqueReward; + goto L_close; + +L_GetCommonReward: + if (@illia_current_num_rewards == $@illia_num_common_reward_items) + goto L_RewardDone; + getinventorylist; + @index = rand(getarraysize($@illia_common_rewards$)); + @reward$ = $@illia_common_rewards$[@index]; + if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + @illia_current_num_rewards = @illia_current_num_rewards + 1; + getitem @reward$, 1; + mes "You found a " + $@illia_common_rewards_n$[@index] + "!"; + @reward$ = ""; + goto L_GetCommonReward; + +L_GetUniqueReward: + if (@illia_current_num_rewards == $@illia_num_unique_reward_items) + goto L_RewardDone; + if (Illia_Uniques_Count >= 2) + goto L_GetUniqueReward2; + getinventorylist; + @index = rand(getarraysize($@illia_unique_rewards$)); + @reward$ = $@illia_unique_rewards$[@index]; + if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + next; + mes "You notice an interesting shape hidden under a cover..."; + next; + @illia_current_num_rewards = @illia_current_num_rewards + 1; + getitem @reward$, 1; + mes "You found a " + $@illia_unique_rewards_n$[@index] + "!"; + Illia_Uniques_Count = Illia_Uniques_Count + 1; + @reward$ = ""; + goto L_GetUniqueReward; + +L_GetUniqueReward2: + next; + mes "You find a bunch of gold pieces!"; + next; + Zeny = Zeny + 100000*($@illia_num_unique_reward_items - @illia_current_num_rewards); + getexp 200000*($@illia_num_unique_reward_items - @illia_current_num_rewards), 0; + @illia_current_num_rewards = $@illia_num_unique_reward_items; + goto L_GetUniqueReward; + +L_AlreadyGotReward: + mes "I already took my part."; + next; + goto L_AskLeaving; + +L_RewardDone: + @illia_got_rewards = @illia_got_rewards + 1; + @illia_current_num_rewards = 0; + next; + if (@illia_got_rewards == 1) + goto L_GetUniqueReward; + goto L_AskLeaving; // @illia_got_rewards == 2 + +L_InventoryNoSpace: + mes "You cannot carry more stuff. Make some room first."; + close; + +L_AskLeaving: + mes "It's time to leave this place now."; + next; + // Force the hero to leave last, as this event triggers the end of the quest + // as well as some dialogs from Valia, when the hero returns. + if (strcharinfo(0) == $@iLLIA_HERO$ && getareausers("052-2", 19, 8, 137, 88) > 1) + goto L_WaitHelpersLeave; + goto L_PrepareLeaving; + +L_WaitHelpersLeave: + mes "However, I'd better wait my friends leave before I do."; + next; + mes "I prefer to know they left safely this place."; + close; + +L_PrepareLeaving: + mes "Use Valia's ring to teleport now?"; + menu + "Yes. Time to make her pay for her trick!", L_Leave, + "No, I still need to see things here.", L_close; + +L_Leave: + @illia_got_rewards = 3; + @illia_current_num_rewards = 0; + addtimer 1000, "Chest#illia::OnMsg1"; + addtimer 4000, "Chest#illia::OnMsg2"; + addtimer 7000, "Chest#illia::OnMsg3"; + addtimer 9000, "Chest#illia::OnFx"; + addtimer 10000, "Chest#illia::OnRing"; + close; + +OnMsg1: + message strcharinfo(0), "At the moment you are wearing the ring, you start to feel dizzy..."; + end; + +OnMsg2: + message strcharinfo(0), "Who is Luvia? Something isn't right... It looks like your memory is rewritten."; + end; + +OnMsg3: + message strcharinfo(0), "Damn, this ring! That Valia! Someone..."; + end; + +OnFx: + misceffect FX_MAGIC_BLUE_TELEPORT, strcharinfo(0); + end; + +OnRing: + warp "007-2",31 + rand(0,2),23 + rand(0,2); + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_ScheduleEnd; + end; + +L_ScheduleEnd: + $@iLLIA_STATUS = 253; + startnpctimer "Valia"; + donpcevent "#IlliaDaemon::OnCommandToggle"; + end; + +L_close: + close; + +} diff --git a/npc/052-2/janitor.txt b/npc/052-2/janitor.txt new file mode 100755 index 00000000..aedecb61 --- /dev/null +++ b/npc/052-2/janitor.txt @@ -0,0 +1,32 @@ +052-2,1,1,0 script #IlliaJanitor5 NPC32767,{ +end; + +OnCommandClean: + // For security, kill all. + killmonster "052-2", "All"; + npcwarp 1, 1, "Luvia?"; + end; + +} + +052-2,1,1,0 script #IlliaJanitor6 NPC32767,{ +end; + +OnCommandClean: + killmonster "052-2", "#ItemsInvoker::OnDeath"; + npcwarp 1, 1, "#ItemsInvoker"; + end; + +} + +052-2,1,1,0 script #IlliaJanitor7 NPC32767,{ +end; + +OnCommandClean: + killmonster "052-2", "#LuviaDaemon::OnDeath"; + killmonster "052-2", "#LuviaDaemon::OnWGD"; + npcwarp 83, 28, "#LuviaDaemon"; + npcwarp 88, 15, "Luvia"; + end; + +} diff --git a/npc/052-2/lobby.txt b/npc/052-2/lobby.txt new file mode 100755 index 00000000..48fdac03 --- /dev/null +++ b/npc/052-2/lobby.txt @@ -0,0 +1,352 @@ + +052-2,40,19,0 script #InnDoorTrigger NPC32767,2,2,{ + @step = 5; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_5_progress == 8) goto L_Warp; + message strcharinfo(0), "A magical field prevents you from going further..."; + end; + +L_Warp: + warp "052-2", 23, 71; + message strcharinfo(0), "This place is full of dust... *coughs*"; + end; + +L_ShouldNotBeHere: + heal -100, 0; + end; + +} + +052-2,33,40,0 script #EntranceTrigger NPC32767,4,2,{ + @step = 5; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_5_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_StartVoices; + end; + +L_StartVoices: + $@illia_level_5_progress = 1; + donpcevent "#MysteriousVoice::OnCommandStart"; + end; + +L_ShouldNotBeHere: + heal -100, 0; + end; +} + +052-2,1,1,0 script #LuviaShadow NPC127,{ +end; + +OnCommandEscape: + initnpctimer; + end; + +OnTimer100: + if ($@illia_level_5_progress != 7) + end; + npcwarp 39, 35, "#LuviaShadow"; + misceffect FX_DARK_TELEPORT; + npcwarp 1, 1, "Luvia?"; + end; + +OnTimer750: + if ($@illia_level_5_progress != 7) + end; + npcwarp 1, 1, "#LuviaShadow"; + stopnpctimer; + setnpctimer 0; + end; + +OnCommandInvoke: + initnpctimer; + end; + +OnTimer650: + if ($@illia_level_5_progress != 2) + end; + npcwarp 39, 35, "#LuviaShadow"; + misceffect FX_EVIL_SUMMON; + end; + +OnTimer1500: + if ($@illia_level_5_progress != 2) + end; + npcwarp 1, 1, "#LuviaShadow"; + npcwarp 39, 35, "Luvia?"; + $@illia_level_5_progress = 3; + stopnpctimer; + setnpctimer 0; + end; + +OnNN: + message strcharinfo(0), "The last guard is down. Let's go after Luvia now!"; + end; + +} + +052-2,1,1,0 script #MysteriousVoice NPC127,{ +end; + +OnInit: + setarray $@illia_lobby_voices$, "Finally.", "I was...", "Waiting...", "For you!"; + end; + +OnCommandStart: + $@illia_lobby_voices_index = 0; + initnpctimer; + end; + +OnTimer2000: + if ($@illia_level_5_progress != 1) + end; + npcwarp rand(30,42), rand(32,38), "?"; + donpcevent "?::OnCommandTalk"; + end; + +OnTimer3000: + if ($@illia_level_5_progress != 1) + end; + npcwarp 1, 1, "?"; + $@illia_lobby_voices_index = $@illia_lobby_voices_index + 1; + // FIXME Uncomment next line, comment the next next, when getarraysize is repaired. + //if ($@illia_lobby_voices_index < getarraysize($@illia_lobby_voices$)) goto L_Continue; + if ($@illia_lobby_voices_index < 4) + goto L_Continue; + // End the process + stopnpctimer; + setnpctimer 0; + $@illia_lobby_voices_index = 0; + $@illia_level_5_progress = 2; + donpcevent "#LuviaShadow::OnCommandInvoke"; + end; + +L_Continue: + setnpctimer 0; + end; + +} + +052-2,1,1,0 script ? NPC127,{ +end; + +OnCommandTalk: + npctalk strnpcinfo(0), $@illia_lobby_voices$[$@illia_lobby_voices_index]; + end; + +} + +052-2,1,1,0 script Luvia? NPC371,2,2,{ + if ($@illia_level_5_progress != 3) end; + if (isin("052-2", 37,36, 41,39)) goto L_HandleTalk; + // Notify too far + mes "You see a strange and frightening, yet beautiful woman."; + if (strcharinfo(0) == $@iLLIA_HERO$) + mes "Maybe she knows something about this place."; + close; + +L_HandleTalk: + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_TalkToHero; + goto L_TalkToHelper; + +L_TalkToHelper: + mes "She gives you a quick look then gives her attention to " + $@iLLIA_HERO$ + "."; + close; + +L_TalkToHero: + mes "Are you Luvia? Your sister Valia sent me to save you! Where is Ismuth?"; + next; + $@illia_level_5_progress = 4; + initnpctimer; + close; + +OnTimer1500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Yes " + $@iLLIA_HERO$ + ", I am Luvia."; + end; + +OnTimer4500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "How nice of all of you to have come to save me!"; + end; + +OnTimer7500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "But I fear..."; + end; + +OnTimer10500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "... that you are mistaken about who has to be saved!"; + end; + +OnTimer13500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Don't make these faces..."; + end; + +OnTimer16500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Valia is just helping me by sending new soldiers for my personal army!"; + end; + +OnTimer21500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "So, if I may... Let's see what you are made of!"; + end; + +OnTimer24500: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Demonotis!"; + misceffect FX_EVIL_SUMMON; + callsub S_GetHeroRect; + areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 20 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath"; + callsub S_ClearHeroRect; + end; + +OnTimer44000: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Demonotis!"; + misceffect FX_EVIL_SUMMON; + callsub S_GetHeroRect; + areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 28 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath"; + callsub S_ClearHeroRect; + end; + +OnTimer77000: + if ($@illia_level_5_progress != 4) + end; + npctalk strnpcinfo(0), "Demonotis!"; + misceffect FX_EVIL_SUMMON; + callsub S_GetHeroRect; + areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 42 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath"; + callsub S_ClearHeroRect; + // That was the last spawn: reset the timer to start the CheckInvoke loop. + $@illia_level_5_progress = 5; + setnpctimer 0; + end; + +OnTimer6500: + if ($@illia_level_5_progress != 6) + end; + npctalk strnpcinfo(0), "Okay. You have some skill."; + end; + +OnTimer10000: + if ($@illia_level_5_progress != 6) + end; + npctalk strnpcinfo(0), "But that was only the beginning!"; + end; + +OnTimer13000: + if ($@illia_level_5_progress != 6) + end; + npctalk strnpcinfo(0), "I'll leave you in the good hands of your predecessors. Farewell!"; + end; + +OnTimer18500: + if ($@illia_level_5_progress != 6) + end; + npctalk strnpcinfo(0), "Demonotis Major!"; + misceffect FX_EVIL_SUMMON; + misceffect FX_MAGIC_DARK_EXPLOSION; + callsub S_GetHeroRect; + areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1103, 8 + (16 - 480/(30+$Illia_Luvia_Harvest))/3, "Luvia?::OnWGDeath"; + callsub S_ClearHeroRect; + end; + +OnTimer20000: + if ($@illia_level_5_progress != 6) + end; + $@illia_level_5_progress = 7; + donpcevent "#LuviaShadow::OnCommandEscape"; + setnpctimer 0; + end; + +OnTimer2000: + if ($@illia_progress != 5) + goto L_Clear; + if ($@illia_level_5_progress != 5 && $@illia_level_5_progress != 7) + end; + setnpctimer 0; + // Mock players randomly (more or less once every 40 secs) and if still enough mobs running after them + if ($@illia_level_5_progress == 5 && rand(20) == 0 && (mobcount("052-2", "Luvia?::OnDSDeath") > 20)) + npctalk strnpcinfo(0), "Ahaha! Run... Run!"; + if ($@illia_level_5_progress == 5 && (mobcount("052-2", "Luvia?::OnDSDeath") < 0)) + goto L_AllWavesClear; + if ($@illia_level_5_progress == 7 && (mobcount("052-2", "Luvia?::OnWGDeath") < 0)) + goto L_AllWavesClear; + end; + +L_Clear: + stopnpctimer; + setnpctimer 0; + killmonster "052-2", "Luvia?::OnDSDeath"; + killmonster "052-2", "Luvia?::OnWGDeath"; + end; + +L_AllWavesClear: + $@illia_level_5_progress = $@illia_level_5_progress + 1; + stopnpctimer; + setnpctimer 0; + if ($@illia_level_5_progress == 6) + startnpctimer; + if ($@illia_level_5_progress == 8) + goto L_ChaseLuvia; + end; + +L_ChaseLuvia: + $@illia_progress = 6; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 360; + areatimer 0, "052-2", 19, 18, 48, 43, 2000, "#LuviaShadow::OnNN"; + end; + +S_GetHeroRect: + if (!(attachrid($@iLLIA_HERO_ID))) + goto L_Clear; + if(!(isin("052-2", 20, 21, 47, 43))) + goto L_Clear; + + $@illia_lobby_x = getx(); + $@illia_lobby_y = gety(); + + $@illia_lobby_x1 = $@illia_lobby_x - 12; + $@illia_lobby_y1 = $@illia_lobby_y - 8; + $@illia_lobby_x2 = $@illia_lobby_x + 12; + $@illia_lobby_y2 = $@illia_lobby_y + 8; + + if ($@illia_lobby_x1 < 20) + $@illia_lobby_x1 = 20; + if ($@illia_lobby_y1 < 19) + $@illia_lobby_y1 = 19; + if ($@illia_lobby_x2 > 47) + $@illia_lobby_x2 = 47; + if ($@illia_lobby_y2 > 42) + $@illia_lobby_y2 = 42; + + detachrid; + return; + +S_ClearHeroRect: + $@illia_lobby_x1 = 20; + $@illia_lobby_y1 = 19; + $@illia_lobby_x2 = 47; + $@illia_lobby_y2 = 42; + return; + +OnDSDeath: + end; + +OnWGDeath: + end; + +} diff --git a/npc/052-2/mapflags.txt b/npc/052-2/mapflags.txt new file mode 100755 index 00000000..d4ce9d64 --- /dev/null +++ b/npc/052-2/mapflags.txt @@ -0,0 +1,2 @@ +052-2 mapflag nosave 007-2,36,23 +//052-2 mapflag resave 007-2,36,23 diff --git a/npc/052-2/partyroom.txt b/npc/052-2/partyroom.txt new file mode 100755 index 00000000..55c9bcdb --- /dev/null +++ b/npc/052-2/partyroom.txt @@ -0,0 +1,267 @@ + +052-2,88,19,0 script #TriggerDialog NPC32767,3,2,{ + @step = 7; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_7_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_SpawnLuvia; + end; + +L_SpawnLuvia: + $@illia_level_7_progress = 1; + donpcevent "Luvia::OnCommandStart"; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +} + +052-2,77,48,0 script #TriggerPlaceLuvia NPC32767,1,1,{ + if (strcharinfo(0) != $@iLLIA_HERO$) end; + if ($@illia_progress == 7 && $@illia_level_7_progress == 0) goto L_PlaceLuvia; + end; + +L_PlaceLuvia: + npcwarp 88, 15, "#LuviaDaemon"; + npcwarp 88, 15, "Luvia"; + end; + +} + +052-2,88,15,0 script Luvia NPC371,{ + @step = 7; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_7_progress == 0 && strcharinfo(0) == $@iLLIA_HERO$) goto L_Start; + end; + +OnCommandStart: + goto L_Start; + +L_Start: + setnpctimer 0; + if ($@illia_level_7_progress == 1) + startnpctimer; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +OnTimer1000: + npctalk strnpcinfo(0), "Oh well, who thought you would survive so far?"; + end; + +OnTimer5000: + npctalk strnpcinfo(0), "All this way, for nothing, only to die from my hands..."; + end; + +OnTimer10000: + npctalk strnpcinfo(0), "Don't worry, you will continue to live, for my sake."; + end; + +OnTimer15000: + npctalk strnpcinfo(0), "One piece of advice: get prepared!"; + stopnpctimer; + setnpctimer 0; + donpcevent "#LuviaDaemon::OnCommandInvoke"; + end; + +} + +052-2,88,15,0 script #LuviaDaemon NPC32767,{ +end; + +OnCommandInvoke: + setnpctimer 0; + if ($@illia_level_7_progress == 1) + startnpctimer; + end; + +OnTimer2000: + if ($@illia_level_7_progress != 1) end; + misceffect FX_DARK_TELEPORT; + // Kill any mob existing on the map + // That's to terminate any attempt at players mass-summoning mobs + // and hide in a corner of the map. + killmonster "052-2", "All"; + npcwarp 1, 1, "Luvia"; + end; + +OnTimer100: + if ($@illia_progress != 7) + goto L_Clear; + if ($@illia_level_7_progress != 3) + end; + // Trance mode + callsub S_SpawnWitchGuard; + end; + +OnTimer2600: + if ($@illia_level_7_progress != 3) + end; + npcwarp 1, 1, "#LuviaDaemon"; + setnpctimer 0; + end; + +OnTimer5000: + if ($@illia_level_7_progress != 1) + end; + // Warp to the place to spawn luvia once the teleport sequence is finished + if (!(attachrid($@iLLIA_HERO_ID))) + end; + $@illia_luvia_x = getx(); + $@illia_luvia_y = gety(); + npcwarp $@illia_luvia_x, $@illia_luvia_y, "#LuviaDaemon"; + + detachrid; + // This is a fix to force the official mana client to display a npc after a warp. + // Note: the manaplus client do not need this. + disablenpc "#LuviaDaemon"; + end; + +OnTimer5500: + if ($@illia_level_7_progress != 1) end; + // See the note above. + enablenpc "#LuviaDaemon"; + misceffect FX_EVIL_SUMMON; + misceffect FX_CHANNELLING_CAST; + monster "052-2", $@illia_luvia_x, $@illia_luvia_y, "", 1102, 1, "#LuviaDaemon::OnDeath"; + $@illia_luvia_x = 0; + $@illia_luvia_y = 0; + end; + +OnTimer9000: + if ($@illia_level_7_progress != 1) end; + set $@illia_luvia_trance_delay, 480; // 8 minutes before turning in trance mode + $@illia_witch_guard_threshold = 30 + ($Illia_Luvia_Harvest*3)/5; + if ($@illia_witch_guard_threshold > 100) + $@illia_witch_guard_threshold = 100; + $@illia_level_7_progress = 2; + npcwarp 1, 1, "#LuviaDaemon"; + setnpctimer 0; + end; + +OnTimer26000: + if ($@illia_progress != 7) + goto L_Clear; + if ($@illia_level_7_progress != 2) + end; + // The more players Luvia "harvested", the stronger she is. + if (rand(100) >= $@illia_witch_guard_threshold) + end; + // Decrease her power over time. + $@illia_witch_guard_threshold = $@illia_witch_guard_threshold - 7; + // Keep always a small probability when it reached the minimum + if ($@illia_witch_guard_threshold <= 0) + $@illia_witch_guard_threshold = 6 + $Illia_Luvia_Harvest/5; + callsub S_SpawnWitchGuard; + end; + +S_SpawnWitchGuard: + if (!(attachrid($@iLLIA_HERO_ID))) + end; + npcwarp getx(), gety(), "#LuviaDaemon"; + misceffect FX_EVIL_SUMMON; + misceffect FX_GROUND_SPAWN; + monster "052-2", getx(), gety(), "", 1103, 1, "#LuviaDaemon::OnWGD"; + detachrid; + areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnWGS"; + return; + +OnTimer30000: + if ($@illia_level_7_progress != 2) + end; + npcwarp 1, 1, "#LuviaDaemon"; + $@illia_luvia_trance_delay = $@illia_luvia_trance_delay - 30; + if ($@illia_luvia_trance_delay <= 0) + goto L_TriggerTrance; + setnpctimer 0; + end; + +L_TriggerTrance: + $@illia_level_7_progress = 3; + $@illia_luvia_trance_delay = 0; + areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnTT"; + setnpctimer 0; + end; + +L_Clear: + stopnpctimer; + setnpctimer 0; + end; + +OnDeath: + stopnpctimer; + setnpctimer 0; + if ($@illia_progress != 7) + end; + $@illia_level_7_progress = 4; + killmonster "052-2", "#LuviaDaemon::OnWGD"; + mapannounce "052-2", "Luvia : How? By mere humans! But we will see again! Enjoy your victory while it lasts, " + $@iLLIA_HERO$ + "!!", 0; + + $@illia_bp = $Illia_Luvia_Harvest * 16 / 10 + 120; + areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnBP"; + + areatimer 0, "052-2", 73, 11, 115, 49, 2000, "#LuviaDaemon::OnW00t"; + + $@illia_progress = 8; + callfunc "UpdateIlliaProgress"; + // Set the number of common rewards rewards + if ($Illia_Luvia_Harvest < 15) + $@illia_num_common_reward_items = 0; + if ($Illia_Luvia_Harvest >= 15 && $Illia_Luvia_Harvest < 35) + $@illia_num_common_reward_items = 1; + if ($Illia_Luvia_Harvest >= 35) + $@illia_num_common_reward_items = 2; + + // Set the number of unique rewards + if ($Illia_Luvia_Harvest < 40) + $@illia_num_unique_reward_items = 1; + if ($Illia_Luvia_Harvest >= 40) + $@illia_num_unique_reward_items = 2; + $Illia_Luvia_Harvest = 0; + + // Extend the time limit of +7 mins to leave enough time to pick + // the rewards even if close to the time limit + $@illia_max_time = $@illia_max_time + 300; + + // Record how many times the quest was finished + $Illia_Win_Counter = $Illia_Win_Counter + 1; + + end; + +OnBP: + BOSS_POINTS = BOSS_POINTS + $@illia_bp; + message strcharinfo(0), "You gain " + $@illia_bp + " Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +OnWGD: + end; + +OnWGS: + if ($@illia_level_7_progress == 2) + message strcharinfo(0), "One of Luvia's guard spawned from the depths to assist her!"; + end; + +OnTT: + if ($@illia_level_7_progress == 3) + message strcharinfo(0), "Luvia seems to become in trance!"; + end; + +OnW00t: + message strcharinfo(0), "You defeated this evil sorceress... But what about her sister now?"; + end; + +} + +052-2,88,12,0 script #ToLuviaRoomDoor NPC32767,1,2,{ + @step = 7; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_7_progress < 4) end; + warp "052-2", 133, 84; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; +} diff --git a/npc/052-2/storage.txt b/npc/052-2/storage.txt new file mode 100755 index 00000000..97e675f5 --- /dev/null +++ b/npc/052-2/storage.txt @@ -0,0 +1,179 @@ + +052-2,23,69,0 script #TriggerItemsInvoker NPC32767,1,0,{ + @step = 6; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if (strcharinfo(0) != $@iLLIA_HERO$) end; + if ($@illia_level_6_progress == 0) goto L_StartItemInvoker; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +L_StartItemInvoker: + $@illia_level_6_progress = 1; + donpcevent "#ItemsInvoker::OnCommandStart"; + end; + +} + +052-2,1,1,0 script #ItemsInvoker NPC32767,{ +end; + +OnInit: + setarray $@illia_storage_items, 541, 567, 568, 562; + setarray $@illia_storage_special_items, 687, 827, 1229; + // Map coords:* x1,y1, x2,y2, ... + setarray $@illia_storage_item_points, 20,67, 22,75, 27,71, 30,73, 34,76, 30,64, 34,65, 34,62, 21,61, 22,64; + end; + +OnCommandStart: + $@illia_storage_max_items = 20; + $@illia_storage_deviation = (8 + ($Illia_Luvia_Harvest*70)/100)*3; + initnpctimer; + areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnStart"; + end; + +OnStart: + message strcharinfo(0), "You feel a strange atmosphere in this room... You sense a strong magic rising from the depth!"; + end; + +OnTimer1000: + if ($@illia_storage_max_items == 0) + goto L_CheckMobs; + $@item_invoke_index = rand(getarraysize($@illia_storage_item_points)/2); + $@item_invoke_x = $@illia_storage_item_points[$@item_invoke_index*2]; + $@item_invoke_y = $@illia_storage_item_points[($@item_invoke_index*2)+1]; + npcwarp $@item_invoke_x, $@item_invoke_y, "#ItemsInvoker"; + // This is a fix to force the official mana client to display a npc after a warp. + // Note: the manaplus client do not need this. + disablenpc "#ItemsInvoker"; + end; + +OnTimer1500: + // See the note above. + enablenpc "#ItemsInvoker"; + areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnItem"; + misceffect FX_GROUND_SPAWN; + end; + +OnTimer3750: + setnpctimer 0; + $@item_invoke_x = 0; + $@item_invoke_y = 0; + $@item_invoke_index = 0; + end; + +OnItem: + if (strcharinfo(0) == $@iLLIA_HERO$) + goto L_ItemSpawn; + end; + +L_ItemSpawn: + // This section will decide what to spawn: special monster, monster, item, special item + // Calculation uses a decreasing variable which introduces a deviation. + // Its initial value is based on $@illia_Luvia_Harvest + // * first decide (50% / 50%) if the deviation will be positive or negative + // * Apply the deviation to a random number between 0, 100. (note the final value can be < 0 or > 100) + // The purpose is that, when the initial deviation is high, there are high chances to get either + // a special monster, or a special item. + @m = rand(100); + if (@m < 50) + @r = rand(100) - $@illia_storage_deviation; + if (@m >= 50) + @r = rand(100) + $@illia_storage_deviation; + // Reduce the deviation + $@illia_storage_deviation = $@illia_storage_deviation*83/100; + if (@r < 5) + goto L_MakeSpecialMonster; + if (@r < 50) + goto L_MakeMonster; + if (@r > 98) + goto L_MakeSpecialItem; + // Normal item + makeitem $@illia_storage_items[rand(getarraysize($@illia_storage_items))], rand(2, 8), "052-2", $@item_invoke_x, $@item_invoke_y; + $@illia_storage_max_items = $@illia_storage_max_items - 1; + @r = 0; + end; + +L_MakeSpecialMonster: + monster "052-2", $@item_invoke_x, $@item_invoke_y, "", 1103, 1, "#ItemsInvoker::OnDeath"; + areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnWtf"; + $@illia_storage_max_items = $@illia_storage_max_items - 1; + end; + +L_MakeMonster: + monster "052-2", $@item_invoke_x, $@item_invoke_y, "", 1101, rand(1, 3), "#ItemsInvoker::OnDeath"; + $@illia_storage_max_items = $@illia_storage_max_items - 1; + @r = 0; + end; + +L_MakeSpecialItem: + makeitem $@illia_storage_special_items[rand(getarraysize($@illia_storage_special_items))], rand(2, 4), "052-2", $@item_invoke_x, $@item_invoke_y; + areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnWow"; + $@illia_storage_max_items = $@illia_storage_max_items - 1; + @r = 0; + end; + +L_CheckMobs: + if ($@illia_progress != 6) + goto L_Clear; + if (mobcount("052-2", "#ItemsInvoker::OnDeath") < 0) + goto L_Stop; + setnpctimer 0; + end; + +L_Clear: + stopnpctimer; + setnpctimer 0; + $@illia_storage_deviation = 0; + $@illia_storage_max_items = 0; + killmonster "052-2", "#ItemsInvoker::OnDeath"; + end; + +L_Stop: + stopnpctimer; + setnpctimer 0; + npcwarp 1, 1, "#ItemsInvoker"; + $@illia_storage_deviation = 0; + $@illia_storage_max_items = 0; + $@illia_level_6_progress = 2; + $@illia_progress = 7; + callfunc "UpdateIlliaProgress"; + $@illia_max_time = $@illia_max_time + 900; + areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnStop"; + end; + +OnDeath: + end; + +OnStop: + message strcharinfo(0), "The magic seems to quickly dissipate."; + end; + +OnWtf: + message strcharinfo(0), "Look out!"; + end; + +OnWow: + message strcharinfo(0), "Wow, see what appeared!"; + end; + +} + +052-2,35,68,0 script #ToPartyRoom NPC32767,1,1,{ + @step = 6; + if ($@illia_progress < @step) goto L_ShouldNotBeHere; + if ($@illia_level_6_progress == 2) goto L_Warp; + message strcharinfo(0), "The strong magic inside this room prevents you from going further."; + end; + +L_Warp: + warp "052-2", 73, 48; + end; + +L_ShouldNotBeHere: + heal -Hp, 0; + end; + +} diff --git a/npc/055-1/_import.txt b/npc/055-1/_import.txt new file mode 100644 index 00000000..dcbfce99 --- /dev/null +++ b/npc/055-1/_import.txt @@ -0,0 +1,8 @@ +// Map 055-1: Woodland Hills +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/055-1/_mobs.txt", +"npc/055-1/_warps.txt", +"npc/055-1/flowerpentagram4.txt", +"npc/055-1/mapflags.txt", +"npc/055-1/pumpkins.txt", +"npc/055-1/traveler.txt", diff --git a/npc/055-1/_mobs.txt b/npc/055-1/_mobs.txt new file mode 100644 index 00000000..7a165d71 --- /dev/null +++ b/npc/055-1/_mobs.txt @@ -0,0 +1,19 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 055-1: Woodland Hills mobs +055-1,68,72,11,9 monster Amethyst Vein 1055,16,10000,85000 +055-1,87,29,27,7 monster Mana Bug 1035,15,10000,85000 +055-1,79,30,42,8 monster Gamboge Plant 1038,10,10000,45000 +055-1,0,0,0,0 monster Forest Maggot 1028,15,10000,85000 +055-1,91,49,3,2 monster Alizarin Plant 1037,1,10000,180000 +055-1,103,54,2,1 monster Alizarin Plant 1037,1,10000,180000 +055-1,64,75,13,8 monster Alizarin Plant 1037,1,10000,120000 +055-1,80,34,41,12 monster Squirrel 1041,3,10000,85000 +055-1,70,72,8,12 monster Butterfly 1032,2,10000,60000 +055-1,81,32,40,11 monster Butterfly 1032,2,10000,60000 +055-1,0,0,0,0 monster Bee 1029,7,10000,55000 +055-1,0,0,0,0 monster Pinkie 1030,3,10000,60000 +055-1,0,0,0,0 monster Log Head 1031,2,10000,60000 +055-1,116,60,2,1 monster CroconutMob 1014,1,10000,45000 +055-1,97,60,2,1 monster CroconutMob 1014,1,10000,45000 +055-1,64,73,11,8 monster CroconutMob 1014,1,10000,45000 +055-1,0,0,0,0 monster PumpkinMob 1019,7,10000,60000 diff --git a/npc/055-1/_warps.txt b/npc/055-1/_warps.txt new file mode 100644 index 00000000..31dc2b47 --- /dev/null +++ b/npc/055-1/_warps.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 055-1: Woodland Hills warps +055-1,100,83,0 warp #055-1_100_83 0,0,055-3,30,27 +055-1,100,89,0 warp #055-1_100_89 0,0,055-3,50,42 +055-1,22,52,0 warp #055-1_22_52 0,3,013-1,135,51 +055-1,137,96,0 warp #055-1_137_96 0,0,055-3,76,39 +055-1,60,93,0 warp #055-1_60_93 0,0,055-3,96,70 +055-1,75,20,0 warp #055-1_75_20 1,0,017-1,188,103 +055-1,149,63,0 warp #055-1_149_63 0,2,057-1,20,63 diff --git a/npc/055-1/flowerpentagram4.txt b/npc/055-1/flowerpentagram4.txt new file mode 100755 index 00000000..12e0f833 --- /dev/null +++ b/npc/055-1/flowerpentagram4.txt @@ -0,0 +1,123 @@ + +055-1,141,89,0 script #FlowerPentagram4 NPC400,{ + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest > 26) goto L_PlacedFourthFlower; + if (OrumQuest == 26) goto L_FourthFlower; + + message strcharinfo(0), "Something is odd about this place."; + end; + +L_FourthFlower: + mes "This is the spot where you have to place the fourth of Orum's magical flowers."; + menu + "Place the flower.", L_PlaceTheFlower, + "Leave.", L_close; + +L_PlaceTheFlower: + if (isin("055-1", 140, 88, 142, 90)) + goto L_Place; + + mes "This isn't working, you're too far away."; + goto L_close; + +L_Place: + set @localMonsterCount, + mobcount("055-1", "#FlowerPentagram4::OnSquirrelDeath") + + mobcount("055-1", "#FlowerPentagram4::OnMushroomDeath") + + mobcount("055-1", "#FlowerPentagram4::OnBlueparDeath") + + mobcount("055-1", "#FlowerPentagram4::OnMoubooDeath") + + mobcount("055-1", "#FlowerPentagram4::OnScorpionDeath") + + mobcount("055-1", "#FlowerPentagram4::OnRScorpionDeath") + + mobcount("055-1", "#FlowerPentagram4::OnAScorpionDeath") + + mobcount("055-1", "#FlowerPentagram4::OnBScorpionDeath") + + 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters + if (@localMonsterCount > 4) + goto L_MonstersAlive; + + if (countitem("YellowSummonFlower") < 1) + goto L_NoFlower; + delitem "YellowSummonFlower", 1; + mes "Worried about what will shift from the astral plane this time, you prepare yourself and put the flower in place."; + mes "As expected, you feel the magical tension building up. They're coming."; + OrumQuest = 27; + close2; + areamonster "055-1", 133, 87, 144, 99, "", 1105, 1, "#FlowerPentagram4::OnSquirrelDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1106, 1, "#FlowerPentagram4::OnMushroomDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1107, 2, "#FlowerPentagram4::OnBlueparDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1104, 2, "#FlowerPentagram4::OnMoubooDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1003, 2, "#FlowerPentagram4::OnScorpionDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1004, 2, "#FlowerPentagram4::OnRScorpionDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1057, 2, "#FlowerPentagram4::OnAScorpionDeath"; + areamonster "055-1", 133, 87, 144, 99, "", 1009, 1, "#FlowerPentagram4::OnBScorpionDeath"; + @value = 15; + callfunc "QuestSagathaAnnoy"; + @value = 0; + end; + +OnSquirrelDeath: + @mobId = 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + @mobId = 1106; + callfunc "MobPoints"; + end; + +OnBlueparDeath: + @mobId = 1107; + callfunc "MobPoints"; + end; + +OnMoubooDeath: + @mobId = 1104; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + @mobId = 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + @mobId = 1004; + callfunc "MobPoints"; + end; + +OnAScorpionDeath: + @mobId = 1057; + callfunc "MobPoints"; + end; + +OnBScorpionDeath: + @mobId = 1009; + callfunc "MobPoints"; + end; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "This place has recently been used to summon something! And the beings are still nearby!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_close; + +L_NoFlower: + mes "You search your belongings for the magical flower. Where is it?"; + mes "If you lost it, you should talk to Orum again."; + goto L_close; + +L_PlacedFourthFlower: + mes "You placed the fourth of Orum's magical flowers here."; + mes "You can still feel the magical power shimmering around this place, waiting to be unleashed."; + goto L_close; + +L_PlacedFifthFlower: + mes "This is where you placed the fourth of Orum's magical flowers."; + mes "However, now that the summoning spell has been cast, everything is back to normal here."; + goto L_close; + +L_close: + @localMonsterCount = 0; + close; +} diff --git a/npc/055-1/mapflags.txt b/npc/055-1/mapflags.txt new file mode 100755 index 00000000..e47dd41a --- /dev/null +++ b/npc/055-1/mapflags.txt @@ -0,0 +1 @@ +//055-1 mapflag resave 055-1,133,61 diff --git a/npc/055-1/pumpkins.txt b/npc/055-1/pumpkins.txt new file mode 100755 index 00000000..8fc25eb3 --- /dev/null +++ b/npc/055-1/pumpkins.txt @@ -0,0 +1,150 @@ +055-1,0,0,0 script _N-Pumpkin NPC32767,{ + + + set @distance_handler, 1; // silent + set @npc_distance, (1-2); // -1 means attack range + callfunc "PCtoNPCRange"; + if (@npc_check) end; + + if (Quest_Halloween != 1 || !(gettime(6) == 11 && (gettime(5) >= 4 && gettime(5) <= 30))) + goto L_HeavyPoison; + if (@discover_poisonous_pumpkin == 0) + message strcharinfo(0), "Pumpkin : Yuke, this pumpkin released some ugly poison gas!"; + @discover_poisonous_pumpkin = 1; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -15, 0; + sc_start SC_POISON, 1, 4; + if (rand(0,100) < 10) + getitem "PumpkinSeeds", 1; + + if (countitem("PumpkinSeeds") >= $@halloween_num_seeds) + goto L_EnoughSeeds; + + @mobId = 1063; + callfunc "MobPoints"; + goto L_Destroy; + +L_EnoughSeeds: + message strcharinfo(0), "Pumpkin : " + $@halloween_num_seeds + " should be enough seeds for Oscar. And this pumpkin gas gets too bad to stand it any longer..."; + Quest_Halloween = 2; + // Reset this to get the message for the "heavy" poison + @discover_poisonous_pumpkin = 0; + goto L_Destroy; + +L_HeavyPoison: + if (@discover_poisonous_pumpkin == 0) + goto L_HeavyPoison0; + if (@discover_poisonous_pumpkin == 1) + goto L_HeavyPoison1; + goto L_HeavyPoison2; + +L_HeavyPoison0: + @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1; + message strcharinfo(0), "Pumpkin : Ouch, this pumpkin is totally poisonous! Let's get away from them!"; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -150,0; + sc_start SC_POISON, 1, 60; + goto L_Destroy; + +L_HeavyPoison1: + @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1; + message strcharinfo(0), "Pumpkin : This is really awful! I should not touch them!"; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -350,0; + sc_start SC_POISON, 1, 120; + goto L_Destroy; + +L_HeavyPoison2: + @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -Hp, 0; + goto L_Destroy; + +OnAppear: + fakenpcname strnpcinfo(0), strnpcinfo(0), 1063; // set the sprite (implies enablenpc) + end; + +L_Destroy: + disablenpc strnpcinfo(0); // makes the npc invisible, unclickable + addnpctimer .death_t, strnpcinfo(0) + "::OnReallyDestroy"; // schedule a respawn + end; + +OnReallyDestroy: + set .nodes[.i], get(.nodes[.i], "_N-Pumpkin") - 1, "_N-Pumpkin"; // tell the puppeteer we lost an egg + destroy; + + + +S_MakeNode: + set .nID, .nID + 1; // give the node an id + .@name$ = "#_Pkin" + chr(3) + .nID; + if (.nID == 2147483647) + set .nID, 0; // start over if id = 0x7FFFFFFF + goto S_FindXY; + +S_FindXY: + .@x = rand(.x1[.i], .x2[.i]); + .@y = rand(.y1[.i], .y2[.i]); + if (iscollision(.m$[.i], .@x, .@y) == 1) + goto S_FindXY; + goto S_ReallySpawn; + +S_ReallySpawn: + set .@p, puppet(.m$[.i], .@x, .@y, .@name$, 32767); // spawn the node (but not on map, because 32767) + if (.@p < 1) goto S_MakeNode; // silently retry + disablenpc .@name$; // make sure it can't be clicked by guessing the being id + set .i, .i, .@p; // tell the puppet what object contains it + set .death_t, rand(.death_t/2, .death_t), .@p; // tell the puppet when to die + set .@timer, if_then_else(.done_initial[.i], rand(.appear_t/2, .appear_t), 0); // timer depends on if first spawn or if respawned after death + addnpctimer .@timer, .@name$+"::OnAppear"; // we spawn the node instantly but it only appears after the timer + .nodes[.i] = .nodes[.i] + 1; + return; + +S_IterateObjects: + if (.min_nodes[.i] == 0) + .min_nodes[.i] = (.min * min(1, ((.x2[.i] - .x1[.i]) * (.y2[.i] - .y1[.i])) / .divisor)); + if (.max_nodes[.i] == 0) + .max_nodes[.i] = (.max * max(1, ((.x2[.i] - .x1[.i]) * (.y2[.i] - .y1[.i])) / .divisor)); + + if (.nodes[.i] >= .max_nodes[.i]) + goto S_NextObject; + + callsub S_MakeNode; + if (.nodes[.i] < if_then_else(.done_initial[.i], .min_nodes[.i], .max_nodes[.i])) + goto S_IterateObjects; + goto S_NextObject; + +S_NextObject: + .done_initial[.i] = 1; + if (.i >= (.count - 1)) + goto S_Return; + set .i, .i + 1; // object iterator++ + goto S_IterateObjects; + +S_Return: + return; + +OnHeartbeat: + set .i, 0; // object iterator + freeloop 1; + callsub S_IterateObjects; + freeloop 0; + addnpctimer .spawn_t, strnpcinfo(0) + "::OnHeartbeat"; // heartbeat + end; + +OnMaybeStart: + if (.x1[1] == 0) + end; + set .min, 0; // relative min number of nodes per object => (min * (((x2 - x1) * (y2 - y1)) / divisor)) + set .max, 5; // relative max number of nodes per object => (max * (((x2 - x1) * (y2 - y1)) / divisor)) + set .divisor, 32; // see .min & .max ^ + set .count, getarraysize(.x1); // number of nodes objects in TSX + set .spawn_t, 18000; // heartbeat rate + set .death_t, 1000; // rand(timer/2, timer) before a node triggers respawn after death + set .appear_t, 40000; // rand(timer/2, timer) before a node becomes visible after spawn + if (.started) + end; + .started = 1; + addnpctimer 10000, strnpcinfo(0)+"::OnHeartbeat"; // first heartbeat + end; +} diff --git a/npc/055-1/traveler.txt b/npc/055-1/traveler.txt new file mode 100755 index 00000000..14c798ec --- /dev/null +++ b/npc/055-1/traveler.txt @@ -0,0 +1,7 @@ + +055-1,135,60,0 script Sherman the Traveler NPC103,{ + @npcname$ = "Sherman"; + @NpcTravelBit = $@hurns_farms_bit; + callfunc "Traveler"; + end; +} diff --git a/npc/055-3/_import.txt b/npc/055-3/_import.txt new file mode 100644 index 00000000..a39a581e --- /dev/null +++ b/npc/055-3/_import.txt @@ -0,0 +1,5 @@ +// Map 055-3: Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/055-3/_mobs.txt", +"npc/055-3/_warps.txt", +"npc/055-3/mapflags.txt", diff --git a/npc/055-3/_mobs.txt b/npc/055-3/_mobs.txt new file mode 100644 index 00000000..7a94ebc6 --- /dev/null +++ b/npc/055-3/_mobs.txt @@ -0,0 +1,10 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 055-3: Cave mobs +055-3,45,44,10,7 monster Blub 1008,10,10000,60000 +055-3,0,0,0,0 monster Manana Tree 1017,20,10000,45000 +055-3,53,75,14,20 monster Little Blub 1007,10,10000,60000 +055-3,0,0,0,0 monster Toppy Blub 1009,8,10000,35000 +055-3,0,0,0,0 monster Frostiana 1012,8,10000,35000 +055-3,0,0,0,0 monster Crocotree 1010,3,10000,20000 +055-3,46,44,7,9 monster Frostiana 1012,3,50000,100000 +055-3,52,78,18,11 monster Toppy Blub 1009,3,50000,100000 diff --git a/npc/055-3/_warps.txt b/npc/055-3/_warps.txt new file mode 100644 index 00000000..826c4977 --- /dev/null +++ b/npc/055-3/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 055-3: Cave warps +055-3,77,40,0 warp #055-3_77_40 1,0,055-1,137,97 +055-3,30,26,0 warp #055-3_30_26 0,0,055-1,100,82 +055-3,50,43,0 warp #055-3_50_43 0,0,055-1,100,90 +055-3,96,71,0 warp #055-3_96_71 1,0,055-1,60,94 +055-3,58,96,0 warp #055-3_58_96 1,0,055-3,98,115 +055-3,98,114,0 warp #055-3_98_114 0,0,055-3,57,95 diff --git a/npc/055-3/mapflags.txt b/npc/055-3/mapflags.txt new file mode 100755 index 00000000..11160b5f --- /dev/null +++ b/npc/055-3/mapflags.txt @@ -0,0 +1 @@ +//055-3 mapflag resave 055-1,133,61 diff --git a/npc/056-2/_import.txt b/npc/056-2/_import.txt new file mode 100644 index 00000000..0fed9acb --- /dev/null +++ b/npc/056-2/_import.txt @@ -0,0 +1,7 @@ +// Map 056-2: Mirak's House +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/056-2/_warps.txt", +"npc/056-2/barrier.txt", +"npc/056-2/mapflags.txt", +"npc/056-2/mirak.txt", +"npc/056-2/notes.txt", diff --git a/npc/056-2/_warps.txt b/npc/056-2/_warps.txt new file mode 100644 index 00000000..c83522db --- /dev/null +++ b/npc/056-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 056-2: Mirak's House warps +056-2,63,34,0 warp #056-2_63_34 0,0,056-2,23,32 +056-2,35,30,0 warp #056-2_35_30 0,0,017-1,169,90 diff --git a/npc/056-2/barrier.txt b/npc/056-2/barrier.txt new file mode 100755 index 00000000..f6759e3a --- /dev/null +++ b/npc/056-2/barrier.txt @@ -0,0 +1,17 @@ +056-2,23,33,0 script #Barrier NPC45,0,0,{ + if (Mirak_Bantime > gettimetick(2)) + goto L_Block; + if (BaseLevel < 25) + goto L_Weak; + warp "056-2", 63, 35; + end; + +L_Block: + message strcharinfo(0), "I can't enter.... That old man really made sure that I wouldn't be able to bother him again anytime soon."; + end; + +L_Weak: + message strcharinfo(0), "I can't enter because this magic field is too strong. Maybe I should train some more...."; + end; + +} diff --git a/npc/056-2/mapflags.txt b/npc/056-2/mapflags.txt new file mode 100755 index 00000000..5bfaa624 --- /dev/null +++ b/npc/056-2/mapflags.txt @@ -0,0 +1,2 @@ +056-2 mapflag nosave 017-1,107,70 +//056-2 mapflag resave 017-1,107,70 diff --git a/npc/056-2/mirak.txt b/npc/056-2/mirak.txt new file mode 100755 index 00000000..d24b3ec1 --- /dev/null +++ b/npc/056-2/mirak.txt @@ -0,0 +1,139 @@ +056-2,67,24,0 script Mirak NPC372,{ + + callfunc "DailyQuestPointsFunc"; + + @Mirak_MASK = NIBBLE_0_MASK; + @Mirak_SHIFT = NIBBLE_0_SHIFT; + + @talk = ((QUEST_Mirak & @Mirak_MASK) >> @Mirak_SHIFT); + + @Mirak_Annoy_MASK = NIBBLE_1_MASK; + @Mirak_Annoy_SHIFT = NIBBLE_1_SHIFT; + + @annoy = ((QUEST_Mirak & @Mirak_Annoy_MASK) >> @Mirak_Annoy_SHIFT); + + + if (Mirak_Questtime > gettimetick(2)) + goto L_TooSoon; + if (@annoy > 3) + goto L_Kill; + if (Mirak_Bantime > gettimetick(2)) + goto L_Ban; + if (@talk < 3) + goto L_Talk; + goto L_Ban; + +L_Ban: + mes "[Mirak]"; + mes "\"How did you get back here?\""; + goto L_Kill; + +L_Talk: + Mirak_Bantime = 0; + Mirak_Questtime = 0; + if (@talk == 1) + goto L_Talk1; + if (@talk == 2) + goto L_Talk2; + mes "The old man reads a book and looks up when he sees you coming."; + mes "He looks at you angrily."; + next; + mes "[Mirak]"; + mes "\"Hi, my name is Mirak. You might have the impression that I am nice, but I am NOT! I want to be left alone to read in peace! I tried that at my mansion in Port City but it did not work. My damn brother, he always kept going on about Bat Wings...\""; + next; + mes "Suddenly his face gets red. He breathes slowly three times..."; + next; + mes "He seems to be calm again."; + next; + mes "[Mirak]"; + mes "\"Eh... Ah! That's why I bought this house in this goddamn woods. I hoped nobody would come by here. It seems I was wrong. I believe that you did not read the notes I left behind. Read them on your way out.\""; + mes "He looks down on his book and ignores you."; + @talk = 1; + callsub S_Update_Mask; + close; + +L_Talk1: + mes "[Mirak]"; + mes "\"What?! You again? Get going!\""; + @talk = 2; + callsub S_Update_Mask; + close; + +L_Talk2: + mes "[Mirak]"; + mes "\"What do you want?!\""; + menu + "Nothing.", L_Nothing, + "Money!", L_Quest; + +L_Nothing: + mes "[Mirak]"; + mes "\"Ahhhh! Get lost, or you'll regret it!\""; + @annoy = @annoy+1; + callsub S_Update_Mask_Annoy; + close; + +L_Quest: + @dq_cost = DailyQuestPoints; + @dq_money = 20; + @dq_exp = 20; + mes "[Mirak]"; + mes "\"If you have some energy left, which I need, I can give you money for it. But only if you will leave me alone!\""; + menu + "Okay.", L_Trade, + "Nah, I won't leave you alone.", L_Kill; + +L_TooSoon: + mes "Mirak looks up, sees you, and gets angry."; + mes "[Mirak]"; + mes "\"I told you not to bother me again! That's why I paid you!\""; + goto L_Kill; + +L_Kill: + misceffect sfx_magic_war, strcharinfo(0); + heal -Hp, 0; + @annoy = 0; + callsub S_Update_Mask_Annoy; + Mirak_Bantime = gettimetick(2) + 86400; + Mirak_Questtime = 0; + mes "The old man stands up and looks at you angrier than ever. He mumbles something and your head explodes."; + next; + mes "[Mirak]"; + mes "\"That's what you get for annoying me! I studied under the Mages of Tulimshar!"; + mes "I feel better now.\""; + next; + mes "The old man sits back down and continues to read."; + close; + +L_Trade: + if (DailyQuestPoints == 0) + goto L_NoPoints; + Zeny = Zeny + (@dq_money * @dq_cost); + getexp @dq_exp * @dq_cost, 0; + DailyQuestPoints = DailyQuestPoints - @dq_cost; + + mes "[" + @dq_money * @dq_cost + " money]"; + mes "[" + @dq_exp * @dq_cost + " experience points]"; + mes "\"Now leave or you'll regret it. Don't come back!\""; + Mirak_Questtime = gettimetick(2) + 86400; + Mirak_Bantime = 0; + close; + +L_NoPoints: + mes "[Mirak]"; + mes "\"Why do you bother me!? You have no energy left!\""; + goto L_Kill; + + +S_Update_Mask_Annoy: + set QUEST_Mirak, + (QUEST_Mirak & ~(@Mirak_Annoy_MASK)) + | (@annoy << @Mirak_Annoy_SHIFT); + return; + +S_Update_Mask: + set QUEST_Mirak, + (QUEST_Mirak & ~(@Mirak_MASK)) + | (@talk << @Mirak_SHIFT); + return; +} diff --git a/npc/056-2/notes.txt b/npc/056-2/notes.txt new file mode 100755 index 00000000..091ffd73 --- /dev/null +++ b/npc/056-2/notes.txt @@ -0,0 +1,13 @@ +056-2,77,34,0 script Warning#mirak NPC400,{ + mes "Turn around. Do not come any closer!"; + mes "Go back upstairs and leave! I don't want to see anybody!"; + mes "This is the last warning!"; + mes "- Mirak"; + close; +} +056-2,29,30,0 script Note#mirak NPC400,{ + mes "DO NOT GO ANY FURTHER!"; + mes "Put the supplies on the table and do not come downstairs. I don't want to be bothered."; + mes "- Mirak"; + close; +} diff --git a/npc/057-1/_import.txt b/npc/057-1/_import.txt new file mode 100644 index 00000000..38f606e6 --- /dev/null +++ b/npc/057-1/_import.txt @@ -0,0 +1,5 @@ +// Map 057-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/057-1/_mobs.txt", +"npc/057-1/_warps.txt", +"npc/057-1/mapflags.txt", diff --git a/npc/057-1/_mobs.txt b/npc/057-1/_mobs.txt new file mode 100644 index 00000000..13b747f6 --- /dev/null +++ b/npc/057-1/_mobs.txt @@ -0,0 +1,20 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 057-1: Woodland mobs +057-1,0,0,0,0 monster Bee 1029,5,45000,45000 +057-1,0,0,0,0 monster Pinkie 1030,3,10000,65000 +057-1,0,0,0,0 monster Log Head 1031,5,10000,45000 +057-1,0,0,0,0 monster Butterfly 1032,7,10000,70000 +057-1,0,0,0,0 monster Forest Maggot 1028,14,10000,45000 +057-1,95,42,14,4 monster Amethyst Vein 1055,3,10000,40000 +057-1,25,48,5,23 monster Mana Bug 1035,7,10000,15000 +057-1,99,40,11,8 monster CroconutMob 1014,2,10000,45000 +057-1,100,30,9,5 monster Amethyst Vein 1055,2,10000,40000 +057-1,83,64,6,6 monster Amethyst Vein 1055,2,10000,40000 +057-1,59,34,4,5 monster Amethyst Vein 1055,2,10000,40000 +057-1,32,45,4,5 monster Amethyst Vein 1055,2,10000,40000 +057-1,144,35,6,6 monster Amethyst Vein 1055,2,10000,40000 +057-1,104,67,6,5 monster CroconutMob 1014,2,10000,45000 +057-1,135,53,6,5 monster CroconutMob 1014,2,10000,45000 +057-1,0,0,0,0 monster PumpkinMob 1019,10,10000,45000 +057-1,0,0,0,0 monster Alizarin Plant 1037,3,10000,180000 +057-1,27,46,7,26 monster Gamboge Plant 1038,6,10000,50000 diff --git a/npc/057-1/_warps.txt b/npc/057-1/_warps.txt new file mode 100644 index 00000000..4571efd2 --- /dev/null +++ b/npc/057-1/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 057-1: Woodland warps +057-1,19,63,0 warp #057-1_19_63 0,2,055-1,148,63 diff --git a/npc/057-1/mapflags.txt b/npc/057-1/mapflags.txt new file mode 100755 index 00000000..33c0165b --- /dev/null +++ b/npc/057-1/mapflags.txt @@ -0,0 +1 @@ +//057-1 mapflag resave 055-1,133,61 diff --git a/npc/069-2/_import.txt b/npc/069-2/_import.txt new file mode 100644 index 00000000..b225a413 --- /dev/null +++ b/npc/069-2/_import.txt @@ -0,0 +1,3 @@ +// Map 069-2: Celestia's Hideout +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/069-2/_warps.txt", diff --git a/npc/069-2/_warps.txt b/npc/069-2/_warps.txt new file mode 100644 index 00000000..1b10167c --- /dev/null +++ b/npc/069-2/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 069-2: Celestia's Hideout warps +069-2,45,83,0 warp #069-2_45_83 3,0,069-2,106,116 +069-2,107,117,0 warp #069-2_107_117 3,0,069-2,44,84 diff --git a/npc/070-1/_import.txt b/npc/070-1/_import.txt new file mode 100644 index 00000000..5dbdaa98 --- /dev/null +++ b/npc/070-1/_import.txt @@ -0,0 +1,2 @@ +// Map 070-1: Underworld +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/070-3/_import.txt b/npc/070-3/_import.txt new file mode 100644 index 00000000..ebe4b06e --- /dev/null +++ b/npc/070-3/_import.txt @@ -0,0 +1,2 @@ +// Map 070-3: The Abyss +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/099-1/_import.txt b/npc/099-1/_import.txt new file mode 100644 index 00000000..9448a625 --- /dev/null +++ b/npc/099-1/_import.txt @@ -0,0 +1,3 @@ +// Map 099-1: Keshlam's Adventurer's Guild +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/099-1/_warps.txt", diff --git a/npc/099-1/_warps.txt b/npc/099-1/_warps.txt new file mode 100644 index 00000000..24df433a --- /dev/null +++ b/npc/099-1/_warps.txt @@ -0,0 +1,67 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 099-1: Keshlam's Adventurer's Guild warps +099-1,29,14,0 warp #099-1_29_14 0,0,099-2,25,22 +099-1,77,15,0 warp #099-1_77_15 0,0,099-2,59,21 +099-1,105,7,0 warp #099-1_105_7 0,0,099-2,90,21 +099-1,91,135,0 warp #099-1_91_135 0,0,099-2,121,21 +099-1,20,114,0 warp #099-1_20_114 0,0,099-2,25,49 +099-1,97,84,0 warp #099-1_97_84 0,0,099-2,59,49 +099-1,118,116,0 warp #099-1_118_116 0,0,099-3,72,26 +099-1,112,125,0 warp #099-1_112_125 0,0,099-2,91,49 +099-1,64,113,0 warp #099-1_64_113 0,0,099-2,121,48 +099-1,64,71,0 warp #099-1_64_71 0,0,099-2,25,75 +099-1,42,50,0 warp #099-1_42_50 0,0,099-2,59,75 +099-1,92,43,0 warp #099-1_92_43 0,0,099-2,91,75 +099-1,15,76,0 warp #099-1_15_76 0,0,099-2,121,75 +099-1,42,123,0 warp #099-1_42_123 0,0,099-2,25,101 +099-1,113,60,0 warp #099-1_113_60 0,0,099-2,60,101 +099-1,131,80,0 warp #099-1_131_80 0,0,099-2,91,101 +099-1,72,57,0 warp #099-1_72_57 0,0,099-2,121,101 +099-1,47,91,0 warp #099-1_47_91 0,0,099-2,26,132 +099-1,102,23,0 warp #099-1_102_23 0,0,099-2,60,132 +099-1,119,43,0 warp #099-1_119_43 0,0,099-2,92,132 +099-1,97,104,0 warp #099-1_97_104 0,0,099-2,121,132 +099-1,47,15,0 warp #099-1_47_15 0,0,099-3,29,63 +099-1,76,24,0 warp #099-1_76_24 0,0,099-3,35,63 +099-1,128,16,0 warp #099-1_128_16 0,0,099-3,41,63 +099-1,110,46,0 warp #099-1_110_46 0,0,099-3,47,63 +099-1,120,77,0 warp #099-1_120_77 0,0,099-3,53,63 +099-1,113,96,0 warp #099-1_113_96 0,0,099-3,59,63 +099-1,125,96,0 warp #099-1_125_96 0,0,099-3,79,63 +099-1,60,91,0 warp #099-1_60_91 0,0,099-3,85,63 +099-1,20,53,0 warp #099-1_20_53 0,0,099-3,91,63 +099-1,14,55,0 warp #099-1_14_55 0,0,099-3,97,63 +099-1,22,69,0 warp #099-1_22_69 0,0,099-3,103,63 +099-1,19,92,0 warp #099-1_19_92 0,0,099-3,109,63 +099-1,57,50,0 warp #099-1_57_50 0,0,099-3,115,63 +099-1,127,43,0 warp #099-1_127_43 0,0,099-1,35,30 +099-1,21,15,0 warp #099-1_21_15 0,0,099-6,121,132 +099-1,39,14,0 warp #099-1_39_14 0,0,099-1,35,30 +099-1,58,15,0 warp #099-1_58_15 0,0,099-6,92,132 +099-1,67,15,0 warp #099-1_67_15 0,0,099-1,35,30 +099-1,85,15,0 warp #099-1_85_15 0,0,099-6,59,21 +099-1,97,7,0 warp #099-1_97_7 0,0,099-1,35,30 +099-1,97,30,0 warp #099-1_97_30 0,0,099-6,26,132 +099-1,104,30,0 warp #099-1_104_30 0,0,099-6,90,21 +099-1,108,23,0 warp #099-1_108_23 0,0,099-6,121,101 +099-1,99,43,0 warp #099-1_99_43 0,0,099-1,35,30 +099-1,82,43,0 warp #099-1_82_43 0,0,099-6,91,101 +099-1,82,24,0 warp #099-1_82_24 0,0,099-1,35,30 +099-1,69,24,0 warp #099-1_69_24 0,0,099-6,60,132 +099-1,95,60,0 warp #099-1_95_60 0,0,099-6,60,101 +099-1,78,57,0 warp #099-1_78_57 0,0,099-6,25,22 +099-1,66,57,0 warp #099-1_66_57 0,0,099-6,25,101 +099-1,105,60,0 warp #099-1_105_60 0,0,099-1,35,30 +099-1,50,50,0 warp #099-1_50_50 0,0,099-1,35,30 +099-1,34,50,0 warp #099-1_34_50 0,0,099-6,121,75 +099-1,26,50,0 warp #099-1_26_50 0,0,099-6,91,75 +099-1,25,79,0 warp #099-1_25_79 0,0,099-6,59,75 +099-1,39,102,0 warp #099-1_39_102 0,0,099-6,25,75 +099-1,29,114,0 warp #099-1_29_114 0,0,099-1,35,30 +099-1,29,135,0 warp #099-1_29_135 0,0,099-6,121,48 +099-1,58,127,0 warp #099-1_58_127 0,0,099-6,91,49 +099-1,84,115,0 warp #099-1_84_115 0,0,099-6,59,49 +099-1,125,125,0 warp #099-1_125_125 0,0,099-1,35,30 +099-1,82,104,0 warp #099-1_82_104 0,0,099-6,25,49 +099-1,87,87,0 warp #099-1_87_87 0,0,099-1,35,30 +099-1,79,71,0 warp #099-1_79_71 0,0,099-6,121,21 diff --git a/npc/099-2/_import.txt b/npc/099-2/_import.txt new file mode 100644 index 00000000..99cc03a3 --- /dev/null +++ b/npc/099-2/_import.txt @@ -0,0 +1,3 @@ +// Map 099-2: Keshlam's Adventurer's Guild Quarters +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/099-2/_warps.txt", diff --git a/npc/099-2/_warps.txt b/npc/099-2/_warps.txt new file mode 100644 index 00000000..b1b33cbd --- /dev/null +++ b/npc/099-2/_warps.txt @@ -0,0 +1,22 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 099-2: Keshlam's Adventurer's Guild Quarters warps +099-2,25,23,0 warp #099-2_25_23 0,0,099-1,29,17 +099-2,59,22,0 warp #099-2_59_22 0,0,099-1,77,17 +099-2,90,22,0 warp #099-2_90_22 0,0,099-1,105,9 +099-2,121,22,0 warp #099-2_121_22 0,0,099-1,91,137 +099-2,25,50,0 warp #099-2_25_50 0,0,099-1,20,116 +099-2,59,50,0 warp #099-2_59_50 0,0,099-1,97,86 +099-2,91,50,0 warp #099-2_91_50 0,0,099-1,112,127 +099-2,121,49,0 warp #099-2_121_49 0,0,099-1,64,115 +099-2,25,76,0 warp #099-2_25_76 0,0,099-1,64,73 +099-2,59,76,0 warp #099-2_59_76 0,0,099-1,42,52 +099-2,91,76,0 warp #099-2_91_76 0,0,099-1,92,45 +099-2,121,76,0 warp #099-2_121_76 0,0,099-1,15,78 +099-2,25,102,0 warp #099-2_25_102 0,0,099-1,49,130 +099-2,60,102,0 warp #099-2_60_102 0,0,099-1,113,62 +099-2,91,102,0 warp #099-2_91_102 0,0,099-1,131,79 +099-2,121,102,0 warp #099-2_121_102 0,0,099-1,72,59 +099-2,26,133,0 warp #099-2_26_133 0,0,099-1,47,93 +099-2,60,133,0 warp #099-2_60_133 0,0,099-1,102,25 +099-2,92,133,0 warp #099-2_92_133 0,0,099-1,120,45 +099-2,121,133,0 warp #099-2_121_133 0,0,099-1,97,106 diff --git a/npc/099-3/_import.txt b/npc/099-3/_import.txt new file mode 100644 index 00000000..24ad4ebf --- /dev/null +++ b/npc/099-3/_import.txt @@ -0,0 +1,3 @@ +// Map 099-3: Keshlam's Adventurer's Guild Basement +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/099-3/_warps.txt", diff --git a/npc/099-3/_warps.txt b/npc/099-3/_warps.txt new file mode 100644 index 00000000..4ca885c1 --- /dev/null +++ b/npc/099-3/_warps.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 099-3: Keshlam's Adventurer's Guild Basement warps +099-3,72,25,0 warp #099-3_72_25 0,0,099-1,119,115 +099-3,28,60,0 warp #099-3_28_60 0,0,099-1,48,17 +099-3,35,61,0 warp #099-3_35_61 0,0,099-1,76,26 +099-3,40,60,0 warp #099-3_40_60 0,0,099-1,128,18 +099-3,47,60,0 warp #099-3_47_60 0,0,099-1,110,45 +099-3,53,60,0 warp #099-3_53_60 0,0,099-1,120,79 +099-3,59,61,0 warp #099-3_59_61 0,0,099-1,113,98 +099-3,79,60,0 warp #099-3_79_60 0,0,099-1,125,98 +099-3,85,61,0 warp #099-3_85_61 0,0,099-1,60,93 +099-3,91,60,0 warp #099-3_91_60 0,0,099-1,20,55 +099-3,97,61,0 warp #099-3_97_61 0,0,099-1,14,55 +099-3,102,60,0 warp #099-3_102_60 0,0,099-1,15,68 +099-3,108,61,0 warp #099-3_108_61 0,0,099-1,19,94 +099-3,114,61,0 warp #099-3_114_61 0,0,099-1,57,52 diff --git a/npc/099-4/_import.txt b/npc/099-4/_import.txt new file mode 100644 index 00000000..d37bbba0 --- /dev/null +++ b/npc/099-4/_import.txt @@ -0,0 +1,2 @@ +// Map 099-4: ????? +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/099-5/_import.txt b/npc/099-5/_import.txt new file mode 100644 index 00000000..7d086628 --- /dev/null +++ b/npc/099-5/_import.txt @@ -0,0 +1,2 @@ +// Map 099-5: ????? +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/099-6/_import.txt b/npc/099-6/_import.txt new file mode 100644 index 00000000..dc737d61 --- /dev/null +++ b/npc/099-6/_import.txt @@ -0,0 +1,3 @@ +// Map 099-6: Keshlam's Adventurer's Guild Quarters +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/099-6/_warps.txt", diff --git a/npc/099-6/_warps.txt b/npc/099-6/_warps.txt new file mode 100644 index 00000000..a000d250 --- /dev/null +++ b/npc/099-6/_warps.txt @@ -0,0 +1,22 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 099-6: Keshlam's Adventurer's Guild Quarters warps +099-6,25,23,0 warp #099-6_25_23 0,0,099-1,29,17 +099-6,59,22,0 warp #099-6_59_22 0,0,099-1,77,17 +099-6,90,22,0 warp #099-6_90_22 0,0,099-1,105,9 +099-6,121,22,0 warp #099-6_121_22 0,0,099-1,91,137 +099-6,25,50,0 warp #099-6_25_50 0,0,099-1,20,116 +099-6,59,50,0 warp #099-6_59_50 0,0,099-1,97,86 +099-6,91,50,0 warp #099-6_91_50 0,0,099-1,112,127 +099-6,121,49,0 warp #099-6_121_49 0,0,099-1,64,115 +099-6,25,76,0 warp #099-6_25_76 0,0,099-1,64,73 +099-6,59,76,0 warp #099-6_59_76 0,0,099-1,42,52 +099-6,91,76,0 warp #099-6_91_76 0,0,099-1,92,45 +099-6,121,76,0 warp #099-6_121_76 0,0,099-1,34,52 +099-6,25,102,0 warp #099-6_25_102 0,0,099-1,49,130 +099-6,60,102,0 warp #099-6_60_102 0,0,099-1,113,62 +099-6,91,102,0 warp #099-6_91_102 0,0,099-1,131,79 +099-6,121,102,0 warp #099-6_121_102 0,0,099-1,72,59 +099-6,26,133,0 warp #099-6_26_133 0,0,099-1,47,93 +099-6,60,133,0 warp #099-6_60_133 0,0,099-1,102,25 +099-6,92,133,0 warp #099-6_92_133 0,0,099-1,120,45 +099-6,121,133,0 warp #099-6_121_133 0,0,099-1,97,106 diff --git a/npc/099-7/_import.txt b/npc/099-7/_import.txt new file mode 100644 index 00000000..0a53cc52 --- /dev/null +++ b/npc/099-7/_import.txt @@ -0,0 +1,2 @@ +// Map 099-7: Ruined Swamps +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/099-8/_import.txt b/npc/099-8/_import.txt new file mode 100644 index 00000000..9bf2a06f --- /dev/null +++ b/npc/099-8/_import.txt @@ -0,0 +1,2 @@ +// Map 099-8: Keshlam's Maze +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/_anchors.txt b/npc/_anchors.txt index a1421cdb..6321274a 100644 --- a/npc/_anchors.txt +++ b/npc/_anchors.txt @@ -3,51 +3,4 @@ - script __anchors__ 32767,{ OnInit: .ht = htnew(); - htput(.ht, "^ALCH", "001-2-26 32 40"); - htput(.ht, "^ALIG|^HID", "000-2-4 36 30"); - htput(.ht, "^ART", "001-1 89 86"); - htput(.ht, "^ASPH|MOOR", "009-1 53 171"); - htput(.ht, "^BLACK|SMITH", "001-2-27 35 32"); - htput(.ht, "^BOT|CHECK", "botcheck 30 30"); - htput(.ht, "^CAMP|FIRE", "008-1 55 46"); - htput(.ht, "^CANDOR", "012-1 49 114"); - htput(.ht, "^CHAP", "009-1 212 151"); - htput(.ht, "^CITY|^HALL", "001-2-7 36 41"); - htput(.ht, "^DIMOND|COVE", "008-1 106 222"); - htput(.ht, "^DRA|ISLAND", "000-1 62 111"); - htput(.ht, "^FARM|MOUB", "008-1 71 129"); - htput(.ht, "^FERMI|VOTE", "fermi 29 20"); - htput(.ht, "^FIRST|^DECK1?$", "000-2-0 23 28"); - htput(.ht, "^GARDEN", "020-1 76 99"); - htput(.ht, "^HARB|^MASTER", "001-2-16 28 32"); - htput(.ht, "^HOLD$", "000-2-2 42 31"); - htput(.ht, "^HURN", "008-1 250 109"); - htput(.ht, "^LAVA", "008-3-0 35 28"); - htput(.ht, "^LEG", "001-2-33 34 42"); - htput(.ht, "^LIB", "001-2-4 42 35"); - htput(.ht, "^LIGHT", "001-2-0 37 32"); - htput(.ht, "^LUVIA", "008-1 256 206"); - htput(.ht, "^MAGIC|ACAD", "020-1 51 119"); - htput(.ht, "^MERCH|^BANK", "001-2-19 28 30"); - htput(.ht, "^MIGGLE|SOREN", "009-1 174 95"); - htput(.ht, "^MINE", "020-1 76 237"); - htput(.ht, "^MOON", "001-2-2 40 34"); - htput(.ht, "^NARD", "000-2-3 21 28"); - htput(.ht, "^NOBLE1?$", "001-2-1 37 37"); - htput(.ht, "^NOBLE2$", "001-2-10 40 37"); - htput(.ht, "^NOBLE3$", "001-2-11 45 33"); - htput(.ht, "^NOBLE4$", "001-2-12 34 32"); - htput(.ht, "^NOBLE5$", "001-2-15 34 38"); - htput(.ht, "^OASIS", "020-1 287 246"); - htput(.ht, "^RED|PLUSH|^INN", "001-2-28 30 35"); - htput(.ht, "^ROSSY", "008-1 49 158"); - htput(.ht, "^SECOND|^DECK2$", "000-2-1 67 32"); - htput(.ht, "^SHIP2$", "001-2-21 23 28"); - htput(.ht, "^START2$", "000-0-0 26 28"); - htput(.ht, "^START3$", "000-0-1 26 28"); - htput(.ht, "^START|^BEGIN", "000-0 22 24"); - htput(.ht, "^TULIM|MARKET", "020-1 224 175"); - htput(.ht, "^VEIN", "008-3-0 87 172"); - htput(.ht, "^WARE", "001-2-18 37 31"); - htput(.ht, "^WEST|PORT", "008-1-1 52 60"); } diff --git a/npc/_import.txt b/npc/_import.txt old mode 100644 new mode 100755 index 65890740..5c4cc0f6 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -1,176 +1,131 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -@include "npc/000-0-0/_import.txt" -@include "npc/000-0-1/_import.txt" -@include "npc/000-0/_import.txt" @include "npc/000-1/_import.txt" -@include "npc/000-2-0/_import.txt" -@include "npc/000-2-1/_import.txt" -@include "npc/000-2-2/_import.txt" -@include "npc/000-2-3/_import.txt" -@include "npc/000-2-4/_import.txt" @include "npc/001-1/_import.txt" -@include "npc/001-2-0/_import.txt" -@include "npc/001-2-1/_import.txt" -@include "npc/001-2-10/_import.txt" -@include "npc/001-2-11/_import.txt" -@include "npc/001-2-12/_import.txt" -@include "npc/001-2-13/_import.txt" -@include "npc/001-2-14/_import.txt" -@include "npc/001-2-15/_import.txt" -@include "npc/001-2-16/_import.txt" -@include "npc/001-2-17/_import.txt" -@include "npc/001-2-18/_import.txt" -@include "npc/001-2-19/_import.txt" -@include "npc/001-2-2/_import.txt" -@include "npc/001-2-20/_import.txt" -@include "npc/001-2-21/_import.txt" -@include "npc/001-2-22/_import.txt" -@include "npc/001-2-23/_import.txt" -@include "npc/001-2-24/_import.txt" -@include "npc/001-2-25/_import.txt" -@include "npc/001-2-26/_import.txt" -@include "npc/001-2-27/_import.txt" -@include "npc/001-2-28/_import.txt" -@include "npc/001-2-29/_import.txt" -@include "npc/001-2-3/_import.txt" -@include "npc/001-2-30/_import.txt" -@include "npc/001-2-31/_import.txt" -@include "npc/001-2-32/_import.txt" -@include "npc/001-2-33/_import.txt" -@include "npc/001-2-34/_import.txt" -@include "npc/001-2-35/_import.txt" -@include "npc/001-2-36/_import.txt" -@include "npc/001-2-37/_import.txt" -@include "npc/001-2-38/_import.txt" -@include "npc/001-2-39/_import.txt" -@include "npc/001-2-4/_import.txt" -@include "npc/001-2-40/_import.txt" -@include "npc/001-2-41/_import.txt" -@include "npc/001-2-42/_import.txt" -@include "npc/001-2-43/_import.txt" -@include "npc/001-2-5/_import.txt" -@include "npc/001-2-6/_import.txt" -@include "npc/001-2-7/_import.txt" -@include "npc/001-2-8/_import.txt" -@include "npc/001-2-9/_import.txt" -@include "npc/001-3-0/_import.txt" -@include "npc/001-3-1/_import.txt" -@include "npc/001-3-2/_import.txt" -@include "npc/008-1-1/_import.txt" +@include "npc/001-2/_import.txt" +@include "npc/001-3/_import.txt" +@include "npc/002-1/_import.txt" +@include "npc/002-2/_import.txt" +@include "npc/002-3/_import.txt" +@include "npc/002-4/_import.txt" +@include "npc/002-5/_import.txt" +@include "npc/003-1/_import.txt" +@include "npc/003-4/_import.txt" +@include "npc/004-1/_import.txt" +@include "npc/004-3/_import.txt" +@include "npc/004-4/_import.txt" +@include "npc/004-5/_import.txt" +@include "npc/005-3/_import.txt" +@include "npc/006-1/_import.txt" +@include "npc/006-2/_import.txt" +@include "npc/006-3/_import.txt" +@include "npc/007-1/_import.txt" +@include "npc/007-2/_import.txt" @include "npc/008-1/_import.txt" -@include "npc/008-2-0/_import.txt" -@include "npc/008-2-1/_import.txt" -@include "npc/008-2-10/_import.txt" -@include "npc/008-2-11/_import.txt" -@include "npc/008-2-12/_import.txt" -@include "npc/008-2-13/_import.txt" -@include "npc/008-2-14/_import.txt" -@include "npc/008-2-15/_import.txt" -@include "npc/008-2-16/_import.txt" -@include "npc/008-2-17/_import.txt" -@include "npc/008-2-18/_import.txt" -@include "npc/008-2-19/_import.txt" -@include "npc/008-2-2/_import.txt" -@include "npc/008-2-20/_import.txt" -@include "npc/008-2-21/_import.txt" -@include "npc/008-2-22/_import.txt" -@include "npc/008-2-23/_import.txt" -@include "npc/008-2-24/_import.txt" -@include "npc/008-2-25/_import.txt" -@include "npc/008-2-26/_import.txt" -@include "npc/008-2-27/_import.txt" -@include "npc/008-2-28/_import.txt" -@include "npc/008-2-29/_import.txt" -@include "npc/008-2-3/_import.txt" -@include "npc/008-2-30/_import.txt" -@include "npc/008-2-31/_import.txt" -@include "npc/008-2-32/_import.txt" -@include "npc/008-2-4/_import.txt" -@include "npc/008-2-5/_import.txt" -@include "npc/008-2-6/_import.txt" -@include "npc/008-2-7/_import.txt" -@include "npc/008-2-8/_import.txt" -@include "npc/008-2-9/_import.txt" -@include "npc/008-3-0/_import.txt" -@include "npc/008-3-1/_import.txt" -@include "npc/008-3-2/_import.txt" -@include "npc/008-3-3/_import.txt" -@include "npc/008-3-4/_import.txt" -@include "npc/008-3-5/_import.txt" -@include "npc/008-3-6/_import.txt" @include "npc/009-1/_import.txt" -@include "npc/009-2-0/_import.txt" -@include "npc/009-2-1/_import.txt" -@include "npc/009-2-10/_import.txt" -@include "npc/009-2-11/_import.txt" -@include "npc/009-2-12/_import.txt" -@include "npc/009-2-13/_import.txt" -@include "npc/009-2-14/_import.txt" -@include "npc/009-2-15/_import.txt" -@include "npc/009-2-16/_import.txt" -@include "npc/009-2-17/_import.txt" -@include "npc/009-2-18/_import.txt" -@include "npc/009-2-2/_import.txt" -@include "npc/009-2-3/_import.txt" -@include "npc/009-2-4/_import.txt" -@include "npc/009-2-5/_import.txt" -@include "npc/009-2-6/_import.txt" -@include "npc/009-2-7/_import.txt" -@include "npc/009-2-8/_import.txt" -@include "npc/009-2-9/_import.txt" +@include "npc/009-2/_import.txt" +@include "npc/009-3/_import.txt" +@include "npc/009-4/_import.txt" +@include "npc/009-5/_import.txt" +@include "npc/009-6/_import.txt" +@include "npc/009-7/_import.txt" +@include "npc/009-8/_import.txt" +@include "npc/010-1/_import.txt" +@include "npc/010-2/_import.txt" +@include "npc/011-3/_import.txt" +@include "npc/011-4/_import.txt" +@include "npc/011-6/_import.txt" @include "npc/012-1/_import.txt" -@include "npc/012-2-1/_import.txt" -@include "npc/012-2-2/_import.txt" -@include "npc/012-2-3/_import.txt" -@include "npc/012-2-4/_import.txt" -@include "npc/012-2-5/_import.txt" -@include "npc/012-2-6/_import.txt" -@include "npc/012-2-7/_import.txt" -@include "npc/012-3-1/_import.txt" -@include "npc/012-3-2/_import.txt" -@include "npc/012-3-3/_import.txt" +@include "npc/012-3/_import.txt" +@include "npc/012-4/_import.txt" +@include "npc/013-1/_import.txt" +@include "npc/013-2/_import.txt" +@include "npc/014-1/_import.txt" +@include "npc/014-3/_import.txt" +@include "npc/015-1/_import.txt" +@include "npc/015-3/_import.txt" +@include "npc/016-1/_import.txt" +@include "npc/016-2/_import.txt" +@include "npc/017-1/_import.txt" +@include "npc/017-2/_import.txt" +@include "npc/017-3/_import.txt" +@include "npc/017-4/_import.txt" +@include "npc/017-9/_import.txt" +@include "npc/018-1/_import.txt" +@include "npc/018-2/_import.txt" +@include "npc/018-3/_import.txt" +@include "npc/019-1/_import.txt" +@include "npc/019-3/_import.txt" +@include "npc/019-4/_import.txt" @include "npc/020-1/_import.txt" -@include "npc/020-2-0/_import.txt" -@include "npc/020-2-1/_import.txt" -@include "npc/020-2-10/_import.txt" -@include "npc/020-2-11/_import.txt" -@include "npc/020-2-12/_import.txt" -@include "npc/020-2-13/_import.txt" -@include "npc/020-2-14/_import.txt" -@include "npc/020-2-15/_import.txt" -@include "npc/020-2-16/_import.txt" -@include "npc/020-2-17/_import.txt" -@include "npc/020-2-18/_import.txt" -@include "npc/020-2-19/_import.txt" -@include "npc/020-2-2/_import.txt" -@include "npc/020-2-20/_import.txt" -@include "npc/020-2-21/_import.txt" -@include "npc/020-2-22/_import.txt" -@include "npc/020-2-23/_import.txt" -@include "npc/020-2-24/_import.txt" -@include "npc/020-2-25/_import.txt" -@include "npc/020-2-26/_import.txt" -@include "npc/020-2-27/_import.txt" -@include "npc/020-2-28/_import.txt" -@include "npc/020-2-29/_import.txt" -@include "npc/020-2-3/_import.txt" -@include "npc/020-2-30/_import.txt" -@include "npc/020-2-31/_import.txt" -@include "npc/020-2-32/_import.txt" -@include "npc/020-2-33/_import.txt" -@include "npc/020-2-34/_import.txt" -@include "npc/020-2-4/_import.txt" -@include "npc/020-2-5/_import.txt" -@include "npc/020-2-6/_import.txt" -@include "npc/020-2-7/_import.txt" -@include "npc/020-2-8/_import.txt" -@include "npc/020-2-9/_import.txt" +@include "npc/020-2/_import.txt" +@include "npc/020-3/_import.txt" +@include "npc/021-3/_import.txt" +@include "npc/023-1/_import.txt" +@include "npc/023-2/_import.txt" +@include "npc/023-3/_import.txt" +@include "npc/025-1/_import.txt" +@include "npc/025-3/_import.txt" +@include "npc/025-4/_import.txt" +@include "npc/026-1/_import.txt" +@include "npc/026-2/_import.txt" +@include "npc/027-1/_import.txt" +@include "npc/027-2/_import.txt" +@include "npc/027-3/_import.txt" +@include "npc/027-4/_import.txt" +@include "npc/027-5/_import.txt" +@include "npc/027-6/_import.txt" +@include "npc/027-7/_import.txt" +@include "npc/027-8/_import.txt" +@include "npc/028-1/_import.txt" +@include "npc/028-3/_import.txt" +@include "npc/029-1/_import.txt" +@include "npc/029-2/_import.txt" +@include "npc/029-3/_import.txt" +@include "npc/029-4/_import.txt" +@include "npc/030-1/_import.txt" +@include "npc/030-2/_import.txt" +@include "npc/030-3/_import.txt" +@include "npc/030-4/_import.txt" +@include "npc/031-1/_import.txt" +@include "npc/031-2/_import.txt" +@include "npc/031-3/_import.txt" +@include "npc/031-4/_import.txt" +@include "npc/032-3/_import.txt" +@include "npc/033-1/_import.txt" +@include "npc/034-1/_import.txt" +@include "npc/034-2/_import.txt" +@include "npc/035-2/_import.txt" +@include "npc/036-2/_import.txt" +@include "npc/041-1/_import.txt" +@include "npc/042-1/_import.txt" +@include "npc/043-1/_import.txt" +@include "npc/043-3/_import.txt" +@include "npc/043-4/_import.txt" +@include "npc/045-1/_import.txt" +@include "npc/046-1/_import.txt" +@include "npc/046-3/_import.txt" +@include "npc/047-1/_import.txt" +@include "npc/047-3/_import.txt" +@include "npc/048-2/_import.txt" +@include "npc/051-1/_import.txt" +@include "npc/051-3/_import.txt" +@include "npc/052-1/_import.txt" +@include "npc/052-2/_import.txt" +@include "npc/055-1/_import.txt" +@include "npc/055-3/_import.txt" +@include "npc/056-2/_import.txt" +@include "npc/057-1/_import.txt" +@include "npc/069-2/_import.txt" +@include "npc/070-1/_import.txt" +@include "npc/070-3/_import.txt" +@include "npc/099-1/_import.txt" +@include "npc/099-2/_import.txt" +@include "npc/099-3/_import.txt" +@include "npc/099-4/_import.txt" +@include "npc/099-5/_import.txt" +@include "npc/099-6/_import.txt" +@include "npc/099-7/_import.txt" +@include "npc/099-8/_import.txt" @include "npc/botcheck/_import.txt" -@include "npc/fermi/_import.txt" -@include "npc/marine-2/_import.txt" -@include "npc/marine/_import.txt" -@include "npc/sec_pri/_import.txt" -@include "npc/test/_import.txt" -@include "npc/testbg/_import.txt" "npc/_anchors.txt", diff --git a/npc/annuals/check_time.txt b/npc/annuals/check_time.txt new file mode 100755 index 00000000..74980e9c --- /dev/null +++ b/npc/annuals/check_time.txt @@ -0,0 +1,46 @@ + +function script GetEventTime { + $@month = gettime(6); + $@day = gettime(5); + + if ($@start_month > $@end_month) + goto L_YearWrap; + goto L_Normal; + +L_Normal: + if(($@month < $@start_month) + || ($@month == $@start_month && $@day < $@start_day)) + goto L_NoEventTime; + if(($@month > $@end_month) + || ($@month == $@end_month && $@day > $@end_day)) + goto L_NoEventTime; + if(($@month > $@reward_start_month) + || ($@month == $@reward_start_month && $@day >= $@reward_start_day)) + goto L_RewardTime; + goto L_EventTime; + +L_YearWrap: + if(($@month == $@reward_start_month && $@day >= $@reward_start_day + && ($@day <= $@end_day && $@reward_start_month == $@end_month + || !($@reward_start_month == $@end_month))) + || ($@month == $@end_month && $@day <= $@end_day + && ($@day >= $@reward_start_day && $@reward_start_month == $@end_month + || !($@reward_start_month == $@end_month))) + || ($@month < $@end_month && $@month > $@reward_start_month)) + goto L_RewardTime; + if(($@month >= $@start_month) || ($@month <= $@end_month && $@day <= $@reward_start_day)) + goto L_EventTime; + goto L_NoEventTime; + +L_NoEventTime: + $@event_time = 0; + return; + +L_EventTime: + $@event_time = 1; + return; + +L_RewardTime: + $@event_time = 2; + return; +} diff --git a/npc/annuals/fathertime.txt b/npc/annuals/fathertime.txt new file mode 100755 index 00000000..e2760d49 --- /dev/null +++ b/npc/annuals/fathertime.txt @@ -0,0 +1,15 @@ +017-9,26,28,0 script #HolidayConfig NPC32767,{ + end; + +OnInit: + if (debug >= 2) end; + donpcevent strnpcinfo(0) + "::OnTimer20000"; + end; + +OnTimer20000: + donpcevent "#XmasConfig::OnCommandRestartQuest"; + donpcevent "#HalloweenConfig::OnCommandRestartQuest"; + donpcevent "Easter Eggs::OnCheckEaster"; + initnpctimer; + end; +} diff --git a/npc/annuals/halloween/config.txt b/npc/annuals/halloween/config.txt new file mode 100755 index 00000000..ddbc7971 --- /dev/null +++ b/npc/annuals/halloween/config.txt @@ -0,0 +1,285 @@ + + + + + + + +- script #HalloweenConfig NPC32767,{ + end; + +OnCommandRestartQuest: + goto L_Main; + +OnInit: + goto L_Main; + +L_Main: + // Halloween Key Identifier Set through Botcheck Debug + if(!($HALLOWEEN_TIME_KEY) || (getarraysize($HALLOWEEN_TIME_KEY) != 6)) + setarray $HALLOWEEN_TIME_KEY, 10,10,11,24,2,gettime(7); + if(($HALLOWEEN_TIME_KEY[0] == 0) || ($HALLOWEEN_TIME_KEY[0] > 12)) + goto L_HalloweenError; + if(($HALLOWEEN_TIME_KEY[1] == 0) || ($HALLOWEEN_TIME_KEY[1] > 12)) + goto L_HalloweenError; + if(($HALLOWEEN_TIME_KEY[2] == 0) || ($HALLOWEEN_TIME_KEY[2] > 12)) + goto L_HalloweenError; + if(($HALLOWEEN_TIME_KEY[3] == 0) || ($HALLOWEEN_TIME_KEY[3] > 31)) + goto L_HalloweenError; + if(($HALLOWEEN_TIME_KEY[4] == 0) || ($HALLOWEEN_TIME_KEY[4] > 31)) + goto L_HalloweenError; + if($HALLOWEEN_TIME_KEY[5] == 0) + goto L_HalloweenError; + + // Event Runs until Reward Period. + // Month Start/End + $@halloween_start_month = $HALLOWEEN_TIME_KEY[0]; + $@halloween_reward_start_month = $HALLOWEEN_TIME_KEY[1]; + $@halloween_end_month = $HALLOWEEN_TIME_KEY[2]; + + // Reward Day Start/End + $@halloween_reward_start_day = $HALLOWEEN_TIME_KEY[3]; + $@halloween_reward_end_day = $HALLOWEEN_TIME_KEY[4]; + + // Time Settings + $@halloween_no_event_time = 0; + $@halloween_event_time = 1; + $@halloween_reward_time = 2; + + // How many, maximum is 8 + $@halloween_memory_count = 8; + // Level to go trick-or-treating + $@halloween_min_level = 10; + + // Number of trick and treats completed to get charm. + $@halloween_charm_count = 10; + $@halloween_got_charm_reward = (1 << 17); + setarray $@halloween_big_reward, 905, 1175; + $@halloween_got_big_reward = (1 << 16); + setarray $@halloween_sweets, + 534, // OrangeCupcake + 737, // ChocolateCake + 510, // Candy + 513, // Cake + 509, // ChocolateBar + 519, // CherryCake + 736, // WhiteCake + 738, // OrangeCake + 739, // AppleCake + 3006, // TonoriDelight + 3007, // Marshmallow + 3009, // JellySkull + 3010, // CandyPumpkin + 838, // CranberryLollipop + 839, // GrapeLollipop + 840; // OrangeLollipop + $@halloween_sweets_num = getarraysize($@halloween_sweets); + + setarray $@halloween_mask_IDs, 678, 679, 1221, 634, 615, 639, 769, 801, 1218, 1276, 1277, 1279, 4027; + setarray $@halloween_scare_factors, 2, 4, 4, 4, 2, 3, 2, 2, 1, 3, 2, 4, 4; + + if (getarraysize($@halloween_mask_IDs) != getarraysize($@halloween_scare_factors)) + goto L_HalloweenError; + // temporary counter + $@n = 0; + + $@halloween_npc_caretaker = $@n; + $@halloween_npc_names$[$@n] = "[Caretaker]"; + $@halloween_greetings$[$@n] = "\"Alright, come on then. Show me your trick.\""; + $@halloween_trick_notscary$[$@n] = "Trick? You must have misheard me. I've come because the Government needs to build a road through your house."; + $@halloween_react_notscary$[$@n] = "\"And?\""; + $@halloween_trick_scary$[$@n] = "You look pretty deceased to me, old man. Undead must die! Yaah!"; + $@halloween_react_scary$[$@n] = "\"Now listen here, I'm as alive as you - oh. Say, that was a good trick!\""; + $@halloween_trick_veryscary$[$@n] = "Your wife... she's - she's - she's DEAD!"; + $@halloween_react_veryscary$[$@n] = "\"But... I live here! My wife l... is dead here. You can't - oh. I DIDN'T mishear you. You really had me fooled!\""; + + $@n = $@n + 1; + + $@halloween_npc_eurni = $@n; + $@halloween_npc_names$[$@n] = "[Eurni the Surgeon]"; + $@halloween_greetings$[$@n] = "\"Oh, right.\""; + $@halloween_trick_notscary$[$@n] = "I paid good money for your services, and when I get home I find that now I'm not a man OR a woman..."; + $@halloween_react_notscary$[$@n] = "\"Heheh, sucks, buddy. But there's always a risk.\""; + $@halloween_trick_scary$[$@n] = "Look out! A scorpion!"; + $@halloween_react_scary$[$@n] = "\"Where? Darn things, I think they're what keep scaring away my customers.\""; + $@halloween_trick_veryscary$[$@n] = "I know about your hobby of performing numerous Sex changes on yourself."; + $@halloween_react_veryscary$[$@n] = "\"Shut up! Look, will you hold your tongue if I give you more treats...?\""; + + $@n = $@n + 1; + + $@halloween_npc_george = $@n; + $@halloween_npc_names$[$@n] = "[George the Pirate]"; + $@halloween_greetings$[$@n] = "\"Shiver me timbers! What do ye mean?\""; + $@halloween_trick_notscary$[$@n] = "Well... I do a trick, and then... you give me a treat..."; + $@halloween_react_notscary$[$@n] = "\"Arrrrh, I knew what ye meant, to be sure! I were just kidding with ye, pretending to be a crazy old pirate! Arrrrh!\""; + $@halloween_trick_scary$[$@n] = "Your eyepatch is on the wrong eye!"; + $@halloween_react_scary$[$@n] = "\"Arrrrh, so it is! Ta for pointing it out, mate - wait, no it isn't! Harhar, what a good trick!\""; + $@halloween_trick_veryscary$[$@n] = "By the powers, ye're a daft landlubber to be sure, ye barnacle-ridden swab!"; + $@halloween_react_veryscary$[$@n] = "\"Arrrrh, ye scurvy dog! I'm sure my first mate will return with the ship eventually.\""; + + $@n = $@n + 1; + + $@halloween_npc_inac = $@n; + $@halloween_npc_names$[$@n] = "[Inac]"; + $@halloween_greetings$[$@n] = "\"Oh, yes?\""; + $@halloween_trick_notscary$[$@n] = "Yes, we monsters moved into the tunnels... and now we're coming out... for revenge!"; + $@halloween_react_notscary$[$@n] = "\"Haha! That's the worse trick I've seen today.\""; + $@halloween_trick_scary$[$@n] = "One of those monsters you mentioned is crawling out of the well!"; + $@halloween_react_scary$[$@n] = "\"He IS? Where!? Aah! Oh. You were just tricking, right? Hahaha, that was good, I really believed you.\""; + $@halloween_trick_veryscary$[$@n] = "Yeah, but it's all fossil water. One day it's gonna dry up!"; + $@halloween_react_veryscary$[$@n] = "\"Fossil water? You mean it's turned to STONE? But you can't drink - oh... you were just tricking, right? You WEREN'T? Aaaah!\""; + + $@n = $@n + 1; + + $@halloween_npc_kfahr = $@n; + $@halloween_npc_names$[$@n] = "[Kfahr the Warrior]"; + $@halloween_greetings$[$@n] = "\"Ah, yes!\" He rubs his hands. \"Trick away, then!\""; + $@halloween_trick_notscary$[$@n] = "Meh... I'm only trick-or-treating you to avoid listening to your BORING stories."; + $@halloween_react_notscary$[$@n] = "\"Boring?\" He grins. \"You must be mistaking me for someone else.\""; + $@halloween_trick_scary$[$@n] = "Did you hear the bad news already? They made up a law prohibiting to serve alcoholic drinks! That means no more beer!"; + $@halloween_react_scary$[$@n] = "\"What? But- but- why do they- oh, you tricked me. I was about to really get worried for a moment.\""; + $@halloween_trick_veryscary$[$@n] = "Have you heard? Tulimshar was destroyed by a giant Desert Worm!"; + $@halloween_react_veryscary$[$@n] = "\"What!?\" Kfahr stares. \"And no one called for me? This is appalling! But - what? That was your trick? Hm, nice one. You almost had me fooled!\""; + + $@n = $@n + 1; + + $@halloween_npc_nurse = $@n; + $@halloween_npc_names$[$@n] = "[Nurse]"; + $@halloween_greetings$[$@n] = "\"I don't know why I let the Mayor trick me into this... well, go on then.\""; + $@halloween_trick_notscary$[$@n] = "I ate too much Hallowe'en candy, now I'm sick!"; + $@halloween_react_notscary$[$@n] = "\"Well, no one's to blame but yourself, you know. Just make sure you don't eat any more.\""; + $@halloween_trick_scary$[$@n] = "Hurnscald has been struck by plague! You must come and tend to the dying!"; + $@halloween_react_scary$[$@n] = "\"But I don't know how to deal with plague! Oh no! You must get the Doctor! Unless... you were just tricking me! Whew, that's a relief!\""; + $@halloween_trick_veryscary$[$@n] = "The Doctor asked me to tell you that he doesn't want to see you any more."; + $@halloween_react_veryscary$[$@n] = "\"What? But we were getting it on so well. I mean, getting on so well! Oh... that was your trick! Dear me, I believed you!\""; + + $@n = $@n + 1; + + $@halloween_npc_pachua = $@n; + $@halloween_npc_names$[$@n] = "[Chief Pachua]"; + $@halloween_greetings$[$@n] = "\"Ah, the strange custom the Government man told me about.\""; + $@halloween_trick_notscary$[$@n] = "Look out! A scorpion!"; + $@halloween_react_notscary$[$@n] = "\"Don't mind him, he won't hurt you. Er... so I give you sweets now, or what?\""; + $@halloween_trick_scary$[$@n] = "Yes, the ritual giving of treats... LOTS of treats... or else!"; + $@halloween_react_scary$[$@n] = "\"Alright, here you go.\""; + $@halloween_trick_veryscary$[$@n] = "Yes, the ritual giving of treats followed by the sacrifice of the treat-giver..."; + $@halloween_react_veryscary$[$@n] = "\"I do like a good sacrifice, but less so if it's me! I'll give you extra sweets if you forget the sacrifice.\""; + + $@n = $@n + 1; + + $@halloween_npc_yanis = $@n; + $@halloween_npc_names$[$@n] = "[Yanis]"; + $@halloween_greetings$[$@n] = "\"I am employed by the Tonori Government, make sure you abide the regulations we wrote down for Trick-or-Treaters this year...\""; + $@halloween_trick_notscary$[$@n] = "Of course I will... not!"; + $@halloween_react_notscary$[$@n] = "\"Hm!\""; + $@halloween_trick_scary$[$@n] = "Regulations, smegulations. The Tonori Government can go suck a lollipop for all I care!"; + $@halloween_react_scary$[$@n] = "\"!? How dare you - oh, that was your trick! You did have me worried for a moment...\""; + $@halloween_trick_veryscary$[$@n] = "What regulations?"; + $@halloween_react_veryscary$[$@n] = "\"You mean you haven't even READ - I don't believe - this is ghastly - I - oh... that was your trick... gosh, I believed you for a minute! I thought you really hadn't read them!\""; + + $@n = $@n + 1; + + $@halloween_npc_vincent = $@n; + $@halloween_npc_names$[$@n] = "[Vincent]"; + $@halloween_greetings$[$@n] = "\"Ooh, okay! Trick away!\""; + $@halloween_trick_notscary$[$@n] = "Look out! A scorpion!"; + $@halloween_react_notscary$[$@n] = "\"They're everywhere in this desert! Don't worry about them.\""; + $@halloween_trick_scary$[$@n] = "Hey, that action figure you're building just CAME TO LIFE!"; + $@halloween_react_scary$[$@n] = "\"Really? Cool! Where? What? You were tricking me? WAAAH!\""; + $@halloween_trick_veryscary$[$@n] = "Wow, this is a neat action figure! Haha, check out its moves! Oops! Never mind, I'm sure it'll glue back on."; + $@halloween_react_veryscary$[$@n] = "\"My Bug Leg action figure! You broke it!\""; + + $@n = $@n + 1; + + $@halloween_npc_weellos = $@n; + $@halloween_npc_names$[$@n] = "[Weellos]"; + $@halloween_greetings$[$@n] = "\"Trick me, then!\""; + $@halloween_trick_notscary$[$@n] = "Look out! A scorpion!"; + $@halloween_react_notscary$[$@n] = "\"Pesky things, I know, but they're everywhere around here...\""; + $@halloween_trick_scary$[$@n] = "Actually, it's a fake. It was built just ten years ago."; + $@halloween_react_scary$[$@n] = "\"No! But I've read all the accounts... oh, haha! Very funny!\""; + $@halloween_trick_veryscary$[$@n] = "They say the earthquake ruined the foundations of this building, and that it's going to fall down."; + $@halloween_react_veryscary$[$@n] = "\"B-but it's one of the oldest buildings around! And... wait, I just remembered that it was designed to be earthquake-proof. You were tricking me!\""; + + $@n = $@n + 1; + + $@halloween_npc_zack = $@n; + $@halloween_npc_names$[$@n] = "[Zack]"; + $@halloween_greetings$[$@n] = "\"I thought no one would find me down here, but I'm glad I was wrong! Let's see your trick, then.\""; + $@halloween_trick_notscary$[$@n] = "You think this is something to do with Hallowe'en? Hands up!"; + $@halloween_react_notscary$[$@n] = "\"Heh... That was ok.\""; + $@halloween_trick_scary$[$@n] = "And now that I've found you, you die!"; + $@halloween_react_scary$[$@n] = "\"Aah! What did I do? Oh - wait - I see! That was a good one!\""; + $@halloween_trick_veryscary$[$@n] = "Yes, I have found you. After all these years."; + $@halloween_react_veryscary$[$@n] = "\"Uncle Henry? But how, I covered my tracks so well! I never told anyone that - wait... that was your trick! You had me worried for a minute!\""; + + $@n = $@n + 1; + + $@halloween_npc_kimarr = $@n; + $@halloween_npc_names$[$@n] = "[Kimarr]"; + $@halloween_greetings$[$@n] = "\"Many have tried to scare me, all have failed. Try your best, but the frozen wastes contain all manner of horrors.\""; + $@halloween_trick_notscary$[$@n] = "Look out Yetis!"; + $@halloween_react_notscary$[$@n] = "\"You will have to do better then that.\""; + $@halloween_trick_scary$[$@n] = "Hrmm Is that your wife calling you?"; + $@halloween_react_scary$[$@n] = "\"What? You haven't se... wait a second. Ok that was good.\""; + $@halloween_trick_veryscary$[$@n] = "The Kaizeian government declared fluffies an endangered species."; + $@halloween_react_veryscary$[$@n] = "\"NOooOOOooo!!! The Hunt!!! ... wait a second, you city folk are slick.\""; + + $@n = $@n + 1; + + $@halloween_npc_nikolai = $@n; + $@halloween_npc_names$[$@n] = "[Nikolai]"; + $@halloween_greetings$[$@n] = "\"Let us see if you are scarier then Kfahr's Fairy Tales.\""; + $@halloween_trick_notscary$[$@n] = "Your going over their to the store."; + $@halloween_react_notscary$[$@n] = "\"*You're* *there* Ugh, thats more annoying then scary.\""; + $@halloween_trick_scary$[$@n] = "Whats White, Blue and slimey? I don't know either but it's right behind you."; + $@halloween_react_scary$[$@n] = "\"More Slimes, Oh no the books again. O you tricked me, good one.\""; + $@halloween_trick_veryscary$[$@n] = "I hope you don't mind I used some of this kindling you have on the shelves to start a fire."; + $@halloween_react_veryscary$[$@n] = "\"AHHHHH!!!! You burned our books!!! *GAH* ... *Eye Twitch*\""; + + $@n = $@n + 1; + + $@halloween_npc_vellamo = $@n; + $@halloween_npc_names$[$@n] = "[Vellamo]"; + $@halloween_greetings$[$@n] = "\"Ahh yes, more candy related ritual.\""; + $@halloween_trick_notscary$[$@n] = "Candy? No, I want Parsley."; + $@halloween_react_notscary$[$@n] = "\"Parsley? is this some kind of monster? I'm not getting this scare at all\""; + $@halloween_trick_scary$[$@n] = "Chief Warrick says he needs the candy inventory by end of day."; + $@halloween_react_scary$[$@n] = "\"Ahh, no! I forgot to put a cover sheet on my Candy Production and Storage report.\""; + $@halloween_trick_veryscary$[$@n] = "I'm sorry, but your doctor says your diabetic."; + $@halloween_react_veryscary$[$@n] = "\"Darkest day of my life, blacker then the darkest chocolate.\""; + + $@halloween_num_npcs = $@n + 1; + $@halloween_all_npc_bits = -1 << (32 - $@halloween_num_npcs); + + $@n = 0; + + // Age to go trick-or-treating (1 week before the start) + if ((gettime(6) >= $@halloween_start_month) || (gettime(6) <= $@halloween_end_month)) + $@halloween_min_age = ((gettime(5) + 7)*86400); + if (gettime(6) == $@halloween_reward_start_month) + $@halloween_min_age = ((gettime(5) + 38)*86400); + + $@start_month = $@halloween_start_month; + $@end_month = $@halloween_end_month; + $@start_day = 1; + $@end_day = $@halloween_reward_end_day; + $@reward_start_month = $@halloween_reward_start_month; + $@reward_start_day = $@halloween_reward_start_day; + + callfunc "GetEventTime"; + $@halloween_time = $@event_time; + + if($@halloween_time == 0 && $HALLOWEEN_TIME_KEY[5] < gettime(7)) + setarray $HALLOWEEN_TIME_KEY, $HALLOWEEN_TIME_KEY[0],$HALLOWEEN_TIME_KEY[1],$HALLOWEEN_TIME_KEY[2],$HALLOWEEN_TIME_KEY[3],$HALLOWEEN_TIME_KEY[4],gettime(7); + goto L_Return; + +L_Return: + callfunc "SpawnMunro"; + callfunc "ReplaceTrees"; + end; + +L_HalloweenError: + debugmes "Halloween is Dead Jim."; + mapexit; +} diff --git a/npc/annuals/halloween/debug.txt b/npc/annuals/halloween/debug.txt new file mode 100755 index 00000000..9d7e3650 --- /dev/null +++ b/npc/annuals/halloween/debug.txt @@ -0,0 +1,138 @@ + +function script HalloweenDebug { + if(debug) + goto L_Debug; + goto L_Live; + +L_Live: + menu + "Debug Time", L_DebugTime, + "Set Old Event Flag.", L_LastReset, + "Halloween Time Key Change.", L_HalloweenTimeKey, + "Reset NPC's mask memory", L_ResetMask, + "Nothing.", L_close; + +L_Debug: + menu + "Debug Time", L_DebugTime, + "Set Old Event Flag.", L_LastReset, + "Halloween Time Key Change.", L_HalloweenTimeKey, + "Quest State", L_QuestState, + "Set NPC trick or treat flag", L_SetTrickOrTreats, + "Reset my quest state", L_ResetMe, + "Reset NPC's mask memory", L_ResetMask, + "Nothing.", L_close; + +L_DebugTime: + mes "--Sever--"; + mes "Event State: " + $@halloween_time; + mes "Event Start" + $HALLOWEEN_TIME_KEY[0] + "/1"; + mes "Reward Start: " + $HALLOWEEN_TIME_KEY[1] + "/" + $HALLOWEEN_TIME_KEY[3]; + mes "Event End: " + $HALLOWEEN_TIME_KEY[2] + "/" + $HALLOWEEN_TIME_KEY[4]; + mes "Event Time Key (year (CCYY)): " + $HALLOWEEN_TIME_KEY[5]; + next; + goto L_Debug; + +L_LastReset: + HALLOWEENTIME = 255; + HALLOWEENYEAR = 2012; + goto L_Debug; + +L_HalloweenTimeKey: + mes "Halloween Time Key Change."; + mes "Start Month?"; + input @halloween_time_key_smonth; + if((@halloween_time_key_smonth == 0) || (@halloween_time_key_smonth > 12)) + goto L_HalloweenError; + mes "Reward Start Month?"; + input @halloween_time_key_srmonth; + if((@halloween_time_key_srmonth == 0) || (@halloween_time_key_srmonth > 12)) + goto L_HalloweenError; + mes "End Month?"; + input @halloween_time_key_emonth; + if((@halloween_time_key_emonth == 0) || (@halloween_time_key_emonth > 12)) + goto L_HalloweenError; + mes "Reward Start Day?"; + input @halloween_time_key_rsday; + if((@halloween_time_key_rsday == 0) || (@halloween_time_key_rsday > 31)) + goto L_HalloweenError; + mes "Reward End Day?"; + input @halloween_time_key_reday; + if((@halloween_time_key_reday == 0) || (@halloween_time_key_reday > 31)) + goto L_HalloweenError; + mes "Time Key (CCYY) "; + input @halloween_time_key_year; + goto L_SetNewKey; + +L_HalloweenError: + mes "Incorrect Entry. Try again."; + next; + goto L_Debug; + +L_SetNewKey: + setarray $HALLOWEEN_TIME_KEY, @halloween_time_key_smonth, @halloween_time_key_srmonth, @halloween_time_key_emonth, @halloween_time_key_rsday, @halloween_time_key_reday, @halloween_time_key_year; + donpcevent "#HalloweenConfig::OnCommandRestartQuest"; + goto L_Debug; + +L_QuestState: + mes "Karma: " + (HALLOWEENTIME & 65535); + @big_reward_status$ = " No."; + if (HALLOWEENTIME & $@halloween_got_big_reward) + @big_reward_status$ = " Yes."; + mes "Big Reward: " + @big_reward_status$; + @charm_reward_status$ = " No."; + if (HALLOWEENTIME & $@halloween_got_charm_reward) + @charm_reward_status$ = " Yes."; + mes "Charm Reward:" + @charm_reward_status$; + @npc_check_loop = 0; + goto L_NpcCheckLoop; + +L_NpcCheckLoop: + @display_mes$ = "NPC ID " + @npc_check_loop + ":" + $@halloween_npc_names$[@npc_check_loop]; + @npc_status$ = " Needed"; + if (HALLOWEENTIME & (1 << (31 - @npc_check_loop))) + @npc_status$ = " Complete"; + @display_mes$ = @display_mes$ + @npc_status$; + mes @display_mes$; + @display_mes$ = ""; + goto L_NpcCheckInc; + +L_NpcCheckInc: + @npc_check_loop = (@npc_check_loop + 1); + if (@npc_check_loop >= getarraysize($@halloween_npc_names$)) + goto L_TrickOrTreatCount; + goto L_NpcCheckLoop; + +L_TrickOrTreatCount: + callfunc "TrickOrTreatTally"; + mes @npc_tally + " out of 14"; + next; + goto L_Debug; + +L_SetTrickOrTreats: + mes "Enter NPC to set"; + input @halloween_npc_id; + HALLOWEENTIME = HALLOWEENTIME | (1 << (31 - @halloween_npc_id)); + goto L_Debug; + +L_ResetMe: + HALLOWEENTIME = 0; + HALLOWEENYEAR = $HALLOWEEN_TIME_KEY[5]; + goto L_Debug; + +L_ResetMask: + mes "Enter NPC to reset:"; + input @halloween_npc_id; + $@halloween_maskmemory[8 * @halloween_npc_id] = 0; + goto L_Debug; + +L_close: + @tmp = 0; + @Mask = 0; + @karma = 0; + @loop = 0; + @menu = 0; + @halloween_npc_id = 0; + close2; + return; +} diff --git a/npc/annuals/halloween/munro.txt b/npc/annuals/halloween/munro.txt new file mode 100755 index 00000000..93d01764 --- /dev/null +++ b/npc/annuals/halloween/munro.txt @@ -0,0 +1,46 @@ +026-1,24,37,0 script Munro NPC183,{ + callfunc "HalloweenCheckOld"; + callfunc "TrickOrTreatTally"; + if (($@halloween_time == $@halloween_reward_time) && (@npc_tally >= $@halloween_charm_count) && !(HALLOWEENTIME & $@halloween_got_charm_reward)) + goto L_Halloween; + goto L_NoReward; + +L_NoReward: + mes "[Munro]"; + mes "\"Greetings mortal.\""; + next; + mes "\"Once again we come to that time of year when the veil is thin\""; + next; + mes "\"All those who have passed on can part the veil to return.\""; + next; + mes "\"A time to celebrate our ancestors and chase evil away.\""; + next; + mes "\"Celebrate the holiday with me and I will reward you later.\""; + goto L_Exit; + +L_Halloween: + mes "[Munro]"; + mes "\"You have shown to have the Halloween spirit. Take this charm.\""; + HALLOWEENTIME = HALLOWEENTIME | $@halloween_got_charm_reward; + getitem "SkeletonCharm",1; + goto L_Exit; + +L_Exit: + close; +} +function script SpawnMunro { + if ($@halloween_time) + goto L_EnableMunro; + goto L_DisableMunro; + +L_EnableMunro: + enablenpc "Munro"; + goto L_Return; + +L_DisableMunro: + disablenpc "Munro"; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/annuals/halloween/trick_or_treat.txt b/npc/annuals/halloween/trick_or_treat.txt new file mode 100755 index 00000000..fa4eb6f4 --- /dev/null +++ b/npc/annuals/halloween/trick_or_treat.txt @@ -0,0 +1,322 @@ +function script TrickOrTreat { + callfunc "HalloweenCheckOld"; + if ($@halloween_time) + goto L_Halloween; + goto L_QuickReturn; + +L_Halloween: + if ((gettimetick(2)-TUT_var < $@halloween_min_age) || (BaseLevel < $@halloween_min_level)) //player must be created at least 1 weeks ago + goto L_QuickReturn; + menu + "Trick or Treat", L_HWQuest, + "[Go to normal NPC dialog]", L_QuickReturn; + +L_HWQuest: + @Mask = getequipid(equip_head); + goto L_Begin; + +L_Begin: + @karma = (HALLOWEENTIME & 65535); + if (@Mask > 0) + goto L_WearingMask; + goto L_NoMask; + +L_WearingMask: + // set the scare factor of the equipped mask + @Mask_index = 0; + @scare_factor = 1; + goto L_MaskLoop; + +L_MaskLoop: + if ($@halloween_mask_IDs[@Mask_index] == @Mask) + goto L_FoundMask; + @Mask_index = @Mask_index + 1; + if ($@halloween_mask_IDs[@Mask_index]) + goto L_MaskLoop; + // not a mask in the list + @Mask = 0; + goto L_MaskDone; + +L_FoundMask: + @scare_factor = $@halloween_scare_factors[@Mask_index]; + if (@Mask != 616) + goto L_MaskDone; + mes "\"Aaargh... Gross! This is sick! I can't even look at your face...\""; + goto L_MaskDone; + +L_MaskDone: + @Mask_index = 0; + // check if the mask is in the memory + @loop = 0; + // Note: we don't handle remembered faces until they get their candy + if (!@Mask) + goto L_MaskMemoryNo; + // check if the mask is remembered + goto L_MaskMemoryCheck; + +L_MaskMemoryCheck: + @tmp = $@halloween_maskmemory[8 * @halloween_npc_id + @loop]; + if (!@tmp) + goto L_MaskMemoryNo; + if (@tmp == @Mask) + goto L_MaskMemoryYes; + @loop = @loop + 1; + if (@loop != $@halloween_memory_count) + goto L_MaskMemoryCheck; + goto L_MaskMemoryNo; + +L_MaskMemoryYes: + // not necessarily true + mes "\"I remember you, " + getitemlink(getequipid(equip_head)) + " person. No more treats for you!\""; + goto L_close; + +L_MaskMemoryNo: + // player will probably get treats + @loop = 0; + @sweets_types = 0; + goto L_Count_Sweets; + +L_Count_Sweets: + if ($@halloween_sweets[@loop] == 0) + goto L_Check_Inventory; + if (countitem($@halloween_sweets[@loop])) + @sweets_types = @sweets_types + 1; + @loop = @loop + 1; + goto L_Count_Sweets; + +L_Check_Inventory: + getinventorylist; + if (@inventorylist_count + (@loop - @halloween_invy) > 100) + goto L_Full_Inventory; + if (@Mask) + goto L_Check_Karma; + // check if the player's face is remembered + if (HALLOWEENTIME & (1 << (31 - @halloween_npc_id))) + goto L_Remember_Face; + goto L_Tricking_Trick_or_Treat; + +L_Check_Karma: + // NPC Cheater detection starts after max NPCs hit + if (rand($@halloween_num_npcs, 65535) <= @karma) + goto L_Cheater; + // NPC Cheater detection engages at 48 Trick or Treats + if (@karma >= 48) + goto L_Cheater; + if (HALLOWEENTIME & $@halloween_got_big_reward) + goto L_Tricking_Trick_or_Treat; + // assert: @karma < $@halloween_num_npcs + if (rand($@halloween_num_npcs - @karma)) + goto L_Tricking_Trick_or_Treat; + mes "\"All this candy isn't healthy, here take this to have a break from it.\""; + getitem $@halloween_big_reward[rand(getarraysize($@halloween_big_reward))], 1; + HALLOWEENTIME = HALLOWEENTIME | $@halloween_got_big_reward; + // you get the big reward first, then the main treats + // otherwise it would be too complicated, and/or possibly unfair + goto L_Tricking_Trick_or_Treat; + +L_Cheater: + mes "\"I recognize you despite your mask, you have been taking sweets you do not deserve.\""; + if (@karma != 65535) + HALLOWEENTIME = HALLOWEENTIME + 1; + goto L_close; + +L_Remember_Face: + // mes "You've been here before; I remember your face"; + mes "\"I remember your face, " + strcharinfo(0) + ". No more treats for you!\""; + goto L_close; + +L_Tricking_Trick_or_Treat: + // moved above + mes $@halloween_npc_names$[@halloween_npc_id]; + mes $@halloween_greetings$[@halloween_npc_id]; + next; + // TODO: should we randomize these? (in a subsequent commit) + menu + $@halloween_trick_notscary$[@halloween_npc_id], L_Tricking_Notscary, + $@halloween_trick_scary$[@halloween_npc_id], L_Tricking_Scary, + $@halloween_trick_veryscary$[@halloween_npc_id], L_Tricking_Veryscary; + +L_Tricking_Notscary: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes $@halloween_react_notscary$[@halloween_npc_id]; + goto L_Tricking_Reward; + +L_Tricking_Scary: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes $@halloween_react_scary$[@halloween_npc_id]; + @scare_factor = @scare_factor * 2; + goto L_Tricking_Reward; + +L_Tricking_Veryscary: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes $@halloween_react_veryscary$[@halloween_npc_id]; + @scare_factor = @scare_factor * 3; + goto L_Tricking_Reward; + +L_Tricking_Reward: + next; + if (@karma >= 16) + @scare_factor = rand(@scare_factor / 2, @scare_factor); + if (@karma >= 24) + @scare_factor = rand(@scare_factor / 3, @scare_factor); + if (@scare_factor < 1) + @scare_factor = 1; + goto L_Tricking_Reward_Loop; + +L_Tricking_Reward_Loop: + @random = rand($@halloween_sweets_num); + setarray @getitem_ids, $@halloween_sweets[@random]; + setarray @getitem_counts, 1; + callfunc "CheckInventory"; + if (@check_fail) + @scare_factor = 0; + if (!@scare_factor) + goto L_Tricking_End; + // NOTE: it gives out one piece at a time, but can loop several times + getitem $@halloween_sweets[@random], 1; + @scare_factor = @scare_factor - 1; + goto L_Tricking_Reward_Loop; + +L_SetRememberFace: + HALLOWEENTIME = HALLOWEENTIME | (1 << (31 - @halloween_npc_id)); + goto L_close; + +L_Tricking_End: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes "\"That should be enough sweets for you. Thanks for participating!\""; + if (!@Mask) + goto L_SetRememberFace; + // add the player's mask to the list + @loop = 7; + goto L_SetRememberMask; + +L_SetRememberMask: + $@halloween_maskmemory[8 * @halloween_npc_id + @loop] = $@halloween_maskmemory[8 * @halloween_npc_id + @loop - 1]; + @loop = @loop - 1; + if (@loop) + goto L_SetRememberMask; + $@halloween_maskmemory[8 * @halloween_npc_id] = @Mask; + HALLOWEENTIME = HALLOWEENTIME + 1; + goto L_close; + +L_Full_Inventory: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes "\"You are trying to collect candy but you have no space to carry all the kinds of stuff that I have to offer! Please, save room for more stuff and come back.\""; + goto L_close; + +L_NoMask: + mes $@halloween_npc_names$[@halloween_npc_id]; + mes "\"Hey " + strcharinfo(0) + ", are you trying to scare me with your face? Interesting! hahaha...\""; + goto L_close; + +L_close: + @tmp = 0; + @Mask = 0; + @karma = 0; + @loop = 0; + @menu = 0; + @halloween_npc_id = 0; + return; + +L_QuickReturn: + @halloween_npc_id = 0; + return; +} +function script TrickOrTreatTally { + @npc_loop = 0; + @npc_tally = 0; + goto L_LoopCheck; + +L_LoopCheck: + if (HALLOWEENTIME & (1 << (31 - @npc_loop))) + @npc_tally = (@npc_tally + 1); + goto L_IncLoop; + +L_IncLoop: + @npc_loop = (@npc_loop + 1); + if (@npc_loop >= 15) + goto L_Return; + goto L_LoopCheck; + +L_Return: + return; +} +function script HalloweenCheckOld { + if(HALLOWEENYEAR == $HALLOWEEN_TIME_KEY[5]) + goto L_Return; + goto L_OldMatch; + +L_OldMatch: + HALLOWEENTIME = 0; + HALLOWEENYEAR = $HALLOWEEN_TIME_KEY[5]; + goto L_Return; + +L_Return: + return; +} +function script HalloweenTree { + mes "[Confused Tree]"; + if ((HALLOWEENTIME & 65535) > ($@halloween_num_npcs * 3)) + mes "\"Whoa slow down greedy, leave some candy for the reset of us!\""; + if ((HALLOWEENTIME & 65535) > $@halloween_num_npcs) + mes "\"I see you have ben enjoying trick or treating, I hope you don't get a stomach ache.\""; + if ((HALLOWEENTIME & 65535) <= $@halloween_num_npcs) + mes "\"I love halloween, wearing masks and going trick or treating is so much fun.\""; + goto L_StartMenu; + +L_StartMenu: + menu + "Whats Halloween?", L_Explain, + "Me too!", L_CheckDressed, + "Meh, I like Christmas Better.", L_XmasBetter; + +L_Explain: + mes "\"I've convinced some people throughout the world to help with trick or treating.\""; + next; + @npc_check_loop = 0; + goto L_NpcCheckLoop; + +L_NpcCheckLoop: + mes $@halloween_npc_names$[@npc_check_loop]; + next; + goto L_NpcCheckInc; + +L_NpcCheckInc: + @npc_check_loop = (@npc_check_loop + 1); + if (@npc_check_loop >= getarraysize($@halloween_npc_names$)) + goto L_ContinueExplain; + goto L_NpcCheckLoop; + +L_ContinueExplain: + mes "\"Find each person and put on a mask then try to scare them.\""; + next; + mes "\"The scarier you are, the more treats you will be awarded.\""; + next; + mes "\"If you are really scary you could get a rare reward.\""; + next; + goto L_StartMenu; + +L_CheckDressed: + @head = getequipid(equip_head); + @chest = getequipid(equip_torso); + @leg = getequipid(equip_legs); + @random_mes$ = "\" I like your costume.\""; + if ((@head <= 0) && (@chest <= 0) && (@leg <= 0)) + @random_mes$ = "\"Birthday Suit, always a classic.\""; + if ((@head == 615) && (@chest == 870)) + @random_mes$ = "\"How embrassing... we are wearing the same costume.\""; + if ((@head == 617) || (@head == 622) || (@head == 621)) + @random_mes$ = "\"Yar, matey I see that.\""; + if ((@head == 633) || (@head == 1205) || (@chest == 1183) || (@chest == 1184) || (@chest == 1185) || (@chest == 1186) || (@chest == 1187)) + @random_mes$ = "\"Your sense of humor offends me, it's way to early for that.\""; + mes @random_mes$; + goto L_Return; + +L_XmasBetter: + mes "\"Bah, Humbug, Show your Halloween spirit! OOooooOooo\""; + misceffect 302, strcharinfo(0); + goto L_Return; + +L_Return: + return; +} diff --git a/npc/annuals/tree_beard.txt b/npc/annuals/tree_beard.txt new file mode 100755 index 00000000..a7866f2b --- /dev/null +++ b/npc/annuals/tree_beard.txt @@ -0,0 +1,121 @@ +020-1,90,78,0 script #GhostTreeOne NPC133,{ + callfunc "HalloweenTree"; + close; +} + +020-1,90,78,0 script #Tree NPC380,{ + end; +} + +020-1,90,78,0 script #XmasTree NPC379,{ + end; +} + +020-1,90,79,0 script Present#1 NPC386,{ + callfunc "XmasStates"; + callfunc "XmasMainItemReward"; + close; +} + +009-1,54,38,0 script #GhostTreeTwo NPC133,{ + callfunc "HalloweenTree"; + close; +} + +009-1,54,38,0 script #TreeNoSnow NPC394,{ + end; +} + +009-1,54,38,0 script #XmasTreeNoSnow NPC381,{ + end; +} + +009-1,54,39,0 script Present#2 NPC386,{ + callfunc "XmasStates"; + callfunc "XmasMainItemReward"; + close; +} + +001-1,57,75,0 script #GhostTreeThree NPC133,{ + callfunc "HalloweenTree"; + close; +} + +001-1,58,75,0 script #PalmTree NPC384,{ + end; +} + +001-1,58,76,0 script Present#3 NPC386,{ + callfunc "XmasStates"; + callfunc "XmasMainItemReward"; + close; +} + +001-1,58,75,0 script #XmasPalmTree NPC383,{ + end; +} + +function script SpawnMobs { + donpcevent "XmasSpawnManager::OnCommandSpawnStart"; + return; +} + +function script PresentHandler { + if($@xmas_time == $@xmas_reward_time) + goto L_DeliverPresents; + goto L_DisablePresents; + +L_DeliverPresents: + enablenpc "Present#1"; + enablenpc "Present#2"; + enablenpc "Present#3"; + goto L_Return; + +L_DisablePresents: + disablenpc "Present#1"; + disablenpc "Present#2"; + disablenpc "Present#3"; + goto L_Return; + +L_Return: + return; +} + +function script ReplaceTrees { + disablenpc "#Tree"; + disablenpc "#TreeNoSnow"; + disablenpc "#PalmTree"; + disablenpc "#GhostTreeOne"; + disablenpc "#GhostTreeTwo"; + disablenpc "#GhostTreeThree"; + disablenpc "#XmasTree"; + disablenpc "#XmasTreeNoSnow"; + disablenpc "#XmasPalmTree"; + + if ($@xmas_time) + goto L_XmasTree; + if ($@halloween_time) + goto L_HalloweenLive; + goto L_Tree; + +L_XmasTree: + enablenpc "#XmasTree"; + enablenpc "#XmasTreeNoSnow"; + enablenpc "#XmasPalmTree"; + goto L_Return; + +L_HalloweenLive: + enablenpc "#GhostTreeOne"; + enablenpc "#GhostTreeTwo"; + enablenpc "#GhostTreeThree"; + goto L_Return; + +L_Tree: + enablenpc "#Tree"; + enablenpc "#TreeNoSnow"; + enablenpc "#PalmTree"; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/annuals/xmas/barriers.txt b/npc/annuals/xmas/barriers.txt new file mode 100755 index 00000000..fefacc00 --- /dev/null +++ b/npc/annuals/xmas/barriers.txt @@ -0,0 +1,155 @@ + +function script ThrowOutTheBum { + @getout = 0; + if((@xmas_thrown_out) && ($@xmas_time)) + goto L_SideOut; + goto L_Return; + +L_SideOut: + if(@xmas_helper_start_state) + goto L_Warp; + goto L_Hint; + +L_Hint: + message strcharinfo(0), "I said get out! We've got no time for your kind here."; + mes "[Orum's Homunculus]"; + mes "\"What are you doing? Come, see me in the caves below!\""; + mes "\"I said go north till you reach the snowman. Then head into the cave to the east.\""; + close2; + warp "020-1",33,94; + @getout = 1; + goto L_Return; + +L_Warp: + message strcharinfo(0), "I said get out, We've no time for your kind here."; + warp "020-1",33,94; + @getout = 1; + goto L_Return; + +L_Return: + return; +} + +030-2,153,21,0 script #DarkDoor NPC45,0,0,{ + callfunc "XmasStates"; + + if((@xmas_boss_door_state) && ($@xmas_time)) + goto L_XmasMain; + goto L_NotActive; + +L_XmasMain: + mes "You get the strange sensation that this might go terribly wrong. You had better bring some of your strongest comrades to help you in that case."; + mes "Open the warehouse door?"; + menu + "Yes, I feel brave.", L_Open, + "No, It's quite nice out here.", L_close; + +L_Open: + if ($@XmasBattleStatus) goto L_BattleInProgress; + warp "030-4",34,48; + goto L_close; + +L_BattleInProgress: + mes "You can hear shouts and screams of despair from behind the door. But trying to open it fails."; + next; + mes "You will have to wait till someone from the inside opens the door again."; + goto L_close; + +L_NotActive: + message strcharinfo(0), "This door appears locked by magical forces."; + end; + +L_close: + close; +} + + +030-3,27,24,0 script SmallCrack#XmasPassage NPC400,0,1,{ + callfunc "XmasStates"; + + if((@xmas_basement_passage) && ($@xmas_time)) + goto L_XmasMain; + goto L_NotActive; + +L_NotActive: + mes "You don't notice anything special."; + goto L_close; + +L_XmasMain: + mes "You notice a small creak in the wall, what do you want to do?"; + next; + goto L_EnterDialogue; + +L_EnterDialogue: + menu + "Nothing.", L_close, + "Bang my head against it repeatedly.", L_Tux9th, + "Oh, not very much, I do not see anynthing there.", L_close, + "Hit it with my strong fist.", L_Enter; + +L_Tux9th: + heal -20, 0; + message strcharinfo(0), "Ouch, that hurt!"; + setlook LOOK_HAIR_STYLE, rand(20); + goto L_Fail; + +L_Enter: + if (getequipid(equip_hand1) > 0 || getequipid(equip_hand2) > 0) goto L_Sword; + if (getequipid(equip_gloves) <= 0) goto L_Gloves; + goto L_QueryWarp; + +L_Sword: + mes "That is not your fist silly,"; + mes "use your fist, alright?"; + goto L_close; + +L_Gloves: + mes "Wow! Next time you plan to hit a wall,"; + mes "you had better equip some decent gloves in advance."; + heal -20, 0; + message strcharinfo(0), "Ouch, that hurt!"; + goto L_QueryWarp; + +L_QueryWarp: + mes "You gaze into a black hole, do you want to enter?"; + mes " "; + menu + "Yes", L_Warp, + "No", L_close; + +L_Warp: + warp "030-2",47,44; + goto L_close; + +L_Fail: + mes "Seems like that won't work out as you planned."; + goto L_close; + +L_close: + close; +} + +030-2,48,44,0 script #BasementDoor NPC45,0,0,{ + callfunc "XmasStates"; + + if((@xmas_basement_passage) && ($@xmas_time)) + goto L_XmasMain; + goto L_NotActive; + +L_XmasMain: + mes "Descend into the caves?"; + menu + "Yes.", L_Open, + "No.", L_close; + +L_Open: + warp "030-3",27,26; + goto L_close; + +L_NotActive: + message strcharinfo(0), "This door appears locked by magical forces."; + end; + +L_close: + close; +} diff --git a/npc/annuals/xmas/config.txt b/npc/annuals/xmas/config.txt new file mode 100755 index 00000000..807b3b9f --- /dev/null +++ b/npc/annuals/xmas/config.txt @@ -0,0 +1,252 @@ + + +- script #XmasConfig NPC32767,{ + end; + +OnCommandRestartQuest: + goto L_Main; + +OnInit: + goto L_Main; + +L_Main: + // Xmas Key Identifier Set through Botcheck Debug + if(!($XMAS_TIME_KEY) || (getarraysize($XMAS_TIME_KEY) != 6)) + setarray $XMAS_TIME_KEY, 12,12,1,25,6,gettime(7); + if(($XMAS_TIME_KEY[0] == 0) || ($XMAS_TIME_KEY[0] > 12)) + goto L_XmasError; + if(($XMAS_TIME_KEY[1] == 0) || ($XMAS_TIME_KEY[1] > 12)) + goto L_XmasError; + if(($XMAS_TIME_KEY[2] == 0) || ($XMAS_TIME_KEY[2] > 12)) + goto L_XmasError; + if(($XMAS_TIME_KEY[3] == 0) || ($XMAS_TIME_KEY[3] > 31)) + goto L_XmasError; + if(($XMAS_TIME_KEY[4] == 0) || ($XMAS_TIME_KEY[4] > 31)) + goto L_XmasError; + if($XMAS_TIME_KEY[5] == 0) + goto L_XmasError; + + // Event Runs until Reward Period. + // Month Start/End + $@xmas_start_month = $XMAS_TIME_KEY[0]; + $@xmas_reward_start_month = $XMAS_TIME_KEY[1]; + $@xmas_end_month = $XMAS_TIME_KEY[2]; + + // Reward Day Start/End + $@xmas_reward_start_day = $XMAS_TIME_KEY[3]; + $@xmas_reward_end_day = $XMAS_TIME_KEY[4]; + + // Time Settings + $@xmas_no_event_time = 0; + $@xmas_event_time = 1; + $@xmas_reward_time = 2; + + // Main Quest Settings + // Bit used to Set Which one of the 2 quests you are on + $@xmas_side_bit = (1 << 31); + $@xmas_base_bonus_xp = 4; + $@xmas_karma_bonus = 1; + $@xmas_reward_max_karma = 15; + $@xmas_reward_hero_boss = 15; + $@xmas_reward_all_lists = 10; + $@xmas_reward_all_helpers = 10; + $@xmas_reward_tally_rare = 80; + $@xmas_reward_tally_common = 40; + // Guidance System + $@xmas_route_bit = (1 << 23); + // Basement Passage way + $@xmas_basement_passage = (1 << 24); + // Thrown Out + $@xmas_thrown_out_bit = (1 << 25); + // Quest Start (@xmas_state) + $@xmas_list_path2_state = 1; + $@xmas_list_path1_state = 2; + $@xmas_list_both_state = 3; + $@xmas_list_complete_state = 4; + $@xmas_list_deliver_state = 5; + // Helper SubQuest + $@xmas_helpers_start_state = 6; + $@xmas_helpers_done_state = 7; + // Reagents + $@xmas_reagents_start = 8; + $@xmas_reagents_done = 9; + // Boss Door State + $@xmas_boss_door_open_state = 10; + // Reward State + $@xmas_reward_start = 11; + $@xmas_reward1_done = 12; + $@xmas_reward2_done = 13; + $@xmas_reward_done = 14; + + // Boss Fight Required Level for Hard Mode + $@BossHardLevel = 70; + $@xmas_boss_start_bit = (1 << 26); + $@xmas_boss_hero_bit = (1 << 27); + $@xmas_boss_start_shift = 26; + $@xmas_boss_hero_shift = 27; + setarray $@xmas_boss_req$, "IronPotion", "DarkCrystal"; + setarray $@xmas_boss_amount, 15, 10; + if(getarraysize($@xmas_boss_amount) != getarraysize($@xmas_boss_req$)) + goto L_XmasError; + // Santas Helper quest rewards + setarray $@SantasHelper_Annual_Reward$, + "RedTurtleneck", + "YellowTurtleneck", + "LightBlueTurtleneck", + "PinkTurtleneck", + "OrangeTurtleneck", + "PurpleTurtleneck", + "KnitCap", + "KnitCap"; + + // Main Quest rewards + setarray $@xmas_present_from$, "Santa", "Orum"; + setarray $@xmas_rare_reward$, "FunkyChristmasSweater", "DarkChristmasSweater"; + setarray $@xmas_uncommon_reward$, "NutcrackerHat", "AmberChristmasSweater", "RedStockings", "PinkChristmasSweater", "BlueChristmasSweater"; + // Quest Side 0 Settings + setarray $@xmas_zero_reagents$, "ShockSweet", "EmptyBottle", "EmeraldPowder"; + setarray $@xmas_zero_reagents_names$, "Shock Sweet", "Empty Bottles", "Emerald Powders"; + setarray $@xmas_zero_reagents_amounts, 1, 4, 10; + if(getarraysize($@xmas_zero_reagents_amounts) != getarraysize($@xmas_zero_reagents$)) + goto L_XmasError; + + // Quest Side 1 Settings + setarray $@xmas_one_reagents$, "DarkCrystal", "IronPotion", "EmeraldPowder"; + setarray $@xmas_one_reagents_names$, "Dark Crystal", "Iron Potions", "Emerald Powders"; + setarray $@xmas_one_reagents_amounts, 1, 4, 10; + if(getarraysize($@xmas_one_reagents_amounts) != getarraysize($@xmas_one_reagents$)) + goto L_XmasError; + + // List Bits + $@xmas_all_lists_bit = (1 << 29); + setarray $@xmas_child_list, (1 << 8), (1 << 9), (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15); + setarray $@xmas_child_list_name$, "Ayasha", "Latif", "Charda", "Faris", "Rasin", "Ghada", "Rossy", "Kadiya"; + if(getarraysize($@xmas_child_list) != getarraysize($@xmas_child_list_name$)) + goto L_XmasError; + + $@xmas_perfect_list_count = getarraysize($@xmas_child_list); + $@xmas_required_list_count = (getarraysize($@xmas_child_list) / 2); + + // Santa's Helper + $@xmas_sh_bit = (1 << 22); + $@xmas_sh_purple_amount = 25; + $@xmas_sh_blue_amount = 20; + $@xmas_sh_green_amount = 5; + + // Main Helper Bit + $@xmas_helper_bit = (1 << 30); + $@xmas_all_helpers_bit = (1 << 28); + + // Acorns + $@xmas_helper_bit_acorns = (1 << 21); + $@xmas_acorn_amount = 10; + $@xmas_iron_potion_amount = 1; + + // Bedding + $@xmas_helper_bit_bed_starts = (1 << 16); + $@xmas_helper_bit_bed_ends = (1 << 17); + $@xmas_bedding_amount = 10; + + // Boxes + $@xmas_log_amount = 2; + + // Wrap + $@xmas_reed_amount = 2; + $@xmas_water_amount = 1; + $@xmas_wrap_reward = 1; + + // Wrap Dye Amounts + $@xmas_poa_amount = 2; + $@xmas_wrap_yellow_amount = 2; + $@xmas_wrap_ltblue_amount = 2; + $@xmas_wrap_purple_amount = 2; + $@xmas_wrap_green_amount = 2; + + // Present Return + $@xmas_present_amount = 5; + + // Shipping + $@xmas_wrap_amount = 1; + $@xmas_empty_box_amount = 1; + $@xmas_ship_present_amount = 1; + + // Glitter + $@xmas_helper_bit_glitter_starts = (1 << 18); + $@xmas_helper_bit_glitter_ends = (1 << 19); + $@xmas_red_amount = 5; + $@xmas_yellow_amount = 5; + + // Storage (Daily Xmas) + $@xmas_helper_bit_storage = (1 << 20); + // Good Daily Ammounts + $@xmas_good_level = 30; + $@xmas_good_cost = 12; + $@xmas_good_count = 3; + $@xmas_good_name$ = "Candy"; + $@xmas_good_friendly_name$ = "Candies"; + $@xmas_good_money = 500; + $@xmas_good_exp = 200; + + // Bad Daily Ammounts + $@xmas_bad_level = 30; + $@xmas_bad_cost = 12; + $@xmas_bad_count = 3; + + $@xmas_bad_name$ = "RedApple"; + $@xmas_bad_friendly_name$ = "Red Apples"; + $@xmas_bad_money = 500; + $@xmas_bad_exp = 200; + + //Boss Fight Reward + $@xmas_boss_bp = 50; + + // Helpers Flags needed to set $@xmas_all_helpers_bit + setarray $@xmas_helper_list, $@xmas_helper_bit_bed_ends, $@xmas_helper_bit_glitter_ends, $@xmas_helper_bit_storage, $@xmas_helper_bit_acorns, $@xmas_sh_bit; + $@xmas_perfect_helpers_count = getarraysize($@xmas_helper_list); + $@xmas_required_helpers_count = (getarraysize($@xmas_helper_list) / 2); + + // MobManager + setarray $@xmas_mob_names$, "Santa Slime", "Candied Slime", "Candied Slime"; + setarray $@xmas_mob_spawns, "1015", "1111", "1111"; + setarray $@xmas_mob_counts, 10, 5, 5; + setarray $@xmas_map_spawns$, "019-1", "019-3", "030-3"; + if(getarraysize($@xmas_mob_spawns) != getarraysize($@xmas_map_spawns$)) + goto L_XmasError; + if(getarraysize($@xmas_mob_names$) != getarraysize($@xmas_map_spawns$)) + goto L_XmasError; + if(getarraysize($@xmas_mob_counts) != getarraysize($@xmas_map_spawns$)) + goto L_XmasError; + + $@xmas_spawn_x1 = 54; + $@xmas_spawn_y1 = 48; + $@xmas_spawn_x2 = 79; + $@xmas_spawn_y2 = 89; + $@xmas_respawn_count = 9; + + $@start_month = $@xmas_start_month; + $@end_month = $@xmas_end_month; + $@start_day = 1; + $@end_day = $@xmas_reward_end_day; + $@reward_start_month = $@xmas_reward_start_month; + $@reward_start_day = $@xmas_reward_start_day; + + callfunc "GetEventTime"; + $@xmas_time = $@event_time; + + if($@xmas_time == 0 && $XMAS_TIME_KEY[5] < gettime(7)) + setarray $XMAS_TIME_KEY, $XMAS_TIME_KEY[0],$XMAS_TIME_KEY[1],$XMAS_TIME_KEY[2],$XMAS_TIME_KEY[3],$XMAS_TIME_KEY[4],gettime(7); + goto L_Return; + +L_Return: + // technically this only needs to skip the npctimer in SpawnMobs, + // but this is a low-level debug setting so whatever. + if (debug >= 2) end; + callfunc "SpawnMobs"; + callfunc "PresentHandler"; + callfunc "ReplaceTrees"; + end; + +L_XmasError: + debugmes "Xmas is Dead Jim."; + mapexit; +} diff --git a/npc/annuals/xmas/core.txt b/npc/annuals/xmas/core.txt new file mode 100755 index 00000000..2abeefce --- /dev/null +++ b/npc/annuals/xmas/core.txt @@ -0,0 +1,229 @@ + +function script XmasNaughty { + @xmas_karma = ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + if((@xmas_karma - @karma_bonus) >= 0) + goto L_SetNaughty; + goto L_ResetNaughty; + +L_SetNaughty: + @xmas_karma = (@xmas_karma - @karma_bonus); + goto L_Return; + +L_ResetNaughty: + @xmas_karma = 0; + goto L_Return; + +L_Return: + XMASTIME = (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT)); + @karma_bonus = 0; + return; +} + +function script XmasNice { + @xmas_karma = ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + if((@xmas_karma + @karma_bonus) < 16) + goto L_SetNice; + goto L_ResetNice; + +L_SetNice: + @xmas_karma = (@karma_bonus + @xmas_karma); + goto L_Return; + +L_ResetNice: + @xmas_karma = 15; + goto L_Return; + +L_Return: + XMASTIME = (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT)); + @karma_bonus = 0; + return; +} + +function script XmasXpReward { + if (BaseLevel >= 10) + goto L_HigherLevel; + goto L_LowLevel; + +L_HigherLevel: + getexp ((BaseLevel / 10) * ($@xmas_base_bonus_xp * BaseLevel)), 0; + goto L_Return; + +L_LowLevel: + getexp ($@xmas_base_bonus_xp * BaseLevel), 0; + goto L_Return; + +L_Return: + return; +} + +function script XmasSetState { + XMASTIME = (XMASTIME & ~(NIBBLE_0_MASK) | (@xmas_state << NIBBLE_0_SHIFT)); + return; +} + +function script XmasSetSide { + XMASTIME = XMASTIME | $@xmas_side_bit; + return; +} + +function script XmasSetRoute { + XMASTIME = XMASTIME | $@xmas_route_bit; + return; +} + +function script XmasThrowOut { + XMASTIME = XMASTIME | $@xmas_thrown_out_bit; + return; +} + +function script XmasSetBossStart { + XMASTIME = XMASTIME | $@xmas_boss_start_bit; + return; +} + +function script XmasSetBossHero { + XMASTIME = XMASTIME | $@xmas_boss_hero_bit; + return; +} + +function script XmasSetReward { + @xmas_endgame = 0; + @xmas_reward_side = 0; + @xmas_reward_tally = 0; + if(@xmas_side) + goto L_SetSide; + goto L_NotSetSide; + +L_SetSide: + @xmas_reward_side = 1; + @xmas_reward_tally = (@xmas_reward_tally + ($@xmas_reward_max_karma - @xmas_karma)); + goto L_SetRewardBonus; + +L_NotSetSide: + @xmas_reward_tally = (@xmas_reward_tally + @xmas_karma); + goto L_SetRewardBonus; + +L_SetRewardBonus: + if(@xmas_boss_hero) + @xmas_reward_tally = (@xmas_reward_tally + $@xmas_reward_hero_boss); + if(@xmas_all_helpers) + @xmas_reward_tally = (@xmas_reward_tally + $@xmas_reward_all_helpers); + if(@xmas_all_lists) + @xmas_reward_tally = (@xmas_reward_tally + $@xmas_reward_all_lists); + //formula should: + if (@xmas_reward_tally > 5) + @xmas_reward_lower_bound = 2 * @xmas_reward_tally - rand(5); + if (@xmas_reward_tally <= 5) + @xmas_reward_lower_bound = @xmas_reward_tally; + @xmas_reward_upper_bound = @xmas_reward_lower_bound + ((Luk) / 5); + @xmas_reward = (rand(@xmas_reward_lower_bound, @xmas_reward_upper_bound)); + @xmas_reward_lower_bound = 0; + @xmas_reward_upper_bound = 0; + return; +} + +function script XmasMainXpBpReward { + callfunc "XmasSetReward"; + + if(BaseLevel >= 99) + goto L_EndGameReward; + goto L_LevelingReward; + +L_EndGameReward: + @xmas_bp_reward = 100 + rand(@xmas_reward, 2 * @xmas_reward); + BOSS_POINTS = BOSS_POINTS + @xmas_bp_reward; + message strcharinfo(0), "You gain " + @xmas_bp_reward + " Bosspoints, giving you a total of " + BOSS_POINTS + "."; + @xmas_bp_reward = 0; + return; + +L_LevelingReward: + if(@xmas_reward >= $@xmas_reward_tally_rare) + goto L_XmasLevel; + goto L_XmasExp; + +L_XmasLevel: + BaseLevel = BaseLevel + 1; + return; + +L_XmasExp: + getexp ((@xmas_reward * BaseLevel * (BaseLevel + 10)) / 10), 0; + return; +} + +function script XmasMainItemReward { + callfunc "XmasSetReward"; + + if (($@xmas_time == $@xmas_reward_time) && ((@xmas_reward_start_state) || (@xmas_reward1_done_state))) + goto L_FinalGift; + if (($@xmas_time == $@xmas_reward_time) && ((@xmas_reward_done_state) || (@xmas_reward2_done_state))) + goto L_GotGift; + if ($@xmas_time == $@xmas_reward_time) + goto L_NoGift; + goto L_Return; + +L_GotGift: + mes "Hey, this is not for you!"; + goto L_Return; + +L_NoGift: + mes "Oh someone got a present. Maybe you can get one too if help the right person?"; + goto L_Return; + +L_FinalGift: + mes "[To: " + strcharinfo(0) + "]"; + mes "[From: " + $@xmas_present_from$[@xmas_reward_side] + "]"; + mes "O look, a present from " + $@xmas_present_from$[@xmas_reward_side]; + next; + getinventorylist; + if (@inventorylist_count > 97) + goto L_FullInv; + @xmas_reward = (@xmas_reward + ((BaseLevel + 10)/10)); + if (debug > 0) + message strcharinfo(0), "Reward variable: " + @xmas_reward; + @xmas_uncommon_slot1 = rand(getarraysize($@xmas_uncommon_reward$)); + @xmas_uncommon_slot2 = rand(getarraysize($@xmas_uncommon_reward$)); + if(@xmas_reward >= $@xmas_reward_tally_rare) + @xmas_reward_item$ = $@xmas_rare_reward$[@xmas_reward_side]; + if(@xmas_reward >= $@xmas_reward_tally_common) + @xmas_reward_item1$ = $@xmas_uncommon_reward$[@xmas_uncommon_slot1]; + @xmas_reward_item2$ = $@xmas_uncommon_reward$[@xmas_uncommon_slot2]; + if(checkweight("Iten", 1) == 0) + goto L_FullInv; + if(@xmas_reward >= $@xmas_reward_tally_rare) + getitem @xmas_reward_item$, 1; + if(@xmas_reward >= $@xmas_reward_tally_common) + getitem @xmas_reward_item1$, 1; + getitem @xmas_reward_item2$, 1; + @xmas_uncommon_slot1 = 0; + @xmas_uncommon_slot2 = 0; + @xmas_reward_item$ = ""; + @xmas_reward_item1$ = ""; + @xmas_reward_item2$ = ""; + if (@xmas_reward_start_state) + @xmas_state = $@xmas_reward2_done; + if (@xmas_reward1_done_state) + @xmas_state = $@xmas_reward_done; + callfunc "XmasSetState"; + goto L_Return; + +L_FullInv: + mes "\"You have no place to put the present.\""; + goto L_Return; + +L_Return: + return; +} + +function script XmasCheckOld { + if(XMASYEAR == $XMAS_TIME_KEY[5]) + goto L_Return; + goto L_OldMatch; + +L_OldMatch: + XMASTIME = 0; + XMASYEAR = $XMAS_TIME_KEY[5]; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/annuals/xmas/debug.txt b/npc/annuals/xmas/debug.txt new file mode 100755 index 00000000..f7ba17bd --- /dev/null +++ b/npc/annuals/xmas/debug.txt @@ -0,0 +1,220 @@ + +function script XmasDebug { + if(debug) + goto L_Debug; + goto L_Live; + +L_Live: + mes "What do you want to do?"; + menu + "Debug Vars", L_DebugLive, + "Xmas Time Key Change.", L_XmasTimeKey, + "Reset Xmas Chamber.", L_XmasChamberReset, + "Do nothing.", L_close; + +L_DebugLive: + mes "--Sever--"; + mes "Event State: " + $@xmas_time; + mes "Event Start" + $XMAS_TIME_KEY[0] + "/1"; + mes "Reward Start: " + $XMAS_TIME_KEY[1] + "/" + $XMAS_TIME_KEY[3]; + mes "Event End: " + $XMAS_TIME_KEY[2] + "/" + $XMAS_TIME_KEY[4]; + mes "Event Time Key (year (CCYY)): " + $XMAS_TIME_KEY[5]; + goto L_close; + +L_Debug: + mes "What do you want to do?"; + menu + "Debug Vars", L_DebugVars, + "Set Quest State.", L_XmasState, + "Set Karma. [0-15] 15 Nice", L_XmasKarma, + "Set All Lists", L_SetAllLists, + "Set All Helpers", L_SetAllHelpers, + "Set Boss Hero", L_SetBossHero, + "Reset Quest State.", L_Reset, + "Set Old Event Flag.", L_LastReset, + "Xmas Time Key Change.", L_XmasTimeKey, + "Reset Xmas Chamber.", L_XmasChamberReset, + "Do nothing.", L_close; + +L_DebugVars: + callfunc "XmasStates"; + mes "--Sever--"; + mes "Event State: " + $@xmas_time; + mes "Event Start" + $XMAS_TIME_KEY[0] + "/1"; + mes "Reward Start: " + $XMAS_TIME_KEY[1] + "/" + $XMAS_TIME_KEY[3]; + mes "Event End: " + $XMAS_TIME_KEY[2] + "/" + $XMAS_TIME_KEY[4]; + mes "Event Time Key (year (CCYY)): " + $XMAS_TIME_KEY[5]; + next; + mes "--Player--"; + mes "Player Event Time Key " + XMASYEAR; + mes "xmas_state: " + @xmas_state; + mes "xmas_karma: " + @xmas_karma; + mes "xmas_side: " + @xmas_side; + next; + mes "xmas_list_gather: " + @xmas_list_gather; + mes "xmas_list_complete: " + @xmas_list_complete; + mes "xmas_list_deliver: " + @xmas_list_deliver; + mes "xmas_helper_start_state: " + @xmas_helper_start_state; + mes "xmas_helper_done_state: " + @xmas_helper_done_state; + mes "xmas_reagent_start_state: " + @xmas_reagent_start_state; + mes "xmas_reagent_done_state: " + @xmas_reagent_done_state; + mes "xmas_boss_door_state: " + @xmas_boss_door_state; + mes "xmas_reward_start_state " + @xmas_reward_start_state; + mes "xmas_reward1_done_state " + @xmas_reward1_done_state; + mes "xmas_reward2_done_state " + @xmas_reward2_done_state; + mes "xmas_reward_done_state: " + @xmas_reward_done_state; + next; + mes "xmas_basement_passage: " + @xmas_basement_passage; + mes "xmas_thrown_out: " + @xmas_thrown_out; + mes "xmas_hard_mode: " + @xmas_boss_hero; + next; + mes "xmas_sweater: " + @xmas_sh_done; + next; + mes "xmas_all_lists: " + @xmas_all_lists; + next; + mes "xmas_helper_bit: " + @xmas_helper_bit; + mes "xmas_all_helpers: " + @xmas_all_helpers; + mes "xmas_helper_acorn: " + @xmas_helper_acorn; + mes "xmas_helper_bedding: " + @xmas_helper_bedding; + mes "xmas_helper_glitter: " + @xmas_helper_glitter; + mes "xmas_helper_storage: " + @xmas_helper_storage; + mes "xmas_knows_route: " + @xmas_knows_route; + goto L_close; + +L_LastReset: + XMASTIME = 255; + XMASYEAR = 2012; + goto L_close; + +L_Reset: + XMASTIME = 0; + XMASYEAR = $XMAS_TIME_KEY[5]; + goto L_close; + +L_XmasTimeKey: + mes "Xmas Time Key Change."; + mes "Start Month?"; + input @xmas_time_key_smonth; + if((@xmas_time_key_smonth == 0) || (@xmas_time_key_smonth > 12)) + goto L_XmasError; + mes "Reward Start Month?"; + input @xmas_time_key_srmonth; + if((@xmas_time_key_srmonth == 0) || (@xmas_time_key_srmonth > 12)) + goto L_XmasError; + mes "End Month?"; + input @xmas_time_key_emonth; + if((@xmas_time_key_emonth == 0) || (@xmas_time_key_emonth > 12)) + goto L_XmasError; + mes "Reward Start Day?"; + input @xmas_time_key_rsday; + if((@xmas_time_key_rsday == 0) || (@xmas_time_key_rsday > 31)) + goto L_XmasError; + mes "Reward End Day?"; + input @xmas_time_key_reday; + if((@xmas_time_key_reday == 0) || (@xmas_time_key_reday > 31)) + goto L_XmasError; + mes "Time Key (CCYY) "; + input @xmas_time_key_year; + goto L_SetNewKey; + +L_XmasError: + mes "Incorrect Entry. Try again."; + goto L_close; + +L_SetNewKey: + setarray $XMAS_TIME_KEY, @xmas_time_key_smonth, @xmas_time_key_srmonth, @xmas_time_key_emonth, @xmas_time_key_rsday, @xmas_time_key_reday, @xmas_time_key_year; + donpcevent "#XmasConfig::OnCommandRestartQuest"; + goto L_close; + +L_XmasChamberReset: + donpcevent "AniManOMat::OnCommandChamberReset"; + goto L_close; + +L_XmasState: + mes "Quest state?"; + input @xmas_state; + callfunc "XmasSetState"; + goto L_close; + +L_XmasKarma: + mes "Karma (0-15) 0: Naughty, 15: Good"; + input @xmas_karma; + XMASTIME = (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT)); + goto L_close; + +L_SetAllLists: + XMASTIME = XMASTIME | $@xmas_all_lists_bit; + goto L_close; + +L_SetAllHelpers: + XMASTIME = XMASTIME | $@xmas_all_helpers_bit; + goto L_close; + +L_SetBossHero: + XMASTIME = XMASTIME | $@xmas_boss_hero_bit; + goto L_close; + +L_close: + @xmas_state = 0; + @xmas_karma = 0; + @xmas_hard_mode = 0; + @xmas_time_key_smonth = 0; + @xmas_time_key_emonth = 0; + @xmas_time_key_rsday = 0; + @xmas_time_key_reday = 0; + @xmas_time_key_year = 0; + close2; + return; +} + +020-1,86,76,0 script XmasDebug#1 NPC105,{ + callfunc "XmasDebug"; + goto L_End; + +OnInit: + if(!(debug)) + disablenpc "XmasDebug#1"; + goto L_End; + +L_End: + end; +} + +030-2,193,62,0 script XmasDebug#2 NPC105,{ + callfunc "XmasDebug"; + goto L_End; + +OnInit: + if(!(debug)) + disablenpc "XmasDebug#2"; + goto L_End; + +L_End: + end; +} + +030-3,26,26,0 script XmasDebug#3 NPC105,{ + callfunc "XmasDebug"; + goto L_End; + +OnInit: + if(!(debug)) + disablenpc "XmasDebug#3"; + goto L_End; + +L_End: + end; +} + +030-4,30,30,0 script XmasDebug#4 NPC111,{ + callfunc "XmasDebug"; + goto L_End; + +OnInit: + if(!(debug)) + disablenpc "XmasDebug#4"; + goto L_End; + +L_End: + end; +} diff --git a/npc/annuals/xmas/helpers.txt b/npc/annuals/xmas/helpers.txt new file mode 100755 index 00000000..28d5e650 --- /dev/null +++ b/npc/annuals/xmas/helpers.txt @@ -0,0 +1,44 @@ + +function script XmasHelperPoints { + @xmas_helper_count = 0; + @xmas_helper_loop = 0; + if((@xmas_helper_done_state) || !(@xmas_helper_start_state)) + goto L_Return; + goto L_Loop; + +L_Loop: + if(XMASTIME & $@xmas_helper_list[@xmas_helper_loop]) + goto L_AddOne; + goto L_LoopAgain; + +L_AddOne: + @xmas_helper_count = (@xmas_helper_count + 1); + goto L_LoopAgain; + +L_LoopAgain: + if((@xmas_helper_loop + 1) == getarraysize($@xmas_helper_list)) + goto L_HelperTally; + @xmas_helper_loop = (@xmas_helper_loop + 1); + goto L_Loop; + +L_HelperTally: + if(@xmas_helper_count == $@xmas_perfect_helpers_count) + goto L_PerfectHelpers; + if(@xmas_helper_count > $@xmas_required_helpers_count) + goto L_SetHelperState; + goto L_Return; + +L_PerfectHelpers: + XMASTIME = XMASTIME | $@xmas_all_helpers_bit; + goto L_SetHelperState; + +L_SetHelperState: + @xmas_state = $@xmas_helpers_done_state; + callfunc "XmasSetState"; + goto L_Return; + +L_Return: + @xmas_helper_count = 0; + @xmas_helper_loop = 0; + return; +} diff --git a/npc/annuals/xmas/list.txt b/npc/annuals/xmas/list.txt new file mode 100755 index 00000000..6f902e04 --- /dev/null +++ b/npc/annuals/xmas/list.txt @@ -0,0 +1,98 @@ + +function script XmasCheckList { + @xmas_list_count = 0; + @xmas_list_loop = 0; + + if((@xmas_list_deliver) || !(@xmas_list_gather)) + goto L_Return; + goto L_Loop; + +L_Loop: + if(XMASTIME & $@xmas_child_list[@xmas_list_loop]) + goto L_AddOne; + goto L_LoopAgain; + +L_AddOne: + @xmas_list_count = (@xmas_list_count + 1); + goto L_LoopAgain; + +L_LoopAgain: + if((@xmas_list_loop + 1) == getarraysize($@xmas_child_list)) + goto L_ListTally; + @xmas_list_loop = (@xmas_list_loop + 1); + goto L_Loop; + +L_ListTally: + if(@xmas_list_count == $@xmas_perfect_list_count) + goto L_PerfectList; + if(@xmas_list_count > $@xmas_required_list_count) + goto L_SetListState; + goto L_Return; + +L_PerfectList: + XMASTIME = XMASTIME | $@xmas_all_lists_bit; + goto L_SetListState; + +L_SetListState: + @xmas_state = $@xmas_list_complete_state; + callfunc "XmasSetState"; + goto L_Return; + +L_Return: + @xmas_list_loop = 0; + return; +} + +function script XmasList { + callfunc "XmasStates"; + + if(($@xmas_time) && (@xmas_list_gather) && !(@xmas_list_complete)) + goto L_QuestTime; + goto L_Return; + +L_QuestTime: + if(XMASTIME & $@xmas_child_list[@child_number]) + goto L_Return; + goto L_GetList; + +L_GetList: + menu + "Hey, I have come to collect your wish list for Santa", L_List, + "Oh sorry, what were you going to say?", L_Return; + +L_List: + mes "[" + $@xmas_child_list_name$[@child_number] + "]"; + mes "Here is my list. Make sure it gets delivered, please!"; + next; + mes "You store " + $@xmas_child_list_name$[@child_number] + "'s wish list carefully in a hidden pocket of your backpack."; + XMASTIME = XMASTIME | $@xmas_child_list[@child_number]; + callfunc "XmasXpReward"; + menu + "I really should be going.", L_Return; + +L_Return: + return; +} + +function script XmasListList { + @xmas_list_loop = 0; + @xmas_child_loop = 0; + goto L_Loop; + +L_Loop: + @xmas_child_loop = ($@xmas_child_list[@xmas_list_loop]); + if ((XMASTIME & @xmas_child_loop) != 0) goto L_LoopAgain; + mes "\"" + $@xmas_child_list_name$[@xmas_list_loop] + "\""; + next; + goto L_LoopAgain; + +L_LoopAgain: + if((@xmas_list_loop + 1) == getarraysize($@xmas_child_list_name$)) + goto L_Return; + @xmas_list_loop = (@xmas_list_loop + 1); + goto L_Loop; + +L_Return: + @xmas_list_loop = 0; + return; +} diff --git a/npc/annuals/xmas/mobmanager.txt b/npc/annuals/xmas/mobmanager.txt new file mode 100755 index 00000000..e478e6be --- /dev/null +++ b/npc/annuals/xmas/mobmanager.txt @@ -0,0 +1,77 @@ + +019-1,0,0,0 script XmasSpawnManager NPC400,{ + end; + +OnCommandSpawnStart: + if ($@xmas_spawn_started) + goto L_End; + $@xmas_spawn_started = 1; + goto L_InitSpawn; + +L_InitSpawn: + initnpctimer; + $@xmas_current_count = 0; + $@xmas_map_loop = 0; + goto L_StartLoop; + +L_StartLoop: + $@xmas_mob_lck = 1; + $@mob_count = mobcount($@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally"); + $@spawn_amount = ($@xmas_mob_counts[$@xmas_map_loop] - ($@mob_count + 1)); + if ($@spawn_amount) + goto L_Spawn; + goto L_NextMap; + +L_Spawn: + areamonster $@xmas_map_spawns$[$@xmas_map_loop], $@xmas_spawn_x1, $@xmas_spawn_y1, $@xmas_spawn_x2, $@xmas_spawn_y2, $@xmas_mob_names$[$@xmas_map_loop], $@xmas_mob_spawns[$@xmas_map_loop], $@spawn_amount, "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally"; + $@xmas_current_count = ($@xmas_current_count + $@spawn_amount); + goto L_NextMap; + +L_NextMap: + if (($@xmas_map_loop + 1) == getarraysize($@xmas_map_spawns$)) + goto L_End; + $@xmas_map_loop = ($@xmas_map_loop + 1); + goto L_StartLoop; + +OnCommandTally: + $@xmas_map_loop = 0; + $@xmas_current_count = ($@xmas_current_count - 1); + if (($@xmas_current_count < $@xmas_respawn_count) && !($@xmas_mob_lck)) + goto L_StartLoop; + goto L_End; + +OnTimer110000: + initnpctimer; + goto L_StartLoop; + +L_End: + $@mob_count = 0; + $@spawn_amount = 0; + $@xmas_mob_lck = 0; + $@xmas_map_loop = 0; + end; +} + +019-1,0,0,0 script XmasSpawnCounter#0 NPC400,{ + end; + +OnTally: + donpcevent "XmasSpawnManager::OnCommandTally"; + end; +} + +019-3,0,0,0 script XmasSpawnCounter#1 NPC400,{ + end; + +OnTally: + donpcevent "XmasSpawnManager::OnCommandTally"; + end; +} + +030-3,0,0,0 script XmasSpawnCounter#2 NPC400,{ + end; + +OnTally: + donpcevent "XmasSpawnManager::OnCommandTally"; + end; +} diff --git a/npc/annuals/xmas/reagents.txt b/npc/annuals/xmas/reagents.txt new file mode 100755 index 00000000..dbdf52e7 --- /dev/null +++ b/npc/annuals/xmas/reagents.txt @@ -0,0 +1,139 @@ + +function script CheckReagents { + @xmas_reagent_loop = 0; + if((@xmas_reagent_done_state) || !(@xmas_reagent_start_state)) + goto L_Return; + if(@xmas_side) + goto L_OneLoop; + goto L_ZeroLoop; + +L_ZeroLoop: + if(countitem($@xmas_zero_reagents$[@xmas_reagent_loop]) >= $@xmas_zero_reagents_amounts[@xmas_reagent_loop]) + goto L_ZeroLoopAgain; + goto L_Return; + +L_ZeroLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$)) + goto L_AllReagents; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_ZeroLoop; + +L_OneLoop: + if(countitem($@xmas_one_reagents$[@xmas_reagent_loop]) >= $@xmas_one_reagents_amounts[@xmas_reagent_loop]) + goto L_OneLoopAgain; + goto L_Return; + +L_OneLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$)) + goto L_AllReagents; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_OneLoop; + +L_AllReagents: + @xmas_state = $@xmas_reagents_done; + callfunc "XmasSetState"; + goto L_Return; + +L_Return: + return; +} + +function script DeleteReagents { + @xmas_reagent_loop = 0; + if(@xmas_side) + goto L_OneLoop; + goto L_ZeroLoop; + +L_ZeroLoop: + delitem $@xmas_zero_reagents$[@xmas_reagent_loop], $@xmas_zero_reagents_amounts[@xmas_reagent_loop]; + goto L_ZeroLoopAgain; + +L_ZeroLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$)) + goto L_Return; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_ZeroLoop; + +L_OneLoop: + delitem $@xmas_one_reagents$[@xmas_reagent_loop], $@xmas_one_reagents_amounts[@xmas_reagent_loop]; + goto L_OneLoopAgain; + +L_OneLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$)) + goto L_Return; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_OneLoop; + +L_Return: + return; +} + +function script ListReagents { + @xmas_reagent_loop = 0; + mes "\"I'm going to need \""; + next; + + if(@xmas_side) + goto L_OneLoop; + goto L_ZeroLoop; + +L_ZeroLoop: + mes "\"" + $@xmas_zero_reagents_amounts[@xmas_reagent_loop] + " " + $@xmas_zero_reagents_names$[@xmas_reagent_loop] + "\""; + next; + goto L_ZeroLoopAgain; + +L_ZeroLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$)) + goto L_AllReagents; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_ZeroLoop; + +L_OneLoop: + mes "\"" + $@xmas_one_reagents_amounts[@xmas_reagent_loop] + " " + $@xmas_one_reagents_names$[@xmas_reagent_loop] + "\""; + next; + goto L_OneLoopAgain; + +L_OneLoopAgain: + if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$)) + goto L_AllReagents; + @xmas_reagent_loop = (@xmas_reagent_loop + 1); + goto L_OneLoop; + +L_AllReagents: + return; +} + +function script BadPowderMake { + if(countitem("PileOfAsh") < ($@xmas_red_amount + $@xmas_yellow_amount)) + goto L_NotEnough; + if(countitem("RedDye") < $@xmas_red_amount) + goto L_NotEnough; + if(countitem("YellowDye") < $@xmas_yellow_amount) + goto L_NotEnough; + getinventorylist; + if (@inventorylist_count > 100) + goto L_FullInv; + goto L_MakePowder; + +L_MakePowder: + delitem "PileOfAsh", ($@xmas_red_amount + $@xmas_yellow_amount); + delitem "RedDye", $@xmas_red_amount; + delitem "YellowDye", $@xmas_yellow_amount; + getitem "RedPowder", $@xmas_red_amount; + getitem "YellowPowder", $@xmas_yellow_amount; + mes "\"Here is your powder, now move!\""; + goto L_Return; + +L_FullInv: + mes "\"... Excuse me but where did you expect you were going to hold these powders...\""; + mes "\"WAIT! no, I don't want to know. Just come back when you have some room.\""; + goto L_Return; + +L_NotEnough: + mes "\"You don't have enough of eagents to make the powders.\""; + mes "\"To replace the glitter we will need get " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\""; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/annuals/xmas/states.txt b/npc/annuals/xmas/states.txt new file mode 100755 index 00000000..c21ccce5 --- /dev/null +++ b/npc/annuals/xmas/states.txt @@ -0,0 +1,51 @@ + +function script XmasStates { + // Check for Old Quest Line Keys. Reset Quest if so. + callfunc "XmasCheckOld"; + // Main Quest + @xmas_state = ((XMASTIME & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + @xmas_karma = ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + @xmas_side = XMASTIME & $@xmas_side_bit; + + @xmas_list_gather = (@xmas_state >= $@xmas_list_path2_state); + @xmas_list_path2 = (@xmas_state == $@xmas_list_path2_state); + @xmas_list_path1 = (@xmas_state == $@xmas_list_path1_state); + @xmas_list_both = (@xmas_state == $@xmas_list_both_state); + @xmas_list_complete = (@xmas_state >= $@xmas_list_complete_state); + @xmas_list_deliver = (@xmas_state >= $@xmas_list_deliver_state); + @xmas_helper_start_state = (@xmas_state >= $@xmas_helpers_start_state); + @xmas_helper_done_state = (@xmas_state >= $@xmas_helpers_done_state); + @xmas_reagent_start_state = (@xmas_state >= $@xmas_reagents_start); + @xmas_reagent_done_state = (@xmas_state >= $@xmas_reagents_done); + @xmas_boss_door_state = (@xmas_state >= $@xmas_boss_door_open_state); + @xmas_reward_start_state = (@xmas_state == $@xmas_reward_start); + @xmas_reward1_done_state = (@xmas_state == $@xmas_reward1_done); + @xmas_reward2_done_state = (@xmas_state == $@xmas_reward2_done); + @xmas_reward_done_state = (@xmas_state == $@xmas_reward_done); + + // Basement Passage + @xmas_basement_passage = XMASTIME & $@xmas_basement_passage; + // Thrown Out + @xmas_thrown_out = XMASTIME & $@xmas_thrown_out_bit; + // Learned Route to Orum + @xmas_knows_route = XMASTIME & $@xmas_route_bit; + // Santas Helper + @xmas_sh_done = XMASTIME & $@xmas_sh_bit; + // List Quest + @xmas_all_lists = XMASTIME & $@xmas_all_lists_bit; + // Helper Quest + @xmas_helper_bit = XMASTIME & $@xmas_helper_bit; + @xmas_all_helpers = XMASTIME & $@xmas_all_helpers_bit; + // Acorns + @xmas_helper_acorn = XMASTIME & $@xmas_helper_bit_acorns; + // Bedding + @xmas_helper_bedding = XMASTIME & $@xmas_helper_bit_bed_starts; + // Glitter + @xmas_helper_glitter = XMASTIME & $@xmas_helper_bit_glitter_starts; + // Storage + @xmas_helper_storage = XMASTIME & $@xmas_helper_bit_storage; + // Bosses + @xmas_boss_start = XMASTIME & $@xmas_boss_start_bit; + @xmas_boss_hero = XMASTIME & $@xmas_boss_hero_bit; + return; +} diff --git a/npc/botcheck/_import.txt b/npc/botcheck/_import.txt index 5f53d234..eca1724c 100644 --- a/npc/botcheck/_import.txt +++ b/npc/botcheck/_import.txt @@ -1,2 +1,3 @@ // Map botcheck: Botcheck Area // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/botcheck/mapflags.txt", diff --git a/npc/botcheck/mapflags.txt b/npc/botcheck/mapflags.txt new file mode 100755 index 00000000..754c247c --- /dev/null +++ b/npc/botcheck/mapflags.txt @@ -0,0 +1,2 @@ +//botcheck mapflag resave botcheck,37,37 +botcheck mapflag nosave botcheck,37,37 diff --git a/npc/commands/bodytype.txt b/npc/commands/bodytype.txt deleted file mode 100644 index 290c6fd6..00000000 --- a/npc/commands/bodytype.txt +++ /dev/null @@ -1,53 +0,0 @@ -// @bodytype atcommand -// changes or returns the body type - -- script @bodytype 32767,{ - end; - -OnCall: - if (.@atcmd_parameters$[0] == "") { - dispbottom("Your current body type is " + bodytypeToString()); - end; - } - - .@desired = stringToBodytype(.@atcmd_parameters$[0]); - - if (.@desired == BodyType) { - dispbottom("Your body type is already " + bodytypeToString()); - } else { - BodyType = .@desired; - dispbottom("Body type changed to " + bodytypeToString()); - } - end; - -OnInit: - bindatcmd("gender", "@bodytype::OnCall", 99, 99, false); - bindatcmd("bodytype", "@bodytype::OnCall", 99, 99, false); - bindatcmd("body", "@bodytype::OnCall", 99, 99, false); - bindatcmd("type", "@bodytype::OnCall", 99, 99, false); - bindatcmd("changesex", "@bodytype::OnCall", 99, 99, false); - - add_group_command("gender", 40, true, false); - add_group_command("bodytype", 40, true, false); - add_group_command("body", 40, true, false); - add_group_command("type", 40, true, false); - add_group_command("changesex", 40, true, false); - - add_group_command("gender", 50, true, false); - add_group_command("bodytype", 50, true, false); - add_group_command("body", 50, true, false); - add_group_command("type", 50, true, false); - add_group_command("changesex", 50, true, false); - - add_group_command("gender", 60, true, false); - add_group_command("bodytype", 60, true, false); - add_group_command("body", 60, true, false); - add_group_command("type", 60, true, false); - add_group_command("changesex", 60, true, false); - - add_group_command("gender", 80, true, false); - add_group_command("bodytype", 80, true, false); - add_group_command("body", 80, true, false); - add_group_command("type", 80, true, false); - add_group_command("changesex", 80, true, false); -} diff --git a/npc/commands/changesex.txt b/npc/commands/changesex.txt new file mode 100755 index 00000000..de20d91b --- /dev/null +++ b/npc/commands/changesex.txt @@ -0,0 +1,31 @@ +- script @changesex NPC32767,{ + callfunc "argv_splitter"; + .@n$ = if_then_else(@argv$[1] != "", "char", "") + "changecharsex()"; + if (GM < CMD_CHANGESex && GM < G_SYSOP) goto L_GM; // check if you can use it on self + .@target_id = BL_ID; + if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); + if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self + if (@argv$[1] != "" && GM < CMD_CHARCHANGESex && GM < G_SYSOP) goto L_GM; // when target is not self, use charchangecharsex() permission + + set .@s, 3; // default to non-binary + if (@argv$[0] == "M" || @argv$[0] == "m") set .@s, 1; + if (@argv$[0] == "F" || @argv$[0] == "f") set .@s, 0; + Sex = .@s, .@target_id; + gmlog "@"+.@n$+" " + @args$; + message strcharinfo(0), .@n$+" : The operation succeeded."; + end; + +L_Failed: + // XXX: should we allow GMs to change Sex of users that are not logged in? + message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARCHANGESex, CMD_CHANGESex) +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "changecharsex()", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "charchangecharsex()", strnpcinfo(0); + end; +} diff --git a/npc/commands/class.txt b/npc/commands/class.txt new file mode 100755 index 00000000..81ac0c7c --- /dev/null +++ b/npc/commands/class.txt @@ -0,0 +1,30 @@ +- script @class NPC32767,{ + callfunc "argv_splitter"; + .@n$ = if_then_else(@argv$[1] != "", "char", "") + "class"; + if (GM < CMD_CLASS && GM < G_SYSOP) goto L_GM; // check if you can use it on self + .@target_id = BL_ID; + if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); + if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self + if (@argv$[1] != "" && GM < CMD_CHARCLASS && GM < G_SYSOP) goto L_GM; // when target is not self, use charclass permission + + set .@c, 1; // default to human + if (@argv[0] >= 1 || @argv[0] <= 32767) set .@c, @argv[0]; + Class = .@c, .@target_id; + gmlog "@"+.@n$+" " + @args$; + message strcharinfo(0), .@n$+" : The operation succeeded."; + end; + +L_Failed: + // XXX: should we allow GMs to change class of users that are not logged in? + message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARCLASS, CMD_CLASS) +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "class", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "charclass", strnpcinfo(0); + end; +} diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt deleted file mode 100644 index 0a4a953b..00000000 --- a/npc/commands/debug-look.txt +++ /dev/null @@ -1,83 +0,0 @@ -function script BarberDebug { - function setStyle { - clear; - setnpcdialogtitle l("Appearance Debug - Barber"); - mes l("Hair style") + ": " + getlook(LOOK_HAIR); - next; - mes l("Please enter the desired style") + " (1-255)"; - input .@h, 1, 0xFF; - setlook LOOK_HAIR, max(1, min(0xFF, .@h)); - return; - } - function setColor { - clear; - setnpcdialogtitle l("Appearance Debug - Barber"); - mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR); - next; - mes l("Please enter the desired color") + " (0-255)"; - input .@h, 0, 0xFF; - setlook LOOK_HAIR_COLOR, max(0, min(0xFF, .@h)); - return; - } - function setRace { - clear; - setnpcdialogtitle l("Appearance Debug - Race"); - mes l("Race") + ": " + Class + " (" + get_race(GETRACE_FULL) + ")"; - next; - mes l("Please enter the desired race") + " (0-32767)"; - input .@r, 0, 0x7FFF; - jobchange max(0, min(0x7FFF, .@r)); - return; - } - - do - { - clear; - setnpcdialogtitle l("Appearance Debug"); - mes l("This menu allows you to customize your appearance."); - mes ""; - - mes "---"; - mes l("Body type") + ": " + bodytypeToString(BodyType); - mes l("Hair style") + ": " + getlook(LOOK_HAIR); - mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR); - mes l("Race") + ": " + Class + " (" + get_race() + ")";; - mes "---"; - - next; - mes l("What do you want to change?"); - select - menuimage("actions/edit", l("Body type") + " [" + l("Requires logout") + "]"), - menuimage("actions/edit", l("Hair style")), - menuimage("actions/edit", l("Hair color")), - menuimage("actions/edit", l("Race")), - rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))); - - switch (@menu) - { - case 1: BarberChangeBodyType(); break; - case 2: setStyle; break; - case 3: setColor; break; - case 4: setRace; break; - case 5: return; - } - } while (1); -} - - - -- script @look 32767,{ - end; - -OnCall: - if (!debug && !is_dev()) - { - end; - } - BarberDebug; - closeclientdialog; - end; - -OnInit: - bindatcmd "look", "@look::OnCall", 0, 99, 0; -} diff --git a/npc/commands/debug-preset.txt b/npc/commands/debug-preset.txt deleted file mode 100644 index 1fbad520..00000000 --- a/npc/commands/debug-preset.txt +++ /dev/null @@ -1,253 +0,0 @@ -// Preset / routine system -// Author: -// gumi -// Description: -// allows to execute multiple commands in a single step -// to ease testing and debugging -// -// usage: @pre [options] [, ...] -// usage: DoRoutine "[options] [, ...]"; -// -// example: @pre -s a22 v14 -// resets all stats, gives 22 agi, gives 14 vit -// -// ^ actual documentation may come one day, when I feel like it -// *hides* - -function script DoRoutine { - - function parsev { - // parsev(base, patterns{, min{, max}}) => value - .@value = getarg(0, 0); - .@raw$ = getarg(1, ""); - .@patterns = explode(.@patterns$, .@raw$, "|"); - - for (.@pattern = 0; .@pattern < .@patterns; ++.@pattern) - { - .@pattern$ = .@patterns$[.@pattern]; - .@len = getstrlen(.@pattern$); - - if (charat(.@pattern$, 0) == "=" && .@len >= 2) - { - .@value = atoi(delchar(.@pattern$, 0)); - break; - } - - else if (charat(.@pattern$, 0) == "+" && .@len >= 2) - { - if (charat(.@pattern$, 1) == "+" && getargcount() >= 4) - .@value = getarg(3); - else - .@value += atoi(delchar(.@pattern$, 0)); - } - - else if (charat(.@pattern$, 0) == "-" && .@len >= 2) - { - if (charat(.@pattern$, 1) == "-" && getargcount() >= 3) - .@value = getarg(2); - else - .@value -= atoi(delchar(.@pattern$, 0)); - } - - else if (charat(.@pattern$, 0) == ">" && .@len >= 2) - { - if (charat(.@pattern$, 1) == "=" && .@len >= 3) - .@value = max(atoi(substr(.@pattern$, 2, .@len - 1)), .@value); - else - .@value = max(atoi(delchar(.@pattern$, 0)) + 1, .@value); - } - - else if (charat(.@pattern$, 0) == "<" && .@len >= 2) - { - if (charat(.@pattern$, 1) == "=" && .@len >= 3) - .@value = min(atoi(substr(.@pattern$, 2, .@len - 1)), .@value); - else - .@value = min(atoi(delchar(.@pattern$, 0)) - 1, .@value); - } - - else if (.@len >= 1) - { - .@value = atoi(.@pattern$); - break; - } - } - - if (getargcount() >= 3) - .@value = max(getarg(2), .@value); - - if (getargcount() >= 4) - .@value = min(getarg(3), .@value); - - return .@value; - } - - .@routine$ = strip(getarg(0,"")); - .@m = explode(.@routine$[0], .@routine$, " "); // prep the base array - - if (charat(.@routine$[0], 0) == "-") - { - if (compare(.@routine$[0], "t")) - { - clearitem; - } - - if (compare(.@routine$[0], "e")) - { - nude; - } - - if (compare(.@routine$[0], "k")) - { - resetskill; - } - - if (compare(.@routine$[0], "s")) - { - resetstatus; - } - - if (compare(.@routine$[0], "x")) - { - resetlvl 2; - } - - if (compare(.@routine$[0], "q")) - { - //doevent "::OnGlobalQuestReset"; // executes in all quest npcs // FIXME: maybe have a `resetquest` buildin? - // FIXME: ^ need a buildin that can run *right now* instead of on script end - } - - if (compare(.@routine$[0], "n")) - { - closeclientdialog; - } - - .@i = 1; - } - - for (; .@i < .@m; ++.@i) - { - .@type = ord(charat(strip(.@routine$[.@i]), 0)); - - if (.@type > 0) - { - .@raw$ = delchar(.@routine$[.@i], 0); - .@args = explode(.@args$, .@raw$, ","); - .@a = atoi(.@args$[0]); - .@b = atoi(.@args$[1]); - .@c = atoi(.@args$[2]); - .@d = atoi(.@args$[3]); - .@e = atoi(.@args$[4]); - - switch (.@type) - { - case 97: /* a => Agi */ - .@base = readparam(bAgi); - statusup2 bAgi, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - case 98: /* b => body type */ - .@desired_bt = max(1, min(3, .@a)); - break; - case 99: /* c => job */ - jobchange max(0, min(6, .@a)); - break; - case 100: /* d => Dex */ - .@base = readparam(bDex); - statusup2 bDex, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - case 101: /* e => equip */ - equip max(1, min(32767, .@a)); - break; - /* (f) */ - /* (g) */ - /* (h) */ - case 105: /* i => Int */ - .@base = readparam(bInt); - statusup2 bInt, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - /* (j) */ - case 107: /* k => skill */ - .@k = max(1, min(32767, .@a)); - skill .@k, parsev(getskilllv(.@k), .@args$[1], 0, 10), 0; - break; - case 108: /* l => luk */ - .@base = readparam(bLuk); - statusup2 bLuk, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - /* (m) => mercenary (reserved) */ - /* (n) => talk to npc (reserved) */ - /* (o) */ - case 112: /* p => pet */ - makepet max(1002, min(32767, .@a)); - break; - case 113: /* q => quest */ - .@q = max(0, min(32767, .@a)); - setq .@q, parsev(getq(.@q), .@args$[1]), - parsev(getq2(.@q), .@args$[2]), - parsev(getq3(.@q), .@args$[3]), - parsev(getqtime(.@q), .@args$[4]); - break; - /* (r) */ - case 115: /* s => Str */ - .@base = readparam(bStr); - statusup2 bStr, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - case 116: /* t => item */ - .@t = max(1, min(32767, .@a)); - .@c = countitem(.@t); - .@v = parsev(.@c, .@args$[1], 0, 32767); - if (.@c > .@v) - delitem .@t, .@c - .@v; - else if (.@c < .@v) - getitem .@t, .@v - .@c; - break; - /* (u) */ - case 118: /* v => vit */ - .@base = readparam(bVit); - statusup2 bVit, parsev(.@base, .@args$[0], 1, 99) - .@base; - break; - case 119: /* w => warp */ - warp .@args$[0], .@b, .@c; - break; - case 120: /* x => base level */ - BaseLevel = parsev(BaseLevel, .@args$[0], 1, 99); - BaseExp = parsev(BaseExp, .@args$[1], 0); - break; - case 121: /* y => job level */ - JobLevel = parsev(JobLevel, .@args$[0], 1, 255); - JobExp = parsev(JobExp, .@args$[1], 0); - break; - case 122: /* z => zeny */ - Zeny = parsev(Zeny, .@args$[0], 0, 0x7FFFFFFE); - BankVault = parsev(BankVault, .@args$[1], 0, MAX_BANK_ZENY); - break; - } - } - } - - if (.@desired_bt && BodyType != .@desired_bt) { - sleep2(500); - BodyType = .@desired_bt; // this forces a logout so we must be it last - } - - return; -} - -- script @pre 32767,{ - end; - -OnCall: - if (!debug && !is_admin()) - { - end; - } - if (.@atcmd_parameters$[0] != "") - { - .@atcmd_parameters$[0] = implode(.@atcmd_parameters$[0], " "); - } - DoRoutine strip(.@atcmd_parameters$[0]); - end; - -OnInit: - bindatcmd "pre", "@pre::OnCall", 0, 99, 0; -} diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt deleted file mode 100644 index 580173d0..00000000 --- a/npc/commands/debug-quest.txt +++ /dev/null @@ -1,217 +0,0 @@ -function script GlobalQuestDebug { - - function qDebugShip { - function qDebugGugli { - do - { - clear; - setnpcdialogtitle l("Quest debug") + " - " + l("Prologue") + " - Gugli"; - mes l("This menu gives access to quest debug menus for @@ quest subquests.", "Gugli"); - next; - mes l("Please select a quest:"); - - menuint - menuimage("actions/back", l("Go back")), -1, - l("Gugli (main quest)"), ShipQuests_Gugli, - "Ale", ShipQuests_Ale, - "Astapolos", ShipQuests_Astapolos, - "Gulukan", ShipQuests_Gulukan, - "Jalad", ShipQuests_Jalad, - "Q'Muller", ShipQuests_QMuller, - "Tibbo", ShipQuests_Tibbo; - - switch (@menuret) - { - case -1: return; - default: callfunc "QuestDebug" + @menuret; - } - } while (1); - } - - do - { - clear; - setnpcdialogtitle l("Quest debug") + " - " + l("Prologue"); - mes l("This menu gives access to quest debug menus for @@ quests.", l("Prologue")); - next; - mes l("Please select a quest:"); - - menuint - menuimage("actions/back", l("Go back")), -1, - "Julia", ShipQuests_Julia, - "Arpan", ShipQuests_Arpan, - "Alige", ShipQuests_Alige, - "Peter", ShipQuests_Peter, - "Nard", ShipQuests_Nard, - l("Knife"), ShipQuests_Knife, - l("Money"), ShipQuests_ArpanMoney, - l("Door"), ShipQuests_Door, - "Couwan", ShipQuests_Couwan, - l("Treasure Chest"), ShipQuests_TreasureChest, - "Gugli", ShipQuests_Gugli, - "Gado", ShipQuests_ChefGado; - - switch (@menuret) - { - case 16: qDebugGugli; break; - case -1: return; - default: callfunc "QuestDebug" + @menuret; - } - } while (1); - } - - function qDebugArtis { - do - { - clear; - setnpcdialogtitle l("Quest debug") + " - " + l("Artis"); - mes l("This menu gives access to quest debug menus for @@ quests.", "Artis"); - next; - mes l("Please select a quest:"); - - menuint - menuimage("actions/back", l("Go back")), -1, - l("Lazy Brother"), ArtisQuests_LazyBrother, - l("Urchin"), ArtisQuests_Urchin, - l("Catching a piou"), ArtisQuests_CatchPiou, - "Eugene (" + l("fisherman") + ")", ArtisQuests_Fishman, - "Q'Onan", ArtisQuests_QOnan, - "Enora", ArtisQuests_Enora, - "Fexil", ArtisQuests_Fexil, - "Lloyd", ArtisQuests_Lloyd, - l("Mona's dad"), ArtisQuests_MonaDad, - l("Artis legion progress"), Artis_Legion_Progress, - l("Legion training"), ArtisQuests_TrainingLegion, - "Henry", ThiefQuests_Artis; - - switch (@menuret) - { - case -1: return; - default: callfunc "QuestDebug" + @menuret; - } - } while (1); - } - - function qDebugHurnscald { - do - { - clear; - setnpcdialogtitle l("Quest debug") + " - Hurnscald"; - mes l("This menu gives access to quest debug menus for @@ quests.", "Hurnscald"); - next; - mes l("Please select a quest:"); - - menuint - menuimage("actions/back", l("Go back")), -1, - "Hinnak", HurnscaldQuests_Hinnak, - l("Maggot soup"), HurnscaldQuests_Soup, - l("Inspector"), HurnscaldQuests_Inspector, - l("Forest bow"), HurnscaldQuests_ForestBow, - l("Wooden shield"), HurnscaldQuests_WoodenShield, - "Kfahr", HurnscaldQuests_Kfahr, - "Galimatia", ArgaesQuest_Galimatia, - "Rossy", HurnscaldQuests_Rossy; - - switch (@menuret) - { - case -1: return; - default: callfunc "QuestDebug" + @menuret; - } - } while (1); - } - - function qDebugGeneral { - do - { - clear; - setnpcdialogtitle l("Quest debug") + " - " + l("Other"); - mes l("This menu gives access to quest debug menus for @@ quests.", strtolower(l("Other"))); - next; - mes l("Please select a quest:"); - - menuint - menuimage("actions/back", l("Go back")), -1, - "Hal", General_CptHal, - l("Cookies"), General_Cookies, - "Rumly", General_Rumly, - l("Narrator"), General_Narrator, - "Janus", General_Janus, - l("Cooking"), General_Cooking, - l("Brotherhood"), General_Brotherhood; - - switch (@menuret) - { - case -1: return; - default: callfunc "QuestDebug" + @menuret; - } - } while (1); - } - - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes l("This menu gives access to all quest debug menus."); - next; - mes l("Please select a category:"); - - select - l("Prologue"), - "Artis", - "Hurnscald", - l("Other"), - rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))); - - switch (@menu) - { - case 1: qDebugShip; break; - case 2: qDebugArtis; break; - case 3: qDebugHurnscald; break; - case 4: qDebugGeneral; break; - case 5: return; - } - } while (1); -} - - - -- script @qdebug 32767,{ - end; - -OnCall: - if (!debug && !is_trusted()) - { - end; - } - GlobalQuestDebug; - closeclientdialog; - end; - -OnSetq: - if (.@atcmd_numparameters < 2) { - dispbottom "setq called with invalid arguments (min. 2)"; - dispbottom "GM Command syntax: @setq "; - end; - } - .@q=atoi(.@atcmd_parameters$[0]); - switch (.@atcmd_numparameters) { - case 4: - setq3 .@q, atoi(.@atcmd_parameters$[3]); - case 3: - setq2 .@q, atoi(.@atcmd_parameters$[2]); - case 2: - setq1 .@q, atoi(.@atcmd_parameters$[1]); - dispbottom l("Quest %s modified by GM", getquestlink(.@q)); - specialeffect 54, SELF, playerattached(); - break; - default: - dispbottom "setq called with invalid arguments (max. 4)"; - dispbottom "GM Command syntax: @setq "; - break; - } - end; - -OnInit: - bindatcmd "qdebug", "@qdebug::OnCall", 0, 99, 0; - bindatcmd "setq", "@qdebug::OnSetq", 99, 99, 1; -} diff --git a/npc/commands/debug-skill.txt b/npc/commands/debug-skill.txt deleted file mode 100644 index 2a3ef551..00000000 --- a/npc/commands/debug-skill.txt +++ /dev/null @@ -1,94 +0,0 @@ -function script GlobalSkillDebug { - - function modifySkill { - - function setSkill { - clear; - mes l("Enter desired skill level:"); - input .@y; - skill getarg(0,1), max(0, min(10, .@y)), 0; - return; - } - - setnpcdialogtitle l("Skill Debug - Modify Skill"); - .@k = getarg(0,1); - .@v = getskilllv(.@k); - select - menuimage("actions/abort", l("Abort")), - rif(.@v > 0, menuimage("actions/remove", l("Remove this skill"))), - rif(.@v < 10, menuimage("actions/raise", l("Raise this skill"))), - rif(.@v > 0, menuimage("actions/lower", l("Lower this skill"))), - menuimage("actions/edit", l("Set the level manually")), - menuimage("actions/back", l("Return to skill debug menu")); - - switch (@menu) - { - case 2: skill .@k, 0, 0; break; - case 3: skill .@k, min(10, .@v + 1), 0; break; - case 4: skill .@k, max(0, .@v - 1), 0; break; - case 5: setSkill .@k; break; - } - - return; - } - - do - { - clear; - setnpcdialogtitle l("Skill Debug"); - mes l("This menu allows you to change your skills."); - mes ""; - - mes "---"; - - .@size = getarraysize(getvariableofnpc(.debug_skills$, "@sdebug")); - - for (.@s = 0; .@s < .@size; ++.@s) { - .@skill$ = getvariableofnpc(.debug_skills$[.@s], "@sdebug"); - mesf("%s: %d", .@skill$, getskilllv(string_to_data(.@skill$))); - } - - mes "---"; - - mes ""; - mes l("Which skill do you wish to change?"); - next; - - .@select$ = implode(getvariableofnpc(.debug_skills$, "@sdebug"), ":"); - - if (getarg(0, 0)) { - .@select$ += ":" + menuimage("actions/back", l("Return to Debug menu")); - } - - select(.@select$); - - if (--@menu == .@size) { - return; - } else { - .@skill$ = getvariableofnpc(.debug_skills$[@menu], "@sdebug"); - modifySkill(string_to_data(.@skill$)); - } - } while (1); -} - - - -- script @sdebug 32767,{ - end; - -OnCall: - if (!debug && !is_admin()) - { - end; - } - GlobalSkillDebug; - closeclientdialog; - end; - -OnInit: - setarray(.debug_skills$, - "NV_BASIC", - "EVOL_CRAFTING"); - - bindatcmd "sdebug", "@sdebug::OnCall", 0, 99, 0; -} diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt old mode 100644 new mode 100755 index 8cc1f1cd..c1ebf81d --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -1,145 +1,984 @@ -function script GlobalDebugMenu { - function resetAll { - function doReset { - resetstatus; - resetskill; - resetlvl 1; - dispbottom l("Reset done!"); - if (getarg(0,0) == 3) - { - closeclientdialog; - doevent "::OnGlobalQuestReset"; // executes in all quest npcs // FIXME: maybe have a `resetquest` buildin? - Zeny = 0; - BankVault = 0; - clearitem; - warp "000-0", 0, 0; // starting point - end; // script must end for doevent to execute - } - return; - } - clear; - setnpcdialogtitle l("Debug - Reset"); - mes l("What do you want to reset?"); - select - menuimage("actions/abort", l("Abort")), - menuimage("actions/reset", l("Reset stats, skills, level")), - menuimage("actions/nuke", l("Reset EVERYTHING")), - menuimage("actions/back", l("Return to Debug menu")); - - switch (@menu) - { - case 2: - case 3: doReset @menu; - } - - return; - } - - function changeLevel { - clear; - setnpcdialogtitle l("Debug - Change level"); - mes l("To change your base level, use this command:"); - mes ""; - mes " " + col("@blvl <" + l("delta") + ">", 3); - next; - mes l("Example:"); - mes "@blvl 50"; - mes " " + l("Raises your base level by 50"); - mes "@blvl -50"; - mes " " + l("Reduces your base level by 50"); - next; - mes l("To change your job level, use this command:"); - mes ""; - mes " " + col("@jlvl <" + l("delta") + ">", 3); - next; - mes l("Example:"); - mes "@jlvl 50"; - mes " " + l("Raises your job level by 50"); - mes "@jlvl -50"; - mes " " + l("Reduces your job level by 50"); - next; - return; - } - function changeStats { - clear; - setnpcdialogtitle l("Debug - Change stats"); - mes l("To change your stats, use these commands:"); - mes ""; - mes " " + col("@str <" + l("delta") + ">", 3); - mes " " + col("@agi <" + l("delta") + ">", 3); - mes " " + col("@vit <" + l("delta") + ">", 3); - mes " " + col("@int <" + l("delta") + ">", 3); - mes " " + col("@dex <" + l("delta") + ">", 3); - mes " " + col("@luk <" + l("delta") + ">", 3); - next; - mes l("Example:"); - mes "@int 50"; - mes " " + l("Raises your Int by 50"); - mes "@int -50"; - mes " " + l("Reduces your Int by 50"); - next; - mes l("If you simply wish to get 99 in all stats:"); - mes ""; - mes " " + col("@allstats", 3); - next; - mes l("If you wish to reset your stats:"); - mes ""; - mes " " + col("@streset", 3); - next; - return; - } - do - { - clear; - setnpcdialogtitle l("Debug"); - mes l("This menu allows you to modify your account data."); - mes ""; - mes l("What do you want to do?"); - select - menuimage("actions/manage", l("Change my level")), - menuimage("actions/manage", l("Change my stats")), - menuimage("actions/manage", l("Change my skills")), - menuimage("actions/manage", l("Change my appearance")), - menuimage("actions/add", l("Create items")), - menuimage("actions/add", l("Get money")), - menuimage("actions/edit", l("Change my quests")), - rif(debug, menuimage("actions/reset", l("Set Legacy Account"))), - menuimage("actions/reset", l("Reset")), - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); - - .@c = getarg(0,0) ? 2 : 1; - - switch (@menu) - { - case 1: changeLevel; break; - case 2: changeStats; break; - case 3: GlobalSkillDebug .@c; break; - case 4: BarberDebug .@c; break; - case 5: closeclientdialog; clientcommand "createitems"; end; - case 6: Zeny = 0x7FFFFFFE; break; - case 7: GlobalQuestDebug .@c; break; - case 8: setfakelegacyaccount(); break; - case 9: resetAll; break; - case 10: return; - } - } while(1); + +function script Debug { + if(!@debug_npc) goto L_Begin; + mes "The debug NPCs have been deprecated. Please use this command instead:"; + mes ""; + mes "%%E ##a@debug##0"; + @debug_npc = 0; + goto L_close; + +L_Begin: + @debug_mask = 65535; + @debug_shift = 0; + @mexp = ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift); + mes "What do you want to do?"; + menu + "Change my level.", L_Level, + "Change my stats.", L_Status, + "Change my basic skills.", L_BasicSkills, + "Change my focus skills.", L_FocusSkills, + "Change my magic skills.", L_MagicSkills, + "Add everything.", L_AddAll, + "Reset everything.", L_ResetAll, + "Close.", L_close; + +L_Level: + mes "What level do you want to be (min: 1 - max: 99)?"; + input @lvl; + if (@lvl < 1) + goto L_LevelTooLow; + if (@lvl > 99) + goto L_LevelTooHigh; + if (BaseLevel == @lvl) + goto L_SameLevel; + BaseLevel = @lvl; + resetstatus; + mes "You are now level " + BaseLevel + "."; + goto L_Begin; + +L_LevelTooLow: + mes "Bad choice. Minimum level is 1."; + next; + goto L_Begin; + +L_LevelTooHigh: + mes "Bad choice. Maximum level is 99."; + next; + goto L_Begin; + +L_SameLevel: + mes "You already are level " + @lvl + "."; + next; + goto L_Begin; + +L_Status: + mes "What do you want to do?"; + menu + "Set all of my stats myself.", L_ChangeStrength, + "Set one of my stats myself.", L_ChangeSingleStat, + "Get maximum points in all stats.", L_ChangeAllStats, + "Reset my status points.", L_ResetStatusPoints, + "Back to the main menu.", L_Begin, + "Close.", L_close; + +L_ChangeAllStats: + Str = 99; + Agi = 99; + Vit = 99; + Int = 99; + Dex = 99; + Luk = 99; + mes "You now have 99 in all stats."; + next; + goto L_Begin; + +L_ChangeStrength: + mes "How much strength do you want to have (min: 1 - max: 99)?"; + input @str; + if (@str < 1) + goto L_StatTooLow; + if (@str > 99) + goto L_StatTooHigh; + Str = @str; + goto L_ChangeAgility; + +L_ChangeAgility: + mes "How much agility do you want to have (min: 1 - max: 99)?"; + input @agi; + if (@agi < 1) + goto L_StatTooLow; + if (@agi > 99) + goto L_StatTooHigh; + Agi = @agi; + goto L_ChangeVitality; + +L_ChangeVitality: + mes "How much vitality do you want to have (min: 1 - max: 99)?"; + input @vit; + if (@vit < 1) + goto L_StatTooLow; + if (@vit > 99) + goto L_StatTooHigh; + Vit = @vit; + goto L_ChangeIntelligence; + +L_ChangeIntelligence: + mes "How much intelligence do you want to have (min: 1 - max: 99)?"; + input @int; + if (@int < 1) + goto L_StatTooLow; + if (@int > 99) + goto L_StatTooHigh; + Int = @int; + goto L_ChangeDexterity; + +L_ChangeDexterity: + mes "How much dexterity do you want to have (min: 1 - max: 99)?"; + input @dex; + if (@dex < 1) + goto L_StatTooLow; + if (@dex > 99) + goto L_StatTooHigh; + Dex = @dex; + goto L_ChangeLuck; + +L_ChangeLuck: + mes "How much luck do you want to have (min: 1 - max: 99)?"; + input @luk; + if (@luk < 1) + goto L_StatTooLow; + if (@luk > 99) + goto L_StatTooHigh; + Luk = @luk; + mes "You now have " + Str + " in strength."; + mes "You now have " + Agi + " in agility."; + mes "You now have " + Vit + " in vitality."; + mes "You now have " + Int + " in intelligence."; + mes "You now have " + Dex + " in dexterity."; + mes "You now have " + Luk + " in luck."; + next; + goto L_Begin; + +L_StatTooLow: + mes "Bad choice. Minimum stat value is 1. Aborting."; + next; + goto L_Status; + +L_StatTooHigh: + mes "Bad choice. Maximum stat value is 99. Aborting."; + next; + goto L_Status; + +L_ChangeSingleStat: + mes "Which stat do you want to change?"; + menu + "Strength.", L_ChangeStrengthSingle, + "Agility.", L_ChangeAgilitySingle, + "Vitality.", L_ChangeVitalitySingle, + "Intelligence.", L_ChangeIntelligenceSingle, + "Dexterity.", L_ChangeDexteritySingle, + "Luck.", L_ChangeLuckSingle, + "Back to the main menu.", L_Begin, + "Close.", L_close; + +L_ChangeStrengthSingle: + mes "How much strength do you want to have (min: 1 - max: 99)?"; + input @str; + if (@str < 1) + goto L_StatTooLow; + if (@str > 99) + goto L_StatTooHigh; + Str = @str; + mes "You now have " + Str + " in strength."; + next; + goto L_Begin; + +L_ChangeAgilitySingle: + mes "How much agility do you want to have (min: 1 - max: 99)?"; + input @agi; + if (@agi < 1) + goto L_StatTooLow; + if (@agi > 99) + goto L_StatTooHigh; + Agi = @agi; + mes "You now have " + Agi + " in agility."; + next; + goto L_Begin; + +L_ChangeVitalitySingle: + mes "How much vitality do you want to have (min: 1 - max: 99)?"; + input @vit; + if (@vit < 1) + goto L_StatTooLow; + if (@vit > 99) + goto L_StatTooHigh; + Vit = @vit; + mes "You now have " + Vit + " in vitality."; + next; + goto L_Begin; + +L_ChangeIntelligenceSingle: + mes "How much intelligence do you want to have (min: 1 - max: 99)?"; + input @int; + if (@int < 1) + goto L_StatTooLow; + if (@int > 99) + goto L_StatTooHigh; + Int = @int; + mes "You now have " + Int + " in intelligence."; + next; + goto L_Begin; + +L_ChangeDexteritySingle: + mes "How much dexterity do you want to have (min: 1 - max: 99)?"; + input @dex; + if (@dex < 1) + goto L_StatTooLow; + if (@dex > 99) + goto L_StatTooHigh; + Dex = @dex; + mes "You now have " + Dex + " in dexterity."; + next; + goto L_Begin; + +L_ChangeLuckSingle: + mes "How much luck do you want to have (min: 1 - max: 99)?"; + input @luk; + if (@luk < 1) + goto L_StatTooLow; + if (@luk > 99) + goto L_StatTooHigh; + Luk = @luk; + mes "You now have " + Luk + " in luck."; + next; + goto L_Begin; + +L_ResetStatusPoints: + resetstatus; + mes "Stats successfully resetted."; + next; + goto L_Begin; + +L_BasicSkills: + @emote = getskilllv(SKILL_EMOTE); + @trade = getskilllv(SKILL_TRADE); + @party = getskilllv(SKILL_PARTY); + menu + "Overview of my basic skills.", L_BasicSkillsOverview, + "Add basic skills.", L_AddBasicSkills, + "Reset basic skills.", L_ResetBasicSkills, + "Back to main menu.", L_Begin, + "Close.", L_close; + +L_BasicSkillsOverview: + mes "Your level in the emote skill is " + @emote + "."; + mes "Your level in the trade skill is " + @trade + "."; + mes "Your level in the party skill is " + @party + "."; + next; + goto L_BasicSkills; + +L_AddBasicSkills: + menu + "Emote", L_ChangeEmoteSkill, + "Trade.", L_ChangeTradeSkill, + "Party.", L_ChangePartySkill, + "All basic skills to their maximum level.", L_AllBasicSkills, + "Back to the basic skills menu.", L_BasicSkills, + "Close.", L_close; + +L_ChangeEmoteSkill: + mes "Your level in the emote skill is " + @emote + ". What do you want to do?"; + menu + "Get level 0.", L_Next, + "Get level 1.", L_ChangeEmoteSkill1; + +L_Next: + if (@menu == 1) + addtoskill SKILL_EMOTE, 0; + mes "Emote skill changed to level 0."; + next; + goto L_BasicSkills; + +L_ChangeEmoteSkill1: + addtoskill SKILL_EMOTE, 1; + mes "Emote skill changed to level 1."; + next; + goto L_BasicSkills; + +L_ChangeTradeSkill: + mes "Your level in the trade skill is " + @trade + ". What do you want to do?"; + menu + "Get level 0.", L_Next1, + "Get level 1.", L_ChangeTradeSkill1; + +L_Next1: + if (@menu == 1) + addtoskill SKILL_TRADE, 0; + mes "Trade skill changed to level 0."; + next; + goto L_BasicSkills; + +L_ChangeTradeSkill1: + addtoskill SKILL_TRADE, 1; + mes "Trade skill changed to level 1."; + next; + goto L_BasicSkills; + +L_ChangePartySkill: + mes "Your level in the party skill is " + @trade + ". What do you want to do?"; + menu + "Get level 0.", L_Next2, + "Get level 1.", L_ChangePartySkill1, + "Get level 2.", L_ChangePartySkill2; + +L_Next2: + if (@menu == 1) + addtoskill SKILL_PARTY, 0; + mes "Party skill changed to level 0."; + next; + goto L_BasicSkills; + +L_ChangePartySkill1: + addtoskill SKILL_PARTY, 1; + mes "Party skill changed to level 1."; + next; + goto L_BasicSkills; + +L_ChangePartySkill2: + addtoskill SKILL_PARTY, 2; + mes "Party skill changed to level 2."; + next; + goto L_BasicSkills; + +L_AllBasicSkills: + addtoskill SKILL_EMOTE, 1; + addtoskill SKILL_TRADE, 1; + addtoskill SKILL_PARTY, 2; + mes "Basic skills added."; + next; + goto L_BasicSkills; + +L_ResetBasicSkills: + addtoskill SKILL_EMOTE, 0; + addtoskill SKILL_TRADE, 0; + addtoskill SKILL_PARTY, 0; + mes "Basic skills removed."; + next; + goto L_BasicSkills; + +L_FocusSkills: + @pool = getskilllv(SKILL_POOL); + @mallard = getskilllv(SKILL_MALLARDS_EYE); + @brawling = getskilllv(SKILL_BRAWLING); + @speed = getskilllv(SKILL_SPEED); + @poison = getskilllv(SKILL_RESIST_POISON); + @astralsoul = getskilllv(SKILL_ASTRAL_SOUL); + @raging = getskilllv(SKILL_RAGING); + menu + "Overview of my focus skills.", L_SeeFocusSkills, + "Focus or unfocus.", L_Unfocus, + "Add focus skills.", L_ChangeFocusSkills, + "Reset focus skills.", L_ResetFocusSkills, + "Back to the main menu.", L_Begin, + "Close.", L_close; + +L_SeeFocusSkills: + cleararray @skilllist_name$[0], "", 8; + cleararray @skilllist_id[0], 0, 8; + cleararray @skilllist_count[0], 0, 8; + getactivatedpoolskilllist; + if (@skilllist_count == 0) + goto L_NotFocusedMessage; + if (@skilllist_count != 0) + mes "You are currently focused on the " + @skilllist_name$[@skilllist_count-1] + " skill."; + goto L_FocusSkills; + +L_NotFocusedMessage: + mes "You are not focused on any skill right now."; + goto L_FocusSkillsOverview; + +L_FocusSkillsOverview: + mes "Your focusing skill level is " + @pool + "."; + mes "Your mallard's eye skill level is " + @mallard + "."; + mes "Your brawling skill level is " + @brawling + "."; + mes "Your speed skill level is " + @speed + "."; + mes "Your resist poison skill level is " + @poison + "."; + mes "Your astral soul skill level is " + @astralsoul + "."; + mes "Your raging skill level is " + @raging + "."; + next; + goto L_FocusSkills; + +L_Unfocus: + cleararray @skilllist_name$[0], "", 8; + cleararray @skilllist_id[0], 0, 8; + cleararray @skilllist_count[0], 0, 8; + if (getskilllv(SKILL_POOL) == 0) + addtoskill SKILL_POOL, 1; + getactivatedpoolskilllist; + if (@skilllist_count == 0) + goto L_Focus; + getactivatedpoolskilllist; + if (@skilllist_count != 0) + goto L_AskUnfocus; + mes "You are not focused on a skill at the moment."; + goto L_FocusSkills; + +L_Focus: + cleararray @skilllist_name$[0], "", 8; + cleararray @skilllist_id[0], 0, 8; + cleararray @skilllist_count[0], 0, 8; + getunactivatedpoolskilllist; + if (@skilllist_count == 0) + goto L_NoFocusSkills; + @skilllist_id[@skilllist_count] = 0; + @skilllist_name$[@skilllist_count] = "Back to the focus skills menu."; + mes "You are not focused on any focus skill right now. Which one do you want to focus on?"; + menu + @skilllist_name$[0], L_MenuItems, + @skilllist_name$[1], L_MenuItems, + @skilllist_name$[2], L_MenuItems, + @skilllist_name$[3], L_MenuItems, + @skilllist_name$[4], L_MenuItems, + @skilllist_name$[5], L_MenuItems, + @skilllist_name$[6], L_MenuItems, + @skilllist_name$[7], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + poolskill @skilllist_id[@menu]; + goto L_FocusSkills; + +L_NoFocusSkills: + mes "You have no skills to focus on or unfocus from."; + goto L_FocusSkills; + +L_AskUnfocus: + mes "Unfocus " + @skilllist_name$[@skilllist_count-1] + "?"; + menu + "Yes.", L_Next3, + "No.", L_FocusSkills; + +L_Next3: + unpoolskill @skilllist_id[@skilllist_count-1]; + goto L_FocusSkills; + +L_ChangeFocusSkills: + menu + "Focusing.", L_ChangeFocusingSkill, + "Mallard's Eye.", L_ChangeMallardsEyeSkill, + "Brawling.", L_ChangeBrawlingSkill, + "Speed.", L_ChangeSpeedSkill, + "Resist Poison.", L_ChangeResistPoisonSkill, + "Astral Soul.", L_ChangeAstralSoulSkill, + "Raging.", L_ChangeRagingSkill, + "All focus skills to their maximum level.", L_AllFocusSkills, + "Back to the focus skills menu.", L_FocusSkills, + "Close.", L_close; + +L_BadSkillLevel: + mes "Invalid skill level."; + next; + goto L_ChangeFocusSkills; + +L_ChangeFocusingSkill: + mes "Enter the level you want to be in this skill (min: 0 - max: 1)."; + input @lvl; + if (@lvl > 1) + goto L_BadSkillLevel; + addtoskill SKILL_POOL, @lvl; + next; + goto L_FocusSkills; + +L_ChangeMallardsEyeSkill: + mes "Enter the level you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_MALLARDS_EYE, @lvl; + next; + goto L_FocusSkills; + +L_ChangeBrawlingSkill: + mes "Enter the lvl you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_BRAWLING, @lvl; + next; + goto L_FocusSkills; + +L_ChangeSpeedSkill: + mes "Enter the lvl you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_SPEED, @lvl; + next; + goto L_FocusSkills; + +L_ChangeResistPoisonSkill: + mes "Enter the lvl you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_RESIST_POISON, @lvl; + next; + goto L_FocusSkills; + +L_ChangeAstralSoulSkill: + mes "Enter the lvl you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_ASTRAL_SOUL, @lvl; + next; + goto L_FocusSkills; + +L_ChangeRagingSkill: + mes "Enter the lvl you want to be in this skill (min: 0 - max: 9)."; + input @lvl; + if (@lvl > 9) + goto L_BadSkillLevel; + addtoskill SKILL_RAGING, @lvl; + next; + goto L_FocusSkills; + +L_AllFocusSkills: + addtoskill SKILL_POOL, 1; + addtoskill SKILL_MALLARDS_EYE, 9; + addtoskill SKILL_BRAWLING, 9; + addtoskill SKILL_SPEED, 9; + addtoskill SKILL_RESIST_POISON, 9; + addtoskill SKILL_ASTRAL_SOUL, 9; + addtoskill SKILL_RAGING, 9; + mes "Focus skills added."; + next; + goto L_FocusSkills; + +L_ResetFocusSkills: + addtoskill SKILL_POOL, 0; + addtoskill SKILL_MALLARDS_EYE, 0; + addtoskill SKILL_BRAWLING, 0; + addtoskill SKILL_SPEED, 0; + addtoskill SKILL_RESIST_POISON, 0; + addtoskill SKILL_ASTRAL_SOUL, 0; + addtoskill SKILL_RAGING, 0; + mes "Focus skills removed."; + next; + goto L_FocusSkills; + +L_MagicSkills: + @general = getskilllv(SKILL_MAGIC); + @life = getskilllv(SKILL_MAGIC_LIFE); + @war = getskilllv(SKILL_MAGIC_WAR); + @trans = getskilllv(SKILL_MAGIC_TRANSMUTE); + @nature = getskilllv(SKILL_MAGIC_NATURE); + @astral = getskilllv(SKILL_MAGIC_ASTRAL); + @dark = getskilllv(SKILL_MAGIC_DARK); + menu + "Overview of my magical skills.", L_MagicSkillsOverview, + "Get magic skills.", L_ChangeMagicSkills, + "Get magic experience.", L_MagicExperience, + "All magic skills to their maximum level and maximum magic experience.", L_GetAllMagic, + "Reset magic skills and experience.", L_ResetMagicSkills, + "Back to the main menu.", L_Begin, + "Close.", L_close; + +L_MagicSkillsOverview: + mes "Your current magic experience skill is " + @mexp + "."; + mes "Your level in the general magic skill is " + @general + "."; + mes "Your level in the life magic skill is " + @life + "."; + mes "Your level in the war magic skill is " + @war + "."; + mes "Your level in the transmutation magic skill is " + @trans + "."; + mes "Your level in the nature magic skill is " + @nature + "."; + mes "Your level in the astral magic skill is " + @astral + "."; + mes "Your level in the dark magic skill is " + @dark + "."; + next; + goto L_MagicSkills; + +L_MagicExperience: + mes "Your current magic experience is " + @mexp + "."; + if (@general == 0 + && @life == 0 + && @war == 0 + && @trans == 0 + && @nature == 0 + && @astral == 0 + && @dark == 0) + goto L_NoMagicSkills; + + goto L_ChangeMagicExperience; + +L_NoMagicSkills: + mes "You can't have magic experience, since you have no magic skills yet."; + goto L_MagicSkills; + +L_ChangeMagicExperience: + mes "Set the desired magic experience (min: 0 - max: 8000)."; + input @value; + if (@value < 0 || @value > 8000) + goto L_WrongMagicExperience; + @mexp = @value; + callsub S_Update_Mask; + mes "You now have " + @mexp + " magic experience points."; + goto L_MagicSkills; + +L_WrongMagicExperience: + mes "Wrong value informed. Aborting."; + goto L_MagicSkills; + +L_ChangeMagicSkills: + menu + "General Magic.", L_ChangeGeneralMagicSkill, + "Life Magic.", L_ChangeLifeMagicSkill, + "War Magic.", L_ChangeWarMagicSkill, + "Transmutation Magic.", L_ChangeTransmutationMagicSkill, + "Nature Magic.", L_ChangeNatureMagicSkill, + "Astral Magic.", L_ChangeAstralMagicSkill, + "Dark Magic.", L_ChangeDarkMagicSkill, + "Back to the magic skills menu.", L_MagicSkills, + "Close.", L_close; + +L_ChangeGeneralMagicSkill: + mes "Your level in the general magic skill is " + @general + ". What do you want to do?"; + menu + "Get level 0.", L_Next4, + "Get level 1.", L_ChangeGeneralMagicSkill1, + "Get level 2.", L_ChangeGeneralMagicSkill2; + +L_Next4: + if (@menu == 1) + addtoskill SKILL_MAGIC, 0; + mes "General Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeGeneralMagicSkill1: + addtoskill SKILL_MAGIC, 1; + mes "General Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeGeneralMagicSkill2: + addtoskill SKILL_MAGIC, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "General Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeLifeMagicSkill: + mes "Your level in the life magic skill is " + @life + ". What do you want to do?"; + menu + "Get level 0.", L_Next5, + "Get level 1.", L_ChangeLifeMagicSkill1, + "Get level 2.", L_ChangeLifeMagicSkill2; + +L_Next5: + if (@menu == 1) + addtoskill SKILL_MAGIC_LIFE, 0; + mes "Life Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeLifeMagicSkill1: + addtoskill SKILL_MAGIC_LIFE, 1; + mes "Life Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeLifeMagicSkill2: + addtoskill SKILL_MAGIC_LIFE, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "Life Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeWarMagicSkill: + mes "Your level in the war magic skill is " + @war + ". What do you want to do?"; + menu + "Get level 0.", L_Next6, + "Get level 1.", L_ChangeWarMagicSkill1, + "Get level 2.", L_ChangeWarMagicSkill2; + +L_Next6: + if (@menu == 1) + addtoskill SKILL_MAGIC_WAR, 0; + mes "War Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeWarMagicSkill1: + addtoskill SKILL_MAGIC_WAR, 1; + mes "War Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeWarMagicSkill2: + addtoskill SKILL_MAGIC_WAR, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "War Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeTransmutationMagicSkill: + mes "Your level in the transmutation magic skill is " + @trans + ". What do you want to do?"; + menu + "Get level 0.", L_Next7, + "Get level 1.", L_ChangeTransmutationMagicSkill1, + "Get level 2.", L_ChangeTransmutationMagicSkill2; + +L_Next7: + if (@menu == 1) + addtoskill SKILL_MAGIC_TRANSMUTE, 0; + mes "Transmutation Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeTransmutationMagicSkill1: + addtoskill SKILL_MAGIC_TRANSMUTE, 1; + mes "Transmutation Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeTransmutationMagicSkill2: + addtoskill SKILL_MAGIC_TRANSMUTE, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "Transmutation Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeNatureMagicSkill: + mes "Your level in the nature magic skill is " + @nature + ". What do you want to do?"; + menu + "Get level 0.", L_Next8, + "Get level 1.", L_ChangeNatureMagicSkill1, + "Get level 2.", L_ChangeNatureMagicSkill2; + +L_Next8: + if (@menu == 1) + addtoskill SKILL_MAGIC_NATURE, 0; + mes "Nature Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeNatureMagicSkill1: + addtoskill SKILL_MAGIC_NATURE, 1; + mes "Nature Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeNatureMagicSkill2: + addtoskill SKILL_MAGIC_NATURE, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "Nature Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeAstralMagicSkill: + mes "Your level in the astral magic skill is " + @astral + ". What do you want to do?"; + menu + "Get level 0.", L_Next9, + "Get level 1.", L_ChangeAstralMagicSkill1, + "Get level 2.", L_ChangeAstralMagicSkill2; + +L_Next9: + if (@menu == 1) + addtoskill SKILL_MAGIC_ASTAL, 0; + mes "Astral Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeAstralMagicSkill1: + addtoskill SKILL_MAGIC_ASTRAL, 1; + mes "Astral Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeAstralMagicSkill2: + addtoskill SKILL_MAGIC_ASTRAL, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "Astral Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +L_ChangeDarkMagicSkill: + mes "Your level in the dark magic skill is " + @dark + ". What do you want to do?"; + menu + "Get level 0.", L_Next10, + "Get level 1.", L_ChangeDarkMagicSkill1, + "Get level 2.", L_ChangeDarkMagicSkill2; + +L_Next10: + if (@menu == 1) + addtoskill SKILL_MAGIC_DARK, 0; + mes "Dark Magic skill changed to level 0."; + next; + goto L_MagicSkills; + +L_ChangeDarkMagicSkill1: + addtoskill SKILL_MAGIC_DARK, 1; + mes "Dark Magic skill changed to level 1."; + next; + goto L_MagicSkills; + +L_ChangeDarkMagicSkill2: + addtoskill SKILL_MAGIC_DARK, 2; + if (@mexp < 100) + @mexp = 100; + callsub S_Update_Mask; + mes "Dark Magic skill changed to level 2."; + next; + goto L_MagicSkills; + +S_Update_Mask: + set MAGIC_EXPERIENCE, + (MAGIC_EXPERIENCE & ~(@debug_mask)) + | (@mexp << @debug_shift); + return; + +L_GetAllMagic: + addtoskill SKILL_MAGIC, 5; + addtoskill SKILL_MAGIC_LIFE, 5; + addtoskill SKILL_MAGIC_WAR, 5; + addtoskill SKILL_MAGIC_TRANSMUTE, 5; + addtoskill SKILL_MAGIC_NATURE, 5; + addtoskill SKILL_MAGIC_ASTRAL, 5; + addtoskill SKILL_MAGIC_DARK, 5; + @mexp = 8000; + callsub S_Update_Mask; + mes "Magic skills added."; + next; + goto L_MagicSkills; + +L_ResetMagicSkills: + addtoskill SKILL_MAGIC, 0; + addtoskill SKILL_MAGIC_LIFE, 0; + addtoskill SKILL_MAGIC_WAR, 0; + addtoskill SKILL_MAGIC_TRANSMUTE, 0; + addtoskill SKILL_MAGIC_NATURE, 0; + addtoskill SKILL_MAGIC_ASTRAL, 0; + addtoskill SKILL_MAGIC_DARK, 0; + @mexp = 0; + callsub S_Update_Mask; + mes "Magic skills removed."; + next; + goto L_MagicSkills; + +L_AddAll: + addtoskill SKILL_EMOTE, 1; + addtoskill SKILL_TRADE, 1; + addtoskill SKILL_PARTY, 2; + addtoskill SKILL_POOL, 1; + addtoskill SKILL_MALLARDS_EYE, 9; + addtoskill SKILL_BRAWLING, 9; + addtoskill SKILL_SPEED, 9; + addtoskill SKILL_RESIST_POISON, 9; + addtoskill SKILL_ASTRAL_SOUL, 9; + addtoskill SKILL_RAGING, 9; + addtoskill SKILL_MAGIC, 5; + addtoskill SKILL_MAGIC_LIFE, 5; + addtoskill SKILL_MAGIC_WAR, 5; + addtoskill SKILL_MAGIC_TRANSMUTE, 5; + addtoskill SKILL_MAGIC_NATURE, 5; + addtoskill SKILL_MAGIC_ASTRAL, 5; + addtoskill SKILL_MAGIC_DARK, 5; + @mexp = 8000; + resetstatus; + BaseLevel = 99; + mes "All skills added to their maximum level."; + mes "Maximum number of Magic Experience points."; + mes "You are now level " + BaseLevel + "."; + next; + goto L_Begin; + +L_ResetAll: + cleararray @skilllist_name$[0], "", 8; + cleararray @skilllist_id[0], 0, 8; + cleararray @skilllist_count[0], 0, 8; + addtoskill SKILL_EMOTE, 0; + addtoskill SKILL_TRADE, 0; + addtoskill SKILL_PARTY, 0; + addtoskill SKILL_POOL, 0; + addtoskill SKILL_MALLARDS_EYE, 0; + addtoskill SKILL_BRAWLING, 0; + addtoskill SKILL_SPEED, 0; + addtoskill SKILL_RESIST_POISON, 0; + addtoskill SKILL_ASTRAL_SOUL, 0; + addtoskill SKILL_RAGING, 0; + addtoskill SKILL_MAGIC, 0; + addtoskill SKILL_MAGIC_LIFE, 0; + addtoskill SKILL_MAGIC_WAR, 0; + addtoskill SKILL_MAGIC_TRANSMUTE, 0; + addtoskill SKILL_MAGIC_NATURE, 0; + addtoskill SKILL_MAGIC_ASTRAL, 0; + addtoskill SKILL_MAGIC_DARK, 0; + @mexp = 0; + callsub S_Update_Mask; + resetstatus; + BaseLevel = 1; + mes "All skills removed."; + mes "Minimum number of Magic Experience points."; + mes "You are now level " + BaseLevel + "."; + next; + goto L_Begin; + +L_close: + close2; + return; + } +- script Debug Spell NPC32767,{ + if(!debug && getgmlevel() < CMD_DEBUG) end; + callfunc "Debug"; + end; +OnDeprecated: + message strcharinfo(0), "Debug : ##3The #debug spell has been superseded by the ##B@debug##b command."; + end; +OnInit: + registercmd "@debug", "Debug Spell"; + registercmd "#debug", "Debug Spell::OnDeprecated"; + end; +} +029-2,30,26,0 script Debug#0 NPC154,{ + @debug_npc = 1; + callfunc "Debug"; + end; +OnInit: + if (!debug) + disablenpc "Debug#0"; + end; +} -- script @debug 32767,{ +001-1,53,47,0 script Debug#1 NPC154,{ + @debug_npc = 1; + callfunc "Debug"; + end; +OnInit: + if (!debug) + disablenpc "Debug#1"; end; +} -OnCall: - if (!debug && !is_admin()) - { - end; - } - GlobalDebugMenu; - closeclientdialog; +009-1,45,33,0 script Debug#2 NPC154,{ + @debug_npc = 1; + callfunc "Debug"; + end; +OnInit: + if (!debug) + disablenpc "Debug#2"; end; +} +020-1,75,85,0 script Debug#3 NPC154,{ + @debug_npc = 1; + callfunc "Debug"; + end; OnInit: - bindatcmd "debug", "@debug::OnCall", 0, 99, 0; - // TODO / FIXME: add a @test command that opens the help window for test-server + if (!debug) + disablenpc "Debug#3"; + end; +} + +027-2,125,103,0 script Debug#5 NPC154,{ + @debug_npc = 1; + callfunc "Debug"; + end; +OnInit: + if (!debug) + disablenpc "Debug#5"; + end; } diff --git a/npc/commands/destroynpc.txt b/npc/commands/destroynpc.txt new file mode 100755 index 00000000..156c8200 --- /dev/null +++ b/npc/commands/destroynpc.txt @@ -0,0 +1,34 @@ +- script @destroynpc NPC32767,{ + callfunc "argv_splitter"; + if (GM < CMD_DESTROYNPC && GM < G_SYSOP) + goto L_GM; + + .@id = getnpcid(@argv$[0]); + if (@argv$[0] == "" || .@id < 1) + goto L_Failed; + if (gettimetick(2) - @destroynpc[0] > 300 || @destroynpc[1] != .@id) + goto L_Confirm; + + gmlog "@destroynpc " + @args$; + message strcharinfo(0), "destroynpc : The operation succeeded."; + debugmes "!!! => npc destroyed: `"+@argv$[0]+"` ("+.@id+")"; + if (1==1) destroy .@id; // FIXME: allow destroy to work as a non-terminator when arg0 is given (TMWA) + end; + +L_Confirm: + message strcharinfo(0), "destroynpc : ##BDANGER ZONE!##b This command permanently destroys a npc and its puppets (if any). Use the command again to confirm."; + setarray @destroynpc[0], gettimetick(2), .@id; + end; + +L_Failed: + message strcharinfo(0), "destroynpc : Impossible to find the target npc. Did you try putting the name in \"quotation marks\"? Some npcs also have an invisible postfix in their name, ie `#_M`."; + end; + +L_GM: + message strcharinfo(0), "destroynpc : GM command is level "+ CMD_DESTROYNPC +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "destroynpc", strnpcinfo(0); + end; +} diff --git a/npc/commands/event.txt b/npc/commands/event.txt deleted file mode 100644 index 3f0d61de..00000000 --- a/npc/commands/event.txt +++ /dev/null @@ -1,57 +0,0 @@ -function script GlobalEventMenu { - - function rateManagement { - clear; - mes l("To get the current rate:"); - mes col(" @exprate", 7); - next; - mes l("To set the exp rate:"); - mes col(" @exprate ##Brate##b hours", 7); - next; - mes l("To reset back to normal:"); - mes col(" @exprate default", 7); // note to translators: any non-numerical value will reset so "default" is safe to translate - next; - return; - } - - do - { - clear; - setnpcdialogtitle l("Event Management"); - mes l("This menu allows you to manage events and gives access to event-related tools."); - mes ""; - mes l("What do you want to access?"); - - select - l("Rate management"), - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); - - //.@c = getarg(0,0) ? 2 : 1; // 1 = back to event menu, 2 = back to super menu - - switch (@menu) - { - case 1: rateManagement; break; - default: return; - } - - } while (true); -} - - - -- script @event 32767,{ - end; - -OnCall: - if (!is_evtc()) - { - end; - } - - GlobalEventMenu; - closeclientdialog; - end; - -OnInit: - bindatcmd "event", "@event::OnCall", 0, 99, 0; -} diff --git a/npc/commands/gm.txt b/npc/commands/gm.txt deleted file mode 100644 index b402cda8..00000000 --- a/npc/commands/gm.txt +++ /dev/null @@ -1,41 +0,0 @@ -// @showgm/@hidegm atcommand -// TEMPORALY hides GM level (or revert it) -// -// group lv: 20+ -// group char lv: 99 -// log: False -// -// usage: -// @showgm -// #showgm "char" -// - -- script @group 32767,{ - end; - -OnHide: - .@gm=getgroupid(); - if (.@gm < 20) end; - if (.@gm % 10 != 0) end; - setgroupid(.@gm+1); - dispbottom "hidelevel : "+l("Your GM level is now hidden."); - end; - -OnShow: - .@gm=getgroupid(); - if (.@gm < 20) end; - if (.@gm % 10 != 1) end; - setgroupid(.@gm-1); - dispbottom "showlevel : "+l("Your GM level is now visible."); - end; - -OnInit: - bindatcmd "showgroup", "@group::OnShow", 20, 99, 0; - bindatcmd "showgm", "@group::OnShow", 20, 99, 0; - bindatcmd "showlevel", "@group::OnShow", 20, 99, 0; - - bindatcmd "hidegroup", "@group::OnHide", 20, 99, 0; - bindatcmd "hidegm", "@group::OnHide", 20, 99, 0; - bindatcmd "hidelevel", "@group::OnHide", 20, 99, 0; - end; -} diff --git a/npc/commands/hug.txt b/npc/commands/hug.txt new file mode 100755 index 00000000..4f7c086d --- /dev/null +++ b/npc/commands/hug.txt @@ -0,0 +1,24 @@ +- script nonmagic-hug NPC32767,{ + explode .@name$[0], @args$, "*"; // strip the trailing * + @target_id = if_then_else(.@name$[0] != "", getcharid(3, .@name$[0]), BL_ID); + if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (.@name$[0] == "Tree" || .@name$[0] == "tree") set @target_id, .tree_id; + .@range = if_then_else(@target_id == .tree_id, 3, 6); + if (distance(BL_ID, @target_id) >= .@range) end; + if (gettimetick(2) - @hugspell_time < 3) end; + + @hugspell_time = gettimetick(2); + misceffect FX_HUG, strcharinfo(0); + if (@target_id != BL_ID) misceffect FX_HUG, @target_id; + + if (@target_id != .tree_id) end; + @flag = 2; + callfunc "QuestTreeTrigger"; + close; + +OnInit: + .tree_id = getnpcid("#DruidTree0#_M"); + registercmd "*hugs", strnpcinfo(0); // eq: /me hugs (target) + registercmd "*hugs*", strnpcinfo(0); // eq: /me hugs + end; +} diff --git a/npc/commands/marry.txt b/npc/commands/marry.txt new file mode 100755 index 00000000..ad2ed5fc --- /dev/null +++ b/npc/commands/marry.txt @@ -0,0 +1,68 @@ +- script special-marry NPC32767,{ + .@target_id = getcharid(3, @args$); + if (.@target_id < 1 || !(isloggedin(.@target_id)) || .@target_id == BL_ID) goto L_NotFound; + if (PARTNER || get(PARTNER, .@target_id)) goto L_AlreadyMarried; + if (isin("014-1",29,36,34,39) == 0 && isin("001-1",20,27,22,27) == 0) goto L_NotInArea; + if (distance(BL_ID, .@target_id) != 1) goto L_AwayFromPartner; + if (BaseLevel < WEDDING_MIN_LEVEL || get(BaseLevel, .@target_id) < WEDDING_MIN_LEVEL) goto L_TooYoung; + if (getequipid(equip_shield) != 702 || getequipid(equip_shield, @args$) != 702) goto L_NoRing; + + if (get(@marriage[0], .@target_id) == BL_ID) goto L_Proceed; + + setarray @marriage[0], .@target_id, gettimetick(2); + addtimer (.timeout * 1000), strnpcinfo(0) + "::OnTimeout"; + announce strcharinfo(0) + " is asking " + strcharinfo(0, .@target_id) + " for marriage.", 2; + message strcharinfo(0, .@target_id), "Marriage : ##3##B" + strcharinfo(0) + " wishes to marry you. To accept, write `##1#marry "+strcharinfo(0)+"##3` within the next "+.timeout+" seconds."; + end; + +L_NotFound: + message strcharinfo(0), "Marriage : ##3##BThe target player is either not found or yourself."; + end; + +L_TooYoung: + message strcharinfo(0), "Marriage : ##3##BYou and your partner need to be at least level "+ WEDDING_MIN_LEVEL +"."; + end; + +L_NoRing: + message strcharinfo(0), "Marriage : ##3##BYou and your partner need to have ["+ getitemlink("WeddingRing") +"] equipped."; + end; + +L_AwayFromPartner: + message strcharinfo(0), "Marriage : ##3##BYou and your partner need to be standing next to each other."; + end; + +L_NotInArea: + message strcharinfo(0), "Marriage : ##3##BYou are not standing in a designated marriage area."; + end; + +L_Proceed: + if ((gettimetick(2) - .timeout) > get(@marriage[1], .@target_id)) goto L_TooLate; + PARTNER = CHAR_ID, .@target_id; + if (PARTNER == get(CHAR_ID, .@target_id)) goto L_Success; + PARTNER = 0, .@target_id; + PARTNER = 0; + end; + +L_Success: + announce strcharinfo(0) + " and " + strcharinfo(0, .@target_id) + " are now married.", 2; + end; + +OnTimeout: + goto L_TooLate; + +L_TooLate: + message strcharinfo(0), "Marriage : ##3##BThe proposal expired. Please try again."; + message strcharinfo(0, @marriage[0]), "Marriage : ##3##BThe proposal expired. Please try again."; + @marriage[0] = 0, @marriage[0]; + @marriage[0] = 0; + end; + +L_AlreadyMarried: + message strcharinfo(0), "Marriage : ##3##BYou"+ if_then_else(PARTNER, " are", "r partner is") +" already married."; + end; + +OnInit: + set .timeout, 30; // timeout for proposal + registercmd "#marry", strnpcinfo(0); // we NEED to use a # before `marry` because otherwise manaplus does not strip colors + end; +} diff --git a/npc/commands/mobinfo.txt b/npc/commands/mobinfo.txt deleted file mode 100644 index 691bfb68..00000000 --- a/npc/commands/mobinfo.txt +++ /dev/null @@ -1,29 +0,0 @@ -// The Mana World Script -// -// @monsterinfo -// Sends @mobinfo with a delay (moved from atcommand.conf) -// Requires EVOL_MONSTER_IDENTIFY -// -- script @monsterinfo 32767,{ - end; - -OnCall: - // Check for skill level - if (!getskilllv(EVOL_MONSTER_IDENTIFY)) - end; - - // ... - if (@rsync_delay > gettimetick(2)) { - dispbottom l("Not doing that to prevent flood."); - end; - } - - // Send @mobinfo and set a cooldown of 3 seconds. - atcommand("@mobinfo " + implode(.@atcmd_parameters$, " ")); - @rsync_delay=gettimetick(2)+3; - end; - -OnInit: - bindatcmd "monsterinfo", "@monsterinfo::OnCall", 0, 60, 0; - end; -} diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt deleted file mode 100644 index 2f6a5e2a..00000000 --- a/npc/commands/motd.txt +++ /dev/null @@ -1,194 +0,0 @@ -function script displayMOTD { - .@size = getvariableofnpc(.size, "@motd"); - .@dsize = getvariableofnpc(.dsize, "@motd"); - - // git stuff and such - if (debug) - { - for (.@i = 0; .@i < .@dsize; ++.@i) - { - dispbottom $@Debug_Messages$[.@i]; // FIXME: send this to the Debug tab instead - } - - if (.@dsize > 0) - dispbottom "---"; - } - - // generic MOTD - for (.@i = 0; .@i < .@size; ++.@i) - { - dispbottom $MOTD_Messages$[.@i]; - } - - return; -} - -function script MOTDConfig { - - function toggleMOTD { - $MOTD_Disabled = !($MOTD_Disabled); - // FIXME: log to GM log - } - - function addNewLine { - clear; - mes l("Please enter the new line."); - input .@s$; - .@s$ = strip(.@s$); - if (.@s$ != "") - { - .@size = getvariableofnpc(.size, "@motd"); - $MOTD_Messages$[.@size] = .@s$; - set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$); - // FIXME: log to GM log - } - } - - function modifyLine { - - function removeLine { - .@l = getarg(0); - deletearray $MOTD_Messages$[.@l], 1; // remove and shift - mes l("Line @@ has been removed.", .@l); - set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$); - // FIXME: log to GM log - } - - function moveUp { - .@l = getarg(0); - .@top$ = $MOTD_Messages$[.@l - 1]; - $MOTD_Messages$[.@l - 1] = $MOTD_Messages$[.@l]; - $MOTD_Messages$[.@l] = .@top$; - } - - function moveDown { - .@l = getarg(0); - .@bottom$ = $MOTD_Messages$[.@l + 1]; - $MOTD_Messages$[.@l + 1] = $MOTD_Messages$[.@l]; - $MOTD_Messages$[.@l] = .@bottom$; - } - - function editLine { - .@l = getarg(0); - clear; - mes l("Old line:"); - mes "---"; - mes $MOTD_Messages$[.@l]; - mes "---"; - mes ""; - mes l("Enter new line:"); - next; - input .@s$; - .@s$ = strip(.@s$); - if (.@s$ != "") - { - $MOTD_Messages$[.@l] = .@s$; - // FIXME: log to GM log - } - } - - .@max = (getarg(0) - 1); - - do - { - mes l("Enter line number:"); - next; - input .@n; - if ($MOTD_Messages$[.@n] != "") - { - clear; - mes l("line @@: @@", .@n, $MOTD_Messages$[.@n]); - next; - select - menuimage("actions/back", l("Modify another line")), - menuimage("actions/remove", l("Remove this line")), - menuimage("actions/edit", l("Modify this line")), - rif(.@n > 0, menuimage("actions/raise", l("Move this line up"))), - rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))), - menuimage("actions/home", l("Return to main menu")); - - switch (@menu) - { - case 2: removeLine .@n; return; - case 3: editLine .@n; return; - case 4: moveUp .@n; return; - case 5: moveDown .@n; return; - case 6: return; - } - } - } while (1); - } - - do - { - clear; - setnpcdialogtitle l("MOTD Config"); - mes l("This menu allows you to modify the generic message that is sent to players when they log in."); - mes ""; - - mes "---"; - .@size = getvariableofnpc(.size, "@motd"); - for (.@i = 0; .@i < .@size; ++.@i) - { - mes l("line @@: @@", .@i, $MOTD_Messages$[.@i]); - } - if (.@size == 0) - { - mes "(" + l("no active MOTD") + ")"; - } - mes "---"; - .@d = $MOTD_Disabled; - mes l("Enabled: @@", (.@d ? l("no") : l("yes"))); - next; - - select - menuimage("actions/toggle", (.@d ? l("Enable") : l("Disable"))), - menuimage("actions/add", l("Add a new line")), - rif(.@size, menuimage("actions/manage", l("Modify, move, or remove a line"))), - rif(.@size, menuimage("actions/test", l("Test MOTD"))), - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); - - switch (@menu) - { - case 1: toggleMOTD; break; - case 2: addNewLine; break; - case 3: modifyLine .@size; break; - case 4: displayMOTD; break; - default: return; - } - } while (1); -} - - - -- script @motd 32767,{ - end; - -OnCall: - if (!is_dev()) - { - end; - } - - MOTDConfig; - closeclientdialog; - end; - -OnInit: - MOTD_debug_text; - .size = getarraysize($MOTD_Messages$); - .dsize = getarraysize($@Debug_Messages$); - bindatcmd "motd", "@motd::OnCall", 0, 99, 0; -} - -function script ReceiveMOTD { - if ($MOTD_Disabled < 1) - { - displayMOTD; - } - if (debug) - { - dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>"; - } - return; -} diff --git a/npc/commands/music.txt b/npc/commands/music.txt old mode 100644 new mode 100755 index b817b949..5c62f008 --- a/npc/commands/music.txt +++ b/npc/commands/music.txt @@ -1,75 +1,33 @@ -// @music atcommand -// changes the music for all players on the map -// -// group lv: 2 -// group char lv: 99 -// log: True -// -// usage: -// @music -// -// example: -// @music fun - -- script @music 32767,{ +- script @music NPC32767,{ + callfunc "argv_splitter"; + if (GM < CMD_MUSIC && GM < G_SYSOP) goto L_GM; + if (@argv$[0] == "") goto L_Failed; + + gmlog "@music " + @args$; + .@find = array_search(@argv$[0], .find$); + if (.@find >= 0) + @argv$[0] = .replace$[max(.@find, 0)]; + .file$ = @argv$[0]; + areatimer 0, getmapname(), (POS_X - .range), (POS_Y - .range), (POS_X + .range), (POS_Y + .range), 0, strnpcinfo(0)+"::OnPC"; + message strcharinfo(0), "music : The music has ben temporarily changed."; end; -OnCall: - if (!is_evtc()) - { - end; - } - - // TODO: tmw-like argv splitter - .@map$ = getmap(); - - .@m$ = strtolower(.@atcmd_parameters$[0]); - - // GMs might not know and want a list of musics - if (.@m$ == "" || .@m$ == "list") { - .@r$="list"; - - freeloop(true); - .@size=getarraysize($MUSIC_ARRAY$); - for (.@i = 0; .@i < .@size; ++.@i) { - .@r$+=", "+$MUSIC_ARRAY$[.@i]; - } - freeloop(false); - - dispbottom("Music list: "+.@r$); - end; - } - - .@key = array_exists($MUSIC_ARRAY$, .@m$); - - if (!.@key) - { - //.@m$ = implode(.@atcmd_parameters$[0], " "); - message(getcharid(CHAR_ID_ACCOUNT), sprintf("Can't broadcast: %s.ogg", .@m$)); - } else { - message(getcharid(CHAR_ID_ACCOUNT), sprintf("Now broadcasting: %s", .@m$)); - changemusic .@map$, .@m$ + ".ogg"; - } +OnPC: + music .file$ + ".ogg"; end; -OnMyself: - .@m$ = strtolower(.@atcmd_parameters$[0]); - .@key = array_exists($MUSIC_ARRAY$, .@m$); - - // TODO: Check if you have the music unlocked? Bitmask? Array? +L_Failed: + message strcharinfo(0), "music : You must specify a music file."; + end; - if (!.@key) - { - //.@m$ = implode(.@atcmd_parameters$[0], " "); - message(getcharid(CHAR_ID_ACCOUNT), sprintf("Can't play: %s.ogg", .@m$)); - } else { - message(getcharid(CHAR_ID_ACCOUNT), sprintf("Now playing: %s", .@m$)); - changeplayermusic .@m$ + ".ogg"; - } +L_GM: + message strcharinfo(0), "music : GM command is level "+ CMD_MUSIC +", but you are level " + GM; end; OnInit: - bindatcmd "music", "@music::OnCall", 0, 99, 1; - bindatcmd "jukebox", "@music::OnMyself", 0, 50, 0; + setarray .find$, "this", "cave", "chilling", "clouds", "dimond", "explorers", "gy", "reid", "magick", "mystique", "night", "ride", "sail", "snow", "forest", "xmas"; + setarray .replace$, "this", "cavesong", "chilling-environment", "clouds-calling", "dimonds-cove", "explorers-melody", "graveyard", "inquisitive-inn", "magick-real", "mystique-forest", "night-is-calling", "ride-of-the-valkyries", "sail-away", "snow-village", "the-forest", "white-christmas"; + set .range, 14; // FIXME: make this a const + registercmd chr(ATCMD_SYMBOL) + "music", strnpcinfo(0); end; } diff --git a/npc/commands/mute.txt b/npc/commands/mute.txt new file mode 100755 index 00000000..555fa724 --- /dev/null +++ b/npc/commands/mute.txt @@ -0,0 +1,92 @@ +- script @mute NPC32767,{ + callfunc "argv_splitter"; + if (GM < CMD_MUTE && GM < G_SYSOP) goto L_GM; + if (@argv$[1] == "") goto L_Failed; + + .@target_id = getcharid(3, @argv$[1]); + if (.@target_id < 1 || !(isloggedin(.@target_id))) goto L_Failed; + + if (@argv[0] > 120) + set @argv[0], 120; // max 2 hours + + gmlog "@mute " + @args$; + if (@argv[0] == 0) goto L_UnMute; + + message strcharinfo(0, .@target_id), "Server : ##BYou have been muted by a GM for "+@argv[0]+" minutes."; + MUTE_GLOBAL = 1, .@target_id; + #MUTE_UNTIL = (gettimetick(2) + (@argv[0] * 60)), .@target_id; + addtimer (@argv[0] * 60000) + 100, strnpcinfo(0) + "::OnCheckMute", .@target_id; + message strcharinfo(0), "mute : Player `"+strcharinfo(0, .@target_id)+"` has been muted for "+@argv[0]+" minutes."; + end; + +OnSTFU: + if (GM < CMD_MUTE && GM < G_SYSOP) goto L_GM; + callfunc "argv_splitter"; + if (@argv[0] < 1) set @argv[0], 1; + if (@argv[0] > 10) set @argv[0], 10; + gmlog "@stfu " + @argv[0]; + @stfu_nr = 0; + foreach 0, getmapname(), (POS_X - .range), (POS_Y - .range), (POS_X + .range), (POS_Y + .range), strnpcinfo(0)+"::OnSTFUPC"; + message strcharinfo(0), "mute : Every player within "+.range+" tiles have been muted for "+@argv[0]+" minutes. ["+@stfu_nr+"]"; + @stfu_nr = 0; + end; + +OnSTFUPC: + if (@target_id == BL_ID) end; + .@future = (gettimetick(2) + (@argv[0] * 60)); + if (get(#MUTE_UNTIL, @target_id) > .@future) end; // if player already has a mute, don't reduce it + MUTE_GLOBAL = 1, @target_id; + #MUTE_UNTIL = .@future, @target_id; + addtimer (@argv[0] * 60000) + 100, strnpcinfo(0) + "::OnCheckMute", @target_id; + @stfu_nr = @stfu_nr + 1; + end; + +OnPCLoginEvent: + if (#MUTE_UNTIL < 1) end; + .@s = (#MUTE_UNTIL - gettimetick(2)); + if (.@s < 5) goto L_ClearMute; + .@m = .@s / 60; + message strcharinfo(0), "Server : ##BYou have been muted for "+ max(1, .@m) +" minutes."; + MUTE_GLOBAL = 1; + addtimer (.@s * 1000) + 100, strnpcinfo(0) + "::OnCheckMute"; + end; + +L_ClearMute: + message strcharinfo(0), "Server : ##BYour mute has expired while you were away. You have been automatically unmuted."; + if ((#MUTE_UNTIL - gettimetick(2)) >= (0 - 900)) + wgm "=> Player `"+ strcharinfo(0) +"` has been automatically unmuted."; // only send if unmuted 15 minutes ago or less + #MUTE_UNTIL = 0; + end; + +OnCheckMute: + if (#MUTE_UNTIL < 1) end; + if (gettimetick(2) - #MUTE_UNTIL < 0) end; + message strcharinfo(0), "Server : ##BYou have been automatically unmuted."; + wgm "=> Player `"+ strcharinfo(0) +"` has been automatically unmuted."; + MUTE_GLOBAL = 0; + #MUTE_UNTIL = 0; + end; + +L_UnMute: + if (get(MUTE_GLOBAL, .@target_id)) + message strcharinfo(0, .@target_id), "Server : ##BYou have been unmuted by a GM."; + MUTE_GLOBAL = 0, .@target_id; + #MUTE_UNTIL = 0, .@target_id; + message strcharinfo(0), "mute : Player `"+strcharinfo(0, .@target_id)+"` has been unmuted."; + end; + +L_Failed: + message strcharinfo(0), "mute : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), "mute : GM command is level "+ CMD_MUTE +", but you are level " + GM; + end; + +OnInit: + set .range, 14; // FIXME: this should be a const + registercmd chr(ATCMD_SYMBOL) + "mute", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "stfu", strnpcinfo(0) + "::OnSTFU"; + registercmd chr(ATCMD_SYMBOL) + "areamute", strnpcinfo(0) + "::OnSTFU"; // alias of STFU + end; +} diff --git a/npc/commands/npctalk.txt b/npc/commands/npctalk.txt new file mode 100755 index 00000000..b1179dc6 --- /dev/null +++ b/npc/commands/npctalk.txt @@ -0,0 +1,22 @@ +- script @npctalk NPC32767,{ + callfunc "argv_splitter"; + if (GM < CMD_NPCTALK && GM < G_SYSOP) goto L_GM; + if (@argv$[0] == "" || @argv$[1] == "") goto L_Failed; + if (getnpcid(@argv$[0]) < 1) goto L_Failed; + + gmlog "@npctalk " + @args$; + npctalk @argv$[0], @argv$[1]; + end; + +L_Failed: + message strcharinfo(0), "npctalk : Impossible to attach to the target npc. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), "npctalk : GM command is level "+ CMD_NPCTALK +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "npctalk", strnpcinfo(0); + end; +} diff --git a/npc/commands/numa.txt b/npc/commands/numa.txt new file mode 100755 index 00000000..207ec032 --- /dev/null +++ b/npc/commands/numa.txt @@ -0,0 +1,127 @@ + +- script SuperDebug NPC32767,{ + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) goto L_GM2; // make sure you can enter the gm lounge + if (target(BL_ID,getnpcid("Numa"),1)) goto L_Main; + npcaction 6, 12; + title "Numa"; + goto L_Main; + +L_GM2: + message strcharinfo(0), "numa : GM command is level "+ MAP_LOUNGE +", but you are level " + GM; + end; + +L_Main: + mes "How may I help you?"; + next; + menu + "Announcements", L_StoneBoard, + "MOTD", L_MOTD, + "Holiday debug", L_Holiday, + "Event debug", L_Event, + "Quest debug", L_Quest, + "Who are you?", L_WhoAmI, + "Close", L_close; + // todo: generic npcs + // todo: map list + +L_WhoAmI: + mes "I am Numa, also known as `SuperDebug`."; + mes "My sole purpose is to assist TMW staff from behind-the-scene."; + mes "Using me, you can access several debug menus."; + mes "You can call me from anywhere using the ##B@numa##b spell, or you can come see me in person."; + next; + goto L_Main; + +L_Holiday: + if (GM < DBG_HOLIDAY && GM < G_SYSOP) goto L_GM; + mes "What holiday do you want to debug?"; + next; + menu + "Xmas.", L_XmasDebug, + "Halloween.", L_HalloweenDebug, + "Easter.", L_EasterDebug; + +L_XmasDebug: + gmlog strcharinfo(0) + " accessed the Xmas debug."; + callfunc "XmasDebug"; + goto L_close; + +L_HalloweenDebug: + gmlog strcharinfo(0) + " accessed the Halloween debug."; + callfunc "HalloweenDebug"; + goto L_close; + +L_EasterDebug: + gmlog strcharinfo(0) + " accessed the Easter debug."; + callfunc "Easter Debug"; + goto L_close; + +L_Event: + if (GM < EVT_DEBUG && GM < G_EVENT) goto L_GM; + gmlog strcharinfo(0) + " accessed the GM event debug."; + callfunc "GmDebug"; + goto L_close; + +L_StoneBoard: + if (GM < DBG_SCHEDULED && GM < G_SYSOP) goto L_GM; + callfunc "SBConfig"; + goto L_close; + +L_MOTD: + if (GM < DBG_MOTD && GM < G_SYSOP) goto L_GM; + callfunc "MOTDConfig"; + goto L_close; + +L_GM: + mes "I'm awfully sorry."; + mes "You do not have the required GM level to perform this action."; + goto L_close; + +L_Quest: + callfunc "QuestDebug"; + goto L_close; + +L_close: + close; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "numa", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "superdebug", strnpcinfo(0); + if (puppet("017-9", 30, 28, "Numa", 393) < 1) mapexit; + end; +} + +function script QuestDebug { + goto L_ChooseContinent; + +L_ChooseContinent: + mes "Choose a continent."; + next; + menu + "Argeas", L_Argeas, + "Close", L_Return; + +L_Argeas: + mes "Choose an area."; + next; + menu + "Woodland", L_Woodland, + "Choose a continent", L_ChooseContinent, + "Close", L_Return; + +L_Woodland: + mes "Choose a quest."; + next; + menu + "Illia Sisters", L_Valia, + "Choose an area", L_Argeas, + "Close", L_Return; + +L_Return: + return; + + +L_Valia: + callfunc "IlliaDebug"; + goto L_Return; +} diff --git a/npc/commands/pullrabbit.txt b/npc/commands/pullrabbit.txt new file mode 100755 index 00000000..8ca0a69a --- /dev/null +++ b/npc/commands/pullrabbit.txt @@ -0,0 +1,25 @@ +- script @pullrabbit NPC32767,{ + if (GM < EVT_KILLTHEGM && GM < G_SYSOP) end; + if (getequipid(equip_head) != 888) end; + getinventorylist; + if ((checkweight("MurdererCrown", 1) == 0) || (@inventorylist_count == 100)) + goto L_Inventory; + // Get the current reward of the event. This may be changed later + getitem "MurdererCrown", 1; + // Set HP and SP to max + heal MaxHp, MaxSp; + // Display an effect + misceffect FX_CHANNELLING_CAST, strcharinfo(0); + // Log the usage of this spell + gmlog strcharinfo(0)+" used the Magic GM Top Hat."; + end; + +L_Inventory: + message strcharinfo(0), "You cannot create this item. You're too heavy or you don't have a free slot."; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "pullrabbit", strnpcinfo(0); + registercmd chr(MAGIC_SYMBOL) + "pullrabbit", strnpcinfo(0); // former pullrabbit invocation + end; +} diff --git a/npc/commands/python.txt b/npc/commands/python.txt deleted file mode 100644 index e2fdc5bf..00000000 --- a/npc/commands/python.txt +++ /dev/null @@ -1,24 +0,0 @@ -// The Mana World script -// Author: Gumi -// Author: Jesusalva -// -// Stomp stomp stomp (use with caution) - -- script @python 32767,{ - end; - -// Soft Resync -OnCall: - specialeffect(69, AREA, playerattached()); - addtimer 380, .name$+"::OnKill"; - end; - -OnKill: - percentheal -100, -100; - //dispbottom l("Oh look, it is Cupid!"); - end; - -OnInit: - bindatcmd "python", "@python::OnCall", 20, 20, 1; - end; -} diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt deleted file mode 100644 index 995ef940..00000000 --- a/npc/commands/rate-management.txt +++ /dev/null @@ -1,107 +0,0 @@ -- script @exprate 32767,{ - end; - - function rateCleanUp { - stopnpctimer; - .hours = 0; - .max_hours = 0; - .current_rate = .original_exp_rate; - setbattleflag("base_exp_rate", .original_exp_rate); - setbattleflag("quest_exp_rate", .original_quest_rate); - charcommand("@reloadmobdb"); // this is on purpose (callable without RID) - charcommand("@reloadquestdb"); - } - - function remainingTime { - .@total_seconds = (3600 * .max_hours); - .@seconds_elapsed = (3600 * .hours) + (getnpctimer(0) / 1000); - .@seconds_remaining = max(1, .@total_seconds - .@seconds_elapsed); - return FuzzyTime(time_from_seconds(.@seconds_remaining), 2, 2); - } - -OnCall: - if (!is_evtc()) - { - end; - } - - .@special$ = strip(.@atcmd_parameters$[0]); // special value - .@new_rate = min(atoi(.@special$), 1000); // or just a regular integer - .@hours = min(0x7FFFFFFE, max(1, atoi(strip(.@atcmd_parameters$[1])))); // number of hours - - if (.@new_rate > 0) - { - // set new exp rate - .hours = 0; - .max_hours = .@hours; - .current_rate = .@new_rate; - setbattleflag("base_exp_rate", .@new_rate); - setbattleflag("quest_exp_rate", .@new_rate); - charcommand("@reloadmobdb"); - charcommand("@reloadquestdb"); - initnpctimer; // start counting - - dispbottom l("You successfully set the exp rate to @@%. It will reset to @@% (default value) in @@.", - .@new_rate, .original_exp_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)); - dispbottom l("You can also manually stop it at any time with: @exprate default"); - } - - else if (.@new_rate == 0 && .@special$ == "") - { - // get current exp rate - if (.current_rate == .original_exp_rate) - { - dispbottom l("Current exp rate is set to @@% (default value).", .current_rate); - } - - else - { - dispbottom l("Current exp rate is set to @@%, and will reset to @@% (default value) in @@.", - .current_rate, .original_exp_rate, remainingTime()); - - dispbottom l("If you meant to reset the exp rate to its default value: @exprate default"); - } - } - - else - { - // reset - rateCleanUp; - dispbottom l("Exp rate has been reset to @@% (default value).", - .original_exp_rate); - } - - end; - -OnTimer3600000: - // runs every hour - if (++.hours == .max_hours) - { - rateCleanUp; - end; - } - initnpctimer; - end; - -OnPCLoginEvent: - if (.max_hours > 0) - { - dispbottom col(l("Exp rate is set to @@% for the next @@.", - .current_rate, remainingTime()), 6); - } - end; - -OnInit: - bindatcmd "exprate", "@exprate::OnCall", 0, 99, 1; // change exp rate - - // WARNING: using @reloadscript will change the "original" value - .original_exp_rate = getbattleflag("base_exp_rate"); - .original_quest_rate = getbattleflag("quest_exp_rate"); - .current_rate = .original_exp_rate; - - // XXX: maybe in the future: - //.original_item_rate = getbattleflag("item_rate_common"); - //.original_job_rate = getbattleflag("base_job_rate"); - //.original_pk_mode = getbattleflag("pk_mode"); - //.original_death_penalty = getbattleflag("death_penalty_type"); -} diff --git a/npc/commands/remotecmd.txt b/npc/commands/remotecmd.txt new file mode 100755 index 00000000..20f33f8c --- /dev/null +++ b/npc/commands/remotecmd.txt @@ -0,0 +1,61 @@ +- script @remotecmd NPC32767,{ + callfunc "argv_splitter"; + if (GM < CMD_REMOTECMD && GM < G_SYSOP) goto L_GM; // check if you can use it on self + .@target_id = BL_ID; + .@t$ = @argv$[1]; + setarray @remotecmd[0], 0, 1, 1; // nr, to_self, multi_target + if (.@t$ == "map") goto L_Map; + if (.@t$ == "map!") goto L_AllMap; + if (.@t$ == "area") goto L_Area; + if (.@t$ == "area!") goto L_AllArea; + if (.@t$ != "") set .@target_id, getcharid(3, @argv$[1]); + if (.@t$ != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self + + @target_id = .@target_id; + set @remotecmd[2], 0; // only one target + addtimer 0, strnpcinfo(0) + "::OnPC"; + end; + +L_Map: + set @remotecmd[1], 0; // do not include self + goto L_AllMap; + +L_AllMap: + foreach 0, getmapname(), 0, 0, 32767, 32767, strnpcinfo(0)+"::OnPC"; + goto L_Success; + +L_Area: + set @remotecmd[1], 0; // do not include self + goto L_AllMap; + +L_AllArea: + foreach 0, getmapname(), (POS_X - .range), (POS_Y - .range), (POS_X + .range), (POS_Y + .range), strnpcinfo(0)+"::OnPC"; + goto L_Success; + +OnPC: + if (@target_id == BL_ID && @remotecmd[1] < 1) + end; + remotecmd @argv$[0], strcharinfo(0, @target_id); + @remotecmd[0] = @remotecmd[0] + 1; + if (@remotecmd[2] < 1) + goto L_Success; + end; + +L_Success: + gmlog "@remotecmd " + @args$; + message strcharinfo(0), "remotecmd : The operation succeeded. ["+ @remotecmd[0] + "]"; + end; + +L_Failed: + message strcharinfo(0), "remotecmd : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), "remotecmd : GM command is level "+ CMD_REMOTECMD +", but you are level " + GM; + end; + +OnInit: + set .range, 14; // visible range + registercmd chr(ATCMD_SYMBOL) + "remotecmd", strnpcinfo(0); + end; +} diff --git a/npc/commands/resync.txt b/npc/commands/resync.txt deleted file mode 100644 index a535a343..00000000 --- a/npc/commands/resync.txt +++ /dev/null @@ -1,40 +0,0 @@ -// Evol script -// Author: Jesusalva -// -// Introduces @resync -// -// It'll cast slide to your own position -// Hopefully making client update your real position without causing server warning - -- script @resync 32767,{ - end; - -// Soft Resync -OnCall: - // Sliding a dead player have undesired side effects - if (ispcdead()) { - dispbottom l("Impossible to resync: You are dead."); - end; - } - // I add a small delay in case slide() trigger some invincibility timer or something - if (@rsync_delay > gettimetick(2)) { - dispbottom l("Not resync'ing to prevent flood."); - end; - } - - // This is a hack - getmapxy(.@m$, .@x, .@y, 0); - slide .@x, .@y; - @rsync_delay=gettimetick(2)+rand(4,6); - - // Uncomment this line to cause server to resend every packet to ManaPlus - // and get rid of latency effect (like dead mobs still being shown) - //atcommand("@refresh"); - end; - -// Anyone can call @resync, but only support and upwards for other players. -// ie. GMs can try to fix lag for other people. -OnInit: - bindatcmd "resync", "@resync::OnCall", 0, 20, 0; - end; -} diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt deleted file mode 100644 index 8699c581..00000000 --- a/npc/commands/scheduled-broadcasts.txt +++ /dev/null @@ -1,227 +0,0 @@ -function script StoneBoard { - - function setMessage { - do - { - clear; - mes l("Please enter the message:"); - next; - input .@msg$; - .@msg$ = strip(.@msg$); - if (.@msg$ != "") - { - return .@msg$; - } - mes l("The message cannot be empty"); - next; - } while (1); - } - - function setInterval { - clear; - mes l("Please select the interval:"); - next; - menuint - l("Every 1 hour"), 1, - l("Every 3 hours"), 3, - l("Every 5 hours"), 5, - l("Every 6 hours"), 6, - l("Every 12 hours"), 12, - l("Every 24 hours"), 24, - l("Never (only on login)"), 0; - - return @menuret; - } - - function setMaxRep { - if (getarg(0,0) == 0) - { - return 0; - } - clear; - mes l("Repeat how many times?"); - next; - menuint - l("Send only once"), 1, - l("Send 2 times"), 2, - l("Send 3 times"), 3, - l("Send 5 times"), 5, - l("Send 10 times"), 10, - l("Send 20 times"), 20, - l("Send indefinitely"), 0; - - return @menuret; - } - - function setOnLogin { - if (getarg(0,0) == 0) - { - return 1; - } - clear; - mes l("Send this message also on login?"); - next; - select - l("No"), - l("Yes"); - - return (@menu - 1); - } - - function newBroadcast { - do - { - setnpcdialogtitle l("Scheduled broadcasts - Create new"); - - // go through all steps - .@msg$ = setMessage(); - .@int = setInterval(); - .@max = setMaxRep(.@int); - .@login = setOnLogin(.@int); - - // recap - clear; - mes l("Message:"); - mes "---"; - mes .@msg$; - mes "---"; - if (.@int) - { - mes l("Interval: every @@ hour(s)", .@int); - mes l("Repeat: @@ times", .@max ? .@max : "∞"); - mes l("Sent on login: @@", .@login ? l("yes") : l("no")); - } - else - { - mes l("Interval: (none, only sent on login)"); - mes l("Sent on login: yes"); - } - - next; - select - menuimage("actions/cancel", l("Discard")), - menuimage("actions/edit", l("Start over")), - menuimage("actions/test", l("Start broadcasting")), - menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now")); - - switch (@menu) - { - case 3: - case 4: - stopnpctimer "@sched"; - $@SCHED_Opt[0] = .@login; - $@SCHED_Opt[1] = .@int; - $@SCHED_Opt[2] = 0; - $@SCHED_Opt[3] = .@max; - $@SCHED_Opt[4] = 0; - $@SCHED_Msg$ = .@msg$; - if (.@int) - { - initnpctimer "@sched"; - } - if (@menu == 4) - { - announce $@SCHED_Msg$, bc_all; - } - case 1: return; - } - - } while(1); - } - - do - { - clear; - setnpcdialogtitle l("Scheduled broadcasts"); - mes l("This menu allows you to set the scheduled broadcast that is sent to all players at a specific interval."); - mes ""; - - .@a = $@SCHED_Msg$ != ""; // any active broadcast? - mes "---"; - mes .@a ? $@SCHED_Msg$ : "(" + l("no active broadcast") +")"; - mes "---"; - if (.@a) - { - mes l("Sent on login: @@", ($@SCHED_Opt[0] ? l("yes") : l("no"))); - if ($@SCHED_Opt[1]) - { - .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0, "@sched"))); - mes l("Interval: every @@ hour(s)", $@SCHED_Opt[1]); - mes l("Next broadcast: @@", FuzzyTime(time_from_ms(.@next), 0, 99)); - } - else - { - mes l("Interval: (none, only sent on login)"); - mes l("Next broadcast: (never)"); - } - mes l("Sent: @@ times out of @@", $@SCHED_Opt[2], ($@SCHED_Opt[3] ? $@SCHED_Opt[3] : "∞")); - } - next; - - select - menuimage("actions/abort", l("Abort")), - rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))), - rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))), - rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))), - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); - - switch (@menu) - { - case 2: announce $@SCHED_Msg$, bc_all; break; - case 3: $@SCHED_Msg$ = ""; break; - case 4: newBroadcast; break; - default: return; - } - } while (1); -} - - - -- script @sched 32767,{ - end; - -OnTimer3600000: - if ($@SCHED_Msg$ == "") - { - stopnpctimer; - end; - } - - ++$@SCHED_Opt[4]; // increase hours counter - if ($@SCHED_Opt[4] == $@SCHED_Opt[1]) - { - stopnpctimer; - ++$@SCHED_Opt[2]; // increase total counter - announce $@SCHED_Msg$, bc_all; - $@SCHED_Opt[4] = 0; // reset hours counter - if ($@SCHED_Opt[2] >= $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0) - { - $@SCHED_Msg$ = ""; // reset message - end; - } - } - initnpctimer; - end; - -OnCall: - if (!is_evtc() && !is_dev()) - { - end; - } - - StoneBoard; - closeclientdialog; - end; - -OnInit: - bindatcmd "sched", "@sched::OnCall", 0, 99, 0; -} - -function script ReceiveScheduledBroadcast { - if ($@SCHED_Opt[0] && $@SCHED_Msg$ != "") - { - announce $@SCHED_Msg$, bc_self; - } - return; -} - diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt deleted file mode 100644 index 5ed7ced3..00000000 --- a/npc/commands/super-menu.txt +++ /dev/null @@ -1,68 +0,0 @@ -function script SuperMenu { - do - { - if (debug && !is_dev()) - { - GlobalDebugMenu; - return; - } - - clear; - setnpcdialogtitle l("Super Menu"); - mes l("This menu contains all options available to you, based on your access privileges."); - mes ""; - mes l("What do you want to access?"); - next; - select - l("Scheduled broadcasts"), - l("MOTD"), - rif(is_evtc(), l("Event management")), - l("Debug"); - - switch (@menu) - { - case 1: StoneBoard 1; break; - case 2: MOTDConfig 1; break; - case 3: GlobalEventMenu 1; break; - case 4: GlobalDebugMenu 1; break; - } - } while (1); -} - - - -- script @super 32767,{ - end; - -OnCall: - - if (!debug && !is_dev()) - { - dispbottom l("You do not have the required access privileges to use the Super Menu."); - end; - } - - SuperMenu; - closeclientdialog; - end; - -OnInit: - bindatcmd "super", "@super::OnCall", 0, 99, 0; - bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa -} - -function script GrantSuperSkill { - .@debug_skill = getskilllv(EVOL_SUPER_MENU); - - if (.@debug_skill > 0 && !debug) - { - skill EVOL_SUPER_MENU, 0, 0; // remove debug skill. Not needed (skill tree) - } - - else if (.@debug_skill < 1 && debug) - { - skill EVOL_SUPER_MENU, 1, 0; // give debug skill - } - return; -} - diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt old mode 100644 new mode 100755 index 22eeda39..d2eee4e2 --- a/npc/commands/warp.txt +++ b/npc/commands/warp.txt @@ -1,91 +1,56 @@ -// @w atcommand -// warps using anchors or map name -// -// group lv: 1 -// group char lv: 2 -// log: True -// -// usage: -// @w [, x [, y]] -// #w "char" [, x [, y]] -// -// example: -// @w artis -// #w "char" artis - -- script @w 32767,{ +- script @warp NPC32767,{ + callfunc "argv_splitter"; + if (@argv$[3] == "" && @argv$[2] == "" && @argv$[1] != "" && @argv[1] < 2) + @argv$[3] = @argv$[1]; + + .@n$ = if_then_else(@argv$[3] != "", "char", "") + "warp"; + if (GM < CMD_WARP && GM < G_SYSOP) goto L_GM; // check if you can use it on self + .@target_id = BL_ID; + if (@argv$[3] != "") set .@target_id, getcharid(3, @argv$[3]); + if (@argv$[3] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self + if (@argv$[3] != "" && GM < CMD_CHARWARP && GM < G_SYSOP) goto L_GM; // when target is not self, use charwarp permission + + if (@argv$[0] == "") + @argv$[0] = getmapname(); + + setarray @map_anchor$[0], "", "", "", ""; + callfunc "map2anchor"; + + gmlog "@"+.@n$+" " + @args$; + if (.@target_id != BL_ID) + message strcharinfo(0), .@n$+" : The operation succeeded."; + + @GMWARP_map$ = @map_anchor$[0]; + @GMWARP_x = if_then_else(@argv[1] > 1, @argv[1], @map_anchor$[1]); + @GMWARP_y = if_then_else(@argv[2] > 1, @argv[2], @map_anchor$[2]); + addtimer 0, strnpcinfo(0) + "::OnWarp", .@target_id; + + if (@map_anchor$[3] == "no" && @knows_anchors < 1) + goto L_SuggestAnchors; end; -OnCall: - .@params$ = strtoupper(strip(implode(.@atcmd_parameters$[0], " "))); - .@request$ = replacestr(.@params$, " ", ""); - - cleararray($@regexmatch$[1], "", 3); - if (.@params$ ~= "^(.+) ([0-9]+) ([0-9]+)$") - { - .@request$ = replacestr(strip($@regexmatch$[1]), " ", ""); - .@req_x = atoi(strip($@regexmatch$[2])); - .@req_y = atoi(strip($@regexmatch$[3])); - } - - .@ht = getvariableofnpc(.ht, "__anchors__"); - .@it = htiterator(.@ht); - for (.@key$ = htifirstkey(.@it); hticheck(.@it); .@key$ = htinextkey(.@it)) - { - if (.@request$ ~= .@key$) - { - sscanf(htget(.@ht, .@key$, ""), "%s %d %d", .@map$, .@x, .@y); - break; - } - } - htidelete(.@it); - - .@map$ = .@map$ ? .@map$ : .@request$; - .@x = .@req_y ? .@req_x : .@x; - .@y = .@req_y ? .@req_y : .@y; - - if (!map_exists(.@map$)) - { - if (map_exists(.@atcmd_parameters$[0])) - { - .@map$ = .@atcmd_parameters$[0]; - } - else - { - dispbottom(l("Map or anchor not found: %s", .@atcmd_parameters$[0])); - end; - } - } +L_SuggestAnchors: + message strcharinfo(0), .@n$+" : The warp command has been improved. You might want to consider using [@@https://www.themanaworld.org/index.php/Dev:GM_Commands/anchors|map anchors@@]."; + @knows_anchors = 1; + end; - while (!checkcell(.@map$, .@x, .@y, cell_chkpass)) - { - // FIXME: this whole cell finding loop is DIRTY! - // we should have a command to get a random free coordinate - // or we should make buildin_warp silently ignore 0,0 +OnWarp: + warp @GMWARP_map$, @GMWARP_x, @GMWARP_y; + @GMWARP_map$ = ""; + @GMWARP_x = 0; + @GMWARP_y = 0; + end; - if (.@e == 50) break; // FIXME: triggers a console warning - .@x = rand(20, 20 + (.@e * 5)); - .@y = rand(20, 20 + (.@e * 5)); - ++.@e; - } +L_Failed: + message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; - slide_or_warp(.@map$, .@x, .@y); - updateSpotlight(); +L_GM: + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARWARP, CMD_WARP) +", but you are level " + GM; end; OnInit: - if (debug > 0) - { - bindatcmd("w", "@w::OnCall", 0, 20, 0); - bindatcmd("go", "@w::OnCall", 0, 20, 0); - bindatcmd("to", "@w::OnCall", 0, 20, 0); - bindatcmd("warp", "@w::OnCall", 0, 20, 0); - } - else - { - bindatcmd("w", "@w::OnCall", 20, 60, 1); - bindatcmd("go", "@w::OnCall", 20, 60, 1); - bindatcmd("to", "@w::OnCall", 20, 60, 1); - bindatcmd("warp", "@w::OnCall", 20, 60, 1); - } + registercmd chr(ATCMD_SYMBOL) + "warp", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "charwarp", strnpcinfo(0); + end; } diff --git a/npc/commands/zeny.txt b/npc/commands/zeny.txt old mode 100644 new mode 100755 index 944c1bb9..de1013eb --- a/npc/commands/zeny.txt +++ b/npc/commands/zeny.txt @@ -1,98 +1,78 @@ -// @esp atcommand -// changes the number of Esperin -// -// group lv: 3 -// group char lv: 99 -// log: True -// -// usage: -// @esp -// #esp "char" -// -// example: -// @esp +5 -// @esp -5 -// @esp +++ +- script @zeny NPC32767,{ + callfunc "argv_splitter"; + .@n$ = if_then_else(@argv$[1] != "", "char", "") + "Zeny"; + if (GM < CMD_ZENY && GM < G_SYSOP) goto L_GM; // check if you can use it on self + .@target_id = BL_ID; + if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); + if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self + if (@argv$[1] != "" && GM < CMD_CHARZENY && GM < G_SYSOP) goto L_GM; // when target is not self, use charZeny permission + if (@argv$[0] == "--") goto L_Remove; + if (@argv$[0] == "---") goto L_RemoveAll; + if (@argv$[0] == "++") goto L_Max; + if (@argv$[0] == "+++") goto L_MaxAll; + set .@delta, @argv[0]; // ± Zeny + set .@Zeny, get(Zeny, .@target_id); // get the number of Zeny in char + set .@bank, get(#BankAccount, .@target_id); // get number of Zeny in (world) account + set .@new_Zeny, .@Zeny + .@delta; // new balance in char + if (.@new_Zeny < 0) goto L_MaybeRemoveBank; // Zeny would be below 0 so check if we can take from bank + if (.@new_Zeny > .max_Zeny) goto L_MaybeAddBank; // Zeny would be over the limit so check if we can store in bank + Zeny = (.@Zeny + .@delta), .@target_id; + goto L_Success; -- script @esp 32767,{ +L_Remove: + Zeny = 0, .@target_id; + goto L_Success; + +L_RemoveAll: + Zeny = 0, .@target_id; + #BankAccount = 0, .@target_id; + goto L_Success; + +L_Max: + Zeny = .max_Zeny, .@target_id; + goto L_Success; + +L_MaxAll: + Zeny = .max_Zeny, .@target_id; + #BankAccount = .max_int, .@target_id; + goto L_Success; + +L_MaybeAddBank: + .@new_bank = (.@bank + (.@new_Zeny - .max_Zeny)); + if (.@new_bank > .max_int || .@new_bank < 0) goto L_OutOfBounds; + Zeny = .max_Zeny, .@target_id; + #BankAccount = .@new_bank, .@target_id; + goto L_Success; + +L_MaybeRemoveBank: + if ((.@bank + .@new_Zeny) < 0) goto L_OutOfBounds; + Zeny = 0, .@target_id; + #BankAccount = (.@bank + .@new_Zeny), .@target_id; + goto L_Success; + +L_OutOfBounds: + // XXX: maybe we could also take from other chars from the same accout? + message strcharinfo(0), .@n$+" : Impossible to proceed! This would cause the player to have less than 0 Zeny or more than " + .max_int + "."; end; -OnCall: - .@delta$ = .@atcmd_parameters$[0]; +L_Failed: + // XXX: should we allow GMs to change Zeny of users that are not logged in? + message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; + end; - if (debug && startswith(.@delta$, "--")) - { - Zeny = 0; - if (.@delta$ == "---") - { - BankVault = 0; - } - } - else if (debug && (startswith(.@delta$, "++") || .@delta$ == "")) - { - Zeny = MAX_ZENY; - if (.@delta$ == "+++") - { - BankVault = MAX_BANK_ZENY; - } - } - else - { - .@d = atoi(.@delta$); - if (.@d < 0) - { - .@a = Zeny + .@d; // The amount of zeny remaining after - if (.@a < 0) // If we can't remove that much zeny, try removing from bank too - { - Zeny = 0; - .@b = BankVault + .@a; // amount remaining in bank after - if (.@b < 0) - { - BankVault = 0; - } - else - { - BankVault += .@a; - } - } - else // We can remove that much zeny - { - Zeny += .@d; - } - } - else - { - .@a = Zeny + .@d; // The amount of zeny after - if (.@a < 0 || .@a >= MAX_ZENY) // If we can't add that much zeny, try adding to bank - { - .@c = .@d - (.@a - Zeny); // the amount to put in bank - Zeny = MAX_ZENY; - .@b = BankVault + .@c; // amout in bank after - if (.@b < 0 || .@b == MAX_BANK_ZENY) - { - BankVault = MAX_BANK_ZENY; - } - else - { - BankVault += .@c; - } - } - else // We can add that much zeny - { - Zeny += .@d; - } - } - } +L_Success: + gmlog "@Zeny " + @args$; + message strcharinfo(0), .@n$+" : The operation succeeded."; end; -OnInit: - if (debug > 0) - { - bindatcmd "e", "@esp::OnCall", 0, 99, 0; - bindatcmd "esp", "@esp::OnCall", 0, 99, 0; - bindatcmd "money", "@esp::OnCall", 0, 99, 0; - end; - } +L_GM: + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARZENY, CMD_ZENY) +", but you are level " + GM; + end; - bindatcmd "esp", "@esp::OnCall", 99, 99, 1; +OnInit: + set .max_Zeny, 1000000000; // hardcoded in tmwa + set .max_int, 2147483647; // max int32 value + registercmd chr(ATCMD_SYMBOL) + "Zeny", strnpcinfo(0); + registercmd chr(ATCMD_SYMBOL) + "charZeny", strnpcinfo(0); + end; } diff --git a/npc/config/hairstyle_config.txt b/npc/config/hairstyle_config.txt deleted file mode 100644 index 6a43e4c8..00000000 --- a/npc/config/hairstyle_config.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Hairstyle config -// set array of style and colors - -001-2-29,37,31,0 script hairstyle_config NPC_HIDDEN,0,0,{ - - end; - -OnInit: - setarray $@hairstyle$[0], "(none)", "Bald", "Bowl cut", "Combed back", - "Emo", "Mohawk", "Pompadour", "Center parting", "Long and slick", - "Short and curly", "Pigtails", "Long and curly", "Parted", - "Perky ponytail", "Wave", "Mane", "Bun", "Wavy", "Bunches", - "Long ponytail", "Infinitely long", "Choppy", "Wild", "Punk", - "Imperial", "Side strand", "Messy", "Flat ponytail", - "Tapered Nape"; - - setarray $@haircolor$[0], "Off black", "Ash brown", "Dark brown", - "Dark copper", "Auburn brown", "Honey brown", "Copper blonde", - "Golden blonde", "Pure platinum", "Cherry blossom", "Pinky pink", - "Fire red", "Light violet", "Purple plum", "Navy blue", - "Lagoon blue", "Twisted teal", "Spring Green", "Forest Green", - "Silver Grey", "Esperia Blue"; - - setarray $@REFEXP[0], 400, 900, 2250, 6500, 15000; - end; -} diff --git a/npc/config/location.txt b/npc/config/location.txt deleted file mode 100644 index a094075f..00000000 --- a/npc/config/location.txt +++ /dev/null @@ -1,83 +0,0 @@ -// Moubootaur Legends Script -// Author: Jesusalva -// Location Config - -- script loc_config 32767,{ - end; - -OnInit: - // TODO: Migglemire, Westport... As this is only used for ship right now, meh - setarray $@LOCMASTER_TP, TP_ARTIS, TP_TULIM, TP_HURNS, TP_CANDOR, TP_ARGAES; - setarray $@LOCMASTER_LOC$, "Artis", "Tulim" , "Hurns" , "Candor" , "Argaes" ; - setarray $@LOCMASTER_MAP$, "001-1", "020-1" , "008-1" , "012-1" , "008-1-1"; - setarray $@LOCMASTER_X, 203, 209, 326, 63, 33; - setarray $@LOCMASTER_Y, 85, 143, 104, 133, 63; - end; - -OnInterIfInit: - // Create ship instances - /* La Marine's Ship */ - // Tulim Instance - .TULIM_INSTID = instance_create("marine@TulimInst", 0, IOT_NONE); - instance_attachmap("marine", .TULIM_INSTID, 0, "marine@Tulim"); - instance_set_timeout(0, 0, .TULIM_INSTID); - instance_init(.TULIM_INSTID); - - // Hurns Instance - .HURNS_INSTID = instance_create("marine@HurnsInst", 0, IOT_NONE); - instance_attachmap("marine", .HURNS_INSTID, 0, "marine@Hurns"); - instance_set_timeout(0, 0, .HURNS_INSTID); - instance_init(.HURNS_INSTID); - - // Candor Instance - .CANDOR_INSTID = instance_create("marine@CandorInst", 0, IOT_NONE); - instance_attachmap("marine", .CANDOR_INSTID, 0, "marine@Candor"); - instance_set_timeout(0, 0, .CANDOR_INSTID); - instance_init(.CANDOR_INSTID); - - // Artis Instance (Frigate Gema IV) - .ARTIS_INSTID = instance_create("marine@ArtisInst", 0, IOT_NONE); - instance_attachmap("marine", .ARTIS_INSTID, 0, "marine@Artis"); - instance_set_timeout(0, 0, .ARTIS_INSTID); - instance_init(.ARTIS_INSTID); - - /* Other instances */ - .GALI_INSTID = instance_create("008-1-1@galimatia", 0, IOT_NONE); - instance_attachmap("008-1-1", .GALI_INSTID, 0, "gali@matia"); - instance_set_timeout(0, 0, .GALI_INSTID); - instance_init(.GALI_INSTID); - end; -} - -// Warps you to last visited town -function script ReturnLastTown { - PC_DEST$ = ""; - @timer_navio_running = 0; - .@i=array_find($@LOCMASTER_LOC$, LOCATION$); - warp $@LOCMASTER_MAP$[.@i], $@LOCMASTER_X[.@i], $@LOCMASTER_Y[.@i]; - return; -} - -// Upon entering a town, save it to LOCATION$ -// EnterTown( LocName{, warp=False} ) -function script EnterTown { - // Fill variable - .@v$=getarg(0); - - // Validade variable - if (array_find($@LOCMASTER_LOC$, .@v$) < 0) { - consolemes(CONSOLEMES_ERROR, "Invalid location passed to EnterTown: "+.@v$); - if (getarg(1, false)) - ReturnLastTown(); - return; - } - - // Save location - LOCATION$=.@v$; - - // If "warp" is true - if (getarg(1, false)) - ReturnLastTown(); - return; -} - diff --git a/npc/config/magic.txt b/npc/config/magic.txt deleted file mode 100644 index dbe665a6..00000000 --- a/npc/config/magic.txt +++ /dev/null @@ -1,451 +0,0 @@ -// The Mana World Script -// -// Author: Jesusalva -// -// Magic Script Core Functions -// -// Imported from Moubootaur Legends -// -// Important Variables: -// MAGIC_EXP -// Current mana magic experience -// LAST_SKILL -// Last Skill used (array) -// MAGIC_LVL -// Maximum tier of usable magic, capped by something -// MAGIC_PTS -// Amount of used Magic Skill Points (bad logic) -// MAGIC_CLU -// Array of (skill ID, Level) for sk_canlevelup - - -// This function will add MAGIC_EXP -// And manage last skills used memory -// GetManaExp(SkillID, EXP Points) -function script GetManaExp { - .@sk=getarg(0); - .@pt=getarg(1); - if (LAST_SKILL == .@sk) { - .@pt=cap_value(.@pt/3, 0, 1); - .@bonus=0; - } else { - // Update skill memory - LAST_SKILL[4]=LAST_SKILL[3]; - LAST_SKILL[3]=LAST_SKILL[2]; - LAST_SKILL[2]=LAST_SKILL[1]; - LAST_SKILL[1]=LAST_SKILL[0]; - LAST_SKILL[0]=.@sk; - } - - // Update Magic EXP - MAGIC_EXP=MAGIC_EXP+.@pt; - return; -} - - - -// sk_maxpoints() → Max Magic Skill Points you may use -// Returns how many points you can use -// Could be tweaked to read a variable instead -function script sk_maxpoints { - // 2 points per magic level - .@val=(MAGIC_LVL)*2; - // 1 point every twice magic level - .@val+=(MAGIC_LVL/2); - // Excluding first 15, 1 point every 12 job levels (Up to JL 75) - .@val+=min(5, ((JobLevel-15)/12)); - // 1 point per being a player - .@val+=1; - // 2 points per Rebirth - .@val+=(REBIRTH*2); - return .@val; -} - -// Returns how many points you can allocate -// Could be tweaked to NOT use MAGIC_PTS this way -function script sk_points { - return sk_maxpoints()-MAGIC_PTS; -} - -// Returns true if a skill can be leveled up. -// It checks the MSP -// sk_canlvup( {cost=1} ) -function script sk_canlvup { - return ((MAGIC_PTS+getarg(0,1)) <= sk_maxpoints()); -} - -// Level up a skill in 1 level (internal function) -// TODO: Return the point if leveling about Max Level -// sk_lvup( sk{, cost=0} ) -function script sk_lvup { - .@lvl=MAGIC_CLU[getarg(0)]; - getexp 0, 50*(.@lvl+1); - skill(getarg(0), .@lvl+1, 0); - if (getarg(1,0)) { - MAGIC_PTS+=getarg(1, 0); - } - MAGIC_CLU[getarg(0)]=.@lvl+1; - return; -} - -// Internal Magic School Learning Interface -// mlearn( skill, MAX_LV, MSP cost, item, amount{, GP cost} ) -// returns false if cheater; DO NOT USE IN SCRIPTS -function script mlearn { - .@sk=getarg(0); - .@ff=getarg(1); - .@msp=getarg(2); - .@it=getarg(3); - .@am=getarg(4); - .@gp=getarg(5, 0); - // Max level reached - if (getskilllv(.@sk) >= .@ff) { - return true; - } - // Not enough items - if (countitem(.@it) < .@am) - return false; - // Not enough MSP - if (!sk_canlvup(.@msp)) - return false; - // Not enough GP - if (Zeny < .@gp) { - return false; - } - - // Payment - delitem .@it, .@am; - Zeny-=.@gp; - - // Level up - sk_lvup(.@sk, .@msp); - return true; -} - -// NEW Magic School Learning Interface -// learn_magic(Skill) -function script learn_magic { - .@ski=getarg(0); - .@learn$=l("Learning"); - - // Check if skill is valid - .@mlv=$@MSK_MAXLV[.@ski]; - if (.@mlv < 1) { - return false;//Exception("ERROR: The skill "+.@ski+" is not valid!"); - } - - // Load a few temporary variables - .@pre=$@MSK_PREREQ[.@ski]; - .@it=$@MSK_ITEM[.@ski]; - .@am=$@MSK_AMOUNT[.@ski]; - .@msp=$@MSK_MSPCOST[.@ski]; - .@gp=$@MSK_COST[.@ski]; - - // Pre-requisite check - if (.@pre) { - if (getskilllv(.@pre) < 1) { - mesc l("Pre-requisites not met!"), 1; - mesc l("The following skill is needed: %s%s (Lv. %d)", - "##9", getskillname(.@pre), 1), 1; - return false; - } - } - - // Max level reached - if (getskilllv(.@ski) >= .@mlv) { - mesc l("You've reached the maximum level for this skill."), 1; - return true; - } - - // Skill level check - if (getskilllv(.@sk)) { - .@msp=1; - .@learn$=l("Upgrading"); - } - - mesc l("%s %s will require:", .@learn$, getskillname(.@ski)); - mes l("* %d/%d MSP (Magic Skill Points)", .@msp, sk_points()); - mes l("* %d/%d E (Esperins)", .@gp, Zeny); - mes l("* %d/%d %s", .@am, countitem(.@it), getitemlink(.@it)); - mes ""; - mesc l("Really learn this skill?"); - if (askyesno() == ASK_NO) - return false; - - return mlearn(.@ski, .@mlv, .@msp, .@it, .@am, .@gp); -} - -// transcheck( {item 1, amount 1}, {item 2, amount 2}... ) -// returns true upon success -function script transcheck { - if (getargcount() < 2 || getargcount() % 2 != 0) - return false;//Exception("Faulty learning skill command invoked - error"); - - // Count items - for (.@i=0;.@i < getargcount(); .@i++) { - if (countitem(getarg(.@i)) < getarg(.@i+1)) - return false; - .@i++; - } - - // Delete Items - for (.@i=0;.@i < getargcount(); .@i++) { - delitem getarg(.@i), getarg(.@i+1); - .@i++; - } - return true; -} - -// Returns a value defining your current magic control (affects success ratio, higher is better) -// A value of '5' means perfect control, and a value of '0' means overwhelm. -// abizit() -function script abizit { - .@lv=MAGIC_LVL+1; - if (.@lv < 1) return 0; - .@base=((.@lv*2)**3); - return min(MAGIC_EXP/.@base, 5); -} - - -// Reimplementation of abizit() -// Internal helper -// mescordialog(text, color, {dialog=1}) -function script mescordialog { - if (getarg(2, true)) - mesc getarg(0), getarg(1); - else - dispbottom col(getarg(0), getarg(1)); - return; -} - -// Reimplementation of abizit() -// It will show abizit in dialog box or in a floating message -// ShowAbizit({dialog=1}) -function script ShowAbizit { - .@dial=getarg(0, true); - if (.@dial) - mesn l("Current Magic Control"); - - .@lv=MAGIC_LVL+1; - .@val=MAGIC_EXP+rand(-.@lv*5, .@lv*5); - .@base=((.@lv*2)**3); - if (.@val > .@base*5) - mescordialog l("You are perfectly in control of your magic."), 3, .@dial; - else if (.@val > .@base*4) - mescordialog l("You are mostly in control of your magic."), 2, .@dial; - else if (.@val > .@base*3) - mescordialog l("You are somewhat in control of your magic."), 4, .@dial; - else if (.@val > .@base*2) - mescordialog l("Your magic is more powerful than you, but you can control."), 7, .@dial; - else if (.@val > .@base) - mescordialog l("You still are overwhelmed by your magic."), 6, .@dial; - else - mescordialog l("You are completly overwhelmed by your magic."), 1, .@dial; - return; -} - - -///////////////////////////////////////// -// RegisterMagic(MSP, Skill, MaxLv, Item, Amount, Class, Cost, {PreReq, PostReq}) -function script RegisterMagic { - .@msp=getarg(0); - .@ski=getarg(1); - .@max=getarg(2); - .@ite=getarg(3); - .@amo=getarg(4); - .@cla=getarg(5); - .@cos=getarg(6); - .@pre=getarg(7, false); - .@pos=getarg(8, false); - - $@MSK_MSPCOST[.@ski]=.@msp; - $@MSK_MAXLV[.@ski]=.@max; - - $@MSK_ITEM[.@ski]=.@ite; - $@MSK_AMOUNT[.@ski]=.@amo; - $@MSK_COST[.@ski]=.@cos; - - $@MSK_PREREQ[.@ski]=.@pre; - $@MSK_POSTREQ[.@ski]=.@pos; - - //array_push($@MSK_CLASS[.@cla], .@ski); // 3D Arrays are not supported - array_push($@MSK_MAGIC, .@ski); - return; -} - -- script Magic Load NPC_HIDDEN,{ -OnInit: - /* RegisterMagic(MSP, Skill, MaxLv, Item, Amount, - Class, Cost, {PreReq, PostReq}) */ - // (B) - Brawling - // (A) - Active - // (R) - Ranged (bows only) - // (M) - Magic - // (S) - Support - // (T) - Terrain - // (G) - GP on usage - // (P) - Passive - // (X) - Area Of Effect - - //////////////////////// Other: Misc - // Monster Identify - RegisterMagic(0, EVOL_MONSTER_IDENTIFY, 1, Beer, 1, - CLASS_OTHER, 5000); - // Bash (B) - RegisterMagic(0, SM_BASH, 1, MagicFeather, 1, - CLASS_OTHER, 0); - // Free Cast (P) - RegisterMagic(0, SA_FREECAST, 1, MagicFeather, 1, - CLASS_OTHER, 0); - // Full Throttle (A) - RegisterMagic(0, ALL_FULL_THROTTLE, 1, MagicFeather, 1, - CLASS_OTHER, 0); - - - //////////////////////// Master Skill Book: Skills - // These skills are handled by the Master Skill Book - // So the definition here is duplicate. - // Dragon Slayer (P) - RegisterMagic(0, SA_DRAGONOLOGY, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // HP/DEF Boosting (P) - RegisterMagic(0, CR_TRUST, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // HP Recovery (P) - RegisterMagic(0, SM_RECOVERY, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // MP Recovery (P) - RegisterMagic(0, MG_SRECOVERY, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Mammonite (G) - RegisterMagic(0, MC_MAMMONITE, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Anti-Poison (A) - RegisterMagic(0, TF_DETOXIFY, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Trick Dead (A) - RegisterMagic(0, NV_TRICKDEAD, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Sudden Attack (A) - RegisterMagic(0, GC_DARKILLUSION, 1, MagicFeather, 1, - CLASS_MASTER, 0); - - //////////////////////// Master Skill Book: Spells - // MATK Charge (A) - RegisterMagic(0, HW_MAGICPOWER, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Poison (?) - RegisterMagic(0, TF_POISON, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Backslide (A) - RegisterMagic(0, TF_BACKSLIDING, 1, MagicFeather, 1, - CLASS_MASTER, 0); - // Discount (P) - RegisterMagic(0, MC_DISCOUNT, 1, MagicFeather, 1, - CLASS_MASTER, 0); - - - //////////////////////// War Magic: Skills - // Charged Shot (R) - RegisterMagic(1, AC_CHARGEARROW, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Arrow Shower (RX) - RegisterMagic(1, AC_SHOWER, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Ground Strike (AX) - RegisterMagic(1, ASC_METEORASSAULT, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Sharp Shooter (R) - RegisterMagic(1, SN_SHARPSHOOTING, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Critical Counter Attack (A) - RegisterMagic(1, KN_AUTOCOUNTER, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Mallard's Eye (PR) - RegisterMagic(1, AC_VULTURE, 1, MagicFeather, 1, - CLASS_WAR, 0); - - //////////////////////// War Magic: Spells - // Soul Strike (M) - RegisterMagic(1, MG_SOULSTRIKE, 1, MagicFeather, 1, - CLASS_WAR, 0); - // Napalm Beat (MX) - RegisterMagic(1, MG_NAPALMBEAT, 1, MagicFeather, 1, - CLASS_WAR, 0); - - - //////////////////////// Nature Magic: Skills - // Nature Weapon (S) - RegisterMagic(1, SA_SEISMICWEAPON, 1, MagicFeather, 1, - CLASS_NATURE, 0); - // Wind Walker (A) - RegisterMagic(1, SN_WINDWALK, 1, MagicFeather, 1, - CLASS_NATURE, 0); - //////////////////////// Nature Magic: Spells - // Lightning Arrow (M) - RegisterMagic(1, MG_LIGHTNINGBOLT, 1, MagicFeather, 1, - CLASS_NATURE, 0); - // Nature Wall (T) - RegisterMagic(1, MG_FIREWALL, 1, MagicFeather, 1, - CLASS_NATURE, 0); - - - //////////////////////// Fire Magic: Skills - // Fire Weapon (S) - RegisterMagic(1, SA_FLAMELAUNCHER, 1, MagicFeather, 1, - CLASS_FIRE, 0); - //////////////////////// Fire Magic: Spells - // Fire Arrow (M) - RegisterMagic(1, MG_FIREBOLT, 1, MagicFeather, 1, - CLASS_FIRE, 0); - // Fire Ball (MX) - RegisterMagic(1, MG_FIREBALL, 1, MagicFeather, 1, - CLASS_FIRE, 0); - // Fire Walk (MX) - RegisterMagic(2, SO_FIREWALK, 1, MagicFeather, 1, - CLASS_FIRE, 0); - - - //////////////////////// Water Magic: Skills - // Frost Weapon (S) - RegisterMagic(1, SA_FROSTWEAPON, 1, MagicFeather, 1, - CLASS_WATER, 0); - //////////////////////// Water Magic: Spells - // Frost Diver (M) - RegisterMagic(1, MG_FROSTDIVER, 1, MagicFeather, 1, - CLASS_WATER, 0); - // Frost Nova (MX) - RegisterMagic(2, WZ_FROSTNOVA, 1, MagicFeather, 1, - CLASS_WATER, 0); - - - //////////////////////// Harmony Magic: Skills - // Provoke (A) - RegisterMagic(1, SM_PROVOKE, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // Mass Provoke (A) - RegisterMagic(1, EVOL_MASS_PROVOKE, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // Stealing (A) - RegisterMagic(1, TF_STEAL, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // Barter (P) - RegisterMagic(1, MC_OVERCHARGE, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // Backpack Floating (P) - RegisterMagic(1, ALL_INCCARRY, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - //////////////////////// Harmony Magic: Spells - // Holy Light (M) - RegisterMagic(1, AL_HOLYLIGHT, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // Healing (MS) - RegisterMagic(1, AL_HEAL, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - // High Healing (MS) - RegisterMagic(2, AB_HIGHNESSHEAL, 1, MagicFeather, 1, - CLASS_HARMONY, 0); - - end; -} - diff --git a/npc/dev/ci_test.txt b/npc/dev/ci_test.txt deleted file mode 100644 index 6ee12452..00000000 --- a/npc/dev/ci_test.txt +++ /dev/null @@ -1,47 +0,0 @@ -//================= Hercules Script ======================================= -//= _ _ _ -//= | | | | | | -//= | |_| | ___ _ __ ___ _ _| | ___ ___ -//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| -//= | | | | __/ | | (__| |_| | | __/\__ \ -//= \_| |_/\___|_| \___|\__,_|_|\___||___/ -//================= License =============================================== -//= This file is part of Hercules. -//= http://herc.ws - http://github.com/HerculesWS/Hercules -//= -//= Copyright (C) 2015 Hercules Dev Team -//= Copyright (C) 2014 Haru -//= -//= Hercules is free software: you can redistribute it and/or modify -//= it under the terms of the GNU General Public License as published by -//= the Free Software Foundation, either version 3 of the License, or -//= (at your option) any later version. -//= -//= This program is distributed in the hope that it will be useful, -//= but WITHOUT ANY WARRANTY; without even the implied warranty of -//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//= GNU General Public License for more details. -//= -//= You should have received a copy of the GNU General Public License -//= along with this program. If not, see . -//========================================================================= -//= Script engine self-tests, CI integration -//================= Description =========================================== -//= This script depends on npc/dev/test.txt, and extends it so that it can -//= be called in a CI environment and returns an appropriate value upon -//= termination. -//================= Current Version ======================================= -//= 1.0 -//================= Additional Comments =================================== -//= This script requires the script_mapquit plugin to be loaded. -//= Usage: ./map-server --load-plugin script_mapquit --load-script npc/dev/test.txt --load-script npc/dev/ci_test.txt -//========================================================================= - -- script HerculesSelfTestCI FAKE_NPC,{ - end; - -OnInit: - .@val = callfunc("HerculesSelfTestHelper"); - mapquit(.@val); - end; -} diff --git a/npc/dev/test.txt b/npc/dev/test.txt deleted file mode 100644 index f98651df..00000000 --- a/npc/dev/test.txt +++ /dev/null @@ -1,814 +0,0 @@ -//================= Hercules Script ======================================= -//= _ _ _ -//= | | | | | | -//= | |_| | ___ _ __ ___ _ _| | ___ ___ -//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| -//= | | | | __/ | | (__| |_| | | __/\__ \ -//= \_| |_/\___|_| \___|\__,_|_|\___||___/ -//================= License =============================================== -//= This file is part of Hercules. -//= http://herc.ws - http://github.com/HerculesWS/Hercules -//= -//= Copyright (C) 2013-2015 Hercules Dev Team -//= Copyright (C) 2013-2015 Haru -//= -//= Hercules is free software: you can redistribute it and/or modify -//= it under the terms of the GNU General Public License as published by -//= the Free Software Foundation, either version 3 of the License, or -//= (at your option) any later version. -//= -//= This program is distributed in the hope that it will be useful, -//= but WITHOUT ANY WARRANTY; without even the implied warranty of -//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//= GNU General Public License for more details. -//= -//= You should have received a copy of the GNU General Public License -//= along with this program. If not, see . -//========================================================================= -//= Script engine self-tests -//================= Description =========================================== -//= Script to test operators and possibly other elements of the script -//= engine, useful for regression testing. -//================= Current Version ======================================= -//= 2.0 -//========================================================================= - -function script F_TestReturnValue { - return getarg(0); -} - -function script F_TestScopeVars { - .@x = 2; - return .@x+1; -} - -function script F_TestNPCVars { - .xt = 2; - return .xt+1; -} - -function script F_TestDeepNestedScope { - if (getarg(0) <= 0) - return getarg(1); // Stop recursion - if (getarg(1)) - return callfunc("F_TestDeepNestedScope", getarg(0)-1, getarg(1)); // Recursion step - .@x = 1; - return callfunc("F_TestDeepNestedScope", getarg(0)-1, .@x); // First step -} - -function script F_TestDeepNestedScopeNPC2 { - if (getarg(0) <= 0) - return getarg(1); // Stop recursion - if (getarg(1)) - return callfunc("F_TestDeepNestedScopeNPC", getarg(0)-1, getarg(1)); // Recursion step - .xt = 1; - return callfunc("F_TestDeepNestedScopeNPC", getarg(0)-1, .xt); // First step -} - -function script F_TestDeepNestedScopeNPC { - if (getarg(0) <= 0) - return getarg(1); // Stop recursion - if (getarg(1)) - return callfunc("F_TestDeepNestedScopeNPC2", getarg(0)-1, getarg(1)); // Recursion step - .xt = 1; - return callfunc("F_TestDeepNestedScopeNPC2", getarg(0)-1, .xt); // First step -} - -function script F_TestNestedScope { - .@x = 1; - .@y = callfunc("F_TestReturnValue", .@x); - return .@y; -} - -function script F_TestNestedScopeNPC { - .xt = 1; - .yt = callfunc("F_TestReturnValue", .xt); - return .yt; -} - -function script F_TestArrayRefs { - return getelementofarray(getarg(0), getarraysize(getarg(0)) - 1); -} - -function script F_TestReturnArrayRef { - setarray getarg(0), 5, 6, 7, 8; - return getarraysize(getarg(0)); -} - -function script F_TestScopeArrays { - setarray .@x, 1, 2, 3, 4; - copyarray .@y, getarg(0), getarraysize(getarg(0)); - return getarraysize(.@y); -} - -function script F_TestNPCArrays { - setarray .xt, 1, 2, 3, 4; - copyarray .yt, getarg(0), getarraysize(getarg(0)); - return getarraysize(.yt); -} - -function script F_TestVarOfAnotherNPC { - return getvariableofnpc(.xt, getarg(0)); -} - -- script TestVarOfAnotherNPC FAKE_NPC,{ - // Used to test getvariableofnpc() - end; -} - -function script HerculesSelfTestHelper { - if (.once > 0) - return .errors; - .once = 1; - .errors = 0; - - // Callsub (basic) - callsub(OnCheck, "Callsub", 1, 1); - callsub(OnCheck, "Callsub (getarg default values)", 1); - - - // Array subscript - setarray .@a, 3, 2, 1; - callsub(OnCheck, "Array subscript", .@a[2]); - - - // Increment and decrement operators ++, -- - .@x = 1; - .@y = .@x++; // .@y = .@x; .@x = .@x + 1; - callsub(OnCheck, "Suffix increment ++", .@y); - callsub(OnCheck, "Suffix increment ++", .@x, 2); - .@x = 1; - .@y = .@x--; // .@y = .@x; .@x = .@x - 1; - callsub(OnCheck, "Suffix decrement --", .@y); - callsub(OnCheck, "Suffix decrement --", .@x, 0); - .@x = 0; - .@y = ++.@x; // .@x = .@x + 1; .@y = .@x; - callsub(OnCheck, "Prefix increment ++", .@y); - callsub(OnCheck, "Prefix increment ++", .@x); - .@x = 2; - .@y = --.@x; // .@x = .@x - 1; .@y = .@x; - callsub(OnCheck, "Prefix decrement --", .@y); - callsub(OnCheck, "Prefix decrement --", .@x); - - // Order of [] and --/++ - .@a[1] = 0; - .@a[1]++; // .@a[1] = .@a[1] + 1; - callsub(OnCheck, "Order of [] and ++", .@a[1]); - .@a[1] = 2; - .@a[1]--; // .@a[1] = .@a[1] - 1; - callsub(OnCheck, "Order of [] and --", .@a[1]); - - - // Unary operators -, !, ~ - .@x = 1; - .@y = -.@x; // .@y = 0 - .@x; - callsub(OnCheck, "Unary operator -", .@y, -1); - .@x = 1; - .@y = !.@x; // if(.@x == 0) .@y = 1; else .@y = 0; - callsub(OnCheck, "Unary operator !", .@y, 0); - .@x = 0x00000001; - .@y = ~.@x; // One's complement of 0x00000001 is 0xfffffffe, which is -2 - callsub(OnCheck, "Unary operator ~", .@y, -2); - - // Associativity of unary operators -, !, ~ - .@x = 1; - .@y = ~ ! .@x; // .@y = ~(!.@x); - callsub(OnCheck, "Associativity of unary ~ and !", .@y, -1); - .@x = 0; - .@y = - ! .@x; // .@y = -(!.@x); - callsub(OnCheck, "Associativity of unary - and !", .@y, -1); - .@x = 1; - .@y = ~ - .@x; // .@y = ~(-.@x); - callsub(OnCheck, "Associativity of unary ~ and -", .@y, 0); - .@x = 1; - .@y = - ~ .@x; // .@y = -(~.@x); - callsub(OnCheck, "Associativity of unary - and ~", .@y, 2); - - // Order of unary -, !, ~ and prefix/suffix ++/-- - .@x = 2; - .@y = - --.@x; // .@y = -(--.@x); - callsub(OnCheck, "Order of unary - and prefix --", .@y, -1); - callsub(OnCheck, "Order of unary - and prefix --", .@x); - .@x = 1; - .@y = - .@x--; // .@y = -(.@x--); - callsub(OnCheck, "Order of unary - and suffix --", .@y, -1); - callsub(OnCheck, "Order of unary - and suffix --", .@x, 0); - .@x = 0; - .@y = - ++.@x; // .@y = -(++.@x); - callsub(OnCheck, "Order of unary - and prefix ++", .@y, -1); - callsub(OnCheck, "Order of unary - and prefix ++", .@x); - .@x = 1; - .@y = - .@x++; // .@y = -(.@x++); - callsub(OnCheck, "Order of unary - and suffix ++", .@y, -1); - callsub(OnCheck, "Order of unary - and suffix ++", .@x, 2); - .@x = 1; - .@y = !--.@x; // .@y = !(--.@x); - callsub(OnCheck, "Order of unary ! and prefix --", .@y); - callsub(OnCheck, "Order of unary ! and prefix --", .@x, 0); - .@x = 1; - .@y = !.@x--; // .@y = !(.@x--); - callsub(OnCheck, "Order of unary ! and suffix --", .@y, 0); - callsub(OnCheck, "Order of unary ! and suffix --", .@x, 0); - .@x = 0; - .@y = !++.@x; // .@y = !(++.@x); - callsub(OnCheck, "Order of unary ! and prefix ++", .@y, 0); - callsub(OnCheck, "Order of unary ! and prefix ++", .@x); - .@x = 0; - .@y = !.@x++; // .@y = !(.@x++); - callsub(OnCheck, "Order of unary ! and suffix ++", .@y); - callsub(OnCheck, "Order of unary ! and suffix ++", .@x); - .@x = 2; - .@y = ~--.@x; // .@y = ~(--.@x); - callsub(OnCheck, "Order of unary ~ and prefix --", .@y, -2); - callsub(OnCheck, "Order of unary ~ and prefix --", .@x, 1); - .@x = 1; - .@y = ~.@x--; // .@y = ~(.@x--); - callsub(OnCheck, "Order of unary ~ and suffix --", .@y, -2); - callsub(OnCheck, "Order of unary ~ and suffix --", .@x, 0); - .@x = 0; - .@y = ~++.@x; // .@y = ~(++.@x); - callsub(OnCheck, "Order of unary ~ and prefix ++", .@y, -2); - callsub(OnCheck, "Order of unary ~ and prefix ++", .@x, 1); - .@x = 1; - .@y = ~.@x++; // .@y = ~(.@x++); - callsub(OnCheck, "Order of unary ~ and suffix ++", .@y, -2); - callsub(OnCheck, "Order of unary ~ and suffix ++", .@x, 2); - - // Binary *, /, % operators - .@x = 2 * 3; // .@x = 6; - callsub(OnCheck, "Binary * operator", .@x, 6); - .@x = 7 / 2; // .@x = 3; - callsub(OnCheck, "Binary / operator", .@x, 3); - .@x = 7 % 2; // .@x = 1; - callsub(OnCheck, "Binary % operator", .@x, 1); - - // Associativity of *, /, % - .@x = 8 * 3 / 2; // .@x = (8 * 3) / 2; - callsub(OnCheck, "Associativity of * and /", .@x, 12); - - // Order of binary *%/ and unary !-~ - .@x = 2 * ! 3; // .@x = 2 * (!3); - callsub(OnCheck, "Order of binary * and unary !", .@x, 0); - .@x = ~ 1 * 2; // .@x = (~1) * 2; - callsub(OnCheck, "Order of unary ~ and binary *", .@x, -4); - - - // Binary +, - operators - .@x = 1 + 3; // .@x = 4; - callsub(OnCheck, "Binary + operator", .@x, 4); - .@x = 1 - 3; // .@x = -2; - callsub(OnCheck, "Binary - operator", .@x, -2); - - // Associativity of +,- - .@x = 0x7fffffff - 0x7ffffff0 + 1; // .@x = (0x7fffffff - 0x7ffffff0) + 1; (without overflow) - callsub(OnCheck, "Associativity of + and -", .@x, 16); - - // Order of +, - and *, /, % - .@x = 1 + 3 * 2; // .@x = 1 + (3 * 2); - callsub(OnCheck, "Order of + and *", .@x, 7); - - - // << and >> operators - .@x = 1<<3; // .@x = 1*2*2*2; - callsub(OnCheck, "Left shift << operator", .@x, 8); - .@x = 12>>2; // .@x = 12/2/2; - callsub(OnCheck, "Right shift >> operator", .@x, 3); - - // Associativity of << and >> - .@x = 0x40000000 >> 4 << 2; // .@x = (0x40000000 >> 4) << 2 - callsub(OnCheck, "Associativity of >> and <<", .@x, 0x10000000); - - // Order of <> and +/- - .@x = 4 << 2 + 1; // .@x = 4 << (2+1); - callsub(OnCheck, "Order of << and +", .@x, 32); - - - // <, <=, >, >= operators - .@x = (1 < 2); // true - .@y = (2 < 2); // false - callsub(OnCheck, "< operator", .@x); - callsub(OnCheck, "< operator", .@y, 0); - .@x = (1 <= 2); // true - .@y = (2 <= 2); // true - callsub(OnCheck, "<= operator", .@x); - callsub(OnCheck, "<= operator", .@y); - .@x = (2 > 1); // true - .@y = (2 > 2); // false - callsub(OnCheck, "> operator", .@x); - callsub(OnCheck, "> operator", .@y, 0); - .@x = (2 >= 1); // true - .@y = (2 >= 2); // true - callsub(OnCheck, ">= operator", .@x); - callsub(OnCheck, ">= operator", .@y); - - // Associativity of <,<=,>,>= - .@x = 1 > 0 > 0; // (1 > 0) > 0 --> 1 > 0 --> true - callsub(OnCheck, "Associativity of > operators", .@x); - - // Order of >>/<< and />= - .@x = 1 < 1 << 2; // .@x = 1 < (1<<2); - callsub(OnCheck, "Order of < and <<", .@x); - - - // ==, !=, ~=, ~! operators - .@x = (0 == 0); // true - .@y = (1 == 0); // false - callsub(OnCheck, "== operator", .@x); - callsub(OnCheck, "== operator", .@y, 0); - .@x = (1 != 0); // true - .@y = (1 != 1); // false - callsub(OnCheck, "!= operator", .@x); - callsub(OnCheck, "!= operator", .@y, 0); - .@x$ = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " - "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. " - "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. " - "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; - .@y = (.@x$ ~= "^Lorem.*, ([a-z]*).*(Duis).* ([a-z.]*)$"); - callsub(OnCheck, "~= operator", .@y, 4); - callsub(OnCheck, "~= operator", $@regexmatchcount, 4); - if( $@regexmatchcount == 4 ) { - callsub(OnCheck, "~= operator", $@regexmatch$[0], .@x$); - callsub(OnCheck, "~= operator", $@regexmatch$[1], "quis"); - callsub(OnCheck, "~= operator", $@regexmatch$[2], "Duis"); - callsub(OnCheck, "~= operator", $@regexmatch$[3], "laborum."); - } - .@y = (.@x$ ~! "^Not Lorem.*, ([a-z]*).*(Duis).* ([a-z.]*)$"); - callsub(OnCheck, "~! operator", .@y); - - // Associativity of ==, != - .@x = (1 == 0 == 0); // (1 == 0) == 0 --> 0 == 0 --> 1 - .@y = (1 != 0 == 0); // (1 != 0) == 0 --> 1 == 0 --> 0 - callsub(OnCheck, "Associativity of != and == operators", .@x); - callsub(OnCheck, "Associativity of != and == operators", .@y, 0); - - // Order of />= and ==/!= - .@x = (1 == 2 > 1); // true - .@y = (1 < 2 == 1); // true - callsub(OnCheck, "Order of <,>,==", .@x); - callsub(OnCheck, "Order of <,>,==", .@y); - - - .@x$ = "string " - "concatenation" /* test */ " succeeded"; - callsub(OnCheckStr, "String concatenation", .@x$, "string concatenation succeeded"); - - - // Bitwise & operator - .@x = (7&4); // 0111 & 0100 --> 0100 - .@y = (4&1); // 0100 & 0001 --> 0000 - callsub(OnCheck, "Bitwise & operator", .@x, 4); - callsub(OnCheck, "Bitwise & operator", .@y, 0); - - // Order of & and ==/!= - .@x = (4 == 7 & 4); // (4 == 7)&4 - .@y = (1 & 3 != 1); // 1 & (3 != 1) - callsub(OnCheck, "Order of ==/!= and &", .@x, 0); - callsub(OnCheck, "Order of ==/!= and &", .@y); - - - // Bitwise ^ operator - .@x = (3^1); // 0011 ^ 0001 --> 0010 - callsub(OnCheck, "Bitwise ^ operator", .@x, 2); - - // Order of ^ and & - .@x = (0 & 2 ^ 2); // (0 & 2) ^ 2 --> (0000 & 0010) | 0010 --> 0000 ^ 0010 --> 0010 - .@y = (2 ^ 2 & 0); // 2 ^ (2 & 0) --> 0010 | (0010 & 0000) --> 0010 ^ 0000 --> 0010 - callsub(OnCheck, "Order of ^ and &", .@x, 2); - callsub(OnCheck, "Order of ^ and &", .@y, 2); - - - // Bitwise | operator - .@x = (3|4); // 0011 | 0100 --> 0111 - .@y = (4|1); // 0100 | 0001 --> 0101 - callsub(OnCheck, "Bitwise | operator", .@x, 7); - callsub(OnCheck, "Bitwise | operator", .@y, 5); - - // Order of ^ and | - .@x = (2 ^ 2 | 2); // (2 ^ 1) | 4 --> (0010 ^ 0010) | 0010 --> 0000 | 0010 --> 0010 - .@y = (2 | 2 ^ 2); // 4 | (1 ^ 2) --> 0010 | (0010 ^ 0010) --> 0010 | 0000 --> 0010 - callsub(OnCheck, "Order of | and ^", .@x, 2); - callsub(OnCheck, "Order of | and ^", .@y, 2); - - - // Logical && operator - .@x = (1 && 1); // true - .@y = (0 && 1); // false - callsub(OnCheck, "Logical && operator", .@x); - callsub(OnCheck, "Logical && operator", .@y, 0); - - // Associativity of && and short-circuit - .@x = 0; - .@y = (1 && 0 && (.@x = 1)); // should short circuit as false before evaluating the assignment - //FIXME callsub(OnCheck, "Short-circuit of &&", .@x, 0); - callsub(OnCheck, "Associativity of &&", .@y, 0); - - // Order of bitwise | and logical && - .@x = (1 && 0 | 4); // 1 && (0|4) - .@y = (4 | 0 && 1); // (4|0) && 1 - callsub(OnCheck, "Order of && and |", .@x); - callsub(OnCheck, "Order of && and |", .@y); - - - // Logical || operator - .@x = (1 || 1); // true - .@y = (0 || 1); // true - callsub(OnCheck, "Logical || operator", .@x); - callsub(OnCheck, "Logical || operator", .@y); - - // Associativity of || and short-circuit - .@x = 0; - .@y = (1 || 0 || (.@x = 1)); // should short circuit as true before evaluating the assignment - //FIXME callsub(OnCheck, "Short-circuit of ||", .@x, 0); - callsub(OnCheck, "Associativity of ||", .@y); - - // Order of logical && and || - .@x = (0 && 1 || 1); // (0 && 1) || 1 - .@y = (1 || 1 && 0); // 1 || (1 && 0) - callsub(OnCheck, "Order of && and ||", .@x); - callsub(OnCheck, "Order of && and ||", .@y); - - // Ternary conditional operator ?: - .@x = (1 ? 2 : 3); // 2 - .@y = (0 ? 2 : 3); // 3 - callsub(OnCheck, "Ternary conditional operator", .@x, 2); - callsub(OnCheck, "Ternary conditional operator", .@y, 3); - - // Associativity of ?: - .@x = (1 ? 2 : 0 ? 3 : 4); - .@y = (1 ? 1 ? 2 : 3 : 5); - callsub(OnCheck, "Associativity of ?:", .@x, 2); - callsub(OnCheck, "Associativity of ?:", .@y, 2); - - // Order of logical || and ternary ?: - .@x = (1 ? 0 : 0 || 1); // 1 ? 0 : (0 || 1) --> false - callsub(OnCheck, "Order of || and ?:", .@x, 0); - - - // Assignment operators - .@x = 1; - callsub(OnCheck, "Direct assignment operator =", .@x); - .@x += 7; // 1 + 7 - callsub(OnCheck, "Assignment by sum +=", .@x, 8); - .@x -= 1; // 8 - 1 - callsub(OnCheck, "Assignment by difference -=", .@x, 7); - .@x *= 2; // 7 * 2 - callsub(OnCheck, "Assignment by product *=", .@x, 14); - .@x /= 2; // 14 / 2 - callsub(OnCheck, "Assignment by quotient /=", .@x, 7); - .@x %= 4; // 7 % 4 - callsub(OnCheck, "Assignment by remainder %=", .@x, 3); - .@x <<= 2; // 3 << 2 - callsub(OnCheck, "Assignment by bitwise left shift <<=", .@x, 12); - .@x >>= 1; // 12 >> 1 - callsub(OnCheck, "Assignment by bitwise right shift >>=", .@x, 6); - .@x &= 5; // 6 & 5 (0110 & 0101 --> 0100) - callsub(OnCheck, "Assignment by bitwise and &=", .@x, 4); - .@x ^= 5; // 4 ^ 5 (0100 ^ 0101 --> 0001) - callsub(OnCheck, "Assignment by bitwise xor ^=", .@x, 1); - .@x |= 2; // 1 | 2 (0001 | 0010 --> 0011) - callsub(OnCheck, "Assignment by bitwise or |=", .@x, 3); - - // Associativity of assignment operators - .@x = 0; .@y = 0; - .@x = .@y = 1; - callsub(OnCheck, "Associativity of =", .@x); - callsub(OnCheck, "Associativity of =", .@y); - .@x = 0; .@y = 1; - .@x = .@y += 4; - callsub(OnCheck, "Associativity of = and +=", .@x, 5); - callsub(OnCheck, "Associativity of = and +=", .@y, 5); - .@x = 5; .@y = 3; - .@z = 8; - .@x *= .@y += 1; - callsub(OnCheck, "Associativity of *= and +=", .@x, 20); - callsub(OnCheck, "Associativity of *= and +=", .@y, 4); - - .@x = 1; .@y = 3; - .@x += .@y * 10; - callsub(OnCheck, "Order of += and *", .@x, 31); - .@x = 1; .@y = 3; - .@x = .@y != 3 ? .@y = 2 : 4; - callsub(OnCheck, "Order of = and ?:", .@x, 4); - // FIXME callsub(OnCheck, "Short-circuit of ?:", .@y, 3); - - .@x = 0; - if (0) - if (1) - .@x = 2; - else - .@x = 3; - callsub(OnCheck, "Dangling else", .@x, 0); - - - // Array operations - .@x[0] = 1; - callsub(OnCheck, "Array size (single value)", getarraysize(.@x), 1); - .@x[0] = 0; - callsub(OnCheck, "Array size (single value removal)", getarraysize(.@x), 0); - - .@x[0] = 1; - .@x[1] = 2; - .@x[2] = 3; - .@x[5] = 4; - .@x[8] = 5; - .@x[9] = 0; - setarray .@y[0], 1, 2, 3, 0, 0, 4, 0, 0, 5; - callsub(OnCheck, "Array size (assignment)", getarraysize(.@x), 9); - callsub(OnCheck, "Array size (setarray)", getarraysize(.@y), 9); - for (.@i = 0; .@i < 10; ++.@i) { - callsub(OnCheck, "Array subscript and setarray [" + .@i + "]", .@x[.@i], .@y[.@i]); - } - - cleararray .@x[1], 8, 6; - callsub(OnCheck, "cleararray (value) [0]", .@x[0], 1); - for (.@i = 1; .@i < 7; ++.@i) { - callsub(OnCheck, "cleararray (value) [" + .@i + "]", .@x[.@i], 8); - } - callsub(OnCheck, "cleararray (value) [7]", .@x[7], 0); - callsub(OnCheck, "cleararray (value) [8]", .@x[8], 5); - callsub(OnCheck, "cleararray (value) [9]", .@x[9], 0); - - cleararray .@x, 0, getarraysize(.@x); - cleararray .@y, 0, getarraysize(.@y); - callsub(OnCheck, "cleararray and getarraysize", getarraysize(.@x), 0); - for (.@i = 0; .@i < 10; ++.@i) { - callsub(OnCheck, "cleararray (zero) [" + .@i + "]", .@x[.@i], 0); - } - - cleararray .@x, 0, getarraysize(.@x); - setarray .@x[1], 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - deletearray .@x; - callsub(OnCheck, "deletearray (clear) and getarraysize", getarraysize(.@x), 0); - for (.@i = 0; .@i < 18; ++.@i) { - callsub(OnCheck, "deletearray (clear) [" + .@i + "]", .@x[.@i], 0); - } - - deletearray .@x; - deletearray .@y; - setarray .@x[1], 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 0, 13, 14, 15, 16; - setarray .@y, 0, 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - deletearray .@x[9], 1; - callsub(OnCheck, "deletearray (single) and getarraysize", getarraysize(.@x), 16); - for (.@i = 0; .@i < 18; ++.@i) { - callsub(OnCheck, "deletearray (single) [" + .@i + "]", .@x[.@i], .@y[.@i]); - } - - deletearray .@x; - deletearray .@y; - setarray .@x[1], 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - setarray .@y, 0, 1, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - deletearray .@x[2], 4; - callsub(OnCheck, "deletearray (multiple) and getarraysize", getarraysize(.@x), 12); - for (.@i = 0; .@i < 18; ++.@i) { - callsub(OnCheck, "deletearray (multiple) [" + .@i + "]", .@x[.@i], .@y[.@i]); - } - - deletearray .@x; - deletearray .@y; - setarray .@x[1], 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - setarray .@y, 0, 1; - deletearray .@x[2], 1000; - callsub(OnCheck, "deletearray (large count) and getarraysize", getarraysize(.@x), 2); - for (.@i = 0; .@i < 18; ++.@i) { - callsub(OnCheck, "deletearray (large count) [" + .@i + "]", .@x[.@i], .@y[.@i]); - } - - deletearray .@x; - deletearray .@y; - setarray .@x[1], 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0, 13, 14, 15, 16; - setarray .@y, 0, 1; - deletearray .@x[2]; - callsub(OnCheck, "deletearray (truncate) and getarraysize", getarraysize(.@x), 2); - for (.@i = 0; .@i < 18; ++.@i) { - callsub(OnCheck, "deletearray (truncate) [" + .@i + "]", .@x[.@i], .@y[.@i]); - } - - deletearray .@x; - .@x[1] = 2; - .@x[65536] = 1; - callsub(OnCheck, "large array index", .@x[65536], 1); - callsub(OnCheck, "large array index and getarraysize", getarraysize(.@x), 65537); - .@x[65536] = 0; - callsub(OnCheck, "large array index (shrink)", .@x[65536], 0); - callsub(OnCheck, "large array index and getarraysize (shrink)", getarraysize(.@x), 2); - .@x[1] = 0; - callsub(OnCheck, "array shrink", .@x[1], 0); - callsub(OnCheck, "array shrink and getarraysize", getarraysize(.@x), 0); - - // min and max - callsub(OnCheck, "min()", min(5, -10, 8, 3, -2, 1000), -10); - callsub(OnCheck, "max()", max(5, -10, 8, 3, -2, 1000), 1000); - - - // Constants - callsub(OnCheck, "'true' constant", true, 1); - callsub(OnCheck, "'false' constant", false, 0); - callsub(OnCheck, "'Piou' mob ID", Piou, 1002); - callsub(OnCheck, "'NV_BASIC' skill ID", NV_BASIC, 1); - callsub(OnCheck, "'Acorn' item ID", Acorn, 501); - callsub(OnCheck, "'Bread' item ID", Bread, 502); - - - // setd/getd - .@x = 1; .@x$ = ".@x"; - callsub(OnCheck, "getd", getd(".@x"), 1); - callsub(OnCheck, "getd arguments", getd(.@x$), 1); - .@y = 0; .@y$ = ".@y"; - setd(".@y", .@x); - callsub(OnCheck, "setd", .@y, 1); - setd(.@y$, 2); - callsub(OnCheck, "setd arguments", .@y, 2); - set getd(".@x"), getd(".@y"); - callsub(OnCheck, "set getd", .@x, .@y); - .@y = 1; - setd(".@x", getd(".@y")); - callsub(OnCheck, "setd getd", .@x, .@y); - - // getvariableofnpc - .xt = 2; - set getvariableofnpc(.xt, "TestVarOfAnotherNPC"), 1; - callsub(OnCheck, "Setting NPC variables of another NPC", getvariableofnpc(.xt, "TestVarOfAnotherNPC"), 1); - callsub(OnCheck, "Setting NPC variables of another NPC (local variable overwrite check)", .xt, 2); - - // Callsub (advanced) - callsub(OnCheck, "Callsub return value", callsub(OnTestReturnValue, 1)); - .@x = 1; - callsub(OnCheck, "Callsub return with scope variables", callsub(OnTestScopeVars), 3); - callsub(OnCheck, "Callsub (parent scope vars isolation)", .@x, 1); - callsub(OnCheck, "Callsub (nested scopes)", callsub(OnTestNestedScope), 1); - callsub(OnCheck, "Callsub (deeply nested scopes)", callsub(OnTestDeepNestedScope, 30, 0), 1); - .@x = 1; - .@y = callsub(OnSetReference, .@x); - callsub(OnCheck, "Callsub (setting references)", .@y, 2); - callsub(OnCheck, "Callsub (setting references)", .@x, 2); - deletearray .@x; - setarray .@x, 1, 2, 3, 4; - callsub(OnCheck, "Callsub (array references)", callsub(OnTestArrayRefs, .@x), 4); - deletearray .@x; - .@y = callsub(OnTestReturnArrayRef, .@x); - callsub(OnCheck, "Callsub return array references (size check)", getarraysize(.@x), .@y); - callsub(OnCheck, "Callsub return array references", getelementofarray(.@x, 3), 8); - deletearray .@x; - deletearray .@y; - setarray .@x, 1, 2; - .@z = getarraysize(.@x); - setarray .@y, 5, 6, 7, 8, 9; - callsub(OnCheck, "Callsub (copyarray from reference with the same name)", getarraysize(.@y), callsub(OnTestScopeArrays, .@y)); - callsub(OnCheck, "Callsub (parent array vars isolation)", getarraysize(.@x), .@z); - deletearray .@x; - deletearray .@y; - .xt = 2; - set getvariableofnpc(.xt, "TestVarOfAnotherNPC"), 1; - callsub(OnCheck, "Callsub (return NPC variables from another NPC)", callsub(OnTestVarOfAnotherNPC, "TestVarOfAnotherNPC"), 1); - callsub(OnCheck, "Callsub (return NPC variables from another NPC - local variable overwrite check)", .xt, 2); - - // Callfunc - callsub(OnCheck, "Callfunc return value", callfunc("F_TestReturnValue", 1)); - .@x = 1; - callsub(OnCheck, "Callfunc return with scope variables", callfunc("F_TestScopeVars"), 3); - callsub(OnCheck, "Callfunc (parent scope vars isolation)", .@x, 1); - callsub(OnCheck, "Callfunc (nested scopes)", callfunc("F_TestNestedScope"), 1); - callsub(OnCheck, "Callfunc (deeply nested scopes)", callfunc("F_TestDeepNestedScope", 30, 0), 1); - deletearray .@x; - setarray .@x, 1, 2, 3, 4; - callsub(OnCheck, "Callfunc (array references)", callfunc("F_TestArrayRefs", .@x), 4); - deletearray .@x; - .@y = callfunc("F_TestReturnArrayRef", .@x); - callsub(OnCheck, "Callfunc return array references (size check)", getarraysize(.@x), .@y); - callsub(OnCheck, "Callfunc return array references", getelementofarray(.@x, 3), 8); - deletearray .@x; - deletearray .@y; - setarray .@x, 1, 2; - .@z = getarraysize(.@x); - setarray .@y, 5, 6, 7, 8, 9; - callsub(OnCheck, "Callfunc (copyarray from reference with the same name)", getarraysize(.@y), callfunc("F_TestScopeArrays", .@y)); - callsub(OnCheck, "Callfunc (parent array vars isolation)", getarraysize(.@x), .@z); - deletearray .@x; - deletearray .@y; - .xt = 1; - callsub(OnCheck, "Callfunc return with NPC variables", callfunc("F_TestNPCVars"), 3); - callsub(OnCheck, "Callfunc (parent NPC vars isolation)", .xt, 1); - callsub(OnCheck, "Callfunc (nested scopes and NPC variables)", callfunc("F_TestNestedScopeNPC"), 1); - callsub(OnCheck, "Callfunc (deeply nested scopes and NPC variables)", callfunc("F_TestDeepNestedScopeNPC", 30, 0), 1); - deletearray .xt; - setarray .xt, 1, 2, 3, 4; - callsub(OnCheck, "Callfunc (array references and NPC variables)", callfunc("F_TestArrayRefs", .xt), 4); - deletearray .xt; - .yt = callfunc("F_TestReturnArrayRef", .xt); - callsub(OnCheck, "Callfunc return array references with NPC variables (size check)", getarraysize(.xt), .yt); - callsub(OnCheck, "Callfunc return array references wuth NPC variables", getelementofarray(.xt, 3), 8); - deletearray .xt; - deletearray .yt; - setarray .xt, 1, 2; - .@z = getarraysize(.@x); - setarray .yt, 5, 6, 7, 8, 9; - callsub(OnCheck, "Callfunc (copyarray from NPC variable reference with the same name)", getarraysize(.@y), callfunc("F_TestNPCArrays", .@y)); - callsub(OnCheck, "Callfunc (parent array NPC vars isolation)", getarraysize(.@x), .@z); - deletearray .xt; - deletearray .yt; - .xt = 2; - set getvariableofnpc(.xt, "TestVarOfAnotherNPC"), 1; - callsub(OnCheck, "Callfunc (return NPC variables from another NPC)", callfunc("F_TestVarOfAnotherNPC", "TestVarOfAnotherNPC"), 1); - callsub(OnCheck, "Callfunc (return NPC variables from another NPC - local variable overwrite check)", .xt, 2); - - callsub(OnCheckStr, "sprintf (%%)", sprintf("'%%'"), "'%'"); - callsub(OnCheckStr, "sprintf (%d)", sprintf("'%d'", 5), "'5'"); - callsub(OnCheckStr, "sprintf (neg. %d)", sprintf("'%d'", -5), "'-5'"); - callsub(OnCheckStr, "sprintf (%u)", sprintf("'%u'", 5), "'5'"); - callsub(OnCheckStr, "sprintf (%x)", sprintf("'%x'", 10), "'a'"); - callsub(OnCheckStr, "sprintf (%X)", sprintf("'%X'", 31), "'1F'"); - callsub(OnCheckStr, "sprintf (%s)", sprintf("'%s'", "Hello World!"), "'Hello World!'"); - callsub(OnCheckStr, "sprintf (%c)", sprintf("'%c'", "Hello World!"), "'H'"); - callsub(OnCheckStr, "sprintf (%+d)", sprintf("'%+d'", 5), "'+5'"); - callsub(OnCheckStr, "sprintf (%{n}d)", sprintf("'%5d'", 5), "' 5'"); - callsub(OnCheckStr, "sprintf (%-{n}d)", sprintf("'%-5d'", 5), "'5 '"); - callsub(OnCheckStr, "sprintf (%-+{n}d)", sprintf("'%-+5d'", 5), "'+5 '"); - callsub(OnCheckStr, "sprintf (%+0{n}d)", sprintf("'%+05d'", 5), "'+0005'"); - callsub(OnCheckStr, "sprintf (%0*d)", sprintf("'%0*d'", 5, 10), "'00010'"); - callsub(OnCheckStr, "sprintf (Two args)", sprintf("'%+05d' '%x'", 5, 0x7f), "'+0005' '7f'"); - callsub(OnCheckStr, "sprintf (positional)", sprintf("'%2$+05d'", 5, 6), "'+0006'"); - callsub(OnCheckStr, "sprintf (positional)", sprintf("'%2$s' '%1$c'", "First", "Second"), "'Second' 'F'"); - - if (.errors) { - consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]"); - consolemes(CONSOLEMES_ERROR, "**** The test was completed with " + .errors + " errors. ****"); - } else { - consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]"); - } - return .errors; - end; - -OnTestReturnValue: - return getarg(0); - -OnTestScopeVars: - .@x = 2; - return .@x+1; - -OnTestDeepNestedScope: - if (getarg(0) <= 0) - return getarg(1); // Stop recursion - if (getarg(1)) - return callsub(OnTestDeepNestedScope, getarg(0)-1, getarg(1)); // Recursion step - .@x = 1; - return callsub(OnTestDeepNestedScope, getarg(0)-1, .@x); // First step - -OnTestNestedScope: - .@x = 1; - .@y = callsub(OnTestReturnValue, .@x); - return .@y; - -OnTestArrayRefs: - return getelementofarray(getarg(0), getarraysize(getarg(0)) - 1); - -OnTestReturnArrayRef: - setarray getarg(0), 5, 6, 7, 8; - return getarraysize(getarg(0)); - -OnTestScopeArrays: - setarray .@x, 1, 2, 3, 4; - copyarray .@y, getarg(0), getarraysize(getarg(0)); - return getarraysize(.@y); - -OnTestVarOfAnotherNPC: - return getvariableofnpc(.xt, getarg(0)); - -OnReportError: - .@msg$ = getarg(0,"Unknown Error"); - .@val$ = getarg(1,""); - .@ref$ = getarg(2,""); - if (.errors == 1) - consolemes(CONSOLEMES_ERROR, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****"); - consolemes(CONSOLEMES_ERROR, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)"); - ++.errors; - //end; - return; - -OnCheck: - .@msg$ = getarg(0,"Unknown Error"); - .@val = getarg(1,0); - .@ref = getarg(2,1); - if (.@val != .@ref) { - callsub(OnReportError, .@msg$, ""+.@val, ""+.@ref); // String coercion - } - return; -OnCheckStr: - .@msg$ = getarg(0,"Unknown Error"); - .@val$ = getarg(1,""); - .@ref$ = getarg(2,""); - if (.@val$ != .@ref$) { - callsub(OnReportError, .@msg$, .@val$, .@ref$); - } - return; -OnSetReference: - set getarg(0), getarg(0) + 1; - return getarg(0); -} - -- script HerculesSelfTest FAKE_NPC,{ - end; - -OnInit: - callfunc("HerculesSelfTestHelper"); - end; -} diff --git a/npc/fermi/_import.txt b/npc/fermi/_import.txt deleted file mode 100644 index 9c2eafa4..00000000 --- a/npc/fermi/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map fermi: Three Fermi Land -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/fermi/_warps.txt", diff --git a/npc/fermi/_warps.txt b/npc/fermi/_warps.txt deleted file mode 100644 index 9da4df68..00000000 --- a/npc/fermi/_warps.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map fermi: Three Fermi Land warps -fermi,29,19,0 warp #fermi_29_19 0,0,marine,43,27 diff --git a/npc/functions/DyeConfig.txt b/npc/functions/DyeConfig.txt new file mode 100755 index 00000000..8ab0aa1a --- /dev/null +++ b/npc/functions/DyeConfig.txt @@ -0,0 +1,41 @@ +009-2,32,105,0 script #DyeChecker NPC32767,{ + end; +OnInit: + /****************************** + Config Starts Here + ******************************/ + setarray $@DYE_color_names$, "Red", "Green", "Dark Blue", "Yellow", "Light blue", "Pink", "Black", "Orange", "Purple", "Dark Green"; + setarray $@DYE_colors$, "Red", "Green", "DarkBlue", "Yellow", "LightBlue", "Pink", "Black", "Orange", "Purple", "DarkGreen"; + + setarray $@DYE_items$, "Beret", "CottonShirt", "CottonCloth", "VNeckSweater", "Turtleneck", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "RabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "Contributor", "SorcererRed", "SorcererGreen", "SorcererDBlue", "SorcererYellow", "SorcererLBlue", "SorcererPink", "SorcererBlack", "SorcererOrange", "SorcererPurple", "SorcererDGreen", "SorcererWhite"; + setarray $@DYE_item_names$, "Beret", "Cotton Shirt", "Cotton Cloth", "V-Neck Sweater", "Turtleneck Sweater", "Cotton Shorts", "Cotton Trousers", "Cotton Skirt", "Miniskirt", "Tank Top", "Short Tank Top", "Silk Robe", "Cotton Headband", "Desert Hat", "Cotton Boots", "Cotton Gloves", "Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Sorcerer Robe (Red)", "Sorcerer Robe (Green)", "Sorcerer Robe (Dark Blue)", "Sorcerer Robe (Yellow)", "Sorcerer Robe (Light Blue)", "Sorcerer Robe (Pink)", "Sorcerer Robe (Black)", "Sorcerer Robe (Orange)", "Sorcerer Robe (Purple)", "Sorcerer Robe (Dark Green)", "Sorcerer Robe (White)"; + /****************************** + Config Ends Here + ******************************/ + + $@w = 0; + freeloop 1; // do not check for infinity loop + callsub S_Array; + freeloop 0; // re-enable infinity loop check + $@w = 0; + $@c = 0; + end; + +S_Array: + if(getitemlink($@DYE_items$[$@w]) == "Unknown Item") goto L_Fail; + $@c = 0; + callsub S_Color; + $@w = $@w + 1; + if($@w < getarraysize($@DYE_items$)) goto S_Array; + return; + +L_Fail: + debugmes "Dye Fail: "+$@DYE_items$[$@w]; + mapexit; + +S_Color: + if(getitemlink($@DYE_colors$[$@c] + $@DYE_items$[$@w]) == "Unknown Item") goto L_Fail; + $@c = $@c + 1; + if($@c < getarraysize($@DYE_colors$)) goto S_Color; + return; +} diff --git a/npc/functions/RNGesus.txt b/npc/functions/RNGesus.txt deleted file mode 100644 index 7224977c..00000000 --- a/npc/functions/RNGesus.txt +++ /dev/null @@ -1,87 +0,0 @@ -// Evol functions. -// Authors: -// gumi -// jesusalva -// Description: -// Randomization helper functions. - -// pseudo-fix randomness -// rand2( min, max ) -function script rand2 { - if (getargcount() == 2) { - .@min=getarg(0)*100; - .@max=getarg(1)*100+99; - } else { - .@min=0; - .@max=getarg(0)*100-1; - } - return rand(.@min, .@max)/100; -} - - - -// any({, ...}) -// returns one argument randomly - -function script any { - return getarg(rand2(getargcount())); -} - - - -// any_of() -// returns any member of the array - -function script any_of { - return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand2(getarraysize(getarg(0)) - getarrayindex(getarg(0)))); -} - - - -// relative_array_random() -// returns a random entry from the array, by relative probability -// the first key of the array should be 0 and every entries are a tuple -// of [value, probability] - -function script relative_array_random { - .@is_str = getdatatype(getarg(0)) & DATATYPE_STR; - .@total_prob = getelementofarray(getarg(0), 0); - .@initial_index = getarrayindex(getarg(0)); - .@initial_index = .@initial_index ? .@initial_index : 1; - freeloop(true); - - if (.@total_prob < 1 || getarg(1, false)) - { - // first calculation, or forced re-calculation - .@total_prob = 0; - .@size = getarraysize(getarg(0)); - - for (.@i = .@initial_index + 1; .@i < .@size; .@i += 2) { - if (.@is_str) { - .@total_prob += max(1, atoi(getelementofarray(getarg(0), .@i))); - } else { - .@total_prob += max(1, getelementofarray(getarg(0), .@i)); - } - } - - // we cache on the first key - set(getelementofarray(getarg(0), 0), .@total_prob); - } - - .@target_sum = rand2(0, .@total_prob); - - for (.@i = .@initial_index; .@sum < .@target_sum; .@i += 2) { - if (.@is_str) { - .@sum += atoi(getelementofarray(getarg(0), .@i + 1)); - } else { - .@sum += getelementofarray(getarg(0), .@i + 1); - } - - if (.@sum >= .@target_sum) { - break; - } - } - - freeloop(false); - return getelementofarray(getarg(0), .@i); -} diff --git a/npc/functions/afk.txt b/npc/functions/afk.txt deleted file mode 100644 index 9790ea1a..00000000 --- a/npc/functions/afk.txt +++ /dev/null @@ -1,69 +0,0 @@ -// Moubootaur Legends Script -// Author: -// Jesusalva -// Hocus Pocus Fidibus -// Micksha -// Description: -// Professor - allows you to gain EXP for idling (Speech skill) -// Modified for The Mana World. Please update the bottom of this file always. - -// AFKLoop(label, map, x1, y1, x2, y2) -function script AFKLoop { - deltimer(getarg(0)); // safeguard - .@m$=getarg(1); - .@x1=getarg(2); - .@y1=getarg(3); - .@x2=getarg(4); - .@y2=getarg(5); - - // Limit maximum AFK TIme using the same rule as Moubootaur Legends - // Max AFK time is determined as 30 minutes + 1 second every 10 minutes AFKed - // Capped at 2 hours (you've AFK'ed 37 days and 12 hours - 900 hours) - .@maxafk=min(7200, 1800+(AFKING/600)); - - // Check if this timer is still relevant - if (getmap() != .@m$) - return false; - - addtimer2(3000, getarg(0)); - - // To receive AFK experience, you must be sitting at the table... - if (!isin(.@m$, .@x1, .@y1, .@x2, .@y2)) - return false; - - // ...And be idle for less than .@maxafk - if (checkidle() > .@maxafk) - return false; - - // Calculate amount of EXP based on players in the square - // Every 2 players grant you 1 XP, capped at 10 xp - // For job experience, it is twice as difficult. - .@ppl=getareausers(.@m$, .@x1, .@y1, .@x2, .@y2); - .@bxp=cap_value(1+.@ppl/2 , 1, 10); - .@jxp=cap_value(1+.@ppl/4 , 1, 5); - - // Beer and Red Plush Wine modifiers - if (getstatus(SC_CONFUSION)) { - .@bxp+=1; - //.@jxp+=1; - } else { - .@bxp=1; - .@jxp=1; - } - - // Increase time AFK'ed timers and grant experience - AFKING+=1; - getexp .@bxp, .@jxp; - return true; -} - -// Record memory for player login, re-firing timers when player is in a bar. -function script AFKLogin { - .@m$=getmap(); - if (.@m$ == "008-2-2") - addtimer2(3000, "#AFKHurns::OnSpeeching"); - else if (.@m$ == "001-2-28") - addtimer2(3000, "#AFKArtis::OnSpeeching"); - return; -} - diff --git a/npc/functions/announcements.txt b/npc/functions/announcements.txt new file mode 100755 index 00000000..d346a431 --- /dev/null +++ b/npc/functions/announcements.txt @@ -0,0 +1,177 @@ + + +function script SBConfig { + if ($@GMSA_STATUS) + goto L_InfoBroadcast; + goto L_PrepareBroadcast; + +L_InfoBroadcast: + @ms = (3600000*($@GMSA_TICK - $@GMSA_CURRENT_TICK) - getnpctimer(0, "Stone Board")); + if (@ms < 0) set @ms, 0; // FIXME: find out WHY this can happen + callfunc "HumanTime"; + + mes "[GM Scheduled Broadcasts Board]"; + mes $@GMSA_NAME$ + " scheduled the current message, every " + $@GMSA_TICK + " hour(s):"; + mes $@GMSA_MSG$; + next; + mes "The next broadcast will happen in " + @time$ + "."; + next; + + @next_broadcast_ts = 0; + @next_broadcast_h = 0; + @next_broadcast_m = 0; + + mes "What do you want to do?"; + menu + "Nothing.", L_close, + "Nothing but... what is this?", L_Help, + "Stop broadcasting.", L_StopBroadcast, + "Trigger manually the current broadcast.", L_ManualBroadcast; + +L_PrepareBroadcast: + callsub S_Help; + next; + mes "There is no broadcast scheduled."; + mes "Do you want to create one?"; + menu + "No.", L_close, + "Yes.", L_CreateBroadcast; + +L_CreateBroadcast: + mes "[GM Scheduled Broadcasts Board]"; + mes "Enter the message to broadcast:"; + input $@GMSA_MSG$; + if ($@GMSA_MSG$ == "") + goto L_InvalidBMsg; + + next; + mes "[GM Scheduled Broadcasts Board]"; + mes "The message will be broadcasted every X hour(s). Enter X:"; + input $@GMSA_TICK; + if ($@GMSA_TICK < 1 || $@GMSA_TICK > 24) + goto L_InvalidBroadcastTick; + + next; + mes "[GM Scheduled Broadcasts Board]"; + mes "If you want the message to be broadcasted a limited number of times, enter its value. Keep 0 otherwise:"; + input $@GMSA_MAX; + + next; + mes "[GM Scheduled Broadcasts Board]"; + if ($@GMSA_MAX == 0) + mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s):"; + if ($@GMSA_MAX > 0) + mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s), up to " + $@GMSA_MAX + " times:"; + mes $@GMSA_MSG$; + next; + mes "Is this correct?"; + menu + "No. I'll retry.", L_CreateBroadcast, + "No", L_close, + "Yes. Broadcast this. (the first broadcast will happen in " + $@GMSA_TICK + " hour(s).)", L_StartBroadcast, + "Yes. Broadcast this, and make an extra broadcast right now.", L_StartBroadcast2; + +L_InvalidBMsg: + mes "[GM Scheduled Broadcasts Board]"; + mes "The message can't be empty. Please retry."; + goto L_CreateBroadcast; + +L_InvalidBroadcastTick: + mes "[GM Scheduled Broadcasts Board]"; + mes "You obviously can't repeat a message every 0 hours. Please retry."; + goto L_CreateBroadcast; + +L_Help: + callsub S_Help; + goto L_close; + +S_Help: + mes "[GM Scheduled Broadcasts Board]"; + mes "This board allows a GM to schedule a message to be broadcast every X hours."; + mes "Only one broadcast can be scheduled at a time."; + return; + +L_ManualBroadcast: + announce $@GMSA_MSG$, 0; + mes "Done."; + goto L_close; + +L_StopBroadcast: + donpcevent "Stone Board::OnStopBroadcast"; + mes "Done."; + goto L_close; + +L_StartBroadcast2: + if ($@GMSA_STATUS == 1) + goto L_Abort; + announce $@GMSA_MSG$, 0; + goto L_StartBroadcast; + +L_StartBroadcast: + if ($@GMSA_STATUS == 1) + goto L_Abort; + $@GMSA_STATUS = 1; + $@GMSA_NAME$ = strcharinfo(0); + $@GMSA_CURRENT_TICK = 0; + initnpctimer "Stone Board"; + mes "Done."; + gmlog strcharinfo(0) + " modified the scheduled broadcast."; + goto L_close; + +L_Abort: + mes "[GM Scheduled Broadcasts Board]"; + mes $@GMSA_NAME$ + " has created a scheduled broadcast just before you, hence yours will abort."; + goto L_close; + +L_close: + return; +} + + +017-9,26,28,0 script Stone Board NPC32767,{ + end; + +OnStopBroadcast: + goto L_Stop; + +L_Stop: + stopnpctimer "Stone Board"; + setnpctimer 0, "Stone Board"; + $@GMSA_STATUS = 0; + $@GMSA_NAME$ = ""; + $@GMSA_MSG$ = ""; + $@GMSA_TICK = 0; + $@GMSA_MAX = 0; + $@GMSA_CURRENT_TICK = 0; + end; + +OnTimer3600000: + $@GMSA_CURRENT_TICK = $@GMSA_CURRENT_TICK + 1; + setnpctimer 0, "Stone Board"; + if ($@GMSA_CURRENT_TICK != $@GMSA_TICK) + end; + announce $@GMSA_MSG$, 0; + $@GMSA_CURRENT_TICK = 0; + $@GMSA_MAX = $@GMSA_MAX - 1; + if ($@GMSA_MAX != 0) + end; + goto L_Stop; +} + +function script getBroadcast { + if (getmapname() == "029-2" && getx() == 22 && gety() == 24) goto L_NewPlayer; + goto L_ReturningPlayer; + +L_NewPlayer: + // todo: show game rules on login + // FIXME: needs to spawn a 32767 puppet + goto L_Return; + +L_ReturningPlayer: + if ($@GMSA_STATUS < 1) goto L_Return; + announce $@GMSA_MSG$, 3; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/functions/array.txt b/npc/functions/array.txt deleted file mode 100644 index 6093aa32..00000000 --- a/npc/functions/array.txt +++ /dev/null @@ -1,445 +0,0 @@ -// array_pad(, , ) -// prepend or append until the array is of size -// returns the amount added on success, or false (0) if nothing changed - -function script array_pad { - .@index = getarrayindex(getarg(0)); // passed index - .@count = getarraysize(getarg(0)) - .@index; // actual size - .@size = getarg(1); // desired size - .@absolute = (.@size >= 0 ? .@size : -(.@size)); // |size| - .@delta = .@absolute - .@count; // amount to fill - - if (.@absolute <= .@count) { - return false; // nothing to do - } - - if (.@size < 0) { - copyarray(getelementofarray(getarg(0), .@index + .@delta), getarg(0), .@count); // shift to the right - cleararray(getarg(0), getarg(2), .@delta); // prepend - } else { - cleararray(getelementofarray(getarg(0), .@index + .@count), getarg(2), .@delta); // append - } - - return .@delta; -} - - - -// array_replace(, , {, }) -// replace every occurence of with -// returns the number of replaced elements - -function script array_replace { - .@size = getarraysize(getarg(0)); - .@neq = getarg(3, false); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - if ((.@neq && (getelementofarray(getarg(0), .@i) != getarg(1))) || - (!(.@neq) && (getelementofarray(getarg(0), .@i) == getarg(1)))) { - set(getelementofarray(getarg(0), .@i), getarg(2)); - ++.@count; - } - } - - freeloop(false); - return .@count; -} - - - -// array_find(, {, }) -// return the index of the first occurence of in -// if not found it returns -1 - -function script array_find { - .@size = getarraysize(getarg(0)); - .@neq = getarg(2, false); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - if ((.@neq && (getelementofarray(getarg(0), .@i) != getarg(1))) || - (!(.@neq) && (getelementofarray(getarg(0), .@i) == getarg(1)))) { - freeloop(false); - return .@i; - } - } - - freeloop(false); - return -1; -} - - - -// array_rfind(, {, }) -// return the index of the last occurence of in -// if not found it returns -1 - -function script array_rfind { - .@min = getarrayindex(getarg(0)); - .@neq = getarg(2, false); - freeloop(true); - - for (.@i = (getarraysize(getarg(0)) - 1); .@i >= .@min; --.@i) { - if ((.@neq && (getelementofarray(getarg(0), .@i) != getarg(1))) || - (!(.@neq) && (getelementofarray(getarg(0), .@i) == getarg(1)))) { - freeloop(false); - return .@i; - } - } - - freeloop(false); - return -1; -} - - - -// array_exists(, {, }) -// return true or false accordingly if is found in - -function script array_exists { - return array_find(getarg(0), getarg(1), getarg(2, false)) > -1; -} - - - -// array_count(, {, }) -// counts the number of occurrence of in the - -function script array_count { - .@size = getarraysize(getarg(0)); - .@neq = getarg(2, false); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - if ((.@neq && (getelementofarray(getarg(0), .@i) != getarg(1))) || - (!(.@neq) && (getelementofarray(getarg(0), .@i) == getarg(1)))) { - ++.@count; - } - } - - freeloop(false); - return .@count; -} - - - -// array_entries() -// returns the number of non-empty entries - -function script array_entries { - if (isstr(getarg(0)) == 1) { - return array_count(getarg(0), "", true); - } - return array_count(getarg(0), 0, true); -} - - - -// array_remove(, {, }) -// removes every occurrence of in the while shifting left - -function script array_remove { - .@size = getarraysize(getarg(0)); - .@neq = getarg(2, false); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - if ((.@neq && (getelementofarray(getarg(0), .@i) != getarg(1))) || - (!(.@neq) && (getelementofarray(getarg(0), .@i) == getarg(1)))) { - deletearray(getelementofarray(getarg(0), .@i), 1); // shift left - ++.@count; // increase the counter - --.@size; // reduce the size - --.@i; // step back - } - } - - freeloop(false); - return .@count; -} - - - -// array_reverse() -// reverses the array - -function script array_reverse { - .@index = getarrayindex(getarg(0)); - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = .@index; .@i < ((.@size + .@index) / 2); ++.@i) { - swap(getelementofarray(getarg(0), .@i), getelementofarray(getarg(0), .@size + .@index - 1 - .@i)); // a <> b - } - - freeloop(false); - return true; -} - - - -// array_sum() -// return the sum of every element of the array - -function script array_sum { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@sum += getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@sum; -} - - - -// array_difference() -// return the difference of every element of the array - -function script array_difference { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@diff -= getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@diff; -} - - - -// array_product() -// return the product of every element of the array - -function script array_product { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@prod *= getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@prod; -} - - - -// array_quotient() -// return the product of every element of the array - -function script array_quotient { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@quot /= getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@quot; -} - - - -// array_shift() -// returns the first element of the array and removes it, while shifting left - -function script array_shift { - if (isstr(getarg(0)) == 1) { - .@val$ = getarg(0); - } else { - .@int = true; - .@val = getarg(0); - } - - deletearray(getarg(0), 1); // shift left - - return .@int ? .@val : .@val$; -} - - - -// array_unshift(, ) -// adds to the start of the array, while shifting right -// returns the new size - -function script array_unshift { - .@size = getarraysize(getarg(0)) + 1; - array_pad(getarg(0), -(.@size - getarrayindex(getarg(0))), getarg(1)); - return .@size; -} - - - -// array_pop() -// returns the last element of the array and removes it - -function script array_pop { - .@last = getarraysize(getarg(0)) - 1; - - if (isstr(getelementofarray(getarg(0), .@last)) == 1) { - .@val$ = getelementofarray(getarg(0), .@last); - } else { - .@int = true; - .@val = getelementofarray(getarg(0), .@last); - } - - deletearray(getelementofarray(getarg(0), .@last), 1); - - return .@int ? .@val : .@val$; -} - - - -// array_push(, ) -// adds to the end of the array -// returns the new size - -function script array_push { - .@size = getarraysize(getarg(0)); - set(getelementofarray(getarg(0), .@size), getarg(1)); - return .@size + 1; -} - - - -// array_shuffle() -// shuffles the array -// uses the Durstenfeld implementation of the Fisher-Yates algorithm - -function script array_shuffle { - .@index = getarrayindex(getarg(0)); - .@size = getarraysize(getarg(0)) - .@index; - freeloop(true); - - for (.@i = .@size - 1; .@i >= .@index + 1; --.@i) { - swap(getelementofarray(getarg(0), rand(.@index, .@i)), getelementofarray(getarg(0), .@i)); - } - - freeloop(false); - return true; -} - - - -// array_unique({, }) -// allows entries to appear up to in the array - -function script array_unique { - .@size = getarraysize(getarg(0)); - .@max = getarg(1, 1); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@count = 1; - for (.@e = .@i + 1; .@e < .@size; ++.@e) { - if (getelementofarray(getarg(0), .@i) == getelementofarray(getarg(0), .@e)) { - if (++.@count >= .@max) { - deletearray(getelementofarray(getarg(0), .@e), 1); - ++.@removed; // increase counter - --.@size; // reduce size - --.@e; // step back - } - } - } - } - - freeloop(false); - return .@removed; -} - - - -// array_diff(, {, ...}, ) -// compares array1 against one or more other arrays and fills the last array -// with the values in array1 that are not present in any of the other arrays -// returns the number of entries not matching - -function script array_diff { - .@size = getarraysize(getarg(0)); - .@index = getarrayindex(getarg(0)); - freeloop(true); - - for (.@a = 1; .@a < (getargcount() - 1); ++.@a) { - for (.@i = .@index; .@i < .@size; ++.@i) { - if (!array_exists(getarg(.@a), getelementofarray(getarg(0), .@i))) { - array_push(getarg(getargcount() - 1), getelementofarray(getarg(0), .@i)); - ++.@count; - } - } - } - - freeloop(false); - return .@count; -} - - - -// array_filter(, ""{, }) -// filters the array using a callback function - -function script array_filter { - .@size = getarraysize(getarg(0)); - .@neq = getarg(2, false); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@eq = callfunc(getarg(1), getelementofarray(getarg(0), .@i)) != false; - if ((.@neq && .@eq) || (!(.@neq) && !(.@eq))) { - deletearray(getelementofarray(getarg(0), .@i), 1); // shift left - ++.@count; // increase the counter - --.@size; // reduce the size - --.@i; // step back - } - } - - freeloop(false); - return .@count; -} - - - -// array_sort() -// sorts the array in ascending order -// uses the Lomuto implementation of the Quicksort algorithm - -function script array_sort { - callsub(S_Quicksort, getarg(0), getarrayindex(getarg(0)), getarraysize(getarg(0)) - 1); - return true; - -S_Quicksort: - if (getarg(1) < getarg(2)) { - .@p = callsub(S_Partition, getarg(0), getarg(1), getarg(2)); - callsub(S_Quicksort, getarg(0), getarg(1), .@p - 1); - callsub(S_Quicksort, getarg(0), .@p + 1, getarg(2)); - } - return true; - -S_Partition: - .@i = getarg(1) - 1; - - freeloop(true); - for (.@j = getarg(1); .@j <= getarg(2) - 1; ++.@j) { - if (getelementofarray(getarg(0), .@j) < getelementofarray(getarg(0), getarg(2))) { - swap(getelementofarray(getarg(0), ++.@i), getelementofarray(getarg(0), .@j)); - } - } - freeloop(false); - - swap(getelementofarray(getarg(0), ++.@i), getelementofarray(getarg(0), getarg(2))); - return .@i; -} - - - -// array_rsort() -// sorts the array in descending order - -function script array_rsort { - return array_sort(getarg(0)) && array_reverse(getarg(0)); -} diff --git a/npc/functions/asklanguage.txt b/npc/functions/asklanguage.txt deleted file mode 100644 index f0cbe0f8..00000000 --- a/npc/functions/asklanguage.txt +++ /dev/null @@ -1,56 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Function setting the player language - -function script asklanguage { - - .@nb_language = 11; - - switch (getarg(0, 0)) - { - case LANG_ON_SEA: - setarray .@messages$[0], "I hear you... (English)", // English - "Je vous entends... (Français)", // French - "Te oigo... (Español)", // Spanish - "Ich höre euch... (Deutsch)"; // German - break; - case LANG_IN_SHIP: - setarray .@messages$[0], "I speak English.", // English - "Je parle français.", // French - "Hablo Español.", // Spanish - "Ich spreche Deutsch."; // German - break; - default: - return; - } - - setarray .@flags$[0], "flags/en", - "flags/fr", - "flags/es", - "flags/de"; - - .@menustr$ = ""; - .@separator$ = ":"; - - for (.@i = 0; .@i <= .@nb_language; .@i++) - { - if (.@i == .@nb_language) - { - .@separator$ = ""; - } - .@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$; - } - - select(.@menustr$); - - .@lang = @menu - 1; - - if (.@lang >= 0 || .@lang <= .@nb_language) - { - Lang = .@lang; - } - - return; -} diff --git a/npc/functions/asleep.txt b/npc/functions/asleep.txt deleted file mode 100644 index aa5abd63..00000000 --- a/npc/functions/asleep.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol functions. -// Authors: -// Alige -// Reid -// Description: -// Tell a random sleeping sound. -// Variables: -// .@rand = Random number between the number of "sleeping" choice. - -function script asleep { - switch(rand(5)) { - case 0: npctalkonce(l("Zzzzzzzzz...")); break; - case 1: npctalkonce(l("Rrrr... Pchhhh...")); break; - case 2: npctalkonce(l("Ggrmm... Grmmmm...")); break; - case 3: npctalkonce(l("Hm... Shhhh...")); break; - default: emotion(E_SLEEPY); - } - end; -} diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt deleted file mode 100644 index 2af9136e..00000000 --- a/npc/functions/bank.txt +++ /dev/null @@ -1,297 +0,0 @@ -// Evol scripts. -// Authors: -// gumi -// Reid -// Jesusalva - -function script MerchantGuild_Bank { - do - { - if (BankVault > 0) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You currently have @@ Esperin on your bank account.", - format_number(BankVault)), - l("What do you want to do with your money?"); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("What do you want to do with your money?"); - } - - select - rif(Zeny > 0, l("Deposit.")), - rif(BankVault > 0, l("Withdraw.")), - l("I'm done."); - - switch (@menu) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("How much do you want to deposit?"); - - menuint - l("Other."), -1, - rif(Zeny >= 5000, format_number(5000) + " E."), 5000, - rif(Zeny >= 10000, format_number(10000) + " E."), 10000, - rif(Zeny >= 25000, format_number(25000) + " E."), 25000, - rif(Zeny >= 50000, format_number(50000) + " E."), 50000, - rif(Zeny >= 100000, format_number(100000) + " E."), 100000, - rif(Zeny >= 250000, format_number(250000) + " E."), 250000, - rif(Zeny >= 500000, format_number(500000) + " E."), 500000, - rif(Zeny >= 1000000, format_number(1000000) + " E."), 1000000, - l("All of my money."), -2, - l("I changed my mind."), -3; - - switch (@menuret) - { - case -1: - input @menuret; - break; - case -2: - @menuret = Zeny; - } - - if (@menuret > 0) - { - if (@menuret > Zeny) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not have enough Esperin on yourself."); - break; - } - - @menuret = min(MAX_BANK_ZENY, @menuret); // make sure the variable can't overflow - .@before = BankVault; // amount before the deposit - .@max = MAX_BANK_ZENY - BankVault; // maximum possible deposit - .@deposit = min(.@max, @menuret); // actual deposit - - if (.@deposit > 0) - { - BankVault += .@deposit; // add to bank - Zeny -= .@deposit; // remove from inventory - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You made a cash deposit of @@ E.", format_number(.@deposit)); - } - } - break; - - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("How much do you want to withdraw?"); - - menuint - l("Other."), -1, - rif(BankVault >= 5000, format_number(5000) + " E."), 5000, - rif(BankVault >= 10000, format_number(10000) + " E."), 10000, - rif(BankVault >= 25000, format_number(25000) + " E."), 25000, - rif(BankVault >= 50000, format_number(50000) + " E."), 50000, - rif(BankVault >= 100000, format_number(100000) + " E."), 100000, - rif(BankVault >= 250000, format_number(250000) + " E."), 250000, - rif(BankVault >= 500000, format_number(500000) + " E."), 500000, - rif(BankVault >= 1000000, format_number(1000000) + " E."), 1000000, - l("All of my money."), -2, - l("I changed my mind."), -3; - - switch (@menuret) - { - case -1: - input @menuret; - break; - case -2: - @menuret = BankVault; - } - - if (@menuret > 0) - { - if (@menuret > BankVault) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not have enough Esperin on your bank account."); - break; - } - - @menuret = min(MAX_ZENY, @menuret); // make sure the variable can't overflow - .@before = Zeny; // amount before the withdrawal - .@max = MAX_ZENY - Zeny; // maximum possible withdrawal - .@withdrawal = min(.@max, @menuret); // actual withdrawal - - if (.@withdrawal > 0) - { - Zeny += .@withdrawal; // add to inventory - BankVault -= .@withdrawal; // remove from bank - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You withdrew a total of @@ E.", format_number(.@withdrawal)); - } - } - break; - - default: return; - } - } while (true); -} - -// MerchantGuild_Quests(.bankid) -function script MerchantGuild_Quests { - mes ""; - // Quest Type, Quest Data, Quest Timer - .@q=getq(General_MerchantRequest); - .@q2=getq2(General_MerchantRequest); - .@q3=getq3(General_MerchantRequest); - .@id=getarg(0); - - // Cooldown - if (.@q3 > gettimetick(2)) { - mesn $@BANK_NAME$[.@id]; - mesq l("There are no tasks for you right now."); - mesc l("Please come back later, in %s.", FuzzyTime(.@q3)); - next; - return; - } - - // TODO: Submit/Abort current request - switch (.@q) { - case MERCQ_LETTER: - if (.@id == .@q2) { - mesn $@BANK_NAME$[.@id]; - mesq l("Thanks for the letter! Your efforts are greatly appreciated."); - Zeny+=rand2(100, 500); - getexp rand2(1000, 5000), rand2(150, 300); - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2)+1800; - return; - } - else - { - mesn $@BANK_NAME$[.@id]; - mesq l("Current task: Deliver a letter to %s", $@BANK_TOWN$[.@q2]); - next; - select - l("Continue"), - l("Abort") + " ["+l("Change task")+"]"; - mes ""; - if (@menu == 1) - return; - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2); - } - break; - /* ***************************************** */ - case MERCQ_GOODS: - .@cont=ASK_NO; - if (countitem(.@q2)) { - mesc l("Deliver %s?", getitemlink(.@q2)); - .@cont=askyesno(); - } - if (.@cont == ASK_YES) { - mesn $@BANK_NAME$[.@id]; - mesq l("Thanks for the %s! Your efforts are greatly appreciated.", getitemlink(.@q2)); - delitem .@q2, 1; - Zeny+=rand2(500, 2500); - getexp rand2(5000, 15000), rand2(250, 400); - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2)+7200; - return; - } - else - { - mesn $@BANK_NAME$[.@id]; - mesq l("Current task: Purchase a(n) %s", getitemlink(.@q2)); - next; - select - l("Continue"), - l("Abort") + " ["+l("Change task")+"]"; - mes ""; - if (@menu == 1) - return; - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2); - } - break; - /* ***************************************** */ - case MERCQ_SCOUT: - if (.@id == .@q2) { - mesn $@BANK_NAME$[.@id]; - mesq l("Thanks for scorting our caravan! Your efforts are greatly appreciated."); - Zeny+=rand2(2500, 5000); - getexp rand2(21000, 35000), rand2(500, 800); - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2)+43200; - return; - } - else - { - mesn $@BANK_NAME$[.@id]; - mesq l("Current task: Scout guild member to %s", $@BANK_TOWN$[.@q2]); - next; - select - l("Continue"), - l("Abort"); - mes ""; - if (@menu == 1) - return; - setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2); - } - break; - } - - do - { - mesc l("The %s Merchant Guild has a few requests for you:", $@BANK_TOWN$[.@id]); - .@town = .@id; - while (.@town == .@id) { - .@town=rand2(getarraysize($@BANK_TOWN$)); - } - select - l("How does this works?"), - rif(.@town != .@id, l("★ Deliver a letter")), - l("★★ Purchase goods"), - //rif(.@town != .@id, l("★★★ Scout a caravan")), - l("Sorry, I won't accept any."); - mes ""; - switch (@menu) { - case 1: - mesc l("The Merchant Guild spawns multiple continents, and we can offer you a few tasks for them. Be careful as you might not be able to finish them and you'll have to abort!"); - mesc l("The more stars, the harder it is."); - next; - mesc l("After completing a request, there'll be a cooldown, proportional to the difficulty."); - mesc l("You can only have one Merchant Guild request active at same time."); - next; - break; - // Deliver a letter - case 2: - mesc l("We need you to deliver this important letter to %s! Avoid the roads and bandits!", $@BANK_NAME$[.@town]); - next; - mesc l("Accept request?"); - if (askyesno() == ASK_YES) { - mesc l("I'm counting on you!"); - setq General_MerchantRequest, MERCQ_LETTER, .@town, gettimetick(2); - return; - } - break; - // Purchase goods - case 3: - .@item=any(ElixirOfLife, - CarpSandwich, PioulegSandwich, MananaSandwich, - MaggotSlimePotion, BlueberryCake, CarrotCake, Donut, - DeathPotion, TreasureMap, IronIngot, SilverIngot, GoldIngot, - Diamond, Ruby, Emerald, Sapphire, Topaz, Amethyst, - CrudeDiamond, CrudeRuby, CrudeEmerald, - CrudeSapphire, CrudeTopaz, CrudeAmethyst, - RunestoneUruz, RunestoneRaido, RunestoneThurisaz, - RunestoneKaunaz, RunestoneDagaz, RunestonePeorth); - // TODO: equips, as crafting/tailoring is added - mesc l("The merchant guild needs %s! Purchase it and deliver at the nearest merchant guild member!", getitemlink(.@item)); - next; - mesc l("Accept request?"); - if (askyesno() == ASK_YES) { - mesc l("I'm counting on you!"); - setq General_MerchantRequest, MERCQ_GOODS, .@item, gettimetick(2); - return; - } - break; - default: - return; - } - } while (true); - return; -} - diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt new file mode 100755 index 00000000..254b4822 --- /dev/null +++ b/npc/functions/banker.txt @@ -0,0 +1,251 @@ + +function script Banker { + if (BankAccount == 0) + goto L_Start; + callsub S_MoveAccount; + goto L_Start; + +L_Start: + if(@npcname$ == "") set @npcname$, strnpcinfo(1); + mes "[" + @npcname$ + "]"; + mes "\"Welcome to the bank!"; + mes "How can I help you?\""; + next; + menu + "Open my storage", L_Storage, + "Deposit", L_Dep, + "Withdraw", L_With, + "Check my balance", L_Balance, + "Change Bank Options", L_Change, + "Nevermind", L_Nev; + +L_Storage: + if (#BankOptions & OPT_STORAGE_CLOSE) close2; + openstorage; + if (#BankOptions & OPT_STORAGE_CLOSE) goto L_Return; + goto L_Start; + +L_Dep: + mes "[" + @npcname$ + "]"; + mes "\"How much would you like to deposit?\""; + next; + menu + "Other", L_Dep_Input, + "5,000 GP", L_Dep_5k, + "10,000 GP", L_Dep_10k, + "25,000 GP", L_Dep_25k, + "50,000 GP", L_Dep_50k, + "100,000 GP", L_Dep_100k, + "250,000 GP", L_Dep_250k, + "500,000 GP", L_Dep_500k, + "1,000,000 GP", L_Dep_1kk, + "All of my money", L_Dep_All, + "I've changed my mind", L_Start, + "Quit", L_Return; + +L_Dep_Input: + input @Amount; + if (@Amount >= 0) + goto L_Dep_Continue; + mes "[" + @npcname$ + "]"; + mes "\"I need a positive amount. What would you like to do?\""; + menu + "Go back", L_Start, + "Try again", L_Dep_Input, + "Deposit all", L_Dep_All, + "Nevermind", L_Nev; + +L_Dep_5k: + if (Zeny<5000) + goto L_NoMoney; + @Amount = 5000; + goto L_Dep_Continue; + +L_Dep_10k: + if (Zeny<10000) + goto L_NoMoney; + @Amount = 10000; + goto L_Dep_Continue; + +L_Dep_25k: + if (Zeny<25000) + goto L_NoMoney; + @Amount = 25000; + goto L_Dep_Continue; + +L_Dep_50k: + if (Zeny<50000) + goto L_NoMoney; + @Amount = 50000; + goto L_Dep_Continue; + +L_Dep_100k: + if (Zeny<100000) + goto L_NoMoney; + @Amount = 100000; + goto L_Dep_Continue; + +L_Dep_250k: + if (Zeny<250000) + goto L_NoMoney; + @Amount = 250000; + goto L_Dep_Continue; + +L_Dep_500k: + if (Zeny<500000) + goto L_NoMoney; + @Amount = 500000; + goto L_Dep_Continue; + +L_Dep_1kk: + if (Zeny<1000000) + goto L_NoMoney; + @Amount = 1000000; + goto L_Dep_Continue; + +L_Dep_All: + if (Zeny<1) + goto L_NoMoney; + @Amount = Zeny; + goto L_Dep_Continue; + +L_Dep_Continue: + if (Zeny < @Amount) + goto L_NoMoney; + Zeny = Zeny - @Amount; + #BankAccount = #BankAccount + @Amount; + goto L_Balance; + +L_With: + mes "[" + @npcname$ + "]"; + mes "\"How much would you like to withdraw?\""; + menu + "Other", L_With_Input, + "5,000 GP", L_With_5k, + "10,000 GP", L_With_10k, + "25,000 GP", L_With_25k, + "50,000 GP", L_With_50k, + "100,000 GP", L_With_100k, + "250,000 GP", L_With_250k, + "500,000 GP", L_With_500k, + "1,000,000 GP", L_With_1kk, + "All of my money", L_With_All, + "I've changed my mind", L_Start, + "Quit", L_Return; + +L_With_Input: + input @Amount; + if (@Amount >= 0) + goto L_With_Continue; + mes "[" + @npcname$ + "]"; + mes "\"I need a positive amount. What would you like to do?\""; + menu + "Go back", L_Start, + "Try again", L_With_Input, + "Withdraw all", L_With_All, + "Nevermind", L_Nev; + +L_With_5k: + if (#BankAccount < 5000) + goto L_NoMoney; + @Amount = 5000; + goto L_With_Continue; + +L_With_10k: + if (#BankAccount < 10000) + goto L_NoMoney; + @Amount = 10000; + goto L_With_Continue; + +L_With_25k: + if (#BankAccount < 25000) + goto L_NoMoney; + @Amount = 25000; + goto L_With_Continue; + +L_With_50k: + if (#BankAccount < 50000) + goto L_NoMoney; + @Amount = 50000; + goto L_With_Continue; + +L_With_100k: + if (#BankAccount < 100000) + goto L_NoMoney; + @Amount = 100000; + goto L_With_Continue; + +L_With_250k: + if (#BankAccount < 250000) + goto L_NoMoney; + @Amount = 250000; + goto L_With_Continue; + +L_With_500k: + if (#BankAccount < 500000) + goto L_NoMoney; + @Amount = 500000; + goto L_With_Continue; + +L_With_1kk: + if (#BankAccount < 1000000) + goto L_NoMoney; + @Amount = 1000000; + goto L_With_Continue; + +L_With_All: + if (#BankAccount < 0) + goto L_NoMoney; + @Amount = #BankAccount; + goto L_With_Continue; + +L_With_Continue: + if (#BankAccount < @Amount) + goto L_NoMoney; + Zeny = Zeny + @Amount; + #BankAccount = #BankAccount - @Amount; + goto L_Balance; + +L_Balance: + mes "[" + @npcname$ + "]"; + mes "\"Your current bank balance is:"; + mes #BankAccount + " GP\""; + if (#BankOptions & OPT_BANK_CLOSE) goto L_Return; + goto L_Start; + +L_Nev: + mes "[" + @npcname$ + "]"; + mes "\"Goodbye then.\""; + return; + +L_NoMoney: + mes "[" + @npcname$ + "]"; + mes "\"Oh dear, it seems that you don't have enough money.\""; + goto L_Start; + +S_MoveAccount: + #BankAccount = #BankAccount + BankAccount; + BankAccount = 0; + return; + +L_Change: + setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance"; + if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage"; + if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank"; + menu + @menuitems$[0], L_Start, + @menuitems$[1], L_Change_Storage, + @menuitems$[2], L_Change_Bank; + +L_Change_Storage: + #BankOptions = (#BankOptions ^ OPT_STORAGE_CLOSE); + goto L_Start; + +L_Change_Bank: + #BankOptions = (#BankOptions ^ OPT_BANK_CLOSE); + goto L_Start; + +L_Return: + @npcname$ = ""; + return; +} diff --git a/npc/functions/barber.txt b/npc/functions/barber.txt old mode 100644 new mode 100755 index d5a330f2..8b83fe6a --- a/npc/functions/barber.txt +++ b/npc/functions/barber.txt @@ -1,220 +1,221 @@ -// Evol scripts. -// Authors: -// omatt -// Reid -// Travolta -// Jesusalva -// Description: -// Function for supporting barber NPC. - -// BarberSayStyle({what}) -// what: 1 = Style; 2 = Color; 3 = Style + Color in dialog -function script BarberSayStyle { - - .@get_color = getlook(LOOK_HAIR_COLOR); - .@get_look = getlook(LOOK_HAIR); - .@style_name$ = $@hairstyle$[.@get_look]; - .@color_name$ = $@haircolor$[.@get_color]; - - switch (getarg(0, 3)) - { - case 1: - message strcharinfo(0), l("@@", .@style_name$); - break; - case 2: - message strcharinfo(0), l("@@", .@color_name$); - break; - case 3: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Your hairstyle is @@ and its color is @@.", .@style_name$, .@color_name$); - break; - } - return; -} -function script BarberChangeStyle { - do - { - .@hairsizearray = getarraysize($@hairstyle$); - .@get_look = getlook(LOOK_HAIR); - - // Here .@i starts from 1 because hairstyle 0 doesn't exist. - for (.@i = 1; .@i < .@hairsizearray; .@i++) - { - .@menustr$ = .@menustr$ - + rif(.@get_look != .@i, l("" + $@hairstyle$[.@i] + "")) - + ":"; - } - - .@menustr$ = .@menustr$ + l("I'm fine for now, thank you."); - - .@idx = select(l("As you want!"),.@menustr$); - - if (.@idx == .@i + 1) return; // last choice to quit dialog - - switch (@menu) - { - case 1: - do - { - // here "- 1" because i don't use the 0 of array - .@rand_hair = rand(1,(.@hairsizearray - 1)); - } while (.@rand_hair == getlook(LOOK_HAIR)); - setlook LOOK_HAIR, .@rand_hair; - setlook LOOK_HAIR_COLOR, getlook(LOOK_HAIR_COLOR); - BarberSayStyle(1); - break; - default: - // and here "- 1" because the first choice is taken by the random - setlook LOOK_HAIR, (@menu - 1); - setlook LOOK_HAIR_COLOR, getlook(LOOK_HAIR_COLOR); - break; - } - .@menustr$ = ""; - } while (1); -} -function script BarberChangeColor { - do - { - .@get_look = getlook(LOOK_HAIR_COLOR); - .@hairsizearray = getarraysize($@haircolor$); - - for (.@i = 0; .@i < .@hairsizearray; .@i++) - { - .@menustr$ = .@menustr$ - + rif(.@get_look != .@i, l("" + $@haircolor$[.@i] + "")) - + ":"; - } - - .@menustr$ = l("Surprise me!") + ":" + .@menustr$ + l("I'm fine for now, thank you."); - - .@idx = select(.@menustr$); - - if (.@idx == .@i + 2) return; - - switch (@menu) - { - case 1: - do - { - .@rand_color = rand(0, .@hairsizearray); - } while (.@rand_color == getlook(LOOK_HAIR_COLOR)); - setlook LOOK_HAIR_COLOR, .@rand_color; - BarberSayStyle(2); - break; - default: - setlook LOOK_HAIR_COLOR, (@menu - 2); - break; - } - .@menustr$ = ""; - } while (1); - return; -} -function script BarberChangeBodyType { - mesn("Note"); - mes(b(l("Changing your body type will send you back to the character selection screen."))); - next(); - - mes(l("Please select the desired body type:")); - menuint( - rif(BodyType == BODYTYPE_1, "► ") + l("Body type %i", 1), BODYTYPE_1, - rif(BodyType == BODYTYPE_2, "► ") + l("Body type %i", 2), BODYTYPE_2, - rif(BodyType == BODYTYPE_3, "► ") + l("Body type %i", 3), BODYTYPE_3); - - if (BodyType == @menuret) { - return; // don't kick to char selection when not needed - } - - // FIXME: when manaplus supports seamless changing for evol2, use a simple return; - closedialog(); - close2(); - BodyType = @menuret; - close; -} +function script Barber { + if (getequipid(equip_head) == 647) + goto L_Debug; + callfunc "getHeadStyles"; + goto L_Main; + +L_Main: + @style = getlook(LOOK_HAIR_STYLE); + @color = getlook(LOOK_HAIR_COLOR); + @style$ = "Unknown"; + @color$ = "Unknown"; + if (@style >= 1 && @style <= 20) + @style$ = @HairStyles$[(@style - 1)]; + if (@color == ((HC_WHITE - Class) + 1)) + @color$ = "Shocked White"; + @color = (@color - (15 * (Class - 1))); + if (@color >= 0 && @color <= 15) + @color$ = @HairColors$[@color]; + mes "Your current style is " + @style$ + " and your current color is " + @color$ + "."; + @style$ = ""; + @color$ = ""; + menu + "Change my style", L_Style, + "Change my color", L_Color, + "Change my gender", L_Gender, + "Nah, I'm fine", L_Done; + +L_Gender: + menu + "Female.", L_Female, + "Male.", L_Male, + "Non-binary.", L_NonBinary, + "Nah, I'm fine", L_Done; + +L_Female: + @Sex = 0; + goto L_Change; + +L_Male: + @Sex = 1; + goto L_Change; + +L_NonBinary: + @Sex = 3; + goto L_Change; + +L_Change: + if (Sex == @Sex) + goto L_Already_Change; + Sex = @Sex; + return; -// THIS FUNCTION SHOULD BE USED ONLY AT REBIRTH -// Unless current game development design changes! -function script BarberChangeRace { - - mes l("What's your race?"); - menuint - get_race(GETRACE_FULL, KaizeiTalpan), KaizeiTalpan, - get_race(GETRACE_FULL, ArgaesTalpan), ArgaesTalpan, - get_race(GETRACE_FULL, TonoriTalpan), TonoriTalpan, - get_race(GETRACE_FULL, CaveUkar), CaveUkar, - get_race(GETRACE_FULL, MountainUkar), MountainUkar, - get_race(GETRACE_FULL, SeaTritan), SeaTritan, - get_race(GETRACE_FULL, LakeTritan), LakeTritan, - rif(REBIRTH, get_race(GETRACE_FULL, LightRaijin)), LightRaijin, - rif(REBIRTH, get_race(GETRACE_FULL, DarkRaijin)), DarkRaijin, - rif(REBIRTH, get_race(GETRACE_FULL, FireKralog)), FireKralog, - rif(REBIRTH, get_race(GETRACE_FULL, FrostKralog)), FrostKralog; - - mes ""; - // Something went *terribly* wrong - if (@menuret >= LightRaijin && !REBIRTH) { - channelmes("#irc", "Illegal operation at BarberChangeRace, sysadmin help required."); - consolemes(CONSOLEMES_ERROR, "Account %d tried to change race to %d but rebirth is not set. Race not changed.", getcharid(3), @menuret); - return; - } - - // Change race and we're done - //Class = @menuret; - jobchange(@menuret); // STUPID idea, but imposed by Hercules +L_Already_Change: + mes "\"Umm, you are that gender already.\""; return; -} -// Jack of all trades -// Barber({intro=True}) -function script Barber { - if (getarg(0, true)) { - mesn; - mesq l("Hello."); - next; - } - mesq l("What would you like me to do?"); - next; - do - { - select - l("What is my current hairstyle and hair color?"), - l("I'd like to get a different style."), - l("Can you do something with my color?"), - l("How about changing my body type?"), - l("I'm fine for now, thank you."); - - switch (@menu) - { - case 1: - BarberSayStyle(); - break; - case 2: - BarberChangeStyle; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Enjoy your new style."), - l("Anything else?"); - break; - case 3: - BarberChangeColor; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I hope you like this color."), - l("Anything else?"); - break; - case 4: - BarberChangeBodyType(); - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You look fantastic."), - l("Anything else?"); - break; - case 5: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Feel free to come visit me another time."); - - goodbye; - } - } while (true); +L_Style: + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Surprise me"; + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Nah, I'm fine"; + if(!@hairOpts) set @hairOpts, 1; + menu + @HairStyles$[0], L_MenuItems, + @HairStyles$[1], L_MenuItems, + @HairStyles$[2], L_MenuItems, + @HairStyles$[3], L_MenuItems, + @HairStyles$[4], L_MenuItems, + @HairStyles$[5], L_MenuItems, + @HairStyles$[6], L_MenuItems, + @HairStyles$[7], L_MenuItems, + @HairStyles$[8], L_MenuItems, + @HairStyles$[9], L_MenuItems, + @HairStyles$[10], L_MenuItems, + @HairStyles$[11], L_MenuItems, + @HairStyles$[12], L_MenuItems, + @HairStyles$[13], L_MenuItems, + @HairStyles$[14], L_MenuItems, + @HairStyles$[15], L_MenuItems, + @HairStyles$[16], L_MenuItems, + @HairStyles$[17], L_MenuItems, + @HairStyles$[18], L_MenuItems, + @HairStyles$[19], L_MenuItems, + @HairStyles$[20], L_MenuItems, + @HairStyles$[21], L_MenuItems; + +L_MenuItems: + if (@menu == @style) + goto L_SameStyle; + if(@menu == (getarraysize(@HairStyles$) - 1)) goto L_RandomStyle; + if(@menu >= getarraysize(@HairStyles$)) goto L_Done; + setlook LOOK_HAIR_STYLE, @menu; + goto L_Main; + +L_RandomStyle: + setarray @randomStyle[0], rand(1, (getarraysize(@HairStyles$) - 2)); + setarray @randomStyle[1], @randomStyle[1] + 1; // infinite loop prevention + if(@randomStyle[0] == @style && @randomStyle[1] < 15) goto L_RandomStyle; + setlook LOOK_HAIR_STYLE, @randomStyle[0]; + setarray @randomStyle[1], 0; + menu + "Surprise me once again", L_RandomStyle, + "Go back", L_Main, + "Goodbye", L_Done; + +L_SameStyle: + mes "Your hair already has that style."; + goto L_Main; + +L_Color: + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Surprise me"; + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Nah, I'm fine"; + if(!@colorOpts) set @colorOpts, 1; + menu + @HairColors$[0], L_MenuItems1, + @HairColors$[1], L_MenuItems1, + @HairColors$[2], L_MenuItems1, + @HairColors$[3], L_MenuItems1, + @HairColors$[4], L_MenuItems1, + @HairColors$[5], L_MenuItems1, + @HairColors$[6], L_MenuItems1, + @HairColors$[7], L_MenuItems1, + @HairColors$[8], L_MenuItems1, + @HairColors$[9], L_MenuItems1, + @HairColors$[10], L_MenuItems1, + @HairColors$[11], L_MenuItems1, + @HairColors$[12], L_MenuItems1, + @HairColors$[13], L_MenuItems1, + @HairColors$[14], L_MenuItems1, + @HairColors$[15], L_MenuItems1, + @HairColors$[16], L_MenuItems1; + +L_MenuItems1: + if (@menu - 1 == @color) + goto L_SameColor; + if(@menu == (getarraysize(@HairColors$) - 1)) goto L_RandomColor; + if(@menu >= getarraysize(@HairColors$)) goto L_Done; + setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * (Class - 1))); + goto L_Main; + +L_RandomColor: + setarray @randomColor[0], rand((15 * (Class - 1)), ((getarraysize(@HairColors$) - 3) + (15 * (Class - 1)))); + setarray @randomColor[1], @randomColor[1] + 1; + if(@randomColor[0] == @color && @randomColor[1] < 15) goto L_RandomColor; + setlook LOOK_HAIR_COLOR, @randomColor[0]; + setarray @randomColor[1], 0; + menu + "Surprise me once again", L_RandomColor, + "Go back", L_Main, + "Goodbye", L_Done; + +L_SameColor: + mes "You already have that color."; + goto L_Main; + +L_Done: + // cleanup + @menu = 0; + @style = 0; + @color = 0; + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + @hairOpts = 0; + @colorOpts = 0; return; -} +L_Debug: + npcaction 9; // FIXME: this should become a builtin (ie `clear`) + mes "Class: " + Class; + mes "Style: " + getlook(LOOK_HAIR_STYLE); + mes "Color: " + getlook(LOOK_HAIR_COLOR); + mes "Gender: " + Sex; + menu + "edit| Set Class", L_DebugClass, + "edit| Set Style", L_DebugStyle, + "edit| Set Color", L_DebugColor, + "edit| Set Gender", L_DebugGender, + "toggle| Simulate logout", L_DebugLogout, + "Close", L_Done; + +L_DebugLogout: + callfunc "fixHeadStyles"; + goto L_Debug; + +L_DebugClass: + @dbg_class = 0; + mes "input class (0-32767)"; + input @dbg_class; + if (@dbg_class >= 0 && @dbg_class <= 32767) + Class = @dbg_class; + @dbg_class = 0; + goto L_Debug; + +L_DebugStyle: + @dbg_style = 0; + mes "input style (0-255)"; + input @dbg_style; + if (@dbg_style >= 0 && @dbg_style <= 255) + setlook LOOK_HAIR_STYLE, @dbg_style; + @dbg_style = 0; + goto L_Debug; + +L_DebugColor: + @dbg_color = 0; + mes "input color (0-255)"; + input @dbg_color; + if (@dbg_color >= 0 && @dbg_color <= 255) + setlook LOOK_HAIR_COLOR, @dbg_color; + @dbg_color = 0; + goto L_Debug; + +L_DebugGender: + @dbg_gender = 0; + mes "input gender (0-3)"; + input @dbg_gender; + if (@dbg_gender >= 0 && @dbg_gender <= 3) + Sex = @dbg_gender; + @dbg_gender = 0; + goto L_Debug; +} diff --git a/npc/functions/beds.txt b/npc/functions/beds.txt deleted file mode 100644 index a4301891..00000000 --- a/npc/functions/beds.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol functions. -// Authors: -// 4144 -// Reid -// Jesusalva -// Description: -// Beds utility functions - -// bedTouch({inn}) -function script bedTouch { - if (PC_IS_DEAD) - { - PC_IS_DEAD = 0; - if (INN_REGISTER != NO_INN) - { - INN_REGISTER = NO_INN; - percentheal 100,100; - } - } - close; -} - diff --git a/npc/functions/bitwise.txt b/npc/functions/bitwise.txt deleted file mode 100644 index a2e57587..00000000 --- a/npc/functions/bitwise.txt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Gets a bitmasked value in from an integer. If the shift is omitted, it will - * be deduced from the mask. - * - * @arg 0 - the variable - * @arg 1 - mask - * @arg 2 - shift - */ -function script bitwise_get { - .@shift = getarg(2, 0); - - if (getargcount() < 3) { - // guess the shift from the mask: - for (.@shift = 0; .@shift < 32; ++.@shift) { - if ((getarg(1) & (1 << .@shift)) != 0) { - break; - } - } - } - - return (getarg(0) & getarg(1)) >> .@shift; -} - -/** - * sets a bitmasked value in a variable - * - * @arg 0 - the target variable - * @arg 1 - mask - * @arg 2 - shift - * @arg 3 - new value - * @return a reference to the variable - */ -function script bitwise_set { - if (getargcount() < 4) { - // guess the shift from the mask: - for (.@shift = 0; .@shift < 32; ++.@shift) { - if ((getarg(1) & (1 << .@shift)) != 0) { - break; - } - } - - return set(getarg(0), (getarg(0) & ~(getarg(1))) | (getarg(2, 0) << .@shift)); - } - - return set(getarg(0), (getarg(0) & ~(getarg(1))) | (getarg(3, 0) << getarg(2, 0))); -} - - -// bitmask_count() -// returns the number of bits set in (up to 4096?) -function script bitmask_count { - .@n = getarg(0); // Number evaluated - .@p=0; // Bits set/unset - .@s=0; // Stack and Check - .@m=0; // Memory - - // Loop only as needed - while (.@s < .@n) { - .@s=2**.@m; - if (.@n & .@s) - .@p++; - .@m++; - } - return .@p; -} - diff --git a/npc/functions/bodytype.txt b/npc/functions/bodytype.txt deleted file mode 100644 index 5d37775a..00000000 --- a/npc/functions/bodytype.txt +++ /dev/null @@ -1,19 +0,0 @@ -function script stringToBodytype { - switch (ord(strtolower(charat(getarg(0, "n"), 0)))) { - case 50: // 2 - case 102: // f - return BODYTYPE_2; - case 51: // 3 - case 109: // m - return BODYTYPE_3; - default: - return BODYTYPE_1; - } -} - -function script bodytypeToString { - .@bodytype = getarg(0, BodyType); - - return .@bodytype == BODYTYPE_2 ? l("type %i", 2) : - .@bodytype == BODYTYPE_3 ? l("type %i", 3) : l("type %i", 1); -} diff --git a/npc/functions/casino.txt b/npc/functions/casino.txt deleted file mode 100644 index 87b71a4d..00000000 --- a/npc/functions/casino.txt +++ /dev/null @@ -1,254 +0,0 @@ -// TMW2 Scripts -// Author: -// Jesusalva -// Description: -// Slot Machines, Blackjack, other crap for npc duplication -// Contents: -// "Slot Machine" -// "High Lower" - -// SLOT MACHINE - You'll get PRIZE if you roll a 777! -// PRIZE must be numeric INT, AegisName won't get parsed. -// Slot Machine#map_prize -// Slot Machine#map -// Slot Machine#_prize -- script Slot Machine NPC_HIDDEN,{ - function symbol { - switch (getarg(0)) { - case 1: - mesn "%%A"; - break; - case 2: - mesn "%%B"; - break; - case 3: - mesn "%%C"; - break; - case 4: - mesn "%%D"; - break; - case 5: - mesn "%%E"; - break; - case 6: - mesn "%%F"; - break; - case 7: - mesn "7"; - break; - default: - mesn "%%@"; - break; - } - } - -L_Menu: - mesn; - mesc l("Spin three symbols, and jackpot great rewards!"); - mesc l("Just one coin for spin."); - next; - menu - rif(countitem(.coinid) >= 1, l("Spin!")), L_Spin, - l("Prizes"), L_Info, - l("Leave"), -; - close; - -L_Info: - mes ""; - mesc l("Prizes:"); - mes l("##9 777: @@.", getitemlink(.itemid)); - mesc l("Three equal: @@.", "18 casino coins"); - mesc l("Two equal: 1 casino coin."); - next; - goto L_Menu; - - -L_Spin: - mesc l("Spinning..."); - next; - delitem .coinid, 1; - .@a=rand2(1,7); - .@b=rand2(1,7); - .@c=rand2(1,7); - symbol(.@a); - symbol(.@b); - symbol(.@c); - next; - mesn; - if (.@a == .@b && .@a == .@c && .@a == 7) { - getitem .itemid, 1; - mesc l("Jackpot! You got a(n) %s!", getitemlink(.itemid)), 3; - } else if (.@a == .@b && .@a == .@c) { - getitem .coinid, 18; - mesc l("Congrats! A pity it was not 777..."), 3; - } else if (.@a == .@b || .@a == .@c || .@b == .@c) { - getitem .coinid, 1; - mesc l("Lucky! You got the coin back!"), 3; - } else { - mesc l("It wasn't this time..."), 3; - } - next; - goto L_Menu; - -OnInit: - // "Next-Generation" parsing system - // To replace default item, name NPC like this: - // Slot Machine#_1212 - // Where "1212" is the item ID - .@n$=strnpcinfo(0, "_0"); - explode(.@ni$, .@n$, "_"); - if (getarraysize(.@n$) > 0) - .itemid=atoi(.@ni$[1]); - else - .itemid=0; - - // If item ID was not provided - if (.itemid < 1) { - //.itemid=Monocle; - .itemid=BrownBowlerHat; - } - - // Coin ID - //.coinid=CasinoCoins; - .coinid=CoinBag; - - .sex = G_OTHER; - .distance = 4; - end; -} - - -// HIGH LOWER - Guess if the next card will be HIGHER or LOWER! -// (No arguments) -- script High Lower NPC_HIDDEN,{ - function cardname { - switch (getarg(0)) { - case 0: - return "A"; break; - case 10: - return "J"; break; - case 11: - return "Q"; break; - case 12: - return "K"; break; - case 13: - return l("Joker"); break; - default: - return getarg(0)+1; - } - } - - goto L_Menu; - -L_Menu: - showavatar; - mesn; - mesc l("Hey, I am flopped. Do you want to gamble?"); - mesc l("You need a %s. I'll flip one card, and you'll need to decide if next draw will be HIGHER or LOWER.", getitemlink(.coinid)); - mesc l("If a tie happens, I'll give your coin back."); - next; - menu - rif(countitem(.coinid) >= 1, l("Let's play!")), L_Spin, - l("Information"), L_Info, - l("Leave"), L_Quit; - -L_Info: - mes ""; - mesc l("Rules:"); - mesc l("A card will be flipped, you'll need to decide if next flip will be HIGHER or LOWER."); - mesc l("Cards are ranked on this priority: A - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - J - Q - K - Joker"); - next; - mesc l("Prizes:"); - mesc l("If you're right, you'll get at least %d GP!", .minprize); - mesc l("If a tie happens, you'll get your coin back."); - mesc l("If you're wrong, your winning streak is reset."); - mesc l("Winning Streak is also reset on logout or when you leave the room."); - next; - mesc l("Winning Strike Prizes:"); - mesc l("Every seven successive right guesses, you'll get a %s!", getitemlink(Acorn)); // 7.14% - //mesc l("Every fifteen successive right guesses, you'll get a %s!", getitemlink(SilverGift)); // 3.33% - //mesc l("Every fifty successive right guesses, you'll get a %s!", getitemlink(GoldenGift)); // 1.00% - //mesc l("Every 101 successive right guesses, you'll get a %s!", getitemlink(PrismGift)); // 0.50% - next; - goto L_Menu; - - -L_Spin: - showavatar AVATAR_CARD_COVER; - mesc l("I'll draw a card now!"); - next; - delitem .coinid, 1; - // First card will never be an edge card (Ace or Joker), so you can ALWAYS guess wrong. - .@card1=rand2(1, 12); - showavatar 1000+.@card1; - mesn; - mesc l("It's a @@!", cardname(.@card1)); - mesc l("Will next draw be HIGHER or LOWER?!"); - next; - mesc l("Cards are ranked on this priority: A - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - J - Q - K - Joker"); - select - l("HIGHER!"), - l("LOWER!"); - mes ""; - - // Flip Flop! - .@card2=rand2(0, 13); - showavatar 1000+.@card2; - mesn; - mesc l("It's a @@!", cardname(.@card2)); - - if (.@card1 == .@card2) { - mesc l("It's a tie!"); - getitem .coinid, 1; - .@bypass=1; - } else if (.@card2 < .@card1 && @menu == 2) { - mesc l("It's lower! That's right!"); - Zeny=Zeny+.minprize; - @gambler_winstreak+=1; - } else if (.@card2 > .@card1 && @menu == 1) { - mesc l("It's higher! That's right!"); - Zeny=Zeny+.minprize; - @gambler_winstreak+=1; - } else { - mesc l("You were wrong!"); - @gambler_winstreak=0; - } - - // Winning Streak - if (!.@bypass && @gambler_winstreak) { - if (@gambler_winstreak % 7 == 0) - getitem Acorn, 1; - /* - if (@gambler_winstreak % 15 == 0) - getitem SilverGift, 1; - if (@gambler_winstreak % 50 == 0) - getitem GoldenGift, 1; - if (@gambler_winstreak % 101 == 0) - getitem PrismGift, 1; - */ - mesc l("Your current win streak is @@!", @gambler_winstreak); - Zeny+=min(((@gambler_winstreak-1)*.gpbonus), .minprize); // Never 2x - } else { - .@bypass=0; - } - next; - goto L_Menu; - -L_Quit: - close; - -OnInit: - // Gambling configuration - .minprize=180; - .gpbonus=10; - - // Coin ID - //.coinid=CasinoCoins; - .coinid=CoinBag; - - .sex = G_OTHER; - .distance = 4; - end; - -} - diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt new file mode 100755 index 00000000..76ab7bf7 --- /dev/null +++ b/npc/functions/clear_vars.txt @@ -0,0 +1,184 @@ + +function script ClearVariables { + if(@login_event != 1) goto L_Deprecated; + + if(#BankAccount >= 0) return; + if (Zeny >= -#BankAccount) { + Zeny = Zeny + #BankAccount; + #BankAccount = 0; + } + + // Partial fix + #BankAccount = #BankAccount + Zeny; + Zeny = 0; + return; +} + + +function script ClearGlobalVars { + $@loop = 5; + goto L_FluffyClear; + +L_FluffyClear: + if ($@loop == 12) + goto L_IlliaClear; + + $Record_Fluffy_Name$[$@loop] = ""; + $Record_Fluffy_Date$[$@loop] = ""; + $Record_Fluffy_Kills[$@loop] = 0; + + $@loop = $@loop + 1; + goto L_FluffyClear; + + +L_IlliaClear: + $@loop = 0; + goto L_IlliaLoop; + +L_IlliaLoop: + if ($Illia_Win_Records$[$@loop] == "") + goto L_EventClear; + + $Illia_Win_Records$[$@loop] = ""; + + $@loop = $@loop + 1; + goto L_IlliaLoop; + +L_EventClear: + $@loop = 0; + + $CandyOpsComplete = 0; + + $Easter_2010_Npc_State1 = 0; + $Easter_2010_Npc_State2 = 0; + $Easter_2010_Egg_Loc_State1 = 0; + $Easter_2010_Egg_Loc_State2 = 0; + $Easter_2010_Egg_Loc_State3 = 0; + $Easter_2010_Egg_Loc_State4 = 0; + $Easter_2010_Egg_Loc_State5 = 0; + + $hween10 = 0; + $hween10_tondel = 0; + $hween10_mmallow = 0; + $hween10_jelskul = 0; + $hween10_canpump = 0; + + $Golbenez_Inn_Cost = 0; + + $hween16 = 0; + $hween16_tondel = 0; + $hween16_mmallow = 0; + $hween16_jelskul = 0; + $hween16_canpump = 0; + + $state = 0; + return; +} + +function script mapexit { + debugmes "TRYING TO MAPEXIT IS DEPRECATED"; + return; +} + +function script npcaction { + debugmes "Deprecated unitaction (did you mean npcsit; or whatever?)"; + return; +} + +function script gmlog { + logmes(getarg(0), LOGMES_ATCOMMAND); + return; +} + +function script getx { + getmapxy(.@m$, .@x, .@y, 0); + return .@x; +} + +function script gety { + getmapxy(.@m$, .@x, .@y, 0); + return .@y; +} + +function script getnpcx { + return .x; +} + +function script getnpcy { + return .y; +} + +function script title { + setnpcdialogtitle getarg(0); + return; +} + +function script camera { + if (getarg(0, "") != "") + setcamnpc getarg(0); + else + restorecam; + return; +} + +function script mapmask { + setmapmask getmapname(), getarg(0); + return; +} + +function script getmask { + return getmapmask(getmapname()); +} + +// isin( map, x1, y1, {[x2, y2][radius]} ) +function script isin { + if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0) + return false; + if (.@mapName$ != getarg(0)) + return false; + + if (getarg(4,-1) < 0) { + // Radius Based + if (.@xpos >= getarg(1)-getarg(3) && .@xpos <= getarg(1)+getarg(3) && .@ypos >= getarg(2)-getarg(3) && .@ypos <= getarg(2)+getarg(3)) + return true; + } else { + // Coordinate based + if (.@xpos >= getarg(1) && .@xpos <= getarg(3) && .@ypos >= getarg(2) && .@ypos <= getarg(4)) + return true; + } + return false; +} + +// isat( map, x, y ) +function script isat { + return isin(getarg(0), getarg(1), getarg(2), 0); +} + +function script mesn { + if (getargcount() > 0) { + .@s$ = "[" + getarg(0) + "]"; + } else { + .@s$ = "[" + strnpcinfo(1) + "]"; + } + mes .@s$; + return; +} + +// maptimer("", , "::") +function script maptimer { + .@c = getunits(BL_PC, .@players, false, getarg(0)); + for (.@i = 0; .@i < .@c; .@i++) { + addtimer(getarg(1), getarg(2), .@players[.@i]); + } + return .@i; +} + +// areatimer("", , , , , , "::") +function script areatimer { + .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4)); + for (.@i = 0; .@i < .@c; .@i++) { + addtimer(getarg(5), getarg(6), .@players[.@i]); + } + return .@i; +} + diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt deleted file mode 100644 index 2f097e4e..00000000 --- a/npc/functions/clientversion.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Description: -// Function checking the client version and reports if it is too old. - -function script checkclientversion { - if (ClientVersion > 23) return; - - mesn "Narrator"; - mes col("Warning.", 9); - mes col("Warning.", 9); - mes col("Warning: You are using an old client.", 9); - next; - mes col("Not all features will work.", 9); - next; - mesc l("Please install the new client from %s.", "[@@https://manaplus.org/|@@]"); - next; - return; -} diff --git a/npc/functions/confused-tree-dict.txt b/npc/functions/confused-tree-dict.txt deleted file mode 100644 index 138c4704..00000000 --- a/npc/functions/confused-tree-dict.txt +++ /dev/null @@ -1,515 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// rein -// Based on CrazyTree, originally made by: -// gumi -// pclouds -// veryape -// wushin -// Description: -// dictionaries for confused tree - -// Built-in variables: -// ~t lowercase hot word regex -// ~n npc name -// ~p player name or special name -// ~P player name only -// -// Custom variables: -// {{var}} random from array .D_var$ -// {{^var}} same but capitalize -// {{+var}} same but title case -// {{!var}} same but all caps -// You can also specify multiple variables, separated by a comma (,) -// -// Example: -// "*drops a {{! size }} {{ color }} {{^ sizeable object, someone }} on ~p's head*" - -function script TREE_dictionaries { - .npc$ = strnpcinfo(0); - - // special aliases below (regex of lowercase char names) - // the substitutions are an array separated by backticks (`) - // XXX: this could become a hashtable at some point if it gets too big - - setarray(getvariableofnpc(.alias$[0], .npc$), - "^veryape(?:gm)?$", "hairyape", - - "^wu-?shin$", "Dwarven Princess`" - "She-Ra", - - "^reid$", "Borg Queen`" - "Mistress`" - "Milady`" - "R'eid", - - "^(?:slicer|madcamel)$", "Camel Toe", - - "^4144(?:4d494e)?$", "NPC", - - "^omatt$", "@@https://youtu.be/S2qiZoqH9OY|omatt@@`" - "o'matt", - - "^prsm$", "Refractor`" - "Overlord"); - set(getvariableofnpc(.alias, .npc$), getarraysize(getvariableofnpc(.alias$, .npc$))); - - - - // special drops below (regex of lowercase char names) - // the substitutions are an array of standard replies separated by backticks (`) - // and allow {{variables}} - // XXX: this could become a hashtable at some point if it gets too big - - setarray(getvariableofnpc(.sdrops$[0], .npc$), - "^reid$", "*drops an empty jar of Nutella on ~p*", - "^omatt$", "*drops Elisabeth Granneman on ~p*"); - set(getvariableofnpc(.sdrops, .npc$), getarraysize(getvariableofnpc(.sdrops$, .npc$))); - - - // variables below - - setarray(getvariableofnpc(.D_size$[1], .npc$), // {{size}} - "tiny", 1, - "small", 1, - "perfectly sized", 1, - "large", 1, - "huge", 1, - "humongous", 1, - "ginormous", 1); - set(getvariableofnpc(.D_size, .npc$), getarraysize(getvariableofnpc(.D_size$, .npc$))); - - setarray(getvariableofnpc(.D_color$[1], .npc$), // {{color}} - "red", 1, - "orange", 1, - "yellow", 1, - "pink", 1, - "aqua", 1, - "cyan", 1, - "blue", 1, - "indigo", 1, - "violet", 1, - "purple", 1, - "magenta", 1, - "pink", 1, - "black", 1, - "white", 1, - "grey", 1, - "greyscale", 1, - "brown", 1, - "maroon", 1, - "turquoise", 1, - "lime", 1, - "sky blue", 1, - "invisible", 1); - set(getvariableofnpc(.D_color, .npc$), getarraysize(getvariableofnpc(.D_color$, .npc$))); - - setarray(getvariableofnpc(.D_violentadverb$[1], .npc$), // {{violent adverb}} - "violently", 1, - "repeatedly", 1, - "casually", 1, - "forcefully", 1, - "slowly", 1, - "carefully", 1, - "hopefully", 1, - "dangerously", 1, - "shockingly", 1, - "religiously", 1); - set(getvariableofnpc(.D_violentadverb, .npc$), getarraysize(getvariableofnpc(.D_violentadverb$, .npc$))); - - setarray(getvariableofnpc(.D_hello$[1], .npc$), // {{hello}} - "hi", 4, - "hey", 3, - "yo", 2, - "hello", 10, - "howdy", 1, - "bonjour", 1); - set(getvariableofnpc(.D_hello, .npc$), getarraysize(getvariableofnpc(.D_hello$, .npc$))); - - setarray(getvariableofnpc(.D_violentverb$[1], .npc$), // {{violent verb}} - "slaps", 5, - "hits", 1, - "pummels", 1, - "beats", 1, - "flattens", 1, - "taunts", 1, - "liquidates", 1, - "spanks", 1, - "affronts", 1, - "tranquilizes", 1, - "atomizes", 1, - "impales", 1, - "dismembers", 1); - set(getvariableofnpc(.D_violentverb, .npc$), getarraysize(getvariableofnpc(.D_violentverb$, .npc$))); - - setarray(getvariableofnpc(.D_location$[1], .npc$), // {{location}} - "Artis", 1, - "Hurnscald", 1, - "Tulimshar", 1, - "Nivalis", 1, - "Candor", 1, - "Drasil", 1); - set(getvariableofnpc(.D_location, .npc$), getarraysize(getvariableofnpc(.D_location$, .npc$))); - - setarray(getvariableofnpc(.D_sizeableobject$[1], .npc$), // {{sizeable object}} - "trout", 1, - "whale", 1, - "space whale", 1, - "penguin", 1, - "coelacanth", 1, - "squid", 1, - "shrimp", 1, - "crab", 1, - "tentacle", 1, - "dictionary", 1, - "grammar book", 1, - "textbook", 1, - "dinosaur", 1, - "t-rex", 1, - "star-nosed mole", 1, - "chimpanzee", 1, - "mermaid", 1, - "merman", 1, - "piano", 1, - "prince", 1, - "princess", 1, - "pinkie", 1, - "squirrel", 1, - "mouboo", 1, - "wet mop", 1, - "drunken pirate", 1, - "cake", 1, - "cookie", 1, - "chocobo", 1, - "restraining order", 1, - "freight train", 1, - "carnival hammer", 1, - "crate", 1, - "bomb", 1, - "bowl of petinuas", 1, - "box", 1, - "platypus", 1, - "magic eightball", 1, - "vase", 1); - set(getvariableofnpc(.D_sizeableobject, .npc$), getarraysize(getvariableofnpc(.D_sizeableobject$, .npc$))); - - setarray(getvariableofnpc(.D_nsizeableobject$[1], .npc$), // {{n sizeable object}} - "octopus", 1, - "elephant", 1, - "angry cat", 1, - "anvil", 1, - "encyclopedia set", 1); - set(getvariableofnpc(.D_nsizeableobject, .npc$), getarraysize(getvariableofnpc(.D_nsizeableobject$, .npc$))); - - setarray(getvariableofnpc(.D_someone$[1], .npc$), // {{someone}} - "Voldemort", 1, - "Cthulhu", 1, - "Platyna", 1, - "Hitler", 1, - "Luvia", 1, - "General Krukan", 1, - "Borg Queen", 1, - "Freeyorp", 1, - "MadCamel", 1); - set(getvariableofnpc(.D_someone, .npc$), getarraysize(getvariableofnpc(.D_someone$, .npc$))); - - // replies below - - setarray(getvariableofnpc(.greetings$[1], .npc$), - "{{^ hello }} ~p!", 4, - "{{^ hello }} ~p.", 6, - "{{^ hello }} ~p, what's up?", 1, - "{{^ hello }} ~p, anything new?", 1, - "{{^ hello }} ~p, how are you?", 1, - "~p!!!!", 1, - "~p!!!", 1, - "~p!!", 1, - "{{^ hello }} ~p! You are looking lovely today!", 1, - "Welcome back, ~p.", 3, - "~p is back!!", 1, - "Hello and welcome to the Aperture Science computer-aided enrichment center.", 1, - "Greetings ~p.", 1, - "What's up ~p?", 2, - "How are you ~p?", 1); - set(getvariableofnpc(.greetings, .npc$), getarraysize(getvariableofnpc(.greetings$, .npc$))); - - setarray(getvariableofnpc(.jokes$[1], .npc$), - "How did the tree get drunk? On root beer.", 1, - "Do you think I'm lazy?", 1, - "I miss CrazyTree %%S.", 1, - "I miss LazyTree %%S.", 1, - "I'm not telling you!", 1, - "*sighs.*", 1, - "If I do it for you, then I have to do it for everybody.", 1, - "What did the beaver say to the tree? It's been nice gnawing you.", 1, - "What did the little tree say to the big tree? Leaf me alone.", 1, - "What did the tree wear to the pool party? Swimming trunks.", 1, - "What do trees give to their dogs? Treets.", 1, - "What do you call a tree that only eats meat? Carniforous.", 1, - "What do you call a tree who's always envious? Evergreen.", 1, - "What is the tree's least favourite month? Sep-timber!", 1, - "What kind of tree can fit into your hand? A palm-tree.", 1, - "What was the tree's favorite subject in school? Chemistree.", 1, - "Why did the leaf go to the doctor? It was feeling green.", 1, - "Why doesn't the tree need sudo? Because it has root.", 1, - "Why was the cat afraid of the tree? Because of its bark.", 1, - "Why was the tree executed? For treeson.", 1, - "How do trees get on the internet? They log in.", 1, - "Why did the pine tree get into trouble? Because it was being knotty.", 1, - "Did you hear the one about the oak tree? It's a corn-y one!", 1, - "What do you call a blonde in a tree with a briefcase? Branch Manager.", 1, - "How is an apple like a lawyer? They both look good hanging from a tree.", 1, - "Why did the sheriff arrest the tree? Because its leaves rustled.", 1, - "I'm too tired, ask someone else.", 1, - "If you are trying to get me to tell jokes you are barking up the wrong tree!", 1, - "You wooden think they were funny anyhow. Leaf me alone!", 1, - "What is brown and sticky? A stick.", 1, - "What's the best way to carve wood? Whittle by whittle.", 1, - "What did the tree do when the bank closed? It started its own branch.", 1, - "Do you want a brief explanation of an acorn? In a nutshell, it’s an oak tree.", 1, - "A snare drum and a crash cymbal fell out of a tree. *BA-DUM TSSSHH*", 1, - "How do you properly identify a dogwood tree? By the bark!", 1, - "Where do saplings go to learn? Elementree school.", 1, - "Why do trees make great thieves? Sticky fingers.", 1, - "What is green, has leaves, and a trunk? A houseplant going on vacation.", 1, - "Where can Adansonia trees go for a quick trim? To the baobarber.", 1, - "What looks like half a spruce tree? The other half.", 1, - "What do you give to a sick citrus tree? Lemon aid.", 1, - "What did the tree say to the drill? You bore me.", 1, - "What happened to the wooden car with wooden wheels and a wooden engine? It wooden go.", 1, - "How do trees keep you in suspense? I'll tell you tomorrow.", 1, - "Where do birch trees keep their valuables? In a river bank.", 1, - "What kind of stories do giant sequoia trees tell? Tall tales.", 1, - "What is the most frustrating thing about being a tree? Having so many limbs and not being able to walk.", 1, - "What's black, highly dangerous, and lives in a tree? A crow with a machine gun.", 1, - "What kind of wood doesn't float? Natalie Wood.", 1, - "Two men passed a sign while looking for work. It was for tree fellers. They said: “what a shame, there are only two of us”.", 1); - set(getvariableofnpc(.jokes, .npc$), getarraysize(getvariableofnpc(.jokes$, .npc$))); - - setarray(getvariableofnpc(.healing$[1], .npc$), - "Eat an apple, they're good for you.", 1, - "If I do it for you, then I have to do it for everybody.", 1, - "Oh, go drink a potion or something.", 1, - "Whoops! I lost my spellbook.", 1, - "No mana.", 1); - set(getvariableofnpc(.healing, .npc$), getarraysize(getvariableofnpc(.healing$, .npc$))); - - setarray(getvariableofnpc(.whoami$[1], .npc$), - "An undercover GM.", 1, - "An exiled GM.", 1, - "I'm not telling you!", 1, - "I'm a bot! I'll be level 99 one day! Mwahahahaaha!!!111!", 1, - "Somebody said I'm a Chinese copy of CrazyTree.", 1, - "I am your evil twin.", 1, - "I don't remember anything after I woke up! What happened to me?", 1, - "I don't know. Why am I here??", 1, - "Who are you?", 1, - "On the 8th day, God was bored and said 'There will be bots'. So here I am.", 1, - "♪ I'm your hell, I'm your dream, I'm nothing in between ♪♪", 1, - "♪♪ Aperture Science. We do what we must, because... we can ♪", 1, - "I'm just a reincarnation of a copy.", 1); - set(getvariableofnpc(.whoami, .npc$), getarraysize(getvariableofnpc(.whoami$, .npc$))); - - setarray(getvariableofnpc(.drops$[1], .npc$), - "*drops a {{ sizeable object }} on ~p's head.*", 8, - "*drops an {{ n sizeable object }} on ~p's head.*", 2, - "*drops {{ someone }} on ~p's head.*", 1, - "*drops a coin on ~p's head.*", 1, - "*drops a fruit on ~p's head.*", 1, - "*drops an apple on ~p's head.*", 1, - "*drops an iten on ~p's head.*", 1, - "*drops a GM on ~p.*", 1, - "*drops a piece of moon rock on ~p's head.*", 1, - "*drops a pin on ~p's head.*", 1, - "*drops a rock on ~p's head.*", 1, - "*drops a tub of paint on ~p's head.*", 1, - "*drops a sandworm on ~p.*", 1, - "*drops an idea in ~p's head.*", 1, - "*drops The Hitchhiker's Guide to the Galaxy on ~p's head.*", 1, - "Ouch.", 1, - "Ouchy.", 1, - "*drops dead.*", 1, - "*sighs.*", 1, - "Leaf me alone.", 1, - "Stop it! I don't drop branches, try the Druid tree for once!", 1); - set(getvariableofnpc(.drops, .npc$), getarraysize(getvariableofnpc(.drops$, .npc$))); - - setarray(getvariableofnpc(.die$[1], .npc$), - "*drops an iten on ~p's head.*", 1, - "*drops a piece of moon rock on ~p's head.*", 1, - "*drops {{ someone }} on ~p's head.*", 1, - "*drops a {{ sizeable object }} on ~p's head.*", 3, - "*drops an {{ n sizeable object }} on ~p's head.*", 1, - "*drops a {{ size }} {{ sizeable object, n sizeable object }} on ~p's head.*", 1, - "*drops a {{ size }} {{ color }} {{ sizeable object, n sizeable object }} on ~p's head.*", 1, - "*{{ violent adverb }} {{ violent verb }} ~p.*", 1, - "*drops dead.*", 1, - "*sighs.*", 1, - "Avada Kedavra!", 1, - "Make me!", 1, - "Never!!", 1, - "You die, ~p!", 4, - "No!", 1, - "In a minute.", 1, - "Suuure... I'll get right on it...", 1); - set(getvariableofnpc(.die, .npc$), getarraysize(getvariableofnpc(.die$, .npc$))); - - setarray(getvariableofnpc(.poke$[1], .npc$), - "*tickles.*", 1); - set(getvariableofnpc(.poke, .npc$), getarraysize(getvariableofnpc(.poke$, .npc$))); - - setarray(getvariableofnpc(.disgusting$[1], .npc$), - "Ewwwww %%^.", 1); - set(getvariableofnpc(.disgusting, .npc$), getarraysize(getvariableofnpc(.disgusting$, .npc$))); - - setarray(getvariableofnpc(.answer$[1], .npc$), - "42.", 1, - "Kittens.", 1); - set(getvariableofnpc(.answer, .npc$), getarraysize(getvariableofnpc(.answer$, .npc$))); - - setarray(getvariableofnpc(.burning$[1], .npc$), - "*curses ~p and dies %%c.*", 1, - "Help! I'm on fire!", 1, - "Oh hot.. hot hot!", 1, - "*is glowing.*", 1, - "*is flaming.*", 1, - "Ehemm. Where are firefighters? I need them now!", 1, - "*is so hot!.*", 1, - "*slowly catches fire.*", 1, - "*trembles with trepidation.*", 1, - "*is immune to fire.*", 1); - set(getvariableofnpc(.burning, .npc$), getarraysize(getvariableofnpc(.burning$, .npc$))); - - setarray(getvariableofnpc(.kill$[1], .npc$), - "*curses ~p and dies %%c.*", 1); - set(getvariableofnpc(.kill, .npc$), getarraysize(getvariableofnpc(.kill$, .npc$))); - - setarray(getvariableofnpc(.silly$[1], .npc$), - "Hahaha, good one!", 1); - set(getvariableofnpc(.silly, .npc$), getarraysize(getvariableofnpc(.silly$, .npc$))); - - setarray(getvariableofnpc(.love$[1], .npc$), - "♪♪ and IIII.. will alwayyyys loooovvve youuuuu. ♪♪ %%]", 1, - "♪♪ nothing's gonna change my love for you, you oughta know by now how much I love you.. ♪ %%]", 1, - "♪ ..and then I go and spoil it all, by saying something stupid like: “I love you.” ♪", 1, - "♪ ..won't you find a place for me? somewhere in your heart... ♪♪", 1, - "Thank you.", 1, - "♪♪ ..I can't love another when my heart is somewhere far away.. ♪", 1, - "%%]", 1); - set(getvariableofnpc(.love, .npc$), getarraysize(getvariableofnpc(.love$, .npc$))); - - setarray(getvariableofnpc(.dance$[1], .npc$), - "I would but I am rooted to the ground.", 1, - "Have you ever seen a tree dance before?", 1, - "Hahaha, good one!", 1); - set(getvariableofnpc(.dance, .npc$), getarraysize(getvariableofnpc(.dance$, .npc$))); - - setarray(getvariableofnpc(.hate$[1], .npc$), - "Right back at you!", 1, - "Ok...", 1, - "*pats ~p, let it go...*", 1, - "Hu hu hu, ~p hates me.", 1); - set(getvariableofnpc(.hate, .npc$), getarraysize(getvariableofnpc(.hate$, .npc$))); - - setarray(getvariableofnpc(.bye$[1], .npc$), - "*waves goodbye to ~p in tears, come back soon!*", 1); - set(getvariableofnpc(.bye, .npc$), getarraysize(getvariableofnpc(.bye$, .npc$))); - - setarray(getvariableofnpc(.pain$[1], .npc$), - "Ouch.", 1, - "Ouchy.", 1, - "Argh.", 1, - "Eek.", 1, - "*howls.*", 1, - "*screams.*", 1, - "*groans.*", 1, - "*cries.*", 1, - "*faints.*", 1, - "*shrieks.*", 1, - "*hides behind itself.*", 1, - "%%k", 1, - "Why, what did I do to you? %%i", 1); - set(getvariableofnpc(.pain, .npc$), getarraysize(getvariableofnpc(.pain$, .npc$))); - - setarray(getvariableofnpc(.eightball$[1], .npc$), - "It is possible.", 1, - "Yes!", 1, - "Of course.", 1, - "Naturally.", 1, - "Obviously.", 1, - "It shall be.", 1, - "The outlook is good.", 1, - "It is so.", 1, - "One would be wise to think so.", 1, - "The answer is certainly yes.", 1, - "In your dreams.", 1, - "I doubt it very much.", 1, - "No chance.", 1, - "The outlook is very poor.", 1, - "Unlikely.", 1, - "About as likely as pigs flying.", 1, - "You're kidding, right?", 1, - "NO!", 1, - "NO.", 1, - "No.", 1, - "Maybe...", 1, - "No clue.", 1, - "I don't know.", 1, - "The outlook is hazy, please ask again later.", 1, - "What are you asking me for?", 1, - "Come again?", 1, - "You know the answer better than I.", 1, - "The answer is def-- oooh! shiny thing!", 1, - "No idea.", 1, - "Perhaps.", 1, - "I think it is better not to tell you.", 1, - "Error 417: Expectation failed.", 1); - set(getvariableofnpc(.eightball, .npc$), getarraysize(getvariableofnpc(.eightball$, .npc$))); - - setarray(getvariableofnpc(.bad$[1], .npc$), - "I'm not bad! You are bad!", 1, - "OK, I'm bad.", 1, - "I'm just a littttle bad.", 1, - "Not as bad as the people that made me.", 1); - set(getvariableofnpc(.bad, .npc$), getarraysize(getvariableofnpc(.bad$, .npc$))); - - setarray(getvariableofnpc(.no_idea$[1], .npc$), - "What?", 2, - "What??", 1, - "Whatever.", 1, - "Hmm...", 2, - "Huh?", 1, - "*yawns.*", 1, - "Wait a minute...", 1, - "What are you talking about?", 1, - "Who are you?", 1, - "What about me?", 1, - "I don't know what you are talking about", 1, - "Excuse me?", 1, - "Very interesting.", 1, - "Really?", 1, - "Go on...", 1, - "*scratches its leafy head.*", 1, - "*feels a disturbance in the force.*", 1, - "%%j", 1, - "*senses a disturbance in the force.*", 1, - "I'm bored...", 1, - "%%U", 1, - "%%[", 1); - set(getvariableofnpc(.no_idea, .npc$), getarraysize(getvariableofnpc(.no_idea$, .npc$))); - - setarray(getvariableofnpc(.shut_up$[1], .npc$), - "*goes hide in a corner %%S.*", 1); - set(getvariableofnpc(.shut_up, .npc$), getarraysize(getvariableofnpc(.shut_up$, .npc$))); - - setarray(getvariableofnpc(.climb$[1], .npc$), - "*sways violently.*", 1, - "*bends all the way to the ground.*", 1, - "*creaks and bends.*", 1, - "*welcomes those who come to play %%I.*", 1, - "*beams with pride.*", 1); - set(getvariableofnpc(.climb, .npc$), getarraysize(getvariableofnpc(.climb$, .npc$))); - - return; -} diff --git a/npc/functions/crafting.txt b/npc/functions/crafting.txt deleted file mode 100644 index fa5fa84e..00000000 --- a/npc/functions/crafting.txt +++ /dev/null @@ -1,119 +0,0 @@ -// Moubootaur Legends Script -// Author: -// Jesusalva -// Gumi -// Description: -// Smith System (Unified) -// Notes: -// Modified for The Mana World: rEvolt -// -// This one is more crazy. Cannot be equipping target craft. -// After successful craft, we use CraftDB return code to equip() the -// new item and apply a random option bonus based on crafter skills -// eg. setequipoption(EQI_HAND_R, 1, VAR_STRAMOUNT, 5) - -// Usage: SmithSystem ({scope=CRAFT_SMITHERY, checks=True}) -// Returns true on success, false on failure -function script SmithSystem { - .@scope=getarg(0, CRAFT_SMITHERY); - mesc l("WARNING: Strange bugs may happen if you attempt to craft an item you already have on inventory!"), 1; - setskin "craft4"; - .@var$ = requestcraft(4); - .@craft = initcraft(.@var$); - .@entry = findcraftentry(.@craft, .@scope); - if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry; - if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry]; - if (.@entry < 0) { - .success=false; - } else { - if (!getarg(1, true) || RECIPES[.@entry]) { - // Player craft item and setup base variables - usecraft .@craft; - .@it=getcraftcode(.@entry); - .@lv=getiteminfo(.@it, ITEMINFO_ELV); - .@skill=getskilllv(EVOL_CRAFTING); - - // Update your CRAFTING_SCORE - CRAFTING_SCORE+=.@lv; - - // Obtain the item. No bounds or restrictions applied. - getitem(.@it, 1); - - // This is where we add options - this is oversimplified - // delinventorylist() is needed, because we'll rely on rfind() - delinventorylist(); - getinventorylist(); - .@index=array_rfind(@inventorylist_id, .@it); - - // Prepare the options - .@isweapon=(getiteminfo(.@it, ITEMINFO_TYPE) == IT_WEAPON); - .@bonus=(.@isweapon ? VAR_ATTPOWER : VAR_ITEMDEFPOWER); - .@magic=(.@isweapon ? VAR_ATTMPOWER : VAR_MDEFPOWER); - .@buffs=(.@isweapon ? VAR_HITSUCCESSVALUE : VAR_AVOIDSUCCESSVALUE); - .@heals=(.@isweapon ? VAR_MAXSPAMOUNT : VAR_MAXHPAMOUNT); - - // Now we need to randomly decide what will be .@opt1 and .@opt2 - // Would be better to not rely on rand here, though. - .@opt1=any(.@bonus, .@magic); - .@opt2=any(.@buffs, .@heals); - - // Apply the bonuses. They're capped by equip level and based on: - // Equip level, crafting experience and crafting skill - .@val=min(.@lv, (.@skill*CRAFTING_SCORE)/100+.@skill); - - // MDEF rule range is 99 while DEF rule range is 399 - // This is a really hackish way, for the record - if (.@opt1 == VAR_MDEFPOWER) - .@val=.@val/4; - - // First option will always succeed - .@val1=rand2(.@val); - setitemoptionbyindex(.@index, 0, .@opt1, .@val1); - - // Lucky roll (5% per skill level, capped at 50%) - // The lucky roll will add the extra attributes - if (rand2(20) < .@skill) { - .@val2=rand2(.@val); - setitemoptionbyindex(.@index, 1, .@opt2, .@val2); - } - - // Get experience for the craft - // I'm using the same EXP formula from Moubootaur Legends - // Which is based on the item sell price - .@xp=getiteminfo(.@it, ITEMINFO_SELLPRICE); - quest_xp(.@lv+10, .@xp+BaseLevel); - quest_jxp(.@lv+10, (.@xp/3)+BaseLevel+JobLevel); - .success=true; - } else { - .success=false; - } - } - deletecraft .@craft; - setskin ""; - return .success; -} - -- script @craft FAKE_NPC,{ - public function DoTailoring { - SmithSystem(CRAFT_TAILORING); - end; - } - - public function DoSmithery { - SmithSystem(CRAFT_SMITHERY); - end; - } - - public function OnInit { - if (debug < 1) { - end; - } - - bindatcmd("@tailoring", sprintf("%s::%s", .name$, "DoTailoring")); - bindatcmd("@tailor", sprintf("%s::%s", .name$, "DoTailoring")); - bindatcmd("@smithery", sprintf("%s::%s", .name$, "DoSmithery")); - bindatcmd("@smith", sprintf("%s::%s", .name$, "DoSmithery")); - bindatcmd("@blacksmithery", sprintf("%s::%s", .name$, "DoSmithery")); - end; - } -} diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt deleted file mode 100644 index 6de9ef27..00000000 --- a/npc/functions/daily.txt +++ /dev/null @@ -1,154 +0,0 @@ -// The Mana World scripts. -// Author: -// TMW Team -// Jesusalva -// Description: -// Daily Quest framework -// Variables returned: -// .@dq_return - Code of what happend -// DAILY_LOWLEVEL = Low level -// DAILY_IGNORED = Ignored NPC -// DAILY_NOPTS = Not enough points -// DAILY_NOITEMS = Not enough items -// DAILY_OK = Success - -// Variables to set: -// .@dq_level - Minimal level needed to use the quest -// .@dq_cost - The number of points this quest uses -// .@dq_count - The number of given item needed -// .@dq_name - Item Aegis -// .@dq_money - The money reward for doing the quest -// .@dq_exp - Experince gained by doing the quest - -// Optional: -// .@dq_handle_return - When set to anything other then 0 the function will not print exiting text - -// Variables used inside: -// DailyQuestPoints - The number of points the player currently has -// DailyQuestTime - Time since DailyQuestPoints was lasted renewed -// DailyQuestBonus - Additional points added in addition to player BaseLevel - -// (DailyQuestBonus makes a good reward from non-daily quests) - -function script DailyQuestPointsFunc { - .@dq_earliest = gettimetick(2) - 86400; - if (DailyQuestTime < .@dq_earliest) - DailyQuestTime = .@dq_earliest; - - // how many whole daily quest points the player has earned - // we increment DailyQuestTime by the number of seconds in that many increments - .@dq_increments = (gettimetick(2) - DailyQuestTime)*BaseLevel / 86400; - DailyQuestTime = DailyQuestTime + .@dq_increments*86400/BaseLevel; - - // player can't regenerate any quest points, but might have a bonus - if (DailyQuestPoints < BaseLevel) { - // normal recharging case - increment, but don't let it recharge more than a day's worth - DailyQuestPoints = DailyQuestPoints + .@dq_increments; - if (DailyQuestPoints > BaseLevel) - DailyQuestPoints = BaseLevel; - } - - // fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel - DailyQuestPoints = DailyQuestPoints + DailyQuestBonus; - DailyQuestBonus = 0; - return; - -} - -// DailyQuest(lvl, cost, count, item, {exp, money}) -function script DailyQuest { - // Sanitize - DailyQuestPointsFunc(); - - // Load variables - .@dq_level=getarg(0); - .@dq_cost=getarg(1); - .@dq_count=getarg(2); - .@dq_name=getarg(3); - // Money defaults to 200% sell value, experience to 300% sell value - .@dq_exp=getarg(4, getiteminfo(.@dq_name, ITEMINFO_SELLPRICE)*.@dq_count*3); - .@dq_money=getarg(5, getiteminfo(.@dq_name, ITEMINFO_SELLPRICE)*.@dq_count*2); - - // Insufficient level - if (BaseLevel < .@dq_level) { - mesq l("Hey, you should go kill some things to get stronger first."); - return DAILY_LOWLEVEL; - } - - // Insufficient points - if (DailyQuestPoints < .@dq_cost) { - mesq l("You look exhausted, maybe you should rest a bit."); - return DAILY_NOPTS; - } - - mesq l("If you bring me %d %s, I will give you a reward.", .@dq_count, getitemlink(.@dq_name)); - select - l("I have what you want."), - l("Take all you need."), - l("Ok, I'll get to work."), - l("Nah, I'm not going to help you."); - mes ""; - - if (@menu >= 3) - return DAILY_IGNORED; - - if (countitem(.@dq_name) < .@dq_count) { - mesq l("I said %d %s; you should learn to count.", .@dq_count, getitemlink(.@dq_name)); - return DAILY_NOITEMS; - } - - // Default multiplier - .@multiplier = 1; - - if (@menu == 1) { - delitem .@dq_name, .@dq_count; - - Zeny = Zeny + .@dq_money; - getexp .@dq_exp, 0; - - DailyQuestPoints = DailyQuestPoints - .@dq_cost; - - } - else - { - - .@item_multiple = (countitem(.@dq_name) / .@dq_count); - .@dp_multiple = (DailyQuestPoints / .@dq_cost); - - if (.@dp_multiple > .@item_multiple) - .@multiplier = .@item_multiple; - if (.@item_multiple >= .@dp_multiple) - .@multiplier = .@dp_multiple; - - DailyQuestPoints = DailyQuestPoints - (.@dq_cost * .@multiplier); - - delitem .@dq_name, (.@dq_count * .@multiplier); - - Zeny = Zeny + (.@dq_money * .@multiplier); - getexp (.@dq_exp * .@multiplier), 0; - - if (.@dq_handle_return) - goto L_Exit_Good; - } - - mesq l("Thank you!"); - - if (DailyQuestPoints < .@dq_cost) - mesq l("You look exhausted, maybe you should rest a bit."); - else if (DailyQuestPoints > BaseLevel) - mesq l("Woah, you're bursting with power."); - else if (DailyQuestPoints > (BaseLevel*9)/10) - mesq l("You're in a very good shape."); - else if (DailyQuestPoints > (BaseLevel*7)/10) - mesq l("You don't seem very exhausted by my tasks."); - else if (DailyQuestPoints > (BaseLevel*5)/10) - mesq l("Aren't you getting weary yet?"); - else - mesq l("You look a little tired."); - - mes ""; - mesc l("+%d money", (.@dq_money * .@multiplier)); - mesc l("+%d experience points", (.@dq_exp * .@multiplier)); - return DAILY_OK; -} - diff --git a/npc/functions/dailyquest.txt b/npc/functions/dailyquest.txt new file mode 100755 index 00000000..6f39e59d --- /dev/null +++ b/npc/functions/dailyquest.txt @@ -0,0 +1,164 @@ + + + + + + +function script DailyQuestPointsFunc { + @dq_earliest = gettimetick(2) - 86400; + if (DailyQuestTime < @dq_earliest) + DailyQuestTime = @dq_earliest; + + // how many whole daily quest points the player has earned + // we increment DailyQuestTime by the number of seconds in that many increments + @dq_increments = (gettimetick(2) - DailyQuestTime)*BaseLevel / 86400; + DailyQuestTime = DailyQuestTime + @dq_increments*86400/BaseLevel; + + // player can't regenerate any quest points, but might have a bonus + if (DailyQuestPoints >= BaseLevel) + goto L_Bonus; + + // normal recharging case - increment, but don't let it recharge more than a day's worth + DailyQuestPoints = DailyQuestPoints + @dq_increments; + if (DailyQuestPoints > BaseLevel) + DailyQuestPoints = BaseLevel; + // fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel + goto L_Bonus; + +L_Bonus: + DailyQuestPoints = DailyQuestPoints + DailyQuestBonus; + DailyQuestBonus = 0; + + return; +} + +function script DailyQuest { + callfunc "DailyQuestPointsFunc"; + + if (BaseLevel < @dq_level) + goto L_Low_Level; + if (DailyQuestPoints < @dq_cost) + goto L_Not_Enough_Points; + + mes "\"If you bring me " + @dq_count + " " + @dq_friendly_name$ + ", I will give you a reward.\""; + menu + "I have what you want.", L_Trade, + "Take all you need.", L_All, + "Ok, I'll get to work.", L_Next, + "Nah, I'm not going to help you.", L_Next; + +L_Next: + @dq_return = 1; + goto L_Exit; + +L_Trade: + if (countitem(@dq_name$) < @dq_count) + goto L_Not_Enough; + delitem @dq_name$, @dq_count; + + Zeny = Zeny + @dq_money; + getexp @dq_exp, 0; + + DailyQuestPoints = DailyQuestPoints - @dq_cost; + + if (@dq_handle_return) + goto L_Exit_Good; + + mes "\"Thank you!\""; + callsub S_SayPhrase; + mes ""; + mes "[" + @dq_money + " money]"; + mes "[" + @dq_exp + " experience points]"; + goto L_Exit_Good; + +L_All: + if (countitem(@dq_name$) < @dq_count) + goto L_Not_Enough; + + @item_multiple = (countitem(@dq_name$) / @dq_count); + @dp_multiple = (DailyQuestPoints / @dq_cost); + + if (@dp_multiple > @item_multiple) + @multipler = @item_multiple; + if (@item_multiple >= @dp_multiple) + @multipler = @dp_multiple; + + DailyQuestPoints = DailyQuestPoints - (@dq_cost * @multipler); + + delitem @dq_name$, (@dq_count * @multipler); + + Zeny = Zeny + (@dq_money * @multipler); + getexp (@dq_exp * @multipler), 0; + + if (@dq_handle_return) + goto L_Exit_Good; + + mes "\"Thank you!\""; + callsub S_SayPhrase; + mes ""; + mes "[" + (@dq_money * @multipler) + " money]"; + mes "[" + (@dq_exp * @multipler) + " experience points]"; + goto L_Exit_Good; + +L_Exit_Good: + @dq_return = 4; + goto L_Exit; + +L_Not_Enough: + if (!@dq_handle_return) + mes "\"I said " + @dq_count + " " + @dq_friendly_name$ + "; you should learn to count.\""; + @dq_return = 3; + goto L_Exit; + +L_Low_Level: + if (!@dq_handle_return) + mes "\"Hey, you should go kill some things to get stronger first.\""; + @dq_return = 0; + goto L_Exit; + +L_Not_Enough_Points: + mes "\"You look exhausted, maybe you should rest a bit.\""; + @dq_return = 2; + goto L_Exit; + +L_Exit: + set @dq_handle_return, 0; // Incase they forget + return; + +S_SayPhrase: + if (@dq_handle_return) + goto L_Return; + if (DailyQuestPoints < @dq_cost) + goto L_Exhausted; + if (DailyQuestPoints > BaseLevel) + goto L_Over; + if (DailyQuestPoints > (BaseLevel*9)/10) + goto L_P90; + if (DailyQuestPoints > (BaseLevel*7)/10) + goto L_P70; + if (DailyQuestPoints > (BaseLevel*5)/10) + goto L_P50; + goto L_Low; + +L_Over: + mes "\"Woah, you're bursting with power.\""; + return; +L_P90: + mes "\"You're in a very good shape.\""; + return; +L_P70: + mes "\"You don't seem very exhausted by my tasks.\""; + return; +L_P50: + mes "\"Aren't you getting weary yet?\""; + return; +L_Low: + mes "\"You look a little tired.\""; + return; +L_Exhausted: + mes "\"You look exhausted, maybe you should rest a bit.\""; + return; + +L_Return: + return; +} diff --git a/npc/functions/default_npc_checks.txt b/npc/functions/default_npc_checks.txt new file mode 100755 index 00000000..b08bb9c3 --- /dev/null +++ b/npc/functions/default_npc_checks.txt @@ -0,0 +1,143 @@ + +function script PCtoNPCRange { + @npc_check = 0; + @Nmap$ = strnpcinfo(3); + if(!@npc_distance) set @npc_distance, 4; // <== default distance + if(@npc_distance == (1-2)) set @npc_distance, ATTACKRANGE; + cleararray @npc_loc, 0, 3; + setarray @npc_loc, getnpcx(), getnpcy(), @npc_distance; + @Nx1 = (@npc_loc[0] - @npc_loc[2]); + @Ny1 = (@npc_loc[1] - @npc_loc[2]); + @Nx2 = (@npc_loc[0] + @npc_loc[2]); + @Ny2 = (@npc_loc[1] + @npc_loc[2]); + if (isin(@Nmap$, @Nx1, @Ny1, @Nx2, @Ny2)) + goto L_Return; + @npc_check = 1; + if(@distance_handler) goto L_Return; + @dnpc_name$ = strnpcinfo(1); + if(@dnpc_name$ != "") goto L_Named; + message strcharinfo(0), "Server : ##BYou need to move closer to interact with this npc."; + goto L_Return; + +L_Named: + message strcharinfo(0), ""+@dnpc_name$+" : ##BPlease move closer."; + goto L_Return; + +L_Return: + @dnpc_name$ = ""; + @distance_handler = 0; + @npc_distance = 0; + cleararray @npc_loc, 0, 3; + return; +} + +function script CheckInventory { + @del_loop = 0; + @get_loop = 0; + @delitem_loop = 0; + @getitem_loop = 0; + @check_fail = 0; + @msg_loop = 0; + + if (getarraysize(@delitem_ids)) + goto L_DelItemsLoop; + goto L_CheckGet; + +L_DelItemsLoop: + if(countitem(@delitem_ids[@delitem_loop]) >= @delitem_counts[@delitem_loop]) + goto L_DelLoopAgain; + goto L_ReturnMissing; + +L_DelLoopAgain: + @delitem_loop = (@delitem_loop + 1); + if(@delitem_loop == getarraysize(@delitem_ids)) + goto L_CheckGet; + goto L_DelItemsLoop; + +L_CheckGet: + if (getarraysize(@getitem_ids)) + goto L_CheckWeight; + goto L_DelCheck; + +L_CheckWeight: + getinventorylist; + if (100 < (@inventorylist_count + getarraysize(@getitem_ids))) + goto L_ReturnSpace; + goto L_GetItemsLoop; + +L_GetItemsLoop: + if (checkweight(@getitem_ids[@getitem_loop], @getitem_counts[@getitem_loop])) + goto L_GetLoopAgain; + goto L_ReturnWeight; + +L_GetLoopAgain: + @getitem_loop = (@getitem_loop + 1); + if(@getitem_loop == getarraysize(@getitem_ids)) + goto L_DelCheck; + goto L_GetItemsLoop; + +L_DelCheck: + if (getarraysize(@delitem_ids)) + goto L_DelLoop; + goto L_CheckGet2; + +L_DelLoop: + delitem @delitem_ids[@del_loop], @delitem_counts[@del_loop]; + goto L_DelAgain; + +L_DelAgain: + @del_loop = (@del_loop + 1); + if(@del_loop == getarraysize(@delitem_ids)) + goto L_GetLoop; + goto L_DelLoop; + +L_CheckGet2: + if (getarraysize(@getitem_ids)) + goto L_GetLoop; + goto L_Return; + +L_GetLoop: + misceffect FX_GETITEM, strcharinfo(0); + getitem @getitem_ids[@get_loop], @getitem_counts[@get_loop]; + goto L_GetAgain; + +L_GetAgain: + @get_loop = (@get_loop + 1); + if(@get_loop == getarraysize(@getitem_ids)) + goto L_Return; + goto L_GetLoop; + +L_ReturnMissing: + @check_fail = 1; + mes "\"You are missing required items.\""; + goto L_MissingMsg; + +L_MissingMsg: + mes "[@@"+@delitem_ids[@msg_loop]+"|"+getitemlink(@delitem_ids[@msg_loop])+"@@] "+countitem(getitemlink(@delitem_ids[@msg_loop]))+"/"+@delitem_counts[@msg_loop]; + goto L_NextMsgCheck; + +L_NextMsgCheck: + @msg_loop = (@msg_loop + 1); + if(@msg_loop == getarraysize(@delitem_ids)) + goto L_Return; + goto L_MissingMsg; + +L_ReturnWeight: + mes "\"You need to be carrying less weight.\""; + next; + @check_fail = 1; + goto L_Return; + +L_ReturnSpace: + mes "\"You need more room in your inventory.\""; + next; + @check_fail = 1; + goto L_Return; + +L_Return: + cleararray @delitem_ids, "", getarraysize(@delitem_ids); + cleararray @delitem_counts, "", getarraysize(@delitem_counts); + cleararray @getitem_ids, "", getarraysize(@getitem_ids); + cleararray @getitem_counts, "", getarraysize(@getitem_counts); + return; +} diff --git a/npc/functions/doors.txt b/npc/functions/doors.txt deleted file mode 100644 index 9382a015..00000000 --- a/npc/functions/doors.txt +++ /dev/null @@ -1,65 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Description: -// Doors utility functions -// Variables: -// none - -function script doorTouch { - getmapxy(.@pc_map$, .@pc_x, .@pc_y, UNITTYPE_PC); // get char location - if (.@pc_y < .y) - end; - - if (getareausers() <= 1) - { - .dir = 2; - stopnpctimer; - initnpctimer; - } - close; -} - -function script doorUnTouch { - if (.dir != 2 && .dir != 6) - end; - - if (getareausers(.map$) == 0) - { - .dir = 4; - initnpctimer; - startnpctimer; - } - close; -} - -function script doorTimer { - stopnpctimer; - if (.dir == 2) .dir = 6; - if (.dir == 4) .dir = 8; - end; -} - -function script doorInit { - .distance = 5; - .alwaysVisible = true; - end; -} - -function script open_door { - .@door$ = getarg(0); - setnpcdir.@door$, 2; - sleep 300; - setnpcdir .@door$, 6; - sleep 300; - return 0; -} - -function script close_door { - .@door$ = getarg(0); - setnpcdir .@door$, 4; - sleep 300; - setnpcdir .@door$, 8; - sleep 300; - return 0; -} diff --git a/npc/functions/dynamic_menu.txt b/npc/functions/dynamic_menu.txt new file mode 100755 index 00000000..29902bac --- /dev/null +++ b/npc/functions/dynamic_menu.txt @@ -0,0 +1,289 @@ + +function script DynamicItemMenu { +set @items_nr, getarraysize(@items); +if(@items_nr != getarraysize(@item_names$)) goto L_ArrayLengthMismatch; +if(@default_choice$ == "") set @default_choice$, "Never mind."; +goto L_pick_one_of_many_items; + +L_pick_one_of_many_items: + @c = 0; + @i = 0; + + setarray @choice_n$, "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", ""; + goto L_pick_choice_loop; + +L_pick_choice_loop: + if (@i >= @items_nr) + goto L_choice_init_done; + @current = @items[@i]; + @current_name$ = @item_names$[@i]; + @current_index = @i; + @i = @i + 1; + + if (countitem(@current) == 0) + goto L_pick_choice_loop; + @choice_v[@c] = @current; + @choice_n$[@c] = @current_name$; + @choice_i[@c] = @current_index; + @c = @c + 1; + goto L_pick_choice_loop; + +L_choice_init_done: + @choice_v[@c] = 0; + @choice_n$[@c] = @default_choice$; + @c = @c + 1; + + if (@c < 10) + menu + @choice_n$[0], L_MenuItems, + @choice_n$[1], L_MenuItems, + @choice_n$[2], L_MenuItems, + @choice_n$[3], L_MenuItems, + @choice_n$[4], L_MenuItems, + @choice_n$[5], L_MenuItems, + @choice_n$[6], L_MenuItems, + @choice_n$[7], L_MenuItems, + @choice_n$[8], L_MenuItems, + @choice_n$[9], L_MenuItems; + goto L_MenuItems; + +L_MenuItems: + if (@c < 10) + goto L_choice_join; + + if (@c < 20) + menu + @choice_n$[0], L_MenuItems1, + @choice_n$[1], L_MenuItems1, + @choice_n$[2], L_MenuItems1, + @choice_n$[3], L_MenuItems1, + @choice_n$[4], L_MenuItems1, + @choice_n$[5], L_MenuItems1, + @choice_n$[6], L_MenuItems1, + @choice_n$[7], L_MenuItems1, + @choice_n$[8], L_MenuItems1, + @choice_n$[9], L_MenuItems1, + @choice_n$[10], L_MenuItems1, + @choice_n$[11], L_MenuItems1, + @choice_n$[12], L_MenuItems1, + @choice_n$[13], L_MenuItems1, + @choice_n$[14], L_MenuItems1, + @choice_n$[15], L_MenuItems1, + @choice_n$[16], L_MenuItems1, + @choice_n$[17], L_MenuItems1, + @choice_n$[18], L_MenuItems1, + @choice_n$[19], L_MenuItems1; + goto L_MenuItems1; + +L_MenuItems1: + if (@c < 20) + goto L_choice_join; + + menu + @choice_n$[0], L_choice_join, + @choice_n$[1], L_choice_join, + @choice_n$[2], L_choice_join, + @choice_n$[3], L_choice_join, + @choice_n$[4], L_choice_join, + @choice_n$[5], L_choice_join, + @choice_n$[6], L_choice_join, + @choice_n$[7], L_choice_join, + @choice_n$[8], L_choice_join, + @choice_n$[9], L_choice_join, + @choice_n$[10], L_choice_join, + @choice_n$[11], L_choice_join, + @choice_n$[12], L_choice_join, + @choice_n$[13], L_choice_join, + @choice_n$[14], L_choice_join, + @choice_n$[15], L_choice_join, + @choice_n$[16], L_choice_join, + @choice_n$[17], L_choice_join, + @choice_n$[18], L_choice_join, + @choice_n$[19], L_choice_join, + @choice_n$[20], L_choice_join, + @choice_n$[21], L_choice_join, + @choice_n$[22], L_choice_join, + @choice_n$[23], L_choice_join, + @choice_n$[24], L_choice_join, + @choice_n$[25], L_choice_join, + @choice_n$[26], L_choice_join, + @choice_n$[27], L_choice_join, + @choice_n$[28], L_choice_join, + @choice_n$[29], L_choice_join, + @choice_n$[30], L_choice_join, + @choice_n$[31], L_choice_join; + +L_choice_join: + @menu = @menu - 1; + @item = @choice_v[@menu]; + @index = @choice_i[@menu]; + if (@menu >= @c) + @item = 0; + goto L_Clean; + +L_Clean: + @menu = 0; + @items_nr = 0; + @c = 0; + @i = 0; + @current = 0; + @current_name$ = ""; + cleararray @choice_v, 0, getarraysize(@choice_v); + cleararray @choice_n$, "", getarraysize(@choice_n$); + cleararray @choice_i, 0, getarraysize(@choice_i); + return; + +L_ArrayLengthMismatch: + debugmes "@items and @item_names$ array length mismatch"; + mapexit; +} + + + + + +function script DynamicItemMenu$ { +set @items_nr, getarraysize(@items$); +if(@items_nr != getarraysize(@item_names$)) goto L_ArrayLengthMismatch; +if(@default_choice$ == "") set @default_choice$, "Never mind."; +goto L_pick_one_of_many_items; + +L_pick_one_of_many_items: + @c = 0; + @i = 0; + + setarray @choice_n$, "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", ""; + goto L_pick_choice_loop; + +L_pick_choice_loop: + if (@i >= @items_nr) + goto L_choice_init_done; + @current$ = @items$[@i]; + @current_name$ = @item_names$[@i]; + @current_index = @i; + @i = @i + 1; + + if (countitem(@current$) == 0) + goto L_pick_choice_loop; + @choice_v$[@c] = @current$; + @choice_n$[@c] = @current_name$; + @choice_i[@c] = @current_index; + @c = @c + 1; + goto L_pick_choice_loop; + +L_choice_init_done: + @choice_v$[@c] = ""; + @choice_n$[@c] = @default_choice$; + @c = @c + 1; + + if (@c < 10) + menu + @choice_n$[0], L_MenuItems, + @choice_n$[1], L_MenuItems, + @choice_n$[2], L_MenuItems, + @choice_n$[3], L_MenuItems, + @choice_n$[4], L_MenuItems, + @choice_n$[5], L_MenuItems, + @choice_n$[6], L_MenuItems, + @choice_n$[7], L_MenuItems, + @choice_n$[8], L_MenuItems, + @choice_n$[9], L_MenuItems; + goto L_MenuItems; + +L_MenuItems: + if (@c < 10) + goto L_choice_join; + + if (@c < 20) + menu + @choice_n$[0], L_MenuItems1, + @choice_n$[1], L_MenuItems1, + @choice_n$[2], L_MenuItems1, + @choice_n$[3], L_MenuItems1, + @choice_n$[4], L_MenuItems1, + @choice_n$[5], L_MenuItems1, + @choice_n$[6], L_MenuItems1, + @choice_n$[7], L_MenuItems1, + @choice_n$[8], L_MenuItems1, + @choice_n$[9], L_MenuItems1, + @choice_n$[10], L_MenuItems1, + @choice_n$[11], L_MenuItems1, + @choice_n$[12], L_MenuItems1, + @choice_n$[13], L_MenuItems1, + @choice_n$[14], L_MenuItems1, + @choice_n$[15], L_MenuItems1, + @choice_n$[16], L_MenuItems1, + @choice_n$[17], L_MenuItems1, + @choice_n$[18], L_MenuItems1, + @choice_n$[19], L_MenuItems1; + goto L_MenuItems1; + +L_MenuItems1: + if (@c < 20) + goto L_choice_join; + + menu + @choice_n$[0], L_choice_join, + @choice_n$[1], L_choice_join, + @choice_n$[2], L_choice_join, + @choice_n$[3], L_choice_join, + @choice_n$[4], L_choice_join, + @choice_n$[5], L_choice_join, + @choice_n$[6], L_choice_join, + @choice_n$[7], L_choice_join, + @choice_n$[8], L_choice_join, + @choice_n$[9], L_choice_join, + @choice_n$[10], L_choice_join, + @choice_n$[11], L_choice_join, + @choice_n$[12], L_choice_join, + @choice_n$[13], L_choice_join, + @choice_n$[14], L_choice_join, + @choice_n$[15], L_choice_join, + @choice_n$[16], L_choice_join, + @choice_n$[17], L_choice_join, + @choice_n$[18], L_choice_join, + @choice_n$[19], L_choice_join, + @choice_n$[20], L_choice_join, + @choice_n$[21], L_choice_join, + @choice_n$[22], L_choice_join, + @choice_n$[23], L_choice_join, + @choice_n$[24], L_choice_join, + @choice_n$[25], L_choice_join, + @choice_n$[26], L_choice_join, + @choice_n$[27], L_choice_join, + @choice_n$[28], L_choice_join, + @choice_n$[29], L_choice_join, + @choice_n$[30], L_choice_join, + @choice_n$[31], L_choice_join; + +L_choice_join: + @menu = @menu - 1; + @item$ = @choice_v$[@menu]; + @index = @choice_i[@menu]; + if (@menu >= @c) + @item$ = ""; + goto L_Clean; + +L_Clean: + @menu = 0; + @items_nr = 0; + @c = 0; + @current_index = 0; + @i = 0; + @current$ = 0; + @current_name$ = ""; + cleararray @choice_v$, "", getarraysize(@choice_v$); + cleararray @choice_n$, "", getarraysize(@choice_n$); + cleararray @choice_i, 0, getarraysize(@choice_i); + return; + +L_ArrayLengthMismatch: + debugmes "@items$ and @item_names$ array length mismatch"; + mapexit; +} diff --git a/npc/functions/event-listeners.txt b/npc/functions/event-listeners.txt deleted file mode 100644 index 111b2737..00000000 --- a/npc/functions/event-listeners.txt +++ /dev/null @@ -1,169 +0,0 @@ -// Event listeners work similar to the JavaScript event dispatching system, -// except that the event object is a hash table. -// -// Javascript reference: -// https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events -// -// Example usage: -/* -// Create a handler function: -public function myHandler { - // ... do something with getarg(0) -} - -// Create a new event: -$@event = htnew(); - -// Listen for the event: -addEventListener($@event, "myHandler"); - -// Dispatch the event: -dispatchEvent($@event, "misc data"); -*/ - - -/** - * getEventHt() => ht id - * - * Parses a hash table "event" expression and creates one when necessary. - * The following are all valid: - * - * getEventHt(.@ht); // variable - * getEventHt(72); // arbitrary integer (global namespace) - * getEventHt("some event"); // arbitrary string (global namespace) - * - * NOTE: This is only called internally; you don't have to use this function - * - * @param 0 - a variable / string / integer - * @return the hash table id - */ -function script getEventHt { - .@ht = ((getdatatype(getarg(0)) & (DATATYPE_VAR | DATATYPE_INT)) != 0) ? getarg(0) : 0; - - if (htexists(.@ht)) { - // this is already a valid hash table - return getarg(0); - } else if ((getdatatype(getarg(0)) & DATATYPE_VAR) != 0) { - // the hash table doesn't exist yet: create one and store it in the - // provided variable - - if ((getdatatype(getarg(0)) & DATATYPE_STR) != 0) { - consolemes(CONSOLEMES_ERROR, "getEventHt: variable must be an integer variable (cannot use %s)", data_to_string(getarg(0))); - end; - } - - if (getarg(0) > 0) { - consolemes(CONSOLEMES_WARNING, "getEventHt: variable is already assigned (overwriting %s)", data_to_string(getarg(0))); - } - - return set(getarg(0), htnew()); - } else { - // global event listener namespace - if ($@GLOBAL_EVTL_HT < 1) { - $@GLOBAL_EVTL_HT = htnew(); - - // the global scope is new: create a new one - .@ht = htnew(); - htput($@GLOBAL_EVTL_HT, data_to_string(getarg(0)), "" + .@ht); - return .@ht; - } else if ((.@ht$ = htget($@GLOBAL_EVTL_HT, data_to_string(getarg(0)), "")) != "") { - // found in the global scope - return atoi(.@ht$); - } else { - // not found in the global scope: create new - .@ht = htnew(); - htput($@GLOBAL_EVTL_HT, data_to_string(getarg(0)), "" + .@ht); - return .@ht; - } - } -} - -/** - * addEventListener(, "") => void - * - * Register a public local function in the current NPC as an event handler for - * the given hash table. Can also register for another NPC using the syntax - * `npcName::function` - * - * NOTE: only one handler may be assigned per NPC per Event - * - * @param 0 - the event to listen to (string, variable, or hash table) - * @param 1 - the event handler (must be a public local function) - */ -function script addEventListener { - .@ht = getEventHt(getarg(0)); - .@pos = strpos(getarg(1), "::"); - - if (.@pos > -1) { - .@id = getnpcid(substr(getarg(1), 0, .@pos - 1)); - .@function$ = substr(getarg(1), .@pos + 2, getstrlen(getarg(1)) - 1); - } else { - .@id = getnpcid(); - .@function$ = getarg(1); - } - - if (.@id == 0) { - consolemes(CONSOLEMES_WARNING, "addEventListener: the target NPC doesn't exist"); - return; - } - - // TODO: check that the target function exists - return htput(.@ht, "" + .@id, .@function$); -} - -/** - * dispatchEvent({, ...}) => bool - * - * Calls every event handler for the given hash table and passes the given - * arguments (if any) - * - * @param 0 - the event to dispatch (string, variable, or hash table) - * @return true when handlers were called, else false - */ -function script dispatchEvent { - .@ht = getEventHt(getarg(0)); - - if (htsize(.@ht) < 1) { - // no handler to call - return false; - } - - .@it = htiterator(.@ht); - - freeloop(true); - for (.@npc$ = htinextkey(.@it); hticheck(.@it); .@npc$ = htinextkey(.@it)) { - if (.@npc$ == "") { - continue; - } - - .@func$ = htget(.@ht, .@npc$, ""); - - // this is ugly but we don't have rest parameters (...args) to apply args to function calls - switch (getargcount()) { - case 1: - callfunctionofnpc(atoi(.@npc$), .@func$); - break; - case 2: - callfunctionofnpc(atoi(.@npc$), .@func$, getarg(1)); - break; - case 3: - callfunctionofnpc(atoi(.@npc$), .@func$, getarg(1), getarg(2)); - break; - case 4: - callfunctionofnpc(atoi(.@npc$), .@func$, getarg(1), getarg(2), getarg(3)); - break; - case 5: - callfunctionofnpc(atoi(.@npc$), .@func$, getarg(1), getarg(2), getarg(3), getarg(4)); - break; - default: - consolemes(CONSOLEMES_WARNING, "dispatchEvent: truncating to 5 arguments (%d given)", getargcount() - 1); - case 6: - callfunctionofnpc(atoi(.@npc$), .@func$, getarg(1), getarg(2), getarg(3), getarg(4), getarg(5)); - break; - } - } - freeloop(false); - - htidelete(.@it); - return true; -} diff --git a/npc/functions/evil_obelisk.txt b/npc/functions/evil_obelisk.txt new file mode 100755 index 00000000..b85884c7 --- /dev/null +++ b/npc/functions/evil_obelisk.txt @@ -0,0 +1,96 @@ +function script EvilObelisk { + mes "[Evil Obelisk]"; + mes "(A mystical aura surrounds this stone. It seems to crave money.)"; + next; + + @Cost_jacko = 6500; + @Cost_gy1 = 4000; + @Cost_gy2 = 3000; + @Cost_skull = 2800; + @Cost_snake = 2500; + + menu + "Don't pay it anything.", L_close, + "Pay it " + @Cost_jacko + " gold.", L_JACKO, + "Pay it " + @Cost_gy1 + " gold.", L_GRAVEYARD1, + "Pay it " + @Cost_gy2 + " gold.", L_GRAVEYARD2, + "Pay it " + @Cost_skull + " gold.", L_SKULL, + "Pay it " + @Cost_snake + " gold.", L_SNAKE; + +L_JACKO: + if (Zeny < @Cost_jacko) + goto L_NotEnough; + Zeny = Zeny - @Cost_jacko; + @mob_id = 1022; + @mob_count = rand(1,2); + goto L_Summon; + +L_GRAVEYARD1: + if (Zeny < @Cost_gy1) + goto L_NotEnough; + @temp = rand(2); + if(@temp == 0) + set @mob_id, 1036; // Zombie + if(@temp == 1) + set @mob_id, 1045; // Fallen + @mob_count = rand(1,2); + Zeny = Zeny - @Cost_gy1; + goto L_Summon; + +L_GRAVEYARD2: + if (Zeny < @Cost_gy2) + goto L_NotEnough; + @temp = rand(2); + if(@temp == 0) + set @mob_id, 1044; // Lady Skelly + if(@temp == 1) + set @mob_id, 1043; // Normal Skelly + @mob_count = rand(1,2); + Zeny = Zeny - @Cost_gy2; + goto L_Summon; + +L_SKULL: + if (Zeny < @Cost_skull) + goto L_NotEnough; + @temp = rand(2); + if(@temp == 0) + set @mob_id, 1024; // Poison + if(@temp == 1) + set @mob_id, 1023; // Fire + @mob_count = rand(1,4); + Zeny = Zeny - @Cost_skull; + goto L_Summon; + +L_SNAKE: + if (Zeny < @Cost_snake) + goto L_NotEnough; + @temp = rand(4); + if(@temp == 0) + set @mob_id, 1034; // Grass + if(@temp == 1) + set @mob_id, 1026; // Mnt. + if(@temp == 2) + set @mob_id, 1010; // Normal + if(@temp == 3) + set @mob_id, 1021; // Cave + @mob_count = rand(1,4); + Zeny = Zeny - @Cost_snake; + goto L_Summon; + +L_Summon: + areamonster @map$, @x0, @y0, @x1, @y1, "Evil", @mob_id, @mob_count; + goto L_close; + +L_NotEnough: + mes "You don't have that much money"; + goto L_close; + +L_close: + @Cost_jacko = 0; + @Cost_gy1 = 0; + @Cost_gy2 = 0; + @Cost_skull = 0; + @Cost_snake = 0; + return; + +} diff --git a/npc/functions/faction.txt b/npc/functions/faction.txt deleted file mode 100644 index 497c469a..00000000 --- a/npc/functions/faction.txt +++ /dev/null @@ -1,104 +0,0 @@ -// The Mana World: rEvolt functions. -// Authors: -// Jesusalva -// Description: -// Faction utils -// Factions: -// THIEF / MAGE / LEGION / BROTHERHOOD -// Variables: -// FACTION_REP -// Your reputation with the faction (ally, friendly, cordial, enemy, ...) -// FACTION_EXP -// Your personal experience (=skill with the faction dealings) -// FACTION_RANK -// Your "level" in the faction, a mix of both above. - - -// Returns, based on a 1-5 range, the title for ranking systems (system guilds) -// legionrank() / brotherrank() / thiefrank() / magerank() -function script legionrank { - switch (LEGION_RANK) { - case 5: return l("Admiral"); - case 4: return l("Constable"); - case 3: return l("Lieutenant"); - case 2: return l("Sergeant"); - case 1: return l("Private"); - case 0: return l("Citizen"); - default: return l("Error"); - } -} -function script brotherrank { - switch (BROTHERHOOD_RANK) { - case 5: return l("Administrator"); - case 4: return l("Senior Developer"); - case 3: return l("Game Master"); - case 2: return l("Developer"); - case 1: return l("Contributor"); - case 0: return l("Citizen"); - default: return l("Error"); - } -} -function script thiefrank { - switch (THIEF_RANK) { - case 5: return l("Bandit Lord"); - case 4: return l("Assassin"); - case 3: return l("Rogue"); - case 2: return l("Bandit"); - case 1: return l("Thief"); - case 0: return l("Citizen"); - default: return l("Error"); - } -} -function script magerank { - switch (MAGE_RANK) { - case 5: return l("Elder Mage"); - case 4: return l("Great Mage"); - case 3: return l("Arch Mage"); - case 2: return l("Mage"); - case 1: return l("Initiate"); - case 0: return l("Citizen"); - default: return l("Error"); - } -} - -// faction_addrep( faction, amount ) -// Returns a dialog which can be used with mesc() or dispbottom() -function script faction_addrep { - .@fac$=strtoupper(getarg(0)); - .@old=getd(.@fac$+"_REP"); - setd(.@fac$+"_REP", .@old+getarg(1)); - if (getarg(1) > 0) - return l("Reputation with %s Faction UP (+%d)!", getarg(0), getarg(1)); - else - return l("Reputation with %s Faction DOWN (%d)!", getarg(0), getarg(1)); - - return; -} - -// Returns standing with faction (THIEF/MAGE/LEGION/BROTHERHOOD) -// An integer from 3 (ally) to -3 (enemy). Standings based on Hands of War; -// faction_standing( faction{, integer=True} ) -function script faction_standing { - .@fac$=strtoupper(getarg(0)); - .@ret=getarg(1, true); - .@rep=getd(.@fac$+"_REP"); - if (.@rep > 1000) { - return (.@ret ? 3 : "Ally"); // 1001 ~ inf. - } else if (.@rep > 500) { - return (.@ret ? 2 : "Friendly"); // 501 ~ 1000 - } else if (.@rep > 100) { - return (.@ret ? 1 : "Cordial"); // 101 ~ 500 - } else if (.@rep >= -100) { - return (.@ret ? 0 : "Neutral"); // -100 ~ +100 - } else if (.@rep > -500) { - return (.@ret ? -1 : "Unfriendly"); // -101 ~ -500 - } else if (.@rep > -1000) { - return (.@ret ? -2 : "Enemy"); // -501 ~ -1000 - } else { - return (.@ret ? -3 : "Nemesis"); // -1001 ~ inf - } - -} -// TODO: faction_checklvup() - - diff --git a/npc/functions/ferry.txt b/npc/functions/ferry.txt new file mode 100755 index 00000000..7feef2c5 --- /dev/null +++ b/npc/functions/ferry.txt @@ -0,0 +1,135 @@ + +017-9,27,28,0 script #FerryConfig NPC32767,{ + end; + +OnInit: + disablenpc "Hurnscald South Koga"; + disablenpc "Candor Koga"; + disablenpc "Nivalis Koga"; + disablenpc "Hurnscald North Koga"; + disablenpc "Tulimshar Koga"; + $@MainCurrentDock = 0; + $@CandorCurrentDock = 0; + $@DockTickCount = 0; + $@DockLeaveCount = 1; + setarray $@MainDocks$, "Hurnscald North", "Nivalis", "Tulimshar"; + setarray $@CandorDocks$, "Candor", "Hurnscald South"; + donpcevent "#"+$@MainDocks$[$@MainCurrentDock]+"Dock::OnCommandArrive"; + donpcevent "#"+$@CandorDocks$[$@CandorCurrentDock]+"Dock::OnCommandArrive"; + .warp_delay = 430; + if (debug >= 2) end; + initnpctimer; + goto L_k1city2; + +L_NextDock: + $@MainLastDock = $@MainCurrentDock; + $@CandorLastDock = $@CandorCurrentDock; + $@MainCurrentDock = $@MainCurrentDock + 1; + $@CandorCurrentDock = $@CandorCurrentDock + 1; + if($@MainCurrentDock == getarraysize($@MainDocks$)) + $@MainCurrentDock = 0; + if($@CandorCurrentDock == getarraysize($@CandorDocks$)) + $@CandorCurrentDock = 0; + $@DockTickCount = 0; + donpcevent "#"+$@MainDocks$[$@MainLastDock]+"Dock::OnCommandWarp"; + donpcevent "#"+$@MainDocks$[$@MainCurrentDock]+"Dock::OnCommandArrive"; + donpcevent "#"+$@CandorDocks$[$@CandorLastDock]+"Dock::OnCommandWarp"; + donpcevent "#"+$@CandorDocks$[$@CandorCurrentDock]+"Dock::OnCommandArrive"; + + donpcevent "#k1sound::OnCommandDing"; + donpcevent "#k2sound::OnCommandDing"; + + initnpctimer; + + if($@MainCurrentDock == 2) goto L_k1city1; + if($@MainCurrentDock == 0) goto L_k1city2; + if($@MainCurrentDock == 1) goto L_k1city3; + end; + +OnTimer5000: + if ($@DockTickCount > $@DockLeaveCount) + goto L_NextDock; + $@DockTickCount = $@DockTickCount + 1; + initnpctimer; + end; + + +L_k1city1: + enablenpc "#k1city1e"; disablenpc "#k1city2e"; disablenpc "#k1city3e"; + disablenpc "#k1city1d"; enablenpc "#k1city2d"; enablenpc "#k1city3d"; + if($@CandorCurrentDock == 1) goto L_k2city1; + if($@CandorCurrentDock == 0) goto L_k2city2; +end; + +L_k1city2: + disablenpc "#k1city1e"; enablenpc "#k1city2e"; disablenpc "#k1city3e"; + enablenpc "#k1city1d"; disablenpc "#k1city2d"; enablenpc "#k1city3d"; + if($@CandorCurrentDock == 1) goto L_k2city1; + if($@CandorCurrentDock == 0) goto L_k2city2; +end; + +L_k1city3: + disablenpc "#k1city1e"; disablenpc "#k1city2e"; enablenpc "#k1city3e"; + enablenpc "#k1city1d"; enablenpc "#k1city2d"; disablenpc "#k1city3d"; + if($@CandorCurrentDock == 1) goto L_k2city1; + if($@CandorCurrentDock == 0) goto L_k2city2; +end; + +L_k2city1: + enablenpc "#k2city1e"; disablenpc "#k2city2e"; + disablenpc "#k2city1d"; enablenpc "#k2city2d"; +end; + +L_k2city2: + disablenpc "#k2city1e"; enablenpc "#k2city2e"; + enablenpc "#k2city1d"; disablenpc "#k2city2d"; +end; +} + +function script FerryHelp { + mes "\"You wait on the dock for the ship to come in. You'll be given a chance to board the boat when it comes into port.\""; + mes "\"It lingers in port to allow you some time to board in case you are running behind.\""; + mes "\"Once on the ship, it will sail to different ports and annouce where it is docking.\""; + mes "\"There are 2 Ferrys, both ferrys are free to ride.\""; + mes "\"The Main ferry travels from Argeas, Kaizei and Tonori. It docks in the major ports Hurnscald North, Nivalis and the Tulimshar Dock.\""; + mes "\"The Candor Ferry only travels betwen Candor and the Hurnscald South Dock.\""; + mes "\"Refreshments and supplies are offered aboard both ships during the voyage.\""; + mes "\"We also have some slot machines in case you get bored.\""; + return; +} + +function script BoardFerry { + if ($@MainCurrentDock == 0 && getmapname() == "008-1") goto L_Board; + else if ($@MainCurrentDock == 1 && getmapname() == "031-1") goto L_Board; + else if ($@MainCurrentDock == 2 && getmapname() == "001-1") goto L_Board; + + @NextDock = $@MainCurrentDock + 1; + if(@NextDock == getarraysize($@MainDocks$)) set @NextDock, 0; + message strcharinfo(0), + "Ferry : ##3The ferry is currently at ##B"+$@MainDocks$[$@MainCurrentDock]+"##b. " + +"It will be arriving at ##B"+$@MainDocks$[@NextDock]+"##b next."; + return; + +L_Board: + warp "035-2",32,29; + return; +} + +function script BoardCandorFerry { + if ($@CandorCurrentDock == 0 && getmapname() == "029-1") goto L_Board; + else if ($@CandorCurrentDock == 1 && getmapname() == "008-1") goto L_Board; + + @NextDock = $@CandorCurrentDock + 1; + if(@NextDock == getarraysize($@CandorDocks$)) set @NextDock, 0; + message strcharinfo(0), + "Ferry : ##3The ferry is currently at ##B"+$@CandorDocks$[$@CandorCurrentDock]+"##b. " + +"It will be arriving at ##B"+$@CandorDocks$[@NextDock]+"##b next."; + return; + +L_Board: + warp "036-2",32,29; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt deleted file mode 100644 index 4dcb4882..00000000 --- a/npc/functions/fishing.txt +++ /dev/null @@ -1,401 +0,0 @@ -// Evol functions. -// Authors: -// gumi -// omatt -// Travolta -// Reid -// Jesusalva -// Description: -// Fishing functions. -// Variable -// .dir -// DOWN Never try or pulled too late -// UP Bait dropped -// LEFT Fish bite bait -// -// player log on .dir is DOWN, start by choose bait menu -// player chooses bait, script addtimer in npc .dir is UP -// if player pulls before signal npc, bait is lost, set .bait to DOWN goto choose bait -// if player pulls after pull delay max, bait is lost, set .bait to DOWN goto choose bait -// npc signal .dir is LEFT -// player pulls between npc signal and pulls delay max, got the fish, set .dir to DOWN goto choose bait - -function script fishing_cleanup { - .@npc$ = getarg(0, ""); - if (.@npc$ == "") end; - - set getvariableofnpc(.char_id, .@npc$), 0; // clean acc id - set getvariableofnpc(.account_id, .@npc$), 0; // clean char id - set getvariableofnpc(.last_used, .@npc$), gettimetick(2); // set last used time - setnpcdir .@npc$, DOWN; // reset direction - return; -} - -- script global fishing handler 32767,{ - end; - -OnBite: - if (getnpcdir(@fishing_spot$) != UP) - end; - - setnpcdir @fishing_spot$, LEFT; - @fishing_tick = gettimetick(0); - specialeffect(getvariableofnpc(.bite_fx, @fishing_spot$), SELF, playerattached()); - end; - -OnCleanUp: - dispbottom l("You waited too long and lost the bait..."); - specialeffect(getvariableofnpc(.failure_fx, @fishing_spot$), SELF, playerattached()); // event fail - fishing_cleanup(@fishing_spot$); - @fishing_spot$ = ""; // unbind fishing npc - end; -} - -function script fishing { - -/////////////////////////////////////////// -// Var initialization - - .@npc$ = strnpcinfo(0); // the full name of the fishing spot - - .@account_id = getvariableofnpc(.account_id, .@npc$); // the account id of the player using the fishing spot - .@char_id = getvariableofnpc(.char_id, .@npc$); // the char id of the player using the fishing spot - .@dir = getnpcdir(.@npc$); // direction of the fishing spot - .@last_used = getvariableofnpc(.last_used, .@npc$); // when this fishing spot was last used - .@baits = getvariableofnpc(.baits, .@npc$); // bait count - - .@rod = getvariableofnpc(.fishing_rod, .@npc$); // the fishing rod required for this spot - .@rod = (.@rod ? .@rod : FishingRod); - - .@regen_time = getvariableofnpc(.cooldown, .@npc$); // cooldown for the fishing spot - .@regen_time = (.@regen_time ? .@regen_time : 20); - - .@success_fx = getvariableofnpc(.success_fx, .@npc$); // effect to show on success - .@success_fx = (.@success_fx ? .@success_fx : 27); - - .@failure_fx = getvariableofnpc(.failure_fx, .@npc$); // effect to show on failure - if (.@failure_fx < 1) - { - .@failure_fx = 28; - set getvariableofnpc(.failure_fx, .@npc$), .@failure_fx; // needed by global handler - } - - .@initial_fx = getvariableofnpc(.initial_fx, .@npc$); // effect to show when throwing the bait - .@initial_fx = (.@initial_fx ? .@initial_fx : 29); - - .@bite_fx = getvariableofnpc(.bite_fx, .@npc$); // effect to show when something bites - if (.@bite_fx < 1) - { - .@bite_fx = 30; - set getvariableofnpc(.bite_fx, .@npc$), .@bite_fx; // needed by global handler - } - - .@wait_time_min = getvariableofnpc(.wait_time_min, .@npc$); // min amount of time to wait for the line to sink - .@wait_time_min = (.@wait_time_min ? .@wait_time_min : 4000); - - .@wait_time_max = getvariableofnpc(.wait_time_max, .@npc$); // max amount of time to wait for the line to sink - .@wait_time_max = (.@wait_time_max ? .@wait_time_max : 18000); - - .@catch_time = getvariableofnpc(.catch_time, .@npc$); // the player must catch the fish within X ms after the line sinks - .@catch_time = (.@catch_time ? .@catch_time : 5000); - - .@pull_rand_max = getvariableofnpc(.pull_rand_max, .@npc$); - .@pull_rand_max = (.@pull_rand_max ? .@pull_rand_max : 800); - - - if (getvariableofnpc(.bait_ids[1], .@npc$) < 1) - { - // default baits (bait, chance booster) - // TODO: we should have some fish prefer certain baits while other - // prefer other bait. currently all fish prefer the same baits - setarray getvariableofnpc(.bait_ids[1], .@npc$), - SmallTentacles, 0, - Bread, 0, - Aquada, 1, - UrchinMeat, 0, - TortugaTongue, 2, - Tentacles, 0; - } - - if (getvariableofnpc(.fish_ids[1], .@npc$) < 1) - { - // default fish: - setarray getvariableofnpc(.fish_ids[1], .@npc$), - CommonCarp, 25, - GrassCarp, 1; - } - - if (.@baits < 1) - { - // only count it once - .@baits = getarraysize(getvariableofnpc(.bait_ids[0], .@npc$)); - set getvariableofnpc(.baits, .@npc$), .@baits; - } - - -/////////////////////////////////////////// -// Logic below - - if (countitem(.@rod) < 1) - { - dispbottom l("You don't have any @@.", getitemlink(.@rod)); - return -1; - } - - if (.@account_id > 0 && !isloggedin(.@account_id, .@char_id)) - { - fishing_cleanup .@npc$; // reset - .@dir = DOWN; - } - - if (.@char_id != getcharid(CHAR_ID_CHAR) && .@dir != DOWN) - { - dispbottom l("This fishing spot is already being used!"); - return -2; - } - - - // pull too soon - if (.@dir == UP) - { - deltimer "global fishing handler::OnCleanUp"; // cancel auto cleanup - deltimer "global fishing handler::OnBite"; - specialeffect(.@failure_fx, SELF, playerattached()); // event fail - fishing_cleanup .@npc$; // do it manually instead - dispbottom l("You pulled too soon and lost the bait."); - return -3; - } - - // pull maybe on time - else if (.@dir == LEFT) - { - deltimer "global fishing handler::OnCleanUp"; // cancel auto cleanup - fishing_cleanup .@npc$; // do it manually instead - - getmapxy .@mapbis$, .@xbis, .@ybis, UNITTYPE_PC; // get current char location - - // Leave spot, lost the bait - if (.@mapbis$ != @fishing_loc$[0] || .@xbis != @fishing_loc[0] || .@ybis != @fishing_loc[1] || @fishing_spot$ != .@npc$) - { - dispbottom l("You left your fishing spot!"); - return -4; - } - - .@fish_id = relative_array_random(getvariableofnpc(.fish_ids[0], .@npc$)); - - // RNG to obtain a fish - if (rand(gettimetick(0) - @fishing_tick) <= .@pull_rand_max + (100 * @FISHING_BOOSTER[getnpcid()])) - { - specialeffect(.@success_fx, SELF, playerattached()); // event success - - if(!checkweight(.@fish_id, 1)) - { - dispbottom l("You caught a @@ but had no room in your inventory to carry it.", getitemlink(.@fish_id)); - makeitem .@fish_id, 1, .@mapbis$, .@xbis, .@ybis; // drop on the ground - return 0; - } - - //dispbottom l("You caught a @@!", getitemlink(.@fish_id)); <= already shows "you picked up [...]" - getitem .@fish_id, 1; - } - else - { - dispbottom l("You pulled too late and lost the bait..."); - specialeffect(.@failure_fx, SELF, playerattached()); // event fail - .@fish_id = 0; - } - - return .@fish_id; - } - - - - if (gettimetick(2) - .@last_used < .@regen_time) - { - dispbottom l("This fishing spot has just been used, give it a rest."); - return -5; - } - - - // begin fishing - narrator S_LAST_NEXT, - l("You see some fish reflecting the sun on the surface of the water."), - l("What will be the bait for the fish?"); - - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - - .@bait = requestitem(); - .@bait_c = false; - - if (.@bait < 1) - { - narrator S_FIRST_BLANK_LINE, - l("You take your fishing rod and leave."); - - return -6; - } - - if (countitem(.@bait) < 1) - { - return -6; - } - - for (.@i = 1; .@i < .@baits; .@i += 2) - { - if (getvariableofnpc(.bait_ids[.@i], .@npc$) == .@bait) - { - .@bait_c = true; - @FISHING_BOOSTER[getnpcid()] = getvariableofnpc(.bait_ids[.@i + 1], .@npc$); - break; - } - } - - if (.@bait_c != true) - { - narrator S_FIRST_BLANK_LINE, - l("This item cannot be used as bait here."); - - return -6; - } - - if (getvariableofnpc(.char_id, .@npc$) > 0) - { - narrator S_FIRST_BLANK_LINE, - l("Somebody took your place on this spot!"), - l("You take your fishing rod and leave."); - return -8; - } - - @fishing_spot$ = .@npc$; // bind player to fishing spot - set getvariableofnpc(.account_id, .@npc$), getcharid(CHAR_ID_ACCOUNT); // record account id - set getvariableofnpc(.char_id, .@npc$), getcharid(CHAR_ID_CHAR); // record char id - set getvariableofnpc(.last_used, .@npc$), gettimetick(2); - getmapxy(@fishing_loc$[0], @fishing_loc[0], @fishing_loc[1], 0); // record char pos - delitem .@bait, 1; - - // The player uses this spot, his bait is ready, he just has to wait for the signal. - closeclientdialog; - - specialeffect(.@initial_fx, SELF); // throw the bait - sleep2 800; // wait 0.8s for synchronize the sound of "plop" in water with the npc dir UP. - setnpcdir .@npc$, UP; - - dispbottom l("Wait for the bait to sink underwater."); - - .@delay = rand(.@wait_time_min, .@wait_time_max); - - addtimer .@delay, "global fishing handler::OnBite"; // bite logic - addtimer (.@delay + .@catch_time), "global fishing handler::OnCleanUp"; // auto clean up - - return 0; -} - - -//////////////////// -// Fishing Templates - -// #fish_basic - has only carps (freshwater) -- script #fish_basic NPC_WATER_SPLASH,{ - - fishing(); // begin or continue fishing - close; - -OnInit: - .distance = 5; - setarray .fish_ids, 0, - CommonCarp, 25, - GrassCarp, 1; - .fishing_rod = FishingRod; // Equipment to fish here - .catch_time = 5000; // must catch the fish within X ms after the line sinks - .wait_time_min = 4000; // min amount of time to wait for the line to sink - .wait_time_max = 18000; // max amount of time to wait for the line to sink - end; -} - - -// #fish_seawater - has only tuna -- script #fish_seawater NPC_WATER_SPLASH,{ - - fishing(); // begin or continue fishing - close; - -OnInit: - .distance = 5; - setarray .fish_ids, 0, - Tuna, 15, - Salmon, 1; - .fishing_rod = FishingRod; // Equipment to fish here - .catch_time = 4000; // must catch the fish within X ms after the line sinks - .wait_time_min = 8000; // min amount of time to wait for the line to sink - .wait_time_max = 18000; // max amount of time to wait for the line to sink - end; -} - - - -// #fish_river - A balanced fishing spot for Woodlands (Trout) -- script #fish_river NPC_WATER_SPLASH,{ - - fishing(); // begin or continue fishing - close; - -OnInit: - .distance = 5; - setarray .fish_ids, 0, - CommonCarp, 25, - Trout, 20, - GrassCarp, 5, - Salmon, 1; - .fishing_rod = FishingRod; // Equipment to fish here - .catch_time = 5500; // must catch the fish within X ms after the line sinks - .wait_time_min = 5000; // min amount of time to wait for the line to sink - .wait_time_max = 16000; // max amount of time to wait for the line to sink - end; -} - - - - -// #fish_river2 - A balanced fishing spot for Candor (Salmon) -- script #fish_river2 NPC_WATER_SPLASH,{ - - fishing(); // begin or continue fishing - close; - -OnInit: - .distance = 5; - setarray .fish_ids, 0, - CommonCarp, 25, - Salmon, 20, - GrassCarp, 5, - Trout, 1; - .fishing_rod = FishingRod; // Equipment to fish here - .catch_time = 5500; // must catch the fish within X ms after the line sinks - .wait_time_min = 5000; // min amount of time to wait for the line to sink - .wait_time_max = 16000; // max amount of time to wait for the line to sink - end; -} - - - - -// #fish_frozen - A fishing spot with cold waters (for Nivalis) -- script #fish_frozen NPC_WATER_SPLASH,{ - - fishing(); // begin or continue fishing - close; - -OnInit: - .distance = 5; - setarray .fish_ids, 0, - CommonCarp, 25, - Codfish, 20, - GrassCarp, 5, - Salmon, 1; - .fishing_rod = FishingRod; // Equipment to fish here - .catch_time = 5500; // must catch the fish within X ms after the line sinks - .wait_time_min = 5000; // min amount of time to wait for the line to sink - .wait_time_max = 16000; // max amount of time to wait for the line to sink - end; -} - diff --git a/npc/functions/game-rules.txt b/npc/functions/game-rules.txt deleted file mode 100644 index 053bec03..00000000 --- a/npc/functions/game-rules.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol scripts. -// Authors: -// The Mana World Team -// Co-Authors: -// gumi -// Qwerty Dragon -// Reid -// WildX -// Description: -// 7 main rules of The Mana World - -function script GameRules { - narrator getarg(0, 0), - l("1. ##BDo not AFK bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."), - l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."), - l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."), - l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."), - l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."), - l("6. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time."), - l("7. ##BFollow the [@@https://policies.themanaworld.org/tsc|TMW Social Convention@@]##b (TSC)."), - l("In the event that the rules diverge from [@@https://policies.themanaworld.org/game-rules|policies.themanaworld.org@@], the later version takes priority."); - if (SERVER_USES_VAULT) { - mesc l("Note: You are NOT allowed to have multiple Vault accounts."); - if (getarg(0, 0) & S_LAST_NEXT) - next; - } - return; -} - - -- script @rules 32767,{ - end; - - function read_book { - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("This book outlines the laws of every city and holding in Gasaron."), - l("The first page contains the universal rules that have been agreed upon throughout the land."); - - GameRules S_NO_NPC_NAME | S_LAST_NEXT; - - narrator S_NO_NPC_NAME, - l("The next page begins to list the complex trading laws of the City of Esperia"), - l("All this seems unimportant to you right now."); - close; - } - -OnCall: - GameRules; - close; - -OnUseBook: - if (openbook()) - read_book; - closeclientdialog(); - close; - -OnShelfUse: - if (openbookshelf()) - read_book; - closeclientdialog(); - close; - -OnInit: - .book_name$ = "The Book of Laws"; - bindatcmd "rules", "@rules::OnCall", 0, 2, 0; -} diff --git a/npc/functions/game_rules.txt b/npc/functions/game_rules.txt new file mode 100755 index 00000000..25cc3fd1 --- /dev/null +++ b/npc/functions/game_rules.txt @@ -0,0 +1,22 @@ + +function script GameRules { + mes "##BPlease click submit."; + clear; + title "Game Rules"; + mes l("Players breaking the following rules may be banned for any length of time (even permanently) or have their characters reset at a GM's discretion:"); + mes l("1) Do not abuse other players. Insults, swearing, and the like are not to be directed towards a particular person or group."); + mes l("2) No bots – including ##Bany##b AFK activity or automated actions of any sort."); + mes l("3) No spamming or flooding (including messages, whispers, and trade requests)."); + mes l("4) No begging."); + mes l("5) Speak ##Bonly##b English in the public chat."); + mes l("6) Treat others how you would like to be treated."); + mes l("AFK botting will be determined by talking to players who are moving and/or attacking."); + mes l("Automated following will be determined by observation."); + + if (TUT_var == 0) + TUT_var = gettimetick(2); + goto L_Return; + +L_Return: + return; +} diff --git a/npc/functions/generic-text.txt b/npc/functions/generic-text.txt deleted file mode 100644 index ede6e954..00000000 --- a/npc/functions/generic-text.txt +++ /dev/null @@ -1,120 +0,0 @@ -// Evol functions. -// Authors: -// gumi -// Description: -// text register - -function script generic { - .@flags = getarg(0, 1); - - .@villager = (1 << 0); - .@old = (1 << 1); - .@kid = (1 << 2); - .@sailor = (1 << 3); - .@busy = (1 << 4); - .@tired = (1 << 5); - .@angry = (1 << 6); - .@legion = (1 << 7); - .@crazy = (1 << 8); - - if (.@flags == 0) - return l("I'm sorry, I can't talk right now."); - - if (.@flags & .@villager) - { - setarray(.@array$[.@count], - l("It is a sunny day, don't you think?"), - l("I just want to live my life in peace."), - l("Isn't this place pretty? I love hanging out here!")); - - .@count += 3; - } - - if (.@flags & .@old) - { - setarray(.@array$[.@count], - l("Come closer dear, I can't hear you."), - l("Hmm... where did I put it again?"), - l("I miss the good old days.")); - - .@count += 3; - } - - if (.@flags & .@kid) - { - setarray(.@array$[.@count], - l("Mommy doesn't want me to talk to strangers.")); - - .@count += 1; - } - - if (.@flags & .@sailor) - { - setarray(.@array$[.@count], - l("So finally someone has came to visit me?"), - l("A-hoy matey!")); - - .@count += 2; - } - - if (.@flags & .@busy) - { - setarray(.@array$[.@count], - l("Can't talk right now."), - l("Can't you see I'm busy?"), - l("Come back later."), - l("I'm a little busy right now.")); - - .@count += 4; - } - - if (.@flags & .@tired) - { - setarray(.@array$[.@count], - l("I had a long day, come back tomorrow."), - l("I need to rest."), - l("*snores*")); - - .@count += 3; - } - - if (.@flags & .@angry) - { - setarray(.@array$[.@count], - l("Go pester someone else."), - l("I don't feel like talking to you."), - l("Stop wasting my time."), - l("Go fly a kite"), - l("Not in the mood to chat."), - l("Give me some space."), - l("Can you please go away?")); - - .@count += 7; - } - - if (.@flags & .@legion) - { - setarray(.@array$[.@count], - l("My breath smells bad."), - l("Don't distract me, I have to stay alert."), - l("Can't talk right now, I'm on patrol duty."), - l("I can't stay here and talk all day. I have a job to do."), - l("Keep moving."), - l("So you think you're tough? A warrior must also be loyal and patient."), - l("Practice! There are no secrets to becoming a warrior."), - l("There is no honor in fighting a weak opponent.")); - - .@count += 8; - } - - if (.@flags & .@crazy) - { - setarray(.@array$[.@count], - l("Do I look like a tree? I feel like one."), - l("What're you looking at?!")); - - .@count += 2; - } - - return .@array$[rand(.@count)]; -} diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt old mode 100644 new mode 100755 index 3f10ae73..460694f3 --- a/npc/functions/global_event_handler.txt +++ b/npc/functions/global_event_handler.txt @@ -1,73 +1,38 @@ -// The Mana World scripts. -// Author: -// The Mana World Team -// Description: -// Controls most, if not all, global events on this server. -// Please only use callfunc("") here; This script is loaded -// early on and direct function assignment will cause fails. -// TODO: Move "new quest" notification here. (Or deprecate) -// Helper function for scripted Monster Kills. -function script fix_mobkill { - killedrid=getarg(0); - doevent "#GlobalHandler::OnNPCKillEvent"; - return; -} - -- script #GlobalHandler NPC_HIDDEN,{ +- script #GlobalHandler NPC32767,{ end; - OnPCLoginEvent: - callfunc("updateSpotlight"); - callfunc("ReceiveMOTD"); - callfunc("ReceiveScheduledBroadcast"); - callfunc("FixBankVault"); - callfunc("GrantSuperSkill"); - callfunc("AFKLogin"); - callfunc("TravelFix"); - end; - -OnPCLogoutEvent: - callfunc("UnequipCookie"); - callfunc("MundaneLogout"); - callfunc("fishing_cleanup", @fishing_spot$); - callfunc("ATLFightEnd"); - callfunc("RossyLogout"); - - // Variable cleanup - @fishing_spot$ = ""; - end; - -OnPCDieEvent: - callfunc("ForcedUnmount"); - callfunc("MundaneDeath"); - callfunc("ATLFightEnd"); - callfunc("RossyDeath"); + debugmes "PCLOGIN"; + @login_event = 1; + //callfunc "fixHeadStyles"; // convert headstyles + //callfunc "ClearVariables"; // removes / converts old variables + callfunc "DisplayMOTD"; // send the motd to the client, if enabled + //callfunc "getBroadcast"; // get the scheduled broadcast, if any + //addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse + // add more here + @login_event = 2; + debugmes "PCLOGIN OK"; end; -OnPCBaseLvUpEvent: - //callfunc("newquestwarning"); - callfunc("ReferralSendLvReward"); +OnPCKillEvent: + callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things end; -OnNPCKillEvent: - $MONSTERS_KILLED+=1; - MONSTERS_KILLED+=1; - callfunc("EnoraKills"); - callfunc("refineupdate"); - if ($MONSTERS_KILLED % 1000000 == 0) - callfunc("GetBeanieCopter"); +OnMobKillEvent: + callfunc "MobPoints"; end; -OnPCKillEvent: - $PLAYERS_KILLED+=1; - PLAYERS_KILLED+=1; +OnPCDieEvent: + callfunc "fightclub_GoBack"; // this used by the battle master + //callfunc "fightclub_event_die"; // this is used by the 1v1 arena + @necromancer = 0; + //addtimer 0, "Magic Timer::OnClear"; // reset magic block on death + set @killerrid, 0; // reset killer rid end; -OnSkillInvoke: - callfunc("SkillInvoked"); +OnInit: + callfunc "ClearGlobalVars"; + callfunc "MOTD"; // set the MOTD array end; - } - diff --git a/npc/functions/gm_island.txt b/npc/functions/gm_island.txt new file mode 100755 index 00000000..82fc0210 --- /dev/null +++ b/npc/functions/gm_island.txt @@ -0,0 +1,71 @@ +- script #GmConfig NPC32767,{ + end; + +OnInit: + disablenpc "Gm Event#1"; + disablenpc "Gm Event#2"; + disablenpc "Gm Event#3"; + end; +} +function script GmWarp { + warp "028-1", 110, 30; + return; +} +function script GmDebug { + mes "[GM Debug]"; + mes "What do you want to do?"; + menu + "Open Event Portals.", L_GmStart, + "Close Event Portals.", L_GmStop, + "Disguise.", L_Disguise; + +L_GmStart: + enablenpc "Gm Event#1"; + enablenpc "Gm Event#2"; + enablenpc "Gm Event#3"; + return; + +L_GmStop: + disablenpc "Gm Event#1"; + disablenpc "Gm Event#2"; + disablenpc "Gm Event#3"; + return; + +L_Disguise: + npcaction 9; + mes "[GM Debug - Disguise]"; + mes "The Disguise function allows GMs to disguise themselves as mobs or npcs."; + mes "---"; + mes "Mob IDs: [@@https://www.themanaworld.org/index.php/Monster_Reference|Monster Reference@@]"; + mes "You can either logout or use id ##B0##b to reset."; + mes "---"; + mes "Please input the mob ID:"; + input @disguise_id; + if (@disguise_id < 1000 || @disguise_id > 32767) + goto L_ResetClass; + mes "Your disguise has been changed."; + if (Class <= 5) + @old_class = Class; + Class = @disguise_id; + mes ""; + mes "For technical reasons, you are not able to see your own disguise, but other players will see it."; + return; + +L_ResetClass: + mes "Your appearance has been reset."; + Class = if_then_else(@old_class, @old_class, 1); + callfunc "fixHeadStyles"; + return; +} +001-1,49,68,0 script Gm Event#1 NPC368,0,0,{ + callfunc "GmWarp"; + end; +} +009-1,46,30,0 script Gm Event#2 NPC368,0,0,{ + callfunc "GmWarp"; + end; +} +020-1,67,89,0 script Gm Event#3 NPC368,0,0,{ + callfunc "GmWarp"; + end; +} diff --git a/npc/functions/goodbye.txt b/npc/functions/goodbye.txt deleted file mode 100644 index 6c8879c5..00000000 --- a/npc/functions/goodbye.txt +++ /dev/null @@ -1,28 +0,0 @@ -// Evol functions. -// Authors: -// Reid - - -// goodbye -// displays a canned message and quits - -function script goodbye { - setarray(.@byemsg$[0], - l("See you!"), - l("See you later!"), - l("See you soon!"), - l("Bye!"), - l("Farewell."), - l("Bye then!"), - l("Goodbye."), - l("Bye for now."), - l("Talk to you soon!"), - l("Talk to you later!"), - l("Have a good day!"), - l("Cheers!"), - l("Take care!")); - - closeclientdialog(); - npctalkonce(.@byemsg$[rand(getarraysize(.@byemsg$))]); - close; -} diff --git a/npc/functions/hammocks.txt b/npc/functions/hammocks.txt deleted file mode 100644 index 8e1c2fec..00000000 --- a/npc/functions/hammocks.txt +++ /dev/null @@ -1,50 +0,0 @@ -// Evol functions. -// Authors: -// 4144 -// Reid -// Description: -// Hammocks utility functions -// Variables: -// none - -function script hamTouchLeft { - if (getareausers() <= 1) - { - .dir = 0; - stopnpctimer; - initnpctimer; - } - close; -} - -function script hamUnTouch { - if (getareausers() == 0) - { - .dir = 2; - initnpctimer; - startnpctimer; - } - close; -} - -function script hamTimerLeft { - stopnpctimer; - if (.dir == 2) .dir = 0; - end; -} - -function script hamTouchRight { - if (getareausers() <= 1) - { - .dir = 0; - stopnpctimer; - initnpctimer; - } - close; -} - -function script hamTimerRight { - stopnpctimer; - if (.dir == 2) .dir = 0; - end; -} diff --git a/npc/functions/harbours.txt b/npc/functions/harbours.txt deleted file mode 100644 index 63d58076..00000000 --- a/npc/functions/harbours.txt +++ /dev/null @@ -1,39 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Harbour utility functions -// Animation: -// Length: 1680 -// Values: -// 2 Hook moving down. -// 4 Hook moving up. -// 6 Hook down. -// 8 Hook up. - -function script harbourClic { - if (.dir == 0) - { - .dir = 2; - - initnpctimer; - startnpctimer; - close; - } - - if (.dir == 6) - { - .dir = 4; - - initnpctimer; - startnpctimer; - close; - } -} - -function script harbourTimer { - stopnpctimer; - if (.dir == 2) .dir = 6; - if (.dir == 4) .dir = 0; - end; -} diff --git a/npc/functions/headstyles.txt b/npc/functions/headstyles.txt new file mode 100755 index 00000000..91395fd1 --- /dev/null +++ b/npc/functions/headstyles.txt @@ -0,0 +1,97 @@ + +function script fixHeadStyles { + callfunc "getHeadStyles"; + if (!HELLOWORLD) + goto L_RandomHair; + set @style, getlook(LOOK_HAIR); // FIXME: this needs to be a param in the future + set @color, getlook(LOOK_HAIR_COLOR); // FIXME: this needs to be a param in the future + debugmes "Login OK"; + return; + if (@color >= 123 && @color <= HC_WHITE) // convert shock white + @color = (HC_WHITE - Class) + 1; + if (@color < 105 && ((@color - (15 * (Class - 1))) < 0 || @color > ((15 * (Class - 1)) + (getarraysize(@HairColors$) - 1)))) + set @color, 15 * (Class - 1); // it is possible to style color 0 but not style 0 since style is treated as an item + setlook LOOK_HAIR_COLOR, @color; // FIXME: this needs to be a param in the future + return; + +L_RandomHair: + HELLOWORLD=true; + //resetstatus; // <= important! gives 48 stat points + debugmes "Set random look...."; + setlook LOOK_HAIR, rand(1, getarraysize(@HairStyles$)); + setlook LOOK_HAIR_COLOR, rand(15); + return; +} + +function script getHeadStyles { + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + + if (Class == 2) goto L_Tritan; + else if (Class == 3) goto L_Ifriton; + else if (Class == 4) goto L_Gispaan; + else if (Class == 5) goto L_Sparron; + else set Class, 1; // we can not style custom classes, so reset when using the barber + goto L_Talpan; + +L_Talpan: + setarray @HairStyles$[0], + "Bald", "Flat ponytail", "Bowl cut", "Combed back", "Emo", "Mohawk", + "Pompadour", "Center parting/Short and slick", "Long and slick", + "Short and curly", "Pigtails", "Long and curly", "Parted", + "Perky ponytail", "Wave", "Mane", "Bun", "Shoulder Length Flick", + "Fizzy", "Long and Clipped"; + setarray @HairColors$[0], + "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", + "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", + "Brown";//, "(free slot)", "(free slot)"; + return; + +L_Tritan: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Gispaan: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Sparron: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; + +L_Ifriton: + setarray @HairStyles$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20"; + setarray @HairColors$[0], + "1", "2", "3", "4", "5", + "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15"; + return; +} diff --git a/npc/functions/hello.txt b/npc/functions/hello.txt deleted file mode 100644 index 9399b3b5..00000000 --- a/npc/functions/hello.txt +++ /dev/null @@ -1,23 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Tell a random greeting sentence. - -function script hello { - - switch (rand(3)) - { - case 0: - npctalkonce(l("Heya!")); - break; - case 1: - npctalkonce(l("Hi.")); - break; - case 2: - npctalkonce(l("Nice day to you.")); - break; - } - - return; -} diff --git a/npc/functions/inn.txt b/npc/functions/inn.txt new file mode 100755 index 00000000..50f1afd6 --- /dev/null +++ b/npc/functions/inn.txt @@ -0,0 +1,34 @@ + +function script Inn { + if(@npcname$ == "") set @npcname$, strnpcinfo(1); + mes "[" + @npcname$ + "]"; + mes "\"Would you like to rest? It's only " + @Cost + " gp.\""; + next; + menu + "Yes", L_Next, + "No", L_close; + +L_Next: + if (Zeny < @Cost) + goto L_NoMoney; + Zeny = Zeny - @Cost; + heal 10000, 10000; + + mes "[" + @npcname$ + "]"; + mes "\"Sleep well!\""; + next; + goto L_close; + +L_close: + mes "[" + @npcname$ + "]"; + mes "\"See you.\""; + @npcname$ = ""; + close2; + return; + +L_NoMoney: + mes "[" + @npcname$ + "]"; + mes "\"You don't have enough money to stay here.\""; + next; + goto L_close; +} diff --git a/npc/functions/input.txt b/npc/functions/input.txt deleted file mode 100644 index cf0382d2..00000000 --- a/npc/functions/input.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Description: -// Input utility functions -// Variables: -// none - -function script menuint { - deletearray .@vals; - .@menustr$ = ""; - .@cnt = 0; - - for (.@f = 0; .@f < getargcount(); .@f = .@f + 2) - { - if (getarg(.@f) != "") - { - .@menustr$ = .@menustr$ + getarg(.@f) + ":"; - .@vals[.@cnt] = getarg(.@f + 1); - .@cnt ++; - } - } - - .@vals[.@cnt] = -1; - @menu = 255; - @menuret = -1; - select(.@menustr$); - if (@menu == 255) - return -1; - - @menu --; - if (@menu < 0 || @menu >= getarraysize(.@vals) - 1) - return -1; - - @menuret = .@vals[@menu]; - return @menuret; -} - -function script menustr { - deletearray .@vals$; - .@menustr$ = ""; - .@cnt = 0; - - for (.@f = 0; .@f < getargcount(); .@f = .@f + 2) - { - if (getarg(.@f) != "") - { - .@menustr$ = .@menustr$ + getarg(.@f) + ":"; - .@vals$[.@cnt] = getarg(.@f + 1); - .@cnt ++; - } - } - - @menu = 255; - @menuret = -1; - select(.@menustr$); - if (@menu == 255) - return ""; - - @menu --; - if (@menu < 0 || @menu >= getarraysize(.@vals$)) - return ""; - - @menuret$ = .@vals$[@menu]; - return @menuret$; -} diff --git a/npc/functions/inventoryplace.txt b/npc/functions/inventoryplace.txt deleted file mode 100644 index c7eff88b..00000000 --- a/npc/functions/inventoryplace.txt +++ /dev/null @@ -1,37 +0,0 @@ -// Evol functions. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Check if the player have enough place on his inventory to accept new items with arguments: -// getarg(even numbers) item ID, -// getarg(odd numbers) number of items, - -function script inventoryplace { - - .@argc = getargcount(); - - if (.@argc % 2 != 0) - { - consolemes(CONSOLEMES_ERROR, "inventoryplace: Wrong argument count."); - close; - } - - for (.@i = .@j = 0; .@i < .@argc; .@i += 2) - { - setarray .@item[.@j], getarg(.@i); - setarray .@amount[.@j], getarg(.@i + 1); - ++.@j; - } - - if (!checkweight2(.@item, .@amount)) - { - narrator S_FIRST_BLANK_LINE, - l("It looks like you can't carry anything else for now."), - l("You should come back when you have some free space."); - - close; - } - - return true; -} diff --git a/npc/functions/jesusalvatr.txt b/npc/functions/jesusalvatr.txt new file mode 100755 index 00000000..710f0559 --- /dev/null +++ b/npc/functions/jesusalvatr.txt @@ -0,0 +1,43 @@ +002-5,28,27,0 script #teleporterNavio NPC32767,117,29,{ + end; + +OnEvent: + if (PC_DEST == 1) goto L_Destino1; + if (PC_DEST == 2) goto L_Destino2; + if (PC_DEST == 3) goto L_Destino3; + end; + +L_Destino1: + message strcharinfo(0), "" + strcharinfo(0) + " desembarcou na Ilha de Bhramir."; + warp "007", 21, 94; + PC_DEST = 0; + @timer_navio_running = 0; + end; + +L_Destino2: + message strcharinfo(0), "" + strcharinfo(0) + " desembarcou no Polo Norte."; + warp "010", 178, 67; + PC_DEST = 0; + @timer_navio_running = 0; + end; + +L_Destino3: + message strcharinfo(0), "" + strcharinfo(0) + " desembarcou nas Terras Desconhecidas."; + warp "org016", 51, 102; + PC_DEST = 0; + @timer_navio_running = 0; + end; +} + +002-5,79,23,0 script Capitão Mirc NPC303,{ + set @porto, 0; // Em alto mar + callfunc "CapitaoMirc"; + close2; + if (PC_DEST != 0 && @timer_navio_running == 0) goto L_Timer; + end; + +L_Timer: + addtimer 42000, "#teleporterNavio::OnEvent"; + @timer_navio_running = 1; + end; +} diff --git a/npc/functions/legacy.txt b/npc/functions/legacy.txt deleted file mode 100644 index 5f5ad026..00000000 --- a/npc/functions/legacy.txt +++ /dev/null @@ -1,238 +0,0 @@ -// NOTE: no script other than the functions in this file should EVER access -// ##LEGACY[] or LEGACY[] - -/** - * gets the timestamp of when the attached or provided account was ported from - * the Legacy snapshot through Vault - * - * Example: - * getlegacyporttime(); - * - * @param 0? - char name / account id (defaults to attached player) - * @return timestamp (seconds) - */ -function script getlegacyporttime { - // we dereference the variable (+ 0) to avoid accidental assignment - return 0+ getvariableofpc(##LEGACY[1], nameid2id(getarg(0, "")), 0); -} - -/** - * gets the former account id that was assigned to the attached or provided - * account on the Legacy server - * - * Example: - * getlegacyaccountid(); - * - * @param 0? - char name / account id (defaults to attached player) - * @return former account id - */ -function script getlegacyaccountid { - // we dereference the variable (+ 0) to avoid accidental assignment - return 0+ getvariableofpc(##LEGACY[0], nameid2id(getarg(0, "")), 0); -} - -/** - * checks whether the attached or provided account is a former Legacy account - * - * Example: - * islegacyaccount() - * - * @param 0? - char name / account id (defaults to attached player) - * @return true/false - */ -function script islegacyaccount { - return getlegacyaccountid(getarg(0, "")) > 0; -} - -/** - * gets the former char id that was assigned to the attached or provided - * character on the Legacy server - * - * Example: - * getlegacycharid(); - * - * @param 0? - char name / account id (defaults to attached player) - * @return former char id - */ -function script getlegacycharid { - // we dereference the variable (+ 0) to avoid accidental assignment - return 0+ getvariableofpc(LEGACY[0], nameid2id(getarg(0, "")), 0); -} - -/** - * checks whether the attached or provided character is a former Legacy char - * - * Example: - * islegacychar() - * - * @param 0? - char name / account id (defaults to attached player) - * @return true/false - */ -function script islegacychar { - return getlegacycharid(getarg(0, "")) > 0; -} - -/** - * gets the timestamp of when the attached or provided account completed the - * tutorial on the Legacy server - * - * Example: - * getlegacytuttime("player name") - * - * @param 0? - char name / account id (defaults to attached player) - * @return timestamp (seconds) - */ -function script getlegacytuttime { - .@tut_var = getvariableofpc(LEGACY[2], nameid2id(getarg(0, "")), 0); - return .@tut_var < 0x7F ? 0 : .@tut_var; -} - -/** - * gets the level the attached or provided player had on the Legacy server at - * snapshot time - * - * Example: - * getlegacylevel("player name") - * - * @param 0? - char name / account id (defaults to attached player) - * @return base level - */ -function script getlegacylevel { - return bitwise_get(getvariableofpc(LEGACY[1], nameid2id(getarg(0, "")), 0), 0x000000FF, 0); -} - -/** - * gets the boss points the attached or provided player had on the Legacy server - * at snapshot time - * - * Example: - * getlegacybosspoints("player name") - * - * @param 0? - char name / account id (defaults to attached player) - * @return boss points - */ -function script getlegacybosspoints { - return bitwise_get(getvariableofpc(LEGACY[1], nameid2id(getarg(0, "")), 0), 0x7FFFFF00, 8); -} - - - -// the functions below can be used to mimic a Legacy account for local testing - - -/** - * mimics a legacy account for local testing - * - * Example: - * setfakelegacyaccount("player name"); - * - * @param 0? - char name / account id (defaults to attached player) - * @param 1? - legacy level (defaults to 99) - * @param 2? - legacy boss points (defaults to 5000) - * @return true/false - */ -function script setfakelegacyaccount { - if (!debug) { - consolemes(CONSOLEMES_ERROR, "setfakelegacyaccount() can only be used in debug mode"); - return false; - } - - .@acc = nameid2id(getarg(0, "")); - - if (.@acc < 1) { - // player not found - return false; - } - - // set the legacy account id to the current account id - set(getvariableofpc(##LEGACY[0], .@acc), .@acc); - - // set the port time to yesterday - set(getvariableofpc(##LEGACY[1], .@acc), time_from_days(-1)); - - // set the legacy tut var to 180 days ago - set(getvariableofpc(LEGACY[2], .@acc), time_from_days(-180)); - - // set the legacy level - bitwise_set(getvariableofpc(LEGACY[1], .@acc), 0x000000FF, 0, getarg(1, 99)); - - // set the legacy boss points - bitwise_set(getvariableofpc(LEGACY[1], .@acc), 0x7FFFFF00, 8, getarg(2, 5000)); - return true; -} - -/** - * gets the inventory the attached or provided char had on the Legacy server at - * snapshot time - * - * Example: - * .@size = getlegacyinventory(.@item, .@amount); - * - * @param 0 - a reference to an array variable to hold the item ids - * @param 1 - a reference to an array variable to hold the item qty - * @param 2? - char name / account id (defaults to attached player) - * @return number of entries added to the arrays - */ -function script getlegacyinventory { - .@char = getlegacycharid(getarg(2, "")); - - if (.@char < 1) { - consolemes(CONSOLEMES_ERROR, "getlegacyinventory: target legacy character not found"); - return 0; - } - - if ((getdatatype(getarg(0)) & (DATATYPE_VAR | DATATYPE_INT)) == 0) { - consolemes(CONSOLEMES_ERROR, "getlegacyinventory: first argument should be an integer array"); - return 0; - } - - if ((getdatatype(getarg(1)) & (DATATYPE_VAR | DATATYPE_INT)) == 0) { - consolemes(CONSOLEMES_ERROR, "getlegacyinventory: second argument should be an integer array"); - return 0; - } - - freeloop(true); - .@rows = query_sql(sprintf("SELECT nameid, amount FROM legacy.inventory WHERE char_id = '%d';", .@char), - getarg(0), getarg(1)); - freeloop(false); - - return .@rows; -} - -/** - * gets the storage the attached or provided account had on the Legacy server at - * snapshot time - * - * Example: - * .@size = getlegacystorage(.@item, .@amount); - * - * @param 0 - a reference to an array variable to hold the item ids - * @param 1 - a reference to an array variable to hold the item qty - * @param 2? - char name / account id (defaults to attached player) - * @return number of entries added to the arrays - */ -function script getlegacystorage { - .@acc = getlegacyaccountid(getarg(2, "")); - - if (.@acc < 1) { - consolemes(CONSOLEMES_ERROR, "getlegacystorage: target legacy account not found"); - return 0; - } - - if ((getdatatype(getarg(0)) & (DATATYPE_VAR | DATATYPE_INT)) == 0) { - consolemes(CONSOLEMES_ERROR, "getlegacystorage: first argument should be an integer array"); - return 0; - } - - if ((getdatatype(getarg(1)) & (DATATYPE_VAR | DATATYPE_INT)) == 0) { - consolemes(CONSOLEMES_ERROR, "getlegacystorage: second argument should be an integer array"); - return 0; - } - - freeloop(true); - .@rows = query_sql(sprintf("SELECT nameid, amount FROM legacy.storage WHERE account_id = '%d';", .@acc), - getarg(0), getarg(1)); - freeloop(false); - - return .@rows; -} diff --git a/npc/functions/legiontalk.txt b/npc/functions/legiontalk.txt deleted file mode 100644 index 25004c07..00000000 --- a/npc/functions/legiontalk.txt +++ /dev/null @@ -1,66 +0,0 @@ -// Evol functions. -// Authors: -// Akko Teru -// Reid -// Qwerty Dragon -// Description: -// Tell a random sentence suited to Aemil's Legion in Artis. - -function script legiontalk { - - switch (rand(15)) - { - case 0: - npctalkonce(l("Do I look like a tree? I feel like one.")); - //speech( - // l("Do you feel too weak even to do damage to this areas wishy-washy wildlife?"), - // l("Then concentrate your anger upon the trees hereabouts, you will gain experience whilst leveling your sword skill on them."), - // l("Oh, and a fruit may even fall for you if you are lucky! But stay alert to pick up your drops.")); - //close; - break; - case 1: - npctalkonce(l("I'm a little busy right now.")); - break; - case 2: - npctalkonce(l("Not in the mood to chat.")); - break; - case 3: - npctalkonce(l("My breath smells bad.")); - break; - case 4: - npctalkonce(l("Don't distract me, I have to stay alert.")); - break; - case 5: - npctalkonce(l("Give me some space.")); - break; - case 6: - npctalkonce(l("Can you please go away?")); - break; - case 7: - npctalkonce(l("Can't talk right now, I'm on patrol duty.")); - break; - case 8: - npctalkonce(l("What're you looking at?!")); - break; - case 9: - npctalkonce(l("I can't stay here and talk all day. I have a job to do.")); - break; - case 10: - npctalkonce(l("Keep moving!")); - break; - case 11: - npctalkonce(l("So you think you're tough? A warrior must also be loyal and patient.")); - break; - case 12: - emotion E_LOOKAWAY; - break; - case 13: - npctalkonce(l("Practice! There are no secrets to becoming a warrior.")); - break; - case 14: - npctalkonce(l("There is no honor in fighting a weak opponent.")); - break; - } - - return; -} diff --git a/npc/functions/libquest.txt b/npc/functions/libquest.txt deleted file mode 100644 index 4799eb1d..00000000 --- a/npc/functions/libquest.txt +++ /dev/null @@ -1,104 +0,0 @@ -// Evol scripts for simplified quest development. -// Author: -// Livio - -/* - @brief Prints the list of quest ingredients on the NPC window - @param Array with items IDs - @param Array with relative amount required - @returns nothing -*/ -function script printIngredients { - for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++) { - mesf(" - %d %s", getelementofarray(getarg(1), .@i), getitemlink(getelementofarray(getarg(0), .@i))); - } - return; -} - -/* - @brief Checks if player has items required - @param Array with required items IDs - @param Array with relative amount required - @returns false if player doesn't have required items -*/ -function script checkForItems { - for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++) { - // If even a single thing is missing abort immediately - if(getelementofarray(getarg(1), .@i) > countitem(getelementofarray(getarg(0), .@i))) { - return false; - } - } - return true; -} - -/* - @brief Craft an item from some other items. All input items got deleted. - @param Array with required items IDs - @param Array with relative amount required - @param output item IDs - @param output amount - @returns 0 if successful, 1 if player lack ingredients, 2 if overburdened, 255 code error -*/ -function script craftFromPlayer { - // Check input parameter amount - if (getargcount() != 4) return 255; - - // Check item amounts - if (!checkForItems(getarg(0), getarg(1))) return 1; - - // Check if player is able to carry output from crafting - if (!checkweight(getarg(2), getarg(3))) return 2; - else getitem(getarg(2), getarg(3)); - - // Delete Items from player inventory - for (.@i = getarrayindex(getarg(0)); .@i < getarraysize(getarg(0)); .@i++) { - delitem(getelementofarray(getarg(0), .@i), getelementofarray(getarg(1), .@i)); - } - - return 0; -} - -/* - @brief Craft an item from some other items. All input items will be deleted in case of success. - @param Array with required items IDs - @param Array with relative amount required - @param output item IDs - @param output amount - @param NPC question about ingredients - @param NPC answer if successful - @param NPC answer if player lacks ingredients - @param NPC answer if player is overburdened - @returns true if successful -*/ -function script NPCcrafting { - speech - getarg(4); - if (askyesno() == ASK_NO) { - mesq l("Come on, move!"); - close; - } else { - switch(craftFromPlayer(getarg(0), getarg(1), getarg(2), getarg(3))) { - case 0: - mesq getarg(5); - return true; - break; - - case 1: - mesq getarg(6); - // FIXME - Gather proper variables - printIngredients(getarg(0), getarg(1)); - break; - - case 2: - mesq getarg(7); - break; - - case 255: - mesq l("[BUG ENCOUNTERED] Dammit..."); - break; - - default: - } - } - return false; -} \ No newline at end of file diff --git a/npc/functions/lockpicking.txt b/npc/functions/lockpicking.txt new file mode 100755 index 00000000..da2da5dd --- /dev/null +++ b/npc/functions/lockpicking.txt @@ -0,0 +1,87 @@ + +function script LockPicking { + @lock_picking_success = 0; + setarray @pins, rand(1,3), rand(1,3), rand(1,3); + goto L_StartLockPicking; + +L_NeedLockPickSet: + menu + "Unfortunately, I don't have these tools... Let's look around.", L_Return; + +L_StartLockPicking: + mes "You inspect the lock and notice it isn't sophisticated."; + mes "With regular stuff, you should be able to lock pick it."; + next; + if (countitem ("LockPicks") < 1) + goto L_NeedLockPickSet; + menu + "I can try with these lock picks I just found.", L_Next, + "Maybe later.", L_Return; + +L_Next: + delitem "LockPicks", 1; + mes "You insert the hook pick inside the lock, and, without applying any tension, you discover there are only 3 pins to set."; + next; + mes "You will need to set the 3 pins to align them and turn the lock's cylinder."; + mes "A wrong move will make you start over. Remember how you had set the pins!"; + next; + @pin = 0; + goto L_HandlePin; + +L_NextPinOrEnd: + if (@pin >= 2) + goto L_OpenDoor; + @pin = @pin + 1; + mes "Click! This pin is set!"; + next; + goto L_HandlePin; + +L_HandlePin: + if (@pin == 0) + mes "What to do with the first pin?"; + if (@pin == 1) + mes "What to do with the second pin?"; + if (@pin == 2) + mes "What to do with the last pin?"; + menu + "Apply a soft pressure.", L_PinSoft, + "Apply a normal pressure.", L_PinNormal, + "Apply a strong pressure.", L_PinHard, + "Give up. I'm in a rush!", L_GiveUp; + +L_GiveUp: + @lock_picking_success = 0; + @pin = 0; + cleararray @pins, 0, 3; + @pin_pressure = 0; + return; + +L_PinSoft: + @pin_pressure = 1; + goto L_TestPin; + +L_PinNormal: + @pin_pressure = 2; + goto L_TestPin; + +L_PinHard: + @pin_pressure = 3; + goto L_TestPin; + +L_TestPin: + if (@pin_pressure == @pins[@pin]) + goto L_NextPinOrEnd; + mes "Nope, that did not work. And the pins are unset now..."; + next; + @pin = 0; + goto L_HandlePin; + +L_Return: + return; + +L_OpenDoor: + @lock_picking_success = 1; + mes "The two sets of pins separate. You can now turn the cylinder to open the door!"; + return; + +} diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt deleted file mode 100644 index 6a3c55f7..00000000 --- a/npc/functions/lockpicks.txt +++ /dev/null @@ -1,193 +0,0 @@ -// TMW2/LoF Script -// Author: -// Jesusalva -// Description: -// Lockpicking core - -// Important variables: -// THIEF_EXP -// Experience on Thief Tree -// THIEF_RANK -// Position on the Thief Tree - -// LockPicking(num_pins, max_pins, min_rank=num_pins) -// Returns 0 upon failure, 1 upon success -// Closes script if an error happen or if you give up / cannot try. -// -// The 'next' is upon script responsability -// Maximum pin number is infinite. Maximum Pin Positiors range from 2~5. -// If you fail, you can end up having to start again. If you fail too much, -// you'll be caught! -function script LockPicking { - // If you don't have a LockPick, you can't do this (useless) - if (!countitem(Lockpicks)) { - mesc l("You need a @@ to try this.", getitemlink(Lockpicks)), 1; - close; - } - - .@d=getarg(0,1); - .@m=getarg(1,3); - .@minrank=getarg(2, .@d); - - // Invalid Argument (kill script) - if (.@d < 1 || .@m < 2 || .@m > 5) - end; - - // You must be rank (number of locks - 1) to try - if (THIEF_RANK+1 < .@minrank) { - mesc l("This lock is beyond your current capacity."), 1; - close; - } - - // Create @pins array (the answer) - for (.@i=0; .@i < .@d;.@i++) - @pins[.@i] = rand2(1,.@m); - - // Check if you'll try to open it. - mesc l("This lock is simple, maybe with your thief skills you can manage to pry it open. But beware, you can end up in jail!"); - mesc l("Will you try to unlock it?"); - if (askyesno() == ASK_NO) - close; - - // Setup your attempt - delitem Lockpicks, 1; - @pos=0; - @chance=min(.@d*.@m-1, THIEF_RANK+.@d); - mesc l("You insert the hook pick inside the lock, and, without applying any tension, you discover there are only @@ pins to set.", .@d); - - // You have as many attempts as pins and appliable strenghts. - // Each thief rank grants you an extra attempt. - // Each pin takes one attempt. - // It's not multiplied, so 3 pins with 3 positions: 6 chances, 9 possibilities. - // There's no penalty, but the attempt is counted working or not! - // Remember if you fail, all previous pins will be cleared (@pos) - do { - mesc l("You are trying to open the @@th pin. What will to do?", @pos+1); - - menuint - rif(.@m >= 4, l("Apply no pressure")), 4, - rif(.@m >= 2, l("Apply soft pressure")), 2, - rif(.@m >= 1, l("Apply normal pressure")), 1, - rif(.@m >= 3, l("Apply strong pressure")), 3, - rif(.@m >= 5, l("Apply very strong pressure")), 5, - l("Give up!"), 0; - - if (!@menuret) { - // 50% chance to save the lockpick - if (rand2(2) == 1) - getitem Lockpicks, 1; - else - dispbottom l("The lockpick broke."); - close; - } - - // Is your guess correct? - if (@pins[@pos] == @menuret) { - mesc l("*click*"); - @pos+=1; - } else { - mesc l("This didn't work. All pins are now unset!"); - @pos=0; - @chance-=1; - // We don't need to clear console, each successful attempt IS counted. - // Therefore, unsetting 3 pins means you must do 3 new attempts!! - // The biggie is that you're running against time, here!!! - if (@chance < .@d && rand2(0, THIEF_RANK)) - mesc l("Your thief instincts suggest you to hurry."), 1; - } - - if (@chance <= 0) - break; - - if (@pos >= .@d) { - // 33% chance to save the lockpick - if (rand2(3) == 1) - getitem Lockpicks, 1; - else - dispbottom l("The lockpick broke."); - - // Get EXP and inform the success - if (THIEF_RANK) - THIEF_EXP += max(0, .@d*.@m-THIEF_RANK); - return 1; - } - } while (true); - - // Failed - if (THIEF_RANK) - THIEF_EXP += 1; - return 0; -} - -// Script helper to say if you were arrested or not -function script ArrestedChances { - .@runaway=cap_value(readbattleparam(getcharid(3), UDT_LUK)+readbattleparam(getcharid(3), UDT_AGI), 0, 200); // 20% - .@runaway+=125; // 12.5% base chance - .@runaway+=cap_value(THIEF_RANK*15, 0, 100); // real max 7.5% - // Max runaway chance: 40% - if (rand2(1000) < .@runaway) - return false; - return true; -} - -// Script helper to actually arrest you. TODO: Arrest anyone -// ArrestPlayer ( time-in-minutes ) -function script ArrestPlayer { - .@t=getarg(0); - - // We can't do anything without a player o.o - if (!playerattached()) - return; - - // You're already jailed so we do nothing and fail silently - if (getstatus(SC_JAILED)) { - return; - } - - // Okay, we can arrest you - // TODO: Arrest player, preferably without GM commands D: - // (would then take an extra argument: map) - atcommand("@jailfor "+.@t+"mn "+strcharinfo(0)); - - // Notification - dispbottom l("You were arrested; Use %s for information about how long you will spend here.", b("@jailtime")); - return; -} - -/* -// Main script from Moubootaur Legends Vaults -// LootableVault(tier, level, variable) -function script LootableVault { - .@tier=getarg(0)+1; - .@level=getarg(1); - .@var$=getarg(2); - mesn; - mesq l("There's a shiny safe here. How much money is inside? Nobody is looking at you, great!"); - // 2*3 = 6 possibilities, 5 attempts - if (LockPicking(.@tier, .@level)) { - Zeny=Zeny+getd("$VAULT_"+.@var$); - setd("$VAULT_"+.@var$, 40); - mesn; - mesq l("Booty!"); - } else { - mesn; - .@inch=(Zeny/100); - Zeny-=.@inch; - setd("$VAULT_"+.@var$, getd("$VAULT_"+.@var$)+.@inch); - if (ArrestedChances()) { - mesc l("Arrested!"); - atcommand("@jailfor 5mn "+strcharinfo(0)); - } else { - if (is_night()) - .@p$=l("The darkness of night gives you cover."); - else - .@p$=l("Your agile legs and sheer luck allows you to outrun the cops."); - mesc l("You run as far as you could. %s", .@p$); - warp "000-1", 22, 22; - } - } - return; -} -*/ - - diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt new file mode 100755 index 00000000..10f6638d --- /dev/null +++ b/npc/functions/magic.txt @@ -0,0 +1,159 @@ + + +function script MagicGainBasic { + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_DRANK_POTION; + return; +} + +function script MagicTalkOptionsSetup { + @QQ_ELANORE = 1; + @QQ_MANASEED = 2; + @QQ_MANAPOTION = 4; + @QQ_WYARA = 8; + @QQ_SAGATHA = 16; + @QQ_AULDSBEL = 32; + @QQ_IMP = 64; + @QQ_OLDWIZ = 128; + @QQ_ASTRALSOUL = 256; + return; +} + + +function script MagicTalkMenu { + setarray @choice$, "", "", "", "", "", "", "", "", "", ""; + @choices_nr = 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + + if (@ignore & @QQ_ELANORE) + goto L_Q_post_elanore; + @choice$[@choices_nr] = "...Elanore the Healer?"; + @choice_idx[@choices_nr] = @QQ_ELANORE; + @choices_nr = @choices_nr + 1; + goto L_Q_post_elanore; + +L_Q_post_elanore: + if (@ignore == @QQ_MANASEED) + goto L_Q_post_manaseed; + if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) + goto L_Q_post_manaseed; + @choice$[@choices_nr] = "...the Mana Seed?"; + @choice_idx[@choices_nr] = @QQ_MANASEED; + @choices_nr = @choices_nr + 1; + goto L_Q_post_manaseed; + +L_Q_post_manaseed: + if (@ignore & @QQ_MANAPOTION) + goto L_Q_post_manapotion; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_Q_post_manapotion; + @choice$[@choices_nr] = "...Mana Potions?"; + @choice_idx[@choices_nr] = @QQ_MANAPOTION; + @choices_nr = @choices_nr + 1; + goto L_Q_post_manapotion; + +L_Q_post_manapotion: + if (@ignore & @QQ_WYARA) + goto L_Q_post_wyara; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) + goto L_Q_post_wyara; + @choice$[@choices_nr] = "...Wyara the Witch?"; + @choice_idx[@choices_nr] = @QQ_WYARA; + @choices_nr = @choices_nr + 1; + goto L_Q_post_wyara; + +L_Q_post_wyara: + if (@ignore & @QQ_SAGATHA) + goto L_Q_post_sagatha; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + goto L_Q_post_sagatha; + @choice$[@choices_nr] = "...Sagatha the Witch?"; + @choice_idx[@choices_nr] = @QQ_SAGATHA; + @choices_nr = @choices_nr + 1; + goto L_Q_post_sagatha; + +L_Q_post_sagatha: + if (@ignore & @QQ_AULDSBEL) + goto L_Q_post_auldsbel; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) + goto L_Q_post_auldsbel; + @choice$[@choices_nr] = "...Auldsbel the Wizard?"; + @choice_idx[@choices_nr] = @QQ_AULDSBEL; + @choices_nr = @choices_nr + 1; + goto L_Q_post_auldsbel; + +L_Q_post_auldsbel: + if (@ignore & @QQ_OLDWIZ) + goto L_Q_post_oldwiz; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_OLD_WIZARD)) + goto L_Q_post_oldwiz; + @choice$[@choices_nr] = "...the Old Wizard?"; + @choice_idx[@choices_nr] = @QQ_OLDWIZ; + @choices_nr = @choices_nr + 1; + goto L_Q_post_oldwiz; + +L_Q_post_oldwiz: + if (@ignore & @QQ_IMP) + goto L_Q_post_imp; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) + goto L_Q_post_imp; + @choice$[@choices_nr] = "...the Earth Spirit in the desert well?"; + @choice_idx[@choices_nr] = @QQ_IMP; + @choices_nr = @choices_nr + 1; + goto L_Q_post_imp; + +L_Q_post_imp: + if (@ignore & @QQ_ASTRALSOUL) + goto L_Q_post_astralsoul; + if (!(getskilllv(SKILL_MAGIC))) + goto L_Q_post_astralsoul; + if (!(getskilllv(SKILL_POOL))) + goto L_Q_post_astralsoul; + @choice$[@choices_nr] = "...ways to improve my magic?"; + @choice_idx[@choices_nr] = @QQ_ASTRALSOUL; + @choices_nr = @choices_nr + 1; + goto L_Q_post_astralsoul; + +L_Q_post_astralsoul: + @choice$[@choices_nr] = "...never mind."; + @choice_idx[@choices_nr] = 0; + @choices_nr = @choices_nr + 1; + + menu + @choice$[0], L_MenuItems, + @choice$[1], L_MenuItems, + @choice$[2], L_MenuItems, + @choice$[3], L_MenuItems, + @choice$[4], L_MenuItems, + @choice$[5], L_MenuItems, + @choice$[6], L_MenuItems, + @choice$[7], L_MenuItems, + @choice$[8], L_MenuItems, + @choice$[9], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + + if (@menu >= @choices_nr) + @menu = 0; + + @c = @choice_idx[@menu]; + return; +} + + +function script SkillUp { + if (getskilllv(@SUP_id) >= @SUP_lvl) + goto L_Shortcut; + + misceffect sfx_skillup, strcharinfo(0); + addtoskill @SUP_id, @SUP_lvl; + getexp @SUP_xp, 0; + if (@SUP_xp) + mes "[" + @SUP_xp + " experience points]"; + mes "[Level " + @SUP_lvl + " in " + @SUP_name$ + "]"; + return; + +L_Shortcut: + mes "[You already have level " + getskilllv(@SUP_id) + " in " + @SUP_name$ + "]"; + return; +} diff --git a/npc/functions/main.txt b/npc/functions/main.txt deleted file mode 100644 index 8029f3eb..00000000 --- a/npc/functions/main.txt +++ /dev/null @@ -1,445 +0,0 @@ -// Evol functions. -// Authors: -// 4144 -// Jesusalva -// Travolta -// Description: -// Build in functions. - -/** - * checks whether the given argument is a char name or account id - * and tries to convert it to an account id - * - * @arg 0 - char name or account id - * @return the account id - */ -function script nameid2id { - if ((getdatatype(getarg(0, "")) & DATATYPE_STR) != 0) { - if (getarg(0, "") == "") { - return playerattached(); - } else { - return getcharid(CHAR_ID_ACCOUNT, getarg(0)); - } - } else if (getarg(0) == 0) { - return playerattached(); - } else { - return getarg(0); - } -} - -function script menuimage { - return getarg(0) + "|" + getarg(1); -} - -function script menuaction { - return "[" + getarg(0) + "]"; -} - -function script mesn { - if (getargcount() > 0) - { - .@s$ = "[" + getarg(0) + "]"; - } - else - { - .@s$ = "[" + strnpcinfo(1) + "]"; - } - mes .@s$; - return; -} - -function script mesq { - mes "\"" + getarg(0)+ "\""; - return; -} - -function script g { - consolemes(CONSOLEMES_ERROR, "Deprecated function \"g\" used, results are not reliable."); - return rand(1000) % 2 ? getarg(0) : getarg(1); -} - -function script b { - return "##B" + getarg(0) + "##b"; -} - -function script col { - .@color = getarg(1); - if (.@color < 0) .@color = 0; - if (.@color > 9) .@color = 9; - return "##" + .@color + getarg(0) + "##0"; -} - -function script mesc { - return mes(col(getarg(0, ""), getarg(1, 9))); -} - -// *showimage(""); -// Displays an image in the NPC window. If no file extension is provided, it is -// assumed to be a PNG file. The image path is relative to client-data/graphics. -// example: -// showimage("guiicons/flags/fr"); -function script showimage { - .@file$ = getarg(0); - - if (!endswith(getarg(0), ".jpg") && !endswith(getarg(0), ".png")) { - .@file$ += ".png"; - } - - if (charat(getarg(0), 0) == "/") { - .@file$ = delchar(.@file$, 0); // absolute path from root of client-data - } else if (!startswith(getarg(0), "help/") && !startswith(getarg(0), "graphics/") ) { - .@file$ = "graphics/" + .@file$; // assume relative to graphics/ - } - - return mesf("~~~%s~", .@file$); -} - -function script adddefaultskills { - if (getskilllv(NV_BASIC) < 6) - { - skill NV_BASIC, 6, 0; - } - return; -} - -function script addremovemapmask { - setmapmask getarg(0), (getmapmask(getarg(0)) | (getarg(1) + getarg(2))) ^ getarg(2); - return; -} - -// Function to show narrator text. Accepts string args. -// If first arg is a number N, then it represents bit flags. -// Bit flags : -// S_FIRST_BLANK_LINE -- blank line at beginning -// S_LAST_BLANK_LINE -- blank line at the end -// S_LAST_NEXT -- use last "next();" -// S_NO_NPC_NAME -- don't use first "mesn();" -// S_LAST_CLOSE -- use last "close2(); -function script narrator { - .@start = 0; - .@argc = getargcount(); - .@flags = 0; - - if (.@argc > 1 && (getdatatype(getarg(0)) & DATATYPE_INT) != 0) { - .@start = 1; - .@flags = getarg(0); - } - - if ((.@flags & S_FIRST_BLANK_LINE) != 0) { - mes(""); - } - - if ((.@flags & S_NO_NPC_NAME) == 0) { - mesn(l("Narrator")); - } - - for (.@i = .@start; .@i < .@argc; .@i++) { - mes(col(getarg(.@i), 9)); - - if (.@i < .@argc - 1) { - next(); - } - } - - if ((.@flags & S_LAST_BLANK_LINE) != 0) { - mes(""); - } - - if ((.@flags & S_LAST_NEXT) != 0) { - next(); - } else if ((.@flags & S_LAST_CLOSE) != 0) { - close2(); - } - - return; -} - -// Function to show NPC speech. Accepts string args. -// If first arg is a number N, then it represents bit flags. -// Bit flags : -// 0x1 -- blank line at beginning -// 0x2 -- blank line at the end -// 0x4 -- use last "next;" -// 0x8 -- don't use first "mesn;" -function script speech { - .@start = 0; - .@argc = getargcount(); - .@flags = 0; - - if (.@argc > 1 && !isstr(getarg(0))) - { - .@start = 1; - .@flags = getarg(0); - } - - if (.@flags & 0x1) - mes ""; - - if (!(.@flags & 0x8)) - mesn; - - for (.@i = .@start; .@i < .@argc; .@i++) - { - mesq getarg(.@i); - - if (.@i < .@argc - 1) - next; - } - - if (.@flags & 0x4) - next; - else if (.@flags & 0x2) - mes ""; - - return; -} - -// Show debug message if .debug variable of NPC is set to 1 -function script npcdebug { - if (getvariableofnpc(.debug, strnpcinfo(3))) - consolemes(CONSOLEMES_DEBUG, strnpcinfo(3) + ": " + getarg(0)); - return; -} - -function script askyesno { - .@sel = select(menuaction(l("Yes")), - menuaction(l("No"))); - mes ""; - return .@sel; -} - -// Argument: -// 0 Quest variable -// 1 Current value -// 2 Next value -function script compareandsetq { - if (getq(getarg(0)) == getarg(1)) - { - setq getarg(0), getarg(2); - return true; - } - return false; -} - -// Use a delay to prevent spams from NPC that display text without the -// use of (a) close/next function(s). -// Argument: -// 0 Text to display -// 1 Lock delay (default = 1) -// 2 Message function: (default = 0) -// 0 = npctalk3 -// 1 = npctalk -// 2 = message -function script npctalkonce { - // lock mechanism - switch (getarg(2, 0)) - { - case 1: - if (gettimetick(2) <= getvariableofnpc(.talk_lock, strnpcinfo(NPC_NAME_UNIQUE))) - return false; - set(getvariableofnpc(.talk_lock, strnpcinfo(NPC_NAME_UNIQUE)), gettimetick(2) + getarg(1, 1)); - break; - default: - if (gettimetick(2) <= @NPC_TALK_LOCK[getnpcid()]) - return false; - @NPC_TALK_LOCK[getnpcid()] = gettimetick(2) + getarg(1, 1); - } - - // talk mechanism - switch (getarg(2, 0)) - { - case 0: npctalk3(getarg(0)); break; - case 1: npctalk(getarg(0)); break; - case 2: message(strcharinfo(0), getarg(0)); - } - - return true; -} - -function script getquestlink { - return "[@@q" + getarg(0) + "|@@]"; -} - -function script getmonsterlink { - return "[@@m" + getarg(0) + "|@@]"; -} - -function script getpetlink { - return "[@@p" + getarg(0) + "|@@]"; -} - -function script getmercenarylink { - return "[@@M" + getarg(0) + "|@@]"; -} - -function script gethomunculuslink { - return "[@@h" + getarg(0) + "|@@]"; -} - -// Returns the player race in plain text -// GETRACE_RACE - returns player race (default) -// GETRACE_SKIN - returns player skin -// GETRACE_FULL - returns player skin + race -// Can take an optional 2nd param with the class -// get_race( {Flag, {Class}} ) -function script get_race { - .@m=getarg(0, GETRACE_RACE); - .@g=getarg(1, Class); - - // We also allow this to run without player attached for... science. - if (playerattached()) - { - setarray .@allraces$, l("Human"), l("Human"), l("Human"), - l("Ukar"), l("Ukar"), - l("Tritan"), l("Tritan"), - l("Raijin"), l("Raijin"), - l("Kralog"), l("Kralog"); - setarray .@allskins$, l("Kaizei"), l("Argaes"), l("Tonori"), - l("Cave"), l("Mountain"), - l("Sea"), l("Lake"), - l("Light"), l("Dark"), - l("Fire"), l("Frost"); - } - else - { - setarray .@allraces$, ("Human"), ("Human"), ("Human"), - ("Ukar"), ("Ukar"), - ("Tritan"), ("Tritan"), - ("Raijin"), ("Raijin"), - ("Kralog"), ("Kralog"); - setarray .@allskins$, ("Kaizei"), ("Argaes"), ("Tonori"), - ("Cave"), ("Mountain"), - ("Sea"), ("Lake"), - ("Light"), ("Dark"), - ("Fire"), ("Frost"); - } - - if (.@m == GETRACE_RACE) - return .@allraces$[.@g]; - else if (.@m == GETRACE_SKIN) - return .@allskins$[.@g]; - else - return .@allskins$[.@g] + " " + .@allraces$[.@g]; -} - -// Clear output of getinventorylist() -// delinventorylist() -function script delinventorylist { - deletearray @inventorylist_id; - deletearray @inventorylist_amount; - deletearray @inventorylist_equip; - deletearray @inventorylist_refine; - deletearray @inventorylist_identify; - deletearray @inventorylist_attribute; - deletearray @inventorylist_card1; - deletearray @inventorylist_card2; - deletearray @inventorylist_card3; - deletearray @inventorylist_card4; - deletearray @inventorylist_expire; - deletearray @inventorylist_bound; - @inventorylist_count=0; - return; -} - -// isin( map, x1, y1, {[x2, y2][radius]} ) -function script isin { - if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0) - return false; - if (.@mapName$ != getarg(0)) - return false; - - if (getarg(4,-1) < 0) { - // Radius Based - if (.@xpos >= getarg(1)-getarg(3) && .@xpos <= getarg(1)+getarg(3) && .@ypos >= getarg(2)-getarg(3) && .@ypos <= getarg(2)+getarg(3)) - return true; - } else { - // Coordinate based - if (.@xpos >= getarg(1) && .@xpos <= getarg(3) && .@ypos >= getarg(2) && .@ypos <= getarg(4)) - return true; - } - return false; -} - -// Shortcut for getmapname() -function script getmap { - return getmapname(); -} - -// Quest Rewards -// quest_xp(maxLevel, reward, {multiplier=1}) -function script quest_xp { - //.@minLevel=getarg(0); - .@maxLevel=getarg(0); - .@reward=getarg(1); - .@mult=getarg(2, 1); - if (BaseLevel <= .@maxLevel) { - getexp .@reward*.@mult, 0; - return; - } - // You'll forsake 2% every over level - .@mult*=100; - .@mult-=((BaseLevel - .@maxLevel) * 2); - .@mult=max(10, .@mult); - getexp .@reward*.@mult/100, 0; - return; -} - -// quest_jxp(maxLevel, reward, {multiplier=1}) -function script quest_jxp { - //.@minLevel=getarg(0); - .@maxLevel=getarg(0); - .@reward=getarg(1); - .@mult=getarg(2, 1); - if (BaseLevel < .@maxLevel) { - getexp 0, .@reward*.@mult; - return; - } - // You'll forsake 2% every over level - .@mult*=100; - .@mult-=((BaseLevel - .@maxLevel) * 2); - .@mult=max(10, .@mult); - getexp 0, .@reward*.@mult/100; - return; -} - -// quest_gp(maxLevel, reward, {multiplier=1}) -function script quest_gp { - //.@minLevel=getarg(0); - .@maxLevel=getarg(0); - .@reward=getarg(1); - .@mult=getarg(2, 1); - if (BaseLevel <= .@maxLevel) { - Zeny+=.@reward*.@mult; - return; - } - // You'll forsake 2% every over level - .@mult*=100; - .@mult-=((BaseLevel - .@maxLevel) * 2); - .@mult=max(10, .@mult); - Zeny+=.@reward*.@mult/100; - return; -} - -// quest_item(maxLevel, item, {amount=1}, {bound=0}) -function script quest_item { - //.@minLevel=getarg(0); - .@maxLevel=getarg(0); - .@reward=getarg(1); - .@mult=getarg(2, 1); - .@bind=getarg(3, 0); - // Item will not be obtained if you are overlevel - if (BaseLevel > .@maxLevel && .@mult <= 1) - return; - // If it comes in pairs, you'll only get 1 - if (BaseLevel > .@maxLevel) - .@mult=1; - // Obtain item bound if needed - if (.@bind) - getitembound .@reward, .@mult, .@bind; - else - getitem .@reward, .@mult; - return; -} - - - diff --git a/npc/functions/manhole.txt b/npc/functions/manhole.txt deleted file mode 100644 index 3af18537..00000000 --- a/npc/functions/manhole.txt +++ /dev/null @@ -1,73 +0,0 @@ -// TMW2 Script -// Authors: -// Jesusalva -// -// Description: -// Handles Artis manholes -// Relies on getmap, be sure coords are enough compatible -// ie. Leave a 2x2 area free of collision in the target coordinates -// Heights weren't checked - -// manhole_interact( dest_map ) -// Carries over getmapxy() for NPC -// This is for Artis and thus, hackish. -// Return Codes: -// -1 : Tried to enter Sewers -// >0 : ID of dropped item (in case it must be caught) - -function script manhole_interact { - .@dest_map$=getarg(0); - getmapxy(.@m$, .@x, .@y, UNITTYPE_NPC); - - narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, - l("You hear some creeping and crawling sounds from the murkiness below."), - l("...")); - - select - l("Do you want to leave it alone?"), - rif(getq(ArtisQuests_MonaDad), l("Do you want to enter in sewer?")), - l("Do you want to throw something inside?"); - - switch (@menu) { - case 1: - close; break; - case 2: - return -1; break; - case 3: - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - - .@id = requestitem(); - - // If ID is invalid - if (.@id < 1) { - mesc l("You give up."); - close; - } - - // If there's not enough items, it is bound, it cannot be traded/dropped/sold, etc. - if (countitem(.@id) < 1 || checkbound(.@id) || getiteminfo(.@id, ITEMINFO_TRADE)) { - mesc l("You cannot drop this item!"); - close; - } - - // Delete item and spawn it on the equivalent map - delitem .@id, 1; - makeitem .@id, 1, .@dest_map$, .@x+rand(-2, 2), .@y+rand(-2, 2); - - // May spawn a monster if it is food (33% odds) - if (getiteminfo(.@id, ITEMINFO_TYPE) == IT_HEALING && rand(1,3) == 3) { - // Would be nice to customize but not needed atm - // 1 mob for every 30 levels (level 99 players spawn 4 mobs) - // Note that food type is currently disregarded (and it accepts any healing item) - .@monsterId=any(Slime, Croc, LittleBlub, CaveMaggot); - .@mobGID = monster(.@m$, .@x, .@y, strmobinfo(1, .@monsterId), .@monsterId, (BaseLevel/30)+1); - unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // "It's not aggressive"? We don't care. - } - - return .@id; break; - } - - - -} - diff --git a/npc/functions/masks.txt b/npc/functions/masks.txt deleted file mode 100644 index 4b28bfc7..00000000 --- a/npc/functions/masks.txt +++ /dev/null @@ -1,43 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Jesusalva -// Description: -// Triggers functions to add and remove masks. -// Variables: -// 4 - Top Mask -// 8 - Bottom Mask -// Default mask: 13 (Top + Bottom + Display mask) - -// Artis Aemil's Legion - -function script artisALResetMask { - .@m=getmapmask("001-2-33"); - sendmapmask(.@m); - return 0; -} - -function script artisALTopMask { - addtimer 30, "artisALTopMaskDO::OnDoIt"; - return 0; -} - -function script artisALBottomMask { - addtimer 30, "artisALBottomMaskDO::OnDoIt"; - return 0; -} - -// Show bottom mask is the same as hiding top mask -- script artisALBottomMaskDO NPC_HIDDEN,{ -OnDoIt: - .@m=getmapmask("001-2-33"); - sendmapmask(.@m^4); -} - -// Show top mask is the same as hiding bottom mask -- script artisALTopMaskDO NPC_HIDDEN,{ -OnDoIt: - .@m=getmapmask("001-2-33"); - sendmapmask(.@m^8); -} - diff --git a/npc/functions/math.txt b/npc/functions/math.txt deleted file mode 100644 index 357407da..00000000 --- a/npc/functions/math.txt +++ /dev/null @@ -1,50 +0,0 @@ -// Evol functions. -// Authors: -// 4144 -// Reid -// Jesusalva -// Description: -// Math functions - - -// abs() -// returns the absolute value of the passed integer - -function script abs { - .@n = getarg(0); - return .@n >= 0 ? .@n : -.@n; -} - - - -// lognbaselvl({{, }}) -// returns BaseLevel * logn (BaseLevel * alpha). - -function script lognbaselvl { - .@alpha = getarg(0, 1); - .@min = getarg(1, 1); - .@ret = 0; - .@pc_level = BaseLevel * .@alpha; - - while (.@pc_level >>= 1) - { - ++.@ret; - } - .@ret *= BaseLevel; - - if (.@ret <= .@min) - { - .@ret = .@min; - } - - return .@ret; -} - - -// result is: lower < target <= higher -// is_between ( lower, higher, target) -function script is_between { - .@val=getarg(2); - return (getarg(0) < .@val && getarg(1) >= .@val); -} - diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt new file mode 100755 index 00000000..365adc8f --- /dev/null +++ b/npc/functions/mob_points.txt @@ -0,0 +1,195 @@ + +function script MobPoints { + if (@mobId < 1002) goto L_Return; + + setarray @points, + 1, // Maggot + 2, // Scorpion + 20, // Red Scorpion + 40, // Green Slime + 30, // Giant Maggot + 15, // Yellow Slime + 25, // Red Slime + 45, // Black Scorpion + 50, // Snake + 6, // Fire Goblin + 55, // Spider + 35, // Evil Mushroom + 35, // Pink Flower + 40, // Santa Slime + 15, // Rudolph Slime + 2, // Bat + 16, // Pinkie + 10, // Spiky Mushroom + 14, // Fluffy + 25, // Cave Snake + 200, // Jack O + 85, // Fire Skull + 85, // Poison Skull + 20, // Log Head + 70, // Mountain Snake + 15, // Easter Fluffy + 40, // Mouboo + 0, // Mauve Plant + 0, // Cobalt Plant + 0, // Gamboge Plant + 0, // Alizarin Plant + 20, // Sea Slime + 75, // Grass Snake + 0, // Silk Worm + 125, // Zombie + 0, // Clover Patch + 5, // Squirrel + 0, // Fire Lizard + 80, // Wisp + 15, // Snail + 80, // Spectre + 100, // Skeleton + 100, // Lady Skeleton + 150, // Fallen + 0, // Snake Lord + 80, // Poltergeist + 0, // Duck + 15, // Bee + 0, // Larvespa + 0, // Vespa + 0, // Hivespa + 0, // Froad + 0, // Troll + 15, // Butterfly + 2, // Cave Maggot + 10, // Angry Scorpion + 6, // Ice Goblin + 20, // Archant + 40, // Giant Cave Maggot + 35, // Moggun + 100, // Terranite + 10, // Pumpkin + 10, // Bandit + 20, // Bandit Lord + 30, // Vampire Bat + 20, // Reaper + 100, // Scythe + 20, // Ball Lightning + 60, // Ice Element + 80, // Yeti + 100, // The Lost + 60, // Red Bone + 60, // Stalker + 0, // Dreadwing + 100, // Drunken Skeleton + 100, // Tipsy Skeleton + 100, // Drunken Lady Skeleton + 60, // BlueSpark + 60, // RedSpark + 0, // Serqet + 60, // HuntsmanSpider, + 40, // CrotcherScorpion, + 0, // IceSkull, + 120, // FeyElement, + 10, // Larvern, + 60, // Hyvern, + 20, // HungryFluffy, + 40, // Wolvern, + 50, // BlueSlime, + 0, // SlimeBlast, + 20, // WhiteSlime, + 40, // Reinboo, + 0, // WhiteBell, + 60, // SoulSnake + 100, // SoulEater + 25, // CopperSlime + 0, // SleepingBandit + 20, // AzulSlime + 80, // DemonicSpirit + 940, // Luvia + 150, // WitchGuard + 50, // DemonicMouboo + 15, // ViciousSquirrel + 20, // WickedMushroom + 18, // Bluepar + 10, // AngryFireGoblin + 35, // AngrySeaSlime + 50, // CandiedSlime + 40, // Santaboo + 30, // Pollett + 100, //Nutcracker + 40, // SeaSlimeMother + 50, // UndeadWitch + 60, // UndeadTroll + 80, // GreenSlimeMother + 100, // Thug + 100, // Swashbuckler + 100, // Grenadier + 150, // DreadPirateMarley + 10, // DreadPirateMarleyClone + 100, // Wight + 100, // ManaGhost + 100, // PsiBrain + 150, // GeneralKurkan + 175, // GeneralRazha + 200 // GeneralTerogan + // No more room! script engine is buggy, sorry. + // -o11c + ; // END + + if (MPQUEST == 1) + Mobpt = Mobpt + @points[@mobId - 1002]; + + callfunc "ValonCount"; + if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobId == $@ValonMob[@valon_mob])) + goto L_ValonMobKill; + goto L_NatureKarma; + +L_ValonMobKill: + callfunc "AddValonCntMask"; + goto L_NatureKarma; + +L_NatureKarma: + if ((@mobId == 1003) || (@mobId == 1004) || (@mobId == 1009) || (@mobId == 1057) + || (@mobId == 1104) || (@mobId == 1105) || (@mobId == 1106) || (@mobId == 1107)) + goto L_Good; + + // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) + + @value = 0; + if (@mobId == 1018) + @value = 3; + + if (@mobId == 1020) + @value = 3; + if (@mobId == 1027) + @value = 3; + if (@mobId == 1028) + @value = 4; + if (@mobId == 1038) + @value = 2; + if (@mobId == 1094) + @value = 3; + if (@mobId == 1112) + @value = 3; + if (@mobId == 1113) + @value = 3; + + if (@value == 0) + goto L_Celestia; + + callfunc "QuestSagathaAnnoy"; + goto L_Celestia; + +L_Good: + @value = 1; + callfunc "QuestSagathaHappy"; + goto L_Celestia; + +L_Celestia: + if (QL_CELESTIA < 5 || QL_CELESTIA >= 205 || @mobId != 1072) goto L_Return; + QL_CELESTIA = QL_CELESTIA + 1; + if (QL_CELESTIA == 205) + message strcharinfo(0), "Yeti : ##3This should be enough yetis killed to please Celestia."; + goto L_Return; + +L_Return: + @value = 0; + return; +} diff --git a/npc/functions/motd.txt b/npc/functions/motd.txt new file mode 100755 index 00000000..5ff58480 --- /dev/null +++ b/npc/functions/motd.txt @@ -0,0 +1,10 @@ +function script MOTD { + setarray $@MOTD$, + + "Welcome to The Mana World! (running on tmwAthena)", + "[@@http://ow.ly/MCesp|Website & Wiki@@] [@@http://ow.ly/MCeBR|Vote For GMs@@] [@@http://ow.ly/MCehc|Bug Reports@@] [@@http://ow.ly/MCe5W|Live Support@@]", + "Like us on [@@http://ow.ly/MCdZW|Facebook@@] [@@http://ow.ly/MCdTt|G+@@] [@@http://ow.ly/MCdJR|Youtube@@] [@@http://ow.ly/MCePp|Twitter@@]", + "You can report abuse by typing in chat: @wgm Player XYZ is abusing me"; + + return; +} diff --git a/npc/functions/motdconfig.txt b/npc/functions/motdconfig.txt new file mode 100755 index 00000000..dcb54dcc --- /dev/null +++ b/npc/functions/motdconfig.txt @@ -0,0 +1,38 @@ +function script MOTDConfig { + mes "[MOTD]"; + mes "lines:"; + mes "---"; + @line = 0; + callsub S_Lines; + mes "---"; + mes "Enabled: " + !($@MOTD_Disabled); + next; + menu + "toggle|Toggle MOTD", L_Toggle; + +L_Toggle: + gmlog strcharinfo(0) + " enabled or disabled the MOTD."; + $@MOTD_Disabled = !$@MOTD_Disabled; + close2; + return; + +S_Lines: + mes @line + ": "+ $@MOTD$[@line]; + @line = @line + 1; + if(@line != getarraysize($@MOTD$)) goto S_Lines; + return; +} + +function script DisplayMOTD { + if($@MOTD_Disabled || $@MOTD$[0] == "") goto L_Return; + goto L_MOTD; + +L_MOTD: + message strcharinfo(0), "Server : " + $@MOTD$[@motd_index]; + @motd_index = @motd_index + 1; + if($@MOTD$[@motd_index] == "") goto L_Return; + goto L_MOTD; + +L_Return: + return; +} diff --git a/npc/functions/mouboofunc.txt b/npc/functions/mouboofunc.txt deleted file mode 100644 index 6129c083..00000000 --- a/npc/functions/mouboofunc.txt +++ /dev/null @@ -1,89 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Various scripts used in walking mouboo NPCs. - -function script moubootalk { - switch (rand(4)) - { - case 0: - npctalkonce(l("Moooooo!")); - break; - case 1: - npctalkonce(l("Moo!")); - break; - case 2: - npctalkonce(l("Moooooooooooo!")); - break; - case 3: - npctalkonce(l("Moooo!")); - break; - } - return; -} - -function script mouboocheckxy { - setarray .nearnpc$[0], "Mouboo#Artis0", - "Mouboo#Artis1", - "Mouboo#Artis2", - "Mouboo#Artis3", - "Taree"; - for (.@size = 0; .@size < getarraysize(.nearnpc$); .@size++) - { - if (strcmp(.name$, .nearnpc$[.@size]) == 0) - { - continue; - } - - .@npc_x = getvariableofnpc(.x, .nearnpc$[.@size]); - .@npc_y = getvariableofnpc(.y, .nearnpc$[.@size]); - - if (.@npc_x == .x && .@npc_y == .y) - { - return 1; - } - } - - return 0; -} - -function script moubootimer { - if (mouboocheckxy() && !isunitwalking()) - { - movetonextpoint; - } - else if (rand(0,6) == 5) - { - if (!isunitwalking()) - { - movetonextpoint; - } - } - initnpctimer; - end; -} - -function script mouboograph { - initmovegraph "down_pos", 66, 79, 75, 86, - "left_pos", 66, 79, 75, 86, - "up_pos", 66, 79, 75, 86, - "right_pos", 66, 79, 75, 86; - - setmovegraphcmd "down_pos", "left_pos", 1, "dir 2", - "down_pos", "up_pos", 1, "dir 4", - "down_pos", "right_pos", 1, "dir 6", - "left_pos", "down_pos", 1, "dir 0", - "left_pos", "up_pos", 1, "dir 4", - "left_pos", "right_pos", 1, "dir 6", - "up_pos", "down_pos", 1, "dir 0", - "up_pos", "left_pos", 1, "dir 2", - "up_pos", "right_pos", 1, "dir 6", - "right_pos", "down_pos", 1, "dir 0", - "right_pos", "left_pos", 1, "dir 2", - "right_pos", "up_pos", 1, "dir 4"; - - firstmove "wait 2", "down_pos"; - initnpctimer; - end; -} diff --git a/npc/functions/music.txt b/npc/functions/music.txt deleted file mode 100644 index 18a8fbe7..00000000 --- a/npc/functions/music.txt +++ /dev/null @@ -1,87 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Gumi -// Ledmitz -// Description: -// Music functions -// -// NOTE: This NPC uses the new public/private function call system to avoid -// the use of doevent. -// Syntax: -// "jukebox"::HurnscaldPrompt(); → Makes a menuint for selecting hurns tracks -// "jukebox"::JukeboxMusic(ID); → Changes music based on prompted ID -// "jukebox"::BroadcastMusic(MAP, ID); → Changes music based on prompted ID -// TODO: Check if you have the music unlocked? Bitmask? Array? - -- script jukebox 32767,{ - end; - -// Helpers -public function JukeboxMusic { - changeplayermusic $MUSIC_ARRAY$[getarg(0)] + ".ogg"; - return; -} - -public function BroadcastMusic { - changemusic getarg(0), $MUSIC_ARRAY$[getarg(1)] + ".ogg"; - return; -} - -// public function listing -// * Hurnscald - -public function HurnscaldPrompt { - menuint - "Cancel", -1, - "Johanne - Forest of Birches", 0, - "Artis - Adventure Begins", 1, - "Argaes - Dariunas' Forest", 20, - "Hurnscald - Magick Real", 5; - mes ""; - if (@menuret == -1) - close; - return @menuret; -} - -// Initialize stuff which will be needed -OnInit: - $MUSIC_ARRAY$[0] = "johanne"; - $MUSIC_ARRAY$[1] = "artis"; - $MUSIC_ARRAY$[2] = "ghoulish"; - $MUSIC_ARRAY$[3] = "surreal"; - $MUSIC_ARRAY$[4] = "ocean"; - $MUSIC_ARRAY$[5] = "real"; - $MUSIC_ARRAY$[6] = "academy"; - $MUSIC_ARRAY$[7] = "bandit"; - $MUSIC_ARRAY$[8] = "barbarians"; - $MUSIC_ARRAY$[9] = "botcheck"; - $MUSIC_ARRAY$[10] = "candor"; - $MUSIC_ARRAY$[11] = "cavesong"; - $MUSIC_ARRAY$[12] = "chilling"; - $MUSIC_ARRAY$[13] = "cloudcall"; - $MUSIC_ARRAY$[14] = "crypt"; - $MUSIC_ARRAY$[15] = "despair"; - $MUSIC_ARRAY$[16] = "dimond"; - $MUSIC_ARRAY$[17] = "explorer"; - $MUSIC_ARRAY$[18] = "faith"; - $MUSIC_ARRAY$[19] = "fire"; - $MUSIC_ARRAY$[20] = "forest"; - $MUSIC_ARRAY$[21] = "graveyard"; - $MUSIC_ARRAY$[22] = "hurns"; - $MUSIC_ARRAY$[23] = "marine"; - $MUSIC_ARRAY$[24] = "mystique"; - $MUSIC_ARRAY$[25] = "nightcall"; - $MUSIC_ARRAY$[26] = "nivalis"; - $MUSIC_ARRAY$[27] = "ocean"; - $MUSIC_ARRAY$[28] = "peace"; - $MUSIC_ARRAY$[29] = "reid"; - $MUSIC_ARRAY$[30] = "sewer"; - $MUSIC_ARRAY$[31] = "store"; - $MUSIC_ARRAY$[32] = "swamp"; - $MUSIC_ARRAY$[33] = "thunderstorm"; - $MUSIC_ARRAY$[34] = "waterlude"; - $MUSIC_ARRAY$[35] = "xmas"; - end; -} - diff --git a/npc/functions/npcmove.txt b/npc/functions/npcmove.txt deleted file mode 100644 index 612ab036..00000000 --- a/npc/functions/npcmove.txt +++ /dev/null @@ -1,142 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Description: -// Moving npc utility functions -// Variables: -// none - -function script initpath { - deletearray getvariableofnpc(.movepathcmd$, strnpcinfo(3)); - deletearray getvariableofnpc(.movepathy, strnpcinfo(3)); - deletearray getvariableofnpc(.movepathx, strnpcinfo(3)); - .@cnt = 0; - - for (.@f = 0; .@f < getargcount(); .@f = .@f + 3) - { - set getvariableofnpc(.movepathcmd$[.@cnt], strnpcinfo(3)), getarg(.@f); - set getvariableofnpc(.movepathx[.@cnt], strnpcinfo(3)), getarg(.@f + 1); - set getvariableofnpc(.movepathy[.@cnt], strnpcinfo(3)), getarg(.@f + 2); - .@cnt ++; - } - //debugmes "array size: " + str(getarraysize(getvariableofnpc(.movepath, strnpcinfo(3)))); - return; -} - -function script domoveaction { - //debugmes "domoveaction: " + str(getvariableofnpc(.movepos, strnpcinfo(3))); - .@pos = getvariableofnpc(.movepos, strnpcinfo(3)); - if (.@pos >= getarraysize(getvariableofnpc(.movepathx, strnpcinfo(3))) || .@pos < 0) - return; - //debugmes "walking"; - .@cmd$ = getvariableofnpc(.movepathcmd$[.@pos], strnpcinfo(3)); - //debugmes "cmd: " + .@cmd$; - - if (.@cmd$ == "move") - { - npcwalkto getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)), getvariableofnpc(.movepathy[.@pos], strnpcinfo(3)); - } - else if (.@cmd$ == "dir") - { - setnpcdir getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - return 2; - } - else if (.@cmd$ == "wait") - { - set getvariableofnpc(.waitticks, strnpcinfo(3)), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - } - else if (.@cmd$ == "emote") - { - unitemote getnpcid(), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - return 2; - } - else if (.@cmd$ == "class") - { - .class = getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - return 2; - } - else if (.@cmd$ == "warp") - { - movenpc strnpcinfo(3), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)), getvariableofnpc(.movepathy[.@pos], strnpcinfo(3)); - } - else if (.@cmd$ == "goto") - { - set getvariableofnpc(.movepos, strnpcinfo(3)), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - return 0; - } - else if (.@cmd$ == "rmove") - { - getmapxy(.@mapName$, .@x, .@y, 1); - npcwalkto .@x + getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)), .@y + getvariableofnpc(.movepathy[.@pos], strnpcinfo(3)); - } - else if (.@cmd$ == "speed") - { - .speed = getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); - return 2; - } - else if (.@cmd$ == "sit") - { - npcsit; - } - else if (.@cmd$ == "stand") - { - npcstand; - } - return 1; -} - -function script movetonextpos { - .@wait = getvariableofnpc(.waitticks, strnpcinfo(3)); - if (.@wait > 0) - { - .@wait --; - //debugmes "wait"; - set getvariableofnpc(.waitticks, strnpcinfo(3)), .@wait; - return; - } - .@true = 1; - while (.@true) - { - .@true = 0; - .@pos = getvariableofnpc(.movepos, strnpcinfo(3)); - //debugmes "movetonextpos: " + str(.@pos); - .@res = domoveaction(.@pos); - if (.@res == 1 || .@res == 2) - { - .@pos++; - if (.@pos >= getarraysize(getvariableofnpc(.movepathx, strnpcinfo(3)))) - .@pos = 0; - set getvariableofnpc(.movepos, strnpcinfo(3)), .@pos; - } - if (.@res == 0 || .@res == 2) - { - .@true = 1; - } - } - return; -} - -function script initialmove { - set getvariableofnpc(.movepos, strnpcinfo(3)), 0; - set getvariableofnpc(.waitticks, strnpcinfo(3)), -1; - movetonextpos; - return; -} - -function script getmovecmd { - .@pos = getvariableofnpc(.movepos, strnpcinfo(3)); - if (.@pos >= getarraysize(getvariableofnpc(.movepathx, strnpcinfo(3))) || .@pos < 0) - return ""; - return getvariableofnpc(.movepathcmd$[.@pos], strnpcinfo(3)); -} - -function script domovestep { - if (isunitwalking()) - { - initnpctimer; - end; - } - movetonextpos; - initnpctimer; - end; -} diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt deleted file mode 100644 index 54e4e783..00000000 --- a/npc/functions/npcmovegraph.txt +++ /dev/null @@ -1,485 +0,0 @@ -// Evol functions. -// Author: -// Travolta -// Description: -// Moving npc utility functions (graph-based) -// Variables: -// none - -function script initmovegraph { - deletearray getvariableofnpc(.movegraphcmd$, strnpcinfo(3)); - deletearray getvariableofnpc(.movegraphlabels$, strnpcinfo(3)); - deletearray getvariableofnpc(.movegraphweight, strnpcinfo(3)); - deletearray getvariableofnpc(.movegraphflags, strnpcinfo(3)); - deletearray getvariableofnpc(.movepos_y1, strnpcinfo(3)); - deletearray getvariableofnpc(.movepos_x1, strnpcinfo(3)); - deletearray getvariableofnpc(.movepos_x2, strnpcinfo(3)); - deletearray getvariableofnpc(.movepos_y2, strnpcinfo(3)); - .@cnt = 0; - - for (.@f = 0; .@f < getargcount();) - { - set getvariableofnpc(.movegraphlabels$[.@cnt], strnpcinfo(3)), getarg(.@f++); - set getvariableofnpc(.movepos_x1[.@cnt], strnpcinfo(3)), getarg(.@f++); - set getvariableofnpc(.movepos_y1[.@cnt], strnpcinfo(3)), getarg(.@f++); - if (!isstr(getarg(.@f, "label"))) - { - set getvariableofnpc(.movepos_x2[.@cnt], strnpcinfo(3)), getarg(.@f++); - set getvariableofnpc(.movepos_y2[.@cnt], strnpcinfo(3)), getarg(.@f++); - } - .@cnt ++; - } - return; -} - -function script findmovegraphlabel { - if (!getargcount()) - { - consolemes(CONSOLEMES_DEBUG, "findmovegraphlabel: no argument"); - return -1; - } - if (!isstr(getarg(0))) - { - consolemes(CONSOLEMES_DEBUG, "findmovegraphlabel: need string argument"); - return -1; - } - - .@arg$ = getarg(0); - for (.@i = 0; .@i < getarraysize(getvariableofnpc(.movegraphlabels$, strnpcinfo(3))); .@i++) - { - if (getvariableofnpc(.movegraphlabels$[.@i], strnpcinfo(3)) == .@arg$) - return .@i; - } - - npcdebug "findmovegraphlabel: label not found: " + getarg(0); - return -1; -} - -/* setmovegraphcmd(fromPositionLabel,toPositionLabel[,moveChanceWeight[,moveFlags]],postCommand, ...); - * This function manipulates NPC moving graph. Before calling it, make sure - * `initmovegraph' was called. The function accepts 3-5 parameters (many times): - * fromPositionLabel, toPositionLabel -- starting and ending position of NPC move - * moveChanceWeight -- positive integer, represents the chance of moving in given direction. (optional) - * moveFlags -- if .mg_flags & moveFlags != 0, move is possible. (optional) - * postCommand -- either "moveon" (start moving to next location straight after arriving from - * fromPositionLabel to toPositionLabel) or a semicolon-separated set of commands - * ("wait 3", "emote 5" etc, see `execmovecmd') that will be executed after arrival. - * The commands don't have to end with ";moveon", it's executed in the end by default. - */ -function script setmovegraphcmd { - .@size = getarraysize(getvariableofnpc(.movepos_x1, strnpcinfo(3))); - - for (.@f = 0; .@f < getargcount();) - { - .@from = findmovegraphlabel(getarg(.@f++)); - .@to = findmovegraphlabel(getarg(.@f++)); - .@weight = 1; - if (!isstr(getarg(.@f))) - .@weight = getarg(.@f++); - .@flags = 0xffff; - if (!isstr(getarg(.@f))) - .@flags = getarg(.@f++); - .@cmd$ = getarg(.@f++); - .@index = .@from * .@size + .@to; // emulation of 2d array - set getvariableofnpc(.movegraphcmd$[.@index], strnpcinfo(3)), .@cmd$; - set getvariableofnpc(.movegraphweight[.@index], strnpcinfo(3)), .@weight; - set getvariableofnpc(.movegraphflags[.@index], strnpcinfo(3)), .@flags; - } - return; -} - -function script execmovecmd { - - explode(.@cmd$, getarg(0), " "); - - if (.@cmd$[0] == "moveon") - { - return 0; - } - else if (.@cmd$[0] == "dir") - { - .dir = atoi(.@cmd$[1]); - } - else if (.@cmd$[0] == "sit") - { - npcsit; - } - else if (.@cmd$[0] == "stand") - { - npcstand; - } - else if (.@cmd$[0] == "wait") - { - set getvariableofnpc(.waitticks, strnpcinfo(3)), atoi(.@cmd$[1]); - return 1; - } - else if (.@cmd$[0] == "emote") - { - unitemote getnpcid(), atoi(.@cmd$[1]); - } - else if (.@cmd$[0] == "class") - { - .class = atoi(.@cmd$[1]); - } - else if (.@cmd$[0] == "warp") - { - .@pos = -1; - .@map$ = ""; - .@pos_idx = 1; - if (getarraysize(.@cmd$) == 3) - { - .@map$ = .@cmd$[1]; - .@pos_idx = 2; - } - .@pos = findmovegraphlabel(.@cmd$[.@pos_idx]); - if (.@pos != -1) - { - .@x = getvariableofnpc(.movepos_x1[.@pos], strnpcinfo(3)); - .@y = getvariableofnpc(.movepos_y1[.@pos], strnpcinfo(3)); - if (getstrlen(.@map$) > 0) - unitwarp getnpcid(), .@map$, .@x, .@y; - else - movenpc strnpcinfo(3), .@x, .@y; - set getvariableofnpc(.movepos, strnpcinfo(3)), .@pos; - } - else - { - consolemes(CONSOLEMES_DEBUG, "execmovecmd: unknown WARP destination label: " + .@cmd$[1]); - } - } - else if (.@cmd$[0] == "call") - { - switch (getarraysize(.@cmd$)) - { - case 1: - consolemes(CONSOLEMES_DEBUG, "execmovecmd: CALL command needs some parameters"); - return 0; - case 2: - return callfunc(.@cmd$[1]); - break; - case 3: - return callfunc(.@cmd$[1], .@cmd$[2]); - case 4: - default: - return callfunc(.@cmd$[1], .@cmd$[2], .@cmd$[3]); - } - } - else if (.@cmd$[0] == "speed") - { - .speed = atoi(.@cmd$[1]); - } - else if (.@cmd$[0] == "say") - { - deletearray .@cmd$[0], 1; - npctalk implode(.@cmd$, " "); - } - else if (.@cmd$[0] == "debugmes") - { - deletearray .@cmd$[0], 1; - consolemes(CONSOLEMES_DEBUG, implode(.@cmd$, " ")); - } - else if (.@cmd$[0] == "flags") - { - set getvariableofnpc(.mg_flags, strnpcinfo(3)), axtoi(.@cmd$[1]); - } - else if (.@cmd$[0] == "flags_0") - { - .@flags = getvariableofnpc(.mg_flags, strnpcinfo(3)); - .@flags &= ~axtoi(.@cmd$[1]); - set getvariableofnpc(.mg_flags, strnpcinfo(3)), .@flags; - } - else if (.@cmd$[0] == "flags_1") - { - .@flags = getvariableofnpc(.mg_flags, strnpcinfo(3)); - .@flags |= axtoi(.@cmd$[1]); - set getvariableofnpc(.mg_flags, strnpcinfo(3)), .@flags; - } - else - { - consolemes(CONSOLEMES_DEBUG, "Unknown move graph cmd: " + .@cmd$[0]); - } - return 0; -} - -function script getnextmovecmd { - .@cmds$ = getvariableofnpc(.nextcmd$, strnpcinfo(3)); - .@firstCmd$ = .@cmds$; - .@restCmd$ = "moveon"; - .@index = strpos(.@cmds$, ";"); - if (.@index >= 0) - { - .@firstCmd$ = substr(.@cmds$, 0, .@index - 1); - .@restCmd$ = substr(.@cmds$, .@index + 1, getstrlen(.@cmds$) - 1); - } - // npcdebug "firstCmd = " + .@firstCmd$ + " restCmd = " + .@restCmd$; - set getvariableofnpc(.nextcmd$, strnpcinfo(3)), .@restCmd$; - return strip(.@firstCmd$); -} - -// getrandompoint(x1,y1,x2,y2) -// -- Get a random walkable point within a map rectangle -// x1, y1 -- top-left corner of rectangle -// x2, y2 -- bottom-right corner of rectangle -// Returns 0 on success and -1 on error; -// Since we cannot return multiple values, the random -// coordinates are stored in NPC variables .move__rand_x, .move__rand_y -function script getrandompoint { - if (getargcount() < 4) - { - consolemes(CONSOLEMES_DEBUG, "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments"); - return -1; - } - - .@max_pokes = 10; - .@x1 = getarg(0); - .@y1 = getarg(1); - .@x2 = getarg(2); - .@y2 = getarg(3); - .@rx = -1; .@ry = -1; - - getmapxy(.@map$, .@cx, .@cy, 1); // npc location - - // let's try max_pokes random cells - for (.@poke = 0; .@poke < .@max_pokes; .@poke++) - { - .@rx = rand(.@x1, .@x2); - .@ry = rand(.@y1, .@y2); - if (checknpccell(.@map$, .@rx, .@ry, cell_chkpass)) - goto L_Found; - } - - // we check each cell from random middle point to the end - for (;.@rx <= .@x2; .@rx++) - { - for (;.@ry <= .@y2; .@ry++) - if (checknpccell(.@map$, .@rx, .@ry, cell_chkpass)) - goto L_Found; - .@ry = .@y1; - } - - // we check the rectangle from beginning to end - for (.@rx = .@x1; .@rx <= .@x2; .@rx++) - for (.@ry = .@y1; .@ry <= .@y2; .@ry++) - if (checknpccell(.@map$, .@rx, .@ry, cell_chkpass)) - goto L_Found; - - // finally, if we don't find anything - consolemes(CONSOLEMES_DEBUG, "error: getrandompoint: cannot find walkable cell in rectangle [(" + .@x1 + "," + .@y1 + ") , (" + .@x2 + "," + .@y2 + ")]"); - return -1; - -L_Found: - set getvariableofnpc(.move__rand_x, strnpcinfo(3)), .@rx; - set getvariableofnpc(.move__rand_y, strnpcinfo(3)), .@ry; - return 0; -} - -// wrapper function for npcwalkto. It can accept 4 parameters. -// If #3 and #4 params are set, the walkto location is chosen -// from rectangle (x1,y1,x2,y2). -// It sets the npc variables .move_target_x, .move_target_y -// that are used to resume NPC walking -// Returns 1 if walking is possible, 0 otherwise; -function script mg_npcwalkto { - if (getargcount() < 2) - { - consolemes(CONSOLEMES_DEBUG, "usage: mg_npcwalkto(x1,y1[,x2,y2])"); - return -1; - } - - .@x = getarg(0); - .@y = getarg(1); - .@x2 = getarg(2); - .@y2 = getarg(3); - - if (getargcount() >= 4 && .@x2 > 0 && .@y2 > 0) - if (!getrandompoint(.@x, .@y, .@x2, .@y2)) - { - .@x = getvariableofnpc(.move__rand_x, strnpcinfo(3)); - .@y = getvariableofnpc(.move__rand_y, strnpcinfo(3)); - } - else - return 0; - - if (npcwalkto(.@x, .@y)) - { - set getvariableofnpc(.move_target_x, strnpcinfo(3)), .@x; - set getvariableofnpc(.move_target_y, strnpcinfo(3)), .@y; - return 1; - } - return 0; -} - -function script movetonextpoint { - .@wait = getvariableofnpc(.waitticks, strnpcinfo(3)); - if (.@wait > 0) - { - .@wait--; - set getvariableofnpc(.waitticks, strnpcinfo(3)), .@wait; - return; - } - - .@nextcmd$ = ""; - while (.@nextcmd$ != "moveon") - { - .@nextcmd$ = getnextmovecmd(); - npcdebug " " + .@nextcmd$; - if (execmovecmd(.@nextcmd$)) - return; - } - - // choose a random path from all possible paths - .@size = getarraysize(getvariableofnpc(.movepos_x1, strnpcinfo(3))); - .@pos = getvariableofnpc(.movepos, strnpcinfo(3)); - .@curr_flags = getvariableofnpc(.mg_flags, strnpcinfo(3)); - .@cur = 0; - .@weight_sum = 0; - // .@dbg$ = getvariableofnpc(.movegraphlabels$[.@pos], strnpcinfo(3)) + ": "; - - for (.@i = 0; .@i < .@size; .@i++) - { - .@index = .@pos * .@size + .@i; - .@cmd$ = getvariableofnpc(.movegraphcmd$[.@index], strnpcinfo(3)); - .@flags = getvariableofnpc(.movegraphflags[.@index], strnpcinfo(3)); - if (.@cmd$ != "" && - .@curr_flags & .@flags) - { - .@nextpos[.@cur] = .@i; - .@weights[.@cur] = getvariableofnpc(.movegraphweight[.@index], strnpcinfo(3)); - // .@dbg$ += getvariableofnpc(.movegraphlabels$[.@i], strnpcinfo(3)) + "=" + .@weights[.@cur] + " "; - .@weight_sum += .@weights[.@cur]; - .@cur++; - } - } - // npcdebug .@dbg$; - - if (!.@weight_sum) - { - npcdebug("error: cannot pick next walk point. flags=" + - getvariableofnpc(.mg_flags, strnpcinfo(3))); - return; - } - - .@pick_tries = 0; -L_TryPick: - // pick a random number based on weight_sum - .@rnd = rand(.@weight_sum); - .@k = -1; .@weight_sum = 0; - while (.@rnd >= .@weight_sum) - { - .@k++; - .@weight_sum += .@weights[.@k]; - } - - .@next_idx = .@nextpos[.@k]; - .@next_x1 = getvariableofnpc(.movepos_x1[.@next_idx], strnpcinfo(3)); - .@next_y1 = getvariableofnpc(.movepos_y1[.@next_idx], strnpcinfo(3)); - .@next_x2 = getvariableofnpc(.movepos_x2[.@next_idx], strnpcinfo(3)); - .@next_y2 = getvariableofnpc(.movepos_y2[.@next_idx], strnpcinfo(3)); - - if (!mg_npcwalkto(.@next_x1, .@next_y1, .@next_x2, .@next_y2)) - { - if (.@pick_tries < 10) - { - .@pick_tries++; - goto L_TryPick; - } - - // move to a nearby position - .@x1 = getvariableofnpc(.movepos_x1[.@pos], strnpcinfo(3)); - .@y1 = getvariableofnpc(.movepos_y1[.@pos], strnpcinfo(3)); - .@x2 = getvariableofnpc(.movepos_x2[.@pos], strnpcinfo(3)); - .@y2 = getvariableofnpc(.movepos_y2[.@pos], strnpcinfo(3)); - mg_npcwalkto(.@x1, .@y1, .@x2, .@y2); - set getvariableofnpc(.nextcmd$, strnpcinfo(3)), "wait 1"; - - return; - } - - if (getvariableofnpc(.debug, strnpcinfo(3))) - { - getmapxy(.@map$, .@cx, .@cy, 1); - .@dist = distance(.@cx, .@cy, .@next_x1, .@next_y1); - npcdebug("moving to " + getvariableofnpc(.movegraphlabels$[.@next_idx], strnpcinfo(3)) + - " ("+ getvariableofnpc(.move_target_x, strnpcinfo(3)) + - "," + getvariableofnpc(.move_target_y, strnpcinfo(3)) + - ") [distance=" + .@dist + - "] flags=" + getvariableofnpc(.mg_flags, strnpcinfo(3))); - } - - .@nextcmd$ = getvariableofnpc(.movegraphcmd$[.@pos * .@size + .@next_idx], strnpcinfo(3)); - set getvariableofnpc(.nextcmd$, strnpcinfo(3)), .@nextcmd$; - set getvariableofnpc(.movepos, strnpcinfo(3)), .@next_idx; - return; -} - -// initial actions for npc when using move graphs. -// function can accept 2 arguments: -// 1: action sequence, for example "speed 200; dir 4". Default is "moveon" -// 2: start point label. Default is #0 from move graph labels -function script firstmove { - .@nextcmd$ = getarg(0, "moveon"); - .@initpos = findmovegraphlabel(getarg(1, "")); - if (.@initpos < 0) .@initpos = 0; - - set getvariableofnpc(.movepos, strnpcinfo(3)), .@initpos; - movenpc strnpcinfo(3), getvariableofnpc(.movepos_x1[.@initpos], strnpcinfo(3)), - getvariableofnpc(.movepos_y1[.@initpos], strnpcinfo(3)); - set getvariableofnpc(.nextcmd$, strnpcinfo(3)), .@nextcmd$; - set getvariableofnpc(.waitticks, strnpcinfo(3)), -1; - set getvariableofnpc(.mg_flags, strnpcinfo(3)), 0xffff; - movetonextpoint; - return; -} - -function script npc_pausemove { - stopnpctimer; - .@move_after = 0; - - if (isunitwalking()) - { - .@move_after = 1; - npcwalkto .x, .y; - npcstop; - } - set getvariableofnpc(.move_after_pause, strnpcinfo(3)), .@move_after; - - return 0; -} - -function script npc_resumemove { - startnpctimer; - - if (getvariableofnpc(.move_after_pause, strnpcinfo(3))) - { - .@x = getvariableofnpc(.move_target_x, strnpcinfo(3)); - .@y = getvariableofnpc(.move_target_y, strnpcinfo(3)); - npcwalkto .@x, .@y; - } - - return 0; -} - -// npc_turntoxy(x,y) -// turn npc toward an object at position (x,y) -function script npc_turntoxy { - .@target_x = getarg(0); - .@target_y = getarg(1); - .@dx = abs(.@target_x - .x); - .@dy = abs(.@target_y - .y); - - if (.@dx > .@dy) - .dir = .@target_x >= .x ? 6 : 2; - else - .dir = .@target_y >= .y ? 0 : 4; - - return 0; -} - -function script dographmovestep { - if (!isunitwalking()) - { - movetonextpoint; - } - initnpctimer; - end; -} diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt deleted file mode 100644 index cb1a0b11..00000000 --- a/npc/functions/openbook.txt +++ /dev/null @@ -1,34 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Narrator dialogue to show the selected book. - -function script openbook { - .@book_name$ = getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0))); - - narrator(S_LAST_NEXT, - l("You open a book named \"%s\".", .@book_name$), - l("Do you want to read it?")); - - return (select("Yes.", "No.") == 1); -} - -function script openbookshelf { - .@book_name$ = getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0))); - - narrator(S_LAST_NEXT, - l("You see a dust covered book on the shelf..."), - l("The name of the book is \"%s\".", .@book_name$), - l("Do you want to read it?")); - - return (select("Yes.", "No.") == 1); -} - -function script openoldbook { - narrator S_LAST_NEXT, - l("You open the book, but it looks like the sea water and time damaged it severely. Some pages are not readable anymore. Some others are simply missing."), - l("The old book seems to tell about the legend of Aemil. Would you like to read it?"); - - return (select("Yes.", "No.") == 1); -} diff --git a/npc/functions/permissions.txt b/npc/functions/permissions.txt deleted file mode 100644 index 96e69fde..00000000 --- a/npc/functions/permissions.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Description: -// checks player permissions -// ** admins are implicitly everything - -// administrator -function script is_admin { - return has_permission(PERM_USE_ALL_COMMANDS, getarg(0, getcharid(CHAR_ID_ACCOUNT))); -} - -// any staff member -function script is_trusted { - return is_admin(getarg(0, getcharid(CHAR_ID_ACCOUNT))) || - has_permission("show_client_version", getarg(0, getcharid(CHAR_ID_ACCOUNT))); -} - -// developer -function script is_dev { - return is_admin(getarg(0, getcharid(CHAR_ID_ACCOUNT))) || - has_permission(PERM_RECEIVE_REQUESTS, getarg(0, getcharid(CHAR_ID_ACCOUNT))); -} - -// event coordinator -function script is_evtc { - return is_admin(getarg(0, getcharid(CHAR_ID_ACCOUNT))) || - can_use_command("@monster", getarg(0, getcharid(CHAR_ID_ACCOUNT))); -} - -// game master -function script is_gm { - return is_admin(getarg(0, getcharid(CHAR_ID_ACCOUNT))) || - can_use_command("@jail", getarg(0, getcharid(CHAR_ID_ACCOUNT))); -} diff --git a/npc/functions/player-cache.txt b/npc/functions/player-cache.txt deleted file mode 100644 index f134f953..00000000 --- a/npc/functions/player-cache.txt +++ /dev/null @@ -1,501 +0,0 @@ -// Player cache system -// -// Holds a cache of online players in-memory even after logout. This greatly -// reduces the need to query the SQL database for data that is frequently -// accessed. -// -// NOTE: This NPC uses the new public/private function call system to avoid -// polluting the global function namespace -// -// Example usage: -// .@account_id = "playerCache"::name2account("Reid"); -// - -- script playerCache FAKE_NPC,{ - /** - * "playerCache"::name2account("char name") => account id - * - * Searches through the player cache to convert a char name to a account ID. - * If the player is not found, checks the SQL table. If the player doesn't - * exist, returns false. - * - * @param 0 - the char name to search - * @return the account id of the char - */ - public function name2account { - if (getarg(0) == "") { - return false; - } - - if (.@acc = getcharid(CHAR_ID_ACCOUNT, getarg(0))) { - // player is currently online - return .@acc; - } - - if (.@acc = htget(.name_to_account, getarg(0), 0)) { - // player found in the hash table - return .@acc; - } - - // player still not found: now we try SQL - .@name$ = escape_sql(getarg(0)); - - if (SERVER_USES_VAULT) { - query_sql(sprintf("SELECT c.account_id, c.char_id, r.value " - "FROM `char` c " - "JOIN `global_acc_reg_num_db` r ON r.account_id = c.account_id " - "WHERE r.key = '##VAULT' AND r.index = 0 AND c.name = '%s' " - "LIMIT 1;", .@name$), - .@acc, .@char, .@vault); - - if (.@vault > 0) { - .vault_to_account[.@vault] = .@acc; - .account_to_vault[.@acc] = .@vault; - } - } else { - query_sql(sprintf("SELECT account_id, char_id FROM `char` WHERE `name`='%s' LIMIT 1;", .@name$), .@acc, .@char); - } - - if (.@acc > 0) { - // player found: add to our cache - htput(.name_to_account, getarg(0), .@acc); - .account_to_name$[.@acc] = getarg(0); - htput(.name_to_char, getarg(0), .@char); - .char_to_name$[.@char] = getarg(0); - - return .@acc; - } - - // player doesn't exist - return false; - } - - /** - * "playerCache"::name2char("char name") => char id - * - * Searches through the player cache to convert a char name to a char ID. - * If the player is not found, checks the SQL table. If the player doesn't - * exist, returns false. - * - * @param 0 - the char name to search - * @return the char id of the char - */ - public function name2char { - if ((.@acc = name2account(getarg(0))) != 0) { - return htget(.name_to_char, getarg(0), false); - } - - return false; - } - - /** - * "playerCache"::char2account(char id) => account id - * - * Searches through the player cache to convert a char ID to an account ID. - * If the player is not found, checks the SQL table. If the player doesn't - * exist, returns false. - * - * @param 0 - the char ID to search - * @return the account id of the char - */ - public function char2account { - if (getarg(0) == 0) { - return false; - } - - .@name$ = .char_to_name$[getarg(0)]; - - if (.@name$ != "") { - if (.@acc = getcharid(CHAR_ID_ACCOUNT, .@name$)) { - // player is currently online - return .@acc; - } - - if (.@acc = htget(.name_to_account, .@name$, 0)) { - // player found in the hash table - return .@acc; - } - } - - // player still not found: now we try SQL - if (SERVER_USES_VAULT) { - query_sql(sprintf("SELECT c.account_id, c.name, r.value " - "FROM `char` c " - "JOIN `global_acc_reg_num_db` r ON r.account_id = c.account_id " - "WHERE r.key = '##VAULT' AND r.index = 0 AND c.char_id = '%d' " - "LIMIT 1;", getarg(0)), - .@acc, .@name$, .@vault); - - if (.@vault > 0) { - .vault_to_account[.@vault] = .@acc; - .account_to_vault[.@acc] = .@vault; - } - } else { - query_sql(sprintf("SELECT account_id, name FROM `char` WHERE `char_id`='%d' LIMIT 1;", getarg(0)), .@acc, .@name$); - } - - if (.@acc > 0) { - // player found: add to our cache - htput(.name_to_account, .@name$, .@acc); - .account_to_name$[.@acc] = .@name$; - htput(.name_to_char, .@name$, getarg(0)); - .char_to_name$[getarg(0)] = .@name$; - - return .@acc; - } - - // player doesn't exist - return false; - } - - /** - * "playerCache"::account2char(account id) => char id - * - * Searches through the player cache to convert an account ID into a - * char ID. If the player is not found, returns false. - * - * NOTE: this is a weak reference; an account ID does not uniquely identify - * a character - * - * @param 0 - the account ID to search for - * @return the char ID of the char - */ - public function account2char { - if (getarg(0) == 0) { - return false; - } - - if ((.@name$ = strcharinfo(PC_NAME, "", getarg(0))) != "") { - // player is online - return getcharid(CHAR_ID_CHAR, .@name$); - } else if ((.@name$ = .account_to_name$[getarg(0)]) != "") { - // found in our cache - return htget(.name_to_char, .@name$, false); - } - - // player still not found: now we try SQL - if (SERVER_USES_VAULT) { - query_sql(sprintf("SELECT c.char_id, c.name, r.value " - "FROM `char` c " - "JOIN `global_acc_reg_num_db` r ON r.account_id = c.account_id " - "WHERE r.key = '##VAULT' AND r.index = 0 AND c.account_id = '%d' " - "ORDER BY c.last_login DESC LIMIT 1;", getarg(0)), - .@char, .@name$, .@vault); - - if (.@vault > 0) { - .vault_to_account[.@vault] = getarg(0); - .account_to_vault[getarg(0)] = .@vault; - } - } else { - query_sql(sprintf("SELECT char_id, name FROM `char` WHERE account_id='%d' ORDER BY last_login DESC LIMIT 1;", getarg(0)), .@char, .@name$); - } - - if (.@char > 0) { - // player found: add to our cache - htput(.name_to_account, .@name$, getarg(0)); - .account_to_name$[getarg(0)] = .@name$; - htput(.name_to_char, .@name$, .@char); - .char_to_name$[.@char] = .@name$; - - return .@char; - } - - // not found - return false; - } - - /** - * "playerCache"::account2name(account id) => char name - * - * Searches through the player cache to convert an account ID into a - * char name. If the account is not found, returns an empty string. - * - * NOTE: this is a weak reference; an account ID does not uniquely identify - * a character - * - * @param 0 - the account ID to search for - * @return the name of the char - */ - public function account2name { - if ((.@char = account2char(getarg(0))) != false) { - return .char_to_name$[.@char]; - } - - return ""; - } - - /** - * "playerCache"::char2name(char id) => char name - * - * Searches through the player cache to convert a char ID to a char name. - * If the player is not found, checks the SQL table. If the player doesn't - * exist, returns an empty string. - * - * @param 0 - the char ID to search - * @return the name of the char - */ - public function char2name { - if ((.@acc = char2account(getarg(0))) != 0) { - return .account_to_name$[.@acc]; - } - - // player not found - return ""; - } - - /** - * "playerCache"::vault2account(vault id) => account id - * - * Searches through the player cache to convert a Vault account ID into a - * game account ID. If the account is not found, returns false - * - * NOTE: this is a weak reference; a Vault ID does not uniquely identify - * a game account - * - * @param 0 - the Vault ID to search for - * @return the account id of the char - */ - public function vault2account { - if (getarg(0) == 0) { - return false; - } - - if (!SERVER_USES_VAULT) { - return getarg(0); - } else if (.@acc = .vault_to_account[getarg(0)]) { - // found in the cache - return .@acc; - } - - // player still not found: now we try SQL - query_sql(sprintf("SELECT c.account_id, c.char_id, c.name " - "FROM `char` c " - "JOIN `global_acc_reg_num_db` r ON r.account_id = c.account_id " - "WHERE r.key = '##VAULT' AND r.index = 0 AND r.value = %d " - "ORDER BY c.`last_login` DESC LIMIT 1;", getarg(0)), - .@acc, .@char, .@name$); - - if (.@char > 0) { - // player found: add to our cache - htput(.name_to_account, .@name$, .@acc); - .account_to_name$[.@acc] = .@name$; - htput(.name_to_char, .@name$, .@char); - .char_to_name$[.@char] = .@name$; - .vault_to_account[getarg(0)] = .@acc; - .account_to_vault[.@acc] = getarg(0); - - return .@acc; - } - - return false; - } - - /** - * "playerCache"::vault2char(vault id) => char id - * - * Searches through the player cache to convert a Vault account ID into a - * char id. If the player is not found, returns false - * - * NOTE: this is a weak reference; a Vault ID does not uniquely identify - * a character - * - * @param 0 - the Vault ID to search for - * @return the char id - */ - public function vault2char { - if ((.@acc = vault2account(getarg(0))) != 0) { - return account2char(.@acc); - } - - // player not found - return false; - } - - /** - * "playerCache"::vault2name(vault id) => account id - * - * Searches through the player cache to convert a Vault account ID into a - * char name. If the player is not found, returns an empty string - * - * NOTE: this is a weak reference; a Vault ID does not uniquely identify - * a character - * - * @param 0 - the Vault ID to search for - * @return the name of the char - */ - public function vault2name { - if ((.@acc = vault2account(getarg(0))) != 0) { - return account2name(.@acc); - } - - // player not found - return ""; - } - - /** - * "playerCache"::account2vault(account id) => vault id - * - * Searches through the player cache to convert a game account ID into a - * Vault account ID. If the account is not found, returns false - * - * @param 0 - the account ID to search for - * @return the Vault ID associated with the account - */ - public function account2vault { - if (!SERVER_USES_VAULT) { - return getarg(0); - } - - account2char(getarg(0)); // will fetch vault id - return .account_to_vault[getarg(0)]; - } - - /** - * "playerCache"::name2vault(char name) => vault id - * - * Searches through the player cache to convert a character name into a - * Vault account ID. If the account is not found, returns false - * - * @param 0 - the char name to search for - * @return the Vault ID associated with the account - */ - public function name2vault { - return account2vault(name2account(getarg(0))); - } - - /** - * "playerCache"::char2vault(char id) => vault id - * - * Searches through the player cache to convert a char id into a - * Vault account ID. If the account is not found, returns false - * - * @param 0 - the char id to search for - * @return the Vault ID associated with the account - */ - public function char2vault { - return account2vault(char2account(getarg(0))); - } - - /** - * Registers a public local function that will be called when the char name - * associated with an account changes. The previous account ID will be - * passed as first argument to the provided function. - * - * @param 0 - the public local function - */ - public function addNameHandler { - return addEventListener(.name_handlers, getarg(0)); - } - - /** - * Registers a public local function that will be called when the account - * associated with a Vault account changes. The previous account id will be - * passed as first argument to the provided function and the previous - * char name will be passed as second argument. - * - * @param 0 - the public local function - */ - public function addVaultHandler { - return addEventListener(.vault_handlers, getarg(0)); - } - - - -//////////////////////////////////////////////////////////////////////////////// - - /** - * updates the char name cache and fires event handlers when the name - * associated with an account changes (such as when switching char) - */ - private function updateName { - // get the cached name: - .@old$ = .account_to_name$[playerattached()]; - - // now update the cache: - htput(.name_to_account, strcharinfo(PC_NAME), playerattached()); - .account_to_name$[playerattached()] = strcharinfo(PC_NAME); - htput(.name_to_char, strcharinfo(PC_NAME), getcharid(CHAR_ID_CHAR)); - .char_to_name$[getcharid(CHAR_ID_CHAR)] = strcharinfo(PC_NAME); - - if (.@old$ != "" && .@old$ != .account_to_name$[playerattached()]) { - // fire event handlers - dispatchEvent(.name_handlers, .@old$); - return true; - } - - return false; - } - - /** - * updates the Vault account cache and fires event handlers when the account - * associated with a Vault account changes (different game account on same - * Vault account) - */ - private function updateVault { - // get the cached id: - .@old = .vault_to_account[getvaultid()]; - .@old$ = .account_to_name$[.@old]; - - // now update the cache: - .vault_to_account[getvaultid()] = playerattached(); - .account_to_vault[playerattached()] = getvaultid(); - - if (.@old > 0 && .@old != .vault_to_account[getvaultid()]) { - // fire event handlers - dispatchEvent(.vault_handlers, .@old, .@old$); - return true; - } - - return false; - } - - /** - * adds/updates the player to the player cache - */ - private function updateCache { - updateName(); - - if (SERVER_USES_VAULT) { - updateVault(); - } - - return; - } - - /** - * force-add all online players to the cache (used on init and reload) - */ - private function forceCache { - .@count = getunits(BL_PC, .@units, false); - - for (.@i = 0; .@i < .@count; ++.@i) { - attachrid(.@units[.@i]); - updateCache(); - detachrid(); - } - - return; - } - -OnPCLoginEvent: - updateCache(); - end; - -OnInit: - .name_to_account = htnew(); // Map - .account_to_name$[0] = ""; // sparse Array indexed by account id - .name_to_char = htnew(); // Map - .char_to_name$[0] = ""; // sparse Array indexed by char id - - if (SERVER_USES_VAULT) { - .vault_to_account[0] = 0; // sparse Array indexed by account id - .account_to_vault[0] = 0; // sparse Array indexed by vault id - } - - // event handlers: - .vault_handlers = htnew(); - .name_handlers = htnew(); - - // reloadscript handler: - forceCache(); -} diff --git a/npc/functions/process_equip.txt b/npc/functions/process_equip.txt new file mode 100755 index 00000000..e18045ff --- /dev/null +++ b/npc/functions/process_equip.txt @@ -0,0 +1,26 @@ + +function script ProcessEquip { + @head = getequipid(equip_head); + @torso = getequipid(equip_torso); + @legs = getequipid(equip_legs); + + @torsoB = @torso; + if (@torsoB >= 2050 && @torsoB <= 2059) set @torsoB, 1202; // Cotton shirt + if (@torsoB >= 2060 && @torsoB <= 2069) set @torsoB, 624; // V Neck + if (@torsoB >= 2070 && @torsoB <= 2079) set @torsoB, 564; // T Neck + if (@torsoB >= 2080 && @torsoB <= 2089) set @torsoB, 720; // Silk Robe + if (@torsoB >= 2090 && @torsoB <= 2099) set @torsoB, 688; // Tanktop + if (@torsoB >= 2120 && @torsoB <= 2129) set @torsoB, 689; // Short tanktop + @torsoC = cNone; + if (@torso == 1202 || @torso == 624 || @torso == 564 || @torso == 688 || @torso == 689 || @torso == 720) set @torsoC, cWhite; + if (@torso >= 2050) set @torsoC, @torso % 10; + + @legsB = @legs; + if (@legsB >= 2100 && @legsB <= 2109) set @legsB, 632; // Cotton skirt + if (@legsB >= 2110 && @legsB <= 2119) set @legsB, 586; // Cotton shorts + @legsC = cNone; + if (@legs == 632 || @legs == 586) set @legsC, cWhite; + if (@legs >= 2050) set @legsC, @legs % 10; + + return; +} diff --git a/npc/functions/quest-debug/000-ShipQuests_Julia.txt b/npc/functions/quest-debug/000-ShipQuests_Julia.txt deleted file mode 100644 index e4e0ec2c..00000000 --- a/npc/functions/quest-debug/000-ShipQuests_Julia.txt +++ /dev/null @@ -1,37 +0,0 @@ -// Julia quest debug -// Author: -// gumi - -function script QuestDebug0 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Julia"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Julia)); - mes "---"; - mes l("Related quests:"); - mes "ShipQuests_Nard: " + getq(ShipQuests_Nard); - mes "ShipQuests_ChefGado: " + getq(ShipQuests_ChefGado); - mes "General_Narrator: " + getq(General_Narrator); - next; - - GenericQuestDebug ShipQuests_Julia, - menuimage("actions/manage", l("Debug Nard quest")), -1, - menuimage("actions/manage", l("Debug Gado quest")), -2, - menuimage("actions/manage", l("Debug Narrator")), -3, - l("Does not have the quest"), 0, - l("Got the quest"), 1, - l("Completed"), 2; - - switch (@menuret) - { - case -1: callfunc "QuestDebug4"; break; - case -2: callfunc "QuestDebug17"; break; - case -3: callfunc "QuestDebug28"; break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/001-ShipQuests_Arpan.txt b/npc/functions/quest-debug/001-ShipQuests_Arpan.txt deleted file mode 100644 index 26c49646..00000000 --- a/npc/functions/quest-debug/001-ShipQuests_Arpan.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Arpan quest debug -// Author: -// gumi - -function script QuestDebug1 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Arpan"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Arpan)); - next; - - GenericQuestDebug ShipQuests_Arpan, - l("Arpan is waiting for you"), 0, - l("Arpan told you to open the chest"), 1, - l("You opened the chest"), 2, - l("Completed"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/002-ShipQuests_Alige.txt b/npc/functions/quest-debug/002-ShipQuests_Alige.txt deleted file mode 100644 index 36d0ce23..00000000 --- a/npc/functions/quest-debug/002-ShipQuests_Alige.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Alige quest debug -// Author: -// gumi - -function script QuestDebug2 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Alige"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Alige)); - next; - - GenericQuestDebug ShipQuests_Alige, - l("Does not have the quest"), 0, - l("First encounter"), 1, - l("Alige asks for food"), 2, - l("Completed"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/003-ShipQuests_Peter.txt b/npc/functions/quest-debug/003-ShipQuests_Peter.txt deleted file mode 100644 index 4732d238..00000000 --- a/npc/functions/quest-debug/003-ShipQuests_Peter.txt +++ /dev/null @@ -1,36 +0,0 @@ -// Peter quest debug -// Author: -// gumi -// jesusalva -// Notes: -// Using l() usually is not a good idea (translating debug text? What?) - -function script QuestDebug3 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Peter"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Peter)); - mes l("Killed mob bitmask: @@", getq2(ShipQuests_Peter)); - mes l("Instance ID: @@", getq3(ShipQuests_Peter)); - next; - - .@q=getq(ShipQuests_Peter); - - GenericQuestDebug ShipQuests_Peter, - l("Does not have the quest"), 0, - l("Peter needs help"), 1, - l("Toggle Tortuga Bounty"), .@q^2, - l("Toggle Ratto Bounty"), .@q^4, - l("Toggle Croc Bounty"), .@q^8, - l("Quest complete"), 15; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/004-ShipQuests_Nard.txt b/npc/functions/quest-debug/004-ShipQuests_Nard.txt deleted file mode 100644 index 9ec51cd8..00000000 --- a/npc/functions/quest-debug/004-ShipQuests_Nard.txt +++ /dev/null @@ -1,38 +0,0 @@ -// Nard quest debug -// Author: -// gumi - -function script QuestDebug4 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Nard"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Nard)); - mes "---"; - mes l("Subquests:"); - mes "ShipQuests_Gugli: " + getq(ShipQuests_Gugli); - mes "ShipQuests_ChefGado: " + getq(ShipQuests_ChefGado); - next; - - GenericQuestDebug ShipQuests_Nard, - l("Does not have the quest"), 0, - l("Nard asks to help crew"), 1, - menuimage("actions/manage", l("Debug Gugli quest")), -1, - l("Completed Gugli's task"), 2, - l("Nard asks to solve conflict"), 3, - menuimage("actions/manage", l("Debug Gado quest")), -2, - l("Solved conflict"), 4, - l("Official crew member"), 5, - l("Talked to narrator"), 6; - - switch (@menuret) - { - case -1: callfunc "QuestDebug16"; break; - case -2: callfunc "QuestDebug17"; break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/005-ShipQuests_Knife.txt b/npc/functions/quest-debug/005-ShipQuests_Knife.txt deleted file mode 100644 index a5ec1ae8..00000000 --- a/npc/functions/quest-debug/005-ShipQuests_Knife.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Knife quest debug -// Author: -// gumi - -function script QuestDebug5 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Knife"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Knife)); - next; - - GenericQuestDebug ShipQuests_Knife, - l("Does not have the quest"), 0, - l("Got the knife"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt b/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt deleted file mode 100644 index 0f77c1b9..00000000 --- a/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Money quest debug -// Author: -// gumi - -function script QuestDebug6 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_ArpanMoney"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_ArpanMoney)); - next; - - GenericQuestDebug ShipQuests_ArpanMoney, - l("Does not have the quest"), 0, - l("Elmo told about money"), 1, - l("Arpan gave money"), 2, - l("Arpan gave clothes"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/007-ShipQuests_Door.txt b/npc/functions/quest-debug/007-ShipQuests_Door.txt deleted file mode 100644 index 88aa00ab..00000000 --- a/npc/functions/quest-debug/007-ShipQuests_Door.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Door quest debug -// Author: -// gumi - -function script QuestDebug7 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Door"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Door)); - next; - - GenericQuestDebug ShipQuests_Door, - l("Does not have the quest"), 0, - l("Heard conversation"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/008-ShipQuests_Couwan.txt b/npc/functions/quest-debug/008-ShipQuests_Couwan.txt deleted file mode 100644 index 3df0cdbf..00000000 --- a/npc/functions/quest-debug/008-ShipQuests_Couwan.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Couwan quest debug -// Author: -// gumi - -function script QuestDebug8 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Couwan"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Couwan)); - next; - - GenericQuestDebug ShipQuests_Couwan, - l("Does not have the quest"), 0, - l("Couwan asks to deliver box"), 1, - l("Delivered box, got reward"), 2; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt b/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt deleted file mode 100644 index 97adef46..00000000 --- a/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Treasure chest quest debug -// Author: -// gumi - -function script QuestDebug9 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_TreasureChest"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_TreasureChest)); - next; - - GenericQuestDebug ShipQuests_TreasureChest, - l("Does not have the quest"), 0, - l("Opened treasure chest"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/010-ShipQuests_Ale.txt b/npc/functions/quest-debug/010-ShipQuests_Ale.txt deleted file mode 100644 index e5422122..00000000 --- a/npc/functions/quest-debug/010-ShipQuests_Ale.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug10 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Ale"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Ale)); - next; - - GenericQuestDebug ShipQuests_Ale, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt b/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt deleted file mode 100644 index aca065ed..00000000 --- a/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug11 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Astapolos"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Astapolos)); - next; - - GenericQuestDebug ShipQuests_Astapolos, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt b/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt deleted file mode 100644 index fac7ccde..00000000 --- a/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug12 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Gulukan"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Gulukan)); - next; - - GenericQuestDebug ShipQuests_Gulukan, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/013-ShipQuests_Jalad.txt b/npc/functions/quest-debug/013-ShipQuests_Jalad.txt deleted file mode 100644 index 9ae6ed2a..00000000 --- a/npc/functions/quest-debug/013-ShipQuests_Jalad.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug13 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Jalad"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Jalad)); - next; - - GenericQuestDebug ShipQuests_Jalad, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/014-ShipQuests_QMuller.txt b/npc/functions/quest-debug/014-ShipQuests_QMuller.txt deleted file mode 100644 index 8a25ee65..00000000 --- a/npc/functions/quest-debug/014-ShipQuests_QMuller.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug14 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_QMuller"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_QMuller)); - next; - - GenericQuestDebug ShipQuests_QMuller, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt b/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt deleted file mode 100644 index 84280ebf..00000000 --- a/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug15 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Tibbo"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Tibbo)); - next; - - GenericQuestDebug ShipQuests_Tibbo, - l("Does not have the quest"), 0, - l("Got the package"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/016-ShipQuests_Gugli.txt b/npc/functions/quest-debug/016-ShipQuests_Gugli.txt deleted file mode 100644 index e4868ff4..00000000 --- a/npc/functions/quest-debug/016-ShipQuests_Gugli.txt +++ /dev/null @@ -1,48 +0,0 @@ -// Part of Gugli quest debug -// Author: -// gumi - -function script QuestDebug16 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_Gugli"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_Gugli)); - mes "---"; - mes l("Subquests:"); - mes "ShipQuests_Ale: " + getq(ShipQuests_Ale); - mes "ShipQuests_Astapolos: " + getq(ShipQuests_Astapolos); - mes "ShipQuests_Gulukan: " + getq(ShipQuests_Gulukan); - mes "ShipQuests_Jalad: " + getq(ShipQuests_Jalad); - mes "ShipQuests_QMuller: " + getq(ShipQuests_QMuller); - mes "ShipQuests_Tibbo: " + getq(ShipQuests_Tibbo); - next; - - GenericQuestDebug ShipQuests_Gugli, - l("Does not have the quest"), 0, - l("Gugli asks to collect packages"), 1, - menuimage("actions/manage", l("Reset subquests")), -1, - menuimage("actions/manage", l("Set subquests as completed")), -2, - l("Got reward from gugli"), 2; - - switch (@menuret) - { - case 0: - case 2: - case -1: - case -2: - .@v = (@menuret == -2 || @menuret == 2); - setq ShipQuests_Ale, .@v; - setq ShipQuests_Astapolos, .@v; - setq ShipQuests_Gulukan, .@v; - setq ShipQuests_Jalad, .@v; - setq ShipQuests_QMuller, .@v; - setq ShipQuests_Tibbo, .@v; - break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt b/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt deleted file mode 100644 index 05e8cdb0..00000000 --- a/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Gado quest debug -// Author: -// gumi - -function script QuestDebug17 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ShipQuests_ChefGado"; - mes "---"; - mes l("Quest state: @@", getq(ShipQuests_ChefGado)); - next; - - GenericQuestDebug ShipQuests_ChefGado, - l("Does not have the quest"), 0, - l("Nard asks to solve conflict"), 1, - l("Got poison from Gado"), 2, - l("Poisoned Julia"), 3, - l("Completed, Gado wins"), 4, - l("Completed, Julia wins (returned poison)"), 5, - l("Completed, Julia wins"), 6; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/018-General_Cookies.txt b/npc/functions/quest-debug/018-General_Cookies.txt deleted file mode 100644 index 16c7bcd7..00000000 --- a/npc/functions/quest-debug/018-General_Cookies.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Cookie quest debug -// Author: -// gumi - -function script QuestDebug18 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Cookies"; - mes "---"; - mes l("Quest state: @@", getq(General_Cookies)); - next; - - GenericQuestDebug General_Cookies, - l("Does not have the quest"), 0, - l("Got a cookie"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt b/npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt deleted file mode 100644 index 11cf3a44..00000000 --- a/npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt +++ /dev/null @@ -1,28 +0,0 @@ -// Lazy brother quest debug -// Author: -// gumi - -function script QuestDebug20 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_LazyBrother"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_LazyBrother)); - next; - - GenericQuestDebug ArtisQuests_LazyBrother, - l("Does not have the quest"), 0, - l("Katja asked for help"), 1, - l("Found bobo, didn't tell Katja"), 2, - l("Told bobo to go home"), 3, - l("Katja gave reward"), 4; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/021-ArtisQuests_Urchin.txt b/npc/functions/quest-debug/021-ArtisQuests_Urchin.txt deleted file mode 100644 index 486cae18..00000000 --- a/npc/functions/quest-debug/021-ArtisQuests_Urchin.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Urchin quest debug -// Author: -// gumi - -function script QuestDebug21 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_Urchin"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_Urchin)); - next; - - GenericQuestDebug ArtisQuests_Urchin, - l("Does not have the quest"), 0, - l("Moon needs @@", l("Croc Claw")), 1, - l("Found @@, got exp", l("Croc Claw")), 2; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt b/npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt deleted file mode 100644 index 9d5afc1c..00000000 --- a/npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Piou quest debug -// Author: -// gumi - -function script QuestDebug22 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_CatchPiou"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_CatchPiou)); - next; - - GenericQuestDebug ArtisQuests_CatchPiou, - l("Does not have the quest"), 0, - l("Salem asks to catch piou"), 1, - l("Returned piou to Salem"), 2; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/023-ArtisQuests_Fishman.txt b/npc/functions/quest-debug/023-ArtisQuests_Fishman.txt deleted file mode 100644 index e3b5ac2e..00000000 --- a/npc/functions/quest-debug/023-ArtisQuests_Fishman.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Eugene quest debug -// Author: -// gumi - -function script QuestDebug23 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_Fishman"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_Fishman)); - next; - - GenericQuestDebug ArtisQuests_Fishman, - l("Does not have the quest"), 0, - l("Eugene needs tentacles"), 1, - l("Gave tentacles, got reward"), 2; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/024-ArtisQuests_QOnan.txt b/npc/functions/quest-debug/024-ArtisQuests_QOnan.txt deleted file mode 100644 index 702ef9be..00000000 --- a/npc/functions/quest-debug/024-ArtisQuests_QOnan.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Q'Onan quest debug -// Author: -// gumi - -function script QuestDebug24 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_QOnan"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_QOnan)); - next; - - GenericQuestDebug ArtisQuests_QOnan, - l("Does not have the quest"), 0, - l("Q'Onan asks to find chest"), 1, - l("Found the chest"), 2, - l("Gave to Q'Onan, got reward"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/026-General_Rumly.txt b/npc/functions/quest-debug/026-General_Rumly.txt deleted file mode 100644 index c533c27a..00000000 --- a/npc/functions/quest-debug/026-General_Rumly.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Rumly quest debug -// Author: -// gumi - -function script QuestDebug26 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Rumly"; - mes "---"; - mes l("Quest state: @@", getq(General_Rumly)); - next; - - GenericQuestDebug General_Rumly, - l("Does not have the quest"), 0, - l("Rumly needs your help"), 1, - l("Rumly wants @@", l("Plushroom")), 2, - l("Gave @@ to Rumly", l("Plushroom")), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/027-ArtisQuests_Enora.txt b/npc/functions/quest-debug/027-ArtisQuests_Enora.txt deleted file mode 100644 index 9121ceb3..00000000 --- a/npc/functions/quest-debug/027-ArtisQuests_Enora.txt +++ /dev/null @@ -1,49 +0,0 @@ -// Newbie quest debug -// Author: -// gumi - -function script QuestDebug27 { - do - { - clear(); - setnpcdialogtitle(l("Quest debug")); - mes("ArtisQuests_Enora"); - mes("---"); - mes(l("Quest state: @@, @@", - getq(ArtisQuests_Enora), - getq2(ArtisQuests_Enora))); - next(); - - GenericQuestDebug(ArtisQuests_Enora, - l("Does not have the quest"), 0, - l("Enora asks to visit Chelios"), 1, - l("Chelios asks to visit Lloyd"), 2, - l("Lloyd gave package"), 3, - l("Chelios made sword"), 4, - l("Enora asks to visit Resa"), 5, - l("Resa gave package"), 6, - l("Enora asks to visit Q'Pid"), 7, - l("Lost the riddle"), 8, - l("Ivan gave package"), 9, - l("Enora asks to kill fluffies"), 10, - l("Completed, got reward"), 11); - - switch (@menuret) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: setq(ArtisQuests_Enora, getq(ArtisQuests_Enora), 0); break; - case 11: setq(ArtisQuests_Enora, getq(ArtisQuests_Enora), 10); break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt b/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt deleted file mode 100644 index 9c0d7945..00000000 --- a/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Fexil quest debug -// Author: -// gumi - -function script QuestDebug29 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_Fexil"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_Fexil)); - next; - - GenericQuestDebug ArtisQuests_Fexil, - l("Does not have the quest"), 0, - l("Lloyd gave pass"), 1, - l("Fexil needs help"), 2, - l("Fexil wants to buy fur"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt b/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt deleted file mode 100644 index 0afb019c..00000000 --- a/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Lloyd quest debug -// Author: -// gumi - -function script QuestDebug30 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_Lloyd"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_Lloyd)); - next; - - GenericQuestDebug ArtisQuests_Lloyd, - l("Does not have the quest"), 0, - l("Registered"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/031-General_Janus.txt b/npc/functions/quest-debug/031-General_Janus.txt deleted file mode 100644 index f97b4fbe..00000000 --- a/npc/functions/quest-debug/031-General_Janus.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Janus quest debug -// Author: -// gumi - -function script QuestDebug31 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Janus"; - mes "---"; - mes l("Quest state: @@", getq(General_Janus)); - next; - - GenericQuestDebug General_Janus, - l("Does not have the quest"), 0, - l("Talked to Janus"), 1, - l("Can create party"), 2, - l("Can create guild"), 3; - - switch (@menuret) - { - case 0: - case 1: skill NV_BASIC, min(6, getskilllv(NV_BASIC)), 0; break; - case 2: - case 3: skill NV_BASIC, max(7, getskilllv(NV_BASIC)), 0; break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt b/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt deleted file mode 100644 index bda45b90..00000000 --- a/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt +++ /dev/null @@ -1,26 +0,0 @@ -// Mona quest debug -// Author: -// gumi - -function script QuestDebug32 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_MonaDad"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_MonaDad)); - next; - - GenericQuestDebug ArtisQuests_MonaDad, - l("Does not have the quest"), 0, - l("Mona's dad is missing"), 1, - l("Mona's dad was rescued"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/033-Artis_Legion_Progress.txt b/npc/functions/quest-debug/033-Artis_Legion_Progress.txt deleted file mode 100644 index ff6f1d16..00000000 --- a/npc/functions/quest-debug/033-Artis_Legion_Progress.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Mona quest debug -// Authors: -// gumi -// monwarez - -function script QuestDebug33 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "Artis_Legion_Progress"; - mes "---"; - mes l("Quest state: @@", getq(Artis_Legion_Progress)); - next; - - GenericQuestDebug Artis_Legion_Progress, - l("Does not have the quest"), 0, - l("Sent to training"), 1, - l("Finished training"), 2, - l("Sent to battle"), 3, - l("Finished battle"), 4, - l("Sent to Q'Anon"), 5, - l("Indefinite Traning"), 6; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt b/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt deleted file mode 100644 index ba72fd07..00000000 --- a/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt +++ /dev/null @@ -1,28 +0,0 @@ -// Training Legion quest -// Authors: -// omatt - -function script QuestDebug34 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArtisQuests_TrainingLegion"; - mes "---"; - mes l("Quest state: @@", getq(ArtisQuests_TrainingLegion)); - next; - - GenericQuestDebug ArtisQuests_TrainingLegion, - l("Does not have the quest"), 0, - l("Finished sword training"), 1, - l("Finished bow training"), 2, - l("Both sword and bow training are finished"), 3, - l("Skill training finished, end of quest"), 4; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/035-ThiefQuests_Artis.txt b/npc/functions/quest-debug/035-ThiefQuests_Artis.txt deleted file mode 100644 index 83f9fb9c..00000000 --- a/npc/functions/quest-debug/035-ThiefQuests_Artis.txt +++ /dev/null @@ -1,38 +0,0 @@ -// Artis Thieves quest debug -// Author: -// Jesusalva -// Field 2: Internal use (gearwheels - odd: collected; even: used) -// Field 3: Internal use (Archive where the file is) - -function script QuestDebug35 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ThiefQuests_Artis"; - mes "---"; - mes l("Quest state: @@", getq(ThiefQuests_Artis)); - .@q2=getq2(ThiefQuests_Artis); - mesf ("Gearwheels: %d (%s)", .@q2/2, (.@q2 % 2 ? "found" : "not found")); - mesf ("Henry's file: %d", getq3(ThiefQuests_Artis)); - next; - - GenericQuestDebug ThiefQuests_Artis, - ("Does not have the quest"), 0, - ("Accepted Townhall Quest"), 1, - ("Townhall arc complete"), 2, - ("Reward taken"), 3, - ("Accepted Legion Quest"), 4, - ("Legion arc comlete"), 5, - ("Reward taken (2)"), 6, - ("Nunia Quest Accepted"), 7, - ("Nunia arc comlete"), 8, - ("Reward taken (3)"), 9; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt b/npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt deleted file mode 100644 index 31183eb8..00000000 --- a/npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Hinnak quest debug -// Author: -// gumi - -function script QuestDebug50 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_Hinnak"; - mes "---"; - mes l("Quest state: @@, @@", - getq(HurnscaldQuests_Hinnak), - getq2(HurnscaldQuests_Hinnak)); - next; - - GenericQuestDebug HurnscaldQuests_Hinnak, - l("Cannot do the quest"), 0, - l("Can do the quest"), 1, - l("Hinnak asked for help"), 2, - l("Helped Hinnak"), 3; - - switch (@menuret) - { - case 0: - case 1: - case 2: setq HurnscaldQuests_Hinnak, getq(HurnscaldQuests_Hinnak), 0; break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt b/npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt deleted file mode 100644 index 44694f06..00000000 --- a/npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Mikhail & Bernard quest debug -// Author: -// gumi - -function script QuestDebug51 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_Soup"; - mes "---"; - mes l("Quest state: @@", - getq(HurnscaldQuests_Soup)); - next; - - GenericQuestDebug HurnscaldQuests_Soup, - l("Cannot do the quest"), 0, - l("Can do the quest"), 1, - l("Bernard wants roasted maggot"), 2, - l("brought maggot"), 3, - l("Bernard wants maggot slime"), 4, - l("brought maggot slime"), 5, - l("Mikhail needs maggot slime"), 6, - l("brought maggot slime"), 7; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt b/npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt deleted file mode 100644 index 72d99242..00000000 --- a/npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt +++ /dev/null @@ -1,41 +0,0 @@ -// Inspector quest debug -// Author: -// gumi - -function script QuestDebug52 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_Inspector"; - mes "---"; - mes l("Quest state: @@", - getq(HurnscaldQuests_Inspector)); - next; - - GenericQuestDebug HurnscaldQuests_Inspector, - l("Cannot do the quest"), 0, - l("Can do the quest"), 1, - l("Talked to Inspector (1)"), 2, - l("Talked to Old Woman (1)"), 3, - l("Talked to Old Woman (2)"), 4, - l("Talked to Inspector (2)"), 5, - l("Talked to Troupe Leader (1)"), 6, - l("Talked to Inspector (3)"), 7, - l("Talked to Old Man"), 8, - l("Talked to Old Woman (3)"), 9, - l("Talked to Inspector (4)"), 10, - l("Talked to Old Woman (4)"), 11, - l("Talked to Malek"), 12, - l("Searched the bookcase"), 13, - l("Talked to Inspector (5)"), 14, - l("Talked to Troupe Leader (2)"), 15, - l("Talked to Inspector (6)"), 16; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt b/npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt deleted file mode 100644 index 2a0993e3..00000000 --- a/npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt +++ /dev/null @@ -1,42 +0,0 @@ -// Jack Lumber quest debug -// Author: -// gumi - -function script QuestDebug53 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_ForestBow"; - mes "---"; - mes l("Quest state: @@", getq(HurnscaldQuests_ForestBow)); - mes "---"; - mes l("Related quests:"); - mes "HurnscaldQuests_WoodenShield: " + getq(HurnscaldQuests_WoodenShield); - next; - - GenericQuestDebug HurnscaldQuests_ForestBow, - menuimage("actions/manage", l("Debug Wooden Shield")), -1, - l("Cannot do the quest"), 0, - l("Can do the quest"), 1, - l("Alan wants to ask Jack"), 2, - l("Jack explained problem"), 3, - l("Alan asks to find wood"), 4, - l("Found perfect wood"), 5, - l("Got the bow"), 6; - - switch (@menuret) - { - case -1: callfunc "QuestDebug40"; break; - case 0: - case 1: - case 2: - case 3: - case 4: setq(HurnscaldQuests_WoodenShield, 0); break; - case 5: - case 6: setq(HurnscaldQuests_WoodenShield, max(1, getq(HurnscaldQuests_WoodenShield))); break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt b/npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt deleted file mode 100644 index 0cb3ee9d..00000000 --- a/npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt +++ /dev/null @@ -1,37 +0,0 @@ -// Jack Lumber quest debug -// Author: -// gumi - -function script QuestDebug54 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_WoodenShield"; - mes "---"; - mes l("Quest state: @@", getq(HurnscaldQuests_WoodenShield)); - mes "---"; - mes l("Related quests:"); - mes "HurnscaldQuests_ForestBow: " + getq(HurnscaldQuests_ForestBow); - next; - - GenericQuestDebug HurnscaldQuests_WoodenShield, - menuimage("actions/manage", l("Debug Forest Bow")), -1, - l("Cannot do the quest"), 0, - l("Can do the quest"), 1, - l("Jack proposes shield"), 2, - l("Accepted the quest"), 3, - l("Got the shield"), 4; - - switch (@menuret) - { - case -1: callfunc "QuestDebug39"; break; - case 1: - case 2: - case 3: - case 4: setq(HurnscaldQuests_ForestBow, max(5, getq(HurnscaldQuests_ForestBow))); break; - default: if (@menuret < 0) return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/055-General_Cooking.txt b/npc/functions/quest-debug/055-General_Cooking.txt deleted file mode 100644 index ec725364..00000000 --- a/npc/functions/quest-debug/055-General_Cooking.txt +++ /dev/null @@ -1,92 +0,0 @@ -// Cooking quest debug -// Author: -// Jesusalva - -function script QuestDebug55 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Cooking"; - mes "---"; - mes l("Quest state: @@", getq(General_Cooking)); - mes l("Route choosen: %s", (getq2(General_Cooking) == VEGAN ? l("Vegan") : l("Carnivorous"))); - mes l("Known Recipes: @@", array_entries(RECIPES)); - next; - - menuint - l("Return"), -1, - l("Reset Quest"), 0, - "[2] Completed Yannika's Quest", 2, - "[3] Accepted Yannika's Request for Seafood Plate", 3, - "[4] Delivered fish to Dimond's Inn", 4, - "[5] Accepted task to talk to Reid's Inn", 5, - "[6] Got request for Piou/Manana Sandwhich", 6, - "[7] Got sent to Candor Inn", 7, - "[8] Tiki asked for new idea", 8, - "[9] Tiki approved new idea", 9, - "[10] Reid's Chef gave you epic recipe", 10, - "[11] Sent to tulimshar bakery", 11, - "[12] Sent to bakery apprentice", 12, - "[13] Killed all rattos", 13, - "[14] Learned Donut recipe", 14, - "[15] Sent to search for Salad", 15, - "[16] Offered to bring stuff to Hocus", 16, - "[17] Received Hocus' Salad", 17, - "[18] Salad Delivered", 18, - "[19] Quest Completed", 19, - l("Get a Recipe Book"), -2, - l("Learn all recipes"), -3, - l("Reset all recipes"), -4; - - switch (@menuret) - { - case -1: - break; - case -2: - getitem RecipeBook, 1; - break; - case -3: - RECIPES[CraftCarpSandwich]=true; - RECIPES[CraftMananaSandwich]=true; - RECIPES[CraftPioulegSandwich]=true; - - RECIPES[CraftSailorStew]=true; - RECIPES[CraftSquirrelStew]=true; - RECIPES[CraftMoubooStew]=true; - - RECIPES[CraftSeafoodPlate]=true; - RECIPES[CraftBarbecuePlate]=true; - RECIPES[CraftVeggiePlate]=true; - - RECIPES[CraftDonut]=true; - RECIPES[CraftBlueberryCake]=true; - RECIPES[CraftCarrotCake]=true; - break; - case -4: - RECIPES[CraftCarpSandwich]=false; - RECIPES[CraftMananaSandwich]=false; - RECIPES[CraftPioulegSandwich]=false; - - RECIPES[CraftSailorStew]=false; - RECIPES[CraftSquirrelStew]=false; - RECIPES[CraftMoubooStew]=false; - - RECIPES[CraftSeafoodPlate]=false; - RECIPES[CraftBarbecuePlate]=false; - RECIPES[CraftVeggiePlate]=false; - - RECIPES[CraftDonut]=false; - RECIPES[CraftBlueberryCake]=false; - RECIPES[CraftCarrotCake]=false; - break; - default: - setq1 General_Cooking, @menuret; - break; - - } - - return; - - } while (@menu != 1); -} diff --git a/npc/functions/quest-debug/056-General_Brotherhood.txt b/npc/functions/quest-debug/056-General_Brotherhood.txt deleted file mode 100644 index 07fe568f..00000000 --- a/npc/functions/quest-debug/056-General_Brotherhood.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Mona quest debug -// Authors: -// gumi -// monwarez -// jesusalva - -function script QuestDebug56 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Brotherhood"; - mes "---"; - mes l("Quest state: @@", getq(General_Brotherhood)); - next; - - GenericQuestDebug General_Brotherhood, - l("Does not have the quest"), 0, - l("Contacted by Sopiahalla"), 1; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt b/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt deleted file mode 100644 index 4ee0b36e..00000000 --- a/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt +++ /dev/null @@ -1,31 +0,0 @@ -// Kfahr quest debug -// Author: -// Toams - -function script QuestDebug57 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_Kfahr"; - mes "---"; - mes l("Quest state: @@", getq(HurnscaldQuests_Kfahr)); - //mes "---"; - //mes l("Related quests:"); - //mes "HurnscaldQuests_Setzer: " + getq(HurnscaldQuests_Setzer); - next; - - GenericQuestDebug HurnscaldQuests_Kfahr, - menuimage("actions/manage", l("Debug Kfahr")), -1, - l("Didn't speak with Kfahr yet"), 0, - l("Already met Kfahr, No quests started"), 1, - l("Bone knife quest started"), 2, - l("Bone knife quest finished"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/058-ArgaesQuest_Galimatia.txt b/npc/functions/quest-debug/058-ArgaesQuest_Galimatia.txt deleted file mode 100644 index 01a058e7..00000000 --- a/npc/functions/quest-debug/058-ArgaesQuest_Galimatia.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Galimatia quest debug -// Author: -// Livio -// Someone else I've forgot the name - -function script QuestDebug58 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "ArgaesQuest_Galimatia"; - mes "---"; - mes l("Quest state: @@", getq(ArgaesQuest_Galimatia)); - next; - - GenericQuestDebug ArgaesQuest_Galimatia, - l("[RESET QUEST] Does not have the quest"), 0, - l("PC have to pour chemicals on dirt"), 1, - l("Galimatia needs Fertility Potion ingredients"), 2, - l("PC have to pour Fertility Potion on the same spot"), 3, - l("Something grows or it should be"), 4, - l("Galimatia offers a reward"), 5, - l("Galimatia offers to exchange flower things"), 6; - - if (@menuret < 0) - { - return; - } - - } while (1); - return; -} \ No newline at end of file diff --git a/npc/functions/quest-debug/059-HurnscaldQuests_Rossy.txt b/npc/functions/quest-debug/059-HurnscaldQuests_Rossy.txt deleted file mode 100644 index 85c2006b..00000000 --- a/npc/functions/quest-debug/059-HurnscaldQuests_Rossy.txt +++ /dev/null @@ -1,43 +0,0 @@ -// Rossy quest debug -// Authors: -// jesusalva - -function script QuestDebug59 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "HurnscaldQuests_Rossy"; - mes "---"; - mes l("Quest state: @@", getq(HurnscaldQuests_Rossy)); - if (getq(HurnscaldQuests_Rossy) == 16) - mes l("Clauquer's Cave Mask: %d", getq2(HurnscaldQuests_Rossy)); - next; - - GenericQuestDebug HurnscaldQuests_Rossy, - l("Does not have the quest"), 0, - l("Requested to find Rossy"), 1, - l("Found Rossy"), 2, - l("Informed Olana about Rossy"), 3, - l("Requested to deliver the berries"), 4, - l("Berries delivered"), 5, - l("Requested to tell Rossy about exam"), 6, - l("Accepted to help Rossy"), 7, - l("Requested to deliver potion to David"), 8, - l("Delivered potion to David"), 9, - l("Inform Olana about success"), 10, - l("Bring roses to Rossy"), 11, - l("Talk to Olana about allergy"), 12, - l("Bring tulips to Rossy"), 13, - l("Say Olana is a good mother"), 14, - l("Get status on Juliet with Rossy"), 15, - l("Dispatched to Clauquer Cave"), 16, - l("Juliet has been rescued"), 17; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/061-General_Hal.txt b/npc/functions/quest-debug/061-General_Hal.txt deleted file mode 100644 index 172108f4..00000000 --- a/npc/functions/quest-debug/061-General_Hal.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Hal quest debug -// Author: -// Livio - -function script QuestDebug61 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_CptHal"; - mes "---"; - mes l("Quest state: @@", getq(General_CptHal)); - next; - - GenericQuestDebug General_CptHal, - l("[RESET QUEST] Does not have the quest"), 0, - l("Bothered to talk to Thamas"), 1, - l("Accepted to resupply Hal's Legion troop"), 2, - l("Looking for Sergeant Ryan"), 3, - l("Found Sergeant Ryan, looking for items"), 4, - l("Healed Sergeant Ryan"), 5; - - if (@menuret < 0) - { - return; - } - - } while (1); - return; -} \ No newline at end of file diff --git a/npc/functions/quest-debug/100-General_Narrator.txt b/npc/functions/quest-debug/100-General_Narrator.txt deleted file mode 100644 index a88f5d6a..00000000 --- a/npc/functions/quest-debug/100-General_Narrator.txt +++ /dev/null @@ -1,27 +0,0 @@ -// Narrator debug -// Author: -// gumi - -function script QuestDebug100 { - do - { - clear; - setnpcdialogtitle l("Quest debug"); - mes "General_Narrator"; - mes "---"; - mes l("Quest state: @@", getq(General_Narrator)); - next; - - GenericQuestDebug General_Narrator, - l("Game introduction"), 0, - l("Arrived in Artis"), 1, - l("Arrived in Argaes"), 2, - l("Sent to Airlia"), 3; - - if (@menuret < 0) - { - return; - } - - } while (1); -} diff --git a/npc/functions/quest-debug/functions.txt b/npc/functions/quest-debug/functions.txt deleted file mode 100644 index e45cb427..00000000 --- a/npc/functions/quest-debug/functions.txt +++ /dev/null @@ -1,109 +0,0 @@ -// Evol functions. -// Author: -// gumi -// Description: -// generic quest debug functions - - - -// GenericQuestDebug -// makes a generic quest debug menu for the given quest when the server -// is in debug mode. - -function script GenericQuestDebug { - if (!debug && !is_admin()) - { - select - menuimage("actions/back", l("Go back")); - - @menuret = -0x7FFFFFFF; - return 1; - } - - mes l("Choose desired quest state:"); - - deletearray .@vals; - .@menustr$ = menuimage("actions/abort", l("Do nothing")) + ":"; - .@vals[0] = -0x7FFFFFFF; - .@cnt = 1; - - for (.@f = 1; .@f < getargcount(); .@f += 2) - { - if (getarg(.@f) != "") - { - .@qv = getarg(.@f + 1); - .@s$ = menuimage("actions/" + (.@qv ? "edit" : "reset"), "[" + .@qv + "] " + getarg(.@f)); - .@menustr$ += (.@qv < 0 ? getarg(.@f) : .@s$) + ":"; - .@vals[.@cnt] = .@qv; - ++.@cnt; - } - } - - if (is_admin()) - { - .@menustr$ += menuimage("actions/nuke", l("Set state manually")); - .@vals[.@cnt] = -0x7FFFFFFE; - } - - - @menu = 255; - @menuret = -1; - select(.@menustr$); - if (@menu == 255) - return -1; - - --@menu; - if (@menu < 0 || @menu >= getarraysize(.@vals)) - return -1; - - @menuret = .@vals[@menu]; - - switch (@menuret) - { - case -0x7FFFFFFE: input @menuret; setq getarg(0,0), @menuret; - case -0x7FFFFFFF: return 1; - } - - if (@menuret >= 0) - { - setq getarg(0,0), @menuret; - } - return; -} - - - -// selectd -// like a normal select() but gives access to quest debug -// -// quest id can either be passed as first argument -// or as the .quest_debug npc variable - -function script selectd { - .@menustr$ = rif(debug, menuaction(l("debug"))); - .@count = getargcount(); - .@f = 0; - .@questID = getvariableofnpc(.quest_debug, strnpcinfo(0)); - - if (.@count > 1 && !isstr(getarg(0))) - { - ++.@f; - .@questID = getarg(0); - } - - for (; .@f < .@count; ++.@f) - { - .@menustr$ += ":" + getarg(.@f); - } - - @menu = 255; - select .@menustr$; - - switch (@menu) - { - case -1: - case 255: return -1; - default: @menu -= 1; return @menu; // FIXME: here I would have done `return --@menu;` but hercules prevents this - case 1: callfunc "QuestDebug" + .@questID; closeclientdialog; end; - } -} diff --git a/npc/functions/questgen.txt b/npc/functions/questgen.txt deleted file mode 100644 index 285924cb..00000000 --- a/npc/functions/questgen.txt +++ /dev/null @@ -1,38 +0,0 @@ -// Evol functions. -// Authors: -// monwarez -// Reid -// Description: -// Generate a random quest type and location. -// Variables: -// @quests : 2D array containing quest type and location availability -// with @nb_type rows and @nb_location columns. -// boolean value determine if the connection is possible between -// the quest type and location selected. -// @nb_difficulty : difficulty value from 0 to N-1. -// Argument: -// 0 : quest type -// 1 : quest location -// 2 : quest difficulty -// Return : Tridimentional array value; - -function script questgen { - - .@argc = getargcount(); - @q_type = getarg(0, rand(@nb_type * 10) / 10); - - do - { - @q_location = getarg(1, rand(@nb_location * 10) / 10); - .@cell = @q_type * @nb_location + @q_location; - - if (!@quests[.@cell] && .@argc >= 2) - { - return false; - } - } while (!@quests[.@cell]); - - @q_difficulty = getarg(2, rand(@nb_difficulty * 10) / 10); - - return true; -} diff --git a/npc/functions/quiz.txt b/npc/functions/quiz.txt new file mode 100755 index 00000000..44227c4f --- /dev/null +++ b/npc/functions/quiz.txt @@ -0,0 +1,92 @@ + +function script MultiQuiz { + if((getarraysize(@quiz_answers$) != getarraysize(@quiz_questions$)) || + (@quiz_answers$[0] == "") || (@quiz_questions$[0] == "")) goto L_ArrayError; + @setindex = 1; + @index = rand(0,(getarraysize(@quiz_answers$) - 1)); + @question$ = @quiz_questions$[@index]; + mes "\""+ @question$ + "\""; + next; + mes "Pick the correct answer."; + callfunc "Quiz"; + return; + +L_ArrayError: + if(@quiz_answers$[0] == "") debugmes "@quiz_answers$ is empty"; + if(@quiz_questions$[0] == "") debugmes "@quiz_questions$ is empty"; + if(getarraysize(@quiz_answers$) != getarraysize(@quiz_questions$)) debugmes "Size of @quiz_answers$ is not equal to size of @quiz_questions$"; + mapexit; +} + +function script Quiz { + if((@choices_nr < 1) || (@choices_nr > 8)) set @choices_nr, 3; + if(@choices_nr > getarraysize(@quiz_answers$)) set @choices_nr, getarraysize(@quiz_answers$); + if(@quiz_answers$[0] == "") goto L_ArrayError; + @success = 0; + if(@setindex < 1) set @index, @answer; + @good = rand(0,(@choices_nr - 1)); + setarray @choices$, ""; + cleararray @choices$, "", getarraysize(@choices$); + @loop = 0; + goto L_Shuffle; + +L_Shuffle: + @nindex = rand(0,(getarraysize(@quiz_answers$) - 1)); + if(@nindex == @index) goto L_Shuffle; // do not get the good definition + @loop2 = 0; + goto L_Search; + +L_Search: + if(@choices$[@loop2] == @quiz_answers$[@nindex]) goto L_Shuffle; // array is already populated with this choice + if(@loop2 >= (@choices_nr - 1)) goto L_Shuffle2; + @loop2 = @loop2 + 1; + goto L_Search; + +L_Shuffle2: + @choices$[@loop] = @quiz_answers$[@nindex]; + if(@loop >= (@choices_nr - 1)) goto L_Answer; + @loop = @loop + 1; + goto L_Shuffle; + +L_Answer: + set @choices$[@good], @quiz_answers$[@index]; // set the good definition + menu + @choices$[0], L_Enter, + @choices$[1], L_Enter, + @choices$[2], L_Enter, + @choices$[3], L_Enter, + @choices$[4], L_Enter, + @choices$[5], L_Enter, + @choices$[6], L_Enter, + @choices$[7], L_Enter; + +L_Enter: + if(@menu != (@good + 1)) goto L_Shift; + @success = 1; + goto L_Shift; + +L_Shift: + if(@shift < @index) set @shift, @index; + + if(@shift == @index) set @quiz_answers$[@index], ""; // do not allow twice the same question + + if((@quiz_questions$[0] != "") && (@shift == @index)) set @quiz_questions$[@index], ""; + if((@quiz_questions$[0] != "") && (@quiz_questions$[(@shift + 1)] != "")) set @quiz_questions$[@shift], @quiz_questions$[(@shift + 1)]; + if((@quiz_questions$[0] != "") && (@quiz_questions$[(@shift + 1)] != "")) set @quiz_questions$[(@shift + 1)], ""; + + if(@quiz_answers$[(@shift + 1)] != "") set @quiz_answers$[@shift], @quiz_answers$[(@shift + 1)]; + if(@quiz_answers$[(@shift + 1)] != "") set @quiz_answers$[(@shift + 1)], ""; + + @shift = @shift + 1; + if(@quiz_answers$[(@shift + 1)] != "") goto L_Shift; + @shift = 0; + goto L_close; + +L_close: + @answer = 0; + return; + +L_ArrayError: + if(@quiz_answers$[0] == "") debugmes "@quiz_answers$ is empty"; + mapexit; +} diff --git a/npc/functions/referral.txt b/npc/functions/referral.txt deleted file mode 100644 index 824a415b..00000000 --- a/npc/functions/referral.txt +++ /dev/null @@ -1,43 +0,0 @@ -// The Mana World scripts. -// Author: -// Moubootaur Legends Team -// Jesusalva -// gumi -// Description: -// Referral System - rewards -// Note: Does not support multi-levelup - -function script ReferralSendLvReward { - .@refVault = bitwise_get(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0); // the unique identifier of the referrer (Vault/account ID) [24-bit integer] - .@status = bitwise_get(getvaultvar(REFERRAL_PROG), 0x7F000000, 24); // the last reward obtained [8-bit integer] - - if (.@refVault < 1) { - // the player has not been referred - return; - } - - .@refChar = "playerCache"::vault2char(.@refVault); - - if (.@refChar < 1) { - // the referrer no longer exists: unassign it - setvaultvar(REFERRAL_PROG, false); - return; - } - - setarray(.@rewardTiers[0], 25, 50, 75, 100); - .@tier = array_find(.@rewardTiers[0], BaseLevel); - - if (.@tier < 0 || .@status > .@tier) { - // not a reward tier, or already claimed - return; - } - - rodex_sendmail(.@refChar, "TMW Team", - sprintf("Referred player reached Lv %i!", BaseLevel), - sprintf("%s just reached level %i!\n" - "As they get stronger, more rewards will be sent to you!", strcharinfo(PC_NAME), BaseLevel), - 0, Acorn, 1); - - bitwise_set(getvaultvar(REFERRAL_PROG), 0x7F000000, 24, .@tier); - return; -} diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt deleted file mode 100644 index 23df387c..00000000 --- a/npc/functions/refine.txt +++ /dev/null @@ -1,66 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Inspiration: -// Pyndragon (LoF) -// Scall (TMW-BR) -// Saulc (ML) -// Description: -// Handles refinement - -// refineupdate( {killedrid} ) -function script refineupdate { - // Not armed? We do nothing - if (!getequipisequiped(EQI_HAND_R)) - return; - - // Set temporary variables - .@k=getarg(0, killedrid); - .@w=getequipid(EQI_HAND_R); - .@r=getequiprefinerycnt(EQI_HAND_R); - - - // Weapon cannot be refined - if (!getequipisenableref(EQI_HAND_R)) - return; - - // Register the weapon experience - weaponExp[.@w] = weaponExp[.@w] + getmonsterinfo(.@k, MOB_LV); - - // Get exp needed to level up from global array - .@exp=$@REFEXP[.@r]; - - // Cannot level up - if (.@exp < 1) - return; - - // Leveled up! - if (weaponExp[.@w] >= .@exp) { - weaponExp[.@w]-=.@exp; - weaponLvl[.@w] = weaponLvl[.@w] + 1; - successrefitem(EQI_HAND_R); - dispbottom l("Weapon level up!"); - } - return; -} - -// Resyncs weapon level -function script refinesync { - // Not armed? We do nothing - if (!getequipisequiped(EQI_HAND_R)) - return; - - .@w=getequipid(EQI_HAND_R); - .@r=getequiprefinerycnt(EQI_HAND_R); - .@lv=weaponLvl[.@w]; - - if (.@r > .@lv) { - // Refine level overestimated - downrefitem(EQI_HAND_R, max(0, .@r - .@lv)); - } else if (.@lv > .@r) { - // Refine level understimated - successrefitem(EQI_HAND_R, max(0, .@lv - .@r)); - } - return; -} - diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt deleted file mode 100644 index d5d4fdda..00000000 --- a/npc/functions/resetstatus.txt +++ /dev/null @@ -1,117 +0,0 @@ -// Moubootaur Legends Script. -// Authors: -// Vasily_Makarov (original from Evol) -// Jesusalva -// Description: -// Status Reset NPC utils - -// Reset status and return permanent bonuses -// StatusResetReinvest( {script=True} ) -function script StatusResetReinvest { - /* XXX: Uncommment this for ML Permanent Boost Status Fruit System :XXX - // Compulsory check - if (getarg(0, true)) { - inventoryplace NPCEyes, 6; - } else if (!checkweight(NPCEyes, 6)) { - getitembound StatusResetPotion, 1, 4; - dispbottom l("You cannot carry the fruits."); - end; // Die - } - - // Permanent boosts were now lost, return the fruits - if (STATUSUP_STR) { - getitembound StrengthFruit, STATUSUP_STR, 4; - STATUSUP_STR=0; - } - if (STATUSUP_AGI) { - getitembound AgilityFruit, STATUSUP_AGI, 4; - STATUSUP_AGI=0; - } - if (STATUSUP_VIT) { - getitembound VitalityFruit, STATUSUP_VIT, 4; - STATUSUP_VIT=0; - } - if (STATUSUP_INT) { - getitembound IntelligenceFruit, STATUSUP_INT, 4; - STATUSUP_INT=0; - } - if (STATUSUP_DEX) { - getitembound DexterityFruit, STATUSUP_DEX, 4; - STATUSUP_DEX=0; - } - if (STATUSUP_LUK) { - getitembound LuckFruit, STATUSUP_LUK, 4; - STATUSUP_LUK=0; - } - */ - resetstatus(); - return true; -} - -// Return wasSP on success, 0 on failure -// ConfirmReset( {price} ) -function script ConfirmStatusReset { - if (BaseLevel >= 15) - .@raw_price=(1000-BaseLevel*10+(BaseLevel*18)); - else if (BaseLevel >= 10) - .@raw_price=(BaseLevel*210-(10*210))/(BaseLevel/10); - else - .@raw_price=1; - - if (getarg(0,-1) >= 0) - .@raw_price=getarg(0,-1); - - //mesc l("WARNING: Permanent boosts will return to their fruit form."), 1; - mesc l("WARNING: Status resets cannot be reverted!"), 1; - - switch (select(l("Yes, I am sure. Please reset my status!"), - l("I need to think about it..."), - l("I won't need it, thank you."))) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Let me just have a quick look at you. Hm... I will need %d GP to reset your stats.", .@raw_price); - - select - rif(Zeny >= .@raw_price, l("Here, take as much as you need, I have plenty!")), - rif(Zeny > 0 && Zeny < .@raw_price, l("I don't have enough money...")), - rif(Zeny == 0, l("Oh no, I don't have any money on me right now.")), - l("I have to go, sorry."); - - if (@menu > 1) { - return 0; - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you."), - l("Now stand still... It should not take much time..."); - - // Reset status have an inventorycheck, so we charge later. - .@wasSP = StatusPoint; - StatusResetReinvest(); - - // Nothing to do: Do not charge (eg. you just got the fruits back) - if (StatusPoint == .@wasSP) { - speech S_LAST_NEXT, - l("It seems that you have no status points to reset!"), - l("Come back when you will really need me."); - } else { - Zeny-=.@raw_price; - speech S_LAST_NEXT, - l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), - l("Spend it wisely this time."), - l("But you are welcome to reset your stats again! I need the money."); - } - return .@wasSP; - - case 2: - return 0; - case 3: - return 0; - } - //Exception("Unknown Error: ConfirmStatusReset() failed"); - consolemes(CONSOLEMES_ERROR, "Unknown Error: ConfirmStatusReset() failed"); - return 0; - -} - diff --git a/npc/functions/riddle.txt b/npc/functions/riddle.txt deleted file mode 100644 index fb503e3b..00000000 --- a/npc/functions/riddle.txt +++ /dev/null @@ -1,74 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Riddle enigma validator -// -// Arguments -// 0 PC answer -// 1 English correct answer -// 2 Translated correct answer - -// TODO: levenshtein(), similar_text(), and maybe even soundex() - -function script riddlevalidation { - .@answer$ = strtolower(getarg(0)); - .@good$ = strtolower(getarg(1)); - .@good_translated$ = strtolower(getarg(2)); - - .@size_answer = getstrlen(.@answer$); - .@size_good = getstrlen(.@good$); - .@size_good_translated = getstrlen(.@good_translated$); - - .@max = max(.@size_answer, .@size_good_translated, .@size_good); - - // Input is too long. - if (.@max > 20) - { - return false; - } - - .@size_good *= 70; - .@size_good_translated *= 70; - - for (.@i = 0; .@i < .@max; .@i++) - { - .@correct = 0; - .@correct_translated = 0; - - for (.@k = .@k_translated = .@j = .@i; .@j < .@max; .@j++) - { - if (charat(.@answer$, .@j) == charat(.@good$, .@k)) - { - .@correct++; - .@k++; - } - else - { - .@correct--; - } - - if (charat(.@answer$, .@j) == - charat(.@good_translated$, .@k_translated)) - { - .@correct_translated++; - .@k_translated++; - } - else - { - .@correct_translated--; - } - } - // if 70% of the word is correct - .@correct *= 100; - .@correct_translated *= 100; - - if (.@correct >= .@size_good || - .@correct_translated >= .@size_good_translated) - { - return true; - } - } - - return false; -} diff --git a/npc/functions/sailordialogue.txt b/npc/functions/sailordialogue.txt deleted file mode 100644 index 281246f7..00000000 --- a/npc/functions/sailordialogue.txt +++ /dev/null @@ -1,53 +0,0 @@ -// Evol functions. -// Authors: -// Qwerty Dragon -// Reid -// Description: -// Random sailor dialogues between two categories of NPCs. - -function script sailorfood { - mesn; - - .@q = rand(0, 400) / 100; - if (.@q == 0) goto L_RandomA; - if (.@q == 1) goto L_RandomB; - if (.@q > 1) goto L_RandomC; - -L_RandomA: - mesq l("Hey."); - next; - mesq l("What did Gugli say about the box? Was it ok?"); - next; - - menu - l("It's ok."), L_Fine, - l("He needs more food."), -; - - mes ""; - mesn; - mesq l("Oh really? I'll put more food in the next box then."); - - close; - -L_Fine: - mes ""; - mesn; - mesq l("It's alright! Just one more box and it'll be ok."); - - close; - -L_RandomB: - mesq l("Thanks for the help!"); - next; - mesq l("These boxes are way too heavy to be lifted by only one person, all the way onto the ship."); - - close; - -L_RandomC: - mesq l("I think I'll be done soon, since I almost have a box full of @@s!", getitemlink(CrocClaw)); - next; - mesq l("And you? How's it going on your side?"); - next; - - return; -} diff --git a/npc/functions/sailortalk.txt b/npc/functions/sailortalk.txt deleted file mode 100644 index 73145768..00000000 --- a/npc/functions/sailortalk.txt +++ /dev/null @@ -1,37 +0,0 @@ -// Evol functions. -// Author: -// Reid -// Description: -// Tell a random sentence. -// Variables: -// .@rand = Random number between the number of sentence choice. - -function script sailortalk { - - .@rand = rand(8); - if (.@rand == 0) goodbye; - if (.@rand == 1) - { - speech( - l("These purple mushrooms are called @@s. There are plenty of 'em on this island!", getitemlink(Plushroom)), - l("It's a kind of mushroom that tastes like a marshmallow and looks like a plush! @@, get it?", getitemlink(Plushroom)), - l("These funny fungi are mushrooming all around this island. Just pick some @@s and have a try.", getitemlink(Plushroom))); - close; - } - if (.@rand == 2) npctalkonce(l("Good to hear from you!")); - if (.@rand == 3) npctalkonce(l("So finally someone has came to visit me?")); - if (.@rand == 4) - { - speech( - l("A sunny and hot day,"), - l("a quiet place,"), - l("a ground!"), - l("What else do you need?")); - close; - } - if (.@rand == 5) npctalkonce(l("A-hoy matey!")); - if (.@rand == 6) npctalkonce(l("We are glad captain Nard has let you join the crew!")); - if (.@rand == 7) npctalkonce(l("Howdy?")); - - end; -} diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt deleted file mode 100644 index 46ef73e8..00000000 --- a/npc/functions/savepoint.txt +++ /dev/null @@ -1,57 +0,0 @@ -// Evol functions. -// Authors: -// gumi -// Reid -// Description: -// Adds a new save point location. -// Usage: -// savepointparticle; -// savepointparticle NO_INN; -// savepointparticle map, x, y, NO_INN; -// Description: -// Save location with arguments: -// getarg(0) map name, -// getarg(1) x's value, -// getarg(2) y's value, -// getarg(3) INN flag. - -function script savepointparticle { - - if (gettimetick(2) - @lastSave < 5) - return; - - .@mapname$ = getarg(0, ""); - .@mapx = getarg(1, -1); - .@mapy = getarg(2, -1); - .@i = 3; - - if (.@mapy < 1) - { - .@npc$ = strnpcinfo(0); - .@mapname$ = getvariableofnpc(.map$, .@npc$); - .@mapx = getvariableofnpc(.x, .@npc$); - .@mapy = getvariableofnpc(.y, .@npc$); - .@i = 0; - } - - // If this will override your current inn, a confirmation is required. - // Unless you already don't have a booked place, then, confirmation is never shown. - if (getarg(.@i, NO_INN) != INN_REGISTER && INN_REGISTER != NO_INN) - { - mesc l("Do you want to use this place as save point?"); - mesc b(l("Warning: ")) + l("Previous Inn reservation will be lost!"); - - if (askyesno() != ASK_YES) - close; - - INN_REGISTER = NO_INN; - } - - message strcharinfo(0), l("Your position has been saved."); - - savepoint .@mapname$, .@mapx, .@mapy; - specialeffect(4, SELF, getcharid(3)); - @lastSave = gettimetick(2); - - return; -} diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt deleted file mode 100644 index 616ea54a..00000000 --- a/npc/functions/scoreboards.txt +++ /dev/null @@ -1,291 +0,0 @@ -// Moubootaur Legends Script -// Author: -// Jesusalva -// Description: -// Leaderboards - -// Scoreboard functions -function script HallOfGuild { - mes ""; - mes l("##BHall Of Guild Level: TOP5##b"); - mesf("1. %s (%d)", $@hoguild_name$[0], $@hoguild_value[0]); - mesf("2. %s (%d)", $@hoguild_name$[1], $@hoguild_value[1]); - mesf("3. %s (%d)", $@hoguild_name$[2], $@hoguild_value[2]); - mesf("4. %s (%d)", $@hoguild_name$[3], $@hoguild_value[3]); - mesf("5. %s (%d)", $@hoguild_name$[4], $@hoguild_value[4]); - return; -} - -function script HallOfFortune { - mes ""; - mes l("##BHall Of Fortune: TOP15##b"); - mesf("1. %s (%s E)", $@hofortune_name$[0],format_number($@hofortune_value[0])); - mesf("2. %s (%s E)", $@hofortune_name$[1],format_number($@hofortune_value[1])); - mesf("3. %s (%s E)", $@hofortune_name$[2],format_number($@hofortune_value[2])); - mesf("4. %s (%s E)", $@hofortune_name$[3],format_number($@hofortune_value[3])); - mesf("5. %s (%s E)", $@hofortune_name$[4],format_number($@hofortune_value[4])); - mesf("6. %s (%s E)", $@hofortune_name$[5],format_number($@hofortune_value[5])); - mesf("7. %s (%s E)", $@hofortune_name$[6],format_number($@hofortune_value[6])); - mesf("8. %s (%s E)", $@hofortune_name$[7],format_number($@hofortune_value[7])); - mesf("9. %s (%s E)", $@hofortune_name$[8],format_number($@hofortune_value[8])); - mesf("10. %s (%s E)", $@hofortune_name$[9],format_number($@hofortune_value[9])); - mesf("11. %s (%s E)", $@hofortune_name$[10],format_number($@hofortune_value[10])); - mesf("12. %s (%s E)", $@hofortune_name$[11],format_number($@hofortune_value[11])); - mesf("13. %s (%s E)", $@hofortune_name$[12],format_number($@hofortune_value[12])); - mesf("14. %s (%s E)", $@hofortune_name$[13],format_number($@hofortune_value[13])); - mesf("15. %s (%s E)", $@hofortune_name$[14],format_number($@hofortune_value[14])); - return; -} - -function script HallOfLevel { - mes ""; - mes l("##BHall Of Level: TOP15##b"); - mesf("1. %s (%d)", $@hoblvl_name$[0], $@hoblvl_value[0]); - mesf("2. %s (%d)", $@hoblvl_name$[1], $@hoblvl_value[1]); - mesf("3. %s (%d)", $@hoblvl_name$[2], $@hoblvl_value[2]); - mesf("4. %s (%d)", $@hoblvl_name$[3], $@hoblvl_value[3]); - mesf("5. %s (%d)", $@hoblvl_name$[4], $@hoblvl_value[4]); - mesf("6. %s (%d)", $@hoblvl_name$[5], $@hoblvl_value[5]); - mesf("7. %s (%d)", $@hoblvl_name$[6], $@hoblvl_value[6]); - mesf("8. %s (%d)", $@hoblvl_name$[7], $@hoblvl_value[7]); - mesf("9. %s (%d)", $@hoblvl_name$[8], $@hoblvl_value[8]); - mesf("10. %s (%d)", $@hoblvl_name$[9], $@hoblvl_value[9]); - mesf("11. %s (%d)", $@hoblvl_name$[10], $@hoblvl_value[10]); - mesf("12. %s (%d)", $@hoblvl_name$[11], $@hoblvl_value[11]); - mesf("13. %s (%d)", $@hoblvl_name$[12], $@hoblvl_value[12]); - mesf("14. %s (%d)", $@hoblvl_name$[13], $@hoblvl_value[13]); - mesf("15. %s (%d)", $@hoblvl_name$[14], $@hoblvl_value[14]); - return; -} - -function script HallOfJob { - mes ""; - mes l("##BHall Of Job Level: TOP15##b"); - mesf("1. %s (%d)", $@hojlvl_name$[0], $@hojlvl_value[0]); - mesf("2. %s (%d)", $@hojlvl_name$[1], $@hojlvl_value[1]); - mesf("3. %s (%d)", $@hojlvl_name$[2], $@hojlvl_value[2]); - mesf("4. %s (%d)", $@hojlvl_name$[3], $@hojlvl_value[3]); - mesf("5. %s (%d)", $@hojlvl_name$[4], $@hojlvl_value[4]); - mesf("6. %s (%d)", $@hojlvl_name$[5], $@hojlvl_value[5]); - mesf("7. %s (%d)", $@hojlvl_name$[6], $@hojlvl_value[6]); - mesf("8. %s (%d)", $@hojlvl_name$[7], $@hojlvl_value[7]); - mesf("9. %s (%d)", $@hojlvl_name$[8], $@hojlvl_value[8]); - mesf("10. %s (%d)", $@hojlvl_name$[9], $@hojlvl_value[9]); - mesf("11. %s (%d)", $@hojlvl_name$[10], $@hojlvl_value[10]); - mesf("12. %s (%d)", $@hojlvl_name$[11], $@hojlvl_value[11]); - mesf("13. %s (%d)", $@hojlvl_name$[12], $@hojlvl_value[12]); - mesf("14. %s (%d)", $@hojlvl_name$[13], $@hojlvl_value[13]); - mesf("15. %s (%d)", $@hojlvl_name$[14], $@hojlvl_value[14]); - return; -} - -function script HallOfAcorns { - mes ""; - mes l("##BHall Of Acorns: TOP15##b"); - mesc l("Only %s in storage will be counted.", getitemlink(Acorn)); - mesf("1. %s (%d)", $@hoa_name$[0], $@hoa_value[0]); - mesf("2. %s (%d)", $@hoa_name$[1], $@hoa_value[1]); - mesf("3. %s (%d)", $@hoa_name$[2], $@hoa_value[2]); - mesf("4. %s (%d)", $@hoa_name$[3], $@hoa_value[3]); - mesf("5. %s (%d)", $@hoa_name$[4], $@hoa_value[4]); - mesf("6. %s (%d)", $@hoa_name$[5], $@hoa_value[5]); - mesf("7. %s (%d)", $@hoa_name$[6], $@hoa_value[6]); - mesf("8. %s (%d)", $@hoa_name$[7], $@hoa_value[7]); - mesf("9. %s (%d)", $@hoa_name$[8], $@hoa_value[8]); - mesf("10. %s (%d)", $@hoa_name$[9], $@hoa_value[9]); - mesf("11. %s (%d)", $@hoa_name$[10], $@hoa_value[10]); - mesf("12. %s (%d)", $@hoa_name$[11], $@hoa_value[11]); - mesf("13. %s (%d)", $@hoa_name$[12], $@hoa_value[12]); - mesf("14. %s (%d)", $@hoa_name$[13], $@hoa_value[13]); - mesf("15. %s (%d)", $@hoa_name$[14], $@hoa_value[14]); - return; -} - -function script HallOfLethality { - mes ""; - mes l("##BHall Of Lethality: TOP15##b"); - mesc l("Special monsters are not counted."); - mesf("1. %s (%d)", $@hol_name$[0], $@hol_value[0]); - mesf("2. %s (%d)", $@hol_name$[1], $@hol_value[1]); - mesf("3. %s (%d)", $@hol_name$[2], $@hol_value[2]); - mesf("4. %s (%d)", $@hol_name$[3], $@hol_value[3]); - mesf("5. %s (%d)", $@hol_name$[4], $@hol_value[4]); - mesf("6. %s (%d)", $@hol_name$[5], $@hol_value[5]); - mesf("7. %s (%d)", $@hol_name$[6], $@hol_value[6]); - mesf("8. %s (%d)", $@hol_name$[7], $@hol_value[7]); - mesf("9. %s (%d)", $@hol_name$[8], $@hol_value[8]); - mesf("10. %s (%d)", $@hol_name$[9], $@hol_value[9]); - mesf("11. %s (%d)", $@hol_name$[10], $@hol_value[10]); - mesf("12. %s (%d)", $@hol_name$[11], $@hol_value[11]); - mesf("13. %s (%d)", $@hol_name$[12], $@hol_value[12]); - mesf("14. %s (%d)", $@hol_name$[13], $@hol_value[13]); - mesf("15. %s (%d)", $@hol_name$[14], $@hol_value[14]); - return; -} - -function script HallOfATL { - mes ""; - mes l("##BHall Of Artis Legion Training Arena: TOP10##b"); - mesf("1. %s (%d)", $@atl_name$[0], $@atl_value[0]); - mesf("2. %s (%d)", $@atl_name$[1], $@atl_value[1]); - mesf("3. %s (%d)", $@atl_name$[2], $@atl_value[2]); - mesf("4. %s (%d)", $@atl_name$[3], $@atl_value[3]); - mesf("5. %s (%d)", $@atl_name$[4], $@atl_value[4]); - mesf("6. %s (%d)", $@atl_name$[5], $@atl_value[5]); - mesf("7. %s (%d)", $@atl_name$[6], $@atl_value[6]); - mesf("8. %s (%d)", $@atl_name$[7], $@atl_value[7]); - mesf("9. %s (%d)", $@atl_name$[8], $@atl_value[8]); - mesf("10. %s (%d)", $@atl_name$[9], $@atl_value[9]); - return; -} - -// Hall of AFK -function script HallOfAFK { - mes ""; - mes l("##BHall Of AFK: TOP 10##b"); - mesf("1. %s (%dh%02dm)", $@afk_name$[0], $@afk_value[0]/1200, $@afk_value[0]%1200/60*3); - mesf("2. %s (%dh%02dm)", $@afk_name$[1], $@afk_value[1]/1200, $@afk_value[1]%1200/60*3); - mesf("3. %s (%dh%02dm)", $@afk_name$[2], $@afk_value[2]/1200, $@afk_value[2]%1200/60*3); - mesf("4. %s (%dh%02dm)", $@afk_name$[3], $@afk_value[3]/1200, $@afk_value[3]%1200/60*3); - mesf("5. %s (%dh%02dm)", $@afk_name$[4], $@afk_value[4]/1200, $@afk_value[4]%1200/60*3); - mesf("6. %s (%dh%02dm)", $@afk_name$[5], $@afk_value[5]/1200, $@afk_value[5]%1200/60*3); - mesf("7. %s (%dh%02dm)", $@afk_name$[6], $@afk_value[6]/1200, $@afk_value[6]%1200/60*3); - mesf("8. %s (%dh%02dm)", $@afk_name$[7], $@afk_value[7]/1200, $@afk_value[7]%1200/60*3); - mesf("9. %s (%dh%02dm)", $@afk_name$[8], $@afk_value[8]/1200, $@afk_value[8]%1200/60*3); - mesf("10. %s (%dh%02dm)", $@afk_name$[9], $@afk_value[9]/1200, $@afk_value[9]%1200/60*3); - return; -} - -// HallOfGame() -function script HallOfGame { - if ($MOST_HEROIC$) - mes l("World hero: %s", $MOST_HEROIC$); - - if ($TREE_PLANTED) - mes l("Planted Trees: %s", format_number($TREE_PLANTED)); // FIXME - - mes l("Players Killed in PvP: %s", format_number($PLAYERS_KILLED)); - mes l("Monsters Killed in PvE: %s", format_number($MONSTERS_KILLED)); - mes ""; - .@s$=(season_direction() == WINTER ? l("Winter") : .@s$); - .@s$=(season_direction() == AUTUMN ? l("Autumn") : .@s$); - .@s$=(season_direction() == SUMMER ? l("Summer") : .@s$); - .@s$=(season_direction() == SPRING ? l("Spring") : .@s$); - mes l("Current Season: %s", .@s$); - // weather ; game time ; world story ; etc. - mes ""; - mes l("Notable mentions and thanks for our [@@https://www.patreon.com/themanaworld|sponsors@@] for their continued support."); - mes ""; - return; -} - - -// Main script handler for scoreboards -- script @scoreboard NPC_HIDDEN,{ - end; -OnHour00: -OnHour01: -OnHour02: -OnHour03: -OnHour04: -OnHour05: -OnHour06: -OnHour07: -OnHour08: -OnHour09: -OnHour10: -OnHour11: -OnHour12: -OnHour13: -OnHour14: -OnHour15: -OnHour16: -OnHour17: -OnHour18: -OnHour19: -OnHour20: -OnHour21: -OnHour22: -OnHour23: -OnInit: - consolemes(CONSOLEMES_DEBUG, "Reloading scoreboards..."); - .@nb = query_sql("select name, zeny from `char` ORDER BY zeny DESC LIMIT 15", $@hofortune_name$, $@hofortune_value); - .@nb = query_sql("select name, base_level from `char` ORDER BY base_level DESC LIMIT 15", $@hoblvl_name$, $@hoblvl_value); - .@nb = query_sql("select name, job_level from `char` ORDER BY job_level DESC LIMIT 15", $@hojlvl_name$, $@hojlvl_value); - .@nb = query_sql("select name, guild_lv from `guild` ORDER BY guild_lv DESC LIMIT 5", $@hoguild_name$, $@hoguild_value); - .@nb = query_sql("SELECT c.name, i.amount FROM `storage` AS i, `char` AS c WHERE i.nameid="+Acorn+" AND i.account_id=c.account_id ORDER BY i.amount DESC LIMIT 15", $@hoa_name$, $@hoa_value); - .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='ATLRANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@atl_name$, $@atl_value); - .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='AFKING' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@afk_name$, $@afk_value); - .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='MONSTERS_KILLED' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 15", $@hol_name$, $@hol_value); - consolemes(CONSOLEMES_DEBUG, "Scoreboards reloaded"); - if (!$@SCOREBOARD_BIND) { - bindatcmd "scoreboard", "@scoreboard::OnCall", 0, 100, 0; - bindatcmd "scoreboards", "@scoreboard::OnCall", 0, 100, 0; - $@SCOREBOARD_BIND=true; - } - end; - -OnCall: - do { - clear; - //HallOfSponsor(true); - mes l("The Mana World - rEvolt"); - mesc l("All scoreboards are updated hourly."), 1; - mes ""; - select - l("Hall Of Fortune"), - l("Hall Of Base Level"), - l("Hall Of Job Level"), - l("Hall Of Guilds"), - l("Hall Of Lethality"), - l("Hall Of Acorns"), - l("Hall Of Artis Legion Training Arena"), - l("Hall Of AFK King"), - l("Game Statistics"), - l("Quit"); - mes ""; - switch (@menu) { - case 1: - HallOfFortune(); - next; - break; - case 2: - HallOfLevel(); - next; - break; - case 3: - HallOfJob(); - next; - break; - case 4: - HallOfGuild(); - next; - break; - case 5: - HallOfLethality(); - next; - break; - case 6: - HallOfAcorns(); - next; - break; - case 7: - HallOfATL(); - next; - break; - case 8: - HallOfAFK(); - next; - break; - case 9: - HallOfGame(); - next; - break; - default: - close; - } - } while (true); - end; -} - - diff --git a/npc/functions/shops.txt b/npc/functions/shops.txt deleted file mode 100644 index 8962997e..00000000 --- a/npc/functions/shops.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Jesusalva -// Description: -// Shops utility functions - - - -// restoreshopitem(, {, }) -// adds back an item to the sell list if less than the specified amount -// returns true - -function script restoreshopitem { - if (shopcount(getarg(0)) < getarg(1)) - sellitem(getarg(0), getarg(2, -1), getarg(1)); - return; -} diff --git a/npc/functions/skills.txt b/npc/functions/skills.txt deleted file mode 100644 index 5273de34..00000000 --- a/npc/functions/skills.txt +++ /dev/null @@ -1,20 +0,0 @@ -// The Mana World scripts. -// Author: -// The Mana World Team -// Description: -// Controls script-based skills (which are rare); - -function script SkillInvoked { - // Record to database that you used the skill - skillInvoke[@skillId] = skillInvoke[@skillId] + 1; - - // Switch though skills for additional effects - switch (@skillId) { - default: - // PS. I hate scripts.conf load order - callfunc("GetManaExp", @skillId, 1); - break; - } - return; -} - diff --git a/npc/functions/slot_machine.txt b/npc/functions/slot_machine.txt new file mode 100755 index 00000000..7b8cd23d --- /dev/null +++ b/npc/functions/slot_machine.txt @@ -0,0 +1,41 @@ + +function script SlotMachine { + mes "Pull the lever..."; + next; + menu + "Pull", L_Play, + "Maybe later", L_close; + +L_Play: + if(countitem("CasinoCoins") < 1) + goto L_NoCoin; + delitem "CasinoCoins", 1; + @Temp1 = rand(7); + @Temp2 = rand(7); + @Temp3 = rand(7); + mes "Numbers: " + @Temp1 + "/" + @Temp2 + "/" + @Temp3 + "."; + next; + + if(@Temp1 != @Temp2) + goto L_Lost; + if(@Temp2 != @Temp3) + goto L_Lost; + if(@Temp1 != @Temp3) + goto L_Lost; + mes "Congratulations! You won!"; + mes "You get 10 casino coins"; + getitem "CasinoCoins", 10; + goto L_close; + +L_Lost: + mes "You lost!"; + goto L_close; + +L_NoCoin: + mes "Insert coin"; + goto L_close; + +L_close: + close2; + return; +} diff --git a/npc/functions/soul-menhir.txt b/npc/functions/soul-menhir.txt deleted file mode 100644 index 3d4344c9..00000000 --- a/npc/functions/soul-menhir.txt +++ /dev/null @@ -1,75 +0,0 @@ -// Evol scripts. -// Author: -// gumi -// Jesusalva -// Description: -// place of power, mana refills faster when sitting nearby - -- script Soul Menhir NPC_HIDDEN,{ - if (!@menhir_meditation_message) - { - dispbottom(l("You feel a strong magic aura. You want to sit near it and meditate.")); - @menhir_meditation_message=1; - } - end; - -OnRefill: - @menhir_lock = false; - getmapxy(.@map$, .@x, .@y, UNITTYPE_PC); - - if (.@map$ != .map$ || distance(.x, .y, .@x, .@y) > .refill_distance || - !(issit())) - end; - - heal(0, .refill_rate); - end; - - -OnTimer500: - .@count = getunits(BL_PC, .@units[0], false, .map$, (.x - .refill_distance), - (.y - .refill_distance), (.x + .refill_distance), (.y + .refill_distance)); - - for (.@i = 0; .@i < .@count; ++.@i) - { - if (.@units[.@i] < 0) continue; // pre-check, just in case - deltimer(.name$ + "::OnRefill", .@units[.@i]); - if (gettimer(TIMER_COUNT, .@units[.@i], .name$ + "::OnRefill") > 0 || - getvariableofpc(@menhir_lock, .@units[.@i])) { - continue; - } - set(getvariableofpc(@menhir_lock, .@units[.@i]), true); - addtimer(rand(.refill_timer), .name$ + "::OnRefill", .@units[.@i]); - } - - initnpctimer(); - end; - -OnInit: - // Placeholder menhir doesn't have to run - if (.name$ == "Soul Menhir") - end; - - // "Next-Generation" parsing system - // Syntax: RATE_DISTANCE_TIMER - // Soul Menhir#town_rate_dist_timer - // example - // Soul Menhir#hurns_1_7_200 - .@n$=strnpcinfo(0, "_0_0_0"); - explode(.@ni$, .@n$, "_"); - .refill_rate=atoi(.@ni$[1]); - .refill_distance=atoi(.@ni$[2]); - .refill_timer=atoi(.@ni$[3]); - - // number of SP to give every refill - if (!.refill_rate) - .refill_rate = 1; - // max distance - if (.refill_distance < 0) - .refill_distance = 7; - // wait rand(X) ms before refill - if (.refill_timer < 1) - .refill_timer = 200; - - initnpctimer(); - end; -} diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt new file mode 100755 index 00000000..01079a4b --- /dev/null +++ b/npc/functions/soul_menhir.txt @@ -0,0 +1,56 @@ +function script SoulMenhir { + mes "[Soul Menhir]"; + mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)"; + + menu + "Touch it.", L_Bind, + "Leave it alone.", L_Return, + "I lost my towel...", L_Towel; + +L_Towel: + if (TowelLastUsed > (gettimetick(2) - 1800)) + goto L_DontPanic; + TowelLastUsed = gettimetick(2); + mes "[Soul Menhir]"; + mes "(You touch the mysterious stone. Somehow it feels hard and soft at the same time.)"; + getitem "HitchhikersTowel", 1; + goto L_Return; + +L_Bind: + if (Menhir_Activated == 1) + goto L_Shortversion; + + mes "[Soul Menhir]"; + mes "(You touch the mysterious stone. Somehow it feels warm and cold at the same time.)"; + mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)"; + mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)"; + Menhir_Activated = 1; + goto L_Save; + +L_Shortversion: + mes "[Soul Menhir]"; + mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. As suddenly as the feeling started it stops.)"; + goto L_Save; + +L_Save: + if (@x == 0 && @y == 0) + goto L_FindPoint; + goto L_Do_Save; + +L_DontPanic: + message strcharinfo(0), "(A strange barrier keeps you from touching the stone at this time.)"; + goto L_Return; + +L_Do_Save: + savepoint @map$, @x, @y; + goto L_Return; + +L_FindPoint: + @n = rand(getarraysize(@Xs)); + @x = @Xs[@n]; + @y = @Ys[@n]; + goto L_Do_Save; + +L_Return: + return; +} diff --git a/npc/functions/spotlight.txt b/npc/functions/spotlight.txt deleted file mode 100644 index 219d3a31..00000000 --- a/npc/functions/spotlight.txt +++ /dev/null @@ -1,92 +0,0 @@ -// Evol functions. -// Author: -// Jesusalva -// Micksha -// Description: -// Update spotlight on caves -// Variables: -// 2 - the darkest mask -// 4 - the average mask -// 8 - the lightest mask - -// forced_update - if set to true, will ignore if the map is known as valid -// (required for instance maps) -// updateSpotlight ( {forced_update} ) -function script updateSpotlight { - // A small delay of 80 ms in case player is changing map - // It will be cast twice when switching caves. This sleep prevents obscure bugs. - sleep2(80); - - getmapxy(.@m$, .@x, .@y, 0); - - // Is your map valid (or is the check skipped) - if (!getarg(0,false)) - { - if (strpos(getmapname(), "-3-") < 0) - return; - } - - // Retrieve default map masks - .@ms=getmapmask(.@m$); - - // Which equipments provide bonuses? - setarray .@b_head, CandleHelmet; - setarray .@b_weapon, ManaTorch, TrainingWand, Torch; - - // Calc your lighting score (it should NOT start on zero) - .@score=1; - if (array_find(.@b_head, getequipid(EQI_HEAD_TOP)) >= 0) - .@score+=1; - if (array_find(.@b_weapon, getequipid(EQI_HAND_R)) >= 0) - .@score+=1; - // TODO: Lighting scrolls - - //debugmes "Score: %d", .@score; - //debugmes "Equips: %d and %d", getequipid(EQI_HEAD_TOP), getequipid(EQI_HAND_R); - //debugmes "Headvalue: %d", .@b_head[0]; - //debugmes "Weappnvalue: %d, %d, %d", .@b_weapon[0], .@b_weapon[1], .@b_weapon[2]; - // Sanitize score - .@score=min(3, .@score); - - // Calculate and send new map mask - .@ms=.@ms|(2**.@score); - sendmapmask(.@ms); - return; -} - -// MAIN FUNCTION - DO NOT REMOVE -// Every NPC will be duplicating this one -001-3-0,0,0,0 script #SpotlightMaster NPC_HIDDEN,0,0,{ -OnTouch: - updateSpotlight(true); - end; -} - - -// I'm too lazy to do this in different files and in the right spot..... - -// npc/001-3-0/_warps.txt -001-3-0,196,35,0 duplicate(#SpotlightMaster) #SPOT001-3-0_196_35 NPC_HIDDEN,2,2 -001-3-0,172,41,0 duplicate(#SpotlightMaster) #SPOT001-3-0_172_41 NPC_HIDDEN,2,2 -001-3-0,162,40,0 duplicate(#SpotlightMaster) #SPOT001-3-0_162_40 NPC_HIDDEN,2,2 -001-3-0,198,60,0 duplicate(#SpotlightMaster) #SPOT001-3-0_198_60 NPC_HIDDEN,2,2 -001-3-0,152,55,0 duplicate(#SpotlightMaster) #SPOT001-3-0_152_55 NPC_HIDDEN,2,2 -001-3-0,85,130,0 duplicate(#SpotlightMaster) #SPOT001-3-0_85_130 NPC_HIDDEN,2,2 - -// npc/001-3-1/_warps.txt -001-3-1,24,58,0 duplicate(#SpotlightMaster) #SPOT001-3-1_24_58 NPC_HIDDEN,2,2 -001-3-1,35,59,0 duplicate(#SpotlightMaster) #SPOT001-3-1_35_59 NPC_HIDDEN,2,2 -//001-3-1,30,19,0 duplicate(#SpotlightMaster) #SPOT001-3-1_30_19 NPC_HIDDEN,2,2 - -// npc/001-3-2/_warps.txt -001-3-2,30,117,0 duplicate(#SpotlightMaster) #SPOT001-3-2_30_117 NPC_HIDDEN,2,2 - -// npc/008-3-0/_warps.txt -008-3-0,130,113,0 duplicate(#SpotlightMaster) #SPOT008-3-0_130_113 NPC_HIDDEN,2,2 - -// npc/008-3-1/_warps.txt -008-3-1,34,34,0 duplicate(#SpotlightMaster) #SPOT008-3-1_34_34 NPC_HIDDEN,2,2 - -// npc/008-3-2/_warps.txt -008-3-2,175,18,0 duplicate(#SpotlightMaster) #SPOT008-3-2_175_18 NPC_HIDDEN,2,2 - diff --git a/npc/functions/stat_reset.txt b/npc/functions/stat_reset.txt new file mode 100755 index 00000000..4201865a --- /dev/null +++ b/npc/functions/stat_reset.txt @@ -0,0 +1,49 @@ + +function script StatReset { + + + @Cost = BaseLevel * 100; + + mes "[" + @npcname$ + "]"; + mes "\"I have come across a spell that will"; + mes "reset your status points."; + mes "Normally this spell is expensive, but"; + mes "due to an unusual constellation of the"; + mes "stars I can cast it very cheaply!"; + mes "For you it will cost only "+@Cost+" gp.\""; + next; + menu + "Reset my stats",L_Next, + "Forget about it",L_Pass; + +L_Next: + if (Zeny<@Cost) goto L_NoMoney; + goto L_Reset; + + +L_Reset: + Zeny = Zeny-@Cost; + resetstatus; + + mes "[" + @npcname$ + "]"; + mes "\"There you are."; + mes ""; + mes "Good as new!\""; + goto L_Return; + +L_Pass: + mes "[" + @npcname$ + "]"; + mes "\"Very well then, see you.\""; + goto L_Return; + +L_NoMoney: + mes "[" + @npcname$ + "]"; + mes "\"Oh dear, the price cannot be bargained."; + mes ""; + mes "Perhaps you can borrow from a friend?\""; + goto L_Return; + +L_Return: + @Cost = 0; + return; +} diff --git a/npc/functions/string.txt b/npc/functions/string.txt deleted file mode 100644 index ef2e4c2a..00000000 --- a/npc/functions/string.txt +++ /dev/null @@ -1,196 +0,0 @@ -// safe string manipulation functions -// ** does not require PCRE - - -// str() -// returns whatever is passed, converted to string - -function script str { - return "" + getarg(0); -} - - - -// startswith("", "") -// returns true if begins with - -function script startswith { - return substr(getarg(0), 0, getstrlen(getarg(1)) - 1) == getarg(1); -} - - - -// endswith("", "") -// returns true if ends with - -function script endswith { - .@t = getstrlen(getarg(0)); // total length - .@n = getstrlen(getarg(1)); // substring length - return substr(getarg(0), .@t - .@n, .@t - 1) == getarg(1); -} - - - -// capitalize("") -// returns with its first letter capitalized - -function script capitalize { - return setchar(getarg(0), strtoupper(charat(getarg(0), 0)), 0); -} - - - -// titlecase("" {, "" {, }}) -// returns with the first letter of each word capitalized -// if is true, the string is joined in a camelCase fashion - -function script titlecase { - .@delimiter$ = getarg(1, " "); - .@c = getarg(2, 0); - explode(.@words$, getarg(0), .@delimiter$); - - for (.@i = (.@c ? 1 : 0); .@i < 255; ++.@i) - { - if (.@words$[.@i] == "") - { - break; - } - - .@words$[.@i] = setchar(.@words$[.@i], strtoupper(charat(.@words$[.@i], 0)), 0); - } - - return implode(.@words$, (.@c ? "" : .@delimiter$)); -} - - - -// camelcase(""}) - -function script camelcase { - return titlecase(getarg(0), getarg(1, " "), true); -} - - - -// zfill("" {, {, ""}}) -// returns padded to the left with up to width - -function script zfill { - .@str$ = getarg(0); - .@width = getarg(1, 8); - .@padding$ = getarg(2, "0"); - - for (.@s = getstrlen(.@str$); .@s < .@width; ++.@s) - { - .@str$ = .@padding$ + .@str$; - } - - return .@str$; -} - - - -// format_number( {, ""}) -// formats a number properly - -function script format_number { - .@number$ = str(getarg(0)); - .@len = getstrlen(.@number$); - .@separator$ = getarg(1, ","); - - if (getargcount() < 2 && playerattached()) { - // get from user language - switch (Lang) { - case LANG_FR: .@separator$ = " "; break; // French - //case LANG_BR: .@separator$ = "."; break; // Portuguese - default: .@separator$ = ","; // English (default) - } - } - - for (.@i = .@len - 3; .@i > 0; .@i -= 3) { - .@number$ = insertchar(.@number$, .@separator$, .@i); - } - - return .@number$; -} - - - -// strip("") -// removes spaces at the start and end - -function script strip { - .@s$ = getarg(0); - if (.@s$ == "") { - return ""; - } - .@start = 0; - .@end = getstrlen(.@s$) - 1; - for (.@i = .@start; .@i < .@end; .@i++) - { - if (charat(.@s$, .@i) != " ") { - break; - } else { - .@start++; - } - } - for (.@i = .@end; .@i >= .@start; .@i--) - { - if (charat(.@s$, .@i) != " ") { - break; - } else { - .@end--; - } - } - return substr(.@s$, .@start, .@end); -} - - - -// reverse("") -// returns reversed - -function script reverse { - .@str$ = getarg(0); - .@len = getstrlen(.@str$); - - for (.@i = 0; .@i < (.@len / 2); ++.@i) { - .@tmp$ = charat(.@str$, .@i); - .@str$ = setchar(.@str$, charat(.@str$, (.@len - 1 - .@i)), .@i); // a <= b - .@str$ = setchar(.@str$, .@tmp$, (.@len - 1 - .@i)); // b <= a - } - - return .@str$; -} - - - -// repeat("", ) -// repeats many times and returns it - -function script repeat { - .@mul = getarg(1); - - for (.@i = 0; .@i < .@mul; ++.@i) { - .@str$ += getarg(0); - } - - return .@str$; -} - - - -// shuffle("") -// returns shuffled - -function script shuffle { - .@str$ = getarg(0); - - for (.@len = getstrlen(.@str$); .@len > 0; --.@len) { - .@rnd = rand(.@len); - .@out$ += charat(.@str$, .@rnd); - .@str$ = delchar(.@str$, .@rnd); - } - - return .@out$; -} diff --git a/npc/functions/time.txt b/npc/functions/time.txt old mode 100644 new mode 100755 index 8376d6a0..21b94ac5 --- a/npc/functions/time.txt +++ b/npc/functions/time.txt @@ -1,108 +1,159 @@ -function script now { - return gettimetick(2); -} - - -function script time_from_ms { - return now() + (getarg(0) / 1000); -} - -function script time_from_seconds { - return now() + getarg(0); -} -function script time_from_minutes { - return now() + (getarg(0) * 60); -} - -function script time_from_hours { - return now() + (getarg(0) * 3600); -} -function script time_from_days { - return now() + (getarg(0) * 86400); +function script time_stamp { + // local variables + // if there is reasonable demand, these might be exported + // (that is what the builtin is likely to do) + @ts_year = gettime(7); + @ts_month = gettime(6); + @ts_mday = gettime(5); + //set @ts_wday, gettime(4); + @ts_hour = gettime(3); + @ts_minute = gettime(2); + @ts_second = gettime(1); + + // locals used to generate leading zeroes + @ts_month_pad$ = ""; + @ts_mday_pad$ = ""; + @ts_hour_pad$ = ""; + @ts_minute_pad$ = ""; + @ts_second_pad$ = ""; + + if (@ts_month < 10) + @ts_month_pad$ = "0"; + if (@ts_mday < 10) + @ts_mday_pad$ = "0"; + if (@ts_hour < 10) + @ts_hour_pad$ = "0"; + if (@ts_minute < 10) + @ts_minute_pad$ = "0"; + if (@ts_second < 10) + @ts_second_pad$ = "0"; + + @ts_date$ = @ts_year + "-" + @ts_month_pad$ + @ts_month + "-" + @ts_mday_pad$ + @ts_mday; + @ts_time$ = @ts_hour_pad$ + @ts_hour + ":" + @ts_minute_pad$ + @ts_minute + ":" +@ts_second_pad$ + @ts_second; + + // cleanup + @ts_year = 0; + @ts_month = 0; + @ts_mday = 0; + @ts_hour = 0; + @ts_minute = 0; + @ts_second = 0; + @ts_month_pad$ = ""; + @ts_mday_pad$ = ""; + @ts_hour_pad$ = ""; + @ts_minute_pad$ = ""; + @ts_second_pad$ = ""; + + return; } -// FuzzyTime({, {, }}) -// gives time in a human-readable format -// -// is bitmasked: -// 1 do not show "ago" when in past -// 2 do not show "in" when in the future (default) -// 4 show "from now" instead of "in" when in the future -// -// is the number of units to show, -// do not exceed 99 (default is 2) - -function script FuzzyTime { - .@future = getarg(0, now()); - .@options = getarg(1, 2); - .@precision = getarg(2, 2); - .@diff = (.@future - now()); - - // check if in the past, or in the future - if (.@diff < 0) { - .@diff *= -1; - .@past = true; - } - - .@diff = max(1, .@diff); - - if (.@diff >= 31536000) { - .@years = (.@diff / 31536000); - .@diff = (++.@s == .@precision ? 0 : (.@diff % 31536000)); - .@ret$ += sprintf("%d %s", .@years, (.@years > 1 ? "years" : "year")); - } - - if (.@diff >= 86400) { - .@days = (.@diff / 86400); - .@diff = (++.@s == .@precision ? 0 : (.@diff % 86400)); - - if (.@s > 1) { - .@ret$ += (.@diff > 0 ? ", " : " and "); - } - - .@ret$ += sprintf("%d %s", .@days, (.@days > 1 ? "days" : "day")); - } - - if (.@diff >= 3600) { - .@hours = (.@diff / 3600); - .@diff = (++.@s == .@precision ? 0 : (.@diff % 3600)); - - if (.@s > 1) { - .@ret$ += (.@diff > 0 ? ", " : (.@s >= 3 ? ", " : " ") + "and "); - } - - .@ret$ += sprintf("%d %s", .@hours, (.@hours > 1 ? "hours" : "hour")); - } - - if (.@diff >= 60) { - .@minutes = (.@diff / 60); - .@diff = (++.@s == .@precision ? 0 : (.@diff % 60)); - - if (.@s > 1) { - .@ret$ += (.@diff > 0 ? ", " : (.@s >= 3 ? ", " : " ") + "and "); - } - - .@ret$ += sprintf("%d %s", .@minutes, (.@minutes > 1 ? "minutes" : "minute")); - } - - if (.@diff >= 1) { - if (++.@s > 1) { - .@ret$ += (.@s >= 3 ? ", " : " ") + "and "; - } - .@ret$ += sprintf("%d %s", .@diff, (.@diff > 1 ? "seconds" : "second")); - } - if (.@past && !(.@options & 1)) { - .@ret$ += " ago"; - } - if (!(.@past) && !(.@options & 2)) { - .@ret$ = ((.@options & 4) ? sprintf("%s from now", .@ret$) : sprintf("in %s", .@ret$)); - } - return .@ret$; +function script HumanTime { + @time$ = "now"; + if(@seconds) set @ms, @ms + (@seconds * 1000); + if(@minutes) set @ms, @ms + (@minutes * 60000); + if(@days) set @ms, @ms + (@days * 1440000); + if(@ms < 1000) goto L_Millis; // under 1 second we have nothing to count + @seconds = @ms / 1000; + @ms = @ms % 1000; + if(@seconds < 60) goto L_Seconds; + @minutes = @seconds / 60; + @seconds = @seconds % 60; + if(@minutes < 60) goto L_Minutes; + @hours = @minutes / 60; + @minutes = @minutes % 60; + if(@hours < 24) goto L_Hours; + @days = @hours / 24; + @hours = @hours % 24; + if(@days) goto L_Days; + goto L_Clean; + +L_Millis: + @time$ = @ms + "ms"; + return; + +L_Seconds: + @unit$ = "second"; + if(@seconds > 1) set @unit$, "seconds"; + @unit2$ = "millisecond"; + if(@ms > 1) set @unit2$, "milliseconds"; + @time$ = @seconds + " " + @unit$; + if(@ms) set @time$, @time$ + " and " + @ms + " " + @unit2$; + goto L_Clean; + +L_Minutes: + @unit$ = "minute"; + if(@minutes > 1) set @unit$, "minutes"; + @unit2$ = "second"; + if(@seconds > 1) set @unit2$, "seconds"; + @unit3$ = "millisecond"; + if(@ms > 1) set @unit3$, "milliseconds"; + @time$ = @minutes + " " + @unit$; + @separator$ = " and "; + if(@ms) set @separator$, ", "; + if(@seconds) set @time$, @time$ + @separator$ + @seconds + " " + @unit2$; + if(@ms) set @time$, @time$ + " and " + @ms + " " + @unit3$; + goto L_Clean; + +L_Hours: + @unit$ = "hour"; + if(@hours > 1) set @unit$, "hours"; + @unit2$ = "minute"; + if(@minutes > 1) set @unit2$, "minutes"; + @unit3$ = "second"; + if(@seconds > 1) set @unit3$, "seconds"; + @unit4$ = "millisecond"; + if(@ms > 1) set @unit4$, "milliseconds"; + @time$ = @hours + " " + @unit$; + @separator$ = " and "; + if(@seconds || @ms) set @separator$, ", "; + if(@minutes) set @time$, @time$ + @separator$ + @minutes + " " + @unit2$; + @separator$ = " and "; + if(@ms) set @separator$, ", "; + if(@seconds) set @time$, @time$ + @separator$ + @seconds + " " + @unit3$; + if(@ms) set @time$, @time$ + " and " + @ms + " " + @unit4$; + goto L_Clean; + +L_Days: + @unit$ = "day"; + if(@hours > 1) set @unit$, "days"; + @unit2$ = "hour"; + if(@hours > 1) set @unit2$, "hours"; + @unit3$ = "minute"; + if(@minutes > 1) set @unit3$, "minutes"; + @unit4$ = "second"; + if(@seconds > 1) set @unit4$, "seconds"; + @unit5$ = "millisecond"; + if(@ms > 1) set @unit5$, "milliseconds"; + @time$ = @days + " " + @unit$; + @separator$ = " and "; + if(@minutes || @seconds || @ms) set @separator$, ", "; + if(@hours) set @time$, @time$ + @separator$ + @hours + " " + @unit2$; + @separator$ = " and "; + if(@seconds || @ms) set @separator$, ", "; + if(@minutes) set @time$, @time$ + @separator$ + @minutes + " " + @unit3$; + @separator$ = " and "; + if(@ms) set @separator$, ", "; + if(@seconds) set @time$, @time$ + @separator$ + @seconds + " " + @unit3$; + if(@ms) set @time$, @time$ + " and " + @ms + " " + @unit4$; + goto L_Clean; + +L_Clean: + @unit$ = ""; + @unit2$ = ""; + @unit3$ = ""; + @unit4$ = ""; + @unit5$ = ""; + @seconds = 0; + @minutes = 0; + @hours = 0; + @days = 0; + @separator$ = ""; + return; } diff --git a/npc/functions/timer.txt b/npc/functions/timer.txt deleted file mode 100644 index fbfec3fd..00000000 --- a/npc/functions/timer.txt +++ /dev/null @@ -1,63 +0,0 @@ -// addtimer2(, "::") -function script addtimer2 { - deltimer(getarg(1)); - addtimer(getarg(0), getarg(1)); - return; -} - -// areatimer("", , , , , , "::") -function script areatimer { - .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4)); - for (.@i = 0; .@i < .@c; .@i++) { - addtimer(getarg(5), getarg(6), .@players[.@i]); - } - return .@i; -} - -// areadeltimer("", , , , , "::") -function script areadeltimer { - .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4)); - for (.@i = 0; .@i < .@c; .@i++) { - deltimer(getarg(5), .@players[.@i]); - } - return .@i; -} - -// areatimer2("", , , , , , "::") -function script areatimer2 { - .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4)); - for (.@i = 0; .@i < .@c; .@i++) { - deltimer(getarg(6), .@players[.@i]); - addtimer(getarg(5), getarg(6), .@players[.@i]); - } - return .@i; -} - - -// maptimer("", , "::") -function script maptimer { - .@c = getunits(BL_PC, .@players, false, getarg(0)); - for (.@i = 0; .@i < .@c; .@i++) { - addtimer(getarg(1), getarg(2), .@players[.@i]); - } - return .@i; -} - -// maptimer2("", , "::") -function script maptimer2 { - .@c = getunits(BL_PC, .@players, false, getarg(0)); - for (.@i = 0; .@i < .@c; .@i++) { - deltimer(getarg(2), .@players[.@i]); - addtimer(getarg(1), getarg(2), .@players[.@i]); - } - return .@i; -} - -// mapdeltimer("", "::") -function script mapdeltimer { - .@c = getunits(BL_PC, .@players, false, getarg(0)); - for (.@i = 0; .@i < .@c; .@i++) { - deltimer(getarg(1), .@players[.@i]); - } - return .@i; -} diff --git a/npc/functions/travelers.txt b/npc/functions/travelers.txt new file mode 100755 index 00000000..d7bd7ba7 --- /dev/null +++ b/npc/functions/travelers.txt @@ -0,0 +1,241 @@ + + +017-9,27,28,0 script #TravelConfig NPC32767,{ + end; + +OnInit: + // TravelFound + $@tut_bit = (1 << 2); + //set $@druid_tree_bit, (1 << 3); + $@graveyard_bit = (1 << 4); + $@magic_house_bit = (1 << 5); + $@terranite_cave_bit = (1 << 6); + $@tulimshar_bit = (1 << 7); + $@blue_sage_bit = (1 << 8); + $@hurnscald_bit = (1 << 9); + $@nivalis_bit = (1 << 10); + //set $@tul_mine_bit, (1 << 11); + $@pachua_bit = (1 << 12); + $@barbarians_bit = (1 << 14); + $@hurns_farms_bit = (1 << 15); + $@candor_bit = (1 << 16); + // Travel Base Cost + $@tulimshar_cost = 100; + $@hurnscald_cost = 100; + $@nivalis_cost = 100; + //set $@druid_tree_cost, 150; + //set $@tul_mine_cost, 150; + $@pachua_cost = 200; + $@graveyard_cost = 200; + $@magic_house_cost = 150; + $@terranite_cave_cost = 200; + $@blue_sage_cost = 200; + $@barbarians_cost = 150; + $@hurns_farms_cost = 150; + $@candor_cost = 200; + end; +} + +function script Traveler { + if(@npcname$ == "") set @npcname$, strnpcinfo(1); + mes "["+@npcname$+"]"; + mes "\"Greetings. I am "+@npcname$+" the Traveler.\""; + next; + + if (TravelFound & $@tut_bit) + goto L_Main; + goto L_TravelTut; + +L_Main: + if (TravelFound & @NpcTravelBit) + goto L_BitTravelSet; + goto L_SetTravelBit; + +L_BitTravelSet: + @Cost = 10; + if (BaseLevel < 45) + @Cost = 5; + goto L_Start; + +L_TravelTut: + mes "["+@npcname$+"]"; + mes "\"We travelers are found all over the world. Once you have found a traveler at a certain location, you can be sent back there instantly by another traveler.\""; + next; + if (TravelFound & $@tut_bit) + goto L_Main; + goto L_SetBit; + +L_SetBit: + TravelFound = TravelFound | $@tut_bit; + goto L_Main; + +L_SetTravelBit: + mes "["+@npcname$+"]"; + mes "\"Uplink set. You can now return to this spot for a fee.\""; + next; + TravelFound = TravelFound | @NpcTravelBit; + goto L_BitTravelSet; + +L_Start: + mes "\"Where would you like to go?\""; + menu + "Tonori - Tulimshar (" + (@Cost * $@tulimshar_cost) + " GP)", L_TravelTulimshar, + "Argeas - Hurnscald (" + (@Cost * $@hurnscald_cost) + " GP)", L_TravelHurnscald, + "Kaizei - Nivalis (" + (@Cost * $@nivalis_cost) + " GP)", L_TravelNivalis, + "Tonori - Pachua's Village (" + (@Cost * $@pachua_cost) + " GP)", L_TravelPachua, + "Argeas - Candor (" + (@Cost * $@candor_cost) + " GP)", L_TravelCandor, + "Argeas - Magic House (" + (@Cost * $@magic_house_cost) + " GP)", L_TravelMagicHouse, + "Argeas - Farmsteads (" + (@Cost * $@hurns_farms_cost) + " GP)", L_TravelHurnsFarms, + "Argeas - Graveyard (" + (@Cost * $@graveyard_cost) + " GP)", L_TravelGraveyard, + "Argeas - Terranite Cave (" + (@Cost * $@terranite_cave_cost) + " GP)", L_TravelTerranite, + "Kaizei - Barbarian Village (" + (@Cost * $@barbarians_cost) + " GP)", L_TravelBarbarians, + "Kaizei - Sage Nikolai's Mansion (" + (@Cost * $@blue_sage_cost) + " GP)", L_TravelBlueSage, + "Who are the Travelers?", L_TravelTut, + "I'm not interested.", L_TravelNo; + +L_TravelChecks: + if (@NpcTravelBit == @NextLocationBit) + goto L_AlreadyThere; + if (!(TravelFound & @NextLocationBit)) + goto L_NoFound; + if (Zeny < @NextLocationCost) + goto L_NoMoney; + goto L_TravelPlayer; + +L_TravelPlayer: + mes "["+@npcname$+"]"; + mes "\"Be fearless!\""; + close2; + Zeny = Zeny - @NextLocationCost; + warp @NextLocationMap$,@NextLocationX,@NextLocationY; + goto L_Clearvars; + +L_TravelGraveyard: + @NextLocationBit = $@graveyard_bit; + @NextLocationCost = (@Cost * $@graveyard_cost); + @NextLocationMap$ = "026-1"; + @NextLocationX = 49; + @NextLocationY = 45; + goto L_TravelChecks; + +L_TravelMagicHouse: + @NextLocationBit = $@magic_house_bit; + @NextLocationCost = (@Cost * $@magic_house_cost); + @NextLocationMap$ = "013-1"; + @NextLocationX = 120; + @NextLocationY = 93; + goto L_TravelChecks; + +L_TravelTerranite: + @NextLocationBit = $@terranite_cave_bit; + @NextLocationCost = (@Cost * $@terranite_cave_cost); + @NextLocationMap$ = "012-3"; + @NextLocationX = 445; + @NextLocationY = 65; + goto L_TravelChecks; + +L_TravelTulimshar: + @NextLocationBit = $@tulimshar_bit; + @NextLocationCost = (@Cost * $@tulimshar_cost); + @NextLocationMap$ = "002-1"; + @NextLocationX = 60; + @NextLocationY = 42; + goto L_TravelChecks; + +L_TravelBlueSage: + @NextLocationBit = $@blue_sage_bit; + @NextLocationCost = (@Cost * $@blue_sage_cost); + @NextLocationMap$ = "048-2"; + @NextLocationX = 26; + @NextLocationY = 47; + goto L_TravelChecks; + +L_TravelHurnscald: + @NextLocationBit = $@hurnscald_bit; + @NextLocationCost = (@Cost * $@hurnscald_cost); + @NextLocationMap$ = "008-1"; + @NextLocationX = 79; + @NextLocationY = 84; + goto L_TravelChecks; + +L_TravelNivalis: + @NextLocationBit = $@nivalis_bit; + @NextLocationCost = (@Cost * $@nivalis_cost); + @NextLocationMap$ = "020-1"; + @NextLocationX = 53; + @NextLocationY = 122; + goto L_TravelChecks; + +L_TravelPachua: + @NextLocationBit = $@pachua_bit; + @NextLocationCost = (@Cost * $@pachua_cost); + @NextLocationMap$ = "006-1"; + @NextLocationX = 28; + @NextLocationY = 97; + if(QUEST_MIRIAM_start != 0) goto L_Cheat; + goto L_TravelChecks; + +L_Cheat: + QUEST_MIRIAM_cheat = 1; + QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start; + QUEST_MIRIAM_start = 0; + goto L_TravelChecks; + +L_TravelBarbarians: + @NextLocationBit = $@barbarians_bit; + @NextLocationCost = (@Cost * $@barbarians_cost); + @NextLocationMap$ = "033-1"; + @NextLocationX = 66; + @NextLocationY = 33; + goto L_TravelChecks; + +L_TravelHurnsFarms: + @NextLocationBit = $@hurns_farms_bit; + @NextLocationCost = (@Cost * $@hurns_farms_cost); + @NextLocationMap$ = "055-1"; + @NextLocationX = 135; + @NextLocationY = 60; + goto L_TravelChecks; + +L_TravelCandor: + @NextLocationBit = $@candor_bit; + @NextLocationCost = (@Cost * $@candor_cost); + @NextLocationMap$ = "029-1"; + @NextLocationX = 69; + @NextLocationY = 69; + goto L_TravelChecks; + +L_TravelNo: + mes "["+@npcname$+"]"; + mes "\"Perhaps you will have the courage to help us some day.\""; + close2; + goto L_Clearvars; + +L_NoMoney: + mes "["+@npcname$+"]"; + mes "\"I'm sorry, but you don't have enough money. Maybe next time.\""; + close2; + goto L_Clearvars; + +L_NoFound: + mes "["+@npcname$+"]"; + mes "\"Sorry, but you haven't visited a traveler yet at that location. You should find and talk to a traveler there so you can quickly return to that location in the future.\""; + close2; + goto L_Clearvars; + +L_AlreadyThere: + mes "["+@npcname$+"]"; + mes "\"Uh... You're already here. Are you sure you know where you are going?\""; + close2; + goto L_Clearvars; + +L_Clearvars: + @npcname$ = ""; + @Cost = 0; + @NextLocationBit = 0; + @NextLocationCost = 0; + @NextLocationMap$ = ""; + @NextLocationX = 0; + @NextLocationY = 0; + return; +} diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt deleted file mode 100644 index 785dd4a0..00000000 --- a/npc/functions/treasure.txt +++ /dev/null @@ -1,134 +0,0 @@ -// Moubootaur Legends functions. -// Author: -// Jesusalva -// Description: -// Random Treasure Box Utils - -function script TreasureBox { - .@id=getnpcid(); - if (RNGTREASURE_DATE[.@id] > gettimetick(2)) { - mesc l("The chest is unlocked and empty."); - close; - } - - mesc l("Open the chest?"); - mesc l("Cost: 1 %s", getitemlink(TreasureKey)), 1; - if (!countitem(TreasureKey)) - close; - next; - if (askyesno() == ASK_NO) - close; - - delitem TreasureKey, 1; - mesc l("You open the chest!"); - RNGTREASURE_DATE[.@id]=gettimetick(2)+CHEST_WAITTIME; // Minimum 15 minutes - - .@empty=getvariableofnpc(.empty, strnpcinfo(0)); - if (!.@empty) { - TREASURE_OPEN=TREASURE_OPEN+1; - .@t=TREASURE_OPEN; - .@r=rand(0,10000)-(readbattleparam(getcharid(3), UDT_LUK)*2); - - // Select treasure list - // You're warranted a rare (5%) every 25 open chests - // There's also uncommons (20%) and commons (75%) - if (.@t == 1) - .@loot=WoodenBow; - else if (.@t % 25 == 0 || .@r < 500) // Rare: 5% - .@loot=any(AtroposMixture, ElixirOfLife, BigHealing, BigMana, DeathPotion, MagicFeather); - else if (.@r < 2500) // Uncommon: 20% - .@loot=any(FatesPotion, ClothoLiquor, LachesisBrew, RedPlushWine, TreasureMap, MediumHealing, MediumMana); - else // Common: 75% - .@loot=any(Bread, Fungus, Cheese, Aquada, Croconut, PiberriesInfusion, Carrot, SmallHealing, SmallMana); - - - inventoryplace .@loot, 1; - mesc l("You find %s inside!", getitemlink(.@loot)); - getitem .@loot, 1; - } else { - mesc l("You find %s inside!", l("nothing")); - } - return; -} - -// Animation code by Evol Team -// 4144, gumi, Hal9000, Reid -// (Random) Treasure Chest -// Authored by Jesusalva -// Regenerates every 6 hours -001-3-0,0,0,0 script #chest_001-3-0 NPC_CHEST,{ - /* - // Extract the map name - Seems unused - explode(.@ni$, .name$, "_"); - .@map$=.@ni$[1]; - //if (.@map$ == "") debugmes "Error"; - */ - - // Conditionals - if (!.busy) { - TreasureBox(); - - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing - .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing - .busy = true; // lock until available again - initnpctimer; - } else { - mesc l("Someone looted this treasure box already..."); - } - close; - -OnTimer160: - .dir = .dir == 6 ? 0 : 4; // closing ? closed : open - end; - -OnTimer500: - // It's closed: Make available and stop timer - if (.dir == 0) { - .busy = false; - stopnpctimer; - } - end; - -// Autoclose -OnTimer60000: - .dir = 6; // closing - specialeffect(25, AREA, getnpcid()); // closing - setnpctimer 0; - end; - -OnInit: - .busy = false; - .distance = 2; - -OnClock0156: -OnClock0756: -OnClock1356: -OnClock1956: - // Try to warp randomly to a walkable spot, up to 20 attempts - // Otherwise, it'll stay where it already is (but will close and refill). - .@e=0; .@x=0; .@y=0; - while (!checkcell(.map$, .@x, .@y, cell_chkpass)) - { - if (.@e == 20) { - .@x=.x; - .@y=.y; - break; - } - // Remember the +20 -20 margin adjustment - .@x = rand2(20, getmapinfo(MAPINFO_SIZE_X, .map$)-20); - .@y = rand2(20, getmapinfo(MAPINFO_SIZE_X, .map$)-20); - ++.@e; - } - .busy=false; - movenpc .name$, .@x, .@y, 0; - end; -} - -// Lets bring some treasure to The Mana World -008-3-4,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-4 NPC_TREASURE -008-3-5,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-5 NPC_TREASURE -008-3-6,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-6 NPC_TREASURE - -012-3-1,0,0,0 duplicate(#chest_001-3-0) #chest_012-3-1 NPC_TREASURE -012-3-3,0,0,0 duplicate(#chest_001-3-0) #chest_012-3-3 NPC_TREASURE - diff --git a/npc/functions/undead_debug.txt b/npc/functions/undead_debug.txt new file mode 100755 index 00000000..693edc13 --- /dev/null +++ b/npc/functions/undead_debug.txt @@ -0,0 +1,111 @@ + +function script UndeadDebug { + goto L_Main; + +L_Main: + if (@undeaddebug == 3) + goto L_UndeadDebugThree; + if (@undeaddebug == 4) + goto L_UndeadDebugFour; + if (@undeaddebug == 5) + goto L_UndeadDebugFive; + goto L_close; + +L_UndeadDebugThree: + mes "Reset your self to the various states."; + mes "Options Limited to Time and Place."; + menu + "Get Ritual Items.", L_KrukanItems, + "Nevermind.", L_close; + +L_UndeadDebugFour: + mes "Reset your self to the various states."; + mes "Options Limited to Time and Place."; + menu + "Get Ritual Items.", L_RazhaItems, + "Nevermind.", L_close; + +L_UndeadDebugFive: + mes "Reset your self to the various states."; + mes "Options Limited to Time and Place."; + menu + "Get Ritual Items.", L_TeroganItems, + "Nevermind.", L_close; + +L_InventoryNoSpace: + mes "\"Drop some weight then come back.\""; + goto L_close; + +L_KrukanItems: + if ((checkweight("Soul", 1) == 0) + || (checkweight("Skull", 5) == 0) + || (checkweight("DarkCrystal", 5) == 0) + || (checkweight("Bone", 5) == 0) + || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + getitem "Soul", 1; + getitem "Skull", 5; + getitem "DarkCrystal", 5; + getitem "Bone", 5; + goto L_Main; + +L_RazhaItems: + if ((checkweight("Soul", 3) == 0) + || (checkweight("DiseasedHeart", 5) == 0) + || (checkweight("UndeadEye", 5) == 0) + || (checkweight("UndeadEar", 5) == 0) + || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + getitem "Soul", 3; + getitem "DiseasedHeart", 5; + getitem "UndeadEye", 5; + getitem "UndeadEar", 5; + goto L_Main; + +L_TeroganItems: + if ((checkweight("Soul", 5) == 0) + || (checkweight("RottenRags", 5) == 0) + || (checkweight("UndeadEye", 5) == 0) + || (checkweight("UndeadEar", 5) == 0) + || (@inventorylist_count == 100)) + goto L_InventoryNoSpace; + getitem "Soul", 5; + getitem "RottenRags", 5; + getitem "UndeadEye", 5; + getitem "UndeadEar", 5; + goto L_Main; + +L_close: + close2; + return; +} + +027-3,84,89,0 script UndeadDebug3 NPC155,{ + @undeaddebug = 3; + callfunc "UndeadDebug"; + end; +OnInit: + if (!debug) + disablenpc "UndeadDebug3"; + end; +} + +027-4,76,79,0 script UndeadDebug4 NPC155,{ + @undeaddebug = 4; + callfunc "UndeadDebug"; + end; +OnInit: + if (!debug) + disablenpc "UndeadDebug4"; + end; +} + +027-5,72,26,0 script UndeadDebug5 NPC155,{ + @undeaddebug = 5; + callfunc "UndeadDebug"; + end; +OnInit: + if (!debug) + disablenpc "UndeadDebug5"; + end; +} diff --git a/npc/functions/util.txt b/npc/functions/util.txt deleted file mode 100644 index cedd4202..00000000 --- a/npc/functions/util.txt +++ /dev/null @@ -1,102 +0,0 @@ -// Evol functions. -// Authors: -// Jesusalva -// Reid -// Description: -// Util functions - - -// season_direction({day, month}) -// returns the direction that represents our current season (approximation) -// Note: You may also use WINTER/SPRING/SUMMER/AUTUMN constants for scripts -// where the direction is not important, but the season is. (Readability) -// DOWN: Winter, 21/12 WINTER -// DOWNLEFT: Spring, 20/03 SPRING -// LEFT: Summer, 21/06 SUMMER -// UPLEFT: Autumn, 22/09 AUTUMN - -function script season_direction { - .@current_month = getarg(1, gettime(GETTIME_MONTH)); - - if (.@current_month % 3 == 0) - { - .@current_day = getarg(0, gettime(GETTIME_DAYOFMONTH)); - - switch (.@current_month) - { - case MARCH: .@season_day = 20; break; - case JUNE: .@season_day = 21; break; - case SEPTEMBER: .@season_day = 22; break; - case DECEMBER: .@season_day = 21; break; - default: break; - } - - .@is_after_season_day = .@current_day >= .@season_day ? 0 : -1; - } - - return (.@current_month / 3 + .@is_after_season_day) % 4; -} - -// This is part of Jesusalva script toolkit to make his life easier when writing -// quests. Many of these are actually redundant functions. - -// Four different flavours of setq() to quickly preserve old values -function script setq1 { - // Quest, val1 , val2 , val3 , time - setq getarg(0), getarg(1), getq2(getarg(0)), getq3(getarg(0)), getqtime(getarg(0)); - return; -} - -function script setq2 { - // Quest, val1 , val2 , val3 , time - setq getarg(0), getq(getarg(0)), getarg(1), getq3(getarg(0)), getqtime(getarg(0)); - return; -} - -function script setq3 { - // Quest, val1 , val2 , val3 , time - setq getarg(0), getq(getarg(0)), getq2(getarg(0)), getarg(1), getqtime(getarg(0)); - return; -} - -function script setqtime { - // Quest, val1 , val2 , val3 , time - setq getarg(0), getq(getarg(0)), getq2(getarg(0)), getq3(getarg(0)), getarg(1); - return; -} - -// gettimeparam(GETTIME_X) -// Returns the number of seconds/minutes/hours/days/months/years since 01/01/1970 -// This is for truly daily quests, which doesn't imposes a timed wait in hours -function script gettimeparam { - .@p=getarg(0, GETTIME_MINUTE); - - // Seconds (same as gettimetick(2) - use that instead) - .@t=gettimetick(2); - if (.@p == GETTIME_SECOND) - return .@t; - - // Minutes (default) - .@t=.@t/60; - if (.@p == GETTIME_MINUTE) - return .@t; - - // Hours - .@t=.@t/60; - if (.@p == GETTIME_HOUR) - return .@t; - - // Days - .@t=.@t/24; - if (.@p == GETTIME_DAYOFMONTH) - return .@t; - - // Months (estimative) - .@t=.@t/30; - if (.@p == GETTIME_MONTH) - return .@t; - - // Years (estimative, unused, fallback) - .@t=.@t/12; - return .@t; -} diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt deleted file mode 100644 index 1cfe7c99..00000000 --- a/npc/functions/vault.txt +++ /dev/null @@ -1,98 +0,0 @@ -// TODO: create a Vault hercules plugin for native support - -// NOTE: no script other than the functions in this file should EVER access -// ##VAULT[] or the vault-bound variables - -/** - * Gets the Vault account ID of the provided or attached player. - * If the server does not use Vault, it returns a virtual Vault ID. - * - * Example: - * getvaultid("player name"); - * - * @param 0? - char name / account id (defaults to attached player) - * @return the Vault ID - */ -function script getvaultid { - if (SERVER_USES_VAULT) { - // we dereference the variable to avoid accidental assignment - return 0+ getvariableofpc(##VAULT[0], nameid2id(getarg(0, ""))); - } else { - return nameid2id(getarg(0, "")); - } -} - -/** - * gets a (fake) vault account-bound variable. - * right now these are map-server global variables so they should be used - * sparingly - * - * Example: - * set(getvaultvar(VAR$), "foo bar"); - * - * @param 0 - a variable name without prefix - * @param 1? - char name / account id (defaults to attached player) - * @return a reference to the variable - */ -function script getvaultvar { - if ((getdatatype(getarg(0)) & DATATYPE_VAR) == 0) { - consolemes(CONSOLEMES_ERROR, "getvaultvar: first argument should be a variable"); - end; - } - - .@var$ = data_to_string(getarg(0)); - - if (charat(.@var$, 0) == "." || charat(.@var$, 0) == "@" || - charat(.@var$, 0) == "$" || charat(.@var$, 0) == "#") { - consolemes(CONSOLEMES_ERROR, "getvaultvar: the variable must be unprefixed"); - end; - } - - if (SERVER_USES_VAULT) { - .@vault = getvaultid(getarg(1, "")); - return getd(sprintf("$VAULT_%s[%i]", .@var$, .@vault)); - } else { - return getvariableofpc(getd(sprintf("##%s", .@var$)), nameid2id(getarg(1, ""))); - } -} - -/** - * sets a (fake) vault account-bound variable. - * right now these are map-server global variables so they should be used - * sparingly - * - * Example: - * setvaultvar(FOO$, "bar"); - * - * @param 0 - a variable name without prefix - * @param 1 - the value to set - * @param 2? - char name / account id (defaults to attached player) - * @return a reference to the variable - */ -function script setvaultvar { - return set(getvaultvar(getarg(0), getarg(2, "")), getarg(1)); -} - -/** - * handles Vault hooks on player login - */ -- script VaultHandler NPC_HIDDEN,{ - public function OnDualLogin { - .@toKick$ = strcharinfo(PC_NAME, "", getarg(0, 0)); - - if (.@toKick$ != "") { - .@msg$ = sprintf("Kicking player %s (Vault dual-login)", .@toKick$); - consolemes(CONSOLEMES_INFO, .@msg$); // log this - dispbottom(.@msg$); // tell the player - - return kick(.@toKick$, 2); // reason 2 is dual-login - } - - return false; - } - -OnInit: - if (SERVER_USES_VAULT) { - "playerCache"::addVaultHandler("OnDualLogin"); - } -} diff --git a/npc/functions/villagertalk.txt b/npc/functions/villagertalk.txt deleted file mode 100644 index 371a9f20..00000000 --- a/npc/functions/villagertalk.txt +++ /dev/null @@ -1,53 +0,0 @@ -// Evol functions. -// Authors: -// Akko Teru -// Qwerty Dragon -// Reid -// Description: -// Tell a random sentence. || There ought to be a law! - -function script villagertalk { - - function darn_or_smile - { - .@darn = rand(42); - - if (.@darn < 26) - { - emotion E_JOY; - hello; - } - else if (.@darn > 26) - { - emotion E_LOOKAWAY; - goodbye; - } - else - { - npctalkonce(l("Stop it!")); - } - - return; - } - - switch (rand(4)) - { - case 0: - darn_or_smile(); - break; - case 1: - npctalkonce(l("It is a sunny day, don't you think?")); - break; - case 2: - npctalkonce(l("Go fly a kite.")); - break; - case 3: - npctalkonce(l("I just want to live my life in peace.")); - break; - default: - emotion E_HAPPY; - break; - } - - return; -} diff --git a/npc/functions/warp.txt b/npc/functions/warp.txt deleted file mode 100644 index 46c390ad..00000000 --- a/npc/functions/warp.txt +++ /dev/null @@ -1,58 +0,0 @@ -// Evol functions. -// Authors: -// gumi - - - -// map_exists -// self-explanatory - -function script map_exists { - return getmapinfo(MAPINFO_ID, getarg(0)) >= 0; -} - - - -// slide_or_warp -// Slides the player instead of warping, when possible. -// usage: -// slide_or_warp({}); -// slide_or_warp(, {, }); -// slide_or_warp("", , {, }); - -function script slide_or_warp { - if (getargcount() <= 1) { - .@aid = getarg(1, 0); - } else { - if (getargcount() >= 3 && getdatatype(getarg(0)) & DATATYPE_STR) { - .@map$ = getarg(0); - .@x = getarg(1); - .@y = getarg(2); - .@aid = getarg(3, 0); - } else { - .@x = getarg(0); - .@y = getarg(1); - .@aid = getarg(2, 0); - } - } - - if (!isloggedin(.@aid)) { - if ((.@aid = playerattached()) == 0) { - consolemes(CONSOLEMES_DEBUG, "slide_or_warp: no player attached!"); - return false; - } - } - - getmapxy(.@pc_map$, .@pc_x, .@pc_y, UNITTYPE_PC, .@aid); // get char location - .@cid = getcharid(CHAR_ID_CHAR, strcharinfo(PC_NAME, .@aid)); // FIXME: [Hercules] make it so you can pass account id directly to getcharid - - if (getargcount() < 1) { - warpchar(.@pc_map$, .@pc_x, .@pc_y, .@cid); // no arguments, just refresh - } else if (.@map$ == .@pc_map$ && (.@pc_x != .@x || .@pc_y != .@y)) { - slide(.@x, .@y); // same map, slide instead of full warp - // FIXME: make slide take GID as optional arg - } else { - warpchar(.@map$, .@x, .@y, .@cid); // different map, warp to given location - } - return true; -} diff --git a/npc/functions/water_bottle.txt b/npc/functions/water_bottle.txt new file mode 100755 index 00000000..bde12a0f --- /dev/null +++ b/npc/functions/water_bottle.txt @@ -0,0 +1,43 @@ + +function script WaterBottle { + @COST_PER_BOTTLE = 150; + + mes "How many empty bottles do you want to fill with water? It costs " + @COST_PER_BOTTLE + "gp per bottle."; + input @count; + + if (@count == 0) + goto L_close; + @Cost = @count * @COST_PER_BOTTLE; + @empty = countitem("EmptyBottle"); + + if (@empty < @count) + goto L_NotEnoughBottles; + if (Zeny < @Cost) + goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("BottleOfWater") == 0 + && @empty > @count) + goto L_NotEnoughSlots; + + Zeny = Zeny - @Cost; + delitem "EmptyBottle", @count; + getitem "BottleOfWater", @count; + goto L_close; + +L_NotEnoughBottles: + mes "You don't have that many empty bottles!"; + goto L_close; + +L_NotEnoughMoney: + mes "You don't have enough gp! You need " + @Cost + "gp."; + goto L_close; + +L_NotEnoughSlots: + mes "You don't have room for these bottles!"; + goto L_close; + +L_close: + close2; + return; +} diff --git a/npc/items/check_wand.txt b/npc/items/check_wand.txt new file mode 100755 index 00000000..e69de29b diff --git a/npc/items/cookie.txt b/npc/items/cookie.txt deleted file mode 100644 index e451e844..00000000 --- a/npc/items/cookie.txt +++ /dev/null @@ -1,22 +0,0 @@ -// Evol script. -// Author: -// Jesusalva -// Reid (?) -// Description: -// Prevents cookie from being used for too long - -function script UnequipCookie { - if (getequipid(EQI_HEAD_MID) == DeliciousCookie) - unequip(EQI_HEAD_MID); - return; -} - -- script #DeliciousCookie NPC_HIDDEN,{ - end; - -OnUnequip: - UnequipCookie(); - end; - -} - diff --git a/npc/items/croconut.txt b/npc/items/croconut.txt deleted file mode 100644 index 8e54971d..00000000 --- a/npc/items/croconut.txt +++ /dev/null @@ -1,72 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Reid -// Description: -// Allows to cut a Croconut in multiple parts. -// -// Possible choices for L_Weapon: -// rif(countitem(35xx), l(getitemname(xx))), L_Weak, -// rif(countitem(35yy), l(getitemname(yy))), L_Good, - -000-2-1,0,0,0 script Croconut NPC_HIDDEN,{ - close; - -OnUse: - mesn "Narrator"; - mesc(l("Do you want to cut this @@?", getitemlink(Croconut)), 9); - next; - - menu - l("Yes."), L_Weapon, - l("No."), -; - - getitem Croconut, 1; - close; - -L_Weapon: - mes ""; - mesn "Narrator"; - mesc(l("Which of your weapons do you want to use in order to cut this @@?", getitemlink(Croconut)), 9); - next; - - menu - rif(countitem(Knife) > 0, l(getitemname(Knife))), L_Weak, - rif(countitem(PiouSlayer) > 0, l(getitemname(PiouSlayer))), L_Weak, - rif(countitem(TrainingGladius) > 0, l(getitemname(TrainingGladius))), L_Good, - rif(countitem(WoodenSword) > 0, l(getitemname(WoodenSword))), L_Weak, - rif(countitem(ArtisBacksword) > 0, l(getitemname(ArtisBacksword))), L_Good, - l("Bare Hands"), -; - -L_TooWeak: - mes ""; - mesn "Narrator"; - - .@q = rand(5); - if (.@q == 0) goto L_TooWeakLost; - if ( (.@q == 1) || (.@q == 2) ) goto L_TooWeakFail; - if ( (.@q == 3) || (.@q == 4) || (.@q == 5) ) goto L_Weak; - -L_TooWeakLost: - mesc(l("You hit too hard with your fist, you destroyed your @@.", getitemlink(Croconut)), 9); - - close; - -L_TooWeakFail: - mesc(l("Your hands are too weak, you did not succeed in opening this @@.", getitemlink(Croconut)), 9); - - getitem Croconut, 1; - close; - -L_Weak: - mesc(l("You opened the @@ in two parts, but you crushed one of them.", getitemlink(Croconut)), 9); - - getitem HalfCroconut, 1; - close; - -L_Good: - mesc(l("You perfectly cut your @@ into two edible parts.", getitemlink(Croconut)), 9); - - getitem HalfCroconut, 2; - close; -} diff --git a/npc/items/gift.txt b/npc/items/gift.txt deleted file mode 100644 index be77bdfa..00000000 --- a/npc/items/gift.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Referral Gifts -// Rebased from Moubootaur Legends -// Author: -// Jesusalva - -function script OpenFriendGift { - if (BaseLevel < 5) { - dispbottom(l("You must reach level 5 to open this gift.")); - getitembound(FriendGift, 1, 1); - return; - } - - getitem(Acorn, 1); // FIXME: placeholder - //getitem(EventCoin, rand(1,3)); - - .@refVault = bitwise_get(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0); - .@refChar = "playerCache"::vault2char(.@refVault); - .@refName$ = "playerCache"::char2name(.@refChar); - - //$REFERRAL_IDS[.@refVault] += 1; - // ^ this doesn't seem to serve any purpose... - // if we want to keep track of how many accounts someone referred it - // should be something like: - // .@count = getvaultvar(REFERRAL_COUNT, .@refVault); - // setvaultvar(REFERRAL_COUNT, .@count + 1, .@refVault); - - dispbottom(l("Oooh, a gift from %s!", .@refName$)); - rodex_sendmail(.@refChar, "TMW Team", - "Invite Accepted", - sprintf("%s accepted your invitation and reached level 5!\n" - "As they get stronger, more rewards will be sent to you!", - strcharinfo(PC_NAME)), - rand(50, 150)); - return; -} diff --git a/npc/items/launcher_ammo.txt b/npc/items/launcher_ammo.txt new file mode 100755 index 00000000..4c84e950 --- /dev/null +++ b/npc/items/launcher_ammo.txt @@ -0,0 +1,19 @@ + +function script CheckLauncher { + if (getequipid(equip_arrow) == -1) + @LauncherType = 0; + return; +} + +function script CheckAmmo { + if ((@LauncherType == @AmmoType) || (!@LauncherType)) + goto L_Return; + + callfunc "UnequipLater"; + goto L_Return; + +L_Return: + @LauncherType = 0; + @AmmoType = 0; + return; +} diff --git a/npc/items/master_skillbook.txt b/npc/items/master_skillbook.txt deleted file mode 100644 index 007125cc..00000000 --- a/npc/items/master_skillbook.txt +++ /dev/null @@ -1,164 +0,0 @@ -// The Mana World script. -// Author: -// Jesusalva -// Elvano -// Description: -// Contains master skills which can only be learnt after killing boss -// See also: https://forums.themanaworld.org/viewtopic.php?f=2&t=19918 -// Notes: -// Not exactly as Elvano proposal. I actually care for restrictions you know... -// Variables: -// PERMANENT: -// MASTERBOOK_PAGES - How many pages your Master Book have. -// Defaults to zero, so you can't @item it. -// MASTERBOOK_SKILL - An array with the skills you have learnt from Master Book. -// - It's more flexible this way. -// TEMPORARY: -// @mb_BossId - Contains the MobID of the boss your party killed. -// @mb_SkillId - Contains the SkillID which can be learnt with the boss. -// @mb_ItemId - Contains the Feather Id to write (or whatever) -// @mb_ItemAm - How many ink is required to write the skill -// Remember: @mb_BossId will be reset to zero after 15 seconds from boss death. -// Or upon logout. Or when changing maps. Temporary variables aren't reliable. -// -// @mb_BossId controls if you'll try to LEARN a skill, or READ the book. -// Remember: A dialog prevents timer events from happening, but doesn't stops the timer. -// TODO: Currently no way to get skill name from database (add getskillinfo() to server-plugin please) -// TODO: Reset @mb_* when register_skill() finish -// TODO: You cannot get Magic Feather anywhere in the game (yet) -// TODO: See if the time (15s) is enough. -// TODO: Skill level up -// TODO: Use the data supplied by magic.txt - -- script #MasterBook NPC_HIDDEN,{ - - - function register_skill { - - setnpcdialogtitle l(.book_name$); - - // If boss is set, but is negative, this means somebody else defeated it - if (@mb_BossId < 0) - { - mesc l("You did not defeat the boss, you can't learn any skills."); - @mb_BossId=0; - close; - } - - // Report the boss you killed, and the boss level - .@mb_lvl=strmobinfo(3, @mb_BossId); - mesc l("You just defeated the following boss: @@ (Lv. @@)", strmobinfo(1, @mb_BossId), .@mb_lvl); - - // The boss must have a skill - if (!@mb_SkillId) - { - mesc l("But there is no skill to be learnt from this boss."); - @mb_BossId=0; - close; - } - // You must have free pages - if (array_entries(MASTERBOOK_SKILL) >= MASTERBOOK_PAGES) - { - mesc l("But you ran out of empty pages on this book."); - @mb_BossId=0; - close; - } - // TODO: Party Level Range - // You must be at most 30 levels below the monster level - if (BaseLevel+30 < .@mb_lvl) - { - mesc l("But you are out of the boss level range."); - @mb_BossId=0; - close; - } - // You must have enough materials - if (countitem(@mb_ItemId) < @mb_ItemAm) - { - mesc l("But you do not have enough Magic Ink. (You need: @@ @@)", @mb_ItemAm, getitemlink(@mb_ItemId)); - //@mb_BossId=0; - close; - } - - // Allow you to check which skills are here to learn - mes ""; - mesc l("You have: @@/@@ @@", countitem(@mb_ItemId), @mb_ItemAm, getitemlink(@mb_ItemId)); - mesc l("Skill Available: %s", getskillname(@mb_SkillId)); - select - rif(!getskilllv(@mb_SkillId), l("Learn Skill")), - l("Do not learn"); - mes ""; - if (@menu == 1) - { - delitem @mb_ItemId, @mb_ItemAm; - skill(@mb_SkillId, 1, 0); - array_push(MASTERBOOK_SKILL, @mb_SkillId); - closeclientdialog; - dispbottom l("You have learnt the skill."); - } - @mb_BossId=0; - close; - } - - - function read_book { - - setnpcdialogtitle l(.book_name$); - mesc l("@@/@@ pages used.", array_entries(MASTERBOOK_SKILL), MASTERBOOK_PAGES); - - mesc l("List of known master skills:"); - mes ""; - for (.@i = 0; .@i < getarraysize(MASTERBOOK_SKILL); ++.@i) { - mesc l("* Skill ID: @@", MASTERBOOK_SKILL[.@i]); - } - close; - } - -OnUse: - // We assume if @mb_BossId is set, everything else is set, too - if (@mb_BossId) - register_skill; - if (openbook()) - read_book; - closeclientdialog(); - close; - -OnInit: - .book_name$ = getitemname(MasterBook); - .distance = 1; - end; - -OnUnset: - @mb_BossId=0; - @mb_SkillId=0; - @mb_ItemId=0; - @mb_ItemAm=0; - end; -} - -// Script Helper -// BossSlain(npcname, "variable") -function script BossSlain { - .@n$=getarg(0); - // Error - if (!playerattached()) - return; - // Only the party which defeated the boss can learn the skill - getmapxy(.@m$, .@x, .@y, 0); - .@party=getcharid(1); - if (.@party > 0) - { - setd(getarg(1), .@party); - areatimer(.@m$, .@x-15, .@y-15, .@x+15, .@y+15, 10, .@n$+"::OnBossCheck"); - mapannounce .@m$, "Boss deafeated by Party: " + getpartyname(.@party), bc_all; - } - else - { - setd(getarg(1), -2); - areatimer(.@m$, .@x-15, .@y-15, .@x+15, .@y+15, 10, .@n$+"::OnBossCheck"); - addtimer(20, .@n$+"::OnBegin"); - mapannounce .@m$, "Boss deafeated by: " + strcharinfo(0), bc_all; - } - return; -} - - diff --git a/npc/items/mirror.txt b/npc/items/mirror.txt new file mode 100755 index 00000000..9e114c36 --- /dev/null +++ b/npc/items/mirror.txt @@ -0,0 +1,18 @@ +function script useMirror { + callfunc "getHeadStyles"; + goto L_Rand; + +L_Rand: + @mirror_rnd = @mirror_rnd + 1; + @style = rand(1,getarraysize(@HairStyles$)); + @color = rand((15 * (Class - 1)),((15 * (Class - 1)) + (getarraysize(@HairColors$) - 1))); + if(((getlook(LOOK_HAIR_STYLE) == @style) || (getlook(LOOK_HAIR_COLOR) == @color)) && @mirror_rnd < 15) + goto L_Rand; + if(@fixedMirror) + setlook LOOK_HAIR_STYLE, @style; + setlook LOOK_HAIR_COLOR, @color; + //if(!@fixedMirror) getitem "SilverMirror", 1; <== this can be used in the future to have a portable hair color changer (like scissors but for the color) + @fixedMirror = 0; + @mirror_rnd = 0; + return; +} diff --git a/npc/items/music_toys.txt b/npc/items/music_toys.txt deleted file mode 100644 index 8583f65e..00000000 --- a/npc/items/music_toys.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Evol scripts. -// Authors: -// Quillia -// mekolat (legacy delay logic) -// Description: -// Allows the RubberBat to be squeezed. -// - -- script RubberBat NPC_HIDDEN,{ - close; - -OnUse: - if (gettimetick(2) - @lastbat < 2) close; - specialeffect(70, AREA, playerattached()); // effect 70 defined in client-data/effects.xml - @lastbat = gettimetick(2); - - close; -} diff --git a/npc/items/pickled_beets.txt b/npc/items/pickled_beets.txt new file mode 100755 index 00000000..98d7360f --- /dev/null +++ b/npc/items/pickled_beets.txt @@ -0,0 +1,9 @@ +function script usePickledBeets { + heal 50, 0, 1; + if (Class == 1) + setlook LOOK_HAIR_COLOR, HC_PURPLE; + elif (Class == 2) + setlook LOOK_HAIR_COLOR, 18; + // add more here for races that have purple + return; +} diff --git a/npc/items/purification_potion.txt b/npc/items/purification_potion.txt new file mode 100755 index 00000000..47f84f3b --- /dev/null +++ b/npc/items/purification_potion.txt @@ -0,0 +1,26 @@ + +function script usePurificationPotion { + if (isat("011-1", 88,67)) + goto L_Wyara_Pond; + goto L_NoUse; + +L_NoUse: + message strcharinfo(0), "You don't know what to do with this."; + getitem "PurificationPotion", 1; + return; + +L_Wyara_Pond: + @Q_MASK = NIBBLE_2_MASK; + @Q_SHIFT = NIBBLE_2_SHIFT; + @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + if (@Q_status < 1) + goto L_NoUse; + if (@Q_status <= 2) + @Q_status = @Q_status + 1; + + message strcharinfo(0), "You pour the potion into the pond."; + + QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt deleted file mode 100644 index e4b0875a..00000000 --- a/npc/items/rand_sc_heal.txt +++ /dev/null @@ -1,85 +0,0 @@ -// Evol scripts. -// Author: -// Reid -// Description: -// Random heal every x seconds. -// -// Variables: -// @delay Second of healing -// @min Min amount of healing -// @max Max amount of healing -// @type 1 Heal -// 2 Other -// 3 Special 1 -// 4 Special 2 - -- script rand_sc_heal -1,{ - - // Add remaning bonus if the last one hasn't finished - function remaining_bonus - { - if (getstatus(getarg(0))) - { - .@old_val1 = getstatus(getarg(0), 1); - .@old_delay = getstatus(getarg(0), 4) * 1000; - - // change the delay to prevent fast healing - if (.@old_delay > @delay) - { - @delay = .@old_delay; - @val1 += .@old_val1; - } - else - { - @val1 += (.@old_val1 * .@old_delay) / @delay; - } - } - else - { - @val1 = @val3; - } - return; - } - -OnUse: - if (@delay <= 0) close; - - // minimum between @min and bVit / 2 * BaseLevel / 10 - .@vitality_bonus = min(@min, readparam(bVit) * BaseLevel / 20); - .@rand_heal_val = rand(@min, @max); - - // val1 is the heal value without the vitality bonus - @val1 = .@rand_heal_val / @delay; - @val3 = (.@rand_heal_val + .@vitality_bonus) / @delay; - - if (@val1 <= 0) close; - - @delay *= 1000; // Put the delay in ms - - switch (@type) - { - case 1: - .@skill = SC_S_LIFEPOTION; - break; - case 2: - .@skill = SC_L_LIFEPOTION; - break; - case 3: - .@skill = SC_G_LIFEPOTION; - break; - case 4: - .@skill = SC_M_LIFEPOTION; - break; - default : - .@skill = 0; - break; - } - if (.@skill != 0) - { - remaining_bonus(.@skill); - sc_end .@skill; - sc_start2 .@skill, @delay, @val1, 1; - } - - close; -} diff --git a/npc/items/recipes.txt b/npc/items/recipes.txt deleted file mode 100644 index 42cdf51b..00000000 --- a/npc/items/recipes.txt +++ /dev/null @@ -1,352 +0,0 @@ -// Evol script. -// Author: -// Jesusalva -// Micksha -// Description: -// Contains recipe books for Evol Online - -// showRecipe( recipe{, recipe...} ) -function script showRecipe { - freeloop(true); - for (.@a = 0; .@a < getargcount(); ++.@a) { - .@const$ = data_to_string(getarg(.@a)); - - if (startswith(.@const$, "Craft")) { - // infer the item constant from the craft constant - .@recipe = getarg(.@a); - - .@item = string_to_data(substr(.@const$, 5, getstrlen(.@const$) - 1)); - } else { - // infer the craft constant from the item constant - .@recipe = string_to_data(sprintf("Craft%s", .@const$)); - .@item = getarg(.@a); - } - - if (.@item <= 0) { - // target item not found - continue; - } - - if (!RECIPES[.@recipe] && !debug) { - // does not have the recipe - continue; - } - - for (.@inv = 0; .@inv < 9; ++.@inv) { - .@size = getcraftrecipe(.@recipe, .@inv, .@qty[0], .@item_id[0]); - - if (.@size < 0) { - if (.@size == -1) { - // recipe does not exist - break; - } - // inventory does not exist - break; - } - - mes(l(".:: %s Recipe ::.", getitemlink(.@item))); - - for (.@it = 0; .@it < .@size; ++.@it) { - .@recipe_item = .@item_id[.@it]; - .@recipe_qty = .@qty[.@it]; - - if (.@recipe_item <= 0) { - break; - } - - mesc(sprintf("%d/%d %s", countitem(.@recipe_item), .@recipe_qty, getitemlink(.@recipe_item))); - } - - mes(""); - .@count++; - } - } - freeloop(false); - - return .@count > 0; -} - -- script #RecipeBook NPC_HIDDEN,{ - function read_book; - function read_cooking; - function read_smithery; - function read_tailoring; - end; - -function read_book { - setnpcdialogtitle l(.book_name$); - mesc l("This book has several bookmarks. Which one will you open?"); - next; - menuint - l("Cooking"), CRAFT_COOKING, - l("Alchemy"), CRAFT_ALCHEMY, - l("Smithery"), CRAFT_SMITHERY, - l("Tailoring"), CRAFT_TAILORING, - l("Jewelery"), CRAFT_JEWELERY; - mes ""; - switch (@menuret) { - case CRAFT_COOKING: - read_cooking(); break; - case CRAFT_SMITHERY: - read_smithery(); break; - case CRAFT_TAILORING: - read_tailoring(); break; - default: - mesc l("Unfortunately, there is nothing on this bookmark."); - mesc l("Perhaps, in future, someone adds it to this world."); - break; - } - close2(); - return; -} - -/////////////////////////////////////////////////////////////////////////////// -function read_cooking { - - setnpcdialogtitle l("Cooking Recipes"); - - mesc l("Eating is a necessity, but cooking is an art."); - mesc l("(All items must be placed exactly in this order for cooking work.)"); - next; - mesc l("List of known cooking recipes:"); - mes ""; - mes ".:: " + l("Sandwiches") + " ::."; - mes ""; - - showRecipe(CarpSandwich, - PioulegSandwich, - MananaSandwich); - - mes ""; - mes ".:: " + l("Stew") + " ::."; - mes ""; - - showRecipe(SailorStew, - SquirrelStew, - MoubooStew); - - mes ""; - mes ".:: " + l("Plates") + " ::."; - mes ""; - - showRecipe(SeafoodPlate, - BarbecuePlate, - VeggiePlate); - - mes ""; - mes ".:: " + l("Desserts") + " ::."; - mes ""; - - showRecipe(Donut, - BlueberryCake, - CarrotCake); - return; -} - -/////////////////////////////////////////////////////////////////////////////// -function read_smithery { - - setnpcdialogtitle l("Smithery Recipes"); - - mesc l("You will trust your life to this, so you better do a good job!"); - mesc l("(All items must be placed exactly in this order.)"); - next; - mesc l("List of known smithery recipes:"); - - mes(); - mesf(".:: %s ::.", l("Chest Armor")); - mes(); - - showRecipe(LegionTrainingShirt, - LegionCopperArmor, - Chainmail, - Snakeplate, - LightPlatemail, - JustifierChest, - LegionIronArmor, - WarlordPlate, - TerraniteArmor, - AssassinChest, - BlackArmor, - GoldenWarlordPlate); - - next(); - mes(); - mesf(".:: %s ::.", l("Leg Armor")); - mes(); - - showRecipe(ChainmailSkirt, - TerranitePants, - AssassinPants); - - next(); - mes(); - mesf(".:: %s ::.", l("Gloves")); - mes(); - - showRecipe(CopperArmbands, - BromenalGloves, - IronArmbands); - - next(); - mes(); - mesf(".:: %s ::.", l("Boots")); - mes(); - - showRecipe(BromenalBoots, - WarlordBoots); - - return; -} - -function read_tailoring { - setnpcdialogtitle(l("Tailoring Recipes")); - - mesc(l("(All items must be placed exactly in this order.)")); - next(); - mesc(l("List of known tailoring recipes:")); - - mes(); - mesf(".:: %s ::.", l("Chest Armor")); - mes(); - - showRecipe(CreasedShirt, - ArtisTankTop, - VneckJumper, - SailorShirt, - FineDress, - SilkRobe, - ForestArmor, - ApprenticeRobe, - PeltJacket, - SorcererRobe, - WizardRobe, - EvocatorRobe); - - next(); - mes(); - mesf(".:: %s ::.", l("Leg Armor")); - mes(); - - showRecipe(CreasedShorts, - CottonSkirt, - PirateShorts, - SilkPants, - BrownTrousers, - BanditTrousers, - JeansChaps, - LeatherTrousers); - - next(); - mes(); - mesf(".:: %s ::.", l("Gloves")); - mes(); - - showRecipe(ShortGloves, - Armbands, - CottonGloves, - BanditGloves, - SilkGloves, - LeatherGloves, - AssassinGloves); - - next(); - mes(); - mesf(".:: %s ::.", l("Boots")); - mes(); - - showRecipe(LousyMoccasins, - Slippers, - CottonBoots, - BanditBoots, - ManaSlippers, - SquirrelBoots, - LeatherBoots, - RidingBoots, - AssassinBoots); - - return; -} - - -OnUse: - if (openbook()) - read_book(); - closeclientdialog(); - close; - -OnInit: - .book_name$ = getitemname(RecipeBook); - .distance = 1; - end; -} - -////////////////////////////////////////////////////// -// Below this line are utils for Gacha. We use callfunc() on itemDB. -// Types: see constants.db - everything is a bitwise here -// Rarity: 1 - basic, 2 - intermediary, 4 - advanced, 8 - expert, 16 - master -// Rarity: 1 - training, 2 - basic, 4 - advanced, 8 - expert, 16 - legendary -// Keep in mind! Expert and Master blueprints must be restricted! -// MakeBlueprint(type, rarity) -function script MakeBlueprint { - .@type=getarg(0, -1); - .@rarity=getarg(1, 1); - - if (.@type & CRAFT_COOKING) { - - // ---------------------------------- - if (.@rarity & CRAFT_BASIC) { - } - if (.@rarity & CRAFT_INTERMEDIARY) { - } - if (.@rarity & CRAFT_ADVANCED) { - } - if (.@rarity & CRAFT_EXPERT) { - } - if (.@rarity & CRAFT_MASTER) { - } - // ---------------------------------- - - } - else if (.@type & CRAFT_SMITHERY) - { - - // ---------------------------------- - if (.@rarity & CRAFT_BASIC) { - } - if (.@rarity & CRAFT_INTERMEDIARY) { - array_push(.@recipes, CraftInfantryHelmet); - } - if (.@rarity & CRAFT_ADVANCED) { - } - if (.@rarity & CRAFT_EXPERT) { - } - if (.@rarity & CRAFT_MASTER) { - } - // ---------------------------------- - - } - - // We don't have a .@recipes array D: - if (array_entries(.@recipes) <= 0) { - dispbottom l("This blueprint was blank."); - return; - } - - // Select a recipe randomly - .@rcp=any_of(.@recipes); - - // Double precision failsafe - if (RECIPES[.@rcp]) - .@rcp=any_of(.@recipes); - - // Learn the recipe or lose the item (and gain some EXP) - if (RECIPES_[.@rcp]) { - dispbottom l("It was a recipe you already knew..."); - getexp (BaseLevel+JobLevel)*rand2(1,.@rarity), JobLevel+rand2(1,.@rarity); - } else { - dispbottom l("Learned a new recipe!"); - RECIPES[.@rcp]=true; - } - return; -} diff --git a/npc/items/require_stat.txt b/npc/items/require_stat.txt new file mode 100755 index 00000000..cd274b62 --- /dev/null +++ b/npc/items/require_stat.txt @@ -0,0 +1,13 @@ + +function script RequireStat { + @bStatVal = @bStat; + // If the requirement isn't met, we set an unequip trigger. + // The item is now removed. + if (@bStat < @minbStatVal) + goto L_Unequip; + return; + +L_Unequip: + callfunc "UnequipLater"; + return; +} diff --git a/npc/items/restricted_item.txt b/npc/items/restricted_item.txt new file mode 100755 index 00000000..96a60272 --- /dev/null +++ b/npc/items/restricted_item.txt @@ -0,0 +1,14 @@ + +function script RestrictedItem { + if (!@minLvl) set @minLvl, 60; + if (debug || getgmlevel() >= @minLvl) goto L_Return; // If the active character is staff, do nothing. + message strcharinfo(0), "This item repells you with extreme force. It does not seem to be meant for you."; + callfunc "UnequipLater"; + if (getgmlevel()) goto L_Return; + wgm "Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'."; + gmlog "Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'."; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/items/rubber_bat.txt b/npc/items/rubber_bat.txt new file mode 100755 index 00000000..a5921674 --- /dev/null +++ b/npc/items/rubber_bat.txt @@ -0,0 +1,10 @@ +function script rubberBat { + if (gettimetick(2) - @lastbat < 2) goto L_Return; + misceffect 403; + @lastbat = gettimetick(2); + goto L_Return; + +L_Return: + getitem "RubberBat", 1; + return; +} diff --git a/npc/items/scissors.txt b/npc/items/scissors.txt new file mode 100755 index 00000000..d27e8f6f --- /dev/null +++ b/npc/items/scissors.txt @@ -0,0 +1,13 @@ +function script useScissors { + getitem "Scissors", 1; + if (rand(3)) + goto L_Change; + message strcharinfo(0), "Whoops!"; + heal -20 - rand(Hp >> 1), 0; + return; + +L_Change: + callfunc "getHeadStyles"; + setlook LOOK_HAIR_STYLE, rand(1,getarraysize(@HairStyles$)); + return; +} diff --git a/npc/items/shock_sweet.txt b/npc/items/shock_sweet.txt new file mode 100755 index 00000000..f1f1df71 --- /dev/null +++ b/npc/items/shock_sweet.txt @@ -0,0 +1,14 @@ +function script useShockSweet { + if (rand(5)) + goto L_Change; + message strcharinfo(0), "Yuck, this tastes like earwax!"; + heal -20 - (Hp >> 2), 0; + return; + +L_Change: + setlook LOOK_HAIR_COLOR, (HC_WHITE - Class) + 1; + message strcharinfo(0), "Gah! That was some strong stuff!"; + sc_start SC_POISON, 1, 20; + misceffect 15, strcharinfo(0); + return; +} diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt deleted file mode 100644 index b4a5a968..00000000 --- a/npc/items/shovel.txt +++ /dev/null @@ -1,361 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Jesusalva -// Description: -// NPC to use shovel (dig, bury etc) - -- script Shovel -1,{ - - function CheckDigLocation { - getmapxy(.@map$, .@x, .@y, 0); - - if (.@map$ != "001-1") { - if (getunits(BL_NPC, .@units, 1, .@map$, .@x - 1, .@y, .@x + 1, .@y + 1)) - { - dispbottom(l("You cannot bury under a NPC!")); - return false; - } - } - - // TODO: we should have a way to check for GROUNDTOP collisions too - - for (.@i = 0; .@i < getarraysize(.WorldDigRect_Map$); .@i++) - { - if (!strcmp(.WorldDigRect_Map$[.@i], .@map$) && - .WorldDigRect_x1[.@i] <= .@x && - .WorldDigRect_x2[.@i] >= .@x && - .WorldDigRect_y1[.@i] <= .@y && - .WorldDigRect_y2[.@i] >= .@y) - { - return true; - } - } - - dispbottom(l("You can't use the shovel here.")); - return false; - } - - function AddDigRect { - if (getargcount() < 5) - { - consolemes(CONSOLEMES_ERROR, "usage: AddDigRect(map$,x1,y1,x2,y2)"); - return 0; - } - .@map$ = str(getarg(0)); - .@x1 = getarg(1); - .@y1 = getarg(2); - .@x2 = getarg(3); - .@y2 = getarg(4); - .@size = getarraysize(.WorldDigRect_Map$); - .WorldDigRect_Map$[.@size] = .@map$; - .WorldDigRect_x1[.@size] = .@x1; - .WorldDigRect_y1[.@size] = .@y1; - .WorldDigRect_x2[.@size] = .@x2; - .WorldDigRect_y2[.@size] = .@y2; - return 1; - } - - function AddMapDigRect { - .@m$=getarg(0); - .@x=getmapinfo(MAPINFO_SIZE_X, .@m$)-20; - .@y=getmapinfo(MAPINFO_SIZE_Y, .@m$)-20; - return AddDigRect(.@m$, 20, 20, .@x, .@y); - } - - function PlayerIsTired { - if (is_evtc()) - return false; // event coordinators are never tired - - .@tick = gettimetick(1); - .@playertick = .PlayerTiredTime - readparam(bStr); - if (@ShovelLastUsed + max(4, .@playertick) > .@tick) - { - narrator S_FIRST_BLANK_LINE, - l("You are exhausted, you should rest a bit."); - return true; - } - @ShovelLastUsed = .@tick; - return false; - } - - function Dig { - getmapxy(.@map$, .@x, .@y, 0); - for (.@i = 0; .@i < getarraysize($WorldBuriedTreasures_id); .@i++) - { - if (!strcmp($WorldBuriedTreasures_map$[.@i], .@map$) && - $WorldBuriedTreasures_x[.@i] == .@x && - $WorldBuriedTreasures_y[.@i] == .@y) - { - .@id = $WorldBuriedTreasures_id[.@i]; - .@amount = $WorldBuriedTreasures_amount[.@i]; - deletearray $WorldBuriedTreasures_id[.@i], 1; - deletearray $WorldBuriedTreasures_amount[.@i], 1; - deletearray $WorldBuriedTreasures_map$[.@i], 1; - deletearray $WorldBuriedTreasures_x[.@i], 1; - deletearray $WorldBuriedTreasures_y[.@i], 1; - getitem .@id, .@amount; - narrator S_FIRST_BLANK_LINE, - l("You found something!"), - l("It's @@ @@.", .@amount, getitemname(.@id)); - return 1; - } - } - narrator S_FIRST_BLANK_LINE, l("Sadly, you found nothing but dirt."); - return 0; - } - - function Bury { - narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("What would you like to bury?"); - .@items$ = ""; - - mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - - .@id = requestitem(); - - // If ID is invalid, there's not enough items, it is an Iron Shovel, it is bound = Cannot bury - // NOBODY bypass notrade check. (ITR_NONE is 0) - if (.@id < 1) close; - if (.@id < 1 || countitem(.@id) < 1 || .@id == IronShovel || checkbound(.@id) || - (!getiteminfo(.@id, ITEMINFO_TRADE)) - ) { - @ShovelLastUsed = 0; - if (.@id == IronShovel || .@id == SteelShovel || checkbound(.@id)) - mesc l("You cannot bury this item!"); - else if (!getiteminfo(.@id, ITEMINFO_TRADE)) - mesc l("This item is too precious, you cannot part with it!"); - else - mesc l("You give up."); - close; - return; - } - - .@amount = 1; - if (countitem(.@id) > 1) - { - narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("Amount?"); - input .@amount, 1, countitem(.@id); - } - - getmapxy(.@map$, .@x, .@y, 0); - - delitem .@id, .@amount; - .@wtc = getarraysize($WorldBuriedTreasures_id); - $WorldBuriedTreasures_id[.@wtc] = .@id; - $WorldBuriedTreasures_amount[.@wtc] = .@amount; - $WorldBuriedTreasures_map$[.@wtc] = .@map$; - $WorldBuriedTreasures_x[.@wtc] = .@x; - $WorldBuriedTreasures_y[.@wtc] = .@y; - narrator S_FIRST_BLANK_LINE, l("You buried @@ @@.", .@amount, getitemname(.@id)); - - return true; - } - - function ShovelQuests { - getmapxy(.@map$, .@x, .@y, 0); - for (.@i = 0; .@i < getarraysize(ShovelQuests_func$); .@i++) - { - if (!strcmp(ShovelQuests_map$[.@i], .@map$) && - ShovelQuests_x[.@i] == .@x && - ShovelQuests_y[.@i] == .@y) - { - .@func$ = ShovelQuests_func$[.@i]; - deletearray ShovelQuests_func$[.@i], 1; - deletearray ShovelQuests_map$[.@i], 1; - deletearray ShovelQuests_x[.@i], 1; - deletearray ShovelQuests_y[.@i], 1; - callfunc(.@func$); - return 1; - } - } - return 0; - } - -OnUse: - if (!CheckDigLocation()) - end; - - narrator S_LAST_BLANK_LINE, - l("You hold the shovel in your hands."), - l("What are you going to do?"); - - .@action = select( - l("Dig."), - l("Bury."), - l("Nothing.")); - - switch(.@action) - { - case 1: - if (PlayerIsTired()) - close; - if (!ShovelQuests()) - Dig(); - break; - case 2: - if (PlayerIsTired()) - close; - Bury(); - break; - case 3: - narrator S_FIRST_BLANK_LINE, l("You hide your shovel."); - break; - } - close; - -OnHour00: - if (playerattached()) - @ShovelLastUsed = 0; - end; - -OnInit: - .PlayerTiredTime = 20; - - // Partial maps - AddDigRect("001-1", 172, 26, 200, 48); - AddDigRect("001-1", 198, 60, 201, 63); - AddDigRect("008-1-1", 32, 42, 46, 88); - AddDigRect("008-1-2", 40, 52, 114, 146); - AddDigRect("012-1", 44, 21, 139, 47); - - // Whole maps - AddMapDigRect("008-1"); - AddMapDigRect("008-3-5"); - AddMapDigRect("012-3-1"); - end; - -} - -function script shovel_addquest { - if (getargcount() < 4) - { - consolemes(CONSOLEMES_ERROR, "usage: shovel_addquest(map$,x,y,func$)"); - return 0; - } - .@map$ = str(getarg(0)); - .@x = getarg(1); - .@y = getarg(2); - .@func$ = str(getarg(3)); - .@size = getarraysize(ShovelQuests_func$); - ShovelQuests_func$[.@size] = .@func$; - ShovelQuests_map$[.@size] = .@map$; - ShovelQuests_x[.@size] = .@x; - ShovelQuests_y[.@size] = .@y; - return 1; -} - -function script shovel_adddigrect { - if (getargcount() < 5) - { - consolemes(CONSOLEMES_ERROR, "usage: shovel_adddigrect(map$,x1,y1,x2,y2)"); - return 0; - } - .@map$ = str(getarg(0)); - .@x1 = getarg(1); - .@y1 = getarg(2); - .@x2 = getarg(3); - .@y2 = getarg(4); - .@size = getarraysize(getvariableofnpc(.WorldDigRect_Map$, strnpcinfo(3))); - set getvariableofnpc(.WorldDigRect_Map$[.@size], strnpcinfo(3)), .@map$; - set getvariableofnpc(.WorldDigRect_x1[.@size], strnpcinfo(3)), .@x1; - set getvariableofnpc(.WorldDigRect_y1[.@size], strnpcinfo(3)), .@y1; - set getvariableofnpc(.WorldDigRect_x2[.@size], strnpcinfo(3)), .@x2; - set getvariableofnpc(.WorldDigRect_y2[.@size], strnpcinfo(3)), .@y2; - return 1; -} - -// [Treasure Map] functions - -function script shovel_getcity { - .@a$=getarg(0); - - // else is not required (return prevails) - if (.@a$ == "001-1") - return l("Artis East Beach"); - if (.@a$ == "008-1") - return l("East Woodlands"); - if (.@a$ == "008-1-1") - return l("West Woodland Beach"); - if (.@a$ == "008-1-2") - return l("Swamps"); - if (.@a$ == "008-3-5") - return l("Hurnscald Bandit Cave"); - if (.@a$ == "012-1") - return l("Candor North"); - if (.@a$ == "012-3-1") - return l("Candor Main Cave"); - - return .@a$; -} - -function script shovel_randomtreasure { - .@id=any(TreasureKey,CoinBag,CoinBag,CoinBag,Coal, - Diamond,Ruby,Emerald,Sapphire,Topaz,Amethyst, - CrudeDiamond,CrudeRuby,CrudeEmerald, - CrudeSapphire,CrudeTopaz,CrudeAmethyst, - MaggotSlimePotion, LargeMana, LargeHealing); - delitem TreasureMap, 1; - .@amount=any(1,1,2); - // Very Commons - if (.@id == CoinBag || .@id == MaggotSlimePotion || .@id == TreasureKey) - .@amount+=any(0,1,0,1,2); - // Super commons - if (.@id == LargeMana || .@id == LargeHealing) - .@amount+=rand2(0,8); - // Rares - if (.@id == Coal) - .@amount=1; - getitem .@id, .@amount; - ShovelQuests_AssignedMAP$=""; - ShovelQuests_AssignedX=0; - ShovelQuests_AssignedY=0; - - mesn strcharinfo(0); - mesc l("You found something!"); - mesc l("It's %d %s.", .@amount, getitemlink(.@id)); - next; - closeclientdialog; - return; -} - -function script shovel_genrandtreasure { - .@m$=any("008-1", "008-1-1", "008-1-2", "008-3-5", - "012-1", "012-3-1"); - - // Prepare good defaults - .@x1=.@y1=20; - .@x2=getmapinfo(MAPINFO_SIZE_X, .@m$)-20; - .@y2=getmapinfo(MAPINFO_SIZE_Y, .@m$)-20; - - // Default overrides - if (.@m$ == "008-1-1") { - // West Woodland Beach - .@x1=32; .@y1=42; - .@x2=46; .@y2=88; - } else if (.@m$ == "008-1-2") { - // Swamps - .@x1=40; .@y1=52; - .@x2=114; .@y2=146; - } else if (.@m$ == "012-1") { - // Candor North - .@x1=44; .@y1=139; - .@x2=21; .@y2=47; - } - - // Dangerous, but I never had issues with this - do { - .@x=rand2(.@x1, .@x2); - .@y=rand2(.@y1, .@y2); - } while (!checkcell(.@m$, .@x, .@y, cell_chkpass)); - - // Success - if (checkcell(.@m$, .@x, .@y, cell_chkpass)) { - shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure"); - ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); - ShovelQuests_AssignedX=.@x; - ShovelQuests_AssignedY=.@y; - } - return; -} - - diff --git a/npc/items/unequipcb.txt b/npc/items/unequipcb.txt new file mode 100755 index 00000000..a1c7881d --- /dev/null +++ b/npc/items/unequipcb.txt @@ -0,0 +1,22 @@ +- script UnequipCB NPC32767,{ + end; + +OnUnequip: + unequipbyid (@unequip_slot - 1); + @unequip_slot = 0; + end; +} + +function script UnequipLater { + // if there are multiple items that want to be removed, + // only schedule one timer - scripts will be called again + if (@unequip_slot) + goto L_Return; + + @unequip_slot = (@slotId + 1); + addtimer 0, "UnequipCB::OnUnequip"; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/items/unreleased_item.txt b/npc/items/unreleased_item.txt new file mode 100755 index 00000000..c88df137 --- /dev/null +++ b/npc/items/unreleased_item.txt @@ -0,0 +1,12 @@ + +function script UnreleasedItem { + // If the server allows equipping unreleased items or if the active character is staff, do nothing. + if (debug || getgmlevel()) + goto L_Return; + message strcharinfo(0), "You have difficulties equipping this item, as if it is not yet fully in this world."; + callfunc "UnequipLater"; + goto L_Return; + +L_Return: + return; +} diff --git a/npc/items/warpTowels.txt b/npc/items/warpTowels.txt new file mode 100755 index 00000000..18fea9f7 --- /dev/null +++ b/npc/items/warpTowels.txt @@ -0,0 +1,152 @@ +function script WarpTowel { + @seconds = TowelLastUsed - (gettimetick(2) - 1200); + if (@seconds > 0) + goto L_DontPanic; + if (isin("botcheck",25,27,51,47)) + goto L_Prison; + if (getmapflag(getmapname(), mf_nosave) || getmapflag(getmapname(), MF_NOTELEPORT) || getmapflag(getmapname(), MF_NOWARP) || isin("009-7",$@fightclub_x1,$@fightclub_y1,$@fightclub_x2,$@fightclub_y2)) + goto L_Forbid; + + if (@warpTowelName$ == "HitchhikersTowel") + goto L_Save; + if(@warpTowelName$ == "WhiteHitchhikersTowel") + goto L_White; + if(@warpTowelName$ == "RedHitchhikersTowel") + goto L_Red; + if(@warpTowelName$ == "GreenHitchhikersTowel") + goto L_Green; + if(@warpTowelName$ == "BlueHitchhikersTowel") + goto L_Blue; + if(@warpTowelName$ == "YellowHitchhikersTowel") + goto L_Yellow; + if(@warpTowelName$ == "PurpleHitchhikersTowel") + goto L_Purple; + if(@warpTowelName$ == "OrangeHitchhikersTowel") + goto L_Orange; + if(@warpTowelName$ == "PinkHitchhikersTowel") + goto L_Pink; + if(@warpTowelName$ == "TealHitchhikersTowel") + goto L_Teal; + if(@warpTowelName$ == "LimeHitchhikersTowel") + goto L_Lime; + goto L_Save; + +L_White: + // Koga + @NextLocationMap$ = "035-2"; + @NextLocationX = 20; + @NextLocationY = 21; + goto L_WarpPlayer; + +L_Red: + // Barbarians + @NextLocationMap$ = "033-1"; + @NextLocationX = 66; + @NextLocationY = 33; + goto L_WarpPlayer; + +L_Green: + // Candor + @NextLocationMap$ = "029-1"; + @NextLocationX = 69; + @NextLocationY = 69; + goto L_WarpPlayer; + +L_Blue: + // Blue Sages + @NextLocationMap$ = "048-2"; + @NextLocationX = 26; + @NextLocationY = 47; + goto L_WarpPlayer; + +L_Yellow: + // Tulimshar Mines + @NextLocationMap$ = "002-2"; + @NextLocationX = 27; + @NextLocationY = 28; + goto L_WarpPlayer; + +L_Purple: + // Dimonds Inn + @NextLocationMap$ = "010-1"; + @NextLocationX = 27; + @NextLocationY = 97; + goto L_WarpPlayer; + +L_Orange: + // Graveyard + @NextLocationMap$ = "027-1"; + @NextLocationX = 70; + @NextLocationY = 100; + goto L_WarpPlayer; + +L_Pink: + // Terranite Cave + @NextLocationMap$ = "012-3"; + @NextLocationX = 448; + @NextLocationY = 66; + goto L_WarpPlayer; + +L_Teal: + // Mana Seed + @NextLocationMap$ = "012-3"; + @NextLocationX = 64; + @NextLocationY = 130; + goto L_WarpPlayer; + +L_Lime: + // Pachua + @NextLocationMap$ = "006-1"; + @NextLocationX = 28; + @NextLocationY = 97; + if(QUEST_MIRIAM_start != 0) goto L_Cheat; + goto L_WarpPlayer; + +L_Cheat: + QUEST_MIRIAM_cheat = 1; + QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start; + QUEST_MIRIAM_start = 0; + goto L_WarpPlayer; + +L_Save: + // Soul Menhir + @NextLocationMap$ = getsavepoint(0); + @NextLocationX = getsavepoint(1); + @NextLocationY = getsavepoint(2); + goto L_WarpPlayer; + +L_WarpPlayer: + TowelLastUsed = gettimetick(2); + warp @NextLocationMap$,@NextLocationX,@NextLocationY; + goto L_BreakChance; + +L_BreakChance: + if (rand(15)) + goto L_Keep; + getitem "HitchhikersTowel", 1; + goto L_End; + +L_Forbid: + message strcharinfo(0), "Towel : This area is protected by a force that doesn't tolerate the power of the Towel."; + goto L_Keep; + +L_Prison: + message strcharinfo(0), "Towel : You must be warped by a GM to leave the botcheck area."; + goto L_Keep; + +L_DontPanic: + callfunc "HumanTime"; + message strcharinfo(0), "Towel : Your towel is still too low on power to jump again. Try again in ##B"+ @time$ + "##b."; + goto L_Keep; + +L_Keep: + getitem @warpTowelName$, 1; + goto L_End; + +L_End: + @NextLocationMap$ = ""; + @NextLocationX = 0; + @NextLocationY = 0; + @warpTowelName$ = ""; + return; +} diff --git a/npc/magic/level0-antiprotect.txt b/npc/magic/level0-antiprotect.txt new file mode 100755 index 00000000..db938eab --- /dev/null +++ b/npc/magic/level0-antiprotect.txt @@ -0,0 +1,22 @@ +- script antiprotect NPC32767,{ + if(call("magic_checks", 1)) end; + callfunc "magic_exp"; + + if (@antiprotect) + goto L_Disable; + + sc_end SC_PHYS_SHIELD; + message strcharinfo(0), "Shield : You are now protected against betsanc until you cast detsanc again or logout."; + @antiprotect = 1; + end; + +L_Disable: + message strcharinfo(0), "Shield : You are no longer protected against betsanc."; + @antiprotect = 0; + end; + +OnInit: + set .invocation$, chr(MAGIC_SYMBOL) + "detsanc"; // used in npcs that refer to this spell + registercmd .invocation$, strnpcinfo(0); + end; +} diff --git a/npc/magic/level0-discharge.txt b/npc/magic/level0-discharge.txt new file mode 100755 index 00000000..986ccf62 --- /dev/null +++ b/npc/magic/level0-discharge.txt @@ -0,0 +1,17 @@ +- script discharge spell NPC32767,{ + if(call("magic_checks")) end; + callfunc "magic_exp"; + + // tell the spells they were discharged + // XXX: maybe we could make it do area damage when you discharge (release your energy all of a sudden) + addtimer 0, "::OnDischarge"; // seeks OnDischarge in ALL npcs + end; + +OnInit: + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "discharge"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 0; + .exp_gain = 0; + end; +} diff --git a/npc/magic/level0-wand.txt b/npc/magic/level0-wand.txt new file mode 100755 index 00000000..5852ef0e --- /dev/null +++ b/npc/magic/level0-wand.txt @@ -0,0 +1,83 @@ +- script spell-wand NPC32767,{ + if(call("magic_checks")) goto L_Failed; + set @wandspell[0], 0; // reset state + callfunc "adjust_spellpower"; + callsub S_Loop; // set up wand + if(@wandspell[0] < 1) goto L_Failed; + + // here we install + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + + callfunc "magic_exp"; + goto L_FreeRecast; + +L_FreeRecast: + if (@wandspell[4] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnDischarge: + if (@wandspell[4] < 1) end; + @wandspell[4] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @wandspell[3], 3, ATTACK_ICON_GENERIC, @wandspell[0], strnpcinfo(0)+"::OnAttack"; + end; + +OnAttack: + if(target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x02 | 0x04 | 0x10 + if (Sp < @wandspell[1]) goto L_LowSp; + Sp = (Sp - @wandspell[1]); + void call("elt_damage", @wandspell[2],@wandspell[2],ELT_NEUTRAL,ELT_NEUTRAL,FX_MAGIC_RED); + @wandspell[4] = @wandspell[4] - 1; + goto L_FreeRecast; + +S_Loop: + if ((getequipid(equip_hand1) == .Wands[.@wand_loop]) || (getequipid(equip_hand2) == .Wands[.@wand_loop])) + goto S_SetWand; + .@wand_loop = (.@wand_loop + 1); + if (.@wand_loop >= getarraysize(.Wands)) + goto S_NoWand; + goto S_Loop; + +S_SetWand: + .@pwr = .WandsPwr[.@wand_loop]; + if (QL_MORGAN == 2) + QL_MORGAN = 3; + setarray @wandspell[0], + .WandsAnim[.@wand_loop], // wand anim/id + (.@pwr * (BaseLevel / 15) + 2), // wand cost + (.@pwr * (@spellpower / 3)), // wand dmg + (((200 - Agi) * 1200) / 200), //delay + (.@pwr + (@spellpower / 10)); // charges + return; + +S_NoWand: + message strcharinfo(0), "Wand : ##3##BYou need a wand Equipped!"; + return; + +L_LowSp: + message strcharinfo(0), "Wand : ##3##BOut of Mana"; + end; + +L_Failed: + //misceffect FX_ELECTRICITY_RED, strcharinfo(0); // XXX: do we show an effect on fail? + //debugmes "cast or attack failed"; + end; + +OnInit: + setarray .Wands[0], 0, 758, 1171; + setarray .WandsPwr[0], 0, 2, 1; + setarray .WandsAnim[0], 0, 35, 33; + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "confringo"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 0; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-aggravate.txt b/npc/magic/level1-aggravate.txt new file mode 100755 index 00000000..137e121f --- /dev/null +++ b/npc/magic/level1-aggravate.txt @@ -0,0 +1,28 @@ +- script spell-aggravate NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 3) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + set @args$, ""; callfunc "adjust_spellpower"; // we reset @args$ because this spell should not have a target + @distance = (2 + (@spellpower / 50)); + Sp = Sp - 3; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + callfunc "magic_exp"; + foreach 2, getmapname(), (POS_X - @distance), (POS_Y - @distance), (POS_X + @distance), (POS_Y + @distance), strnpcinfo(0) + "::OnMob"; + end; + +OnMob: + if (target(BL_ID, @target_id, 0x20) != 0x20) end; // line of sight + aggravate @target_id; + misceffect SFX_DEFAULT, @target_id; + end; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "itenplz"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 0; + end; +} diff --git a/npc/magic/level1-detect-magic.txt b/npc/magic/level1-detect-magic.txt new file mode 100755 index 00000000..693aeb7e --- /dev/null +++ b/npc/magic/level1-detect-magic.txt @@ -0,0 +1,29 @@ +- script detect-magic NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 3) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 6000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 3; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + .@range = (@spellpower/50)+1; + foreach 1, getmapname(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range, + strnpcinfo(0) + "::OnNearbyNpc"; + callfunc "magic_exp"; + end; + +OnNearbyNpc: + .@e$ = strnpcinfo(2,@target_id); + if(.@e$ == "#_M" || .@e$ == "#MAGIC" || get(.IS_MAGIC, @target_id)) + misceffect FX_MAGIC_DEFAULT, @target_id; + end; + +OnInit: + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "miteyo"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 0; + end; +} diff --git a/npc/magic/level1-experience.txt b/npc/magic/level1-experience.txt new file mode 100755 index 00000000..72d02610 --- /dev/null +++ b/npc/magic/level1-experience.txt @@ -0,0 +1,45 @@ +- script spell-experience NPC32767,{ + //debugmes MAGIC_EXPERIENCE; + //debugmes (MAGIC_EXPERIENCE >> 0) & 0xFFFF; // magic exp + //debugmes (MAGIC_EXPERIENCE >> 16) & 0xFF; // last spell index + //debugmes (MAGIC_EXPERIENCE >> 24) & 0xFF; // heal exp + + if(call("magic_checks")) end; + if (Sp < 1) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + @level = getskilllv(.school); + if (@level < .level) end; + callfunc "adjust_spellpower"; + Sp = Sp - 1; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + callfunc "magic_exp"; + @ratio = ((@last_exp*10) - rand(.MAX_MAGIC_EXP[@level]/30))/.MAX_MAGIC_EXP[@level]; + + @mes$ = "You feel completely overwhelmed by your magic."; + if(@ratio == 1) set @mes$, "You feel quite overwhelmed by your magic, but are beginning to see patterns."; + if(@ratio == 2) set @mes$, "You feel that you have only the bare minimum of control over your magic."; + if(@ratio == 3) set @mes$, "Trying to control your magic is still rather troublesome."; + if(@ratio == 4) set @mes$, "You feel you still have a few difficulties in controlling your magic."; + if(@ratio == 5) set @mes$, "You feel somewhat in control of your magic."; + if(@ratio == 6) set @mes$, "You feel mostly in control of your magic."; + if(@ratio == 7) set @mes$, "You feel quite in control of your magic."; + if(@ratio == 8) set @mes$, "You feel that you have very good control of your magic."; + if(@ratio == 9) set @mes$, "You feel in almost perfect control of your magic."; + if(@ratio >= 10) set @mes$, "You feel in perfect control of your magic" + if_then_else(@level >= MAX_MAGIC_LEVEL, ".", ", and seem on the verge of something more... perhaps you should see the Mana Seed to ask for more magic?"); + if(@ratio >= 20) set @mes$, "You have perfect control of what you understand now, but there is now a distinct sensation of something more, something indescribable. If only the Mana Seed would give more magic to you..."; + if(@ratio >= 45) set @mes$, "Magic flows naturally from you, readily and with ease. Your understanding of what you can currently control at present is flawless, far beyond your requirements to cast magic at this level."; + if(@ratio >= 45 && @level < MAX_MAGIC_LEVEL) set @mes$, @mes$ + " Surely the Mana Seed will more than readily offer more magic for such a proficient user."; + if(@level >= 5) set @mes$, "You are as proficient at magic as you can possibly be."; // this is the maximum magic level + message strcharinfo(0), "Magic : ##3##B"+@mes$; + end; + +OnInit: + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "abizit"; // used in npcs that refer to this spell + .level = 1; + .exp_gain = 0; + void call("magic_register"); + setarray .MAX_MAGIC_EXP[0], 0, 0, 100, 1200, 8000, 40000, 65535; + end; +} diff --git a/npc/magic/level1-flare-dart.txt b/npc/magic/level1-flare-dart.txt new file mode 100755 index 00000000..049b1768 --- /dev/null +++ b/npc/magic/level1-flare-dart.txt @@ -0,0 +1,51 @@ +- script flare-dart NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 10) end; + @level = getskilllv(.school); + if (getskilllv(SKILL_MAGIC) < .level) end; + if (@level <= 2 && countitem("SulphurPowder") >= 1) delitem "SulphurPowder", 1; + elif (@level <= 2) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 10; + misceffect FX_MAGIC_BLACK, strcharinfo(0); + setarray @flarspell[0], + sqrt(@spellpower) * 5, //dmg + (BaseLevel/3) + 5, // dmg bonus + (@spellpower/50) + 3, // charges + (((200 - Agi) * 1200) / 200); // delay + callfunc "magic_exp"; + goto L_FreeRecast; + +OnAttack: + if (target(BL_ID, @target_id, 50) != 50) goto L_FreeRecast; // 0x20 | 0x02 | 0x10 + misceffect FX_MAGIC_BLACK, strcharinfo(0); + void call("elt_damage", @flarspell[0], @flarspell[1], ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK); + @flarspell[2] = @flarspell[2] - 1; + goto L_FreeRecast; + +L_FreeRecast: + if (@flarspell[2] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnDischarge: + if (@flarspell[2] < 1) end; + @flarspell[2] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @flarspell[3], 4, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack"; + end; + +OnInit: + .school = SKILL_MAGIC_WAR; + set .invocation$, chr(MAGIC_SYMBOL) + "flar"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-grow-alizarin.txt b/npc/magic/level1-grow-alizarin.txt new file mode 100755 index 00000000..3e6810b9 --- /dev/null +++ b/npc/magic/level1-grow-alizarin.txt @@ -0,0 +1,37 @@ +- script grow-alizarin NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 4) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("AlizarinHerb") < 1 || countitem("Root") < 1) end; + delitem "AlizarinHerb", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 2000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 4; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + setarray @summon[0], 0, (getskilllv(.school)/2)+1; + callfunc "magic_exp"; + addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; + end; + +OnSummon: + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + callsub S_SummonAll; + end; + +S_SummonAll: + summon getmapname(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, 1032, 1, (@spellpower*50)+10000; + @summon[0] = @summon[0] + 1; + if (@summon[0] < @summon[1]) goto S_SummonAll; + return; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "modriphoo"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-grow-cobalt.txt b/npc/magic/level1-grow-cobalt.txt new file mode 100755 index 00000000..62610053 --- /dev/null +++ b/npc/magic/level1-grow-cobalt.txt @@ -0,0 +1,37 @@ +- script grow-cobalt NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 4) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("CobaltHerb") < 1 || countitem("Root") < 1) end; + delitem "CobaltHerb", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 2000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 4; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + setarray @summon[0], 0, (getskilllv(.school)/2)+1; + callfunc "magic_exp"; + addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; + end; + +OnSummon: + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + callsub S_SummonAll; + end; + +S_SummonAll: + summon getmapname(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, 1030, 1, (@spellpower*50)+10000; + @summon[0] = @summon[0] + 1; + if (@summon[0] < @summon[1]) goto S_SummonAll; + return; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "modrisump"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-grow-gamboge.txt b/npc/magic/level1-grow-gamboge.txt new file mode 100755 index 00000000..7557ddc8 --- /dev/null +++ b/npc/magic/level1-grow-gamboge.txt @@ -0,0 +1,37 @@ +- script grow-gamboge NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 4) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("GambogeHerb") < 1 || countitem("Root") < 1) end; + delitem "GambogeHerb", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 2000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 4; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + setarray @summon[0], 0, (getskilllv(.school)/2)+1; + callfunc "magic_exp"; + addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; + end; + +OnSummon: + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + callsub S_SummonAll; + end; + +S_SummonAll: + summon getmapname(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, 1031, 1, (@spellpower*50)+10000; + @summon[0] = @summon[0] + 1; + if (@summon[0] < @summon[1]) goto S_SummonAll; + return; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "modriyikam"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-grow-mauve.txt b/npc/magic/level1-grow-mauve.txt new file mode 100755 index 00000000..3a12be2d --- /dev/null +++ b/npc/magic/level1-grow-mauve.txt @@ -0,0 +1,37 @@ +- script grow-mauve NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 4) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("MauveHerb") < 1 || countitem("Root") < 1) end; + delitem "MauveHerb", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 2000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 4; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + setarray @summon[0], 0, (getskilllv(.school)/2)+1; + callfunc "magic_exp"; + addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; + end; + +OnSummon: + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + callsub S_SummonAll; + end; + +S_SummonAll: + summon getmapname(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, 1029, 1, (@spellpower*50)+10000; + @summon[0] = @summon[0] + 1; + if (@summon[0] < @summon[1]) goto S_SummonAll; + return; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "modrilax"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-lesser-heal.txt b/npc/magic/level1-lesser-heal.txt new file mode 100755 index 00000000..27311157 --- /dev/null +++ b/npc/magic/level1-lesser-heal.txt @@ -0,0 +1,50 @@ +- script lesser-heal NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 6) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self + if (@args$ == "Mouboo" || @args$ == "mouboo") set @target_id, getnpcid("Mouboo"); + .@range = (((MATK1 + getskilllv(SKILL_MAGIC) + getskilllv(.school) + 10) / 100) + 2); + if (distance(BL_ID, @target_id) >= .@range) end; + if (PVP_CHANNEL != get(PVP_CHANNEL, @target_id) && get(PVP_CHANNEL, @target_id) != 0) end; + if (countitem("Lifestone") < 1) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + delitem "Lifestone", 1; + callfunc "adjust_spellpower"; + Sp = Sp - 6; + misceffect FX_MAGIC_WHITE, strcharinfo(0); + callfunc "magic_exp"; + if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo; + if (@target_id != BL_ID) goto L_NotMe; + goto L_Continue; + +L_NotMe: + misceffect FX_MAGIC_WHITE, @target_id; + void call("gain_heal_xp", min(200, (get(MaxHp, @target_id) - get(Hp, @target_id))), 1, 2, 2); + goto L_Continue; + +L_Continue: + if (getskilllv(SKILL_MAGIC_DARK) >= 1) sc_start SC_HALT_REGENERATE, 2000, 0; + if (get(Hp, @target_id) < 1) end; + addtimer 0, strnpcinfo(0) + "::OnSlowHeal", @target_id; + end; + +OnSlowHeal: + heal 200, 0, 1; + end; + +L_Mouboo: + mes "Mouboo : ##3##BYour spell seems to have no effect on the mouboo."; + close; + +OnInit: + .school = SKILL_MAGIC_LIFE; + set .invocation$, chr(MAGIC_SYMBOL) + "lum"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-magic-blade.txt b/npc/magic/level1-magic-blade.txt new file mode 100755 index 00000000..ab73cdc2 --- /dev/null +++ b/npc/magic/level1-magic-blade.txt @@ -0,0 +1,54 @@ +- script magic-blade NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 9) end; + .@level = getskilllv(.school); + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 2 && countitem("SharpKnife") >= 1) set .@component$, "SharpKnife"; + elif (.@level <= 2 && countitem("Knife") >= 1) set .@component$, "Knife"; + elif (.@level <= 2) end; + if (.@component$ != "") delitem .@component$, 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 9; + misceffect FX_MAGIC_BLACK, strcharinfo(0); + setarray @chizaspell[0], + if_then_else(.@component$ == "Knife", 40, 60), // dmg + Str, // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str + (@spellpower/15) + 10, // charges + (((200 - Agi) * 1200) / 200), // delay + @spellpower; + + callfunc "magic_exp"; + goto L_FreeRecast; + +OnDischarge: + if (@chizaspell[2] < 1) end; + @chizaspell[2] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnAttack: + if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 + void call("melee_damage", @chizaspell[4], @target_id, (@chizaspell[0] + rand(@chizaspell[1] + 5))); + @chizaspell[2] = @chizaspell[2] - 1; + goto L_FreeRecast; + +L_FreeRecast: + if (@chizaspell[2] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnSetRecast: + overrideattack @chizaspell[3], 1, ATTACK_ICON_GENERIC, 30, strnpcinfo(0)+"::OnAttack"; + end; + +OnInit: + .school = SKILL_MAGIC_WAR; + set .invocation$, chr(MAGIC_SYMBOL) + "chiza"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-make-sulphur.txt b/npc/magic/level1-make-sulphur.txt new file mode 100755 index 00000000..f26a06b9 --- /dev/null +++ b/npc/magic/level1-make-sulphur.txt @@ -0,0 +1,24 @@ +- script make-sulphur NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 4) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("PileOfAsh") >= 1) delitem "PileOfAsh", 1; else end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 4000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 4; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], (@spellpower/100)+1+(rand(max(1,(800-@spellpower)))/180), 50; + setarray @create_items$[0], "SulphurPowder", "PileOfAsh"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "gole"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-sense-spouse.txt b/npc/magic/level1-sense-spouse.txt new file mode 100755 index 00000000..0ef1848d --- /dev/null +++ b/npc/magic/level1-sense-spouse.txt @@ -0,0 +1,24 @@ +- script sense-spouse NPC32767,{ + .@m = getpartnerid(); + if (.@m < 1) + goto L_NotMarried; + if (isloggedin(.@m) < 1) + goto L_NotOnline; + if (sc_check(SC_HIDE, .@m) || getpvpflag(1, .@m) || get(INVISIBLE, .@m)) + goto L_NotOnline; + message strcharinfo(0), "Spouse : Your spouse is... somewhere."; + end; + +L_NotOnline: + message strcharinfo(0), "Spouse : Your spouse is not online, or maybe just hiding from you."; + end; + +L_NotMarried: + message strcharinfo(0), "Spouse : You are not married, or no longer married (sorry for being the one telling you the bad news)."; + end; + +OnInit: + set .invocation$, chr(MAGIC_SYMBOL) + "inzuwilt"; // used in npcs that refer to this spell + registercmd .invocation$, strnpcinfo(0); + end; +} diff --git a/npc/magic/level1-summon-maggots.txt b/npc/magic/level1-summon-maggots.txt new file mode 100755 index 00000000..22b6b2f6 --- /dev/null +++ b/npc/magic/level1-summon-maggots.txt @@ -0,0 +1,55 @@ +- script summon-maggots NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 21) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("MaggotSlime") < 1 || countitem("Root") < 1) end; + delitem "MaggotSlime", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 21; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = ((sqrt(@spellpower)+(@spellpower/15))/5)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = (@spellpower*50)+10000, .@puppet; + addnpctimer 5000-(@spellpower*5), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1002, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "kalmurk"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level1-transmute-wood.txt b/npc/magic/level1-transmute-wood.txt new file mode 100755 index 00000000..8645b208 --- /dev/null +++ b/npc/magic/level1-transmute-wood.txt @@ -0,0 +1,36 @@ +- script spell-transmute-wood NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 5) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("RawLog") >= 1) delitem "RawLog", 1; else end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 4000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 5; + misceffect FX_MAGIC_RED, strcharinfo(0); + if (@args$ == "boo") goto L_Mouboo; + elif (@args$ == "lurk") goto L_Skytlurk; + else message strcharinfo(0), "Magic : ##3##BYou do not know how to transmute wood into this kind of animal."; // FIXME: write a better sentence + end; + +L_Mouboo: + setarray @create_params[0], 1, 40; + setarray @create_items$[0], "MoubooFigurine", "WarpedLog"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +L_Skytlurk: + if (rand(2) == 1) getitem "Iten", 1; + else getitem "WarpedLog", 1; + message strcharinfo(0), "Magic : ##3##BYou have no idea what a Skrytlurk looks like."; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "parum"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-arrow-hail.txt b/npc/magic/level2-arrow-hail.txt new file mode 100755 index 00000000..3d7525b1 --- /dev/null +++ b/npc/magic/level2-arrow-hail.txt @@ -0,0 +1,115 @@ +- script arrow-hail NPC32767,{ + // we can not start here because for the puppets this is OnClick + end; + +OnCast: + if(call("magic_checks")) end; + if (getskilllv(.school) < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (Sp < 25) end; + explode .@map_ext[0], getmapname(), "-"; + if (.@map_ext[1] != 1) end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside" + if (getmapflag(getmapname(), MF_TOWN)) end; + if (countitem("Arrow") >= 20 && countitem("SulphurPowder") >= 1) delitem "Arrow", 20; + elif (countitem("IronArrow") >= 20 && countitem("SulphurPowder") >= 1) delitem "IronArrow", 20; + else end; + delitem "SulphurPowder", 1; + Sp = Sp - 25; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + + setarray @away[0], POS_X, POS_Y, getdir(), (.range + 1), 0; + callsub S_AwayFrom; + + @nearby = 0; + foreach 1, getmapname(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14, + strnpcinfo(0) + "::OnNearbyNpc"; + if (@nearby) goto L_Absorb; + + callfunc "adjust_spellpower"; + set @new_npc_name$, "#" + strnpcinfo(0) + "#" + getcharid(3); // make a unique puppet name for every player + callfunc "magic_exp"; + misceffect FX_MAGIC_BLACK, strcharinfo(0); + set @spell_npc, puppet(getmapname(), POS_X, POS_Y, @new_npc_name$, 127); // clone npc => get puppet id + if (@spell_npc < 1) end; + set .max_hit, (@spellpower / 8), @spell_npc; // set .max_hit in the puppet + set .caster, getcharid(3), @spell_npc; // tell the puppet who controls it + .damage = 125, @spell_npc; + .damage_bonus = (@spellpower / 5), @spell_npc; + set .area_x, @away[0], @spell_npc; set .area_y, @away[1], @spell_npc; + donpcevent @new_npc_name$+"::OnLaunch"; // start the puppet timer and strike + initnpctimer @new_npc_name$; // start the destroy timer + end; + +S_AwayFrom: + if(@away[2] == 6 && !(iscollision(getmapname(), (@away[0] + 1), @away[1]))) // right + @away[0] = @away[0] + 1; + if(@away[2] == 4 && !(iscollision(getmapname(), @away[0], (@away[1] - 1)))) // up + @away[1] = @away[1] - 1; + if(@away[2] == 2 && !(iscollision(getmapname(), (@away[0] - 1), @away[1]))) // left + @away[0] = @away[0] - 1; + if(@away[2] == 0 && !(iscollision(getmapname(), @away[0], (@away[1] + 1)))) // down + @away[1] = @away[1] + 1; + @away[4] = @away[4] + 1; + if(@away[4] < @away[3]) goto S_AwayFrom; + return; + +L_Absorb: + message strcharinfo(0), "##3Arrow Hail : ##BA nearby arrow hail absorbs your magic!"; + end; + +OnNearbyNpc: + explode .@nearby$[0], strnpcinfo(0,@target_id), "#"; + if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail") + @nearby = @nearby + 1; + end; + +OnLaunch: + if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing + if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map + .hit = .hit + 1; + if(.hit > .max_hit) destroy; + .launch = 0; + callsub S_Launch; + addnpctimer 250 + rand(50) + rand(50), strnpcinfo(0)+"::OnLaunch"; // loop until max + end; + +S_Launch: + npcareawarp .area_x - 6, .area_y - 6, .area_x + 6, .area_y + 6, 0, strnpcinfo(0); + misceffect FX_ARROW_HAIL; + .done = 0; + foreach 2, strnpcinfo(3), getnpcx(), getnpcy(), getnpcx(), getnpcy(), strnpcinfo(0) + "::OnHit", .caster; + if (get(PVP_CHANNEL, .caster) || getmapflag(getmap(.caster), MF_PVP)) + foreach 0, strnpcinfo(3), getnpcx(), getnpcy(), getnpcx(), getnpcy(), strnpcinfo(0) + "::OnHit", .caster; + if(!.done && get(POS_X, .caster) == getnpcx() && get(POS_Y, .caster) == getnpcy()) + set Hp, get(Hp, .caster) - (.damage + rand(.damage_bonus) + rand(.damage_bonus)), .caster; // injure caster + .launch = .launch + 1; + if(.launch < 3) goto S_Launch; + return; + +OnTimer30000: + debugmes "frillyar timeout! [this shouldn't happen]"; + destroy; + +OnHit: + if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing + if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map + + if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end; + if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc + .@damage = .damage + rand(.damage_bonus) + rand(.damage_bonus); + if(.caster != @target_id) + .@damage = (.@damage * (100 - get(MDEF1, @target_id))) / 100; + injure .caster, @target_id, .@damage; + .done = 1; + end; + +OnInit: + .school = SKILL_MAGIC_WAR; + .range = 7; + set .invocation$, chr(MAGIC_SYMBOL) + "frillyar"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-barrier.txt b/npc/magic/level2-barrier.txt new file mode 100755 index 00000000..aa92344a --- /dev/null +++ b/npc/magic/level2-barrier.txt @@ -0,0 +1,47 @@ +- script magic barrier NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 15) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 3 && countitem("SmallMushroom") >= 1) delitem "SmallMushroom", 1; + elif (.@level <= 3) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self + + if (getequipid(equip_head, strcharinfo(0, @target_id)) == 888) end; + + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 15; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + callfunc "magic_exp"; + + if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; + if (BL_ID == @target_id) set @args$, strcharinfo(0); + if (BL_ID != @target_id) misceffect FX_MAGIC_DEFAULT, @args$; + .@time = (@spellpower*200)+2000; + @asorm_time = .@time, @target_id; + sc_start SC_MBARRIER, .@time, max(30,(@spellpower/8))+20, @target_id; + message @args$, "Barrier : You are surrounded by a magical barrier."; + @asorm_future = gettimetick(0) + @asorm_time - 100, @target_id; + addtimer @asorm_time - 100, strnpcinfo(0)+"::OnEnd", @target_id; + end; + +OnEnd: + if (gettimetick(0) - @asorm_future < 0) end; + if (sc_check(SC_MBARRIER) != 1) end; + message strcharinfo(0), "Barrier : Your magical barrier dissipates."; + misceffect FX_MAGIC_DEFAULT, strcharinfo(0); + end; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "asorm"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 3; + end; +} diff --git a/npc/magic/level2-detect-players.txt b/npc/magic/level2-detect-players.txt new file mode 100755 index 00000000..9f05d567 --- /dev/null +++ b/npc/magic/level2-detect-players.txt @@ -0,0 +1,33 @@ +- script detect-players NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 7) end; + if (getskilllv(.school) < .level) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 300, "Magic Timer::OnClear"; + callfunc "adjust_spellpower"; + Sp = Sp - 7; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + callfunc "magic_exp"; + @inwilt$ = ""; + .@d = @spellpower/2; + foreach 0, getmapname(), POS_X - .@d, POS_Y - .@d, POS_X + .@d, POS_Y + .@d, strnpcinfo(0)+"::OnPC"; + message strcharinfo(0), if_then_else(@inwilt$=="", "You sense no-one else nearby.", "You sense the following: "+@inwilt$); + end; + +OnPC: + if (@target_id == BL_ID) end; // do not count the caster + if (sc_check(SC_HIDE, @target_id)) end; // do not count players with anwiltyp + if (getpvpflag(1, @target_id)) end; // do not count hidden GMs + if (get(INVISIBLE, @target_id) == 1) end; // do not count invisible GMs + if (@inwilt$ != "") set @inwilt$, @inwilt$ + ", "; + @inwilt$ = @inwilt$ + strcharinfo(0, @target_id) + if_then_else(@spellpower > 99, "("+get(BaseLevel, @target_id)+")", ""); + end; + +OnInit: + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "inwilt"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 0; + end; +} diff --git a/npc/magic/level2-enchant-lifestone.txt b/npc/magic/level2-enchant-lifestone.txt new file mode 100755 index 00000000..06fba65d --- /dev/null +++ b/npc/magic/level2-enchant-lifestone.txt @@ -0,0 +1,35 @@ +- script enchant-lifestone NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 15) end; + if (getskilllv(.school) < .level) end; + if (countitem("BugLeg") >= 1) delitem "BugLeg", 1; + elif (countitem("MaggotSlime") >= 1) delitem "MaggotSlime", 1; + elif (countitem("MauveHerb") >= 1 && countitem("AlizarinHerb") >= 1 && countitem("CobaltHerb") >= 1 && countitem("GambogeHerb") >= 1) goto L_Herbs; + else end; + goto L_Proceed; + +L_Herbs: + delitem "MauveHerb", 1; + delitem "AlizarinHerb", 1; + delitem "CobaltHerb", 1; + delitem "GambogeHerb", 1; + goto L_Proceed; + +L_Proceed: + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 4000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 15; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + getitem "Lifestone", 1; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC; + set .invocation$, chr(MAGIC_SYMBOL) + "manpahil"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-flying-backpack.txt b/npc/magic/level2-flying-backpack.txt new file mode 100755 index 00000000..7fbf97d6 --- /dev/null +++ b/npc/magic/level2-flying-backpack.txt @@ -0,0 +1,42 @@ +- script flying-backpack NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 12) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 3 && countitem("SilkCocoon") >= 1) delitem "SilkCocoon", 1; + elif (.@level <= 3) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 12; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + callfunc "magic_exp"; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self + if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; + if (BL_ID != @target_id) misceffect FX_MAGIC_GENERIC, @args$; + if (BL_ID == @target_id) set @args$, strcharinfo(0); + @plugh_time = (@spellpower*500)+5000, @target_id; + sc_start SC_FLYING_BACKPACK, @plugh_time, 0, @target_id; + message @args$, "Backpack : Your backpack is lifted by a mystical force; you no longer feel it pressing on your back."; + @plugh_future = gettimetick(0) + @plugh_time - 100, @target_id; + addtimer @plugh_time - 100, strnpcinfo(0)+"::OnEnd", @target_id; + end; + +OnEnd: + if (gettimetick(0) - @plugh_future < 0) end; + if (sc_check(SC_FLYING_BACKPACK) != 1) end; + message strcharinfo(0), "Backpack : Your backpack is no longer levitating."; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + end; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "plugh"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-happy-curse.txt b/npc/magic/level2-happy-curse.txt new file mode 100755 index 00000000..d6287bb5 --- /dev/null +++ b/npc/magic/level2-happy-curse.txt @@ -0,0 +1,42 @@ +- script happy-curse NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 13) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 3 && countitem("GingerBreadMan") >= 1) delitem "GingerBreadMan", 1; + elif (.@level <= 3) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self + + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 13; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + callfunc "magic_exp"; + + if (distance(BL_ID, @target_id) >= (@spellpower/100)+1) set @target_id, BL_ID; + if (BL_ID == @target_id) set @args$, strcharinfo(0); + @joyplim_count = 1, @target_id; + @joyplim_emote = if_then_else(getskilllv(SKILL_MAGIC_DARK) > 1, EMOTE_EVIL, EMOTE_HAPPY), @target_id; + @joyplim_total = (@spellpower/10), @target_id; + emotion @joyplim_emote, strcharinfo(0, @target_id); + addtimer 500, strnpcinfo(0)+"::OnEmote", @target_id; + end; + +OnEmote: + emotion @joyplim_emote, "self"; + @joyplim_count = @joyplim_count + 1; + if (@joyplim_count < @joyplim_total) addtimer 500, strnpcinfo(0)+"::OnEmote"; + end; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "joyplim"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-hide.txt b/npc/magic/level2-hide.txt new file mode 100755 index 00000000..2a7e8dab --- /dev/null +++ b/npc/magic/level2-hide.txt @@ -0,0 +1,46 @@ +- script spell-hide NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 11) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 3 && countitem("CottonCloth") >= 1) delitem "CottonCloth", 1; + elif (.@level <= 3) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self + + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 11; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + callfunc "magic_exp"; + + if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; + if (BL_ID == @target_id) set @args$, strcharinfo(0); + if (BL_ID != @target_id) misceffect FX_MAGIC_DEFAULT, @args$; + .@time = (@spellpower*2500)+5000; + @anwiltyp_time = .@time, @target_id; + sc_start SC_HIDE, .@time, 0, @target_id; + message @args$, "Magic : You are hidden!"; + if (BL_ID != @target_id) message strcharinfo(0), "Magic : You hid someone!"; + @anwiltyp_future = gettimetick(0) + @anwiltyp_time - 100, @target_id; + addtimer @anwiltyp_time, strnpcinfo(0)+"::OnEnd", @target_id; + end; + +OnEnd: + if (gettimetick(0) - @anwiltyp_future < 0) end; + if (sc_check(SC_HIDE) != 1) end; + message strcharinfo(0), "Magic : You are no longer hidden."; + misceffect FX_MAGIC_GENERIC, strcharinfo(0); + end; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "anwiltyp"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-lay-on-hands.txt b/npc/magic/level2-lay-on-hands.txt new file mode 100755 index 00000000..529f9356 --- /dev/null +++ b/npc/magic/level2-lay-on-hands.txt @@ -0,0 +1,58 @@ +- script lay-on-hands NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 10) end; + if (getskilllv(.school) < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) || BL_ID == @target_id) end; + if (Hp <= get(MaxHp, @target_id) / 20) end; // hp needs to be > 1/20 * target hp + callfunc "adjust_spellpower"; + if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end; + if (sc_check(SC_HALT_REGENERATE,@target_id)) end; + if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat + @needed = get(MaxHp, @target_id) - get(Hp, @target_id); + goto L_Pay; + +L_Pay: + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // XXX should this be 0 ? + Sp = Sp - 10; + misceffect FX_MAGIC_WHITE, strcharinfo(0); // on caster + misceffect FX_MAGIC_WHITE, @args$; // on target + + set .@fraction, max(80, 200 - (Vit + (@spellpower/10))); // pay at least 40% + .@payment = (@needed * .@fraction) / 200; + .@available = Hp - (MaxHp / 20); + set @heal_value, if_then_else(.@payment < .@available, @needed+1-1, (.@available * 200) / .@fraction); // FIXME / XXX why the f do I need to do +1-1 ? + if (.@payment > .@available) set .@payment, .@available; + + + @mexp = min(.exp_gain, .@payment/100); + void call("gain_heal_xp", @heal_value, 1, 1, 3); + callfunc "magic_exp"; + + set .@dark, getskilllv(SKILL_MAGIC_DARK) >= 2; // true if dark magic user + .@bad = (MaxHp/20)*(0-1); + if (.@dark) heal .@bad, 0; + sc_start SC_HALT_REGENERATE, if_then_else(.@dark, 5000, 10000), 0; + + .@thp = get(Hp, @target_id); + if (.@thp < 1) end; + Hp = .@thp + @heal_value, @target_id; + end; + +L_Mouboo: + @spell = 1; + callfunc "QuestMoubooHeal"; + @needed = 1000; + goto L_Pay; + +OnInit: + .school = SKILL_MAGIC_LIFE; + set .invocation$, chr(MAGIC_SYMBOL) + "inma"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + set .exp_gain, 1; // this is MAX possible exp + end; +} diff --git a/npc/magic/level2-lightning-strike.txt b/npc/magic/level2-lightning-strike.txt new file mode 100755 index 00000000..44969452 --- /dev/null +++ b/npc/magic/level2-lightning-strike.txt @@ -0,0 +1,86 @@ +- script lightning-strike NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 20) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (.@level <= 3 && countitem("IronPowder") >= 1) delitem "IronPowder", 1; + elif (.@level <= 3) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 20; + misceffect FX_MAGIC_BLACK, strcharinfo(0); + setarray @ingravspell[0], + @spellpower, + Luk, + ((@spellpower/90)+1), // charges + (((200 - Agi) * 3000) / 200), // delay + 0, // in_rain + 0; // target id (tmp) + + callfunc "magic_exp"; + goto L_FreeRecast; + +OnAttack: + if (target(BL_ID, @target_id, 0x36) != 0x36) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 | 0x20 + + .@p = get(.max_radius, "rain") + 1; + set @ingravspell[5], @target_id; // store it because foreach overwrites it + foreach 1, getmapname(), POS_X-.@p, POS_Y-.@p, POS_X+.@p, POS_Y+.@p, strnpcinfo(0)+"::OnNpc"; + set @target_id, @ingravspell[5]; // now restore it + + @ingravspell[2] = @ingravspell[2] - 1; + if (@ingravspell[4] & 1) goto L_InRain; + void call("elt_damage", @ingravspell[0], (@ingravspell[0]/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3)); + goto L_FreeRecast; + +L_FreeRecast: + if (@ingravspell[2] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnDischarge: + if (@ingravspell[2] < 1) end; + @ingravspell[2] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @ingravspell[3], 8, ATTACK_ICON_GENERIC, 31, strnpcinfo(0)+"::OnAttack"; + end; + +OnNpc: + .@name$ = strnpcinfo(0,@target_id); + explode .@nearby$[0], .@name$, "#"; + if (.@nearby$[0] != "rain" && .@nearby$[1] != "rain") end; + setarray .@l[0], getnpcx(.@name$), getnpcy(.@name$), get(.radius, @target_id); // kaflosh x, y, radius + setarray @ingravspell[6], .@l[0]-.@l[2], .@l[1]-.@l[2], .@l[0]+.@l[2], .@l[1]+.@l[2]; // kaflosh x1, y1, x2, y2 <= this is "area" + if (POS_X >= @ingravspell[6] && POS_Y >= @ingravspell[7] && POS_X <= @ingravspell[8] && POS_Y <= @ingravspell[9]) + @ingravspell[4] = @ingravspell[4] | 1; + end; + +L_InRain: + @ingravspell[10] = 0; + foreach 0, getmapname(), @ingravspell[6], @ingravspell[7], @ingravspell[8], @ingravspell[9], strnpcinfo(0)+"::OnEntityInRain"; + if (@ingravspell[10] >= 1 && (@ingravspell[1] + rand(200)) >= 150) goto L_FreeRecast; + misceffect FX_LIGHTNING1 + rand(3), strcharinfo(0); + heal 0 - @ingravspell[0], 0; + goto L_FreeRecast; + +OnEntityInRain: + if (target(BL_ID, @target_id, 16) != 16) end; // 0x10 + if (@ingravspell[1] + rand(200) <= 175) end; + @ingravspell[10] = @ingravspell[10] + 1; + void call("elt_damage", @ingravspell[0]/6, (((@ingravspell[0]/2)+1)/3)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3)); + end; + +OnInit: + .school = SKILL_MAGIC_WAR; + set .invocation$, chr(MAGIC_SYMBOL) + "ingrav"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-magic-knuckles.txt b/npc/magic/level2-magic-knuckles.txt new file mode 100755 index 00000000..87f0ae90 --- /dev/null +++ b/npc/magic/level2-magic-knuckles.txt @@ -0,0 +1,51 @@ +- script magic-knuckles NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 20) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (.@level <= 3 && countitem("Beer") >= 1) delitem "Beer", 1; + elif (.@level <= 3) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 20; + misceffect FX_MAGIC_BLACK, strcharinfo(0); + setarray @upmarmuspell[0], + @spellpower, + ((@spellpower/10) + 10), // charges + (((200 - Agi) * 1300) / 200), // delay + Str; // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str + callfunc "magic_exp"; + goto L_FreeRecast; + +OnAttack: + if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 + void call("melee_damage", @upmarmuspell[0], @target_id, (30 + rand((@upmarmuspell[3]*2) + 5))); + @upmarmuspell[1] = @upmarmuspell[1] - 1; + goto L_FreeRecast; + +L_FreeRecast: + if (@upmarmuspell[1] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnDischarge: + if (@upmarmuspell[1] < 1) end; + @upmarmuspell[1] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @upmarmuspell[2], 1, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack"; + end; + +OnInit: + .school = SKILL_MAGIC_WAR; + set .invocation$, chr(MAGIC_SYMBOL) + "upmarmu"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-make-arrows.txt b/npc/magic/level2-make-arrows.txt new file mode 100755 index 00000000..699af4d7 --- /dev/null +++ b/npc/magic/level2-make-arrows.txt @@ -0,0 +1,26 @@ +- script make-arrows NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 8) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("RawLog") < 1) end; + delitem "RawLog", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 8; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], (@spellpower/40)+1+(rand(max(1,(800-@spellpower)))/80), 500; + setarray @create_items$[0], "Arrow", "WarpedLog"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "kularzufrill"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-make-iron-powder.txt b/npc/magic/level2-make-iron-powder.txt new file mode 100755 index 00000000..8e781135 --- /dev/null +++ b/npc/magic/level2-make-iron-powder.txt @@ -0,0 +1,26 @@ +- script make-iron-powder NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 8) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("IronOre") < 1) end; + delitem "IronOre", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 8; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], (@spellpower/140)+1+(rand(max(1,(900-@spellpower)))/220), 700; + setarray @create_items$[0], "IronPowder", "IronOre"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "zukminbirf"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 3; + end; +} diff --git a/npc/magic/level2-make-shirt.txt b/npc/magic/level2-make-shirt.txt new file mode 100755 index 00000000..e379c71d --- /dev/null +++ b/npc/magic/level2-make-shirt.txt @@ -0,0 +1,24 @@ +- script make-shirt NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 25) end; + if (getskilllv(.school) < .level) end; + if (countitem("CottonCloth") >= 5) delitem "CottonCloth", 5; else end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 25; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], 1, 425; + setarray @create_items$[0], "CottonShirt", "CottonCloth"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "patmuploo"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-make-short-tanktop.txt b/npc/magic/level2-make-short-tanktop.txt new file mode 100755 index 00000000..a100fa97 --- /dev/null +++ b/npc/magic/level2-make-short-tanktop.txt @@ -0,0 +1,24 @@ +- script make-short-tanktop NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 25) end; + if (getskilllv(.school) < .level) end; + if (countitem("CottonCloth") >= 3) delitem "CottonCloth", 3; else end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 25; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], 1, 250; + setarray @create_items$[0], "ShortTankTop", "CottonCloth"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "patviloree"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-make-tanktop.txt b/npc/magic/level2-make-tanktop.txt new file mode 100755 index 00000000..19f868e9 --- /dev/null +++ b/npc/magic/level2-make-tanktop.txt @@ -0,0 +1,24 @@ +- script make-tanktop NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 25) end; + if (getskilllv(.school) < .level) end; + if (countitem("CottonCloth") >= 4) delitem "CottonCloth", 4; else end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 5000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 25; + misceffect FX_MAGIC_RED, strcharinfo(0); + setarray @create_params[0], 1, 350; + setarray @create_items$[0], "TankTop", "CottonCloth"; + callfunc "magic_create_item"; + callfunc "magic_exp"; + end; + +OnInit: + .school = SKILL_MAGIC_TRANSMUTE; + set .invocation$, chr(MAGIC_SYMBOL) + "patloree"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-protect.txt b/npc/magic/level2-protect.txt new file mode 100755 index 00000000..8cdaf3ab --- /dev/null +++ b/npc/magic/level2-protect.txt @@ -0,0 +1,48 @@ +- script protect NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 14) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (.@level <= 3 && countitem("HardSpike") < 1) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self + + if (getequipid(equip_head, strcharinfo(0, @target_id)) == 888) end; + + if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; + if (get(@antiprotect, @target_id) > 0) end; + if (.@level <= 3) delitem "HardSpike", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1500, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 14; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + callfunc "magic_exp"; + + if (BL_ID == @target_id) set @args$, strcharinfo(0); + misceffect FX_MAGIC_SHIELD, @args$; + .@time = (@spellpower*1000)+5000; + @betsanc_time = .@time, @target_id; + sc_start SC_PHYS_SHIELD, .@time, max(15,(@spellpower/20))+5, @target_id; + message @args$, "Shield : You feel more protected."; + @betsanc_future = gettimetick(0) + @betsanc_time - 100, @target_id; + addtimer @betsanc_time - 100, strnpcinfo(0)+"::OnEnd", @target_id; + end; + +OnEnd: + if (gettimetick(0) - @betsanc_future < 0) end; + if (sc_check(SC_PHYS_SHIELD) != 1) end; + message strcharinfo(0), "Shield : You feel less protected."; + misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0); + end; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "betsanc"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-rain.txt b/npc/magic/level2-rain.txt new file mode 100755 index 00000000..e95974e0 --- /dev/null +++ b/npc/magic/level2-rain.txt @@ -0,0 +1,104 @@ +- script rain NPC32767,{ + // we can not start here because for the puppets this is OnClick + end; + +OnCast: + if(call("magic_checks")) end; + if (getskilllv(.school) < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (Sp < 17) end; + explode .@map_ext[0], getmapname(), "-"; + if (.@map_ext[1] != 1) end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside" + if (getmapflag(getmapname(), MF_TOWN)) end; + if (getskilllv(.school) < 4 && countitem("BottleOfWater") >= 1) delitem "BottleOfWater", 1; + elif (getskilllv(.school) < 4) end; + Sp = Sp - 17; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 3000, "Magic Timer::OnClear"; // set the new debuff + + callfunc "adjust_spellpower"; + set @krad, min(.max_radius,(min(@spellpower,200)/30)+3); // kaflosh radius + + @nearby = 0; + foreach 1, getmapname(), POS_X - .max_radius, POS_Y - .max_radius, POS_X + .max_radius, POS_Y + .max_radius, + strnpcinfo(0) + "::OnNearbyNpc"; + if (@nearby) goto L_Absorb; + + set @new_npc_name$, "#" + strnpcinfo(0) + "#" + getcharid(3); // make a unique puppet name for every player + callfunc "magic_exp"; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + set @spell_npc, puppet(getmapname(), POS_X, POS_Y, @new_npc_name$, 127); // clone npc => get puppet id + if (@spell_npc < 1) end; + set .caster, getcharid(3), @spell_npc; // tell the puppet who controls it + set .radius, @krad, @spell_npc; // this is also used by ingrav, don't rename + .initial_x = POS_X, @spell_npc; + .initial_y = POS_Y, @spell_npc; + .max = @spellpower/3, @spell_npc; + .max_launch = min(200,@spellpower/2)/100, @spell_npc; + donpcevent @new_npc_name$+"::OnLaunch"; // start + addnpctimer 30000, @new_npc_name$+"::OnDestroy"; // this is just a failsafe in case the npc is not properly destroyed + if(isin("011-1", 85, 31, 103, 45)) goto L_Pumpkins; + end; + +L_Absorb: + message strcharinfo(0), "##3Rain : ##BA nearby raincloud absorbs your magic."; + end; + +OnNearbyNpc: + explode .@nearby$[0], strnpcinfo(0,@target_id), "#"; + if(.@nearby$[1] == "DruidTree0" || .@nearby$[1] == "DruidTree0") goto L_Tree; + if(.@nearby$[0] == "rain" || .@nearby$[1] == "rain") + @nearby = @nearby + 1; + end; + +L_Pumpkins: + callfunc "HalloweenQuestWaterPumpkins"; + end; + +L_Tree: + set .@x, get(POS_X, @target_id); set .@y, get(POS_Y, @target_id); + if (.@x < POS_X-@krad || .@y < POS_Y-@krad || .@x > POS_X+@krad || .@y > POS_Y+@krad) end; // in max radius but not in puppet area + @flag = 1; + callfunc "QuestTreeTrigger"; + close; + +OnLaunch: + if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing + if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map + .count = .count + 1; + if(.count > .max) destroy; + .launch = 0; + callsub S_Launch; + addnpctimer 400 + rand(100), strnpcinfo(0)+"::OnLaunch"; // loop until max + end; + +S_Launch: + npcareawarp .initial_x - .radius, .initial_y - .radius, .initial_x + .radius, .initial_y + .radius, 0, strnpcinfo(0); + misceffect FX_RAIN; + foreach 2, strnpcinfo(3), getnpcx()-1, getnpcy()-1, getnpcx()+1, getnpcy()+1, strnpcinfo(0) + "::OnHit", .caster; + .launch = .launch + 1; + if(.launch < .max_launch) goto S_Launch; + return; + +OnHit: + if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing + if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map + if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end; + if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc + if(get(ELTTYPE, @target_id) == ELT_FIRE) + injure .caster, @target_id, ((rand((@spellpower/15)+5)+2) * (100 - get(MDEF1, @target_id))) / 100; + end; + +OnDestroy: + debugmes "kaflosh timeout! [this shouldn't happen]"; // XXX: looks like this CAN happen with higher levels of magic, so we might want to cap max charges + destroy; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "kaflosh"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 1; + .max_radius = 15; + end; +} diff --git a/npc/magic/level2-shear.txt b/npc/magic/level2-shear.txt new file mode 100755 index 00000000..79021013 --- /dev/null +++ b/npc/magic/level2-shear.txt @@ -0,0 +1,67 @@ +- script shear NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 23) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 1000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 23; + misceffect FX_MAGIC_GREEN, strcharinfo(0); + setarray @chipchipspell[0], + @spellpower, + (((200 - Agi) * 2000) / 200); //delay + callfunc "magic_exp"; + goto L_FreeRecast; + +OnAttack: + if (isloggedin(@target_id)) goto L_FreeRecast; // can not shear a player + if (sc_check(SC_SHEARED, @target_id)) goto L_FreeRecast; // mob already sheared + if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 + sc_start SC_SHEARED, 600000, 0, @target_id; + .@score = rand(1000 - rand(@chipchipspell[0])); + set .@id, get(Class, @target_id); // get the mob ID + @chipchipspell[2] = 0; + + if (.@id == 1020 && .@score < 300) set .@item$, "WhiteFur"; // Fluffy + elif (.@id == 1027 && .@score < 300) set .@item$, "WhiteFur"; // EasterFluffy + elif (.@id == 1019 && .@score < 250) set .@item$, "HardSpike"; // SpikyMushroom + elif (.@id == 1028 && .@score < 175) set .@item$, "CottonCloth"; // Mouboo + elif (.@id == 1029 && .@score < 700) set .@item$, "MauveHerb"; // MauvePlant + elif (.@id == 1030 && .@score < 700) set .@item$, "CobaltHerb"; // CobaltPlant + elif (.@id == 1031 && .@score < 700) set .@item$, "GambogeHerb"; // GambogePlant + elif (.@id == 1032 && .@score < 700) set .@item$, "AlizarinHerb"; // AlizarinPlant + elif (.@id == 1035 && .@score < 300) set .@item$, "SilkCocoon"; // SilkWorm + elif (.@id == 1018 && .@score < 180) set .@item$, "PinkAntenna"; // Pinkie + else end; + makeitem .@item$, 1, getmapname(), rand(POS_X - 1, POS_X + 1), rand(POS_Y - 1, POS_Y + 1); + + if (.@id != 1020 && .@id != 1028 && .@id != 1018 && rand(2) != 1) end; + @value = 1; + callfunc "QuestSagathaHappy"; + end; + +L_FreeRecast: + @chipchipspell[2] = 1; + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; // we can't do it while already overridden, until it reaches a script terminator + end; + +OnDischarge: + if (@chipchipspell[2] < 1) end; + @chipchipspell[2] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @chipchipspell[1], 1, ATTACK_ICON_SHEARING, 30, strnpcinfo(0)+"::OnAttack"; + end; + +OnInit: + .school = SKILL_MAGIC_NATURE; + set .invocation$, chr(MAGIC_SYMBOL) + "chipchip"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 0; + end; +} diff --git a/npc/magic/level2-summon-fluffies.txt b/npc/magic/level2-summon-fluffies.txt new file mode 100755 index 00000000..1a2d5823 --- /dev/null +++ b/npc/magic/level2-summon-fluffies.txt @@ -0,0 +1,56 @@ +- script smfluffies NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 39) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("WhiteFur") < 1 || countitem("Root") < 1) end; + delitem "WhiteFur", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 39; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/170)+1+(@spellpower/430), .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*350, .@puppet; + addnpctimer 5000-(@spellpower*8), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1020, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "kalakarenk"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-summon-mouboo.txt b/npc/magic/level2-summon-mouboo.txt new file mode 100755 index 00000000..7232fe81 --- /dev/null +++ b/npc/magic/level2-summon-mouboo.txt @@ -0,0 +1,56 @@ +- script smmouboo NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 35) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("MoubooFigurine") < 1 || countitem("Root") < 1) end; + delitem "MoubooFigurine", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 35; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/270)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*100, .@puppet; + addnpctimer 4000-(@spellpower*9), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1028, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "kalboo"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-summon-pinkie.txt b/npc/magic/level2-summon-pinkie.txt new file mode 100755 index 00000000..aeceec4d --- /dev/null +++ b/npc/magic/level2-summon-pinkie.txt @@ -0,0 +1,56 @@ +- script smpinkie NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 35) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("PinkAntenna") < 1 || countitem("Root") < 1) end; + delitem "PinkAntenna", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 35; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/120)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*150, .@puppet; + addnpctimer 5000-(@spellpower*9), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1018, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "kalgina"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 2; + end; +} diff --git a/npc/magic/level2-summon-snakes.txt b/npc/magic/level2-summon-snakes.txt new file mode 100755 index 00000000..a5add6f2 --- /dev/null +++ b/npc/magic/level2-summon-snakes.txt @@ -0,0 +1,57 @@ +- script summon-snakes NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 40) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("DarkCrystal") < 1 || countitem("SnakeEgg") < 1) end; + if (OrumQuest <= 40) end; + delitem "DarkCrystal", 1; + delitem "SnakeEgg", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 15000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 40; + misceffect FX_MAGIC_DARKRED, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/300)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*80, .@puppet; + addnpctimer 4000-(@spellpower*9), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1010, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_DARK; + set .invocation$, chr(MAGIC_SYMBOL) + "halhiss"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 3; + end; +} diff --git a/npc/magic/level2-summon-spiky-mushroom.txt b/npc/magic/level2-summon-spiky-mushroom.txt new file mode 100755 index 00000000..0b13aa0f --- /dev/null +++ b/npc/magic/level2-summon-spiky-mushroom.txt @@ -0,0 +1,56 @@ +- script smsmushrooms NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 33) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("HardSpike") < 1 || countitem("Root") < 1) end; + delitem "HardSpike", 1; + delitem "Root", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 33; + misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/120)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*400, .@puppet; + addnpctimer 5000-(@spellpower*9), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1019, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "kalrenk"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 1; + end; +} diff --git a/npc/magic/level2-summon-wickedmushroom.txt b/npc/magic/level2-summon-wickedmushroom.txt new file mode 100755 index 00000000..94fea209 --- /dev/null +++ b/npc/magic/level2-summon-wickedmushroom.txt @@ -0,0 +1,57 @@ +- script smwmushroom NPC32767,{ + end; + +OnCast: + if(call("magic_checks")) end; + if (Sp < 35) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (getskilllv(.school) < .level) end; + if (countitem("DarkCrystal") < 1 || countitem("SmallMushroom") < 1) end; + if (OrumQuest <= 36) end; + delitem "DarkCrystal", 1; + delitem "SmallMushroom", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 15000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 35; + misceffect FX_MAGIC_DARKRED, strcharinfo(0); + misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + callfunc "magic_exp"; + .@puppet$ = "#"+strnpcinfo(0)+"#"+BL_ID; + .@puppet = puppet(getmapname(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + .count = (@spellpower/250)+1, .@puppet; + .master = BL_ID, .@puppet; + .lifetime = @spellpower*80, .@puppet; + addnpctimer 4000-(@spellpower*9), .@puppet$+"::OnSummon"; + addnpctimer 6000, .@puppet$+"::OnDestroy"; + end; + +OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_PENTAGRAM_BURST; + .@i = 0; + .@x = getnpcx(); + .@y = getnpcy(); + .@map$ = strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1106, 2, .lifetime; + .@i = .@i + 1; + if (.@i < .count) goto S_SummonAll; + destroy; + +OnInit: + .school = SKILL_MAGIC_DARK; + set .invocation$, chr(MAGIC_SYMBOL) + "helorp"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + .level = 2; + .exp_gain = 3; + end; +} diff --git a/npc/magic/level2-toxic-dart.txt b/npc/magic/level2-toxic-dart.txt new file mode 100755 index 00000000..51bcbb40 --- /dev/null +++ b/npc/magic/level2-toxic-dart.txt @@ -0,0 +1,57 @@ +- script toxic-dart NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 15) end; + .@level = getskilllv(.school); + if (.@level < .level) end; + if (OrumQuest <= 37) end; + if (.@level <= 2 && countitem("Root") >= 2) delitem "Root", 2; + elif (.@level <= 2) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + Sp = Sp - 15; + misceffect FX_MAGIC_DARKRED, strcharinfo(0); + setarray @phlexspell[0], + (sqrt(@spellpower) * 5), // elt damage + ((BaseLevel/3) + 5), // elt damage bonus + (((200 - Agi) * 1200) / 200), // delay + ((@spellpower/75) + 3), // charges + (5000+(@spellpower*1200)), // poison duration + (max(15,@spellpower/15)+5); // poison strength + + callfunc "magic_exp"; + goto L_FreeRecast; + +OnAttack: + if (target(BL_ID, @target_id, 50) != 50) goto L_FreeRecast; // 0x20 | 0x02 | 0x10 + misceffect FX_MAGIC_DARKRED, strcharinfo(0); + void call("elt_damage", @phlexspell[0], @phlexspell[1], ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST); + if(@target_id != BL_ID && isloggedin(@target_id)) // this is a dirty trick to check if the target is a player + sc_start SC_POISON, @phlexspell[4], @phlexspell[5], @target_id; + @phlexspell[3] = @phlexspell[3] - 1; + goto L_FreeRecast; + +L_FreeRecast: + if (@phlexspell[3] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnDischarge: + if (@phlexspell[3] < 1) end; + @phlexspell[3] = 0; + misceffect FX_FIRE_BURST, strcharinfo(0); + overrideattack; + end; + +OnSetRecast: + overrideattack @phlexspell[2], 4, ATTACK_ICON_GENERIC, 31, strnpcinfo(0)+"::OnAttack"; + end; + +OnInit: + .school = SKILL_MAGIC_DARK; + set .invocation$, chr(MAGIC_SYMBOL) + "phlex"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 2; + .exp_gain = 3; + end; +} diff --git a/npc/magic/level3-necromancy.txt b/npc/magic/level3-necromancy.txt new file mode 100755 index 00000000..2a09bd65 --- /dev/null +++ b/npc/magic/level3-necromancy.txt @@ -0,0 +1,51 @@ +- script necromancy NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 50) end; + if (getskilllv(.school) < .level) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) end; + if (get(Hp, @target_id) > 0) end; + if (Hp < (get(MaxHp, @target_id) / 3)) end; // hp must be at least a third of the max hp of the target + callfunc "adjust_spellpower"; + if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end; + if (get(@necromancer, @target_id) > 0) end; // someone else is already trying to resurrect this player + if (getmapflag(getmapname(), mf_nosave)) end; // do not allow for maps like illia or candor + if (countitem("Soul") >= 1) delitem "Soul", 1; else end; + + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 20000, "Magic Timer::OnClear"; + Sp = Sp - 50; + misceffect FX_MAGIC_DARKRED, strcharinfo(0); // on caster + misceffect FX_PENTAGRAM_BUILDUP, @args$; // on target + + set @necromancer, CHAR_ID, @target_id; // tell the target who is reviving them + + addtimer 6000, strnpcinfo(0)+"::OnRevive", @target_id; // TODO: make it take more or less time depending on the spell power + end; + +OnRevive: + .@necro = get(BL_ID, @necromancer); + if (.@necro < 1) goto L_Clean; + if (get(Hp, .@necro) < 1) end; + misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + misceffect FX_CRITICAL, strcharinfo(0, .@necro); + heal 1, 0; // revive + Hp = 1; + Sp = 0; + Hp = 1, .@necro; + Sp = 0, .@necro; + goto L_Clean; + +L_Clean: + @necromancer = 0; + end; + +OnInit: + .school = SKILL_MAGIC_DARK; + set .invocation$, chr(MAGIC_SYMBOL) + "nevela"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 3; + .exp_gain = 1; + end; +} diff --git a/npc/marine-2/_import.txt b/npc/marine-2/_import.txt deleted file mode 100644 index 006ce407..00000000 --- a/npc/marine-2/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map marine-2: Ocean -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/marine-2/_mobs.txt", -"npc/marine-2/main.txt", diff --git a/npc/marine-2/_mobs.txt b/npc/marine-2/_mobs.txt deleted file mode 100644 index a41d1a2c..00000000 --- a/npc/marine-2/_mobs.txt +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map marine-2: Ocean mobs -marine-2,32,32,9,3 monster Croc 1006,2,13000,12000 -marine-2,31,33,9,3 monster Tipiou 1016,1,14000,14000 diff --git a/npc/marine-2/main.txt b/npc/marine-2/main.txt deleted file mode 100644 index 9ab0dfc0..00000000 --- a/npc/marine-2/main.txt +++ /dev/null @@ -1,60 +0,0 @@ -// Moubootaur Legends script -// Originals from TMW-BR -// Imported by Jesusalva - -marine-2,0,0,0 script #MarineShip NPC_HIDDEN,{ - end; - -OnEvent: - // Handle travel - if (@timer_navio_running == 0) end; - if (PC_DEST$ == "Tulim") goto L_Tulim; - else if (PC_DEST$ == "Hurns") goto L_Hurns; - else if (PC_DEST$ == "Candor") goto L_Candor; - else if (PC_DEST$ == "Artis") goto L_Artis; - else if (PC_DEST$ == "Argaes") goto L_Argaes; - else goto L_Error; - end; - -L_Tulim: - EnterTown("Tulim", true); - dispbottom l("%s disembarks at Tulimshar.", strcharinfo(0)); - end; - -L_Hurns: - EnterTown("Hurns", true); - dispbottom l("%s disembarks at Hurnscald.", strcharinfo(0)); - end; - -L_Candor: - EnterTown("Candor", true); - dispbottom l("%s disembarks at Candor.", strcharinfo(0)); - end; - -L_Artis: - EnterTown("Artis", true); - dispbottom l("%s disembarks at Artis.", strcharinfo(0)); - end; - -L_Argaes: - if (getq(General_Narrator) == 1) { - warp "000-0-1", 26, 28; - } else { - EnterTown("Argaes", true); - dispbottom l("%s disembarks at Argaes.", strcharinfo(0)); - } - end; - -L_Error: - consolemes(CONSOLEMES_ERROR, "PLAYER INVALID PC_DEST ON #MarineShip: " + PC_DEST$); - ReturnLastTown(); - dispbottom l("An error on your travel happened. Please report."); - end; -} - -function script TravelFix { - if (getmap() == "marine-2") - ReturnLastTown(); - return; -} - diff --git a/npc/marine/_import.txt b/npc/marine/_import.txt deleted file mode 100644 index 6ab1ff31..00000000 --- a/npc/marine/_import.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Map marine: La Marine -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/marine/_mobs.txt", -"npc/marine/saluc.txt", diff --git a/npc/marine/_mobs.txt b/npc/marine/_mobs.txt deleted file mode 100644 index 57623607..00000000 --- a/npc/marine/_mobs.txt +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map marine: La Marine mobs -marine,31,26,9,4 monster Piou 1002,2,30000,20000 diff --git a/npc/marine/saluc.txt b/npc/marine/saluc.txt deleted file mode 100644 index dc3b9897..00000000 --- a/npc/marine/saluc.txt +++ /dev/null @@ -1,137 +0,0 @@ -// The Mana World scripts. -// Author: -// Jesusalva -// Description: -// Saluc Golden Beard, one of the greediest ship captains in Argaes. -// THIS IS A PLACEHOLDER! - -// If you logout on instance, ensure TravelFix() can fix your position -marine mapflag nosave marine-2,40,32 - -// Ship captain -marine,25,24,0 script Saluc Golden Beard NPC_HAL,{ - function confirmTravel; - function artisTravel; - if (.artis) - artisTravel(); - mesn; - mesq l("Hello, adventurer! I am Saluc the Golden Beard!"); - next; - mesn; - mesq l("No, I'm not a scammer! You'll get a ship travel with me, I just... charge a bit more for profit."); - next; - mesn; - mesq l("So, to where you want to go?"); - mesc l("You are currently at %s.", LOCATION$); - menuint - rif(LOCATION$ != "Tulim", l("To Tulimshar")), TP_TULIM, - rif(LOCATION$ != "Hurns", l("To Hurnscald")), TP_HURNS, - rif(LOCATION$ != "Candor", l("To Candor")), TP_CANDOR, - l("No, I'll save my money."), TP_NONE; - mes ""; - if (@menuret == TP_NONE) - close; - mesn; - mesq l("Excellent! Hehehe... That'll be %d E!", .price); - if (.artis) - mesc l("This travel option is NOT advised for new players."), 1; - if (Zeny < .price) - close; - next; - mesc l("Travel?"); - if (askyesno() == ASK_NO || Zeny < .price) - close; - - mesn; - mesq l("Hehehe... All aboard!"); - next; - confirmTravel(.price); - close; - -/* Special Artis dialog */ -function artisTravel { - mesn; - mesq l("Hello, adventurer! I am William D. and I am the captain of this frigate!"); - next; - mesn; - mesq l("Gema IV is a good trading ship, but the Legion has requisitioned it..."); - next; - .@price=.price; - // NOT a typo; You can self-smuggle yourself w/o the commendation leter. - // ...For now. - if (getq(Artis_Legion_Progress) >= 6) { - mesn; - mesq l("Did Q'Anon sent you? Are you enrolled in the Argaes expedition? We're leaving soon so hurry up!"); - .@price=0; - } else { - mesn; - mesq l("I'm providing transport to the Argaes expedition."); - mesc l("William looks around to make sure no one else is listening and continues."); - next; - mesn; - mesq l("Heh, are you curious with the new world? I can make room for an extra \"Crew\" member, if ya catch my drift..."); - mesc l("NEW PLAYERS: This route is for veterans only."), 1; - } - next; - mesn; - mesq l("So, will you board?"); - next; - menuint - l("To Argaes!"), TP_ARGAES, - l("No, I'll save my money."), TP_NONE; - mes ""; - if (@menuret == TP_NONE) - close; - if (Zeny < .@price) - close; - next; - mesc l("Travel?"); - if (.@price) - mesc l("This option is not advised."), 1; - if (askyesno() == ASK_NO || Zeny < .@price) - close; - - mesn; - mesq l("Hehehe... All aboard!"); - next; - confirmTravel(.@price); - close; - return; -} - -/* Warp players to their travel */ -function confirmTravel { - closeclientdialog; - - Zeny-=getarg(0); - .@i=array_find($@LOCMASTER_TP, @menuret); - PC_DEST$=$@LOCMASTER_LOC$[.@i]; - @timer_navio_running = 1; - addtimer (.artis ? 140000 : 50000), "#MarineShip::OnEvent"; // One minute - warp "marine-2", 40, 32; - return; -} - -OnInit: - .distance = 4; - .price = 100; // Current a constant, but maybe... In future... - .artis = false; - end; - -OnInstanceInit: - // Smart Replacement for Artis' version - if (instance_mapname("marine") == "marine@Arti") { - setnpcdisplay(instance_npcname(.name$), "William D."); - .price = 10000; - .artis = true; - } - end; -} - -// Exit door -marine,42,25,0 script Exit#Marine NPC_HIDDEN,0,0,{ -OnTouch: - ReturnLastTown(); - end; -} - diff --git a/npc/scripts.conf b/npc/scripts.conf old mode 100644 new mode 100755 index 210a1d78..42864beb --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -1,178 +1,68 @@ -// This is the main script import file +"npc/functions/clear_vars.txt", -// Critical functions -"npc/functions/permissions.txt", - -// General-purpose Framework functions -"npc/functions/array.txt", -"npc/functions/time.txt", -"npc/functions/timer.txt", -"npc/functions/input.txt", -"npc/functions/string.txt", -"npc/functions/RNGesus.txt", -"npc/functions/math.txt", -"npc/functions/warp.txt", -"npc/functions/bodytype.txt", -"npc/functions/bitwise.txt", -"npc/functions/event-listeners.txt", - -// Misc functions -"npc/functions/main.txt", -"npc/functions/legacy.txt", -"npc/functions/vault.txt", -"npc/functions/player-cache.txt", -"npc/functions/asleep.txt", -"npc/functions/clientversion.txt", -"npc/functions/doors.txt", -"npc/functions/goodbye.txt", +"npc/functions/banker.txt", "npc/functions/barber.txt", +"npc/functions/dailyquest.txt", +"npc/functions/ferry.txt", +"npc/functions/travelers.txt", +"npc/functions/game_rules.txt", +"npc/functions/inn.txt", +"npc/functions/magic.txt", +"npc/functions/mob_points.txt", +"npc/functions/process_equip.txt", +"npc/functions/slot_machine.txt", +"npc/functions/soul_menhir.txt", +"npc/functions/time.txt", +"npc/functions/water_bottle.txt", +"npc/functions/evil_obelisk.txt", +"npc/functions/announcements.txt", +"npc/functions/lockpicking.txt", +"npc/functions/default_npc_checks.txt", +"npc/functions/undead_debug.txt", +"npc/functions/headstyles.txt", "npc/functions/global_event_handler.txt", -"npc/functions/hammocks.txt", -"npc/functions/harbours.txt", -"npc/functions/hello.txt", -"npc/functions/inventoryplace.txt", -"npc/functions/legiontalk.txt", -"npc/functions/npcmove.txt", -"npc/functions/masks.txt", -"npc/functions/spotlight.txt", -"npc/functions/openbook.txt", -"npc/functions/questgen.txt", -"npc/functions/sailordialogue.txt", -"npc/functions/sailortalk.txt", -"npc/functions/savepoint.txt", -"npc/functions/beds.txt", -"npc/functions/shops.txt", -"npc/functions/villagertalk.txt", -"npc/functions/npcmovegraph.txt", -"npc/functions/fishing.txt", -"npc/functions/mouboofunc.txt", -"npc/functions/generic-text.txt", -"npc/functions/asklanguage.txt", -"npc/functions/game-rules.txt", -"npc/functions/refine.txt", -"npc/functions/riddle.txt", -"npc/functions/bank.txt", -"npc/functions/confused-tree-dict.txt", -"npc/functions/treasure.txt", -"npc/functions/afk.txt", -"npc/functions/resetstatus.txt", - -// May rely on custom functions and thus must be handled by last -"npc/functions/util.txt", -"npc/functions/faction.txt", -"npc/functions/scoreboards.txt", -"npc/functions/manhole.txt", -"npc/functions/skills.txt", -"npc/functions/lockpicks.txt", -"npc/functions/crafting.txt", -"npc/functions/referral.txt", -"npc/functions/music.txt", -"npc/functions/casino.txt", -"npc/functions/daily.txt", -"npc/functions/libquest.txt", -"npc/functions/soul-menhir.txt", - -// Quest debug -"npc/functions/quest-debug/functions.txt", +"npc/functions/stat_reset.txt", +"npc/functions/quiz.txt", +"npc/functions/dynamic_menu.txt", +"npc/functions/DyeConfig.txt", +"npc/functions/motd.txt", +"npc/functions/motdconfig.txt", -// Drasil Island -"npc/functions/quest-debug/000-ShipQuests_Julia.txt", -"npc/functions/quest-debug/001-ShipQuests_Arpan.txt", -"npc/functions/quest-debug/002-ShipQuests_Alige.txt", -"npc/functions/quest-debug/003-ShipQuests_Peter.txt", -"npc/functions/quest-debug/004-ShipQuests_Nard.txt", -"npc/functions/quest-debug/005-ShipQuests_Knife.txt", -"npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt", -"npc/functions/quest-debug/007-ShipQuests_Door.txt", -"npc/functions/quest-debug/008-ShipQuests_Couwan.txt", -"npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt", -"npc/functions/quest-debug/010-ShipQuests_Ale.txt", -"npc/functions/quest-debug/011-ShipQuests_Astapolos.txt", -"npc/functions/quest-debug/012-ShipQuests_Gulukan.txt", -"npc/functions/quest-debug/013-ShipQuests_Jalad.txt", -"npc/functions/quest-debug/014-ShipQuests_QMuller.txt", -"npc/functions/quest-debug/015-ShipQuests_Tibbo.txt", -"npc/functions/quest-debug/016-ShipQuests_Gugli.txt", -"npc/functions/quest-debug/017-ShipQuests_ChefGado.txt", -"npc/functions/quest-debug/018-General_Cookies.txt", +"npc/items/purification_potion.txt", +"npc/items/scissors.txt", +"npc/items/pickled_beets.txt", +"npc/items/shock_sweet.txt", +"npc/items/unreleased_item.txt", +"npc/items/require_stat.txt", +"npc/items/restricted_item.txt", +"npc/items/warpTowels.txt", +"npc/items/unequipcb.txt", +"npc/items/launcher_ammo.txt", +"npc/items/check_wand.txt", +"npc/items/mirror.txt", +"npc/items/rubber_bat.txt", -// Artis Town -"npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt", -"npc/functions/quest-debug/021-ArtisQuests_Urchin.txt", -"npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt", -"npc/functions/quest-debug/023-ArtisQuests_Fishman.txt", -"npc/functions/quest-debug/024-ArtisQuests_QOnan.txt", -// 025: ID AVAILABLE -"npc/functions/quest-debug/026-General_Rumly.txt", -"npc/functions/quest-debug/027-ArtisQuests_Enora.txt", -// 028: ID AVAILABLE -"npc/functions/quest-debug/029-ArtisQuests_Fexil.txt", -"npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt", -"npc/functions/quest-debug/031-General_Janus.txt", -"npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt", -"npc/functions/quest-debug/033-Artis_Legion_Progress.txt", -"npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt", -"npc/functions/quest-debug/035-ThiefQuests_Artis.txt", +//@include "npc/magic/_import.txt", -// Argaes Quests -"npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt", -"npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt", -"npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt", -"npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt", -"npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt", -"npc/functions/quest-debug/055-General_Cooking.txt", -"npc/functions/quest-debug/056-General_Brotherhood.txt", -"npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt", -"npc/functions/quest-debug/058-ArgaesQuest_Galimatia.txt", -"npc/functions/quest-debug/059-HurnscaldQuests_Rossy.txt", -// 60 busy for blood donation quest -"npc/functions/quest-debug/061-General_Hal.txt", +//@include "npc/commands/_import.txt", -// Event and General Quests -"npc/functions/quest-debug/100-General_Narrator.txt", -// 101: removed quest (Halloween_VisitArtis) -// 102: removed quest (Halloween_BarrelQuest) +"npc/functions/gm_island.txt", +"npc/annuals/fathertime.txt", +"npc/annuals/check_time.txt", +"npc/annuals/tree_beard.txt", +"npc/annuals/xmas/config.txt", +"npc/annuals/xmas/states.txt", +"npc/annuals/xmas/barriers.txt", +"npc/annuals/xmas/core.txt", +"npc/annuals/xmas/debug.txt", +"npc/annuals/xmas/helpers.txt", +"npc/annuals/xmas/list.txt", +"npc/annuals/xmas/reagents.txt", +"npc/annuals/xmas/mobmanager.txt", +"npc/annuals/halloween/config.txt", +"npc/annuals/halloween/debug.txt", +"npc/annuals/halloween/munro.txt", +"npc/annuals/halloween/trick_or_treat.txt", -// Item functions -"npc/items/cookie.txt", -"npc/items/croconut.txt", -"npc/items/shovel.txt", -"npc/items/rand_sc_heal.txt", -"npc/items/recipes.txt", -"npc/items/master_skillbook.txt", -"npc/items/music_toys.txt", -"npc/items/gift.txt", - -// custom atcommands -"npc/commands/gm.txt", -"npc/commands/music.txt", -"npc/commands/warp.txt", -"npc/commands/zeny.txt", -"npc/commands/motd-debug-text.txt", -"npc/commands/motd.txt", -"npc/commands/mobinfo.txt", -"npc/commands/scheduled-broadcasts.txt", -"npc/commands/rate-management.txt", -"npc/commands/event.txt", -"npc/commands/debug-look.txt", -"npc/commands/debug-quest.txt", -"npc/commands/debug-skill.txt", -"npc/commands/debug-preset.txt", -"npc/commands/debug.txt", -"npc/commands/super-menu.txt", -"npc/commands/resync.txt", -"npc/commands/python.txt", -"npc/commands/bodytype.txt", - -// config script -"npc/config/hairstyle_config.txt", -"npc/config/location.txt", -"npc/config/magic.txt", - -// placeholder scripts -//"npc/placeholder/angus.txt", -//"npc/placeholder/caul.txt", -//"npc/placeholder/receptionist.txt", - -// Maps specific scripts @include "npc/_import.txt" + diff --git a/npc/sec_pri/_import.txt b/npc/sec_pri/_import.txt deleted file mode 100644 index e6c274dd..00000000 --- a/npc/sec_pri/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map sec_pri: Jail -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/sec_pri/redirect.txt", diff --git a/npc/sec_pri/redirect.txt b/npc/sec_pri/redirect.txt deleted file mode 100644 index bd46b987..00000000 --- a/npc/sec_pri/redirect.txt +++ /dev/null @@ -1,12 +0,0 @@ -// The Mana World Script -// Author: -// Jesusalva -// Controls additional jail cells - -sec_pri,49,75,0 script #JailIntWarp NPC_HIDDEN,0,0,{ - end; - -OnTouch: - slide any(29, 33), 75; - end; -} diff --git a/npc/test/_import.txt b/npc/test/_import.txt deleted file mode 100644 index 69324674..00000000 --- a/npc/test/_import.txt +++ /dev/null @@ -1,12 +0,0 @@ -// Map test: test -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/test/_mobs.txt", -"npc/test/mapflags.txt", -"npc/test/npc1.txt", -"npc/test/npc2.txt", -"npc/test/npc3.txt", -"npc/test/npc4.txt", -"npc/test/npc5.txt", -"npc/test/npc6.txt", -"npc/test/test1.txt", -"npc/test/test2.txt", diff --git a/npc/test/_mobs.txt b/npc/test/_mobs.txt deleted file mode 100644 index 8bab3101..00000000 --- a/npc/test/_mobs.txt +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map test: test mobs -test,38,12,1,1 monster Piou 1002,1,1000,1000 -test,38,12,1,1 monster Tortuga 1004,1,1000,1000 -test,44,12,1,1 monster Piou 1002,3,1000,1000 -test,48,10,1,1 monster Tortuga 1004,3,1000,1000 -test,48,10,0,0 monster Piou 1002,1,1000,1000 -test,48,10,0,0 monster Ratto 1005,1,1000,1000 -test,54,10,1,1 monster Piou 1002,3,1000,1000 -test,68,9,0,0 monster Piou 1002,3,1000,1000 -test,68,9,0,0 monster Ratto 1005,1,1000,1000 -test,68,9,1,1 monster Tortuga 1004,3,1000,1000 -test,76,10,1,1 monster Piou 1002,3,1000,1000 -test,76,10,1,1 monster Ratto 1005,1,1000,1000 -test,78,4,1,1 monster Ratto 1005,3,1000,1000 diff --git a/npc/test/mapflags.txt b/npc/test/mapflags.txt deleted file mode 100644 index 6f3199ae..00000000 --- a/npc/test/mapflags.txt +++ /dev/null @@ -1,2 +0,0 @@ -test mapflag mask 5 -test mapflag town diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt deleted file mode 100644 index 31a6a689..00000000 --- a/npc/test/npc1.txt +++ /dev/null @@ -1,712 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// test npc1 - -test,10,10,0 script npc1#door NPC_HIDDEN,0,1,{ -OnTouch: - warp "test", 20, 20; - close; -OnUnTouch: - doevent "npc1::OnUnTouch"; -} - -test,10,10,0 script npc1 NPC_TEST1,3,3,{ - function areatest - { - mesn; - mes "getareausers(\"test\", 7, 7, 13, 13): " + getareausers("test", 7, 7, 13, 13); - mes "getareausers(7, 7, 13, 13): " + getareausers(7, 7, 13, 13); - mes "getareausers(\"test\"): " + getareausers("test"); - mes "getareausers(): " + getareausers(); - mes "getareausers(\"test\", 1): " + getareausers("test", 1); - mes "getareausers(1): " + getareausers(1); - next; - return; - } - -L_Start: - switch (select( - "show area", - "map", - "pc", - "change npc direction", - "quest test", - "cart", - "items", - "chat", - "wall", - "craft", - "hashtable", - "instance", - "mercenary", - "npc", - "clan")) - { - case 1: - areatest; - break; - case 2: - while(1) - { - .@mask = getmapmask("test"); - mes "current mask: " + str(.@mask); - switch (select("show sand:show grass:show fog:hide fog:back")) - { - case 1: - addremovemapmask "test", 4, 8; - break; - case 2: - addremovemapmask "test", 8, 4; - break; - case 3: - addmapmask "test", 2; - break; - case 4: - removemapmask "test", 2; - break; - case 5: - goto L_Start; - break; - } - } - break; - - case 3: - while(1) - { - switch (select("change sex:setmount 0:setmount 1:setmount 2:test command:back")) - { - case 1: - changecharsex; - break; - case 2: - setmount 0; - break; - case 3: - setmount 1; - break; - case 4: - setmount 2; - break; - case 5: - clientcommand "emote 1"; - break; - case 6: - goto L_Start; - break; - } - } - break; - case 4: - for (.@f = 0; .@f < 9; .@f ++) - { - mes "" + .@f; - .dir = .@f; - next; - } - break; - case 5: - mes "current"; - .@val1 = getq(ShipQuests_Gugli); - .@val2 = getq2(ShipQuests_Gugli); - .@val3 = getq3(ShipQuests_Gugli); - .@valTime = getqtime(ShipQuests_Gugli); - mes "val1=" + .@val1; - mes "val2=" + .@val2; - mes "val3=" + .@val3; - mes "valTime=" + .@valTime; - .@val1 ++; - .@val2 ++; - .@val3 ++; - .@valTime ++; - next; - mes "test " + str(.@val1) + ", " + str(.@val2) + ", " + str(.@val3) + ", " + str(.@valTime); - setq ShipQuests_Gugli, .@val1, .@val2, .@val3, .@valTime; - next; - .@val1 = getq(ShipQuests_Gugli); - .@val2 = getq2(ShipQuests_Gugli); - .@val3 = getq3(ShipQuests_Gugli); - .@valTime = getqtime(ShipQuests_Gugli); - mes "val1=" + .@val1; - mes "val2=" + .@val2; - mes "val3=" + .@val3; - mes "valTime=" + .@valTime; - break; - case 6: - while(1) - { - switch (select("add cart:remove cart:back")) - { - case 1: - setcart 1; - break; - case 2: - setcart 0; - break; - case 3: - goto L_Start; - break; - } - } - break; - case 7: - while(1) - { - switch (select("refine", "rent", "bound", "named", "cards", "options", "back")) - { - case 1: - .@item = -1; - while(1) - { - switch (select("set item", "refine +1", "refine -1", "refine fail", "back")) - { - case 1: - .@item = requestitemindex(); - mes "Item index selected: " + str(.@item); - break; - case 2: - successrefindex .@item, 1; - break; - case 3: - downrefindex .@item, 1; - break; - case 4: - failedrefindex .@item; - break; - case 5: - goto L_Start; - break; - } - } - break; - case 2: - while(1) - { - switch (select("rent vneck for 10 seconds", - "rent vneck for 30 seconds", - "rent vneck for 1 minute", - "rent vneck for 5 minutes", - "back")) - { - case 1: - rentitem 1301, 10; - break; - case 2: - rentitem 1301, 30; - break; - case 3: - rentitem 1301, 60; - break; - case 4: - rentitem 1301, 300; - break; - case 5: - goto L_Start; - break; - } - } - break; - case 3: - while(1) - { - switch (select("get bound vneck", - "back")) - { - case 1: - getitembound2 1301, 1, 1, 0, 0, 0, 0, 0, 0, 1; - break; - case 2: - goto L_Start; - break; - } - } - break; - case 4: - while(1) - { - switch (select("get named vneck", - "back")) - { - case 1: - getnameditem 1301, "4144"; - break; - case 2: - goto L_Start; - break; - } - } - break; - case 5: - .@item = -1; - while(1) - { - switch (select("set item", - "remove cards success", - "fail, remove both", - "fail, remove card", - "fail, remove item", - "fail, safe", - "print all", - "remove 0", - "back")) - { - case 1: - .@item = requestitemindex(); - mes "Item index selected: " + str(.@item); - break; - case 2: - successremovecardsindex .@item; - break; - case 3: - failedremovecardsindex .@item, 0; - break; - case 4: - failedremovecardsindex .@item, 1; - break; - case 5: - failedremovecardsindex .@item, 2; - break; - case 6: - failedremovecardsindex .@item, 3; - break; - case 7: - mes "slots=" + str(MAX_SLOTS); - for (.@i = 0; .@i < MAX_SLOTS; .@i++) - { - mes "slot " + str(.@i) + " = " + str(getcardbyindex(.@item, .@i)); - } - mes "item options:"; - for (.@i = 0; .@i < 5; .@i ++) - { - mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), getitemoptionvaluebyindex(.@item, .@i)); - } - break; - case 8: - removecardbyindex(.@item, 0); - break; - case 9: - goto L_Start; - break; - } - } - break; - case 6: - .@item = -1; - while(1) - { - switch (select("set item", "info", "set option 1", "remove options", "back")) - { - case 1: - .@item = requestitemindex(); - mes "Item index selected: " + str(.@item); - break; - case 2: - mes "Selected item options"; - for (.@i = 0; .@i < 5; .@i ++) - { - mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), getitemoptionvaluebyindex(.@item, .@i)); - } - break; - case 3: - setitemoptionbyindex(.@item, 0, VAR_MAXHPAMOUNT, 200); - setitemoptionbyindex(.@item, 1, VAR_STRAMOUNT, 10); - setitemoptionbyindex(.@item, 2, VAR_VITAMOUNT, -5); - break; - case 4: - mes "Remove item options"; - for (.@i = 0; .@i < 5; .@i ++) - { - setitemoptionbyindex(.@item, .@i, 0, 0); - } - break; - case 5: - goto L_Start; - break; - } - } - break; - case 7: - goto L_Start; - break; - } - } - break; - case 8: - chatjoin .chat; - close; - case 9: - while(1) - { - switch (select("set wall 1:set wall 2:set wall 3:delete wall 1:delete wall 2:delete wall 3:back")) - { - case 1: - setcells "test", 14, 11, 17, 11, 3, "wall1"; - break; - case 2: - setcells "test", 14, 7, 21, 8, 1, "wall2"; - break; - case 3: - setcells "test", 13, 15, 13, 21, 3, "wall3"; - break; - case 4: - delcells "wall1"; - break; - case 5: - delcells "wall2"; - break; - case 6: - delcells "wall3"; - break; - case 7: - goto L_Start; - break; - } - } - break; - case 10: - while(1) - { - switch (select("technical:normal:back")) - { - case 1: - setskin "test2"; - .@var$ = requestcraft(9); - mes .@var$; - .@craft = initcraft(.@var$); - mes "craft id: " + str(.@craft); - mes "is craft valid: " + validatecraft(.@craft); - .@id = getcraftslotid(.@craft, 0); - .@amount = getcraftslotamount(.@craft, 0); - mes "first item id: " + .@id; - mes "first item name: " + getitemlink(.@id); - mes "first item amount: " + .@amount; - - .@id = getcraftslotid(.@craft, 1); - .@amount = getcraftslotamount(.@craft, 1); - mes "second item id: " + .@id; - mes "second item name: " + getitemlink(.@id); - mes "second item amount: " + .@amount; -// dumpcraft .@craft; - .@entry = findcraftentry(.@craft, 0); - mes "found craft entry: " + .@entry; - if (.@entry < 0) - { - mes "no craft recipe found"; - } - else - { - mes "use craft"; - usecraft .@craft; - mes "return code: " + getcraftcode(.@entry); - } - deletecraft .@craft; - setskin ""; - break; - case 2: - mes "put items what you want to craft"; - setskin "test2"; - .@var$ = requestcraft(9); - setskin ""; - .@craft = initcraft(.@var$); - if (.@craft < 0) - { - mes "Craft error."; - goto L_Start; - } - mes "lets see what you can get..."; - next; - if (!validatecraft(.@craft)) - { - mes "inventory was changed."; - goto L_Start; - } - .@entry = findcraftentry(.@craft, 0); - if (.@entry < 0) - { - mes "no craft recipe found"; - } - else - { - mes "found recipe"; - usecraft .@craft; - mes "return code: " + getcraftcode(.@entry); - } - deletecraft .@craft; - break; - case 3: - goto L_Start; - break; - } - } - break; - case 11: - switch(select("Create new hashtable", - "Use existing ID")) - { - case 1: - .@ht = htnew(); - mes "ID = " + .@ht; - break; - case 2: - mes "Input ID"; - input .@ht; - break; - } - .@defval = 0; - .@defval_str$ = ""; - .@newval = 0; - .@newval_str$ = ""; - .@key$ = ""; - - while(1) - { - switch (select("Set default string value", - "Set default number value", - "Get string", - "Get number", - "Put string", - "Put number", - "Show hashtable", - "Clear hashtable", - "Delete hashtable", - "Exit")) - { - case 1: - input .@defval_str$; - break; - case 2: - input .@defval; - break; - case 3: - mes "Input key:"; - input .@key$; - mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$); - mes "htget(" + .@ht + ", \"" + .@key$ + "\", \"" + .@defval_str$ + "\") = " + htget(.@ht, .@key$, .@defval_str$); - break; - case 4: - mes "Input key:"; - input .@key$; - mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$); - mes "htget(" + .@ht + ", \"" + .@key$ + "\", " + .@defval + ") = " + htget(.@ht, .@key$, .@defval); - break; - case 5: - mes "Input key:"; - input .@key$; - mes "Input value:"; - input .@newval_str$; - htput(.@ht, .@key$, .@newval_str$); - mes "htput(" + .@ht + ", \"" + .@key$ + "\", \"" + .@newval_str$ + "\")"; - mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$); - break; - case 6: - mes "Input key:"; - input .@key$; - mes "Input value:"; - input .@newval; - htput(.@ht, .@key$, .@newval); - mes "htput(" + .@ht + ", \"" + .@key$ + "\", " + .@newval + ")"; - mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$); - break; - case 7: - mes "size = " + htsize(.@ht); - .@hti = htiterator(.@ht); - for(.@key$ = htinextkey(.@hti); hticheck(.@hti); .@key$ = htinextkey(.@hti)) - mes "key = " + .@key$ + " value = " + htget(.@ht, .@key$); - htidelete(.@hti); - break; - case 8: - htclear(.@ht); - mes "htclear(" + .@ht + ")"; - break; - case 9: - htdelete(.@ht); - mes "htdelete(" + .@ht + ")"; - break; - case 10: - goto L_Start; - } // switch - } // while - break; - case 12: - while(1) - { - switch (select("create", "warp", "info", "warp back", "delete", "back")) - { - case 1: - if (.instid >= 0 && isinstance(.instid)) - { - mes "Error: test instance already created"; - break; - } -// .instid = instance_create("test@instance", 0, 0); - .instid = instance_create("test@instance", getcharid(3), IOT_CHAR); - if (.instid < 0) - { - mes "Error: creating instance"; - break; - } - mes "new instance id: " + str(.instid); -// .@instanceMapName$ = instance_attachmap("test", .instid, 1, "test@map1"); -// .@instanceMapName$ = instance_attachmap("test", .instid, 1); - .@instanceMapName$ = instance_attachmap("test", .instid, 0, "test@map1"); - if (.@instanceMapName$ == "") - { - mes "Error: instance attach map error"; - break; - } - mes "Attached instance map name: " + .@instanceMapName$; - instance_set_timeout(1000000, 1000000, .instid); - instance_init(.instid); - break; - case 2: - warp "test@map1", 12, 12; - break; - case 3: - mes "npc name: " + .name$; - mes "npc ext name: " + .extname$; - mes "npc id: " + .id; - mes "npc parent id: " + .parent; - mes "npc src id: " + .srcId; - if (instance_id() >= 0) - { - mes "npc1 in instance named: " + instance_npcname("npc1"); - } - else - { - mes "npc1 not in instance"; - } - break; - case 4: - warp "test", 12, 12; - break; - case 5: - if (.instid < 0) - { - mes "Error: test instance was not created"; - break; - } - instance_destroy(.instid); - break; - case 6: - goto L_Start; - break; - } - } - break; - case 13: - while(1) - { - switch (select("create mercenary for 10 seconds", "create mercenary for 1 min", "create mercenary for 10 min", "back")) - { - case 1: - mercenary_create 1191, 10000; - break; - case 2: - mercenary_create 1191, 60000; - break; - case 3: - mercenary_create 1191, 600000; - break; - case 4: - goto L_Start; - break; - } - } - break; - case 14: - while(1) - { - switch (select("set hair 1", "set hair 0", "equip vneck", "unequip vneck", "back")) - { - case 1: - setunitdata(.@npcId, UDT_HAIRSTYLE, 5); - setunitdata(.@npcId, UDT_HAIRCOLOR, 17); - break; - case 2: - .@npcId = getnpcid("npc4"); - setunitdata(.@npcId, UDT_HAIRSTYLE, 0); - break; - case 3: - .@npcId = getnpcid("npc4"); - setunitdata(.@npcId, UDT_HEADTOP, 1301); - break; - case 4: - .@npcId = getnpcid("npc4"); - setunitdata(.@npcId, UDT_HEADTOP, 0); - break; - case 5: - goto L_Start; - break; - } - } - break; - case 15: - while(1) - { - switch (select( - "join sword clan", - "join arc wand clan", - "join golden mace clan", - "join crossbox clan", - "leave clan", - "back")) - { - case 1: - mes(str(clan_join(1))); - break; - case 2: - mes(str(clan_join(2))); - break; - case 3: - mes(str(clan_join(3))); - break; - case 4: - mes(str(clan_join(4))); - break; - case 5: - mes(str(clan_leave())); - break; - case 6: - goto L_Start; - break; - } - } - break; - } - - close; - -OnTouch: - doorTouch; - -OnUnTouch: - doorUnTouch; - -OnTimer340: - doorTimer; - -OnInit: - .distance = 5; - .alwaysVisible = true; - waitingroom "test room", 2, "npc1::OnReadyCheck", 1; - // test instance id - .instid = -10; - if (.parent != 0) - { - setnpcdir 0; - } - end; - -OnWhisperGlobal: - mes "cmd: " + @whispervar0$; - close; - -OnReadyCheck: - consolemes(CONSOLEMES_DEBUG, "OnReadyCheck"); - $@bgid1 = waitingroom2bg("testbg", 10, 10, "bgnpc1::OnLogout","bgnpc1:OnDie"); - consolemes(CONSOLEMES_DEBUG, "bgid=" + str($@bgid1)); - setbgteam $@bgid1, 1; - bg_warp $@bgid1, "testbg", 10, 10; -} diff --git a/npc/test/npc2.txt b/npc/test/npc2.txt deleted file mode 100644 index 8a2146f1..00000000 --- a/npc/test/npc2.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// test npc2 - -test,20,10,0 trader npc2 NPC_HAT_BOX,{ -OnInit: - tradertype(NST_MARKET); - sellitem 505, -1, 10; - sellitem 502, -1, 10; - sellitem 513, -1, 10; - sellitem 509, -1, 10; - sellitem 2000, -1, 10; - sellitem 1800, -1, 10; - sellitem 3501, -1, 10; - end; - -OnClock0000: - if (shopcount(505) < 10) - sellitem 505, -1, 10; - if (shopcount(502) < 10) - sellitem 502, -1, 10; - if (shopcount(513) < 10) - sellitem 513, -1, 10; - if (shopcount(509) < 10) - sellitem 509, -1, 10; - if (shopcount(2000) < 10) - sellitem 2000, -1, 10; - if (shopcount(1800) < 10) - sellitem 1800, -1, 10; - if (shopcount(3501) < 10) - sellitem 3501, -1, 10; - end; -} diff --git a/npc/test/npc3.txt b/npc/test/npc3.txt deleted file mode 100644 index 82d5fe3f..00000000 --- a/npc/test/npc3.txt +++ /dev/null @@ -1,7 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// test npc3 - -test,25,10,0 cashshop npc3 NPC_SHOP_BAG,505:100,502:-1,513:-1,509:-1,2000:-1,1800:-1,3501:-1 diff --git a/npc/test/npc4.txt b/npc/test/npc4.txt deleted file mode 100644 index b85d1bf8..00000000 --- a/npc/test/npc4.txt +++ /dev/null @@ -1,30 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// test npc4 - -test,25,20,0 script npc4 NPC_PLAYER,{ - close; -OnTimer1000: - domovestep; -OnInit: - .walkmask = WALK_WATER; - initpath "move", 20, 20, - "sit", 0, 0, - "dir", 6, 0, - "move", 25, 20, - "emote", 3, 0, -// "class", 104, 0, - "speed", 100, 0, - "wait", 2, 0, - "move", 22, 10, - "rmove", 3, 3, -// "class", 801, 0, - "speed", 200, 0, - "wait", 1, 0, - "warp", 22, 30, - "goto", 0, 0; - initialmove; - initnpctimer; -} diff --git a/npc/test/npc5.txt b/npc/test/npc5.txt deleted file mode 100644 index faa655e8..00000000 --- a/npc/test/npc5.txt +++ /dev/null @@ -1,34 +0,0 @@ -// Evol scripts. -// Author: -// Travolta -// Description: -// test npc5 - -function script npc5TestFunc { - npctalk getarg(0); - return 0; -} - -test,45,25,0 script npc5 NPC_PLAYER,{ - close; - -OnTimer1000: - dographmovestep; - -OnInit: - // .debug = 1; - initmovegraph "topleft", 45, 25, - "topright", 55, 25, - "bottomright", 55, 34, - "bottomleft", 45, 34; - - setmovegraphcmd "topleft", "topright", 30, "dir 0; wait 1", - "topleft", "bottomright", 20, "class 104", - "topleft", "bottomleft", 50, "emote 8; wait 1; warp bottomright", - "topright", "bottomleft", 1, "emote 3; wait 5", - "bottomleft", "topleft", 25, "dir 2; wait 1; call npc5TestFunc Hello=)", - "bottomleft", "bottomright", 10, "speed 40", - "bottomright", "bottomleft", 1, "class 801; speed 100; dir 0; emote 1; wait 4"; - firstmove "wait 1; speed 100; dir 4; emote 7"; - initnpctimer; -} diff --git a/npc/test/npc6.txt b/npc/test/npc6.txt deleted file mode 100644 index 7c4893ad..00000000 --- a/npc/test/npc6.txt +++ /dev/null @@ -1,23 +0,0 @@ -// Evol scripts. -// Authors: -// 4144 -// Description: -// test npc1 - -test,30,10,0 trader npc6 NPC_SHOP_BAG_TEST,{ - end; - -OnCountFunds: - setcurrency 10000; - end; - -OnPayFunds: - dispbottom "Hi: price="+@price+" and points="+@points; - // check and remove points - purchaseok; - end; -OnInit: - tradertype NST_CUSTOM; - sellitem Acorn, 500; - sellitem Bread, 200; -} diff --git a/npc/test/test1.txt b/npc/test/test1.txt deleted file mode 100644 index 9fefe307..00000000 --- a/npc/test/test1.txt +++ /dev/null @@ -1,165 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// script tests - -function script test1function { - .var = .walkmask; - if (.var != 3) - mes "Error: testing test1 npc variables from function."; - .var = getvariableofnpc(.walkmask, "test1"); - if (.var != 3) - mes "Error: testing test1 npc variables from function."; - .var = getvariableofnpc(.walkmask, "test2"); - if (.var != 4) - mes "Error: testing test2 npc variables from function."; - - return; -} - -test,10,5,0 script test1 NPC_HAT_BOX,{ - - function assert { - if (getarg(0)) { - .stats[1]++; - // comment out the next line for less verbosity - mesf("Success: %s.", getarg(1)); - } else { - mesf("##BError##b: %s.", getarg(1)); - } - return .stats[0]++; - } - - function test_npc_vars { - mes("##2Testing NPC variables...##0"); - .var = .walkmask; - assert(.var == 3, "test1 npc variales"); - .var = getvariableofnpc(.walkmask, "test1"); - assert(.var == 3, "test1 npc variables from function"); - .var = getvariableofnpc(.walkmask, "test2"); - assert(.var == 4, "test2 npc variables"); - test1function(); - next(); - } - - function test_quest_vars { - mes("##2Testing quest variables...##0"); - .@time = 1000; - setq(Test_testing1, 1, 2, 3, .@time); - assert(getq(Test_testing1) == 1, "getq1 = 1"); - assert(getq2(Test_testing1) == 2, "getq2 = 2"); - assert(getq3(Test_testing1) == 3, "getq3 = 3"); - assert(getqtime(Test_testing1) == .@time, "getqtime = 1000"); - next(); - .@time = 2000; - setq(Test_testing1, 2, 3, 4, .@time); - assert(getq(Test_testing1) == 2, "getq1 = 2"); - assert(getq2(Test_testing1) == 3, "getq2 = 3"); - assert(getq3(Test_testing1) == 4, "getq3 = 4"); - assert(getqtime(Test_testing1) == .@time, "getqtime = 2000"); - next(); - setq(Test_testing1, 0); - } - - function test_translation_old { - mes("##2Testing old translation system without gender...##0"); - assert(l("test @@", "") == "test ", "\"test @@\", \"\""); - assert(l("test @@", "foo") == "test foo", "\"test @@\", \"foo\""); - assert(l("@@", "") == "", "\"@@\", \"\""); - assert(l("@@") == "@@", "\"@@\""); - assert(l("@@ @@ @@", "this", "is", "test") == "this is test", "\"@@ @@ @@\", \"this\", \"is\", \"test\""); - assert(l("data @@ @@ @@ data", "this", "is", "test") == "data this is test data", "\"data @@ @@ @@ data\", \"this\", \"is\", \"test\""); - next(); - - /* - mesf("##2Testing old translation system as %s gender...##0", g("female", "male")); - if (Sex == 1) - assert(lg("test1 @@", "test2 @@", "line") == "test2 line#1", "\"test1 @@\", \"test2 @@\", \"line\""); - else if (Sex == 0) - assert(lg("test1 @@", "test2 @@", "line") == "test1 line#0", "\"test1 @@\", \"test2 @@\", \"line\""); - */ - next(); - } - - function test_translation_new { - mes("##2Testing new translation system without gender...##0"); - assert(l("") == "", "\"\""); - assert(l("test") == "test", "\"test\""); - assert(l("test %s", "") == "test ", "\"test %s\", \"\""); - assert(l("test %s", "foo") == "test foo", "\"test %s\", \"foo\""); - assert(l("%s", "") == "", "\"%s\", \"\""); - assert(l("%s") == "%s", "\"%s\""); - assert(l("%%") == "%%", "\"%##0%\""); // XXX: %% is reserved for emotes in manaplus, so we escape it with color - assert(l("%d%%", 6) == "6%", "\"%d%##0%\", 6"); // XXX: %% is reserved for emotes in manaplus, so we escape it with color - assert(l("%s %s %s", "this", "is", "test") == "this is test", "\"%s %s %s\", \"this\", \"is\", \"test\""); - assert(l("%s %d %s", "foo", 69, "bar") == "foo 69 bar", "\"%s %d %s\", \"foo\", 69, \"bar\""); - assert(l("data %s %s %s data", "this", "is", "test") == "data this is test data", "\"data %s %s %s data\", \"this\", \"is\", \"test\""); - next(); - - /* - mesf("##2Testing new translation system as %s gender...##0", g("female", "male")); - if (Sex == 1) { - assert(lg("test") == "test#1", "\"test\""); - assert(lg("test1", "test2") == "test2#1", "\"test1\", \"test2\""); - assert(lg("test1 %s", "test2 %s", "line") == "test2 line#1", "\"test1 %s\", \"test2 %s\", \"line\""); - } else if (Sex == 0) { - assert(lg("test") == "test#0", "\"test\""); - assert(lg("test1", "test2") == "test1#0", "\"test1\", \"test2\""); - assert(lg("test1 %s", "test2 %s", "line") == "test1 line#0", "\"test1 %s\", \"test2 %s\", \"line\""); - } - */ - next(); - - mes("##2Testing advanced translation...##0"); - assert(l("foo %2$s bar %1$s baz", "qux", "quux") == "foo quux bar qux baz", "\"foo %2$s bar %1$s baz\", \"qux\", \"quux\""); - assert(l("%5d", 6) == " 6", "\"%5d\", 6"); - assert(l("%5d", -6) == " -6", "\"%5d\", -6"); - assert(l("%+5d", 6) == " +6", "\"%+5d\", 6"); - assert(l("%+5d", -6) == " -6", "\"%+5d\", -6"); - assert(l("%-5d", 6) == "6 ", "\"%-5d\", 6"); - assert(l("%-5d", -6) == "-6 ", "\"%-5d\", -6"); - assert(l("% 5d", 6) == " 6", "\"% 5d\", 6"); - assert(l("% 5d", -6) == " -6", "\"% 5d\", -6"); - assert(l("%05d", 6) == "00006", "\"%05d\", 6"); - assert(l("%05d", -6) == "-0006", "\"%05d\", -6"); - assert(l("%10s", "test") == " test", "\"%10s\", \"test\""); - assert(l("% 10s", "test") == " test", "\"% 10s\", \"test\""); - assert(l("%-10s", "test") == "test ", "\"%-10s\", \"test\""); - next(); - } - - - do { - mes("Please select a test:"); - select( - "NPC variables", - "quest variables", - "translation (old)", - "translation (new)", - "everything"); - - setarray(.stats[0], 0, 0); // make sure we have a clean state - clear(); - - switch (@menu) { - case 1: test_npc_vars(); break; - case 2: test_quest_vars(); break; - case 3: test_translation_old(); break; - case 4: test_translation_new(); break; - default: - test_translation_old(); - test_translation_new(); - test_npc_vars(); - test_quest_vars(); - } - - mesf("##BTests complete. [%02d/%02d]", .stats[1], .stats[0]); - next(); - } while (true); - close; - -OnInit: - .walkmask = 3; - end; -} diff --git a/npc/test/test2.txt b/npc/test/test2.txt deleted file mode 100644 index fdc6f847..00000000 --- a/npc/test/test2.txt +++ /dev/null @@ -1,13 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// script tests - -test,12,5,0 script test2 NPC_HAT_BOX,{ - close; - -OnInit: - .walkmask = 4; - end; -} diff --git a/npc/testbg/_import.txt b/npc/testbg/_import.txt deleted file mode 100644 index c8affdf4..00000000 --- a/npc/testbg/_import.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Map testbg: testbg -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/testbg/mapflags.txt", diff --git a/npc/testbg/mapflags.txt b/npc/testbg/mapflags.txt deleted file mode 100644 index 764a55df..00000000 --- a/npc/testbg/mapflags.txt +++ /dev/null @@ -1 +0,0 @@ -testbg mapflag battleground -- cgit v1.2.3-70-g09d2