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/dewata.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/dewata.txt')
-rw-r--r-- | npc/re/cities/dewata.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/npc/re/cities/dewata.txt b/npc/re/cities/dewata.txt index d8bac5986..70e60a274 100644 --- a/npc/re/cities/dewata.txt +++ b/npc/re/cities/dewata.txt @@ -489,11 +489,12 @@ dewata,89,191,6 script Small Shrine#dew1 CLEAR_NPC,{ mes "^FF00001,000 ~ 100,000 Zeny^000000"; mes "How much do you want to donate?"; next; - input .@input,0,100000; + input(.@input, 0, 100000); if (.@input < 1000) { mes "- Cancelled. -"; close; - } else if (.@input <= 50000) + } + if (.@input <= 50000) .@good_luck = rand(1,10000); else .@good_luck = rand(1,5000); @@ -557,7 +558,7 @@ dewata,89,191,6 script Small Shrine#dew1 CLEAR_NPC,{ case 2: mes "What is your wish?"; next; - input .@wish$; + input(.@wish$); mes "You have made your wish for ^0000FF" + .@wish$ + "^000000 to the small shrine."; next; callsub L_Wish; |