Faster runs

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Faster runs

#1 Post by hasper » Thu Aug 16, 2012 5:39 am

Hi all, this is my first post and I must admit that I am not familiar with coding, that is why any help would be appreciated. I have a bot farming ks (using the original ks waypoint, with some modifications from http://www.solarstrike.net/phpBB3/viewt ... =27&t=2449)
The problem seems to be in my profile. I am using this profile:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<profile>
	<options>
		<!-- Try the bot with a new char mage                   -->
		<!-- At the pioneer village. Use demo.xml waypoint file -->
		<option name="HP_LOW"				value="10" />
		<option name="MP_LOW_POTION"		value="35" />
		<option name="HP_LOW_POTION"		value="10" />
		<option name="USE_HP_POTION"		value="best" />			<!-- potion select strategy: best|minstack -->
		<option name="USE_MANA_POTION"		value="best" />			<!-- 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="15" />
		<option name="MP_REST" 				value="5" />

		<!-- 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="99" />			<!-- 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="false" /> 		<!-- only important for melees -->
		<option name="COMBAT_DISTANCE"    	value="200" />
		<option name="MAX_FIGHT_TIME"     	value="6" />			<!-- 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" />

		<!-- Attack monsters 3 levels above or 30 below your level -->
		<option name="TARGET_LEVELDIF_ABOVE" value="3" />
		<option name="TARGET_LEVELDIF_BELOW" value="54" />

		<!-- 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="true" />
		<option name="LOOT_DISTANCE"      	value="200" />
		<option name="LOOT_PAUSE_AFTER"   	value="0" />			<!-- probability in % for a short rest -->
		<option name="LOOT_AGAIN"         value="10000" />

		<!-- Auto selling options when used with player:merchant -->
		<option name="INV_AUTOSELL_ENABLE"	value="true" />		<!-- true | false -->
		<option name="INV_AUTOSELL_FROMSLOT" value="30" /> 			<!-- 1 = bag 1 slot 1 -->
		<option name="INV_AUTOSELL_TOSLOT"	value="180" /> 			<!-- 30 = last slot bag 1 -->
		<option name="INV_AUTOSELL_QUALITY"	value="white,green,blue,purple" /> 	<!-- white,green,blue,purple  -->

		<!-- 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="10" /> 			<!-- Log out after this many deaths -->

		<!-- Party Bot options  -->
		<!-- <option name="PARTY"			value="true" /> -->
		<!-- <option name="PARTY_ICONS"		value="true" /> -->
		<!-- <option name="PARTY_INSTANCE"	value="true" /> -->

		<!-- Healing options -->
		<!-- <option name="HEALER_FIGHT"		value="true" /> --> 	<!-- For party bot if you want healer to also fight -->

		<!-- pvp -->
		<!--option name="PVP"			value="true" /> --> 		<!-- To enable PVP, with this set to true it will auto attack any players with red names -->
		
		

		<!-- 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="MyOtherCharacter1" />
		<friend name="MyOtherCharacter2" />
		<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_rogue>
		<skill name="ROGUE_SHADOWSTAB"    		modifier="" hotkey="VK_2" priority="100" />
		<skill name="ROGUE_LOW_BLOW"      		modifier="" hotkey="VK_3" priority="90" />
		<skill name="ROGUE_WOUND_ATTACK"    		modifier="" hotkey="VK_4" priority="80" />
 	        <skill name="PRIEST_URGENT_HEAL"     	modifier="" hotkey="VK_5" priority="120" hpper="50"  />
		<skill name="PRIEST_REGENERATE"      	modifier="" hotkey="VK_6" priority="110"  hpper="90" />
		<skill name="PRIEST_HOLY_AURA"       	modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="20" />
		
		
		<skill name="ROGUE_INFORMER"    		modifier="" hotkey="VK_8" priority="0" autouse="false" inbattle="false" />
                
		<skill name="ROGUE_FERVENT_ATTACK"    		modifier="" hotkey="VK_F3" priority="0" autouse="false" inbattle="false" />
		<skill name="ROGUE_QUICKNESS_AURA"    		modifier="" hotkey="VK_F1" priority="0" autouse="false" inbattle="false" />
                
		<skill name="ROGUE_PREMEDITATION"    		modifier="" hotkey="VK_9" priority="0" autouse="false" inbattle="false" />
                <skill name="ROGUE_ASSASSINS_RAGE"    		modifier="" hotkey="VK_0" priority="0" autouse="false" inbattle="false" />	 
	</skills_rogue>

<skills_priest>
		<skill name="PRIEST_SOUL_SOURCE" hotkey="VK_4" priority="110" hpper="25" inbattle="true" />
		<skill name="PRIEST_URGENT_HEAL" hotkey="VK_2" priority="99" hpper="30"  />
		<skill name="PRIEST_RISING_TIDE" hotkey="VK_3" priority="70" level="" />
	</skills_priest>
	

	<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);
	]]></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
		local enemies = player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget)
      			player:target(enemies);
      			player:update();
      			if( player:haveTarget() ) then
      			player:fight()
      			else
      			player:lootAll()
      			end
	]]></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
	]]></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.
	]]></onUnstickFailure>
