summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-11-17 16:22:45 -0300
committerJesusaves <cpntb1@ymail.com>2022-11-17 16:26:36 -0300
commite35c44ffd1759655c54cb6a61b60038eebad333f (patch)
tree27cc0731665d5e39247cc1287468ba5d2e197ade
parent740b31f601452bbfe5c32747861abe1d8948289e (diff)
downloadserverdata-e35c44ffd1759655c54cb6a61b60038eebad333f.tar.gz
serverdata-e35c44ffd1759655c54cb6a61b60038eebad333f.tar.bz2
serverdata-e35c44ffd1759655c54cb6a61b60038eebad333f.tar.xz
serverdata-e35c44ffd1759655c54cb6a61b60038eebad333f.zip
Now that we have mobinfo(), fix the exp assignment from Vault.
-rw-r--r--world/map/npc/functions/mob_points.txt15
-rw-r--r--world/map/npc/functions/vault.txt50
2 files changed, 27 insertions, 38 deletions
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index cf93fdae..ecea5b82 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -4,6 +4,8 @@ function|script|MobPoints
{
if (@mobID < 1002) goto L_Return;
+ callsub S_Vault;
+
setarray @points,
1, // 1002 Maggot
2, // 1003 Scorpion
@@ -176,7 +178,11 @@ function|script|MobPoints
0, // 1165 RESERVED
0, // 1166 RESERVED
0, // 1167 RESERVED
- 0 // 1168 Floyd
+ 0, // 1168 Floyd
+ 0, // 1169 Crystal Spider
+ 0, // 1170 Crystal Golem
+ 0, // 1171 Black Crystal Golem
+ 0 // 1172 Bif
;
if ((MPQUEST == 1) && (@mobID < 1128))
@@ -266,6 +272,13 @@ L_Terranite:
set TERRAC, TERRAC + 1;
goto L_Return;
+S_Vault:
+ if (#EXP_CREDIT < 1) goto L_Return;
+ set @exp_bonus, min(#EXP_CREDIT, mobinfo(@mobID, MOB_BASEEXP) * 2);
+ set #EXP_CREDIT, #EXP_CREDIT - @exp_bonus;
+ getexp @exp_bonus, 0;
+ return;
+
L_Return:
set @value, 0;
return;
diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt
index ee30863c..a0da16b1 100644
--- a/world/map/npc/functions/vault.txt
+++ b/world/map/npc/functions/vault.txt
@@ -24,7 +24,7 @@ L_Return:
S_Exp:
if (##ADD_LVL < 1) goto S_Return;
- getexp ##ADD_LVL, 0;
+ set #EXP_CREDIT, #EXP_CREDIT + ##ADD_LVL;
set ##ADD_LVL, 0;
return;
@@ -46,7 +46,7 @@ S_Preset:
if (##PRESET >= 1 && @last_preset < 1)
getitem "SharpKnife",1;
if (##PRESET >= 2 && @last_preset < 2)
- getitem "Dagger",1;
+ getitem "SlingBullet",500;
if (##PRESET >= 3 && @last_preset < 3)
getitem "Bow",1;
if (##PRESET >= 3 && @last_preset < 3)
@@ -54,59 +54,35 @@ S_Preset:
if (##PRESET >= 4 && @last_preset < 4)
getitem "Arrow",500;
if (##PRESET >= 5 && @last_preset < 5)
- getitem "Scythe",1;
+ getitem "JeansShorts",1;
if (##PRESET >= 6 && @last_preset < 6)
- getitem "ShortBow",1;
+ getitem "IronArrow",500;
if (##PRESET >= 7 && @last_preset < 7)
getitem "IronArrow",500;
if (##PRESET >= 8 && @last_preset < 8)
- getitem "ShortSword",1;
+ getitem "IronPowder", 150;
if (##PRESET >= 9 && @last_preset < 9)
- getitem "BoneArrows",100;
+ getitem "BoneArrows",150;
if (##PRESET >= 10 && @last_preset < 10)
- getitem "ForestBow",1;
+ getitem "BoneArrows",150;
if (##PRESET >= 11 && @last_preset < 11)
- getitem "IronArrow",500;
+ getitem "SilverArrow",200;
if (##PRESET >= 12 && @last_preset < 12)
- getitem "IceGladius",1;
+ getitem "ThornArrow",100;
if (##PRESET >= 13 && @last_preset < 13)
- getitem "Arrow",500;
+ getitem "SilverArrow",200;
if (##PRESET >= 14 && @last_preset < 14)
getitem "TerraniteArrow",100;
if (##PRESET >= 15 && @last_preset < 15)
- getitem "BoneArrows",100;
+ getitem "ArmorBreaker",100;
if (##PRESET >= 16 && @last_preset < 16)
- getitem "BoneKnife",1;
+ getitem "ThornArrow",100;
if (##PRESET >= 17 && @last_preset < 17)
getitem "TerraniteArrow",100;
if (##PRESET >= 18 && @last_preset < 18)
- getitem "Setzer",1;
+ getitem "IronPowder", 150;
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;