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?
Remove buff
Re: Remove buff
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
getBuff() does an updateBuffs() so no need to do it again afterwards.
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
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Remove buff
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!
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!
Re: Remove buff
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
Where 'name' is a variable that holds the buff name.
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={")
- 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
Re: Remove buff
thx rock. Have found an elegant solution in combination with lisas buff index checking:
thx again!
Code: Select all
lefttime=RoMScript("GetPlayerBuffLeftTime(GetPlayerBuff("..index..", 'HELPFUL'))");
Re: Remove buff
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
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 5 guests