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,041

Thursday, September 2nd 2010, 8:36pm

Quoted from "lesso;330812"

for the stop blood arrow declaration do i simply define the variable as follows

Source code

1
   local Stop = CancelBuff()
or do i have to declare it differently this is the whole script


Change your CustomAction() function to this:

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
function CustomAction(action)
    if (action == "Stop Blood Arrow") then
        local i = 1
        local buff = UnitBuff("player", 1)
        while (buff ~= nil) do
            if (buff == "Blood Arrow") then
                CancelPlayerBuff(i)
                return false
            else
                i = i + 1
                buff = UnitBuff("player", i)
            end
        end
    elseif CD(action) then
        FocusUnit(12, "target")
        TargetUnit("player")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    end
    return false
end
Incidentally, you don't need to put the "Custom:" label in front of Magic Barrier, Blessed Spring Water, and Holy Aura because targeting yourself before casting them is unnecessary.

Also, there is no action bar slot # 0, or did you just set Autoshot to that as a default to let people know it needs to be changed?

1,042

Monday, September 6th 2010, 4:01am

Holy light domain for Knight Mage

so ive been playing a knight mage, and for the most part it is simply macroed like a, knight.
added fireballs when out of combat for pulling. added silence to the charge, shock stun cycle and mixed in lightning with shakles for CC.

however. when i comes down to holy light domain i have not been able to add it to a macro as it does not produce a buff to get a timer from and does not have a cooldown.

so yeah if anyone can help at all that would be great.

1,043

Monday, September 6th 2010, 10:17am

I am trying to use

UnitMaxHealth("target") > 50000

and it doesnt seem to be working. Anyone else had luck with this function?

OK I see whats happening, its giving me percentile just like UnitHealth("target") does, is there a way to get the actual max Hit Points?

Looked through Ikarus code, seems they refer to a db...

1,044

Tuesday, September 7th 2010, 5:48pm

Quoted from "spamely;332451"

however. when i comes down to holy light domain i have not been able to add it to a macro as it does not produce a buff to get a timer from and does not have a cooldown.


Does it not cause a debuff to the target that you can check?

1,045

Tuesday, September 7th 2010, 5:50pm

Quoted from "blurterblurter;332504"

I am trying to use

UnitMaxHealth("target") > 50000

and it doesnt seem to be working. Anyone else had luck with this function?

OK I see whats happening, its giving me percentile just like UnitHealth("target") does, is there a way to get the actual max Hit Points?

Looked through Ikarus code, seems they refer to a db...


Is this for the purpose of doing a check to see if the target is elite/boss?

AFAIK, UnitMaxHealth only displays the mob's actual health when they are out of combat. So you'd have to capture and retain that value before combat begins.

1,046

Tuesday, September 7th 2010, 8:40pm

ah ok, thats the db then that pbinfo and ikarus use, I was using UnitSex("target") but theres a lot of elites in game I kill that dont require same treatmnt so would rather use UnitMaxHealth("target").

mrmarc0001

Beginner

Posts: 3

Location: SF Bay Area

Occupation: Web Producer @ UCSF

  • Send private message

1,047

Tuesday, September 7th 2010, 10:40pm

Quoted from "blurterblurter;333204"

ah ok, thats the db then that pbinfo and ikarus use, I was using UnitSex("target") but theres a lot of elites in game I kill that dont require same treatmnt so would rather use UnitMaxHealth("target").


As Sixpax pointed out, you can only capture the target's MaxHP if you scan them prior to entering combat. Have you tried using UnitLevel()? I've never used it myself, but I just might for the same reason you posted above.

EDIT: Just downloaded pbInfo to look at the code, and it looks like this will in fact work as it's being used in inc.MobDB.lua.

Also for those who don't already know, to detect if a target is an elite or a boss, use the following:

Source code

1
UnitSex("target") >= 2


If you only want to check if it's a boss, use:

Source code

1
UnitSex("target") > 2

1,048

Tuesday, September 7th 2010, 11:03pm

oop, did not check for that

Quoted from "Sixpax;333145"

Does it not cause a debuff to the target that you can check?


yes it does... i am humbled by the simplicity of your fix. :p

1,049

Wednesday, September 8th 2010, 8:28pm

