RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
des82
Posts: 2
Joined: Sat Mar 07, 2009 10:37 pm

Re: RoM bot

#481 Post by des82 » Sat Mar 07, 2009 10:40 pm

<profile>
<options>
<option name="HP_LOW" value="70" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="69" />

<option name="COMBAT_TYPE" value="ranged" />
<option name="ANTI_KS" value="true" />
<option name="WAYPOINTS" value="test.xml" />
<option name="LOOT" value="true" />
<option name="LOOT_TIME" value="500" />
<option name="ENERGY_STORAGE_1" value="concentration" />
<option name="ENERGY_STORAGE_2" value="mana" />
<option name="POTION_COOLDOWN" value="15" />
<option name="MAX_FIGHT_TIME" value="20" />
<option name="DOT_PERCENT" value="100" />
</options>

<friends>
<friend name="Removed by Admin" />
</friends>

<hotkeys>
<hotkey name="HP_POTION" key="VK_MINUS" modifier="" />
<hotkey name="MP_POTION" key="VK_EQUAL" modifier="" />
<hotkey name="ATTACK" key="VK_0" modifier="" />
</hotkeys>




<skills >
<skill name="SCOUT_WIND_ARROWS" level="10" hotkey="VK_3" modifier="" />
<skill name="SCOUT_VAMPIRE_ARROWS" level="10" hotkey="VK_2" modifier="" />
</skills>
</profile>




This is my script. But i keep getting this error after the bot kills its first mob and the bot stops.

<< Desktop/micromacro/script/rom/classes/player.lua:282: attempt to compare number with nil >>

Anyone knows what is the problem?

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

Re: RoM bot

#482 Post by Administrator » Sat Mar 07, 2009 11:42 pm

des82 wrote: This is my script. But i keep getting this error after the bot kills its first mob and the bot stops.

<< Desktop/micromacro/script/rom/classes/player.lua:282: attempt to compare number with nil >>

Anyone knows what is the problem?
Add

Code: Select all

		<option name="COMBAT_DISTANCE" value="200" />
to your profile, right under the entry for COMBAT_TYPE.

des82
Posts: 2
Joined: Sat Mar 07, 2009 10:37 pm

Re: RoM bot

#483 Post by des82 » Sun Mar 08, 2009 1:12 am

ok thx...it is able to run now....

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

Re: RoM bot

#484 Post by Administrator » Sun Mar 08, 2009 2:35 pm

New version uploaded. There's one new feature, and a few skills have been updated with the new names.

Your profile can now store information on events. This is just a start, and more events will be added later (along with a few helper functions to make setting the events up easier). So far, there is on death, on leave combat, and on skill cast events.

onDeath, obviously, triggers when you die. onLeaveCombat is triggered after killing (and before looting) an enemy (may later be changed to check the actual in combat flag and use that). onSkillCast is triggered whenever you begin to cast a skill or spell (not after finished casting). onSkillCast also receives the skill being used (as a Lua table) as 'arg1'.

Examples:

Code: Select all

<onLeaveCombat>
	-- cast hide, lets assume hide is hotkeyed to KEY_7
	yrest(1000);
	keyboardPress(key.VK_7);
	yrest(500);
</onLeaveCombat>

Code: Select all

<onSkillCast>
	-- whenever we stun something with Lightning, lets chain it with Galaxy.
	-- again, assume galaxy is hotkeyed to KEY_7
	if( arg1.Name == "MAGE_LIGHTNING" ) then
		yrest(1000);
		keyboardPress(key.VK_7);
		yrest(5000);
	end
</onSkillCast>


As you see, the event system is very basic right now. Skill chaining will become much easier once it is tested more. Also, due to a bug in the XML parser, do not use comments inside event tags.

Yahell14
Posts: 9
Joined: Fri Feb 20, 2009 6:43 am

Re: RoM bot

#485 Post by Yahell14 » Mon Mar 09, 2009 10:43 am

Administrator wrote:New version uploaded. There's one new feature, and a few skills have been updated with the new names.

Your profile can now store information on events. This is just a start, and more events will be added later (along with a few helper functions to make setting the events up easier). So far, there is on death, on leave combat, and on skill cast events.

