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

Friday, December 17th 2010, 2:01pm

Quoted from "neomoses;365269"

So, I added Fervant Attack to my function along with Informer and Assassins Rage. Theyre suppose to cast when i hit at or below 50%. However, after Fervant Attack casts and its on CD, I keep getting a yellow message saying Skill is not ready. Am I missing something here? The other buffs with the same conditions I added work just fine.


Actually, the message is "Skill not available", which means you don't have that skill or you're not high enough level to use it.

In this case, you misspelled "Fervent Attack".

1,222

Friday, December 17th 2010, 2:08pm

Quoted from "ghostwolf82;365286"

I just finished this piece of code for a friend of mine. He is one of the best Scouts I have ever known, and is one of (if not the) top scout on the server. He is a S/K. Another one of my better pieces of work. Hope this helps many of you.


Your mana assignment is incorrect. It should be:

Source code

1
    local mana = PctS("player")
However, you'll have to change the logic for Holy Strike and Punishment, which are looking for an actual mana amount, not a percentage.

Also, the arrow equip routine is not quite right. Try this instead:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
    --Ammo Check and Equip
    if (not ammo) then
        local j, x, y, name = 1
        repeat
            x,y,name = GetBagItemInfo(j)
            if ((string.find(name, "Runic Thorn")) or (string.find(name, " Arrow"))) then
                j = 61
                UseItemByName(name)
            end
            j = j + 1
        until j > 60
    end


I'm having it equip the arrows right away because that doesn't trigger the GCD, so there's no point in wasting a cycle just to do that. Also, once an arrow name is matched, there's no point in searching through the rest of his inventory, so it stops processing more slots.

1,223

Friday, December 17th 2010, 2:35pm

Quoted from "hangman04;365289"

And second question is there a function to check if target is normal, elite or boss ?


The check for elites:

Source code

1
UnitSex("target") == 2


The check for bosses:

Source code

1
UnitSex("target") > 2

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,224

Friday, December 17th 2010, 7:05pm

As I had known it, UnitSkill("player") was every players secondary mana/rage/energy/focus. Is this not correct?
(Edit: Nevermind, I just realized what you mean.)

The reason for the checking on the actual mana amount was done on purpose.

For the arrows, he is very forgetful when it comes to his arrows, so the ability to say something to him to remind him to make arrows before he starts out is very needed.

