Hello guys. I am hoping to get a better understanding of how
DanNet works and to see if it can do what I would like.
I have been able to use statements like the ones below to make a button in Button Master
Lua that can send a command to a specific character of mine, regardless of which toon I am on:
/dgae /if ($\{Select[$\{Me.Name}, CharacterName]}) /keypress 1
/dgae /if ($\{Select[$\{Me.Class.ShortName}, ENC]}) /keypress 1
After reviewing Sic's Hotkeys guide, I realized I could clean up these commands so the code in buttons was not flooded with these IF statements.
For example, I added this alias to my MacroQuest.ini:
/enc=/dgae /if ($\{Select[$\{Me.Class.ShortName}, ENC]})
So I can simplify my command above to:
The alias certainly cleans up my Button Master code and as long as I remove these aliases before using a CWTN plugin I should be fine. The thing with this approach is that my MacroQuest chat is then spammed with statements like this:
[ --> (all) ] /if ($\{Select[$\{Me.Class.ShortName}, ENC]}) /keypress 1
I believe I could turn off the command echo but I really don't want to do that as I feel it is important to see the confirmation of any action I do in the chat window. My window in the UI is small so that one line above wraps around. With a complicated multiline command one statement can take up half the window.
So one thing that bothers me that I'm not sure about is the
/dex command. For all of the other
DanNet commands such as
/dgae and
/dge, they basically have support to send a command to all other peers including or excluding own. When I run a
/dex command with the character name of the peer I am currently on, the MacroQuest chat displays the command in the logs but it does not execute. If I run the same command but send it to another client, the command works as expected. Here is an example from my chat log (I have
MQ2RelayTells enabled):
/dex Character1 /tell Character2 hello
[ --> (Character1) ] /tell Character2 hello
/dex Character2 /tell Character1 hello
[ --> (Character2) ] /tell Character1 hello
[ --> (all) ] [22:10:11] Character2 sent Character1 a tell that said: hello
Is there a reason why the
/dex command does not work to send a command to your own peer?
Thanks for your time.
I have another unrelated question regarding
DanNet and writing Luas for MQNext. Is there a way to use
DanNet in a
Lua script I am working on that can can use it as a library (as apposed to actual commands in MQ)? If so could you provide me a link with some examples or any documentation on that usage?
One example of what I would like to do is have a
Lua script be able to communicate with a character using
DanNet to find out information on the character's active (and also ideally inactive) mercenaries along with if it is suspended or unsuspended. Using the MQ TLO for Group, I can get each groupmember object and identify each member Name and if it is a Mercenary. What I can't do though is find out which Member that Mercenary is owned by. I'm not sure yet if
DanNet has access to that information but if it does I would be looking to access that information just like I can access the MQ TLO Group information from my
Lua script.
I have some ideas on scripts I'd like to look into contributing so if you can provide any help in this regard it would be appreciated.