You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Sunday, July 8th 2012, 8:19pm

Warlock macro help pwease?

Hey, I'm trying to figure out how to Macro 2 different spells to one number, for example, and what I'm pretty much trying to do, make it so I can push 2 once for Soul Poisoned Fang, then again for perception extraction. I see how to do the wait aspect, but I want it on tap. How would one go about that? Thanks in advance!

Posts: 70

Location: Austin, Texas

Occupation: Quality Assurance Manager

  • Send private message

2

Sunday, July 8th 2012, 9:46pm

There's two ways you can accomplish what you are trying to do with two commands in one macro keypress. The first method is to chain them together with a /wait command in between, which will make them both execute every time you press the key.

Source code

1
2
3
/cast Soul Poisoned Fang
/wait 0.8
/cast Perception Extraction


The second method is to create a custom add-on with some additional functions that will help automate the logic flow when trying to conditionally use certain skills or spells. This takes a little more work initially, but makes your macro usage later a lot easier to manage. We'll start by creating a directory and two text files that will contain these additional functions.

Create the following directories in the Runes of Magic folder: /Interface/Addons/MyFunctions/

In this directory you will create two text files; MyFunctions.toc and MyFunctions.lua

MyFunctions.toc

Source code

1
2
3
# My functions to help with macro usage.
#
MyFunctions.lua


MyFunctions.lua

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- Base functions used to help with macro usage.

function ChkDebuff(tgt,buffname)
   local counter=1
   local currentbuff="none"
   while currentbuff ~= nil do
      currentbuff=UnitDebuff(tgt,counter)
      if currentbuff == buffname then
         return true
      else
         counter=counter+1
      end
   end
   return false
end

function SkillUsable(SkillName)
   x = 1
   while(x <= 5)do
      totalCount = GetNumSkill(x)
      if(totalCount)then
         y = 1
         while(y <= totalCount) do
            local name, _1, icon, _2, rank, _3, tp_to_upgrade, energy_type, usable = GetSkillDetail(x,y)
            if string.lower(name) == string.lower(SkillName) and usable == true then
               totalCD, remainingCD = GetSkillCooldown(x, y)
               if(remainingCD <= 1)then
                  return true
               end
            end
            y = y + 1
         end
      end
      x = x + 1
   end
   return false
end

-- This one just shortens the command name to save space in the in-game macro editor.

function CSBN(skill)
   CastSpellByName(skill)
end


And then in the in-game macro editor you can use the following. This will check first to see if the target has the Soul Poisoned Fang debuff and cast Perception Extraction if it does, and cast Soul Poisoned Fang if it does not.

Macro:

Source code

1
2
/script if ChkDebuff("target","Soul Poisoned Fang") and SkillUsable("Perception Extraction") then CSBN("Perception Extraction");
/script if not ChkDebuff("target","Soul Poisoned Fang") and SkillUsable("Soul Poisoned Fang") then CSBN("Soul Poisoned Fang");

Kalvan

Super Gamemaster

Posts: 2,053

Location: Lurking Amongst the Forums

  • Send private message

3

Sunday, July 8th 2012, 10:13pm

/moved thread
[ New Sig Coming. Watch This Space! ]