Hide after looting.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Hide after looting.

#1 Post by hihi » Sat Aug 14, 2010 3:19 am

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="10" /> 
  <option name="HP_LOW_POTION" value="80" /> 
  <option name="USE_HP_POTION" value="best" /> 
- <!--  potion select strategy: best|minstack 
  --> 
  <option name="USE_MANA_POTION" value="best" /> 
- <!--  potion select strategy: best|minstack 
  --> 
- <!--  Rest if HP or Mana is below that level 
  --> 
  <option name="HP_REST" value="15" /> 
  <option name="MP_REST" value="15" /> 
- <!--  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" /> 
  <option name="ARROW_QUIVER" value="2" /> 
  <option name="THROWN_BAG" value="2" /> 
  <option name="POISON" value="30" /> 
- <!--  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="200" /> 
  <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="250" /> 
- <!--  Attack monsters 3 levels above or 10 below your level 
  --> 
  <option name="TARGET_LEVELDIF_ABOVE" value="3" /> 
  <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="false" /> 
- <!--  Loot settings 
  --> 
  <option name="LOOT" value="true" /> 
  <option name="LOOT_IN_COMBAT" value="true" /> 
  <option name="LOOT_DISTANCE" value="100" /> 
  <option name="LOOT_PAUSE_AFTER" value="0" /> 
- <!--  probability in % for a short rest 
  --> 
- <!--  Harvest options 
  --> 
  <option name="HARVEST_DISTANCE" value="120" /> 
- <!--  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="RES_AUTOMATIC_AFTER_DEATH" value="true" /> 
  <option name="MAX_DEATHS" value="10" /> 
- <!--  Log out after this many deaths 
  --> 
- <!--  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" modifier="" 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             
  --> 
- <skills_rogue>
  <skill name="ROGUE_COMBAT_MASTER" hotkey="VK_1" priority="105" inbattle="true" /> 
  <skill name="ROGUE_PREMEDITATION" hotkey="VK_2" priority="110" inbattle="false" /> 
  <skill name="ROGUE_LOW_BLOW" hotkey="VK_3" priority="90" /> 
  </skills_rogue>
  </profile>

How do I make my bot hide directly after looting and before it moves off looking for another target ?
When I put hide into my skills section my bot loots and runs off after another mob and then will try to hide once it gets within attack distance. This makes my bot extremely easy to detect. Im new to this and any help would be much appreciated.

edit: I had my hide as the highest priority also "115"

Also if the bot could keep trying to hide until a dmg dot wears off before continuing off on its merry way would be perfect as 99% of all mobs at high lvl hit you with a dot. (Not very important as I 1 shot every mob if im premed but would be good for lower lvl rogues.)

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#2 Post by hihi » Sat Aug 14, 2010 3:33 am

After some searching I found this.

http://www.solarstrike.net/phpBB3/viewt ... f=21&t=710

will try it until someone can help me :)

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

Re: Hide after looting.

#3 Post by rock5 » Sat Aug 14, 2010 4:39 am

Please paste here the line you used when adding Hide to your profile.
  • 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

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#4 Post by hihi » Sat Aug 14, 2010 4:46 am

<skill name="ROGUE_HIDE" hotkey="VK_5" priority="120" inbattle="false" />

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

Re: Hide after looting.

#5 Post by Administrator » Sat Aug 14, 2010 5:36 am

You could try a hook. Create the file userfunctions.lua in the rom folder (if you haven't already), and put this in it:

Code: Select all

local __PLAYER_LOOT_ORIG = CPlayer.loot;

CPlayer.loot = function ()
  __PLAYER_LOOT_ORIG(); -- loot
  player:cast("Hide");  -- hide
  yrest(1000); -- wait 1 second before running off
end

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

Re: Hide after looting.

#6 Post by rock5 » Sat Aug 14, 2010 5:55 am

hihi wrote:<skill name="ROGUE_HIDE" hotkey="VK_5" priority="120" inbattle="false" />
I tried that setting, it worked most of the time. Unfortunately if it failed to caste it wont realize or if you cast some other skill after it, it may get interrupted. Luckily the new Skill System that Voidmain is working on will fix all that. It knows the buffs for all skills and will keep trying to cast it until it succeeds. Shouldn't be much longer now.
  • 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

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#7 Post by hihi » Sat Aug 14, 2010 8:06 pm

Thanks for your replies. I will try the userfnction.lua thing, and the new stuff going into the bot sounds cool.

P.S. Thanks for your work on the chicken eggs rock5 :)

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#8 Post by hihi » Sat Aug 14, 2010 8:27 pm

Administrator wrote:You could try a hook. Create the file userfunctions.lua in the rom folder (if you haven't already), and put this in it:

Code: Select all

local __PLAYER_LOOT_ORIG = CPlayer.loot;

CPlayer.loot = function ()
  __PLAYER_LOOT_ORIG(); -- loot
  player:cast("Hide");  -- hide
  yrest(1000); -- wait 1 second before running off
end

Creating this file in the rom folder and pasting your code into it makes the bot get an error after combat is finished and before it loots.

rom/classes/player.lua:1107: attempt to index local 'self' <a nil value>

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

Re: Hide after looting.

#9 Post by Administrator » Sat Aug 14, 2010 10:17 pm

Then change the loot call to this:

Code: Select all

__PLAYER_LOOT_ORIG(player);

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#10 Post by hihi » Sun Aug 15, 2010 12:24 am

so change this line in my player profile <option name="LOOT" value="true" /> to <option name="__PLAYER_LOOT_ORIG(player);" value="true" />

or do you mean where the bot actually runs the loot function ?

If you could direct me to the correct file I should be fine from there. thanks again :)

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

