Remove buff

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
romaniac
Posts: 79
Joined: Sat Feb 04, 2012 8:25 am

Remove buff

#1 Post by romaniac » Tue Aug 28, 2012 4:50 pm

In the game you can remove some buffs by right-clicking on the icon next to the minimap.

Can you do this for a certain buff with the bot?

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

Re: Remove buff

#2 Post by lisa » Tue Aug 28, 2012 7:17 pm

I thought there was a removebuff function but I can't find it.

Anyway you are looking at something like this
using the buff ID of the buff

Code: Select all

mybuff = player:getBuff(ID)
		for index, buff in pairs(player.Buffs) do
			if string.find(mybuff.Name,buff.Name,1, true) then
				sendMacro("CancelPlayerBuff("..index..");")
				return
			end
		end
getBuff() does an updateBuffs() so no need to do it again afterwards.
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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Remove buff

#3 Post by gloover » Wed Oct 24, 2012 10:23 am

Hey lisa,

do you know how to get the buff-remaining time?

player:hasBuff("Buffname") can only print true or false - is it possible to get the buff remaining time?

thx in advance!

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

Re: Remove buff

#4 Post by rock5 » Wed Oct 24, 2012 11:05 am

The bot doesn't have a way to get the time left on a buff, it has no use for it. You would have to use the in game functions. Probably a combination of the "list buffs" macro that is floating around and the UnitBuffLeftTime function. So something like

Code: Select all

RoMScript("} local i=1 while UnitBuff( \"player\", i) ~= nil do if UnitBuff( \"player\", i) == \""..name.."\" then a = {UnitBuffLeftTime(\"player\",i)} break end i = i + 1 end z={")
Where 'name' is a variable that holds the buff name.
  • 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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Remove buff

#5 Post by gloover » Wed Oct 24, 2012 11:16 am

thx rock. Have found an elegant solution in combination with lisas buff index checking:

Code: Select all

lefttime=RoMScript("GetPlayerBuffLeftTime(GetPlayerBuff("..index..", 'HELPFUL'))");
thx again!

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Remove buff

#6 Post by beanybabe » Thu Oct 20, 2016 2:40 pm

I tried using waypoint that uses the remove buff from lisa but it is not clearing the buff. This should clear the frog maid buff "Princely Look", can anyone see what is wrong.

Code: Select all

	function CancleBuff()
		player:update()
		mybuff = player:getBuff(506685)
		for index, buff in pairs(player.Buffs) do
			if string.find(mybuff.Name,buff.Name,1, true) then
				sendMacro("CancelPlayerBuff("..index..");")
				return
			end
		end
	end

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests