summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2016-06-03 02:44:35 +0200
committerReid <reidyaro@gmail.com>2016-06-03 02:44:35 +0200
commit65903ff911853a54f741045e410fd6a07ac60aa4 (patch)
tree8219f43941e1f7ba0cf07df7905266fbf86b6bc4
parent67f8187a78b2ccb3a3f30467cdb510076bb0f296 (diff)
downloadserverdata-65903ff911853a54f741045e410fd6a07ac60aa4.tar.gz
serverdata-65903ff911853a54f741045e410fd6a07ac60aa4.tar.bz2
serverdata-65903ff911853a54f741045e410fd6a07ac60aa4.tar.xz
serverdata-65903ff911853a54f741045e410fd6a07ac60aa4.zip
Add function to bleach only Q'Pid's dyed clothes.
-rw-r--r--npc/001-2-12/oscar.txt49
1 files changed, 44 insertions, 5 deletions
diff --git a/npc/001-2-12/oscar.txt b/npc/001-2-12/oscar.txt
index d6913cd3..5248a5a2 100644
--- a/npc/001-2-12/oscar.txt
+++ b/npc/001-2-12/oscar.txt
@@ -18,20 +18,59 @@
function item_is_bleachable
{
- return (@item == 1301 || @item == 1302);
+ getinventorylist;
+
+ if (@inventorylist_card1[@item_index] != 0)
+ {
+ if ((@inventorylist_card1[@item_index] > 5021) ||
+ (@inventorylist_card1[@item_index] < 5000))
+ {
+ return 0;
+ }
+ .@is_bleachable = 1;
+ }
+ if (@inventorylist_card2[@item_index] != 0)
+ {
+ if ((@inventorylist_card2[@item_index] > 5021) ||
+ (@inventorylist_card2[@item_index] < 5000))
+ {
+ return 0;
+ }
+ .@is_bleachable = 1;
+ }
+ if (@inventorylist_card3[@item_index] != 0)
+ {
+ if ((@inventorylist_card3[@item_index] > 5021) ||
+ (@inventorylist_card3[@item_index] < 5000))
+ {
+ return 0;
+ }
+ .@is_bleachable = 1;
+ }
+ if (@inventorylist_card4[@item_index] != 0)
+ {
+ if ((@inventorylist_card4[@item_index] > 5021) ||
+ (@inventorylist_card4[@item_index] < 5000))
+ {
+ return 0;
+ }
+ .@is_bleachable = 1;
+ }
+
+ return .@is_bleachable;
}
function remove_cards_from_item
{
- .@item = -1;
+ .@item_index = -1;
- speech 5,
+ speech 4,
l("What item would you like to bleach?");
narrator 5,
l("You can drag and drop an item to the NPC window or select an item through your inventory.");
- @item = requestitemindex();
+ @item_index = requestitemindex();
if (!item_is_bleachable())
{
speech 4,
@@ -50,7 +89,7 @@
l("Ok, let me see..."),
l("...");
- failedremovecardsindex @item, 1;
+ failedremovecardsindex @item_index, 1;
speech 12,
l("..."),