summaryrefslogtreecommitdiff
path: root/npc/events/halloween_2006.txt
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-06-16 18:44:45 +0800
committerHaru <haru@dotalux.com>2019-07-28 18:17:09 +0200
commit371d056df80b6f83484534f64883c3d020c4112d (patch)
tree20d38a8581f3a6159157bfa6644027d4007485bc /npc/events/halloween_2006.txt
parentef8bc3a8375d4fe9a5f75faf951b3deecb891d57 (diff)
downloadhercules-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/events/halloween_2006.txt')
-rw-r--r--npc/events/halloween_2006.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/events/halloween_2006.txt b/npc/events/halloween_2006.txt
index 940ffe30a..6f954c299 100644
--- a/npc/events/halloween_2006.txt
+++ b/npc/events/halloween_2006.txt
@@ -614,20 +614,20 @@ nif_fild01,165,115,3 script Chicken Masta#06_hw 4_M_NFDEADMAN2,{
mes "And maximum 3 is all you can get.";
next;
while(1) {
- input .@input;
- if (.@input == 0) {
+ input(.@input);
+ if (.@input <= 0) {
mes "[Chicken Masta]";
mes "You don't have to buy it, if you don't need it.";
close;
}
- else if (@input > 3) {
+ if (@input > 3) {
mes "[Chicken Masta]";
mes "What did I tell you.";
mes "I'm going to sell only three eggs.";
next;
+ continue;
}
- else
- break;
+ break;
}
.@hw_egg = .@input * 1000;
if (Zeny < @hw_egg) {
@@ -666,7 +666,7 @@ nif_fild01,167,113,3 script Masta's chicken#06_hw01 4_NFCOCK,{
mes "Oh, this must be Chicken Masta's chicken.";
mes "I should insert the magic word.";
next;
- input .@inputstr$;
+ input(.@inputstr$);
if( .@inputstr$ == "Return" ) {
emotion e_omg;
specialeffect EF_TELEPORTATION;