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/re/cities/dewata.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'npc/re/cities/dewata.txt') 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; -- cgit v1.2.3-60-g2f50