RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

RoM bot

#1 Post by Administrator » Mon Dec 15, 2008 4:50 pm

Requirements:
MicroMacro 1.05, which you can get here
RoM scripts (see Setup below)

See also: German instructions, Russian instructions

For instructions on how to use the bot and it's various functions after you have installed it, check out the RoM Bot wiki

This is the official RoM bot. If you find it on another website that does not credit the original author, or does not contain the proper license, please contact me. Other sites are allowed to mirror the files, but they must include the correct license and give credit where credit is due.

Setup:
  • Download a copy of MicroMacro if you haven't already.
  • Download the latest from Github using this link: https://github.com/SolarStrike-Software ... master.zip
  • Extract the contents of the .zip
  • Copy the extracted
    rom-bot
    folder into the
    micromacro/scripts/
    folder of your MicroMacro copy.
You may now use
micromacro/scripts/rom-bot/rombot_updater.exe
to update your scripts as new versions are released, or update them manually by repeating the process above.

See the wiki for details on how to configure and use the bot.


Skill over-rides:
You can over-ride a few options to your skills. Particularly, those skills you want to limit to only use in battle, or set to use at a certain health percent (such as heals).
  • priority : Higher priority means it will use it before other skills. Use 100+ for your opening attacks.
    hpper : Percentage of HP to use the skill at. This will over-ride HP_LOW for heals!
    inbattle : Either true or false. True means it only can be used in battle; false means if only can be used out of battle.
    pullonly : Can only be used in the pull phase at the begin of a fight. They will not be used during the rest of the fight
    maxuse : Skills with that option will only be used 'maxuse'-times within a fight.
Example:

Code: Select all

<skill name="PRIEST_REGENERATE" priority="110" hpper="90" inbattle="true" />

Command-line options:
You can provide command-line arguments to the script by appending commands after the script name. For example, type in "rom/bot.lua update" to update the script.
  • update
    • This allows you to scan the game's executable for updated pointers, which will automatically rewrite and update your addresses.lua file. Doing this should allow you to fix errors after the game updates.
  • profile:<profile name>
    • Manually set which profile to load, rather than assume by character name. This should be used if your character's name contains non-ASCII characters, such as 'ë'. You should not append the .xml extension. This profile must also reside in the profile directory; just as any other profile would.

      It is highly suggested that you only use ASCII characters in your profile name; even if your character's name contains non-ASCII characters.

      Example: rom/bot.lua profile:myName
  • path:<waypoint script name>
    • Manually set which waypoint script to load (do not include the .xml extension!). This must reside in the 'wapoints' folder.

      Example: rom/bot.lua path:anthive
  • retpath:<waypoint script name>
    • Exactly like the 'path' command above, except it sets the return path to follow when you die.

Common problems:
My skills aren't working. Why?
  • Press escape and go to interface settings. Turn on Self Cast. This will help for buffs at least.

RoM just updated and now the bot doesn't work anymore! What do I do?
  • Run the executable
    rom-bot/rombot_updater.exe
    (just double-click this file). This will update your scripts automatically.
    If you still have issues, feel free to create a new topic on the forum, and contain as much information about the error(s) you're having as you possibly can.

SVN, Always have the newest version
Advanced: Simple:
  • First, I suggest you install Tortoise SVN. Once installed, you may need to reboot your machine. Now, locate your 'rom' folder (should be inside micromacro/scripts/). If it doesn't exist, create it. Right-click it. Select 'SVN Checkout'.

    Now, a window should open. Inside "URL of repository:", enter this url:
    https://github.com/elverion/rom-bot/trunk

    Everything else can be left as default. Click OK and it should begin downloading and updating all of your files. Now that you've got it all setup, you can simply right click the 'rom' folder again and select SVN update to update it to the current revision.
Problems with file conflicts?
  • This typically happens if you've made any modifications to the scripts or if you tried to update a very old bot. Conflicts are indicated by yellow icons next to the files (red icons mean the file has been modified but there is no conflict). To fix it, right click the 'rom' folder and select "TortoiseSVN/Revert", select all the files you wish to restore and click 'OK'. It should now be an exact copy of the current revision. This wont affect user created files like profiles and waypoint files.

Credits:

Scripting:
Elverion
d003232
droppen
KillerTHC
x_art (russian adjustment)
rock5
lisa

Database:
Elverion
d003232
Zephyr

Bug fixes:
Zilvermoon
memcpy

Translation:
x_art - Russian
filipsworks - Polish
VoidMain - Spanish
jduartedj - Portuguese

If you're not on this list and you think you deserve to be, please PM me. I give credit where credit is due.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#2 Post by Zephyr » Mon Dec 15, 2008 10:50 pm

