summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-04 17:44:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-04 17:44:22 +0300
commita97a98fb46d6ed7e90dc0ba8416d9a3d0b1bcb5f (patch)
tree0164cdb9dc41603d60c5a9fd6a988f98ef95e18b /npc
parent7e910ba495a74cc968fc630e5cfdb08753b4f228 (diff)
downloadserverdata-a97a98fb46d6ed7e90dc0ba8416d9a3d0b1bcb5f.tar.gz
serverdata-a97a98fb46d6ed7e90dc0ba8416d9a3d0b1bcb5f.tar.bz2
serverdata-a97a98fb46d6ed7e90dc0ba8416d9a3d0b1bcb5f.tar.xz
serverdata-a97a98fb46d6ed7e90dc0ba8416d9a3d0b1bcb5f.zip
Fix different issues in oscar script.
Diffstat (limited to 'npc')
-rw-r--r--npc/001-2-12/oscar.txt34
1 files changed, 19 insertions, 15 deletions
diff --git a/npc/001-2-12/oscar.txt b/npc/001-2-12/oscar.txt
index 873a9003..b604730a 100644
--- a/npc/001-2-12/oscar.txt
+++ b/npc/001-2-12/oscar.txt
@@ -18,39 +18,43 @@
function item_is_bleachable
{
+ .@item_index = getarg(0);
+ if (.@item_index < 0)
+ return false;
+
getinventorylist;
- if (@inventorylist_card1[@item_index] != 0)
+ if (@inventorylist_card1[.@item_index] != 0)
{
- if ((@inventorylist_card1[@item_index] > YellowCottonDye) ||
- (@inventorylist_card1[@item_index] < CrimsonCashmereDye))
+ if ((@inventorylist_card1[.@item_index] > YellowCottonDye) ||
+ (@inventorylist_card1[.@item_index] < CrimsonCashmereDye))
{
return false;
}
.@is_bleachable = true;
}
- if (@inventorylist_card2[@item_index] != 0)
+ if (@inventorylist_card2[.@item_index] != 0)
{
- if ((@inventorylist_card2[@item_index] > YellowCottonDye) ||
- (@inventorylist_card2[@item_index] < CrimsonCashmereDye))
+ if ((@inventorylist_card2[.@item_index] > YellowCottonDye) ||
+ (@inventorylist_card2[.@item_index] < CrimsonCashmereDye))
{
return false;
}
.@is_bleachable = true;
}
- if (@inventorylist_card3[@item_index] != 0)
+ if (@inventorylist_card3[.@item_index] != 0)
{
- if ((@inventorylist_card3[@item_index] > YellowCottonDye) ||
- (@inventorylist_card3[@item_index] < CrimsonCashmereDye))
+ if ((@inventorylist_card3[.@item_index] > YellowCottonDye) ||
+ (@inventorylist_card3[.@item_index] < CrimsonCashmereDye))
{
return false;
}
.@is_bleachable = true;
}
- if (@inventorylist_card4[@item_index] != 0)
+ if (@inventorylist_card4[.@item_index] != 0)
{
- if ((@inventorylist_card4[@item_index] > YellowCottonDye) ||
- (@inventorylist_card4[@item_index] < CrimsonCashmereDye))
+ if ((@inventorylist_card4[.@item_index] > YellowCottonDye) ||
+ (@inventorylist_card4[.@item_index] < CrimsonCashmereDye))
{
return false;
}
@@ -70,8 +74,8 @@
narrator 5,
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 = requestitemindex();
+ if (!item_is_bleachable(.@item_index))
{
speech 4,
l("You should know this, an item like this can't be bleached.");
@@ -89,7 +93,7 @@
l("Ok, let me see..."),
l("...");
- failedremovecardsindex @item_index, 1;
+ failedremovecardsindex .@item_index, 1;
speech 12,
l("..."),