onDeath, obviously, triggers when you die. onLeaveCombat is triggered after killing (and before looting) an enemy (may later be changed to check the actual in combat flag and use that). onSkillCast is triggered whenever you begin to cast a skill or spell (not after finished casting). onSkillCast also receives the skill being used (as a Lua table) as 'arg1'.

Examples:

Code: Select all

<onLeaveCombat>
	-- cast hide, lets assume hide is hotkeyed to KEY_7
	yrest(1000);
	keyboardPress(key.VK_7);
	yrest(500);
</onLeaveCombat>

Code: Select all

<onSkillCast>
	-- whenever we stun something with Lightning, lets chain it with Galaxy.
	-- again, assume galaxy is hotkeyed to KEY_7
	if( arg1.Name == "MAGE_LIGHTNING" ) then
		yrest(1000);
		keyboardPress(key.VK_7);
		yrest(5000);
	end
</onSkillCast>


As you see, the event system is very basic right now. Skill chaining will become much easier once it is tested more. Also, due to a bug in the XML parser, do not use comments inside event tags.

babe, where do i need to add those commands? ^^
in what file?

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

Re: RoM bot

#486 Post by Administrator » Mon Mar 09, 2009 3:29 pm

Your profile. Look at profiles/Default.xml for an example.

Wolfgangwarriors
Posts: 10
Joined: Fri Feb 27, 2009 6:07 pm

Re: RoM bot

#487 Post by Wolfgangwarriors » Tue Mar 10, 2009 9:52 am

is the <ondeath> command to trigger a waypoint to go back to your original path where ever it may be at?
Last edited by Wolfgangwarriors on Tue Mar 10, 2009 6:09 pm, edited 2 times in total.

holystrikers
Posts: 25
Joined: Fri Mar 06, 2009 1:32 pm

Re: RoM bot

#488 Post by holystrikers » Tue Mar 10, 2009 11:07 am

all doing good before this update this morning ! i have this error i can't createpath.lua !!

log

Code: Select all

Tue Mar 10 12:13:13 2009 : MicroMacro v1.0
Tue Mar 10 12:13:13 2009 : Processor Type: 2X 586, OS: Windows Vista | Windows Server 2008 Service Pack 1
Tue Mar 10 12:13:13 2009 : LuaCoco is available.
Tue Mar 10 12:13:13 2009 : Lua glues exported.
Tue Mar 10 12:13:13 2009 : Keyboard layout: US English
Tue Mar 10 12:13:29 2009 : Executing script 'createpath.lua'
==================================================