My typo in the Skills.xml under mage. The second 14 should be a 15.

Code: Select all

	<skill name="MAGE_GALAXY_13" mana="77" range="150" type="damage" target="enemy" />
	<skill name="MAGE_GALAXY_14" mana="80" range="150" type="damage" target="enemy" />
	<skill name="MAGE_GALAXY_14" mana="84" range="150" type="damage" target="enemy" />
Should be.

Code: Select all

	<skill name="MAGE_GALAXY_13" mana="77" range="150" type="damage" target="enemy" />
	<skill name="MAGE_GALAXY_14" mana="80" range="150" type="damage" target="enemy" />
	<skill name="MAGE_GALAXY_15" mana="84" range="150" type="damage" target="enemy" />
bad habit of copy and pasting in a rush.

Will work on getting scout skills tonight.

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

Re: RoM bot

#3 Post by Administrator » Tue Dec 16, 2008 12:37 am

Thanks again Zephyr. There are a couple of bugs I'm working on fixing right now (and a new feature or two). Hopefully it'll be done by tomorrow. The new start/stop keys will be DELETE and END. Why? Because F5 would cause you to target a friendly when in a party, which was causing a rather severe bug. The root of that specific bug has been fixed, but it's still good practice to avoid trying to fight a friendly unit.

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

Re: RoM bot

#4 Post by Administrator » Tue Dec 16, 2008 7:40 pm

Just made an update. The scripts are attached to the first post. It just fixes some bugs and makes a few minor adjustments. Multiple bots are now fully working. A "friend" system has been added for party bots. A few minor changes made to the CWaypointList class to allow for running of a waypoint list in reverse (or reversing your direction at run-time). A few more skills have been added as well.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#5 Post by Zephyr » Tue Dec 16, 2008 10:11 pm

made a tweak myself. Since depending on lag or mob it seems to put me on top of the mob at 5.
I believe I did it right, it does seem to work. set it so that it pulls the distance from my profile xml file.

original

Code: Select all

	
elseif( settings.profile.options.COMBAT_TYPE == "melee" ) then
				-- Run right at them and begin combat
				local movedist = dist - 5; if( movedist < 0 ) then movedist = 0; end;

				posX = self.X + math.cos(angle) * (movedist);
				posZ = self.Z + math.sin(angle) * (movedist);
			end
modified

Code: Select all

	
elseif( settings.profile.options.COMBAT_TYPE == "melee" ) then
				-- Run right at them and begin combat
				local movedist = dist - settings.profile.options.MELEE_DISTANCE; if( movedist < 0 ) then movedist = 0; end;

				posX = self.X + math.cos(angle) * (movedist);
				posZ = self.Z + math.sin(angle) * (movedist);
			end
then added

Code: Select all

<option name="MELEE_DISTANCE" value="20" />
Into my profile xml file in the options section.

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

Re: RoM bot

#6 Post by Administrator » Wed Dec 17, 2008 7:00 pm

I think I've made a couple changes which should be better.

Code: Select all

		-- We're a bit TOO close...
		if( dist < 10.0 ) then
			printf("Too close. backing up\n");
			keyboardHold( settings.hotkeys.MOVE_BACKWARD.key);
			yrest(500);
			keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key);
			self:update();
			dist = distance(self.X, self.Z, target.X, target.Z);
		end

		if( dist > 40.0 ) then
			printf("Moving in\n");
			-- move into distance
			local angle = math.atan2(target.Z - self.Z, target.X - self.X);
			local posX, posZ;
			local success, reason;


			if( settings.profile.options.COMBAT_TYPE == "ranged" ) then
				-- Move closer in increments
				local movedist = dist/10; if( dist < 50 ) then movedist = dist - 5; end;
				if( dist > 50 and movedist < 50 ) then movedist = 50 end;

				posX = self.X + math.cos(angle) * (movedist);
				posZ = self.Z + math.sin(angle) * (movedist);
				success, reason = player:moveTo(CWaypoint(posX, posZ), true);
			elseif( settings.profile.options.COMBAT_TYPE == "melee" ) then
				--[[
				-- Run right at them and begin combat
				local movedist = dist - 5; if( movedist < 0 ) then movedist = 0; end;

				posX = self.X + math.cos(angle) * (movedist);
				posZ = self.Z + math.sin(angle) * (movedist);
				]]
				success, reason = player:moveTo(target, true);
			end

			if( not success ) then
				player:unstick();
			end

			yrest(500);
		end
