summaryrefslogtreecommitdiff
path: root/npc/events
diff options
context:
space:
mode:
Diffstat (limited to 'npc/events')
-rw-r--r--npc/events/dumplingfestival.txt4
-rw-r--r--npc/events/easter_2008.txt136
-rw-r--r--npc/events/halloween_2006.txt12
-rw-r--r--npc/events/halloween_2009.txt140
-rw-r--r--npc/events/valentinesday.txt5
-rw-r--r--npc/events/valentinesday_2009.txt10
-rw-r--r--npc/events/whiteday.txt22
7 files changed, 160 insertions, 169 deletions
diff --git a/npc/events/dumplingfestival.txt b/npc/events/dumplingfestival.txt
index 641b8f2da..9f5ac381a 100644
--- a/npc/events/dumplingfestival.txt
+++ b/npc/events/dumplingfestival.txt
@@ -67,8 +67,8 @@ payon,93,81,4 script Exorcist Master Fahae 4_M_BUDDHIST,{
mes "Each costs "+ .@price +"z.";
mes "(Type in 0 to cancel)";
next;
- input @input;
- if (@input == 0)
+ input(@input);
+ if (@input <= 0)
close;
if (@input > 5) {
mes "[Exorcist Master Fahae]";
diff --git a/npc/events/easter_2008.txt b/npc/events/easter_2008.txt
index 4d914ebcb..a2d6a2155 100644
--- a/npc/events/easter_2008.txt
+++ b/npc/events/easter_2008.txt
@@ -91,7 +91,7 @@ prontera,111,99,5 script Egg Salesman#prt::EggVendor 4W_M_02,{
mes "Chicken Eggs so easily!";
next;
while(1) {
- input .@input;
+ input(.@input);
if (.@input == 0) {
mes "[Egg Salesman]";
mes "Hey, if you're not";
@@ -101,7 +101,7 @@ prontera,111,99,5 script Egg Salesman#prt::EggVendor 4W_M_02,{
mes "help out my customers?";
close;
}
- else if (.@input < 0 || .@input > 1000) {
+ if (.@input < 1 || .@input > 1000) {
mes "[Egg Salesman]";
mes "Hey, you mind giving";
mes "me a real number? I also";
@@ -110,42 +110,37 @@ prontera,111,99,5 script Egg Salesman#prt::EggVendor 4W_M_02,{
mes "you know. C'mon, tell me how";
mes "many you want for real now.";
next;
+ continue;
}
- else {
- .@egg_zeny = .@input*500;
- if (Zeny < .@egg_zeny) {
- mes "[Egg Salesman]";
- mes "You don't have enough Zeny.";
- next;
- mes "[Egg Salesman]";
- mes "No discount, go and get enough Zeny.";
- close;
- }
- else {
- if (checkweight(Chicken_Egg,.@input) == 0) {
- mes "[Egg Salesman]";
- mes "Hey, I know you really";
- mes "want to buy some Chicken";
- mes "Eggs, but you won't be able";
- mes "to carry that much now. Why";
- mes "don't you free up some";
- mes "Inventory space first?.";
- close;
- }
- else {
- mes "[Egg Salesman]";
- mes "Here's your Chicken Eggs!";
- mes "I guess there's some festival";
- mes "happening where you'll need";
- mes "them, but I don't know anything";
- mes "about that. Well, have a good";
- mes "time, and I'll see you again!";
- Zeny -= .@egg_zeny;
- getitem Chicken_Egg,.@input;
- close;
- }
- }
+ .@egg_zeny = .@input*500;
+ if (Zeny < .@egg_zeny) {
+ mes "[Egg Salesman]";
+ mes "You don't have enough Zeny.";
+ next;
+ mes "[Egg Salesman]";
+ mes "No discount, go and get enough Zeny.";
+ close;
}
+ if (checkweight(Chicken_Egg,.@input) == 0) {
+ mes "[Egg Salesman]";
+ mes "Hey, I know you really";
+ mes "want to buy some Chicken";
+ mes "Eggs, but you won't be able";
+ mes "to carry that much now. Why";
+ mes "don't you free up some";
+ mes "Inventory space first?.";
+ close;
+ }
+ mes "[Egg Salesman]";
+ mes "Here's your Chicken Eggs!";
+ mes "I guess there's some festival";
+ mes "happening where you'll need";
+ mes "them, but I don't know anything";
+ mes "about that. Well, have a good";
+ mes "time, and I'll see you again!";
+ Zeny -= .@egg_zeny;
+ getitem Chicken_Egg,.@input;
+ close;
}
case 4:
mes "[Egg Salesman]";
@@ -263,8 +258,8 @@ prontera,230,312,3 script Nerlen#es07 1_F_PRIEST,{
mes "Enter ''0'' to cancel.";
next;
while(1) {
- input .@input;
- if (.@input == 0) {
+ input(.@input);
+ if (.@input <= 0) {
mes "[Nerlen]";
mes "Oh, you changed your";
mes "mind? Feel free to visit me";
@@ -272,35 +267,32 @@ prontera,230,312,3 script Nerlen#es07 1_F_PRIEST,{
mes "make you some Holy Eggs~";
close;
}
- else if (.@input < 0 || .@input > 10) {
+ if (.@input > 10) {
mes "[Nerlen]";
mes "I'm sorry, but I can only";
mes "make up to 10 Holy Eggs";
mes "at a time. If you wanted to";
mes "cancel, then just enter ''0.''";
next;
+ continue;
}
- else {
- if ((countitem(White_Herb) < .@input) || (countitem(Green_Herb) < .@input) || (countitem(Yellow_Herb) < .@input) || (countitem(Holy_Water) < .@input) || (countitem(Chicken_Egg) < .@input)) {
- mes "[Nerlen]";
- mes "I'm sorry, but you don't";
- mes "have enough items to make";
- mes "Holy Eggs. You need the";
- mes "following for me to create";
- mes "each Holy Egg for you.";
- next;
- mes "[Nerlen]";
- mes "^4D4DFF1 White Herb^000000,";
- mes "^4D4DFF1 Green Herb^000000,";
- mes "^4D4DFF1 Yellow Herb^000000,";
- mes "^4D4DFF1 Holy Water^000000, and";
- mes "^4D4DFF1 Chicken Egg^000000.";
- close;
- }
- else {
- break;
- }
+ if ((countitem(White_Herb) < .@input) || (countitem(Green_Herb) < .@input) || (countitem(Yellow_Herb) < .@input) || (countitem(Holy_Water) < .@input) || (countitem(Chicken_Egg) < .@input)) {
+ mes "[Nerlen]";
+ mes "I'm sorry, but you don't";
+ mes "have enough items to make";
+ mes "Holy Eggs. You need the";
+ mes "following for me to create";
+ mes "each Holy Egg for you.";
+ next;
+ mes "[Nerlen]";
+ mes "^4D4DFF1 White Herb^000000,";
+ mes "^4D4DFF1 Green Herb^000000,";
+ mes "^4D4DFF1 Yellow Herb^000000,";
+ mes "^4D4DFF1 Holy Water^000000, and";
+ mes "^4D4DFF1 Chicken Egg^000000.";
+ close;
}
+ break;
}
if (checkweight(Holy_Egg,.@input) == 0) {
mes "[Nerlen]";
@@ -311,20 +303,18 @@ prontera,230,312,3 script Nerlen#es07 1_F_PRIEST,{
mes "space in your Inventory first.";
close;
}
- else {
- delitem White_Herb,.@input;
- delitem Green_Herb,.@input;
- delitem Yellow_Herb,.@input;
- delitem Holy_Water,.@input;
- delitem Chicken_Egg,.@input; //Egg
- getitem Holy_Egg,.@input;
- mes "[Nerlen]";
- mes "Thank you!";
- mes "I hope you enjoy";
- mes "these Holy Eggs~";
- mes "Hope you to be with God's love.";
- close;
- }
+ delitem White_Herb,.@input;
+ delitem Green_Herb,.@input;
+ delitem Yellow_Herb,.@input;
+ delitem Holy_Water,.@input;
+ delitem Chicken_Egg,.@input; //Egg
+ getitem Holy_Egg,.@input;
+ mes "[Nerlen]";
+ mes "Thank you!";
+ mes "I hope you enjoy";
+ mes "these Holy Eggs~";
+ mes "Hope you to be with God's love.";
+ close;
case 3:
mes "[Nerlen]";
mes "Alright, I understand.";
diff --git a/npc/events/halloween_2006.txt b/npc/events/halloween_2006.txt
index 940ffe30a..6f954c299 100644
--- a/npc/events/halloween_2006.txt
+++ b/npc/events/halloween_2006.txt
@@ -614,20 +614,20 @@ nif_fild01,165,115,3 script Chicken Masta#06_hw 4_M_NFDEADMAN2,{
mes "And maximum 3 is all you can get.";
next;
while(1) {
- input .@input;
- if (.@input == 0) {
+ input(.@input);
+ if (.@input <= 0) {
mes "[Chicken Masta]";
mes "You don't have to buy it, if you don't need it.";
close;
}
- else if (@input > 3) {
+ if (@input > 3) {
mes "[Chicken Masta]";
mes "What did I tell you.";
mes "I'm going to sell only three eggs.";
next;
+ continue;
}
- else
- break;
+ break;
}
.@hw_egg = .@input * 1000;
if (Zeny < @hw_egg) {
@@ -666,7 +666,7 @@ nif_fild01,167,113,3 script Masta's chicken#06_hw01 4_NFCOCK,{
mes "Oh, this must be Chicken Masta's chicken.";
mes "I should insert the magic word.";
next;
- input .@inputstr$;
+ input(.@inputstr$);
if( .@inputstr$ == "Return" ) {
emotion e_omg;
specialeffect EF_TELEPORTATION;
diff --git a/npc/events/halloween_2009.txt b/npc/events/halloween_2009.txt
index e71abeaef..532e04b2e 100644
--- a/npc/events/halloween_2009.txt
+++ b/npc/events/halloween_2009.txt
@@ -349,8 +349,8 @@ prontera,220,72,5 duplicate(09Treats) Trick or Treater#iRO8 4_M_KID1,2,2
mes "[Halloween Wizard]";
mes "How many Fabrics or Jack o' Pumpkins do you want to use? Don't go over 100 because that is the max amount that I can use.";
next;
- input .@input;
- if (.@input == 0) {
+ input(.@input);
+ if (.@input <= 0) {
mes "[Halloween Wizard]";
mes "You have no definite idea.";
mes "It's not a big deal.";
@@ -358,91 +358,89 @@ prontera,220,72,5 duplicate(09Treats) Trick or Treater#iRO8 4_M_KID1,2,2
next;
break;
}
- else if (.@input > 100) {
+ if (.@input > 100) {
mes "[Halloween Wizard]";
mes "I told you that it must be between 1 to 100!";
mes "You didn't pay attention!";
next;
break;
}
- else {
- .@fabric = countitem(Transparent_Cloth);
- .@jack = countitem(Pumpkin_Head);
- .@worn = countitem(Worn_Cloth_Piece);
- .@crushed = countitem(Pumpkin_Head_Crushed);
- .@whispers = 0;
- .@darklords = 0;
+ .@fabric = countitem(Transparent_Cloth);
+ .@jack = countitem(Pumpkin_Head);
+ .@worn = countitem(Worn_Cloth_Piece);
+ .@crushed = countitem(Pumpkin_Head_Crushed);
+ .@whispers = 0;
+ .@darklords = 0;
- .@total = .@fabric + .@jack + .@worn + .@crushed;
+ .@total = .@fabric + .@jack + .@worn + .@crushed;
- if(.@total < .@input) {
- mes "[Halloween Wizard]";
- mes "Recount the number of items you have and tell me the total.";
- mes "Huhuhuhuhuhu...";
- next;
- break;
- }
+ if(.@total < .@input) {
+ mes "[Halloween Wizard]";
+ mes "Recount the number of items you have and tell me the total.";
+ mes "Huhuhuhuhuhu...";
+ next;
+ break;
+ }
- if(.@fabric > 0) {
- if(.@fabric >= .@input) {
- delitem 1059,.@input;
- .@whispers += .@input;
- .@input = 0;
- }
- else{
- delitem 1059,.@fabric;
- .@input -= .@fabric;
- .@whispers += .@fabric;
- }
+ if(.@fabric > 0) {
+ if(.@fabric >= .@input) {
+ delitem 1059,.@input;
+ .@whispers += .@input;
+ .@input = 0;
}
- if(.@worn > 0 && .@input != 0) {
- if(.@worn >= .@input) {
- delitem 6299,.@input;
- .@whispers += .@input;
- .@input = 0;
- }
- else{
- delitem 6299,.@worn;
- .@input -= .@worn;
- .@whispers += .@worn;
- }
+ else{
+ delitem 1059,.@fabric;
+ .@input -= .@fabric;
+ .@whispers += .@fabric;
}
- if(.@jack > 0 && .@input != 0) {
- if(.@jack >= .@input) {
- delitem 1062,.@input;
- .@darklords += .@input;
- .@input = 0;
- }
- else{
- delitem 1062,.@jack;
- .@input -= .@jack;
- .@darklords += .@jack;
- }
+ }
+ if(.@worn > 0 && .@input != 0) {
+ if(.@worn >= .@input) {
+ delitem 6299,.@input;
+ .@whispers += .@input;
+ .@input = 0;
}
- if(.@crushed > 0 && .@input != 0) {
- if(.@crushed >= .@input) {
- delitem 6298,.@input;
- .@darklords += .@input;
- .@input = 0;
- }
- else{
- delitem 6298,.@crushed;
- .@input -= .@crushed;
- .@darklords += .@crushed;
- }
+ else{
+ delitem 6299,.@worn;
+ .@input -= .@worn;
+ .@whispers += .@worn;
}
- if (.@input > 0) {
- mes "Theres a problem.";
- close;
+ }
+ if(.@jack > 0 && .@input != 0) {
+ if(.@jack >= .@input) {
+ delitem 1062,.@input;
+ .@darklords += .@input;
+ .@input = 0;
}
- monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Whisper",3014,.@whispers;
- monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Dark Lord",3015,.@darklords;
- mes "[Halloween Wizard]";
- mes "Here's what you wanted.";
- mes "Imagine what the people must be thinking in the other villages?";
- mes "Muahahaha";
+ else{
+ delitem 1062,.@jack;
+ .@input -= .@jack;
+ .@darklords += .@jack;
+ }
+ }
+ if(.@crushed > 0 && .@input != 0) {
+ if(.@crushed >= .@input) {
+ delitem 6298,.@input;
+ .@darklords += .@input;
+ .@input = 0;
+ }
+ else{
+ delitem 6298,.@crushed;
+ .@input -= .@crushed;
+ .@darklords += .@crushed;
+ }
+ }
+ if (.@input > 0) {
+ mes "Theres a problem.";
close;
}
+ monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Whisper",3014,.@whispers;
+ monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Dark Lord",3015,.@darklords;
+ mes "[Halloween Wizard]";
+ mes "Here's what you wanted.";
+ mes "Imagine what the people must be thinking in the other villages?";
+ mes "Muahahaha";
+ close;
case 3:
mes "[Halloween Wizard]";
mes "If you change your mind, come back here...";
diff --git a/npc/events/valentinesday.txt b/npc/events/valentinesday.txt
index bb64f4121..89979e166 100644
--- a/npc/events/valentinesday.txt
+++ b/npc/events/valentinesday.txt
@@ -58,8 +58,9 @@ alberta,26,243,4 script Stephen 1_M_MERCHANT,{
mes "you can come back again.";
mes "So how many do you want?";
next;
- input .@i;
- if (.@i <= 0) close;
+ input(.@i);
+ if (.@i <= 0)
+ close;
mes "[Stephen]";
if (.@i > 5) {
mes "I'm sorry, but I can't give you that many.";
diff --git a/npc/events/valentinesday_2009.txt b/npc/events/valentinesday_2009.txt
index 1151a08fb..919f4255f 100644
--- a/npc/events/valentinesday_2009.txt
+++ b/npc/events/valentinesday_2009.txt
@@ -66,7 +66,7 @@ prontera,164,174,4 script Trader#Val09 1_M_MERCHANT,{
mes "How many do you want anyway?";
next;
while(.@input <= 0 || .@input > 5) {
- input .@input;
+ input(.@input);
if (.@input < 1) {
mes "[Marco Bassinio]";
mes "Oh, it's such a shame!";
@@ -195,7 +195,7 @@ prontera,147,171,5 script Packs Trader#Val09 1_M_MERCHANT,{
mes "How many do you want?";
mes "You can't buy more than 10 items at once.";
next;
- input .@input;
+ input(.@input);
if (.@input <= 0) {
mes "[Packs Trader]";
mes "Nothing to buy.";
@@ -236,7 +236,7 @@ prontera,147,171,5 script Packs Trader#Val09 1_M_MERCHANT,{
mes "How many do you want?";
mes "You can't buy more than 10 items at once.";
next;
- input .@input;
+ input(.@input);
if (.@input <= 0) {
mes "[Packs Trader]";
mes "Nothing to buy.";
@@ -277,7 +277,7 @@ prontera,147,171,5 script Packs Trader#Val09 1_M_MERCHANT,{
mes "How many do you want?";
mes "You can't buy more than 10 items at once.";
next;
- input .@input;
+ input(.@input);
if (.@input <= 0) {
mes "[Packs Trader]";
mes "Nothing to buy.";
@@ -443,7 +443,7 @@ prontera,157,185,4 script Valentine Vote Manager#v 4_F_KAFRA5,{
mes "When you write the number of the rings, the number shouldn't be larger than the number of rings you actually have.";
mes "'0', cancels everything.";
next;
- input .@input;
+ input(.@input);
if (.@input <= 0) {
mes "[Valentine Vote Manager]";
diff --git a/npc/events/whiteday.txt b/npc/events/whiteday.txt
index 58655bf11..b7bae2d97 100644
--- a/npc/events/whiteday.txt
+++ b/npc/events/whiteday.txt
@@ -118,16 +118,18 @@ S_Purchase:
.@price = getarg(0);
.@item_id = getarg(1);
while (true) {
- input .@amount;
- if (.@amount <= 5)
- break;
- mes "[Sugar]";
- mes "???";
- mes "You seem to have a failure on hearing.";
- mes "I will tell you once again?";
- mes "You can only purchase";
- mes "^ff0000 5 pieces^000000 at once.";
- next;
+ input(.@amount);
+ if (.@amount < 0 || .@amount > 5) {
+ mes "[Sugar]";
+ mes "???";
+ mes "You seem to have a failure on hearing.";
+ mes "I will tell you once again?";
+ mes "You can only purchase";
+ mes "^ff0000 5 pieces^000000 at once.";
+ next;
+ continue;
+ }
+ break;
}
if (.@amount == 0) // Cancel
return;