From 6bf011745e0ced95158de80f623fcf5c91b7f07a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 17 Sep 2019 10:56:54 -0300 Subject: Light bringer NPC - Players are now officially allowed to hold it, as long as they got at least 60 LB Matrix points. --- npc/functions/mkbot.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'npc/functions/mkbot.txt') diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt index f71334435..adca606ed 100644 --- a/npc/functions/mkbot.txt +++ b/npc/functions/mkbot.txt @@ -114,6 +114,8 @@ OnTimer90000: // Try to warp randomly, up to 30 attempts .@e=0; .@x=0; .@y=0; + .@mx=getmapinfo(MAPINFO_SIZE_X, .mp$)-20; + .@my=getmapinfo(MAPINFO_SIZE_Y, .mp$)-20; do { if (.@e >= 30) { .mp$="boss"; @@ -121,12 +123,12 @@ OnTimer90000: .@y=45; break; } - .@x = rand2(20, 300); - .@y = rand2(20, 300); + .@x = rand2(20, .@mx); + .@y = rand2(20, .@my); .@e+=1; } while (!checknpccell(.mp$, .@x, .@y, cell_chkpass)); if (!checknpccell(.mp$, .@x, .@y, cell_chkpass)) { - Exception("gm.bot runtime error: GM_ERR_128 highlight @Jesusalva", RB_DEBUGMES|RB_IRCBROADCAST); .mp$="boss"; .@x=45; .@y=45; + Exception("mk.bot runtime error: GM_ERR_128 highlight @Jesusalva", RB_DEBUGMES|RB_IRCBROADCAST); .mp$="boss"; .@x=45; .@y=45; } unitwarp($@MK, .mp$, .@x, .@y); sleep(50); // For some reason or other, adding sleep(norid) and sleep2(rid). -- cgit v1.2.3-60-g2f50