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/re/jobs/3-2/royal_guard.txt | 6 +++--- npc/re/jobs/3-2/shadow_chaser.txt | 12 ++++++------ npc/re/jobs/3-2/wanderer.txt | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'npc/re/jobs/3-2') diff --git a/npc/re/jobs/3-2/royal_guard.txt b/npc/re/jobs/3-2/royal_guard.txt index 87cf554ad..8924d61dd 100644 --- a/npc/re/jobs/3-2/royal_guard.txt +++ b/npc/re/jobs/3-2/royal_guard.txt @@ -521,7 +521,7 @@ sec_in02,12,43,3 script sorcereryal 1_M_LIBRARYMASTER,1,1,{ switch(select("Royal Guard", "Rune Knight", "Sorcerer")) { case 1: mes "1~5"; - input .@input; + input(.@input); next; if (.@input < 1 || .@input > 5) { mes "Set item to adjust the Royal Guard"; @@ -533,7 +533,7 @@ sec_in02,12,43,3 script sorcereryal 1_M_LIBRARYMASTER,1,1,{ close; case 2: mes "1~24"; - input .@input; + input(.@input); next; if (.@input < 1 || .@input > 24) { mes "Set item to adjust the Rune Knight"; @@ -545,7 +545,7 @@ sec_in02,12,43,3 script sorcereryal 1_M_LIBRARYMASTER,1,1,{ close; case 3: mes "1~5"; - input .@input; + input(.@input); next; if (.@input < 1 || .@input > 5) { mes "Set item to adjust the Sorcerer"; diff --git a/npc/re/jobs/3-2/shadow_chaser.txt b/npc/re/jobs/3-2/shadow_chaser.txt index 9cdd3f732..3b6f6bcd0 100644 --- a/npc/re/jobs/3-2/shadow_chaser.txt +++ b/npc/re/jobs/3-2/shadow_chaser.txt @@ -327,7 +327,7 @@ s_atelier,65,123,5 script Manager#sc04_prt 4_M_KHKYEL,{ mes "Wow, you deciphered it?"; mes "So, what's the right answer?"; next; - input .@inputstr$; + input(.@inputstr$); if (.@inputstr$ == "shadows atelier in prontera" || .@inputstr$ == "SHADOWS ATELIER IN PRONTERA") { mes "[Manager]"; mes "Good."; @@ -1118,7 +1118,7 @@ L_Code: mes "["+strcharinfo(PC_NAME)+"]"; mes "Paul said..."; next; - input .@inputstr$; + input(.@inputstr$); mes "["+strcharinfo(PC_NAME)+"]"; mes "Paul said..."; mes "'"+.@inputstr$+"' ."; @@ -1694,7 +1694,7 @@ tur_dun03,38,209,1 script Blue Flame#sc_f01 4_NFWISP,{ mes "A blue flame is roaring."; mes "The deciphered code means..."; next; - input .@inputstr$; + input(.@inputstr$); .@dap01$ = "blue fire in turtle island third floor"; .@dap02$ = "BLUE FIRE IN TURTLE ISLAND THIRD FLOOR"; if (.@inputstr$ != .@dap01$ && .@inputstr$ != .@dap02$) { @@ -1986,7 +1986,7 @@ job3_sha01,22,78,0 script ????#keybox01 CLEAR_NPC,{ mes " "; mes "And also letters. They are blinking as if waiting for a code to be input."; next; - input .@inputstr$; + input(.@inputstr$); if (.@inputstr$ == .@Codes2$[.@i] || .@inputstr$ == strtolower(.@Codes2$[.@i])) { mes "When you put the correct answer in there,"; mes "the box is opened."; @@ -2042,7 +2042,7 @@ job3_sha01,25,28,0 script ????#keybox02 CLEAR_NPC,{ next; switch(select("Input the answer.", "I can't get it.")) { case 1: - input .@input; + input(.@input); if (.@input == .@numbers[.@i]) { mes "You put 2 and "+(.@numbers[.@i]-20)+"."; mes "The box opens and you get one key."; @@ -2122,7 +2122,7 @@ job3_sha01,73,80,0 script ????#keybox03 CLEAR_NPC,{ mes "There's no code, so 1 should be A."; mes "And the answer is..."; next; - input .@inputstr$; + input(.@inputstr$); if (.@inputstr$ == "turn and shake" || .@inputstr$ == "TURN AND SHAKE") { mes "["+strcharinfo(PC_NAME)+"]"; mes "Turn... Turn... and"; diff --git a/npc/re/jobs/3-2/wanderer.txt b/npc/re/jobs/3-2/wanderer.txt index 30449e2fa..e9c88032a 100644 --- a/npc/re/jobs/3-2/wanderer.txt +++ b/npc/re/jobs/3-2/wanderer.txt @@ -252,7 +252,7 @@ xmas,132,143,5 script Performance Manager#wnd 4_M_06,{ next; mes "[" + strcharinfo(PC_NAME) + "]"; mes "It's because..."; - input .@inputstr$; + input(.@inputstr$); mes "^3131FF" + .@inputstr$ + "^000000"; mes "......"; next; -- cgit v1.2.3-70-g09d2