Ok, I'm trying to put one of these things together. I'm looking at the various code people have put in and figure things out. One thing I haven't been able to find and am interested in including is a function for the scout skill Snipe. Is there a way I could set it to fire only if the mob health is at 100% when I'm going solo? I can't seem to find the mob health variable. Also, is it possible to set it so that if I'm not the target's target to ignore the 100% health rule in the case that the tank has aggro.

One other thing I'd like to include is a function for "Purifying Arrow" the S/M elite. The effect is as follows "Removes curses and harmful effects from target". How can I make the script check if a player has a debuff this skill would remove or would I have to make some sort of "table" for the debuffs that the script needs to check against?

BTW, I'm running a Scout/Mage

1,050

Thursday, September 9th 2010, 12:28am

Ok, finished going through things I think. Gonna give this code a shot. Hopefully I'm not gonna blow up my game with 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
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
function CustomAction(action)
    if (action == "Stop Blood Arrow") then
        local i = 1
        local buff = UnitBuff("player", 1)
        while (buff ~= nil) do
            if (buff == "Blood Arrow") then
                CancelPlayerBuff(i)
                return false
            else
                i = i + 1
                buff = UnitBuff("player", i)
            end
    end
    elseif CD(action) then
        FocusUnit(12, "target")
        TargetUnit("player")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    end
    return false
end

