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.

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,841

Friday, October 21st 2011, 6:00pm

Quoted from "xMagus;476616"

i need help to make a function

Thanks in Advance

Sure, go to the top of this thread and use the "search this thread" button, and search for scout/warrior.

Also, go to page one of this thread, and read until you understand how DIYCE works.

Once you have done those steps, try creating a function for yourself, and post up any problems or bugs you find, and we will be more than glad to help alleviate those issues.

You are welcome, in advance.

1,842

Saturday, October 22nd 2011, 3:09am

the ones i found were outdated and using skills that no longer exist for scouts also people claimed to have issues with ones posted and i didnt see any posted fixes (ive browsed this entire thread page by page) so if ur a S/W with a working one plz share and ill edit off of yours.

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,843

Saturday, October 22nd 2011, 3:56am

Please explain how they are outdated and using skills that no longer work. If you understand DIYCE then you should be able to get a mock up working, and then we can help you from there.

We do not do hand outs here, we offer help outs. We do not support lazy people.

1,844

Saturday, October 22nd 2011, 6:34am

I have a question for the DIYCE gurus:

Has anyone thought about creating a GUI for DIYCE in-game? Just something that would allow someone to edit their functions and reload them without exiting the game. I'm pretty sure there's an in-game lua code IDE. Perhaps that could be adapted to reference your function file(s). It might even be possible to make a "visual" DIYCE editor where you could drag a skill icon onto it and then have a parameters section where you could adjust the conditions under which the skill fires. A header section could be auto-generated based on a given class and given a set of standard variable definitions (pHealth, tDead, etc). I'm not sure how much work this would be, but it would certainly open up DIYCE to a wider audience. Some people are a little turned off by the text-based, hard-core programming feel of DIYCE and might respond better to more graphical feel. Of course it would have less flexibility and power, but one could always just edit the actual lua code once they are more comfortable with it. It's just a thought. :)

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,845

Saturday, October 22nd 2011, 1:04pm

Quoted from "jtanner28;476770"

I have a question for the DIYCE gurus:

Has anyone thought about creating a GUI for DIYCE in-game? Just something that would allow someone to edit their functions and reload them without exiting the game. I'm pretty sure there's an in-game lua code IDE. Perhaps that could be adapted to reference your function file(s). It might even be possible to make a "visual" DIYCE editor where you could drag a skill icon onto it and then have a parameters section where you could adjust the conditions under which the skill fires. A header section could be auto-generated based on a given class and given a set of standard variable definitions (pHealth, tDead, etc). I'm not sure how much work this would be, but it would certainly open up DIYCE to a wider audience. Some people are a little turned off by the text-based, hard-core programming feel of DIYCE and might respond better to more graphical feel. Of course it would have less flexibility and power, but one could always just edit the actual lua code once they are more comfortable with it. It's just a thought. :)

