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/custom/events/disguise.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'npc/custom/events/disguise.txt') diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt index fde5e544a..37f8a4f99 100644 --- a/npc/custom/events/disguise.txt +++ b/npc/custom/events/disguise.txt @@ -67,7 +67,7 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ mes "Input the number of rounds you want the event to last."; mes "Current number: [^0000FF"+.Rounds+"^000000]"; next; - input .@Rounds; + input(.@Rounds, 0); set .Rounds,.@Rounds; mes .@n$; mes "The number of rounds has been changed to "+.Rounds+"."; @@ -77,7 +77,7 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ mes "Input the Item ID of the prize given each round."; mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")"; next; - input .@Prize; + input(.@Prize, 0); mes .@n$; if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") { mes "That item does not exist. Please try again."; @@ -86,11 +86,11 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ set .Prize,.@Prize; mes "Input the amount to be given."; next; - input .@amount; + input(.@amount); mes .@n$; - if (.@amount<=0 || .@amount>=10000) { + if (.@amount <= 0 || .@amount >= 10000) { mes "That amount is invalid. Using default ammount of 1."; - set .@amount,1; + .@amount = 1; next; mes .@n$; } -- cgit v1.2.3-60-g2f50