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.

21

Thursday, February 4th 2010, 5:36pm

Here are brief instructions for setting this code up manually (without using the .zip file), but if you get confused or it's not working, go to the first link in my sig for explicit instructions.

If you have other addons for RoM that you're already using, you won't need to create the folders in step #2 and #3 as they will already be there.

1) Find the folder for your Runes of Magic game (typically C:\Program Files\Runes of Magic).

2) Create a folder called "Interface" there and go into it.

3) Create a folder called "Addons" there and go into it.

4) Create a folder called "DIYCE" there and go into it[INDENT] You should now be in a folder path like this: C:\Program Files\Runes of Magic\Interface\Addons\DIYCE
[/INDENT]5) Create two files in that folder: DIYCE.toc and DIYCE.lua[INDENT]The easiest way to do this and avoid creating files with a hidden .txt extension is open up Notepad and pick File -> Save As, then change the file type to "All Files" and type in the file name (be sure to pick the new folder you created in step 4 as your save place). After that you can open the files with Notepad and add the contents.
[/INDENT]6) In the DIYCE.toc file, put just this text:

DIYCE.lua

7) In the DIYCE.lua file, copy and paste all of the text from the first block of code in post #1. You don't need the ScoutRogue function unless that's the class you play.

8) Add your class specific function below all that code (in the DIYCE.lua file). If there isn't a function already posted for your class combo, start with one that someone else posted and modify it to suit your class, or ask for one and we'll get you started.

9) Start the game and if you get no errors (icon flashing red around your minimap) when you login, then type this command into your chat box as a test:[INDENT] /run ReadSkills()

If you get the message "Reading Class Skills" in your chat window, then you're good to go. If you get an error about a "global", that means it's not finding your LUA file and you did something wrong.
[/INDENT]10) Setup a macro to execute your class function, for example:[INDENT] /run ScoutRogue()
[/INDENT]11) Drag that macro to your hotbar and spam it as often as you like. :)

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

22

Friday, February 5th 2010, 5:25pm

This is the beginnings of a scout/druid function -- still needs some fine-tuning, and addition of level 40 and up elites (don't have those yet :) ).

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function ScoutDruid(arg1)
   local Skill = {}
   local i = 0
   local focus = UnitMana("player")
   local mana  = UnitSkill("player")
   local friendly = (not UnitCanAttack("player","target"))

   i=i+1; Skill[i] = { ['name'] = "Savage Blessing",   ['use'] = (not ChkBuff("player","Savage Blessing")) }
   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",    ['use'] = (not ChkBuff("player","Frost Arrow")) }
   i=i+1; Skill[i] = { ['name'] = "Combo Shot",     ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Snake Poison Arrow", ['use'] = ((not friendly) and (mana >= 50)) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",    ['use'] = ((not friendly) and (focus >= 15)) }
--   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Snipe",          ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end

23

Saturday, February 6th 2010, 12:10am

i loved rogue combo when i was gonna be a rogue/scout but now i am leaning more toward rogue knight but can for the life of me figue out how to get it to do the standard rogue rotation and throw in disarmament to 4 when energy is low then back to rogue rotation =( could you help me out with that?

Thanx

Nazireth

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

24

Saturday, February 6th 2010, 12:24am

after you follow the directions above you can use somethng like

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function RogueScout(arg1,arg2)
   local Skill = {}
   local i = 0
   local energy = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Combat Master",  ['use'] = (not string.find(pbuffs,"Combat Master")) }
   i=i+1; Skill[i] = { ['name'] = "Poison",         ['use'] = ((not combat) and (not string.find(pbuffs,"Poison"))) }
   i=i+1; Skill[i] = { ['name'] = "Disarmament",    ['use'] = (not string.find(tbuffs,"Disarmament IV") and (energy <=35)) }
   i=i+1; Skill[i] = { ['name'] = "Wound Attack",   ['use'] = ((not friendly) and (energy >=35) and (string.find(tbuffs,"Bleed") and (string.find(tbuffs,"Grievous Wound")))) }
   i=i+1; Skill[i] = { ['name'] = "Low Blow",       ['use'] = ((not friendly) and (energy >=35) and (string.find(tbuffs,"Bleed"))) }
   i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((not friendly) and (energy >=35)) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
   
   MyCombat(Skill,arg1)
end


you can just adjust the energy setting for how low you want the energy to be set at to fire off Disarmament, just keep in mind it may not get to Disarm 4 before it continues on. but if still below that level and hits disarm 4, it will continue on to the old combo.

I'll bet someone will come along with something better, but this was my quick shot at it lol

T

25

Saturday, February 6th 2010, 12:51am

Worked Great ! Thanx =)

26

Sunday, February 7th 2010, 10:59pm

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
g_skill = {}

function PctH(tgt)
   local num=(UnitHealth(tgt)/UnitMaxHealth(tgt))   
   return num
end

function AbsHP(tgt)
    local num=(UnitMaxHealth(tgt)-UnitHealth(tgt))
    return num
end

function CancelBuff(buffname)
   local counter=0
   local currentbuff="none"

   repeat
      if currentbuff == buffname then
         CancelPlayerBuff(counter)
         return true
      else
         counter=counter+1
      end
      currentbuff=UnitBuff("player",counter)
   until currentbuff == nil
   return false
end

function Msg(outstr,a1,a2,a3)
   DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end

function ReadSkills()
   g_skill = {}
   local skillname,slot

   Msg("- Reading Class Skills")
   for page = 2,4 do
      slot = 1
      skillname = GetSkillDetail(page,slot)
      repeat
         local a1,a2,a3,a4,a5,a6,a7,a8,skillusable = GetSkillDetail(page,slot)
         if skillusable then
            g_skill[skillname] = { ['page'] = page, ['slot'] = slot }
         end
         slot = slot + 1
         skillname = GetSkillDetail(page,slot)
      until skillname == nil
   end
end
ReadSkills() -- Read skills into g_skill table at login

function ChkBuff(tgt,buffname)
   local cnt = 1
   local buffcmd = UnitBuff

   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)

   while buff ~= nil do
      if buff == buffname then
         return true
      end
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end
   return false
