Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoWBench/Getting started
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== How to interact with things === <div style="margin: 0 0 1em 2%;"> Interacting with the game world is a bit rough but fairly straightforward. The only actual WoWBench-specific emulation is mouse movements and "looking" at frames (and the game world around you). ==== Looking at the world ==== <div style="margin: 0 0 1em 2%;"> <div style="float:left; clear:left; margin-left: 2em;"> Cmd> '''look''' Looking at World: 1: World World 2: Player Charles 3: NPC Murloc Warrior 4: Object Mailbox 5: Object Signpost 6: Player Alice 7: Player Mikk 8: NPC Northshire Worker 9: Player Bob You can now use $1--$9 in command line expressions. Hint: Use 'look $1' to re-examine this object. </div><div style="clear:left;"></div> These are NPCs and objects that you can interact with via the WoW APIs, e.g. [[API TargetUnit]], etc. The only other interaction possible from the command line is simulating mousing over things, and clicking them. </div> ==== Interacting with units and objects ==== <div style="margin: 0 0 1em 2%;"> <div style="float:left; clear:left; margin-left: 2em;"> cmd> '''mouse Signpost''' You read the signpost. It says: Welcome to WoWBench v1.10.2.a3 It is dark and you are in a maze of hairy lua scripts, all alike but subtly different. You are likely to be eaten by a grue. </div><div style="clear:left;"></div> This just a simple <tt><OnEnter></tt> trigger in world.xml, in <code><Object name="Signpost"></code>, which demonstrates that you can more or less define the world to behave exactly the way you like it to. A more meaningful implementation of OnEnter in objects is probably to trigger the GameTooltip object to show: <div style="float:left; clear:left; margin-left: 2em;"> cmd> mouse Bob Show: GameTooltip GameTooltip </div><div style="clear:left;"></div> WoWBench will tell you about frames being shown or hidden after startup. In this case, mousing over Bob triggered a GameTooltip object named "GameTooltip" (you'll recognize this from how it actually works in-game) to show. And we can even look at the tooltip! </div> ==== Looking at frames ==== <div style="margin: 0 0 1em 2%;"> Continuing from the past example where we ''moused'' over Bob, we can proceed to look at the tooltip frame that popped up: <div style="float:left; clear:left; margin-left: 2em;"> cmd> '''look gametooltip''' Looking at gametooltip: 1: GameTooltip GameTooltip 2: FontString [Level 60 WARRIOR] GameTooltipTextLeft2 3: FontString [Bob] GameTooltipTextLeft1 (+60 hidden frames not shown) You can now use $1--$3 in command line expressions. Hint: Use 'look $1' to re-examine this object. </div><div style="clear:left;"></div> You'll notice that WoWBench is case insensitive about findings frames. It will continue to be so until it clashes with something important (to Lua itself, "GameTooltip" and "gametooltip" are two entirely different variables). In this case, we are being told that we're looking at a top frame called "GameTooltip", which is a GameTooltip object. It has two visible children, 2 fontstrings, containing "Bob" and "Level 60 WARRIOR". They're out of order since the "look" command has no idea about what it actually would look like on-screen, but the object names to the right should clue you in as to the order they'd be shown in on-screen. (Also, the actual tooltip text is totally different from the in-game text. It's the game engine itself that decides what these tooltips should look like, so it's up to you to modify it to emulate WoW better!) To see ''everything'' on-screen (well, nearly), you can <code>look UIParent</code>, but ''that'' dump, we're not going to show here :-) </div> ==== Summary of interaction commands ==== <div style="margin: 0 0 1em 2%;"> {{Notebox|'''Behind the scenes:''' Internally to WoWBench, a game-world object is just another UI object with event handlers. * The classes representing game-world objects emulate game engine behavior when receiving events. * Game-world objects are defined in world.xml and world.lua.}} ; '''mouse''': Simulate mousing over an UI object or a game-world unit or object. Not giving an argument means mousing over nothing in the game view. ; '''click''', '''clickr''', '''clickm''': Click the left, right and middle mouse buttons, respectively, on an UI object or a game-world unit or object. Will send MouseDown, MouseUp and Click events as appropriate. Clicking something implicitly means mousing over it first. ; '''look''': Seeing game-world units or objects around you, or looking at the contents of an UI object. </div> </div>
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)