they broke UseAction()

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

they broke UseAction()

#1 Post by j_schlott » Fri Oct 30, 2009 2:34 am

so ive been using UseAction to loop my rogue Hide() function

but since the last patch they changed UseAction to not work for calling itself/other macros
this is what i was using:
ingame(slot59):

Code: Select all

/wait 1
/run Hide();UseAction(59);
and an addon for functions(.lua file):

Code: Select all

function ChkBuff(tgt, ...)
    local counter = 1;
    local friendly = UnitIsPlayer(tgt);
    local currentbuff = "none";

    while (currentbuff ~= nil) do
        if friendly then
            currentbuff = UnitBuff(tgt, counter);
        else
            currentbuff = UnitDebuff(tgt, counter);
        end

        for i,v in pairs(arg) do
            if (currentbuff == tostring(v)) then
                return true;
            end
        end

        counter = counter + 1;
    end

    return false;
end

function IsMounted()
local all_mounts = { "horse","ostrich","berhu","wartiger","ferret","dragonfang","boar","rhino","unicorn","rent" }
local counter=0
local buff="none"

repeat
for i,mount in pairs(all_mounts) do
if string.find(string.lower(buff),mount) ~= nil then
return true, counter
end
end
counter=counter+1
buff=UnitBuff("player",counter)
until buff == nil
return false, 0
end

function IsPoisoned()
local all_poisons = { "bleed","poisoned","tear","puncture wound","infection" }
local counter=0
local debuff="none"

repeat
for i,poison in pairs(all_poisons) do
if string.find(string.lower(debuff),poison) ~= nil then
return true, counter
end
end
counter=counter+1
debuff=UnitDebuff("player",counter)
until debuff == nil
return false, 0
end

function Hide()
local counter = 0;
   if GetPlayerCombatState("true") then
	counter=counter+1;
   elseif IsMounted() then
	counter=counter+1;
   elseif IsPoisoned() then
	counter=counter+1;
   elseif ChkBuff("player","Hide") then
	counter=counter+1;
   else CastSpellByName("Hide");
   end;
end
none of this works now, i did find this: http://www.theromwiki.com/index.php/Add ... ial#Timers
using frames/xml to fire off a function on a timer, i thought it could be adepted, but i tried and failed

i wasnt sure where to add my functions into the wiki example or what to modify other than this little part:

Code: Select all

function HelloWorld.Print()
    DEFAULT_CHAT_FRAME:AddMessage("Hello, World!")
end
to

Code: Select all

function HelloWorld.Print()
local counter = 0;
   if GetPlayerCombatState("true") then
	counter=counter+1;
   elseif IsMounted() then
	counter=counter+1;
   elseif IsPoisoned() then
	counter=counter+1;
   elseif ChkBuff("player","Hide") then
	counter=counter+1;
   else CastSpellByName("Hide");
   end;
end
if anyone is up to the challenge of adding my functions into the wiki timer example, maybe giving it a on/off toggle slash command=P that would be much appreciated

S3v3n11
Posts: 91
Joined: Thu Jul 09, 2009 7:37 am

Re: they broke UseAction()

#2 Post by S3v3n11 » Fri Oct 30, 2009 5:59 am

They also changed UseItemByName();

Not sure what they are thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 129 guests