end

function BuffList(tgt)
   local cnt = 1
   local buffcmd = UnitBuff
   local buffstr = "/"

   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)

   while buff ~= nil do
      buffstr = buffstr..buff.."/"
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end

   return buffstr
end

function DebuffList(tgt)
   local cnt = 1
   local buffcmd = UnitDeBuff
   local buffstr = "/"

   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)

   while buff ~= nil do
      buffstr = buffstr..buff.."/"
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end

   return buffstr
end

function CD(skillname)
   if g_skill[skillname] ~= nil then
      if skillname ~= GetSkillDetail(g_skill[skillname].page,g_skill[skillname].slot) then
         ReadSkills()
      end
      local tt,cd = GetSkillCooldown(g_skill[skillname].page,g_skill[skillname].slot)
      return cd==0
   else
      Msg("- Skill not available: "..skillname)
      return false
   end
end

function MyCombat(Skill,arg1)
   local spell_name = UnitCastingTime("player")
   local talktome = false
   
   if (arg1 == "v1") or (arg1 == "v2") then
      talktome = true
   end

   if spell_name ~= nil then
      if (arg1 == "v2") then Msg("- ['..spell_name..']",0,1,1) end
      return false
   end

   for x,tbl in ipairs(Skill) do
      if CD(Skill[x].name) and Skill[x].use then
         if talktome then Msg("- "..Skill[x].name) end
         CastSpellByName(Skill[x].name)
         return true
      end
   end
   if (arg1 == "v2") then Msg("- IDLE") end

   return false
end

function ScoutDruid(arg1)
      local a1,a2,a3,a4,a5,a6=GetActionInfo(2)
   if not a6 then
      CastSpellByName("Autoshot")
   end
   local Skill = {}
   local i = 0
   local focus = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

