diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-04 12:19:51 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-04 12:19:51 -0300 |
commit | 312ca5d12764cea9d91ebc7f31c68ca3dba4990d (patch) | |
tree | ce73457bc04b4e145e05d3799dcedb7658f6102a /npc | |
parent | 2d9674e9b64eae4388e0ebd5ac1ac00aef000300 (diff) | |
download | serverdata-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')
-rw-r--r-- | npc/003-3/malindou.txt | 4 | ||||
-rw-r--r-- | npc/functions/politics.txt | 18 | ||||
-rw-r--r-- | npc/functions/util.txt | 5 |
3 files changed, 26 insertions, 1 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index f52e130c9..cc9f2a88e 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -53,6 +53,10 @@ OnInit: $FROSTIA_TAX=100; $FROSTIA_EXPORT=3000; $FROSTIA_REPUTATION=50; + $CANDOR_MAYOR$="Jesus Saves"; + $CANDOR_TAX=1000; + $CANDOR_EXPORT=0; + $CANDOR_REPUTATION=100; $BCONFN_SPAWN = 70; $BCONFD_SPAWN = 100; $BCONFN_MOBHP = 100; 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; } diff --git a/npc/functions/util.txt b/npc/functions/util.txt index a57162b5d..619abf2c9 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -968,7 +968,10 @@ function script POL_LocToTP { return TP_NIVAL; if (.@tw$ == "FROSTIA") - return TP_FROSTIA; + return TP_FROST; + + if (.@tw$ == "CANDOR") + return TP_CANDOR; return Exception("Invalid town requested / POL_LocToTP", RB_DEFAULT|RB_SPEECH, -1); } |