summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/util.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 9e2ef7700..55fdba9bc 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -240,3 +240,27 @@ function script party_expon {
return .@value[0];
}
+
+// Gets how many subclasses were actually filled
+// total_subclass( )
+function script total_subclass {
+ .@i=0;
+ if (MAGIC_SUBCLASS & CL_PALADIN)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_TANKER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_BERSEKER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_RANGER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_SNIPER)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_WIZARD)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_SAGE)
+ .@i+=1;
+ if (MAGIC_SUBCLASS & CL_PRIEST)
+ .@i+=1;
+ return .@i;
+}
+