My Frost/Unholy DK WoL ranking edits(4.3) and crystals Hunter Beta profiles-
https://imdasandmandeathknight.googl...com/svn/trunk/
here is some basic functions i have started to use.
Code:--------------------------------- ---------- Buff Checks ---------- --------------------------------- --Has Buff function PQ_hasBuff(buff) if UnitBuffID("player",buff) then return true end end --Time Remaining function PQ_Btr(buff) local name,_,_,_,_,_,expiration = UnitBuffID("player",buff); if not name then return 0 end return (expiration - GetTime()); end --Stack Count function PQ_Bstack(buff) local name,_,_,count = UnitBuffID("player",buff); if not name then return 0 end return count end --------------------------------- --------- Debuff Checks --------- --------------------------------- --Has Debuff function PQ_hasDebuff(debuff) local rank = select(2,UnitDebuffID("target",debuff)); if not rank then return false end if not UnitDebuffID("target",debuff,rank,"PLAYER") then return false else return true end; end --Debuff on Target function PQ_Debuff(debuff) if not UnitDebuffID("target",debuff) then return false else return true end; end --Time Remaining function PQ_Dbtr(debuff) local rank = select(2,UnitDebuffID("target",debuff)); if not rank then return 0 end local name,_,_,_,_,_,expiration = UnitDebuffID("target",debuff,rank,"PLAYER"); if not name then return 0 end return (expiration - GetTime()); end --Stacks function PQ_Dbstack(debuff) local rank = select(2,UnitDebuffID("target",debuff)); if not rank then return 0 end local name,_,_,count = UnitDebuffID("target",debuff,rank,"PLAYER"); if not name then return 0 end return count; end --------------------------------- -------- Spell Cooldown --------- --------------------------------- function PQ_CD(spell) local start,duration,enable = GetSpellCooldown(spell); if start == nil then return 99999 end if start == 0 then return 0; else return duration - (GetTime() - start); end end --Lust, Heroism, Time Warp, Ancient Hysteria or Bloodlust function PQ_Lust() if PQ_hasBuff(32182) or PQ_hasBuff(80353) or PQ_hasBuff(90355) or PQ_hasBuff(2825) then return true; else return false; end end
I just put out a quick update with a bugfix that translates the URL encoding characters in profile update URLs to their normal values: example: %20 to space. This way if the URL for your download update button is "Xelpers%20Interrupt%20Profile_INTERRUPT_Rotations.xml" it will save it as "Xelpers Interrupt Profile_INTERRUPT_Rotations.xml"
Just run PQR Updater from your current directory to download the fix. If you do not have the latest (and final) version of PQR Updater it is available here: (Just paste the .exe into your current PQR directory)
http://dl.dropbox.com/u/39925787/PQR.zip
Still labeled v2.0.6.
Last edited by Xelper; 03-18-2012 at 08:56 PM.
@ imdasndman love your edits plenty of ranks just tried ur new edit with added pestilence however it seems to be casting dnd not pestilence for me respect to original coders that made these possible
im done for the night - this shit is killing my brain.....had this profile working flawlessly.....copy it over to the new PQR 2.0.6 fire it up and BLAMO EHHHHH WRONG GUESS! broken...........
been at this all damn day too...god...
W T F IS WRONG!
Last edited by googlebee; 03-18-2012 at 09:58 PM.
Last edited by imdasandman; 03-18-2012 at 10:03 PM.
My Frost/Unholy DK WoL ranking edits(4.3) and crystals Hunter Beta profiles-
https://imdasandmandeathknight.googl...com/svn/trunk/
https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-bot-maps-profiles/422388-kickmydog-bm-mm-sv-hunter-profiles.html#post2793017
ok as i'm learning to use functions i'm needin some help.
i'm trying to turn the math for hp to % into a function.
what i have
am i missing anything and how would i use the function say i want it to return true if a target is below 90% would it be likeCode:function PQ_HealthPercent(pq_health) pq_health = 100 * UnitHealth("target") / UnitHealthMax("target") end
thanks for helping me.Code:if PQ_HealthPercent() <= 90 then return true end
Please if someone helped you donate rep to them.
that's the function i wrote up for my Data file. It returns Health as a %, Health as it's Actual Value. Mana as a Percent, Mana as it's Actual Value, and if your class applies, their Special PowerCode:function PQ_UnitInfo(t) --Takes an input of UnitID (player, target, pet, mouseover, etc) and gives you their most useful info local TManaActual = UnitPower(t) local TMana = 100 * UnitPower(t) / UnitPowerMax(t) local THealthActual = UnitHealth(t) local THealth = 100 * UnitHealth(t) / UnitHealthMax(t) local myClassPower = 0 local PQ_Class = select(2, UnitClass("player")) if PQ_Class == "PALADIN" then myClassPower = UnitPower("player", 9) elseif PQ_Class == "WARLOCK" then myClassPower = UnitPower("player", 7) elseif PQ_Class == "DRUID" and GetPrimaryTalentTree() == 2 then myClassPower = UnitPower("player", 8) end return THealth, THealthActual, TMana, TManaActual, myClassPower end
@Diesal
Hi I was Wondering how the PQInterface update been going?
thanks
ipass
and if you don't want to use my function i'll explain how to make one
what we put in the () comes out as unitID in our function...... hopefully that helped some in this particular exampleCode:--function [Name of the function](What variables we are sending the function to use) function PQ_HealthPercent(unitID) -- A function is meant to pretty much do code in a different part of the profile so you code looks neater and takes up less room. How we get our return value is by returning it return 100* UnitHealth(unitID) / UnitHealthMax(unitID) end -How we would use it in an ability file if PQ_HealthPercent("player") <= 90 then USE HEALTHSTONE RAWR end OR if PQ_HealthPercent("target") >= 20 then USE EXECUTE BLARGH end
localizing all your blizzard api calls used in your data file will boost performance as well, that way whenever you call your function it will be accessing localized api functions, reducing global lookup overhead.
for example....
Code:local UnitPower, UnitPowerMax, UnitHealth, UnitHealthMax, UnitClass = UnitPower, UnitPowerMax, UnitHealth, UnitHealthMax, UnitClass local GetPrimaryTalentTree = GetPrimaryTalentTree etc..... function PQ_UnitInfo(t) ... end