Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
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
WoW:Satellite (AddOn)
(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!
==Slash Command Table Object== ===Syntax=== { -- Required members id = "IDENTIFIER"; commands = { "/command1", "/command2" }; onExecute = SomeFunction; -- Optional members onSpace = SomeFunction; onTab = SomeFunction; helpText = "This does something cool."; -- ChatType members -- Using any of the following options will make the slash command a full fledged Chat Type. -- Chat Types are shown in the Chat Tab menus and can have their color and visibility controlled by the player. -- You can send emulated messages as a ChatType (registered Satellite ID) using GenerateChatEvent. sticky = false; hideMenuOption = false; menuText = "Command"; header = "Command: "; printHeader = "[Command]: "; -- or { "header1 ", "header2 " }; defaultFrames = { 1, 2, 3 }; defaultColor = { r = 1.0, g = 1.0, b = 1.0 }; onColorChange = SomeFunction; onVisibleChange = SomeFunction; } :-Satellite.registerSlashCommand allows you to pass multiple slash command table objects: ::Satellite.registerSlashCommand( { ... }, { ... } ) ===Required Members=== :*id - some unique ID (used in various variable generation and as the ChatType, all upper case) :*commands - a table of /commands to check for (all lower case) :*onExecute - a function which is called when the user runs the command :*:args: :*::msg - the chat message as typed into the editbox (excluding the "/command ") :*::lastCommandUsed - the slash command as typed into the editbox (or last one used in the case of a sticky command) ===Optional Members=== :*onSpace - a function called when a space bar is pressed :*:args: :*::msg - the chat message as currently seen in the editbox (excluding the "/command ") :*::lastCommandUsed - the slash command as typed into the editbox (or last one used in the case of a sticky command) :*onTab - a function call when a tab key is pressed :*:args: :*::msg - the chat message as currently seen in the editbox (excluding the "/command ") :*::lastCommandUsed - the slash command as typed into the editbox (or last one used in the case of a sticky command) :*helpText - a string explaining what the command does ===ChatType Members=== :*sticky - boolean value determining if the command should be sticky :*menuText - text seen in the "Other Messages" menu of the Chat Tab Menu (used to generate printHeader is absent) :*header - text or table of text seen in the left of the edit box after entering the slash command (defaults to commands[1]) :*:If in table form it should have the same amount of entries as the 'commands' table, implying direct relation. :*:ex: If command 1 is used header 1 will be seen, etc. :*printHeader - text seen in the left of the chat frame message when using GenerateChatEvent :*defaultFrames - a table of the #'s of chat frames this ChatType will by visible in by default :*defaultColor - the default color table of this ChatType in the editbox and chat frame messages :*onColorChange - function called when the color is changed :*:args: :*::r - red value (0-1) :*::g - green value (0-1) :*::b - blue value (0-1) :*onVisibleChange :*:args: :*::frameID - (1-7) chat frame that visibility has been modified on :*::isVisible - boolean value for if the chatType is visible or not
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)