diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-03-22 23:33:51 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-03-22 23:33:51 -0300 |
commit | a9175bf3d6916cf83f655ee95a1b56a8c8fef49f (patch) | |
tree | 4fc5972e0b378ab2cfe8084daa371430f2cbd799 /npc/003-6/cyndala.txt | |
parent | 85c2f45af79ac9fffc11ef3176b951278192e222 (diff) | |
download | serverdata-a9175bf3d6916cf83f655ee95a1b56a8c8fef49f.tar.gz serverdata-a9175bf3d6916cf83f655ee95a1b56a8c8fef49f.tar.bz2 serverdata-a9175bf3d6916cf83f655ee95a1b56a8c8fef49f.tar.xz serverdata-a9175bf3d6916cf83f655ee95a1b56a8c8fef49f.zip |
Update a bit Cyndala's scripts to 2020 standards
Diffstat (limited to 'npc/003-6/cyndala.txt')
-rw-r--r-- | npc/003-6/cyndala.txt | 357 |
1 files changed, 183 insertions, 174 deletions
diff --git a/npc/003-6/cyndala.txt b/npc/003-6/cyndala.txt index 81aa67847..6207205bc 100644 --- a/npc/003-6/cyndala.txt +++ b/npc/003-6/cyndala.txt @@ -12,206 +12,215 @@ // Reid 003-6,33,30,0 script Cyndala NPC_FEMALE,{ - function explain_dyes { + function explain_dyes; + function item_is_bleachable; + function remove_cards_from_item; + function give_yellow_dye; + function deny_yellow_dye; + function craft_yellow_dye; + + mesn; + mesq l("Hello, darling!"); + mes ""; + + do + { .@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 %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) { + 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(), "Technical problem, gimme info about an item."); + + switch (@menu) { + case 2: + remove_cards_from_item(); + break; + case 3: + explain_dyes(); + break; + case 4: + craft_yellow_dye(); + break; + case 5: + .@item = requestitemindex(); + mes "Item index selected: " + str(.@item); + mes "slots=" + str(MAX_SLOTS); + for (.@i = 0; .@i < MAX_SLOTS; .@i++) + { + mes "slot " + str(.@i) + " = " + str(getcardbyindex(.@item, .@i)); + } + mes str(@inventorylist_card1[.@item]); + mes str(YellowDye); + mes "item options:"; + for (.@i = 0; .@i < 5; .@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; + default: + mes ""; + mesn; + mesq l("I wish you a good time in town."); + next; + break; + } + + } while (@menu != 1); + + + closeclientdialog; + goodbye; + close; + +///////////////////////////////////////////////////////////////////////////////// +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 %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("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; - } + 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); - if (.@item_index < 0) - return false; + } +} + +function item_is_bleachable +{ + .@item_index = getarg(0); + if (.@item_index < 0) + return false; - getinventorylist(); - if (is_staff()) + getinventorylist(); + if (is_staff()) mesf "Item Index %d (%s) - ID %d", .@item_index, getitemlink(@inventorylist_id[.@item_index]), @inventorylist_id[.@item_index]; - if (@inventorylist_card1[.@item_index] != 0) - { - if ((@inventorylist_card1[.@item_index] > YellowDye) || - (@inventorylist_card1[.@item_index] < CrimsonDye)) - { - return false; - } - .@is_bleachable = true; + if (@inventorylist_card1[.@item_index] != 0) { + if ((@inventorylist_card1[.@item_index] > YellowDye) || + (@inventorylist_card1[.@item_index] < CrimsonDye)) { + return false; } - - return .@is_bleachable; + .@is_bleachable = true; } - function remove_cards_from_item - { - .@item_index = -1; + return .@is_bleachable; +} - speech S_FIRST_BLANK_LINE, - l("What item would you like to bleach?"); +function remove_cards_from_item +{ + .@item_index = -1; - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You can drag and drop an item to the NPC window or select an item through your inventory."); + speech S_FIRST_BLANK_LINE, + l("What item would you like to bleach?"); - .@item_index = requestitemindex(); - if (!item_is_bleachable(.@item_index)) - { - speech S_LAST_NEXT, - l("You should know this, an item like this can't be bleached."); - - return; - } + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You can drag and drop an item to the NPC window or select an item through your inventory."); + .@item_index = requestitemindex(); + if (!item_is_bleachable(.@item_index)) { speech S_LAST_NEXT, - l("Your mind is set? You will probably lose the color dye during this process."); + l("You should know this, an item like this can't be bleached."); - switch (askyesno()) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Ok, let me see..."), - l("..."); - - if (rand2(1, 1000) > readparam2(bLuk)) - failedremovecardsindex .@item_index, 1; - else - successremovecardsindex(.@item_index); - - // First option slot of weapon: Raises STR in 5 - // setequipoption(EQI_HAND_R, 1, VAR_STRAMOUNT, 5); - // This is an option :3 - - speech S_LAST_NEXT | S_NO_NPC_NAME, - l("..."), - l("Here it is, clean like a whistle!"); - break; - case 2: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Is it truly a hard choice to make?"); - 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; - } + return; } - 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(); + speech S_LAST_NEXT, + l("Your mind is set? You will probably lose the color dye during this process."); + + switch (askyesno()) { + case 1: + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Ok, let me see..."), + l("..."); + + if (rand2(1, 1000) > readparam2(bLuk)) + failedremovecardsindex .@item_index, 1; + else + successremovecardsindex(.@item_index); + + // First option slot of weapon: Raises STR in 5 + // setequipoption(EQI_HAND_R, 1, VAR_STRAMOUNT, 5); + // This is an option :3 + + speech S_LAST_NEXT | S_NO_NPC_NAME, + l("..."), + l("Here it is, clean like a whistle!"); + break; + case 2: + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Is it truly a hard choice to make?"); + break; } + return; +} - mesn; - mesq l("Hello, darling!"); - mes ""; +function give_yellow_dye { + .@q = getq(TulimsharQuest_Cyndala); - 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) - { - case 2: - remove_cards_from_item(); - break; - case 3: - explain_dyes(); - break; - case 4: - craft_yellow_dye(); - break; - case 5: - .@item = requestitemindex(); - mes "Item index selected: " + str(.@item); - mes "slots=" + str(MAX_SLOTS); - for (.@i = 0; .@i < MAX_SLOTS; .@i++) - { - mes "slot " + str(.@i) + " = " + str(getcardbyindex(.@item, .@i)); - } - mes str(@inventorylist_card1[.@item]); - mes str(YellowDye); - mes "item options:"; - for (.@i = 0; .@i < 5; .@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; - default: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("I wish you a good time in town."); - break; - } + inventoryplace YellowDye, 1, EmptyBottle, 1; + Zeny = Zeny - 50; + delitem BottleOfSewerWater, 1; + delitem PiouFeathers, 50; - } while (@menu != 1); + 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; + } + return; +} - closeclientdialog; - goodbye; - close; +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; + return; +} +function craft_yellow_dye { + if (countitem(BottleOfSewerWater) < 1 || + countitem(PiouFeathers) < 50 || + Zeny < 50) + deny_yellow_dye(); + else + give_yellow_dye(); + return; +} OnInit: .@npcId = getnpcid(.name$); |