mounted and skills discussion

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

mounted and skills discussion

#1 Post by lisa » Wed Dec 28, 2011 7:50 pm

This discussion was started in another thread which had nothing to do with skills and being mounted, so moving discussion to here.

Last post of note is by rock
rock5 wrote:This was doing my head in. Took me ages to figure out I forgot to change the WPL_TRAVEL to WPT_TRAVEL. LoL

But now it seems to be working fine with type="TRAVEL" at the top of the file. Unfortunately

Code: Select all

__WPL:setForcedWaypointType("TRAVEL")
doesn't seem to work. The waypoint type doesn't seem to change. Even

Code: Select all

__WPL.Type = WPT_TRAVEL
doesn't work. It seems to change the type but still tries to attack.

I think I'm not understanding the type stuff properly. I've had enough for tonight. Maybe I'll look into it some more tomorrow.
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: mounted and skills discussion

#2 Post by lisa » Wed Dec 28, 2011 7:55 pm

lisa wrote:
kanta wrote:The problem is that this code works a little too well... Even if in NORMAL travel mode, it won't cast skills if mounted. So if in NORMAL mode while mounted and you get attacked, the bot will stop moving and not fight back. At least that's how it acted for me.
Hmm I didn't anticipate the bot just stopping, that is deffinately not what we want to happen.

I'll have to blow the cobwebs off some chars and do some testing.
I'll see if I can do some testing on this later today, pretty busy at the moment so not sure if I will have time or not.


I was having a thought earlier, is there any time when you are mounted that you do actually want to use skills?
Generally if mounted you are trying to get somewhere faster, you wouldn't normally mount to go from mob to mob.

So if you know you are traveling from place to place then you will probably also know where you want to dismount aswell and not before hand?

That is the way I see it anyway, any other thoughts?
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: mounted and skills discussion

#3 Post by rock5 » Wed Dec 28, 2011 10:59 pm

So I figured it out in my head last night. __WPL.Type doessn't change. _WPL.ForcedType changes when the "setForcedWaypointType" command is used. Each waypoint can also have it's own "Type" setting as well. So the way it works is, moveTo gets the next waypoint using wpl:getNextWaypoint. getNextWaypoint creates a temporary waypoint with the coordinates of the next waypoint and then looks at __WPL.Type and _WPL.ForcedType and if the waypoint has it's own Type, then sets the temporary waypoint to the "correct type". So this "correct type" only exists in the moveTo function where it called the getNextWaypoint function.

I think now with this better understanding I can get it to work from in the moveTo function. I'll try it now.
lisa wrote:I was having a thought earlier, is there any time when you are mounted that you do actually want to use skills?
Generally if mounted you are trying to get somewhere faster, you wouldn't normally mount to go from mob to mob.

So if you know you are traveling from place to place then you will probably also know where you want to dismount aswell and not before hand?

That is the way I see it anyway, any other thoughts?
You don't know what someone want to do at the other end. They might want to travel to their next hunting ground and want to start fighting as soon as they get there. I think it's a bit much to expect users to remember to dismount. It should attack if the bot decides to atack. Which brings me to another point. The bot already does a good job of deciding if to attack or not. The problem is the buffs. So if the bot has decided to attack a mob, for whatever reason, then yours and my settings shouldn't interfere with it. We should just be trying to stop it casting buffs.
  • 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: mounted and skills discussion

#4 Post by lisa » Wed Dec 28, 2011 11:29 pm

rock5 wrote:We should just be trying to stop it casting buffs.
That would be a very good idea and probably potions aswell.
checkSkills()
actually has a checkpotions at the end of it.

I might do some testing of this

Code: Select all

	local useQueue = true;
	if( #self.SkillQueue > 0 ) then
		-- Queue is not empty. See if we can cast anything
		local skill = self:getNextQueuedSkill();
		if settings.profile.options.DISMOUNT == false and player.Mounted and skill.Type == "buff" then return false end
		local target = self:getTarget();
		if( skill.Blocking ) then
So instead of stopping the code before even checking for skill que, let it get to skill que and then check if the skill is a buff.
Could actually get rid of the profile option altogether if doing it this way. It should only stop bot casting buffs.

might need to be

Code: Select all

 skill.Type == 2 --buff
Maybe stop heals aswell? if we only want bot to dismount if attacking ?
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: mounted and skills discussion

#5 Post by lisa » Wed Dec 28, 2011 11:37 pm

Hmm Something like this might be better

Code: Select all

		local skill = self:getNextQueuedSkill();
		if player.Mounted and (skill.Type ~= 0 and skill.Type ~= 3 ) then return false end
keeping in mind
-- Skill types
STYPE_DAMAGE = 0
STYPE_HEAL = 1
STYPE_BUFF = 2
STYPE_DOT = 3
STYPE_HOT = 4
STYPE_SUMMON = 5

So will only use damage or damage over time skills if 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

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

Re: mounted and skills discussion

#6 Post by kanta » Thu Dec 29, 2011 12:50 am

lisa wrote:So if you know you are traveling from place to place then you will probably also know where you want to dismount aswell and not before hand?
Pretty much what I ended up doing is switching the true and false values for the dismount option within my waypoint file. 99% of the time it works just fine for me as it is, there was only one file that I had difficulty with.

As for it being talked about in my thread, no worries. It happens. :D
Scout/Knight/Rogue 70/66/66

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

Re: mounted and skills discussion

#7 Post by rock5 » Thu Dec 29, 2011 1:53 am

lisa wrote:if settings.profile.options.DISMOUNT == false and player.Mounted and skill.Type == "buff" then return false end
I think that is the solution. Just stop all buffs (and heals) while mounted. If it attacks a mob then it will dismount and use skills as normal. Of course if it attacks a mob when mounted, it wont use any heals or buffs until it dismounts. It would be good that if it new it was going to attack then use heals and buffs. Maybe we could use player.Fighting. That's supposed to indicate that you are starting to fight.
lisa wrote:

Code: Select all

      local skill = self:getNextQueuedSkill();
      if player.Mounted and (skill.Type ~= 0 and skill.Type ~= 3 ) then return false end
keeping in mind
-- Skill types
STYPE_DAMAGE = 0
STYPE_HEAL = 1
STYPE_BUFF = 2
STYPE_DOT = 3
STYPE_HOT = 4
STYPE_SUMMON = 5
I'd just use the variables, that's what they're there for.

Code: Select all

if player.Mounted and (skill.Type ~= STYPE_DAMAGE and skill.Type ~= STYPE_DOT ) then return
How about summoning? Do we want it to summon when mounted?
  • 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: mounted and skills discussion

#8 Post by lisa » Thu Dec 29, 2011 2:02 am

rock5 wrote:How about summoning? Do we want it to summon when mounted?
I am going to go with no to summoning while mounted.

Eventually I intend to use the wardenpet class I am working on which will deal with summoning and such, long way off yet though.

Does the bot try to summon pets in a normal skill rotation though, if it does then I doubt we want that happening as you are just riding along on your horse, probably better to deal with that in the player:fight() code.

Might need to also check if it tries to use type summon while travel or run ?
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: mounted and skills discussion

#9 Post by rock5 » Thu Dec 29, 2011 3:40 am

I've got it!

I had another look at this line in player:moveTo, line 2161.

Code: Select all

		if ( self:checkPotions() or self:checkSkills(ONLY_FRIENDLY) ) then	-- only cast friendly spells to ourselfe
This is the only time it checks for potions and skills in moveTo. These are only heals and buff so, seeing as we've established we only want to stop heals and buffs, all we have to do is bypass these if mounted. So

Code: Select all

		if not player.Mounted and ( self:checkPotions() or self:checkSkills(ONLY_FRIENDLY) ) then	-- only cast friendly spells to ourselfe
works. Except it also checks potions and friendly skills between moveTos in bot.lua. So around line 745 of bot.lua also change

Code: Select all

			player:checkPotions();
			player:checkSkills( ONLY_FRIENDLY );	-- only cast hot spells to ourselfe
to

Code: Select all

			if not player.Mounted then
				player:checkPotions();
				player:checkSkills( ONLY_FRIENDLY );	-- only cast hot spells to ourselfe
			end
For me this works perfectly. When type = travel it never dismounts even when loosing buffs. When type = run it only dismounts if attacked and even casts buffs and heals first if they have higher priority. And of course when type = normal it dismounts immediately when attacking a mob.

Try it out.
  • 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: mounted and skills discussion

#10 Post by lisa » Thu Dec 29, 2011 4:21 am

Cool sounds good, I'll take your word that it works, I don't really get to test out to much stuff in game now days.

The code deffinately should work though so I would say you are right.

How about the travel changing option did you work out if that does what we think it should or is it still not working properly?

If we get changing waypoint type working then won't need the profile option for dismount anymore.
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: mounted and skills discussion

#11 Post by rock5 » Thu Dec 29, 2011 4:51 am

lisa wrote:How about the travel changing option did you work out if that does what we think it should or is it still not working properly?
Do you mean "setForcedWaypointType"? That's what I was testing with. Worked perfectly. The problem I reported is just because I didn't understand it properly yet.
lisa wrote:If we get changing waypoint type working then won't need the profile option for dismount anymore.
Probably true. If someone wants it to not dismount then all they have to do is set type to travel and mount up.
  • 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

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

Re: mounted and skills discussion

#12 Post by kanta » Thu Dec 29, 2011 3:47 pm

The new code is working great for me.
Scout/Knight/Rogue 70/66/66

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests