Problem with LOS (Line of sight) when mounted

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Problem with LOS (Line of sight) when mounted

#1 Post by Shogun » Thu Dec 08, 2011 9:44 am

It happens quite often that the bot is not able to attack or fight back when mounted. Previously the character automatically was unmounted, with LOS it gets a lot of hits until the mount occasionally does not block the line. The bot now better should unmount at the begin of the attack.

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

Re: Problem with LOS (Line of sight) when mounted

#2 Post by rock5 » Thu Dec 08, 2011 12:45 pm

I haven't noticed that happening and I have been starting attacks mounted.

Does it happen with all mobs or certain mobs? Does it happen with all mounts or only certain mounts.
  • 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

Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Re: Problem with LOS (Line of sight) when mounted

#3 Post by Shogun » Thu Dec 08, 2011 2:20 pm

I noticed this several times at the butterflies. The mob is in front of the mount, attacks and the character moves backwards with every hit. There is repetitive this message "line of sight blocked". I usually ended this by unmounting manually. There may be a difference by the kind of mount, I only have pegasus.

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

Re: Problem with LOS (Line of sight) when mounted

#4 Post by rock5 » Thu Dec 08, 2011 2:26 pm

Can you get your hands on a temp mount?
  • 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

Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Re: Problem with LOS (Line of sight) when mounted

#5 Post by Shogun » Fri Dec 09, 2011 2:49 am

Changing the mounts is no option, I have mounts that can walk on water. I will now solve this with a call to CancelBuff() when entering the butterfly area. The described behaviour looks too bottish and low level chars do not survive.

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

Re: Problem with LOS (Line of sight) when mounted

#6 Post by rock5 » Fri Dec 09, 2011 3:18 am

Shogun wrote:Changing the mounts is no option, I have mounts that can walk on water. I will now solve this with a call to CancelBuff() when entering the butterfly area. The described behaviour looks too bottish and low level chars do not survive.
I didn't mean permanently, I meant just to test if the problem is your mount. I actually tested a pegasus I had with one of my characters. Still had no issues but it was the older type that doesn't walk on water.

Anyway, cancelling the horse is easy enough.
  • 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

Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Re: Problem with LOS (Line of sight) when mounted

#7 Post by Shogun » Mon Jan 16, 2012 12:35 pm

rock5 wrote:I've added

Code: Select all

player:dismount()
to revision 690. Enjoy.
Nice to have that now, thanks rock!

To solve the described problem you can add a dismount call in CPlayer:fight()

Code: Select all

	-- Prep for battle, if needed.
	--self:checkSkills();

	self:dismount();

--	local target = self:getTarget();  / double
I added an unmount function about 4 weeks ago, did not make it public because you have to add your mounts to a mounts table. If anyone is interested, but i recommend to use rock's function:

Code: Select all

function CPlayer:unmount()
	if( not self.Mounted ) then return; end

	local mounts_table = {
		{ MountName="Flying Rune Disk (Permanent)", ID=206946, BuffID = 506176},
		{ MountName="Pegasus Mount (Permanent, Swim)", ID=206283, BuffID = 505066},
		{ MountName="Black Pegasus Mount (Permanent, Swim)", ID=206289, BuffID = 505065},
		{ MountName="Purple Crested Ostrich Mount (Permanent)", ID=206316, BuffID = 505075},
		};
	for i, v in pairs(mounts_table) do
		if player:hasBuff(v.BuffID) then
			RoMScript("igf_CancelBuff("..v.BuffID..");")
			-- yrest(300);
			repeat
				yrest(100);
				self:update();
			until self.Mounted == false
			return;
		end
	end
end
What still can be usefull is the CancelBuff ingame function:

Code: Select all

function igf_CancelBuff(buffNameOrId)
  local i=0;
  repeat
    i=i+1
    local buff,icon,cnt,id,params = UnitBuff("player", i);
      -- ChatFrame1:AddMessage("buff:"..buff.." id:"..id);
      if type(buffNameOrId) == "number" then
        if( id == buffNameOrId ) then
          ChatFrame1:AddMessage("igf_CancelBuff("..buff..")");
          CancelPlayerBuff(i);
          return;
        end
      else
        if( buff == buffNameOrId ) then
          ChatFrame1:AddMessage("igf_CancelBuff("..buff..")");
          CancelPlayerBuff(i);
          return;
        end
      end
  until (buff==nil);
end

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

Re: Problem with LOS (Line of sight) when mounted

#8 Post by rock5 » Mon Jan 16, 2012 9:40 pm

What I did was just make it mount again to dismount. That way it uses the same list of mounts and doesn't require a whole new function. All I did was modify mount to accept an argument to dismount

Code: Select all

player:mount(true)
This will dismount instead of mount. Then I added a simple dismount function to call that.

Code: Select all

function CPlayer:dismount()
	self:mount(true)
end
Much simpler and easier to maintain.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 201 guests