RoM Configuration

From SolarStrike wiki
Revision as of 04:39, 10 September 2009 by D003232 (talk | contribs)
Jump to: navigation, search

There are two main settings files for RoM bot: settings.xml and your profile. Profiles contain character-specific settings, while settings.xml contains hotkey settings and general preferences.

Settings.xml

Here is an example settings file:

<settings>
	<hotkeys>
		<!-- Cannot use modifiers -->
		<hotkey description="MOVE_FORWARD" key="VK_W" modifier="" />
		<hotkey description="MOVE_BACKWARD" key="VK_S" modifier="" />
		<hotkey description="ROTATE_LEFT" key="VK_A" modifier="" />
		<hotkey description="ROTATE_RIGHT" key="VK_D" modifier="" />
		<hotkey description="STRAFF_LEFT" key="VK_Q" modifier="" />
		<hotkey description="STRAFF_RIGHT" key="VK_E" modifier="" />
		<hotkey description="JUMP" key="VK_SPACE" modifier="" />

		<hotkey description="TARGET" key="VK_TAB" modifier="" />
		<hotkey description="TARGET_FRIEND" key="VK_J" modifier="" />
	</hotkeys>

	<options>
		<option name="ENABLE_FIGHT_SLOW_TURN" value="false" />
		<option name="MELEE_DISTANCE" value="45" />
		<option name="LANGUAGE" value="english" />
		<option name="DEBUG_ASSERT" value="true" />
	</options>
</settings>

Settings - Hotkeys

The hotkey settings are mostly self-explanatory. MOVE_FORWARD, obviously, coresponds to the key that makes your character walk forward. This is "W" by default. Note that all keys must preceeded by 'VK_'.

You may also notice the 'modifier'. Modifiers are keys such as CONTROL, SHIFT, or ALT. However, be aware that modifiers currently do not work. You should not set modifiers or you may run into problems. Instead, just leave the modifier set to an empty string("").

If your Runes of Magic bindings file (By default, is located at 'My Documents/Runes of Magic/bindings.txt') can be found and loaded, the RoM bot will instead use these settings so that you will not need to manually change your hotkey settings.

Settings - Options

ENABLE_FIGHT_SLOW_TURN Allows you to enable or disable "slow turning" in combat. If you have click-to-move on, you should not need this. It should be set to either "true" or "false". The default is "false".
MELEE_DISTANCE The distance at which to conduct melee combat. A value of 45 is good and should not be changed unless you have problems with being either too close or too far away for melee combat. Default: "45".
LANGUAGE Allows you to set your prefered language. Acceptable values are "english", "deutsch", and "french".
DEBUG_ASSERT This is a debugging option. When set to true, it will instantly exit on memory read errors and provide better debugging information. Default: "false".


Character Profiles

There are a few things you should know about character profiles first:

  • They typically are named after the character that will use them
  • They must be inside the 'rom/profiles' folder
  • They must follow proper XML formatting
  • They may contain custom Lua code

There are many profile options that can be set so it is highly recommended you make a copy of the default profile (Default.xml) and modify that to your character's needs instead of starting from scratch.

If you have extension hiding turned off, the .xml extension will not show on any of your files. If this is the case, do not add the .xml extension or you will end up with a file named something like Default.xml.xml. This may cause the profile to not be found and you may get errors. However, if you are able to see extensions, you should of course include the .xml extension when naming your profile.

Profile - Options

Healing and Potions
HP_LOW The percentage of health to use heal skills at
HP_LOW_POTION The percentage of health to use potions at
MP_LOW_POTION The percentage of mana to use mana potions at


Combat Options
COMBAT_TYPE Either "melee" or "ranged". Whichever best fits your character. Default: empty string (""). When unset (default), it will determine this automatically based on your class. There is no need to change this.
COMBAT_RANGED_PULL Whether or not to attempt to "pull" enemies towards you with ranged skills while you are a melee-based class
COMBAT_DISTANCE The distance to remain at when fighting. This only affects your character when COMBAT_TYPE is "ranged" or when you use COMBAT_RANGED_PULL as melee.
MAX_FIGHT_TIME If you stop damaging a target within this amount of time, you will skip this target (prevents getting stuck).
DOT_PERCENT Only use DOTs on this target if it has more than this percentage of HP.
ANTI_KS Whether or not to avoid stealing other players' kills. true or false.


