summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-17 16:15:39 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-17 16:15:39 -0300
commitf0e1bab3417e559b5b62f3ae4e74ea922a2c945f (patch)
tree8e2dd3fbe727083b54f583817a1825eb95c29b94 /npc/functions
parent14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f (diff)
downloadserverdata-f0e1bab3417e559b5b62f3ae4e74ea922a2c945f.tar.gz
serverdata-f0e1bab3417e559b5b62f3ae4e74ea922a2c945f.tar.bz2
serverdata-f0e1bab3417e559b5b62f3ae4e74ea922a2c945f.tar.xz
serverdata-f0e1bab3417e559b5b62f3ae4e74ea922a2c945f.zip
Update Valon's scripts
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/mob_points.txt4
-rw-r--r--npc/functions/quests.txt30
2 files changed, 32 insertions, 2 deletions
diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt
index a9f6f1d4..c80a5514 100644
--- a/npc/functions/mob_points.txt
+++ b/npc/functions/mob_points.txt
@@ -43,9 +43,9 @@ function script MobPoints {
Mobpt+=.@addval;
}
- callfunc "ValonCount";
+ ValonCount();
if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobId == $@ValonMob[@valon_mob]))
- callfunc("AddValonCntMask");
+ AddValonCntMask();
// Attitude adjustment for Sagatha
diff --git a/npc/functions/quests.txt b/npc/functions/quests.txt
index 3f0c40ef..fcdc13eb 100644
--- a/npc/functions/quests.txt
+++ b/npc/functions/quests.txt
@@ -35,3 +35,33 @@ function script elanore_decrease_exp {
return;
}
+function script ValonCount {
+ @valon_mob = 0;
+ if (QL_VALON >= 2)
+ @valon_mob = (QL_VALON - 2);
+ @valon_count = ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+ return;
+}
+
+function script ResetValonCntMask {
+ STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
+ return;
+}
+
+function script ValonProgress {
+ ValonCount();
+ if ((QL_VALON > 1) && (QL_VALON < 6))
+ message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob];
+ return;
+}
+
+function script AddValonCntMask {
+ @valon_tmp = (@valon_count + 1);
+ if (@valon_tmp > $@ValonMobCnt[@valon_mob])
+ @valon_tmp = $@ValonMobCnt[@valon_mob];
+ STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT));
+ @valon_tmp = 0;
+ ValonProgress();
+ return;
+}
+