summaryrefslogtreecommitdiff
path: root/npc/005-1-1/main.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/005-1-1/main.txt')
-rw-r--r--npc/005-1-1/main.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/npc/005-1-1/main.txt b/npc/005-1-1/main.txt
index 7549d12fc..263ff287d 100644
--- a/npc/005-1-1/main.txt
+++ b/npc/005-1-1/main.txt
@@ -12,7 +12,7 @@
function getcropid {
.@x=getarg(0);
.@y=getarg(1);
- .@w=11; // Width of a row
+ .@w=12; // Width of a row
.@offx=23; // First X
.@offy=22; // First Y
.@i=0;
@@ -28,6 +28,8 @@
.@i+=(.@y-.@offy)*.@w;
// Now we add any X beyond .@offx
.@i+=(.@x-.@offx);
+ // I don't know why this offset happens, but it happens
+ .@i+=(.@y-.@offy);
// Do not go out of scope if maggot wander outside the area
return(sprintf("%03d", max(0, min(.@i, 168))));
}