Lucky Charm of Travel and dialog boxes

Third party software discussion goes here.
rmm10
Posts: 357

Lucky Charm of Travel and dialog boxes

Post#1 » Sat Jan 16, 2021 4:52 pm

I recently decided to try to equip my main group with the Lucky Charm of Travel (item 9133). And naturally I have to make a Social for it. For players who are unfamiliar with this item...it brings up a fairy who can port you to your guild hall. Unfortunately, its computer code was not written to be able to accept a zone word like the porter fairies in the Forest do. Instead, you click the item, then wait 10 seconds for the cast and then the fairy appears. You then must hail the fairy which then pops up a dialog box and then you have to push the Yes button.

This is not easy stuff for the casual MQ2/Social user. In fact, no dialog box response is.

Some of the social was easy: /pause 100, /potionbelt activate 3 (Yes, I put the item it in my potion belt).
Then /pause 20, /target npc
Then /pause 10, /say hail

You need all those pauses to give the server time to respond to the commands.

The last part...interfacing with the dialog box itself...was not something I figured out by myself. The documentation for doing that is extremely sparse. I asked a coder friend who suggested that I try:

/notify ConfirmationDialogBox Yes_Button leftmouseup

But this did not work for the Lucky Charm. Pleasingly though, it DID work for making a social to accept raid invites (for those of you that remember, you can raid invite using the simple EQ command /raidinv, but the acceptance of the invite is thru a dialog box).

I was able to find the proper command only because I happened upon it in a forum post at raidaddicts.org. The command listed there is an all-inclusive command that is supposed to hit the accept button for several types of dialog boxes. Here it is:

/squelch /bcaa //multiline ; /notify ConfirmationDialogBox Yes_Button leftmouseup;/notify LargeDialogWindow LDW_YesButton leftmouseup;/notify TaskSelectWnd TSEL_AcceptButton leftmouseup;/notify GiveWnd GVW_Give_Button leftmouseup

Thru a process of guessing, I found the portion that I needed was:

/notify LargeDialogWindow LDW_YesButton leftmouseup

And so using that gave me a working social for using the Lucky Charm. Unfortunately, there is a weakness with my social and perhaps you have noticed it already. The /target npc assumes that the porter fairy is the closest npc. I use this command because I could not figure out a name that worked with the /target command. If you yourself happen upon it then please post it here. 8-)

There is obviously a sizable set of options that can be used with /notify, and some of them are listed in the MQ2 wiki at https://www.macroquest2.com/wiki/index.php/Main_Page , but its just as obvious that it's incomplete in explaining the rules of identifying dialog windows. If anyone can find a more complete set of docs, please post it here.

Shoutout to fellow THF player Muergan (a.k.a. the God of E3 Coding for THF), and Kaen01 over at the MQ2 Discord server, for their help with this and with several other things that I needed help with.

Able
Posts: 87

Re: Lucky Charm of Travel and dialog boxes

Post#2 » Sat Jan 16, 2021 6:40 pm

if you do /target Hall

that should fix your issue, that is what I use to be able to target my guild hall fairy. the rest of your social is jut like mine for the most part.

Niixnec
Posts: 334

Re: Lucky Charm of Travel and dialog boxes

Post#3 » Sat Jan 16, 2021 7:23 pm

Code: Select all

Sub Main()
   /potionbelt activate 1
   /delay 12s      
   /echo attempting to target ${Spawn[npc Guild_Hall]}
   /target ${Spawn[npc Guild_Hall]}
   /echo Targeted ${Target.CleanName}
   /delay 1s
   /say hail
   /delay 2s
   /notify LargeDialogWindow LDW_YesButton leftmouseup   
/End



This is what I have been using for some time. Just need to be careful as it won't target the character's spawn, just the closest. I used to run another macro to call the one above named guild_hall with a delay of 2s for each character. Delay might need to be adjusted as haven't used this in awhile.

Code: Select all

Sub Main()
   /bcaa //keypress esc
   /bct CharName //mac guild_hall
   /delay 2s
   /bct CharName //mac guild_hall
   /delay 2s
/End



For Group/Raid invites you can use autogroup.ini to set your group leaders. I just add every character in autogroup so no matter who asks they always accept.

niix

rmm10
Posts: 357

Re: Lucky Charm of Travel and dialog boxes

Post#4 » Sat Jan 16, 2021 7:59 pm

Thanks for the prompt replies, Able and Niixnec.

I am a bit miffed that targeting the fairy was as simple as /target Hall. I had tried guild, "guild hall", and guild_hall. Blech. I don't feel too bad about not knowing ${Spawn[npc Guild_Hall]}...I still have not quite gotten the hang of using most of the TLOs like that. They make sense to me when I see them, and I can usually modify examples that I come across, but creating them from scratch is still just out of reach.

Niixnec, the macro you mentioned for having multiple toons use the guild fairy would not work with the Lucky Charm. It poofs right after being used once. The toon that uses the fairy does not have to be the one who called it, but after one use POOF and it has to be recast.

How did you guys come up with the dialog box command? Did you see an example of it somewhere? Did someone tell you? Do you have secret documentation for it? 8-)

User avatar
Nexor
Posts: 495

Re: Lucky Charm of Travel and dialog boxes

Post#5 » Sun Jan 17, 2021 11:56 am

Team Nexor

Fexor - Fexxor - Nexxor - Nexia - Nexxia - Nexis - Nexxis - Gnex

rmm10
Posts: 357

Re: Lucky Charm of Travel and dialog boxes

Post#6 » Sun Jan 17, 2021 4:59 pm

Thats the MQ2 wiki that I mentioned, which is supposed to be the "new up-to-date" docs. And when you look up the /notify command, it does give some rules and some examples. Here is the command:

/notify windowname 0|controlname [ notification [data] ]


Where is the list of possible dialog box names? How do find out the name of a dioalog box? When you look at two dialog box names that I have used, you can see that neither of them are in the examples.

And what is the format of controlname? How do I figure it out?

There is a good, informative table for [ notification [data] ].
Last edited by rmm10 on Sun Jan 17, 2021 5:02 pm, edited 1 time in total.

rmm10
Posts: 357

Re: Lucky Charm of Travel and dialog boxes

Post#7 » Sun Jan 17, 2021 5:01 pm

User kaen01, over at the MQ2 discord server, gave me some info on how to figure out the answer "what is the name of the dialog box" but I'm not sure if anyone here wants to know.

User avatar
Nexor
Posts: 495

Re: Lucky Charm of Travel and dialog boxes

Post#8 » Sun Jan 17, 2021 5:26 pm

Team Nexor

Fexor - Fexxor - Nexxor - Nexia - Nexxia - Nexis - Nexxis - Gnex

rmm10
Posts: 357

Re: Lucky Charm of Travel and dialog boxes

Post#9 » Sun Jan 17, 2021 6:49 pm

Ugh, now that its pointed out to me...I did not think of Searching using one of the dialog box names. I just assumed that the wiki article would have had a link to it.

Nexor, thank you for doing the things that I have not thought of. 8-)

Return to “Third party software”

Who is online

Users browsing this forum: No registered users and 1 guest

cron