summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-06 16:05:30 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-06 16:05:30 -0300
commit3ed122bd3564fa3face7dc1b71c5902467fb8a0e (patch)
treeb83bbfd20ce977e0feb3466ccc3e55ddb1e14642
parent29b3f0f75932c58e7f670e8be99edcc9815bf1e5 (diff)
downloadserverdata-jesusalva/alige.tar.gz
serverdata-jesusalva/alige.tar.bz2
serverdata-jesusalva/alige.tar.xz
serverdata-jesusalva/alige.zip
Test locally so it can receive a `test` label :)jesusalva/alige
-rw-r--r--npc/000-2-1/alige.txt12
-rw-r--r--npc/001-2-22/alige.txt12
2 files changed, 10 insertions, 14 deletions
diff --git a/npc/000-2-1/alige.txt b/npc/000-2-1/alige.txt
index 24c19d68..6b444b49 100644
--- a/npc/000-2-1/alige.txt
+++ b/npc/000-2-1/alige.txt
@@ -167,21 +167,19 @@ L_Accepted:
L_GiveFood:
mes "";
- menuint
- l("I don't have anything good for you today."), -1;
mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
.@id = requestitem();
if (.@id <= 0) goto L_Quit; // Quit message.
if (countitem(.@id) == 0) goto L_Quit; // If don't have the food
- if (array_find(.vegetables, .@id)) goto L_NoReward; // In case of wrong food.
- if (array_find(.poisonable, .@id)) goto L_Poison; // In case of poisoned food (or food with effects).
+ if (array_find(.vegetables, .@id) >= 0) goto L_NoReward; // In case of wrong food.
+ if (array_find(.poisonable, .@id) >= 0) goto L_Poison; // In case of poisoned food (or food with effects).
if (.@id == Piberries) goto L_NoMore; // In case of Piberries.
if (.@id == RedPlushWine) goto L_Drunk; // In case of Alcohol.
// Default message for non food
- if (!array_find(.commonfood, .@id)) goto L_NoFood;
+ if (array_find(.commonfood, .@id) == -1) goto L_NoFood;
inventoryplace Piberries, 3;
delitem .@id, 1;
@@ -317,8 +315,8 @@ OnInit:
.distance = 2;
// Array of foods (remember to update in 001-2-22 as well)
- setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegsSandwich;
- setarray .vegatables, Acorn, LettuceLeaf, Croconut, MananaSandwich;
+ setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegSandwich;
+ setarray .vegetables, Acorn, LettuceLeaf, Croconut, MananaSandwich;
setarray .poisonable, SeaDrops, PinkBlobime, PumpkinSeeds, UrchinMeat, EasterEgg;
end;
}
diff --git a/npc/001-2-22/alige.txt b/npc/001-2-22/alige.txt
index 4ceccf70..c5bb8aed 100644
--- a/npc/001-2-22/alige.txt
+++ b/npc/001-2-22/alige.txt
@@ -171,21 +171,19 @@ L_Accepted:
L_GiveFood:
mes "";
- menuint
- l("I don't have anything good for you today."), -1;
mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
.@id = requestitem();
if (.@id <= 0) goto L_Quit; // Quit message.
if (countitem(.@id) == 0) goto L_Quit; // If don't have the food
- if (array_find(.vegetables, .@id)) goto L_NoReward; // In case of wrong food.
- if (array_find(.poisonable, .@id)) goto L_Poison; // In case of poisoned food (or food with effects).
+ if (array_find(.vegetables, .@id) >= 0) goto L_NoReward; // In case of wrong food.
+ if (array_find(.poisonable, .@id) >= 0) goto L_Poison; // In case of poisoned food (or food with effects).
if (.@id == Piberries) goto L_NoMore; // In case of Piberries.
if (.@id == RedPlushWine) goto L_Drunk; // In case of Alcohol.
// Default message for non food
- if (!array_find(.commonfood, .@id)) goto L_NoFood;
+ if (array_find(.commonfood, .@id) == -1) goto L_NoFood;
inventoryplace Piberries, 3;
delitem .@id, 1;
@@ -321,8 +319,8 @@ OnInit:
.distance = 2;
// Array of foods (remember to update in 000-2-1 as well)
- setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegsSandwich;
- setarray .vegatables, Acorn, LettuceLeaf, Croconut, MananaSandwich;
+ setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegSandwich;
+ setarray .vegetables, Acorn, LettuceLeaf, Croconut, MananaSandwich;
setarray .poisonable, SeaDrops, PinkBlobime, PumpkinSeeds, UrchinMeat, EasterEgg;
end;
}