summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-19 21:21:54 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-19 21:21:54 -0300
commite4d60dfba3b49ea1a51e900083d0215e1b554cfa (patch)
treec9b3cd1df526746c43bcc560cc316f13c8217a7b
parent906e9d4fdd20bd8ac4a8b6c92872134e78184e18 (diff)
downloadserverdata-e4d60dfba3b49ea1a51e900083d0215e1b554cfa.tar.gz
serverdata-e4d60dfba3b49ea1a51e900083d0215e1b554cfa.tar.bz2
serverdata-e4d60dfba3b49ea1a51e900083d0215e1b554cfa.tar.xz
serverdata-e4d60dfba3b49ea1a51e900083d0215e1b554cfa.zip
New function: alignment()
-rw-r--r--npc/functions/util.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 6f21fb536..c23352147 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -589,6 +589,22 @@ function script nard_time {
return INT_MAX;
}
+// alignment() → 1 if Good, -1 if Evil, 0 if Neutral
+function script alignment {
+ .@m=getq(HurnscaldQuest_InjuriedMouboo);
+
+ // Mouboo was slain: EVIL
+ if (.@m >= 9)
+ return -1;
+
+ // Mouboo was saved and Sagratha rescued: GOOD
+ if (SAGRATHA_FRIENDSHIP >= 2)
+ return 1;
+
+ // N/A: NEUTRAL
+ return 0;
+}
+
// Returns if an event is a ranked Aurora Event or not
// (Had to be moved from functions/aurora.txt)
function script FYEventUsesRanking {