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/other/fortune.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/other/fortune.txt')
-rw-r--r-- | npc/other/fortune.txt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/npc/other/fortune.txt b/npc/other/fortune.txt index 23d65e88f..c3bec40f3 100644 --- a/npc/other/fortune.txt +++ b/npc/other/fortune.txt @@ -57,23 +57,21 @@ payon_in03,117,128,5 script Fortune Teller 4_M_BIBI,{ mes "Then..."; mes "Please pay your fee with all of your sincerity."; next; - input .@input; - if (.@input == 0) { + input(.@input); + if (.@input <= 0) { mes "[Lhimetorra]"; mes "Ah...?!"; mes "You have angered the monster spirits!"; close; } - else if (.@input > Zeny) { + if (.@input > Zeny) { mes "[Lhimetorra]"; mes "There's no need to overdo it. Just give with all your heart... *Tsk tsk*"; close; } - else { - mes "[Lhimetorra]"; - mes "I accept your heart and your devotion with my gratitude. Thoughts are more important than the amount when paying a fortune teller."; - Zeny -= .@input; - } + mes "[Lhimetorra]"; + mes "I accept your heart and your devotion with my gratitude. Thoughts are more important than the amount when paying a fortune teller."; + Zeny -= .@input; next; mes "[Lhimetorra]"; mes "Then, I will begin to tell the fortune of your wish. Concentrate on yourself..."; |