With this code, melee classes should have better target tracking. That means that instead of running around like idiots while the target is moving, they will continuously update coordinates and move in the direction the target is moving. Give it a try for me and let me know how well this works.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#7 Post by Zephyr » Wed Dec 17, 2008 8:39 pm

So you mean I will not be running around like a gnome rogue trying to dodge? lol

Will test when I get home. Late work night today.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#8 Post by Zephyr » Thu Dec 18, 2008 10:06 am

Does seem a little better. It will still do a dist break when it gets to the point where the mob was. At which time it will move forward and backwards a couple of times in different directions. Sometimes it is fighting the mob during this process.

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

Re: RoM bot

#9 Post by Administrator » Thu Dec 18, 2008 4:24 pm

I made some improvements to the skill system. First, I've added the "concentration" energy type, and changed the scout skills to use concentration. I've also added the "dot" skill type and converted a couple skills (bone chill, vampire arrows, electric bolt) to DOT instead of damage. The difference here is that you can set in your profile (option DOT_PERCENT) to only use DOTs if the enemy target has more than x% of HP. 90% is a good value to ensure that you lead with a DOT. I've also fixed a couple skill descriptions in the database, and added skill prioritizing (more important skills get precedence).

I'll continue to work with the dist break system to ensure that it doesn't happen as much as it does.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#10 Post by Zephyr » Thu Dec 18, 2008 11:19 pm

how does it go about knowing what the priority is? Im gonna guess that it reads the order in the profile xml file.

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

Re: RoM bot

#11 Post by Administrator » Fri Dec 19, 2008 1:41 am

It's by type. Heals have precedence over buffs, buffs over DoTs, and DoTs over damage. They are checked if they need to be used in that order now. It's actually controlled in the database.lua file, but I intend to allow priorities to be manually set in the skill database.

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

Re: RoM bot

#12 Post by Administrator » Fri Dec 19, 2008 10:30 pm

Updated made. New addresses added and I've made changes to the skill system. Now, it will automatically estimate mana use for each skill (based on the rate the mana increases at), so that we don't have to update the database for each level of each skill. Now, to add skills to your profile, you'd use:

Code: Select all

		<skill name="PRIEST_RISING_TIDE" level="10" hotkey="VK_2" modifier="" />

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

Re: RoM bot

#13 Post by 3cmSailorfuku » Sat Dec 20, 2008 10:10 am

Administrator wrote:Updated made. New addresses added and I've made changes to the skill system. Now, it will automatically estimate mana use for each skill (based on the rate the mana increases at), so that we don't have to update the database for each level of each skill. Now, to add skills to your profile, you'd use:

Code: Select all

		<skill name="PRIEST_RISING_TIDE" level="10" hotkey="VK_2" modifier="" />
It works for me now aswell, thanks. What you should mention in the setup, that you have to activate SelfCast and AutoLoot in the Interface options.
Also the bot doesn't seem to detect the Spell Ranks for me, eg. It shows casting Rising Tide level: 1 while it's actually level 7.
This might be because of different Client versions though.


btw amazing bot, I love the spell managment <3

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

Re: RoM bot

#14 Post by Administrator » Sat Dec 20, 2008 4:45 pm

Also the bot doesn't seem to detect the Spell Ranks for me, eg. It shows casting Rising Tide level: 1 while it's actually level 7.
Really? That's strange. You've got this in your profile, right:

Code: Select all

<skill name="PRIEST_RISING_TIDE" level="7" hotkey="whatever" />
If you ommit the level attribute, it it assumed to be level 1.

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

Re: RoM bot

#15 Post by Administrator » Tue Dec 23, 2008 7:37 pm

I've made a couple more fixes (mostly to the skills system). Please help me test it and remove any remaining bugs. In your opinion, is this bot ready to be made public?

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#16 Post by Zephyr » Tue Dec 23, 2008 8:32 pm

I would say it is pretty much there. my main thing lately is the casting of spells in an specified order. It would help with spells that require another to get an extra boost in dmg or starting off with dots. The only other thing has been health pots being used when needed. Have seen it continue fighting with out using a pot. Other times i see it spamming the pot button waiting on the timer

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#17 Post by Zephyr » Wed Dec 24, 2008 2:25 am

looks like there is some additions of priority in the code. but get an error in regards to my profile

MM screen:
Started.
playerAddr: 0x22F34B00
tab1: SCOUT_JOINT_BLOW, 70
tab1: ROGUE_BLIND_STAB, 70
tab1: ROGUE_VILLAINY,70
tab1: ROGUE_LACERATION, 70
tab1: SCOUT_SHOT, 70
tab1: SCOUT_VAMPIRE_ARROWS, 80
tab1: ROGUE_POISON, 90
tab1: SCOUT_JOINT_BLOW,70
tab1: ROGUE_SHADOWFACE, 70
E:/Program Files/micromacro/scripts/rom/settings.lua:75: attempt to index local 'tab1' (a nil value)
MM Log:
Wed Dec 24 00:10:44 2008 : Executing script "bot.lua".
==================================================