It has been suggested before (see this thread http://forum.us.runesofmagic.com/showthread.php?t=60064).
2013... The year from hell....

1,846

Saturday, October 22nd 2011, 9:02pm

I need a bit of help with two pieces of code that I am getting error from.

The first is throwing an error [String '?']:82: 'end' expected to "if" at line 52 near '<eof>'. I added an 'end' statement at the bottom, but I am not sure that is correct, and I am not sure why, since as I see it all of the statements are closed. I am still very new, and learning, but am not experienced enough to be sure the errors are fixed.

Also, feel free to bash my shoddy coding, and correct, offer suggestions. I am certainly willing to learn.


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
function RogueScout(arg1,arg2)
    local Skill = {}
    local i = 0
    
    --Player Data
    local energy       = UnitMana("player")
    local focus        = UnitSkill("player")
    local premed       = ChkBuff("player","Premeditation")
    local combat       = GetPlayerCombatState()
    local ammo         = GetInventoryItemCount("player",9)
    local melee        = GetActionUsable(1) -- Shadowstab action bar slot number (range checker)
  --local shadow       = GetActionUsable(34) -- Shadowprison action bar slot number (range checker)
    local enemy = UnitCanAttack("player","target")
    local phealth = PctH("player")
    local pbuffs = BuffList("player")
    local shift = IsShiftKeyDown()   


    --Target Data
    local enemy       = UnitCanAttack("player","target")
    local tDead       = UnitIsDeadOrGhost("target")
    local tBleed      = (BuffTimeLeft("target","Bleed") > 1)
    local tWound      = ChkBuff("target","Grievous Wound")
    local tBlind      = ChkBuff("target","Blind Spot Bleed")
    local tPrison     = (BuffTimeLeft("target","Shadow Prison") < .75)
    local tVamp       = ChkBuff("target","Vampire Arrows")
    local boss        = ((UnitSex("target"))>=2) 

 
    --Ammo Reminder
    if (ammo == false) then
        Msg("OUT OF ARROWS")
    end
    
        --i=i+1; Skill[i] = { ['name'] = "Combat Master",                          --['use'] = (not ChkBuff("player","Combat Master")) }
    if (arg2 == "CD") then  
        --i=i+1; Skill[i] = { ['name'] = "Fervent Attack",                       ['use'] = (true) }
        --i=i+1; Skill[i] = { ['name'] = "Energy Thief",                         ['use'] = (true) }
        --i=i+1; Skill[i] = { ['name'] = "Assassins Rage",                       ['use'] = (true) }
    end

 
        --i=i+1; Skill[i] = { name = "Action: 17 (Caviar Sandwich)",               use   = ((not ChkBuff("player","Caviar Sandwich")) ) }
        --i=i+1; Skill[i] = { name = "Action: 18 (Strong Stimulant)",              use   = ((not ChkBuff("player","Strong Stimulant")) ) }
        --i=i+1; Skill[i] = { name = "Action: 19 (Potion of Annihilation)",        use   = ((not ChkBuff("player","Potion of Annihilation")) ) }       
	  i=i+1; Skill[i] = { ['name'] = "Action: 20 (Health pot)",               use   = (phealth <= .50) and GetActionUsable(20) }
          i=i+1; Skill[i] = { ['name'] = "Action: 19 (HoT pot)",              use   = (phealth <= .70) and GetActionUsable(19) }
        
 --Buffs
          i=i+1; Skill[i] = { ['name'] = "Premeditation",                ['use'] = ((not premed) and boss)}

    if (enemy and (not tDead)) then
        if (not melee) then --Ranged attack
            i=i+1; Skill[i] = { ['name'] = "Shot",                             ['use'] = ((ammo > 1) and premed) }
            --i=i+1; Skill[i] = { ['name'] = "Shadow Prison",                    ['use'] = ((energy >= 50) and tPrison and shadow and (arg2 == "prison")) }
            i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",                   ['use'] = ((focus >= 20) and (not tVamp)) }
            i=i+1; Skill[i] = { ['name'] = "Shot",                             ['use'] = (ammo > 1) }
        else
            if shift then    --Behind Melee 
                --i=i+1; Skill[i] = { name = "Sneak Attack",                       use = ((not combat) and (energy >= 30)) }
                i=i+1; Skill[i] = { name = "Blind Spot",                         use = ((energy >= 55) and (not tBlind)) }
            end
            --Melee Combat
            if (arg2 == "prison") then
              --i=i+1; Skill[i] = { ['name'] = "Shadow Prison",                ['use'] = ((energy >= 50) and tPrison) }
                i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",               ['use'] = ((focus >= 20) and (not tVamp)) }
                i=i+1; Skill[i] = { ['name'] = "Shot",                         ['use'] = (ammo > 1) }
            else
                i=i+1; Skill[i] = { ['name'] = "Shot",                         ['use'] = (energy <= 35) }
                i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",               ['use'] = ((energy <= 25) and (not tVamp)) }
                i=i+1; Skill[i] = { ['name'] = "Wound Attack",                 ['use'] = ((energy >= 35) and tBleed and tWound) }
                i=i+1; Skill[i] = { ['name'] = "Low Blow",                     ['use'] = ((energy >= 25) and tBleed and (not tWound)) }
                i=i+1; Skill[i] = { ['name'] = "Shadowstab",                   ['use'] = ((energy >= 35)) }

            end
        end
    MyCombat(Skill,arg1)

     if (tDead) or (not lockedOn) or (not enemy) then
           TargetNearestEnemy()

    end



The second error I am getting is from a separate script. It is [string '?']:147: bad argument #1 to 'pairs' (table expected, got nil)

I am completely lost on this one.

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
--Scout Rogue functions
function ScoutRogue(arg1,arg2)
   local Skill = {}
   local i = 0
    --Player Data
   local energy       = UnitMana("player")
   local focus        = UnitSkill("player")
   local premed       = ChkBuff("player","Premeditation")
   local combat       = GetPlayerCombatState()
   local ammo         = GetInventoryItemCount("player",9)
   local melee        = GetActionUsable(21) -- Shadowstab action bar slot number (range checker)
   local enemy = UnitCanAttack("player","target")
   local phealth = PctH("player")
   local pbuffs = BuffList("player")

--Target Data
   local enemy       = UnitCanAttack("player","target")
   local tDead       = UnitIsDeadOrGhost("target")
   local tBleed      = (BuffTimeLeft("target","Bleed") > 1)
   local tWound      = ChkBuff("target","Grievous Wound")
   local tVamp       = ChkBuff("target","Vampire Arrows")
   local boss        = ((UnitSex("target"))>=2) 

    --Ammo Reminder
    if (ammo == false) then
        Msg("OUT OF ARROWS")
    end

    if (melee) then --At Melee
   i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((energy >= 35)) }
   i=i+1; Skill[i] = { ['name'] = "Joint Blow",     ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Blind Stab",     ['use'] = ((not friendly) and (energy >= 25)) }
   else  --At Range
   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",    ['use'] = (not ChkBuff("player","Frost Arrow")) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (enemy and (focus >= 20)) } 
 --i=i+1; Skill[i] = { ['name'] = "Combo Shot",     ['use'] = enemy }
   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = enemy }
   i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = enemy }
   i=i+1; Skill[i] = { ['name'] = "Weak Spot",      ['use'] = (enemy and (focus >= 30) and boss) }
 --i=i+1; Skill[i] = { ['name'] = "Sapping Arrow",  ['use'] = enemy }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",    ['use'] = (enemy and (focus >= 15)) }
 --i=i+1; Skill[i] = { ['name'] = "Snipe",          ['use'] = enemy }
