From f8ee1f65b34053afb0b57c032fe98bb1b4693914 Mon Sep 17 00:00:00 2001 From: Povo Date: Tue, 23 Mar 2021 01:02:50 +0000 Subject: Trithodex master patch yellowdye - Add Cyndala's Quest --- db/quest_db.conf | 4 +++ npc/003-6/cyndala.txt | 77 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/db/quest_db.conf b/db/quest_db.conf index a1d538c1a..ff8a09211 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -225,6 +225,10 @@ quest_db: ( Id: 66 Name: "TulimsharQuest_MobTutorial" }, +{ + Id: 67 + Name: "TulimsharQuest_Cyndala" +}, // ID 71 to 90: Halinarzo Quests { diff --git a/npc/003-6/cyndala.txt b/npc/003-6/cyndala.txt index 4fc303760..81aa67847 100644 --- a/npc/003-6/cyndala.txt +++ b/npc/003-6/cyndala.txt @@ -2,6 +2,8 @@ // Author: // Saulc // Jesusalva +// Dye Quest added by: +// Povo // Description: // Will be with dye functions for a while... May be wrong. Only Card2 is available per hercules rules @@ -10,16 +12,39 @@ // Reid 003-6,33,30,0 script Cyndala NPC_FEMALE,{ - function explain_dyes { + .@q = getq(TulimsharQuest_Cyndala); speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Dyes are a special kind of ink to make certain objects fancier."), l("Once you have the appropriate colorant for the item, ##bdrag the colorant##b to the material."), l("Example:"), - l("Drag and drop a @@ in a @@, and you will obtain a @@.", getitemlink(RedDye), getitemlink(ArtisTankTop), getitemlink(ArtisTankTop, RedDye)), + l("Drag and drop a %s in a %s, and you will obtain a %s.", getitemlink(YellowDye), + getitemlink(ArtisTankTop), getitemlink(ArtisTankTop, YellowDye)), l("Dye cards are not the only thing which exist, but they are the coolest!"); + if (.@q < 1) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("By the way, did you know that the official color of Tulimshar is yellow?"), + l("In fact, the Tulimshar Noble District is world-renowned for crafting high-quality yellow garments!"), + l("Normally I would offer to make you some %s, but economic problems in Halinarzo have caused a shortage of supplies...", + getitemlink(YellowDye)); + if (BaseLevel > 20 && + .@q < 1) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Wait a minute! I have an idea!"), + l("You look like you have enough experience to know your way around town..."), + l("If you can manage to gather the supplies I need, I can surely craft some %s for you!", + getitemlink(YellowDye)), + l("Of course, I do charge a nominal fee of for the service. %s GP to be exact.", fnum(50)), + l("In addition to my fee, I will also need the following items:"); + mesq l("%d/%d %s", countitem(BottleOfSewerWater), 1, getitemlink(BottleOfSewerWater)); + mesq l("%d/%d %s", countitem(PiouFeathers), 50, getitemlink(PiouFeathers)); + next; + mesq l("I am sure that an adventurer like you can gather everything in no time at all!"); + setq TulimsharQuest_Cyndala, 1; + } + } } - + function item_is_bleachable { .@item_index = getarg(0); @@ -93,6 +118,44 @@ break; } } + + function give_yellow_dye { + .@q = getq(TulimsharQuest_Cyndala); + + inventoryplace YellowDye, 1, EmptyBottle, 1; + Zeny = Zeny - 50; + delitem BottleOfSewerWater, 1; + delitem PiouFeathers, 50; + + mesn; + mesq l("Here you are, you won't find a dye more yellow than this!"); + getitem(YellowDye, 1); + getitem(EmptyBottle, 1); + + if (.@q == 1) { + setq TulimsharQuest_Cyndala, 2; + getexp 80, 0; + } + } + + function deny_yellow_dye { + mesn; + mesc l("I am sorry, but it does not look like you have everything. You will need to bring:"); + next; + mesc l("%d/%d %s", countitem(BottleOfSewerWater), 1, getitemlink(BottleOfSewerWater)); + mesc l("%d/%d %s", countitem(PiouFeathers), 50, getitemlink(PiouFeathers)); + mesc l("%s/%s GP", fnum(Zeny), fnum(50)); + next; + } + + function craft_yellow_dye { + if (countitem(BottleOfSewerWater) < 1 || + countitem(PiouFeathers) < 50 || + Zeny < 50) + deny_yellow_dye(); + else + give_yellow_dye(); + } mesn; mesq l("Hello, darling!"); @@ -100,10 +163,12 @@ do { + .@q = getq(TulimsharQuest_Cyndala); select l("Excuse me."), l("Could you bleach my clothes?"), l("What can you say about dyes?"), + rif(.@q > 0, l("I would like to order some dye.")), rif(is_staff(), l("Technical problem, gimme info about an item.")); switch (@menu) @@ -115,6 +180,9 @@ explain_dyes(); break; case 4: + craft_yellow_dye(); + break; + case 5: .@item = requestitemindex(); mes "Item index selected: " + str(.@item); mes "slots=" + str(MAX_SLOTS); @@ -127,7 +195,8 @@ mes "item options:"; for (.@i = 0; .@i < 5; .@i ++) { - mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), getitemoptionvaluebyindex(.@item, .@i)); + mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), + getitemoptionvaluebyindex(.@item, .@i)); } mes "Note named items (Card1 254 and 255) have Card3 and Card4 reserved"; break; -- cgit v1.2.3-60-g2f50