summaryrefslogtreecommitdiff
path: root/npc/005-1-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-02-10 02:23:46 -0200
committerJesusaves <cpntb1@ymail.com>2019-02-10 02:23:46 -0200
commitf14dd87479929ca9f511292cb3ffb8b30f480279 (patch)
treef7c47d73675eddd568ade6d521f23bf37f4d9818 /npc/005-1-1
parent1a8dd297c6d068cc3a35eaec5a16f08f0391b517 (diff)
downloadserverdata-f14dd87479929ca9f511292cb3ffb8b30f480279.tar.gz
serverdata-f14dd87479929ca9f511292cb3ffb8b30f480279.tar.bz2
serverdata-f14dd87479929ca9f511292cb3ffb8b30f480279.tar.xz
serverdata-f14dd87479929ca9f511292cb3ffb8b30f480279.zip
Hopefully fix formula
Diffstat (limited to 'npc/005-1-1')
-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))));
}