function ScoutMage(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitSkill("player")
    local mana = UnitMana("player")
    local friendly = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local thealth = PctH("target")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(4) -- # is your Autoshot action bar slot number

-- Ammo Check
    if (ammo == false) then
        local HaveAmmo = false
        local arrows = ""
        for i=1,360 do
            local x,y,name = GetBagItemInfo(i)
            if (string.find(name," Arrow")) then
                HaveAmmo = true
                arrows = name
            end
        end
        if (HaveAmmo == true) then
            i=i+1; Skill[i] = { name = "Item: "..arrows,    use = (not ammo) } --Equip arrows if have           
        elseif ((g_cnt%100) == 0) then
            SendChatMessage("Make some arrows!","SAY")  -- Right click rune bow
        end
        g_cnt = g_cnt + 1
    end

-- Buffs
    i=i+1; Skill[i] = { name = "Frost Arrow",                 use = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
    i=i+1; Skill[i] = { name = "Blood Arrow",                 use = ((combat) and (not string.find(pbuffs,"Blood Arrow"))) }
    i=i+1; Skill[i] = { name = "Custom: Stop Blood Arrow",    use = (((not combat) or (phealth <= .55)) and (string.find(pbuffs,"Blood Arrow"))) }

-- Combat
    i=i+1; Skill[i] = { name = "Action: 29",                  use = (phealth < .75) } -- use healing pot
    i=i+1; Skill[i] = { name = "Action: 30",                  use = (mana < .75) } -- use mana pot
    i=i+1; Skill[i] = { name = "Snipe",                       use = ((not friendly) and (thealth == 1)) } -- use only if mob at 100%
    i=i+1; Skill[i] = { name = "Lightning",                   use = ((not friendly) and (not string.find(tbuffs,"Lightning"))) }
    i=i+1; Skill[i] = { name = "Autoshot",                    use = ((not friendly) and (not ASon)) }
    i=i+1; Skill[i] = { name = "Fireball",                    use = (not friendly) }
    i=i+1; Skill[i] = { name = "Combo 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 = "Wind Arrows",                 use = ((not friendly) and (focus >= 15)) }

    MyCombat(Skill,arg1)
   end
end
I'll come back and leave a note if it works or not. If you read this before I do and have some helpful info, feel free to reply.

*EDIT*

I've now split the code into 2 files. custom.lua and ScoutMage.lua

TOC is as follows:

Source code

1
2
3
DIYCE.lua
custom.lua
ScoutMage.lua
custom.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
function CustomAction(action)
    if (action == "Stop Blood Arrow") then
        local i = 1
        local buff = UnitBuff("player", 1)
        while (buff ~= nil) do
            if (buff == "Blood Arrow") then
                CancelPlayerBuff(i)
                return false
            else
                i = i + 1
                buff = UnitBuff("player", i)
            end
        end
    elseif CD(action) then
        if IsShiftKeyDown() then Msg("- "..action) end
        g_lastaction = action
        FocusUnit(12, "target")
        TargetUnit("player")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    end
    return false
end
ScoutMage.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
44
45
46
47
48
49
50
function ScoutMage(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitSkill("player")
    local mana = UnitMana("player")
    local friendly = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local thealth = PctH("target")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(4) -- # is your Autoshot action bar slot number

-- Ammo Check
    if (ammo == false) then
        local HaveAmmo = false
        local arrows = ""
        for i=1,360 do
            local x,y,name = GetBagItemInfo(i)
            if (string.find(name," Thorn")) then
                HaveAmmo = true
                arrows = name
            end
        end
        if (HaveAmmo == true) then
            i=i+1; Skill[i] = { name = "Item: "..arrows,    use = (not ammo) } --Equip arrows if have           
        elseif ((g_cnt%100) == 0) then
            SendChatMessage("Make some arrows!","SAY")  -- Right click rune bow
        end
        g_cnt = g_cnt + 1
    end

-- Buffs
    i=i+1; Skill[i] = { name = "Frost Arrow",                 use = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
--    i=i+1; Skill[i] = { name = "Blood Arrow",                 use = ((combat) and (not string.find(pbuffs,"Blood Arrow"))) }
--    i=i+1; Skill[i] = { name = "Custom: Stop Blood Arrow",    use = (((not combat) or (phealth <= .55)) and (string.find(pbuffs,"Blood Arrow"))) }

-- Combat
--    i=i+1; Skill[i] = { name = "Action: 29",                  use = (phealth < .75) } -- use healing pot
--    i=i+1; Skill[i] = { name = "Action: 30",                  use = (mana < .75) } -- use mana pot
    i=i+1; Skill[i] = { name = "Snipe",                       use = ((not friendly) and (thealth == 1)) } -- use only if mob at 100%
    i=i+1; Skill[i] = { name = "Lightning",                   use = ((not friendly) and (not string.find(tbuffs,"Lightning"))) }
    i=i+1; Skill[i] = { name = "Autoshot",                    use = ((not friendly) and (not ASon)) }
    i=i+1; Skill[i] = { name = "Fireball",                    use = (not friendly) }
    i=i+1; Skill[i] = { name = "Combo 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 = "Wind Arrows",                 use = ((not friendly) and (focus >= 15)) }

    MyCombat(Skill,arg1)
end
Seeing if this works because I kept getting "eof expected" errors.

**EDIT AGAIN**
Commented out the potions due to an error.

Going to comment out the blood arrow lines getting "Skill not available: Custom: Stop Blood Arrow"

NOTE: Commenting out potions and BA in ScoutMage.lua makes the script functional. It will not equip the Runic Thorn arrows I have already made with my Rune Bow. Is there a way, if it detects I have no Runic Thorn in my bags, to use the bow and make more?

1,051

Friday, September 10th 2010, 1:30pm

scout / priest

Pretty good function as it is, but need help to improve it.

as it is now, i am able to do most of my gamming, in varied situations with 3 buttons. these correspond to a standard macro, one with a boss argument used mostly when fighting bosses or when the target is alone and a kite arg2 which prioritizes.

now, where i need help is here.

i want to be able to check for the target's target, (this would be the tank while am dpsing, and the poor soul who got aggro when am catching adds)

this would mean that an offheal would happen seamlesly, ot when am catching adds if i do not get to them in time, that regen goes on the player in time.

as i see it, i assume id need to put my target in focus 1, targets target in focus two, switch to focus two if health is low, cast regen and then switch to focus 1. alternatively i could cast on focus 2 without switching targets, but the code might find the check for friendly returns that am target an enemy.

thanks in advance if anyone pulls it off.



also my loot/attack is not working, but it doesnt break the macro.

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
--Scout Priest
function ScoutPriest(arg1,arg2)
   local Skill = {}
   local i = 0
   local focus = UnitMana("player") --works cz focus is constant.
   local enemy = UnitCanAttack("player","target")
   local health = PctH("player")
   local thealth = PctH("target")
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   local a1,a2,a3,a4,a5,ASon = GetActionInfo(20) --actionslot where autoshot is.
   local melee = GetActionUsable(19)    
   local combat = GetPlayerCombatState()
   local pressshift = IsShiftKeyDown()
   local Stop = CancelBuff() --not sure how to use this. keeping it though.
   local tspell,ttime,telapsed = UnitCastingTime("target")
   local interrupt = ((tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5))
   local tDead = UnitIsDeadOrGhost("target") 

    --Ammo Check  --not really using this, i take care of my own arrows but keeping the snippet for possible future use.
    if (ammo == false) then
        local HaveAmmo = false
        local arrows = ""
        for i=1,60 do
            local x,y,name = GetBagItemInfo(i)
            if (string.find(name," Arrow")) then
                HaveAmmo = true
                arrows = name
            end
        end
        if (HaveAmmo == true) then
            i=i+1; Skill[i] = { name = "Item: "..arrows,    use = (not ammo) } --Equip arrows if have           
        elseif ((g_cnt%100) == 0) then
            SendChatMessage("I'm out of ammo!","SAY")
        end
        g_cnt = g_cnt + 1
    end

 --health
   if (health <1) then
        i=i+1; Skill[i] = { name = "Holy Aura",         use = ((health < .25) and (not string.find(pbuffs,"Holy Aura"))) }
        i=i+1; Skill[i] = { name = "Regenerate",        use = ((health < .75) and (not string.find(pbuffs,"Regenerate"))) }
        i=i+1; Skill[i] = { name = "Urgent Heal",       use = (health < .50) }
        i=i+1; Skill[i] = { name = "Action: 40 (HoT Pot)",  use = (health < .45) }
        i=i+1; Skill[i] = { name = "Action: 39 (HP Pot)",   use = (health < .35) }
    end  
   
 -- off heal 
    if (not enemy) then
        i=i+1; Skill[i] = { name = "Regenerate",        use = ((thealth < .75) and (not string.find(tbuffs,"Regenerate"))) }
        i=i+1; Skill[i] = { name = "Urgent Heal",       use = (thealth < .5) }
        i=i+1; Skill[i] = { name = "Urgent Heal",       use = ((UnitMaxMana("target") > 200) and (PctM("target") < .3)) }
    end
    
   --combat
       
    
    if (enemy) then 
        --melee (range 50 or less)
        if (melee) then
             i=i+1; Skill[i] = { name = "Throat Attack",     use =  (interrupt and (focus >= 15) and (arg2 =="boss")) }--conditional may  be replaced with a "do not interrupt list later"
            i=i+1;  Skill[i] = { name = "Joint Blow",          use = (arg2 =="kite") }  --hopefully you wont be melee when kiting    
            i=i+1; Skill[i] = { name = "Wrist Attack",      use = (arg2 =="boss") }
        end
        i=i+1; Skill[i] = { name = "Frost Arrow",       use = (not string.find(pbuffs,"Frost Arrow")) }
         i=i+1; Skill[i] = { name = "Blood Arrow",         use = ((health  > .95) and (not string.find(pbuffs,"Blood Arrow"))) }
        i=i+1; Skill[i] = { name = "Blood Arrow",         use = ((health < .55) and (string.find(pbuffs,"Blood Arrow"))) }
         i=i+1; Skill[i] = { name = "Snipe",                use = ((not  combat) and (arg2 == "boss")) } --moving snipe opener to boss rotation  allows to waste less time when pulling trash or farming easy kills.
        i=i+1; Skill[i] = { name = "Shot",              use = true }        
        --  i=i+1; Skill[i] = { name = "Combo Shot",           use = (not melee) } -- gets interrupeted in melee.
         i=i+1; Skill[i] = { name = "Wind Arrows",       use = ((arg2  =="kite") and (focus > 20) and (not string.find(tbuffs,"Frost  Slowdown"))) }-- prioritized over other shots in kiting rotation
        i=i+1; Skill[i] = { name = "Autoshot",          use = ((not ASon)) }
        i=i+1; Skill[i] = { name = "Vampire Arrows",    use = ((focus >= 20)) }
        if (arg2 =="boss") then        --to be used only when it is safe for these "AoE" shots go off.
            i=i+1; Skill[i] = { name = "Piercing Arrow",    use = true }
            i=i+1; Skill[i] = { name = "Reflected Shot",    use = true }
        end
        i=i+1; Skill[i] = { name = "Wind Arrows",       use = (focus > 20) }
        i=i+1; Skill[i] = { name = "Snipe",                use = (not melee) } --change conditional after lvl 25 elite.
        
    end

--off combat       
   if (not combat) then
        i=i+1; Skill[i] = { name = "Blood Arrow",             use = (string.find(pbuffs,"Blood Arrow")) }
        i=i+1; Skill[i] = { name = "Magic Barrier",            use = (not string.find(pbuffs,"Magic Barrier")) } 
        i=i+1; Skill[i] = { name = "Attack", use = tDead } --this does not seem to be working.
    end

    MyCombat(Skill,arg1)
end

1,052

Monday, September 13th 2010, 3:53am

mines very simple.

function ScoutPriest(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(1)
-- # is your Autoshot slot number
i=i+1; Skill = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
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 = "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 = "Snipe", use = (not friendly) }
MyCombat(Skill,arg1)
end

1,053

Monday, September 13th 2010, 2:49pm

Quoted from "spamely;334493"

i want to be able to check for the target's target, (this would be the tank while am dpsing, and the poor soul who got aggro when am catching adds)

this would mean that an offheal would happen seamlesly, ot when am catching adds if i do not get to them in time, that regen goes on the player in time.

as i see it, i assume id need to put my target in focus 1, targets target in focus two, switch to focus two if health is low, cast regen and then switch to focus 1. alternatively i could cast on focus 2 without switching targets, but the code might find the check for friendly returns that am target an enemy.


Give this a try...

Add these lines to the variable declarations at the top of your function:

Source code

1
2
    local ttfriendly = (not UnitCanAttack("player", "targettarget"))
    local tthealth = PctH("targettarget")
Add these lines for the healing of the target's target:

Source code

1
2
    i=i+1; Skill[i] = { name = "Custom: Regenerate",    use = (ttfriendly and (tthealth <= 0.5) and (not string.find(BuffList("targettarget"), "Regenerate"))) }
    i=i+1; Skill[i] = { name = "Custom: Urgent Heal",   use = (ttfriendly and (tthealth <= 0.33)) }
And finally, add this function to perform the heal (make sure you have the latest DIYCE code):

Source code

1
2
3
4
5
6
7
8
9
10
11
function CustomAction(action)
    if CD(action) then
        FocusUnit(12, "target")
        TargetUnit("targettarget")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    end
    return false
end

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

1,054

Monday, September 13th 2010, 4:37pm

I have slowly been going over most of the pages to figure out what I wanted to do with my macro and help me reduce the amount of buttons on my action bar.

Might require some help.

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
function RoguePriestPVE(arg1,arg2)
    
    local Skill = {}
    local i = 0
    local energy = UnitMana("player")
    local focus = UnitSkill("player")
    local friendly = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local health = PctH("player")

    i=i+1; Skill[i] = { ['name'] = "Holy Aura",            ['use'] = (PctH("player") <= .30) }
    i=i+1; Skill[i] = { ['name'] = "Premeditation",        ['use'] = ((not string.find(pbuffs,"Premeditation")) and (not combat)) }
    i=i+1; Skill[i] = { ['name'] = "Sneak Attack",        ['use'] = ((not friendly) and (energy >=20) and (arg2=="behind")) }
    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'] = "Blind Spot",         ['use'] = ((not friendly) and (energy >=25) and (arg2=="behind")) }
    i=i+1; Skill[i] = { ['name'] = "Shadowstab",         ['use'] = ((not friendly) and (energy >=35) and (not string.find(tbuffs,"Sneak Attack Bleed")) }

    MyCombat(Skill,arg1)

end
I did find a Rogue Priest macro earlier in the thread but most of it is in German (don't understand one bit of it).

So I grabbed one of the Rogue Knight macros and replaced certain things & energy costs etc.

Let me know if I am doing anything wrong.

(Point for consideration - Sneak Attack can be used in Combat, EC: 20)

Another thing, I want the Shadowstab to make sure that even before it wants to hit that the Sneak Attack Bleed effect is not there (Sneak Attack has a 25 second Bleed, so I don't need to waste my Energy on it) - Unless of course there are no other Rogues on the party as one of their bleeds overrides mine. (bug?)

I have 4 macros (PVE/PVP/CD burn/Buffs), once I get this one figured out I can do the others to check em.

1,055

Tuesday, September 14th 2010, 5:31am

Quoted from "Sixpax;335586"

Give this a try...

Add these lines to the variable declarations at the top of your function:

Source code

1
2
    local ttfriendly = (not UnitCanAttack("player", "targettarget"))
    local tthealth = PctH("targettarget")
Add these lines for the healing of the target's target:

Source code

1
2
    i=i+1; Skill[i] = { name = "Custom: Regenerate",    use = (ttfriendly and (tthealth <= 0.5) and (not string.find(BuffList("targettarget"), "Regenerate"))) }
    i=i+1; Skill[i] = { name = "Custom: Urgent Heal",   use = (ttfriendly and (tthealth <= 0.33)) }
And finally, add this function to perform the heal (make sure you have the latest DIYCE code):

Source code

1
2
3
4
5
6
7
8
9
10
11
function CustomAction(action)
    if CD(action) then
        FocusUnit(12, "target")
        TargetUnit("targettarget")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    end
    return false
end



THIS IS BRILLIANT!!!! how ever after initial testing, i found that in an instance setting, having heals fire off on their own is RISKY.

regardless, i will reuse to code for a druid i have on the works, who will probably make VERY good use of it.

1,056

Tuesday, September 14th 2010, 5:24pm

Quoted from "spamely;335877"

THIS IS BRILLIANT!!!! how ever after initial testing, i found that in an instance setting, having heals fire off on their own is RISKY.

regardless, i will reuse to code for a druid i have on the works, who will probably make VERY good use of it.


You could add an arg2 variable that determines if you want to use heals or not, and then have that as a check for those 2 skills. Then you'd have 2 different macros, your regular one (that does cast heals) and a second one like so:

Source code

1
/run ScoutPriest("", "noheal")
Then just test for (arg2 ~= "noheal").

1,057

Tuesday, September 14th 2010, 6:03pm

Quoted from "mrmisterwaa;335603"

Let me know if I am doing anything wrong.


This isn't so much wrong as it is misleading, but you're labeling UnitSkill("player") as focus, but it's really how much mana you have. I don't see you using the variable "focus" anywhere so it's not doing any harm, but if you start adding Priest skills and need to do a mana check, you might want to change the name so it isn't confusing.

Quoted from "mrmisterwaa;335603"

(Point for consideration - Sneak Attack can be used in Combat, EC: 20)

Another thing, I want the Shadowstab to make sure that even before it wants to hit that the Sneak Attack Bleed effect is not there (Sneak Attack has a 25 second Bleed, so I don't need to waste my Energy on it) - Unless of course there are no other Rogues on the party as one of their bleeds overrides mine. (bug?)


What you might want to do is have a 2nd entry for Shadowstab up higher in the priority list (maybe right after Sneak Attack) that does a check to see if there's no "Bleed" at all. Then your final Shadowstab can just go off without any buff checks because if the code makes it down that far, you want it to execute something.

Also, since Sneak Attack can't be used in combat, you need to add a check to your "use" definition of (not combat) like you're doing with Premed.

As for the multiple Rogue groups, I think there's some discussion of that somewhere in this thread.

1,058

Tuesday, September 14th 2010, 8:13pm

i will, am going to modify my code to take 3 or 4 arguments. since i have many different rotations.

farming, safe no additional aggro, max burts and sustained (did this with a simple focus check) kiting. and tanking... yes i have found myself tanking lol.

1,059

Tuesday, September 14th 2010, 8:17pm

Quoted from "mrmisterwaa;335603"

I have slowly been going over most of the pages to figure out what I wanted to do with my macro and help me reduce the amount of buttons on my action bar.

Might require some help.



not sure if this works.

local behind = not(UnitIsUnit("player","targettarget"))

if this works, you can use this for all your behind checks. you as long as you are in combat, and are willing to position yourself around (dont e lazy) the macro will assume that if you are not being targeted, then u were a good rogue and got behind your target.

1,060

Tuesday, September 14th 2010, 9:31pm

For any rogue function I think it would be useful to detect how many rogues there are in party in order to attune the shadowstab usage accordingly.

Is there any way to see what is the composition of raid/party (besides passing it as a parameter)?

Thanks.