</profile>
With this profile I acquire target rather fast, thus I can kill a group of mobs in a sort time. The problem comes when I have to loot them. The “bot log” shows double “clearing target”, something like double checking the mobs?. If for example I kill 4 mobs, them I get 8 “clearing target” messages in the bot log, making the bot after looting rather slow.
I found that the problems arises from the on leave combat in my profile. I erased the whole code there, and the problem with the double messages-checks fixed, but another problems raised. My bot became slow. Now it takes a lot of time to acquire target in a group of mobs (maybe the double time).
Bottom line, with both profiles It takes my about 20-22 minutes for a run till the frogs before the 3rd Boss. (not using pets, my char is a rogue/priest with 35K hp and 23K phat). I am not using teleport functions or speed hack.
I know there must be a mistake somewhere, but since I am not familiar with coding (as mentioned above) I cannot find it 
PS I am using rombot version 1.02 beta 1 (I tried later versions but had problems with my pc), revision 732
I am using slim version of ROM 5.0.1.2553, with the following addons : XBar, Lootomatic, d303fix, autorepair, bagcleanerseller, groupinvite, ultimatemailmod (these are the least I need to work for )
Any help would be appreciated

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Faster runs

#2 Post by lisa » Thu Aug 16, 2012 5:50 am

the onleavecombat code is fine if you don't want to use normal bot looting, you also have loot as true in profile.

I would suguest taking out the loot part of the onleavecombat, the bot should still loot all mobs as you have profile settings loot true and lootall true

change

Code: Select all

              if( player:haveTarget() ) then
               player:fight()
               else
               player:lootAll()
               end
to this and see if it helps

Code: Select all

              if( player:haveTarget() ) then
               player:fight()
               end

I just read you have lootomatic aswell, is it set to loot all and then discard afterwards or does it leave some items behind on the corpse, if it leaves stuff behind that may be your issue, since items are left it tries to loot again.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Re: Faster runs

#3 Post by hasper » Thu Aug 16, 2012 6:21 am

Lisa I have tried doing what you suggested, but i get the same bot log (double clearing targets message)
I also tried leaving leaving this code in onleave combat and making it false in Loot setting (but didnt worked, just looted the last mob :) )
I think the problem arises when i have code in onleave combat section.

As for lootomatic, i loot everything except Amulet of light ( i dont loot it, but also i dont want to have a drop rule for this item), and drop the loot that i dont need (like runes)

hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Re: Faster runs

#4 Post by hasper » Thu Aug 16, 2012 6:26 am

PS i have noticed also something else (not sure if it is normal)
In the first wp inside the instace i have my char to cast regenerate and urgent heal, after casting these 2, i get in bot log the 2 casts and 1 clearing target message. Not sure if it is normal, but i am mentioning that too.

