summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/debug-preset.txt2
-rw-r--r--npc/commands/debug.txt2
-rw-r--r--npc/commands/zeny.txt24
3 files changed, 14 insertions, 14 deletions
diff --git a/npc/commands/debug-preset.txt b/npc/commands/debug-preset.txt
index 59cda9f2..a0112e58 100644
--- a/npc/commands/debug-preset.txt
+++ b/npc/commands/debug-preset.txt
@@ -217,7 +217,7 @@ function script DoRoutine {
break;
case 122: /* z => zeny */
Zeny = parsev(Zeny, .@args$[0], 0, 0x7FFFFFFE);
- #MerchantBank = parsev(#MerchantBank, .@args$[1], 0, 0x7FFFFFFF);
+ BankVault = parsev(BankVault, .@args$[1], 0, MAX_BANK_ZENY);
break;
}
}
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index fc352bd2..193abb5b 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -10,7 +10,7 @@ function script GlobalDebugMenu {
closedialog;
doevent "::OnGlobalQuestReset"; // executes in all quest npcs // FIXME: maybe have a `resetquest` buildin?
Zeny = 0;
- #MerchantBank = 0;
+ BankVault = 0;
clearitem;
warp "000-0", 0, 0; // starting point
end; // script must end for doevent to execute
diff --git a/npc/commands/zeny.txt b/npc/commands/zeny.txt
index ff323465..3dd9b4c3 100644
--- a/npc/commands/zeny.txt
+++ b/npc/commands/zeny.txt
@@ -25,15 +25,15 @@ OnCall:
Zeny = 0;
if (.@delta$ == "---")
{
- #MerchantBank = 0;
+ BankVault = 0;
}
}
else if (debug && (startswith(.@delta$, "++") || .@delta$ == ""))
{
- Zeny = 0x7FFFFFFE;
+ Zeny = MAX_ZENY;
if (.@delta$ == "+++")
{
- #MerchantBank = 0x7FFFFFFF;
+ BankVault = MAX_BANK_ZENY;
}
}
else
@@ -45,14 +45,14 @@ OnCall:
if (.@a < 0) // If we can't remove that much zeny, try removing from bank too
{
Zeny = 0;
- .@b = #MerchantBank + .@a; // amount remaining in bank after
+ .@b = BankVault + .@a; // amount remaining in bank after
if (.@b < 0)
{
- #MerchantBank = 0;
+ BankVault = 0;
}
else
{
- #MerchantBank += .@a;
+ BankVault += .@a;
}
}
else // We can remove that much zeny
@@ -63,18 +63,18 @@ OnCall:
else
{
.@a = Zeny + .@d; // The amount of zeny after
- if (.@a < 0 || .@a >= 0x7FFFFFFE) // If we can't add that much zeny, try adding to bank
+ if (.@a < 0 || .@a >= MAX_ZENY) // If we can't add that much zeny, try adding to bank
{
.@c = .@d - (.@a - Zeny); // the amount to put in bank
- Zeny = 0x7FFFFFFE;
- .@b = #MerchantBank + .@c; // amout in bank after
- if (.@b < 0 || .@b == 0x7FFFFFFF)
+ Zeny = MAX_ZENY;
+ .@b = BankVault + .@c; // amout in bank after
+ if (.@b < 0 || .@b == MAX_BANK_ZENY)
{
- #MerchantBank = 0x7FFFFFFF;
+ BankVault = MAX_BANK_ZENY;
}
else
{
- #MerchantBank += .@c;
+ BankVault += .@c;
}
}
else // We can add that much zeny