Maintenance for the week of December 23:
• NA megaservers for maintenance – December 23, 4:00AM EST (9:00 UTC) - 9:00AM EST (14:00 UTC)
• EU megaservers for maintenance – December 23, 9:00 UTC (4:00AM EST) - 14:00 UTC (9:00AM EST)

[Request] Easier Guild chat slash commands and keybinds

Rm4g3dD0v
Rm4g3dD0v
✭✭
Can someone make slash commands for guild chat like /1 /2 /3 /4 /5 instead of /g1 /g2 /g3 /g4 /g5 ?
Also can you add a feature to add keybinds to the chatmodes ? I 'd love to be able to bind the guild, group, zone, say, yell chat modes to certain keyboard keys, just like you currently can bind the "reply to whisper" one.
  • SirAndy
    SirAndy
    ✭✭✭✭✭
    ✭✭✭✭✭
    Ok, i have to ask, is it really that more work to type /g1 instead of /1?

    I've been playing this game for over a year now and i never had the feeling i was wasting my precious time typing /g1 to get to the chat for my main guild.
    confused24.gif
  • Rm4g3dD0v
    Rm4g3dD0v
    ✭✭
    When typing at the same time in 3 different guild chats, zone chat and party, /1 is hell lotta easier than /g1. That's cause G is inthe center of the keyboard and 2 rows below the numeric one. It invites a sh1tload of mistypes.
    It's EASIER. Not FASTER.
    Edited by Rm4g3dD0v on August 5, 2014 8:00AM
  • zgrssd
    zgrssd
    ✭✭✭✭
    Afaik Addons have not been able to change the chat channel since beta was over.
    Even the processing of /g1 ... /g5 is handeled by the chat itself, not by the normal slash command list.
    Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
    Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
    Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
    Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
    Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
    Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
    Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS

    Me babbling about PvE roles and Armor, Short Guide to Addon Programming (for Programmers)

    If you think anything I or somebody else said violates the Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.
  • Rm4g3dD0v
    Rm4g3dD0v
    ✭✭
    it can be done. I have and use the "reloadui" addon which makes a few aliases for /reloadui like /rui , /rl , /reload
  • zgrssd
    zgrssd
    ✭✭✭✭
    Rm4g3dD0v wrote: »
    it can be done. I have and use the "reloadui" addon which makes a few aliases for /reloadui like /rui , /rl , /reload
    /reloadui does nothing but call the ReloadUI() function. I used it in my addons when a reload is nessesary.
    Adding those slash commands is trivial and propably 1 1-line-function + 3 Slash command assignments.

    There is no function (anymore) to change wich chat channel you send too.
    If addons can't do it, they can't add slash commands to do it either.
    Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
    Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
    Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
    Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
    Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
    Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
    Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS

    Me babbling about PvE roles and Armor, Short Guide to Addon Programming (for Programmers)

    If you think anything I or somebody else said violates the Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.
  • Rm4g3dD0v
    Rm4g3dD0v
    ✭✭
    how about keybindings then?
  • Garkin
    Garkin
    ✭✭✭
    I'd try something like:
    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
    
    Edited by Garkin on August 6, 2014 3:18AM
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • zgrssd
    zgrssd
    ✭✭✭✭
    Rm4g3dD0v wrote: »
    how about keybindings then?
    Wheter we use Slash Commands, Button or Keybindings is irrelevant.
    They are all just marginally different way to do the same stuff (User action dependant execution of code).
    If addon code cannot change wich Chat channel you send to, it can't do it on user action either.

    Right now I don't think addons can change the Chat Channel you send to, the same way they cannot commit chat messages (obvious part of anti spam measures).

    There are 1 or 2 indirecty ways we could check, But each of those is a longshoot at best, wishfull thinking at worst.

    Edit: I just reliased why the change of channel is not a slash command:
    The chat is doing the checks for channel Identifiers during input phase (a pattern search after each keypress I asume).
    In turn Slash commands are only executed after the sentence has been comitted via enter.
    However if I remmeber right it was possible to pre-write chat messages. If so, this could include the channel selection part at the beginning of the string.

    Edit2: Found the function to pre-write messages, "CHAT_SYSTEM:StartTextEntry(text, channel, target)"
    It is not suiteable for slash commands however - you would need to commit the message twice - once to execute the slash command and let it create the proper text, once to actually send the message the slash command has build.
    Edited by zgrssd on August 6, 2014 2:49PM
    Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
    Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
    Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
    Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
    Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
    Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
    Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS

    Me babbling about PvE roles and Armor, Short Guide to Addon Programming (for Programmers)

    If you think anything I or somebody else said violates the Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.
  • zgrssd
    zgrssd
    ✭✭✭✭
    Okay, it is possible to do this after all. But this is not really suiteable for slash commands:
    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
    

    The thing is that when you enter "/1 That was a nice post" you have to hit enter three times to actually get it send to guild 1:
    Once to execute the command and build the text. The "/guild1 " is isntantly interpreted by the chat.
    One to get the chat entry box back into focus (as slash commands remove the focus from the entry box)
    One to send the message (as addons can only pre-write chat messages, not actually sending them.

    Keybindigns might be a better thing, if StartTextEntry also normally gives focus to the chat.
    Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
    Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
    Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
    Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
    Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
    Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
    Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS

    Me babbling about PvE roles and Armor, Short Guide to Addon Programming (for Programmers)

    If you think anything I or somebody else said violates the Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.
  • Garkin
    Garkin
    ✭✭✭
    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)
    
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • Rm4g3dD0v
    Rm4g3dD0v
    ✭✭
    Garkin wrote: »
    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)
    

    How do I turn this into a plug n play addon? preferably managed from minion too?
  • Garkin
    Garkin
    ✭✭✭
    Rm4g3dD0v wrote: »
    How do I turn this into a plug n play addon? preferably managed from minion too?
    Here you are:
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • Rm4g3dD0v
    Rm4g3dD0v
    ✭✭
    hey, wow, thanks a lot!!
    Honestly, I didn't think it would be THAT SIMPLE as to c/p the code into a txt and rename it to .lua
    I guess sometimes I presume too many complications.
    Edited by Rm4g3dD0v on August 6, 2014 6:17PM
Sign In or Register to comment.