stack traceback:
E:\Program Files\micromacro\lib\lib.lua:476: in function 'startMacro'
E:\Program Files\micromacro\scripts\rom/bot.lua:112: in main chunk

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

Wed Dec 24 00:10:45 2008 : E:/Program Files/micromacro/scripts/rom/settings.lua:75: attempt to index local 'tab1' (a nil value)
Wed Dec 24 00:10:45 2008 : Execution of bot.lua complete.
Wed Dec 24 00:10:45 2008 : Execution error: Runtime error
Wed Dec 24 00:10:45 2008 : Collecting garbage...
Wed Dec 24 00:10:45 2008 : 329KB freed.
Now if i remove skills and leave only three it works. otherwise it will not run. I have 8 skills listed in my profile. Also it will repeat a skill in the MM screen until there are less than 4 skills in my profile.



here is my current profile

Code: Select all

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

		<option name="COMBAT_TYPE" value="melee" />
		<option name="ANTI_KS" value="true" />
		<option name="WAYPOINTS" value="valleyeat.xml" />
		<option name="LOOT" value="true" />
		<option name="LOOT_TIME" value="1200" />
		<option name="ENERGY_STORAGE_1" value="energy" />
		<option name="ENERGY_STORAGE_2" value="concentration" />
		<option name="POTION_COOLDOWN" value="15" />
		<option name="MAX_FIGHT_TIME" value="60" />
		<option name="DOT_PERCENT" value="90" />
	</options>

	<friends>
		<friend name="MyOtherCharacter1" />
		<friend name="MyOtherCharacter2" />
	</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_JOINT_BLOW" hotkey="VK_5" modifier="" />
		<skill name="SCOUT_FROST_ARROW" hotkey="VK_9" modifier="" />
		<skill name="SCOUT_WIND_ARROWS" hotkey="VK_1" modifier="" />
		<skill name="SCOUT_VAMPIRE_ARROWS" hotkey="VK_2" modifier="" />
		<skill name="SCOUT_THROAT_ATTACK" hotkey="VK_7" modifier="" />
		<skill name="SCOUT_SHOT" hotkey="VK_3" modifier="" />
		<skill name="ROGUE_SHADOWFACE" hotkey="VK_4" modifier="" />
		<skill name="ROGUE_BLIND_STAB" hotkey="VK_6" modifier="" />
			</skills>
-->
	<skills>	
		<skill name="ROGUE_SHADOWFACE" level="24" hotkey="VK_1" />
		<skill name="ROGUE_VILLAINY" level="23" hotkey="VK_2" />
		<skill name="ROGUE_LACERATION" level="23" hotkey="VK_3" />
		<skill name="ROGUE_BLIND_STAB" level="1" hotkey="VK_4" />
		<skill name="SCOUT_VAMPIRE_ARROWS" level="18" hotkey="VK_5" />
		<skill name="ROGUE_POISON" level="1" hotkey="VK_6" />
		<skill name="SCOUT_SHOT" level="17" hotkey="VK_7" />
		<skill name="SCOUT_JOINT_BLOW" level="14" hotkey="VK_8" />
	</skills>

</profile>

and the first set of skills a commented out. they are meant for my scout.

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

Re: RoM bot

#18 Post by Administrator » Wed Dec 24, 2008 12:25 pm

Thanks for the report. I thought I had fixed that error, but it would appear not. I'll look into it and try to fully diagnose the problem.

Zephyr
Posts: 86
Joined: Fri Apr 18, 2008 8:10 pm

Re: RoM bot

#19 Post by Zephyr » Thu Dec 25, 2008 1:41 am

new address for patch 1802

Code: Select all

staticcharbase_address = 0x0086AB78; 
was lazy it didnt check others, besides current hp. bot running fine with just the new address

chr_offset still 560 as is char_hp offset is 31c

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

Re: RoM bot

#20 Post by Administrator » Thu Dec 25, 2008 4:29 am

I didn't even need to update my addresses today. Did you? It seems to be working just fine for me with the old staticbase.

Anyways, try using this fixed version of skillSort in settings.lua:

Code: Select all

	local skillSort = function(tab1, tab2)
		if( tab2.priority < tab1.priority ) then
			return true;
		end;

		return false;
	end
Does this prevent the error from happening?

Locked

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 25 guests