end

	--POTS
   i=i+1; Skill[i] = { ['name'] = "Action: 20 (Health pot)",           ['use']   = (phealth <= .50) and GetActionUsable(20) }
   i=i+1; Skill[i] = { ['name'] = "Action: 19 (HoT pot)",              ['use']   = (phealth <= .70) and GetActionUsable(19) }
        end

   MyCombat(Skill,arg1)

     if (tDead) or (not lockedOn) or (not enemy) then
           TargetNearestEnemy()

end


Lastly, the melee check is not working in the latter code block. I have the shadowstab on button 1 I think, it is the first hotkey of the main block, and I still get nothing. Any ideas on that would be appreciated as well.

Thanks in advance,

N

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,847

Sunday, October 23rd 2011, 5:19am

Quoted from "N757QQ;476879"

I need a bit of help with two pieces of code that I am getting error from.

The first is throwing an error [String '?']:82: 'end' expected to "if" at line 52 near '<eof>'. I added an 'end' statement at the bottom, but I am not sure that is correct, and I am not sure why, since as I see it all of the statements are closed. I am still very new, and learning, but am not experienced enough to be sure the errors are fixed.

Also, feel free to bash my shoddy coding, and correct, offer suggestions. I am certainly willing to learn.


From what I've seen of the code you posted there are in fact quite a few missing end statements. Please see this thread for tips on debugging these types of errors.


Quoted from "N757QQ;476879"

The second error I am getting is from a separate script. It is [string '?']:147: bad argument #1 to 'pairs' (table expected, got nil)

I am completely lost on this one.

As I don't see a call to pairs anywhere in your code, but do see a at least one missing end statement, I'd say the real problem is that you are again missing an end statement.


Quoted from "N757QQ;476879"

Lastly, the melee check is not working in the latter code block. I have the shadowstab on button 1 I think, it is the first hotkey of the main block, and I still get nothing. Any ideas on that would be appreciated as well.

First get the above problems fixed then see if things start working. If there are bugs in the code then it really could be the bugs creating the problem. So first lets get those fixed.
2013... The year from hell....

1,848

Sunday, October 23rd 2011, 5:33am

Thank you Peryl for your time & assistance. I will check through the linked information & hopefully fix up the code.

I'm certainly grateful for information.

Thanks again,

N

1,849

Monday, October 24th 2011, 12:36am

diyce troubleshoot?

First time working w/ diyce, so please excuse the noobness as i go through this. Here are the steps I have taken to this point:

1. Got diyce.lua and diyce.toc in addons/diyce folder. I know this is OK because I can /run ReadSkills() in game and get feedback

