Skip to content

Commit

Permalink
Update min value of *input script command.
Browse files Browse the repository at this point in the history
- avoid potential hacks for old scripts that use `input()` script
commands.
  • Loading branch information
Emistry committed Jun 16, 2019
1 parent bd4c289 commit a867e8d
Show file tree
Hide file tree
Showing 82 changed files with 233 additions and 233 deletions.
6 changes: 3 additions & 3 deletions npc/airports/airships.txt
Expand Up @@ -491,7 +491,7 @@ airplane,50,66,5 script Apple Merchant#airplane 4_M_04,{
" '0' to cancel your order.");
next;
while (1) {
input .@input;
input(.@input, 0);
.@pay = .@input * 15;
if (.@input == 0) {
mes("[Fruitz]");
Expand Down Expand Up @@ -853,7 +853,7 @@ airplane_01,50,66,5 script Apple Merchant#air01 4_M_04,{
"'0' to cancel your order.");
next;
while (1) {
input .@input;
input(.@input, 0);
.@pay = .@input * 15;
if (.@input == 0) {
mes("[Meltz]");
Expand Down Expand Up @@ -1329,7 +1329,7 @@ function script applegamble {
"to cancel, please enter '0'.");
next;
while(1) {
input .@amount;
input(.@amount, 0);
if (.@amount == 0) {
mes(.@n$);
mes("Changed your mind?");
Expand Down
4 changes: 2 additions & 2 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, 0);
next;
mes "[Phelix]";
if (.@amount <= 0) {
Expand Down Expand Up @@ -396,7 +396,7 @@ 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, 0);
next;
mes "[Phelix]";
if (.@amount == 0) {
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/aldebaran.txt
Expand Up @@ -1200,7 +1200,7 @@ 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;
input(@input, 0);
if(@input < 1 || @input > 5) @input = rand(1,5); //Lupus's fix
callsub sF_Spin;
mes "[Kafra]";
Expand Down
6 changes: 3 additions & 3 deletions npc/cities/geffen.txt
Expand Up @@ -274,7 +274,7 @@ OnTouch:
mes "them at a time.";
next;
while(1) {
input .@input;
input(.@input, 0);
if (.@input == 0) {
mes "[Suspicious Guy]";
if (Sex == SEX_MALE)
Expand Down Expand Up @@ -344,7 +344,7 @@ OnTouch:
mes "There's no way you can pass this up! Now, how many do you want?";
next;
while(1) {
input .@input;
input(.@input, 0);
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...";
Expand Down Expand Up @@ -398,7 +398,7 @@ OnTouch:
mes "Clearly, this is the deal of the century. So how many do you want?";
next;
while(1) {
input .@input;
input(.@input, 0);
if (.@input == 0) {
mes "[Suspicious Guy]";
mes "Awww...";
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/lighthalzen.txt
Expand Up @@ -561,7 +561,7 @@ 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;
input(.@input, 0);
if (.@input > 30000 || .@input < 0) {
mes "[Lucius]";
mes "Please enter a value";
Expand Down
4 changes: 2 additions & 2 deletions npc/custom/etc/bank.txt
Expand Up @@ -28,7 +28,7 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W
mes "Oh, and do realize there is a " +@cost + " Zeny charge on all transactions!";
next;
}
input @deposit;
input(@deposit, 0);
if (@deposit < 1) {
mes "Make sure you ask me to deposit a real amount.";
close;
Expand Down Expand Up @@ -59,7 +59,7 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W
mes "Oh, and do realize there is a " +@cost + " Zeny charge on all transactions!";
next;
}
input @withdrawl;
input(@withdrawl, 0);
if (@withdrawl < 1) {
mes "Please don't play games. I need a real amount to withdraw.";
close;
Expand Down
4 changes: 2 additions & 2 deletions npc/custom/etc/bank_kafra.txt
Expand Up @@ -44,7 +44,7 @@ L_NoIncomeToday:
mes"[Maniss]";
mes "Please, tell me how much zeny you would like to deposit.";
next;
if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT;
if(input(@kafrabank, 0) == 1) goto L_TOO_BIG_AMOUNT;

if(@kafrabank<1000) goto L_LESS_1000;
if(@kafrabank>Zeny) goto L_NOT_ENOUGH;
Expand All @@ -62,7 +62,7 @@ M_WITHDRAW:
mes "Your account: ^135445" + #kafrabank + "^000000 zeny.";
mes "How much zeny would you like to withdraw?";
next;
if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT;
if(input(@kafrabank, 0) == 1) goto L_TOO_BIG_AMOUNT;

if(@kafrabank<1) goto B_EXIT2;
if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH;
Expand Down
24 changes: 12 additions & 12 deletions npc/custom/etc/lottery.txt
Expand Up @@ -171,37 +171,37 @@ L_HandPick:
set @L5,0;
set @L6,0;
Input1:
input @L1;
input(@L1, 0);
if (@L1 < 1 || @L1 > 40) goto Input1;
mes @L1;
Input2:
input @L2;
input(@L2, 0);
if (@L2 < 1 || @L2 > 40) goto Input2;
if (@L2 == @L1) goto Input2;
mes @L2;
Input3:
input @L3;
input(@L3, 0);
if (@L3 < 1 || @L3 > 40) goto Input3;
if (@L3 == @L1) goto Input3;
if (@L3 == @L2) goto Input3;
mes @L3;
Input4:
input @L4;
input(@L4, 0);
if (@L4 < 1 || @L4 > 40) goto Input4;
if (@L4 == @L1) goto Input4;
if (@L4 == @L2) goto Input4;
if (@L4 == @L3) goto Input4;
mes @L4;
Input5:
input @L5;
input(@L5, 0);
if (@L5 < 1 || @L5 > 40) goto Input5;
if (@L5 == @L1) goto Input5;
if (@L5 == @L2) goto Input5;
if (@L5 == @L3) goto Input5;
if (@L5 == @L4) goto Input5;
mes @L5;
Input6:
input @L6;
input(@L6, 0);
if (@L6 < 1 || @L6 > 40) goto Input6;
if (@L6 == @L1) goto Input6;
if (@L6 == @L2) goto Input6;
Expand Down Expand Up @@ -406,37 +406,37 @@ L_GM_Rig:
set $LR5,0;
set $LR6,0;
GMInput1:
input $LR1;
input($LR1, 0);
if ($LR1 < 1 || $LR1 > 40) goto GMInput1;
mes $LR1;
GMInput2:
input $LR2;
input($LR2, 0);
if ($LR2 < 1 || $LR2 > 40) goto GMInput2;
if ($LR2 == $LR1) goto GMInput2;
mes $LR2;
GMInput3:
input $LR3;
input($LR3, 0);
if ($LR3 < 1 || $LR3 > 40) goto GMInput3;
if ($LR3 == $LR1) goto GMInput3;
if ($LR3 == $LR2) goto GMInput3;
mes $LR3;
GMInput4:
input $LR4;
input($LR4, 0);
if ($LR4 < 1 || $LR4 > 40) goto GMInput4;
if ($LR4 == $LR1) goto GMInput4;
if ($LR4 == $LR2) goto GMInput4;
if ($LR4 == $LR3) goto GMInput4;
mes $LR4;
GMInput5:
input $LR5;
input($LR5, 0);
if ($LR5 < 1 || $LR5 > 40) goto GMInput5;
if ($LR5 == $LR1) goto GMInput5;
if ($LR5 == $LR2) goto GMInput5;
if ($LR5 == $LR3) goto GMInput5;
if ($LR5 == $LR4) goto GMInput5;
mes $LR5;
GMInput6:
input $LR6;
input($LR6, 0);
if ($LR6 < 1 || $LR6 > 40) goto GMInput6;
if ($LR6 == $LR1) goto GMInput6;
if ($LR6 == $LR2) goto GMInput6;
Expand Down
2 changes: 1 addition & 1 deletion npc/custom/etc/monster_arena.txt
Expand Up @@ -322,7 +322,7 @@ L_Sell:
mes "You have: ^FF0000" + #monpoints + "^000000 experience points";
mes "How many would you like to sell?";
next;
input @sellexp;
input(@sellexp, 0);
if (@sellexp > #monpoints) goto L_NoExp;
set #monpoints,#monpoints-@sellexp;
set @sellearn,100*@sellexp; // Price of exp
Expand Down
34 changes: 17 additions & 17 deletions npc/custom/etc/quest_warper.txt
Expand Up @@ -173,49 +173,49 @@ Setprice:
next;
mes "Basic - Warps are = "+(($QW_BW_PRICE)?"^00FF00"+$QW_BW_PRICE:"^FF0000Free")+"^000000";
mes "Basic - Warps are starter towns and related dungeons.";
input $QW_BW_PRICE;
input($QW_BW_PRICE, 0);
goto Setprice;
case 2:
next;
mes "Advanced - Warps are = "+(($QW_AW_PRICE)?"^00FF00"+$QW_AW_PRICE:"^FF0000Free")+"^000000";
mes "Advanced - Warps are towns and dungeons on the same island but not close to any starter town.";
input $QW_AW_PRICE;
input($QW_AW_PRICE, 0);
goto Setprice;
case 3:
next;
mes "Overseas - Warps are = "+(($QW_OW_PRICE)?"^00FF00"+$QW_OW_PRICE:"^FF0000Free")+"^000000";
mes "Overseas - Warps are towns and dungeons overseas reachable by boat from Alberta.";
input $QW_OW_PRICE;
input($QW_OW_PRICE, 0);
goto Setprice;
case 4:
next;
mes "Basic Dungeon level warp fee = "+(($QW_BW_FEE)?"^00FF00"+$QW_BW_FEE:"^FF0000NO")+"^000000 zeny per level";
mes "Basic - Warps are starter town related dungeons.";
mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee.";
mes "These costs are on top of the regular Warp costs.";
input $QW_BW_FEE;
input($QW_BW_FEE, 0);
goto Setprice;
case 5:
next;
mes "Advanced Dungeon level warp fee = "+(($QW_AW_FEE)?"^00FF00"+$QW_AW_FEE:"^FF0000NO")+"^000000 zeny per level";
mes "Advanced - Warps are dungeons not close to any starter town.";
mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee.";
mes "These costs are on top of the regular Warp costs.";
input $QW_AW_FEE;
input($QW_AW_FEE, 0);
goto Setprice;
case 6:
next;
mes "Overseas Dungeon level warp fee = "+(($QW_OW_FEE)?"^00FF00"+$QW_OW_FEE:"^FF0000NO")+"^000000 zeny per level";
mes "Overseas - Warps are dungeons related to towns overseas reachable by boat from Alberta.";
mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee.";
mes "These costs are on top of the regular Warp costs.";
input $QW_OW_FEE;
input($QW_OW_FEE, 0);
goto Setprice;
case 7:
next;
mes "Full Healing = "+(($QW_HF_PRICE)?"^00FF00"+$QW_HF_PRICE:"^FF0000Free")+"^000000";
mes "Instant full healing 1 price.";
input $QW_HF_PRICE;
input($QW_HF_PRICE, 0);
goto Setprice;
case 8:
next;
Expand All @@ -224,22 +224,22 @@ Setprice:
mes "Healing price per 1 HP.";
mes "Healing price per 1 SP.";
mes "2 inputs, first HP then SP.";
input $QW_HP_H_PRICE;
input $QW_HP_S_PRICE;
input($QW_HP_H_PRICE, 0);
input($QW_HP_S_PRICE, 0);
goto Setprice;
case 9:
next;
if ($QW_S_PRICE && $QW_S_PRICE != 60) mes "Storage = ^00FF00 "+$QW_S_PRICE+" ^000000";
if (!$QW_S_PRICE) mes "Storage = ^FF0000 Free ^000000";
if ($QW_S_PRICE == 60) mes "Storage = ^0000FF Kafra Mode ^000000";
mes "Storage cost, if set to 60 Kafra pricing will be handled.";
input $QW_S_PRICE;
input($QW_S_PRICE, 0);
goto Setprice;
case 10:
next;
mes "Guild Storage = "+(($QW_GS_PRICE)?"^00FF00"+$QW_GS_PRICE:"^FF0000Free")+"^000000";
mes "Guild Storage, free on Guild Kafras.";
input $QW_GS_PRICE;
input($QW_GS_PRICE, 0);
goto Setprice;
case 11:
goto GM_Menu;
Expand All @@ -264,21 +264,21 @@ SpecialWarpMenu:
case 1:
next;
mes "Set the name to show in the menu as option.";
input $QW_SP_Warpname$;
input($QW_SP_Warpname$, 0);
goto SpecialWarpMenu;
case 2:
next;
mes "Set the map in the ^0000FFmapname^000000 format.";
mes "When this warpmap is set the option for players will show once they meet the requirments.";
mes "To disable Special Warp Menu option, clear this!";
input $QW_SP_WarpMap$;
input($QW_SP_WarpMap$, 0);
goto SpecialWarpMenu;
case 3:
next;
mes "First input = Xcoord";
mes "Second input = Ycoord";
input $QW_SP_WarpX;
input $QW_SP_WarpY;
input($QW_SP_WarpX, 0);
input($QW_SP_WarpY, 0);
goto SpecialWarpMenu;
case 4:
goto GM_Menu;
Expand All @@ -301,7 +301,7 @@ DungeonLevelLimit:
mes "Set limit of Dungeon Depth 0 = entrance";
mes "Depth 1 is a map connected to 0 and so on";
mes "Shortest Route to map counts as depth";
input $QW_DDL;
input($QW_DDL, 0);
goto DungeonLevelLimit;
case 3: goto GM_Menu;
default:
Expand Down Expand Up @@ -464,7 +464,7 @@ L_Storage:
if(#kafra_code) {
mes "Enter your storage password:";
set @code_,0;
input @code_;
input(@code_, 0);
if(@code_ != #kafra_code) {
dispbottom "Wrong storage password.";
close;
Expand Down
6 changes: 3 additions & 3 deletions npc/custom/etc/shifty_assassin.txt
Expand Up @@ -27,7 +27,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{
mes "They cost ^0000FF" + $ninja_price + " zeny ^000000each.";

set @buy,0;
input @buy;
input(@buy, 0);
next;
if ($ninja_avail < 1) {
mes "[Shifty Assassin]";
Expand Down Expand Up @@ -84,7 +84,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{
mes "Resting Ninjas: "+#ninjasr;
mes "How many do you want to send?";
set @number,0;
input @number;
input(@number, 0);
if (@number < 1) {
mes "[Shifty Assassin]";
mes "You can't kill anyone without ninjas.";
Expand Down Expand Up @@ -144,7 +144,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{
mes "How many ninjas do you want to make available?";
next;
set @add,0;
input @add;
input(@add, 0);
set $ninja_avail,$ninja_avail+@add;
mes @add + " ninjas added.";
close;
Expand Down

0 comments on commit a867e8d

Please sign in to comment.