Quoted from "Sixpax;256978"
You're exactly right. I missed a closing paren. That line should read:
I updated the code where I first posted this as well.
![]()
Source code
1elseif (health <= .90) and (not ChkBuff("player", "Regenerate")) then
Good catch.
Quoted from "Ryum;257631"
I think the problem with that is that if you want to use any other heals, if Regen is above ANY of the other heals that do have a HP check or any other check then it will just keep casting regen since there is nothing to disqualify it and move the engine on to another spell
Quoted from "Ryum;257631"
If there is something like where the eng can create a self made cooldown where it won't try to use it again til after X seconds that could work.
That's all I can think of, and not sure that is even possible.
Quoted from "smoopid;257658"
This one is a little too complicated for me to work out so hopefully someone can help.
I have this to cast my instants.
function Instants(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Fireball", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Rising Tide", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
I need to add Pheonix to this but I need to it only cast if the target is within range. The range is 120 and if I dont use it at the right time can make the spell useless.
Could someone add a range check for me please ?
Quoted from "deadatzero;257926"
Hello i need some help with this
I have a scout / warden and i was wondering if anyone knows how to make it so it will cast snipe when i have the Hidden Peril buff active
I tried (chkBuff("player","Hidden Peril")) } but that did not work, and actually made the whole macro not work, it would do nothing just sit there like i did not ever press the button.
thanks in advance
Quoted from "Sixpax;257685"
Interesting idea and I have come across some situations where that would be helpful. Let me see what I can come up with.
Quoted from "bobhica;257932"
Hi, was wondering if anyone might have a solution to the problem I described in post #218 in regards to the W/R function. Someone gave an answer to #3 but I haven't had a chance to test it yet. My main concern was #1 though. Any ideas?
Quoted from "delve;257265"
Here's a stupid question that I've probably missed somewhere.
Is there a way to query the mana cost of a spell? For example, at lvl 15 Fireball costs 72 mana, but at level 16 it costs 75.
How can I get this number so that hypothetically I can configure the script to only cast Fireball when I have enough mana to still cast Heal twice afterward? As in the following...
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Fireball", ['use'] = ( (not friendly) and (mana >=(Healcost*2 + Fireballcost)) ) }
Quoted from "redcrux;258359"
Yes, as a Scout this would be VERY useful, as many of our spells don't have cooldowns (or very short ones) it would give better control over skill rotation. for example, if i put wind arrow above shot, then shot will never be used, but if i put shot above wind arrow, then wind arrow is rarely used. a cooldown system would allow shot and windarrow to be alternated![]()
Quoted from "Sixpax;258426"
There's no way I know of to query the mana cost of a spell. The best you could do is write your own code to return the mana cost based on the TP level of the spell, but you'd have to define all the values for starting and incremental mana costs for each spell.
Quoted from "Sixpax;258409"
Sorry about that, I missed that post. Try swapping the Keen Attack and Open Flank lines. That way it will put Keen Attack at a higher priority than Open Flank.
As far as the rage potions, it's probably best just to do those manually because using them is very situational.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function WarriorRogue(arg1)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player", "target"))
local rage = UnitMana("player")
local energy = UnitSkill("player")
local combat = GetPlayerCombatState()
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Survival Instinct", ['use'] = (PctH("player") < .25) }
i=i+1; Skill[i] = { ['name'] = "Enraged", ['use'] = (rage < 50) }
i=i+1; Skill[i] = { ['name'] = "Splitting Chop", ['use'] = ((not friendly) and (rage >= 15) and (string.find(tbuffs,"Weakened"))) }
i=i+1; Skill[i] = { ['name'] = "Open Flank", ['use'] = ((not friendly) and (rage >= 10) and (string.find(tbuffs,"Vulnerable")) and CD("Splitting Chop")) }
i=i+1; Skill[i] = { ['name'] = "Keen Attack", ['use'] = ((not friendly) and (energy >= 20) and (string.find(tbuffs,"Vulnerable"))) }
i=i+1; Skill[i] = { ['name'] = "Probing Attack", ['use'] = ((not friendly) and (rage >= 20)) }
i=i+1; Skill[i] = { ['name'] = "Blood Dance", ['use'] = ((not friendly) and (PctH("player") >= 0.8)) }
i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = ((not friendly) and (rage >= 40)) }
i=i+1; Skill[i] = { ['name'] = "Shadowstab", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
|
|
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 ScoutRogue(arg1, arg2)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local energy = UnitSkill("player")
local tbuffs = BuffList("target")
local friendly = (not UnitCanAttack("player","target"))
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (PctH("target") >= .75)) }
i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
-- 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'] = "Blind Stab", ['use'] = ((not friendly) and (energy >=35) and (not string.find(tbuffs,"Blind") and (arg2 == "melee"))) }
-- i=i+1; Skill[i] = { ['name'] = "Shadowstab", ['use'] = ((not friendly) and (energy >=35) and (not string.find(tbuffs,"Bleed") and (arg2 == "melee"))) }
i=i+1; Skill[i] = { ['name'] = "Weak Spot", ['use'] = ((not friendly) and (focus >= 30)) }
-- i=i+1; Skill[i] = { ['name'] = "Sapping Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
-- i=i+1; Skill[i] = { ['name'] = "Snipe", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|