summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/000-0-0/sailors.txt34
-rw-r--r--npc/000-0/sailors.txt24
-rw-r--r--npc/00000SAVE/003-1_stranger.c533
-rw-r--r--npc/00000SAVE/005-4_bossfight.c204
-rw-r--r--npc/00000SAVE/018-2_petsales.txt280
-rw-r--r--npc/00000SAVE/020-1_well.txt80
-rw-r--r--npc/00000SAVE/021-1_michel.forum.txt41
-rw-r--r--npc/00000SAVE/EPISODE/020-2_miler.txt56
-rw-r--r--npc/00000SAVE/andy_alex.forum.txt179
-rw-r--r--npc/00000SAVE/events/028-1_Easter2010_Portal.txt134
-rw-r--r--npc/00000SAVE/events/030-2_XMAS_glitter_helper.txt94
-rw-r--r--npc/00000SAVE/events/031-1_frozenbeard.txt58
-rw-r--r--npc/00000SAVE/fairy/009-2_fairyquest2.txt75
-rw-r--r--npc/00000SAVE/lockpicking.txt87
-rw-r--r--npc/00000SAVE/misc/doctor.txt88
-rw-r--r--npc/00000SAVE/misc/injured-mouboo.txt224
-rw-r--r--npc/00000SAVE/misc/pachua.txt464
-rw-r--r--npc/001-1/bgmaster.txt42
-rw-r--r--npc/001-1/eventmaster.txt809
-rw-r--r--npc/001-1/mapflags.txt8
-rw-r--r--npc/001-1/portal.txt56
-rw-r--r--npc/001-1/rewards.txt35
-rw-r--r--npc/001-3-1/_import.txt3
-rw-r--r--npc/001-3-1/_warps.txt9
-rw-r--r--npc/001-3/_import.txt (renamed from npc/005-5-2/_savepoints.txt)3
-rw-r--r--npc/001-3/_warps.txt8
-rw-r--r--npc/001-4/_import.txt1
-rw-r--r--npc/001-4/mapflags.txt1
-rw-r--r--npc/001-6/_import.txt5
-rw-r--r--npc/001-6/_mobs.txt14
-rw-r--r--npc/001-6/mapflags.txt1
-rw-r--r--npc/001-6/warp.txt32
-rw-r--r--npc/001-7/_import.txt7
-rw-r--r--npc/001-7/_mobs.txt37
-rw-r--r--npc/001-7/_warps.txt21
-rw-r--r--npc/001-7/barbarian.txt74
-rw-r--r--npc/001-7/celestia_bossfight.txt166
-rw-r--r--npc/001-7/mapflags.txt1
-rw-r--r--npc/001-8/_import.txt5
-rw-r--r--npc/001-8/_mobs.txt8
-rw-r--r--npc/001-8/hub.txt385
-rw-r--r--npc/001-8/mapflags.txt2
-rw-r--r--npc/001-9/_import.txt (renamed from npc/005-5-2/_mobs.txt)2
-rw-r--r--npc/002-1/_mobs.txt2
-rw-r--r--npc/002-1/alige.txt415
-rw-r--r--npc/002-1/arpan.txt103
-rw-r--r--npc/002-1/chefgado.txt3
-rw-r--r--npc/002-1/dan.txt17
-rw-r--r--npc/002-1/knife.txt8
-rw-r--r--npc/002-1/peter.txt10
-rw-r--r--npc/002-2/doors.txt17
-rw-r--r--npc/002-3/_mobs.txt2
-rw-r--r--npc/002-3/billybons.txt8
-rw-r--r--npc/002-3/doors.txt52
-rw-r--r--npc/002-3/juliet.txt37
-rw-r--r--npc/002-3/note.txt2
-rw-r--r--npc/002-4/elmo.txt4
-rw-r--r--npc/002-4/nard.txt131
-rw-r--r--npc/002-5/_import.txt5
-rw-r--r--npc/002-5/_mobs.txt3
-rw-r--r--npc/002-5/main.txt53
-rw-r--r--npc/002-5/mapflags.txt1
-rw-r--r--npc/003-0-1/_import.txt1
-rw-r--r--npc/003-0-1/colin.txt295
-rw-r--r--npc/003-0-1/luca.txt292
-rw-r--r--npc/003-0-1/maxime.txt87
-rw-r--r--npc/003-0-1/statues.txt13
-rw-r--r--npc/003-0/_import.txt12
-rw-r--r--npc/003-0/_warps.txt (renamed from npc/soren/_warps.txt)4
-rw-r--r--npc/003-0/audsbel.txt241
-rw-r--r--npc/003-0/berserk.txt222
-rw-r--r--npc/003-0/mages.txt25
-rw-r--r--npc/003-0/paladin.txt223
-rw-r--r--npc/003-0/priest.txt255
-rw-r--r--npc/003-0/sage.txt255
-rw-r--r--npc/003-0/tanker.txt220
-rw-r--r--npc/003-0/warriors.txt38
-rw-r--r--npc/003-0/wizard.txt227
-rw-r--r--npc/003-1-1/_import.txt5
-rw-r--r--npc/003-1-1/_mobs.txt5
-rw-r--r--npc/003-1-1/_warps.txt6
-rw-r--r--npc/003-1-1/yetiking.txt156
-rw-r--r--npc/003-1-3/_import.txt2
-rw-r--r--npc/003-1-3/_mobs.txt8
-rw-r--r--npc/003-1-3/_warps.txt2
-rw-r--r--npc/003-1/_import.txt8
-rw-r--r--npc/003-1/_mobs.txt6
-rw-r--r--npc/003-1/aidan.txt111
-rw-r--r--npc/003-1/ched.txt105
-rw-r--r--npc/003-1/constableperry.txt7
-rw-r--r--npc/003-1/eistein.txt93
-rw-r--r--npc/003-1/eomie.txt87
-rw-r--r--npc/003-1/eugene.txt1
-rw-r--r--npc/003-1/events.txt76
-rw-r--r--npc/003-1/hasan.txt186
-rw-r--r--npc/003-1/inac.txt22
-rw-r--r--npc/003-1/ishi.txt101
-rw-r--r--npc/003-1/jakod.txt26
-rw-r--r--npc/003-1/jerican.txt19
-rw-r--r--npc/003-1/lieutenantdausen.txt261
-rw-r--r--npc/003-1/magic.txt18
-rw-r--r--npc/003-1/mahoud.txt26
-rw-r--r--npc/003-1/malivox.txt5
-rw-r--r--npc/003-1/mapflags.txt1
-rw-r--r--npc/003-1/neko.txt67
-rw-r--r--npc/003-1/ninathetraveler.txt44
-rw-r--r--npc/003-1/oldwell.txt37
-rw-r--r--npc/003-1/quirino.txt150
-rw-r--r--npc/003-1/sailors.txt103
-rw-r--r--npc/003-1/sarah.txt47
-rw-r--r--npc/003-1/sewer.txt35
-rw-r--r--npc/003-1/ship.txt26
-rw-r--r--npc/003-1/shop.txt10
-rw-r--r--npc/003-1/silvia.txt15
-rw-r--r--npc/003-1/swezanne.txt17
-rw-r--r--npc/003-1/tinris.txt146
-rw-r--r--npc/003-1/well.txt62
-rw-r--r--npc/003-10/_import.txt2
-rw-r--r--npc/003-10/arnea.txt1
-rw-r--r--npc/003-10/guarddevoir.txt101
-rw-r--r--npc/003-10/slots.txt118
-rw-r--r--npc/003-2/_import.txt1
-rw-r--r--npc/003-2/eistein.txt79
-rw-r--r--npc/003-2/estard.txt52
-rw-r--r--npc/003-2/lua.txt49
-rw-r--r--npc/003-3/malindou.txt252
-rw-r--r--npc/003-4-1/_import.txt4
-rw-r--r--npc/003-4-1/_mobs.txt3
-rw-r--r--npc/003-4-1/_warps.txt3
-rw-r--r--npc/003-4/_import.txt3
-rw-r--r--npc/003-4/sorfina.txt128
-rw-r--r--npc/003-4/warp.txt13
-rw-r--r--npc/003-5/_import.txt3
-rw-r--r--npc/003-5/_warps.txt3
-rw-r--r--npc/003-5/doors.txt22
-rw-r--r--npc/003-5/jeweler.txt190
-rw-r--r--npc/003-6/_import.txt2
-rw-r--r--npc/003-6/cyndala.txt (renamed from npc/003-4/cyndala.txt)22
-rw-r--r--npc/003-6/tamiloc.txt (renamed from npc/003-1/tamiloc.txt)4
-rw-r--r--npc/003-8/jhedia.txt119
-rw-r--r--npc/004-1/_import.txt2
-rw-r--r--npc/004-1/_mobs.txt3
-rw-r--r--npc/004-1/_warps.txt5
-rw-r--r--npc/004-1/anwar.txt222
-rw-r--r--npc/004-1/elanore.txt71
-rw-r--r--npc/005-1/_mobs.txt2
-rw-r--r--npc/005-1/ayasha.txt36
-rw-r--r--npc/005-1/liana.txt97
-rw-r--r--npc/005-1/maya.txt1
-rw-r--r--npc/005-1/sailors.txt64
-rw-r--r--npc/005-1/vincent.txt1
-rw-r--r--npc/005-1/warpcandorbattle.txt12
-rw-r--r--npc/005-1/zegas.txt9
-rw-r--r--npc/005-2-1/_import.txt5
-rw-r--r--npc/005-2-1/_mobs.txt3
-rw-r--r--npc/005-2-1/_warps.txt3
-rw-r--r--npc/005-2-1/note.txt14
-rw-r--r--npc/005-2/_import.txt1
-rw-r--r--npc/005-2/saxsochest.txt41
-rw-r--r--npc/005-2/trapdoor.txt13
-rw-r--r--npc/005-3/barrel.txt4
-rw-r--r--npc/005-4/rosen.txt112
-rw-r--r--npc/005-4/shop.txt16
-rw-r--r--npc/005-4/tolchi.txt6
-rw-r--r--npc/005-5-2/_import.txt0
-rw-r--r--npc/005-5/_import.txt2
-rw-r--r--npc/005-5/_warps.txt2
-rw-r--r--npc/005-5/cynric.txt133
-rw-r--r--npc/005-5/nylo.txt2
-rw-r--r--npc/005-6/morgan.txt68
-rw-r--r--npc/005-6/zitoni.txt147
-rw-r--r--npc/005-7/nurse.txt68
-rw-r--r--npc/005-7/trainer.txt150
-rw-r--r--npc/006-1/_import.txt5
-rw-r--r--npc/006-1/barrier.txt14
-rw-r--r--npc/006-1/crazyfefe.txt283
-rw-r--r--npc/006-1/mapflags.txt3
-rw-r--r--npc/007-1/_import.txt2
-rw-r--r--npc/007-1/_mobs.txt20
-rw-r--r--npc/007-1/_warps.txt4
-rw-r--r--npc/007-1/caelum.txt154
-rw-r--r--npc/007-1/dracoula.txt153
-rw-r--r--npc/007-1/pylon.txt145
-rw-r--r--npc/007-1/torches.txt153
-rw-r--r--npc/007-1/zarkor.txt228
-rw-r--r--npc/008-0/_import.txt6
-rw-r--r--npc/008-0/_mobs.txt7
-rw-r--r--npc/008-0/_warps.txt3
-rw-r--r--npc/008-0/mapflags.txt3
-rw-r--r--npc/008-0/master.txt172
-rw-r--r--npc/008-1/_import.txt5
-rw-r--r--npc/008-1/_mobs.txt23
-rw-r--r--npc/008-1/_warps.txt3
-rw-r--r--npc/008-1/master.txt150
-rw-r--r--npc/008-2/_import.txt5
-rw-r--r--npc/008-2/_mobs.txt28
-rw-r--r--npc/008-2/_warps.txt3
-rw-r--r--npc/008-2/master.txt172
-rw-r--r--npc/009-1/_import.txt6
-rw-r--r--npc/009-1/_mobs.txt14
-rw-r--r--npc/009-1/_warps.txt5
-rw-r--r--npc/009-1/barzil.txt156
-rw-r--r--npc/009-1/charles.txt199
-rw-r--r--npc/009-1/fisherman.txt152
-rw-r--r--npc/009-1/foxhound.txt6
-rw-r--r--npc/009-1/guards.txt14
-rw-r--r--npc/009-1/mapflags.txt2
-rw-r--r--npc/009-2/_import.txt5
-rw-r--r--npc/009-2/_warps.txt4
-rw-r--r--npc/009-2/librarian.txt137
-rw-r--r--npc/009-2/ryan.txt90
-rw-r--r--npc/009-3/_import.txt6
-rw-r--r--npc/009-3/_warps.txt3
-rw-r--r--npc/009-3/barzil.txt28
-rw-r--r--npc/009-3/dangrostra.txt (renamed from npc/009-1/dangrostra.txt)10
-rw-r--r--npc/009-3/kevin.txt146
-rw-r--r--npc/009-4/_import.txt5
-rw-r--r--npc/009-4/_warps.txt3
-rw-r--r--npc/009-4/nurse.txt23
-rw-r--r--npc/009-4/yumi.txt60
-rw-r--r--npc/009-5/_import.txt5
-rw-r--r--npc/009-5/_warps.txt3
-rw-r--r--npc/009-5/joaquim.txt183
-rw-r--r--npc/009-5/luanna.txt30
-rw-r--r--npc/010-1-1/_mobs.txt2
-rw-r--r--npc/010-1-1/_warps.txt1
-rw-r--r--npc/010-1/_mobs.txt8
-rw-r--r--npc/010-1/_warps.txt2
-rw-r--r--npc/010-2/_import.txt1
-rw-r--r--npc/010-2/_mobs.txt12
-rw-r--r--npc/010-2/_warps.txt2
-rw-r--r--npc/010-2/sawis.txt133
-rw-r--r--npc/011-1/_mobs.txt4
-rw-r--r--npc/011-1/manastone.txt35
-rw-r--r--npc/012-1/_import.txt21
-rw-r--r--npc/012-1/_mobs.txt10
-rw-r--r--npc/012-1/_warps.txt13
-rw-r--r--npc/012-1/andrei.txt24
-rw-r--r--npc/012-1/bot.txt86
-rw-r--r--npc/012-1/dyrinthetraveler.txt105
-rw-r--r--npc/012-1/guards.txt480
-rw-r--r--npc/012-1/gwendolyn.txt590
-rw-r--r--npc/012-1/hinnak.txt152
-rw-r--r--npc/012-1/jack.txt179
-rw-r--r--npc/012-1/locamit.txt72
-rw-r--r--npc/012-1/luffyx.txt87
-rw-r--r--npc/012-1/mapflags.txt2
-rw-r--r--npc/012-1/richard.txt14
-rw-r--r--npc/012-1/ship.txt23
-rw-r--r--npc/012-1/shoppakep.txt67
-rw-r--r--npc/012-1/soul-menhir.txt20
-rw-r--r--npc/012-1/statue.txt30
-rw-r--r--npc/012-1/terezin.txt61
-rw-r--r--npc/012-1/wateranimation.txt28
-rw-r--r--npc/012-2/GonzoDark.txt60
-rw-r--r--npc/012-2/Saulc.txt60
-rw-r--r--npc/012-2/_import.txt9
-rw-r--r--npc/012-2/_warps.txt4
-rw-r--r--npc/012-2/door.txt52
-rw-r--r--npc/012-2/helena.txt283
-rw-r--r--npc/012-2/melina.txt60
-rw-r--r--npc/012-2/note.txt26
-rw-r--r--npc/012-3/_import.txt4
-rw-r--r--npc/012-3/_warps.txt3
-rw-r--r--npc/012-3/alan.txt111
-rw-r--r--npc/012-4/_import.txt4
-rw-r--r--npc/012-4/_warps.txt3
-rw-r--r--npc/012-4/wyara.txt (renamed from npc/009-1/kevin.txt)60
-rw-r--r--npc/012-5/_import.txt4
-rw-r--r--npc/012-5/_warps.txt4
-rw-r--r--npc/012-5/nicholas.txt212
-rw-r--r--npc/012-6/_import.txt4
-rw-r--r--npc/012-6/_warps.txt5
-rw-r--r--npc/012-6/nurse.txt23
-rw-r--r--npc/012-7/_import.txt5
-rw-r--r--npc/012-7/_warps.txt3
-rw-r--r--npc/012-7/airlia.txt44
-rw-r--r--npc/012-7/celestia.txt240
-rw-r--r--npc/014-1/_import.txt4
-rw-r--r--npc/014-1/_mobs.txt10
-rw-r--r--npc/014-1/_warps.txt4
-rw-r--r--npc/014-2/_import.txt4
-rw-r--r--npc/014-2/_mobs.txt13
-rw-r--r--npc/014-2/_warps.txt5
-rw-r--r--npc/014-3/_import.txt6
-rw-r--r--npc/014-3/_mobs.txt11
-rw-r--r--npc/014-3/_warps.txt10
-rw-r--r--npc/014-3/fountain.txt137
-rw-r--r--npc/014-3/oscar.txt151
-rw-r--r--npc/014-4/_import.txt6
-rw-r--r--npc/014-4/_mobs.txt7
-rw-r--r--npc/014-4/_warps.txt4
-rw-r--r--npc/014-4/mapflags.txt4
-rw-r--r--npc/014-4/slide.txt20
-rw-r--r--npc/014-5/_import.txt5
-rw-r--r--npc/014-5/_mobs.txt5
-rw-r--r--npc/014-5/_warps.txt3
-rw-r--r--npc/014-5/sign.txt19
-rw-r--r--npc/015-1/_import.txt4
-rw-r--r--npc/015-1/_mobs.txt11
-rw-r--r--npc/015-1/_warps.txt5
-rw-r--r--npc/015-2/_import.txt7
-rw-r--r--npc/015-2/_mobs.txt50
-rw-r--r--npc/015-2/_warps.txt24
-rw-r--r--npc/015-2/contrabandist.txt93
-rw-r--r--npc/015-2/guard.txt71
-rw-r--r--npc/015-2/lordcave.txt27
-rw-r--r--npc/015-3/_import.txt5
-rw-r--r--npc/015-3/_mobs.txt5
-rw-r--r--npc/015-3/_warps.txt7
-rw-r--r--npc/015-3/arkim.txt146
-rw-r--r--npc/015-4/_import.txt4
-rw-r--r--npc/015-4/_mobs.txt6
-rw-r--r--npc/015-4/_warps.txt4
-rw-r--r--npc/016-1/_import.txt6
-rw-r--r--npc/016-1/_mobs.txt3
-rw-r--r--npc/016-1/captain.txt157
-rw-r--r--npc/016-1/doors.txt22
-rw-r--r--npc/016-1/laranja.txt74
-rw-r--r--npc/016-6/_import.txt5
-rw-r--r--npc/016-6/_mobs.txt3
-rw-r--r--npc/016-6/main.txt54
-rw-r--r--npc/016-6/mapflags.txt1
-rw-r--r--npc/016-7/_import.txt5
-rw-r--r--npc/016-7/_mobs.txt3
-rw-r--r--npc/016-7/main.txt50
-rw-r--r--npc/016-7/mapflags.txt1
-rw-r--r--npc/017-1/_import.txt14
-rw-r--r--npc/017-1/_mobs.txt6
-rw-r--r--npc/017-1/_warps.txt13
-rw-r--r--npc/017-1/guards.txt80
-rw-r--r--npc/017-1/mapflags.txt2
-rw-r--r--npc/017-1/misc.txt229
-rw-r--r--npc/017-1/nowhere_man.txt108
-rw-r--r--npc/017-1/paxel.txt185
-rw-r--r--npc/017-1/roger.txt178
-rw-r--r--npc/017-1/shops.txt34
-rw-r--r--npc/017-1/signs.txt106
-rw-r--r--npc/017-1/soul-menhir.txt20
-rw-r--r--npc/017-1/wateranimation.txt23
-rw-r--r--npc/017-2-1/_import.txt4
-rw-r--r--npc/017-2-1/_mobs.txt5
-rw-r--r--npc/017-2-1/_warps.txt4
-rw-r--r--npc/017-2/_import.txt (renamed from npc/005-5-2/_warps.txt)3
-rw-r--r--npc/017-2/_warps.txt4
-rw-r--r--npc/017-3/_import.txt9
-rw-r--r--npc/017-3/_warps.txt9
-rw-r--r--npc/017-3/chef.txt367
-rw-r--r--npc/017-3/dimonds.txt637
-rw-r--r--npc/017-3/doctor.txt182
-rw-r--r--npc/017-3/doug.txt64
-rw-r--r--npc/017-3/loratay.txt1181
-rw-r--r--npc/017-3/model.c45
-rw-r--r--npc/017-3/workers.txt21
-rw-r--r--npc/017-4/_import.txt6
-rw-r--r--npc/017-4/_warps.txt4
-rw-r--r--npc/017-4/pihro.txt104
-rw-r--r--npc/017-4/pyndragon.txt145
-rw-r--r--npc/017-4/refine.txt34
-rw-r--r--npc/017-5/_import.txt5
-rw-r--r--npc/017-5/_warps.txt3
-rw-r--r--npc/017-5/nahrec.txt150
-rw-r--r--npc/017-5/silversmith.txt89
-rw-r--r--npc/017-6/_import.txt5
-rw-r--r--npc/017-6/_warps.txt5
-rw-r--r--npc/017-6/azwell.txt145
-rw-r--r--npc/017-6/sheila.txt47
-rw-r--r--npc/018-1-1/_import.txt4
-rw-r--r--npc/018-1-1/_mobs.txt11
-rw-r--r--npc/018-1-1/_warps.txt3
-rw-r--r--npc/018-1/_import.txt5
-rw-r--r--npc/018-1/_mobs.txt8
-rw-r--r--npc/018-1/_warps.txt4
-rw-r--r--npc/018-1/george.txt176
-rw-r--r--npc/018-2-1/_import.txt4
-rw-r--r--npc/018-2-1/_warps.txt4
-rw-r--r--npc/018-2-1/dustman.txt27
-rw-r--r--npc/018-2/_import.txt4
-rw-r--r--npc/018-2/_mobs.txt7
-rw-r--r--npc/018-2/_warps.txt4
-rw-r--r--npc/018-3-1/_import.txt4
-rw-r--r--npc/018-3-1/_mobs.txt3
-rw-r--r--npc/018-3-1/_warps.txt3
-rw-r--r--npc/018-3/_import.txt4
-rw-r--r--npc/018-3/_mobs.txt20
-rw-r--r--npc/018-3/_warps.txt4
-rw-r--r--npc/018-4-1/_import.txt4
-rw-r--r--npc/018-4-1/_mobs.txt10
-rw-r--r--npc/018-4-1/_warps.txt5
-rw-r--r--npc/018-4-2/_import.txt4
-rw-r--r--npc/018-4-2/_warps.txt5
-rw-r--r--npc/018-4-2/susanne.txt171
-rw-r--r--npc/018-4/_import.txt4
-rw-r--r--npc/018-4/_mobs.txt10
-rw-r--r--npc/018-4/_warps.txt5
-rw-r--r--npc/018-5/_import.txt4
-rw-r--r--npc/018-5/_mobs.txt7
-rw-r--r--npc/018-5/soul_menhir.txt20
-rw-r--r--npc/_import.txt54
-rw-r--r--npc/commands/debug-look.txt38
-rw-r--r--npc/commands/debug-preset.txt247
-rw-r--r--npc/commands/debug-quest.txt68
-rw-r--r--npc/commands/debug.txt37
-rw-r--r--npc/commands/event.txt118
-rw-r--r--npc/commands/exp.txt20
-rw-r--r--npc/commands/ipcheck.txt24
-rw-r--r--npc/commands/kami.txt27
-rw-r--r--npc/commands/language.txt28
-rw-r--r--npc/commands/magic.txt32
-rw-r--r--npc/commands/motd.txt120
-rw-r--r--npc/commands/music.txt23
-rw-r--r--npc/commands/rate-management.txt41
-rw-r--r--npc/commands/resync.txt30
-rw-r--r--npc/commands/scheduled-broadcasts.txt6
-rw-r--r--npc/commands/super-menu.txt44
-rw-r--r--npc/commands/ucp.txt81
-rw-r--r--npc/commands/warp.txt27
-rw-r--r--npc/commands/wgm.txt16
-rw-r--r--npc/config/magic.txt78
-rw-r--r--npc/functions/asklanguage.txt20
-rw-r--r--npc/functions/asleep.txt19
-rw-r--r--npc/functions/bank.txt157
-rw-r--r--npc/functions/beds.txt30
-rw-r--r--npc/functions/clientversion.txt89
-rw-r--r--npc/functions/confused-tree-dict.txt560
-rw-r--r--npc/functions/fishing.txt23
-rw-r--r--npc/functions/game-rules.txt5
-rw-r--r--npc/functions/harbours.txt39
-rw-r--r--npc/functions/hello.txt23
-rw-r--r--npc/functions/legiontalk.txt66
-rw-r--r--npc/functions/main.txt87
-rw-r--r--npc/functions/marriage.txt33
-rw-r--r--npc/functions/masks.txt68
-rw-r--r--npc/functions/mobhunter.txt100
-rw-r--r--npc/functions/mobpoint.txt23
-rw-r--r--npc/functions/mouboofunc.txt89
-rw-r--r--npc/functions/news.txt200
-rw-r--r--npc/functions/nurse.txt89
-rw-r--r--npc/functions/openbook.txt15
-rw-r--r--npc/functions/permissions.txt4
-rw-r--r--npc/functions/quest-debug/functions.txt109
-rw-r--r--npc/functions/random-talk.txt184
-rw-r--r--npc/functions/refine.txt224
-rw-r--r--npc/functions/sailordialogue.txt53
-rw-r--r--npc/functions/sailortalk.txt33
-rw-r--r--npc/functions/scoreboards.txt45
-rw-r--r--npc/functions/seasons.txt143
-rw-r--r--npc/functions/shake.txt39
-rw-r--r--npc/functions/soul_menhir.txt15
-rw-r--r--npc/functions/string.txt3
-rw-r--r--npc/functions/time.txt12
-rw-r--r--npc/functions/timer.txt11
-rw-r--r--npc/functions/util.txt308
-rw-r--r--npc/functions/villagertalk.txt53
-rw-r--r--npc/functions/weather.txt189
-rw-r--r--npc/items/books.txt149
-rw-r--r--npc/items/croconut.txt40
-rw-r--r--npc/items/rand_sc_heal.txt3
-rw-r--r--npc/items/shovel.txt176
-rw-r--r--npc/items/teleporter.txt66
-rw-r--r--npc/magic/kalmurk.txt64
-rw-r--r--npc/magic/parum.txt72
-rw-r--r--npc/magic/zarkor.txt57
-rw-r--r--npc/scripts.conf85
-rw-r--r--npc/sec_pri/_import.txt1
-rw-r--r--npc/sec_pri/mapflags.txt1
-rw-r--r--npc/soren-2/_import.txt2
-rw-r--r--npc/soren-2/_warps.txt2
-rw-r--r--npc/soren-2/main.txt224
-rw-r--r--npc/soren-2/mapflags.txt1
-rw-r--r--npc/soren/_import.txt4
-rw-r--r--npc/soren/_mobs.txt8
-rw-r--r--npc/soren/main.txt485
-rw-r--r--npc/soren/mapflags.txt1
-rw-r--r--npc/test/_import.txt4
-rw-r--r--npc/test/_mobs.txt2
-rw-r--r--npc/test/hinnack.txt76
-rw-r--r--npc/test/npc1.txt4
-rw-r--r--npc/test/npc2.txt35
-rw-r--r--npc/test/npc6.txt23
-rw-r--r--npc/test/npcmarriage.txt19
-rw-r--r--npc/test/rock.txt5
482 files changed, 26978 insertions, 3904 deletions
diff --git a/npc/000-0-0/sailors.txt b/npc/000-0-0/sailors.txt
index 70b279f1e..d89dfd7a0 100644
--- a/npc/000-0-0/sailors.txt
+++ b/npc/000-0-0/sailors.txt
@@ -1,3 +1,5 @@
+// TMW2 Script
+// Modified by Jesusalva
// Evol scripts.
// Authors:
// Ablu
@@ -6,10 +8,12 @@
// Description:
// Introduction scene where two sailors talk about how the player was found on his raft.
// Elmo will handle dialogs between both NPCs. Modified for TMW2 by Jesusalva
-
+// Translation
+// FR translated
000-0-0,26,23,0 script Elmo#sailors NPC_ELMO,{
OnTalk:
+ deltimer("Elmo#sailors::OnSlow");
setcamnpc;
showavatar NPC_ELMO;
mesn "Elmo";
@@ -18,17 +22,7 @@ OnTalk:
showavatar NPC_MAGIC_ARPAN;
mesn "Magic Arpan";
- mesq lg("Yaya, it certainly was not from a trade ship, but it doesn't looks like it was from a pirate ship either.");
- next;
-
- showavatar NPC_ELMO;
- mesn "Elmo";
- mesq l("It could be from a warship to a random civilian vessel. Well, this is not important now.");
- next;
-
- showavatar NPC_MAGIC_ARPAN;
- mesn "Magic Arpan";
- mesq l("Yeye.");
+ mesq lg("Yaya, it certainly was not from a trade ship, but it doesn't looks like it was from a pirate ship either. Well, that's not important now.");
next;
showavatar NPC_ELMO;
@@ -67,18 +61,32 @@ OnTalk:
showavatar;
mesn "Narrator";
- mes col(l("It seems like you're finally safe. You shut your eyes and fall asleep."), 9);
+ mesc l("It seems like you're finally safe. You shut your eyes and fall asleep.");
+ mesc l("(Protip: Use arrow keys to walk around once you wake up.)");
next;
restorecam;
adddefaultskills;
setq General_Narrator, 0;
percentheal 100,100;
+ addtimer(45000,"Magic Arpan::OnSlow");
warp "002-1", 53, 38;
savepoint "002-1", 55, 40;
closedialog;
close;
+OnSlow:
+ setcamnpc;
+ showavatar NPC_ELMO;
+ mesn;
+ mesc l("Pst, speak lower, @@ may hear us...", strcharinfo(0));
+ next;
+ mesn;
+ mesc l("(Click on me to hear the conversation and advance. I am a NPC, and NPCs can be interact by clicking.)");
+ mesc l("(By the way, it is rude to not listen when people are speaking to you. Read the dialogs! Important stuff can be found on them.)"), 1;
+ addtimer(30000,"Elmo#sailors::OnSlow");
+ close;
+
OnInit:
.sex = G_MALE;
end;
diff --git a/npc/000-0/sailors.txt b/npc/000-0/sailors.txt
index c537ed128..eec439693 100644
--- a/npc/000-0/sailors.txt
+++ b/npc/000-0/sailors.txt
@@ -1,3 +1,6 @@
+// TMW2 Script
+// Modified by Jesusalva
+
// Evol scripts.
// Authors:
// 4144
@@ -7,6 +10,8 @@
// Jesusalva
// Description:
// Starting script of Evol Online, modified for TMW2.
+// Translation:
+// FR Translated
000-0,23,20,0 script Sailors NPC_SAILORS,6,6,{
@@ -18,15 +23,14 @@ OnTouch:
showavatar 3;
mesn "Narrator";
- mes col(l("You open your eyes. The salt water is not helping your vision."), 9);
- next;
- mes col(l("A blur shape forms in your front. It seems to be a large ship."), 9);
+ mesc l("You open your eyes. The salt water is not helping your vision.");
+ mesc l("(Click next button to advance dialogs)");
next;
- mes col(l("Wait. A ship? Where are you, after all?"), 9);
+ mesc l("A blur shape forms in your front. It seems to be a large ship.");
next;
- mes col(l("Your body aches. You can't remember what happened."), 9);
+ mesc l("Wait. A ship? Where are you, after all?");
next;
- mes col(l("But this is not important now. The ships sailors are shouting at you!"), 9);
+ mesc l("Your body aches. You can't remember what happened. But this is not important now. The ships sailors are shouting at you!");
next;
showavatar NPC_ORC_MAN;
@@ -70,13 +74,13 @@ OnTouch:
showavatar;
mesn "Narrator";
- mes col(l("The sailors take you aboard their ship."), 9);
- next;
- mes col(l("You faint from the pain. At least now, you are in good hands."), 9);
+ mesc l("The sailors take you aboard their ship.");
+ mesc l("You faint from the pain, but at least now, you are in good hands.");
next;
- mes col(l("Click on the NPCs (Non-Player Characters) around you to continue the introduction."), 9);
+ mesc l("Click on the NPCs (Non-Player Characters) around you to continue the introduction.");
next;
+ addtimer(15000,"Elmo#sailors::OnSlow");
warp "000-0-0", 26, 28;
closedialog;
diff --git a/npc/00000SAVE/003-1_stranger.c b/npc/00000SAVE/003-1_stranger.c
new file mode 100644
index 000000000..8323756f9
--- /dev/null
+++ b/npc/00000SAVE/003-1_stranger.c
@@ -0,0 +1,533 @@
+003-1,35,25,0 script Stranger NPC192,{
+ @month = 5;
+ @start_day = 18;
+ @end_day = 25;
+ @iRONINGOT = 5;
+ @PINKANTENNA = 21;
+ @Exp = 20000;
+
+ if (FLAGS & FLAG_TOWEL_COMPLETED) goto L_Event_Done;
+ 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 < 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 @easy_questions$,
+ "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 @easy_answers_amount,2,2,2,2,2,4,4,2,4,2;
+
+ @random = rand(10);
+ mes "\"" + @easy_questions$[@random] + "\"";
+ input @answer$;
+
+ if (@easy_answers_amount[@random] < 4)
+ goto L_Easy_Skip4;
+ @quizparam$ = "towelanswer0" + @random + "d";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Easy;
+ goto L_Easy_Skip4;
+
+L_Easy_Skip4:
+ if (@easy_answers_amount[@random] < 3)
+ goto L_Easy_Skip3;
+ @quizparam$ = "towelanswer0" + @random + "c";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Easy;
+ goto L_Easy_Skip3;
+
+L_Easy_Skip3:
+ @quizparam$ = "towelanswer0" + @random + "b";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Easy;
+
+ @quizparam$ = "towelanswer0" + @random + "a";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Easy;
+
+ goto L_Wrong_Answer;
+
+L_Right_Answer_Easy:
+ mes "[Stranger]";
+ mes "\"You're absolutely right. The next one will be more tricky.\"";
+ next;
+
+ setarray @medium_questions$,
+ "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 @medium_answers_amount,2,2,2,2,2,3,2,2,4,4,2,2;
+
+ @random = rand(12);
+ mes "\"" + @medium_questions$[@random] + "\"";
+ input @answer$;
+
+ if (@medium_answers_amount[@random] < 4)
+ goto L_Medium_Skip4;
+
+ @quizparam$ = "towelanswer1" + @random + "d";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Medium;
+ goto L_Medium_Skip4;
+
+L_Medium_Skip4:
+ if (@medium_answers_amount[@random] < 3)
+ goto L_Medium_Skip3;
+ @quizparam$ = "towelanswer1" + @random + "c";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Medium;
+ goto L_Medium_Skip3;
+
+L_Medium_Skip3:
+ @quizparam$ = "towelanswer1" + @random + "b";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Medium;
+
+ @quizparam$ = "towelanswer1" + @random + "a";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Medium;
+
+ goto L_Wrong_Answer;
+
+L_Right_Answer_Medium:
+ mes "[Stranger]";
+ mes "\"Not bad, not bad. Let's see if you can answer an even more difficult one.\"";
+ next;
+
+ setarray @hard_questions$,
+ "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 @hard_answers_amount,4,2,2,2,2,2,2,4,2;
+
+ @random = rand(9);
+ mes "\"" + @hard_questions$[@random] + "\"";
+ input @answer$;
+
+ if (@hard_answers_amount[@random] < 4)
+ goto L_Hard_Skip4;
+ @quizparam$ = "towelanswer2" + @random + "d";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Hard;
+ goto L_Hard_Skip4;
+
+L_Hard_Skip4:
+ if (@hard_answers_amount[@random] < 3)
+ goto L_Hard_Skip3;
+ @quizparam$ = "towelanswer2" + @random + "c";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Hard;
+ goto L_Hard_Skip3;
+
+L_Hard_Skip3:
+ @quizparam$ = "towelanswer2" + @random + "b";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Hard;
+
+ @quizparam$ = "towelanswer2" + @random + "a";
+ callfunc "StrangerQuiz";
+ if (("###" + @answer$ == @quizanswer$))
+ goto L_Right_Answer_Hard;
+
+ goto L_Wrong_Answer;
+
+L_Right_Answer_Hard:
+ 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?\"";
+ input @answer$;
+ if (@answer$ != "Towel" && @answer$ != "towel")
+ 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
+ getitem "HitchhikersTowel", 1;
+ 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 (countitem("HitchhikersTowel") > 0)
+ 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_Dye_Towel,
+ "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_Dye_Towel,
+ "No, thanks.", L_close;
+
+L_Dye_Towel:
+ mes "[Stranger]";
+ mes "\"Alright, which color do you want?\"";
+ menu
+ "Red",L_Red,
+ "Yellow",L_Yellow,
+ "White",L_White,
+ "Orange",L_Orange,
+ "Pink",L_Pink,
+ "I changed my mind.", L_close;
+
+L_Red:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Ruby Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("RubyPowder") < 2) goto L_No_Powder;
+ delitem "RubyPowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "RedHitchhikersTowel", 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_Yellow:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Topaz Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("TopazPowder") < 2) goto L_No_Powder;
+ delitem "TopazPowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "YellowHitchhikersTowel", 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_White:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Diamond Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("DiamondPowder") < 2) goto L_No_Powder;
+ delitem "DiamondPowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "WhiteHitchhikersTowel", 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_Blue:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Sapphire Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("SapphirePowder") < 2) goto L_No_Powder;
+ delitem "SapphirePowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "BlueHitchhikersTowel", 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_Green:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Emerald Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("EmeraldPowder") < 2) goto L_No_Powder;
+ delitem "EmeraldPowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "GreenHitchhikersTowel", 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_Purple:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need two bags of Amethyst Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("AmethystPowder") < 2) goto L_No_Powder;
+ delitem "AmethystPowder", 2;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "PurpleHitchhikersTowel", 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_Orange:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need one bag of Ruby Powder, one bag of Topaz Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("RubyPowder") < 1) goto L_No_Powder;
+ if (countitem("TopazPowder") < 1) goto L_No_Powder;
+ delitem "RubyPowder", 1;
+ delitem "TopazPowder", 1;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "OrangeHitchhikersTowel", 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_Pink:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need one bag of Ruby Powder, one bag of Diamond Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("RubyPowder") < 1) goto L_No_Powder;
+ if (countitem("DiamondPowder") < 1) goto L_No_Powder;
+ delitem "RubyPowder", 1;
+ delitem "DiamondPowder", 1;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "PinkHitchhikersTowel", 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_Lime:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need one bag of Emerald Powder, one bag of Topaz Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("EmeraldPowder") < 1) goto L_No_Powder;
+ if (countitem("TopazPowder") < 1) goto L_No_Powder;
+ delitem "EmeraldPowder", 1;
+ delitem "TopazPowder", 1;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "LimeHitchhikersTowel", 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_Teal:
+ mes "[Stranger]";
+ mes "\"Ok, I'll need one bag of Emerald Powder, one bag of Sapphire Powder and a bottle of water for that.\"";
+ next;
+ if (countitem("HitchhikersTowel") < 1) goto L_No_Towel;
+ getinventorylist;
+ if ((countitem("HitchhikersTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
+ if (countitem("BottleOfWater") < 1) goto L_No_Water;
+ if (countitem("EmeraldPowder") < 1) goto L_No_Powder;
+ if (countitem("SapphirePowder") < 1) goto L_No_Powder;
+ delitem "EmeraldPowder", 1;
+ delitem "SapphirePowder", 1;
+ delitem "HitchhikersTowel", 1;
+ delitem "BottleOfWater", 1;
+ getitem "TealHitchhikersTowel", 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:
+ @month = 0;
+ @start_day = 0;
+ @end_day = 0;
+ @iRONINGOT = 0;
+ @PINKANTENNA = 0;
+ @Exp = 0;
+ @random = 0;
+ @quizparam$ = "";
+ close;
+}
diff --git a/npc/00000SAVE/005-4_bossfight.c b/npc/00000SAVE/005-4_bossfight.c
new file mode 100644
index 000000000..334c2830f
--- /dev/null
+++ b/npc/00000SAVE/005-4_bossfight.c
@@ -0,0 +1,204 @@
+
+005-4,36,19,0 script Switch#elecave NPC400,{
+ if ($@ELE_CAVE_STATUS != 0) goto L_Enjoy;
+
+ mes "*You see a switch, it is flipped off*";
+ menu "No, I am NOT flipping the switch... thats final.", L_Exit,
+ "Ha! What's the worst that could happen?", L_Flip;
+
+L_Flip:
+ mes "*As you flip the switch, the cave starts to rumble*";
+
+ if ($@ELE_CAVE_STATUS != 0) goto L_Enjoy; // Prevent from starting level 1 from two different players
+
+ $@ELE_CAVE_STATUS = 1;
+ $@ELE_CAVE_PLAYER_COUNT = getmapusers("005-4");
+
+ startnpctimer;
+
+L_Start_Level_1:
+ $@ELE_CAVE_LEVEL = 1;
+
+ mapannounce "005-4", "Level 1 starting", 0;
+
+ // Random colors for everyone!
+ areatimer "005-4", 19, 19, 54, 37, 10, "Switch#elecave::OnChaos";
+
+ // Two red, two blue.
+ areamonster "005-4", 19, 19, 54, 37, "", 1080, 2, "Switch#elecave::OnBlueDeath";
+ areamonster "005-4", 19, 19, 54, 37, "", 1081, 2, "Switch#elecave::OnRedDeath";
+ goto L_Exit; // This one is triggered on talking to the switch.
+
+L_Enjoy:
+ mes "*As you get ready to touch the switch, a spark of the opposite color flys to you. But oddly it doesn't hurt at all.*";
+
+ if (@ELE_CAVE_COLOR == 1) goto L_Set_Blue;
+ if (@ELE_CAVE_COLOR == 2) goto L_Set_Red;
+
+L_Set_Red:
+ @ELE_CAVE_COLOR = 1;
+ goto L_Exit;
+L_Set_Blue:
+ @ELE_CAVE_COLOR = 2;
+ goto L_Exit;
+
+
+L_Exit:
+ close;
+ end;
+
+
+OnTimer3000:
+ setnpctimer 0;
+
+ // We stop if no live players are around
+ if ($@ELE_CAVE_PLAYER_COUNT == 0) goto L_CleanUp;
+ set $@ELE_CAVE_PLAYER_COUNT, 0; // The onTick refills this with a live count
+
+ // We punish them for having a different count (Aka need kill them at the same time)
+ $@ELE_CAVE_RED_COUNT = mobcount("005-4","Switch#elecave::OnRedDeath") + 1;
+ $@ELE_CAVE_BLUE_COUNT = mobcount("005-4","Switch#elecave::OnBlueDeath") + 1;
+
+ $@ELE_CAVE_DIFF = 0;
+ if ($@ELE_CAVE_RED_COUNT > $@ELE_CAVE_BLUE_COUNT) goto L_More_Red;
+ if ($@ELE_CAVE_RED_COUNT < $@ELE_CAVE_BLUE_COUNT) goto L_More_Blue;
+
+ if ($@ELE_CAVE_LAST_MESSAGE != 0) mapannounce "005-4", "The ions are once again balanced. Try to kill a red and blue at the same time.", 0;
+ $@ELE_CAVE_LAST_MESSAGE = 0;
+
+ goto L_Next_Step;
+
+L_More_Red:
+ $@ELE_CAVE_DIFF = $@ELE_CAVE_RED_COUNT - $@ELE_CAVE_BLUE_COUNT;
+ if ($@ELE_CAVE_LAST_MESSAGE != 1) mapannounce "005-4", "There are too many red ions in the air! Kill more red sparks!", 0;
+ $@ELE_CAVE_LAST_MESSAGE = 1;
+ goto L_Next_Step;
+
+L_More_Blue:
+ $@ELE_CAVE_DIFF = $@ELE_CAVE_BLUE_COUNT - $@ELE_CAVE_RED_COUNT;
+ if ($@ELE_CAVE_LAST_MESSAGE != 2) mapannounce "005-4", "There are too many blue ions in the air! Kill more blue sparks!", 0;
+ $@ELE_CAVE_LAST_MESSAGE = 2;
+ goto L_Next_Step;
+
+L_Next_Step:
+ // Basic per player logic
+ areatimer "005-4", 19, 19, 54, 37, 10, "Switch#elecave::OnTick";
+
+ if ($@ELE_CAVE_RED_COUNT == 0 && $@ELE_CAVE_BLUE_COUNT == 0) goto L_Next_Level;
+
+ end;
+
+L_Next_Level:
+ if ($@ELE_CAVE_LEVEL == 1) goto L_Start_Level_2;
+ if ($@ELE_CAVE_LEVEL == 2) goto L_Start_Level_3;
+ if ($@ELE_CAVE_LEVEL == 3) goto L_CleanUp;
+ end;
+
+L_Start_Level_2:
+ $@ELE_CAVE_LEVEL = 2;
+
+ mapannounce "005-4", "Level 2 starting", 0;
+
+ // Random colors for everyone!
+ areatimer "005-4", 19, 19, 54, 37, 10, "Switch#elecave::OnChaos";
+
+ // four red, four blue.
+ areamonster "005-4", 19, 19, 54, 37, "", 1080, 4, "Switch#elecave::OnBlueDeath";
+ areamonster "005-4", 19, 19, 54, 37, "", 1081, 4, "Switch#elecave::OnRedDeath";
+ end;
+
+L_Start_Level_3:
+ $@ELE_CAVE_LEVEL = 3;
+
+ mapannounce "005-4", "Level 3 starting", 0;
+
+ // Random colors for everyone!
+ areatimer "005-4", 19, 19, 54, 37, 10, "Switch#elecave::OnChaos";
+
+ // eight red, eight blue.
+ areamonster "005-4", 19, 19, 54, 37, "", 1080, 8, "Switch#elecave::OnBlueDeath";
+ areamonster "005-4", 19, 19, 54, 37, "", 1081, 8, "Switch#elecave::OnRedDeath";
+ end;
+
+
+OnChaos:
+ if (ispcdead()) end;
+L_Set_Color:
+ message strcharinfo(0), "You feel funny. You think your color has changed.";
+ @ELE_CAVE_COLOR = rand(1, 2);
+ end;
+
+OnTick:
+ if (ispcdead()) end;
+
+ // Count this player as alive
+ $@ELE_CAVE_PLAYER_COUNT = $@ELE_CAVE_PLAYER_COUNT + 1;
+
+ @drainamount = MaxHp / -20;
+
+ if ($@ELE_CAVE_DIFF != 0) heal @drainamount * $@ELE_CAVE_DIFF, 0;
+
+ // Make sure they have a color
+ if (@ELE_CAVE_COLOR == 0) goto L_Set_Color;
+
+ if (@ELE_CAVE_COLOR == 1) goto L_Do_Red;
+ if (@ELE_CAVE_COLOR == 2) goto L_Do_Blue;
+
+ end;
+
+L_Do_Red:
+ specialeffect2 114; // Red effects
+
+ if (isin("005-4", 42, 19, 54, 32)) goto L_Heal;
+ if (isin("005-4", 32, 19, 54, 37)) end;
+ message strcharinfo(0), "Sparks are flying between you and a piller. Maybe you should stand near a piller with the same color as you.";
+ heal MaxHp / -6, 0;
+
+ end;
+
+L_Do_Blue:
+ specialeffect2 115; // Blue effects
+
+ if (isin("005-4", 19, 19, 31, 32)) goto L_Heal;
+ if (isin("005-4", 19, 19, 41, 37)) end;
+ message strcharinfo(0), "Sparks are flying between you and a piller. Maybe you should stand near a piller with the same color as you";
+ heal MaxHp / -6, 0;
+
+ end;
+
+L_Heal:
+ heal MaxHp / 20, 0;
+ end;
+
+OnBlueDeath:
+ // Blue players have to kill blue sparks
+ if (@ELE_CAVE_COLOR == 2) end;
+ message strcharinfo(0), "The dying spark reacts explosively with you. You should only kill sparks with the same color as you.";
+ heal MaxHp / -2, 0;
+ end;
+
+OnRedDeath:
+ // Red players have to kill red sparks
+ if (@ELE_CAVE_COLOR == 1) end;
+ message strcharinfo(0), "The dying spark reacts explosively with you. You should only kill sparks with the same color as you.";
+ heal MaxHp / -2, 0;
+ end;
+
+OnInit:
+ if (debug >= 2) end;
+ initnpctimer;
+ stopnpctimer;
+L_CleanUp:
+ $@ELE_CAVE_LAST_MESSAGE = 0;
+ $@ELE_CAVE_STATUS = 0;
+ $@ELE_CAVE_PLAYER_COUNT = 0;
+ $@ELE_CAVE_LEVEL = 0;
+ $@ELE_CAVE_ROUND_TIMER = 0;
+
+ killmonster "005-4", "Switch#elecave::OnBlueDeath";
+ killmonster "005-4", "Switch#elecave::OnRedDeath";
+
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+}
diff --git a/npc/00000SAVE/018-2_petsales.txt b/npc/00000SAVE/018-2_petsales.txt
new file mode 100644
index 000000000..71b8f536a
--- /dev/null
+++ b/npc/00000SAVE/018-2_petsales.txt
@@ -0,0 +1,280 @@
+
+018-2,122,23,0 script Pet Detective NPC160,{
+
+
+ mes "[Ace Ventura]";
+ mes "\"Hello, I heard you were wanting a pet to help you in your adventures.\"";
+ mes "\"I know that because I am a pet detective and other adventurers said you may want to adopt a pet.\"";
+ next;
+ mes "\"We have the very best and healthiest animals.\"";
+ mes "\"Are you interested in adopting one or more of these fine pets?\"";
+ next;
+ if(HWQUEST9 == 1) goto L_MagCat;
+ goto L_Adoptmenu;
+
+L_Adoptmenu:
+ mes "[Ace Ventura]";
+ mes "\"Tell me which one of the pets you want to adopt.\"";
+ next;
+
+ menu
+ "I would like to have a dog!", L_Dog,
+ "Got any cats?", L_Cat,
+ "Hmmm... I'd like a rat...", L_Rat,
+ "On second thought, I don't really want that responsibility right now.", L_close;
+
+L_Dog:
+ mes "[Ace Ventura]";
+ mes "\"A dog? OK... for one of our fine dogs you will need to bring me\"";
+ mes "\"20 animal bones, 15 steaks, 10 raw logs, and 100,000 GP.\"";
+ next;
+ mes "\"A well trained dog, will help you improve your strength too.\"";
+
+ menu
+ "Sure, I believe a trained dog will make me stronger.", L_dog2,
+ "What a ripoff! No way! They would probably bite me anyways!", L_close;
+
+L_Cat:
+ mes "[Ace Ventura]";
+ mes "\"Why yes, We do have cats. Fast and frisky ones too!\"";
+ mes "\"You will be amazed at the speed of these fine animals.\"";
+ next;
+ mes "\"I guarantee they will make you feel faster and more agile in battle.\"";
+ mes "\"A great deal for only 10 animal bones, 10 steaks, 15 cartons of milk and 100,000 GP.\"";
+
+ menu
+ "Yes, I could use more agility.", L_cat2,
+ "No thanks, I like being slow.", L_close;
+
+L_Rat:
+ mes "[Ace Ventura]";
+ mes "\"Rats are so cool!\"";
+ mes "\"The ones I have here will really help your Dexterity.\"";
+ next;
+ mes "\"They cost 15 animal bones, 10 steaks, 20 bottles of water, and 100,000 GP.\"";
+ mes "\"Now that you know how valuable they are, would you like to have one?\"";
+
+ menu
+ "Sure, The rat is just what I need.", L_rat2,
+ "Whoa, that's way too much for a rat.", L_close;
+
+L_dog2:
+ if (countitem("AnimalBones") < 20) goto L_Missing;
+ if (countitem("Steak") < 15) goto L_Missing;
+ if (countitem("RawLog") < 10) goto L_Missing;
+ if (Zeny < 100000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("AnimalBones") > 20 && countitem("Steak") > 15) goto L_Full;
+ delitem "AnimalBones", 20;
+ delitem "Steak", 15;
+ delitem "RawLog", 10;
+ Zeny = Zeny - 100000;
+ getitem "Hound", 1;
+ mes "[Ace Ventura]";
+ mes "\"Enjoy your dog! Do you want to adopt another pet?\"";
+
+ menu
+ "Yes, I would.", L_Adoptmenu,
+ "Nope, not today. I want to have time to train my new dog.", L_close;
+
+L_cat2:
+ if (countitem("AnimalBones") < 10) goto L_Missing;
+ if (countitem("Steak") < 10) goto L_Missing;
+ if (countitem("Milk") < 15) goto L_Missing;
+ if (Zeny < 100000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("AnimalBones") > 10 && countitem("Steak") > 10) goto L_Full;
+ delitem "AnimalBones", 10;
+ delitem "Steak", 10;
+ delitem "Milk", 15;
+ Zeny = Zeny - 100000;
+ getitem "Cat", 1;
+ mes "[Ace Ventura]";
+ mes "\"Now here is a frisky white cat! Do you want to adopt another pet?\"";
+
+ menu
+ "Yes, I do.", L_Adoptmenu,
+ "No thank you, I think the cat is all I need for now", L_No;
+
+L_rat2:
+ if (countitem("AnimalBones") < 15) goto L_Missing;
+ if (countitem("Steak") < 10) goto L_Missing;
+ if (countitem("BottleOfWater") < 20) goto L_Missing;
+ if (Zeny < 100000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("AnimalBones") > 15 && countitem("Steak") > 10) goto L_Full;
+ delitem "AnimalBones", 15;
+ delitem "Steak", 10;
+ delitem "BottleOfWater", 20;
+ Zeny = Zeny - 100000;
+ getitem "Rat", 1;
+ mes "[Ace Ventura]";
+ mes "\"Here is your fine pet! Do you want to purchase any other pet?\"";
+
+ menu
+ "Yes, I do.", L_Adoptmenu,
+ "No, Thanks. I really want to see this rat attack!", L_No;
+ goto L_close;
+
+L_MagCat:
+ mes "[Ace Ventura]";
+ mes "\"Just a moment... Aren't you a Halloween Quest Adventurer? This is your lucky day!\"";
+ mes "\"I just received a shipment of rare magical pets.\"";
+ mes "\"They are so new, I haven't even had time to open the crates\"";
+ next;
+ mes "\"I can tell you that these pets are very rare and will not last very long.\"";
+ mes "\"Are you interested in getting one of them?\"";
+
+ menu
+ "Yes, Let me have one!.", L_YesBcat,
+ "Not Really.", L_EndSoon,
+ "I would really like a different pet.", L_Adoptmenu;
+ goto L_close;
+
+L_YesBcat:
+ if (HW_Bcat == 1) goto L_OnlyOne;
+ if (HW_Bcat == 2) goto L_NoMoreForYou;
+ mes "[Ace Ventura]";
+ mes "\"These RARE pets normally sell for 750,000 GP and are limited to one per customer, however during this Halloween Season...\"";
+ next;
+ mes "\".. If you bring me the following items and 60,000 GP, I will let you have one of them.\"";
+ mes "\"50 Marshmallows, 50 Candy Pumpkins, 20 Lifestones, 4 Jack-O-Lanterns, 3 Jars of Blood, 2 Rubber Bats and one rare Black Pearl.\"";
+
+ menu
+ "I have what you need", L_GetBcat,
+ "I don't have everything you need. I will come back.", L_EndSoon,
+ "I changed my mind, I don't really want one.", L_EndSoon,
+ "I think I want a different pet?", L_Adoptmenu;
+ goto L_close;
+
+L_GetBcat:
+ if (countitem("Marshmallow") < 50) goto L_Missing;
+ if (countitem("CandyPumpkin") < 50) goto L_Missing;
+ if (countitem("Lifestone") < 20) goto L_Missing;
+ if (countitem("JackOLantern") < 4) goto L_Missing;
+ if (countitem("RubberBat") < 2) goto L_Missing;
+ if (countitem("JarofBlood") < 3) goto L_Missing;
+ if (countitem("BlackPearl") < 1) goto L_MissingPearl;
+ if (Zeny < 60000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("Marshmallow") > 50 && countitem("CandyPumpkin") > 50 && countitem("Lifestone") > 20 && countitem("JackOLantern") > 4 && countitem("JarofBlood") > 3 && countitem("RubberBat") > 2 && countitem("BlackPearl") > 1) goto L_Full;
+ delitem "Marshmallow", 50;
+ delitem "CandyPumpkin", 50;
+ delitem "Lifestone", 20;
+ delitem "JackOLantern", 4;
+ delitem "JarofBlood", 3;
+ delitem "RubberBat", 2;
+ delitem "BlackPearl", 1;
+ Zeny = Zeny - 60000;
+ getitem "BlackCat", 1;
+ HW_Bcat = 1;
+ mes "[Ace Ventura]";
+ mes "\"Wonderful! Here is your very own RARE and Magical...\"";
+ next;
+ mes "\"Black Cat!\"";
+ goto L_close;
+
+L_EndSoon:
+ mes "[Ace Ventura]";
+ mes "\"OK, Fine, but don't come crying to me when they are all gone.\"";
+ mes "\"These Rare Pets were ordered especially for the Halloween Event.\"";
+ mes "\"so when it is over, There may be no more to adopt.\"";
+ goto L_close;
+
+L_Full:
+ mes "[Ace Ventura]";
+ mes "\"Looks like you can't carry anything else in the your inventory, come back when you've made some room.\"";
+ goto L_close;
+
+L_Missing:
+ mes "[Ace Ventura]";
+ mes "\"It looks like you're missing some items. Please come back when you have what is needed!\"";
+ goto L_close;
+
+L_MissingPearl:
+ mes "[Ace Ventura]";
+ mes "\"It looks like you're missing the rare Black Pearl. You might win one from one of\"";
+ mes "\"the Halloween NPCs.(The Creepy Surgeon)..Hmm...I think...\"";
+ next;
+ mes "\"someone told me that they bought one from the Indian named Exotic Trader.\"";
+ mes "\"I know he is over at Oscar's farm, today.\"";
+ next;
+ mes "\"The adventure did not say how much they cost,\"";
+ mes "\"however I suspect the Black Pearl is an expensive rare item.\"";
+ next;
+ mes "\"Please come back when you have the Black Pearl.\"";
+ goto L_close;
+
+L_NotEnoughMoney:
+ mes "[Ace Ventura]";
+ mes "\"You don't have enough money, come back later!\"";
+ goto L_close;
+
+L_No:
+ mes "[Ace Ventura]";
+ mes "\"Have a great day, and enjoy you new pet!\"";
+ goto L_close;
+
+L_OnlyOne:
+ mes "[Ace Ventura]";
+ mes "\" I am afraid you can not have another Rare Pet, They are all gone...\"";
+ next;
+ mes "\"However, I might be able to special order you one.\"";
+
+ menu
+ "Yes, I would like to order one.", L_BuyBcat,
+ "No, Thanks.", L_close;
+
+L_BuyBcat:
+ mes "[Ace Ventura]";
+ mes "\"The RARE pets sells for 750,000 GP.\"";
+ next;
+ mes "\"Bring me the following items and 750,000 GP and then I will let you have one.\"";
+ mes "\"50 Marshmallows, 50 Candy Pumpkins, 20 Lifestones, 4 Jack-O-Lanterns, 3 Jars of Blood, 2 Rubber Bats and 1 rare Black Pearl.\"";
+
+ menu
+ "OK I have what you need.", L_SpecialBuy,
+ "No, I have changed my mind.", L_close;
+ goto L_close;
+
+L_SpecialBuy:
+ if (countitem("Marshmallow") < 50) goto L_Missing;
+ if (countitem("CandyPumpkin") < 50) goto L_Missing;
+ if (countitem("Lifestone") < 20) goto L_Missing;
+ if (countitem("JackOLantern") < 4) goto L_Missing;
+ if (countitem("RubberBat") < 2) goto L_Missing;
+ if (countitem("JarofBlood") < 3) goto L_Missing;
+ if (countitem("BlackPearl") < 1) goto L_MissingPearl;
+ if (Zeny < 750000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("Marshmallow") > 50 && countitem("CandyPumpkin") > 50 && countitem("Lifestone") > 20 && countitem("JackOLantern") > 4 && countitem("JarofBlood") > 3 && countitem("RubberBat") > 2 && countitem("BlackPearl") > 1) goto L_Full;
+ delitem "Marshmallow", 50;
+ delitem "CandyPumpkin", 50;
+ delitem "Lifestone", 20;
+ delitem "JackOLantern", 4;
+ delitem "JarofBlood", 3;
+ delitem "RubberBat", 2;
+ delitem "BlackPearl", 1;
+ Zeny = Zeny - 750000;
+ getitem "BlackCat", 1;
+ HW_Bcat = 2;
+ mes "[Ace Ventura]";
+ mes "\"Wonderful! Here is your very own RARE and Magical...\"";
+ next;
+ mes "\"Black Cat!\"";
+ goto L_close;
+
+L_NoMoreForYou:
+ mes "[Ace Ventura]";
+ mes "\"Nice to see you again. You're the Adventurer who special ordered a Rare Pet from me..\"";
+ mes "\"Unfortunately all of the Rare Pets have been adopted.\"";
+ next;
+ mes "\"I hope you and you pet are doing well.\"";
+ mes "\"Those pets are so rare, I doubt if we will ever see them again.\"";
+ goto L_close;
+
+L_close:
+ mes "[Ace Ventura]";
+ mes "\"Goodbye Adventurer!\"";
+ close;
+}
diff --git a/npc/00000SAVE/020-1_well.txt b/npc/00000SAVE/020-1_well.txt
new file mode 100644
index 000000000..1a138d35f
--- /dev/null
+++ b/npc/00000SAVE/020-1_well.txt
@@ -0,0 +1,80 @@
+// Better to skip this quest. It is too poor and would require more work,
+// eg. rope and something to make the player take part on it... Probably?
+
+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 an item you don't have.";
+ goto L_close;
+
+L_Finished:
+ mes "This is a well.";
+ goto L_close;
+
+L_close:
+ close;
+}
diff --git a/npc/00000SAVE/021-1_michel.forum.txt b/npc/00000SAVE/021-1_michel.forum.txt
new file mode 100644
index 000000000..1cd1e1cb1
--- /dev/null
+++ b/npc/00000SAVE/021-1_michel.forum.txt
@@ -0,0 +1,41 @@
+021-1.gat,49,123,0|script |Michel|111,{
+
+mes "[Michel]";
+mes "\"I need some help could you help me please?"";
+goto L_Michelmenu;
+
+L_Michelmenu:
+menu
+"Sure i will help you", L_Sure
+"Nooo Michel", L_WrongKey
+goto L_Close;
+
+
+L_Sure:
+mes "[Michel]";
+mes "\"I need 25 Raw Logs, 20 Roots, 15 Reed Bundles and 10.000 gp for Iten.\"";
+menu
+"Sure.", L_Sure,
+"What a ripoff! , No way!", -;
+goto L_Close;
+
+L_Sure:
+if (countitem("Raw Log") < 25) goto L_Missing;
+if (countitem("Reed Bundle") <15) goto L_Missing;
+if (countitem("Root") <20) goto L_Missing;
+if (Zeny < 10000) goto L_NotEnoughMoney;
+getinventorylist;
+if (@inventorylist_count == 100 && countitem("Raw Log") > 25 && countitem("Reed Bundle") > 15 && countitem("Root") > 20) goto L_Full;
+
+delitem "Raw Log", 25;
+delitem "Reed Bundle", 15;
+delitem "Root", 20;
+set Zeny, Zeny - 10000
+getitem "Iten", 1;
+mes "\"Here its your towel..Enjoy it.\"";
+goto L_Close;
+
+L_WrongKey:
+mes "Land of Fire is beautiful server.";
+close;
+)
diff --git a/npc/00000SAVE/EPISODE/020-2_miler.txt b/npc/00000SAVE/EPISODE/020-2_miler.txt
new file mode 100644
index 000000000..e1bb52ab7
--- /dev/null
+++ b/npc/00000SAVE/EPISODE/020-2_miler.txt
@@ -0,0 +1,56 @@
+// IMPORTANT: This NPC was never finished :o We must finish it, please follow
+// directives stated on http://forums.landoffire.org/viewtopic.php?f=7&t=1320&sid=80d2c735b55ccb06a39955a8fbca3913
+020-2.gat,100,28,0 script Miler NPC100,{
+ if (QUEST_Episode >= 18) goto L_Episode_Thank;
+ if (QUEST_Episode >= 4) goto L_Episode_AskBoxes;
+ if (QL_WELL == 2 && QUEST_Episode == 3) goto L_Episode_Start;
+
+ mes "[Miler]";
+ mes "\"Hello!\"";
+
+ if (QL_WELL == 1) goto L_Well_Menu;
+
+ goto L_close;
+
+L_Well_Menu:
+ menu
+ "Hello.", L_close,
+ "Hello, Can you help me?", L_Well_Help;
+
+L_Well_Help:
+ mes "[Miler]";
+ mes "\"What's the problem?\"";
+ menu "Someone fell into the well.", L_Well_Finish;
+
+L_Well_Finish:
+ mes "[Miler]";
+ mes "\"Ho! I'll help him!\"";
+ getexp (BaseLevel * 111), 0;
+ QL_WELL = 2;
+ goto L_close;
+
+L_Episode_Start:
+ mes "[Miler]";
+ mes "\"Oh dear, oh dear, where could I have possibly left it?!\"";
+ menu
+ "What are you looking for?", L_Episode_Looking,
+ "Uh, bye.", L_close;
+
+L_Episode_Looking:
+ mes "[Miler]";
+ mes "\"My ring! My one precious golden ring, oh where, oh where could it be....";
+ next;
+ mes "How could I lose it, how could I lose it, how could I lose it...\"";
+ if (countitem("DarkConcentrationPotion") == 0) goto L_close;
+
+L_Episode_AskBoxes:
+ mes "[Miler]";
+
+L_Episode_Thank:
+ mes "[Miler]";
+ mes "\"Thank you so much for finding my precious ring!\"";
+ goto L_close;
+
+L_close:
+ close;
+}
diff --git a/npc/00000SAVE/andy_alex.forum.txt b/npc/00000SAVE/andy_alex.forum.txt
new file mode 100644
index 000000000..18a25ece0
--- /dev/null
+++ b/npc/00000SAVE/andy_alex.forum.txt
@@ -0,0 +1,179 @@
+// All .forum.txt files were not converted
+// author: TomphaA
+
+
+//Alex
+
+009-1.gat,??,??,?|script|Alex|???,{
+
+
+ if (TOM_Quest == 1) goto L_Alex_Waits_1;
+ if (TOM_Quest == 2) goto L_Alex_Tablet;
+ if (TOM_Quest == 3) goto L_Alex_Didyou;
+ if (TOM_Quest == 4) goto L_Alex_Okay;
+ if (TOM_Quest == 5) goto L_Alex_End;
+
+
+ mes "[Alex]";
+ mes "\"Hey there! Mind giving us a hand?\"";
+ menu
+
+ "Yeah, what do you need?", L_Alex_Help,
+
+ "I Don't have time, sorry.", -;
+
+ close;
+
+L_Alex_Help
+
+ mes "[Alex]";
+ mes "\"He shows you little wooden box.\"";
+ mes "\"Give these to Andy you can find him somewhere around in Dark World, I'm sure he'll reward you.\"";
+ set TOM_Quest, 1;
+ close;
+
+L_Alex_Tablet:
+
+ mes "[Alex]";
+ mes "\"Hey, I heard you have something for me...\"";
+ mes "\"You give Alex the stone tablet, Alex looks at it and seems to be very happy\"";
+ mes "[Alex]";
+ mes "\"I need you to tell Andy that we found what we we're looking for and that we dont have to examine those Dark World creatures anymore, I'm sure he'll understand.\"";
+ set TOM_Quest, 3;
+ close;
+
+L_Alex_Didyou:
+
+ mes "[Alex]";
+ mes "\"Did you tell it to him already, if not please hurry!\"";
+ close;
+
+L_Alex_Waits_1:
+
+ mes "[Alex]";
+ mes "\"Did you give that box to Andy?\"";
+ close;
+
+L_Alex_Okay:
+
+ mes "[Alex]";
+ mes "Did you tell him what I asked you to tell him?";
+ menu
+
+ "Yes I did, but he asked me to tell you that he is going to stay in Dark World because he likes that place.", L_Alex_Damn,
+
+ "No I didn't", -;
+
+ close;
+
+L_Alex_Damn:
+
+ set TOM_Quest, 5;
+ mes "[Alex]";
+ mes "\"Ah, thank you. Hope he's mentally okay...\"";
+ mes "\"Here is your reward anyways, Andy found these a year ago from Dark World...\"";
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_Alex_TooMany;
+ getexp 3000, 0;
+ set Zeny, Zeny + 4000;
+ getitem "Whiterabbitears", 1;
+ close;
+
+L_Alex_TooMany:
+
+ mes "[Alex]";
+ mes "\"You have too many items for me to give you a reward.\"";
+ close;
+
+L_Alex_End:
+
+ mes "[Alex]";
+ mes "\"Be safe out there, Dark World is dangerous for the unexperienced!\"";
+ close;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+//Andy
+
+???-?.gat,??,??,?|script|Andy|???,{
+
+ if (TOM_Quest == 1) goto L_Andy_Okay;
+ if (TOM_Quest == 2) goto L_Andy_Tablet;
+ if (TOM_Quest == 3) goto L_Andy_Tell;
+ if (TOM_Quest == 4) goto L_Andy_whatdidhesay;
+ if (TOM_Quest == 5) goto L_Andy_End;
+
+ mes "[Andy]";
+ mes "\"Lots of work to do.\"";
+ close;
+
+L_Andy_Okay:
+
+ mes "[Andy]";
+ mes "\"Oh, hello there.\"";
+ next;
+ mes "\"You show him the wooden box Alex gave you earlier.\"";
+ mes "\"Alex wanted you to give me that? Okay, let me see...\"";
+ getexp 1000, 0;
+ set Zeny, Zeny + 1000;
+ goto L_Andy_Help
+
+L_Andy_Help:
+
+ mes "[Andy]";
+ mes "\"I need Alex to see this...\"";
+ mes "\"Andy shows you a stone tablet.\"";
+ mes "\"Please get this to Alex!\"";
+ set TOM_Quest, 2;
+ close;
+
+L_Andy_Tablet:
+
+ mes "[Andy]";
+ mes "\"Did you show Alex that tablet\"";
+ close;
+
+L_Andy_Tell
+
+ mes "[Andy]";
+ mes "\"What did he say?\"";
+ menu
+
+ "He said that you have found what you were looking for and you dont have to stay here in Dark World anymore.", L_Andy_Well,
+
+ "Nothing...", -;
+
+ close;
+
+L_Andy_Well:
+
+ mes "[Andy]";
+ mes "\"Thats great news, but tell Alex that I'm going to stay here because I like this place.\"";
+ getexp 1000, 0;
+ set TOM_Quest, 4;
+ close;
+
+L_Andy_Whatdidhesay:
+
+ mes "[Andy]";
+ mes "\"Pleasy hurry!\"";
+ close;
+
+L_Andy_End:
+
+ mes "[Andy]";
+ mes "\"Thanks for your help again!\"";
+ close;
+
+}
diff --git a/npc/00000SAVE/events/028-1_Easter2010_Portal.txt b/npc/00000SAVE/events/028-1_Easter2010_Portal.txt
new file mode 100644
index 000000000..e33f1429d
--- /dev/null
+++ b/npc/00000SAVE/events/028-1_Easter2010_Portal.txt
@@ -0,0 +1,134 @@
+028-1,69,71,0 script Portal#_M NPC400,{
+ if (isin("028-1",65,67,73,73)) goto L_Main;
+ mes "There is something there, but you aren't quite close enough to see exactly what it is.";
+ close;
+
+L_Main:
+ mes "[Portal]";
+ mes "";
+ mes "A strange field hovers about waist high above the ground.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "You sense a feeling of familiarity radiating out from it.";
+ mes "";
+ mes "It looks just wide enough to jump through.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "You're not quite sure if there will be a way to return once you enter, though.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "What do you do?";
+ menu
+ "Jump through, without looking back.", L_No_Hesitation,
+ "Take one more look around.", L_Look,
+ "Leave it alone.", L_close;
+
+L_No_Hesitation:
+ mes "There has been quite enough of this harsh place. You jump through without hesitation...";
+ next;
+ mes "...and fall, and fall...";
+ next;
+ mes "Dizzying colors whirl around you. You collapse.";
+ savepoint "009-1", 52, 39;
+ heal -hp -1, 0, 1;
+ close;
+
+L_Look:
+ mes "[Portal]";
+ mes "";
+ mes "There was a lot here. You don't know where it came from, or quite how you ended up here.";
+ if ((Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE)
+ goto L_Full_Helped;
+ if ((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK)
+ goto L_Somewhat_Helped;
+ if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR)
+ goto L_Met;
+ if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK)
+ goto L_Unknown_Defeat;
+
+ mes "Come to think of it, there is still quite a lot you're not sure about. There was talk about something big, but you must have missed it... whatever it was, it seems gone now.";
+ goto L_Post_Look;
+
+
+L_Full_Helped:
+ if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK)
+ goto L_Full_Helped_Defeat;
+ mes "Your assistance was helpful, you know that much. If only you could have faced the darkness that plagued this world more directly...";
+ goto L_Post_Look;
+
+L_Full_Helped_Defeat:
+ mes "You know you have done everything that you could have. Your determination will have surely meant the world will be restored, once more.";
+ goto L_Post_Look;
+
+L_Somewhat_Helped:
+ if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK)
+ goto L_Somewhat_Helped_Defeat;
+ mes "You feel your help was not for nothing, though you can't quite shake the feeling there was still something more to do.";
+ goto L_Post_Look;
+
+L_Somewhat_Helped_Defeat:
+ mes "Your help was not for nothing. Your destruction of evil would surely help heal this world!";
+ goto L_Post_Look;
+
+L_Met:
+ if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK)
+ goto L_Met_Defeat;
+ mes "While you only met the Doctor briefly, he seemed to think there was something wrong. If only there was a way you could have helped, somehow.";
+ goto L_Post_Look;
+
+L_Met_Defeat:
+ mes "Striking down that evil, dark, figure would surely make a difference. While you only met the Doctor briefly, he seemed to think there was something wrong... with any luck, this defeat would be, at the very least, a significant setback.";
+ goto L_Post_Look;
+
+L_Unknown_Defeat:
+ mes "Striking down that evil, dark, figure would surely make a difference. You just wish you knew what that was about... if only there had been someone that could have explained it all.";
+ goto L_Post_Look;
+
+L_Post_Look:
+ next;
+ mes "What do you do?";
+ menu
+ "Jump through", L_Jump,
+ "Leave it alone", L_close;
+
+L_Jump:
+ mes "[Portal]";
+ mes "";
+ mes "A tingling sensation surrounds you as you enter.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "Inside, your senses seem heightened, sharpened...";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "You can detect many entities all around you, yet you are not quite sure how.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "Colors swirl around you. There is a sensation of great speed, of great power, of energy...";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "A tearing motion. The blobs of color skew, and stretch into long thin lines... and somehow, a taste of peanuts.";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "A mass of green and yellow, moving at high speed... or perhaps it is you who is moving?";
+ next;
+ mes "[Portal]";
+ mes "";
+ mes "Whichever it is, one of you slows just as you begin to recognise some details...";
+ warp "009-1", 52, 39;
+ savepoint "009-1", 52, 39;
+ mes "[Home]";
+ mes "";
+ mes "You land softly. It is good to be home...";
+ close;
+
+L_close:
+ close;
+}
diff --git a/npc/00000SAVE/events/030-2_XMAS_glitter_helper.txt b/npc/00000SAVE/events/030-2_XMAS_glitter_helper.txt
new file mode 100644
index 000000000..a36ad93e1
--- /dev/null
+++ b/npc/00000SAVE/events/030-2_XMAS_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/00000SAVE/events/031-1_frozenbeard.txt b/npc/00000SAVE/events/031-1_frozenbeard.txt
new file mode 100644
index 000000000..b39519109
--- /dev/null
+++ b/npc/00000SAVE/events/031-1_frozenbeard.txt
@@ -0,0 +1,58 @@
+
+031-1,96,113,0 script Frozenbeard NPC138,{
+
+ mes "[Frozenbeard]";
+ mes "\"Arrr mate! I'm glad there's a dock here, so I don't have to row boat from my ship anymore! 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.\"";
+ close;
+
+
+L_Frozenbeard_Easter2012:
+ mes "[Frozenbeard]";
+ mes "\"Arrrrh mate! Ye be right! I know every single pirate in this world. But not all of them are to be trusted, I must say.\"";
+ next;
+ menu
+ "I need information about the Easter Bunny. I heard some pirates kidnapped him.", L_EasterBunny;
+
+L_EasterBunny:
+ mes "[Frozenbeard]";
+ mes "\"Arrrrh! Ye shouldn't do this to me. Those pirates are dangerous, I can't put myself in such a situation!\"";
+ next;
+ if (countitem("BlackPearl") < 1) goto L_Frozenbeard_Fear;
+ mes "You take a black pearl from your backpack and start to play with it.";
+ next;
+ menu
+ "Hmm, too bad, because I was willing to pay well for information, you know?", L_OfferPearl;
+
+L_OfferPearl:
+ mes "[Frozenbeard]";
+ mes "\"Arrh eh... Did I say dangerous? These pirates are criminals and a shame to our kind. So, if ye give me this pearl I can tell ye all I know about them. It is not much, but maybe it can help.\"";
+ menu
+ "Ok, keep going.", L_GiveInfo;
+
+L_GiveInfo:
+ mes "[Frozenbeard]";
+ mes "\"Well I heard they took him to a small house around this area, where they have their base. But then they brought him to another place. It might be hot there, judging the way they dressed up. The bunny seemed to show no resistance at all when they kidnapped him. It looked as if he did not know what was happening.\"";
+ next;
+ mes "\"But the most important thing is, the leader of the kidnappers is an old friend of George, the treasure hunter. George is very clever, I am sure he knows how the kidnapper thinks and all, maybe he can give ye a more specific information about this.\"";
+ next;
+ menu
+ "Well, that was useful, take your pearl.", L_PayPearl;
+
+L_PayPearl:
+ if (countitem("BlackPearl") < 1)
+ goto L_Frozenbeard_Nopearl;
+ delitem "BlackPearl", 1;
+ QUEST_Easter12 = 3;
+ mes "[Frozenbeard]";
+ mes "\"Arrrrh! Such a beautiful item! Always glad to help.\"";
+ close;
+
+L_Frozenbeard_Fear:
+ mes "Frozenbeard ends the conversation. You can see he is afraid of the kidnappers.";
+ close;
+
+L_Frozenbeard_Nopearl:
+ mes "[Frozenbeard]";
+ mes "\"Arrrrh! I see no pearl!\"";
+ close;
+}
diff --git a/npc/00000SAVE/fairy/009-2_fairyquest2.txt b/npc/00000SAVE/fairy/009-2_fairyquest2.txt
new file mode 100644
index 000000000..fac3d9153
--- /dev/null
+++ b/npc/00000SAVE/fairy/009-2_fairyquest2.txt
@@ -0,0 +1,75 @@
+
+009-2,63,26,0 script Royal Fairy NPC108,{
+ if(FAIRY_Quest == 1) goto L_tellagain;
+ if(FAIRY_Quest == 3) goto L_thanks;
+ if(FAIRY_Quest == 4) goto L_thanks2;
+
+ mes "[Fairy Princess]";
+ mes "\"Hi, I'm too busy to talk right now, please go away. Very pressing matters at hand.\"";
+ goto L_close;
+
+L_tellagain:
+ mes "[Fairy Princess]";
+ mes "\"Hello, I noticed my dear friend, Susanne, asked you to help us save my sisters; do not forget to ask Susanne where the Fafi Dragon was last seen.\"";
+ goto L_close;
+
+L_thanks:
+ mes "[Fairy Princess]";
+ mes "\"Thank you so much for saving my sisters!\"";
+ next;
+ mes "\"As a reward to a Noble Warrior as yourself, I want you to have one. They will serve you during your travels, please choose one.\"";
+ mes "\"Or If you don't want one you can keep the Monster Skull Mask that Susanne gave you.\"";
+ if (countitem("MonsterSkullHelmet") == 0) goto L_Nomask;
+ goto L_fairymenu;
+
+L_fairymenu:
+ menu
+ "I'd like to take the Blue Fairy with me!", L_blue,
+ "I love the Red Fairy, she'd be a good friend", L_Red,
+ "Can I take the Green Fairy with me?", L_Green,
+ "Right now I don't really feel like having someone with me..", L_No;
+
+L_blue:
+ delitem "MonsterSkullHelmet", 1;
+ getexp 100000, 0;
+ getitem "BlueFairy", 1;
+ FAIRY_Quest = 4;
+ goto L_close;
+
+L_Red:
+ delitem "MonsterSkullHelmet", 1;
+ getexp 100000, 0;
+ getitem "RedFairy", 1;
+ FAIRY_Quest = 4;
+ goto L_close;
+
+L_Green:
+ delitem "MonsterSkullHelmet", 1;
+ getexp 100000, 0;
+ getitem "GreenFairy", 1;
+ FAIRY_Quest = 4;
+ goto L_close;
+
+L_No:
+ mes "[Fairy Princess]";
+ mes "\"Ok...if you ever feel like having one of my sisters there with you, come back!\"";
+ goto L_close;
+
+L_thanks2:
+ mes "[Fairy Princess]";
+ mes "\"Thank you so much for saving my sisters!\"";
+ next;
+ mes "\"They can now enjoy life and see their younger friend.\"";
+ goto L_close;
+
+L_Nomask:
+ mes "[Fairy Princess]";
+ mes "\"Seems like you don't have the Monster Skull Helmet with you.\"";
+ mes "\"For a Fairy to obey your every command, the Helmet must be used as part of the spell.\"";
+ mes "\"Please come back when you have it with you.\"";
+ goto L_close;
+
+
+L_close:
+ close;
+}
diff --git a/npc/00000SAVE/lockpicking.txt b/npc/00000SAVE/lockpicking.txt
new file mode 100644
index 000000000..da2da5dd6
--- /dev/null
+++ b/npc/00000SAVE/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/00000SAVE/misc/doctor.txt b/npc/00000SAVE/misc/doctor.txt
new file mode 100644
index 000000000..241347909
--- /dev/null
+++ b/npc/00000SAVE/misc/doctor.txt
@@ -0,0 +1,88 @@
+
+009-2,148,25,0 script Doctor NPC107,{
+ callfunc "ClearVariables";
+
+ @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/00000SAVE/misc/injured-mouboo.txt b/npc/00000SAVE/misc/injured-mouboo.txt
new file mode 100644
index 000000000..0737f79c4
--- /dev/null
+++ b/npc/00000SAVE/misc/injured-mouboo.txt
@@ -0,0 +1,224 @@
+
+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";
+ close;
+
+L_Nothing:
+ mes "Your spell has no effect.";
+ 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;
+}
+
+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";
+ goto L_Kill;
+
+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 "BlackTurtleneckSweater", 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/00000SAVE/misc/pachua.txt b/npc/00000SAVE/misc/pachua.txt
new file mode 100644
index 000000000..9c8d3ba2c
--- /dev/null
+++ b/npc/00000SAVE/misc/pachua.txt
@@ -0,0 +1,464 @@
+006-1,23,100,0 script Pachua NPC143,{
+ @LEATHER_PATCH_PRICE = 300;
+ @wants_leather_patch = QUEST_Forestbow_state & NIBBLE_4_MASK;
+
+ if ((gettime(5) >= $@xmas2011_start_day) && (gettime(5) < $@xmas2011_reward_start_day) && (gettime(6) == 12) && (gettime(7) == $@xmas2011_year))
+ @wants_leather_patch = @wants_leather_patch | (xmas11 & $@xmas11_talkedToChief);
+
+ $@xmas2011_start_day = 10;
+ $@xmas2011_reward_start_day = 25;
+
+
+ if (QUEST_MIRIAM_cheat != 0) goto L_Warp2_cheat;
+ if (QUEST_MIRIAM_start != 0) goto L_smoke;
+
+
+ @hw2011_npc_id = $@hw2011_npc_pachua;
+ if (gettime(7) == $@hw2011_year && gettime(6) == 10 && gettime(5) >= $@hw2011_start_day)
+ goto L_TrickOrTreat;
+
+ goto L_Begin;
+
+L_Begin:
+ mes "[Chief Pachua]";
+ 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 "\"For generations my tribe has been crafting special clothes out of different items.\"";
+ next;
+ goto L_Check_Mamba;
+
+L_Check_Mamba:
+ if (countitem("BlackMambaSkin") == 0 || QUEST_Mamba > 5 || BaseLevel < 50) goto L_Check_Shops;
+ if (QUEST_Mamba > 1) goto L_Check_Mamba_Again;
+
+ mes "[Chief Pachua]";
+ mes "\"Ah! Do I see a Black Mamba Skin sticking out of your bag?\"";
+ menu
+ "Yes, can you do something with it?", L_Branch_Mamba,
+ "Yes, but that's not why I'm here to see you.", L_Check_Shops;
+
+L_Check_Mamba_Again:
+ mes "[Chief Pachua]";
+ mes "\"I see you have a Black Mamba Skin with you, are you ready for me to craft something with it?\"";
+ menu
+ "Yes, take a look.", L_Branch_Mamba,
+ "No, that's not why I'm here to see you.", L_Check_Shops;
+
+L_Branch_Mamba:
+ if (QUEST_Mamba == 5) goto L_Mamba_Helm;
+ if (QUEST_Mamba == 4) goto L_Mamba_Chest;
+ if (QUEST_Mamba == 3) goto L_Mamba_Legs;
+ if (QUEST_Mamba == 2) goto L_Mamba_Boots;
+ if (QUEST_Mamba == 1) goto L_Mamba_Gloves;
+
+ mes "[Chief Pachua]";
+ mes "\"The skin of the Black Mamba can be used to craft a leather armor that is lighter than any metal armor and stronger than any other leather.";
+ mes "\"Because it is leather, it can be used to make every type of armor.";
+ mes "\"Although I know of no-one with the expertise to craft a shield, I can make the other pieces for you.";
+ mes "\"I'll start with the gloves, but I'll need two Black Mamba Skins, one Black Mamba Tongue for thread, two Black Mamba Eggs to soften the leather, a Ruby, and 5,000 gold.\"";
+
+ QUEST_Mamba = 1;
+
+ menu
+ "I actually have all of that already!", L_Mamba_Gloves_Check,
+ "Maybe later....", L_close;
+
+L_Mamba_Gloves:
+ mes "[Chief Pachua]";
+ mes "\"For a pair of Black Mamba Gloves I'll need two Black Mamba Skins, one Black Mamba Tongue for thread, two Black Mamba Eggs to soften the leather, a Ruby, and 5,000 gold.\"";
+ menu
+ "Here you are.", L_Mamba_Gloves_Check,
+ "I'll think about it.", L_close;
+
+L_Mamba_Gloves_Check:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ if (countitem("BlackMambaSkin") < 2 || countitem("BlackMambaTongue") < 1 ||
+ countitem("BlackMambaEgg") < 2 || countitem("Ruby") < 1) goto L_MissingItems;
+ if (Zeny < 5000) goto L_NoMoney;
+
+ delitem "BlackMambaSkin", 2;
+ delitem "BlackMambaTongue", 1;
+ delitem "BlackMambaEgg", 2;
+ delitem "Ruby", 1;
+ Zeny = Zeny - 5000;
+
+ getitem "BlackMambaGloves", 1;
+ QUEST_Mamba = 2;
+ goto L_DealDone;
+
+L_Mamba_Boots:
+ mes "[Chief Pachua]";
+ mes "\"For a pair of Black Mamba Boots I'll need four Black Mamba Skins, two Black Mamba Tongues for thread, two Rubies, and 10,000 gold.\"";
+ menu
+ "I'll take them.", L_Mamba_Boots_Check,
+ "That's way too much!", L_close;
+
+L_Mamba_Boots_Check:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ if (countitem("BlackMambaSkin") < 4 || countitem("BlackMambaTongue") < 2 ||
+ countitem("Ruby") < 2) goto L_MissingItems;
+ if (Zeny < 10000) goto L_NoMoney;
+
+ delitem "BlackMambaSkin", 4;
+ delitem "BlackMambaTongue", 2;
+ delitem "Ruby", 2;
+ Zeny = Zeny - 10000;
+
+ getitem "BlackMambaBoots", 1;
+ QUEST_Mamba = 3;
+ goto L_DealDone;
+
+L_Mamba_Legs:
+ mes "[Chief Pachua]";
+ mes "\"For a pair of Black Mamba Pants I'll need six Black Mamba Skins, three Black Mamba Tongues for thread, six Black Mamba Eggs to soften the leather, three Rubies, and 20,000 gold.\"";
+ menu
+ "Here you go!", L_Mamba_Legs_Check,
+ "Um, no thanks.", L_close;
+
+L_Mamba_Legs_Check:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ if (countitem("BlackMambaSkin") < 6 || countitem("BlackMambaTongue") < 3 ||
+ countitem("BlackMambaEgg") < 6 || countitem("Ruby") < 3) goto L_MissingItems;
+ if (Zeny < 20000) goto L_NoMoney;
+
+ delitem "BlackMambaSkin", 6;
+ delitem "BlackMambaTongue", 3;
+ delitem "BlackMambaEgg", 6;
+ delitem "Ruby", 3;
+ Zeny = Zeny - 20000;
+
+ getitem "BlackMambaPants", 1;
+ QUEST_Mamba = 4;
+ goto L_DealDone;
+
+L_Mamba_Chest:
+ mes "[Chief Pachua]";
+ mes "\"For a Black Mamba Armor I'll need ten Black Mamba Skins, ten Black Mamba Tongues for stitching, two Iron Ingots for strength, ten Rubies, and 250,000 gold.\"";
+ menu
+ "I'll take it.", L_Mamba_Chest_Check,
+ "That's outrageous!", L_close;
+
+L_Mamba_Chest_Check:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ if (countitem("BlackMambaSkin") < 10 || countitem("BlackMambaTongue") < 10 ||
+ countitem("IronIngot") < 2 || countitem("Ruby") < 10) goto L_MissingItems;
+ if (Zeny < 250000) goto L_NoMoney;
+
+ delitem "BlackMambaSkin", 10;
+ delitem "BlackMambaTongue", 10;
+ delitem "IronIngot", 2;
+ delitem "Ruby", 10;
+ Zeny = Zeny - 250000;
+
+ getitem "BlackMambaArmor", 1;
+ QUEST_Mamba = 5;
+ goto L_DealDone;
+
+L_Mamba_Helm:
+ mes "[Chief Pachua]";
+ mes "\"For a Black Mamba Helm I'll need eight Black Mamba Skins, eight Black Mamba Tongues for stitching, eight Black Mamba Eggs to soften the interior, twenty Rubies to absorb blows, and 100,000 gold.\"";
+ menu
+ "Can I get that boxed?", L_Mamba_Helm_Check,
+ "Not worth it to me right now.", L_close;
+
+L_Mamba_Helm_Check:
+ if (countitem("BlackMambaSkin") < 8 || countitem("BlackMambaTongue") < 8 ||
+ countitem("BlackMambaEgg") < 8 || countitem("Ruby") < 20) goto L_MissingItems;
+ if (Zeny < 100000) goto L_NoMoney;
+
+ delitem "BlackMambaSkin", 8;
+ delitem "BlackMambaTongue", 8;
+ delitem "BlackMambaEgg", 8;
+ delitem "Ruby", 20;
+ Zeny = Zeny - 100000;
+
+ getitem "BlackMambaHelm", 1;
+ QUEST_Mamba = 6;
+ goto L_DealDone;
+
+L_Check_Shops:
+ if ((countitem("JeansShorts") >= 1 && countitem("SnakeSkin") >= 10) && (countitem("FancyHat") >= 1 && countitem("SnakeSkin") >= 2)) goto L_Super_store;
+ if (countitem("JeansShorts") >= 1 && countitem("SnakeSkin") >= 10) goto L_Chaps_store;
+ if (countitem("FancyHat") >= 1 && countitem("SnakeSkin") >= 2) goto L_Cowboy_store;
+
+ mes "[Chief Pachua]";
+ 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_Super_store;
+
+S_CheckStuff:
+ mes "[Chief Pachua]";
+ mes "\"Let me see what you have there.\"";
+ next;
+ return;
+
+L_Super_store:
+ callsub S_CheckStuff;
+ mes "[Chief Pachua]";
+ mes "\"Ahh you have lots of good items to work with.\"";
+ mes "\"With them I can make you either 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 "\"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 "\"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?\"";
+ if (!@wants_leather_patch)
+ menu
+ "Yes, that's fine.", L_BuyChaps,
+ "On second thought, maybe later.", L_NoDeal;
+ if (@wants_leather_patch)
+ 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:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ 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:
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ 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 "\"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_CheckPatchItems,
+ "OK, I'll be back later.", L_close,
+ "That's too expensive!.", L_NoDeal;
+
+L_CheckPatchItems:
+ 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 "\"Here you are!";
+ mes "Come back any time.\"";
+ goto L_close;
+
+L_NoDeal:
+ mes "[Chief Pachua]";
+ mes "\"Alright, but you won't get a better deal anywhere else!\"";
+ goto L_close;
+
+L_MissingItems:
+ mes "[Chief Pachua]";
+ mes "\"You don't seem to have all the items I need to craft that. Come back when you do.\"";
+ goto L_close;
+
+L_NoMoney:
+ mes "[Chief Pachua]";
+ mes "\"Oh dear, it seems you don't have enough money.\"";
+ goto L_close;
+
+L_NoJeans:
+ mes "[Chief Pachua]";
+ mes "\"Oh dear, it seems you don't have enough jean shorts.\"";
+ goto L_close;
+
+L_NoFancy:
+ mes "[Chief Pachua]";
+ mes "\"Oh dear, it seems you don't have enough fancy hats.\"";
+ goto L_close;
+
+L_NoSkins:
+ mes "[Chief Pachua]";
+ mes "\"Oh dear, it seems you don't have enough snake skins.\"";
+ goto L_close;
+
+L_WearingCowboy:
+ mes "[Chief Pachua]";
+ 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 "\"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 "\"You don't have room for another item. 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;
+ close;
+
+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;
+
+L_Basket:
+ mes "[Chief Pachua]";
+ mes "\"For generations my tribe has been crafting special clothes out of different items.\"";
+ mes "\"Maybe if you bring me the right materials I can make something for you.\"";
+ next;
+ menu
+ "Do you work only with clothes? Because I was looking for a basket.", L_AskBasket;
+
+L_AskBasket:
+ mes "\"A basket? In our tribe, we craft baskets of all kinds using only reeds. This basket, you need it to carry your items?\"";
+ menu
+ "No. It is for the Easter Bunny. I offered to get him one.", L_EasterBunny;
+
+L_EasterBunny:
+ mes "\"I appreciate your attitude. Maybe I can help you with that.\"";
+ menu
+ "I would be really grateful if you could do that!", L_SetStatus,
+ "Nah, I decided not to do that stupid quest.", L_close,
+ "I would prefer to talk to you about other stuff.", L_Begin; //should go to pachuas's regular chat
+
+L_SetStatus:
+ QUEST_Easter11 = 2;
+
+L_MakeBasket:
+ mes "[Chief Pachua]";
+ mes "\"I will need you to gather reeds for me.\"";
+ mes "\"5 bundles should do it.\"";
+ mes "\"You should be able to get those from mouboos as they graze.\"";
+ menu
+ "I have the Reeds!", L_CheckBasketItems,
+ "Ok, I will be back soon", L_close,
+ "I changed my mind, forget about it", L_close,
+ "Can I talk to you about another stuff?", L_Begin; //should go to pachuas's regular chat
+
+L_CheckBasketItems:
+ if(countitem("ReedBundle") < 5) goto L_EasterNotEnough;
+ if(countitem("ReedBundle") >= 5) goto L_EasterEnough;
+ goto L_close;
+
+L_EasterNotEnough:
+ mes "[Chief Pachua]";
+ mes "\"You do not have enough Reed Bundles for me to work with.\"";
+ mes "\"Go gather more.\"";
+ goto L_close;
+
+L_EasterEnough:
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("ReedBundle") > 5) goto L_EasterTooMany;
+ if(countitem("ReedBundle") < 5) goto L_EasterNotEnough;
+ delitem "ReedBundle", 5;
+ getitem "EasterBasket", 1;
+ QUEST_Easter11 = 3;
+ mes "[Chief Pachua]";
+ mes "\"You have gathered enough reeds for me to make the basket.\"";
+ mes "He skillfully soaks the reeds you brought him,";
+ mes "then swiftly weaves them into a basket shape.";
+ mes "Next, he places the damp basket in the sun to dry for a minute before handing it over to you.";
+ mes "\"Here is your Easter Basket.\"";
+ goto L_close;
+
+L_EasterTooMany:
+ mes "[Chief Pachua]";
+ mes "\"You don't have room for the Easter Basket. Come back later.\"";
+ goto L_close;
+
+L_SeeBunny:
+ mes "[Chief Pachua]";
+ mes "\"You need to return to the Easter Bunny now.\"";
+ next;
+ goto L_Begin;
+
+L_TrickOrTreat:
+ callfunc "TrickOrTreat2011";
+ goto L_Begin;
+}
diff --git a/npc/001-1/bgmaster.txt b/npc/001-1/bgmaster.txt
index 74084dd02..73849a5e5 100644
--- a/npc/001-1/bgmaster.txt
+++ b/npc/001-1/bgmaster.txt
@@ -77,10 +77,10 @@ OnTimer60000:
if (getmapusers("001-2") < 2 || .BGC > 10) goto L_Cancel;
mapannounce("001-2", "Reinforcements raise!", bc_map);
- $@FKing_T1 = bg_monster($@FK_Team1, "001-2", 125, 38, "Frostia Guard", 1081, "Cassia::OnSkip");
- bg_monster($@FK_Team1, "001-2", 126, 38, "Frostia Guard", 1081, "Cassia::OnSkip");
- $@FKing_T2 = bg_monster($@FK_Team2, "001-2",124, 213, "Halinarzo Guard", 1082, "Cassia::OnSkip");
- bg_monster($@FK_Team2, "001-2",125, 213, "Halinarzo Guard", 1082, "Cassia::OnSkip");
+ //$@FKing_T1 = bg_monster($@FK_Team1, "001-2", 125, 38, "Frostia Guard", 1081, "Cassia::OnSkip");
+ bg_monster($@FK_Team1, "001-2", rand(105, 108), rand(37, 80), "Frostia Guard", FallenGuard1, "Cassia::OnSkip");
+ //$@FKing_T2 = bg_monster($@FK_Team2, "001-2",124, 213, "Halinarzo Guard", 1082, "Cassia::OnSkip");
+ bg_monster($@FK_Team2, "001-2", rand(142, 145), rand(37, 80), "Halinarzo Guard", FallenGuard2, "Cassia::OnSkip");
.BGC+=1;
stopnpctimer();
initnpctimer();
@@ -120,8 +120,8 @@ OnVictor1:
stopnpctimer();
announce "Team 1 raises victorious at the Fallen Kings Duel!", bc_all; // TODO: Give players a reward
killmonsterall "001-2";
- delcells "Wall_0012_left";
- delcells "Wall_0012_right";
+ //delcells "Wall_0012_left";
+ //delcells "Wall_0012_right";
mapwarp "001-2", "001-1", 117, 72;
bg_destroy($@FK_Team1);
@@ -134,8 +134,8 @@ OnVictor2:
stopnpctimer();
announce "Team 2 raises victorious at the Fallen Kings Duel!", bc_all;
killmonsterall "001-2";
- delcells "Wall_0012_left";
- delcells "Wall_0012_right";
+ //delcells "Wall_0012_left";
+ //delcells "Wall_0012_right";
mapwarp "001-2", "001-1", 117, 72;
bg_destroy($@FK_Team1);
@@ -163,14 +163,14 @@ OnInit:
end;
OnDoEvent:
- setcells "001-2", 109, 37, 109, 213, 3, "Wall_0012_left";
- setcells "001-2", 141, 37, 141, 213, 3, "Wall_0012_right";
+ //setcells "001-2", 109, 37, 109, 213, 3, "Wall_0012_left";
+ //setcells "001-2", 141, 37, 141, 213, 3, "Wall_0012_right";
.BGC=0;
mapannounce("001-2", "May the fight begin!", bc_map);
- $@FKing_T1 = bg_monster($@FK_Team1, "001-2", 125, 38, "Frostia King", 1079, "Cassia::OnVictor2");
- $@FKing_T2 = bg_monster($@FK_Team2, "001-2", 124, 213, "Halinarzo King", 1080, "Cassia::OnVictor1");
- bg_monster($@FK_Team1, "001-2", 124, 38, "Frostia Guard", 1081, "Cassia::OnSkip");
- bg_monster($@FK_Team2, "001-2",123, 213, "Halinarzo Guard", 1082, "Cassia::OnSkip");
+ $@FKing_T1 = bg_monster($@FK_Team1, "001-2", rand(105, 108), rand(37, 80), "Frostia King", FallenKing1, "Cassia::OnVictor2");
+ $@FKing_T2 = bg_monster($@FK_Team2, "001-2", rand(142, 145), rand(37, 80), "Halinarzo King", FallenKing2, "Cassia::OnVictor1");
+ bg_monster($@FK_Team1, "001-2", rand(105, 108), rand(37, 80), "Frostia Guard", FallenGuard1, "Cassia::OnSkip");
+ bg_monster($@FK_Team2, "001-2",rand(142, 145), rand(37, 80), "Halinarzo Guard", FallenGuard2, "Cassia::OnSkip");
initnpctimer();
end;
}
@@ -245,7 +245,7 @@ OnInit:
setunitdata(.@npcId, UDT_HEADTOP, LightPlatemail); // Light armor
setunitdata(.@npcId, UDT_HEADMIDDLE, JeansShorts); // Pants
setunitdata(.@npcId, UDT_HEADBOTTOM, LousyMoccasins); // Shoes
- setunitdata(.@npcId, UDT_WEAPON, PiouSlayer);
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
@@ -255,7 +255,7 @@ OnInit:
end;
OnEnterBG:
- $@FK_Team1 = waitingroom2bg("001-2",126, 38,"start#bat_a02::OnSide1Quit","");
+ $@FK_Team1 = waitingroom2bg("001-2",rand(105, 108), rand(37, 80),"start#bat_a02::OnSide1Quit","");
end;
}
@@ -271,7 +271,7 @@ OnInit:
setunitdata(.@npcId, UDT_HEADTOP, TerraniteArmor); // Terranite armor
setunitdata(.@npcId, UDT_HEADMIDDLE, JeansShorts); // Pants
setunitdata(.@npcId, UDT_HEADBOTTOM, LousyMoccasins); // Shoes
- setunitdata(.@npcId, UDT_WEAPON, PiouSlayer);
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
@@ -281,7 +281,7 @@ OnInit:
end;
OnEnterBG:
- $@FK_Team2 = waitingroom2bg("001-2",124,213,"start#bat_a02::OnSide2Quit","");
+ $@FK_Team2 = waitingroom2bg("001-2",rand(142, 145), rand(37, 80),"start#bat_a02::OnSide2Quit","");
end;
}
@@ -313,9 +313,11 @@ OnReadyCheck:
$@BGMaster1 = 1;
donpcevent "Lt. Randy::OnEnterBG";
donpcevent "Lt. Gerry::OnEnterBG";
+ setbgteam $@FK_Team1, 1;
+ setbgteam $@FK_Team2, 2;
+ bg_warp $@FK_Team1,"001-2",rand(105, 108), rand(37, 80);
+ bg_warp $@FK_Team2,"001-2",rand(142, 145), rand(37, 80);
donpcevent "Cassia::OnDoEvent";
- bg_warp $@FK_Team1,"001-2",126,38;
- bg_warp $@FK_Team2,"001-2",125,213;
//initnpctimer;
end;
}
diff --git a/npc/001-1/eventmaster.txt b/npc/001-1/eventmaster.txt
index f7630802a..6446185d3 100644
--- a/npc/001-1/eventmaster.txt
+++ b/npc/001-1/eventmaster.txt
@@ -1,21 +1,69 @@
// TMW2 Script
// Author:
-// Jesusalva
+// Jesusalva, Saulc
// Description:
// This GM NPC controls spawns and item drops on Aeros
+// Monsters are sorted alphabetically, except bif
001-1,250,20,0 script Mana Being#001-1 NPC_ALIGE_OUTSIDE_BARREL,{
- function spawner { // (name, ID, amount)
- areamonster("001-1", 171, 0, 339, 158, getarg(0), getarg(1), getarg(2), "Mana Being#001-1::OnAerosMobDeath");
+ function spawner { // (memo, ID, amount)
+ // First argument is a memorand for Script Writers, usually name. It must be present, but can have whatever value you want. (Unused)
+
+ // [0] East [1] West [2] Full
+ switch($@AEROS_SPWN) {
+ case 1:
+ areamonster("001-1", 20, 20, 140, 140, strmobinfo(1, getarg(1)), getarg(1), getarg(2), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ case 2:
+ areamonster("001-1", 20, 20, 340, 160, strmobinfo(1, getarg(1)), getarg(1), getarg(2), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ default:
+ areamonster("001-1", 171, 320, 158, 340, strmobinfo(1, getarg(1)), getarg(1), getarg(2), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ }
}
+ function mkitem { // ( ID{, Amount} )
+ // [0] East [1] West [2] Full makeitem
+ switch($@AEROS_SPWN) {
+ case 1:
+ for (.@i = 0; .@i < getarg(1,1); .@i++)
+ makeitem(getarg(0), 1, "001-1", rand(20,140), rand(20,140));
+ break;
+ case 2:
+ for (.@i = 0; .@i < getarg(1,1); .@i++)
+ makeitem(getarg(0), 1, "001-1", rand(20,340), rand(20,160));
+ break;
+ default:
+ for (.@i = 0; .@i < getarg(1,1); .@i++)
+ makeitem(getarg(0), 1, "001-1", rand(171,320), rand(158,340));
+ break;
+ }
+ }
+
+ function buryitem { // ( ID{, Amount} )
+ // [0] East [1] West [2] Full makeitem
+ switch($@AEROS_SPWN) {
+ case 1:
+ shovel_scatter("001-1", 20, 20, 140, 140, getarg(0), getarg(1,1));
+ break;
+ case 2:
+ shovel_scatter("001-1", 20, 20, 340, 160, getarg(0), getarg(1,1));
+ default:
+ shovel_scatter("001-1",171,158, 320, 340, getarg(0), getarg(1,1));
+ }
+ }
+
+ .@curmobc=mobcount("001-1", "Mana Being#001-1::OnAerosMobDeath");
if (!is_gm()) goto L_Unauthorized;
@log_spawns=0;
- @log_ratio=.coins_rate;
+ @log_mode=$@AEROS_SPWN;
+ @log_ratio=$coinsrate;
mesn;
mes "Tired of walking the whole Aeros to spawn monsters, I was brought to existence.";
+ mes "Monsters left: "+str(.@curmobc);
L_Menu:
mes "";
@@ -24,16 +72,21 @@ L_Menu:
"Abort",L_Close,
"Start/End Event", L_EventHandler,
"Spawn",L_Spawn,
- rif(countitem(StrangeCoin) >= 10, "Drop a Toothbrush! (10x Coins)"),L_Drop,
+ rif(countitem(StrangeCoin) >= 10, "Drop stuff! (10x Coins)"),L_Drop,
+ "Reconfigure spawn/warp points",L_Conf,
+ rif(.WALL, "Open Extension"), L_DelWall,
+ rif(!.WALL, "Close Extension"), L_AddWall,
"Adjust coins drop rate",L_Rate;
L_Unauthorized:
- dispbottom l("I am too far away to talk. Weird floating thingy...");
+ //dispbottom l("I am too far away to talk. Weird floating thingy...");
+ dispbottom l("Monsters left: @@", .@curmobc);
end;
L_Close:
if (@log_spawns > 0) logmes "spawned "+str(@log_spawns)+" beigns at Aeros.", LOGMES_ATCOMMAND;
- if (@log_ratio != .coins_rate) logmes "set aeros ratio from "+str(@log_ratio)+" to "+str(.coins_rate), LOGMES_ATCOMMAND;
+ if (@log_ratio != $coinsrate) logmes "set aeros ratio from "+str(@log_ratio)+" to "+str($coinsrate), LOGMES_ATCOMMAND;
+ if (@log_mode == $@AEROS_SPWN) logmes "configured aeros spawn area to "+str($@AEROS_SPWN), LOGMES_ATCOMMAND;
close;
L_Spawn:
@@ -41,11 +94,23 @@ L_Spawn:
mes "Spawn from a preset (with intended levels) from this menu. Otherwise, use @aeros with same syntax.";
mes "(agr) means Agressive Monsters on the set, DO NOT ABUSE.";
next;
+ menu
+ "Abort", L_Menu,
+ "Presets", L_Preset,
+ "Normal", L_Norm,
+ "Slime", L_Sli,
+ "Plants", L_Plants,
+ "Aggressive", L_Agr,
+ "GM Event Only", L_EventOnly,
+ "Boss", L_Boss;
+
+
+L_Preset:
select
"Abort", // 1
"20x Piou, Piousee, Ratto, 10x Croc", // 2
"20x Little Blub, 10x Plushroom Field", // 3
- "(agr) 10x Tipiu, 10x Cave Maggot, 10x Bat", // 4
+ "(agr) 5x Tipiu, 10x Cave Maggot, 10x Bat", // 4
"20x Scorpion, 10x Duck, 10x Maggot", // 5
"10x Red Scorpion, 20x Fire Goblin, 5x Mana Ghost", // 6
"(agr) 1x Saxso Ghost, 20x House Maggot", // 7
@@ -61,78 +126,79 @@ L_Spawn:
switch (@menu) {
case 1:
+ goto L_Spawn;
break;
case 2:
- spawner(l("Piou"), 1002, 20);
- spawner(l("Piousee"), 1003, 20);
- spawner(l("Ratto"), 1005, 20);
- spawner(l("Croc"), 1006, 10);
+ spawner(strmobinfo(1, Piou), Piou, 20);
+ spawner(strmobinfo(1, Piousee), Piousee, 20);
+ spawner(strmobinfo(1, Ratto), Ratto, 20);
+ spawner(strmobinfo(1, Croc), Croc, 10);
@log_spawns=@log_spawns+70;
break;
case 3:
- spawner(l("Little Blub"), 1007, 20);
- spawner(l("Plushroom Field"), 1011, 10);
+ spawner(strmobinfo(1, LittleBlub), LittleBlub, 20);
+ spawner(strmobinfo(1, PlushroomField), PlushroomField, 10);
@log_spawns=@log_spawns+30;
break;
case 4:
- spawner(l("Tipiu"), 1015, 10);
- spawner(l("Cave Maggot"), 1027, 10);
- spawner(l("Bat"), 1039, 10);
- @log_spawns=@log_spawns+30;
+ spawner(strmobinfo(1, Tipiu), Tipiu, 5);
+ spawner(strmobinfo(1, CaveMaggot), CaveMaggot, 10);
+ spawner(strmobinfo(1, Bat), Bat, 10);
+ @log_spawns=@log_spawns+25;
break;
case 5:
- spawner(l("Scorpion"), 1071, 20);
- spawner(l("Duck"), 1029, 10);
- spawner(l("Maggot"), 1030, 10);
+ spawner(strmobinfo(1, Scorpion), Scorpion, 20);
+ spawner(strmobinfo(1, Duck), Duck, 10);
+ spawner(strmobinfo(1, Maggot), Maggot, 10);
@log_spawns=@log_spawns+40;
break;
case 6:
- spawner(l("Red Scorpion"), 1002, 10);
- spawner(l("Fire Goblin"), 1067, 20);
- spawner(l("Mana Ghost"), 1068, 5);
+ spawner(strmobinfo(1, RedScorpion), RedScorpion, 10);
+ spawner(strmobinfo(1, ManaBug), FireGoblin, 20);
+ spawner(strmobinfo(1, ManaGhost), ManaGhost, 5);
@log_spawns=@log_spawns+35;
break;
case 7:
- spawner(l("Saxso Ghost"), 1076, 1);
- spawner(l("House Maggot"), 1084, 20);
+ spawner(strmobinfo(1, SaxsoGhost), SaxsoGhost, 1);
+ spawner(strmobinfo(1, HouseMaggot), HouseMaggot, 20);
@log_spawns=@log_spawns+21;
break;
case 8:
- spawner(l("Slime Blast"), 1090, 5);
- spawner(l("Red Slime"), 1092, 5);
- spawner(l("White Slime"), 1094, 10);
+ spawner(strmobinfo(1, SlimeBlast), SlimeBlast, 5);
+ spawner(strmobinfo(1, RedSlime), RedSlime, 5);
+ spawner(strmobinfo(1, WhiteSlime), WhiteSlime, 10);
@log_spawns=@log_spawns+20;
break;
case 9:
- spawner(l("Mouboo"), 1023, 5);
- spawner(l("Bandit"), 1024, 4);
- spawner(l("Black Scorpion"), 1074, 2);
+ spawner(strmobinfo(1, Mouboo), Mouboo, 5);
+ spawner(strmobinfo(1, Bandit), Bandit, 4);
+ spawner(strmobinfo(1, BlackScorpion), BlackScorpion, 2);
@log_spawns=@log_spawns+11;
break;
case 10:
- spawner(l("Giant Maggot"), 1031, 10);
- spawner(l("Cave Snake"), 1035, 10);
- spawner(l("Mana Bug"), 1075, 10);
+ spawner(strmobinfo(1, GiantMaggot), GiantMaggot, 10);
+ spawner(strmobinfo(1, CaveSnake), CaveSnake, 10);
+ spawner(strmobinfo(1, ManaBug), ManaBug, 10);
@log_spawns=@log_spawns+30;
break;
case 11:
- spawner(l("Golden Scorpion"), 1078, 1);
- spawner(l("Night Scorpion"), 1077, 1);
- spawner(l("Santa Slime"), 1096, 5);
- spawner(l("Copper Slime"), 1088, 10);
+ spawner(strmobinfo(1, GoldenScorpion), GoldenScorpion, 1);
+ spawner(strmobinfo(1, NightScorpion), NightScorpion, 1);
+ spawner(strmobinfo(1, SantaSlime), SantaSlime, 5);
+ spawner(strmobinfo(1, CopperSlime), CopperSlime, 10);
@log_spawns=@log_spawns+17;
break;
case 12:
- spawner(l("Frostia Guard"), 1081, 1);
- spawner(l("Halinarzo Guard"), 1082, 1);
+ spawner(strmobinfo(1, FallenGuard1), FallenGuard1, 1);
+ spawner(strmobinfo(1, FallenGuard2), FallenGuard2, 1);
@log_spawns=@log_spawns+2;
break;
//"10x Clover Path, 5 groups of 5 random Bifs", // 13
//"5x Bifs, 4 groups of 5 random Bifs"; // 14
case 13:
- spawner(l("Clover Field"), 1028, 10);
+ spawner(strmobinfo(1, CloverPatch), CloverPatch, 10);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
@@ -141,7 +207,7 @@ L_Spawn:
@log_spawns=@log_spawns+35;
break;
case 14:
- spawner(l("Bif"), 1058, 5);
+ spawner(strmobinfo(1, Bif), Bif, 5);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
spawner(l("Mysterious Bif"), rand(1098,1118), 5);
@@ -150,28 +216,610 @@ L_Spawn:
break;
}
- if (@menu == 1) goto L_Menu;
+ if (@menu == 1) goto L_Spawn;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_Preset;
+
+L_Norm:
+ select
+ "Abort", // 1
+ "Alpha Mouboo", // 2
+ "Bat", // 3
+ "Bee", // 4
+ "Blub", // 5
+ "Candor Scorpion", // 6
+ "Cave Snake", // 7
+ "Crafty", // 8
+ "Croc", // 9
+ "Desert Loghead", // 10
+ "Desert Maggot", // 11
+ "Duck", // 12
+ "Fire Goblin", // 13
+ "Fluffy", // 14
+ "Forest Mushroom", // 15
+ "Little Blub", // 16
+ "Giant Maggot", // 17
+ "Golden Scorpion", // 18
+ "Iced Fluffy", // 19
+ "LogHead", // 20
+ "Maggot", // 21
+ "Magic Goblin", // 22
+ "Mana Bug", // 23
+ "Mana Ghost", // 24
+ "Moggun", // 25
+ "Mouboo", // 26
+ "Ocean Croc", // 27
+ "Pinkie", // 28
+ "Piou", // 29
+ "Piousse", // 30
+ "Poison Spiky Mushroom", // 31
+ "Ratto", // 32
+ "Red Butterfly", // 33
+ "Red Mushroom", // 34
+ "Red Scorpion", // 35
+ "Scorpion", // 36
+ "Silk Worm", // 37
+ "Squirrel", // 38
+ "Tipiou", // 39
+ "Toppy Blub", // 40
+ "Centaur", // 41
+ "Mana Piou", // 42
+ "Tortuga";//default
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("AlphaMouboo"), AlphaMouboo, .@c); break;
+ case 3:
+ spawner(("Bat"), Bat, .@c); break;
+ case 4:
+ spawner(("Bee"), Bee, .@c); break;
+ case 5:
+ spawner(("Blub"), Blub, .@c); break;
+ case 6:
+ spawner(("CandorScorpion"), CandorScorpion, .@c); break;
+ case 7:
+ spawner(("CaveSnake"), CaveSnake, .@c); break;
+ case 8:
+ spawner(("Crafty"), Crafty, .@c); break;
+ case 9:
+ spawner(("Croc"), Croc, .@c); break;
+ case 10:
+ spawner(("DesertLoghead"), DesertLogHead, .@c); break;
+ case 11:
+ spawner(("DesertMaggot"), DesertMaggot, .@c); break;
+ case 12:
+ spawner(("Duck"), Duck, .@c); break;
+ case 13:
+ spawner(("FireGoblin"), FireGoblin, .@c); break;
+ case 14:
+ spawner(("Fluffy"), Fluffy, .@c); break;
+ case 15:
+ spawner(("ForestMushroom"), ForestMushroom, .@c); break;
+ case 16:
+ spawner(("LittleBlub"), LittleBlub, .@c); break;
+ case 17:
+ spawner(("GiantMaggot"), GiantMaggot, .@c); break;
+ case 18:
+ spawner(("GoldenScorpion"), GoldenScorpion, .@c); break;
+ case 19:
+ spawner(("IcedFluffy"), IcedFluffy, .@c); break;
+ case 20:
+ spawner(("LogHead"), LogHead, .@c); break;
+ case 21:
+ spawner(("Maggot"), Maggot, .@c); break;
+ case 22:
+ spawner(("MagicGoblin"), MagicGoblin, .@c); break;
+ case 23:
+ spawner(("ManaBug"), ManaBug, .@c); break;
+ case 24:
+ spawner(("ManaGhost"), ManaGhost, .@c); break;
+ case 25:
+ spawner(("Moggun"), Moggun, .@c); break;
+ case 26:
+ spawner(("Mouboo"), Mouboo, .@c); break;
+ case 27:
+ spawner(("OceanCroc"), OceanCroc, .@c); break;
+ case 28:
+ spawner(("Pinkie"), Pinkie, .@c); break;
+ case 29:
+ spawner(("Piou"), Piou, .@c); break;
+ case 30:
+ spawner(("Piousse"), Piousse, .@c); break;
+ case 31:
+ spawner(("PoisonSpikyMushroom"), PoisonSpikyMushroom, .@c); break;
+ case 32:
+ spawner(("Ratto"), Ratto, .@c); break;
+ case 33:
+ spawner(("RedButterfly"), RedButterfly, .@c); break;
+ case 34:
+ spawner(("RedMushroom"), RedMushroom, .@c); break;
+ case 35:
+ spawner(("RedScorpion"), RedScorpion, .@c); break;
+ case 36:
+ spawner(("Scorpion"), Scorpion, .@c); break;
+ case 37:
+ spawner(("SilkWorm"), SilkWorm, .@c); break;
+ case 38:
+ spawner(("Squirrel"), Squirrel, .@c); break;
+ case 39:
+ spawner(("Tipiou"), Tipiou, .@c); break;
+ case 40:
+ spawner(("ToppyBlub"), ToppyBlub, .@c); break;
+ case 41:
+ spawner(("Centaur"), Centaur, .@c); break;
+ case 42:
+ spawner(("ManaPiou"), ManaPiou, .@c); break;
+ default:
+ spawner(("Tortuga"), Tortuga, .@c); break;
+ }
+
+ @log_spawns=@log_spawns+.@c;
mes "";
mes "Completed.";
mes "Total spawns: "+str(@log_spawns);
next;
- goto L_Spawn;
+ goto L_Norm;
+
+L_Sli:
+ select
+ "Abort", // 1
+ "Azul Slime", // 2
+ "Blue Slime", // 3
+ "Candied Slime", // 4
+ "Copper Slime", // 5
+ "Green Slime", // 6
+ "Lava Slime", // 7
+ "Rudolph Slime", // 8
+ "Red Slime", // 9
+ "Santa Slime", // 10
+ "Sea Slime", // 11
+ "Slime Blast", // 12
+ "White Slime", // 13
+ "Yellow Slime"; // 14
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("AzulSlime"), AzulSlime, .@c); break;
+ case 3:
+ spawner(("BlueSlime"), BlueSlime, .@c); break;
+ case 4:
+ spawner(("CandiedSlime"), CandiedSlime, .@c); break;
+ case 5:
+ spawner(("CopperSlime"), CopperSlime, .@c); break;
+ case 6:
+ spawner(("GreenSlime"), GreenSlime, .@c); break;
+ case 7:
+ spawner(("LavaSlime"), LavaSlime, .@c); break;
+ case 8:
+ spawner(("RudolphSlime"), RudolphSlime, .@c); break;
+ case 9:
+ spawner(("RedSlime"), RedSlime, .@c); break;
+ case 10:
+ spawner(("SantaSlime"), SantaSlime, .@c); break;
+ case 11:
+ spawner(("SeaSlime"), SeaSlime, .@c); break;
+ case 12:
+ spawner(("SlimeBlast"), SlimeBlast, .@c); break;
+ case 13:
+ spawner(("WhiteSlime"), WhiteSlime, .@c); break;
+ case 14:
+ spawner(("YellowSlime"), YellowSlime, .@c); break;
+
+ }
+
+ @log_spawns=@log_spawns+.@c;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_Sli;
+
+
+L_Plants:
+ select
+ "Abort", // 1
+ "Chagashroom Field", // 2
+ "Clover Patch", // 3
+ "Cobalt Plant", // 4
+ "Dummy", // 5
+ "Gamboge Plant", // 6
+ "Manana Tree", // 7
+ "Mauve Plant", // 8
+ "Plushroom Field", // 9
+ "Small Ruby Bif", // 10
+ "Small Topaz Bif", // 11
+ "Small Emerald Bif", // 12
+ "Small Diamond Bif", // 13
+ "Small Amethyst Bif", // 14
+ "Small Sapphire Bif", // 15
+ "Ruby Bif", // 16
+ "Topaz Bif", // 17
+ "Emerald Bif", // 18
+ "Diamond Bif", // 19
+ "Amethyst Bif", // 20
+ "Sapphire Bif", // 21
+ "Big Ruby Bif", // 22
+ "Big Topaz Bif", // 23
+ "Big Emerald Bif", // 24
+ "Big Diamond Bif", // 25
+ "Big Amethyst Bif", // 26
+ "Big Sapphire Bif"; // 27
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("ChagashroomField"), ChagashroomField, .@c); break;
+ case 3:
+ spawner(("CloverPatch"), CloverPatch, .@c); break;
+ case 4:
+ spawner(("CobaltPlant"), CobaltPlant, .@c); break;
+ case 5:
+ spawner(("Dummy"), Dummy, .@c); break;
+ case 6:
+ spawner(("GambogePlant"), GambogePlant, .@c); break;
+ case 7:
+ spawner(("MananaTree"), MananaTree, .@c); break;
+ case 8:
+ spawner(("MauvePlant"), MauvePlant, .@c); break;
+ case 9:
+ spawner(("PlushroomField"), PlushroomField, .@c); break;
+ case 10:
+ spawner(("SmallRubyBif"), SmallRubyBif, .@c); break;
+ case 11:
+ spawner(("SmallTopazBif"), SmallTopazBif, .@c); break;
+ case 12:
+ spawner(("SmallEmeraldBif"), SmallEmeraldBif, .@c); break;
+ case 13:
+ spawner(("SmallDiamondBif"), SmallDiamondBif, .@c); break;
+ case 14:
+ spawner(("SmallAmethystBif"), SmallAmethystBif, .@c); break;
+ case 15:
+ spawner(("SmallSapphireBif"), SmallSapphireBif, .@c); break;
+ case 16:
+ spawner(("RubyBif"), RubyBif, .@c); break;
+ case 17:
+ spawner(("TopazBif"), TopazBif, .@c); break;
+ case 18:
+ spawner(("EmeraldBif"), EmeraldBif, .@c); break;
+ case 19:
+ spawner(("DiamondBif"), DiamondBif, .@c); break;
+ case 20:
+ spawner(("AmethystBif"), AmethystBif, .@c); break;
+ case 21:
+ spawner(("SapphireBif"), SapphireBif, .@c); break;
+ case 22:
+ spawner(("BigRubyBif"), BigRubyBif, .@c); break;
+ case 23:
+ spawner(("BigTopazBif"), BigTopazBif, .@c); break;
+ case 24:
+ spawner(("BigEmeraldBif"), BigEmeraldBif, .@c); break;
+ case 25:
+ spawner(("BigDiamondBif"), BigDiamondBif, .@c); break;
+ case 26:
+ spawner(("BigAmethystBif"), BigAmethystBif, .@c); break;
+ case 27:
+ spawner(("BigSapphireBif"), BigSapphireBif, .@c); break;
+
+ }
+
+ @log_spawns=@log_spawns+.@c;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_Plants;
+
+
+L_Agr:
+ select
+ "Abort", // 1
+ "Angry Red Scorpion", // 2
+ "Angry Scorpion", // 3
+ "Bandit", // 4
+ "Black Scorpion", // 5
+ "Cave Maggot", // 6
+ "Robin Bandit", // 7
+ "Dark Lizard", // 8
+ "Desert Bandit", // 9
+ "Frista Guard", // 10
+ "Forain", // 11
+ "Halin Guard", // 12
+ "House Maggot", // 13
+ "Magic Goblin", // 14
+ "Mountain Snake", // 15
+ "Ocean Pirate", // 16
+ "Sarracenus", // 17
+ "Skeleton", // 18
+ "Snake", // 19
+ "Tipiu", // 20
+ "Vampire Bat", // 21
+ "Wolvern", // 22
+ "Terranite", // 23
+ "Yeti"; // Default
+
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("AngryRedScorpion"), AngryRedScorpion, .@c); break;
+ case 3:
+ spawner(("AngryScorpion"), AngryScorpion, .@c); break;
+ case 4:
+ spawner(("Bandit"), Bandit, .@c); break;
+ case 5:
+ spawner(("BlackScorpion"), BlackScorpion, .@c); break;
+ case 6:
+ spawner(("CaveMaggot"), CaveMaggot, .@c); break;
+ case 7:
+ spawner(("RobinBandit"), RobinBandit, .@c); break;
+ case 8:
+ spawner(("DarkLizard"), DarkLizard, .@c); break;
+ case 9:
+ spawner(("DesertBandit"), DesertBandit, .@c); break;
+ case 10:
+ spawner(("Frostia Guard"), FallenGuard1, .@c); break;
+ case 11:
+ spawner(("Forain"), Forain, .@c); break;
+ case 12:
+ spawner(("Halin Guard"), FallenGuard2, .@c); break;
+ case 13:
+ spawner(("HouseMaggot"), HouseMaggot, .@c); break;
+ case 14:
+ spawner(("MagicGoblin"), MagicGoblin, .@c); break;
+ case 15:
+ spawner(("MountainSnake"), MountainSnake, .@c); break;
+ case 16:
+ spawner(("OceanPirate"), OceanPirate, .@c); break;
+ case 17:
+ spawner(("Sarracenus"), Sarracenus, .@c); break;
+ case 18:
+ spawner(("Skeleton"), Skeleton, .@c); break;
+ case 19:
+ spawner(("Snake"), Snake, .@c); break;
+ case 20:
+ spawner(("Tipiu"), Tipiu, .@c); break;
+ case 21:
+ spawner(("VampireBat"), VampireBat, .@c); break;
+ case 22:
+ spawner(("Wolvern"), Wolvern, .@c); break;
+ case 23:
+ spawner(("Terranite"), Terranite, .@c); break;
+ default:
+ spawner(("Yeti"), Yeti, .@c); break;
+
+ }
+
+ @log_spawns=@log_spawns+.@c;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_Agr;
+
+
+
+
+
+
+
+
+
+L_EventOnly:
+ mesc l("WARNING: Spawn these monsters with moderation!"), 1;
+ mesc l("Some of them have FORBIDDEN DROPS, which will be DELETED when their event starts!"), 1;
+ mes "";
+ select
+ "Abort", // 1
+ "Bhop Fluffy", // 2
+ "Easter Mouboo", // 3
+ "Evil Scythe", // 4
+ "Jack'O", // 5
+ "Magic Ratto", // 6
+ "Moonshroom", // 7
+ "Small Magic Bif", // 8
+ "Magic Bif", // 9
+ "Bronze Chest", // 10
+ "Bronze Mimic", // 11
+ "Silver Chest", // 12
+ "Silver Mimic", // 13
+ "Evil Chest", // 14
+ "Big Magic Bif"; // default
+
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("BhopFluffy"), BhopFluffy, .@c); break;
+ case 3:
+ spawner(("EasterMouboo"), EasterMouboo, .@c); break;
+ case 4:
+ spawner(("EvilScythe"), EvilScythe, .@c); break;
+ case 5:
+ spawner(("Jack'O"), JackO, .@c); // WUT
+ case 6:
+ spawner(("MagicRatto"), MagicRatto, .@c); break;
+ case 7:
+ spawner(("Moonshroom"), Moonshroom, .@c); // WUT
+ case 8:
+ spawner(("SmallMagicBif"), SmallMagicBif, .@c); break;
+ case 9:
+ spawner(("MagicBif"), MagicBif, .@c); break;
+ case 10:
+ spawner(("BronzeChest"), BronzeChest, .@c); break;
+ case 11:
+ spawner(("BronzeMimic"), BronzeMimic, .@c); break;
+ case 12:
+ spawner(("SilverChest"), SilverChest, .@c); break;
+ case 13:
+ spawner(("SilverMimic"), SilverMimic, .@c); break;
+ case 14:
+ spawner(("EvilChest"), EvilChest, .@c); break;
+ default:
+ spawner(("BigMagicBif"), BigMagicBif, .@c); break;
+ }
+
+ @log_spawns=@log_spawns+.@c;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_EventOnly;
+
+
+
+
+
+
+
+
+L_Boss:
+ select
+ "Abort", // 1
+ "Giant Mutated Bat", // 2
+ "Murderer Scorpion" , // 3
+ "Night Scorpion", // 4
+ "Saxso Ghost", // 5
+ "Bandit Lord", // 6
+ "Fafi Dragon", // 67
+ "The Yeti King"; // default
+
+ if (@menu != 1)
+ input .@c, 0, 100;
+ if (.@c == 0 && @menu != 1)
+ @menu=99;
+
+ switch (@menu) {
+ case 1:
+ goto L_Spawn;
+ break;
+ case 2:
+ spawner(("GiantMutatedBat"), GiantMutatedBat, .@c); break;
+ case 3:
+ spawner(("MurdererScorpion"), MurdererScorpion, .@c); break;
+ case 4:
+ spawner(("NightScorpion"), NightScorpion, .@c); break;
+ case 5:
+ spawner(("SaxsoGhost"), SaxsoGhost, .@c); break;
+ case 6:
+ spawner(("BanditLord"), BanditLord, .@c); break;
+ case 7:
+ spawner(("Fafi"), FafiDragon, .@c); break;
+ default:
+ spawner(("TheYetiKing"), TheYetiKing, .@c); break;
+
+ }
+
+ @log_spawns=@log_spawns+.@c;
+ mes "";
+ mes "Completed.";
+ mes "Total spawns: "+str(@log_spawns);
+ next;
+ goto L_Boss;
+
L_Drop:
- delitem(StrangeCoin,10);
- makeitem(Toothbrush, 1, "001-1", rand(171,319), rand(20,138));
+ select
+ "Abort", // 1
+ "Bury 10x Coins", // 2
+ "Bury Random Crap", // 3
+ "Toothbrush", // 4
+ "Bronze Gift", // 5
+ "Silver Gift", // 6
+ "Golden Gift", // 7
+ "Prism Gift", // 8
+ "Supreme Gift"; // default
+
+ if (@menu != 1)
+ input .@c, 0, countitem(StrangeCoin)/10;
+ if (.@c == 0 && @menu != 1)
+ @menu=1;
+
+ delitem(StrangeCoin,.@c*10);
+ switch (@menu) {
+ case 1:
+ goto L_Menu;
+ break;
+ case 2:
+ buryitem(StrangeCoin, .@c*any(9,10,10,10,11,11)); break;
+ case 3:
+ setarray .@Treasure,
+ Bread,Candy,BugLeg,Cheese,Acorn,
+ ScorpionStinger,CoinBag,RustyKnife,TreasureKey,CasinoCoins,SulfurPowder,
+ Coal,IronOre,CopperOre,LeadOre,TinOre,SilverOre,GoldOre,PlatinumOre,IridiumOre,TitaniumOre,
+ Diamond,Ruby,Emerald,Sapphire,Topaz,Amethyst,
+ BoneArrow, SacredBullet;
+ buryitem(.@Treasure, .@c*any(9,10,10,10,11,11)); break;
+ case 4:
+ mkitem(Toothbrush, .@c); break;
+ case 5:
+ mkitem(BronzeGift, .@c); break;
+ case 6:
+ mkitem(SilverGift, .@c); break;
+ case 7:
+ mkitem(GoldenGift, .@c); break;
+ case 8:
+ mkitem(PrismGift, .@c); break;
+ default:
+ mkitem(SupremeGift, .@c); break;
+
+ }
+
mes "";
- mes "Dropped.";
+ mes "Dropped "+.@c+" stuff.";
next;
- goto L_Menu;
+ goto L_Drop;
L_Rate:
mes "";
- mes "Current drop rate: " + str(.coins_rate);
+ mes "Current drop rate: " + str($coinsrate);
mes "Insert drop rate (from 0 to 10000, capped at 5000 or 50%). Use -1 to disable.";
- input .coins_rate;
- if (.coins_rate > 5000)
- .coins_rate=5000;
+ input $coinsrate;
+ if ($coinsrate > 5000)
+ $coinsrate=5000;
mes "";
mes "Ratio adjusted.";
next;
@@ -179,24 +827,51 @@ L_Rate:
L_EventHandler:
if($@GM_EVENT) {
- announce l("The event is over!"), bc_all|bc_npc; // I haven't tested this yet.
+ announce ("The event is over!"), bc_all|bc_npc; // I haven't tested this yet.
$@GM_EVENT=0;
} else {
- announce l("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc;
+ announce ("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc;
+ channelmes("#world", "An event is happening on Aeros! Hurry up!");
$@GM_EVENT=1;
}
close;
+L_AddWall:
+ setcells "001-1", 169, 63, 169, 76, 3, "AerosWall";
+ //setwall("001-1", 169, 63, 13, DOWN, false, "AerosWall");
+ .WALL=1;
+ close;
+
+L_DelWall:
+ delcells "AerosWall";
+ //delwall("AerosWall");
+ .WALL=0;
+ close;
+
+L_Conf:
+ mes "";
+ mesn;
+ mesq l("Current Spawn Mode: "+$@AEROS_SPWN);
+ next;
+ select
+ l("[0] East Aeros"),
+ l("[1] West Aeros"),
+ l("[2] Full Aeros");
+ $@AEROS_SPWN=@menu-1;
+ goto L_Menu;
+
OnAerosMobDeath:
- if (.coinsrate < 0) end;
+ if ($coinsrate < 0) end;
// A level 100 monster can have a 4% drop bonus against a level 0 monster.
- // .coins_rate acts stablishing a basic drop value. Advised value: 600 (up to 10% for normal mobs)
- if (rand(10000) <= .coins_rate + (atoi(strmobinfo(3,killedrid))*4))
- getitem StrangeCoin, 1;
+ // $coinsrate acts stablishing a basic drop value. Advised value: 600 (up to 10% for normal mobs)
+ if (rand(10000) <= $coinsrate + (atoi(strmobinfo(3,killedrid))*4))
+ getmapxy(.@m$, .@x, .@y, 0);
+ makeitem(StrangeCoin, 1, .@m$, .@x, .@y);
end;
OnInit:
- .coins_rate=600; // Default value is 6% + mob str bonus
+ if ($coinsrate == 0)
+ $coinsrate=600; // Default value is 6% + mob str bonus
end;
}
@@ -221,8 +896,18 @@ OnCall:
end;
}
- areamonster("001-1", 171, 0, 339, 158, "Monster", atoi(.@atcmd_parameters$[0]), atoi(.@atcmd_parameters$[1]), "Mana Being#001-1::OnAerosMobDeath");
- logmes "@aeros "+.@atcmd_parameters$, LOGMES_ATCOMMAND;
+ switch($@AEROS_SPWN) {
+ case 1:
+ areamonster("001-1", 20, 20, 140, 140, strmobinfo(1, atoi(.@atcmd_parameters$[0])), atoi(.@atcmd_parameters$[0]), atoi(.@atcmd_parameters$[1]), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ case 2:
+ areamonster("001-1", 20, 20, 340, 160, strmobinfo(1, atoi(.@atcmd_parameters$[0])), atoi(.@atcmd_parameters$[0]), atoi(.@atcmd_parameters$[1]), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ default:
+ areamonster("001-1", 171, 320, 158, 340, strmobinfo(1, atoi(.@atcmd_parameters$[0])), atoi(.@atcmd_parameters$[0]), atoi(.@atcmd_parameters$[1]), "Mana Being#001-1::OnAerosMobDeath");
+ break;
+ }
+ logmes "@aeros "+strmobinfo(1, atoi(.@atcmd_parameters$[0])) + " " + .@atcmd_parameters$[1], LOGMES_ATCOMMAND;
dispbottom "All monsters summoned.";
end;
diff --git a/npc/001-1/mapflags.txt b/npc/001-1/mapflags.txt
index 8610ff211..d0bb944f4 100644
--- a/npc/001-1/mapflags.txt
+++ b/npc/001-1/mapflags.txt
@@ -1,3 +1,7 @@
-001-1 mapflag nosave 000-1,22,22
-001-1 mapflag nopenalty
001-1 mapflag zone Aeros
+001-2 mapflag zone Event
+001-3 mapflag zone Event
+001-3-1 mapflag zone Event
+
+001-4 mapflag zone Aeros
+001-5 mapflag zone Aeros
diff --git a/npc/001-1/portal.txt b/npc/001-1/portal.txt
index 40f3e3d9c..0240de50b 100644
--- a/npc/001-1/portal.txt
+++ b/npc/001-1/portal.txt
@@ -14,8 +14,6 @@ OnTouch:
l("No."), L_Close,
rif(is_admin() && !$@GM_EVENT, l("Enable Event")), L_Enable,
rif(is_admin() && $@GM_EVENT, l("Disable Event")), L_Disable,
- rif(is_gm() && .WALL, l("Open Extension")), L_DelWall,
- rif(is_gm() && !.WALL, l("Close Extension")), L_AddWall,
l("Yes."), L_Leave;
L_Leave:
@@ -30,18 +28,54 @@ L_Disable:
$@GM_EVENT=0;
close;
-L_AddWall:
- setcells "001-1", 169, 63, 169, 76, 3, "AerosWall";
- //setwall("001-1", 169, 63, 13, DOWN, false, "AerosWall");
- .WALL=1;
+// Uses l() to translate utilities
+L_TranslationFix:
+ mes l("Magic Maggot");
+ mes l("Monster");
+ mes l("Monster King");
+ mes l("Monster General");
+ mes l("Monster Admiral");
+ mes l("Monster Major");
+ mes l("Monster Captain");
+ mes l("Monster Lieutenant");
+ mes l("Monster Sergeant");
+ mes l("Monster Soldier");
+ mes l("Random Bif");
+ // Messages
+ mes l("All monsters summoned!");
+ mes l("Mercy has been granted.");
+ mes l("Judgement has passed.");
+ mes l("Warping to save point.");
+ mes l("Your save point has been changed.");
+ mes l("Warped.");
+ mes l("Item created.");
+ mes l("Welcome to TMW-2: Moubootaur Legends! We hope you have a great time in our server!");
+ mes l("You have been jailed by a GM.");
+ mes l("A GM has discharged you from jail.");
+ mes l("This item cannot be dropped.");
+ mes l("This item cannot be sold.");
+ mes l("This item cannot be auctioned.");
+ mes l("This item cannot be traded.");
+ mes l("This item cannot be stored.");
close;
-L_DelWall:
- delcells "AerosWall";
- //delwall("AerosWall");
- .WALL=0;
+L_Close:
+ closedialog;
close;
+}
-L_Close:
+// This is a copy for west Aeros
+001-1,23,107,0 script World Gate 2 NPC_HIDDEN,1,0,{
+OnTouch:
+ mesn;
+ mes l("This Portal can send your soul back to the world, along any items, money and/or experience gained.");
+ mes l("Would you like to leave this place?");
+ select
+ l("No."),
+ l("Yes.");
+
+ if (@menu == 2)
+ warp getsavepoint(0), getsavepoint(1), getsavepoint(2);
+ closedialog;
close;
}
diff --git a/npc/001-1/rewards.txt b/npc/001-1/rewards.txt
index ad716bebe..92e387098 100644
--- a/npc/001-1/rewards.txt
+++ b/npc/001-1/rewards.txt
@@ -32,29 +32,40 @@ OnInit:
tradertype(NST_CUSTOM);
- // Equipment
- sellitem ThunderStaff,20000;
- sellitem PiouEgg,4500;
+ // Rare Equipment selection.
+ // *these* are really rare!
+ sellitem ThunderStaff,10000;
+ sellitem PiouEgg,4350;
+ sellitem DeliciousCookie,3600;
+ sellitem TopHat, 1800;
sellitem BowlerHat, 800;
sellitem AshUrn,700;
sellitem Googles,600;
- sellitem BunnyEars, 500;
// Temporary, Seasonal, for events, rare drops, next release
- sellitem ChampionshipBow, 1000;
+ sellitem BlacksmithAxe, 36000;
+ sellitem DesertBow, 9000;
+ sellitem MiereCleaver, 3000;
+ sellitem Chainmail, 3000;
+ sellitem LeatherShirt, 350;
sellitem JeansShorts, 300;
- sellitem PiouSlayer, 150;
- sellitem WoodenSword, 100;
- // Temporary, but later may sell rare dyes (eg. golden?)
- sellitem RedCottonDye, 50;
- sellitem GreenCottonDye, 50;
- sellitem BlueCottonDye, 50;
+ // Awesome Feature, pending quest, DO NOT FORGET, @JESUSALVA
+ sellitem IronShovel,200;
+
+ // Temporary, but later may sell rare dyes (eg. purple and... golden?)
+ sellitem RedDye, 50;
+ sellitem GreenDye, 50;
+ sellitem BlueDye, 50;
// Consumables
sellitem ElixirOfLife,35;
- sellitem Grenade,12;
+ sellitem CelestiaTea,20;
+ sellitem Grenade,rand(10,15); // I really don't care about the price of this. Used to be 12.
+ sellitem CursedArrow,10;
sellitem Curshroom,7;
+ sellitem Plushroom,5;
+ sellitem Chagashroom,5;
sellitem PetcaringGuide,5; // I needed to add this somewhere
end;
diff --git a/npc/001-3-1/_import.txt b/npc/001-3-1/_import.txt
new file mode 100644
index 000000000..c76277ccc
--- /dev/null
+++ b/npc/001-3-1/_import.txt
@@ -0,0 +1,3 @@
+// Map 001-3-1: Saulc's Palace
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/001-3-1/_warps.txt",
diff --git a/npc/001-3-1/_warps.txt b/npc/001-3-1/_warps.txt
new file mode 100644
index 000000000..462db80d7
--- /dev/null
+++ b/npc/001-3-1/_warps.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-3-1: Saulc's Palace warps
+001-3-1,24,62,0 warp #001-3-1_24_62 0,0,001-3,127,65
+001-3-1,117,62,0 warp #001-3-1_117_62 0,0,001-3,127,125
+001-3-1,45,127,0 warp #001-3-1_45_127 3,0,001-3,104,81
+001-3-1,45,83,0 warp #001-3-1_45_83 3,0,001-3-1,106,116
+001-3-1,107,117,0 warp #001-3-1_107_117 3,0,001-3-1,44,84
+001-3-1,116,127,0 warp #001-3-1_116_127 2,0,001-3,106,66
+001-3-1,97,127,0 warp #001-3-1_97_127 2,0,001-3,101,66
diff --git a/npc/005-5-2/_savepoints.txt b/npc/001-3/_import.txt
index 93f58f12f..a49e27bc7 100644
--- a/npc/005-5-2/_savepoints.txt
+++ b/npc/001-3/_import.txt
@@ -1,2 +1,3 @@
+// Map 001-3: Saulc's Home
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 005-5-2: Merchant Guild saves
+"npc/001-3/_warps.txt",
diff --git a/npc/001-3/_warps.txt b/npc/001-3/_warps.txt
new file mode 100644
index 000000000..e80597123
--- /dev/null
+++ b/npc/001-3/_warps.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-3: Saulc's Home warps
+001-3,80,123,0 warp #001-3_80_123 0,0,001-1,0,0
+001-3,127,124,0 warp #001-3_127_124 0,0,001-3-1,117,61
+001-3,104,80,0 warp #001-3_104_80 3,0,001-3-1,45,126
+001-3,106,65,0 warp #001-3_106_65 0,0,001-3-1,116,126
+001-3,127,64,0 warp #001-3_127_64 0,0,001-3-1,24,61
+001-3,101,65,0 warp #001-3_101_65 0,0,001-3-1,97,126
diff --git a/npc/001-4/_import.txt b/npc/001-4/_import.txt
index ec47c3be9..a580541c2 100644
--- a/npc/001-4/_import.txt
+++ b/npc/001-4/_import.txt
@@ -3,6 +3,5 @@
"npc/001-4/_mobs.txt",
"npc/001-4/event_soulmenhir.txt",
"npc/001-4/lilica.txt",
-"npc/001-4/mapflags.txt",
"npc/001-4/mushroom.txt",
"npc/001-4/traps.txt",
diff --git a/npc/001-4/mapflags.txt b/npc/001-4/mapflags.txt
deleted file mode 100644
index 00ad8718f..000000000
--- a/npc/001-4/mapflags.txt
+++ /dev/null
@@ -1 +0,0 @@
-001-4 mapflag nosave 000-1,22,22
diff --git a/npc/001-6/_import.txt b/npc/001-6/_import.txt
new file mode 100644
index 000000000..9adfa790d
--- /dev/null
+++ b/npc/001-6/_import.txt
@@ -0,0 +1,5 @@
+// Map 001-6: Cave Of Trials
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/001-6/_mobs.txt",
+"npc/001-6/mapflags.txt",
+"npc/001-6/warp.txt",
diff --git a/npc/001-6/_mobs.txt b/npc/001-6/_mobs.txt
new file mode 100644
index 000000000..aa7a0b2bb
--- /dev/null
+++ b/npc/001-6/_mobs.txt
@@ -0,0 +1,14 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-6: Cave Of Trials mobs
+001-6,94,24,92,38 monster Bif 1058,6,45000,35000
+001-6,159,156,6,7 monster King Of Trials 1079,1,60000,60000
+001-6,147,139,38,42 monster Giant Mutated Bat 1044,4,60000,60000
+001-6,40,143,22,37 monster Red Slime 1092,24,20000,60000
+001-6,40,75,33,37 monster Lava Slime 1097,12,30000,60000
+001-6,88,160,30,24 monster Yellow Slime 1091,8,60000,60000
+001-6,112,52,69,41 monster Snake 1122,17,60000,60000
+001-6,119,91,57,42 monster Black Scorpion 1074,23,30000,50000
+001-6,135,117,11,12 monster Dark Lizard 1051,2,60000,60000
+001-6,30,31,11,12 monster Dark Lizard 1051,1,60000,90000
+001-6,155,159,34,35 monster Lava Slime 1097,6,30000,30000
+001-6,169,77,22,37 monster Red Slime 1092,8,20000,60000
diff --git a/npc/001-6/mapflags.txt b/npc/001-6/mapflags.txt
new file mode 100644
index 000000000..c6904baa8
--- /dev/null
+++ b/npc/001-6/mapflags.txt
@@ -0,0 +1 @@
+001-6 mapflag zone MMO
diff --git a/npc/001-6/warp.txt b/npc/001-6/warp.txt
new file mode 100644
index 000000000..b0e387911
--- /dev/null
+++ b/npc/001-6/warp.txt
@@ -0,0 +1,32 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// TODO
+
+
+001-6,159,157,0 script Soren Village NPC_SUMMONING_CIRC,0,0,{
+ end;
+
+OnTouch:
+ if (@SorenWarpOnline == 1)
+ end;
+ dispbottom l("Loading warp, be at this spot in 15 seconds.");
+ @SorenWarpOnline=1;
+ addtimer 15000, "Soren Village::OnWarper";
+ end;
+
+OnWarper:
+ @SorenWarpOnline=0;
+ if (isin("001-6", 159, 157, 159, 157) && !ispcdead()) {
+ compareandsetq HurnscaldQuest_Celestia, 2, 3;
+ warp "soren", 179, 76;
+ } else {
+ dispbottom l("Failed to warp to Soren Village.");
+ }
+ end;
+
+OnInit:
+ .sex = G_OTHER;
+ end;
+}
diff --git a/npc/001-7/_import.txt b/npc/001-7/_import.txt
new file mode 100644
index 000000000..808e1ca58
--- /dev/null
+++ b/npc/001-7/_import.txt
@@ -0,0 +1,7 @@
+// Map 001-7: Frostia Cliffs
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/001-7/_mobs.txt",
+"npc/001-7/_warps.txt",
+"npc/001-7/barbarian.txt",
+"npc/001-7/celestia_bossfight.txt",
+"npc/001-7/mapflags.txt",
diff --git a/npc/001-7/_mobs.txt b/npc/001-7/_mobs.txt
new file mode 100644
index 000000000..677c9e0cc
--- /dev/null
+++ b/npc/001-7/_mobs.txt
@@ -0,0 +1,37 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-7: Frostia Cliffs mobs
+001-7,48,95,24,11 monster Ice Fluffy 1041,8,30000,30000
+001-7,103,96,14,14 monster Wolvern 1037,8,30000,30000
+001-7,30,23,6,2 monster White Slime 1094,5,30000,30000
+001-7,49,45,8,2 monster White Slime 1094,2,30000,30000
+001-7,41,49,16,2 monster Wolvern 1037,2,30000,30000
+001-7,27,53,8,2 monster Wolvern 1037,2,30000,30000
+001-7,39,55,1,1 monster Wolvern 1037,2,30000,30000
+001-7,93,37,8,7 monster White Slime 1094,5,30000,30000
+001-7,109,53,8,8 monster Moggun 1070,6,30000,30000
+001-7,67,138,25,7 monster Ice Fluffy 1041,8,30000,30000
+001-7,70,119,1,0 monster Blue Slime 1087,2,30000,30000
+001-7,103,87,1,4 monster Blue Slime 1087,2,30000,30000
+001-7,100,108,1,4 monster Blue Slime 1087,2,30000,30000
+001-7,74,41,9,5 monster Moggun 1070,5,30000,30000
+001-7,38,78,1,1 monster Wolvern 1037,2,30000,30000
+001-7,64,70,1,1 monster Wolvern 1037,2,30000,30000
+001-7,53,73,1,1 monster Wolvern 1037,2,30000,30000
+001-7,25,76,1,1 monster Wolvern 1037,2,30000,30000
+001-7,81,72,1,1 monster Wolvern 1037,2,30000,30000
+001-7,92,69,1,1 monster Wolvern 1037,2,30000,30000
+001-7,78,78,1,1 monster Wolvern 1037,2,30000,30000
+001-7,33,137,10,7 monster Ice Fluffy 1041,3,30000,30000
+001-7,31,64,1,1 monster Wolvern 1037,2,30000,30000
+001-7,52,59,1,1 monster Wolvern 1037,2,30000,30000
+001-7,47,66,1,1 monster Wolvern 1037,2,30000,30000
+001-7,38,67,1,1 monster Wolvern 1037,2,30000,30000
+001-7,24,115,1,1 monster Wolvern 1037,1,30000,100000
+001-7,84,95,2,1 monster Ice Fluffy 1041,2,30000,30000
+001-7,89,90,2,1 monster Ice Fluffy 1041,2,30000,30000
+001-7,77,97,2,1 monster Ice Fluffy 1041,2,30000,30000
+001-7,77,140,10,3 monster Yeti 1064,4,30000,30000
+001-7,94,135,3,3 monster White Slime 1094,2,30000,30000
+001-7,35,25,5,2 monster Alpha Mouboo 1056,1,30000,30000
+001-7,106,56,1,1 monster Wolvern 1037,2,30000,30000
+001-7,90,37,1,1 monster Wolvern 1037,2,30000,30000
diff --git a/npc/001-7/_warps.txt b/npc/001-7/_warps.txt
new file mode 100644
index 000000000..3c4a37560
--- /dev/null
+++ b/npc/001-7/_warps.txt
@@ -0,0 +1,21 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-7: Frostia Cliffs warps
+001-7,36,38,0 warp #001-7_36_38 0,0,001-7,26,23
+001-7,26,22,0 warp #001-7_26_22 0,0,001-7,36,39
+001-7,95,131,0 warp #001-7_95_131 0,0,001-7,77,113
+001-7,77,112,0 warp #001-7_77_112 0,0,001-7,95,132
+001-7,103,79,0 warp #001-7_103_79 0,0,001-7,36,23
+001-7,36,22,0 warp #001-7_36_22 0,0,001-7,103,80
+001-7,94,34,0 warp #001-7_94_34 0,0,001-7,114,84
+001-7,114,83,0 warp #001-7_114_83 0,0,001-7,94,35
+001-7,43,68,0 warp #001-7_43_68 0,0,001-7,67,45
+001-7,67,44,0 warp #001-7_67_44 0,0,001-7,43,69
+001-7,58,81,0 warp #001-7_58_81 0,0,001-7,31,52
+001-7,31,51,0 warp #001-7_31_51 0,0,001-7,58,82
+001-7,91,89,0 warp #001-7_91_89 0,0,001-7,153,31
+001-7,39,75,0 warp #001-7_39_75 0,0,001-7,61,123
+001-7,61,122,0 warp #001-7_61_122 0,0,001-7,39,76
+001-7,90,67,0 warp #001-7_90_67 0,0,001-7,104,51
+001-7,104,50,0 warp #001-7_104_50 0,0,001-7,90,68
+001-7,61,135,0 warp #001-7_61_135 0,0,001-7,98,65
+001-7,98,64,0 warp #001-7_98_64 0,0,001-7,61,136
diff --git a/npc/001-7/barbarian.txt b/npc/001-7/barbarian.txt
new file mode 100644
index 000000000..0a33e8cab
--- /dev/null
+++ b/npc/001-7/barbarian.txt
@@ -0,0 +1,74 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Wolvern Teeth Necklace Quest. Inhabits Frostia Hills.
+// The necklace can also be dropped by the Wolvern normally. Any of those will do
+// to advance the Barbarian Necklaces plot. (Until you get the final version of it)
+// This is a BONUS QUEST and can only be done via Yeti King Quest. It is NOT
+// meant to be doable outside it. It's overrewarding, yes. It's meant to be this way.
+// Do not tell everybody about this one :> Bonus to those who explore!
+// Variables:
+// FrostiaQuest_WolfNecklace - quest var
+
+
+001-7,72,39,0 script Barbarian#Frostia NPC_HALBERDBARBARIAN,{
+ .@q = getq(FrostiaQuest_WolfNecklace);
+ mesn;
+ mesq l("Hello my friend.");
+ if (BaseLevel < 35) goto L_Weakling;
+ if (.@q == 0 && countitem(ToothNecklace)) goto L_Quest;
+ if (.@q == 1) goto L_CheckItems;
+ close;
+
+L_Weakling:
+ mesq l("These cliffs are no place for weak people like you. You better teleport yourself away as soon as possible!");
+ close;
+
+L_Quest:
+ mesq l("Oooh, I see you have a @@ with you.", getitemlink(ToothNecklace));
+ next;
+ mesn;
+ mesq l("It's done with @@ teethes. These drain your life and raise your strenght to SMASH your foes!", getmonsterlink(Wolvern));
+ next;
+ mesn;
+ mesq l("If you bring me 2 @@, that Necklace, and 4000 GP, I can improve it. It'll be worth it, I warrant you!", getitemlink(WolvernTooth)); // 5% drop rate of tooth.
+ setq FrostiaQuest_WolfNecklace, 1;
+ close;
+
+L_CheckItems:
+ if (!countitem(ToothNecklace) || countitem(WolvernTooth) < 2 || Zeny < 4000) {
+ mesn;
+ mesq l("Sorry, but you don't have what I need.");
+ mesq l("I need 2 @@, the @@, and 4000 GP.", getitemlink(WolvernTooth), getitemlink(ToothNecklace));
+ close;
+ }
+ mesn;
+ mesq l("Are you with what I asked for?");
+ if (askyesno() == ASK_NO)
+ close;
+ mes "";
+
+ // No checks because I did before and cheaters must die.
+ if (Zeny < 4000) {
+ Zeny=0;
+ percentheal -75, -100;
+ mesc l("All cheaters must die."), 1;
+ close;
+ }
+ inventoryplace WolvernTeethNecklace, 1;
+ delitem WolvernTooth, 2;
+ delitem ToothNecklace, 1;
+ getitem WolvernTeethNecklace, 1;
+ Zeny=Zeny-4000;
+ getexp 15000, 0;
+ mesn;
+ mesq l("Here you go, thanks for doing my SECRET quest! Eh, not much to do here. But I like life this way.");
+ setq FrostiaQuest_WolfNecklace, 2;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/001-7/celestia_bossfight.txt b/npc/001-7/celestia_bossfight.txt
new file mode 100644
index 000000000..2c88178e6
--- /dev/null
+++ b/npc/001-7/celestia_bossfight.txt
@@ -0,0 +1,166 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Celestia Yeti King's quest. This controls the final showdown, and brings you
+// back home safely.
+//
+// If you cheated your way to here, you won't be able to interact with it.
+// No other safety measures are in place. Lone players cannot challenge the
+// Yeti King, there must be at least 2 players there to do the challenge.
+// BEWARE, the Yeti King gains stronger poisons the more people are attacking him.
+//
+// $@GM_OVERRIDE allows a single player to challenge him, as usual with all
+// co-op scripts.
+//
+// If you do not challenge him, the chance to challenge him again is lost.
+
+001-7,33,39,0 script #YetiKing NPC_YETI_KING,0,0,{
+ .@q=getq(HurnscaldQuest_Celestia);
+ if (.@q == 5 && !mobcount(.map$, "#YetiKing::OnVictory")) goto L_Survivor;
+ if (.@q == 6) goto L_GoHome;
+ end;
+
+L_GoHome:
+ mesc l("Go home now?");
+ if (askyesno() == ASK_YES)
+ warp "003-1-1", 94, 22;
+ closedialog;
+ if (!getareausers("001-7", 7))
+ setnpcdisplay .name$, NPC_YETI_KING;
+ close;
+
+L_Survivor:
+ if ($YETIKING_WINNER$ == "") {
+ $YETIKING_WINNER$=strcharinfo(0);
+ channelmes("#world", $YETIKING_WINNER$+" is the first player to finish Yeti King Quest!! GG, dude! %%N");
+ announce "All hail ##B"+$YETIKING_WINNER$+"##b, first to complete the ##3Yeti King Quest!", bc_all|bc_npc;
+ Karma=Karma+1;
+ getexp 0, 200;
+ getitem SilverGift, 1;
+ mesc l("CONGRATULATIONS! You are the first player to finish Yeti King quest!!"), 2;
+ mesc l("You just gained a Karma point, a Silver Gift, and 200 Job Exp for your bravery!"), 2;
+ next;
+ }
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Good job, kid. You've survived both the Cave Of Trials and Soren's Village.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("That was only to prove you're strong enough on yourself to do whatever you want to do. You have friends.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("In this world, your friends are your strength. You deserve a reward for the victory, please choose whatever you want.");
+ select
+ l("I want a gemstone or ore"),
+ l("I want experience"),
+ l("I want gold"),
+ l("I want coal");
+
+ mes "";
+ .@r=rand(1,100)+(@YetiKing_Challenger*5);
+ switch (@menu) {
+ case 1:
+ if (.@r > 70)
+ getitem rand(Diamond, Amethyst), 1;
+ else
+ getitem rand(CopperOre, TitaniumOre), 1;
+ break;
+ case 2:
+ getexp .@r*80, .@r*2; // max 8000 xp and 200 jp
+ break;
+ case 3:
+ Zeny=Zeny+.@r*75; // max 7500 gp
+ break;
+ case 4:
+ getitem Coal, (.@r/20); // max 5 coal
+ break;
+ }
+ compareandsetq HurnscaldQuest_Celestia, 5, 6;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Here kid. Frostia, the elf town, is somewhere near here, but I'm not sure if you can reach it from here.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("I can warp you home now.");
+ mes "";
+ select
+ l("Please, bring me back home."),
+ rif((getareausers("001-7", 7) > 1 || $@GM_OVERRIDE) && !mobcount(.map$, "#YetiKing::OnVictory") && @YetiKing_Challenger, l("No, we challenge you to a duel!")),
+ l("I'll walk around here a little more.");
+
+ mes "";
+ switch (@menu) {
+ case 1:
+ warp "003-1-1", 94, 22;
+ break;
+ case 2:
+ compareandsetq HurnscaldQuest_Celestia, 6, 7;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Foolish kids, do you think violence is the answer to everything?!");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("I give you five minutes to defeat me. Witness my wrath!");
+ if (mobcount(.map$, "#YetiKing::OnVictory"))
+ close;
+ setnpcdisplay .name$, NPC_NO_SPRITE;
+ npctalk l("*Roaaaaaar!*");
+ monster .map$, .x, .y, strmobinfo(1, YetiKing), YetiKing, 1, "#YetiKing::OnVictory";
+ initnpctimer;
+ break;
+ }
+ close;
+
+OnVictory:
+ stopnpctimer;
+ setnpcdisplay .name$, NPC_SUMMONING_CIRC;
+ Karma=Karma+1;
+ npctalk l("Good job... You can keep the drops. Touch here to return home.");
+ areatimer "001-7", 20, 20, 141, 171, 10, "#YetiKing::OnDefeat";
+ end;
+
+// This allows the challenger to go back home without dying.
+OnDefeat:
+ compareandsetq HurnscaldQuest_Celestia, 7, 6;
+ end;
+
+OnTimer60000:
+ npctalk "Time left: 4 minutes";
+ end;
+
+OnTimer120000:
+ npctalk "Time left: 3 minutes";
+ end;
+
+OnTimer180000:
+ npctalk "Time left: 2 minutes";
+ end;
+
+OnTimer240000:
+ npctalk "Time left: 1 minute";
+ end;
+
+OnTimer270000:
+ npctalk "Time left: 30 seconds";
+ end;
+
+OnTimer290000:
+ npctalk "Time left: 10 seconds";
+ end;
+
+OnTimer300000:
+ npctalk "Time is up!";
+ areatimer "001-7", 20, 20, 141, 171, 10, "#YetiKing::OnDefeat";
+ killmonster(.map$, "#YetiKing::OnVictory"); // I could use "All" as label, too
+ setnpcdisplay .name$, NPC_YETI_KING;
+ end;
+
+// Hourly, check if there are players and fix the sprite
+OnMinute17:
+ if (!getareausers("001-7", 21))
+ setnpcdisplay .name$, NPC_YETI_KING;
+ end;
+}
+
+
+
+
+
diff --git a/npc/001-7/mapflags.txt b/npc/001-7/mapflags.txt
new file mode 100644
index 000000000..296862ac4
--- /dev/null
+++ b/npc/001-7/mapflags.txt
@@ -0,0 +1 @@
+001-7 mapflag zone MMO
diff --git a/npc/001-8/_import.txt b/npc/001-8/_import.txt
new file mode 100644
index 000000000..0dce52764
--- /dev/null
+++ b/npc/001-8/_import.txt
@@ -0,0 +1,5 @@
+// Map 001-8: Hungry Quirin Arena
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/001-8/_mobs.txt",
+"npc/001-8/hub.txt",
+"npc/001-8/mapflags.txt",
diff --git a/npc/001-8/_mobs.txt b/npc/001-8/_mobs.txt
new file mode 100644
index 000000000..24a0290ca
--- /dev/null
+++ b/npc/001-8/_mobs.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-8: Hungry Quirin Arena mobs
+001-8,49,49,30,30 monster Piousse 1003,11,20000,20000
+001-8,28,47,10,7 monster Plushroom Field 1011,18,30000,30000
+001-8,70,51,10,7 monster Chagashroom Field 1128,18,30000,30000
+001-8,49,28,31,10 monster Manana Tree 1017,26,30000,30000
+001-8,28,70,10,10 monster Squirrel 1032,8,30000,30000
+001-8,67,72,14,9 monster Manana Tree 1017,8,30000,30000
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
new file mode 100644
index 000000000..d11352926
--- /dev/null
+++ b/npc/001-8/hub.txt
@@ -0,0 +1,385 @@
+// TMW2 Script
+// Author:
+// Ernando <ernando.quirino@hotmail.com> (Creator)
+// Jesusalva <admin@tmw2.org>
+// Description:
+// Hunger Games™ version for The Mana World Brazil v2, created by Ernando Quirino.
+
+001-8,0,0,0 script #QuirinoHUB NPC_HIDDEN,{
+ end;
+
+ // HUBspawn( mobID, amount )
+ function HUBspawn {
+ areamonster "001-8", 20, 20, 80, 80, strmobinfo(1, getarg(0)), getarg(0), getarg(1);
+ return; }
+
+ // HUBscatter( itemID )
+ function HUBscatter {
+ makeitem(getarg(0), 1, "001-8", rand(20,80), rand(20,80));
+ return; }
+
+ // HUBarrow()
+ function HUBarrow {
+ makeitem(rand(TrainingArrow,BoneArrow), rand(10,30), "001-8", rand(20,80), rand(20,80));
+ return; }
+
+ // HUBrandwpn( full )
+ function HUBrandwpn {
+ if (getarg(0)) {
+ .@x=rand(20,80); .@y=rand(20,80);
+ } else {
+ .@x=rand(44,55); .@y=rand(46,54);
+ }
+
+ .@r=rand(1,8);
+ switch(.@r){
+ case 1:
+ makeitem(rand(Knife, WoodenSword), 1, "001-8", .@x, .@y); break;
+ case 2:
+ makeitem(rand(SharpKnife, Dagger), 1, "001-8", .@x, .@y); break;
+ case 3:
+ makeitem(rand(ThunderStaff,Judgment), 1, "001-8", .@x, .@y); break;
+ case 4:
+ makeitem(rand(BronzeGladius,Scythe), 1, "001-8", .@x, .@y); break;
+ case 5:
+ makeitem(rand(WoodenBow, DesertBow), 1, "001-8", .@x, .@y); break;
+ case 6:
+ makeitem(rand(WoodenBow, ShortBow), 1, "001-8", .@x, .@y); break;
+ case 7:
+ makeitem(rand(ForestBow, BansheeBow), 1, "001-8", .@x, .@y); break;
+ default:
+ makeitem(WoodenShield, 1, "001-8", .@x, .@y); break;
+ }
+
+ return; }
+
+// Only one player standing! CONGRATULATIONS, YOU HAVE WON!!
+OnGameOver:
+ .@u=getmapusers("001-8")-1;
+ debugmes "OnGameOver Check: "+str(.@u);
+ if (.@u == 1) {
+ $@EQ_STATUS=2;
+ maptimer("001-8", 10, "#QuirinoHUB::OnVictory");
+ killmonsterall("001-8");
+ stopnpctimer;
+ cleanmap("001-8");
+ }
+ end;
+
+
+// Ordered by GM to start.
+OnStart:
+ $@EQ_STATUS=1;
+
+ // 2 Necklaces, 1 Charm and 1 Quiver
+ makeitem(rand(1000,1003), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(1006,1011), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(1150,1151), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(1172,1174), 1, "001-8", rand(44,55), rand(46,54));
+
+ makeitem(GoldenRing, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(SilverRing, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(SilverRing, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(PolishedDiamond,PolishedEmerald), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(PolishedDiamond,PolishedEmerald), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(PolishedDiamond,PolishedEmerald), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(TrainingArrow,BoneArrow), 50, "001-8", rand(44,55), rand(46,54));
+
+ makeitem(CandorBoots, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(LousyMoccasins, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(CottonBoots, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(CreasedBoots, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(TulimsharGuardBoots, 1, "001-8", rand(44,55), rand(46,54));
+
+ makeitem(rand(CreasedGloves, MinerGloves), 1, "001-8", rand(44,55), rand(46,54));
+
+ makeitem(CottonShorts, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(JeansShorts, 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(PirateShorts, 1, "001-8", rand(44,55), rand(46,54));
+
+
+ maptimer("001-8", 5000, "#QuirinoHUB::OnCount10");
+ announce("##1HUNGRY QUIRIN EVENT: ##3##BCountdown: 15 seconds!", bc_all|bc_npc);
+ end;
+
+OnCount10:
+ // Random arrows + weapon
+ makeitem(rand(TrainingArrow,BoneArrow), 50, "001-8", rand(44,55), rand(46,54));
+
+ // Random Weapon
+ HUBrandwpn(0);
+
+ // Throw some random, weighty stuff on the whole map.
+ HUBscatter(rand(CopperOre, TitaniumOre));
+
+ specialeffect(4, AREA, getcharid(3));
+ addtimer(5000, "#QuirinoHUB::OnCount5");
+ dispbottom l("10 seconds!");
+ end;
+
+OnCount5:
+ specialeffect(4, AREA, getcharid(3));
+
+ // Random Helmet
+ .@r=rand(1,9);
+ switch(.@r){
+ case 1:
+ makeitem(Bandana, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 2:
+ makeitem(Bucket, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 3:
+ makeitem(MoubooHat, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 4:
+ makeitem(CandleHelmet, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 5:
+ makeitem(PinkieHat, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 6:
+ makeitem(GraduationCap, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 7:
+ makeitem(SerfHat, 1, "001-8", rand(44,55), rand(46,54)); break;
+ case 8:
+ makeitem(MinerHat, 1, "001-8", rand(44,55), rand(46,54)); break;
+ default:
+ makeitem(PaperBag, 1, "001-8", rand(44,55), rand(46,54)); break;
+ }
+
+ // Throw some random, weighty stuff on the whole map.
+ HUBscatter(rand(CopperIngot, TitaniumIngot));
+
+ addtimer(5000, "#QuirinoHUB::OnBegin");
+ dispbottom l("5 seconds!");
+ end;
+
+OnBegin:
+ // Scatter some healing items, specially where the weapons are, to mess drop lists; Send armor too
+ makeitem(rand(Acorn, Croconut), 1, "001-8", rand(44,55), rand(46,54));
+ makeitem(rand(Manana, Carrot), 1, "001-8", rand(24,75), rand(26,74));
+ makeitem(rand(RoastedMaggot, CherryCake), 1, "001-8", rand(24,75), rand(26,74));
+ makeitem(rand(CreasedShirt, CandorShirt), 1, "001-8", rand(24,75), rand(26,74));
+ HUBscatter(rand(BottleOfDivineWater, BottleOfSewerWater));
+
+ // Scatter around whole map a few arrows, a training bow, a knife, a creased shirt and a creased knife
+ HUBarrow();
+ HUBscatter(TrainingBow);
+ HUBscatter(Knife);
+ HUBscatter(CreasedShirt);
+ HUBscatter(CreasedShorts);
+
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(AquadaBox, WoodenLog));
+
+ // Free player, let's start!
+ delcells "qhubN";
+ delcells "qhubS";
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ specialeffect(60, AREA, getcharid(3));
+ specialeffect(11, AREA, getcharid(3));
+ dispbottom col(l("Run! Event started!"), 1);
+ initnpctimer; // Restart the timer to fix any desync.
+ end;
+
+// We only have a schedule for the first 15 minutes. This accelerate stuff.
+OnSendWave:
+ HUBspawn(AngryRedScorpion, 3);
+ HUBspawn(BlackScorpion, 1);
+ HUBscatter(rand(PiberriesInfusion,LachesisBrew));
+ HUBscatter(CelestiaTea);
+ HUBarrow();
+ // Throw some ENTIRELY random stuff on the whole map.
+ HUBscatter(rand(700, 713));
+ HUBscatter(rand(731, 875));
+ HUBrandwpn(1);
+ HUBspawn(SlimeBlast, 1);
+ end;
+
+// 15 seconds after, I'm sure it is synced, so start spawning monsters.
+OnTimer15000:
+ HUBspawn(WhiteSlime, 3);
+ HUBspawn(SlimeBlast, 1);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ end;
+
+
+// one minute is due.
+OnTimer60000:
+ HUBspawn(RedSlime, 12);
+ HUBspawn(SlimeBlast, 4);
+ HUBarrow();
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ end;
+
+// Two minutes are due.
+OnTimer120000:
+ HUBspawn(LavaSlime, 2);
+ HUBspawn(GreenSlime, 2);
+ HUBspawn(SeaSlime, 2);
+ HUBspawn(CaveMaggot, 2);
+ HUBspawn(Bandit, 2);
+ HUBarrow();
+ HUBarrow();
+ HUBscatter(ElixirOfLife);
+ HUBscatter(FatesPotion);
+ HUBscatter(LachesisBrew);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ end;
+
+
+// Three minutes are due.
+OnTimer180000:
+ HUBspawn(GreenSlime, 4);
+ HUBspawn(SeaSlime, 4);
+ HUBspawn(Squirrel, 4);
+ HUBspawn(Snake, 1);
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBscatter(AshUrn);
+ HUBscatter(Monocle);
+ HUBscatter(GreenEggshellHat);
+ HUBscatter(LeatherShirt);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ end;
+
+// Five minutes are due.
+OnTimer300000:
+ HUBspawn(GreenSlime, 4);
+ HUBspawn(AngryRedScorpion, 3);
+ HUBspawn(Sarracenus, 1);
+ HUBspawn(Snake, 2);
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBscatter(LeatherGloves);
+ HUBrandwpn(1);
+ HUBrandwpn(1);
+ HUBscatter(GoldenPearlRing);
+ HUBscatter(ElixirOfLife);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ HUBscatter(rand(731, 875));
+ end;
+
+// Nine minutes are due.
+OnTimer540000:
+ HUBspawn(BlackScorpion, 2);
+ HUBspawn(DarkLizard, 3);
+ HUBspawn(Tipiou, 2);
+ HUBspawn(Snake, 2);
+ HUBspawn(MountainSnake, 1);
+ HUBspawn(SeaSlime, 2);
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBrandwpn(1);
+ HUBrandwpn(1);
+ HUBscatter(GoldenBlackPearlRing);
+ HUBscatter(ElixirOfLife);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ HUBscatter(rand(731, 875));
+ end;
+
+// Fifteen minutes are due. No more random stuff will show.
+OnTimer900000:
+ HUBspawn(BlackScorpion, 4);
+ HUBspawn(DarkLizard, 3);
+ HUBspawn(Tipiou, 2);
+ HUBspawn(Snake, 1);
+ HUBspawn(MountainSnake, 2);
+ HUBspawn(SeaSlime, 2);
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBarrow();
+ HUBrandwpn(1);
+ HUBrandwpn(1);
+ HUBrandwpn(1);
+ HUBscatter(ElixirOfLife);
+ // Throw some random stuff on the whole map.
+ HUBscatter(rand(731, 875));
+ HUBscatter(rand(731, 875));
+ HUBscatter(rand(731, 875));
+ end;
+
+OnVictory:
+ @qhub_victor=1;
+OnPCDieEvent:
+ @qhub_died=1;
+OnPCLogoutEvent:
+ getmapxy(.@mapa$, .@a,.@b, 0);
+ if (.@mapa$ == "001-8") {
+ // Deal with the environment {
+ .@u=getmapusers("001-8")-1;
+ mapannounce("001-8", "Total remaining players: "+.@u,0);
+ HUBscatter(rand(PiberriesInfusion,AtroposMixture));
+ HUBscatter(CelestiaTea);
+ HUBarrow();
+ HUBspawn(SlimeBlast, 1);
+ if (.@u % 2 == 1)
+ HUBscatter(Piberries);
+ if (.@u == 2) {
+ mapannounce("001-8", "The wolves were released!",0);
+ HUBscatter(ElixirOfLife);
+ HUBscatter(Aquada);
+ HUBscatter(Piberries);
+ HUBscatter(Beer);
+ HUBarrow();
+ HUBspawn(Wolvern, 4);
+ HUBspawn(NightScorpion, 2);
+ }
+ if (.@u == 1 && !@qhub_victor) {
+ donpcevent "#QuirinoHUB::OnGameOver";
+ }
+
+ // } Deal with the player {
+ clearitem();
+ if (checkpcblock() & PCBLOCK_ATTACK)
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+
+ // Check if to reduce clearitem() efficiency you've used the cart in an illegal way.
+ getcartinventorylist();
+ if (@cartinventorylist_count>=1) {
+ // Obviously a cheater, you should not be using the cart on the event. I HATE CHEATERS!
+ // Destroy everything you had on the cart
+ query_sql("DELETE FROM `cart_inventory` WHERE `char_id`="+getcharid(0));
+ // Destroy the cart. Cheaters doesn't deserve it!!
+ setcart(0);
+ // Delete the storage register. You now need to pay it again, to don't cheat anymore!
+ setq General_Banker, 0;
+ // You'll also forsake any event reward.
+ @qhub_victor=0;
+ @qhub_died=0;
+ }
+
+ // If you are the victor (and didn't cheat), you can now hold your reward ;-)
+ if (@qhub_victor) {
+ getitem GoldenGift, 1;
+ Zeny=Zeny+rand(500, 2500);
+ }
+ if (@qhub_died || @qhub_victor)
+ getexp rand(100,300), 0; // Dying on this map is enough to get a reward. Logout = no reward.
+
+ // You'll be revived/fully healed, and then warped.
+ // FIXME: It will throw you in Nard's ship if you are on logout...
+ recovery(getcharid(3));
+ // If recovery() is broken:
+ //atcommand "#alive \""+strcharinfo(0)+"\"";
+ //percentheal 100, 100;
+ warp "000-1", 22, 22;
+ }
+ @qhub_victor=0;
+ @qhub_died=0;
+ end;
+
+}
+
diff --git a/npc/001-8/mapflags.txt b/npc/001-8/mapflags.txt
new file mode 100644
index 000000000..ee2bf319e
--- /dev/null
+++ b/npc/001-8/mapflags.txt
@@ -0,0 +1,2 @@
+001-8 mapflag zone MMO
+001-8 mapflag pvp
diff --git a/npc/005-5-2/_mobs.txt b/npc/001-9/_import.txt
index 012b3bc0e..417c1114c 100644
--- a/npc/005-5-2/_mobs.txt
+++ b/npc/001-9/_import.txt
@@ -1,2 +1,2 @@
+// Map 001-9: Eternity Maze
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 005-5-2: Merchant Guild mobs
diff --git a/npc/002-1/_mobs.txt b/npc/002-1/_mobs.txt
index be79cb501..0cc92c0f6 100644
--- a/npc/002-1/_mobs.txt
+++ b/npc/002-1/_mobs.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 002-1: Second Deck mobs
-002-1,52,32,21,9 monster Piou 1002,3,30000,20000
+002-1,49,30,25,12 monster Piou 1002,2,30000,20000,PiouSpwn::OnFakeKill
diff --git a/npc/002-1/alige.txt b/npc/002-1/alige.txt
index 665f1ef9e..a0d94442b 100644
--- a/npc/002-1/alige.txt
+++ b/npc/002-1/alige.txt
@@ -1,322 +1,215 @@
// TMW2 Scripts.
-// Evol scripts.
+//
+// TMW-BR Original Authors:
+// Programmer: Adson Renato
+// Texts: Arkanjo
+// Review: Jesusalva
+//
// Authors:
-// Ablu
-// Alige
-// Qwerty Dragon
-// Reid
-// Vasily_Makarov
// Jesusalva
// Description:
-// Stowaway 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.
-
-002-1,45,27,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;
-}
+// Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes,
+// food, water, and money for an item.
+// In BR originals requested a four leaf clover to do luck magic, in order to not be caught.
+// That would imply teaching a new skill, and I'm not felling like it, so I removed.
002-1,45,26,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?");
+ if (BaseLevel < 42) goto L_Weak;
+ .@q=getq(ShipQuests_Alige);
+ if (.@q == 1) goto L_Return;
+ if (.@q == 2) goto L_End;
+ mesn;
+ mesq lg("Hey, dude! The guards are after me. I need your help, and I can reward you.");
next;
- restorecam;
-
+ mesn strcharinfo(0);
menu
- lg("I am, who are you?"), -,
- lg("Indeed, I am not."), L_NeedHelp;
-
- mes "";
- mesn "Narrator";
- mes col(l("The stowaway doesn't answer."), 9);
+ l("Guaaaards! Sailors! Help! We have a stowaway!"), L_Revolt,
+ l("Not right now, I'm busy."), L_Close,
+ l("Did you said reward?!"), L_GoGo;
+L_Weak:
+ mesc l("You thought there was someone here. It must have been your imagination.");
close;
-L_NeedHelp:
- setcamnpc;
+L_Revolt:
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."), -;
-
- closedialog;
+ message strcharinfo(0), l("Guaaaards! Sailors! Help! We have a stowaway!");
+ mesn;
+ mesq l("No, please don't! I have 3 kids to feed. They are looking for me for contraband. Please, let me go!");
close;
-L_CanHelp:
- setcamnpc;
+L_GoGo:
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!");
+ mesq l("Yes, I need to get out of here the earliest possible.");
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!");
+ mesn strcharinfo(0);
+ mesq l("So tell me already what you need, and what is the reward!");
next;
- restorecam;
-
+// Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes,
+// food, water, and money for a hat.
+ mesn;
+ mesc l("Alige hands you an old paper patch.");
+ next;
+ mesn l("Old Paper Patch");
+ mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion));
+ mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread));
+ mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese));
+ mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake));
+ mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
+ mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion));
+ mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion));
+ mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye));
+ mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye));
+ mes l("* @@/7.500 GP", Zeny);
+ next;
+ // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite
+ mesn;
+ mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet));
menu
- l("Sure, but what will you give me in exchange?"), L_AboutReward,
- l("Why don't you come out?"), -;
+ l("Of course I'll help you!"), L_Accept,
+ l("Have you got mad? That's too much, it's like you are trying to be perfect! No way I'll help you!"), L_Close;
-L_ExplainHiding:
- setcamnpc;
+L_Accept:
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.");
+ mesq l("\"Many thanks! I'll be waiting for you, hiding on the ship's hold!\"");
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!");
+ mesn strcharinfo(0);
+ mesq l("Could you first explain me why so many items?");
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!");
+ mesn;
+ mesq l("Very well, listen to my plan!");
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.");
+ mesq l("The dyes are to disguise myself, I don't want to get caught. The potions are for safety, who knows what I'll face?");
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 lg("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 town, far far away from Tulimshar and the Great Continent. But hey, back to me. Remember me telling you that I'm hun...grrr...eee!");
+ mesq l("Water, Bread, Cheese and Cherry Cake are to eat, and money is always useful, you know.");
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;
+ mesn strcharinfo(0);
+ mesq l("You planned neatly. I'll be back.");
+ setq ShipQuests_Alige, 1;
+ close;
-L_Accepted:
- setcamnpc;
- mes "";
+L_Return:
mesn;
- mesq lg("Great, what food do you have for me today?");
+ mesq l("Hey, psst! Have you brought me what I asked for?");
next;
- restorecam;
-
-L_GiveFood:
- mes "";
- menuint
- rif(countitem(Acorn), l(getitemname(Acorn))), 0,
- rif(countitem(Bread), l(getitemname(Bread))), 502,
- rif(countitem(Fungus), l(getitemname(Fungus))), 503,
- rif(countitem(Cheese), l(getitemname(Cheese))), 504,
- rif(countitem(PiouLegs), l(getitemname(PiouLegs))), 505,
- rif(countitem(LettuceLeaf), l(getitemname(LettuceLeaf))), 0,
- rif(countitem(Piberries), l(getitemname(Piberries))), 2,
- rif(countitem(SeaDrops), l(getitemname(SeaDrops))), 1,
- rif(countitem(Aquada), l(getitemname(Aquada))), 509,
- rif(countitem(PinkBlobime), l(getitemname(PinkBlobime))), 1,
- rif(countitem(HalfCroconut), l(getitemname(HalfCroconut))), 512,
- rif(countitem(Croconut), l(getitemname(Croconut))), 0,
- rif(countitem(Plushroom), l(getitemname(Plushroom))), 515,
- //rif(countitem(PumpkinSeeds), l(getitemname(PumpkinSeeds))), 1, // ITEM MOVED TO ART
- rif(countitem(UrchinMeat), l(getitemname(UrchinMeat))), 1,
- rif(countitem(EasterEgg), l(getitemname(EasterEgg))), 1,
- rif(countitem(PumpkishJuice), l(getitemname(PumpkishJuice))), 527,
- rif(countitem(Manana), l(getitemname(Manana))), 528,
- rif(countitem(Curshroom), l(getitemname(Curshroom))), 529,
- rif(countitem(Carrot), l(getitemname(Carrot))), 530,
- rif(countitem(RedPlushWine), l(getitemname(RedPlushWine))), 3,
- l("I don't have anything good for you today."), -1;
-
- .@id = @menuret;
- if (.@id == -1) goto L_Quit; // Quit message.
- if (.@id == 0) goto L_NoReward; // In case of wrong food.
- if (.@id == 1) goto L_Poison; // In case of poisoned food.
- if (.@id == 2) goto L_NoMore; // In case of Piberries.
- if (.@id == 3) goto L_Drunk; // In case of Alcohol.
- if (countitem(.@id) == 0) goto L_Quit;
-// if (.@id == item's ID) then food is correct.
-// Do not put any other number than -1, 0, 1, 2 or the item's ID, that'll avoid confusion.
-
- inventoryplace Piberries, 3;
- delitem .@id, 1;
+ mesn strcharinfo(0);
+ menu
+ l("What I had to bring, again?"), L_Remember,
+ l("Yes, you can count it."), L_Check,
+ l("No... Not yet, sorry."), L_Close;
- setcamnpc;
+L_Remember:
mes "";
+ mesc l("Alige hands you an old paper patch.");
+ next;
+ mesn l("Old Paper Patch");
+ mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion));
+ mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread));
+ mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese));
+ mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake));
+ mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
+ mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion));
+ mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion));
+ mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye));
+ mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye));
+ mes l("* @@/7.500 GP", Zeny);
+ next;
+ // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite
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;
+ mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet));
+ close;
-L_NoReward:
- setcamnpc;
+L_Check:
+ if (countitem(CactusPotion) < 30 ||
+ countitem(Bread) < 12 ||
+ countitem(Cheese) < 12 ||
+ countitem(CherryCake) < 12 ||
+ countitem(BottleOfTonoriWater) < 8 ||
+ countitem(HastePotion) < 6 ||
+ countitem(StrengthPotion) < 6 ||
+ countitem(YellowDye) < 2 ||
+ countitem(BlueDye) < 2)
+ goto L_Missing;
+ if (Zeny < 7500) goto L_Poor;
+
+ inventoryplace CrozeniteFourLeafAmulet, 1;
+ delitem CactusPotion, 30;
+ delitem Bread, 12;
+ delitem Cheese, 12;
+ delitem CherryCake, 12;
+ delitem BottleOfTonoriWater, 8;
+ delitem HastePotion, 6;
+ delitem StrengthPotion, 6;
+ delitem YellowDye, 2;
+ delitem BlueDye, 2;
+ Zeny = Zeny - 7500;
+ getitem CrozeniteFourLeafAmulet, 1;
+ getexp 2625, 50;
+ setq ShipQuests_Alige, 2;
mes "";
mesn;
- mesq l("You don't expect me to eat that, do you? Give me something else!");
+ mesq l("Good job... Here is your reward...");
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_ReturnMenu:
- setcamnpc;
- mesq l("Do you have anything else for me?");
- next;
- restorecam;
-
- goto L_GiveFood;
+ mesn;
+ mesq l("I have to get going now. Thanks for the help!");
+ close;
-L_NoMore:
- setcamnpc;
+L_Poor:
mes "";
mesn;
- mesq l("Grr, don't give me more berries! I don't want them, stupid berries, stupid... Stupid... Stupid!");
+ mes l("There's not everything I've asked for...");
next;
+ goto L_Remember;
- goto L_ReturnMenu;
-
-L_Poison:
- setcamnpc;
+L_Missing:
mes "";
mesn;
- mesq l("Don't try to poison me! I know what that does!");
+ mes l("There's not everything I've asked for...");
next;
- restorecam;
- goto L_ReturnMenu;
+ goto L_Remember;
-L_SoAskForFood:
- setcamnpc;
+L_End:
mesn;
- mesq l("So, do you have anything for me today?");
+ mes l("I am still here, but I already did amends for my acts and don't need to flee anymore...");
next;
- restorecam;
- goto L_IntroMenu;
+ mesn strcharinfo(0);
+ mes l("Why am I having a hard time to believe on you...");
+ close;
-L_AskForFood:
- setcamnpc;
- mesn;
- mesq l("Do you have anything for me today?");
- next;
- restorecam;
+L_Close:
+ close;
-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."), -;
+OnInit:
+ .sex = G_MALE;
+ .distance = 2;
- setcamnpc;
- mesq lg("Growl, sniff, grr! You'd better not tell anyone you saw me!");
+ /*
+ // Preventive check against faulty update. Must be removed afterwards.
+ // UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2;
+ .@nb = query_sql("select `char_id` from `quest` WHERE (`count1`>=1 and `quest_id`=2) LIMIT 2", .@name$);
+ if (getarraysize(.@name$) > 0) {
+ debugmes "FATAL ERROR: Quest log not updated.";
+ debugmes "disabling Alige to prevent weirder bugs.";
+ debugmes "UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2";
+ disablenpc .name$;
+ }
+ */
- close;
+ end;
-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";
- mes col(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;
- mes col(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);
+OnTouch:
+ if (getareausers() <= 1)
+ setnpcdir "Alige", 2; // 6
close;
-L_Quit:
- setcamnpc;
- mes "";
- mesn;
- mesq l("Too bad... Come back when you'll have some nice food for me. Growl... grumble... grumble.");
-
+OnUnTouch:
+ if (getareausers() == 0)
+ setnpcdir "Alige", 4; // 8
close;
-OnInit:
- .sex = G_MALE;
- .distance = 2;
- end;
}
diff --git a/npc/002-1/arpan.txt b/npc/002-1/arpan.txt
index 8654c09da..e0ff3f255 100644
--- a/npc/002-1/arpan.txt
+++ b/npc/002-1/arpan.txt
@@ -1,4 +1,6 @@
// TMW-2 Script.
+// Editor: Jesusalva
+//
// Evol scripts.
// Authors:
// Ablu
@@ -17,6 +19,8 @@
// 10 Has not talked to Julia
// 11 Need to see Julia
// 12 Has been registered by Julia
+// Translation
+// FR translated
002-1,49,36,0 script LeftDoorCheck NPC_HIDDEN,0,0,{
.@q = getq(ShipQuests_Arpan);
@@ -90,7 +94,6 @@ L_EquipDone:
showavatar 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;
@@ -99,10 +102,11 @@ OnTalk:
mesn;
if (.@q > 0) goto L_Menu;
+ setq ShipQuests_Arpan, 1;
+ deltimer("Magic Arpan::OnSlow");
mesq lg("Yeye, you are really lucky to be alive. You are in good enough shape for walking, do you remember what happened?");
next;
- setq ShipQuests_Arpan, 1;
menu
lg("I only remember I was rescued by you."), L_Story,
@@ -120,11 +124,11 @@ OnClothNotTaken:
OnEquip:
mesn "Narrator";
- mes col(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9);
+ mesc l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client.");
next;
- mes col(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);
+ 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'.");
next;
- mes col(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);
+ 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.");
close;
@@ -154,12 +158,11 @@ L_Menu:
.@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,
lg("Could you tell me where I am?"), L_Where,
lg("Where can I find Juliet?"), L_Julia,
l("Who are you?"), L_Who,
- rif(getq(ShipQuests_ArpanMoney) == 1, lg("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,
+ l("I need a tutorial, where can I find help?"), L_Trainer,
+ rif(getq(ShipQuests_ArpanMoney) < 2, lg("Do you know what happened to the gold I had when you guys saved me?")), L_WhereMoney,
rif(!.@equipped, lg("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."), -;
@@ -167,6 +170,22 @@ L_Menu:
closedialog;
close;
+L_Trainer:
+ mes "";
+ mesn;
+ mesq l("There is a NPC called Trainer, just outside this ship.");
+ next;
+ mesn;
+ mesq l("Just use the arrow key--, err, I mean, just walk to the door on the right. The one which is not guarded by Peter.");
+ next;
+ mesn;
+ mesq lg("You must be dressed, and talk to our captain first. He'll give you a mission and unlock the ship main door.");
+ next;
+ mesn;
+ mesq l("All you need to do then is walk outside, enter on the biggest house, and talk to the Trainer. He'll teach you everything.");
+ next;
+ goto L_Menu;
+
L_Where:
mes "";
mesn;
@@ -186,7 +205,7 @@ L_Julia:
next;
mesn "Narrator";
- mes col(l("Juliet 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);
+ mesc l("Juliet 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.");
next;
goto L_Menu;
@@ -194,25 +213,13 @@ L_Julia:
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.");
+ 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 tricks.");
next;
-
- goto L_Menu;
-
-L_WhereOldClothes:
- mes "";
mesn;
- mesq lg("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 lg("Oh, now that I remember, we also found some money in your pockets, here it is!");
+ mesq l("They're not magic, but yayaya, people like to say it is! Yeyeye.");
next;
- setq ShipQuests_ArpanMoney, 2;
- .@q = getq(ShipQuests_Arpan);
- Zeny = Zeny + 10;
- message strcharinfo(0), l("You receive @@ GP!", 10);
-
- goto L_BeforeMenu;
+ goto L_Menu;
L_WhereMoney:
mes "";
@@ -220,13 +227,20 @@ L_WhereMoney:
mesq l("Oh right, I totally forgot about that, here you go.");
next;
+ if (BaseLevel < 4) goto L_Apana;
setq ShipQuests_ArpanMoney, 2;
.@q = getq(ShipQuests_Arpan);
- Zeny = Zeny + 10;
- message strcharinfo(0), l("You receive @@ GP!", 10);
+ Zeny = Zeny + 35;
+ message strcharinfo(0), l("You receive @@ GP!", 35);
goto L_BeforeMenu;
+L_Apana:
+ mesn;
+ mesq l("On hindsight, I'll wait you get a few levels. Can't have cheaters, ya know!");
+ next;
+ goto L_Menu;
+
L_WhatCloth:
mes "";
mesn;
@@ -234,11 +248,11 @@ L_WhatCloth:
next;
mesn "Narrator";
- mes col(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9);
+ mesc l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client.");
next;
- mes col(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);
+ 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'.");
next;
- mes col(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);
+ 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.");
next;
L_BeforeMenu:
@@ -249,27 +263,16 @@ 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!");
- 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:
+ setcamnpc;
+ showavatar NPC_MAGIC_ARPAN;
+ mesn;
+ mesq l("Yayaya, @@ is surely slow. Do you remember how to walk? You can use arrow keys for that!", strcharinfo(0));
+ next;
+ mesn;
+ mesc l("Here, come talk to me, the Magic Arpan! I'll help you get dressed."), 1;
+ addtimer(90000,"Magic Arpan::OnSlow");
+ close;
OnInit:
.sex = G_MALE;
diff --git a/npc/002-1/chefgado.txt b/npc/002-1/chefgado.txt
index ea232eb21..90eb5b107 100644
--- a/npc/002-1/chefgado.txt
+++ b/npc/002-1/chefgado.txt
@@ -9,6 +9,8 @@
// Variable:
// ShipQuests_ChefGado
// ShipQuests_Knife
+// Translation
+// FR Translated
002-1,27,28,0 script Chef Gado NPC_CHEF_GADO,{
.@q = getq(ShipQuests_Knife);
@@ -79,6 +81,7 @@ L_Reward:
getitem CreasedGloves, 1;
setq ShipQuests_ChefGado,2;
Zeny = Zeny + 100;
+ getexp 25, 5;
mes "";
mesn;
mesq l("Thanks. Take this spare pair of gloves and some change.");
diff --git a/npc/002-1/dan.txt b/npc/002-1/dan.txt
index 4b778e077..6af4cb349 100644
--- a/npc/002-1/dan.txt
+++ b/npc/002-1/dan.txt
@@ -7,6 +7,8 @@
// of Pious.
// Variables:
// ShipQuests_Dan
+// Translation:
+// FR Translated
002-1,32,31,0 script Dan#002-1 NPC_REDY_MAN,{
.@q=getq(ShipQuests_Dan);
@@ -29,6 +31,12 @@
close;
L_Quest:
+ if (BaseLevel < 2) {
+ mesn;
+ mesq l("Well, you clearly never fought before, so remember to add stats.");
+ mesc l("That can be done pressing F2 and opening char screen.");
+ next;
+ }
mes "";
mesn;
mesq l("Then could you perhaps kill 12 @@ for me?!", getmonsterlink(Piou));
@@ -61,6 +69,7 @@ L_Reward:
mesq l("Here, take this pair of boots as a reward!");
inventoryplace CreasedBoots, 1;
getitem CreasedBoots, 1;
+ getexp 25, 5;
setq ShipQuests_Dan, 3, 0;
close;
@@ -82,11 +91,17 @@ OnInit:
// TODO this code below is bad and should be entirely rewritten
002-1,0,0,0 script PiouSpwn NPC_HIDDEN,{
function DanCheck {
+ if (getq(ShipQuests_Dan) != 1)
+ end;
.@t=getq2(ShipQuests_Dan);
if (.@t+1 >= 12) setq ShipQuests_Dan, 2, 0;
if (.@t+1 < 12) setq ShipQuests_Dan, 1, .@t+1;
}
+OnFakeKill:
+ DanCheck();
+ end;
+
OnRespawnPiou1:
if (getq(ShipQuests_Dan) == 1) DanCheck();
sleep 59000;
@@ -110,7 +125,7 @@ OnRespawnPiou4:
OnRespawnPiou5:
if (getq(ShipQuests_Dan) == 1) DanCheck();
sleep 60000;
- areamonster(instance_mapname("002-3"), 31, 26, 40, 31, "Piou", 1002, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou4");
+ areamonster(instance_mapname("002-3"), 31, 26, 40, 31, "Piou", 1002, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou5");
end;
OnInstanceInit:
diff --git a/npc/002-1/knife.txt b/npc/002-1/knife.txt
index 0754648ab..e8761bd44 100644
--- a/npc/002-1/knife.txt
+++ b/npc/002-1/knife.txt
@@ -16,7 +16,7 @@
if (.@q) close;
mesn "Narrator";
- mes col(l("There are some old rusty knives on the table. Would you like to take one?"), 9);
+ mesc l("There are some old rusty knives on the table. Would you like to take one?");
next;
menu
@@ -34,11 +34,11 @@ L_Give:
getitem RustyKnife, 1;
mesn "Narrator";
- mes col(l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client."), 9);
+ mesc l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client.");
next;
- mes col(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);
+ 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'.");
next;
- mes col(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);
+ 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.");
close;
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
index faed7f086..9d0bd667c 100644
--- a/npc/002-1/peter.txt
+++ b/npc/002-1/peter.txt
@@ -1,3 +1,4 @@
+// TMW2 script need total rewrite.
// Evol scripts.
// Authors:
// 4144
@@ -38,11 +39,12 @@
// [8] = Shows how many seconds passed since ratto number 4 died.
// [9] = Shows how many seconds passed since the player started the quest.
// [10] = Shows how many seconds passed since the player done the quest.
-
+// Translation
+// FR Translated
002-1,72,34,0 script AreaNPC NPC_HIDDEN,0,1,{
OnTouch:
- if (BaseLevel < 5) goto L_Stop;
+ if (BaseLevel < 8) goto L_Stop;
if ($@RAT_SAILOR_COUNTDOWN == 0) goto L_NoCountDown;
if ((gettimetick(2) - $@RAT_SAILOR_COUNTDOWN) < 10) goto L_NoGoodTick;
if (($@RAT_SAILOR_OLD_HELPER$ == strcharinfo(0)) && ((gettimetick(2) - $@RAT_SAILOR_COUNTDOWN) < 60)) goto L_NoGoodTick;
@@ -90,7 +92,7 @@ L_NoGoodTick:
}
002-1,70,35,0 script Peter NPC_RATTO_SAILOR,{
- if (BaseLevel < 10) goto OnTooWeak;
+ if (BaseLevel < 8) goto OnTooWeak;
if ($@RAT_SAILOR_COUNTDOWN == 0) goto L_NoCountDown;
if ((gettimetick(2) - $@RAT_SAILOR_COUNTDOWN) < 10) goto OnNoGoodTick;
if (($@RAT_SAILOR_OLD_HELPER$ == strcharinfo(0)) && ((gettimetick(2) - $@RAT_SAILOR_COUNTDOWN) < 60)) goto OnNoGoodTick;
@@ -307,7 +309,7 @@ L_Reward:
.@peter = getq(ShipQuests_Peter);
mesn;
mesq l("Good job!") + " " + l("Here's your reward!");
- getexp 100, 0;
+ getexp 105, 0;
Zeny = Zeny + 1000;
message strcharinfo(0), l("You receive @@ GP!", 1000);
diff --git a/npc/002-2/doors.txt b/npc/002-2/doors.txt
index d22e02669..0263d87c2 100644
--- a/npc/002-2/doors.txt
+++ b/npc/002-2/doors.txt
@@ -1,8 +1,13 @@
+// TMW2 Script
+// Authors:
+// Jesusalva
+//
// Evol scripts.
// Authors:
// Ablu
// Alastrim
// Reid
+//
// Description:
// Doors NPCs.
@@ -18,7 +23,7 @@ L_Warn:
if (.@q == 5) goto L_Warp;
mesn "Narrator";
- mes col(l("There are still some rattos left! Do you want to abort the quest?"), 9);
+ mesc l("There are still some rattos left! Do you want to abort the quest?");
next;
menu
@@ -41,10 +46,12 @@ L_Warp:
002-2,24,31,0 script LeftDoor NPC_HIDDEN,0,0,{
OnTouch:
+ dispbottom l("I can't go there now.");
+ end;
mesn "Narrator";
- mes col(l("It seems that you need a key to open this door."), 9);
+ mesc l("It seems that you need a key to open this door.");
next;
- mes col(l("What do you want to do?"), 9);
+ mesc l("What do you want to do?");
next;
menu
@@ -59,14 +66,14 @@ L_Break:
mes "";
mesn "Narrator";
- mes col(l("You hear a loud scream. It must be the creaking of the wooden door..."), 9);
+ mesc l("You hear a loud scream. It must be the creaking of the wooden door...");
close;
L_Warp:
mes "";
mesn "Narrator";
- mes col(l("Wait, it seems someone is blocking the door from the other side!"), 9);
+ mesc l("Wait, it seems someone is blocking the door from the other side!");
close;
}
diff --git a/npc/002-3/_mobs.txt b/npc/002-3/_mobs.txt
index 38af6847b..9e5e45b86 100644
--- a/npc/002-3/_mobs.txt
+++ b/npc/002-3/_mobs.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 002-3: First Deck mobs
-002-3,35,28,4,2 monster Piou 1002,1,30000,20000
+002-3,35,28,4,2 monster Piou 1002,1,30000,20000,PiouSpwn::OnFakeKill
diff --git a/npc/002-3/billybons.txt b/npc/002-3/billybons.txt
index 276ba9954..6e1c77300 100644
--- a/npc/002-3/billybons.txt
+++ b/npc/002-3/billybons.txt
@@ -17,7 +17,7 @@
next;
mesn "Narrator";
- mes col(l("The sailor chugs his beer."), 9);
+ mesc l("The sailor chugs his beer.");
next;
select
@@ -88,16 +88,16 @@ L_Quit:
next;
mesn "Narrator";
- mes col(l("The sailor turns his back to you."), 9);
+ mesc l("The sailor turns his back to you.");
close;
L_Give:
mes "";
- inventoryplace 833, 1;
+ inventoryplace EmptyBottle, 1;
setq ShipQuests_Bottle, 1;
- getitem 833, 1;
+ getitem EmptyBottle, 1;
close;
diff --git a/npc/002-3/doors.txt b/npc/002-3/doors.txt
index 4bf062b16..b0caea5a7 100644
--- a/npc/002-3/doors.txt
+++ b/npc/002-3/doors.txt
@@ -2,76 +2,32 @@
// Author:
// Jesusalva
// 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
+// Nard's ship Doors NPCs.
002-3,30,28,0 script AreaNPC#doors4 NPC_HIDDEN,0,0,{
OnTouch:
- .@nard = getq(ShipQuests_Nard);
-
- if (LOCATION$ == "Candor")
- {
+ if (LOCATION$ == "Candor") {
warp "005-1", 42, 107;
close;
}
- if (LOCATION$ == "Tulim")
- {
+ if (LOCATION$ == "Tulim") {
warp "003-1", 81, 68;
close;
}
- // None of these checks will ever return positive, but were kept when delay is applied.
- if (.@nard == 4) goto L_GotoNard;
- if (.@nard == 5) goto L_End;
-
setcamnpc "Julia";
mesn "Julia";
mesq l("The captain has locked the door, you should go see him.");
next;
mesn "Narrator";
- mes col(l("Captain Nard is in the room to your right."), 9);
- next;
- restorecam;
-
- close;
-
-L_GotoNard:
- setcamnpc "Julia";
- mesn "Julia";
- mesq l("The captain is waiting for you! Hurry up.");
+ mesc l("Captain Nard is in the room to your right.");
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;
-
OnInterIfInit:
diff --git a/npc/002-3/juliet.txt b/npc/002-3/juliet.txt
index 5b1561d53..d7f8f09b4 100644
--- a/npc/002-3/juliet.txt
+++ b/npc/002-3/juliet.txt
@@ -61,8 +61,7 @@
mesn;
mesq l("Ok, done.");
- if (getq(ShipQuests_Julia) == 2)
- {
+ if (getq(ShipQuests_Julia) == 2) {
next;
mesq l("Do you have any other questions for me?");
next;
@@ -142,10 +141,9 @@
function mainMenu {
do
{
- .@q3 = getq(ShipQuests_Nard);
.@q4 = getq(General_Narrator);
- selectd
+ select
l("I am hungry. Can I buy some food here?"),
rif(getskilllv(NV_BASIC) < 6, l("Something is wrong with me, I can't smile nor sit.")),
lg("I made a mistake, I would like to change my language."),
@@ -154,8 +152,7 @@
l("Can I read these rules again?"),
l("Nothing, sorry.");
- switch (@menu)
- {
+ switch (@menu) {
case 1: sellFood; break;
case 2: basicSkill; break;
case 3: chooseLang .@s$; break;
@@ -184,37 +181,29 @@ OnTouch:
mesn;
mesq l("Hi, nice to see you!");
next;
- mesq l("My name is Juliet, it is me who took care of you after we found you in the sea.");
- next;
- mesq lg("I'm glad to see you're okay.");
+ mesq l("My name is Juliet, it is me who took care of you after we found you in the sea. I'm glad to see you're okay.");
next;
- if (getq(ShipQuests_Julia) < 2)
- {
- 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.");
-
- mesq l("Here they are.");
+ if (getq(ShipQuests_Julia) < 2) {
+ 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 all adventurers must respect on this world.");
next;
- 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.");
+ mesq l("Oh, and I almost forgot! Do not share passwords or pincodes, not even with staff! And do not use the same password somewhere else, they can be stolen!");
next;
+ mesn;
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.");
+ mesn;
+ mesq l("Also, take this book so you don't forget the rules. You can always read it, or type ##B@rules##b on the chat.");
+ // No inventoryplace here.
+ getitem BookOfLaws, 1;
+ setq ShipQuests_Julia, 2;
next;
mesq l("I think I'm done with that now. Do you have any questions?");
next;
-
- setq ShipQuests_Julia, 2;
}
- //mesq lg("Could I ask you what your native language is? A sailor told me you're Russian, but another one told me you're French... I'm a bit lost. I will register you on the ship passenger list just after that.");
- //next;
- //chooseLang;
mainMenu;
end;
diff --git a/npc/002-3/note.txt b/npc/002-3/note.txt
index 5306381c6..2b7cde99c 100644
--- a/npc/002-3/note.txt
+++ b/npc/002-3/note.txt
@@ -14,7 +14,7 @@
l("The La Johanne always have interesting notes.");
do {
- selectd
+ select
l("Read the Rules."),
l("Read the News."),
l("Leave.");
diff --git a/npc/002-4/elmo.txt b/npc/002-4/elmo.txt
index 5908692ef..fbf071842 100644
--- a/npc/002-4/elmo.txt
+++ b/npc/002-4/elmo.txt
@@ -27,7 +27,7 @@ L_Candor:
// Valon Quest
.@q=getq(CandorQuest_Trainer);
if (.@q < 1) {
- mes col("##BFirst and foremost, you should talk to Trainer, inside the big house.##b", 1);
+ mesc l("##BFirst and foremost, you should talk to Trainer, inside the big house.##b"), 1;
mes l("Besides being able to train you, he is a walking encyclopedia - Ask him anything you are unsure about!");
next;
mes l("To find him, just leave the ship and turn left. You should also touch the Soul Menhir when you leave this ship.");
@@ -98,7 +98,7 @@ L_Party:
mesq l("What? A party?");
next;
setq CandorQuest_Sailors, 3;
- getexp 10, 0;
+ getexp 25, 0;
Zeny = (Zeny + 1000);
mesq l("Alright, I'll show up later. Thanks for calling me. Here's 1000 GP for your efforts."); // With this, the final cost is 50 GP
close;
diff --git a/npc/002-4/nard.txt b/npc/002-4/nard.txt
index 9ff46c1a1..5bd1c6844 100644
--- a/npc/002-4/nard.txt
+++ b/npc/002-4/nard.txt
@@ -11,7 +11,6 @@
002-4,25,26,0 script Nard NPC_NARD,{
showavatar NPC_NARD; // this is handled by avatars.xml
- .@nard = getq(ShipQuests_Nard); // TODO
.@narrator = getq(General_Narrator);
.@price=1500;
@@ -19,6 +18,54 @@ L_Checker:
if (.@narrator) goto L_Travel;
if (LOCATION$ != "") goto L_NotYet;
+ // Referral program
+ if (#REFERRAL_PROG == 0 && $REFERRAL_ENABLED) {
+ mesn l("TMW2 Staff");
+ mesc l("Hello, and welcome to TMW2: Moubootaur Legends!"), 3;
+ next;
+ mesn l("TMW2 Staff");
+ mesc l("Did you came here by someone advise? If yes, write their name here!"), 3;
+ mesc l("If this is not the case, just click on \"Send\"."), 3;
+ .@ref$="";
+ do
+ {
+ input .@ref$;
+ debugmes "Hercules is bugged: "+.@ref$;
+ mes "";
+ if (.@ref$ != "") {
+ .@ref=gf_accid(strip(.@ref$));
+ if (.@ref > 0) {
+ if (.@ref == getcharid(3)) {
+ mesn l("TMW2 Staff");
+ mesc l("Hahah, silly, that's yourself!"), 3;
+ mesc l("Try again!"), 3;
+ next;
+ .@ref$="";
+ } else {
+ #REFERRAL_PROG=.@ref;
+ getitembound FriendGift, 1, 1;
+ mesn l("TMW2 Staff");
+ mesc l("Well, welcome to the game! If you have any doubt, shout on #world for help!"), 3;
+ mesc l("Your friend also sent you a gift - open it when you get level 5!"), 3;
+ next;
+ }
+ } else {
+ mesn l("TMW2 Staff");
+ mesc l("Oops, there is nobody known as @@ on this game.", .@ref$), 3;
+ mesc l("Could you try again? There could be a typo!"), 3;
+ next;
+ .@ref$="";
+ }
+ } else {
+ .@ref$="None";
+ mesn l("TMW2 Staff");
+ mesc l("I see. Well, welcome to the game! If you have any doubt, shout on #world for help!"), 3;
+ next;
+ }
+ } while (.@ref$ == "");
+ }
+
+ // Introduction
mesn;
mesq l("Hello.");
next;
@@ -26,13 +73,6 @@ L_Checker:
next;
mesq lg("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;
@@ -70,10 +110,6 @@ L_MenuQuest:
mesq l("Why we're going Tulimshar, you may ask? Because well, believe me, if you want to find out anything, the best place to ask around is Tulim!");
LOCATION$ = "Candor";
- //inventoryplace JohanneKey, 1;
- //setq ShipQuests_Nard, 1;
- //getitem JohanneKey, 1;
-
close;
@@ -141,7 +177,7 @@ L_NotYet:
next;
showavatar;
setcam 0, 0;
- mes col(l("Some time later..."), 9);
+ mesc l("Some time later...");
next;
restorecam;
showavatar NPC_NARD; // this is handled by avatars.xml
@@ -150,10 +186,16 @@ L_NotYet:
next;
Zeny = Zeny-.@price;
LOCATION$="Tulim";
- mesq l("You can explore the city as you want, but if I were you, I would visit the townhall first.");
+ mesn;
+ mesq l("You can explore the city as you want, but if I were you, I would ##Btouch the Soul Menhir##b, north of here, to don't respawn at Candor.");
next;
+ mesn;
+ mesq l("Other than that, you can explore the city as you want, but as you had a memory loss, You should visit the townhall.");
+ next;
+ mesn;
mesq l("When you get out of the ship, it is the first building you'll see. Talk to ##BLua##b, she is an alliance representative.");
next;
+ mesn;
mesq l("The Alliance have records of everyone. And if you need another trip, talk to me!");
} else {
@@ -164,13 +206,15 @@ L_NotYet:
close;
L_Travel:
- if (nard_reputation() >= 11)
+ if (nard_reputation() >= 14)
+ .@price-=1250;
+ if (nard_reputation() >= 12)
.@price-=1000;
- else if (nard_reputation() >= 9)
+ else if (nard_reputation() >= 10)
.@price-=750;
- else if (nard_reputation() >= 7)
+ else if (nard_reputation() >= 8)
.@price-=500;
- else if (nard_reputation() >= 5)
+ else if (nard_reputation() >= 6)
.@price-=250;
mesn;
mesq l("Hi @@.", strcharinfo(0));
@@ -183,6 +227,8 @@ L_Travel:
menu
rif(LOCATION$ != "Candor", l("To Candor Island.")), L_TCandor,
rif(LOCATION$ != "Tulim", l("To Tulimshar.")), L_TTulim,
+ rif(ST_TIER == 7 && gettimetick(2) < QUEST_ELEVARTEMPO ,l("Help me, I need Jesusaves Grimorie!")), L_Tier2,
+ rif(ST_TIER == 9 && countitem(Lifestone) && gettimetick(2) < QUEST_ELEVARTEMPO ,l("Help me, I need Jesusaves Grimorie!")), L_Tier2Ok,
l("No, I'll save my money."), -;
} else {
mes l("You still need @@ GP to afford it.", (.@price-Zeny));
@@ -192,24 +238,67 @@ L_Travel:
L_TCandor:
Zeny=Zeny-.@price;
- LOCATION$="Candor";
+ PC_DEST$="Candor";
mes "";
mesn;
mesq l("Candor Island, then? Yes, that is a pretty island, right?");
next;
mesq l("I was planning to go there soon, anyway. All aboard!");
- close;
+ close2;
+ addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
+ @timer_navio_running = 1;
+ warp "002-5", 39, 26;
+ end;
L_TTulim:
Zeny=Zeny-.@price;
- LOCATION$="Tulim";
+ PC_DEST$="Tulim";
+ @timer_navio_running = 1;
mes "";
mesn;
mesq l("Tulimshar, right? The oldest human city-state!");
next;
mesq l("I was planning to go there soon, anyway. All aboard!");
+ close2;
+ addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
+ @timer_navio_running = 1;
+ warp "002-5", 39, 26;
+ end;
+
+L_Tier2:
+ mes "";
+ mesn;
+ mesq l("WHAT?! ARE YOU OUT OF MIND?!?!");
+ next;
+ mesn;
+ if (nard_reputation() < 8) {
+ mesq l("THAT GRIMORIE IS A SUPER DUPER MEGA UPER RARE BOOK, I CANNOT GIVE IT TO ANYBODY ASKING ME ABOUT!!");
+ next;
+ mesn;
+ mesq l("GET OUT OF HERE, YOUR NOBODY!");
+ close;
+ }
+ mesq l("That is a rare, precious book, which writes itself!");
+ next;
+ mesn;
+ mesq l("I cannot just give it to you for nothing. Run to Elanore and fetch me a @@. You need to make a new one, an old one I won't accept.", getitemlink(Lifestone));
+ ST_TIER=8;
+ close;
+
+L_Tier2Ok:
+ mes "";
+ mesn;
+ mesc l("*tut*");
+ next;
+ inventoryplace JesusalvaGrimorium, 1;
+ delitem Lifestone, 1;
+ getitem "JesusalvaGrimorium", 1;
+ getexp 200, 0;
+ ST_TIER=10;
+ mesn;
+ mesq l("Here, take it. If the mana goes out of your body, I'll have your class master to return the book to me.");
close;
L_Close:
diff --git a/npc/002-5/_import.txt b/npc/002-5/_import.txt
new file mode 100644
index 000000000..757883bc0
--- /dev/null
+++ b/npc/002-5/_import.txt
@@ -0,0 +1,5 @@
+// Map 002-5: Ocean
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/002-5/_mobs.txt",
+"npc/002-5/main.txt",
+"npc/002-5/mapflags.txt",
diff --git a/npc/002-5/_mobs.txt b/npc/002-5/_mobs.txt
new file mode 100644
index 000000000..cdfc3719d
--- /dev/null
+++ b/npc/002-5/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 002-5: Ocean mobs
+002-5,32,26,8,2 monster Ocean Croc 1133,2,36000,30000
diff --git a/npc/002-5/main.txt b/npc/002-5/main.txt
new file mode 100644
index 000000000..b51d5e558
--- /dev/null
+++ b/npc/002-5/main.txt
@@ -0,0 +1,53 @@
+// TMW2 script
+// Originals from TMW-BR
+// Imported by Jesusalva
+
+002-5,28,27,0 script #NardShip NPC_HIDDEN,117,29,{
+ //if (PC_DEST$ != "" && @timer_navio_running == 0) goto L_Timer;
+ end;
+
+OnEvent:
+ if (@timer_navio_running == 0) end;
+ if (PC_DEST$ == "Candor") goto L_Candor;
+ else if (PC_DEST$ == "Tulim") goto L_Tulim;
+ else goto L_Error;
+ end;
+
+L_Candor:
+ PC_DEST$ = "";
+ LOCATION$ = "Candor";
+ @timer_navio_running = 0;
+ warp "005-1", 42, 107;
+ message strcharinfo(0), l("@@ disembarks at Candor Island.", strcharinfo(0));
+ end;
+
+L_Tulim:
+ PC_DEST$ = "";
+ LOCATION$ = "Tulim";
+ @timer_navio_running = 0;
+ warp "003-1", 81, 68;
+ message strcharinfo(0), l("@@ disembarks at Tulimshar.", strcharinfo(0));
+ end;
+
+L_Error:
+ debugmes "ERROR: PLAYER INVALID PC_DEST ON #NardShip: " + PC_DEST$;
+ PC_DEST$ = "";
+ @timer_navio_running = 0;
+ warp "000-1", 22, 22;
+ dispbottom l("An error on your travel happened. Please report.");
+ end;
+}
+
+// Do not add .distance here.
+002-5,40,26,0 script Elmo#002-5 NPC_ELMO,{
+ npctalk3 l("It won't be long before we reach our destination...");
+ // If player logged out during travel, this Elmo can reset player travel time.
+ if (PC_DEST$ != "" && @timer_navio_running == 0) goto L_Timer;
+ end;
+
+L_Timer:
+ addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
+ @timer_navio_running = 1;
+ end;
+
+}
diff --git a/npc/002-5/mapflags.txt b/npc/002-5/mapflags.txt
new file mode 100644
index 000000000..889a0d231
--- /dev/null
+++ b/npc/002-5/mapflags.txt
@@ -0,0 +1 @@
+002-5 mapflag zone ship
diff --git a/npc/003-0-1/_import.txt b/npc/003-0-1/_import.txt
index c877b8a28..573966206 100644
--- a/npc/003-0-1/_import.txt
+++ b/npc/003-0-1/_import.txt
@@ -3,4 +3,5 @@
"npc/003-0-1/_warps.txt",
"npc/003-0-1/colin.txt",
"npc/003-0-1/luca.txt",
+"npc/003-0-1/maxime.txt",
"npc/003-0-1/statues.txt",
diff --git a/npc/003-0-1/colin.txt b/npc/003-0-1/colin.txt
index fc81b5d8d..d4b055892 100644
--- a/npc/003-0-1/colin.txt
+++ b/npc/003-0-1/colin.txt
@@ -3,31 +3,38 @@
// Saulc
// Jesusalva
// Description:
-// Luca and Colin assigns player a class. This may end up contradicting races,
-// so expect core changes!
+// Luca and Colin assigns player a class. Colin is the Wizard Master.
003-0-1,58,29,0 script Colin NPC_PLAYER,{
-
mesn;
- mesq l("I am the Wizard Mages master.");
+ mesq l("I am the @@ master.", l("Wizard Mages"));
if (!MAGIC_LVL) goto L_NoMagic;
if (getskilllv(MAGIC_WARRIOR) && !is_admin()) close;
+ if (getskilllv(WIZARD_MAGE) == 0) goto L_SignUp;
- // Sanity check
- if (getskilllv(MG_FIREBALL) >= 1) mesq l("Are you using my skill?");
- if (getskilllv(MG_FIREBALL) >= 1) close;
- // could grant MG_THUNDERSTORM perhaps, oh, I don't care.
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 0) goto L_Tier2;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER >= 1) goto L_T2_S0;
- if (getskilllv(WIZARD_MAGE) == 0) goto L_SignUp;
+ // Sanity check
+ if (getskilllv(WIZARD_MAGE) >= 1) {
+ mesn;
+ mesq l("The Wizards have three other subclasses:");
+ mesn lg("Wizard");
+ mesc l("The offensive guy, with every attack skill a mage could need.");
+ mesn lg("Sage");
+ mesc l("The wise guy, which doesn't relies on magic, and loves summon.");
+ mesn lg("Priest");
+ mesc l("The defensive guy, with every support skill a mage could need.");
+ }
close;
L_SignUp:
next;
mesn;
- mesq l("You have some magic power. Do you want to join the Wizard Mages? ##BThis cannot be undone##b.");
+ mesq l("You have some magic power. Do you want to join the @@? ##BThis cannot be undone##b.", l("Wizard Mages"));
next;
mesn;
- mesq l("We use sheer magic to destroy, explode, burn, freeze, and in overall kill our opponents!");
+ mesq l("We use swords and bows to protect the people, and we use magic to spice things up! Because we're strong even without it!");
next;
menu
l("What do I need to do to join?"), L_JoinReq,
@@ -39,11 +46,12 @@ L_JoinReq:
mesq l("Ah, nothing too major, as you already have magic.");
next;
mesn;
- mesq l("We only require a small fee of 1 @@, or 40 @@", getitemlink(DivineApple), getitemlink(SnakeEgg));
+ mesq l("We only require a small fee of 1 @@, or 40 @@, or 500 @@ if you are poor adventurer.", getitemlink(DivineApple), getitemlink(SnakeEgg), getitemlink(MaggotSlime));
next;
switch(select(
rif(countitem(DivineApple) >= 1, l("I got the apple.")),
rif(countitem(SnakeEgg) >= 40, l("I got the eggs.")),
+ rif(countitem(MaggotSlime) >= 500, l("I got the maggots slimes.")),
l("I will apply later."))) {
case 1:
@@ -58,6 +66,10 @@ L_JoinReq:
delitem SnakeEgg, 40;
goto L_Tier1Ok;
break;
+ case 3:
+ delitem MaggotSlime, 500;
+ goto L_Tier1Ok;
+ break;
default:
break;
}
@@ -70,7 +82,7 @@ L_Tier1Ok:
skill(WIZARD_MAGE,1,0);
mes "";
mesn;
- mesq l("Here, learn the ##BFireball##b. It is on Magical skills tab. You can drag it to the shortcut list. Use it to protect people!");
+ mesq l("Here, learn this awesome skill. It is on the skills tab. You can drag it to the shortcut list. Use it to protect people!");
close;
L_NoMagic:
@@ -85,6 +97,263 @@ L_NoMagic:
mesq l("Perhaps, in the city, someone knows rumors about Mana Stones and can teach you. Other than that, you're on your own.");
close;
+// progressbar("<color>", <seconds>)
+// Script will be canceled if character moves :D
+// So I probably could *try* to reuse TMW-BR Magic Tier 2 Scripts.
+L_Tier2:
+ next;
+ mesn;
+ mesq l("Wha, your magic power increased! How?! Ah, nevermind. You are eligible to get tier 2!");
+ next;
+ mesn;
+ mesq l("But whoa, not so fast! You must pass the seven steps of a trial first!");
+ next;
+ mesn;
+ mesq l("The first trial is simple, I'm not doing anything in special. Bring me 1 @@, or 200 @@ and 20 @@.", getitemlink(DivineApple), getitemlink(SilkCocoon), getitemlink(ChocolateMouboo));
+ next;
+ switch(select(
+ rif(countitem(DivineApple) >= 1, l("I got the apple.")),
+ rif(countitem(SilkCocoon) >= 200 && countitem(ChocolateMouboo) >= 20, l("I got the silk and chocolate.")),
+ l("I will apply later."))) {
+
+ case 1:
+ delitem DivineApple, 1;
+ goto L_Tier2Ok;
+ break;
+ case 2:
+ delitem SilkCocoon, 200;
+ delitem ChocolateMouboo, 20;
+ goto L_Tier2Ok;
+ break;
+ default:
+ break;
+ }
+
+ close;
+
+L_Tier2Ok:
+ // The last argument is duration: 0 - permanent 1- temporary. If omitted, defaults to 1.
+ addtoskill(MG_FIREBALL,2,0);
+ getexp 10000, 0;
+ ST_TIER=1;
+ mes "";
+ mesn;
+ mesq l("Good, good. The skill you got earlier just raised a single level. I'll also impair some experience on you, no biggies.");
+ next;
+ mesn;
+ mesq l("Now, the real challenge will start. You have a lot of raw power, but that doesn't gives you a lot of skills to learn.");
+ next;
+ mesn;
+ mesq l("I can make a nice, simple potion for you. That will help the raw mana to settle on your body.");
+ next;
+ mesn;
+ mesq l("However, beware! That potion is short-lived, you'll be running against time. Get ready to travel a lot.");
+ next;
+ if (nard_reputation() < 8) {
+ mesn;
+ mesq l("I advise you to do more quests on Tulimshar and Candor, otherwise, you might fail right at the end.");
+ next;
+ }
+ mesn;
+ mesq l("Come talk to me when you're ready, and we can begin.");
+ close;
+
+L_T2_Fail:
+ if (ST_TIER == 3) {
+ if (countitem(SunnyCrystal) > 0) {
+ delitem SunnyCrystal, 1;
+ } else {
+ mesn;
+ mesc l("WARNING. YOU ARE CHEATING THE SUNNY CRYSTAL QUEST."), 1;
+ next;
+ mesn;
+ mesc l("YOU WILL BE PENALIZED WITH 60% OF HEALTH."), 1;
+ mesc l("IF YOU DIE, YOU'LL SUFFER THE EXP PENALTY."), 1;
+ percentheal -60, -100;
+ close;
+ }
+ }
+
+ if (ST_TIER == 10) {
+ if (countitem(JesusalvaGrimorium) > 0) {
+ delitem JesusalvaGrimorium, 1;
+ } else {
+ mesn;
+ mesc l("WARNING. YOU ARE CHEATING THE GRIMORIE QUEST."), 1;
+ next;
+ mesn;
+ mesc l("YOU WILL BE PENALIZED WITH 70% OF HEALTH."), 1;
+ mesc l("IF YOU DIE, YOU'LL SUFFER THE EXP PENALTY."), 1;
+ percentheal -70, -100;
+ close;
+ }
+ }
+
+ mesc l(".:: Mission Failed ::."), 1;
+ mesc l("You ran out of time."), 1;
+ mes "";
+ mes l("You should have gotten here @@.", FuzzyTime(QUEST_ELEVARTEMPO,0,2));
+ ST_TIER=1;
+ close;
+
+L_T2_S0:
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 1) goto L_T2_S1;
+ if (gettimetick(2) > QUEST_ELEVARTEMPO) goto L_T2_Fail;
+
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 2) goto L_T2_S2;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 3) goto L_T2_S3;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 4) goto L_T2_S4;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 5) goto L_T2_S5;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 6) goto L_T2_S6;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER <= 9) goto L_T2_S7;
+ if (getskilllv(WIZARD_MAGE) == 1 && MAGIC_LVL >= 2 && ST_TIER == 10) goto L_T2_Final;
+ mesc l("Error, error, L_T2_S0 General Error, REPORT ME");
+ close;
+
+L_T2_S1:
+ //WIZARD_MAGE l("Wizard Mages") MAGIC_WARRIOR
+ mes "";
+ mesn;
+ mesq l("So, young disciple! I wish I could just chant some gibberish words and that automatically granted you more skills, but alas, that won't work.");
+ next;
+ if (nard_reputation() < 8) {
+ mesn;
+ mesq l("I advise you to do more quests on Tulimshar and Candor, otherwise, you will fail right at the end.");
+ next;
+ }
+ mesn;
+ mesq l("I can, however, prepare you a potion. But beware, that potion will only last 35 minutes once baked.");
+ next;
+ mesn; // PiberriesInfusion
+ mesq l("If it expires, you'll need to do another. To bake it I need 1 @@, 10 @@ and a @@. Have Mauve and Money, lots of it.", getitemlink(EverburnPowder), getitemlink(MaggotSlime), getitemlink(EmptyBottle));
+ next;
+ select
+ rif(countitem(MaggotSlime) >= 10 && countitem(EverburnPowder) && countitem(EmptyBottle), l("I have everything.")),
+ l("I'm not ready.");
+
+ mes "";
+ if (@menu == 2) {
+ mesn;
+ mesq l("Yes, as you see, the costs are high. Prepare yourself.");
+ close;
+ }
+
+ delitem EmptyBottle, 1;
+ delitem EverburnPowder, 1;
+ delitem MaggotSlime, 10;
+ ST_TIER=2;
+ set QUEST_ELEVARTEMPO, gettimetick(2) + (60 * 35);
+ getexp 400, 0;
+ mesn;
+ mesc l("The class master mix the powder with the slime inside the bottle, and makes some weird mixture.");
+ next;
+ mesn;
+ mesc l("He pours something on it, you're not sure what. He then utters some magic words.");
+ next;
+ // Reset timer, this is the place where it should really happen.
+ set QUEST_ELEVARTEMPO, gettimetick(2) + (60 * 35);
+ mesn;
+ mesq l("The potion is baked, you have thirty five minutes! Read as fast as you can, don't miss details!");
+ next;
+ mesn;
+ mesq l("First thing is to get a @@. One from black market won't do, go to Halinarzo!", getitemlink(SunnyCrystal));
+ next;
+ mesn;
+ mesq l("Speak with ##BBarzil##b. Tell him I need it, he'll give you one from my inventory. HURRY UP!");
+ close;
+
+L_T2_S2:
+ mesn;
+ mesq l("Hurry up! Bring my @@ from Barzil in Halinarzo!! You only have @@ left!", getitemlink(SunnyCrystal), FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+L_T2_S3:
+ if (countitem(SunnyCrystal) == 0) {
+ mesn;
+ mesq l("Where's the Sunny Crystal? Hurry up, you only have @@ left!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ }
+ delitem SunnyCrystal, 1;
+ ST_TIER=4;
+ getexp 250, 0;
+ mesn;
+ mesq l("Good, you did it!");
+ next;
+ mesn;
+ mesc l("*chants more words, while the crystal hovers the potion*");
+ next;
+
+L_T2_S4:
+ mesn;
+ mesq l("I will need many Mauve Herbs! Do you have them with you? If you don't have enough, we'll lose everything! You need at most @@!", BaseLevel+40);
+ select
+ rif(countitem(MauveHerb), l("Yes, I have herbs. I assume the risks.")),
+ l("No I don't have herbs. I'll be back.");
+
+ if (@menu == 2)
+ close;
+
+ if (gettimetick(2) > QUEST_ELEVARTEMPO) goto L_T2_Fail;
+ .@req=rand(BaseLevel-20, BaseLevel+40);
+ // Minimum is 40, max is unknown, defaults to 100
+
+ mesn;
+ mesq l("I need @@ Herbs!", .@req);
+ //next; // If you comment this next, you'll allow players to logout and prevent penalty.
+ mes "";
+
+ if (countitem(MauveHerb) < .@req) goto L_T2_Fail;
+ delitem MauveHerb, .@r;
+ ST_TIER=5;
+ getexp .@r*3, 0;
+ //getitem MagicPotion, 1;
+
+ mesc l("You quickly give him the herbs, and he skillfully mix them on a potion.");
+ next;
+ // You'll get a random amount of time, based on spent herbs
+ // Usually, 10~73 sec, being 73 sec = 1m13s
+ QUEST_ELEVARTEMPO=QUEST_ELEVARTEMPO+rand(10,.@r-27);
+
+L_T2_S5:
+ mesn;
+ mesq l("Good! Last step! West of Hurnscald, there is a magic fountain.");
+ next;
+ mesn;
+ mesq l("Talk to the Fountain. Pour the potion on it. I advise you to put all your points on int if possible.");
+ next;
+ mesn;
+ mesq l("Hurry up, you'll run out of time in @@!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+L_T2_S6:
+ ST_TIER=7;
+ mesn;
+ mesq l("You did it! You're now on the last stage of this BORING and LONG quest!");
+ next;
+
+L_T2_S7:
+ mesn;
+ mesq l("Jesusaves wrote a grimorie, with ancient secrets of our world.");
+ next;
+ mesn;
+ mesq l("Captain Nard have it. Fetch it with him! Quick, you only have @@ left!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+// You gain two skills: Provoke (works better, but limited usability) and the class skill
+L_T2_Final:
+ skill(AL_DP,1,0);
+ skill(SM_PROVOKE, 1, 0);
+ addtoskill(WIZARD_MAGE,2,0);
+ getexp 40000, 0; // Yes, 40k experience points. Waw.
+ mesc l(".:: Congratulations! ::."), 2;
+ mesc l("You advanced your tier!"), 2;
+ next;
+ mesn;
+ mesq l("Keep the Grimorie with you. It's the proof you are now Tier 2. The book shall guide your advances!");
+ next;
+ mesn;
+ mesq lg("Yes, courageous and worthy adventurer. You did well. I won't babysit you anymore. Embrace the new world opening before you!");
+ close;
+
OnInit:
.@npcId = getnpcid(0, .name$);
setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
diff --git a/npc/003-0-1/luca.txt b/npc/003-0-1/luca.txt
index fa4a0ebdf..778fea0ef 100644
--- a/npc/003-0-1/luca.txt
+++ b/npc/003-0-1/luca.txt
@@ -3,27 +3,35 @@
// Saulc
// Jesusalva
// Description:
-// Luca and Colin assigns player a class. This may end up contradicting races,
-// so expect core changes!
+// Luca and Colin assigns player a class. Luca is the Warrior Master.
003-0-1,35,29,0 script Luca NPC_PLAYER,{
-
mesn;
- mesq l("I am the Magic Warriors master.");
+ mesq l("I am the @@ master.", l("Magic Warriors"));
if (!MAGIC_LVL) goto L_NoMagic;
if (getskilllv(WIZARD_MAGE) && !is_admin()) close;
+ if (getskilllv(MAGIC_WARRIOR) == 0) goto L_SignUp;
- // Sanity check
- if (getskilllv(SM_BASH) >= 1) mesq l("Are you using my skill?");
- if (getskilllv(SM_BASH) >= 1) close;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 0) goto L_Tier2;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER >= 1) goto L_T2_S0;
- if (getskilllv(MAGIC_WARRIOR) == 0) goto L_SignUp;
+ // Sanity check
+ if (getskilllv(MAGIC_WARRIOR) >= 1) {
+ mesn;
+ mesq l("The Warriors have three other subclasses:");
+ mesn lg("Paladin");
+ mesc l("The well-round guy, with reasonable def, attack, and support skills.");
+ mesn lg("Berserker");
+ mesc l("The full-attack guy. Two hand swords works best!");
+ mesn lg("Tanker");
+ mesc l("The full-defense guy. Most skills require a shield.");
+ }
close;
L_SignUp:
next;
mesn;
- mesq l("You have some magic power. Do you want to join the Magic Warriors? ##BThis cannot be undone##b.");
+ mesq l("You have some magic power. Do you want to join the @@? ##BThis cannot be undone##b.", l("Magic Warriors"));
next;
mesn;
mesq l("We use swords and bows to protect the people, and we use magic to spice things up! Because we're strong even without it!");
@@ -38,11 +46,12 @@ L_JoinReq:
mesq l("Ah, nothing too major, as you already have magic.");
next;
mesn;
- mesq l("We only require a small fee of 1 @@, or 40 @@", getitemlink(DivineApple), getitemlink(SnakeEgg));
+ mesq l("We only require a small fee of 1 @@, or 40 @@, or 500 @@ if you are poor adventurer.", getitemlink(DivineApple), getitemlink(SnakeEgg), getitemlink(MaggotSlime));
next;
switch(select(
rif(countitem(DivineApple) >= 1, l("I got the apple.")),
rif(countitem(SnakeEgg) >= 40, l("I got the eggs.")),
+ rif(countitem(MaggotSlime) >= 500, l("I got the maggots slimes.")),
l("I will apply later."))) {
case 1:
@@ -57,6 +66,10 @@ L_JoinReq:
delitem SnakeEgg, 40;
goto L_Tier1Ok;
break;
+ case 3:
+ delitem MaggotSlime, 500;
+ goto L_Tier1Ok;
+ break;
default:
break;
}
@@ -69,7 +82,7 @@ L_Tier1Ok:
skill(MAGIC_WARRIOR,1,0);
mes "";
mesn;
- mesq l("Here, learn the ##BFalkon Punch##b. It is on Physical skills tab. You can drag it to the shortcut list. Use it to protect people!");
+ mesq l("Here, learn this awesome skill. It is on the skills tab. You can drag it to the shortcut list. Use it to protect people!");
close;
L_NoMagic:
@@ -84,6 +97,263 @@ L_NoMagic:
mesq l("Perhaps, in the city, someone knows rumors about Mana Stones and can teach you. Other than that, you're on your own.");
close;
+// progressbar("<color>", <seconds>)
+// Script will be canceled if character moves :D
+// So I probably could *try* to reuse TMW-BR Magic Tier 2 Scripts.
+L_Tier2:
+ next;
+ mesn;
+ mesq l("Wha, your magic power increased! How?! Ah, nevermind. You are eligible to get tier 2!");
+ next;
+ mesn;
+ mesq l("But whoa, not so fast! You must pass the seven steps of a trial first!");
+ next;
+ mesn;
+ mesq l("The first trial is simple, I'm not doing anything in special. Bring me 1 @@, or 200 @@ and 20 @@.", getitemlink(DivineApple), getitemlink(SilkCocoon), getitemlink(ChocolateMouboo));
+ next;
+ switch(select(
+ rif(countitem(DivineApple) >= 1, l("I got the apple.")),
+ rif(countitem(SilkCocoon) >= 200 && countitem(ChocolateMouboo) >= 20, l("I got the silk and chocolate.")),
+ l("I will apply later."))) {
+
+ case 1:
+ delitem DivineApple, 1;
+ goto L_Tier2Ok;
+ break;
+ case 2:
+ delitem SilkCocoon, 200;
+ delitem ChocolateMouboo, 20;
+ goto L_Tier2Ok;
+ break;
+ default:
+ break;
+ }
+
+ close;
+
+L_Tier2Ok:
+ // The last argument is duration: 0 - permanent 1- temporary. If omitted, defaults to 1.
+ addtoskill(SM_BASH,2,0);
+ getexp 10000, 0;
+ ST_TIER=1;
+ mes "";
+ mesn;
+ mesq l("Good, good. The skill you got earlier just raised a single level. I'll also impair some experience on you, no biggies.");
+ next;
+ mesn;
+ mesq l("Now, the real challenge will start. You have a lot of raw power, but that doesn't gives you a lot of skills to learn.");
+ next;
+ mesn;
+ mesq l("I can make a nice, simple potion for you. That will help the raw mana to settle on your body.");
+ next;
+ mesn;
+ mesq l("However, beware! That potion is short-lived, you'll be running against time. Get ready to travel a lot.");
+ next;
+ if (nard_reputation() < 8) {
+ mesn;
+ mesq l("I advise you to do more quests on Tulimshar and Candor, otherwise, you might fail right at the end.");
+ next;
+ }
+ mesn;
+ mesq l("Come talk to me when you're ready, and we can begin.");
+ close;
+
+L_T2_Fail:
+ if (ST_TIER == 3) {
+ if (countitem(SunnyCrystal) > 0) {
+ delitem SunnyCrystal, 1;
+ } else {
+ mesn;
+ mesc l("WARNING. YOU ARE CHEATING THE SUNNY CRYSTAL QUEST."), 1;
+ next;
+ mesn;
+ mesc l("YOU WILL BE PENALIZED WITH 60% OF HEALTH."), 1;
+ mesc l("IF YOU DIE, YOU'LL SUFFER THE EXP PENALTY."), 1;
+ percentheal -60, -100;
+ close;
+ }
+ }
+
+ if (ST_TIER == 10) {
+ if (countitem(JesusalvaGrimorium) > 0) {
+ delitem JesusalvaGrimorium, 1;
+ } else {
+ mesn;
+ mesc l("WARNING. YOU ARE CHEATING THE GRIMORIE QUEST."), 1;
+ next;
+ mesn;
+ mesc l("YOU WILL BE PENALIZED WITH 70% OF HEALTH."), 1;
+ mesc l("IF YOU DIE, YOU'LL SUFFER THE EXP PENALTY."), 1;
+ percentheal -70, -100;
+ close;
+ }
+ }
+
+ mesc l(".:: Mission Failed ::."), 1;
+ mesc l("You ran out of time."), 1;
+ mes "";
+ mes l("You should have gotten here @@.", FuzzyTime(QUEST_ELEVARTEMPO,0,2));
+ ST_TIER=1;
+ close;
+
+L_T2_S0:
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 1) goto L_T2_S1;
+ if (gettimetick(2) > QUEST_ELEVARTEMPO) goto L_T2_Fail;
+
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 2) goto L_T2_S2;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 3) goto L_T2_S3;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 4) goto L_T2_S4;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 5) goto L_T2_S5;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 6) goto L_T2_S6;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER <= 9) goto L_T2_S7;
+ if (getskilllv(MAGIC_WARRIOR) == 1 && MAGIC_LVL >= 2 && ST_TIER == 10) goto L_T2_Final;
+ mesc l("Error, error, L_T2_S0 General Error, REPORT ME");
+ close;
+
+L_T2_S1:
+ //MAGIC_WARRIOR l("Magic Warriors") WIZARD_MAGE
+ mes "";
+ mesn;
+ mesq l("So, young disciple! I wish I could just chant some gibberish words and that automatically granted you more skills, but alas, that won't work.");
+ next;
+ if (nard_reputation() < 8) {
+ mesn;
+ mesq l("I advise you to do more quests on Tulimshar and Candor, otherwise, you will fail right at the end.");
+ next;
+ }
+ mesn;
+ mesq l("I can, however, prepare you a potion. But beware, that potion will only last 35 minutes once baked.");
+ next;
+ mesn; // PiberriesInfusion
+ mesq l("If it expires, you'll need to do another. To bake it I need 1 @@, 10 @@ and a @@. Have Mauve and Money, lots of it.", getitemlink(EverburnPowder), getitemlink(MaggotSlime), getitemlink(EmptyBottle));
+ next;
+ select
+ rif(countitem(MaggotSlime) >= 10 && countitem(EverburnPowder) && countitem(EmptyBottle), l("I have everything.")),
+ l("I'm not ready.");
+
+ mes "";
+ if (@menu == 2) {
+ mesn;
+ mesq l("Yes, as you see, the costs are high. Prepare yourself.");
+ close;
+ }
+
+ delitem EmptyBottle, 1;
+ delitem EverburnPowder, 1;
+ delitem MaggotSlime, 10;
+ ST_TIER=2;
+ set QUEST_ELEVARTEMPO, gettimetick(2) + (60 * 35);
+ getexp 400, 0;
+ mesn;
+ mesc l("The class master mix the powder with the slime inside the bottle, and makes some weird mixture.");
+ next;
+ mesn;
+ mesc l("He pours something on it, you're not sure what. He then utters some magic words.");
+ next;
+ // Reset timer, this is the place where it should really happen.
+ set QUEST_ELEVARTEMPO, gettimetick(2) + (60 * 35);
+ mesn;
+ mesq l("The potion is baked, you have thirty five minutes! Read as fast as you can, don't miss details!");
+ next;
+ mesn;
+ mesq l("First thing is to get a @@. One from black market won't do, go to Halinarzo!", getitemlink(SunnyCrystal));
+ next;
+ mesn;
+ mesq l("Speak with ##BBarzil##b. Tell him I need it, he'll give you one from my inventory. HURRY UP!");
+ close;
+
+L_T2_S2:
+ mesn;
+ mesq l("Hurry up! Bring my @@ from Barzil in Halinarzo!! You only have @@ left!", getitemlink(SunnyCrystal), FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+L_T2_S3:
+ if (countitem(SunnyCrystal) == 0) {
+ mesn;
+ mesq l("Where's the Sunny Crystal? Hurry up, you only have @@ left!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ }
+ delitem SunnyCrystal, 1;
+ ST_TIER=4;
+ getexp 250, 0;
+ mesn;
+ mesq l("Good, you did it!");
+ next;
+ mesn;
+ mesc l("*chants more words, while the crystal hovers the potion*");
+ next;
+
+L_T2_S4:
+ mesn;
+ mesq l("I will need many Mauve Herbs! Do you have them with you? If you don't have enough, we'll lose everything! You need at most @@!", BaseLevel+40);
+ select
+ rif(countitem(MauveHerb), l("Yes, I have herbs. I assume the risks.")),
+ l("No I don't have herbs. I'll be back.");
+
+ if (@menu == 2)
+ close;
+
+ if (gettimetick(2) > QUEST_ELEVARTEMPO) goto L_T2_Fail;
+ .@req=rand(BaseLevel-20, BaseLevel+40);
+ // Minimum is 40, max is unknown, defaults to 100
+
+ mesn;
+ mesq l("I need @@ Herbs!", .@req);
+ //next; // If you comment this next, you'll allow players to logout and prevent penalty.
+ mes "";
+
+ if (countitem(MauveHerb) < .@req) goto L_T2_Fail;
+ delitem MauveHerb, .@r;
+ ST_TIER=5;
+ getexp .@r*3, 0;
+ //getitem MagicPotion, 1;
+
+ mesc l("You quickly give him the herbs, and he skillfully mix them on a potion.");
+ next;
+ // You'll get a random amount of time, based on spent herbs
+ // Usually, 10~73 sec, being 73 sec = 1m13s
+ QUEST_ELEVARTEMPO=QUEST_ELEVARTEMPO+rand(10,.@r-27);
+
+L_T2_S5:
+ mesn;
+ mesq l("Good! Last step! West of Hurnscald, there is a magic fountain.");
+ next;
+ mesn;
+ mesq l("Talk to the Fountain. Pour the potion on it. I advise you to put all your points on int if possible.");
+ next;
+ mesn;
+ mesq l("Hurry up, you'll run out of time in @@!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+L_T2_S6:
+ ST_TIER=7;
+ mesn;
+ mesq l("You did it! You're now on the last stage of this BORING and LONG quest!");
+ next;
+
+L_T2_S7:
+ mesn;
+ mesq l("Jesusaves wrote a grimorie, with ancient secrets of our world.");
+ next;
+ mesn;
+ mesq l("Captain Nard have it. Fetch it with him! Quick, you only have @@ left!", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+// You gain two skills: Provoke (works better, but limited usability) and the class skill
+L_T2_Final:
+ skill(NV_TRICKDEAD,1,0);
+ skill(SM_PROVOKE, 1, 0);
+ addtoskill(MAGIC_WARRIOR,2,0);
+ getexp 40000, 0; // Yes, 40k experience points. Waw.
+ mesc l(".:: Congratulations! ::."), 2;
+ mesc l("You advanced your tier!"), 2;
+ next;
+ mesn;
+ mesq l("Keep the Grimorie with you. It's the proof you are now Tier 2. The book shall guide your advances!");
+ next;
+ mesn;
+ mesq lg("Yes, courageous and worthy adventurer. You did well. I won't babysit you anymore. Embrace the new world opening before you!");
+ close;
+
OnInit:
.@npcId = getnpcid(0, .name$);
setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
diff --git a/npc/003-0-1/maxime.txt b/npc/003-0-1/maxime.txt
new file mode 100644
index 000000000..aef604644
--- /dev/null
+++ b/npc/003-0-1/maxime.txt
@@ -0,0 +1,87 @@
+// TMW-2 Script.
+// Author:
+// Saulc
+// Jesusalva
+// Notes:
+// Bakes Tonori Delight
+
+003-0-1,77,40,0 script Maxime NPC_PLAYER,{
+ mesn;
+ mesq l("Hello. I know the secrets of the legendary @@.", getitemlink(TonoriDelight));
+ next;
+ mesn;
+ mesq l("I could easily bake one for you, provided you bring me the following:");
+ mesc l("@@/12 @@", countitem(MaggotSlime), getitemlink(MaggotSlime));
+ mesc l("@@/8 @@", countitem(Plushroom), getitemlink(Plushroom));
+ mesc l("@@/4 @@", countitem(MushroomSpores), getitemlink(MushroomSpores));
+ mesc l("@@/3 @@", countitem(ScorpionStinger), getitemlink(ScorpionStinger));
+ mesc l("@@/2 @@", countitem(CactusDrink), getitemlink(CactusDrink));
+ mesc l("@@/1 @@", countitem(RoastedMaggot), getitemlink(RoastedMaggot));
+ mesc l("@@/150 GP", format_number(Zeny));
+ next;
+ select
+ l("I have the items, please bake for me"),
+ l("Ah, nice to know.");
+
+ mes "";
+
+ if (@menu == 2)
+ goto L_Close;
+
+ if (
+ countitem(MaggotSlime) < 12 ||
+ countitem(Plushroom) < 8 ||
+ countitem(MushroomSpores) < 4 ||
+ countitem(ScorpionStinger) < 3 ||
+ countitem(CactusDrink) < 2 ||
+ countitem(RoastedMaggot) < 1 ||
+ Zeny < 150) goto L_Missing;
+
+ // 4~7 normaly, 5~10 during Summer
+ inventoryplace TonoriDelight, 12;
+ delitem MaggotSlime, 12;
+ delitem Plushroom, 8;
+ delitem MushroomSpores, 4;
+ delitem ScorpionStinger, 3;
+ delitem CactusDrink, 2;
+ delitem RoastedMaggot, 1;
+ getitem TonoriDelight, rand(4,7);
+ if (season() == SUMMER) {
+ getitem TonoriDelight, rand(1,3);
+ mesc l("During summer, more Tonori Delight can be produced.");
+ }
+ Zeny=Zeny-150;
+ getexp rand(30, 60), 0;
+
+ mesn;
+ mesq l("Here you go, fresh from the oven!");
+ next;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("You don't have everything I asked you for.");
+ next;
+ mesn;
+ mesq l("I always wonder if I should raise my price to teach bad kids to don't lie.");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, AssassinBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 2);
+
+ .sex = G_MALE;
+ .distance = 4;
+ npcsit;
+ end;
+}
+
diff --git a/npc/003-0-1/statues.txt b/npc/003-0-1/statues.txt
index 91cabeb29..436348f52 100644
--- a/npc/003-0-1/statues.txt
+++ b/npc/003-0-1/statues.txt
@@ -36,6 +36,14 @@ OnInit:
goto L_Fame;
next;
mes l("Also in honor of @@, who did a great act of bravery recently. May they keep protecting our world!", $MOST_HEROIC$);
+ // TODO: Must find a better place for this
+ next;
+ mes l("And in honor of all brave LoF players, to be known to all, the fluffly hunters.");
+ mes "BunnyBear (239) - 2017-11-07 10:04:29";
+ mes "Scorpius (190) - 2017-01-09 21:33:00";
+ mes "Billr (177) - 2016-05-21 23:53:22";
+ mes "Naburudanga (153) - 2017-07-28 22:14:07";
+ mes "Axzell (150) - 2017-01-09 22:23:00";
L_Fame:
next;
@@ -52,10 +60,7 @@ OnInit:
003-0-1,60,26,0 script Worker Statue NPC_STATUE_CONTRIBUTOR,{
- mes l("This is in honor of all the [@@help://about-server|Contributors@@] who helped rebuilding this world, after the Monster War outbreak.");
- mes l("And also in notable mention of those who [@@https://www.patreon.com/TMW2|sponsor@@] the Alliance and its administrative structure.");
- mes l("");
- mes l("GonzoDark, Saulc.");
+ HallOfSponsor();
close;
OnInit:
diff --git a/npc/003-0/_import.txt b/npc/003-0/_import.txt
index b64702ef4..415c1919f 100644
--- a/npc/003-0/_import.txt
+++ b/npc/003-0/_import.txt
@@ -1,2 +1,12 @@
-// Map 003-0: The Magic Guild
+// Map 003-0: Magic Academy
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/003-0/_warps.txt",
+"npc/003-0/audsbel.txt",
+"npc/003-0/berserk.txt",
+"npc/003-0/mages.txt",
+"npc/003-0/paladin.txt",
+"npc/003-0/priest.txt",
+"npc/003-0/sage.txt",
+"npc/003-0/tanker.txt",
+"npc/003-0/warriors.txt",
+"npc/003-0/wizard.txt",
diff --git a/npc/soren/_warps.txt b/npc/003-0/_warps.txt
index 468ee5657..0d4ddffe6 100644
--- a/npc/soren/_warps.txt
+++ b/npc/003-0/_warps.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map soren: Soren's Village warps
-soren,105,37,0 warp #soren_105_37 0,0,soren-2,32,36
+// Map 003-0: Magic Academy warps
+003-0,48,52,0 warp #003-0_48_52 2,0,003-1,34,34
diff --git a/npc/003-0/audsbel.txt b/npc/003-0/audsbel.txt
new file mode 100644
index 000000000..cdb409ac5
--- /dev/null
+++ b/npc/003-0/audsbel.txt
@@ -0,0 +1,241 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// One of the Mana Magic Leaders
+// Planned, there are only the four Mana Wizards: Auldsbel (Tulimshar), Sagratha (Woodlands), Morgan (Candor), and UNKNOWN (Nivalis).
+
+// Gives #parum
+
+003-0,32,24,0 script Auldsbel NPC_AULDSBEL,{
+ if (MAGIC_LVL < 2)
+ goto L_Cheat;
+ mesn l("Auldsbel the Wizard");
+ mesq l("Welcome back, Padric!");
+ mesq l("Do you believe I've lost my @@? I can't see anything well without that! %%a", getitemlink(Googles));
+ next;
+ mesn;
+ mesq l("Anyway, I am one of the few Mana Wizard, and I love Transmutation!");
+ next;
+
+L_Main:
+ select
+ l("What's the difference from a Mana Wizard and a Mage?"),
+ l("Who are you? Where are you from?"),
+ l("How do I advance in Mana Magic? How it works?"),
+ l("What do you know about other Mana Magic Professors?"),
+ l("Can you teach me Mana Magic?"),
+ l("Do you still need help with your experiments?"),
+ l("Actually, I gotta go, see ya!");
+
+ mes "";
+ switch (@menu) {
+ case 1: // What's the difference from a Mana Wizard and a Mage?
+ mesn;
+ mesq l("%%4 Haven't you read your Grimorium yet?!");
+ next;
+ mesn;
+ mesq l("%%@ You can get Magic by joining class and subclass, and with some NPCs. These work out-of-box. Easy.");
+ next;
+ mesn;
+ mesq l("And there is the Mana Magic, for the pro %%e You'll waste your life on that, as it have an experience system.");
+ next;
+ mesn;
+ mesq l("%%G Just like normal magic, you need power from the Mana Stone, which is based on your levels, intelligence, and mana.");
+ next;
+ mesn;
+ mesq l("I like Mana Magic the best, as we can both summon creatures as transmutate stuff. %%N");
+ next;
+ mesn;
+ mesq l("To be honest, you should use both. And remember, all Mana Magic skills can be used like they were @sk-commands. %%H");
+ next;
+ break;
+ case 2: // Who are you? Where are you from?
+ mesn;
+ mesq l("Well, speaking a bit about myself can't hurt. I am a member from the Magic Council, but one day I decided to take a vacations.");
+ next;
+ mesn;
+ mesq l("I moved to Hurnscald, stayed there for over a decade, until Lord Transmogrifier Pontorias the Plaid (May His Shape Reflect His Soul Forever) died.");
+ next;
+ mesn;
+ mesq l("Then I returned to Tulimshar. Now I do research, vote on the Magic Council meetings, and I also teach young mages about Transmutation magic.");
+ next;
+ break;
+ case 3: // How do I advance in Mana Magic? How it works?
+ mesn;
+ mesq l("Mana Magic works similar to regular magic: You can find it on your skill window, and can drag it to your shortcut list.");
+ next;
+ mesn;
+ mesq l("To get more experience and magic power, you must practice magical spells. Make sure to vary them; you will learn nothing if you cast the same spell over and over. Also, spells that consume no components seem not to be very instructive in practice.");
+ next;
+ mesn;
+ mesq l("Usually, you can find magic on these buildings, but watch out, there is magic to be found elsewhere, and some items are bound with it!");
+ next;
+ mesn;
+ mesq l("While on normal magic you must take care with all attributes, on mana magic, you usually only need to worry with reagents and intelligence.");
+ next;
+ mesn;
+ mesq l("Also, unlike regular magic which may cause delay before and after, Mana Magic usually only have a cooldown. But it is hard to know how long that cooldown is..."); // We may use addtimer() on one or other spell.
+ next;
+ break;
+ case 4: // What do you know about Sagratha?
+ mesn;
+ mesq l("Lemme see... Sagratha is often regarded as a kind and rather powerful elf lady mage... who hate people.");
+ next;
+ mesn;
+ mesq l("And I'm not talking only about humans here! But perhaps, if you build a good reputation, she teaches you something.");
+ next;
+ mesn;
+ mesq l("There's also Morgan, who lives in Candor. She is a Redy, and is married with Zitoni. They are great alchemists.");
+ next;
+ mesn;
+ mesq l("By last, there was the Blue Sage, living on Nivalis... I never met him.");
+ next;
+ mesn;
+ mesq l("As you see, you can count the mages with the fingers of one hand. It's not just Mana Magic, either - Magic in overall is almost dead, with almost every Mana Stone on the power of the Monster King.");
+ next;
+ mesn;
+ mesq l("Defeating him would not only stop monster invasions, but it would also bring magic back... And probably another war, over the mana stones. %%S");
+ next;
+ break;
+ // Teaching and helping are bound one to other, to save space on variable e.e
+ case 5: // Can you teach me Mana Magic?
+ case 6: // Do you still need help with your experiments?
+ goto L_Magic;
+ break;
+ default: // Actually, I gotta go, see ya!
+ goodbye;
+ closedialog;
+ close;
+ }
+ goto L_Main;
+
+L_Magic:
+ .@q=getq(General_Auldsbel);
+ switch (.@q) {
+ // Help on research to gain his favor
+ case 0:
+ mesn;
+ mesq l("I actually need help. Padric and I were doing some research with catalysts, you see.");
+ next;
+ mesn;
+ mesq l("Now I need 20 @@, 20 @@ and 60 @@ to finish my research. Easy materials, except for the Shadow Herb.", getitemlink(MauveHerb), getitemlink(ShadowHerb), getitemlink(SilkCocoon));
+ next;
+ mesn;
+ mesq l("Shadow Herb only grows on dangerous places, and is mostly found on the Land Of Fire, or underground of very very deep caves.");
+ next;
+ select
+ l("I'll try to find them."),
+ l("I actually have them, here.");
+ if (@menu == 2) {
+ mes "";
+ mesn;
+ mesq l("Excellent! Let me see...");
+ next;
+ if (
+ countitem(MauveHerb) < 20 ||
+ countitem(ShadowHerb) < 20 ||
+ countitem(SilkCocoon) < 60)
+ goto L_Lie;
+ delitem MauveHerb, 20;
+ delitem ShadowHerb, 20;
+ delitem SilkCocoon, 60;
+ getexp 2500, 0;
+ Zeny=Zeny+250;
+ setq General_Auldsbel, 1;
+ mesn;
+ mesq l("Yes, many thanks. This will help me a lot.");
+ mesc l("Gained 2500 XP and 250 GP");
+ }
+ break;
+ // Learn #parum
+ case 1:
+ mesn;
+ mesq l("Hmm, I think I can teach you a basic Mana Skill now. That one is pretty simple.");
+ next;
+ skill(TMW2_PARUM,1,0);
+ setq General_Auldsbel, 2;
+ mesn;
+ mesq l("This is the @@ skill. It transmutes a single @@ in a @@.", "##B@sk-parum##b", getitemlink(RawLog), getitemlink(MoubooFigurine));
+ next;
+ mesn;
+ mesq l("It may also create some @@ or a @@, with enough skill.", getitemlink(Arrow), getitemlink(WoodenLog));
+ next;
+ mesn;
+ mesq l("So! Please transmute a @@ and bring it to me. You may need to switch with another mana skill, until you are successful.", getitemlink(MoubooFigurine));
+ break;
+ // Bring the Mouboo figurine back
+ case 2:
+ mesn;
+ mesq l("Have you managed to transmute the @@ I asked for?", getitemlink(MoubooFigurine));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (!countitem(MoubooFigurine)) goto L_Lie;
+ if (!MAGIC_EXP) goto L_Lame;
+ delitem MoubooFigurine, 1;
+ getexp 5000, 0;
+ setq General_Auldsbel, 3;
+ mesn;
+ mesq l("Very well - Congratulations! That was very easy, though, and this one is full of imperfections.");
+ mesc l("Gained 5000 XP");
+ next;
+ mesn;
+ mesq l("That skill was only to allow you to practice. Now listen well: Transmutation is ##BNOT##b crafting!");
+ next;
+ mesn;
+ mesq l("Magic is sacred. With transmutation, you can create convenience items, specially reagents for other magic skills.");
+ next;
+ mesn;
+ mesq l("But if you try to create equipment, assuming magic doesn't backfire, YOU WILL BE BANNED from this school, and lose your class. Permanently.");
+ next;
+ mesn;
+ mesq l("This is just a friendly advise. We don't take magic lightly. And you shouldn't, either.");
+ }
+ break;
+ default:
+ mesn;
+ mesq l("Uhm, no, not really. Maybe later, who knows?");
+ break;
+ }
+ next;
+ goto L_Main;
+
+
+// Fallbacks
+L_Lie:
+ mesn;
+ mesq l("Really interesting, how I am NOT seeing the items I asked for...");
+ next;
+ mesn;
+ mesq l("Say, what do you think if I transmuted your head into the missing materials? I can warrant your soul won't return to the Soul Menhir, either!");
+ close;
+
+L_Cheat:
+ atcommand "@jail "+strcharinfo(0);
+ setparam(MaxHp, readparam(MaxHp)/2); // testing
+ setparam(Karma, -1); // testing
+ setparam(Manner, -10); // testing
+ dispbottom l("You are not allowed on this building, and was caught by Jesusalva's Police!!");
+ end;
+
+L_Lame:
+ setparam(MaxHp, readparam(MaxHp)-50); // I want to see how permanent this is
+ setparam(MaxSp, readparam(MaxSp)-25); // I want to see how permanent this is
+ setparam(Karma, readparam(Karma)-1); // testing
+ mesn;
+ mesq l("%%3 You sadden me. That was so, so lame. I will need to punish you. Sorry. Superior orders. %%S");
+ next;
+ mesn strcharinfo(0);
+ mesq l("%%i What, my maximum life and mana just decreased! Noooo!!");
+ next;
+ mesn;
+ mesq l("%%1 Cheer up, these should go back to normal when you level up. Just don't do that again!");
+ // If that is true or not, remains to be checked. Uh... I never used setparam() before! :D
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/berserk.txt b/npc/003-0/berserk.txt
new file mode 100644
index 000000000..8506a3e0d
--- /dev/null
+++ b/npc/003-0/berserk.txt
@@ -0,0 +1,222 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the BERSERK class
+
+003-0,34,45,4 script Ragger Master NPC_PLAYER,{
+ if (!(MAGIC_SUBCLASS & CL_BERSERKER))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(MAGIC_WARRIOR) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Berserk (Ragger) Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_BERSERKER;
+ mesn;
+ mesq l("Welcome to the berserker guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Ragger
+// KN_AUTOCOUNTER (Counter any attack with 2x critical rate and block attack for 0.5s)
+// SM_ENDURE (deny stun penalty when hit, and MDEF bonus, for 10s)
+// KN_TWOHANDQUICKEN (raise attack speed in 30%, if you are with a 2-hands sword) (30s/level)
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(SM_BASH) && getskilllv(SM_BASH) < (3+degree_subclass()), l("Improve Bash Skill")),
+ rif(sk_intcost(SM_ENDURE) && sk_canlvup(SM_ENDURE), l("Improve Endure Skill")),
+ rif(sk_intcost(KN_AUTOCOUNTER) && sk_canlvup(KN_AUTOCOUNTER), l("Improve Counter Defense")),
+ rif(sk_intcost(KN_TWOHANDQUICKEN) && sk_canlvup(KN_TWOHANDQUICKEN), l("Improve Two Hands Quicken")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Bash]");
+ mesc l("Blow with increased attack and precision.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(ManaPiouFeathers), (getskilllv(SM_BASH)+1)*15, getitemlink(ManaPiouFeathers));
+ mesc l("@@/@@ @@", countitem(CaveSnakeSkin), (getskilllv(SM_BASH)+1)*4, getitemlink(CaveSnakeSkin));
+ mesc l("@@/@@ @@", countitem(RubyPowder), (getskilllv(SM_BASH)+1)*2, getitemlink(RubyPowder));
+ mesc l("@@/@@ @@", countitem(StrengthPotion), (getskilllv(SM_BASH)+1)*2, getitemlink(StrengthPotion));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(ManaPiouFeathers) < (getskilllv(SM_BASH)+1)*15 ||
+ countitem(CaveSnakeSkin) < (getskilllv(SM_BASH)+1)*4 ||
+ countitem(RubyPowder) < (getskilllv(SM_BASH)+1)*2 ||
+ countitem(StrengthPotion) < (getskilllv(SM_BASH)+1)*2) goto L_Missing;
+
+ delitem PiberriesInfusion, (getskilllv(SM_BASH)+1)*15;
+ delitem CaveSnakeSkin, (getskilllv(SM_BASH)+1)*4;
+ delitem RubyPowder, (getskilllv(SM_BASH)+1)*2;
+ delitem StrengthPotion, (getskilllv(SM_BASH)+1)*2;
+
+ sk_lvup(SM_BASH);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Endure]");
+ mesc l("Temporary immunity to move stun when hit, and MDEF bonus.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(SM_ENDURE)+1)*10, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(DiamondPowder), (getskilllv(SM_ENDURE)+1)*2, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(MoubooSteak), (getskilllv(SM_ENDURE)+1)*4, getitemlink(MoubooSteak));
+ mesc l("@@/@@ @@", countitem(IronIngot), (getskilllv(SM_ENDURE)+1)*1, getitemlink(IronIngot));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(PiberriesInfusion) < (getskilllv(SM_ENDURE)+1)*10 ||
+ countitem(DiamondPowder) < (getskilllv(SM_ENDURE)+1)*2 ||
+ countitem(MoubooSteak) < (getskilllv(SM_ENDURE)+1)*4 ||
+ countitem(IronIngot) < (getskilllv(SM_ENDURE)+1)*1) goto L_Missing;
+
+ delitem PiberriesInfusion, (getskilllv(SM_ENDURE)+1)*10;
+ delitem DiamondPowder, (getskilllv(SM_ENDURE)+1)*2;
+ delitem MoubooSteak, (getskilllv(SM_ENDURE)+1)*4;
+ delitem IronIngot, (getskilllv(SM_ENDURE)+1)*1;
+
+ sk_lvup(SM_ENDURE);
+
+ next;
+ }
+ break;
+ case 3:
+ mesc l("[Counter Defense]");
+ mesc l("During a very small amount of time, you'll counter any attack with double critical, and won't take the damage.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(PinkAntenna), (getskilllv(KN_AUTOCOUNTER)+1)*10, getitemlink(ManaPiouFeathers));
+ mesc l("@@/@@ @@", countitem(CaveSnakeSkin), (getskilllv(KN_AUTOCOUNTER)+1)*4, getitemlink(CaveSnakeSkin));
+ mesc l("@@/@@ @@", countitem(RubyPowder), (getskilllv(KN_AUTOCOUNTER)+1)*2, getitemlink(RubyPowder));
+ mesc l("@@/@@ @@", countitem(StrengthPotion), (getskilllv(KN_AUTOCOUNTER)+1)*2, getitemlink(StrengthPotion));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(PinkAntenna) < (getskilllv(KN_AUTOCOUNTER)+1)*10 ||
+ countitem(CaveSnakeSkin) < (getskilllv(KN_AUTOCOUNTER)+1)*4 ||
+ countitem(RubyPowder) < (getskilllv(KN_AUTOCOUNTER)+1)*2 ||
+ countitem(StrengthPotion) < (getskilllv(KN_AUTOCOUNTER)+1)*2) goto L_Missing;
+
+ delitem PinkAntenna, (getskilllv(KN_AUTOCOUNTER)+1)*10;
+ delitem CaveSnakeSkin, (getskilllv(KN_AUTOCOUNTER)+1)*4;
+ delitem RubyPowder, (getskilllv(KN_AUTOCOUNTER)+1)*2;
+ delitem StrengthPotion, (getskilllv(KN_AUTOCOUNTER)+1)*2;
+
+ sk_lvup(KN_AUTOCOUNTER);
+
+ next;
+ }
+ break;
+ case 4:
+ mesc l("[Two Hands Quicken]");
+ mesc l("Triggers an attack speed buff when using two swords.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Cheese), (getskilllv(KN_TWOHANDQUICKEN)+1)*50, getitemlink(Cheese));
+ mesc l("@@/@@ @@", countitem(Coral), (getskilllv(KN_TWOHANDQUICKEN)+1)*30, getitemlink(Coral));
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(KN_TWOHANDQUICKEN)+1)*20, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(HastePotion), (getskilllv(KN_TWOHANDQUICKEN)+1)*10, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(DiamondPowder), (getskilllv(KN_TWOHANDQUICKEN)+1)*3, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(ElixirOfLife), (getskilllv(KN_TWOHANDQUICKEN)+1)*1, getitemlink(ElixirOfLife));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Cheese) < (getskilllv(KN_TWOHANDQUICKEN)+1)*50 ||
+ countitem(Coral) < (getskilllv(KN_TWOHANDQUICKEN)+1)*30 ||
+ countitem(PiberriesInfusion) < (getskilllv(KN_TWOHANDQUICKEN)+1)*20 ||
+ countitem(HastePotion) < (getskilllv(KN_TWOHANDQUICKEN)+1)*10 ||
+ countitem(DiamondPowder) < (getskilllv(KN_TWOHANDQUICKEN)+1)*3 ||
+ countitem(ElixirOfLife) < (getskilllv(KN_TWOHANDQUICKEN)+1)*1) goto L_Missing;
+
+ delitem Cheese, (getskilllv(KN_TWOHANDQUICKEN)+1)*50;
+ delitem Coral, (getskilllv(KN_TWOHANDQUICKEN)+1)*30;
+ delitem PiberriesInfusion, (getskilllv(KN_TWOHANDQUICKEN)+1)*20;
+ delitem HastePotion, (getskilllv(KN_TWOHANDQUICKEN)+1)*10;
+ delitem DiamondPowder, (getskilllv(KN_TWOHANDQUICKEN)+1)*3;
+ delitem ElixirOfLife, (getskilllv(KN_TWOHANDQUICKEN)+1)*1;
+
+ sk_lvup(KN_TWOHANDQUICKEN);
+
+ next;
+ }
+ break;
+ case 5:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill KN_TWOHANDQUICKEN, 0, 0;
+ skill KN_AUTOCOUNTER, 0, 0;
+ skill SM_ENDURE, 0, 0;
+ skill SM_BASH, 2, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_BERSERKER;
+ mesc l("You abandoned the BERSERKER class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, GoldenWarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, ShortGladius);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/mages.txt b/npc/003-0/mages.txt
new file mode 100644
index 000000000..4d1b8f8cf
--- /dev/null
+++ b/npc/003-0/mages.txt
@@ -0,0 +1,25 @@
+// Wizard
+// MG_COLDBOLT (ice)
+// MG_LIGHTNINGBOLT (wind)
+// WZ_EARTHSPIKE (earth)
+// MG_NAPALMBEAT (ghost)
+// MG_ENERGYCOAT (For 5 minutes, raise damage reduction, but that eats MP)
+// TODO: We have many other cool skills for Wizard (more AoE skills, more damage, etc)
+// I will worry with that later, as that also means providing extra skills for Sage & Priest
+
+// Sage
+// SA_FREECAST (allows to move/attack while casting)
+// SA_DRAGONOLOGY (+4% ATK, +2% MATK, +1 INT and +4% resist against DRAGONS)
+// TMW2_SAGE (grants up to 1.5 extra mana exp point/level)
+// SA_FLAMELAUNCHER (bestow fire element on weapon for 2m, 70% cth)
+// SA_FROSTWEAPON (bestow water element on weapon for 2m, 70% cth)
+// SA_LIGHTNINGLOADER (bestow wind element on weapon for 2m, 70% cth)
+// SA_SEISMICWEAPON (bestow earth element on weapon for 2m, 70% cth)
+
+// Priest
+// Broken //AL_PNEUMA (BLOCKS ranged (4+ tiles) physical attacks on a 3x3 area. No bows :D)
+// AL_HOLYLIGHT (standard holy magic attack - 125% of MATK)
+// MG_SRECOVERY (small increase to SP Recovery while idle each 10 sec.)
+// ALL_RESURRECTION (Revive at 10% HP. May insta-kill undead.)
+// PR_ASPERSIO (Change anyone weapon to holy for 60s. Or 40 defense-disregard holy dmg to undead/evil)
+// TF_DETOXIFY (cancels poison. 40% MP.)
diff --git a/npc/003-0/paladin.txt b/npc/003-0/paladin.txt
new file mode 100644
index 000000000..63f4430ab
--- /dev/null
+++ b/npc/003-0/paladin.txt
@@ -0,0 +1,223 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the PALADIN class
+
+003-0,34,37,0 script Paladin Master NPC_PLAYER,{
+ /*
+ if (!is_staff())
+ goto L_Close;
+ */
+ if (!(MAGIC_SUBCLASS & CL_PALADIN))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(MAGIC_WARRIOR) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Paladin Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_PALADIN;
+ mesn;
+ mesq l("Welcome to the paladin guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Paladin
+// CR_TRUST (raise Max HP in 200 and Holy Resistance in 5%, passive)
+// AL_ANGELUS (DEF Increase 5% for 15s/LVL, 14x14 area for PARTY)
+// PR_REDEMPTIO (suicide with death penalty. Revive dead party members on a 29x29 area. Min. 1% xp. 0.01% xp penalty reduction per revive)
+// MER_INCAGI (raise agi and move speed for 20s/LVL. Have an HP cost.)
+// SM_BASH up to level 4 (+220% dmg and +20% acc). PS. If you have MP, SM_BASH is very powerful.
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(SM_BASH) && getskilllv(SM_BASH) < (3+degree_subclass()/2), l("Improve Bash Skill")),
+ rif(sk_intcost(AL_ANGELUS) && sk_canlvup(AL_ANGELUS), l("Improve Party Area Defense")),
+ "","",
+ //rif(sk_intcost(MER_INCAGI) && sk_canlvup(MER_INCAGI), l("Improve Increase Agility")),
+ //rif(sk_intcost(PR_REDEMPTIO) && !getskilllv(PR_REDEMPTIO), l("Learn Redemption")),
+ rif(sk_intcost(CR_TRUST) && !getskilllv(CR_TRUST), l("Learn Last Standing Man")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Bash]");
+ mesc l("Blow with increased attack and precision.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(ManaPiouFeathers), (getskilllv(SM_BASH)+1)*15, getitemlink(ManaPiouFeathers));
+ mesc l("@@/@@ @@", countitem(CaveSnakeSkin), (getskilllv(SM_BASH)+1)*4, getitemlink(CaveSnakeSkin));
+ mesc l("@@/@@ @@", countitem(RubyPowder), (getskilllv(SM_BASH)+1)*2, getitemlink(RubyPowder));
+ mesc l("@@/@@ @@", countitem(StrengthPotion), (getskilllv(SM_BASH)+1)*2, getitemlink(StrengthPotion));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(ManaPiouFeathers) < (getskilllv(SM_BASH)+1)*15 ||
+ countitem(CaveSnakeSkin) < (getskilllv(SM_BASH)+1)*4 ||
+ countitem(RubyPowder) < (getskilllv(SM_BASH)+1)*2 ||
+ countitem(StrengthPotion) < (getskilllv(SM_BASH)+1)*2) goto L_Missing;
+
+ delitem PiberriesInfusion, (getskilllv(SM_BASH)+1)*15;
+ delitem CaveSnakeSkin, (getskilllv(SM_BASH)+1)*4;
+ delitem RubyPowder, (getskilllv(SM_BASH)+1)*2;
+ delitem StrengthPotion, (getskilllv(SM_BASH)+1)*2;
+
+ sk_lvup(SM_BASH);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Party Area Defense]");
+ mesc l("Raises defense of the whole party in 5% for a while.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(AL_ANGELUS)+1)*10, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(BlackMambaEgg), (getskilllv(AL_ANGELUS)+1)*2, getitemlink(BlackMambaEgg));
+ mesc l("@@/@@ @@", countitem(MoubooSteak), (getskilllv(AL_ANGELUS)+1)*4, getitemlink(MoubooSteak));
+ mesc l("@@/@@ @@", countitem(IronIngot), (getskilllv(AL_ANGELUS)+1)*1, getitemlink(IronIngot));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(PiberriesInfusion) < (getskilllv(AL_ANGELUS)+1)*10 ||
+ countitem(BlackMambaEgg) < (getskilllv(AL_ANGELUS)+1)*2 ||
+ countitem(MoubooSteak) < (getskilllv(AL_ANGELUS)+1)*4 ||
+ countitem(IronIngot) < (getskilllv(AL_ANGELUS)+1)*1) goto L_Missing;
+
+ delitem PiberriesInfusion, (getskilllv(AL_ANGELUS)+1)*10;
+ delitem BlackMambaEgg, (getskilllv(AL_ANGELUS)+1)*2;
+ delitem MoubooSteak, (getskilllv(AL_ANGELUS)+1)*4;
+ delitem IronIngot, (getskilllv(AL_ANGELUS)+1)*1;
+
+ sk_lvup(AL_ANGELUS);
+
+ next;
+ }
+ break;
+ case 3:
+ mesc l("[Increase Agility]");
+ mesc l("Temporaly raise your agility and move speed, in exchange of HP.");
+ mes "";
+ // TODO: Requirem, quest, agree
+ sk_lvup(MER_INCAGI);
+ break;
+ case 4:
+ mesc l("[Redemption]");
+ mesc l("Kills yourself, but revives everyone in a range. You'll take the death penalty.");
+ mes "";
+ // TODO: Requirem, quest, agree
+ sk_lvup(PR_REDEMPTIO);
+ break;
+ case 5:
+ mesc l("[Last Standing Man]");
+ mesc l("Raises max HP and holy resistance. Passive.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Cheese), (getskilllv(CR_TRUST)+1)*50, getitemlink(Cheese));
+ mesc l("@@/@@ @@", countitem(Coral), (getskilllv(CR_TRUST)+1)*30, getitemlink(Coral));
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(CR_TRUST)+1)*20, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(CR_TRUST)+1)*15, getitemlink(FluoPowder));
+ mesc l("@@/@@ @@", countitem(HastePotion), (getskilllv(CR_TRUST)+1)*10, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(DiamondPowder), (getskilllv(CR_TRUST)+1)*3, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(GrassCarp), (getskilllv(CR_TRUST)+1)*1, getitemlink(GrassCarp));
+ mesc l("@@/@@ @@", countitem(ElixirOfLife), (getskilllv(CR_TRUST)+1)*1, getitemlink(ElixirOfLife));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Cheese) < (getskilllv(CR_TRUST)+1)*50 ||
+ countitem(Coral) < (getskilllv(CR_TRUST)+1)*30 ||
+ countitem(PiberriesInfusion) < (getskilllv(CR_TRUST)+1)*20 ||
+ countitem(FluoPowder) < (getskilllv(CR_TRUST)+1)*15 ||
+ countitem(HastePotion) < (getskilllv(CR_TRUST)+1)*10 ||
+ countitem(DiamondPowder) < (getskilllv(CR_TRUST)+1)*3 ||
+ countitem(GrassCarp) < (getskilllv(CR_TRUST)+1)*1 ||
+ countitem(ElixirOfLife) < (getskilllv(CR_TRUST)+1)*1) goto L_Missing;
+
+ delitem Cheese, (getskilllv(CR_TRUST)+1)*50;
+ delitem Coral, (getskilllv(CR_TRUST)+1)*30;
+ delitem PiberriesInfusion, (getskilllv(CR_TRUST)+1)*20;
+ delitem FluoPowder, (getskilllv(CR_TRUST)+1)*15;
+ delitem HastePotion, (getskilllv(CR_TRUST)+1)*10;
+ delitem DiamondPowder, (getskilllv(CR_TRUST)+1)*3;
+ delitem GrassCarp, (getskilllv(CR_TRUST)+1)*1;
+ delitem ElixirOfLife, (getskilllv(CR_TRUST)+1)*1;
+
+ sk_lvup(CR_TRUST);
+
+ next;
+ }
+ break;
+ case 6:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill CR_TRUST, 0, 0;
+ skill AL_ANGELUS, 0, 0;
+ skill PR_REDEMPTIO, 0, 0;
+ skill MER_INCAGI, 0, 0;
+ skill SM_BASH, 2, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_PALADIN;
+ mesc l("You abandoned the PALADIN class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, GoldenWarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/priest.txt b/npc/003-0/priest.txt
new file mode 100644
index 000000000..ffa4ce754
--- /dev/null
+++ b/npc/003-0/priest.txt
@@ -0,0 +1,255 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the PRIEST class
+
+003-0,58,30,0 script Priest Master NPC_PLAYER,{
+ /*
+ if (!is_staff())
+ goto L_Close;
+ */
+ if (!(MAGIC_SUBCLASS & CL_PRIEST))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(WIZARD_MAGE) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Priest Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_PRIEST;
+ mesn;
+ mesq l("Welcome to the Priest guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Priest
+// AL_HOLYLIGHT (standard holy magic attack - 125% of MATK)
+// MG_SRECOVERY (small increase to SP Recovery while idle each 10 sec.)
+// ALL_RESURRECTION (Revive at 10% HP. May insta-kill undead. Max Level 3~4)
+// PR_ASPERSIO (Change anyone weapon to holy for 60s. Or 40 defense-disregard holy dmg to undead/evil)
+// TF_DETOXIFY (cancels poison. 40% MP.)
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(AL_HOLYLIGHT) && !getskilllv(AL_HOLYLIGHT), l("Learn Holy Light")),
+ rif(sk_intcost(TF_DETOXIFY) && !getskilllv(TF_DETOXIFY), l("Learn Detoxify")),
+ rif(sk_intcost(ALL_RESURRECTION) && getskilllv(ALL_RESURRECTION) < (1+degree_subclass()/2), l("Learn Ressurection")),
+ rif(sk_intcost(MG_SRECOVERY) && sk_canlvup(MG_SRECOVERY), l("Improve Mana Recovery")),
+ rif(sk_intcost(PR_ASPERSIO) && sk_canlvup(PR_ASPERSIO), l("Improve Blessed Weapon")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Holy Light]");
+ mesc l("The basic magic attack from a Priest. No effect against Holy Monsters.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Tentacle), (getskilllv(AL_HOLYLIGHT)+1)*10, getitemlink(Tentacle));
+ mesc l("@@/@@ @@", countitem(MushroomSpores), (getskilllv(AL_HOLYLIGHT)+1)*5, getitemlink(MushroomSpores));
+ mesc l("@@/@@ @@", countitem(WolvernTooth), (getskilllv(AL_HOLYLIGHT)+1)*3, getitemlink(WolvernTooth));
+ mesc l("@@/@@ @@", countitem(RedScorpionClaw), (getskilllv(AL_HOLYLIGHT)+1)*1, getitemlink(RedScorpionClaw));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Tentacle) < (getskilllv(AL_HOLYLIGHT)+1)*10 ||
+ countitem(MushroomSpores) < (getskilllv(AL_HOLYLIGHT)+1)*5 ||
+ countitem(WolvernTooth) < (getskilllv(AL_HOLYLIGHT)+1)*3 ||
+ countitem(RedScorpionClaw) < (getskilllv(AL_HOLYLIGHT)+1)*1) goto L_Missing;
+
+ delitem Tentacle, (getskilllv(AL_HOLYLIGHT)+1)*10;
+ delitem MushroomSpores, (getskilllv(AL_HOLYLIGHT)+1)*5;
+ delitem WolvernTooth, (getskilllv(AL_HOLYLIGHT)+1)*3;
+ delitem RedScorpionClaw, (getskilllv(AL_HOLYLIGHT)+1)*1;
+
+ sk_lvup(AL_HOLYLIGHT);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Detoxify]");
+ mesc l("Cancels Poison. Antidotes are hard to come by, anyway.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(TF_DETOXIFY)+1)*70, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Root), (getskilllv(TF_DETOXIFY)+1)*10, getitemlink(Root));
+ mesc l("@@/@@ @@", countitem(FrozenYetiTear),(getskilllv(TF_DETOXIFY)+1)*2, getitemlink(FrozenYetiTear));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(TF_DETOXIFY)+1)*1, getitemlink(FluoPowder));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(TF_DETOXIFY)+1)*70 ||
+ countitem(Root) < (getskilllv(TF_DETOXIFY)+1)*10 ||
+ countitem(FrozenYetiTear) < (getskilllv(TF_DETOXIFY)+1)*2 ||
+ countitem(FluoPowder) < (getskilllv(TF_DETOXIFY)+1)*1) goto L_Missing;
+
+ delitem Acorn, (getskilllv(TF_DETOXIFY)+1)*70;
+ delitem Root, (getskilllv(TF_DETOXIFY)+1)*10;
+ delitem FrozenYetiTear, (getskilllv(TF_DETOXIFY)+1)*2;
+ delitem FluoPowder, (getskilllv(TF_DETOXIFY)+1)*1;
+
+ sk_lvup(TF_DETOXIFY);
+
+ next;
+ }
+ break;
+ case 3:
+ mesc l("[Ressurection]");
+ mesc l("Raise fallen party members so they can keep fighting.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(ALL_RESURRECTION)+1)*60, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Bread), (getskilllv(ALL_RESURRECTION)+1)*30, getitemlink(Bread));
+ mesc l("@@/@@ @@", countitem(SmallMushroom), (getskilllv(ALL_RESURRECTION)+1)*20, getitemlink(SmallMushroom));
+ mesc l("@@/@@ @@", countitem(PinkBlobime), (getskilllv(ALL_RESURRECTION)+1)*20, getitemlink(PinkBlobime));
+ mesc l("@@/@@ @@", countitem(RedApple), (getskilllv(ALL_RESURRECTION)+1)*15, getitemlink(RedApple));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(ALL_RESURRECTION)+1)*60 ||
+ countitem(Bread) < (getskilllv(ALL_RESURRECTION)+1)*30 ||
+ countitem(SmallMushroom) < (getskilllv(ALL_RESURRECTION)+1)*20 ||
+ countitem(PinkBlobime) < (getskilllv(ALL_RESURRECTION)+1)*20 ||
+ countitem(RedApple) < (getskilllv(ALL_RESURRECTION)+1)*15) goto L_Missing;
+
+ delitem Acorn, (getskilllv(ALL_RESURRECTION)+1)*60;
+ delitem Bread, (getskilllv(ALL_RESURRECTION)+1)*30;
+ delitem SmallMushroom, (getskilllv(ALL_RESURRECTION)+1)*20;
+ delitem PinkBlobime, (getskilllv(ALL_RESURRECTION)+1)*20;
+ delitem RedApple, (getskilllv(ALL_RESURRECTION)+1)*15;
+
+ sk_lvup(ALL_RESURRECTION);
+
+ next;
+ }
+ break;
+ case 4:
+ mesc l("[MP Regen]");
+ mesc l("Heals more mana while standing.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(MG_SRECOVERY)+1)*70, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Root), (getskilllv(MG_SRECOVERY)+1)*10, getitemlink(Root));
+ mesc l("@@/@@ @@", countitem(FrozenYetiTear),(getskilllv(MG_SRECOVERY)+1)*2, getitemlink(FrozenYetiTear));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(MG_SRECOVERY)+1)*1, getitemlink(FluoPowder));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(MG_SRECOVERY)+1)*70 ||
+ countitem(Root) < (getskilllv(MG_SRECOVERY)+1)*10 ||
+ countitem(FrozenYetiTear) < (getskilllv(MG_SRECOVERY)+1)*2 ||
+ countitem(FluoPowder) < (getskilllv(MG_SRECOVERY)+1)*1) goto L_Missing;
+
+ delitem Acorn, (getskilllv(MG_SRECOVERY)+1)*70;
+ delitem Root, (getskilllv(MG_SRECOVERY)+1)*10;
+ delitem FrozenYetiTear, (getskilllv(MG_SRECOVERY)+1)*2;
+ delitem FluoPowder, (getskilllv(MG_SRECOVERY)+1)*1;
+
+ sk_lvup(MG_SRECOVERY);
+
+ next;
+ }
+ break;
+ case 5:
+ mesc l("[Bless Weapon]");
+ mesc l("Changes anyone's weapon to Holy elemental. Causes small damage when used on offensive.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(PR_ASPERSIO)+1)*70, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Root), (getskilllv(PR_ASPERSIO)+1)*10, getitemlink(Root));
+ mesc l("@@/@@ @@", countitem(FrozenYetiTear),(getskilllv(PR_ASPERSIO)+1)*2, getitemlink(FrozenYetiTear));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(PR_ASPERSIO)+1)*1, getitemlink(FluoPowder));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(PR_ASPERSIO)+1)*70 ||
+ countitem(Root) < (getskilllv(PR_ASPERSIO)+1)*10 ||
+ countitem(FrozenYetiTear) < (getskilllv(PR_ASPERSIO)+1)*2 ||
+ countitem(FluoPowder) < (getskilllv(PR_ASPERSIO)+1)*1) goto L_Missing;
+
+ delitem Acorn, (getskilllv(PR_ASPERSIO)+1)*70;
+ delitem Root, (getskilllv(PR_ASPERSIO)+1)*10;
+ delitem FrozenYetiTear, (getskilllv(PR_ASPERSIO)+1)*2;
+ delitem FluoPowder, (getskilllv(PR_ASPERSIO)+1)*1;
+
+ sk_lvup(PR_ASPERSIO);
+
+ next;
+ }
+ break;
+ case 6:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill AL_HOLYLIGHT, 0, 0;
+ skill TF_DETOXIFY, 0, 0;
+ skill ALL_RESURRECTION, 0, 0;
+ skill MG_SRECOVERY, 0, 0;
+ skill PR_ASPERSIO, 0, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_PRIEST;
+ mesc l("You abandoned the PRIEST class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet); // TODO: wizard hat
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/sage.txt b/npc/003-0/sage.txt
new file mode 100644
index 000000000..6e79dab39
--- /dev/null
+++ b/npc/003-0/sage.txt
@@ -0,0 +1,255 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the SAGE class
+
+003-0,61,25,0 script Sage Master NPC_PLAYER,{
+ /*
+ if (!is_staff())
+ goto L_Close;
+ */
+ if (!(MAGIC_SUBCLASS & CL_SAGE))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(WIZARD_MAGE) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Sage Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_SAGE;
+ mesn;
+ mesq l("Welcome to the sage guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Sage
+// CR_TRUST (raise Max HP in 200 and Holy Resistance in 5%, passive)
+// AL_ANGELUS (DEF Increase 5% for 15s/LVL, 14x14 area for PARTY)
+// PR_REDEMPTIO (suicide with death penalty. Revive dead party members on a 29x29 area. Min. 1% xp. 0.01% xp penalty reduction per revive)
+// MER_INCAGI (raise agi and move speed for 20s/LVL. Have an HP cost.)
+// SM_BASH up to level 4 (+220% dmg and +20% acc). PS. If you have MP, SM_BASH is very powerful.
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(SA_FREECAST) && getskilllv(SA_FREECAST) < (1+degree_subclass()/2), l("Learn Action Casting")),
+ rif(sk_intcost(SA_DRAGONOLOGY) && getskilllv(SA_DRAGONOLOGY) < (1+degree_subclass()/2), l("Learn Dragon Slayer")),
+ rif(sk_intcost(TMW2_SAGE) && sk_canlvup(TMW2_SAGE), l("Improve Mana Wisdom")),
+ rif(sk_intcost(SA_FLAMELAUNCHER) && sk_canlvup(SA_FLAMELAUNCHER), l("Improve Fire Weapon")),
+ rif(sk_intcost(SA_FROSTWEAPON) && sk_canlvup(SA_FROSTWEAPON), l("Improve Ice Weapon")),
+ rif(sk_intcost(SA_LIGHTNINGLOADER) && sk_canlvup(SA_LIGHTNINGLOADER), l("Improve Wind Weapon")),
+ rif(sk_intcost(SA_SEISMICWEAPON) && sk_canlvup(SA_SEISMICWEAPON), l("Improve Earth Weapon")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Action Casting]");
+ mesc l("Allows to move/attack while casting. (Melee attacks still interrupt casting!)");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Tentacle), (getskilllv(SA_FREECAST)+1)*10, getitemlink(Tentacle));
+ mesc l("@@/@@ @@", countitem(MushroomSpores), (getskilllv(SA_FREECAST)+1)*5, getitemlink(MushroomSpores));
+ mesc l("@@/@@ @@", countitem(WolvernTooth), (getskilllv(SA_FREECAST)+1)*3, getitemlink(WolvernTooth));
+ mesc l("@@/@@ @@", countitem(RedScorpionClaw), (getskilllv(SA_FREECAST)+1)*1, getitemlink(RedScorpionClaw));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Tentacle) < (getskilllv(SA_FREECAST)+1)*10 ||
+ countitem(MushroomSpores) < (getskilllv(SA_FREECAST)+1)*5 ||
+ countitem(WolvernTooth) < (getskilllv(SA_FREECAST)+1)*3 ||
+ countitem(RedScorpionClaw) < (getskilllv(SA_FREECAST)+1)*1) goto L_Missing;
+
+ delitem Tentacle, (getskilllv(SA_FREECAST)+1)*10;
+ delitem MushroomSpores, (getskilllv(SA_FREECAST)+1)*5;
+ delitem WolvernTooth, (getskilllv(SA_FREECAST)+1)*3;
+ delitem RedScorpionClaw, (getskilllv(SA_FREECAST)+1)*1;
+
+ sk_lvup(SA_FREECAST);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Dragon Slayer]");
+ mesc l("Raises attack and resistance against dragons. Also raises int. Passive.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(SA_DRAGONOLOGY)+1)*70, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Root), (getskilllv(SA_DRAGONOLOGY)+1)*10, getitemlink(Root));
+ mesc l("@@/@@ @@", countitem(FrozenYetiTear),(getskilllv(SA_DRAGONOLOGY)+1)*2, getitemlink(FrozenYetiTear));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(SA_DRAGONOLOGY)+1)*1, getitemlink(FluoPowder));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(SA_DRAGONOLOGY)+1)*70 ||
+ countitem(Root) < (getskilllv(SA_DRAGONOLOGY)+1)*10 ||
+ countitem(FrozenYetiTear) < (getskilllv(SA_DRAGONOLOGY)+1)*2 ||
+ countitem(FluoPowder) < (getskilllv(SA_DRAGONOLOGY)+1)*1) goto L_Missing;
+
+ delitem Acorn, (getskilllv(SA_DRAGONOLOGY)+1)*70;
+ delitem Root, (getskilllv(SA_DRAGONOLOGY)+1)*10;
+ delitem FrozenYetiTear, (getskilllv(SA_DRAGONOLOGY)+1)*2;
+ delitem FluoPowder, (getskilllv(SA_DRAGONOLOGY)+1)*1;
+
+ sk_lvup(SA_DRAGONOLOGY);
+
+ next;
+ }
+ break;
+ case 3:
+ mesc l("[Mana Wisdom]");
+ mesc l("Increase mana experience gain, when using mana skills.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(TMW2_SAGE)+1)*60, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Bread), (getskilllv(TMW2_SAGE)+1)*30, getitemlink(Bread));
+ mesc l("@@/@@ @@", countitem(SmallMushroom), (getskilllv(TMW2_SAGE)+1)*20, getitemlink(SmallMushroom));
+ mesc l("@@/@@ @@", countitem(PinkBlobime), (getskilllv(TMW2_SAGE)+1)*20, getitemlink(PinkBlobime));
+ mesc l("@@/@@ @@", countitem(RedApple), (getskilllv(TMW2_SAGE)+1)*15, getitemlink(RedApple));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(TMW2_SAGE)+1)*60 ||
+ countitem(Bread) < (getskilllv(TMW2_SAGE)+1)*30 ||
+ countitem(SmallMushroom) < (getskilllv(TMW2_SAGE)+1)*20 ||
+ countitem(PinkBlobime) < (getskilllv(TMW2_SAGE)+1)*20 ||
+ countitem(RedApple) < (getskilllv(TMW2_SAGE)+1)*15) goto L_Missing;
+
+ delitem Acorn, (getskilllv(TMW2_SAGE)+1)*60;
+ delitem Bread, (getskilllv(TMW2_SAGE)+1)*30;
+ delitem SmallMushroom, (getskilllv(TMW2_SAGE)+1)*20;
+ delitem PinkBlobime, (getskilllv(TMW2_SAGE)+1)*20;
+ delitem RedApple, (getskilllv(TMW2_SAGE)+1)*15;
+
+ sk_lvup(TMW2_SAGE);
+
+ next;
+ }
+ break;
+ // Weapon Enhance
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ setarray .@ASkill, SA_FLAMELAUNCHER, SA_FROSTWEAPON, SA_LIGHTNINGLOADER, SA_SEISMICWEAPON;
+ setarray .@AItem, Curshroom, Coral, BatWing, PileOfAsh;
+ setarray .@BItem, Ruby, Sapphire, Emerald, Topaz;
+ setarray .@ASkill$, "Fire", "Ice", "Wind", "Earth";
+
+ .@index=@menu-4;
+
+ .@Skill$=.@ASkill$[.@index];
+ .@Skill=.@ASkill[.@index];
+ .@Item=.@AItem[.@index];
+ .@ItemB=.@BItem[.@index];
+
+ deletearray(.@ASkill);
+ deletearray(.@AItem);
+ deletearray(.@BItem);
+ deletearray(.@ASkill$);
+
+ mesc l("[@@ Weapon]", .@Skill$);
+ mesc l("Temporaly switch weapon element to @@. Success rate is fixed at 70%.", .@Skill$);
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(.@Item), (getskilllv(.@Skill)+1)*30, getitemlink(.@Item));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(.@Skill)+1)*15, getitemlink(FluoPowder));
+ mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(.@Skill)+1)*3, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(WoodenLog), (getskilllv(.@Skill)+1)*2, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(.@ItemB), (getskilllv(.@Skill)+1)*1, getitemlink(.@ItemB));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(.@Item) < (getskilllv(.@Skill)+1)*30 ||
+ countitem(FluoPowder) < (getskilllv(.@Skill)+1)*15 ||
+ countitem(HerbalTea) < (getskilllv(.@Skill)+1)*3 ||
+ countitem(WoodenLog) < (getskilllv(.@Skill)+1)*2 ||
+ countitem(.@ItemB) < (getskilllv(.@Skill)+1)*1) goto L_Missing;
+
+ delitem .@Item, (getskilllv(.@Skill)+1)*30;
+ delitem FluoPowder, (getskilllv(.@Skill)+1)*15;
+ delitem HerbalTea, (getskilllv(.@Skill)+1)*3;
+ delitem WoodenLog, (getskilllv(.@Skill)+1)*2;
+ delitem .@ItemB, (getskilllv(.@Skill)+1)*1;
+
+ sk_lvup(.@Skill);
+
+ next;
+ }
+ break;
+ case 8:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill SA_FREECAST, 0, 0;
+ skill SA_DRAGONOLOGY, 0, 0;
+ skill TMW2_SAGE, 0, 0;
+ skill SA_FLAMELAUNCHER, 0, 0;
+ skill SA_FROSTWEAPON, 0, 0;
+ skill SA_LIGHTNINGLOADER, 0, 0;
+ skill SA_SEISMICWEAPON, 0, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_SAGE;
+ mesc l("You abandoned the SAGE class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet); // TODO: wizard hat
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/tanker.txt b/npc/003-0/tanker.txt
new file mode 100644
index 000000000..7f7e7d72d
--- /dev/null
+++ b/npc/003-0/tanker.txt
@@ -0,0 +1,220 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the TANKER class
+
+003-0,38,41,2 script Tanker Master NPC_PLAYER,{
+ /*
+ if (!is_staff())
+ goto L_Close;
+ */
+ if (!(MAGIC_SUBCLASS & CL_TANKER))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(MAGIC_WARRIOR) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Tanker Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_TANKER;
+ mesn;
+ mesq l("Welcome to the tanker guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Tanker
+// CR_TRUST (raise Max HP in 200 and Holy Resistance in 5%, passive)
+// CR_AUTOGUARD (5% chance to complety block attack. Freeze you for a while. Req. Shield. Last 5m.)
+// CR_DEFENDER (less damage from ranged attacks, but lowers move & attack speed. Req. Shield) - max lv 4 plz. Last 3m.
+// SM_RECOVERY (insignificant HP recovery every 10s without moving. Better with higher level.) - low mp cost
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(CR_TRUST) && getskilllv(CR_TRUST) < 1+(degree_subclass()/2), l("Learn Last Standing Man")),
+ "",
+ //rif(sk_intcost(CR_AUTOGUARD) && sk_canlvup(CR_AUTOGUARD), l("Improve Guard")),
+ rif(sk_intcost(CR_DEFENDER) && sk_canlvup(CR_DEFENDER), l("Improve Arrow Shield")),
+ rif(sk_intcost(SM_RECOVERY) && sk_canlvup(SM_RECOVERY), l("Improve Standing HP Regen")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Last Standing Man]");
+ mesc l("Raises max HP and holy resistance. Passive.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Cheese), (getskilllv(CR_TRUST)+1)*50, getitemlink(Cheese));
+ mesc l("@@/@@ @@", countitem(Coral), (getskilllv(CR_TRUST)+1)*30, getitemlink(Coral));
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(CR_TRUST)+1)*20, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(CR_TRUST)+1)*15, getitemlink(FluoPowder));
+ mesc l("@@/@@ @@", countitem(HastePotion), (getskilllv(CR_TRUST)+1)*10, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(DiamondPowder), (getskilllv(CR_TRUST)+1)*3, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(GrassCarp), (getskilllv(CR_TRUST)+1)*1, getitemlink(GrassCarp));
+ mesc l("@@/@@ @@", countitem(ElixirOfLife), (getskilllv(CR_TRUST)+1)*1, getitemlink(ElixirOfLife));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Cheese) < (getskilllv(CR_TRUST)+1)*50 ||
+ countitem(Coral) < (getskilllv(CR_TRUST)+1)*30 ||
+ countitem(PiberriesInfusion) < (getskilllv(CR_TRUST)+1)*20 ||
+ countitem(FluoPowder) < (getskilllv(CR_TRUST)+1)*15 ||
+ countitem(HastePotion) < (getskilllv(CR_TRUST)+1)*10 ||
+ countitem(DiamondPowder) < (getskilllv(CR_TRUST)+1)*3 ||
+ countitem(GrassCarp) < (getskilllv(CR_TRUST)+1)*1 ||
+ countitem(ElixirOfLife) < (getskilllv(CR_TRUST)+1)*1) goto L_Missing;
+
+ delitem Cheese, (getskilllv(CR_TRUST)+1)*50;
+ delitem Coral, (getskilllv(CR_TRUST)+1)*30;
+ delitem PiberriesInfusion, (getskilllv(CR_TRUST)+1)*20;
+ delitem FluoPowder, (getskilllv(CR_TRUST)+1)*15;
+ delitem HastePotion, (getskilllv(CR_TRUST)+1)*10;
+ delitem DiamondPowder, (getskilllv(CR_TRUST)+1)*3;
+ delitem GrassCarp, (getskilllv(CR_TRUST)+1)*1;
+ delitem ElixirOfLife, (getskilllv(CR_TRUST)+1)*1;
+
+ sk_lvup(CR_TRUST);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Guard]");
+ mesc l("Raises chance to entirely block an attack, but freezes you for a while. Req. Shield.");
+ mes "";
+ // TODO: Requirem, quest, agree
+ sk_lvup(CR_AUTOGUARD);
+ break;
+ case 3:
+ mesc l("[Arrow Shield]");
+ mesc l("Decrease ranged damage taken for a few minutes, in exchange of agi and move speed. Req. Shield.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(PiouFeathers), (getskilllv(CR_DEFENDER)+1)*60, getitemlink(PiouFeathers));
+ mesc l("@@/@@ @@", countitem(PoisonArrow), (getskilllv(CR_DEFENDER)+1)*10, getitemlink(PoisonArrow));
+ mesc l("@@/@@ @@", countitem(CursedArrow), (getskilllv(CR_DEFENDER)+1)*10, getitemlink(CursedArrow));
+ mesc l("@@/@@ @@", countitem(OrangeCupcake), (getskilllv(CR_DEFENDER)+1)*6, getitemlink(OrangeCupcake));
+ mesc l("@@/@@ @@", countitem(Mashmallow), (getskilllv(CR_DEFENDER)+1)*5, getitemlink(Mashmallow));
+ mesc l("@@/@@ @@", countitem(Orange), (getskilllv(CR_DEFENDER)+1)*4, getitemlink(Orange));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(PiouFeathers) < (getskilllv(CR_DEFENDER)+1)*60 ||
+ countitem(PoisonArrow) < (getskilllv(CR_DEFENDER)+1)*10 ||
+ countitem(CursedArrow) < (getskilllv(CR_DEFENDER)+1)*10 ||
+ countitem(OrangeCupcake) < (getskilllv(CR_DEFENDER)+1)*6 ||
+ countitem(Mashmallow) < (getskilllv(CR_DEFENDER)+1)*5 ||
+ countitem(Orange) < (getskilllv(CR_DEFENDER)+1)*4) goto L_Missing;
+
+ delitem PiouFeathers, (getskilllv(CR_DEFENDER)+1)*60;
+ delitem PoisonArrow, (getskilllv(CR_DEFENDER)+1)*10;
+ delitem CursedArrow, (getskilllv(CR_DEFENDER)+1)*10;
+ delitem PrangeCupcake, (getskilllv(CR_DEFENDER)+1)*6;
+ delitem Mashmallow, (getskilllv(CR_DEFENDER)+1)*5;
+ delitem Orange, (getskilllv(CR_DEFENDER)+1)*4;
+
+ sk_lvup(CR_DEFENDER);
+
+ next;
+ }
+ break;
+ case 4:
+ mesc l("[Standing Regen]");
+ mesc l("Regenerate HP every 5 seconds, as if you were always eating a healing item.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(SM_RECOVERY)+1)*10, getitemlink(PiberriesInfusion));
+ mesc l("@@/@@ @@", countitem(BlackMambaEgg), (getskilllv(SM_RECOVERY)+1)*6, getitemlink(BlackMambaEgg));
+ mesc l("@@/@@ @@", countitem(MoubooSteak), (getskilllv(SM_RECOVERY)+1)*4, getitemlink(MoubooSteak));
+ mesc l("@@/@@ @@", countitem(TonoriDelight), (getskilllv(SM_RECOVERY)+1)*8, getitemlink(TonoriDelight));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(PiberriesInfusion) < (getskilllv(SM_RECOVERY)+1)*10 ||
+ countitem(BlackMambaEgg) < (getskilllv(SM_RECOVERY)+1)*6 ||
+ countitem(MoubooSteak) < (getskilllv(SM_RECOVERY)+1)*4 ||
+ countitem(TonoriDelight) < (getskilllv(SM_RECOVERY)+1)*8) goto L_Missing;
+
+ delitem PiberriesInfusion, (getskilllv(SM_RECOVERY)+1)*10;
+ delitem BlackMambaEgg, (getskilllv(SM_RECOVERY)+1)*6;
+ delitem MoubooSteak, (getskilllv(SM_RECOVERY)+1)*4;
+ delitem TonoriDelight, (getskilllv(SM_RECOVERY)+1)*8;
+
+ sk_lvup(SM_RECOVERY);
+ //mesc l("This skill can be further improved with Job Points");
+
+ next;
+ }
+ break;
+ case 5:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill CR_TRUST, 0, 0;
+ skill CR_AUTOGUARD, 0, 0;
+ skill CR_DEFENDER, 0, 0;
+ skill SM_RECOVERY, 0, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_TANKER;
+ mesc l("You abandoned the TANKER class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, SteelShield);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-0/warriors.txt b/npc/003-0/warriors.txt
new file mode 100644
index 000000000..7090ea1a0
--- /dev/null
+++ b/npc/003-0/warriors.txt
@@ -0,0 +1,38 @@
+// Paladin
+// CR_TRUST (raise Max HP in 200 and Holy Resistance in 5%, passive)
+// AL_ANGELUS (DEF Increase 5% for 15s/LVL, 14x14 area for PARTY)
+// Broken //PR_REDEMPTIO (suicide with death penalty. Revive dead party members on a 29x29 area. Min. 1% xp. 0.01% xp penalty reduction per revive)
+// Broken? //MER_INCAGI (raise agi and move speed for 20s/LVL. Have an HP cost.)
+// SM_BASH up to level 4 (+220% dmg and +20% acc). PS. If you have MP, SM_BASH is very powerful.
+
+// Warrior - Class extinct
+// Simply makes no sense now.
+
+// Tanker
+// CR_TRUST (raise Max HP in 200 and Holy Resistance in 5%, passive)
+// Broken? //CR_AUTOGUARD (5% chance to complety block attack. Freeze you for a while. Req. Shield. Last 5m.)
+// CR_DEFENDER (less damage from ranged attacks, but lowers move & attack speed. Req. Shield) - max lv 4 plz. Last 3m.
+// SM_RECOVERY (insignificant HP recovery every 10s without moving. Better with higher level.) - low mp cost
+
+// Berserker
+// KN_AUTOCOUNTER (Counter any attack with 2x critical rate and block attack for 0.5s)
+// SM_ENDURE (deny stun penalty when hit, and MDEF bonus, for 10s)
+// Broken? //SM_AUTOBERSERK (when < 25% hp, get +32% ATK and -55% VIT DEF. Drain SP and keep working even with 0 MP. Trigerrable passive.)
+
+
+
+
+// Ranger (Arrows)
+// AC_VULTURE (raise range and cth)
+// AC_OWL (raise 1 DEX per level)
+// AC_SHOWER (3x3 attack)
+// SN_WINDWALK (raise walking speed and flee rate on the screen area)
+
+// Sniper (guns)
+// GS_SNAKEEYE (passive, range and acc + 1)
+// GS_SINGLEACTION (passive, acc +2 and aspd +1%) (?)
+// GS_INCREASING (+20 Acc, +4 Dex and +4 Agi for 60s)
+// GS_CHAINACTION (revolver may shoot twice) ?
+// GS_MAGICALBULLET (adds MATK to your regular attack) ?
+
+// TODO: What about GS_GATLINGFEVER or improving SN_SHARPSHOOTER?
diff --git a/npc/003-0/wizard.txt b/npc/003-0/wizard.txt
new file mode 100644
index 000000000..9e19b9981
--- /dev/null
+++ b/npc/003-0/wizard.txt
@@ -0,0 +1,227 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the WIZARD class
+// TODO: Improve Fireball
+
+003-0,55,25,0 script Wizard Master NPC_PLAYER,{
+ if (!(MAGIC_SUBCLASS & CL_WIZARD))
+ goto L_SignUp;
+ goto L_Member;
+
+// Sign Up
+L_SignUp:
+ // Not allowed if subclass filled or not from main class
+ if (total_subclass() >= max_subclass() || getskilllv(WIZARD_MAGE) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Wizard Class?");
+ mesc l("Warning: If you join a subclass, you can't leave it later!"), 1;
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough?
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_WIZARD;
+ mesn;
+ mesq l("Welcome to the wizard guild!");
+ close;
+
+// Close
+L_Close:
+ goodbye;
+ closedialog;
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!");
+ percentheal 0, -10;
+ next;
+ goto L_Member;
+
+// Membership area
+// Wizard
+// MG_COLDBOLT (ice)
+// MG_LIGHTNINGBOLT (wind)
+// WZ_EARTHSPIKE (earth)
+// MG_NAPALMBEAT (ghost)
+// MG_ENERGYCOAT (For 5 minutes, raise damage reduction, but that eats MP)
+// TODO: We have many other cool skills for Wizard (more AoE skills, more damage, etc)
+// I will worry with that later, as that also means providing extra skills for Sage & Priest
+// Note: the number of hits of bolts is the same as the skill level :D
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(MG_ENERGYCOAT) && !getskilllv(MG_ENERGYCOAT), l("Learn Energy Coating")),
+ rif(sk_intcost(MG_NAPALMBEAT) && sk_canlvup(MG_NAPALMBEAT), l("Improve Napalm Beat")),
+ rif(sk_intcost(MG_COLDBOLT) && sk_canlvup(MG_COLDBOLT), l("Improve Cold Bolt")),
+ rif(sk_intcost(MG_LIGHTNINGBOLT) && sk_canlvup(MG_LIGHTNINGBOLT), l("Improve Thunder Bolt")),
+ rif(sk_intcost(WZ_EARTHSPIKE) && sk_canlvup(WZ_EARTHSPIKE), l("Improve Earth Spike")),
+ rif(sk_intcost(MG_FIREBOLT) && sk_canlvup(MG_FIREBOLT), l("Improve Fire Bolt")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Energy Coating]");
+ mesc l("Drains Mana to reduce damage taken. The only defensive skill from wizards.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Tentacle), (getskilllv(MG_ENERGYCOAT)+1)*10, getitemlink(Tentacle));
+ mesc l("@@/@@ @@", countitem(MushroomSpores), (getskilllv(MG_ENERGYCOAT)+1)*5, getitemlink(MushroomSpores));
+ mesc l("@@/@@ @@", countitem(WolvernTooth), (getskilllv(MG_ENERGYCOAT)+1)*3, getitemlink(WolvernTooth));
+ mesc l("@@/@@ @@", countitem(RedScorpionClaw), (getskilllv(MG_ENERGYCOAT)+1)*1, getitemlink(RedScorpionClaw));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Tentacle) < (getskilllv(MG_ENERGYCOAT)+1)*10 ||
+ countitem(MushroomSpores) < (getskilllv(MG_ENERGYCOAT)+1)*5 ||
+ countitem(WolvernTooth) < (getskilllv(MG_ENERGYCOAT)+1)*3 ||
+ countitem(RedScorpionClaw) < (getskilllv(MG_ENERGYCOAT)+1)*1) goto L_Missing;
+
+ delitem Tentacle, (getskilllv(MG_ENERGYCOAT)+1)*10;
+ delitem MushroomSpores, (getskilllv(MG_ENERGYCOAT)+1)*5;
+ delitem WolvernTooth, (getskilllv(MG_ENERGYCOAT)+1)*3;
+ delitem RedScorpionClaw, (getskilllv(MG_ENERGYCOAT)+1)*1;
+
+ sk_lvup(MG_ENERGYCOAT);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Napalm Beat]");
+ mesc l("Astral attack with low damage value, but which can send ghosts to rest.");
+ mesc l("Useful in PvP when your enemy have equipped a @@", getitemlink(AstralCube));
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(MG_NAPALMBEAT)+1)*60, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Bread), (getskilllv(MG_NAPALMBEAT)+1)*30, getitemlink(Bread));
+ mesc l("@@/@@ @@", countitem(SmallMushroom), (getskilllv(MG_NAPALMBEAT)+1)*20, getitemlink(SmallMushroom));
+ mesc l("@@/@@ @@", countitem(PinkBlobime), (getskilllv(MG_NAPALMBEAT)+1)*20, getitemlink(PinkBlobime));
+ mesc l("@@/@@ @@", countitem(RedApple), (getskilllv(MG_NAPALMBEAT)+1)*15, getitemlink(RedApple));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(MG_NAPALMBEAT)+1)*60 ||
+ countitem(Bread) < (getskilllv(MG_NAPALMBEAT)+1)*30 ||
+ countitem(SmallMushroom) < (getskilllv(MG_NAPALMBEAT)+1)*20 ||
+ countitem(PinkBlobime) < (getskilllv(MG_NAPALMBEAT)+1)*20 ||
+ countitem(RedApple) < (getskilllv(MG_NAPALMBEAT)+1)*15) goto L_Missing;
+
+ delitem Acorn, (getskilllv(MG_NAPALMBEAT)+1)*60;
+ delitem Bread, (getskilllv(MG_NAPALMBEAT)+1)*30;
+ delitem SmallMushroom, (getskilllv(MG_NAPALMBEAT)+1)*20;
+ delitem PinkBlobime, (getskilllv(MG_NAPALMBEAT)+1)*20;
+ delitem RedApple, (getskilllv(MG_NAPALMBEAT)+1)*15;
+
+ sk_lvup(MG_NAPALMBEAT);
+
+ next;
+ }
+ break;
+ // Magic Bolts
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ setarray .@ASkill, MG_COLDBOLT, MG_LIGHTNINGBOLT, WZ_EARTHSPIKE, MG_FIREBOLT;
+ setarray .@AItem, Coral, BatWing, PileOfAsh, Curshroom;
+ setarray .@BItem, Sapphire, Emerald, Topaz, Ruby;
+ setarray .@ASkill$, "Ice", "Wind", "Earth", "Fire";
+
+ .@index=@menu-4;
+
+ .@Skill$=.@ASkill$[.@index];
+ .@Skill=.@ASkill[.@index];
+ .@Item=.@AItem[.@index];
+ .@ItemB=.@BItem[.@index];
+
+ deletearray(.@ASkill);
+ deletearray(.@AItem);
+ deletearray(.@BItem);
+ deletearray(.@ASkill$);
+
+ mesc l("[@@ Bolt]", .@Skill$);
+ mesc l("Causes a @@ bolt on the enemy. Number of hits is the skill level.", .@Skill$);
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(.@Item), (getskilllv(.@Skill)+1)*30, getitemlink(.@Item));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(.@Skill)+1)*15, getitemlink(FluoPowder));
+ mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(.@Skill)+1)*3, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(WoodenLog), (getskilllv(.@Skill)+1)*2, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(.@ItemB), (getskilllv(.@Skill)+1)*1, getitemlink(.@ItemB));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(.@Item) < (getskilllv(.@Skill)+1)*30 ||
+ countitem(FluoPowder) < (getskilllv(.@Skill)+1)*15 ||
+ countitem(HerbalTea) < (getskilllv(.@Skill)+1)*3 ||
+ countitem(WoodenLog) < (getskilllv(.@Skill)+1)*2 ||
+ countitem(.@ItemB) < (getskilllv(.@Skill)+1)*1) goto L_Missing;
+
+ delitem .@Item, (getskilllv(.@Skill)+1)*30;
+ delitem FluoPowder, (getskilllv(.@Skill)+1)*15;
+ delitem HerbalTea, (getskilllv(.@Skill)+1)*3;
+ delitem WoodenLog, (getskilllv(.@Skill)+1)*2;
+ delitem .@ItemB, (getskilllv(.@Skill)+1)*1;
+
+ sk_lvup(.@Skill);
+
+ next;
+ }
+ break;
+ case 7:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill MG_ENERGYCOAT, 0, 0;
+ skill SA_DRAGONOLOGY, 0, 0;
+ skill MG_NAPALMBEAT, 0, 0;
+ skill MG_COLDBOLT, 0, 0;
+ skill MG_LIGHTNINGBOLT, 0, 0;
+ skill WZ_EARTHSPIKE, 0, 0;
+ skill MG_FIREBOLT, 0, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_WIZARD;
+ mesc l("You abandoned the WIZARD class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat); // TODO: wizard hat
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansShorts);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/003-1-1/_import.txt b/npc/003-1-1/_import.txt
new file mode 100644
index 000000000..b87b04248
--- /dev/null
+++ b/npc/003-1-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 003-1-1: Tulimshar Sewers
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/003-1-1/_mobs.txt",
+"npc/003-1-1/_warps.txt",
+"npc/003-1-1/yetiking.txt",
diff --git a/npc/003-1-1/_mobs.txt b/npc/003-1-1/_mobs.txt
new file mode 100644
index 000000000..47394b0a4
--- /dev/null
+++ b/npc/003-1-1/_mobs.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 003-1-1: Tulimshar Sewers mobs
+003-1-1,108,76,68,75 monster Cave Maggot 1027,45,35000,300000
+003-1-1,85,72,65,72 monster Black Scorpion 1074,28,35000,300000
+003-1-1,80,87,71,71 monster Ratto 1005,32,35000,300000
diff --git a/npc/003-1-1/_warps.txt b/npc/003-1-1/_warps.txt
new file mode 100644
index 000000000..ba1bf5579
--- /dev/null
+++ b/npc/003-1-1/_warps.txt
@@ -0,0 +1,6 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 003-1-1: Tulimshar Sewers warps
+003-1-1,143,127,0 warp #003-1-1_143_127 0,0,003-1,115,111
+003-1-1,57,99,0 warp #003-1-1_57_99 0,0,003-1,56,84
+003-1-1,29,62,0 warp #003-1-1_29_62 0,0,004-1,49,21
+003-1-1,44,143,0 warp #003-1-1_44_143 0,0,008-0,41,23
diff --git a/npc/003-1-1/yetiking.txt b/npc/003-1-1/yetiking.txt
new file mode 100644
index 000000000..d35020ebf
--- /dev/null
+++ b/npc/003-1-1/yetiking.txt
@@ -0,0 +1,156 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Celestia Yeti King's quest. Designed so if you're with 4 players, all 4 can
+// summon the Yeti King, helping you while doing the quest by themselves.
+
+// Notes:
+// $@GM_OVERRIDE
+// Only possible with @set command, overrides the co-op requeriment.
+
+
+003-1-1,94,21,0 script #DahYetiKing NPC_SUMMONING_CIRC,{
+ .@q=getq(HurnscaldQuest_Celestia);
+ if (.@q > 1 && .@q < 99)
+ setq HurnscaldQuest_Celestia, 1;
+ if (.@q == 1 && !.inUse) goto L_Summon;
+ end;
+
+L_Summon:
+ if (countitem(EverburnPowder) < 0) {
+ dispbottom l("I need to pour the @@ to summon the Yeti King.", getitemlink(EverburnPowder));
+ end;
+ }
+ delitem EverburnPowder, 1;
+ dispbottom l("Emoc otem itey gnik!"); // come to me yeti king, spelled backwards. Sorry.
+ .inUse=1;
+ initnpctimer;
+ end;
+
+L_Die:
+ npctalk3 l("You're playing with fire. Or ice. Or whatever.");
+ percentheal(-80, -100);
+ closedialog;
+ close;
+
+OnTimer1000:
+ setnpcdisplay .name$, NPC_YETI_KING;
+ end;
+
+OnTimer2000:
+ npctalk("Whom dares to disturb my slumber?!");
+ end;
+
+OnTimer5000:
+ if (getareausers("003-1-1", 5) < 2 && !$@GM_OVERRIDE) {
+ npctalk("A lone adventurer? Pft. I'm back to my slumber!");
+ .inUse=2;
+ } else {
+ npctalk("You're courageous to summon me, I'll give you that.");
+ areatimer "003-1-1", 93, 20, 97, 25,3000, "#DahYetiKing::OnSummonTalk";
+ }
+ end;
+
+// Now we check if time ran out (standard inUse) because cowardice, or if you tried
+// to do the quest alone. And this is a Co-Op quest with free player numbers.
+// Therefore, we must return the Yeti King to his summon circle.
+OnTimer8000:
+ if (.inUse == 2) {
+ setnpcdisplay .name$, NPC_SUMMONING_CIRC;
+ .inUse=0;
+ stopnpctimer;
+ }
+ end;
+
+OnTimer60000:
+ if (.inUse == 1) {
+ setnpcdisplay .name$, NPC_SUMMONING_CIRC;
+ .inUse=0;
+ stopnpctimer;
+ }
+ end;
+
+// You can only talk to him with SummonTalk. Only one player will summon.
+OnSummonTalk:
+ .@q=getq(HurnscaldQuest_Celestia);
+ // If you had to return, erase quest progress
+ if (.@q > 1 && .@q < 99)
+ setq HurnscaldQuest_Celestia, 1;
+
+ if (.@q != 1)
+ end;
+ mesn l("Dah Yeti King!!");
+ mesq l("Why do you summon me? Speak.");
+ mes "";
+ select
+ l("I'm sorry, these words just came to my mind."),
+ l("I did not summon you, I'm just a passer-by. Sorry."),
+ rif(.@q == 1, l("Celestia asks for your help."));
+
+ mes "";
+
+ if (@menu == 1)
+ goto L_Die;
+ if (@menu == 2)
+ close;
+
+ mesn l("Dah Yeti King!!");
+ mesq l("Yeah yeah yeah, you're not the first one to come talking about that to me.");
+ next;
+ mesn l("Dah Yeti King!!");
+ mesq l("My answer is still a no, and it won't change. Don't test my patience any further.");
+ next;
+ select
+ l("You'll come with me!"),
+ l("I can prove you my worth!"),
+ l("Sorry! Sorry!");
+
+ mes "";
+ if (@menu == 1)
+ goto L_Die;
+ if (@menu == 3)
+ close;
+ if (BaseLevel < 35) {
+ mesn l("Dah Yeti King!!");
+ mesq l("You? Have you ever looked in the mirror? You're not even level 35. Begone.");
+ close;
+ }
+
+ mesn l("Dah Yeti King!!");
+ mesq l("Well, then I'll give you a task. We may meet again in Soren Village.");
+ next;
+ mesn l("Dah Yeti King!!");
+ mesq l("I'll warp you to the Cave Of Trials. Pass all trials, and meet me on Soren's House. Hahah!");
+ setq HurnscaldQuest_Celestia, 2;
+ @YetiKing_Challenger=1;
+ areatimer "003-1-1", 93, 20, 97, 25, 15000, "#DahYetiKing::OnWarper";
+ npctalk l("Listen to me! Whoever wants to follow foolish @@ on their suicide quest, stay here for 15 seconds!", strcharinfo(0));
+ close;
+
+OnWarper:
+ if (ispcdead())
+ end;
+ // If you had to return, erase quest progress
+ if (.@q > 2 && .@q < 99) {
+ @YetiKing_Challenger=0;
+ }
+
+ mesc l("Warp to the Cave Of Trials?");
+ mesc l("There is no EXP penalty, but you cannot go back without either completing the cave, or dying.");
+ mesc l("If you die, you'll need to start over everything again!");
+ if (askyesno() == ASK_YES) {
+ setq HurnscaldQuest_Celestia, 2; // This is a fix
+ warp "001-6", 27, 180;
+ }
+ setnpcdisplay .name$, NPC_SUMMONING_CIRC;
+ .inUse=0;
+ closedialog;
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+ .inUse=0; // Prevent multiple summons and etc.
+ end;
+}
diff --git a/npc/003-1-3/_import.txt b/npc/003-1-3/_import.txt
index 90753ead4..3c6504ea9 100644
--- a/npc/003-1-3/_import.txt
+++ b/npc/003-1-3/_import.txt
@@ -1,4 +1,4 @@
-// Map 003-1-3: magic school cave
+// Map 003-1-3: Magic School's Cave
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-1-3/_mobs.txt",
"npc/003-1-3/_warps.txt",
diff --git a/npc/003-1-3/_mobs.txt b/npc/003-1-3/_mobs.txt
index bbb8b825c..0288b1511 100644
--- a/npc/003-1-3/_mobs.txt
+++ b/npc/003-1-3/_mobs.txt
@@ -1,5 +1,5 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 003-1-3: magic school cave mobs
-003-1-3,55,58,29,22 monster Cave Snake 1035,7,35000,150000
-003-1-3,70,40,3,1 monster Small Topaz Bif 1101,1,35000,150000
-003-1-3,54,54,54,54 monster Cave Maggot 1027,5,40000,200000
+// Map 003-1-3: Magic School's Cave mobs
+003-1-3,55,58,29,22 monster Cave Snake 1035,11,35000,150000
+003-1-3,56,52,34,19 monster Small Topaz Bif 1101,2,37000,160000
+003-1-3,54,54,54,54 monster Cave Maggot 1027,6,40000,200000
diff --git a/npc/003-1-3/_warps.txt b/npc/003-1-3/_warps.txt
index c8e143d02..a55641133 100644
--- a/npc/003-1-3/_warps.txt
+++ b/npc/003-1-3/_warps.txt
@@ -1,4 +1,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 003-1-3: magic school cave warps
+// Map 003-1-3: Magic School's Cave warps
003-1-3,83,82,0 warp #003-1-3_83_82 0,0,003-1,59,54
003-1-3,37,86,0 warp #003-1-3_37_86 0,0,003-1,25,46
diff --git a/npc/003-1/_import.txt b/npc/003-1/_import.txt
index 7e75a428a..26d57714e 100644
--- a/npc/003-1/_import.txt
+++ b/npc/003-1/_import.txt
@@ -6,11 +6,11 @@
"npc/003-1/aidan.txt",
"npc/003-1/ched.txt",
"npc/003-1/constableperry.txt",
-"npc/003-1/eistein.txt",
"npc/003-1/eomie.txt",
"npc/003-1/eugene.txt",
"npc/003-1/events.txt",
"npc/003-1/gladys.txt",
+"npc/003-1/hasan.txt",
"npc/003-1/inac.txt",
"npc/003-1/inar.txt",
"npc/003-1/ishi.txt",
@@ -18,6 +18,7 @@
"npc/003-1/jakod.txt",
"npc/003-1/jerican.txt",
"npc/003-1/lieutenantdausen.txt",
+"npc/003-1/magic.txt",
"npc/003-1/mahoud.txt",
"npc/003-1/malivox.txt",
"npc/003-1/mapflags.txt",
@@ -25,13 +26,16 @@
"npc/003-1/michel.txt",
"npc/003-1/neko.txt",
"npc/003-1/ninathetraveler.txt",
+"npc/003-1/oldwell.txt",
+"npc/003-1/quirino.txt",
+"npc/003-1/sailors.txt",
"npc/003-1/sarah.txt",
+"npc/003-1/sewer.txt",
"npc/003-1/ship.txt",
"npc/003-1/shop.txt",
"npc/003-1/silvia.txt",
"npc/003-1/soul-menhir.txt",
"npc/003-1/swezanne.txt",
-"npc/003-1/tamiloc.txt",
"npc/003-1/tinris.txt",
"npc/003-1/wateranimation.txt",
"npc/003-1/well.txt",
diff --git a/npc/003-1/_mobs.txt b/npc/003-1/_mobs.txt
index 6c0705e10..d1ae06010 100644
--- a/npc/003-1/_mobs.txt
+++ b/npc/003-1/_mobs.txt
@@ -1,6 +1,6 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 003-1: Tulimshar mobs
-003-1,84,106,33,48 monster Maggot 1030,38,35000,450000
+003-1,84,106,33,48 monster Maggot 1030,42,35000,450000
003-1,81,103,2,3 monster Croc 1006,1,35000,150000
003-1,67,27,3,4 monster Four Leaf 1028,1,30000,20000
003-1,72,70,7,4 monster Piou 1002,2,30000,20000
@@ -11,3 +11,7 @@
003-1,25,73,8,25 monster Little Blub 1007,6,35000,150000
003-1,37,70,3,13 monster Toppy Blub 1009,2,35000,150000
003-1,64,58,4,1 monster Croc 1006,1,35000,150000
+003-1,109,24,9,4 monster Piou 1002,3,30000,20000
+003-1,81,116,8,11 monster Duck 1029,3,30000,20000
+003-1,107,43,8,11 monster Duck 1029,2,30000,20000
+003-1,110,42,4,1 monster Croc 1006,1,35000,150000
diff --git a/npc/003-1/aidan.txt b/npc/003-1/aidan.txt
index 748f4a09e..32ad9fe81 100644
--- a/npc/003-1/aidan.txt
+++ b/npc/003-1/aidan.txt
@@ -20,8 +20,7 @@
l("Not at the moment"),
l("Information");
- switch (@menu)
- {
+ switch (@menu) {
case 1:
mes "";
Zeny=Zeny-2000;
@@ -37,7 +36,7 @@
case 2:
mes "";
mesn l("Aidan, the Monster Guide");
- mesq l("Sell old equipment and items you won't use. For example, what should you do with a @@ or an @@? Sell it!", getitemlink(Topaz), getitemlink(ScorpionStinger));
+ mesq l("Sell old equipment and items you won't use. For example, what should you do with a @@ or an @@? Sell it!", getitemlink(Ruby), getitemlink(ScorpionStinger));
close;
break;
case 3:
@@ -67,11 +66,106 @@
} while (@menu != 4);
}
+ if (BaseLevel < 10) goto L_Weak;
+
if (MPQUEST == 0)
Register;
mesn l("Aidan, the Monster Guide");
mesq l("You currently have @@ Monster Points. These points are acquired while killing monsters.", Mobpt);
+ if (getq(General_Hunter) == 0 && !GHQUEST) goto L_Register;
+ if (getq(General_Hunter) == 0) goto L_Assign;
+ mes "";
+ if (getq2(General_Hunter) >= 10000) goto L_Finish;
+ goto L_Assign;
+ close; // Will never be reach.
+
+L_Weak:
+ mesn;
+ mesq l("How did you even get here? Go back to Candor, where you belong!");
+ percentheal -20, 0;
+ close;
+
+L_Register:
+ next;
+ mesn;
+ mesq l("The alliance also have a special program, called ##BGrand Hunter Quest##b, where you kill 10,000 of a monster and get great rewards.");
+ next;
+ mesn;
+ mesq l("You can gain rares, even. Come register for this special program. It's free!");
+ if (askyesno() == ASK_YES) {
+ GHQUEST=1;
+ setarray GHMEMO, 0, 0, 0;
+ mesn;
+ mesq l("Registered, welcome to the Grand Hunter Quest!");
+ next;
+ goto L_Assign;
+ } else {
+ mes "";
+ mesn;
+ mesq l("A pity...");
+ close;
+ }
+
+L_Assign:
+ GHQ_Assign(Maggot, "Tulimshar", getitemlink(MaggotCocoon));
+ end;
+
+
+L_Finish:
+ // Check if you can store a Strange Coin (you really should)
+ // Another item too, which I'm sure you won't get it anywhere.
+ inventoryplace StrangeCoin, 1, NPCEyes, 1;
+ mes l("Current progress: @@/10000 @@", getq2(General_Hunter), getmonsterlink(GHQ_GetMonsterIDByQuestID(getq(General_Hunter))));
+ mes "";
+ GHMEMO[getq(General_Hunter)]=getq2(General_Hunter);
+ switch (GHQ_GetMonsterIDByQuestID(getq(General_Hunter))) {
+ case Maggot:
+ setq General_Hunter, 0, 0;
+ Zeny=Zeny+25000;
+ inventoryplace MaggotCocoon, 1;
+ makepet(1030); // Uhm, I forgot what would be the correct constant.
+ getexp 15750, 100;
+ mesn;
+ mesq l("Good job, here is 25,000 GP and 15,750 EXP.");
+ mesq l("And your rare, a @@! Enjoy!", getitemlink(MaggotCocoon));
+ close;
+ case Snake:
+ setq General_Hunter, 0, 0;
+ Zeny=Zeny+300000;
+ getitem StrangeCoin, 80;
+ getexp 15750, 100;
+ mesn;
+ mesq l("Good job, here is 300,000 GP and 80 @@!", getitemlink(StrangeCoin));
+ mesc l("Gained @@ XP", "15750");
+ close;
+ case Scorpion:
+ setq General_Hunter, 0, 0;
+ Zeny=Zeny+100000;
+ getexp 15750, 100;
+ mesn;
+ mesq l("Good job, here is 100,000 GP!");
+ mesc l("Gained @@ XP", "15750");
+ close;
+ case ForestMushroom:
+ setq General_Hunter, 0, 0;
+ Zeny=Zeny+275000;
+ getitem StrangeCoin, 60;
+ getexp 15750, 100;
+ mesn;
+ mesq l("Good job, here is 275,000 GP and 60 @@!", getitemlink(StrangeCoin));
+ mesc l("Gained @@ XP", "15750");
+ close;
+ case Pinkie:
+ setq General_Hunter, 0, 0;
+ getitem PinkHelmet, 1;
+ getexp 15750, 100;
+ mesn;
+ mesq l("And your rare, a @@! Enjoy!", getitemlink(ApanaCake));
+ mesc l("Gained @@ XP", "15750");
+ close;
+ }
+ mesc l("ILLEGAL SCRIPT POSITION REACHED, PLEASE REPORT.", 1);
close;
OnInit:
@@ -86,4 +180,15 @@ OnInit:
.sex = G_MALE;
.distance = 5;
end;
+
+
+OnNPCKillEvent:
+ if (getq(General_Hunter) == 0) end;
+
+ .@ghd=getq(General_Hunter);
+ if (killedrid == GHQ_GetMonsterIDByQuestID(.@ghd))
+ setq2 General_Hunter, getq2(General_Hunter)+1;
+ end;
}
+
+
diff --git a/npc/003-1/ched.txt b/npc/003-1/ched.txt
index 3ef4b1c56..0ad1e8e83 100644
--- a/npc/003-1/ched.txt
+++ b/npc/003-1/ched.txt
@@ -1,14 +1,117 @@
// TMW2 scripts.
// Author:
// Saulc
+// Jesusalva
// Description:
// Ched is from a quest.
-
+// But as he is now unused, he'll become someone else on summer.
003-1,62,48,0 script Ched NPC_PLAYER,{
+ function ValidSSC {
+ return countitem(CactusCocktail)+countitem(CherryCocktail)+countitem(AppleCocktail);
+ }
+ function ScoreSSC {
+ .@nb = query_sql("SELECT c.name, i.count2 FROM `quest` AS i, `char` AS c WHERE i.quest_id=305 AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 10", .@name$, .@value);
+
+ mes "##B"+l("Top 10 - Summer Ched's Event")+"##b";
+ mes("1."+.@name$[0]+" ("+.@value[0]+")");
+ mes("2."+.@name$[1]+" ("+.@value[1]+")");
+ mes("3."+.@name$[2]+" ("+.@value[2]+")");
+ mes("4."+.@name$[3]+" ("+.@value[3]+")");
+ mes("5."+.@name$[4]+" ("+.@value[4]+")");
+ mes("6."+.@name$[5]+" ("+.@value[5]+")");
+ mes("7."+.@name$[6]+" ("+.@value[6]+")");
+ mes("8."+.@name$[7]+" ("+.@value[7]+")");
+ mes("9."+.@name$[8]+" ("+.@value[8]+")");
+ mes("10."+.@name$[9]+" ("+.@value[9]+")");
+ next;
+ }
+ function InfoSSC {
+ mesc l("@@ - @@ point(s)", getitemlink(CactusCocktail), "1");
+ mesc l("@@ - @@ point(s)", getitemlink(CherryCocktail), "3");
+ mesc l("@@ - @@ point(s)", getitemlink(AppleCocktail), "5");
+ next;
+ }
+ function DepositSSC {
+ .@pts=.@pts+countitem(CactusCocktail)*1;
+ .@pts=.@pts+countitem(CherryCocktail)*3;
+ .@pts=.@pts+countitem(AppleCocktail)*5;
+
+ delitem CactusCocktail, countitem(CactusCocktail);
+ delitem CherryCocktail, countitem(CherryCocktail);
+ delitem AppleCocktail, countitem(AppleCocktail);
+
+ getexp rand(.@pts-1, .@pts*11/10), rand(0,.@pts/25);
+
+ setq2 SQuest_Ched, @ched+.@pts;
+ @ched=getq2(SQuest_Ched);
+ mesc l("Gained @@ points.", .@pts), 3;
+ next;
+ mesc l("Your Score: @@", @ched), 1;
+ mes "";
+ ScoreSSC;
+ closedialog;
+ goodbye;
+ close;
+ }
+
+ // Begin: Ched
+ .@year=getq(SQuest_Ched);
+ if (.@year != (gettime(GETTIME_YEAR)-2000))
+ setq SQuest_Ched, (gettime(GETTIME_YEAR)-2000), 0, 0;
+ @ched=getq2(SQuest_Ched);
+ .@claimed=getq3(SQuest_Ched); // Required to prevent rewriting scoreboards
+
+ if (season() == SUMMER && !$@GM_OVERRIDE) goto L_Summer;
+ if ((season() == AUTUMN && !.@claimed) || is_gm()) goto L_Autumn;
hello;
+ end;
+
+// Summer Event
+L_Summer:
+ if (BaseLevel < 25) {
+ mesn;
+ mesq l("Get Rekt Noob.");
+ close;
+ }
+
+ // Main Core
+ do
+ {
+ mesn;
+ mesc l("Current score: @@", @ched), 1;
+ mesc l("Thus far you have collected @@ @@, @@ @@ and @@ @@.", countitem(CactusCocktail), getitemlink(CactusCocktail), countitem(AppleCocktail), getitemlink(AppleCocktail), countitem(CherryCocktail), getitemlink(CherryCocktail)), 2;
+ mesc l("You can convert these items in event points and claim rewards at autumn."), 2;
+ next;
+ select
+ l("Scoreboards"),
+ l("Information"),
+ rif(ValidSSC(), l("Deposit all")),
+ l("Abort");
+ mes "";
+ if (@menu == 1)
+ ScoreSSC;
+ if (@menu == 2)
+ InfoSSC;
+ if (@menu == 3)
+ DepositSSC;
+
+ } while (@menu < 3);
+ close;
+// Summer Quest Claim Rewards Time
+L_Autumn:
+ mesc l("Your Score: @@", @ched), 1;
+ mes "";
+ ScoreSSC;
+ next;
+ // TODO: Do whatever reward whatever way you want whatever whatevers.
+ Zeny=Zeny+@ched;
+ setq3 SQuest_Ched, 1;
+ closedialog;
+ goodbye;
+ close;
OnInit:
.@npcId = getnpcid(0, .name$);
diff --git a/npc/003-1/constableperry.txt b/npc/003-1/constableperry.txt
index 0490be5e1..f0f88e622 100644
--- a/npc/003-1/constableperry.txt
+++ b/npc/003-1/constableperry.txt
@@ -13,14 +13,15 @@
next;
mesq l("Yes, I am a mouboo. Why? Can't a mouboo be a law and order enforcer?!");
next;
- mesq l("Anyway, you can check our [@@https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/home|Wiki@@] to find awesome stuff!");
+ mesq l("Anyway, you can check our [@@https://gitlab.com/TMW2/Docs/wikis/home|Wiki@@] to find awesome stuff!");
+ mesc l("(To see the rules, use ##B@rules##b.)");
next;
- mesq l("You can even join the project there. Contributors are greatly appreciated! %%g");
+ mesq l("You can even join the project there. Contributors are greatly appreciated! %%N");
close;
OnInit:
.sex = G_MALE;
- .distance = 3;
+ .distance = 5;
end;
}
diff --git a/npc/003-1/eistein.txt b/npc/003-1/eistein.txt
deleted file mode 100644
index 28add6bf2..000000000
--- a/npc/003-1/eistein.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-// TMW2 scripts.
-// Author:
-// Saulc
-// Variables:
-// 0 CandorQuest_Eistein
-// Values:
-// Eistein reward for free player over level 50 by a graduation cap,
-
-
-
-
-003-2,35,34,0 script Eistein NPC_PLAYER,{
-
- .reward = GraduationCap;
-
- function quest_completed{
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("I hope you are proud of your @@ ",getitemlink(.reward));
- close;
- }
-
- function quest_open {
- if(BaseLevel >= 50)
- {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("Congrats you passed the cap of the level 50! Here is your @@, you deserve it.",getitemlink(.reward));
- getitem .reward,1;
- setq TulimsharQuest_Eistein, 1;
- close;
- }
- else
- {
- speech S_FIRST_BLANK_LINE,
- l("i can't reward a weak adventurer like you, Come back later.");
- close;
- }
- }
-
- function quest_started {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("Oh, Welcome then.");
- speech S_LAST_NEXT,
- l("I'm Eistein, I reward brave adventurers who kill monsters who plague our lands.");
- do
- {
- select
- l("Interessing can I be rewarded for my help?"),
- menuaction(l("Quit"));
-
- switch (@menu)
- {
- case 1:
- quest_open;
- break;
- }
- } while (@menu != 2);
- }
-
- do
- {
- .@chest = getq(TulimsharQuest_Eistein);
- if (.@chest == 1)
- goto quest_completed;
- select
- rif(.@chest == 0,
- l("Hello, can I be rewarded for my help?")),
- menuaction(l("Quit"));
-
- switch (@menu)
- {
- case 1:
- quest_started;
- break;
- }
- } while (@menu != 2);
-
- closedialog;
- goodbye;
- close;
-
-OnInit:
- .@npcId = getnpcid(0, .name$);
- setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
- setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
- setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
- setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
- setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
- npcsit;
-
- .sex = G_MALE;
- .distance = 4;
- end;
-}
diff --git a/npc/003-1/eomie.txt b/npc/003-1/eomie.txt
index 57a355248..8de219162 100644
--- a/npc/003-1/eomie.txt
+++ b/npc/003-1/eomie.txt
@@ -1,17 +1,92 @@
+// TMW2 Script
// Author:
// Saulc
+// Jesusalva
+// Description:
+// Part of Anwar Field quest
// Notes: Eomie did the bug bomb at Candor
003-1,68,24,0 script Eomie NPC_ELF_F,{
+ .@q=getq(TulimsharQuest_AnwarField);
+ if (.@q == 10) goto L_Gift;
+ if (.@q == 7) goto L_FirstAid;
+ if (.@q == 1) goto L_NotMe;
-hello;
+ hello;
+ end;
+
+L_NotMe:
+ mesn strcharinfo(0);
+ mesq l("Hello Ms. Eomie, kind sir Anwar sent me to fetch some fertilizers to save Tulimshar from famine, if you may?");
+ next;
+ mesn;
+ mesq lg("Sorry kind lady @@, but no.", "Sorry kind sir @@, 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.");
+ next;
+ mesn;
+ mesq l("Tinris probably could do that, he is young but very talented. He is a greedy elf, but if you help him, he'll likely help you back.");
+ setq TulimsharQuest_AnwarField, 2;
+ close;
+
+L_FirstAid:
+ mesn;
+ mesq l("The crops are under attack? That's terrible!");
+ next;
+ mesn;
+ mesq l("I can do a bug bomb right away, but I still need a few things for it!");
+ next;
+ mesn;
+ mesq l("Do you, perchance, have 2 @@ and 3 @@?", getitemlink(ScorpionClaw), getitemlink(Moss));
+ if (askyesno() != ASK_YES)
+ close;
+ mes "";
+
+ if (countitem(ScorpionClaw) < 2 ||
+ countitem(Moss) < 3) {
+ mesn;
+ mesq l("The situation is too serious to you be lying... Please, go fetch the items...");
+ }
+
+ delitem ScorpionClaw, 2;
+ delitem Moss, 3;
+ setq TulimsharQuest_AnwarField, 8;
+
+ mesn;
+ mesq l("Quick, deliver this to Anwar!");
+ close;
+
+
+L_Gift:
+ .@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(TortugaShell) < 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(TortugaShell));
+ next;
+ setq2 TulimsharQuest_AnwarField, .@q2+2;
+ delitem TortugaShell, 1;
+ getexp 75, 10;
+ mesn;
+ mesq l("WOW, THIS IS AWESOME! Many, many thanks!!");
+ close;
OnInit:
- .@npcId = getnpcid(0, "Eomie");
- //setunitdata(.@npcId, UDT_HEADTOP, 2929);
- setunitdata(.@npcId, UDT_HEADMIDDLE, 1319);
- setunitdata(.@npcId, UDT_HEADBOTTOM, 2207);
- //setunitdata(.@npcId, UDT_WEAPON, 1802); // Boots
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, PinkieHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
+ //setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
setunitdata(.@npcId, UDT_HAIRCOLOR, 12);
diff --git a/npc/003-1/eugene.txt b/npc/003-1/eugene.txt
index 030dc44e4..8fd6900d6 100644
--- a/npc/003-1/eugene.txt
+++ b/npc/003-1/eugene.txt
@@ -68,6 +68,7 @@ L_CheckItems:
delitem .BaitID, .BaitCount;
getitem FishingRod, 1;
getitem FishingGuideVolI, 1;
+ getexp 50, 5;
setq TulimsharQuests_Fishman, 2;
close;
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt
index 0d7bebbaf..66feed4f4 100644
--- a/npc/003-1/events.txt
+++ b/npc/003-1/events.txt
@@ -4,6 +4,7 @@
// Description:
// The NPCs on this file are for when events end. Must be manually enabled.
+// Easte
003-1,47,53,0 script Lilica#final NPC_EASTER,{
mesn;
mesq l("Easter is over! I am the last chance to get rid of eggs!!");
@@ -49,4 +50,79 @@ OnInit:
end;
}
+// Whatever event use #RARE_POINTS
+// Which is a script variable, meaning it will be a really special event.
+// Side Note: Might as well add a special cap for such situations.
+003-1,47,53,0 script Pydisgner#spoints NPC_GUGLI,{
+ openshop;
+OnInit:
+ .sex = G_OTHER;
+ .distance=5;
+
+ tradertype(NST_CUSTOM);
+
+ // Rares
+ sellitem BlacksmithAxe, 64000;
+ sellitem MiereCleaver, 32000;
+ sellitem Kanabo, 13500;
+ sellitem PiouEgg, 9350;
+ sellitem AxeHat, 8000;
+ sellitem Googles, 6000;
+
+ // Uncommon
+ sellitem CrystallizedMaggot, 7000;
+ sellitem Sunglasses, 7000;
+ sellitem BunnyEars, 900;
+ sellitem StrangeCoin, 10;
+
+ // Gamble
+ sellitem SupremeGift,30000;
+ sellitem PrismGift, 11000;
+ sellitem GoldenGift, 4000;
+ sellitem SilverGift, 1500;
+ sellitem BronzeGift, 500;
+ sellitem CasinoCoins, 35;
+
+ // Equipment
+ sellitem WoodenSword, 5500;
+ sellitem Chainmail, 2500;
+ sellitem LeatherShirt, 800;
+ sellitem JeansShorts, 600;
+ sellitem ShortBow, 500;
+ sellitem RoundLeatherShield,200;
+ sellitem WoodenBow, 100;
+ sellitem Dagger, 100;
+
+ // Consumables
+ sellitem TonoriDelight, 80;
+ sellitem Aquada, 60;
+ sellitem Manana, 50;
+ sellitem Cheese, 40;
+ sellitem Plushroom, 15;
+ sellitem Chagashroom, 15;
+
+ // Useful ores and money stuff
+ sellitem IronIngot, 2500;
+ sellitem EmptyBottle, 60;
+ sellitem Arrow, 4;
+ sellitem TolchiArrow, 1;
+ sellitem PiouFeathers, 1;
+
+
+ if (gettime(7) != 2018)
+ disablenpc(.name$);
+ end;
+
+OnCountFunds:
+ setcurrency(#RARE_POINTS);
+ end;
+
+OnPayFunds:
+ if( #RARE_POINTS < @price )
+ end;
+ #RARE_POINTS=#RARE_POINTS-@price;
+ purchaseok();
+ end;
+
+}
diff --git a/npc/003-1/hasan.txt b/npc/003-1/hasan.txt
new file mode 100644
index 000000000..ae11f0677
--- /dev/null
+++ b/npc/003-1/hasan.txt
@@ -0,0 +1,186 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Hasan is the city bully and steals the player. He lost his father to a Murderer
+// Scorpion. Will respect player if they kill one. His mother is Sorfina, whom
+// explains this and cries that he never touched a Soul Menhir. Allowing player
+// to kill scorpion on Mahoud's Basement.
+//
+// Player must report theft first to Dausen, who will tell the player that's
+// normal and nobody messes with Hasan, and giving player pointer that he should
+// tell his mother, Sorfina.
+//
+// Reward: Cotton Short, Hasan won't steal you anymore.
+//
+// GETQ1 Variable Value;
+// 0 - Never stolen by Hasan
+// 1 - Already stolen by Hasan
+// 2 - Dausen pointed player to Sorfina
+// 3 - Sorfina unlocked Mahoud's Basement
+// 4 - Player killed Murderer Scorpion
+// 5 - Quest is complete
+//
+// $HASAN_ST
+// Number of Scorpions killed during Autumn
+// $HASAN_GP
+// Total money Hasan collected for Autumn event
+// $HASAN_LT
+// Previous collected money, for rewards calc
+//
+// PS. $@GM_OVERRIDE will disable Season restrictions, but values from 20/09 and 21/12
+// must be set manually.
+
+// Temporary sprite
+003-1,62,148,0 script Hasan NPC_ELVEN_MAN_RED,2,2,{
+ if (getq(TulimsharQuest_Hasan) == 0) goto L_Safe;
+ if (getq(TulimsharQuest_Hasan) == 4) goto L_Finish;
+ if (getq(TulimsharQuest_Hasan) == 5) goto L_Complete;
+ mesn strcharinfo(0);
+ mesq l("Give me back what you've stole, thief!");
+ next;
+ mesn;
+ mesq l("I stole nothing from you. Do you have any proof?");
+ next;
+ menu
+ l("I have a print screen!"), L_Print,
+ l("No..."), L_Close;
+ close;
+
+L_Away:
+ mesn;
+ mesq l("Hey... Go bother someone else.");
+ close;
+
+L_Print:
+ mes "";
+ mesn;
+ mesq l("Let me analyze that.");
+ mesc l("Hasan takes your print screen and analyzes it.");
+ next;
+ mesn;
+ mesq l("Photoshopped. Definitely. Good luck convincing somebody with that! %%a");
+ next;
+ mesn;
+ mesq l("If you go to Lieutenant Dausen, he'll say that you used Gimp. Just give up.");
+ close;
+
+// TODO
+L_Finish:
+ mesn;
+ mesq l("Is that... Wait... Wow. You... Killed a murderer scorpion.");
+ next;
+ mesn;
+ mesq l("I promise I'll never steal from you again. Here, take this shorts.");
+ mesq l("Good job, man!");
+ setq TulimsharQuest_Hasan, 5;
+ getitem CottonShorts, 1;
+ getexp 99, 55;
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("Thanks for avenging my father.");
+ next;
+ mesn;
+ mesq l("I am collecting money for the Yearly Autumn Scorpion Hunter quest.");
+ mesq l("You're, of course, invited. Thus far, the total prize money I've collected is @@ GP.", $HASAN_GP);
+ if (season() == AUTUMN || $@GM_OVERRIDE) {
+ mesq l("You've killed @@ scorpions, and a total of @@ were killed this season.", getq2(SQuest_Autumn), $HASAN_ST);
+ mesq l("If the event ended now, you would get @@ GP.", getq2(SQuest_Autumn)*$HASAN_GP/$HASAN_ST);
+ menuint
+ l("Thanks."),0,
+ rif(Zeny >= 5, l("Donate 5 GP for prize")),5,
+ rif(Zeny >= 15, l("Donate 15 GP for prize")),15,
+ rif(Zeny >= 50, l("Donate 50 GP for prize")),50,
+ rif(Zeny >= 100, l("Donate 100 GP for prize")),100;
+ if (@menuret > 0) {
+ Zeny=Zeny-@menuret;
+ $HASAN_GP=$HASAN_GP+@menuret;
+ }
+ }
+
+ if ((season() == WINTER || $@GM_OVERRIDE == 2) && getq(SQuest_Autumn) == gettime(GETTIME_YEAR)) {
+ .@p=getq2(SQuest_Autumn)*$HASAN_LT/$HASAN_ST;
+ mesn l("Summary");
+ mes l("Scorpions killed: @@/@@ scorpions", getq2(SQuest_Autumn), $HASAN_ST);
+ mes l("Total money collected: @@ GP", $HASAN_LT);
+ mes l("##2Your prize: @@ GP", .@p);
+ if (getq2(SQuest_Autumn) > 20)
+ getexp (getq2(SQuest_Autumn)/20), 0;
+ if (.@p >= 1)
+ Zeny=Zeny+.@p;
+ setq SQuest_Autumn, 1970, 0;
+ }
+ close;
+
+L_TouchComplete:
+ npctalkonce l("Hey there, @@! Good luck killing monsters!", strcharinfo(0)), 3;
+ end;
+
+L_Close:
+ close;
+
+OnTouch:
+ if (getq(TulimsharQuest_Hasan) == 5) goto L_TouchComplete;
+ if (Zeny > 15) goto L_Steal;
+ end;
+
+L_Steal:
+ npctalkonce(l("*whistle*"));
+ if (getq(TulimsharQuest_Hasan) == 0) goto L_DoSteal;
+ if (getq(TulimsharQuest_Hasan) <= 4 && rand(0,100) < 20) goto L_DoSteal;
+ end;
+
+L_DoSteal:
+ .@s=rand(3,12);
+ $HASAN_GP=$HASAN_GP+.@s;
+ Zeny=Zeny-.@s;
+ if (getq(TulimsharQuest_Hasan) == 0)
+ setq TulimsharQuest_Hasan, 1;
+ dispbottom l("##BYou were stolen##b by an evil NPC.");
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+
+ //npcspeed(150);
+ //npcwalkto(<x>, <y>);
+ end;
+
+// Restart hasan status on 20/09 (double-sure)
+OnDay0920:
+ $HASAN_ST=0;
+ end;
+
+// Once autumn is over (21/12) restart GP poll and send value to backup
+OnDay1221:
+ $HASAN_LT=0+$HASAN_GP;
+ $HASAN_GP=0;
+ end;
+}
+
+function script SQuest_Hasan {
+ if (season() != AUTUMN && !$@GM_OVERRIDE)
+ return;
+ if (getq(SQuest_Autumn) != gettime(GETTIME_YEAR))
+ setq SQuest_Autumn, gettime(GETTIME_YEAR), 0;
+
+ // All scorpions are counting for Hasan Autumn Quest
+ if (
+ killedrid == Scorpion ||
+ killedrid == RedScorpion ||
+ killedrid == BlackScorpion ||
+ killedrid == CandorScorpion ||
+ killedrid == AngryScorpion ||
+ killedrid == AngryRedScorpion ||
+ killedrid == NightScorpion ||
+ killedrid == GoldenScorpion ||
+ killedrid == MurdererScorpion) {
+ setq2 SQuest_Autumn, getq2(SQuest_Autumn)+1;
+ $HASAN_ST=$HASAN_ST+1;
+ }
+ return;
+}
+
diff --git a/npc/003-1/inac.txt b/npc/003-1/inac.txt
index 8c05e6a3e..37ae82899 100644
--- a/npc/003-1/inac.txt
+++ b/npc/003-1/inac.txt
@@ -1,11 +1,27 @@
// TMW2 scripts.
// Author:
// Saulc
+// Jesusalva
003-1,55,82,0 script Inac NPC_PLAYER,{
-
-
-hello;
+ mesn;
+ mesq l("Many stories are told about this city sewers.");
+ next;
+ mesn;
+ mesq l("One of them is really crazy, though: They say that there is a legendary monster down there.");
+ next;
+ mesn;
+ mesq l("That's just nonsense though, I've been there thousands of times and saw no such thing.");
+ if (getq(TulimsharQuest_Sewers) > 0)
+ close;
+ next;
+ mesn;
+ mesq l("Anyway, there's a barrier to prevent monsters from attacking the city from below.");
+ next;
+ mesn;
+ mesq l("To enter on them, you need to be level 25 and use the following chant: \"Blame Saulc\". I don't know why, but that open doors!");
+ setq TulimsharQuest_Sewers, 1;
+ close;
OnInit:
.@npcId = getnpcid(0, .name$);
diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt
index 4ab99b7aa..1f7febe04 100644
--- a/npc/003-1/ishi.txt
+++ b/npc/003-1/ishi.txt
@@ -8,28 +8,45 @@
003-1,97,97,0 script Ishi NPC_PLAYER,{
- if (MPQUEST == 0)
- {
+ if (MPQUEST == 0) {
mesn l("Ishi, the Rewards Master");
mesq l("Hey, it seems like you didn't register as a Monster Hunting Quest participant yet! You can sign up with Aidan.");
close;
}
+ if (BaseLevel < 10) {
+ dispbottom l("##1Bug abuser detected! Automatically banning!!");
+ atcommand "@ban 5mn "+strcharinfo(0);
+ end;
+ }
+ if (BaseLevel < 37) {
+ @mpq_cost=(BaseLevel ** 2);
+ } else { // From level 37 onwards, we will notice a small drop on price increase factor
+ @mpq_cost=(BaseLevel ** 2)-(BaseLevel*2);
+ }
- if (Mobpt < BaseLevel ** 2)
+ if (Mobpt < @mpq_cost)
{
mesn l("Ishi, the Rewards Master");
mesq l("Welcome! I see you have @@ Monster Points. But that isn't enough to get items at your current level, sorry!", Mobpt);
- mes col(l("I need at minimum @@ Monster Points to get items at current level.",BaseLevel ** 2),9);
+ mesc l("I need at minimum @@ Monster Points to get items at current level.",@mpq_cost);
close;
}
- setarray @Items$, "Bread", "Croconut","Plushroom",
- "RedApple","Beer","Candy","Orange","ChocolateBar","BugLeg","CoinBag",
- "Coal","SnakeSkin","CottonCloth","GrassSeeds","HardSpike","CobaltHerb","GambogeHerb",
- "MauveHerb","IronOre","MaggotSlime","RawLog","ScorpionStinger","SilkCocoon","TreasureKey",
- "FluffyFur","EmptyBottle","RustyKnife","Grenade","Coral","PiouLegs","Cheese","SnakeEgg","RoastedMaggot","BlueCottonDye";
- setarray @Rares$, "BrimmedHat", 5, "IronIngot", 10, "BronzeGift", 10;
+ if (BaseLevel < 25) {
+ setarray @Items$, "Bread",
+ "Candy","Orange","BugLeg",
+ "CobaltHerb","GambogeHerb",
+ "MauveHerb","MaggotSlime","ScorpionStinger","SilkCocoon",
+ "RustyKnife","Coral","PiouLegs","Cheese","RoastedMaggot";
+ } else {
+ setarray @Items$, "Bread", "Croconut","Plushroom",
+ "RedApple","Beer","Candy","Orange","ChocolateBar","BugLeg","CoinBag",
+ "Coal","SnakeSkin","CottonCloth","GrassSeeds","HardSpike","CobaltHerb","GambogeHerb",
+ "MauveHerb","IronOre","MaggotSlime","RawLog","ScorpionStinger","SilkCocoon","TreasureKey",
+ "WhiteFur","EmptyBottle","RustyKnife","Coral","PiouLegs","Cheese","SnakeEgg","RoastedMaggot","BlueDye";
+ }
+ setarray @Rares$, "BrimmedHat", 5, "IronIngot", 10, "BronzeGift", 10, "Grenade", 15;
mesn l("Ishi, the Rewards Master");
mesq l("Welcome! I see you have @@ Monster Points. Would you like to exchange some of those for items?", Mobpt);
@@ -38,17 +55,17 @@
do
{
select
- rif(Mobpt >= BaseLevel ** 2,l("1")),
- rif(Mobpt >= (BaseLevel ** 2)*2,l("2")),
- rif(Mobpt >= (BaseLevel ** 2)*3,l("3")),
- rif(Mobpt >= (BaseLevel ** 2)*4,l("4")),
- rif(Mobpt >= (BaseLevel ** 2)*5,l("5")),
- rif(Mobpt >= (BaseLevel ** 2)*6,l("6")),
- rif(Mobpt >= (BaseLevel ** 2)*7,l("7")),
- rif(Mobpt >= (BaseLevel ** 2)*8,l("8")),
- rif(Mobpt >= (BaseLevel ** 2)*9,l("9")),
- rif(Mobpt >= (BaseLevel ** 2)*10,l("10")),
- rif(Mobpt >= (BaseLevel ** 2)*11,l("Gimme as many as I deserve!")),
+ rif(Mobpt >= @mpq_cost, "1"),
+ rif(Mobpt >= (@mpq_cost)*2, "2"),
+ rif(Mobpt >= (@mpq_cost)*3, "3"),
+ rif(Mobpt >= (@mpq_cost)*4, "4"),
+ rif(Mobpt >= (@mpq_cost)*5, "5"),
+ rif(Mobpt >= (@mpq_cost)*6, "6"),
+ rif(Mobpt >= (@mpq_cost)*7, "7"),
+ rif(Mobpt >= (@mpq_cost)*8, "8"),
+ rif(Mobpt >= (@mpq_cost)*9, "9"),
+ rif(Mobpt >= (@mpq_cost)*10,"10"),
+ rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")),
l("Sorry, I have to go now.");
switch (@menu)
@@ -111,45 +128,47 @@ L_Close:
close;
L_Items:
- debugmes "Reaching item loop";
+ //debugmes "Reaching item loop";
for (.@i = 0; .@i < @var; .@i ++)
{
- debugmes "Items: "+str(@var);
+ //debugmes "Items: "+str(@var);
.@lucked=0;
.@reward$="";
getinventorylist;
if (@inventorylist_count == 100)
goto L_NoPlace;
- debugmes "Testing rares";
- @lucky = rand(10000) + 1;
- for (.@b = 0; .@b < getarraysize(@Rares$); .@b=.@b+2) {
- debugmes "Checking "+@Rares$[.@b]+" - b is now "+.@b;
- debugmes l("Check @@ <= @@", @lucky, @Rares$[.@b+1]);
- if (.@b == 0)
- @control = 0;
- if(@lucky >= (@control + 1) && @lucky <= @control + atoi(@Rares$[.@b+1]))
- {
- .@lucked=1;
- .@reward$ = @Rares$[.@b];
+ if (BaseLevel > 25) {
+ //debugmes "Testing rares";
+ @lucky = rand(10000) + 1;
+ for (.@b = 0; .@b < getarraysize(@Rares$); .@b=.@b+2) {
+ //debugmes "Checking "+@Rares$[.@b]+" - b is now "+.@b;
+ //debugmes l("Check @@ <= @@", @lucky, @Rares$[.@b+1]);
+ if (.@b == 0)
+ @control = 0;
+ if(@lucky >= (@control + 1) && @lucky <= @control + atoi(@Rares$[.@b+1]))
+ {
+ .@lucked=1;
+ .@reward$ = @Rares$[.@b];
+ }
+ @control = @control + atoi(@Rares$[.@b+1]);
}
- @control = @control + atoi(@Rares$[.@b+1]);
}
- debugmes "Setting reward"; // could be if (!.@lucked) but for sanity...
+ //debugmes "Setting reward"; // could be if (!.@lucked) but for sanity...
if (.@reward$ == "")
set .@reward$, @Items$[rand(getarraysize(@Items$))];
- debugmes "Check weight";
+ //debugmes "Check weight";
.@weight = checkweight(.@reward$,1);
if (!.@weight)
goto L_NoPlaceWeight;
- debugmes "Processing...";
- Mobpt = Mobpt - BaseLevel ** 2;
+ //debugmes "Processing...";
+ Mobpt = Mobpt - @mpq_cost;
getitem .@reward$,1;
- debugmes "Printing...";
+ //debugmes "Printing...";
if (.@lucked) {
mes "";
mes l("Wow!");
@@ -191,7 +210,7 @@ L_NoPlaceWeight :
close;
L_Give_all:
- @var = Mobpt / BaseLevel ** 2;
+ @var = Mobpt / @mpq_cost;
if (@var > 50) { // limit to avoid lag server. Probably a bad idea.
@var = 50;
mes l("You have too much points. I can't allow you to take all at once right now. I'll try to give you 50, and you come back later!");
diff --git a/npc/003-1/jakod.txt b/npc/003-1/jakod.txt
index 6e03a2407..5faf36cf1 100644
--- a/npc/003-1/jakod.txt
+++ b/npc/003-1/jakod.txt
@@ -19,8 +19,8 @@
menu
rif(!MAGIC_LVL, l("How do I get magic?")), L_HowTo,
- rif(MAGIC_LVL >= 1 && !getskilllv(NV_FIRSTAID), l("Can you teach me a basic tier 1 magic skill?")), L_Tier1,
- //rif(MAGIC_LVL >= 2 && !getskilllv(EVOL_MASS_PROVOKE),
+ rif(MAGIC_LVL >= 1 && !getskilllv(AL_HEAL), l("Can you teach me a basic tier 1 magic skill?")), L_Tier1,
+ rif(MAGIC_LVL >= 2 && !getskilllv(EVOL_MASS_PROVOKE), l("Can you teach me a basic tier 2 magic skill?")), L_Tier2,
//rif(MAGIC_LVL >= 3 && !getskilllv(AL_TELEPORT),
l("Good bye."), -;
@@ -49,6 +49,7 @@ L_HowTo:
close;
L_Tier1:
+ mes "";
mesn;
mesq l("Yeah, of course. I will teach you how to give first aid to people.");
next;
@@ -56,8 +57,27 @@ L_Tier1:
mesq l("It takes a lot of mana, and is not very powerful, but it is a must have for everyone.");
next;
mesn;
+ mesq l("I'll charge you the irrelevant amount of 100 GP. Come on, it's a pinch!");
+ select
+ rif(Zeny >= 100, l("Buy it")),
+ l("Don't buy it");
+ if (@menu == 1) {
+ Zeny=Zeny-100;
+ skill(AL_HEAL,1,0);
+ }
+ close;
+
+L_Tier2:
+ mes "";
+ mesn;
+ mesq l("Yeah, of course. This one is rather useless and difficult to use, though.");
+ next;
+ mesn;
+ mesq l("It's called Mass Provoke. You'll basically try to convince monsters to attack you.");
+ next;
+ mesn;
mesq l("Ah... I am too lazy to ask for anything in exchange. Here. Take it. Free.");
- skill(NV_FIRSTAID,1,0);
+ skill(EVOL_MASS_PROVOKE,1,0);
close;
OnInit:
diff --git a/npc/003-1/jerican.txt b/npc/003-1/jerican.txt
index 2fbcc0ebe..e25cab12d 100644
--- a/npc/003-1/jerican.txt
+++ b/npc/003-1/jerican.txt
@@ -1,23 +1,14 @@
-// TMW-2 Script
+// TMW2 scripts.
// Author:
// Saulc
+// Jesusalva
// Description:
-// An NPC in need of a quest
+// Jerican gives the player latest news on the world
-003-1,93,125,0 script Jerican NPC_PLAYER,{
-
-
-hello;
+003-1,93,125,0 script Jerican NPC_JOURNALMAN,{
+ Journalman(.name$);
OnInit:
- .@npcId = getnpcid(0, .name$);
- setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
- setunitdata(.@npcId, UDT_HEADMIDDLE, ForestArmor); // Maybe Bromenal Chest? ...Who is Jerican anyway?
- setunitdata(.@npcId, UDT_HEADBOTTOM, CottonShorts); // Maybe LeatherTrousers?
- setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
- setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
- setunitdata(.@npcId, UDT_HAIRCOLOR, 9);
-
.sex = G_MALE;
.distance = 5;
end;
diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt
index f0d0858d9..263e73673 100644
--- a/npc/003-1/lieutenantdausen.txt
+++ b/npc/003-1/lieutenantdausen.txt
@@ -17,7 +17,7 @@
003-1,111,84,0 script Lieutenant Dausen NPC_PLAYER,{
// The Monster King guild have a special menu
if (strcharinfo(2) == "Monster King") goto L_MKControl;
-
+
.@has = getq(TulimsharQuest_WaterForGuard);
switch (.@has) {
@@ -44,24 +44,29 @@
select
l("Yes sir. I will help them."),
+ rif(getq(TulimsharQuest_Hasan) == 1, l("A guy named Hasan stole me!")),
menuaction(l("Quit"));
- if (1 != @menu)
- {
- closedialog;
- goodbye;
- }
- else
- {
+ switch (@menu) {
+ case 1:
setq TulimsharQuest_WaterForGuard, 1;
-
speech S_FIRST_BLANK_LINE, l("Good luck! Come for remuneration when you finish!");
+ break;
+ case 2:
+ setq TulimsharQuest_Hasan, 2;
+ speech S_FIRST_BLANK_LINE, lg("Ah, Hasan... Sorry pal, afraid I can't do anything for you. Try talking to his mother Sorfina, she is on Mahoud's house, near the Inn.");
+ break;
+ case 3:
+ closedialog;
+ goodbye;
+ break;
}
return;
-
+
L_InProgress:
mesn;
mesq l("Please help my wards!");
+ if (getq(TulimsharQuest_Hasan) == 1) goto L_Hasan;
return;
L_Reward:
@@ -75,8 +80,8 @@
next;
- speech S_LAST_NEXT,
- l("Wait a minute..."),
+ speech 0x0,
+ l("Wait a minute..."),
l("The Tulimshar guards needs an freelance employee who would help us in our work. We are searching for people as you."),
l("Take this badge, so you can get access to the guard house. You will find more work there. Bye, and good luck!");
return;
@@ -84,6 +89,24 @@
L_QuestDone:
mesn;
mesq l("Thank you for your help.");
+ if (getq(TulimsharQuest_Hasan) == 1) goto L_Hasan;
+ return;
+
+ L_Hasan:
+ select
+ rif(getq(TulimsharQuest_Hasan) == 1, l("A guy named Hasan stole me!")),
+ menuaction(l("Quit"));
+
+ switch (@menu) {
+ case 1:
+ setq TulimsharQuest_Hasan, 2;
+ speech S_FIRST_BLANK_LINE, lg("Ah, Hasan... Sorry pal, afraid I can't do anything for you. Try talking to his mother Sorfina, she is on Mahoud's house, near the Inn.");
+ break;
+ default:
+ closedialog;
+ goodbye;
+ break;
+ }
return;
L_MKControl:
@@ -97,66 +120,80 @@ L_MKControl:
close;
L_MKSmall:
+ addmapmask "003-1", MASK_MATTACK;
+ addmapmask "004-1", MASK_MATTACK;
changemusic "003-1", "mythica.ogg";
disablenpc("Mana Stone");
$@SIEGE_TULIM=0; // factor zero
pvpon("003-1");
pvpon("004-1");
announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
- areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), 1074, 10, "Lieutenant Dausen::OnBlackScorpionDeath");
+ areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 10, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
L_MKMedium:
- changemusic "003-1", "eric matyas - ghoulish fun.ogg";
+ addmapmask "003-1", MASK_MATTACK;
+ addmapmask "004-1", MASK_MATTACK;
+ changemusic "003-1", "eric_matyas_ghouls.ogg";
disablenpc("Mana Stone");
$@SIEGE_TULIM=1; // factor one
pvpon("003-1");
pvpon("004-1");
announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
- areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), 1074, 15, "Lieutenant Dausen::OnBlackScorpionDeath");
+ areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 15, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
L_MKHuge:
+ addmapmask "003-1", MASK_MATTACK;
+ addmapmask "004-1", MASK_MATTACK;
changemusic "003-1", "misuse.ogg";
disablenpc("Mana Stone");
$@SIEGE_TULIM=5; // factor five
pvpon("003-1");
pvpon("004-1");
announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
- areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), 1074, 30, "Lieutenant Dausen::OnBlackScorpionDeath");
+ areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 30, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
+OnGuardDeath:
+ end;
+
OnBlackScorpionDeath:
- areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), 1074, 1, "Lieutenant Dausen::OnBlackScorpionDeath");
- if (rand(10000) <= 90+($@SIEGE_TULIM*10))
- getitem StrangeCoin, 1;
+ areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 1, "Lieutenant Dausen::OnBlackScorpionDeath");
+ getmapxy(.@m$,.@x,.@y,3);
+ if (rand(10000) <= 90+($@SIEGE_TULIM*100))
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
end;
OnBlackScorpion2Death:
- areamonster("003-1", 0, 0, 120, 155, l("Black Scorpion"), 1074, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("003-1", 0, 0, 120, 155, l("Black Scorpion"), BlackScorpion, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
+ getmapxy(.@m$,.@x,.@y,3);
if (rand(10000) <= 850+($@SIEGE_TULIM*100))
- getitem StrangeCoin, 1;
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
end;
OnGreenSlimeDeath:
areamonster("003-1", 0, 0, 120, 155, l("Green Slime"), 1085, 1, "Lieutenant Dausen::OnGreenSlimeDeath");
+ getmapxy(.@m$,.@x,.@y,3);
if (rand(10000) <= 200+($@SIEGE_TULIM*100))
- getitem StrangeCoin, 1;
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
end;
OnCandiedSlimeDeath:
areamonster("003-1", 0, 0, 120, 155, l("Candied Slime"), 1089, 1, "Lieutenant Dausen::OnCandiedSlimeDeath");
+ getmapxy(.@m$,.@x,.@y,3);
if (rand(10000) <= 150+($@SIEGE_TULIM*100))
- getitem StrangeCoin, 1;
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
end;
OnManaGhostDeath:
areamonster("003-1", 0, 0, 120, 155, l("Mana Ghost"), 1068, 1, "Lieutenant Dausen::OnManaGhostDeath");
+ getmapxy(.@m$,.@x,.@y,3);
if (rand(10000) <= 900+($@SIEGE_TULIM*100))
- getitem StrangeCoin, 1;
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
end;
OnLieutenantDeath:
@@ -173,8 +210,8 @@ OnColonelDeath:
end;
OnTimer5000:
- areamonster("004-1", 0, 0, 79, 81, "Black Scorpion", 1074, 5+$@SIEGE_TULIM, "Lieutenant Dausen::OnBlackScorpionDeath");
- areamonster("003-1", 0, 0, 120, 155, "Black Scorpion", 1074, 5+$@SIEGE_TULIM, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("004-1", 0, 0, 79, 81, "Black Scorpion", BlackScorpion, 5+$@SIEGE_TULIM, "Lieutenant Dausen::OnBlackScorpionDeath");
+ areamonster("003-1", 0, 0, 120, 155, "Black Scorpion", BlackScorpion, 5+$@SIEGE_TULIM, "Lieutenant Dausen::OnBlackScorpion2Death");
mapannounce("003-1", "##2Message to all Tulimshar NPCs: Take shelter!", bc_map);
disablenpc "Ched";
disablenpc "Aahna";
@@ -198,11 +235,46 @@ OnTimer5000:
disablenpc "Tamiloc";
disablenpc "Tinris";
disablenpc "#water_animation0";
+ disablenpc "Sailors#003-1";
+ disablenpc "Guard Philip";
+ disablenpc "Guard Defou";
+ disablenpc "Guard Avou";
+ disablenpc "Guard Benji";
+ disablenpc "Guard Valou";
+ disablenpc "Guard Nutelo";
+ disablenpc "Guard Moustacha";
+ disablenpc "Guard Popaul";
+ disablenpc "Guard Yen";
+ disablenpc "Guard Maxim";
+ disablenpc "Guard Totor";
+ disablenpc "Guard Roukin";
+ disablenpc "Guard Falko";
+ disablenpc "Guard Froma";
+ disablenpc "Guard Tetric";
+ disablenpc "Guard Biscop";
+
+ // Create guards
+ monster("003-1", 98, 100, ("Guard Philip"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 98, 121, ("Guard Defou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1",102, 121, ("Guard Avou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 58, 158, ("Guard Benji"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 62, 158, ("Guard Valou"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 71, 138, ("Guard Nutelo"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 58, 128, ("Guard Moustacha"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 58, 100, ("Guard Popaul"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 51, 73, ("Guard Yen"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 54, 52, ("Guard Maxim"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 50, 36, ("Guard Totor"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 53, 36, ("Guard Roukin"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1", 35, 34, ("Guard Falko"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1",111, 101, ("Guard Froma"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1",102, 80, ("Guard Tetric"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
+ monster("003-1",107, 80, ("Guard Biscop"), FallenGuard3, 1, "Lieutenant Dausen::OnGuardDeath", Size_Medium, 1);
end;
OnTimer15000:
- areamonster("004-1", 0, 0, 79, 81, ("Black Scorpion"), 1074, 5, "Lieutenant Dausen::OnBlackScorpionDeath");
- areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 10, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("004-1", 0, 0, 79, 81, ("Black Scorpion"), BlackScorpion, 5, "Lieutenant Dausen::OnBlackScorpionDeath");
+ areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), BlackScorpion, 10, "Lieutenant Dausen::OnBlackScorpion2Death");
disablenpc "Aidan";
disablenpc "Inar";
disablenpc "Malivox";
@@ -219,7 +291,7 @@ OnTimer60000:
mapannounce("003-1", "##1The Monster Lieutenant arrived!", bc_map);
areamonster("003-1", 0, 0, 120, 155, ("Monster Lieutenant"), 1077, 1, "Lieutenant Dausen::OnLieutenantDeath");
}
- areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 3, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), BlackScorpion, 3, "Lieutenant Dausen::OnBlackScorpion2Death");
areamonster("003-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10+$@SIEGE_TULIM, "Lieutenant Dausen::OnGreenSlimeDeath");
areamonster("003-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 1+$@SIEGE_TULIM, "Lieutenant Dausen::OnCandiedSlimeDeath");
end;
@@ -230,21 +302,21 @@ OnTimer120000:
areamonster("003-1", 0, 0, 120, 155, ("Monster Colonel"), 1036, 1, "Lieutenant Dausen::OnColonelDeath");
}
areamonster("003-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 15);
- areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), BlackScorpion, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
areamonster("003-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10, "Lieutenant Dausen::OnGreenSlimeDeath");
areamonster("003-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Dausen::OnManaGhostDeath");
end;
OnTimer180000:
areamonster("003-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
- areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), BlackScorpion, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
areamonster("003-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 10, "Lieutenant Dausen::OnCandiedSlimeDeath");
areamonster("003-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Dausen::OnManaGhostDeath");
end;
OnTimer240000:
areamonster("003-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
- areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
+ areamonster("003-1", 0, 0, 120, 155, ("Black Scorpion"), BlackScorpion, 1, "Lieutenant Dausen::OnBlackScorpion2Death");
areamonster("003-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Dausen::OnManaGhostDeath");
end;
@@ -272,12 +344,15 @@ OnTimer600000:
end;
OnTimer630000:
- changemusic "003-1", "bartk - the adventure begins.ogg"; // Restore to default
+ removemapmask "003-1", MASK_MATTACK;
+ removemapmask "004-1", MASK_MATTACK;
+ changemusic "003-1", "bartk_adventure.ogg"; // Restore to default
enablenpc("Mana Stone");
$@SIEGE_TULIM$=0;
killmonsterall("003-1", 0);
killmonsterall("004-1", 0);
pvpoff("003-1");
+ pvpoff("004-1");
announce(("Tulimshar siege is over!"), bc_all);
enablenpc "Ched";
enablenpc "Aahna";
@@ -310,6 +385,23 @@ OnTimer630000:
enablenpc "Estard";
enablenpc "Malindou";
enablenpc "Jhedia";
+ enablenpc "Sailors#003-1";
+ enablenpc "Guard Philip";
+ enablenpc "Guard Defou";
+ enablenpc "Guard Avou";
+ enablenpc "Guard Benji";
+ enablenpc "Guard Valou";
+ enablenpc "Guard Nutelo";
+ enablenpc "Guard Moustacha";
+ enablenpc "Guard Popaul";
+ enablenpc "Guard Yen";
+ enablenpc "Guard Maxim";
+ enablenpc "Guard Totor";
+ enablenpc "Guard Roukin";
+ enablenpc "Guard Falko";
+ enablenpc "Guard Froma";
+ enablenpc "Guard Tetric";
+ enablenpc "Guard Biscop";
stopnpctimer;
end;
@@ -373,12 +465,11 @@ function script GuardsGratitude {
break;
}
+ // TODO: Maybe we should see the guard gender too, and if it's matching, pat. Otherwise, air kiss.
if (Sex == SEX_FEMALE)
{
.@narrator_message$ = l("The Guard sends an air kiss to you.");
- }
- else
- {
+ } else {
.@narrator_message$ = l("The Guard patted you on the back.");
}
@@ -402,10 +493,8 @@ function script CheckGuard {
mesn;
mesq l("Thanks for help! Other guards may need help too!");
close;
- }
- else
- {
- while (.@count_tmp < 18)
+ } else {
+ while (.@count_tmp < 18)
{
if (GUARDS_DONE_BITARRAY & $@GuardBits[.@count_tmp])
.@guard_count = (.@guard_count + 1);
@@ -413,28 +502,25 @@ function script CheckGuard {
.@count_tmp = (.@count_tmp + 1);
}
- if ( 0 == countitem(BottleOfTonoriWater) )
- {
+ if ( countitem(BottleOfTonoriWater) == 0 ) {
legiontalk;
- }
- else
- {
+ } else {
delitem BottleOfTonoriWater, 1;
getitem EmptyBottle, 1;
- getexp 30, 0;
- Zeny = (Zeny + 50);
+ getexp 32, 2;
+ Zeny = (Zeny + 30);
GUARDS_DONE_BITARRAY = GUARDS_DONE_BITARRAY | $@GuardBits[.@guard_id];
+ setq2 TulimsharQuest_WaterForGuard, .@guard_count; // Update questlog
- if (.@guard_count >= 17)
- {
+ if (.@guard_count >= 17) {
message strcharinfo(0), "That must have been the last guard.";
setq TulimsharQuest_WaterForGuard, 2;
}
GuardsGratitude();
- narrator("You receive 30 exp and 50 GP.");
+ narrator(l("You receive 32 exp and 30 GP."));
close;
}
}
@@ -444,8 +530,7 @@ function script CheckGuard {
// Handle Guard's logic
function script GuardHandler {
- if (getq(TulimsharQuest_WaterForGuard) == 1)
- {
+ if (getq(TulimsharQuest_WaterForGuard) == 1) {
CheckGuard(getarg(0));
} else {
legiontalk;
@@ -456,9 +541,9 @@ function script GuardHandler {
003-1,98,100,0 script Guard Philip NPC_GUARD1,{
GuardHandler(0);
-
+
end;
-
+
OnTimer1000:
domovestep;
@@ -477,7 +562,7 @@ OnInit:
initpath "move", 98, 104,
"dir", DOWN, 0,
- "wait", 60, 0,
+ "wait", 60, 0,
"move", 84, 100,
"dir", DOWN, 0,
"wait", 45, 0,
@@ -492,14 +577,14 @@ OnInit:
"wait", 68, 0,
"move", 93, 110,
"dir", DOWN, 0,
- "wait", 90, 0,
+ "wait", 90, 0,
"move", 111, 109,
"dir", DOWN, 0,
"wait", 11, 0;
initialmove;
initnpctimer;
.distance = 5;
-
+
setarray $@GuardBits, 1, (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9), (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15), (1 << 16), (1 << 17);
}
003-1,98,121,0 script Guard Defou NPC_GUARD1,{
@@ -553,20 +638,20 @@ OnInit:
003-1,58,100,0 script Guard Popaul NPC_GUARD1,{
GuardHandler(7);
end;
-
+
OnTimer1000:
domovestep;
OnInit:
initpath "move", 58, 100,
"dir", DOWN, 0,
- "wait", 100, 0,
+ "wait", 100, 0,
"move", 62, 100,
"dir", DOWN, 0,
"wait", 35, 0,
"move", 62, 93,
"dir", DOWN, 0,
- "wait", 48, 0,
+ "wait", 48, 0,
"move", 58, 104,
"dir", DOWN, 0,
"wait", 55, 0,
@@ -602,14 +687,14 @@ OnInit:
003-1,54,52,0 script Guard Maxim NPC_GUARD1,{
GuardHandler(10);
end;
-
+
OnTimer1000:
domovestep;
OnInit:
initpath "move", 54, 52,
"dir", DOWN, 0,
- "wait", 85, 0,
+ "wait", 85, 0,
"move", 54, 45,
"dir", DOWN, 0,
"wait", 70, 0,
@@ -624,10 +709,10 @@ OnInit:
"wait", 6, 0,
"move", 35, 36,
"dir", UP, 0,
- "wait", 9, 0,
+ "wait", 9, 0,
"move", 49, 52,
"dir", DOWN, 0,
- "wait", 70, 0;
+ "wait", 70, 0;
initialmove;
initnpctimer;
.distance = 5;
@@ -636,7 +721,7 @@ OnInit:
003-1,50,36,0 script Guard Totor NPC_GUARD1,{
GuardHandler(11);
end;
-
+
OnTimer1000:
domovestep;
@@ -646,13 +731,13 @@ OnInit:
"wait", 45, 0,
"move", 50, 39,
"dir", DOWN, 0,
- "wait", 35, 0,
+ "wait", 35, 0,
"move", 35, 40,
"dir", UP, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 33, 34,
"dir", DOWN, 0,
- "wait", 12, 0;
+ "wait", 12, 0;
initialmove;
initnpctimer;
.distance = 5;
@@ -660,35 +745,35 @@ OnInit:
003-1,53,36,0 script Guard Roukin NPC_GUARD1,{
GuardHandler(12);
end;
-
+
OnTimer1000:
domovestep;
OnInit:
initpath "move", 53, 36,
"dir", DOWN, 0,
- "wait", 60, 0,
+ "wait", 60, 0,
"move", 56, 59,
"dir", DOWN, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 61, 76,
"dir", RIGHT, 0,
"wait", 5, 0,
"move", 61, 105,
"dir", RIGHT, 0,
- "wait", 8, 0,
+ "wait", 8, 0,
"move", 59, 129,
"dir", LEFT, 0,
- "wait", 4, 0,
+ "wait", 4, 0,
"move", 60, 103,
"dir", UP, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 56, 82,
"dir", LEFT, 0,
- "wait", 7, 0,
+ "wait", 7, 0,
"move", 56, 59,
"dir", UP, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 53, 39,
"dir", DOWN, 0,
"wait", 25, 0;
@@ -699,17 +784,17 @@ OnInit:
003-1,35,34,0 script Guard Falko NPC_GUARD1,{
GuardHandler(13);
end;
-
+
OnTimer1000:
domovestep;
OnInit:
initpath "move", 35, 34,
"dir", DOWN, 0,
- "wait", 60, 0,
+ "wait", 60, 0,
"move", 51, 38,
"dir", DOWN, 0,
- "wait", 10, 0;
+ "wait", 10, 0;
initialmove;
initnpctimer;
.distance = 5;
@@ -733,14 +818,14 @@ OnInit:
003-1,102,80,0 script Guard Tetric NPC_GUARD1,{
GuardHandler(16);
end;
-
+
OnTimer1000:
domovestep;
OnInit:
initpath "move", 110, 84,
"dir", RIGHT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 110, 101,
"dir", RIGHT, 0,
"wait", 0, 0,
@@ -752,28 +837,28 @@ OnInit:
"wait", 1, 0,
"move", 65, 152,
"dir", DOWN, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 71, 139,
"dir", RIGHT, 0,
"wait", 1, 0,
"move", 59, 128,
"dir", LEFT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 47, 79,
"dir", LEFT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 80, 73,
"dir", RIGHT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 53, 52,
"dir", RIGHT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 52, 37,
"dir", RIGHT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 35, 35,
"dir", RIGHT, 0,
- "wait", 1, 0,
+ "wait", 1, 0,
"move", 62, 105,
"dir", DOWN, 0,
"wait", 1, 0;
diff --git a/npc/003-1/magic.txt b/npc/003-1/magic.txt
new file mode 100644
index 000000000..826901fe3
--- /dev/null
+++ b/npc/003-1/magic.txt
@@ -0,0 +1,18 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Controlled Warp to Magic School (+whatever magic stuff we need to add later)
+
+003-1,34,33,0 script #MagicSchoolGate1 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ if (countitem(JesusalvaGrimorium) <= 0 || MAGIC_LVL < 2) {
+ slide 36, 39;
+ percentheal -5, -10;
+ dispbottom l("Powerful magic repels you away from this magic place!");
+ } else {
+ warp "003-0", 48, 51;
+ }
+ end;
+}
diff --git a/npc/003-1/mahoud.txt b/npc/003-1/mahoud.txt
index 36885dac5..73d97dcb4 100644
--- a/npc/003-1/mahoud.txt
+++ b/npc/003-1/mahoud.txt
@@ -6,16 +6,14 @@
// Mahoud is the Tulimshar Well Master
003-1,46,79,0 script Mahoud NPC_PLAYER,{
-
- .@COST_PER_BOTTLE = 50;
-
- mes l("I can fill your bottle with water for only @@ gp the bottle.", .@COST_PER_BOTTLE);
+ mesn;
+ mes l("I can fill your bottle with water for only @@ gp the bottle.", .COST_PER_BOTTLE);
mes l("After all, I am the Well Master!");
input .@count;
if (.@count == 0)
close;
- .@Cost = .@count * .@COST_PER_BOTTLE;
+ .@Cost = .@count * .COST_PER_BOTTLE;
.@empty = countitem("EmptyBottle");
if (.@empty < .@count)
@@ -23,29 +21,27 @@
if (Zeny < .@Cost)
goto L_NotEnoughMoney;
getinventorylist;
- if (@inventorylist_count == 100
- && countitem("BottleOfSeaWater") == 0
- && .@empty > .@count)
- goto L_NotEnoughSlots;
+ inventoryplace BottleOfTonoriWater, .@count;
- set Zeny, Zeny - .@Cost;
+ Zeny=Zeny-.@Cost;
delitem "EmptyBottle", .@count;
getitem "BottleOfTonoriWater", .@count;
close;
L_NotEnoughBottles:
+ mes "";
+ mesn;
mes l("You don't have that many empty bottles!");
close;
L_NotEnoughMoney:
- mes l("You don't have enough gp! You need @@ gp.", .@Cost);
- close;
-
-L_NotEnoughSlots:
- mes l("You don't have room for these bottles!");
+ mes "";
+ mesn;
+ mes l("You don't have enough gold! You need @@ gp.", .@Cost);
close;
OnInit:
+ .COST_PER_BOTTLE = 50;
.sex = G_MALE;
.distance = 7;
diff --git a/npc/003-1/malivox.txt b/npc/003-1/malivox.txt
index a893d8d57..95bc0981a 100644
--- a/npc/003-1/malivox.txt
+++ b/npc/003-1/malivox.txt
@@ -9,10 +9,13 @@
L_Menu:
if (BaseLevel < 10)
.@plush_count = (BaseLevel*5)+5;
- else
+ else
.@plush_count = BaseLevel*190-(9*190);
// Lv 9: 50 GP | Lv 10: 190 GP
+ if (BaseLevel > 10)
+ .@plush_count = .@plush_count/(BaseLevel/10);
+
select
l("Can you reset my stats please?"),
lg("You are weird, I have to go sorry.");
diff --git a/npc/003-1/mapflags.txt b/npc/003-1/mapflags.txt
index 62640b087..03aac03d6 100644
--- a/npc/003-1/mapflags.txt
+++ b/npc/003-1/mapflags.txt
@@ -1,2 +1,3 @@
+003-1 mapflag mask 1
003-1 mapflag town
003-1 mapflag nopenalty
diff --git a/npc/003-1/neko.txt b/npc/003-1/neko.txt
index 591cb59d0..74aed3597 100644
--- a/npc/003-1/neko.txt
+++ b/npc/003-1/neko.txt
@@ -1,13 +1,58 @@
// TMW-2 Script
// Author:
// Saulc
+// Jesusalva
// Description:
-// Another shopkeeper
+// Another shopkeeper which babbles about Jean Shorts, how Cave Snake drops them
+// and encourage players to find it. He pays 6.000 GP and gives 1620 xp for one.
+// In future, this could grant you discounts on his shop, or allow a quest with
+// a family member from his.
-003-1,103,106,0 script Neko NPC_PLAYER,{
+003-1,103,106,0 script Neko NPC_M_SHOPKEEPER,{
+ .@q=getq(TulimsharQuest_Neko);
+ mesn;
+ mesq l("Only finest wares!");
+ mes "";
+ select
+ l("Trade"),
+ rif(BaseLevel > 20 && .@q == 0, l("Why do you only use the silk robe? Don't you have a shorts or something?")),
+ rif(.@q == 1 && countitem(JeansShorts) >= 1, l("Hey... I found a Jeans Shorts. Is it yours?")),
+ l("Leave");
-hello;
+ if (@menu == 2) {
+ mesn;
+ mesq l("Oh, that's a long story.");
+ next;
+ mesn;
+ mesq l("You see, I was walking on the secret caves near Ched, and... well...");
+ next;
+ mesn;
+ mesq l("The @@ stole my @@. Hahah. I can't find anywhere else to buy it.", getmonsterlink(CaveSnake), getitemlink(JeansShorts));
+ next;
+ setq TulimsharQuest_Neko, 1;
+ mesn;
+ mesq l("If you bring friends, I'm sure they'll be no match. Ah... How many people already lost their shorts to Cave Snakes?");
+ next;
+ }
+ if (@menu == 3) {
+ getexp rand(120,200), 0;
+ setq TulimsharQuest_Neko, 2;
+ mesn;
+ mesq l("Oh... Wow! I'm surprised.");
+ next;
+ mesn;
+ mesq l("Please, keep it. I don't need it at all!");
+ next;
+ mesn;
+ mesq l("This silk robe is more than enough, and you are fighting, you need the def bonus more than me. %%2");
+ next;
+ }
+ closedialog;
+ if (@menu == 1)
+ shop .name$;
+ goodbye;
+ close;
OnInit:
.@npcId = getnpcid(0, .name$);
@@ -18,7 +63,23 @@ OnInit:
setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
setunitdata(.@npcId, UDT_HAIRCOLOR, 2);
+ tradertype(NST_MARKET);
+ sellitem LeatherShirt, 120000, 1;
+ sellitem ShortTankTop, 80000, 1;
+ sellitem TrainingBow, 990, 2;
+ sellitem Arrow, -1, rand(10000,30000);
+ sellitem CroconutBox, rand(2650,3000), 4;
+
.sex = G_MALE;
.distance = 5;
end;
+
+OnClock2359:
+ restoreshopitem LeatherShirt, 120000, 1;
+ restoreshopitem TrainingBow, 990, 2;
+ restoreshopitem ShortTankTop, 80000, 1;
+ restoreshopitem Arrow, -1, rand(10000,30000);
+ restoreshopitem CroconutBox, rand(2650,3000), 4;
+ end;
+
}
diff --git a/npc/003-1/ninathetraveler.txt b/npc/003-1/ninathetraveler.txt
index 3a9ef7dd3..83fca7270 100644
--- a/npc/003-1/ninathetraveler.txt
+++ b/npc/003-1/ninathetraveler.txt
@@ -20,10 +20,7 @@ L_Menu:
l("I want to trade with you."), L_Trade,
l("Tell me about Tulimshar."), L_Tulim,
l("Tell me about Hurnscald."), L_Hurns,
- l("Tell me about Nivalis."), L_Nival,
- l("Tell me about Esperia."), L_Esper,
l("Tell me about Artis."), L_Artis,
- l("Tell me about Frostia."), L_Frost,
l("Tell me about Halinarzo."), L_Halin,
l("Sorry, I'll pass."), L_Close;
@@ -53,33 +50,6 @@ L_Hurns:
next;
goto L_Menu;
-L_Nival:
- mes "";
- mesn;
- mesq l("Nivalis was the last human settlement built during the First Era.");
- next;
- mesq l("It's cold, harsh climate makes difficult to live there. It was founded by people thrown away from Tulimshar and Hunrscald for political reasons.");
- next;
- mesq l("The cold climate is ideal for slimes, penguins, and other icy creatures. You can find lots of... ice, of course!");
- next;
- mesq l("Some items are only produced in Nivalis. After all, it is hard to work properly with ice in a desert!");
- next;
- goto L_Menu;
-
-
-L_Esper:
- mes "";
- mesn;
- mesq l("Esperia is the human capital founded at the other continent.");
- next;
- mesq l("After the Great Famine which happened after the Red Queen death, it was founded by people who sailed away in look of new opportunities.");
- next;
- mesq l("It offers better living conditions than Tulimshar, and is bigger and more prosperous. Few monsters live there.");
- next;
- mesq l("However, taxes there are the highest. Living cost is high, and you should avoid buying things there.");
- next;
- goto L_Menu;
-
L_Artis:
mes "";
mesn;
@@ -93,20 +63,6 @@ L_Artis:
next;
goto L_Menu;
-
-L_Frost:
- mes "";
- mesn;
- mesq l("Frostia is the only city known that was not founded by humans.");
- next;
- mesq l("They are strict with who is allowed inside, so you'll need either elf or ukar friends to pass.");
- next;
- mesq l("It is on a huge, icy mountain peak. Rumors about dragons and legendary items to be found.");
- next;
- mesq l("Some of finest elven craftmanship can be found there, like bows, for example.");
- next;
- goto L_Menu;
-
L_Halin:
mes "";
mesn;
diff --git a/npc/003-1/oldwell.txt b/npc/003-1/oldwell.txt
new file mode 100644
index 000000000..fb7daf458
--- /dev/null
+++ b/npc/003-1/oldwell.txt
@@ -0,0 +1,37 @@
+// TMW-2 Script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Free well that give sewer water. a good place for tulim kids to miss school :b
+
+003-1,53,144,0 script Old Well#003-1 NPC_NO_SPRITE,{
+
+ mesc l("You found an old well with a bucket on it! It's time to fill plenty of @@!", getitemlink(EmptyBottle));
+ input .@count;
+
+ if (.@count == 0)
+ close;
+ .@empty = countitem(EmptyBottle);
+
+ if (.@empty < .@count)
+ goto L_NotEnoughBottles;
+ getinventorylist;
+ inventoryplace BottleOfSewerWater, .@count;
+
+ delitem EmptyBottle, .@count;
+ getitem "BottleOfSewerWater", .@count;
+ dispbottom("Eek, Sewer Water! What the?! Better not drink this!");
+ close;
+
+L_NotEnoughBottles:
+ mesc l("You don't have that many empty bottles!");
+ close;
+
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt
new file mode 100644
index 000000000..d2e5019ec
--- /dev/null
+++ b/npc/003-1/quirino.txt
@@ -0,0 +1,150 @@
+// TMW2 Script
+// Author:
+// Ernando <ernando.quirino@hotmail.com> (Creator)
+// Jesusalva <admin@tmw2.org>
+// Description:
+// Hunger Games™ version for The Mana World Brazil v2, created by Ernando Quirino.
+// Entrance to Hungry Quirin Arena
+// Variables:
+// $@EQ_STATUS
+// 0: Register open
+// 1: Fight happening
+// 2: Event finished
+
+003-1,48,73,0 script Quirin NPC_ERNANDO,{
+ if (is_gm()) goto L_Hub;
+ if ($EVENT$ != "Hunger") goto L_NoSeason;
+ if ($@EQ_STATUS == 0)
+ goto L_Register;
+
+ hello;
+ end;
+
+L_NoSeason:
+ npctalkonce l("Heya!");
+ end;
+
+L_Register:
+ mesn;
+ mesq l("Hello player, do you want to participate on HUNGRY QUIRIN event?!");
+ next;
+ select
+ l("Yeah, sign me up!"),
+ l("No, not at the moment."),
+ l("Information");
+
+ switch (@menu) {
+ case 1:
+ goto L_SignUp;
+ case 2:
+ close;
+ case 3:
+ goto L_Info;
+ }
+
+L_Info:
+ mesn col(l("Hungry Quirin Arena Rules"), 3);
+ mesc l("1- You must not be carrying anything with you.");
+ mesc l("2- You must not use a cart. If you do, YOU WILL BE SEVERELY PENALIZED.");
+ mesc l("3- All items from the Arena are from the Arena. You won't carry any of them back with you.");
+ mesc l("4- Experience and Gold earned during this event can be kept.");
+ next;
+ mesn col(l("Hungry Quirin Arena Information"), 3);
+ mesc l("1- Survive. If you die, you will gain nothing. And people want to kill you.");
+ mesc l("2- Take everything you can find. You'll be warped without equip or healing items! Kill monsters to get some stuff too!");
+ mesc l("3- Trust nobody. There can be only one winner, and it must be you.");
+ mesc l("4- Take Care. Wildlife can kill you too. There can be traps.");
+ mesc l("5- Trust yourself. You will lose the moment you enter in panic. This arena is not for the weak-willed!");
+ next;
+ goto L_Register;
+
+L_SignUp:
+ // Player cannot be carrying anything
+ getinventorylist;
+ if(@inventorylist_count>=1) goto L_Full;
+ getcartinventorylist();
+ if(@cartinventorylist_count>=1) goto L_Full;
+
+ // Warp player
+ if (rand(1,2) == 1)
+ warp "001-8", rand(42, 57), 42;
+ else
+ warp "001-8", rand(42, 57), 57;
+
+ // Prevent further movements!
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, true);
+ //dispbottom l("Stay ready!");
+ dispbottom l("##1DON'T MOVE until the signal. Stay ready! If you move, you will desync client!");
+ close;
+
+L_Full:
+ mesn;
+ mesq l("You cannot bring anything to the arena. Please put everything on the storage.");
+ close;
+
+L_Hub:
+ mesn;
+ mesc l("Welcome to HUNGRY QUIRIN ARENA mangment panel.");
+ mesc l("Current Event: "+$EVENT$);
+ mesc l("Event stage: "+$@EQ_STATUS);
+ mes l("Current player count: @@/5 must be online.", getusers(1));
+ mes l("Current arena player count: @@ on map. (Min. 3 to begin event)", getmapusers("001-8"));
+
+ // Open event? Minimum 5 connections or GM_OVERRIDE flag.
+ if ($EVENT$ == "" && (getusers(1) >= 5 || $@GM_OVERRIDE)) {
+ next;
+ mesc l("Activate event?"), 1;
+ if (askyesno() == ASK_YES) {
+ $EVENT$="Hunger";
+ setcells "001-8", 41, 58, 41, 43, 6, "qhubN";
+ setcells "001-8", 41, 58, 56, 58, 6, "qhubS";
+ announce("##1HUNGRY QUIRIN EVENT: ##3##BRegister is now open! Talk to Quirin, on Tulimshar Guardhouse!", bc_all|bc_npc);
+ }
+ close;
+ }
+
+ // Main Control menu. Not using l() on purpose.
+
+ select
+ rif($@EQ_STATUS == 0 && (getmapusers("001-8") >= 3 || $@GM_OVERRIDE), "Start Event!"),
+ rif($@EQ_STATUS == 1, "Send wave of items and monsters!"),
+ rif($@EQ_STATUS == 0 && $@GM_OVERRIDE && is_admin(), "[DEBUG] Join Event"),
+ rif($@EQ_STATUS == 0 && $@GM_OVERRIDE && is_admin(), "[DEBUG] Join & Start Event"),
+ "I'm done.";
+
+ if (@menu == 1)
+ donpcevent("#QuirinoHUB::OnStart");
+ if (@menu == 2)
+ donpcevent("#QuirinoHUB::OnSendWave");
+ if (@menu == 3)
+ goto L_Register;
+ if (@menu == 4) {
+ addtimer 1000, "Quirin::OnDebugReg";
+ goto L_SignUp;
+ }
+
+ close;
+
+OnDebugReg:
+ donpcevent("#QuirinoHUB::OnStart");
+ end;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+
+/*
+Blockwalls TileCondition and masks for setcells
+manaplus/src/enums/resources/map/blockmask.h
+
+ WALL = 0x80, // 1000 0000 = 128
+ AIR = 0x04, // 0000 0100 = 4
+ WATER = 0x08, // 0000 1000 = 8
+ GROUND = 0x10, // 0001 0000 = 16
+ GROUNDTOP = 0x20, // 0010 0000 = 32
+ PLAYERWALL = 0x40, // 0100 0000 = 64
+ MONSTERWALL = 0x02 // 0000 0010 = 2
+*/
diff --git a/npc/003-1/sailors.txt b/npc/003-1/sailors.txt
new file mode 100644
index 000000000..2322fd427
--- /dev/null
+++ b/npc/003-1/sailors.txt
@@ -0,0 +1,103 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// The major reward from this one is knowledge about secret passages on Tulimshar.
+// The quest pays what you spend, except for travel fees. The real reward here
+// is knowledge, the fishing rod you'll need to make anyway, 150 XP and 20 JExp.
+
+003-1,112,93,0 script Sailors#003-1 NPC_ELVEN_MAN_TRADER_SITTING,{
+ if (BaseLevel < 15) goto L_Complete;
+ .@q = getq(TulimsharQuest_Sailors);
+ if (.@q == 1)
+ goto L_Report;
+ if (.@q == 2)
+ goto L_Complete;
+ mesn;
+ mesq lg("Hey, pal. This spot is very good, I can see the whole town from here.");
+ next;
+ mesn;
+ mesq lg("I am a trader from Nard's ship. We actually need supplies. Help us, and I'll help you.");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("What do you need?"), L_Quest,
+ l("Maybe another time."), -;
+ close;
+
+L_Complete:
+ hello;
+ end;
+
+L_Quest:
+ mes "";
+ mesn;
+ mesq l("You're willing to help? Perfect. We need 3 @@, 4 @@ and 10 @@ for travel.", getitemlink(FishBox), getitemlink(CroconutBox), getitemlink(CottonCloth));
+ next;
+ mesn;
+ mesq l("Cotton Cloth is sold at Candor, Croconut Boxes can be bought at the market. Fish, however, is a little more tricky.");
+ next;
+ mesn;
+ mesq l("If you hug the wall, there's a secret passage somewhere there. Well, there are many secret passages at Tulimshar.");
+ next;
+ mesn;
+ mesq l("You will find a fisher, maybe he is having a good time and can sell you a few boxes. And remember to keep your eye open.");
+ setq TulimsharQuest_Sailors, 1;
+ next;
+ mesn;
+ mesq l("There are secret caves on this city. In fact, Tulimshar holds many misteries.");
+ close;
+
+L_Report:
+ mesn;
+ mes l("@@/3 @@", countitem(FishBox), getitemlink(FishBox));
+ mes l("@@/4 @@", countitem(CroconutBox), getitemlink(CroconutBox));
+ mes l("@@/10 @@", countitem(CottonCloth), getitemlink(CottonCloth));
+ if (countitem(FishBox) < 3 ||
+ countitem(CroconutBox) < 4 ||
+ countitem(CottonCloth) < 10)
+ close;
+ next;
+ select
+ l("[Deliver all goods.]"),
+ l("[Maybe another time.]");
+ mes "";
+ if (@menu == 2)
+ close;
+ if (countitem(FishBox) < 3 ||
+ countitem(CroconutBox) < 4 ||
+ countitem(CottonCloth) < 10) {
+ mesn;
+ mesq l("Liar. Where are the goods? Are you trying to cheat me?!");
+ next;
+ mesn;
+ mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff...");
+ next;
+ mesn;
+ mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds.");
+ next;
+ mesn;
+ mesq l("That's just a friendly advise. That's how things works around here.");
+ close;
+ }
+ inventoryplace SharpKnife, 1, CottonShirt, 1;
+ delitem FishBox, 3; // 7.500 GP
+ delitem CroconutBox, 4; // 12.000 GP → 11.200 GP
+ delitem CottonCloth, 10; // 2.000 GP
+ getexp 158, 15;
+ Zeny=Zeny+21500; // Profit: 800 GP
+ getitem SharpKnife, 1;
+ getitem CottonShirt, 1;
+ setq TulimsharQuest_Sailors, 2;
+ mesn;
+ mesq lg("Many thanks, your help has been invaluable. We're now capable to travel at ease.");
+ next;
+ mesn;
+ mesq l("Take care. Here, take this @@. You can sell it for some quick-spot cash, or use it as a weapon.", getitemlink(SharpKnife));
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 5;
+ end;
+}
diff --git a/npc/003-1/sarah.txt b/npc/003-1/sarah.txt
index ebcd1131e..4034f4fbd 100644
--- a/npc/003-1/sarah.txt
+++ b/npc/003-1/sarah.txt
@@ -1,30 +1,31 @@
+// TMW2 Script
// Author:
// Saulc
+// Description:
+// Random NPC without any purpose but to give SerfHat. Uh.
// TODO: Could be repeatable quest (eg. 60 GP for a cake every day, so you can have a 10 GP profit selling cakes)
003-1,90,144,0 script Sarah NPC_FEMALE,{
.cake = CherryCake;
.reward = SerfHat;
-
- function quest_completed{
+
+ function quest_completed {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("It was so tasty, I can't eat anything more... Thank you.");
close;
}
function quest_open {
- if (countitem(.cake) > 5)
- {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("You brought me 6 @@ ! Here is your @@, as promised.",getitemlink(.cake), getitemlink(.reward));
- delitem .cake,6;
+ if (countitem(.cake) >= 5) {
+ speech S_FIRST_BLANK_LINE,
+ l("You brought me 5 @@ ! Here is your @@, as promised.",getitemlink(.cake), getitemlink(.reward));
+ delitem .cake,5;
getitem .reward,1;
+ getexp 80, 2;
setq TulimsharQuest_Sarah, 1;
close;
- }
- else
- {
+ } else {
speech S_FIRST_BLANK_LINE,
l("Sorry, that is not the cake I love.");
close;
@@ -35,22 +36,21 @@
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Oh, Welcome then.");
speech S_LAST_NEXT,
- l("Can you bring me 6 piece of Cherry Cake? Pretty please?");
+ l("Can you bring me 5 pieces of Cherry Cake? Pretty please?");
do
{
- select
- l("Here is it!"),
- menuaction(l("Quit"));
+ select
+ l("Here they are!"),
+ menuaction(l("Quit"));
- switch (@menu)
- {
- case 1:
- quest_open;
- break;
- }
- } while (@menu != 2);
+ switch (@menu) {
+ case 1:
+ quest_open;
+ break;
+ }
+ } while (@menu != 2);
}
-
+
do
{
.@chest = getq(TulimsharQuest_Sarah);
@@ -61,8 +61,7 @@
l("Hello, I'm new here! Can I help you?")),
menuaction(l("Quit"));
- switch (@menu)
- {
+ switch (@menu) {
case 1:
quest_started;
break;
diff --git a/npc/003-1/sewer.txt b/npc/003-1/sewer.txt
new file mode 100644
index 000000000..a0fe188bf
--- /dev/null
+++ b/npc/003-1/sewer.txt
@@ -0,0 +1,35 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Notes:
+// TW: Tulimshar, West
+// TE: Tulimshar, East
+
+003-1,56,84,0 script #Sewer-TW NPC_NO_SPRITE,{
+ if (getq(TulimsharQuest_Sewers) == 0) end;
+ if (BaseLevel < 25) end;
+
+ mesc l("Descend into Tulimshar sewers?");
+ if (askyesno() == ASK_YES) {
+ closedialog;
+ warp "003-1-1", 57, 100;
+ dispbottom l("Blame Saulc.");
+ end;
+ }
+ close;
+}
+
+003-1,115,111,0 script #Sewer-TE NPC_NO_SPRITE,{
+ if (getq(TulimsharQuest_Sewers) == 0) end;
+ if (BaseLevel < 25) end;
+
+ mesc l("Descend into Tulimshar sewers?");
+ if (askyesno() == ASK_YES) {
+ closedialog;
+ warp "003-1-1", 143, 128;
+ dispbottom l("Blame Saulc.");
+ end;
+ }
+ close;
+}
+
diff --git a/npc/003-1/ship.txt b/npc/003-1/ship.txt
index 5dd5b9479..3612d702b 100644
--- a/npc/003-1/ship.txt
+++ b/npc/003-1/ship.txt
@@ -2,7 +2,7 @@
// Authors:
// Jesusalva
// Description:
-// This script controls access to Nard's Ship, fixing variables.
+// This script controls access to Ships, fixing variables.
003-1,82,68,0 script TulimShip NPC_HIDDEN,0,0,{
@@ -15,3 +15,27 @@ L_Warp:
closedialog;
close;
}
+
+003-1,120,25,0 script TulimShip#M NPC_HIDDEN,0,0,{
+
+OnTouch:
+ LOCATION$="Tulim";
+ goto L_Warp;
+
+L_Warp:
+ /* Is Hurnscald already liberated? Precendence. */
+ if (!$HURNS_LIBDATE) {
+ query_sql("SELECT online FROM `char` WHERE name='Saulc GM'", .@online);
+ if (is_gm())
+ dispbottom l("GMs are NOT allowed on Hurnscald Liberation day.");
+ else if (.@online)
+ dispbottom l("Right click on the NPC to join the Liberation Force on Hurnscald.");
+ else
+ dispbottom l("The ship is locked, probably unable to leave port.");
+ end;
+ }
+
+ warp "016-1@"+LOCATION$, 21, 26;
+ closedialog;
+ close;
+}
diff --git a/npc/003-1/shop.txt b/npc/003-1/shop.txt
index ddfedf18f..c4180337f 100644
--- a/npc/003-1/shop.txt
+++ b/npc/003-1/shop.txt
@@ -7,13 +7,13 @@
OnInit:
tradertype(NST_MARKET);
- sellitem YellowCottonDye, -1, 2;
+ sellitem YellowDye, -1, 2;
sellitem Knife, -1, 5;
sellitem Arrow, -1, 30000;
sellitem DesertHat, -1, 8;
sellitem SilkRobe, -1, 1;
sellitem Bread, -1, 15;
- sellitem CroconutBox, 3000, 6;
+ sellitem CroconutBox, rand(2800,3050), 6;
sellitem EmptyBottle, -1, 3; // You can buy some empty bottles here, but they're scarse
.sex = G_OTHER;
@@ -24,13 +24,13 @@ OnClock0621:
OnClock1210:
OnClock1757:
OnClock0000:
- restoreshopitem YellowCottonDye, -1, 2;
+ restoreshopitem YellowDye, -1, 2;
restoreshopitem Knife, -1, 5;
- restoreshopitem Arrow, -1, 30000;
+ restoreshopitem Arrow, -1, rand(10000,30000);
restoreshopitem DesertHat, -1, 8;
restoreshopitem SilkRobe, -1, 1;
restoreshopitem Bread, -1, 15;
- restoreshopitem CroconutBox, 3000, 6;
+ restoreshopitem CroconutBox, rand(2800,3050), 6;
restoreshopitem EmptyBottle, -1, 3;
}
diff --git a/npc/003-1/silvia.txt b/npc/003-1/silvia.txt
index fcb8af072..9c0166886 100644
--- a/npc/003-1/silvia.txt
+++ b/npc/003-1/silvia.txt
@@ -5,12 +5,13 @@
003-1,109,150,0 script Silvia NPC_FEMALE,{
-if (strcharinfo(0) == $MOST_HEROIC$) npctalk l("Oh my, the great @@ has come to talk to me!", $MOST_HEROIC$);
-if (getq(TulimsharQuest_Swezanne) == 4) goto L_Message;
-if (getq(TulimsharQuest_Swezanne) == 1 && getq(TulimsharQuest_Lifestone) < 2) goto L_Lifestone;
-if (getq(TulimsharQuest_Swezanne) == 2) goto L_Unallowed;
-if (strcharinfo(0) != $MOST_HEROIC$) hello;
-end;
+ if (strcharinfo(0) == $MOST_HEROIC$) npctalk l("Oh my, the great @@ has come to talk to me!", $MOST_HEROIC$);
+ if (getq(TulimsharQuest_Swezanne) == 4) goto L_Message;
+ .@q2=getq2(TulimsharQuest_Swezanne);
+ if (.@q2 < santime()) goto L_Unallowed;
+ if (getq(TulimsharQuest_Swezanne) == 1 && getq(TulimsharQuest_Lifestone) < 2) goto L_Lifestone;
+ if (strcharinfo(0) != $MOST_HEROIC$) hello;
+ end;
L_Message:
mesn strcharinfo(0);
@@ -27,7 +28,7 @@ L_Message:
next;
inventoryplace CottonGloves, 1;
getitem CottonGloves, 1;
- getexp 100,0;
+ getexp 105,0;
setq TulimsharQuest_Swezanne, 1;
mesn;
mesq l("Thank you, @@. Please take this pair of gloves as a thank you.", strcharinfo(0));
diff --git a/npc/003-1/swezanne.txt b/npc/003-1/swezanne.txt
index 12e2658b9..1268703e6 100644
--- a/npc/003-1/swezanne.txt
+++ b/npc/003-1/swezanne.txt
@@ -1,17 +1,18 @@
// TMW-2 Script
// Author:
// Jesusalva
-// TODO IMPORTANT: ON NEXT UPDATE, set everyone with Swezanne on status (1,2) to status (3)
+// Note:
+// DO NOT USE QUEST STATUS 2. Thing from past.
003-1,70,100,0 script Swezanne NPC_FEMALE,{
.@q=getq(TulimsharQuest_Swezanne);
mesn;
mesq l("Hi.");
next;
+ .@q2=getq2(TulimsharQuest_Swezanne);
if (.@q == 0) goto L_Quest;
- if (.@q == 1 && gettimetick(2) >= SWEZANNE_TIMER + 60 * 60 * 24) setq TulimsharQuest_Swezanne, 2;
- else if (.@q == 2) goto L_Repeat;
else if (.@q == 3) goto L_Silvia;
+ else if (.@q2 < santime()) goto L_Repeat;
mesq l("I fight every day in hopes to meet Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone.");
if ($MOST_HEROIC$ != "") goto L_Heroics;
close;
@@ -52,18 +53,18 @@ L_Repeat:
L_Finish2:
delitem CactusPotion, 5;
- getexp 25, 0;
- Zeny = (Zeny + 200); // 5*35 = 175 base
+ getexp 37, 0;
+ Zeny = (Zeny + 220); // 5*35 = 175 base
setq TulimsharQuest_Swezanne, 1;
- set SWEZANNE_TIMER, gettimetick(2);
+ setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24;
close;
L_Finish:
delitem CactusDrink, 5;
- getexp 60, 5; // 5 Job points! A great reward.
+ getexp 63, 4; // 4 Job points! A great reward.
Zeny = (Zeny + 150); // 5*25 = 125 base
setq TulimsharQuest_Swezanne, 3;
- set SWEZANNE_TIMER, gettimetick(2);
+ setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24;
close;
L_Silvia:
diff --git a/npc/003-1/tinris.txt b/npc/003-1/tinris.txt
index a96566818..75a30c80c 100644
--- a/npc/003-1/tinris.txt
+++ b/npc/003-1/tinris.txt
@@ -1,10 +1,27 @@
// TMW2 Script
// Author:
// Saulc
+// Jesusalva
+// Description:
+// Part of Anwar Field quest
003-1,66,30,0 script Tinris NPC_ELF,{
+ .@q=getq(TulimsharQuest_AnwarField);
+
+ // Results: 6 - nothing. 7- bug feast.
+ // On status 7, you need to talk to Eomie.
+ // Then Eomie 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.");
mesn;
mesq l("We elves have greater affinity for magic than humans.");
next;
@@ -13,6 +30,135 @@
mesq l("In the end, elves would have quite the age to rivalize with human wizards.");
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("No.");
+ close;
+
+L_Start:
+ mesn strcharinfo(0);
+ mesq l("Hello, could I help you in exchanger of fertilizer?");
+ next;
+ mesn;
+ mesq l("I like people like you, straight to the subject.");
+ next;
+ mesn;
+ mesq l("The birthday of me and my girlfriend is coming up. 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("That's very, very risky. I need 3 @@ and 10 @@ to make a Potion to you, and I won't warrant it will work.", getitemlink(Plushroom), 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) < 10)
+ goto L_Lying;
+
+ delitem Plushroom, 3;
+ delitem MaggotSlime, 10;
+ 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;
+ mesq l("Well, that could fail, I said. Here is some experience.");
+ next;
+ if (countitem(Plushroom) >= 3 &&
+ countitem(MaggotSlime) >= 10)
+ 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 Eomie. She knows how to do Bug Bombs which won't harm the plants!");
+ 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(TortugaShell) < 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(TortugaShell));
+ next;
+ setq2 TulimsharQuest_AnwarField, .@q2+1;
+ delitem TortugaShell, 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:
.@npcId = getnpcid(0, .name$);
//setunitdata(.@npcId, UDT_HEADTOP, 2929); // TODO: This NPC is an Elf and therefore, CANNOT use NPCEyes.
diff --git a/npc/003-1/well.txt b/npc/003-1/well.txt
index 926a14dac..b4e46f61b 100644
--- a/npc/003-1/well.txt
+++ b/npc/003-1/well.txt
@@ -1,10 +1,68 @@
+// TMW2 Script
// Author:
// Saulc
// Jesusalva
-003-1,45,80,0 script Well NPC_NO_SPRITE,{
+003-1,45,80,0 script Well#003-1 NPC_NO_SPRITE,{
+ if (countitem(Bucket) <= 0) {
+ mesc l("This well is too deep and you don't have a bucket.");
+ } else {
+ mesc l("Hey you have a bucket! Too bad there are, you know, HOLES on it, so you can see.");
+ mesc l("That's exactly why you can't use it to get water. Silly.");
+ }
+ if (!Zeny)
+ close;
+ next;
+ mesc l("Throw a coin?");
+ if (askyesno() != ASK_YES)
+ close;
- mes l("This well is too deep and you don't have a bucket.");
+ mes "";
+ Zeny=Zeny-1;
+ mesc l("You throw a coin on the well.");
+ next;
+
+ .@n=rand(0, 10000);
+ if (.@n <= 10) {
+ getitem StrangeCoin, 1;
+ mes l("##9Hey wait... Your coin turned on a @@!", getitemlink(StrangeCoin));
+ } else if (.@n <= 50) {
+ getitem CasinoCoins, 1;
+ mes l("##9Hey wait... Your coin turned on a @@!", getitemlink(CasinoCoins));
+ } else if (.@n <= 100) {
+ Zeny=Zeny+2;
+ mesc l("Hey wait... You found 2 GP!");
+ } else if (.@n <= 250) {
+ percentheal 100, 100;
+ mesc l("Hey wait... You're enveloped by a bright light and fully healed!");
+ } else if (.@n <= 300) {
+ getexp rand(1,BaseLevel), rand(1,BaseLevel);
+ mesc l("Hey wait... You're enveloped by a bright light and gain experience!");
+ } else if (.@n > 9900) {
+ mesc l("Hey wait... A monster!! Run for your life!!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@mobGID = monster(.@m$, .@x, .@y, "Croc", Croc, 1);
+ unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!!
+ } else if (.@n > 9850) {
+ mesc l("Hey wait... A monster!! Run for your life!!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@mobGID = monster(.@m$, .@x, .@y, "Blub", Blub, 1);
+ unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!!
+ } else if (.@n > 9800) {
+ mesc l("Hey wait... A monster!! Run for your life!!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@mobGID = monster(.@m$, .@x, .@y, "Red Scorpion", RedScorpion, 1);
+ unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!!
+ } else if (.@n > 9700) {
+ mesc l("Hey wait... A monster!! Run for your life!!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@mobGID = monster(.@m$, .@x, .@y, "Bat", Bat, 1);
+ unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Order the summoned monster to engage!!
+ } else {
+ mesc l("Nothing happens.");
+ next;
+ mesc l("What did you expected, anyway?");
+ }
close;
OnInit:
diff --git a/npc/003-10/_import.txt b/npc/003-10/_import.txt
index 357bb6e77..da6668941 100644
--- a/npc/003-10/_import.txt
+++ b/npc/003-10/_import.txt
@@ -2,3 +2,5 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-10/_warps.txt",
"npc/003-10/arnea.txt",
+"npc/003-10/guarddevoir.txt",
+"npc/003-10/slots.txt",
diff --git a/npc/003-10/arnea.txt b/npc/003-10/arnea.txt
index e7ed384dd..c9eb27819 100644
--- a/npc/003-10/arnea.txt
+++ b/npc/003-10/arnea.txt
@@ -136,6 +136,7 @@ OnInit:
.distance = 5;
//.alwaysVisible = true; // This is dumb, why Jesusalva put it here?
.price=1000;
+ npcsit;
// create hashtable
$@ARENAS = htnew();
diff --git a/npc/003-10/guarddevoir.txt b/npc/003-10/guarddevoir.txt
new file mode 100644
index 000000000..6bd05247c
--- /dev/null
+++ b/npc/003-10/guarddevoir.txt
@@ -0,0 +1,101 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Saulc
+// Description:
+// Guard ask you to clean the cave of red scorpion. bring her some red scorpion stingers to prove you do it well.
+// Variable:
+// TulimsharQuest_Devoir
+
+003-10,38,60,0 script Guard Devoir NPC_GUARD2,{
+
+ mesn;
+ mesq l("That's terrible! Monsters are piling up near city gates! We need to stop their progression.");
+ if (BaseLevel >= 25) goto L_Menu;
+ close;
+
+L_Menu:
+ mesn;
+ mesq l("Would you like to help us to protect the town from a red scorpion invasion??");
+ mes "";
+ menu
+ l("Yeah, sure! I'm brave as Simon."),L_Quest, // famous player name
+ l("Where can I find them?"),L_Where,
+ l("No, thanks."),L_Close;
+
+L_Quest:
+ mes "";
+ .@q=getq(TulimsharQuest_Devoir);
+ mesq l("Nice! I want you to kill some red scorpions, as I said!");
+ next;
+ if (.@q == 0) goto L_Continue;
+ .@q2=getq2(TulimsharQuest_Devoir) + 60 * 60 * 36;
+ if (santime() >= .@q2) goto L_Repeat; // Repats every 36 hours
+ mesn;
+ mesq l("But, it wouldn't look nice if I let you do all the killing! The other guards are working right now!");
+ next;
+ mesn;
+ mesq l("Come back in a few hours, and we can fix that!");
+ close;
+
+L_Continue:
+ mesq l("Red Scorpion breed as fast as the Ratto! With our current numbers, it's nearly impossible to take over.");
+ next;
+ mesq l("I usually ask for 7, but to prove you are going to help us in this purge, I will ask you for 14 @@! I will reward you for your bravure.", getitemlink(RedScorpionStinger));
+ mes "";
+ menu
+ rif(countitem(RedScorpionStinger) >= 14, l("Here they are, miss!")), L_Finish,
+ l("I'll get to it."), L_Close;
+ close; // double sure
+
+L_Repeat:
+ mesq l("How is your purge going? I hope you had success at it!");
+ next;
+ mesq l("Did you brought me 7 @@?", getitemlink(RedScorpionStinger));
+ mes "";
+ menu
+ rif(countitem(RedScorpionStinger) >= 7, l("Here they are miss!")), L_Finish2,
+ l("I'll get to it."), L_Close;
+ close;
+
+// First Time Only
+L_Finish:
+ delitem RedScorpionStinger, 14;
+ getexp 1703, 11; // 7 / 13.5% = 104 kills * 52 xp = 5408 xp gained from killing. (30% bonus) r4.9+ 5%
+ Zeny = (Zeny + 1372); // 70*14 = 980 base (40% bonus)
+ setq TulimsharQuest_Devoir, 1, santime();
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
+ close;
+
+// Repeat
+L_Finish2:
+ delitem RedScorpionStinger, 7;
+ getexp 993, 0; // 7 / 13.5% = 52 kills * 52 xp = 2704 xp gained from killing. (35% bonus) r4.9 +5%
+ Zeny = (Zeny + 686); // 70*7 = 490 base (40% bonus)
+ setq TulimsharQuest_Devoir, 1, santime();
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
+ close;
+
+L_Where:
+ mes "";
+ mesq l("Ah, there are lots on the miners cave.");
+ next;
+ mes l("Take care though, don't attack them when they are in group!");
+ next;
+ mes l("Good luck.");
+ goto L_Close;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/003-10/slots.txt b/npc/003-10/slots.txt
new file mode 100644
index 000000000..bed1027b0
--- /dev/null
+++ b/npc/003-10/slots.txt
@@ -0,0 +1,118 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Slot Machine for bets
+
+003-10,22,37,0 script Slot Machine#003-10a NPC_SLOTMACHINE,{
+ 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(CasinoCoins) >= 1, l("Spin!")), L_Spin,
+ l("Prizes"), L_Info,
+ l("Trade"), L_Trade,
+ l("Leave"), L_Quit;
+
+L_Info:
+ mes "";
+ mesc l("Prizes:");
+ mes l("##9 777: @@.", getitemlink(Monocle));
+ 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 CasinoCoins, 1;
+ .@a=rand(1,7);
+ .@b=rand(1,7);
+ .@c=rand(1,7);
+ symbol(.@a);
+ symbol(.@b);
+ symbol(.@c);
+ next;
+ mesn;
+ if (.@a == .@b && .@a == .@c && .@a == 7) {
+ getitem Monocle, 1;
+ mesc l("Jackpot! You got the Monocle!"), 3;
+ } else if (.@a == .@b && .@a == .@c) {
+ getitem CasinoCoins, 18;
+ mesc l("Congrats! A pity it was not 777..."), 3;
+ } else if (.@a == .@b || .@a == .@c || .@b == .@c) {
+ getitem CasinoCoins, 1;
+ mesc l("Lucky! You got the coin back!"), 3;
+ } else {
+ mesc l("It wasn't this time..."), 3;
+ }
+ next;
+ goto L_Menu;
+
+L_Trade:
+ openshop;
+ closedialog;
+ close;
+
+L_Quit:
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 4;
+ tradertype(NST_CUSTOM);
+
+ sellitem WoodenSword, 940;
+ sellitem JeansShorts, 820;
+ sellitem ElixirOfLife, 150;
+ sellitem PoisonArrow, 30;
+ sellitem StrangeCoin, 5;
+ end;
+
+OnCountFunds:
+ setcurrency(countitem(CasinoCoins));
+ end;
+
+OnPayFunds:
+ if( countitem(CasinoCoins) < @price )
+ end;
+ delitem CasinoCoins,@price;
+ purchaseok();
+ end;
+
+
+}
+
diff --git a/npc/003-2/_import.txt b/npc/003-2/_import.txt
index 00c39635c..9363412fd 100644
--- a/npc/003-2/_import.txt
+++ b/npc/003-2/_import.txt
@@ -1,6 +1,7 @@
// Map 003-2: Tulimshar Guild
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-2/_warps.txt",
+"npc/003-2/eistein.txt",
"npc/003-2/estard.txt",
"npc/003-2/lua.txt",
"npc/003-2/mapflags.txt",
diff --git a/npc/003-2/eistein.txt b/npc/003-2/eistein.txt
new file mode 100644
index 000000000..ce9f6587b
--- /dev/null
+++ b/npc/003-2/eistein.txt
@@ -0,0 +1,79 @@
+// TMW2 scripts.
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Eistein rewards players for getting level landmarks.
+
+003-2,35,34,0 script Eistein NPC_UKAR,{
+
+ // Level, Reward
+ function is_level {
+ if (BaseLevel >= getarg(0)) {
+ getitem getarg(1),1;
+ setq TulimsharQuest_Eistein, getq(TulimsharQuest_Eistein)+1;
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Congrats you passed the level cap of @@! Here is a(n) @@, you deserve it.",getarg(0), getitemlink(getarg(1)));
+ } else {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("You are level @@/@@. Keep building levels, you need them!", BaseLevel, getarg(0));
+ }
+ }
+
+
+ function quest_open {
+ .@q = getq(TulimsharQuest_Eistein);
+ switch (.@q) {
+ case 0:
+ is_level(25, BronzeGift); break;
+ case 1:
+ is_level(50, GraduationCap); break;
+ case 2:
+ is_level(75, SilverGift); break;
+ case 3:
+ is_level(100, GoldenGift); break;
+ case 4:
+ is_level(125, PrismGift); break;
+ case 5:
+ is_level(150, SupremeGift); break;
+ default:
+ mesn;
+ mesq l("Waw, you are level @@! Many congratulations. If there were people like you, ukarania wouldn't have been destroyed...", BaseLevel);
+ break;
+ }
+ }
+
+ speech S_LAST_NEXT,
+ l("Ah, welcome. Please, don't be afraid of my look, Saulc GM assigned me to here."),
+ l("I'm Eistein, survivor from Ukarania. I reward brave adventurers who kill monsters, which plague our lands."),
+ l("I'll give you a reward, in the name of Saulc, once you reach the following levels: 25, 50, 75, 100, 125 and 150.");
+ do
+ {
+ select
+ l("Interesting! can I be rewarded for my help?"),
+ l("Quit");
+
+ switch (@menu) {
+ case 1:
+ quest_open;
+ break;
+ }
+ } while (@menu != 2);
+
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
+ npcsit;
+
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/003-2/estard.txt b/npc/003-2/estard.txt
index 3b4f63ca6..b03c9e31f 100644
--- a/npc/003-2/estard.txt
+++ b/npc/003-2/estard.txt
@@ -3,7 +3,7 @@
// Jesusalva
// Description:
// Manages party and guild.
-// General_Janus
+// General_Guild
// 0 - Allows Party Creation
// 1 - Allows Guild Creation, Party is already allowed
@@ -18,21 +18,17 @@
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("If the members level difference is less than 30, and you enable exp sharing, you'll all get a bonus experience!"),
+ l("You also get access to a party chat, and there are no compromises, so it is a perfect choice for a raid."),
lg("The cost to create a party is @@ GP, are you interested?",
"The cost to create a party is @@ GP, are you interested?", .@party_price);
- if (askyesno() == 1)
- {
- if (Zeny < .@party_price)
- {
+ if (askyesno() == ASK_YES) {
+ if (Zeny < .@party_price) {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring me @@ GP.", .@party_price);
- }
- else
- {
+ } else {
Zeny = Zeny - .@party_price;
- setq General_Janus, 1;
+ setq General_Guild, 1;
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!");
@@ -52,14 +48,10 @@
l("Shall you disband your guild for whatever reason, you'll need to pay again. No refunds. No complaining."),
l("The cost to create a guild is @@ GP.", .@guild_price);
- if (askyesno() == 1)
- {
- if (Zeny < .@guild_price)
- {
+ if (askyesno() == ASK_YES) {
+ if (Zeny < .@guild_price) {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring me @@ GP or join an already existing one.", .@guild_price);
- }
- else
- {
+ } else {
inventoryplace Emperium, 1;
Zeny = Zeny - .@guild_price;
getitem Emperium, 1;
@@ -76,26 +68,29 @@
return;
}
+ function gstorage {
+ closedialog;
+ guildopenstorage();
+ close;
+ return;
+ }
mesn;
mesq lg("Welcome miss.", "Good day sir.");
+ //if (getcharid(1) > 0)
+ // mes l("You're in the \"@@\" party, I know!", getpartyname(getcharid(1)));
if (getcharid(2) > 0)
mesq l("You are part of the \"@@\" guild.", getguildname(getcharid(2)));
next;
do
{
- // Beta users by-pass check.
- if (getskilllv(NV_BASIC) > 6 && !getq(General_Janus))
- {
- setq General_Janus, 1;
- }
-
select
l("What service do you offer?"),
- rif(!getq(General_Janus), l("I would like to create a party.")),
- rif(getq(General_Janus) && getcharid(2) <= 0 && countitem(Emperium) == 0, l("I would like to create a guild.")),
+ rif(!getq(General_Guild), l("I would like to create a party.")),
+ rif(getq(General_Guild) && getcharid(2) <= 0 && countitem(Emperium) == 0, l("I would like to create a guild.")),
+ rif(getq(General_Guild) && getcharid(2) > 0, l("I would like to open Guild Storage.")),
menuaction(l("Quit"));
switch (@menu)
@@ -109,8 +104,11 @@
case 3:
create_guild;
break;
+ case 4:
+ gstorage;
+ break;
}
- } while (@menu != 4);
+ } while (@menu < 5);
closedialog;
goodbye;
diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt
index 6aac9fc5d..152d2f03d 100644
--- a/npc/003-2/lua.txt
+++ b/npc/003-2/lua.txt
@@ -20,6 +20,7 @@ L_Menu:
rif(is_gm() && #GMEVENT_T <= gettimetick(2), l("I plan in doing an event! Give me the coins!")), L_GMEvent,
rif(is_staff(), l("Tell people the name of a new hero.")), L_NewHero,
rif((getgmlevel() == 1 || is_admin()) && #T_SPONSOR <= gettimetick(2), l("I want a Sponsor Necklace.")), L_Sponsor,
+ l("I am a contributor, and I want contributor stuff."), L_Contributor,
l("What alliance?"),-;
mes "";
mesn;
@@ -106,6 +107,52 @@ L_Info:
setq General_Narrator, 2;
close;
+L_Contributor:
+ mes "";
+ .@m = htget($@CONTRIBUTORS, strtolower(strcharinfo(0)), 0);
+ if (!.@m) {
+ mesn;
+ mesq l("Ah... Sorry, your name is not on the contributor list.");
+ next;
+ mesn;
+ mesq l("You can colaborate with our project though! Just ask on #tmw2-dev, be it on Discord or IRC!");
+ close;
+ }
+ mesn;
+ mesq l("Ah, welcome @@. You have @@ Contributor Points.", strcharinfo(0), .@m);
+ mesq l("Let's see if you can pick a reward!");
+ select
+ rif(!(#CRW & 16) && .@m >= 4500, l("Delicious Cookie")),
+ rif(!(#CRW & 8) && .@m >= 2000, l("Developer Cap")),
+ rif(!(#CRW & 4) && .@m >= 500, l("Contributor Sweater")),
+ rif(!(#CRW & 2) && .@m >= 100, l("Community Shirt")),
+ rif(!(#CRW & 1) && .@m, l("5x Strange Coins")),
+ l("Which rewards are available?"),
+ l("Ok, thanks.");
+
+ mes "";
+ switch (@menu) {
+ case 1:
+ getitem "DeliciousCookie", 1; #CRW=#CRW|16 ; break;
+ case 2:
+ getitem "DEVCap", 1; #CRW=#CRW|8 ; break;
+ case 3:
+ getitem "ContributorSweater", 1; #CRW=#CRW|4 ; break;
+ case 4:
+ getitem "CommunityShirt", 1; #CRW=#CRW|2 ; break;
+ case 5:
+ getitem "StrangeCoin", 5; #CRW=#CRW|1 ; break;
+ case 6:
+ mes l("4500 - @@", getitemlink(DeliciousCookie));
+ mes l("2000 - @@", getitemlink(DEVCap));
+ mes l("500 - @@", getitemlink(ContributorSweater));
+ mes l("100 - @@", getitemlink(CommunityShirt));
+ next;
+ goto L_Contributor;
+ break;
+ }
+ close;
+
L_Close:
close;
@@ -114,7 +161,7 @@ OnInit:
setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
setunitdata(.@npcId, UDT_HEADMIDDLE, GMRobe);
setunitdata(.@npcId, UDT_HEADBOTTOM, LousyMoccasins);
- setunitdata(.@npcId, UDT_WEAPON, PiouSlayer);
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 5a90619c8..2dd89a825 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -2,155 +2,147 @@
// Author:
// Saulc
// Jesusalva
+// Notes:
+// Tulim banker, and also handles PCLogin events: CheckClientVersion, and bank
+// Take care of server updates, but instances are defined on their ships.
003-3,36,34,0 script Malindou NPC_LLOYD,{
-
-// Evol scripts.
-// Authors:
-// gumi
-// Reid
-// Description:
-// banker NPC.
-
-
- function explain_guild {
- speech S_LAST_NEXT,
- l("The guild is in charge of the commerce regularization throughout Tulimshar and its surroundings."),
- l("With the help of the town hall 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 UpdateBF {
+ .@o=getbattleflag(getarg(0));
+ setbattleflag(getarg(0), .@o+getarg(1,0));
}
- function first_visit {
- speech S_LAST_NEXT,
- l("Welcome!"),
- l("My name is Malindou, I am a representative of the Merchant Guild on Tulimshar.");
-
- 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("@@ is searching something in his book.", .name$);
- speech S_LAST_NEXT,
- l("I see."),
- lg("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 Tulimshar 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 = 15000;
- speech S_LAST_NEXT,
- l("The fee is of @@ GP. So, do you want to register?", .@price);
+ Banker(.name$, "Tulimshar", 14000);
+ close;
- 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 = 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;
- }
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
- return;
+ // Update handler (use `date +%s` for this)
+ // Current UPDATE value: Qui Jun 7 08:10:55 -03 2018
+ if ($UPDATE < 1528369855) {
+ $UPDATE=1528369855;
+ debugmes "Warning.";
+ debugmes "Warning.";
+ debugmes "Warning: This introduces a server update:";
+ debugmes "";
+ debugmes "* Please create the imported guild";
+ debugmes "";
}
-
-
- if (getq(ArtisQuests_Lloyd) == 0)
- {
- first_visit;
-
- closedialog;
- goodbye;
- close;
+ // Current UPDATE value: Dom Jun 17 21:32:45 -03 2018
+ if ($UPDATE < 1529281965) {
+ $UPDATE=1529281965;
+ debugmes "";
+ debugmes "* Please set #BankP for bankers";
+ debugmes "* Automatically creatining minimal GP reserves for Hasan Autumn's Quest";
+ debugmes "";
+ $HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12);
+ }
+ // Current UPDATE value: Dom Jun 30 22:44:46 -03 2018
+ if ($UPDATE < 1530409486) {
+ $UPDATE=1530409486;
+ debugmes "";
+ debugmes "* Clearing invalid (deleted) items";
+ debugmes "";
+ DelItemFromEveryPlayer(729);
+ }
+ // Current UPDATE value: Qui Jul 12 02:40:02 -03 2018
+ if ($UPDATE < 1531374002) {
+ $UPDATE=1531374002;
+ debugmes "";
+ debugmes "* WARNING! WARNING! WARNING!";
+ debugmes "* ITEM ID VIOLATION DETECTED!";
+ debugmes "";
+ debugmes "* ALL POLISHED EMERALDS BECOME POLISHED AMETHYSTS, AND VICE-VERSA!";
+ debugmes "* This should not have an effect ingame.";
+ debugmes "";
+ }
+ // Current UPDATE value: Qui Ago 2 13:58:17 -03 2018
+ if ($UPDATE < 1533229097) {
+ $UPDATE=1533229097;
+ debugmes "";
+ debugmes "* ERASING all victories with Fafi Dragon";
+ debugmes "";
+ query_sql("UPDATE `quest` SET `count1` = '1' WHERE `quest`.`quest_id`="+LoFQuest_Fairy+" AND `count1` = '2'");
+ query_sql("UPDATE `quest` SET `count1` = '2' WHERE `quest`.`quest_id`="+LoFQuest_Fairy+" AND `count1` = '3'");
+ DelItemFromEveryPlayer(SkullMask);
+ }
+ // Current UPDATE value: Qua Ago 8 11:04:10 -03 2018
+ if ($UPDATE < 1533737050) {
+ $UPDATE=1533737050;
+ debugmes "";
+ debugmes "* REMOVING now rare items.";
+ debugmes "";
+ DelItemFromEveryPlayer(SilverMirror);
+ }
+ // Current UPDATE value: Seg Ago 27 20:20:21 -03 2018
+ if ($UPDATE < 1535412021) {
+ $UPDATE=1535412021;
+ debugmes "";
+ debugmes "* SETUP mana stone default values.";
+ debugmes "";
+ $MANA_BINT=30;
+ $MANA_BLVL=40;
+ $MANA_JLVL=10;
}
- speech S_LAST_NEXT,
- l("Welcome to the Merchant Guild of Tulimshar."),
- l("What do you want today?");
-
- do
- {
-
- selectd
- l("I would like to store some items."),
- l("I would like to perform money transactions."),
- l("What is this guild for?"),
- l("Bye.");
- switch (@menu)
- {
- case 1:
- openstorage;
- closedialog;
- close;
- break;
- case 2:
- MerchantGuild_Bank;
- break;
- case 3:
- mes "";
- explain_guild;
- break;
- }
- if (@menu != 4)
- {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
- l("Something else?");
- }
- } while (@menu != 4);
- closedialog;
- goodbye;
- close;
-OnInit:
- .sex = G_MALE;
- .distance = 4;
+ // This mensures Contributors Credits, and changes only during updates.
+ // All names in lower case. standard: 100 points. Non-TMW2 contributors
+ // should be disregarded if they're not involved with the project.
+
+ // You may get more points for complexity, difficulty, usability, etc.
+ // You may get less points if you don't do it yourself, eg. a bug report.
+
+ // See 003-2/lua.txt for rewards
+
+ $@CONTRIBUTORS = htnew;
+ htput($@CONTRIBUTORS, "jesusalva", 15000);
+ htput($@CONTRIBUTORS, "saulc", 12500);
+ htput($@CONTRIBUTORS, "lawncable", 1600);
+ htput($@CONTRIBUTORS, "polaczka", 700);
+ htput($@CONTRIBUTORS, "crazyfefe", 641);
+ htput($@CONTRIBUTORS, "4144", 550);
+ htput($@CONTRIBUTORS, "mishana", 500); // Rather magic number based on precedents, tweak if needed.
+ htput($@CONTRIBUTORS, "soren", 450);
+ htput($@CONTRIBUTORS, "rakinorf", 400);
+ htput($@CONTRIBUTORS, "pookie", 260);
+ htput($@CONTRIBUTORS, "ayruss", 210);
+ htput($@CONTRIBUTORS, "dustman", 175);
+ htput($@CONTRIBUTORS, "acsvln", 150);
+ htput($@CONTRIBUTORS, "ichigoblack",100);
+ htput($@CONTRIBUTORS, "acsvln", 100);
+ htput($@CONTRIBUTORS, "gnulinux", 80);
+ htput($@CONTRIBUTORS, "skydragon", 75);
+ htput($@CONTRIBUTORS, "guy of lieutnant dausen", 70);
+ htput($@CONTRIBUTORS, "dustman", 50);
+ htput($@CONTRIBUTORS, "msawis", 30);
+ htput($@CONTRIBUTORS, "dragonstar", 26);
+ htput($@CONTRIBUTORS, "demure", 12);
+ htput($@CONTRIBUTORS, "xtreem", 1);
+ //htput($@CONTRIBUTORS, "", 1);
end;
OnPCLoginEvent:
checkclientversion;
- if (#MerchantBank)
- {
+ if (#MerchantBank) {
BankVault += max(0, #MerchantBank);
#MerchantBank = 0;
}
end;
+
+OnInterIfInitOnce:
+ if (getbattleflag("monster_hp_rate") > 100)
+ end;
+ // We must also apply penalty for losing Mana Fragments
+ // Forest Mana Fragment is lost: (+1% HP, +5% pop, 20s faster removal)
+ UpdateBF("monster_hp_rate",1);
+ UpdateBF("mob_count_rate",5);
+ UpdateBF("mob_remove_delay",-20000);
+ // Just copy these lines as fragments are lost
+ end;
}
diff --git a/npc/003-4-1/_import.txt b/npc/003-4-1/_import.txt
new file mode 100644
index 000000000..de17f1c1b
--- /dev/null
+++ b/npc/003-4-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 003-4-1: Forgotten Shop
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/003-4-1/_mobs.txt",
+"npc/003-4-1/_warps.txt",
diff --git a/npc/003-4-1/_mobs.txt b/npc/003-4-1/_mobs.txt
new file mode 100644
index 000000000..4066fd069
--- /dev/null
+++ b/npc/003-4-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 003-4-1: Forgotten Shop mobs
+003-4-1,35,36,6,5 monster House Maggot 1084,2,35000,300000
diff --git a/npc/003-4-1/_warps.txt b/npc/003-4-1/_warps.txt
new file mode 100644
index 000000000..52e274ed1
--- /dev/null
+++ b/npc/003-4-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 003-4-1: Forgotten Shop warps
+003-4-1,35,26,0 warp #003-4-1_35_26 1,0,003-4,38,32
diff --git a/npc/003-4/_import.txt b/npc/003-4/_import.txt
index 537bef6ea..b7ae42d87 100644
--- a/npc/003-4/_import.txt
+++ b/npc/003-4/_import.txt
@@ -1,4 +1,5 @@
// Map 003-4: Forgotten Shop
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-4/_warps.txt",
-"npc/003-4/cyndala.txt",
+"npc/003-4/sorfina.txt",
+"npc/003-4/warp.txt",
diff --git a/npc/003-4/sorfina.txt b/npc/003-4/sorfina.txt
new file mode 100644
index 000000000..99d589c4d
--- /dev/null
+++ b/npc/003-4/sorfina.txt
@@ -0,0 +1,128 @@
+// TMW2 Script.
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Sorfina is Hasan's mother.
+//
+// GETQ1 Variable Value;
+// 0 - Never stolen by Hasan
+// 1 - Already stolen by Hasan
+// 2 - Dausen pointed player to Sorfina
+// 3 - Sorfina unlocked Mahoud's Basement
+// 4 - Player killed Murderer Scorpion
+// 5 - Quest is complete
+
+003-4,39,33,0 script Sorfina NPC_FEMALE,{
+ if (getq(TulimsharQuest_Hasan) == 2) goto L_Trouble;
+ if (getq(TulimsharQuest_Hasan) == 3) goto L_Basement;
+ if (getq(TulimsharQuest_Hasan) == 4) goto L_Finished;
+ // Status 5 returns to default message
+ //if (getq(TulimsharQuest_Hasan) == 5) goto
+ mesn;
+ mesq l("Hello, darling!");
+ close;
+
+L_Trouble:
+ mesn strcharinfo(0);
+ mesq l("Your son, Hasan, has stolen me!");
+ next;
+ mesn;
+ mesq l("Oh, he has been a little rascal since his father died.");
+ mesc l("*cries*");
+ next;
+ mesn;
+ mesq l("You see, after a monster attack... My husband went to the desert, to check how things were...");
+ mesc l("*cries*");
+ next;
+ mesn;
+ mesq l("He never touched the Soul Menhir... He died... For real...");
+ mesc l("*cries*");
+ next;
+ mesn;
+ mesc l("Sorfina recomposes herself.");
+ mesq l("There is a rare kind of scorpion, the Murderer Scorpion. Very dangerous.");
+ setq TulimsharQuest_Hasan, 3, -1;
+ next;
+ goto L_Basement;
+
+L_Basement:
+ if (BaseLevel < 13) goto L_TooWeak;
+ .@q3=getq3(TulimsharQuest_Hasan);
+ if (.@q3 > santime()) goto L_Wait;
+ mesn;
+ mesq l("There's one on the basement of this house. If you kill it, Hasan will think on you as a hero and won't steal you anymore.");
+ next;
+ menu
+ l("I will kill one."), L_OpenDoors,
+ l("Maybe later."), L_Close;
+
+L_OpenDoors:
+ .@ID=getcharid(0);
+ .@MAP_NAME$="hasn@"+str(.@ID); // Max 4 chars for map name
+ .@INSTID = instance_create("003-4-1@a"+(.@ID), getcharid(3), IOT_CHAR);
+ .@instanceMapName$ = instance_attachmap("003-4-1", .@INSTID, 0, .@MAP_NAME$);
+ setq TulimsharQuest_Hasan, 3, .@INSTID, santime()+300;
+
+ // Debug
+ if (.@instanceMapName$ == "") debugmes "Error: Map 003-4-1 X failed";
+ debugmes "Created map: "+ str(.@instanceMapName$);
+
+ // You have 5 minutes to complete the quest.
+ instance_set_timeout(300, 300, .@INSTID);
+ instance_init(.@INSTID);
+
+ .@x=34;//rand(29, 45);
+ .@y=33;//rand(29, 41);
+ monster(.@MAP_NAME$, .@x, .@y, l("Murderer Scorpion"), MurdererScorpion, 1, "Sorfina::OnKillMurderer");
+ addtimer(60000, "Sorfina::OnWarn");
+
+ mesn;
+ mesq l("Just go to the basement, past this door. Good luck, @@!", strcharinfo(0));
+ close;
+
+L_Wait:
+ mesn;
+ mesq l("Good luck killing it! And don't forget to touch the Soul Menhir before you go!");
+ close;
+
+L_TooWeak:
+ mesn;
+ mesq l("You are too weak to kill one and impress him, so please, bear my son.");
+ close;
+
+L_Close:
+ close;
+
+L_Finished:
+ mesn;
+ mesq l("Please, show Hasan the claw. Just talk to him.");
+ close;
+
+OnKillMurderer:
+ setq TulimsharQuest_Hasan, 4;
+ dispbottom l("I will take a claw and show Hasan.");
+ end;
+
+OnWarn:
+ .@q3=getq3(TulimsharQuest_Hasan);
+ dispbottom l("Time left: @@ remaining", FuzzyTime(.@q3));
+ if (.@q3-gettimetick(2) > 60)
+ addtimer(60000, "Sorfina::OnWarn");
+ else if (.@q3-gettimetick(2) > 15)
+ addtimer(15000, "Sorfina::OnWarn");
+ end;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress); //TODO
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 16);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/003-4/warp.txt b/npc/003-4/warp.txt
new file mode 100644
index 000000000..df3360fff
--- /dev/null
+++ b/npc/003-4/warp.txt
@@ -0,0 +1,13 @@
+// TMW2 Scripts.
+
+003-4,38,31,0 script Mahoud Basement NPC_HIDDEN,0,0,{
+
+OnTouch:
+ if (isinstance(getq2(TulimsharQuest_Hasan)) && getq2(TulimsharQuest_Hasan) != 0)
+ warp "hasn@"+str(getcharid(0)), 34, 27;
+ else if (getq(TulimsharQuest_Hasan) > 3)
+ warp "003-4-1", 34, 27;
+ else
+ dispbottom l("This door is locked.");
+ end;
+}
diff --git a/npc/003-5/_import.txt b/npc/003-5/_import.txt
index 62309d1f9..018a08314 100644
--- a/npc/003-5/_import.txt
+++ b/npc/003-5/_import.txt
@@ -1,3 +1,4 @@
// Map 003-5: Tulimshar Jeweler
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-"npc/003-5/doors.txt",
+"npc/003-5/_warps.txt",
+"npc/003-5/jeweler.txt",
diff --git a/npc/003-5/_warps.txt b/npc/003-5/_warps.txt
new file mode 100644
index 000000000..5e4345780
--- /dev/null
+++ b/npc/003-5/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 003-5: Tulimshar Jeweler warps
+003-5,38,41,0 warp #003-5_38_41 0,0,003-1,96,145
diff --git a/npc/003-5/doors.txt b/npc/003-5/doors.txt
deleted file mode 100644
index 1b4492356..000000000
--- a/npc/003-5/doors.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-// TMW2 scripts.
-// Authors:
-// Jesusalva
-
-003-5,38,41,0 script LeaveArena NPC_HIDDEN,0,0,{
-
-OnTouch:
- if (DESTROY_ME) goto L_Warn;
-
- goto L_Warp;
-
-L_Warn:
- mesn "Narrator";
- mes col(l("You are not allowed to leave until you inform Arnea that you're done."), 1);
- close;
-
-L_Warp:
- warp "003-1", 96, 145;
- closedialog;
- close;
-}
-
diff --git a/npc/003-5/jeweler.txt b/npc/003-5/jeweler.txt
new file mode 100644
index 000000000..53c9a69e9
--- /dev/null
+++ b/npc/003-5/jeweler.txt
@@ -0,0 +1,190 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Sells and crafts jewels
+//
+// Notes:
+// Gold/Silver/Copper+Tin Ore (dropped by bifs) → Pieces or Ingot, depends on what you want to forge
+// Jeweler only works with Gold/Silver/Bronze PIECES. The Ingots are for forges.
+// Jeweler can also polish raw gemstones for a comission ($$$)
+// Polished gemstones can be inserted on rings.
+// The less precious the ring, heavier and less defense value.
+//
+// All three rings can be swapped by a Light Ring (you will lose any gemstone on them!).
+// Still pending discussion.
+
+003-5,33,37,0 script Jeweler NPC_FEMALE,{
+ mesn l("Inya, the Jeweler");
+ mesq l("Hello!");
+ goto L_Menu;
+
+L_Menu:
+ mes "";
+ mesn strcharinfo(0);
+ menu
+ l("I want to shop."), -,
+ l("I want to craft rings."), L_Craft,
+ rif(countitem(GoldenRing) >= 1 || countitem(SilverRing) >= 1, l("I want to create polished gemstones.")), L_Gemstone,
+ l("I want to remove all stuff applied to my ring!"), L_Clear,
+ l("Nothing, sorry."), L_Close;
+
+ openshop;
+ closedialog;
+ close;
+
+L_Craft:
+ mes "";
+ mesn l("Inya, the Jeweler");
+ mesq l("Of course, I actually have two options:");
+ mes l("- 5 @@, with 12000 GP, for a @@.", getitemlink(GoldPieces), getitemlink(GoldenRing));
+ mes l("- 5 @@, with 12000 GP, for a @@.", getitemlink(SilverIngot), getitemlink(SilverRing)); // TODO
+ next;
+ menu
+ rif(countitem(GoldPieces) >= 5 && Zeny >= 12000, l("Yes, deal. Gimme the gold ring.")), -,
+ rif(countitem(SilverIngot) >= 5 && Zeny >= 12000, l("Yes, deal. Gimme the silver ring.")), -,
+ l("...I'll be back later."), L_Close;
+
+ switch (@menu) {
+ case 1:
+ inventoryplace GoldenRing, 1;
+ delitem GoldPieces, 5;
+ Zeny=Zeny-12000;
+ getitem GoldenRing, 1;
+ getexp 100, 25;
+ break;
+ case 2:
+ inventoryplace SilverRing, 1;
+ delitem SilverIngot, 5; // TODO
+ Zeny=Zeny-12000;
+ getitem SilverRing, 1;
+ getexp 50, 15;
+ break;
+ }
+ mes "";
+ mesn l("Inya, the Jeweler");
+ mesq l("Here you go! Anything else?");
+ next;
+ goto L_Menu;
+
+L_Gemstone:
+ mes "";
+ mesn l("Inya, the Jeweler");
+ mesq l("Polished gemstones can be dragged and insert on rings. They'll give special stats to rings, but these gems cannot be removed easily.");
+ mesq l("I charge a service fee of 2000 GP, and two gemstones.");
+ next;
+ if (Zeny < 2000) {
+ mesn l("Inya, the Jeweler");
+ mesq lg("You clearly don't have money, so let's not bother with that right now.");
+ next;
+ goto L_Menu;
+ }
+ select
+ l("Not today, sorry."),
+ rif(countitem(Diamond) >= 2 , l("Diamond (+2 vit)")),
+ rif(countitem(Ruby) >= 2 , l("Ruby (+2 str)")),
+ rif(countitem(Emerald) >= 2 , l("Emerald (+2 luck)")),
+ rif(countitem(Sapphire) >= 2, l("Sapphire (+2 int)")),
+ rif(countitem(Topaz) >= 2 , l("Topaz (+2 agi)")),
+ rif(countitem(Amethyst) >= 2, l("Amethyst (+2 dex)"));
+
+ mes "";
+ if (@menu == 1)
+ goto L_Menu;
+
+// As usual, I don't care with cheaters, so if you somehow cheat money or gemstones, YOU WILL LOSE ALL REAGENTS. No refunds.
+ inventoryplace PolishedDiamond-2+@menu, 1;
+ delitem Diamond-2+@menu, 2;
+ Zeny=Zeny-2000;
+ getitem PolishedDiamond-2+@menu, 1;
+ getexp 800, 0;
+ goto L_Menu;
+
+
+/* TODO Special rings
+L_Pearl:
+ inventoryplace GoldenPearlRing;
+ delitem GoldenRing, 1;
+ Zeny=Zeny-1000;
+ delitem Pearl, 3;
+ getitem GoldenPearlRing, 1;
+ getexp 1000, 0;
+ goto L_Menu;
+
+L_BlackPearl:
+ inventoryplace GoldenBlackPearlRing;
+ delitem GoldenRing, 1;
+ Zeny=Zeny-1000;
+ delitem BlackPearl, 1;
+ getitem GoldenBlackPearlRing, 1;
+ getexp 1000, 0;
+ goto L_Menu;
+*/
+
+L_Clear:
+ mesn l("Inya, the Jeweler");
+ mesq l("Oh... Of course! I'll even do this for free!");
+ next;
+ mesn l("Inya, the Jeweler");
+ mesq l("Just be really, REALLY sure you want to do it. I mean, the gemstone will break.");
+ mesq l("It's not warranted you'll be able to get the powder back, either.");
+ next;
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+ .@item_index = requestitemindex();
+
+ // Check if we received an item
+ getinventorylist;
+ .@item=@inventorylist_id[.@item_index];
+
+ // Is it the one we're looking for?
+ if (.@item != GoldenRing && .@item != SilverRing) {
+ mesn;
+ mesq l("Well, that's not a ring.");
+ next;
+ goto L_Menu;
+ }
+
+ // Retrieve the gemstone ID. Must be on slot 1 (aka. 0)!
+ .@gem=getcardbyindex(.@item_index, 0);
+ // Skip bound rings. It would be stupid '-'
+ if (!checkbound(.@item)) {
+ failedremovecardsindex .@item_index, 1;
+ // No inventoryplace check here
+ // DiamondPowder = 858. PolishedDiamond = 5031
+ if (.@gem > 5000)
+ getitem .@gem-4173, 1;
+ mesn;
+ mesq l("Well... Here you go!");
+ next;
+ } else {
+ mesn;
+ mesq l("I don't work with bound items.");
+ next;
+ }
+
+ goto L_Menu;
+
+L_Close:
+ closedialog;
+ goodbye;
+ end;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 8);
+ npcsit;
+
+ .sex = G_FEMALE;
+ .distance = 5;
+
+ tradertype(NST_ZENY);
+ sellitem WeddingRing, 5000;
+ sellitem GoldenBlackPearlRing, 1000000; // I'm joking of course. Don't tell me you'll pay 1M for... this?
+ end;
+
+}
diff --git a/npc/003-6/_import.txt b/npc/003-6/_import.txt
index 111152cdb..95f40969d 100644
--- a/npc/003-6/_import.txt
+++ b/npc/003-6/_import.txt
@@ -1,3 +1,5 @@
// Map 003-6: Laundry
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-6/_warps.txt",
+"npc/003-6/cyndala.txt",
+"npc/003-6/tamiloc.txt",
diff --git a/npc/003-4/cyndala.txt b/npc/003-6/cyndala.txt
index 321c7e69b..8569c4975 100644
--- a/npc/003-4/cyndala.txt
+++ b/npc/003-6/cyndala.txt
@@ -9,7 +9,7 @@
// Authors:
// Reid
-003-4,39,33,0 script Cyndala NPC_FEMALE,{
+003-6,33,30,0 script Cyndala NPC_FEMALE,{
function explain_dyes {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
@@ -17,7 +17,7 @@
l("Seek a colorant for that material: Cotton, cashmere, leather, Lazurite..."),
l("Once you have the appropriate colorant for the item, ##bdrag the colorant##b to the material."),
l("Example:"),
- l("Drag and drop a @@ in a @@, and you will obtain a @@.", getitemlink(RedCottonDye), getitemlink(ArtisTankTop), getitemlink(ArtisTankTop, RedCottonDye)),
+ l("Drag and drop a @@ in a @@, and you will obtain a @@.", getitemlink(RedDye), getitemlink(ArtisTankTop), getitemlink(ArtisTankTop, RedDye)),
l("Dye cards are not the only thing which exist, but they are the coolest!");
}
@@ -31,8 +31,8 @@
if (@inventorylist_card1[.@item_index] != 0)
{
- if ((@inventorylist_card1[.@item_index] > YellowCottonDye) ||
- (@inventorylist_card1[.@item_index] < CrimsonCashmereDye))
+ if ((@inventorylist_card1[.@item_index] > YellowDye) ||
+ (@inventorylist_card1[.@item_index] < CrimsonDye))
{
return false;
}
@@ -113,7 +113,7 @@
mes "slot " + str(.@i) + " = " + str(getcardbyindex(.@item, .@i));
}
mes str(@inventorylist_card1[.@item]);
- mes str(YellowCottonDye);
+ mes str(YellowDye);
mes "item options:";
for (.@i = 0; .@i < 5; .@i ++)
{
@@ -134,18 +134,6 @@
close;
-
-
-
-
-
-
-
-
-
-
-
-
OnInit:
.@npcId = getnpcid(0, .name$);
setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
diff --git a/npc/003-1/tamiloc.txt b/npc/003-6/tamiloc.txt
index f6812288f..4fbea5a0e 100644
--- a/npc/003-1/tamiloc.txt
+++ b/npc/003-6/tamiloc.txt
@@ -5,9 +5,9 @@
// Reid
// Travolta
// Description:
-// For a while, the Barber will be Tamiloc, until we decide to either move it or keep it.
+// Tamiloc is the barber.
-003-1,49,43,0 script Tamiloc NPC_ELVEN_FEMALE_ARMOR_SHOP,{
+003-6,46,30,0 script Tamiloc NPC_ELVEN_FEMALE_ARMOR_SHOP,{
function setRace {
clear;
setnpcdialogtitle l("Debug - Modify Race");
diff --git a/npc/003-8/jhedia.txt b/npc/003-8/jhedia.txt
index 0f1a3b90b..4a281f10b 100644
--- a/npc/003-8/jhedia.txt
+++ b/npc/003-8/jhedia.txt
@@ -2,52 +2,111 @@
// Author:
// Crazyfefe
// Saulc
-// Note: script works, but one may argue it is not complete
+// Jesusalva
+// Description:
+// Jhedia takes care of Tulimshar forge and makes ingots
+//.@karim = getq(Karim_Quest);
003-8,28,30,0 script Jhedia NPC_ELVEN_FEMALE,{
+ goto L_Menu;
- .Item1 = IronOre; //7
- .Item2 = Coal; //11
- .GP = 8500;
- .ItemCreate = IronIngot;
+ // ingot_create( BaseItem, PrizeItem, Amount, Amount_Coal, Price )
+ function ingot_create {
+ .@basei=getarg(0);
+ .@prize=getarg(1);
+ .@oream=getarg(2);
+ .@coalm=getarg(3);
+ .@price=getarg(4);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need @@ @@, @@ @@ and @@ gp.",
+ getitemlink(.@prize), .@oream, getitemlink(.@basei), .@coalm, getitemlink(Coal), .@price);
+
+ select
+ l("Yes"),
+ menuaction(l("Quit"));
+
+ if (@menu == 2) goto L_Menu;
- function quest_create {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("How many ingots do you want to make?");
- input @amount;
+ input .@amount;
+
+ if (countitem(.@basei) >= .@amount * .@oream && countitem(Coal) >= .@amount * .@coalm && Zeny >= .@price * .@amount) {
+ inventoryplace .@prize, .@amount;
+ delitem .@basei, .@amount * .@oream;
+ delitem Coal, .@amount * .@coalm;
+ Zeny = Zeny - .@amount * .@price;
+ getitem .@prize, .@amount;
+ getexp 10, 0;
- if (countitem("Iron Ore") >= @amount * 7 && countitem("Coal") >= @amount * 11 && Zeny >= 8500 * @amount)
- {
- delitem .Item1, @amount * 7;
- delitem .Item2, @amount * 11;
- Zeny = Zeny - @amount * .GP;
- getitem .ItemCreate, @amount;
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
close;
}
+
speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
- l("You don't have enough material.");
+ l("You don't have enough material, sorry.");
close;
}
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("Hello! Do you want to craft @@? For that i will need 7 @@, 11 @@ and @@ gp.", getitemlink(.ItemCreate),getitemlink(.Item1),getitemlink(.Item2),.GP);
+L_Menu:
+ mesn;
+ mesq l("Hello! I am @@, and I take care of Tulimshar forge. I usually make ingots from various materials. So, what do you want today?", .name$);
+ next;
+ select
+ l("Iron Ingot"),
+ l("Copper Ingot"),
+ l("Tin Ingot"),
+ l("Lead Ingot"),
+ l("Titanium Ingot"),
+ l("Iridium Ingot"),
+ l("Platinum Ingot"),
+ l("Silver Ingot"),
+ l("Gold Ingot"),
+ l("Gold Pieces"),
+ l("Nothing, thanks.");
- do
- {
- .@karim = getq(Karim_Quest);
- select
- l("Yes"),
- menuaction(l("Quit"));
-
- switch (@menu)
- {
- case 1:
- quest_create;
- break;
- }
- } while (@menu != 2);
+ // ingot_create(Ore, Ingot, Nº of Ore, Nº of Coal, Price);
+ switch (@menu) {
+ case 1:
+ ingot_create(IronOre, IronIngot, 7, 11, 8400);
+ break;
+ case 2:
+ ingot_create(CopperOre, CopperIngot, 5, 10, 8500);
+ break;
+ case 3:
+ ingot_create(TinOre, TinIngot, 5, 10, 8500);
+ break;
+ case 4:
+ ingot_create(LeadOre, LeadIngot, 5, 1, 8600);
+ break;
+ case 5:
+ ingot_create(TitaniumOre, TitaniumIngot, 5, 10, 9000);
+ break;
+ case 6:
+ ingot_create(IridiumOre, IridiumIngot, 4, 10, 12000);
+ break;
+ case 7:
+ ingot_create(PlatinumOre, PlatinumIngot, 3, 10, 18500);
+ break;
+ case 8:
+ ingot_create(SilverOre, SilverIngot, 3, 8, 6500);
+ break;
+ case 9:
+ ingot_create(GoldOre, GoldIngot, 3, 10, 8500);
+ break;
+ case 10:
+ ingot_create(GoldOre, GoldPieces, 1, 20, 11000);
+ break;
+ default:
+ goto L_Close;
+ break;
+ }
+L_Close:
closedialog;
goodbye;
close;
diff --git a/npc/004-1/_import.txt b/npc/004-1/_import.txt
index a44560da1..d8897b37d 100644
--- a/npc/004-1/_import.txt
+++ b/npc/004-1/_import.txt
@@ -2,4 +2,4 @@
// 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",
-"npc/004-1/elanore.txt", \ No newline at end of file
+"npc/004-1/elanore.txt",
diff --git a/npc/004-1/_mobs.txt b/npc/004-1/_mobs.txt
index 97f55c942..aa397b90b 100644
--- a/npc/004-1/_mobs.txt
+++ b/npc/004-1/_mobs.txt
@@ -4,5 +4,4 @@
004-1,44,26,7,5 monster Croc 1006,3,35000,150000
004-1,38,77,8,21 monster Scorpion 1071,20,35000,300000
004-1,108,65,10,7 monster Giant Maggot 1031,4,35000,300000
-004-1,106,114,11,7 monster Golden Scoprion 1078,1,99000,300000
-004-1,66,74,21,8 monster Black Scorpion 1075,1,35000,300000
+004-1,106,114,11,7 monster Golden Scorpion 1078,1,99000,300000
diff --git a/npc/004-1/_warps.txt b/npc/004-1/_warps.txt
index 1c64ab80e..03cef589f 100644
--- a/npc/004-1/_warps.txt
+++ b/npc/004-1/_warps.txt
@@ -1,6 +1,7 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 004-1: Tulimshar warps
004-1,63,56,0 warp #004-1_63_56 4,0,003-1,60,156
-004-1,92,114,0 warp #004-1_92_114 0,0,007-1,85,51
-004-1,33,109,0 warp #004-1_33_109 0,0,007-1,51,36
+004-1,92,114,0 warp #004-1_92_114 0,0,007-1,90,51
+004-1,33,109,0 warp #004-1_33_109 0,0,007-1,56,36
004-1,120,95,0 warp #004-1_120_95 0,2,004-2,21,48
+004-1,49,20,0 warp #004-1_49_20 0,0,003-1-1,29,61
diff --git a/npc/004-1/anwar.txt b/npc/004-1/anwar.txt
new file mode 100644
index 000000000..64b560c85
--- /dev/null
+++ b/npc/004-1/anwar.txt
@@ -0,0 +1,222 @@
+// TMW2 Script
+// Author:
+// TMW Org.
+// Jesusalva
+// Description:
+// Part of Anwar Field quest
+
+004-1,107,67,0 script Anwar NPC_RAIJIN,{
+ .@q=getq(TulimsharQuest_AnwarField);
+ if (BaseLevel < 18) goto L_Weak;
+
+ 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;
+
+ mesn;
+ mesq l("Hi. Could you perhaps be interested in doing some small errand for me?");
+ menu
+ l("Sure!"),L_Sure,
+ l("I'm busy, sorry."),L_Close;
+
+L_Complete:
+ mesn;
+ mesq l("Thanks for saving Tulimshar from a famine. I'll be forever grateful.");
+ next;
+ mesn;
+ mesq l("Dealing with elves is too bothersome to me.");
+ close;
+
+L_AnwarField:
+ mesn;
+ mesq l("My crops! Hurry up, and talk to Eomie!!");
+ close;
+
+L_Sure:
+ mes "";
+ mesn;
+ mesq l("Great! Eomie, the girl on Tulimshar's magic academy, is an alchemist. She probably makes fertilizers.");
+ next;
+ mesn;
+ mesq l("This farm is dying due constant monster attacks, and without them, Tulimshar might face a famine.");
+ next;
+ mesn;
+ mesq l("Please, talk to her. Maybe she understands the direness of the situation and help... But you know. Elves.");
+ setq TulimsharQuest_AnwarField, 1;
+ close;
+
+L_FirstTry:
+ mesn;
+ mesq l("Good luck getting the fertilizer from Eomie! Many elves simply refuse to cooperate until it affects them directly.");
+ close;
+
+L_TryIt:
+ .@q2=getq2(TulimsharQuest_AnwarField);
+ mesn;
+ mesq l("You've brought me fertilizer! Let me see if it works...");
+ next;
+ setq2 TulimsharQuest_AnwarField, .@q2+1;
+
+ // Fail chances are 100% - 12% per attempt
+ if (rand(0,100) < 100-(.@q2*12)) {
+ setq1 TulimsharQuest_AnwarField, 6;
+ mesc l("Nothing happens.");
+ next;
+ mesn;
+ mesq l("Uh... Something should happen, right? Can you get another one?");
+ } else {
+ setq1 TulimsharQuest_AnwarField, 7;
+ mesc l("Evil worms crawl from earth and starts devouring the plants!");
+ 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:
+ mesn strcharinfo(0);
+ mesq l("Here is the bug bomb! Eomie just gave me. Hurry up!");
+ next;
+ 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 @@. Please deliver it to them. I hope they'll like it.", getitemlink(TortugaShell));
+ setq TulimsharQuest_AnwarField, 10, 0;
+ getitembound(TortugaShell, 2, 4); // Prevent accidental item loss
+ close;
+
+L_SecondReward:
+ .@q2=getq2(TulimsharQuest_AnwarField);
+ if (.@q2 < 3){
+ mesn;
+ mesq l("Please deliver the two @@ to Tinris and Eomie, and then I'll give you something for your help.", getitemlink(TortugaShell));
+ close;
+ }
+ setq TulimsharQuest_AnwarField, 11, 0;
+ getitem2(FarmerPants, 1, 1, 0, 0, OrangeDye, 0,0,0); // EXPERIMENTAL, required for Inspector Quest
+ getexp 100, 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;
+
+L_Weak:
+ hello;
+ end;
+
+L_Close:
+ close;
+
+OnTimer1000:
+ domovestep;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FarmerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, DesertShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, Boots); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 6);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 14);
+
+ .sex = G_MALE;
+ .distance = 5;
+
+ initpath "move", 93, 84,//A
+ "dir", RIGHT, 0,
+ "wait", 30, 0,
+ "move", 84, 60,//C
+ "dir", UP, 0,
+ "wait", 12, 0,
+ "move", 117, 64,//K
+ "dir", LEFT, 0,
+ "wait", 8, 0,
+ "move", 95, 84,//B
+ "dir", DOWN, 0,
+ "wait", 29, 0,
+ "move", 92, 68,//R
+ "dir", DOWN, 0,
+ "wait", 14, 0,
+ "move", 94, 80,//F
+ "dir", UP, 0,
+ "wait", 13, 0,
+ "move", 130, 73,//I
+ "dir", DOWN, 0,
+ "wait", 14, 0,
+ "move", 95, 84,//B
+ "dir", DOWN, 0,
+ "wait", 28, 0,
+ "move", 93, 64,//D
+ "dir", UP, 0,
+ "wait", 11, 0,
+ "move", 108, 60,//M
+ "dir", RIGHT, 0,
+ "wait", 8, 0,
+ "move", 93, 84,//A
+ "dir", RIGHT, 0,
+ "wait", 27, 0,
+ "move", 98, 60,//O
+ "dir", UP, 0,
+ "wait", 18, 0,
+ "move", 89, 62,//P
+ "dir", DOWN, 0,
+ "wait", 7, 0,
+ "move", 95, 84,//B
+ "dir", DOWN, 0,
+ "wait", 26, 0,
+ "move", 85, 66,//Q
+ "dir", UP, 0,
+ "wait", 21, 0,
+ "move", 89, 82,//G
+ "dir", UP, 0,
+ "wait", 10, 0,
+ "move", 93, 84,//A
+ "dir", RIGHT, 0,
+ "wait", 25, 0,
+ "move", 105, 78,//H
+ "dir", UP, 0,
+ "wait", 17, 0,
+ "move", 114, 63,//L
+ "dir", UP, 0,
+ "wait", 1, 0,
+ "move", 95, 84,//B
+ "dir", DOWN, 0,
+ "wait", 24, 0,
+ "move", 109, 69,//J
+ "dir", DOWN, 0,
+ "wait", 15, 0,
+ "move", 104, 63,//N
+ "dir", LEFT, 0,
+ "wait", 1, 0,
+ "move", 95, 84,//B
+ "dir", DOWN, 0,
+ "wait", 23, 0,
+ "move", 94, 80,//F
+ "dir", UP, 0,
+ "wait", 9, 0,
+ "move", 75, 63,//S
+ "dir", UP, 0,
+ "wait", 15, 0;
+
+ initialmove;
+ initnpctimer;
+ end;
+}
+
diff --git a/npc/004-1/elanore.txt b/npc/004-1/elanore.txt
index 1ca855e52..e03187dfc 100644
--- a/npc/004-1/elanore.txt
+++ b/npc/004-1/elanore.txt
@@ -3,61 +3,18 @@
// Jesusalva
004-1,75,62,0 script Elanore the Healer NPC_FEMALE,{
-
- //if (sc_check(SC_POISON)) goto L_CurePoison;
-
- mesn;
- @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:
- mesq l("You don't look too well; let me treat your wounds.");
- mes "";
- goto L_Menu;
-
-L_Heal2:
- mesq l("I will make quick work of your wounds.");
- mes "";
- goto L_Menu;
-
-L_Heal3:
- mesq l("Need a healing?");
- mes "";
- goto L_Menu;
-
-L_Heal4:
- mesq l("Sometimes you just need to run from battle.");
- mes "";
- goto L_Menu;
-
-L_Menu:
- .@price=(MaxHp-Hp)/5;
- .@price=.@price+10;
- if (BaseLevel <= 15) .@price=(.@price/10);
+ .@price=Nurse(.name$, 10, 5, 1);
mesq l("For you, it'll be @@ GP.", .@price);
mes "";
menu
- rif(Zeny >= .@price, l("Please heal me!")), L_Heal_L,
+ rif(Zeny >= .@price, l("Please heal me!")), L_Healing,
l("Do you make Lifestones?"), L_Lifestones,
l("Another time, maybe."), L_Close;
-L_Heal_L:
- mes "";
- set Zeny, Zeny - .@price;
- sc_end(SC_POISON);
- sc_end(SC_SLOWPOISON);
- percentheal 100,100; // We can also use "recovery(<account id>)"
- mesn;
- @temp = rand(1,4);
- if(@temp == 1) mesq l("Here you go!");
- if(@temp == 2) mesq l("Painless, wasn't it?");
- if(@temp == 3) mesq l("You should be more careful.");
- if(@temp == 4) mesq l("Much better, right?!");
- goto L_Close;
+L_Healing:
+ Nurse(.name$, 10, 5, 2);
+ close;
L_Lifestones:
mes "";
@@ -85,11 +42,25 @@ L_Trade:
getitem Lifestone, 1;
+ mes "";
+
// Only grant Experience on first craft
if (getq(TulimsharQuest_Lifestone) == 0) {
setq TulimsharQuest_Lifestone, 1;
- getexp 80, 10;
+ getexp 84, 10;
}
+
+ // Second tier stuff
+ if (ST_TIER == 8) {
+ if (gettimetick(2) > QUEST_ELEVARTEMPO) {
+ mesc l(".:: Second Tier Quest - Timed Out ::."), 1;
+ } else {
+ getexp 44, 0;
+ ST_TIER=9;
+ mes l("##9.:: Second Tier Quest - Time Remaining: @@ ::.", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ }
+ }
+
mesn;
mesq l("These will do just fine.");
next;
@@ -99,7 +70,6 @@ L_Trade:
mesq l("I guess that you could use these lifestones to gain a regeneration effect, too, but I do not know how.");
next;
mes l("She smiles.");
- mes l("[40 experience points]");
goto L_Close;
L_Trade_Missing:
@@ -118,6 +88,7 @@ OnInit:
setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
setunitdata(.@npcId, UDT_HAIRSTYLE, 8);
setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+ npcsit;
.sex = G_FEMALE;
.distance = 5;
diff --git a/npc/005-1/_mobs.txt b/npc/005-1/_mobs.txt
index 48cf7d6df..b84248dae 100644
--- a/npc/005-1/_mobs.txt
+++ b/npc/005-1/_mobs.txt
@@ -1,7 +1,7 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 005-1: Candor Island mobs
005-1,36,40,2,1 monster Clover Field 1028,1,35000,300000
-005-1,23,56,1,0 monster Diamond Bif 1108,1,35000,300000
+005-1,23,56,1,0 monster Diamond Bif 1108,1,35000,250000,Rosen::OnKillMBif
005-1,63,84,7,6 monster Maggot 1030,8,35000,300000,Trainer::OnKillMaggot
005-1,82,87,8,9 monster Candor Scorpion 1073,7,35000,300000,Trainer::OnKillCandorScorpion
005-1,36,105,6,3 monster Piou 1002,1,35000,300000
diff --git a/npc/005-1/ayasha.txt b/npc/005-1/ayasha.txt
index 778acd60e..a0dcc76c7 100644
--- a/npc/005-1/ayasha.txt
+++ b/npc/005-1/ayasha.txt
@@ -17,8 +17,7 @@
showavatar NPC_HUMAN_FEMALE_NOOB; // this is handled by avatars.xml
if (strcharinfo(2) == "Monster King" && is_admin()) goto L_MKControl;
- function quest_findAllKids
- {
+ function quest_findAllKids {
setq CandorQuest_HAS, 2;
mesn;
mesq l("Good luck!");
@@ -26,8 +25,7 @@
}
.@has = getq(CandorQuest_HAS);
- if (.@has == 0)
- {
+ if (.@has == 0) {
speech S_LAST_NEXT,
l("Ah, the kids are playing hide and seek, but I am afraid they went too far. A monster attack could start anytime, after all."),
l("I am currently very worried with them. They're just children! They don't know how to fight!"),
@@ -39,18 +37,15 @@
l("I can't, sorry.");
setq CandorQuest_HAS, 1;
- switch (@menu)
- {
+ switch (@menu) {
case 1:
quest_findAllKids;
break;
}
} while (@menu != 2);
- }
- else if (.@has == 1)
- {
+ } else if (.@has == 1) {
mesn;
- mesq l("Even if the city has not been attacked on the last few years, I can't help but be concerned while the kids are playing hide and seek."),
+ mesq l("Even if the city has not been attacked on the last few years, I can't help but be concerned while the kids are playing hide and seek.");
next;
mesq l("Could you perhaps help me to find all kids?");
next;
@@ -61,32 +56,25 @@
l("Yes!"),
l("I can't, sorry.");
- switch (@menu)
- {
+ switch (@menu) {
case 1:
quest_findAllKids;
break;
}
} while (@menu != 2);
- }
- else if (.@has == 2)
- {
+ } else if (.@has == 2) {
mesn;
mesq l("You still haven't found all of them yet.");
close;
- }
- else if (.@has == 3)
- {
+ } else if (.@has == 3) {
speech S_LAST_NEXT,
l("Thank you, here is your reward and... some pocket money.");
narrator("You receive 30 exp and 50 GP.");
- getexp 30, 0;
+ getexp 32, 0;
Zeny = (Zeny + 50);
setq CandorQuest_HAS, 4;
close;
- }
- else
- {
+ } else {
mesn;
mesq l("Thank you for your help.");
if (BaseLevel >= 24 && gettimetick(2) > .RENT_TIME) goto L_Sword;
@@ -142,6 +130,7 @@ L_MKControl:
close;
L_MKSmall:
+ addmapmask "005-1", MASK_MATTACK;
changemusic "005-1", "mythica.ogg";
disablenpc("Mana Stone");
pvpon("005-1");
@@ -233,7 +222,8 @@ OnTimer600000:
end;
OnTimer630000:
- changemusic "005-1", "bartk - the adventure begins.ogg";
+ removemapmask "005-1", MASK_MATTACK;
+ changemusic "005-1", "bartk_adventure.ogg";
enablenpc("Mana Stone");
killmonsterall("005-1", 0);
pvpoff("005-1");
diff --git a/npc/005-1/liana.txt b/npc/005-1/liana.txt
index fc06cf41b..e6f70c492 100644
--- a/npc/005-1/liana.txt
+++ b/npc/005-1/liana.txt
@@ -1,50 +1,101 @@
// TMW2 Script
-// Author: Jesusalva
-// Author: TMW-Org. Script Writers
+// Author:
+// Jesusalva
+// Saulc
+// Description:
+// Candor girl ask for maggot sliem every 6 hours
+// Variable:
+// CandorQuest_Liana
// PS. Liana could (should) explain too the small cave north of there. It can be
// a place to run, or maybe monsters there are natural and protect them from the
// Mana Monsters, etc.
005-1,47,86,0 script Liana NPC_ELVEN_FEMALE,{
+
mesn;
//mesq l("Hurnscald is a large city. I'm sure glad I live in Candor because I know where everything's at.");
mesq l("Monsters do not aim small towns like Candor. This city also comes with the plus that I know where everything's at.");
- if (QL_BEGIN == 10) goto L_Hasan;
+ if (BaseLevel >= 10) goto L_Menu;
close;
-L_Hasan:
+L_Menu:
mes "[Liana]";
mesq l("Are you enjoying yourself in Candor? Do you have any questions?");
- menu
- l("A guy named Hasan is bullying people."),L_Next,
- l("No, thanks."),L_Close;
+ mes "";
+ menu
+ l("What can I do with Maggot Slime?"),L_Slime,
+ l("What can I do with Bug Leg?"),L_Bug,
+ l("No, thanks."),L_Close;
-L_Next:
- mesq l("Ah, Hasan. He's causing trouble again?");
- next;
- mes l("She shakes her head.");
+L_Slime:
+ mes "";
+ .@q=getq(CandorQuest_Liana);
+ mesq l("I collect them.");
next;
- mesq l("This guy has been a plague ever since he could walk. He's always causing trouble.");
- next;
- mesq l("And his father... Well, one day his father thought he should teach Hasan a lesson.");
+ if (.@q == 0) goto L_Quest;
+ if (gettimetick(2) >= LIANA_TIMER + 60 * 60 * 6) goto L_Repeat;
+ close;
+
+L_Quest:
+ mesq l("With this I make balls of slime for Candor's childs, they really like to play with them.");
next;
- mesq l("He took him into the desert and then left him there!");
+ mesq l("Maybe you could bring me 5 @@? I will reward you for your effort.", getitemlink(MaggotSlime));
+ mes "";
+ menu
+ rif(countitem(MaggotSlime) >= 5, l("Here they are!")), L_Finish,
+ l("I'll get to it."), L_Close;
+ close; // double sure
+
+L_Repeat:
+ mesq l("I am searching again maggot slime to craft more balls.");
next;
- mes l("Hasan was only seven years old!");
+ mesq l("Maybe you could bring me 10 sticky @@?", getitemlink(MaggotSlime));
+ mes "";
+ menu
+ rif(countitem(MaggotSlime) >= 10, l("Here they are!")), L_Finish2,
+ l("I'll get to it."), L_Close;
+ close;
+
+L_Finish2:
+ delitem MaggotSlime, 10;
+ getexp 21, 0;
+ Zeny = (Zeny + 80); // 10*4 = 40 base
+ setq CandorQuest_Liana, 1;
+ set LIANA_TIMER, gettimetick(2);
+ mes "";
+ mesn;
+ mesq l("Many, many thanks! I'm sure the children will love it!");
+ close;
+
+L_Finish:
+ delitem MaggotSlime, 5;
+ getexp 58, 7;
+ Zeny = (Zeny + 30); // 5*4 = 20 base
+ setq CandorQuest_Liana, 1;
+ set LIANA_TIMER, gettimetick(2);
+ mes "";
+ mesn;
+ mesq l("Many, many thanks! I'm sure the children will love it!");
+ close;
+
+L_Bug:
+ mes "";
+ mesq l("Ah, personally I don't use it?");
next;
- mesq l("I never understood how someone could do something like that to a child, even if it's a rascal like Hasan.");
+ mes l("She shakes her head.");
next;
- mesq l("Anyway, Hasan tried to find his way back home, but stumbled into a nest of scorpions!");
+ mesq l("You should ask this question at Vincent.");
next;
- mes l("She shakes her head.");
- mesq l("If Lieutenant Dausen hadn't have come along that moment, Hasan would have died that day.");
+ mesq l("He is in the process of making a figurine made of bug leg.");
next;
- mesq l("However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.");
+ mesq l("I hope my answer help you in your adventure!");
next;
- mes l("She sighs.");
- QL_BEGIN = 11;
+ mes l("she's smiling at you.");
goto L_Close;
L_Close:
+ closedialog;
+ goodbye;
close;
}
+
diff --git a/npc/005-1/maya.txt b/npc/005-1/maya.txt
index 7e189c4fe..32f7bba65 100644
--- a/npc/005-1/maya.txt
+++ b/npc/005-1/maya.txt
@@ -57,6 +57,7 @@ L_QuestCompleted:
delitem MaggotSlime, 3;
set Zeny, Zeny + 300;
getitem CandorShirt, 1;
+ getexp 25, 5;
setq CandorQuest_Maya, 2;
mes "";
diff --git a/npc/005-1/sailors.txt b/npc/005-1/sailors.txt
index d7f3b07c7..eafad9b98 100644
--- a/npc/005-1/sailors.txt
+++ b/npc/005-1/sailors.txt
@@ -1,8 +1,9 @@
// TMW2 scripts.
// Authors:
// Jesusalva
+// Crazyfefe
// Description:
-// TODO
+// A Sailor from Nard's crew.
// CandorQuest_Sailors
// 0: Not started
// 1: Accepted
@@ -17,6 +18,7 @@
goto L_Elmo;
if (.@q == 3)
goto L_Complete;
+ if ( BaseLevel < 8) { hello; end; }
mesn;
mesq l("Ahoy matey!");
@@ -70,6 +72,7 @@ L_Give:
inventoryplace Bandana, 1;
delitem "Beer", 5;
getitem Bandana, 1;
+ getexp 35, 5;
setq CandorQuest_Sailors, 2;
mes "";
mesn;
@@ -86,12 +89,69 @@ L_Elmo:
close;
L_Complete:
+ .@q = getq(CandorQuest_SailorCure);
mesn;
mesq l("Thanks for the help! Arr, that was some fine ale, indeed!");
+ if (.@q == 1)
+ close;
+ next;
+ mesn;
+ mesq l("A pity a friend of ours drank too much. Juliet knows how to cure. We need to give her a @@ to do a hangover potion.", getitemlink(ScorpionStinger));
+
+L_CureMaster:
+ if (countitem(ScorpionStinger) < 1)
+ close;
+ next;
+ mesn;
+ mesq l("...Dealing with scorpion stingers is a gamble, so we may need a few stingers before making a successful potion.");
+ next;
+ select
+ rif(countitem(ScorpionStinger) >= 1, l("I have a Stinger with me. Try it!")),
+ l("I see.");
+
+ mes "";
+
+ if (@menu == 1)
+ goto L_CureLoop;
close;
+L_CureLoop:
+ inventoryplace CandorBoots, 1;
+ delitem ScorpionStinger,1;
+ setq2 CandorQuest_SailorCure, getq2(CandorQuest_SailorCure)+1;
+ if (rand(5) == 2) // Crazyfefe like this number :3
+ goto L_questCure_success;
+ goto L_questCure_failure;
+
+L_questCure_success:
+ if (getq2(CandorQuest_SailorCure) * 30 < 240)
+ Zeny = Zeny + 240 - getq2(CandorQuest_SailorCure) * 30;
+ else
+ Zeny = Zeny + 30;
+ getitem CandorBoots, 1;
+ getexp 20, 2;
+ setq CandorQuest_SailorCure, 1;
+ mesn;
+ mesq l("That... It... It worked! This is just the right claw!");
+ next;
+ mesn;
+ mesq lg("We'll bring this one to Juliet at once. Thanks for your help! Savior!");
+ close;
+
+L_questCure_failure:
+ if (getq2(CandorQuest_SailorCure) * 30 < 240)
+ Zeny = Zeny + 60;
+ else
+ Zeny = Zeny + 30;
+ mesn;
+ mesq l("That... Didn't worked. I'm sorry.");
+ next;
+ mesn;
+ mesq l("Here's some gold for your efforts.");
+ goto L_CureMaster;
+
OnInit:
.sex = G_OTHER;
- .distance = 8;
+ .distance = 7;
end;
}
diff --git a/npc/005-1/vincent.txt b/npc/005-1/vincent.txt
index b6c3ed85f..6d89ee983 100644
--- a/npc/005-1/vincent.txt
+++ b/npc/005-1/vincent.txt
@@ -47,6 +47,7 @@ L_CheckItems:
l("I will be forever grateful!");
delitem .LegsID, .LegsCount;
+ getexp 15, 5;
Zeny = Zeny + 1000;
message strcharinfo(0), l("You receive @@ GP!", 1000);
setq CandorQuest_Vincent, 2;
diff --git a/npc/005-1/warpcandorbattle.txt b/npc/005-1/warpcandorbattle.txt
index c79830276..67dc0a00f 100644
--- a/npc/005-1/warpcandorbattle.txt
+++ b/npc/005-1/warpcandorbattle.txt
@@ -1,11 +1,17 @@
+// TMW2 Script
// Author:
// Crazyfefe
+// Jesusalva
005-1,59,52,0 script Magic Barrier NPC_HIDDEN,0,0,{
+ end;
OnTouch:
- if(BaseLevel >= 40)
- warp "005-1", 59, 66;
+ if (BaseLevel >= 30 && !$@FEFE_CAVE_LEVEL)
+ warp "006-1", 49, 53;
+ else if (BaseLevel < 30)
+ npctalk3 l("You don't have the required level to pass this barrier.");
else
- npctalk l("You don't have the required level to pass this door.");
+ npctalk3 l("You can't pass this barrier while people are fighting inside!");
+ end;
}
diff --git a/npc/005-1/zegas.txt b/npc/005-1/zegas.txt
index 14f539bd9..75d3a45bb 100644
--- a/npc/005-1/zegas.txt
+++ b/npc/005-1/zegas.txt
@@ -2,6 +2,8 @@
005-1,35,77,0 script Zegas NPC_MONA,{
.ItemCreate = CandorShorts;
.@q = getq(CandorQuest_Barrel);
+ if (BaseLevel < 5)
+ goto L_Weak;
if (.@q == 1)
goto L_Find;
if (.@q == 2)
@@ -12,6 +14,11 @@
goto L_Thanks;
goto L_Meet;
+L_Weak:
+ mesn;
+ mesq l("Do not enter on this storehouse, the maggots there will kill you.");
+ close;
+
L_Meet:
mesn;
mesq l("Hey do you have a second?");
@@ -50,7 +57,7 @@ L_QuestEnd:
mesn;
mesq l("From the smell I can see you found the bug bomb!");
mesq l("Thanks once again, I know it's not much but here is 450 GP for your troubles.");
- getexp 60, 0;
+ getexp 63, 0;
getitem .ItemCreate, 1;
Zeny = (Zeny + 450);
setq CandorQuest_Barrel, 4;
diff --git a/npc/005-2-1/_import.txt b/npc/005-2-1/_import.txt
new file mode 100644
index 000000000..a3d1d7dde
--- /dev/null
+++ b/npc/005-2-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 005-2-1: Saxso's Basement
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/005-2-1/_mobs.txt",
+"npc/005-2-1/_warps.txt",
+"npc/005-2-1/note.txt",
diff --git a/npc/005-2-1/_mobs.txt b/npc/005-2-1/_mobs.txt
new file mode 100644
index 000000000..e69781103
--- /dev/null
+++ b/npc/005-2-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 005-2-1: Saxso's Basement mobs
+005-2-1,34,38,10,3 monster Lava Slime 1097,7,36000,300000
diff --git a/npc/005-2-1/_warps.txt b/npc/005-2-1/_warps.txt
new file mode 100644
index 000000000..31167fe08
--- /dev/null
+++ b/npc/005-2-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 005-2-1: Saxso's Basement warps
+005-2-1,28,34,0 warp #005-2-1_28_34 0,0,005-2,25,36
diff --git a/npc/005-2-1/note.txt b/npc/005-2-1/note.txt
new file mode 100644
index 000000000..554e25a0f
--- /dev/null
+++ b/npc/005-2-1/note.txt
@@ -0,0 +1,14 @@
+// TMW-2 Script.
+// Authors:
+// Saulc
+// Description:
+// A small note
+
+005-2-1,41,33,0 script Note#saxsocave NPC_PAPER_NOTE,{
+ mesc l("I leave this basement that start to be too dangerous!");
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+}
diff --git a/npc/005-2/_import.txt b/npc/005-2/_import.txt
index d5850de36..09564f7d6 100644
--- a/npc/005-2/_import.txt
+++ b/npc/005-2/_import.txt
@@ -3,3 +3,4 @@
"npc/005-2/_mobs.txt",
"npc/005-2/_warps.txt",
"npc/005-2/saxsochest.txt",
+"npc/005-2/trapdoor.txt",
diff --git a/npc/005-2/saxsochest.txt b/npc/005-2/saxsochest.txt
index d21c30716..6aaad374f 100644
--- a/npc/005-2/saxsochest.txt
+++ b/npc/005-2/saxsochest.txt
@@ -1,3 +1,4 @@
+// TMW2 Script
// Author:
// Crazyfefe
@@ -6,48 +7,45 @@
.key = SaxsoKey;
.reward = ToothNecklace;
- function quest_completed{
+ function quest_completed {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("you allready open the chest.");
+ l("you already opened the chest.");
close;
}
function quest_open {
- if (countitem(.key) > 0)
- {
+ if (countitem(.key) > 0) {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("You open the chest and found a @@.",getitemlink(.reward));
delitem .key,1;
getitem .reward,1;
+ getexp 80, 15;
setq CandorQuest_Chest, 1;
close;
- }
- else
- {
+ } else {
speech S_FIRST_BLANK_LINE,
- l("you don't have the key.");
+ l("You don't have the key.");
close;
}
}
function quest_started {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("it look close.");
+ l("It looks locked.");
narrator S_LAST_NEXT,
- l("you should use a key for open it.");
+ l("Perhaps you should use a key to open it.");
do
{
- select
- l("Use a key."),
- menuaction(l("Quit"));
+ select
+ l("Use a key."),
+ menuaction(l("Quit"));
- switch (@menu)
- {
- case 1:
- quest_open;
- break;
- }
- } while (@menu != 2);
+ switch (@menu) {
+ case 1:
+ quest_open;
+ break;
+ }
+ } while (@menu != 2);
}
do
@@ -59,8 +57,7 @@
rif(.@chest == 0,l("There are a dusty chest.")),
menuaction(l("Quit"));
- switch (@menu)
- {
+ switch (@menu) {
case 1:
quest_started;
break;
diff --git a/npc/005-2/trapdoor.txt b/npc/005-2/trapdoor.txt
new file mode 100644
index 000000000..41c231709
--- /dev/null
+++ b/npc/005-2/trapdoor.txt
@@ -0,0 +1,13 @@
+// TMW 2 script
+// Author:
+// Saulc
+
+005-2,24,36,0 script Trap Door NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ .@chest = getq(CandorQuest_Chest);
+ if (.@chest == 1)
+ warp "005-2-1", 28, 35;
+ close;
+}
diff --git a/npc/005-3/barrel.txt b/npc/005-3/barrel.txt
index dcba8b4c7..87321f470 100644
--- a/npc/005-3/barrel.txt
+++ b/npc/005-3/barrel.txt
@@ -40,7 +40,7 @@ L_BarrelTally:
killmonsterall("005-3");
setq CandorQuest_Barrel, 3;
}
- @rand = rand(6);
+ @rand = rand(7);
if (@rand == 0)
getitem Coal,1;
else if (@rand == 1)
@@ -53,6 +53,8 @@ L_BarrelTally:
getitem Bread,1;
else if (@rand == 5)
getitem TolchiArrow,6;
+ else if (@rand == 6)
+ getitem BugLeg,1;
return;
L_Loop:
diff --git a/npc/005-4/rosen.txt b/npc/005-4/rosen.txt
index 264ee97cb..1b9c173c5 100644
--- a/npc/005-4/rosen.txt
+++ b/npc/005-4/rosen.txt
@@ -2,16 +2,19 @@
// Author:
// Saulc
// Description:
-// Candor Armor&Weapon shop keeper. The quest is currently broken.
+// Candor Armor&Weapon shop keeper.
// Variables:
-// CandorQuest_Rosen (nyi)
+// CandorQuest_Rosen
+// Suggestion: Deliver a letter to Zegas, giving player background about
+// Candor Island and Saxso. Requires level 5. Reward: 150 GP.
+// Could have an additional step related to Bifs. Even a daily quest asking
+// for (day % 8) ore, with suitable prices.
005-4,29,36,0 script Rosen NPC_GUARD1,{
-
function explain_ironingot {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("Did you see Jhedia the blacksmith in Tulimshar? He might know how you could get this."),
- l("Nevertheless, you probably need some base materials from Bif. Who knows what it will drop if you are lucky?");
+ l("Did you see Jhedia the blacksmith in Tulimshar? She might know how you could get this."),
+ l("Nevertheless, you probably need some base materials from Bifs. Who knows what it will drop if you are lucky?");
return;
}
@@ -25,6 +28,7 @@
select
menuaction(l("Trade")),
l("How can I get iron ingot?"),
+ l("I want to improve my equipment."),
menuaction(l("Quit"));
switch (@menu)
@@ -37,12 +41,104 @@
explain_ironingot;
break;
case 3:
+ goto L_Gloves;
+ break;
+ case 4:
closedialog;
goodbye;
close;
}
} while (1);
+
+L_Gloves:
+ .@q=getq(CandorQuest_Rosen);
+ .@b=getq(ShipQuests_ChefGado);
+ mes "";
+ if (BaseLevel < 4) goto L_NoLevel;
+ if (.@b <= 2) goto L_NoGloves;
+ if (.@q >= 3) goto L_Complete;
+ .@k=getq2(CandorQuest_Rosen); // Get number of kills (via getq2)
+
+ mesn;
+ if (.@q == 0) {
+ mesq l("Ah, I see you have some used gloves. I'm not sure if you can even mine with it...");
+ next;
+ mesn;
+ mesq l("Uhm, maybe I could teach you something, too. Go mine 10 @@. You should find some at northeast of the Island.", getmonsterlink(DiamondBif));
+ next;
+ mesn;
+ mesq l("These monsters are a great source of raw crafting materials.");
+ setq CandorQuest_Rosen, 1, 0;
+ } else if (.@q == 1) {
+ mesq l("You didn't mine enough @@. The perfect spot is at northeast of this island. It takes a while to them respawn, so don't hurry.", getmonsterlink(DiamondBif));
+ } else if (.@q == 2) {
+ mesq l("Wow! those pity gloves aren'st made for mining. They're almost ruined!");
+ mesq l("Here, take this @@. It will be better suited!", getitemlink(CandorGloves));
+ inventoryplace CandorGloves, 1;
+ getexp 30, 5;
+ getitem CandorGloves, 1;
+ setq CandorQuest_Rosen, 3, 0;
+ }
+ close;
+
+L_NoLevel:
+ mesn;
+ mesq l("You aren't strong enough.");
+ next;
+ mesn;
+ mesq l("Go see someone else for now. Yes, you need level to take most tasks available on the world!");
+ close;
+
+L_NoGloves:
+ mesn;
+ mesq l("You should have some decent gloves, dude. These offer defense, as it's easier to handle your weapon and parry attacks.");
+ next;
+ mesn;
+ mesq l("For sure the chef of Nard's ship could spare you a pair of gloves.");
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("Ah, uhm, I'm not sure. We at Candor don't need much.");
+ next;
+ mesn;
+ mesq l("You could try to get new equipment by doing more quests. You need level to use them, though.");
+ next;
+ mesn;
+ mesq l("Alternatively, I think someone at the Land Of Fire Village is able to refine some items. Why don't you try it sometime?");
+ close;
+
+ function rosen_add_kills
+ {
+ .@qp=getq(CandorQuest_Rosen);
+ .@kp=getq2(CandorQuest_Rosen); // Get number of kills (via getq2)
+ setq CandorQuest_Rosen, .@qp, .@kp+1;
+ //message strcharinfo(0), l("Set status @@ with @@ kills", .@qp, .@kp);
+ }
+
+ function rosen_max_kills
+ {
+ .@qp=getq(CandorQuest_Rosen);
+ setq CandorQuest_Rosen, .@qp+1, 0;
+ //message strcharinfo(0), l("End status @@", .@qp);
+ }
+
+OnKillMBif:
+ .@q=getq(CandorQuest_Rosen);
+ .@k=getq2(CandorQuest_Rosen); // Get number of kills (via getq2)
+ if (.@q == 1) {
+ if (.@k+1 >= 10) {
+ rosen_max_kills();
+ message strcharinfo(0), l("Go back to Rosen!");
+ } else {
+ rosen_add_kills();
+ message strcharinfo(0), l("@@/10 @@", .@k+1, getmonsterlink(DiamondBif));
+ }
+ }
+ end;
+
+
OnTimer1000:
domovestep;
@@ -55,11 +151,11 @@ OnInit:
"wait", 31, 0,
"move", 25, 35,
"dir", UP, 0,
- "wait", 2, 0,
+ "wait", 2, 0,
"move", 29, 36,
"dir", DOWN, 0,
- "wait", 31, 0;
+ "wait", 31, 0;
initialmove;
initnpctimer;
.distance = 5;
-}
+}
diff --git a/npc/005-4/shop.txt b/npc/005-4/shop.txt
index fbf8c6dfb..d6c17dcd5 100644
--- a/npc/005-4/shop.txt
+++ b/npc/005-4/shop.txt
@@ -1,18 +1,8 @@
-// Evol scripts.
+// TMW2 scripts.
// Author:
-// Reid
+// Saulc
// 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.
+// Rosen sells basic armor on Candor. Logic by Reid.
005-4,30,37,0 trader Shop#Candor NPC_NO_SPRITE,{
diff --git a/npc/005-4/tolchi.txt b/npc/005-4/tolchi.txt
index 66629b947..be61a2b29 100644
--- a/npc/005-4/tolchi.txt
+++ b/npc/005-4/tolchi.txt
@@ -40,7 +40,7 @@
}
delitem .Item3, 1;
Zeny = Zeny + 16000; // Real worth: 12100 GP (profit of 1k to 2.5k GP - two travels included)
- getexp 1500,0;
+ getexp 1575,0;
setq CandorQuest_Tolchi, 3;
speech S_FIRST_BLANK_LINE,
l("Thanks mate, that is everything I need! Have a good day!");
@@ -56,7 +56,7 @@
}
delitem .Item2, 3;
Zeny = Zeny + 800; // Real worth: 400 gp (status: +200gp)
- getexp 100,0;
+ getexp 105,0;
setq CandorQuest_Tolchi, 2;
}
if (.@tolchi == 0)
@@ -70,7 +70,7 @@
}
delitem .Item1, 1;
Zeny = Zeny + 200; // Real worth: 400 gp (status: -200gp)
- getexp 50,0;
+ getexp 52,0;
setq CandorQuest_Tolchi, 1;
}
close;
diff --git a/npc/005-5-2/_import.txt b/npc/005-5-2/_import.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/npc/005-5-2/_import.txt
+++ /dev/null
diff --git a/npc/005-5/_import.txt b/npc/005-5/_import.txt
index 0b82262ad..6bdc1356b 100644
--- a/npc/005-5/_import.txt
+++ b/npc/005-5/_import.txt
@@ -1,4 +1,4 @@
-// Map 005-5: Merchant Guild
+// Map 005-5: Candor Bank
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/005-5/_warps.txt",
"npc/005-5/cynric.txt",
diff --git a/npc/005-5/_warps.txt b/npc/005-5/_warps.txt
index 9d57c5ea5..b1f28d480 100644
--- a/npc/005-5/_warps.txt
+++ b/npc/005-5/_warps.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 005-5: Merchant Guild warps
+// Map 005-5: Candor Bank warps
005-5,25,43,0 warp #005-5_25_43 0,0,005-1,39,69
diff --git a/npc/005-5/cynric.txt b/npc/005-5/cynric.txt
index 72b03e6ce..af05aad2d 100644
--- a/npc/005-5/cynric.txt
+++ b/npc/005-5/cynric.txt
@@ -4,138 +4,7 @@
// Jesusalva
005-5,30,37,0 script Cynric NPC_LLOYD,{
-
-// Evol scripts.
-// Authors:
-// gumi
-// Reid
-// Description:
-// Banker NPC.
-
-
- function explain_guild {
- speech S_LAST_NEXT,
- l("The guild is in charge of the commerce regularization throughout Candor and its surroundings."),
- l("With the help of the town hall 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 Cynric, I am a representative of the Merchant Guild on Candor.");
-
- 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("@@ is searching something in his book.", .name$);
- speech S_LAST_NEXT,
- l("I see."),
- lg("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 Candor 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 = 7700;
- speech S_LAST_NEXT,
- l("The fee is of @@ GP. 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 = 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;
- }
-
- if (getq(ArtisQuests_Lloyd) == 0)
- {
- first_visit;
-
- closedialog;
- goodbye;
- close;
- }
-
- speech S_LAST_NEXT,
- l("Welcome to the Merchant Guild of Tulimshar."),
- l("What do you want today?");
-
- do
- {
-
- selectd
- l("I would like to store some items."),
- l("I would like to perform money transactions."),
- l("What is this guild for?"),
- l("Bye.");
-
- switch (@menu)
- {
- case 1:
- openstorage;
- closedialog;
- close;
- break;
- case 2:
- MerchantGuild_Bank;
- break;
- case 3:
- mes "";
- explain_guild;
- break;
- }
- if (@menu != 4)
- {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
- l("Something else?");
- }
- } while (@menu != 4);
-
- closedialog;
- goodbye;
+ Banker(.name$, "Candor", 7700);
close;
OnInit:
diff --git a/npc/005-5/nylo.txt b/npc/005-5/nylo.txt
index baf6a8b40..4a328bbc0 100644
--- a/npc/005-5/nylo.txt
+++ b/npc/005-5/nylo.txt
@@ -149,7 +149,7 @@
case 1:
break;
case 2:
- shop "Nylo#Beer";
+ openshop "Nylo#Beer";
break;
case 3:
nylo_explain;
diff --git a/npc/005-6/morgan.txt b/npc/005-6/morgan.txt
index 69d1c92d7..01911d92b 100644
--- a/npc/005-6/morgan.txt
+++ b/npc/005-6/morgan.txt
@@ -25,7 +25,10 @@ L_Who:
next;
mesq l("I really hope that nothing major happens, though. I would hate to see blood being spilled.");
next;
- mesq l("If you train hard enough, and get access to a Mana Stone, I could teach you a trick or two. But right now, I don't sense magic compatibility in you."); // Because we haven't added that yet, duh.
+ if (!MAGIC_LVL)
+ mesq l("If you train hard enough, and get access to a Mana Stone, I could teach you a trick or two. But right now, I don't sense magic compatibility in you.");
+ else
+ goto L_Magic;
close;
L_Shop:
@@ -37,6 +40,69 @@ L_Shop:
closedialog;
close;
+// Magic Subsystem
+L_Magic:
+ mesn;
+ mesq l("I see you are a mage too. Have you joined a class already? Luca and Colin are always recruiting on Tulimshar Magic Council.");
+
+L_MagicCore:
+ select
+ l("What is a class?"),
+ l("How difficult it is to obtain a class?"),
+ rif(!getskilllv(TMW2_KALMURK), l("Can you teach me a spell?")),
+ l("Thanks for the help!");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesn;
+ mesq l("We have two main groups, entitled classes: The Magic Warriors, and the Wizard Mages.");
+ next;
+ mesn;
+ mesq l("I don't think you can be part of more than one class, but you can accumulate subclasses. These will only unlock at tier 2, though.");
+ break;
+ case 2:
+ mesn;
+ mesq l("You know the Tulimshar Magic Council? The big building on Tulimshar North? There you can obtain a class.");
+ next;
+ mesn;
+ mesq l("Getting in a class is easy, difficult is mastering it. But the more you advance, more powerful skills are unlocked.");
+ next;
+ mesn;
+ mesq l("Of course, if you don't ask from the Mana Stone for more magic, that means nothing...");
+ break;
+ case 3:
+ mesn;
+ mesq l("Sure! But that is Mana Magic. Just bring me a mug of beer, I'm thristy. And I'll teach you a basic skill.");
+ next;
+ if (askyesno() == ASK_YES) {
+ if (!countitem(Beer)) goto L_Lie;
+ delitem Beer, 1;
+ skill(TMW2_KALMURK,1,0);
+ mesn;
+ mesq l("You can use @@ to summon some maggots. That depends on your magic level, of course.", "##B@sk-kalmurk##b");
+ next;
+ mesn;
+ mesq l("That's a Mana Magic. It is very different from regular magic. For example, it have an experience meter and an alias you can say.");
+ next;
+ mesn;
+ mesq l("Unless you have an @@, it'll be difficult to track progress on Mana Magic, and you won't really gain any mana experience for a while.", getitemlink(JesusalvaGrimorium));
+ next;
+ mesn;
+ mesq l("By the way, you need a couple of @@ to try the skill. Fail rate is pretty high, but that book will teach you how to reduce it.", getitemlink(MaggotSlime));
+ }
+ break;
+ default:
+ close;
+ }
+ next;
+ goto L_MagicCore;
+
+
+L_Cheat:
+ mesn;
+ mesq l("I offer an awesome skill for you, for a very slow price, and you try to cheat me... pitiful...");
+ close;
+
OnInit:
tradertype(NST_MARKET);
diff --git a/npc/005-6/zitoni.txt b/npc/005-6/zitoni.txt
index 5c19ea989..fef2f8f27 100644
--- a/npc/005-6/zitoni.txt
+++ b/npc/005-6/zitoni.txt
@@ -16,18 +16,24 @@
mes "";
L_Menu:
+ .@q1=getq(TulimsharQuest_DarkInvocator);
if (BaseLevel < 10)
.@price = 1;
else
.@price = BaseLevel*200-(9*200);
+ mesn strcharinfo(0);
select
l("Status reset? Sounds illegal!"),
l("Can you reset my stats please?"),
+ l("Do you make any other kind of potions?"),
+ rif(.@q1 == 1 || .@q1 == 2, l("Can you help me with Everburn Powder? I need 5.")),
+ rif(.@q1 == 3 && countitem(DarkDesertMushroom) >= 1,l("Zarkor sent you this gift. He needs Everburn Powder.")),
+ rif(.@q1 >= 4,l("I need some Everburn Powder.")),
lg("You are weird, I have to go sorry.");
- switch (@menu)
- {
+ mes "";
+ switch (@menu) {
case 1:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
lg("Wait, are you with the police? I didn't do anything wrong, I promise!"),
@@ -43,8 +49,7 @@ L_Menu:
l("We will talk about it later."),
l("My stats are too good, I won't need it.");
- switch (@menu)
- {
+ switch (@menu) {
case 1:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Yes, it is a really sweet deal, believe me!");
@@ -61,6 +66,14 @@ L_Menu:
case 2:
goto L_ResetStats;
case 3:
+ goto L_OtherPotion;
+ case 4:
+ goto L_DarkInv_Ever;
+ case 5:
+ goto L_DarkInv_Mush;
+ case 6:
+ goto L_DarkInv_Powder;
+ default:
goto L_Quit;
}
@@ -104,9 +117,7 @@ L_ConfirmReset:
l("It seems that you have no status points to reset!"),
l("But the money you brought was really awesome you know."),
l("Come back when you will really need me.");
- }
- else
- {
+ } 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."),
@@ -127,12 +138,132 @@ L_Later:
goto L_Quit;
L_Never:
-
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("I am sure that you will change your mind.");
goto L_Quit;
+L_OtherPotion:
+ mesn;
+ mesq l("I make both @@ and @@, if you give me the shrooms associated to them, and money.", getitemlink(HastePotion), getitemlink(StrengthPotion));
+ next;
+ mesn;
+ mesq l("For you, it will be only 250 GP for potion! But I need the base ingredients, four @@ - or @@, depends on which one.", getitemlink(Plushroom), getitemlink(Chagashroom));
+ next;
+ menu
+ l("Nothing at the moment."), L_Quit,
+ l("4 Plushrooms for a Haste Potion!"), L_HastePotion,
+ l("4 Chagashrooms for a Strength Potion!"), L_StrengthPotion;
+
+L_HastePotion:
+ mes "";
+ mesn;
+ if (Zeny < 150) {
+ mesq l("You don't have enough money. Sorry.");
+ next;
+ goto L_Quit;
+ }
+ if (countitem(Plushroom) < 4) {
+ mesq l("I need @@ to work...", getitemlink(Plushroom));
+ next;
+ goto L_Quit;
+ }
+ inventoryplace HastePotion, 1;
+ Zeny=Zeny-150;
+ delitem Plushroom, 4;
+ getitem HastePotion, 1;
+ mesq l("Here you go!");
+ goto L_OtherPotion;
+
+L_StrengthPotion:
+ mes "";
+ mesn;
+ if (Zeny < 150) {
+ mesq l("You don't have enough money. Sorry.");
+ next;
+ goto L_Quit;
+ }
+ if (countitem(Chagashroom) < 4) {
+ mesq l("I need @@ to work...", getitemlink(Chagashroom));
+ next;
+ goto L_Quit;
+ }
+ inventoryplace StrengthPotion, 1;
+ Zeny=Zeny-150;
+ delitem Chagashroom, 4;
+ getitem StrengthPotion, 1;
+ mesq l("Here you go!");
+ goto L_OtherPotion;
+
+
+L_DarkInv_Ever:
+ mesn;
+ mesq l("...What? You want @@? Five of them?!", getitemlink(EverburnPowder));
+ next;
+ mesn;
+ mesq l("You have no idea of how dangerous that item is! I can't simply do it!");
+ next;
+ mesn;
+ mesq l("I don't know who sent you to me, but this is a flat and big NO!");
+ next;
+ mesc l("Zitoni won't cooperate with you. Perhaps you should ask to Zarkor about that.");
+ setq TulimsharQuest_DarkInvocator, 2;
+ close;
+
+L_DarkInv_Mush:
+ mesn;
+ mesq l("Ah... A @@. The sturdiest from all mushroom, and very, very rare.", getitemlink(DarkDesertMushroom));
+ next;
+ mesn;
+ mesc l("Zitoni seems to be lost on deep thought.");
+ next;
+ mesn;
+ mesq l("Ah... Well, ok. I'll do the powder for you, but you still need to bring me the material.");
+ next;
+ mesn;
+ mesq l("Just... Don't accidentaly invoke a Legendary Guardian or something, these thingies could destroy a whole city.");
+ delitem DarkDesertMushroom, 1;
+ setq TulimsharQuest_DarkInvocator, 4;
+ close;
+
+L_DarkInv_Powder:
+ mesn;
+ mesq l("@@ is an expensive, rare, and dangerous item. Do not shake it too much, or it will catch fire.", getitemlink(EverburnPowder));
+ next;
+ mesn;
+ mesq l("...And trust me, it'll take way more than just water to put the fire down.");
+ next;
+ mesn;
+ mesq l("I will require 3000 GP, 1 @@, 1 @@ and 1 @@, for a small handful of it.", getitemlink(IronPowder), getitemlink(SulfurPowder), getitemlink(PileOfAsh));
+ mes "";
+ select
+ l("I still don't have everything, but don't worry, I'll be back."),
+ l("I have everything here with me.");
+ mes "";
+ if (@menu == 1)
+ goto L_Quit;
+ if (countitem(IronPowder) < 1 ||
+ countitem(SulfurPowder) < 1 ||
+ countitem(PileOfAsh) < 1 ||
+ Zeny < 3000) goto L_Liar;
+ Zeny=Zeny-3000;
+ delitem IronPowder, 1;
+ delitem SulfurPowder, 1;
+ delitem PileOfAsh, 1;
+ getitem EverburnPowder, 1;
+ getexp 100, 0;
+ mesn;
+ mesq l("Here you go. Handle it with caution.");
+ close;
+
+L_Liar:
+ mesn;
+ mesq l("Liar. You can't fool me. That's the price. Get that or get out!");
+ next;
+ mesn;
+ mesq l("We're talking about @@. It's not something for kids or pranksters!", getitemlink(EverburnPowder));
+ close;
+
L_Quit:
closedialog;
goodbye;
diff --git a/npc/005-7/nurse.txt b/npc/005-7/nurse.txt
index 78b42c29f..44647f851 100644
--- a/npc/005-7/nurse.txt
+++ b/npc/005-7/nurse.txt
@@ -22,7 +22,7 @@
switch (@menu)
{
case 1:
- goto L_Menu;
+ goto L_Heal;
break;
case 2:
goto L_Help;
@@ -46,21 +46,21 @@ L_Help:
mesq l("Thanks a lot!");
if (getq(CandorQuest_Nurse) == 0)
{
- getexp 20,0;
+ getexp 21,0;
Zeny = Zeny + 200;
setq CandorQuest_Nurse, 1;
close;
}
if (getq(CandorQuest_Nurse) == 1)
{
- getexp 10,0;
+ getexp 11,0;
Zeny = Zeny + 100;
setq CandorQuest_Nurse, 2;
close;
}
if (getq(CandorQuest_Nurse) == 2)
{
- getexp 5,0;
+ getexp 6,0;
Zeny = Zeny + 50;
setq CandorQuest_Nurse, 3;
close;
@@ -70,69 +70,15 @@ L_Help:
close;
L_Heal:
- mes "";
- mesn;
- .@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:
- mesq l("You don't look too well; let me treat your wounds.");
- mes "";
- goto L_Menu;
-
-L_Heal2:
- mesq l("I will make quick work of your wounds.");
- mes "";
- goto L_Menu;
-
-L_Heal3:
- mesq l("Need a healing?");
- mes "";
- goto L_Menu;
-
-L_Heal4:
- mesq l("Sometimes you just need to run from battle.");
- mes "";
- goto L_Menu;
-
-L_Menu:
- .@price=(MaxHp-Hp)/5;
- .@price=.@price+10;
- if (BaseLevel <= 15) .@price=(.@price/10);
- else if (BaseLevel <= 20) .@price=(.@price/5);
- else .@price=(.@price/2);
- mesq l("For you, it'll be @@ GP.", .@price);
- mes "";
- menu
- rif(Zeny >= .@price, l("Please heal me!")), L_Heal_L,
- l("Another time, maybe."), L_Close;
-
-
-L_Heal_L:
- mes "";
- set Zeny, Zeny - .@price;
- sc_end(SC_POISON);
- sc_end(SC_SLOWPOISON);
- percentheal 100,100; // We can also use "recovery(<account id>)"
- mesn;
- @temp = rand(1,4);
- if(@temp == 1) mesq l("Here you go!");
- if(@temp == 2) mesq l("Painless, wasn't it?");
- if(@temp == 3) mesq l("You should be more careful.");
- if(@temp == 4) mesq l("Much better, right?!");
- goto L_Close;
-
+ Nurse(.name$, 10, 5);
+ close;
L_Close:
close;
OnInit:
.@npcId = getnpcid(0, .name$);
- // I got lazy and NPC is behind a desk... So... :hides:
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonShorts);
setunitdata(.@npcId, UDT_HEADMIDDLE, ShortTankTop);
setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
diff --git a/npc/005-7/trainer.txt b/npc/005-7/trainer.txt
index 7868a82e1..8f31e1a08 100644
--- a/npc/005-7/trainer.txt
+++ b/npc/005-7/trainer.txt
@@ -42,15 +42,37 @@ L_PreMenu:
L_Menu:
mesn strcharinfo(0);
menu
- l("How can you help me?"), L_ExplicaSiProprio,
- rif(getq(CandorQuest_Trainer) < 15, l("I want to be trained!")), L_Trainment,
+ l("How can you help me?"), L_ExplicaSiProprio,
+ rif(getq(CandorQuest_Trainer) < 15, l("I want to be trained!")), L_Trainment,
+ l("I wanted info about how to play."), L_Manaplus_gap,
l("How do I make money?"), L_ExplicaGrama,
- l("How I see my items?"), L_ExplicaBagagem,
- l("How trade with other players?"), L_ExplicaTrade,
- l("How hunt monsters?"), L_ExplicaBatalha,
- l("How talk with someone?"), L_ExplicaDialogo,
- l("I wanted other info."), L_OutrasInformacoes_gap,
- l("No, thanks!"), L_Fechar;
+ l("Monsters."), L_Monstros,
+ l("Quests."), L_Quests,
+ l("NPCs."), L_NPC,
+ l("Magic."), L_Magica,
+ l("Rules."), L_Regras,
+ l("No, thanks!"), L_Fechar;
+
+
+L_Manaplus_gap:
+ mes "";
+ goto L_Manaplus;
+
+L_Manaplus:
+ mesn;
+ mesq l("What do you want to learn more about?");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("How I see my items?"), L_ExplicaBagagem,
+ l("How trade with other players?"), L_ExplicaTrade,
+ l("How hunt monsters?"), L_ExplicaBatalha,
+ l("How talk with someone?"), L_ExplicaDialogo,
+ l("Status."), L_Status,
+ l("Styles."), L_Estilo,
+ l("Commands."), L_Comandos,
+ l("Shortcuts."), L_Teclado,
+ l("I changed my mind."), L_Menu_gap;
L_Trainment:
.@q=getq(CandorQuest_Trainer);
@@ -69,7 +91,7 @@ L_Trainment:
mesq l("You are killing @@. They are usually at the crops.", getmonsterlink(Maggot));
} else if (.@q == 2) {
mesq l("Good job! Here is your reward! (40 xp 25 gp)");
- getexp 40, 0;
+ getexp 30, 0;
set Zeny, Zeny + 25;
setq CandorQuest_Trainer, 3, 0;
} else if (.@q == 3) {
@@ -81,7 +103,7 @@ L_Trainment:
mesq l("You are killing @@ at the storehouse.", getmonsterlink(HouseMaggot));
} else if (.@q == 5) {
mesq l("Perfect! Here is your reward! (40 xp 25 gp)");
- getexp 40, 0;
+ getexp 42, 0;
set Zeny, Zeny + 25;
setq CandorQuest_Trainer, 6, 0;
} else if (.@q == 6) {
@@ -93,7 +115,7 @@ L_Trainment:
mesq l("You are killing @@ at the beach.", getmonsterlink(CandorScorpion));
} else if (.@q == 8) {
mesq l("Managed to drop anything? It requires more luck than skill. Here is your reward. (40 xp 25 gp)");
- getexp 40, 0;
+ getexp 53, 0;
set Zeny, Zeny + 25;
setq CandorQuest_Trainer, 9, 0;
} else if (.@q == 9) {
@@ -106,7 +128,7 @@ L_Trainment:
} else if (.@q == 11) {
mesq l("Congratulations! Here is your reward (40 xp 25 gp).");
mesq l("You completed your trainment, so you're getting 50 bonus experience points. If you level up, use your stat points wisely!");
- getexp 90, 0;
+ getexp 70, 0;
set Zeny, Zeny + 25;
setq CandorQuest_Trainer, 12, 0;
} else if (.@q == 12 && BaseLevel >= 9) {
@@ -120,6 +142,7 @@ L_Trainment:
mesq l("Wow! You did it! I do not think anyone else could have done that.");
mesq l("Here, take this @@ - you deserve it! And here is 200 GP to buy a better weapon.", getitemlink(CandorHeadBand));
inventoryplace CandorHeadBand, 1;
+ getexp 80, 5;
getitem CandorHeadBand, 1;
set Zeny, Zeny + 200;
setq CandorQuest_Trainer, 15, 0;
@@ -174,8 +197,12 @@ L_ExplicaGrama:
mesn;
mesq l("Merchants like to buy body parts of killed monsters and animals because they can make items and equipment.");
next;
+ mesn;
mesq l("Some others also like to buy them to keep as trophies. Either way, you can make some money with that.");
next;
+ mesn;
+ mesq l("You can also make money ##Bdoing quests##b. Elmo will tell you almost every quest which can be done in Candor.");
+ next;
goto L_PreMenu;
L_ExplicaBagagem:
@@ -192,7 +219,22 @@ L_ExplicaBagagem:
mesn;
mesq l("To discard an item you no longer want, select it and press the 'Discard' button. Generic items can be discarded or sold. But equipment can only be sold.");
next;
- goto L_PreMenu;
+ mesn;
+ mesq l("There are three types of items.");
+ mesq l("Those for consumption, equipment and generics.");
+ next;
+ mesn;
+ mesq l("Items for consumption, like potions, can only be used once.");
+ mesq l("Once used, they will disappear from your inventory.");
+ next;
+ mesn;
+ mesq l("Equippable items are armour, weapons and accessories.");
+ mesq l("They can be equipped to make your look more interesting or to improve some of its features.");
+ next;
+ mesn;
+ mesq l("Generic items are used for different purposes. In creating other items, to swap and sell, to collect, etc.");
+ next;
+ goto L_Manaplus;
L_ExplicaTrade:
mes "";
@@ -217,7 +259,7 @@ L_ExplicaTrade:
mesn;
mesq l("Remember! You're trading things, not lending/borrowing them. You are solely responsible for everything you own.");
next;
- goto L_PreMenu;
+ goto L_Manaplus;
// TODO: We have over nine instructions here. You usually can only memorise from three to five at a time!
L_ExplicaBatalha:
@@ -246,7 +288,7 @@ mesq l("There are some stones scattered around the world that mark your point of
mesn;
mesq l("You can, however, use ##BCtrl##b to auto-select a monster and attack them. This usually also collects drops, but press Z to be sure.");
next;
- goto L_PreMenu;
+ goto L_Manaplus;
L_ExplicaDialogo:
mes "";
@@ -268,53 +310,12 @@ L_ExplicaDialogo:
mesn;
mesq l("But be careful: do not scream when using a lot of capital letters, and do not keep repeating the lines, or you may be severely penalized.");
next;
- goto L_PreMenu;
+ goto L_Manaplus;
L_Fechar:
close;
-L_OutrasInformacoes_gap:
- mes "";
- goto L_OutrasInformacoes;
-
-L_OutrasInformacoes:
- mesn;
- mesq l("What do you want to learn more about?");
- next;
- mesn strcharinfo(0);
- menu
- l("Items."), L_Itens,
- l("Monsters."), L_monstros,
- l("Styles."), L_estilo,
- l("Quests."), L_Quests,
- l("NPCs."), L_NPC,
- l("Commands."), L_comandos,
- l("Status."), L_status,
- l("Magic."), L_Magica,
- l("Shortcuts."), L_teclado,
- l("Rules."), L_regras,
- l("I changed my mind."), L_Menu_gap;
-
-L_Itens:
- mes "";
- mesn;
- mesq l("There are three types of items.");
- mesq l("Those for consumption, equipment and generics.");
- next;
- mesn;
- mesq l("Items for consumption, like potions, can only be used once.");
- mesq l("Once used, they will disappear from your inventory.");
- next;
- mesn;
- mesq l("Equippable items are armour, weapons and accessories.");
- mesq l("They can be equipped to make your look more interesting or to improve some of its features.");
- next;
- mesn;
- mesq l("Generic items are used for different purposes. In creating other items, to swap and sell, to collect, etc.");
- next;
- goto L_OutrasInformacoes;
-
-L_monstros:
+L_Monstros:
mes "";
mesn;
mesq l("Monsters are everywhere. They're a plague we're trying to get rid of.");
@@ -333,15 +334,15 @@ L_monstros:
mesq l("Normally, collaborative behave like neutral monsters. Unless some partner of the same species is in danger, at which point they all take an aggressive stance against the aggressor.");
mesq l("It's always good to see if you have a lot of them around before you think about attacking one!");
next;
- goto L_OutrasInformacoes;
+ goto L_PreMenu;
-L_estilo:
+L_Estilo:
mes "";
mesn;
mesq l("NPC stylists will cut your hair!");
mesq l("They are known to use a revolutionary hair growth formula.");
next;
- goto L_OutrasInformacoes;
+ goto L_Manaplus;
L_Quests:
mes "";
@@ -350,7 +351,10 @@ L_Quests:
mesq l("Most of these people will not think twice before giving a nice reward to anyone who helps them.");
mesq l("So be nice and help people along the way!");
next;
- goto L_OutrasInformacoes;
+ mesn;
+ mesq l("Seldomly, they'll have an exclamation mark over their heads. But some quests are hidden, so talk to people and have fun!");
+ next;
+ goto L_PreMenu;
L_NPC:
mes "";
@@ -360,9 +364,9 @@ L_NPC:
mesq l("##BIMPORTANT:##b People usually doesn't shout, they talk. Because this, if you are too far, an NPC won't hear you.");
mesq l("When this is the case, you should get closer to the NPC, until they hear you.");
mesq l("If you are above the NPC and they still doesn't hear you, this mean they are deaf - you should report this!");
- goto L_OutrasInformacoes;
+ goto L_PreMenu;
-L_comandos:
+L_Comandos:
mes "";
mesn;
mesq l("/ clear clears the text box.");
@@ -373,9 +377,9 @@ L_comandos:
mesq l("/ help explains how to use all client commands.");
mesq l("@commands lists even more advanced commands, but you can't use all of them.");
next;
- goto L_OutrasInformacoes;
+ goto L_Manaplus;
-L_status:
+L_Status:
mes "";
mesn;
mesq l("People vary greatly in the amount of strength, agility, dexterity, intelligence, vitality and luck.");
@@ -386,7 +390,7 @@ L_status:
mesq l("Your dexterity determines your ability to hit monsters and is valuable to players who prefer weapons that use projectiles.");
next;
mesn;
- mesq l("Vitality determines how resistant you are to attacks and how many blows you can take before you die.");
+ mesq l("Vitality determines how resistant you are to attacks and how many blows you can take before you die. It also affects status effects, like poison.");
mesq l("Intelligence is very useful for alchemy and magic, but nowadays there are few opportunities to use it.");
mesq l("Your luck determines several small things, including the number of critical attacks you are going to suffer and perform.");
next;
@@ -394,27 +398,27 @@ L_status:
mesq l("I recommend that you train your dexterity a great deal, since most monsters out there are hard to hit without it.");
mesq l("For now do not take too much time to work on your intelligence, after all, almost nobody have magic this day.");
next;
- goto L_OutrasInformacoes;
+ goto L_Manaplus;
L_Magica:
mes "";
mesn;
mesq l("Magic is dead. Well, not yet, we still have some mana stones left - but only the strongest ones are allowed to use them and acquire magic.");
next;
- goto L_OutrasInformacoes;
+ goto L_PreMenu;
-L_teclado:
+L_Teclado:
mes "";
mesn;
mesq l("There are many key combinations, press F1 to see a short list of them!");
next;
- goto L_OutrasInformacoes;
+ goto L_Manaplus;
-L_regras:
+L_Regras:
mes "";
callfunc "GameRules";
next;
- goto L_OutrasInformacoes;
+ goto L_PreMenu;
L_Menu_gap:
mes "";
diff --git a/npc/006-1/_import.txt b/npc/006-1/_import.txt
new file mode 100644
index 000000000..c5c393844
--- /dev/null
+++ b/npc/006-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 006-1: Crazyfefe's Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/006-1/barrier.txt",
+"npc/006-1/crazyfefe.txt",
+"npc/006-1/mapflags.txt",
diff --git a/npc/006-1/barrier.txt b/npc/006-1/barrier.txt
new file mode 100644
index 000000000..99598d9cc
--- /dev/null
+++ b/npc/006-1/barrier.txt
@@ -0,0 +1,14 @@
+// TMW2 Script
+// Author:
+// Crazyfefe
+// Jesusalva
+
+006-1,49,54,0 script #FightCaveBarrier NPC_NO_SPRITE,0,0,{
+ if ($@FEFE_CAVE_LEVEL) goto L_Block;
+ warp "005-1", 59, 53;
+ end;
+
+L_Block:
+ dispbottom l("Your coward outer self fails to convince you to leave.");
+ end;
+}
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
new file mode 100644
index 000000000..bccfb3eb1
--- /dev/null
+++ b/npc/006-1/crazyfefe.txt
@@ -0,0 +1,283 @@
+// TMW2 Script
+// Author:
+// TMW Org. (original code)
+// Jesusalva
+// Description:
+// Crazyfefe will wake up when he smells battle
+// Variables:
+// $@FEFE_CAVE_LEVEL
+// Tracks if a fight is going on, and the current round if true.
+// $@FEFE_DELAY
+// Tracks the delay between challenges. Also used to start the combat. Set it to zero so you can start fight at once.
+// $@FEFE_CAVE_HERO$
+// Whoever started a fight. Also used to know if a fight is about to begin.
+// $@FEFE_CAVE_PLAYER_COUNT
+// How many players are there
+// $@FEFE_WAVE
+// Current wave
+// $@GM_OVERRIDE
+// Only possible with @set command, overrides the co-op requeriment. Affects other scripts.
+
+006-1,47,22,0 script Crazyfefe NPC_STATUE_EVILMAN,{
+ if ($@FEFE_CAVE_LEVEL) goto L_Enjoy;
+ if ($@FEFE_DELAY > gettimetick(2)) goto L_Wait;
+ mesn;
+ mesq l("Who dares to disturb my slumber?");
+ next;
+ menu
+ l("Sorry, sorry! Please rest, great Crazyfefe!"), L_Exit,
+ l("I do. I want to challenge the Candor Cave!"), L_Next,
+ l("What is this place anyway?"), L_Explain;
+
+L_Next:
+ mesn;
+ mesq l("Very well, but for a fee of @@ GP. There's no free lunch, after all!", .price);
+ select
+ l("Sorry, I misclicked the first button. Have a nice nap, great Crazyfefe!"),
+ l("Yeah, I have the money. Give me FIVE minutes, and Bring it on!"),
+ l("Yeah, I have the money. Give me TEN minutes, and Bring it on!"),
+ l("Yeah, I have the money. Give me FIFTEEN minutes, and Bring it on!"),
+ "","",
+ rif(is_gm(), l("I'm GM and got the money. Gimme HALF HOUR to invite everybody!"));
+
+ // Cancel?
+ if (@menu == 1)
+ goto L_Exit;
+
+ // Already started?
+ if ($@FEFE_CAVE_LEVEL || $@FEFE_CAVE_HERO$ != "")
+ goto L_AlreadyStarted;
+
+ // Enough money?
+ if (Zeny < .price)
+ goto L_NotEnough;
+
+ Zeny = Zeny - .price;
+ // Time delay
+ $@FEFE_DELAY = gettimetick(2)+300*(@menu-1);
+ $@FEFE_CAVE_HERO$ = strcharinfo(0);
+ initnpctimer;
+ announce $@FEFE_CAVE_HERO$+" invites everyone to a challenge against Candor Cave. It'll start in "+FuzzyTime($@FEFE_DELAY,2,2)+". Prepare yourselves!", bc_all|bc_npc;
+ mesn;
+ mesq l("Please wait, the fight will start in @@, as requested.", FuzzyTime($@FEFE_DELAY,2,2));
+ close;
+
+L_StartFight:
+ if (getmapusers("006-1") < 3 && !$@GM_OVERRIDE)
+ goto L_NotEnoughPlayers;
+
+ $@FEFE_CAVE_LEVEL = 1;
+ $@FEFE_DELAY = gettimetick(2)+.delay;
+ $@FEFE_CAVE_PLAYER_COUNT = getmapusers("006-1");
+ mapannounce("006-1", "The battle is about to begin!", bc_map);
+ killmonsterall("006-1"); // Saulc likes to spawn stuff to heat stuff up
+ initnpctimer;
+ end;
+
+L_Enjoy:
+ npctalk3 l("Pay attention to the fight, @@!", strcharinfo(0));
+ if (is_gm())
+ dispbottom l("Round @@", $@FEFE_CAVE_LEVEL);
+ end;
+
+L_NotEnough:
+ mesn;
+ mesq l("You lack money. Go sell your stuff. And don't ask why a statue needs money!");
+ close;
+
+L_AlreadyStarted:
+ mesn;
+ mesq l("Sorry, @@ already started the fight.", $@FEFE_CAVE_HERO$);
+ close;
+
+L_Wait:
+ .@time$=FuzzyTime($@FEFE_DELAY,2,2);
+ if ($@FEFE_DELAY-gettimetick(2) <= 30) {
+ npctalk3 l("@@!", .@time$);
+ end;
+ }
+ mesn;
+ mesq l("Be Patient... You still need to wait @@.", .@time$);
+ goto L_Exit;
+
+L_NotEnoughPlayers:
+ mapannounce("006-1", "Oh noes! There's not enough players. Fight aborted, no refunds!", bc_map);
+ goto L_CleanUp;
+
+L_Explain:
+ mesn;
+ mesq l("I am @@, guardian of Candor Cave. Below this cave, lies the legendary Fefe, arch-wizard from the Great War.", .name$);
+ next;
+ mesn;
+ mesq l("During the war, the Monster King cursed the place where he died, but he fought back, and cursed the curse.");
+ next;
+ mesn;
+ mesq l("For short, they had a fight with curses, and now there's a talking statue over his grave which can spawn monsters here.");
+ next;
+ mesn;
+ mesq l("If you pay the fee, I'll spawn them, for no longer than 20 minutes. You should not fight alone, instead, you need a group of at least three, because, you know, the curse. Or something.");
+ next;
+ menu
+ l("I need to think about this."), L_Exit,
+ l("I'm interested."), L_Next;
+
+L_Exit:
+ close;
+
+
+
+
+
+
+
+// Check if we're ready for next wave. Otherwise, do this check again after 5 seconds.
+L_CaveLogic:
+ .wtime+=5; // This is looped every 5 s
+ $@FEFE_CAVE_PLAYER_COUNT = getmapusers("006-1");
+
+ // New wave condition: All mobs dead, or 5 minutes have passed
+ if (mobcount("006-1", "Crazyfefe::OnPetDeath") <= 0 || .wtime >= 240)
+ goto L_NextRound;
+
+ // Victory conditions: Too few players are alive OR twenty minutes went on.
+ // WARNING, dead players still in cave are counted, we might never finish the fight.
+ // And a GM might be called to ban everyone inside.
+ if ($@FEFE_CAVE_PLAYER_COUNT <= any(1,1,1,1,1,1,1,1,1,2) && !$@GM_OVERRIDE || gettimetick(2) >= $@FEFE_DELAY - (60*20)) {
+ goto L_CleanUp;
+ }
+
+ // reset timer
+ initnpctimer;
+ end;
+
+L_NextRound:
+ .wtime=0;
+ $@FEFE_WAVE = $@FEFE_WAVE + 1;
+ // Prepare next round, and reward survivors
+ $@FEFE_CAVE_LEVEL = $@FEFE_CAVE_LEVEL + $@FEFE_CAVE_PLAYER_COUNT + rand(1,3) + $@FEFE_WAVE;
+ areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
+
+ mapannounce "006-1", "The wave nº "+$@FEFE_WAVE+" is starting with " + $@FEFE_CAVE_PLAYER_COUNT + " player(s) left alive." , 0;
+ goto L_Summon;
+
+// TODO
+L_Summon:
+ .@amount=($@FEFE_CAVE_LEVEL/rand(4,6))+1;
+ freeloop(true);
+ for (.@i = 0; .@i < .@amount; ++.@i) {
+ .@mid=rand(1,22);
+ .@monsterId=Piou;
+ switch (.@mid) {
+ case 1:
+ .@monsterId = CaveMaggot ; break;
+ case 2:
+ //.@monsterId = Wolvern ; break;
+ .@monsterId = FallenGuard2 ; break;
+ case 3:
+ .@monsterId = DarkLizard ; break;
+ case 4:
+ .@monsterId = MagicGoblin ; break;
+ case 5:
+ .@monsterId = Bandit ; break;
+ case 6:
+ .@monsterId = GreenSlime ; break;
+ case 7:
+ .@monsterId = LavaSlime ; break;
+ case 8:
+ .@monsterId = Snake ; break;
+ case 9:
+ .@monsterId = DesertBandit ; break;
+ case 10:
+ .@monsterId = Sarracenus ; break;
+ case 11:
+ .@monsterId = AngryRedScorpion ; break;
+ case 12:
+ .@monsterId = BlackScorpion ; break;
+ case 13:
+ .@monsterId = FallenGuard1 ; break;
+ case 14:
+ .@monsterId = Yeti ; break;
+ case 15:
+ .@monsterId = BlackSlime ; break;
+ //.@monsterId = JackO ; break;
+ case 16:
+ .@monsterId = RobinBandit ; break;
+ case 17:
+ .@monsterId = CandiedSlime ; break;
+ case 18:
+ .@monsterId = BlackMamba ; break;
+ case 19:
+ .@monsterId = WickedMushroom ; break;
+ case 20:
+ .@monsterId = BlackSlime ; break;
+ case 21:
+ .@monsterId = RedMushroom ; break;
+ default:
+ .@monsterId = AngryScorpion ; break;
+ }
+ areamonster "006-1", 20, 20, 70, 60, strmobinfo(1, .@monsterId), .@monsterId, 1, "Crazyfefe::OnPetDeath";
+ }
+ freeloop(false);
+ initnpctimer;
+ end;
+
+L_CleanUp:
+ mapannounce "006-1", "Game over! Who will be the next to fall on Crazyfefe's Cave?", 0;
+
+ areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
+ $@FEFE_CAVE_LEVEL = 0;
+ $@FEFE_WAVE = 0;
+ $@FEFE_CAVE_HERO$ = "";
+ .wtime=0;
+ killmonster "006-1", "Crazyfefe::OnPetDeath";
+ stopnpctimer;
+ initnpctimer;
+ stopnpctimer;
+ end;
+
+
+
+
+
+
+
+
+// Rewards surviving players between rounds, according to performance, and get rid of dead PCs.
+OnReward:
+ if (ispcdead()) {
+ recovery();
+ warp "Save", 0, 0;
+ end;
+ }
+ // Player reward is a random number based on current wave + lvl/50 (1 point ~= 12~8 mobs)
+ .@prize=rand($@FEFE_WAVE/2,$@FEFE_WAVE) + ($@FEFE_CAVE_LEVEL/50);
+ Zeny=Zeny+.@prize;
+ getexp .@prize, rand(1,3);
+ end;
+
+// Every 5 seconds, handle cave, if fighting. Does nothing when waiting.
+OnTimer5000:
+ if ($@FEFE_CAVE_LEVEL)
+ goto L_CaveLogic;
+ end;
+
+// Announces and attempts to start the fight once time run out
+//OnTimer30000: // If you need to start without 5 minutes delay, this line must be uncommented.
+OnTimer300000:
+ if ($@FEFE_CAVE_LEVEL > 0) end;
+ if ($@FEFE_DELAY <= gettimetick(2)) goto L_StartFight;
+ announce $@FEFE_CAVE_HERO$+" invites everyone to a challenge against Candor Cave. It'll start in "+FuzzyTime($@FEFE_DELAY,2,2)+". Prepare yourselves!", bc_all|bc_npc;
+ initnpctimer;
+ end;
+
+OnPetDeath:
+ end;
+
+OnInit:
+ .sex=G_OTHER;
+ .distance=5;
+ .price=6000;
+ .delay=(60*40);
+ .wtime=0;
+ end;
+}
diff --git a/npc/006-1/mapflags.txt b/npc/006-1/mapflags.txt
new file mode 100644
index 000000000..4840d4ba7
--- /dev/null
+++ b/npc/006-1/mapflags.txt
@@ -0,0 +1,3 @@
+006-1 mapflag nosave 005-1,61,54
+006-1 mapflag nopenalty
+006-1 mapflag bexp 115
diff --git a/npc/007-1/_import.txt b/npc/007-1/_import.txt
index d9dd3f9bb..79c6fdd2e 100644
--- a/npc/007-1/_import.txt
+++ b/npc/007-1/_import.txt
@@ -2,4 +2,4 @@
// 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/tycoon.txt", \ No newline at end of file
+"npc/007-1/tycoon.txt",
diff --git a/npc/007-1/_mobs.txt b/npc/007-1/_mobs.txt
index a3e403378..2477c31f0 100644
--- a/npc/007-1/_mobs.txt
+++ b/npc/007-1/_mobs.txt
@@ -1,11 +1,13 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 007-1: Tulimshar Mining Camp mobs
-007-1,135,101,43,90 monster Cave Maggot 1027,35,35000,300000
-007-1,120,43,10,7 monster Black Scorpion 1074,3,35000,300000
-007-1,65,60,19,15 monster Ratto 1005,3,35000,300000
-007-1,59,50,19,23 monster Piou 1002,3,35000,300000
-007-1,113,140,57,52 monster Cave Snake 1035,25,35000,300000
-007-1,52,156,37,29 monster Red Scorpion 1072,10,35000,300000
-007-1,34,125,7,6 monster Cave Maggot 1027,4,35000,300000
-007-1,84,72,75,57 monster Cave Bat 1039,6,35000,300000
-007-1,99,99,99,99 monster Ruby Bif 1099,8,35000,300000
+007-1,140,101,43,90 monster Cave Maggot 1027,38,35000,300000,Tycoon::OnKillCaveMaggot
+007-1,129,45,14,9 monster Black Scorpion 1074,4,35000,220000,Tycoon::OnKillBlackScorpion
+007-1,70,60,19,15 monster Ratto 1005,3,35000,300000,Tycoon::OnKillRatto
+007-1,64,50,19,23 monster Piou 1002,3,35000,300000
+007-1,118,140,57,52 monster Cave Snake 1035,25,35000,300000,Tycoon::OnKillCaveSnake
+007-1,57,156,37,29 monster Red Scorpion 1072,10,35000,300000,Tycoon::OnKillRedScorpion
+007-1,39,125,7,6 monster Cave Maggot 1027,5,35000,300000,Tycoon::OnKillCaveMaggot
+007-1,89,72,75,57 monster Cave Bat 1039,7,35000,300000
+007-1,104,99,99,99 monster Ruby Bif 1099,9,35000,300000
+007-1,117,94,10,7 monster Black Scorpion 1074,1,35000,300000,Tycoon::OnKillBlackScorpion
+007-1,93,110,9,9 monster Cave Maggot 1027,8,35000,300000,Tycoon::OnKillCaveMaggot
diff --git a/npc/007-1/_warps.txt b/npc/007-1/_warps.txt
index 64f5e9e5a..ff417a276 100644
--- a/npc/007-1/_warps.txt
+++ b/npc/007-1/_warps.txt
@@ -1,4 +1,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 007-1: Tulimshar Mining Camp warps
-007-1,51,37,0 warp #007-1_51_37 0,0,004-1,33,110
-007-1,85,52,0 warp #007-1_85_52 0,0,004-1,92,115
+007-1,56,37,0 warp #007-1_56_37 0,0,004-1,33,110
+007-1,90,52,0 warp #007-1_90_52 0,0,004-1,92,115
diff --git a/npc/007-1/caelum.txt b/npc/007-1/caelum.txt
new file mode 100644
index 000000000..6aaa2aa0a
--- /dev/null
+++ b/npc/007-1/caelum.txt
@@ -0,0 +1,154 @@
+// TMW2 Script
+// Author:
+// SkyDragon
+// Saulc
+// Reviewer:
+// Jesusalva
+// Description:
+// Caelum Miner, main author Skydragon Caelum mean Sky in Latin.
+// id:193 MineQuests_Caelum
+
+007-1,143,49,0 script Caelum NPC_PLAYER,{
+ .@Miner = getq(MineQuest_Caelum);
+ if (BaseLevel < 28) goto L_TooWeak;
+ if (.@Miner == 1) goto L_Check;
+ if (.@Miner == 2) goto L_Complete;
+
+L_GiveTask:
+ mesn;
+ mesq lg("Hello, wanderer!");
+ next;
+ mesq l("How did you end up here?");
+ next;
+
+ menu
+ l("To be honest, I don't know. I was only walking, seeking for adventure!"), L_Quest,
+ l("It's none of your business."), L_Quit;
+
+
+L_Quest:
+ mes "";
+ mesn;
+ mesq l("You perchance said in adventure? Good, because I just hurt my arm while mining!");
+ next;
+ mesn;
+ mesq l("If you bring me some items to I do a bandage and heal myself, I'll give you my gloves!");
+ next;
+
+ menu
+ l("Really? What do you need?"), L_Start,
+ l("Better do this some other time..."), L_Quit;
+
+
+L_Start:
+ setq MineQuest_Caelum, 1;
+ mes "";
+ mesn;
+ mesq l("Ok, what I need is:");
+ goto L_List;
+
+L_Quit:
+ mes "";
+ mesn;
+ mesq l("Alright.");
+ close;
+
+L_List:
+ mes "";
+ mesn;
+ mes l("Here's what I need:");
+ mes l("@@/1 @@", countitem(Lifestone), getitemlink(Lifestone));
+ mes l("@@/1 @@", countitem(CottonCloth), getitemlink(CottonCloth));
+ mes l("@@/2 @@", countitem(BlackScorpionStinger), getitemlink(BlackScorpionStinger));
+ mes l("@@/5 @@", countitem(ScorpionClaw), getitemlink(ScorpionClaw));
+ mes l("@@/10 @@", countitem(BatTeeth), getitemlink(BatTeeth));
+ mes l("@@/10 @@", countitem(CactusDrink), getitemlink(CactusDrink));
+ mes l("@@/20 @@", countitem(MaggotSlime), getitemlink(MaggotSlime));
+ mes l("@@/8 @@, just because I'm hungry as a bear.", countitem(BugLeg), getitemlink(BugLeg));
+ close;
+
+L_Check:
+ mesn;
+ mesq l("Did you brought me everything I asked for?");
+ next;
+ menu
+ l("Yes!"), L_Give,
+ l("I forgot what you need!"), L_List,
+ l("No!"), L_Quit;
+
+L_Give:
+ if (
+ countitem(Lifestone) < 1 ||
+ countitem(CottonCloth) < 1 ||
+ countitem(BlackScorpionStinger) < 2 ||
+ countitem(BugLeg) < 8 ||
+ countitem(BatTeeth) < 10 ||
+ countitem(CactusDrink) < 10 ||
+ countitem(MaggotSlime) < 20 ||
+ countitem(ScorpionClaw) < 5
+ ) goto L_Lying;
+
+ inventoryplace MinerGloves, 1;
+
+ delitem(Lifestone, 1);
+ delitem(CottonCloth, 1);
+ delitem(BlackScorpionStinger, 2);
+ delitem(BugLeg, 8);
+ delitem(BatTeeth, 10);
+ delitem(CactusDrink, 10);
+ delitem(MaggotSlime, 20);
+ delitem(ScorpionClaw, 5);
+
+ getitem(MinerGloves, 1);
+ getexp(855, 3);
+ setq(MineQuest_Caelum, 2);
+
+ mes "";
+ mesn;
+ mesq l("Here, all yours. I can't use them like I am now. Thank you.");
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("Wandering too much? Take care to don't get lost.");
+ close;
+
+// Funnier to write than to read, but the player lied. :angel:
+L_Lying:
+ mesn;
+ mesq l("No no no, that's wrong.");
+ next;
+ mesc l("The miner goes to count your stuff again.");
+ next;
+ mesc l("And again.");
+ next;
+ mesc l("And again, and again.");
+ next;
+ mesc l("And again, and again, again.");
+ next;
+ mesc l("You wonder, maybe he entered on an infinite loop? Hellooo, anybody home?");
+ next;
+ mesn;
+ mesq l("No no no, you don't have everything I've asked for!");
+ next;
+ goto L_List;
+
+L_TooWeak:
+ mesn;
+ mesq l("Wanderer, here is dangerous! Go back!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, MinerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, LeatherShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 4);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 3);
+
+ .sex = G_MALE;
+ .distance = 4;
+
+ end;
+}
diff --git a/npc/007-1/dracoula.txt b/npc/007-1/dracoula.txt
new file mode 100644
index 000000000..1c9f99c4c
--- /dev/null
+++ b/npc/007-1/dracoula.txt
@@ -0,0 +1,153 @@
+// TMW2 Script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Dracoula is daily npc, ask for bat teeth every 23 h
+// Variable:
+// MineQuest_Dracoula
+
+007-1,170,99,0 script Dracoula NPC_UKAR_F,{
+ mesn;
+ mesq lg("Hello adventurer! Are you lost?");
+ next;
+ mesq l("This is not a place for non-experimented people!");
+ next;
+ mesq l("Mine exit is top left!");
+ mes "";
+ if (BaseLevel >= 15) goto L_Menu;
+ close;
+
+L_Menu:
+ mesn;
+ mesq l("But as you're here now, could you do me a favour?");
+ mes "";
+ menu
+ l("Hum, Which type of favor?"),L_Quest,
+ l("Can I find a mana source here?"),L_Mana,
+ l("Can I become a miner?"),L_Miner,
+ l("No, thanks. I gonna leave this place."),L_Close;
+
+L_Quest:
+ mes "";
+ .@q=getq(MineQuest_Dracoula);
+ if (!.@q) {
+ mesn;
+ mesq l("Nice! First let me introduce myself. I am Dracoula, a miner!");
+ next;
+ mesn;
+ mesq l("I mine here since a while. My favorite activity it's to scare others miners!");
+ next;
+ }
+ if (.@q == 0) goto L_Continue;
+ .@q2=getq2(MineQuest_Dracoula) + 60 * 60 * 23;
+ if (santime() >= .@q2) goto L_Repeat;
+ mesn;
+ mesq l("But come back in a few hours, I didn't lost all @@!", getitemlink(BatTeeth));
+ close;
+
+L_Continue:
+ mesq l("I love seeing their terrorize face.");
+ mes "";
+ menu
+ l("Ok. Cool life!"), L_Close,
+ l("Haha, Nice, but how do you do that?"), L_Next;
+
+L_Next:
+ mes "";
+ mesq l("I disguise myself into a giant mutated bat, but every time I break or lose my fake teeth.");
+ next;
+ mesq l("I usually ask adventurers for 11 @@, but new miners should be arriving soon. I need to make them cry!", getitemlink(BatTeeth));
+ next;
+ mesq l("So it could be nice, if you could bring me 20 @@,", getitemlink(BatTeeth));
+ mes "";
+ menu
+ rif(countitem(BatTeeth) >= 20, l("Hey! I already got them!")), L_Finish,
+ l("I'll get to it."), L_Close;
+ close; // double sure
+
+L_Repeat:
+ mesn;
+ if (getequipid(EQI_HEAD_TOP) > 0)
+ mesq l("Oh it's you @@, I did not recognize you with your hat!", strcharinfo(0));
+ else
+ mesq l("Oh it's you @@, I did not recognize you without a hat!", strcharinfo(0));
+ next;
+ mesq l("Do you have an extra of 11 @@ for me?", getitemlink(BatTeeth));
+ mes "";
+ menu
+ rif(countitem(BatTeeth) >= 11, l("Yep, I bring them for you!")), L_Finish2,
+ l("Actually not."), L_Close;
+ close;
+
+// First Time Only
+L_Finish:
+ delitem BatTeeth, 20;
+ getexp 666, 5; // 20 / 18% = 111 kills * 15 xp = 1665 xp gained from killing. (40% bonus)
+ Zeny = (Zeny + 240); // 3*20 = 60 base (400% bonus)
+ setq MineQuest_Dracoula, 1, santime();
+ mes "";
+ mesn;
+ mesq l("WAW thank you! Come back later to bring me extra @@!", getitemlink(BatTeeth));
+ close;
+
+// Repeat
+L_Finish2:
+ delitem BatTeeth, 11;
+ getexp 275, 1; // 11 / 18% = 61 kills * 15 xp = 915 xp gained from killing. (30% bonus)
+ Zeny = (Zeny + 120); // 3*11 = 33 base (x% bonus)
+ setq MineQuest_Dracoula, 1, santime();
+ mes "";
+ mesn;
+ mesq l("So COOL, thanks! Come back later to bring me extra @@!", getitemlink(BatTeeth));
+ close;
+
+L_Mana:
+ mes "";
+ mesn;
+ mesq l("Ah! Actually nobody found one.");
+ next;
+ mesn;
+ mesq l("But it's ultimate goal of miners there.");
+ next;
+ mesn;
+ mesq l("If one of us found a Mana stone. They would become rich!");
+ next;
+ mesn;
+ mesq l("Twelve times more if it is an elusive Mana Fragment no one knows where they are!");
+ next;
+ mesn;
+ mesq l("That is.");
+ next;
+ goto L_Menu;
+
+L_Miner:
+ mes "";
+ mesn;
+ mesq l("You should ask Tycoon.");
+ next;
+ mesn;
+ mesq l("He is the Miners leader.");
+ next;
+ goto L_Menu;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, MinerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ArtisTankTop);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 8);
+
+ .sex = G_FEMALE;
+ .distance = 4;
+
+ end;
+}
+
diff --git a/npc/007-1/pylon.txt b/npc/007-1/pylon.txt
new file mode 100644
index 000000000..c68e3763a
--- /dev/null
+++ b/npc/007-1/pylon.txt
@@ -0,0 +1,145 @@
+// TMW2 scripts.
+// TMW2 Authors:
+// Saulc
+// Jesusalva
+// Description:
+// Miner Pylon transforme gems into gem powder, he ask for 100gp + 1 gem and give 100 EXp (each time) + 1 to 3 gem powder's.
+// Variable:
+// dont need variable
+// Reference:
+// https://fr.wikipedia.org/wiki/Pilon#Objets not Epiphysis !
+
+007-1,47,44,0 script Pylon NPC_PLAYER,{
+
+ mesn;
+ mesq l("Hello, I'm Pylon!");
+ next;
+ mesq l("I work in this mine since 3 years, I'm an expert on gems: Ruby, Topaz, Sapphire, You know!");
+ next;
+ mesq l("If you have some gems, I can transform them into powder.");
+ next;
+ mesq l("I only take a tax of 100 gp per gem.");
+ if (Zeny < 100)
+ close;
+ next;
+ mesq lg("Then, would you like me to transform one of your gems?");
+ next;
+ goto L_Menu;
+
+L_Menu:
+ mesn strcharinfo(0);
+ // We could add a drag zone, and allow players to drag their gems, but... Meh.
+ select
+ l("Hum, how many gem powders can I get from one gem?"),
+ rif(countitem(Diamond) >= 1 && Zeny >= 100, l("Yeah sure, take my Diamond!")),
+ rif(countitem(Ruby) >= 1 && Zeny >= 100, l("Yeah sure, take my Ruby!")),
+ rif(countitem(Emerald) >= 1 && Zeny >= 100, l("Yeah sure, take my Emerald!")),
+ rif(countitem(Sapphire) >= 1 && Zeny >= 100, l("Yeah sure, take my Sapphire!")),
+ rif(countitem(Topaz) >= 1 && Zeny >= 100, l("Yeah sure, take my Topaz!")),
+ rif(countitem(Amethyst) >= 1 && Zeny >= 100, l("Yeah sure, take my Amethyst!")),
+ rif(countitem(IronOre) >= 1 && Zeny >= 100, l("And what's about Iron Ore?")),
+ l("No, thanks, I will keep my gems.");
+
+ mes "";
+
+ switch (@menu) {
+ case 1:
+ goto L_Question;
+ break;
+ case 8:
+ goto L_Ore;
+ break;
+ case 9:
+ close;
+ break;
+ default:
+ goto L_Powder;
+ break;
+ }
+
+L_Question:
+ mesn;
+ mesq lg("That depends on your luck!");
+ next;
+ mesq l("With one gem you can expect to get 1 to 3 powders!");
+ next;
+ mesc l("We must blame Saulc!");
+ next;
+ mesq lg("By the way would you like to transform your gem?");
+ next;
+ goto L_Menu;
+
+L_Ore:
+ mesn;
+ mesq l("Hum... I'm not really good at it.");
+ next;
+ mesn;
+ mesq l("But I can try my best for you!");
+ next;
+ mesn;
+ mesq l("If you want it?");
+ next;
+ goto L_MenuOre;
+
+L_MenuOre:
+ menu
+ rif(countitem(IronOre) >= 1 && Zeny >= 100, l("Make me an Iron Powder.")), L_OreOk,
+ l("Nah, thank you."), L_Close;
+
+L_OreOk:
+ // Amount iron ore
+ .@amo=rand(1,2);
+
+ delitem IronOre, 1;
+ Zeny = Zeny - 100;
+ getexp 10, 0;
+ inventoryplace IronPowder, .@amo;
+ getitem IronPowder, .@amo;
+ mes "";
+ mesn;
+ mesq l("Here you go, I tried my best! Do you want another?");
+ next;
+ goto L_MenuOre;
+
+
+// Must rework IDs
+L_Powder:
+ // Magic
+ .@id=Diamond+@menu-2;
+ .@pw=DiamondPowder+@menu-2;
+
+ // Amount
+ .@am=rand(1,3);
+
+ delitem .@id, 1;
+ Zeny = Zeny - 100;
+ getexp 60, 0;
+
+
+ inventoryplace .@pw, .@am;
+ getitem .@pw, .@am;
+
+ mes "";
+ mesn;
+ mesq l("Here is your powder! I hope it will be useful.");
+ next;
+ mesq l("Would you like to transform one more?");
+ next;
+ goto L_Menu;
+
+
+L_Close:
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, MinerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ArtisTankTop);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 15);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/007-1/torches.txt b/npc/007-1/torches.txt
new file mode 100644
index 000000000..0dff30ac1
--- /dev/null
+++ b/npc/007-1/torches.txt
@@ -0,0 +1,153 @@
+// TMW-2 script.
+// Author:
+// Crazyfefe
+// Jesusalva
+// Description:
+// Torches
+// Variables:
+// TulimsharQuest_DarkInvocator
+// Values:
+// 0 Default.
+// 1 Quest Found.
+// 2 Quest Accepted.
+// 3 Bomb Defused.
+// 4 Quest Completed.
+
+
+function script CheckTorch {
+ @torch_count = 0;
+ @count_tmp = 0;
+ if (debug)
+ npctalk3 l("Hello, I am T-@@, of the @@ order.", @torch, $@TorchBits[@torch]);
+ if (getq2(TulimsharQuest_DarkInvocator) & $@TorchBits[@torch])
+ goto L_Empty;
+ if (countitem(EverburnPowder) <= 0) {
+ dispbottom(l("I do not have Everburn Powder to lit the torch."));
+ end;
+ }
+ setq2 TulimsharQuest_DarkInvocator, getq2(TulimsharQuest_DarkInvocator) | $@TorchBits[@torch];
+
+ goto L_Loop;
+
+L_TorchTally:
+ specialeffect(62);
+ specialeffect(54);
+ getmapxy(@m$, .@x, .@y, 0);
+
+ switch (@torch_count) {
+ case 1:
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 4, "Zarkor::OnMonster";
+ break;
+ case 2:
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 5, "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 1, "Zarkor::OnMonster";
+ break;
+ case 3:
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 6, "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 5, "Zarkor::OnMonster";
+ break;
+ case 4:
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Black Scorpion", BlackScorpion, 1, "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 6, "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 7, "Zarkor::OnMonster";
+ break;
+ case 5:
+ areamonster @m$, .@x-3, .@y-3, .@x+3, .@y+3, "Black Scorpion", BlackScorpion, 3, "Zarkor::OnMonster";
+ areamonster @m$, .@x-3, .@y-3, .@x+3, .@y+3, "Magic Maggot", CaveMaggot, 8, "Zarkor::OnMonster";
+ areamonster @m$, .@x-3, .@y-3, .@x+3, .@y+3, "Magic Goblin", MagicGoblin, 10, "Zarkor::OnMonster";
+ break;
+ default:
+ dispbottom l("BUG, Please report: TorchTally, err_val @@", @torch_count);
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Black Scorpion", BlackScorpion, rand(1,2), "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, rand(1,3), "Zarkor::OnMonster";
+ areamonster @m$, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, rand(1,5), "Zarkor::OnMonster";
+ }
+
+ delitem EverburnPowder, 1;
+ if (@torch_count == 5) {
+ message strcharinfo(0), l("All torches are lit!");
+ //killmonsterall("007-1");
+ setq1 TulimsharQuest_DarkInvocator, 6;
+ }
+
+ return;
+
+L_Loop:
+ while (@count_tmp < 5) {
+ @count_tmp = (@count_tmp + 1);
+ if (getq2(TulimsharQuest_DarkInvocator) & $@TorchBits[@count_tmp])
+ @torch_count = (@torch_count + 1);
+ }
+ goto L_TorchTally;
+
+L_Empty:
+ message strcharinfo(0), l("This torch is already lit.");
+ return;
+
+}
+
+007-1,171,145,0 script Torch#1 NPC_NO_SPRITE,{
+ @torch = 1;
+ .@q = getq(TulimsharQuest_DarkInvocator);
+ if (.@q == 5) {
+ CheckTorch();
+ npctalk(l("What is @@ doing?", strcharinfo(0)), "Miner#SkyDG");
+ }
+ end;
+OnInit:
+ // Remember: array start at zero, but barrels count start at 1. "Fixing" may break torch 5!
+ setarray $@TorchBits, (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6);
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
+
+007-1,70,116,0 script Torch#2 NPC_NO_SPRITE,{
+ @torch = 2;
+ .@q = getq(TulimsharQuest_DarkInvocator);
+ if (.@q == 5) {
+ CheckTorch();
+ }
+ end;
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
+
+007-1,67,133,0 script Torch#3 NPC_NO_SPRITE,{
+ @torch = 3;
+ .@q = getq(TulimsharQuest_DarkInvocator);
+ if (.@q == 5) {
+ CheckTorch();
+ }
+ end;
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
+007-1,40,125,0 script Torch#4 NPC_NO_SPRITE,{
+ @torch = 4;
+ .@q = getq(TulimsharQuest_DarkInvocator);
+ if (.@q == 5) {
+ CheckTorch();
+ }
+ end;
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
+007-1,144,24,0 script Torch#5 NPC_NO_SPRITE,{
+ @torch = 5;
+ .@q = getq(TulimsharQuest_DarkInvocator);
+ if (.@q == 5) {
+ CheckTorch();
+ }
+ end;
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
diff --git a/npc/007-1/zarkor.txt b/npc/007-1/zarkor.txt
new file mode 100644
index 000000000..a9e6c12d1
--- /dev/null
+++ b/npc/007-1/zarkor.txt
@@ -0,0 +1,228 @@
+// TMW2 Script
+// Author:
+// Crazyfefe
+// Jesusalva
+// Description:
+// Dark Invocator Quest
+// Notes:
+// You'll be tempted to sell the Dark Desert Mushroom for 8'000 GP. There's a but.
+// You won't be able to finish this quest. Ok, no biggie, it was not that rewarding.
+// But you won't be able to do more Everburn Powder. And it can be required on another
+// quest. And there won't be other way to get the Powder. So DO NOT SELL IT. Think ahead.
+
+007-1,157,155,0 script Zarkor NPC_MIRAJ,{
+ .@q=getq(TulimsharQuest_DarkInvocator);
+ if (BaseLevel <= 30)
+ goto L_Weak;
+ switch (.@q) {
+ case 0:
+ goto L_Start;
+ break;
+ case 1:
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Talk to Zitoni, the Alchemist of Candor. He may look humble, but he is the greatest alchemist of this world. I need five @@.", getitemlink(EverburnPowder));
+ close;
+ break;
+ case 2:
+ goto L_Price;
+ break;
+ case 3:
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Talk to Zitoni, and deliver the @@. I can't give you another one, they're super rare.", getitemlink(DarkDesertMushroom));
+ close;
+ break;
+ case 4:
+ goto L_Quest;
+ break;
+ case 5:
+ mesn "Saulc, the Bug Master";
+ mesq col("What, are we really letting you do something so insane as summoning the Monster King?! Blame Saulc!!");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("You didn't lit every torch yet! Hurry up!!");
+ close;
+ break;
+ case 6:
+ if (getq2(TulimsharQuest_DarkInvocator) == 0) {
+ setq TulimsharQuest_DarkInvocator, 4;
+ goto L_Quest;
+ }
+ goto L_Ritual;
+ break;
+
+ }
+ mesn;
+ mesq l("One day... One day! ONE DAY I'LL GET REVENGE ON YOU, MONSTER KING!");
+ close;
+
+L_Weak:
+ mesn;
+ mesq lg("Stay out of harm way. Nothing to see here. Stay away, pathetically weak human.");
+ close;
+
+L_Start:
+ mesn;
+ mesq l("Hey... You... Come here.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("I am Zarkor, the Dark Summoner. I want to do a dark summoning ritual, but there are strings attached.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("I need to buy your silence. I'll reward you greatly when I'm done. But first, I need to know if you'll be loyal to me.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("To prove me your faith, bring me 1 @@ or 1 @@.",getitemlink(Ruby),getitemlink(Topaz));
+ mesq l("Such precious gem, is not something you would give for free, unless you are interested on my... rituals.");
+ next;
+ mesn strcharinfo(0);
+ select
+ l("Indeed. Sorry. I'm not giving you anything."),
+ rif(countitem(Ruby) >= 1, l("I swear silence, over this bloody ruby.")),
+ rif(countitem(Topaz) >= 1, l("I swear silence, over this shining topaz."));
+
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesn;
+ mesq l("Very well. This conversation never happened.");
+ next;
+ mesn;
+ mesq l("But if you regret this choice later... You know where you can find me.");
+ close;
+ break;
+ case 2:
+ delitem Ruby, 1; // Acc: 712 GP
+ setq TulimsharQuest_DarkInvocator, 1;
+ break;
+ case 3:
+ delitem Topaz, 1; // Acc: 825 GP
+ setq TulimsharQuest_DarkInvocator, 1;
+ break;
+ }
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Very well. I shall now share with you the details of this rite.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("I will summon the Monster King. Don't ask me my reasons. I know this will put Tulimshar in danger. But I will still do it.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("For that, I need to light five torches. The pentagram, the magic, and all the else are with me. Just light the torches.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Talk to Zitoni, the Alchemist of Candor. He may look humble, but he is the greatest alchemist of this world. I need five @@.", getitemlink(EverburnPowder));
+ close;
+
+L_Price:
+ mesn strcharinfo(0);
+ mesq l("Zitoni refused to make the Powder.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("I thought he would. After all, Everburn Powder... is not a mere powder.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Well, you gave me the gems, so I trust you. Here, take this @@.", getitemlink(DarkDesertMushroom));
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Take much care with it. It is a very, very rare drop from a rare monster from a difficult, high level area.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Deliver it to Zitoni on my name. He'll trust it. The relation between me and Zitoni... goes way back.");
+ getitem DarkDesertMushroom, 1;
+ setq TulimsharQuest_DarkInvocator, 3;
+ close;
+
+L_Quest:
+ if (countitem(EverburnPowder) < 5) {
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("This is not enough, I need 5 @@ to perform the rite. Go talk with Zitoni.", getitemlink(EverburnPowder));
+ close;
+ }
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Good, good, you have enough powder. Now I need you to lit all five torches with them.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Once you lit one of them, monsters will pour out, so take care to don't die.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("If you die, you'll have to begin again. And there is the experience penalty, too.");
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("Good luck, because you'll need it. Talk to me once all of them are lit, and I'll SUMMON DAH MONSTER KING.");
+ setq TulimsharQuest_DarkInvocator, 5;
+ close;
+
+L_Ritual:
+ percentheal 100, 0;
+ specialeffect(56);
+ mesc l("Zarkor spills many fluids on the lake, with much concentration.");
+ next;
+ specialeffect(56);
+ mesn "Zarkor, the Dark Summoner";
+ mesc l("Zarkor starts a weird chant.");
+ next;
+ specialeffect(52);
+ killmonster("007-1", "Zarkor::OnMonster");
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("MONSTER KING, APPEAR TO ME!");
+ next;
+ mesn "MONSTER KING";
+ mesc l("...Foolish human... Do you really think I will attend your summon?"), 1;
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("But... But! Where are you?! That summon ritual is equivalent to GM magic!");
+ next;
+ mesn "MONSTER KING";
+ mesc l("And who do you think that created GM Magic in first place, inexperienced kid?"), 1;
+ next;
+ mesn "Zarkor, the Dark Summoner";
+ mesq l("You... You killed my father during Nivalis siege! I'll make you pay for that!!");
+ next;
+ mesn "MONSTER KING";
+ mesc l("You humans are so greedy... Just like me. I have more important things to do, other than waste time with you."), 1;
+ next;
+ mesn "MONSTER KING";
+ mesc l("Zarkor, fell a small taste of my power. That is nothing. If you can't handle that, you're not even near my lowest lieutenant."), 1;
+ mesc l("And you got help from a kid, Zarkor? Lucky is that kid, that I don't have time to deal with them. Farewell."), 1;
+ next;
+ specialeffect(312);
+ mesn "Zarkor, the Dark Summoner";
+ mes l("GAAAAAAAAAAAAAAAAHHHHHHH!");
+ next;
+ goto L_Finish;
+
+
+
+L_Finish:
+ setq TulimsharQuest_DarkInvocator, 7;
+ // These values were taken from Experience table, and are magic numbers
+ getexp 7995, 412; // 100% for levelset (30,11)
+ // Pay roughly what you spent
+ // Powder + Trips + Gems + Sulf + Iron + Ash + Profit = Money
+ // (3000*5 + 4*500G + 1000 + 5*84 + 5*66 + 5*80 + 850) = 20.000
+ Zeny=Zeny+20000;
+ getitem ZarkorScroll, 1;
+
+ mesn;
+ mesq l("*Ugh* Thanks for your help. Here... Take this, as promised.");
+ next;
+ mesn strcharinfo(0);
+ mesq l("Are you feeling well? That was a pretty powerful attack!");
+ next;
+ mesn;
+ mesq lg("Do not worry with me, youngling... I'll be fine.");
+ close;
+
+OnMonster:
+ end;
+
+OnPCDieEvent:
+ if (getq(TulimsharQuest_DarkInvocator) == 5 || getq(TulimsharQuest_DarkInvocator) == 6)
+ setq2 TulimsharQuest_DarkInvocator, 0;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 6;
+ end;
+
+}
diff --git a/npc/008-0/_import.txt b/npc/008-0/_import.txt
new file mode 100644
index 000000000..1ff3fcc44
--- /dev/null
+++ b/npc/008-0/_import.txt
@@ -0,0 +1,6 @@
+// Map 008-0: Party Dungeon Waiting Hall
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-0/_mobs.txt",
+"npc/008-0/_warps.txt",
+"npc/008-0/mapflags.txt",
+"npc/008-0/master.txt",
diff --git a/npc/008-0/_mobs.txt b/npc/008-0/_mobs.txt
new file mode 100644
index 000000000..48253d79b
--- /dev/null
+++ b/npc/008-0/_mobs.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-0: Party Dungeon Waiting Hall mobs
+008-0,49,49,28,28 monster Ratto 1005,6,35000,600000
+008-0,50,47,28,28 monster Cave Bat 1039,4,35000,600000
+008-0,48,48,28,28 monster Silk Worm 1034,6,35000,600000
+008-0,49,63,29,16 monster Red Scorpion 1072,3,35000,600000
+008-0,49,32,29,14 monster Scorpion 1071,3,35000,600000
diff --git a/npc/008-0/_warps.txt b/npc/008-0/_warps.txt
new file mode 100644
index 000000000..b14f6a756
--- /dev/null
+++ b/npc/008-0/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-0: Party Dungeon Waiting Hall warps
+008-0,41,22,0 warp #008-0_41_22 0,0,003-1-1,44,142
diff --git a/npc/008-0/mapflags.txt b/npc/008-0/mapflags.txt
new file mode 100644
index 000000000..e292f7e54
--- /dev/null
+++ b/npc/008-0/mapflags.txt
@@ -0,0 +1,3 @@
+008-1 mapflag zone MMO
+008-2 mapflag zone MMO
+008-2 mapflag pvp
diff --git a/npc/008-0/master.txt b/npc/008-0/master.txt
new file mode 100644
index 000000000..9dd55dba9
--- /dev/null
+++ b/npc/008-0/master.txt
@@ -0,0 +1,172 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// This NPC is a work on progress. It measures all players equal.
+// Controls the whole dungeon feature.
+
+008-0,47,63,0 script Party Master NPC_BRGUARD_SWORD,{
+ mesn;
+ if (getcharid(1) > 0) {
+ mesq l("You're in the \"@@\" party, very good!", getpartyname(getcharid(1)));
+ next;
+ } else {
+ mesq l("I protect a dungeon for PARTIES. You're not on a party, get moving.");
+ close;
+ }
+ if (!is_staff())
+ goto L_TODO; // TODO
+
+ mesn;
+ mesq l("I protect a very dangerous dungeon, and it is so dangerous, that only parties can go in.");
+ next;
+ if (strcharinfo(0) != getpartyleader(getcharid(1))) goto L_NotYou;
+ mesn;
+ mesq l("There are five floors, and they're all very dangerous. But there are riches to be found.");
+ next;
+ mesn;
+ mesq l("You also can't stay there forever! You will have about 20 minutes to entirely clear it out and defeat the last boss.");
+ if (!party_expon(getcharid(1)))
+ mesc l("Note: Your party is currently not sharing experience, and will suffer a time penalty. Your time will be halved."), 6;
+ next;
+ // Get info about your party, and backup it
+ getpartymember(getcharid(1));
+ .@count = $@partymembercount;
+ copyarray(.@name$[0], $@partymembername$[0], $@partymembercount);
+ copyarray(.@aid[0], $@partymemberaid[0], $@partymembercount);
+ copyarray(.@cid[0], $@partymembercid[0], $@partymembercount);
+ .@count_online=0;
+
+ if (.@count < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+ mesn;
+ mesc l("Are you and your party ready?"), 1;
+ if (askyesno() != ASK_YES)
+ close;
+
+ // Loop though party to see if you can start
+ for (.@i = 0; .@i < .@count; ++.@i) {
+ // Online?
+ if (isloggedin(.@aid[.@i], .@cid[.@i])) {
+ getmapxy(.@m$, .@x, .@y, 0, .@name$[.@i]);
+ // Here?
+ if (.@m$ == .map$)
+ .@count_online++;
+ }
+ }
+
+ // How many are logged in and here?
+ if (.@count_online < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+
+ // TODO: Query if exp sharing is enabled
+ // TODO: Instance for party
+
+ // Warp everyone and add timers
+ partytimer("008-0", 1000, "Party Master::OnStart", getcharid(1));
+ warpparty("008-1", 176, 20, getcharid(1), "008-0", true);
+
+ // One bonus time
+ monster("008-1", 90, 69, "Time Bonus", Mouboo, 1, "Party Master::OnMobTime");
+
+ // Four Chests
+ monster("008-1", 38, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-1", 41, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-1", 44, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-1", 47, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+
+ // We still need the SummonBoss NPC and etc.
+ close;
+
+
+
+
+
+
+
+
+
+L_TODO:
+ mesn;
+ mesq l("Jesusalva still have this closed because the traps are broken... %%n But we shall open soon. %%G");
+ close;
+// Only the party leader can start this. But you can rejoin, as long map leader is on 008-x
+L_NotYou:
+ getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1)));
+ if (.@m$ ~= "008-*" &&
+ .@m$ != "008-0" &&
+ BaseLevel > 0 &&
+ @pmloop) {
+ mesn;
+ mesq l("@@, your party leader, is inside, I'm not sure where.", getpartyleader(getcharid(1)));
+ mesc l("Enter dungeons? You won't be able to join anymore when he dies."), 1;
+ if (askyesno() != ASK_YES)
+ close;
+ // Double check
+ getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1)));
+ if (.@m$ ~= "008-*" && .@m$ != "008-0" && getcharid(1) > 0)
+ warp "008-1", 176, 20;
+ } else {
+ mesn;
+ mesq l("If you bring me @@, your party leader, I can let you in.", getpartyleader(getcharid(1)));
+ }
+ close;
+
+// Minimum 3 players
+L_TooSmall:
+ mesn;
+ mesq l("However, I need to see at least three volunteers here, to allow you in.");
+ close;
+
+
+
+// Main Loop
+OnStart:
+ @pmloop=0;
+OnLoop:
+ @pmloop+=1;
+ .@lost="";
+
+ // Anti-Crazyfefe™ Alpha System
+ if (getcharid(1) <= 0) {
+ // Left the party!
+ .@lost=l("You are not a member of a party anymore.");
+ }
+ if (!party_expon(getcharid(1))) {
+ // Party exp sharing disabled means time penalty.
+ @pmloop+=1;
+ }
+
+ // Check if party master still alive and in caves.
+ if (getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1))) <= 0)
+ .@lost=l("Party leader is gone.");
+ else if (!(.@m$ ~= "008-*"))
+ .@lost=l("Party leader is not on dungeons.");
+
+ // Add new cycle or finish.
+ if (@pmloop < 1200 && .@lost == "")
+ addtimer(1000, "Party Master::OnLoop");
+ else
+ .@lost=l("You ran out of time...");
+
+ // See if it is time to finish
+ if (.@lost != "") {
+ @pmloop=0;
+ warp "008-0", 47, 64;
+ dispbottom str(.@lost);
+ }
+ end;
+
+OnMobTime:
+ getmapxy(.@m$, .@x, .@y, 0);
+ areatimer(.@m$, .@x-4, .@y-4, .@x+4, .@y+4, 10, "Party Master::OnAddTime");
+ end;
+
+OnAddTime:
+ @pmloop=60;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/008-1/_import.txt b/npc/008-1/_import.txt
new file mode 100644
index 000000000..ecc43a544
--- /dev/null
+++ b/npc/008-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-1: 1st Floor - Party Dungeon
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-1/_mobs.txt",
+"npc/008-1/_warps.txt",
+"npc/008-1/master.txt",
diff --git a/npc/008-1/_mobs.txt b/npc/008-1/_mobs.txt
new file mode 100644
index 000000000..e65aaded4
--- /dev/null
+++ b/npc/008-1/_mobs.txt
@@ -0,0 +1,23 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-1: 1st Floor - Party Dungeon mobs
+008-1,155,138,15,15 monster Ratto 1005,2,15000,15000
+008-1,34,113,28,16 monster Ratto 1005,2,15000,15000
+008-1,52,147,42,15 monster Angry Scorpion 1131,4,15000,25000
+008-1,118,144,22,17 monster Pinkie 1132,3,15000,25000
+008-1,72,57,49,34 monster House Maggot 1084,14,15000,25000
+008-1,165,75,16,13 monster Slime Blast 1090,2,15000,25000
+008-1,37,54,29,26 monster Red Scorpion 1072,2,15000,25000
+008-1,132,108,42,15 monster Fire Goblin 1067,4,15000,25000
+008-1,157,158,17,15 monster Mana Ghost 1068,1,15000,25000
+008-1,154,46,29,15 monster Mineral Bif 1058,2,15000,45000
+008-1,147,143,29,27 monster Squirrel 1032,4,15000,25000
+008-1,146,44,37,30 monster Maggot 1030,8,15000,25000
+008-1,134,96,41,18 monster Candor Scorpion 1073,6,15000,25000
+008-1,66,41,42,15 monster Bat 1039,5,15000,25000
+008-1,60,78,35,22 monster Duck 1029,4,15000,25000
+008-1,52,133,37,31 monster Cave Maggot 1027,10,15000,25000
+008-1,103,144,12,15 monster Little Blub 1007,3,15000,25000
+008-1,99,54,79,33 monster Piou 1002,8,15000,25000
+008-1,100,108,79,21 monster Piousse 1003,6,15000,25000
+008-1,59,149,39,19 monster Plushroom Field 1011,2,15000,25000
+008-1,139,150,39,19 monster Chagashroom Field 1128,2,15000,25000
diff --git a/npc/008-1/_warps.txt b/npc/008-1/_warps.txt
new file mode 100644
index 000000000..9ed20493f
--- /dev/null
+++ b/npc/008-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-1: 1st Floor - Party Dungeon warps
+008-1,176,19,0 warp #008-1_176_19 0,0,008-0,47,64
diff --git a/npc/008-1/master.txt b/npc/008-1/master.txt
new file mode 100644
index 000000000..62f27be5b
--- /dev/null
+++ b/npc/008-1/master.txt
@@ -0,0 +1,150 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// This NPC is a work on progress. It measures all players equal.
+// Controls the first floor, but not many things to control.
+
+008-1,48,117,0 script #FPDM12 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ // IMPORTANT: Prevent party master from returning here
+ getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1)));
+ if (.@m$ ~= "008-*" &&
+ .@m$ != "008-0" &&
+ .@m$ != "008-1" &&
+ BaseLevel > 20 &&
+ mobcount("008-1", "First Dungeon Master::OnBossDeath") == 0 &&
+ @pmloop) {
+ dispbottom l("Go and follow @@, your party leader!", getpartyleader(getcharid(1)));
+ warp "008-2", 135, 20;
+ } else if (BaseLevel > 20) {
+ dispbottom l("If I bring @@, my party leader, and the boss is defeated, I can go you in.", getpartyleader(getcharid(1)));
+ } else {
+ mesc l("I cannot pass, because I am only level @@.", BaseLevel);
+ mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!");
+ // I thought it would be better to allow first passage based on leader level.
+ // Parties are not meant to be permanent, and this helps a lot.
+ }
+ end;
+}
+
+008-1,48,117,0 script First Dungeon Master NPC_BRGUARD_SWORD,{
+ // Double-check, you should have been flung out long ago.
+ if (getcharid(1) <= 0 || @pmloop <= 0) {
+ mesn;
+ mesq l("Something seems wrong.");
+ warp "SavePoint",0,0;
+ close;
+ }
+ if (mobcount("008-1", "First Dungeon Master::OnBossDeath") > 0) {
+ npctalk3 l("What are you doing? Fight!");
+ end;
+ }
+
+ mesn;
+ mesq l("Compliments reaching this far, @@ from the @@ party!", strcharinfo(0), getpartyname(getcharid(1)));
+ next;
+
+ mesn;
+ mesq l("I can summon the BOSS for the level 0~20 area.");
+ next;
+ if (strcharinfo(0) != getpartyleader(getcharid(1))) goto L_NotYou;
+ if (BaseLevel < 20) goto L_TooWeak;
+ mesn;
+ mesq l("He is strong though, so keep your party togheter!");
+ next;
+ // Get info about your party, and backup it
+ getpartymember(getcharid(1));
+ .@count = $@partymembercount;
+ copyarray(.@name$[0], $@partymembername$[0], $@partymembercount);
+ copyarray(.@aid[0], $@partymemberaid[0], $@partymembercount);
+ copyarray(.@cid[0], $@partymembercid[0], $@partymembercount);
+ .@count_online=0;
+
+ if (.@count < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+ mesn;
+ mesc l("Are you and your party ready?"), 1;
+ if (askyesno() != ASK_YES)
+ close;
+
+ // Loop though party to see if you can start
+ for (.@i = 0; .@i < .@count; ++.@i) {
+ // Online?
+ if (isloggedin(.@aid[.@i], .@cid[.@i])) {
+ getmapxy(.@m$, .@x, .@y, 0, .@name$[.@i]);
+ // Here?
+ if (.@m$ == .map$)
+ .@count_online++;
+ }
+ }
+
+ // How many are logged in and here?
+ if (.@count_online < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+
+ // TODO: Query if exp sharing is enabled
+ // TODO: Instance for party
+ // TODO: Second Floor
+ npctalk l("@@: Fight!", getpartyname(getcharid(1)));
+ monster "008-1", rand(37,54), rand(109,122), "First Dungeon Boss", Sarracenus, 1, "First Dungeon Master::OnBossDeath";
+ close;
+
+
+
+
+
+
+
+
+
+
+// Only the party leader can start this.
+L_NotYou:
+ mesn;
+ dispbottom l("Go and fetch @@, the party leader!", getpartyleader(getcharid(1)));
+ close;
+
+// Minimum 3 players
+L_TooSmall:
+ mesn;
+ mesq l("However, I need to see at least three volunteers here, to allow you in.");
+ close;
+
+// Must have level to face boss
+L_TooWeak:
+ mesn;
+ mesq l("This is the end for your party, as the leader doesn't have sufficient level.");
+ close;
+
+// Second Floor special monsters
+OnReward:
+ Zeny=Zeny+200;
+ getexp 200, 20;
+ dispbottom l("Reward: 200 GP, 200 XP");
+
+// Boss death causes 008-2 to be set
+OnBossDeath:
+ // Give every party member in map a reward
+ partytimer("008-1", 200, "First Dungeon Master::OnReward", getcharid(1));
+
+ // Warp everyone and add timers
+ warpparty("008-2", 135, 20, getcharid(1), "008-1", true);
+
+ // Bonus Monsters
+ monster("008-1", 104, 238, "Time Bonus", NightScorpion, 1, "Party Master::OnMobTime");
+ monster("008-1", 85, 117, "Time Bonus", BlackScorpion, 1, "Party Master::OnMobTime");
+
+ // Five Chests
+ monster("008-2", 70, 239, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-2", 70, 241, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-2", 70, 243, "Mysterious Chest", any(BronzeChest, BronzeMimic, SilverChest, SilverMimic), 1);
+ monster("008-2", 70, 245, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-2", 70, 247, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/008-2/_import.txt b/npc/008-2/_import.txt
new file mode 100644
index 000000000..6e2d0d90a
--- /dev/null
+++ b/npc/008-2/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2: 2nd Floor - Party Dungeon
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2/_mobs.txt",
+"npc/008-2/_warps.txt",
+"npc/008-2/master.txt",
diff --git a/npc/008-2/_mobs.txt b/npc/008-2/_mobs.txt
new file mode 100644
index 000000000..db96f19dc
--- /dev/null
+++ b/npc/008-2/_mobs.txt
@@ -0,0 +1,28 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2: 2nd Floor - Party Dungeon mobs
+008-2,79,244,15,12 monster Slime Blast 1090,2,15000,15000
+008-2,47,200,21,39 monster Bandit 1024,4,25000,25000
+008-2,106,203,33,26 monster Mouboo 1023,4,25000,25000
+008-2,84,35,61,19 monster Cave Snake 1035,7,25000,25000
+008-2,60,74,35,18 monster Giant Maggot 1031,4,25000,25000
+008-2,86,107,8,14 monster Moggun 1070,2,25000,25000
+008-2,48,126,28,33 monster Mana Bug 1075,6,25000,25000
+008-2,119,244,23,13 monster Copper Slime 1088,1,25000,25000
+008-2,117,84,21,27 monster Red Slime 1092,6,25000,25000
+008-2,122,157,21,17 monster Yellow Slime 1091,3,25000,25000
+008-2,110,125,21,14 monster Lava Slime 1097,2,25000,25000
+008-2,89,158,9,17 monster Snake 1122,2,25000,25000
+008-2,37,63,21,39 monster Bandit 1024,4,25000,25000
+008-2,119,93,21,77 monster Desert Log Head 1127,6,25000,25000
+008-2,117,213,21,39 monster Desert Bandit 1124,3,25000,25000
+008-2,30,197,17,24 monster Sarracenus 1125,2,25000,25000
+008-2,88,70,10,48 monster Angry Red Scorpion 1130,6,25000,25000
+008-2,67,87,10,60 monster Sea Slime 1093,7,25000,25000
+008-2,33,138,21,32 monster Robin Bandit 1153,1,25000,25000
+008-2,59,204,11,34 monster Candied Slime 1089,4,25000,25000
+008-2,86,172,10,54 monster Green Slime 1085,6,25000,25000
+008-2,81,61,73,39 monster Plushroom Field 1011,4,25000,45000
+008-2,81,242,21,15 monster Piou 1002,3,25000,15000
+008-2,81,117,73,39 monster Chagashroom Field 1128,4,25000,45000
+008-2,40,200,32,39 monster Big Ruby Bif 1100,1,35000,45000
+008-2,103,200,29,39 monster Sapphire Bif 1114,2,25000,45000
diff --git a/npc/008-2/_warps.txt b/npc/008-2/_warps.txt
new file mode 100644
index 000000000..adea286d0
--- /dev/null
+++ b/npc/008-2/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2: 2nd Floor - Party Dungeon warps
+008-2,80,255,0 warp #008-2_80_255 0,0,008-2,54,237
diff --git a/npc/008-2/master.txt b/npc/008-2/master.txt
new file mode 100644
index 000000000..88aca8f83
--- /dev/null
+++ b/npc/008-2/master.txt
@@ -0,0 +1,172 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// This NPC is a work on progress. It measures all players equal.
+// Controls the second floor
+
+// 21: From 2 to 1
+008-2,135,19,0 script #FPDM21 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ // Party leader cannot retreat
+ if (strcharinfo(0) == getpartyleader(getcharid(1)))
+ dispbottom l("As the leader of your party, you can only go forward.");
+ else
+ warp "008-1", 43, 104;
+ end;
+}
+
+008-2,135,19,0 script #FPDM23 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ end;
+ // IMPORTANT: Prevent party master from returning here
+ getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1)));
+ if (.@m$ ~= "008-*" &&
+ .@m$ != "008-0" &&
+ .@m$ != "008-1" &&
+ .@m$ != "008-2" &&
+ BaseLevel > 40 &&
+ mobcount("008-2", "Second Dungeon Master::OnBossDeath") == 0 &&
+ @pmloop) {
+ dispbottom l("Go and follow @@, your party leader!", getpartyleader(getcharid(1)));
+ warp "008-1", 176, 20; // 008-2
+ } else if (BaseLevel > 40) {
+ dispbottom l("If I bring @@, my party leader, and the boss is defeated, I can go you in.", getpartyleader(getcharid(1)));
+ } else {
+ mesc l("I cannot pass, because I am only level @@.", BaseLevel);
+ mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!");
+ // I thought it would be better this way. There was at least three different ways to prevent that.
+ }
+ end;
+}
+
+008-2,75,240,0 script Second Dungeon Master NPC_BRGUARD_SWORD,{
+ // Double-check, you should have been flung out long ago.
+ if (getcharid(1) <= 0 || @pmloop <= 0) {
+ mesn;
+ mesq l("Something seems wrong.");
+ warp "SavePoint",0,0;
+ close;
+ }
+ if (mobcount("008-2", "Second Dungeon Master::OnBossDeath") > 0) {
+ npctalk3 l("What are you doing? Fight!");
+ end;
+ }
+
+ mesn;
+ mesq l("Compliments reaching this far, @@ from the @@ party!", strcharinfo(0), getpartyname(getcharid(1)));
+ next;
+
+ mesn;
+ mesq l("I can summon the BOSS for the level 21~40 area.");
+ next;
+ if (strcharinfo(0) != getpartyleader(getcharid(1))) goto L_NotYou;
+ if (BaseLevel < 40) goto L_TooWeak;
+ mesn;
+ mesq l("He is strong though, so keep your party togheter!");
+ next;
+ // Get info about your party, and backup it
+ getpartymember(getcharid(1));
+ .@count = $@partymembercount;
+ copyarray(.@name$[0], $@partymembername$[0], $@partymembercount);
+ copyarray(.@aid[0], $@partymemberaid[0], $@partymembercount);
+ copyarray(.@cid[0], $@partymembercid[0], $@partymembercount);
+ .@count_online=0;
+
+ if (.@count < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+ mesn;
+ mesc l("Are you and your party ready?"), 1;
+ if (askyesno() != ASK_YES)
+ close;
+
+ // Loop though party to see if you can start
+ for (.@i = 0; .@i < .@count; ++.@i) {
+ // Online?
+ if (isloggedin(.@aid[.@i], .@cid[.@i])) {
+ getmapxy(.@m$, .@x, .@y, 0, .@name$[.@i]);
+ // Here?
+ if (.@m$ == .map$)
+ .@count_online++;
+ }
+ }
+
+ // How many are logged in and here?
+ if (.@count_online < 3 && !$@GM_OVERRIDE) goto L_TooSmall;
+
+ // TODO: Query if exp sharing is enabled
+ // TODO: Instance for party
+ // TODO: Second Floor
+ npctalk l("@@: Fight!", getpartyname(getcharid(1)));
+ monster "008-2", rand(74,84), rand(241,250), "Second Dungeon Boss", BanditLord, 1, "Second Dungeon Master::OnBossDeath";
+ close;
+
+
+
+
+
+
+
+
+
+
+// Only the party leader can start this.
+L_NotYou:
+ mesn;
+ dispbottom l("Go and fetch @@, the party leader!", getpartyleader(getcharid(1)));
+ close;
+
+// Minimum 3 players
+L_TooSmall:
+ mesn;
+ mesq l("However, I need to see at least three volunteers here, to allow you in.");
+ close;
+
+// Must have level to face boss
+L_TooWeak:
+ mesn;
+ mesq l("This is the end for your party, as the leader doesn't have sufficient level.");
+ close;
+
+// Second Floor special monsters
+OnReward:
+ // 40% odds of a Black Scorpion coming to avenge fallen monster leader
+ if (rand(1,5) % 2) {
+ getmapxy(.@m$, .@x, .@y, 0);
+ monster .@m$, .@x, .@y, "Semi Boss", BlackScorpion, 1;
+ }
+ Zeny=Zeny+700;
+ getexp 400, 60;
+ getitem CelestiaTea, 1;
+ dispbottom l("Reward: 700 GP, 400 XP, 1 @@", getitemlink(CelestiaTea));
+
+
+OnBossDeath:
+ // Give every party member in map a reward
+ partytimer("008-2", 200, "Second Dungeon Master::OnReward", getcharid(1));
+
+ // Warp everyone and add timers
+ warpparty("008-1", 176, 20, getcharid(1), "008-2", true); // TODO 008-3
+ // While we can't advance, we allow you to redo the dungeons
+
+ /*
+ // Bonus Monsters
+ monster("008-3", 104, 238, "Time Bonus", RobinBandit, 1, "Party Master::OnMobTime");
+ monster("008-3", 85, 117, "Time Bonus", RobinBandit, 1, "Party Master::OnMobTime");
+
+ // Five Chests
+ monster("008-3", 38, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ monster("008-3", 41, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic, EvilChest), 1);
+ monster("008-3", 44, 104, "Mysterious Chest", any(SilverChest, SilverMimic), 1);
+ monster("008-3", 47, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic, EvilChest), 1);
+ monster("008-3", 50, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1);
+ */
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/009-1/_import.txt b/npc/009-1/_import.txt
index 3d92f071c..0d482e907 100644
--- a/npc/009-1/_import.txt
+++ b/npc/009-1/_import.txt
@@ -2,10 +2,10 @@
// 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/barzil.txt",
-"npc/009-1/dangrostra.txt",
+"npc/009-1/charles.txt",
+"npc/009-1/fisherman.txt",
"npc/009-1/foxhound.txt",
"npc/009-1/guards.txt",
-"npc/009-1/kevin.txt",
"npc/009-1/lynnthetraveler.txt",
+"npc/009-1/mapflags.txt",
"npc/009-1/soul-menhir.txt",
diff --git a/npc/009-1/_mobs.txt b/npc/009-1/_mobs.txt
index 35d4e61b9..49b3a7401 100644
--- a/npc/009-1/_mobs.txt
+++ b/npc/009-1/_mobs.txt
@@ -1,7 +1,11 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 009-1: Halinarzo mobs
-009-1,66,36,28,10 monster Giant Maggot 1031,5,30000,90000
-009-1,27,29,7,8 monster Bat 1039,1,60000,60000
-009-1,73,51,49,14 monster Fire Goblin 1067,5,45000,45000
-009-1,70,31,49,21 monster Maggot 1030,20,30000,60000
-009-1,70,86,47,6 monster Red Scorpion 1072,2,30000,20000
+009-1,76,35,49,10 monster Giant Maggot 1031,6,30000,90000
+009-1,27,29,7,8 monster Piou 1002,1,60000,60000
+009-1,73,51,49,14 monster Fire Goblin 1067,7,45000,45000,Fisherman::OnKillFireGoblin
+009-1,70,31,49,21 monster Maggot 1030,25,30000,60000
+009-1,70,86,47,6 monster Scorpion 1071,3,30000,20000
+009-1,70,102,47,6 monster Red Scorpion 1072,1,30000,20000
+009-1,27,98,7,8 monster Duck 1029,1,60000,60000
+009-1,113,88,0,0 monster Chagashroom Field 1128,1,60000,60000
+009-1,76,105,1,0 monster Chagashroom Field 1128,1,70000,60000
diff --git a/npc/009-1/_warps.txt b/npc/009-1/_warps.txt
index c8b9057ef..09a9baf36 100644
--- a/npc/009-1/_warps.txt
+++ b/npc/009-1/_warps.txt
@@ -2,3 +2,8 @@
// Map 009-1: Halinarzo warps
009-1,56,107,0 warp #009-1_56_107 2,0,010-2,171,20
009-1,119,40,0 warp #009-1_119_40 0,0,011-1,177,177
+009-1,84,63,0 warp #009-1_84_63 0,0,009-2,62,66
+009-1,73,63,0 warp #009-1_73_63 0,0,009-2,28,65
+009-1,86,34,0 warp #009-1_86_34 0,0,009-3,44,56
+009-1,33,62,0 warp #009-1_33_62 0,0,009-4,48,53
+009-1,64,38,0 warp #009-1_64_38 1,0,009-5,32,41
diff --git a/npc/009-1/barzil.txt b/npc/009-1/barzil.txt
deleted file mode 100644
index 55f284765..000000000
--- a/npc/009-1/barzil.txt
+++ /dev/null
@@ -1,156 +0,0 @@
-// TMW-2 Script.
-// Author:
-// Saulc
-// Jesusalva
-// PS. move to indoors
-
-009-1,36,58,0 script Barzil NPC_LLOYD,{
-
-// Evol scripts.
-// Authors:
-// gumi
-// Reid
-// Description:
-// banker NPC.
-
-
- function explain_guild {
- speech S_LAST_NEXT,
- l("The guild is in charge of the commerce regularization throughout Halinarzo and its surroundings."),
- l("With the help of the town hall 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 Barzil, I am a representative of the Merchant Guild on Halinarzo.");
-
- 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("@@ is searching something in his book.", .name$);
- speech S_LAST_NEXT,
- l("I see."),
- lg("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 Halinarzo 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 = 12000;
- speech S_LAST_NEXT,
- l("The fee is of @@ GP. 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 = 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;
- }
-
-
- if (getq(ArtisQuests_Lloyd) == 0)
- {
- first_visit;
-
- closedialog;
- goodbye;
- close;
- }
-
- speech S_LAST_NEXT,
- l("Welcome to the Merchant Guild of Halinarzo."),
- l("What do you want today?");
-
- do
- {
-
- selectd
- l("I would like to store some items."),
- l("I would like to perform money transactions."),
- l("What is this guild for?"),
- l("Bye.");
-
- switch (@menu)
- {
- case 1:
- openstorage;
- closedialog;
- close;
- break;
- case 2:
- MerchantGuild_Bank;
- break;
- case 3:
- mes "";
- explain_guild;
- break;
- }
- if (@menu != 4)
- {
- speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
- l("Something else?");
- }
- } while (@menu != 4);
-
- closedialog;
- goodbye;
- close;
-
-OnInit:
- .sex = G_MALE;
- .distance = 4;
- end;
-
-OnPCLoginEvent:
- checkclientversion;
- if (#MerchantBank)
- {
- BankVault += max(0, #MerchantBank);
- #MerchantBank = 0;
- }
- end;
-}
diff --git a/npc/009-1/charles.txt b/npc/009-1/charles.txt
new file mode 100644
index 000000000..60a7ef47f
--- /dev/null
+++ b/npc/009-1/charles.txt
@@ -0,0 +1,199 @@
+// TMW-2 Script
+// Original Creator: Adson Renato <adson25@gmail.com>
+// Date: 2010-11-19 2:31 AM BRT
+// Review:
+// * 2013-09-03: ernando2000 <ernando.quirino@hotmail.com>
+// * 2013-09-04: Lunovox Heavenfinder <rui.gravata@gmail.com>
+// * 2016-06-14: Jesusalva <tmwbr@jesussalva.com>
+// * 2017-06-17: Jesusalva <cpntb1@ymail.com>
+// * 2018-05-24: Jesusalva <admin@tmw2.org>
+// * Adapted from TMW-BR to TMW2
+// Minimum Req.: LVL 30
+// Consumables: Bandits drops: CoinBag, Dagger, Leather Shield, Empty Bottle
+// Prize: 1 BurglarMask
+// Description:
+// A contrabandist which feeds Halinarzo's black market.
+// Will later teach the Steal skill. (maybe)
+// Notes:
+// Blame Saulc.
+
+
+
+
+009-1,24,105,0 script Charles, Trader King NPC_ORC,{
+ .@q=getq(HalinarzoQuest_TraderKing);
+ if (BaseLevel < 30) goto L_Weak;
+ if (.@q == 1) goto L_Return;
+ if (.@q == 2) goto L_End;
+ goto L_Start;
+
+L_Weak:
+ mesn;
+ mesq lg("Get out of here, weakling. You'll be killed by bandits.");
+ close;
+
+L_Start:
+ mesn;
+ mes lg(":> \"Hello, youngling...\"");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("This character person is strange I better get away..."), L_Distrust,
+ l("Hmm, who are you?") , L_WhoAmI;
+
+L_WhoAmI:
+ mes "";
+ mesn;
+ mesq l("I am the Trader King, because I supply a market!"); // the Black Market
+ close;
+
+L_Distrust:
+ mes "";
+ mesn strcharinfo(0);
+ mes l("¬.¬ \"Hmm, to me, you look like a thief or bandit...\"");
+ next;
+ mesn;
+ mes l(":D \"HAHAHAHAH! Me?! a thief? only during free time...\"");
+ next;
+ mesn strcharinfo(0);
+ mes l("¬.¬ \"I knew it! I'll report you at once.\"");
+ next;
+ mesn;
+ mes l("0.0 \"No no, please no! I can propose you a great deal for your silence!\"");
+ next;
+ menu
+ l("Which deal?"), L_Deal,
+ l("No, justice must be done.") , L_Die;
+
+L_Deal:
+ mes "";
+ mesn;
+ mesq l(":/ \"Hmm... let me see... Aha, I know! I can make you a great bandit with a simple burglar mask!\"");
+ next;
+ mesn strcharinfo(0);
+ mes l(":o \"What? I'm not a bandit! But it looks SO COOL! Do you need anything while you're here?\"");
+ next;
+ mesn;
+ mes l(":D \"Ah! Yes, that would help a lot! I don't need anything a bandit couldn't give you: 25 @@, 5 @@, 2 @@ and a @@. And 6000 GP.\"", getitemlink(CoinBag), getitemlink(EmptyBottle), getitemlink(Dagger), getitemlink(LeatherShield));
+ mesq l("What do you say?");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("No way! That's absurd!"), L_Close,
+ l("That's a lot, but we have a deal!"), L_Accept;
+
+L_Accept:
+ mes "";
+ mesn;
+ mes l(">:| \"Go take the items and remember: Not even a single word about me!\"");
+ next;
+ mesn strcharinfo(0);
+ mes l(";-) \"Don't worry! Leave to me!\"");
+ next;
+ mesn;
+ mes l("Here's what I need:");
+ mes l("@@/25 @@", countitem(CoinBag), getitemlink(CoinBag));
+ mes l("@@/5 @@", countitem(EmptyBottle), getitemlink(EmptyBottle));
+ mes l("@@/2 @@", countitem(Dagger), getitemlink(Dagger));
+ mes l("@@/1 @@", countitem(LeatherShield), getitemlink(LeatherShield));
+ mes l("@@/6000 GP", Zeny);
+
+ setq HalinarzoQuest_TraderKing, 1;
+ close;
+
+L_Return:
+ mesn;
+ mes "\"Do you have what I asked for?\"";
+ next;
+ menu
+ l("Yes, of course."), L_Finish,
+ l("I forgot what you need."), L_Review,
+ l("Not yet, I'll be right back."), L_Wait;
+
+L_Wait:
+ mes "";
+ mesn;
+ mesq l("I'll be waiting for you! And trading some items of questionable origins...");
+ close;
+
+L_Finish:
+ if (countitem(CoinBag) < 25 ||
+ countitem(EmptyBottle) < 5 ||
+ countitem(Dagger) < 2 ||
+ countitem(LeatherShield) < 1)
+ goto L_Missing;
+ if (Zeny < 6000) goto L_Poor;
+
+ inventoryplace BurglarMask, 1;
+ delitem CoinBag, 25;
+ delitem EmptyBottle, 5;
+ delitem Dagger, 2;
+ delitem LeatherShield, 1;
+ Zeny = Zeny - 6000;
+ getitem BurglarMask, 1;
+ getexp 840, 25;
+ setq HalinarzoQuest_TraderKing, 2;
+ mes "";
+ mesn;
+ mes l(":D \"Excellent! You've kept your end on the bargain!\"");
+ next;
+ mesn;
+ mesq l("I always keep my end on the bargain, so here you go.");
+ next;
+ mesn;
+ mes l(":) \"A pleasure to trade if you. Don't get caught if you're doing something wrong!\"");
+ close;
+
+L_Poor:
+ mes "";
+ mesn;
+ mes l(":< \"Hey hey! Where's the money?\"");
+ close;
+
+L_Missing:
+ percentheal -15, 0;
+ mes "";
+ mesn;
+ mes l(":< \"Never lie to me. Keep your end on the bargain! Give me everything I asked for!\"");
+ close;
+
+L_End:
+ mesn;
+ mes l(":P \"I am busy, leave me alone.\"");
+ close;
+
+L_Review:
+ mes "";
+ mesn;
+ mes l("Here's what I need:");
+ mes l("@@/30 @@", countitem(CoinBag), getitemlink(CoinBag));
+ mes l("@@/5 @@", countitem(EmptyBottle), getitemlink(EmptyBottle));
+ mes l("@@/2 @@", countitem(Dagger), getitemlink(Dagger));
+ mes l("@@/1 @@", countitem(LeatherShield), getitemlink(LeatherShield));
+ mes l("@@/6000 GP", Zeny);
+ close;
+
+L_Die:
+ mesn;
+ mesq l("Then I'll be sure you can't talk again.");
+ percentheal -100, 0;
+ close;
+
+L_Close:
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, BurglarMask);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, Chainmail);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LeatherBoots); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 1);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+
+}
diff --git a/npc/009-1/fisherman.txt b/npc/009-1/fisherman.txt
new file mode 100644
index 000000000..5aaddae2f
--- /dev/null
+++ b/npc/009-1/fisherman.txt
@@ -0,0 +1,152 @@
+// TMW-2 Script
+// Originals: TMW BR
+//
+// Author:
+// Jesusalva
+// Description:
+// Forest Bow Quest. DO NOT RENAME THE NPC.
+
+009-1,116,106,0 script Fisherman NPC_FISHERMAN_HALI,{
+ .@q=getq(HurnscaldQuest_ForestBow);
+ if (BaseLevel < 30) goto L_Weak;
+ mesn;
+ mesq l("Hello. Ah, bad luck. I am three days without fishing a single carp.");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("Any fishing tips for me?"),-,
+ rif(.@q == 1 && getq3(HurnscaldQuest_ForestBow) < 99, l("I need a string, but not just any string, a really good string.")), L_String;
+
+ mes "";
+ mesn;
+ mesq l("Well, yes. Look this river. The water is not moving.");
+ next;
+ mesn;
+ mesq l("If the water doesn't moves, you will never fish anything. Ah, fat luck...");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("...");
+ next;
+ mesn;
+ mesq l("I am trying to fish here without success. You're weak, do not bother me.");
+ close;
+
+L_String:
+ .@k=getq3(HurnscaldQuest_ForestBow);
+ mes "";
+ switch (.@k) {
+ case 0:
+ mesn;
+ mesq l("Well, that's easy to do. For starters, I need 1.000 GP as payment, and 10 @@ to make the string.", getitemlink(Root));
+ next;
+ mesn;
+ mesq l("That's not everything, though. I am having a bad time fishing. Bring me a @@. I know, it is rare. Good luck with it.", getitemlink(GrassCarp));
+ next;
+ mesn;
+ mesq l("And one last thing I'll want. See these @@? I don't like them, so I'll have you to kill 40 of them for me.", getmonsterlink(FireGoblin));
+ next;
+ mesn strcharinfo(0);
+ mes l("o.o \"You're being unreasonable. That's way too much!\"");
+ next;
+ mesn;
+ mesq l("To make the string you want, I need a special oil, which I make myself. It's hard to do, so I'll spend time I could be using to fish or help the city guard.");
+ next;
+ mesn;
+ mesq l("I'll make your life easier, I'm also accepting 20 @@ or @@ instead the Grass Carp. Go now, pal.", getitemlink(CommonCarp), getitemlink(Roach));
+ setq3 HurnscaldQuest_ForestBow, 10;
+ close;
+ break;
+ case 50:
+ mesn;
+ mesq l("Yo, good joob killing the Fire Goblins. Do you have everything I've asked for?");
+ next;
+ goto L_Finish;
+ default:
+ mesn;
+ mesq l("You have:");
+ if (countitem(GrassCarp) > 0)
+ mes l("@@/1 @@", countitem(GrassCarp), getitemlink(GrassCarp));
+ else if (countitem(Roach) > countitem(CommonCarp))
+ mes l("@@/20 @@ (or @@)", countitem(Roach), getitemlink(Roach), getitemlink(CommonCarp));
+ else
+ mes l("@@/20 @@ (or @@)", countitem(CommonCarp), getitemlink(CommonCarp), getitemlink(Roach));
+
+ mes l("@@/10 @@", countitem(Root), getitemlink(Root));
+ mes l("@@/40 slayed @@", .@k-10, getmonsterlink(FireGoblin));
+ mes l("@@/1000 GP", Zeny);
+ close;
+ }
+ close;
+
+L_Finish:
+ mesq l("You need:");
+ if (countitem(GrassCarp) > 0)
+ mes l("@@/1 @@", countitem(GrassCarp), getitemlink(GrassCarp));
+ else if (countitem(Roach) > countitem(CommonCarp))
+ mes l("@@/20 @@ (or @@)", countitem(Roach), getitemlink(Roach), getitemlink(CommonCarp));
+ else
+ mes l("@@/20 @@ (or @@)", countitem(CommonCarp), getitemlink(CommonCarp), getitemlink(Roach));
+
+ mes l("@@/10 @@", countitem(Root), getitemlink(Root));
+ mes l("40/40 slayed @@", getmonsterlink(FireGoblin));
+ mes l("@@/1000 GP", Zeny);
+ mes "";
+ select
+ l("Not yet."),
+ rif(countitem(GrassCarp) >= 1, l("Yes, I'll pay with Grass Carp.")),
+ rif(countitem(CommonCarp) >= 20, l("Yes, I'll pay with Common Carp.")),
+ rif(countitem(Roach) >= 20, l("Yes, I'll pay with Roach."));
+ if (@menu == 1)
+ close;
+
+ if (countitem(Root) < 10 || Zeny < 1000) {
+ mesn;
+ mesq l("Well, you forgot the most important: The material I need to do the string.");
+ next;
+ mesn;
+ mesq l("I am not a half-word man, so I won't take your fish. Come back with the money and the Roots, and I'll make the string for you.");
+ close;
+ }
+
+ switch (@menu) {
+ case 2:
+ delitem GrassCarp, 1; break;
+ case 3:
+ delitem CommonCarp, 20; break;
+ case 4:
+ delitem Roach, 20; break;
+ default:
+ dispbottom l("Script Error: \"Tux didn't found his fish! Blame Saulc at once!\""); close; end;
+ }
+ delitem Root, 10;
+ Zeny=Zeny-1000;
+ setq3 HurnscaldQuest_ForestBow, 99;
+ getexp 800, 0; // 10% of max exp
+ mes "";
+ mesn;
+ mesc l("With a knife, the fisherman makes the roots as thin as he can. You wonder if he knows what he is doing.");
+ next;
+ mesn;
+ mesc l("Once the roots are of a desired thickness, he ties them to make a string, and applies an oil on it.");
+ next;
+ mesn;
+ mesc l("After waiting for the oil to dry, he hands you the string.");
+ mesq l("Here, thanks to the oil, this string is very sturdy. You better not keep it on your inventory. Good luck!");
+ close;
+
+OnKillFireGoblin:
+ if (getq(HurnscaldQuest_ForestBow) == 1 && getq3(HurnscaldQuest_ForestBow) >= 10 && getq3(HurnscaldQuest_ForestBow) < 50) {
+ setq3 HurnscaldQuest_ForestBow, getq3(HurnscaldQuest_ForestBow)+1;
+ dispbottom l("@@/40 Fire Goblins killed", getq3(HurnscaldQuest_ForestBow)-10);
+ }
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+}
+
diff --git a/npc/009-1/foxhound.txt b/npc/009-1/foxhound.txt
index a4a708221..f4cd00cb7 100644
--- a/npc/009-1/foxhound.txt
+++ b/npc/009-1/foxhound.txt
@@ -38,6 +38,7 @@
l("I'm sorry... I can't help you either...");
if (@menu == 1) {
delitem Bread, 5;
+ getexp 20, 0;
Zeny=Zeny+25*5;
mes "";
mesn;
@@ -56,6 +57,7 @@
l("I'm sorry... I can't help you either...");
if (@menu == 1) {
delitem Cheese, 3;
+ getexp 25, 0;
Zeny=Zeny+25*3;
mes "";
mesn;
@@ -73,6 +75,7 @@
l("I'm sorry... I can't help you either...");
if (@menu == 1) {
delitem PinkBlobime, 1;
+ getexp 30, 0;
Zeny=Zeny+10*1;
mes "";
mesn;
@@ -90,6 +93,7 @@
l("I'm sorry... I can't help you either...");
if (@menu == 1) {
delitem Plushroom, 12;
+ getexp 35, 0;
Zeny=Zeny+15*12;
mes "";
mesn;
@@ -107,6 +111,7 @@
l("I'm sorry... I can't help you either...");
if (@menu == 1) {
delitem CaveSnakeEgg, 6;
+ getexp 40, 0;
Zeny=Zeny+27*6;
mes "";
mesn;
@@ -133,6 +138,7 @@
delitem Cheese, 5;
delitem Aquada, 5;
delitem Manana, 5;
+ getexp 500, 15;
getitem Bucket, 1;
mesn;
mesq l("This is just a bucket, but I did some cuts on it so you can see though it. It protects your whole face.");
diff --git a/npc/009-1/guards.txt b/npc/009-1/guards.txt
index c9bd9a979..e0aa43dbd 100644
--- a/npc/009-1/guards.txt
+++ b/npc/009-1/guards.txt
@@ -8,14 +8,16 @@
// The Monster King guild have a special menu
if (strcharinfo(2) == "Monster King") goto L_MKControl;
mesn;
- mesq l("Sorry, the path to Hurnscald has been locked due to monsters.");
+ mesq l("Sorry! The monsters are gone, but this gate stays closed.");
next;
mesn;
- mesq l("Andrei Sakar is on the other side of this gate, killing monsters, as we speak.");
+ mesq l("Past this way is the Great River and the Eternal Swamps. But the river flooded.");
next;
mesn;
- mesq l("The path will be open when it's safe again for heavily armed travellers.");
- close;
+ mesq l("Various people already went missing. We are not allowing anyone to pass, not even GMs!");
+ if (GHQUEST)
+ GHQ_Assign(Snake, "Halinarzo", "300.000 GP, 80 "+getitemlink(StrangeCoin));
+ end;
L_MKControl:
mesn;
@@ -28,6 +30,7 @@ L_MKControl:
close;
L_MKSmall:
+ addmapmask "009-1", MASK_MATTACK;
changemusic "009-1", "mythica.ogg";
disablenpc("Mana Stone");
$@SIEGE_HALI=0; // factor zero
@@ -39,6 +42,7 @@ L_MKSmall:
close;
L_MKMedium:
+ addmapmask "009-1", MASK_MATTACK;
changemusic "009-1", "eric matyas - ghoulish fun.ogg";
disablenpc("Mana Stone");
$@SIEGE_HALI=1; // factor one
@@ -50,6 +54,7 @@ L_MKMedium:
close;
L_MKHuge:
+ addmapmask "009-1", MASK_MATTACK;
changemusic "009-1", "misuse.ogg";
disablenpc("Mana Stone");
$@SIEGE_HALI=5; // factor five
@@ -173,6 +178,7 @@ OnTimer600000:
end;
OnTimer630000:
+ removemapmask "009-1", MASK_MATTACK;
changemusic "009-1", "dragon_and_toast.ogg"; // Restore to default
enablenpc("Mana Stone");
$@SIEGE_HALI$=0;
diff --git a/npc/009-1/mapflags.txt b/npc/009-1/mapflags.txt
new file mode 100644
index 000000000..e6436cf7e
--- /dev/null
+++ b/npc/009-1/mapflags.txt
@@ -0,0 +1,2 @@
+009-1 mapflag town
+009-1 mapflag nopenalty
diff --git a/npc/009-2/_import.txt b/npc/009-2/_import.txt
new file mode 100644
index 000000000..c4f67b6bd
--- /dev/null
+++ b/npc/009-2/_import.txt
@@ -0,0 +1,5 @@
+// Map 009-2: Halinarzo Library & Bar
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/009-2/_warps.txt",
+"npc/009-2/librarian.txt",
+"npc/009-2/ryan.txt",
diff --git a/npc/009-2/_warps.txt b/npc/009-2/_warps.txt
new file mode 100644
index 000000000..df08e8bae
--- /dev/null
+++ b/npc/009-2/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 009-2: Halinarzo Library & Bar warps
+009-2,28,66,0 warp #009-2_28_66 0,0,009-1,73,64
+009-2,62,67,0 warp #009-2_62_67 0,0,009-1,84,64
diff --git a/npc/009-2/librarian.txt b/npc/009-2/librarian.txt
new file mode 100644
index 000000000..1f9027c8e
--- /dev/null
+++ b/npc/009-2/librarian.txt
@@ -0,0 +1,137 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Main Storyline
+// NPC_SAMANTHA
+
+009-2,67,60,2 script Book Keeper NPC_FEMALE,{
+ .@n = getq(General_Narrator);
+ if (.@n == 4) mesn;
+ if (.@n == 4) mesc l("Anyway, I think you should go to Hurnscald Townhall, and speak with the mayor.");
+ if (.@n == 4) next;
+ if (.@n >= 4) goto L_Complete;
+ if (.@n == 3) goto L_Report;
+ if (.@n == 2) goto L_Advance;
+ mesn;
+ mesq l("Hello. I am the book keeper, responsible for keeping Halinarzo History.");
+ // TODO: Import data from BR-002-5 (Royal Library) and make available story about TMW-BR
+ close;
+
+L_Advance:
+ .@nt = getq2(General_Narrator);
+ // Initial Value is 0.
+ // .@nt tracks future value
+ if (!.@nt)
+ goto L_Prologue;
+
+ // If you wait 7 - instead of 3 - hours, you are abusing.
+ // So now, you must wait an extra hour.
+ if (.@nt > santime()+(60*60*7)) {
+ setq2 General_Narrator, santime()+(60*60);
+ .@nt=santime()+(60*60);
+ }
+ // Wait time is over!
+ if (.@nt <= santime())
+ goto L_Complete;
+ mesn;
+ mesq l("Please help us with the bandits on the Canyon, and meanwhile, I'll seek the records for you. Just @@ more.", FuzzyTime(.@nt));
+ close;
+
+L_Prologue:
+ mesn strcharinfo(0);
+ mesq l("Hi! Apparently, I came from here and moved at the age of 4, but I had amnesia and can't remember!");
+ next;
+ mesn strcharinfo(0);
+ mesq l("It would be very kind of you, if you could seek who I am!");
+ next;
+ mesn;
+ mesq l("What are you talking about? You are who you are right now. There's no other you.");
+ mesc l("Unless, of course, if Saulc cloned you. But then we must blame Saulc!");
+ next;
+ mesn;
+ mesq l("Ah... I see. You are a lost soul, without parents, lost on the world with only some basic stuff.");
+ next;
+ mesn;
+ mesq l("Alright, I'll look in the archives. I'll have an answer for you in three hours. Meanwhile, why don't you suppress the bandits on the cliff?");
+ setq2 General_Narrator, santime()+(60*60*3);
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("So, I looked the records. There was nothing really useful.");
+ mesq lg("Like, I know you are female.", "Like, I know you are male.");
+ next;
+ mesn;
+ mesq l("But, I found something really interesting! Ah... I hope you like history?");
+ next;
+ mesn l("HISTORY BOOK");
+ mesc l("In these dark times, countless souls moved away from Halinarzo. All hope seemed lost.");
+ mesc l("But then, Andrei Sakar appeared. Hope was not lost. We could still defend it.");
+ next;
+ mesn l("HISTORY BOOK");
+ mesc l("Many sacrifices were done, but it was lost.");
+ mesc l("Even the mighty Andrei Sakar could only barely escape alive. The Monster King was too strong.");
+ mesc l("All hope was lost. We failed to protect it. We lost everyone who challenged the Monster King. Killed without mercy.");
+ next;
+ mesn l("HISTORY BOOK");
+ mesc l("The Monster King was so powerful! It is impossible to recover the artifact now, and everyone will die!");
+ mesc l("A few families, also known as the Ancient Families of the Soul Menhir (for whatever reasons that may be), departed.");
+ next;
+ mesn l("HISTORY BOOK");
+ mesc l("They promised to travel to the ##BWorld Edge##b to fetch a Mana Fragment. The wisest of them said it was the only chance.");
+ mesc l("They were never again seen. None of them. We burnt all records about everyone here, and blamed the Monster King.");
+ mesc l("They must never know we had it. Their sacrifices must be forgotten. For the sake of all.");
+ compareandsetq General_Narrator, 2, 3;
+ close;
+
+L_Report:
+ mesn;
+ mesq l("Do you want to read the story again? Or should we get to the most obvious point?");
+ next;
+ select
+ l("I want to know what you found out again"),
+ l("I want to know why you shown me that.");
+ if (@menu == 1)
+ goto L_Complete;
+ mesn;
+ mesq l("We have three vanishing sort of people on the story.");
+ next;
+ mesn;
+ mes l("1- The coward families, who ran away when outlook was bad.");
+ mes l("2- The defenders of the artifact, who lost their lives and left people behind.");
+ mes l("3- The ancient families.");
+ next;
+ mesn;
+ mesq l("You probably was only 4 when all that happened. And opposed to official story, the Monster King never enter this building.");
+ next;
+ mesn;
+ mesq l("In other words: If Lua couldn't find your record, your parents were part of this story! But, on which of these three groups were them?");
+ next;
+ mesn;
+ mesq l("Well, actually, you could help me, traveling to the World's Edge! Ah, that is such dangerous journey though... You are not level 150 yet, are you?");
+ next;
+ mesn;
+ mesq l("Anyway, I think if you go to Hurnscald Townhall, and speak with the mayor, he can help you getting there. You can't reach there normally, after all.");
+ next;
+ mesn;
+ mesq l("Good luck, @@!", strcharinfo(0));
+ getexp 1500, 0; // Reference is level 20, so, DO NOT RAISE THIS VALUE.
+ setq General_Narrator, 4;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShirt);
+ //setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansShorts);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, any(8,11,20));
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+ npcsit;
+
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/009-2/ryan.txt b/npc/009-2/ryan.txt
new file mode 100644
index 000000000..ed3c11ab1
--- /dev/null
+++ b/npc/009-2/ryan.txt
@@ -0,0 +1,90 @@
+// TMW-2 Script.
+// Author:
+// Saulc
+// Jesusalva
+// Notes:
+// Buys Tonori Delight
+
+009-2,29,57,0 script Ryan NPC_PLAYER,{
+ if (BaseLevel < 17) goto L_Weak;
+ .@q=getq(HalinarzoQuest_LifeDelight);
+ .@a=(.@q**2)+20;
+ // Maximum: 10'020 Delights
+ if (.@q > 100) goto L_Complete;
+ mesn;
+ mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
+ next;
+ mesn;
+ mesq l("If you bring me @@ @@, I'll give you a reward!", .@a, getitemlink(TonoriDelight));
+ next;
+ select
+ rif(countitem(TonoriDelight) >= .@a, l("I have everything!")),
+ l("Ah, not now...");
+ mes "";
+ if (@menu == 2)
+ close;
+
+ inventoryplace ChefHat, 1;
+
+ delitem TonoriDelight, .@a;
+ getexp rand(.@a, .@a*2)+.@q*rand(10,30), 0;
+ Zeny=Zeny+.@a*21;
+ setq HalinarzoQuest_LifeDelight, .@q+1;
+ mesn;
+ mesq l("Hmmm... Yummy!");
+
+ // Landmark rewards
+ // Chef hat last stage: 120 Delights - 605 in total
+ .@q=getq(HalinarzoQuest_LifeDelight);
+ if (.@q == 11) {
+ getitem ChefHat, 1;
+ getexp 13500, 10;
+ next;
+ mesn;
+ mesq l("Ah, you really deserve this @@. Good job!", getitemlink(ChefHat));
+ }
+ if (.@q >= 21) {
+ Zeny=Zeny+rand(1,.@a);
+ getexp rand(1,.@q), rand(1, .@q);
+ }
+ if (.@q >= 51) {
+ Zeny=Zeny+rand(.@q,.@a);
+ getexp rand(1,.@a), rand(1, .@q);
+ }
+ if (.@q >= 91) {
+ Zeny=Zeny+rand(.@a, .@a+.@q);
+ getexp rand(.@q,.@a), rand(1, .@q);
+ }
+ if (.@q == 100) {
+ getitem PlatinumIngot, 1;
+ next;
+ mesn;
+ mesq l("Ah, I have enough @@ for a life! Take this EXTREMELY RARE @@. Good job!", getitemlink(TonoriDelight), getitemlink(PlatinumIngot));
+ }
+
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("Thanks for the help! Yummy!");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("How did you even got here? There are dangerous swamps north, and dangerous deserts south...");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, Boots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 2);
+
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
+
diff --git a/npc/009-3/_import.txt b/npc/009-3/_import.txt
new file mode 100644
index 000000000..632f4c576
--- /dev/null
+++ b/npc/009-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 009-3: Halinarzo General Store
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/009-3/_warps.txt",
+"npc/009-3/barzil.txt",
+"npc/009-3/dangrostra.txt",
+"npc/009-3/kevin.txt",
diff --git a/npc/009-3/_warps.txt b/npc/009-3/_warps.txt
new file mode 100644
index 000000000..1577a7a58
--- /dev/null
+++ b/npc/009-3/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 009-3: Halinarzo General Store warps
+009-3,44,57,0 warp #009-3_44_57 0,0,009-1,86,35
diff --git a/npc/009-3/barzil.txt b/npc/009-3/barzil.txt
new file mode 100644
index 000000000..9fff1a7cc
--- /dev/null
+++ b/npc/009-3/barzil.txt
@@ -0,0 +1,28 @@
+// TMW-2 Script.
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Banker. Also used on Tier 2 Quest.
+
+009-3,29,38,0 script Barzil NPC_LLOYD,{
+ if (ST_TIER == 2 && gettimetick(2) < QUEST_ELEVARTEMPO) goto L_Tier2;
+ Banker(.name$, "Halinarzo", 12000);
+ close;
+
+L_Tier2:
+ mesn strcharinfo(0);
+ mesq l("I need my master's @@, fast!", getitemlink(SunnyCrystal));
+ next;
+ mesn;
+ mesq l("Of course! Quick, take it!!");
+ inventoryplace SunnyCrystal, 1;
+ ST_TIER=3;
+ getitem SunnyCrystal, 1;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/009-1/dangrostra.txt b/npc/009-3/dangrostra.txt
index 486910e4e..3cc61349f 100644
--- a/npc/009-1/dangrostra.txt
+++ b/npc/009-3/dangrostra.txt
@@ -5,7 +5,7 @@
// Dang Rostra is the seller of Halinarzo (and usually sells overpriced stuff)
// Dang Rostra is an anagram of DragonStar, winner of Easter 2018
-009-1,37,58,0 script Dang Rostra NPC_PLAYER,{
+009-3,26,47,0 script Dang Rostra NPC_PLAYER,{
mesn;
mesq l("Halinarzo people are very poor, but we have our resources...");
@@ -37,14 +37,15 @@ OnInit:
tradertype(NST_MARKET);
// Bows (rare)
- sellitem WoodenBow, 6800, 1;
sellitem ShortBow, 15200, 1;
+ sellitem WoodenBow, 6800, 1;
// Misc (uncommon)
sellitem SharpKnife, -1, 1;
sellitem EmptyBottle, -1, 1; // You can buy some empty bottles here, but they're scarse
+ sellitem LimeDye, -1, 1;
// Arrows (common)
- sellitem Arrow, -1, 250;
- sellitem IronArrow, -1, 110;
+ sellitem Arrow, -1, 200;
+ sellitem IronArrow, -1, 90;
end;
@@ -56,6 +57,7 @@ OnClock0400:
OnClock1600:
restoreshopitem SharpKnife, -1, 1;
restoreshopitem EmptyBottle, -1, 1;
+ restoreshopitem LimeDye, -1, 1;
OnClock0800:
OnClock2000:
restoreshopitem Arrow, -1, 200;
diff --git a/npc/009-3/kevin.txt b/npc/009-3/kevin.txt
new file mode 100644
index 000000000..4db972e28
--- /dev/null
+++ b/npc/009-3/kevin.txt
@@ -0,0 +1,146 @@
+// TMW2 Script
+// Author:
+// Saulc
+// Vasily_Makarov (original from Evol)
+// Jesusalva
+// Description:
+// Status Reset
+
+009-3,39,48,0 script Kevin NPC_PLAYER,{
+
+ speech S_LAST_NEXT,
+ l("I am @@, an alchemist specialized in reset potions.", .name$);
+
+L_Menu:
+ .@plush_count = BaseLevel*210-(9*210);
+ // Lv 10: 210 GP
+ if (BaseLevel > 10)
+ .@plush_count = .@plush_count/(BaseLevel/10);
+
+ select
+ l("Can you reset my stats please?"),
+ l("Can you mix Gem Powder?"),
+ lg("You are weird, I have to go sorry.");
+
+ switch (@menu)
+ {
+ case 1:
+ goto L_ResetStats;
+ case 2:
+ goto L_Powder;
+ case 3:
+ goto L_Quit;
+ }
+
+L_ResetStats:
+ mesn;
+ mesq l("Status point reset can't be undone. Do you really want this?");
+
+L_ConfirmReset:
+ select
+ lg("Yes, I am sure."),
+ lg("I need to think about it...");
+
+ switch (@menu)
+ {
+ case 1:
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Let me just have a quick look at you. Hm... I will need @@ GP to reset your stats.", .@plush_count);
+
+ select
+ rif(Zeny >= .@plush_count, l("Here, take as much as you need, I have plenty!")),
+ rif(Zeny > 0 && Zeny < .@plush_count, 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) {
+ goto L_Quit;
+ }
+
+ // TODO: I think there were functions to deal with GP
+ set Zeny, Zeny-.@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 (StatusPoint == .@wasSP) {
+ speech S_LAST_NEXT,
+ l("It seems that you have no status points to reset!"),
+ l("But the money you brought was really awesome you know."),
+ l("Come back when you will really need me.");
+ } 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! I need the money.");
+ }
+ }
+ goto L_Quit;
+
+L_Powder:
+ mes "";
+ mesn;
+ mesq l("To make @@ I need one from each gem powders, and 800 GP for commission.", getitemlink(GemPowder));
+ next;
+ select
+ l("Yeah, I need one."),
+ l("Thanks for the help, but no."),
+ l("Actually, nevermind. Good bye!");
+ if (@menu == 2)
+ goto L_Menu;
+
+ if (@menu == 3)
+ goto L_Quit;
+
+ if (
+ countitem(DiamondPowder) &&
+ countitem(RubyPowder) &&
+ countitem(EmeraldPowder) &&
+ countitem(SapphirePowder) &&
+ countitem(TopazPowder) &&
+ countitem(AmethystPowder) &&
+ Zeny >= 800) {
+
+ inventoryplace GemPowder, 1;
+ delitem DiamondPowder, 1;
+ delitem RubyPowder, 1;
+ delitem EmeraldPowder, 1;
+ delitem SapphirePowder, 1;
+ delitem TopazPowder, 1;
+ delitem AmethystPowder, 1;
+ Zeny=Zeny-800;
+ getitem GemPowder, 1;
+ getexp rand(6,18), rand(6,18);
+
+ mesn;
+ mesq l("Thanks! Here you go. Perhaps you need another one?");
+ next;
+ goto L_Powder;
+ } else {
+ mesn;
+ mesq l("Sorry, but I need one of each gem powder, and 800 GP.");
+ next;
+ }
+ goto L_Menu;
+
+L_Quit:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/009-4/_import.txt b/npc/009-4/_import.txt
new file mode 100644
index 000000000..25d6ae1cf
--- /dev/null
+++ b/npc/009-4/_import.txt
@@ -0,0 +1,5 @@
+// Map 009-4: Halinarzo Hospital
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/009-4/_warps.txt",
+"npc/009-4/nurse.txt",
+"npc/009-4/yumi.txt",
diff --git a/npc/009-4/_warps.txt b/npc/009-4/_warps.txt
new file mode 100644
index 000000000..247d1db43
--- /dev/null
+++ b/npc/009-4/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 009-4: Halinarzo Hospital warps
+009-4,48,54,0 warp #009-4_48_54 0,0,009-1,33,63
diff --git a/npc/009-4/nurse.txt b/npc/009-4/nurse.txt
new file mode 100644
index 000000000..2d3dd0dbd
--- /dev/null
+++ b/npc/009-4/nurse.txt
@@ -0,0 +1,23 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+
+009-4,39,46,0 script Halinarzo's Nurse NPC_FEMALE,{
+ Nurse(.name$, 10, 5);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ // I am too lazy to dress every NPC I add >.<
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, MiniSkirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, ShortTankTop);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 9);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+
+}
+
diff --git a/npc/009-4/yumi.txt b/npc/009-4/yumi.txt
new file mode 100644
index 000000000..dd6cd30f1
--- /dev/null
+++ b/npc/009-4/yumi.txt
@@ -0,0 +1,60 @@
+// TMW2 Script
+// Author: Jesusalva
+// Description:
+// Joaquim's wife.
+// TODO sprite on the bed
+
+009-4,36,33,0 script Yumi NPC_FEMALE,{
+ .@q=getq(HalinarzoQuest_SickWife);
+ 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 Mountain Snakes, they're highly poisonous!");
+ close;
+
+L_PreAid:
+ mesn;
+ mesq l("Please... Speak low... I am dying........");
+ next;
+ mesn;
+ mesq l("The nurse... The nurse 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 the Nurse 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;
+ getexp 1000, 0;
+ setq HalinarzoQuest_SickWife, 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:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, CottonGloves); // Do not use boots when lying on the bed
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 15);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/009-5/_import.txt b/npc/009-5/_import.txt
new file mode 100644
index 000000000..956fefcba
--- /dev/null
+++ b/npc/009-5/_import.txt
@@ -0,0 +1,5 @@
+// Map 009-5: Halinarzo Church
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/009-5/_warps.txt",
+"npc/009-5/joaquim.txt",
+"npc/009-5/luanna.txt",
diff --git a/npc/009-5/_warps.txt b/npc/009-5/_warps.txt
new file mode 100644
index 000000000..ee7350c51
--- /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: Halinarzo Church warps
+009-5,33,42,0 warp #009-5_33_42 1,0,009-1,63,39
diff --git a/npc/009-5/joaquim.txt b/npc/009-5/joaquim.txt
new file mode 100644
index 000000000..6b5570289
--- /dev/null
+++ b/npc/009-5/joaquim.txt
@@ -0,0 +1,183 @@
+// TMW2 Script, ported from TMW-BR
+// TMW2 Author: Jesusalva
+//
+// Creator: Cardinalli
+// Review: Lunovox <rui.gravata@gmail.com>
+//
+// Description:
+// A rather easy quest to give players what to kill.
+// Reward:
+// Mouboo pendant + 20% exp of level 55
+
+009-5,36,35,4 script Joaquim NPC_PLAYER,{
+ .@q=getq(HalinarzoQuest_SickWife);
+ if (BaseLevel < 36) goto L_TooWeak;
+ if (BaseLevel < 55) goto L_Weak;
+ if (.@q == 5) goto L_Complete;
+ if (.@q == 4) goto L_Finish;
+ if (.@q == 3) goto L_DoIt;
+ if (.@q == 2) goto L_Return;
+ if (.@q == 1) goto L_Found;
+ goto L_Start;
+
+L_TooWeak:
+ mesn;
+ mesq l("Here is a safe haven for we who don't fight. There are no monsters, and the Mouboo watches over us.");
+ close;
+
+L_Weak:
+ mesn;
+ .@r=rand(1,5);
+ switch (.@r) {
+ case 1:
+ mesq l("Watch out! My wife was gravely wounded the other day. Don't forget your shield when leaving this holy place!");
+ 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;
+
+L_Complete:
+ mesn;
+ mesq l("Thanks for helping my wife, I'll be forever grateful.");
+ close;
+
+L_Finish:
+ inventoryplace ElixirOfLife, 1, MoubooPendant, 1;
+ getitem ElixirOfLife, 1;
+ getitem MoubooPendant, 1;
+ getexp 39260, 75;
+ setq HalinarzoQuest_SickWife, 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 @@. May the Mouboo watch over you! o.o", getitemlink(MoubooPendant));
+ close;
+
+L_DoIt:
+ mesn;
+ mesq l("Please help my wife Yumi, on the Hospital!");
+ close;
+
+// Quest Core
+L_Start:
+ 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 @@, 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 HalinarzoQuest_SickWife, 1;
+ close;
+
+L_Found:
+ mesn;
+ mesq l("I can make an @@, 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;
+ mesn l("@@ Recipe", getitemlink(ElixirOfLife));
+ mesc l("@@/100 @@", countitem(CactusDrink), getitemlink(CactusDrink));
+ mesc l("@@/60 @@", countitem(HardSpike), getitemlink(HardSpike));
+ mesc l("@@/45 @@", countitem(SmallMushroom), getitemlink(SmallMushroom));
+ mesc l("@@/40 @@", countitem(SnakeTongue), getitemlink(SnakeTongue));
+ mesc l("@@/30 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
+ mesc l("@@/20 @@", countitem(CaveSnakeTongue), getitemlink(CaveSnakeTongue));
+ mesc l("@@/15 @@", countitem(MoubooSteak), getitemlink(MoubooSteak));
+ next;
+ select
+ l("I will do it, don't worry."),
+ l("Ahh, too many items. Sorry.");
+ mes "";
+ mesn;
+ if (@menu == 1) {
+ mes lg("Thanks! Thanks! Savior! Hurry up!");
+ setq HalinarzoQuest_SickWife, 2;
+ } else {
+ mes l("Oh noes, who nows can help my wife? Please reconsider!");
+ }
+ close;
+
+L_Return:
+ mesn l("@@ Recipe", getitemlink(ElixirOfLife));
+ mesc l("@@/100 @@", countitem(CactusDrink), getitemlink(CactusDrink));
+ mesc l("@@/60 @@", countitem(HardSpike), getitemlink(HardSpike));
+ mesc l("@@/45 @@", countitem(SmallMushroom), getitemlink(SmallMushroom));
+ mesc l("@@/40 @@", countitem(SnakeTongue), getitemlink(SnakeTongue));
+ mesc l("@@/30 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
+ mesc l("@@/20 @@", countitem(CaveSnakeTongue), getitemlink(CaveSnakeTongue));
+ mesc l("@@/15 @@", countitem(MoubooSteak), getitemlink(MoubooSteak));
+ 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(BottleOfTonoriWater) < 30 ||
+ countitem(CaveSnakeTongue) < 20 ||
+ countitem(MoubooSteak) < 15)
+ goto L_Missing;
+
+ inventoryplace ElixirOfLife, 1;
+
+ delitem CactusDrink, 100;
+ delitem HardSpike, 60;
+ delitem SmallMushroom, 45;
+ delitem SnakeTongue, 40;
+ delitem BottleOfTonoriWater, 30;
+ delitem CaveSnakeTongue, 20;
+ delitem MoubooSteak, 15;
+ getitem ElixirOfLife, 1;
+ setq HalinarzoQuest_SickWife, 3;
+ mesn;
+ mesq l("Thanks, I'll just bake the Elixir right away...!");
+ next;
+ mesc l("@@ 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!!");
+ close;
+
+L_Missing:
+ mesn strcharinfo(0);
+ mesq l("Except they're not. I'll be back later.");
+ next;
+ mesn;
+ mesq l("Please, @@! Hurry up!", strcharinfo(0));
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+ npcsit;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/009-5/luanna.txt b/npc/009-5/luanna.txt
new file mode 100644
index 000000000..089062310
--- /dev/null
+++ b/npc/009-5/luanna.txt
@@ -0,0 +1,30 @@
+// TMW2 Script
+// Author:
+// Jesusalva, 4144
+// Description:
+// Luanna is responsible for marriage. Subject to change stuff later.
+
+009-5,32,29,0 script Luanna NPC_FEMALE,{
+ marriagemain();
+ close;
+
+OnTimer30000:
+ marriagecheck();
+ end;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ initnpctimer;
+
+ end;
+
+}
diff --git a/npc/010-1-1/_mobs.txt b/npc/010-1-1/_mobs.txt
index c56bea4bf..c539ca2be 100644
--- a/npc/010-1-1/_mobs.txt
+++ b/npc/010-1-1/_mobs.txt
@@ -2,7 +2,7 @@
// Map 010-1-1: Canyon Great Caves mobs
010-1-1,55,58,29,22 monster Cave Snake 1035,8,35000,150000
010-1-1,70,40,3,1 monster Small Topaz Bif 1101,1,35000,150000
-010-1-1,54,54,54,54 monster Cave Maggot 1027,35,40000,200000
+010-1-1,79,54,59,54 monster Cave Maggot 1027,55,40000,200000
010-1-1,24,34,4,4 monster Black Scorpion 1071,2,35000,150000
010-1-1,112,34,4,4 monster Black Scorpion 1071,2,35000,150000
010-1-1,147,83,29,22 monster Black Scorpion 1074,12,35000,150000
diff --git a/npc/010-1-1/_warps.txt b/npc/010-1-1/_warps.txt
index 3233cd216..d0929bc71 100644
--- a/npc/010-1-1/_warps.txt
+++ b/npc/010-1-1/_warps.txt
@@ -18,3 +18,4 @@
010-1-1,119,36,0 warp #010-1-1_119_36 0,0,010-2,123,100
010-1-1,112,42,0 warp #010-1-1_112_42 0,0,010-1,105,28
010-1-1,168,23,0 warp #010-1-1_168_23 0,0,010-1,59,192
+010-1-1,176,50,0 warp #010-1-1_176_50 0,0,010-2,136,116
diff --git a/npc/010-1/_mobs.txt b/npc/010-1/_mobs.txt
index 84e22dfba..bb9ac2b30 100644
--- a/npc/010-1/_mobs.txt
+++ b/npc/010-1/_mobs.txt
@@ -1,9 +1,10 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 010-1: Desert Mountains mobs
-010-1,101,87,4,4 monster Maggot 1035,6,35000,150000
+010-1,105,87,9,4 monster Desert Maggot 1083,12,35000,150000
010-1,65,95,4,4 monster Scorpion 1071,8,35000,150000
010-1,48,80,4,4 monster Scorpion 1071,6,35000,150000
-010-1,68,46,4,4 monster Snake 1122,6,35000,150000
+010-1,60,55,9,4 monster Sarracenus 1125,2,35000,300000
+010-1,56,98,9,4 monster Desert Maggot 1083,12,35000,150000
010-1,88,74,3,8 monster Mountain Snake 1123,3,35000,300000
010-1,103,27,3,8 monster Mountain Snake 1123,3,35000,300000
010-1,120,30,3,2 monster Desert Bandit 1124,1,35000,300000
@@ -14,5 +15,6 @@
010-1,75,43,6,5 monster Sarracenus 1125,1,35000,300000
010-1,100,67,8,2 monster Snake 1122,12,35000,300000
010-1,59,93,8,2 monster Snake 1122,2,35000,300000
-010-1,65,43,8,2 monster Snake 1122,2,35000,300000
+010-1,74,43,17,3 monster Snake 1122,4,35000,300000
010-1,110,34,8,2 monster Desert Maggot 1083,10,35000,300000
+010-1,81,55,39,39 monster Desert Maggot 1083,60,35000,150000
diff --git a/npc/010-1/_warps.txt b/npc/010-1/_warps.txt
index 894e9d86d..f345991fa 100644
--- a/npc/010-1/_warps.txt
+++ b/npc/010-1/_warps.txt
@@ -3,7 +3,7 @@
010-1,92,17,0 warp #010-1_92_17 0,0,004-1,33,110
010-1,89,27,0 warp #010-1_89_27 0,0,004-1,33,110
010-1,96,30,0 warp #010-1_96_30 0,0,010-1-1,85,99
-010-1,87,36,0 warp #010-1_87_36 0,0,004-2-1,178,84
+010-1,87,36,0 warp #010-1_87_36 0,0,010-1-1,178,84
010-1,62,54,0 warp #010-1_62_54 0,0,010-1-1,43,19
010-1,52,50,0 warp #010-1_52_50 0,0,010-1-1,27,70
010-1,47,48,0 warp #010-1_47_48 0,0,004-1,33,110
diff --git a/npc/010-2/_import.txt b/npc/010-2/_import.txt
index 5b642dfdf..53caf284d 100644
--- a/npc/010-2/_import.txt
+++ b/npc/010-2/_import.txt
@@ -2,3 +2,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/010-2/_mobs.txt",
"npc/010-2/_warps.txt",
+"npc/010-2/sawis.txt",
diff --git a/npc/010-2/_mobs.txt b/npc/010-2/_mobs.txt
index a5442d996..cd00a04a3 100644
--- a/npc/010-2/_mobs.txt
+++ b/npc/010-2/_mobs.txt
@@ -1,12 +1,12 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 010-2: Desert Mountains mobs
-010-2,168,27,4,4 monster Maggot 1035,10,35000,150000
-010-2,154,46,4,4 monster Maggot 1035,8,35000,150000
+010-2,173,32,9,9 monster Maggot 1030,10,35000,150000
+010-2,159,51,9,9 monster Maggot 1030,8,35000,150000
010-2,122,102,8,2 monster Snake 1122,2,35000,300000
-010-2,163,77,3,8 monster Mountain Snake 1123,8,35000,300000
+010-2,163,77,3,8 monster Mountain Snake 1123,7,35000,300000
010-2,98,122,3,2 monster Desert Bandit 1124,1,35000,300000
010-2,110,113,3,2 monster Desert Bandit 1124,1,35000,300000
-010-2,126,110,3,2 monster Desert Bandit 1124,1,35000,300000
+010-2,126,110,3,2 monster Desert Bandit 1124,2,35000,300000
010-2,141,102,6,5 monster Desert Bandit 1124,3,35000,300000
010-2,158,57,6,5 monster Desert Bandit 1124,3,35000,300000
010-2,149,95,6,5 monster Sarracenus 1125,2,35000,300000
@@ -15,5 +15,5 @@
010-2,78,120,3,8 monster Mountain Snake 1123,2,35000,300000
010-2,178,88,3,8 monster Mountain Snake 1123,3,35000,300000
010-2,172,92,3,8 monster Snake 1122,4,35000,300000
-010-2,154,57,29,22 monster Desert Maggot 1083,25,35000,150000
-010-2,86,120,29,22 monster Desert Maggot 1083,15,35000,150000
+010-2,154,81,29,46 monster Desert Maggot 1083,35,35000,150000
+010-2,86,120,29,22 monster Desert Maggot 1083,20,35000,150000
diff --git a/npc/010-2/_warps.txt b/npc/010-2/_warps.txt
index 19228bef0..621a3254d 100644
--- a/npc/010-2/_warps.txt
+++ b/npc/010-2/_warps.txt
@@ -8,7 +8,7 @@
010-2,108,129,0 warp #010-2_108_129 0,0,010-1-1,170,50
010-2,88,113,0 warp #010-2_88_113 0,0,010-1-1,41,38
010-2,127,122,0 warp #010-2_127_122 0,0,004-1,33,110
-010-2,136,115,0 warp #010-2_136_115 0,0,004-1,33,110
+010-2,136,115,0 warp #010-2_136_115 0,0,010-1-1,176,49
010-2,133,114,0 warp #010-2_133_114 0,0,004-1,33,110
010-2,114,103,0 warp #010-2_114_103 0,0,010-1-1,112,45
010-2,123,99,0 warp #010-2_123_99 0,0,010-1-1,119,35
diff --git a/npc/010-2/sawis.txt b/npc/010-2/sawis.txt
new file mode 100644
index 000000000..dd18d68cc
--- /dev/null
+++ b/npc/010-2/sawis.txt
@@ -0,0 +1,133 @@
+// TMW2 Script
+// Author:
+// Saulc
+// Reviewer:
+// Jesusalva
+// Description:
+// craft desert shirt. Reference to player msawis
+// id:193 HalinarzoQuest_Sawis
+
+010-2,138,122,0 script Sawis NPC_PLAYER,{
+ .@q = getq(HalinarzoQuest_Sawis);
+ if (BaseLevel < 37) goto L_TooWeak;
+ if (.@q == 1) goto L_Check;
+ if (.@q == 2) goto L_Complete;
+
+L_GiveTask:
+ mesn;
+ mesq lg("Hello, wanderer!");
+ next;
+ mesq l("No one visit me, I'mm in peace there.");
+ next;
+
+ menu
+ l("What are you doing alone in this desert?"), L_Quest,
+ l("Don't speak to me crazy guy!"), L_Quit;
+
+L_Quest:
+ mes "";
+ mesn;
+ mesq l("I do some research about evolution of snake skin subject to hard sunlight.");
+ next;
+ mesn;
+ mesq l("Then I craft some new type of strong desert shirt, to protect users from snakes and sunlight.");
+ next;
+ mesn;
+ mesq l("If you bring me some items, I can craft one for you. You will be my test subject.");
+ next;
+
+ menu
+ l("Yeah, sure? What do you need?"), L_Start,
+ l("Nah, sorry, everything is good with me."), L_Quit;
+
+L_Start:
+ setq HalinarzoQuest_Sawis, 1;
+ mes "";
+ mesn;
+ mesq l("Ok, what I need is:");
+ goto L_List;
+
+L_Quit:
+ mes "";
+ mesn;
+ mesq l("Alright.");
+ close;
+
+L_List:
+ mes "";
+ mesn;
+ mes l("Here's what I need:");
+ mes l("@@/1 @@", countitem(LeatherShirt), getitemlink(LeatherShirt));
+ mes l("@@/1 @@", countitem(CottonCloth), getitemlink(CottonCloth));
+ mes l("@@/1 @@", countitem(CaveSnakeSkin), getitemlink(CaveSnakeSkin));
+ mes l("@@/3 @@", countitem(SnakeSkin), getitemlink(SnakeSkin));
+ close;
+
+L_Check:
+ mesn;
+ mesq l("Did you brought me everything I asked for?");
+ next;
+ menu
+ l("Yes!"), L_Give,
+ l("Sorry, I forgot what you need!"), L_List,
+ l("No!"), L_Quit;
+
+L_Give:
+ if (
+ countitem(LeatherShirt) < 1 ||
+ countitem(CottonCloth) < 1 ||
+ countitem(CaveSnakeSkin) < 1 ||
+ countitem(SnakeSkin) < 3
+ ) goto L_Lying;
+
+ inventoryplace DesertShirt, 1;
+
+ delitem(LeatherShirt, 1);
+ delitem(CottonCloth, 1);
+ delitem(CaveSnakeSkin, 1);
+ delitem(SnakeSkin, 3);
+
+ getitem(DesertShirt, 1);
+ getexp(5000, 30);
+ setq(HalinarzoQuest_Sawis, 2);
+
+ mes "";
+ mesn;
+ mesq l("I hope this is your size.");
+ close;
+
+L_Complete:
+ mesn;
+ mesq l("As I see, you stay alive!");
+ next;
+ mesn;
+ mesq l("I must keep notes of this.");
+ close;
+
+// Funnier to write than to read, but the player lied. :angel:
+L_Lying:
+ mesn;
+ mesq l("No no no, that's wrong.");
+ next;
+ mesc l("Actually, you could be really useful testing Snake Poison. What do you think about that?");
+ next;
+ goto L_List;
+
+L_TooWeak:
+ mesn;
+ mesq l("What are you doing here? This place is too dangerous for you!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, DesertShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+
+ .sex = G_MALE;
+ .distance = 5;
+
+ end;
+}
diff --git a/npc/011-1/_mobs.txt b/npc/011-1/_mobs.txt
index 8988adbb5..24847dd3f 100644
--- a/npc/011-1/_mobs.txt
+++ b/npc/011-1/_mobs.txt
@@ -2,5 +2,5 @@
// Map 011-1: Depleted Mana Stones Mine mobs
011-1,99,100,79,79 monster Mana Ghost 1068,40,20000,20000
011-1,98,101,79,79 monster Fire Goblin 1067,100,60000,60000
-011-1,100,99,79,79 monster Lava Slime 1097,75,60000,60000
-011-1,101,98,79,79 monster Red Slime 1092,120,60000,60000
+011-1,100,99,79,79 monster Lava Slime 1097,65,60000,60000
+011-1,101,98,79,79 monster Red Slime 1092,110,60000,60000
diff --git a/npc/011-1/manastone.txt b/npc/011-1/manastone.txt
index 0137e342a..ba3e07f9c 100644
--- a/npc/011-1/manastone.txt
+++ b/npc/011-1/manastone.txt
@@ -10,6 +10,14 @@
//
// Notes: During sieges, Monster King and Human Council apparitions, it may hide
// itself.
+//
+// Variables:
+// $MANA_BINT => Base Intelligence for Mana Stone
+// $MANA_BLVL => Base Level for Mana Stone
+// $MANA_JLVL => Base Job Level for Mana Stone
+// .int => Int Increment
+// .lvl => Lvl Increment
+// .jlvl => Jlv Increment
011-1,0,0,0 script Mana Stone NPC_MANA_STONE,{
@@ -30,18 +38,21 @@
L_NotWorthy:
percentheal -70+BaseLevel, -100+BaseLevel;
npctalk3 l("You are not worthy!");
+ if (readparam(Sp) != readparam(MaxSp))
+ dispbottom l("I must have full MP to touch it... Which I don't.");
+ else
+ dispbottom l("I should train my intelligence, and level up, both my base as my Job Level.");
end;
L_Level:
- if (MAGIC_LVL == 0 && readparam(bInt) >= 30 && BaseLevel >= 40 && JobLevel >= 10 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
-
- // Everything below this line is garbage
- if (MAGIC_LVL == 1 && readparam(bInt) >= 60 && BaseLevel >= 60 && JobLevel >= 30 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 2 && readparam(bInt) >= 90 && BaseLevel >= 80 && JobLevel >= 50 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 3 && readparam(bInt) >= 120 && BaseLevel >= 100 && JobLevel >= 70 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 4 && readparam(bInt) >= 150 && BaseLevel >= 120 && JobLevel >= 90 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 5 && readparam(bInt) >= 180 && BaseLevel >= 140 && JobLevel >= 110 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 6 && readparam(bInt) >= 210 && BaseLevel >= 160 && JobLevel >= 120 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
+ // See functions/util.txt for *mstone() details
+ if (mstone(0)) goto L_LevelUp;
+ if (mstone(1)) goto L_LevelUp;
+ if (mstone(2)) goto L_LevelUp;
+ if (mstone(3)) goto L_LevelUp;
+ if (mstone(4)) goto L_LevelUp;
+ if (mstone(5)) goto L_LevelUp;
+ if (mstone(6)) goto L_LevelUp;
if (MAGIC_LVL >= 7) npctalk3 l("You already got all power I could grant you!");
if (is_gm()) percentheal -20, -50;
if (MAGIC_LVL >= 7 || is_gm()) close;
@@ -51,6 +62,8 @@ L_NotWorthy2:
if (is_gm()) close;
percentheal -20, -50;
npctalk3 l("You are not worthy!");
+ if (MAGIC_LVL == 0)
+ dispbottom l("I should train my intelligence, have full MP, and don't neglect even Job Level.");
end;
L_LevelUp:
@@ -59,6 +72,10 @@ L_LevelUp:
if (!MAGIC_LVL) mes l("Magic Power is granted to you, but you die from it.");
if (MAGIC_LVL) mes l("More Magic Power is granted to you, but you die from it.");
MAGIC_LVL = MAGIC_LVL+1;
+ // Magic Numbers work better
+ getexp readparam(NextBaseExp)*771/1000, readparam(NextJobExp)*400/1000;
+ // Non-magic numbers work bad
+ //getexp readparam(NextBaseExp)*getbattleflag(death_penalty_base)/1000, readparam(NextJobExp)*getbattleflag(death_penalty_job)/1000;
percentheal -100, -100;
close;
diff --git a/npc/012-1/_import.txt b/npc/012-1/_import.txt
new file mode 100644
index 000000000..9dfbc1df7
--- /dev/null
+++ b/npc/012-1/_import.txt
@@ -0,0 +1,21 @@
+// Map 012-1: Hurnscald
+// 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/andrei.txt",
+"npc/012-1/bot.txt",
+"npc/012-1/dyrinthetraveler.txt",
+"npc/012-1/guards.txt",
+"npc/012-1/gwendolyn.txt",
+"npc/012-1/hinnak.txt",
+"npc/012-1/jack.txt",
+"npc/012-1/locamit.txt",
+"npc/012-1/luffyx.txt",
+"npc/012-1/mapflags.txt",
+"npc/012-1/richard.txt",
+"npc/012-1/ship.txt",
+"npc/012-1/shoppakep.txt",
+"npc/012-1/soul-menhir.txt",
+"npc/012-1/statue.txt",
+"npc/012-1/terezin.txt",
+"npc/012-1/wateranimation.txt",
diff --git a/npc/012-1/_mobs.txt b/npc/012-1/_mobs.txt
new file mode 100644
index 000000000..500ea2d35
--- /dev/null
+++ b/npc/012-1/_mobs.txt
@@ -0,0 +1,10 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-1: Hurnscald mobs
+012-1,90,63,35,14 monster Red Butterfly 1025,4,30000,90000
+012-1,90,62,36,15 monster Mana Bug 1075,5,30000,90000
+012-1,85,33,35,15 monster Pinkie 1132,8,30000,50000,Hinnak::OnKillPinkie
+012-1,44,56,21,41 monster Clover Patch 1028,3,60000,90000
+012-1,135,58,7,29 monster Piousse 1003,6,40000,60000
+012-1,85,86,52,15 monster Silk Worm 1034,5,30000,30000
+012-1,115,69,1,1 monster Training Dummy 1021,1,10000,10000
+012-1,81,59,54,35 monster Squirrel 1032,12,30000,45000
diff --git a/npc/012-1/_warps.txt b/npc/012-1/_warps.txt
new file mode 100644
index 000000000..5668b57e0
--- /dev/null
+++ b/npc/012-1/_warps.txt
@@ -0,0 +1,13 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-1: Hurnscald warps
+012-1,22,62,0 warp #012-1_22_62 0,3,014-3,223,111
+012-1,79,17,0 warp #012-1_79_17 3,0,014-1,78,97
+012-1,79,102,0 warp #012-1_79_102 3,0,014-2,178,22
+012-1,132,101,0 warp #012-1_132_101 2,0,014-2,232,21
+012-1,65,55,0 warp #012-1_65_55 0,0,012-2,36,46
+012-1,89,58,0 warp #012-1_89_58 0,0,012-3,41,45
+012-1,101,55,0 warp #012-1_101_55 0,0,012-4,35,30
+012-1,121,71,0 warp #012-1_121_71 0,0,012-5,34,36
+012-1,116,66,0 warp #012-1_116_66 0,0,012-5,23,26
+012-1,110,56,0 warp #012-1_110_56 0,0,012-6,58,68
+012-1,102,69,0 warp #012-1_102_69 0,0,012-7,35,64
diff --git a/npc/012-1/andrei.txt b/npc/012-1/andrei.txt
new file mode 100644
index 000000000..0bb3b11e6
--- /dev/null
+++ b/npc/012-1/andrei.txt
@@ -0,0 +1,24 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Legendary hero
+
+// I started with 'Greetings, citzen' and then I thought on 4144.
+// He would never do such formal, hero-ish introduction. So I decided for something
+// more realistic, which sounded like a human hero (ie. a normal player).
+
+012-1,75,58,0 script Andrei Sakar NPC_ANDREI,{
+ mesn l("Andrei Sakar, Legendary Hero");
+ if (strcharinfo(0) == $MOST_HEROIC$)
+ mesq l("Hi, @@.", strcharinfo(0));
+ else
+ mesq l("Hi.");
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+}
diff --git a/npc/012-1/bot.txt b/npc/012-1/bot.txt
new file mode 100644
index 000000000..8423567f4
--- /dev/null
+++ b/npc/012-1/bot.txt
@@ -0,0 +1,86 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Introduces the new area ingame
+
+012-1,82,59,0 script LOFBot NPC_PLAYER,{
+ if (rand(1,5) % 2 == 1) {
+ mesn;
+ mesq l("Ah, @@ is sooo amazing!", $MOST_HEROIC$);
+ next;
+ }
+ mesn;
+ mesq l("Have you ever heard of the [@@http://landoffire.org/|Land Of Fire@@]? It is a really cool game which is being developed by Pyndragon and Pihro!");
+ next;
+ mesn;
+ mesq l("They had a TMWA server, but the Monster King went hyperactive and... Well, it crashed here.");
+
+L_Menu:
+ mes "";
+ menu
+ l("How can I reach the Land Of Fire?"), L_Where,
+ l("Tell me about the Land Of Fire."), L_Fire,
+ l("What are the Transcendence Gates?"), L_Gates,
+ l("Thanks for the help."), L_Close;
+
+// TODO: Perhaps it is worth mentioning on JSaves Castle is a Mana Source and thus, magic&skills work better, and weapons work worse?
+L_Where:
+ mes "";
+ mesn;
+ mesq l("If you head west, you'll eventually reach Jesus Saves' Castle.");
+ next;
+ mesn;
+ mesq l("Inside it, there'll be a Transcendence Gate.");
+ next;
+ mesn;
+ mesq l("It is a really cool place. You must visit it someday!");
+ next;
+ goto L_Menu;
+
+L_Fire:
+ mes "";
+ mesn;
+ mesq l("The Land Of Fire Village was the result from the collapse of two worlds. It is a huge village.");
+ next;
+ mesq l("It have lots of lava caves, and some cool stuff, like the @@, can only be craft there.", getitemlink(SaviorArmor));
+ next;
+ mesq l("Unique monsters can be found there, and people say about staffs which shoot raw death and doom from it!");
+ next;
+ mesq l("It's self sufficient economically, and many fairies enjoy travelling there. In fact, rumors says the Fairy Kingdom is near it!");
+ next;
+ goto L_Menu;
+
+L_Gates:
+ mes "";
+ mesn;
+ mesq l("Ah, you'll find on the Land Of Fire Village four transcendence gates.");
+ next;
+ mesn;
+ mesq l("People from here always look dumbfolded when they walk past them and find themselves somewhere else.");
+ next;
+ mesn;
+ mesq l("There's usually not a lot of things to do past these gates, but some monsters which only lives on the Land of Fire can only be found there!");
+ next;
+ goto L_Menu;
+
+L_Close:
+ closedialog;
+ npctalkonce l("Ah, @@ is so amazing!", $MOST_HEROIC$);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, CenturionHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SaviorArmor);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, TulimsharGuardBoots);
+ setunitdata(.@npcId, UDT_WEAPON, BromenalPants);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 1);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 1);
+ npcsit;
+
+ .sex = G_OTHER;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-1/dyrinthetraveler.txt b/npc/012-1/dyrinthetraveler.txt
new file mode 100644
index 000000000..ebacbfecd
--- /dev/null
+++ b/npc/012-1/dyrinthetraveler.txt
@@ -0,0 +1,105 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// The Travelers travel around the world telling stories.
+
+012-1,119,52,0 script Dyrin The Traveler NPC_M_COINKEEPER,{
+
+ mesn;
+ if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Wow! Are you @@? Everyone, in every city, talks about you!", $MOST_HEROIC$);
+ if (strcharinfo(0) == $MOST_HEROIC$) next;
+
+ mesq l("Hello. I am @@, and I am from a family of travellers. We travel though the whole world, looking for exotic goods.", .name$);
+ next;
+ mesq l("You can buy rare items with me, or I can tell you about different cities in our world.");
+
+L_Menu:
+ mes "";
+ menu
+ l("I want to trade with you."), L_Trade,
+ l("Tell me about Halinarzo."), L_Halin,
+ l("Tell me about Hurnscald."), L_Hurns,
+ l("Tell me about Nivalis."), L_Nival,
+ l("Tell me about Artis."), L_Artis,
+ l("Sorry, I'll pass."), L_Close;
+
+L_Hurns:
+ mes "";
+ mesn;
+ mesq l("Hurnscald was founded after Tulimshar, in more fertile lands. Their walls are not so sturdy as the ones of Tulimshar.");
+ next;
+ mesq l("Under the leadership of King Wusher, they were the first to accept immigrants from other races. You will find humans and non-humans there.");
+ next;
+ mesq l("The fertile climate is ideal for mushrooms. You can also find lots of wood.");
+ next;
+ mesq l("Their economy provide many edible items and potions.");
+ next;
+ goto L_Menu;
+
+L_Halin:
+ mes "";
+ mesn;
+ mesq l("Halinarzo was founded to explore Mana Stones.");
+ next;
+ mesq l("You can find both huge swamps, as huge desertic areas near and on it.");
+ next;
+ mesq l("Lizards are the main monster found, and they steal gold from innocent bypassers.");
+ next;
+ mesq l("Without any mana stone left, and because the walls were not very strong, most of the city was destroyed.");
+ next;
+ mesq l("Unlike many other cities, if you want people in eternal need of items, there is a good place to look.");
+ next;
+ goto L_Menu;
+
+L_Nival:
+ mes "";
+ mesn;
+ mesq l("Nivalis was the last human settlement built during the First Era.");
+ next;
+ mesq l("It's cold, harsh climate makes difficult to live there. It was founded by people thrown away from Tulimshar and Hunrscald for political reasons.");
+ next;
+ mesq l("The cold climate is ideal for slimes, penguins, and other icy creatures. You can find lots of... ice, of course!");
+ next;
+ mesq l("Some items are only produced in Nivalis. After all, it is hard to work properly with ice in a desert!");
+ next;
+ goto L_Menu;
+
+L_Artis:
+ mes "";
+ mesn;
+ mesq l("Artis is a city port founded after the Great Famine on the other continent.");
+ next;
+ mesq l("People say it is the second biggest city from the world.");
+ next;
+ mesq l("Different kind of monsters live near the city. For example, blubs. I have no idea of what are those.");
+ next;
+ mesq l("People usually dock there when travelling to the second continent. Nothing exceptional about economy.");
+ next;
+ goto L_Menu;
+
+L_Trade:
+ mesn;
+ mesq l("Use your @@ as currency!", getitemlink(StrangeCoin));
+ next;
+ openshop "Aeros Trader";
+ closedialog;
+
+L_Close:
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, UglyChristmasSweater); // All travelers wear this stuff
+ setunitdata(.@npcId, UDT_HEADBOTTOM, TulimsharGuardBoots);
+ setunitdata(.@npcId, UDT_WEAPON, SilkPants);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 12);
+ npcsit;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
new file mode 100644
index 000000000..492ef05a0
--- /dev/null
+++ b/npc/012-1/guards.txt
@@ -0,0 +1,480 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Protect Hurnscald
+
+012-1,71,24,0 script Lieutenant Paul NPC_PLAYER,{
+ // The Monster King guild have a special menu
+ if (!$HURNS_LIBDATE && is_admin()) goto L_Admus;
+ if (strcharinfo(2) == "Monster King") goto L_MKControl;
+ mesn;
+ mesq l("We are @@ since the last great attack from the Monster King.", FuzzyTime($HURNS_LIBDATE,1,2));
+ next;
+ mesn;
+ mesq l("Many citzens are still in fear. Paths are closed, economy is a disaster, things are not here.");
+ next;
+ mesn;
+ mesq l("But we are working day and night. We hope that soon, more people come out and this place gets lively again.");
+ close;
+
+L_Admus:
+ mesc l("Protip: Use @hide to don't interfer.");
+ mes l("Determine Team Size (If everyone is ready and stdby at Tulimshar, use: @@. Minimum 2 players.)", getusers(1)-1);
+ input $@BG1_SIZE;
+ if ($@BG1_SIZE < 2) close;
+ $@BG1_SIZE=$@BG1_SIZE+1;
+
+ kickwaitingroomall("Hurnsguard");
+ setmapflagnosave("012-1", "000-1", 22, 22);
+ //setmapflag("012-1", mf_nocommand); // This is just too powerful!
+ setmapflag("012-1", mf_battleground);
+ setmapflag("012-1", mf_nopenalty);
+ setmapflag("012-1",mf_bexp,126);
+ enablenpc "Hurnsguard";
+ donpcevent "Hurnsguard::OnSet";
+ donpcevent "Lieutenant Paul::OnSet";
+ addmapmask "012-1", MASK_MATTACK;
+ addmapmask "012-1", MASK_EVILSANCTUM;
+ pvpon("012-1");
+ disablenpc "#012-1_22_62";
+ disablenpc "#012-1_79_17";
+ disablenpc "#012-1_79_102";
+ disablenpc "#012-1_132_101";
+ disablenpc "#012-1_65_55";
+ disablenpc "#012-1_89_58";
+ disablenpc "#012-1_101_55";
+ disablenpc "#012-1_121_71";
+ disablenpc "#012-1_116_66";
+ disablenpc "#012-1_110_56";
+ disablenpc "#012-1_102_69";
+ disablenpc "Andrei Sakar";
+ disablenpc "Dyrin The Traveler";
+ disablenpc "Gwendolyn";
+ disablenpc "Jack";
+ disablenpc "Locamit";
+ disablenpc "Richard";
+ disablenpc "Soul Menhir#hurns";
+ disablenpc "HurnsShip";
+ disablenpc "Hinnak";
+ disablenpc "Tezzerin";
+ disablenpc "Luffyx";
+ disablenpc "Shoppa Kep";
+ announce "##1Hear ya, hear ya! There are "+str($@BG1_SIZE-1)+" vacant slots at Hurnsguard to LIBERATE HURNSCALD!", bc_all | bc_npc;
+ mes "##1You are assigned to Monster Forces. Do not leave Hurnscald.";
+ close;
+
+L_MKControl:
+ mesn;
+ mes l("Oh noes! You've found the Hurnscald control panel!");
+ close;
+
+OnSet:
+ .CYCLES=0;
+ waitingroom("Monster Army", 2, "start#hurns_lib::OnReadyCheck", 1);
+ end;
+
+OnEnterBG:
+ debugmes "Paul::OnEnterBG";
+ $@FK_Team2 = waitingroom2bg("012-1",141, 65,"start#hurns_lib::OnPlayer2Quit","start#hurns_lib::OnPlayer2Death");
+ setbgteam $@FK_Team2, 2;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
+
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, Bull);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, LegionTrainingShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_SHIELD, LousyMoccasins); // TODO FIXME: Display Boots
+ setunitdata(.@npcId, UDT_WEAPON, ArtisBacksword);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 15);
+
+ end;
+}
+
+
+// Liberation Day Script
+003-1,122,25,0 script Hurnsguard NPC_PLAYER,{
+ query_sql("SELECT online FROM `char` WHERE name='Saulc GM'", .@online);
+ if (!.@online) {
+ mesn;
+ mesq l("We are planning to take over Hurnscald from the Monster King, and we will need everybody's help.");
+ next;
+ mesn;
+ mesq l("As soon that Saulc GM get back, we can start.");
+ close;
+ }
+ mesc l("Hurnscald Liberation Day special event"), 3;
+ mes "";
+ mesc l("The objective of this event is to ##Bslay the Monster Admiral##b.");
+ mesc l("If you die, you ##Bwon't##b be able to rejoin, but you won't suffer the penalty.");
+ next;
+ mesc l("If all players there die, Hurnscald WON'T BE LIBERATED.");
+ mesc l("This basically means that it'll be another day without it.");
+ mesc l("Also, the more players survive, the better rewards will be given.");
+ next;
+ mesc l("Right click on this NPC to join the Hurnscald Alliance."), 3;
+ mesc l("The number of players must be precise, meaning if someone doesn't joins,");
+ mesc l("the event won't start and HURNSCALD WON'T BE LIBERATED.");
+ next;
+ mesc l("Once you join the Alliance, you won't be able to talk with people outside it.");
+ mesc l("Additionaly, all your movement will be restricted until either you're warped or log out.");
+ close;
+
+OnSet:
+ waitingroom("Hurnscald Alliance", $@BG1_SIZE, "start#hurns_lib::OnReadyCheck", $@BG1_SIZE-1);
+ end;
+
+OnInit:
+ .CYCLES=0;
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, GoldenWarlordPlate); // Light armor
+ setunitdata(.@npcId, UDT_HEADMIDDLE, JeansChaps); // Pants
+ setunitdata(.@npcId, UDT_HEADBOTTOM, DeepBlackBoots); // Shoes
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+ disablenpc(.name$);
+ end;
+
+OnEnterBG:
+ debugmes "Alliance::OnEnterBG";
+ $@FK_Team1 = waitingroom2bg("012-1",141, 65,"start#hurns_lib::OnPlayerQuit","start#hurns_lib::OnPlayerDeath");
+ setbgteam $@FK_Team1, 1;
+ end;
+
+OnDoEvent:
+ debugmes "OnDoEvent";
+ mapannounce("012-1", "Find and slay the Monster Admiral! DO NOT ATTACK GUARDS. Don't let everyone die!", bc_map);
+ .@Pl=getmapusers("012-1");
+ .CYCLES=0;
+
+ // Guards won't attack the Monster Staff
+ areamonster("012-1", 52, 45, 127, 80, "Monster Sergeant", Forain, .@Pl/3+1, "Hurnsguard::OnXtreem");
+ areamonster("012-1", 52, 45, 127, 80, "Monster Sergeant", Moonshroom, .@Pl/2+1, "Hurnsguard::OnXtreem");
+ areamonster("012-1", 52, 45, 127, 80, "Monster Soldier", AngryScorpion, .@Pl, "Hurnsguard::OnSkip");
+ for (.@i = 0; .@i < .@Pl; .@i++)
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Friendly Guard", FallenGuard1, "Cassia::OnSkip");
+ initnpctimer();
+ end;
+
+OnSkip:
+ // Here, coins drop rate are based on REMAINING PLAYERS and DEFEATED MONSTER LEVEL.
+ // A level 100 monster can have a 5% drop bonus against a level 0 monster.
+ // You have 1.2% of base chance, plus 0.5% each player + 0.05% each monster level.
+ if (rand(10000) <= 120 + (getmapusers("012-1")*50) + (strmobinfo(3,killedrid)*5))
+ getmapxy(.@m$, .@x, .@y, 0);
+ makeitem(any(Plushroom, Chagashroom, Bread, HalfCroconut, Aquada, CasinoCoins, CactusCocktail, AppleCocktail, CherryCocktail), any(1,1,2), "012-1", .@x, .@y);
+ end;
+
+OnTimer300000:
+ .@Pl=getmapusers("012-1")+mobcount("012-1", "Cassia:OnSkip")-1;
+ .@Pla=getmapusers("012-1");
+ .@Mb=mobcount("012-1", "Hurnsguard:OnSkip")+mobcount("012-1", "Hurnsguard::OnXtreem")+2; // Saulc GM is an enemy for server code
+ for (.@i = 0; .@i < .@Pla; .@i++)
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Friendly Guard", FallenGuard1, "Cassia::OnSkip");
+
+ // See if we need extra guards, depending on how outnumbered allied forces are.
+ if ((.@Mb / .@Pl) > 7) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 6) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 5) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 4) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 3) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ .@Pl=getmapusers("012-1")+mobcount("012-1", "Cassia:OnSkip")-1;
+ .@Pla=getmapusers("012-1")-1;
+
+ mapannounce("012-1", "Survivors: "+.@Pla+" Hurnscald Alliance: "+.@Pl+" Monsters: "+.@Mb, bc_map);
+ initnpctimer;
+ end;
+
+OnTimer10000:
+OnTimer120000:
+OnTimer240000:
+ .CYCLES=.CYCLES+1;
+
+ // Scripted monsters
+ if (.CYCLES == 2) {
+ mapannounce("012-1", "Monster Lieutenant appears! Watch out!", bc_map);
+ bg_monster($@FK_Team2, "012-1", 65, 71, "Monster Lieutenant", NightScorpion, "Hurnsguard::OnXtreem");
+ } else if (.CYCLES == 3) {
+ mapannounce("012-1", "Monster Admiral appears! Kill it to liberate Hurns!", bc_map);
+ bg_monster($@FK_Team2, "012-1", 65, 71, "Monster Admiral", GiantMutatedBat, "Hurnsguard::OnVictory");
+ }
+
+ // One monster per user alive
+ .@Pl=getmapusers("012-1");
+ for (.@i = 0; .@i < .@Pl; .@i++) {
+ .@mid=rand(1,17);
+ switch (.@mid) {
+ case 1:
+ .@monsterId = CaveMaggot ; break;
+ case 2:
+ .@monsterId = RedSlime ; break;
+ case 3:
+ .@monsterId = LavaSlime ; break;
+ case 4:
+ .@monsterId = BlackScorpion ; break;
+ case 5:
+ .@monsterId = AngryRedScorpion ; break;
+ case 6:
+ .@monsterId = Sarracenus ; break;
+ case 7:
+ .@monsterId = Snake ; break;
+ case 8:
+ .@monsterId = MountainSnake ; break;
+ case 9:
+ .@monsterId = GreenSlime ; break;
+ case 10:
+ .@monsterId = Bandit ; break;
+ case 11:
+ .@monsterId = BlackScorpion ; break;
+ case 12:
+ .@monsterId = rand(HouseMaggot, AngryScorpion) ; break; // Lucky bonus, probably a Bif
+ case 13:
+ .@monsterId = Pinkie ; break;
+ case 14:
+ .@monsterId = MagicGoblin ; break;
+ case 15:
+ .@monsterId = Mouboo ; break;
+ case 16:
+ .@monsterId = Scorpion ; break;
+ default: // case 13:
+ .@monsterId = Yeti ; break;
+ }
+ bg_monster($@FK_Team2, "012-1", rand(69, 136), rand(83, 74), "Monster Soldier", .@monsterId, "Hurnsguard::OnSkip");
+ // 40% odds of having an extra monster spawned (player loop)
+ if (rand(1,5) % 2 == 0)
+ bg_monster($@FK_Team2, "012-1", rand(69, 136), rand(83, 74), "Monster Soldier", .@monsterId, "Hurnsguard::OnSkip");
+ }
+ // One slime blast per general
+ .@Mgg=mobcount("012-1", "Hurnsguard::OnXtreem");
+ for (.@i = 0; .@i < .@Mgg; .@i++) {
+ bg_monster($@FK_Team2, "012-1", rand(69, 136), rand(83, 74), "Monster Soldier", SlimeBlast, "Cassia::OnSkip");
+ }
+ // One Magic Goblin or Pinkie per cycle
+ for (.@i = 0; .@i < .CYCLES; .@i++) {
+ if (rand(1,2) == 1)
+ bg_monster($@FK_Team2, "012-1", rand(69, 136), rand(83, 74), "Monster Soldier", Pinkie, "Hurnsguard::OnSkip");
+ else
+ bg_monster($@FK_Team2, "012-1", rand(69, 136), rand(83, 74), "Monster Soldier", MagicGoblin, "Hurnsguard::OnSkip");
+ }
+ // Spawn Angry Scorpions on the whole map. These monsters are neutral!
+ areamonster("012-1", 33, 16, 137, 100, "Monster Soldier", AngryScorpion, .CYCLES, "Hurnsguard::OnSkip");
+
+ // One extra guard on every summon
+ bg_monster($@FK_Team1, "012-1", rand(131, 136), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ end;
+
+OnXtreem:
+ if (rand(0,100) <= 50)
+ Karma=Karma+1;
+ else
+ getitem StrangeCoin, 2;
+ // Here, the drop is a Bronze Gift, based on living players and players nearby.
+ // You have 0.1% of base chance, plus 0.2% each fighting player + 1% each near player.
+ getmapxy(.@m$, .@x, .@y, 0);
+ if (rand(10000) <= 10 + (getmapusers("012-1")*20) + (getareausers("012-1", .@x-8, .@x+8, .@y-8, .@y+8)*100))
+ makeitem(BronzeGift, 1, "012-1", .@x, .@y);
+ end;
+
+OnVictory:
+ $HURNS_LIBDATE=gettimetick(2);
+ removemapflag("012-1", mf_nosave);
+ disablenpc "Hurnsguard";
+ pvpoff("012-1");
+ removemapmask "012-1", MASK_MATTACK;
+ removemapmask "012-1", MASK_EVILSANCTUM;
+ //removemapflag("012-1", mf_nocommand);
+ removemapflag("012-1", mf_battleground);
+ removemapflag("012-1", mf_bexp);
+ enablenpc "#012-1_22_62";
+ enablenpc "#012-1_79_17";
+ enablenpc "#012-1_79_102";
+ enablenpc "#012-1_132_101";
+ enablenpc "#012-1_65_55";
+ enablenpc "#012-1_89_58";
+ enablenpc "#012-1_101_55";
+ enablenpc "#012-1_121_71";
+ enablenpc "#012-1_116_66";
+ enablenpc "#012-1_110_56";
+ enablenpc "#012-1_102_69";
+ enablenpc "Andrei Sakar";
+ enablenpc "Dyrin The Traveler";
+ enablenpc "Gwendolyn";
+ enablenpc "Jack";
+ enablenpc "Locamit";
+ enablenpc "Richard";
+ enablenpc "Soul Menhir#hurns";
+ enablenpc "HurnsShip";
+ enablenpc "Hinnak";
+ enablenpc "Tezzerin";
+ enablenpc "Luffyx";
+ enablenpc "Shoppa Kep";
+ announce "##2Hurnscald was recovered!", bc_all | bc_npc;
+ killmonster("012-1", "All");
+ changemusic "012-1", "tws_birds_in_the_sunrise.ogg"; // Play a more peaceful tune.
+ stopnpctimer;
+ maptimer("012-1", 10, "Hurnsguard::OnReward");
+ // Here, coins drop rate are based on REMAINING PLAYERS and DEFEATED MONSTER LEVEL.
+ // You have $coinsrate of base chance, plus 2% for each living player.
+ // $coinsrate is set on Aeros Event Master, and defaults to 6%
+ if (rand(10000) <= $coinsrate + (getmapusers("012-1")*200))
+ getmapxy(.@m$, .@x, .@y, 0);
+ makeitem(StrangeCoin, 1, "012-1", .@x, .@y);
+ Karma=Karma+1;
+ $MOST_HEROIC$=strcharinfo(0);
+ bg_destroy(1);
+ bg_destroy(2);
+ end;
+
+OnReward:
+ bg_leave();
+ // Let's say we have 5 players for reference. Subtract a Game Master, he doesn't counts.
+ .@Pl=getmapusers("012-1")-1;
+ getexp .@Pl*600, .@Pl*30; // 3,000 exp, 150 jxp
+ Zeny=Zeny+.@Pl*300; // 1,500 gp
+ end;
+
+}
+
+//== Battleground Engine ======================
+012-1,0,0,0 script start#hurns_lib NPC_HIDDEN,{
+OnInit:
+ end;
+
+OnEnable:
+ end;
+
+OnPlayerQuit:
+OnPlayerDeath:
+OnPlayer2Quit:
+OnPlayer2Death:
+ bg_leave();
+ // Check if we are done for.
+ warp "000-1", 22, 22;
+ .@Pl=getmapusers("012-1");
+ if (.@Pl <= 1) {
+ announce "##1Hurnscald is lost!", bc_all | bc_npc;
+ disablenpc "Hurnsguard";
+ pvpoff("012-1");
+ removemapmask "012-1", 10;
+ removemapflag("012-1", mf_nocommand);
+ removemapflag("012-1", mf_battleground);
+ killmonster("012-1", "All");
+ bg_destroy(1);
+ bg_destroy(2);
+ }
+ end;
+
+OnReadyCheck:
+ .@Alliance = getwaitingroomstate(0,"Hurnsguard");
+ debugmes "Check:" +str(.@Alliance)+"<"+ str($@BG1_SIZE-1);
+ if ( .@Alliance < $@BG1_SIZE-1 )
+ end;
+ donpcevent "Hurnsguard::OnEnterBG";
+ donpcevent "Lieutenant Paul::OnEnterBG";
+ debugmes "Prepare Warp";
+ bg_warp $@FK_Team1,"012-1",141, 65;
+ bg_warp $@FK_Team2,"012-1",69, 71;
+ changemusic "012-1", "misuse.ogg";
+ donpcevent "Hurnsguard::OnDoEvent";
+ //initnpctimer;
+ end;
+}
+
+
+
+
+
+
+
+
+
+// Handle Guard's logic
+function script CheckpointGuard {
+ mesn;
+ mesq l("I am stationed here to protect Hurnscald from monsters.");
+ next;
+ mesn;
+ mesq l("If the Monster King attack, I will try to control inbound monsters here.");
+ close;
+ return;
+}
+
+012-1,81,18,0 script Checkpoint Guard#1 NPC_GUARD2,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,26,60,0 script Checkpoint Guard#2 NPC_GUARD1,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+012-1,80,98,0 script Checkpoint Guard#3 NPC_GUARD2,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,134,98,0 script Checkpoint Guard#4 NPC_GUARD1,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+012-1,94,56,0 script Guard#012-1.1 NPC_GUARD1,{
+ legiontalk;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,112,65,0 script Guard#012-1.2 NPC_GUARD2,{
+ legiontalk;
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-1/gwendolyn.txt b/npc/012-1/gwendolyn.txt
new file mode 100644
index 000000000..0747f8566
--- /dev/null
+++ b/npc/012-1/gwendolyn.txt
@@ -0,0 +1,590 @@
+// TMW2 Script
+// Author:
+// The Mana World Team
+// Edited by:
+// Jesusalva
+// Description:
+// Archery Trainer
+
+012-1,88,52,0 script Gwendolyn NPC_BOWMASTER,{
+ .@q=getq(HurnscaldQuest_HarkEye);
+ .@fbow=getq(HurnscaldQuest_ForestBow);
+
+ if (.@q == 6) goto L_State6;
+ if (.@q == 5) goto L_State5;
+ if (.@q == 4) goto L_State4;
+ if (.@q == 3) goto L_State3;
+ if (.@q == 2) goto L_State2;
+ if (.@q == 1) goto L_State1;
+
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Hey there. My name is Gwendolyn Bowmaker; I'm the granddaughter of the famous Glinda Bowmaker.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("She and her husband Simon Bowmaker, vowed to teach the ways of archery to those with willpower, and allow everyone to use a bow.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("I intend to continue with my family's tradition, by teaching the Way of Archery.");
+ setq HurnscaldQuest_HarkEye, 1;
+ next;
+
+L_State1:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Are you interested in becoming a student of Archery?");
+ next;
+ menu
+ l("I want to become an archer!"),L_Fee,
+ l("I'm not interested right now."),L_Abort;
+
+L_Fee:
+ mes "";
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Wonderful! My fee is @@. This fee is the first step in separating those with willpower, from those without.", .SCHOOLFEE);
+ next;
+ menu
+ l("That's a lot, but I think it will be worth it."),L_Next,
+ l("I'm not sure I want to spend that much."),L_Abort;
+
+L_Next:
+ mes "";
+ if (Zeny < .SCHOOLFEE)
+ goto L_No_Money;
+
+ Zeny = Zeny - .SCHOOLFEE;
+ setq HurnscaldQuest_HarkEye, 2;
+
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Great! The first thing you need is, obviously, a bow. You should not use any you come across, but a high quality one.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Inside this house is my brother Alan. He knows how to make Forest Bows of exquisite quality.");
+ next;
+
+ if (countitem("ForestBow") < 1) {
+ goto L_Close;
+ }
+ select
+ l("I already have a Forest Bow.");
+ mes "";
+
+L_State2:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Let me see your bow.");
+ next;
+
+ if (countitem("ForestBow") < 1)
+ goto L_NoBow;
+ if (.@fbow < 2)
+ goto L_FakeBow;
+
+ setq HurnscaldQuest_HarkEye, 3;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Very well, this looks fine. It is time for your first lesson.");
+ next;
+ goto L_Lesson;
+
+L_Lesson:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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 resistance.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("But remember: This makes you much more vulnerable, and you usually cannot hit from too close, so watch your step and don't stumble into your enemy's attack.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Also your strength doesn't matter much. It helps you to carry more arrows with you, but nothing a few trips to the store won't do.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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;
+
+L_State3:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("To demonstrate that you understood what I'm trying to teach you, you should go and fight against some snakes. I know they're strong, but that's not important to an archer.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("To prove me your results, bring me @@ @@, @@ @@ and @@ @@.",
+ .CAVE_EGGS_AMOUNT, getitemlink(CaveSnakeEgg),
+ .SNAKE_EGGS_AMOUNT, getitemlink(SnakeEgg),
+ .MOUNTAIN_EGGS_AMOUNT, getitemlink(MountainSnakeEgg));
+ next;
+ menu
+ l("Can you please repeat your lesson?"),L_Lesson,
+ l("I will go and hunt some snakes."),L_Close,
+ l("I have what you want."),L_Next1;
+
+L_Next1:
+ mes "";
+ if (countitem("CaveSnakeEgg") < .CAVE_EGGS_AMOUNT
+ ||countitem("SnakeEgg") < .SNAKE_EGGS_AMOUNT
+ ||countitem("MountainSnakeEgg") < .MOUNTAIN_EGGS_AMOUNT)
+ goto L_Insufficient;
+
+ delitem "CaveSnakeEgg", .CAVE_EGGS_AMOUNT;
+ delitem "SnakeEgg", .SNAKE_EGGS_AMOUNT;
+ delitem "MountainSnakeEgg", .MOUNTAIN_EGGS_AMOUNT;
+
+ getexp .QUEST_EGG_EXP, 100;
+
+ setq HurnscaldQuest_HarkEye, 4;
+
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Very well. That will make a great meal. You pass!");
+ next;
+
+L_State4:
+ if (BaseLevel < .BASELEVEL_GAME)
+ goto L_NotReady;
+ if (!MAGIC_LVL)
+ goto L_NotReady;
+ mesc l("Gwendolyn takes an analyzing look at you. Then she nods.");
+ next;
+ setq HurnscaldQuest_HarkEye, 5;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Ok. You have made great progress. I think you are ready for further tasks.");
+ next;
+ goto L_Explain;
+
+L_Explain:
+ mes "";
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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;
+ mesq l("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;
+ mesq l("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:
+ .@wdX = 0; // wind direction x-coordinate, rand
+ .@wdY = 0; // wind direction y-coordinate, rand
+ // set .@wp, 0; // windpower
+ .@spX = 0; // start position x-coordinate, player decision
+ // set .@spY, 0; // start position y-coordinate, const
+ .@sp = 0; // shotpower, player decision
+ //set .@targetX, 0; // target position, const
+ //set .@targetY, 20; // target position, const
+ .@pointX = 0; // point the player hits, x-coordinate
+ .@pointY = 0; // point the player hits, y-coordinate
+ .@wdIndex = 0;
+ //
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Show me what you can!");
+ next;
+ menu
+ l("Can you please explain the task again?"),L_Explain,
+ l("I'm ready, let's start!"),L_Game,
+ l("I'm sorry, I will come back later."),L_Close;
+
+L_Game:
+ mes "";
+ if (countitem(ForestBow) < 1)
+ goto L_NoBow;
+ if (countitem(TrainingArrow) < 1)
+ goto L_Arrows;
+ delitem TrainingArrow, 1;
+ mesc l("You go to the training field and stand exactly on the same level with the target. The target is located about 13 meters 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) .@wdX = rand(9) - 4;
+ if (.@wdX == 0) .@wdX = rand(9) - 4;
+
+ .@wdY = rand(9) - 4;
+ if (.@wdY != 2 && .@wdY !=-2) .@wdY = rand(9) - 4;
+ if (.@wdY == 0) .@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", l("southeast"), l("south"), l("southwest"), l("east"),
+ "error2, please report", l("west"), l("northeast"), l("north"), l("northwest");
+ @paramX = .@wdX;
+ @paramY = .@wdY;
+ callsub S_getDirection;
+ .@wdIndex = @returnIndex;
+
+ // Cheat
+ if (is_admin() && debug)
+ dispbottom l("Wind: @@, @@",.@wdX,.@wdY);
+
+ .@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 l("Gwendolyn Bowmaker");
+ mesq lg("You're lucky. It is windless now.");
+ next;
+ goto L_Start;
+
+L_wp1:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("There is a slight breeze coming from @@.", .@wd$[.@wdIndex]);
+ next;
+ goto L_Start;
+
+L_wp2:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("The wind is blowing from @@.", .@wd$[.@wdIndex]);
+ next;
+ goto L_Start;
+
+L_wp3:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Right now, there is a strong wind blowing from @@.", .@wd$[.@wdIndex]);
+ next;
+ goto L_Start;
+
+L_wp4:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Here we have a squall from @@.", .@wd$[.@wdIndex]);
+ next;
+ goto L_Start;
+
+L_Start:
+ mesc l("Do you want to go to the left, the right or stay where you are?");
+ next;
+ menu
+ l("I want to move left."),L_Left,
+ l("I go right."),L_Right,
+ l("I stay."),L_Stay,
+ l("I will try it later."),L_Close;
+
+L_Stay:
+ .@spX = 0;
+ mesc l("You stay where you are..");
+ next;
+ goto L_Power;
+
+L_Left:
+ mesc l("How many steps?");
+ next;
+ menu
+ "1",L_Left1,
+ "2",L_Left2,
+ "3",L_Left3,
+ "4",L_Left4;
+
+L_Left1:
+ .@spX = -1;
+ mesc l("You take one step to the left.");
+ next;
+ goto L_Power;
+
+L_Left2:
+ .@spX = -2;
+ mesc l("You take two steps to the left.");
+ next;
+ goto L_Power;
+
+L_Left3:
+ .@spX = -3;
+ mesc l("You take three steps to the left.");
+ next;
+ goto L_Power;
+
+L_Left4:
+ .@spX = -4;
+ mesc l("You take four steps to the left.");
+ next;
+ goto L_Power;
+
+L_Right:
+ mesc l("How many steps?");
+ next;
+ menu
+ "1",L_Right1,
+ "2",L_Right2,
+ "3",L_Right3,
+ "4",L_Right4;
+
+L_Right1:
+ .@spX = 1;
+ mesc l("You take one step to the right.");
+ next;
+ goto L_Power;
+
+L_Right2:
+ .@spX = 2;
+ mesc l("You take two steps to the right.");
+ next;
+ goto L_Power;
+
+L_Right3:
+ .@spX = 3;
+ mesc l("You take three steps to the right.");
+ next;
+ goto L_Power;
+
+L_Right4:
+ .@spX = 4;
+ mesc l("You take four steps to the right.");
+ next;
+ goto L_Power;
+
+L_Power:
+ mes "";
+ mesc l("How powerfully do you want to shoot?");
+ next;
+ select
+ l("very weak shot"),
+ l("rather weak shot"),
+ l("weak shot"),
+ l("somewhat weak shot"),
+ l("medium shot"),
+ l("somewhat powerful shot"),
+ l("powerful shot"),
+ l("rather powerful shot"),
+ l("very powerful shot");
+
+ // 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;
+
+ // Debug information. If you move wind info to above, you CHEAT.
+ if (is_admin()) {
+ dispbottom l("Wind: @@, @@",.@wdX,.@wdY);
+ dispbottom l("You: @@, @@",.@spX,.@sp);
+ dispbottom l("Final: @@, @@",.@pointX,.@pointY);
+
+ }
+
+ if( .@pointX==0 && .@pointY==0 )
+ goto L_Success;
+
+ //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", l("left above"), l("above"), l("right above"), l("left"),
+ "error4, please report", l("right"), l("lower left"), l("below"), l("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 bad shot
+ .@target_dist_sq = (.@pointX * .@pointX) + (.@pointY*.@pointY);
+
+ if (.@target_dist_sq < 5)
+ goto L_Quite;
+ if (.@target_dist_sq < 17)
+ goto L_Almost;
+
+ //here are bad shots:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("D'oh, what a terrible shot!");
+ next;
+ mesq l("Do you even know what a bow is?");
+ next;
+ mesq l("That was far @@.", .@target_direction$[.@targethit]);
+ next;
+ goto L_Game;
+
+L_Almost:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("That was @@.", .@target_direction$[.@targethit]);
+ next;
+ mesq l("I suggest some training.");
+ next;
+ goto L_Game;
+
+L_Quite:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("That was quite close. Impressive!");
+ next;
+ mesq l("It was a little @@.", .@target_direction$[.@targethit]);
+ next;
+ mesq l("But you did not hit... have another try.");
+ next;
+ // You might get unlucky and the wind may change
+ if(rand(5) == 2) goto L_Game;
+ mesq l("Hurry up, before the wind changes.");
+ next;
+ goto L_Start;
+
+L_Success:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Wonderful! That was great! Directly hit the bull's eye!"); // TRANSLATORS: manner of speak, "to hit exactly on the target"
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Maybe you did it, after all!");
+ next;
+ mesq l("Let me inspect it...");
+ mesc l("She walks to the target.");
+ next;
+ if( rand(400) > (2*readparam(bDex) + readparam(bAgi)))
+ goto L_Miss;
+
+ setq HurnscaldQuest_HarkEye, 6;
+
+ skill SN_SHARPSHOOTING, 1, 0;
+ getexp .QUEST_HAWK_EXP, 0;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Perfect indeed! Congratulations!");
+ next;
+
+ mesq l("Remember, there is always something new to learn. And you should not let your training down in order to keep and improve your abilities.");
+ next;
+ goto L_Close;
+
+L_Miss:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Ohh! A fingernail aside.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("That is quite impressive, but you can perform better with more training.");
+ next;
+ goto L_Game;
+
+L_State6:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("You really have a reason to be proud.");
+ next;
+ goto L_Close;
+
+L_Abort:
+ mes "";
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("That's a pity. Well, if you change your mind, come back any time.");
+ next;
+ goto L_Close;
+
+L_No_Money:
+ mes "";
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("I am sorry, but it seems that you don't have enough money. Come back when you have reorganized your finances.");
+ next;
+ goto L_Close;
+
+L_NoBow:
+ mesq l("As an archer, you should always carry your bow with you. Doesn't warriors carry those heavy swords without complaining? Go and get it.");
+ next;
+ mesq l("Also, I don't care if you don't like the @@. That's the weapon a true archer should use!", getitemlink(ForestBow));
+ goto L_Close;
+
+L_FakeBow:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("You just bought it? You won't learn anything from that.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("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;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Do as I told you, and talk to Alan for the bow!");
+ next;
+ goto L_Close;
+
+L_Insufficient:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Maybe I should also give you a lesson in how to count? You don't have enough.");
+ next;
+ goto L_Close;
+
+L_NotReady:
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("I am pleased about your progress, but you are not ready for the next step yet. Go and do some more training, before you come back.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Remember also: It is wise to speak with people you meet on your journey, there is always something new to learn.");
+ next;
+ goto L_Close;
+
+L_Arrows:
+ mesc l("Gwendolyn sighs and shake her head.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("Another lecture: Take always enough arrows with you. Go and come back when you are equipped adequately.");
+ next;
+ mesn l("Gwendolyn Bowmaker");
+ mesq l("For this training, I need @@, not the usual arrow you use.", getitemlink(TrainingArrow));
+ next;
+ goto L_Close;
+
+L_Close:
+ @paramX=0;
+ @paramY=0;
+ @returnIndex=0;
+ closedialog;
+ goodbye;
+ close;
+
+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) @returnIndex = 3;
+ if(@paramX>0 && @paramY<0) @returnIndex = 9;
+ if(@paramX<0 && @paramY>0) @returnIndex = 1;
+ if(@paramX<0 && @paramY<0) @returnIndex = 7;
+
+ //straight left
+ if ( (@paramX < 0) && (@paramY >= @paramX/2) && (-@paramY >= @paramX/2) ) @returnIndex = 4;
+
+ //straight right
+ if ( (@paramX > 0) && (@paramY <= @paramX/2) && (-@paramY <= @paramX/2) ) @returnIndex = 6;
+
+ //straight above
+ if ( (@paramY > 0) && (@paramX <= @paramY/2) && (-@paramX <= @paramY/2) ) @returnIndex = 2;
+
+ //straight below
+ if ( (@paramY < 0) && (@paramX >= @paramY/2) && (-@paramX >= @paramY/2) ) @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 ) @returnIndex = 5;
+ return;
+
+OnInit:
+ // schoolfee in gp
+ .SCHOOLFEE = 2500;
+
+ // how many eggs do you need of each kind?
+ .CAVE_EGGS_AMOUNT = 21;
+ .SNAKE_EGGS_AMOUNT = 18;
+ .MOUNTAIN_EGGS_AMOUNT = 9;
+
+ // experience for eggs
+ .QUEST_EGG_EXP = 6500;
+
+ // The needed level for the minigame:
+ .BASELEVEL_GAME = 50;
+
+ // experience gained for hitting the bullseye:
+ .QUEST_HAWK_EXP = 12000;
+
+ .sex = G_FEMALE;
+ .distance = 7;
+ end;
+}
diff --git a/npc/012-1/hinnak.txt b/npc/012-1/hinnak.txt
new file mode 100644
index 000000000..088b0c866
--- /dev/null
+++ b/npc/012-1/hinnak.txt
@@ -0,0 +1,152 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Hurnscald farmer.
+
+012-1,105,30,0 script Hinnak NPC_ORC,{
+ .@q1=getq(HurnscaldQuest_Farmers);
+ .@q2=getq2(HurnscaldQuest_Farmers);
+ mesn;
+ if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Ah, if it isn't @@? You're the talk of the town!", $MOST_HEROIC$);
+ if (strcharinfo(0) == $MOST_HEROIC$) next;
+ if (.@q1 == 0) goto L_Start;
+ if (.@q1 == 1) goto L_Check;
+ if (.@q1 == 4) goto L_Letter;
+ if (.@q1 == 5) goto L_Thanks;
+ mesq l("Maybe you could now help my friend Oscar. His farm is west of here.");
+ close;
+
+L_Start:
+ mesq l("I hate you Pinkies, and I hate the Monster King too, for bringing forth these plagues!!");
+ next;
+ mesn strcharinfo(0);
+ mesc l("The farmer seems mad and in need of help. Will you help him?");
+ if (askyesno() != ASK_YES) {
+ mesq l("Sorry, I have to go.");
+ close;
+ }
+ next;
+ mesn;
+ mesq l("Ah, so you're willing to help? Great! Because I HATE THEM ALL!");
+ next;
+ if (readparam(bAgi) < 20) goto L_Slow;
+ if (BaseLevel < 20) goto L_Weak;
+ mesn;
+ mesq l("They jump left and right and left and right again, and I can't catch them.");
+ next;
+ mesn;
+ mesq l("Please kill some of them, and bring me 10 @@!", getitemlink(PinkAntenna));
+ setq HurnscaldQuest_Farmers, 1, 0;
+ close;
+
+OnKillPinkie:
+ .@q1=getq(HurnscaldQuest_Farmers);
+ .@q2=getq2(HurnscaldQuest_Farmers);
+ if (.@q1 == 1)
+ setq2 HurnscaldQuest_Farmers, .@q2+1;
+ end;
+
+L_Slow:
+ mesn;
+ mesq l("But you're too slow to catch any of them. Sorry.");
+ next;
+ mesc l("Raise agility to do this quest.");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("But you're too weak to beat any of them. Sorry.");
+ close;
+
+L_Check:
+ mesq l("Hey, how is the monster extermination going?");
+ next;
+ mesn;
+ // You in average need to kill 244 Pinkies. You get this bonus for not leaving the fields.
+ if (.@q2 >= 210)
+ mesq l("You killed so many Pinkies, I don't care with the Antennas anymore! They are almost gone!");
+ else if (.@q2 >= 150)
+ mesq l("I see you are doing good. Keep slaying them, hahaah!");
+ else if (.@q2 >= 100)
+ mesq l("Good job, you already killed over 100! Hahah, that sure teach them a lesson!");
+ else if (.@q2 >= 50)
+ mesq l("Yeah, teach them a lesson! Keep going!");
+ else
+ mesq l("Go kill them!!");
+ next;
+ menu
+ rif (.@q2 >= 210 && countitem(PinkAntenna) >= 10, l("No, I insist, keep the Antennas as a trophy.")), L_RealHelp,
+ rif (.@q2 >= 210 && countitem(PinkAntenna) < 10, l("Thanks, they don't like to drop their Antennas.")), L_TrueHelp,
+ rif (.@q2 >= 100 && .@q2 < 210 && countitem(PinkAntenna) >= 10, l("Here are the Antennas.")), L_Help,
+ rif (.@q2 < 100 && countitem(PinkAntenna) >= 10, l("Here are the Antennas.")), L_NoKill,
+ l("I'm not done yet. I'll be back."), -;
+ close;
+
+L_RealHelp:
+ delitem PinkAntenna, 10;
+ getexp 1600, 60;
+ Zeny=Zeny+2500;
+ setq HurnscaldQuest_Farmers, 2, 0;
+ mes "";
+ mesn;
+ mesq l("Waw! You really did it, you're the savior of my farm!! You have my eternal gratitute. Here is 2500 GP for your troubles!");
+ close;
+
+L_TrueHelp:
+ mes "";
+ mesn;
+ mesq l("I know how hard it is! I hate them with all my heart, only seeing you killing them left and right was GREAT!");
+ next;
+ getexp 1000, 0;
+ Zeny=Zeny+500;
+ setq HurnscaldQuest_Farmers, 2, 0;
+ mesn;
+ mesq l("You have my eternal gratitute. Here is 500 GP for your troubles.");
+ close;
+
+L_Help:
+ delitem PinkAntenna, 10;
+ getexp 1000, 0;
+ Zeny=Zeny+1000;
+ setq HurnscaldQuest_Farmers, 2, 0;
+ mes "";
+ mesn;
+ mesq l("Many thanks. You have my eternal gratitute. Here is 1000 GP for your troubles.");
+ close;
+
+L_NoKill:
+ mesn;
+ mesq l("That won't do it. I want to see PINK BLOOD! No... not so cluttered. Just kill the Pinkies on my farm.");
+ next;
+ mesn;
+ mesq l("The antennas by themselves mean nothing, I want to see you killing my ENEMIES, the pinkies!");
+ close;
+
+L_Letter:
+ mesq l("You're the savior of Hurnscald crops. Half from the world would die from famine, weren't for you.");
+ next;
+ mesn;
+ mesq l("@@ and I signed this letter. Deliver it to Airlia on the Town Hall, and she'll reward you correctly.", l("Oscar"));
+ close;
+
+L_Thanks:
+ mesq l("Many thanks for all the help!");
+ next;
+ GHQ_Assign(Pinkie, "Hurnscald", getitemlink(PinkHelmet));
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FarmerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, LeatherShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, TulimsharGuardBoots);
+ setunitdata(.@npcId, UDT_WEAPON, CottonTrousers);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-1/jack.txt b/npc/012-1/jack.txt
new file mode 100644
index 000000000..55eef5d2d
--- /dev/null
+++ b/npc/012-1/jack.txt
@@ -0,0 +1,179 @@
+// TMW-2 Script
+// Originals: TMW Org.
+//
+// Author:
+// Jesusalva
+// Description:
+// Jack is Hurnscald Lumberjack
+
+012-1,69,93,0 script Jack NPC_LUMBERJACK,{
+ .@q1=getq(HurnscaldQuest_ForestBow);
+ //.@q2=getq(HurnscaldQuest_WoodShield);
+
+ mesn "Jack, the Lumberjack";
+ mesq l("Hello there! I'm Jack, the Lumberjack, and enemy of all trees. If you need some firewood, just let me know.");
+ mes "";
+ select
+ l("Nothing at the moment, thanks."),
+ l("I want you to transform my raw log in a wooden log"),
+ rif(.@q1 == 1, l("I need a sturdy wood piece for a Forest Bow."));
+
+ mes "";
+
+ switch (@menu) {
+ case 1:
+ close;
+ break;
+ case 2:
+ goto L_Polish;
+ break;
+ case 3:
+ goto L_ForestBow;
+ break;
+ }
+
+ close;
+
+L_Polish:
+ mesn;
+ mes l("Yes, unless you're doing something VERY special, a Wooden Log is what you need.");
+ mes l("I can make a @@ for just one @@ and 200 GP for my work.", getitemlink(WoodenLog), getitemlink(RawLog));
+ input .@count;
+ mes "";
+
+ if (.@count == 0)
+ close;
+
+ .@Cost = .@count * 200;
+ .@empty = countitem(RawLog);
+
+ if (.@empty < .@count || Zeny < .@Cost) {
+ mesn;
+ mesq l("You can't afford my services for that amount. Sorry.");
+ }
+
+ getinventorylist;
+ inventoryplace WoodenLog, .@count;
+
+ Zeny = Zeny - .@Cost;
+ delitem RawLog, .@count;
+ getitem WoodenLog, .@count;
+ close;
+
+L_ForestBow:
+ .@k=getq2(HurnscaldQuest_ForestBow);
+
+ switch (.@k) {
+ case 0:
+ mesn;
+ mesq l("Ah, don't bother me with that. That wood must be special, it must bend and cannot break. Too difficult to find!");
+ next;
+ mesn;
+ mesq l("I also do not keep any stock of them. If you really want it, you can bring me some Raw Logs. I'll show you which one is the good one. Deal?");
+ next;
+ if (BaseLevel < 25) {
+ mesn;
+ mesq l("Actually, nevermind. I'll wait you grind level 25 first, then we can do this."); // Note: Fisherman part is level 30!
+ close;
+ }
+ mesn strcharinfo(0);
+ mesq l("I'm railroaded here, I cannot say no. I'll bring you some @@. Break them until one of them fit.", getitemlink(RawLog));
+ setq2 HurnscaldQuest_ForestBow, 1;
+ close;
+ break;
+ case 99:
+ mesn;
+ mesq l("Good luck...");
+ break;
+ default:
+ goto L_Loop;
+ }
+ goto L_Close;
+
+L_Loop:
+ .@k=getq2(HurnscaldQuest_ForestBow);
+ mesn;
+ mesq l("Bring me your wood, and I'll show you which one is sturdy, yet flexible enough to make a good Forest Bow.");
+ mes "";
+ select
+ rif(countitem(RawLog) > 0, l("Try this one.")),
+ l("Don't break my stuff.");
+
+ if (@menu == 2)
+ close;
+
+ mesc l("Jack bends the log over his knee.");
+ delitem RawLog, 1;
+ .@success=rand(6,26)-.@k; // You will never need more than 20 logs nor less than 5 logs
+
+ if (.@success <= 1) {
+ mesc l("The wood bends a little, but doesn't breaks.");
+ getexp 295, 100; // 10% of max exp
+ setq2 HurnscaldQuest_ForestBow, 99;
+ next;
+ mesn;
+ mesq lg("That's the right wood, my son. Here, I'll wrap it so you don't accidentaly lose it. Good luck with your quest!");
+ close;
+ } else {
+ mesc l("However, the log breaks with a loud crack.");
+ Zeny=Zeny+10;
+ getexp 5, 1;
+ setq2 HurnscaldQuest_ForestBow, .@k+1;
+ next;
+ mesn;
+ mesq lg("Sorry, son. I know how hard this is. But this is teaching you a valuable lesson, your eye will be more sharp for quality wood from now on.");
+ next;
+ }
+
+ goto L_Loop;
+
+/* Copy-paste from TMW Org.
+ I'll uncomment and rewrite when time comes.
+
+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:
+ mesn "Jack, the Lumberjack";
+ mes "\"Sorry, no.\"";
+ goto L_Close;
+
+L_Made_Shield:
+ mesn "Jack, the Lumberjack";
+ 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;
+
+ mesn "Jack, the Lumberjack";
+ 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:
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+}
diff --git a/npc/012-1/locamit.txt b/npc/012-1/locamit.txt
new file mode 100644
index 000000000..c4acd9d7e
--- /dev/null
+++ b/npc/012-1/locamit.txt
@@ -0,0 +1,72 @@
+// TMW2 scripts.
+// Authors:
+// Saulc
+// Jesusalva
+// Reid
+// Travolta
+// Description:
+// Tamiloc is the barber.
+// Locamit is an anagram.
+
+012-1,60,73,0 script Locamit NPC_ELVEN_FEMALE_ARMOR_SHOP,{
+ function setRace {
+ clear;
+ setnpcdialogtitle l("Debug - Modify Race");
+ mes l("Race") + ": " + $@allraces$[Class];
+ next;
+ mes l("Please select the desired race.");
+ switch (select("Human:Ukar:Redy:Elf:Orc:Raijin:Tritan"))
+ {
+ default:
+ jobchange max(0, @menu-1);
+ }
+ return;
+ }
+
+
+ mesn;
+ mesq l("Hi! Do you want a hair cut?");
+
+ 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?"),
+ rif(is_staff(), l("I am a GM, and I want to change my Race!")),
+ l("I'm fine for now, thank you.");
+
+ switch (@menu) {
+ case 1:
+ BarberSayStyle 3;
+ 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:
+ setRace;
+ break;
+ case 5:
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Feel free to come visit me another time.");
+
+ goodbye;
+ }
+ } while (1);
+ close;
+
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/012-1/luffyx.txt b/npc/012-1/luffyx.txt
new file mode 100644
index 000000000..2e9d03429
--- /dev/null
+++ b/npc/012-1/luffyx.txt
@@ -0,0 +1,87 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Hunt mouboos, Summer Quest
+
+012-1,68,74,0 script Luffyx NPC_RAIJIN,{
+ .@q=getq(SQuest_Summer);
+ mesn;
+ if (season() == SUMMER) {
+ mesq l("Yay it's summer! I love June 21st, and the summer vacations!");
+ if (.@q < 1)
+ goto L_SummerQuest;
+ } else {
+ mesq l("Aww it's not summer. I love June 21st, and the summer vacations!");
+ }
+
+L_Main:
+ if (GHQUEST)
+ GHQ_Assign(ForestMushroom, "Hurnscald", "275.000 GP, 60 "+getitemlink(StrangeCoin));
+ close;
+
+L_SummerQuest:
+ next;
+ mesn;
+ // TODO: Sunglass
+ mesq l("Hey, do you know what is good on summer? @@!", getitemlink(LuffyxSummerShorts));
+ next;
+ mesn;
+ mes l("What about you bring me:");
+ mes l("@@/80 @@", countitem(CactusCocktail), getitemlink(CactusCocktail));
+ mes l("@@/40 @@", countitem(AppleCocktail), getitemlink(AppleCocktail));
+ mes l("@@/25 @@", countitem(CherryCocktail), getitemlink(CherryCocktail));
+ mes l("@@/1 @@", countitem(JeansShorts), getitemlink(JeansShorts));
+ next;
+ select
+ l("Not now, thanks"),
+ l("To be honest, I have that with me!");
+
+ mes "";
+ if (@menu == 1)
+ goto L_Main;
+ if (@menu == 2) {
+ if (
+ countitem(CherryCocktail) < 25 ||
+ countitem(CactusCocktail) < 80 ||
+ countitem(AppleCocktail) < 40
+ ) goto L_Lying;
+
+ inventoryplace LuffyxSummerShorts, 1;
+ delitem CherryCocktail, 25;
+ delitem AppleCocktail, 40;
+ delitem CactusCocktail, 80;
+ delitem JeansShorts, 1;
+ getitem LuffyxSummerShorts, 1;
+ getexp 6500, 120;
+ setq SQuest_Summer, 1;
+ mesn;
+ mesq l("Yay yay! Many thanks! Here, take the reward as promised!");
+ next;
+ mesn;
+ mesq l("We can do this again on next summer!");
+ goto L_Main;
+ }
+
+ close;
+
+L_Lying:
+ mesn;
+ mesq l("Please don't lie to me...");
+ goto L_Main;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, CommunityShirt);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, JeansChaps);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, DeepBlackBoots);
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+
+ .distance=4;
+ .sex=G_MALE;
+ end;
+
+}
+
diff --git a/npc/012-1/mapflags.txt b/npc/012-1/mapflags.txt
new file mode 100644
index 000000000..a0f4719c5
--- /dev/null
+++ b/npc/012-1/mapflags.txt
@@ -0,0 +1,2 @@
+012-1 mapflag town
+012-1 mapflag nopenalty
diff --git a/npc/012-1/richard.txt b/npc/012-1/richard.txt
new file mode 100644
index 000000000..ceff3c56f
--- /dev/null
+++ b/npc/012-1/richard.txt
@@ -0,0 +1,14 @@
+// TMW-2 Script.
+// Author:
+// Saulc
+// Jesusalva
+
+012-1,65,64,0 script Richard NPC_LLOYD,{
+ Banker(.name$, "Hurnscald", 14000);
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/012-1/ship.txt b/npc/012-1/ship.txt
new file mode 100644
index 000000000..7a7b15c32
--- /dev/null
+++ b/npc/012-1/ship.txt
@@ -0,0 +1,23 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// This script controls access to Ships, fixing variables.
+
+012-1,157,65,0 script HurnsShip#M NPC_HIDDEN,0,0,{
+
+OnTouch:
+ LOCATION$="Hurns";
+ goto L_Warp;
+
+L_Warp:
+ /* Is Hurnscald already liberated? Precendence. */
+ if (!$HURNS_LIBDATE) {
+ warp "Save", 0, 0;
+ end;
+ }
+
+ warp "016-1@"+LOCATION$, 21, 26;
+ closedialog;
+ close;
+}
diff --git a/npc/012-1/shoppakep.txt b/npc/012-1/shoppakep.txt
new file mode 100644
index 000000000..884c925de
--- /dev/null
+++ b/npc/012-1/shoppakep.txt
@@ -0,0 +1,67 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Description:
+// Random Hurnscald Shopper with random overpriced stuff and gifts
+
+012-1,58,64,0 script Shoppa Kep NPC_SHOPPAKEP,{
+ mesn;
+ mesq lg("Welcome! Only the finest wares!");
+ next;
+ closedialog;
+ shop .name$;
+ close;
+
+ function ShoppaKepItem {
+ .@i=rand(0,100);
+ if (.@i > 75)
+ return Aquada;
+ else if (.@i < 35)
+ return Manana;
+ else
+ return HalfEggshell;
+ }
+
+OnInit:
+ .CurrentItem=ShoppaKepItem();
+ .ThisRebootAmou=rand(30,70);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+
+
+ tradertype(NST_MARKET);
+ sellitem CottonSkirt, 100000, 1;
+ sellitem MiniSkirt, 100000, 1;
+ sellitem ShortTankTop, 100000, 1;
+ sellitem CottonTrousers, 100000, 1;
+
+ sellitem Piberries, -1, 30;
+ sellitem Plushroom, -1, 3;
+ sellitem Chagashroom, -1, 3;
+
+ sellitem PiouFeathers, -1, .ThisRebootAmou;
+ sellitem .CurrentItem, -1, rand(1,4);
+
+ end;
+
+OnClock1759:
+OnClock0546:
+ restoreshopitem LeatherShirt, 125000, 1;
+ restoreshopitem JeansShorts, 125000, 1;
+ restoreshopitem CottonSkirt, 100000, 1;
+ restoreshopitem MiniSkirt, 100000, 1;
+ restoreshopitem ShortTankTop, 100000, 1;
+ restoreshopitem CottonTrousers, 100000, 1;
+
+ restoreshopitem Piberries, -1, 30;
+ restoreshopitem Plushroom, -1, 3;
+ restoreshopitem Chagashroom, -1, 3;
+
+ restoreshopitem PiouFeathers, -1, .ThisRebootAmou;
+
+ stopselling(.CurrentItem);
+ .CurrentItem=ShoppaKepItem();
+ sellitem .CurrentItem, -1, rand(1,4);
+ end;
+}
diff --git a/npc/012-1/soul-menhir.txt b/npc/012-1/soul-menhir.txt
new file mode 100644
index 000000000..419541f6d
--- /dev/null
+++ b/npc/012-1/soul-menhir.txt
@@ -0,0 +1,20 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// Soul Menhir
+
+012-1,88,69,0 script Soul Menhir#hurns NPC_SOUL_NORMAL,{
+ @map$ = "012-1";
+ setarray @Xs, 86, 87, 86, 87;
+ setarray @Ys, 69, 70, 69, 70;
+ @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/012-1/statue.txt b/npc/012-1/statue.txt
new file mode 100644
index 000000000..3053b31bb
--- /dev/null
+++ b/npc/012-1/statue.txt
@@ -0,0 +1,30 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// These statues are of great honor to whoever have their name written in them!
+
+012-1,84,63,0 script Hero Statue#012-1 NPC_STATUE_ANDREI,{
+
+ mes l("This statue was built for memory of Andrei Sakar, the greatest hero this world has even seen.");
+ mes l("For defending Hurnscald alone and saving all its inhabitants.");
+ mes l("For fighting against the Monster King once and getting out alive to tell the story.");
+ mes l("For all his great deeds, and thousands of lives he saved, this statue is in his honor.");
+ if ($MOST_HEROIC$ == "")
+ goto L_Fame;
+ next;
+ mes l("Also in honor of @@, who did a great act of bravery recently. May they keep protecting our world!", $MOST_HEROIC$);
+
+L_Fame:
+ next;
+ mesq l("All hail the ones who proven their worth before the whole Alliance!");
+
+ HallOfFame();
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 4;
+ end;
+}
+
diff --git a/npc/012-1/terezin.txt b/npc/012-1/terezin.txt
new file mode 100644
index 000000000..82a5d096a
--- /dev/null
+++ b/npc/012-1/terezin.txt
@@ -0,0 +1,61 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Hinnak's Wife, Terezin (renamed to make an Easter Egg)
+// NPC_MONA?
+
+012-1,110,41,0 script Tezzerin NPC_ELVEN_FEMALE_READING,{
+ .@q1=getq(HurnscaldQuest_Farmers);
+ .@q2=getq2(HurnscaldQuest_Farmers);
+ if (strcharinfo(0) == $MOST_HEROIC$) mesn;
+ if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Ah, @@, welcome!", $MOST_HEROIC$);
+ if (strcharinfo(0) == $MOST_HEROIC$) next;
+ if (.@q1 == 5 && .@q2 == 0) goto L_PinkieHat;
+ if (.@q1 == 4) goto L_Almost;
+ if (.@q1 >= 2) goto L_Thanks;
+ mesn;
+ mesq l("Ah, my husband Hinnak is so hard working...");
+ close;
+
+L_Almost:
+ mesn;
+ mesq l("You deserve a reward for helping my husband Hinnak, but please, get Oscar's reward first.");
+ close;
+
+L_Thanks:
+ mesn;
+ mesq l("Thanks for helping my husband. I'll think if there's something I can do for you, why don't you help Oscar on the meanwhile...?");
+ close;
+
+L_PinkieHat:
+ mesn;
+ mesq l("You deserve a reward for helping my husband. I can make you a nice gift.");
+ next;
+ mesn;
+ mesq l("Please bring me a single @@ and @@ GP, and I'll give you a memeto.", getitemlink(PinkAntenna), 6500);
+ if (countitem(PinkAntenna) < 1 || Zeny < 6500)
+ close;
+ next;
+ mesn strcharinfo(0);
+ mesc l("Give the Antenna and the GP to her?");
+ if (askyesno() != ASK_YES) {
+ mesq l("I'll seek one for you.");
+ close;
+ }
+ delitem PinkAntenna, 1;
+ if (Zeny < 6500)
+ close;
+ Zeny=Zeny-6500;
+ getitem PinkieHat, 1;
+ mesn;
+ mesq l("Here, I did this @@ for you! I'm pretty sure this is also a drop, but that's literally everything I could do for helping my husband.", getitemlink(PinkieHat));
+ setq2 HurnscaldQuest_Farmers, 1;
+ close;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-1/wateranimation.txt b/npc/012-1/wateranimation.txt
new file mode 100644
index 000000000..0943d5942
--- /dev/null
+++ b/npc/012-1/wateranimation.txt
@@ -0,0 +1,28 @@
+// TMW2 scripts.
+// Author:
+// gumi
+// Reid
+// Saulc
+// Jesusalva
+// Description:
+// Water animations, splash, fishes, etc...
+
+012-1,119,54,0 script #Hurn_WAM0 NPC_WATER_SPLASH,{
+
+ fishing; // begin or continue fishing
+ setarray .@rare_fish,
+ GrassCarp,
+ BottleOfWoodlandWater;
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 4;
+ end;
+}
+
+012-1,137,58,0 duplicate(#Hurn_WAM0) #Hurn_WAM1 NPC_WATER_SPLASH
+012-1,137,88,0 duplicate(#Hurn_WAM0) #Hurn_WAM2 NPC_WATER_SPLASH
+012-1,59,12,0 duplicate(#Hurn_WAM0) #Hurn_WAM3 NPC_WATER_SPLASH
+012-1,138,31,0 duplicate(#Hurn_WAM0) #Hurn_WAM4 NPC_WATER_SPLASH
+
diff --git a/npc/012-2/GonzoDark.txt b/npc/012-2/GonzoDark.txt
new file mode 100644
index 000000000..509ca5fcd
--- /dev/null
+++ b/npc/012-2/GonzoDark.txt
@@ -0,0 +1,60 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Monthly Sponsor Quest
+// Variable:
+// SQuest_Sponsor
+// Quest ID: 2
+
+012-2,50,81,0 script GonzoDark Sponsor NPC_LUCAS,{
+ function resetSQS {
+ setq SQuest_Sponsor, 0, gettime(GETTIME_MONTH);
+ }
+ // Check monthly quest
+ .@d=getq2(SQuest_Sponsor);
+ if (.@d != gettime(GETTIME_MONTH)) resetSQS();
+
+ // Core
+ .@q=getq(SQuest_Sponsor);
+ mesn;
+ mesq l("Ahh, I hate @@.", getmonsterlink(BlackScorpion));
+ if (!(.@q & .questID)) goto L_Menu;
+ close;
+
+L_Menu:
+ mesq l("I will reward you for 7 @@.", getitemlink(.itemID));
+ mes "";
+ menu
+ rif(countitem(.itemID) >= 7, l("Here they are!")), L_Finish,
+ l("Where can I find them?"),L_Where,
+ l("No, thanks."),L_Close;
+
+L_Finish:
+ delitem .itemID, 7;
+ Zeny=Zeny+700; // 100 GP each
+ getitem StrangeCoin, rand(1,4);
+ .@q=getq(SQuest_Sponsor);
+ setq1 SQuest_Sponsor, .@q | .questID;
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
+ close;
+
+L_Where:
+ mes "";
+ mesq l("Ah, there are lots on dark mines.");
+ next;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ .questID=2;
+ .itemID=BlackScorpionStinger;
+ end;
+}
diff --git a/npc/012-2/Saulc.txt b/npc/012-2/Saulc.txt
new file mode 100644
index 000000000..3163eba62
--- /dev/null
+++ b/npc/012-2/Saulc.txt
@@ -0,0 +1,60 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Monthly Sponsor Quest
+// Variable:
+// SQuest_Sponsor
+// Quest ID: 1
+
+012-2,46,81,0 script Saulc Sponsor NPC_HUMAN_MALE_CHIEF,{
+ function resetSQS {
+ setq SQuest_Sponsor, 0, gettime(GETTIME_MONTH);
+ }
+ // Check monthly quest
+ .@d=getq2(SQuest_Sponsor);
+ if (.@d != gettime(GETTIME_MONTH)) resetSQS();
+
+ // Core
+ .@q=getq(SQuest_Sponsor);
+ mesn;
+ mesq l("Ahh, I hate @@.", getmonsterlink(Pinkie));
+ if (!(.@q & .questID)) goto L_Menu;
+ close;
+
+L_Menu:
+ mesq l("I will reward you for 7 @@.", getitemlink(.itemID));
+ mes "";
+ menu
+ rif(countitem(.itemID) >= 7, l("Here they are!")), L_Finish,
+ l("Where can I find them?"),L_Where,
+ l("No, thanks."),L_Close;
+
+L_Finish:
+ delitem .itemID, 7;
+ Zeny=Zeny+84; // 12 GP each
+ getitem StrangeCoin, rand(1,4);
+ .@q=getq(SQuest_Sponsor);
+ setq1 SQuest_Sponsor, .@q | .questID;
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(RedScorpionStinger));
+ close;
+
+L_Where:
+ mes "";
+ mesq l("Ah, there are lots on the fields.");
+ next;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ .questID=1;
+ .itemID=PinkAntenna;
+ end;
+}
diff --git a/npc/012-2/_import.txt b/npc/012-2/_import.txt
new file mode 100644
index 000000000..c8887f3cc
--- /dev/null
+++ b/npc/012-2/_import.txt
@@ -0,0 +1,9 @@
+// Map 012-2: Hurnscald Inn
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-2/GonzoDark.txt",
+"npc/012-2/Saulc.txt",
+"npc/012-2/_warps.txt",
+"npc/012-2/door.txt",
+"npc/012-2/helena.txt",
+"npc/012-2/melina.txt",
+"npc/012-2/note.txt",
diff --git a/npc/012-2/_warps.txt b/npc/012-2/_warps.txt
new file mode 100644
index 000000000..44ed24f4a
--- /dev/null
+++ b/npc/012-2/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-2: Hurnscald Inn warps
+012-2,36,47,0 warp #012-2_36_47 0,0,012-1,65,56
+012-2,59,83,0 warp #012-2_59_83 0,0,012-2,59,39
diff --git a/npc/012-2/door.txt b/npc/012-2/door.txt
new file mode 100644
index 000000000..67fb25599
--- /dev/null
+++ b/npc/012-2/door.txt
@@ -0,0 +1,52 @@
+// TMW-2 Script.
+// Author:
+// Jesusalva
+// Notes:
+// Sponsor Area Only
+
+012-2,59,38,0 script Sponsors Inn NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ if (!getgmlevel())
+ goto L_Unauthorized;
+ if (SP_WARN)
+ SP_WARN=0;
+ slide 59, 82;
+ end;
+
+L_Unauthorized:
+ if (@sp_notrespass > 0)
+ goto L_Warning;
+ dispbottom col(l("Only Sponsors are allowed past this area."),1);
+ slide 59,39;
+ @sp_notrespass=1;
+ end;
+
+L_Warning:
+ if (@sp_kick > 0)
+ goto L_Kick;
+ dispbottom col(l("Only Sponsors are allowed past this area."),1);
+ dispbottom col(l("Do not attempt to go there again."),1);
+ slide 60,40;
+ @sp_kick=1;
+ end;
+
+L_Kick:
+ if (SP_WARN > 5)
+ goto L_Ban;
+ dispbottom col(l("You cannot visit the Sponsor's Inn!"),1);
+ slide 36,46;
+ // Force user to disconnect
+ atcommand "@kick "+strcharinfo(0);
+ SP_WARN=SP_WARN+1;
+ end;
+
+L_Ban:
+ dispbottom col(l("You cannot visit the Sponsor's Inn!"),1);
+ slide 36,46;
+ // Prevent abuse and possible vulnerabilities.
+ atcommand "@ban 20mn "+strcharinfo(0);
+ SP_WARN=0;
+ end;
+}
diff --git a/npc/012-2/helena.txt b/npc/012-2/helena.txt
new file mode 100644
index 000000000..ffde25870
--- /dev/null
+++ b/npc/012-2/helena.txt
@@ -0,0 +1,283 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Description:
+// Lena
+// Variables:
+// $HELENA_ST
+// Tracks how many set of Treasure Keys were given by all players thus far.
+// Affects beer prices on Hurnscald.
+// HurnscaldQuest_Bandits
+// q1 -> Current status
+// q2 -> Treasure Key Timer
+// q3 -> Bandit Hood Timer
+
+012-2,47,40,0 script Helena NPC_FEMALE,{
+ .@q=getq(HurnscaldQuest_Bandits);
+
+ // Stage 1: Level 30, collect Treasure Key
+ if (BaseLevel < 30) goto L_TooWeak;
+ if (.@q == 0) goto L_Start;
+ if (.@q == 1) goto L_Return;
+
+ // Stage 2: Level 40, collect Bandit Hood
+ if (BaseLevel < 40) goto L_Weak;
+ if (.@q == 2) goto L_Quest;
+ if (.@q == 3) goto L_Hood;
+
+ // Stage 3: Level 45, defeat Bandit Lord
+ if (BaseLevel < 45) goto L_Busy;
+ if (.@q == 4) goto L_BanditLord;
+ if (.@q == 5) goto L_Busy;
+ if (.@q == 6) goto L_Busy;
+ if (.@q == 7) goto L_Finish;
+
+ goto L_Daily;
+
+L_Daily:
+ .@k=getq2(HurnscaldQuest_Bandits);
+ .@h=getq3(HurnscaldQuest_Bandits);
+ mesn;
+ mesq l("Ah, @@, my friend! Are you here to help us with 5 @@? Or perhaps you have 5 more @@ to show that Hurnscald is getting safer?", strcharinfo(0), getitemlink(TreasureKey), getitemlink(BanditHood));
+ mes "";
+ select
+ rif((.@k < santime()) && countitem(TreasureKey) >= 5, l("I have 5 Treasure keys with me.")),
+ rif((.@h < santime()) && countitem(BanditHood) >= 5, l("I have 5 Bandit Hoods with me.")),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ setq2 HurnscaldQuest_Bandits, santime()+(60*60*24);
+ delitem TreasureKey, 5;
+ Zeny=Zeny+600; // 600/550 = 9.09% bonus
+ //Zeny=Zeny+800; // 800/550 = 45.45% bonus
+ getexp 100, 0;
+ $HELENA_ST=$HELENA_ST+1;
+ mesn;
+ mesq l("Many thanks! %%s");
+ next;
+ goto L_Daily;
+ case 2:
+ setq3 HurnscaldQuest_Bandits, santime()+(60*60*24);
+ delitem BanditHood, 5;
+ Zeny=Zeny+250; // 250/155 = 61.29% bonus
+ getexp 300, 5;
+ mesn;
+ mesq l("Many thanks! %%s");
+ next;
+ goto L_Daily;
+ }
+ close;
+
+L_TooWeak:
+ mesn;
+ mesq lg("Hello, madam!", "Hello, sir!");
+ next;
+ mesn;
+ mesq l("Ah, we have serious problems of robbery. I need someone really strong to help me, and you don't qualify.");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("You still need to grow a few levels more before being able to help me out again.");
+ close;
+
+L_Busy:
+ mesn;
+ mesq l("Ah, @@! I'm busy now, can we talk again later?", strcharinfo(0));
+ close;
+
+L_DoIt:
+ mesn;
+ mesq l("@@, we are counting on you! We, the whole Hurnscald town!", strcharinfo(0));
+ close;
+
+///////////////////////// Stage 1
+L_Start:
+ mesn;
+ mesq l("Ah, hello.");
+ next;
+ mesn;
+ mesq l("We actually have a problem. Bandits ransacked this tavern, 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;
+ // 5 ÷ 4.5% = 112 Copper Slimes. You can kill Yellow Slimes too
+ mesn;
+ mesq l("If you bring us 5 @@, we'll be forever grateful.", 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.");
+ close;
+
+L_Return:
+ mesn;
+ mesq lg("Adventurer, did you brought me what I asked? I see you have @@/5 @@.","Adventurer, did you brought me what I asked? I see you have @@/5 @@.", countitem(TreasureKey), getitemlink(TreasureKey));
+ mes "";
+ select
+ rif(countitem(TreasureKey) >= 5, l("Yes, take it.")),
+ rif(countitem(TreasureKey) < 5, l("No, I'll be back with them.")),
+ l("Hm, can we talk again later?");
+ mes "";
+ if (@menu != 1)
+ close;
+ delitem TreasureKey, 5;
+ Zeny=Zeny+1000;
+ getexp 6842,0; // 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 1000 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");
+ close;
+
+
+///////////////////////// Stage 2
+L_Quest:
+ mesn;
+ mesq l("Ah, @@, 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("I did a travel to their cave, I wondered why their faces are never seen. Reason is that they're monsters.");
+ next;
+ mesn;
+ mesq l("Well, perhaps a few of them are rebels, I mean, people like us, but many of them are monsters.");
+ next;
+ mesn;
+ mesq l("Unfortunately, I was cursed to never enter their cave again. They used a @@ to do that!", getitemlink(BlueManaPearl));
+ next;
+ if (countitem(BlueManaPearl) >= 1) {
+ mesn;
+ mesq l("Ah... You have one too. Be careful with it, please. Many people lost their lives because they didn't handled that correctly.");
+ next;
+ }
+ mesn;
+ mesq l("Thankfully that item is too rare. I want somebody to slay the bandit leader, but if you want to do it, you must prove yourself.");
+ 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;
+ // 8% drop. 10 / 8% = avg. 125 bandits to kill
+ // And for once, I won't require these bandits to be from Hurnscald Bandit Cave.
+ mesn;
+ mesq l("Bring me 10 @@. I'll pay you some money for that, of course.", getitemlink(BanditHood));
+ close;
+
+L_Hood:
+ mesn;
+ mesq lg("Adventurer, did you brought me what I asked? I see you have @@/10 @@.","Adventurer, did you brought me what I asked? I see you have @@/10 @@.", countitem(BanditHood), getitemlink(BanditHood));
+ mes "";
+ select
+ rif(countitem(BanditHood) >= 10, l("Yes, take it.")),
+ rif(countitem(BanditHood) < 10, l("No, I'll be back with them.")),
+ l("Hm, can we talk again later?");
+ mes "";
+ if (@menu != 1)
+ close;
+ inventoryplace LeatherPatch, 1;
+ delitem BanditHood, 10;
+ Zeny=Zeny+2000;
+ getexp 1599,0; // 20% from needed exp
+ getitem LeatherPatch, 1;
+ setq HurnscaldQuest_Bandits, 4;
+ mesn;
+ mesq l("Hey hey... Good job! I was worried you would ruin their hoods before being able to take them.");
+ next;
+ mesn;
+ mesq l("Here is 2000 GP for your efforts. Thanks for making Hurnscald a better place to live.");
+ next;
+ mesc l("You also gained a @@. Bows are very slow, so you should talk to the Blacksmith to make a Quiver.", getitemlink(LeatherPatch));
+ close;
+
+
+///////////////////////// Stage 3
+L_BanditLord:
+ mesn;
+ mesq l("So... I won't say you can't do it, @@. I will just say killing the Bandit Lord is no easy task.", strcharinfo(0));
+ next;
+ mesn;
+ mesq l("The @@ 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 is a long shot, so don't hesit in running away.");
+ close;
+
+L_Finish:
+ 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;
+ getexp 5842,93; // 10% from needed exp + JExp level 6
+ setq HurnscaldQuest_Bandits, 8;
+ mesn;
+ mesq l("Here is the @@, 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!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FairyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ForestArmor);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonSkirt);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 17);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/012-2/melina.txt b/npc/012-2/melina.txt
new file mode 100644
index 000000000..5d5ba9137
--- /dev/null
+++ b/npc/012-2/melina.txt
@@ -0,0 +1,60 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Sells beer
+// Variables:
+// $HELENA_ST
+// Controls stock and beer prices
+
+012-2,54,43,0 script Melina NPC_FEMALE,{
+
+hello;
+shop .name$;
+close;
+
+OnTimer1000:
+ domovestep;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, CottonGloves);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, CottonShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, AssassinBoots);
+ setunitdata(.@npcId, UDT_WEAPON, MiniSkirt);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 20);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ tradertype(NST_MARKET);
+ if ($HELENA_ST < 700)
+ sellitem Beer, 500-($HELENA_ST/2), ($HELENA_ST/3)+1;
+ else
+ sellitem Beer, 150, ($HELENA_ST/3)+1;
+
+ initpath "move", 54, 43,
+ "dir", DOWN, 0,
+ "wait", 27, 0,
+ "move", 43, 43,
+ "dir", DOWN, 0,
+ "wait", 27, 0,
+ "move", 48, 45,
+ "dir", DOWN, 0,
+ "wait", 27, 0,
+ "move", 58, 42,
+ "dir", DOWN, 0,
+ "wait", 27, 0,
+ "move", 35, 43,
+ "dir", DOWN, 0,
+ "wait", 20, 0;
+ initialmove;
+ initnpctimer;
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+
+OnClock2358:
+ restoreshopitem Beer, 500-($HELENA_ST/2), ($HELENA_ST/3)+1;
+ end;
+
+}
diff --git a/npc/012-2/note.txt b/npc/012-2/note.txt
new file mode 100644
index 000000000..471792c9e
--- /dev/null
+++ b/npc/012-2/note.txt
@@ -0,0 +1,26 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Description:
+// Lena
+// Variables:
+// $HELENA_ST
+// Tracks how many set of Treasure Keys were given by all players thus far.
+// Affects beer prices on Hurnscald.
+// HurnscaldQuest_Bandits
+// q1 -> Current status
+// q2 -> Treasure Key Timer
+// q3 -> Bandit Hood Timer
+
+012-2,40,41,0 script Note#012-2 NPC_NO_SPRITE,{
+ HallOfSponsor();
+ if (!is_staff())
+ close;
+ HallOfGMLog();
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
diff --git a/npc/012-3/_import.txt b/npc/012-3/_import.txt
new file mode 100644
index 000000000..1f94b49b5
--- /dev/null
+++ b/npc/012-3/_import.txt
@@ -0,0 +1,4 @@
+// Map 012-3: Archery Shop
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-3/_warps.txt",
+"npc/012-3/alan.txt",
diff --git a/npc/012-3/_warps.txt b/npc/012-3/_warps.txt
new file mode 100644
index 000000000..0b817222d
--- /dev/null
+++ b/npc/012-3/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-3: Archery Shop warps
+012-3,41,46,0 warp #012-3_41_46 0,0,012-1,89,59
diff --git a/npc/012-3/alan.txt b/npc/012-3/alan.txt
new file mode 100644
index 000000000..282f12e74
--- /dev/null
+++ b/npc/012-3/alan.txt
@@ -0,0 +1,111 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Alan is Hurnscald's bowmaster. He may craft the Forest Bow, and sell ammo.
+
+012-3,44,40,0 script Alan NPC_BOWMASTER,{
+ .@q=getq(HurnscaldQuest_ForestBow);
+ .@q2=getq2(HurnscaldQuest_ForestBow);
+ .@q3=getq3(HurnscaldQuest_ForestBow);
+ switch (.@q) {
+ case 1:
+ npctalk3 l("Ah, if Jack and that fisherman from Halinarzo still gave me materials...");
+ break;
+ case 2:
+ npctalk3 l("The bow I gave you was a masterpiece.");
+ break;
+ }
+
+ mesn;
+ mesq l("Only the finest bows and arrows, in the land where wood is abundant!");
+ mes "";
+ menu
+ l("Ok, thanks."), L_Close,
+ l("I want to trade."), L_Shop,
+ rif(.@q == 0, l("Do you accept special requests? Could you make me a really good bow?")), L_ForestBow,
+ rif(.@q == 1 && .@q2 == .@q3 && .@q2 == 99, l("I have the sturdy wood and the string.")), L_Craft;
+
+L_Shop:
+ openshop;
+ closedialog;
+ close;
+
+L_ForestBow:
+ mesn;
+ mesq l("Well, I know how to do a @@, a sturdy bow, but I am not making those anymore, sorry.", getitemlink(ForestBow));
+ next;
+ menu
+ l("Oh, too bad."), L_Close,
+ l("What? Why not?"), L_Next;
+
+L_Next:
+ mesn;
+ mesq l("You see, I cannot use any raw material. It must be sturdier than the usual, and I don't have the materials for it.");
+ next;
+ mesn;
+ mesq l("The wood, Jack the Lumberjack used to deliver me, but he isn't delivering anymore. And the string was imported from Halinarzo.");
+ next;
+ mesn;
+ mesq l("Perhaps, you could convince Jack to give me the wood, and seek for a fisherman on Halinarzo to give you the string? I won't charge anything.");
+ next;
+ menu
+ l("Not really, sorry."), L_Close,
+ l("Right'o, I'll arrange the material!"), L_Start;
+
+L_Start:
+ // q2 → Wood Part
+ // q3 → String Part
+ setq HurnscaldQuest_ForestBow, 1, 0, 0;
+ goto L_Close;
+
+L_Craft:
+ inventoryplace ForestBow, 1;
+ getitem ForestBow, 1;
+ getexp 900, 0;
+ setq HurnscaldQuest_ForestBow, 2, 0, 0;
+ mesn;
+ mesq l("Here you go - have fun with it.");
+ next;
+ goto L_Close;
+
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ tradertype(NST_MARKET);
+
+ sellitem ShortBow, 9000, 1;
+ sellitem WoodenBow, 4000, 2;
+
+ sellitem TrainingArrow, -1, 2000;
+ sellitem Arrow, -1, 1000;
+ sellitem IronArrow, -1, 500;
+
+ if ($ARKIM_ST > 1400)
+ sellitem CursedArrow, -1, $ARKIM_ST-1400;
+ if ($ARKIM_ST > 2800)
+ sellitem PoisonArrow, -1, $ARKIM_ST-2800;
+ end;
+
+
+OnClock2357:
+OnClock1151:
+ restoreshopitem ShortBow, 9000, 1;
+ restoreshopitem WoodenBow, 4000, 2;
+OnClock0611:
+OnClock1800:
+ restoreshopitem TrainingArrow, -1, 2000;
+ restoreshopitem Arrow, -1, 1000;
+ restoreshopitem IronArrow, -1, 500;
+ if ($ARKIM_ST > 1400)
+ restoreshopitem CursedArrow, -1, $ARKIM_ST-1400;
+ if ($ARKIM_ST > 2800)
+ restoreshopitem PoisonArrow, -1, $ARKIM_ST-2800;
+
+}
diff --git a/npc/012-4/_import.txt b/npc/012-4/_import.txt
new file mode 100644
index 000000000..f226d86ca
--- /dev/null
+++ b/npc/012-4/_import.txt
@@ -0,0 +1,4 @@
+// Map 012-4: Alchemy Shop
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-4/_warps.txt",
+"npc/012-4/wyara.txt",
diff --git a/npc/012-4/_warps.txt b/npc/012-4/_warps.txt
new file mode 100644
index 000000000..fb88327c2
--- /dev/null
+++ b/npc/012-4/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-4: Alchemy Shop warps
+012-4,35,31,0 warp #012-4_35_31 0,0,012-1,101,56
diff --git a/npc/009-1/kevin.txt b/npc/012-4/wyara.txt
index 8499e4139..a287a5128 100644
--- a/npc/009-1/kevin.txt
+++ b/npc/012-4/wyara.txt
@@ -1,25 +1,36 @@
// TMW2 Script
// Author:
// Saulc
+// Vasily_Makarov (original from Evol)
+// Jesusalva
+// Description:
+// Still Unused NPC
+// Notes:
+// Reset must be turned in function
-009-1,79,62,0 script Kevin NPC_PLAYER,{
+012-4,29,28,0 script Wyara NPC_FEMALE,{
speech S_LAST_NEXT,
- l("I am Kevin, an alchemist specialized in reset potions.");
+ l("I am @@, an alchemist specialized in reset potions.", .name$);
L_Menu:
- .@plush_count = BaseLevel*210-(9*210);
+ .@plush_count = BaseLevel*210-(10*210);
// Lv 10: 210 GP
+ if (BaseLevel > 10)
+ .@plush_count = .@plush_count/(BaseLevel/10);
select
l("Can you reset my stats please?"),
+ rif($ARKIM_ST >= 1200,l("I want Piberries Infusion!")),
lg("You are weird, I have to go sorry.");
- switch (@menu)
- {
+ mes "";
+ switch (@menu) {
case 1:
goto L_ResetStats;
case 2:
+ goto L_Piberries;
+ case 3:
goto L_Quit;
}
@@ -42,8 +53,7 @@ L_ConfirmReset:
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)
- {
+ if (@menu > 1) {
goto L_Quit;
}
@@ -56,15 +66,12 @@ L_ConfirmReset:
.@wasSP = StatusPoint;
resetstatus;
- if (StatusPoint == .@wasSP)
- {
+ if (StatusPoint == .@wasSP) {
speech S_LAST_NEXT,
l("It seems that you have no status points to reset!"),
l("But the money you brought was really awesome you know."),
l("Come back when you will really need me.");
- }
- else
- {
+ } 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."),
@@ -79,9 +86,28 @@ L_ConfirmReset:
}
-L_Quit:
+L_Piberries:
+ mesn;
+ mesq l("For (another) one @@, I'll need 3~4 @@ and 50 GP.", getitemlink(PiberriesInfusion), getitemlink(Piberries));
+ next;
+ select
+ rif(Zeny >= 50 && countitem(Piberries) >= 4, l("Do it!")),
+ l("Not now, sorry.");
+ if (@menu == 2)
+ goto L_Quit;
+
+ mes "";
+ inventoryplace PiberriesInfusion, 1;
+ Zeny=Zeny-50;
+ delitem Piberries, rand(3,4);
+ getitem PiberriesInfusion, 1;
+ getexp 10, 0;
+ goto L_Piberries;
+
+L_Quit:
goodbye;
+ close;
OnInit:
.@npcId = getnpcid(0, .name$);
@@ -89,10 +115,10 @@ OnInit:
setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
- setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
- setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 8);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
- .sex = G_MALE;
- .distance = 3;
+ .sex = G_FEMALE;
+ .distance = 4;
end;
}
diff --git a/npc/012-5/_import.txt b/npc/012-5/_import.txt
new file mode 100644
index 000000000..a6b89d2c1
--- /dev/null
+++ b/npc/012-5/_import.txt
@@ -0,0 +1,4 @@
+// Map 012-5: Indoors
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-5/_warps.txt",
+"npc/012-5/nicholas.txt",
diff --git a/npc/012-5/_warps.txt b/npc/012-5/_warps.txt
new file mode 100644
index 000000000..2816bf32d
--- /dev/null
+++ b/npc/012-5/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-5: Indoors warps
+012-5,34,37,0 warp #012-5_34_37 0,0,012-1,121,72
+012-5,23,27,0 warp #012-5_23_27 0,0,012-1,116,67
diff --git a/npc/012-5/nicholas.txt b/npc/012-5/nicholas.txt
new file mode 100644
index 000000000..589611c77
--- /dev/null
+++ b/npc/012-5/nicholas.txt
@@ -0,0 +1,212 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Nicholas is Hurnscald's blakcsmith. He forges some stuff, and sell other stuff.
+// Perhaps he should not forge armor? Remember he cannot forge EVERYTHING...
+//
+// PS.
+// Iridium + Platyna Platinum
+// Gold + Coal Gold
+// Silver + Coal Silver
+// Copper + Tin Bronze (9:1)
+// Terranite + Coal Terranite
+// Iron + Coal Iron
+
+// Resitance and Weight increasing ores
+// Lead → +++ res, ++++ wei
+// Titanium → + res, + wei
+
+// Originals: Setzer, Steel Shield, Chain Mail, Light Platemail, Warlord Plate, Warlord Boots
+
+012-5,36,26,0 script Nicholas NPC_NICHOLAS,{
+ goto L_Menu;
+
+ // blacksmith_header()
+ function blacksmith_header {
+ mesn;
+ mesq l("Very well! We have seven class of items: Wood, Iron, Terranite, Bronze, Silver, Gold and Platinum.");
+ mesq l("Each of them require different items, I'll sort from weakest to strongest, so choose wisely.");
+ return;
+ }
+
+ // blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
+ function blacksmith_create {
+ .@base1=getarg(0);
+ .@amon1=getarg(1);
+ .@base2=getarg(2);
+ .@amon2=getarg(3);
+ .@prize=getarg(4);
+ .@price=getarg(5);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ mesc l("@@/@@ GP", format_number(Zeny), format_number(.@price));
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ countitem(.@base2) >= .@amon2 &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 1;
+ delitem .@base1, .@amon1;
+ delitem .@base2, .@amon2;
+ Zeny = Zeny - .@price;
+ getitem .@prize, 1;
+ .@xp=getiteminfo(.@base1, ITEMINFO_SELLPRICE)*.@amon1+getiteminfo(.@base2, ITEMINFO_SELLPRICE)*.@amon2;
+ .@xp=.@xp*2/3;
+ getexp .@xp, rand(1,10);
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+
+L_Menu:
+ mesn;
+ mesq l("Hello there, I am @@, blacksmith of this fine city. What do you want to forge today?", .name$);
+ mes "";
+ select
+ l("I just want to trade."),
+ l("I want to forge Weapons!"),
+ l("I want to forge Shields!"),
+ l("I want to forge Quivers!"),
+ l("Nothing, thanks!");
+
+ mes "";
+ switch (@menu) {
+ case 1:
+ openshop;
+ closedialog;
+ close;
+ break;
+ case 2:
+ goto L_Weapon;
+ case 3:
+ goto L_Shield;
+ case 4:
+ goto L_Quiver;
+
+ }
+ close;
+
+
+
+
+
+
+
+
+
+
+L_Weapon:
+ blacksmith_header();
+ select
+ l("Nothing, sorry!"),
+ l("Wooden Sword"),
+ l("Bronze Gladius"),
+ l("Iron Bug Slayer"),
+ l("Iron Short Gladius");
+
+ switch (@menu) {
+ case 1:
+ goto L_Menu;
+ case 2:
+ blacksmith_create(WoodenLog, 45, RawLog, 5, WoodenSword, 4500);
+ break;
+ case 3:
+ blacksmith_create(CopperIngot, 18, TinIngot, 2, BronzeGladius, 5000);
+ break;
+ case 4:
+ blacksmith_create(IronIngot, 8, Coal, 12, BugSlayer, 10000);
+ break;
+ case 5:
+ blacksmith_create(IronIngot, 14, Coal, 18, ShortGladius, 15000);
+ break;
+ }
+ goto L_Weapon;
+
+
+
+
+
+
+L_Shield:
+ blacksmith_header();
+ select
+ l("Nothing, sorry!"),
+ l("Wooden Shield");
+
+ switch (@menu) {
+ case 1:
+ goto L_Menu;
+ case 2:
+ blacksmith_create(WoodenLog, 40, LeatherPatch, 2, WoodenShield, 5000);
+ break;
+ }
+ goto L_Shield;
+
+
+
+
+
+
+L_Quiver:
+ blacksmith_header();
+ select
+ l("Nothing, sorry!"),
+ l("Leather Quiver"),
+ l("Terranite Quiver"),
+ l("Platinum Quiver");
+
+ switch (@menu) {
+ case 1:
+ goto L_Menu;
+ case 2:
+ blacksmith_create(LeatherPatch, 35, TitaniumIngot, 1, LeatherQuiver, 20000);
+ break;
+ case 3:
+ blacksmith_create(TerraniteOre, 210, Coal, 80, TerraniteQuiver, 30000); // TODO: Terranite Ingot
+ break;
+ case 4:
+ blacksmith_create(PlatinumIngot, 30, IridiumIngot, 10, PlatinumQuiver, 40000);
+ break;
+ }
+ goto L_Quiver;
+
+
+
+
+
+
+
+
+OnInit:
+ tradertype(NST_MARKET);
+ sellitem Dagger, 4000, 5;
+ sellitem SharpKnife, 2000, 10;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+OnClock0009:
+OnClock0603:
+OnClock1207:
+OnClock1801:
+ restoreshopitem Dagger, 4000, 5;
+ restoreshopitem SharpKnife, 2000, 10;
+ end;
+}
diff --git a/npc/012-6/_import.txt b/npc/012-6/_import.txt
new file mode 100644
index 000000000..c690c7709
--- /dev/null
+++ b/npc/012-6/_import.txt
@@ -0,0 +1,4 @@
+// Map 012-6: Hurnscald Hospital
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-6/_warps.txt",
+"npc/012-6/nurse.txt",
diff --git a/npc/012-6/_warps.txt b/npc/012-6/_warps.txt
new file mode 100644
index 000000000..6ee0897c2
--- /dev/null
+++ b/npc/012-6/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-6: Hurnscald Hospital warps
+012-6,58,69,0 warp #012-6_58_69 0,0,012-1,110,57
+012-6,64,64,0 warp #012-6_64_64 1,0,012-6,28,32
+012-6,28,33,0 warp #012-6_28_33 1,0,012-6,64,65
diff --git a/npc/012-6/nurse.txt b/npc/012-6/nurse.txt
new file mode 100644
index 000000000..607ae2dbf
--- /dev/null
+++ b/npc/012-6/nurse.txt
@@ -0,0 +1,23 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Crazyfefe
+
+012-6,56,67,6 script Hurnscald's Nurse NPC_FEMALE,{
+ Nurse(.name$, 10, 6);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, BrimmedFeatherHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, MiniSkirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, ShortTankTop);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 16);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+
+}
+
diff --git a/npc/012-7/_import.txt b/npc/012-7/_import.txt
new file mode 100644
index 000000000..e02dd58c7
--- /dev/null
+++ b/npc/012-7/_import.txt
@@ -0,0 +1,5 @@
+// Map 012-7: Town Hall
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/012-7/_warps.txt",
+"npc/012-7/airlia.txt",
+"npc/012-7/celestia.txt",
diff --git a/npc/012-7/_warps.txt b/npc/012-7/_warps.txt
new file mode 100644
index 000000000..7cc2e52e1
--- /dev/null
+++ b/npc/012-7/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 012-7: Town Hall warps
+012-7,35,65,0 warp #012-7_35_65 0,0,012-1,102,70
diff --git a/npc/012-7/airlia.txt b/npc/012-7/airlia.txt
new file mode 100644
index 000000000..7b018a042
--- /dev/null
+++ b/npc/012-7/airlia.txt
@@ -0,0 +1,44 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Former Town's Mayor Daughter.
+// The old Town Mayor was now forced to take care of graveyard or whatever,
+// Just reshape Airlia as you wish.
+
+012-7,52,58,0 script Airlia NPC_ELF_F,{
+ .@q1=getq(HurnscaldQuest_Farmers);
+ if (strcharinfo(0) == $MOST_HEROIC$) npctalk3 l("Ah, if it isn't @@? You're the talk of the town!", $MOST_HEROIC$);
+ if (.@q1 == 4) goto L_Letter;
+ mesn;
+ mesq l("Oh, a visitor. Welcome to the city hall. Please, enjoy your stay.");
+ close;
+
+L_Letter:
+ mesn;
+ mesq l("You're the savior of Hurnscald crops. Half from the world would die from famine, weren't for you.");
+ next;
+ mesn;
+ mesq l("We're currently the biggest exporter of food. We may be a small town, but Tulimshar and Halinarzo can barely hold themselves.");
+ next;
+ mesn;
+ mesq l("Here, take this @@. This is the proof that you've helped Hurnscald greatly. This shall open new opportunities to you.", getitemlink(Scythe));
+ setq HurnscaldQuest_Farmers, 5;
+ getitem Scythe, 1;
+ getexp 0, 100;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, Earmuffs);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, RedknightArmor);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, Boots);
+ setunitdata(.@npcId, UDT_WEAPON, CottonSkirt);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 20);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/012-7/celestia.txt b/npc/012-7/celestia.txt
new file mode 100644
index 000000000..b952ab22e
--- /dev/null
+++ b/npc/012-7/celestia.txt
@@ -0,0 +1,240 @@
+// TMW2 Scripts
+// Author:
+// gumi (TMW Org. Team)
+// Jesusalva
+// Description:
+// Celestia Yeti King's quest. Designed so if you're with 4 players, all 4 can
+// summon the Yeti King, helping you while doing the quest by themselves.
+
+// TODO: OnPCDieEvent must reset quest
+
+
+012-7,35,49,0 script Celestia NPC_ELF_F,{
+ .@q1=getq(HurnscaldQuest_Celestia);
+ .@q2=getq(HurnscaldQuest_TeaParty);
+ mesn;
+ mesq lg("Hello, darling. I was thinking in doing a tea party.");
+ if (.@q1)
+ mesc l("You notice that even if she tries to calm down everyone and serve tea, she's pretty distressed with the Monster King herself.");
+ next;
+ mesn strcharinfo(0);
+ menu
+ l("Sorry, I'm more of a coffee person."), L_Coffee,
+ l("What an amazing crown you have! How do I get it?!"), L_Crown,
+ rif(.@q2 == 0 && BaseLevel >= 35, l("Tea party! I want to participate.")), L_TeaQuest,
+ rif(.@q2 == 1, l("I have some sweeties for the Tea Party!")), L_TeaCheck,
+ rif(.@q2 >= 2, l("Tea party! I want to participate.")), L_TeaParty,
+ rif(.@q1 == 0, l("There are Monster Attacks every month, how do you have time for tea parties?!")), L_MainQuest,
+ rif(.@q1 >= 6, l("I want to try convincing the Yeti King again.")), L_MainQuestCore;
+
+L_Coffee:
+ mes "";
+ mesn;
+ mesq l("Hmpf! Coffee is an heresy!");
+ // Except I love coffee ~ Jesusalva
+ close;
+
+L_Crown:
+ mes "";
+ mesn;
+ mesq l("Ooh, this nice shiny thing? It was an event.");
+ next;
+ mesn;
+ mesq l("Saulc is rich, you know. He challenged a group of thirty NPCs to defeat him, whoever won would get this @@.", getitemlink(MurdererCrown));
+ next;
+ mesn;
+ mesq l("Well, Andrei Sakar said it was a waste a time, and the other NPCs started fighting against themselves, so I won.");
+ next;
+ mesn;
+ if (BaseLevel < 100)
+ mesq l("...Besides, I have this nice @@ with me. I'm not low-level like you.", getitemlink(BansheeBow));
+ else
+ mesq l("...Besides, I have this nice @@ with me. It's a reliable bow.", getitemlink(BansheeBow));
+ close;
+
+L_MainQuest:
+ mes "";
+ mesn;
+ mesc l("Celestia eyes sparkles.");
+ mesq l("Someone who have clear priorities appeared! I'm glad!");
+ next;
+ mesn;
+ mesq l("You see, most people think that all monsters are controlled by the Monster King, but that's not quite right.");
+ next;
+ mesn;
+ mesq l("Some are just living their own lives. In special, I've spent part of my life studying the Yeti Society.");
+ next;
+ mesn;
+ mesq l("And guess what? They have a King of their own!");
+ mesq l("If we could convince them to distract the Monster King, we could have chances to do a counter-attack!");
+ next;
+ mesn;
+ mesq l("But that's not so easy... I already sent many people, and even come myself, but he refuses to help.");
+ next;
+
+L_MainQuestCore:
+ mesn;
+ mesq l("Maybe you could convince him. There's a summoning circle on Tulimshar Sewers.");
+ next;
+ mesn;
+ mesq l("Go very close to it and, speak the four four-letters magic words, pour some @@, and he'll appear to you.", getitemlink(EverburnPowder));
+ next;
+ mesn;
+ mesq l("Don't go alone, though! He would not listen to me, it is not you alone he'll pay attention. You will lose reagents!");
+ next;
+ mesc l("Accept quest?");
+ if (askyesno() == ASK_YES) {
+ setq HurnscaldQuest_Celestia, 1;
+ @YetiKing_Challenger=0;
+ mes "";
+ mesn;
+ mesq l("Good, good. The chant is ##B EMOC OTEM ITEY GNIK ##b. Good luck!");
+ }
+ close;
+
+L_TeaQuest:
+ mes "";
+ mesn;
+ mesq l("Well, the reason why I'm not doing it already is because, you see, I lack cookies.");
+ //next;
+ //mesn;
+ //mesq l("And anyone who hanged out on #evol-dev knows that, well... Cookies are life!");
+ next;
+ mesn;
+ mesq l("But I can still make it without cookies, as long that you bring me some other sweeties.");
+ next;
+ mesn l("Item List");
+ mes l("@@/50 @@", countitem(Acorn), getitemlink(Acorn));
+ mes l("@@/20 @@", countitem(ChocolateMouboo), getitemlink(ChocolateMouboo));
+ mes l("@@/40 @@", countitem(ChocolateBar), getitemlink(ChocolateBar));
+ mes l("@@/15 @@", countitem(Candy), getitemlink(Candy));
+ mes l("@@/15 @@", countitem(OrangeCupcake), getitemlink(OrangeCupcake));
+ mes l("@@/10 @@", countitem(CherryCake), getitemlink(CherryCake));
+ mes l("@@/5 @@", countitem(GingerBreadMan), getitemlink(GingerBreadMan));
+ mes l("@@/2 @@", countitem(ChocolateBiscuit), getitemlink(ChocolateBiscuit));
+ /* We can't ask for THAT many!
+ mes l("@@/20 @@", countitem(ApanaCake), getitemlink(ApanaCake));
+ mes l("@@/20 @@", countitem(Lollipop), getitemlink(Lollipop));
+ mes l("@@/20 @@", countitem(Mashmallow), getitemlink(Mashmallow));
+ mes l("@@/20 @@", countitem(TonoriDelight), getitemlink(TonoriDelight));
+ mes l("@@/20 @@", countitem(EasterEgg), getitemlink(EasterEgg));
+ mes l("@@/20 @@", countitem(ChocolateBunny), getitemlink(ChocolateBunny));
+ mes l("@@/20 @@", countitem(FrozenYetiTear), getitemlink(FrozenYetiTear));
+ mes l("@@/20 @@", countitem(DeliciousCookie), getitemlink(DeliciousCookie));
+ */
+ setq HurnscaldQuest_TeaParty, 1;
+ close;
+
+L_TeaCheck:
+ mesn l("Item List");
+ mes l("@@/50 @@", countitem(Acorn), getitemlink(Acorn));
+ mes l("@@/20 @@", countitem(ChocolateMouboo), getitemlink(ChocolateMouboo));
+ mes l("@@/40 @@", countitem(ChocolateBar), getitemlink(ChocolateBar));
+ mes l("@@/15 @@", countitem(Candy), getitemlink(Candy));
+ mes l("@@/15 @@", countitem(OrangeCupcake), getitemlink(OrangeCupcake));
+ mes l("@@/10 @@", countitem(CherryCake), getitemlink(CherryCake));
+ mes l("@@/5 @@", countitem(GingerBreadMan), getitemlink(GingerBreadMan));
+ mes l("@@/2 @@", countitem(ChocolateBiscuit), getitemlink(ChocolateBiscuit));
+ next;
+ select
+ l("I will be back shortly."),
+ l("I have all.");
+ mes "";
+
+ if (@menu == 1) {
+ closedialog;
+ goodbye;
+ close;
+ }
+ if (countitem(Acorn) < 50 ||
+ countitem(ChocolateMouboo) < 20 ||
+ countitem(ChocolateBar) < 40 ||
+ countitem(Candy) < 15 ||
+ countitem(OrangeCupcake) < 15 ||
+ countitem(CherryCake) < 10 ||
+ countitem(GingerBreadMan) < 5 ||
+ countitem(ChocolateBiscuit) < 2)
+ goto L_Lying;
+
+ inventoryplace CelestiaTea, 3;
+
+ delitem Acorn, 50;
+ delitem ChocolateMouboo, 20;
+ delitem ChocolateBar, 40;
+ delitem Candy, 15;
+ delitem OrangeCupcake, 15;
+ delitem CherryCake, 10;
+ delitem GingerBreadMan, 5;
+ delitem ChocolateBiscuit, 2;
+
+ getexp rand(12000, 30000), 0; // level exp cap: 15,775 NO ONE CAN COMPLETE THIS QUEST LEVEL 35
+ getitem CelestiaTea, 3;
+ setq HurnscaldQuest_TeaParty, 2;
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! I'll arrange the table.");
+ close;
+
+L_Lying:
+ mesn;
+ mesq l("Wha- How dare you, to lie to me!");
+ // She'll try to drain all your MP. If you're not MP Full, you'll die. And will have EXP penalty, of course.
+ if (Sp == MaxSp)
+ percentheal 0, -100;
+ else
+ percentheal -100, 0;
+ close;
+
+// begin: Gumi Script
+L_TeaParty:
+ mes "";
+ mesn;
+ mesq l("Wonderful, I am happy to have you over. Lets get things started with some puerh tea.");
+ next;
+ mesc l("Celestia hands you a cup filled with some type of tea that is unlike anything you have seen before.");
+ mesc l("It has a very dark color and an unusual aroma reminiscent of a moist forest.");
+ next;
+ mesc l("For a moment you wonder if Celestia might have gotten confused and tossed in a handful of forest dirt into the teapot.");
+ mesc l("You ponder whether or not it would be wise to drink it.");
+ menu
+ l("Uh are you sure this is fit to drink?"), L_QuestionTea,
+ l("(Drink the tea, hoping for the best)"), L_DrinkTea;
+
+L_DrinkTea:
+ // This is easily exploitable on purpose: It's mostly to protect against flood.
+ if (@tmp_teatime < gettimetick(2)) {
+ percentheal 0, 15;
+ @tmp_teatime=gettimetick(2)+140;
+ }
+ mesc l("To your pleasant surprise the tea is actually quite good.");
+ next;
+ mesc l("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;
+ mesc l("Clearly an exotic tea, with a refined flavor fit for a refined woman such as Celestia.");
+ close;
+
+L_QuestionTea:
+ mesq l("Yes, did you really think I was some kind of monster that would try to poison you in my own house?");
+ mes l("##a(it would be way too messy anyway)##0");
+ next;
+ mesc l("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;
+// end: Gumi Script
+
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, MurdererCrown);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 19);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 10);
+
+ npcsit;
+
+ .sex = G_FEMALE;
+ .distance = 5;
+
+}
diff --git a/npc/014-1/_import.txt b/npc/014-1/_import.txt
new file mode 100644
index 000000000..a036c39cc
--- /dev/null
+++ b/npc/014-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 014-1: Woodland Mining Camp
+// 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",
diff --git a/npc/014-1/_mobs.txt b/npc/014-1/_mobs.txt
new file mode 100644
index 000000000..7801b55f6
--- /dev/null
+++ b/npc/014-1/_mobs.txt
@@ -0,0 +1,10 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-1: Woodland Mining Camp mobs
+014-1,97,59,86,45 monster Silk Worm 1034,15,30000,30000
+014-1,97,67,50,45 monster Mouboo 1023,12,30000,45000
+014-1,85,82,54,35 monster Squirrel 1032,12,30000,45000
+014-1,87,80,52,18 monster Tipiou 1016,3,30000,45000
+014-1,135,91,6,28 monster Blub 1008,2,30000,30000
+014-1,95,58,105,59 monster Cobalt Plant 1136,2,45000,50000
+014-1,88,68,104,43 monster Mauve Plant 1135,3,45000,50000
+014-1,66,53,43,62 monster Gamboge Plant 1134,3,45000,50000
diff --git a/npc/014-1/_warps.txt b/npc/014-1/_warps.txt
new file mode 100644
index 000000000..d77a98243
--- /dev/null
+++ b/npc/014-1/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-1: Woodland Mining Camp warps
+014-1,79,98,0 warp #014-1_79_98 3,0,012-1,78,18
+014-1,79,57,0 warp #014-1_79_57 1,0,015-1,99,132
diff --git a/npc/014-2/_import.txt b/npc/014-2/_import.txt
new file mode 100644
index 000000000..c40bd5cfc
--- /dev/null
+++ b/npc/014-2/_import.txt
@@ -0,0 +1,4 @@
+// Map 014-2: Woodlands Southeast
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/014-2/_mobs.txt",
+"npc/014-2/_warps.txt",
diff --git a/npc/014-2/_mobs.txt b/npc/014-2/_mobs.txt
new file mode 100644
index 000000000..884f6bc47
--- /dev/null
+++ b/npc/014-2/_mobs.txt
@@ -0,0 +1,13 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-2: Woodlands Southeast mobs
+014-2,150,63,86,43 monster Log Head 1066,25,30000,30000
+014-2,66,45,58,26 monster Mouboo 1023,6,30000,30000
+014-2,108,60,52,58 monster Forest Mushroom 1060,12,60000,45000
+014-2,29,74,19,27 monster Fluffy 1022,5,30000,30000
+014-2,207,65,40,50 monster Sea Slime 1093,6,42000,30000
+014-2,125,84,157,54 monster Alpha Mouboo 1056,2,120000,180000
+014-2,132,59,90,35 monster Squirrel 1032,28,30000,42000
+014-2,143,74,137,117 monster Cobalt Plant 1136,3,45000,50000
+014-2,148,70,137,117 monster Mauve Plant 1135,3,45000,50000
+014-2,154,66,137,117 monster Gamboge Plant 1134,3,45000,50000
+014-2,125,23,125,37 monster Clover Field 1028,6,45000,50000
diff --git a/npc/014-2/_warps.txt b/npc/014-2/_warps.txt
new file mode 100644
index 000000000..6ab53d602
--- /dev/null
+++ b/npc/014-2/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-2: Woodlands Southeast warps
+014-2,179,21,0 warp #014-2_179_21 3,0,012-1,78,101
+014-2,232,20,0 warp #014-2_232_20 2,0,012-1,132,100
+014-2,49,24,0 warp #014-2_49_24 1,0,014-3,148,153
diff --git a/npc/014-3/_import.txt b/npc/014-3/_import.txt
new file mode 100644
index 000000000..a7f1841df
--- /dev/null
+++ b/npc/014-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 014-3: Woodlands Central Area
+// 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/fountain.txt",
+"npc/014-3/oscar.txt",
diff --git a/npc/014-3/_mobs.txt b/npc/014-3/_mobs.txt
new file mode 100644
index 000000000..0fc7f4eeb
--- /dev/null
+++ b/npc/014-3/_mobs.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-3: Woodlands Central Area mobs
+014-3,133,94,91,52 monster Mouboo 1023,30,30000,45000
+014-3,146,131,70,21 monster Forest Mushroom 1060,9,60000,45000
+014-3,122,121,90,35 monster Squirrel 1032,26,30000,42000
+014-3,62,101,37,32 monster Centaur 1139,4,80000,90000
+014-3,192,94,22,15 monster Pinkie 1132,6,30000,50000,Oscar::OnKillPinkie
+014-3,113,84,49,25 monster Poison Spiky Mushroom 1043,11,45000,45000
+014-3,146,131,70,21 monster Mauve Plant 1135,4,90000,90000
+014-3,62,101,37,32 monster Chagashroom Field 1128,4,90000,90000
+014-3,113,84,49,25 monster Plushroom Field 1011,4,90000,90000
diff --git a/npc/014-3/_warps.txt b/npc/014-3/_warps.txt
new file mode 100644
index 000000000..0d0752f12
--- /dev/null
+++ b/npc/014-3/_warps.txt
@@ -0,0 +1,10 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-3: Woodlands Central Area warps
+014-3,158,142,0 warp #014-3_158_142 0,0,015-3,172,195
+014-3,149,154,0 warp #014-3_149_154 1,0,014-2,48,25
+014-3,224,111,0 warp #014-3_224_111 0,4,012-1,23,61
+014-3,173,59,0 warp #014-3_173_59 1,0,014-5,81,228
+014-3,138,86,0 warp #014-3_138_86 0,0,015-2,49,100
+014-3,73,61,0 warp #014-3_73_61 0,0,014-3,95,59
+014-3,95,58,0 warp #014-3_95_58 0,0,014-3,73,62
+014-3,47,89,0 warp #014-3_47_89 0,3,014-4,158,68
diff --git a/npc/014-3/fountain.txt b/npc/014-3/fountain.txt
new file mode 100644
index 000000000..012373db0
--- /dev/null
+++ b/npc/014-3/fountain.txt
@@ -0,0 +1,137 @@
+// TMW-2 Script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Hurnscald doesn't have a well, but have a MAGIC FOUNTAIN ***
+// Req. Int 40 to finish Tier Elevation quest.
+
+014-3,151,117,0 script Fountain#Hurns NPC_NO_SPRITE,{
+ if (ST_TIER == 5 && gettimetick(2) < QUEST_ELEVARTEMPO) goto L_Tier2;
+
+ mesn l("Mana Saulc");
+ mesc l("Go away, I am too magical for you. %%n"); // quote
+ close;
+
+ // TODO FIXME: We don't have a "Magic" water, and we might add
+ // Mahed or Mahad, another well master (Mehoud? Muhoud?)
+ input .@count;
+
+ if (.@count == 0)
+ close;
+ .@Cost = .@count * .COST_PER_BOTTLE;
+ .@empty = countitem("EmptyBottle");
+
+ if (.@empty < .@count)
+ goto L_NotEnoughBottles;
+ if (Zeny < .@Cost)
+ goto L_NotEnoughMoney;
+ getinventorylist;
+ inventoryplace BottleOfTonoriWater, .@count;
+
+ Zeny=Zeny-.@Cost;
+ delitem "EmptyBottle", .@count;
+ getitem "BottleOfTonoriWater", .@count;
+ close;
+
+L_NotEnoughBottles:
+ mes "";
+ mesn;
+ mes l("You don't have that many empty bottles!");
+ close;
+
+L_NotEnoughMoney:
+ mes "";
+ mesn;
+ mes l("You don't have enough gold! You need @@ gp.", .@Cost);
+ close;
+
+
+L_Tier2:
+ if (readparam(bInt) < 10) goto L_Dumb;
+ mesn;
+ mesc l("WHAT ARE YOU GOING TO DO?");
+ next;
+ select
+ l("Do nothing"), // 1
+ l("Drink the potion"), // 2
+ l("Pour the potion"), // 3
+ l("Wash yourself with the potion"), // 4
+ l("Burn the potion"), // 5
+ l("Drink the potion, and say magic words"), // 6
+ l("Say magic words"), // 7
+ l("Do a weird dance"), // 8
+ l("Blame Saulc"); // 9
+
+ mes "";
+ if (@menu == 1)
+ close;
+
+ if (@menu == 3)
+ goto L_Tier2Ok;
+
+ if (@menu <= 6)
+ goto L_Failed;
+
+ if (@menu == 9)
+ mesc l("Whatever you're blaming Saulc about, this one time, he is innocent.");
+ mesc l("Nothing happens.");
+ close;
+
+L_Fail2:
+ mesc l("Your low intelligence prevents anything from happening with you.");
+ mes "";
+
+L_Failed:
+ mesn strcharinfo(0);
+ mesq l("Ah no... That's not what I had to do... I wasted the potion...");
+ QUEST_ELEVARTEMPO=gettimetick(2);
+ close;
+
+L_Dumb:
+ mesn strcharinfo(0);
+ mesq l("Hello there pretty fountain, what about granting me magic?");
+ next;
+ mesc l("Unsurprisingly, nothing happens.");
+ close;
+
+L_Tier2Ok:
+ mesc l("You pour the whole potion on the fountain.");
+ next;
+ if (readparam(bInt) < 20) goto L_Fail2;
+ mesc l("You hear birds singing! That is what you had to do!");
+ next;
+ if (readparam(bInt) < 30) goto L_Fail2;
+ mesc l("Your body starts to glow. You're not sure why, the fountain did that!");
+ next;
+ if (readparam(bInt) < 40) goto L_Fail2;
+ mesn;
+ mes l("I am the Magic Fountain of Hurnscald. You look qualified.");
+ next;
+ mesn;
+ mes l("Your next step is to get the book of the Second Sage Of Fate.");
+ next;
+ mesn;
+ mes l("I predict you're closer to find the Secret Of Mana, and therefore, be part on saving our world.");
+ next;
+ mesn;
+ mes l("I will empower you with raw mana, and your time will start running out again.");
+ next;
+ // 30~60 s + 4~6 minutes to finish in average. Each level grants 4~6 extra seconds.
+ // You will also get extra time for int, but randomly.
+ QUEST_ELEVARTEMPO=gettimetick(2)+rand(30,60)+rand((BaseLevel*4),(BaseLevel*6))+rand(1,readparam(bInt));
+ ST_TIER=6;
+ // Ref. 240 xp. You will be penalized with 1 xp for over-level. (waw...)
+ if (BaseLevel < 300)
+ getexp 300-BaseLevel, 0;
+ mesn;
+ mesq l("Run like the wind, @@! For you shall have only @@ to finish the ritual!", strcharinfo(0), FuzzyTime(QUEST_ELEVARTEMPO,2,2));
+ close;
+
+OnInit:
+ .COST_PER_BOTTLE = 0;
+ .sex = G_OTHER;
+ .distance = 3;
+
+ end;
+}
diff --git a/npc/014-3/oscar.txt b/npc/014-3/oscar.txt
new file mode 100644
index 000000000..db71cafb9
--- /dev/null
+++ b/npc/014-3/oscar.txt
@@ -0,0 +1,151 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Hurnscald farmer
+
+014-3,187,84,0 script Oscar NPC_RAIJIN,{
+ .@q1=getq(HurnscaldQuest_Farmers);
+ .@q2=getq2(HurnscaldQuest_Farmers);
+ mesn;
+ if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Ah, if it isn't @@? You're the talk of the town!", $MOST_HEROIC$);
+ if (strcharinfo(0) == $MOST_HEROIC$) next;
+ if (.@q1 == 2) goto L_Hello;
+ if (.@q1 == 3) goto L_Check;
+ if (.@q1 == 4) goto L_Letter;
+ if (.@q1 == 5) goto L_Thanks;
+
+ mesq l("Don't bother me, I'm busy right now. Since the Monster King left, I barely got a night of rest...");
+ close;
+
+L_Hello:
+ mesq l("Ah! @@! I heard you helped Hinnak with his Pinkies problem!", strcharinfo(0));
+ next;
+ mesn;
+ mesq l("Wouldn't you like to help me too?");
+ if (askyesno() != ASK_YES) {
+ mesq l("Sorry, I have to go.");
+ close;
+ }
+ next;
+ mesn;
+ mesq l("Great! Excellent! Because I am also diving in problems!!");
+ next;
+ if (readparam(bAgi) < 30) goto L_Slow;
+ if (BaseLevel < 20) goto L_Weak;
+ mesn;
+ // Est. kill 400 Pinkies
+ mesq l("I hate so much the Pinkies on my fields, I want to do a soup! Can you provide me 10 @@? Many thanks.", getitemlink(PinkieLeg));
+ setq HurnscaldQuest_Farmers, 3, 0;
+ close;
+
+L_Slow:
+ mesn;
+ mesq l("But you're too slow. Sorry.");
+ next;
+ mesc l("Raise agility to do this quest.");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("But you're too weak. Sorry.");
+ close;
+
+L_Check:
+ mesq l("Hey, how is the monster extermination going?");
+ next;
+ mesn;
+ // You in average need to kill 400 Pinkies. But ya killed 200~250 previously. You get this bonus for not leaving the fields.
+ if (.@q2 >= 250)
+ mesq l("You killed so many Pinkies! My wife and I love you!");
+ else if (.@q2 >= 200)
+ mesq l("You are doing GREAT! Keep slaying them, hahaah!");
+ else if (.@q2 >= 150)
+ mesq l("I see you are doing good. Keep slaying them, hahaah!");
+ else if (.@q2 >= 100)
+ mesq l("Good job, you already killed over 100! Hahah, that sure teach them a lesson!");
+ else if (.@q2 >= 50)
+ mesq l("Yeah, teach them a lesson! Keep going!");
+ else
+ mesq l("Go kill them!!");
+ next;
+ menu
+ rif (.@q2 >= 250 && countitem(PinkieLeg) >= 10, l("Today is soup of Pinkie Legs!")), L_RealHelp,
+ rif (.@q2 >= 250 && countitem(PinkieLeg) < 10, l("Thanks, they hate to drop their Legs.")), L_TrueHelp,
+ rif (.@q2 >= 100 && .@q2 < 250 && countitem(PinkieLeg) >= 10, l("Here are the Pinkie Legs.")), L_Help,
+ rif (.@q2 < 100 && countitem(PinkieLeg) >= 10, l("Here are the Pinkie Legs.")), L_NoKill,
+ l("I'm not done yet. I'll be back."), -;
+ close;
+
+L_RealHelp:
+ delitem PinkieLeg, 10;
+ getexp 1600, 60;
+ Zeny=Zeny+5000;
+ setq HurnscaldQuest_Farmers, 4, 0;
+ mes "";
+ mesn;
+ mesq l("Waw! You really did it, you're the savior of my farm!! You have my eternal gratitute. Here is 5000 GP for your troubles!");
+ close;
+
+L_TrueHelp:
+ mes "";
+ mesn;
+ mesq l("I know how hard it is! I hate them with all my heart, only seeing you killing them left and right was GREAT!");
+ next;
+ getexp 1000, 0;
+ Zeny=Zeny+2500;
+ setq HurnscaldQuest_Farmers, 4, 0;
+ mesn;
+ mesq l("You have my eternal gratitute. Here is 2500 GP for your troubles.");
+ close;
+
+L_Help:
+ delitem PinkieLeg, 10;
+ getexp 1100, 0;
+ Zeny=Zeny+2000;
+ setq HurnscaldQuest_Farmers, 4, 0;
+ mes "";
+ mesn;
+ mesq l("Many thanks. You have my eternal gratitute. Here is 2000 GP for your troubles.");
+ close;
+
+L_NoKill:
+ mesn;
+ mesq l("Ahahahah, do you really think I'll accept legs if you don't help me cleaning my fields?");
+ next;
+ mesn;
+ mesq l("Kill at least a hundred of Pinkies here, and then we can talk.");
+ close;
+
+L_Letter:
+ mesq l("You're the savior of Hurnscald crops. Half from the world would die from famine, weren't for you.");
+ next;
+ mesn;
+ mesq l("@@ and I signed this letter. Deliver it to Airlia on the Town Hall, and she'll reward you correctly.", l("Hinnak"));
+ close;
+
+L_Thanks:
+ mesq l("Many thanks for all the help!");
+ close;
+
+OnKillPinkie:
+ .@q1=getq(HurnscaldQuest_Farmers);
+ .@q2=getq2(HurnscaldQuest_Farmers);
+ if (.@q1 == 3)
+ setq2 HurnscaldQuest_Farmers, .@q2+1;
+ end;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FarmerHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, LeatherShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, TulimsharGuardBoots);
+ setunitdata(.@npcId, UDT_WEAPON, CottonTrousers);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/014-4/_import.txt b/npc/014-4/_import.txt
new file mode 100644
index 000000000..b744dbcc3
--- /dev/null
+++ b/npc/014-4/_import.txt
@@ -0,0 +1,6 @@
+// Map 014-4: Thunderhill
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/014-4/_mobs.txt",
+"npc/014-4/_warps.txt",
+"npc/014-4/mapflags.txt",
+"npc/014-4/slide.txt",
diff --git a/npc/014-4/_mobs.txt b/npc/014-4/_mobs.txt
new file mode 100644
index 000000000..0c3c4ee57
--- /dev/null
+++ b/npc/014-4/_mobs.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-4: Thunderhill mobs
+014-4,134,85,26,22 monster Centaur 1139,1,60000,60000
+014-4,61,38,43,23 monster Mana Piou 1155,6,30000,30000
+014-4,130,68,24,52 monster Forest Mushroom 1060,9,60000,45000
+014-4,70,77,53,13 monster Living Potato 1181,4,60000,45000
+014-4,20,26,4,20 monster Bluepar 1177,4,30000,30000
diff --git a/npc/014-4/_warps.txt b/npc/014-4/_warps.txt
new file mode 100644
index 000000000..e503630e7
--- /dev/null
+++ b/npc/014-4/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-4: Thunderhill warps
+014-4,95,32,0 warp #014-4_95_32 0,0,017-1,219,90
+014-4,159,69,0 warp #014-4_159_69 0,3,014-3,48,88
diff --git a/npc/014-4/mapflags.txt b/npc/014-4/mapflags.txt
new file mode 100644
index 000000000..351108ac8
--- /dev/null
+++ b/npc/014-4/mapflags.txt
@@ -0,0 +1,4 @@
+014-4 mapflag magic_damage_rate 120
+014-4 mapflag misc_damage_rate 120
+014-4 mapflag weapon_damage_rate 80
+
diff --git a/npc/014-4/slide.txt b/npc/014-4/slide.txt
new file mode 100644
index 000000000..6d24670c2
--- /dev/null
+++ b/npc/014-4/slide.txt
@@ -0,0 +1,20 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Allows movement sliding though the bridge on 014-4
+
+014-4,58,51,0 script #014-4_58_51 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 51, 51;
+ end;
+}
+
+014-4,52,51,0 script #014-4_52_51 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 59, 51;
+ end;
+}
+
diff --git a/npc/014-5/_import.txt b/npc/014-5/_import.txt
new file mode 100644
index 000000000..b404f71e4
--- /dev/null
+++ b/npc/014-5/_import.txt
@@ -0,0 +1,5 @@
+// Map 014-5: North Woodlands
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/014-5/_mobs.txt",
+"npc/014-5/_warps.txt",
+"npc/014-5/sign.txt",
diff --git a/npc/014-5/_mobs.txt b/npc/014-5/_mobs.txt
new file mode 100644
index 000000000..26d6c7104
--- /dev/null
+++ b/npc/014-5/_mobs.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-5: North Woodlands mobs
+014-5,156,106,48,44 monster Log Head 1066,21,20000,20000
+014-5,76,70,48,44 monster Plushroom Field 1011,16,80000,80000
+014-5,66,110,44,38 monster Chagashroom Field 1128,16,80000,80000
diff --git a/npc/014-5/_warps.txt b/npc/014-5/_warps.txt
new file mode 100644
index 000000000..274ad4a8d
--- /dev/null
+++ b/npc/014-5/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-5: North Woodlands warps
+014-5,82,229,0 warp #014-5_82_229 1,0,014-3,172,60
diff --git a/npc/014-5/sign.txt b/npc/014-5/sign.txt
new file mode 100644
index 000000000..422cd3d80
--- /dev/null
+++ b/npc/014-5/sign.txt
@@ -0,0 +1,19 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Description:
+// Random Sign nobody bothers reading.
+
+014-5,179,29,0 script Sign#014517929 NPC_SWORDS_SIGN,{
+ mesc l("Welcome to the Greenlands, the place cursed by the Monster King to be ice forever, and now known as Icelands.");
+ next;
+ mesc l("It's advised to come ready for the cold, the hungry beasts, and other dangers snow may bring.");
+ next;
+ mesc l("WARNING: Path temporaly closed due strong snowstorm."), 3;
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
diff --git a/npc/015-1/_import.txt b/npc/015-1/_import.txt
new file mode 100644
index 000000000..b247616e1
--- /dev/null
+++ b/npc/015-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 015-1: Woodland Mines
+// 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",
diff --git a/npc/015-1/_mobs.txt b/npc/015-1/_mobs.txt
new file mode 100644
index 000000000..358a78c2d
--- /dev/null
+++ b/npc/015-1/_mobs.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-1: Woodland Mines mobs
+015-1,121,105,119,97 monster Bif 1058,12,45000,45000
+015-1,73,111,119,97 monster Red Slime 1092,75,30000,30000
+015-1,130,81,119,97 monster Cave Bat 1039,40,60000,60000
+015-1,147,91,119,97 monster Yellow Slime 1091,50,30000,40000
+015-1,62,122,119,97 monster Black Scorpion 1074,28,30000,30000
+015-1,120,136,91,81 monster Small Amethyst Bif 1110,5,45000,45000
+015-1,80,175,142,39 monster Copper Slime 1088,5,45000,45000
+015-1,88,36,142,39 monster Copper Slime 1088,3,45000,50000
+015-1,99,73,3,3 monster Fire Skull 1193,1,45000,60000
diff --git a/npc/015-1/_warps.txt b/npc/015-1/_warps.txt
new file mode 100644
index 000000000..fef1a8b5a
--- /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 Mines warps
+015-1,100,133,0 warp #015-1_100_133 1,0,014-1,79,58
+015-1,90,49,0 warp #015-1_90_49 0,0,015-4,50,38
+015-1,177,56,0 warp #015-1_177_56 0,0,015-4,76,19
diff --git a/npc/015-2/_import.txt b/npc/015-2/_import.txt
new file mode 100644
index 000000000..2538bf7bd
--- /dev/null
+++ b/npc/015-2/_import.txt
@@ -0,0 +1,7 @@
+// Map 015-2: Bandit Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/015-2/_mobs.txt",
+"npc/015-2/_warps.txt",
+"npc/015-2/contrabandist.txt",
+"npc/015-2/guard.txt",
+"npc/015-2/lordcave.txt",
diff --git a/npc/015-2/_mobs.txt b/npc/015-2/_mobs.txt
new file mode 100644
index 000000000..2514e4c33
--- /dev/null
+++ b/npc/015-2/_mobs.txt
@@ -0,0 +1,50 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-2: Bandit Cave mobs
+015-2,152,72,141,63 monster Silk Worm 1034,9,30000,100000
+015-2,263,38,15,17 monster Bandit 1024,1,30000,30000
+015-2,262,114,19,19 monster Bandit 1024,1,30000,30000
+015-2,132,119,8,10 monster Bandit 1024,1,30000,30000
+015-2,170,66,8,10 monster Bandit 1024,1,30000,30000
+015-2,67,70,8,10 monster Bandit 1024,1,30000,30000
+015-2,196,107,8,10 monster Bandit 1024,1,30000,30000
+015-2,196,29,8,10 monster Bandit 1024,1,30000,30000
+015-2,36,37,8,10 monster Bandit 1024,1,30000,30000
+015-2,112,40,22,24 monster Bandit 1024,2,30000,60000
+015-2,31,99,8,10 monster Bandit 1024,1,30000,30000
+015-2,223,250,61,32 monster Bat 1039,5,30000,100000
+015-2,270,175,13,12 monster Bat 1039,3,30000,100000
+015-2,257,77,2,63 monster Bat 1039,6,30000,100000
+015-2,192,77,2,63 monster Bat 1039,9,30000,100000
+015-2,167,110,43,6 monster Bat 1039,9,30000,100000
+015-2,75,70,52,48 monster Bat 1039,21,30000,100000
+015-2,78,195,64,48 monster Bat 1039,9,30000,100000
+015-2,168,109,18,18 monster Snake 1122,3,30000,100000
+015-2,199,76,18,18 monster Snake 1122,3,30000,100000
+015-2,88,163,14,13 monster Snake 1122,3,30000,100000
+015-2,48,113,17,9 monster Snake 1122,3,30000,100000
+015-2,177,94,10,14 monster Angry Red Scorpion 1130,4,30000,100000
+015-2,194,49,10,14 monster Angry Red Scorpion 1130,2,30000,100000
+015-2,51,115,23,12 monster Angry Red Scorpion 1130,2,30000,100000
+015-2,63,169,6,8 monster Angry Red Scorpion 1130,2,30000,100000
+015-2,100,226,14,7 monster Snake 1122,3,30000,100000
+015-2,260,44,26,8 monster Snake 1122,3,30000,100000
+015-2,272,48,10,14 monster Angry Red Scorpion 1130,2,30000,100000
+015-2,95,78,15,12 monster Yellow Slime 1091,3,30000,100000
+015-2,59,36,9,12 monster Yellow Slime 1091,3,30000,100000
+015-2,26,69,9,12 monster Yellow Slime 1091,3,30000,100000
+015-2,61,101,7,5 monster Yellow Slime 1091,3,30000,100000
+015-2,50,61,4,6 monster Yellow Slime 1091,2,30000,100000
+015-2,128,39,4,6 monster Yellow Slime 1091,2,30000,100000
+015-2,41,178,4,6 monster Yellow Slime 1091,1,30000,100000
+015-2,70,229,4,6 monster Yellow Slime 1091,1,30000,100000
+015-2,20,204,4,6 monster Yellow Slime 1091,1,30000,100000
+015-2,114,190,4,6 monster Yellow Slime 1091,3,30000,100000
+015-2,137,205,4,6 monster Yellow Slime 1091,2,30000,100000
+015-2,79,220,14,7 monster Cave Snake 1035,3,30000,100000
+015-2,115,210,14,7 monster Cave Snake 1035,3,30000,100000
+015-2,41,193,15,15 monster Cave Snake 1035,3,30000,100000
+015-2,70,143,15,15 monster Cave Snake 1035,3,30000,100000
+015-2,97,183,14,7 monster Cave Snake 1035,3,30000,100000
+015-2,172,252,4,6 monster Cave Maggot 1027,4,30000,100000
+015-2,263,236,8,2 monster Cave Maggot 1027,3,30000,100000
+015-2,143,128,140,125 monster Small Diamond Biff 1107,8,30000,100000
diff --git a/npc/015-2/_warps.txt b/npc/015-2/_warps.txt
new file mode 100644
index 000000000..4f6efec96
--- /dev/null
+++ b/npc/015-2/_warps.txt
@@ -0,0 +1,24 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-2: Bandit Cave warps
+015-2,51,75,0 warp #015-2_51_75 0,0,015-2,260,127
+015-2,61,71,0 warp #015-2_61_71 0,0,015-2,270,124
+015-2,270,125,0 warp #015-2_270_125 0,0,015-2,61,72
+015-2,260,128,0 warp #015-2_260_128 0,0,015-2,51,76
+015-2,145,118,0 warp #015-2_145_118 0,0,015-2,47,119
+015-2,196,26,0 warp #015-2_196_26 0,0,015-2,261,46
+015-2,261,47,0 warp #015-2_261_47 0,0,015-2,196,27
+015-2,271,52,0 warp #015-2_271_52 0,0,015-2,98,31
+015-2,98,30,0 warp #015-2_98_30 0,0,015-2,271,51
+015-2,47,120,0 warp #015-2_47_120 0,0,015-2,145,117
+015-2,49,101,0 warp #015-2_49_101 0,0,014-3,138,87
+015-2,24,206,0 warp #015-2_24_206 0,0,015-2,122,212
+015-2,47,185,0 warp #015-2_47_185 0,0,015-2,113,183
+015-2,97,169,0 warp #015-2_97_169 0,0,015-2,68,234
+015-2,113,182,0 warp #015-2_113_182 0,0,015-2,47,184
+015-2,122,211,0 warp #015-2_122_211 0,0,015-2,24,205
+015-2,68,235,0 warp #015-2_68_235 0,0,015-2,97,168
+015-2,251,278,0 warp #015-2_251_278 0,0,015-2,94,226
+015-2,266,182,0 warp #015-2_266_182 0,0,015-2,264,237
+015-2,174,256,0 warp #015-2_174_256 0,0,015-2,249,233
+015-2,249,232,0 warp #015-2_249_232 0,0,015-2,174,255
+015-2,264,236,0 warp #015-2_264_236 0,0,015-2,266,181
diff --git a/npc/015-2/contrabandist.txt b/npc/015-2/contrabandist.txt
new file mode 100644
index 000000000..296a3ebce
--- /dev/null
+++ b/npc/015-2/contrabandist.txt
@@ -0,0 +1,93 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Contraband of foreing goods.
+
+015-2,166,250,0 script #Contraband NPC_NO_SPRITE,{
+
+// Store not available
+if (!.active)
+ end;
+
+openshop;
+close;
+
+ function Contraband_Unload {
+ if ($ARKIM_ST > 7500)
+ stopselling(DarkDesertMushroom);
+
+ if (getarg(0,0) & 1)
+ stopselling(IronOre);
+ if (getarg(0,0) & 2)
+ stopselling(TitaniumOre);
+ if (getarg(0,0) & 4)
+ stopselling(LeatherPatch);
+ if (getarg(0,0) & 8)
+ stopselling(GoldenPearlRing);
+ if (getarg(0,0) & 16)
+ stopselling(ThornArrow);
+ if (getarg(0,0) & 32)
+ stopselling(StrangeCoin);
+ if (getarg(0,0) & 64)
+ stopselling(CasinoCoins);
+ if (getarg(0,0) & 128)
+ stopselling(RawLog);
+ return;
+ }
+ function Contraband_Load {
+ .DDMPrice=max(30000,50000-($ARKIM_ST/2)+(7500/2));
+ if ($ARKIM_ST > 7500)
+ sellitem DarkDesertMushroom, .DDMPrice, 1;
+
+ if (getarg(0,0) & 1)
+ sellitem IronOre, 2900, 1;
+ if (getarg(0,0) & 2)
+ sellitem TitaniumOre, 4700, 1;
+ if (getarg(0,0) & 4)
+ sellitem LeatherPatch, 3200, 1;
+ if (getarg(0,0) & 8)
+ sellitem GoldenPearlRing, 1000000, 1;
+ if (getarg(0,0) & 16)
+ sellitem ThornArrow, -1, 3;
+ if (getarg(0,0) & 32)
+ sellitem StrangeCoin, rand(400,5000), 1;
+ if (getarg(0,0) & 64)
+ sellitem CasinoCoins, rand(100,3000), 1;
+ if (getarg(0,0) & 128)
+ sellitem RawLog, 1950, 1;
+ return;
+ }
+
+OnInit:
+ .active=0;
+ .sex = G_OTHER;
+ .distance = 12;
+
+ if (debug) {
+ setnpcdisplay .name$, NPC_KOGA;
+ .active=1;
+ }
+
+ tradertype(NST_MARKET);
+ sellitem Arrow, -1, 1;
+ end;
+
+OnMinute21:
+OnMinute46:
+ setnpcdisplay .name$, NPC_KOGA;
+ .active=1;
+
+ .CurrentValue=rand(1,255);
+ Contraband_Load(.CurrentValue);
+ end;
+
+OnMinute23:
+OnMinute48:
+ setnpcdisplay .name$, NPC_NO_SPRITE;
+ .active=0;
+
+ Contraband_Unload(.CurrentValue);
+ end;
+
+}
diff --git a/npc/015-2/guard.txt b/npc/015-2/guard.txt
new file mode 100644
index 000000000..ac7b6da48
--- /dev/null
+++ b/npc/015-2/guard.txt
@@ -0,0 +1,71 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Description:
+// Part of Helena's quest
+// Gives spoilers about what Jesusalva plans in doing with Bryant
+
+015-2,28,199,0 script Helena's Teammate NPC_ORC,{
+ .@q=getq(HurnscaldQuest_Bandits);
+ if (.@q == 5) goto L_SilverKey;
+ if (.@q == 6) goto L_BanditLord;
+ mesn;
+ mesq lg("Welcome.");
+ mesq l("This small island is a good place to heal our wounds, and the monsters here are not threating.");
+ close;
+
+L_SilverKey:
+ mesn;
+ mesq l("Don't say anything, I can smell the scent of Helena's hair on you.");
+ next;
+ inventoryplace SilverKey, 1, PiberriesInfusion, 3;
+ getitem SilverKey, 1;
+ getitem PiberriesInfusion, 3;
+ setq HurnscaldQuest_Bandits, 6;
+ mesn;
+ mesq l("I guess she sent you to kill another Bandit Lord, right? Ok, I'll give you the key for his room.");
+ 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;
+
+L_BanditLord:
+ 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("This is not The Mana World. My name is not Bryant.");
+ next;
+ mesn;
+ mesq l("In fact, Bryant is my brother, and he lives in a cave, and he probably have a high level quest too, but that's not important now.");
+ next;
+ mesn;
+ mesq l("Go kill the Bandit Lord!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .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);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/015-2/lordcave.txt b/npc/015-2/lordcave.txt
new file mode 100644
index 000000000..661a37636
--- /dev/null
+++ b/npc/015-2/lordcave.txt
@@ -0,0 +1,27 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+
+015-2,94,225,0 script #BanditLordDen NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ if (countitem(SilverKey) >= 1) goto L_Summon;
+ dispbottom l("This passage seems sealed. If I only had a @@...", getitemlink(SilverKey));
+ end;
+
+L_Summon:
+ .@q=getq(HurnscaldQuest_Bandits);
+ if (mobcount("015-2", "#BanditLordDen::OnLordDeath") == 0 && .@q == 6)
+ monster "015-2",260,250,"Bandit Lord",BanditLord,1, "#BanditLordDen::OnLordDeath";
+ slide 251, 277;
+ end;
+
+OnLordDeath:
+ .@q=getq(HurnscaldQuest_Bandits);
+ if (.@q == 6) {
+ setq HurnscaldQuest_Bandits, 7;
+ dispbottom l("Phew! The Bandit Lord was killed.");
+ }
+ end;
+}
diff --git a/npc/015-3/_import.txt b/npc/015-3/_import.txt
new file mode 100644
index 000000000..0b521a5d0
--- /dev/null
+++ b/npc/015-3/_import.txt
@@ -0,0 +1,5 @@
+// Map 015-3: Butterfly Caves
+// 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/arkim.txt",
diff --git a/npc/015-3/_mobs.txt b/npc/015-3/_mobs.txt
new file mode 100644
index 000000000..a0617f7f9
--- /dev/null
+++ b/npc/015-3/_mobs.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-3: Butterfly Caves mobs
+015-3,160,179,19,18 monster Cave Bat 1039,28,30000,40000
+015-3,142,31,24,14 monster Green Slime 1085,5,30000,40000
+015-3,102,105,81,87 monster Small Emerald Bif 1104,6,45000,45000
diff --git a/npc/015-3/_warps.txt b/npc/015-3/_warps.txt
new file mode 100644
index 000000000..33e3d3fa4
--- /dev/null
+++ b/npc/015-3/_warps.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-3: Butterfly Caves warps
+015-3,152,162,0 warp #015-3_152_162 0,0,015-3,123,38
+015-3,171,161,0 warp #015-3_171_161 0,0,015-3,147,39
+015-3,172,196,0 warp #015-3_172_196 0,0,014-3,158,143
+015-3,123,39,0 warp #015-3_123_39 0,0,015-3,152,163
+015-3,147,40,0 warp #015-3_147_40 0,0,015-3,171,162
diff --git a/npc/015-3/arkim.txt b/npc/015-3/arkim.txt
new file mode 100644
index 000000000..f37772430
--- /dev/null
+++ b/npc/015-3/arkim.txt
@@ -0,0 +1,146 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Heremit
+// Variables:
+// $ARKIM_ST
+// How many Bat Teeth/Wings were given
+// q1
+// Controls your own progress helping Arkim - Unused, might give place to some real quest later.
+// q2
+// Controls your own progress helping Arkim - Items today
+// q3
+// Controls your own progress helping Arkim - Your timer
+
+015-3,170,169,0 script Arkim NPC_TERRY,{
+ mesn;
+ mesq lg("Hello, young girl...", "Hello, young boy...");
+ next;
+
+L_Loop:
+ .@q1=getq(HurnscaldQuest_Arkim);
+ .@q3=getq3(HurnscaldQuest_Arkim);
+ mesn;
+ mesq l("I am doing a great research with Bats, and thus far I collected @@ Bat Wings and Teeths.", $ARKIM_ST);
+ next;
+ // It was yesterday
+ if (.@q3 < $@ARKIM_QTIMER) {
+ setq2 HurnscaldQuest_Arkim, 0;
+ setq3 HurnscaldQuest_Arkim, $@ARKIM_QTIMER;
+ }
+
+ // Daily limit reached
+ .@q2=getq2(HurnscaldQuest_Arkim);
+ if (.@q2 >= (BaseLevel-17)/3) goto L_Timer;
+ select
+ rif(countitem(BatWing) >= 1, l("Donate a Bat Wing")),
+ rif(countitem(BatTeeth) >= 1, l("Donate a Bat Teeth")),
+ l("I better leave this crazy man to his ordeals..."),
+ l("Had you any breakthrough?");
+ mes "";
+
+ switch (@menu) {
+ case 1:
+ delitem BatWing, 1;
+ getexp 25, 0;
+ Zeny=Zeny+50;
+ break;
+ case 2:
+ delitem BatTeeth, 1;
+ getexp 36, 0;
+ Zeny=Zeny+70;
+ break;
+ case 3:
+ close;
+ break;
+ case 4:
+ goto L_Research;
+ break;
+ }
+ $ARKIM_ST=$ARKIM_ST+1;
+ setq2 HurnscaldQuest_Arkim, .@q2+1;
+ goto L_Loop;
+
+L_Timer:
+ if (BaseLevel < 20)
+ mesc l("You need at least level 20 to help.");
+ mesn;
+ mesq l("You've helped me plenty. Please come back in @@", FuzzyTime($@ARKIM_TIMER+(60*60*24),2,2));
+ close;
+
+// TODO
+L_Research:
+ mesn;
+ mesq l("Let me see... The more Wings and Teethes I collect, the more my research shall advance.");
+ next;
+ select
+ l("Thanks."),
+ rif($ARKIM_ST >= 1400, l("Cursed Arrows")),
+ rif($ARKIM_ST >= 2800, l("Poison Arrows")),
+ rif($ARKIM_ST >= 1200, l("Piberries Infusion")),
+ rif($ARKIM_ST >= 2600, l("Fate's Potion")),
+ rif($ARKIM_ST >= 4000, l("Clotho Liquor")),
+ rif($ARKIM_ST >= 4700, l("Lachesis Brew")),
+ rif($ARKIM_ST >= 6600, l("Atropos Mixture")),
+ rif($ARKIM_ST >= 7500, l("Dark Desert Mushroom"));
+ mes "";
+ mesn;
+
+ switch (@menu) {
+ case 1:
+ mesq l("Good bye!");
+ close;
+ break;
+ case 2:
+ mesq l("The @@ are specially dangerous, and archers love them.", getitemlink(CursedArrow));
+ next;
+ mesn;
+ mesq l("These are being crafted by Alan.");
+ break;
+ case 3:
+ mesq l("The @@ are specially dangerous, and archers love them.", getitemlink(PoisonArrow));
+ next;
+ mesn;
+ mesq l("These are being crafted by Alan.");
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ mesq l("The @@ is a powerful healing drink.", getitemlink(PiberriesInfusion-4+@menu));
+ next;
+ mesn;
+
+ switch (@menu) {
+ case 4:
+ mesq l("@@ is developing these potions.", "Wyara"); break;
+ default:
+ mesq l("@@ is developing these potions.", "Jesusalva"); // TODO: Fate, Clotho, Lachesis and Atropos
+ break;
+ }
+
+ break;
+ case 9:
+ mesq l("Ah! @@. A very rare drop!", getitemlink(DarkDesertMushrooom));
+ next;
+ mesn;
+ mesq l("You can find it in the bandit market, but it is EXPENSIVE.");
+ break;
+
+ }
+ next;
+ goto L_Research;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ // No end; on purpose
+
+OnHour00:
+ $@ARKIM_QTIMER=santime();
+ $@ARKIM_TIMER=gettimetick(2);
+ end;
+
+}
diff --git a/npc/015-4/_import.txt b/npc/015-4/_import.txt
new file mode 100644
index 000000000..167d402da
--- /dev/null
+++ b/npc/015-4/_import.txt
@@ -0,0 +1,4 @@
+// Map 015-4: Woodland Mines
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/015-4/_mobs.txt",
+"npc/015-4/_warps.txt",
diff --git a/npc/015-4/_mobs.txt b/npc/015-4/_mobs.txt
new file mode 100644
index 000000000..7bd3f0cdc
--- /dev/null
+++ b/npc/015-4/_mobs.txt
@@ -0,0 +1,6 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-4: Woodland Mines mobs
+015-4,49,25,35,12 monster Angry Bat 1194,15,60000,60000
+015-4,56,36,35,12 monster Silk worm 1034,15,60000,70000
+015-4,72,23,15,15 monster Red Slime 1092,4,60000,60000
+015-4,54,21,29,14 monster Ruby Bif 1099,1,90000,90000
diff --git a/npc/015-4/_warps.txt b/npc/015-4/_warps.txt
new file mode 100644
index 000000000..40f118d93
--- /dev/null
+++ b/npc/015-4/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 015-4: Woodland Mines warps
+015-4,50,39,0 warp #015-4_50_39 0,0,015-1,90,50
+015-4,76,18,0 warp #015-4_76_18 0,0,015-1,177,55
diff --git a/npc/016-1/_import.txt b/npc/016-1/_import.txt
new file mode 100644
index 000000000..1a7b25d8d
--- /dev/null
+++ b/npc/016-1/_import.txt
@@ -0,0 +1,6 @@
+// Map 016-1: La Marine First Deck
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/016-1/_mobs.txt",
+"npc/016-1/captain.txt",
+"npc/016-1/doors.txt",
+"npc/016-1/laranja.txt",
diff --git a/npc/016-1/_mobs.txt b/npc/016-1/_mobs.txt
new file mode 100644
index 000000000..621c46039
--- /dev/null
+++ b/npc/016-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 016-1: La Marine First Deck mobs
+016-1,31,26,9,4 monster Piou 1002,2,30000,20000
diff --git a/npc/016-1/captain.txt b/npc/016-1/captain.txt
new file mode 100644
index 000000000..f05826428
--- /dev/null
+++ b/npc/016-1/captain.txt
@@ -0,0 +1,157 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Temporary, placeholder.
+
+016-1,19,29,0 script Captain NPC_NARD,{
+ .@price=2000;
+ if (BaseLevel < 20)
+ goto L_TooWeak;
+
+ mesn;
+ mesq l("Hi @@.", strcharinfo(0));
+ next;
+ mesq l("You are currently at @@.", LOCATION$);
+ mes "";
+
+ menu
+ rif(LOCATION$ != "Tulim", l("To Tulimshar.")), L_TTulim,
+ rif(LOCATION$ != "Hurns", l("To Hurnscald.")), L_THurns,
+ l("No, I'll save my money."), -;
+
+ close;
+
+L_THurns:
+ .@x=reputation("Hurns");
+
+ if (.@x >= 5)
+ .@price-=1750;
+ else if (.@x >= 4)
+ .@price-=1600;
+ else if (.@x >= 3)
+ .@price-=1200;
+ else if (.@x >= 2)
+ .@price-=800;
+ else if (.@x >= 1)
+ .@price-=400;
+
+ mes "";
+ mesn;
+ mesq l("It'll cost you @@ GP.", .@price);
+ mes "";
+
+ if (Zeny < .@price) {
+ mes l("You still need @@ GP to afford it.", (.@price-Zeny));
+ close;
+ }
+
+ if (askyesno() != ASK_YES)
+ close;
+
+ Zeny=Zeny-.@price;
+ PC_DEST$="Hurns";
+
+ mes "";
+ mesn;
+ mesq l("Hurnscald? Small farming towns are always nice to visit.");
+ next;
+ mesq l("I was planning to go there soon, anyway. All aboard!");
+ close2;
+ addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
+ @timer_navio_running = 1;
+ warp "016-6", 40, 32;
+
+ // 10% base chance of Pirate Attack!
+ // Each level INCREASES this in 0.1%.
+ // So for a level 40 player, chances are 14%.
+ if (rand(1, 10000) < 1000+(BaseLevel*10))
+ addtimer rand(3000,6000), "#MarineShipAttack::OnEvent";
+ end;
+
+
+
+
+
+
+
+
+L_TTulim:
+ .@x=reputation("Tulim");
+
+ if (.@x >= 12)
+ .@price-=1750;
+ else if (.@x >= 10)
+ .@price-=1500;
+ else if (.@x >= 8)
+ .@price-=1000;
+ else if (.@x >= 6)
+ .@price-=750;
+ else if (.@x >= 4)
+ .@price-=500;
+ else if (.@x >= 2)
+ .@price-=250;
+
+ mes "";
+ mesn;
+ mesq l("It'll cost you @@ GP.", .@price);
+ mes "";
+
+ if (Zeny < .@price) {
+ mes l("You still need @@ GP to afford it.", (.@price-Zeny));
+ close;
+ }
+
+ if (askyesno() != ASK_YES)
+ close;
+
+ Zeny=Zeny-.@price;
+ PC_DEST$="Tulim";
+ @timer_navio_running = 1;
+
+ mes "";
+ mesn;
+ mesq l("Tulimshar, right? The oldest human city-state!");
+ next;
+ mesq l("I was planning to go there soon, anyway. All aboard!");
+ close2;
+ addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
+ @timer_navio_running = 1;
+ warp "016-6", 40, 32;
+
+ // 10% base chance of Pirate Attack!
+ // Each level INCREASES this in 0.1%.
+ // So for a level 40 player, chances are 14%.
+ if (rand(1, 10000) < 1000+(BaseLevel*10))
+ addtimer rand(3000,6000), "#MarineShipAttack::OnEvent";
+ end;
+
+L_TooWeak:
+ mesn;
+ mesq l("The sea route I take is very dangerous, and full of pirates. You're too weak to travel with me.");
+ close;
+
+L_Close:
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+
+OnInterIfInit:
+ // Tulim Instance
+ .TULIM_INSTID = instance_create("016-1@TulimInst", 0, IOT_NONE);
+ instance_attachmap("016-1", .TULIM_INSTID, 0, "016-1@Tulim");
+ instance_set_timeout(1000000, 1000000, .TULIM_INSTID);
+ instance_init(.TULIM_INSTID);
+
+ // Hurns Instance
+ .HURNS_INSTID = instance_create("016-1@HurnsInst", 0, IOT_NONE);
+ instance_attachmap("016-1", .HURNS_INSTID, 0, "016-1@Hurns");
+ instance_set_timeout(1000000, 1000000, .HURNS_INSTID);
+ instance_init(.HURNS_INSTID);
+ end;
+
+}
diff --git a/npc/016-1/doors.txt b/npc/016-1/doors.txt
new file mode 100644
index 000000000..2e947aaac
--- /dev/null
+++ b/npc/016-1/doors.txt
@@ -0,0 +1,22 @@
+// TMW2 Scripts.
+// Author:
+// Jesusalva
+// Description:
+// La Marine ship Doors NPCs.
+
+016-1,21,25,0 script #MarineToOutside NPC_HIDDEN,0,0,{
+
+OnTouch:
+ if (LOCATION$ == "Hurns") {
+ warp "012-1", 156, 65;
+ close;
+ }
+ if (LOCATION$ == "Tulim") {
+ warp "003-1", 119, 25;
+ close;
+ }
+ mesc l("Oh noes! The door is locked!! Quick! Call a GM!!!"), 1;
+ close;
+}
+
+
diff --git a/npc/016-1/laranja.txt b/npc/016-1/laranja.txt
new file mode 100644
index 000000000..66d692e43
--- /dev/null
+++ b/npc/016-1/laranja.txt
@@ -0,0 +1,74 @@
+// TMW2 Script
+// Author:
+// Saulc
+// Description:
+// Laranja, orange in portuges is a orange dye seller in ship
+
+016-1,25,24,0 script Laranja NPC_F_SHOPKEEPER,{
+
+ mesn;
+ mesq l("I'm Laranja.");
+ next;
+ mesn;
+ mesq l("My father lead a dye fabric, I'm in charge to sell @@ around the world.", getitemlink(OrangeDye));
+ next;
+ mesn;
+ mesq l("Would you like to buy some?");
+ mes "";
+ menu
+ l("Yeah sure let's Trade."), -,
+ l("Sorry another day maybe."), L_Close;
+
+ // Restock shop if needed (ULTRA EXPERIMENTAL)
+ // It won't work if instance_id() is 0, but that should be Nard@Candor.
+ if (instance_id()) {
+ if ('day != gettime(5)) {
+ 'day=gettime(5);
+ restoreshopitem OrangeDye, -1, 3;
+ }
+ }
+
+ closedialog;
+ shop instance_npcname(.name$);
+ close;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ShortTankTop);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 9);
+
+ .sex = G_FEMALE;
+ .distance = 4;
+ tradertype(NST_MARKET);
+
+ sellitem OrangeDye, -1, 3;
+ end;
+
+OnInstanceInit:
+ .@npcId = getnpcid(0, instance_npcname(.name$));
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, ShortTankTop);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 9);
+ tradertype(NST_MARKET);
+
+ sellitem OrangeDye, -1, 3;
+ 'day=gettime(5);
+ end;
+
+OnClock2000:
+ restoreshopitem OrangeDye, -1, 3;
+ end;
+
+}
diff --git a/npc/016-6/_import.txt b/npc/016-6/_import.txt
new file mode 100644
index 000000000..62a745b54
--- /dev/null
+++ b/npc/016-6/_import.txt
@@ -0,0 +1,5 @@
+// Map 016-6: Ocean
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/016-6/_mobs.txt",
+"npc/016-6/main.txt",
+"npc/016-6/mapflags.txt",
diff --git a/npc/016-6/_mobs.txt b/npc/016-6/_mobs.txt
new file mode 100644
index 000000000..28a26990c
--- /dev/null
+++ b/npc/016-6/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 016-6: Ocean mobs
+016-6,38,32,14,2 monster Ocean Croc 1133,4,36000,30000
diff --git a/npc/016-6/main.txt b/npc/016-6/main.txt
new file mode 100644
index 000000000..73f996f69
--- /dev/null
+++ b/npc/016-6/main.txt
@@ -0,0 +1,54 @@
+// TMW2 script
+// Originals from TMW-BR
+// Imported by Jesusalva
+
+016-6,0,0,0 script #MarineShip NPC_HIDDEN,117,29,{
+ end;
+
+OnEvent:
+ // Handle travel
+ if (@timer_navio_running == 0) end;
+ if (PC_DEST$ == "Hurns") goto L_Hurns;
+ else if (PC_DEST$ == "Tulim") goto L_Tulim;
+ else goto L_Error;
+ end;
+
+L_Hurns:
+ PC_DEST$ = "";
+ LOCATION$ = "Hurns";
+ @timer_navio_running = 0;
+ warp "012-1", 156, 65;
+ message strcharinfo(0), l("@@ disembarks at Hurnscald.", strcharinfo(0));
+ goto L_CleanUp;
+
+L_Tulim:
+ PC_DEST$ = "";
+ LOCATION$ = "Tulim";
+ @timer_navio_running = 0;
+ warp "003-1", 119, 25;
+ message strcharinfo(0), l("@@ disembarks at Tulimshar.", strcharinfo(0));
+ goto L_CleanUp;
+
+L_Error:
+ debugmes "ERROR: PLAYER INVALID PC_DEST ON #MarineShip: " + PC_DEST$;
+ PC_DEST$ = "";
+ @timer_navio_running = 0;
+ warp "000-1", 22, 22;
+ dispbottom l("An error on your travel happened. Please report.");
+ goto L_CleanUp;
+
+L_CleanUp:
+ // Clean up pirate ship, if needed.
+ if (mobcount("016-7", "#MarineShipAttack::OnPirateDie") && !getmapusers("016-7")) {
+ killmonster("016-7", "All");
+ }
+ if (mobcount("016-7", "#MarineShipAttack::OnVictory") && !getmapusers("016-7")) {
+ killmonster("016-7", "All");
+ }
+ if (mobcount("016-7", "#MarineShipAttack::OnVictory") > 1) {
+ killmonster("016-7", "#MarineShipAttack::OnVictory");
+ monster "016-7", 38, 27, "Pirate Captain", OceanPirate, "#MarineShipAttack::OnVictory";
+ }
+ end;
+}
+
diff --git a/npc/016-6/mapflags.txt b/npc/016-6/mapflags.txt
new file mode 100644
index 000000000..27a1ef2a8
--- /dev/null
+++ b/npc/016-6/mapflags.txt
@@ -0,0 +1 @@
+016-6 mapflag zone ship
diff --git a/npc/016-7/_import.txt b/npc/016-7/_import.txt
new file mode 100644
index 000000000..45f28eecd
--- /dev/null
+++ b/npc/016-7/_import.txt
@@ -0,0 +1,5 @@
+// Map 016-7: Pirate Attack
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/016-7/_mobs.txt",
+"npc/016-7/main.txt",
+"npc/016-7/mapflags.txt",
diff --git a/npc/016-7/_mobs.txt b/npc/016-7/_mobs.txt
new file mode 100644
index 000000000..b5b9691e9
--- /dev/null
+++ b/npc/016-7/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 016-7: Pirate Attack mobs
+016-7,37,29,14,4 monster Ocean Croc 1133,6,36000,30000
diff --git a/npc/016-7/main.txt b/npc/016-7/main.txt
new file mode 100644
index 000000000..cb3332e21
--- /dev/null
+++ b/npc/016-7/main.txt
@@ -0,0 +1,50 @@
+// TMW2 script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Handles pirate attacks
+
+016-7,0,0,0 script #MarineShipAttack NPC_HIDDEN,117,29,{
+ end;
+
+OnEvent:
+ warp "016-7", 31, 33;
+ dispbottom l("##1The ship is under a pirate's attack! ##BKill all or survive!");
+ addtimercount "#MarineShip::OnEvent", 10000;
+ addtimer 2000, "#MarineShipAttack::OnStart";
+ end;
+
+OnStart:
+ // Define number of pirates based on player level.
+ // Player count is not important here, as this is run for every player.
+ .@c=(BaseLevel/15);
+ areamonster "016-7", 23, 25, 51, 30, strmobinfo(1, OceanPirate), OceanPirate, .@c, "#MarineShipAttack::OnPirateDie";
+ end;
+
+OnPirateDie:
+ addtimercount "#MarineShip::OnEvent", 5000;
+ if (!mobcount("016-7", "#MarineShipAttack::OnPirateDie")) {
+ addtimercount "#MarineShip::OnEvent", 15000;
+ mapannounce "016-7", l("The pirate ship captain appear! TAKE CARE!!"), bc_map;
+ monster "016-7", 38, 27, "Pirate Captain", OceanPirate, 1, "#MarineShipAttack::OnVictory";
+ }
+ end;
+
+OnVictory:
+ areatimer("016-7", 23, 25, 52, 35, 10, "#MarineShipAttack::OnReward");
+ end;
+
+OnReward:
+ // That would give 10% from missing exp, but I didn't like it.
+ //getexp ((NextBaseExp-BaseExp)/10), 0;
+
+ // Lv 40 rewards: 400 exp, 40 jxp, 200~600 GP
+ getexp BaseLevel*10, BaseLevel;
+ Zeny=Zeny+BaseLevel*rand(5,15);
+ dispbottom l("Congratulations!");
+ if (isin("016-7", 23, 25, 52, 35))
+ warp "016-6", 31, 33;
+ end;
+}
+
diff --git a/npc/016-7/mapflags.txt b/npc/016-7/mapflags.txt
new file mode 100644
index 000000000..ddc0c014b
--- /dev/null
+++ b/npc/016-7/mapflags.txt
@@ -0,0 +1 @@
+016-7 mapflag nosave 000-1,22,22
diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt
new file mode 100644
index 000000000..a1f0b24d5
--- /dev/null
+++ b/npc/017-1/_import.txt
@@ -0,0 +1,14 @@
+// Map 017-1: Land Of Fire Village
+// 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/guards.txt",
+"npc/017-1/mapflags.txt",
+"npc/017-1/misc.txt",
+"npc/017-1/nowhere_man.txt",
+"npc/017-1/paxel.txt",
+"npc/017-1/roger.txt",
+"npc/017-1/shops.txt",
+"npc/017-1/signs.txt",
+"npc/017-1/soul-menhir.txt",
+"npc/017-1/wateranimation.txt",
diff --git a/npc/017-1/_mobs.txt b/npc/017-1/_mobs.txt
new file mode 100644
index 000000000..7031407db
--- /dev/null
+++ b/npc/017-1/_mobs.txt
@@ -0,0 +1,6 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-1: Land Of Fire Village mobs
+017-1,105,129,75,76 monster Cyan Butterfly 1172,40,30000,30000
+017-1,125,69,103,47 monster Squirrel 1032,25,30000,30000
+017-1,123,176,103,58 monster Living Potato 1181,36,30000,30000
+017-1,128,122,108,114 monster Alizarin Plant 1188,15,45000,45000
diff --git a/npc/017-1/_warps.txt b/npc/017-1/_warps.txt
new file mode 100644
index 000000000..fd5afaa64
--- /dev/null
+++ b/npc/017-1/_warps.txt
@@ -0,0 +1,13 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-1: Land Of Fire Village warps
+017-1,180,193,0 warp #017-1_180_193 0,0,018-2,63,105
+017-1,152,224,0 warp #017-1_152_224 0,0,018-1,32,68
+017-1,119,60,0 warp #017-1_119_60 0,0,017-2,41,30
+017-1,219,91,0 warp #017-1_219_91 0,0,014-4,95,33
+017-1,55,143,0 warp #017-1_55_143 2,0,017-3,32,44
+017-1,150,87,0 warp #017-1_150_87 0,0,017-4,27,41
+017-1,155,87,0 warp #017-1_155_87 0,0,017-4,35,41
+017-1,133,155,0 warp #017-1_133_155 0,0,017-5,23,33
+017-1,37,140,0 warp #017-1_37_140 0,1,017-6,29,43
+017-1,37,155,0 warp #017-1_37_155 0,1,017-6,29,52
+017-1,37,132,0 warp #017-1_37_132 0,1,017-6,29,31
diff --git a/npc/017-1/guards.txt b/npc/017-1/guards.txt
new file mode 100644
index 000000000..b5606c5fe
--- /dev/null
+++ b/npc/017-1/guards.txt
@@ -0,0 +1,80 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Protect LoF
+
+// Handle Guard's logic
+function script LofGuard {
+ mesn;
+ mesq l("I am stationed here to protect Land Of Fire from monsters.");
+ next;
+ mesn;
+ mesq l("I mean, there's even an Monster King? What sort of world is this?!");
+ close;
+ return;
+}
+
+017-1,79,43,0 script Guard#lof-1 NPC_GUARD2,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+017-1,220,44,0 script Guard#lof-2 NPC_GUARD1,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+017-1,193,69,0 script Guard#lof-3 NPC_GUARD2,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+017-1,69,108,0 script Guard#lof-4 NPC_GUARD1,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+017-1,90,149,0 script Guard#lof-5 NPC_GUARD1,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+
+017-1,85,223,0 script Guard#lof-6 NPC_GUARD2,{
+ LofGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/017-1/mapflags.txt b/npc/017-1/mapflags.txt
new file mode 100644
index 000000000..08b13a3fe
--- /dev/null
+++ b/npc/017-1/mapflags.txt
@@ -0,0 +1,2 @@
+017-1 mapflag town
+017-1 mapflag nopenalty
diff --git a/npc/017-1/misc.txt b/npc/017-1/misc.txt
new file mode 100644
index 000000000..0cd181b7c
--- /dev/null
+++ b/npc/017-1/misc.txt
@@ -0,0 +1,229 @@
+// TMW2/LoF scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Essential scripts any city must have
+
+// Description:
+// The Travelers travel around the world telling stories.
+017-1,144,204,0 script Elen The Traveler NPC_F_COINKEEPER,{
+
+ mesn;
+ if (strcharinfo(0) == $MOST_HEROIC$) mesq l("Wow! Are you @@? Everyone, in every city, talks about you!", $MOST_HEROIC$);
+ if (strcharinfo(0) == $MOST_HEROIC$) next;
+
+ mesq l("Hello. I am @@, and I am from a family of travellers. We travel though the whole world, looking for exotic goods.", .name$);
+ next;
+ mesq l("You can buy rare items with me, or I can tell you about different cities in our world.");
+
+L_Menu:
+ mes "";
+ menu
+ l("I want to trade with you."), L_Trade,
+ l("Tell me about Tulimshar."), L_Tulim,
+ l("Tell me about Hurnscald."), L_Hurns,
+ l("Tell me about Nivalis."), L_Nival,
+ l("Tell me about Esperia."), L_Esper,
+ l("Tell me about Artis."), L_Artis,
+ l("Tell me about Frostia."), L_Frost,
+ l("Tell me about Halinarzo."), L_Halin,
+ l("Sorry, I'll pass."), L_Close;
+
+L_Tulim:
+ mes "";
+ mesn;
+ mesq l("Tulimshar is the oldest human city, and its foundation is the year zero of our calendar.");
+ next;
+ mesq l("The city only flourished because Janett Platinum had the idea to build city walls surrounding this city.");
+ next;
+ mesq l("The desert climate means you'll find mostly maggots and scorpions. Their drops include cactus drinks, cake, knifes, black pearls, gold, and other common things.");
+ next;
+ mesq l("You can find for a good price desert equipment and some kind of dyes. You find all sort of crafters, artisans and warriors here.");
+ next;
+ goto L_Menu;
+
+L_Hurns:
+ mes "";
+ mesn;
+ mesq l("Hurnscald was founded after Tulimshar, in more fertile lands. Their walls are not so sturdy as the ones of Tulimshar.");
+ next;
+ mesq l("Under the leadership of King Wusher, they were the first to accept immigrants from other races. You will find humans and non-humans there.");
+ next;
+ mesq l("The fertile climate is ideal for mushrooms. You can also find lots of wood.");
+ next;
+ mesq l("Their economy provide many edible items and potions.");
+ next;
+ goto L_Menu;
+
+L_Nival:
+ mes "";
+ mesn;
+ mesq l("Nivalis was the last human settlement built during the First Era.");
+ next;
+ mesq l("It's cold, harsh climate makes difficult to live there. It was founded by people thrown away from Tulimshar and Hunrscald for political reasons.");
+ next;
+ mesq l("The cold climate is ideal for slimes, penguins, and other icy creatures. You can find lots of... ice, of course!");
+ next;
+ mesq l("Some items are only produced in Nivalis. After all, it is hard to work properly with ice in a desert!");
+ next;
+ goto L_Menu;
+
+
+L_Esper:
+ mes "";
+ mesn;
+ mesq l("Esperia is the human capital founded at the other continent.");
+ next;
+ mesq l("After the Great Famine which happened after the Red Queen death, it was founded by people who sailed away in look of new opportunities.");
+ next;
+ mesq l("It offers better living conditions than Tulimshar, and is bigger and more prosperous. Few monsters live there.");
+ next;
+ mesq l("However, taxes there are the highest. Living cost is high, and you should avoid buying things there.");
+ next;
+ goto L_Menu;
+
+L_Artis:
+ mes "";
+ mesn;
+ mesq l("Artis is a city port founded after the Great Famine on the other continent.");
+ next;
+ mesq l("People say it is the second biggest city from the world.");
+ next;
+ mesq l("Different kind of monsters live near the city. For example, blubs. I have no idea of what are those.");
+ next;
+ mesq l("People usually dock there when travelling to the second continent. Nothing exceptional about economy.");
+ next;
+ goto L_Menu;
+
+
+L_Frost:
+ mes "";
+ mesn;
+ mesq l("Frostia is the only city known that was not founded by humans.");
+ next;
+ mesq l("They are strict with who is allowed inside, so you'll need either elf or ukar friends to pass.");
+ next;
+ mesq l("It is on a huge, icy mountain peak. Rumors about dragons and legendary items to be found.");
+ next;
+ mesq l("Some of finest elven craftmanship can be found there, like bows, for example.");
+ next;
+ goto L_Menu;
+
+L_Halin:
+ mes "";
+ mesn;
+ mesq l("Halinarzo was founded to explore Mana Stones.");
+ next;
+ mesq l("You can find both huge swamps, as huge desertic areas near and on it.");
+ next;
+ mesq l("Lizards are the main monster found, and they steal gold from innocent bypassers.");
+ next;
+ mesq l("Without any mana stone left, and because the walls were not very strong, most of the city was destroyed.");
+ next;
+ mesq l("Unlike many other cities, if you want people in eternal need of items, there is a good place to look.");
+ next;
+ goto L_Menu;
+
+
+L_Trade:
+ mesn;
+ mesq l("Use your @@ as currency!", getitemlink(StrangeCoin));
+ next;
+ openshop "Aeros Trader";
+ closedialog;
+
+L_Close:
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, UglyChristmasSweater);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts);
+ setunitdata(.@npcId, UDT_WEAPON, CandorBoots); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 27);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 11);
+ npcsit;
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+// Description:
+// Banker.
+017-3,85,41,0 script Stalman NPC_LLOYD,{
+ Banker(.name$, "Land Of Fire Village", 14000);
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+// Description:
+// Barber.
+
+017-1,147,176,0 script Milocat NPC_ELVEN_FEMALE_ARMOR_SHOP,{
+ function setRace {
+ clear;
+ setnpcdialogtitle l("Debug - Modify Race");
+ mes l("Race") + ": " + $@allraces$[Class];
+ next;
+ mes l("Please select the desired race.");
+ select("Human:Ukar:Redy:Elf:Orc:Raijin:Tritan");
+ jobchange max(0, @menu-1);
+ return;
+ }
+
+
+ mesn;
+ mesq l("Hi! Do you want a hair cut?");
+
+ 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?"),
+ rif(is_staff(), l("I am a GM, and I want to change my Race!")),
+ l("I'm fine for now, thank you.");
+
+ switch (@menu)
+ {
+ case 1:
+ BarberSayStyle 3;
+ 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:
+ setRace;
+ break;
+ case 5:
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Feel free to come visit me another time.");
+
+ goodbye;
+ }
+ } while (1);
+ close;
+
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
diff --git a/npc/017-1/nowhere_man.txt b/npc/017-1/nowhere_man.txt
new file mode 100644
index 000000000..154edb0dc
--- /dev/null
+++ b/npc/017-1/nowhere_man.txt
@@ -0,0 +1,108 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Pachua's Cousin. On LoF/TMWA he also crafted Iron Powder, Sulfur Powder, and Yellow Powder (for magic)
+// IMPORTANT @Saulc : DO NOT GIVE ANY EXPERIENCE ON THIS NPC.
+// This is sort of a bet, you know. “Go hunt Mountain Snakes”, or bet some precious
+// crafting material on this NPC. Two choices. The easy way is RISKY, not REWARDING.
+// The refund is the exact fair price, retrieved from database. The only "loss" here
+// is that you would rather do something else with Leather Patch but instead, you "sold" it.
+// If you sell items you don't get experience, so you shouldn't get any exp here either.
+//
+// This NPC could as well do Jeans Shorts, but I'm too lazy to calculate formula now.
+// The price is Cave Snake Skin in proportion to Jean Shorts rarity, and cost in proportion
+// to sell price difference.
+
+017-1,155,162,0 script Nowhere Man NPC_KAYLO,{
+ mesn;
+ mesq l("Welcome! I come from nowhere, and my family hunt Snakes. We also make fine leather items from their skin!");
+ next;
+ mesn;
+ mesq l("Next time an annoying snake refuses to drop their precious leather drops, come talk to us!");
+ // 160 * 1 = 160 GP vs 500 GP (340 GP)
+ mesq l("And if you bring me 1 @@ and 440 GP, I can make a @@ for you.", getitemlink(SnakeSkin), getitemlink(LeatherPatch));
+ next;
+ select
+ l("Nice to know. I'll come to you when random numbers try to kill me."),
+ rif(countitem(SnakeSkin) >= 1 && Zeny >= 440, l("I want Leather Patch"));
+
+ switch (@menu) {
+ case 2:
+ inventoryplace LeatherPatch, 1;
+ delitem SnakeSkin, 1;
+ Zeny=Zeny-440;
+ getitem LeatherPatch, 1;
+ mesn;
+ mesq l("Many thanks!");
+ break;
+ }
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+
+
+017-1,174,169,0 script Nowhere Jeane NPC_SAMANTHA,{
+ mesn;
+ // 95 * 2 = 190 GP vs 400 GP (210 GP)
+ mesq l("If you bring me 2 @@ and 210 GP, I can make a @@ for you.", getitemlink(CaveSnakeSkin), getitemlink(JeansShorts));
+ next;
+ select
+ l("Nice to know. I'll come to you when random numbers try to kill me."),
+ rif(countitem(CaveSnakeSkin) >= 2 && Zeny >= 210, l("I want it."));
+
+ switch (@menu) {
+ case 2:
+ inventoryplace JeansShorts, 1;
+ delitem CaveSnakeSkin, 2;
+ Zeny=Zeny-210;
+ getitem JeansShorts, 1;
+ mesn;
+ mesq l("Many thanks!");
+ break;
+ }
+ close;
+
+
+OnInit:
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+
+}
+
+
+017-1,143,161,0 script Nowhere Gluvine NPC_SERENA,{
+ mesn;
+ // 320 * 6 = 1920 GP vs 450 GP (-)
+ mesq l("If you bring me 6 @@ I can make a @@ for you.", getitemlink(MountainSnakeSkin), getitemlink(LeatherGloves));
+ next;
+ select
+ l("Nice to know. I'll come to you when random numbers try to kill me."),
+ rif(countitem(MountainSnakeSkin) >= 6, l("I want it."));
+
+ switch (@menu) {
+ case 2:
+ inventoryplace LeatherGloves, 1;
+ delitem MountainSnakeSkin, 6;
+ getitem LeatherGloves, 1;
+ mesn;
+ mesq l("Many thanks!");
+ break;
+ }
+ close;
+
+
+OnInit:
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+
+}
+
diff --git a/npc/017-1/paxel.txt b/npc/017-1/paxel.txt
new file mode 100644
index 000000000..93bd5790b
--- /dev/null
+++ b/npc/017-1/paxel.txt
@@ -0,0 +1,185 @@
+// TMW2/LoF Script
+// This is from LoF Forums, to replace LoF Paxel
+//----------------------------------------------------
+// PRSM Helmet quest (seasonal quest)
+// Create Quest: Darlord (Depredador)
+//----------------------------------------------------
+
+// Old Paxel turned Raw Coal in Coal... But we don't have Raw Coal.
+// He probably used the nice furnace NPC too... We will need another NPC to use that...
+
+017-1,131,22,0 script Paxel NPC_PLAYER,{
+ .@q=getq(SQuest_Paxel);
+ if(.@q == 2) goto L_Done;
+ if (season() != SEASON_SPRING && !$@GM_OVERRIDE) goto L_OutOfSeason;
+ if(.@q == 1) goto L_Ask2;
+
+ if (BaseLevel >= 60) goto L_Ask1;
+
+L_OutOfSeason:
+ mesn;
+ mesq l("Hello! Calm wind today!");
+ menu
+ l("Yes, but I like windy days."), L_Wind,
+ l("Hmm... sorry but gotta go..."), L_Go;
+ close;
+
+L_Go:
+ mesn;
+ mesq l("Ok, good trip then.");
+ close;
+
+L_Wind:
+ mesn;
+ mesq l("I don't like them, I can't fly straight.");
+ next;
+ mesn;
+ if (BaseLevel < 60)
+ mesq l("Well, not like you could understand that with your level! %%a");
+ else
+ mesq l("This is why I love spring!");
+ close;
+
+// ----------------------------------------------------
+// Desert Helmet quest start
+// ----------------------------------------------------
+L_Ask1:
+ mesn;
+ mesq l("Hello @@! Do you have some @@ with you?", strcharinfo(0), getitemlink(TerraniteOre));
+
+ menu
+ rif(countitem(TerraniteOre),l("Yes... right... what about Terranite Ore?")), L_Quest1,
+ rif(countitem(TerraniteOre),l("Yes, but I have grown attached to Terranite Ore...")), L_No,
+ l("Right, but now I have business in other places."), L_Rude;
+ close;
+
+L_Quest1:
+ mesn;
+ mesq l("Terranite Ore is a really special item. People without helmets can't understand @@'s real power, anyway if you could give me some of them you would understand why they are so special.", getitemlink(TerraniteOre));
+
+ menu
+ l("Certainly, you can have all my Terranite Ore."), L_Check1,
+ l("Sorry but I am not interested in that."), L_No;
+ close;
+
+L_No:
+ mesn;
+ mesq l("Ok, come back me when you want to know the @@ real power!", getitemlink(TerraniteOre));
+ close;
+
+L_Rude:
+ mesn;
+ mesq l("Well, good luck with your business.");
+ close;
+
+
+// ----------------------------------------------------
+// Arc 1: Terranite Ores
+// ----------------------------------------------------
+L_Check1:
+ if (countitem(TerraniteOre) < 12)
+ goto L_More_Needed1;
+
+ delitem TerraniteOre, 12;
+ getexp 15000, 150;
+ setq SQuest_Paxel, 1;
+ mesn;
+ mesq l("Perfect! you have enough Terranite Ore, I will take them for now but I need other items in order to bring them to life.");
+
+L_Ask2:
+ mesn;
+ mesq l("I need a suitable base helmet, some herbs to use my magical dye, and gold:");
+ mesc l("@@/1 @@", countitem(WarlordHelmet), getitemlink(WarlordHelmet));
+ mesc l("@@/100 @@", countitem(PinkAntenna), getitemlink(PinkAntenna));
+ mesc l("@@/?? @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mesc l("@@/@@ GP", format_number(Zeny), format_number(10000));
+
+ menu
+ l("Please have a look, I have what you asked"), L_Check2,
+ l("On my way to get what you need."), -;
+ close;
+
+
+// ----------------------------------------------------
+// Arc 2: Prsm Helmet
+// ----------------------------------------------------
+L_Check2:
+ if (countitem(PinkAntenna) < 100 || countitem(WarlordHelmet) < 1 || countitem(CobaltHerb) < 60)
+ goto L_More_Needed2;
+ if (Zeny < 10000) {
+ mesn;
+ mesq l("You can't afford my work! Do some odd jobs and come back.");
+ close;
+ }
+
+ inventoryplace PrsmHelmet, 1;
+ delitem PinkAntenna, 100;
+ delitem WarlordHelmet, 1;
+ delitem TerraniteOre, 20;
+ getexp 60000, 0;
+ getitem PrsmHelmet, 1;
+ setq SQuest_Paxel, 2;
+ mesn;
+ mesq l("There you go, a special and rare @@!", getitemlink(PrsmHelmet));
+ close;
+
+// ----------------------------------------------------
+// Failure: Insufficient material
+// ----------------------------------------------------
+L_More_Needed1:
+ mesn;
+ mesq l("Your @@ is not enough, please look for more.", getitemlink(TerraniteOre));
+ close;
+
+L_More_Needed2:
+ mesn;
+ mesq l("I am sorry but i can see that you don't have all that I asked you.");
+ next;
+ mesn;
+ mesq l("Please bring me that or I won't be able to make something really special for you.");
+ close;
+
+
+// ----------------------------------------------------
+// Quest complete
+// ----------------------------------------------------
+L_Done:
+ mesn;
+ mesq l("Hello winged friend! How is the wind today?");
+
+ menu
+ rif(season() == SPRING || $@GM_OVERRIDE, l("It's spring, when the wind is always good.")), L_Spring,
+ l("Calm, perfect for a fly!"), L_Fly,
+ l("Gale, not good to fly."), L_Wind2;
+ close;
+
+L_Fly:
+ mesn;
+ mesq l("Haha yes, you are right!");
+ close;
+
+L_Wind2:
+ mesn;
+ mesq l("Yep, I never fly in these days.");
+ close;
+
+// TODO: Maybe we can add something else here
+L_Spring:
+ mesn;
+ mesq l("Hahah, good to hear! Do you know some items are only dropped on spring? You should go after them!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, PrsmHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 24);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 14);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/017-1/roger.txt b/npc/017-1/roger.txt
new file mode 100644
index 000000000..0cd85da62
--- /dev/null
+++ b/npc/017-1/roger.txt
@@ -0,0 +1,178 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Part of George quest.
+// PS. (96,120) save these coordinates
+
+017-1,68,87,0 script Roger NPC_JOURNALMAN,{
+ .@q=getq(LoFQuest_George);
+ mesn;
+ mesq l("Paper! Paper! Get your copy of The Land of Fire Gazette here!");
+ next;
+ mesn;
+ mesq l("Hello @@, may I interest you in a copy of the Gazette? It's only 1 GP!", strcharinfo(0));
+ next;
+ menu
+ l("Yes, please."), L_GetRead,
+ l("No, thank you, kid."), L_TooBad,
+ l("Do you have anything else to read?"), L_ExtraRead;
+
+L_GetRead:
+ mesn;
+ mesq l("Let me see.....");
+ next;
+ if (.@q == 5)
+ goto L_LOF_NEWS;
+ mesq l("Oh yes, here you go, that will be 1 GP.");
+ if (Zeny < 1)
+ goto L_Poor;
+ Zeny = (Zeny-1);
+ mesc l("You are handed the Land of Fire Gazette. You look at the headline...");
+ mesc l("...but it is written in Mananese, a language you know nothing about.");
+ next;
+ mesc l("You toss the paper in the trash.");
+ close;
+
+L_TooBad:
+ mesn;
+ mesq l("Too bad, There is some really good news this week. Things like how to go to Candor for only 200GP.");
+ mesq l("And a special coupon section to get rare items for little or no money!");
+ next;
+ menu
+ l("I changed my mind, I think I would like a copy!"), L_GetRead,
+ l("That's ok, kid... I can't read, anyway."), L_TooBadTwo;
+
+L_TooBadTwo:
+ mesn;
+ mesq l("Too bad, you're really missing out!");
+ close;
+
+L_ExtraRead:
+ mesn;
+ mesq l("Now that you ask....");
+ next;
+ if (.@q == 5)
+ goto L_MadMag;
+ mesn;
+ mesq l("I might be able to get you a rare copy of the Maritime Almanac Scroll. A yearly publication for seafaring men.");
+ mesq l("It is very hard to come by, however, my father has a copy he might sell to you for the right price.");
+ menu
+ l("I will trade you a Dagger and Sailor's Hat for it."), L_BadOffer1,
+ l("I will pay you 5,000 GP in pure gold for it!"), L_BadOffer2,
+ l("I can give you a rare...(cough, cough).. Mouboo Figurine for it."), L_Success,
+ l("I have no interest in things such as that."), -;
+ close;
+
+L_Success:
+ .@q2=getq2(LoFQuest_George);
+ if (.@q2 == 1)
+ goto L_HaveScroll;
+ if (countitem(MoubooFigurine) < 1)
+ goto L_NoMouboo;
+ if (countitem(SailorHat) == 0)
+ goto L_StatNone;
+ mesn;
+ mesq l("This is great! My collection of rare figurines is now complete.");
+ next;
+ mesn;
+ mesq l("I asked my father and he agreed to trade it to you, so here is the last copy of the Maritime Almanac Scroll.");
+ /*
+ //TODO: Add the ScrollOfPaper or the AlmanacScroll to finish this quest
+ inventoryplace FireScroll, 1;
+ delitem MoubooFigurine, 1;
+ getitem FireScroll, 1;
+ setq2 LoFQuest_George, 1;
+ */
+ close;
+
+L_BadOffer1:
+ mesn;
+ mesq l("Wow, a Dagger and a Sailor's Hat!");
+ next;
+ mesn;
+ mesq l("Although I really want the Sailor's Hat, but daggers are dangerous for kids to play with.");
+ mesq l("Besides that, do I look like a warrior to you? Why would you give a kid a sharp dagger?");
+ close;
+
+L_BadOffer2:
+ mesn;
+ mesq l("5000 GP? That sure is a lot of gold...");
+ mesq l("but I was hoping for something more valuable. No, thanks.");
+ close;
+
+L_NoMouboo:
+ mesn;
+ mesq l("You said you would trade a real Mouboo Figurine, but now I see you don't have one. Come back when you do.");
+ close;
+
+L_StatNone:
+ mesq l("You might have the Mouboo Figurine, but I don't trust everyone.");
+ if(.@q >= 3)
+ goto L_ShowHat;
+ mesq l("My friend George is much older than I am, go see him and if he trusts you, so will I.");
+ if (.@q < 2)
+ setq LoFQuest_George, 1;
+ close;
+
+L_ShowHat:
+ mesn;
+ mesq l("I heard you have met my good friend George, and you gave him some items that he needed...");
+ next;
+ mesn;
+ mesq l("Didn't he give you anything?");
+ next;
+ mesn;
+ mesq l("If you could show me what he gave you, I might trust you.");
+ close;
+
+L_MadMag:
+ mesn;
+ mesq l("I have my favorite book of all times, Moby Dick. Let me read some of it to you....");
+ next;
+ mesc l("Roger begins to read.");
+ mesn;
+ mesq l("Towards thee I roll, thou all-destroying but unconquering whale; to the last I grapple with thee; from hell’s heart I stab at thee; for hate’s sake I spit my last breath at thee. Sink all coffins and all hearses to one common pool! And since neither can be mine, let me then tow to pieces, while still chasing thee, though tied to thee, thou damned whale! Thus, I give up the spear!"); // SORRY TRANSLATORS
+ next;
+ mesn;
+ mesq l("I don't really understand it either, but it's not for sale. Maybe you could come back later so I can read more of it to you.");
+ next;
+ mesn;
+ mesq l("Have a nice day!");
+ close;
+
+L_Poor:
+ mesn;
+ mesq l("You don't seem to have enough gold, not even 1 GP...you should really let go of some useless stuff on your inventory.");
+ close;
+
+L_LOF_NEWS:
+ mesn;
+ mesc l("Well I see that you have completed the George Quest!");
+ mesc l("I am actually surprised you clicked me again. Well then, here's the Land of Fire News...");
+ next;
+ mesc l("As you may know, LOF ran on a modified version of The Mana World game, before being merged on TMW2: Moubootaur Legends.");
+ mesc l("However, LoF admins and developers are working on a new game to offer a new experience for players.");
+ next;
+ mesc l("The project is involving only a small group of members, but would welcome anyone who knows how to assist in development.");
+ mesc l("You can always come to #devel on our Discord, or drop by #landoffire on IRC.");
+ next;
+ mesc l("You can also visit our website. And if you want to assist on this server (TMW2: ML), you're welcome too!");
+ mesc l("Oh, and about the Candor travel for 200 GP... Which would be a rare for little or no gold... Well, that's just an attention grabber.");
+ next;
+ mesc l("BUT you can reduce the travel price to everywhere, to as low as 250 GP, by completing QUESTS!");
+ mesc l("And some from the Grand Hunter Quests give you @@, which can be traded with the travelers for rares! Good luck!", getitemlink(StrangeCoin));
+ close;
+
+L_HaveScroll:
+ mesn;
+ mesq l("Looks like I already gave you the Maritime Almanac Scroll. You need to go see George again. I am unable to get another copy for you.");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-1/shops.txt b/npc/017-1/shops.txt
new file mode 100644
index 000000000..acf8ce7e2
--- /dev/null
+++ b/npc/017-1/shops.txt
@@ -0,0 +1,34 @@
+// TMW2/LoF scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Random Sellers
+
+017-1,158,184,0 script Billy NPC_M_SHOPKEEPER,{
+ shop .name$;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, any(ShortTankTop, CandorShirt, Chainmail));
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 9);
+
+ .sex = G_MALE;
+ .distance = 4;
+ tradertype(NST_MARKET);
+
+ sellitem YellowDye, -1, 1;
+ sellitem CottonCloth, -1, 3;
+ end;
+
+OnClock1250:
+OnClock0112:
+ restoreshopitem YellowDye, -1, 1;
+ restoreshopitem CottonCloth, -1, 3;
+ end;
+
+}
diff --git a/npc/017-1/signs.txt b/npc/017-1/signs.txt
new file mode 100644
index 000000000..badf3e4a6
--- /dev/null
+++ b/npc/017-1/signs.txt
@@ -0,0 +1,106 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Easier navigation on LoF Village
+
+// Main Signs
+017-1,71,96,0 script Northwest Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Unused House");
+ mesc l("→ Northeast Avenue");
+ mesc l("↓ Inn, Dimond's Cove");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+
+017-1,114,96,0 script Northeast Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Houses, Exit");
+ mesc l("← Northwest Avenue");
+ mesc l("→ Tech-User Forge");
+ mesc l("↓ Unused House, Market");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+
+017-1,114,147,0 script Southeast Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Houses, Soul Menhir");
+ mesc l("← Dimond's Cove");
+ mesc l("→ Market Place");
+ mesc l("↓ Houses, Lake Of Tears");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+
+
+
+017-1,71,147,0 script Southwest Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Inn, Houses, Northwest Avenue");
+ mesc l("← Dimond's Cove, Potion Maker");
+ mesc l("→ Market Place");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+
+// Misc signs
+017-1,71,110,0 script West Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Northwest Avenue");
+ mesc l("← Fire Breath Inn");
+ mesc l("↓ Southwest Avenue");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+017-1,114,63,0 script North Avenue#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("→ Transcendence Gate");
+ mesc l("↓ Northeast Avenue");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
+017-1,212,67,0 script Signpost#lof NPC_NO_SPRITE,{
+ mesn;
+ mesc l("↑ Town Hall, Noble District");
+ mesc l("← Land Of Fire Village");
+ mesc l("↓ Transcendence Gate");
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+ end;
+}
+
diff --git a/npc/017-1/soul-menhir.txt b/npc/017-1/soul-menhir.txt
new file mode 100644
index 000000000..74ad4f6d1
--- /dev/null
+++ b/npc/017-1/soul-menhir.txt
@@ -0,0 +1,20 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// Soul Menhir
+
+017-1,120,86,0 script Soul Menhir#lof NPC_SOUL_OLD,{
+ @map$ = "017-1";
+ setarray @Xs, 119, 120, 121, 119, 120, 121;
+ setarray @Ys, 87, 88, 87, 88, 87, 88;
+ @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/017-1/wateranimation.txt b/npc/017-1/wateranimation.txt
new file mode 100644
index 000000000..78389f2e1
--- /dev/null
+++ b/npc/017-1/wateranimation.txt
@@ -0,0 +1,23 @@
+// TMW2 scripts.
+// Author:
+// gumi
+// Reid
+// Saulc
+// Jesusalva
+// Description:
+// Water animations, splash, fishes, etc...
+
+017-1,109,223,0 script #Lof_WAM0 NPC_WATER_SPLASH,{
+
+ fishing; // begin or continue fishing
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 4;
+ end;
+}
+
+017-1,97,133,0 duplicate(#Lof_WAM0) #Lof_WAM1 NPC_WATER_SPLASH
+017-1,88,120,0 duplicate(#Lof_WAM0) #Lof_WAM2 NPC_WATER_SPLASH
+
diff --git a/npc/017-2-1/_import.txt b/npc/017-2-1/_import.txt
new file mode 100644
index 000000000..8b1633271
--- /dev/null
+++ b/npc/017-2-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 017-2-1: Jack's Basement
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/017-2-1/_mobs.txt",
+"npc/017-2-1/_warps.txt",
diff --git a/npc/017-2-1/_mobs.txt b/npc/017-2-1/_mobs.txt
new file mode 100644
index 000000000..e51f666ad
--- /dev/null
+++ b/npc/017-2-1/_mobs.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-2-1: Jack's Basement mobs
+017-2-1,62,83,5,6 monster Small Emerald Bif 1104,1,45000,45000
+017-2-1,73,61,54,42 monster Dark Lizard 1051,36,25000,25000
+017-2-1,49,71,40,58 monster Red Slime 1092,29,45000,45000
diff --git a/npc/017-2-1/_warps.txt b/npc/017-2-1/_warps.txt
new file mode 100644
index 000000000..e93922726
--- /dev/null
+++ b/npc/017-2-1/_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-1: Jack's Basement warps
+017-2-1,121,115,0 warp #017-2-1_121_115 0,0,017-2,31,29
+017-2-1,27,127,0 warp #017-2-1_27_127 0,0,018-3,114,24
diff --git a/npc/005-5-2/_warps.txt b/npc/017-2/_import.txt
index c8ee78246..9c2f5c724 100644
--- a/npc/005-5-2/_warps.txt
+++ b/npc/017-2/_import.txt
@@ -1,2 +1,3 @@
+// Map 017-2: Jack's House
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Map 005-5-2: Merchant Guild warps
+"npc/017-2/_warps.txt",
diff --git a/npc/017-2/_warps.txt b/npc/017-2/_warps.txt
new file mode 100644
index 000000000..12b4bbafe
--- /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: Jack's House warps
+017-2,41,32,0 warp #017-2_41_32 0,0,017-1,119,61
+017-2,31,30,0 warp #017-2_31_30 0,0,017-2-1,121,116
diff --git a/npc/017-3/_import.txt b/npc/017-3/_import.txt
new file mode 100644
index 000000000..3f6ffc567
--- /dev/null
+++ b/npc/017-3/_import.txt
@@ -0,0 +1,9 @@
+// Map 017-3: Dimond's Cove
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/017-3/_warps.txt",
+"npc/017-3/chef.txt",
+"npc/017-3/dimonds.txt",
+"npc/017-3/doctor.txt",
+"npc/017-3/doug.txt",
+"npc/017-3/loratay.txt",
+"npc/017-3/workers.txt",
diff --git a/npc/017-3/_warps.txt b/npc/017-3/_warps.txt
new file mode 100644
index 000000000..26d566f49
--- /dev/null
+++ b/npc/017-3/_warps.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-3: Dimond's Cove warps
+017-3,27,24,0 warp #017-3_27_24 0,0,017-3,35,68
+017-3,32,45,0 warp #017-3_32_45 0,0,017-1,55,144
+017-3,40,27,0 warp #017-3_40_27 2,0,017-3,83,28
+017-3,36,68,0 warp #017-3_36_68 0,0,017-3,28,24
+017-3,67,27,0 warp #017-3_67_27 2,0,017-3,67,72
+017-3,83,29,0 warp #017-3_83_29 2,0,017-3,40,28
+017-3,67,73,0 warp #017-3_67_73 2,0,017-3,67,28
diff --git a/npc/017-3/chef.txt b/npc/017-3/chef.txt
new file mode 100644
index 000000000..409be44a8
--- /dev/null
+++ b/npc/017-3/chef.txt
@@ -0,0 +1,367 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Dimond's Cove Chef. He'll disguise Mopox Cure Potion, and he is part from
+// Easter 2011 and Easter 2012 quests.
+
+017-3,33,25,0 script Chef#dimond NPC_CHEF,{
+ showavatar NPC_CHEF;
+ goto L_Begin;
+
+L_Begin:
+ mesn;
+ mesq l("I'm too busy right now to talk. Dimond's recipes are the best!");
+ close;
+ /*
+ .@q=getq(TulimsharQuest_Kadiya);
+ if ((.@q == 9) && (countitem ("MopoxCurePotion") > 0))
+ goto L_lace_chococake;
+ if ((.@q == 11) && (countitem ("MopoxCurePotion") > 0))
+ goto L_lace_cupcake;
+ close;
+
+L_lace_chococake:
+ next;
+ menu
+ "Sorry.", L_Close,
+ "I need your help with a sick young girl!", L_Next;
+
+L_Next:
+ mesn;
+ 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_Close,
+ "I need your help with a sick young girl!", L_Next1;
+
+L_Next1:
+ mesn;
+ 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;
+ mesn;
+ 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;
+ mesn;
+ 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_Close,
+ "Here you are!", L_Next3,
+ "Not now.", L_Close;
+
+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;
+
+ mesn;
+ 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;
+ mesn;
+ 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;
+ mesn;
+ 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:
+ mesn;
+ mes "";
+ mes "\"I will need three pieces of gingerbread.\"";
+ close;
+
+L_No_orange:
+ mesn;
+ mes "";
+ mes "\"Please bring me an orange for these cupcakes.\"";
+ close;
+
+L_No_Zeny:
+ mesn;
+ mes "";
+ mes "\"No. I need extra ingredients worth 500 GP, and I expect you to pay for those.\"";
+ close;
+
+L_No_Potion:
+ mesn;
+ mes "";
+ mes "\"Where did your Mopox potion go?\"";
+ close;
+
+L_bringit:
+ mesn;
+ mes "";
+ mes "\"Bring it here when you do.\"";
+ next;
+ */
+
+L_Close:
+ close;
+
+/* XXX: Easter 2011 stuff
+L_JellyBean:
+ mesn;
+ mes "";
+ mes "\"I can't talk right now... I'm too busy.\"";
+ next;
+ mes "\"Oh, wait. I see you are the adventurer who was speaking with the Easter Bunny. He has a really bad memory, you know? Every year he forgets who he needs to ask to get Jelly Beans, and every year an adventurer comes to my kitchen asking if I can help the Easter Bunny get some.\"";
+ next;
+ mes "\"Even though I am really busy this time of year, I will help you make some Jelly Beans to put in the basket if you wish. Just to keep the tradition alive...\"";
+ menu
+ "I would really appreciate that!", L_SetJellyBean,
+ "Nah, I decided not to do that stupid quest.", L_Close;
+
+L_SetJellyBean:
+ QUEST_Easter11 = 8;
+ goto L_MakeJellyBean;
+
+L_MakeJellyBean:
+ mesn;
+ mes "";
+ mes "\"I will need you to bring me some candies.\"";
+ mes "\"I think 15 should be enough.\"";
+ mes "\"Sea slimes seem to have those, so try them.\"";
+ mes "\"And because it's the holidays, I'll add in the other ingredient for free.\"";
+ menu
+ "I have some candies!", L_CandyCheck,
+ "Ok, I will be back soon.", L_Close,
+ "I changed my mind, forget about it.", L_Close;
+
+L_CandyCheck:
+ if(countitem("Candy") < 15)
+ goto L_EasterNotEnough;
+ if(countitem("Candy") >= 15)
+ goto L_EasterEnough;
+ close;
+
+L_EasterNotEnough:
+ mesn;
+ mes "";
+ mes "\"You do not have enough candies for me to work with yet.\"";
+ mes "\"Please go get more.\"";
+ close;
+
+L_EasterEnough:
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("Candy") > 15)
+ goto L_EasterTooMany;
+ if(countitem("Candy") < 15)
+ goto L_EasterNotEnough;
+ delitem "Candy", 15;
+ getitem "JellyBeans", 1;
+ QUEST_Easter11 = 9;
+ mesn;
+ mes "";
+ mes "\"You have gathered enough candies for me to make the Jelly Beans.\"";
+ mes "He puts the candies into a pot and starts melting them.";
+ mes "He adds in some gooey stuff, then lets the solution cool for a moment before forming the Jelly Beans.";
+ mes "\"Here are your Jelly Beans.\"";
+ close;
+
+L_EasterTooMany:
+ mesn;
+ mes "";
+ mes "\"You don't have enough room for the Jelly Beans. Come back later.\"";
+ close;
+
+L_SeeBunny:
+ mesn;
+ mes "";
+ mes "\"Oh yeah, you need to return to the Easter Bunny now.\"";
+ next;
+ goto L_Begin;
+ close;
+*/
+
+
+
+
+/* XXX: Easter 201x stuff
+// Really cool script, we must reintroduce it %%e
+
+L_Easter2012_Begin:
+ mesn;
+ mes "\"Ahh, " + strcharinfo(0) + "! I really need to talk to you. Did the Easter Bunny give you a very thick and heavy pan?\"";
+ menu
+ "Yes, he did. Why?", L_Easter2012_Continue;
+
+L_Easter2012_Continue:
+ mesn;
+ mes "\"Good to know! I am asking because now you are my only hope. I have invented the ultimate culinary wonder, a recipe for the most incredibly tasty food you can imagine!\"";
+ next;
+ mes "\"But here is the problem, to complete this recipe I need a very resistant pan, because in the process I need to use a very strong acid solution based on yeti saliva!\"";
+ next;
+ mes "\"Can you believe I ruined ALL of my pans and 17 infantry helmets while trying to cook it? That is why I am asking for this favor. Could you lend me your pan? I promise I will give you a jar of the final product.\"";
+ next;
+ mes "\"Oh, and I will need to keep it with me for a while, as the ingredients need to rest in the acid solution for a long time, but you can always come here to see how it is going.\"";
+ menu
+ "Ok, but I want my pan back when it is done!", L_Accept_Cooking,
+ "No way, I won't let you fill my hat with corrosive yeti saliva!", L_NoWay;
+
+L_NoWay:
+ mesn;
+ mes "\"Ahh, don't say that! Please, think about it and come back if you change your mind.\"";
+ close;
+
+L_Accept_Cooking:
+ mesn;
+ mes "\"Great! But I can't promise anything regarding your hat. What I can promise is: IF it works, you will eat the most spectacular food of all time! I won't say what it is, but it is going to be great! What do you say, are you sure?\"";
+ menu
+ "Ahh, just take the pan and do your thing.", L_CarryOn,
+ "No way!", L_Close;
+
+L_CarryOn:
+ if (countitem("PanHat") < 1)
+ goto L_No_PanHat;
+ delitem "PanHat", 1;
+ QUEST_Easter12 = 7;
+ mes "\"Very good! Now I just need to put the basic ingredients inside a metal pan filled with water, yeti saliva, a little bit of salt and finally... The secret ingredient!\"";
+ next;
+ mes "The chef turns his back to you so he can hide what he is using. But you can clearly distinguish a smell of coal...";
+ mes "\"Hahahah! And now we wait!\"";
+ close;
+
+L_Easter2012_Wait:
+ if ((gettime(6) == 4 && gettime(5) >= $@easter2012_reward_start_day))
+ goto L_Easter2012_Result;
+ mesn;
+ mes "\"Be patient... The basic ingredients are not ready yet.\"";
+ close;
+
+L_Easter2012_Result:
+ @temp = rand(99);
+ mesn;
+ mes "\"Hey! I have some good news and some bad news... Which one do you want to hear first?\"";
+ menu
+ "The good one.", L_SelectNews,
+ "The bad one.", L_SelectNews,
+ "Oh no, I don't even want to hear!", L_Close;
+
+L_SelectNews:
+ if (@temp < 15) goto L_Easter2012_Lucky;
+ if (@temp >= 15) goto L_Easter2012_Unlucky;
+ close;
+
+L_Easter2012_Lucky:
+ mesn;
+ mes "\"Wait! Did I mention bad news? I must be crazy... There is no bad news my friend! The ultimate pickled beets is now ready AND your pan is intact!\"";
+ next;
+ mes "\"Here! Take your pan back and a jar of the best pickled beets of the mana world!\"";
+ QUEST_Easter12 = 10;
+ getitem "PickledBeets", 1;
+ getitem "PanHat", 1;
+ close;
+
+L_Easter2012_Unlucky:
+ mesn;
+ mes "\"Ahh, actually, it doesn't matter! The important thing is that the recipe was a success! I just can't believe how something can be so tasty!\"";
+ next;
+ menu
+ "Nice! Now, what about my hat?", L_HatNext;
+
+L_HatNext:
+ mes "\"Oh, that... Ehh, unfortunately, the pan is not anymore. It was completely destroyed by the time the pickled beets were ready! But don't worry, I will keep my promise and give you a jar of this culinary masterpiece!\"";
+ next;
+ menu
+ "Wait, wait... Are you saying I lost my hat?", L_HatNext2;
+
+L_HatNext2:
+ mesn;
+ mes "\"Hmm, yes. But I must say I really appreciate your effort to help me! You sacrificed your cool hat in the name of the culinary arts, only a great person would do that!\"";
+ next;
+ menu
+ "But... I... My hat...", L_HatNext3;
+
+L_HatNext3:
+ mesn;
+ mes "\"Here, take your pickled beets!\"";
+ getitem "PickledBeets", 1;
+ QUEST_Easter12 = 8;
+ close;
+
+OnEaster2012Out:
+ if (QUEST_Easter12 == 8)
+ QUEST_Easter12 = 9;
+ mesn;
+ mes "\"Hey, I couldn't help but notice your sadness... You really like these silly hats, don't you? Well, since your hat is completely destroyed, just like all my pans, I can give you one of these nice cooking hats. But only if you give my jar of pickled beets back. What do you say?\"";
+ menu
+ "A chef hat for a jar of pickled beets? Of course I want!", L_GetChefhat,
+ "Ahh, keep you silly hat! The pickled beets are way better!", L_KeepBeets;
+ close;
+
+L_GetChefhat:
+ if (countitem("PickledBeets") < 1)
+ goto L_No_Pickledbeets;
+ mesn;
+ mes "\"Really? Well, if you are sure about that... Here is your hat!\"";
+ delitem "PickledBeets", 1;
+ getitem "ChefHat", 1;
+ QUEST_Easter12 = 10;
+ close;
+
+L_KeepBeets:
+ mesn;
+ mes "\"Hmm, I see that at least you are a wise person. See you later!\"";
+ QUEST_Easter12 = 10;
+ close;
+
+L_No_PanHat:
+ mesn;
+ mes "\"So? You said you have the pan, where is it?\"";
+ close;
+
+L_No_Pickledbeets:
+ mesn;
+ mes "\"Hey, no pickled beets means no chef hat.\"";
+ close;
+
+L_Easter2012Foolplayers:
+ mes "The chef can't hear you. He keeps looking and feeling the scent of his new recipe.";
+ close;
+*/
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
+
diff --git a/npc/017-3/dimonds.txt b/npc/017-3/dimonds.txt
new file mode 100644
index 000000000..b8491884c
--- /dev/null
+++ b/npc/017-3/dimonds.txt
@@ -0,0 +1,637 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Dimond's Cove NPCs
+
+017-3,34,38,0 script Dimond NPC_DIMOND,{
+ showavatar NPC_DIMOND;
+ mesn;
+ mesq l("Welcome to Dimond's Cove!");
+ next;
+ mesn;
+ mesq l("Please, don't say I got fat. I DON'T WANNA HEAR IT FROM YOU, WAS I CLEAR?");
+ next;
+ mesn;
+ mesq l("Please, enjoy the show! There are some people upstairs, too.");
+ //mesq l("Talk to the waitress to get some food. Enjoy the show! And you can sleep on the 3rd Floor.");
+ close;
+
+OnInit:
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+}
+
+017-3,40,35,0 script Phil NPC_BARD_TRUMP,{
+ showavatar NPC_BARD_TRUMP;
+ if (season() == SEASON_SPRING)
+ goto L_Quest;
+ mesn;
+ mesq l("We've finally solved the problem with our instruments!");
+ next;
+ mesn;
+ mesq l("Now we can play any songs! Hooray!");
+ close;
+
+L_Quest:
+ mesn;
+ mesq l("All spring it is the same thing... The instruments stop working!");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+017-3,40,37,0 script Jerry NPC_BARD_DRUMS,{
+ showavatar NPC_BARD_DRUMS;
+ if (season() == SEASON_SPRING)
+ goto L_Quest;
+ mesn;
+ mesq l("I finally figured out what was wrong. I must thank everyone who help us.");
+ next;
+ mesn;
+ mesq l("I can't believe it took so long to fix... And worse, next spring it'll be the same story all over again...");
+ close;
+
+L_Quest:
+ mesn;
+ mesq l("All spring it is the same thing... The instruments stop working!");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+017-3,42,36,0 script Robert NPC_BARD_HARPS,{
+ showavatar NPC_BARD_HARPS;
+ if (season() == SEASON_SPRING)
+ goto L_Quest;
+ mesn;
+ mesq l("We held to our hope and Jerry figured it out.");
+ next;
+ mesn;
+ mesq l("Now we are no longer useless — we can play music again!");
+ close;
+
+L_Quest:
+ mesn;
+ mesq l("All spring it is the same thing... The instruments stop working!");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+
+017-3,35,35,0 script Shannon NPC_LOF_NOBLEMAN,{
+ showavatar NPC_LOF_NOBLEMAN;
+ mesn;
+ mesq l("I'm a traveling poet and admirer of Robert Burns, a bard from the mana world.");
+ next;
+ mesn;
+ mesq l("I wonder if he exists on this world too. Because if he doesn't, I could tell many tales about him!");
+ close;
+ /*
+ @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 - WAIT, THAT IS NOT POSSIBLE ON TMW2
+ goto L_No_Event;
+ if (FLAGS & FLAG_HAS_BOWLER_BURNSDAY && FLAGS & FLAG_HAS_STEAMPUNK_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;
+ if (FLAGS & FLAG_HAS_BOWLER_BURNSDAY) goto L_Get_SteamTopHat;
+
+ getitem "BowlerHat", 1;
+ FLAGS = FLAGS | FLAG_HAS_BOWLER_BURNSDAY;
+ close;
+
+L_Get_SteamTopHat:
+ getitem "SteamTopHat", 1;
+ FLAGS = FLAGS | FLAG_HAS_STEAMPUNK_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 "\"On second thought, 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;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+
+017-3,80,32,0 script Dimonds Cove Story NPC_NO_SPRITE,{
+ mesn l("The Story of Dimonds Cove");
+ next;
+ mes l("One day Dimond D. Stone dreamed of her own restaurant.");
+ mes l("Dimond sold her food alone in this spot for some time,");
+ mes l("longing for the day she would have a building.");
+ mes l("She met an adventurer named Merlin outside of the");
+ mes l("desert mines one day.");
+ next;
+ mes l("They became friends and Dimond told Merlin about her idea.");
+ mes l("Merlin was a accomplished carpenter and wanted to make a new");
+ mes l("place in the world. He told Dimond that he would make her");
+ mes l("restaurant for her. He gathered the tools and after much");
+ mes l("hard work, Dimonds Cove was built.");
+ next;
+ mes l("At January 2008 - Construction of Dimonds Cove.");
+ close;
+
+OnInit:
+ .sex=G_OTHER;
+ .distance=3;
+ end;
+}
+
+/*
+017-3,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;
+}
+
+017-3,24,27,0 shop Bartender NPC112,539:87,567:250,568:250
+
+017-3,32,34,0 shop Waitress NPC139,519:50,533:55,534:45,562:125,676:100
+
+017-3,85,41,0 shop Blacksmith NPC146,545:5000,529:2,603:1000
+
+017-3,65,41,0 shop General Store#dimond NPC137,586:500,524:800,544:2000,632:500,528:500,735:500
+
+017-3,75,68,0 script Basil NPC_TOMBOY,{
+ showavatar NPC_TOMBOY;
+ if (!is_night())
+ goto L_Day;
+ mesn;
+ mesq l("For only 100 GP, you can sleep on the beds of the Land Of Fire.");
+ if (Zeny < 100)
+ close;
+ next;
+ mesn;
+ mesq l("The nanorob-- err, the *magic* will seal all your wounds. You trust Basil, right?");
+ next;
+ select
+ rif(Zeny > 100, l("Yes, please, book me a bed.")),
+ l("Uh... I *just* remembered I have something else to do!");
+ if (@menu == 2)
+ close;
+ Zeny=Zeny-100;
+ recovery();
+ if (rand(1,2) == 1)
+ sc_start SC_POISON, 60000, 0, 10000;
+ else
+ sc_start SC_ATTHASTE_POTION1, 60000, 5;
+
+ close;
+
+L_Day:
+ mesn;
+ mesq l("You can't sleep here during daytime!");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+*/
+
diff --git a/npc/017-3/doctor.txt b/npc/017-3/doctor.txt
new file mode 100644
index 000000000..edc4f2a9b
--- /dev/null
+++ b/npc/017-3/doctor.txt
@@ -0,0 +1,182 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Part from THE EPISODE quest
+// Reference:
+// http://forums.landoffire.org/viewtopic.php?f=7&t=1320&sid=80d2c735b55ccb06a39955a8fbca3913
+
+017-3,75,68,0 script The Doctor NPC_LOF_DOCTOR,{
+ showavatar NPC_LOF_DOCTOR;
+ .@q=getq(LoFQuest_EPISODE);
+ if (BaseLevel < 30) goto L_Weak;
+ if (.@q == 1) goto L_Check;
+ if (.@q == 2 && BaseLevel >= 40) goto L_Miler;
+ if (.@q >= 2) goto L_Tea;
+ mesn;
+ mesq l("Quite interesting, quite interesting indeed.");
+ menu
+ l("Um, might I ask, what is so interesting?"), L_Intro,
+ l("Yes, uhh, very interesting indeed. Haha. I better leave..."), -;
+ mes "";
+ mesc l("@@ stares you as you slowly get away from him. Odd person.", .name$);
+ close;
+
+L_Intro:
+ mes "";
+ mesn;
+ mesq l("Well, you are. You're quite interesting. I've been watching you for some time now, as you've been helping so many people: you're quite a master at what you do, you know.");
+ menu
+ l("Well, thanks."), L_IntroContinue,
+ l("Ok then... Uh... Please excuse me....."), -;
+ mes "";
+ mesc l("@@ stares you as you slowly get away from him. Odd person.", .name$);
+ close;
+
+L_IntroContinue:
+ mes "";
+ mesn;
+ mesq l("I don't suppose you have some herbs and a few bottles of potion with you, do you?");
+ menu
+ l("'Some herbs and potion'? Could you be more specific?"), L_IntroSpecify,
+ l("Certainly not. Uhh, please excuse me."), -;
+ mes "";
+ mesc l("@@ stares you as you slowly get away from him. Odd person.", .name$);
+ close;
+
+L_IntroSpecify:
+ mes "";
+ mesn;
+ mesq l("Ah, sorry, of course. I need quite a few herbs, look:");
+ mesc l("@@/150 @@", countitem(MauveHerb), getitemlink(MauveHerb));
+ mesc l("@@/150 @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mesc l("@@/150 @@", countitem(GambogeHerb), getitemlink(GambogeHerb));
+ mesc l("@@/100 @@", countitem(AlizarinHerb), getitemlink(AlizarinHerb));
+ mesc l("@@/50 @@", countitem(ShadowHerb), getitemlink(ShadowHerb));
+ mesc l("@@/10 @@", countitem(HastePotion), getitemlink(HastePotion));
+ menu
+ l("That shouldn't been too hard, but do I get something in return?"), L_IntroReward,
+ l("O.o \"That's a lot. Maybe another day.\""), -;
+ mes "";
+ mesc l("@@ stares you as you slowly get away from him. Odd person.", .name$);
+ close;
+
+L_IntroReward:
+ mes "";
+ mesn;
+ mesq l("I suppose, what would you like?");
+ next;
+ mesn;
+ mesq l("Er, nevermind, I've thought of something to give you. You can go off now and get what I need.");
+ setq LoFQuest_EPISODE, 1;
+ close;
+
+L_Check:
+ mesn;
+ mesq l("Did you brought what I asked for?");
+ mesc l("@@/150 @@", countitem(MauveHerb), getitemlink(MauveHerb));
+ mesc l("@@/150 @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mesc l("@@/150 @@", countitem(GambogeHerb), getitemlink(GambogeHerb));
+ mesc l("@@/100 @@", countitem(AlizarinHerb), getitemlink(AlizarinHerb));
+ mesc l("@@/50 @@", countitem(ShadowHerb), getitemlink(ShadowHerb));
+ mesc l("@@/10 @@", countitem(HastePotion), getitemlink(HastePotion));
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+ inventoryplace HerbalTea, 5;
+ if (
+ countitem(MauveHerb) < 150 ||
+ countitem(CobaltHerb) < 150 ||
+ countitem(GambogeHerb) < 150 ||
+ countitem(AlizarinHerb) < 100 ||
+ countitem(ShadowHerb) < 50 ||
+ countitem(HastePotion) < 10)
+ goto L_Missing;
+ delitem MauveHerb, 150;
+ delitem CobaltHerb, 150;
+ delitem GambogeHerb, 150;
+ delitem AlizarinHerb, 100;
+ delitem ShadowHerb, 50;
+ delitem HastePotion, 10;
+ getexp 7995, 0;
+ setq LoFQuest_EPISODE, 2;
+ getitem HerbalTea, 5;
+ mesn;
+ mesq l("Mmm, it's been so long since I have had herbal tea. You have my gratitude.");
+ next;
+ mesn strcharinfo(0);
+ mesq l("Seriously? What sort of reward is that?");
+ next;
+ mesn;
+ mesq l("Well, I suppose you can have some of my tea.");
+ close;
+
+L_Tea:
+ mesn;
+ mesq l("If you want, you can bring me some more of those herbs and potions.");
+ mesc l("@@/30 @@", countitem(MauveHerb), getitemlink(MauveHerb));
+ mesc l("@@/30 @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mesc l("@@/30 @@", countitem(GambogeHerb), getitemlink(GambogeHerb));
+ mesc l("@@/20 @@", countitem(AlizarinHerb), getitemlink(AlizarinHerb));
+ mesc l("@@/10 @@", countitem(ShadowHerb), getitemlink(ShadowHerb));
+ mesc l("@@/2 @@", countitem(HastePotion), getitemlink(HastePotion));
+ menu
+ l("Alright, I have them here!"), L_Check2,
+ l("No thanks, see ya!"), -;
+ close;
+
+L_Check2:
+ inventoryplace HerbalTea, 1;
+ if (
+ countitem(MauveHerb) < 30 ||
+ countitem(CobaltHerb) < 30 ||
+ countitem(GambogeHerb) < 30 ||
+ countitem(AlizarinHerb) < 20 ||
+ countitem(ShadowHerb) < 10 ||
+ countitem(HastePotion) < 2)
+ goto L_Missing;
+ delitem MauveHerb, 30;
+ delitem CobaltHerb, 30;
+ delitem GambogeHerb, 30;
+ delitem AlizarinHerb, 20;
+ delitem ShadowHerb, 10;
+ delitem HastePotion, 2;
+ getexp 122, 12;
+ getitem HerbalTea, 1;
+ mesn;
+ mesq l("Thanks, enjoy your tea! I will certainly enjoy mine!");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("Hmm, it's very interesting, very ... (mumbling).");
+ close;
+
+L_Missing:
+ mesn;
+ mesq l("Sorry, you do not have enough ingredients. You'd better search thoroughly.");
+ close;
+
+/////// Second Act
+L_Miler:
+ mesn;
+ mesq l("Thank you for helping me make my tea. I hope the potions have been helpful...");
+ next;
+ mesn;
+ mesq l("That reminds me. I have a friend in Nivalis named Miler who gave me some hints on the recipe. Would you take him a sample of what I gave you?");
+ mesq l("If you've used all the ones I've given, you can always bring me more ingredients.");
+ menu
+ "I'll go right away.", -,
+ "Ah, I suppose I need to gather more ingredients first...", -;
+ setq LoFQuest_EPISODE, 3;
+ close;
+
+
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/017-3/doug.txt b/npc/017-3/doug.txt
new file mode 100644
index 000000000..8a64d3019
--- /dev/null
+++ b/npc/017-3/doug.txt
@@ -0,0 +1,64 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Saulc
+// Description:
+// Weekly Quest
+
+017-3,68,87,0 script Doug NPC_PLAYER,{
+ if (BaseLevel < 25)
+ goto L_Weak;
+ .@q2=getq2(LoFQuest_Doug);
+ if (.@q2 < santime()) {
+ mesn;
+ mesq l("This room is too dark. I want to brighten it up.");
+ next;
+ .@price=(getiteminfo(CaveSnakeLamp, ITEMINFO_SELLPRICE)*3)*8;
+ mesn;
+ mesq l("I am willing to pay @@ GP for 10 @@ you bring me!", .@price, getitemlink(CaveSnakeLamp));
+ next;
+ select
+ rif(countitem(CaveSnakeLamp) >= 10, l("Here they are!")),
+ l("Not now...");
+ mes "";
+ if (@menu == 1) {
+ delitem CaveSnakeLamp, 10;
+ Zeny=Zeny+.@price; //864
+ getexp (.@price*rand(1,2)), 10; // 864 - 1728
+ setq2 LoFQuest_Doug, santime()+(60*60*24*7);
+ mesn;
+ mesq l("Many, many thanks!");
+ next;
+ }
+ mesn;
+ mesq l("Too bad these lamps wear off after a while... I am making stocks of them now!");
+ close;
+ } else {
+ mesn;
+ mesq l("Thanks for the help!");
+ close;
+ }
+
+L_Weak:
+ mesn;
+ mesq l("Heya dude! Don't you think this room is too dark?");
+ next;
+ mesn;
+ mesq l("I am trying to invent the light bulb, but my name is not Thomas...");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansShorts);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-3/loratay.txt b/npc/017-3/loratay.txt
new file mode 100644
index 000000000..1bcb91545
--- /dev/null
+++ b/npc/017-3/loratay.txt
@@ -0,0 +1,1181 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// TODO - Makes the Golden Warlord Plate into the Savior Plate.
+// Not part from the EPISODE quest.
+// Requires Titanium, Iridium, and Silk
+// Requires some money and level too (Savior Plate is level 109 item iirc?)
+
+017-3,85,85,0 script Lora Tay NPC_GLASS_OLD_LADY,{
+ showavatar NPC_GLASS_OLD_LADY;
+ mesn;
+ mesq l("Don't interrupt me, I'm busy!");
+ next;
+ mesn;
+ mesq l("In a few weeks, I will finish the @@ plans, and there will be no doubts, that @@ is not the best weaver in the world!", getitemlink(SaviorArmor), .name$);
+ close;
+
+ /*
+ 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;
+ setarray @item_colors$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green", "white";
+
+ if (@loratay_asking_robe == 1) goto L_ExamineSorcererRobe;
+ if (QUEST_WG_state == 10) goto L_agostine_menu;
+ if (QUEST_WG_state == 11 || QUEST_WG_state == 12) goto L_regular_intro;
+ if (QUEST_WG_state == 13) goto L_proposal_intro;
+ if (QUEST_WG_state == 14) goto L_proposal_show_materials;
+ if (QUEST_WG_state == 15) goto L_proposal_search_items;
+ if (QUEST_WG_state == 16) goto L_proposal_retrieve_design;
+ if (QUEST_WG_state == 17) goto L_proposal_bringing_design;
+ if (QUEST_WG_state == 18) goto L_proposal_wait_dress_finished;
+ if (QUEST_WG_state == 19) goto L_proposal_dress_finished;
+ if (QUEST_WG_state >= 20 && QUEST_WG_state < 23) goto L_proposal_deliver_dress;
+ if (QUEST_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 (QUEST_WG_state >= 1)
+ @agostine_msg0$ = "Do you know Agostine?";
+ if ((QUEST_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!\"";
+ 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!\"";
+ 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.";
+ close;
+
+L_agostine_0:
+ if (QUEST_WG_state < 1)
+ 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.";
+ close;
+
+L_agostine_1:
+ if ((QUEST_WG_state < 9) || (countitem (655) == 0))
+ 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 (QUEST_WG_state == 9)
+ QUEST_WG_state = 10;
+ 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 ((QUEST_WG_state < 9) || (countitem("WinterGloves") == 0))
+ 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_Next,
+ "Here, have a bottle of water...", L_Give_water,
+ "Can I help you?", L_Next;
+
+ menu
+ "(sneak out of the room)", L_End,
+ "Are you alright?", L_Next,
+ "Can I help you?", 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.";
+ 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.\"";
+ 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.\"";
+ 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!\"";
+ 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.";
+ close;
+
+L_regular_intro:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Ah, you again. Is there anything in particular you need?\"";
+ next;
+ if (QUEST_WG_state == 12)
+ goto L_Main_menu2;
+ goto L_Main_menu;
+
+L_Give_water:
+ if (countitem("BottleOfWater") == 0)
+ goto L_No_Water;
+ delitem "BottleOfWater", 1;
+ QUEST_WG_state = 11;
+
+ @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 (QUEST_WG_state == 12)
+ goto L_Main_menu2;
+ 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_sorcerer_robe_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_menu2:
+ 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_Fur1,
+ "Can you make winter gloves me?", L_Fur1,
+ "Can you sew a robe for me?", L_robe,
+ "Can you make a desert hat for me?", L_desert_hat,
+ "Actually...I have a proposal for you...", L_agostine_proposal,
+ "Goodbye for now.", L_End;
+
+L_Fur1:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"From what? Fluffy fur? I won't work with such lowly materials.\"";
+ next;
+ goto L_Main_menu2;
+
+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_Main_menu2;
+
+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.\"";
+
+ QUEST_WG_state = 13;
+
+ close;
+
+L_proposal_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_proposal_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 that 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_proposal_search_items;
+
+L_proposal_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_proposal_give_items,
+ @FINEDRESS_COCOONS+" silk cocoons for a dress? Find somebody else.", L_End;
+
+L_Next5:
+ QUEST_WG_state = 15;
+ close;
+
+L_proposal_not_enough_items:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"This is not funny. I need " + @FINEDRESS_COCOONS + " silk cocoons. No less.";
+ close;
+
+L_proposal_give_items:
+ if (countitem ("SilkCocoon") < @FINEDRESS_COCOONS)
+ goto L_proposal_not_enough_items;
+ delitem "SilkCocoon", @FINEDRESS_COCOONS;
+ QUEST_WG_state = 16;
+
+ 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_proposal_retrieve_design;
+
+L_proposal_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_End,
+ "Actually I want something else...", L_Main_menu;
+
+L_proposal_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;
+ QUEST_WG_state = 18;
+ goto L_proposal_wait_dress_finished;
+
+L_proposal_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_proposal_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?\"";
+ close;
+
+L_proposal_dress_finished:
+ QUEST_WG_state = 19;
+ 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:
+ QUEST_WG_state = 20;
+ close;
+
+L_proposal_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_End,
+ "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;
+ @default_choice$ = "Never mind.";
+ setarray @items, 724, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149;
+ setarray @item_names$, "Here is a Cotton Headband.", "Here is a Red Cotton Headband.", "Here is a Green Cotton Headband.", "Here is a Dark Blue Cotton Headband.", "Here is a Yellow Cotton Headband.", "Here is a Light Blue Cotton Headband.", "Here is a Pink Cotton Headband.", "Here is a Black Cotton Headband.", "Here is an Orange Cotton Headband.", "Here is a Puple Cotton Headband.", "Here is a Dark Green Cotton Headband.";
+ @items_nr = 11;
+
+ callsub S_pick_one_of_many_items;
+ if (@item == 0)
+ goto L_Main_menu;
+ if (@item == 724)
+ @genitem = 723;
+ if (@item != 724)
+ @genitem = @item - 10;
+ 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;
+
+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;
+
+ @default_choice$ = "Never mind.";
+ 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";
+ @items_nr = 44;
+ callsub S_pick_one_of_many_items;
+ 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;
+
+ @default_choice$ = "Never mind.";
+ 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";
+
+ @items_nr = 44;
+ callsub S_pick_one_of_many_items;
+ 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_ic;
+ if (Zeny < 1000)
+ goto L_tanktop_ins_Z;
+ 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_ic;
+ if (Zeny < 1000)
+ goto L_tanktop_ins_Z;
+ 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_ic:
+ 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_Z:
+ 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:
+ if (countitem("GoldenWarlordPlate") > 0) goto L_cape2;
+ 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_cape2:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Well, it looks like you have some pretty golden armor, I can add a cape if you wish....\"";
+ next;
+ goto L_capemenu;
+
+L_capemenu:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"That will be 20 cotton cloth, 5 iron ingots, and 240,000gp.\"";
+ menu
+ "That sounds awesome! Yes!", L_capeyes,
+ "What a ripoff!?", L_End;
+
+L_capeyes:
+ if (countitem("CottonCloth") < 20) goto L_Missing;
+ if (countitem("IronIngot") < 5) goto L_Missing;
+ if (countitem("GoldenWarlordPlate") < 1) goto L_Missing;
+ if (Zeny < 240000) goto L_NotEnoughMoney;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("Cottoncloth") > 5 && countitem("Ironingot") < 5) goto L_TooMany;
+ delitem "CottonCloth", 20;
+ delitem "IronIngot", 5;
+ delitem "GoldenWarlordPlate", 1;
+ Zeny = Zeny - 240000;
+ getitem "WhiteSaviorArmor", 1;
+ mes "[Lora Tay]";
+ mes "\"There you go!\"";
+ next;
+ goto L_End;
+
+L_NotEnoughMoney:
+ mes "[Lora Tay]";
+ mes "\"I'm not doing this work for charity! Find your money or stop bothering me.\"";
+ next;
+ goto L_Main_menu;
+
+L_Missing:
+ mes "[Lora Tay]";
+ mes "\"You seem to be missing some things.\"";
+ 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_robe_sheet_missing_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_robe_sheet_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_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;
+ close;
+
+S_pick_one_of_many_items:
+ @c = 0;
+ @i = 0;
+
+ setarray @choice_n$, "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "";
+ goto L_SUB_pick_choice_loop;
+
+L_SUB_pick_choice_loop:
+ if (@i >= @items_nr)
+ goto L_SUB_choice_init_done;
+ @current = @items[@i];
+ @current_name$ = @item_names$[@i];
+ @i = @i + 1;
+
+ if (countitem(@current) == 0)
+ goto L_SUB_pick_choice_loop;
+ @choice_v[@c] = @current;
+ @choice_n$[@c] = @current_name$;
+ @c = @c + 1;
+ goto L_SUB_pick_choice_loop;
+
+L_SUB_choice_init_done:
+ @choice_v[@c] = 0;
+ @choice_n$[@c] = @default_choice$;
+ @c = @c + 1;
+
+ if (@c < 10)
+ menu
+ @choice_n$[0], L_SUB_choice_join,
+ @choice_n$[1], L_SUB_choice_join,
+ @choice_n$[2], L_SUB_choice_join,
+ @choice_n$[3], L_SUB_choice_join,
+ @choice_n$[4], L_SUB_choice_join,
+ @choice_n$[5], L_SUB_choice_join,
+ @choice_n$[6], L_SUB_choice_join,
+ @choice_n$[7], L_SUB_choice_join,
+ @choice_n$[8], L_SUB_choice_join,
+ @choice_n$[9], L_SUB_choice_join;
+
+ if (@c < 20)
+ menu
+ @choice_n$[0], L_SUB_choice_join,
+ @choice_n$[1], L_SUB_choice_join,
+ @choice_n$[2], L_SUB_choice_join,
+ @choice_n$[3], L_SUB_choice_join,
+ @choice_n$[4], L_SUB_choice_join,
+ @choice_n$[5], L_SUB_choice_join,
+ @choice_n$[6], L_SUB_choice_join,
+ @choice_n$[7], L_SUB_choice_join,
+ @choice_n$[8], L_SUB_choice_join,
+ @choice_n$[9], L_SUB_choice_join,
+ @choice_n$[10], L_SUB_choice_join,
+ @choice_n$[11], L_SUB_choice_join,
+ @choice_n$[12], L_SUB_choice_join,
+ @choice_n$[13], L_SUB_choice_join,
+ @choice_n$[14], L_SUB_choice_join,
+ @choice_n$[15], L_SUB_choice_join,
+ @choice_n$[16], L_SUB_choice_join,
+ @choice_n$[17], L_SUB_choice_join,
+ @choice_n$[18], L_SUB_choice_join,
+ @choice_n$[19], L_SUB_choice_join;
+
+ menu
+ @choice_n$[0], L_SUB_choice_join,
+ @choice_n$[1], L_SUB_choice_join,
+ @choice_n$[2], L_SUB_choice_join,
+ @choice_n$[3], L_SUB_choice_join,
+ @choice_n$[4], L_SUB_choice_join,
+ @choice_n$[5], L_SUB_choice_join,
+ @choice_n$[6], L_SUB_choice_join,
+ @choice_n$[7], L_SUB_choice_join,
+ @choice_n$[8], L_SUB_choice_join,
+ @choice_n$[9], L_SUB_choice_join,
+ @choice_n$[10], L_SUB_choice_join,
+ @choice_n$[11], L_SUB_choice_join,
+ @choice_n$[12], L_SUB_choice_join,
+ @choice_n$[13], L_SUB_choice_join,
+ @choice_n$[14], L_SUB_choice_join,
+ @choice_n$[15], L_SUB_choice_join,
+ @choice_n$[16], L_SUB_choice_join,
+ @choice_n$[17], L_SUB_choice_join,
+ @choice_n$[18], L_SUB_choice_join,
+ @choice_n$[19], L_SUB_choice_join,
+ @choice_n$[20], L_SUB_choice_join,
+ @choice_n$[21], L_SUB_choice_join,
+ @choice_n$[22], L_SUB_choice_join,
+ @choice_n$[23], L_SUB_choice_join,
+ @choice_n$[24], L_SUB_choice_join,
+ @choice_n$[25], L_SUB_choice_join,
+ @choice_n$[26], L_SUB_choice_join,
+ @choice_n$[27], L_SUB_choice_join,
+ @choice_n$[28], L_SUB_choice_join,
+ @choice_n$[29], L_SUB_choice_join,
+ @choice_n$[30], L_SUB_choice_join,
+ @choice_n$[31], L_SUB_choice_join;
+
+L_SUB_choice_join:
+ @menu = @menu - 1;
+ @item = @choice_v[@menu];
+ if (@menu >= @c)
+ @item = 0;
+ return;
+
+L_TooMany:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"You don't have anywhere to put this. Come back when you have more room.\"";
+ close;
+
+L_sorcerer_robe_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;
+ close;
+
+L_ExamineSorcererRobe:
+ @loratay_asking_robe = 0;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Let's see...\"";
+ next;
+ @chest_equip_id = getequipid(equip_torso);
+ callsub S_Get_SorcererRobeColors;
+ mes "Lora Tay takes a closer look at what you are wearing.";
+ next;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Hmm. This " + @item_colors$[@current_linecolor] + " lined " + @item_colors$[@current_maincolor] + " sorcerer robe. I see. Is that ok?\"";
+ if (@current_maincolor == -1 || @current_linecolor == -1)
+ goto L_NotSorcererRobe;
+ menu
+ "Yes, that's fine. Take this one.", L_ChooseSorcererLineColor,
+ "No, I changed my mind.", L_CleanSorcererRobe;
+
+L_NotSorcererRobe:
+ mes "\"This isn't a Sorcerer Robe dear. Stop taking me for a fool.\"";
+ goto L_CleanSorcererRobe;
+
+L_ChooseSorcererLineColor:
+ // 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 " + @item_colors$[0] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[1] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[2] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[3] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[4] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[5] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[6] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[7] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[8] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[9] + " one.", L_ItemMenus2,
+ "A " + @item_colors$[10] + " 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_SorcererRobe_SameColor;
+ callsub S_Get_NewSorcererRobeId;
+ // Should not happen since it has been checked the player submitted a sorcerer robe
+ if (@new_sorcerer_robe_id == 0)
+ goto L_End;
+
+ if (Zeny < @SORCERER_ROBE_SEW_ZENY)
+ goto L_SorcererRobe_NoZeny;
+ if (countitem(@chest_equip_id) == 0)
+ goto L_SorcererRobe_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_sorcerer_robe_id, 1;
+ mes "Lora Tay adjusts her glasses and removes carefully the " + @item_colors$[@current_linecolor] + " string of the robe.";
+ mes "Then she grabs the " + @item_colors$[@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_CleanSorcererRobe;
+
+L_SorcererRobe_SameColor:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Are you blind? Your robe is already of this color dear!\"";
+ goto L_CleanSorcererRobe;
+
+L_SorcererRobe_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_CleanSorcererRobe;
+
+S_Get_NewSorcererRobeId:
+ if (@chosen_color == 0 && @current_maincolor == 10)
+ @new_sorcerer_robe_id = 798;
+ if (@chosen_color == 0 && @current_maincolor < 10)
+ @new_sorcerer_robe_id = 2220 + @current_maincolor;
+ if (@chosen_color > 0)
+ @new_sorcerer_robe_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_CleanSorcererRobe;
+
+L_SorcererRobe_NoZeny:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"You don't seem to be able to afford my services, dear.\"";
+ goto L_CleanSorcererRobe;
+
+S_Get_SorcererRobeColors:
+ @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_CleanSorcererRobe:
+ @current_maincolor = 0;
+ @current_linecolor = 0;
+ @chest_equip_id = 0;
+ @new_sorcerer_robe_id = 0;
+ @chosen_color = 0;
+ @cotton_cloth_id = 0;
+ close;
+
+ */
+
+OnInit:
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+}
diff --git a/npc/017-3/model.c b/npc/017-3/model.c
new file mode 100644
index 000000000..53fff5983
--- /dev/null
+++ b/npc/017-3/model.c
@@ -0,0 +1,45 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Permanently repeatable quest, without any special limit
+
+017-3,68,87,0 script Model NPC_PLAYER,{
+ mesn;
+ mesq l("This room is too dark. I want to brighten it up.");
+ next;
+ .@price=(getiteminfo(CaveSnakeLamp, ITEMINFO_SELLPRICE)*11/10)*5;
+ mesn;
+ mesq l("I am willing to pay @@ GP for each 5 @@ you bring me!", .@price, getitemlink(CaveSnakeLamp));
+ next;
+ select
+ rif(countitem(CaveSnakeLamp) >= 5, l("Here they are!")),
+ l("Not now...");
+ mes "";
+ if (@menu == 1) {
+ delitem CaveSnakeLamp, 5;
+ Zeny=Zeny+.@price;
+ getexp (.@price/rand(2,3)), 5;
+ mesn;
+ mesq l("Many, many thanks!");
+ next;
+ }
+ mesn;
+ mesq l("Too bad these lamps wear off after a while... I am making stocks of them now!");
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansShorts);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-3/workers.txt b/npc/017-3/workers.txt
new file mode 100644
index 000000000..faf21899b
--- /dev/null
+++ b/npc/017-3/workers.txt
@@ -0,0 +1,21 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Shady NPCs with questionable purposes.
+
+//010-2,23,70,0 script Josh NPC_TECH_EXPLORER,{
+017-3,23,70,0 script Jenny NPC_FEMALE_WORKER,{
+ showavatar NPC_FEMALE_WORKER;
+ mesn;
+ mesq l("We're busy here, so please don't bother us.");
+ close;
+}
+
+017-3,39,75,0 script Zack NPC_TECH_EXPLORER,{
+ showavatar NPC_TECH_EXPLORER;
+ mesn;
+ mesq l("Why are you here? This area is off-bounds!");
+ close;
+}
diff --git a/npc/017-4/_import.txt b/npc/017-4/_import.txt
new file mode 100644
index 000000000..d2c0b1937
--- /dev/null
+++ b/npc/017-4/_import.txt
@@ -0,0 +1,6 @@
+// Map 017-4: Tech-User Forge
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/017-4/_warps.txt",
+"npc/017-4/pihro.txt",
+"npc/017-4/pyndragon.txt",
+"npc/017-4/refine.txt",
diff --git a/npc/017-4/_warps.txt b/npc/017-4/_warps.txt
new file mode 100644
index 000000000..544720265
--- /dev/null
+++ b/npc/017-4/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-4: Tech-User Forge warps
+017-4,27,42,0 warp #017-4_27_42 0,0,017-1,150,88
+017-4,35,42,0 warp #017-4_35_42 0,0,017-1,155,88
diff --git a/npc/017-4/pihro.txt b/npc/017-4/pihro.txt
new file mode 100644
index 000000000..325c0971e
--- /dev/null
+++ b/npc/017-4/pihro.txt
@@ -0,0 +1,104 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Forge bullets
+017-4,35,35,0 script Pihro NPC_PLAYER,{
+ // cond_check(ItemID, ItemAmount)
+ // Returns 1 if ID is zero
+ function cond_check {
+ if (getarg(0) == 0)
+ return 1;
+ else
+ return (countitem(getarg(0)) >= getarg(1));
+ }
+
+ // craft_ammo( PrizeItem, Price, Lead Amount, {Elemental Item, Amount, {Elemental Item2, Amount2}} )
+ function craft_ammo {
+ .@prize=getarg(0);
+ .@price=getarg(1);
+ .@base1=LeadIngot;
+ .@amon1=getarg(2);
+ .@base2=getarg(3,0);
+ .@amon2=getarg(4,0);
+ .@base3=getarg(5,0);
+ .@amon3=getarg(6,0);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ if (.@amon2 > 0)
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ if (.@amon3 > 0)
+ mesc l("@@/@@ @@", countitem(.@base3), .@amon3, getitemlink(.@base3));
+ mesc l("@@/@@ GP", format_number(Zeny), .@price);
+ next;
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ cond_check(.@base2, .@amon2) &&
+ cond_check(.@base3, .@amon3) &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 220;
+ delitem .@base1, .@amon1;
+ if (.@base2 > 0)
+ delitem .@base2, .@amon2;
+ if (.@base3 > 0)
+ delitem .@base3, .@amon3;
+ Zeny = Zeny - .@price;
+ getitem .@prize, rand(100,220);
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+ mesn;
+ mesq l("Hello there! I make bullets for the weapons my friend Pyndragon makes.");
+ next;
+
+L_Craft:
+ mesn;
+ mesq l("Some bullets have Elemental Properties, by the way. Now, what will it be?");
+ next;
+ select
+ l("Nothing, sorry."),
+ l("Normal Bullet"),
+ l("Sacred Bullet");
+
+ switch (@menu) {
+ case 2:
+ // craft_ammo( PrizeItem, Price, Lead Amount, {Elemental Item, Amount, {Elemental Item2, Amount2}} )
+ craft_ammo(Bullet, 200, 1);
+ goto L_Craft;
+ case 3:
+ craft_ammo(SacredBullet, 200, 1, WhiteFur, 5);
+ goto L_Craft;
+ }
+ close;
+
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, Monocle);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
diff --git a/npc/017-4/pyndragon.txt b/npc/017-4/pyndragon.txt
new file mode 100644
index 000000000..6d125d7f3
--- /dev/null
+++ b/npc/017-4/pyndragon.txt
@@ -0,0 +1,145 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Forge firearms
+017-4,34,23,0 script Pyndragon NPC_PLAYER,{
+ // craft_gun( BaseItem1, Amount, BaseItem2, Amount, BaseItem3, Amount, PrizeItem, Price )
+ function craft_gun {
+ .@base1=getarg(0);
+ .@amon1=getarg(1);
+ .@base2=getarg(2);
+ .@amon2=getarg(3);
+ .@base3=getarg(4);
+ .@amon3=getarg(5);
+ .@prize=getarg(6);
+ .@price=getarg(7);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ mesc l("@@/@@ @@", countitem(.@base3), .@amon3, getitemlink(.@base3));
+ mesc l("@@/@@ GP", format_number(Zeny), .@price);
+ next;
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ countitem(.@base2) >= .@amon2 &&
+ countitem(.@base3) >= .@amon3 &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 1;
+ delitem .@base1, .@amon1;
+ delitem .@base2, .@amon2;
+ delitem .@base3, .@amon3;
+ Zeny = Zeny - .@price;
+ getitem .@prize, 1;
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+
+ mesn;
+ if (is_night())
+ mesq l("Good @@. My name is @@ and I make @@.", l("evening"), .name$, l("firearms"));
+ else
+ mesq l("Good @@. My name is @@ and I make @@.", l("day"), .name$, l("firearms"));
+ next;
+ if (BaseLevel < 60)
+ goto L_TooWeak;
+ else if (BaseLevel < 70)
+ goto L_Weak;
+ goto L_Menu;
+
+L_TooWeak:
+ mesn;
+ mesq l("These weapons are only for masters, so you must get levels before being able to use them.");
+ close;
+
+L_Weak:
+ mesn;
+ mesq l("You need level 70 to use these guns, but if you want to start collecting materials, you're allowed to.");
+ next;
+ goto L_Menu;
+
+L_Menu:
+ menu
+ l("I would like some information"), L_Info,
+ l("I want a gun!"), L_Craft,
+ l("I don't want anything right now, bye."), L_Close;
+
+L_Info:
+ mes "";
+ mesn;
+ mesq l("There are four basic class:");
+ mesc l("REVOLVERS");
+ mesc l("* The only one hand ranged weapon you'll ever find. Not amazing at all.");
+ mesc l("RIFLES");
+ mesc l("* Huge damage and more criticals, but slow fire rate.");
+ mesc l("GATLING");
+ mesc l("* Shoots like crazy, but deals less damage.");
+ mesc l("SHOTGUNS");
+ mesc l("* Causes splash damage, and are very expensive.");
+ next;
+ mesn;
+ mesq l("Select carefully which weapon you want, so there are no regrets.");
+ next;
+ goto L_Menu;
+
+L_Craft:
+ select
+ l("I changed my mind."),
+ l("I want a REVOLVER."),
+ l("I want a RIFLE."),
+ l("I want a GATLING."),
+ l("I want a SHOTGUN.");
+ mes "";
+
+ switch (@menu) {
+ case 2:
+ craft_gun( LeadIngot, 6, TitaniumIngot, 6, Coal, 12, PynRevolver, 15000 );
+ goto L_Craft;
+ case 3:
+ craft_gun( LeadIngot, 8, TitaniumIngot, 8, Coal, 15, PynRifle, 15000 );
+ goto L_Craft;
+ case 4:
+ craft_gun( LeadIngot, 8, TitaniumIngot, 8, Coal, 15, PynGatling, 15000 );
+ goto L_Craft;
+ case 5:
+ craft_gun( LeadIngot, 12, TitaniumIngot, 12, Coal, 24, PynShotgun, 60000 );
+ goto L_Craft;
+ }
+ goto L_Menu;
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, GoldenWarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, BromenalPants);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/017-4/refine.txt b/npc/017-4/refine.txt
new file mode 100644
index 000000000..874cc6c99
--- /dev/null
+++ b/npc/017-4/refine.txt
@@ -0,0 +1,34 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Refine and Repair broken equipment.
+017-4,38,35,0 script Fortiun NPC_FORTIUN,{
+ showavatar NPC_FORTIUN;
+ @menu=0;
+ do
+ {
+ refineMaster();
+ } while (1);
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
+017-4,23,23,0 script Fusus NPC_FUSUS,{
+ showavatar NPC_FUSUS;
+ @menu=0;
+ do
+ {
+ repairMaster();
+ } while (getbrokencount() >= 0);
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-5/_import.txt b/npc/017-5/_import.txt
new file mode 100644
index 000000000..ac4bb9e62
--- /dev/null
+++ b/npc/017-5/_import.txt
@@ -0,0 +1,5 @@
+// Map 017-5: LoF Weapon Smith & Shop
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/017-5/_warps.txt",
+"npc/017-5/nahrec.txt",
+"npc/017-5/silversmith.txt",
diff --git a/npc/017-5/_warps.txt b/npc/017-5/_warps.txt
new file mode 100644
index 000000000..df2913260
--- /dev/null
+++ b/npc/017-5/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-5: LoF Weapon Smith & Shop warps
+017-5,23,34,0 warp #017-5_23_34 0,0,017-1,133,156
diff --git a/npc/017-5/nahrec.txt b/npc/017-5/nahrec.txt
new file mode 100644
index 000000000..9d9ce4aac
--- /dev/null
+++ b/npc/017-5/nahrec.txt
@@ -0,0 +1,150 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// General Purpose Blacksmith
+// TODO: Mylarin Dust for THE EPISODE. This means Savior Pants is part of THE EPISODE
+// TODO: Silversmith on 24, 25
+
+017-5,44,24,0 script Nahrec NPC_PLAYER,{
+ // Debug
+ if (!is_staff()) {
+ mesn;
+ mesq l("Almost there! The War Lord will be proud with this new armor I am inventing for him! Just a little more...!");
+ close;
+ }
+
+ // blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
+ function blacksmith_create {
+ .@base1=getarg(0);
+ .@amon1=getarg(1);
+ .@base2=getarg(2);
+ .@amon2=getarg(3);
+ .@prize=getarg(4);
+ .@price=getarg(5);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need @@ @@, @@ @@ and @@ gp.",
+ getitemlink(.@prize), .@amon1, getitemlink(.@base1), .@amon2, getitemlink(.@base2), .@price);
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ countitem(.@base2) >= .@amon2 &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 1;
+ delitem .@base1, .@amon1;
+ delitem .@base2, .@amon2;
+ Zeny = Zeny - .@price;
+ getitem .@prize, 1;
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+
+ mesn;
+ mesq l("Ah, hello! It is good to see another traveler in this town!");
+ next;
+ menu
+ l("Really? Where are you from?"), L_Story,
+ l("It's good to see you too, do you happen to be able to make stuff?"), L_Makestuff,
+ l("Alright."), -;
+ close;
+
+L_Story:
+ mesn;
+ mesq l("I came from Thermin, a town far far away.");
+ next;
+ mesn;
+ mesq l("I'm an experienced weapon master helping this smithy here, but I am new in this town. I am best at smithing armor.");
+ next;
+ menu
+ l("'Best'? So you can make other things?"), L_Makestuff,
+ l("Good to know."), -;
+ close;
+
+L_Makestuff:
+ mesn;
+ mesq l("Yes, I can craft many things. In addition to plating and improving armor, I can craft smaller items made of gold and other metals.");
+ select
+ rif(countitem(WarlordPlate) > 0, l("Can you improve my Warlord Plate for me?")),
+ rif(countitem(LightPlatemail) > 0, l("Can you improve my Light Platemail for me?")),
+ l("Can you craft Light Platemail?"),
+ l("Can you craft Warlord Plate?"),
+ l("Can you craft Savior Pants?"),
+ l("Do you know something about 'Mylarin Dust'?"),
+ l("Nevermind, bye!");
+ mes "";
+ switch (@menu) {
+ case 1:
+ blacksmith_create(GoldIngot, 35, WarlordPlate, 1, GoldenWarlordPlate, 200000);
+ break;
+ case 2:
+ blacksmith_create(GoldIngot, 10, LightPlatemail, 1, GoldenLightPlatemail, 30000);
+ break;
+ case 3:
+ blacksmith_create(IronIngot, 15, SilverIngot, 5, LightPlatemail, 10000);
+ break;
+ case 4:
+ blacksmith_create(IronIngot, 5, GoldenLightPlatemail, 1, WarlordPlate, 5000);
+ break;
+ case 5:
+ goto L_Savior;
+ case 6:
+ goto L_Mylarin;
+ case 7:
+ closedialog;
+ goodbye;
+ close;
+ }
+ goto L_Makestuff;
+
+L_Mylarin:
+ mesn;
+ mesq l("Mylarin dust?! Where would you get that? That's amazing!");
+ next;
+ mesq l("It has eluded so many craftsmiths, who knows what can be done with that!");
+ next;
+ mesq l("I can make some stuff with it, but I have no idea where it can be found. Mylarin dust... amazing.");
+ next;
+ goto L_Makestuff;
+
+L_Missing:
+ mesn;
+ mesq l("It looks like you're missing some items or money. Please come back when you have what I need!");
+ close;
+
+L_Savior:
+ mesn;
+ mesq l("Yes, I can craft Savior Pants. But it is not cheap. I'll need Platinum, Iridium, and Mylarin Dust. And gold. Much gold.");
+ select
+ "I'll be back with those items..",
+ "That's crazy!";
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, SaviorPants);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/017-5/silversmith.txt b/npc/017-5/silversmith.txt
new file mode 100644
index 000000000..60fe9a705
--- /dev/null
+++ b/npc/017-5/silversmith.txt
@@ -0,0 +1,89 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Crafts silver objects
+
+017-5,24,25,0 script Silversmith NPC_SILVERSMITH,{
+ showavatar NPC_SILVERSMITH;
+ goto L_Menu;
+
+ // blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
+ function blacksmith_create {
+ .@base1=getarg(0);
+ .@amon1=getarg(1);
+ .@base2=getarg(2);
+ .@amon2=getarg(3);
+ .@prize=getarg(4);
+ .@price=getarg(5);
+
+ mesn;
+ mesq l("Do you want to craft @@? For that I will need:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ mesc l("@@/@@ GP", format_number(Zeny), format_number(.@price));
+
+ select
+ l("Yes"),
+ l("No");
+
+ if (@menu == 2)
+ return;
+
+ if (countitem(.@base1) >= .@amon1 &&
+ countitem(.@base2) >= .@amon2 &&
+ Zeny >= .@price) {
+ inventoryplace .@prize, 1;
+ delitem .@base1, .@amon1;
+ delitem .@base2, .@amon2;
+ Zeny = Zeny - .@price;
+ getitem .@prize, 1;
+ .@xp=getiteminfo(.@base1, ITEMINFO_SELLPRICE)*.@amon1+getiteminfo(.@base2, ITEMINFO_SELLPRICE)*.@amon2;
+ .@xp=.@xp*2/3;
+ getexp .@xp, rand(1,10);
+
+ mes "";
+ mesn;
+ mesq l("Many thanks! Come back soon.");
+ } else {
+ speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
+ l("You don't have enough material, sorry.");
+ }
+ return;
+ }
+
+
+L_Menu:
+ mesn l("Smith Silvers");
+ mesq l("Hello, I am your local silversmith, here for all of your smithing needs!");
+ next;
+ select
+ l("Nothing, sorry!"),
+ l("I'd like my Crozenite Clover Silvered."),
+ l("Silver Ring!"),
+ l("Miere Cleaver!"),
+ l("Broadsword!");
+
+ switch (@menu) {
+ case 2:
+ blacksmith_create(SilverIngot, 3, CrozeniteFourLeafAmulet, 1, SilverFourLeafAmulet, 5000);
+ break;
+ case 3:
+ blacksmith_create(SilverIngot, 4, TinIngot, 2, SilverRing, 10000);
+ break;
+ case 4:
+ blacksmith_create(SilverIngot, 12, Coal, 8, MiereCleaver, 20000);
+ break;
+ case 5:
+ blacksmith_create(SilverIngot, 27, Coal, 20, Broadsword, 50000);
+ break;
+ }
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-6/_import.txt b/npc/017-6/_import.txt
new file mode 100644
index 000000000..8dc1399cf
--- /dev/null
+++ b/npc/017-6/_import.txt
@@ -0,0 +1,5 @@
+// Map 017-6: LoF Alchemy Shop
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/017-6/_warps.txt",
+"npc/017-6/azwell.txt",
+"npc/017-6/sheila.txt",
diff --git a/npc/017-6/_warps.txt b/npc/017-6/_warps.txt
new file mode 100644
index 000000000..5d600c767
--- /dev/null
+++ b/npc/017-6/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-6: LoF Alchemy Shop warps
+017-6,30,44,0 warp #017-6_30_44 0,1,017-1,38,139
+017-6,30,32,0 warp #017-6_30_32 0,1,017-1,38,131
+017-6,30,53,0 warp #017-6_30_53 0,1,017-1,38,154
diff --git a/npc/017-6/azwell.txt b/npc/017-6/azwell.txt
new file mode 100644
index 000000000..91a23b309
--- /dev/null
+++ b/npc/017-6/azwell.txt
@@ -0,0 +1,145 @@
+// TMW2/LoF scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Status Reset. Formely named Bobby
+
+017-6,25,30,0 script Axzell the Alchemist NPC_PLAYER,{
+
+ speech S_LAST_NEXT,
+ l("I am @@, an alchemist specialized in reset potions.", .name$);
+
+L_Menu:
+ .@plush_count = BaseLevel*190-(9*210);
+ // Lv 10: ??
+ if (BaseLevel > 10)
+ .@plush_count = .@plush_count/(BaseLevel/10);
+
+ select
+ l("Can you reset my stats please?"),
+ l("Hey, nice hat! Can I have it?"),
+ lg("You are weird, I have to go sorry.");
+
+ mes "";
+ switch (@menu) {
+ case 1:
+ goto L_ResetStats;
+ case 2:
+ mesn;
+ mesq l("Maybe.");
+ next;
+ mesn strcharinfo(0);
+ mes l("*_* \"Pretty please?\"");
+ next;
+ mesn;
+ mesq l("Well, I and my brother could make another one, but they are being checked for safety.");
+ next;
+ mesn;
+ mesq l("After all, what would you do if it open a black hole on your head by accident? %%4");
+ next;
+ mesn strcharinfo(0);
+ mesq l("Welp, no, please!");
+ next;
+ mesn;
+ mesq l("%%@ Then wait until Saulc says they are safe!");
+ next;
+ goto L_Menu;
+ case 3:
+ goto L_Quit;
+ }
+
+L_ResetStats:
+ mesn;
+ mesq l("Status point reset can't be undone. Do you really want this?");
+
+L_ConfirmReset:
+ select
+ lg("Yes, I am sure."),
+ lg("I need to think about it...");
+
+ switch (@menu)
+ {
+ case 1:
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Let me just have a quick look at you. Hm... I will need @@ GP to reset your stats.", .@plush_count);
+
+ select
+ rif(Zeny >= .@plush_count, l("Here, take as much as you need, I have plenty!")),
+ rif(Zeny > 0 && Zeny < .@plush_count, 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) {
+ goto L_Quit;
+ }
+
+ // TODO: I think there were functions to deal with GP
+ set Zeny, Zeny-.@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 (StatusPoint == .@wasSP) {
+ speech S_LAST_NEXT,
+ l("It seems that you have no status points to reset!"),
+ l("But the money you brought was really awesome you know."),
+ l("Come back when you will really need me.");
+ } 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! I need the money.");
+ }
+ }
+ goto L_Quit;
+
+L_Quit:
+ closedialog;
+ goodbye;
+ close;
+
+OnTimer1000:
+ domovestep;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, ChemistHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, AlchemistArmor);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
+ initpath "move", 25, 30,
+ "dir", DOWN, 0,
+ "wait", 15, 0,
+ "move", 29, 21,
+ "dir", LEFT, 0,
+ "wait", 5, 0,
+ "dir", DOWN, 0,
+ "wait", 15, 0,
+ "move", 28, 34,
+ "dir", RIGHT, 0,
+ "wait", 15, 0,
+ "move", 22, 37,
+ "dir", RIGHT, 0,
+ "wait", 30, 0,
+ "move", 22, 48,
+ "dir", UP, 0,
+ "wait", 15, 0,
+ "move", 28, 62,
+ "dir", UP, 0,
+ "wait", 15, 0,
+ "move", 29, 47,
+ "dir", UP, 0,
+ "wait", 15, 0;
+ initialmove;
+ initnpctimer;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/017-6/sheila.txt b/npc/017-6/sheila.txt
new file mode 100644
index 000000000..eb191b4ff
--- /dev/null
+++ b/npc/017-6/sheila.txt
@@ -0,0 +1,47 @@
+// TMW2/LoF scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Makes the Time Potion Of Ozthokk
+
+017-6,27,48,0 script Sheila the Clockmaker NPC_SHEILA,{
+ showavatar NPC_SHEILA;
+ mesn;
+ mesq l("Ah, hello... is it @@? Nice to meet you!", strcharinfo(0));
+ next;
+ mesn;
+ mesq l("I am @@, student from the ancient secrets of the Mage of Time, Ozthokk.", .name$);
+ next;
+ mesn;
+ mesq l("My greatest realization thus far, besides some time rewinding clocks, is the @@!", getitemlink(TimeFlask));
+ next;
+ mesn;
+ mesq l("I'm not sure what it needs to move on time, but I managed to make it move in space, back to this village, in no time!");
+ mesq l("Well, maybe it takes a few hours or days of your life, but who cares! It is instant teleport!");
+ next;
+ mesn;
+ mesq l("If you bring me a @@ and 1,000 GP I can make one for you!", getitemlink(DragonScales));
+ if (!countitem(DragonScales) || Zeny < 1000)
+ close;
+ select
+ l("Nice, but no, thanks."),
+ l("Pretty cool! I am interested!");
+ mes "";
+ if (@menu == 1)
+ close;
+ inventoryplace TimeFlask, 1;
+ delitem DragonScales, 1;
+ Zeny=Zeny-1000;
+ getitem TimeFlask, 1;
+ mesn;
+ mesq l("Neat, neat! Thanks! Here you go, this amazing bottle! It is life-bond, so having multiple won't reduce the time you need to wait...");
+ next;
+ mesn;
+ mesq l("Do not open. Do not attempt to eat. Be careful with it, to don't cause any time paradoxes. I also heard a NPC may be interested on that, by the way!");
+ close;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/018-1-1/_import.txt b/npc/018-1-1/_import.txt
new file mode 100644
index 000000000..29f69c5d4
--- /dev/null
+++ b/npc/018-1-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-1-1: Sincerity Island Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-1-1/_mobs.txt",
+"npc/018-1-1/_warps.txt",
diff --git a/npc/018-1-1/_mobs.txt b/npc/018-1-1/_mobs.txt
new file mode 100644
index 000000000..167b961ac
--- /dev/null
+++ b/npc/018-1-1/_mobs.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-1-1: Sincerity Island Cave mobs
+018-1-1,53,51,14,12 monster Silkworm 1034,10,30000,3000
+018-1-1,43,35,0,0 monster Evil Mushroom 1042,3,40000,5000
+018-1-1,27,31,0,0 monster Evil Mushroom 1042,3,40000,5000
+018-1-1,50,49,30,30 monster Bat 1039,10,60000,10000
+018-1-1,65,52,12,24 monster Chocolate Slime 1180,6,30000,60000
+018-1-1,49,65,27,10 monster Wicked Mushroom 1176,4,30000,3000
+018-1-1,35,39,13,17 monster Lavern 1175,6,30000,3000
+018-1-1,71,33,0,0 monster Evil Mushroom 1042,3,40000,5000
+018-1-1,49,63,30,10 monster Shadow Plant 1189,4,60000,10000
diff --git a/npc/018-1-1/_warps.txt b/npc/018-1-1/_warps.txt
new file mode 100644
index 000000000..c30c4fc11
--- /dev/null
+++ b/npc/018-1-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-1-1: Sincerity Island Cave warps
+018-1-1,33,78,0 warp #018-1-1_33_78 0,0,018-1,54,38
diff --git a/npc/018-1/_import.txt b/npc/018-1/_import.txt
new file mode 100644
index 000000000..98e287a52
--- /dev/null
+++ b/npc/018-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 018-1: Sincerity
+// 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/george.txt",
diff --git a/npc/018-1/_mobs.txt b/npc/018-1/_mobs.txt
new file mode 100644
index 000000000..b3c21ab9f
--- /dev/null
+++ b/npc/018-1/_mobs.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-1: Sincerity mobs
+018-1,69,65,6,6 monster Evil Mushroom 1042,4,20000,60000
+018-1,32,33,6,6 monster Squirrel 1032,3,30000,60000
+018-1,46,48,2,0 monster Clover Patch 1028,1,10000,120000
+018-1,37,60,11,10 monster Poison Spiky Mushroom 1043,5,10000,30000
+018-1,54,36,8,9 monster Bat 1039,4,25000,30000
+018-1,59,51,6,4 monster Log Head 1066,2,25000,30000
diff --git a/npc/018-1/_warps.txt b/npc/018-1/_warps.txt
new file mode 100644
index 000000000..55139b11a
--- /dev/null
+++ b/npc/018-1/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-1: Sincerity warps
+018-1,54,37,0 warp #018-1_54_37 0,0,018-1-1,33,77
+018-1,32,67,0 warp #018-1_32_67 0,0,017-1,152,223
diff --git a/npc/018-1/george.txt b/npc/018-1/george.txt
new file mode 100644
index 000000000..004d6a3dd
--- /dev/null
+++ b/npc/018-1/george.txt
@@ -0,0 +1,176 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Old pirate with quests.
+// LOFQuest_George
+// 1 - Roger assigned the task
+// 2 - First task accepted
+// 3 - First task complete
+// 4 - Second task accepted
+// 5 - Second task complete
+
+018-1,26,36,0 script George NPC_GEORGE,{
+ .@q=getequipid(EQI_HEAD_TOP);
+ .@q1=getequipid(EQI_ACC_R);
+ if (.@q == CorsairHat) goto L_Pirate;
+ if (.@q == PirateBandana) goto L_Bandana;
+ if (.@q == RightEyePatch || .@q1 == EyePatch) goto L_EyePatch;
+
+ mesn l("George the Pirate");
+ mesq l("Yar! Do you need something, matey?");
+ goto L_Main;
+
+// Intro dialogs
+L_Pirate:
+ mesn l("George the Pirate");
+ mesq l("Arrrrh! Ye be wearing a pirate's hat!");
+ goto L_Main;
+
+L_Bandana:
+ mesn l("George the Pirate");
+ mesq l("Arrrrh! Ye remind me of my old first mate!");
+ goto L_Main;
+
+L_EyePatch:
+ mesn l("George the Pirate");
+ mesq l("Arrrrh! Looks like ye lost an eye there!");
+ goto L_Main;
+
+// Main Menu
+L_Main:
+ .@q=getq(LoFQuest_George);
+
+ menu
+ l("What is this island?"), L_Explain,
+ rif(.@q == 1, l("Actually, I heard from Roger that you may need some help.")), L_RequestOne,
+ rif(.@q == 2, l("About the items you asked me to collect...")), L_ProgressOne,
+ rif(.@q == 3 && 0, l("Do you need any more help?")), L_RequestTwo,
+ rif(.@q == 4 && 0, l("About the items you asked me to collect...")), L_ProgressTwo,
+ l("Nothing I guess"), L_Close;
+
+// Context menu
+L_Explain:
+ mesn l("George the Pirate");
+ mesq l("Arrr matey! This is @@, yarr.", l("##BSincerity Island##b"));
+ next;
+ mesn l("George the Pirate");
+ mesq l("Nobody lives here for years, arr. Monsters have taken over everything, yarr.");
+ next;
+ mesn l("George the Pirate");
+ mesq l("It is a pirate treasure hideout, yarr arr! If you have a @@ and a @@, you may get luck, yarr!", getitemlink(PirateTreasureMap), getitemlink(IronShovel));
+ next;
+ goto L_Main;
+
+
+// Requests
+L_RequestOne:
+ if (BaseLevel < 40)
+ goto L_Weak;
+ mesn l("George the Pirate");
+ mesq l("Roger, eh? Aye, I do need help. If you bring me 30 @@, 50 @@, and 30 @@, maybe I can give you a reward.", getitemlink(Beer), getitemlink(EmptyBottle), getitemlink(CasinoCoins));
+ setq LoFQuest_George, 2;
+ close;
+
+L_RequestTwo:
+ if (BaseLevel < 60)
+ goto L_Weak;
+ mesn l("George the Pirate");
+ mes "\"Arrr matey! My captain asked me to have you get him some items. Please bring us 50 zombie nachos and 50 lady fingers, my captain likes to snack on those during our long voyages. Oh, and something to read too!\"";
+ setq LoFQuest_George, 4;
+ close;
+
+// Progress Report 1
+L_ProgressOne:
+ if (countitem(Beer) < 30 ||
+ countitem(EmptyBottle) < 50 ||
+ countitem(CasinoCoins) < 30)
+ goto L_NotEnough;
+
+ mesn l("George the Pirate");
+ mesq l("Did you brought everything I ask for?");
+ select
+ l("Yes"),
+ l("Not sure");
+
+ if (@menu == 2)
+ goto L_NotEnough;
+
+ mesn l("George the Pirate");
+ mesq l("Yar matey! You have the items I asked for! You have the honor and trust we pirates bestow each other!");
+
+ inventoryplace SailorHat, 1;
+ delitem Beer, 30;
+ delitem EmptyBottle, 50;
+ delitem CasinoCoins, 30;
+ mes "";
+ mesq l("Here is a reward for your effort! Now you can be a true buccaneer!");
+ getitem SailorHat, 1;
+ getexp 5000, 0;
+ setq LoFQuest_George, 3;
+ goto L_Close;
+
+// Progress Report 2
+L_ProgressTwo:
+ if (countitem(WarlordPlate) < 100 ||
+ countitem(WarlordPlate) < 50 ||
+ countitem(WarlordPlate) < 1)
+ goto L_NotEnough;
+
+ mesn l("George the Pirate");
+ mesq l("Did you brought everything I ask for?");
+ select
+ l("Yes"),
+ l("Not sure");
+
+ if (@menu == 2)
+ goto L_NotEnough;
+
+ mesn l("George the Pirate");
+ mes "\"Arrr! Good job matey! You brought us everything we asked for, even the Maritime Almanac Scroll!\"";
+
+ inventoryplace CorsairHat, 1;
+ delitem WarlordPlate, 50;
+ delitem WarlordPlate, 50;
+ delitem WarlordPlate, 1;
+ mes "\"My captain wanted me to give this to you as a special reward for your efforts.\"";
+ getitem CorsairHat, 1;
+ getexp 15000, 0;
+ setq LoFQuest_George, 5;
+ goto L_Close;
+
+// Fallbacks
+L_Weak:
+ mesn l("George the Pirate");
+ mesq l("Arr, you are not experienced enough to help me yet!");
+ close;
+
+L_NotEnough:
+ mesn l("George the Pirate");
+ mesq l("Arrr! You did not bring me everything I asked for!");
+ if (.@q == 2)
+ goto L_NotEnoughOne;
+ if (.@q == 4)
+ goto L_NotEnoughTwo;
+ close;
+
+L_NotEnoughOne:
+ mesq l("Remember, I need 30 @@, 50 @@, and 30 @@.", getitemlink(Beer), getitemlink(EmptyBottle), getitemlink(CasinoCoins));
+ goto L_Close;
+
+L_NotEnoughTwo:
+ mesq l("Remember, I need 100 @@, 50 @@, and something interesting to read.", getitemlink(WarlordPlate), getitemlink(CorsairHat));
+ goto L_Close;
+
+L_Close:
+ sailortalk;
+ closedialog;
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/018-2-1/_import.txt b/npc/018-2-1/_import.txt
new file mode 100644
index 000000000..1a73f6019
--- /dev/null
+++ b/npc/018-2-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-2-1: Heroes' Hold - Castle
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-2-1/_warps.txt",
+"npc/018-2-1/dustman.txt",
diff --git a/npc/018-2-1/_warps.txt b/npc/018-2-1/_warps.txt
new file mode 100644
index 000000000..fddc866d2
--- /dev/null
+++ b/npc/018-2-1/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-2-1: Heroes' Hold - Castle warps
+018-2-1,26,33,0 warp #018-2-1_26_33 2,0,018-2,72,65
+018-2-1,26,27,0 warp #018-2-1_26_27 2,0,018-2,0,0
diff --git a/npc/018-2-1/dustman.txt b/npc/018-2-1/dustman.txt
new file mode 100644
index 000000000..7a4fcd20f
--- /dev/null
+++ b/npc/018-2-1/dustman.txt
@@ -0,0 +1,27 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Void NPC
+
+018-2-1,22,29,0 script Colonel DUSTMAN NPC_CRUSADER,{
+ mesn;
+ mesq l("My man went down and still haven't returned.");
+ next;
+ mesn;
+ mesq l("I'm worried with them. Anyway, you need a special scroll to get to the Heroes Cave...");
+ next;
+ mesn;
+ mesq l("Otherwise, well, I'm not sure what will happen. You'll probably be either thrown at the wolves or something. Duh.");
+ next;
+ mesn;
+ mesq l("Take care, adventurer!");
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/018-2/_import.txt b/npc/018-2/_import.txt
new file mode 100644
index 000000000..adb5e8745
--- /dev/null
+++ b/npc/018-2/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-2: Heroes' Hold - Outside
+// 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",
diff --git a/npc/018-2/_mobs.txt b/npc/018-2/_mobs.txt
new file mode 100644
index 000000000..a27e66425
--- /dev/null
+++ b/npc/018-2/_mobs.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-2: Heroes' Hold - Outside mobs
+018-2,40,35,20,6 monster Moonshroom 1069,2,120000,40000
+018-2,21,46,0,0 monster Poison Fairy 1186,6,120000,40000
+018-2,93,37,29,10 monster Green Dragon 1195,2,120000,40000
+018-2,108,64,12,11 monster Earth Fairy 1182,4,120000,40000
+018-2,91,89,36,12 monster Grass Snake 1169,6,120000,40000
diff --git a/npc/018-2/_warps.txt b/npc/018-2/_warps.txt
new file mode 100644
index 000000000..d529700c0
--- /dev/null
+++ b/npc/018-2/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-2: Heroes' Hold - Outside warps
+018-2,63,106,0 warp #018-2_63_106 0,0,017-1,180,194
+018-2,72,63,0 warp #018-2_72_63 3,0,018-2-1,26,32
diff --git a/npc/018-3-1/_import.txt b/npc/018-3-1/_import.txt
new file mode 100644
index 000000000..42071cb7d
--- /dev/null
+++ b/npc/018-3-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-3-1: Skull Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-3-1/_mobs.txt",
+"npc/018-3-1/_warps.txt",
diff --git a/npc/018-3-1/_mobs.txt b/npc/018-3-1/_mobs.txt
new file mode 100644
index 000000000..06596d662
--- /dev/null
+++ b/npc/018-3-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3-1: Skull Cave mobs
+018-3-1,70,57,16,20 monster Shadow Plant 1189,4,60000,10000
diff --git a/npc/018-3-1/_warps.txt b/npc/018-3-1/_warps.txt
new file mode 100644
index 000000000..6cb1e0efd
--- /dev/null
+++ b/npc/018-3-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3-1: Skull Cave warps
+018-3-1,71,78,0 warp #018-3-1_71_78 1,0,018-3,0,0
diff --git a/npc/018-3/_import.txt b/npc/018-3/_import.txt
new file mode 100644
index 000000000..97be42bc6
--- /dev/null
+++ b/npc/018-3/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-3: Somber Cave
+// 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",
diff --git a/npc/018-3/_mobs.txt b/npc/018-3/_mobs.txt
new file mode 100644
index 000000000..3cb920606
--- /dev/null
+++ b/npc/018-3/_mobs.txt
@@ -0,0 +1,20 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3: Somber Cave mobs
+018-3,81,91,1,1 monster Dark Lizard 1051,2,0,20000
+018-3,37,61,1,1 monster Dark Lizard 1051,2,0,20000
+018-3,45,114,1,1 monster Troll 1171,2,10000,60000
+018-3,0,0,0,0 monster Lava Slime 1097,8,10000,0
+018-3,0,0,0,0 monster Fire Goblin 1067,30,20,0
+018-3,75,53,1,1 monster Black Slime 1178,1,10000,20000
+018-3,115,116,2,2 monster Black Scorpion 1074,1,0,10000
+018-3,0,0,0,0 monster Evil Mushroom 1042,10,20,0
+018-3,39,57,21,38 monster Lava Slime 1097,12,10000,0
+018-3,96,46,34,27 monster Lava Slime 1097,10,10000,0
+018-3,88,84,26,10 monster Lava Slime 1097,5,10000,0
+018-3,123,100,7,26 monster Lava Slime 1097,4,10000,0
+018-3,66,111,48,15 monster Lava Slime 1097,11,10000,0
+018-3,74,72,56,53 monster Black Mamba 1174,9,20000,0
+018-3,56,114,1,1 monster Black Scorpion 1074,1,0,10000
+018-3,41,76,1,1 monster Electro Worm 1173,1,0,30000
+018-3,95,94,8,4 monster Black Mamba 1174,3,20000,10000
+018-3,123,27,3,3 monster Shadow Plant 1189,1,60000,60000
diff --git a/npc/018-3/_warps.txt b/npc/018-3/_warps.txt
new file mode 100644
index 000000000..7cd142b11
--- /dev/null
+++ b/npc/018-3/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3: Somber Cave warps
+018-3,114,23,0 warp #018-3_114_23 0,0,017-2-1,27,126
+018-3,94,96,0 warp #018-3_94_96 0,0,018-4,164,104
diff --git a/npc/018-4-1/_import.txt b/npc/018-4-1/_import.txt
new file mode 100644
index 000000000..5c588d258
--- /dev/null
+++ b/npc/018-4-1/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-4-1: sicave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-4-1/_mobs.txt",
+"npc/018-4-1/_warps.txt",
diff --git a/npc/018-4-1/_mobs.txt b/npc/018-4-1/_mobs.txt
new file mode 100644
index 000000000..e8b249e32
--- /dev/null
+++ b/npc/018-4-1/_mobs.txt
@@ -0,0 +1,10 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-1: Secret Island Cave mobs
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-1: sicave mobs
+018-4-1,95,66,66,35 monster Cave Snake 1035,15,9000,3000
+018-4-1,95,84,66,18 monster Golden Scorpion 1078,7,10000,5000
+018-4-1,102,48,40,17 monster Giant Mutated Bat 1044,2,100000,50000
+018-4-1,142,64,27,44 monster Black Mamba 1174,2,100000,50000
+018-4-1,51,64,27,44 monster Troll 1171,1,90000,90000
+018-4-1,122,58,21,3 monster Shadow Plant 1189,3,30000,30000
diff --git a/npc/018-4-1/_warps.txt b/npc/018-4-1/_warps.txt
new file mode 100644
index 000000000..335f148c4
--- /dev/null
+++ b/npc/018-4-1/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-1: Secret Island Cave warps
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-1: sicave warps
+018-4-1,102,86,0 warp #018-4-1_102_86 0,0,018-4,94,90
diff --git a/npc/018-4-2/_import.txt b/npc/018-4-2/_import.txt
new file mode 100644
index 000000000..8ef742521
--- /dev/null
+++ b/npc/018-4-2/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-4-2: Secret_Island_Indoor
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-4-2/_warps.txt",
+"npc/018-4-2/susanne.txt",
diff --git a/npc/018-4-2/_warps.txt b/npc/018-4-2/_warps.txt
new file mode 100644
index 000000000..02e21aacd
--- /dev/null
+++ b/npc/018-4-2/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-2: Secret Island House warps
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4-2: Secret_Island_Indoor warps
+018-4-2,33,36,0 warp #018-4-2_33_36 0,0,018-4,73,26
diff --git a/npc/018-4-2/susanne.txt b/npc/018-4-2/susanne.txt
new file mode 100644
index 000000000..9565ff48a
--- /dev/null
+++ b/npc/018-4-2/susanne.txt
@@ -0,0 +1,171 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Slay the Fafi Dragon quest. Due the OP monster, you better find yourself a good team!
+
+018-4-2,31,26,0 script Susanne NPC_FAIRY_A,{
+ .@q=getq(LoFQuest_Fairy);
+
+ if(BaseLevel < 53) goto L_Noob;
+ if(.@q == 1) goto L_Coward;
+ if(.@q == 2) goto L_Complete;
+ if(.@q >= 3) goto L_Thanks;
+
+ mesn;
+ mesq l("Do you like fairies? Well, you should love them! We play with humans all the time, it is usually pretty fun...");
+ next;
+ mesc l("(The girl now looks away sadly, thinking about what to say next.)");
+ next;
+ mesn;
+ mesq l("But dragons came and started roaming this island. My friends are now either dead or missing. You look big and strong, do you want to avenge me?");
+ goto L_Menu;
+
+L_Menu:
+ menu
+ l("Sure, I'd love to help! What can I do?"), L_Yes,
+ l("Nah, I've got more serious matters to attend to..."), L_No;
+
+L_Yes:
+ mesn;
+ mesq l("Thank you so much! That might not bring my friends back, but will make this island much safer!");
+ next;
+ mesn;
+ mesq l("The Fafi Dragon are really really bad guys. I don't know how they came here, as they're not from the Lands Of Fire, nor from Mana World.");
+ next;
+ mesn;
+ mesq l("But this is not important. They are dangerous. They must be stop at any cost!");
+ next;
+ mesn;
+ mesq l("So if you can help, go kill at least one on this island. They take a long time to respawn.");
+ next;
+ mesn;
+ mesq l("Thank you...");
+ setq LoFQuest_Fairy, 1;
+ if (!mobcount("018-4","Susanne::OnKillFafi"))
+ goto L_Spawn;
+ close;
+
+OnKillFafi:
+ message strcharinfo(0), "You killed the Fafi Dragon.";
+ .@q=getq(LoFQuest_Fairy);
+ if (.@q == 1) {
+ setq LoFQuest_Fairy, 2;
+ mapannounce "018-4-2", "" +strcharinfo(0)+ " has killed the Fafi Dragon!", 0;
+ mapannounce "018-4-1", "" +strcharinfo(0)+ " has killed the Fafi Dragon!", 0;
+ mapannounce "018-4", "" +strcharinfo(0)+ " has killed the Fafi Dragon!", 0;
+ mapannounce "017-1", "" +strcharinfo(0)+ " has killed the Fafi Dragon!", 0;
+ message strcharinfo(0), "Cheers are being heard throughout the land!";
+ }
+ end;
+
+L_Complete:
+ mesn;
+ mesq l("Many thanks for killing it. Maybe more humans come here now, and play with me.");
+ next;
+ inventoryplace FafiMask, 1;
+ getitem FafiMask, 1;
+ getexp 80000, 200;
+ setq LoFQuest_Fairy, 3;
+ mesn;
+ mesq l("By the way, I found this Mask after you killed the Fafi Dragon, Maybe you can use it some day.");
+ next;
+ mesn;
+ mesq l("And some times, more Fafi dragons come... Don't neglect your aid.");
+ close;
+
+L_Thanks:
+ mesn;
+ mesq l("Sometimes humans come here and play with me. Many thanks for the help!");
+ if (!mobcount("018-4","Susanne::OnKillFafi") && .respawnTime <= gettimetick(2)) {
+ next;
+ mesn;
+ mesq l("Actually, about Fafi dragons...");
+ next;
+ goto L_Check;
+ }
+ close;
+
+L_No:
+ mesn;
+ mesq l("Ok...please come back when you aren't busy...");
+ next;
+ mesc l("The girl turns around and you hear her sniffing, she is probably crying...");
+ close;
+
+L_Noob:
+ mesn;
+ mesq l("Hey, have you come to play with me? I love playing with humans! Usually so few show in, it must be the dragons...");
+ //mesq l("I need some help with something, but I don't think you're strong enough. Come back later please when you're stronger.");
+ close;
+
+L_Coward:
+ if (!mobcount("018-4","Susanne::OnKillFafi"))
+ goto L_Check;
+ mesn;
+ mesq l("What are you doing talking to me? Go fight, you coward!");
+ close;
+
+L_Check:
+ if (.respawnTime > gettimetick(2) && (!mobcount("018-4","Susanne::OnKillFafi"))){
+ mesn;
+ mesq l("Just wait. Fafi dragons are slow to show up...");
+ } else {
+ mesn;
+ mesq l("The Fafi knows you are here to kill him. They are smart. But I can make a trap.");
+ next;
+ mesn;
+ mesq l("Bring me this and I'll spawn it for you:");
+ // .@q valid values are 1 (Starter) and 3 (Veteran)
+ mesc l("@@/@@ @@", countitem(ShadowHerb), .@q*5, getitemlink(ShadowHerb));
+ mesc l("@@/@@ @@", countitem(Moss), .@q*4, getitemlink(Moss));
+ mesc l("@@/@@ @@", countitem(Root), .@q*3, getitemlink(Root));
+ next;
+ mesn;
+ mesq l("I'll be attracted by the Shadow Herb. The moss will hide the roots, which will entrap it for a while.");
+ mesq l("So, do you have the items?");
+ if (askyesno() != ASK_YES) {
+ close;
+ }
+ mes "";
+ if (countitem(ShadowHerb) < .@q*5 ||
+ countitem(Moss) < .@q*4 ||
+ countitem(Root) < .@q*3) goto L_Fail;
+ if (.respawnTime > gettimetick(2)) {
+ mesn;
+ mesq l("Too slow.");
+ close;
+ }
+ delitem ShadowHerb, .@q*5;
+ delitem Moss, .@q*4;
+ delitem Root, .@q*3;
+ goto L_Spawn;
+ }
+ close;
+
+L_Spawn:
+ if (.respawnTime > gettimetick(2)){
+ mesn;
+ mesq l("Just wait. Fafi dragons are slow to show up...");
+ } else {
+ mesn;
+ mesc l("Screams");
+ mesq l("I hear a Fafi Dragon on THIS very island!!");
+ .respawnTime=gettimetick(2)+(60*90);
+ monster "018-4", any(59,78,95,118,134), any(54,64,79), strmobinfo(1, FafiDragon), FafiDragon, 1, "Susanne::OnKillFafi";
+ }
+ close;
+
+L_Fail:
+ mesn;
+ mesq l("You're lucky that this is the Land Of Fire and I'm on a good mood, otherwise, I would have killed you for lying to me.");
+ close;
+
+OnInit:
+ .respawnTime=0;
+ .sex=G_FEMALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/018-4/_import.txt b/npc/018-4/_import.txt
new file mode 100644
index 000000000..17bc5383e
--- /dev/null
+++ b/npc/018-4/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-4: Secret Island
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-4/_mobs.txt",
+"npc/018-4/_warps.txt",
diff --git a/npc/018-4/_mobs.txt b/npc/018-4/_mobs.txt
new file mode 100644
index 000000000..8d75fc383
--- /dev/null
+++ b/npc/018-4/_mobs.txt
@@ -0,0 +1,10 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4: Secret Island mobs
+018-4,120,68,46,21 monster Golden Scorpion 1078,7,10000,5000
+018-4,98,47,46,32 monster Night Scorpion 1077,5,20000,10000
+018-4,98,47,46,32 monster Black Slime 1178,10,15000,10000
+018-4,91,60,76,47 monster Red Slime 1092,12,12000,4000
+018-4,91,60,76,47 monster Yellow Slime 1091,15,30000,30000
+018-4,91,56,76,43 monster Clover Patch 1028,2,75000,35000
+018-4,91,60,76,47 monster Mouboo 1023,3,12000,4000
+018-4,98,66,40,12 monster Wicked Mushroom 1176,2,85000,65000
diff --git a/npc/018-4/_warps.txt b/npc/018-4/_warps.txt
new file mode 100644
index 000000000..ed546e4f0
--- /dev/null
+++ b/npc/018-4/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-4: Secret Island warps
+018-4,94,89,0 warp #018-4_94_89 0,0,018-4-1,102,84
+018-4,164,105,0 warp #018-4_164_105 0,0,018-3,94,95
+018-4,73,24,0 warp #018-4_73_24 0,0,018-4-2,33,34
diff --git a/npc/018-5/_import.txt b/npc/018-5/_import.txt
new file mode 100644
index 000000000..aa575340c
--- /dev/null
+++ b/npc/018-5/_import.txt
@@ -0,0 +1,4 @@
+// Map 018-5: Lilit Island
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-5/_mobs.txt",
+"npc/018-5/soul_menhir.txt",
diff --git a/npc/018-5/_mobs.txt b/npc/018-5/_mobs.txt
new file mode 100644
index 000000000..0b1e80524
--- /dev/null
+++ b/npc/018-5/_mobs.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-5: Lilit Island mobs
+018-5,68,87,25,16 monster Water Fairy 1185,8,20000,40000
+018-5,66,84,25,18 monster Grass Snake 1169,10,10000,10000
+018-5,82,88,41,15 monster Wind Fairy 1185,8,40000,20000
+018-5,99,47,22,14 monster Poison Fairy 1186,6,30000,30000
+018-5,58,146,26,12 monster Mountain Snake 1123,6,120000,0
diff --git a/npc/018-5/soul_menhir.txt b/npc/018-5/soul_menhir.txt
new file mode 100644
index 000000000..e4d2ea439
--- /dev/null
+++ b/npc/018-5/soul_menhir.txt
@@ -0,0 +1,20 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// Soul Menhir
+
+018-5,111,52,0 script Soul Menhir#lil NPC_SOUL_MOSS,{
+ @map$ = "018-1";
+ setarray @Xs, 110, 111, 112;
+ setarray @Ys, 53, 53, 53;
+ @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/_import.txt b/npc/_import.txt
index 3f915ba30..aca63f202 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -5,14 +5,22 @@
@include "npc/000-1/_import.txt"
@include "npc/001-1/_import.txt"
@include "npc/001-2/_import.txt"
+@include "npc/001-3-1/_import.txt"
+@include "npc/001-3/_import.txt"
@include "npc/001-4/_import.txt"
@include "npc/001-5/_import.txt"
+@include "npc/001-6/_import.txt"
+@include "npc/001-7/_import.txt"
+@include "npc/001-8/_import.txt"
+@include "npc/001-9/_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-0-1/_import.txt"
@include "npc/003-0/_import.txt"
+@include "npc/003-1-1/_import.txt"
@include "npc/003-1-2/_import.txt"
@include "npc/003-1-3/_import.txt"
@include "npc/003-1/_import.txt"
@@ -20,6 +28,7 @@
@include "npc/003-13/_import.txt"
@include "npc/003-2/_import.txt"
@include "npc/003-3/_import.txt"
+@include "npc/003-4-1/_import.txt"
@include "npc/003-4/_import.txt"
@include "npc/003-5/_import.txt"
@include "npc/003-6/_import.txt"
@@ -29,19 +38,64 @@
@include "npc/004-2-1/_import.txt"
@include "npc/004-2/_import.txt"
@include "npc/005-1/_import.txt"
+@include "npc/005-2-1/_import.txt"
@include "npc/005-2/_import.txt"
@include "npc/005-3/_import.txt"
@include "npc/005-4/_import.txt"
@include "npc/005-5/_import.txt"
@include "npc/005-6/_import.txt"
@include "npc/005-7/_import.txt"
+@include "npc/006-1/_import.txt"
@include "npc/007-1/_import.txt"
+@include "npc/008-0/_import.txt"
+@include "npc/008-1/_import.txt"
+@include "npc/008-2/_import.txt"
@include "npc/009-1/_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/010-1-1/_import.txt"
@include "npc/010-1/_import.txt"
@include "npc/010-2/_import.txt"
@include "npc/011-1/_import.txt"
@include "npc/011-2/_import.txt"
+@include "npc/012-1/_import.txt"
+@include "npc/012-2/_import.txt"
+@include "npc/012-3/_import.txt"
+@include "npc/012-4/_import.txt"
+@include "npc/012-5/_import.txt"
+@include "npc/012-6/_import.txt"
+@include "npc/012-7/_import.txt"
+@include "npc/014-1/_import.txt"
+@include "npc/014-2/_import.txt"
+@include "npc/014-3/_import.txt"
+@include "npc/014-4/_import.txt"
+@include "npc/014-5/_import.txt"
+@include "npc/015-1/_import.txt"
+@include "npc/015-2/_import.txt"
+@include "npc/015-3/_import.txt"
+@include "npc/015-4/_import.txt"
+@include "npc/016-1/_import.txt"
+@include "npc/016-6/_import.txt"
+@include "npc/016-7/_import.txt"
+@include "npc/017-1/_import.txt"
+@include "npc/017-2-1/_import.txt"
+@include "npc/017-2/_import.txt"
+@include "npc/017-3/_import.txt"
+@include "npc/017-4/_import.txt"
+@include "npc/017-5/_import.txt"
+@include "npc/017-6/_import.txt"
+@include "npc/018-1-1/_import.txt"
+@include "npc/018-1/_import.txt"
+@include "npc/018-2-1/_import.txt"
+@include "npc/018-2/_import.txt"
+@include "npc/018-3-1/_import.txt"
+@include "npc/018-3/_import.txt"
+@include "npc/018-4-1/_import.txt"
+@include "npc/018-4-2/_import.txt"
+@include "npc/018-4/_import.txt"
+@include "npc/018-5/_import.txt"
@include "npc/boss/_import.txt"
@include "npc/botcheck/_import.txt"
@include "npc/sec_pri/_import.txt"
diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt
index 869616e2f..38261f60f 100644
--- a/npc/commands/debug-look.txt
+++ b/npc/commands/debug-look.txt
@@ -1,23 +1,28 @@
function script BarberDebug {
function setGender {
- //clear;
- //setnpcdialogtitle l("Appearance Debug - Sex Change");
- //mes l("Please choose the desired gender:");
- //next;
- //menuint
- // l("Male"), G_MALE,
- // l("Female"), G_FEMALE,
- // l("Other"), G_OTHER;
-
- //Sex = @menuret; // FIXME: make this work like in tmwAthena
- //return;
-
+ clear;
+ setnpcdialogtitle l("Appearance Debug - Sex Change");
+ @menuret=99;
+ /*
+ mes l("Please choose the desired gender:");
+ next;
+ menuint
+ l("Male"), G_MALE,
+ l("Female"), G_FEMALE,
+ l("Legacy"), 99;
+ */
- // ^ Future code, Doesn't work yet
- closedialog;
- changecharsex;
+ if (@menuret == 99) {
+ closedialog;
+ changecharsex;
+ } else {
+ //setparam(Sex, @menuret);
+ //query_sql("UPDATE `char` SET `Sex`="+@menuret+" WHERE `char_id`="+getcharid(0));
+ return;
+ }
}
+
function setStyle {
clear;
setnpcdialogtitle l("Appearance Debug - Barber");
@@ -96,7 +101,4 @@ OnCall:
BarberDebug;
closedialog;
end;
-
-OnInit:
- bindatcmd "look", "@look::OnCall", 99, 99, 0;
}
diff --git a/npc/commands/debug-preset.txt b/npc/commands/debug-preset.txt
deleted file mode 100644
index 92d9314b8..000000000
--- a/npc/commands/debug-preset.txt
+++ /dev/null
@@ -1,247 +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] <instruction>[, <instruction>...]
-// usage: DoRoutine "[options] <instruction>[, <instruction>...]";
-//
-// 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*
-// Note from Jesusalva: I do not trust this script works well for TMW2.
-
-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;
- /* (b) */
- 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) => gender (reserved) */
- /* (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;
- }
- }
- }
-
- 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", 99, 99, 1;
-}
diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt
index 9c4254d60..86f0e46f5 100644
--- a/npc/commands/debug-quest.txt
+++ b/npc/commands/debug-quest.txt
@@ -1,7 +1,5 @@
// TODO: This script must be auto-generated from db/quests.conf to be of any use
function script GlobalQuestDebug {
-
- function qDebugGeneral {
do
{
clear;
@@ -22,37 +20,31 @@ function script GlobalQuestDebug {
input .@quest;
if (!.@quest) return;
mes "";
- mes l("DEBUG: Changing @@ from @@ to something else.", getquestlink(.@quest), getq(.@quest));
+ mes l("DEBUG: Changing @@, Values: (@@, @@, @@).", getquestlink(.@quest), getq(.@quest), getq2(.@quest), getq3(.@quest));
+ select
+ "set 1",
+ "set 2",
+ "set 3",
+ "reset";
+ mes l("DEBUG: Changing @@ field @@ to something else.", getquestlink(.@quest), @menu);
mes "";
mes "Determine the new value (numeric only)";
input .@value;
if (.@value < 0) return;
- setq .@quest, .@value;
+ if (@menu == 1)
+ setq1 .@quest, .@value;
+ if (@menu == 2)
+ setq2 .@quest, .@value;
+ if (@menu == 3)
+ setq3 .@quest, .@value;
+ if (@menu == 4)
+ setq .@quest, .@value, 0, 0;
return;
default: return;
}
} 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("Other"),
- rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu")));
-
- switch (@menu)
- {
- case 1: qDebugGeneral; break;
- default: return;
- }
- } while (1);
+ return;
}
@@ -61,14 +53,38 @@ function script GlobalQuestDebug {
end;
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
GlobalQuestDebug;
closedialog;
end;
+OnSetq:
+ if (.@atcmd_numparameters < 2) {
+ dispbottom "setq called with invalid arguments (min. 2)";
+ dispbottom "GM Command syntax: @setq <quest_id> <val1> <val2> <val3>";
+ 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 @@ modified by GM", getquestlink(.@q));
+ specialeffect 50, SELF, playerattached();
+ break;
+ default:
+ dispbottom "setq called with invalid arguments (max. 4)";
+ dispbottom "GM Command syntax: @setq <quest_id> <val1> <val2> <val3>";
+ break;
+ }
+ end;
+
OnInit:
bindatcmd "qdebug", "@qdebug::OnCall", 99, 99, 1;
+ bindatcmd "setq", "@qdebug::OnSetq", 99, 99, 1;
}
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index 4d04cb99a..5bca29129 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -5,8 +5,7 @@ function script GlobalDebugMenu {
resetskill;
resetlvl 1;
dispbottom l("Reset done!");
- if (getarg(0,0) == 3)
- {
+ if (getarg(0,0) == 3) {
closedialog;
doevent "::OnGlobalQuestReset"; // executes in all quest npcs // FIXME: maybe have a `resetquest` buildin?
Zeny = 0;
@@ -21,13 +20,12 @@ function script GlobalDebugMenu {
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"));
+ l("Abort"),
+ l("Reset stats, skills, level"),
+ l("Reset EVERYTHING"),
+ l("Return to Debug menu");
- switch (@menu)
- {
+ switch (@menu) {
case 2:
case 3: doReset @menu;
}
@@ -96,15 +94,15 @@ function script GlobalDebugMenu {
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")),
- menuimage("actions/reset", l("Reset")),
- rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
+ l("Change my level"),
+ l("Change my stats"),
+ l("Change my skills"),
+ l("Change my appearance"),
+ l("Create items"),
+ l("Get money"),
+ l("Change my quests"),
+ l("Reset"),
+ rif(getarg(0,0), l("Return to Super Menu"));
.@c = getarg(0,0) ? 2 : 1;
@@ -115,7 +113,7 @@ function script GlobalDebugMenu {
case 3: GlobalSkillDebug .@c; break;
case 4: BarberDebug .@c; break;
case 5: closedialog; clientcommand "createitems"; end;
- case 6: Zeny = 0x7FFFFFFE; break;
+ case 6: dispbottom l("Use ##B@zeny##b instead!"); break;
case 7: GlobalQuestDebug .@c; break;
case 8: resetAll; break;
case 9: return;
@@ -129,8 +127,7 @@ function script GlobalDebugMenu {
end;
OnCall:
- if (!debug && !is_admin())
- {
+ if (!debug && !is_admin()) {
end;
}
GlobalDebugMenu;
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index c3bde37ff..becdcf6d6 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -1,3 +1,19 @@
+// Delete item ID on inventories, storages, guild storages and carts. Also affects mails.
+// WARNING, irreversible and dangerous!
+// DelItemFromEveryPlayer( ID )
+function script DelItemFromEveryPlayer {
+ if (getarg(0, -1) < 0)
+ return;
+
+ query_sql("DELETE FROM `inventory` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `cart_inventory` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `storage` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `guild_storage` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `rodex_items` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `auction` WHERE `nameid`="+getarg(0));
+ return;
+}
+
function script GlobalEventMenu {
function rateManagement {
@@ -28,19 +44,70 @@ function script GlobalEventMenu {
return;
}
+ function sEaster {
+ // Delete all GoldenEasteregg and SilverEasteregg from every player
+ // WARNING, possibly dangerous.
+ DelItemFromEveryPlayer(GoldenEasteregg);
+ DelItemFromEveryPlayer(GoldenEasteregg);
+
+ // Enable event
+ set $EVENT$, "Easter";
+ logmes "Enabled EASTER event.", LOGMES_ATCOMMAND;
+ return;
+ }
+
+ function sChristmas {
+ // Delete all Christmas stuff?
+ DelItemFromEveryPlayer(GoldenEasteregg);
+ DelItemFromEveryPlayer(GoldenEasteregg);
+
+ // Add drops?
+
+ // Change maps?
+ addmapmask "009-1", MASK_CHRISTMAS;
+ addmapmask "017-2", MASK_CHRISTMAS;
+ addmapmask "017-2-1", MASK_CHRISTMAS;
+ addmapmask "017-3", MASK_CHRISTMAS;
+
+ // Enable event
+ set $EVENT$, "Christmas";
+ logmes "Enabled CHRISTMAS event.", LOGMES_ATCOMMAND;
+ return;
+ }
+ //MASK_CHRISTMAS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function seasonManagement {
clear;
mes l("Current event: @@", $EVENT$);
menu
l("Disable event"), -,
l("Enable Easter"), -,
- l("Enable Worker's Day"), -;
+ l("Enable Worker's Day"), -,
+ l("Reset Kill Saulc Event (Monthly)"), -,
+ l("Enable Refeer Program"), -;
- switch (@menu)
- {
- case 1: set $EVENT$, ""; logmes "Disabled events.", LOGMES_ATCOMMAND;
+ switch (@menu) {
+ case 1: set $EVENT$, "";$REFERRAL_ENABLED=0; logmes "Disabled events.", LOGMES_ATCOMMAND;
break;
- case 2: set $EVENT$, "Easter"; logmes "Enabled EASTER event.", LOGMES_ATCOMMAND; break;
+ case 2: sEaster(); break;
case 3:
set $EVENT$, "Worker Day";
logmes "Enabled WORKERS DAY event.", LOGMES_ATCOMMAND;
@@ -49,6 +116,9 @@ function script GlobalEventMenu {
debugmes "Snakes are now dropping Pearls.";
*/
break;
+ case 4: DelItemFromEveryPlayer(MurdererCrown); break;
+ case 5: $EVENT$="Refeer";$REFERRAL_ENABLED=1; logmes "Enabled REFEER event.", LOGMES_ATCOMMAND;
+ break;
}
return;
@@ -70,8 +140,7 @@ function script GlobalEventMenu {
//.@c = getarg(0,0) ? 2 : 1; // 1 = back to event menu, 2 = back to super menu
- switch (@menu)
- {
+ switch (@menu) {
case 1: rateManagement; break;
case 2: dropManagement; break;
case 3: seasonManagement; break;
@@ -87,15 +156,46 @@ function script GlobalEventMenu {
end;
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
GlobalEventMenu;
closedialog;
end;
+}
+
+- script @toevent 32767,{
+ end;
+
+OnCall:
+ if (!$@GM_EVENT)
+ dispbottom l("The mana bridge is closed at the moment.");
+ else if (BaseLevel < 10)
+ dispbottom l("You are not strong enough to survive this trip.");
+ else if (readparam(Sp) != readparam(MaxSp))
+ dispbottom l("You need all your mana to do this trip.");
+ else if (readparam(Hp) != readparam(MaxHp))
+ dispbottom l("You cannot be hurt to do this trip.");
+ else if (getmapname() ~= "001-*")
+ dispbottom l("You are already at the Mana Plane of Existence.");
+ else if (getmapname() == "boss" || getmapname() == "sec_pri" || getmapname() ~= "000-*" || getmapname() ~= "008-*" || getmapname() ~= "sore*")
+ dispbottom l("The Mana Plane is currently out of reach.");
+ else {
+ .@gt=$@AEROS_SPWN;
+ if (.@gt == 2)
+ .@gt=rand(0,1);
+ switch (.@gt) {
+ case 0:
+ warp "001-1", 235, 26; break;
+ case 1:
+ warp "001-1", 23, 108; break;
+ }
+ specialeffect(63, AREA, getcharid(3));
+ }
+ end;
OnInit:
bindatcmd "event", "@event::OnCall", 99, 99, 0;
+ bindatcmd "toevent", "@toevent::OnCall", 0, 99, 0;
}
diff --git a/npc/commands/exp.txt b/npc/commands/exp.txt
new file mode 100644
index 000000000..a8ffe7393
--- /dev/null
+++ b/npc/commands/exp.txt
@@ -0,0 +1,20 @@
+// @getexp atcommand
+// Gets experience
+//
+// group lv: 5
+// group char lv: 99
+// log: True
+
+- script @getexp 32767,{
+ end;
+
+OnCall:
+ .@delta$ = .@atcmd_parameters$[0];
+ .@d = atoi(.@delta$);
+
+ getexp .@d, 0;
+ end;
+
+OnInit:
+ bindatcmd "getexp", "@getexp::OnCall", 5, 99, 1;
+}
diff --git a/npc/commands/ipcheck.txt b/npc/commands/ipcheck.txt
new file mode 100644
index 000000000..df72e1f5a
--- /dev/null
+++ b/npc/commands/ipcheck.txt
@@ -0,0 +1,24 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// @ipcheck <player_name>
+// #ipcheck <player_name>
+//
+// Returns user IP
+
+
+- script @ipcheck 32767,{
+ end;
+
+OnCall:
+ if (.@atcmd_numparameters == 0)
+ .@request$ = strcharinfo(0);
+ else
+ .@request$ = implode(.@atcmd_parameters$, " ");
+ dispbottom strcharinfo(0)+": IP "+getcharip(.@request$);
+ end;
+
+OnInit:
+ bindatcmd "ipcheck", "@ipcheck::OnCall", 80, 80, 1;
+ end;
+}
diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt
new file mode 100644
index 000000000..4cb8964a9
--- /dev/null
+++ b/npc/commands/kami.txt
@@ -0,0 +1,27 @@
+// TMW2 Script
+//
+// @k atcommand
+// Broadcast, and broadcast to #world too
+//
+// group lv: 0
+// group char lv: 0
+// log: True
+//
+// usage:
+// @wgm Help
+//
+
+- script @k 32767,{
+ end;
+
+OnCall:
+ .@request$ = strcharinfo(0)+": ";
+ .@request$ += implode(.@atcmd_parameters$, " ");
+ channelmes("#world", .@request$);
+ announce l(.@request$), bc_all|bc_npc;
+ end;
+
+
+OnInit:
+ bindatcmd "k", "@k::OnCall", 80, 80, 1;
+}
diff --git a/npc/commands/language.txt b/npc/commands/language.txt
new file mode 100644
index 000000000..ba5d3d6ee
--- /dev/null
+++ b/npc/commands/language.txt
@@ -0,0 +1,28 @@
+// @lang atcommand
+// Changes Language
+//
+// group lv: 0
+// group char lv: 0
+// log: False
+//
+// usage:
+// @lang
+//
+
+- script @lang 32767,{
+ end;
+
+OnCall:
+ checkclientversion;
+ mesq l("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.");
+ close;
+
+OnInit:
+ bindatcmd "lang", "@lang::OnCall", 0, 99, 0;
+ end;
+}
diff --git a/npc/commands/magic.txt b/npc/commands/magic.txt
deleted file mode 100644
index d63bf70a7..000000000
--- a/npc/commands/magic.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-function script MagicIsDead {
-
- setnpcdialogtitle l("We regret to inform...");
- mes l("Magic is dead!");
- next;
- mes "";
- mes l("You are staff, so no complaining! Go do it yourself!");
- next;
- return;
-}
-
-
-
-- script @MagicIsDead 32767,{
- end;
-
-OnCall:
- MagicIsDead;
- closedialog;
- end;
-
-OnInit:
- bindatcmd "itenplz", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "lum", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "chiza", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "ingrav", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "frillyar", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "upmarmu", "@MagicIsDead::OnCall", 100, 1, 0;
- bindatcmd "flar", "@MagicIsDead::OnCall", 100, 1, 0;
-
-
-}
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index 9b51ecbc3..5e4778b2d 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -1,12 +1,11 @@
+// TMW2 Script
function script displayMOTD {
.@size = getvariableofnpc(.size, "@motd");
.@dsize = getvariableofnpc(.dsize, "@motd");
// git stuff and such
- if (debug)
- {
- for (.@i = 0; .@i < .@dsize; ++.@i)
- {
+ if (debug) {
+ for (.@i = 0; .@i < .@dsize; ++.@i) {
dispbottom $@Debug_Messages$[.@i]; // FIXME: send this to the Debug tab instead
}
@@ -15,8 +14,7 @@ function script displayMOTD {
}
// generic MOTD
- for (.@i = 0; .@i < .@size; ++.@i)
- {
+ for (.@i = 0; .@i < .@size; ++.@i) {
dispbottom $MOTD_Messages$[.@i];
}
@@ -35,8 +33,7 @@ function script MOTDConfig {
mes l("Please enter the new line.");
input .@s$;
.@s$ = strip(.@s$);
- if (.@s$ != "")
- {
+ if (.@s$ != "") {
.@size = getvariableofnpc(.size, "@motd");
$MOTD_Messages$[.@size] = .@s$;
set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$);
@@ -80,8 +77,7 @@ function script MOTDConfig {
next;
input .@s$;
.@s$ = strip(.@s$);
- if (.@s$ != "")
- {
+ if (.@s$ != "") {
$MOTD_Messages$[.@l] = .@s$;
logmes "MOTD modified: line edited", LOGMES_ATCOMMAND;
}
@@ -94,8 +90,7 @@ function script MOTDConfig {
mes l("Enter line number:");
next;
input .@n;
- if ($MOTD_Messages$[.@n] != "")
- {
+ if ($MOTD_Messages$[.@n] != "") {
clear;
mes l("line @@: @@", .@n, $MOTD_Messages$[.@n]);
next;
@@ -107,8 +102,7 @@ function script MOTDConfig {
rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))),
menuimage("actions/home", l("Return to main menu"));
- switch (@menu)
- {
+ switch (@menu) {
case 2: removeLine .@n; return;
case 3: editLine .@n; return;
case 4: moveUp .@n; return;
@@ -128,12 +122,10 @@ function script MOTDConfig {
mes "---";
.@size = getvariableofnpc(.size, "@motd");
- for (.@i = 0; .@i < .@size; ++.@i)
- {
+ for (.@i = 0; .@i < .@size; ++.@i) {
mes l("line @@: @@", .@i, $MOTD_Messages$[.@i]);
}
- if (.@size == 0)
- {
+ if (.@size == 0) {
mes "(" + l("no active MOTD") + ")";
}
mes "---";
@@ -146,14 +138,15 @@ function script MOTDConfig {
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")));
+ rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))),
+ rif(!getarg(0,0), menuimage("actions/home", l("Close")));
- switch (@menu)
- {
+ switch (@menu) {
case 1: toggleMOTD; break;
case 2: addNewLine; break;
case 3: modifyLine .@size; break;
case 4: displayMOTD; break;
+ case 6: close; break;
default: return;
}
} while (1);
@@ -165,8 +158,7 @@ function script MOTDConfig {
end;
OnCall:
- if (!is_admin())
- {
+ if (!is_admin()) {
end;
}
@@ -175,16 +167,25 @@ OnCall:
end;
OnPCLoginEvent:
- if ($MOTD_Disabled < 1)
- {
+ if ($MOTD_Disabled < 1) {
displayMOTD;
}
- if (debug)
- {
+ if (debug) {
dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
}
// Handle daily login bonus
+ // The Strange Coin output wasn't changed, but now it relies on streaks.
+ // Variables:
+ // #LOGIN_DAY
+ // Current day
+ // #LOGIN_TABLE
+ // Current month
+ // #LOGIN_STREAK
+ // Number of monthly connections
+ // #LOGIN_ALLTIME
+ // Number of times you claimed the top prize (27 days streak)
+
if (#LOGIN_DAY != .login_ref) {
// Is it a new month?
if (#LOGIN_TABLE == gettime(6)) {
@@ -197,31 +198,64 @@ OnPCLoginEvent:
// Update last day you've claimed a reward
#LOGIN_DAY = .login_ref;
- // Handle rewards: Streaks first, daily later. Streak reward overrides daily reward.
+ // Handle rewards: Streaks first, daily later. Streak reward prevail over daily reward.
if (#LOGIN_STREAK > 27) {
getitem StrangeCoin, 2;
- dispbottom l("##2 @@ Days login bonus: ##B2x @@##b", #LOGIN_STREAK, getitemlink(StrangeCoin));
+ getitem CasinoCoins, 1;
+ dispbottom l("##2 @@ Days login bonus: ##B2x @@, 1x @@##b", #LOGIN_STREAK, getitemlink(StrangeCoin), getitemlink(CasinoCoins));
} else if (#LOGIN_STREAK == 27) {
- getitem RightEyePatch, 1;
- dispbottom l("##2 27 Days login bonus: ##B1x @@##b", getitemlink(RightEyePatch)); // TODO placeholder
+ #LOGIN_ALLTIME+=1;
+ // Your prize is based on season
+ switch (season()) {
+ case AUTUMN:
+ .@prize=ElixirOfLife; break;
+ case WINTER:
+ .@prize=SilverGift; break;
+ case SPRING:
+ .@prize=Toothbrush; break;
+ case SUMMER:
+ .@prize=RightEyePatch; break;
+ }
+ // Some special cases
+ if (#LOGIN_ALLTIME == 3)
+ .@prize=GoldenGift;
+ if (#LOGIN_ALLTIME == 8)
+ .@prize=PrismGift;
+
+ if (#LOGIN_ALLTIME == 12) {
+ dispbottom l("CONGRATULATIONS! For a year worth of logins, you're getting a pet!");
+ makepet Piou; // we must replace this before August 2019. (r18 probably)
+ }
+
+ getitem .@prize, 1;
+ dispbottom l("##2 27 Days login bonus: ##B1x @@##b", getitemlink(.@prize));
} else if (#LOGIN_STREAK == 21) {
- getitem StrangeCoin, 3;
- dispbottom l("##2 21 Days login bonus: ##B3x @@##b", getitemlink(StrangeCoin));
+ getitem StrangeCoin, 7;
+ dispbottom l("##2 21 Days login bonus: ##B7x @@##b", getitemlink(StrangeCoin));
} else if (#LOGIN_STREAK == 14) {
- getitem StrangeCoin, 2;
- dispbottom l("##2 14 Days login bonus: ##B2x @@##b", getitemlink(StrangeCoin));
+ getitem StrangeCoin, 5;
+ dispbottom l("##2 14 Days login bonus: ##B5x @@##b", getitemlink(StrangeCoin));
} else if (#LOGIN_STREAK == 7) {
- getexp 0, max(20, rand(0, #LOGIN_STREAK));
- dispbottom l("##2 7 Days login bonus: ##B@@ Job Exp.##b", max(20, rand(0, #LOGIN_STREAK)));
- } else if (.login_ref % 3 == 0) {
+ getitem StrangeCoin, 2;
+ dispbottom l("##2 7 Days login bonus: ##B2x @@##b", getitemlink(StrangeCoin));
+ } else if (#LOGIN_STREAK == 3) {
getitem StrangeCoin, 1;
- dispbottom l("##2Daily login bonus: ##B1x @@##b", getitemlink(StrangeCoin));
+ dispbottom l("##2 3 Days login bonus: ##B1x @@##b", getitemlink(StrangeCoin));
+ } else if (.login_ref % 3 == 0) {
+ .@value=max(5, rand(0, (#LOGIN_STREAK/4)));
+ .@value+=(BaseLevel**2);
+ getexp .@value, 0;
+ dispbottom l("##2Daily login bonus: ##B@@ EXP##b", .@value);
} else if (.login_ref % 3 == 1) {
- set Zeny, Zeny+max(20, rand(0, (#LOGIN_STREAK*2)));
- dispbottom l("##2Daily login bonus: ##B@@ GP##b", str( max(20, rand(0, (#LOGIN_STREAK*2))) ) );
+ .@value=max(20, rand(0, (#LOGIN_STREAK*2)));
+ .@value+=(BaseLevel+JobLevel);
+ Zeny=Zeny+.@value;
+ dispbottom l("##2Daily login bonus: ##B@@ GP##b", .@value);
} else {
- getexp 0, max(5, rand(0, (#LOGIN_STREAK/4)));
- dispbottom l("##2Daily login bonus: ##B@@ Job Exp.##b", max(5, rand(0, (#LOGIN_STREAK/4))));
+ .@value=max(5, rand(0, (#LOGIN_STREAK/4)));
+ .@value+=(JobLevel**2);
+ getexp 0, .@value;
+ dispbottom l("##2Daily login bonus: ##B@@ Job Exp.##b", .@value);
}
}
diff --git a/npc/commands/music.txt b/npc/commands/music.txt
index 82b7fc139..7c1ad9ac5 100644
--- a/npc/commands/music.txt
+++ b/npc/commands/music.txt
@@ -15,8 +15,7 @@
end;
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
@@ -26,11 +25,10 @@ OnCall:
.@key$ = .@atcmd_parameters$[0];
.@m$ = htget(.hash, .@key$, "Not found");
- if (.@m$ == "Not found")
- {
+ if (.@m$ == "Not found") {
//.@m$ = implode(.@atcmd_parameters$[0], " ");
dispbottom "Invalid music key. Current accepted values are:";
- dispbottom "ship, city, ghoul, surreal, magic, forest, mythica, acid, misuse, prelude, sunrise, peace, toast";
+ dispbottom "ship, city, ghoul, surreal, magic, forest, mythica, acid, misuse, prelude, sunrise, peace, toast, woodland2, lands, deepcave";
} else {
changemusic .@map$, .@m$;
}
@@ -40,12 +38,12 @@ OnInit:
bindatcmd "music", "@music::OnCall", 80, 80, 1;
.hash = htnew; // create hashtable
- htput(.hash, "ship", "bartk - in the forest of the birches.ogg");
- htput(.hash, "city", "bartk - the adventure begins.ogg");
- htput(.hash, "ghoul", "eric matyas - ghoulish fun.ogg");
- htput(.hash, "surreal", "eric matyas - surreal place.ogg");
- htput(.hash, "magic", "magick - real.ogg");
- htput(.hash, "forest", "dariunas - the forest.ogg");
+ htput(.hash, "ship", "bartk_forest_of_birches.ogg");
+ htput(.hash, "city", "bartk_adventure.ogg");
+ htput(.hash, "ghoul", "eric_matyas_ghouls.ogg");
+ htput(.hash, "surreal", "eric_matyas_surreal.ogg");
+ htput(.hash, "magic", "magick_real.ogg");
+ htput(.hash, "forest", "dariunas_forest.ogg");
htput(.hash, "mythica", "mythica.ogg");
htput(.hash, "acid", "3b5.ogg");
htput(.hash, "misuse", "misuse.ogg");
@@ -53,4 +51,7 @@ OnInit:
htput(.hash, "sunrise", "tws_birds_in_the_sunrise.ogg");
htput(.hash, "peace", "peace.ogg");
htput(.hash, "toast", "dragon_and_toast.ogg");
+ htput(.hash, "woodland2", "New_Woodlands.ogg");
+ htput(.hash, "lands", "Unforgiving_Lands.ogg");
+ htput(.hash, "deepcave", "Deep_Cave.ogg");
}
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index a9cabd13c..d2ef19ec7 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -10,6 +10,7 @@
//setbattleflag("quest_exp_rate", .original_quest_rate);
charcommand("@reloadmobdb"); // this is on purpose (callable without RID)
//charcommand("@reloadquestdb");
+ SeasonReload(1);
}
function remainingTime {
@@ -21,16 +22,14 @@
OnCall:
if (!is_gm())
- {
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)
- {
+ if (.@new_rate > 0) {
+
// set new exp rate
.hours = 0;
.max_hours = .@hours;
@@ -39,34 +38,29 @@ OnCall:
//setbattleflag("quest_exp_rate", .@new_rate);
charcommand("@reloadmobdb");
//charcommand("@reloadquestdb");
+ SeasonReload(1);
initnpctimer; // start counting
- announce l("@@ increased experience rate to @@%. It will only last @@!", strcharinfo(2), .@new_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)), bc_all;
+ announce strcharinfo(0)+" increased experience rate to "+str(.@new_rate)+"%. It will only last "+str(FuzzyTime(time_from_hours(.max_hours), 2, 2))+"!", bc_all;
//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$ == "")
- {
+ } else if (.@new_rate == 0 && .@special$ == "") {
+
// get current exp rate
- if (.current_rate == .original_exp_rate)
- {
+ if (.current_rate == .original_exp_rate) {
dispbottom l("Current exp rate is set to @@% (default value).", .current_rate);
- }
-
- else
- {
+ } 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
- {
+ } else {
+
// reset
rateCleanUp;
dispbottom l("Exp rate has been reset to @@% (default value).",
@@ -77,8 +71,7 @@ OnCall:
OnTimer3600000:
// runs every hour
- if (++.hours == .max_hours)
- {
+ if (++.hours == .max_hours) {
rateCleanUp;
end;
}
@@ -86,8 +79,7 @@ OnTimer3600000:
end;
OnPCLoginEvent:
- if (.max_hours > 0)
- {
+ if (.max_hours > 0) {
dispbottom col(l("Exp rate is set to @@% for the next @@.",
.current_rate, remainingTime()), 6);
}
@@ -129,6 +121,7 @@ OnInit:
setbattleflag("item_rate_card", .org_dxn);
setbattleflag("item_rate_card_boss", .org_dxb);
charcommand("@reloadmobdb"); // this is on purpose (callable without RID) - no idea what is the purpose
+ SeasonReload(1);
}
function remainingTime {
@@ -139,8 +132,7 @@ OnInit:
}
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
@@ -165,9 +157,10 @@ OnCall:
setbattleflag("item_rate_card", .@new_rate);
setbattleflag("item_rate_card_boss", .@new_rate);
charcommand("@reloadmobdb");
+ SeasonReload(1);
initnpctimer; // start counting
- announce l("@@ increased drop rates to @@%. It will only last @@!", strcharinfo(2), .@new_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)), bc_all;
+ announce strcharinfo(0)+" increased drop rates to "+str(.@new_rate)+"%. It will only last "+str(FuzzyTime(time_from_hours(.max_hours), 2, 2))+"!", bc_all;
//dispbottom l("You successfully set the drop rate to @@%. It will reset to @@% (default value) in @@.",
// .@new_rate, .org_dcn, FuzzyTime(time_from_hours(.max_hours), 2, 2));
diff --git a/npc/commands/resync.txt b/npc/commands/resync.txt
new file mode 100644
index 000000000..5512e5d8c
--- /dev/null
+++ b/npc/commands/resync.txt
@@ -0,0 +1,30 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// 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;
+
+OnCall:
+ if (ispcdead()) {
+ dispbottom l("Impossible to resync: You are dead.");
+ end;
+ }
+ if (@rsync_delay > gettimetick(2) && readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("Not resync'ing to prevent flood.");
+ end;
+ }
+ getmapxy(.@m$, .@x, .@y, 0);
+ slide .@x, .@y;
+ @rsync_delay=gettimetick(2)+rand(6,15);
+ end;
+
+OnInit:
+ bindatcmd "resync", "@resync::OnCall", 0, 60, 0;
+ end;
+}
diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt
index ca57f8d2f..78515e09e 100644
--- a/npc/commands/scheduled-broadcasts.txt
+++ b/npc/commands/scheduled-broadcasts.txt
@@ -8,8 +8,7 @@ function script StoneBoard {
next;
input .@msg$;
.@msg$ = strip(.@msg$);
- if (.@msg$ != "")
- {
+ if (.@msg$ != "") {
return .@msg$;
}
mes l("The message cannot be empty");
@@ -34,8 +33,7 @@ function script StoneBoard {
}
function setMaxRep {
- if (getarg(0,0) == 0)
- {
+ if (getarg(0,0) == 0) {
return 0;
}
clear;
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt
index 98de5968d..cc82a6ad1 100644
--- a/npc/commands/super-menu.txt
+++ b/npc/commands/super-menu.txt
@@ -1,12 +1,6 @@
function script SuperMenu {
do
{
- if (debug && !is_gm())
- {
- GlobalDebugMenu;
- return;
- }
-
clear;
setnpcdialogtitle l("Super Menu");
mes l("This menu contains all options available to you, based on your access privileges.");
@@ -17,14 +11,31 @@ function script SuperMenu {
l("Scheduled broadcasts"),
rif(is_admin(), l("MOTD")),
rif(is_gm(), l("Event management")),
- l("Debug");
+ rif(is_admin() && !getcharid(2), l("Join teh Guild")),
+ rif(is_admin(), l("Referral Program Report")),
+ rif(is_admin(), "Broken checks"),
+ rif(is_gm(), l("Seasonal Drop Control")),
+ "Debug",
+ "Quit";
switch (@menu)
{
case 1: StoneBoard 1; break;
case 2: MOTDConfig 1; break;
case 3: GlobalEventMenu 1; break;
- case 4: GlobalDebugMenu 1; break;
+ case 4:
+ query_sql("UPDATE `char` SET `guild_id`=1 WHERE `char_id`="+getcharid(0));
+ break;
+ case 5: HallOfReferral; break;
+ case 6:
+ delitem Aquada, 1;
+ delitem Bread, 100;
+ mes("Either delitem is not working, or you had 1 aquada and 100 bread.");
+ next;
+ break;
+ case 7: SeasonControl; break;
+ case 8: GlobalDebugMenu 1; break;
+ default: close; break;
}
} while (1);
}
@@ -36,8 +47,7 @@ function script SuperMenu {
OnCall:
- if (!debug && !is_gm())
- {
+ if (!debug && !is_gm()) {
dispbottom l("You do not have the required access privileges to use the Super Menu.");
end;
}
@@ -46,20 +56,6 @@ OnCall:
closedialog;
end;
-OnPCLoginEvent:
- .@debug_skill = getskilllv(EVOL_SUPER_MENU);
-
- if (.@debug_skill > 0 && !debug)
- {
- skill EVOL_SUPER_MENU, 0, 0; // remove debug skill
- }
-
- else if (.@debug_skill < 1 && debug)
- {
- skill EVOL_SUPER_MENU, 1, 0; // give debug skill
- }
- end;
-
OnInit:
bindatcmd "super", "@super::OnCall", 80, 99, 0;
//bindatcmd "numa", "@super::OnCall", 80, 99, 0; // alias for those used to TMW's @numa - none at the moment, iirc
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
new file mode 100644
index 000000000..b0e537c5e
--- /dev/null
+++ b/npc/commands/ucp.txt
@@ -0,0 +1,81 @@
+function script UserCtrlPanel {
+ do
+ {
+ clear;
+ setnpcdialogtitle l("User Control Panel");
+ mes l("This menu gives you some options which affect your account.");
+ mes l("In some cases, your pincode will be required.");
+ mes "";
+ mes l("What do you want to access?");
+ next;
+ select
+ l("Rules"),
+ l("Game News"),
+ l("Account Information"),
+ l("Change Language"),
+ l("Quit");
+
+ switch (@menu)
+ {
+ case 1: GameRules; break;
+ case 2: GameNews; break;
+ case 3:
+ if (!validatepin())
+ break;
+ if (!@lgc) {
+ query_sql("SELECT email,logincount,last_ip FROM `login` WHERE account_id="+getcharid(3)+" LIMIT 2", .@email$, .@lgc, .@ip$);
+ @email$=.@email$;
+ @lgc=.@lgc;
+ @ip$=.@ip$;
+ } else {
+ .@email$=@email$;
+ .@lgc=@lgc;
+ .@ip$=@ip$;
+ }
+ mes l("Char Name: @@", strcharinfo(0));
+ mes l("Party Name: @@", strcharinfo(1));
+ mes l("Guild Name: @@", strcharinfo(2));
+ mes l("Clan Name: @@", strcharinfo(4));
+ mes "";
+ mes l("Email: @@", .@email$[0]);
+ if (Sex)
+ mes l("Male");
+ else
+ mes l("Female");
+ mes l("Last IP: @@", .@ip$[0]);
+ mes l("Total Logins: @@", .@lgc[0]);
+ next;
+ if (@query)
+ break;
+ @query=1;
+ query_sql("SELECT name,last_login,last_map,partner_id FROM `char` WHERE account_id="+getcharid(3)+" LIMIT 9", .@name$, .@lastlogin$, .@map$, .@married);
+ for (.@i = 1; .@i <= getarraysize(.@name$); .@i++) {
+ mesn .@name$[.@i-1];
+ mes l("Last Seen: @@", FuzzyTime(.@lastlogin$[.@i-1]));
+ mes l("Last map: @@", .@map$[.@i-1]);
+ if (.@married[.@i-1])
+ mes l("Married with @@", gf_charname(.@married[.@i-1]));
+ mes "";
+ }
+ next;
+ break;
+ case 4: asklanguage(LANG_IN_SHIP); break;
+ case 5: close; break;
+ }
+ } while (1);
+}
+
+
+
+- script @ucp 32767,{
+ end;
+
+OnCall:
+
+ UserCtrlPanel;
+ closedialog;
+ end;
+
+OnInit:
+ bindatcmd "ucp", "@ucp::OnCall", 0, 99, 0;
+}
diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt
index 4e4564bec..c40aa8bb5 100644
--- a/npc/commands/warp.txt
+++ b/npc/commands/warp.txt
@@ -1,17 +1,18 @@
+// TMW2 script
+// Evol script, gumi's script
+//
// @w atcommand
// warps using anchors or map name
//
-// group lv: 1
-// group char lv: 2
-// log: True
-//
// usage:
// @w <map or anchor> [, x [, y]]
// #w "char" <map or anchor> [, x [, y]]
//
// example:
-// @w artis
-// #w "char" artis
+// @w hali
+// @w halin
+// @w halinarzo
+// #w "char" hali
- script @w 32767,{
end;
@@ -70,6 +71,8 @@ OnInit:
"^TULIM", "003-1 41 48", // Tulishmar
"^CANDOR", "005-1 28 92", // Candor
"^HALI", "009-1 28 33", // Halinarzo
+ "^HURN", "012-1 83 63", // Hurnscald
+ "^LOF", "017-1 120 89", // Land Of Fire Village
// TBR - To Be Removed
"^BOSS", "boss 45 45", // (TBR) Jesusalva Boss Arena
@@ -77,18 +80,14 @@ OnInit:
// GM Stuff
"^AEROS|^GM", "001-1 235 26", // Floating Island of Aeros (GM Events)
+ "^ARENA", "001-2 125 222", // Aeros Arena (GM Events)
+ "^SAULC", "001-3 117 138", // GM Palace
"^EASTER", "001-4 151 157", // Easter Event Map
- "^SOREN", "soren 179 56", // Unimplemented map
+ "^WORK", "001-5 22 79", // Contributor's Cave
"^JAIL|^PRISON", "sec_pri 28 25"; // Jesusalva's Prison (and last line)
.count = getarraysize(.aliases$[0]);
- if (debug > 0)
- {
- bindatcmd "w", "@w::OnCall", 0, 2, 0;
- end;
- }
-
- bindatcmd "w", "@w::OnCall", 1, 2, 1;
+ bindatcmd "w", "@w::OnCall", 5, 80, 1;
}
diff --git a/npc/commands/wgm.txt b/npc/commands/wgm.txt
index f356305f4..cbaa95b86 100644
--- a/npc/commands/wgm.txt
+++ b/npc/commands/wgm.txt
@@ -13,18 +13,12 @@
end;
OnCall:
- .@request$ = strtoupper(strip(.@atcmd_parameters$[0])); // sanitize
- .@map$ = "";
- .@x = 0;
- .@y = 0;
-
- if (.@map$ == "")
- {
- .@map$ = .@atcmd_parameters$[0];
- }
-
- atcommand("@request "+.@map$);
+ .@request$ = strcharinfo(0)+": ";
+ .@request$ += implode(.@atcmd_parameters$, " ");
+ atcommand("@request "+.@request$);
+ end;
OnInit:
bindatcmd "wgm", "@wgm::OnCall", 0, 0, 1;
+ end;
}
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
new file mode 100644
index 000000000..e7f2c218f
--- /dev/null
+++ b/npc/config/magic.txt
@@ -0,0 +1,78 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script Core Functions
+//
+// Used for our pseudo-magic.
+// These are only helpers, you can add more restrictions and effects freely.
+// Important Variables:
+// MAGIC_EXP
+// Current mana magic experience
+// LAST_SKILL
+// Last Mana Skill used
+// MAGIC_LVL
+// Maximum tier of usable magic, capped by Mana Stone
+// MAGIC_SUBCLASS
+// Bitmasked magic subclass.
+
+// SkillID, EXP Points
+function script GetManaExp {
+ .@sk=getarg(0);
+ .@pt=getarg(1);
+ .@bonus=rand(0,getskilllv(TMW2_SAGE)*3/2);
+ if (LAST_SKILL == .@sk)
+ end;
+ LAST_SKILL=.@sk;
+ MAGIC_EXP=MAGIC_EXP+.@pt+.@bonus;
+ return;
+}
+
+// SkillID, Mana{, MP per level}
+function script MagicCheck {
+ // PRE EXECUTION
+ // Load Variables
+ .@sk=getarg(0);
+ .@mp=getarg(1);
+ .@amp=getarg(2,0);
+
+ // Check Skill
+ if (getskilllv(.@sk) < 1)
+ return 0;
+
+ // Load mana cost
+ .@amp=getarg(3,0);
+ .@mp=.@mp+getskilllv(.@sk)*.@amp-.@amp;
+
+ // Check mana
+ if (readparam(Sp) < .@mp) {
+ dispbottom l("Insufficient mana: @@/@@.", readparam(Sp), .@mp);
+ return 0;
+ }
+
+ // Apply mana cost
+ heal 0, 0-.@mp;
+
+ return 1;
+}
+
+// SkillID, MobID{, SkillLevelPerMob=2{, Level Override}}
+function script SummonMagic {
+ .@sk=getarg(0);
+ .@id=getarg(1);
+ .@adj=getarg(2,2);
+ .@lv=getarg(3,getskilllv(.@sk));
+
+ if (.@adj < 1) {
+ debugmes "\033[31mInvalid MobPerSkillLevel for SummonMagic (.@adj): "+.@adj+"\033[0m";
+ dispbottom l("Invalid parameter specified, blame saulc.");
+ end;
+ }
+
+ // Cause effect
+ // Summoned monsters live from 45 to 60 seconds, and each skill levels grants 10s extra life
+ // The 35~50 is not a defect, remember skill starts at level 1...
+ for (.@i = 0; .@i < (.@lv+(.@adj-1))/.@adj; .@i++)
+ summon("Summoned Monster", .@id, rand(35,50)+.@lv*10);
+ dispbottom l("All monsters summoned!");
+ return;
+}
diff --git a/npc/functions/asklanguage.txt b/npc/functions/asklanguage.txt
index 4bea4bd11..fad9dd6db 100644
--- a/npc/functions/asklanguage.txt
+++ b/npc/functions/asklanguage.txt
@@ -1,12 +1,13 @@
+// TMW2 script
// Evol functions.
// Author:
-// Reid
+// Reid, Jesusalva
// Description:
// Function setting the player language
function script asklanguage {
- .@nb_language = 11;
+ .@nb_language = 8;
switch (getarg(0, 0))
{
@@ -17,11 +18,8 @@ function script asklanguage {
"Te oigo... (Español)", // Spanish
"Eu te ouço... (Português)", // Portuguese
"Ich höre euch... (Deutsch)", // German
- "'k hoar ui wel... (Vlaams)", // Flemish
"Słyszę cię... (Polski)", // Polish
"Vi sento... (Italiano)", // Italian
- "Ik kan je horen... (Nederlands)", // Dutch
- "Et escolto (Català)", // Catalan
"Mi aŭdas vin... (Angle)"; // Esperanto
break;
case LANG_IN_SHIP:
@@ -31,11 +29,8 @@ function script asklanguage {
"Hablo Español.", // Spanish
"Eu falo Português.", // Portuguese
"Ich spreche Deutsch.", // German
- "'k klappe Vloams", // Flemish
"Mówię po polsku.", // Polish
"Parlo Italiano.", // Italian
- "Ik spreek Nederlands.", // Dutch
- "Parlo català.", // Catalan
"Mi parolas Esperanton."; // Esperanto
break;
default:
@@ -48,11 +43,8 @@ function script asklanguage {
"flags/es",
"flags/pt_BR",
"flags/de",
- "flags/vls",
"flags/pl",
"flags/it",
- "flags/nl_BE",
- "flags/ca",
"flags/eo";
.@menustr$ = "";
@@ -60,8 +52,7 @@ function script asklanguage {
for (.@i = 0; .@i <= .@nb_language; .@i++)
{
- if (.@i == .@nb_language)
- {
+ if (.@i == .@nb_language) {
.@separator$ = "";
}
.@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$;
@@ -71,8 +62,7 @@ function script asklanguage {
.@lang = @menu - 1;
- if (.@lang >= 0 || .@lang <= .@nb_language)
- {
+ if (.@lang >= 0 || .@lang <= .@nb_language) {
Lang = .@lang;
}
diff --git a/npc/functions/asleep.txt b/npc/functions/asleep.txt
deleted file mode 100644
index aa5abd635..000000000
--- 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
index 5b2813797..68f6f1b85 100644
--- a/npc/functions/bank.txt
+++ b/npc/functions/bank.txt
@@ -1,20 +1,19 @@
+// TMW2 Script
+// Modified by Jesusalva
// Evol scripts.
// Authors:
// gumi
// Reid
-function script MerchantGuild_Bank {
+function script Banking {
do
{
- if (BankVault > 0)
- {
+ if (BankVault > 0) {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("You currently have @@ Esperin on your bank account.",
+ l("You currently have @@ GP on your bank account.",
format_number(BankVault)),
l("What do you want to do with your money?");
- }
- else
- {
+ } else {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("What do you want to do with your money?");
}
@@ -32,19 +31,18 @@ function script MerchantGuild_Bank {
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,
+ rif(Zeny >= 5000, format_number(5000) + " GP."), 5000,
+ rif(Zeny >= 10000, format_number(10000) + " GP."), 10000,
+ rif(Zeny >= 25000, format_number(25000) + " GP."), 25000,
+ rif(Zeny >= 50000, format_number(50000) + " GP."), 50000,
+ rif(Zeny >= 100000, format_number(100000) + " GP."), 100000,
+ rif(Zeny >= 250000, format_number(250000) + " GP."), 250000,
+ rif(Zeny >= 500000, format_number(500000) + " GP."), 500000,
+ rif(Zeny >= 1000000, format_number(1000000) + " GP."), 1000000,
l("All of my money."), -2,
l("I changed my mind."), -3;
- switch (@menuret)
- {
+ switch (@menuret) {
case -1:
input @menuret;
break;
@@ -52,12 +50,10 @@ function script MerchantGuild_Bank {
@menuret = Zeny;
}
- if (@menuret > 0)
- {
- if (@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.");
+ l("You do not have enough Gold on yourself.");
break;
}
@@ -66,13 +62,12 @@ function script MerchantGuild_Bank {
.@max = MAX_BANK_ZENY - BankVault; // maximum possible deposit
.@deposit = min(.@max, @menuret); // actual deposit
- if (.@deposit > 0)
- {
+ 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));
+ l("You made a cash deposit of @@ GP.", format_number(.@deposit));
}
}
break;
@@ -83,14 +78,14 @@ function script MerchantGuild_Bank {
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,
+ rif(BankVault >= 5000, format_number(5000) + " GP."), 5000,
+ rif(BankVault >= 10000, format_number(10000) + " GP."), 10000,
+ rif(BankVault >= 25000, format_number(25000) + " GP."), 25000,
+ rif(BankVault >= 50000, format_number(50000) + " GP."), 50000,
+ rif(BankVault >= 100000, format_number(100000) + " GP."), 100000,
+ rif(BankVault >= 250000, format_number(250000) + " GP."), 250000,
+ rif(BankVault >= 500000, format_number(500000) + " GP."), 500000,
+ rif(BankVault >= 1000000, format_number(1000000) + " GP."), 1000000,
l("All of my money."), -2,
l("I changed my mind."), -3;
@@ -103,12 +98,10 @@ function script MerchantGuild_Bank {
@menuret = BankVault;
}
- if (@menuret > 0)
- {
- if (@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.");
+ l("You do not have enough Gold Pieces on your bank account.");
break;
}
@@ -117,13 +110,12 @@ function script MerchantGuild_Bank {
.@max = MAX_ZENY - Zeny; // maximum possible withdrawal
.@withdrawal = min(.@max, @menuret); // actual withdrawal
- if (.@withdrawal > 0)
- {
+ 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));
+ l("You withdrew a total of @@ GP.", format_number(.@withdrawal));
}
}
break;
@@ -132,3 +124,86 @@ function script MerchantGuild_Bank {
}
} while (true);
}
+
+function script BKInfo {
+ speech S_LAST_NEXT,
+ l("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;
+}
+
+// name, city, price
+function script BKReg {
+ .@price=max(2000, getarg(2)-#BankP);
+ @menu=3;
+ do
+ {
+ mesn getarg(0);
+ mesq l("Register fee is @@.", .@price);
+ next;
+ select
+ rif(Zeny >= .@price, l("Register")),
+ l("Not at the moment"),
+ l("Information");
+ mes "";
+ if (@menu == 1) {
+ Zeny=Zeny-.@price;
+ setq General_Banker, 1;
+ #BankP=#BankP+rand(100,400);
+ mesn getarg(0);
+ mesq l("Registered! You can now use any banking service, of any town!");
+ } else if (@menu == 3) {
+ BKInfo();
+ }
+ } while (@menu == 3);
+ return;
+}
+
+// name, city, price (defaults to 10k)
+function script Banker {
+ mesn getarg(0);
+ mesq l("Welcome! My name is @@, I am a representative of the Merchant Guild on @@.", getarg(0), getarg(1));
+ next;
+
+ if (getq(General_Banker) == 0) {
+ BKReg(getarg(0), getarg(1), getarg(2,10000));
+ } else {
+ do
+ {
+ select
+ l("I would like to store some items."),
+ l("I would like to perform money transactions."),
+ l("What is this guild for?"),
+ l("Bye.");
+
+ switch (@menu) {
+ case 1:
+ openstorage;
+ closedialog;
+ close;
+ break;
+ case 2:
+ Banking;
+ break;
+ case 3:
+ mes "";
+ BKInfo();
+ break;
+ }
+ if (@menu != 4) {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
+ l("Something else?");
+ }
+ } while (@menu != 4);
+ }
+ closedialog;
+ goodbye;
+ close;
+
+}
diff --git a/npc/functions/beds.txt b/npc/functions/beds.txt
deleted file mode 100644
index 4ab8b6a77..000000000
--- a/npc/functions/beds.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-// Evol functions.
-// Authors:
-// 4144
-// Reid
-// Description:
-// Beds utility functions
-
-function script bedTouch {
- if (PC_IS_DEAD)
- {
- PC_IS_DEAD = 0;
- if (INN_REGISTER == REDPLUSH_INN)
- {
- INN_REGISTER = NO_INN;
- percentheal 100,100;
- }
- }
- close;
-}
-
-function script bedClic {
- narrator S_LAST_NEXT, l("Do you want to use this place as save point?");
-
- if (askyesno() == ASK_YES)
- {
- savepointparticle getarg(0, ""), getarg(1, -1), getarg(2, -1), getarg(3, NO_INN);
- }
- closedialog;
- close;
-}
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index ba74c082b..31d841fa2 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -1,20 +1,97 @@
+// TMW2 Scripts
// Evol functions.
// Author:
// 4144
+// Jesusalva
// Description:
// Function checking the client version and reports if it is too old.
+// This also handles all updates, and usually have priority.
function script checkclientversion {
- if (ClientVersion > 20) return;
+ // Skip any update for newcomers
+ if (isin("000-0", 0, 0, 40, 40)) {
+ UPDATE=gettimetick(2);
+ }
+
+ // Update handler (use `date +%s` for this)
+ // Current UPDATE value: Qui Jun 7 08:10:55 -03 2018
+ if (Lang > 5 && UPDATE < 1528369855) {
+ UPDATE=1528369855;
+ Lang=0;
+ mesn "Jesus Saves";
+ mesc l("Oh, noes! Due lack of translators, some languages were removed from this project.");
+ mesc l("You might have been affected. Please, select your desired language.");
+ asklanguage(LANG_IN_SHIP);
+ }
+ if (is_admin() && UPDATE < 1528369855) {
+ UPDATE=1528369855;
+ dispbottom l("Client Version: @@", ClientVersion); // This is to debug UPDATE system.
+ }
+ if (UPDATE < 1531786864) {
+ UPDATE=1531786864;
+ skill TMW2_FAKESKILL, 1, 0;
+ skill TMW2_FAKESKILL2, 1, 0;
+ }
+
+
+
+
+
+ // #ADD_LVL means the user have to right to get some levels. This is a sketch. The code might be deleted.
+ if (#ADD_LVL) {
+ mesn "Jesus Saves";
+ mesc l("Oh - Welcome to TMW2: Moubootaur Legends!"), 3;
+ next;
+ mesn "Jesus Saves";
+ mesc l("Please, fell at home. You can use ##B#world##b channel to speak to everyone on Discord, IRC and ingame."), 3;
+ next;
+ mesn "Jesus Saves";
+ mesc l("Our mission statement is to bring fun to all players. You'll get some levels automatically. We advise you to join a guild."), 3;
+ next;
+ mesn "Jesus Saves";
+ mesc l("If you have any trouble or doubt, don't hesit to call us. There are some cooperative quests, and more of them are being added."), 3;
+ next;
+ mesn "Jesus Saves";
+ mesc l("Anyway, ##Bwelcome##b, and have fun! If you need anything, we are a keypress from distance!"), 3;
+ //atcommand "@blvl "+#ADD_LVL;
+ getitem TimeFlask, 1;
+ #ADD_LVL=(#ADD_LVL*9)/10;
+ if ((readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp))) {
+ do {
+ .@v=readparam(NextBaseExp)-readparam(BaseExp);
+ getexp .@v, 0;
+ #ADD_LVL-=.@v;
+ } while (readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp));
+ }
+ getexp #ADD_LVL, 0;
+ #ADD_LVL=0;
+ // TODO: Use @super debug functions and force player to join a guild. We will need the guild ID, though.
+ rodex_sendmail(getcharid(0), "TMW2 Team", "Welcome to Moubootaur Legends", "Hey, thanks for believing on us! We hope to have a great time togheter. Any problem, ask for help in #world - the Discord bridge! Enjoy our game!", 20);
+ if (ClientVersion >= 24) close;
+ next;
+ mesn "Failsafe Mechanism";
+ mesc l("Ah... You must update your client first."), 1;
+ next;
+ }
+
+
+
+
+
+ if (ClientVersion >= 24) return;
mesn "Narrator";
- mes col("Warning.", 1);
- mes col("Warning.", 1);
- mes col("Warning: You are using an old client.", 9);
+ mesc l("Warning."), 1;
+ mesc l("Warning."), 1;
+ mesc l("Warning: You are using an old client."), 1;
next;
- mes col("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]", 9);
+ mesc l("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]");
next;
- mes col("You won't be allowed to play this game until you have a valid client.", 9);
+ if (ClientVersion >= 20) mesc l("Compatibility Support mode enabled. Client may crash AT RANDOM, beware.");
+ if (ClientVersion >= 20) mesc l("Crazy stuff can happen in overall. YOU HAVE BEEN WARNED TO UPDATE YOUR CLIENT.");
+ if (ClientVersion >= 20) close;
+ if (ClientVersion >= 20) return;
+ mesc l("You won't be allowed to play this game until you have an updated client.");
next;
// Force user to disconnect
atcommand "@kick "+strcharinfo(0);
diff --git a/npc/functions/confused-tree-dict.txt b/npc/functions/confused-tree-dict.txt
deleted file mode 100644
index 4250ec35d..000000000
--- a/npc/functions/confused-tree-dict.txt
+++ /dev/null
@@ -1,560 +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$[0], .npc$), // {{size}}
- "tiny",
- "small",
- "perfectly sized",
- "large",
- "huge",
- "humongous",
- "ginormous";
- set getvariableofnpc(.D_size, .npc$), getarraysize(getvariableofnpc(.D_size$, .npc$));
-
- setarray getvariableofnpc(.D_color$[0], .npc$), // {{color}}
- "red",
- "orange",
- "yellow",
- "pink",
- "aqua",
- "cyan",
- "blue",
- "indigo",
- "violet",
- "purple",
- "magenta",
- "pink",
- "black",
- "white",
- "grey",
- "greyscale",
- "brown",
- "maroon",
- "turquoise",
- "lime",
- "sky blue",
- "invisible";
- set getvariableofnpc(.D_color, .npc$), getarraysize(getvariableofnpc(.D_color$, .npc$));
-
- setarray getvariableofnpc(.D_violentadverb$[0], .npc$), // {{violent adverb}}
- "violently",
- "repeatedly",
- "casually",
- "forcefully",
- "slowly",
- "carefully",
- "hopefully",
- "dangerously",
- "shockingly",
- "religiously";
- set getvariableofnpc(.D_violentadverb, .npc$), getarraysize(getvariableofnpc(.D_violentadverb$, .npc$));
-
- setarray getvariableofnpc(.D_hello$[0], .npc$), // {{hello}}
- "hi",
- "hi",
- "hi",
- "hi",
- "hey",
- "hey",
- "hey",
- "yo",
- "yo",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "hello",
- "howdy",
- "bonjour";
- set getvariableofnpc(.D_hello, .npc$), getarraysize(getvariableofnpc(.D_hello$, .npc$));
-
- setarray getvariableofnpc(.D_violentverb$[0], .npc$), // {{violent verb}}
- "slaps",
- "slaps",
- "slaps",
- "slaps",
- "slaps", // yeah the tree likes to slap a lot
- "hits",
- "pummels",
- "beats",
- "flattens",
- "taunts",
- "liquidates",
- "spanks",
- "affronts",
- "tranquilizes",
- "atomizes",
- "impales",
- "dismembers";
- set getvariableofnpc(.D_violentverb, .npc$), getarraysize(getvariableofnpc(.D_violentverb$, .npc$));
-
- setarray getvariableofnpc(.D_location$[0], .npc$), // {{location}}
- "Artis",
- "Hurnscald",
- "Tulimshar",
- "Nivalis",
- "Candor",
- "Drasil";
- set getvariableofnpc(.D_location, .npc$), getarraysize(getvariableofnpc(.D_location$, .npc$));
-
- setarray getvariableofnpc(.D_sizeableobject$[0], .npc$), // {{sizeable object}}
- "trout",
- "whale",
- "space whale",
- "penguin",
- "coelacanth",
- "squid",
- "shrimp",
- "crab",
- "tentacle",
- "dictionary",
- "grammar book",
- "textbook",
- "dinosaur",
- "t-rex",
- "star-nosed mole",
- "chimpanzee",
- "mermaid",
- "merman",
- "piano",
- "prince",
- "princess",
- "pinkie",
- "squirrel",
- "mouboo",
- "wet mop",
- "drunken pirate",
- "cake",
- "cookie",
- "chocobo",
- "restraining order",
- "freight train",
- "carnival hammer",
- "crate",
- "bomb",
- "bowl of petinuas",
- "box",
- "platypus",
- "magic eightball",
- "vase";
- set getvariableofnpc(.D_sizeableobject, .npc$), getarraysize(getvariableofnpc(.D_sizeableobject$, .npc$));
-
- setarray getvariableofnpc(.D_nsizeableobject$[0], .npc$), // {{n sizeable object}}
- "octopus",
- "elephant",
- "angry cat",
- "anvil",
- "encyclopedia set";
- set getvariableofnpc(.D_nsizeableobject, .npc$), getarraysize(getvariableofnpc(.D_nsizeableobject$, .npc$));
-
- setarray getvariableofnpc(.D_someone$[0], .npc$), // {{someone}}
- "Voldemort",
- "Cthulhu",
- "Platyna",
- "Hitler",
- "Luvia",
- "General Krukan",
- "Borg Queen",
- "Freeyorp",
- "MadCamel";
- set getvariableofnpc(.D_someone, .npc$), getarraysize(getvariableofnpc(.D_someone$, .npc$));
-
- // replies below
-
- setarray getvariableofnpc(.greetings$[0], .npc$),
- "{{^ hello }} ~p!",
- "{{^ hello }} ~p!",
- "{{^ hello }} ~p!",
- "{{^ hello }} ~p!",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p.",
- "{{^ hello }} ~p, what's up?",
- "{{^ hello }} ~p, anything new?",
- "{{^ hello }} ~p, how are you?",
- "~p!!!!",
- "~p!!!",
- "~p!!",
- "{{^ hello }} ~p! You are looking lovely today!",
- "Welcome back, ~p.",
- "Welcome back, ~p.",
- "Welcome back, ~p.",
- "~p is back!!",
- "Hello and welcome to the Aperture Science computer-aided enrichment center.",
- "Greetings ~p.",
- "What's up ~p?",
- "What's up ~p?",
- "How are you ~p?";
- set getvariableofnpc(.greetings, .npc$), getarraysize(getvariableofnpc(.greetings$, .npc$));
-
- setarray getvariableofnpc(.jokes$[0], .npc$),
- "How did the tree get drunk? On root beer.",
- "Do you think I'm lazy?",
- "I miss CrazyTree %%S.",
- "I miss LazyTree %%S.",
- "I'm not telling you!",
- "*sighs.*",
- "If I do it for you, then I have to do it for everybody.",
- "What did the beaver say to the tree? It's been nice gnawing you.",
- "What did the little tree say to the big tree? Leaf me alone.",
- "What did the tree wear to the pool party? Swimming trunks.",
- "What do trees give to their dogs? Treets.",
- "What do you call a tree that only eats meat? Carniforous.",
- "What do you call a tree who's always envious? Evergreen.",
- "What is the tree's least favourite month? Sep-timber!",
- "What kind of tree can fit into your hand? A palm-tree.",
- "What was the tree's favorite subject in school? Chemistree.",
- "Why did the leaf go to the doctor? It was feeling green.",
- "Why doesn't the tree need sudo? Because it has root.",
- "Why was the cat afraid of the tree? Because of its bark.",
- "Why was the tree executed? For treeson.",
- "How do trees get on the internet? They log in.",
- "Why did the pine tree get into trouble? Because it was being knotty.",
- "Did you hear the one about the oak tree? It's a corn-y one!",
- "What do you call a blonde in a tree with a briefcase? Branch Manager.",
- "How is an apple like a lawyer? They both look good hanging from a tree.",
- "Why did the sheriff arrest the tree? Because its leaves rustled.",
- "I'm too tired, ask someone else.",
- "If you are trying to get me to tell jokes you are barking up the wrong tree!",
- "You wooden think they were funny anyhow. Leaf me alone!",
- "What is brown and sticky? A stick.",
- "What's the best way to carve wood? Whittle by whittle.",
- "What did the tree do when the bank closed? It started its own branch.",
- "Do you want a brief explanation of an acorn? In a nutshell, it’s an oak tree.",
- "A snare drum and a crash cymbal fell out of a tree. *BA-DUM TSSSHH*",
- "How do you properly identify a dogwood tree? By the bark!",
- "Where do saplings go to learn? Elementree school.",
- "Why do trees make great thieves? Sticky fingers.",
- "What is green, has leaves, and a trunk? A houseplant going on vacation.",
- "Where can Adansonia trees go for a quick trim? To the baobarber.",
- "What looks like half a spruce tree? The other half.",
- "What do you give to a sick citrus tree? Lemon aid.",
- "What did the tree say to the drill? You bore me.",
- "What happened to the wooden car with wooden wheels and a wooden engine? It wooden go.",
- "How do trees keep you in suspense? I'll tell you tomorrow.",
- "Where do birch trees keep their valuables? In a river bank.",
- "What kind of stories do giant sequoia trees tell? Tall tales.",
- "What is the most frustrating thing about being a tree? Having so many limbs and not being able to walk.",
- "What's black, highly dangerous, and lives in a tree? A crow with a machine gun.",
- "What kind of wood doesn't float? Natalie Wood.",
- "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”.";
- set getvariableofnpc(.jokes, .npc$), getarraysize(getvariableofnpc(.jokes$, .npc$));
-
- setarray getvariableofnpc(.healing$[0], .npc$),
- "Eat an apple, they're good for you.",
- "If I do it for you, then I have to do it for everybody.",
- "Oh, go drink a potion or something.",
- "Whoops! I lost my spellbook.",
- "No mana.";
- set getvariableofnpc(.healing, .npc$), getarraysize(getvariableofnpc(.healing$, .npc$));
-
- setarray getvariableofnpc(.whoami$[0], .npc$),
- "An undercover GM.",
- "An exiled GM.",
- "I'm not telling you!",
- "I'm a bot! I'll be level 99 one day! Mwahahahaaha!!!111!",
- "Somebody said I'm a Chinese copy of CrazyTree.",
- "I am your evil twin.",
- "I don't remember anything after I woke up! What happened to me?",
- "I don't know. Why am I here??",
- "Who are you?",
- "On the 8th day, God was bored and said 'There will be bots'. So here I am.",
- "♪ I'm your hell, I'm your dream, I'm nothing in between ♪♪",
- "♪♪ Aperture Science. We do what we must, because... we can ♪",
- "I'm just a reincarnation of a copy.";
- set getvariableofnpc(.whoami, .npc$), getarraysize(getvariableofnpc(.whoami$, .npc$));
-
- setarray getvariableofnpc(.drops$[0], .npc$),
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops an {{ n sizeable object }} on ~p's head.*",
- "*drops an {{ n sizeable object }} on ~p's head.*",
- "*drops {{ someone }} on ~p's head.*",
- "*drops a coin on ~p's head.*",
- "*drops a fruit on ~p's head.*",
- "*drops an apple on ~p's head.*",
- "*drops an iten on ~p's head.*",
- "*drops a GM on ~p.*",
- "*drops a piece of moon rock on ~p's head.*",
- "*drops a pin on ~p's head.*",
- "*drops a rock on ~p's head.*",
- "*drops a tub of paint on ~p's head.*",
- "*drops a sandworm on ~p.*",
- "*drops an idea in ~p's head.*",
- "*drops The Hitchhiker's Guide to the Galaxy on ~p's head.*",
- "Ouch.",
- "Ouchy.",
- "*drops dead.*",
- "*sighs.*",
- "Leaf me alone.",
- "Stop it! I doesn't drop branches, try the Druid tree for once!";
- set getvariableofnpc(.drops, .npc$), getarraysize(getvariableofnpc(.drops$, .npc$));
-
- setarray getvariableofnpc(.die$[0], .npc$),
- "*drops an iten on ~p's head.*",
- "*drops a piece of moon rock on ~p's head.*",
- "*drops {{ someone }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops a {{ sizeable object }} on ~p's head.*",
- "*drops an {{ n sizeable object }} on ~p's head.*",
- "*drops a {{ size }} {{ sizeable object, n sizeable object }} on ~p's head.*",
- "*drops a {{ size }} {{ color }} {{ sizeable object, n sizeable object }} on ~p's head.*",
- "*{{ violent adverb }} {{ violent verb }} ~p.*",
- "*drops dead.*",
- "*sighs.*",
- "Avada Kedavra!",
- "Make me!",
- "Never!!",
- "You die, ~p!",
- "You die, ~p!",
- "You die, ~p!",
- "You die, ~p!",
- "No!",
- "In a minute.",
- "Suuure... I'll get right on it...";
- set getvariableofnpc(.die, .npc$), getarraysize(getvariableofnpc(.die$, .npc$));
-
- setarray getvariableofnpc(.poke$[0], .npc$),
- "*tickles.*";
- set getvariableofnpc(.poke, .npc$), getarraysize(getvariableofnpc(.poke$, .npc$));
-
- setarray getvariableofnpc(.disgusting$[0], .npc$),
- "Ewwwww %%^.";
- set getvariableofnpc(.disgusting, .npc$), getarraysize(getvariableofnpc(.disgusting$, .npc$));
-
- setarray getvariableofnpc(.answer$[0], .npc$),
- "42.",
- "Kittens.";
- set getvariableofnpc(.answer, .npc$), getarraysize(getvariableofnpc(.answer$, .npc$));
-
- setarray getvariableofnpc(.burning$[0], .npc$),
- "*curses ~p and dies %%c.*",
- "Help! I'm on fire!",
- "Oh hot.. hot hot!",
- "*is glowing.*",
- "*is flaming.*",
- "Ehemm. Where are firefighters? I need them now!",
- "*is so hot!.*",
- "*slowly catches fire.*",
- "*trembles with trepidation.*",
- "*is immune to fire.*";
- set getvariableofnpc(.burning, .npc$), getarraysize(getvariableofnpc(.burning$, .npc$));
-
- setarray getvariableofnpc(.kill$[0], .npc$),
- "*curses ~p and dies %%c.*";
- set getvariableofnpc(.kill, .npc$), getarraysize(getvariableofnpc(.kill$, .npc$));
-
- setarray getvariableofnpc(.silly$[0], .npc$),
- "Hahaha, good one!";
- set getvariableofnpc(.silly, .npc$), getarraysize(getvariableofnpc(.silly$, .npc$));
-
- setarray getvariableofnpc(.love$[0], .npc$),
- "♪♪ and IIII.. will alwayyyys loooovvve youuuuu. ♪♪ %%]",
- "♪♪ nothing's gonna change my love for you, you oughta know by now how much I love you.. ♪ %%]",
- "♪ ..and then I go and spoil it all, by saying something stupid like: “I love you.” ♪",
- "♪ ..won't you find a place for me? somewhere in your heart... ♪♪",
- "Thank you.",
- "♪♪ ..I can't love another when my heart is somewhere far away.. ♪",
- "%%]";
- set getvariableofnpc(.love, .npc$), getarraysize(getvariableofnpc(.love$, .npc$));
-
- setarray getvariableofnpc(.dance$[0], .npc$),
- "I would but I am rooted to the ground.",
- "Have you ever seen a tree dance before?",
- "Hahaha, good one!";
- set getvariableofnpc(.dance, .npc$), getarraysize(getvariableofnpc(.dance$, .npc$));
-
- setarray getvariableofnpc(.hate$[0], .npc$),
- "Right back at you!",
- "Ok...",
- "*pats ~p, let it go...*",
- "Hu hu hu, ~p hates me.";
- set getvariableofnpc(.hate, .npc$), getarraysize(getvariableofnpc(.hate$, .npc$));
-
- setarray getvariableofnpc(.bye$[0], .npc$),
- "*waves goodbye to ~p in tears, come back soon!*";
- set getvariableofnpc(.bye, .npc$), getarraysize(getvariableofnpc(.bye$, .npc$));
-
- setarray getvariableofnpc(.pain$[0], .npc$),
- "Ouch.",
- "Ouchy.",
- "Argh.",
- "Eek.",
- "*howls.*",
- "*screams.*",
- "*groans.*",
- "*cries.*",
- "*faints.*",
- "*shrieks.*",
- "*hides behind itself.*",
- "%%k",
- "Why, what did I do to you? %%i";
- set getvariableofnpc(.pain, .npc$), getarraysize(getvariableofnpc(.pain$, .npc$));
-
- setarray getvariableofnpc(.eightball$[0], .npc$),
- "It is possible.",
- "Yes!",
- "Of course.",
- "Naturally.",
- "Obviously.",
- "It shall be.",
- "The outlook is good.",
- "It is so.",
- "One would be wise to think so.",
- "The answer is certainly yes.",
- "In your dreams.",
- "I doubt it very much.",
- "No chance.",
- "The outlook is very poor.",
- "Unlikely.",
- "About as likely as pigs flying.",
- "You're kidding, right?",
- "NO!",
- "NO.",
- "No.",
- "Maybe...",
- "No clue.",
- "I don't know.",
- "The outlook is hazy, please ask again later.",
- "What are you asking me for?",
- "Come again?",
- "You know the answer better than I.",
- "The answer is def-- oooh! shiny thing!",
- "No idea.",
- "Perhaps.",
- "I think it is better not to tell you.",
- "Error 417: Expectation failed.";
- set getvariableofnpc(.eightball, .npc$), getarraysize(getvariableofnpc(.eightball$, .npc$));
-
- setarray getvariableofnpc(.bad$[0], .npc$),
- "I'm not bad! You are bad!",
- "OK, I'm bad.",
- "I'm just a littttle bad.",
- "Not as bad as the people that made me.";
- set getvariableofnpc(.bad, .npc$), getarraysize(getvariableofnpc(.bad$, .npc$));
-
- setarray getvariableofnpc(.no_idea$[0], .npc$),
- "What?",
- "What??",
- "What?",
- "Whatever.",
- "Hmm...",
- "Hmm...",
- "Huh?",
- "*yawns.*",
- "Wait a minute...",
- "What are you talking about?",
- "Who are you?",
- "What about me?",
- "I don't know what you are talking about",
- "Excuse me?",
- "Very interesting.",
- "Really?",
- "Go on...",
- "*scratches its leafy head.*",
- "*feels a disturbance in the force.*",
- "%%j",
- "*senses a disturbance in the force.*",
- "I'm bored...",
- "%%U",
- "%%[";
- set getvariableofnpc(.no_idea, .npc$), getarraysize(getvariableofnpc(.no_idea$, .npc$));
-
- setarray getvariableofnpc(.shut_up$[0], .npc$),
- "*goes hide in a corner %%S.*";
- set getvariableofnpc(.shut_up, .npc$), getarraysize(getvariableofnpc(.shut_up$, .npc$));
-
- setarray getvariableofnpc(.climb$[0], .npc$),
- "*sways violently.*",
- "*bends all the way to the ground.*",
- "*creaks and bends.*",
- "*welcomes those who come to play %%I.*",
- "*beams with pride.*";
- set getvariableofnpc(.climb, .npc$), getarraysize(getvariableofnpc(.climb$, .npc$));
-
- return;
-}
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index 6cbc33ac0..33f746c9d 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -111,7 +111,6 @@ function script fishing {
// default fishes
setarray .@common_fish,
CommonCarp;
- debugmes "Default";
}
.@rare_fish=getvariableofnpc(.rare_fish, .@npc$);
@@ -129,14 +128,13 @@ function script fishing {
{
// default baits (bait, chance booster)
setarray getvariableofnpc(.bait_ids[0], .@npc$),
- SmallTentacles, 0,
- Bread, 0,
- Aquada, 1,
- Tentacles, 2,
+ SmallTentacles, 1,
+ Bread, 1,
+ Aquada, 2,
+ Tentacles, 3,
BugLeg, 0,
- CaveSnakeTongue, 0,
- Tentacles, 0,
- RoastedMaggot, 1;
+ CaveSnakeTongue, 1,
+ RoastedMaggot, 2;
}
@@ -248,21 +246,18 @@ function script fishing {
.@bait = requestitem();
.@bait_c = false;
- if (.@bait < 1)
- {
+ if (.@bait < 1) {
narrator S_FIRST_BLANK_LINE,
l("You take your fishing rod and leave.");
return -6;
}
- if (countitem(.@bait) < 1)
- {
+ if (countitem(.@bait) < 1) {
return -6;
}
- for (.@i = 0; .@i < .@baits; .@i += 2)
- {
+ for (.@i = 0; .@i < .@baits; .@i += 2) {
if (getvariableofnpc(.bait_ids[.@i], .@npc$) == .@bait)
{
.@bait_c = true;
diff --git a/npc/functions/game-rules.txt b/npc/functions/game-rules.txt
index d5618e66d..2440d9383 100644
--- a/npc/functions/game-rules.txt
+++ b/npc/functions/game-rules.txt
@@ -10,8 +10,10 @@
// Main Rules of TMW2.
function script GameRules {
+ /*
if (checkweight(BookOfLaws, 1) == true && countitem(BookOfLaws) < 1)
getitem BookOfLaws, 1; // give the book if the player lost it
+ */
narrator getarg(0, 0),
l("1. ##BDo not bot##b, A character must be being controlled by a human, standing, siting, or logged off. You may only control one character at a time."),
@@ -20,7 +22,8 @@ function script GameRules {
l("4. ##BRespect other players.##b This includes but is not limited to using offensive language in nicknames or chat, and begging items or favours to other players."),
l("5. ##BThe public chat is to be understood by everyone.##b Therefore, try to use english when possible."),
l("6. ##BDo not create multi accounts.##b A person may only hold one account and as many chars as allowed by the server/client. Staff members with special privileges in-game may have a second account without those privileges."),
- l("7. ##BAs long as you have an account, you agree with the [@@https://tmw2.org/legal.php|Terms Of Service@@]##b. Shall any rule conflict with these terms, the Terms Of Service provided on that link shall prevail.");
+ l("7. ##BAs long as you have an account, you agree with the [@@https://tmw2.org/legal|Terms Of Service@@]##b. Shall any rule conflict with these terms, the Terms Of Service provided on that link shall prevail.");
+ l("8. ##BThe use of real money for ingame stuff, except by sponsoring, is prohibted."),
return;
}
diff --git a/npc/functions/harbours.txt b/npc/functions/harbours.txt
deleted file mode 100644
index 63d58076b..000000000
--- 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/hello.txt b/npc/functions/hello.txt
deleted file mode 100644
index 9399b3b58..000000000
--- 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/legiontalk.txt b/npc/functions/legiontalk.txt
deleted file mode 100644
index fbc35e1f7..000000000
--- 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(lg("Keep moving girl.", "Keep moving boy."));
- break;
- case 11:
- npctalkonce(lg("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/main.txt b/npc/functions/main.txt
index 243ae383d..bf6389989 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -1,9 +1,11 @@
+// TMW2 Script
// Evol functions.
// Authors:
// 4144
// Travolta
+// Jesusalva
// Description:
-// Build in functions.
+// Built-in essential functions.
function script menuimage {
return getarg(0) + "|" + getarg(1);
@@ -13,6 +15,30 @@ function script menuaction {
return "[" + getarg(0) + "]";
}
+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;
+}
+
function script mesn {
if (getargcount() > 0)
{
@@ -43,10 +69,15 @@ function script col {
}
function script adddefaultskills {
- if (getskilllv(NV_BASIC) < 6)
- {
+ if (getskilllv(NV_BASIC) < 6) {
skill NV_BASIC, 6, 0;
}
+ if (getskilllv(TMW2_FAKESKILL) < 1) {
+ skill TMW2_FAKESKILL, 1, 0;
+ }
+ if (getskilllv(TMW2_FAKESKILL2) < 1) {
+ skill TMW2_FAKESKILL2, 1, 0;
+ }
return;
}
@@ -55,6 +86,11 @@ function script addremovemapmask {
return;
}
+function script mesc {
+ mes col(getarg(0),getarg(1,9));
+ return;
+}
+
// Function to show narrator text. Accepts string args.
// If first arg is a number N, then it represents bit flags.
// Bit flags :
@@ -168,6 +204,7 @@ function script compareandsetq {
// 0 = npctalk3
// 1 = npctalk
// 2 = message
+// TODO: Use temp player var, because NPC var affect other players
function script npctalkonce {
// lock mechanism
switch (getarg(2, 0))
@@ -194,6 +231,50 @@ function script npctalkonce {
return true;
}
+function script isin {
+ if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0)
+ return false;
+ if (.@mapName$ != getarg(0))
+ return false;
+ if (.@xpos >= getarg(1) && .@xpos <= getarg(3) && .@ypos >= getarg(2) && .@ypos <= getarg(4))
+ return true;
+ return false;
+}
+
+// Get some acc id, even if offline
+// ( Name )
+function script gf_accid {
+ .@nb = query_sql("SELECT account_id FROM `char` WHERE name='"+escape_sql(getarg(0))+"' LIMIT 2", .@value);
+ return .@value[0];
+}
+
+// Get some char name from char ID, even if offline
+// ( Name )
+function script gf_charname {
+ .@nb = query_sql("SELECT name FROM `char` WHERE char_id="+escape_sql(getarg(0))+" LIMIT 2", .@value$);
+ return .@value$[0];
+}
+
+// Request pincode and validate it. Use any non-4-digits code to cancel. Failure will dc you.
+// Returns 1 if pin check is OK.
+function script validatepin {
+ mesc l("Please insert your pincode."), 1;
+ mesc l("WARNING: If you insert wrong pincode, you'll be disconnected.");
+ mesc l("Use @@ to cancel.", "##B-1##b");
+ mes "";
+ input .@pin$;
+ if (getstrlen(.@pin$) != 4)
+ return 0;
+ query_sql("SELECT userid FROM `login` WHERE account_id="+escape_sql(getcharid(3))+" AND pincode='"+escape_sql(.@pin$)+"' LIMIT 2", .@value$);
+ if (getarraysize(.@value$) != 1) {
+ atcommand "@kick "+strcharinfo(0);
+ return 0;
+ }
+ mesc l("Thanks, @@. We just wanted to be sure it was you.", .@value$[0]);
+ mes "";
+ return true;
+}
+
function script getquestlink {
return "[@@q" + getarg(0) + "|@@]";
}
diff --git a/npc/functions/marriage.txt b/npc/functions/marriage.txt
index d9e48bf54..9422e5c6a 100644
--- a/npc/functions/marriage.txt
+++ b/npc/functions/marriage.txt
@@ -1,6 +1,8 @@
+// TMW-2 Script
// Evol functions.
// Author:
// 4144
+// Jesusalva
// Description:
// Functions for marriage
@@ -98,6 +100,10 @@ function script ismarriagepartneraccepted {
.@partner$ = getmarriagepartner();
if (.@partner$ == "")
return false;
+ if (readparam(Sex, strcharinfo(0)) == readparam(Sex, .@partner$)) {
+ // Blame Jesusalva. I am sensing various other possible bugs. Let's play safe.
+ return false;
+ }
.@name$ = getmarriagepartneraccepted();
if (.@name$ == strcharinfo(0))
return true;
@@ -136,7 +142,7 @@ function script marriageregister {
marriageregisterself();
next;
speech lg("Now wait for your partner, then talk to me again.");
- npctalk l("@@ registered for marriage. Waiting for partner...", strcharinfo(0));
+ npctalk l("@@ waits for their loved one.", strcharinfo(0));
close;
}
else
@@ -145,8 +151,8 @@ function script marriageregister {
{
marriageregisterself();
marriageacceptpartner(.@partner$);
- npctalk l("@@ registered for marriage and accepted partner @@!", strcharinfo(0), .@partner$);
- npctalk l("Waiting for @@...", .@partner$);
+ npctalk3 l("@@ registered for marriage and accepted partner @@!", strcharinfo(0), .@partner$);
+ npctalk3 l("Waiting for @@...", .@partner$);
close;
}
else
@@ -173,11 +179,12 @@ function script domarriage {
if (marriage(.@partner$))
{
speech l("You got married to @@!", .@partner$);
- npctalk l("@@ and @@ just got married!", .@name$, .@partner$);
+ mapannounce "009-1", l("@@ and @@ just got married!", .@name$, .@partner$), bc_map;
+ specialeffect 6;
}
else
{
- npctalk l("Marriage failed.");
+ speech l("Marriage failed.");
}
marriageclear();
return;
@@ -235,13 +242,13 @@ function script marriagedivorce {
l("Nothing")))
{
case 1:
- speech lg("Are you sure?");
- if (askyesno() == ASK_YES)
- {
- if (divorce())
- {
- speech l("You are now divorced!"),
- l("Good look.");
+ speech lg("Are you sure? It costs 800 GP.");
+ if (askyesno() == ASK_YES) {
+ if (Zeny < 800)
+ return;
+ if (divorce()) {
+ Zeny=Zeny-800;
+ speech l("You are now divorced!");
npctalk l("@@ divorced!", strcharinfo(0));
}
else
@@ -260,7 +267,7 @@ function script marriagedivorce {
function script marriagemain {
if (Sex > 1)
{
- speech l("Sorry i can't help you. Go away!");
+ speech l("Sorry, I can't help you. Go away!");
close;
}
diff --git a/npc/functions/masks.txt b/npc/functions/masks.txt
deleted file mode 100644
index 98e8bdf87..000000000
--- a/npc/functions/masks.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-// Evol functions.
-// Author:
-// Reid
-// Description:
-// Triggers functions to add and remove masks.
-// Variables:
-// none
-
-// Artis Aemil's Legion
-
-function script artisALRemTopMask {
- if ((getareausers("001-2-33", 23, 27, 45, 31) >= 1) ||
- (getareausers("001-2-33", 23, 32, 26, 38) >= 1) ||
- (getareausers("001-2-33", 42, 32, 45, 38) >= 1))
- {
- removemapmask "001-2-33", 4;
- }
- return 0;
-}
-
-function script artisALAddTopMask {
- if ((getareausers("001-2-33", 23, 27, 45, 31) == 0) &&
- (getareausers("001-2-33", 23, 32, 26, 38) == 0) &&
- (getareausers("001-2-33", 42, 32, 45, 38) == 0))
- {
- addmapmask "001-2-33", 4;
- }
- return 0;
-}
-
-function script artisALRemBotMask {
- if (getareausers("001-2-33", 23, 32, 45, 46) >= 1)
- {
- removemapmask "001-2-33", 8;
- }
- return 0;
-}
-
-function script artisALAddBotMask {
- if (getareausers("001-2-33", 23, 32, 45, 46) == 0)
- {
- addmapmask "001-2-33", 8;
- }
- return 0;
-}
-
-function script artisALUpdateMask {
- if (getareausers("001-2-33", 23, 32, 45, 46) >= 1)
- {
- removemapmask "001-2-33", 8;
- }
- else
- {
- addmapmask "001-2-33", 8;
- }
- if ((getareausers("001-2-33", 23, 27, 45, 31) >= 1) ||
- (getareausers("001-2-33", 23, 32, 26, 38) >= 1) ||
- (getareausers("001-2-33", 42, 32, 45, 38) >= 1))
- {
- removemapmask "001-2-33", 4;
- }
- else
- {
- addmapmask "001-2-33", 4;
- }
-
- return 0;
-}
diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt
new file mode 100644
index 000000000..2c0031bb7
--- /dev/null
+++ b/npc/functions/mobhunter.txt
@@ -0,0 +1,100 @@
+// TMW-2 Script
+// Author: Jesusalva
+// Desc: Grand Hunter Quest Utils
+// Note: Remember to update Aidan too
+
+// MobID
+function script GHQ_GetQuestIDByMonsterID {
+ switch (getarg(0)) {
+ case Maggot:
+ return 1;
+ break;
+ case Snake:
+ return 2;
+ break;
+ case Scorpion:
+ return 3;
+ break;
+ case ForestMushroom:
+ return 4;
+ break;
+ case Pinkie:
+ return 5;
+ break;
+ default:
+ debugmes "Invalid mob ID: " + getarg(0);
+ dispbottom l("ERROR, Please report: GHQ GQID: Invalid ID: @@", getarg(0));
+ return 0;
+ break;
+ }
+
+}
+
+// QuestID (basically reverses the previous code)
+function script GHQ_GetMonsterIDByQuestID {
+ switch (getarg(0)) {
+ case 1:
+ return Maggot;
+ break;
+ case 2:
+ return Snake;
+ break;
+ case 3:
+ return Scorpion;
+ break;
+ case 4:
+ return ForestMushroom;
+ break;
+ case 5:
+ return Pinkie;
+ break;
+ default:
+ debugmes "Invalid quest ID: " + getarg(0);
+ dispbottom l("ERROR, Please report: GHQ GMID: Invalid ID: @@", getarg(0));
+ return 0;
+ break;
+ }
+
+}
+
+// MobID, Place, Prize
+function script GHQ_Assign {
+ // Arguments
+ .@mobId =getarg(0);
+ .@loc$ =getarg(1);
+ .@prize$=getarg(2);
+
+ // Current Quest Status + vars
+ .@id=GHQ_GetQuestIDByMonsterID(.@mobId);
+ .@q=getq(General_Hunter);
+ .@p=getq2(General_Hunter);
+ .@m=GHQ_GetMonsterIDByQuestID(.@q);
+ next;
+ //mesq l("Current Quest Progress: @@/10,000 kills", .@p);
+ mesn;
+ mes l("I represent the @@ Hunters. We hunt @@.", .@loc$, getmonsterlink(.@mobId));
+ mes l("The great prize is @@. It can be claimed with Aidan, on Tulimshar.", .@prize$);
+ if (.@q == .@id) {
+ mes l("You are currently hunting @@/10000 @@. When done, remember to claim rewards with Aidan, on Tulimshar!", .@p, getmonsterlink(.@m));
+ next;
+ closedialog;
+ goodbye;
+ }
+ if (.@q) mes l("You are currently hunting @@/10000 @@. Do you want to switch?", .@p, getmonsterlink(.@m));
+ select
+ l("I'm not interested."),
+ rif(GHMEMO[.@id] < 10000,l("I'll hunt them for you."));
+
+ switch (@menu) {
+ case 2:
+ GHMEMO[getq(General_Hunter)]=getq2(General_Hunter);
+ setq(General_Hunter, .@id, GHMEMO[.@id]);
+ mesn;
+ mesq l("Good luck! Don't come back until you reach 10000 kills!");
+ break;
+ }
+ closedialog;
+ goodbye;
+
+}
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index a9d69af05..45a741966 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -4,14 +4,14 @@
// Desc: Mob Points for Aidan & Ishi. You will gain MONSTER-LEVEL mob points.
function script mobpoint {
- if (!MPQUEST) goto L_Return;
+ if (!MPQUEST)
+ return;
//if (killedrid < 1002) goto L_Return;
- Mobpt = Mobpt + strmobinfo(3,killedrid);
-
-
-L_Return:
- //set @value, 0;
+ // You get MobLv + 10% as MobPoints.
+ // So a level 100 monster gives you 110 MobPt.
+ .@addval=strmobinfo(3,killedrid)*11/10;
+ Mobpt = Mobpt + .@addval;
return;
}
@@ -20,6 +20,17 @@ L_Return:
end;
OnNPCKillEvent:
+ // Remove undue Job exp
+ // The check is probably correct, but setparam is not working =/
+ /*
+ if (strmobinfo(7, killedrid) == 0 && readparam(JobExp) > 0) {
+ setparam(JobExp, readparam(JobExp)-1);
+ }
+ */
+
+ // call functions
callfunc "mobpoint";
+ callfunc "SQuest_Hasan";
end;
+
}
diff --git a/npc/functions/mouboofunc.txt b/npc/functions/mouboofunc.txt
deleted file mode 100644
index 6129c083e..000000000
--- 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/news.txt b/npc/functions/news.txt
index 9dc097257..fb65c1120 100644
--- a/npc/functions/news.txt
+++ b/npc/functions/news.txt
@@ -8,69 +8,213 @@ function script GameNews {
.@entry=getarg(0, 0);
switch(.@entry) {
case 0:
+ case 20180727:
+ mes "";
+ mesc l("Release 6.0 - Steam, Fire, and... Monster King?!");
+ next;
+ mes "";
+ mesc l("There was too many things to keep track. After Hurnscald siege, with lots of earthquakes, we had an accident.");
+ mesc l("We apologize to all, but the Land Of Fire CRASHED here, and broke the whole balance! Part of woodlands flooded!");
+ next;
+ mesc l("Strange figures appear, claiming to be from the Land of Fire, and using interesting sticks, which spits fire.");
+ mesc l("Some of these even cause area damage! Rumors of time travellers were heard, but no time travel was confirmed.");
+ mesc l("The alliance panicked, and allowed Demure, Pyndragon and Pihro on their board of members.");
+ next;
+ mesc l("The party dungeon is still under maintenance, but it shall soon be liberated. The disaster was so big, all mobs are different.");
+ mesc l("We mean, some are giving stupid amounts of experience, and players can get more levels. Saulc cannot proccess that many changes!");
+ next;
+ mesc l("Not only that, but there appeared some paladins, tankers, wizards, sages and raggers claiming to have mastered magic.");
+ mesc l("Saulc said it needs an inspection, and he'll be with everyone trying to proccess and fix the amount of damage this caused.");
+ next;
+ mesc l("The new inhabitants from the Land Of Fire are welcome, and some are still sheltering, like the Silversmith.");
+ mesc l("Additional security measures were put in place so such disaster, of a whole world crashing, doesn't happens again.");
+ mesc l("But who knows what future holds. The Monster King was blamed as responsible, but he killed our interviewer. Eeh.");
+ next;
+ mesc l("Good luck adventurers, and may the Pink Mouboo watch over this disaster... Whatever that means. They paid us to say that, I swear!");
+ next;
+ break;
+ case 20180630:
+ mes "";
+ mesc l("Release 5.0 - Greenland Players");
+ next;
+ mes "";
+ if (!$HURNS_LIBDATE) {
+ mesc l("The Monster King left Hurnscald! This is our chance! Saulc GM is assembling a team to TAKE OVER HURNSCALD!!");
+ } else {
+ mesc l("Hurnscald was liberated by the players @@ ago.", FuzzyTime($HURNS_LIBDATE));
+ mesc l("Many rejoiced. The damage was very big, and all players help is required, to make Hurnscald prosper again.");
+ }
+ next;
+ mesc l("This server's Sponsors bought the area above Hurnscald's Inn. Nobody else is being allowed there.");
+ mesc l("However, they allowed everyone to use @@ command to rapidly reach Aeros during events.", "##B@toevent##b");
+ next;
+ mesc l("Guilds storage is free for test, and monsters are fainting when too many players attack them at once.");
+ mesc l("Party levels for experience sharing restriction is more flexible, and there is a great co-op quest.");
+ mesc l("That and other changes, are all thinking on players helping each other.");
+ next;
+ mesc l("Figures clad in dark were reported in Tulimshar Mines, as more miners were hired and need help.");
+ mesc l("Anwar left his house to tend Tulimshar's crops, after noticing something strange with them. He blames the Monster King.");
+ next;
+ mesc l("4144's Tortuga was seen somewhere. Great rewards if someone knock off that monster... Well, not really.");
+ mesc l("Tulimshar Jewerly is now polishing gemstones to add on rings. New monsters were seen, stay on guard.");
+ next;
+ mesc l("Zegas, Saxso's widow, the mayor of Candor, decreed to allow strong adventurers to get past the Candor Cave Magic Barrier.");
+ mesc l("The demand for strong players raised everywhere. Even death penalty decreased, and GMs are doing better events now.");
+ mesc l("...including the fabled \"Ultimate PVP Event\", as the original creators say...");
+ mesc l("Even Tulimshar's Council managed to get that sewer unlocked, and as consequence, players can ascend to level 60!");
+ next;
+ mesc l("Hey, if you take a bow, buy a Quiver with Nicholas, on Hurnscald's blacksmith. Come back always!");
+ mesc l("All contributors should claim their rewards with Lua. Weather is there, night cycle happens where monsters are more active.");
+ mesc l("Hasan is bothering less frequently his friends, as now he have his own seasonal quest.");
+ next;
+ mesc l("Many other things were changed, and it is too much to say here. Even people with stronger magic were seen.");
+ mesc l("Adventurers entirely redressed, people doing Grand Hunter Quest like mad, peple making wishes at... well...");
+ mesc l("There was just too many changes to list all of them here. Good luck finding all of them!");
+ next;
+ break;
+ case 20180531:
+ mes "";
+ mesc l("Release 4.0 - Quest Giver's Handbook");
+ next;
+ mes "";
+ mesc l("With renewed confidence about the outcome of the war, various people left their houses.");
+ mesc l("However, the Monster King laid siege to Hurnscald. His power increased greatly, and ships are not capable of even approaching the city.");
+ mesc l("This caused a mana disturbance, and healing items are working better now, affecting every sector of economy.");
+ next;
+ mesc l("Tulimshar miners are having troubles with monsters. They are offering rewards to whoever helps them.");
+ mesc l("And speaking in reward, guards are looking for someone contrabanding goods from Artis. Do not help them!");
+ next;
+ mesc l("Tulimshar Guards bought a Slot Machine to play, but that was done unofficialy.");
+ mesc l("There are rumors of a grand prize to whoever gets lucky on that machine.");
+ next;
+ mesc l("Tulimshar Jewerly is once again open. Cyndala and Tamiloc rented a shop south of Tulimshar.");
+ mesc l("The Tulimshar Forge is also dealing with more complex materials, and not just Iron.");
+ next;
+ mesc l("Nard's ship is not capable to do Tulimshar<->Candor route instantly anymore: His magic sail broke.");
+ mesc l("Ishi also rewrote his rewards table. More items for lower prices!");
+ next;
+ mesc l("Zitoni announces he can now craft really good potions to improve attack speed and damage!");
+ mesc l("Saulc and Cherry married in Halinarzo, and stayed like this for perhaps 20 seconds, before Cherry asked for divorce.");
+ mesc l("After paying the divorce fee, she said: \"Blame Saulc for this one.\"");
+ next;
+ mesc l("The Alliance announces a great new way to keep adventurers killing monsters.");
+ mesc l("The Grand Hunter quest is available with Aidan. It's an experiment by the High Council,");
+ mesc l("and may change later without notice.");
+ next;
+ mesc l("Some adventurer broke what was previously thought as maximum level, and is now level 45!");
+ mesc l("Somebody else also got huge stats bonuses because reached the unbelievable job level 25.");
+ next;
+ mesc l("The Alliance High Council informs that Super Players and above are capable to try ##B @toevent ##b for free event warps.");
+ mesc l("This was caused because changes on the Mana Bridge. They hope that for next release, everyone will be able to use these magic words, instead of needing to talk to the Soul Menhir.");
+ next;
+ break;
case 20180408:
mes "";
- mes col("Release 3.0 - In The Dreams", 9);
+ mesc l("Release 3.0 - In The Dreams");
next;
mes "";
- mes col("There were trees blocking the path to Halinarzo? Why nobody told that to Tulimshar Council?!", 9);
- mes col("These trees were cut and travellers can once again travel to Halin.", 9);
+ mesc l("There were trees blocking the path to Halinarzo? Why nobody told that to Tulimshar Council?!");
+ mesc l("These trees were cut and travellers can once again travel to Halin.");
next;
- mes col("Estard finished arranging sufficient paperwork so adventurers can create their own guilds.", 9);
- mes col("This somehow affected the whole economy.", 9);
+ mesc l("Estard finished arranging sufficient paperwork so adventurers can create their own guilds.");
+ mesc l("This somehow affected the whole economy.");
next;
- mes col("Some adventurer broke what was previously thought as maximum level, and is now level 40!", 9);
+ mesc l("Some adventurer broke what was previously thought as maximum level, and is now level 40!");
mes l("##9Was that not sufficient, this someone acquired MAGIC and is now under @@'s group.", (rand(0,1) ? "Colin" : "Luca"));
next;
- mes col("The Magic Council finished the reform on their guest hall.", 9);
- mes col("Soren, the architect responsible for it, is very happy with the new design.", 9);
+ mesc l("The Magic Council finished the reform on their guest hall.");
+ mesc l("Soren, the architect responsible for it, is very happy with the new design.");
next;
- mes col("Tulimshar Guardhouse's door was struck, but the guards managed to get it open again.", 9);
- mes col("Access is restricted to guards, as usual.", 9);
+ mesc l("Tulimshar Guardhouse's door was struck, but the guards managed to get it open again.");
+ mesc l("Access is restricted to guards, as usual.");
next;
break;
case 20180323:
mes "";
- mes col("Release 2.2 - There Are No Pipelines", 9);
+ mesc l("Release 2.2 - There Are No Pipelines");
next;
mes "";
- mes col("Unfortunately, Tulimshar guards are dying in the sun. Maybe you could provide them with Water?", 9);
+ mesc l("Unfortunately, Tulimshar guards are dying in the sun. Maybe you could provide them with Water?");
next;
- mes col("The NPC responsible for buying raw gemstones from other NPCs has recovered since the last siege.", 9);
- mes col("Therefore, raw gemstones prices are once again on the rise.", 9);
+ mesc l("The NPC responsible for buying raw gemstones from other NPCs has recovered since the last siege.");
+ mesc l("Therefore, raw gemstones prices are once again on the rise.");
next;
- mes col("Someone adventurer broke what was previously thought as maximum level, and is now level 31!", 9);
+ mesc l("Someone adventurer broke what was previously thought as maximum level, and is now level 31!");
next;
- mes col("The Magic Council lift Statues in honor of some people. But its guest hall is in reform!", 9);
+ mesc l("The Magic Council lift Statues in honor of some people. But its guest hall is in reform!");
next;
- mes col("Easter will soon start!", 9);
+ mesc l("Easter will soon start!");
next;
break;
case 20180316:
- mes col("Release 2.1 - Free Lunch For Those Who Work Hard!", 9);
+ mesc l("Release 2.1 - Free Lunch For Those Who Work Hard!");
next;
mes "";
- mes col("Money to leave Candor is easier, as various persons there need help.", 9);
+ mesc l("Money to leave Candor is easier, as various persons there need help.");
next;
- mes col("Nard and Elmo changed the way they talk to newcomers, to be more clear about what they expect.", 9);
+ mesc l("Nard and Elmo changed the way they talk to newcomers, to be more clear about what they expect.");
next;
- mes col("Hard workers get an extra work level. This means a +1 VIT bonus is possible!", 9);
+ mesc l("Hard workers get an extra work level. This means a +1 VIT bonus is possible!");
next;
- mes col("Some NPCs are [@@https://transifex.com/akaras/saulc-tmw-fork|learning new languages@@].", 9);
+ mesc l("Some NPCs are [@@https://transifex.com/akaras/saulc-tmw-fork|learning new languages@@].");
next;
- mes col("We want to thank everyone who did this release possible.", 9);
- mes "";
- mes col("Shall you have any inquiry, do not hesit to [@@mailto:admin@tmw2.org|send us an email@@]##b.", 9);
break;
default:
break;
}
- mes col("We want to thank everyone who did this release possible.", 9);
+ mesc l("We want to thank everyone who did this release possible.");
mes "";
- mes col("Shall you have any inquiry, do not hesit to [@@mailto:admin@tmw2.org|send us an email@@]##b.", 9);
- mes col("You can also read the [@@news|server news@@], or even [@@https://tmw2.org/news|older entries@@].", 9);
+ mesc l("Shall you have any inquiry, do not hesit to [@@mailto:admin@tmw2.org|send us an email@@]##b.");
+ mesc l("You can also read the [@@news|server news@@], or even [@@https://tmw2.org/news|older entries@@].");
next;
return;
}
+function script Journalman {
+ npctalk3 any(
+ l("Hurnscald is in need of help from all adventurers!"),
+ l("Tulimshar mines overrun! Great rewards for a lending hand!"),
+ l("Monsters are dropping strange stuff! The world is changing!"),
+ l("All hail @@ and Andrei Sakar, heroes of the world!", $MOST_HEROIC$));
+ mesn getarg(0);
+ mesq l("Bonjour! I am @@, and I am from the Press! Read the latest news with me!", getarg(0));
+
+ @menu=0;
+ while (@menu != 1) {
+ select
+ l("Thanks for your help!"),
+ l("2018-07-27 (Latest)"),
+ l("2018-06-30"),
+ l("2018-05-31"),
+ l("2018-04-08"),
+ l("2018-03-23"),
+ l("2018-03-16");
+ mes "";
+ switch (@menu) {
+ case 2:
+ GameNews(20180727);
+ break;
+ case 3:
+ GameNews(20180630);
+ break;
+ case 4:
+ GameNews(20180531);
+ break;
+ case 5:
+ GameNews(20180408);
+ break;
+ case 6:
+ GameNews(20180323);
+ break;
+ case 7:
+ GameNews(20180316);
+ break;
+ }
+ }
+
+ mesn getarg(0);
+ mesq l("Good bye!");
+ close;
+ return;
+}
diff --git a/npc/functions/nurse.txt b/npc/functions/nurse.txt
new file mode 100644
index 000000000..d63f5fe68
--- /dev/null
+++ b/npc/functions/nurse.txt
@@ -0,0 +1,89 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Nurse for all hurt players
+
+// Name, Base Price, Price Multiplier
+// getarg(3) switches functions:
+// 1 - Only healing dialog (returns price)
+// 2 - Only core healing
+// 3 - everything (default)
+function script Nurse {
+ // Handle redirects
+ .@d=getarg(3, 3);
+
+ if (.@d & 1) {//&1
+ mes "";
+ mesn getarg(0);
+
+ // Random message
+ .@temp = rand(1,4);
+ switch (.@temp) {
+ case 1:
+ mesq l("You don't look too well; let me treat your wounds.");
+ break;
+ case 2:
+ mesq l("I will make quick work of your wounds.");
+ break;
+ case 3:
+ mesq l("Need a healing?");
+ break;
+ case 4:
+ mesq l("Sometimes you just need to run from battle.");
+ break;
+ }
+ mes "";
+
+ // Calculate price
+ .@price=(MaxHp-Hp)/getarg(1,5);
+ .@price=.@price+getarg(2, 10);
+ if (BaseLevel <= 15) .@price=(.@price/10);
+ else if (BaseLevel <= 20) .@price=(.@price/5);
+ else .@price=(.@price/2);
+
+ // Skip menu flag
+ if (!(.@d & 2))
+ return .@price;
+
+ mesq l("For you, it'll be @@ GP.", .@price);
+ mes "";
+ select
+ rif(Zeny >= .@price, l("Please heal me!")),
+ l("Another time, maybe.");
+
+ if (@menu == 2) {
+ closedialog;
+ goodbye;
+ close;
+ }
+
+ }// & 1
+ if (.@d & 2) { // &2
+
+ if (!(.@d & 1)) {
+ // (Re)Calculate price
+ .@price=(MaxHp-Hp)/getarg(1,5);
+ .@price=.@price+getarg(2, 10);
+ if (BaseLevel <= 15) .@price=(.@price/10);
+ else if (BaseLevel <= 20) .@price=(.@price/5);
+ else .@price=(.@price/2);
+ }
+
+ // Heal persona
+ mes "";
+ set Zeny, Zeny - .@price;
+ sc_end(SC_POISON);
+ sc_end(SC_SLOWPOISON);
+ percentheal 100,100; // We can also use "recovery()" but that revives players :o
+ mesn getarg(0);
+ @temp = rand(1,4);
+ if(@temp == 1) mesq l("Here you go!");
+ if(@temp == 2) mesq l("Painless, wasn't it?");
+ if(@temp == 3) mesq l("You should be more careful.");
+ if(@temp == 4) mesq l("Much better, right?!");
+ close;
+
+ }//&2
+ return;
+}
diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt
index 0278415ce..7cf87dd40 100644
--- a/npc/functions/openbook.txt
+++ b/npc/functions/openbook.txt
@@ -9,9 +9,8 @@
function script openbook {
.@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";
- narrator S_LAST_NEXT,
- l("You open a book named @@.", .@book_name$),
- l("Do you want to read it?");
+ mesc l("You open a book named @@. Do you want to read it?", .@book_name$);
+ next;
return (select("Yes.", "No.") == 1);
}
@@ -20,17 +19,9 @@ function script openbookshelf {
.@book_name$ = "\"" + l(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 @@.", .@book_name$),
+ l("You see a dust covered book on the shelf... The name of the book is @@.", .@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
index 99094bb43..eaedcce92 100644
--- a/npc/functions/permissions.txt
+++ b/npc/functions/permissions.txt
@@ -5,6 +5,10 @@
// Checks player GM levels
function script is_gm {
+ return (getgmlevel() >= 60);
+}
+
+function script is_master {
return (getgmlevel() >= 80);
}
diff --git a/npc/functions/quest-debug/functions.txt b/npc/functions/quest-debug/functions.txt
deleted file mode 100644
index f89adfab7..000000000
--- 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; closedialog; end;
- }
-}
diff --git a/npc/functions/random-talk.txt b/npc/functions/random-talk.txt
new file mode 100644
index 000000000..a5bea0568
--- /dev/null
+++ b/npc/functions/random-talk.txt
@@ -0,0 +1,184 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Random dialog for various random NPCs.
+
+// Functions:
+// hello
+// moubootalk
+// villagertalk
+// sailortalk
+// legiontalk
+// asleep
+
+// Evol authors (some strings and code):
+// Reid
+// Akko Teru
+// Qwerty Dragon
+
+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;
+}
+
+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 sailortalk {
+
+ .@rand = rand(8);
+ if (.@rand == 0) goodbye;
+ if (.@rand == 1) npctalkonce(l("Arr, I'm bored!"));
+ if (.@rand == 2) npctalkonce(l("Hey! Good to hear from you!"));
+ if (.@rand == 3) npctalkonce(l("Yarr arr!"));
+ 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("Arr!"));
+ if (.@rand == 7) npctalkonce(l("Howdy?"));
+
+ // just to be sure
+ closedialog;
+ close;
+ end;
+}
+
+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;
+}
+
+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(lg("Keep moving girl.", "Keep moving boy."));
+ break;
+ case 11:
+ npctalkonce(lg("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;
+}
+
+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/refine.txt b/npc/functions/refine.txt
new file mode 100644
index 000000000..ac7be8827
--- /dev/null
+++ b/npc/functions/refine.txt
@@ -0,0 +1,224 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Pyndragon (inspiration)
+// Scall (inspiration)
+// Description:
+// Refine functions. Includes equipment repair. In future use getequippercentrefinery(.@it, REFINE_CHANCE_TYPE_ENRICHED) too
+
+// (No arguments)
+function script refineMaster {
+ mesn;
+ mesq l("Ah, hello there, funny face! Do you want to refine items?");
+ mesc l("There's always some chance that THE ITEM WILL BREAK, beware!");
+ next;
+ mesn;
+ mesq l("First - item must be equipped.");
+ mesq l("If you succeed, the defense and/or attack will raise. If you fail, refine level goes down.");
+ //mesq l("And if the item breaks, that is definitive - no repair is possible. What to refine?");
+ mesq l("And if the item breaks, that's your loss. What to refine?");
+ next;
+
+ // Dark magic from hercules used, take care
+ menuint
+ l("Nothing, thanks"), 0,
+ rif(getequipisequiped(EQI_HEAD_MID), l("My chestplate, @@", getequipname(EQI_HEAD_MID))), EQI_HEAD_MID,
+ rif(getequipisequiped(EQI_HAND_R), l("My weapon, @@", getequipname(EQI_HAND_R))), EQI_HAND_R,
+ l("Definitive item break? Too dangerous! I don't want it!!"), 0;
+
+
+ if (@menuret == 0) {
+ mesn;
+ //mesq l("Wait a moment - you are naked! YOU WILL DIE IN THE FREEZE! o.o");
+ mesq l("Well... we'll see around!");
+ close;
+ }
+ .@it=@menuret;
+ .@item=getequipid(.@it);
+
+ /*
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+ .@item = requestitem();
+
+ // Check if we received an item
+ if (.@item < 1) {
+ mesn;
+ mesq l("Well, no risk, no gain.");
+ close;
+ return;
+ }
+ */
+
+ // Not all items are refinable
+ if (!getequipisenableref(.@it)) {
+ mesn;
+ mesq l("Well, sorry, but only weapons and body armor can be refined.");
+ mesq l("There may be some exceptions. Anyway, this item clearly cannot be refined.");
+ next;
+ return;
+ }
+
+ // Max refining level: 10
+ if (getequiprefinerycnt(.@it) >= 10) {
+ mesn;
+ mesq l("This item cannot be refined further.");
+ return;
+ }
+
+ .@rlv=getequiprefinerycnt(.@it);
+ .@price=(.@rlv+1)*1000;
+ .@amount=(.@rlv/2)+1;
+ // required item
+ switch (.@rlv) {
+ case 0:
+ case 1:
+ .@rg=CopperIngot; break;
+ case 2:
+ case 3:
+ .@rg=IronIngot; break;
+ case 4:
+ case 5:
+ .@rg=TitaniumIngot; break;
+ case 6:
+ case 7:
+ .@rg=LeadIngot; break;
+ case 8:
+ .@rg=Bloodstone; break;
+ default:
+ .@rg=BlueManaPearl; break;
+ }
+ mesn;
+ mesq l("This @@ is a nice stuff. I can refine it for @@ GP and @@ @@.", getitemlink(.@item), .@price, .@amount, getitemlink(.@rg));
+ mesc l("Success ratio is of aprox. @@ %", (100-(.@rlv*7))+rand(-6,6));
+ next;
+ if (askyesno() != ASK_YES)
+ close;
+
+ // Anti-Crazyfefe™ System
+ // Item is gone, 100% warranted cheater
+ if (countitem(.@item) < 1) {
+ mesn;
+ mesc l("All cheaters must die."), 1;
+ percentheal -100, -100;
+ close;
+ }
+ // No money
+ if (Zeny < .@price) {
+ mesn;
+ mesq l("Where's the money? Go away.");
+ close;
+ }
+ // No reagents
+ if (countitem(.@rg) < .@amount) {
+ mesn;
+ mesq l("Where's the reagent? You don't expect me to find it, right? Go bring them!");
+ close;
+ }
+ // Item removed
+ if (getequipisequiped(.@it) == 0) {
+ mesn;
+ mesc l("All cheaters must die."), 1;
+ percentheal -100, -100;
+ close;
+ }
+ // Item changed
+ if (getequiprefinerycnt(.@it) != .@rlv || getequipid(.@it) != .@item) {
+ mesn;
+ mesc l("All cheaters must die."), 1;
+ percentheal -100, -100;
+ close;
+ }
+ ///// This should cover most of Crazyfefe tricks ¬.¬ I hope ¬.¬
+ mesn;
+ mesq l("HA, HA, HA! The blacksmiths from the Land of Fire are the best from the world! There's no challenge too big for us!");
+ mesq l("It's time to show this shiny @@ who is the boss! HAHAHAHAHAHAHAH!", getitemlink(.@item));
+ next;
+ // If you cheat somewhere along the way, the script will explode
+ Zeny=Zeny-.@price;
+ delitem .@rg, .@amount;
+ // Cheater should be locked for eternity.
+ if (getequiprefinerycnt(.@it) != .@rlv || getequipid(.@it) != .@item || getequipisequiped(.@it) == 0) {
+ atcommand "@jail "+strcharinfo(0);
+ close;
+ }
+
+ // Were we successful?
+ if (getequippercentrefinery(.@it) > rand(100)) {
+ successrefitem .@it;
+ mesn;
+ mesq l("HAHAHAHAH! Shiny as new, and stronger than ever! Have fun!");
+ next;
+ // Perhaps the item has broken?
+ } else if (rand(100) < .@rvl*2) {
+ failedrefitem .@it;
+ mesc l("*CRASH*");
+ next;
+ mesn;
+ mesq l("Ops... I hammered this stuff too hard... It's junk now.");
+ next;
+ mesn;
+ mesq l("Well, you were warned. Do you have any other stuff for me?");
+ next;
+ // Item is weakened.
+ } else {
+ downrefitem .@it, 1;
+ mesn;
+ mesq l("A masterpiece!... Whaaaat, this stuff got ##Bweaker##b??");
+ next;
+ mesn;
+ mesq l("Well, I did my best, but this had been so refined, that it was difficult to find my way.");
+ next;
+ mesn;
+ mesq l("I'm sure I could refine this again, if you bring me the payment and the reagents again.");
+ next;
+ }
+ return;
+}
+
+
+// (No arguments)
+function script repairMaster {
+ mesn;
+ mesq l("I am a really good blacksmith. In fact, there is no stuff I can't fix.");
+ next;
+ mesn;
+ if (getbrokenid(1) == 0) {
+ mesq l("I don't think you have any broken item, but if a friend of mine break your stuff, come talk to me!");
+ close;
+ } else {
+ // Print the name of the first broken item
+ mesq l("You seem to have @@ broken items and... Oh, I see you have a broken @@ here! I wanna repair it!", getbrokencount(), getitemname(getbrokenid(1)));
+ .@save=getbrokenid(1);
+ next;
+ }
+ .@price=getiteminfo(getbrokenid(1), ITEMINFO_SELLPRICE)+getiteminfo(getbrokenid(1), ITEMINFO_ELV)-(getbrokencount()*15);
+ if (.@price < 100 || getbrokenid(1) == BronzeGladius)
+ .@price=100;
+ mesn;
+ mesq l("I can fix this for you. Just pay me @@ GP and a @@. It'll take no time at all!", .@price, getitemlink(IronIngot));
+ next;
+ if (Zeny < .@price || countitem(IronIngot) < 1 || askyesno() != ASK_YES) {
+ mes "";
+ mesn;
+ mesq l("Ahh, that's a pity... Well, just talk to me with enough money and I'll gladly fix that for you! %%0");
+ close;
+ }
+ // Cheating? Well, let's try to be innovative this time
+ if (.@save != getbrokenid(1)) {
+ mesn;
+ mesq l("Ah...! POLICE! POLICE! Quick, send this cheating thief to jail!!");
+ atcommand "@jailfor 20mn "+strcharinfo(0);
+ close;
+ }
+ Zeny=Zeny-.@price;
+ delitem IronIngot, 1;
+ repair(1);
+ mesn;
+ mesq l("Here, sparking new! Nice!!");
+ if (getbrokencount() > 0) {
+ next;
+ return;
+ } else {
+ close;
+ }
+}
diff --git a/npc/functions/sailordialogue.txt b/npc/functions/sailordialogue.txt
deleted file mode 100644
index 281246f7f..000000000
--- 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 87baf0386..000000000
--- a/npc/functions/sailortalk.txt
+++ /dev/null
@@ -1,33 +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) npctalkonce(l("Ah, this is boring."));
- 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("Arr!"));
- if (.@rand == 7) npctalkonce(l("Howdy?"));
-
- // just to be sure
- closedialog;
- close;
- end;
-}
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index 3158aea56..ed2d3d4bb 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -108,3 +108,48 @@ function script HallOfGMLog {
mes("15."+.@name$[14]+" ("+.@value$[14]+")");
return;
}
+
+
+
+
+
+function script HallOfReferral {
+ mes "";
+ .@nb = query_sql("SELECT l.userid, COUNT(a.value) FROM `acc_reg_num_db` AS a, `login` AS l WHERE a.key='#REFERRAL_PROG' AND l.account_id=a.value ORDER BY COUNT(a.value) DESC LIMIT 20", .@name$, .@value);
+ mes "Referral Program Report - pg. 1";
+ mes("1."+.@name$[0]+" ("+.@value[0]+")");
+ mes("2."+.@name$[1]+" ("+.@value[1]+")");
+ mes("3."+.@name$[2]+" ("+.@value[2]+")");
+ mes("4."+.@name$[3]+" ("+.@value[3]+")");
+ mes("5."+.@name$[4]+" ("+.@value[4]+")");
+ mes("6."+.@name$[5]+" ("+.@value[5]+")");
+ mes("7."+.@name$[6]+" ("+.@value[6]+")");
+ mes("8."+.@name$[7]+" ("+.@value[7]+")");
+ mes("9."+.@name$[8]+" ("+.@value[8]+")");
+ mes("10."+.@name$[9]+" ("+.@value[9]+")");
+ next;
+ mes "Referral Program Report - pg. 2";
+ mes("11."+.@name$[10]+" ("+.@value[10]+")");
+ mes("12."+.@name$[11]+" ("+.@value[11]+")");
+ mes("13."+.@name$[12]+" ("+.@value[12]+")");
+ mes("14."+.@name$[13]+" ("+.@value[13]+")");
+ mes("15."+.@name$[14]+" ("+.@value[14]+")");
+ mes("16."+.@name$[15]+" ("+.@value[15]+")");
+ mes("17."+.@name$[16]+" ("+.@value[16]+")");
+ mes("18."+.@name$[17]+" ("+.@value[17]+")");
+ mes("19."+.@name$[18]+" ("+.@value[18]+")");
+ mes("20."+.@name$[19]+" ("+.@value[19]+")");
+ next;
+ return;
+}
+
+
+
+function script HallOfSponsor {
+ mes l("This is in honor of all the [@@help://about-server|Contributors@@] who helped rebuilding this world, after the Monster War outbreak.");
+ mes l("And also in notable mention of those who [@@https://www.patreon.com/TMW2|sponsor@@] the Alliance and its administrative structure.");
+ mes l("");
+ mes l("GonzoDark, Saulc.");
+ return;
+}
+
diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt
new file mode 100644
index 000000000..e29c64146
--- /dev/null
+++ b/npc/functions/seasons.txt
@@ -0,0 +1,143 @@
+// TMW2 Script.
+// Authors:
+// Jesusalva
+// Description:
+// Season functions
+
+// Function authored by Reid and edited by Jesusalva
+// season({day, month})
+// SQuest_Summer
+// returns the current season (approximation)
+// WINTER: Winter, 21/12
+// SPRING: Spring, 20/03
+// SUMMER: Summer, 21/06
+// AUTUMN: Autumn, 22/09
+
+function script season {
+ .@current_month = getarg(0, gettime(GETTIME_MONTH));
+
+ if (.@current_month % 3 == 0) {
+ .@current_day = getarg(1, 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;
+}
+
+
+function script SeasonControl {
+ do
+ {
+ select
+ "Summer Start",
+ "Summer End",
+ "Abort";
+
+ switch (@menu) {
+ case 1: donpcevent("#SeasonCore::OnSummerStart"); break;
+ case 2: donpcevent("#SeasonCore::OnSummerEnd"); break;
+ }
+ } while (@menu != 3);
+ return;
+}
+
+// If skip_checks is set, it'll ignore $@SEASON control.
+// SeasonReload( {skip_checks} )
+function script SeasonReload {
+ // Proccess skip_checks
+ if (getarg(0,0))
+ $@SEASON=99;
+
+ // Summer extra drops
+ if (season() == SUMMER && $@SEASON != SUMMER) {
+ donpcevent("#SeasonCore::OnSummerStart");
+ }
+ // Summer end delete drops
+ if (season() == AUTUMN && $@SEASON == SUMMER) {
+ donpcevent("#SeasonCore::OnSummerEnd");
+ }
+
+ $@SEASON=season();
+ return;
+}
+
+000-0,0,0,0 script #SeasonCore NPC_HIDDEN,{
+ end;
+
+OnSummerStart:
+ addmonsterdrop(Duck, CherryCocktail, 360);
+ addmonsterdrop(Croc, CherryCocktail, 180);
+ addmonsterdrop(SaxsoGhost, CherryCocktail, 450);
+ addmonsterdrop(RedButterfly, CherryCocktail, 100);
+
+ addmonsterdrop(Maggot, CactusCocktail, 140);
+ addmonsterdrop(DesertMaggot, CactusCocktail, 190);
+ addmonsterdrop(Scorpion, CactusCocktail, 165);
+ addmonsterdrop(GiantMaggot, CactusCocktail, 290);
+ addmonsterdrop(Centaur, CactusCocktail, 1000);
+
+ addmonsterdrop(AlphaMouboo, AppleCocktail, 850);
+ addmonsterdrop(OceanCroc, AppleCocktail, 480);
+ addmonsterdrop(Mouboo, AppleCocktail, 280);
+ addmonsterdrop(Pinkie, AppleCocktail, 70);
+
+ addmonsterdrop(Duck, Sunglasses, 1);
+ addmonsterdrop(Croc, Sunglasses, 1);
+ addmonsterdrop(SaxsoGhost, Sunglasses, 1);
+ addmonsterdrop(DesertMaggot, Sunglasses, 1);
+ addmonsterdrop(Scorpion, Sunglasses, 1);
+ addmonsterdrop(GiantMaggot, Sunglasses, 1);
+ addmonsterdrop(Centaur, Sunglasses, 3);
+ addmonsterdrop(AlphaMouboo, Sunglasses, 1);
+ addmonsterdrop(OceanCroc, Sunglasses, 1);
+ addmonsterdrop(Mouboo, Sunglasses, 1);
+ addmonsterdrop(Pinkie, Sunglasses, 1);
+ addmonsterdrop(Moonshroom, Sunglasses, 2);
+ addmonsterdrop(RedButterfly, Sunglasses, 1);
+ end;
+
+OnSummerEnd:
+ delmonsterdrop(Duck, CherryCocktail);
+ delmonsterdrop(Croc, CherryCocktail);
+ delmonsterdrop(SaxsoGhost, CherryCocktail);
+ delmonsterdrop(RedButterfly, CherryCocktail);
+ delmonsterdrop(Maggot, CactusCocktail);
+ delmonsterdrop(DesertMaggot, CactusCocktail);
+ delmonsterdrop(Scorpion, CactusCocktail);
+ delmonsterdrop(GiantMaggot, CactusCocktail);
+ delmonsterdrop(Centaur, CactusCocktail);
+ delmonsterdrop(AlphaMouboo, AppleCocktail);
+ delmonsterdrop(OceanCroc, AppleCocktail);
+ delmonsterdrop(Mouboo, AppleCocktail);
+ delmonsterdrop(Pinkie, AppleCocktail);
+ delmonsterdrop(Duck, Sunglasses);
+ delmonsterdrop(Croc, Sunglasses);
+ delmonsterdrop(SaxsoGhost, Sunglasses);
+ delmonsterdrop(DesertMaggot, Sunglasses);
+ delmonsterdrop(Scorpion, Sunglasses);
+ delmonsterdrop(GiantMaggot, Sunglasses);
+ delmonsterdrop(Centaur, Sunglasses);
+ delmonsterdrop(AlphaMouboo, Sunglasses);
+ delmonsterdrop(OceanCroc, Sunglasses);
+ delmonsterdrop(Mouboo, Sunglasses);
+ delmonsterdrop(Pinkie, Sunglasses);
+ delmonsterdrop(Moonshroom, Sunglasses);
+ delmonsterdrop(RedButterfly, Sunglasses);
+ end;
+
+OnInit:
+OnHour00:
+ if ($@SEASON != season()) {
+ SeasonReload();
+ }
+ end;
+}
diff --git a/npc/functions/shake.txt b/npc/functions/shake.txt
new file mode 100644
index 000000000..667f0c1b8
--- /dev/null
+++ b/npc/functions/shake.txt
@@ -0,0 +1,39 @@
+// Shake player screen
+// Usage:
+// set @max_shake then call OnShake
+// call OnGM
+
+- script shake 32767,{
+ end;
+
+// Loops until @shake is @max_shake
+OnShake:
+ @shake+=1;
+ movecam rand(-20,20), rand(-20,20);
+ //closeclientdialog;
+
+ if (@shake < @max_shake) {
+ addtimer(50, "shake::OnShake");
+ } else {
+ @shake=0;
+ restorecam;
+ closedialog;
+ }
+ end;
+
+// Called by GM Command
+OnGM:
+ @shake=0;
+ @max_shake=rand(6,10);
+ addtimer(50, "shake::OnShake");
+ end;
+
+OnCall:
+ getmapxy(.@m$,.@x,.@y,0);
+ areatimer(.@m$, .@x-15, .@y-15, .@x+15, .@y+15, 10, "shake::OnGM");
+ end;
+
+OnInit:
+ bindatcmd "shake", "shake::OnCall", 80, 80, 1;
+ end;
+}
diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt
index 831451e89..b83526c8d 100644
--- a/npc/functions/soul_menhir.txt
+++ b/npc/functions/soul_menhir.txt
@@ -41,7 +41,20 @@ L_Save:
L_Aeros:
if (!$@GM_EVENT) goto L_DontPanic;
- warp "001-1", 235, 26;
+ .@gt=$@AEROS_SPWN;
+ if (.@gt == 2) {
+ select
+ l("East Aeros"),
+ l("West Aeros");
+ .@gt=@menu-1;
+ }
+ switch (.@gt) {
+ case 0:
+ warp "001-1", 235, 26; break;
+ case 1:
+ warp "001-1", 23, 108; break;
+ }
+ specialeffect(63, AREA, getcharid(3));
message strcharinfo(0), l("You are now at the Mana Plane of Existence, at the Floating Island of Aeros.");
close;
diff --git a/npc/functions/string.txt b/npc/functions/string.txt
index efeaf476d..627f0abc6 100644
--- a/npc/functions/string.txt
+++ b/npc/functions/string.txt
@@ -102,6 +102,7 @@ function script format_number {
// get from user language
switch (Lang) {
case 1: .@separator$ = " "; break; // French
+ case 4: .@separator$ = "."; break; // Brazilian
default: .@separator$ = ","; // English (default)
}
}
@@ -141,6 +142,8 @@ function script strip {
.@end--;
}
}
+ //debugmes "STRIP.DEBUG MODE ENABLED BY JESUSALVA. PASSING SUBSTRING PARAMS";
+ //debugmes "String \""+.@s$+"\" from "+str(.@start)+" to "+str(.@end);
return substr(.@s$, .@start, .@end);
}
diff --git a/npc/functions/time.txt b/npc/functions/time.txt
index 30ab9f469..76be1894d 100644
--- a/npc/functions/time.txt
+++ b/npc/functions/time.txt
@@ -2,6 +2,11 @@ function script now {
return gettimetick(2);
}
+// Returns current time. A SQL update superseeded this.
+// santime( )
+function script santime {
+ return gettimetick(2);
+}
function script time_from_ms {
return now() + (getarg(0) / 1000);
@@ -33,12 +38,13 @@ function script time_from_days {
// 4 show "from now" instead of "in" when in the future
//
// <precision> is the number of units to show,
-// by default uses max precision
+// by default uses two (eg. 2m30s or 1h20m).
+// Use '99' for max precision
function script FuzzyTime {
.@future = getarg(0, now());
- .@options = getarg(1, 0);
- .@precision = getarg(2, 99);
+ .@options = getarg(1, 3);
+ .@precision = getarg(2, 2);
.@diff = (.@future - now());
// check if in the past, or in the future
diff --git a/npc/functions/timer.txt b/npc/functions/timer.txt
index e79070f3b..1b5fa8c57 100644
--- a/npc/functions/timer.txt
+++ b/npc/functions/timer.txt
@@ -54,3 +54,14 @@ function script mapdeltimer {
}
return .@i;
}
+
+// partytimer("<map>", <tick>, "<npc>::<event>", partyid)
+function script partytimer {
+ .@c = getunits(BL_PC, .@players, false, getarg(0));
+ for (.@i = 0; .@i < .@c; .@i++) {
+ if (getcharid(2, strcharinfo(0,"",.@players[.@i]) ) == getarg(3))
+ addtimer(getarg(1), getarg(2), .@players[.@i]);
+ }
+ return .@i;
+}
+
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 10c9fbbfa..181f02ca0 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -1,43 +1,13 @@
// TMW2 Script.
-// Evol functions.
// Authors:
-// Reid
// Jesusalva
// Description:
// Util functions
-// season_direction({day, month})
-// returns the direction that represents our current season (approximation)
-// DOWN: Winter, 21/12
-// DOWNLEFT: Spring, 20/03
-// LEFT: Summer, 21/06
-// UPLEFT: Autumn, 22/09
-
-function script season_direction {
- .@current_month = getarg(0, gettime(GETTIME_MONTH));
-
- if (.@current_month % 3 == 0)
- {
- .@current_day = getarg(1, 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;
-}
// Returns Nard reputation for discounts
-// Currently ranges from 0 to 11.
+// Currently ranges from 0 to 15.
function script nard_reputation {
.@nr=0; // Base reputation
@@ -57,6 +27,10 @@ function script nard_reputation {
if (getq(CandorQuest_Sailors) >= 3)
.@nr=.@nr+1;
+ // Sailors Quest, part 2 (+1 rep)
+ if (getq(CandorQuest_SailorCure) >= 3)
+ .@nr=.@nr+1;
+
// Vincent Quest (+1 rep)
if (getq(CandorQuest_Vincent) >= 2)
.@nr=.@nr+1;
@@ -81,14 +55,286 @@ function script nard_reputation {
if (getq(ShipQuests_Peter) == 3 || getq(ShipQuests_Peter) == 5)
.@nr=.@nr+1;
+ // Tulimshar Quests
// Swezanne Quest (+1 rep)
if (getq(TulimsharQuest_Swezanne) >= 1)
.@nr=.@nr+1;
+ // Sailors Quest (+1 rep)
+ if (getq(TulimsharQuest_Sailors) >= 2)
+ .@nr=.@nr+1;
+
+ // Hasan Quest (+1 rep)
+ if (getq(TulimsharQuest_Hasan) >= 5)
+ .@nr=.@nr+1;
+
+ // Dausen Quest (+1 rep)
+ if (getq(TulimsharQuest_WaterForGuard) >= 3)
+ .@nr=.@nr+1;
+
//debugmes "Reputation: "+str(.@nr);
return .@nr;
}
+// Returns reputation with the La Marine for discounts
+// Takes one argument (PC_DEST$). Grep for "getarg".
+function script reputation {
+ .@nr=0; // Base reputation
+
+ // Tulimshar Quests (12 points)
+ if (getarg(0) == "Tulim") {
+ // Swezanne Quest (+1 rep)
+ if (getq(TulimsharQuest_Swezanne) >= 1)
+ .@nr=.@nr+1;
+
+ // Sailors Quest (+1 rep)
+ if (getq(TulimsharQuest_Sailors) >= 2)
+ .@nr=.@nr+1;
+
+ // Hasan Quest (+1 rep)
+ if (getq(TulimsharQuest_Hasan) >= 5)
+ .@nr=.@nr+1;
+
+ // Dausen Quest (+1 rep)
+ if (getq(TulimsharQuest_WaterForGuard) >= 3)
+ .@nr=.@nr+1;
+
+ // Eugene Quest (+1 rep)
+ if (getq(TulimsharQuests_Fishman) >= 2)
+ .@nr=.@nr+1;
+
+ // Sarah Quest (+1 rep)
+ if (getq(TulimsharQuest_Sarah) >= 1)
+ .@nr=.@nr+1;
+
+ // Silvia Quest (+1 rep)
+ if (getq(TulimsharQuest_Lifestone) >= 2)
+ .@nr=.@nr+1;
+
+ /*
+ // Eisten Quest (+1 rep)
+ if (getq(TulimsharQuest_Eistein) >= 6)
+ .@nr=.@nr+1;
+ */
+ // Devoir Quest (+1 rep)
+ if (getq(TulimsharQuest_Devoir) >= 1)
+ .@nr=.@nr+1;
+
+ // Zarkor Quest (+1 rep)
+ if (getq(TulimsharQuest_DarkInvocator) >= 7)
+ .@nr=.@nr+1;
+
+ // Anwar Quest (+1 rep)
+ if (getq(TulimsharQuest_AnwarField) >= 10)
+ .@nr=.@nr+1;
+
+ // Tycoon Quest (+1 rep)
+ if (getq(MineQuest_Tycoon) >= 15)
+ .@nr=.@nr+1;
+
+ // Neko Quest (+1 rep)
+ if (getq(TulimsharQuest_Neko) >= 2)
+ .@nr=.@nr+1;
+
+
+
+ // Hurnscald Quests (5 points)
+ } else if (getarg(0) == "Hurns") {
+
+ // Alan Quest (+1 rep)
+ if (getq(HurnscaldQuest_ForestBow) >= 2)
+ .@nr=.@nr+1;
+
+ // Gwendolyn Quest (+1 rep)
+ if (getq(HurnscaldQuest_HarkEye) >= 6)
+ .@nr=.@nr+1;
+
+ // Celestia Quest (+1 rep)
+ if (getq(HurnscaldQuest_TeaParty) >= 2)
+ .@nr=.@nr+1;
+
+ // Farmers Quest (+1 rep)
+ if (getq(HurnscaldQuest_Farmers) >= 5)
+ .@nr=.@nr+1;
+
+ // Helena Quest (+1 rep)
+ if (getq(HurnscaldQuest_Bandits) >= 8)
+ .@nr=.@nr+1;
+
+
+
+
+ // Land Of Fire Quests (3 points)
+ } else if (getarg(0) == "LoF") {
+
+ // The EPISODE (+1 rep)
+ if (getq(LoFQuest_EPISODE) >= 2)
+ .@nr=.@nr+1;
+
+ // George Quest (+1 rep)
+ if (getq(LoFQuest_George) >= 3)
+ .@nr=.@nr+1;
+
+ // Fairy Quest (+1 rep)
+ if (getq(LoFQuest_Fairy) >= 3)
+ .@nr=.@nr+1;
+
+ // Final
+ }
+
+ //debugmes "Reputation: "+str(.@nr);
+ return .@nr;
+
+}
+
+
+// Returns time for ship travel.
+// Can be modified by a factor.
+function script nard_time {
+ // Estimates time to move by ship from LOCATION$ to getarg(0)
+
+ // From Candor
+ if (LOCATION$ == "Candor") {
+ if (getarg(0) == "Tulim")
+ return 22000;
+
+ }
+ // From Tulimshar
+ if (LOCATION$ == "Tulim") {
+ if (getarg(0) == "Candor")
+ return 22000;
+ if (getarg(0) == "Hurns")
+ return 24000;
+
+ }
+ // From Hurnscald
+ if (LOCATION$ == "Hurns") {
+ if (getarg(0) == "Candor")
+ return 22000;
+ if (getarg(0) == "Tulim")
+ return 24000;
+
+ }
+
+ // Error
+ debugmes "ERROR, INVALID LOCATION AND DESTINATION";
+ debugmes l("@@ -> @@", LOCATION$, getarg(0));
+ dispbottom l("An error on your travel time happened. Please report.");
+ return INT_MAX;
+}
+
+// Determines if player is still in range.
+// eg.
+// if (reachable(.x, .y, .distance)) {
+function script reachable {
+ .@x=getarg(0);
+ .@y=getarg(1);
+ .@z=getarg(2);
+ getmapxy(.@mp$, .@xp, .@yp, 0);
+
+ if (distance(.@x, .@y, .@xp, .@yp) <= .@z)
+ return 1;
+ else
+ return 0;
+}
+
+// Determines if party exp sharing is enabled
+// ( Party ID )
+function script party_expon {
+ .@nb = query_sql("SELECT exp FROM `party` WHERE party_id="+escape_sql(getarg(0))+" LIMIT 2", .@value);
+ return .@value[0];
+}
+
+
+// Prepare Mana Stone
+// mstone( lvl )
+function script mstone {
+ // Fill variable
+ .@v=getarg(0);
+
+ // Determine how much stats you need, this is based on players
+ // and change based on $Global Variables
+ .int=15;
+ .lvl=20;
+ .jlv=15;
+
+ return (
+ MAGIC_LVL == .@v &&
+ readparam(bInt) >= $MANA_BINT+(.int*.@v) &&
+ BaseLevel >= $MANA_BLVL+(.lvl*.@v) &&
+ JobLevel >= $MANA_JLVL+(.jlv*.@v) &&
+ readparam(Sp) == readparam(MaxSp));
+}
+
+// Gets how many subclasses were actually filled
+// total_subclass( )
+function script total_subclass {
+ .@i=0;
+ if (MAGIC_SUBCLASS & CL_PALADIN)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_TANKER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_BERSERKER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_RANGER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_SNIPER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_WIZARD)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_SAGE)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_PRIEST)
+ .@i+=1;
+ return .@i;
+}
+
+// Gets how many subclasses were actually allowed
+// max_subclass()
+function script max_subclass {
+ return (MAGIC_LVL/2);
+}
+
+
+// Gets subclass current degree
+// degree_subclass()
+function script degree_subclass {
+ return (MAGIC_LVL/2)+(MAGIC_LVL%2);
+}
+
+// Returns true if a skill can be leveled up, based on degree_subclass().
+// sk_canlvup( sk )
+function script sk_canlvup {
+ if (getskilllv(getarg(0)) <= degree_subclass())
+ return 1;
+ return 0;
+}
+
+// Level up a skill in 1 level
+// sk_lvup( sk )
+function script sk_lvup {
+ .@lvl=getskilllv(getarg(0));
+ getexp 0, 50*(.@lvl+1);
+ addtoskill(getarg(0),.@lvl+1,0);
+ return;
+}
+
+// Returns the intelligence cost based on skill level
+// sk_intcost( sk )
+function script sk_intcost {
+ .@cost=(getskilllv(getarg(0))+1)*17;
+ if (readparam(bInt) >= .@cost)
+ return 1;
+ return 0;
+}
+
+// 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 {
+ .@base=(MAGIC_LVL**3);
+ return (MAGIC_EXP/.@base);
+}
diff --git a/npc/functions/villagertalk.txt b/npc/functions/villagertalk.txt
deleted file mode 100644
index 371a9f20b..000000000
--- 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/weather.txt b/npc/functions/weather.txt
new file mode 100644
index 000000000..69bf20d5a
--- /dev/null
+++ b/npc/functions/weather.txt
@@ -0,0 +1,189 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Controls world seasons. RESPECT MASK_* VARS ON CONSTANTS DB
+
+// is_night()
+function script is_night {
+ // For convenience, night time is from 00:15 to 00:45, every hour.
+ // 2 = GETTIME_MINUTE
+ if (gettime(2) >= 15 && gettime(2) < 45)
+ return 1;
+ return 0;
+}
+
+000-0,0,0,0 script #WeatherCore NPC_HIDDEN,{
+ end;
+
+/*
+ * removemapflag("<map name>", <flag>)
+ * setmapflag("<map name>", <flag>{, <val>})
+ * getmapflag("<map name>", <flag>)
+
+ mf_snow: 16
+
+ mf_jexp: 39
+ mf_bexp: 40
+*/
+
+OnInit:
+ // Bind commands
+ bindatcmd "wsnow", "#WeatherCore::OnSnow", 80, 80, 1;
+ bindatcmd "wrain", "#WeatherCore::OnRain", 80, 80, 1;
+ bindatcmd "wsand", "#WeatherCore::OnSand", 80, 80, 1;
+ bindatcmd "wevil", "#WeatherCore::OnEvil", 80, 80, 1;
+ bindatcmd "wnight", "#WeatherCore::OnNight", 80, 80, 1;
+ bindatcmd "wclear", "#WeatherCore::OnClear", 80, 80, 1;
+
+
+ // Determine which maps are subject to weather, and how weather works:
+ // eg. it will never snow on a desert, or a sandstorm on icelands.
+ .wcore = htnew;
+
+ // Deserts
+ htput(.wcore, "003-1", "desert");
+ htput(.wcore, "004-1", "desert");
+ htput(.wcore, "004-2", "desert");
+ htput(.wcore, "009-1", "desert");
+ htput(.wcore, "010-1", "desert");
+ htput(.wcore, "010-2", "desert");
+
+ // Woodlands
+ htput(.wcore, "005-1", "woodland");
+ htput(.wcore, "012-1", "woodland");
+ htput(.wcore, "014-1", "woodland");
+ htput(.wcore, "014-2", "woodland");
+ htput(.wcore, "014-3", "woodland");
+ htput(.wcore, "014-4", "woodland");
+ htput(.wcore, "014-5", "woodland");
+ htput(.wcore, "017-1", "woodland");
+ htput(.wcore, "018-1", "woodland");
+ htput(.wcore, "018-2", "woodland");
+ htput(.wcore, "018-4", "woodland");
+ htput(.wcore, "018-5", "woodland");
+
+ // Icelands
+ htput(.wcore, "001-7", "iceland");
+
+ debugmes "[Weather.sys] Total Maps = " + htsize(.wcore);
+ // No "end" here, so server starts with weather
+OnMinute00:
+OnMinute15:
+OnMinute30:
+OnMinute45:
+
+ .@hti = htiterator(.wcore);
+ for(.@key$ = htinextkey(.@hti); hticheck(.@hti); .@key$ = htinextkey(.@hti)) {
+ // Local variables: .@key$ .@type .@r
+ .@type$=htget(.wcore, .@key$);
+ .@r=rand(0,10000);
+
+ // Clear weather map masks
+ .@mk=getmapmask(.@key$);
+
+ if (.@mk & MASK_RAIN)
+ .@mk=.@mk^MASK_RAIN;
+ if (.@mk & MASK_SANDSTORM)
+ .@mk=.@mk^MASK_SANDSTORM;
+ if (.@mk & MASK_SNOW)
+ .@mk=.@mk^MASK_SNOW;
+ if (.@mk & MASK_NIGHT)
+ .@mk=.@mk^MASK_NIGHT;
+
+ // Remove all current masks, and add rain/snow/sand
+ if (.@type$ == "desert") {
+ if (.@r < 10)
+ .@mk=MASK_RAIN;
+ else if (.@r < 300)
+ .@mk=MASK_SANDSTORM;
+
+ } else if (.@type$ == "woodland") {
+ if (.@r < 300)
+ .@mk=MASK_RAIN;
+ if (season() == WINTER)
+ .@mk=.@mk|MASK_SNOW;
+
+ } else if (.@type$ == "iceland") {
+ if (.@r < 30)
+ .@mk=MASK_RAIN;
+ else if (.@r < 300)
+ .@mk=MASK_SNOW;
+
+ } else {
+ debugmes "Warning warning, blame Saulc! Weather system error on map "+.@key$;
+ announce("ERROR BLAME SAULC! WEATHER SYSTEM CORRUPTED.", bc_all);
+ }
+
+ // Bugfix
+ if (!(.@mk & MASK_NONE))
+ .@mk=.@mk|MASK_NONE;
+
+ setmapmask .@key$, .@mk;
+
+ // Is it night time?
+ if (is_night()) {
+ setmapflag(.@key$, mf_nightenabled);
+ addmapmask .@key$, MASK_NIGHT;
+ } else if (getmapmask(.@key$) & MASK_NIGHT) {
+ removemapflag(.@key$, mf_nightenabled);
+ removemapmask .@key$, MASK_NIGHT;
+ }
+
+ }
+ htidelete(.@hti);
+
+ // During night, normal monsters respawn 30% faster. (Bifs and Bosses are immune)
+ if (is_night())
+ setbattleflag("mob_spawn_delay", 70);
+ else
+ setbattleflag("mob_spawn_delay", 100);
+
+ debugmes "[Weather.sys] Weather reloaded";
+ end;
+
+ // Function to check stuff
+ // WeatherSwitch ( MASK, MAP )
+ function WeatherSwitch {
+ // Get map
+ getmapxy(.@key$,.@a,.@b,0);
+
+ // Sanitize
+ .@m$ = htget(.wcore, .@key$, "Not found");
+
+ // Change Weather or abort
+ if (.@m$ == "Not found")
+ dispbottom l("Command not permitted on this map! Check npc/functions/weather.conf");
+ else
+ addmapmask(.@key$, getarg(0));
+ return;
+ }
+
+// Some commands, for GMs manually override weather
+OnRain:
+ WeatherSwitch(MASK_RAIN);
+ end;
+
+OnSand:
+ WeatherSwitch(MASK_SANDSTORM);
+ end;
+
+OnSnow:
+ WeatherSwitch(MASK_SNOW);
+ end;
+
+OnNight:
+ WeatherSwitch(MASK_NIGHT);
+ end;
+
+OnEvil:
+ WeatherSwitch(MASK_EVILSANCTUM);
+ end;
+
+// Clear works on any map
+OnClear:
+ getmapxy(.@key$,.@a,.@b,0);
+ setmapmask(.@key$, MASK_NONE);
+ end;
+
+}
diff --git a/npc/items/books.txt b/npc/items/books.txt
index f4d4b5365..87877ec27 100644
--- a/npc/items/books.txt
+++ b/npc/items/books.txt
@@ -47,7 +47,7 @@
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));
+ getitemlink(RoastedMaggot), getitemlink(CaveSnakeTongue));
break;
case 3:
narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
@@ -97,11 +97,12 @@ OnInit:
narrator 1,
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, and Bhoppers eat only Aquadas."),
+ l("Pets must keep a strict diet. Pious eats Piberries, Bhoppers eat Aquadas, and Maggots eats Bug Legs."),
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("Dying will also decrease the pet intimacy, and there are bonuses when your intimacy is high!"),
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("Some pets will also collect loot for you, right click on it so it drop whatever it is holding for you."),
l("...And if you're still trying to check your pet stats, just hover it with your mouse. Thanks."),
l("-- Animals Protection Agency of Hurnscald");
}
@@ -122,3 +123,145 @@ OnInit:
end;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+000-0,0,0,0 script #Book-JGrimorium NPC_HIDDEN,{
+
+ function read_book {
+
+ setnpcdialogtitle l(.book_name$);
+
+ narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("I, second sage of Fate, write this book. The knowledge on it shall guide you to the Secret Of Mana.");
+
+ @menu = 0; // reset for the rif
+
+ do
+ {
+ narrator S_NO_NPC_NAME,
+ l("Please select a chapter:");
+
+ mes "";
+
+ select
+ rif( MAGIC_LVL >= 2 ,rif(@menu == 1, "► ") + l("Ch 1 — Prologue")),
+ rif( MAGIC_EXP ,rif(@menu == 2, "► ") + l("Ch 2 — Mana Magic vs Common Magic")),
+ rif( MAGIC_LVL >= 2 ,rif(@menu == 3, "► ") + l("Ch 3 — Subclass")),
+ rif( false ,rif(@menu == 4, "► ") + l("Ch 4 — Casting")),
+ rif( false ,rif(@menu == 5, "► ") + l("Ch 5 — Reeling")),
+ l("Close");
+
+ switch(@menu)
+ {
+ case 1:
+ narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Mana is something which existed since the being, but nobody knows much about."),
+ l("This book will write itself, and reveal you the Secret Of Mana."),
+ l("Give it time, increase your magic power, and you'll find out the truth."),
+ l("Your current maximum magic efficiency is @@. This book allows you many new possibilities.", MAGIC_LVL);
+ break;
+ case 2:
+ narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("There are two kind of magic: Mana Skills and Magic Skills."),
+ l("They look like the same, but they're not. Mana Skills have a Magic Experience meter and have different rules."),
+ l("Re-casting the same mana skill won't give you magic experience. Magic Skills doesn't have this system, and level up on quest or, depending on the skill, on the skill window, using Job Level."),
+ l("The easiest way to identify is: Mana Skills never target a single foe. This grimorium reports your Mana Skills.");
+ if (getskilllv(TMW2_ZARKOR))
+ mesc l("Summon Cave Maggot - @sk-zarkor");
+ if (getskilllv(TMW2_KALMURK))
+ mesc l("Summon Maggot - @sk-kalmurk");
+ if (getskilllv(TMW2_PARUM))
+ mesc l("Parum - @sk-parum");
+ next;
+ mesn l("Current Magic Control");
+ .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5);
+ .@base=(MAGIC_LVL**3);
+ if (.@val > .@base*5)
+ mesc l("You are perfectly in control of your magic."), 3;
+ else if (.@val > .@base*4)
+ mesc l("You are mostly in control of your magic."), 2;
+ else if (.@val > .@base*3)
+ mesc l("You are somewhat in control of your magic."), 4;
+ else if (.@val > .@base*2)
+ mesc l("Your magic is more powerful than you, but you can control."), 7;
+ else if (.@val > .@base)
+ mesc l("You still are overwhelmed by your magic."), 6;
+ else
+ mesc l("You are completly overwhelmed by your magic."), 1;
+ next;
+ break;
+ case 3:
+ mesc l("You currently have @@/@@ subclass(es).", total_subclass(),max_subclass());
+ if (MAGIC_SUBCLASS & CL_PALADIN)
+ mesc lg("Paladin");
+ if (MAGIC_SUBCLASS & CL_TANKER)
+ mesc lg("Tanker");
+ if (MAGIC_SUBCLASS & CL_BERSERKER)
+ mesc lg("Berserker");
+ if (MAGIC_SUBCLASS & CL_RANGER)
+ mesc lg("Ranger");
+ if (MAGIC_SUBCLASS & CL_SNIPER)
+ mesc lg("Sniper");
+ if (MAGIC_SUBCLASS & CL_WIZARD)
+ mesc lg("Wizard");
+ if (MAGIC_SUBCLASS & CL_SAGE)
+ mesc lg("Sage");
+ if (MAGIC_SUBCLASS & CL_PRIEST)
+ mesc lg("Priest");
+ next;
+ break;
+ case 4:
+ narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("-"),
+ l("-"),
+ l("-");
+ break;
+ case 5:
+ narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("-"),
+ l("-");
+ break;
+ default:
+ close;
+ }
+ } while (true);
+
+ end;
+ }
+
+OnShelfUse:
+ if (openbookshelf())
+ read_book;
+ bye;
+
+OnUse:
+ read_book;
+ bye;
+
+OnInit:
+ .book_name$ = getitemname(JesusalvaGrimorium);
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
+
diff --git a/npc/items/croconut.txt b/npc/items/croconut.txt
index d6a6026c1..a1c4097ae 100644
--- a/npc/items/croconut.txt
+++ b/npc/items/croconut.txt
@@ -2,19 +2,16 @@
// Authors:
// 4144
// Reid
+// Jesusalva
// 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-0,0,0,0 script Croconut NPC_HIDDEN,{
close;
OnUse:
mesn "Narrator";
- mes col(l("Do you want to cut this @@?", getitemlink(Croconut)), 9);
+ mesc l("Do you want to cut this @@?", getitemlink(Croconut));
next;
menu
@@ -25,19 +22,17 @@ OnUse:
close;
L_Weapon:
- mes "";
- mesn "Narrator";
- mes col(l("Which of your weapons do you want to use in order to cut this @@?", getitemlink(Croconut)), 9);
- next;
-
- // ToDo this must be replaced
- 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"), -;
+ .@r=rand(1,5);
+ switch (.@r) {
+ case 1:
+ case 2:
+ case 3:
+ goto L_TooWeak; break;
+ case 4:
+ goto L_Weak; break;
+ case 5:
+ goto L_Good; break;
+ }
L_TooWeak:
mes "";
@@ -57,24 +52,23 @@ L_TooWeak:
if ( (.@q > 6) ) goto L_Good;
L_TooWeakLost:
- mes col(l("You hit too hard with your fist, you destroyed your @@.", getitemlink(Croconut)), 9);
-
+ mesc l("Ops! You destroyed your @@.", getitemlink(Croconut));
close;
L_TooWeakFail:
- mes col(l("Your hands are too weak, you did not succeed in opening this @@.", getitemlink(Croconut)), 9);
+ mesc l("Well... you did not succeed in opening this @@.", getitemlink(Croconut));
getitem Croconut, 1;
close;
L_Weak:
- mes col(l("You opened the @@ in two parts, but you crushed one of them.", getitemlink(Croconut)), 9);
+ mesc l("You opened the @@ in two parts, but you crushed one of them.", getitemlink(Croconut));
getitem HalfCroconut, 1;
close;
L_Good:
- mes col(l("You perfectly cut your @@ into two edible parts.", getitemlink(Croconut)), 9);
+ mesc l("You perfectly cut your @@ into two edible parts.", getitemlink(Croconut));
getitem HalfCroconut, 2;
close;
diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt
index bc3d870fe..8bb6aac0a 100644
--- a/npc/items/rand_sc_heal.txt
+++ b/npc/items/rand_sc_heal.txt
@@ -14,6 +14,9 @@
// 2 Other
// 3 Special 1
// 4 Special 2
+//
+// *getequipoption(EQI_HEAD_TOP,1,168); → Heal Bonus (should be first bonus on Chef Hat)
+
- script rand_sc_heal -1,{
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt
index f01a0fcbe..e16fce0ce 100644
--- a/npc/items/shovel.txt
+++ b/npc/items/shovel.txt
@@ -1,9 +1,50 @@
+// TMW2 Script
// Evol scripts.
// Author:
// Travolta
+// Jesusalva
// Description:
// NPC to use shovel (dig, bury etc)
+// shovel_scriptItem( map, x, y, item, {amount} )
+function script shovel_scriptItem {
+ .@map$=getarg(0);
+ .@x=getarg(1);
+ .@y=getarg(2);
+ .@id=getarg(3);
+ .@amount=getarg(4,1);
+
+ .@wtc = getarraysize($@WBT_Random_id);
+ $@WBT_Random_id[.@wtc] = .@id;
+ $@WBT_Random_amount[.@wtc] = .@amount;
+ $@WBT_Random_map$[.@wtc] = .@map$;
+ $@WBT_Random_x[.@wtc] = .@x;
+ $@WBT_Random_y[.@wtc] = .@y;
+ //debugmes "Buried"+.@amount+" "+getitemname(.@id);
+ return;
+}
+
+// shovel_scatter( map, x1, y1, x2, y2, items_array, {amount} )
+function script shovel_scatter {
+ .@map$=getarg(0);
+ .@x1=getarg(1);
+ .@y1=getarg(2);
+ .@x2=getarg(3);
+ .@y2=getarg(4);
+ .@id=getarg(5);
+ .@amount=getarg(6,1);
+
+ freeloop(true); // DANGEROUS
+ for (.@i = 0; .@i < .@amount; .@i++)
+ shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), any_of(.@id));
+ freeloop(false);
+
+ .@wtc = getarraysize($@WBT_Random_id);
+ debugmes "Scattered "+.@amount+" items on "+.@map$+". Currently scattered: "+.@wtc;
+ return;
+
+}
+
- script Shovel -1,{
function CheckDigLocation {
@@ -43,12 +84,15 @@
}
function PlayerIsTired {
+ // GMs can do this in an unrestricted way
+ if (is_gm())
+ return 0;
+
.@tick = gettimetick(1);
- .@playertick = .PlayerTiredTime - readparam(bStr);
- if (@ShovelLastUsed + max(4, .@playertick) > .@tick)
- {
- narrator S_FIRST_BLANK_LINE,
- lg("You are exhausted, you should rest a bit.");
+ .@playertick = .PlayerTiredTime - (readparam(bStr)/5) - (readparam(bVit)/10);
+ if (@ShovelLastUsed + max(5, .@playertick) > .@tick) {
+ mes "";
+ mesc lg("You are exhausted, you should rest a bit.");
return 1;
}
@ShovelLastUsed = .@tick;
@@ -56,6 +100,7 @@
}
function Dig {
+ // First check: Did some player burried a TREASURE? O.o
getmapxy(.@map$, .@x, .@y, 0);
for (.@i = 0; .@i < getarraysize($WorldBuriedTreasures_id); .@i++)
{
@@ -65,6 +110,9 @@
{
.@id = $WorldBuriedTreasures_id[.@i];
.@amount = $WorldBuriedTreasures_amount[.@i];
+
+ inventoryplace .@id, .@amount;
+
deletearray $WorldBuriedTreasures_id[.@i], 1;
deletearray $WorldBuriedTreasures_amount[.@i], 1;
deletearray $WorldBuriedTreasures_map$[.@i], 1;
@@ -77,6 +125,30 @@
return 1;
}
}
+ // Second check: Perhaps here is a rare, random ore?
+ for (.@i = 0; .@i < getarraysize($@WBT_Random_id); .@i++)
+ {
+ if (!strcmp($@WBT_Random_map$[.@i], .@map$) &&
+ $@WBT_Random_x[.@i] == .@x &&
+ $@WBT_Random_y[.@i] == .@y)
+ {
+ .@id = $@WBT_Random_id[.@i];
+ .@amount = $@WBT_Random_amount[.@i];
+
+ inventoryplace .@id, .@amount;
+
+ deletearray $@WBT_Random_id[.@i], 1;
+ deletearray $@WBT_Random_amount[.@i], 1;
+ deletearray $@WBT_Random_map$[.@i], 1;
+ deletearray $@WBT_Random_x[.@i], 1;
+ deletearray $@WBT_Random_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;
}
@@ -84,20 +156,33 @@
function Bury {
narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("What would you like to bury?");
.@items$ = "";
- getinventorylist;
- for (.@i = 0; .@i < @inventorylist_count; .@i++)
- {
- .@items$ = .@items$ + getitemname(@inventorylist_id[.@i]) + ":";
- debugmes getitemname(@inventorylist_id[.@i]);
+
+ 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
+ // GMs bypass rarity check. (A trade restriction check would be better)
+ if (.@id < 1 || countitem(.@id) < 1 || .@id == IronShovel || checkbound(.@id) ||
+ (!is_gm() && !getiteminfo(.@id, ITEMINFO_MAXCHANCE))
+ ) {
+ @ShovelLastUsed = 0;
+ if (.@id == IronShovel || checkbound(.@id))
+ mesc l("You cannot bury this item!");
+ else if (!getiteminfo(.@id, ITEMINFO_MAXCHANCE))
+ mesc l("This item is too precious, you cannot part with it!");
+ else
+ mesc l("You give up.");
+ return;
}
- .@idx = select(.@items$) - 1;
- .@id = @inventorylist_id[.@idx];
+
.@amount = 1;
- if (@inventorylist_amount[.@idx] > 1)
- {
+ if (countitem(.@id) > 1) {
narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("Amount?");
- input .@amount, 1, @inventorylist_amount[.@idx];
+ input .@amount, 0, countitem(.@id);
}
+ if (.@amount == 0 || .@amount > countitem(.@id))
+ return;
getmapxy(.@map$, .@x, .@y, 0);
delitem .@id, .@amount;
@@ -133,15 +218,13 @@
}
OnUse:
- if (!CheckDigLocation())
- {
+ if (!CheckDigLocation()) {
message strcharinfo(0), l("I can't use the shovel here.");
close;
}
narrator S_LAST_BLANK_LINE,
- l("You hold the shovel in your hands."),
- l("What are you going to do?");
+ l("You hold the shovel in your hands. What are you going to do?");
.@action = select(
l("Dig."),
@@ -162,19 +245,58 @@ OnUse:
Bury();
break;
case 3:
- narrator S_FIRST_BLANK_LINE, l("You hide your shovel.");
+ narrator S_FIRST_BLANK_LINE, l("You withdraw your shovel.");
break;
}
close;
-OnHour00:
- if (playerattached())
- @ShovelLastUsed = 0;
- end;
OnInit:
- .PlayerTiredTime = 20;
- AddDigRect("001-1", 172, 26, 200, 48);
+ // Define constants
+ .PlayerTiredTime = 25;
+
+ // You can bury & dig on all mines
+ AddDigRect("007-1", 20, 20, 180, 180);
+ AddDigRect("011-1", 20, 20, 180, 180);
+ AddDigRect("015-1", 20, 20, 180, 180);
+
+ // Aeros can be used too (for events)
+ AddDigRect("001-1", 20, 20, 342, 158);
+
+ // LoF Areas
+ AddDigRect("018-1", 20, 20, 80, 80);
+
+OnHour00:
+ // Clear random treasure
+ deletearray $@WBT_Random_id;
+ deletearray $@WBT_Random_amount;
+ deletearray $@WBT_Random_map$;
+ deletearray $@WBT_Random_x;
+ deletearray $@WBT_Random_y;
+
+ // Current treasures list
+ // Food, misc, ores, gems, "rares"
+ setarray .@Treasure,
+ Bread,Candy,BugLeg,Cheese,Acorn,
+ Bread,Candy,BugLeg,Cheese,Acorn,
+ ScorpionStinger,CoinBag,RustyKnife,TreasureKey,CasinoCoins,SulfurPowder,
+ ScorpionStinger,CoinBag,RustyKnife,TreasureKey,CasinoCoins,SulfurPowder,
+ Coal,IronOre,CopperOre,LeadOre,TinOre,SilverOre,GoldOre,PlatinumOre,IridiumOre,TitaniumOre,
+ Coal,IronOre,CopperOre,LeadOre,TinOre,SilverOre,GoldOre,PlatinumOre,IridiumOre,TitaniumOre,
+ Diamond,Ruby,Emerald,Sapphire,Topaz,Amethyst,
+ BoneArrow, SacredBullet;
+
+ // Scatter Treasure.
+ // There are 25600 possible cells, and over half of them are collisions.
+ // As we don't prevent treasure from falling on collision, it is pretty high.
+ // If two treasures fall on same place, the previous treasure will be deleted.
+ // Theoretical chance of uncovering a treasure on an attempt is 0.12% to 0.70%
+ shovel_scatter("007-1", 20, 20, 180, 180, .@Treasure, rand(30,180));
+ shovel_scatter("011-1", 20, 20, 180, 180, .@Treasure, rand(30,180));
+ shovel_scatter("015-1", 20, 20, 180, 180, .@Treasure, rand(30,180));
+
+ // Extra burried treasure (25~65 over 3600 tiles: aprox. 0.70% to 1.80%)
+ shovel_scatter("018-1", 20, 20, 80, 80, .@Treasure, rand(25,65));
end;
}
@@ -216,3 +338,5 @@ function script shovel_adddigrect {
set getvariableofnpc(.WorldDigRect_y2[.@size], strnpcinfo(3)), .@y2;
return 1;
}
+
+
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
new file mode 100644
index 000000000..f88540ad2
--- /dev/null
+++ b/npc/items/teleporter.txt
@@ -0,0 +1,66 @@
+// TMW2 scripts.
+// Authors:
+// Pyndragon
+// Jesusalva
+// Description:
+// Hand Teleporter (also saves coordinates - @memo)
+
+- script LoF Teleporter NPC_HIDDEN,{
+ close;
+
+L_Cooldown:
+ mesn;
+ mesc l("This teleporter is currently recharging.");
+ mesc l("You can use it again in @@.", FuzzyTime(TELEPORTER_TIME));
+ close;
+
+OnUse:
+ if (TELEPORTER_TIME > gettimetick(2))
+ goto L_Cooldown;
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ end;
+ }
+ if (BaseLevel < 20) {
+ dispbottom l("This is too powerful to you. Get level 20 before attempting to use.");
+ end;
+ }
+
+ mesn;
+ mesc l("Ozthokk, a great sage from the Land Of Fire, holds secrets of time and space travel.");
+ mesc l("This is not magic, it is science!");
+ mes "";
+ mesc l("PS. Additional reagents may be required for warps.");
+ next;
+
+ .@x=reputation("Hurns")+countitem(TimeFlask)-1;
+
+ menu
+ l("Don't warp"), -,
+ l("Land Of Fire Village (@@m)", 50-.@x), L_LoF,
+ l("Save Point (@@m)", 30-.@x), L_Save;
+
+ close;
+
+L_Save:
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ } else {
+ doevent "shake::OnGM";
+ warp "Save", 0, 0;
+ TELEPORTER_TIME=gettimetick(2)+(60*30)-(.@x*60);
+ }
+ closedialog;
+ end;
+
+L_LoF:
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ } else {
+ doevent "shake::OnGM";
+ warp "017-1", 120, 89;
+ TELEPORTER_TIME=gettimetick(2)+(60*50)-(.@x*60);
+ }
+ closedialog;
+ end;
+}
diff --git a/npc/magic/kalmurk.txt b/npc/magic/kalmurk.txt
new file mode 100644
index 000000000..dd9ebc062
--- /dev/null
+++ b/npc/magic/kalmurk.txt
@@ -0,0 +1,64 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script: TMW2_KALMURK
+//
+// Spawns Maggots.
+
+
+- script sk#kalmurk 32767,{
+ end;
+
+/*
+OnFriendlyDeath:
+ emote 4;
+ end;
+*/
+
+OnCall:
+ // Other requeriments
+ if (countitem(MaggotSlime) < 2) {
+ dispbottom l("You need 2x @@ to cast this skill.", getitemlink(MaggotSlime));
+ end;
+ }
+
+ // Check cooldown
+ if (@kalmurk_at > gettimetick(2)) {
+ dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@kalmurk_at));
+ end;
+ }
+
+ // Setup
+ @sk=TMW2_KALMURK;
+ @mp=200;
+ @amp=50;
+
+ // Check if you have mana to cast
+ // MagicCheck(SkillID, Mana{, MP per level})
+ if (!MagicCheck(@sk, @mp, @amp))
+ end;
+
+ // Destroy reagents
+ delitem MaggotSlime, 2;
+
+ // set cooldown
+ @kalmurk_at=gettimetick(2);
+ @kalmurk_at=@kalmurk_at+16;
+
+ if (rand(1,6) < abizit()+1) {
+ // Summon Magic
+ // SummonMagic(SkillID, MobID{, SkillLevelPerMob=2{, Level Override}})
+ SummonMagic(@sk, Maggot, 2, MAGIC_LVL+getskilllv(@sk)-1);
+ } else {
+ dispbottom l("The spell fails!");
+ }
+
+ // Get a single mana experience point (this is NOT used by Soul Menhir)
+ GetManaExp(@sk, abizit()+1);
+
+ end;
+
+OnInit:
+ bindatcmd "sk-kalmurk", "sk#kalmurk::OnCall", 0, 100, 0;
+ end;
+}
diff --git a/npc/magic/parum.txt b/npc/magic/parum.txt
new file mode 100644
index 000000000..9e1cc0994
--- /dev/null
+++ b/npc/magic/parum.txt
@@ -0,0 +1,72 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script: TMW2_PARUM
+//
+// Attempts to transmutate Raw Logs.
+// May create arrows, Mouboo Figurines, Warped Logs.
+// With enough ManaExp may create WoodenLog.
+// Is not powerful enough to create overly complex stuff like Wooden Sword, Wooden Shield or Wooden Bow
+// Final item is random
+// TODO: Using too much transmutation magic may have dire consequences! Like, uh, transmutating your head!
+// Nah, it is probably just propaganda... I hope. ¬.¬
+
+- script sk#parum 32767,{
+ end;
+
+/*
+OnFriendlyDeath:
+ emote 4;
+ end;
+*/
+
+OnCall:
+ // Other requeriments
+ if (countitem(RawLog) < 1) {
+ dispbottom l("You need @@ to cast this skill.", getitemlink(RawLog));
+ end;
+ }
+
+ // Check cooldown
+ if (@parum_at > gettimetick(2)) {
+ dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@parum_at));
+ end;
+ }
+
+ // Check requisites
+ if (!MagicCheck(TMW2_PARUM, 50))
+ end;
+
+ // Consume items
+ delitem RawLog, 1;
+
+ // Create the stuff based on MAGIC_EXP
+ .@r=rand(1,41);
+ if (.@r < 42-(MAGIC_EXP/2)) {
+ getitem WarpedLog, 1;
+ } else {
+ if (.@r > 30+abizit())
+ getitem MoubooFigurine, 1;
+ else if (.@r > 20 && MAGIC_EXP > 82)
+ getitem WoodenLog, 1;
+ else
+ getitem Arrow, .@r;
+ }
+ // I know, the code is not very sane. A number from 0 to 40 is cast.
+ // You will get lots of useless Warped Logs until you have 82 MExp.
+ // If you do not get a Warped Log, you have 25% chances of getting the
+ // Mouboo figurine. The other will be arrows, unless you hit the 82 MExp value
+ // which will add 25% chances to get a Wooden Log too. These values are estimate.
+
+ // set cooldown
+ @parum_at=gettimetick(2);
+ @parum_at=@parum_at+4;
+
+ // Get a few mana experience points (this is NOT used by Soul Menhir)
+ GetManaExp(TMW2_PARUM, rand(1,3));
+ end;
+
+OnInit:
+ bindatcmd "sk-parum", "sk#parum::OnCall", 0, 100, 0;
+ end;
+}
diff --git a/npc/magic/zarkor.txt b/npc/magic/zarkor.txt
new file mode 100644
index 000000000..c303a0665
--- /dev/null
+++ b/npc/magic/zarkor.txt
@@ -0,0 +1,57 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script: TMW2_ZARKOR
+//
+// Spawns a Cave Maggot.
+// This is to test stuff, more than to create anything really.
+
+
+- script sk#zarkor 32767,{
+ end;
+
+/*
+OnFriendlyDeath:
+ emote 4;
+ end;
+*/
+
+OnCall:
+ // Other requeriments
+ if (countitem(ZarkorScroll) < 1) {
+ dispbottom l("You need @@ to cast this skill.", getitemlink(ZarkorScroll));
+ end;
+ }
+
+ // Check cooldown
+ // This will vanish upon logout =/
+ if (@zark_at > gettimetick(2)) {
+ dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@zark_at));
+ end;
+ }
+
+ // Setup
+ @sk=TMW2_ZARKOR;
+ @mp=400;
+ @amp=75;
+
+ // Check if you have mana to cast
+ // MagicCheck(SkillID, Mana{, MP per level})
+ if (!MagicCheck(@sk, @mp, @amp))
+ end;
+
+ // Summon Magic
+ SummonMagic(@sk, CaveMaggot, 2);
+
+ // Get a single mana experience point (this is NOT used by Mana Stone)
+ GetManaExp(@sk, 1);
+
+ // set cooldown
+ @zark_at=gettimetick(2);
+ @zark_at=@parum_at+20;
+ end;
+
+OnInit:
+ bindatcmd "sk-zarkor", "sk#zarkor::OnCall", 0, 100, 0;
+ end;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index e7e8e35d9..06b7e1491 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -7,77 +7,84 @@
// 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/RNGesus.txt",
+"npc/functions/string.txt",
+"npc/functions/time.txt",
+"npc/functions/timer.txt",
+"npc/functions/seasons.txt",
+"npc/functions/weather.txt",
+
+// These functions need to be loaded before everything else
+"npc/functions/goodbye.txt",
+"npc/functions/openbook.txt",
+
+// Important functions
+"npc/functions/asklanguage.txt",
+"npc/functions/clientversion.txt",
+"npc/functions/game-rules.txt",
+"npc/functions/inventoryplace.txt",
+"npc/functions/scoreboards.txt",
+"npc/functions/random-talk.txt",
+"npc/items/rand_sc_heal.txt",
// Misc functions
-"npc/functions/asleep.txt",
"npc/functions/barber.txt",
"npc/functions/bank.txt",
-"npc/functions/clientversion.txt",
"npc/functions/doors.txt",
-"npc/functions/goodbye.txt",
+"npc/functions/fishing.txt",
"npc/functions/hammocks.txt",
-"npc/functions/harbours.txt",
-"npc/functions/hello.txt",
-"npc/functions/inventoryplace.txt",
-"npc/functions/legiontalk.txt",
"npc/functions/marriage.txt",
"npc/functions/mobpoint.txt",
+"npc/functions/mobhunter.txt",
+"npc/functions/news.txt",
"npc/functions/npcmove.txt",
-"npc/functions/masks.txt",
-"npc/functions/openbook.txt",
+"npc/functions/npcmovegraph.txt",
+"npc/functions/nurse.txt",
"npc/functions/questgen.txt",
-"npc/functions/sailordialogue.txt",
-"npc/functions/sailortalk.txt",
+"npc/functions/refine.txt",
+"npc/functions/riddle.txt",
"npc/functions/savepoint.txt",
-"npc/functions/beds.txt",
+"npc/functions/shake.txt",
"npc/functions/shops.txt",
-"npc/functions/villagertalk.txt",
-"npc/functions/npcmovegraph.txt",
-"npc/functions/fishing.txt",
-"npc/functions/mouboofunc.txt",
-"npc/functions/asklanguage.txt",
-"npc/functions/game-rules.txt",
-"npc/functions/news.txt",
-"npc/functions/riddle.txt",
-"npc/functions/confused-tree-dict.txt",
"npc/functions/soul_menhir.txt",
-"npc/functions/scoreboards.txt",
-
-// quest debug
-"npc/functions/quest-debug/functions.txt",
// Item functions
"npc/items/books.txt",
"npc/items/croconut.txt",
"npc/items/shovel.txt",
-"npc/items/rand_sc_heal.txt",
+"npc/items/teleporter.txt",
// custom atcommands
"npc/commands/music.txt",
-"npc/commands/warp.txt",
-//"npc/commands/zeny.txt",
-"npc/commands/motd-debug-text.txt",
-"npc/commands/motd.txt",
-"npc/commands/scheduled-broadcasts.txt",
-"npc/commands/rate-management.txt",
-"npc/commands/event.txt",
+"npc/commands/exp.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/event.txt",
+"npc/commands/ipcheck.txt",
+"npc/commands/kami.txt",
+"npc/commands/language.txt",
+"npc/commands/motd-debug-text.txt",
+"npc/commands/motd.txt",
+"npc/commands/rate-management.txt",
+"npc/commands/resync.txt",
+"npc/commands/scheduled-broadcasts.txt",
"npc/commands/super-menu.txt",
-"npc/commands/magic.txt",
+"npc/commands/warp.txt",
"npc/commands/wgm.txt",
+"npc/commands/ucp.txt",
// config script
"npc/config/hairstyle_config.txt",
+"npc/config/magic.txt",
+
+// Magic Commands
+"npc/magic/zarkor.txt",
+"npc/magic/parum.txt",
+"npc/magic/kalmurk.txt",
// Maps specific scripts
@include "npc/_import.txt"
diff --git a/npc/sec_pri/_import.txt b/npc/sec_pri/_import.txt
index 84983cda7..085dd0afe 100644
--- a/npc/sec_pri/_import.txt
+++ b/npc/sec_pri/_import.txt
@@ -1,2 +1,3 @@
// Map sec_pri: Jesusalva's Jail
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/sec_pri/mapflags.txt",
diff --git a/npc/sec_pri/mapflags.txt b/npc/sec_pri/mapflags.txt
new file mode 100644
index 000000000..65edab951
--- /dev/null
+++ b/npc/sec_pri/mapflags.txt
@@ -0,0 +1 @@
+sec_pri mapflag zone Jail
diff --git a/npc/soren-2/_import.txt b/npc/soren-2/_import.txt
index 6c0936688..f1e16d2cf 100644
--- a/npc/soren-2/_import.txt
+++ b/npc/soren-2/_import.txt
@@ -1,3 +1,5 @@
// Map soren-2: Soren House
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/soren-2/_warps.txt",
+"npc/soren-2/main.txt",
+"npc/soren-2/mapflags.txt",
diff --git a/npc/soren-2/_warps.txt b/npc/soren-2/_warps.txt
index a89e74edd..02271412f 100644
--- a/npc/soren-2/_warps.txt
+++ b/npc/soren-2/_warps.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map soren-2: Soren House warps
-soren-2,32,37,0 warp #soren-2_32_37 0,0,soren,105,38
+soren-2,32,37,0 warp #soren-2_32_37 0,0,soren,105,58
diff --git a/npc/soren-2/main.txt b/npc/soren-2/main.txt
new file mode 100644
index 000000000..65ddce6c2
--- /dev/null
+++ b/npc/soren-2/main.txt
@@ -0,0 +1,224 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Celestia Yeti King's quest. This controls Soren's House Indoors. It will
+// handle Lobby event, and is called by Soren's House script.
+// It'll then spawn monsters and/or items, but with addtimer technology.
+// Once all monsters are dead, and minimum time is over, a portal will show up.
+// This later control is done by npctimer. The spawn logic continues, though.
+// The addtimer will use compareandsetq, and the warp will use it too, so if
+// you haven't spawned your quota, you won't be able to use the portal.
+//
+// The use of compareandsetq HurnscaldQuest_Celestia
+// Ensures you're NOT capable of skipping to final stage in order to finish
+// the quest. Nice attempt, but that won't work. The scripts will advance,
+// but you'll stay at the same quest state, and when it's checked, you will
+// be with bound hands.
+//
+// OnCheck:
+// Everytime you kill a monster, this checks if all mobs are dead, and you
+// have finished your share of spawns. Friends can really make your life
+// harder.
+// OnSanctum:
+// This runs every once in a while, and may either spawn things, or drop
+// items. ...Needless to say, if it spawn things, everyone on the room will
+// get mad at you. Luck you, here's not PVP.
+//
+// One last thing. If you're way past your share, you'll get warnings about
+// messing other players life. Simply use the warp, or leave the house and
+// come back. If you don't, you'll be kicked from the game via @kick.
+// Why? Because Jesusalva did this script.
+
+soren-2,38,29,0 script #SorenSanctum NPC_NO_SPRITE,0,0,{
+ if (@sorensanctum == 0 && $@GM_OVERRIDE && is_admin())
+ doevent("#SorenSanctum::OnStart");
+ end;
+
+OnTouch:
+ if (@sorensanctum >= 5 && !mobcount(.map$, "#SorenSanctum::OnCheck")) {
+ /*
+ dispbottom l("Error, contact Jesusalva! Missing warp. Healing & Reseting temporaly.");
+ percentheal 100, 100;*/
+ @sorensanctum=0;
+ compareandsetq HurnscaldQuest_Celestia, 4, 5;
+ warp "001-7", 30, 42;
+ }
+ end;
+
+OnCheck:
+ // This doesn't works (or didn't used to), maybe because the way it's called
+ if (!mobcount("soren-2", "#SorenSanctum::OnCheck"))
+ setnpcdisplay "#SorenSanctum", NPC_SUMMONING_CIRC;
+ end;
+
+OnSanctum:
+ ++@sorensanctum;
+ if (ispcdead() || !isin("soren-2", 24, 27, 40, 36))
+ end;
+
+ // Decide if we'll spawn or add items. Previous failures are NOT considerated.
+ .@odds=rand(1, 10000);
+ .@amount=(rand(0, 5)/2)+1;
+ .@lx=24; .@ly=27;
+ .@ux=40; .@uy=36;
+
+ // Core Logic, Part 1
+ // Decide rarity
+
+ // 1%: Super Rare drop
+ // 9%: Rare Drop
+ // 20%: Normal Drop
+ // 40%: Normal Spawn
+ // 10%: Rare Spawn
+ // 19%: Drop + Spawn
+ // 1%: Super Rare Spawn
+
+ if (.@odds <= 100 || .@odds >= 9900) {
+ .@bonus=2;
+ } else if (.@odds <= 1000 || (.@odds >= 7000 && .@odds < 8000)) {
+ .@bonus=1;
+ }
+
+ // Generate which monster/item would be dropped, depending on your (un)luck at ODDS
+ .@mid=rand(1,10)+.@bonus;
+ switch (.@mid) {
+ case 1:
+ .@monsterId = AngryRedScorpion ; break;
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ .@monsterId = SeaSlime ; break;
+ case 4:
+ .@monsterId = AlphaMouboo ; break;
+ case 5:
+ .@monsterId = LavaSlime ; break;
+ case 6:
+ .@monsterId = BlackScorpion ; break;
+ case 7:
+ .@monsterId = Snake ; break;
+ case 8:
+ .@monsterId = FallenGuard2 ; break;
+ case 9:
+ .@monsterId = FallenGuard1 ; break;
+ case 10:
+ .@monsterId = Moonshroom ; break;
+ default:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen
+ .@mid=rand(1,10)+.@bonus;
+ switch (.@mid) {
+ case 1:
+ .@itemId = Acorn ; break;
+ case 2:
+ .@itemId = Bread ; break;
+ case 3:
+ .@itemId = Aquada ; break;
+ case 4:
+ .@itemId = StrenghtPotion ; break;
+ case 5:
+ .@itemId = Plushroom ; break;
+ case 6:
+ .@itemId = Piberries ; break;
+ case 7:
+ .@itemId = Croconut ; break;
+ case 8:
+ .@itemId = Chagashroom ; break;
+ case 9:
+ .@itemId = Manana ; break;
+ case 10:
+ .@itemId = HastePotion ; break;
+ default:
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+
+ // Core Logic, part 3
+ // Make Items or Monsters
+ if (.@odds <= 3333) {
+ makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
+ } else if (.@odds <= 7000 || .@odds > 9900) {
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
+ } else {
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
+ makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
+ }
+
+ // Revert sprite if needed
+ if (.@odds > 2000) {
+ setnpcdisplay .name$, NPC_NO_SPRITE;
+ } else if (!mobcount(.map$, "#SorenSanctum::OnCheck")) {
+ setnpcdisplay .name$, NPC_SUMMONING_CIRC;
+ }
+
+ // Handle maximum overtime you can do here: 10 cycles, or 3m20s ~ 6m40s
+ if (@sorensanctum == 8) {
+ specialeffect(28);
+ dispbottom col(l("WARNING: Do not spend unecessary time on Soren's House, you'll be disconnected!"), 1);
+ percentheal -5, -20;
+ }
+ if (@sorensanctum == 9) {
+ specialeffect(28);
+ dispbottom col(l("FINAL WARNING: Do not spend unecessary time on Soren's House, you'll be disconnected!!"), 1);
+ percentheal -20, -100;
+ }
+ if (@sorensanctum >= 10) {
+ atcommand "@kick "+strcharinfo(0);
+ npctalk l("The power of Soren's House kicks @@ like a game master.", strcharinfo(0));
+ }
+
+ // Random 20~40 seconds before next cycle. (Minimum 100~200 seconds, or 1m40s~3m20s)
+ // If you're past minimum, it'll be a little slower to don't affect other players too much.
+ // These values are for single player. If there are more users, the timer will tick for longer.
+ if (@sorensanctum < 5)
+ addtimer(rand(15000, 35000)+getusers(1)*5000, "#SorenSanctum::OnSanctum");
+ else
+ addtimer(rand(25000, 35000)+getusers(1)*5000, "#SorenSanctum::OnSanctum");
+ end;
+
+
+
+
+OnStart:
+ // If you're not on stage 4, skip this. I could set here to stage 5, so this
+ // intro won't play again. But if it plays again, your progress is reset, and
+ // it is harder this way, so I'm not touching on quest state :>
+ if (getq(HurnscaldQuest_Celestia) != 4)
+ end;
+ addtimer(200, "#SorenSanctum::OnStep1"); // Allow client to update stuff
+ end;
+
+OnStep1:
+ // When we reach here, we have both a player attached, and the player was already warped.
+ // I don't know if you walked in and out the house, though. If you do, this will loop...
+ // Which is actually bad for you, as that will reset your progress!!
+ npctalk3 l("Well well well, @@, good job in reaching Soren's House.", strcharinfo(0));
+ addtimer(3000, "#SorenSanctum::OnStep2");
+ end;
+
+OnStep2:
+ //setnpcdisplay .name$, NPC_YETI_KING;
+ npctalk3 l("You done well in getting so far. I didn't thought you would make it.");
+ addtimer(3000, "#SorenSanctum::OnStep3");
+ end;
+
+OnStep3:
+ npctalk3 l("The Cave Of Trials, and the Soren's Village... There's only one thing left.");
+ addtimer(3000, "#SorenSanctum::OnStep4");
+ end;
+
+OnStep4:
+ npctalk3 l("...You still have not overcome his house.");
+ addtimer(3000, "#SorenSanctum::OnStep5");
+ end;
+
+OnStep5:
+ //setnpcdisplay .name$, NPC_NO_SPRITE;
+ npctalk3 l("Defeat a few waves of Soren's House. Once you're done, this will become a warp. Hurry before it closes.");
+ @sorensanctum=0;
+ addtimer(5000, "#SorenSanctum::OnSanctum");
+ end;
+
+OnInit:
+ end;
+}
diff --git a/npc/soren-2/mapflags.txt b/npc/soren-2/mapflags.txt
new file mode 100644
index 000000000..c3091c00c
--- /dev/null
+++ b/npc/soren-2/mapflags.txt
@@ -0,0 +1 @@
+soren-2 mapflag zone MMO
diff --git a/npc/soren/_import.txt b/npc/soren/_import.txt
index 9e8586cdf..7721a7c41 100644
--- a/npc/soren/_import.txt
+++ b/npc/soren/_import.txt
@@ -1,3 +1,5 @@
// Map soren: Soren's Village
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-"npc/soren/_warps.txt",
+"npc/soren/_mobs.txt",
+"npc/soren/main.txt",
+"npc/soren/mapflags.txt",
diff --git a/npc/soren/_mobs.txt b/npc/soren/_mobs.txt
new file mode 100644
index 000000000..671219985
--- /dev/null
+++ b/npc/soren/_mobs.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map soren: Soren's Village mobs
+soren,122,104,102,81 monster Moonshroom 1069,14,60000,60000
+soren,102,84,102,81 monster Forain 1061,5,60000,60000
+soren,103,91,64,40 monster 4144's Tortuga 1004,1,60000,60000
+soren,105,87,30,23 monster Unexplained Mountain Snake 1123,4,15000,15000
+soren,109,57,12,5 monster Guardians Of Soren 1130,6,5000,10000
+soren,110,97,103,81 monster Angry Red Scorpion 1130,18,5000,10000
diff --git a/npc/soren/main.txt b/npc/soren/main.txt
new file mode 100644
index 000000000..ba47bcc62
--- /dev/null
+++ b/npc/soren/main.txt
@@ -0,0 +1,485 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Celestia Yeti King's quest. This controls Soren's House and the three keysigns.
+// Key #1
+// Perform the rite at the Fountain
+// Key #2
+// Perform the rite at the south lake
+// Key #3
+// Perform the rite at the Button Area
+//
+// If the same player performs the rite on different places, HE'LL BE PENALIZED.
+// Performing the rite spawn monsters, so watch out.
+
+// Notes:
+// I had two options:
+// getvariableofnpc(<variable>, "<npc name>")
+// This way, each summon point would have .caster and .lifetime
+// getvariableofpc(<variable>, <account id>{, <default value>})
+// This way, I could use @cast_places to control stuff.
+//
+// Obviously NPC variables was more sane.
+//
+// The use of compareandsetq HurnscaldQuest_Celestia
+// Ensures you're NOT capable of skipping to final stage in order to finish
+// the quest. Nice attempt, but that won't work. The scripts will advance,
+// but you'll stay at the same quest state, and when it's checked, you will
+// be with bound hands.
+
+soren,105,57,0 script Soren's House NPC_NO_SPRITE,0,0,{
+ end;
+
+OnTouch:
+ .@st1=getvariableofnpc(.lifetime, "Soren's Fountain")-gettimetick(2);
+ .@st2=getvariableofnpc(.lifetime, "Soren's Lake")-gettimetick(2);
+ .@st3=getvariableofnpc(.lifetime, "Soren's Gizmo")-gettimetick(2);
+ if (.@st1 > 0 && .@st2 > 0 && .@st3 > 0) {
+ @soren_penalty=0;
+ compareandsetq HurnscaldQuest_Celestia, 3, 4;
+ doevent("#SorenSanctum::OnStart");
+ warp "soren-2", 32, 36;
+ end;
+ } else {
+ mesn l("Soren's House Tutorial");
+ mesc l("There's a strong magic barrier. We need to disarm it in order to enter there.");
+ mesc l("There are three singularities on this island. If I disarm more than one, I'll have a penalty.");
+ mesc l("I should have full mana before attempting to disarm one.");
+ mesc l("Also, if I move away from the singularity during disarm process, it'll be lost.");
+ mesc l("The singularities keep arming themselves up again, so I have roughly five minutes between first disarm and entering here.");
+ mesc l("We should split our team, and have someone to protect our backs. Otherwise, we might not do it.");
+ // Protip: stock Elixir Of Life if you need to do this quest with less than 3 team members
+ close;
+ }
+ end;
+}
+
+
+
+
+
+soren,105,92,0 script Soren's Fountain NPC_NO_SPRITE,{
+ // Initial Checks
+ if (.lifetime > gettimetick(2)) {
+ npctalk l("This singularity will remain disarmed for @@ more!", FuzzyTime(.lifetime, 2, 2));
+ end;
+ }
+ if (.st) {
+ npctalk l("A disarm process is already running.");
+ end;
+ }
+
+ // Main menu
+ mesc l("Attempt to disarm the singularity?");
+ if (askyesno() == ASK_YES) {
+ if (.casterId == getcharid(3))
+ @soren_penalty=@soren_penalty+rand(8, 12);
+ .casterId=getcharid(3);
+ .st=1;
+ npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0));
+ initnpctimer;
+ }
+ close;
+
+// Waves (total: 6 waves + 1 optional)
+OnTimer5000:
+OnTimer10300:
+OnTimer14000:
+OnTimer18000:
+OnTimer25000:
+OnTimer28000:
+OnTimer31000:
+ if (!attachrid(.casterId)) {
+ npctalk "Disarm process aborted: Disarmer is gone.";
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (!reachable(.x, .y, .distance)) {
+ npctalk l("Disarm process aborted: Disarmer is out of reach.");
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (Sp < MaxSp/100*15) {
+ npctalk l("Disarm process aborted: Insufficient mana to proceed.");
+ stopnpctimer; .st=0;
+ end;
+ }
+
+ // Penalty Handler.
+ .@val=-2;
+ if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId)
+ .@val=.@val-10;
+ if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId)
+ .@val=.@val-10;
+ if (@soren_penalty > 0) // Weak protection against EXP farming.
+ .@val=.@val-@soren_penalty;
+
+ percentheal (.@val/2), -13+.@val;
+
+ // Monster Gen
+ .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12);
+ .@mid=rand(1,3)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ case 4:
+ .@monsterId = RedSlime ; break;
+ case 5:
+ case 6:
+ .@monsterId = LavaSlime ; break;
+ case 7:
+ case 8:
+ .@monsterId = MountainSnake ; break;
+ default: // case 9:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen
+ .@mid=rand(1,7)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@itemId = Acorn ; break;
+ case 3:
+ case 4:
+ .@itemId = ChocolateMouboo ; break;
+ case 5:
+ case 6:
+ .@itemId = OrangeCupcake ; break;
+ case 7:
+ case 8:
+ .@itemId = CherryCake ; break;
+ case 9:
+ case 10:
+ .@itemId = Chagashroom ; break;
+ case 11:
+ .@itemId = GingerBreadMan ; break;
+ case 12:
+ .@itemId = rand(Diamond, Amethyst) ; break;
+ default: // case 13
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+ // Defines
+ .@lx=.x-.distance;
+ .@ly=.y-.distance;
+ .@ux=.x+.distance;
+ .@uy=.y+.distance;
+
+ // Core function
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount; makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy)); ++.st;
+ specialeffect(54);
+
+ // If we're done with waves
+ if (.st >= 7) {
+ getexp rand(1, 100), rand(1, 10);
+ .lifetime=gettimetick(2)+330+rand(0, 60);
+ npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2));
+ stopnpctimer; .st=0;
+ specialeffect(27);
+ }
+ end;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 3;
+
+ .casterId=0; // getcharid(0) → 3 is account number!!
+ .lifetime=0; // When will this gate expire (six minutes) (gettimetick(2) + (60*5))
+ .st=0; // Status after started
+
+ end;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+soren,104,143,0 script Soren's Lake NPC_NO_SPRITE,{
+ // Initial Checks
+ if (.lifetime > gettimetick(2)) {
+ npctalk l("This singularity will remain disarmed for @@ more!", FuzzyTime(.lifetime, 2, 2));
+ end;
+ }
+ if (.st) {
+ npctalk l("A disarm process is already running.");
+ end;
+ }
+
+ // Main menu
+ mesc l("Attempt to disarm the singularity?");
+ if (askyesno() == ASK_YES) {
+ if (.casterId == getcharid(3))
+ @soren_penalty=@soren_penalty+rand(8, 12);
+ .casterId=getcharid(3);
+ .st=1;
+ npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0));
+ initnpctimer;
+ }
+ close;
+
+// Waves (total: 6 waves + 1 optional)
+OnTimer4500:
+OnTimer11300:
+OnTimer17000:
+OnTimer22000:
+OnTimer26200:
+OnTimer29100:
+OnTimer30900:
+ if (!attachrid(.casterId)) {
+ npctalk "Disarm process aborted: Disarmer is gone.";
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (!reachable(.x, .y, .distance)) {
+ npctalk l("Disarm process aborted: Disarmer is out of reach.");
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (Sp < MaxSp/100*15) {
+ npctalk l("Disarm process aborted: Insufficient mana to proceed.");
+ stopnpctimer; .st=0;
+ end;
+ }
+
+ // Penalty Handler.
+ .@val=-2;
+ if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId)
+ .@val=.@val-10;
+ if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId)
+ .@val=.@val-10;
+ if (@soren_penalty > 0) // Weak protection against EXP farming.
+ .@val=.@val-@soren_penalty;
+
+ percentheal (.@val/2), -13+.@val;
+
+ // Monster Gen. Lake spawns less
+ .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12)-1;
+ .@mid=rand(1,3)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ case 4:
+ .@monsterId = RedSlime ; break;
+ case 5:
+ case 6:
+ .@monsterId = LavaSlime ; break;
+ case 7:
+ case 8:
+ .@monsterId = MountainSnake ; break;
+ default: // case 9:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen have a different mechanic here
+ .@mid=rand(.st, .st*2+1);
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@itemId = Acorn ; break;
+ case 3:
+ case 4:
+ .@itemId = ChocolateMouboo ; break;
+ case 5:
+ case 6:
+ .@itemId = OrangeCupcake ; break;
+ case 7:
+ case 8:
+ .@itemId = CherryCake ; break;
+ case 9:
+ case 10:
+ .@itemId = Chagashroom ; break;
+ case 11:
+ .@itemId = HastePotion ; break;
+ case 12:
+ .@itemId = rand(Diamond, Amethyst) ; break;
+ default: // case 13
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+ // Defines for Lake are fixed on the same spot.
+ .@lx=104; .@ux=104;
+ .@ly=141; .@uy=141;
+
+ // Core function
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount; makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy)); ++.st;
+
+ // If we're done with waves
+ if (.st >= 7) {
+ .lifetime=gettimetick(2)+330+rand(0, 60);
+ npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2));
+ stopnpctimer; .st=0;
+ }
+ end;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 2;
+
+ .casterId=""; // getcharid(3) → Account number!!
+ .lifetime=0; // When will this gate expire (five~six minutes) (gettimetick(2) + (60*5))
+ .st=0; // Status after started
+
+ end;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+soren,107,37,0 script Soren's Gizmo NPC_NO_SPRITE,{
+ // Initial Checks
+ if (.lifetime > gettimetick(2)) {
+ npctalk l("This singularity will remain disarmed for @@ more!", FuzzyTime(.lifetime, 2, 2));
+ end;
+ }
+ if (.st) {
+ npctalk l("A disarm process is already running.");
+ end;
+ }
+
+ // Main menu
+ mesc l("Attempt to disarm the singularity?");
+ if (askyesno() == ASK_YES) {
+ if (.casterId == getcharid(3))
+ @soren_penalty=@soren_penalty+rand(8, 12);
+ .casterId=getcharid(3);
+ .st=1;
+ npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0));
+ initnpctimer;
+ }
+ close;
+
+// Waves (total: 6 waves + 1 optional)
+OnTimer6200:
+OnTimer9300:
+OnTimer13900:
+OnTimer17200:
+OnTimer24500:
+OnTimer27400:
+OnTimer31200:
+ if (!attachrid(.casterId)) {
+ npctalk "Disarm process aborted: Disarmer is gone.";
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (!reachable(.x, .y, .distance)) {
+ npctalk l("Disarm process aborted: Disarmer is out of reach.");
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (Sp < MaxSp/100*15) {
+ npctalk l("Disarm process aborted: Insufficient mana to proceed.");
+ stopnpctimer; .st=0;
+ end;
+ }
+
+ // Penalty Handler.
+ .@val=-2;
+ if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId)
+ .@val=.@val-10;
+ if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId)
+ .@val=.@val-10;
+ if (@soren_penalty > 0) // Weak protection against EXP farming.
+ .@val=.@val-@soren_penalty;
+
+ percentheal (.@val/2), -13+.@val;
+
+ // Monster Gen. Gizmo spawns more monsters because you can move more
+ .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12)+1;
+ .@mid=rand(1,3)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ case 4:
+ .@monsterId = RedSlime ; break;
+ case 5:
+ case 6:
+ .@monsterId = LavaSlime ; break;
+ case 7:
+ case 8:
+ .@monsterId = MountainSnake ; break;
+ default: // case 9:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen
+ .@mid=rand(1,7)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@itemId = Acorn ; break;
+ case 3:
+ case 4:
+ .@itemId = ChocolateMouboo ; break;
+ case 5:
+ case 6:
+ .@itemId = OrangeCupcake ; break;
+ case 7:
+ case 8:
+ .@itemId = CherryCake ; break;
+ case 9:
+ case 10:
+ .@itemId = Chagashroom ; break;
+ case 11:
+ .@itemId = HastePotion ; break;
+ case 12:
+ .@itemId = rand(Diamond, Amethyst) ; break;
+ default: // case 13
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+ // Defines
+ .@lx=.x-.distance;
+ .@ly=.y-.distance;
+ .@ux=.x+.distance;
+ .@uy=.y+.distance;
+
+ // Core function
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount; makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy)); ++.st;
+
+ // If we're done with waves
+ if (.st >= 7) {
+ .lifetime=gettimetick(2)+330+rand(0, 60);
+ npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2));
+ stopnpctimer; .st=0;
+ }
+ end;
+
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 4;
+
+ .casterId=""; // getcharid(3) → Account number!!
+ .lifetime=0; // When will this gate expire (five~six minutes) (gettimetick(2) + (60*5))
+ .st=0; // Status after started
+
+ end;
+}
+
diff --git a/npc/soren/mapflags.txt b/npc/soren/mapflags.txt
new file mode 100644
index 000000000..f38cb43db
--- /dev/null
+++ b/npc/soren/mapflags.txt
@@ -0,0 +1 @@
+soren mapflag zone MMO
diff --git a/npc/test/_import.txt b/npc/test/_import.txt
index cea2672a4..46209c4f5 100644
--- a/npc/test/_import.txt
+++ b/npc/test/_import.txt
@@ -1,16 +1,12 @@
// 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/hinnack.txt",
"npc/test/karim.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/npcmarriage.txt",
"npc/test/rock.txt",
"npc/test/test1.txt",
"npc/test/test2.txt",
diff --git a/npc/test/_mobs.txt b/npc/test/_mobs.txt
index 8bab31019..350a38f82 100644
--- a/npc/test/_mobs.txt
+++ b/npc/test/_mobs.txt
@@ -13,3 +13,5 @@ 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
+test,87,93,1,1 monster Green 4144 1004,1,1000,1000
+test,87,81,1,1 monster Pink 4144 1004,1,1000,1000
diff --git a/npc/test/hinnack.txt b/npc/test/hinnack.txt
deleted file mode 100644
index e55d1cc02..000000000
--- a/npc/test/hinnack.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-// Evol scripts.
-// Authors:
-// Saulc
-// Description:
-// NPC test fork from moon
-// Variables:
-// ArtisQuests_Apana - quest var
-// Quest stages:
-// 0 - not started
-// 1 - started, searching for Bug Leg
-// 2 - quest finished
-
-test,2,2,0 script hinnack NPC_PLAYER,{
-
- .BaitID = BugLeg;
- .BaitCount = 12;
-
- .@q = getq(ArtisQuests_Apana);
- if (.@q == 1) goto L_CheckItems;
- if (.@q == 2) goto L_QuestDone;
-
- speech S_LAST_BLANK_LINE,
- l("I made a figurin with Bug legs."),
- lg("Be a friend and bring me @@ @@.", "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_Apana, 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."),
- lg("You might even get lucky, and get a @@.",
- "You might even get lucky, and get a @@.", getitemlink(GrassCarp)),
- l("Have a good time fishing!");
-
- delitem .BaitID, .BaitCount;
- Zeny = Zeny + 1000;
- message strcharinfo(0), l("You receive @@ E!", 1000);
- setq ArtisQuests_Apana, 2;
- close;
-
-L_QuestDone:
- // Idea for future: Eugene telling fishman jokes.
- speech
- l("Ahoy, @@!", strcharinfo(0)),
- l("Are the fish biting today?");
- close;
-
-OnInit:
- .sex = G_MALE;
- .distance = 3;
- end;
-}
diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt
index f6777f489..e19ffb66e 100644
--- a/npc/test/npc1.txt
+++ b/npc/test/npc1.txt
@@ -27,6 +27,10 @@ test,10,10,0 script npc1 NPC_TEST1,3,3,{
}
L_Start:
+ if (!is_admin()) {
+ mesc "Error 13: Permission Denied", 1;
+ close;
+ }
switch (select(
"show area",
"map",
diff --git a/npc/test/npc2.txt b/npc/test/npc2.txt
deleted file mode 100644
index 8a2146f11..000000000
--- 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/npc6.txt b/npc/test/npc6.txt
deleted file mode 100644
index 7c4893ad7..000000000
--- 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/npcmarriage.txt b/npc/test/npcmarriage.txt
deleted file mode 100644
index 1b7497bdc..000000000
--- a/npc/test/npcmarriage.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-// Evol scripts.
-// Author:
-// 4144
-// Description:
-// npc marriage
-
-test,25,14,0 script marriage1 NPC_PLAYER,{
- marriagemain();
- close;
-
-OnTimer30000:
- marriagecheck();
- end;
-
-OnInit:
- .sex = G_MALE;
- .distance = 3;
- initnpctimer;
-}
diff --git a/npc/test/rock.txt b/npc/test/rock.txt
index 75c32ad23..e899ea4df 100644
--- a/npc/test/rock.txt
+++ b/npc/test/rock.txt
@@ -146,6 +146,11 @@ test,2,6,0 script rock NPC_PLAYER,{
close;
}
+ if (!is_admin()) {
+ mesc "Error 13: Permission Denied", 1;
+ close;
+ }
+
speech S_LAST_NEXT, l("Hello do you want to play rock scissors paper?");
do
{