2. created myfunctions.lua in same folder and added code. I know the code is good as others are using same.

3. Added myfunctions.lua to the end of the diyce.toc file

4. created in-game macro /run WarriorRogue(), assigned to hotkey, action bar, etc

I have re-checked all of this quite a few times, looking for obvious stuff such as the function name, etc. I have also tried with other functions I have found on the forum, just to make sure it is not a coding error.

In short, I am getting nothing when i hit the hotkey...not even an error message.

Anyone have any thoughts? They would be greatly appreciated!

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,850

Monday, October 24th 2011, 3:06am

Without your code (properly wrapped in code tags) it is pretty hard to help you debug the issue.

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,851

Monday, October 24th 2011, 4:28am

For those interested,

Source code

1
[B]/Script DEFAULT_CHAT_FRAME:AddMessage(GetZoneID());[/B]

in SW returns: 3402

and,

Source code

1
[B]/script DEFAULT_CHAT_FRAME:AddMessage(GetZoneName());[/B]

will return a value of: Siege War (BETA)

Just something that no one else has ever posted up, and I figured it may be of use to a few people.

1,852

Tuesday, October 25th 2011, 2:40pm

Hey again.
Long time since I've asked for help here now, but I hope it will be as awesome as usual.

I'm currently trying to get my function to do this;

If I have Energy Thief on AND boss HP is 30% or less, I would like it to Shadowstab-->Low Blow-->Wound Attack-->Low Blow(till my wound attack is recharged)-->Restart Combo.
However, I can't get it right.

My current code is

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
function RogueScout(arg1,arg2)
    local Skill = {}
    local i = 0
    
    --Player Data
    local energy       = UnitMana("player")
    local focus        = UnitSkill("player")
    local premed       = ChkBuff("player","Premeditation")
    local combat       = GetPlayerCombatState()
    local ammo         = GetInventoryItemCount("player",9)
    local melee        = GetActionUsable(36) -- Shadowstab action bar slot number (range checker)
    local shadow       = GetActionUsable(34) -- Shadowprison action bar slot number (range checker)
    
    --Ammo Reminder
    if (ammo == false) then
        Msg("OUT OF ARROWS")
    end

    --Target Data
    local enemy       = UnitCanAttack("player","target")
    local tDead       = UnitIsDeadOrGhost("target")
    local tBleed      = (BuffTimeLeft("target","Bleed") > 1)
    local tWound      = ChkBuff("target","Grievous Wound")
    local tBlind      = ChkBuff("target","Blind Spot Bleed")
    local tPrison     = (BuffTimeLeft("target","Shadow Prison") < .75)
    local tVamp       = ChkBuff("target","Vampire Arrows")
    
    i=i+1; Skill[i] = { ['name'] = "Combat Master",                            ['use'] = (not ChkBuff("player","Combat Master")) }
    if (arg2 == "CD") then  
      --i=i+1; Skill[i] = { ['name'] = "Fervent Attack",                       ['use'] = (true) }
        i=i+1; Skill[i] = { ['name'] = "Energy Thief",                         ['use'] = (true) }
        i=i+1; Skill[i] = { ['name'] = "Assassins Rage",                       ['use'] = (true) }
    end

    if (arg2 == "pots") then  
        i=i+1; Skill[i] = { name = "Action: 17 (Caviar Sandwich)",               use   = ((not ChkBuff("player","Caviar Sandwich")) ) }
        i=i+1; Skill[i] = { name = "Action: 18 (Strong Stimulant)",              use   = ((not ChkBuff("player","Strong Stimulant")) ) }
        i=i+1; Skill[i] = { name = "Action: 19 (Potion of Annihilation)",        use   = ((not ChkBuff("player","Potion of Annihilation")) ) }       
    end


    if (enemy and (not tDead)) then
        if (not melee) then --Ranged attack
            i=i+1; Skill[i] = { ['name'] = "Shot",                             ['use'] = ((ammo > 1) and premed) }
            i=i+1; Skill[i] = { ['name'] = "Shadow Prison",                    ['use'] = ((energy >= 50) and tPrison and shadow and (arg2 == "prison")) }
            i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",                   ['use'] = ((focus >= 20) and (not tVamp)) }
            i=i+1; Skill[i] = { ['name'] = "Shot",                             ['use'] = (ammo > 1) }
        else
            if (arg2 == "behind") then    --Behind Melee 
                i=i+1; Skill[i] = { name = "Sneak Attack",                       use = ((not combat) and (energy >= 30)) }
                i=i+1; Skill[i] = { name = "Blind Spot",                         use = ((energy >= 55) and (not tBlind)) }
            end
            --Melee Combat
            if (arg2 == "prison") then
                i=i+1; Skill[i] = { ['name'] = "Shadow Prison",                ['use'] = ((energy >= 50) and tPrison) }
                i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",               ['use'] = ((focus >= 20) and (not tVamp)) }
                i=i+1; Skill[i] = { ['name'] = "Shot",                         ['use'] = (ammo > 1) }
            else
                i=i+1; Skill[i] = { ['name'] = "Shot",                         ['use'] = (energy <= 35) }
                i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",               ['use'] = ((energy <= 25) and (not tVamp)) }
                i=i+1; Skill[i] = { ['name'] = "Wound Attack",                 ['use'] = ((energy >= 35) and tBleed and tWound) }
                i=i+1; Skill[i] = { ['name'] = "Low Blow",                     ['use'] = ((energy >= 25) and tBleed and (not tWound)) }
                i=i+1; Skill[i] = { ['name'] = "Shadowstab",                   ['use'] = ((energy >= 35)) }

            end
        end
    end
    
    MyCombat(Skill,arg1)
