2.0.6 [2.0.2 -> 2.0.6 notes]
-Various fixes for efficiency.
-New "Download Offsets" button on select form when no known copies of WoW are running.
-New profile update ability added. A profile developer can supply direct download links to their profiles so that you can click "Download Updates" from the Rotation Editor and download the latest copy of the profile.
This requires a direct link, where downloading the link provides an exact copy of the XML, not a style formatted version. The links must end in the file names: Example:
-Changed default 'spell available time' to 125ms before a spell is off CD. Up from 50ms. It was 250ms in the original version. This can be changed in a profile by changing PQR_SpellAvailableTime.
-Changed default refresh rate from 100ms to 50ms.
-Added external Lua file loading. Any file in the "Data" directory named as follows: "PQR_*.lua" will be loaded into WoW when PQR starts. It should only be loaded once. If you reload UI, log off then in, etc.. it should re-inject on the next PQR start.
PQR (v2.0.0) is mainly a rewrite of PQR to improve efficency. As such, there aren't many new user features however things should run internally much better and as such use less memory.
I have switched from the .NET Framework 4.0 client profile to the full framework. If you are having issues try installing: http://www.microsoft.com/download/en/details.aspx?id=17851
IMPORTANT: If you had a profile that used "Perform Before" or "Perform After" this code will no longer function. See my notes below for the reason why I decided to remove them and for a fairly trivial way to reimplement any lost functionality.
[NEW] Folder layout has been improved. There is now an Offsets folder as well as folders for individual classes.
[NEW] Monk class support.
[NEW] Interrupt profile support.
[NEW] Anti-AFK while the PQR program is running. This can be disabled on the settings page.
[NEW] Ability editor has had an overhaul. New improved syntax highlighter.
[NEW] Multiple debug levels to make using Debug Mode easier.
None - Default level. No debug data written to chat.
Profile - ONLY "Profile" debug commands are written to chat. This should allow profile developers to use PQR_DebugP("Text") or PQR_Debug("Text here!", "Profile") to help test their profiles.
Basic - Basic workflow of the rotation is written to chat, as well as some other basic information. Also includes Profile data.
Advanced - All debug information is written to chat.
The following is for profile writers:
New Global Variables:
PQR_RotationStarted - a flag set to true when a rotation has started. This can be used to run code that should only be run once per rotation.
PQR_InterruptStarted - a flag set to true when an interrupt profile has started. Similiar to PQR_RotationStarted.
PQR_SpellAvailableTime - Default value is 0.05 (50ms.) If a spell has less than 50ms left on it's cooldown it will be considered available. This can be changed.
Updated Global Functions:
PQR_WriteToChat(text[, suffix]) - Will write to chat: <PQR[ suffix]> text.
PQR_Debug(text[, debugLevel) - Valid debug levels are: none (empty string/nil), "Profile", "Basic," and "Advanced." PQR sends no messages using the "Profile" mode, so you can use this to help in debugging your profiles.
PQR_DebugP(text) - Same as using PQR_Debug(text, "Profile")
New Global Functions:
PQR_DelayRotation(seconds) - Delays the currently running profile for X seconds (default 1).
PQR_AddToSpellDelayList(spell, item, seconds) - Delays the currently running profile for X seconds (default 1) when a player attempts and fails to use a spell or item. Resumes on sucessful cast.
Example: This can be called from an interrupt profile to allow for the use of abilities that are on GCD such as a Stun.
PQR_IsOnInterruptList(spellName) - Is an ability on either the PQR interrupt list or profile created list (PQR_AddInterrupt). Returns true/false.
PQR_AddInterrupt(spellName) - Adds a spell to the interrupt list, you should use PQR_InterruptStarted flag to only add once.
PQR_IsInterruptAll() - Is "Interrupt All Spells" checked? Returns true/false.
Reason for removal of "Perform After" and "Perform Before"
Perform After/Before was clunky, and did not do anything that you couldn't do in an ability before. There was no simple way of editing the ability and just seeing "oh this is doing something before and after" without going into the tabs for each. If someone used an ability as a template they might never know they also have possibly bad before/after code there. Or if they just copied/pasted an ability to another they might not know they are missing code.
It should be trivial to fix the affected abilities, just do this where you would 'return true':
If spell ID is not 0 and only using "Perform Before"
Example: A player is spamming Divine Shield but it is on GCD, so the bot is preventing the player from doing it. Using an ability that uses PQR_RotationStarted flag, the profile writer can add:
"PQR_AddToSpellDelayList(642, 0, 1) --Divine Shield"
The profile will pause for 1 second after a failed attempt to use Divine Shield, so the player can slightly spam the key, and automatically resume the profile once the cast has been done sucessfully or X seconds have passed.
It also works for potions:
PQR_AddToSpellDelayList(79634, 58146, 1) --Golem's Strength (Potion) (spellID, itemID, delay)
If spell ID is not 0 and using "Perform After" OR If spell ID is 0:
You must change the spell ID to 0.
--PERFORM BEFORE CODE HERE
[CHANGE] Updated PQR_IsMoving(x) - it will now work anywhere regardless of a map being present or not. Profile developers can now also change the movement reset time on a global basis. Previously it would take 1 second to be considered not moving after having been previously considered moving. You can now make it reset to not moving after having stopped moving for a shorter or longer amount of time. Add this line to an ability in your rotation:
PQR_ResetMovementTime = 0.3
This will cause the 1 second reset timer to change to 0.3 seconds. Note that this will effect your entire rotation, not just single abilities. This is reset to the 1 second default when changing rotations.
[UPDATE] No longer limited to 256 abilities combined between all rotations per class.
[BUGFIX] Fixed manual mode not displaying a message in chat.
[UPDATE] Included many profiles from the last couple weeks, sorry if I missed yours! We are now using the PQRotation wiki for sharing profiles.
I recommend that the average user does not upgrade until their favorite profiles have been updated for this version.
NOTE: To convert older profiles to new profiles you need to rename them in this format: Prefix_CLASS_Abilities.xml and Prefix_CLASS_Rotations.xml
Included Rotations (Feel free to leave feedback on the quality of included rotations):
-Death Knight by Bubba
-Hunter by kickmydog
-Paladin (Ret) by Xelper
-Paladin (Prot) by Xelper
Sheuron's Profile Pack:
-NEW: Ability Option: "Perform Before (Lua)"
-NEW: Ability Option: "Perform After (Lua)
-NEW: Rotation Option: "Rotation Notes"
-NEW: Rotation Option: "Combat Requirement"
-NEW: Allow rotations to designate combat requirement, this is the default setting.
-NEW: Lua syntax highlighter.-NEW: Multiple profiles per class.
-NEW: Ability to copy rotations, abilities and profiles.
-BUGFIX: Fixed bug with auto upgrading old profiles (using the old "Self Cast True/False") to new profiles using a Target modifier.
-BUGFIX: SetMapToCurrentZone() will now fire at profile load so that PQR_IsMoving works if the program is loaded for the first time during a boss fight.
-NEW: Now supports multiple Offsets.xml files.
-Maintenance: This build includes Offsets for 14545 (Live) and 14809. New offsets can be added simply be downloading an XML and placing it in the folder with the other Offset XML files.
-Maintenance: Drastically reduced the number of offsets that need to be updated from 18 down to 7. (Most were leftover from pre-public release builds that worked a little bit differently, but were still being used.)
-Maintenance: The injected detour and ClntObjMgrGetActivePlayerObj both use FindPattern, the latter is not yet tested with other PTR builds but it works for both live and PTR (14809), the pattern search can also be overwritten by using <ClntObjMgrGetActivePlayerObj>Value</ClntObjMgrGetActivePlayerObj> if the pattern does fail in future PTRs.
-BUGFIX: Changing instance 'floors' will no longer break PQR_IsMoving(x) function.
-NEW: 'Cancel Channel' functionality. This will allow individual abilities when flagged as 'True' to be cast while channeling a spell.
-NEW: Added F1-F12 hotkeys.
-NEW: Offsets are now stored in Offsets.xml for updating for PTR purposes. (If you know how, feel free to update them and post PTR updates! :) I have them named fairly simply, in my opinion.)
-NEW TARGET: "Custom"... you can now specify a custom target in your Lua code BEFORE returning true. This will allow you to target specific mobs not on the "Target" list by default... example: boss1, party1, etc.
PQR_CustomTarget = "boss1"
-NEW FUNCTION: PQR_IsOutOfSight([unit], [seconds]) - Returns true if a "Target not in line of sight." error has popped up for the specified unit in the last 3 seconds. Unit can be any unit (player, target, mouseover, etc.). Seconds can be any number down to 4 decimal place precision. NOTE: You will only get a single "Target not in line of sight" per unit per 3-5 seconds depending on other red text errors that have popped up. This is as good as can possibly be done, sorry! If you can find any other way to handle this please let me know and give me Lua code examples.
if PQR_IsOutOfSight() then
--"target" has been out of sight in the last 3 seconds.
if PQR_IsOutOfSight("mouseover", 10) then
--"mouseover" has been out of sight in the last 10 seconds.
Added profiles by sheuron, if you enjoy his profiles please give him rep here: http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/329033-beta-pqrotation-automated-ability-priority-queue-114.html#post2132079
([BETA] PQRotation - an automated ability priority queue.)
WARRIOR PROTECTION PVE
WARRIOR FURY PVE
MAGE ARCANE PVE
MAGE FROST PVP
HOLY PRIEST PVE
HUNTER MM PVE
ROGUE COMBAT PVE
-BUGFIX: "mouseover" target option now targets the spell at your mouseover and not your pet.
-Updated for patch 22.214.171.12445
-PQR_IsMoving(seconds) should now return false if you have molten feathers. (Untested)
-NEW: Smart Hotkey Mode- click the 'Help' button on the Show Settings page for more information.
-Smart Hotkey Mode note: Recast Delays are currently applied to all 4 rotations, so if you have a delay in Rotation 1 it will also be applied to Rotation 2 if the ability is in both rotations.
-Smart Hotkey Mode note: It is HIGHLY recommended that you do not use the default provided function name for this functionality. You can change this on the Show Settings page.
-NEW: You can now run multiple PQRs. Rotation/Interrupt Hotkeys are based on which WoW has focus.
-NEW: 'Mouseover' Target Mode
-NEW: 'Click' Target Mode (Targetted AOE Spells, clicks at mouse location)
-NEW: Interrupt Delay Option
-NEW: Enable/Disable Combat Requirement Option
-BUGFIX: Will no longer try to interrupt your target if is not attackable.
-Added a 'Pet' cast option.
-Delay is now functional for instant cast abilities (Example: Serpent Sting, to prevent casting more than 1.)
-Configurable Hotkeys for 4 rotations and interrupt mode.
-Customizable Sounds (this will be updated, I am looking for better WoW sounds to add... but for now it will do!)
-Ability Editor: "Self Cast" option has been changed to "Target." Allows you to specify the target for the spell, current options are: Target, Player, Focus. Old profiles will be automatically updated when an ability is saved.
-Vanish will now trigger a .5 second delay when the cast request is sent.
-Added Warlock Rotations (thank you crystal_tech)
-Added Shadow Priest Rotation (thank you mentally)
-Testing versions, not released.
- Should fix WoW freezing issue.
-You can now change the casting rate via Settings (main form). This is the rate at which the bot checks if a spell is available to cast and attempts to cast it. Interrupts are not effected by this.
-Sending a Vanish cast (either manual or otherwise) will now result in the bot delaying for 0.5 seconds before continuing.
-Shortened version numbers to: Major.Minor.Revision... too many numbers before!
-WoW Lua: PQR_IsMoving(seconds) - returns true if the player has been moving for X seconds(down to 4 decimal place, 1.245 = 1 second 245 ms). Player is considered stationary if they have been standing in one spot for > 1 second.
-WoW Lua: PQR_NotBehindTarget() - returns true if the player is not behind the target. This only returns true if you try to cast a spell that requires you to be behind the target first, and is good for 3 seconds. So, you can now add "Shred" or "Backstab", as follows:
if PQR_NotBehindTarget() then
-Fixed channeling issue. Typo on my part checked if you had been channeling and had LESS than 150ms left on the channel, it should have checked if you had GREATER THAN 150ms left on the channel.
-Warriors preset priorities now check spell ID rather than name of buff.
-Added Destro Lock default.
-Added an internal "Drop Threat" check. If player attempts to cast Feign Death or Divine Shield (threat drops/emergency buttons on GCD) but fails because they are on GCD the bot will delay .5 seconds. This allows the player to hit the key a few times and have it cast. Please post a list of any other relevant abilities you would like added (threat drops and emergency spells only, please.)
-Added a "Recast Delay" option for individual spells... this will force the bot to not recast a spell for X milliseconds (example: Immolate, gives the server time to put the Immolate Debuff on the mob so you don't recast it again immediately)... this will only work for spells with a cast time, but any spell without a cast time should be convered by the GCD so it shouldn't matter anyways.
-Added a "Force Selfcast" option for individual spells. Spells will be specifically casted with you as the target if selected.-If you close your WoW PQR will now close as well.
-Added scrollbars to the Lua editor (yay).
-No more crashes on zoning.
-No longer auto-disables when zoning.
-Significantly reduced the number of Lua calls being made per cycle.
-Minor code cleanup.
-Settings (Interrupt List, Interrupt All, and the Primary and Secondary Rotation selections) have been finalized and will no longer reset each build.
-NOTE: There is a very very minor chance to crash when you zone if Bot Mode or Interrupt Mode is enabled while zoning, you should disable Bot Mode or Interrupt Mode if enabled before zoning. If all goes well with this build this bug should be non-existent in future builds, please let me know of any issues.
-SpellAvailable check will now check if a spell is being channeled (with more than 150ms left on the cast) and if IsSpellUsable().
-Fixed typo in default warrior abilities.
126.96.36.199: Fixed localization issues:-UnitBuffID(unit, spellID, filter) and UnitDebuffID(unit, spellID, filter) can now be used just like all other WoW Lua. The returns for these 2 functions are identical to UnitBuff() and UnitDebuff().
-Interrupt Mode will now CastSpellByID instead of CastSpellByName("EnglishSpell")... so will now work with all localizations.
-Fixed random bot stopping issue*. (*: Should be fixed, was unable to reproduce while testing.)
-Internal Debug Version, no changes.
-Switched to new memory detour, no longer requires DX9.
-Cleaned up some code and crashing bug should no longer occur when you zone.
local spellAvailable = PQR_SpellAvailable(SpellID)
if spellAvailable then
--PERFORM BEFORE CODE HERE
--PERFORM AFTER CODE HERE