You can use a ingame addon ''PQInterface''
You can use a ingame addon ''PQInterface''
Is there any good guides out there for someone who wants to learn how to make their own profiles and have no previous experience with coding?
Cheers
Edit: Been reading up on the basics from this site (http://pqrotation.wikia.com/wiki/Profile_Writing_Basics) but I still wonder what certain things mean.
Like this:
local _, BlackArrowCD = GetSpellCooldown(3674)
if IsSpellInRange(GetSpellInfo(3044), "target") ~= 1 or IsLeftShiftKeyDown() then return false end
F_SwitchToHawk()
-- use if you do not have 2t13
--if BlackArrowCD < 5 and UnitPower("player") > 80 then return true end
--if BlackArrowCD > 5 and UnitPower("player") > 60 then return true end
if UnitPower("player") > 60 then return true end
I understand that it will cast black arrow if all of the above is correct, but what does the "~= 1" mean? and I see alot of "(1)" aswell.
Last edited by Mpzor; 07-11-2012 at 03:04 PM.
~=1 means not equal to 1
==1 means equal to 1
so its saying
save variable locally (aka just this ability) placeholder(the _ ) and name the second call BlackArrowCD but use GetSpellCooldown(id) to set the info i need when i need it.
if spellinrange(lookupaspell, current target) returns 0(aka out of range) or if the left shift key is down then skip this ability
F_SwitchToHawk() is a custom function for switching from fox to hawk and back
Please if someone helped you donate rep to them.
Thank youBut i'm still abit confused, why is the "~= 1" even there? I mean, why dont just leave it out? Or does it have to be there so that the program will know to skip it if it doesnt return as...? Now im confused again :P Why 1? Does 1 mean that its in range? Might have something with me being realy tired after working a double shift so I might feel stupid when I wake up
![]()
its ok take your time with it.
1 is the same to saying 'true' and 0 is the same as saying 'false'
both these statements will do the same thing
heres the switch if the buff is there or true:Code:if not UnitBuffID("player", someid) then return true end if UnitBuffID("player", someid) ~= 1 then return true end
---------------------------Code:if UnitBuffID("player", someid) == 1 then return false end if UnitBuffID("player", someid) then return false end
if you need to count stacks of a debuff/buff you need to use the call for stacks.
this is the webpage for UnitBuff and Debuff
UnitBuff - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
http://wowprogramming.com/docs/api/UnitDebuff
so if you want say stop casting at 5 stacks of something it will look like this
Code:-- I'm using select to pick the call of the api I want to use instead of using local _,_,_,count,_,_, timeleft = UnitBuffID("target", somespellid) -- both ways are valid and its up to you local count = select(4, UnitBuffID("target", somespellid)) local timeleft = select(7, UnitBuffID("target", somespellid)) if not timeleft then return true else if timeleft - GetTime() > 2 then if count < 4 then return true end end end
Last edited by crystal_tech; 07-11-2012 at 04:09 PM.
Please if someone helped you donate rep to them.
Alright, no hard feelings
I figured something out already. I check the expiration time of rip on the target, and whenever the expiration time changes, i check how many combopoints are active on the target. If the # of CP is 0, I assume rip was refreshed with rip or fericous bite, and reset the shredcounter to 0. If the # of CP is not 0, the rip was extended through GoBL and thus shredcounter is increased by 1.
Testing it atm and looks very promising![]()
Is this correct?
Can I just do this instead?Code:local artOfWar = UnitBuffID("player", 87138) local crusaderStrike = GetSpellInfo(35395) local undead = UnitCreatureType("target") == "Undead local demon = UnitCreatureType("target") == "Demon" local outOfRange = IsSpellInRange(crusaderStrike, "target") == 0 if artOfWar == nil then return false end if artOfWar ~= nil and undead or demon else if artOfWar ~= nil and outOfRange and undead or demon then return true end end
Code:--WIll this always return true if no value is given? if artOfWar then return false end
edit: I want it like this, but I am not sure if it will work.
If anyone wants to give the above a go the spell code is 879.Code:local artOfWar = UnitBuffID("player", 87138) local crusaderStrike = GetSpellInfo(35395) local undead = UnitCreatureType("target") == "Undead" local demon = UnitCreatureType("target") == "Demon" local outOfRange = IsSpellInRange(crusaderStrike, "target") == 0 if artOfWar == nil then return false else if outOfRange artOfWar ~= nil and undead or demon then return true else if artOfWar ~= nil and undead or demon then return true else if outOfRange and artOfWar ~= nil then return true else if artOfWar ~= nil then return true end end end end end
This is not ideal because undead is higher up in the ret rotation.
Undead
Code:if artOfWar == nil then return false else if outOfRange and artOfWar ~= nil and undead or demon return true else if artOfWar ~= nil and undead or demon then return true end end end
Last edited by averykey; 07-11-2012 at 06:26 PM.
My Svn - https://subversion.assembla.com/svn/averykeys-svn/
Give:
A whirl and let me know how it goes. The way you had it just made it look more complicated than it shouldCode:local artOfWar = UnitBuffID("Player", 87138) local crusaderStrike = GetSpellInfo(35395) local undead = UnitCreatureType("Target") == "Undead" local demon = UnitCreatureType("Target") == "Demon" local outOfRange = IsSpellInRange(crusaderStrike, "Target") == 0 if artOfWar == nil then return false elseif outOfRange and artOfWar ~= nil and (undead or demon) then return true elseif artOfWar ~= nil and (undead or demon) then return true elseif outOfRange and artOfWar ~= nil and (undead or demon) then return true elseif outOfRange and artOfWar ~= nil then return true elseif artOfWar ~= nil then return true end![]()