Give a Macro, Take a Macro!

Welcome to the forums of Runes of Magic EN & US

Rules and Guidelines: Game Rules - Community Guidelines - Terms of Use - RoM Servers Status

Customer Support: EN/EU Customer Support - US Customer Support

Get in touch with us: Join our Discord!
  • i think we don't have a macro like this already ...


    OffhandChanger - if you got an offhand weapon in your inventory, and another one equipped, and want to swap these two, then this macro is what you need

    Code
    1. /run oh1="MYOFFHAND1" oh2="MYOFFHAND2" dV,dM,iN,dVF,dMF=GetInventoryItemDurable("player",16) if iN==oh1 then sw=oh2 else sw=oh1 end for i=1,180 do a,_,b,c=GetBagItemInfo(i) if b==sw then sws=a end end EquipItem(17,sws)

    you need to enter the names of your offhand items in the quotes of oh1 and oh2. both need to be exact and case-sensitive!

    Eigentlich bin ich ein Gnom !


    Wichtl @ Kadmos (††† R.I.P. Zikiel 2021-08 †††)

    Gagh @ Kerub

    Edited once, last by Wichtl @ Zikiel ().

  • Do you guys know of a macro that checks for a certain food and uses it if inactive? Like if Hero Potion is not active then it uses Hero Potion? TIA :)

  • Do you guys know of a macro that checks for a certain food and uses it if inactive? Like if Hero Potion is not active then it uses Hero Potion? TIA :)




    Code
    1. /run local dbn,itm,need="buffname","itemname",true for i=1,40 do local bN,_,_,_=UnitBuff("player",i) if bN==nil then break else if bN==dbn then need=false end end end if need then UseItemByName(itm) end

    not yet tested, but should work

    will test it later



    (french voice) * a few moments later ....*
    test successful
    of course, you will have to edit "buffname" and "itemname" to whatever you desire

    Eigentlich bin ich ein Gnom !


    Wichtl @ Kadmos (††† R.I.P. Zikiel 2021-08 †††)

    Gagh @ Kerub

    Edited 2 times, last by Wichtl @ Zikiel ().

  • It works! Of course, doing this for every item will take a crazy amount of text that goes beyond the text limit even with Extended Macro Icons addon. Is there any way to add more items to this single line of code? I'm thinking of Wedding Foods, Unbridled Enthusiasm, Hero Potion, Birthday Cake, etc.


    Wonder if you can add the list as an array to this macro. Otherwise, it works great!

    Edited 2 times, last by Psychee ().

  • you will still have to use the macro multiple times, but ....



    Code
    1. /run local xyz={} xyz["Hero Potion"]="Hero Potion" xyz["buffname"]="itemname" for dbn,itm in pairs(xyz) do xyza=true for i=1,40 do local bN,_,_,_=UnitBuff("player",i) if bN==nil then break else if bN==dbn then xyza=false end end end if xyza then UseItemByName(itm) break end end


    not sure if i'm using the arrays correctly, but i'll test&correct it in the next few minutes.

    edit: don't use this ... yet. doesn't work at the moment
    edit2: here we go. now it works. but as i said, you'll have to use the macro once for every potion/food you want to consume. global cooldown issue.



    it could be made a bit shorter, if you know that the itemname and the buff name are the same:

    Code
    1. /run local xyz={"Hero Potion","itemname"} for k,v in pairs(xyz) do xyza=true for i=1,40 do local bN,_,_,_=UnitBuff("player",i) if bN==nil then break else if bN==v then xyza=false end end end if xyza then UseItemByName(v) break end end



    another way would be to use KittyCombo ....

    Eigentlich bin ich ein Gnom !


    Wichtl @ Kadmos (††† R.I.P. Zikiel 2021-08 †††)

    Gagh @ Kerub

    Edited 4 times, last by Wichtl @ Zikiel ().

  • Code
    1. /run local xyz = {["Helden-Trank"]="Helden-Trank"} for i=1,40 do local name=UnitBuff("player",i) if name==nil then break end xyz[name] = nil end for _, name in pairs(xyz) do UseItemByName(name) break end

    credit by trusted addon developer ;) (thanks py)

  • still ugly -.-


    Code
    1. /run local xyz = {[501337]=200277} for i=1,40 do local _,_,_, id=UnitBuff("player",i) if id==nil then break end xyz[id] = nil end for _, id in pairs(xyz) do UseItemByName(TEXT("Sys"..id.."_name")) break end

    this is slightly better

  • I can compete with bad aesthetics :D

    Code
    1. /run local l = {[506684]=207200,[506686]=207202} for a,b in pairs(l) do local i,j=0,0 repeat i=i+1 local _,_,_,c=UnitBuff("player",i) if c==a then j=1 break end until not c if j<1 then UseItemByName(TEXT("Sys"..b.."_name")) end end
  • can someone write here how to swap position from secondary party to first for use morale or others skill for buff and come back come ?i check a macro but not works for me ....i can swap with specific name player in group one or just swap random is ok

  • can someone write here how to swap position from secondary party to first for use morale or others skill for buff and come back come ?i check a macro but not works for me ....i can swap with specific name player in group one or just swap random is ok

    use one of the priest/druid/warlock group buff macros already listed in this thread. they are working, you only need to change the skill

    Eigentlich bin ich ein Gnom !


    Wichtl @ Kadmos (††† R.I.P. Zikiel 2021-08 †††)

    Gagh @ Kerub

  • Is there a possibility to choose pet-food by inventory or name, place it in pet-food-slot and then feed the pet?

    Needed, because of unknown reasons, which lead to not able to open pet-menu ;)

  • Is there a possibility to choose pet-food by inventory or name, place it in pet-food-slot and then feed the pet?

    Needed, because of unknown reasons, which lead to not able to open pet-menu

    This macro will feed the pet and summon it. Change the P variable at the start if your pet is not in the first slot.

    Code
    1. /run local P=1; function PH_Feed(P,F,Q) if Q>0 then local c,i; for i=1,180 do local a,b,name,c=GetBagItemInfo(i); if name==F then PickupBagItem(GetBagItemInfo(i)); if Q>c then Q=c; end; ClickPetFeedItem(); for i=1,Q do FeedPet(P); end; ClearPetFeedItem(); break; end; end; end; end; if IsPetSummoned(P) then ReturnPet(P); else local L=100-GetPetItemAbility(P,"LOYAL"); local H=100-GetPetItemAbility(P,"HUNGER"); H=(H-(H)%5)/5; PH_Feed(P,"Dessert of Happiness",L); PH_Feed(P,"Miller's Special Cake",H); SummonPet(P); end
  • I would say you wont need a kitty for warrior/mage.

    --------------------------------------------------------Druidi-------------------------------------------------------

    Server: Rath

    Gilde: SonsofAnarchy

    War/Mage