From 569a80a41e617ddbaae38faab9892bcfde103e98 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 7 Jul 2010 17:26:59 -0600 Subject: Add a well to fill empty bottles with water More wells will be added later. Also fix an indentation error in the banker function. --- npc/021-1_Tulimshar/north_shops.txt | 4 ++++ npc/functions/banker.txt | 11 +++++++---- npc/functions/water_bottle.txt | 34 ++++++++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 npc/functions/water_bottle.txt (limited to 'npc') diff --git a/npc/021-1_Tulimshar/north_shops.txt b/npc/021-1_Tulimshar/north_shops.txt index 6d38531c..333b88e1 100644 --- a/npc/021-1_Tulimshar/north_shops.txt +++ b/npc/021-1_Tulimshar/north_shops.txt @@ -33,6 +33,10 @@ close; } +021-1.gat,129,40,0 script Well 127,{ + callfunc "WaterBottle"; +} + // An officer (for security) 021-1.gat,130,38,0 script Officer 150,{ mes "[Officer]"; diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt index 6a43b90d..89551448 100644 --- a/npc/functions/banker.txt +++ b/npc/functions/banker.txt @@ -8,7 +8,8 @@ L_Start: mes "\"Welcome to the bank!"; mes "How can I help you?\""; next; - menu "Deposit", L_Dep, + menu + "Deposit", L_Dep, "Withdraw", L_With, "Check my balance", L_Balance, "Nevermind", L_Nev; @@ -17,7 +18,7 @@ L_Dep: mes "[" + @npcName$ + "]"; mes "\"How much would you like to deposit?\""; next; - menu + menu "Other", L_Dep_Input, "5,000 GP", L_Dep_5k, "10,000 GP", L_Dep_10k, @@ -36,7 +37,8 @@ L_Dep_Input: if (@Amount >= 0) goto L_Dep_Continue; mes "[" + @npcName$ + "]"; mes "\"I need a positive amount. What would you like to do?\""; - menu "Go back", L_Start, + menu + "Go back", L_Start, "Try again", L_Dep_Input, "Deposit all", L_Dep_All, "Quit", -; @@ -115,7 +117,8 @@ L_With_Input: if (@Amount >= 0) goto L_With_Continue; mes "[" + @npcName$ + "]"; mes "\"I need a positive amount. What would you like to do?\""; - menu "Go back", L_Start, + menu + "Go back", L_Start, "Try again", L_With_Input, "Withdraw all", L_With_All, "Quit", -; diff --git a/npc/functions/water_bottle.txt b/npc/functions/water_bottle.txt new file mode 100644 index 00000000..c2d9a1e0 --- /dev/null +++ b/npc/functions/water_bottle.txt @@ -0,0 +1,34 @@ +// Fills empty bottles with water + +function script WaterBottle { + set @COST_PER_BOTTLE, 150; + + mes "How many empty bottles do you want to fill with water? It costs " + @COST_PER_BOTTLE + "gp per bottle."; + input @count; + + if (@count == 0) close; + set @cost, @count * @COST_PER_BOTTLE; + set @empty, countitem("EmptyBottle"); + + if (@empty < @count) goto L_NotEnoughBottles; + if (zeny < @cost) goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("BottleOfWater") == 0 && @empty > @count) goto L_NotEnoughSlots; + + set zeny, zeny - @cost; + delitem "EmptyBottle", @count; + getitem "BottleOfWater", @count; + close; + +L_NotEnoughBottles: + mes "You don't have that many empty bottles!"; + close; + +L_NotEnoughMoney: + mes "You don't have enough gp! You need " + @cost + "gp."; + close; + +L_NotEnoughSlots: + mes "You don't have room for these bottles!"; + close; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index d630571b..b61e0c62 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -12,6 +12,7 @@ npc: npc/functions/mob_points.txt npc: npc/functions/process_equip.txt npc: npc/functions/slot_machine.txt npc: npc/functions/soul_menhir.txt +npc: npc/functions/water_bottle.txt // Item Functions npc: npc/items/purification_potion.txt -- cgit v1.2.3-70-g09d2 From 4b351cfce889508c5140788c18441c7603009241 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 7 Jul 2010 17:31:32 -0600 Subject: Update maps --- data/003-1.wlk | Bin 26224 -> 26224 bytes data/018-3.wlk | Bin 40004 -> 40004 bytes npc/001-2_Tulimshar/_import.txt | 1 + npc/009-2_Hurnscald/_import.txt | 1 + npc/018-3_Cave/_mobs.txt | 2 +- npc/020-2_Nivalis/_import.txt | 1 + npc/021-2_Tulimshar/_import.txt | 1 + 7 files changed, 5 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/data/003-1.wlk b/data/003-1.wlk index eb80e9c7..262575b1 100644 Binary files a/data/003-1.wlk and b/data/003-1.wlk differ diff --git a/data/018-3.wlk b/data/018-3.wlk index ac9e7c9c..80f06b33 100644 Binary files a/data/018-3.wlk and b/data/018-3.wlk differ diff --git a/npc/001-2_Tulimshar/_import.txt b/npc/001-2_Tulimshar/_import.txt index 6b8f78b6..b9e81f22 100644 --- a/npc/001-2_Tulimshar/_import.txt +++ b/npc/001-2_Tulimshar/_import.txt @@ -2,6 +2,7 @@ map: 001-2.gat npc: npc/001-2_Tulimshar/_mobs.txt npc: npc/001-2_Tulimshar/_warps.txt npc: npc/001-2_Tulimshar/casino.txt +npc: npc/001-2_Tulimshar/mapflags.txt npc: npc/001-2_Tulimshar/phaet.txt npc: npc/001-2_Tulimshar/shops.txt npc: npc/001-2_Tulimshar/troupe_leader.txt diff --git a/npc/009-2_Hurnscald/_import.txt b/npc/009-2_Hurnscald/_import.txt index 2e6af506..8b3dd0dc 100644 --- a/npc/009-2_Hurnscald/_import.txt +++ b/npc/009-2_Hurnscald/_import.txt @@ -7,6 +7,7 @@ npc: npc/009-2_Hurnscald/doctor.txt npc: npc/009-2_Hurnscald/drunks.txt npc: npc/009-2_Hurnscald/inspector.txt npc: npc/009-2_Hurnscald/kfahr.txt +npc: npc/009-2_Hurnscald/mapflags.txt npc: npc/009-2_Hurnscald/misc.txt npc: npc/009-2_Hurnscald/nicholas.txt npc: npc/009-2_Hurnscald/nurse.txt diff --git a/npc/018-3_Cave/_mobs.txt b/npc/018-3_Cave/_mobs.txt index 30e9579d..c5699a01 100644 --- a/npc/018-3_Cave/_mobs.txt +++ b/npc/018-3_Cave/_mobs.txt @@ -3,7 +3,7 @@ 018-3.gat,48,28,56,17 monster Bat 1017,10,100000,30000,Mob018-3::On1017 018-3.gat,35,144,31,48 monster Evil Mushroom 1013,10,120000,30000,Mob018-3::On1013 018-3.gat,35,65,28,22 monster Spider 1012,20,100000,50000,Mob018-3::On1012 -018-3.gat,28,157,3,2 monster PinkFlower 1014,1,60000,30000,Mob018-3::On1014 +018-3.gat,28,157,3,2 monster Flower 1014,1,60000,30000,Mob018-3::On1014 018-3.gat,99,110,17,39 monster Yellow slime 1007,10,90000,30000,Mob018-3::On1007 018-3.gat,134,140,12,8 monster Maggot 1002,3,80000,40000,Mob018-3::On1002 018-3.gat,132,137,15,25 monster Spider 1012,8,300000,120000,Mob018-3::On1012 diff --git a/npc/020-2_Nivalis/_import.txt b/npc/020-2_Nivalis/_import.txt index 159d1e61..ea665c20 100644 --- a/npc/020-2_Nivalis/_import.txt +++ b/npc/020-2_Nivalis/_import.txt @@ -2,4 +2,5 @@ map: 020-2.gat npc: npc/020-2_Nivalis/_mobs.txt npc: npc/020-2_Nivalis/_warps.txt npc: npc/020-2_Nivalis/furquest.txt +npc: npc/020-2_Nivalis/mapflags.txt npc: npc/020-2_Nivalis/shops.txt diff --git a/npc/021-2_Tulimshar/_import.txt b/npc/021-2_Tulimshar/_import.txt index 0cd9f7ea..028c104f 100644 --- a/npc/021-2_Tulimshar/_import.txt +++ b/npc/021-2_Tulimshar/_import.txt @@ -3,4 +3,5 @@ npc: npc/021-2_Tulimshar/_mobs.txt npc: npc/021-2_Tulimshar/_warps.txt npc: npc/021-2_Tulimshar/bakery.txt npc: npc/021-2_Tulimshar/government_building.txt +npc: npc/021-2_Tulimshar/mapflags.txt npc: npc/021-2_Tulimshar/workshop.txt -- cgit v1.2.3-70-g09d2 From 43093b041b6b892d30c936df4f152573a16046b1 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 8 Jul 2010 16:13:37 +0200 Subject: Fixed banker function to do "quit" correctly. The banker function was lacking a return statement which resulted in "Quit" acting like "retrieve other amount of money". Added the missing return statement. --- npc/functions/banker.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'npc') diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt index 89551448..025647d2 100644 --- a/npc/functions/banker.txt +++ b/npc/functions/banker.txt @@ -31,6 +31,7 @@ L_Dep: "All of my money", L_Dep_All, "I've changed my mind", L_Start, "Quit", -; + return; L_Dep_Input: input @Amount; -- cgit v1.2.3-70-g09d2