summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-06-23 18:57:52 -0500
committerwushin <pasekei@gmail.com>2014-06-25 10:50:14 -0500
commit623f98ef8f4efa72d6ff7355517b0ace7235ef72 (patch)
tree033e71b068509c506ee9be57cdebd0d361c65381
parent511dc33bfe89c98251579d72ff7f3fa795e29d15 (diff)
downloadserverdata-623f98ef8f4efa72d6ff7355517b0ace7235ef72.tar.gz
serverdata-623f98ef8f4efa72d6ff7355517b0ace7235ef72.tar.bz2
serverdata-623f98ef8f4efa72d6ff7355517b0ace7235ef72.tar.xz
serverdata-623f98ef8f4efa72d6ff7355517b0ace7235ef72.zip
Starting Area Redux
* Tutorial is a quick funnel * Exits are obvious and open * New Side Quests ** Valon's Beast Mastery ** Zegas's Barrels ** Magic Wand * Some Quests stay open after tutorial is done * House Maggot & Tame Scorpion added * Made Magic usable for lowbies with Wand
-rw-r--r--world/map/conf/magic-base.sex38
-rw-r--r--world/map/data/041-1.wlkbin18754 -> 18754 bytes
-rw-r--r--world/map/data/042-1.wlkbin22564 -> 22564 bytes
-rw-r--r--world/map/data/042-2.wlkbin7704 -> 15404 bytes
-rw-r--r--world/map/data/042-3.wlkbin0 -> 5604 bytes
-rw-r--r--world/map/data/resnametable.txt1
-rw-r--r--world/map/db/0_19_mob_db.txt2
-rw-r--r--world/map/db/const.txt1
-rw-r--r--world/map/db/over_100_mob_db.txt1
-rw-r--r--world/map/db/weapon_item_db.txt4
-rw-r--r--world/map/npc/006-1/pachua.txt2
-rw-r--r--world/map/npc/022-1/_warps.txt1
-rw-r--r--world/map/npc/022-1/tutorial.txt53
-rw-r--r--world/map/npc/024-1/_warps.txt1
-rw-r--r--world/map/npc/024-2/barrier.txt11
-rw-r--r--world/map/npc/024-2/tyer.txt2
-rw-r--r--world/map/npc/024-2/tyer_trigger.txt18
-rw-r--r--world/map/npc/041-1/_import.txt1
-rw-r--r--world/map/npc/041-1/_mobs.txt14
-rw-r--r--world/map/npc/041-1/_warps.txt1
-rw-r--r--world/map/npc/041-1/tutorial.txt11
-rw-r--r--world/map/npc/042-1/_import.txt4
-rw-r--r--world/map/npc/042-1/_mobs.txt8
-rw-r--r--world/map/npc/042-1/_warps.txt8
-rw-r--r--world/map/npc/042-1/hasan.txt170
-rw-r--r--world/map/npc/042-1/kaan.txt24
-rw-r--r--world/map/npc/042-1/liana.txt (renamed from world/map/npc/042-1/npcs.txt)0
-rw-r--r--world/map/npc/042-1/tutorial.txt10
-rw-r--r--world/map/npc/042-1/valon.txt171
-rw-r--r--world/map/npc/042-1/zegas.txt106
-rw-r--r--world/map/npc/042-2/_import.txt5
-rw-r--r--world/map/npc/042-2/_mobs.txt6
-rw-r--r--world/map/npc/042-2/_warps.txt4
-rw-r--r--world/map/npc/042-2/barrels.txt48
-rw-r--r--world/map/npc/042-2/barrels_config.txt109
-rw-r--r--world/map/npc/042-2/magic_basement.txt21
-rw-r--r--world/map/npc/042-2/morgan.txt142
-rw-r--r--world/map/npc/042-2/sorfina.txt72
-rw-r--r--world/map/npc/042-2/stat_reset.txt42
-rw-r--r--world/map/npc/042-2/tanisha.txt85
-rw-r--r--world/map/npc/042-3/_import.txt5
-rw-r--r--world/map/npc/042-3/_mobs.txt9
-rw-r--r--world/map/npc/042-3/_warps.txt5
-rw-r--r--world/map/npc/_import.txt1
-rw-r--r--world/map/npc/functions/clear_vars.txt2
-rw-r--r--world/map/npc/functions/default_npc_checks.txt74
-rw-r--r--world/map/npc/functions/mob_points.txt11
-rw-r--r--world/map/npc/items/check_wand.txt65
-rw-r--r--world/map/npc/scripts.conf1
49 files changed, 1105 insertions, 265 deletions
diff --git a/world/map/conf/magic-base.sex b/world/map/conf/magic-base.sex
index 8f3b9978..58e4a6de 100644
--- a/world/map/conf/magic-base.sex
+++ b/world/map/conf/magic-base.sex
@@ -407,6 +407,44 @@
"--------------------------------------------------------------------------------"
"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)
+ (SET damage
+ (* (script_int caster "@Wand")
+ (/ spellpower
+ 3)))
+ (SET damage_bonus
+ (* (script_int caster "@Wand")
+ (/ spellpower
+ 3)))
+ (CALL install_attack_spell
+ (+ (script_int caster "@Wand")
+ (/ spellpower 10))
+ 1200
+ 3
+ 33)
+ (CALL gain_xp 1 3)
+ (ATTRIGGER
+ (CALL attack_check target)
+ (SCRIPT "{callfunc \"WandMana\";}")
+ (IF (==
+ (script_int caster "@WandAttack")
+ 0)
+ (ABORT))
+ (CALL elt_damage target damage damage_bonus ELT_NEUTRAL ELT_NEUTRAL 5))
+)))
+
(SPELL () ask-magic-exp "#abizit" ()
(LET level 0)
(LET school MAGIC)
diff --git a/world/map/data/041-1.wlk b/world/map/data/041-1.wlk
index e32e4713..908a9977 100644
--- a/world/map/data/041-1.wlk
+++ b/world/map/data/041-1.wlk
Binary files differ
diff --git a/world/map/data/042-1.wlk b/world/map/data/042-1.wlk
index 85c5ced3..ccd506c8 100644
--- a/world/map/data/042-1.wlk
+++ b/world/map/data/042-1.wlk
Binary files differ
diff --git a/world/map/data/042-2.wlk b/world/map/data/042-2.wlk
index 35db011b..77f96ce9 100644
--- a/world/map/data/042-2.wlk
+++ b/world/map/data/042-2.wlk
Binary files differ
diff --git a/world/map/data/042-3.wlk b/world/map/data/042-3.wlk
new file mode 100644
index 00000000..a57e8126
--- /dev/null
+++ b/world/map/data/042-3.wlk
Binary files differ
diff --git a/world/map/data/resnametable.txt b/world/map/data/resnametable.txt
index 4d305886..9284d5e9 100644
--- a/world/map/data/resnametable.txt
+++ b/world/map/data/resnametable.txt
@@ -103,6 +103,7 @@
041-1.gat#041-1.wlk#
042-1.gat#042-1.wlk#
042-2.gat#042-2.wlk#
+042-3.gat#042-3.wlk#
043-1.gat#043-1.wlk#
043-3.gat#043-3.wlk#
043-4.gat#043-4.wlk#
diff --git a/world/map/db/0_19_mob_db.txt b/world/map/db/0_19_mob_db.txt
index f570fce1..36169593 100644
--- a/world/map/db/0_19_mob_db.txt
+++ b/world/map/db/0_19_mob_db.txt
@@ -1,5 +1,7 @@
//ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop1id,Drop1per,Drop2id,Drop2%, Drop3id,Drop3%, Drop4id,Drop4%, Drop5id,Drop5%, Drop6id,Drop6%, Drop7id,Drop7%, Drop8id,Drop8%, Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
1002, Maggot, Maggot, 5, 50, 0, 0, 1, 1, 5, 10, 0, 5, 1, 1, 1, 0, 6, 5, 1, 1, 1, 3, 21, 129, 800, 1872, 672, 480, 505, 800, 501, 150, 518, 400, 533, 150, 502, 70, 522, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1046, TameScorpion, TameScorpion, 5, 50, 0, 0, 2, 1, 7, 10, 0, 5, 1, 1, 1, 0, 15, 5, 1, 1, 1, 3, 20, 129, 2000, 1872, 672, 480, 507, 700, 510, 100, 509, 50, 518, 700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1050, HouseMaggot, HouseMaggot, 5, 50, 0, 0, 3, 1, 7, 7, 0, 5, 5, 5, 1, 0, 6, 5, 1, 1, 1, 3, 21, 133, 700, 1872, 672, 480, 505, 800, 501, 150, 518, 400, 533, 150, 502, 70, 522, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1003, Scorpion, Scorpion, 10, 100, 0, 0, 2, 1, 10, 15, 0, 5, 1, 1, 1, 0, 15, 5, 1, 1, 1, 3, 20, 129, 2000, 1872, 672, 480, 507, 700, 510, 100, 509, 50, 518, 700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1029, MauvePlant, MauvePlant, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 22, 0, 800, 800, 672, 480, 680, 3000, 680, 3000, 680, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 60
1030, CobaltPlant, CobaltPlant, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 22, 0, 800, 800, 672, 480, 681, 3000, 681, 3000, 681, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/world/map/db/const.txt b/world/map/db/const.txt
index 8203174f..5c8d4ffa 100644
--- a/world/map/db/const.txt
+++ b/world/map/db/const.txt
@@ -643,3 +643,4 @@ MAX_HIGH_SCORES 4
AMMO_NONE 0
AMMO_BOW 1
AMMO_SLING 2
+AMMO_WAND 3
diff --git a/world/map/db/over_100_mob_db.txt b/world/map/db/over_100_mob_db.txt
index 1eff6439..da2edaff 100644
--- a/world/map/db/over_100_mob_db.txt
+++ b/world/map/db/over_100_mob_db.txt
@@ -13,7 +13,6 @@
1036, Zombie, Zombie, 110, 12000, 0, 0, 1393, 2, 275, 355, 20, 15, 30, 15, 30, 3, 60, 40, 1, 1, 1, 0, 29, 133, 480, 1872, 672, 900, 631, 1000, 777, 700, 778, 500, 779, 200, 780, 150, 1198, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1042, Spectre, Spectre, 140, 6500, 0, 3978, 359, 3, 160, 220, 40, 0, 35, 70, 22, 15, 20, 70, 1, 1, 1, 0, 49, 137, 650, 1700, 800, 500, 773, 1000, 703, 150, 703, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20
1045, Fallen, Fallen, 120, 10000, 0, 7812, 1663, 2, 180, 430, 5, 20, 40, 3, 25, 5, 80, 45, 1, 1, 1, 0, 49, 133, 300, 1200, 672, 300, 775, 210, 775, 210, 776, 300, 631, 1000, 636, 3, 658, 2, 532, 35, 778, 500, 1198, 500, 0, 0, 0, 0, 0, 0, 0, 0, 4, 50
-1046, SnakeLord, SnakeLord, 300, 40000, 0, 0, 4321, 2, 80, 120, 10, 10, 20, 40, 10, 10, 40, 10, 1, 1, 1, 0, 20, 132, 200, 1500, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1062, Terranite, Terranite, 110, 6000, 0, 0, 889, 1, 200, 300, 20, 40, 60, 40, 40, 30, 60, 40, 1, 1, 1, 0, 29, 133, 400, 872, 672, 900, 4001, 600, 4004, 20, 4005, 20, 4007, 20, 763, 500, 640, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1068, Reaper, Reaper, 140, 80000, 0, 0, 156, 7, 200, 350, 30, 80, 100, 120, 70, 120, 100, 75, 1, 50, 1, 1, 89, 165, 500, 1200, 800, 300, 777, 1000, 775, 500, 776, 100, 1221, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1071, IceElement, IceElement, 100, 5000, 0, 0, 689, 3, 60, 200, 5, 20, 15, 25, 40, 15, 45, 30, 1, 1, 1, 0, 41, 135, 330, 740, 672, 400, 4026, 900, 537, 750, 568, 400, 543, 900, 544, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20
diff --git a/world/map/db/weapon_item_db.txt b/world/map/db/weapon_item_db.txt
index 1dad6e64..58d215f6 100644
--- a/world/map/db/weapon_item_db.txt
+++ b/world/map/db/weapon_item_db.txt
@@ -47,7 +47,9 @@
//608, RESERVED, BladeShield, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//609, RESERVED, Club, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
623, Scythe, Scythe, 4, 100, 50, 1200, 75, 0, 1, 0, 0, 2, 34, 1, 1, 3, {}, {}
-758, WoodenStaff, Wooden Staff, 4, 4000, 2000, 1000, 50, 0, 1, 5, 0, 2, 34, 1, 1, 10, {}, {}
+758, WoodenStaff, Wooden Staff, 4, 4000, 2000, 1000, 50, 0, 1, 10, 0, 2, 34, 1, 1, 10, {}, {set @bStat, bInt;set @minbStatVal, 60;callfunc "RequireStat";}
+//ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
+1171, Wand, Wand, 4, 400, 200, 100, 1, 0, 1, 5, 0, 2, 2, 1, 1, 1, {}, {set @bStat, bInt;set @minbStatVal, 5;callfunc "RequireStat";}
762, TerraniteArrow, Terranite Arrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 10;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
867, IceGladius, Ice Gladius, 4, 2000, 1000, 1000, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bLuk, 1;}
878, BansheeBow, Banshee Bow, 4, 101000, 40000, 900, 90, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, bDex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -4; bonus bAspdRate, 20; bonus bCritical, 70; bonus bMaxHP, -150; bonus bDefRate, -40; bonus bDef2Rate, -35;set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt
index 41375411..d2f193dd 100644
--- a/world/map/npc/006-1/pachua.txt
+++ b/world/map/npc/006-1/pachua.txt
@@ -1,6 +1,6 @@
006-1.gat,24,113,0|script|Pachua|143,
{
- setarray $@npc_loc, 24, 113, 4;
+ setarray @npc_loc, 24, 113, 4;
callfunc "PCtoNPCRange";
if (@npc_check)
goto L_Close;
diff --git a/world/map/npc/022-1/_warps.txt b/world/map/npc/022-1/_warps.txt
index eab0a4e6..45899c50 100644
--- a/world/map/npc/022-1/_warps.txt
+++ b/world/map/npc/022-1/_warps.txt
@@ -5,3 +5,4 @@
022-1.gat,30,20|warp|To Lighthouse Beach|0,-1,023-1.gat,107,146
022-1.gat,73,110|warp|To North Tulimshar|3,-1,021-1.gat,73,23
022-1.gat,113,110|warp|To North Tulimshar|3,-1,021-1.gat,113,23
+022-1.gat,46,82|warp|To Tulimshar Suburbs|-1,-1,042-1.gat,115,85
diff --git a/world/map/npc/022-1/tutorial.txt b/world/map/npc/022-1/tutorial.txt
index 93f1700a..c249d79d 100644
--- a/world/map/npc/022-1/tutorial.txt
+++ b/world/map/npc/022-1/tutorial.txt
@@ -4,14 +4,46 @@
// Tutorial
// Nibble 0
// 1-4: Sorfina
-
-022-1.gat,46,82,0|script|#tutorial-outside1|45,2,1
-{
- callfunc "TutorialCompleted";
- warp "042-1.gat", 115, 85;
- end;
-}
-
+// 5-7: Tanisha
+// 8-13: Kaan & Hasan
+// 14: Hasan Complete
+// 15: Open
+// Nibble 1
+// 4: Sorfina Bit
+// 5: Tanisha Bit
+// 6: Valon Start
+// 7: Valon Done
+// Nibble 2
+// 1: Maggots
+// 2: House Maggots
+// 3: TameScorpion
+// 4: Scorpion
+// 5-15: Open
+// Nibble 3
+// 1-15: Count
+// Nibble 4
+// 16: Start
+// 17: Barrel
+// 18: Barrel
+// 19: Barrel
+// Nibble 5
+// 20: Barrel
+// 21: Barrel
+// 22: Barrel
+// 23: Found
+// Nibble 6
+// 1: Seen
+// 2: Started
+// 3:
+// 24: Magic
+// 25:
+// 26:
+// 27:
+// Nibble 7
+// 28: Magic Start
+// 29: Magic End
+// 30: Zegas Met
+// 31: Hasan Complete
-|script|#TutorialConfig|-1,
{
end;
@@ -22,25 +54,24 @@ OnInit:
set $@ScorpDeath, 0;
set $@SorfinaHasanBit, (1 << 4);
set $@TanishaHasanBit, (1 << 5);
+ set $@HasanCompleteBit, (1 << 31);
end;
}
-
function|script|TutorialState|,
{
callfunc "ClearVariables";
set @tutorial, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
set @sorfina_hasan, (TUTORIAL & $@SorfinaHasanBit);
set @tanisha_hasan, (TUTORIAL & $@TanishaHasanBit);
+ set @hasan_complete, (TUTORIAL & $@HasanCompleteBit);
return;
}
-
function|script|SetTutorialMask|,
{
set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
set @tutorial_tmp, 0;
return;
}
-
function|script|TutorialCompleted|,
{
set FLAGS, FLAGS | FLAG_TUTORIAL_DONE;
diff --git a/world/map/npc/024-1/_warps.txt b/world/map/npc/024-1/_warps.txt
index b2c4babf..7b7d0545 100644
--- a/world/map/npc/024-1/_warps.txt
+++ b/world/map/npc/024-1/_warps.txt
@@ -4,3 +4,4 @@
024-1.gat,86,74|warp|To North Tulimshar|3,-1,021-1.gat,49,65
024-1.gat,80,48|warp|To Tulimshar Magic School|0,-1,024-2.gat,26,26
024-1.gat,86,48|warp|To Tulimshar Magic School|-1,-1,024-2.gat,42,27
+024-1.gat,80,30|warp|To Magic Passage|-1,-1,042-3.gat,56,45
diff --git a/world/map/npc/024-2/barrier.txt b/world/map/npc/024-2/barrier.txt
index 6b971d1f..4894dad8 100644
--- a/world/map/npc/024-2/barrier.txt
+++ b/world/map/npc/024-2/barrier.txt
@@ -2,10 +2,15 @@
024-2.gat,31,24,0|script|#MagicSchoolBarrier1#M|0,1,1,
{
- if (BaseLevel < 40) goto L_PushBack;
- close;
+ callfunc "MorganState";
+ if (@morgan >= 4)
+ goto L_End;
+ goto L_PushBack;
L_PushBack:
warp "024-2.gat", 34, 24;
- close;
+ goto L_End;
+
+L_End:
+ end;
}
diff --git a/world/map/npc/024-2/tyer.txt b/world/map/npc/024-2/tyer.txt
index 334c62ad..2b4f8674 100644
--- a/world/map/npc/024-2/tyer.txt
+++ b/world/map/npc/024-2/tyer.txt
@@ -3,6 +3,6 @@
024-2.gat,36,21,0|script|Tyer|157,
{
mes "[Tyer]";
- mes "\"Hello.\"";
+ mes "\"Hello. Welcome to the Magic Insitute of Tulimshar.\"";
close;
}
diff --git a/world/map/npc/024-2/tyer_trigger.txt b/world/map/npc/024-2/tyer_trigger.txt
index 353dea16..45218430 100644
--- a/world/map/npc/024-2/tyer_trigger.txt
+++ b/world/map/npc/024-2/tyer_trigger.txt
@@ -1,24 +1,22 @@
// A man in the magic school
-024-2.gat,33,24,0|script|#Tyer_Trigger|0,1,1,
+024-2.gat,33,24,0|script|#Tyer_Trigger|0,0,1,
{
- if (BaseLevel >= 40) end;
+ callfunc "MorganState";
+ if (@morgan >= 4)
+ goto L_Close;
mes "[Tyer]";
- mes "\"You're still too young to go in there.\"";
- next;
-
+ mes "\"You're not allowed to go in there.\"";
menu
- "What do you mean I'm too young to go in there?", L_Explain,
+ "What do you mean I'm not allowed to go in there?", L_Explain,
"Ah, right.", L_Close;
L_Explain:
mes "[Tyer]";
- mes "\"The canyon is a dangerous place, so only more experienced people are allowed there.\"";
+ mes "\"Access to those areas are for students of magic only.\"";
next;
-
- mes "[Tyer]";
- mes "\"That barrier was made to keep those that are too young out.\"";
+ mes "\"That barrier was made to keep those that are not students out.\"";
goto L_Close;
L_Close:
diff --git a/world/map/npc/041-1/_import.txt b/world/map/npc/041-1/_import.txt
index 957b1b29..f7ba8d9e 100644
--- a/world/map/npc/041-1/_import.txt
+++ b/world/map/npc/041-1/_import.txt
@@ -4,4 +4,3 @@ map: 041-1.gat
npc: npc/041-1/_mobs.txt
npc: npc/041-1/_warps.txt
npc: npc/041-1/mapflags.txt
-npc: npc/041-1/tutorial.txt
diff --git a/world/map/npc/041-1/_mobs.txt b/world/map/npc/041-1/_mobs.txt
index de93bfab..5b74c6bb 100644
--- a/world/map/npc/041-1/_mobs.txt
+++ b/world/map/npc/041-1/_mobs.txt
@@ -7,9 +7,9 @@
041-1.gat,61,34,13,20|monster|Scorpion|1003,3,100000,30000,Mob041-1::On1003
041-1.gat,55,30,10,48|monster|SeaSlime|1033,3,100000,30000,Mob041-1::On1033
041-1.gat,59,13,10,9|monster|Scorpion|1003,3,100000,30000,Mob041-1::On1003
-041-1.gat,60,7,3,2|monster|BlackScorpion|1009,1,100000,30000,Mob041-1::On1009
-041-1.gat,66,49,3,2|monster|BlackScorpion|1009,1,100000,30000,Mob041-1::On1009
-041-1.gat,95,75,21,9|monster|BlackScorpion|1009,1,100000,30000,Mob041-1::On1009
+041-1.gat,60,7,3,2|monster|TameScorpion|1046,1,100000,30000,Mob041-1::On1046
+041-1.gat,66,49,3,2|monster|TameScorpion|1046,1,100000,30000,Mob041-1::On1046
+041-1.gat,95,75,21,9|monster|TameScorpion|1046,1,100000,30000,Mob041-1::On1046
041-1.gat,100,57,18,9|monster|RedScorpion|1004,3,100000,30000,Mob041-1::On1004
041-1.gat,83,64,18,9|monster|RedScorpion|1004,3,100000,30000,Mob041-1::On1004
@@ -28,13 +28,13 @@ On1004:
callfunc "MobPoints";
end;
-On1009:
- set @mobID, 1009;
+On1033:
+ set @mobID, 1033;
callfunc "MobPoints";
end;
-On1033:
- set @mobID, 1033;
+On1046:
+ set @mobID, 1046;
callfunc "MobPoints";
end;
}
diff --git a/world/map/npc/041-1/_warps.txt b/world/map/npc/041-1/_warps.txt
index dff4558e..736486dc 100644
--- a/world/map/npc/041-1/_warps.txt
+++ b/world/map/npc/041-1/_warps.txt
@@ -2,3 +2,4 @@
// Beach warps
041-1.gat,101,95|warp|To Beach|1,-1,004-1.gat,68,20
+041-1.gat,58,4|warp|To Tulimshar Suburbs|1,-1,042-1.gat,44,113
diff --git a/world/map/npc/041-1/tutorial.txt b/world/map/npc/041-1/tutorial.txt
deleted file mode 100644
index 5c024e1f..00000000
--- a/world/map/npc/041-1/tutorial.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-// This file is part of the Tutorial
-// Author: Jenalya
-// if you enter the tutorial area, it is set to be already done
-
-041-1.gat,58,5,0|script|#tutorial-outside2|45,1,0
-{
- set FLAGS, FLAGS | FLAG_TUTORIAL_DONE;
- callfunc "ClearVariables";
- warp "042-1.gat", 44, 113;
- end;
-}
diff --git a/world/map/npc/042-1/_import.txt b/world/map/npc/042-1/_import.txt
index b3bfbae5..0c712a7c 100644
--- a/world/map/npc/042-1/_import.txt
+++ b/world/map/npc/042-1/_import.txt
@@ -5,6 +5,8 @@ npc: npc/042-1/_mobs.txt
npc: npc/042-1/_warps.txt
npc: npc/042-1/hasan.txt
npc: npc/042-1/kaan.txt
+npc: npc/042-1/liana.txt
npc: npc/042-1/mapflags.txt
-npc: npc/042-1/npcs.txt
+npc: npc/042-1/tutorial.txt
npc: npc/042-1/valon.txt
+npc: npc/042-1/zegas.txt
diff --git a/world/map/npc/042-1/_mobs.txt b/world/map/npc/042-1/_mobs.txt
index 75ea7407..a8175a1f 100644
--- a/world/map/npc/042-1/_mobs.txt
+++ b/world/map/npc/042-1/_mobs.txt
@@ -1,11 +1,11 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Tulimshar Suburbs mobs
-042-1.gat,100,68,31,15|monster|Maggot|1002,5,100000,30000,Mob042-1::On1002
+042-1.gat,101,69,31,15|monster|Maggot|1002,5,100000,30000,Mob042-1::On1002
042-1.gat,65,59,27,15|monster|Maggot|1002,7,100000,30000,Mob042-1::On1002
042-1.gat,68,102,7,8|monster|BlackScorpion|1009,5,100000,30000,Mob042-1::On1009
042-1.gat,98,88,5,8|monster|Scorpion|1003,4,100000,30000,Mob042-1::On1003
-042-1.gat,58,61,42,42|monster|FireGoblin|1011,2,100000,30000,Mob042-1::On1011
+042-1.gat,63,63,37,30|monster|TameScorpion|1046,6,100000,30000,Mob042-1::On1046
042-1.gat,85,102,5,8|monster|Scorpion|1003,5,100000,30000,Mob042-1::On1003
042-1.gat,98,99,5,5|monster|Scorpion|1003,3,100000,30000,Mob042-1::On1003
042-1.gat,82,87,6,3|monster|Scorpion|1003,2,100000,30000,Mob042-1::On1003
@@ -32,8 +32,8 @@ On1009:
callfunc "MobPoints";
end;
-On1011:
- set @mobID, 1011;
+On1046:
+ set @mobID, 1046;
callfunc "MobPoints";
end;
}
diff --git a/world/map/npc/042-1/_warps.txt b/world/map/npc/042-1/_warps.txt
index 565ed1ae..8c1043ea 100644
--- a/world/map/npc/042-1/_warps.txt
+++ b/world/map/npc/042-1/_warps.txt
@@ -3,7 +3,13 @@
042-1.gat,97,41|warp|To Tulismhar Docks|-1,2,022-1.gat,21,37
042-1.gat,65,20|warp|To Lighthouse Beach|0,-1,023-1.gat,64,143
-042-1.gat,63,47|warp|To Sorfina's House|-1,-1,042-2.gat,44,30
042-1.gat,91,73|warp|To Store House|-1,-1,042-2.gat,22,92
042-1.gat,104,73|warp|To Store House|-1,-1,042-2.gat,44,92
042-1.gat,65,75|warp|To Tulimshar Suburbs House|-1,-1,042-2.gat,29,61
+042-1.gat,62,42|warp|To Sorfina's Dinner|-1,-1,042-2.gat,112,85
+042-1.gat,51,43|warp|To Sorfina's House|-1,-1,042-2.gat,44,30
+042-1.gat,117,102|warp|To Magic School Research|-1,-1,042-2.gat,103,62
+042-1.gat,112,95|warp|To Magic School Research|-1,-1,042-2.gat,94,54
+042-1.gat,120,95|warp|To Magic School Research|-1,-1,042-2.gat,112,54
+042-1.gat,117,85|warp|To Tulismhar Docks|-1,-1,022-1.gat,49,82
+042-1.gat,44,115|warp|To Tulismhar Outskirts|1,-1,041-1.gat,58,6
diff --git a/world/map/npc/042-1/hasan.txt b/world/map/npc/042-1/hasan.txt
index 25f7ff86..722c8f62 100644
--- a/world/map/npc/042-1/hasan.txt
+++ b/world/map/npc/042-1/hasan.txt
@@ -1,67 +1,79 @@
// This file is part of the Tutorial
// Authors: Jenalya, alastrim
+// Hasan should be threatening someone else you come to help
+// Going to throw someone off a cliff
+// npctalk 2 NPCs Hasan talks about giving someone a short trip to Docks
+// They respond by asking play for help
+// Hasan tells them to but out of it.
-042-1.gat,116,84,0|script|Hasan|189,0,2,
+042-1.gat,104,49,0|script|Scared Man|160,
+{
+ if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ goto L_TutDone;
+ message strcharinfo(0), "He looks too afraid to say anything.";
+ end;
+
+L_TutDone:
+ message strcharinfo(0), "Thanks. Kaan's been much nicer to me now";
+ end;
+}
+042-1.gat,102,49,0|script|Hasan|189,2,2,
{
goto L_Main;
L_Main:
- if (FLAGS & FLAG_TUTORIAL_DONE)
- goto L_Tut_Done;
-
- set @toll, 10000;
callfunc "TutorialState";
- // implicitly, $@ScorpionFighter is nonzero
- if (@tutorial == 13)
- goto L_Thank;
if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)))
goto L_Afraid;
- if (@tutorial == 12)
+ if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ goto L_TutDone;
+ // implicitly, $@ScorpionFighter is nonzero
+ if ((@hasan_complete) && (@tutorial == 13))
+ goto L_Thank;
+ if (@tutorial == 12)
goto L_Trick;
if ((@tutorial == 10) || (@tutorial == 11))
- goto L_Toll;
+ goto L_FightAgain;
+ mes "You over hear some people nearby.";
mes "[Unfriendly Guy]";
- mes "\"Hey! You can't pass here.\"";
- menu
- "Why not?",L_Next,
- "Who says that?",L_Next;
-
-L_Next:
+ mes "\"I told you if you didn't get the money, I'd give you flying lessons, Haha!\"";
+ next;
+ mes "[Scared Man]";
+ mes "\"But the only person I need protection from is you.\"";
+ next;
+ mes "[Unfriendly Guy]";
+ mes "\"Thats why the price is so high.\"";
+ next;
+ mes "\"Because I'm the toughest person in all of Tulimshar\"";
+ next;
+ mes "[Scared Man]";
+ mes "\"No, your just a mean bully. Wait till I tell the gaurds about this!\"";
+ next;
mes "[Unfriendly Guy]";
- mes "\"I, Hasan the Mighty, have decided to put a toll on this path.\"";
+ mes "\"You do that and the next flying lesson will be from the beach cliffs.\"";
+ next;
+ mes "[Scared Man]";
+ mes "\"No, please don't. *sob*\"";
+ next;
+ mes "Sounds like this person is in trouble.\"";
+ next;
set @tutorial_tmp, 10;
callfunc "SetTutorialMask";
- next;
- goto L_Toll;
-
-L_Toll:
- mes "[Hasan]";
- mes "\"Give me " + @toll + "GP, and I may let you pass.\"";
- if (Zeny >= @toll)
- goto L_HasToll;
- goto L_NoToll;
-
-L_HasToll:
- menu
- "Ok, here you go.",L_Pay,
- "What? I don't have that much money!",L_NoPay,
- "We'll see if you can stop me!",L_Fight;
-
-L_NoToll:
+ mes "[Unfriendly Guy]";
+ mes "\"What are you looking at?\"";
menu
- "What? I don't have that much money!",L_NoPay,
- "We'll see if you can stop me!",L_Fight;
+ "What ever you call maggot slime scrapped off a boat after a walk through the sewers.\"", L_Fight,
+ "Who me? I saw nothing, just passing by.", L_Close;
-L_NoPay:
+L_FightAgain:
mes "[Hasan]";
- mes "\"That's not my problem. You have to stay here then.\"";
- next;
- mes "This is annoying. Maybe Kaan can help?";
- goto L_Close;
+ mes "\"Have you come back for a thrashing?\"";
+ menu
+ "No.", L_Close,
+ "Yes.", L_Fight;
L_Fight:
- mes "He laughs derisively.";
mes "[Hasan]";
mes "\"Do you really think you can beat me?\"";
mes "He pulls out a nasty looking dagger and stabs it in your direction.";
@@ -71,51 +83,38 @@ L_Fight:
mes "Maybe Kaan can help?";
goto L_Close;
-L_Pay:
- if (Zeny < @toll)
- goto L_Cheat;
- set Zeny, Zeny - @toll;
- mes "He grins gloatingly.";
- mes "[Hasan]";
- mes "\"Very well. You may pass.\"";
- callfunc "TutorialCompleted";
- goto L_Close;
-
-L_Cheat:
- mes "[Hasan]";
- mes "\"Don't you dare try to cheat me!\"";
- goto L_Close;
-
L_Trick:
mes "[Hasan]";
- mes "\"Are you going to pay now? " + @toll + "GP, and I may let you pass.\"";
+ mes "\"Have you come back for another thrashing?\"";
menu
- "I don't have that much money!",L_NoPay,
- "No. (Scratch your head.)",L_ScratchHead;
+ "No.",L_Close,
+ "Yes, yours! (Scratch your head.)",L_ScratchHead;
L_ScratchHead:
if ($@ScorpionFighter)
goto L_Wait;
+ set TUTORIAL, TUTORIAL | $@HasanCompleteBit;
set $@ScorpionTimer, 0;
set $@ScorpionFighter, getcharid(3);
set $@ScorpDeath, PC_DIE_COUNTER;
cmdothernpc "#ScorpionTrigger", "HasanSpawn";
- mes "While you're scratching your head, you see Kaan approaching behind Hasan.";
+ mes "While you're scratching your head, you see Kaan approaching the fence.";
close;
L_Thank:
mes "[Hasan]";
mes "\"You - you saved me!";
- mes "I tried to take your money and you saved me!\"";
+ mes "I was mean to people, but you still saved me!\"";
next;
mes "\"Hey, you're a really cool person.";
mes "I mean, the way you finished that ghastly scorpion!";
mes "Amazing!\"";
next;
- mes "\"Let me tell you a secret: Cool persons are allowed to pass for free.";
+ mes "\"Let me tell you something, I will no longer bully people.";
mes "And you can have my Sharp Knife.\"";
getitem "SharpKnife", 1;
- callfunc "TutorialCompleted";
+ set @tutorial_tmp, 14;
+ callfunc "SetTutorialMask";
next;
mes "\"You want to go to the bazaar, right? Shall I tell you how to get there?\"";
menu
@@ -136,12 +135,14 @@ L_Explore:
mes "\"Alright. Take care!\"";
goto L_Close;
-L_Tut_Done:
+L_TutDone:
mes "[Hasan]";
- if (BaseLevel >= 40)
- mes "\"Welcome to the suburbs of Tulimshar. I wonder what an experienced adventurer like you is doing here.\"";
- if (BaseLevel < 40)
- mes "\"Bah, nothing interesting is happening here.\"";
+ mes "\"You didn't see anything. I tell you what I'll be nicer if you don't tell anyone?\"";
+ menu
+ "As long as you learned your lesson.", L_TutCont;
+
+L_TutCont:
+ mes "\"I have, I promise not to bully people anymore. It's not fun being scared.\"";
goto L_Close;
L_Wait:
@@ -153,15 +154,13 @@ L_Afraid:
end;
L_Close:
- set @toll, 0;
close;
OnTouch:
- if (FLAGS & FLAG_TUTORIAL_DONE)
- goto L_Close;
+ if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ end;
goto L_Main;
}
-
042-1.gat,0,0,0|script|#ScorpionTrigger|35,
{
end;
@@ -170,14 +169,13 @@ OnCommandHasanSpawn:
goto L_Summon;
L_Summon:
- monster "042-1.gat",115,85,"Scorpion",1003,1, "#ScorpionTrigger::OnScorpionDeath";
+ monster "042-1.gat",102,49,"WeakScorpion",1046,1, "#ScorpionTrigger::OnScorpionDeath";
initnpctimer;
end;
L_SummonAgain:
- message strcharinfo(0), "Kaan is mad at you for your interference! He walks over to the edge of the cliff and throws a rock on top of your head, then lets another scorpion run just near Hasan!";
+ message strcharinfo(0), "Kaan is mad at you for your interference! He walks over to the edge of the fence and throws a rock on top of your head, then lets another scorpion run just near Hasan!";
percentheal -100, 0;
- message strcharinfo(0), "Kaan: \"Just go while he is distracted and no one is interfering!\"";
goto L_Summon;
OnTimer5000:
@@ -202,9 +200,7 @@ OnScorpionDeath:
goto L_Clean;
L_TimeOut:
- message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength! Seems like you took too long and the plan didn't work this time.";
- warp "042-1.gat", 114, 85;
- message strcharinfo(0), "Hasan: \"Hey you! I told you you cannot pass!\"";
+ message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength!";
goto L_Clean;
L_MessageDeath:
@@ -219,19 +215,3 @@ L_Clean:
stopnpctimer;
end;
}
-
-042-1.gat,117,85,0|script|#warp|45,0,0,
-{
- if (FLAGS & FLAG_TUTORIAL_DONE)
- goto L_Tut;
- goto L_SendBack;
-
-L_SendBack:
- message strcharinfo(0), "Hasan: I can do this all day.";
- warp "042-1.gat", 114, 85;
- end;
-
-L_Tut:
- warp "022-1.gat", 49, 82;
- end;
-}
diff --git a/world/map/npc/042-1/kaan.txt b/world/map/npc/042-1/kaan.txt
index d2ba5877..0d71cee3 100644
--- a/world/map/npc/042-1/kaan.txt
+++ b/world/map/npc/042-1/kaan.txt
@@ -1,12 +1,11 @@
// This file is part of the Tutorial
// Author: Jenalya
-042-1.gat,103,92,0|script|Kaan|160,
+042-1.gat,109,87,0|script|Kaan|160,
{
- if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut_Done;
callfunc "TutorialState";
- if (@tutorial == 13) goto L_Hasan_Saved;
- if ($@ScorpionFighter == getcharid(3)) goto L_Run;
+ if ((@hasan_complete) && (@tutorial == 13)) goto L_Hasan_Saved;
+ if (@hasan_complete) goto L_TutDone;
if (@tutorial == 12) goto L_Plan;
if ((@tutorial == 11) && ((@sorfina_hasan) || (@tanisha_hasan))) goto L_TrickKnown;
if (@tutorial == 11) goto L_Trick;
@@ -68,7 +67,7 @@ L_Next:
callfunc "SetTutorialMask";
if (hasan)
menu
- "A guy named Hasan won't let me enter Tulimshar.",L_Hasan,
+ "A guy named Hasan is bullying someone.",L_Hasan,
"Thanks for the advice.",L_Close;
goto L_Out;
@@ -82,7 +81,7 @@ L_Hasan:
mes "[Kaan]";
mes "\"Hello! How are you? Did you already visit Tulimshar?\"";
menu
- "A guy named Hasan won't let me enter Tulimshar.",L_Next1,
+ "A guy named Hasan is bullying someone.",L_Next1,
"Not yet.",L_Close;
L_Next1:
@@ -130,7 +129,7 @@ L_Explain:
mes "I'll watch you from this point.\"";
next;
mes "\"When you give me the sign, I'll throw the scorpion on him.";
- mes "While he's distracted with the scorpion, you can pass.\"";
+ mes "I bet that will show him for the coward he really is.\"";
next;
mes "\"How's that? We can start as soon as you're ready.\"";
goto L_Close;
@@ -145,23 +144,18 @@ L_Plan:
L_Hasan_Saved:
mes "[Kaan]";
- mes "\"I told you to pass when he's distracted, not to fight the scorpion!";
- mes "But maybe Hasan is thankful now?\"";
+ mes "\"You did not to fight the scorpion.";
+ mes "But maybe Hasan is more thankful now?\"";
next;
mes "\"Why don't you talk to him again and see what he says.\"";
goto L_Close;
-L_Tut_Done:
+L_TutDone:
mes "[Kaan]";
mes "\"Hi there. I hope you enjoy your time in Tulimshar.";
mes "Hasan can be a real troublemaker, but it seems like he has calmed down for now.\"";
goto L_Close;
-L_Run:
- mes "[Kaan]";
- mes "\"He's distracted! What are you waiting for?\"";
- goto L_Close;
-
L_Close:
close;
}
diff --git a/world/map/npc/042-1/npcs.txt b/world/map/npc/042-1/liana.txt
index 6eb9972b..6eb9972b 100644
--- a/world/map/npc/042-1/npcs.txt
+++ b/world/map/npc/042-1/liana.txt
diff --git a/world/map/npc/042-1/tutorial.txt b/world/map/npc/042-1/tutorial.txt
new file mode 100644
index 00000000..3129faaa
--- /dev/null
+++ b/world/map/npc/042-1/tutorial.txt
@@ -0,0 +1,10 @@
+// This file is part of the Tutorial
+// Author: Jenalya
+// if you enter the tutorial area, it is set to be already done
+
+042-1.gat,63,47,0|script|#tutorialoutside|45,0,0
+{
+ callfunc "TutorialCompleted";
+ warp "042-2.gat", 114, 92;
+ end;
+}
diff --git a/world/map/npc/042-1/valon.txt b/world/map/npc/042-1/valon.txt
index 35636f94..ab14ad7c 100644
--- a/world/map/npc/042-1/valon.txt
+++ b/world/map/npc/042-1/valon.txt
@@ -1,39 +1,168 @@
// This file is part of the Tutorial
-// Author: Jenalya
+// Author: Jenalya, Wushin
+-|script|#ValonConfig|-1,
+{
+ end;
-042-1.gat,44,115,0|script|Valon|156,1,0
+OnInit:
+ set $@ValonStartBit, (1 << 6);
+ set $@ValonEndBit, (1 << 7);
+ setarray $@ValonMob, 1002,1050,1046,1003;
+ setarray $@ValonMobName$, "Maggots","House Maggots","Tame Scorpions","Scorpion";
+ setarray $@ValonMobCnt, 10,5,3,1;
+ end;
+}
+function|script|ValonState|,
+{
+ set @valon_mob, ((TUTORIAL & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+ set @valon_count, ((TUTORIAL & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+ set @valon_start, (TUTORIAL & $@ValonStartBit);
+ set @valon_end, (TUTORIAL & $@ValonEndBit);
+ return;
+}
+function|script|AddValonMobMask|,
+{
+ set @valon_tmp, (@valon_mob + 1);
+ if (@valon_tmp > 15)
+ set @valon_tmp, 15;
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT));
+ set @valon_tmp, 0;
+ return;
+}
+function|script|ResetValonCntMask|,
+{
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
+ return;
+}
+function|script|AddValonCntMask|,
+{
+ set @valon_tmp, (@valon_count + 1);
+ if (@valon_tmp > 15)
+ set @valon_tmp, 15;
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (@valon_tmp << NIBBLE_3_SHIFT));
+ set @valon_tmp, 0;
+ callfunc "ValonProgress";
+ return;
+}
+function|script|ValonProgress|,
+{
+ callfunc "ValonState";
+ if ((@valon_start) && (!(@valon_end)))
+ message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob];
+ return;
+}
+042-1.gat,51,111,0|script|ValonDebug|156,
+{
+ mes "[Valon Debug]";
+ mes "Reset?";
+ menu
+ "Yes.", L_Reset,
+ "No.", L_End;
+
+L_Reset:
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
+ set TUTORIAL, TUTORIAL &~ $@ValonStartBit;
+ set TUTORIAL, TUTORIAL &~ $@ValonEndBit;
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
+
+OnInit:
+ if (!debug)
+ disablenpc "ValonDebug";
+ end;
+}
+042-1.gat,48,111,0|script|Valon|156,
{
- if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut_Done;
+ callfunc "ValonState";
+ if (@valon_end)
+ goto L_QuestComplete;
+ if (!(@valon_start) && (@valon_count))
+ goto L_QuestAskAgain;
+ if (((@valon_start) && (!(@valon_end))) && (@valon_count >= $@ValonMobCnt[@valon_mob]))
+ goto L_NextMob;
+ if ((@valon_start) && (!(@valon_end)))
+ goto L_QuestStarted;
+ goto L_QuestAsk;
+L_QuestAskAgain:
+ mes "[Valon]";
+ mes "\"Hello, Adventurer! Have you come back to help?\"";
+ menu
+ "Yes. I will help with the desert beasts.", L_Accept,
+ "Maybe some other time.", L_NoThanks;
+
+L_QuestAsk:
mes "[Valon]";
mes "\"Hello!";
mes "You're looking for adventures, right?\"";
next;
mes "\"But you shouldn't underestimate this desert, it is dangerous.\"";
next;
- mes "\"It's crawling with scorpions, and the heat has overcome men tougher than you are.\"";
+ mes "\"It's crawling with scorpions, and the heat has overcome adventurers tougher than you are.\"";
next;
- mes "\"If you really want to challenge the desert go to Tulimshar first to prepare yourself.\"";
- close;
+ mes "\"I should know I gaurd this gate from all manner of desert beasts.\"";
+ next;
+ mes "\"Maybe you would like help and earn your stripes?\"";
+ next;
+ mes "\"The Council of Wizard's does offer a reward for helping...\"";
+ menu
+ "YES!!! let me at them!", L_Accept,
+ "Maybe some other time.", L_NoThanks;
+
+L_NoThanks:
+ callfunc "AddValonCntMask";
+ goto L_Close;
+
+L_Accept:
+ callfunc "ResetValonCntMask";
+ set TUTORIAL, TUTORIAL | $@ValonStartBit;
+ goto L_NewMob;
+
+L_NextMob:
+ getexp 40, 0;
+ mes "\"I see you killed all the " + $@ValonMobName$[@valon_mob] + " needed.\"";
+ next;
+ mes "\"The Wizard's thank thee as well.\"";
+ set Zeny, Zeny + 25;
+ next;
+ callfunc "ResetValonCntMask";
+ callfunc "AddValonMobMask";
+ callfunc "ValonState";
+ if (@valon_mob == getarraysize($@ValonMob))
+ goto L_QuestOver;
+ goto L_NewMob;
-L_Tut_Done:
+L_NewMob:
+ mes "\"Let's see whats on the list. Ah ok, I need you to kill me " + $@ValonMobCnt[@valon_mob] + " " + $@ValonMobName$[@valon_mob] + "\"";
+ next;
+ mes "\"I'll be waiting here, come back and see after you've kulled those mobs.\"";
+ goto L_Close;
+
+L_QuestStarted:
mes "[Valon]";
- mes "\"Hello!";
- mes "You're an adventurer, right?\"";
+ mes "Hail adventurer! You are well on your way to mastering the beasts of the desert.\"";
next;
- mes "\"Be careful in the desert.\"";
- close;
+ mes "\"You need to kill " + $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob] + "\"";
+ next;
+ mes "\"Come back and see me when the job is done.\"";
+ goto L_Close;
-OnTouch:
- if (FLAGS & FLAG_TUTORIAL_DONE)
- goto L_Tut;
- warp "042-1.gat", 44, 110;
+L_QuestOver:
mes "[Valon]";
- mes "\"The desert is merciless.";
- mes "I can't let you leave like this.\"";
- close;
+ mes "\"Thanks once again for helping with the monsters in the desert.\"";
+ getexp 50, 0;
+ set TUTORIAL, TUTORIAL | $@ValonEndBit;
+ goto L_Close;
-L_Tut:
- warp "041-1.gat", 58, 6;
- end;
+L_QuestComplete:
+ mes "[Valon]";
+ mes "\"Thanks once again for helping with the monsters in the desert.\"";
+ goto L_Close;
+
+L_Close:
+ close;
}
diff --git a/world/map/npc/042-1/zegas.txt b/world/map/npc/042-1/zegas.txt
new file mode 100644
index 00000000..d3dc118c
--- /dev/null
+++ b/world/map/npc/042-1/zegas.txt
@@ -0,0 +1,106 @@
+// Barrels
+// Author: Wushin
+// Npc
+042-1.gat,97,75,0|script|Zegas|165,
+{
+ setarray @npc_loc, 97, 75, 2;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Range;
+
+ callfunc "CheckBarrelQuest";
+ if (@barrel_quest == 1)
+ goto L_Find;
+ if (@barrel_quest == 2)
+ goto L_Looking;
+ if (@barrel_quest == 3)
+ goto L_QuestEnd;
+ if (@barrel_quest == 4)
+ goto L_Thanks;
+ goto L_Meet;
+
+L_Range:
+ message strcharinfo(0), "Whats that? Come closer I can't hear you.";
+ goto L_Close;
+
+L_Meet:
+ mes "[Zegas]";
+ mes "\"Hey do you have a second?\"";
+ next;
+ mes "\"The storehouse here is over run with house maggots.\"";
+ next;
+ mes "\"Wouldn't you know it, the bug bomb Eomie gave us is in one of the store room barrels.\"";
+ next;
+ mes "\"Can you search the barrels for the bug bomb and set it off when you find it?\"";
+ set TUTORIAL, TUTORIAL | $@ZegasMetBit;
+ menu
+ "Sure.",L_Start,
+ "Maybe some other time.",L_Close;
+
+L_Find:
+ mes "[Zegas]";
+ mes "\"The storehouse is still over run with house maggots.\"";
+ next;
+ mes "\"Please help me find the bug bomb Eomie gave us is in one of the store room barrels?\"";
+ menu
+ "Sure.",L_Start,
+ "Maybe some other time.",L_Close;
+
+L_Start:
+ mes "[Zegas]";
+ set TUTORIAL, TUTORIAL | $@BarrelStartBit;
+ mes "\"Thanks, come back and see me once you found the bug bomb and set it off.\"";
+ goto L_Close;
+
+L_Looking:
+ mes "[Zegas]";
+ mes "\"Still haven't found it? Well keep looking I know it's in there some where.\"";
+ goto L_Close;
+
+L_QuestEnd:
+ mes "[Zegas]";
+ mes "\"From the smell I can see you found the bug bomb!\"";
+ getexp 50, 0;
+ next;
+ mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\"";
+ set Zeny, (Zeny + 50);
+ set TUTORIAL, TUTORIAL | $@BarrelEndBit;
+ goto L_Close;
+
+L_Thanks:
+ mes "[Zegas]";
+ mes "\"Thanks for Helping with clear out the store room!\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+042-1.gat,100,75,0|script|ZegasDebug|165,
+{
+ mes "[Zegas Debug]";
+ mes "Reset ?";
+ menu
+ "Yes.", L_Reset,
+ "No.", L_End;
+
+L_Reset:
+ set TUTORIAL, TUTORIAL &~ $@BarrelStartBit;
+ set TUTORIAL, TUTORIAL &~ $@BarrelEndBit;
+ set TUTORIAL, TUTORIAL &~ (1 << 17);
+ set TUTORIAL, TUTORIAL &~ (1 << 18);
+ set TUTORIAL, TUTORIAL &~ (1 << 19);
+ set TUTORIAL, TUTORIAL &~ (1 << 20);
+ set TUTORIAL, TUTORIAL &~ (1 << 21);
+ set TUTORIAL, TUTORIAL &~ (1 << 22);
+ set TUTORIAL, TUTORIAL &~ (1 << 30);
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
+
+OnInit:
+ if (!debug)
+ disablenpc "ZegasDebug";
+ end;
+}
diff --git a/world/map/npc/042-2/_import.txt b/world/map/npc/042-2/_import.txt
index 45f7ea62..7522e5e2 100644
--- a/world/map/npc/042-2/_import.txt
+++ b/world/map/npc/042-2/_import.txt
@@ -3,6 +3,11 @@
map: 042-2.gat
npc: npc/042-2/_mobs.txt
npc: npc/042-2/_warps.txt
+npc: npc/042-2/barrels.txt
+npc: npc/042-2/barrels_config.txt
+npc: npc/042-2/magic_basement.txt
npc: npc/042-2/mapflags.txt
+npc: npc/042-2/morgan.txt
npc: npc/042-2/sorfina.txt
+npc: npc/042-2/stat_reset.txt
npc: npc/042-2/tanisha.txt
diff --git a/world/map/npc/042-2/_mobs.txt b/world/map/npc/042-2/_mobs.txt
index a423b87a..60ac26d6 100644
--- a/world/map/npc/042-2/_mobs.txt
+++ b/world/map/npc/042-2/_mobs.txt
@@ -1,9 +1,15 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Tulimshar Suburbs Indoor mobs
+042-2.gat,33,57,24,7|monster|HouseMaggot|1050,7,100000,30000,Mob042-2::On1050
042-2.gat,0,0,0|script|Mob042-2|-1,
{
end;
+
+On1050:
+ set @mobID, 1050;
+ callfunc "MobPoints";
+ end;
}
diff --git a/world/map/npc/042-2/_warps.txt b/world/map/npc/042-2/_warps.txt
index 117a0f15..3fa81e27 100644
--- a/world/map/npc/042-2/_warps.txt
+++ b/world/map/npc/042-2/_warps.txt
@@ -4,3 +4,7 @@
042-2.gat,29,62|warp|To Outside|-1,-1,042-1.gat,65,76
042-2.gat,22,93|warp|To Outside|-1,-1,042-1.gat,91,74
042-2.gat,44,93|warp|To Outside|-1,-1,042-1.gat,104,74
+042-2.gat,112,84|warp|To Outside|-1,-1,042-1.gat,62,41
+042-2.gat,94,53|warp|To Outside|-1,-1,042-1.gat,112,94
+042-2.gat,112,53|warp|To Outside|-1,-1,042-1.gat,120,94
+042-2.gat,103,62|warp|To Outside|-1,-1,042-1.gat,117,103
diff --git a/world/map/npc/042-2/barrels.txt b/world/map/npc/042-2/barrels.txt
new file mode 100644
index 00000000..43d4444e
--- /dev/null
+++ b/world/map/npc/042-2/barrels.txt
@@ -0,0 +1,48 @@
+// Barrels
+// Author: Wushin
+// Barrels
+042-2.gat,23,86,0|script|Barrel#0|400,
+{
+ setarray @npc_loc, 23, 86, 2;
+ set @barrel, 0;
+ callfunc "CheckBarrel";
+ end;
+
+OnMaggotDeath:
+ end;
+}
+042-2.gat,28,86,0|script|Barrel#1|400,
+{
+ setarray @npc_loc, 28, 86, 2;
+ set @barrel, 1;
+ callfunc "CheckBarrel";
+ end;
+}
+042-2.gat,31,91,0|script|Barrel#2|400,
+{
+ setarray @npc_loc, 31, 91, 2;
+ set @barrel, 2;
+ callfunc "CheckBarrel";
+ end;
+}
+042-2.gat,36,85,0|script|Barrel#3|400,
+{
+ setarray @npc_loc, 36, 85, 2;
+ set @barrel, 3;
+ callfunc "CheckBarrel";
+ end;
+}
+042-2.gat,40,89,0|script|Barrel#4|400,
+{
+ setarray @npc_loc, 40, 89, 2;
+ set @barrel, 4;
+ callfunc "CheckBarrel";
+ end;
+}
+042-2.gat,38,91,0|script|Barrel#5|400,
+{
+ setarray @npc_loc, 38, 91, 2;
+ set @barrel, 5;
+ callfunc "CheckBarrel";
+ end;
+}
diff --git a/world/map/npc/042-2/barrels_config.txt b/world/map/npc/042-2/barrels_config.txt
new file mode 100644
index 00000000..85c78e41
--- /dev/null
+++ b/world/map/npc/042-2/barrels_config.txt
@@ -0,0 +1,109 @@
+// Barrels
+// Author: Wushin
+042-2.gat,33,88,24,7|monster|HouseMaggot|1050,2,100000,30000,Barrel#0::OnMaggotDeath
+-|script|#BarrelConfig|-1,
+{
+ end;
+
+OnInit:
+ set $@BarrelStartBit, (1 << 16);
+ set $@BarrelEndBit, (1 << 23);
+ set $@ZegasMetBit, (1 << 30);
+ setarray $@BarrelBits, (1 << 17), (1 << 18), (1 << 19), (1 << 20), (1 << 21), (1 << 22);
+ setarray $@BarrelRewards, 533, 507, 505, 518, 537, 526;
+ set $@BarrelSpawnCnt, 1;
+ set $@BarrelSpawnId, 1050;
+ set $@BarrelSpawnName$, "House Maggot";
+ set $@BarrelMax, getarraysize($@BarrelBits);
+ end;
+
+}
+function|script|CheckBarrelQuest|,
+{
+ callfunc "CountBarrels";
+ set @barrel_quest, 0;
+ if (TUTORIAL & $@ZegasMetBit)
+ set @barrel_quest, 1;
+ if (TUTORIAL & $@BarrelStartBit)
+ set @barrel_quest, 2;
+ if (!(TUTORIAL & $@BarrelStartBit) && (@barrel_count))
+ set @barrel_quest, 3;
+ if (TUTORIAL & $@BarrelEndBit)
+ set @barrel_quest, 4;
+ return;
+}
+function|script|CountBarrels|,
+{
+ set @barrel_count, 0;
+ set @barrel_tmp, 0;
+ goto L_Loop;
+
+L_Loop:
+ if (TUTORIAL & $@BarrelBits[@barrel_tmp])
+ goto L_AddOne;
+ goto L_LoopAgain;
+
+L_AddOne:
+ set @barrel_count, (@barrel_count + 1);
+ goto L_LoopAgain;
+
+L_LoopAgain:
+ set @barrel_tmp, (@barrel_tmp + 1);
+ if (@barrel_tmp == getarraysize($@BarrelBits))
+ goto L_BarrelTally;
+ goto L_Loop;
+
+L_BarrelTally:
+ return;
+}
+function|script|CheckBarrel|,
+{
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Range;
+ callfunc "CheckBarrelQuest";
+ if (!(@barrel_quest))
+ goto L_NoI;
+ if (TUTORIAL & $@BarrelBits[@barrel])
+ goto L_Empty;
+ set TUTORIAL, TUTORIAL | $@BarrelBits[@barrel];
+
+ callfunc "CountBarrels";
+ if (@barrel_count == $@BarrelMax)
+ goto L_QuestReward;
+ set @player_random, rand(@barrel_count * 10);
+ set @barrel_random, rand(@barrel_count * $@BarrelMax);
+ if (@barrel_random > @player_random)
+ goto L_Spawn;
+ goto L_Reward;
+
+L_Range:
+ message strcharinfo(0), "You'll need to get closer.";
+ goto L_Return;
+
+L_NoI:
+ message strcharinfo(0), "Nothing interesting here.";
+ goto L_Return;
+
+L_Empty:
+ message strcharinfo(0), "You've already searched this barrel.";
+ goto L_Return;
+
+L_QuestReward:
+ message strcharinfo(0), "You found the bug bomb.";
+ misceffect 33;
+ set TUTORIAL, TUTORIAL &~ $@BarrelStartBit;
+ killmonster getmap() + ".gat", "Barrel#0::OnMaggotDeath";
+ goto L_Return;
+
+L_Spawn:
+ areamonster getmap() + ".gat", @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath";
+ goto L_Return;
+
+L_Reward:
+ getitem $@BarrelRewards[rand(getarraysize($@BarrelRewards))], 1;
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/042-2/magic_basement.txt b/world/map/npc/042-2/magic_basement.txt
new file mode 100644
index 00000000..2f278a5a
--- /dev/null
+++ b/world/map/npc/042-2/magic_basement.txt
@@ -0,0 +1,21 @@
+//
+// Author: Wushin
+
+042-2.gat,103,56,0|script|#MagicBasement|400,0,0,
+{
+ callfunc "MorganState";
+ if (@morgan < 4)
+ goto L_Close;
+ mes "Descend into the basement?";
+ next;
+ menu
+ "Yes.", L_MagicBase,
+ "Nevermind.", L_Close;
+
+L_MagicBase:
+ warp "042-3",24,21;
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/042-2/morgan.txt b/world/map/npc/042-2/morgan.txt
new file mode 100644
index 00000000..3ea1a2e8
--- /dev/null
+++ b/world/map/npc/042-2/morgan.txt
@@ -0,0 +1,142 @@
+// Tut mage
+// Author: Wushin
+// Gains Access to Magic School
+// See 024-2 clean that shit up
+// Morgan, liana
+function|script|MorganState|,
+{
+ callfunc "ClearVariables";
+ set @morgan, ((TUTORIAL & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
+ return;
+}
+function|script|SetMorganMask|,
+{
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_6_MASK) | (@morgan_tmp << NIBBLE_6_SHIFT));
+ set @morgan_tmp, 0;
+ return;
+}
+042-2,105,57,0|script|MorganDebug|355,
+{
+ mes "[Morgan Debug]";
+ mes "Reset?";
+ menu
+ "Yes.", L_Reset,
+ "No.", L_End;
+L_Reset:
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_6_MASK) | (0 << NIBBLE_6_SHIFT));
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
+
+OnInit:
+ if (!debug)
+ disablenpc "MorganDebug";
+ end;
+}
+042-2,101,57,0|script|Morgan|355,
+{
+ callfunc "MorganState";
+ if (readparam(bInt) >= 5)
+ goto L_Learn;
+ goto L_NotMagic;
+
+L_Learn:
+ if (@morgan == 0)
+ goto L_NotSeen;
+ if (@morgan == 1)
+ goto L_Seen;
+ if (@morgan == 2)
+ goto L_Started;
+ if (@morgan == 3)
+ goto L_CastOnce;
+ if (@morgan == 4)
+ goto L_LearningDone;
+ goto L_Close;
+
+L_NotSeen:
+ set @morgan_tmp, 1;
+ callfunc "SetMorganMask";
+ mes "[Morgan]";
+ mes "\"Welcome to the Magic Insitute of Tulimshar!\"";
+ next;
+ mes "\"My name is Morgan, I'm the Dean of Wizardry.\"";
+ next;
+ mes "\"You appear to have the markings to use magic.\"";
+ next;
+ mes "\"Granted you are still to young to cast spells.\"";
+ next;
+ mes "\"But we can teach you to use simple magic devices.\"";
+ next;
+ mes "\"Would you like to learn some apprentice skills?\"";
+ menu
+ "Yes.", L_Start,
+ "Maybe later", L_Close;
+
+L_Seen:
+ mes "[Morgan]";
+ mes "\"Have you returned to learn some magic?\"";
+ menu
+ "Yes.", L_Start,
+ "Maybe later", L_Close;
+
+L_NotMagic:
+ mes "[Morgan]";
+ mes "\"Hrmm you don't appear to posses enough magical talent to teach.\"";
+ goto L_Close;
+
+L_Start:
+ set @morgan_tmp, 2;
+ callfunc "SetMorganMask";
+ mes "\"Great, lets begin your first lesson.\"";
+ next;
+ getitem 1171, 1;
+ mes "\"This is a wand, there are many like it but this one is now yours.\"";
+ next;
+ mes "\"Various wands and staffs are found throughout the land with many different strengths and weaknesses.\"";
+ next;
+ mes "\"To use the wand you need to have it equipped and speak the incantation to let it tap into your mana.\"";
+ next;
+ mes "\"As the power of your magic grows so will the spells you can cast.\"";
+ next;
+ mes "\"Lets start with a basic wand attack. " + getspellinvocation("wand") + "\"";
+ next;
+ mes "\"Equip the wand and lets try out that spell.\"";
+ next;
+ mes "\"Speak to me again once you've cast the spell.\"";
+ goto L_Close;
+
+L_Started:
+ mes "[Morgan]";
+ mes "\"Lets start with a basic wand attack. " + getspellinvocation("wand") + "\"";
+ next;
+ mes "\"Equip the wand and lets try out that spell.\"";
+ next;
+ mes "\"Speak to me again once you've cast the spell.\"";
+ goto L_Close;
+
+L_CastOnce:
+ mes "[Morgan]";
+ mes "\"Ok, good job! Looks like you have good mana flow.\"";
+ next;
+ mes "\"Onto the next lesson. Now that you have " + getspellinvocation("wand") + " cast,\"";
+ next;
+ mes "\"Each time you attack the wand will convert a bit of you mana into a magic bolt.\"";
+ next;
+ mes "\"After so many attacks, you will need to recast the invocation to stay attuned to the wand.\"";
+ next;
+ mes "\"(Logging out will also cancel any spell effects currently active in-game.).\"";
+ next;
+ set @morgan_tmp, 4;
+ callfunc "SetMorganMask";
+ goto L_Close;
+
+L_LearningDone:
+ mes "[Morgan]";
+ mes "\"I've taught you all I can for now. Come back later.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/042-2/sorfina.txt b/world/map/npc/042-2/sorfina.txt
index 841a667a..4301d124 100644
--- a/world/map/npc/042-2/sorfina.txt
+++ b/world/map/npc/042-2/sorfina.txt
@@ -1,7 +1,33 @@
// This file is part of the Tutorial
// Author: Jenalya
+042-2.gat,21,26,0|script|TutDebug|154,
+{
+ mes "[TutDebug]";
+ mes "Reset?";
+ menu
+ "Yes.",L_Reset,
+ "No.",L_End;
+
+L_Reset:
+ set TUT_var, 0;
+ set @tutorial_tmp, 0;
+ set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set TUTORIAL, TUTORIAL &~ $@SorfinaHasanBit;
+ set TUTORIAL, TUTORIAL &~ $@TanishaHasanBit;
+ set TUTORIAL, TUTORIAL &~ $@HasanCompleteBit;
+ set FLAGS, FLAGS &~ FLAG_TUTORIAL_DONE;
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
-042-2.gat,28,26,0|script|Sorfina|154,4,4
+OnInit:
+ if(!debug)
+ disablenpc "TutDebug";
+ end;
+}
+042-2.gat,28,26,0|script|Sorfina|154,1,4
{
callfunc "TutorialState";
@@ -17,8 +43,8 @@ L_Heal:
goto L_Main;
L_Main:
- if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Again;
if ((@tutorial == 11) && !(@sorfina_hasan)) goto L_Hasan;
+ if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Again;
if (@tutorial >= 4) goto L_Again;
if (@tutorial == 3) goto L_Clothes;
if (@tutorial == 2) goto L_Chest;
@@ -66,7 +92,9 @@ L_Tut:
L_Carpet:
mes "[Sorfina]";
mes "\"Try to take a few steps and walk to that red carpet over there.";
- mes "Just use the arrow keys or click on the place you want to go to.\"";
+ mes "Just use the ###keyMoveUp; to move up, ###keyMoveDown; to move down, ";
+ mes " ###keyMoveLeft; to move left, ###keyMoveRight; to move right ";
+ mes " or click on the place you want to go to.\"";
set @tutorial_tmp, 1;
callfunc "SetTutorialMask";
goto L_Close;
@@ -75,18 +103,18 @@ L_Chest:
mes "[Sorfina]";
mes "\"In that chest there are some clothes you can take.\"";
next;
- 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.\"";
+ mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press ###keyTargetNPC; to focus and ###keyTalk; to talk/activate.\"";
next;
mes "\"Now get the clothes out of the chest.\"";
goto L_Close;
L_Naked:
mes "[Sorfina]";
- mes "\"Press F3 or click on the Inventory button in the bar at the upper right corner to open your bag.\"";
+ mes "\"Press ###keyWindowInventory; or click on the Inventory button in the bar at the upper right corner to open your bag.\"";
next;
- mes "\"Once we stop talking, click on the clothes and press the equip button.\"";
+ mes "\"Once we stop talking, double-click on the clothes to equip.\"";
next;
- mes "\"Talk to me again after you get dressed. You can either click on me, or press N to focus on me and T to talk.\"";
+ mes "\"Talk to me again after you get dressed. You can either click on me, or press ###keyTargetNPC; to focus on me and ###keyTalk; to talk.\"";
goto L_Close;
L_Clothes:
@@ -136,23 +164,25 @@ L_Explain:
L_Walk:
mes "[Sorfina]";
mes "\"You can use the arrow keys to walk around.";
- mes "Or just click on the place you want to go to.";
- mes "But this only works if that place is reachable and walkable.\"";
+ mes "Just use the ###keyMoveUp; to move up, ###keyMoveDown; to move down, ";
+ mes " ###keyMoveLeft; to move left, ###keyMoveRight; to move right ";
+ mes " or click on the place you want to go to.\"";
+ mes "This only works if that place is reachable and walkable.\"";
goto L_Close;
L_Talk:
mes "[Sorfina]";
mes "\"If you want to talk to a normal person, you can click at him or her.";
- mes "Or you can press N to focus on the nearest person and then press T to talk.\"";
+ mes "Or you can press ###keyTargetNPC; to focus on the nearest person and then press ###keyTalk; to talk.\"";
next;
- mes "\"If you want to talk to other adventurers, press Enter to open your chat window.";
+ mes "\"If you want to talk to other adventurers, press ###keyChat; to open your chat window.";
mes "Then type your message and press Enter to send.\"";
next;
mes "\"You may want to talk privately to another adventurer sometimes. In that case you can whisper.";
- mes "After pressing Enter type '/whisper [name] [message]'.";
+ mes "After pressing ###keyChat; type '/whisper [name] [message]'.";
mes "Or you can right click on someone and choose the whisper option.\"";
next;
- mes "\"Press F7 to show and hide your chat window.\"";
+ mes "\"Press ###keyWindowChat; to show and hide your chat window.\"";
goto L_Close;
L_Items:
@@ -171,16 +201,16 @@ L_Items:
mes "\"Your HitchHikers Towel will return you to your last set soul menhir or here if not set.\"";
mes "\"It can't be used constantly as the magic needs time to power the jump.\"";
next;
- mes "\"Press F3 to open your inventory.";
+ mes "\"Press ###keyWindowInventory; to open your inventory.";
mes "When placing your cursor over an item there, you can see a box with some information about that item.\"";
next;
- mes "\"To use or equip an item, select it by clicking on it.";
- mes "Then press Use or Equip.\"";
+ mes "\"To use or equip an item, select it by double-clicking on it.";
+ mes "Selecting the item then pressing Use or Equip also works.\"";
goto L_Close;
L_Shortcut:
mes "[Sorfina]";
- mes "\"Press F8 or click the Shortcut button in the bar at the upper right to open your shortcut window.\"";
+ mes "\"Press ###keyOutfitShortcut1; or click the Shortcut button in the bar at the upper right to open your shortcut window.\"";
next;
mes "\"You can select the item you want to put on a shortcut with your mouse and then click on the position in the shortcut window you want to place it.\"";
next;
@@ -207,7 +237,7 @@ L_Hasan:
mes "[Sorfina]";
mes "\"Make yourself at home! Do you have any questions?\"";
menu
- "A guy named Hasan won't let me enter Tulimshar.",L_Next,
+ "A guy named Hasan is bullying people.",L_Next,
"Yes, could you explain again about...",L_Explain,
"No, thanks.",L_Close;
@@ -291,7 +321,7 @@ OnTouch:
close;
}
-042-2.gat,27,23,0|script|Chest#tutorial|111,
+042-2.gat,29,23,0|script|Chest#tutorial|111,
{
callfunc "TutorialState";
if (@tutorial > 2) goto L_Empty;
@@ -320,7 +350,7 @@ L_Empty:
close;
}
-042-2.gat,44,31,0|script|#DoorOut-@tutorial|45,0,0
+042-2.gat,44,31,0|script|#DoorOutTut1|45,0,0
{
end;
@@ -328,7 +358,7 @@ OnTouch:
callfunc "TutorialState";
if ((@tutorial < 4) && !(FLAGS & FLAG_TUTORIAL_DONE))
goto L_Block;
- warp "042-1.gat", 63, 49;
+ warp "042-1.gat", 51, 44;
end;
L_Block:
diff --git a/world/map/npc/042-2/stat_reset.txt b/world/map/npc/042-2/stat_reset.txt
new file mode 100644
index 00000000..c033fcb2
--- /dev/null
+++ b/world/map/npc/042-2/stat_reset.txt
@@ -0,0 +1,42 @@
+//
+
+042-2.gat,98,91,0|script|Jessie|159,
+{
+ if (BaseLevel >= 10)
+ goto L_Sorry;
+
+ mes "[Jessie]";
+ mes "\"I know a spell that will";
+ mes "reset status points on the youngings.";
+ next;
+ menu
+ "Reset my stats",L_Reset,
+ "Forget about it",L_Pass;
+
+L_Reset:
+ resetstatus;
+
+ mes "[Jessie]";
+ mes "\"There you are.";
+ mes "";
+ mes "Good as new!\"";
+ goto L_Close;
+
+L_Pass:
+ mes "[Jessie]";
+ mes "\"Very well then, see you.\"";
+ goto L_Close;
+
+L_Sorry:
+ mes "[Jessie]";
+ mes "\"My spell only works on the very young, sorry.\"";
+ next;
+ mes "\"You can always try Mailvox in the Noble Quarter.\"";
+ next;
+ mes "\"Head east through the docks, then south into North Tulimshar,";
+ mes "Then go north east into the Noble Quarter, sitting behind a stall in the east.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/042-2/tanisha.txt b/world/map/npc/042-2/tanisha.txt
index 482224f0..fb67989d 100644
--- a/world/map/npc/042-2/tanisha.txt
+++ b/world/map/npc/042-2/tanisha.txt
@@ -2,15 +2,15 @@
// Authors: Jenalya, alastrim
// Cleanup: o11c
-042-2.gat,37,90,0|script|Tanisha|114,
+042-2.gat,110,88,0|script|Tanisha|114,
{
- if (isin("042-2.gat", 30, 85, 36, 89))
+ if (isin("042-2.gat", 98, 84, 106, 89))
goto L_Fighting;
- if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut_Done;
callfunc "TutorialState";
if ((@tutorial == 11) && !(@tanisha_hasan)) goto L_Hasan;
+ if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut_Done;
if (@tutorial >= 8) goto L_Again;
if (@tutorial == 7) goto L_Stats;
if (@tutorial == 6) goto L_Fail;
@@ -42,8 +42,7 @@ L_Maggots:
mes "\"If you kill them, I'll give you my knife.";
mes "What do you say?\"";
menu
- "Sure!",L_Next1,
- "That's your job.",L_Close;
+ "I guess it's the least I can do.",L_Next1;
L_Next1:
mes "[Tanisha]";
@@ -51,7 +50,7 @@ L_Next1:
// since the check happens here, it is actually possible to have
// more than $@Maggot_MaxHunters in the area at one time
// but that's not a BIG problem
- if (getareausers("042-2.gat", 30, 85, 36, 89) >= $@Maggot_MaxHunters)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) >= $@Maggot_MaxHunters)
goto L_Crowded;
next;
goto L_Fight_Again;
@@ -60,14 +59,14 @@ L_Fight_Again:
mes "\"Ok, listen what to do.";
mes "Equip a weapon and kill the maggots.\"";
next;
- mes "\"Press A to focus on a monster. With X you can focus and start attacking the same time.";
+ mes "\"Press A to focus on a monster. With ###keyTargetAttack; you can focus and start attacking the same time.";
mes "But it also works to click on the monster with your mouse.\"";
next;
- mes "\"If you press the left Shift button, you can abort your attack.\"";
+ mes "\"If you press the ###keyTarget;, you can abort your attack.\"";
next;
mes "\"Maggots aren't aggressive, so they won't harm you until you attack them first. Take them out one by one.\"";
next;
- mes "\"Sometimes dead monsters leave some useful things. You can pick them up by pressing Z or clicking on the items with your mouse.\"";
+ 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;
// since it was moved to after L_Fight_Again, add it conditionally
@@ -87,13 +86,13 @@ L_ContinueFight:
callfunc "SetTutorialMask";
set @Maggot_Kills, 0;
set @time, 0;
- if (getareausers("042-2.gat", 30, 85, 36, 89) == 0)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
initnpctimer;
- warp "042-2.gat", 33, 87;
+ warp "042-2.gat", 101, 87;
goto L_Summon;
L_Summon:
- areamonster "042-2.gat", 30, 85, 36, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
+ areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
end;
L_Stats:
@@ -103,7 +102,13 @@ L_Stats:
mes "\"And it seems you became stronger and more experienced.";
mes "That means you got some status points which you can use to increase your abilities.\"";
next;
- mes "\"Press F2 or click the Status button in the bar at the upper right to see your status window. There you can distribute your points on six different properties.\"";
+ mes "\"Press ###keyWindowStatus; or click the Status button in the bar at the upper right to see your status window. There you can distribute your points on six different properties.\"";
+ next;
+ mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
+ next;
+ mes "\"He also knows of mages with even more powerful reset spells.\"";
+ next;
+ mes "\"Some strange wizard lurking around in the Tulimshar Noble Quarter.\"";
next;
goto L_StatsRe;
@@ -123,7 +128,12 @@ L_StatsRe:
next;
mes "\"Think about how you want to play before assigning the points.\"";
next;
- mes "\"Also I heard rumors about a strange guy lurking around in the desert south of Tulimshar who can help you to forget your abilities!\"";
+ mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
+ next;
+ mes "\"He also knows of mages with even more powerful reset spells.\"";
+ next;
+ mes "\"Some strange wizard lurking around in the Tulimshar Noble Quarter.\"";
+ next;
mes "Tanisha looks at you with wide opened eyes.";
next;
mes "[Tanisha]";
@@ -153,6 +163,7 @@ L_Advice:
L_SetTutorial:
set @tutorial_tmp, 8;
callfunc "SetTutorialMask";
+ callfunc "TutorialCompleted";
goto L_Close;
L_Again:
@@ -172,14 +183,14 @@ L_Explain:
L_Fight:
mes "[Tanisha]";
- mes "\"Press A to focus on a monster. With X you can focus and attack.";
+ mes "\"Press ###keyTargetMonster; to focus on a monster. With ###keyTargetAttack; you can focus and attack.";
mes "But it also works to click on the monster with your mouse.\"";
next;
- mes "\"If you press the left Shift button, you can abort your attack.\"";
+ mes "\"If you press the ###keyTarget; button, you can abort your attack.\"";
next;
- mes "\"Sometimes dead monsters leave some useful things. You can pick them up with pressing Z or clicking on the items with your mouse.\"";
+ mes "\"Sometimes dead monsters leave some useful things. You can pick them up with pressing ###keyPickup; or clicking on the items with your mouse.\"";
next;
- mes "\"If you feel exhausted from battle you can sit down by pressing S to recover faster.\"";
+ mes "\"If you feel exhausted from battle you can sit down by pressing ###keyBeingSit; to recover faster.\"";
goto L_Close;
L_Mob:
@@ -198,7 +209,7 @@ L_Hasan:
mes "[Tanisha]";
mes "\"Hi there! Is everything alright? Do you have questions?\"";
menu
- "A guy named Hasan won't let me enter Tulimshar.",L_Next3,
+ "A guy named Hasan is being mean.",L_Next3,
"Yes, could you explain again about...",L_Explain,
"No, thanks.",L_Close;
@@ -233,7 +244,7 @@ L_Crowded:
goto L_Close;
L_Sleep:
- warp "042-2.gat", 36, 90;
+ warp "042-2.gat", 101, 87;
mes "[Tanisha]";
mes "\"What are you doing in there?";
mes "Sleeping?";
@@ -241,7 +252,7 @@ L_Sleep:
set @Maggot_Kills, 0;
set @time, 0;
close2;
- if (getareausers("042-2.gat", 30, 85, 36, 89) == 0)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
goto L_CleanUp;
end;
@@ -259,7 +270,7 @@ L_Fail:
"No, I need a rest.", L_Close;
L_Next2:
- if (getareausers("042-2.gat", 30, 85, 36, 89) >= $@Maggot_MaxHunters)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) >= $@Maggot_MaxHunters)
goto L_Crowded;
goto L_Fight_Again;
@@ -269,17 +280,17 @@ L_Fighting:
OnTimer1000:
setnpctimer 0;
- if (getareausers("042-2.gat", 30, 85, 36, 89) == 0)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
goto L_CleanUp;
// This is needed because multiple players can be in the area at once
- areatimer "042-2.gat", 30, 85, 36, 89, 0, "Tanisha::OnTick";
+ areatimer "042-2.gat", 98, 84, 106, 89, 0, "Tanisha::OnTick";
end;
L_CleanUp:
killmonster "042-2.gat", "Tanisha::OnMaggotDeath";
set $@Maggot_Hunters, 0;
stopnpctimer;
- areamonster "042-2.gat", 30, 85, 36, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
+ areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
end;
OnTick:
@@ -301,17 +312,17 @@ OnMaggotDeath:
message strcharinfo(0), "Tanisha: Ohh... Irrhk... Eeeeww... They just appear from nowhere!";
if (@Maggot_Kills == 3)
message strcharinfo(0), "Tanisha: Yuck... I think I am getting sick.";
- if (isin("042-2.gat", 30, 85, 36, 89))
+ if (isin("042-2.gat", 98, 84, 106, 89))
set @Maggot_Kills, @Maggot_Kills + 1;
if (@Maggot_Kills < 5)
goto L_Summon;
// else, complete
- warp "042-2.gat", 36, 90;
+ warp "042-2.gat", 110, 88;
set @tutorial_tmp, 7;
callfunc "SetTutorialMask";
set @Maggot_Kills, 0;
set @time, 0;
- if (getareausers("042-2.gat", 30, 85, 36, 89) == 0)
+ if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
goto L_CleanUp;
end;
@@ -321,6 +332,22 @@ L_Close:
OnInit:
set $@Maggot_MaxHunters, 4;
- areamonster "042-2.gat", 30, 85, 36, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
+ areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
end;
}
+042-2.gat,114,93,0|script|#DoorOutTut2|45,0,0
+{
+ end;
+
+OnTouch:
+ callfunc "TutorialState";
+ if (!(FLAGS & FLAG_TUTORIAL_DONE))
+ goto L_Block;
+ warp "042-1.gat", 63, 48;
+ end;
+
+L_Block:
+ message strcharinfo(0), "Tanisha: Please come here. I'd like some help!";
+ end;
+}
+
diff --git a/world/map/npc/042-3/_import.txt b/world/map/npc/042-3/_import.txt
new file mode 100644
index 00000000..2bc1c9d9
--- /dev/null
+++ b/world/map/npc/042-3/_import.txt
@@ -0,0 +1,5 @@
+// Map 042-3: Mages Passage
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+map: 042-3.gat
+npc: npc/042-3/_mobs.txt
+npc: npc/042-3/_warps.txt
diff --git a/world/map/npc/042-3/_mobs.txt b/world/map/npc/042-3/_mobs.txt
new file mode 100644
index 00000000..391df0f2
--- /dev/null
+++ b/world/map/npc/042-3/_mobs.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Mages Passage mobs
+
+
+
+042-3.gat,0,0,0|script|Mob042-3|-1,
+{
+ end;
+}
diff --git a/world/map/npc/042-3/_warps.txt b/world/map/npc/042-3/_warps.txt
new file mode 100644
index 00000000..30b4e137
--- /dev/null
+++ b/world/map/npc/042-3/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Mages Passage warps
+
+042-3.gat,57,46|warp|To Tulimshar Canyon|2,-1,024-1.gat,80,31
+042-3.gat,24,20|warp|To Magic Insitute of Tulimshar|-1,-1,042-2.gat,103,55
diff --git a/world/map/npc/_import.txt b/world/map/npc/_import.txt
index 0972b191..dc144a18 100644
--- a/world/map/npc/_import.txt
+++ b/world/map/npc/_import.txt
@@ -105,6 +105,7 @@ import: npc/036-2/_import.txt
import: npc/041-1/_import.txt
import: npc/042-1/_import.txt
import: npc/042-2/_import.txt
+import: npc/042-3/_import.txt
import: npc/043-1/_import.txt
import: npc/043-3/_import.txt
import: npc/043-4/_import.txt
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index b83ea630..a0c5e787 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -10,6 +10,8 @@ function|script|ClearVariables|,
L_SetAllTut:
if (FLAGS & FLAG_TUTORIAL_DONE)
goto L_ResetAllTut;
+ if ((FLAGS & FLAG_TUTORIAL_DONE) && (!(TUTORIAL & $@HasanCompleteBit)))
+ set TUTORIAL, TUTORIAL | $@HasanCompleteBit;
set @tutorial_tmp, (sorfina + tanisha + hasan + kaan);
set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
set @tutorial_tmp, 0;
diff --git a/world/map/npc/functions/default_npc_checks.txt b/world/map/npc/functions/default_npc_checks.txt
index 4ddd00ca..efe8818b 100644
--- a/world/map/npc/functions/default_npc_checks.txt
+++ b/world/map/npc/functions/default_npc_checks.txt
@@ -3,16 +3,16 @@
// Range
// Map, X, Y, Distance in Tiles
-// setarray $@npc_loc, 24, 113, 4;
+// setarray @npc_loc, 24, 113, 4;
function|script|PCtoNPCRange|,
{
set @npc_check, 0;
- set $@Nmap$, getmap() + ".gat";
- set $@Nx1, ($@npc_loc[0] - $@npc_loc[2]);
- set $@Ny1, ($@npc_loc[1] - $@npc_loc[2]);
- set $@Nx2, ($@npc_loc[0] + $@npc_loc[2]);
- set $@Ny2, ($@npc_loc[1] + $@npc_loc[2]);
- if (isin($@Nmap$, $@Nx1, $@Ny1, $@Nx2, $@Ny2))
+ set @Nmap$, getmap() + ".gat";
+ set @Nx1, (@npc_loc[0] - @npc_loc[2]);
+ set @Ny1, (@npc_loc[1] - @npc_loc[2]);
+ set @Nx2, (@npc_loc[0] + @npc_loc[2]);
+ set @Ny2, (@npc_loc[1] + @npc_loc[2]);
+ if (isin(@Nmap$, @Nx1, @Ny1, @Nx2, @Ny2))
goto L_Return;
set @npc_check, 1;
goto L_Return;
@@ -22,9 +22,9 @@ L_Return:
}
// Inventory & Weight
-// setarray @delitem_names$ Items to delete
+// @delitem_ids Items to delete
// @delitem_counts Counts of Items to delete
-// @getitem_names$ Items to get
+// @getitem_ids Items to get
// @getitem_counts Counts of Items to get
function|script|CheckInventory|,
{
@@ -33,78 +33,90 @@ function|script|CheckInventory|,
set @delitem_loop, 0;
set @getitem_loop, 0;
set @check_fail, 0;
+ set @msg_loop, 0;
- if (getarraysize(@delitem_names$))
+ if (getarraysize(@delitem_ids))
goto L_DelItemsLoop;
goto L_CheckGet;
L_DelItemsLoop:
- if(countitem(@delitem_names$[@delitem_loop]) >= @delitem_counts[@delitem_loop])
+ if(countitem(@delitem_ids[@delitem_loop]) >= @delitem_counts[@delitem_loop])
goto L_DelLoopAgain;
goto L_ReturnMissing;
L_DelLoopAgain:
- if((@delitems_loop + 1) == getarraysize(@delitems_names$))
+ set @delitem_loop, (@delitem_loop + 1);
+ if(@delitem_loop == getarraysize(@delitem_ids))
goto L_CheckGet;
- set @delitems_loop, (@delitems_loop + 1);
goto L_DelItemsLoop;
L_CheckGet:
- if (getarraysize(@getitem_names$))
+ if (getarraysize(@getitem_ids))
goto L_CheckWeight;
goto L_DelCheck;
L_CheckWeight:
getinventorylist;
- if (@inventorylist_count < (101 - getarraysize(@getitem_names$)))
+ if (100 < (@inventorylist_count + getarraysize(@getitem_ids)))
goto L_ReturnSpace;
goto L_GetItemsLoop;
L_GetItemsLoop:
- if (checkweight(@getitem_names$, 1) == 0)
+ if (checkweight(@getitem_ids[@getitem_loop], @getitem_counts[@getitem_loop]))
goto L_GetLoopAgain;
goto L_ReturnWeight;
L_GetLoopAgain:
- if((@getitems_loop + 1) == getarraysize(@getitems_names$))
+ set @getitem_loop, (@getitem_loop + 1);
+ if(@getitem_loop == getarraysize(@getitem_ids))
goto L_DelCheck;
- set @getitems_loop, (@getitems_loop + 1);
goto L_GetItemsLoop;
L_DelCheck:
- if (getarraysize(@delitem_names$))
+ if (getarraysize(@delitem_ids))
goto L_DelLoop;
goto L_CheckGet2;
L_DelLoop:
- delitem @delitem_names$[@del_loop], @delitem_counts[@del_loop];
+ delitem @delitem_ids[@del_loop], @delitem_counts[@del_loop];
goto L_DelAgain;
L_DelAgain:
- if((@del_loop + 1) == getarraysize(@delitems_names$))
- goto L_GetLoop;
set @del_loop, (@del_loop + 1);
+ if(@del_loop == getarraysize(@delitem_ids))
+ goto L_GetLoop;
goto L_DelLoop;
L_CheckGet2:
- if (getarraysize(@getitem_names$))
+ if (getarraysize(@getitem_ids))
goto L_GetLoop;
goto L_Return;
L_GetLoop:
- getitem @getitem_names$[@get_loop], @getitem_counts[@get_loop];
+ misceffect FX_GETITEM, strcharinfo(0);
+ getitem @getitem_ids[@get_loop], @getitem_counts[@get_loop];
goto L_GetAgain;
L_GetAgain:
- if((@get_loop + 1) == getarraysize(@getitems_names$))
- goto L_Return;
set @get_loop, (@get_loop + 1);
+ if(@get_loop == getarraysize(@getitem_ids))
+ goto L_Return;
goto L_GetLoop;
L_ReturnMissing:
- mes "\"You are missing required items.\"";
set @check_fail, 1;
- goto L_Return;
+ mes "\"You are missing required items.\"";
+ 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];
+ goto L_NextMsgCheck;
+
+L_NextMsgCheck:
+ set @msg_loop, (@msg_loop + 1);
+ if(@msg_loop == getarraysize(@delitem_ids))
+ goto L_Return;
+ goto L_MissingMsg;
L_ReturnWeight:
mes "\"You need to be carrying less weight.\"";
@@ -119,7 +131,9 @@ L_ReturnSpace:
goto L_Return;
L_Return:
- cleararray @delitem_names$, "", getarraysize(@delitem_names$);
- cleararray @getitem_names$, "", getarraysize(@getitem_names$);
+ cleararray @delitem_ids, "", getarraysize(@delitem_ids);
+ cleararray @delitem_counts, "", getarraysize(@delitem_counts);
+ cleararray @getitem_ids, "", getarraysize(@getitem_ids);
+ cleararray @getitem_counts, "", getarraysize(@getitem_counts);
return;
}
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index fd9729de..eb5aeff7 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -137,13 +137,22 @@ function|script|MobPoints|,
if (MPQUEST == 1)
set Mobpt, Mobpt + @points[@mobID - 1002];
+ callfunc "ValonState";
+ if (((@valon_start) && (!(@valon_end))) && (@mobID == $@ValonMob[@valon_mob]))
+ goto L_ValonMobKill;
+ goto L_NatureKarma;
+
+L_ValonMobKill:
+ callfunc "AddValonCntMask";
+ goto L_NatureKarma;
+
+L_NatureKarma:
// Scorpion, Red Scorpion, Black Scorpion, Angry Scorpion
// DemonicMouboo, ViciousSquirrel, WickedMushroom, Bluepar
if ((@mobID == 1003) || (@mobID == 1004) || (@mobID == 1009) || (@mobID == 1057)
|| (@mobID == 1104) || (@mobID == 1105) || (@mobID == 1106) || (@mobID == 1107))
goto L_good;
-
// Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth)
set @value, 0;
diff --git a/world/map/npc/items/check_wand.txt b/world/map/npc/items/check_wand.txt
new file mode 100644
index 00000000..1b11dfc2
--- /dev/null
+++ b/world/map/npc/items/check_wand.txt
@@ -0,0 +1,65 @@
+// Wands
+// Author: Wushin
+function|script|WandMana|,
+{
+ callfunc "CheckWand";
+ set @WandCost, (@Wand * ((MaxSp / 10) + 2));
+ set @WandAttack, 0;
+ if (!(@Wand))
+ goto L_NoWand;
+ if (Sp >= @WandCost)
+ goto L_Attack;
+ goto L_LowSp;
+
+L_Attack:
+ set Sp, (Sp - @WandCost);
+ set @WandAttack, 1;
+ goto L_Return;
+
+L_NoWand:
+ message strcharinfo(0), "You need a wand Equipped!";
+ set @WandAttack, 0;
+ goto L_Return;
+
+L_LowSp:
+ message strcharinfo(0), "Out of Mana";
+ set @WandAttack, 0;
+ goto L_Return;
+
+L_Return:
+ return;
+}
+function|script|CheckWand|,
+{
+ setarray $@Wands, 758, 1171;
+ setarray $@WandsPwr, 2, 1;
+ set @Wand, 0;
+ set @wand_loop, 0;
+ goto L_Loop;
+
+L_Loop:
+ if ((getequipid(equip_hand1) == $@Wands[@wand_loop]) || (getequipid(equip_hand2) == $@Wands[@wand_loop]))
+ goto L_SetWand;
+ goto L_LoopAgain;
+
+L_SetWand:
+ set @Wand, $@WandsPwr[@wand_loop];
+ callfunc "MorganState";
+ if (@morgan == 2)
+ goto L_SetCastOnce;
+ goto L_Return;
+
+L_LoopAgain:
+ set @wand_loop, (@wand_loop + 1);
+ if (@wand_loop >= getarraysize($@Wands))
+ goto L_Return;
+ goto L_Loop;
+
+L_SetCastOnce:
+ set @morgan_tmp, 3;
+ callfunc "SetMorganMask";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index 1458423b..9a7a3c96 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -34,6 +34,7 @@ npc: npc/items/restricted_item.txt
npc: npc/items/warpTowels.txt
npc: npc/items/unequipcb.txt
npc: npc/items/launcher_ammo.txt
+npc: npc/items/check_wand.txt
import: npc/_import.txt
npc: npc/annuals/fathertime.txt