summaryrefslogtreecommitdiff
path: root/npc/functions/politics.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-10-04 12:19:51 -0300
committerJesusaves <cpntb1@ymail.com>2020-10-04 12:19:51 -0300
commit312ca5d12764cea9d91ebc7f31c68ca3dba4990d (patch)
treece73457bc04b4e145e05d3799dcedb7658f6102a /npc/functions/politics.txt
parent2d9674e9b64eae4388e0ebd5ac1ac00aef000300 (diff)
downloadserverdata-312ca5d12764cea9d91ebc7f31c68ca3dba4990d.tar.gz
serverdata-312ca5d12764cea9d91ebc7f31c68ca3dba4990d.tar.bz2
serverdata-312ca5d12764cea9d91ebc7f31c68ca3dba4990d.tar.xz
serverdata-312ca5d12764cea9d91ebc7f31c68ca3dba4990d.zip
Register Candor as a town (But no townhall)
Diffstat (limited to 'npc/functions/politics.txt')
-rw-r--r--npc/functions/politics.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index a7524fa6f..cf11fca9f 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -132,6 +132,8 @@ OnClock2359:
$LOF_REPUTATION=limit(0, $LOF_REPUTATION-2, 100);
if ($FROSTIA_DAILYQUEST != gettimeparam(GETTIME_DAYOFMONTH) && $FROSTIA_MAYOR$ != "Jesus Saves")
$FROSTIA_REPUTATION=limit(0, $FROSTIA_REPUTATION-2, 100);
+ if ($CANDOR_DAILYQUEST != gettimeparam(GETTIME_DAYOFMONTH) && $CANDOR_MAYOR$ != "Jesus Saves")
+ $CANDOR_REPUTATION=limit(0, $CANDOR_REPUTATION-2, 100);
end;
OnSun0000:
@@ -142,6 +144,7 @@ OnSun0000:
$LOF_MONEY+=$LOF_EXPORT*limit(10, $LOF_REPUTATION, 100)/200;
$NIVAL_MONEY+=$NIVAL_EXPORT*limit(10, $NIVAL_REPUTATION, 100)/200;
$FROSTIA_MONEY+=$FROSTIA_EXPORT*limit(10, $FROSTIA_REPUTATION, 100)/200;
+ $CANDOR_MONEY+=$CANDOR_EXPORT*limit(10, $CANDOR_REPUTATION, 100)/200;
// Send salary to Town Administrators (20% from exports and 5GP/reputation)
.@tax=$TULIM_EXPORT*limit(0, $TULIM_REPUTATION, 100)/500;
@@ -180,6 +183,12 @@ OnSun0000:
$FROSTIA_MONEY-=.@tax;
rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax);
+ .@tax=$CANDOR_EXPORT*limit(0, $CANDOR_REPUTATION, 100)/500;
+ .@tax+=$CANDOR_REPUTATION*5;
+ .@tax=min($CANDOR_MONEY, .@tax);
+ $CANDOR_MONEY-=.@tax;
+ rodex_sendmail(gf_charnameid($CANDOR_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax);
+
// Conduct elections
.@w=array_highest($TULIM_VOTES);
if ($TULIM_CANDIDATE$[.@w] != "")
@@ -229,6 +238,14 @@ OnSun0000:
array_push($FROSTIA_CANDIDATE$, $FROSTIA_MAYOR$);
array_push($FROSTIA_VOTES, 0);
+ .@w=array_highest($CANODR_VOTES);
+ if ($CANDOR_CANDIDATE$[.@w] != "")
+ $CANDOR_MAYOR$=$CANDOR_CANDIDATE$[.@w];
+ deletearray($CANDOR_CANDIDATE$);
+ deletearray($CANDOR_VOTES);
+ array_push($CANDOR_CANDIDATE$, $CANDOR_MAYOR$);
+ array_push($CANDOR_VOTES, 0);
+
// Notify new mayors of their victory
rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Election Victory", "You've been elected to the office!");
rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Election Victory", "You've been elected to the office!");
@@ -236,6 +253,7 @@ OnSun0000:
rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Election Victory", "You've been elected to the office!");
rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Election Victory", "You've been elected to the office!");
rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Election Victory", "You've been elected to the office!");
+ rodex_sendmail(gf_charnameid($CANDOR_MAYOR$), "Candor Townhall", "Election Victory", "You've been elected to the office!");
end;
}