From 4152c408d762c01cf5c27ef89289c21041140c10 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sat, 10 Feb 2018 13:10:34 -0200 Subject: Fix and update the Well. Not really happy with it, though --- npc/003-1/well.txt | 78 +++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/npc/003-1/well.txt b/npc/003-1/well.txt index c7e272213..272deda1a 100644 --- a/npc/003-1/well.txt +++ b/npc/003-1/well.txt @@ -1,54 +1,48 @@ // Author: // Saulc +// Jesusalva 003-1,45,80,0 script Well NPC_NO_SPRITE,{ + .@COST_PER_BOTTLE = 50; - .Item1 = IronOre; //7 - .GP = 8500; - .ItemCreate = IronIngot; - - function quest_create { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("How many ingots do you want to make?"); - input .amount; - - if (countitem("Iron Ore") >= .amount * 7 && Zeny >= 8500 * .amount) - { - delitem .Item1, .amount * 7; - Zeny = Zeny - .amount * .GP; - getitem .ItemCreate, .amount; - close; - } - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You don't have enough ore."); + mes l("This well have a mechanism to fill water bottles. It costs @@ gp per bottle.", .@COST_PER_BOTTLE); + mes l("You need the bottle, too. Too bad, not even water is free in this world!"); + input .@count; + + if (.@count == 0) close; - - } - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Hello! Do you want to craft @@? For that I will need 7 @@, and @@ gp.", getitemlink(.ItemCreate),getitemlink(.Item1),.GP); - - do - { - .@karim = getq(Karim_Quest); - select - l("Yes"), - menuaction(l("Quit")); - - switch (@menu) - { - case 1: - quest_create; - break; - } - } while (@menu != 2); - - closedialog; - goodbye; + .@Cost = .@count * .@COST_PER_BOTTLE; + .@empty = countitem("EmptyBottle"); + + if (.@empty < .@count) + goto L_NotEnoughBottles; + if (Zeny < .@Cost) + goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("BottleOfSweaWater") == 0 + && .@empty > .@count) + goto L_NotEnoughSlots; + + set Zeny, Zeny - .@Cost; + delitem "EmptyBottle", .@count; + getitem "BottleOfSweaWater", .@count; // TODO FIXME: "Swea" water? Also, this is not sea water... + close; + +L_NotEnoughBottles: + mes l("You don't have that many empty bottles!"); + close; + +L_NotEnoughMoney: + mes l("You don't have enough gp! You need @@ gp.", .@Cost); + close; + +L_NotEnoughSlots: + mes l("You don't have room for these bottles!"); close; OnInit: - .sex = G_MALE; + .sex = G_OTHER; .distance = 3; end; } -- cgit v1.2.3-60-g2f50 From 18bde47f7b73f30f4aaa7f2430de531b6cea8d91 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sat, 10 Feb 2018 13:56:28 -0200 Subject: Mahoud/Well testing --- npc/003-1/mahoud.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++-- npc/003-1/well.txt | 36 +----------------------------------- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/npc/003-1/mahoud.txt b/npc/003-1/mahoud.txt index ae169bbe5..a1705b5eb 100644 --- a/npc/003-1/mahoud.txt +++ b/npc/003-1/mahoud.txt @@ -1,13 +1,55 @@ // Author: // Saulc +// Jesusalva -003-1,46,79,0 script Mahoud NPC_MONA,{ +003-1,46,79,0 script Mahoud NPC_PLAYER,{ + .@COST_PER_BOTTLE = 50; -hello; + mes l("I can fill your bottle with water for only @@ gp the bottle.", .@COST_PER_BOTTLE); + mes l("After all, I am the Well Master!"); + input .@count; + + if (.@count == 0) + close; + .@Cost = .@count * .@COST_PER_BOTTLE; + .@empty = countitem("EmptyBottle"); + + if (.@empty < .@count) + goto L_NotEnoughBottles; + if (Zeny < .@Cost) + goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("BottleOfSweaWater") == 0 + && .@empty > .@count) + goto L_NotEnoughSlots; + + set Zeny, Zeny - .@Cost; + delitem "EmptyBottle", .@count; + getitem "BottleOfSweaWater", .@count; // TODO FIXME: "Swea" water? Also, this is not sea water... + close; + +L_NotEnoughBottles: + mes l("You don't have that many empty bottles!"); + close; + +L_NotEnoughMoney: + mes l("You don't have enough gp! You need @@ gp.", .@Cost); + close; + +L_NotEnoughSlots: + mes l("You don't have room for these bottles!"); + close; OnInit: .sex = G_MALE; .distance = 3; + + .@npcId = getnpcid(0, "Mahoud"); + setunitdata(.@npcId, UDT_HEADTOP, 1304); + setunitdata(.@npcId, UDT_HAIRSTYLE, 7); + setunitdata(.@npcId, UDT_HAIRCOLOR, 17); + end; } diff --git a/npc/003-1/well.txt b/npc/003-1/well.txt index 272deda1a..926a14dac 100644 --- a/npc/003-1/well.txt +++ b/npc/003-1/well.txt @@ -3,42 +3,8 @@ // Jesusalva 003-1,45,80,0 script Well NPC_NO_SPRITE,{ - .@COST_PER_BOTTLE = 50; - mes l("This well have a mechanism to fill water bottles. It costs @@ gp per bottle.", .@COST_PER_BOTTLE); - mes l("You need the bottle, too. Too bad, not even water is free in this world!"); - input .@count; - - if (.@count == 0) - close; - .@Cost = .@count * .@COST_PER_BOTTLE; - .@empty = countitem("EmptyBottle"); - - if (.@empty < .@count) - goto L_NotEnoughBottles; - if (Zeny < .@Cost) - goto L_NotEnoughMoney; - getinventorylist; - if (@inventorylist_count == 100 - && countitem("BottleOfSweaWater") == 0 - && .@empty > .@count) - goto L_NotEnoughSlots; - - set Zeny, Zeny - .@Cost; - delitem "EmptyBottle", .@count; - getitem "BottleOfSweaWater", .@count; // TODO FIXME: "Swea" water? Also, this is not sea water... - close; - -L_NotEnoughBottles: - mes l("You don't have that many empty bottles!"); - close; - -L_NotEnoughMoney: - mes l("You don't have enough gp! You need @@ gp.", .@Cost); - close; - -L_NotEnoughSlots: - mes l("You don't have room for these bottles!"); + mes l("This well is too deep and you don't have a bucket."); close; OnInit: -- cgit v1.2.3-60-g2f50 From 296d20961826dc1342669fb92753392b20b0fd89 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sat, 10 Feb 2018 14:58:59 -0200 Subject: Remove unused folder annoying me --- npc/003-1-2-2/_import.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 npc/003-1-2-2/_import.txt diff --git a/npc/003-1-2-2/_import.txt b/npc/003-1-2-2/_import.txt deleted file mode 100644 index b20297f59..000000000 --- a/npc/003-1-2-2/_import.txt +++ /dev/null @@ -1,2 +0,0 @@ -// Map 003-1-2-2: Tulimshar -// This file is generated automatically. All manually added changes will be removed when running the Converter. -- cgit v1.2.3-60-g2f50 From 5ba80cc8cf983b239ba80b4b0394459bb12794f8 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sat, 10 Feb 2018 15:03:11 -0200 Subject: An awesome mahoud so we may easily broadcast changes later. --- npc/003-1/mahoud.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/npc/003-1/mahoud.txt b/npc/003-1/mahoud.txt index a1705b5eb..e14047929 100644 --- a/npc/003-1/mahoud.txt +++ b/npc/003-1/mahoud.txt @@ -44,10 +44,13 @@ L_NotEnoughSlots: OnInit: .sex = G_MALE; - .distance = 3; + .distance = 7; .@npcId = getnpcid(0, "Mahoud"); - setunitdata(.@npcId, UDT_HEADTOP, 1304); + // Check items.xml for info about this + setunitdata(.@npcId, UDT_HEADTOP, 2906); + setunitdata(.@npcId, UDT_HEADMIDDLE, 1304); + setunitdata(.@npcId, UDT_HEADBOTTOM, 2201); setunitdata(.@npcId, UDT_HAIRSTYLE, 7); setunitdata(.@npcId, UDT_HAIRCOLOR, 17); -- cgit v1.2.3-60-g2f50