summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2024-04-30 21:37:26 +0200
committerLed Mitz <smoothshifter@tuta.io>2024-05-16 16:28:21 +0000
commit087f6a98ad8c16b2dc06c025cab5e2d90375ab76 (patch)
treed3631aba13ce1424cd340eb2127916ec8c35244a /world/map/npc
parentc318b9a5ae988a982cc4ffcad2faaf6549aed9d8 (diff)
downloadserverdata-087f6a98ad8c16b2dc06c025cab5e2d90375ab76.tar.gz
serverdata-087f6a98ad8c16b2dc06c025cab5e2d90375ab76.tar.bz2
serverdata-087f6a98ad8c16b2dc06c025cab5e2d90375ab76.tar.xz
serverdata-087f6a98ad8c16b2dc06c025cab5e2d90375ab76.zip
update
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/012-3/beheader.txt2
-rw-r--r--world/map/npc/013-3/mask_chest.txt164
-rw-r--r--world/map/npc/functions/vault.txt76
3 files changed, 155 insertions, 87 deletions
diff --git a/world/map/npc/012-3/beheader.txt b/world/map/npc/012-3/beheader.txt
index dbdd5f11..ddd46c53 100644
--- a/world/map/npc/012-3/beheader.txt
+++ b/world/map/npc/012-3/beheader.txt
@@ -176,7 +176,7 @@ L_Finish:
goto L_Nope;
getitem "Beheader", 1;
- getexp 750000, 0;
+ getexp 1000000, 0;
set FLAGS, FLAGS | FLAG_GOT_BEHEADER_SWORD;
set TERRAC, 0;
diff --git a/world/map/npc/013-3/mask_chest.txt b/world/map/npc/013-3/mask_chest.txt
index 51ca35c2..ebc9f7f7 100644
--- a/world/map/npc/013-3/mask_chest.txt
+++ b/world/map/npc/013-3/mask_chest.txt
@@ -7,113 +7,113 @@
if (@state < 2) goto L_This_shouldn_t_happen;
if (@state == 3) goto L_Finished;
- if (countitem("InsectSlime") == 0)
+ if (countitem(InsectSlime) == 0)
goto L_No_insect_slime;
- if (countitem("SmallMushroom") == 0)
+ if (countitem(SmallMushroom) == 0)
goto L_No_mushroom;
- if (countitem("PinkPetal") == 0)
+ if (countitem(PinkPetal) == 0)
goto L_No_pink_petal;
- if (countitem("Pearl") == 0)
+ if (countitem(Pearl) == 0)
goto L_No_pearl;
- if (countitem("HardSpike") == 0)
+ if (countitem(HardSpike) == 0)
goto L_No_hard_spike;
- if (countitem("RawLog") == 0)
+ if (countitem(RawLog) == 0)
goto L_No_raw_log;
- if (countitem("PinkAntenna") == 0)
+ if (countitem(PinkAntenna) == 0)
goto L_No_pink_antenna;
- if (countitem("SnakeTongue") == 0
- || countitem("MountainSnakeTongue") == 0
- || countitem("GrassSnakeTongue") == 0
- || countitem("CaveSnakeTongue") == 0)
+ if (countitem(SnakeTongue) == 0
+ || countitem(MountainSnakeTongue) == 0
+ || countitem(GrassSnakeTongue) == 0
+ || countitem(CaveSnakeTongue) == 0)
goto L_No_tongues;
- if (countitem("TreasureKey") == 0)
+ if (countitem(TreasureKey) == 0)
goto L_No_treasure_key;
- if (countitem("PileOfAsh") == 0)
+ if (countitem(PileOfAsh) == 0)
goto L_no_ash;
- if (countitem("MauveHerb") == 0
- || countitem("CobaltHerb") == 0
- || countitem("GambogeHerb") == 0
- || countitem("AlizarinHerb") == 0)
+ if (countitem(MauveHerb) == 0
+ || countitem(CobaltHerb) == 0
+ || countitem(GambogeHerb) == 0
+ || countitem(AlizarinHerb) == 0)
goto L_No_herbs;
- if (countitem("InsectLeg") == 0)
+ if (countitem(InsectLeg) == 0)
goto L_No_insect_leg;
- if (countitem("CaveSnakeLamp") == 0)
+ if (countitem(CaveSnakeLamp) == 0)
goto L_No_lamp;
- if (countitem("IronOre") == 0)
+ if (countitem(IronOre) == 0)
goto L_No_iron_ore;
- if (countitem("ScorpionStinger") == 0
- || countitem("RedScorpionStinger") == 0
- || countitem("BlackScorpionStinger") == 0)
+ if (countitem(ScorpionStinger) == 0
+ || countitem(RedScorpionStinger) == 0
+ || countitem(BlackScorpionStinger) == 0)
goto L_No_stingers;
- if (countitem("SilkCocoon") == 0)
+ if (countitem(SilkCocoon) == 0)
goto L_No_silk;
- if (countitem("WhiteFur") == 0)
+ if (countitem(WhiteFur) == 0)
goto L_No_fur;
- if (countitem("DarkCrystal") == 0)
+ if (countitem(DarkCrystal) == 0)
goto L_No_dark_crystal;
- if (countitem("BottleOfWater") == 0)
+ if (countitem(BottleOfWater) == 0)
goto L_No_water;
getinventorylist;
if (@inventorylist_count == 100
- && countitem("InsectSlime") > 1
- && countitem("InsectLeg") > 1
- && countitem("SilkCocoon") > 1
- && countitem("SmallMushroom") > 1
- && countitem("PinkPetal") > 1
- && countitem("Pearl") > 1
- && countitem("HardSpike") > 1
- && countitem("RawLog") > 1
- && countitem("PinkAntenna") > 1
- && countitem("DarkCrystal") > 1
- && countitem("IronOre") > 1
- && countitem("ScorpionStinger") > 1
- && countitem("RedScorpionStinger") > 1
- && countitem("BlackScorpionStinger") > 1
- && countitem("SnakeTongue") > 1
- && countitem("MountainSnakeTongue") > 1
- && countitem("GrassSnakeTongue") > 1
- && countitem("CaveSnakeTongue") > 1
- && countitem("MauveHerb") > 1
- && countitem("CobaltHerb") > 1
- && countitem("GambogeHerb") > 1
- && countitem("AlizarinHerb") > 1
- && countitem("TreasureKey") > 1
- && countitem("CaveSnakeLamp") > 1
- && countitem("PileOfAsh") > 1
- && countitem("WhiteFur") > 1
- && countitem("BottleOfWater") > 1)
+ && countitem(InsectSlime) > 1
+ && countitem(InsectLeg) > 1
+ && countitem(SilkCocoon) > 1
+ && countitem(SmallMushroom) > 1
+ && countitem(PinkPetal) > 1
+ && countitem(Pearl) > 1
+ && countitem(HardSpike) > 1
+ && countitem(RawLog) > 1
+ && countitem(PinkAntenna) > 1
+ && countitem(DarkCrystal) > 1
+ && countitem(IronOre) > 1
+ && countitem(ScorpionStinger) > 1
+ && countitem(RedScorpionStinger) > 1
+ && countitem(BlackScorpionStinger) > 1
+ && countitem(SnakeTongue) > 1
+ && countitem(MountainSnakeTongue) > 1
+ && countitem(GrassSnakeTongue) > 1
+ && countitem(CaveSnakeTongue) > 1
+ && countitem(MauveHerb) > 1
+ && countitem(CobaltHerb) > 1
+ && countitem(GambogeHerb) > 1
+ && countitem(AlizarinHerb) > 1
+ && countitem(TreasureKey) > 1
+ && countitem(CaveSnakeLamp) > 1
+ && countitem(PileOfAsh) > 1
+ && countitem(WhiteFur) > 1
+ && countitem(BottleOfWater) > 1)
goto L_TooMany;
- delitem "InsectSlime", 1;
- delitem "InsectLeg", 1;
- delitem "SilkCocoon", 1;
- delitem "SmallMushroom", 1;
- delitem "PinkPetal", 1;
- delitem "Pearl", 1;
- delitem "HardSpike", 1;
- delitem "RawLog", 1;
- delitem "PinkAntenna", 1;
- delitem "DarkCrystal", 1;
- delitem "IronOre", 1;
- delitem "ScorpionStinger", 1;
- delitem "RedScorpionStinger", 1;
- delitem "BlackScorpionStinger", 1;
- delitem "SnakeTongue", 1;
- delitem "MountainSnakeTongue", 1;
- delitem "GrassSnakeTongue", 1;
- delitem "CaveSnakeTongue", 1;
- delitem "MauveHerb", 1;
- delitem "CobaltHerb", 1;
- delitem "GambogeHerb", 1;
- delitem "AlizarinHerb", 1;
- delitem "TreasureKey", 1;
- delitem "CaveSnakeLamp", 1;
- delitem "WhiteFur", 1;
- delitem "PileOfAsh", 1;
- delitem "BottleOfWater", 1;
+ delitem InsectSlime, 1;
+ delitem InsectLeg, 1;
+ delitem SilkCocoon, 1;
+ delitem SmallMushroom, 1;
+ delitem PinkPetal, 1;
+ delitem Pearl, 1;
+ delitem HardSpike, 1;
+ delitem RawLog, 1;
+ delitem PinkAntenna, 1;
+ delitem DarkCrystal, 1;
+ delitem IronOre, 1;
+ delitem ScorpionStinger, 1;
+ delitem RedScorpionStinger, 1;
+ delitem BlackScorpionStinger, 1;
+ delitem SnakeTongue, 1;
+ delitem MountainSnakeTongue, 1;
+ delitem GrassSnakeTongue, 1;
+ delitem CaveSnakeTongue, 1;
+ delitem MauveHerb, 1;
+ delitem CobaltHerb, 1;
+ delitem GambogeHerb, 1;
+ delitem AlizarinHerb, 1;
+ delitem TreasureKey, 1;
+ delitem CaveSnakeLamp, 1;
+ delitem WhiteFur, 1;
+ delitem PileOfAsh, 1;
+ delitem BottleOfWater, 1;
mes "You managed to perform the ritual and open the chest.";
- getitem "DemonMask", 1;
+ getitem DemonMask, 1;
mes "You found a demon mask inside.";
set @state, 3;
callsub S_Update_Mask;
diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt
index c3d95dd8..c9c9086a 100644
--- a/world/map/npc/functions/vault.txt
+++ b/world/map/npc/functions/vault.txt
@@ -6,12 +6,18 @@
function|script|VaultLogin
{
if (##VAULT < 1) goto L_Return;
- // TODO: Or #VAULT ? Which of the two is set?
+ // Imports & Vitals
callsub S_Exp;
callsub S_Gold;
callsub S_Preset;
+ // Quest Handlers
+ callsub S_Quest_CR1;
+
+ // Mirror lake
+ callsub S_MirrorLake;
+
// Clean up
set @last_preset, 0;
return; // go back to global handler
@@ -41,8 +47,9 @@ S_Preset:
// Each preset is 5 levels (Preset 1 = Lv 5, Preset 10 = Lv 50, Max Preset 20 - hard limit is 127)
// TODO: Give more ammo, iron powder, sulphur powder, etc. instead of equips
- // Give also some insect legs and insect slimes if applicable?
+ // Give also some insect legs and insect slime if applicable?
/* Handle weapons */
+ /*
if (##PRESET >= 1 && @last_preset < 1)
getitem "SharpKnife",1;
if (##PRESET >= 2 && @last_preset < 2)
@@ -83,14 +90,55 @@ S_Preset:
getitem "IronPowder", 150;
if (##PRESET >= 19 && @last_preset < 19)
getitem "TerraniteArrow",250;
-
+ */
set ##PRESET, 0;
return;
+
+////////////////////////////////
+S_Quest_CR1:
+ if (!(##01_CRQUEST & 1)) goto S_Return;
+ if (##03_TMWWORLD & MLP_CR_DEBUT) goto S_Return;
+ // Check if you can receive the rewards
+ getinventorylist;
+ if (@inventorylist_count >= 96) goto S_Return;
+ // Mark quest as done and issue rewards
+ set BOSS_POINTS, BOSS_POINTS + 871;
+ set ##03_TMWWORLD, ##03_TMWWORLD | MLP_CR_DEBUT;
+ getitem WhiteCake, 1;
+ getitem ChocolateCake, 1;
+ getitem OrangeCake, 1;
+ getitem AppleCake, 1;
+ message strcharinfo(0), "Mirror Lake : You gained 871 boss points.";
+ return;
+
+////////////////////////////////
+S_MirrorLake:
+ // Wipe any existing TMWA internal mirror lake information
+ set ##VAULT_GOTO, 0;
+ set ##VAULT_MLTO, 0;
+ // TODO: Put the Mirror Lake Portal into the shipwreck? (see portal #2)
+ set .@gto, call("get_byte", ##00_INFO, 3);
+ set .@mlp, call("get_nibble", ##00_INFO, 5);
+ // If we're moving from Mirror Lake to TMW
+ if (.@gto != WORLD_ID) goto S_MirrorFix;
+ debugmes "Vault User "+##VAULT+" moved to lake "+.@mlp;
+ if (.@mlp == 1) warp "013-2", 37, 23; // Hurnscald Mirror Lake
+ if (.@mlp == 2) warp "002-1", 30, 58; // Tulimshar Mirror Lake
+ // Unset the target lake/world
+ void call("set_byte", ##00_INFO, 3, 0);
+ void call("set_nibble", ##00_INFO, 5, 0);
+ return;
+
+// We've moved to the wrong world, so preserve it.
+S_MirrorFix:
+ set ##VAULT_GOTO, call("get_byte", ##00_INFO, 3);
+ set ##VAULT_MLTO, call("get_nibble", ##00_INFO, 5);
+ return;
}
// Remember: ##VAULT_EXP, ##VAULT_GOTO, ##VAULT_MLTO for Mirror Lake Protocol
-// However, without kick(7), it is not really worth anything
+// However, without kick(7), it is not really worth anything - so I presumed 7
// Remember: Quote symbols are illegal, simple or double, except for parameter
// To reset the database:
// cleararray $EXPORT_DATA$[0], "", 254;
@@ -154,6 +202,26 @@ function|script|VaultLogout
set $@API_PROTOCOL, API_VAULT;
set $@API_DATA$, "'UID': "+##VAULT+", 'GID': "+getcharid(3);
callfunc "FlushAPI";
+
+ return;
+
+L_Return:
+ return;
+}
+
+// MirrorLakeSendTo(World)
+function|script|MirrorLakeSendTo
+{
+ if (##VAULT < 1) goto L_Return;
+ set ##VAULT_GOTO, getarg(0);
+ // This is TMWA - so it'll always use Lake #0 for performance reasons
+ set $@API_PROTOCOL, API_VAULT;
+ set $@API_DATA$, "'UID': "+##VAULT+", 'GID': "+getcharid(3);
+ callfunc "FlushAPI";
+ message strcharinfo(0), "Darkness fills your vision...";
+ // TODO: Misc effects
+ // TODO: Sleep for 10~15 seconds (for mapreg)
+ // TODO: Disconnect user
return;
L_Return: