summaryrefslogtreecommitdiff
path: root/npc/pre-re/jobs/1-1/merchant.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/pre-re/jobs/1-1/merchant.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/pre-re/jobs/1-1/merchant.txt')
-rw-r--r--npc/pre-re/jobs/1-1/merchant.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/npc/pre-re/jobs/1-1/merchant.txt b/npc/pre-re/jobs/1-1/merchant.txt
index 2d1cd9ba3..b6ce65b3d 100644
--- a/npc/pre-re/jobs/1-1/merchant.txt
+++ b/npc/pre-re/jobs/1-1/merchant.txt
@@ -705,7 +705,7 @@ alberta_in,28,29,2 script Merchant Guildsman#mer 4_M_01,{
next;
while(1) {
while(1) {
- input .@input;
+ input(.@input);
if (.@input == 0) {
mes "[Union Staff Kay]";
mes "Are you sure that you wanna cancel?";
@@ -714,14 +714,15 @@ alberta_in,28,29,2 script Merchant Guildsman#mer 4_M_01,{
close;
}
next;
+ continue;
}
- else if (.@input < 1000000 || .@input > 5000000) {
+ if (.@input < 1000000 || .@input > 5000000) {
mes "[Union Staff Kay]";
mes "Hey hey. That number's not valid! Enter a value from 1000000 to 5000000. got it?";
next;
- } else {
- break;
+ continue;
}
+ break;
}
mes "[Union Staff Kay]";
if (.@where_village == 1)