I found a "bug" in my code. You might wanna change that code to this:Administrator wrote:Thanks for the info. I've committed the changes to (hopefully) fix the death detection problem and improvement to wander to SVN.
Code: Select all
function resumeCallback()
if( settings.profile.options.PATH_TYPE == "wander" ) then
player:update();
printf("Setting wander point to our current location (%d, %d).\n", player.X, player.Z);
__WPL = CWaypointListWander();
__WPL:setRadius(settings.profile.options.WANDER_RADIUS);
end
end
atResume(resumeCallback);
I also changed the CWaypointListWander:getnextWaypoint()
Code: Select all
function CWaypointListWander:getNextWaypoint()
local randAngle = math.random(0, 359);
local randAngleRad = math.rad(randAngle);
local randRadius = math.random(0, self.Radius);
local randX = math.cos(randAngleRad) * randRadius;
local randY = math.sin(randAngleRad) * randRadius;
local X = self.OrigX + randX;
local Z = self.OrigZ + randY;
return CWaypoint(X, Z);
end
I also did some other changes, to implement on the fly waypoint generation (clear, insert, save) from inside bot.lua. But due to the way RoM's code is currently structured, it didn't really work as it should. We would need to change all the code to prevent it from being blocking function calls (like player:moveTo()).
BTW, Administrator, have you tried to map the memory on the client where the enemy/entity list is?
cya