Tue Mar 10 12:13:29 2009 : WARNING: Failure reading memory from 0x23FFDB4 at 0x884d98 in memoryReadIntPtr(). Error code 299 (Seule une partie d'une requête ReadProcessMemory ou WriteProcessMemory a été effectuée.)


stack traceback:
	...ers\Syrian\Desktop\micromacro\micromacro\lib\lib.lua:512: in function 'startMacro'
	scripts\rom/createpath.lua:73: in main chunk

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

Tue Mar 10 12:13:29 2009 : ...p/micromacro/micromacro/scripts/rom/classes/pawn.lua:40: attempt to perform arithmetic on field 'Address' (a nil value)
Tue Mar 10 12:13:29 2009 : Execution error: Runtime error

pawn.lua

Code: Select all

CPawn = class(
	function (self, ptr)
		self.Address = ptr;
		self.Name = "<UNKNOWN>";
		self.Guild = "<UNKNOWN>";
		self.Level = 1;
		self.Level2 = 1;
		self.HP = 1000;
		self.MaxHP = 1000;
		self.MP = 1000;
		self.MaxMP = 1000;
		self.MP2 = 1000;
		self.MaxMP2 = 1000;
		self.X = 0.0;
		self.Y = 0.0;
		self.Z = 0.0;
		self.TargetPtr = 0;
		self.Direction = 0.0;

		-- Directed more at player, but may be changed later.
		self.Battling = false; -- The actual "in combat" flag.
		self.Fighting = false; -- Internal use, does not depend on the client's battle flag
		self.Casting = false;
		self.Mana = 0;
		self.MaxMana = 0;
		self.Rage = 0;
		self.MaxRage = 0;
		self.Energy = 0;
		self.MaxEnergy = 0;
		self.Concentration = 0;
		self.MaxConcentration = 0;
		self.PotionLastUseTime = 0;

		if( self.Address ~= 0 and self.Address ~= nil ) then self:update(); end
	end
);

function CPawn:update()
	local proc = getProc();
	self.HP = memoryReadInt(proc, self.Address + charHP_offset);
	self.MaxHP = memoryReadInt(proc, self.Address + charMaxHP_offset);
	self.MP = memoryReadInt(proc, self.Address + charMP_offset);
	self.MaxMP = memoryReadInt(proc, self.Address + charMaxMP_offset);
	self.MP2 = memoryReadInt(proc, self.Address + charMP2_offset);
	self.MaxMP2 = memoryReadInt(proc, self.Address + charMaxMP2_offset);
	self.Name = memoryReadString(proc, self.Address + charName_offset);
	self.Level = memoryReadInt(proc, self.Address + charLevel_offset);
	self.Level2 = memoryReadInt(proc, self.Address + charLevel2_offset);

	self.TargetPtr = memoryReadInt(proc, self.Address + charTargetPtr_offset);

	self.X = memoryReadFloat(proc, self.Address + charX_offset);
	self.Y = memoryReadFloat(proc, self.Address + charY_offset);
	self.Z = memoryReadFloat(proc, self.Address + charZ_offset);

	if( self.MaxMP == 0 ) then
		-- Prevent division by zero for entities that have no mana
		self.MP = 1;
		self.MaxMP = 1;
	end

	if( self.MaxMP2 == 0 ) then
		-- Prevent division by zero for entities that have no secondary mana
		self.MP2 = 1;
		self.MaxMP2 = 1;
	end
end

function CPawn:haveTarget()
	local proc = getProc();
	self.TargetPtr = memoryReadInt(proc, self.Address + charTargetPtr_offset);
	if( self.TargetPtr == nil ) then self.TargetPtr = 0; end;

	if( self.TargetPtr == 0 ) then
		return false;
	end;

	local tmp = CPawn(self.TargetPtr);

	-- You can't be your own target!
	if( self.TargetPtr == self.Address ) then
		return false;
	end

	return (tmp.HP > 0);
end

function CPawn:getTarget()
	if( self.TargetPtr) then
		return CPawn(self.TargetPtr);
	else
		return nil;
	end
end

function CPawn:alive()
	self:update();
	if( HP <= 0 ) then
		return false;
	else
		return true;
	end
end

function CPawn:distanceToTarget()
	if( self.TargetPtr == 0 ) then return 0; end;

	local target = CPawn(self.TargetPtr);
	local tx,ty,tz = target.X, target.Y, target.Z;
	local px,py,pz = self.X, self.Y, self.Z;

	return math.sqrt( (tx-px)*(tx-px) + (ty-py)*(ty-py) + (tz-pz)*(tz-pz) );
end

ty in advance ! i think im not the only one who this prob this morning!

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: RoM bot

#489 Post by 3cmSailorfuku » Tue Mar 10, 2009 1:10 pm

Wolfgangwarriors wrote:Its not working. Did the new patch mess things up?
I'm sure you all have a bit of common sense to notice that it's not required to state the obvious.

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

Re: RoM bot

#490 Post by Administrator » Tue Mar 10, 2009 1:22 pm

Newest version (2.21) just uploaded. It should be fully compatible with the latest patch (1817). Let me know if you find any bugs.

Kizami
Posts: 24
Joined: Sat Feb 07, 2009 1:38 am

Re: RoM bot

#491 Post by Kizami » Tue Mar 10, 2009 1:27 pm

Administrator wrote:Newest version (2.21) just uploaded. It should be fully compatible with the latest patch (1817). Let me know if you find any bugs.
Sweet thanks for the hard work.
Will let you know if I find anything.

pathic
Posts: 2
Joined: Tue Mar 10, 2009 11:55 am

Re: RoM bot

#492 Post by pathic » Tue Mar 10, 2009 6:09 pm

Administrator wrote:Newest version (2.21) just uploaded. It should be fully compatible with the latest patch (1817). Let me know if you find any bugs.
Yes thank you for the update.

Yahell14
Posts: 9
Joined: Fri Feb 20, 2009 6:43 am

Re: RoM bot

#493 Post by Yahell14 » Tue Mar 10, 2009 7:12 pm

thanks for the update =]

User avatar
darkfayte
Posts: 33
Joined: Sat Jan 17, 2009 2:32 pm

Re: RoM bot

