summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules4
-rw-r--r--world/map/data/001-2.wlkbin17224 -> 17224 bytes
-rw-r--r--world/map/data/080-1.wlkbin0 -> 40004 bytes
-rw-r--r--world/map/data/080-3.wlkbin0 -> 40004 bytes
-rw-r--r--world/map/data/081-1.wlkbin0 -> 16254 bytes
-rw-r--r--world/map/data/081-2.wlkbin0 -> 57924 bytes
-rw-r--r--world/map/data/081-3.wlkbin0 -> 6304 bytes
-rw-r--r--world/map/data/082-2.wlkbin0 -> 5504 bytes
-rw-r--r--world/map/data/082-3.wlkbin0 -> 40004 bytes
-rw-r--r--world/map/data/fermi.wlkbin0 -> 3604 bytes
-rw-r--r--world/map/data/guild.wlkbin0 -> 5629 bytes
-rw-r--r--world/map/data/prison.wlkbin0 -> 4804 bytes
-rw-r--r--world/map/data/resnametable.txt10
-rw-r--r--world/map/db/item_db.conf28
-rw-r--r--world/map/db/item_db_chest.txt6
-rw-r--r--world/map/db/item_db_foot.txt2
-rw-r--r--world/map/db/item_db_head.txt2
-rw-r--r--world/map/db/item_db_offhand.txt2
-rw-r--r--world/map/db/item_db_use.txt4
-rw-r--r--world/map/db/mob_db.conf25
-rw-r--r--world/map/db/mob_db_over_100.txt2
-rw-r--r--world/map/db/mob_db_over_150.txt10
-rw-r--r--world/map/npc/001-1/_warps.txt1
-rw-r--r--world/map/npc/001-1/npcs.txt4
-rw-r--r--world/map/npc/001-2/_warps.txt2
-rw-r--r--world/map/npc/009-1/milly.txt2
-rw-r--r--world/map/npc/080-1/_import.txt6
-rw-r--r--world/map/npc/080-1/_mobs.txt3
-rw-r--r--world/map/npc/080-1/_nodes.txt4
-rw-r--r--world/map/npc/080-1/_warps.txt3
-rw-r--r--world/map/npc/080-3/_import.txt6
-rw-r--r--world/map/npc/080-3/_mobs.txt3
-rw-r--r--world/map/npc/080-3/_nodes.txt4
-rw-r--r--world/map/npc/080-3/_warps.txt4
-rw-r--r--world/map/npc/081-1/_import.txt6
-rw-r--r--world/map/npc/081-1/_mobs.txt3
-rw-r--r--world/map/npc/081-1/_nodes.txt4
-rw-r--r--world/map/npc/081-1/_warps.txt6
-rw-r--r--world/map/npc/081-2/_import.txt6
-rw-r--r--world/map/npc/081-2/_mobs.txt3
-rw-r--r--world/map/npc/081-2/_nodes.txt4
-rw-r--r--world/map/npc/081-2/_warps.txt5
-rw-r--r--world/map/npc/081-3/_import.txt6
-rw-r--r--world/map/npc/081-3/_mobs.txt3
-rw-r--r--world/map/npc/081-3/_nodes.txt4
-rw-r--r--world/map/npc/081-3/_warps.txt5
-rw-r--r--world/map/npc/082-2/_import.txt6
-rw-r--r--world/map/npc/082-2/_mobs.txt3
-rw-r--r--world/map/npc/082-2/_nodes.txt4
-rw-r--r--world/map/npc/082-2/_warps.txt9
-rw-r--r--world/map/npc/082-3/_import.txt6
-rw-r--r--world/map/npc/082-3/_mobs.txt3
-rw-r--r--world/map/npc/082-3/_nodes.txt4
-rw-r--r--world/map/npc/082-3/_warps.txt4
-rw-r--r--world/map/npc/_import.txt10
-rw-r--r--world/map/npc/fermi/_import.txt6
-rw-r--r--world/map/npc/fermi/_mobs.txt3
-rw-r--r--world/map/npc/fermi/_nodes.txt4
-rw-r--r--world/map/npc/fermi/_warps.txt5
-rw-r--r--world/map/npc/functions/ferry.txt2
-rw-r--r--world/map/npc/functions/storage_chests.txt18
-rw-r--r--world/map/npc/functions/teleport_manager.txt121
-rw-r--r--world/map/npc/functions/treasure_hunt.txt469
-rw-r--r--world/map/npc/guild/_import.txt6
-rw-r--r--world/map/npc/guild/_mobs.txt3
-rw-r--r--world/map/npc/guild/_nodes.txt4
-rw-r--r--world/map/npc/guild/_warps.txt3
-rw-r--r--world/map/npc/items/maps.txt3
-rw-r--r--world/map/npc/items/shovel.txt4
-rw-r--r--world/map/npc/magic/_procedures.txt53
-rw-r--r--world/map/npc/magic/event-boss-powerup-flee.txt14
-rw-r--r--world/map/npc/magic/event-summon-coalgolem.txt2
-rw-r--r--world/map/npc/magic/event-summon-managuardian.txt13
-rw-r--r--world/map/npc/magic/event-summon-manatyrant.txt12
-rw-r--r--world/map/npc/magic/event-summon-stonegolem.txt14
-rw-r--r--world/map/npc/magic/event-summon-sunshroom.txt15
-rw-r--r--world/map/npc/magic/level1-grow-alizarin.txt10
-rw-r--r--world/map/npc/magic/level1-grow-cobalt.txt10
-rw-r--r--world/map/npc/magic/level1-grow-gamboge.txt10
-rw-r--r--world/map/npc/magic/level1-grow-mauve.txt10
-rw-r--r--world/map/npc/magic/level1-grow-shadow.txt10
-rw-r--r--world/map/npc/magic/level1-summon-maggots.txt15
-rw-r--r--world/map/npc/magic/level2-summon-fluffies.txt15
-rw-r--r--world/map/npc/magic/level2-summon-mouboo.txt15
-rw-r--r--world/map/npc/magic/level2-summon-pinkie.txt15
-rw-r--r--world/map/npc/magic/level2-summon-snakes.txt26
-rw-r--r--world/map/npc/magic/level2-summon-spiky-mushroom.txt15
-rw-r--r--world/map/npc/magic/level2-summon-wickedmushroom.txt27
-rw-r--r--world/map/npc/mobs/miner_mania.txt89
-rw-r--r--world/map/npc/prison/_import.txt6
-rw-r--r--world/map/npc/prison/_mobs.txt3
-rw-r--r--world/map/npc/prison/_nodes.txt4
-rw-r--r--world/map/npc/prison/_warps.txt4
-rw-r--r--world/map/npc/scripts.conf2
94 files changed, 899 insertions, 402 deletions
diff --git a/.gitmodules b/.gitmodules
index 4e8cb970..428d22d0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
[submodule "client-data"]
path = client-data
- url = https://git.themanaworld.org/legacy/clientdata.git
+ url = https://git.themanaworld.org/tmw/clientdata.git
[submodule "tools"]
path = tools
- url = https://git.themanaworld.org/legacy/tools.git
+ url = https://git.themanaworld.org/tmw/tools.git
diff --git a/world/map/data/001-2.wlk b/world/map/data/001-2.wlk
index 1db402b4..23af0d76 100644
--- a/world/map/data/001-2.wlk
+++ b/world/map/data/001-2.wlk
Binary files differ
diff --git a/world/map/data/080-1.wlk b/world/map/data/080-1.wlk
new file mode 100644
index 00000000..3a1f02c9
--- /dev/null
+++ b/world/map/data/080-1.wlk
Binary files differ
diff --git a/world/map/data/080-3.wlk b/world/map/data/080-3.wlk
new file mode 100644
index 00000000..102bdbee
--- /dev/null
+++ b/world/map/data/080-3.wlk
Binary files differ
diff --git a/world/map/data/081-1.wlk b/world/map/data/081-1.wlk
new file mode 100644
index 00000000..774f115d
--- /dev/null
+++ b/world/map/data/081-1.wlk
Binary files differ
diff --git a/world/map/data/081-2.wlk b/world/map/data/081-2.wlk
new file mode 100644
index 00000000..c5d6b7ee
--- /dev/null
+++ b/world/map/data/081-2.wlk
Binary files differ
diff --git a/world/map/data/081-3.wlk b/world/map/data/081-3.wlk
new file mode 100644
index 00000000..44510db5
--- /dev/null
+++ b/world/map/data/081-3.wlk
Binary files differ
diff --git a/world/map/data/082-2.wlk b/world/map/data/082-2.wlk
new file mode 100644
index 00000000..f8a1c319
--- /dev/null
+++ b/world/map/data/082-2.wlk
Binary files differ
diff --git a/world/map/data/082-3.wlk b/world/map/data/082-3.wlk
new file mode 100644
index 00000000..3726f7ef
--- /dev/null
+++ b/world/map/data/082-3.wlk
Binary files differ
diff --git a/world/map/data/fermi.wlk b/world/map/data/fermi.wlk
new file mode 100644
index 00000000..5e55dabd
--- /dev/null
+++ b/world/map/data/fermi.wlk
Binary files differ
diff --git a/world/map/data/guild.wlk b/world/map/data/guild.wlk
new file mode 100644
index 00000000..bd11ef86
--- /dev/null
+++ b/world/map/data/guild.wlk
Binary files differ
diff --git a/world/map/data/prison.wlk b/world/map/data/prison.wlk
new file mode 100644
index 00000000..249adb7e
--- /dev/null
+++ b/world/map/data/prison.wlk
Binary files differ
diff --git a/world/map/data/resnametable.txt b/world/map/data/resnametable.txt
index cfebd318..39e74814 100644
--- a/world/map/data/resnametable.txt
+++ b/world/map/data/resnametable.txt
@@ -120,6 +120,13 @@
069-2#069-2.wlk#
070-1#070-1.wlk#
070-3#070-3.wlk#
+080-1#080-1.wlk#
+080-3#080-3.wlk#
+081-1#081-1.wlk#
+081-2#081-2.wlk#
+081-3#081-3.wlk#
+082-2#082-2.wlk#
+082-3#082-3.wlk#
099-1#099-1.wlk#
099-2#099-2.wlk#
099-3#099-3.wlk#
@@ -129,3 +136,6 @@
099-7#099-7.wlk#
099-8#099-8.wlk#
botcheck#botcheck.wlk#
+fermi#fermi.wlk#
+guild#guild.wlk#
+prison#prison.wlk#
diff --git a/world/map/db/item_db.conf b/world/map/db/item_db.conf
index eb0325dd..153dd543 100644
--- a/world/map/db/item_db.conf
+++ b/world/map/db/item_db.conf
@@ -2012,8 +2012,8 @@ item_db: (
AegisName: "WarlordBoots"
Name: "WarlordBoots"
Type: "IT_ARMOR"
- Buy: 19000
- Sell: 2000
+ Buy: 141500
+ Sell: 70750
Weight: 550
Matk: -22
Def: 5
@@ -6066,8 +6066,8 @@ item_db: (
AegisName: "ChainmailShirt"
Name: "ChainmailShirt"
Type: "IT_ARMOR"
- Buy: 15000
- Sell: 1500
+ Buy: 83750
+ Sell: 41875
Weight: 800
Matk: -120
Def: 20
@@ -6084,8 +6084,8 @@ item_db: (
AegisName: "LightPlatemail"
Name: "LightPlatemail"
Type: "IT_ARMOR"
- Buy: 50000
- Sell: 2500
+ Buy: 192500
+ Sell: 96250
Weight: 1200
Matk: -150
Def: 25
@@ -6217,8 +6217,8 @@ item_db: (
AegisName: "WarlordPlate"
Name: "WarlordPlate"
Type: "IT_ARMOR"
- Buy: 100000
- Sell: 3000
+ Buy: 351250
+ Sell: 175625
Weight: 2600
Matk: -170
Def: 27
@@ -10947,8 +10947,8 @@ item_db: (
AegisName: "WarlordHelmet"
Name: "WarlordHelmet"
Type: "IT_ARMOR"
- Buy: 30000
- Sell: 3000
+ Buy: 85750
+ Sell: 42875
Weight: 900
Matk: -36
Def: 18
@@ -17101,7 +17101,7 @@ item_db: (
KeepAfterUse: true
Trade: {
notrade: true
- nodrop: true
+ nodrop: false
nocart: true
nomail: true
noauction: true
@@ -17132,7 +17132,7 @@ item_db: (
KeepAfterUse: true
Trade: {
notrade: true
- nodrop: true
+ nodrop: false
nocart: true
nomail: true
noauction: true
@@ -18460,8 +18460,8 @@ item_db: (
AegisName: "SteelShield"
Name: "SteelShield"
Type: "IT_ARMOR"
- Buy: 40000
- Sell: 3000
+ Buy: 100000
+ Sell: 50000
Weight: 2500
Matk: -200
Def: 20
diff --git a/world/map/db/item_db_chest.txt b/world/map/db/item_db_chest.txt
index 25c91cdb..dac8b7a0 100644
--- a/world/map/db/item_db_chest.txt
+++ b/world/map/db/item_db_chest.txt
@@ -6,15 +6,15 @@
546, DesertShirt, 5, 2000, 1000, 140, 0, 6, 0, -18, 0, 2, 512, 0, 0, 0, 0, {}, {}
564, Turtleneck, 5, 2000, 1000, 130, 0, 6, 0, -18, 0, 2, 512, 0, 0, 0, 0, {}, {}
624, VNeckSweater, 5, 6000, 3000, 135, 0, 8, 0, -24, 0, 2, 512, 0, 0, 0, 0, {}, {}
-625, ChainmailShirt, 5, 15000, 1500, 800, 0, 20, 0, -120, 0, 2, 512, 0, 0, 0, 0, {}, {}
-626, LightPlatemail, 5, 50000, 2500, 1200, 0, 25, 0, -150, 0, 2, 512, 0, 0, 0, 0, {}, {}
+625, ChainmailShirt, 5, 83750, 41875, 800, 0, 20, 0, -120, 0, 2, 512, 0, 0, 0, 0, {}, {}
+626, LightPlatemail, 5, 192500, 96250, 1200, 0, 25, 0, -150, 0, 2, 512, 0, 0, 0, 0, {}, {}
645, GoldenPlatemail, 5, 350000, 3000, 4500, 0, 25, 0, -100, 0, 2, 512, 0, 0, 0, 0, {}, {bonus bCriticalDef, 5;}
649, WhiteEvokersRobeBlue, 5, 8000, 4000, 50, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, 0, {}, {bonus bAgi, 1; bonus bCriticalDef, 10;}
650, BlackEvokersRobeBlue, 5, 8000, 4000, 50, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, 0, {}, {bonus bAgi, 1; bonus bCriticalDef, 10;}
651, WhiteWizardRobe, 5, 8000, 4000, 50, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, 0, {}, {}
652, BlackWizardRobe, 5, 8000, 4000, 50, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, 0, {}, {}
653, ApprenticeRobe, 5, 8000, 4000, 50, 0, 5, 0, 20, 0, 2, 512, 0, 0, 0, 0, {}, {bonus bAgi, 1; bonus bCriticalDef, 10;}
-658, WarlordPlate, 5, 100000, 3000, 2600, 0, 27, 0, -170, 0, 2, 512, 0, 0, 0, 0, {}, {}
+658, WarlordPlate, 5, 351250, 175625, 2600, 0, 27, 0, -170, 0, 2, 512, 0, 0, 0, 0, {}, {}
659, GoldenWarlordPlate, 5, 500000, 4000, 7600, 0, 27, 0, -110, 0, 2, 512, 0, 0, 0, 0, {}, {bonus bCriticalDef, 10;}
688, TankTop, 5, 800, 400, 10, 0, 2, 0, -4, 0, 2, 512, 0, 0, 0, 0, {}, {}
689, ShortTankTop, 5, 600, 300, 8, 0, 2, 0, -4, 0, 2, 512, 0, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_foot.txt b/world/map/db/item_db_foot.txt
index 10f1d07c..c5754fbf 100644
--- a/world/map/db/item_db_foot.txt
+++ b/world/map/db/item_db_foot.txt
@@ -8,7 +8,7 @@
735, CottonBoots, 5, 2000, 500, 10, 0, 1, 0, 1, 0, 2, 64, 0, 0, 0, 0, {}, {}
757, AssassinBoots, 5, 7000, 2000, 10, 0, 3, 0, -3, 0, 2, 64, 0, 0, 0, 0, {}, {callfunc "BrawlingItem"; bonus bAgi, 4;}
792, BromenalBoots, 5, 8000, 500, 250, 0, 4, 0, -14, 0, 2, 64, 0, 0, 0, 0, {}, {}
-876, WarlordBoots, 5, 19000, 2000, 550, 0, 5, 0, -22, 0, 2, 64, 0, 0, 0, 0, {}, {}
+876, WarlordBoots, 5, 141500, 70750, 550, 0, 5, 0, -22, 0, 2, 64, 0, 0, 0, 0, {}, {}
1188, RedStockings, 5, 7000, 2000, 10, 0, 1, 0, 2, 0, 2, 64, 0, 0, 0, 0, {}, {}
2150, RedCottonBoots, 5, 2000, 500, 10, 0, 1, 0, 1, 0, 2, 64, 0, 0, 0, 0, {}, {}
2151, GreenCottonBoots, 5, 2000, 500, 10, 0, 1, 0, 1, 0, 2, 64, 0, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt
index 374909c9..5d2470bb 100644
--- a/world/map/db/item_db_head.txt
+++ b/world/map/db/item_db_head.txt
@@ -23,7 +23,7 @@
633, ChristmasElfHat, 5, 3000, 1500, 30, 0, 13, 0, 2, 0, 2, 256, 0, 0, 0, 0, {}, {}
634, FaceMask, 5, 2500, 1250, 50, 0, 10, 0, 0, 0, 2, 256, 0, 0, 0, 0, {}, {}
//ID, Name, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, Mode, {UseScript}, {EquipScript}
-636, WarlordHelmet, 5, 30000, 3000, 900, 0, 18, 0, -36, 0, 2, 256, 0, 0, 0, 0, {}, {}
+636, WarlordHelmet, 5, 85750, 42875, 900, 0, 18, 0, -36, 0, 2, 256, 0, 0, 0, 0, {}, {}
637, KnightsHelmet, 5, 20000, 2000, 600, 0, 15, 0, -30, 0, 2, 256, 0, 0, 0, 0, {}, {}
638, InfantryHelmet, 5, 15000, 1500, 400, 0, 15, 0, -30, 0, 2, 256, 0, 0, 0, 0, {}, {}
639, CrusadeHelmet, 5, 25000, 2500, 1300, 0, 18, 0, -36, 0, 2, 256, 0, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_offhand.txt b/world/map/db/item_db_offhand.txt
index 52e500df..9bf9996b 100644
--- a/world/map/db/item_db_offhand.txt
+++ b/world/map/db/item_db_offhand.txt
@@ -3,7 +3,7 @@
//Edit item_db.conf instead!
//ID, Name, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, Mode, {UseScript}, {EquipScript}
585, ScarabArmlet, 5, 8000, 4000, 200, 0, 0, 0, 5, 0, 2, 32, 0, 1, 0, 0, {}, {bonus bInt, 1;}
-601, SteelShield, 5, 40000, 3000, 2500, 0, 20, 0, -200, 0, 2, 32, 0, 0, 0, 0, {}, {}
+601, SteelShield, 5, 100000, 50000, 2500, 0, 20, 0, -200, 0, 2, 32, 0, 0, 0, 0, {}, {}
602, WoodenShield, 5, 10000, 2000, 1500, 0, 14, 0, -70, 0, 2, 32, 0, 0, 0, 0, {}, {}
603, LeatherShield, 5, 2000, 1000, 1300, 0, 7, 0, -35, 0, 2, 32, 0, 0, 0, 0, {}, {}
//797, BromenalShield, 5, 40000, 3000, 2000, 0, 18, 0, -160, 0, 2, 32, 0, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_use.txt b/world/map/db/item_db_use.txt
index 5bb8137c..020bc80b 100644
--- a/world/map/db/item_db_use.txt
+++ b/world/map/db/item_db_use.txt
@@ -150,5 +150,5 @@
5382, AnchorStone, 0, 90000, 45000, 40, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 23, {set @StoneName$, "AnchorStone"; callfunc "useAnchorStone";}, {}
//ID, Name, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, Mode, {UseScript}, {EquipScript}
5383, AnchoredAnchorStone, 0, 0, 0, 40, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 31, {set @StoneName$, "AnchoredAnchorStone"; callfunc "useAnchorStone";}, {}
-5405, LegendaryShovel, 0, 0, 0, 210, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 23, {set @ShovelName$, "LegendaryShovel"; callfunc "useShovel";}, {}
-5406, LegendaryTreasureMap, 0, 0, 0, 14, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 23, {set @MapName$, "LegendaryTreasureMap"; callfunc "readMap";}, {}
+5405, LegendaryShovel, 0, 0, 0, 210, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 22, {set @ShovelName$, "LegendaryShovel"; callfunc "useShovel";}, {}
+5406, LegendaryTreasureMap, 0, 0, 0, 14, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 22, {set @MapName$, "LegendaryTreasureMap"; callfunc "readMap";}, {}
diff --git a/world/map/db/mob_db.conf b/world/map/db/mob_db.conf
index 21a59413..c97b044f 100644
--- a/world/map/db/mob_db.conf
+++ b/world/map/db/mob_db.conf
@@ -2541,6 +2541,7 @@ mob_db: (
GambogeScroll: 10
MauveScroll: 10
JoyplimScroll: 10
+ PointyWitchHat: 1
}
},
{
@@ -3447,6 +3448,7 @@ mob_db: (
GambogeScroll: 10
MauveScroll: 10
JoyplimScroll: 10
+ PointyWitchHat: 1
}
},
{
@@ -3664,6 +3666,9 @@ mob_db: (
AttackDelay: 672
AttackMotion: 672
DamageMotion: 50
+ Drops: {
+ PointyWitchHat: 1
+ }
},
{
Id: 1143
@@ -3928,13 +3933,8 @@ mob_db: (
MutationCount: 1
MutationStrength: 10
Drops: {
- TreasureKey: 800
- UndeadEar: 150
- UndeadEye: 150
- RottenRags: 70
- Soul: 50
BlackRose: 30
- MagicRing: 4
+ MagicRing: 2
BlinkingHocus: 1
}
},
@@ -3981,13 +3981,11 @@ mob_db: (
MutationCount: 1
MutationStrength: 10
Drops: {
- TreasureKey: 800
- UndeadEar: 90
- UndeadEye: 80
- RottenRags: 70
- Soul: 50
+ Arrow: 5000
+ IronArrow: 5000
+ SilverArrow: 50
BlackRose: 30
- EnchantersAmulet: 2
+ EnchantersAmulet: 1
}
},
{
@@ -4559,6 +4557,9 @@ mob_db: (
AttackDelay: 672
AttackMotion: 672
DamageMotion: 50
+ Drops: {
+ PointyWitchHat: 1
+ }
},
{
Id: 1004
diff --git a/world/map/db/mob_db_over_100.txt b/world/map/db/mob_db_over_100.txt
index 443361a6..25e90507 100644
--- a/world/map/db/mob_db_over_100.txt
+++ b/world/map/db/mob_db_over_100.txt
@@ -20,7 +20,7 @@
1072, Yeti, Yeti, 100, 8500, 0, 9040, 726, 2, 100, 400, 60, 15, 0, 60, 5, 45, 15, 60, 32, 9, 10, 1, 0, 31, 135, 220, 1200, 672, 900, 4023, 700, 4024, 300, 4025, 400, 4027, 142, 4021, 800, 4022, 700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1075, Stalker, Stalker, 120, 20000, 0, 15628, 4000, 2, 220, 500, 23, 30, 0, 35, 15, 3, 50, 50, 50, 2, 10, 1, 1, 17, 175, 340, 1800, 672, 950, 775, 75, 775, 115, 776, 135, 631, 40, 778, 500, 1198, 500, 5116, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20
1096, SoulSnake, SoulSnake, 115, 850, 0, 325, 56, 1, 75, 90, 4, 6, 0, 20, 11, 10, 10, 35, 10, 9, 10, 1, 0, 10, 137, 900, 1300, 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, 0, 0, 2, 30
-1102, Luvia, Luvia, 127, 48044, 60, 315973, 12172, 5, 339, 364, 50, 92, 0, 1, 29, 55, 255, 255, 255, 31, 10, 1, 1, 37, 181, 220, 1200, 672, 50, 5141, 10, 5142, 10, 5143, 10, 5144, 10, 5145, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1102, Luvia, Luvia, 127, 48044, 60, 315973, 12172, 5, 339, 364, 50, 92, 0, 1, 29, 55, 255, 255, 255, 31, 10, 1, 1, 37, 181, 220, 1200, 672, 50, 5141, 10, 5142, 10, 5143, 10, 5144, 10, 5145, 10, 5200, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1106, WickedMushroom, WickedMushroom, 110, 550, 0, 220, 30, 1, 70, 80, 4, 4, 0, 16, 12, 10, 10, 35, 10, 9, 10, 1, 3, 12, 133, 800, 1800, 672, 480, 613, 600, 4007, 50, 567, 100, 566, 1000, 5334, 30, 5360, 100, 5145, 40, 5397, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 60
//ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, CRITDEF,STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop0id,Drop0%, Drop1id,Drop1%, Drop2id,Drop2%, Drop3id,Drop3%, Drop4id,Drop4%, Drop5id,Drop5%, Drop6id,Drop6%, Drop7id,Drop7%, Drop8id,Drop8%, Drop9id,Drop9%, Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
1114, Nutcracker, Nutcracker, 110, 6000, 0, 4226, 769, 1, 81, 281, 20, 37, 0, 40, 20, 10, 5, 60, 40, 9, 10, 1, 1, 17, 133, 400, 872, 672, 900, 569, 1000, 660, 750, 539, 750, 503, 250, 640, 200, 4004, 200, 4001, 600, 1190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
diff --git a/world/map/db/mob_db_over_150.txt b/world/map/db/mob_db_over_150.txt
index 00c50972..4021a887 100644
--- a/world/map/db/mob_db_over_150.txt
+++ b/world/map/db/mob_db_over_150.txt
@@ -11,22 +11,22 @@
1121, Grenadier, Grenadier, 170, 6000, 0, 4332, 999, 6, 100, 200, 8, 50, 0, 12, 10, 50, 60, 90, 70, 9, 10, 1, 0, 10, 143, 500, 2000, 672, 480, 539, 1000, 657, 1000, 701, 500, 704, 250, 700, 250, 617, 100, 765, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 40
1122, DreadPirateMarley, DreadPirateMarley, 180, 10000, 0, 17612, 20000, 6, 175, 250, 38, 32, 0, 10, 20, 40, 20, 90, 80, 9, 10, 1, 0, 10, 175, 400, 700, 672, 480, 539, 1000, 657, 1000, 701, 500, 704, 250, 700, 250, 621, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1134, SUSAN, SUSAN, 255, 696969, 0, 69000, 1400, 1, 0, 0, 69, 69, 0, 69, 69, 69, 69, 69, 69, 9, 10, 1, 1, 17, 161, 1500, 1872, 672, 480, 838, 6000, 839, 6000, 840, 6000, 1229, 200, 1230, 500, 1231, 500, 1232, 500, 1281, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
-1137, Tormenta, Tormenta, 200, 18000, 60, 500000, 5000, 5, 360, 374, 48, 70, 0, 1, 32, 60, 255, 255, 255, 31, 10, 1, 1, 37, 181, 210, 1200, 672, 50, 5141, 10, 5142, 10, 5143, 10, 5144, 10, 5145, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1137, Tormenta, Tormenta, 200, 18000, 60, 500000, 5000, 5, 360, 374, 48, 70, 0, 1, 32, 60, 255, 255, 255, 31, 10, 1, 1, 37, 181, 210, 1200, 672, 50, 5141, 10, 5142, 10, 5143, 10, 5144, 10, 5145, 10, 5200, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1138, ManaGuard, ManaGuard, 180, 20000, 280, 27000, 5000, 2, 280, 324, 22, 67, 0, 31, 22, 90, 127, 255, 95, 31, 10, 1, 1, 37, 181, 210, 1200, 672, 50, 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, 0, 0, 0, 0
1139, Virus, Virus, 170, 5000, 0, 5254, 721, 6, 45, 75, 37, 12, 0, 30, 30, 20, 20, 25, 60, 9, 10, 1, 3, 12, 143, 600, 1872, 672, 480, 787, 500, 743, 1100, 5236, 11, 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
1140, Tengu, Tengu, 180, 24000, 280, 45000, 5000, 2, 180, 224, 67, 9, 0, 31, 22, 90, 97, 255, 95, 31, 10, 1, 1, 37, 181, 310, 1200, 672, 50, 825, 500, 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, 0, 0
1141, Sasquatch, Sasquatch, 180, 24000, 280, 45000, 5000, 2, 420, 444, 12, 27, 0, 31, 22, 90, 97, 255, 95, 31, 10, 1, 1, 37, 181, 310, 1200, 672, 50, 825, 500, 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, 0, 0
-1142, Kage, Kage, 200, 29999, 280, 999999, 99999, 9, 90, 124, 74, 100, 0, 199, 2, 199, 197, 255, 175, 31, 10, 1, 1, 37, 181, 210, 672, 672, 50, 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, 0, 0, 0, 0
+1142, Kage, Kage, 200, 29999, 280, 999999, 99999, 9, 90, 124, 74, 100, 0, 199, 2, 199, 197, 255, 175, 31, 10, 1, 1, 37, 181, 210, 672, 672, 50, 5200, 1, 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, 0, 0
1143, ManaSlayer, ManaSlayer, 180, 24000, 280, 42000, 5000, 2, 260, 274, 22, 67, 0, 31, 22, 90, 127, 255, 95, 31, 10, 1, 1, 37, 181, 210, 1200, 672, 50, 825, 500, 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, 0, 0
1144, Dragon, Dragon, 250, 29999, 280, 1, 1, 3, 60, 90, 67, 67, 0, 199, 2, 199, 197, 255, 95, 31, 10, 1, 1, 37, 181, 210, 1200, 672, 50, 759, 1, 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, 0, 0
1145, KageGolem, KageGolem, 180, 29999, 280, 150000, 15000, 6, 140, 174, 72, 55, 0, 31, 22, 90, 127, 255, 125, 31, 10, 1, 1, 37, 181, 410, 1000, 672, 50, 5251, 10000, 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, 0, 0
1146, Flashmob, Flashmob, 181, 27000, 280, 72000, 5000, 3, 40, 60, 57, 57, 0, 31, 22, 90, 127, 255, 95, 31, 10, 1, 1, 37, 181, 160, 600, 672, 50, 825, 500, 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, 0, 0
1147, Koyntety, Koyntety, 181, 27000, 280, 72000, 5000, 4, 220, 240, 52, 52, 0, 31, 22, 90, 127, 255, 105, 31, 10, 1, 1, 37, 181, 240, 1400, 672, 50, 825, 500, 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, 0, 0
//ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, CRITDEF,STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop0id,Drop0%, Drop1id,Drop1%, Drop2id,Drop2%, Drop3id,Drop3%, Drop4id,Drop4%, Drop5id,Drop5%, Drop6id,Drop6%, Drop7id,Drop7%, Drop8id,Drop8%, Drop9id,Drop9%, Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
-1148, DoomGolem, DoomGolem, 180, 22000, 280, 65000, 2000, 3, 160, 180, 60, 30, 0, 31, 22, 90, 127, 255, 105, 31, 10, 1, 1, 37, 181, 320, 1000, 672, 50, 537, 800, 779, 150, 780, 150, 777, 70, 1198, 50, 666, 30, 5253, 4, 5258, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10
-1149, Enchanter, Enchanter, 181, 19000, 280, 55000, 2000, 8, 140, 180, 30, 60, 0, 31, 22, 90, 127, 255, 105, 31, 10, 1, 1, 37, 181, 240, 800, 672, 50, 537, 800, 779, 90, 780, 80, 777, 70, 1198, 50, 666, 30, 1227, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10
+1148, DoomGolem, DoomGolem, 180, 22000, 280, 65000, 2000, 3, 160, 180, 60, 30, 0, 31, 22, 90, 127, 255, 105, 31, 10, 1, 1, 37, 181, 320, 1000, 672, 50, 666, 30, 5253, 2, 5258, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10
+1149, Enchanter, Enchanter, 181, 19000, 280, 55000, 2000, 8, 140, 180, 30, 60, 0, 31, 22, 90, 127, 255, 105, 31, 10, 1, 1, 37, 181, 240, 800, 672, 50, 1199, 5000, 529, 5000, 5290, 50, 666, 30, 1227, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10
1150, ManaTyrant, ManaTyrant, 180, 24000, 280, 27000, 5000, 2, 300, 325, 42, 67, 0, 31, 22, 90, 127, 255, 95, 31, 10, 1, 1, 37, 181, 180, 1050, 672, 50, 759, 1, 5237, 20, 1253, 5, 720, 100, 825, 500, 868, 20, 1172, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-1161, Xakelbael, Xakelbael, 200, 29999, 280, 999999, 99999, 9, 90, 124, 74, 100, 0, 199, 2, 199, 197, 255, 175, 31, 10, 1, 1, 37, 181, 210, 672, 672, 50, 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, 0, 0, 0, 0
+1161, Xakelbael, Xakelbael, 200, 29999, 280, 999999, 99999, 9, 90, 124, 74, 100, 0, 199, 2, 199, 197, 255, 175, 31, 10, 1, 1, 37, 181, 210, 672, 672, 50, 5200, 1, 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, 0, 0
1170, CrystalGolem, CrystalGolem, 180, 25000, 280, 68000, 2200, 3, 170, 190, 75, 40, 0, 35, 26, 99, 127, 255, 105, 31, 30, 1, 0, 46, 169, 320, 1000, 672, 50, 5384, 400, 5384, 200, 5384, 100, 4002, 50, 4003, 50, 4004, 50, 4005, 50, 4006, 50, 4007, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1171, BlackCrystalGolem, BlackCrystalGolem, 180, 25000, 280, 68000, 2200, 3, 170, 190, 75, 40, 0, 35, 26, 99, 127, 255, 105, 31, 30, 1, 0, 46, 169, 320, 1000, 672, 50, 5385, 400, 5385, 200, 5385, 100, 4002, 50, 4003, 50, 4004, 50, 4005, 50, 4006, 50, 4007, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1183, MobMoubootaur, MobMoubootaur, 220, 99999, 9999, 999999, 99999, 1, 400, 500, 99, 99, 0, 99, 60, 99, 30, 255, 255, 18, 18, 1, 6, 47, 165, 240, 872, 272, 100, 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, 0, 0, 0, 0
diff --git a/world/map/npc/001-1/_warps.txt b/world/map/npc/001-1/_warps.txt
index 2b3f2dfd..8c648d70 100644
--- a/world/map/npc/001-1/_warps.txt
+++ b/world/map/npc/001-1/_warps.txt
@@ -7,6 +7,7 @@
001-1,52,71|warp|-1,-1,001-2,28,27
001-1,49,71|warp|-1,-1,001-2,25,27
001-1,114,99|warp|-1,-1,001-2,25,64
+001-1,114,82|warp|-1,-1,001-2,57,52
001-1,27,32|warp|-1,-1,001-2,28,101
001-1,37,32|warp|-1,-1,001-2,71,101
001-1,55,34|warp|0,-1,001-2,104,101
diff --git a/world/map/npc/001-1/npcs.txt b/world/map/npc/001-1/npcs.txt
index 2e10dbd1..d940549c 100644
--- a/world/map/npc/001-1/npcs.txt
+++ b/world/map/npc/001-1/npcs.txt
@@ -32,7 +32,7 @@ L_Marikel_2:
next;
mes "\"I'll just play safe and stick to putting our stock away. Be careful, the monsters outside the city can be dangerous.\"";
next;
- mes "\"The Sandstorm mine, just South of Tulimshar, is blocked from most but miners, soldiers and seasoned monster slayers.\"";
+ mes "\"The Sandstorm mine, just South of Tulimshar, is blocked to most but miners, soldiers and seasoned monster slayers.\"";
close;
}
@@ -52,7 +52,7 @@ L_Marikel_2:
set @npcname$, "Harper";
mes "[" + @npcname$ + "]";
- mes "\"My captain knows an awlful lot about the world's continents.\"";
+ mes "\"My captain knows an awful lot about the world's continents.\"";
close;
}
001-1,75,99,0|script|Swezanne|206
diff --git a/world/map/npc/001-2/_warps.txt b/world/map/npc/001-2/_warps.txt
index 07ebce6d..9eef0564 100644
--- a/world/map/npc/001-2/_warps.txt
+++ b/world/map/npc/001-2/_warps.txt
@@ -16,3 +16,5 @@
001-2,57,90|warp|-1,-1,001-2,35,94
001-2,36,95|warp|-1,0,001-2,58,90
001-2,65,26|warp|-1,-1,001-1,59,99
+001-2,60,50|warp|-1,-1,prison,46,23
+001-2,57,53|warp|-1,-1,001-1,114,83
diff --git a/world/map/npc/009-1/milly.txt b/world/map/npc/009-1/milly.txt
index a32f7617..5950cf29 100644
--- a/world/map/npc/009-1/milly.txt
+++ b/world/map/npc/009-1/milly.txt
@@ -244,7 +244,7 @@ L_GotSetzer:
next;
mes "\"Somehow I feel that you still need to establish your courage. The elders say that although they find you an admirable person, a hero of renown; that you can't be considered as great as Kfahr till you have proven yourself fearless.\"";
next;
- mes "\"You could prove yourself as the greatest hero who has walked the land by accepting Paruas challenge at Candor. Stare death in the eyes, show no fear and conquer! Show everyone that you are worthy of the title: The Greatest Hero Ever!\"";
+ mes "\"You could prove yourself as the greatest hero who has walked the land by accepting Parua's challenge at Candor. Stare death in the eyes, show no fear and conquer! Show everyone that you are worthy of the title: The Greatest Hero Ever!\"";
next;
mes "\"I myself already consider you my favorite hero, sure Kfahr has done great things, but...\"";
next;
diff --git a/world/map/npc/080-1/_import.txt b/world/map/npc/080-1/_import.txt
new file mode 100644
index 00000000..cafaba0c
--- /dev/null
+++ b/world/map/npc/080-1/_import.txt
@@ -0,0 +1,6 @@
+// Map 080-1: Mysterious Glade
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 080-1
+npc: npc/080-1/_mobs.txt
+npc: npc/080-1/_nodes.txt
+npc: npc/080-1/_warps.txt
diff --git a/world/map/npc/080-1/_mobs.txt b/world/map/npc/080-1/_mobs.txt
new file mode 100644
index 00000000..6fc52fa7
--- /dev/null
+++ b/world/map/npc/080-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Mysterious Glade mobs
+
diff --git a/world/map/npc/080-1/_nodes.txt b/world/map/npc/080-1/_nodes.txt
new file mode 100644
index 00000000..449b6975
--- /dev/null
+++ b/world/map/npc/080-1/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Mysterious Glade nodes
+
+// (no nodes)
diff --git a/world/map/npc/080-1/_warps.txt b/world/map/npc/080-1/_warps.txt
new file mode 100644
index 00000000..97de0f6f
--- /dev/null
+++ b/world/map/npc/080-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Mysterious Glade warps
+
diff --git a/world/map/npc/080-3/_import.txt b/world/map/npc/080-3/_import.txt
new file mode 100644
index 00000000..593a5e46
--- /dev/null
+++ b/world/map/npc/080-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 080-3: Forgotten Glade
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 080-3
+npc: npc/080-3/_mobs.txt
+npc: npc/080-3/_nodes.txt
+npc: npc/080-3/_warps.txt
diff --git a/world/map/npc/080-3/_mobs.txt b/world/map/npc/080-3/_mobs.txt
new file mode 100644
index 00000000..5fce2024
--- /dev/null
+++ b/world/map/npc/080-3/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Forgotten Glade mobs
+
diff --git a/world/map/npc/080-3/_nodes.txt b/world/map/npc/080-3/_nodes.txt
new file mode 100644
index 00000000..c809d136
--- /dev/null
+++ b/world/map/npc/080-3/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Forgotten Glade nodes
+
+// (no nodes)
diff --git a/world/map/npc/080-3/_warps.txt b/world/map/npc/080-3/_warps.txt
new file mode 100644
index 00000000..e6ecce07
--- /dev/null
+++ b/world/map/npc/080-3/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Forgotten Glade warps
+
+080-3,84,155|warp|0,-1,081-3,44,23
diff --git a/world/map/npc/081-1/_import.txt b/world/map/npc/081-1/_import.txt
new file mode 100644
index 00000000..f35b3648
--- /dev/null
+++ b/world/map/npc/081-1/_import.txt
@@ -0,0 +1,6 @@
+// Map 081-1: Aethyr
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 081-1
+npc: npc/081-1/_mobs.txt
+npc: npc/081-1/_nodes.txt
+npc: npc/081-1/_warps.txt
diff --git a/world/map/npc/081-1/_mobs.txt b/world/map/npc/081-1/_mobs.txt
new file mode 100644
index 00000000..27f6cc97
--- /dev/null
+++ b/world/map/npc/081-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aethyr mobs
+
diff --git a/world/map/npc/081-1/_nodes.txt b/world/map/npc/081-1/_nodes.txt
new file mode 100644
index 00000000..4eb18abe
--- /dev/null
+++ b/world/map/npc/081-1/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aethyr nodes
+
+// (no nodes)
diff --git a/world/map/npc/081-1/_warps.txt b/world/map/npc/081-1/_warps.txt
new file mode 100644
index 00000000..e56660cc
--- /dev/null
+++ b/world/map/npc/081-1/_warps.txt
@@ -0,0 +1,6 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aethyr warps
+
+081-1,68,30|warp|-1,-1,081-2,90,298
+081-1,58,104|warp|-1,-1,020-1,84,75
+081-1,44,89|warp|-1,-1,082-2,88,25
diff --git a/world/map/npc/081-2/_import.txt b/world/map/npc/081-2/_import.txt
new file mode 100644
index 00000000..60017ade
--- /dev/null
+++ b/world/map/npc/081-2/_import.txt
@@ -0,0 +1,6 @@
+// Map 081-2: Northern Lights
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 081-2
+npc: npc/081-2/_mobs.txt
+npc: npc/081-2/_nodes.txt
+npc: npc/081-2/_warps.txt
diff --git a/world/map/npc/081-2/_mobs.txt b/world/map/npc/081-2/_mobs.txt
new file mode 100644
index 00000000..fa19192a
--- /dev/null
+++ b/world/map/npc/081-2/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Northern Lights mobs
+
diff --git a/world/map/npc/081-2/_nodes.txt b/world/map/npc/081-2/_nodes.txt
new file mode 100644
index 00000000..b4162204
--- /dev/null
+++ b/world/map/npc/081-2/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Northern Lights nodes
+
+// (no nodes)
diff --git a/world/map/npc/081-2/_warps.txt b/world/map/npc/081-2/_warps.txt
new file mode 100644
index 00000000..0f47357f
--- /dev/null
+++ b/world/map/npc/081-2/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Northern Lights warps
+
+081-2,90,20|warp|-1,-1,081-3,44,50
+081-2,90,299|warp|-1,-1,081-1,68,31
diff --git a/world/map/npc/081-3/_import.txt b/world/map/npc/081-3/_import.txt
new file mode 100644
index 00000000..237a93c5
--- /dev/null
+++ b/world/map/npc/081-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 081-3: Existential Frontier
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 081-3
+npc: npc/081-3/_mobs.txt
+npc: npc/081-3/_nodes.txt
+npc: npc/081-3/_warps.txt
diff --git a/world/map/npc/081-3/_mobs.txt b/world/map/npc/081-3/_mobs.txt
new file mode 100644
index 00000000..6493e765
--- /dev/null
+++ b/world/map/npc/081-3/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Existential Frontier mobs
+
diff --git a/world/map/npc/081-3/_nodes.txt b/world/map/npc/081-3/_nodes.txt
new file mode 100644
index 00000000..5ca051db
--- /dev/null
+++ b/world/map/npc/081-3/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Existential Frontier nodes
+
+// (no nodes)
diff --git a/world/map/npc/081-3/_warps.txt b/world/map/npc/081-3/_warps.txt
new file mode 100644
index 00000000..fcca59a7
--- /dev/null
+++ b/world/map/npc/081-3/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Existential Frontier warps
+
+081-3,44,22|warp|-1,-1,080-3,84,154
+081-3,44,51|warp|-1,-1,081-2,90,21
diff --git a/world/map/npc/082-2/_import.txt b/world/map/npc/082-2/_import.txt
new file mode 100644
index 00000000..5d5646d1
--- /dev/null
+++ b/world/map/npc/082-2/_import.txt
@@ -0,0 +1,6 @@
+// Map 082-2: Porthos - Frontier
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 082-2
+npc: npc/082-2/_mobs.txt
+npc: npc/082-2/_nodes.txt
+npc: npc/082-2/_warps.txt
diff --git a/world/map/npc/082-2/_mobs.txt b/world/map/npc/082-2/_mobs.txt
new file mode 100644
index 00000000..689ad2b7
--- /dev/null
+++ b/world/map/npc/082-2/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Porthos - Frontier mobs
+
diff --git a/world/map/npc/082-2/_nodes.txt b/world/map/npc/082-2/_nodes.txt
new file mode 100644
index 00000000..9b2e0796
--- /dev/null
+++ b/world/map/npc/082-2/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Porthos - Frontier nodes
+
+// (no nodes)
diff --git a/world/map/npc/082-2/_warps.txt b/world/map/npc/082-2/_warps.txt
new file mode 100644
index 00000000..249afc27
--- /dev/null
+++ b/world/map/npc/082-2/_warps.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Porthos - Frontier warps
+
+082-2,81,13|warp|-1,-1,000-1,22,22
+082-2,44,13|warp|-1,-1,000-1,22,22
+082-2,55,33|warp|-1,-1,000-1,22,22
+082-2,57,12|warp|-1,-1,000-1,22,22
+082-2,28,16|warp|-1,-1,082-3,111,35
+082-2,88,26|warp|-1,-1,081-1,44,90
diff --git a/world/map/npc/082-3/_import.txt b/world/map/npc/082-3/_import.txt
new file mode 100644
index 00000000..6f883e7e
--- /dev/null
+++ b/world/map/npc/082-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 082-3: Aether Caves
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: 082-3
+npc: npc/082-3/_mobs.txt
+npc: npc/082-3/_nodes.txt
+npc: npc/082-3/_warps.txt
diff --git a/world/map/npc/082-3/_mobs.txt b/world/map/npc/082-3/_mobs.txt
new file mode 100644
index 00000000..9d8f3638
--- /dev/null
+++ b/world/map/npc/082-3/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aether Caves mobs
+
diff --git a/world/map/npc/082-3/_nodes.txt b/world/map/npc/082-3/_nodes.txt
new file mode 100644
index 00000000..1de2e9c5
--- /dev/null
+++ b/world/map/npc/082-3/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aether Caves nodes
+
+// (no nodes)
diff --git a/world/map/npc/082-3/_warps.txt b/world/map/npc/082-3/_warps.txt
new file mode 100644
index 00000000..8bfc67ad
--- /dev/null
+++ b/world/map/npc/082-3/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Aether Caves warps
+
+082-3,111,34|warp|-1,-1,082-2,28,17
diff --git a/world/map/npc/_import.txt b/world/map/npc/_import.txt
index 2e832cdb..835d6613 100644
--- a/world/map/npc/_import.txt
+++ b/world/map/npc/_import.txt
@@ -122,6 +122,13 @@ import: npc/058-2/_import.txt
import: npc/069-2/_import.txt
import: npc/070-1/_import.txt
import: npc/070-3/_import.txt
+import: npc/080-1/_import.txt
+import: npc/080-3/_import.txt
+import: npc/081-1/_import.txt
+import: npc/081-2/_import.txt
+import: npc/081-3/_import.txt
+import: npc/082-2/_import.txt
+import: npc/082-3/_import.txt
import: npc/099-1/_import.txt
import: npc/099-2/_import.txt
import: npc/099-3/_import.txt
@@ -131,3 +138,6 @@ import: npc/099-6/_import.txt
import: npc/099-7/_import.txt
import: npc/099-8/_import.txt
import: npc/botcheck/_import.txt
+import: npc/fermi/_import.txt
+import: npc/guild/_import.txt
+import: npc/prison/_import.txt
diff --git a/world/map/npc/fermi/_import.txt b/world/map/npc/fermi/_import.txt
new file mode 100644
index 00000000..3860cda1
--- /dev/null
+++ b/world/map/npc/fermi/_import.txt
@@ -0,0 +1,6 @@
+// Map fermi: Three Fermi Land
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: fermi
+npc: npc/fermi/_mobs.txt
+npc: npc/fermi/_nodes.txt
+npc: npc/fermi/_warps.txt
diff --git a/world/map/npc/fermi/_mobs.txt b/world/map/npc/fermi/_mobs.txt
new file mode 100644
index 00000000..d49b9534
--- /dev/null
+++ b/world/map/npc/fermi/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Three Fermi Land mobs
+
diff --git a/world/map/npc/fermi/_nodes.txt b/world/map/npc/fermi/_nodes.txt
new file mode 100644
index 00000000..2f3e21fc
--- /dev/null
+++ b/world/map/npc/fermi/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Three Fermi Land nodes
+
+// (no nodes)
diff --git a/world/map/npc/fermi/_warps.txt b/world/map/npc/fermi/_warps.txt
new file mode 100644
index 00000000..a8a14cb8
--- /dev/null
+++ b/world/map/npc/fermi/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Three Fermi Land warps
+
+fermi,29,19|warp|-1,-1,017-9,32,31
+fermi,21,19|warp|-1,-1,009-1,42,44
diff --git a/world/map/npc/functions/ferry.txt b/world/map/npc/functions/ferry.txt
index 5f9e57f7..53e33482 100644
--- a/world/map/npc/functions/ferry.txt
+++ b/world/map/npc/functions/ferry.txt
@@ -95,7 +95,7 @@ function|script|FerryHelp
mes "\"Once on the ship, it will sail to different ports and annouce where it is docking.\"";
mes "\"There are 2 Ferrys, both ferrys are free to ride.\"";
mes "\"The Main ferry travels from Argeas, Kaizei and Tonori. It docks in the major ports Hurnscald North, Nivalis and the Tulimshar Dock.\"";
- mes "\"The Candor Ferry only travels betwen Candor and the Hurnscald South Dock.\"";
+ mes "\"The Candor Ferry only travels between Candor and the Hurnscald South Dock.\"";
mes "\"Refreshments and supplies are offered aboard both ships during the voyage.\"";
mes "\"We also have some slot machines in case you get bored.\"";
return;
diff --git a/world/map/npc/functions/storage_chests.txt b/world/map/npc/functions/storage_chests.txt
new file mode 100644
index 00000000..1a603512
--- /dev/null
+++ b/world/map/npc/functions/storage_chests.txt
@@ -0,0 +1,18 @@
+// Storage Chests by Hello=). Idea by Thorbjorn.
+
+-|script|StorageChests|32767
+{
+ openstorage;
+ end;
+
+OnInit:
+// void intentional: even if puppet() fails, chests are just convenience.
+// Map X Y Name 111 = Chest
+ void (puppet("009-2", 21, 99, "Storage#hurns", 111));
+ void (puppet("020-2", 124, 63, "Storage#nivalis", 111));
+ void (puppet("001-2", 61, 17, "Storage#tulimshar", 111));
+ void (puppet("029-2", 29, 116, "Storage#candor", 111));
+ void (puppet("026-2", 26, 118, "Storage#GyInn", 111));
+ end;
+}
+
diff --git a/world/map/npc/functions/teleport_manager.txt b/world/map/npc/functions/teleport_manager.txt
index 529bd5e0..7a9d8980 100644
--- a/world/map/npc/functions/teleport_manager.txt
+++ b/world/map/npc/functions/teleport_manager.txt
@@ -126,32 +126,33 @@ OnCmdHelp:
// Invoked when player steps on npc. Manager NPC ignores this.
OnTouch:
if (.IS_MANAGER) end; // Manager NPC isnt teleport -> no interaction.
- if (.inactive) end; // If gate deactivated -> no interaction.
+ if (.inactive) goto L_CantPass; // If gate deactivated -> can't pass
if ((.cookie) && (teleport_cookie != .cookie)) goto L_CantPass;
- set teleport_cookie, 0; // Clear teleport cookie of player on teleport use.
- sc_start SC_SLOWMOVE, .fx_time+200, 100000; // Slow player temporarily to avoid movement VS warp DCs
- addtimer .fx_time, strnpcinfo(0)+"::OnTeleport"; // time before teleporting away
+ if (.cookie) set teleport_cookie, 0; // Clear teleport cookie of player on teleport use.
+ sc_start SC_SLOWMOVE, .fx_time+400, 100000; // Slow player temporarily to avoid DCs onwarp
misceffect .fx; // Default .fx set in teleport_add, other code can override it.
+ addtimer .fx_time, strnpcinfo(0)+"::OnTeleport"; // Defer warp to play FX
end;
L_CantPass:
message strcharinfo(0), .cantpass$; // NPC var allows to change message.
end; // "keyed" teleport and player didnt had proper cookie.
-// Teleportation timer event (attached to player). Queued by OnTouch.
+// Deferred teleportation timer event (attached to player). Queued by OnTouch.
OnTeleport:
warp .dstmap$, .dst_x, .dst_y;
- addtimer 3000, strnpcinfo(0)+"::OnWarpDone"; // Mostly to clean up SC icon
+ addtimer 6000, strnpcinfo(0)+"::OnTeleportDone"; // Mostly to clean up SC icon
end;
-// Mostly used to remove slow icon that sticks in some cases.
-OnWarpDone:
- sc_end SC_SLOWMOVE;
+// Invoked after teleportation complete.
+OnTeleportDone:
+ sc_start SC_SLOWMOVE, 1, 100000; // If client been slow to load map
+ sc_end SC_SLOWMOVE; // and missed sc_end, force toggle to remove icon
end;
// Invoked on timed teleport's NPC timer expired.
OnTeleportExpired:
set .inactive, 1; // Flag shutdown so OnTouch ignores incoming players.
- addnpctimer (.fx_time + 1000), strnpcinfo(0)+"::OnTeleportShutdown"; // Give time to in-flight players to teleport.
+ addnpctimer (.fx_time + 7000), strnpcinfo(0)+"::OnTeleportShutdown"; // Give time to in-flight players to teleport.
end;
// Does actual teleport shutdown.
@@ -174,39 +175,27 @@ OnInit:
// PUBLIC API. Creates requested teleport NPC. Arg 0..6 are like puppet().
// This function designed to run in ANY context, whether RID attached or not.
// It creates puppet + setups all relevant data in created NPC.
-// arg(0): Teleport's map.
-// arg(1): Teleport's X
-// arg(2): Teleport's Y
-// arg(3): Teleport's NPC label
-// arg(4): Teleport's NPC sprite ID
-// arg(5): Teleport's X size
-// arg(6): Teleport's Y size
-// arg(7): Destination map name.
-// arg(8): Destination X
-// arg(9): Destination Y
-// arg(10):Teleport lifetime ( > 0 or -1 = indefinite)
-// arg(11):Teleport magic cookie, 0 = everyone allowed, otherwise checks match.
-// arg(12):Whether teleport managed, 0 = unmanaged, != 0 means it is.
-// Return: On success: NPC ID of teleport created.
+// Inputs: see code below.
+// Return: On success: NPC ID of teleport created, > 0
// On failure: 0 if puppet failed, -1 if arg check failed.
function|script|teleport_create
{
- set .@map$, getarg(0, ""); // Get args (+failsafe defailts)
- set .@x, getarg(1, -10); // Get args (+failsafe defailts)
- set .@y, getarg(2, -10); // Get args (+failsafe defailts)
- set .@name$, getarg(3, ""); // Get args (+failsafe defailts)
- set .@sprite, getarg(4, -10); // Get args (+failsafe defailts)
- set .@xsz, getarg(5, -10); // Get args (+failsafe defailts)
- set .@ysz, getarg(6, -10); // Get args (+failsafe defailts)
- set .@dstmap$, getarg(7, -10); // Get args (+failsafe defailts)
- set .@dst_x, getarg(8, -10); // Get args (+failsafe defailts)
- set .@dst_y, getarg(9, -10); // Get args (+failsafe defailts)
- set .@lifetime, getarg(10, -10); // Get args (+failsafe defailts)
- set .@cookie, getarg(11, -10); // Get args (+failsafe defailts)
- set .@managed, getarg(12, -10); // Get args (+failsafe defailts)
+ set .@map$, getarg(0, ""); // Teleport's map.
+ set .@x, getarg(1, -10); // Teleport's X
+ set .@y, getarg(2, -10); // Teleport's Y
+ set .@name$, getarg(3, ""); // Teleport's NPC label
+ set .@sprite, getarg(4, -10); // Teleport's NPC sprite ID
+ set .@xsz, getarg(5, -10); // Teleport's X size
+ set .@ysz, getarg(6, -10); // Teleport's Y size
+ set .@dstmap$, getarg(7, -10); // Destination map name.
+ set .@dst_x, getarg(8, -10); // Destination X
+ set .@dst_y, getarg(9, -10); // Destination Y
+ set .@lifetime, getarg(10, -10); // Teleport lifetime (> 0 or -1 = forever)
+ set .@cookie, getarg(11, -10); // Magic cookie, 0 = everyone allowed, otherwise TP checks match.
+ set .@managed, getarg(12, -10); // Mmanaged? 0:unmanaged, >0: tracked by TP Manager
set .@res, -1; // Validate what caller gave
- if !(call("teleport_map_valid", .@map$ )) goto L_Fail; // Validate src map$
- if !(call("teleport_map_valid", .@dstmap$)) goto L_Fail; // Validate dst map$
+ if !(mapexists(.@map$)) goto L_Fail; // Validate src map$
+ if !(mapexists(.@dstmap$)) goto L_Fail; // Validate dst map$
if ((.@x < 0) || (.@y < 0)) goto L_Fail; // SRC X/Y cant be < 0
if ((.@dst_x < 0) || (.@dst_y < 0)) goto L_Fail; // DST X/Y cant be < 0
if ((.@xsz < 0) || (.@ysz < 0)) goto L_Fail; // NPC X/Y size cant be <= 0
@@ -404,7 +393,7 @@ function|script|teleportadd_parseargs
set @NPCSPRITE, @argv[5]; // Teleport's NPC sprite (optional)
// Check DST map is okay
if ((@DSTMAP$ == "help") || (@DSTMAP$ == "")) goto L_DisplayHelp; // @teleportadd help or @teleportadd
- if !(call("teleport_map_valid", @DSTMAP$)) goto L_FailBadmap; // DST: invalid map?
+ if !(mapexists(@DSTMAP$)) goto L_FailBadmap; // DST: invalid map?
// Check DST X,Y sane
if ((@DST_X <= 0) || (@DST_Y <= 0)) goto L_FailBadDstXY1; // DST: invalids coords <= 0?
if ((getmapmaxx(@DSTMAP$) < @DST_X) || (getmapmaxy(@DSTMAP$) < @DST_Y)) goto L_FailBadDstXY2; // Outside of map?
@@ -454,58 +443,6 @@ L_DisplayHelp:
return -7;
}
-// PUBLIC API: This function checks if map name known and OK to use.
-// This function designed to run in any context.
-// Inputs: arg$[0] is map name to check for sanity.
-// Return: 1 for known maps, 0 for unknown
-function|script|teleport_map_valid
-{
- set .@inputmap$, getarg(0, "");
- set .@i, 0;
- setarray .@maps1$, "001-1", "001-2", "001-3", "002-1", "002-2", "002-3",
- "002-4", "002-5", "003-1", "003-4", "004-1", "004-3",
- "004-4", "004-5", "005-3", "006-1", "006-2", "006-3",
- "007-1", "007-2", "008-1", "009-1", "009-2", "009-3",
- "009-4", "009-5", "009-6", "009-7", "009-8", "010-1",
- "010-2", "011-1", "011-3", "011-4", "011-6", "012-1",
- "012-3", "012-4", "013-1", "013-2", "013-3", "014-1",
- "014-3", "015-1", "015-3", "016-1", "016-2", "017-1",
- "017-2", "017-3", "017-4", "017-9", "018-1", "018-2",
- "018-3", "019-1", "019-3", "019-4", "020-1", "020-2",
- "020-3", "021-3", "023-1", "023-2", "023-3", "025-1",
- "025-3", "025-4", "026-1", "026-2", "027-1", "027-2",
- "027-3", "027-4", "027-5", "027-6", "027-7", "027-8",
- "028-1", "028-3", "029-1", "029-2", "029-3", "029-4",
- "030-1", "030-2", "030-3", "030-4", "031-1", "031-2",
- "031-3", "031-4", "032-3", "033-1", "034-1", "034-2",
- "035-2", "036-2", "041-1", "042-1", "043-1", "043-3",
- "043-4", "045-1", "046-1", "046-3", "047-1", "047-3";
-// Had to split to 2 arrays as its too big for array initializer
- setarray .@maps2$, "048-2", "051-1", "051-3", "052-1", "052-2", "055-1",
- "055-3", "056-2", "057-1", "058-1", "058-2", "069-2",
- "070-1", "070-3", "099-1", "099-2", "099-3", "099-4",
- "099-5", "099-6", "099-7", "099-8", "botcheck";
- set .@arr_sz1, getarraysize(.@maps1$[0]);
- set .@arr_sz2, getarraysize(.@maps2$[0]);
- freeloop 1; // Needed to iterate over array of about 150 maps
- goto L_NextMap; // Start iterating over array of maps.
-
-L_NextMap:
- if (.@inputmap$ == .@maps1$[.@i]) goto L_Found; // Found map in arr 1?
- if (.@inputmap$ == .@maps2$[.@i]) goto L_Found; // Found map in arr 2?
- set .@i, (.@i + 1); // increment .@maps$[] index
- if ((.@i >= .@arr_sz1) && (.@i >= .@arr_sz2)) goto L_NotFound; // Abort if whole arrays scanned
- goto L_NextMap; // Try next map in .@maps$[]
-
-L_NotFound:
- freeloop 0;
- return 0;
-
-L_Found:
- freeloop 0;
- return 1;
-}
-
// PRIVATE: This function displays usage help for TeleportManager - @teleportadd
// This function should be invoked by TeleportManager with RID attached.
// Inputs: nothing.
diff --git a/world/map/npc/functions/treasure_hunt.txt b/world/map/npc/functions/treasure_hunt.txt
new file mode 100644
index 00000000..0e97adce
--- /dev/null
+++ b/world/map/npc/functions/treasure_hunt.txt
@@ -0,0 +1,469 @@
+// Pirate Treasures Hunt quest (c) 2025 Hello=)
+
+// This NPC handles treasure placement
+-|script|TreasureHunt|32767
+{
+ end;
+
+OnTreasurePlace:
+ if (GM < 60) end;
+ gmlog strcharinfo(0) + " shuffled treasure placement";
+ wgm strcharinfo(0) + " shuffled treasure placement";
+ set $TREASURE_X, 0; // To force reinit
+ void call("treasure_place");
+ end;
+
+OnInit:
+ registercmd "@treasure_place", "TreasureHunt::OnTreasurePlace";
+ void call("treasure_place");
+ end;
+}
+
+// Applies defaults to global vars if unconfigured
+function|script|treasure_place
+{
+ if ($TREASURE_MAP$ == "") || !($TREASURE_X) || !($TREASURE_Y) // Not looks configured?
+ goto L_Setup;
+ return;
+
+L_Setup:
+ // Apply defaults
+ set $TREASURE_REWARD, Eyepatch; // main reward
+ set $TREASURE_BOOTY, 200; // max amount of booty (worst case anti-milking cap)
+ set $TREASURE_DIFFICULTY, 100; // common rounds difficulty
+ set $TREASURE_DIFFICULTY2, 100; // extra rounds difficulty (if player found treasure)
+ set $TREASURE_MAP$, "003-4"; // Map to use. Ships are hardwired so far, beware.
+ set $TREASURE_X1, 97; // Rectangle
+ set $TREASURE_X2, 104;
+ set $TREASURE_Y1, 61;
+ set $TREASURE_Y2, 100;
+ // $TREASURE_DEBUG // Debug mode, a lot of battle flow/trace spam.
+ // $TREASURE_TURBO // Play battle real fast. You'll need @hide and GM Hat to survive.
+ goto L_TryPlacement;
+
+L_TryPlacement:
+ // Try placement
+ set $TREASURE_X, rand($TREASURE_X1, $TREASURE_X2); // Choose exact spot
+ set $TREASURE_Y, rand($TREASURE_Y1, $TREASURE_Y2);
+ if (iscollision($TREASURE_MAP$, $TREASURE_X, $TREASURE_Y))
+ goto L_TryPlacement; // do not place trasure on collisions
+ debugmes "treasure_place: treasure placed and configured";
+ return;
+}
+
+// Handler to be invoked from item usage attempt of shovels.
+// This function supposed to be called with player RID attached (its item use by player)
+// Input: Arg0: shovel name from item use handler function.
+// Return: 1 = item use handled (swallowed) by quest, 0 = not handled.
+function|script|treasure_try_shovel
+{
+ set .@shovel$, getarg(0, "");
+ set .@handled, 0;
+ if ($TREASURE_DEBUG) debugmes "treasure_try_shovel, shovel=" + .@shovel$;
+ if (.@shovel$ == "LegendaryShovel") set .@handled, 1; // TH handles everything about Legendary Shovel
+ if (!(.@handled) && (getmap() == $TREASURE_MAP$)) // Hint player they need different shovel on treasure map
+ message strcharinfo(0), "There're rocks in these sands. You'll need different shovel here...";
+ if ($TREASURE_DEBUG) debugmes "treasure_try_shovel, .@handled=" + .@handled;
+ if (.@handled) addtimer 0, "TreasureDig::OnDig", BL_ID; // Request NPC to do its thing just like #treasuredig.
+ return .@handled;
+}
+
+// Handler to be invoked from item usage attempt of maps.
+// This function supposed to be called with player RID attached (its item use by player)
+// Input: Arg0: map name from item use handler function.
+// Return: 1 = item use handled (swallowed) by quest, 0 = not handled.
+function|script|treasure_try_map
+{
+ set .@mapname$, getarg(0, "");
+ if ($TREASURE_DEBUG) debugmes "treasure_try_map, map=" + .@mapname$;
+ set .@handled, 0;
+ if (.@mapname$ == "LegendaryTreasureMap") set .@handled, 1; // TH handles everything about Legendary Treasure Map
+ if ($TREASURE_DEBUG) debugmes "treasure_try_map, .@handled=" + .@handled;
+ if ((getmap() != $TREASURE_MAP$) && (.@handled))
+ message strcharinfo(0), "Treasure Map : This place doesn't looks like one on map.";
+ if ((getmap() == $TREASURE_MAP$) && (.@handled) &&
+ !(isin($TREASURE_MAP$, $TREASURE_X1, $TREASURE_Y1, $TREASURE_X2, $TREASURE_Y2)))
+ message strcharinfo(0), "Treasure Map : This place looks right! Yet [X] mark isn't where you stand.";
+ if ((getmap() == $TREASURE_MAP$) && (.@handled) &&
+ (isin($TREASURE_MAP$, $TREASURE_X1, $TREASURE_Y1, $TREASURE_X2, $TREASURE_Y2)))
+ message strcharinfo(0), "Treasure Map : Aha! Right spot! Unfortunately X mark is big and crude. Promising area is " +
+ "(" + $TREASURE_X1 +"," + $TREASURE_Y1 + ")<->(" + $TREASURE_X2 + "," + $TREASURE_Y2 + ")";
+ return .@handled;
+}
+
+// This NPC handles traeasure dig.
+-|script|TreasureDig|32767
+{
+ end;
+
+OnDig:
+ if ($TREASURE_DISABLE) message strcharinfo(0), "Tough luck, seems there's no booty at this time!";
+ if ($TREASURE_DISABLE) end;
+ set @treasureMobs,
+ mobcount($TREASURE_MAP$, "TreasureDigAux::OnMobKill") +
+ mobcount($TREASURE_MAP$, "TreasureDigAux::OnPirateKill");
+ if ($TREASURE_DEBUG) debugmes "OnDig: mob count = " + @treasureMobs;
+ if (@treasureMobs > 300) message strcharinfo(0), "Its too crowded here to dig! Perhaps kill some mob first?";
+ if (@treasureMobs > 300) end; // Do not let users spam server by mobs indefinitely
+ set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID;
+ set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127);
+ if (.@puppet < 1) end; // It also denies player launching N instances at once.
+ // Set up instance of treasure hunt attempt
+ set .digger, BL_ID, .@puppet;
+ set .diggernm$, strcharinfo(0), .@puppet;
+ set .delay, 1000, .@puppet; // Initial round delay
+ set .tiles, TILES_WALKED, .@puppet;
+ if ($TREASURE_DEBUG) debugmes "OnDig: starting";
+ npctalk .@puppet$, "Digging : " + strcharinfo(0) + " starts digging in hope to find something..";
+ if ($TREASURE_MAP$ == getmap())
+ addnpctimer 4000, .@puppet$+"::OnDiggingRound"; // Start digging rounds.
+ else
+ addnpctimer 12000, .@puppet$+"::OnDiggingRound"; // Start digging rounds - fake - slow 'em a bit.
+ addnpctimer 700000, .@puppet$+"::OnDestroy"; // Failsafe quest shutdown on timeout
+ end;
+
+OnDiggingRound:
+ set .dig_round, .dig_round + 1;
+ if ($TREASURE_DEBUG) debugmes "OnDiggingRound: my name=" + strnpcinfo(0) + " digger=" + .digger;
+ if ($TREASURE_DEBUG) debugmes "OnDiggingRound: PLAYER: POSX=" + get(POS_X, .digger) + " POSY=" + get(POS_Y, .digger) + " MAP=" + getmap(.digger) + " TILES=" + get(TILES_WALKED, .digger);
+ if ($TREASURE_DEBUG) debugmes "OnDiggingRound: NPC: POSX=" + getnpcx() + " POSY=" + getnpcy() + " MAP=" + strnpcinfo(3) + " TILES=" + .tiles;
+ if (!(isloggedin(.digger))) set .failed, 2; // Treasure digger disappeared?
+ if (get(Hp, .digger) < 1) set .failed, 3; // Digger digger died?
+ if ((getmap(.digger) != strnpcinfo(3)) || // Digger left map?
+ (get(POS_X, .digger) != getnpcx()) ||
+ (get(POS_Y, .digger) != getnpcy()) ||
+ (get(TILES_WALKED, .digger) != .tiles))
+ set .failed, 4; // Has digger moved?
+ if ($TREASURE_MAP$ != strnpcinfo(3)) set .failed, 9; // Trying to dig on wrong map? Side effects avoidance.
+ if ($TREASURE_DEBUG) debugmes "OnDiggingRound: failed1=" + .failed;
+ if (.failed) goto L_DiggFail;
+ // Basic checks ok -> next round starts
+ misceffect FX_CHANNELLING_RAISE_RED, strcharinfo(0, .digger);
+ set .failed, call("treasure_dig_round", .dig_round); // core function of digging
+ if ($TREASURE_DEBUG) debugmes "OnDiggingRound: failed2=" + .failed;
+ if !($TREASURE_TURBO) set .delay, .delay + 1000; // Turbo == "skip AI moves" for test/debug: FAST battle, @hide+gm map to observe
+ if ((.failed == 9) && call("treasure_is_here") && ($TREASURE_REWARD != 0))
+ goto L_DiggFound; // MaxRound && Found treasure?! Its WIN, not .fail :)
+ if ((.failed == 9) && call("treasure_is_here") && ($TREASURE_REWARD == 0))
+ set .failed, 10; // Found it - but someone got there first? How unfortunate.
+ if (.failed) goto L_DiggFail; // catches e.g. (running to max round && no treasure)
+ else addnpctimer .delay, strnpcinfo(0)+"::OnDiggingRound";
+ end;
+
+// Invoked when digging failed for any reason, by both OnDiggingRound and OnBootyRound.
+L_DiggFail:
+ if ($TREASURE_DEBUG) debugmes "TreasureDig: digging done, .failed=" + .failed;
+ if (.failed == 2) npctalk strnpcinfo(0), "Digging : ##3##BDigger " + .diggernm$ + " disappeared... strange...";
+ elif (.failed == 3) npctalk strnpcinfo(0), "Digging : ##3##BDigger " + .diggernm$ + " haven't made it, digging site collapsed";
+ elif (.failed == 4) npctalk strnpcinfo(0), "Digging : ##3##BDigger " + .diggernm$ + " has lost focus and digging site collapsed";
+ elif (.failed == 9) npctalk strnpcinfo(0), "Digging : ##3##BDoh! Seems there's no treasure on this spot!";
+ elif (.failed == 10) npctalk strnpcinfo(0), "Digging : ##3##BDoh! Someone already digged treasure out!";
+ else /*error, etc*/ npctalk strnpcinfo(0), "Digging : ##3##BDigger " + .diggernm$ + " something went wrong, digging site collapsed";
+ destroy;
+
+L_DiggFound:
+ if !($TREASURE_TURBO) set .delay, 16000; // Configure booty rounds
+ else set .delay, 3000;
+ set .failed, 0;
+ set .round, 1;
+ monster $TREASURE_MAP$, 94, 74, "Pirates!", MontBlanc, 1, "TreasureDigAux::OnPirateKill"; // FIXME hardwired thing
+ monster $TREASURE_MAP$, 95, 66, "Pirates!", MontBlanc, 1, "TreasureDigAux::OnPirateKill";
+ monster $TREASURE_MAP$, 97, 91, "Pirates!", MontBlanc, 1, "TreasureDigAux::OnPirateKill";
+ mapannounce strnpcinfo(3), "Emo : WHAT DO WE HAVE HERE?! Contenders for OUR booty?! Pirates! Kill them all! YARRR!!", 0;
+ addnpctimer .delay, strnpcinfo(0)+"::OnBootyRound"; // Hand over -> OnBootyRound but do not destroy puppet.
+ end;
+
+// Invoked when digger survived initial digging && found treasure. Called when OnDiggRound rounds end.
+OnBootyRound:
+ if ($TREASURE_DEBUG) debugmes "OnBootyRound ->";
+ if (!(isloggedin(.digger))) set .failed, 2; // Treasure digger disappeared?
+ if (get(Hp, .digger) < 1) set .failed, 3; // Digger digger died?
+ if ((getmap(.digger) != strnpcinfo(3)) || // Digger left map?
+ (get(POS_X, .digger) != getnpcx()) ||
+ (get(POS_Y, .digger) != getnpcy()) ||
+ (get(TILES_WALKED, .digger) != .tiles))
+ set .failed, 4; // Has digger moved?
+ if (.failed) goto L_DiggFail; // Reuse digg failure handling above.
+ if (.round > 8) goto L_Finalize;
+ npctalk strnpcinfo(0), "Digging : ##3##B [TREASURE] [" + .round + "] "+ .diggernm$ + " found treasure, keep digger alive to collect collateral!";
+ if ($TREASURE_BOOTY > 0)
+ addtimer 0, "TreasureDigAux::OnCollateral10", .digger; // Collateral for supporters
+ set $TREASURE_BOOTY, $TREASURE_BOOTY - 10; // anti-milking cap, total ~20 rounds with booty top (configurable)
+ set .@round_power, call("treasure_estimate_team"); // get team level
+ if ($TREASURE_DEBUG) debugmes "treasure_dig_round: round power B0=" + .@round_power;
+ set .@round_power, (.@round_power * $TREASURE_DIFFICULTY2) / 170 + (.round / 7) + rand(3); // Adjust & randomize
+ if ($TREASURE_DEBUG) debugmes "treasure_dig_round: round power B1=" + .@round_power;
+ if (.round == 1) set .@mob, Emo; // Guy who yelled
+ else set .@mob, Ratto; // His ship ratto, also treasure contender
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 2, .@mob, 1, "TreasureDigAux::OnPirateKill");
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 4, Swashbuckler, .@round_power, "TreasureDigAux::OnPirateKill");
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 4, Grenadier, .@round_power, "TreasureDigAux::OnPirateKill");
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 4, Thug, .@round_power, "TreasureDigAux::OnPirateKill");
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 4, Ratto, 5, "TreasureDigAux::OnPirateKill");
+ set .round, .round + 1;
+ addnpctimer .delay, strnpcinfo(0)+"::OnBootyRound"; // Hand over -> OnBootyRound but do not destroy puppet.
+ end;
+
+L_Finalize:
+ addtimer 0, "TreasureDigAux::OnMainBooty", .digger; // Hand over to final reward handler.
+ mapannounce strnpcinfo(3), "Treasure : Digger " + .diggernm$ + " found treasure!", 0;
+ npctalk strnpcinfo(0), "Digging : ##3##B [TREASURE] Victory! Treasure hunter " + .diggernm$ + " got booty!";
+ destroy;
+
+OnDestroy:
+ debugmes "TreasureDig: GLOBAL TIME OUT, this shouldn't happen"; // Failsafe logic
+ npctalk strnpcinfo(0), "Digging : ##3##BSomething went wrong, your digging site has collapsed";
+ destroy;
+
+OnInit:
+ end;
+}
+
+// This function only meant to be called by TreasureDig's puppet.
+// Main digging round handling logic happens here, spawns + dig fallouts
+// Input: Arg0: round #
+// Arg1: players str
+// Returns: 0 if all ok, 1 = failure, 9 = max round reached.
+function|script|treasure_dig_round
+{
+ set .@round, getarg(0, -1);
+ set .@res, 0; // > 0 halts next rounds, 1 = failure, 9 = "failed to find treasure"
+ set .@rounds0, 2; // # of rounds configuration.
+ set .@rounds1, 6;
+ set .@rounds2, 12;
+ set .@rounds3, 18;
+ set .@rounds4, 22;
+ if ($TREASURE_DEBUG) debugmes "treasure_digg_round: round # " +.@round + " r4=" + .@rounds4;
+ if (.@round < 1) goto L_Failed;
+ if ((.@round >= .@rounds4)) goto L_Done;
+ setarray .@mobs_0[0], CaveMaggot, HouseMaggot, VoidMaggot, Ratto; // Mobs for round spawns
+ setarray .@mobs_1[0], AngryScorpion, Hyvern, Snake, Spider, Archant, RedSlime, AngrySeaSlime, AngryGreenSlime;
+ setarray .@mobs_2[0], VoidSnake, MountainSnake, GrassSnake, SoulSnake, BlackScorpion, CrotcherScorpion, VoidBat, HuntsmanSpider;
+ setarray .@mobs_3[0], Skeleton, LadySkeleton, Wight, RedBone, SoulEater;
+ setarray .@mobs_4[0], Thug, Swashbuckler, Grenadier;
+ if (.@round <= .@rounds0) set .@mobID, .@mobs_0[rand(getarraysize(.@mobs_0))]; // Pick random mob for i-th round
+ elif (.@round <= .@rounds1) set .@mobID, .@mobs_1[rand(getarraysize(.@mobs_1))]; // Make mobs progressiveky harder
+ elif (.@round <= .@rounds2) set .@mobID, .@mobs_2[rand(getarraysize(.@mobs_2))];
+ elif (.@round <= .@rounds3) set .@mobID, .@mobs_3[rand(getarraysize(.@mobs_3))];
+ elif (.@round <= .@rounds4) set .@mobID, .@mobs_4[rand(getarraysize(.@mobs_4))];
+ else set .@mobID, MobMoubootaur; // Failsafe :)
+ set .@rand, rand(1, 100); // Does digging site blows up, releases poison or stays stable?
+ if (.@rand < 22) set .@dig_action$, "treasure_dig_poison";
+ elif (.@rand > 78) set .@dig_action$, "treasure_dig_blowup";
+ else /* 30..70 */ set .@dig_action$, "treasure_dig_stable";
+ if ($TREASURE_DEBUG) debugmes "treasure_digg_round: round # " + .dig_round + " .@rand=" + .@rand + " .@dig_action$=" + .@dig_action$;
+ void call(.@dig_action$, .dig_round); // Avoids goto spaghetti but chosen func MUST exist, or server WILL crash!
+ set .@round_power, call("treasure_estimate_team"); // get team level
+ if ($TREASURE_DEBUG) debugmes "treasure_dig_round: round power0=" + .@round_power;
+ set .@round_power, (.@round_power * $TREASURE_DIFFICULTY) / 130 + (.@round / 7) + rand(3); // Adjust & randomize
+ if ($TREASURE_DEBUG) debugmes "treasure_dig_round: round power1=" + .@round_power;
+ addtimer 0, "TreasureDigAux::OnCollateral1", .digger;
+ void call("spawn_in_radius", strnpcinfo(3), getnpcx(), getnpcy(), 4, .@mobID, .@round_power, "TreasureDigAux::OnMobKill");
+ // Show some fancy messages
+ if (.@round <= .@rounds2) npctalk strnpcinfo(0), "Digging : [" +.@round + "] " + .diggernm$ + " hit monster nest!";
+ elif (.@round <= .@rounds3) npctalk strnpcinfo(0), "Digging : [" +.@round + "] " + .diggernm$ + " Yuck! Skeleton I found moves!";
+ elif (.@round <= .@rounds4) npctalk strnpcinfo(0), "Digging : [" +.@round + "] " + .diggernm$ + " pirates got curious what this noise all about";
+ else npctalk strnpcinfo(0), "Digging : [" +.@round + "] " + .diggernm$ + " ?!?!?!";
+ return 0;
+
+L_Done:
+ if ($TREASURE_DEBUG) debugmes "treasure_digg_round: rounds done";
+ return 9; // Inform quest max rounds reached and no treasure been found.
+
+L_Failed:
+ debugmes "treasure_digg_round: call failed, arg0=" + getarg(0) + "arg1=" + getarg(1);
+ return 1;
+}
+
+// This spawns mobs in a given radius. Fallbacks to spot it it not fits map.
+// This function can be called in any context.
+// Input: Arg0: map where to spawn
+// Arg1: X
+// Arg2: Y
+// Arg3: Radius
+// Arg4: Mob id
+// Arg5: # of mobs
+// Arg6: Event for mob death (must be given, even as "")
+function|script|spawn_in_radius
+{
+ set .@map$, getarg(0, "");
+ set .@x, getarg(1, -1);
+ set .@y, getarg(2, -1);
+ set .@r, getarg(3, -1);
+ set .@mob, getarg(4, -1);
+ set .@qty, getarg(5, -1);
+ set .@evt$, getarg(6, "");
+ // Args check.
+ if ((.@map$ == "") || (.@evt$ == "6") || (.@mob < 1) ||
+ (.@x < 1) || (.@x > getmapmaxx(.@map$)) || (.@r < 1) || (.@qty < 1) ||
+ (.@y < 1) || (.@y > getmapmaxy(.@map$)))
+ goto L_Fail;
+ // Does (x-r, y-r, x+r, y+r) rectangle fits map?
+ if ((.@x > .@r) && (.@y > .@r) &&
+ ((.@x + .@r) < getmapmaxx(.@map$)) &&
+ ((.@y + .@r) < getmapmaxy(.@map$))) //Enough room? Use area.
+ areamonster .@map$, (.@x-.@r), (.@y-.@r), (.@x+.@r), .@y+.@r, "", .@mob, .@qty, .@evt$;
+ else // Rectangle does not fits, fallback
+ monster .@map$, .@x, .@y, "", .@mob, .@qty, .evt$;
+ return;
+
+L_Fail:
+ debugmes "spawn_in_radius: call failed, arg0=" + getarg(0) + " arg1=" + getarg(1) +
+ " arg2=" + getarg(2) + " arg3=" + getarg(3) + " arg4=" + getarg(4) +
+ " arg5=" + getarg(5)+ " arg6=" + getarg(6);
+ return;
+}
+
+// This function meant to be run in context of TreasureDig's *puppet* only
+function|script|treasure_dig_poison
+{
+ if ($TREASURE_DEBUG) debugmes "TreasureDigg: dig_poison";
+ npctalk strnpcinfo(0), "Digging : ["+getarg(0)+"] attempt to dig released poisonous gas!"; // Next throws events in digger (player) context
+ foreach 0, strnpcinfo(3), (getnpcx() - 7), (getnpcy() - 7), (getnpcx() + 7), (getnpcy() + 7), "TreasureDigAux::OnPoisonousGasPlayer", .digger;
+ foreach 2, strnpcinfo(3), (getnpcx() - 4), (getnpcy() - 4), (getnpcx() + 4), (getnpcy() + 4), "TreasureDigAux::OnPoisonousGasMob", .digger;
+ return;
+}
+
+// This function meant to be run in context of TreasureDig's *puppet* only
+function|script|treasure_dig_blowup
+{
+ if ($TREASURE_DEBUG) debugmes "TreasureDigg: dig_blowup";
+ npctalk strnpcinfo(0), "Digging : ["+getarg(0)+"] underground gas bubble blows up!"; // Next throws events in digger (player) context
+ foreach 0, strnpcinfo(3), (getnpcx() - 7), (getnpcy() - 7), (getnpcx() + 7), (getnpcy() + 7), "TreasureDigAux::OnBlowUpPlayer", .digger;
+ foreach 2, strnpcinfo(3), (getnpcx() - 4), (getnpcy() - 4), (getnpcx() + 4), (getnpcy() + 4), "TreasureDigAux::OnBlowUpMob", .digger;
+ return;
+}
+
+// This function meant to be run in context of TreasureDig's *puppet* only
+function|script|treasure_dig_stable
+{
+ if ($TREASURE_DEBUG) debugmes "TreasureDigg: dig_stable";
+ return;
+}
+
+// This function meant to be run in context of TreasureDig's *puppet* only
+function|script|treasure_is_here
+{
+ if ($TREASURE_DEBUG) debugmes "treasure_is_here ->";
+ set .@res, 0;
+ if (($TREASURE_MAP$ == strnpcinfo(3)) &&
+ ($TREASURE_X == getnpcx()) &&
+ ($TREASURE_Y == getnpcy()))
+ set .@res, 1;
+ if ($TREASURE_DEBUG) debugmes "treasure_is_here <- .@res=" + .@res;
+ return .@res;
+}
+
+// This function meant to be run in context of TreasureDig's *puppet* only
+function|script|treasure_estimate_team
+{
+ if ($TREASURE_DEBUG) debugmes "treasure_estimate_team: ->";
+ set @treasure_estimate_team, 1, .digger; // Prepare digger's context
+ if ($TREASURE_DEBUG) debugmes "team_est0 = " + get(@treasure_estimate_team, .digger); // This throws events in digger's context
+ foreach 0, strnpcinfo(3), (getnpcx() - 7), (getnpcy() - 7), (getnpcx() + 7), (getnpcy() + 7), "TreasureDigAux::OnPlayerEstimate", .digger;
+ if ($TREASURE_DEBUG) debugmes "team_est1 = " + get(@treasure_estimate_team, .digger); // This throws events in digger's context
+ return get(@treasure_estimate_team, .digger);
+}
+
+// This NPC handles aux things like poisoning, blow up, statuses cleanup, items placement, ...
+-|script|TreasureDigAux|32767
+{
+ end;
+
+// This cleans players statues like leftovers of poison or blowup stunning.
+// Invoked by timer set by site blowup/poison gas handlers
+OnPlayerStatusCleanup:
+ if ($TREASURE_DEBUG) debugmes "TreasureDigAux: status cleanup, BL ID=" + BL_ID;
+ if (sc_check(SC_POISON)) sc_end SC_POISON;
+ if (sc_check(SC_SLOWMOVE)) sc_end SC_SLOWMOVE;
+ if (sc_check(SC_HALT_REGENERATE)) sc_end SC_HALT_REGENERATE;
+ end;
+
+// Dig site poisonous gas - invoked per player (hurts players)
+OnPoisonousGasPlayer:
+// debugmes "TreasureDigAux: poison/player, target ID=" + @target_id;
+ misceffect FX_EMOTE_DISGUST, strcharinfo(0, @target_id);
+ sc_start SC_POISON, 1, 60, @target_id; // Poison player
+ sc_start SC_HALT_REGENERATE, 5000, 0; // Even if fails, at least halt regen.
+ addtimer 5000, "TreasureDigAux::OnPlayerStatusCleanup"; // clean PC statuses
+ end;
+
+// Dig site poisonous gas - invoked per mob (aggravates mobs)
+OnPoisonousGasMob:
+// debugmes "TreasureDigAux: poison/mob, target ID=" + @target_id;
+ set .@type, get(Class, @target_id); // Dont poison undead
+ if ((.@type != Skeleton) && (.@type != LadySkeleton) && (.@type != Wight) &&
+ (.@type != RedBone) && (.@type != SoulEater))
+ sc_start SC_POISON, 1, 10, @target_id; // Poison MOBS, too.
+ aggravate @target_id; // This aggravates mobs.
+ end;
+
+// Dig site blow up - invoked per player (hurts players)
+OnBlowUpPlayer:
+// debugmes "TreasureDigAux: blowup/player, target ID=" + @target_id;
+ misceffect FX_MEDIUM_SMOKE, strcharinfo(0, @target_id); // Show slow effect
+ sc_start SC_SLOWMOVE, 3000, 300, @target_id; // Slow player temporarily
+ sc_start SC_HALT_REGENERATE, 5000, 0; // Stop regen temporarily
+ set Hp, (get(Hp, @target_id) * 2 / 3), @target_id; // Yes explosion hurts.
+ addtimer 5000, "TreasureDigAux::OnPlayerStatusCleanup"; // clean statuses
+ end;
+
+// Dig site blow up - invoked per mob (aggravates mobs)
+OnBlowUpMob:
+// debugmes "TreasureDigAux: blowup/mob, target ID=" + @target_id;
+ injure BL_ID, @target_id, get(Hp, @target_id) / 3; // Yes, explosion can hurt mobs, too!
+ aggravate @target_id; // This aggravates them!
+ end;
+
+// Event thrown when quest mobs die.
+OnMobKill:
+ if ($TREASURE_DEBUG) debugmes "TreasureDigAux: mob killed, @mobID=" + @mobID;
+ end;
+
+OnPirateKill:
+ if ($TREASURE_DEBUG) debugmes "TreasureDigAux: pirate killed, @mobID=" + @mobID;
+ end;
+
+// Event invoked by team estimation function.
+OnPlayerEstimate:
+ if (get(Hp, @target_id) > 0) set @treasure_estimate_team, @treasure_estimate_team + (get(BaseLevel, @target_id) / 10);
+ if ($TREASURE_DEBUG) debugmes "TreasureDigAux: player_estimate: @treasure_estimate_team=" + @treasure_estimate_team;
+ end;
+
+// Emit few collateral items spawner
+OnCollateral1:
+ if ($TREASURE_DEBUG) debugmes "OnCollateral1";
+ setarray .@items1[0], SulphurPowder, IronPowder, BlackScorpionStinger, TreasureKey, Bone, Skull;
+ set .@itemID, .@items1[rand(getarraysize(.@items1))]; // random collateral
+ if ($TREASURE_DEBUG) debugmes "OnCollateral1 .@itemID=" + .@itemID;
+ makeitem .@itemID, 1, getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2);
+ end;
+
+// Emit plenty of collateral items spawner (treasure reward mode)
+OnCollateral10:
+ if ($TREASURE_DEBUG) debugmes "OnCollateral10";
+ setarray .@items10[0], Pearl, Sapphire, Amethyst, GoldenTooth, GoldOre, CoinBag;
+ set .@count, 0;
+ goto L_RandomItems;
+
+L_RandomItems:
+ set .@itemID, .@items10[rand(getarraysize(.@items10))]; // random collateral
+ makeitem .@itemID, 4+rand(16), getmap(), rand(POS_X-3,POS_X+3), rand(POS_Y-3,POS_Y+3);
+ set .@count, .@count + 1;
+ if (.@count < 25) goto L_RandomItems;
+ end;
+
+// Hand over rewards + extra "collateral"
+// This handler invoked on digger who initiated digging session and won.
+OnMainBooty:
+ addtimer 0, "TreasureDigAux::OnCollateral10";
+ gmlog strcharinfo(0) + " found treasure!";
+ wgm strcharinfo(0) + " found treasure!";
+ getitem $TREASURE_REWARD, 1;
+ message strcharinfo(0), "Treasure Hunt : Success! You found [" + getitemlink($TREASURE_REWARD) + "]";
+ set $TREASURE_REWARD, 0; // Deny re-runs, treasure acquired
+ end;
+
+OnInit:
+ end;
+}
diff --git a/world/map/npc/guild/_import.txt b/world/map/npc/guild/_import.txt
new file mode 100644
index 00000000..80ea053b
--- /dev/null
+++ b/world/map/npc/guild/_import.txt
@@ -0,0 +1,6 @@
+// Map guild: Guild Bot Area
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: guild
+npc: npc/guild/_mobs.txt
+npc: npc/guild/_nodes.txt
+npc: npc/guild/_warps.txt
diff --git a/world/map/npc/guild/_mobs.txt b/world/map/npc/guild/_mobs.txt
new file mode 100644
index 00000000..5faafe87
--- /dev/null
+++ b/world/map/npc/guild/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Guild Bot Area mobs
+
diff --git a/world/map/npc/guild/_nodes.txt b/world/map/npc/guild/_nodes.txt
new file mode 100644
index 00000000..629ccce8
--- /dev/null
+++ b/world/map/npc/guild/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Guild Bot Area nodes
+
+// (no nodes)
diff --git a/world/map/npc/guild/_warps.txt b/world/map/npc/guild/_warps.txt
new file mode 100644
index 00000000..748604a3
--- /dev/null
+++ b/world/map/npc/guild/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Guild Bot Area warps
+
diff --git a/world/map/npc/items/maps.txt b/world/map/npc/items/maps.txt
index 29d54e7d..c7f33d83 100644
--- a/world/map/npc/items/maps.txt
+++ b/world/map/npc/items/maps.txt
@@ -1,5 +1,6 @@
function|script|readMap
-{
+{ // call Treasure Hunt quest. If quest handled use, skip message. See "treasure_hunt.txt"
+ if (call("treasure_try_map", @MapName$)) goto L_Return;
message strcharinfo(0), "You have no clue how to use this item yet.";
goto L_Return;
diff --git a/world/map/npc/items/shovel.txt b/world/map/npc/items/shovel.txt
index 8dcbd175..7023f2ec 100644
--- a/world/map/npc/items/shovel.txt
+++ b/world/map/npc/items/shovel.txt
@@ -1,5 +1,7 @@
function|script|useShovel
-{
+{ // call Treasure Hunt quest. If quest handled use, skip message. See "treasure_hunt.txt"
+ if (call("treasure_try_shovel", @ShovelName$)) goto L_Return;
+ // More quests can be plugged in here.
message strcharinfo(0), "You have no clue how to use this item yet.";
goto L_Return;
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index 517373e2..b3f8b8c4 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -339,6 +339,7 @@ L_LvCkFail:
// This function used to lock out spell.
// Input: arg0 - length of cooldown.
// Input: arg1 - optional: custom SC_COOLDOWN ID to use.
+// Return: nothing, but configures spell lockout mechanics going.
function|script|magic_block
{
if (getarg(0) <= 0) goto L_Block_Fail;
@@ -356,3 +357,55 @@ L_Block_Fail:
debugmes "bug: magic_block needs arg(0) > 0";
return; // Called wrong way -> spell bug.
}
+
+// magic_summon_all function can be called in any context with or without player
+// This function SUMMONS one or more requested creature around given spot
+// Its effectively wrapper to summon builtin to summon >= 1 beings, in area
+// Inputs: see code below.
+// Return: GID of last summoned mob, 0 on failure.
+// TODO: "real" return of GID (after TMWA call actually patched).
+function|script|magic_summon_all
+{
+ set .@map$, getarg(0, ""); // Map where to summon.
+ set .@x, getarg(1, -1); // X where to summon.
+ set .@y, getarg(2, -1); // Y where to summon
+ set .@r, getarg(3, -1); // Mob spread radius (X-R),(Y-R) <-> (X+R),(Y+R)
+ set .@qty, getarg(4, -1); // # of mobs to summon
+ set .@owner, getarg(5, -1); // owner of mob to set
+ set .@name$, getarg(6, ""); // mob display name
+ set .@mobID, getarg(7, -1); // ID of mob to summon
+ set .@mobAI, getarg(8, -1); // AI (mode) of mob to use
+ set .@lifetime, getarg(9, -1); // Mob's lifetime.
+ set .@event$, getarg(10, ""); // Custom event on mob death (use "" if not needed)
+
+ if ((.@map$ == "") || (.@r < 0) || // FIXME: better map validity check?
+ (.@x <= .@r) || (.@y <= .@r) || // No spawns outside of map
+ (.@x > (getmapmaxx(.@map$) + .@r)) || // No spawns outside of map
+ (.@y > (getmapmaxy(.@map$) + .@r)) || // No spawns outside of map
+ (.@qty < 1) || (.@owner < 1) || (.@lifetime < 0) ||
+ (.@event$ == "10")) // no event been given, not even ""
+ goto L_Fail;
+ goto L_Summon;
+
+L_Summon:
+ set .@qty, .@qty - 1;
+ set .@realx, rand(.@x-.@r, .@x+.@r); // Pick spot around (x,y)
+ set .@realy, rand(.@y-.@r, .@y+.@r);
+ if !(iscollision(.@map$, .@realx, .@realy)) goto L_SummonHere; // Spot ok?
+ set .@realx, .@x; // Fallback to (x, y) on collision (typically player x,y)
+ set .@realy, .@y;
+ goto L_SummonHere;
+
+L_SummonHere:
+ set .@mobGID, 1; // TODO: now its just placeholder for future summon() call prototype change
+ summon .@map$, .@realx, .@realy, .@owner, .@name$, .@mobID, .@mobAI, .@lifetime, .@event$;
+ if (.@qty > 0) goto L_Summon;
+ return .@mobGID;
+
+L_Fail:
+ debugmes "magic_summon_all: call failed, .@map$="+.@map$+" .@x="+.@x+" .@y="+.@y+
+ " .@r="+.@r+" .@qty="+.@qty+" .@owner="+.@owner+" .@name$="+.@name$+
+ " .@mobID="+.@mobID+" .@mobAI="+.@mobAI+" .@lifetime="+.@lifetime+
+ " .@event$="+.@event$+"getarg(10)=" + getarg(10);
+ return 0;
+}
diff --git a/world/map/npc/magic/event-boss-powerup-flee.txt b/world/map/npc/magic/event-boss-powerup-flee.txt
index ee0e68a3..8faf9251 100644
--- a/world/map/npc/magic/event-boss-powerup-flee.txt
+++ b/world/map/npc/magic/event-boss-powerup-flee.txt
@@ -16,11 +16,11 @@ OnCast:
end;
L_EscPlanFail1:
- message strcharinfo(0), "[#bossflee] : Escape plan status: fail! (bad destination?)";
+ message strcharinfo(0), "[bossflee] : Escape plan status: fail! (bad destination?)";
end;
L_EscPlanFail2:
- message strcharinfo(0), "[#bossflee] : Escape plan status: fail! (teleport creation failed)";
+ message strcharinfo(0), "[bossflee] : Escape plan status: fail! (teleport creation failed)";
end;
// Puppet (teleportation pads) logic below.
@@ -64,7 +64,7 @@ function|script|bossflee_parseargs
set @DST_X, @argv[1]; // Dst warp coordinates
set @DST_Y, @argv[2]; // Dst warp coordinates
// Check DST map is okay
- if !(call("teleport_map_valid", @DSTMAP$)) goto L_FailBadmap; // DST: invalid map?
+ if !(mapexists(@DSTMAP$)) goto L_FailBadmap; // DST: invalid map?
// Check DST X,Y sane
if ((@DST_X <= 0) || (@DST_Y <= 0)) goto L_FailBadDstXY1; // DST: invalids coords <= 0?
if ((getmapmaxx(@DSTMAP$) < @DST_X) || (getmapmaxy(@DSTMAP$) < @DST_Y)) goto L_FailBadDstXY2; // Outside of map?
@@ -77,18 +77,18 @@ function|script|bossflee_parseargs
return 0; // Everything OK
L_FailBadmap:
- message strcharinfo(0), "[#bossflee] : unknown flee map:" + @DSTMAP$;
+ message strcharinfo(0), "[bossflee] : unknown flee map:" + @DSTMAP$;
return 1;
L_FailBadDstXY1:
- message strcharinfo(0), "[#bossflee] : flee map X,Y must be > 0! Given X=" + @DST_X + " Y=" + @DST_Y;
+ message strcharinfo(0), "[bossflee] : flee map X,Y must be > 0! Given X=" + @DST_X + " Y=" + @DST_Y;
return 2;
L_FailBadDstXY2:
- message strcharinfo(0), "[#bossflee] : flee map X,Y outside of map! Given X=" + @DST_X+ " Y=" + @DST_Y;
+ message strcharinfo(0), "[bossflee] : flee map X,Y outside of map! Given X=" + @DST_X+ " Y=" + @DST_Y;
return 3;
L_FailDstCollide:
- message strcharinfo(0), "[#bossflee] : flee MAP=" + @DSTMAP$ + " X=" + @DST_X + " Y=" + @DST_Y + " is a collision (impassable)";
+ message strcharinfo(0), "[bossflee] : flee MAP=" + @DSTMAP$ + " X=" + @DST_X + " Y=" + @DST_Y + " is a collision (impassable)";
return 4;
}
diff --git a/world/map/npc/magic/event-summon-coalgolem.txt b/world/map/npc/magic/event-summon-coalgolem.txt
index 1af16637..592c5ade 100644
--- a/world/map/npc/magic/event-summon-coalgolem.txt
+++ b/world/map/npc/magic/event-summon-coalgolem.txt
@@ -4,8 +4,6 @@
OnCast:
if(call("magic_checks")) end;
- // FIXME: Incomplete check, should still work during sieges
- if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("Coal") < 3) end;
diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt
index 1aa172ad..fb7e1916 100644
--- a/world/map/npc/magic/event-summon-managuardian.txt
+++ b/world/map/npc/magic/event-summon-managuardian.txt
@@ -4,7 +4,6 @@
OnCast:
if(call("magic_checks")) end;
- // FIXME: Incomplete check, should still work during sieges
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("TinyManaElixir") < 1) end;
@@ -41,17 +40,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_MAGGOT_SPAWN;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, 1, .master, "Mana Guardian Summon", ManaGuard, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Mana Guardian Summon", ManaGuard, 2, .lifetime;
+OnDestroy:
destroy;
L_Cooldown:
diff --git a/world/map/npc/magic/event-summon-manatyrant.txt b/world/map/npc/magic/event-summon-manatyrant.txt
index ff082930..0a9f97cb 100644
--- a/world/map/npc/magic/event-summon-manatyrant.txt
+++ b/world/map/npc/magic/event-summon-manatyrant.txt
@@ -42,17 +42,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_MAGGOT_SPAWN;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, 1, .master, "Mana Tyrant Summon", ManaTyrant, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Mana Tyrant Summon", ManaTyrant, 2, .lifetime;
+OnDestroy:
destroy;
L_Cooldown:
diff --git a/world/map/npc/magic/event-summon-stonegolem.txt b/world/map/npc/magic/event-summon-stonegolem.txt
index dd8e8c53..325ded6a 100644
--- a/world/map/npc/magic/event-summon-stonegolem.txt
+++ b/world/map/npc/magic/event-summon-stonegolem.txt
@@ -4,8 +4,6 @@
OnCast:
if(call("magic_checks")) end;
- // FIXME: Incomplete check, should still work during sieges
- if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("Stone") < 1) end;
@@ -42,17 +40,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_MAGGOT_SPAWN;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, 1, .master, "Stone Golem Summon", StoneGolem, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Stone Golem Summon", StoneGolem, 2, .lifetime;
+OnDestroy:
destroy;
L_Cooldown:
diff --git a/world/map/npc/magic/event-summon-sunshroom.txt b/world/map/npc/magic/event-summon-sunshroom.txt
index 6c01c1c8..52f7619e 100644
--- a/world/map/npc/magic/event-summon-sunshroom.txt
+++ b/world/map/npc/magic/event-summon-sunshroom.txt
@@ -39,20 +39,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_SPIKY_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Sunshroom Summon", Sunshroom, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Sunshroom Summon", Sunshroom, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level1-grow-alizarin.txt b/world/map/npc/magic/level1-grow-alizarin.txt
index d82288cd..d07e9448 100644
--- a/world/map/npc/magic/level1-grow-alizarin.txt
+++ b/world/map/npc/magic/level1-grow-alizarin.txt
@@ -14,22 +14,16 @@
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_GROW_CAST, strcharinfo(0);
- setarray @summon[0], 0, (getskilllv(.school)/2)+1;
callfunc "magic_exp";
addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon";
end;
OnSummon:
misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0);
- callsub S_SummonAll;
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", getmap(), POS_X, POS_Y, 2, (getskilllv(.school)/2)+1, BL_ID, "Alizarin Plant Summon2", AlizarinPlant, 1, (@spellpower*50)+10000, "");
end;
-S_SummonAll:
- summon getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, "Alizarin Plant Summon", AlizarinPlant, 1, (@spellpower*50)+10000;
- set @summon[0], @summon[0] + 1;
- if (@summon[0] < @summon[1]) goto S_SummonAll;
- return;
-
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modriphoo"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level1-grow-cobalt.txt b/world/map/npc/magic/level1-grow-cobalt.txt
index 58028e8c..bed01002 100644
--- a/world/map/npc/magic/level1-grow-cobalt.txt
+++ b/world/map/npc/magic/level1-grow-cobalt.txt
@@ -14,22 +14,16 @@
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_GROW_CAST, strcharinfo(0);
- setarray @summon[0], 0, (getskilllv(.school)/2)+1;
callfunc "magic_exp";
addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon";
end;
OnSummon:
misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0);
- callsub S_SummonAll;
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", getmap(), POS_X, POS_Y, 2, (getskilllv(.school)/2)+1, BL_ID, "Cobalt Plant Summon", CobaltPlant, 1, (@spellpower*50)+10000, "");
end;
-S_SummonAll:
- summon getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, "Cobalt Plant Summon", CobaltPlant, 1, (@spellpower*50)+10000;
- set @summon[0], @summon[0] + 1;
- if (@summon[0] < @summon[1]) goto S_SummonAll;
- return;
-
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modrisump"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level1-grow-gamboge.txt b/world/map/npc/magic/level1-grow-gamboge.txt
index fae2cf7d..674da14f 100644
--- a/world/map/npc/magic/level1-grow-gamboge.txt
+++ b/world/map/npc/magic/level1-grow-gamboge.txt
@@ -14,22 +14,16 @@
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_GROW_CAST, strcharinfo(0);
- setarray @summon[0], 0, (getskilllv(.school)/2)+1;
callfunc "magic_exp";
addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon";
end;
OnSummon:
misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0);
- callsub S_SummonAll;
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", getmap(), POS_X, POS_Y, 2, (getskilllv(.school)/2)+1, BL_ID, "Gamboge Plant Summon", GambogePlant, 1, (@spellpower*50)+10000, "");
end;
-S_SummonAll:
- summon getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, "Gamboge Plant Summon", GambogePlant, 1, (@spellpower*50)+10000;
- set @summon[0], @summon[0] + 1;
- if (@summon[0] < @summon[1]) goto S_SummonAll;
- return;
-
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modriyikam"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level1-grow-mauve.txt b/world/map/npc/magic/level1-grow-mauve.txt
index af8f54d8..dbc64e59 100644
--- a/world/map/npc/magic/level1-grow-mauve.txt
+++ b/world/map/npc/magic/level1-grow-mauve.txt
@@ -14,22 +14,16 @@
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_GROW_CAST, strcharinfo(0);
- setarray @summon[0], 0, (getskilllv(.school)/2)+1;
callfunc "magic_exp";
addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon";
end;
OnSummon:
misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0);
- callsub S_SummonAll;
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", getmap(), POS_X, POS_Y, 2, (getskilllv(.school)/2)+1, BL_ID, "Mauve Plant Summon", MauvePlant, 1, (@spellpower*50)+10000, "");
end;
-S_SummonAll:
- summon getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, "Mauve Plant Summon", MauvePlant, 1, (@spellpower*50)+10000;
- set @summon[0], @summon[0] + 1;
- if (@summon[0] < @summon[1]) goto S_SummonAll;
- return;
-
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modrilax"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level1-grow-shadow.txt b/world/map/npc/magic/level1-grow-shadow.txt
index fff821db..945e0577 100644
--- a/world/map/npc/magic/level1-grow-shadow.txt
+++ b/world/map/npc/magic/level1-grow-shadow.txt
@@ -14,22 +14,16 @@
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_GROW_CAST, strcharinfo(0);
- setarray @summon[0], 0, (getskilllv(.school)/2)+1;
callfunc "magic_exp";
addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon";
end;
OnSummon:
misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0);
- callsub S_SummonAll;
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", getmap(), POS_X, POS_Y, 2, (getskilllv(.school)/2)+1, BL_ID, "Shadow Plant Summon", ShadowPlant, 1, (@spellpower*50)+10000, "");
end;
-S_SummonAll:
- summon getmap(), rand(POS_X-2,POS_X+2), rand(POS_Y-2,POS_Y+2), BL_ID, "Shadow Plant Summon", ShadowPlant, 1, (@spellpower*50)+10000;
- set @summon[0], @summon[0] + 1;
- if (@summon[0] < @summon[1]) goto S_SummonAll;
- return;
-
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modrisha"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt
index ce95422c..c87193da 100644
--- a/world/map/npc/magic/level1-summon-maggots.txt
+++ b/world/map/npc/magic/level1-summon-maggots.txt
@@ -37,20 +37,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_MAGGOT_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Maggot Summon", Maggot, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Maggot Summon", Maggot, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt
index fef40a17..b94fd3ba 100644
--- a/world/map/npc/magic/level2-summon-fluffies.txt
+++ b/world/map/npc/magic/level2-summon-fluffies.txt
@@ -38,20 +38,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_FLUFFY_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Fluffy Summon", Fluffy, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Fluffy Summon", Fluffy, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt
index 8a8603c6..bb45f96f 100644
--- a/world/map/npc/magic/level2-summon-mouboo.txt
+++ b/world/map/npc/magic/level2-summon-mouboo.txt
@@ -38,20 +38,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_MOUBOO_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Mouboo Summon", Mouboo, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Mouboo Summon", Mouboo, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt
index b4774584..08d03dca 100644
--- a/world/map/npc/magic/level2-summon-pinkie.txt
+++ b/world/map/npc/magic/level2-summon-pinkie.txt
@@ -38,20 +38,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_PINKY_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Pinkie Summon", Pinkie, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Pinkie Summon", Pinkie, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt
index 5815cef5..6549b7e7 100644
--- a/world/map/npc/magic/level2-summon-snakes.txt
+++ b/world/map/npc/magic/level2-summon-snakes.txt
@@ -39,25 +39,19 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_SNAKE_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
+ setarray .@mobs[0], CaveSnake, Snake, MountainSnake, GrassSnake; // Which snake to summon?
+ goto L_SummonRandom; // Spawn one by one to randomize
-OnDestroy:
+L_SummonRandom:
+ set .count, .count - 1;
+ set .mob, .@mobs[rand(getarraysize(.@mobs))]; // Pick random mob
+ set .nm$, mobinfo(.mob, MOB_ENG_NAME) + " Summon"; // Get mob's name + add Summon
+ // map X Y Rad QTY OWNER Disp MobID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, 1, .master, .nm$, .mob, 2, .lifetime, "");
+ if (.count > 0) goto L_SummonRandom;
destroy;
-S_SummonAll:
- set .@sn, rand(0, 3);
-
- if (.@sn == 0) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Cave Snake Summon", CaveSnake, 2, .lifetime;
- elif (.@sn == 1) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Snake Summon", Snake, 2, .lifetime;
- elif (.@sn == 2) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Mountain Snake Summon", MountainSnake, 2, .lifetime;
- elif (.@sn == 3) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Grass Snake Summon", GrassSnake, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
index 0f884185..9e305313 100644
--- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt
+++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
@@ -38,20 +38,11 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_SPIKY_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
-
-OnDestroy:
+ // map X Y Rad QTY OWNER DisplayName Mob ID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, .count, .master, "Spiky Mushroom Summon", SpikyMushroom, 2, .lifetime, "");
destroy;
-S_SummonAll:
- summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Spiky Mushroom Summon", SpikyMushroom, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt
index 7d0e93c1..9ee4406a 100644
--- a/world/map/npc/magic/level2-summon-wickedmushroom.txt
+++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt
@@ -39,24 +39,21 @@ OnSummon:
if(get(Hp, .master) < 1) destroy; // destroy if master is missing
if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_MAGIC_WICKED_SPAWN;
- set .@i, 0;
- set .@x, getnpcx();
- set .@y, getnpcy();
- set .@map$, strnpcinfo(3);
- callsub S_SummonAll;
- end;
+ goto L_SummonRandom; // Spawn one by one to randomize
-OnDestroy:
+L_SummonRandom:
+ set .count, .count - 1;
+ set .rnd, rand(0, 9);
+ if (.rnd < 6) set .mob, WickedMushroom;
+ elif (.rnd < 9) set .mob, Moonshroom;
+ else set .mob, EvilMushroom;
+ set .nm$, mobinfo(.mob, MOB_ENG_NAME) + " Summon"; // Get mob's name + add Summon
+ // map X Y Rad QTY OWNER Disp MobID AI Lifetime (no custom event)
+ void call("magic_summon_all", strnpcinfo(3), getnpcx(), getnpcy(), 2, 1, .master, .nm$, .mob, 2, .lifetime, "");
+ if (.count > 0) goto L_SummonRandom;
destroy;
-S_SummonAll:
- set .@rnd, rand(0, 9);
-
- if (.@rnd < 6) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Wicked Mushroom Summon", WickedMushroom, 2, .lifetime;
- elif (.@rnd < 9) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Moonshroom Summon", Moonshroom, 2, .lifetime;
- elif (.@rnd == 9) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Evil Mushroom Summon", EvilMushroom, 2, .lifetime;
- set .@i, .@i + 1;
- if (.@i < .count) goto S_SummonAll;
+OnDestroy:
destroy;
L_SpecialRules6:
diff --git a/world/map/npc/mobs/miner_mania.txt b/world/map/npc/mobs/miner_mania.txt
index a496697d..6eadde78 100644
--- a/world/map/npc/mobs/miner_mania.txt
+++ b/world/map/npc/mobs/miner_mania.txt
@@ -13,10 +13,9 @@ OnInit:
- $@bifs_big and $@bifs_small must always have the same size as $@bifs
-- if "error_log: on" is in world/map/conf/battle_local.conf it displays messages like "npc_event: event not found [Miner_Mania::OnBifMined10]" which clutter the server console
- but otherwise do no harm, its also possible to make "error_log: off" so they don't get displayed anymore but to be sure include a label with the mapnumber in it like:
- OnBifMined99:
- end;
+- Mob event labels MUST start with "~", e.g. "~Miner_Mania::OnBifMined". When event label
+ starts from "~", TMWA would know it should not throw event - labels starting from ~ are
+ designated for mob counting/labeling and do NOT throw events on mob death.
- $@bifs/slimes_multi set after how many ticks this map/spot spawns.
For example multi 6 would spawn on 6th tick which is 6 sec on 1 sec tick duration.
@@ -166,7 +165,7 @@ L_BifMapLoop:
set $@bifs_multi_count[.map_nr], $@bifs_multi[.map_nr];
- set .bifs_alive, mobcount($@bif_mine_maps$[.map_nr], "Miner_Mania::OnBifMined" + .map_nr)+1;
+ set .bifs_alive, mobcount($@bif_mine_maps$[.map_nr], "~Miner_Mania::OnBifMined" + .map_nr)+1;
set .bifs_respawn_count, $@bifs_count[.map_nr] - .bifs_alive;
if (.bifs_respawn_count < 1) goto L_BifContinue;
@@ -175,11 +174,11 @@ L_BifMapLoop:
else set .bif, 0;
if (rand(BIG_BIF_CHANCE)<1)
- areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs_big[.bif], 1, "Miner_Mania::OnBifMined" + .map_nr;
+ areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs_big[.bif], 1, "~Miner_Mania::OnBifMined" + .map_nr;
elif (rand(NORMAL_BIF_CHANCE)<1)
- areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs[.bif], 1, "Miner_Mania::OnBifMined" + .map_nr;
+ areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs[.bif], 1, "~Miner_Mania::OnBifMined" + .map_nr;
else
- areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs_small[.bif], 1, "Miner_Mania::OnBifMined" + .map_nr;
+ areamonster $@bif_mine_maps$[.map_nr], $@bif_mine_maps_x0[.map_nr], $@bif_mine_maps_y0[.map_nr], $@bif_mine_maps_x1[.map_nr], $@bif_mine_maps_y1[.map_nr], "", $@bifs_small[.bif], 1, "~Miner_Mania::OnBifMined" + .map_nr;
goto L_BifContinue;
@@ -200,14 +199,14 @@ L_SlimeMapLoop:
set $@slimes_multi_count[.map_nr], $@slimes_multi[.map_nr];
- set .slimes_alive, mobcount($@slime_mine_maps$[.map_nr], "Miner_Mania::OnSlimeSlain" + .map_nr)+1;
+ set .slimes_alive, mobcount($@slime_mine_maps$[.map_nr], "~Miner_Mania::OnSlimeSlain" + .map_nr)+1;
set .slimes_respawn_count, $@slimes_count[.map_nr] - .slimes_alive;
if (.slimes_respawn_count < 1) goto L_SlimeContinue;
set .slime, rand(getarraysize($@slimes[0]));
- areamonster $@slime_mine_maps$[.map_nr], $@slime_mine_maps_x0[.map_nr], $@slime_mine_maps_y0[.map_nr], $@slime_mine_maps_x1[.map_nr], $@slime_mine_maps_y1[.map_nr], "", $@slimes[.slime], 1, "Miner_Mania::OnSlimeSlain" + .map_nr;
+ areamonster $@slime_mine_maps$[.map_nr], $@slime_mine_maps_x0[.map_nr], $@slime_mine_maps_y0[.map_nr], $@slime_mine_maps_x1[.map_nr], $@slime_mine_maps_y1[.map_nr], "", $@slimes[.slime], 1, "~Miner_Mania::OnSlimeSlain" + .map_nr;
goto L_SlimeContinue;
@@ -222,74 +221,4 @@ L_SlimeContinue:
startnpctimer;
end;
-
-OnBifMined0:
- end;
-OnBifMined1:
- end;
-OnBifMined2:
- end;
-OnBifMined3:
- end;
-OnBifMined4:
- end;
-OnBifMined5:
- end;
-OnBifMined6:
- end;
-OnBifMined7:
- end;
-OnBifMined8:
- end;
-OnBifMined9:
- end;
-OnBifMined10:
- end;
-OnBifMined11:
- end;
-OnBifMined12:
- end;
-OnBifMined13:
- end;
-OnBifMined14:
- end;
-OnBifMined15:
- end;
-OnBifMined16:
- end;
-
-OnSlimeSlain0:
- end;
-OnSlimeSlain1:
- end;
-OnSlimeSlain2:
- end;
-OnSlimeSlain3:
- end;
-OnSlimeSlain4:
- end;
-OnSlimeSlain5:
- end;
-OnSlimeSlain6:
- end;
-OnSlimeSlain7:
- end;
-OnSlimeSlain8:
- end;
-OnSlimeSlain9:
- end;
-OnSlimeSlain10:
- end;
-OnSlimeSlain11:
- end;
-OnSlimeSlain12:
- end;
-OnSlimeSlain13:
- end;
-OnSlimeSlain14:
- end;
-OnSlimeSlain15:
- end;
-OnSlimeSlain16:
- end;
}
diff --git a/world/map/npc/prison/_import.txt b/world/map/npc/prison/_import.txt
new file mode 100644
index 00000000..ba495023
--- /dev/null
+++ b/world/map/npc/prison/_import.txt
@@ -0,0 +1,6 @@
+// Map prison: Prison
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+map: prison
+npc: npc/prison/_mobs.txt
+npc: npc/prison/_nodes.txt
+npc: npc/prison/_warps.txt
diff --git a/world/map/npc/prison/_mobs.txt b/world/map/npc/prison/_mobs.txt
new file mode 100644
index 00000000..5f4bbb79
--- /dev/null
+++ b/world/map/npc/prison/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Prison mobs
+
diff --git a/world/map/npc/prison/_nodes.txt b/world/map/npc/prison/_nodes.txt
new file mode 100644
index 00000000..fcfcd7e3
--- /dev/null
+++ b/world/map/npc/prison/_nodes.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Prison nodes
+
+// (no nodes)
diff --git a/world/map/npc/prison/_warps.txt b/world/map/npc/prison/_warps.txt
new file mode 100644
index 00000000..26f3dd9d
--- /dev/null
+++ b/world/map/npc/prison/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Prison warps
+
+prison,46,22|warp|-1,-1,001-2,60,49
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index b2565af8..a0aa5182 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -37,7 +37,9 @@ npc: npc/functions/ghost.txt
npc: npc/functions/vault.txt
npc: npc/functions/global_event_handler.txt
npc: npc/functions/teleport_manager.txt
+npc: npc/functions/treasure_hunt.txt
npc: npc/functions/spawns_on_mobkill.txt
+npc: npc/functions/storage_chests.txt
// Item Functions
npc: npc/items/purification_potion.txt