-- i=i+1; Skill[i] = { ['name'] = "Antidote",                    ['use'] = (string.find(pbuffs,"Snake Poison")) }
-- i=i+1; Skill[i] = { ['name'] = "Curse Breaker",               ['use'] = (string.find(pbuffs,"")) }
-- i=i+1; Skill[i] = { ['name'] = "Unbinding Magic",             ['use'] = (string.find(pbuffs,"Cold","")) }
   i=i+1; Skill[i] = { ['name'] = "Focus",                       ['use'] = ((not combat) and (not string.find(pbuffs,"Focus"))) }
   i=i+1; Skill[i] = { ['name'] = "Savage Blessing",             ['use'] = ((not combat) and (not string.find(pbuffs,"Savage Blessing"))) }
   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",                 ['use'] = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
-- i=i+1; Skill[i] = { ['name'] = "Recover",                     ['use'] = (AbsHP("player") > 2000) }
   i=i+1; Skill[i] = { ['name'] = "Combo Shot",                  ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",                        ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow",              ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",              ['use'] = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { ['name'] = "Snake Poison Arrow",          ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",                 ['use'] = ((not friendly) and (focus >= 15)) }
-- i=i+1; Skill[i] = { ['name'] = "Snipe",                       ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end

function ScoutKnight(arg1)
      local a1,a2,a3,a4,a5,a6=GetActionInfo(2)
   if not a6 then
      CastSpellByName("Autoshot")
   end
   local Skill = {}
   local i = 0
   local focus = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Enhanced Armor",              ['use'] = ((not combat) and (not string.find(pbuffs,"Enhanced Armor"))) }
   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",                 ['use'] = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
   i=i+1; Skill[i] = { ['name'] = "Combo Shot",                  ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",                        ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow",              ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",              ['use'] = ((not friendly) and (focus >= 20)) }
-- i=i+1; Skill[i] = { ['name'] = "Disarmament",                 ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",                 ['use'] = ((not friendly) and (focus >= 15)) }
-- i=i+1; Skill[i] = { ['name'] = "Snipe",                       ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end

function DruidScout(tgt,arg1)
   local Skill = {}
   local i = 0
   local focus = UnitSkill("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Blossoming Life",                   ['use'] = (not string.find(tbuffs,"Blossoming Life")) }
   i=i+1; Skill[i] = { ['name'] = "Recover",                           ['use'] = ((AbsHP("player") > 2000) and (not string.find(pbuffs,"Life Guide")) or ((AbsHP(tgt) > 2000) and (not string.find(tbuffs,"Recover"))) }
   i=i+1; Skill[i] = { ['name'] = "Restore Life",                      ['use'] = ((AbsHP(tgt) > 3000) }
   i=i+1; Skill[i] = { ['name'] = "Camellia Flower",                   ['use'] = (friendly) }

   MyCombat(Skill,arg1)
end


Can anyone tell me if anything is wrong in this coding? Because whenever i add in the DruidScout function the whole LUA stops working.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

27

Sunday, February 7th 2010, 11:10pm

correct me if im wrong but syntax errors on recover and restore life lines. re: ()



T

28

Monday, February 8th 2010, 1:42am

thanks, that fixed it.

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
function DruidScout(tgt,arg1)
   local Skill = {}
   local i = 0
   local focus = UnitSkill("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Rock Protection",                   ['use'] = (PctH("player") <= .30) }
   i=i+1; Skill[i] = { ['name'] = "Mother Earth's Protection",         ['use'] = ((friendly) and (PctH(tgt) <= .30)) }
   i=i+1; Skill[i] = { ['name'] = "Savage Blessing",                   ['use'] = ((not combat) and (not string.find(tbuffs,"Savage Blessing"))) }
   i=i+1; Skill[i] = { ['name'] = "Concentration Prayer",              ['use'] = ((not combat) and (not string.find(pbuffs,"Concentration Prayer"))) }
   i=i+1; Skill[i] = { ['name'] = "Curing Seed",                       ['use'] = ((friendly) and (not string.find(tbuffs,"Curing Seed"))) }
   i=i+1; Skill[i] = { ['name'] = "Camellia Flower",                   ['use'] = ((friendly) and (not string.find(tbuffs,"Camellia Flower"))) }
   i=i+1; Skill[i] = { ['name'] = "Blossoming Life",                   ['use'] = ((friendly) and (not string.find(tbuffs,"Blossoming Life"))) }
   i=i+1; Skill[i] = { ['name'] = "Recover",                           ['use'] = ((((AbsHP("player")) > 2000) and (not string.find(pbuffs,"Life Guide"))) or ((friendly) and ((AbsHP(tgt)) > 2000) and (not string.find(tbuffs,"Recover")))) }
   i=i+1; Skill[i] = { ['name'] = "Restore Life",                      ['use'] = ((friendly) and ((AbsHP(tgt)) > 3000)) }
   i=i+1; Skill[i] = { ['name'] = "Camellia Flower",                   ['use'] = (friendly) }
   i=i+1; Skill[i] = { ['name'] = "Weakening Seed",                    ['use'] = ((not friendly) and (ChkBuff(tgt,"Weakening Seed"))) }
   i=i+1; Skill[i] = { ['name'] = "Binding Silence",                   ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end

29

Monday, February 8th 2010, 3:32pm

Syntax checking editor FTW. Not that it's perfect. I still have to maintain a repository for my client variables for when I trash the interface. :/

30

Wednesday, February 10th 2010, 5:10pm

i'm currently trying to implement this function as my M/P's rotation,

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function MagePriest(arg1)
   local Skill = {}
   local i = 0
   local mana = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   i=i+1; Skill[i] = { ['name'] = "Holy Aura",   ['use'] = (PctH("player") <= .30) }
   i=i+1; Skill[i] = { ['name'] = "Elemental Weakness",     ['use'] = (not string.find(tbuffs,"Elemental Weakness")) }
   i=i+1; Skill[i] = { ['name'] = "Magic Drain",       ['use'] = (not string.find(tbuffs,"Drain")) }
   i=i+1; Skill[i] = { ['name'] = "Electric Bolt",       ['use'] = (not string.find(tbuffs,"Electric Flux")) }
   i=i+1; Skill[i] = { ['name'] = "Fireball",    ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Rising Tide",        ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Flame",    ['use'] = (not friendly) }
 
   MyCombat(Skill,arg1)
end


This is a slightly older version of my function, since i'm at work, but the general idea is there.

Nothing fancy, just cast debuff's when they're off, and cast instants when they're up, and cast flame otherwise. Personally, i prefer a rotation more like
Flame -> Fireball -> Flame -> Rising tide -> repeat
However, I&#8217;m not sure how to do this exactly, since fireball has a cool down of 5s and rising tide has a cool down of 4s, so what usually ends up happening is:
Flame ->Fireball->Rising tide->Flame->Flame->repeat
Some times the last flame is replaced by a rising tide depending on my lag, or if I move rising tide above fireball.

I&#8217;m not sure if this is true, but I find casting rising tide after the fireball does not do anything for my DPS, and is only a filler move when fireball is not up. Is there anyway I can achieve my preferred rotation? i.e. no rising tide after fireball the first time around.

Also, is it possible to check if the buff was place by you? Since when I party with other mages, and they place the Electric Bolt debuff on the mob, I&#8217;m not sure if this macro will still cast electric bolt.

31

Wednesday, February 10th 2010, 5:44pm

There is no easy way to track which effects are yours. About all you can do is rig some functions to maintain a table of your debuffs/dots and the remaining time. then if the mob has a dot on it but your table says yours expired then recast. Try something like post #9 here.

lokanu

Beginner

Posts: 14

Location: Classified.

  • Send private message

32

Sunday, February 14th 2010, 11:47pm

I did something similar in my selfmade combat engine which I still use, which keeps track of timing rather and works rather well.

Make another global for that specific condition to monitor when you last cast EB:

Source code

1
lastEBCast = 0;

Whenever EB is cast run this to capture the time

Source code

1
lastEBCast = os.time();

In the condition for deciding to cast EB, add this to it:

Source code

1
((os.difftime(os.time(), lastEBCast) > 12) || (not ChkBuff("target", "Electric Bolt")))

Forgive me I'm not on my Mage to double-check the Debuff name of EB so you may have to change "Electric Bolt" if it's different.

What this does is check whether your last EB Cast is greater then 12 seconds (DoT's uptime) or also checks if there are no EB's currently active on the target. If no EB DoT is active, it'll be true. If an EB DoT is active but it's been longer then 12 seconds since you've cast it (or if you haven't cast it yet), then it's true.

There are two flaws with doing this though.
1) If another Mage has an EB DoT active, and yours gets resisted or removed within 12s, this won't be able to tell and recast EB since we can't check for Debuff ownership.
2) You'd have to modify the code to somehow run the capture time code as well; the combat engine is simplified using skill names, not running additional code blocks.

33

Thursday, February 18th 2010, 4:52pm

Has anyone had luck with a W/S or S/W macro? I've tried to alter the code from the S/R post without a ton of luck. I'd like a W/S primary macro that cycles through the important stuff:

Vampire Arrow
Aim for the Wound
Surprise Attack
Skull Breaker
Slash
Tactical Attack

and maybe even one that throws the two AOE skills (Moon Cleave, Blasting Cyclone) into the mix.

Also, any advice for a macro that is helpful for scout secondaries? I don't think I'll have the TP to boost too many scout primary skills.

Thanks for your help in advance.

34

Thursday, February 18th 2010, 6:53pm

Quoted from "manekineko;230339"

Has anyone had luck with a W/S or S/W macro? I've tried to alter the code from the S/R post without a ton of luck. I'd like a W/S primary macro that cycles through the important stuff:

Vampire Arrow
Aim for the Wound
Surprise Attack
Skull Breaker
Slash
Tactical Attack


I don't have much experience with Warrior, especially the 2H variety, but I'll offer up my guess at a good starting function for your W/S...

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[FONT=Courier New]function WarriorScout(arg1)
   local Skill = {}
   local i = 0
   local friendly = (not UnitCanAttack("player", "target"))
   local rage = UnitMana("player")
   local focus = UnitSkill("player")
   local tbuffs = BuffList("target")
   local tspell,ttime,telapsed = UnitCastingTime("target")

   i=i+1; Skill[i] = { name = "Throat Attack",     use = ((not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5)) }
   i=i+1; Skill[i] = { name = "Enraged",           use = (rage <= 50) }
   i=i+1; Skill[i] = { name = "Survival Instinct", use = (PctH("player") < .25) }
   i=i+1; Skill[i] = { name = "Vampire Arrows",    use = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { name = "Aim for the Wound", use = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { name = "Skull Breaker",     use = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { name = "Tactical Attack",   use = ((not friendly) and (rage >= 15) and string.find(tbuffs,"Bleed")) }
   i=i+1; Skill[i] = { name = "Slash",             use = ((not friendly) and (rage >= 25)) }
   i=i+1; Skill[i] = { name = "Shot",              use = (not friendly) }

   MyCombat(Skill,arg1)
end[/FONT]
A few comments on this function...

  • I put in Throat Attack to go off whenever the target is casting a spell. I do this on my R/S and love it. You may prefer to use TA manually because you want to interrupt specific spells, in which case you can just delete that line or comment it out.
  • I added Enraged to automatically go off if you have less than 50 rage. Feel free to adjust this (or remove it) as you see fit.
  • I put Shot in there as an "if all else fails" attack. However I personally believe that to maximize DPS for any class with Scout secondary you should use Shot as often as it's ready. More details on this below.
  • I wasn't sure if Slash should come before or after AftW and SB, so move it around however you like.
  • I did not add Surprise Attack because I've tested using that in a function for my W/R and when you're too close to the target it just keeps trying to execute SA. There's no good way to determine distance from the target, so I eventually removed it and just execute it manually as needed.

Quoted from "manekineko;230339"

and maybe even one that throws the two AOE skills (Moon Cleave, Blasting Cyclone) into the mix.


I personally would not put AoE skills into the mix because there will be times you don't want those to execute. You could add them and use a second parameter (arg2) as a trigger if you like, then setup your macro to have the Shift key be the toggle for that (see my previous post on the RogueScout function for an example of doing that).

Quoted from "manekineko;230339"

Also, any advice for a macro that is helpful for scout secondaries? I don't think I'll have the TP to boost too many scout primary skills.


I'm so glad you asked. :) A lot of people, especially those who only use Scout as their secondary, don't realize how important Shot is. They look at it as just another ranged attack. It's sooo much more than that, primarily because it does not trigger the GCD, meaning Shot doesn't replace other attacks that (might) do more damage. It delays them slightly, but does not replace them. It's my belief that to maximize DPS when you have Scout as your secondary, you should use Shot as often as it's ready. You'll obviously want a decent bow, especially one with a fast speed (2.0s preferably), and to max out Speed Shooting Mastery. The faster you make Shot happen, the higher your DPS will be. Of course, you'll also want to max out Shot itself. So I would highly suggest you move Shot up to near the top of that order once you're happy with the damage that it does.

35

Thursday, February 18th 2010, 8:15pm

Wow! Thanks for your help--that's a lot of helpful stuff all at once!

I can certainly see the merit in adding a hold-shift function for AOE stuff and will certainly attempt to add that in. I'll let you know how it goes.

I went a little off-topic in my reply so I'm going to PM you so as to not de-rail your excellent thread. :)

The order should have aftw and sb before slash and ta in order to build rage. It does seem strange not to take advantage of bleeding right off the bat, but that's the explanation. Since enraged has a relatively long recharge, it's generally good to open with aftw and sb. Perhaps there's a way to put a rage check on aftw and sb so slash will supercede them if there is enough rage built up already?

36

Thursday, February 18th 2010, 8:52pm

Quoted from "manekineko;230410"

Perhaps there's a way to put a rage check on aftw and sb so slash will supercede them if there is enough rage built up already?


Add (rage < 25) like so

Source code

1
2
3
   i=i+1; Skill[i] = { ['name'] = "Aim for the Wound", ['use'] = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { ['name'] = "Skull Breaker",     ['use'] = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { ['name'] = "Slash",             ['use'] = ((not friendly) and (rage >= 25)) }


I picked 25 out of the air (since it's what's listed for Slash), adjust as appropriate.

37

Sunday, February 21st 2010, 6:33am

For those of you who are interested in a solid W/S single-target macro without putting the ones from above together, I decided to post this. It works flawlessly, accomplishing everything it needs to:

1) You will always interrupt with throat attack first in case your target is casting a spell.
2) You open with Vamp Arrow and intermittently do Shot, which significantly raises your DPS.
3) You cast enraged when it's available before creatures enter melee range.
4) You open with your strong combo (Slash/Tactical Attack) or preemptively use Aim for the Wound and Skullbreaker to rage generation to perform your combo. Tactical Attack will also be selected before Slash if the target has already been slashed for more efficient Rage use.

I appreciate the help from Sixpax and Delve to make it happen! It's really made my DPS significantly more efficient.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[FONT=Courier New]function WarriorScout(arg1)
   local Skill = {}
   local i = 0
   local friendly = (not UnitCanAttack("player","target"))
   local rage = UnitMana("player")
   local focus = UnitSkill("player")
   local tbuffs = BuffList("target")
   local tspell = UnitCastingTime("target")

   i=i+1; Skill[i] = { ['name'] = "Throat Attack",     ['use'] = ((not friendly) and (tspell ~= nil)) }
   i=i+1; Skill[i] = { ['name'] = "Enraged",           ['use'] = (rage <= 50) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",    ['use'] = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { ['name'] = "Shot",              ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Aim for the Wound", ['use'] = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { ['name'] = "Skull Breaker",     ['use'] = ((not friendly) and (focus >= 30) and (rage < 25)) }
   i=i+1; Skill[i] = { ['name'] = "Tactical Attack",   ['use'] = ((not friendly) and (rage >= 15) and string.find(tbuffs,"Bleed")) }
   i=i+1; Skill[i] = { ['name'] = "Slash",             ['use'] = ((not friendly) and (rage >= 25)) }

   MyCombat(Skill,arg1)
end[/FONT]  

38

Thursday, February 25th 2010, 8:07am

Quoted from "Tigsman;219239"

thank you.

I havent tested my code for functionality yet, but this is what I'll give a go tomorrow.

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
function KWCombat(arg1,arg2)
   local Skill = {}
   local i = 0
   local tgt = "player"
   local rage = UnitSkill("player")
   local friendly = (not UnitCanAttack("player","target"))
   local shield = true
   local health = PctH("player")
   local tgtcast = UnitCastingTime("target")

   if GetEquipSlotInfo(17) == nil then
      shield = false
   end

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Holy Shield",          ['use'] = (health <= .20) }
   i=i+1; Skill[i] = { ['name'] = "Resolution",           ['use'] = (health <= .33) }
--   i=i+1; Skill[i] = { ['name'] = "Shield of Atonement",  ['use'] = ((not friendly) and (health <= .40) and shield) }
--   i=i+1; Skill[i] = { ['name'] = "Shield of Valor",      ['use'] = ((not friendly) and (health <= .50) and shield) }
--   i=i+1; Skill[i] = { ['name'] = "Shield of Discipline", ['use'] = ((not friendly) and (tgtcast ~= nil) and shield) }
   i=i+1; Skill[i] = { ['name'] = "Enhanced Armor",       ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
   i=i+1; Skill[i] = { ['name'] = "Holy Seal",            ['use'] = (not string.find(pbuffs,"Holy Seal")) }
   i=i+1; Skill[i] = { ['name'] = "Threaten",             ['use'] = (string.find(tbuffs,"Holy Seal III") and (not string.find(pbuffs,"Threaten")) and (arg2 == "threaten")) }
   i=i+1; Skill[i] = { ['name'] = "Mana Return",          ['use'] = (string.find(tbuffs,"Holy Seal III")) }
   i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield",     ['use'] = ((not friendly) and shield) }
   i=i+1; Skill[i] = { ['name'] = "Punishment",           ['use'] = (string.find(tbuffs,"Light Seal III")) }
   i=i+1; Skill[i] = { ['name'] = "Disarmament",          ['use'] = (not string.find(tbuffs,"Disarmament IV") and (arg2 == "disarm")) }
   i=i+1; Skill[i] = { ['name'] = "Slash",                ['use'] = ((not friendly) and (rage >=75)) }         
   i=i+1; Skill[i] = { ['name'] = "Holy Strike",          ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end
T



I play a K/W and the function you made seems to be working , to go tank mode with Threaten i would make a macro with /run KWCombat("","Threaten") correct? Also anyone know how i could pop Hatred strike at beginning in threaten mode or should i just go manual with that? thx Excellent work sixpack.

39

Thursday, February 25th 2010, 8:17am

I did a /run KWCombat("","Threaten") and it was casting Mana return and not threaten , as the changes in 2.1.6 you can cast threaten and it doesnt consume seals you can cast mana return right after it . im not good at this stuff. Anyone with a working K/W function that casts Threaten then mana return much appreciated. Or im i using wrong function call . thx in advance.


Update , nm , i uncapitilized Theaten and it works , so /run KWCombat("","threaten)



i must say , im a bit confused on the coding you guys throwing around for Threaten or mana return , threaten no longer consumes holy seals , so you can threaten and then mana return , by the time threaten cd comes back you should have 3 Holy seals back on. Tigs function seems to work exactly like that as is.....


but if any new funtions for the K/W i would like to see them thx.

40

Thursday, February 25th 2010, 3:03pm

Quoted from "Durelsh;234651"

Also anyone know how i could pop Hatred strike at beginning in threaten mode or should i just go manual with that?


You might want to stick with doing Hatred Strike manually because otherwise it will be going off for trash mobs and I'd imagine you'd want to save that for bosses only... or no?

Quoted from "Durelsh;234651"

i must say , im a bit confused on the coding you guys throwing around for Threaten or mana return , threaten no longer consumes holy seals , so you can threaten and then mana return , by the time threaten cd comes back you should have 3 Holy seals back on. Tigs function seems to work exactly like that as is.....


I was unaware they changed Knight's Threaten to that behavior. Does it still require 3 Holy Seals to activate? Looking at my function it seems like it should work the way you're wanting it to (if you're passing "threaten" as the 2nd argument). Is that not the case? If not, what is it doing wrong?

Thanks for the feedback.