summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-10 22:16:51 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-10 22:16:51 -0300
commitf59ea1556d4c90882ca161cd67f60cb2b82a5d63 (patch)
tree97b05106ee8cf382ed3444d23cae9a115ad222db /npc/functions/util.txt
parent24830b94e4b91d9d357b43f463cdd1d53842964e (diff)
downloadserverdata-f59ea1556d4c90882ca161cd67f60cb2b82a5d63.tar.gz
serverdata-f59ea1556d4c90882ca161cd67f60cb2b82a5d63.tar.bz2
serverdata-f59ea1556d4c90882ca161cd67f60cb2b82a5d63.tar.xz
serverdata-f59ea1556d4c90882ca161cd67f60cb2b82a5d63.zip
Rewrite how La Marine charges for travels
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.