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/cities/geffen.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/cities/geffen.txt')
-rw-r--r-- | npc/cities/geffen.txt | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/npc/cities/geffen.txt b/npc/cities/geffen.txt index 7f299dfa2..2bc972c70 100644 --- a/npc/cities/geffen.txt +++ b/npc/cities/geffen.txt @@ -274,8 +274,8 @@ OnTouch: mes "them at a time."; next; while(1) { - input .@input; - if (.@input == 0) { + input(.@input); + if (.@input <= 0) { mes "[Suspicious Guy]"; if (Sex == SEX_MALE) mes "Ah duuuuuude~ You're breakin' my heart! I mean, at these prices, I'm practically performing charity!"; @@ -283,14 +283,14 @@ OnTouch: mes "W-waaaait! You didn't let me tell you the part about how Red Potions help you lose and gain weight in all the right places! Waaaaait!"; close; } - else if (.@input > 100) { + if (.@input > 100) { mes "[Suspicious Guy]"; mes "Whoa..."; mes "I can't let you buy that many. I mean, it's not like, you know, there's a trace impurity in these Potions or anything like that..."; next; + continue; } - else - break; + break; } .@Red_potion_hap = .@input * 500; if (Zeny < .@Red_potion_hap) { @@ -344,8 +344,8 @@ OnTouch: mes "There's no way you can pass this up! Now, how many do you want?"; next; while(1) { - input .@input; - if (.@input == 0) { + input(.@input); + if (.@input <= 0) { mes "[Suspicious Guy]"; mes "Man, how many chances of a lifetime have you passed up? Man, I hope you win the lottery..."; mes "You'd probably"; @@ -353,14 +353,14 @@ OnTouch: close; } - else if (.@input > 100) { + if (.@input > 100) { mes "[Suspicious Guy]"; mes "Whoa!"; mes "I can't sell that many Daggers! That'll attract the Prontera Chiv--I mean, um, I was gonna donate some Daggers to... Hungry children?"; next; + continue; } - else - break; + break; } .@Main_gauche_hap = .@input * 9400; if (Zeny < .@Main_gauche_hap) { @@ -398,21 +398,21 @@ OnTouch: mes "Clearly, this is the deal of the century. So how many do you want?"; next; while(1) { - input .@input; - if (.@input == 0) { + input(.@input); + if (.@input <= 0) { mes "[Suspicious Guy]"; mes "Awww..."; mes "It wasn't because of the whole drawstrings thing, was it?"; close; } - else if (.@input > 100) { + if (.@input > 100) { mes "[Suspicious Guy]"; mes "Whoa~!"; mes "I can't sell you that many! What are you trying to do, take advantage of me?"; next; + continue; } - else - break; + break; } .@Hood__hap = .@input * 930; if (Zeny < .@Hood__hap) { |