summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt94
1 files changed, 94 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 509d4bd15..dfdd763af 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -107,6 +107,100 @@ function script nard_reputation {
}
+/*
+// Calcs maximum reputation for each destination
+function script marine_maxre {
+ if (getarg(0) == "Tulim")
+ return 10;
+ if (getarg(0) == "Hurns")
+ return 3;
+ dispbottom l("Error, marine_maxre invalid @@", getarg(0, "-NO ARGS SUPPLIED-"));
+ return -1;
+}
+*/
+
+// Returns reputation with the La Marine for discounts
+// Takes one argument (PC_DEST$). Grep for "getarg".
+// Before updating this, update marine_maxre too!
+function script marine_reputation {
+ .@nr=0; // Base reputation
+
+ // Tulimshar Quests (10 points)
+ if (getarg(0) == "Tulim") {
+ // Swezanne Quest (+1 rep)
+ if (getq(TulimsharQuest_Swezanne) >= 1)
+ .@nr=.@nr+1;
+
+ // Sailors Quest (+1 rep)
+ if (getq(TulimsharQuest_Sailors) >= 2)
+ .@nr=.@nr+1;
+
+ // Hasan Quest (+1 rep)
+ if (getq(TulimsharQuest_Hasan) >= 5)
+ .@nr=.@nr+1;
+
+ // Dausen Quest (+1 rep)
+ if (getq(TulimsharQuest_WaterForGuard) >= 3)
+ .@nr=.@nr+1;
+
+ // Eugene Quest (+1 rep)
+ if (getq(TulimsharQuests_Fishman) >= 2)
+ .@nr=.@nr+1;
+
+ // Sarah Quest (+1 rep)
+ if (getq(TulimsharQuest_Sarah) >= 1)
+ .@nr=.@nr+1;
+
+ // Silvia Quest (+1 rep)
+ if (getq(TulimsharQuest_Lifestone) >= 2)
+ .@nr=.@nr+1;
+
+ /*
+ // Eisten Quest (+1 rep)
+ if (getq(TulimsharQuest_Eistein) >= 6)
+ .@nr=.@nr+1;
+ */
+
+ // Devoir Quest (+1 rep)
+ if (getq(TulimsharQuest_Devoir) >= 1)
+ .@nr=.@nr+1;
+
+ // Zarkor Quest (+1 rep)
+ if (getq(TulimsharQuest_DarkInvocator) >= 7)
+ .@nr=.@nr+1;
+
+ /*
+ // Anwar Quest (+1 rep)
+ if (getq(TulimsharQuest_AnwarField) >= 99)
+ .@nr=.@nr+1;
+ */
+
+ // Tycoon Quest (+1 rep)
+ if (getq(MineQuest_Tycoon) >= 15)
+ .@nr=.@nr+1;
+
+ // Hurnscald Quests (3 points)
+ } else if (getarg(0) == "Hurns") {
+
+ // Alan Quest (+1 rep)
+ if (getq(HurscaldQuest_ForestBow) >= 2)
+ .@nr=.@nr+1;
+
+ // Gwendolyn Quest (+1 rep)
+ if (getq(HurnscaldQuest_HarkEye) >= 6)
+ .@nr=.@nr+1;
+
+ // Celestia Quest (+1 rep)
+ if (getq(HurnscaldQuest_TeaParty) >= 2)
+ .@nr=.@nr+1;
+
+ }
+
+ //debugmes "Reputation: "+str(.@nr);
+ return .@nr;
+
+}
+
// Returns time for ship travel.
// Can be modified by a factor.