[Request] If/then script
I don't think this needs to be a full addon, but there's no reason it couldn't be.
I would like and script to use in Autorun or a seperate addon, that checks to see of the /chatlog command is active, and if not, runs it. That's it. |
AddOns are not allowed to automatically run chat commands. They can put the text for you into the chatbox and you just need to press the RETURN key, but they cannot do it automatically.
|
Quote:
I started making something like that a while ago, but haven't finished it yet. Maybe I'll upload it this weekend. |
sirinsidiator, Yes that is exactly what I meant. Thank you for clearing that up.
|
You can download the addon here once it has been accepted.
|
I've tweaked my personal ChatLogger Addon like this:
Lua Code:
You can simply run SetChatLogEnabled(true) via binder though. No need for an if-statement. Also, if you separate the lines by ; you can make inline statements: If (condition) then do this; else do that; end Hope that helps you :) |
Is your "filter" really working?
As far as I am aware the chat log automatically logs all channels. I don't think you can influence that from the addon side, as the logging is done in C and most likely before you see the message in Lua. I am also not sure if shutting off the log in cyrodiil is desireable, as it would again affect all channels. p.s. You do not need ; when you put if/else statements into one line: Lua Code:
|
Err, it is working in so far as it turns the chatlog on when there's activity in one of the channels :)
|
Ah. I was confused by the method name. Toggle usually means it turns it on and off, but your method only turns it on. :D
Did you test if the first message that triggers enable() shows up in the log? There also seems to be a small mistake in your code. You ignore the values in listenInTheseChannels and only enable the chatlog when channelType == CHAT_CHANNEL_SAY. Lua Code:
I am still not sure why this would be preferable to just turning the log on when the player logs in. :P |
sirinsidiator, thank you so much for making this.
|
All times are GMT -6. The time now is 10:14 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI