Ancient Treasures waypoint

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ancient Treasures waypoint

#21 Post by lisa » Mon Dec 26, 2011 9:36 pm

it doesn't have any more args?
Generally when I see a function that returns icon first there is usally a few more args after it.
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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Ancient Treasures waypoint

#22 Post by kanta » Tue Dec 27, 2011 6:37 pm

While testing the chest code that Lisa gave me (which it seems I didn't put in right, got a "failed to compile" error) I ran across an aggro issue. While checking for the candle in the center room today, I got to the 3rd location, located the candle and dropped to collect it. This seems to be a very narrow window for aggro spot it seems. Guess I'll have to do a little more fine tuning on coordinates to avoid this problem. I'll update when I can get it fixed.
Scout/Knight/Rogue 70/66/66

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#23 Post by cufRet8e » Tue Dec 27, 2011 10:09 pm

rock5 wrote:]if settings.profile.options.DISMOUNT == false and zoneid == 355 then return false end --- NEW LINE
Doesn't this effectively disable all skills? You could just disable them all in the waypoint onload. That way a user doesn't need to set anything up.

Code: Select all

for k,v in pairs(settings.profile.skills) do
      v.AutoUse = false
end
How to disable all skills except healing ones? Or disable particular skill from mage.

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

Re: Ancient Treasures waypoint

#24 Post by rock5 » Tue Dec 27, 2011 10:34 pm

cufRet8e wrote:How to disable all skills except healing ones? Or disable particular skill from mage.
You obviously need it for something else because the healing skills don't work in this minigame.

To disable all skills except healing skill then use this

Code: Select all

for k,v in pairs(settings.profile.skills) do
      if v.Type ~= STYPE_HEAL and v.Type ~= STYPE_HOT then
            v.AutoUse = false
      end
end
To change individual skills use
changeProfileSkill(_skill, _option, _value)
Eg.

Code: Select all

changeProfileSkill("ROGUE_SHADOWSTAB", "AutoUse", true)
The trick is to find the correct option name. Most of them get capitalized when loaded.
  • 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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#25 Post by cufRet8e » Wed Dec 28, 2011 1:04 am

Thank you:)
Yes, it's for something else - running with mount. My character just cast buffs (like MAGE_INTENSIFICATION) when got aggro, even with TRAVEL waypoints (I think), and continue running (dismounted already) with those useless buffs.
You can move this message as it's unrelated to Ancient Treasures, sorry:)

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

Re: Ancient Treasures waypoint

#26 Post by rock5 » Wed Dec 28, 2011 2:06 am

cufRet8e wrote:running with mount. My character just cast buffs (like MAGE_INTENSIFICATION) when got aggro, even with TRAVEL waypoints (I think), and continue running (dismounted already) with those useless buffs.
Actually I think that is a bug that needs to be fixed. I'll have a look.
  • 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: Ancient Treasures waypoint

#27 Post by rock5 » Wed Dec 28, 2011 3:32 am

Ok, there is only one reference to the checkskills function in the player:moveTo.

Code: Select all

		-- while moving without target: check potions / friendly skills
		if( self:checkPotions() or self:checkSkills(ONLY_FRIENDLY) ) then	-- only cast friendly spells to ourselfe
So basically what I think I will do is, skip these if mounted and in travel mode or if mounted and in run mode and not battling. So

Code: Select all

		-- while moving without target: check potions / friendly skills
		if not (player.Mounted and __WPL.Type == WPT_TRAVEL) and not (player.Mounted and __WPL.Type == WPL_RUN and not player.Battling) then
			if( self:checkPotions() or self:checkSkills(ONLY_FRIENDLY) ) then	-- only cast friendly spells to ourselfe
How does that sound?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ancient Treasures waypoint

#28 Post by lisa » Wed Dec 28, 2011 6:18 am

So many "not"

ok let me see if I understand it properly

Code: Select all

 not (player.Mounted and __WPL.Type == WPT_TRAVEL)
So only if both are not at the same time.
so not mounted and wp type isn't travel

Code: Select all

not (player.Mounted and __WPL.Type == WPL_RUN and not player.Battling)
so player battling since double nengative?

so not mounted and also not wp type run and also player battling (in combat).

I am thinking it should be an or between them

Code: Select all

if not (player.Mounted and __WPL.Type == WPT_TRAVEL) or not (player.Mounted and __WPL.Type == WPL_RUN and not player.Battling) then
Little confusing with so many not but it should do the trick.
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

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

