[CF 1592] LUA to disable opening chat while in an arena?
tmw-issue-import opened this issue ยท 4 comments
I'm shit with LUA - is it possible to add a LUA conditional alongside with a player combat=true + instance type=arena to disable the opening of the chat box while the icon succeeds as true?
Basically the following image (icon type is a condition icon). I've never used the LUA conditional so if it has to be standalone I could just move the combat/instance conditions to group conditions and have it be a standalone icon.
Posted by CurseForge user Jalopyy | Imported from CurseForge issue #1592 | Raw
Lua conditions should be a statement that evaluates to a boolean, and they should have no side effects. What you're asking for would fulfill neither of those.
Something like this, if you want to do it inside of TMW, would need to be written as a standalone code snippet.
Posted by CurseForge user Cybeloras
Yea after I posted I realized that it wouldn't make sense for boolean conditionals to then take that LUA condition and execute it.
If it was made as a snippet, how would I do that (as in the code for it)? Like I said - I know nothing about LUA. Just the top 2 conditionals, if player combat=true and instance type=arena, then the chat box cannot be opened.
Posted by CurseForge user Jalopyy
Which chat box do you want to prevent from opening?
In terms of where to put the LUA snippet - best way to do this is to have the conditions as you set them, then in Notifications > LUA > on show
This will run the LUA when the icon is shown. As for actually closing the chat box - do you mean hiding the main chat frame while in arena?
Posted by CurseForge user ariehg
The one that opens when you hit enter or the 'reply' keybind.
Anything related to keeping the chat box closed is fine with me
- Disabling both enter keys and the 'Reply' keybind when conditions are met
- Closing the chat bar if opened when conditions are met
- Etc
Posted by CurseForge user Jalopyy