end

Pandorumx

Beginner

Posts: 0

Location: NYC

Occupation: Knight

  • Send private message

1,853

Wednesday, October 26th 2011, 8:11pm

Can I get small help with this 3 lines, they seem to only work when I target my self. Would like for them to go off while im targeting mob in battle.


Source code

1
2
3
4
   i=i+1; Skill[i] = { ['name'] = "Holy Shield",    ['use'] = (health <= .35) }
   i=i+1; Skill[i] = { name = "Action: 50",    use = (PctH("player") < .35) }
   i=i+1; Skill[i] = { name = "Action: 51",    use = (PctM("player") < .15) }
   
Duranium
70K/70S/52R
Artemis

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,854

Wednesday, October 26th 2011, 8:41pm

@MasterFSK - If you want it to work on a boss mob, you will need to add a variable for boss mobs to be checked against.

@Pandorumx - add the variable for checking if the target is an enemy, and check against that.

Pandorumx

Beginner

Posts: 0

Location: NYC

Occupation: Knight

  • Send private message

1,855

Wednesday, October 26th 2011, 9:10pm

Quoted from "ghostwolf82;478367"

@Pandorumx - add the variable for checking if the target is an enemy, and check against that.


Honestly I don't know how to do that, been looking for something simular on the forum but can't find it. Been at this since last night. :confused:
Duranium
70K/70S/52R
Artemis

Drake1132

Beginner

Posts: 11

Location: Wait a minute... you mean I'm *not* a figment of your imagination?

  • Send private message

1,856

Thursday, October 27th 2011, 3:52am

Quoted from "Pandorumx;478381"

Honestly I don't know how to do that, been looking for something simular on the forum but can't find it. Been at this since last night. :confused:


Umm, if you haven't found it yet, then you clearly are NOT looking. It's posted in very nearly every class function code ever posted here, including the one right above your first request.

Also, I highly recommend following the link in my signature and reading *everything* in and/or linked to in the post there.
[img][/img]


-- Almost all human knowledge is built upon earlier foundations of more basic knowledge. If you are having trouble, go back two steps and work on something more basic. This can provide insights that will help you with whatever you were having trouble with.


-- Want to learn how to use the Do-it-yourself Combat Engine system (DIYCE)? A good place to start might be RIGHT HERE.

1,857

Friday, October 28th 2011, 5:35pm

does this DIYCE still work?

if so, im really struggling to even get it started.

ive added it to my addon folder.

ive copied the code from the first post and pasted it into the LUA file.

when im in-game, i created a macro /run RogueScout()

but nothing happens. noteven any buffs.

can someone post the whole LUA file?

thanks

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,858

Friday, October 28th 2011, 7:15pm

Yes, the DIYCE still works. The first page is just the background scripting to the function you need to create. Keep reading through the thread, eventually it will make sense to you. If you don't create a custom function then yes, nothing will happen.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

1,859

Friday, October 28th 2011, 9:35pm

As far as I can tell, it's working the way I want it.

