summaryrefslogtreecommitdiff
path: root/npc/005-1-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-02-10 02:09:16 -0200
committerJesusaves <cpntb1@ymail.com>2019-02-10 02:09:16 -0200
commit2370dd22316c21d1b621258ed58ba8fe213424df (patch)
treee9532a0069110d28fc460c530cab358c2388da47 /npc/005-1-1
parent36040a2d577264bf8460ae1851ffdac622969381 (diff)
downloadserverdata-2370dd22316c21d1b621258ed58ba8fe213424df.tar.gz
serverdata-2370dd22316c21d1b621258ed58ba8fe213424df.tar.bz2
serverdata-2370dd22316c21d1b621258ed58ba8fe213424df.tar.xz
serverdata-2370dd22316c21d1b621258ed58ba8fe213424df.zip
I might have found the bug
Diffstat (limited to 'npc/005-1-1')
-rw-r--r--npc/005-1-1/main.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/npc/005-1-1/main.txt b/npc/005-1-1/main.txt
index e80aaa7b1..8b7ed2642 100644
--- a/npc/005-1-1/main.txt
+++ b/npc/005-1-1/main.txt
@@ -136,11 +136,11 @@ OnInteract:
// Destroy the crop if needed
.@cropId$=getcropid(.@x, .@y);
- if (array_find2(@DESTROYED, .@cropId$) == -1) {
- debugmes("[LOGIC] -------------------------- crop found");
- array_push(@DESTROYED, .@cropId$);
+ if (array_find(@DESTROYED$, .@cropId$) == -1) {
+ array_push(@DESTROYED$, .@cropId$);
debugmes("[LOGIC] -------------------------- crop destroyed");
- hideonnpc instance_npcname("#Marggo"+.@cropId$, MARGGO_ID);
+ // hideonnpc
+ disablenpc instance_npcname("#Marggo"+.@cropId$, MARGGO_ID);
}
// Tell the Maggot to walk to a random coordinate
@@ -195,10 +195,10 @@ OnFinish:
deltimer("Nylo#Marggo::OnSpawn");
deltimer("Nylo#Marggo::OnFinish");
MARGGO_ID=0;
- .@trueratio=100*getarraysize(@DESTROYED)/169;
+ .@trueratio=100*getarraysize(@DESTROYED$)/169;
.@ratio=100-.@trueratio;
- debugmes("Player lost %d crops", getarraysize(@DESTROYED));
- deletearray(@DESTROYED);
+ debugmes("Player lost %d crops", getarraysize(@DESTROYED$));
+ deletearray(@DESTROYED$);
mesn l("Nylo");
mes l("You managed to save @@ % of my crops!", .@ratio);