/reloadui does nothing but call the ReloadUI() function. I used it in my addons when a reload is nessesary.it can be done. I have and use the "reloadui" addon which makes a few aliases for /reloadui like /rui , /rl , /reload
local channelInfo = ZO_ChatSystem_GetChannelInfo() for i = 1, 5 do local chatChannel = _G["CHAT_CHANNEL_GUILD_" .. i] channelInfo[chatChannel]["switches"] = channelInfo[chatChannel]["switches"] .. " /" .. i end
Wheter we use Slash Commands, Button or Keybindings is irrelevant.how about keybindings then?
local function guildRedirect1(message) CHAT_SYSTEM:StartTextEntry("/guild1 " .. message) end local function guildRedirect2(message) CHAT_SYSTEM:StartTextEntry("/guild2 " .. message) end local function guildRedirect3(message) CHAT_SYSTEM:StartTextEntry("/guild3 " .. message) end local function guildRedirect4(message) CHAT_SYSTEM:StartTextEntry("/guild4 " .. message) end local function guildRedirect5(message) CHAT_SYSTEM:StartTextEntry("/guild5 " .. message) end SLASH_COMMANDS["/1"] = guildRedirect1 SLASH_COMMANDS["/2"] = guildRedirect2 SLASH_COMMANDS["/3"] = guildRedirect3 SLASH_COMMANDS["/4"] = guildRedirect4 SLASH_COMMANDS["/5"] = guildRedirect5
EVENT_MANAGER:RegisterForEvent("GuildShortcuts", EVENT_ADD_ON_LOADED, function(event, name) if (name):find("^ZO_") then return end EVENT_MANAGER:UnregisterForEvent("GuildShortcuts", event) for i = 1, 5 do CHAT_SYSTEM.switchLookup["/" .. i] = CHAT_SYSTEM.switchLookup["/g" .. i] end end)
Different solution:EVENT_MANAGER:RegisterForEvent("GuildShortcuts", EVENT_ADD_ON_LOADED, function(event, name) if (name):find("^ZO_") then return end EVENT_MANAGER:UnregisterForEvent("GuildShortcuts", event) for i = 1, 5 do CHAT_SYSTEM.switchLookup["/" .. i] = CHAT_SYSTEM.switchLookup["/g" .. i] end end)
Here you are:How do I turn this into a plug n play addon? preferably managed from minion too?