I personally don't use the melee function, due to my DPS being higher if I just do it manually and result to my own logic for the bleeds. However, it does work if you choose to do it for Solo'ing.

This one can only be used if you are by yourself in a party with no other Rogues. (or Warrior Rogue, Warden Rogue etc.)

I have yet to implement some sort of Partyhealer timers for the Bleeds, it will take some time. :3

/run RogueScout("","X")

For people who don't know much, where it says arg2 == (example) "MELEE" then for X you put MELEE.

arg2:
BUFF
FAILSAFE
CD
LONGCD
MELEE
RANGED

Last thing that needs to change is the Action keys where you keep the follwoing:

Yawaka's Blessing (RT Item Set-Skill)
Unbridled Enthusiasm (House maid Speed Potion)
Swap Macro

Source code

1
2
/run SwapEquipmentItem()
/run ReturnPet(# of slot your pet is in)
Phirius Potions
Strong Stimulant
Extinction Potion (This can be changed with Potion of Annihilation)
Energy Potion
Unknown Choice (WA Item Set-Skill)

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
function RogueScout(arg1,arg2)
    local Skill = {}
    local i = 0
    
    --Player Status
    local energy = UnitMana("player")
    local mana = UnitSkill("player")
    local focus = UnitSkill("player")
    local phealth = PctH("player")
    local pbuffs = BuffList("player")
    local combat = GetPlayerCombatState()
    local behind = (not UnitIsUnit("player", "targettarget"))
    local premed = (pbuffs == string.find(pbuffs, "Premeditation"))
    
    --Target Status
    local friendly = (not UnitCanAttack("player", "target"))
    local tDead = UnitIsDeadOrGhost("target")
    local tbuffs = BuffList("target")
    local boss = ((UnitSex("target"))>=2)

    --Buffs
    if(arg2 == "BUFF") then
        i=i+1; Skill[i] = { name = "Combat Master", use = ((not combat and not string.find(pbuffs, "Combat Master"))) }
        i=i+1; Skill[i] = { name = "Enhanced Armor", use = ((not friendly) and (not string.find(pbuffs, "Enhanced Armor"))) }
        i=i+1; Skill[i] = { name = "Searing Light", use = ((not friendly)  and (not string.find(pbuffs, "Searing Light"))) }
        i=i+1; Skill[i] = { name = "Lion's Protection", use = ((not friendly)  and (not string.find(pbuffs, "Lion's Protection"))) }
        i=i+1; Skill[i] = { name = "Action: 62", use = ((not combat and not string.find(pbuffs, "Yawaka's Blessing"))) }
        i=i+1; Skill[i] = { name = "Action: 69", use = ((not combat and not string.find(pbuffs, "Unbridled Enthusiasm")))  } -- Speed Potion
    end
    
    --Potions & Swap Macro
    if(arg2 == "FAILSAFE") then
        i=i+1; Skill[i] = { name = "Action: 42", use = (combat and (phealth < .03 and (boss))) } -- Swap Macro
        i=i+1; Skill[i] = { name = "Action: 43", use = (combat and (phealth < .25 and (boss))) } -- Phirius Potion
    end
    
    --Cooldowns
    if(arg2 == "CD") then
        i=i+1; Skill[i] = { name = "Action: 46 (Energy Potion)", use = ((combat) and (energy < 15 and (boss))) } -- Energy Potion
        i=i+1; Skill[i] = { name = "Action: 30 (Strong Stimulant)", use = ((boss) and (not string.find(pbuffs, "Fervent Attack"))) }
        i=i+1; Skill[i] = { name = "Action: 34 (Extinction Potion)", use = ((boss) and (not ChkBuff("player","Extinction Potion"))) }
        i=i+1; Skill[i] = { name = "Energy Thief", use = ((combat) and (boss) and (not tDead) and (energy < 50)) }
        i=i+1; Skill[i] = { name = "Assassins Rage", use = ((boss) and (not tDead)) }
        i=i+1; Skill[i] = { name = "Fervent Attack", use = ((boss) and (not tDead) and not string.find(pbuffs, "Strong Stimulant")) }
    end
    
    --60 Second Buffs
    if(arg2 == "LONGCD") then
        i=i+1; Skill[i] = { name = "Informer", use = ((not string.find(pbuffs, "Informer"))) }
        i=i+1; Skill[i] = { name = "Action: 64 (Unknown Choice)", use = ((energy > 20)) }
        i=i+1; Skill[i] = { name = "Action: 65 (Caviar Sandwich)", use = ((not string.find(pbuffs, "Caviar Sandwich"))) }
    end
        
    --Melee
    if(arg2 == "MELEE") then
        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 >= 25)) and (string.find(tbuffs, "Bleed") and ((not string.find(tbuffs, "Grievous Wound"))))) or (string.find(pbuffs, "Energy Thief"))) }
        i=i+1; Skill[i] = { name = "Shadowstab", use = (((not friendly) and (energy >= 20)) and (not string.find(tbuffs, "Bleed"))) }
        i=i+1; Skill[i] = { name = "Blind Spot", use = ((not friendly) and (string.find(pbuffs, "Energy Thief") or (premed)) and (behind)) }
        i=i+1; Skill[i] = { name = "Wrist Attack", use = ((not friendly) and (boss) and (focus >=50)) }
        i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly)) }
        i=i+1; Skill[i] = { name = "Shot", use = ((not friendly)) }
    end
    
    --Ranged
    if(arg2 == "RANGED") then
        i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly)) }
        i=i+1; Skill[i] = { name = "Shot", use = ((not friendly)) }
    end
    
    --RogueKnight Section (Third Class)
    if(arg2 == "RK") then
        i=i+1; Skill[i] = { name = "Disarmament", use = ((not friendly)) }
        i=i+1; Skill[i] = { name = "Holy Strike", use = ((not friendly)) }
    end
    
    MyCombat(Skill,arg1)
