Bot not healing in time and targeting multiple mobs
Posted: Tue Mar 20, 2012 3:22 am
I have been working through my leveling bot scripts, and have been working on eliminating the places in a waypoint of most risk of death, so the path is pretty consitant difficulty.
I have been watching the bot and I see it do things it should not be doing, to not doing things it should be doing:
1. I have been watching as the bot (Mage) targets a mob with Flame, and then immediately target a second mob with Fireball, it then works on mob 2 until dead then works on mob 1 til dead. This should not happen. Why does the bot target the second mob? hmmm, I think I may have just figured it out now looking at my profile. Would it be because my target range is 225, and combat range is 175, meaning it targets mob 1 with flame, then cant fight mob 1 as its still out of combat range (175, so targets another mob with fireball) its a pretty fine line, theres 50 between the flame hitting mob 1 and fireball going to mob 2. Cant think of any other reason. What are the reasons for target and combat distance, why two distances.
2. I am seeing the bot take on mobs and not heal until everything is dead, even when its health goes way below its thresholds. I am still not sure what the difference is between HP_LOW and HP_LOW_POTION, but the lowest value is 75, so I expect the bot to take a healing potion once it gets below 75 % health. I watch at the bot casts spell after spell, past 50% health, casting spell after spell, gets below 25% and only when the mobs are dead does it take a potion. I think this only happens with multiple mobs, not 100% sure, but one mobs dies pretty quick, so not a lot of chance to get so low in health with one mob.
This is a definite cause of death which should not happen it the bot did what I think it should be doing (and generally does)
I am wanting ot put something in "ONSKILLCAST" to check for health level, and if below say 50% cast healing potion. If potion already in use, no matter, if not, then it could be life saving. How do I get it to cast a healing potion without knowing the name of the potion (could be at any level)
I have been watching the bot and I see it do things it should not be doing, to not doing things it should be doing:
1. I have been watching as the bot (Mage) targets a mob with Flame, and then immediately target a second mob with Fireball, it then works on mob 2 until dead then works on mob 1 til dead. This should not happen. Why does the bot target the second mob? hmmm, I think I may have just figured it out now looking at my profile. Would it be because my target range is 225, and combat range is 175, meaning it targets mob 1 with flame, then cant fight mob 1 as its still out of combat range (175, so targets another mob with fireball) its a pretty fine line, theres 50 between the flame hitting mob 1 and fireball going to mob 2. Cant think of any other reason. What are the reasons for target and combat distance, why two distances.
2. I am seeing the bot take on mobs and not heal until everything is dead, even when its health goes way below its thresholds. I am still not sure what the difference is between HP_LOW and HP_LOW_POTION, but the lowest value is 75, so I expect the bot to take a healing potion once it gets below 75 % health. I watch at the bot casts spell after spell, past 50% health, casting spell after spell, gets below 25% and only when the mobs are dead does it take a potion. I think this only happens with multiple mobs, not 100% sure, but one mobs dies pretty quick, so not a lot of chance to get so low in health with one mob.
This is a definite cause of death which should not happen it the bot did what I think it should be doing (and generally does)
I am wanting ot put something in "ONSKILLCAST" to check for health level, and if below say 50% cast healing potion. If potion already in use, no matter, if not, then it could be life saving. How do I get it to cast a healing potion without knowing the name of the potion (could be at any level)
Code: Select all
<profile>
<options>
<!-- Try the bot with a new char mage -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="75" />
<option name="MP_LOW_POTION" value="80" />
<option name="HP_LOW_POTION" value="80" />
<option name="USE_HP_POTION" value="minstack" /> <!-- potion select strategy: best|minstack -->
<option name="USE_MANA_POTION" value="minstack" /> <!-- potion select strategy: best|minstack -->
<option name="USE_PHIRIUS_POTION" value="false" /> <!-- false | true if you want to use the Phirus Potions -->
<option name="PHIRIUS_MP_LOW" value="40" />
<option name="PHIRIUS_HP_LOW" value="40" />
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="50" />
<option name="MP_REST" value="50" />
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="99" />
<option name="MANA_POTION" value="198" /> <!-- set to "0" if not required to buy -->
<option name="ARROW_QUIVER" value="0" /> <!-- set to "0" if not required to buy -->
<option name="THROWN_BAG" value="0" /> <!-- set to "0" if not required to buy -->
<option name="POISON" value="0" /> <!-- set to "0" if not required to buy -->
<!-- either false or arrow or thrown -->
<option name="RELOAD_AMMUNITION" value="false" /> <!-- false|arrow|thrown -->
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="175" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="225" />
<option name="DISMOUNT" value="false" /> <!-- Set to false to stop casting while on a mount -->
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="8" />
<option name="TARGET_LEVELDIF_BELOW" value="10" />
<!-- Waypoint and movement settings -->
<option name="WAYPOINTS" value="" /> <!-- leave empty to show a list -->
<option name="RETURNPATH" value="" />
<option name="PATH_TYPE" value="waypoints" /> <!-- waypoints | wander -->
<option name="WANDER_RADIUS" value="500" />
<option name="WAYPOINT_DEVIATION" value="0" />
<option name="QUICK_TURN" value="true" />
<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_ALL" value="true" /> <!-- Loot all nearby dead mobs after combat -->
<option name="LOOT_IN_COMBAT" value="false" />
<option name="LOOT_DISTANCE" value="200" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<!-- Auto selling options when used with player:merchant -->
<option name="INV_AUTOSELL_ENABLE" value="true" /> <!-- true | false -->
<option name="INV_AUTOSELL_FROMSLOT" value="1" /> <!-- 1 = bag 1 slot 1 -->
<option name="INV_AUTOSELL_TOSLOT" value="60" /> <!-- 30 = last slot bag 1 -->
<option name="INV_AUTOSELL_QUALITY" value="white,green" /> <!-- white,green,blue,purple -->
<option name="INV_MAX_SLOTS" value="60" />
<option name="INV_AUTOSELL_IGNORE" value="Regeneration Mixture,Quiver,Formula,Medicine,Potent,Mana Stone,Herbs,First Aid Potion,Magic Potion,Guild Rune,Activate Rune,Purify Rune,Link Rune,Disenchant Rune,Blend Rune,Frost Rune,Harm II,Hormone" />
<!-- <option name="INV_AUTOSELL_NOSELL_DURA" value="110" /> -->
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="120" />
<option name="HARVEST_WOOD" value="true" /> <!-- Choose which types to harvest. -->
<option name="HARVEST_HERB" value="true" /> <!-- "true" = harvest, "false" = do not harvest -->
<option name="HARVEST_ORE" value="true" />
<!-- Eggpet options -->
<option name="EGGPET_ENABLE_CRAFT" value="false" /> <!-- If using same slot for assist and craft, onlt 1 can be enabled. -->
<option name="EGGPET_CRAFT_SLOT" value="1" />
<option name="EGGPET_ENABLE_ASSIST" value="false" />
<option name="EGGPET_ASSIST_SLOT" value="1" />
<option name="EGGPET_CRAFT_RATIO" value="1:1:1" /> <!-- mining:woodworking:herbalism ratio to produce. -->
<option name="EGGPET_CRAFT_INDEXES" value="" /> <!-- override auto craft index for mining,woodworking,herbalism eg. "2,,"-->
<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="0" /> <!-- in minutes, 0 = timer disabled -->
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="true" />
<option name="CLOSE_WHEN_STUCK" value="true" />
<option name="RES_AFTER_DEATH" value="true" />
<option name="MAX_DEATHS" value="2" /> <!-- Log out after this many deaths -->
<!-- Party Bot options -->
<option name="PARTY" value="false" /> <!-- All members of party need to have this enabled for bot to heal, or attack -->
<option name="PARTY_ICONS" value="false" /> <!-- The leader (tank) needs to have this set to identify what target is being attacked so dps can attack it also -->
<option name="PARTY_INSTANCE" value="false" /> <!-- Enable this to stop hi-HP check. For attacking Elites and high level or bosses. -->
<option name="PARTY_FOLLOW_NAME" value="" />
<!-- Healing options -->
<!-- <option name="HEAL_PARTY" value="true" /> --> <!-- Not implemented yet, coming soon -->
<!-- For more options and documentation see the RoM Bot Wiki: -->
<!-- http://www.solarstrike.net/wiki/index.php5?title=RoM_Bot -->
</options>
<friends>
<!-- names of friends we help fighting or enemys we don't want to attack -->
<!-- for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer -->
<friend name="Bubsitan" />
<friend name="Yuri" />
<friend name="Bronze Shell Scooray" />
<friend name="Giant Gardian" />
<friend name="Borrofar" />
<friend name="Ambas - Elite" />
<friend name="Someone" />
<friend name="Elite_Mob_Name1" />
<friend name="Elite_Mob_Name2" />
</friends>
<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="" />
<mob name="" />
<mob name="" />
</mobs>
<hotkeys>
<!-- to communicate with the RoM API / define ingame dummy macro at place 1 -->
<hotkey name="MACRO" key="VK_0" />
</hotkeys>
<!-- define your skills depending from your actual primary class -->
<!-- see the example for a priest/mage -->
<!-- delete skills you don't have or don't want to use. -->
<!-- For more skills to use see /database/skills.xml -->
<!-- demo skills for LvL 1 character for all classes -->
<!-- to use a specific key instead of MACRO then use hotkey="VK_1" this example is for hotkey 1 -->
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" hotkey="MACRO" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_URGENT_HEAL" hotkey="MACRO" priority="100" hpper="50" />
<skill name="PRIEST_REGENERATE" hotkey="MACRO" priority="100" hpper="90" />
<skill name="PRIEST_RISING_TIDE" hotkey="MACRO" priority="10" />
<skill name="PRIEST_WAVE_ARMOR" hotkey="MACRO" priority="40" inbattle="true" />
<skill name="PRIEST_AMPLIFIED_ATTACK" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_GRACE_OF_LIFE" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_BLESSED_SPRING_WATER" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="MAGE_FIRE_WARD" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false"/>
<skill name="PRIEST_MAGIC_BARRIER" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_ANGELS_BLESSING" hotkey="MACRO" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_HOLY_AURA" hotkey="MACRO" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="MACRO" priority="70" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_SOUL_BOND" hotkey="MACRO" priority="30" />
<skill name="PRIEST_CHAIN_OF_LIGHT" hotkey="MACRO" priority="130" />
<skill name="PRIEST_ICE_FOG" hotkey="MACRO" priority="80" />
<skill name="MAGE_FIREBALL" hotkey="MACRO" priority="150" />
<skill name="MAGE_LIGHTNING" hotkey="MACRO" priority="140" />
<skill name="MAGE_INTENSIFICATION" hotkey="MACRO" priority="70" />
</skills_priest>
<skills_mage>
<skill name="MAGE_FLAME" hotkey="MACRO" priority="150" />
<skill name="MAGE_FIREBALL" hotkey="MACRO" priority="140" />
<skill name="MAGE_ELECTRIC_BOLT" hotkey="MACRO" priority="130" />
<skill name="MAGE_LIGHTNING" hotkey="MACRO" priority="120" />
<skill name="MAGE_METEOR_SHOWER" hotkey="MACRO" priority="110" />
<skill name="MAGE_ELECTROSTATIC_CHARGE" hotkey="MACRO" priority="200" hpper="50"/>
<skill name="MAGE_ESSENCE_OF_MAGIC" hotkey="MACRO" priority="80" rebuffcut="60" inbattle="false" />
<!-- <skill name="MAGE_ELEMENTAL_CATALYST" hotkey="MACRO" priority="30" inbattle="true" /> -->
<skill name="MAGE_FIRE_WARD" hotkey="MACRO" priority="120" rebuffcut="60" inbattle="false"/>
<skill name="MAGE_ENERGY_WELL" hotkey="MACRO" priority="80" inbattle="true" />
<skill name="MAGE_INTENSIFICATION" hotkey="MACRO" priority="90" hpper="65" />
<skill name="MAGE_ENERGY_INFLUX" hotkey="MACRO" priority="150" hpper="50"/>
<skill name="PRIEST_URGENT_HEAL" hotkey="MACRO" priority="100" hpper="50" />
<skill name="PRIEST_REGENERATE" hotkey="MACRO" priority="90" hpper="90" />
<skill name="PRIEST_HOLY_AURA" hotkey="MACRO" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="MACRO" priority="80" rebuffcut="60" inbattle="false" />
</skills_mage>
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
_profilemanapotion = settings.profile.options.MANA_POTION
_profilehealingpotion = settings.profile.options.HEALING_POTION
LevelUpSkills1To70();
-- LearnMonsterCards();
-- DisplayItemTypes();
OpenGiftbags1To70(player.Level);
StartUp()
]]></onLoad>
<onDeath><![CDATA[
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
]]></onDeath>
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
DisplayStats();
]]></onLeaveCombat>
<onLevelup><![CDATA[
-- Additional Lua code to execute after having a levelup
-- and levelup the skills for a new character (mage or priest recommended)
-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
LevelUpSkills1To70()
LearnMonsterCards()
OpenGiftbags1To70(player.Level);
]]></onLevelup>
<onSkillCast><![CDATA[
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast
-- e.g.:
--if( 15 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_SOUL_SOURCE");
--elseif( 25 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_HOLY_AURA");
-- player:cast("PRIEST_URGENT_HEAL");
-- player:cast("PRIEST_URGENT_HEAL");
]]></onSkillCast>
<onHarvest><![CDATA[
-- Additional Lua code to execute directly before the actual harvesting takes place.
-- Note: arg1 contains the object to be harvested.
-- i.e. arg1.Name will be the name of the node you are about to harvest
-- If this snippet returns 'false', the node will *not* be harvested.
-- All other return values result in the player attempting to harvest the node.
-- Note that returning 'false' here breaks out of harvesting completely;
-- You will not attempt to harvest other nearby nodes instead.
]]></onHarvest>
<onUnstickFailure><![CDATA[
-- Lua code to execute when MAX_UNSTICK_TRIALS is reached.
UseASkill("recall");
loadPaths("travel");
]]></onUnstickFailure>
</profile>