summaryrefslogtreecommitdiff
path: root/npc/009-2
diff options
context:
space:
mode:
Diffstat (limited to 'npc/009-2')
-rw-r--r--npc/009-2/_import.txt1
-rw-r--r--npc/009-2/politics.txt53
2 files changed, 54 insertions, 0 deletions
diff --git a/npc/009-2/_import.txt b/npc/009-2/_import.txt
index 87b9801a2..2d0238fa2 100644
--- a/npc/009-2/_import.txt
+++ b/npc/009-2/_import.txt
@@ -2,5 +2,6 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/009-2/_warps.txt",
"npc/009-2/librarian.txt",
+"npc/009-2/politics.txt",
"npc/009-2/ryan.txt",
"npc/009-2/scholar.txt",
diff --git a/npc/009-2/politics.txt b/npc/009-2/politics.txt
new file mode 100644
index 000000000..4dc910226
--- /dev/null
+++ b/npc/009-2/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
+
+009-2,66,63,0 script Halinarzo Office NPC_POLITICS,{
+do
+{
+ mesc ".:: "+l("Halinarzo Townhall")+" ::.", 2;
+ mesc l("Current Town Administrator: ")+$HALIN_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;
+ $HALIN_MONEY+=.applytax;
+ #POL_APPLYWEEK=gettimeparam(GETTIME_WEEKDAY);
+ array_push($HALIN_CANDIDATE$, strcharinfo(0));
+ array_push($HALIN_VOTES, 0);
+ mesc l("Application successful!"), 3;
+ next;
+ break;
+ case 3:
+ POL_Candidate("HALIN");
+ break;
+ default:
+ close;
+ }
+} while (true);
+end;
+
+OnInit:
+ .applytax=50;
+ .distance=4;
+ end;
+}
+