end
If anyone notices anything I didn't in the code, please let me know. I have been tweaking it all day and might have missed something.

Changelog: Fix a tiny bug in the Cooldown section where it would be trigging Strong Stimulant (or Fervent Attack) when it shouldn't.

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,860

Monday, October 31st 2011, 2:36am

Not seeing an error here, but for some reason I am not seeing Wound Attack go off in the combat log. When it should be, I just keep using Shadowstab instead.

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
            --Class: Rogue/Priest
            elseif mainClass == "THIEF" and subClass == "AUGUR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Action: "..healthpot,           use = (phealth <= .70) },
                { name = "Action: "..manapot,             use = (pctEB2 <= .40) },
                { name = "Assassins Rage",                use = boss and enemy },
                { name = "Magic Barrier",                 use = (pctEB2 >= .05) and (not pbuffs['Magic Barrier']) },
                { name = "Quickness Aura",                use = (pctEB2 >= .05) and (not pbuffs['Quickness Aura']) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Premeditation",                 use = (not combat) and boss and (EnergyBar1 >= 50) },
                    { name = "Kick",                          use = (EnergyBar1 >= 20) },    
                    { name = "Wound Attack",                  use = (EnergyBar1 >= 35) and (tbuffs['Bleed']) and (tbuffs['Grievous Wound']) },
                    { name = "Low Blow",                      use = (EnergyBar1 >= 30) and (tbuffs['Bleed']) and (not tbuffs['Grievous Wound']) },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) and (not tbuffs['Bleed']) },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) },
                    { name = "Attack",                        use = (thealth == 1) },                    
                            }
                end
            end
Anyone see what the issue is with Wound Attack and why it wouldn't be firing?

Edit:
Also tried it like this, and still not firing Wound Attack.

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
            --Class: Rogue/Priest
            elseif mainClass == "THIEF" and subClass == "AUGUR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Action: "..healthpot,           use = (phealth <= .70) },
                { name = "Action: "..manapot,             use = (pctEB2 <= .40) },
                { name = "Assassins Rage",                use = boss and enemy },
                { name = "Magic Barrier",                 use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
                { name = "Quickness Aura",                use = (pctEB2 >= .05) and ((not pbuffs['Quickness Aura']) or (pbuffs['Quickness Aura'].time <= 45)) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Premeditation",                 use = (not combat) and boss and (EnergyBar1 >= 50) },
                    { name = "Kick",                          use = (EnergyBar1 >= 20) },    
                    { name = "Wound Attack",                  use = (EnergyBar1 >= 35) and ((tbuffs[620313]) and (tbuffs[620314])) },
                    { name = "Low Blow",                      use = (EnergyBar1 >= 30) and (tbuffs[620313]) and (not tbuffs[620314]) },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) },
                    { name = "Attack",                        use = (thealth == 1) },                    
                            }
                end
            end