From 39390c8538825e15a00714fe4948ccc4170c313c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Sep 2019 21:11:02 -0300 Subject: Report town stats to town admin (money, tax, exports, reputation) --- npc/functions/politics.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'npc/functions') diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 5679efa82..70fc08941 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -219,4 +219,20 @@ function script POL_Candidate { } +// Town info +// POL_TownInfo( TOWNCODE ) +function script POL_TownInfo { + .@MAYOR$=getd("$"+getarg(0)+"_MAYOR$"); + .@GP=getd("$"+getarg(0)+"_MONEY"); + .@TX=getd("$"+getarg(0)+"_TAX"); + .@EX=getd("$"+getarg(0)+"_EXPORT"); + .@RP=getd("$"+getarg(0)+"_REPUTATION"); + if (strcharinfo(0) == .@MAYOR$) { + mesc l("Town Money: @@", .@GP), 2; + mesc l("Town Reputation: @@ | @@.@@%% Tax", .@RP, .@TX/100, .@TX%100), 2; + mesc l("Town Weekly Exports: @@", .@EX), 2; + } + return; +} + -- cgit v1.2.3-70-g09d2