AutoBuf

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#21 Post by rock5 »

That would be because there is no VN function. Some earlier code you posted had the VN function but the last lua file you posted didn't. I'm not sure what VN is supposed to do but if all your addon is supposed to do is cast "Sublimation Weave Curse" then the OnEvent function already does that so you could delete that line.
  • 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
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#22 Post by Draakje »

okay, I get now as soon typed warlock, targettarget and char just targets itself not using a skill/cast
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#23 Post by Draakje »

Removed line:
TargetUnit("player", "event")

not using any skill aswell after typing: warlock
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#24 Post by rock5 »

Hm... I can't seem to get CastSpellByName to work from the chat line so maybe it's one of those commands that have been disabled. I know a while back it became harder to use some commands in some situations. I'm not exactly sure of all the particulars but thank goodness we can still use all the commands from the bot. I'm not sure what you would need to get it to work. Maybe you should look at trying the party bot. I'm pretty sure it can do everything you need.
  • 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
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#25 Post by Draakje »

I've checked ingame, if i make a macro with CastSpellByName it triggers the skill
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#26 Post by rock5 »

Macros are different. Because they are triggered by mouse clicks or key presses they work. Entering it on chat doesn't. And I think it wont work if it's triggered by an addons OnUpdate or OnEvent.
  • 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
i1own0u
Posts: 32
Joined: Mon Mar 19, 2012 6:32 pm

Re: AutoBuf

#27 Post by i1own0u »

CastSpellByName("Urgent Heal") break

works fine in addons where i have that as a line.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#28 Post by rock5 »

What addon? How is it being triggered?
  • 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
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#29 Post by Draakje »

Hmm now im curious :p, maybe make small addon to see it works ingame
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#30 Post by Draakje »

Um i've been thinking around. And wondering if I make an addon that triggers a macro ingame by message or warlock by party?
Think it possible? This is not working though ^^
Macro is working individually but not by the addon.

Code: Select all

local disabled = true -- Starting value

SLASH_AutoBuffer1 = "/AutoBuffer"
SLASH_AutoBuffer2 = "/AB" -- Add as many variations as you like just increment the number
SlashCmdList["AutoBuffer"] = function(editBox, msg)
    if msg then
        msg = string.lower(msg)
        if msg == "on" then -- on
            disabled = false
        elseif msg == "off" then -- off
            disabled = true
        else
            disabled = not disabled -- Toggles addon if 'on' or 'off' is not used.
        end
        if disabled then
            SendSystemChat("AutoBuffer is disabled")
         SendChatMessage("|H|h|cffFF0000AutoBuffer has been deactivated|h", "party")
        else
            SendSystemChat("AutoBuffer is enabled")
         SendChatMessage("|H|h|cff16DC07AutoBuffer has been activated|h", "party")
        end
    end
end

local AutoBuffer = {} -- the AddOn namespace, all your functions should be placed inside here instead of as globals.
_G.AutoBuffer = AutoBuffer -- expose it to the global scope


function AutoBuffer.OnEvent(event, arg1, arg2, arg3, arg4)
    if event == "CHAT_MSG_PARTY" then
        if arg1 == "warlock" or "lock" or "locky" or "Warlock" or "blitz" then
            UseAction("1");
        end
    end
end


local time_remaining = 1 -- in seconds
function AutoBuffer:OnUpdate(elapsed)
   if disabled == true then
      return
   end
    -- elapsed is the amount of time in seconds since the last frame tick

    time_remaining = time_remaining - elapsed
    if time_remaining > 0 then
        -- cut out early, we're not ready yet
        return
    end
    time_remaining = 1 -- reset to 2 seconds
    AutoBuffer.VN()
end
Ingame Macro:

Code: Select all

/run for i=1,18 do TargetNearestFriend() if UnitIsPlayer("target") then CastSpellByName("Regenerate") else TargetUnit("") end end
i1own0u
Posts: 32
Joined: Mon Mar 19, 2012 6:32 pm

Re: AutoBuf

#31 Post by i1own0u »

rock5 wrote:What addon? How is it being triggered?
It's custom made.

if CastingBarFrame:IsVisible() then
return
else
for i=1,50 do
if UnitBuff("player",i)=="Chain Drive" then
if UnitHealth("player")/UnitMaxHealth("player")<=.30 then
CastSpellByName("Urgent Heal") break
elseif UnitInRaid("player") then
for i=1, 12 do
TargetUnit("raid"..i)
if UnitExists("target") and UnitIsPlayer("target") then
if UnitHealth("target")/UnitMaxHealth("target")<=.97 then
CastSpellByName("Urgent Heal") break
end
end
end
else
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#32 Post by rock5 »

That code doesn't repeat so I assume you trigger it with a mouse click or key press, maybe you use it in a macro that you trigger with a mouse click or key press. Either way, that's why it works, because you trigger it with a mouse click or key press. The addon that tries to cast a spell that way, triggered by an event such as OnUpdate, won't work.
  • 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
Draakje
Posts: 63
Joined: Sat Aug 10, 2013 6:24 am

Re: AutoBuf

#33 Post by Draakje »

Is there a way to trigger a macro ingame then with an addon?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: AutoBuf

#34 Post by rock5 »

I'm not sure if there is a command to execute a macro directly but you can put the macro in the action bar and execute it from there.

Code: Select all

UseAction(slotno)
But it wont make any difference. The game somehow knows what initially triggered a command. And if the command was not triggered by a click or key press then it wont work. That's why the bot can execute commands that an addon can't, because it simulates keypresses.
  • 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: AutoBuf

#35 Post by lisa »

rock5 wrote:That's why the bot can execute commands that an addon can't, because it simulates keypresses.
Yup.
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