summaryrefslogtreecommitdiff
path: root/npc/re/quests/eden
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/re/quests/eden
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/re/quests/eden')
-rw-r--r--npc/re/quests/eden/eden_common.txt10
-rw-r--r--npc/re/quests/eden/eden_iro.txt14
-rw-r--r--npc/re/quests/eden/eden_quests.txt2
-rw-r--r--npc/re/quests/eden/eden_tutorial.txt2
4 files changed, 15 insertions, 13 deletions
diff --git a/npc/re/quests/eden/eden_common.txt b/npc/re/quests/eden/eden_common.txt
index 9085cad91..156ff1cc0 100644
--- a/npc/re/quests/eden/eden_common.txt
+++ b/npc/re/quests/eden/eden_common.txt
@@ -96,7 +96,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{
case 1:
mes "[Lime Evenor]";
mes "Aright. Excellent! Please write down your name here.";
- input .@input$;
+ input(.@input$);
next;
mes "[Lime Evenor]";
mes "Are you done?";
@@ -113,7 +113,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{
next;
mes "[Lime Evenor]";
mes "Would you please write your name again? Please write it ^3131FFClearly^000000.";
- input .@input$;
+ input(.@input$);
next;
mes "[Lime Evenor]";
mes "Ah~ ha. You are ^3131FF"+strcharinfo(PC_NAME)+"^000000.";
@@ -148,7 +148,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{
if(select("Yes, I want to register.", "No, I don't.") == 1) {
mes "[Lime Evenor]";
mes "Alrigh. Please write down your name on it.";
- input .@input$;
+ input(.@input$);
next;
mes "[Lime Evenor]";
mes "^3131FF"+strcharinfo(PC_NAME)+"^000000.. Is that your name?";
@@ -157,7 +157,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{
mes "[Lime Evenor]";
mes "^3131FF"+strcharinfo(PC_NAME)+"^000000, tell me what you want to register. for";
mes "Which map should we go to?";
- input .@input$;
+ input(.@input$);
next;
mes "[Lime Evenor]";
mes "^3131FFMission Map: "+.@inputstr$+"^000000";
@@ -166,7 +166,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{
mes "[Lime Evenor]";
mes "Please let me know what kind of missions your are lookng for.";
mes "It should be briefly like 'Hunt 10 Porings.'";
- input .@input$;
+ input(.@input$);
next;
mes "[Lime Evenor]";
mes "Are you done?";
diff --git a/npc/re/quests/eden/eden_iro.txt b/npc/re/quests/eden/eden_iro.txt
index aae9a5566..3e5ae39fe 100644
--- a/npc/re/quests/eden/eden_iro.txt
+++ b/npc/re/quests/eden/eden_iro.txt
@@ -142,7 +142,7 @@ moc_para01,166,51,3 script Phelix#edco 4_M_03,{
mes "[Phelix]";
mes "How many do you want?";
mes "^ff0000You have enough for up to " + .@available + " Carrots.^000000";
- input .@input;
+ input(.@input);
next;
if (.@input < 1 || .@input > 10000) {
mes "[Phelix]";
@@ -321,12 +321,13 @@ moc_para01,50,39,4 script Eve Natalia 4_F_SITDOWN,{
mes "So do you want to trade the 1st one in your inventory for ^00CC00"+.@amount+" Random Safe to 7 Certificates^000000?";
mes "Tell me '1' if you do, or '0' to cancel.";
next;
- input .@input;
+ input(.@input);
if (.@input < 0 || .@input > 1) {
mes "[Eve Natalia]";
mes "It is a 0 or 1, it can't be that difficult.";
close;
- } else if (.@input == 0) {
+ }
+ if (.@input == 0) {
mes "[Eve Natalia]";
mes "It's best to be sure before trading, have a good day.";
close;
@@ -417,12 +418,13 @@ L_Exchange:
mes "I can give you up to 60.";
mes "Type 0 to cancel.";
next;
- input .@amount;
- if (.@amount == 0) {
+ input(.@amount);
+ if (.@amount <= 0) {
mes "[Trader Machine]";
mes "Cancelled.";
close;
- } else if (.@amount < 0 || .@amount > 60) {
+ }
+ if (.@amount > 60) {
mes "[Trader Machine]";
mes "I said only 60 max.";
close;
diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt
index a0f4fa922..6186fa018 100644
--- a/npc/re/quests/eden/eden_quests.txt
+++ b/npc/re/quests/eden/eden_quests.txt
@@ -4302,7 +4302,7 @@ sec_in02,25,33,4 script Assistant#para_suvquest 4_M_BABYCAT,{
.@var = select("para_suv01", "para_suv02");
mes "Enter the modified value";
next;
- input .@input,0,9999;
+ input(.@input, 0, 9999);
mes "Value of para_suv0"+.@var+" has been changed to "+.@input+".";
setd "para_suv0"+.@var,.@input;
close;
diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt
index 188bc514a..d544aeb0b 100644
--- a/npc/re/quests/eden/eden_tutorial.txt
+++ b/npc/re/quests/eden/eden_tutorial.txt
@@ -319,7 +319,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
mes "if you really checked it?";
mes "Write down what material I asked you to get.";
next;
- input .@inputstr$;
+ input(.@inputstr$);
if (.@inputstr$ == "10 Jellopy") {
mes "[Tutorial Instructor]";
mes "Good, you know.";