From 65dbd8f66eb174f485ef399cb5f4600ff9ef49af Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 18 Jun 2019 22:24:08 -0300 Subject: Rewrite the wheel for no real reason --- npc/functions/gmbot.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'npc/functions/gmbot.txt') diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt index 1211c6fd9..eca1ad388 100644 --- a/npc/functions/gmbot.txt +++ b/npc/functions/gmbot.txt @@ -113,9 +113,8 @@ OnTimer90000: // Try to warp randomly, up to 30 attempts .@e=0; .@x=0; .@y=0; - while (!checknpccell(.mp$, .@x, .@y, cell_chkpass)) - { - if (.@e == 30) { + do { + if (.@e >= 30) { .mp$="boss"; .@x=45; .@y=45; @@ -123,8 +122,8 @@ OnTimer90000: } .@x = rand(20, 300); .@y = rand(20, 300); - ++.@e; - } + .@e+=1; + } while (!checknpccell(.mp$, .@x, .@y, cell_chkpass)); unitwarp($@MK, .mp$, .@x, .@y); sleep(50); // For some reason or other, adding sleep(norid) and sleep2(rid). .nearby=getusers(8); -- cgit v1.2.3-60-g2f50