summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-05-25 15:31:10 +0000
committerJesusalva Jesusalva <jesusalva@tmw2.org>2024-05-25 15:31:10 +0000
commit35c16e998c81c75e78ae1b19ccf45b6d64e9995e (patch)
treea58ee0571194610f50572acc9458a2a9992bb27d
parentb022207cba222f1d66f9a418e55281f4144af193 (diff)
downloadserverdata-35c16e998c81c75e78ae1b19ccf45b6d64e9995e.tar.gz
serverdata-35c16e998c81c75e78ae1b19ccf45b6d64e9995e.tar.bz2
serverdata-35c16e998c81c75e78ae1b19ccf45b6d64e9995e.tar.xz
serverdata-35c16e998c81c75e78ae1b19ccf45b6d64e9995e.zip
Fix Paxel 2nd quest requirements.
Fixed: - ?? at cobalt herb - lack of -10000 Zeny. - merge strings to make translations easier No testing done * Move TakeMoney to bank.txt (I would personally prefer to keep it in clienversion) * Reword and localise takemoney message By jes's policy, info to player takes precedence. Its a good policy. * Jes prefers to keep grep keywords in uppercase (:: * debt collector * Shroud herb requirement in mystery as discussed in MR!130 * Fix Paxel 2nd quest requirements. Fixed: - ?? at cobalt herb - lack of -10000 Zeny. - merge strings to make translations easier **** Approved-by: Jesusalva Jesusalva <jesusalva@tmw2.org> Reviewed-by: Jesusalva Jesusalva <jesusalva@tmw2.org>
-rw-r--r--npc/017-1/paxel.txt29
-rw-r--r--npc/functions/bank.txt23
-rw-r--r--npc/functions/clientversion.txt4
3 files changed, 45 insertions, 11 deletions
diff --git a/npc/017-1/paxel.txt b/npc/017-1/paxel.txt
index 913f2c008..b238aac2b 100644
--- a/npc/017-1/paxel.txt
+++ b/npc/017-1/paxel.txt
@@ -95,12 +95,13 @@ L_Check1:
L_Ask2:
mesn;
- mesq l("I need a suitable base helmet, some herbs to use my magical dye, and gold:");
- mesc l("@@/1 @@", countitem(MinerHat), getitemlink(MinerHat));
- mesc l("@@/5 @@", countitem(GrassSeeds), getitemlink(GrassSeeds));
- mesc l("@@/100 @@", countitem(PinkAntenna), getitemlink(PinkAntenna));
- mesc l("@@/?? @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
- mesc l("@@/@@ GP", format_number(Zeny), format_number(10000));
+ // note: the ask for 70 is intentionally more than required.
+ mesq l("I need a suitable base helmet, around 70 herbs to use my magical dye, and gold:");
+ mesc l("%d/%d %s", countitem(MinerHat), 1, getitemlink(MinerHat));
+ mesc l("%d/%d %s", countitem(GrassSeeds), 5, getitemlink(GrassSeeds));
+ mesc l("%d/%d %s", countitem(PinkAntenna), 100, getitemlink(PinkAntenna));
+ mesc l("%d/?? %s", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mesc l("%s/%s GP", fnum(Zeny), fnum(10000));
menu
l("Please have a look, I have what you asked"), L_Check2,
@@ -112,8 +113,12 @@ L_Ask2:
// Arc 2: Prsm Helmet
// ----------------------------------------------------
L_Check2:
- if (countitem(PinkAntenna) < 100 || countitem(MinerHat) < 1 || countitem(GrassSeeds) < 5 || countitem(CobaltHerb) < 60)
+ if ( countitem(MinerHat) < 1
+ || countitem(GrassSeeds) < 5
+ || countitem(PinkAntenna) < 100
+ || countitem(CobaltHerb) < 70)
goto L_More_Needed2;
+
if (Zeny < 10000) {
mesn;
mesq l("You can't afford my work! Do some odd jobs and come back.");
@@ -121,16 +126,18 @@ L_Check2:
}
inventoryplace PrsmHelmet, 1;
+ delitem MinerHat, 1;
+ delitem GrassSeeds, 5;
delitem PinkAntenna, 100;
- delitem MinerHat, 1;
- delitem GrassSeeds, 5;
- delitem CobaltHerb, 60;
+ delitem CobaltHerb, 60;
//delitem TerraniteOre, 20;
+ Zeny -= 10000;
getexp 60000, 0;
getitem PrsmHelmet, 1;
setq SQuest_Paxel, 2;
mesn;
- mesq l("There you go, a special and rare @@!", getitemlink(PrsmHelmet));
+ mesq l("There you go, a special and rare %s plus some leftover herbs!",
+ getitemlink(PrsmHelmet));
close;
// ----------------------------------------------------
diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt
index 00ca148a9..d4c0d30ce 100644
--- a/npc/functions/bank.txt
+++ b/npc/functions/bank.txt
@@ -293,3 +293,26 @@ function script Banker {
close;
}
+
+// still_owed = TakeMoney (amount, reason)
+// This function is meant to be used from clientversion, when a quest failed
+// to take money from user.
+function script TakeMoney {
+ .@still_owed = getarg(0);
+ .@reason$ = getarg(1);
+
+ .@take = min(Zeny, .@still_owed);
+ Zeny -= .@take;
+ .@still_owed -= .@take;
+
+ .@take = min(BankVault, .@still_owed);
+ BankVault -= .@take;
+ .@still_owed -= .@take;
+
+ if (.@still_owed > 0)
+ consoleinfo("%s STILL OWES %s for %s.", strcharinfo(0), fnum(.@leftover), .@reason$);
+
+ dispbottom col(l("%s were deducted for %s", fnum(10000-.@leftover), .@reason$), 1);
+ return .@still_owed;
+}
+
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index 86692ea9b..91136a9b0 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -1211,6 +1211,10 @@ function script clientupdater {
// You were in Land of Fire Village? Fix coordinates
if (getmap() == "017-1")
slide 114, 97;
+
+ // Paxel was not taking the requested amount
+ if (getq(SQuest_Paxel) >= 2)
+ TakeMoney(10000, l("Paxel forgot to collect payment for Prsm helmet"));
}
// TODO: Anniversary (leap years disregarded)