Re: Ancient Treasures waypoint

#29 Post by rock5 » Wed Dec 28, 2011 6:49 am

Yeh basically, if its type travel and mounted we don't want to cast. So we do want to cast if "not (type travel and mounted)". Also we dont want it to cast if type is run and mounted but only if not in combat, so we do want it to cast if "not (type is run and mount and not in combat)".

Finally, if either of those are true then we dont want to cast. But we do want to cast if "not (type travel and mounted) and not (type is run and mount and not in combat)". Because if either of those is true then we wouldn't want it to cast.

I think that's right. I can get confused too. It probably would have been easier to write

Code: Select all

if  (type travel and mounted) or  (type is run and mount and not in combat) then
    nothing
else
    check skills and potions.
end
Problem is I don't really want to test it. Anyone want to test it? cufRet8e do you want to test it?
  • 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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#30 Post by cufRet8e » Wed Dec 28, 2011 7:10 am

Of course:)
What exactly you wan't me to paste between my waypoints, or which files to modify?

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

Re: Ancient Treasures waypoint

#31 Post by rock5 » Wed Dec 28, 2011 7:30 am

Just had a thought, you wouldn't want to cast skills when mounted even if the type = normal. So it may be as simple as

Code: Select all

if not player.Mounted or (__WPL.Type ~= WPT_TRAVEL and player.Battling) then
    check skills and potions
end
I just did a little test. It still dismounts and it;s not because the logic is wrong. I think this might be harder than we thought because checkskills is run in a few different places.

Is there any reason we can't put the check for mounted right in the skill:canUse function? Then we could just add somewhere.

Code: Select all

	-- Is player mounted
	if player.Mounted then
		if __WPL.Type == WPL_TRAVEL or not player.Battling then
			return false
		end
	end
Ok cufRet8e, try this. In "skill.lua" at around line 172, just before

Code: Select all

	-- Is player level more than or equal to aslevel
add the code just above.
  • 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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#32 Post by cufRet8e » Wed Dec 28, 2011 8:04 am

Tested. Not working at the moment.
I inserted code as you said, to 172 line of classes\skill.lua:

Code: Select all

   -- Is player mounted
   if player.Mounted then
      if __WPL.Type == WPL_TRAVEL or not player.Battling then
         return false
      end
   end
Loaded rombot with Default profile, I created simple waypoint file with about 20 WPs, and this code in one of them:

Code: Select all

__WPL:setForcedWaypointType("TRAVEL")
useGoodie(***); <-- rock5, is any better way to get char mounted? :) I'm using mount ID atm. -->
yrest(5000);
So characted get mounted and start running in TRAVEL mode.

Code: Select all

Loading profile Default.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingamefunctions
' by copying the 'ingamefunctions' folder from 'rom/devtools' to the games 'interface/addo
ns' folder.
MACRO Test: ok
Ranged skill found: MAGE_FLAME
[DEBUG] CPU Frequency 3135.537
Waypoint files from X:/Programs/micromacro/scripts/rom:
Enter the number of the path you want to use and press Enter > 51
You chose 51
Loaded waypoint path test.xml
Waypoint #18 is closer then #1. Hence we start with waypoint #18.
No return path with default naming test_return.xml found.
We use the normal waypoint path test.xml now.
Moving to waypoint #24, (-16160, 6766)
Moving to waypoint #1, (-16080, 6720)
Moving to waypoint #2, (-16069, 6648)
Moving to waypoint #3, (-16061, 6580)
Moving to waypoint #4, (-16056, 6523)
Forced waypoint type 'TRAVEL' set by user.
Used 201928.
Clearing target.
Moving to waypoint #5, (-16085, 6471)
Moving to waypoint #6, (-16087, 6432)
Moving to waypoint #7, (-16035, 6444)
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #8, (-15989, 6435)
Use MACRO: MAGE_ELEMENTAL_CATAL=>   Skorpion ┼╗─ůdl─ůcy (4386/4386)
Use MACRO: MAGE_ENERGY_INFLUX  =>   Skorpion ┼╗─ůdl─ůcy (4386/4386)
Use MACRO: MAGE_ENERGY_WELL    =>   Skorpion ┼╗─ůdl─ůcy (4386/4386)
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #9, (-15993, 6472)
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #10, (-15944, 6487)
Last edited by cufRet8e on Wed Dec 28, 2011 8:25 am, edited 1 time in total.

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

Re: Ancient Treasures waypoint

#33 Post by rock5 » Wed Dec 28, 2011 8:20 am

That's annoying. setForcedWaypointType doesn't change the Type it only changes the ForcedType of the waypoints. Let me have a look at it.
  • 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: Ancient Treasures waypoint

#34 Post by rock5 » Wed Dec 28, 2011 8:24 am

No it's ok. When it finds the next waypoint it changes the Type to equal the Forced Type.

I see the problem. You can always count on me to include a typo. It should be "WPT_TRAVEL" not "WPL_TRAVEL". Change That and see if it works.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ancient Treasures waypoint

#35 Post by lisa » Wed Dec 28, 2011 8:53 am

So the code I put in to player:checkskills isn't working?

Code: Select all

if settings.profile.options.DISMOUNT == false and player.Mounted then return false end
just have

Code: Select all

<option name="DISMOUNT"		value="false" />
in your profile and it shouldn't use skills while mounted.
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

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

Re: Ancient Treasures waypoint

#36 Post by rock5 » Wed Dec 28, 2011 9:08 am

I see them as being 2 different things. I think by default that it shouldn't try to use skills when mounted if you've set the waypoint type to travel. And if it isn't waypoint type travel then it should not dismount to cast skills unless aggroed. I don't think users should have to set a setting when it should behave this way.

With these default behaviours most people wont need to use your setting. I think it would mainly be useful if users want to override the default waypoint type behavior, ie. if the user wants it not to dismount regardless of waypoint type.
  • 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
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#37 Post by cufRet8e » Wed Dec 28, 2011 9:12 am

rock5 wrote:No it's ok. When it finds the next waypoint it changes the Type to equal the Forced Type.

I see the problem. You can always count on me to include a typo. It should be "WPT_TRAVEL" not "WPL_TRAVEL". Change That and see if it works.
Changed in skill.lua:

Code: Select all

if __WPL.Type == WPT_TRAVEL or not player.Battling then
Is that correct?
Because it have no difference, in situation like this (I wrote in again, just to clarify):
  • running mounted, TRAVEL mode
    got aggro from mob
    cast MAGE_INTENSIFICATION etc.
    got dismounted because of casting
    said in terminal window, that it's not going to fight because of TRAVEL mode
    continue walking without harm enemies

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: Ancient Treasures waypoint

#38 Post by cufRet8e » Wed Dec 28, 2011 9:22 am

lisa wrote:So the code I put in to player:checkskills isn't working?

Code: Select all

if settings.profile.options.DISMOUNT == false and player.Mounted then return false end
just have

Code: Select all

<option name="DISMOUNT"		value="false" />
in your profile and it shouldn't use skills while mounted.
Where I should put this code with "if"? Because simply adding DISMOUNT to false does not change anything.

Code: Select all

We use the normal waypoint path test.xml now.
We changed the option 'DISMOUNT' from 'true' to 'false'.
Moving to waypoint #24, (-16160, 6766)
Moving to waypoint #1, (-16080, 6720)
Moving to waypoint #2, (-16069, 6648)
Moving to waypoint #3, (-16061, 6580)
Moving to waypoint #4, (-16056, 6523)
Forced waypoint type 'TRAVEL' set by user.
Used 201928.
Clearing target.
Moving to waypoint #5, (-16085, 6471)
Moving to waypoint #6, (-16087, 6432)
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #7, (-16035, 6444)
Use MACRO: MAGE_ELEMENTAL_CATAL=>   Skorpion ┼╗─ůdl─ůcy (4539/4539)
Use MACRO: MAGE_ENERGY_INFLUX  =>   Skorpion ┼╗─ůdl─ůcy (4539/4539)
Use MACRO: MAGE_ENERGY_WELL    =>   Skorpion ┼╗─ůdl─ůcy (4539/4539)
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #8, (-15989, 6435)

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

Re: Ancient Treasures waypoint

#39 Post by rock5 » Wed Dec 28, 2011 9:33 am

Is it possible you have intensification in your onPreSkillCast section of your waypoint?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ancient Treasures waypoint

#40 Post by lisa » Wed Dec 28, 2011 9:36 am

it still used the skill while mounted and profile option DISMOUNT was set to false??

That isn't right.

There must be something else casting those buffs and not the usual bot checking skills.
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: No registered users and 2 guests