Waypoint and Movement
WAYPOINTS The filename (including .xml extension) of the waypoint script to use. Must reside in the 'waypoints' folder!
RETURNPATH The filename (including .xml extension) of the waypoint script to use for returning after death. Must reside in the 'waypoints' folder!
PATH_TYPE The type of movement to use. Should be either 'waypoints' or 'wander'. See path types for more information.
WANDER_RADIUS The distance that your character is allowed to "wander" freely when using wander mode.
WAYPOINT_DEVIATION A 'random' offset applied to each waypoint in your path giving it less of a bot-like appearance; suggested value of 50. Lower value means you stick closer to your normal path; 0 means no deviation.
QUICK_TURN Whether or not to use quick turn mode. Quick turn mode emulates a click-to-move type movement style. This means your character does not stop to slowly turn around.


Level Difference
TARGET_LEVELDIF_ABOVE The maximum level of enemy above your own to engage in combat. i.e. a value of 5 means you will attack monsters up to 5 levels above your own.
TARGET_LEVELDIF_BELOW The maximum level of enemy below your own to engage in combat. i.e. a value of 5 means you will attack monsters up to 5 levels below your own.


Looting
LOOT Whether you want to loot enemies or not. True or false.
LOOT_IN_COMBAT Whether or not you want to pick up loot when other enemies are still attacking you.
LOOT_DISTANCE The max distance away a corpse can be that you will attempt to loot.
LOOT_PAUSE_AFTER A percentage probability to attempt a short "rest" (to look more human) after looting an enemy.


Resting
HP_REST If health falls below this percentage, then rest.
MP_LOW If mana falls below this percentage, then rest.


Log out & Resurrection Settings
LOGOUT_TIME Log out after this amount of time (in minutes). A value of 0 means you will not use this setting. Default: 0
LOGOUT_SHUTDOWN If you want to have the computer automatically shutdown after automatically logging out. Default: false
LOGOUT_WHEN_STUCK If your character gets stuck and cannot unstuck himself, you can use this option to have him log off. Default: true
LOGOUT_SHUTDOWN If you want to have the computer automatically shutdown after automatically logging out. Default: false.
RES_AUTOMATIC_AFTER_DEATH Whether or not your character should attempt resurrecting when he dies. Default: true

Profile - Friends

The "Friends" list can be used to mark targets that you do not want to attack. This can be other players that may be marked for PVP, or targets that you want to ignore (ie. "Ystra Ferret"). You may also add players to your friend list to get the bot to assist them when it notices they are fighting something.

Example:

	<friends>
		<!-- names of friends we help fighting or enemys we don't want to attack -->
		<friend name="Jack" /> <!-- A player, lets assist him -->
		<friend name="Jill" /> <!-- A player, do not attack her -->
		<friend name="Ambas" /> <!-- Elite, avoid him -->
	</friends>


Profile - Hotkeys

Although your main hotkeys are configured either through settings.xml or your bindings.txt files, hotkeys for action bars are character or profile specific.

We need only the hotkey to your ingame dummy macro.

MACRO The hotkey that we use to communicate with the ingame dummy macro. We will call RoM API functions that way


If you used a former bot version before: You now can delete your 'old' hotkeys like RES_MACRO, LOGOUT_MACRO, ...) We don't need them anymore.

Profile - Skills

The bot will only attempt to use skills that are noted in your profile. There are two different ways to set skills up: using the 'skills' tag (does not depend on class) or using 'skills_class' (where class is an actual in-game class) tags.

When using the 'skills' tag, it does not mater which main class your character currently is. This works pretty well for non-class specific skills that you wish to use for either class combination. For example, MAGE_FIREBALL is usable as both a mage/priest and priest/mage. Placing MAGE_FIREBALL into this tag will allow it to be used as either mage or priest primary class.

Example:

<skills>
    <skill name="MAGE_FIREBALL" hotkey="VK_7" priority="110" hpper="30" inbattle="true" />
</skills>

You may often use different sets of skills for your two classes. This is when a class-specific skill tag is strongly suggested (that way you don't need to re-confgiure your profile every time you change classes). Skills placed inside this tag will only be used when it matches your primary class. For example, 'skills_mage' skiills will only be used when mage is your primary class.

Example:

<skills_mage>
    <skill name="MAGE_FLAME" hotkey="VK_3" priority="80" />
</skills_mage>

<skills_priest>
    <skill name="PRIEST_RISING_TIDE" hotkey="VK_3" priority="80" />
</skills_priest>

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 (only for melee classes if option 'COMBAT_RANGED_PULL' is set to 'true').
maxuse Skills with that option will only be used 'maxuse'-times within a fight.
autouse Skills with autouse=false will not be automaticly casted from the Bot. Thats usefull if you want to cast a skill only in a event like '<onSkillCast>' .

Profile - Events

While botting, several events may be triggered. When these events are triggered, you may have custom Lua code executed. This code is placed directly in the event-specific tags inside your profile.

Events include:

  • onLoad : When the profile is loaded
  • onDeath: When your character dies
  • onLeaveCombat: When leaving combat
  • onSkillCast: Triggered after your character uses a skill

onSkillCast will, additionally, receive a Lua table ('arg1') that is a copy of the skill being cast. You can use this to query information about the skill. This can be useful in "skill chaining."

Examples:

    <onLoad>
        -- Load a waypoint path based on level
        if( player.Level > 10 ) then
            load_paths("some_path");
        else
            load_paths("some_other_path");
        end
    </onLoad>

    <onDeath>
        printf("\a\a\a"); -- BEEP BEEP BEEP!
        pauseOnDeath();   -- Wait for me. Do not continue script execution
    </onDeath>

    <onLeaveCombat>
	if( player.Level > player.free_counter1) then
		player.free_counter1 = player.Level;

		-- levelup skills
		-- 4 = third skill tab, 2 = mage flame
		if( player.Level == 2 ) then
			send_macro("SetSpellPoint( 4, 2 );");
			yrest(1000);
			send_macro("SetSpellPoint( 4, 2 );");
		else
			player.free_counter1 = player.Level;
			send_macro("SetSpellPoint( 4, 2 );");
		end

		-- open giftbag and equipt content
		-- updates first 18 bag slots / update all if empty
		open_giftbag(player.Level, 18);
	end
    </onLeaveCombat>

    <onSkillCast>
        if( arg1.Name == "PRIEST_HOLY_AURA" ) then
            yrest(1000);
            player:cast("PRIEST_URGENT_HEAL");
        end
    </onSkillCast>

In-Game Settings

In order for the bot to fully work, you will need to modify a few in-game settings. You should start with the Interface Settings and then set up your macro hotkey.

Interface Settings

Bring up your interface settings under the System menu. Under control, make sure that Click-to-move and Self Cast are checked. Under Miscellaneous, also check Auto loot.

Settings up a Macro

This macro is how the bot will interface with RoM's API. You should type /macro into the game's chat to bring up the macro window. Select the top-left most box and click New, and in the new window that pops open click Save.

It should now look like this:

Rom macro screen.png

Now, all you need to do is click and drag this new icon in your macro window into your hotkey bar and set your MACRO hotkey in profile hotkeys to reflect this change.

Note that the macro slot directly to the right of the one you just created will also be used internally. Do not keep macros you intend to use there.


Expert Settings

Expert Profile - Options

WAYPOINTS_REVERSE = false,	-- use the waypoint file in reverse order
MAX_DEATHS = 10,		-- maximal death if automatic resurrect befor logout
WAIT_TIME_AFTER_RES = 8000,	-- time to wait after resurrection, needs more on slow PCs
RETURNPATH_SUFFIX = "_return",	-- suffix for default naming of returnpath
HARVEST_SCAN_WIDTH = 10,	-- steps horizontal
HARVEST_SCAN_HEIGHT = 8,	-- steps vertical
HARVEST_SCAN_STEPSIZE = 35,	-- wide of every step
HARVEST_SCAN_TOPDOWN = false,	-- true = top->down  false = botton->up
HARVEST_SCAN_XMULTIPLIER = 1.0,	-- multiplier for scan width
HARVEST_SCAN_YMULTIPLIER = 1.1,	-- multiplier for scan line height
HARVEST_SCAN_YREST = 10,	-- scanspeed
HARVEST_SCAN_YMOVE = 1.1,	-- move scan area top/down ( 1=middle of screen )
USE_SLEEP_AFTER_RESUME = false, -- enter sleep mode after pressing pause/resume key
IGNORE_MACRO_ERROR = false, 	-- ignore missing MACRO hotkey error (only temporary option while beta)
DEBUG_INV = false,	 	-- to help to find the item use error (only temporary option  while beta)
INV_MAX_SLOTS = 60,	 	-- maximal slots to update in the inventory:update()