|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function PriestMage(arg1)
local Skill = {}
local i = 0
local enemy = UnitCanAttack("player","target")
local tbuffs = BuffList("target")
local ehealth = PctH("target")
i=i+1; Skill[i] = { name = "Bone Chill", use = (enemy and (not string.find(tbuffs,"Bone Chill"))) }
i=i+1; Skill[i] = { name = "Lightning", use = (enemy and (not string.find(tbuffs,"Lightning Rod"))) }
i=i+1; Skill[i] = { name = "Icewind Blade", use = enemy }
i=i+1; Skill[i] = { name = "Fireball", use = (enemy and (ehealth < .15)) }
i=i+1; Skill[i] = { name = "Rising Tide", use = enemy }
MyCombat(Skill,arg1)
end
|
Quoted from "shopguy;472117"
Thought I'd post this over here too, as a simple option for those that don't want to install another addon. The fastest/easiest fix for DIYCE, in my opinion, is to just rename your function name. For example, if your DIYCE file currently has:
Just change the first line from:
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15function ScoutWarriorKill(arg1) local Skill = {} local i = 0 local focus = UnitMana("player") local a1,a2,a3,a4,a5,ASon = GetActionInfo(9) i=i+1; Skill[i] = { name = "Vampire Arrows", use = (focus >= 20) } i=i+1; Skill[i] = { name = "Autoshot", use = (not ASon) } i=i+1; Skill[i] = { name = "Combo Shot", use = (true) } i=i+1; Skill[i] = { name = "Reflected Shot", use = (true) } 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 = "Snipe", use = (true) } i=i+1; Skill[i] = { name = "Shot", use = (true) } MyCombat(Skill,arg1) end
function ScoutWarriorKill(arg1)
to:
function ToggleSheath()
Then go in to the game key bindings (don't need an addon for this), just press ESC and select "Key Bindings" from the menu, and set whatever hotkey you want for the "Draw Weapon" binding. I set my to the #1 key on my keyboard, for example, so now pressing #1 runs my DIYCE like always.
Since you figured out how to copy/paste your DIYCE function in the first place, everyone that could do that should be able to rename it without problems.
This works because "ToggleSheath" is the game function that is called when you use the Draw Weapon hotkey, and if a function is also found in any LUA (addon) file, that function will be called instead of the game function. Every key binding has a function that you can override the same way, if you prefer to override some other action that you don't use.
For the "official" DIYCE fix, I would recommend that the default DIYCE include one of these system functions, that in turn calls another function (that people can override as needed), and then part of the setup is to just map a key to whatever function you decide to override. There is a function for pressing each hotbar icon also, so I guess you could even just override that, if you assume that everyone wants to use the same hotbar icon -- probably not safe to assume. Along with that, you could make other DIYCE functions that are callable from macros (don't use any of the disabled functions like UseAction) that update global variables, that just tell the main function what to do when the hotkey is pressed (like for the current debug info you can have spit out, instead would need to be a function that sets debug mode).
Quoted from "ghostwolf82;473701"
@ezekial69 - Are you currently using EAB to run your macros? If not, install it and place your macro into this action bar, and set your hotkey for it. Macros to run DIYCE are currently not operable in game.
Quoted from "ezekial69;474006"
Ghost ive tried that... My attacks still dont work tho. Was hoping it was something I put in the code that was wrong ><
Quoted from "ghostwolf82;474100"
I see no inherent errors in the code as you posted it, and since you have tried it with eab, (process of elimination going on is what this is) did you make sure your macro was /run PriestMage()? (Spelled exactly as you have it in code - capitals as well?) No errors at all pop up next to the minimap? Nothing at all happens when you press the macro key in eab? Did you double check the buff/debuff names for the skills you wish to use?
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
function PriestMage(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local phealth = PctH("player")
local thealth = PctH("target")
local health, buffs
if friendly then
health = thealth
buffs = tbuffs
else
health = phealth
buffs = pbuffs
end
i=i+1; Skill[i] = { name = "Blessed Spring Water", use = ((not combat) and (not string.find(pbuffs,"Blessed Spring Water"))) }
i=i+1; Skill[i] = { name = "Magic Barrier", use = ((not combat) and (not string.find(pbuffs,"Magic Barrier"))) }
i=i+1; Skill[i] = { name = "Grace of Life", use = ((not combat) and (not string.find(pbuffs,"Grace of Life"))) }
i=i+1; Skill[i] = { name = "Holy Aura", use = (phealth <= .30) }
i=i+1; Skill[i] = { name = "Regenerate", use = ((health <= .90) and (not string.find(buffs, "Regenerate"))) }
i=i+1; Skill[i] = { name = "Urgent Heal", use = (health <= .65) }
i=i+1; Skill[i] = { name = "Bone Chill", use = ((not friendly) and (not string.find(tbuffs, "Bone Chill"))) }
i=i+1; Skill[i] = { name = "Lightning", use = ((not friendly) and (not string.find(tbuffs, "Lightning Rod"))) }
i=i+1; Skill[i] = { name = "Icewind Blade", use = (not friendly) }
i=i+1; Skill[i] = { name = "Fireball", use = (not friendly) }
i=i+1; Skill[i] = { name = "Rising Tide", use = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted from "imapayne1;475623"
hello..
im realy interested in this diyce BUT im so bad on making macros im like a granny that still think that macros is the devil =).
so i was woundering if anyone could help me whit a macro to a r/s for fighting and buffing ?
im realy sry if i seam lazy but i do realy suck on macros =/
Quoted from "ghostwolf82;475735"
Sekrit, you have run into the same problem many have, including myself. The best answer for you would be to look to Sixpaxs party healer. Look at his code for how to set a timer against your own buffs, and determine if the correct time has passed since the last time you cast your spell. If the time is different, it is not your buff, so cast it again.