diff options
-rw-r--r-- | npc/functions/util.txt | 16 |
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 { |