summaryrefslogtreecommitdiff
path: root/npc/012-7
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-31 17:50:20 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-31 17:50:20 -0300
commitb78616340e2421bc9c53f6ceabdc26acd369c94f (patch)
treec15b2cbf37734591740bbd9ba3d4836e199b3f78 /npc/012-7
parent7367e3a18b94e80e9f6e8a712fd1179bac367fa6 (diff)
downloadserverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.gz
serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.bz2
serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.tar.xz
serverdata-b78616340e2421bc9c53f6ceabdc26acd369c94f.zip
This is the basic for political system to work on HURNSCALD (alpha)
Diffstat (limited to 'npc/012-7')
-rw-r--r--npc/012-7/_import.txt1
-rw-r--r--npc/012-7/politics.txt52
2 files changed, 53 insertions, 0 deletions
diff --git a/npc/012-7/_import.txt b/npc/012-7/_import.txt
index e02dd58c7..d0177ddd3 100644
--- a/npc/012-7/_import.txt
+++ b/npc/012-7/_import.txt
@@ -3,3 +3,4 @@
"npc/012-7/_warps.txt",
"npc/012-7/airlia.txt",
"npc/012-7/celestia.txt",
+"npc/012-7/politics.txt",
diff --git a/npc/012-7/politics.txt b/npc/012-7/politics.txt
new file mode 100644
index 000000000..3c97546dd
--- /dev/null
+++ b/npc/012-7/politics.txt
@@ -0,0 +1,52 @@
+// 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,51,60,0 script Hurnscald Office NPC_POLITICS,{
+do
+{
+ mesc ".:: "+l("Hurnscald Townhall")+" ::.", 2;
+ mesc l("Current Town Administrator: ")+$HURNS_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;
+ $HURNS_MONEY+=.applytax;
+ #POL_APPLYWEEK=gettimeparam(GETTIME_WEEKDAY);
+ array_push($HURNS_CANDIDATE$, strcharinfo(0));
+ array_push($HURNS_VOTES, 0);
+ mesc l("Application successful!"), 3;
+ break;
+ case 3:
+ POL_Candidate("HURNS");
+ break;
+ default:
+ close;
+ }
+} while (True);
+end;
+
+OnInit:
+ .applytax=50;
+ .distance=4;
+ end;
+}
+