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/quests/first_class/tu_sword.txt | 122 +++++++++++++++++------------------- 1 file changed, 59 insertions(+), 63 deletions(-) (limited to 'npc/quests/first_class') diff --git a/npc/quests/first_class/tu_sword.txt b/npc/quests/first_class/tu_sword.txt index fa4c0defb..5c847d7cc 100644 --- a/npc/quests/first_class/tu_sword.txt +++ b/npc/quests/first_class/tu_sword.txt @@ -1888,69 +1888,8 @@ geffen,154,143,3 script Dequ'ee 4_M_JOB_KNIGHT2,{ mes "from all the suspects? First,"; mes "tell me the code that Hans had."; next; - input .@inputstr$; - if(.@inputstr$ == .@hans$){ - mes "[Dequ'ee]"; - mes "victkleyundncem?"; - mes "That's certainly"; - mes "strange sounding."; - mes "Now, tell me Bankley's."; - next; - input .@inputstr$; - if(.@inputstr$ == .@bang$){ - mes "[Dequ'ee]"; - mes "hekdlfiDrindkelsd.."; - mes "What the hell is that...?"; - mes "It's certainly cryptic."; - mes "What about Muetro's?"; - next; - input .@inputstr$; - if(.@inputstr$ == .@mutr$){ - mes "[Dequ'ee]"; - mes "ConBanfoevidehi."; - mes "This is going to"; - mes "be tough to figure"; - mes "out. Alright, now"; - mes "tell me Geil's."; - next; - input .@inputstr$; - if(.@inputstr$ == .@geil$){ - mes "[Dequ'ee]"; - mes "TheisWesomeof..."; - mes "Alright, great."; - mes "Now all we have to"; - mes "do is figure out what"; - mes "all of this means."; - next; - mes "[Dequ'ee]"; - mes "This is going to"; - mes "be really difficult."; - mes "Do you have any ideas?"; - mes "We have to figure this"; - mes "out, it's the only clue"; - mes "that we have..."; - tu_swordman = 16; - changequest 8223,8224; - close; - } else { - mes "[Dequ'ee]"; - mes "...Are you sure that you heard"; - mes "him right? Why don't you go check it out again?"; - close; - } - } else { - mes "[Dequ'ee]"; - mes "...Are you sure that you heard"; - mes "him right? Why don't you go check it out again?"; - close; - } - } else { - mes "[Dequ'ee]"; - mes "...Are you sure that you heard"; - mes "him right? Why don't you go check it out again?"; - close; - } - } else { + input(.@inputstr$); + if(.@inputstr$ != .@hans$) { mes "[Dequ'ee]"; mes "Are you sure that's right?"; mes "No, no, I don't think it is."; @@ -1958,6 +1897,63 @@ geffen,154,143,3 script Dequ'ee 4_M_JOB_KNIGHT2,{ mes "if you need to?"; close; } + mes "[Dequ'ee]"; + mes "victkleyundncem?"; + mes "That's certainly"; + mes "strange sounding."; + mes "Now, tell me Bankley's."; + next; + input(.@inputstr$); + if(.@inputstr$ != .@bang$) { + mes "[Dequ'ee]"; + mes "...Are you sure that you heard"; + mes "him right? Why don't you go check it out again?"; + close; + } + mes "[Dequ'ee]"; + mes "hekdlfiDrindkelsd.."; + mes "What the hell is that...?"; + mes "It's certainly cryptic."; + mes "What about Muetro's?"; + next; + input(.@inputstr$); + if(.@inputstr$ != .@mutr$) { + mes "[Dequ'ee]"; + mes "...Are you sure that you heard"; + mes "him right? Why don't you go check it out again?"; + close; + } + mes "[Dequ'ee]"; + mes "ConBanfoevidehi."; + mes "This is going to"; + mes "be tough to figure"; + mes "out. Alright, now"; + mes "tell me Geil's."; + next; + input(.@inputstr$); + if(.@inputstr$ != .@geil$) { + mes "[Dequ'ee]"; + mes "...Are you sure that you heard"; + mes "him right? Why don't you go check it out again?"; + close; + } + mes "[Dequ'ee]"; + mes "TheisWesomeof..."; + mes "Alright, great."; + mes "Now all we have to"; + mes "do is figure out what"; + mes "all of this means."; + next; + mes "[Dequ'ee]"; + mes "This is going to"; + mes "be really difficult."; + mes "Do you have any ideas?"; + mes "We have to figure this"; + mes "out, it's the only clue"; + mes "that we have..."; + tu_swordman = 16; + changequest 8223,8224; + close; } if(tu_swordman == 14){ mes "[Dequ'ee]"; -- cgit v1.2.3-70-g09d2