From c9370fa60f775be16e3d14030817335304315812 Mon Sep 17 00:00:00 2001 From: Joseph Botosh Date: Tue, 27 Oct 2015 17:39:54 +0200 Subject: fix getrandompoint function --- npc/functions/npcmovegraph.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt index 284c8c19..5629736c 100644 --- a/npc/functions/npcmovegraph.txt +++ b/npc/functions/npcmovegraph.txt @@ -227,7 +227,7 @@ function script getnextmovecmd { function script getrandompoint { if (getargcount() < 4) { - debugmes "error: getrandompoint(x, y, w, h) takes 4 arguments"; + debugmes "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments"; return -1; } @@ -244,7 +244,7 @@ function script getrandompoint { for (.@poke = 0; .@poke < .@max_pokes; .@poke++) { .@rx = rand(.@x1, .@x2); - .@ry = rand(.@y2, .@y2); + .@ry = rand(.@y1, .@y2); if (checknpccell(.@map$, .@rx, .@ry, cell_chkpass)) goto L_Found; } -- cgit v1.2.3-70-g09d2