Re: Hide after looting.

#11 Post by Administrator » Sun Aug 15, 2010 2:27 am

No, change it in the code I gave you before.

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#12 Post by hihi » Sun Aug 15, 2010 3:17 am

oh heh. ok thanks.

hihi
Posts: 16
Joined: Fri Aug 13, 2010 12:45 pm

Re: Hide after looting.

#13 Post by hihi » Sun Aug 15, 2010 4:03 am

Code: Select all

local __PLAYER_LOOT_ORIG = CPlayer.loot;

CPlayer.loot = function ()
  __PLAYER_LOOT_ORIG(player); -- loot
  yrest(5000); -- wait 1 second before running off
  player:cast("ROGUE_HIDE");  -- hide
  
end
renamed hide to what its name was in the skills db and moved the rest period before the hide, now it waits for dots to wear off and hides.

Works like a charm. looks a little noticeable as he just stands there until it fires the hide skill.

Thanks for your help :)

mayainverse
Posts: 94
Joined: Tue Dec 21, 2010 3:12 am

Re: Hide after looting.

#14 Post by mayainverse » Sun Jan 02, 2011 4:29 pm

i realize this is kind of old thread but. i am usin this the casting works fine im even fightin gmobs that have a dot and it always cast hide the right way. the only problem is the game is buggy and when the bot use hide on first cast it does not actually apply the buff. anyway to make it check if it succeeded and keep recasting hide until it does if not in combat.

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

Re: Hide after looting.

#15 Post by rock5 » Sun Jan 02, 2011 10:46 pm

mayainverse wrote:i realize this is kind of old thread but. i am usin this the casting works fine im even fightin gmobs that have a dot and it always cast hide the right way. the only problem is the game is buggy and when the bot use hide on first cast it does not actually apply the buff. anyway to make it check if it succeeded and keep recasting hide until it does if not in combat.
If you have it casting at the right time, you can check to see if it worked in the onSkillCast section of your profile.

Just check if arg1.Name = "ROGUE_HIDE" and player.Battling ~= true then check if player:hasBuff("Hide") or whatever the buff is called. If not keep trying until it does.
  • 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

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

Re: Hide after looting.

#16 Post by rock5 » Mon Jan 03, 2011 12:22 pm

Forgot to ask. How do you make it work with dots?
  • 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

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Hide after looting.

#17 Post by Alkaiser » Mon Jan 03, 2011 6:53 pm

rock5 wrote:
hihi wrote:<skill name="ROGUE_HIDE" hotkey="VK_5" priority="120" inbattle="false" />
I tried that setting, it worked most of the time. Unfortunately if it failed to caste it wont realize or if you cast some other skill after it, it may get interrupted. Luckily the new Skill System that Voidmain is working on will fix all that. It knows the buffs for all skills and will keep trying to cast it until it succeeds. Shouldn't be much longer now.
Any news on the new skill system?

I've partially converted mine to use DIYCE's cooldown CD('skill') function.

Code: Select all

<onPreSkillCast>
	if( arg1.Name == "KNIGHT_CHARGE" ) then
		local CD = RoMScript("CD('Charge')") or false
		if( CD ) then
			return true
		else
			return false
		end
	else
		return true
	end
</onPreSkillCast>
Then I deleted the cooldown values in skills.lua. So if for some reason the bot tries to use Charge, but it doesn't activate for some reason, it will be able to try again without needlessly waiting.

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

Re: Hide after looting.

#18 Post by rock5 » Mon Jan 03, 2011 9:47 pm

Alkaiser wrote:Any news on the new skill system?
It's been a long time. I haven't heard anything. I've given up hope on it.
Alkaiser wrote:I've partially converted mine to use DIYCE's cooldown CD('skill') function.

Code: Select all

<onPreSkillCast>
	if( arg1.Name == "KNIGHT_CHARGE" ) then
		local CD = RoMScript("CD('Charge')") or false
		if( CD ) then
			return true
		else
			return false
		end
	else
		return true
	end
</onPreSkillCast>
Then I deleted the cooldown values in skills.lua. So if for some reason the bot tries to use Charge, but it doesn't activate for some reason, it will be able to try again without needlessly waiting.
I don't think that will work. The skills are not priority based, they cast in sequence. So your example will cast charge the next time it comes around but wont cast it just after it failed. Isn't that right? Or is the intention that charge be available for the next battle?
  • 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

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Hide after looting.

#19 Post by Alkaiser » Wed Jan 05, 2011 11:03 am

rock5 wrote:I don't think that will work. The skills are not priority based, they cast in sequence. So your example will cast charge the next time it comes around but wont cast it just after it failed. Isn't that right? Or is the intention that charge be available for the next battle?
Correct. It still has to wait for the skills to cycle through, but since Charge and many other skills have long cooldowns, it works well enough. Having the bot retry the skill immediately before moving to the next skill in the list would be ideal, but it isn't what I was attempting to address with this.

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

Re: Hide after looting.

#20 Post by Administrator » Wed Jan 05, 2011 9:05 pm

You could also do this:

Code: Select all

    player:queueSkill("KNIGHT_CHARGE", true);
This will queue the skill and keep it queued until it can be used.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest