summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 18:34:28 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 18:34:28 -0300
commit83b400c45fe09842c264db97b6e965b4d36d0ed1 (patch)
tree0e46a699addef0920225fb7aa6a7c6be2d3534b0
parente6f19082f625ae2090e5c6891b0ba8a0c6ec4d83 (diff)
downloadserverdata-83b400c45fe09842c264db97b6e965b4d36d0ed1.tar.gz
serverdata-83b400c45fe09842c264db97b6e965b4d36d0ed1.tar.bz2
serverdata-83b400c45fe09842c264db97b6e965b4d36d0ed1.tar.xz
serverdata-83b400c45fe09842c264db97b6e965b4d36d0ed1.zip
This is the preset logic for the Mirror Lake Protocol.
MLP takes 3 variables, Vault takes 3 variables, TMW takes 3 variables for 9 total. Each world you connect to takes 3 more variables out of a total of 16 accreg2. Meaning, you can connect to two worlds: Moubootaur Legends and rEvolt. If a fourth world is ever added, TMWA/MLP will have an attack and die silently.
-rw-r--r--world/map/npc/functions/vault.txt78
1 files changed, 78 insertions, 0 deletions
diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt
index 6290d8d9..25e6d263 100644
--- a/world/map/npc/functions/vault.txt
+++ b/world/map/npc/functions/vault.txt
@@ -9,7 +9,10 @@ function|script|VaultLogin
callsub S_Exp;
callsub S_Gold;
+ callsub S_Preset;
+ // Clean up
+ set @last_preset, 0;
return; // go back to global handler
S_Return: // this is to end execution of a sub
@@ -29,5 +32,80 @@ S_Gold:
set Zeny, Zeny + ##ADD_GP;
set ##ADD_GP, 0;
return;
+
+S_Preset:
+ if (##PRESET < 1) goto S_Return;
+ set @last_preset, (#X21 & BYTE_3_MASK) >> BYTE_3_SHIFT;
+ set #X21, (#X21 & ~(BYTE_3_MASK)) | (##PRESET << BYTE_3_SHIFT);
+
+ // Each preset is 5 levels (Preset 1 = Lv 5, Preset 10 = Lv 50, Max Preset 20 - hard limit is 127)
+ /* Handle weapons */
+ if (##PRESET >= 1 && @last_preset < 1)
+ getitem "SharpKnife",1;
+ if (##PRESET >= 2 && @last_preset < 2)
+ getitem "Dagger",1;
+ if (##PRESET >= 3 && @last_preset < 3)
+ getitem "Bow",1;
+ if (##PRESET >= 3 && @last_preset < 3)
+ getitem "Arrow",500;
+ if (##PRESET >= 4 && @last_preset < 4)
+ getitem "Arrow",500;
+ if (##PRESET >= 5 && @last_preset < 5)
+ getitem "Scythe",1;
+ if (##PRESET >= 6 && @last_preset < 6)
+ getitem "ShortBow",1;
+ if (##PRESET >= 7 && @last_preset < 7)
+ getitem "IronArrow",500;
+ if (##PRESET >= 8 && @last_preset < 8)
+ getitem "ShortSword",1;
+ if (##PRESET >= 9 && @last_preset < 9)
+ getitem "BoneArrows",100;
+ if (##PRESET >= 10 && @last_preset < 10)
+ getitem "ForestBow",1;
+ if (##PRESET >= 11 && @last_preset < 11)
+ getitem "IronArrow",500;
+ if (##PRESET >= 12 && @last_preset < 12)
+ getitem "IceGladius",1;
+ if (##PRESET >= 13 && @last_preset < 13)
+ getitem "Arrow",500;
+ if (##PRESET >= 14 && @last_preset < 14)
+ getitem "TerraniteArrow",100;
+ if (##PRESET >= 15 && @last_preset < 15)
+ getitem "BoneArrows",100;
+ if (##PRESET >= 16 && @last_preset < 16)
+ getitem "BoneKnife",1;
+ if (##PRESET >= 17 && @last_preset < 17)
+ getitem "TerraniteArrow",100;
+ if (##PRESET >= 18 && @last_preset < 18)
+ getitem "Setzer",1;
+ if (##PRESET >= 19 && @last_preset < 19)
+ getitem "TerraniteArrow",250;
+ //if (##PRESET >= 20 && @last_preset < 20)
+ // getitem "BansheeBow",1;
+
+ /* Handle equipment */
+ if (##PRESET >= 2 && @last_preset < 2)
+ getitem "SilkHeadband",1;
+ if (##PRESET >= 4 && @last_preset < 4)
+ getitem "LeatherShirt",1;
+ if (##PRESET >= 6 && @last_preset < 6)
+ getitem "JeansShorts",1;
+ if (##PRESET >= 8 && @last_preset < 8)
+ getitem "SilkRobe",1;
+ if (##PRESET >= 10 && @last_preset < 10)
+ getitem "InfantryHelmet",1;
+ if (##PRESET >= 12 && @last_preset < 12)
+ getitem "ChainmailShirt",1;
+ if (##PRESET >= 14 && @last_preset < 14)
+ getitem "CottonBoots",1;
+ if (##PRESET >= 16 && @last_preset < 16)
+ getitem "JeansChaps",1;
+ if (##PRESET >= 18 && @last_preset < 18)
+ getitem "CottonGloves",1;
+ if (##PRESET >= 20 && @last_preset < 20)
+ getitem "LightPlatemail",1;
+
+ set ##PRESET, 0;
+ return;
}