|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Poison Protection", ['use'] = (string.find(pbuffs,"poison")) }
|
Quoted from "Tigsman;277819"
@Six, is there a way to call up the skill table and see the names of the skills in it?
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
function TableShow(tbl, indent)
indent = indent or 0
for key,value in pairs(tbl) do
if type(value) == "table" then
Msg(string.rep(" ", indent)..tostring(key).." : (table)")
TableShow(value, indent+3)
else
Msg(string.rep(" ", indent)..tostring(key).." = "..tostring(value))
end
end
end
|
|
|
Source code |
1 |
/run TableShow(g_skill) |
Quoted from "Archime;277086"
Is there a problem with adding set skills to the script? i cant seem to get mine to work and i have no trouble with any of my other stuff. it says that the skill was not available. if anyone has added set skills and had no problems just let me know. thanks in advance.![]()
Quoted from "dharleyman;278208"
Hey Tig,
Regarding your W/K engine,
I think you need to add "Slash" after "Tactical Attack" to get the bleed affect. Also, I added "Survival Instinct" to the rotation for those Oh-No situations.
|
|
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 |
function WardenDruid(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")/UnitMaxMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pet = UnitExists("playerpet")
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local dbuffs = DebuffList("player")
local combat = GetPlayerCombatState()
-- if pet then
-- if (PctH("playerpet") <= 0.40) and CD("Recover") then
-- if UnitExists("target") then
-- FocusUnit(1,"target")
-- TargetUnit("playerpet")
-- CastSpellByName("Recover")
-- TargetUnit("focus1")
-- FocusUnit(1,"")
-- return
--
-- else
-- TargetUnit("playerpet")
-- CastSpellByName("Recover")
-- return
--
-- end
i=i+1; Skill[i] = { ['name'] = "Elven Amulet", ['use'] = ((not friendly) and (PctH("player") <=.25) and (not string.find(pbuffs,"Elven Amulet"))) }
i=i+1; Skill[i] = { ['name'] = "Mother Earth's Protection", ['use'] = ((not friendly) and (PctH("player") <=.20) and (not string.find(pbuffs,"Mother Earth's Protection"))) }
i=i+1; Skill[i] = { ['name'] = "Mother Earth's Protection", ['use'] = ((friendly) and (PctH("target") <=.20) and (not string.find(tbuffs,"Mother Earth's Protection"))) }
i=i+1; Skill[i] = { ['name'] = "Damage Transfer", ['use'] = ((not friendly) and (PctH("player") <=.15)) }
i=i+1; Skill[i] = { ['name'] = "Antidote", ['use'] = (string.find(dbuffs,"Poisoned")) }
i=i+1; Skill[i] = { ['name'] = "Elven Guidance", ['use'] = ((not friendly) and (PctM("player") <=.40)) }
i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = (not pet) and (not string.find(pbuffs,"Heart of the Oak") and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Heart of the Oak", ['use'] = (not string.find(pbuffs,"Heart of the Oak")) }
i=i+1; Skill[i] = { ['name'] = "Earth Spirit Essence", ['use'] = (not string.find(pbuffs,"Earth Spirit Essence") and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not string.find(pbuffs,"Briar Shield") and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Savage Blessing", ['use'] = (not string.find(pbuffs,"Savage Blessing")) }
i=i+1; Skill[i] = { ['name'] = "Savage Blessing", ['use'] = (friendly and (not string.find(tbuffs,"Savage Blessing"))) }
i=i+1; Skill[i] = { ['name'] = "Recover", ['use'] = ((not friendly) and (PctH("player") <= .70) and (not string.find(pbuffs,"Recover"))) }
i=i+1; Skill[i] = { ['name'] = "Recover", ['use'] = (friendly and (PctH("target") <= .70) and (not string.find(tbuffs,"Recover"))) }
i=i+1; Skill[i] = { ['name'] = "Thorny Vine", ['use'] = ((not friendly) and (not string.find(tbuffs,"Thorny Vine"))) }
i=i+1; Skill[i] = { ['name'] = "Charged Chop", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Power of the Wood Spirit", ['use'] = (not friendly) }
-- Posible use in arg2 for multiple mob situations
-- i=i+1; Skill[i] = { ['name'] = "Cross Chop", ['use'] = (not friendly)}
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { "name" = "Power of the Wood Spirit", "use" = ((not friendly) and (arg2=="pet")) }
|
|
|
Source code |
1 2 3 |
local pressShift = IsShiftKeyDown()
i=i+1; Skill[i] { name = "Summon Spirit of the Oak", use = (pressShift and (not combat)) }
|
Quoted from "redcrux;278052"
unfortunately that won't work, the item set skills are not used from the gear, you unlock the skill and you don't actually have to wear the gear to use the skill.
the only thing i can think of is that once you get the set skill you can drag it to a hot bar slot, then have the macro call the hot bar slot to use it (which for some reason i don't think is possible?)
until someone figures out the new interface... at the moment you cant even call up the set skill window from a hot key and you cant shift-click to put the set skills into chat links
Quoted from "Pagn93;278249"
Edit: Had some syntax errors with the first version. Also could not get the pet heal if-then statement to work properly...it seemed to get caught in a loop and would not execute the rest of the script; it require another closing statement that appears to cause a fall-through.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
if pet then
if (PctH("playerpet") <= 0.40) and CD("Recover") then
if UnitExists("target") then
FocusUnit(1,"target")
TargetUnit("playerpet")
CastSpellByName("Recover")
TargetUnit("focus1")
FocusUnit(1,"")
return
else
TargetUnit("playerpet")
CastSpellByName("Recover")
return
end
end
end
|
Quoted from "Sixpax;278762"
You're missing two closing "end" statements for the pet heal part.
I kept trying to slip it in at the bottom of the lua file.
Quoted from "mrmarc0001;278560"
Does SotO appear in your list of buffs? I deleted my warden long ago, so I can't recall off the top of my head. If so, then your entry in your function should work.
Quoted from "Pagn93;278807"
I need to figure out RoM's API for identifying no pet, pet exist (pet=SotO/Oak Walker/Nature Crystal). Could make some nice if-then statements with that.
|
|
Source code |
1 2 3 |
if (not UnitExists("playerpet")) then
Msg("I have no pet!!")
end
|
|
|
Source code |
1 |
/run local petname = UnitName("playerpet"); Msg("My pet is: "..tostring(petname))
|
Quoted from "Sixpax;279052"
Well the the "no pet" part is easy:
For the type of pet, when it exists, try this from a macro:
![]()
Source code
1 2 3if (not UnitExists("playerpet")) then Msg("I have no pet!!") end
![]()
Source code
1/run local petname = UnitName("playerpet"); Msg("My pet is: "..tostring(petname))
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function OakHeart(arg1)
local Skill = {}
local i = 0
local pet = UnitExists("playerpet")
local pbuffs = BuffList("player")
local combat = GetPlayerCombatState()
local petname = UnitName("playerpet")
i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((not pet) or (not string.find(petname,"Spirit of the Oak")) and (not string.find(pbuffs,"Heart of the Oak")) and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Heart of the Oak", ['use'] = ((not combat) and (string.find(petname,"Spirit of the Oak")) and (not string.find(pbuffs,"Heart of the Oak"))) }
MyCombat(Skill,arg1)
end
|
Quoted from "Pagn93;279083"
So essentially, after defining the petname variable, I could write in:
Not quite sure if the petname variable is being used correctly, if it is I'm worried about returning a nil value on petname in the HotO line...give it a shot
![]()
Source code
1 2i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((not pet) or (not string.find(petname,"Spirit of the Oak") and (not string.find(pbuffs,"Heart of the Oak") and (not combat)) } i=i+1; Skill[i] = { ['name'] = "Heart of the Oak", ['use'] = ((not combat) and (petname,"Spirit of the Oak") and (not string.find(pbuffs,"Heart of the Oak"))) }
|
|
Source code |
1 2 3 4 |
local petname = tostring(UnitName("playerpet"))
i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((petname ~= "Spirit of the Oak") and (not string.find(pbuffs,"Heart of the Oak")) and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Heart of the Oak", ['use'] = ((not combat) and (petname == "Spirit of the Oak") and (not string.find(pbuffs,"Heart of the Oak"))) }
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function OakHeart(arg1)
local Skill = {}
local i = 0
local pet = UnitExists("playerpet")
local pbuffs = BuffList("player")
local combat = GetPlayerCombatState()
local petname = UnitName("playerpet")
i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((not pet) and (not string.find(pbuffs,"Heart of the Oak")) and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((pet) and (not string.find(petname,"Spirit of the Oak")) and (not string.find(pbuffs,"Heart of the Oak")) and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Heart of the Oak", ['use'] = ((not combat) and (pet) and (string.find(petname,"Spirit of the Oak")) and (not string.find(pbuffs,"Heart of the Oak"))) }
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 23 24 25 26 27 28 |
function SpiritResummon(arg1)
local Skill = {}
local pet = UnitExists("playerpet")
local combat = GetPlayerCombatState()
local petname = UnitName("playerpet")
local pspell,ptime,pelapsed = UnitCastingTime("target")
if pet then
if (PctH("playerpet") <= 0.40) and (string.find(petname,"Spirit of the Oak")) then
if (combat) then
if (pspell == nil) and (PctM("player") >= 0.15) then CastSpellByName("Summon Spirit of the Oak")
else
if (ptime > 3.0) and (ptime - pelapsed <= 3.0) then
UsePetAction(7)
return
else
if (PctH("playerpet") >0.40) then
UsePetAction(7)
UsePetAction(6)
return
end
end
end
end
end
end
MyCombat(Skill,arg1)
end
|