#494 Post by darkfayte » Tue Mar 10, 2009 9:24 pm

unable to read memory .. wont load for some reason.
also the rom/update.lua says it cant update .. will post a SS
I'm not botting, that's against the TOS. What i'm doing is sharing my account with my computer.

Goliath
Posts: 2
Joined: Tue Mar 10, 2009 10:22 pm

Re: RoM bot

#495 Post by Goliath » Tue Mar 10, 2009 10:24 pm

darkfayte wrote:unable to read memory .. wont load for some reason.
also the rom/update.lua says it cant update .. will post a SS

Code: Select all

Tue Mar 10 21:20:35 2009 : MicroMacro v1.0
Tue Mar 10 21:20:35 2009 : Processor Type: 2X 586, OS: Unknown Windows OS v5.2
Tue Mar 10 21:20:35 2009 : LuaCoco is available.
Tue Mar 10 21:20:35 2009 : Lua glues exported.
Tue Mar 10 21:20:35 2009 : Keyboard layout: US English
Tue Mar 10 21:20:38 2009 : Executing script 'bot.lua'
==================================================

Tue Mar 10 21:20:38 2009 : RoM Bot Version 2.21
Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3c0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3c8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3cc in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFD3C at 0x2f4 in memoryReadString(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3f8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x400 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x2ec in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xcc in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xd0 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xd4 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDB8 at 0x16c in memoryReadFloatPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDB8 at 0x16c in memoryReadFloatPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3c0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3c8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3cc in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d0 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d4 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3d8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFD3C at 0x2f4 in memoryReadString(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x3f8 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x400 in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0x2ec in memoryReadInt(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xcc in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xd0 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDC8 at 0xd4 in memoryReadFloat(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDB8 at 0x16c in memoryReadFloatPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)

Tue Mar 10 21:20:38 2009 : WARNING: Failure reading memory from 0x22CFDB8 at 0x16c in memoryReadFloatPtr(). Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request was completed.)


stack traceback:
	...gs\XXXXXXX\Desktop\micromacro\micromacro\lib\lib.lua:512: in function 'startMacro'
	scripts\rom/bot.lua:150: in main chunk

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

Tue Mar 10 21:20:38 2009 : scripts\rom/bot.lua:47: bad argument #1 to 'printf' (got nil)
Tue Mar 10 21:20:38 2009 : Execution error: Runtime error
I can successfully launch/start RoM Bot once after a fresh restart. After that I recieve this error over and over.

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

Re: RoM bot

#496 Post by Administrator » Tue Mar 10, 2009 11:24 pm

Open rom/addresses.lua in notepad. Look at the first line.

Code: Select all

staticcharbase_address = 0x008607cc; -- 0x86080C; 0x88CF90; 0x8AB280;
Replace the 0x008607cc with one of the other options (0x86080C; 0x88CF90; 0x8AB280;). See if that works.

Goliath
Posts: 2
Joined: Tue Mar 10, 2009 10:22 pm

Re: RoM bot

#497 Post by Goliath » Wed Mar 11, 2009 12:02 am

Administrator wrote:Open rom/addresses.lua in notepad. Look at the first line.

Code: Select all

staticcharbase_address = 0x008607cc; -- 0x86080C; 0x88CF90; 0x8AB280;
Replace the 0x008607cc with one of the other options (0x86080C; 0x88CF90; 0x8AB280;). See if that works.
replacing it with: 0x88CF90 worked like a charm! Thank you kindly =)

holystrikers
Posts: 25
Joined: Fri Mar 06, 2009 1:32 pm

Re: RoM bot

#498 Post by holystrikers » Wed Mar 11, 2009 9:17 am

ty for your hard work bud !!!!

EidolonX
Posts: 3
Joined: Thu Feb 19, 2009 8:25 pm

Re: RoM bot

#499 Post by EidolonX » Wed Mar 11, 2009 10:39 am

Well done as usual. Thanks for the update!

mike101
Posts: 8
Joined: Wed Feb 11, 2009 7:53 am

Behavior when getting a buff

#500 Post by mike101 » Wed Mar 11, 2009 10:54 am

annoying, strange or funny....

everytime the bot gets a buff and the bot is runnnig around (i.e. he is not fighting) he focuses the friendy priest and follow him from ystra to silverfall. This can end in hoplessly try getting back to the waypoints.

can this be patched ?

Locked

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests