summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
Diffstat (limited to 'world')
-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/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/weellos.txt12
-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-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-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/006-1/miriam.txt2
-rw-r--r--world/map/npc/007-1/voltain.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/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-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/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/018-2/angus.txt2
-rw-r--r--world/map/npc/018-2/books.txt2
-rw-r--r--world/map/npc/018-2/caul.txt2
-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-2/banker.txt1
-rw-r--r--world/map/npc/027-2/gy_inn_shops.txt1
-rw-r--r--world/map/npc/029-1/hasan.txt24
-rw-r--r--world/map/npc/029-1/hideandseek.txt97
-rw-r--r--world/map/npc/029-1/kaan.txt18
-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/tutorial.txt25
-rw-r--r--world/map/npc/029-1/valon.txt43
-rw-r--r--world/map/npc/029-1/vincent.txt22
-rw-r--r--world/map/npc/029-1/zegas.txt20
-rw-r--r--world/map/npc/029-2/barrels_config.txt18
-rw-r--r--world/map/npc/029-2/morgan.txt33
-rw-r--r--world/map/npc/029-2/sorfina.txt43
-rw-r--r--world/map/npc/029-2/tanisha.txt39
-rw-r--r--world/map/npc/031-2/cindyHouse.txt2
-rw-r--r--world/map/npc/annuals/halloween/trick_or_treat.txt4
-rw-r--r--world/map/npc/annuals/xmas/core.txt3
-rw-r--r--world/map/npc/functions/DyeConfig.txt4
-rw-r--r--world/map/npc/functions/clear_vars.txt403
-rw-r--r--world/map/npc/functions/default_npc_checks.txt2
-rw-r--r--world/map/npc/functions/global_event_handler.txt48
-rw-r--r--world/map/npc/functions/mob_points.txt4
-rw-r--r--world/map/npc/items/magic_gm_top_hat.txt2
-rw-r--r--world/map/npc/items/restricted_item.txt4
104 files changed, 1053 insertions, 1596 deletions
diff --git a/world/map/conf/atcommand_athena.conf b/world/map/conf/atcommand_athena.conf
index cbf0f791..8b182ab8 100644
--- a/world/map/conf/atcommand_athena.conf
+++ b/world/map/conf/atcommand_athena.conf
@@ -47,6 +47,7 @@ summon: 50
charpvp: 60
charstatsall: 60
pvpoff: 60
+exprate: 60
pvpon: 60
speed: 60
killmonster: 60
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/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/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/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-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-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/006-1/miriam.txt b/world/map/npc/006-1/miriam.txt
index 6580664f..f513955b 100644
--- a/world/map/npc/006-1/miriam.txt
+++ b/world/map/npc/006-1/miriam.txt
@@ -162,7 +162,7 @@ L_teach:
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;
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/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/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-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/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/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..2a1a2769 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;
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-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-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/hasan.txt b/world/map/npc/029-1/hasan.txt
index a5d3894b..99e5ea1e 100644
--- a/world/map/npc/029-1/hasan.txt
+++ b/world/map/npc/029-1/hasan.txt
@@ -12,7 +12,7 @@
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;
@@ -33,16 +33,15 @@ L_End:
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 +59,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 +110,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 +149,7 @@ L_Close:
close;
OnTouch:
- if (@tutorial >= 13)
+ if (QL_BEGIN >= 13)
end;
goto L_Main;
}
@@ -187,10 +184,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..57ab1d4c 100644
--- a/world/map/npc/029-1/kaan.txt
+++ b/world/map/npc/029-1/kaan.txt
@@ -8,13 +8,13 @@
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:
@@ -69,8 +69,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 +90,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/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/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..89398635 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;
@@ -75,14 +68,14 @@ OnInit:
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 +95,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 +111,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 +134,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..49b9a5c5 100644
--- a/world/map/npc/029-1/zegas.txt
+++ b/world/map/npc/029-1/zegas.txt
@@ -8,14 +8,13 @@
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;
@@ -32,8 +31,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 +47,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;
@@ -65,8 +62,7 @@ L_QuestEnd:
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 +82,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_config.txt b/world/map/npc/029-2/barrels_config.txt
index 665903fb..1b83d25b 100644
--- a/world/map/npc/029-2/barrels_config.txt
+++ b/world/map/npc/029-2/barrels_config.txt
@@ -14,18 +14,6 @@ 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;
@@ -55,8 +43,7 @@ function|script|CheckBarrel
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;
@@ -86,8 +73,7 @@ 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;
diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt
index f6679f67..605169ab 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,6 +25,7 @@ OnInit:
}
029-2,101,57,0|script|Morgan#_M|355
{
+ callfunc "ClearVariables";
setarray @npc_loc, 101, 57, 4;
callfunc "PCtoNPCRange";
if (@npc_check)
@@ -47,21 +36,20 @@ OnInit:
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 +74,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 +102,6 @@ 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";
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..a7da1b31 100644
--- a/world/map/npc/029-2/sorfina.txt
+++ b/world/map/npc/029-2/sorfina.txt
@@ -9,12 +9,11 @@
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 +59,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 +96,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 +222,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 +242,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 +259,7 @@ OnTouch:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial != 1)
+ if (QL_BEGIN != 1)
end;
mes "[Sorfina]";
mes "\"You should get dressed now.\"";
@@ -274,8 +267,7 @@ 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;
}
@@ -285,9 +277,8 @@ OnTouch:
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 +295,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 +312,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/tanisha.txt b/world/map/npc/029-2/tanisha.txt
index 450bc77c..eadb2164 100644
--- a/world/map/npc/029-2/tanisha.txt
+++ b/world/map/npc/029-2/tanisha.txt
@@ -12,15 +12,14 @@
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 +29,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 +65,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 +113,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 +122,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 +130,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 +256,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 +276,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/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..f154794d 100644
--- a/world/map/npc/annuals/xmas/core.txt
+++ b/world/map/npc/annuals/xmas/core.txt
@@ -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/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/default_npc_checks.txt b/world/map/npc/functions/default_npc_checks.txt
index 446cf961..deb3ba64 100644
--- a/world/map/npc/functions/default_npc_checks.txt
+++ b/world/map/npc/functions/default_npc_checks.txt
@@ -109,7 +109,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/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/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/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: