From 371d056df80b6f83484534f64883c3d020c4112d Mon Sep 17 00:00:00 2001 From: Emistry Haoyan Date: Sun, 16 Jun 2019 18:44:45 +0800 Subject: Sanitize handling of the input() values. - avoid potential hacks for old scripts that use `input()` script commands. Signed-off-by: Haru --- npc/other/fortune.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'npc/other/fortune.txt') 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..."; -- cgit v1.2.3-60-g2f50