summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/string.txt9
-rw-r--r--npc/magic/study.txt6
2 files changed, 13 insertions, 2 deletions
diff --git a/npc/functions/string.txt b/npc/functions/string.txt
index 6b38fa676..2a38d90d4 100644
--- a/npc/functions/string.txt
+++ b/npc/functions/string.txt
@@ -120,6 +120,15 @@ function script format_number {
+// fnum(<integer>)
+// alias for format_number
+
+function script fnum {
+ return format_number(getarg(0));
+}
+
+
+
// strip("<string>")
// removes spaces at the start and end
diff --git a/npc/magic/study.txt b/npc/magic/study.txt
index b47cbbf10..547e8aa63 100644
--- a/npc/magic/study.txt
+++ b/npc/magic/study.txt
@@ -14,8 +14,10 @@ function script SK_study {
.@mobID=getunitdata(.@mobGD, UDT_CLASS);
dispbottom l("%s - %d/%d HP, %d/%d MP",
getmonsterinfo(.@mobID, MOB_NAME),
- getunitdata(.@mobGD, UDT_HP), getunitdata(.@mobGD, UDT_MAXHP),
- getunitdata(.@mobGD, UDT_SP), getunitdata(.@mobGD, UDT_MAXSP));
+ fnum(getunitdata(.@mobGD, UDT_HP)),
+ fnum(getunitdata(.@mobGD, UDT_MAXHP)),
+ fnum(getunitdata(.@mobGD, UDT_SP)),
+ fnum(getunitdata(.@mobGD, UDT_MAXSP)));
return;
}