summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/003-2/politics.txt6
-rw-r--r--npc/009-2/politics.txt6
-rw-r--r--npc/012-7/politics.txt6
-rw-r--r--npc/017-10/politics.txt6
-rw-r--r--npc/018-6-1/main.txt2
-rw-r--r--npc/020-7-1/politics.txt6
-rw-r--r--npc/024-11/politics.txt6
-rw-r--r--npc/functions/politics.txt117
8 files changed, 148 insertions, 7 deletions
diff --git a/npc/003-2/politics.txt b/npc/003-2/politics.txt
index 9603aef46..cb2b804a2 100644
--- a/npc/003-2/politics.txt
+++ b/npc/003-2/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $TULIM_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("TULIM");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("TULIM");
break;
default:
diff --git a/npc/009-2/politics.txt b/npc/009-2/politics.txt
index d848f3138..836b55013 100644
--- a/npc/009-2/politics.txt
+++ b/npc/009-2/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $HALIN_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("HALIN");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("HALIN");
break;
default:
diff --git a/npc/012-7/politics.txt b/npc/012-7/politics.txt
index 451f70adf..ff27d7f87 100644
--- a/npc/012-7/politics.txt
+++ b/npc/012-7/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $HURNS_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("HURNS");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("HURNS");
break;
default:
diff --git a/npc/017-10/politics.txt b/npc/017-10/politics.txt
index 744b03a86..5a04eae89 100644
--- a/npc/017-10/politics.txt
+++ b/npc/017-10/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $LOF_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("LOF");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("LOF");
break;
default:
diff --git a/npc/018-6-1/main.txt b/npc/018-6-1/main.txt
index 8e2c417fb..6f867089b 100644
--- a/npc/018-6-1/main.txt
+++ b/npc/018-6-1/main.txt
@@ -403,7 +403,7 @@ L_MainStory:
if (askyesno() == ASK_YES) {
mes "";
mesn l("Barbara, Wounded Girl");
- mesq l("It's true enough an @@ could heal even a dead tree, and would dispell almost every status ailment I could have.", getitemlink(ElixirOfLife));
+ mesq l("It's true enough an @@ could heal even a dead tree, and would dispel almost every status ailment I could have.", getitemlink(ElixirOfLife));
next;
mesn l("Barbara, Wounded Girl");
mesq l("But my case requires extended treatment. I need to be hospitalized. I'm afraid it is too late for the Elixir to have effect...");
diff --git a/npc/020-7-1/politics.txt b/npc/020-7-1/politics.txt
index a665c04ec..2653b84a5 100644
--- a/npc/020-7-1/politics.txt
+++ b/npc/020-7-1/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $NIVAL_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("NIVAL");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("NIVAL");
break;
default:
diff --git a/npc/024-11/politics.txt b/npc/024-11/politics.txt
index df755e651..ebeacddc4 100644
--- a/npc/024-11/politics.txt
+++ b/npc/024-11/politics.txt
@@ -17,6 +17,7 @@ do
next;
select
l("Information"),
+ rif(strcharinfo(0) == $FROSTIA_MAYOR$, l("Manage Town")),
rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
l("View Candidate List and cast a vote"),
l("[Quit]");
@@ -26,6 +27,9 @@ do
POL_Information();
break;
case 2:
+ POL_Manage("FROSTIA");
+ break;
+ case 3:
// array_push might be too sensible for getd/setd
if (Zeny < .applytax)
break;
@@ -37,7 +41,7 @@ do
mesc l("Application successful!"), 3;
next;
break;
- case 3:
+ case 4:
POL_Candidate("FROSTIA");
break;
default:
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 997cd3cf7..0b02aa0c5 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -236,3 +236,120 @@ function script POL_TownInfo {
}
+
+// Town Managment
+// POL_MANAGE( TOWNCODE )
+function script POL_TownInfo {
+ .@town$="$"+getarg(0);
+ .@MAYOR$=getd("$"+getarg(0)+"_MAYOR$");
+
+ if (strcharinfo(0) != .@MAYOR$)
+ return;
+
+ do
+ {
+ .@GP=getd("$"+getarg(0)+"_MONEY");
+ .@TX=getd("$"+getarg(0)+"_TAX");
+ .@EX=getd("$"+getarg(0)+"_EXPORT");
+ .@RP=getd("$"+getarg(0)+"_REPUTATION");
+
+ mesc l("Town Money: @@", .@GP), 2;
+ mesc l("Town Reputation: @@ | @@.@@%% Tax", .@RP, .@TX/100, .@TX%100), 2;
+ mesc l("Town Weekly Exports: @@", .@EX), 2;
+ next;
+ menuint
+ l("Nothing"), 0,
+ l("Invest in Exportations"), 10,
+ l("Invest in Reputation"), 20,
+ l("Raise city taxes"), 30,
+ l("Lower city taxes"), 35,
+ l("Resign"), 99;
+ mes "";
+ switch (@menuret) {
+ // Mark 10: Exports
+ case 10:
+ .@cost=.@EX/10;
+ mesc l("Investing in Exportations"), 3;
+ mesc l("You need @@ GP to make this investment.", .@cost);
+ if (.@GP < .@cost)
+ break;
+ mesc l("Are you sure?");
+ if (askyesno() == ASK_YES) {
+ .@GP=getd("$"+getarg(0)+"_MONEY");
+ setd(.@town$+"_MONEY", .@GP-.@cost);
+ setd(.@town$+"_EXPORT", .@EX+3);
+ mesc l("Investment executed"), 2;
+ next;
+ }
+ break;
+ // Mark 20: Reputation
+ case 20:
+ .@cost=.@RP*3;
+ mesc l("Investing in Reputation"), 3;
+ if (.@RP >= 100) {
+ mesc l("Reputation cannot go above 100!"), 1;
+ next;
+ break;
+ }
+ mesc l("You need @@ GP to make this investment.", .@cost);
+ if (.@GP < .@cost)
+ break;
+ mesc l("Are you sure?");
+ if (askyesno() == ASK_YES) {
+ .@GP=getd("$"+getarg(0)+"_MONEY");
+ setd(.@town$+"_MONEY", .@GP-.@cost);
+ setd(.@town$+"_REPUTATION", .@RP+1);
+ mesc l("Investment executed"), 2;
+ next;
+ }
+ break;
+ // Mark 30: TAXES
+ case 30:
+ .@cost=.@TX/10;
+ mesc l("Raising Taxes"), 3;
+ mesc l("You need @@ Reputation to make this investment.", .@cost);
+ mesc l("Taxes will raise in 0.01~0.03%, capped at 10%.");
+ if (.@RP < .@cost || .@TX >= 1000)
+ break;
+ mesc l("Are you sure?");
+ if (askyesno() == ASK_YES) {
+ setd(.@town$+"_REPUTATION", .@RP-.@cost);
+ setd(.@town$+"_TAX", .@TX+rand2(1,3));
+ mesc l("Taxes raised"), 1;
+ next;
+ }
+ break;
+ case 35:
+ .@cost=.@TX/30;
+ mesc l("Lowering Taxes"), 3;
+ mesc l("You will gain @@ Reputation.", .@cost);
+ mesc l("Taxes will fall in 0.01~0.03%, capped at 0.00%");
+ if (.@TX <= 0 || .@RP >= 100)
+ break;
+ mesc l("Are you sure?");
+ if (askyesno() == ASK_YES) {
+ setd(.@town$+"_TAX", max(0, .@TX-.@cost));
+ setd(.@town$+"_REPUTATION", min(100, .@RP+.@cost));
+ mesc l("Taxes raised"), 1;
+ next;
+ }
+ break;
+ // Mark 90: Office
+ case 99:
+ mesc l("Really resign?"), 1;
+ next;
+ if (askyesno() == ASK_YES) {
+ setd(.@town$+"_MAYOR$", any("Jesus Saves", "Saulc GM"));
+ mesc l("YOU HAVE RESIGNED THE OFFICE."), 1;
+ close;
+ }
+ default:
+ return;
+ }
+
+ // End script
+ } while (true);
+ return;
+}
+
+