summaryrefslogtreecommitdiff
path: root/npc/020-7-1
diff options
context:
space:
mode:
Diffstat (limited to 'npc/020-7-1')
-rw-r--r--npc/020-7-1/_import.txt1
-rw-r--r--npc/020-7-1/politics.txt53
2 files changed, 54 insertions, 0 deletions
diff --git a/npc/020-7-1/_import.txt b/npc/020-7-1/_import.txt
index 71132d44e..b41683ea4 100644
--- a/npc/020-7-1/_import.txt
+++ b/npc/020-7-1/_import.txt
@@ -13,6 +13,7 @@
"npc/020-7-1/nea.txt",
"npc/020-7-1/oskari.txt",
"npc/020-7-1/peetu.txt",
+"npc/020-7-1/politics.txt",
"npc/020-7-1/pyry.txt",
"npc/020-7-1/sage.txt",
"npc/020-7-1/santeri.txt",
diff --git a/npc/020-7-1/politics.txt b/npc/020-7-1/politics.txt
new file mode 100644
index 000000000..1f29c9c3d
--- /dev/null
+++ b/npc/020-7-1/politics.txt
@@ -0,0 +1,53 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Town Administrator file, see npc/functions/politics.txt
+// User variables:
+// #POL_APPLYWEEK = Week of last application
+// #POL_VOTEDAY = Day of last vote
+
+012-7,37,61,0 script Nivalis Office NPC_POLITICS,{
+do
+{
+ mesc ".:: "+l("Nivalis Townhall")+" ::.", 2;
+ mesc l("Current Town Administrator: ")+$NIVAL_MAYOR$, 3;
+ mesc l("Application fee: @@ GP", .applytax);
+ next;
+ select
+ l("Information"),
+ rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
+ l("View Candidate List and cast a vote"),
+ l("[Quit]");
+
+ switch (@menu) {
+ case 1:
+ POL_Information();
+ break;
+ case 2:
+ // array_push might be too sensible for getd/setd
+ if (Zeny < .applytax)
+ break;
+ Zeny-=.applytax;
+ $NIVAL_MONEY+=.applytax;
+ #POL_APPLYWEEK=gettimeparam(GETTIME_WEEKDAY);
+ array_push($NIVAL_CANDIDATE$, strcharinfo(0));
+ array_push($NIVAL_VOTES, 0);
+ mesc l("Application successful!"), 3;
+ next;
+ break;
+ case 3:
+ POL_Candidate("NIVAL");
+ break;
+ default:
+ close;
+ }
+} while (true);
+end;
+
+OnInit:
+ .applytax=50;
+ .distance=4;
+ end;
+}
+