Can anyone help me with a quick easy code sniplet that will run a rotation for 1800 seconds then stop the rotation and take a screenshot? Trying to do some PTR DPS tests and keep missing my 30 min marker.
Check out cuteone's feral profile. It has a 5 minute timer for dummy tests that automatically stops. It does not take a screenshot, but using recount or skada you can always go back to the most recent fight and see your dps.
Sent from my Galaxy S4 using Tapatalk 2
Lets see a simple example from PvP perspective what is using UnitCastingInfo / UnitChannelingInfo:
We need this functions for several situations like interrupt, Dark Simulacrum, SWD CCs, etc. What is same in these that we need a randomness for our action (when to do our action), a buff check (for grounding totem etc. what could negate our action) an action (ability to use), a target, classname and probably a location (arena, bg, dungeon) to check for other conditions. This is the reason why i never use Xelper's interrupt because it does not check for grounding, or glyphed grounding.
Or a complex SpellStopCasting function what checks for specific conditions (cancels your cast (hex/poly) when your druid target is shifted or stops your cast ,delays the rotation when it reads an interrupt from the combatlog)
So shortly you could use this in every class profile instead of implementing it again or copy pasting it to an ability. At the moment my DarkSim ability is a modification of a general random interrupt.
Messages: I like to see what is happening in my rotation on my screen (PQI ability log / writetochat are not enough for me) so it took me some research to create a function what simply prints out my messages and fades out. Then after a few days i found the same exact solution in someone else profile.
I hope you understand what i am trying to say. It feels to me that we (i) try to reimplement the wheel every time because we don't have such functions. Not to mention that more eyes see more so optimizing / tuning these functions would be a lot better. An excellent example is vitalic's debuff checking idea or one of my favourite PvP coder Cokx's DR tracking method.
Oh and yes i know that i can do a forum search and ask questions in the PQR topic but it is not the same.
P.S. i really love your coding style mentally
Last edited by Maxitor; 08-24-2013 at 02:07 AM.
+Rep!
Great explanation! A Wiki would be perfect for this kind of knowledge base.
I want to come back to my problem (and the one of many others here). The call of protected functions. Ich checked my code many many times, but i dont know what to look for! What are calls of protected functions? How does it look like and why are they executed in the game and not via PQR?
That is the biggest problem i am facing at the moment and i have no f****ng idea where to start or what thats mean. Dont get me wrong, I am no noob - but i need a pointer where to look =( 85% of the time the errors occurs in a arena environement. So i think it has something to do with pvp specific calls like iteration through "arena..i" or aura checks or something i missed. Its not a syntax error the profile works even with errors (more or less)...
Here ist a example, but its not the same error everytime. Sometimes its a Addon like Recount or my interfac Addon (LUI) or another blizzard raid frame file. Here is an example:
best regards from germany59x Blizzard_PVPUI\Blizzard_PVPUI-1.0.lua:839: bad argument #2 to "SetFormattedText" (number expected, got nil)
<in C code>
Blizzard_PVPUI\Blizzard_PVPUI-1.0.lua:839: in function "HonorFrameBonusFrame_SetButtonState"
Blizzard_PVPUI\Blizzard_PVPUI-1.0.lua:712: in function "HonorFrameBonusFrame_Update"
Blizzard_PVPUI\Blizzard_PVPUI-1.0.lua:415: in function <Blizzard_PVPUI\Blizzard_PVPUI.lua:407>
Locals:
button = <unnamed> {
0 = <userdata>
SelectedTexture = <unnamed> {}
HighlightTexture = <unnamed> {}
canQueue = true
Contents = <unnamed> {}
bgID = 32
NormalTexture = <unnamed> {}
}
enable = nil
minLevel = nil
-Mr.
Here another example
nil26x [ADDON_ACTION_BLOCKED] AddOn "toomanyaddons" tried to call the protected function "CompactRaidFrame4:Show()".
!BugGrabber-r193-release\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
FrameXML\CompactUnitFrame.lua:282: in function "CompactUnitFrame_UpdateVisible"
FrameXML\CompactUnitFrame.lua:240: in function "CompactUnitFrame_UpdateAll"
FrameXML\CompactUnitFrame.lua:47: in function <FrameXML\CompactUnitFrame.lua:44>
Locals:
just a little snippet from me trying out PQI on my Resto Druid profile....PHP Code:
function PQI_Setup_Variables(tableName, Prefix) -- Name of the PQI Table, [Prefix you want to affix to Variable (Nova is default if left blank)]
local tableName = tableName
local Prefix = Prefix or "Nova"
if type(Prefix) ~= "string" then
Prefix = "Nova"
end
local PQI_String = string.format("%s_%s%s", "PQI", gsub(tableName.author, "%s", ""), gsub(tableName.name, "%s", ""))
if type(tableName.abilities) == "table" then
for i=1, #tableName.abilities do
local AbilitiesName = gsub(tableName.abilities[i].name, '%s', '')
local Variable = string.format('%s_%s', Prefix, AbilitiesName)
local PQI_String_Enable = string.format("%s_%s_%s", PQI_String, AbilitiesName, "enable")
local PQI_String_Value = string.format("%s_%s_%s", PQI_String, AbilitiesName, "value")
_G[Variable..'_Check'] = _G[tostring(PQI_String_Enable)]
_G[Variable] = _G[tostring(PQI_String_Value)]
end
end
end
this snippet is for Devs who use PQI and are annoyed of the ABSURDLY LONG variable names....
so how this works is you basically call
TableName being one of your PQI configuration tables, and Prefix being what you want the first part to be called... Examples are Nova_Nourish (Prefix_AbilityName) another would be, Cooldown_Tranquility (Prefix_AbilityName)PHP Code:
if PQI_FullyLoadedCheck and not VariableSetup then
PQI_Setup_Variables(TableName, "PrefixName")
VariableSetup = true
end
so you put in the TableName and the Prefix and it will output Global Variables for you to use setup as shown before
Prefix_Ability name...
So lets say i made numbox for the Ability "Healing Touch" (notice the space). using my function and the prefix "Nova", my resulting variable would be Nova_HealingTouch
it makes two variables for each ability as of now...
Nova_HealingTouch and Nova_HealingTouch_Check (this is a boolean that checks to make sure the enable checkbox is checked)
if you have any questions, come bug me on the Team Nova Profile page
*edit*
I'm still writing the Hotkey portion to this, but just this alone should save some people an entire page of text![]()
This is brilliant! With the hotkey part it could go to the PQR LibraryWhat would be even more better if we had a function what checks for PQI addon and if it was not loaded it sets a default value for every PQI profile variable. Basicly you pass a table to the function with the desired settings.
Last edited by Maxitor; 08-26-2013 at 02:48 AM.
In your oppinion whats the best way to cancel own auras?
- - RunMacroText("/cancelaura xxxxxxxxxxx")
- - CancelUnitBuff(xxxx) (does it even work?)
or ist there another way?
is this like a bot that plays for you?
It says in the title of this thread what it is - A rotation-bot, that does the rotation for you. If you're unsure just read the first post and its all there.