I guessed that, but wonder if have something to do wth people getting execution errors with some addons or error comes from another source.![]()
Last edited by Helen536; 12-17-2012 at 02:24 AM.
@scyrnn: A little bit more information would be awesome. Make sure the Data file is in the Data folder and such.
So this is what I have so far....honestly I am not sure if im even doing this correctly as an ability for Symbiosis (Never done multiple spells within 1 ability before)
Please feel free to critique, as Im trying to polish this up.
Still adding more as time permits, to eventually have this complete for all classes/specsPHP Code:
local _, playerClass = UnitClass("player")
local catForm = UnitBuffID("player", 768)
local unitguid = (UnitGUID("target") or 0)
local EnemyHP = 100 * UnitHealth("target") / UnitHealthMax("target")
local PlayerHP = 100 * UnitHealth("player") / UnitHealthMax("player")
if playerClass == "DRUID" then
-- The Following 5 spells are for Feral Druids:
if catForm ~= nil then
-- Feral Spirit Wolves (From Shaman)
if IsSpellKnown(110807) and UnitBuffID("Player",108381) and GetSpellCooldown(110807) == 0 then
CastSpellByName(tostring(GetSpellInfo(110807)))
-- Soul Swap (From Warlocks)
elseif IsSpellKnown(110810) then
if unitguid ~= UnitGUID("target") then
unitguid = UnitGUID("target")
if EnemyHP > 25 and (not UnitDebuffID("target",1822) or not UnitDebuffID("target",1079)) and
GetSpellCooldown(110810) == 0 then
CastSpellByName(tostring(GetSpellInfo(110810)))
return true
elseif unitguid == nil then
return false
end
-- Redirect (From Rogues)
-- if IsSpellKnown(110730)
-- Death Coil (From Deathknights)
-- if IsSpellKnown(122282)
-- Shattering Blow (From Warriors)
-- if IsSpellKnown(112997)
-- Divine Shield (From Paladins)
-- if IsSpellKnown(110700)
thanks!
-GB
** Edit 2 - IsSpellKnown does not work with SYmbiosis for the record. It simply locks up the entire profile. GetSpellInfo works fine.
Last edited by googlebee; 12-18-2012 at 06:40 AM. Reason: IsSpellKnown doesnt work for Symbiosis
gona test it out
Now I could be completely wrong, but as long as you record what class you put it on, shouldn't you still be able to just go, if SavedClass == "ROGUE" then .... elseif SavedClass == "DEATHKNIGHT" then ... end
and just use the base spellid with CastSpellByName?
seems simpler that way. Was thinking about undertaking this project soon myself, but there's no way i would ever automate who it goes to haha
your way may be better for if they cast is with the profile off tho
And for something like this.... IsPlayerSpell should definitely be used, IsSpellKnown is how you find the base spellid, IsPlayerSpell triggers true on morphed as well.
@googlebee: UnitGUID("target") will always return nil (never 0) if you do not have a target, unless you use:
local targetGUID = UnitGUID("target") or 0
if targetGUID == 0 then
--we have no target
end
however that is also identical to:
local targetGUID = UnitGUID("target")
if targetGUID == nil then
--we have no target
end
For the Symbiosis question, you can probably do something like this:
Obviously this is not all you need, you need to make sure the spell is off CD, etc... but it should at least get you close to be able to detect what class and what spell ID to use... and how to use it.
Code:local playerSymb = UnitBuffID("player", 110309) if PQ_SymbUnit == nil then PQ_SymbUnit = "" end local unitSymb = UnitBuffID(PQ_SymbUnit, 110309, "PLAYER") if playerSymb ~= nil and unitSymb == nil then for i=1,40 do local unitCheck = "raid"..i if UnitExists(unitCheck) then local symbiosis = UnitBuffID(unitCheck, 110309, "PLAYER") if symbiosis then PQ_SymbUnit = unitCheck break end end end end if UnitExists(PQ_SymbUnit) then local _, unitClass = UnitClass(PQ_SymbUnit) if unitClass == "PALADIN" then PQ_SymbSpellID = Spell ID here else if targetClass == "PRIEST" then PQ_SymbSpellID = Spell ID here end CastSpellByName(GetSpellInfo(PQ_SymbSpellID)) end
Last edited by Xelper; 12-17-2012 at 12:40 PM.
try sheuron's old 4.3.4 profile and also blinded's old pve profile ( i switch between those two because sheurons has more survive ability and cc and blinded has the insane burst down) so if your with a healer go blinded if your goin with a dps go sheuron's
Ps: if you cant find it in the old posts i can try to .rar mine and upload it
tyvm for clearing that up Xelper, and Bu_.
The Code you linked above Xelper looks as if your also automating casting of Symbiosis on a player, which I do not want to do. There are plenty of adons to help people with casting Symbiosis. I only want to automate the use of said symbiosis spell under said conditions.
I guess my confusion still lies within GUID. When you say we have no target, ( if targetGUID == 0 or Nil ) you mean there is no target selected yes? What also needs to be checked is if there was a previous target after we have selected a new target. hence the automation of Soul Swap being triggered. I dont want Soul Swap to trigger if i have a target with no previous target. If that makes sense.
The reason for using Soul Swap is to reapply the existing Rake and Rip from your previous target to your new one. So naturally if i was to engage a boss and have it as a *Target* I dont want Soul Swap to trigger at that point unless of course i had Rake and Rip on a previous target prior to having the boss targetted.
The only way I can see this working is by using Focus, once you have switched target, and target is not Focus, check focus for Rake and Rip, if present - cast Soul Swap on new target. The problem is this is a one way trip. It would be nice to be able to use it both ways. But unless your updating your focus after each Soul Swap is triggered....hmm. Perhaps that could work? Is it possible to have PQR Set a target to Focus after an action?
-GB
is there a prot pally profile knocking about?![]()
http://www.ownedcore.com/forums/worl...9012012-a.html ([PQR] List of Community Rotations - Updated 09012012)
Nudex has a decent one . Haven't tried Avery's
FocusUnit()
To impliment smartcasting of soulswap you will need to parse combatlog events,no other way so far,or atleast others are even more complicated.If not then just use soulswap from target to focus if you have focus or soulswap on target if no focus and have soulswap buff.
Last edited by Valma; 12-18-2012 at 02:46 AM.
MEDVED+VODKA+BALALAYKA