diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-06-16 18:44:45 +0800 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2019-07-28 18:17:09 +0200 |
commit | 371d056df80b6f83484534f64883c3d020c4112d (patch) | |
tree | 20d38a8581f3a6159157bfa6644027d4007485bc /npc/re/cities/mora.txt | |
parent | ef8bc3a8375d4fe9a5f75faf951b3deecb891d57 (diff) | |
download | hercules-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/cities/mora.txt')
-rw-r--r-- | npc/re/cities/mora.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/npc/re/cities/mora.txt b/npc/re/cities/mora.txt index a58ee4463..d3f5b6ed3 100644 --- a/npc/re/cities/mora.txt +++ b/npc/re/cities/mora.txt @@ -452,16 +452,18 @@ mora,140,186,3 script Raffle Philosopher 4_M_RAFLE_OLD,{ mes "You can pay me in the currencies listed below."; mes "Enter the sum you're willing to pay. Enter 0 if you don't want to pay anything."; next; - input .@input; + input(.@input); if (.@input == 0) { mes "[Raffle Philosopher]"; mes "So you don't want to hear a quote, eh?"; close; - } else if (.@input < 100 || .@input > 1000000) { + } + if (.@input < 100 || .@input > 1000000) { mes "[Raffle Philosopher]"; mes "You can pay between ^FF0000100 and 1000000^000000."; close; - } else if (Zeny < .@input) { + } + if (Zeny < .@input) { mes "[Raffle Philosopher]"; mes "So you think this is what my time is worth?"; close; @@ -908,7 +910,7 @@ mora,140,186,3 script Raffle Philosopher 4_M_RAFLE_OLD,{ mes "I wonder what you think"; mes "about what I've told you."; next; - input .@inputstr$; + input(.@inputstr$); mes "[Raffle Philosopher]"; mes "So you think that "+.@inputstr$+"."; next; @@ -1146,7 +1148,7 @@ mora,43,127,3 script Innkeeper#mora_inn 4_M_RAFLE_OR,{ close; } case 3: - input .@inputstr$; + input(.@inputstr$); mes "["+strcharinfo(PC_NAME)+"]"; mes "I come from a place called "+.@inputstr$+"."; next; |