Apologize, i apologize for my english

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Faster runs

#5 Post by lisa » Thu Aug 16, 2012 7:16 am

you will probably have to turn on debugging in order to find the actual cause of the double clearing issue.

in settings.lua line 112

Code: Select all

			DEBUG_INV = false,	 			-- to help to find the item use error (only temporary option while beta)
			DEBUG_LOOT = false,	 			-- debug loot issues
			DEBUG_TARGET = false, 			-- debug targeting issues
			DEBUG_HARVEST = false, 			-- debug harvesting issues
			DEBUG_WAYPOINT = false, 		-- debug waypoint issues
			DEBUG_AUTOSELL = false, 		-- debug autosell issues

			-- debug skill use issues
			DEBUG_SKILLUSE = {
				ENABLE 		= false,
				TIMEGAP		= true,		-- show the time gap between cast starts
				ONCOOLDOWN	= true,		-- show the time in ms that we are before the cooldown
				NOCOOLDOWN	= true,		-- show the time in ms that we are over the cooldown
				HPLOW		= true
				},

just try changing them all to true, you will get lots of prints on MM but it will atleast help work out what is going on.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Re: Faster runs

#6 Post by hasper » Thu Aug 16, 2012 8:23 am

I did this and got the following:

Fight finished. Killed 1 Ousul Salamander. (fight #3 / runtime 1 minutes)
[DEBUG] 1132321792 target dist > MAX_TARGET_DIST with battling from other mob
Engaging enemy [Ousul Salamander] in combat.
[DEBUG] MAXHPPER PRIEST_URGENT_HEAL 95 50
[DEBUG] MAXHPPER PRIEST_REGENERATE 95 90
Use 2: ROGUE_SHADOWSTAB [DEBUG] gap between skilluse 2397, pcasting=false
=> Ousul Salamander (0/16191)
[DEBUG] MAXHPPER PRIEST_HOLY_AURA 95 20
[DEBUG] TARGETNOENEMY ROGUE_LOW_BLOW
[DEBUG] TARGETNOENEMY ROGUE_WOUND_ATTACK
Fight finished. Killed 2 Ousul Salamander. (fight #4 / runtime 1 minutes)
[DEBUG] 1132312832 target dist > MAX_TARGET_DIST with battling from other mob
Clearing target.
Clearing target.
[DEBUG] 0 target dist > MAX_TARGET_DIST
Clearing target.
[DEBUG] don't loot reason: self.TargetPtr == 0
Clearing target.
[DEBUG] don't loot reason: self.TargetPtr == 0
Clearing target.
[DEBUG] don't loot reason: self.TargetPtr == 0
Clearing target.
[DEBUG] FightStartX 4755.046875 FightStartZ 904.61218261719
[DEBUG] dir_FS->WP rad 3.077 dir_FS->FE rad -3.107
[DEBUG] Line FS->WP / FS->FE: angleDif rad 0.099 grad 5
[DEBUG] We (would) pass(ed) wp #2 (dist 129.3) in a dist of 12 (skip at 100)
[DEBUG] currentWp #2 4626 913, FE->WP rad 0.223
[DEBUG] nextWp #3 4456 912, FE->WP rad 3.006
[DEBUG] FE->wp#3 to FE->wp#2 is in a angle of 159 grad (skip at 90)
[DEBUG] We overrun waypoint #2, skip it and move on to #3
We overrun waypoint #2, skip it and move on to #3

Just copied a part of the log. Not sure if "don't loot reason: self.TargetPtr == 0" is the problem.

hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Re: Faster runs

#7 Post by hasper » Thu Aug 16, 2012 8:28 am

As mentioned above I have lootomatic having not loot for "Amulet of Light" (but not drop as well)
In the following code the bot kills 1 sallamander and tries to loot it. It finds Amulet inside and dont loot it, then the bot tries to loot the body again and finds the Amulet and ofcourse dont loot it. In the following code nothing special appears (except double clearing):

[DEBUG] MAXHPPER PRIEST_URGENT_HEAL 92 50
[DEBUG] MAXHPPER PRIEST_REGENERATE 92 90
Use 2: ROGUE_SHADOWSTAB [DEBUG] gap between skilluse 5041, pcasting=false
=> Ousul Salamander (0/16191)
[DEBUG] MAXHPPER PRIEST_HOLY_AURA 92 20
[DEBUG] TARGETNOENEMY ROGUE_LOW_BLOW
[DEBUG] TARGETNOENEMY ROGUE_WOUND_ATTACK
Fight finished. Killed 6 Ousul Salamander. (fight #12 / runtime 8 minutes)
[DEBUG] 891868928 target dist > MAX_TARGET_DIST with battling from other mob
Paused. (Delete) to continue, (CTRL+L) exit to shell, (CTRL+C) quit
Resumed.
Clearing target.
Clearing target.
[DEBUG] 0 target dist > MAX_TARGET_DIST
[DEBUG] FightStartX 4381.3525390625 FightStartZ 928.71264648438
[DEBUG] dir_FS->WP rad 1.604 dir_FS->FE rad 1.876
[DEBUG] Line FS->WP / FS->FE: angleDif rad 0.272 grad 15
[DEBUG] We (would) pass(ed) wp #5 (dist 100.3) in a dist of 27 (skip at 100)
Moving to waypoint #5, (4378, 1029)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Faster runs

#8 Post by rock5 » Thu Aug 16, 2012 9:07 am

I'd say it does the double clearing because of the player:fight in the onleavecombat. This is to be expected. If you want to do it like that then just accept the double clearing. You said "thus I can kill a group of mobs in a sort time". What more do you want?

If player:clearTarget() is taking to long for you you could try removing the RoMScript in it. That's the only thing that takes any amount of time and isn't needed. It's around line 2952 of player.lua

Code: Select all

	RoMScript("TargetFrame:Hide()");
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

hasper
Posts: 11
Joined: Wed Nov 16, 2011 9:37 am

Re: Faster runs

#9 Post by hasper » Thu Aug 16, 2012 10:07 am

It seems that i have to live with double checking :D
I guess i have to make a mage char for ks farming ;)
Nevermind thanks both of you for your time, at least i know that the code is right and the bot doesnt have any problem.

romaniac
Posts: 79
Joined: Sat Feb 04, 2012 8:25 am

Re: Faster runs

#10 Post by romaniac » Fri Aug 17, 2012 5:58 am

This post reminds me of a similar topic. Stopping to loot takes some time, even if it works properly. When you are playing manually, there is a trick. If you click a corpse to loot it and jump at the last moment, it is looted during the jump, there is no kneel-down animation and looting is much faster.

Has it ever been tried to put this kind of quick looting into the bot? Would speed up runs a lot.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Faster runs

#11 Post by rock5 » Fri Aug 17, 2012 7:02 am

Except jumping takes time and you can't move while jumping.

I also believe the time it takes to loot depends on your lag or ping time. If you are on a nearby server I think it loots quickly. On distant servers it loots slowly because it is waiting for a response from the server.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

romaniac
Posts: 79
Joined: Sat Feb 04, 2012 8:25 am

Re: Faster runs

#12 Post by romaniac » Fri Aug 17, 2012 7:21 am

I did not mean jumping in place. You need to run & jump so the char jumps over the body. Then it is looted on the fly, taking practically no time.

I guess that the timing yould be tricky to achieve. I just wondered whether it has ever been tried.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Faster runs

#13 Post by lisa » Fri Aug 17, 2012 7:25 am

A while back there was some attempts to making the bot jump as it was moving, jumping over obsticles and such. I doubt it would work in this situation as you would have to check distance to corpse, melee can't run and jump over it if standing on it, then calculate the speed you are traveling and at just the right time before getting to mob you need to hold forward key and press jump then loot corpse then release forward key.
Far to complicated to be reliable, all to save a possible 1-2 seconds depending on lag, mind you lag would also make the whole thing even harder lol
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests