summaryrefslogtreecommitdiff
path: root/npc/custom/events/disguise.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/custom/events/disguise.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/custom/events/disguise.txt')
-rw-r--r--npc/custom/events/disguise.txt10
1 files changed, 5 insertions, 5 deletions
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$;
}