Now that I added the "Download Offsets" button I've actually decided to do a few more things with downloading updates.
I'm actually writing an update PQR application, that if/when you run it, goes and downloads the latest exe... hopefully that should reduce the burdens of updating.
I'm also giving profile developers the ability to use a "Download Update" button. If you click Download Updates it will download the two XMLs, prompt the user with the current version as well as the downloaded version, and give the user the option to accept the XMLs or not. Quick preview:
![]()
Last edited by Xelper; 03-15-2012 at 07:43 PM.
Is this bannable to use?
I edited this to test on my Pally, and made the change I recommended and it worked beautiful Mentally <3Code:local myTable = { "Twilight Assault Drake", "Twilight Assassin", "Raider's Training Dummy", "Arm Tentacle", "Wing Tentacle", "Mutated Corruption", "Mana Void", "Elementium Bolt", "Burning Tendons", "Warmaster Blackhorn", "Goriona" } for i=1,#myTable do if not UnitExists("target") then RunMacroText("/tar "..myTable[i]) else if IsSpellInRange(GetSpellInfo(20271), "target") == 1 and not UnitIsDeadOrGhost("target") -- Can't have this enabled to test Dummies and UnitCanAttack("player","target") and not PQR_IsOutOfSight("target", 1) then return false else RunMacroText("/cleartarget") end end end
Wonderful Mentally I wish i could rep you more lol (Anyone willing to rep her for me?)
Here's Mentally's idea in the form of auto Focusing Targets
Code:local myTable = { "Twilight Assault Drake", "Twilight Assassin", "Raider's Training Dummy", "Arm Tentacle", "Wing Tentacle", "Mutated Corruption", "Mana Void", "Elementium Bolt", "Burning Tendons", "Warmaster Blackhorn", "Goriona" } for i=1,#myTable do if not UnitExists("focus") then RunMacroText("/tar "..myTable[i]) if UnitExists("target") and UnitName("target") == myTable[i] then RunMacroText("/focus") TargetLastTarget() end else if IsSpellInRange(GetSpellInfo(20271), "focus") == 1 and not UnitIsDeadOrGhost("focus") -- Can't have this enabled to test Dummies and UnitCanAttack("player","focus") and not PQR_IsOutOfSight("focus", 1) then return false else RunMacroText("/clearfocus") end end end
ok i figured out the timer code and i'm going to share it
notes:
put it after a pause ability
it does throw an error when turning it on. something about a nil compared to a number. if you find the fix let me know as i'm working on it now.
it does take a half sec to get the calc going so it may delay casting something.
I hope this helps with timing things. and give rep where due.Code:if TTD_loaded == nil and UnitAffectingCombat("player") ~= nil then PQ_TimeA = GetTime() PQ_LifeStart = UnitHealth("target") PQ_LifeMax = UnitHealthMax("target") TTD_loaded = 1 elseif TTD_loaded == 1 and UnitAffectingCombat("player") == nil then PQ_TimeA = nil PQ_LifeStart = nil PQ_LifeMax = nil TTD_loaded = nil -- set PQ_CalcTime to something other than zero to stop delays PQ_CalcTime = 0 end if TTD_loaded then PQ_TimeDiff = GetTime() - PQ_TimeA PQ_HPDiff = PQ_LifeStart - UnitHealth("target") if PQ_HPDiff > 0 then PQ_FullTime = (PQ_TimeDiff * PQ_LifeMax)/PQ_HPDiff PQ_PastFullTime = (PQ_LifeMax - PQ_LifeMax) * PQ_TimeDiff/ PQ_HPDiff PQ_CalcTime = PQ_TimeA - PQ_PastFullTime + PQ_FullTime - GetTime() end end --here i set Hunter's mark (ALLHM) to 1 if the TTD is greater than 21 secs if PQ_CalcTime >= 21 then ALLHM = 1 else ALLHM = nil end --under the hunters mark ability its if unitdebuff("target", 1130) == nil and ALLHM then return true end
just a few tips to clarify previously made or not made clear enough and to explain why this piece of code would not even function correctly:
This is useless, a waste of cpu cycles.Code:local BleedDebuff = BleedDebuff
Dont declare the local table inside the function, declare it outside of the function, your pointlessly creating a new local variable and table every time you call the function....
this statement will cause the function to only ever check for Hemorrhage, as your returning false if the buff isn't active thus breaking out of the function and never testing for the other bleedsCode:if UnitDebuffID(t,Bleeds[i]) then return true else return false end
basically this is how it would want to be written for performance and clarity:
this would want to be placed in the first ability of the rotation named for example RotationConstantsCode:if not 'name'_Constants then local Bleeds = { 16511, -- Rogue, Hemorrhage 33876, -- Druid, Cat: Mangle 33878, -- Druid, Bear: Mangle 35290, -- Hunter Pet: Gore 46857, -- Warrior, Trauma 50271, -- Hunter Pet: Tendon Rip 57386, -- Hunter Pet: Stampede } function PQ_BleedDebuff(unit) for i=1,#Bleeds do if UnitDebuffID(unit,Bleeds[i]) then return true end end return false end 'name'_Constants = true end
'name'_Constants: substitute this for example with the name of your rotation, anything unique , for example: MyCombatRogue_Constants
this is where you would define all other functions used by your rotation as well, in the same format
Of-course this could be declared in the on pqr load script xelper has added in 2.0 and not the rotation itself.
Omg I can't give anyone any rep. Every profile writer that I use and some that I don't all need to have rep spread before I can re-rep :| Sorry bubba I tried to give rep to mentally but the silly website won't let me
The Wiki for the amazing PQRotation Bot <= Information and Profiles
All profiles available brought to you by Ralphiuss So please give him some rep when you see him around if you find this helpful!
diesall, thanks for the improvements! Sorry I butchered it the first time.
You also touched on a question I had regarding the LUA script loader - I wasn't sure what could and could not be used in there. Anything that could be used in PQR? It would be great if I could make the new profiles I'm working on more flexible, or could share class-related code for different specs.