summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--login/conf/login_local.conf.example10
m---------tools0
-rw-r--r--world/map/conf/atcommand_athena.conf1
-rw-r--r--world/map/conf/atcommand_local.conf.example7
-rw-r--r--world/map/conf/magic-anchors.sex118
-rw-r--r--world/map/conf/magic-debug.sex408
-rw-r--r--world/map/conf/magic-level0.sex39
-rw-r--r--world/map/conf/magic-level1.sex92
-rw-r--r--world/map/conf/magic-level2.sex190
-rw-r--r--world/map/conf/magic-level3.sex345
-rw-r--r--world/map/conf/magic-level4.sex2
-rw-r--r--world/map/conf/magic-level5.sex102
-rw-r--r--world/map/conf/magic-misc.sex79
-rw-r--r--world/map/conf/magic-quickdebug.sex2
-rw-r--r--world/map/conf/tmwa-map.conf4
-rw-r--r--world/map/db/const.txt6
-rw-r--r--world/map/db/item_db_chest.txt2
-rw-r--r--world/map/db/item_db_head.txt8
-rw-r--r--world/map/db/item_db_weapon.txt6
-rw-r--r--world/map/db/quest-log.txt13
-rw-r--r--world/map/npc/001-1/children.txt24
-rw-r--r--world/map/npc/001-1/constable.txt2
-rw-r--r--world/map/npc/001-1/eomie.txt49
-rw-r--r--world/map/npc/001-1/ferry_master.txt2
-rw-r--r--world/map/npc/001-1/gate_guards.txt8
-rw-r--r--world/map/npc/001-1/gossip.txt49
-rw-r--r--world/map/npc/001-1/stat_reset.txt2
-rw-r--r--world/map/npc/001-1/weellos.txt12
-rw-r--r--world/map/npc/001-2/heathin.txt7
-rw-r--r--world/map/npc/001-2/sandra.txt3
-rw-r--r--world/map/npc/002-1/elanore.txt34
-rw-r--r--world/map/npc/002-1/lieutenant_dausen.txt3
-rw-r--r--world/map/npc/002-1/nickos.txt3
-rw-r--r--world/map/npc/002-1/sarah.txt13
-rw-r--r--world/map/npc/002-1/soul-menhir.txt1
-rw-r--r--world/map/npc/002-1/stewen.txt3
-rw-r--r--world/map/npc/002-1/traveler.txt2
-rw-r--r--world/map/npc/002-2/bleacher.txt4
-rw-r--r--world/map/npc/002-2/eurni.txt5
-rw-r--r--world/map/npc/002-2/hetchel.txt2
-rw-r--r--world/map/npc/002-2/kylian.txt7
-rw-r--r--world/map/npc/002-2/troupe_leader.txt2
-rw-r--r--world/map/npc/002-3/mining_camp_barrier.txt3
-rw-r--r--world/map/npc/002-3/nathan.txt3
-rw-r--r--world/map/npc/002-3/traveler.txt2
-rw-r--r--world/map/npc/002-4/mine_triggerone.txt3
-rw-r--r--world/map/npc/002-4/mine_triggerthree.txt3
-rw-r--r--world/map/npc/002-4/mine_triggertwo.txt3
-rw-r--r--world/map/npc/002-4/naem.txt3
-rw-r--r--world/map/npc/002-4/underground_palace_barrier.txt3
-rw-r--r--world/map/npc/002-5/chest.txt3
-rw-r--r--world/map/npc/002-5/sema.txt3
-rw-r--r--world/map/npc/004-5/chest.txt7
-rw-r--r--world/map/npc/006-1/miriam.txt13
-rw-r--r--world/map/npc/006-1/pachua.txt3
-rw-r--r--world/map/npc/006-1/traveler.txt2
-rw-r--r--world/map/npc/007-1/voltain.txt2
-rw-r--r--world/map/npc/008-1/diryn.txt2
-rw-r--r--world/map/npc/008-1/hinnak.txt2
-rw-r--r--world/map/npc/008-1/mikhail.txt3
-rw-r--r--world/map/npc/009-1/jack.txt2
-rw-r--r--world/map/npc/009-1/milly.txt2
-rw-r--r--world/map/npc/009-1/old_man.txt2
-rw-r--r--world/map/npc/009-1/old_woman.txt2
-rw-r--r--world/map/npc/009-1/sabine.txt2
-rw-r--r--world/map/npc/009-1/soul-menhir.txt1
-rw-r--r--world/map/npc/009-2/airlia.txt10
-rw-r--r--world/map/npc/009-2/alan.txt2
-rw-r--r--world/map/npc/009-2/bernard.txt3
-rw-r--r--world/map/npc/009-2/doctor.txt2
-rw-r--r--world/map/npc/009-2/inspector.txt2
-rw-r--r--world/map/npc/009-2/kfahr.txt6
-rw-r--r--world/map/npc/009-2/lena.txt3
-rw-r--r--world/map/npc/009-2/nurse.txt1
-rw-r--r--world/map/npc/009-2/richard.txt1
-rw-r--r--world/map/npc/009-2/selim.txt4
-rw-r--r--world/map/npc/009-2/wyara.txt2
-rw-r--r--world/map/npc/009-7/core.txt33
-rw-r--r--world/map/npc/009-7/debug.txt10
-rw-r--r--world/map/npc/011-6/bryant.txt3
-rw-r--r--world/map/npc/011-6/crastur.txt12
-rw-r--r--world/map/npc/012-1/injured-mouboo.txt4
-rw-r--r--world/map/npc/012-3/traveler.txt2
-rw-r--r--world/map/npc/013-1/traveler.txt2
-rw-r--r--world/map/npc/013-3/barrier.txt2
-rw-r--r--world/map/npc/013-3/mask_chest.txt2
-rw-r--r--world/map/npc/013-3/sword_chest.txt1
-rw-r--r--world/map/npc/016-1/gwendolyn.txt2
-rw-r--r--world/map/npc/018-2/angus.txt2
-rw-r--r--world/map/npc/018-2/books.txt2
-rw-r--r--world/map/npc/018-2/caul.txt14
-rw-r--r--world/map/npc/018-2/miners.txt2
-rw-r--r--world/map/npc/018-2/receptionist.txt2
-rw-r--r--world/map/npc/018-3/bookcase.txt2
-rw-r--r--world/map/npc/018-3/evil-obelisk.txt1
-rw-r--r--world/map/npc/019-1/santa_helper.txt1
-rw-r--r--world/map/npc/019-1/snowman.txt1
-rw-r--r--world/map/npc/020-1/soul-menhir.txt1
-rw-r--r--world/map/npc/020-1/traveler.txt2
-rw-r--r--world/map/npc/020-2/banker.txt1
-rw-r--r--world/map/npc/027-1/traveler.txt2
-rw-r--r--world/map/npc/027-2/gy_inn_shops.txt1
-rw-r--r--world/map/npc/029-1/aahna.txt8
-rw-r--r--world/map/npc/029-1/hasan.txt30
-rw-r--r--world/map/npc/029-1/hideandseek.txt97
-rw-r--r--world/map/npc/029-1/kaan.txt25
-rw-r--r--world/map/npc/029-1/liana.txt12
-rw-r--r--world/map/npc/029-1/rewards_master.txt2
-rw-r--r--world/map/npc/029-1/soul-menhir.txt1
-rw-r--r--world/map/npc/029-1/traveler.txt2
-rw-r--r--world/map/npc/029-1/tutorial.txt25
-rw-r--r--world/map/npc/029-1/valon.txt46
-rw-r--r--world/map/npc/029-1/vincent.txt22
-rw-r--r--world/map/npc/029-1/zegas.txt30
-rw-r--r--world/map/npc/029-2/barrels.txt8
-rw-r--r--world/map/npc/029-2/barrels_config.txt31
-rw-r--r--world/map/npc/029-2/cynric.txt1
-rw-r--r--world/map/npc/029-2/morgan.txt41
-rw-r--r--world/map/npc/029-2/sorfina.txt50
-rw-r--r--world/map/npc/029-2/stat_reset.txt3
-rw-r--r--world/map/npc/029-2/tanisha.txt42
-rw-r--r--world/map/npc/031-2/cindyHouse.txt2
-rw-r--r--world/map/npc/033-1/traveler.txt2
-rw-r--r--world/map/npc/048-2/traveler.txt2
-rw-r--r--world/map/npc/052-1/channelling.txt8
-rw-r--r--world/map/npc/055-1/traveler.txt2
-rw-r--r--world/map/npc/annuals/halloween/trick_or_treat.txt4
-rw-r--r--world/map/npc/annuals/xmas/core.txt5
-rw-r--r--world/map/npc/functions/DyeConfig.txt4
-rw-r--r--world/map/npc/functions/banker.txt2
-rw-r--r--world/map/npc/functions/clear_vars.txt403
-rwxr-xr-xworld/map/npc/functions/debug.txt60
-rw-r--r--world/map/npc/functions/default_npc_checks.txt26
-rw-r--r--world/map/npc/functions/global_event_handler.txt48
-rw-r--r--world/map/npc/functions/inn.txt12
-rw-r--r--world/map/npc/functions/mob_points.txt4
-rw-r--r--world/map/npc/functions/stat_reset.txt8
-rw-r--r--world/map/npc/functions/time.txt5
-rw-r--r--world/map/npc/functions/travelers.txt22
-rw-r--r--world/map/npc/items/check_wand.txt6
-rw-r--r--world/map/npc/items/magic_gm_top_hat.txt2
-rw-r--r--world/map/npc/items/require_stat.txt11
-rw-r--r--world/map/npc/items/restricted_item.txt4
143 files changed, 1210 insertions, 1796 deletions
diff --git a/login/conf/login_local.conf.example b/login/conf/login_local.conf.example
index f0ab0bc4..635f22ee 100644
--- a/login/conf/login_local.conf.example
+++ b/login/conf/login_local.conf.example
@@ -22,16 +22,6 @@ admin_pass: admin
//ladminallowip: clear
ladminallowip: 127.0.0.1
-// Gamemaster password, used with the @gm command to obtain GM commands
-// NOTICE: You should also change this one.
-gm_pass: gm
-
-// GM level granted to people using @gm (with the correct password).
-// Builtin default is 60; setting it to 0 will disable the command.
-// To work, @gm also needs to be level 0 in atcommand_local.conf,
-// and atcommand_gm_only needs to be off in battle_local.conf
-level_new_gm: 0
-
// Update host
// If not empty, send address for client to download data.
// This must contain news.txt and resources.xml
diff --git a/tools b/tools
-Subproject a49ce96049a70e35336e93814282287039b9fa3
+Subproject 87c48200ec920eee107c2861cca30cbcf058d90
diff --git a/world/map/conf/atcommand_athena.conf b/world/map/conf/atcommand_athena.conf
index 343d7472..8b182ab8 100644
--- a/world/map/conf/atcommand_athena.conf
+++ b/world/map/conf/atcommand_athena.conf
@@ -13,6 +13,7 @@ localbroadcast: 40
die: 40
where: 40
goto: 40
+npc: 40
kick: 40
who: 40
whogroup: 40
diff --git a/world/map/conf/atcommand_local.conf.example b/world/map/conf/atcommand_local.conf.example
index 3935db1b..916a092c 100644
--- a/world/map/conf/atcommand_local.conf.example
+++ b/world/map/conf/atcommand_local.conf.example
@@ -1,8 +1 @@
// Athena atcommand Local Configuration file.
-
-// Command to become a GM. Only players who are not a GM can use this.
-// In addition to changing this to 0, you must also:
-// - set level_new_gm in login_athena.conf to something other than 0
-// - set atcommand_gm_only to false in battle_athena.conf
-// - give the correct password (gm_pass in login_athena.conf)
-gm: 100
diff --git a/world/map/conf/magic-anchors.sex b/world/map/conf/magic-anchors.sex
index 40bd7de5..3bb16f75 100644
--- a/world/map/conf/magic-anchors.sex
+++ b/world/map/conf/magic-anchors.sex
@@ -1,56 +1,66 @@
"--------------------------------------------------------------------------------"
-"Teleport anchors"
+" Teleport anchors(disabled) "
+" As of now, only the #vorp spell(disabled) uses them "
"--------------------------------------------------------------------------------"
-(TELEPORT-ANCHOR tulimshar "tulimshar"
- (@+
- (@ "001-1" 43 66)
- 3
- 3))
-
-(TELEPORT-ANCHOR hurnscald "hurnscald"
- (@+
- (@ "009-1" 55 37)
- 3
- 3))
-
-(TELEPORT-ANCHOR nivalis "nivalis"
- (@+
- (@ "020-1" 75 63)
- 19
- 12))
-
-(TELEPORT-ANCHOR wizardhut "##00"
- (@+
- (@ "013-1" 41 92)
- 3
- 3))
-
-(TELEPORT-ANCHOR pachua "##01"
- (@+
- (@ "006-1" 22 101)
- 3
- 3))
-
-(TELEPORT-ANCHOR desert "##02"
- (@+
- (@ "005-1" 160 64)
- 5
- 5))
-
-(TELEPORT-ANCHOR forest "##03"
- (@+
- (@ "015-1" 35 35)
- 40
- 40))
-
-(TELEPORT-ANCHOR snakecave "##04"
- (@+
- (@ "011-4" 50 75)
- 3
- 3))
-
-(TELEPORT-ANCHOR dimondscove "##05"
- (@+
- (@ "010-2" 23 79)
- 3
- 3))
+(DISABLED
+ (TELEPORT-ANCHOR tulimshar "tulimshar"
+ (@+
+ (@ "001-1" 43 66)
+ 3
+ 3)))
+
+(DISABLED
+ (TELEPORT-ANCHOR hurnscald "hurnscald"
+ (@+
+ (@ "009-1" 55 37)
+ 3
+ 3)))
+
+(DISABLED
+ (TELEPORT-ANCHOR nivalis "nivalis"
+ (@+
+ (@ "020-1" 75 63)
+ 19
+ 12)))
+
+(DISABLED
+ (TELEPORT-ANCHOR wizardhut "##00"
+ (@+
+ (@ "013-1" 41 92)
+ 3
+ 3)))
+
+(DISABLED
+ (TELEPORT-ANCHOR pachua "##01"
+ (@+
+ (@ "006-1" 22 101)
+ 3
+ 3)))
+
+(DISABLED
+ (TELEPORT-ANCHOR desert "##02"
+ (@+
+ (@ "005-1" 160 64)
+ 5
+ 5)))
+
+(DISABLED
+ (TELEPORT-ANCHOR forest "##03"
+ (@+
+ (@ "015-1" 35 35)
+ 40
+ 40)))
+
+(DISABLED
+ (TELEPORT-ANCHOR snakecave "##04"
+ (@+
+ (@ "011-4" 50 75)
+ 3
+ 3)))
+
+(DISABLED
+ (TELEPORT-ANCHOR dimondscove "##05"
+ (@+
+ (@ "010-2" 23 79)
+ 3
+ 3)))
diff --git a/world/map/conf/magic-debug.sex b/world/map/conf/magic-debug.sex
deleted file mode 100644
index 3cefd3b9..00000000
--- a/world/map/conf/magic-debug.sex
+++ /dev/null
@@ -1,408 +0,0 @@
-"--------------------------------------------------------------------------------"
-"Debug keywords"
-"--------------------------------------------------------------------------------"
-(SPELL () debug "debug" ()
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (message caster
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+ "FLAGS: " "drank=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 1)
- 0))
- ", ")
- "Kmseed=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 2)
- 0))
- ", ")
- "touched-mseed=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 4)
- 0))
- ", ")
- "mseed-max=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 8)
- 0))
- ", ")
- "Kauldsbel=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 16)
- 0))
- ", ")
- "Kwyara=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 32)
- 0))
- ", ")
- "Ksagatha=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 64)
- 0))
- ", ")
- "Kmpotion=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 128)
- 0))
- ", ")
- "mseed-rumour=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 256)
- 0))
- ", ")
- "Kcuttree=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 512)
- 0))
- ", ")
- "cut=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 1024)
- 0))
- ", ")
- "Kdruidtree=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 2048)
- 0))
- ", ")
- "Kimp=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 4096)
- 0))
- ", ")
- "Koldwiz=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 8192)
- 0))
- ", ")
- "made-conc=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 16384)
- 0))
- ", ")
- "elanore-omar=")
- (>
- (&
- (script_int caster "MAGIC_FLAGS")
- 32768)
- 0)))
- (message caster
- (+
- (+
- (+
- (+
- (+ "EXP: "
- (&
- (script_int caster "MAGIC_EXPERIENCE")
- 0xffff))
- ", lastspell=")
- (&
- (>>
- (script_int caster "MAGIC_EXPERIENCE")
- 16)
- 0xff))
- ", healexp=")
- (&
- (>>
- (script_int caster "MAGIC_EXPERIENCE")
- 24)
- 0xff)))
- (message caster
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+
- (+ "STATUS: " "auldsbel:")
- (&
- (script_int caster "QUEST_MAGIC")
- 0x1f))
- ",")
- (&
- (>>
- (script_int caster "QUEST_MAGIC")
- 5)
- 0x7))
- ", ")
- "dt/mb:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC")
- 8)
- 0xf))
- ", ")
- "s-unhappy:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC")
- 12)
- 0xf))
- ", ")
- "sagatha:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC")
- 16)
- 0xff))
- ", ")
- "swords:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC")
- 24)
- 0xff))
- ", ")
- "imp:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC2")
- 0)
- 0xf))
- ", ")
- "elanore:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC2")
- 4)
- 0xf))
- ", ")
- "elanore-sub:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC2")
- 12)
- 0xf))
- ", ")
- "wyara:")
- (&
- (>>
- (script_int caster "QUEST_MAGIC2")
- 8)
- 0xf))))))
-(PROCEDURE debug_xmod (name mask shift gain)
- (SET value
- (+
- (&
- (>>
- (script_int caster name)
- shift)
- mask)
- gain))
- (IF (< value 0)
- (SET value 0))
- (IF (> value mask)
- (SET value mask))
- (CALL set_var name mask shift value))
-(PROCEDURE debug_mod (name delta)
- (IF (== name "mexp")
- (CALL debug_xmod "MAGIC_EXPERIENCE" 0xffff 0 delta)
- (IF (== name "lastspell")
- (CALL debug_xmod "MAGIC_EXPERIENCE" 0xff 16 delta)
- (IF (== name "healexp")
- (CALL debug_xmod "MAGIC_EXPERIENCE" 0xff 24 delta)
- (IF (== name "drank")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 0 delta)
- (IF (== name "Kmseed")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 1 delta)
- (IF (== name "touched-mseed")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 2 delta)
- (IF (== name "mseed-max")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 3 delta)
- (IF (== name "Kauldsbel")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 4 delta)
- (IF (== name "Kwyara")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 5 delta)
- (IF (== name "Ksagatha")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 6 delta)
- (IF (== name "Kmpotion")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 7 delta)
- (IF (== name "mseed-rumour")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 8 delta)
- (IF (== name "Kcuttree")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 9 delta)
- (IF (== name "cut")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 10 delta)
- (IF (== name "Kdruidtree")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 11 delta)
- (IF (== name "Kimp")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 12 delta)
- (IF (== name "oldwiz")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 13 delta)
- (IF (== name "made-conc")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 14 delta)
- (IF (== name "elanore-omar")
- (CALL debug_xmod "MAGIC_FLAGS" 0x1 15 delta)
- (IF (== name "auldsbel")
- (CALL debug_xmod "QUEST_MAGIC" 0x1f 0 delta)
- (IF (== name "Qauldsbel")
- (CALL debug_xmod "QUEST_MAGIC" 0x7 5 delta)
- (IF (== name "dt")
- (CALL debug_xmod "QUEST_MAGIC" 0x3 10 delta)
- (IF (== name "mb")
- (CALL debug_xmod "QUEST_MAGIC" 0x3 8 delta)
- (IF (== name "s-unhappy")
- (CALL debug_xmod "QUEST_MAGIC" 0xff 12 delta)
- (IF (== name "sagatha")
- (CALL debug_xmod "QUEST_MAGIC" 0xff 16 delta)
- (IF (== name "swords")
- (CALL debug_xmod "QUEST_MAGIC" 0xff 24 delta)
- (IF (== name "imp")
- (CALL debug_xmod "QUEST_MAGIC2" 0xf 0 delta)
- (IF (== name "elanore")
- (CALL debug_xmod "QUEST_MAGIC2" 0xf 4 delta)
- (IF (== name "wyara")
- (CALL debug_xmod "QUEST_MAGIC2" 0xf 8 delta)
- (IF (== name "elanore-sub")
- (CALL debug_xmod "QUEST_MAGIC2" 0xf 12 delta)
- (message caster "Unknown"))))))))))))))))))))))))))))))))
-
-(SPELL () debug-up1 "debug+1" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (CALL debug_mod name 1))))
-
-(SPELL () debug-down1 "debug-1" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (CALL debug_mod name
- (- 0 1)))))
-
-(SPELL () debug-up16 "debug+16" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (CALL debug_mod name 16))))
-
-(SPELL () debug-down16 "debug-16" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (CALL debug_mod name
- (- 0 16)))))
-
-(SPELL () debug-up256 "debug+256" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
-
- (CALL debug_mod name 256))))
-(SPELL () debug-down256 "debug-256" (STRING name)
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (CALL debug_mod name
- (- 0 256)))))
-
-(SPELL () debug-reset "debug-reset" ()
- (=>
- (REQUIRE DEBUG)
- (EFFECT
- (set_script_variable caster "QUEST_MAGIC"
- 0)
- (set_script_variable caster "QUEST_MAGIC2"
- 0)
- (set_script_variable caster "MAGIC_FLAGS"
- 0)
- (set_script_variable caster "MAGIC_EXP"
- 0))))
diff --git a/world/map/conf/magic-level0.sex b/world/map/conf/magic-level0.sex
new file mode 100644
index 00000000..f376b2cd
--- /dev/null
+++ b/world/map/conf/magic-level0.sex
@@ -0,0 +1,39 @@
+"--------------------------------------------------------------------------------"
+" Level 0 spells "
+"--------------------------------------------------------------------------------"
+(SPELL () wand "#confringo" ()
+ (LET school MAGIC)
+ (=>
+ (GUARD
+ (CASTTIME 500))
+ (EFFECT
+ (SCRIPT "{callfunc \"CheckWand\";}")
+ (IF (==
+ (script_int caster "@Wand")
+ 0)
+ (ABORT))
+ (CALL adjust_spellpower school)
+ (CALL default_effect)
+ (CALL install_attack_spell
+ (+ (script_int caster "@Wand")
+ (/ spellpower 10))
+ 1200
+ 3
+ (script_int caster "@WandID"))
+ (CALL gain_xp 1 3)
+ (ATTRIGGER
+ (CALL attack_check target)
+ (SCRIPT "{callfunc \"WandMana\";}")
+ (IF (==
+ (script_int caster "@WandAttack")
+ 0)
+ (ABORT))
+ (SET damage
+ (* (script_int caster "@Wand")
+ (/ spellpower
+ 3)))
+ (SET damage_bonus
+ (* (script_int caster "@Wand")
+ (/ spellpower
+ 3)))
+ (CALL elt_damage target damage damage_bonus ELT_NEUTRAL ELT_NEUTRAL 5)))))
diff --git a/world/map/conf/magic-level1.sex b/world/map/conf/magic-level1.sex
index 671ec309..9ca79f3b 100644
--- a/world/map/conf/magic-level1.sex
+++ b/world/map/conf/magic-level1.sex
@@ -1,53 +1,15 @@
"--------------------------------------------------------------------------------"
-"Level 0 spells"
+" Level 1 spells "
"--------------------------------------------------------------------------------"
-(SPELL () wand "#confringo" ()
- (LET school MAGIC)
- (=>
- (GUARD
- (CASTTIME 500))
- (EFFECT
- (SCRIPT "{callfunc \"CheckWand\";}")
- (IF (==
- (script_int caster "@Wand")
- 0)
- (ABORT))
- (CALL adjust_spellpower school)
- (CALL default_effect)
- (CALL install_attack_spell
- (+ (script_int caster "@Wand")
- (/ spellpower 10))
- 1200
- 3
- (script_int caster "@WandID"))
- (CALL gain_xp 1 3)
- (ATTRIGGER
- (CALL attack_check target)
- (SCRIPT "{callfunc \"WandMana\";}")
- (IF (==
- (script_int caster "@WandAttack")
- 0)
- (ABORT))
- (SET damage
- (* (script_int caster "@Wand")
- (/ spellpower
- 3)))
- (SET damage_bonus
- (* (script_int caster "@Wand")
- (/ spellpower
- 3)))
- (CALL elt_damage target damage damage_bonus ELT_NEUTRAL ELT_NEUTRAL 5))
-)))
-
(SPELL () ask-magic-exp "#abizit" ()
- (LET level 0)
+ (LET level 1)
(LET school MAGIC)
(=>
(GUARD
(MANA 1)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level)))
(EFFECT
@@ -119,14 +81,14 @@
(message caster "You feel completely overwhelmed by your magic."))))))))))))))))))
(SPELL () transmute-wood-to-figurine "#parum" (STRING name)
- (LET level 0)
+ (LET level 1)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 5)
(CASTTIME 4000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "RawLog"))
@@ -149,14 +111,14 @@
(message caster "You have no idea what a Skrytlurk looks like."))))))
(SPELL () make-sulphur "#gole" ()
- (LET level 0)
+ (LET level 1)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 4)
(CASTTIME 4000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "PileOfAsh"))
@@ -177,14 +139,14 @@
(CALL gain_xp 1 1))))
(SPELL () lesser-heal "#lum" (STRING target)
- (LET level 0)
+ (LET level 1)
(LET school LIFE)
(=>
(GUARD
(MANA 6)
(CASTTIME 500)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
@@ -244,14 +206,14 @@
(CALL gain_xp 1 2))))
(SPELL () flare-dart "#flar" ()
- (LET level 0)
+ (LET level 1)
(LET school WAR)
(=>
(GUARD
(MANA 10)
(CASTTIME 500)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(GUARD
@@ -284,14 +246,14 @@
(CALL elt_damage target damage damage_bonus ELT_WATER ELT_FIRE 15)))))
(SPELL () magic-blade "#chiza" ()
- (LET level 0)
+ (LET level 1)
(LET school WAR)
(=>
(GUARD
(MANA 9)
(CASTTIME 500)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level)))
(|
@@ -327,14 +289,14 @@
(str caster)))))))))
(SPELL () aggravate "#itenplz" ()
- (LET level 0)
+ (LET level 1)
(LET school NATURE)
(=>
(GUARD
(MANA 3)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level)))
(EFFECT
@@ -353,14 +315,14 @@
(aggravate target 0 caster)))))))
(SPELL () grow-mauve "#modrilax" ()
- (LET level 0)
+ (LET level 1)
(LET school NATURE)
(=>
(GUARD
(MANA 4)
(CASTTIME 2000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "MauveHerb" "Root"))
@@ -382,14 +344,14 @@
school))))
(SPELL () grow-alizarin "#modriphoo" ()
- (LET level 0)
+ (LET level 1)
(LET school NATURE)
(=>
(GUARD
(MANA 4)
(CASTTIME 2000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "AlizarinHerb" "Root"))
@@ -411,14 +373,14 @@
school))))
(SPELL () grow-gamboge "#modriyikam" ()
- (LET level 0)
+ (LET level 1)
(LET school NATURE)
(=>
(GUARD
(MANA 4)
(CASTTIME 2000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "GambogeHerb" "Root"))
@@ -440,14 +402,14 @@
school))))
(SPELL () grow-cobalt "#modrisump" ()
- (LET level 0)
+ (LET level 1)
(LET school NATURE)
(=>
(GUARD
(MANA 4)
(CASTTIME 2000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "CobaltHerb" "Root"))
@@ -469,14 +431,14 @@
school))))
(SPELL (LOCAL) summon-maggots "#kalmurk" ()
- (LET level 0)
+ (LET level 1)
(LET school ASTRAL)
(=>
(GUARD
(MANA 21)
(CASTTIME 20000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(COMPONENTS "MaggotSlime" "Root"))
@@ -498,14 +460,14 @@
school))))
(SPELL () detect-magic "#miteyo" ()
- (LET level 0)
+ (LET level 1)
(LET school MAGIC)
(=>
(GUARD
(MANA 3)
(CASTTIME 6000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level)))
(EFFECT
diff --git a/world/map/conf/magic-level2.sex b/world/map/conf/magic-level2.sex
index 993f2a89..e12a58b8 100644
--- a/world/map/conf/magic-level2.sex
+++ b/world/map/conf/magic-level2.sex
@@ -1,19 +1,19 @@
"--------------------------------------------------------------------------------"
-"Level 1 spells"
+" Level 2 spells "
"--------------------------------------------------------------------------------"
(SPELL () make-arrows "#kularzufrill" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 8)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "RawLog"))
@@ -34,18 +34,18 @@
(CALL gain_xp 1 11))))
(SPELL () make-shirt "#patmuploo" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 25)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS
@@ -57,18 +57,18 @@
(CALL gain_xp 2 12))))
(SPELL () make-tanktop "#patloree" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 25)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS
@@ -80,18 +80,18 @@
(CALL gain_xp 2 13))))
(SPELL () make-short-tanktop "#patviloree" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 25)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS
@@ -103,18 +103,18 @@
(CALL gain_xp 2 14))))
(SPELL () make-iron-powder "#zukminbirf" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 8)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "IronOre"))
@@ -135,18 +135,18 @@
(CALL gain_xp 3 15))))
(SPELL () make-concentration-potion "#loshira" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 8)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "BottleOfWater"
@@ -174,18 +174,18 @@
(CALL gain_xp 4 16))))
(SPELL () merge-concentration-potions "#skrimp" ()
- (LET level 1)
+ (LET level 2)
(LET school TRANSMUTE)
(=>
(GUARD
(MANA 8)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "DarkConcentrationPotion" "DilutedConcentrationPot"))
@@ -200,7 +200,7 @@
(CALL gain_xp 4 17))))
(SPELL () lay-on-hands "#inma" (STRING target)
- (LET level 1)
+ (LET level 2)
(LET school LIFE)
(=>
(GUARD
@@ -213,11 +213,11 @@
(max_hp caster)
20)))
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -317,11 +317,11 @@
(max_hp caster)
20)
-1))
- (IF (>
+ (IF (>=
(skill caster school)
level)
(itemheal caster h 0))
- (IF (>
+ (IF (>=
(skill caster school)
level)
(SET t 10000))
@@ -332,26 +332,26 @@
18))))
(SPELL () lightning-strike "#ingrav" ()
- (LET level 1)
+ (LET level 2)
(LET school WAR)
(=>
(GUARD
(MANA 20)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
(OR
(REQUIRE
- (>
- (skill caster school)
- 3))
+ (>=
+ (skill caster school) "The spell is free at magic lv 4"
+ 4))
(COMPONENTS "IronPowder"))))
(EFFECT
(CALL adjust_spellpower school)
@@ -433,18 +433,18 @@
(random 3))))))))
(SPELL (LOCAL) arrow-hail "#frillyar" ()
- (LET level 1)
+ (LET level 2)
(LET school WAR)
(=>
(GUARD
(MANA 25)
(CASTTIME 5000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -534,18 +534,18 @@
(random 50))))))))
(SPELL () magic-knuckles "#upmarmu" ()
- (LET level 1)
+ (LET level 2)
(LET school WAR)
(=>
(GUARD
(MANA 20)
(CASTTIME 500)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
@@ -570,18 +570,18 @@
(* str 2)))))))
(SPELL (LOCAL) summon-snakes "#halhiss" ()
- (LET level 1)
+ (LET level 2)
(LET school DARK)
(=>
(GUARD
(MANA 40)
(CASTTIME 15000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -603,7 +603,7 @@
school))))
(SPELL () toxic-dart "#phlex" ()
- (LET level 1)
+ (LET level 2)
(LET school DARK)
(=>
(GUARD
@@ -614,15 +614,15 @@
(script_int caster "OrumQuest")
37))
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(GUARD
(OR
(REQUIRE
- (>
+ (>=
(skill caster school)
- 2))
+ 3))
(COMPONENTS
(2 "Root")))))
(EFFECT
@@ -660,14 +660,14 @@
(* spellpower 1200))))))))
(SPELL (LOCAL) summon-wickedmushroom "#helorp" ()
- (LET level 1)
+ (LET level 2)
(LET school DARK)
(=>
(GUARD
(MANA 35)
(CASTTIME 15000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
@@ -675,7 +675,7 @@
(script_int caster "OrumQuest")
36))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "SmallMushroom" "DarkCrystal"))
@@ -693,18 +693,18 @@
school))))
(SPELL () flying-backpack "#plugh" (PC target)
- (LET level 1)
+ (LET level 2)
(LET school NATURE)
(=>
(GUARD
(MANA 12)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
@@ -736,18 +736,18 @@
(sfx target 2 0)))))
(SPELL () protect "#betsanc" (PC target)
- (LET level 1)
+ (LET level 2)
(LET school NATURE)
(=>
(GUARD
(MANA 14)
(CASTTIME 1500)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -758,9 +758,9 @@
(GUARD
(OR
(REQUIRE
- (>
+ (>=
(skill caster school)
- 3))
+ 4))
(COMPONENTS "HardSpike")))
(REQUIRE
(<
@@ -790,18 +790,18 @@
(sfx target 111 0)))))
(SPELL () happy-curse "#joyplim" (PC target)
- (LET level 1)
+ (LET level 2)
(LET school NATURE)
(=>
(GUARD
(MANA 13)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
@@ -837,18 +837,18 @@
(CALL gain_xp 1 23))))
(SPELL (LOCAL) rain "#kaflosh" ()
- (LET level 1)
+ (LET level 2)
(LET school NATURE)
(=>
(GUARD
(MANA 17)
(CASTTIME 3000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -857,9 +857,9 @@
(GUARD
(OR
(REQUIRE
- (>
+ (>=
(skill caster school)
- 3))
+ 4))
(COMPONENTS "BottleOfWater"))))
(EFFECT
(CALL adjust_spellpower school)
@@ -968,18 +968,18 @@
(+ prob3 prob))))))
(SPELL () shear "#chipchip" ()
- (LET level 1)
+ (LET level 2)
(LET school NATURE)
(=>
(GUARD
(MANA 23)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level)))
(EFFECT
@@ -1027,18 +1027,18 @@
}"))))))))
(SPELL () barrier "#asorm" (PC target)
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 16)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -1081,18 +1081,18 @@
(sfx target SFX_UNBARRIER 0)))))
(SPELL (LOCAL) summon-spiky-mushrooms "#kalrenk" ()
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 33)
(CASTTIME 20000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "HardSpike" "Root"))
@@ -1110,18 +1110,18 @@
school))))
(SPELL (LOCAL) summon-fluffies "#kalakarenk" ()
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 39)
(CASTTIME 20000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "WhiteFur" "Root"))
@@ -1141,18 +1141,18 @@
school))))
(SPELL (LOCAL) summon-mouboo "#kalboo" ()
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 35)
(CASTTIME 20000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "MoubooFigurine" "Root"))
@@ -1170,18 +1170,18 @@
school))))
(SPELL (LOCAL) summon-pinkie "#kalgina" ()
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 35)
(CASTTIME 20000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(COMPONENTS "PinkAntenna" "Root"))
@@ -1199,18 +1199,18 @@
school))))
(SPELL () detect-players "#inwilt" ()
- (LET level 1)
+ (LET level 2)
(LET school MAGIC)
(=>
(GUARD
(MANA 7)
(CASTTIME 300)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level)))
(EFFECT
@@ -1250,18 +1250,18 @@
(+ "You sense the following: " message))))))
(SPELL () enchant-lifestone "#manpahil" ()
- (LET level 1)
+ (LET level 2)
(LET school MAGIC)
(=>
(GUARD
(MANA 15)
(CASTTIME 4000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
@@ -1277,18 +1277,18 @@
(CALL gain_xp 1 28))))
(SPELL () sense-spouse "#inzuwilt" ()
- (LET level 1)
+ (LET level 2)
(LET school MAGIC)
(=>
(GUARD
(MANA 7)
(CASTTIME 400)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(REQUIRE
@@ -1409,18 +1409,18 @@
"."))))))))))
(SPELL () hide "#anwiltyp" (PC target)
- (LET level 1)
+ (LET level 2)
(LET school ASTRAL)
(=>
(GUARD
(MANA 11)
(CASTTIME 1000)
(REQUIRE
- (>
+ (>=
(skill caster MAGIC)
level))
(REQUIRE
- (>
+ (>=
(skill caster school)
level))
(GUARD
diff --git a/world/map/conf/magic-level3.sex b/world/map/conf/magic-level3.sex
index 2550da3e..5d4d7374 100644
--- a/world/map/conf/magic-level3.sex
+++ b/world/map/conf/magic-level3.sex
@@ -1,176 +1,179 @@
"--------------------------------------------------------------------------------"
-"Level 2 spells"
+" Level 3 spells "
"--------------------------------------------------------------------------------"
-(SPELL () cure-poison "#anju" (PC target)
- (LET level 2)
- (LET school LIFE)
- (=>
- (GUARD
- (MANA 15)
- (CASTTIME 1000)
- (REQUIRE
- (>
- (skill caster MAGIC)
- level))
- (REQUIRE
- (>
- (skill caster school)
- level))
- (REQUIRE
- (<
- (rdistance
- (location caster)
- (location
- (pc target)))
- (+ 1
- (/ spellpower 60))))
- (COMPONENTS "GambogeHerb"))
- (EFFECT
- (CALL adjust_spellpower school)
- (CALL default_effect)
- (IF (running_status_update target SC_POISON)
- (BLOCK
- (CALL gain_heal_xp 40 1 2 2)
- (stop_status_change target SC_POISON)
- (CALL gain_xp 2 30)
- (IF (!= caster target)
- (sfx target SFX_HEAL 0)))))))
+(DISABLED
+ (SPELL () cure-poison "#anju" (PC target)
+ (LET level 3)
+ (LET school LIFE)
+ (=>
+ (GUARD
+ (MANA 15)
+ (CASTTIME 1000)
+ (REQUIRE
+ (>=
+ (skill caster MAGIC)
+ level))
+ (REQUIRE
+ (>=
+ (skill caster school)
+ level))
+ (REQUIRE
+ (<
+ (rdistance
+ (location caster)
+ (location
+ (pc target)))
+ (+ 1
+ (/ spellpower 60))))
+ (COMPONENTS "GambogeHerb"))
+ (EFFECT
+ (CALL adjust_spellpower school)
+ (CALL default_effect)
+ (IF (running_status_update target SC_POISON)
+ (BLOCK
+ (CALL gain_heal_xp 40 1 2 2)
+ (stop_status_change target SC_POISON)
+ (CALL gain_xp 2 30)
+ (IF (!= caster target)
+ (sfx target SFX_HEAL 0))))))))
-(SPELL () fire-ball "#flarfol" ()
- (LET level 2)
- (LET school WAR)
- (=>
- (GUARD
- (MANA 30)
- (CASTTIME 1000)
- (REQUIRE
- (>
- (skill caster MAGIC)
- level))
- (REQUIRE
- (>
- (skill caster school)
- level))
- (COMPONENTS "PileOfAsh"))
- (EFFECT
- (CALL adjust_spellpower school)
- (SET damage
- (min
- (+ 50
- (*
- (skill caster school)
- 40))
- (+ 30
- (/
- (* spellpower 3)
- 2))))
- (SET damage_bonus
- (+
- (level caster)
- (* spellpower 2)))
- (SET radius
- (+ 2
- (/ spellpower 50)))
- (CALL install_attack_spell
- (+ 1
- (/ spellpower 60))
- 5000
- 10
- 31)
- (ATTRIGGER
- (CALL attack_check target)
- (SET loc
- (location target))
- (DISABLED (WAIT 500))
- (sfx loc 16 0)
- (FOREACH TARGET target
- (rbox loc radius)
- (IF (line_of_sight loc
- (location target))
- (BLOCK
- (SET divisor
- (+ 3
- (rdistance loc
- (location target))))
- (CALL elt_damage target
- (/
- (* damage 3)
- divisor)
- (/
- (* damage_bonus 3)
- divisor)
- ELT_WATER
- ELT_FIRE
- 15))))))))
+(DISABLED
+ (SPELL () fire-ball "#flarfol" ()
+ (LET level 3)
+ (LET school WAR)
+ (=>
+ (GUARD
+ (MANA 30)
+ (CASTTIME 1000)
+ (REQUIRE
+ (>=
+ (skill caster MAGIC)
+ level))
+ (REQUIRE
+ (>=
+ (skill caster school)
+ level))
+ (COMPONENTS "PileOfAsh"))
+ (EFFECT
+ (CALL adjust_spellpower school)
+ (SET damage
+ (min
+ (+ 50
+ (*
+ (skill caster school)
+ 40))
+ (+ 30
+ (/
+ (* spellpower 3)
+ 2))))
+ (SET damage_bonus
+ (+
+ (level caster)
+ (* spellpower 2)))
+ (SET radius
+ (+ 2
+ (/ spellpower 50)))
+ (CALL install_attack_spell
+ (+ 1
+ (/ spellpower 60))
+ 5000
+ 10
+ 31)
+ (ATTRIGGER
+ (CALL attack_check target)
+ (SET loc
+ (location target))
+ (DISABLED (WAIT 500))
+ (sfx loc 16 0)
+ (FOREACH TARGET target
+ (rbox loc radius)
+ (IF (line_of_sight loc
+ (location target))
+ (BLOCK
+ (SET divisor
+ (+ 3
+ (rdistance loc
+ (location target))))
+ (CALL elt_damage target
+ (/
+ (* damage 3)
+ divisor)
+ (/
+ (* damage_bonus 3)
+ divisor)
+ ELT_WATER
+ ELT_FIRE
+ 15)))))))))
-(SPELL () summon-partner "#kalzumin" ()
- (LET level 2)
- (LET school ASTRAL)
- (=>
- (GUARD
- (MANA 30)
- (CASTTIME 2000)
- (REQUIRE
- (>
- (skill caster MAGIC)
- level))
- (REQUIRE
- (>
- (skill caster school)
- level))
- (REQUIRE
- (is_married caster))
- (REQUIRE
- (is_equipped caster "WeddingRing")))
- (EFFECT
- (CALL adjust_spellpower school)
- (CALL default_effect)
- (IF (failed
- (partner caster))
- (message caster "You call out for your partner, but there is no response.")
- (BLOCK
- (message caster
- (+
- (+ "You call out for "
- (name_of
- (partner caster)))
- "."))
- (message
- (partner caster)
- (+
- (name_of caster)
- " is calling for your aid!"))
- (sfx
- (partner caster)
- 2
- 0)
- (WAIT
- (max 5000
- (- 30000
- (* spellpower 60))))
- (IF (failed
- (partner caster))
- (message caster "Your partner has abandoned you.")
- (IF (is_dead
+(DISABLED
+ (SPELL () summon-partner "#kalzumin" ()
+ (LET level 3)
+ (LET school ASTRAL)
+ (=>
+ (GUARD
+ (MANA 30)
+ (CASTTIME 2000)
+ (REQUIRE
+ (>=
+ (skill caster MAGIC)
+ level))
+ (REQUIRE
+ (>=
+ (skill caster school)
+ level))
+ (REQUIRE
+ (is_married caster))
+ (REQUIRE
+ (is_equipped caster "WeddingRing")))
+ (EFFECT
+ (CALL adjust_spellpower school)
+ (CALL default_effect)
+ (IF (failed
+ (partner caster))
+ (message caster "You call out for your partner, but there is no response.")
+ (BLOCK
+ (message caster
+ (+
+ (+ "You call out for "
+ (name_of
+ (partner caster)))
+ "."))
+ (message
+ (partner caster)
+ (+
+ (name_of caster)
+ " is calling for your aid!"))
+ (sfx
+ (partner caster)
+ 2
+ 0)
+ (WAIT
+ (max 5000
+ (- 30000
+ (* spellpower 60))))
+ (IF (failed
(partner caster))
- (message caster
- (+
- (+ "Something seems to have happened to "
- (name_of
- (partner caster)))
- "."))
- (BLOCK
- (sfx
- (location
- (partner caster))
- SFX_TELEPORT
- 0)
- (SET dest
- (awayfrom
- (location caster)
- (random_dir 1)
- 1))
- (warp
- (partner caster)
- dest)
- (sfx dest SFX_TELEPORT 0)))))))))
+ (message caster "Your partner has abandoned you.")
+ (IF (is_dead
+ (partner caster))
+ (message caster
+ (+
+ (+ "Something seems to have happened to "
+ (name_of
+ (partner caster)))
+ "."))
+ (BLOCK
+ (sfx
+ (location
+ (partner caster))
+ SFX_TELEPORT
+ 0)
+ (SET dest
+ (awayfrom
+ (location caster)
+ (random_dir 1)
+ 1))
+ (warp
+ (partner caster)
+ dest)
+ (sfx dest SFX_TELEPORT 0))))))))))
diff --git a/world/map/conf/magic-level4.sex b/world/map/conf/magic-level4.sex
index f46e7454..f04092f4 100644
--- a/world/map/conf/magic-level4.sex
+++ b/world/map/conf/magic-level4.sex
@@ -1,3 +1,3 @@
"--------------------------------------------------------------------------------"
-"Level 3 spells"
+" Level 4 spells "
"--------------------------------------------------------------------------------"
diff --git a/world/map/conf/magic-level5.sex b/world/map/conf/magic-level5.sex
index 6a7093e5..056c9e50 100644
--- a/world/map/conf/magic-level5.sex
+++ b/world/map/conf/magic-level5.sex
@@ -1,53 +1,55 @@
"--------------------------------------------------------------------------------"
-"Level 4 spells"
+" Level 5 spells "
"--------------------------------------------------------------------------------"
-(SPELL () shroud "#anwilvimar" ()
- (LET level 4)
- (LET school NATURE)
- (=>
- (GUARD
- (MANA 40)
- (CASTTIME 400)
- (REQUIRE
- (>
- (skill caster MAGIC)
- level))
- (REQUIRE
- (>
- (skill caster school)
- level)))
- (EFFECT
- (CALL default_effect)
- (shroud caster 0x04))))
+(DISABLED
+ (SPELL () shroud "#anwilvimar" ()
+ (LET level 5)
+ (LET school NATURE)
+ (=>
+ (GUARD
+ (MANA 40)
+ (CASTTIME 400)
+ (REQUIRE
+ (>=
+ (skill caster MAGIC)
+ level))
+ (REQUIRE
+ (>=
+ (skill caster school)
+ level)))
+ (EFFECT
+ (CALL default_effect)
+ (shroud caster 0x04)))))
-(SPELL () teleport "#vorp" (STRING destination)
- (LET level 4)
- (LET school ASTRAL)
- (=>
- (GUARD
- (MANA 80)
- (CASTTIME 400)
- (DISABLED (COMPONENT "EtherEssence"))
- (DISABLED (CATALYST "TeleportCrystal"))
- (REQUIRE
- (>
- (skill caster MAGIC)
- level))
- (REQUIRE
- (>
- (skill caster school)
- level)))
- (EFFECT
- (CALL default_effect)
- (WAIT
- (+ 1000
- (/ 200000
- (+ spellpower 10))))
- (sfx
- (location caster)
- SFX_TELEPORT
- 200)
- (warp caster
- (random_location
- (anchor destination)))
- (sfx caster SFX_TELEPORT 200))))
+(DISABLED
+ (SPELL () teleport "#vorp" (STRING destination)
+ (LET level 5)
+ (LET school ASTRAL)
+ (=>
+ (GUARD
+ (MANA 80)
+ (CASTTIME 400)
+ (COMPONENT "EtherEssence")
+ (CATALYSTS "TeleportCrystal")
+ (REQUIRE
+ (>=
+ (skill caster MAGIC)
+ level))
+ (REQUIRE
+ (>=
+ (skill caster school)
+ level)))
+ (EFFECT
+ (CALL default_effect)
+ (WAIT
+ (+ 1000
+ (/ 200000
+ (+ spellpower 10))))
+ (sfx
+ (location caster)
+ SFX_TELEPORT
+ 200)
+ (warp caster
+ (random_location
+ (anchor destination)))
+ (sfx caster SFX_TELEPORT 200)))))
diff --git a/world/map/conf/magic-misc.sex b/world/map/conf/magic-misc.sex
index 2e4942b7..15672f4c 100644
--- a/world/map/conf/magic-misc.sex
+++ b/world/map/conf/magic-misc.sex
@@ -1,5 +1,5 @@
"--------------------------------------------------------------------------------"
-"Special-purpose quasispells"
+" Special-purpose quasispells "
"--------------------------------------------------------------------------------"
(SPELL (NONMAGIC) dueloff "#dueloff" ()
(=>
@@ -166,48 +166,47 @@
(name_of target)
" turned down your marriage offer."))))))
-(SPELL (LOCAL) mouboo-groan "#g" ()
- (=>
- (GUARD
- (MANA 1)
- (REQUIRE
- (==
- (name_of caster)
- "MOUBOOTAUR")))
- (EFFECT
- (FOREACH PC p
- (rbox
- (location caster)
- 200)
- (SET distance
- (rdistance
+(DISABLED
+ (SPELL (LOCAL) mouboo-groan "#g" ()
+ (=>
+ (GUARD
+ (MANA 1)
+ (REQUIRE
+ (==
+ (name_of caster)
+ "MOUBOOTAUR")))
+ (EFFECT
+ (FOREACH PC p
+ (rbox
(location caster)
- (location p))))
- (IF (< distance 15)
- (message p "The moubootaur's groaning rings in your ears!")
- (IF (< distance 70)
- (message p "You hear a loud groaning noise, not far away...")
- (message p "You hear an odd groaning noise in the distance..."))))))
+ 200)
+ (SET distance
+ (rdistance
+ (location caster)
+ (location p))))
+ (IF (< distance 15)
+ (message p "The moubootaur's groaning rings in your ears!")
+ (IF (< distance 70)
+ (message p "You hear a loud groaning noise, not far away...")
+ (message p "You hear an odd groaning noise in the distance...")))))))
-(SPELL (LOCAL) mouboo-smell "#s" ()
- (=>
- (GUARD
- (MANA 1)
- (REQUIRE
- (==
- (name_of caster)
- "MOUBOOTAUR")))
- (EFFECT
- (WAIT 30000)
- (FOREACH PC p
- (rbox
- (location caster)
- 30)
- (message p "You notice a strange smell all around you.")))))
+(DISABLED
+ (SPELL (LOCAL) mouboo-smell "#s" ()
+ (=>
+ (GUARD
+ (MANA 1)
+ (REQUIRE
+ (==
+ (name_of caster)
+ "MOUBOOTAUR")))
+ (EFFECT
+ (WAIT 30000)
+ (FOREACH PC p
+ (rbox
+ (location caster)
+ 30)
+ (message p "You notice a strange smell all around you."))))))
-"--------------------------------------------------------------------------------"
-"Kill the GM event spell"
-"--------------------------------------------------------------------------------"
(SPELL (NONMAGIC) killgm0 "#pullrabbit" ()
(=>
(REQUIRE
diff --git a/world/map/conf/magic-quickdebug.sex b/world/map/conf/magic-quickdebug.sex
index 63ff5ada..c1d4ff72 100644
--- a/world/map/conf/magic-quickdebug.sex
+++ b/world/map/conf/magic-quickdebug.sex
@@ -3,4 +3,4 @@
"--------------------------------------------------------------------------------"
(SPELL (NONMAGIC SILENT) debug0 "#debug" ()
(EFFECT
- (SCRIPT "{if(!debug)end;callfunc \"Debug\";}")))
+ (SCRIPT "{if(!debug&&(getgmlevel()<99))end;callfunc \"Debug\";}")))
diff --git a/world/map/conf/tmwa-map.conf b/world/map/conf/tmwa-map.conf
index 10dd615e..849779af 100644
--- a/world/map/conf/tmwa-map.conf
+++ b/world/map/conf/tmwa-map.conf
@@ -14,6 +14,8 @@ const_db: db/const-quest.txt
const_db: db/const-mapflags.txt
const_db: db/const-debugflag.txt
+quest_db: db/quest-log.txt
+
item_db: db/item_db_chest.txt
item_db: db/item_db_foot.txt
item_db: db/item_db_generic.txt
@@ -35,12 +37,12 @@ skill_db: db/skill_db.txt
magic_conf: conf/magic-config.sex
magic_conf: conf/magic-procedures.sex
+magic_conf: conf/magic-level0.sex
magic_conf: conf/magic-level1.sex
magic_conf: conf/magic-level2.sex
magic_conf: conf/magic-level3.sex
magic_conf: conf/magic-level4.sex
magic_conf: conf/magic-level5.sex
-magic_conf: conf/magic-debug.sex
magic_conf: conf/magic-misc.sex
magic_conf: conf/magic-quests.sex
magic_conf: conf/magic-anchors.sex
diff --git a/world/map/db/const.txt b/world/map/db/const.txt
index c00773e2..af5cc476 100644
--- a/world/map/db/const.txt
+++ b/world/map/db/const.txt
@@ -26,6 +26,12 @@ Weight 24 1
MaxWeight 25 1
//JobLevel 55 1
//Upper 56 1
+Str 13 1
+Agi 14 1
+Vit 15 1
+Int 16 1
+Dex 17 1
+Luk 18 1
// BEFORE UNCOMMENTING ANYTHING, TALK TO o11c!
bMaxHP 6
diff --git a/world/map/db/item_db_chest.txt b/world/map/db/item_db_chest.txt
index 3351257f..892b4082 100644
--- a/world/map/db/item_db_chest.txt
+++ b/world/map/db/item_db_chest.txt
@@ -27,7 +27,7 @@
793, BromenalChest, Bromenal Chest, 5, 100000, 3000, 2000, 0, 25, 0, -170, 0, 2, 512, 0, 0, 0, {}, {}
798, SorcererRed, Sorcerer Robe Red, 5, 8000, 4000, 5, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, {}, {bonus bAgi, 1;}
870, FineDress, Fine Dress, 5, 10000, 5000, 35, 0, 8, 0, 3, 0, 2, 512, 0, 0, 0, {}, {}
-880, LazuriteRobe, Lazurite Robe, 5, 92000, 52000, 30, 0, 7, 0, 60, 0, 2, 512, 0, 90, 0, {}, {set @bStat, bInt;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, bVit;set @minbStatVal, 40;callfunc "RequireStat"; bonus bSpeedAddRate, -15; bonus bDef2Rate, -40; bonus bMdef, 60; bonus bVit, -1; bonus bInt, 7; bonus bLuk, -1; bonus bDex, -1; bonus bStr, -1;}
+880, LazuriteRobe, Lazurite Robe, 5, 92000, 52000, 30, 0, 7, 0, 60, 0, 2, 512, 0, 90, 0, {}, {set @bStat, Int;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, Vit;set @minbStatVal, 40;callfunc "RequireStat"; bonus bSpeedAddRate, -15; bonus bDef2Rate, -40; bonus bMdef, 60; bonus bVit, -1; bonus bInt, 7; bonus bLuk, -1; bonus bDex, -1; bonus bStr, -1;}
1178, Contributor, ContributorShirt, 5, 0, 0, 20, 0, 5, 0, 5, 0, 2, 512, 0, 0, 0, {}, {}
1183, AmberChristmasSweater, Amber Christmas Sweater, 5, 2000, 1000, 35, 0, 6, 0, -12, 0, 2, 512, 0, 0, 0, {}, {}
1184, FunkyChristmasSweater, Funky Christmas Sweater, 5, 2000, 1000, 35, 0, 6, 0, -12, 0, 2, 512, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt
index b838fc07..a467397c 100644
--- a/world/map/db/item_db_head.txt
+++ b/world/map/db/item_db_head.txt
@@ -56,7 +56,7 @@
855, Sunglasses, Sunglasses, 5, 1000, 500, 10, 0, 2, 0, 6, 0, 2, 256, 0, 0, 0, {}, {}
856, KnitCap, KnitCap, 5, 1000, 500, 50, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
//ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
-877, BullHelmet, Bull Helmet, 5, 90000, 60000, 1300, 0, 19, 0, -52, 0, 2, 256, 0, 90, 0, {}, {set @bStat, bStr;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, bVit;set @minbStatVal, 50;callfunc "RequireStat"; set @bStat, bLuk;set @minbStatVal, 50;callfunc "RequireStat"; bonus bAtkRange, -10; bonus bDoubleAddRate, 20; bonus bStr, 10; bonus bCritical, 15; bonus bAspdRate, 10; bonus bDef2Rate, -39; bonus bHit, -15;}
+877, BullHelmet, Bull Helmet, 5, 90000, 60000, 1300, 0, 19, 0, -52, 0, 2, 256, 0, 90, 0, {}, {set @bStat, Str;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, Vit;set @minbStatVal, 50;callfunc "RequireStat"; set @bStat, Luk;set @minbStatVal, 50;callfunc "RequireStat"; bonus bAtkRange, -10; bonus bDoubleAddRate, 20; bonus bStr, 10; bonus bCritical, 15; bonus bAspdRate, 10; bonus bDef2Rate, -39; bonus bHit, -15;}
882, RedEggshellHat, Red Eggshell Hat, 5, 7000, 5000, 15, 0, 9, 0, 3, 0, 2, 256, 0, 1, 0, {}, {}
883, BlueEggshellHat, Blue Eggshell Hat, 5, 7000, 5000, 15, 0, 9, 0, 3, 0, 2, 256, 0, 1, 0, {}, {}
884, YellowEggshellHat, Yellow Eggshell Hat, 5, 7000, 5000, 15, 0, 9, 0, 3, 0, 2, 256, 0, 1, 0, {}, {}
@@ -178,6 +178,6 @@
4032, PanHat, Pan Hat, 5, 1000, 500, 400, 0, 13, 0, -20, 0, 2, 256, 0, 0, 0, {}, {}
4033, ChefHat, Chef Hat, 5, 1000, 500, 30, 0, 2, 0, 2, 0, 2, 256, 0, 0, 0, {}, {}
4042, RedNose, Red Nose, 5, 4000, 1000, 4, 0, 2, 0, 7, 0, 2, 256, 0, 0, 0, {}, {}
-5128, DarkHelm, DarkHelm, 5, 50000, 10000, 800, 0, 19, 0, -80, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bMaxHPrate, 10; bonus bAtkRange, -((readparam(bAtkRange)/2)); bonus bInt, -(readparam(bInt));}
-5129, UnderworldMask, UnderworldMask, 5, 50000, 10000, 100, 0, 9, 0, -40, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bAtkRange, 1; bonus bInt, -(readparam(bInt));}
-5130, Phylactery, Phylactery, 5, 50000, 10000, 20, 0, 1, 0, 5, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bAspdRate, 10; bonus bDex, -(readparam(bDex)/2);}
+5128, DarkHelm, DarkHelm, 5, 50000, 10000, 800, 0, 19, 0, -80, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bMaxHPrate, 10; bonus bAtkRange, -((bAtkRange/2)); bonus bInt, -Int;}
+5129, UnderworldMask, UnderworldMask, 5, 50000, 10000, 100, 0, 9, 0, -40, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bAtkRange, 1; bonus bInt, -Int;}
+5130, Phylactery, Phylactery, 5, 50000, 10000, 20, 0, 1, 0, 5, 0, 2, 256, 0, 0, 0, {}, {callfunc "UnreleasedItem"; bonus bAspdRate, 10; bonus bDex, -(Dex/2);}
diff --git a/world/map/db/item_db_weapon.txt b/world/map/db/item_db_weapon.txt
index 0a36f27d..bf8c1899 100644
--- a/world/map/db/item_db_weapon.txt
+++ b/world/map/db/item_db_weapon.txt
@@ -47,12 +47,12 @@
//608, RESERVED, BladeShield, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//609, RESERVED, Club, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
623, Scythe, Scythe, 4, 100, 50, 1200, 75, 0, 1, 0, 0, 2, 34, 1, 1, 3, {}, {}
-758, WoodenStaff, Wooden Staff, 4, 4000, 2000, 1000, 50, 0, 1, 10, 0, 2, 34, 1, 1, 10, {}, {set @bStat, bInt;set @minbStatVal, 60;callfunc "RequireStat";}
+758, WoodenStaff, Wooden Staff, 4, 4000, 2000, 1000, 50, 0, 1, 10, 0, 2, 34, 1, 1, 10, {}, {set @bStat, Int;set @minbStatVal, 60;callfunc "RequireStat";}
//ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
-1171, Wand, Wand, 4, 400, 200, 100, 1, 0, 1, 5, 0, 2, 2, 1, 1, 1, {}, {set @bStat, bInt;set @minbStatVal, 5;callfunc "RequireStat";}
+1171, Wand, Wand, 4, 400, 200, 100, 1, 0, 1, 5, 0, 2, 2, 1, 1, 1, {}, {set @bStat, Int;set @minbStatVal, 5;callfunc "RequireStat";}
762, TerraniteArrow, Terranite Arrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 10;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
867, IceGladius, Ice Gladius, 4, 2000, 1000, 1000, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bLuk, 1;}
-878, BansheeBow, Banshee Bow, 4, 101000, 40000, 900, 90, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, bDex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -4; bonus bAspdRate, 20; bonus bCritical, 70; bonus bMaxHP, -150; bonus bDefRate, -40; bonus bDef2Rate, -35;set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
+878, BansheeBow, Banshee Bow, 4, 101000, 40000, 900, 90, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, Dex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -4; bonus bAspdRate, 20; bonus bCritical, 70; bonus bMaxHP, -150; bonus bDefRate, -40; bonus bDef2Rate, -35;set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
903, SlingShot, Sling Shot, 4, 500, 50, 10, 5, 0, 3, 0, 0, 2, 34, 1, 1, 11, {}, {set @LauncherType, AMMO_SLING; callfunc "CheckLauncher";}
904, SlingBullet, Sling Bullet, 10, 1, 0, 1, 3, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_SLING; callfunc "CheckAmmo";}
906, KidBook, Kid Book, 4, 10000, 5000, 100, 1, 0, 3, 0, 0, 2, 34, 1, 1, 1, {}, {}
diff --git a/world/map/db/quest-log.txt b/world/map/db/quest-log.txt
new file mode 100644
index 00000000..3802640d
--- /dev/null
+++ b/world/map/db/quest-log.txt
@@ -0,0 +1,13 @@
+//Quest Log
+//Quest ID: var id used by client
+//CommonVar: Used in getq & to set
+//ServerVar: Server Varaible value is stored
+//SHIFT: Posistion shifted. (SHIFT * MASK)
+//MASK: Size of shift to make. ((1 << MASK) - 1) << (SHIFT * MASK)
+//Quest ID,CommonVar,ServerVar,SHIFT,MASK
+1,QL_BEGIN,STARTAREA,0,4
+2,QL_VALON,STARTAREA,1,4
+3,QL_MORGAN,STARTAREA,3,4
+4,QL_ZEGAS,STARTAREA,4,4
+5,QL_VINCENT,QUEST_SouthTulimshar,4,2
+6,QL_HIDENSEEK,QUEST_NorthTulimshar,0,8
diff --git a/world/map/npc/001-1/children.txt b/world/map/npc/001-1/children.txt
index 6749f0e3..5ad738a9 100644
--- a/world/map/npc/001-1/children.txt
+++ b/world/map/npc/001-1/children.txt
@@ -16,7 +16,7 @@
L_1:
mes "[Aisha]";
- mes "\"Maggots are soo slimey!\"";
+ mes "\"Maggots are so slimey!\" %%^";
goto L_Close;
L_2:
@@ -26,12 +26,12 @@ L_2:
L_3:
mes "[Aisha]";
- mes "\"There are so many monsters; I hate scorpions!\"";
+ mes "\"There are so many monsters! I hate scorpions!\" %%3";
goto L_Close;
L_4:
mes "[Aisha]";
- mes "\"When I grow up, I want to be strong enough to kill a scorpion!\"";
+ mes "\"When I grow up, I want to be strong enough to kill a scorpion!\" %%=";
goto L_Close;
L_5:
@@ -41,7 +41,7 @@ L_5:
L_6:
mes "[Aisha]";
- mes "\"Have you tried to eat a roasted maggot? They are sooo yummy! And you feel much healthier afterwards, too!\"";
+ mes "\"Have you tried to eat a roasted maggot? They're sooo yummy! Mommy says they're healthy too!\" %%8";
goto L_Close;
L_7:
@@ -51,23 +51,23 @@ L_7:
L_8:
mes "[Aisha]";
- mes "\"That volcano was sooo scary! The earth was shaking and everything was breaking down... but now they have rebuilt everything.\"";
+ mes "\"That earthquake was sooo scary! The earth was shaking and everything was breaking down... but now they've rebuilt everything.\"";
goto L_Close;
L_9:
- mes "\"I know a very bad word. But I must not say it, because monsters will come and get me if I do!\"";
+ mes "\"I know a very bad word. But I can't say it because monsters will come and get me if I do!\"";
next;
menu
"A bad word?", L_tell,
- "Oh, you better keep it for yourself then.", L_Close;
+ "Oh. You better keep it to yourself then.", L_Close;
L_tell:
mes "[Aisha]";
- mes "\"Yes, I heard my mother say it once. And she made me promise her to never say it. Never.\"";
+ mes "\"I heard my mother say it once, and she made me promise her to never say it. ##BNever##b!\"";
next;
menu
"If I promise to never tell anyone, can you tell me the word?", L_keepword,
- "I understand, you do not need to tell me...", L_giveword,
+ "I understand. You don't need to tell me...", L_giveword,
"Goodbye!", L_Close;
L_keepword:
@@ -77,13 +77,13 @@ L_keepword:
L_giveword:
mes "[Aisha]";
- mes "Aisha looks around as she hushes you to silence. After a few seconds, she whispers to you.";
- mes "\"I like you! So I will tell you the bad word. But you can't tell anyone else about it! The bad word is '" + getspellinvocation("aggravate") + "'.\"";
+ mes "Aisha looks around as she leans in and hushes you to silence. After a few seconds, she whispers to you:";
+ mes "\"I like you, so I'll tell you the bad word. But you can't tell anyone else about it! The bad word is '" + getspellinvocation("aggravate") + ".'\"";
next;
mes "[Aisha]";
mes "Terrified, she looks around once more.";
- mes "\"But you mustn't tell anyone!\"";
+ mes "\"But you can't tell anyone!\" %%>";
goto L_Close;
L_Close:
diff --git a/world/map/npc/001-1/constable.txt b/world/map/npc/001-1/constable.txt
index 73a74a2f..ecc8a0d4 100644
--- a/world/map/npc/001-1/constable.txt
+++ b/world/map/npc/001-1/constable.txt
@@ -3,7 +3,7 @@
001-1,50,74,0|script|Constable Perry Graf|150
{
mes "[Constable Perry Graf]";
- mes "\"Hello, make sure the rules are followed.\"";
+ mes "\"Hello. Make sure to follow the rules!\"";
callfunc "GameRules";
close;
}
diff --git a/world/map/npc/001-1/eomie.txt b/world/map/npc/001-1/eomie.txt
index 6528ddbe..99085bcf 100644
--- a/world/map/npc/001-1/eomie.txt
+++ b/world/map/npc/001-1/eomie.txt
@@ -33,20 +33,20 @@
if (@state == 8) goto L_GetStuff;
mes "[Eomie]";
- mes "\"I maintain this little spot of grass in the desert.\"";
+ mes "\"I maintain this little oasis in the desert.\"";
if (@state != 7)
goto L_Close;
menu
- "I have this magic fertilizer from Tinris and need a spell cast on it.",L_Next;
+ "I need to learn a spell to use Tinris' magic fertilizer. Can you help me out?",L_Next;
L_Next:
mes "[Eomie]";
- mes "\"Oh? I see, that's a difficult task.";
- mes "I'd be glad to help you, but unfortunately I can't interrupt the magic I use to keep this spot of grass alive.\"";
+ mes "\"Oh? Well, that's a rather difficult task.";
+ mes "I'd be glad to help you, but unfortunately, I can't. If I were to interrupt the magic I use to keep this alive, it would die.\"";
next;
- mes "\"It's unusually hot at the moment, even for this desert area. It might have something to do with the aftereffects of the earthquake.\"";
+ mes "\"It's unusually hot at the moment – even for this desert area – so it's really out of the question.\"";
menu
- "Isn't there any possibility?",L_Continue;
+ "Is there any chance you could help me?",L_Continue;
L_Continue:
mes "She hesitates.";
@@ -57,13 +57,13 @@ L_Continue:
L_GetStuff:
// @state == 8
mes "[Eomie]";
- mes "\"I could try to interrupt my spells to be able to cast the spell on the fertilizer, but then I need to prepare the grass for this.";
- mes "Bring me " + @grass_amount + " Grass Seeds, " + @water_amount + " Bottles of Water and " + @ice_amount + " Ice Cubes.\"";
+ mes "\"I could try to briefly interrupt my magic and then cast the spell on the fertilizer, but I would need to prepare the grass beforehand.";
+ mes "Bring me " + @grass_amount + " " + getitemlink("GrassSeed") + ", " + @water_amount + " " + getitemlink("BottleOfWater") + ", and " + @ice_amount + " " + getitemlink("IceCube") + ".\"";
menu
- "I have it.",L_More,
+ "I've got everything.",L_More,
"Where can I get Grass Seeds?",L_Hurnscald,
- "How can I get Ice Cubes? We're in the desert!",L_Mine,
- "Ok, I'll go and get it.",L_Close;
+ "How can I get Ice Cubes? We're in the middle of the desert!",L_Mine,
+ "Ok. I'll go and get them.",L_Close;
L_More:
if ((countitem("GrassSeed") < @grass_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("IceCube") < @ice_amount))
goto L_NoItem;
@@ -74,38 +74,37 @@ L_More:
set @state, 9;
callsub S_Update_Mask;
mes "[Eomie]";
- mes "\"Very good.\"";
- mes "She takes the things you brought her and uses them to create a bubble of coolness around the spot of grass.";
+ mes "\"Very good!\"";
+ mes "She takes the ingredients you brought her and uses them to cast a cool mist into the air.";
misceffect sfx_magic_nature;
next;
mes "[Eomie]";
- mes "\"This should last long enough to keep the spot of grass alive until I cast the spell on the fertilizer. And if some of it shrivels I still have the seeds you brought me which I can use to recover it.\"";
+ mes "\"That should last long enough to keep the plants alive while I cast the spell on the fertilizer. Besides, I can replant anything that dies with the seeds you brought me.\"";
next;
- mes "She takes the fertilizer and casts some invocations. After a while she's done and gives it back to you with a smile.";
- misceffect sfx_magic_nature;
+ mes "She takes the fertilizer and casts some invocations. After a minute, she hands the now-glowing substance back to you.";
mes "[Eomie]";
- mes "\"This should help you. I'm glad you're taking care of the plants. Not enough people do that nowadays.\"";
+ mes "\"That should work now. I'm glad you're taking care of the plants! Not enough people do that nowadays.\" %%1";
goto L_Close;
L_Hurnscald: // player asked how to get Grass Seeds
mes "[Eomie]";
- mes "\"Squirrels tend to pick up Grass Seeds as they gather food. You can find them around Hurnscald. To get there you will have to take the ferry in the harbor district.\"";
+ mes "\"Squirrels tend to pick up " + getitemlink("GrassSeed") + " as they gather food. You can find them around Hurnscald if you ride the ferry over.\"";
goto L_Close;
L_Mine: // player asked how to get Ice Cubes
mes "[Eomie]";
- mes "\"Hm, that's a difficult task, indeed. Naturally you will find them on the continent of Kaizei, which is high up in the north and covered with snow most time of the year. But it might be difficult to get there.\"";
+ mes "\"Quite the quandary – isn't it? Naturally, you can easily find them on the continent of Kaizei, which is far up north and covered with snow most time of the year. But it might be a bit difficult to get there.\"";
next;
- mes "\"I heard that Ice Goblins were seen in the caves that are around Nivalis. Maybe you can find Ice Cubes in there.\"";
+ mes "\"I heard that Ice Goblins were seen in the caves surrounding Nivalis. Maybe you can find " + getitemlink("IceCube") + " there.\"";
goto L_Close;
L_CastedSpell: // @state >= 9 but below 14
mes "[Eomie]";
- mes "\"The grass wasn't damaged due to the interruption. I hope the magic fertilizer is useful for Anwar.\"";
+ mes "\"Thankfully, the grass wasn't damaged. I hope Anwar finds the magic fertilizer to be useful.\"";
if (@state != 13)
goto L_Close;
menu
- "It was and he created this Silk Headband as a present for you.",L_Present,
+ "It was. He even created this Silk Headband as a present for you!",L_Present,
"(Mumble something and leave)",L_Close;
L_Present:
@@ -116,18 +115,18 @@ L_Present:
set @state, 14;
callsub S_Update_Mask;
mes "[Eomie]";
- mes "\"Oh, this is very friendly! Please tell him I'm very happy about it.\"";
+ mes "\"Oh, that's so nice of him! Please tell him that I really like it!\"";
mes "She smiles.";
goto L_Close;
L_Done: // @state >= 14
mes "[Eomie]";
- mes "\"Hello. I'm happy to see someone like you being dedicated to the needs of plants and people.\"";
+ mes "\"Hello! I'm happy to see someone like you so dedicated to the environment.\" %%8";
goto L_Close;
L_NoItem:
mes "[Eomie]";
- mes "\"Where is it?\"";
+ mes "\"Where is it?\" %%3";
goto L_Close;
L_Close:
diff --git a/world/map/npc/001-1/ferry_master.txt b/world/map/npc/001-1/ferry_master.txt
index 9cfb1e74..c1e6cbb6 100644
--- a/world/map/npc/001-1/ferry_master.txt
+++ b/world/map/npc/001-1/ferry_master.txt
@@ -9,7 +9,7 @@
L_Main:
menu
"How do I use the ferry?", L_Explain,
- "Nothing I guess", L_Close;
+ "Nothing, I guess.", L_Close;
L_Explain:
mes "[Ferry Master]";
diff --git a/world/map/npc/001-1/gate_guards.txt b/world/map/npc/001-1/gate_guards.txt
index dea801ef..4370036d 100644
--- a/world/map/npc/001-1/gate_guards.txt
+++ b/world/map/npc/001-1/gate_guards.txt
@@ -2,25 +2,25 @@
001-1,39,33,0|script|Guard#school|104
{
mes "[Guard]";
- mes "\"I'm just here to provide a presence for the guards at this gate. The mages here can defend themselves without problem.\"";
+ mes "\"My presence here is just a formality. The mages inside can easily defend themselves.\"";
close;
}
001-1,56,47,0|script|Guard#castle|104
{
mes "[Guard]";
- mes "\"The volcano and earthquake did a lot of damage, but the citizens of Tulimshar sure did a good job of cleaning up.\"";
+ mes "\"Tulimshar is a resilient city; its citizens have made quite a comeback after the earthquake.\"";
close;
}
001-1,61,99,0|script|Guard#east3|104
{
mes "[Guard]";
- mes "\"The Palace is North of here. That is where you will find the Council of Wizards.\"";
+ mes "\"Just north of here is a palace where you can find both the Council of Wizards and the Magic Institute of Tulimshar.\"";
close;
}
001-1,53,72,0|script|Guard#govt_out|123
{
mes "[Guard]";
- mes "\"This is a government building. They have some clerical and tax offices in here. There is also a jail in the subbasement.\"";
+ mes "\"There are government officials inside who can help you form a party, obtain a trade license, or even get married.\"";
close;
}
diff --git a/world/map/npc/001-1/gossip.txt b/world/map/npc/001-1/gossip.txt
index 283de9d7..a2266498 100644
--- a/world/map/npc/001-1/gossip.txt
+++ b/world/map/npc/001-1/gossip.txt
@@ -2,53 +2,56 @@
001-1,66,104,0|script|Gladys|154
{
- mes "[Gladys, Town Gossip]";
- mes "\"Hello deary! I hear some of the most fascinating rumors and bits of news. I just heard a bit more today!\"";
+ mes "[Gladys]";
+ mes "\"Hello deary! I hear some of the most fascinating rumors!\"";
+ next;
mes "\"Would you like me to let you in on the good stuff?\"";
menu
- "Lt. Dausen", L_Intro,
- "Fieri", L_Cook,
- "Sarah", L_Sarah,
- "Sandra", L_Sandra,
- "Desert Mine", L_Desert,
- "Ferry", L_Ferry,
+ "Tell me about Lt. Dausen.", L_Intro,
+ "Tell me about Fieri.", L_Cook,
+ "Tell me about Sarah.", L_Sarah,
+ "Tell me about Sandra.", L_Sandra,
+ "Tell me about the Desert Mine.", L_Desert,
+ "Tell me about the Ferry.", L_Ferry,
"No thanks.", L_No;
L_No:
- mes "[Gladys, Town Gossip]";
- mes "\"Very well. Come back whenever you like. I am always getting juicy bits of news!\"";
+ mes "[Gladys]";
+ mes "\"Very well. Come back later if you want to hear some juicy news!\"";
goto L_Close;
L_Intro:
- mes "[Gladys, Town Gossip]";
- mes "\"Have you met our lovely guard captain yet? He usually keeps a post just outside the gates where he can keep an eye on things. He likes to talk to new adventurers too.\"";
+ mes "[Gladys]";
+ mes "\"Have you met our lovely guard captain yet? He usually keeps post just outside the gates to keep an eye on things. He likes to talk to new adventurers too.\"";
goto L_Close;
L_Cook:
- mes "[Gladys, Town Gossip]";
- mes "\"I hear the kitchen at the Magic Insitute of Tulimshar needs help.\"";
+ mes "[Gladys]";
+ mes "\"I hear the kitchen at the Magic Institute of Tulimshar is in need of some help.\"";
next;
- mes "\"The only thing bigger then a wizard's ego is their waistline. Hehe.\"";
+ mes "\"The only thing bigger then a wizard's ego is their waistline. Hehe.\" %%8";
goto L_Close;
L_Sarah:
- mes "[Gladys, Town Gossip]";
- mes "\"Do you believe what parents will let their kids do these days?! I heard about this girl in the south east side of town who does nothing but eat sweets all day! Honestly, what is the world coming to?\"";
+ mes "[Gladys]";
+ mes "\"Do you believe what parents will let their kids do these days?! I heard about this girl in the southeast side of town who does nothing but eat sweets all day! Honestly, what is this world coming to?\"";
goto L_Close;
L_Sandra:
- mes "[Gladys, Town Gossip]";
- mes "\"The students and wizards at the Magic Institute of Tulimshar are always looking for people to gather reagents for spells as they are far too busy studing.\"";
+ mes "[Gladys]";
+ mes "\"The students and wizards at the Magic Institute of Tulimshar are always looking for people to gather the reagents they need for spells as they are far too busy studying to gather the materials themselves.\"";
goto L_Close;
L_Desert:
- mes "[Gladys, Town Gossip]";
- mes "\"If you're still looking for adventure, I would suggest talking to some of the guards. I hear there is a monster threat outside the city walls!\"";
+ mes "[Gladys]";
+ mes "\"If you're still looking for adventure, I would suggest talking to some of the guards. I hear there's a sizable monster threat outside the city walls!\"";
goto L_Close;
L_Ferry:
- mes "[Gladys, Town Gossip]";
- mes "I heard that there is a ferry in the north of town that will take people to exotic new places!\"";
+ mes "[Gladys]";
+ mes "\"There's a ferry in the northern part of town that takes travelers to exotic new places!\"";
+ next;
+ mes "\"I haven't been on it myself, but I hear it travels all over the world!\"";
goto L_Close;
L_Close:
diff --git a/world/map/npc/001-1/stat_reset.txt b/world/map/npc/001-1/stat_reset.txt
index 1ad2bc4e..e8c61ca3 100644
--- a/world/map/npc/001-1/stat_reset.txt
+++ b/world/map/npc/001-1/stat_reset.txt
@@ -2,7 +2,7 @@
001-1,117,105,0|script|Malivox|103
{
- set @NpcName$, "Malivox";
+ set @npcname$, "Malivox";
callfunc "StatReset";
close;
}
diff --git a/world/map/npc/001-1/weellos.txt b/world/map/npc/001-1/weellos.txt
index ae5604f5..e49c6814 100644
--- a/world/map/npc/001-1/weellos.txt
+++ b/world/map/npc/001-1/weellos.txt
@@ -12,26 +12,24 @@
if (isin("001-1", 48, 20, 61, 28)) goto L_In;
mes "[Weellos]";
- mes "\"This is a very historic building. One of the oldest in the area.\"";
+ mes "\"This is a very historic building – in fact, it's one of the oldest in the area.\"";
next;
- mes "\"It's the current seat of the council of wizards.\"";
+ mes "\"It's also the current seat of both the Council of Wizards and the Magic Institute of Tulimshar.\"";
next;
- mes "\"It's also holds the Magic Institute of Tulimshar.\"";
- next;
- mes "\"Part of It's been turned into a museum as well\"";
+ mes "\"Due to its historical significance, part of it has been turned into a museum.\"";
goto L_BeforeClose;
// If the player is inside the fence with Weellos
L_In:
mes "[Weellos]";
- mes "\"What did you think of the historic building?\"";
+ mes "\"What did you think? Isn't the building intriguing?\"";
goto L_BeforeClose;
L_BeforeClose:
if (@kylian != 4)
goto L_Close;
next;
- mes "You wonder if Kylian would be interested to see this building.";
+ mes "You wonder if Kylian would be interested in seeing this historic landmark...";
goto L_Close;
L_Close:
diff --git a/world/map/npc/001-2/heathin.txt b/world/map/npc/001-2/heathin.txt
index 0bcb0294..05044812 100644
--- a/world/map/npc/001-2/heathin.txt
+++ b/world/map/npc/001-2/heathin.txt
@@ -312,10 +312,13 @@ L_Arrows_Trade_Yes:
delitem "Coal", @TARROW_REQ_COAL;
delitem "TerraniteOre", @TARROW_REQ_TERRA_ORE;
set Zeny, Zeny - @TARROW_REQ_GP;
- set @lucky, 5 * rand(readparam(bLuk));
+ set @lucky, 5 * rand(Luk);
+ set @lucky$, "";
getitem "TerraniteArrow", 1000 + @lucky;
mes "[Heathin]";
- mes "\"Here you go! You are lucky, I could forge "+@lucky+" more arrows than expected. Come back again if you want more Terranite Arrows.\"";
+ if(@lucky>0)
+ set @lucky$, " You are lucky, I could forge "+@lucky+" more arrows than expected.";
+ mes "Here you go!" + @lucky$ + " Come back again if you want more Terranite Arrows.\"";
close;
L_Arrows_Trade_Wait:
diff --git a/world/map/npc/001-2/sandra.txt b/world/map/npc/001-2/sandra.txt
index 3eceeff6..a94d10a3 100644
--- a/world/map/npc/001-2/sandra.txt
+++ b/world/map/npc/001-2/sandra.txt
@@ -2,9 +2,6 @@
001-2,98,88,0|script|Sandra|114
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@state >= 2) goto L_Done;
diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt
index be14c8bc..b6cdde5a 100644
--- a/world/map/npc/002-1/elanore.txt
+++ b/world/map/npc/002-1/elanore.txt
@@ -17,6 +17,24 @@ function|script|ElanoreFix
return;
}
+function|script|elanore_decrease_exp
+{
+ if (attachrid(@killerrid) == 0)
+ end;
+ set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
+ if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
+ set @Q_heal_exp, @Q_heal_exp - 8;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillWipe:
+ set @Q_heal_exp, 0;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillFinish:
+ set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
+ return;
+}
+
002-1,75,62,0|script|Elanore#_M|108
{
set @has_magic, getskilllv(SKILL_MAGIC);
@@ -155,22 +173,6 @@ L_Main:
"Goodbye!", L_bye;
goto L_Close;
-OnPCKillEvent:
- if (attachrid(@killerrid) == 0)
- end;
- set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
- if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
- set @Q_heal_exp, @Q_heal_exp - 8;
- goto L_OnPcKillFinish;
-
-L_OnPcKillWipe:
- set @Q_heal_exp, 0;
- goto L_OnPcKillFinish;
-
-L_OnPcKillFinish:
- set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
- goto L_Close;
-
L_Lifestones:
mes "[Elanore the Healer]";
mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\"";
diff --git a/world/map/npc/002-1/lieutenant_dausen.txt b/world/map/npc/002-1/lieutenant_dausen.txt
index 38ac6b08..2751d49a 100644
--- a/world/map/npc/002-1/lieutenant_dausen.txt
+++ b/world/map/npc/002-1/lieutenant_dausen.txt
@@ -3,9 +3,6 @@
002-1,63,67,0|script|Lieutenant Dausen|122
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 21) goto L_LD_Key;
diff --git a/world/map/npc/002-1/nickos.txt b/world/map/npc/002-1/nickos.txt
index 91abe6db..99f17b5c 100644
--- a/world/map/npc/002-1/nickos.txt
+++ b/world/map/npc/002-1/nickos.txt
@@ -3,9 +3,6 @@
002-1,46,108,0|script|Nickos|123
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 20) goto L_UGQ;
diff --git a/world/map/npc/002-1/sarah.txt b/world/map/npc/002-1/sarah.txt
index 83fc6558..3b7a7232 100644
--- a/world/map/npc/002-1/sarah.txt
+++ b/world/map/npc/002-1/sarah.txt
@@ -2,9 +2,6 @@
002-1,93,43,0|script|Sarah|106
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
if (@state >= 2) goto L_Done;
@@ -51,14 +48,15 @@ L_Progress:
mes "\"Whee!\"";
next;
mes "You brought me Cherry Cake! Here is your new hat, as promised.\"";
- emotion EMOTE_TONGUE;
getinventorylist;
if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany;
delitem "CherryCake", 1;
getitem "SerfHat", 1;
set @state, 2;
callsub S_Update_Var;
- goto L_Close;
+ close2;
+ emotion EMOTE_TONGUE, strcharinfo(0);
+ end;
L_NotEnough:
mes "[Sarah]";
@@ -68,8 +66,9 @@ L_NotEnough:
L_Done:
mes "[Sarah]";
mes "\"It was so tasty, I can't eat anything more... Thank you!\"";
- emotion EMOTE_TONGUE;
- goto L_Close;
+ close2;
+ emotion EMOTE_TONGUE, strcharinfo(0);
+ end;
L_Close:
set @TEMP, 0;
diff --git a/world/map/npc/002-1/soul-menhir.txt b/world/map/npc/002-1/soul-menhir.txt
index 3260e511..fa2a4508 100644
--- a/world/map/npc/002-1/soul-menhir.txt
+++ b/world/map/npc/002-1/soul-menhir.txt
@@ -2,7 +2,6 @@
002-1,58,60,0|script|Soul Menhir#tulimshar|345
{
- callfunc "ClearVariables";
set @map$, "001-1";
setarray @Xs, 57, 58, 59, 57, 59, 57, 59;
setarray @Ys, 59, 59, 59, 60, 60, 61, 61;
diff --git a/world/map/npc/002-1/stewen.txt b/world/map/npc/002-1/stewen.txt
index 4368f590..63808935 100644
--- a/world/map/npc/002-1/stewen.txt
+++ b/world/map/npc/002-1/stewen.txt
@@ -3,9 +3,6 @@
002-1,116,93,0|script|Stewen|123
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 4) goto L_TMW_Quest_Received;
diff --git a/world/map/npc/002-1/traveler.txt b/world/map/npc/002-1/traveler.txt
index 0645cce2..975786ae 100644
--- a/world/map/npc/002-1/traveler.txt
+++ b/world/map/npc/002-1/traveler.txt
@@ -4,7 +4,7 @@
002-1,60,41,0|script|Nina the Traveler|103
{
- set @NpcName$, "Nina";
+ set @npcname$, "Nina";
set @NpcTravelBit, $@tulimshar_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/002-2/bleacher.txt b/world/map/npc/002-2/bleacher.txt
index 2853bb73..3935fe24 100644
--- a/world/map/npc/002-2/bleacher.txt
+++ b/world/map/npc/002-2/bleacher.txt
@@ -94,7 +94,7 @@ L_MenuItems:
if (Zeny < 5000) goto L_no_money;
set @m, @menu - 2;
set @it$, $@DYE_colors$[@CANDIDE_color[@m]] + $@DYE_items$[@CANDIDE_items[@m]];
- if(getitemname(@it$) == "Unknown Item") mapexit;
+ if(getitemlink(@it$) == "Unknown Item") mapexit;
delitem @it$, 1;
delitem "PileOfAsh", 3;
set Zeny, Zeny - 5000;
@@ -127,6 +127,6 @@ L_Close:
mes "[Candide]";
mes "\"Come again.\"";
close2;
- emotion EMOTE_GRIN;
+ emotion EMOTE_GRIN, strcharinfo(0);
end;
}
diff --git a/world/map/npc/002-2/eurni.txt b/world/map/npc/002-2/eurni.txt
index 87df4dc2..f965b84b 100644
--- a/world/map/npc/002-2/eurni.txt
+++ b/world/map/npc/002-2/eurni.txt
@@ -17,9 +17,6 @@
mes "It'll cost ##B" + @SERVICES_ZENY + " GP##b.\"";
next;
- mes "[Server]";
- mes "Warning: All characters under this login will be changed. Once it's done, you will be kicked from the server. Don't panic; this is normal.";
- next;
menu
"Please do.", L_Change,
"Leave my family treasures alone!", L_Close;
@@ -28,7 +25,7 @@ L_Change:
if (Zeny < @SERVICES_ZENY)
goto L_NoMoney;
set Zeny, Zeny - @SERVICES_ZENY;
- changesex;
+ set Sex, !Sex;
close;
L_TooYoung:
diff --git a/world/map/npc/002-2/hetchel.txt b/world/map/npc/002-2/hetchel.txt
index 15fc61f9..f6910149 100644
--- a/world/map/npc/002-2/hetchel.txt
+++ b/world/map/npc/002-2/hetchel.txt
@@ -330,7 +330,7 @@ L_Next1:
mes "";
mes "\"Thank you, I hope the sheets will fit your needs.";
mes "Please greet Lora for me when you see her.\"";
- emotion EMOTE_HAPPY;
+ emotion EMOTE_HAPPY, strcharinfo(0);
goto L_Close;
L_sheet_missing_cocoons:
diff --git a/world/map/npc/002-2/kylian.txt b/world/map/npc/002-2/kylian.txt
index 346fcffa..c5ed0baf 100644
--- a/world/map/npc/002-2/kylian.txt
+++ b/world/map/npc/002-2/kylian.txt
@@ -26,11 +26,11 @@
// state 8: Kylian was in the casino and gives a desert hat as reward
// state 9: Shop approved, go talk Kylian's shopkeeper if you are looking for work.
// state 10: Meet Shop keeper
-// state 11: Start Time Trial
+// state 11: Start Time Trial
// state 12: Return
// state 13: Start Daily Timed
// state 14: Return
-// state 15: Completed
+// state 15: Completed
// Kylian_Timer is used to denote start time.
// temporary variables used to check if the player logged out or left the building in the meanwhile
@@ -82,8 +82,6 @@ OnInit:
set @fun_money, 50;
set @fun_exp, 20;
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
set @fieri, ((QUEST_SouthTulimshar & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
if (@state == 15) goto L_Done;
@@ -366,7 +364,6 @@ function|script|SetKylianQuest
function|script|KylianDebug
{
set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
- callfunc "ClearVarTMW_Quest";
set @fieri, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
set @run, ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT);
set @run_cnt, ((QUEST_NorthTulimshar & TWOBIT_9_MASK) >> TWOBIT_9_SHIFT);
diff --git a/world/map/npc/002-2/troupe_leader.txt b/world/map/npc/002-2/troupe_leader.txt
index de8517c5..79c85dc6 100644
--- a/world/map/npc/002-2/troupe_leader.txt
+++ b/world/map/npc/002-2/troupe_leader.txt
@@ -2,8 +2,6 @@
002-2,81,21,0|script|Troupe Leader|165
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 4) goto L_NohMask_Troupe;
diff --git a/world/map/npc/002-3/mining_camp_barrier.txt b/world/map/npc/002-3/mining_camp_barrier.txt
index 029722a1..a6550990 100644
--- a/world/map/npc/002-3/mining_camp_barrier.txt
+++ b/world/map/npc/002-3/mining_camp_barrier.txt
@@ -2,9 +2,6 @@
002-3,82,32,0|script|#Sandstorm_Mine_Barrier|45,0,0
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state >= 8) goto L_Barrier_Open;
diff --git a/world/map/npc/002-3/nathan.txt b/world/map/npc/002-3/nathan.txt
index 9661fc18..125c6a01 100644
--- a/world/map/npc/002-3/nathan.txt
+++ b/world/map/npc/002-3/nathan.txt
@@ -2,9 +2,6 @@
002-3,42,45,6|script|Nathan|109
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state >= 20) goto L_Nathan_Complete;
diff --git a/world/map/npc/002-3/traveler.txt b/world/map/npc/002-3/traveler.txt
index a1fd4f6f..48175be8 100644
--- a/world/map/npc/002-3/traveler.txt
+++ b/world/map/npc/002-3/traveler.txt
@@ -4,7 +4,7 @@
002-3,25,28,0|script|Jena the Traveler|103
{
- set @NpcName$, "Jena";
+ set @npcname$, "Jena";
set @NpcTravelBit, $@tul_mine_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/002-4/mine_triggerone.txt b/world/map/npc/002-4/mine_triggerone.txt
index 03cee2da..ef8a75cb 100644
--- a/world/map/npc/002-4/mine_triggerone.txt
+++ b/world/map/npc/002-4/mine_triggerone.txt
@@ -3,9 +3,6 @@
002-4,30,47,0|script|Button#mine-1|400,0,0
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 24) goto L_Trigger_Wrong_1;
diff --git a/world/map/npc/002-4/mine_triggerthree.txt b/world/map/npc/002-4/mine_triggerthree.txt
index fe9fe672..707329da 100644
--- a/world/map/npc/002-4/mine_triggerthree.txt
+++ b/world/map/npc/002-4/mine_triggerthree.txt
@@ -3,9 +3,6 @@
002-4,91,99,0|script|Button#mine-3|400,0,0
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 24) goto L_Trigger_Wrong_3;
diff --git a/world/map/npc/002-4/mine_triggertwo.txt b/world/map/npc/002-4/mine_triggertwo.txt
index ec181596..5ec5b659 100644
--- a/world/map/npc/002-4/mine_triggertwo.txt
+++ b/world/map/npc/002-4/mine_triggertwo.txt
@@ -5,9 +5,6 @@
002-4,100,37,0|script|Button#mine-2|400,0,0
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 24) goto L_Trigger_2;
diff --git a/world/map/npc/002-4/naem.txt b/world/map/npc/002-4/naem.txt
index 9c2c1f65..34e43b49 100644
--- a/world/map/npc/002-4/naem.txt
+++ b/world/map/npc/002-4/naem.txt
@@ -4,9 +4,6 @@
002-4,91,96,6|script|Naem|109
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (FLAGS & FLAG_GOT_NAEM_GLOVES) goto L_Naem_Complete;
diff --git a/world/map/npc/002-4/underground_palace_barrier.txt b/world/map/npc/002-4/underground_palace_barrier.txt
index 3ed1a0a9..6c9d096a 100644
--- a/world/map/npc/002-4/underground_palace_barrier.txt
+++ b/world/map/npc/002-4/underground_palace_barrier.txt
@@ -2,9 +2,6 @@
002-4,68,98,0|script|#UGP_Barrier|45,0,0
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state >= 25) goto L_Barrier_Open;
diff --git a/world/map/npc/002-5/chest.txt b/world/map/npc/002-5/chest.txt
index fe0c2448..2cdda691 100644
--- a/world/map/npc/002-5/chest.txt
+++ b/world/map/npc/002-5/chest.txt
@@ -2,9 +2,6 @@
002-5,93,37,0|script|Supply Chest|378
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state >= 26) goto L_Finished;
diff --git a/world/map/npc/002-5/sema.txt b/world/map/npc/002-5/sema.txt
index 57ac1790..c80e9660 100644
--- a/world/map/npc/002-5/sema.txt
+++ b/world/map/npc/002-5/sema.txt
@@ -2,9 +2,6 @@
002-5,43,91,6|script|Sema|340
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state >= 28) goto L_Sema_Done;
diff --git a/world/map/npc/004-5/chest.txt b/world/map/npc/004-5/chest.txt
index a54739fc..2b815aa3 100644
--- a/world/map/npc/004-5/chest.txt
+++ b/world/map/npc/004-5/chest.txt
@@ -1,8 +1,7 @@
004-5,89,67,0|script|Old Chest#crastur|111
{
- setarray @npc_loc, 89, 67, 1;
+ set @npc_distance, 1;
callfunc "PCtoNPCRange";
- if(@npc_check == 1) goto L_Closer;
set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
if(@spants_state > 5) goto L_Looted;
if(@spants_state != 5) goto L_Unknown;
@@ -22,10 +21,6 @@ L_Unknown:
mes "You have no idea how to open this chest.";
goto L_Close;
-L_Closer:
- mes "You need to move closer to open the chest.";
- goto L_Close;
-
L_Close:
close;
}
diff --git a/world/map/npc/006-1/miriam.txt b/world/map/npc/006-1/miriam.txt
index 6580664f..ca317181 100644
--- a/world/map/npc/006-1/miriam.txt
+++ b/world/map/npc/006-1/miriam.txt
@@ -20,10 +20,8 @@
006-1,115,111,0|script|Miriam|175
{
- setarray @npc_loc, 115, 111, 2;
+ set @npc_distance, 2;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
if (getskilllv(SKILL_SPEED)) goto L_fast;
if (getequipid(equip_torso) < 0) goto L_naked;
@@ -161,12 +159,11 @@ L_teach:
"I am already fast.", L_notfast;
L_Prepared:
- set @agi, readparam(bAgi);
- set @torso$, getitemname(getequipid(equip_torso));
+ set @torso$, getitemlink(getequipid(equip_torso));
set @weight, MaxWeight/Weight;
if (@weight < 3)
goto L_heavyweight;
- if (@agi < 60)
+ if (Agi < 60)
goto L_slow;
if (BaseLevel < 60)
goto L_lowlevel;
@@ -197,7 +194,7 @@ L_heavymetal:
L_slow:
mes "[Miriam]";
- mes "Oh, wait, wait... " +@agi+ " Agility? Are you serious? What do you do with all your Character points? Put them all to 'Strength'? Really... I don't even want to know... Come back here when you have a decent character points distribution!\"";
+ mes "Oh, wait, wait... " +Agi+ " Agility? Are you serious? What do you do with all your Character points? Put them all to 'Strength'? Really... I don't even want to know... Come back here when you have a decent character points distribution!\"";
close;
L_lowlevel:
@@ -216,7 +213,7 @@ L_offer:
L_TorsoNext:
mes "[Miriam]";
- mes "\"I see. I like the way you distributed your Character Points too... " +@agi+ " points to Agility! You really know how to prepare yourself for a good fight!\"";
+ mes "\"I see. I like the way you distributed your Character Points too... " +Agi+ " points to Agility! You really know how to prepare yourself for a good fight!\"";
next;
mes "\"Well... Even if you have a potential to be a good fighter, moving the way you do will not help. You need to be fast to avoid the monsters. \"";
next;
diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt
index 7b39dce7..905ffcb4 100644
--- a/world/map/npc/006-1/pachua.txt
+++ b/world/map/npc/006-1/pachua.txt
@@ -1,9 +1,6 @@
006-1,24,113,0|script|Pachua|143
{
- setarray @npc_loc, 24, 113, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
set @halloween_npc_id, $@halloween_npc_pachua;
callfunc "TrickOrTreat";
diff --git a/world/map/npc/006-1/traveler.txt b/world/map/npc/006-1/traveler.txt
index f87cf083..7c84e040 100644
--- a/world/map/npc/006-1/traveler.txt
+++ b/world/map/npc/006-1/traveler.txt
@@ -4,7 +4,7 @@
006-1,25,95,0|script|Rhutan the Traveler|103
{
- set @NpcName$, "Rhutan";
+ set @npcname$, "Rhutan";
set @NpcTravelBit, $@pachua_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/007-1/voltain.txt b/world/map/npc/007-1/voltain.txt
index 9c51fe3f..0366ea5c 100644
--- a/world/map/npc/007-1/voltain.txt
+++ b/world/map/npc/007-1/voltain.txt
@@ -357,7 +357,7 @@ L_Next14:
set Zeny, Zeny + @CHOCOLATECAKE_REWARD_GOLD;
set $@VOLTAIN_state, 0;
mes "\"I love chocolate cakes. I wonder, if I can use my ven- \"";
- emotion EMOTE_EVIL;
+ emotion EMOTE_EVIL, strcharinfo(0);
goto L_Close;
L_NOHELP:
diff --git a/world/map/npc/008-1/diryn.txt b/world/map/npc/008-1/diryn.txt
index dae18c13..6570f1d8 100644
--- a/world/map/npc/008-1/diryn.txt
+++ b/world/map/npc/008-1/diryn.txt
@@ -4,7 +4,7 @@
008-1,81,82,0|script|Diryn the Traveler|103
{
- set @NpcName$, "Diryn";
+ set @npcname$, "Diryn";
set @NpcTravelBit, $@hurnscald_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/008-1/hinnak.txt b/world/map/npc/008-1/hinnak.txt
index 0213c3cc..c2360141 100644
--- a/world/map/npc/008-1/hinnak.txt
+++ b/world/map/npc/008-1/hinnak.txt
@@ -7,8 +7,6 @@
008-1,101,30,0|script|Hinnak|142
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 10) goto L_NohMask;
diff --git a/world/map/npc/008-1/mikhail.txt b/world/map/npc/008-1/mikhail.txt
index bf804796..98a58d12 100644
--- a/world/map/npc/008-1/mikhail.txt
+++ b/world/map/npc/008-1/mikhail.txt
@@ -2,9 +2,6 @@
008-1,135,25,0|script|Mikhail|120
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state >= 6) goto L_Done;
diff --git a/world/map/npc/009-1/jack.txt b/world/map/npc/009-1/jack.txt
index 03e38c31..05c9f8c5 100644
--- a/world/map/npc/009-1/jack.txt
+++ b/world/map/npc/009-1/jack.txt
@@ -16,8 +16,6 @@
// Lumberjack
009-1,40,45,0|script|Jack|141
{
- callfunc "ClearVariables";
-
set @RAWLOGS_AMOUNT, 40;
set @SHIELD_COST, 5000;
set @QUEST_SHIELD_EXP, 2500;
diff --git a/world/map/npc/009-1/milly.txt b/world/map/npc/009-1/milly.txt
index 3e389d27..f1408619 100644
--- a/world/map/npc/009-1/milly.txt
+++ b/world/map/npc/009-1/milly.txt
@@ -8,8 +8,6 @@
009-1,81,41,0|script|Milly|114
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @got_boneknife, ((QUEST_Forestbow_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) >= 4;
diff --git a/world/map/npc/009-1/old_man.txt b/world/map/npc/009-1/old_man.txt
index ca3999ee..4abf906e 100644
--- a/world/map/npc/009-1/old_man.txt
+++ b/world/map/npc/009-1/old_man.txt
@@ -2,8 +2,6 @@
009-1,85,51,0|script|Old Man|159
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
mes "[Old Man]";
diff --git a/world/map/npc/009-1/old_woman.txt b/world/map/npc/009-1/old_woman.txt
index ac026357..d3b26e7e 100644
--- a/world/map/npc/009-1/old_woman.txt
+++ b/world/map/npc/009-1/old_woman.txt
@@ -2,8 +2,6 @@
009-1,29,43,0|script|Old Woman|154
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (BaseLevel < 40) goto L_Lower;
diff --git a/world/map/npc/009-1/sabine.txt b/world/map/npc/009-1/sabine.txt
index 348e28c4..2f960f75 100644
--- a/world/map/npc/009-1/sabine.txt
+++ b/world/map/npc/009-1/sabine.txt
@@ -2,8 +2,6 @@
009-1,88,27,0|script|Sabine|106
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
mes "[Sabine]";
diff --git a/world/map/npc/009-1/soul-menhir.txt b/world/map/npc/009-1/soul-menhir.txt
index 855eddf1..3b8c5cee 100644
--- a/world/map/npc/009-1/soul-menhir.txt
+++ b/world/map/npc/009-1/soul-menhir.txt
@@ -2,7 +2,6 @@
009-1,53,40,0|script|Soul Menhir#hurnscald|344
{
- callfunc "ClearVariables";
set @map$, "009-1";
setarray @Xs, 52, 53, 54, 52, 54, 52, 54;
setarray @Ys, 39, 39, 39, 40, 40, 41, 41;
diff --git a/world/map/npc/009-2/airlia.txt b/world/map/npc/009-2/airlia.txt
index 62c76e38..6f4be2bd 100644
--- a/world/map/npc/009-2/airlia.txt
+++ b/world/map/npc/009-2/airlia.txt
@@ -163,7 +163,7 @@ L_Next2:
L_intro_proof:
mes "[Airlia]";
- mes "\"Let's say " + @FETCH_AMOUNT_INITIAL + " " + getitemname(@FETCH_LABEL_INITIAL$) + "s. You don't know how much this means to me, thank you.\"";
+ mes "\"Let's say " + @FETCH_AMOUNT_INITIAL + " " + getitemlink(@FETCH_LABEL_INITIAL$) + "s. You don't know how much this means to me, thank you.\"";
set QUEST_Airlia, @Q_STATUS_HELP_AIRLIA;
close;
@@ -180,12 +180,12 @@ L_Fetch:
if (QUEST_Graveyard_Caretaker < @Q_STATUS_HAS_NEW_LETTER)
menu
"You are welcome.", L_Close,
- "I have collected the " + @FETCH_AMOUNT_INITIAL + " " + getitemname(@FETCH_LABEL_INITIAL$) + "s.", L_Fetch_initial_reward;
+ "I have collected the " + @FETCH_AMOUNT_INITIAL + " " + getitemlink(@FETCH_LABEL_INITIAL$) + "s.", L_Fetch_initial_reward;
if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NEW_LETTER)
menu
"You are welcome.", L_Close,
"I have another letter from your father.", L_later_rewards,
- "I have collected the " + @FETCH_AMOUNT_INITIAL + " " + getitemname(@FETCH_LABEL_INITIAL$) + "s.", L_Fetch_initial_reward;
+ "I have collected the " + @FETCH_AMOUNT_INITIAL + " " + getitemlink(@FETCH_LABEL_INITIAL$) + "s.", L_Fetch_initial_reward;
goto L_Close;
L_Fetch_initial_reward:
@@ -233,12 +233,12 @@ L_Rewarded:
if (QUEST_Graveyard_Caretaker < @Q_STATUS_HAS_NEW_LETTER)
menu
"You are welcome.", L_Close,
- "I have collected the " + @FETCH_AMOUNT + " " + getitemname(@FETCH_LABEL$) + "s.", L_Fetch_later_rewards;
+ "I have collected the " + @FETCH_AMOUNT + " " + getitemlink(@FETCH_LABEL$) + "s.", L_Fetch_later_rewards;
if (QUEST_Graveyard_Caretaker == @Q_STATUS_HAS_NEW_LETTER)
menu
"You are welcome.", L_Close,
"I have another letter from your father.", L_later_rewards,
- "I have collected the " + @FETCH_AMOUNT + " " + getitemname(@FETCH_LABEL$) + "s.", L_Fetch_later_rewards;
+ "I have collected the " + @FETCH_AMOUNT + " " + getitemlink(@FETCH_LABEL$) + "s.", L_Fetch_later_rewards;
goto L_Close;
L_Close:
diff --git a/world/map/npc/009-2/alan.txt b/world/map/npc/009-2/alan.txt
index 412b5823..6e0e6f21 100644
--- a/world/map/npc/009-2/alan.txt
+++ b/world/map/npc/009-2/alan.txt
@@ -10,8 +10,6 @@
// Archer Shop Master
009-2,99,23,0|script|Alan|125
{
- callfunc "ClearVariables";
-
set @Q_MASK, NIBBLE_0_MASK;
set @Q_SHIFT, NIBBLE_0_SHIFT;
diff --git a/world/map/npc/009-2/bernard.txt b/world/map/npc/009-2/bernard.txt
index f0c03fbc..1d6b4229 100644
--- a/world/map/npc/009-2/bernard.txt
+++ b/world/map/npc/009-2/bernard.txt
@@ -2,9 +2,6 @@
009-2,67,79,0|script|Bernard|117
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state >= 6) goto L_Done3;
diff --git a/world/map/npc/009-2/doctor.txt b/world/map/npc/009-2/doctor.txt
index 9137d8d4..f44cda64 100644
--- a/world/map/npc/009-2/doctor.txt
+++ b/world/map/npc/009-2/doctor.txt
@@ -2,8 +2,6 @@
009-2,148,25,0|script|Doctor|107
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (getequipid(equip_head) == 616) goto L_Axe;
diff --git a/world/map/npc/009-2/inspector.txt b/world/map/npc/009-2/inspector.txt
index 966fe45e..d61fc708 100644
--- a/world/map/npc/009-2/inspector.txt
+++ b/world/map/npc/009-2/inspector.txt
@@ -2,8 +2,6 @@
009-2,24,99,0|script|Inspector#Hurnscald|150
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 0 && BaseLevel >= 30) goto L_Start;
diff --git a/world/map/npc/009-2/kfahr.txt b/world/map/npc/009-2/kfahr.txt
index d5da641a..8b6cb37d 100644
--- a/world/map/npc/009-2/kfahr.txt
+++ b/world/map/npc/009-2/kfahr.txt
@@ -920,9 +920,9 @@ L_gs_wrestle:
set @KFAHR_AGI, 60 - @beer_count * 5;
set @kfahr_stamina, 120;
- set @PC_STR, readparam(bStr);
- set @PC_AGI, readparam(bAgi);
- set @PC_MAX_STAMINA, readparam(bVit) + 20;
+ set @PC_STR, Str;
+ set @PC_AGI, Agi;
+ set @PC_MAX_STAMINA, Vit + 20;
set @pc_stamina, @PC_MAX_STAMINA;
setarray @positions$,
diff --git a/world/map/npc/009-2/lena.txt b/world/map/npc/009-2/lena.txt
index e151736b..6f22030a 100644
--- a/world/map/npc/009-2/lena.txt
+++ b/world/map/npc/009-2/lena.txt
@@ -3,9 +3,6 @@
009-2,146,43,0|script|Lena|182
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state >= 6) goto L_Lena_Done;
diff --git a/world/map/npc/009-2/nurse.txt b/world/map/npc/009-2/nurse.txt
index fa1ee5d2..8a5b3862 100644
--- a/world/map/npc/009-2/nurse.txt
+++ b/world/map/npc/009-2/nurse.txt
@@ -24,7 +24,6 @@
//######################################################################################
009-2,147,65,0|script|Nurse|119
{
- callfunc "ClearVariables";
set @halloween_npc_id, $@halloween_npc_nurse;
callfunc "TrickOrTreat";
diff --git a/world/map/npc/009-2/richard.txt b/world/map/npc/009-2/richard.txt
index b39a7969..11c180d4 100644
--- a/world/map/npc/009-2/richard.txt
+++ b/world/map/npc/009-2/richard.txt
@@ -2,7 +2,6 @@
009-2,20,99,0|script|Richard|161
{
- callfunc "ClearVariables";
set @npcname$, "Richard";
callfunc "Banker";
close;
diff --git a/world/map/npc/009-2/selim.txt b/world/map/npc/009-2/selim.txt
index 80abfdcc..474dec3c 100644
--- a/world/map/npc/009-2/selim.txt
+++ b/world/map/npc/009-2/selim.txt
@@ -140,7 +140,7 @@ L_explain_dye:
goto L_Close;
L_finish:
- if(getitemname($@DYE_colors$[@colour] + @item_del$) == "Unknown Item") mapexit;
+ if(getitemlink($@DYE_colors$[@colour] + @item_del$) == "Unknown Item") mapexit;
if(countitem(@item_del$) < 1) goto L_havenone;
delitem @item$, 1;
delitem @item_del$, 1;
@@ -159,6 +159,6 @@ L_havenone:
L_Close:
mes "\"Farewell and good luck in your journeys!\"";
close2;
- emotion EMOTE_WINK;
+ emotion EMOTE_WINK, strcharinfo(0);
end;
}
diff --git a/world/map/npc/009-2/wyara.txt b/world/map/npc/009-2/wyara.txt
index 3b14a178..17f6bc61 100644
--- a/world/map/npc/009-2/wyara.txt
+++ b/world/map/npc/009-2/wyara.txt
@@ -63,7 +63,7 @@ L_Shop:
close;
L_StatReset:
- set @NpcName$, "Wyara";
+ set @npcname$, "Wyara";
callfunc "StatReset";
goto L_Close;
diff --git a/world/map/npc/009-7/core.txt b/world/map/npc/009-7/core.txt
index ccbec25a..7ee652d8 100644
--- a/world/map/npc/009-7/core.txt
+++ b/world/map/npc/009-7/core.txt
@@ -460,3 +460,36 @@ function|script|fightclub_exit
if(@Duel_HasPendingRequest) message strcharinfo(0), "You have received a new duel request.";
return;
}
+
+
+
+// ** called on OnPCKilledEvent
+function|script|fightclub_event_killed
+{
+ set @duel_killer, 0;
+ if(@Duel_Fighter != 1) goto L_End;
+ if(getmap() != "009-7") goto L_End;
+ set $@duel_loser, getcharid(3); // grab the rid of the victim
+ set $@duel_winner, @killerrid; // grab the rid of the killer
+ set @killerrid, 0; // reset killerid
+ callfunc "fightclub_death";
+ goto L_End;
+L_End:
+ if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel;
+ return;
+}
+
+// ** called on OnPCDieEvent
+function|script|fightclub_event_die
+{
+ set @duel_killer, 0;
+ if(@Duel_Fighter != 1) goto L_End;
+ if(getmap() != "009-7") goto L_End;
+ set @killerrid, 0; // since the player was not murdered, the killerrid is 0
+ set $@duel_loser, getcharid(3); // grab the rid of the victim
+ callfunc "fightclub_death";
+ goto L_End;
+L_End:
+ if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel;
+ return;
+}
diff --git a/world/map/npc/009-7/debug.txt b/world/map/npc/009-7/debug.txt
index cd75a342..94735b3e 100644
--- a/world/map/npc/009-7/debug.txt
+++ b/world/map/npc/009-7/debug.txt
@@ -34,19 +34,9 @@ L_Menu:
"edit|Set $Duel_LastDuel", L_LastDuel,
"edit|Set pvp channel", L_Channel,
"toggle|Toggle @Duel_Fighter", L_DuelFighter,
- "toggle|Toggle killer state", L_Killer,
- "toggle|Toggle killable state", L_Killable,
"restart|Restart fightclub.", L_Restart,
"quit|Nevermind.", L_End;
-L_Killer:
- gmcommand "@killer";
- goto L_Menu;
-
-L_Killable:
- gmcommand "@killable";
- goto L_Menu;
-
L_DuelEnabled:
if(@due < 1) goto L_DuelEnabled2;
set $SANGUINE, $SANGUINE | $@SV_FCDBit;
diff --git a/world/map/npc/011-6/bryant.txt b/world/map/npc/011-6/bryant.txt
index fae31706..9969b767 100644
--- a/world/map/npc/011-6/bryant.txt
+++ b/world/map/npc/011-6/bryant.txt
@@ -3,9 +3,6 @@
011-6,27,200,0|script|Bryant|126
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state >= 5) goto L_Bryant_Quiet;
diff --git a/world/map/npc/011-6/crastur.txt b/world/map/npc/011-6/crastur.txt
index 679a2c9d..bef9f0a7 100644
--- a/world/map/npc/011-6/crastur.txt
+++ b/world/map/npc/011-6/crastur.txt
@@ -16,7 +16,7 @@ L_Ask:
mes "[Crastur]";
mes "";
mes "\"Just look who arrived here\"";
- emotion EMOTE_EVIL;
+ emotion EMOTE_EVIL, strcharinfo(0);
next;
mes "[Crastur]";
mes "";
@@ -128,7 +128,7 @@ L_Wrong_Item:
next;
mes "[Crastur]";
mes "THIS IS NOT FROM THE PIRATES FROM TULIMSHAR, it is a cheap scam.";
- emotion EMOTE_PERTURBED;
+ emotion EMOTE_PERTURBED, strcharinfo(0);
mes "As far as you can tell through his mask he seems very mad";
goto L_Insult;
@@ -150,7 +150,7 @@ L_Regular:
"\"Ugh, no. I have to leave now. Bye.\"", L_Close;
L_Insult:
- mes "Die " + strcharinfo(0) + "!";
+ npctalk "Crastur : Die " + strcharinfo(0) + "!";
heal -10000, 0;
emotion EMOTE_VICIOUS;
mes "[Crastur]";
@@ -188,7 +188,7 @@ L_Personal:
mes "\"Today you have accomplished tasks that are worth " + DailyQuestPoints + " Hours in the Northern Mines\"";
next;
if (BOSS_POINTS < 1000) goto L_Worm;
- emotion EMOTE_DEAD;
+ emotion EMOTE_DEAD, strcharinfo(0);
mes "[Crastur]";
mes "";
mes "\"Also you seem to be quite a hero, it appears you have a record in the Almanach\"";
@@ -198,13 +198,13 @@ L_Personal:
goto L_Close;
L_Worm:
- emotion EMOTE_SUSPICIOUS;
+ emotion EMOTE_SUSPICIOUS, strcharinfo(0);
mes "[Crastur]";
mes "\"Other than that you have not done anything notable for the mana world.\"";
goto L_Close;
L_Hurnscald:
- emotion EMOTE_FACEPALM;
+ emotion EMOTE_FACEPALM, strcharinfo(0);
mes "Crastur makes a barking sound that probably was meant as a laugh.";
mes "[Crastur]";
mes "";
diff --git a/world/map/npc/012-1/injured-mouboo.txt b/world/map/npc/012-1/injured-mouboo.txt
index 09e27c80..63eb2996 100644
--- a/world/map/npc/012-1/injured-mouboo.txt
+++ b/world/map/npc/012-1/injured-mouboo.txt
@@ -113,7 +113,7 @@ L_nloop:
if (countitem(@k$) == 0)
goto L_nloop_skip;
- set @name$, getitemname(@k$);
+ set @name$, getitemlink(@k$);
set @menuItems$[@ct], @name$;
set @menuNames$[@ct], @k$;
set @choice_eat[@ct], @itemeat[@n];
@@ -156,7 +156,7 @@ L_MenuItems:
L_consume:
mes "[Injured Mouboo]";
- mes "The mouboo " + @verb$ + " your " + getitemname(@choice$) + ".";
+ mes "The mouboo " + @verb$ + " your " + getitemlink(@choice$) + ".";
delitem @choice$, 1;
next;
if (@choice$ == "LargeHealingPotion")
diff --git a/world/map/npc/012-3/traveler.txt b/world/map/npc/012-3/traveler.txt
index aa173080..b3c158ea 100644
--- a/world/map/npc/012-3/traveler.txt
+++ b/world/map/npc/012-3/traveler.txt
@@ -4,7 +4,7 @@
012-3,439,62,0|script|Meridith the Traveler|103
{
- set @NpcName$, "Meridith";
+ set @npcname$, "Meridith";
set @NpcTravelBit, $@terranite_cave_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/013-1/traveler.txt b/world/map/npc/013-1/traveler.txt
index efa6c53a..7439b8d8 100644
--- a/world/map/npc/013-1/traveler.txt
+++ b/world/map/npc/013-1/traveler.txt
@@ -1,6 +1,6 @@
013-1,120,90,0|script|Faris the Traveler|103
{
- set @NpcName$, "Faris";
+ set @npcname$, "Faris";
set @NpcTravelBit, $@magic_house_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/013-3/barrier.txt b/world/map/npc/013-3/barrier.txt
index 442870d9..0e00a40c 100644
--- a/world/map/npc/013-3/barrier.txt
+++ b/world/map/npc/013-3/barrier.txt
@@ -2,8 +2,6 @@
013-3,71,21,0|script|#DemonMineBarrier1#_M|45,1,1
{
- callfunc "ClearVariables";
-
set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
if (@state >= 2) goto L_End;
diff --git a/world/map/npc/013-3/mask_chest.txt b/world/map/npc/013-3/mask_chest.txt
index 1b62e66c..204eec4c 100644
--- a/world/map/npc/013-3/mask_chest.txt
+++ b/world/map/npc/013-3/mask_chest.txt
@@ -2,8 +2,6 @@
013-3,28,27,0|script|Chest#DemonMask|111
{
- callfunc "ClearVariables";
-
set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
if (@state < 2) goto L_This_shouldn_t_happen;
diff --git a/world/map/npc/013-3/sword_chest.txt b/world/map/npc/013-3/sword_chest.txt
index de06261d..503dda7e 100644
--- a/world/map/npc/013-3/sword_chest.txt
+++ b/world/map/npc/013-3/sword_chest.txt
@@ -2,7 +2,6 @@
013-3,177,22,0|script|Chest#sword|111
{
- callfunc "ClearVariables";
if (FLAGS & FLAG_HURNSMINE_CHEST) goto L_Finished;
mes "[Chest]";
diff --git a/world/map/npc/016-1/gwendolyn.txt b/world/map/npc/016-1/gwendolyn.txt
index f95336e9..8276de08 100644
--- a/world/map/npc/016-1/gwendolyn.txt
+++ b/world/map/npc/016-1/gwendolyn.txt
@@ -442,7 +442,7 @@ L_target_hit:
next;
mes "\"Let me inspect it...\" She walks to the target.";
next;
- if( rand(500) > (2*readparam(bDex) + readparam(bAgi)))
+ if( rand(500) > (2*Dex + Agi))
goto L_target_nohit;
set @Q_hawkseye, 6;
callsub S_Update_Var;
diff --git a/world/map/npc/018-2/angus.txt b/world/map/npc/018-2/angus.txt
index 5b7dda85..e49d91ae 100644
--- a/world/map/npc/018-2/angus.txt
+++ b/world/map/npc/018-2/angus.txt
@@ -5,8 +5,6 @@
set @honorific$, "lad";
if (Sex == 0) set @honorific$, "lass";
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 10) goto L_NohMask;
diff --git a/world/map/npc/018-2/books.txt b/world/map/npc/018-2/books.txt
index cd8148c0..24624762 100644
--- a/world/map/npc/018-2/books.txt
+++ b/world/map/npc/018-2/books.txt
@@ -2,8 +2,6 @@
018-2,112,19,0|script|#Bookcase38|400,0,1
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
if (@inspector == 11) goto L_NohMask;
diff --git a/world/map/npc/018-2/caul.txt b/world/map/npc/018-2/caul.txt
index 5d53ba48..4709cfc9 100644
--- a/world/map/npc/018-2/caul.txt
+++ b/world/map/npc/018-2/caul.txt
@@ -9,8 +9,6 @@
018-2,37,22,0|script|Caul|107
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @SETZER_INITIAL, 0;
@@ -140,7 +138,7 @@ L_brew:
goto L_CraftLoop;
L_CraftLoop:
- set @throw, rand(readparam(bInt));
+ set @throw, rand(Int);
set @result, 1;
if (@throw >= 5) set @result, 2;
if (@throw >= 15) set @result, 3;
@@ -428,7 +426,7 @@ L_mo_random_1: // mode 1: remove colour
return;
L_mo_pc_bad:
- if (rand(readparam(bInt) + 100) > 60)
+ if (rand(Int + 100) > 60)
goto L_mo_pc_bad_ok;
if (@bubble_mode)
mes "As your leaf dissolves, the intensity of the bubbling increases.";
@@ -448,7 +446,7 @@ L_mo_pc_bad_ok:
L_mo_auto_bad:
if (rand(3) == 0)
goto L_Return;
- if (rand(readparam(bInt) + 100) > 70)
+ if (rand(Int + 100) > 70)
goto L_Return;
mes "The brew begins to bubble more violently.";
set @bubble_mode, @bubble_mode + 1;
@@ -461,11 +459,11 @@ L_mo_auto_bad:
L_mo_explode:
mes "[Exploding monster oil]";
mes "Your brew explodes!";
- if (rand(readparam(bAgi)) > 40)
+ if (rand(Agi) > 40)
goto L_mo_explode_dodge;
mes "The burst of boiling monster brew hits you.";
next;
- heal (15 * rand(readparam(bVit))) - 1500, 0, 1;
+ heal (15 * rand(Vit)) - 1500, 0, 1;
close;
L_mo_explode_dodge:
@@ -715,7 +713,7 @@ L_mopox_failed_hard:
mes "Suddenly, the thick mass bends outwards, a huge bubble bursting open right in your face!";
next;
- if (rand(readparam(bVit)) < 40)
+ if (rand(Vit) < 40)
sc_start sc_poison, 1, 20;
mes "[Brewing Mopox Cure]";
diff --git a/world/map/npc/018-2/miners.txt b/world/map/npc/018-2/miners.txt
index e29f15f6..29192eec 100644
--- a/world/map/npc/018-2/miners.txt
+++ b/world/map/npc/018-2/miners.txt
@@ -3,8 +3,6 @@
018-2,85,23,0|script|Malek|109
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @MIN_GEM_AMOUNT, 7;
diff --git a/world/map/npc/018-2/receptionist.txt b/world/map/npc/018-2/receptionist.txt
index 50143f2c..efac07d9 100644
--- a/world/map/npc/018-2/receptionist.txt
+++ b/world/map/npc/018-2/receptionist.txt
@@ -2,8 +2,6 @@
018-2,50,24,0|script|Receptionist#mine|108
{
- callfunc "ClearVariables";
-
set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
mes "[Receptionist]";
diff --git a/world/map/npc/018-3/bookcase.txt b/world/map/npc/018-3/bookcase.txt
index a2cf0431..8c5d587f 100644
--- a/world/map/npc/018-3/bookcase.txt
+++ b/world/map/npc/018-3/bookcase.txt
@@ -2,8 +2,6 @@
018-3,75,123,0|script|#DemonMineBookcase1|400
{
- callfunc "ClearVariables";
-
set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
if (@state == 0) goto L_Search;
diff --git a/world/map/npc/018-3/evil-obelisk.txt b/world/map/npc/018-3/evil-obelisk.txt
index ac316fd5..4ecc00b3 100644
--- a/world/map/npc/018-3/evil-obelisk.txt
+++ b/world/map/npc/018-3/evil-obelisk.txt
@@ -2,7 +2,6 @@
018-3,67,28,0|script|Evil Obelisk|185
{
- callfunc "ClearVariables";
set @map$, "018-3";
set @x0, 56;
set @y0, 22;
diff --git a/world/map/npc/019-1/santa_helper.txt b/world/map/npc/019-1/santa_helper.txt
index d5b5d3bc..9d8a21b9 100644
--- a/world/map/npc/019-1/santa_helper.txt
+++ b/world/map/npc/019-1/santa_helper.txt
@@ -4,7 +4,6 @@
019-1,74,75,0|script|Santa's Helper|105
{
- callfunc "ClearVariables";
callfunc "XmasStates";
if (($@xmas_time) && (@xmas_sh_done)) goto L_Done;
diff --git a/world/map/npc/019-1/snowman.txt b/world/map/npc/019-1/snowman.txt
index eb72c74a..893ddce4 100644
--- a/world/map/npc/019-1/snowman.txt
+++ b/world/map/npc/019-1/snowman.txt
@@ -3,7 +3,6 @@
019-1,77,44,0|script|Snowman|129
{
- callfunc "ClearVariables";
if (FLAGS & FLAG_SNOWMAN) goto L_Done;
if (gettime(6) == 12 || gettime(6) == 1 || gettime(6) == 2) goto L_Quest;
diff --git a/world/map/npc/020-1/soul-menhir.txt b/world/map/npc/020-1/soul-menhir.txt
index 6066c2ea..c8f7740a 100644
--- a/world/map/npc/020-1/soul-menhir.txt
+++ b/world/map/npc/020-1/soul-menhir.txt
@@ -2,7 +2,6 @@
020-1,63,89,0|script|Soul Menhir#nivalis|346
{
- callfunc "ClearVariables";
set @map$, "020-1";
setarray @Xs, 62, 63, 64, 62, 64, 62, 64;
setarray @Ys, 88, 88, 88, 89, 89, 90, 90;
diff --git a/world/map/npc/020-1/traveler.txt b/world/map/npc/020-1/traveler.txt
index d873a57f..421ed0e7 100644
--- a/world/map/npc/020-1/traveler.txt
+++ b/world/map/npc/020-1/traveler.txt
@@ -1,6 +1,6 @@
020-1,57,123,0|script|Knox the Traveler|103
{
- set @NpcName$, "Knox";
+ set @npcname$, "Knox";
set @NpcTravelBit, $@nivalis_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/020-2/banker.txt b/world/map/npc/020-2/banker.txt
index 3359501b..edf1c26b 100644
--- a/world/map/npc/020-2/banker.txt
+++ b/world/map/npc/020-2/banker.txt
@@ -1,6 +1,5 @@
020-2,122,64,0|script|Ben|193
{
- callfunc "ClearVariables";
set @npcname$, "Ben";
callfunc "Banker";
close;
diff --git a/world/map/npc/027-1/traveler.txt b/world/map/npc/027-1/traveler.txt
index ca8d8f47..0c8bb753 100644
--- a/world/map/npc/027-1/traveler.txt
+++ b/world/map/npc/027-1/traveler.txt
@@ -4,7 +4,7 @@
027-1,83,84,0|script|Styx the Traveler|103
{
- set @NpcName$, "Styx";
+ set @npcname$, "Styx";
set @NpcTravelBit, $@graveyard_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/027-2/gy_inn_shops.txt b/world/map/npc/027-2/gy_inn_shops.txt
index 8808755d..20f03d3a 100644
--- a/world/map/npc/027-2/gy_inn_shops.txt
+++ b/world/map/npc/027-2/gy_inn_shops.txt
@@ -40,7 +40,6 @@
// Bank and Storage
027-2,88,22,0|script|J.P. Morbid|321
{
- callfunc "ClearVariables";
set @npcname$, "J.P. Morbid";
callfunc "Banker";
close;
diff --git a/world/map/npc/029-1/aahna.txt b/world/map/npc/029-1/aahna.txt
index e9da0d20..92f7ff6b 100644
--- a/world/map/npc/029-1/aahna.txt
+++ b/world/map/npc/029-1/aahna.txt
@@ -3,10 +3,8 @@
// Npc
029-1,71,52,0|script|Aahna|404
{
- setarray @npc_loc, 71, 52, 3;
+ set @npc_distance, 3;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Range;
goto L_Meet;
L_Meet:
@@ -14,10 +12,6 @@ L_Meet:
mes "\"Hello, What a lovely day for a stroll.\"";
goto L_Close;
-L_Range:
- message strcharinfo(0), "Whats that? Come closer I can't hear you.";
- goto L_Close;
-
L_Close:
close;
}
diff --git a/world/map/npc/029-1/hasan.txt b/world/map/npc/029-1/hasan.txt
index a5d3894b..8d35da8b 100644
--- a/world/map/npc/029-1/hasan.txt
+++ b/world/map/npc/029-1/hasan.txt
@@ -8,11 +8,8 @@
029-1,35,33,0|script|Scared Man|160
{
- setarray @npc_loc, 35, 33, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_End;
- if (@tutorial >= 13)
+ if (QL_BEGIN >= 13)
goto L_TutDone;
message strcharinfo(0), "He looks too afraid to say anything.";
goto L_End;
@@ -26,23 +23,19 @@ L_End:
}
029-1,33,33,0|script|Hasan|189,3,3
{
- setarray @npc_loc, 33, 33, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
goto L_Main;
L_Main:
- callfunc "TutorialState";
if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)))
goto L_Afraid;
- if (@tutorial == 14)
+ if (QL_BEGIN == 14)
goto L_TutDone;
- if (@tutorial == 13)
+ if (QL_BEGIN == 13)
goto L_Thank;
- if (@tutorial == 12)
+ if (QL_BEGIN == 12)
goto L_Trick;
- if ((@tutorial == 9) || (@tutorial == 10) || (@tutorial == 11))
+ if ((QL_BEGIN == 9) || (QL_BEGIN == 10) || (QL_BEGIN == 11))
goto L_FightAgain;
mes "You over hear some people nearby.";
@@ -60,8 +53,7 @@ L_Main:
mes "[Scared Man]";
mes "\"No, please don't. *sob*\"";
mes "Sounds like this person is in trouble.\"";
- set @tutorial_tmp, 9;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 9;
mes "[Unfriendly Guy]";
mes "\"What are you looking at?\"";
menu
@@ -112,8 +104,7 @@ L_Thank:
mes "\"Let me tell you something, I will no longer bully people.";
mes "And you can have my Sharp Knife.\"";
getitem "SharpKnife", 1;
- set @tutorial_tmp, 14;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 14;
mes "\"You want to go to Hurnscald, right? Shall I tell you how to get there?\"";
menu
"Sure, thanks.",L_HasanThanks,
@@ -152,7 +143,7 @@ L_Close:
close;
OnTouch:
- if (@tutorial >= 13)
+ if (QL_BEGIN >= 13)
end;
goto L_Main;
}
@@ -187,10 +178,9 @@ OnTimer5000:
OnScorpionDeath:
if (getcharid(3) != $@ScorpionFighter)
goto L_SummonAgain;
- if (@tutorial != 12)
+ if (QL_BEGIN != 12)
goto L_Clean;
- set @tutorial_tmp, 13;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 13;
message strcharinfo(0), "You saved Hasan.";
goto L_Clean;
diff --git a/world/map/npc/029-1/hideandseek.txt b/world/map/npc/029-1/hideandseek.txt
index 51280978..a8cc5fa1 100644
--- a/world/map/npc/029-1/hideandseek.txt
+++ b/world/map/npc/029-1/hideandseek.txt
@@ -1,5 +1,5 @@
// Children playing Hide and Seek
-// QUEST_NorthTulimshar
+// QL_HIDENSEEK
// BYTE 0
// Bit 0: started quest at Ayasha
// Bit 1 - 5: found one of the kids each
@@ -24,15 +24,15 @@ OnInit:
function|script|CountHideNSeek
{
set @hidden_kid_cnt, 0;
- if (QUEST_NorthTulimshar & $@hideandseekNT_found1)
+ if (QL_HIDENSEEK & $@hideandseekNT_found1)
set @hidden_kid_cnt, (@hidden_kid_cnt + 1);
- if (QUEST_NorthTulimshar & $@hideandseekNT_found2)
+ if (QL_HIDENSEEK & $@hideandseekNT_found2)
set @hidden_kid_cnt, (@hidden_kid_cnt + 1);
- if (QUEST_NorthTulimshar & $@hideandseekNT_found3)
+ if (QL_HIDENSEEK & $@hideandseekNT_found3)
set @hidden_kid_cnt, (@hidden_kid_cnt + 1);
- if (QUEST_NorthTulimshar & $@hideandseekNT_found4)
+ if (QL_HIDENSEEK & $@hideandseekNT_found4)
set @hidden_kid_cnt, (@hidden_kid_cnt + 1);
- if (QUEST_NorthTulimshar & $@hideandseekNT_found5)
+ if (QL_HIDENSEEK & $@hideandseekNT_found5)
set @hidden_kid_cnt, (@hidden_kid_cnt + 1);
return;
}
@@ -45,26 +45,25 @@ function|script|CountHideNSeek
"Close.", L_Close;
L_Show:
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
- mes "State: " + @state;
- if (QUEST_NorthTulimshar & $@hideandseekNT_started)
+ mes "State: " + QL_HIDENSEEK;
+ if (QL_HIDENSEEK & $@hideandseekNT_started)
mes "Start set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_found1)
+ if (QL_HIDENSEEK & $@hideandseekNT_found1)
mes "Found 1 set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_found2)
+ if (QL_HIDENSEEK & $@hideandseekNT_found2)
mes "Found 2 set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_found3)
+ if (QL_HIDENSEEK & $@hideandseekNT_found3)
mes "Found 3 set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_found4)
+ if (QL_HIDENSEEK & $@hideandseekNT_found4)
mes "Found 4 set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_found5)
+ if (QL_HIDENSEEK & $@hideandseekNT_found5)
mes "Found 5 set";
- if (QUEST_NorthTulimshar & $@hideandseekNT_ended)
+ if (QL_HIDENSEEK & $@hideandseekNT_ended)
mes "Complete set";
goto L_Close;
L_Reset:
- set QUEST_NorthTulimshar, 0;
+ set QL_HIDENSEEK, 0;
goto L_Close;
L_Close:
@@ -80,13 +79,11 @@ OnInit:
set @child_number, 0;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
-
set @EXP, 75;
- if (@state > 63) goto L_Done;
- if (@state == 63) goto L_Reward;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if (QL_HIDENSEEK == 63) goto L_Reward;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "You see a girl who is holding her hands in front of her face.";
mes "[Ayasha]";
@@ -109,7 +106,7 @@ L_Next1:
mes "\"Great! You can take my turn with searching. You need to find all five of my friends.";
mes "They're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\"";
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_started;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_started;
goto L_Close;
L_Doing:
@@ -123,7 +120,7 @@ L_Reward:
mes "[Ayasha]";
mes "\"Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!\"";
getexp @EXP, 0;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_ended;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_ended;
menu
"I think I need to do other things now.",L_Next2;
@@ -140,7 +137,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
@@ -149,13 +145,11 @@ L_Close:
{
set @child_number, 1;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
-
set @EXP, 15;
- if (@state > 63) goto L_Done;
- if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found1)) goto L_Find;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found1)) goto L_Find;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "You see a kid hiding behind a box.";
menu
@@ -185,7 +179,7 @@ L_Find:
mes "[Latif]";
mes "\"Hey! Ah, you found me. Well done. But my hiding place wasn't that difficult this time.\"";
getexp @EXP, 0;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found1;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_found1;
mes "\"Here, do you want a candy?\"";
getitem "Candy", 1;
goto L_Close;
@@ -203,7 +197,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
@@ -212,13 +205,11 @@ L_Close:
{
set @child_number, 2;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
-
set @EXP, 15;
- if (@state > 63) goto L_Done;
- if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found2)) goto L_Find;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found2)) goto L_Find;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "[Charda]";
mes "\"Hello. Psht, be careful. I'm playing hide and seek with Ayasha. You'll draw attention to my hiding place.\"";
@@ -229,7 +220,7 @@ L_Find:
mes "[Charda]";
mes "\"Oh! Got me! You're good at this.\"";
getexp @EXP, 0;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found2;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_found2;
mes "She takes something out of her pocket.";
mes "\"I'm hungry now. Do you want chocolate too?\"";
getitem "ChocolateBar", 1;
@@ -254,7 +245,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
@@ -263,13 +253,11 @@ L_Close:
{
set @child_number, 3;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
-
set @EXP, 25;
- if (@state > 63) goto L_Done;
- if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found3)) goto L_Find;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found3)) goto L_Find;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "[Faris]";
mes "\"Oh, hi there. What are you doing here on the beach?\"";
@@ -287,7 +275,7 @@ L_Find:
mes "\"You found me! Well done. You look a bit thirsty, here.\"";
getexp @EXP, 0;
getitem "CactusDrink", 1;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found3;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_found3;
mes "\"It's really cool you're playing with us. I'm sure you have a lot of other things to do.";
mes "You're an adventurer, right? I want to become an adventurer too when I'm grown up. I'll talk to Aidan then.\"";
mes "\"Aidan is outside Sorfina's place and you can register there for monster points. That's something the Wizard's Council made up. They reward you for slaying monsters. It's so cool.\"";
@@ -306,7 +294,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
@@ -315,13 +302,12 @@ L_Close:
{
set @child_number, 4;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
- if (@state > 63) goto L_Done;
- if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found4)) goto L_Find;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found4)) goto L_Find;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "[Rasin]";
mes "\"The harbor is to the south from here. There you can take a ferry to other places.";
@@ -332,7 +318,7 @@ L_Find:
mes "[Rasin]";
mes "\"Ah, you found me. I need to find a better place to hide next time.\"";
getexp @EXP, 0;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found4;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_found4;
goto L_Close;
L_Doing:
@@ -349,7 +335,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
@@ -358,13 +343,12 @@ L_Close:
{
set @child_number, 5;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
- if (@state > 63) goto L_Done;
- if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found5)) goto L_Find;
- if (@state > 0) goto L_Doing;
+ if (QL_HIDENSEEK > 63) goto L_Done;
+ if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found5)) goto L_Find;
+ if (QL_HIDENSEEK > 0) goto L_Doing;
mes "You see a girl standing behind the wheat. She has a look of intense concentration on her face.";
menu
@@ -381,7 +365,7 @@ L_Find:
mes "\"Oh no! You found me! You must be very clever.";
mes "My friend Sandra is clever too, but she said it's a waste of time to play hide and seek.\"";
getexp @EXP, 0;
- set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found5;
+ set QL_HIDENSEEK, QL_HIDENSEEK | $@hideandseekNT_found5;
goto L_Close;
L_Doing:
@@ -397,7 +381,6 @@ L_Done:
goto L_Close;
L_Close:
- set @state, 0;
set @EXP, 0;
close;
}
diff --git a/world/map/npc/029-1/kaan.txt b/world/map/npc/029-1/kaan.txt
index 1c3cf0bb..297849fa 100644
--- a/world/map/npc/029-1/kaan.txt
+++ b/world/map/npc/029-1/kaan.txt
@@ -3,24 +3,17 @@
029-1,46,95,0|script|Kaan|160
{
- setarray @npc_loc, 46, 97, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_OutOfRange;
- callfunc "TutorialState";
+ set @kaan_talked, (STARTAREA & $@SpokeToKaan);
if (!(@kaan_talked)) goto L_Tanisha;
- if (@tutorial >= 13) goto L_TutDone;
- if (@tutorial == 12) goto L_Plan;
- if (@tutorial == 11) goto L_TrickKnown;
- if (@tutorial == 10) goto L_Trick;
- if (@tutorial == 9) goto L_Hasan;
+ if (QL_BEGIN >= 13) goto L_TutDone;
+ if (QL_BEGIN == 12) goto L_Plan;
+ if (QL_BEGIN == 11) goto L_TrickKnown;
+ if (QL_BEGIN == 10) goto L_Trick;
+ if (QL_BEGIN == 9) goto L_Hasan;
goto L_Out;
-L_OutOfRange:
- message strcharinfo(0), "Come closer!";
- goto L_Close;
-
L_Tanisha:
set STARTAREA, STARTAREA | $@SpokeToKaan;
mes "[Young Man]";
@@ -69,8 +62,7 @@ L_Next1:
mes "\"Sometimes he just freaks out and then he's dangerous.";
mes "He might listen to one of the adult men, but they're all off to work in Hurnscald during the day.\"";
mes "\"We should think about some kind of trick. Ah, if only I knew his weak point.\"";
- set @tutorial_tmp, 10;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 10;
goto L_Trick;
L_Trick:
@@ -91,8 +83,7 @@ L_Next2:
mes "[Kaan]";
mes "\"Scorpions?! Right! How could I forget?";
mes "When he was a child, he nearly died because he fell into a scorpion nest.\"";
- set @tutorial_tmp, 12;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 12;
next;
goto L_Explain;
diff --git a/world/map/npc/029-1/liana.txt b/world/map/npc/029-1/liana.txt
index 4e4a78a6..4cde049b 100644
--- a/world/map/npc/029-1/liana.txt
+++ b/world/map/npc/029-1/liana.txt
@@ -2,16 +2,13 @@
029-1,62,96,0|script|Liana|205
{
- setarray @npc_loc, 62, 96, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_End;
goto L_Talk;
L_Talk:
mes "[Liana]";
mes "\"Hurnscald is a large city. I'm sure glad I live in Candor because I know where everything's at.\"";
- if (@tutorial == 10) goto L_Hasan;
+ if (QL_BEGIN == 10) goto L_Hasan;
goto L_Close;
L_Hasan:
@@ -34,12 +31,7 @@ L_Next:
mes "\"If Lieutenant Dausen hadn't have come along that moment, Hasan would have died that day.\"";
mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\"";
mes "She sighs.";
- set @tutorial_tmp, 11;
- callfunc "SetTutorialMask";
- goto L_Close;
-
-L_End:
- mes "You'll have to move closer";
+ set QL_BEGIN, 11;
goto L_Close;
L_Close:
diff --git a/world/map/npc/029-1/rewards_master.txt b/world/map/npc/029-1/rewards_master.txt
index acfafc58..1ed99ac2 100644
--- a/world/map/npc/029-1/rewards_master.txt
+++ b/world/map/npc/029-1/rewards_master.txt
@@ -136,7 +136,7 @@ S_give_item:
getitem @item$, 1;
- mes "You received one " + getitemname(@item$) + "!";
+ mes "You received one " + getitemlink(@item$) + "!";
return;
S_give_noinv:
diff --git a/world/map/npc/029-1/soul-menhir.txt b/world/map/npc/029-1/soul-menhir.txt
index d38f5e85..8113d9c5 100644
--- a/world/map/npc/029-1/soul-menhir.txt
+++ b/world/map/npc/029-1/soul-menhir.txt
@@ -2,7 +2,6 @@
029-1,39,101,0|script|Soul Menhir#candor|344
{
- callfunc "ClearVariables";
set @map$, "029-1";
setarray @Xs, 38, 39, 40, 38, 40, 38, 39, 40;
setarray @Ys, 100, 100, 100, 101, 101, 102, 102, 102;
diff --git a/world/map/npc/029-1/traveler.txt b/world/map/npc/029-1/traveler.txt
index 1d7f354a..befa8eef 100644
--- a/world/map/npc/029-1/traveler.txt
+++ b/world/map/npc/029-1/traveler.txt
@@ -4,7 +4,7 @@
029-1,69,68,0|script|Knitra the Traveler|103
{
- set @NpcName$, "Knitra";
+ set @npcname$, "Knitra";
set @NpcTravelBit, $@candor_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/029-1/tutorial.txt b/world/map/npc/029-1/tutorial.txt
index ddaea587..76124ef6 100644
--- a/world/map/npc/029-1/tutorial.txt
+++ b/world/map/npc/029-1/tutorial.txt
@@ -12,19 +12,6 @@ OnInit:
set $@SpokeToKaan, (1 << 31);
end;
}
-function|script|TutorialState
-{
- callfunc "ClearVariables";
- set @tutorial, ((STARTAREA & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
- set @kaan_talked, (STARTAREA & $@SpokeToKaan);
- return;
-}
-function|script|SetTutorialMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
- set @tutorial_tmp, 0;
- return;
-}
029-2,21,26,0|script|TutDebug|154
{
mes "[TutDebug]";
@@ -35,16 +22,14 @@ function|script|SetTutorialMask
"No.",L_Close;
L_Kaan:
- set @tutorial_tmp, 8;
- set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set QL_BEGIN, 8;
set STARTAREA, STARTAREA &~ $@SpokeToKaan;
mes "Reset!";
goto L_Close;
L_Reset:
set TUT_var, 0;
- set @tutorial_tmp, 0;
- set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set QL_BEGIN, 0;
set STARTAREA, STARTAREA &~ $@SpokeToKaan;
mes "Reset!";
goto L_Close;
@@ -59,14 +44,12 @@ OnInit:
}
029-1,32,99,0|script|#tutorialoutside|45,0,0
{
- callfunc "TutorialState";
- if (@tutorial >= 8)
+ if (QL_BEGIN >= 8)
goto L_Warp;
goto L_ResetTutorial;
L_ResetTutorial:
- set @tutorial_tmp, 8;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 8;
goto L_Warp;
L_Warp:
diff --git a/world/map/npc/029-1/valon.txt b/world/map/npc/029-1/valon.txt
index 49bb6c5d..f4034ec9 100644
--- a/world/map/npc/029-1/valon.txt
+++ b/world/map/npc/029-1/valon.txt
@@ -10,21 +10,14 @@ OnInit:
setarray $@ValonMobCnt, 10,5,3,1;
end;
}
-function|script|ValonState
+function|script|ValonCount
{
- set @valon_state, ((STARTAREA & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
set @valon_mob, 0;
- if (@valon_state >= 2)
- set @valon_mob, (@valon_state - 2);
+ if (QL_VALON >= 2)
+ set @valon_mob, (QL_VALON - 2);
set @valon_count, ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
return;
}
-function|script|setValonMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@valon_tmp << NIBBLE_1_SHIFT));
- set @valon_tmp, 0;
- return;
-}
function|script|ResetValonCntMask
{
set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
@@ -42,8 +35,8 @@ function|script|AddValonCntMask
}
function|script|ValonProgress
{
- callfunc "ValonState";
- if ((@valon_state > 1) && (@valon_state < 6))
+ callfunc "ValonCount";
+ if ((QL_VALON > 1) && (QL_VALON < 6))
message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob];
return;
}
@@ -56,7 +49,7 @@ function|script|ValonProgress
"No.", L_Close;
L_Reset:
- set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (0 << NIBBLE_1_SHIFT));
+ set QL_VALON, 0;
set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
mes "Reset!";
goto L_Close;
@@ -71,18 +64,15 @@ OnInit:
}
029-1,72,86,0|script|Valon|156
{
- setarray @npc_loc, 72, 86, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
- callfunc "ValonState";
- if (@valon_state >= 6)
+ callfunc "ValonCount";
+ if (QL_VALON >= 6)
goto L_QuestComplete;
- if (@valon_start == 1)
+ if (QL_VALON == 1)
goto L_QuestAskAgain;
if (@valon_count >= $@ValonMobCnt[@valon_mob])
goto L_NextMob;
- if ((@valon_state >= 2) && (@valon_state < 6))
+ if ((QL_VALON >= 2) && (QL_VALON < 6))
goto L_QuestStarted;
goto L_QuestAsk;
@@ -102,17 +92,15 @@ L_QuestAsk:
mes "\"I should know I guard this gate from all manner of island beasts.\"";
mes "\"Maybe you would like help and earn your stripes?\"";
mes "\"The Council of Wizard's does offer a reward for helping...\"";
- set @valon_tmp, 1;
- callfunc "setValonMask";
+ set QL_VALON, 1;
callfunc "ResetValonCntMask";
menu
"YES!!! let me at them!", L_Accept,
"Maybe some other time.", L_Close;
L_Accept:
- set @valon_tmp, 2;
- callfunc "setValonMask";
- callfunc "ValonState";
+ set QL_VALON, 2;
+ callfunc "ValonCount";
goto L_NewMob;
L_NextMob:
@@ -120,10 +108,9 @@ L_NextMob:
mes "\"I see you killed all the " + $@ValonMobName$[@valon_mob] + " needed.\"";
mes "\"The Wizard's thank thee as well.\"";
set Zeny, Zeny + 25;
- set @valon_tmp, (@valon_state + 1);
- callfunc "setValonMask";
+ set QL_VALON, (QL_VALON + 1);
callfunc "ResetValonCntMask";
- callfunc "ValonState";
+ callfunc "ValonCount";
if (@valon_mob == getarraysize($@ValonMob))
goto L_QuestOver;
goto L_NewMob;
@@ -144,8 +131,7 @@ L_QuestOver:
mes "[Valon]";
mes "\"Thanks once again for helping with the monsters in the island.\"";
getexp 50, 0;
- set @valon_tmp, (@valon_state + 1);
- callfunc "setValonMask";
+ set QL_VALON, (QL_VALON + 1);
goto L_Close;
L_QuestComplete:
diff --git a/world/map/npc/029-1/vincent.txt b/world/map/npc/029-1/vincent.txt
index 2d70b6de..ab157e25 100644
--- a/world/map/npc/029-1/vincent.txt
+++ b/world/map/npc/029-1/vincent.txt
@@ -9,7 +9,7 @@
"No.", L_Close;
L_Reset:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
+ set QL_VINCENT, 0;
mes "Reset!";
goto L_Close;
@@ -23,15 +23,11 @@ OnInit:
}
029-1,107,110,0|script|Vincent|113
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
set @halloween_npc_id, $@halloween_npc_vincent;
callfunc "TrickOrTreat";
- set @state, ((QUEST_SouthTulimshar & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
-
- if (@state >= 2) goto L_Done;
- if (@state == 1) goto L_Progress;
+ if (QL_VINCENT >= 2) goto L_Done;
+ if (QL_VINCENT == 1) goto L_Progress;
goto L_Con_Vin_First;
L_Con_Vin_First:
@@ -73,8 +69,7 @@ L_Ask:
"No.", L_Close;
L_Sure:
- set @state, 1;
- callsub S_Update_Var;
+ set QL_VINCENT, 1;
set @TEMP, rand(4);
if(@TEMP == 1) goto L_Req2;
if(@TEMP == 2) goto L_Req3;
@@ -125,8 +120,7 @@ L_Have:
delitem "BugLeg", 5;
getexp 50, 0;
set Zeny, Zeny + 1000;
- set @state, 2;
- callsub S_Update_Var;
+ set QL_VINCENT, 2;
mes "[Vincent]";
mes "\"Here you go, a little of my appreciation!\"";
@@ -140,11 +134,5 @@ L_Done:
goto L_Close;
L_Close:
- set @TEMP, 0;
- set @state, 0;
close;
-
-S_Update_Var:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (@state << NIBBLE_2_SHIFT));
- return;
}
diff --git a/world/map/npc/029-1/zegas.txt b/world/map/npc/029-1/zegas.txt
index f9cefcbd..a350447d 100644
--- a/world/map/npc/029-1/zegas.txt
+++ b/world/map/npc/029-1/zegas.txt
@@ -3,26 +3,19 @@
// Npc
029-1,45,85,0|script|Zegas|165
{
- setarray @npc_loc, 45, 85, 2;
+ set @npc_distance, 2;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Range;
- callfunc "CheckBarrelQuest";
- if (@barrel_quest == 1)
+ if (QL_ZEGAS == 1)
goto L_Find;
- if (@barrel_quest == 2)
+ if (QL_ZEGAS == 2)
goto L_Looking;
- if (@barrel_quest == 3)
+ if (QL_ZEGAS == 3)
goto L_QuestEnd;
- if (@barrel_quest == 4)
+ if (QL_ZEGAS == 4)
goto L_Thanks;
goto L_Meet;
-L_Range:
- message strcharinfo(0), "Whats that? Come closer I can't hear you.";
- goto L_Close;
-
L_Meet:
mes "[Zegas]";
mes "\"Hey do you have a second?\"";
@@ -32,8 +25,7 @@ L_Meet:
mes "\"Wouldn't you know it, the bug bomb Eomie gave us is in one of the store room barrels.\"";
next;
mes "\"Can you search the barrels for the bug bomb and set it off when you find it?\"";
- set @barrel_tmp, 1;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 1;
menu
"Sure.",L_Start,
"Maybe some other time.",L_Close;
@@ -49,8 +41,7 @@ L_Find:
L_Start:
mes "[Zegas]";
- set @barrel_tmp, 2;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 2;
mes "\"Thanks, come back and see me once you found the bug bomb and set it off.\"";
goto L_Close;
@@ -62,11 +53,10 @@ L_Looking:
L_QuestEnd:
mes "[Zegas]";
mes "\"From the smell I can see you found the bug bomb!\"";
- mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\"";
+ mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\"";
getexp 50, 0;
set Zeny, (Zeny + 50);
- set @barrel_tmp, 4;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 4;
goto L_Close;
L_Thanks:
@@ -86,7 +76,7 @@ L_Close:
"No.", L_Close;
L_Reset:
- set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (0 << NIBBLE_4_SHIFT));
+ set QL_ZEGAS, 0;
set STARTAREA, STARTAREA &~ (1 << 20);
set STARTAREA, STARTAREA &~ (1 << 21);
set STARTAREA, STARTAREA &~ (1 << 22);
diff --git a/world/map/npc/029-2/barrels.txt b/world/map/npc/029-2/barrels.txt
index 4ff3e6de..39bd0ad3 100644
--- a/world/map/npc/029-2/barrels.txt
+++ b/world/map/npc/029-2/barrels.txt
@@ -2,7 +2,6 @@
// Author: Wushin
029-2,23,86,0|script|Barrel#0|400
{
- setarray @npc_loc, 23, 86, 2;
set @barrel, 0;
callfunc "CheckBarrel";
end;
@@ -14,49 +13,42 @@ OnMaggotDeath:
}
029-2,28,86,0|script|Barrel#1|400
{
- setarray @npc_loc, 28, 86, 2;
set @barrel, 1;
callfunc "CheckBarrel";
end;
}
029-2,31,91,0|script|Barrel#2|400
{
- setarray @npc_loc, 31, 91, 2;
set @barrel, 2;
callfunc "CheckBarrel";
end;
}
029-2,36,85,0|script|Barrel#3|400
{
- setarray @npc_loc, 36, 85, 2;
set @barrel, 3;
callfunc "CheckBarrel";
end;
}
029-2,40,89,0|script|Barrel#4|400
{
- setarray @npc_loc, 40, 89, 2;
set @barrel, 4;
callfunc "CheckBarrel";
end;
}
029-2,38,91,0|script|Barrel#5|400
{
- setarray @npc_loc, 38, 91, 2;
set @barrel, 5;
callfunc "CheckBarrel";
end;
}
029-2,29,92,0|script|Barrel#6|400
{
- setarray @npc_loc, 29, 92, 2;
set @barrel, 6;
callfunc "CheckBarrel";
end;
}
029-2,24,91,0|script|Barrel#7|400
{
- setarray @npc_loc, 24, 91, 2;
set @barrel, 7;
callfunc "CheckBarrel";
end;
diff --git a/world/map/npc/029-2/barrels_config.txt b/world/map/npc/029-2/barrels_config.txt
index 665903fb..1d356a08 100644
--- a/world/map/npc/029-2/barrels_config.txt
+++ b/world/map/npc/029-2/barrels_config.txt
@@ -14,25 +14,13 @@ OnInit:
set $@BarrelMax, getarraysize($@BarrelBits);
end;
}
-function|script|SetBarrelMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@barrel_tmp << NIBBLE_4_SHIFT));
- set @barrel_tmp, 0;
- return;
-}
-function|script|CheckBarrelQuest
-{
- callfunc "CountBarrels";
- set @barrel_quest, ((STARTAREA & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT);
- return;
-}
function|script|CountBarrels
{
set @barrel_count, 0;
set @count_tmp, 0;
goto L_Loop;
-L_Loop:
+L_Loop:
if (STARTAREA & $@BarrelBits[@barrel_count])
goto L_AddOne;
goto L_LoopAgain;
@@ -52,11 +40,9 @@ L_BarrelTally:
}
function|script|CheckBarrel
{
+ set @npc_distance, 2;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Range;
- callfunc "CheckBarrelQuest";
- if (!(@barrel_quest == 2))
+ if (!(QL_ZEGAS == 2))
goto L_NoI;
if (STARTAREA & $@BarrelBits[@barrel])
goto L_Empty;
@@ -71,10 +57,6 @@ function|script|CheckBarrel
goto L_Spawn;
goto L_Reward;
-L_Range:
- message strcharinfo(0), "You'll need to get closer.";
- goto L_Return;
-
L_NoI:
message strcharinfo(0), "Nothing interesting here.";
goto L_Return;
@@ -86,14 +68,15 @@ L_Empty:
L_QuestReward:
message strcharinfo(0), "You found the bug bomb.";
misceffect 33;
- set @barrel_tmp, 3;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 3;
killmonster getmap() + "", "Barrel#0::OnMaggotDeath";
goto L_Return;
L_Spawn:
message strcharinfo(0), "Uck, More Maggots!";
- areamonster getmap() + "", @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath";
+ setarray @npc_loc, getnpcx(), getnpcy();
+ areamonster getmap(), @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath";
+ cleararray @npc_loc, 0, 2;
goto L_Return;
L_Reward:
diff --git a/world/map/npc/029-2/cynric.txt b/world/map/npc/029-2/cynric.txt
index d9f46d85..2a133e41 100644
--- a/world/map/npc/029-2/cynric.txt
+++ b/world/map/npc/029-2/cynric.txt
@@ -2,7 +2,6 @@
029-2,30,118,0|script|Cynric|161
{
- callfunc "ClearVariables";
set @npcname$, "Cynric";
callfunc "Banker";
close;
diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt
index f6679f67..3f7d3e1e 100644
--- a/world/map/npc/029-2/morgan.txt
+++ b/world/map/npc/029-2/morgan.txt
@@ -3,18 +3,6 @@
// Gains Access to Magic School
// See 024-2 clean that shit up
// Morgan, liana
-function|script|MorganState
-{
- callfunc "ClearVariables";
- set @morgan, ((STARTAREA & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
- return;
-}
-function|script|SetMorganMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@morgan_tmp << NIBBLE_3_SHIFT));
- set @morgan_tmp, 0;
- return;
-}
029-2,105,57,0|script|MorganDebug|355
{
mes "[Morgan Debug]";
@@ -23,7 +11,7 @@ function|script|SetMorganMask
"Yes.", L_Reset,
"No.", L_End;
L_Reset:
- set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
+ set QL_MORGAN, 0;
mes "Reset!";
goto L_End;
@@ -37,31 +25,26 @@ OnInit:
}
029-2,101,57,0|script|Morgan#_M|355
{
- setarray @npc_loc, 101, 57, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
- callfunc "MorganState";
- if (readparam(bInt) >= 5)
+ if (Int >= 5)
goto L_Learn;
goto L_NotMagic;
L_Learn:
- if (@morgan == 0)
+ if (QL_MORGAN == 0)
goto L_NotSeen;
- if (@morgan == 1)
+ if (QL_MORGAN == 1)
goto L_Seen;
- if (@morgan == 2)
+ if (QL_MORGAN == 2)
goto L_Started;
- if (@morgan == 3)
+ if (QL_MORGAN == 3)
goto L_CastOnce;
- if (@morgan == 4)
+ if (QL_MORGAN == 4)
goto L_LearningDone;
goto L_Close;
L_NotSeen:
- set @morgan_tmp, 1;
- callfunc "SetMorganMask";
+ set QL_MORGAN, 1;
mes "[Morgan]";
mes "\"Welcome to the magic school of Candor\"";
mes "\"My name is Morgan, I'm Head of Wizardry.\"";
@@ -86,8 +69,7 @@ L_NotMagic:
goto L_Close;
L_Start:
- set @morgan_tmp, 2;
- callfunc "SetMorganMask";
+ set QL_MORGAN, 2;
mes "\"Great, lets begin your first lesson.\"";
getitem 1171, 1;
mes "\"This is a wand, there are many like it but this one is now yours.\"";
@@ -115,8 +97,9 @@ L_CastOnce:
mes "\"Each time you attack the wand will convert a bit of you mana into a magic bolt.\"";
mes "\"After so many attacks, you will need to recast the invocation to stay attuned to the wand.\"";
mes "\"(Logging out will also cancel any spell effects currently active in-game.).\"";
- set @morgan_tmp, 4;
- callfunc "SetMorganMask";
+ next;
+ mes "\"I've taught you all I can for now. You should visit the Mana Seed north west of Hurnscald.\"";
+ set QL_MORGAN, 4;
goto L_Close;
L_LearningDone:
diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt
index 8becafd3..984312cf 100644
--- a/world/map/npc/029-2/sorfina.txt
+++ b/world/map/npc/029-2/sorfina.txt
@@ -2,19 +2,16 @@
// Author: Jenalya
029-2,27,27,0|script|Sorfina|154,0,1
{
- setarray @npc_loc, 27, 27, 2;
+ set @npc_distance, 2;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
goto L_Main;
L_Main:
- callfunc "TutorialState";
- if (@tutorial == 10) goto L_Hasan;
- if (@tutorial >= 4) goto L_Again;
- if (@tutorial == 3) goto L_Clothes;
- if (@tutorial == 2) goto L_Dresser;
- if (@tutorial == 1) goto L_Carpet;
+ if (QL_BEGIN == 10) goto L_Hasan;
+ if (QL_BEGIN >= 4) goto L_Again;
+ if (QL_BEGIN == 3) goto L_Clothes;
+ if (QL_BEGIN == 2) goto L_Dresser;
+ if (QL_BEGIN == 1) goto L_Carpet;
goto L_Start;
L_Start:
@@ -60,8 +57,7 @@ L_Carpet:
mes "Press [###keyMoveUp;] to move up, press [###keyMoveDown;] to move down, ";
mes "press [###keyMoveLeft;] to move left, press [###keyMoveRight;] to move right ";
mes " or click on the place you want to go to.\"";
- set @tutorial_tmp, 1;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 1;
goto L_Close;
L_Dresser:
@@ -98,8 +94,7 @@ L_Clothes:
mes "\"And here is some money for you. Don't spend it all in one place.";
mes "Now go help Tanisha downstairs.\"";
set Zeny, Zeny + 30;
- set @tutorial_tmp, 4;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 4;
goto L_Close;
L_Again:
@@ -225,8 +220,7 @@ L_Next:
mes "\"If Valon hadn't have come along that moment, Hasan would have died that day.\"";
mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\"";
mes "She sighs.";
- set @tutorial_tmp, 11;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 11;
goto L_Close;
L_SkipTut:
@@ -246,16 +240,14 @@ L_Bye:
getitem "CottonShirt", 1;
getitem "RaggedShorts", 1;
set Zeny, Zeny + 35; // tanisha gives 5 zeny
- set @tutorial_tmp, 8;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 8;
goto L_Close;
L_Close:
close;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial > 0)
+ if (QL_BEGIN > 0)
end;
goto L_Start;
}
@@ -265,8 +257,7 @@ OnTouch:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial != 1)
+ if (QL_BEGIN != 1)
end;
mes "[Sorfina]";
mes "\"You should get dressed now.\"";
@@ -274,20 +265,19 @@ OnTouch:
mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press N to focus and T to talk/activate.\"";
next;
mes "\"Now get the clothes out of the dresser.\"";
- set @tutorial_tmp, 2;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 2;
close;
}
029-2,29,23,0|script|Dresser#tutorial|400
{
- setarray @npc_loc, 29, 23, 2;
+ set @npc_distance, 2;
+ set @distance_handler, 1;
callfunc "PCtoNPCRange";
if (@npc_check)
goto L_CloseDis;
- callfunc "TutorialState";
- if (@tutorial > 2) goto L_Empty;
- if (@tutorial == 2) goto L_Shirt;
+ if (QL_BEGIN > 2) goto L_Empty;
+ if (QL_BEGIN == 2) goto L_Shirt;
goto L_Walk;
L_Walk:
@@ -304,8 +294,7 @@ L_Shirt:
mes "\"You can open your inventory by pressing F3 or clicking on the 'Inventory' button in the bar at the upper right corner.\"";
next;
mes "\"After we finish talking, click on the clothes and press the equip button.\"";
- set @tutorial_tmp, 3;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 3;
close;
L_Empty:
@@ -322,8 +311,7 @@ L_CloseDis:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial < 4)
+ if (QL_BEGIN < 4)
goto L_Block;
warp "029-2", 112, 85;
end;
diff --git a/world/map/npc/029-2/stat_reset.txt b/world/map/npc/029-2/stat_reset.txt
index 896bbf6b..c1dafd7b 100644
--- a/world/map/npc/029-2/stat_reset.txt
+++ b/world/map/npc/029-2/stat_reset.txt
@@ -2,10 +2,7 @@
029-2,98,92,0|script|Jessie|159
{
- setarray @npc_loc, 98, 91, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
if (BaseLevel >= 10)
goto L_Sorry;
diff --git a/world/map/npc/029-2/tanisha.txt b/world/map/npc/029-2/tanisha.txt
index 450bc77c..9a7ee081 100644
--- a/world/map/npc/029-2/tanisha.txt
+++ b/world/map/npc/029-2/tanisha.txt
@@ -4,23 +4,19 @@
029-2,110,88,0|script|Tanisha|114
{
- setarray @npc_loc, 110, 88, 4;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Close;
if (isin("029-2", 98, 84, 106, 89))
goto L_Fighting;
- callfunc "TutorialState";
- if (@tutorial >= 8) goto L_Tut_Done;
- if (@tutorial == 7) goto L_Stats;
- if (@tutorial == 6) goto L_Fail;
- if (@tutorial == 5) goto L_Maggots;
+ if (QL_BEGIN >= 8) goto L_Tut_Done;
+ if (QL_BEGIN == 7) goto L_Stats;
+ if (QL_BEGIN == 6) goto L_Fail;
+ if (QL_BEGIN == 5) goto L_Maggots;
mes "[Tanisha]";
mes "\"Hey! You're up again!\"";
- emotion EMOTE_HAPPY;
+ emotion EMOTE_HAPPY, strcharinfo(0);
mes "\"Are you feeling better?\"";
menu
"Yes, thank you.",L_Next,
@@ -30,8 +26,7 @@ L_Next:
mes "[Tanisha]";
mes "\"I'm glad you're feeling better. It was really bad luck what happened to you.";
mes "Hey, I have an idea.\"";
- set @tutorial_tmp, 5;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 5;
goto L_Maggots;
L_Maggots:
@@ -67,24 +62,21 @@ L_Fight_Again:
next;
mes "\"Sometimes dead monsters leave some useful things. You can pick them up by pressing [###keyPickup;] or clicking on the items with your mouse.\"";
close2;
- // The getitem must be in the same place as set @tutorial, 2;
+ // The getitem must be in the same place as set QL_BEGIN, 2;
// since it was moved to after L_Fight_Again, add it conditionally
- callfunc "TutorialState";
- if (@tutorial == 5)
+ if (QL_BEGIN == 5)
goto L_GetFightItems;
goto L_ContinueFight;
L_GetFightItems:
- set @tutorial_tmp, 6;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 6;
getitem "Knife", 1;
getitem "SlingShot", 1;
getitem "SlingBullet", 500;
goto L_ContinueFight;
L_ContinueFight:
- set @tutorial_tmp, 6;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 6;
set @Maggot_Kills, 0;
set @time, 0;
if (getareausers("029-2", 98, 84, 106, 89) == 0)
@@ -118,8 +110,7 @@ L_StatsRe:
mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
mes "\"He also knows of mages with even more powerful reset spells.\"";
next;
- callfunc "TutorialState";
- if (@tutorial == 7)
+ if (QL_BEGIN == 7)
goto L_Money;
goto L_Advice;
@@ -128,8 +119,7 @@ L_Money:
mes "[Tanisha]";
mes "\"Hey, you are so smart taking out all that yucky maggots for me.";
mes "You can have my pocket money. Here.\"";
- set @tutorial_tmp, 8;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 8;
set Zeny, Zeny + 5;
next;
goto L_Advice;
@@ -137,7 +127,7 @@ L_Money:
L_Advice:
mes "\"When you go to Hurnscald, you should see Bernard. He can make a delicious soup!";
mes "Good luck!\"";
- emotion EMOTE_HAPPY;
+ emotion EMOTE_HAPPY, strcharinfo(0);
goto L_Close;
L_Explain:
@@ -263,8 +253,7 @@ OnMaggotDeath:
goto L_Summon;
// else, complete
warp "029-2", 110, 88;
- set @tutorial_tmp, 7;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 7;
set @Maggot_Kills, 0;
set @time, 0;
if (getareausers("029-2", 98, 84, 106, 89) == 0)
@@ -284,8 +273,7 @@ OnInit:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial >= 8)
+ if (QL_BEGIN >= 8)
goto L_Warp;
goto L_Block;
diff --git a/world/map/npc/031-2/cindyHouse.txt b/world/map/npc/031-2/cindyHouse.txt
index 5a1c20cc..bd4c17fb 100644
--- a/world/map/npc/031-2/cindyHouse.txt
+++ b/world/map/npc/031-2/cindyHouse.txt
@@ -31,7 +31,7 @@ L_Happy_Random:
strcharinfo(0) + ", you are sooo strong! Amazing! But my dad is strong too!";
set @random, rand(9);
if (@random != 5)
- emotion EMOTE_HAPPY;
+ emotion EMOTE_HAPPY, strcharinfo(0);
set @quote$, "\"" + @quote_Cindy$[@random] + "\"";
mes "[Cindy]";
mes @quote$;
diff --git a/world/map/npc/033-1/traveler.txt b/world/map/npc/033-1/traveler.txt
index 681a4100..462e2586 100644
--- a/world/map/npc/033-1/traveler.txt
+++ b/world/map/npc/033-1/traveler.txt
@@ -4,7 +4,7 @@
033-1,63,30,0|script|Khoenan the Traveler|103
{
- set @NpcName$, "Khoenan";
+ set @npcname$, "Khoenan";
set @NpcTravelBit, $@barbarians_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/048-2/traveler.txt b/world/map/npc/048-2/traveler.txt
index 4d8af7fe..7b654d85 100644
--- a/world/map/npc/048-2/traveler.txt
+++ b/world/map/npc/048-2/traveler.txt
@@ -4,7 +4,7 @@
048-2,23,46,0|script|Drake the Traveler|103
{
- set @NpcName$, "Drake";
+ set @npcname$, "Drake";
set @NpcTravelBit, $@blue_sage_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/052-1/channelling.txt b/world/map/npc/052-1/channelling.txt
index e65d47a8..01364b41 100644
--- a/world/map/npc/052-1/channelling.txt
+++ b/world/map/npc/052-1/channelling.txt
@@ -101,7 +101,7 @@ function|script|StartChannelling
set $@illia_level_4_progress, 1;
set $@illia_char_channelling$, strcharinfo(0);
- set @bonus, (readparam(bInt)+1) / 25;
+ set @bonus, (Int+1) / 25;
// Lazurite Stones power, will also depend on the Int of the channelling character
setarray $@illia_lazurites_power,
12 + @bonus, // small
@@ -114,11 +114,11 @@ function|script|StartChannelling
setarray $@illia_large_lazurites, 21,40, 34,25;
// amount of initial magic power
- set $@illia_magic_power, 1811 + readparam(bInt)*2;
+ set $@illia_magic_power, 1811 + Int*2;
// Channelling required power depends on the base Int of the character
- set $@illia_magic_power_required, 5707 - 2*readparam(bInt);
+ set $@illia_magic_power_required, 5707 - 2*Int;
// magic power loss depends also on Int
- set $@illia_magic_power_loss, 53 - ((readparam(bInt)+1)*2)/10;
+ set $@illia_magic_power_loss, 53 - ((Int+1)*2)/10;
// register the power status to display hints to the players
// Statuses: 0=critical(below 300), 1=neutral, 2=almost there (max-300)
diff --git a/world/map/npc/055-1/traveler.txt b/world/map/npc/055-1/traveler.txt
index 0277fbd4..1f36de77 100644
--- a/world/map/npc/055-1/traveler.txt
+++ b/world/map/npc/055-1/traveler.txt
@@ -4,7 +4,7 @@
055-1,135,60,0|script|Sherman the Traveler|103
{
- set @NpcName$, "Sherman";
+ set @npcname$, "Sherman";
set @NpcTravelBit, $@hurns_farms_bit;
callfunc "Traveler";
end;
diff --git a/world/map/npc/annuals/halloween/trick_or_treat.txt b/world/map/npc/annuals/halloween/trick_or_treat.txt
index 24a359d2..10265382 100644
--- a/world/map/npc/annuals/halloween/trick_or_treat.txt
+++ b/world/map/npc/annuals/halloween/trick_or_treat.txt
@@ -71,7 +71,7 @@ L_MaskMemoryCheck:
L_MaskMemoryYes:
// not necessarily true
- mes "\"I remember you, " + getequipname(equip_head) + " person. No more treats for you!\"";
+ mes "\"I remember you, " + getitemlink(getequipid(equip_head)) + " person. No more treats for you!\"";
goto L_Close;
L_MaskMemoryNo:
@@ -285,7 +285,7 @@ L_Explain:
next;
set @npc_check_loop, 0;
goto L_NpcCheckLoop;
-
+
L_NpcCheckLoop:
mes $@halloween_npc_names$[@npc_check_loop];
next;
diff --git a/world/map/npc/annuals/xmas/core.txt b/world/map/npc/annuals/xmas/core.txt
index d064efca..517ac084 100644
--- a/world/map/npc/annuals/xmas/core.txt
+++ b/world/map/npc/annuals/xmas/core.txt
@@ -130,7 +130,7 @@ L_SetRewardBonus:
set @xmas_reward_lower_bound, 2 * @xmas_reward_tally - rand(5);
if (@xmas_reward_tally <= 5)
set @xmas_reward_lower_bound, @xmas_reward_tally;
- set @xmas_reward_upper_bound, @xmas_reward_lower_bound + ((readparam(bLuk)) / 5);
+ set @xmas_reward_upper_bound, @xmas_reward_lower_bound + ((Luk) / 5);
set @xmas_reward, (rand(@xmas_reward_lower_bound, @xmas_reward_upper_bound));
set @xmas_reward_lower_bound, 0;
set @xmas_reward_upper_bound, 0;
@@ -159,8 +159,7 @@ L_LevelingReward:
goto L_XmasExp;
L_XmasLevel:
- gmcommand "@blvl 1";
- gmcommand "@l I was a good kid this year.";
+ set BaseLevel, BaseLevel + 1;
return;
L_XmasExp:
diff --git a/world/map/npc/functions/DyeConfig.txt b/world/map/npc/functions/DyeConfig.txt
index 1da1e734..0072dd26 100644
--- a/world/map/npc/functions/DyeConfig.txt
+++ b/world/map/npc/functions/DyeConfig.txt
@@ -23,7 +23,7 @@ OnInit:
end;
S_Array:
- if(getitemname($@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
+ if(getitemlink($@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
set $@c, 0;
callsub S_Color;
set $@w, $@w + 1;
@@ -35,7 +35,7 @@ L_Fail:
mapexit;
S_Color:
- if(getitemname($@DYE_colors$[$@c] + $@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
+ if(getitemlink($@DYE_colors$[$@c] + $@DYE_items$[$@w]) == "Unknown Item") goto L_Fail;
set $@c, $@c + 1;
if($@c < getarraysize($@DYE_colors$)) goto S_Color;
return;
diff --git a/world/map/npc/functions/banker.txt b/world/map/npc/functions/banker.txt
index ea5dfa22..9492f0f5 100644
--- a/world/map/npc/functions/banker.txt
+++ b/world/map/npc/functions/banker.txt
@@ -8,6 +8,7 @@ function|script|Banker
goto L_Start;
L_Start:
+ if(@npcname$ == "") set @npcname$, strnpcinfo(1);
mes "[" + @npcname$ + "]";
mes "\"Welcome to the bank!";
mes "How can I help you?\"";
@@ -248,5 +249,6 @@ L_Change_Bank:
goto L_Start;
L_Return:
+ set @npcname$, "";
return;
}
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index c894586b..f26164df 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -2,75 +2,88 @@
function|script|ClearVariables
{
- // Tutorial
- if ((TUTORIAL) || (sorfina))
- goto L_ResetTut;
- goto L_Heathin;
+ if(@login_event != 1) goto L_Deprecated;
+
+ callsub S_Bernard_Mikhail;
+ callsub S_Sarah;
+ callsub S_Vincent;
+ callsub S_Sandra;
+ callsub S_Desert;
+ callsub S_Bandit;
+ callsub S_Tutorial;
+ callsub S_Heathin;
+ callsub S_Remove_Skills;
+ callsub S_FixBank;
+ callsub S_Angus;
+ callsub S_Flags;
+ callsub S_Bitmask;
+
+ callsub S_Easter;
+ callsub S_Easter2008;
+ callsub S_Easter2009;
+ callsub S_Easter2010;
+ callsub S_Easter2011;
+ callsub S_Easter2012;
+ callsub S_Halloween2006;
+ callsub S_Halloween2007;
+ callsub S_Halloween2008;
+ callsub S_Halloween2009;
+ callsub S_Halloween2010;
+ callsub S_Halloween2011;
+ callsub S_Xmas2006;
+ callsub S_Xmas2007;
+ callsub S_Xmas2008;
+ callsub S_Xmas2009;
+ callsub S_Xmas2010;
+ callsub S_Xmas2011;
+ callsub S_Xmas2012;
+
+ callsub S_Misc;
+ return; // go back to global handler
+
+S_Return: // this is to end execution of a sub
+ return;
-L_ResetTut:
- //TUTORIAL to STARTAREA
- if ((sorfina) || (kaan) || (hasan) || (tanisha))
- goto L_ResetAllTut;
- set @tutorial_tmp, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
- // Tutorial
- // Nibble 0 (sorfina, tanisha, kaan & hasan)
- set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
- // Nibble 1 (valon)
- set @tutorial_tmp, ((TUTORIAL & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
- set @valon_done, (TUTORIAL & (1 << 7));
- set @valon_start, (TUTORIAL & (1 << 6));
- if (@valon_start)
- set @tutorial_tmp, (@tutorial_tmp + 2);
- if (@valon_done)
- set @tutorial_tmp, 7;
- set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@tutorial_tmp << NIBBLE_1_SHIFT));
- // Nibble 2 (Counts)
- set @tutorial_tmp, ((TUTORIAL & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
- set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (@tutorial_tmp << NIBBLE_2_SHIFT));
- // Nibble 3 (Morgan)
- set @tutorial_tmp, ((TUTORIAL & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
- set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@tutorial_tmp << NIBBLE_3_SHIFT));
- // Nibble 4 (Zegas) Barrels shuffled
- set @zegas_done, (TUTORIAL & (1 << 23));
- set @zegas_start, (TUTORIAL & (1 << 16));
- set @zegas_met, (TUTORIAL & (1 << 30));
- set @tutorial_tmp, 0;
- if (@zegas_met)
- set @tutorial_tmp, 1;
- if (@zegas_start)
- set @tutorial_tmp, 2;
- if (@zegas_done)
- set @tutorial_tmp, 4;
- set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@tutorial_tmp << NIBBLE_4_SHIFT));
- // Nibble 5 (Barrels)
- set @tutorial_tmp, 0;
- set STARTAREA, (STARTAREA & ~(NIBBLE_5_MASK) | (@tutorial_tmp << NIBBLE_5_SHIFT));
- // Nibble 6 (Barrels)
- set STARTAREA, (STARTAREA & ~(NIBBLE_6_MASK) | (@tutorial_tmp << NIBBLE_6_SHIFT));
- set TUTORIAL, 0;
- goto L_Heathin;
+////////////////////////////////////////////////////////////////
-L_ResetAllTut:
- set sorfina, 0;
- set tanisha, 0;
- set hasan, 0;
- set kaan, 0;
- set TUTORIAL, 0;
- set STARTAREA, 0;
- set FLAGS, FLAGS &~ FLAG_TUTORIAL_DONE;
- goto L_Heathin;
+S_Xmas2007:
+ if(!QUEST_xmas07_state) goto S_Return;
+ set QUEST_xmas07_state, 0;
+ set QUEST_xmas07_milk, 0;
+ set QUEST_xmas07_cookies, 0;
+ set QUEST_xmas07_presents, 0;
+ return;
-L_Heathin:
- if (HEATHIN_QUEST > 0)
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_6_MASK)) | (HEATHIN_QUEST << NIBBLE_6_SHIFT);
- set HEATHIN_QUEST, 0;
- goto L_Easter;
+S_Halloween2007:
+ set QUEST_Halloween07_state, 0;
+ return;
-L_Easter:
- // Easter
- set EasterQuest, 0;
+S_Xmas2006:
+ if(!XMASQUEST1) goto S_Return;
+ set XMASQUEST1, 0;
+ set XMASQUEST2, 0;
+ set XMASQUEST3, 0;
+ set XMASQUEST4, 0;
+ set XMASQUEST5, 0;
+ set XMASQUEST6, 0;
+ set XMASQUEST7, 0;
+ set XMASQUEST8, 0;
+ set XMASQUEST9, 0;
+ set XMASQUEST10, 0;
+ set XMASQUEST11, 0;
+ set XMASQUEST12, 0;
+ set XMASQUEST13, 0;
+ set XMASQUEST14, 0;
+ set XMASQUEST15, 0;
+ set XMASQUEST16, 0;
+ set XMASQUEST17, 0;
+ set XMASQUEST18, 0;
+ set XMASQUEST19, 0;
+ set XMASQUEST20, 0;
+ return;
- // Halloween 2006
+S_Halloween2006:
+ if(!HWQUEST1) goto S_Return;
set HWQUEST1, 0;
set HWQUEST2, 0;
set HWQUEST3, 0;
@@ -92,60 +105,49 @@ L_Easter:
set HWQUEST18, 0;
set HWQUEST19, 0;
set HWQUEST20, 0;
+ return;
- // Christmas 2006
- set XMASQUEST1, 0;
- set XMASQUEST2, 0;
- set XMASQUEST3, 0;
- set XMASQUEST4, 0;
- set XMASQUEST5, 0;
- set XMASQUEST6, 0;
- set XMASQUEST7, 0;
- set XMASQUEST8, 0;
- set XMASQUEST9, 0;
- set XMASQUEST10, 0;
- set XMASQUEST11, 0;
- set XMASQUEST12, 0;
- set XMASQUEST13, 0;
- set XMASQUEST14, 0;
- set XMASQUEST15, 0;
- set XMASQUEST16, 0;
- set XMASQUEST17, 0;
- set XMASQUEST18, 0;
- set XMASQUEST19, 0;
- set XMASQUEST20, 0;
-
- set QUEST_Halloween07_state, 0;
-
- set QUEST_xmas07_state, 0;
- set QUEST_xmas07_milk, 0;
- set QUEST_xmas07_cookies, 0;
- set QUEST_xmas07_presents, 0;
+S_Easter:
+ set EasterQuest, 0;
+ return;
+S_Easter2008:
set QUEST_Easter08_state, 0;
+ return;
+S_Halloween2008:
set Halloween08, 0;
+ return;
+S_Xmas2008:
set QUEST_xmas08_state, 0;
+ return;
+S_Easter2009:
set QUEST_Easter09, 0;
+ set QUEST_Easter09_slots, 0;
+ return;
- set Candyman, 0; // Halloween 2009
+S_Halloween2009:
+ set Candyman, 0;
+ return;
+S_Xmas2009:
set QUEST_Christmas09_state, 0;
+ return;
- set QUEST_Easter09_slots, 0;
-
- // easter 2010
- // This must not be cleared: since some people would like to go to the easter island!
- // set Easter_2010_QuestState, 0;
+S_Easter2010:
+ if(!Easter_2010_QuestState) goto S_Return;
+ set Easter_2010_QuestState, 0;
set Easter_2010_EggState1, 0;
set Easter_2010_EggState2, 0;
set Easter_2010_EggState3, 0;
set Easter_2010_EggState4, 0;
set Easter_2010_EggState5, 0;
+ return;
- // halloween 2010
+S_Halloween2010:
+ if(!hween10) goto S_Return;
set hween10, 0;
set hween10_collect_canpump, 0;
set hween10_credits, 0;
@@ -155,8 +157,10 @@ L_Easter:
set hween10_bonecount, 0;
set hween10_collect_tondel, 0;
set hween10_paid, 0;
+ return;
- // Xmas 2010:
+S_Xmas2010:
+ if(!Xmas2010) goto S_Return;
set Count_Yellow, 0;
set Count_White, 0;
set Maze, 0;
@@ -164,32 +168,34 @@ L_Easter:
set White, 0;
set Xmas2010, 0;
set Golbenez_Inn_Cost, 0;
+ return;
+S_Easter2011:
set QUEST_Easter11, 0;
+ return;
- // contains bad karma information
- // set hw2011, 0;
+S_Halloween2011:
+ set hw2011, 0;
+ return;
+S_Xmas2011:
set xmas11, 0;
+ return;
+S_Easter2012:
set QUEST_Easter12, 0;
+ return;
+S_Xmas2012:
set xmas2012, 0;
+ return;
+S_Angus:
set QUEST_clothdyer_angus, 0;
-
- // Tulimshar and Mine Variables which aren't used anymore
- set Scorp, 0;
- set Bugleg, 0;
- // variable isn't used
set QUEST_clothdyer_state, 0;
- // variable was moved to a temporary player variable
- set KatzeBeenOutside, 0;
- // variable was moved to Nibble 1 of the variable Katze
- set LastHiss, 0;
- // quest was turned into a Daily Quest, so the variable isn't needed anymore
- set CaveSnakeLamp, 0;
+ return;
+S_Bitmask:
// move Scythe quest into bitmasked variable QUEST_Hurnscald
if (QUEST_Scythe_state)
set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_1_MASK)) | (QUEST_Scythe_state << NIBBLE_1_SHIFT);
@@ -206,8 +212,9 @@ L_Easter:
set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (Inspector << NIBBLE_3_SHIFT);
set Inspector, 0;
set @inspector, 0;
+ return;
- //These lines are needed to migrate stuff from variables to flags
+S_Flags:
if (Open_Underground_Palace_Barrier)
set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND;
set Open_Underground_Palace_Barrier, 0;
@@ -227,109 +234,152 @@ L_Easter:
if (ChestQuest)
set FLAGS, FLAGS | FLAG_HURNSMINE_CHEST;
set ChestQuest, 0;
+ return;
- if (#BankAccount < 0)
- goto L_FixBank;
-
- goto L_Fix_Skills;
-
-L_FixBank:
+S_FixBank:
+ if(#BankAccount >= 0) goto S_Return;
if (Zeny >= -#BankAccount)
- goto L_Fix_Full;
-
+ goto S_Fix_Bank_Full;
// Partial fix
set #BankAccount, #BankAccount + Zeny;
set Zeny, 0;
- goto L_Fix_Skills;
+ return;
-L_Fix_Full:
+S_Fix_Bank_Full:
set Zeny, Zeny + #BankAccount;
set #BankAccount, 0;
- goto L_Fix_Skills;
+ return;
-L_Fix_Skills:
- if(getskilllv(SKILL_TRADE) > 0) setskill SKILL_TRADE, 0;
- if(getskilllv(SKILL_PARTY) > 0) setskill SKILL_PARTY, 0;
- if(getskilllv(SKILL_EMOTE) > 0) setskill SKILL_EMOTE, 0;
- goto L_Barber_Janitor;
+S_Remove_Skills:
+ if(getskilllv(SKILL_TRADE) < 1) goto S_Return;
+ setskill SKILL_TRADE, 0;
+ setskill SKILL_PARTY, 0;
+ setskill SKILL_EMOTE, 0;
+ return;
-L_Barber_Janitor:
- callfunc "getHeadStyles"; // this converts class, color and hair
- goto L_Return;
+S_Misc:
+ if(Death_Kill) set Death_Kill, 0;
+ set Scorp, 0; // Tulimshar and Mine Variables which aren't used anymore
+ set Bugleg, 0; // Tulimshar and Mine Variables which aren't used anymore
+ set KatzeBeenOutside, 0; // variable was moved to a temporary player variable
+ set LastHiss, 0; // variable was moved to Nibble 1 of the variable Katze
+ set CaveSnakeLamp, 0; // quest was turned into a Daily Quest, so the variable isn't needed anymore
+ return;
-L_Return:
+S_Tutorial:
+ if(!TUTORIAL && !sorfina) goto S_Return;
+ //TUTORIAL to STARTAREA
+ if ((sorfina) || (kaan) || (hasan) || (tanisha))
+ goto S_ResetAllTut;
+ set @tutorial_tmp, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+ // Tutorial
+ // Nibble 0 (sorfina, tanisha, kaan & hasan)
+ set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ // Nibble 1 (valon)
+ set @tutorial_tmp, ((TUTORIAL & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+ set @valon_done, (TUTORIAL & (1 << 7));
+ set @valon_start, (TUTORIAL & (1 << 6));
+ if (@valon_start)
+ set @tutorial_tmp, (@tutorial_tmp + 2);
+ if (@valon_done)
+ set @tutorial_tmp, 7;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@tutorial_tmp << NIBBLE_1_SHIFT));
+ // Nibble 2 (Counts)
+ set @tutorial_tmp, ((TUTORIAL & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+ set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (@tutorial_tmp << NIBBLE_2_SHIFT));
+ // Nibble 3 (Morgan)
+ set @tutorial_tmp, ((TUTORIAL & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
+ set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@tutorial_tmp << NIBBLE_3_SHIFT));
+ // Nibble 4 (Zegas) Barrels shuffled
+ set @zegas_done, (TUTORIAL & (1 << 23));
+ set @zegas_start, (TUTORIAL & (1 << 16));
+ set @zegas_met, (TUTORIAL & (1 << 30));
+ set @tutorial_tmp, 0;
+ if (@zegas_met)
+ set @tutorial_tmp, 1;
+ if (@zegas_start)
+ set @tutorial_tmp, 2;
+ if (@zegas_done)
+ set @tutorial_tmp, 4;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@tutorial_tmp << NIBBLE_4_SHIFT));
+ // Nibble 5 (Barrels)
+ set @tutorial_tmp, 0;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_5_MASK) | (@tutorial_tmp << NIBBLE_5_SHIFT));
+ // Nibble 6 (Barrels)
+ set STARTAREA, (STARTAREA & ~(NIBBLE_6_MASK) | (@tutorial_tmp << NIBBLE_6_SHIFT));
+ set TUTORIAL, 0;
return;
-}
-// The variable TMW_Quest was used to save the progress in several subquests linearly.
-// The subquests are moved to different nibbles of other variables
-// to make it possible to do some of the quests in parallel.
-function|script|ClearVarTMW_Quest
-{
- if (TMW_Quest == 0) goto L_Done;
- if (TMW_Quest <= 6) goto L_Bernard_Mikhail;
- if (TMW_Quest <= 8) goto L_Sarah;
- if (TMW_Quest <= 10) goto L_Vincent;
- if (TMW_Quest <= 12) goto L_Sandra;
- if (TMW_Quest <= 40) goto L_Desert;
- goto L_Bandit;
-
-L_Bandit:
-// move Bandit subquest into Nibble 0 of QUEST_Hurnscald
- set @bandit, TMW_Quest - 40;
- set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@bandit << NIBBLE_0_SHIFT));
- set TMW_Quest, 40;
- set @bandit, 0;
- goto L_Desert;
+S_ResetAllTut:
+ set sorfina, 0;
+ set tanisha, 0;
+ set hasan, 0;
+ set kaan, 0;
+ set TUTORIAL, 0;
+ set STARTAREA, 0;
+ set FLAGS, FLAGS &~ FLAG_TUTORIAL_DONE;
+ return;
-L_Desert:
-// move guard and miner subquest into Byte 2 (Nibble 4 and 5) of QUEST_SouthTulimshar
+S_Heathin:
+ if(!HEATHIN_QUEST) goto S_Return;
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_6_MASK)) | (HEATHIN_QUEST << NIBBLE_6_SHIFT);
+ set HEATHIN_QUEST, 0;
+ return;
+
+S_Desert: // move guard and miner subquest into Byte 2 (Nibble 4 and 5) of QUEST_SouthTulimshar
+ if(!TMW_QUEST || TMW_QUEST > 40) goto S_Return;
set @miners, TMW_Quest - 12;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@miners << BYTE_2_SHIFT));
set TMW_Quest, 12;
set @miners, 0;
- goto L_Sandra;
+ return;
-L_Sandra:
-// move Sandra subquest into Nibble 3 of QUEST_SouthTulimshar
+S_Sandra: // move Sandra subquest into Nibble 3 of QUEST_SouthTulimshar
+ if(!TMW_QUEST || TMW_QUEST > 12) goto S_Return;
set @sandra, TMW_Quest - 10;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_3_MASK) | (@sandra << NIBBLE_3_SHIFT));
set TMW_Quest, 10;
set @sandra, 0;
- goto L_Vincent;
+ return;
-L_Vincent:
-// move Vincent subquest into Nibble 2 of QUEST_SouthTulimshar
+S_Vincent: // move Vincent subquest into Nibble 2 of QUEST_SouthTulimshar
+ if(!TMW_QUEST || TMW_QUEST > 10) goto S_Return;
set @vincent, TMW_Quest - 8;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (@vincent << NIBBLE_2_SHIFT));
set TMW_Quest, 8;
set @vincent, 0;
- goto L_Sarah;
+ return;
-L_Sarah:
-// move Sarah subquest into Nibble 1 of QUEST_SouthTulimshar
+S_Sarah: // move Sarah subquest into Nibble 1 of QUEST_SouthTulimshar
+ if(!TMW_QUEST || TMW_QUEST > 8) goto S_Return;
set @sarah, TMW_Quest - 6;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_1_MASK) | (@sarah << NIBBLE_1_SHIFT));
set TMW_Quest, 6;
set @sarah, 0;
- goto L_Bernard_Mikhail;
+ return;
-L_Bernard_Mikhail:
-// move Bernard and Mikhail subquest into Nibble 0 of QUEST_SouthTulimshar
+S_Bernard_Mikhail: // move Bernard and Mikhail subquest into Nibble 0 of QUEST_SouthTulimshar
+ if(!TMW_QUEST || TMW_QUEST > 6) goto S_Return;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_0_MASK) | (TMW_Quest << NIBBLE_0_SHIFT));
set TMW_Quest, 0;
- goto L_Done;
+ return;
-L_Done:
+S_Bandit: // move Bandit subquest into Nibble 0 of QUEST_Hurnscald
+ if(!TMW_QUEST) goto S_Return;
+ set @bandit, TMW_Quest - 40;
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@bandit << NIBBLE_0_SHIFT));
+ set TMW_Quest, 40;
+ set @bandit, 0;
return;
-}
--|script|#ClearGlobalVars|-1
-{
- end;
+L_Deprecated:
+ debugmes "Explicitely calling ClearVariables after login is deprecated.";
+ mapexit;
+}
-OnInit:
+function|script|ClearGlobalVars
+{
// Clear some entries of the arrays which save the Fluffy Hunting highscore list
set $@loop, 5;
goto L_FluffyClear;
@@ -387,6 +437,5 @@ L_EventClear:
// Variable was used in Voltain's script, was renamed and turned into a temporary variable
set $state, 0;
-
end;
}
diff --git a/world/map/npc/functions/debug.txt b/world/map/npc/functions/debug.txt
index c0368276..7885c821 100755
--- a/world/map/npc/functions/debug.txt
+++ b/world/map/npc/functions/debug.txt
@@ -59,12 +59,12 @@ L_Status:
"Close.", L_Close;
L_ChangeAllStats:
- statusup2 bStr, 99 - readparam(bStr);
- statusup2 bAgi, 99 - readparam(bAgi);
- statusup2 bVit, 99 - readparam(bVit);
- statusup2 bInt, 99 - readparam(bInt);
- statusup2 bDex, 99 - readparam(bDex);
- statusup2 bLuk, 99 - readparam(bLuk);
+ set Str, 99;
+ set Agi, 99;
+ set Vit, 99;
+ set Int, 99;
+ set Dex, 99;
+ set Luk, 99;
mes "You now have 99 in all stats.";
next;
goto L_Begin;
@@ -76,7 +76,7 @@ L_ChangeStrength:
goto L_StatTooLow;
if (@str > 99)
goto L_StatTooHigh;
- statusup2 bStr, @str - readparam(bStr);
+ set Str, @str;
goto L_ChangeAgility;
L_ChangeAgility:
@@ -86,7 +86,7 @@ L_ChangeAgility:
goto L_StatTooLow;
if (@agi > 99)
goto L_StatTooHigh;
- statusup2 bAgi, @agi - readparam(bAgi);
+ set Agi, @agi;
goto L_ChangeVitality;
L_ChangeVitality:
@@ -96,7 +96,7 @@ L_ChangeVitality:
goto L_StatTooLow;
if (@vit > 99)
goto L_StatTooHigh;
- statusup2 bVit, @vit - readparam(bVit);
+ set Vit, @vit;
goto L_ChangeIntelligence;
L_ChangeIntelligence:
@@ -106,7 +106,7 @@ L_ChangeIntelligence:
goto L_StatTooLow;
if (@int > 99)
goto L_StatTooHigh;
- statusup2 bInt, @int - readparam(bInt);
+ set Int, @int;
goto L_ChangeDexterity;
L_ChangeDexterity:
@@ -116,7 +116,7 @@ L_ChangeDexterity:
goto L_StatTooLow;
if (@dex > 99)
goto L_StatTooHigh;
- statusup2 bDex, @dex - readparam(bDex);
+ set Dex, @dex;
goto L_ChangeLuck;
L_ChangeLuck:
@@ -126,13 +126,13 @@ L_ChangeLuck:
goto L_StatTooLow;
if (@luk > 99)
goto L_StatTooHigh;
- statusup2 bLuk, @luk - readparam(bLuk);
- mes "You now have " + readparam(bStr) + " in strength.";
- mes "You now have " + readparam(bAgi) + " in agility.";
- mes "You now have " + readparam(bVit) + " in vitality.";
- mes "You now have " + readparam(bInt) + " in intelligence.";
- mes "You now have " + readparam(bDex) + " in dexterity.";
- mes "You now have " + readparam(bLuk) + " in luck.";
+ set Luk, @luk;
+ mes "You now have " + Str + " in strength.";
+ mes "You now have " + Agi + " in agility.";
+ mes "You now have " + Vit + " in vitality.";
+ mes "You now have " + Int + " in intelligence.";
+ mes "You now have " + Dex + " in dexterity.";
+ mes "You now have " + Luk + " in luck.";
next;
goto L_Begin;
@@ -165,8 +165,8 @@ L_ChangeStrengthSingle:
goto L_StatTooLow;
if (@str > 99)
goto L_StatTooHigh;
- statusup2 bStr, @str - readparam(bStr);
- mes "You now have " + readparam(bStr) + " in strength.";
+ set Str, @str;
+ mes "You now have " + Str + " in strength.";
next;
goto L_Begin;
@@ -177,8 +177,8 @@ L_ChangeAgilitySingle:
goto L_StatTooLow;
if (@agi > 99)
goto L_StatTooHigh;
- statusup2 bAgi, @agi - readparam(bAgi);
- mes "You now have " + readparam(bAgi) + " in agility.";
+ set Agi, @agi;
+ mes "You now have " + Agi + " in agility.";
next;
goto L_Begin;
@@ -189,8 +189,8 @@ L_ChangeVitalitySingle:
goto L_StatTooLow;
if (@vit > 99)
goto L_StatTooHigh;
- statusup2 bVit, @vit - readparam(bVit);
- mes "You now have " + readparam(bVit) + " in vitality.";
+ set Vit, @vit;
+ mes "You now have " + Vit + " in vitality.";
next;
goto L_Begin;
@@ -201,8 +201,8 @@ L_ChangeIntelligenceSingle:
goto L_StatTooLow;
if (@int > 99)
goto L_StatTooHigh;
- statusup2 bInt, @int - readparam(bInt);
- mes "You now have " + readparam(bInt) + " in intelligence.";
+ set Int, @int;
+ mes "You now have " + Int + " in intelligence.";
next;
goto L_Begin;
@@ -213,8 +213,8 @@ L_ChangeDexteritySingle:
goto L_StatTooLow;
if (@dex > 99)
goto L_StatTooHigh;
- statusup2 bDex, @dex - readparam(bDex);
- mes "You now have " + readparam(bDex) + " in dexterity.";
+ set Dex, @dex;
+ mes "You now have " + Dex + " in dexterity.";
next;
goto L_Begin;
@@ -225,8 +225,8 @@ L_ChangeLuckSingle:
goto L_StatTooLow;
if (@luk > 99)
goto L_StatTooHigh;
- statusup2 bLuk, @luk - readparam(bLuk);
- mes "You now have " + readparam(bLuk) + " in luck.";
+ set Luk, @luk;
+ mes "You now have " + Luk + " in luck.";
next;
goto L_Begin;
diff --git a/world/map/npc/functions/default_npc_checks.txt b/world/map/npc/functions/default_npc_checks.txt
index 446cf961..d20ed187 100644
--- a/world/map/npc/functions/default_npc_checks.txt
+++ b/world/map/npc/functions/default_npc_checks.txt
@@ -1,13 +1,16 @@
// Default NPC Checks
-// Author: Wushin
+// Author: Wushin, mekolat
// Range
-// Map, X, Y, Distance in Tiles
-// setarray @npc_loc, 24, 113, 4;
+// Distance in Tiles
+// set @npc_distance, 4;
function|script|PCtoNPCRange
{
set @npc_check, 0;
- set @Nmap$, getmap() + "";
+ set @Nmap$, strnpcinfo(3);
+ if(!@npc_distance) set @npc_distance, 4; // <== default distance
+ cleararray @npc_loc, 0, 3;
+ setarray @npc_loc, getnpcx(), getnpcy(), @npc_distance;
set @Nx1, (@npc_loc[0] - @npc_loc[2]);
set @Ny1, (@npc_loc[1] - @npc_loc[2]);
set @Nx2, (@npc_loc[0] + @npc_loc[2]);
@@ -15,9 +18,22 @@ function|script|PCtoNPCRange
if (isin(@Nmap$, @Nx1, @Ny1, @Nx2, @Ny2))
goto L_Return;
set @npc_check, 1;
+ if(@distance_handler) goto L_Return;
+ set @dnpc_name$, strnpcinfo(1);
+ if(@dnpc_name$ != "") goto L_Named;
+ mes "You need to move closer to interact with this npc.";
+ close2;
goto L_Return;
+L_Named:
+ message strcharinfo(0), "##3"+@dnpc_name$+" : ##BPlease move closer.";
+ end;
+
L_Return:
+ set @dnpc_name$, "";
+ set @distance_handler, 0;
+ set @npc_distance, 0;
+ cleararray @npc_loc, 0, 3;
return;
}
@@ -109,7 +125,7 @@ L_ReturnMissing:
goto L_MissingMsg;
L_MissingMsg:
- mes "[@@"+@delitem_ids[@msg_loop]+"|"+getitemname(@delitem_ids[@msg_loop])+"@@] "+countitem(getitemname(@delitem_ids[@msg_loop]))+"/"+@delitem_counts[@msg_loop];
+ mes "[@@"+@delitem_ids[@msg_loop]+"|"+getitemlink(@delitem_ids[@msg_loop])+"@@] "+countitem(getitemlink(@delitem_ids[@msg_loop]))+"/"+@delitem_counts[@msg_loop];
goto L_NextMsgCheck;
L_NextMsgCheck:
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 45efcaae..9ce44a38 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -1,44 +1,34 @@
-017-9,0,0,0|script|#GlobalHandler|-1
+// This is the global event dispatcher
+// Do not add code to this file. Please only add callfuncs
+//
+// Author: meko
+
+-|script|#GlobalHandler|-1
{
end;
-OnPCLoginEvent: // this does not work yet but as soon as it is implemented it will start working
- callfunc "ClearVariables";
+OnPCLoginEvent:
+ set @login_event, 1;
+ callfunc "getHeadStyles"; // converts class, color and hair
+ callfunc "ClearVariables"; // removes / converts old variables
+ // add more here
+ set @login_event, 2;
end;
OnPCKillEvent:
- set Death_Kill, Death_Kill + 1; // this counts the number of players you have killed
+ callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things
end;
OnPCKilledEvent:
- goto L_Fightclub_Killed; // this is used by the 1v1 arena
+ callfunc "fightclub_event_killed"; // this is used by the 1v1 arena
+ end;
OnPCDieEvent:
callfunc "fightclub_GoBack"; // this used by the battle master
- goto L_Fightclub_Die; // this is used by the 1v1 arena
-
-// custom handlers below
-
-L_Fightclub_Killed:
- set @duel_killer, 0;
- if(@Duel_Fighter != 1) goto L_End;
- if(getmap() != "009-7") goto L_End;
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- set $@duel_winner, @killerrid; // grab the rid of the killer
- set @killerrid, 0; // reset killerid
- callfunc "fightclub_death";
- goto L_End;
-
-L_Fightclub_Die:
- set @duel_killer, 0;
- if(@Duel_Fighter != 1) goto L_End;
- if(getmap() != "009-7") goto L_End;
- set @killerrid, 0; // since the player was not murdered, the killerrid is 0
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- callfunc "fightclub_death";
- goto L_End;
+ callfunc "fightclub_event_die"; // this is used by the 1v1 arena
+ end;
-L_End:
- if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel;
+OnInit: //fixme: change to OnInterIfInit
+ callfunc "ClearGlobalVars";
end;
}
diff --git a/world/map/npc/functions/inn.txt b/world/map/npc/functions/inn.txt
index ffa75582..e45c398c 100644
--- a/world/map/npc/functions/inn.txt
+++ b/world/map/npc/functions/inn.txt
@@ -2,12 +2,13 @@
function|script|Inn
{
+ if(@npcname$ == "") set @npcname$, strnpcinfo(1);
mes "[" + @npcname$ + "]";
mes "\"Would you like to rest? It's only " + @cost + " gp.\"";
next;
menu
"Yes", L_Next,
- "No", L_No;
+ "No", L_Close;
L_Next:
if (Zeny < @cost)
@@ -17,15 +18,18 @@ L_Next:
mes "[" + @npcname$ + "]";
mes "\"Sleep well!\"";
- close;
+ next;
+ goto L_Close;
-L_No:
+L_Close:
mes "[" + @npcname$ + "]";
mes "\"See you.\"";
+ set @npcname$, "";
close;
L_NoMoney:
mes "[" + @npcname$ + "]";
mes "\"You don't have enough money to stay here.\"";
- close;
+ next;
+ goto L_Close;
}
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index 7f1cb1db..ba2910b1 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -138,8 +138,8 @@ function|script|MobPoints
if (MPQUEST == 1)
set Mobpt, Mobpt + @points[@mobID - 1002];
- callfunc "ValonState";
- if (((@valon_state >= 2) && (@valon_state < 6)) && (@mobID == $@ValonMob[@valon_mob]))
+ callfunc "ValonCount";
+ if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobID == $@ValonMob[@valon_mob]))
goto L_ValonMobKill;
goto L_NatureKarma;
diff --git a/world/map/npc/functions/stat_reset.txt b/world/map/npc/functions/stat_reset.txt
index d8f484ff..fdb833f7 100644
--- a/world/map/npc/functions/stat_reset.txt
+++ b/world/map/npc/functions/stat_reset.txt
@@ -8,7 +8,7 @@ function|script|StatReset
set @cost, BaseLevel * 100;
- mes "[" + @NpcName$ + "]";
+ mes "[" + @npcname$ + "]";
mes "\"I have come across a spell that will";
mes "reset your status points.";
mes "Normally this spell is expensive, but";
@@ -31,19 +31,19 @@ L_Reset:
set Zeny, Zeny-@cost;
resetstatus;
- mes "[" + @NpcName$ + "]";
+ mes "[" + @npcname$ + "]";
mes "\"There you are.";
mes "";
mes "Good as new!\"";
goto L_Return;
L_Pass:
- mes "[" + @NpcName$ + "]";
+ mes "[" + @npcname$ + "]";
mes "\"Very well then, see you.\"";
goto L_Return;
L_NoMoney:
- mes "[" + @NpcName$ + "]";
+ mes "[" + @npcname$ + "]";
mes "\"Oh dear, the price cannot be bargained.";
mes "";
mes "Perhaps you can borrow from a friend?\"";
diff --git a/world/map/npc/functions/time.txt b/world/map/npc/functions/time.txt
index 7d16a200..bd80a1b1 100644
--- a/world/map/npc/functions/time.txt
+++ b/world/map/npc/functions/time.txt
@@ -75,6 +75,7 @@ function|script|HumanTime
if(@seconds) set @ms, @ms + (@seconds * 1000);
if(@minutes) set @ms, @ms + (@minutes * 60000);
if(@days) set @ms, @ms + (@days * 1440000);
+ if(@ms < 0) goto L_TooShort;
if(@ms < 1000) goto L_Millis; // under 1 second we have nothing to count
set @seconds, @ms / 1000;
set @ms, @ms % 1000;
@@ -90,6 +91,10 @@ function|script|HumanTime
if(@days) goto L_Days;
goto L_Clean;
+L_TooShort:
+ debugmes "HumanTime: negative value: "+@ms;
+ mapexit;
+
L_Millis:
set @time$, @ms + "ms";
return;
diff --git a/world/map/npc/functions/travelers.txt b/world/map/npc/functions/travelers.txt
index 07b084d9..88a9ed9d 100644
--- a/world/map/npc/functions/travelers.txt
+++ b/world/map/npc/functions/travelers.txt
@@ -46,7 +46,8 @@ OnInit:
function|script|TravelerTut
{
//Explain Travelers
- mes "["+@NpcName$+"]";
+ if(@npcname$ == "") set @npcname$, strnpcinfo(1);
+ mes "["+@npcname$+"]";
mes "\"We travelers are found all over the world. Once you have found another traveler, we can create a link and send you between us.\"";
next;
if (TravelFound & $@tut_bit)
@@ -58,13 +59,15 @@ L_SetBit:
goto L_Return;
L_Return:
+ set @npcname$, "";
return;
}
function|script|Traveler
{
- mes "["+@NpcName$+"]";
- mes "\"Greetings. I am "+@NpcName$+" the Traveler.\"";
+ if(@npcname$ == "") set @npcname$, strnpcinfo(1);
+ mes "["+@npcname$+"]";
+ mes "\"Greetings. I am "+@npcname$+" the Traveler.\"";
next;
if (TravelFound & $@tut_bit)
@@ -87,7 +90,7 @@ L_TravelTut:
goto L_Main;
L_SetTravelBit:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Uplink Set. You can now return to this spot for a fee.\"";
next;
set TravelFound, TravelFound | @NpcTravelBit;
@@ -120,7 +123,7 @@ L_TravelChecks:
goto L_TravelPlayer;
L_TravelPlayer:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Be fearless!\"";
close2;
set Zeny, Zeny - @NextLocationCost;
@@ -223,30 +226,31 @@ L_TravelCandor:
goto L_TravelChecks;
L_TravelNo:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Perhaps some day you will have the courage to help us.\"";
close2;
goto L_Clearvars;
L_NoMoney:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Sorry, but you don't have enough money. Maybe next time.\"";
close2;
goto L_Clearvars;
L_NoFound:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Sorry, but you haven't visited a traveler yet at that location. You should talk to a traveler there so you can quickly travel there in the future.\"";
close2;
goto L_Clearvars;
L_AlreadyThere:
- mes "["+@NpcName$+"]";
+ mes "["+@npcname$+"]";
mes "\"Umm, you are already here. Are you sure you know where you are going?\"";
close2;
goto L_Clearvars;
L_Clearvars:
+ set @npcname$, "";
set @Cost, 0;
set @NextLocationBit, 0;
set @NextLocationCost, 0;
diff --git a/world/map/npc/items/check_wand.txt b/world/map/npc/items/check_wand.txt
index 43190a85..5a339049 100644
--- a/world/map/npc/items/check_wand.txt
+++ b/world/map/npc/items/check_wand.txt
@@ -48,8 +48,7 @@ L_Loop:
L_SetWand:
set @Wand, $@WandsPwr[@wand_loop];
set @WandID, $@WandsAnim[@wand_loop];
- callfunc "MorganState";
- if (@morgan == 2)
+ if (QL_MORGAN == 2)
goto L_SetCastOnce;
goto L_Return;
@@ -60,8 +59,7 @@ L_LoopAgain:
goto L_Loop;
L_SetCastOnce:
- set @morgan_tmp, 3;
- callfunc "SetMorganMask";
+ set QL_MORGAN, 3;
goto L_Return;
L_Return:
diff --git a/world/map/npc/items/magic_gm_top_hat.txt b/world/map/npc/items/magic_gm_top_hat.txt
index f4f6b078..129aa5c0 100644
--- a/world/map/npc/items/magic_gm_top_hat.txt
+++ b/world/map/npc/items/magic_gm_top_hat.txt
@@ -9,7 +9,7 @@ function|script|ActivateMagicGMTophat
// Display an effect
misceffect FX_CHANNELLING_CAST, strcharinfo(0);
// Log the usage of this spell
- gmcommand "@l "+strcharinfo(0)+" used the Magic GM Top Hat.";
+ gmlog strcharinfo(0)+" used the Magic GM Top Hat.";
return;
L_Inventory:
diff --git a/world/map/npc/items/require_stat.txt b/world/map/npc/items/require_stat.txt
index 40200ea9..87ecf22a 100644
--- a/world/map/npc/items/require_stat.txt
+++ b/world/map/npc/items/require_stat.txt
@@ -4,23 +4,20 @@
// This is passed automagically when called in an equip script.
// @bStat The stat to check against.
// Usually one of: bStr, bAgi, bVit, bInt, bDex, bLuk;
-// but can be anything that works with readparam().
+// but can be anything that works with .
// @minbStatVal The minimum stat value to accept this item.
// ------------------------------------------------------------
function|script|RequireStat
{
- set @bStatVal, readparam(@bStat);
+ set @bStatVal, @bStat;
// If the requirement isn't met, we set an unequip trigger.
// The item is now removed.
- if (@bStatVal < @minbStatVal)
+ if (@bStat < @minbStatVal)
goto L_Unequip;
- goto L_Return;
+ return;
L_Unequip:
callfunc "UnequipLater";
- goto L_Return;
-
-L_Return:
return;
}
diff --git a/world/map/npc/items/restricted_item.txt b/world/map/npc/items/restricted_item.txt
index c0084408..9bd1c3d5 100644
--- a/world/map/npc/items/restricted_item.txt
+++ b/world/map/npc/items/restricted_item.txt
@@ -13,8 +13,8 @@ function|script|RestrictedItem
message strcharinfo(0), "This item repells you with extreme force. It does not seem to be meant for you.";
callfunc "UnequipLater";
if (getgmlevel()) goto L_Return;
- gmcommand "@wgm Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
- gmcommand "@l Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
+ wgm "Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
+ gmlog "Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
goto L_Return;
L_Return: