Nedd some help please. getting some errors =[

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ginokid
Posts: 35
Joined: Tue Jul 28, 2009 10:30 pm

Nedd some help please. getting some errors =[

#1 Post by ginokid » Wed Jul 29, 2009 6:41 am

Hi guys, first time using this macro bot. I followed the directions as good as possible. Need some help please. :)

Thx
Gino :)

Sat Dec 31 23:46:02 2005 : MicroMacro v0.99
Sat Dec 31 23:46:02 2005 : Processor Type: 2X 586, OS: Windows XP Service Pack 3
Sat Dec 31 23:46:02 2005 : Lua initialized successfully.
Sat Dec 31 23:46:02 2005 : Lua libs opened successfully.
Sat Dec 31 23:46:02 2005 : LuaCoco is available.
Sat Dec 31 23:46:02 2005 : Lua glues exported.
Sat Dec 31 23:46:02 2005 : Keyboard layout: US English
Sat Dec 31 23:46:02 2005 : Configurations run.
Sat Dec 31 23:46:02 2005 : Executing script "createpath.lua".
==================================================

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x210 in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x290 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x298 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x29c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x278 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x0 in memoryReadString(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x18 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x1c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2d0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x260 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x30 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x34 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x28e in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2cc in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x244 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x38 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:02 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x40 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x210 in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x290 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x298 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x29c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x278 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x0 in memoryReadString(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x18 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x1c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2d0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x260 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x30 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x34 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x28e in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2cc in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x244 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x38 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:46:09 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x40 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)


stack traceback:
C:\micromacro\lib\lib.lua:497: in function 'startMacro'
scripts/rom/createpath.lua:74: in main chunk

----------TRACEBACK END----------

Sat Dec 31 23:46:46 2005 : scripts/rom/waypoints/rom\bot.lua.xml: No such file or directory
Sat Dec 31 23:46:46 2005 : Execution of createpath.lua complete.
Sat Dec 31 23:46:46 2005 : Execution error: Runtime error
Sat Dec 31 23:46:46 2005 : Collecting garbage...
Sat Dec 31 23:46:46 2005 : 40KB freed.



Sat Dec 31 23:47:31 2005 : Executing script "bot.lua".
==================================================

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x210 in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x290 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x298 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x29c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2a8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x278 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x0 in memoryReadString(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x18 in memoryReadUInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x1c in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2d0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x260 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x30 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x34 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x28e in memoryReadByte(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2c4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x2cc in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x244 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x38 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : WARNING: Failure reading memory from 0xA9C340 at 0x40 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Sat Dec 31 23:47:40 2005 : RoM Bot Version 2.44

stack traceback:
C:\micromacro\lib\lib.lua:497: in function 'startMacro'
C:\micromacro\scripts\rom\bot.lua:326: in main chunk

----------TRACEBACK END----------

Sat Dec 31 23:47:40 2005 : C:/micromacro/scripts/rom/functions.lua:17: attempt to call global 'findPatternInProcess' (a nil value)
Sat Dec 31 23:47:40 2005 : Execution of bot.lua complete.
Sat Dec 31 23:47:40 2005 : Execution error: Runtime error
Sat Dec 31 23:47:40 2005 : Collecting garbage...
Sat Dec 31 23:47:40 2005 : 132KB freed.
Last edited by ginokid on Wed Jul 29, 2009 7:12 am, edited 2 times in total.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Nedd some help please. attempt to call global 'setStartKey'

#2 Post by d003232 » Wed Jul 29, 2009 7:09 am

Can you post the first 20 lines of your bot.lua file? Or attached the whole file?
The RoM Bot Online Wiki needs your help!

ginokid
Posts: 35
Joined: Tue Jul 28, 2009 10:30 pm

Re: Nedd some help please. attempt to call global 'setStartKey'

#3 Post by ginokid » Wed Jul 29, 2009 7:12 am

Heres my bot.lua

BOT_VERSION = 2.44;

include("database.lua");
include("addresses.lua");
include("classes/player.lua");
include("classes/waypoint.lua");
include("classes/waypointlist.lua");
include("classes/waypointlist_wander.lua");
include("classes/node.lua");
include("functions.lua");
include("settings.lua");


DEBUG_ASSERT = false; -- Change to 'true' to debug memory reading problems.

settings.load();
setStartKey(settings.hotkeys.START_BOT.key);
setStopKey(settings.hotkeys.STOP_BOT.key);



__WPL = nil; -- Way Point List
__RPL = nil; -- Return Point List


print("\n\169\83\111\108\97\114\83\116\114\105\107\101\32" ..
"\83\111\102\116\119\97\114\101\44\32\119\119\119\46\115" ..
"\111\108\97\114\115\116\114\105\107\101\46\110\101\116\n");
function main()
if( getVersion() < 100 ) then
while( keyPressed(startKey) ) do yrest(1); end;
else
while( keyPressed(getStartKey()) ) do yrest(1); end;
end

local forcedProfile = nil;
local forcedPath = nil;
local forcedRetPath = nil;

for i = 2,#args do
if( args == "update" and getVersion() >= 100 ) then
include("update.lua");
end

local foundpos = string.find(args, ":", 1, true);
if( foundpos ) then
local var = string.sub(args, 1, foundpos-1);
local val = string.sub(args, foundpos+1);

if( var == "profile" ) then
forcedProfile = val;
elseif( var == "path" ) then
forcedPath = val;
elseif( var == "retpath" ) then
forcedRetPath = val;
end
end
end

local versionMsg = sprintf("RoM Bot Version %0.2f", BOT_VERSION);
cprintf(cli.lightblue, versionMsg .. "\n");
logMessage(versionMsg);

database.load();

attach(getWin());

if( not checkExecutableCompatible() ) then
cprintf(cli.yellow, "!! Notice: !!\n");
printf("The game may have been updated or altered.\n" ..
"It is recommended that you run rom/update.lua\n\n");

logMessage("Game exectuable may have changed. You should run rom/update.lua");
end



local playerAddress = memoryReadIntPtr(getProc(), staticcharbase_address, charPtr_offset);
printf("Attempt to read playerAddress\n");

if( playerAddress == nil ) then playerAddress = 0; end;
logMessage(sprintf("Using static base address 0x%X, player address 0x%X",
tonumber(staticcharbase_address), tonumber(playerAddress)));

player = CPlayer(playerAddress);
player:initialize();
player:update();

mousePawn = CPawn( memoryReadIntPtr(getProc(), staticcharbase_address, mousePtr_offset) );
printf("mousePawn: 0x%X\n", mousePawn.Address);

printf("playerAddr: 0x%X\n", player.Address);
printf("playerTarget: 0x%X\n", player.TargetPtr);

--settings.load();
--setStartKey(settings.hotkeys.START_BOT.key);
--setStopKey(settings.hotkeys.STOP_BOT.key);

-- Set window name, install timer to automatically do it once a second
if( forcedProfile ) then
setWindowName(getHwnd(), sprintf("RoM Bot %s [%s]", BOT_VERSION, forcedProfile));
settings.loadProfile(forcedProfile);
registerTimer("timedSetWindowName", secondsToTimer(1), timedSetWindowName, forcedProfile);
else
settings.loadProfile(player.Name);
setWindowName(getHwnd(), sprintf("RoM Bot %s [%s]", BOT_VERSION, player.Name));
registerTimer("timedSetWindowName", secondsToTimer(1), timedSetWindowName, player.Name);
end

-- Load "english" first, to fill in any gaps in the users' set language.
local function setLanguage(name)
include(getExecutionPath() .. "/language/" .. name .. ".lua");
end

local lang_base = {};
setLanguage("english");
for i,v in pairs(language) do lang_base = v; end;
setLanguage(settings.options.LANGUAGE);
for i,v in pairs(lang_base) do
if( language == nil ) then
language = v;
end
end;
lang_base = nil; -- Not needed anymore, destroy it.
logMessage("Language: " .. settings.options.LANGUAGE);

if( settings.profile.options.PATH_TYPE == "wander" or forcedPath == "wander" ) then
__WPL = CWaypointListWander();
__WPL:setRadius(settings.profile.options.WANDER_RADIUS);
__WPL:setMode("wander");
elseif( settings.profile.options.PATH_TYPE == "waypoints" or forcedPath ) then
__WPL = CWaypointList();
else
error("Unknown PATH_TYPE in profile.", 0);
end


-- This logic prevents files from being loaded if wandering was forced
if( forcedPath and not (forcedPath == "wander") ) then
__WPL = CWaypointList();
__WPL:load(getExecutionPath() .. "/waypoints/" .. forcedPath .. ".xml");
else
if( settings.profile.options.WAYPOINTS ) then
__WPL:load(getExecutionPath() .. "/waypoints/" .. settings.profile.options.WAYPOINTS);
end
end

if( forcedRetPath ) then
__RPL = CWaypointList();
__RPL:load(getExecutionPath() .. "/waypoints/" .. forcedRetPath .. ".xml");
else
if( settings.profile.options.RETURNPATH ) then
__RPL = CWaypointList();
__RPL:load(getExecutionPath() .. "/waypoints/" .. settings.profile.options.RETURNPATH);
end
end

-- Output filename only if mode isnt set to wandering
if not( __WPL:getMode() == "wander" ) then
cprintf(cli.green, language[0], __WPL:getFileName());
end

if( __RPL and __RPL:getFileName() ) then
cprintf(cli.green, language[1], __RPL:getFileName());
end


-- Start at the closest waypoint.
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));

local distBreakCount = 0; -- If exceedes 3 in a row, unstick.
while(true) do
player:update();
player:logoutCheck();

if( not player.Alive ) then
-- Make sure they aren't still trying to run off
keyboardRelease(settings.hotkeys.MOVE_FORWARD.key);
keyboardRelease(settings.hotkeys.MOVE_BACKWARD.key);
keyboardRelease(settings.hotkeys.ROTATE_LEFT.key);
keyboardRelease(settings.hotkeys.ROTATE_RIGHT.key);
keyboardRelease(settings.hotkeys.STRAFF_LEFT.key);
keyboardRelease(settings.hotkeys.STRAFF_RIGHT.key);

-- Take a screenshot. Only works on MicroMacro 1.0 or newer
if( getVersion() >= 100 ) then
showWindow(getWin(), sw.show);
yrest(500);
local sfn = getExecutionPath() .. "/profiles/" .. player.Name .. ".bmp";
saveScreenshot(getWin(), sfn);
printf(language[2], sfn);
end

if( type(settings.profile.events.onDeath) == "function" ) then
local status,err = pcall(settings.profile.events.onDeath);
if( status == false ) then
local msg = sprintf("onDeath error: %s", err);
error(msg);
end
end


if( settings.profile.hotkeys.RES_MACRO ) then
cprintf(cli.red, language[3]);
keyboardPress(settings.profile.hotkeys.RES_MACRO.key);
yrest(5000);

cprintf(cli.red, language[4]);
yrest(60000); -- wait 1 minute before going about your path.
player:update();
end

-- Must have a resurrect macro and waypoints set to be able to use
-- a return path!
if( settings.profile.hotkeys.RES_MACRO and player.Returning == false and
__RPL ~= nil ) then
player.Returning = true;
__RPL:setWaypointIndex(1); -- Start from the beginning
else
pauseOnDeath();
end
end

if( player.TargetPtr ~= 0 and not player:haveTarget() ) then
player:clearTarget();
end


if( player:haveTarget() ) then
local target = player:getTarget();
if( settings.profile.options.ANTI_KS ) then
if( target:haveTarget() and target:getTarget().Address ~= player.Address and (not player:isFriend(CPawn(target.TargetPtr))) ) then
cprintf(cli.red, language[5], target.Name);
else
player:fight();
end
else
player:fight();
end

player:update();
if( player.Battling ) then
cprintf(cli.green, language[35]);
end;

local aggroWaitStart = os.time();
while(player.Battling) do
if( player:haveTarget() ) then
break;
end;

if( os.difftime(os.time(), aggroWaitStart) > 3 ) then
cprintf(cli.red, language[34]);
break;
end;

yrest(10);
player:update();
end
else
local wp = nil; local wpnum = nil;

if( player.Returning ) then
wp = __RPL:getNextWaypoint();
wpnum = __RPL.CurrentWaypoint;
else
wp = __WPL:getNextWaypoint();
wpnum = __WPL.CurrentWaypoint;
end;

cprintf(cli.green, language[6], wpnum, wp.X, wp.Z);
local success, reason = player:moveTo(wp);


if( player.TargetPtr ~= 0 and (not player:haveTarget()) ) then
player:clearTarget();
end

if( player.TargetPtr == 0 ) then
player:checkPotions();
player:checkSkills();
end


if( success ) then
if( player.Returning ) then
-- Completed. Return to normal waypoints.
if( __RPL.CurrentWaypoint >= #__RPL.Waypoints ) then
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));
player.Returning = false;
cprintf(cli.yellow, language[7]);
else
__RPL:advance();
end
else
__WPL:advance();
end
else
if( not reason == WF_TARGET ) then
cprintf(cli.red, language[8]);
end

if( reason == WF_DIST ) then
distBreakCount = distBreakCount + 1;
else
if( distBreakCount > 0 ) then
distBreakCount = 0;
end
end

if( reason == WF_STUCK or distBreakCount > 3 ) then
-- Get ourselves unstuck, then!
cprintf(cli.red, language[9]);
distBreakCount = 0;
player:clearTarget();
player:unstick();
end
end

coroutine.yield();

end
end

end
startMacro(main);

ginokid
Posts: 35
Joined: Tue Jul 28, 2009 10:30 pm

Re: Nedd some help please. getting some errors =[

#4 Post by ginokid » Wed Jul 29, 2009 7:15 am

I used the SVN update and I have revision 104

ginokid
Posts: 35
Joined: Tue Jul 28, 2009 10:30 pm

Re: Nedd some help please. getting some errors =[

#5 Post by ginokid » Wed Jul 29, 2009 7:22 am

Now when I execute rom\bot.lua I get this =[
Its driving me crazy!

Sun Jan 01 00:06:40 2006 : MicroMacro v0.99
Sun Jan 01 00:06:40 2006 : Processor Type: 2X 586, OS: Windows XP Service Pack 3
Sun Jan 01 00:06:40 2006 : Lua initialized successfully.
Sun Jan 01 00:06:40 2006 : Lua libs opened successfully.
Sun Jan 01 00:06:40 2006 : LuaCoco is available.
Sun Jan 01 00:06:40 2006 : Lua glues exported.
Sun Jan 01 00:06:40 2006 : Keyboard layout: US English
Sun Jan 01 00:06:40 2006 : Configurations run.
Sun Jan 01 00:06:50 2006 : Executing script "bot.lua".
==================================================

Sun Jan 01 00:06:50 2006 : C:\micromacro\scripts\rom\bot.lua:18: attempt to call global 'setStartKey' (a nil value)
Sun Jan 01 00:06:50 2006 : Execution of bot.lua complete.
Sun Jan 01 00:06:50 2006 : Execution error: Runtime error
Sun Jan 01 00:06:50 2006 : Collecting garbage...
Sun Jan 01 00:06:50 2006 : 77KB freed.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Nedd some help please. getting some errors =[

#6 Post by d003232 » Wed Jul 29, 2009 7:31 am

Your bot.lua has the wrong version. Some SVN missmatch. Just delete all content of your rom rolder except the folders 'profiles' and 'waypoints' and do the sVN update again.
The RoM Bot Online Wiki needs your help!

ginokid
Posts: 35
Joined: Tue Jul 28, 2009 10:30 pm

Re: Nedd some help please. getting some errors =[

#7 Post by ginokid » Wed Jul 29, 2009 7:55 am

Ok I got it to work!!!!

I have a return path question.

In the return path xml is the code the same type as the way point type? Meaning if I just make a waypoint from the graveyard to where my botting spot is can I just use it as my return path.xml?

If I want the bot to just wander, can I just remove the waypoint.xml from the bot script?

Thank you for the help!

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Nedd some help please. getting some errors =[

#8 Post by Administrator » Wed Jul 29, 2009 8:12 am

Use code tags as per the instructions. I'm not going to bother reading that garbage as is.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests