summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/005-1-1/main.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/npc/005-1-1/main.txt b/npc/005-1-1/main.txt
index 8b7ed2642..b52b21f90 100644
--- a/npc/005-1-1/main.txt
+++ b/npc/005-1-1/main.txt
@@ -28,7 +28,8 @@
.@i+=(.@y-.@offy)*.@w;
// Now we add any X beyond .@offx
.@i+=(.@x-.@offx);
- return(sprintf("%03d", .@i));
+ // Do not go out of scope if maggot wander outside the area
+ return(sprintf("%03d", max(0, min(.@i, 168))));
}
npctalk l("Go kill the maggots!");
@@ -132,7 +133,7 @@ OnInteract:
*/
.@mobId=atoi(.@key$);
getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, .@mobId);
- debugmes("[LOGIC] -------------------------- proccess %d", .@mobId);
+ //debugmes("[LOGIC] -------------------------- proccess %d", .@mobId);
// Destroy the crop if needed
.@cropId$=getcropid(.@x, .@y);
@@ -143,6 +144,7 @@ OnInteract:
disablenpc instance_npcname("#Marggo"+.@cropId$, MARGGO_ID);
}
+ /*
// Tell the Maggot to walk to a random coordinate
// (it may walk backwards due not preserving old data)
// This will cause maggot to abort a counter attack and to never stop
@@ -152,7 +154,8 @@ OnInteract:
unitwalk(.@mobId, 30, 30);
else
unitwalk(.@mobId, .@x+any(1, -1), .@y+any(1, -1));
- debugmes("[LOGIC] ------------------------------------- ai advanced");
+ */
+ //debugmes("[LOGIC] ------------------------------------- ai advanced");
}
htidelete(.@hti);