Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum value of *input script command. #2494

Merged
merged 1 commit into from Jul 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
92 changes: 45 additions & 47 deletions npc/airports/airships.txt
Expand Up @@ -491,9 +491,8 @@ airplane,50,66,5 script Apple Merchant#airplane 4_M_04,{
" '0' to cancel your order.");
next;
while (1) {
input .@input;
.@pay = .@input * 15;
if (.@input == 0) {
input(.@input);
if (.@input <= 0) {
mes("[Fruitz]");
mes("Thanks for stopping\r"
"by my shop. Farewell!");
Expand All @@ -502,33 +501,33 @@ airplane,50,66,5 script Apple Merchant#airplane 4_M_04,{
"Apple to snack on~");
close;
}
else if (.@input < 1 || .@input > 500) {
if (.@input > 500) {
mes("[Fruitz]");
mes("You've entered a number\r"
"higher than the maximum\r"
"value of 500. Please enter\r"
"the number of Apples you\r"
"wish to purchase again.");
next;
continue;
}
else {
.@pay = .@input * 15;
mes("[Fruitz]");
mesf("A total of ^FF0000%d^000000 Apples\r"
"will cost you ^FF0000%d Zeny^000000.",
.@input, .@pay);
mes("Would you like to continue?");
next;
if (select("Yes", "No") == 2) {
mes("[Fruitz]");
mesf("A total of ^FF0000%d^000000 Apples\r"
"will cost you ^FF0000%d Zeny^000000.",
.@input, .@pay);
mes("Would you like to continue?");
next;
if (select("Yes", "No") == 2) {
mes("[Fruitz]");
mes("Thanks for stopping\r"
"by my shop. Farewell!");
mes("Come by anytime when\r"
"you feel like having an\r"
"Apple to snack on~");
close;
}
break;
mes("Thanks for stopping\r"
"by my shop. Farewell!");
mes("Come by anytime when\r"
"you feel like having an\r"
"Apple to snack on~");
close;
}
break;
}
if (Zeny < .@pay) {
mes("[Fruitz]");
Expand Down Expand Up @@ -853,44 +852,43 @@ airplane_01,50,66,5 script Apple Merchant#air01 4_M_04,{
"'0' to cancel your order.");
next;
while (1) {
input .@input;
.@pay = .@input * 15;
if (.@input == 0) {
input(.@input);
if (.@input <= 0) {
mes("[Meltz]");
mes("Thanks for stopping\r"
"by my shop. Farewell!");
mes("Come by anytime when\r"
"you feel like having an\r"
"Apple to snack on~");
close;
close();
}
else if (.@input < 1 || .@input > 500) {
if (.@input > 500) {
mes("[Meltz]");
mes("You've entered a number\r"
"higher than the maximum\r"
"value of 500. Please enter\r"
"the number of Apples you\r"
"wish to purchase again.");
next;
next();
continue;
}
else {
.@pay = .@input * 15;
mes("[Meltz]");
mesf("A total of ^FF0000%d^000000 Apples\r"
"will cost you ^FF0000%d Zeny^000000.",
.@input, .@pay);
mes("Would you like to continue?");
next;
if (select("Yes", "No") == 2) {
mes("[Meltz]");
mesf("A total of ^FF0000%d^000000 Apples\r"
"will cost you ^FF0000%d Zeny^000000.",
.@input, .@pay);
mes("Would you like to continue?");
next;
if (select("Yes", "No") == 2) {
mes("[Meltz]");
mes("Thanks for stopping\r"
"by my shop. Farewell!");
mes("Come by anytime when\r"
"you feel like having an\r"
"Apple to snack on~");
close;
}
break;
mes("Thanks for stopping\r"
"by my shop. Farewell!");
mes("Come by anytime when\r"
"you feel like having an\r"
"Apple to snack on~");
close;
}
break;
}
if (Zeny < .@pay) {
mes("[Meltz]");
Expand Down Expand Up @@ -1150,15 +1148,15 @@ airplane_01,32,61,4 script Nils#ein 1_M_03,1,1,{
mes(.@line1_3$[.@wordtest]);
.@start_time = gettime(GETTIME_HOUR)*60*60 + gettime(GETTIME_MINUTE)*60 + gettime(GETTIME_SECOND);
next;
input .@save1$;
input(.@save1$);
.@end_time = gettime(GETTIME_HOUR)*60*60 + gettime(GETTIME_MINUTE)*60 + gettime(GETTIME_SECOND);
.@total_time = .@end_time - .@start_time;
mes("[Nils]");
mes(.@line2_1$[.@wordtest]);
mes(.@line2_2$[.@wordtest]);
.@start_time = gettime(GETTIME_HOUR)*60*60 + gettime(GETTIME_MINUTE)*60 + gettime(GETTIME_SECOND);
next;
input .@save2$;
input(.@save2$);
.@end_time = gettime(GETTIME_HOUR)*60*60 + gettime(GETTIME_MINUTE)*60 + gettime(GETTIME_SECOND);
.@total_time = .@total_time + (.@start_time - .@end_time);
.@tasoo = (.@letters[.@wordtest] / .@total_time) * 6;
Expand Down Expand Up @@ -1329,15 +1327,15 @@ function script applegamble {
"to cancel, please enter '0'.");
next;
while(1) {
input .@amount;
if (.@amount == 0) {
input(.@amount);
if (.@amount <= 0) {
mes(.@n$);
mes("Changed your mind?");
mes("I understand. Well then,\r"
"I hope we can play sometime.");
close;
}
else if (.@amount < 1 || .@amount > 50) {
if (.@amount > 50) {
mes(.@n$);
mes("You can't bet more than\r"
"50 Apples. Remember, we\r"
Expand Down
6 changes: 3 additions & 3 deletions npc/cities/alberta.txt
Expand Up @@ -347,7 +347,7 @@ alberta,190,173,4 script Phelix 4_M_03,{
mes "[Phelix]";
mes "I'm not giving you more then 100 at a time so don't bother, OK? If you don't want any, just say '0'.";
mes "Right now, the most you can get is " + .@max + " but remember, 100 at most, you want to break my back?.";
input .@amount;
input(.@amount);
next;
mes "[Phelix]";
if (.@amount <= 0) {
Expand Down Expand Up @@ -396,10 +396,10 @@ alberta,190,173,4 script Phelix 4_M_03,{
case 2:
mes "[Phelix]";
mes "Right I'm not giving you more then 100 at a time so don't bother, okay? If you don't want any, just say '0'.";
input .@amount;
input(.@amount);
next;
mes "[Phelix]";
if (.@amount == 0) {
if (.@amount <= 0) {
mes "Alright then, see you next time.";
close;
}
Expand Down
8 changes: 5 additions & 3 deletions npc/cities/aldebaran.txt
Expand Up @@ -1200,8 +1200,9 @@ function script F_Lottery {
mes "[Kafra]";
mes "How many times do you want the Lottery Machine to spin? You can choose up to 5 times.";
next;
input @input;
if(@input < 1 || @input > 5) @input = rand(1,5); //Lupus's fix
input(@input);
if (@input < 1 || @input > 5)
@input = rand(1,5); // Lupus's fix
callsub sF_Spin;
mes "[Kafra]";
mes "Ok~ Let me check the results~ guess what it is?";
Expand Down Expand Up @@ -1274,7 +1275,8 @@ sF_Spin:
next;
@temp = rand(10);
--@input;
if(@input <= 0) return;
if (@input <= 0)
return;
}
}

Expand Down
30 changes: 15 additions & 15 deletions npc/cities/geffen.txt
Expand Up @@ -274,23 +274,23 @@ OnTouch:
mes "them at a time.";
next;
while(1) {
input .@input;
if (.@input == 0) {
input(.@input);
if (.@input <= 0) {
mes "[Suspicious Guy]";
if (Sex == SEX_MALE)
mes "Ah duuuuuude~ You're breakin' my heart! I mean, at these prices, I'm practically performing charity!";
else
mes "W-waaaait! You didn't let me tell you the part about how Red Potions help you lose and gain weight in all the right places! Waaaaait!";
close;
}
else if (.@input > 100) {
if (.@input > 100) {
mes "[Suspicious Guy]";
mes "Whoa...";
mes "I can't let you buy that many. I mean, it's not like, you know, there's a trace impurity in these Potions or anything like that...";
next;
continue;
}
else
break;
break;
}
.@Red_potion_hap = .@input * 500;
if (Zeny < .@Red_potion_hap) {
Expand Down Expand Up @@ -344,23 +344,23 @@ OnTouch:
mes "There's no way you can pass this up! Now, how many do you want?";
next;
while(1) {
input .@input;
if (.@input == 0) {
input(.@input);
if (.@input <= 0) {
mes "[Suspicious Guy]";
mes "Man, how many chances of a lifetime have you passed up? Man, I hope you win the lottery...";
mes "You'd probably";
mes "pass that up too.";
close;

}
else if (.@input > 100) {
if (.@input > 100) {
mes "[Suspicious Guy]";
mes "Whoa!";
mes "I can't sell that many Daggers! That'll attract the Prontera Chiv--I mean, um, I was gonna donate some Daggers to... Hungry children?";
next;
continue;
}
else
break;
break;
}
.@Main_gauche_hap = .@input * 9400;
if (Zeny < .@Main_gauche_hap) {
Expand Down Expand Up @@ -398,21 +398,21 @@ OnTouch:
mes "Clearly, this is the deal of the century. So how many do you want?";
next;
while(1) {
input .@input;
if (.@input == 0) {
input(.@input);
if (.@input <= 0) {
mes "[Suspicious Guy]";
mes "Awww...";
mes "It wasn't because of the whole drawstrings thing, was it?";
close;
}
else if (.@input > 100) {
if (.@input > 100) {
mes "[Suspicious Guy]";
mes "Whoa~!";
mes "I can't sell you that many! What are you trying to do, take advantage of me?";
next;
continue;
}
else
break;
break;
}
.@Hood__hap = .@input * 930;
if (Zeny < .@Hood__hap) {
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/jawaii.txt
Expand Up @@ -880,7 +880,7 @@ jawaii_in,28,124,0 script Bartender#jaw 1_ETC_01,{
mes "Bartender,";
mes "I'm so depressed";
mes "because of...";
input .@inputstr$;
input(.@inputstr$);
mes .@inputstr$+"...";
next;
mes "[Bartender]";
Expand Down
20 changes: 10 additions & 10 deletions npc/cities/lighthalzen.txt
Expand Up @@ -561,16 +561,8 @@ lighthalzen,182,102,3 script Lucius#zen5 4_M_LGTGRAND,{
mes "starving children. If you wish";
mes "to cancel, please enter ''0.''";
next;
input .@input;
if (.@input > 30000 || .@input < 0) {
mes "[Lucius]";
mes "Please enter a value";
mes "from 1 to 30,000 in";
mes "order to make a donation";
mes "to the needy, youngster.";
close;
}
else if (.@input == 0) {
input(.@input);
if (.@input == 0) {
mes "[Lucius]";
mes "How disappointing,";
mes "but I'm sure you have";
Expand All @@ -580,6 +572,14 @@ lighthalzen,182,102,3 script Lucius#zen5 4_M_LGTGRAND,{
mes "to come back at any time.";
close;
}
if (.@input > 30000 || .@input < 1) {
mes "[Lucius]";
mes "Please enter a value";
mes "from 1 to 30,000 in";
mes "order to make a donation";
mes "to the needy, youngster.";
close;
}
mes "[Lucius]";
mes "Thank you so much";
mes "for your " + .@input + " zeny donation.";
Expand Down