summaryrefslogtreecommitdiff
path: root/npc/re/merchants/3rd_trader.txt
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-06-16 18:44:45 +0800
committerHaru <haru@dotalux.com>2019-07-28 18:17:09 +0200
commit371d056df80b6f83484534f64883c3d020c4112d (patch)
tree20d38a8581f3a6159157bfa6644027d4007485bc /npc/re/merchants/3rd_trader.txt
parentef8bc3a8375d4fe9a5f75faf951b3deecb891d57 (diff)
downloadhercules-371d056df80b6f83484534f64883c3d020c4112d.tar.gz
hercules-371d056df80b6f83484534f64883c3d020c4112d.tar.bz2
hercules-371d056df80b6f83484534f64883c3d020c4112d.tar.xz
hercules-371d056df80b6f83484534f64883c3d020c4112d.zip
Sanitize handling of the input() values.
- avoid potential hacks for old scripts that use `input()` script commands. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/re/merchants/3rd_trader.txt')
-rw-r--r--npc/re/merchants/3rd_trader.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/npc/re/merchants/3rd_trader.txt b/npc/re/merchants/3rd_trader.txt
index dcf66a19f..ecfe34fba 100644
--- a/npc/re/merchants/3rd_trader.txt
+++ b/npc/re/merchants/3rd_trader.txt
@@ -72,8 +72,8 @@
mes "You can only buy a maximum of '"+.@max+"' ea.";
mes "Enter '0' if you want to cancel.";
next;
- input .@amount;
- if (.@amount == 0) {
+ input(.@amount);
+ if (.@amount <= 0) {
mes "[Poison Herb Merchant]";
mes "You've cancelled the trade.";
close;
@@ -133,8 +133,8 @@ lhz_in02,16,205,4 duplicate(phs) Poison Herb Merchant#lhz 4_F_YUNYANG
mes "and remember, you can only";
mes "buy a maximum of '2000' ea.";
next;
- input .@amount;
- if (.@amount == 0) {
+ input(.@amount);
+ if (.@amount <= 0) {
mes "[Rune Merchant]";
mes "You're not buying? Please leave!";
close;
@@ -199,8 +199,8 @@ job3_guil01,91,93,3 script Rare Herb Collector 1_M_03,{
mes "You can only buy a maximum of '2000' ea.";
mes "Enter '0' if you want to cancel.";
next;
- input .@amount;
- if (.@amount == 0) {
+ input(.@amount);
+ if (.@amount <= 0) {
mes "[Rare Poison Herb Collector]";
mes "You've cancelled the trade.";
close;
@@ -254,9 +254,9 @@ job3_guil01,91,93,3 script Rare Herb Collector 1_M_03,{
mes "How many do you want?";
mes "If you want to cancel, enter 0.";
next;
- input .@amount;
+ input(.@amount);
mes "[Point Merchant]";
- if (.@amount == 0) {
+ if (.@amount <= 0) {
mes "You've cancelled the trade.";
close;
}