- Joined
- Feb 22, 2013
So, I've been constantly annoyed by not knowing what the heck channel you're chatting in when you want to say something important. You can /ch and make sure you're in the channel, but what's the fun of that?
So I took the macro mod and made it happen.
You can see on the right it says "Now chatting in Offtopic" just like what you see if you used /ch o.
You can also see that it's low. It's just about between where Rei's Minimap and cooldown timers are located on the GUI for convenience, but you can put it anywhere.
The indicator only shows when you have chat open, it disappears when you enter gameplay.
Want? You got it.
(Do note my knowledge of scripting in the mod is limited; if you have better code let me know!)
So, firstly open up the GUI editor from your chat.
Find "Button Panel Commands" and choose "Add Label". Click on any grid space to place it there.
When finished, the channel indicator will appear onscreen at roughly the same location.
For the sake of this, the control name will be ChannelLabel. Unless you know what you are doing, do not change it. Set the text to whatever, and change colors/alignment/shadow to your liking. Do not set a binding.
Okay, we have our label set, we get to do the scripting part now!
Make sure the button is saved, then go to the macro mod main menu and ready it for setting onChat binding.
Now, for some code. Assuming you named the label ChannelLabel you can put this code and use it:
Once you save that code, you should be good. Just change channels and it'll start working!
Wow, big wall of text. Well, that's all for this. Hope I was of help.
So I took the macro mod and made it happen.
You can also see that it's low. It's just about between where Rei's Minimap and cooldown timers are located on the GUI for convenience, but you can put it anywhere.
The indicator only shows when you have chat open, it disappears when you enter gameplay.
Want? You got it.
(Do note my knowledge of scripting in the mod is limited; if you have better code let me know!)
So, firstly open up the GUI editor from your chat.
When finished, the channel indicator will appear onscreen at roughly the same location.
Make sure the button is saved, then go to the macro mod main menu and ready it for setting onChat binding.
Code:
$${IFCONTAINS(%CHAT%,Now chatting in );IFCONTAINS(%CHAT%,:);ELSE;SETLABEL(ChannelLabel,%CHAT%);ENDIF;ENDIF;}$$
First off is an IFCONTAINS, saying if the chat message contains "Now chatting in " it will continue. Next it checks for a : which filters pretty much any player message so no one can just say that in chat and mess it up. The else is inverting, so if there is no : it will set the ChannelLabel label to the "Now chatting in " text. I couldn't figure out how to directly do if it doesn't contain, so that had to do =/