summaryrefslogtreecommitdiff
path: root/npc/003-6/cyndala.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-22 18:14:34 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-22 18:14:34 -0300
commitbea0ca3f06002372f264a89378e54020945cb336 (patch)
tree2754d6b84756479e27d0d8d98a6ff248455fc1ca /npc/003-6/cyndala.txt
parentc1bea2545a779a7e2ec6a1d6f57607b2fd83b471 (diff)
downloadserverdata-bea0ca3f06002372f264a89378e54020945cb336.tar.gz
serverdata-bea0ca3f06002372f264a89378e54020945cb336.tar.bz2
serverdata-bea0ca3f06002372f264a89378e54020945cb336.tar.xz
serverdata-bea0ca3f06002372f264a89378e54020945cb336.zip
Partially rewrite Cyndala, she is more mentally stable now.
Diffstat (limited to 'npc/003-6/cyndala.txt')
-rw-r--r--npc/003-6/cyndala.txt25
1 files changed, 21 insertions, 4 deletions
diff --git a/npc/003-6/cyndala.txt b/npc/003-6/cyndala.txt
index fa901575c..05d7f8896 100644
--- a/npc/003-6/cyndala.txt
+++ b/npc/003-6/cyndala.txt
@@ -28,7 +28,7 @@
.@q = getq(TulimsharQuest_Cyndala);
select
l("Excuse me."),
- l("Could you bleach my clothes?"),
+ l("Could you bleach my equipment?"),
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.");
@@ -116,12 +116,24 @@ function item_is_bleachable
if (.@item_index < 0)
return false;
+ // Collect the item ID
+ delinventorylist();
getinventorylist();
+ .@x=@inventorylist_id[.@id];
+
+ // Debug info
if (is_staff())
mesf "Item Index %d (%s) - ID %d", .@item_index,
getitemlink(@inventorylist_id[.@item_index]),
@inventorylist_id[.@item_index];
+ // No duplicates
+ if (countitem(.@x) > 1) {
+ mesc l("You are carrying duplicates of the same item. Sorry, but I have no idea which one you want to tweak."), 1;
+ return false;
+ }
+
+ // Must have a card, d'oh
if (@inventorylist_card1[.@item_index] == 0)
return false;
@@ -145,9 +157,10 @@ function remove_cards_from_item
return;
}
+ .@item_id = @inventorylist_id[.@item_index]);
speech S_LAST_NEXT,
- l("Your mind is set? You will probably lose the dye or card during this process. You're bleaching a %s by the way.", getitemlink(@inventorylist_id[.@item_index]));
+ l("Your mind is set? You will probably lose all the dyes and/or cards during on the item during this process. You're bleaching a %s by the way.", getitemlink(.@item_id);
switch (askyesno()) {
case ASK_YES:
@@ -155,10 +168,14 @@ function remove_cards_from_item
l("Ok, let me see..."),
l("...");
- if (rand2(1, 1000) > readparam2(bLuk))
+ // FIXME: Register this on picklog
+ if (rand2(1, 800) > readparam2(bLuk)) {
failedremovecardsindex .@item_index, 1;
- else
+ logmes("Deleted Cards from item: "+.@item_id);
+ } else {
successremovecardsindex(.@item_index);
+ logmes("Removed Cards from item: "+.@item_id);
+ }
// First option slot of weapon: Raises STR in 5
// setequipoption(EQI_HAND_R, 1, VAR_STRAMOUNT, 5);