Edit:
Updated the code as such. Now the ones using a hard number call the correct function, and the ones using a % also call the correct function.

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
    local mana = PctS("player")
    local pmana = UnitSkill("player")

        --Potions and buffs
    i=i+1; Skill[i] = { name = "Action: "..potslot,  use = (phealth < .25) }
    i=i+1; Skill[i] = { name = "Healing Shot",       use = (phealth < .65) }
    i=i+1; Skill[i] = { name = "Action: "..potslot2,  use = (mana < .50) }
    i=i+1; Skill[i] = { name = "Mana Conversion",       use = ((focus <= .10) and (pmana >= 650)) }
    i=i+1; Skill[i] = { name = "Concentration",      use = (focus <= .30) }
    i=i+1; Skill[i] = { name = "Enhanced Armor",      use = ((not string.find(pbuffs,"Significantly Enhanced Armor")) and (pmana >= 120)) }
       i=i+1; Skill[i] = { name = "Frost Arrow",        use = (not string.find(pbuffs,"Frost Arrow")) }
       i=i+1; Skill[i] = { name = "Blood Arrow",        use = ((not combat or (phealth <= .45)) and (string.find(pbuffs,"Blood Arrow"))) }
       i=i+1; Skill[i] = { name = "Blood Arrow",        use = (combat and (not string.find(pbuffs,"Blood Arrow") and (phealth > .99))) }
   
    if enemy and (not melee) then
        if IsShiftKeyDown() then
            i=i+1; Skill[i] = { name = "Snipe",                 use = (not combat) }
        end
        i=i+1; Skill[i] = { name = "Disarmament",        use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament I")) and (thealth > .50)) }
        i=i+1; Skill[i] = { name = "Autoshot",            use = ((not ASon)) }
        i=i+1; Skill[i] = { name = "Combo Shot",            use = (not melee) }
        i=i+1; Skill[i] = { name = "Shot",                use = true }
        i=i+1; Skill[i] = { name = "Disarmament",        use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament II")) and (thealth > .50)) }
        i=i+1; Skill[i] = { name = "Disarmament",        use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament III")) and (thealth > .50)) }
        i=i+1; Skill[i] = { name = "Disarmament",        use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament IV")) and (thealth > .50)) }
        i=i+1; Skill[i] = { name = "Repelling Arrow",    use = (mana >= .45) }
        i=i+1; Skill[i] = { name = "Piercing Arrow",       use = true }
        i=i+1; Skill[i] = { name = "Wind Arrows",            use = (focus >= 15) }
        i=i+1; Skill[i] = { name = "Vampire Arrows",     use = (focus >= 20) }
        
    elseif enemy and melee then
        if IsShiftKeyDown() then
            i=i+1; Skill[i] = { name = "Escape Danger",      use = true }
            i=i+1; Skill[i] = { name = "Throat Attack",         use = true }
        end
        i=i+1; Skill[i] = { name = "Autoshot",             use = ((not ASon)) }
        i=i+1; Skill[i] = { name = "Shot",                 use = true }
        i=i+1; Skill[i] = { name = "Holy Strike",         use = ((pmana >= 120) and (not string.find(tbuffs,"Light Seal I"))) }
        i=i+1; Skill[i] = { name = "Holy Strike",         use = ((pmana >= 120) and (not string.find(tbuffs,"Light Seal II"))) }
        i=i+1; Skill[i] = { name = "Wrist Attack",        use = (focus >= 35) }
        i=i+1; Skill[i] = { name = "Punishment",               use = ((pmana >= 120) and ((string.find(tbuffs,"Light Seal I")) or (string.find(tbuffs,"Light Seal II")))) }
        i=i+1; Skill[i] = { name = "Joint Blow",          use = (not string.find(tbuffs,"Slow")) }

1,225

Sunday, December 19th 2010, 10:17pm

my first attempt to make a function for DIYCE...
but it doesnt work im not sure why, i downloaded addon, pasted it into addons, then made the new folder and files inside (as in guide)
and paste my function (made form some other's work) inside this MyFunctions.lua
but it doesnt work at all...

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
function ChkArg(arg1, skillname)
    arg1 = arg1 or ""
    return (string.find(arg1, skillname) ~= nil)
end


function ScoutWarden(arg1,arg2,arg3)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local mana = UnitSkill("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local myhealth = PctH("player")
local pbuffs = BuffList("player")
local tDead = UnitIsDeadOrGhost("target")
local LockedOn = UnitExists("target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(61)  -- # is your Autoshot slot number

if (health <= .1) then
    SwapEquipmentItem()
    for i=1,3 do
        if (IsPetSummoned(i) == true) then
            ReturnPet(i);
        end
    end        
    CastSpellByName("Elven Amulet")
end

i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Blood Arrow")) and (myhealth >= .75)) }
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = (ChkArg(arg2,"boss") and ChkArg(pbuffs, "Blood Arrow") and ((not combat) or (myhealth <= .25))) }
i=i+1; Skill[i] = { ['name'] = "Savage Power", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Savage Power"))) }
i=i+1; Skill[i] = { ['name'] = "Arrow of Essence", ['use'] = (ChkArg(arg2,"boss") and combat) }
i=i+1; Skill[i] = { ['name'] = "Concentration", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs,"Concentration"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 62 (Archer's Glory)", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Archer's Glory")) }
i=i+1; Skill[i] = { ['name'] = "Autoshot",       ['use'] = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { ['name'] = "Serenity",       ['use'] = ( ChkArg(arg2,"boss") and CD("Concentration") == false and (not ChkArg(pbuffs,"Concentration")) and UnitMana("player")<15) }
i=i+1; Skill[i] = { ['name'] = "Item: Focus Potion", ['use'] = (ChkArg(arg2,"boss") and combat and (focus >= 10)) }

i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Briar Shield"))) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Entling Offering"))) }
i=i+1; Skill[i] = { ['name'] = "Item: Roast Wolf Leg", ['use'] = (ChkArg(arg3,"consume") and combat and (not(ChkArg(pbuffs,"Informer") or ChkArg(pbuffs,"Roast Wolf Leg")))) }
i=i+1; Skill[i] = { ['name'] = "Item: Frenzy Potion", ['use'] = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Frenzy Potion"))) }
i=i+1; Skill[i] = { ['name'] = "Item: Strong Stimulant", ['use'] = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Strong Stimulant"))) }

i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not ChkArg(pbuffs,"Briar Shield")) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (not ChkArg(pbuffs,"Entling Offering")) }
i=i+1; Skill[i] = { ['name'] = "Shoot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Snipe", ['use'] = (ChkArg(pbuffs,"Hidden Peril")) }
i=i+1; Skill[i] = { ['name'] = "Combo Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Thorn Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Hidden Peril", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }


MyCombat(Skill,arg1)

    if (tDead) or (not LockedOn) or (not enemy) then
        TargetNearestEnemy()
    end    


end
Any help appreciated :)

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,226

Monday, December 20th 2010, 12:37pm

What is the directory of your folders? If you have a diyce folder inside a diyce folder, this is incorrect.

I am wanting to get and item set still into working within the diyce code, but am uncertain as to if this will actually work or not, and just wondering if this seem like correct syntax, or if anyone has any other ideas. Tired of Spirit Herb Essence sitting on my action bar, and me forgetting I have it. So, I want to check to see if potslot is nil or not, and if it isn't, then use the item set skill. If it is, then do nothing. So I think this will work:

Source code

1
2
3
    SSE = SSE

    i=i+1; Skill[i] = { name = "Action: "..SSE,  use = ((phealth < .75) and potslot) }
potslot is currently spirit herbs, so does this work?


EDIT: This does work. For any wanting to include this skill into your rotation.

1,227

Monday, December 20th 2010, 1:51pm

Quoted from "ghostwolf82;366466"

What is the directory of your folders? If you have a diyce folder inside a diyce folder, this is incorrect.


i have it in Runes of Magic\Interface\Addons\DIYCE
and Runes of Magic\Interface\Addons\DIYCE\MyFunctions\MyFunctions.lua and Runes of Magic\Interface\Addons\DIYCE\MyFunctions\MyFunctions.toc
and the above script i copy pasted into MyFunctions.lua

1,228

Monday, December 20th 2010, 2:57pm

Quoted from "CyberZe;366232"

my first attempt to make a function for DIYCE...
but it doesnt work im not sure why, i downloaded addon, pasted it into addons, then made the new folder and files inside (as in guide)
and paste my function (made form some other's work) inside this MyFunctions.lua
but it doesnt work at all...

Any help appreciated :)


I gave your code the once-over and found a whole bunch of errors. I corrected as many as I spotted, so give this a try:

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
function ChkArg(arg1, skillname)
    arg1 = arg1 or ""
    return (string.find(arg1, skillname) ~= nil)
end

function ScoutWarden(arg1,arg2,arg3)
    local Skill = {}
    local i = 0
    local focus = UnitMana("player")
    local mana = UnitSkill("player")
    local friendly = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local myhealth = PctH("player")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local LockedOn = UnitExists("target")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(61)  -- # is your Autoshot slot number

    if (myhealth <= .1) then
        SwapEquipmentItem()
        for j=1,3 do
            if IsPetSummoned(j) then
                ReturnPet(j)
            end
        end      
        CastSpellByName("Elven Amulet")
        return true
    end

    i=i+1; Skill[i] = { name = "Blood Arrow", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Blood Arrow")) and (myhealth >= .75)) }
    i=i+1; Skill[i] = { name = "Blood Arrow", use = (ChkArg(pbuffs, "Blood Arrow") and ((not combat) or (myhealth <= .25))) }
    i=i+1; Skill[i] = { name = "Savage Power", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Savage Power"))) }
    i=i+1; Skill[i] = { name = "Arrow of Essence", use = (ChkArg(arg2,"boss") and combat) }
    i=i+1; Skill[i] = { name = "Concentration", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs,"Concentration"))) }
    i=i+1; Skill[i] = { name = "Action: 62 (Archer's Glory)", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Archer's Glory"))) }
    i=i+1; Skill[i] = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
    i=i+1; Skill[i] = { name = "Serenity", use = ( ChkArg(arg2,"boss") and (not CD("Concentration")) and (not ChkArg(pbuffs,"Concentration")) and (UnitMana("player")<15)) }
    i=i+1; Skill[i] = { name = "Item: Focus Potion", use = (ChkArg(arg2,"boss") and combat and (focus <= 10)) }

    i=i+1; Skill[i] = { name = "Briar Shield", use = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Briar Shield"))) }
    i=i+1; Skill[i] = { name = "Entling Offering", use = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Entling Offering"))) }
    i=i+1; Skill[i] = { name = "Item: Roast Wolf Leg", use = (ChkArg(arg3,"consume") and combat and (not (ChkArg(pbuffs,"Informer") or ChkArg(pbuffs,"Roast Wolf Leg")))) }
    i=i+1; Skill[i] = { name = "Item: Frenzy Potion", use = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Frenzy Potion"))) }
    i=i+1; Skill[i] = { name = "Item: Strong Stimulant", use = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Strong Stimulant"))) }

    i=i+1; Skill[i] = { name = "Briar Shield", use = (not ChkArg(pbuffs,"Briar Shield")) }
    i=i+1; Skill[i] = { name = "Entling Offering", use = (not ChkArg(pbuffs,"Entling Offering")) }
    i=i+1; Skill[i] = { name = "Shoot", use = (not friendly) }
    i=i+1; Skill[i] = { name = "Snipe", use = (ChkArg(pbuffs,"Hidden Peril")) }
    i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) }
    i=i+1; Skill[i] = { name = "Thorn Arrow", use = (not friendly) }
    i=i+1; Skill[i] = { name = "Hidden Peril", use = (not friendly) }
    i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >= 15)) }


    MyCombat(Skill,arg1)

    if (tDead) or (not LockedOn) or friendly then
        TargetNearestEnemy()
    end    
end
Also, whenever you run your code and it doesn't work, be sure to look for a red flashing icon by the minimap and click on it. That will give you some indication of syntax errors and the line number they occur on.

Also, just in case you're not aware of this, that function relies on passing certain text strings to it as the 2nd and 3rd argument in your macro. Let me know if you don't understand what that means and I'll explain further.

1,229

Monday, December 20th 2010, 3:00pm

Quoted from "ghostwolf82;366466"

I am wanting to get and item set still into working within the diyce code, but am uncertain as to if this will actually work or not, and just wondering if this seem like correct syntax, or if anyone has any other ideas. Tired of Spirit Herb Essence sitting on my action bar, and me forgetting I have it. So, I want to check to see if potslot is nil or not, and if it isn't, then use the item set skill. If it is, then do nothing. So I think this will work:

Source code

1
2
3
    SSE = SSE

    i=i+1; Skill[i] = { name = "Action: "..SSE,  use = ((phealth < .75) and potslot) }
potslot is currently spirit herbs, so does this work?


EDIT: This does work. For any wanting to include this skill into your rotation.


You don't need the line that says "SSE = SSE". I think what you want is to assign SSE to something if you don't pass that value. So you probably want something like this instead:

Source code

1
SSE = SSE or 0


Since that's an action bar slot number, using a 0 if SSE isn't defined will return a false condition from MyCombat when it tries to execute that skill, which is what you want.

1,230

Monday, December 20th 2010, 3:23pm

Quoted from "Sixpax;366484"

I gave your code the once-over and found a whole bunch of errors. I corrected as many as I spotted, so give this a try:

Also, whenever you run your code and it doesn't work, be sure to look for a red flashing icon by the minimap and click on it. That will give you some indication of syntax errors and the line number they occur on.

Also, just in case you're not aware of this, that function relies on passing certain text strings to it as the 2nd and 3rd argument in your macro. Let me know if you don't understand what that means and I'll explain further.


Thakns for help, ill check that asap, i dont fully understand lua, was using others work...
Also i didnt know of the red flashing icon, have to check for it...
I know about arguments, for now id like it just to start working with first arg1 ( using /run ScoutWarde(); ) if that will work ill add other arguments to some other macros ;)


EDIT:
Works like a charm, thanks a lot m8
btw, will that: /run ScoutWarden("null","null","consume"); make me use only consume arg?

EDIT2:
Is it only me or i can't triple shot with combo shot? it seems that next call of the function cancels its cast bar, and then it only shots once

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,231

Monday, December 20th 2010, 8:57pm

I think another issue may well be it seems you have the functions file in a layer of folders too deep. Try moving that file up one level so it looks like this:

Runes of Magic\Interface\Addons\DIYCE\DIYCE.toc
Runes of Magic\Interface\Addons\DIYCE\DIYCE.lua
Runes of Magic\Interface\Addons\DIYCE\MyFunctions.lua

These three files should be all in the DIYCE folder, and when you open DICYE.toc you should see two lines of code there that look like this:

DIYCE.lua
MyFunctions.lua

1,232

Tuesday, December 21st 2010, 9:33am

Quoted from "ghostwolf82;366665"

I think another issue may well be it seems you have the functions file in a layer of folders too deep. Try moving that file up one level so it looks like this:

Runes of Magic\Interface\Addons\DIYCE\DIYCE.toc
Runes of Magic\Interface\Addons\DIYCE\DIYCE.lua
Runes of Magic\Interface\Addons\DIYCE\MyFunctions.lua

These three files should be all in the DIYCE folder, and when you open DICYE.toc you should see two lines of code there that look like this:

DIYCE.lua
MyFunctions.lua


Oh, i could do that, but after Six's tweaking it works well, only thing thats not ok is that when reusing macro while comboshot is loading its cast bar it gets interrupted

1,233

Tuesday, December 21st 2010, 1:54pm

Quoted from "CyberZe;366988"

Oh, i could do that, but after Six's tweaking it works well, only thing thats not ok is that when reusing macro while comboshot is loading its cast bar it gets interrupted


That shouldn't be happening because the very first check I do is to see if you're already casting something. Besides, even if it tried to cast something while Combo Shot is being cast, it would just fail because another cast is in progress. Something else must be interrupting it. It could be the code at the bottom that does the TargetNearestEnemy stuff... maybe it's switching targets on you for some reason (although the logic doesn't look like it would). Perhaps try removing those 3 lines and see if that makes a difference.

Also, try running your macro with the "v2" option as arg1 and it should show Combo Shot in a light blue color with brackets around it if it is being cast, which means the MyCombat function just exits without doing anything.

1,234

Wednesday, December 22nd 2010, 9:55am

it seems that when running just /run function it works well and waits for the cast, but when running with a macro of
/run function
/wait 0.35
/run function
it gets broken, dunno why it happends, i made the wait longer to 0.5 and now it seems ok...

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,235

Wednesday, December 22nd 2010, 11:40am

GCD (global cool down) is .5 seconds. However, you shouldn't need to string anything together like this. Just a one line macro would work, just press the key several times. No error at all then.

1,236

Wednesday, December 22nd 2010, 4:12pm

the point is id rather hit the macro once and not couple time a second ;)

1,237

Monday, December 27th 2010, 7:52am

Ok I need help. I suck at this kind of stuff. I have made a new s/k. I have the elites up to 45. I want a macro but the only one I found here is by wolf and I can't seem to make it work right and really don't want it to do all that its set up to do anyways. I want 2 macros one that for range and one for up close. But I want it on 2 different buttons. I do want to make sure both keep my armor and arrow buff up. Can someone please help.
Come take a look at ----> http://romtop100.com

List of US ROM Guilds, Vote for your Favorite to help them move up the ranks, Favorite fan sites, Look for a guild or look for members, Guild Forums, Guild Galleries, and much more

[img][/img]

Posts: 779

Location: USA

Occupation: Student

  • Send private message

1,238

Monday, December 27th 2010, 10:27am

If I could, I'd like to request a KnightMage DIYCE. Searching "KnightMage" on the forums only brings me to a single thread that lists the names of different combinations. I can't seem to find one anywhere, and I've been looking for a few days while using generic knight one.

Thanks!

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,239

Monday, December 27th 2010, 12:52pm

As I just replied to AKALASZLO in a message, I shall do here for you as well CharlieBananas. If you wish to know more about how to create a better DIYCE, start with post one of this thread, and read on from there until you have a better understanding of how the code works, and all that lies within. Once you do that, you will see that making a DIYCE of your own will come rather easily. The DIYCE is a great place to start learning how to make your own lua files and move up from there, as it is laid out very well, and easy to understand even for beginners.

Learning the way the code works will go a lot further than just asking for someone to make one for you.

1,240

Monday, December 27th 2010, 1:12pm

Quoted from "AKALASZLO;369044"

Ok I need help. I suck at this kind of stuff. I have made a new s/k. I have the elites up to 45. I want a macro but the only one I found here is by wolf and I can't seem to make it work right and really don't want it to do all that its set up to do anyways. I want 2 macros one that for range and one for up close. But I want it on 2 different buttons. I do want to make sure both keep my armor and arrow buff up. Can someone please help.


It's probably best just to start with something simple that's functional and tweak it as needed.

For the ranged one, you could use something like 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
function ScoutKnightRange(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitMana("player")
    local enemy = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(0) -- Change the 0 to your action bar slot # for Autoshot

    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 = enemy }
    i=i+1; Skill[i] = { name = "Autoshot",         use = (enemy and (not ASon)) }
    i=i+1; Skill[i] = { name = "Shot",             use = enemy }
    i=i+1; Skill[i] = { name = "Disarmament",      use = (enemy and (not string.find(tbuffs,"Disarmament IV"))) }
    i=i+1; Skill[i] = { name = "Vampire Arrows",   use = (enemy and (focus >= 20)) }
    i=i+1; Skill[i] = { name = "Wind Arrows",      use = (enemy and (focus >= 15)) }
    i=i+1; Skill[i] = { name = "Disarmament",      use = enemy }

    MyCombat(Skill,arg1)
end
The macro for that will be:

Source code

1
/run ScoutKnightRange()
For the melee range version, something like:

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
function ScoutKnightMelee(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitMana("player")
    local enemy = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(0) -- Change the 0 to your action bar slot # for Autoshot

    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 = enemy }
    i=i+1; Skill[i] = { name = "Autoshot",         use = (enemy and (not ASon)) }    
    i=i+1; Skill[i] = { name = "Shot",             use = enemy }
    i=i+1; Skill[i] = { name = "Punishment",       use = (enemy and string.find(tbuffs, "Light Seal III")) }
    i=i+1; Skill[i] = { name = "Disarmament",      use = (enemy and (not string.find(tbuffs,"/Disarmament I/"))) }
    i=i+1; Skill[i] = { name = "Holy Strike",      use = (enemy and (not string.find(tbuffs,"/Light Seal I/"))) }
    i=i+1; Skill[i] = { name = "Disarmament",      use = (enemy and (not string.find(tbuffs,"/Disarmament II/"))) }
    i=i+1; Skill[i] = { name = "Holy Strike",      use = (enemy and (not string.find(tbuffs,"/Light Seal II/"))) }
    i=i+1; Skill[i] = { name = "Disarmament",      use = (enemy and (not string.find(tbuffs,"/Disarmament III/"))) }
    i=i+1; Skill[i] = { name = "Holy Strike",      use = (enemy and (not string.find(tbuffs,"/Light Seal III/"))) }
    i=i+1; Skill[i] = { name = "Vampire Arrows",   use = (enemy and (focus >= 20)) }
    i=i+1; Skill[i] = { name = "Wind Arrows",      use = (enemy and (focus >= 15)) }
    i=i+1; Skill[i] = { name = "Disarmament",      use = enemy }

    MyCombat(Skill,arg1)
end
That's a complete guess on my part as I don't know what melee attacks a S/K likes to use. I attempted to have it alternate between Holy Strike and Disarmament whenever the bow attacks are cooling. Vampire Arrows and Wind Arrows will probably never fire with the place I have them in, but I stuck them in there anyway.

The macro for that will be:

Source code

1
/run ScoutKnightMelee()
Be aware that I don't have any elite skills in there, so you'll need to add them as you see fit.

Also, be sure to replace the 0 in the GetActionInfo(0) call with your Autoshot action bar slot number.