summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-15 21:52:32 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-15 21:52:32 -0300
commit2ed3dd5ca515cb40da32f0384c24dcb9b09013e9 (patch)
tree8fe0563494029db8b5e13ca422eb52f00d1c24f0 /npc/functions
parent1d71f91e116c8c9785a43d89780e3298cec4335a (diff)
downloadserverdata-2ed3dd5ca515cb40da32f0384c24dcb9b09013e9.tar.gz
serverdata-2ed3dd5ca515cb40da32f0384c24dcb9b09013e9.tar.bz2
serverdata-2ed3dd5ca515cb40da32f0384c24dcb9b09013e9.tar.xz
serverdata-2ed3dd5ca515cb40da32f0384c24dcb9b09013e9.zip
Jesusalva Grimorium reports current nº of subclass, and maximum value
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;
+}
+