summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-15 22:00:23 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-15 22:00:23 -0300
commita6460a88a9f99e466ca97ba429b579aa7bc07ae9 (patch)
treef24f4b5bef048a25678c3d865281c36981b93f56
parentb77a72f3f082f0cde1ab3cab3055f53c5a38c555 (diff)
downloadserverdata-a6460a88a9f99e466ca97ba429b579aa7bc07ae9.tar.gz
serverdata-a6460a88a9f99e466ca97ba429b579aa7bc07ae9.tar.bz2
serverdata-a6460a88a9f99e466ca97ba429b579aa7bc07ae9.tar.xz
serverdata-a6460a88a9f99e466ca97ba429b579aa7bc07ae9.zip
minor improvement
-rw-r--r--npc/functions/util.txt13
-rw-r--r--npc/items/books.txt2
2 files changed, 14 insertions, 1 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 55fdba9bc..f36ff8a4d 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -264,3 +264,16 @@ function script total_subclass {
return .@i;
}
+// Gets how many subclasses were actually allowed
+// max_subclass()
+function script max_subclass {
+ return (MAGIC_LVL/2);
+}
+
+
+// Gets subclass current degree
+// degree_subclass()
+function script degree_subclass {
+ return (MAGIC_LVL/2)+(MAGIC_LVL%1);
+}
+
diff --git a/npc/items/books.txt b/npc/items/books.txt
index 68a9ae56e..0932a6337 100644
--- a/npc/items/books.txt
+++ b/npc/items/books.txt
@@ -193,7 +193,7 @@ OnInit:
next;
break;
case 3:
- mesc l("You currently have @@/@@ subclass(es).", total_subclass(),(MAGIC_LVL/2));
+ mesc l("You currently have @@/@@ subclass(es).", total_subclass(),max_subclass());
if (MAGIC_SUBCLASS & CL_PALADIN)
mesc lg("* Paladin");
if (MAGIC_SUBCLASS & CL_TANKER)