UO EC Macro with Command Actions - Tame, Rename, and Release with 1 Keypress

Arroth_ThaielArroth_Thaiel Posts: 1,060
edited May 2021 in Skills and Stats
https://forum.uo.com/discussion/comment/57850/#Comment_57850
Seth said:
@ Arroth_Thaiel
Do you happen to know any EC custom commands to rename a pet and release it? This helps to reduce some time during taming training.  I tried searching around and found someone also asked about this a long time ago in another forum.

Here are the steps for a rename/release macro. "Script" are input via Actions > Other > Command:


1. Target the pet - the macro will only work if the pet is the subject of the target window


2. Call the target's context menu
script RequestContextMenu(TargetWindow.TargetId)

3. Execute Rename from the context menu
script ContextMenu.ExecuteMenuItem(919)

4. Enter the new name - whatever you want in place of PetNameHere
script TextEditBoxSetText( "RenameWindowTextEntryBox", L"PetNameHere" )

5. Submit the name
script RenameWindow.OnSubmit()

6. Say "PetNameHere Release" - Must be identical to the new name in Step 4.


7. Close the context menu
script WindowSetShowing("ContextMenu", false)
You can probably close the context menu earlier, but I was only able to get it to work at the end of the macro.



If you want to get fancy, you can add more instructions at the beginning of the macro: SmartTarget Nearest, then Tame, then delay, then Target Nearest Follower. The whole sequence can be executed with one keypress. 

So, the whole macro would look like:

SmartTarget Nearest (Filter - Mobiles Bar)
Tame (right click - Target Current)
Delay (12.0s or so)
Target Nearest Follower
Call Target Context Menu (Command Action)
Execute Rename (Command Action)
Enter NewPetName (Command Action)
Submit (Command Action)
Say NewPetName Release
Close Context Menu (Command Action)

Set hotkey (spacebar is good) and enjoy.

Takes a bit to setup, but makes taming training a lot easier.

Good luck!
-Arroth
Tagged:

Comments

  • SethSeth Posts: 2,926

    Thank you so much for helping with this! I just tested and it works beautifully. In my case, I created a macro starting from "target nearest follower" part.

    I propose to keep codes like this somewhere, either a special category for EC UI (like stratics) or uo wiki for easier reference by future EC users.
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • MariahMariah Posts: 3,243Moderator
    I did make a page and ask for suggestions. Which macros would you like added?

  • SethSeth Posts: 2,926
    Thanks for the update, I didn't notice that page. I think the above macro is good.

    I will try to figure out how to make honor self without the need to manually press the confirmation button. They have this in Pinco as well.
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • SethSeth Posts: 2,926
    edited June 2021
    I was also trying to look for the this under GGManager.lua

    This is using honor virtue, and targeting self. There is a direct action for this but I would like to automatic click Okay esp. in the heat of battle.


    I was looking for the reference to this gump so that I can press the Okay button like the way we did with the harvesting gump. However, I could not find any reference that point to this. I even tried to create some but they don't work.

    Are you able to point me to the right direction?

    There appears to be just one reference to "Honor" in ggmanager, but i think this should only be the honor info gump.

    GGManager.WindowName[10011] = "GUMP_VIRTUE_INFO" -- "GUMP_VIRTUE_HONOR"

    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • MariahMariah Posts: 3,243Moderator
    Experimenting with the tame & release macro I'm finding that 'smart target nearest mobile' instead of targeting the bear I'm standing next to insists on targeting a mongbat half a screen away.
    I have better success with a straight forward 'target nearest mobile'.  (actually, I've never got the 'smart' target options to do anything useful)
  • Arroth_ThaielArroth_Thaiel Posts: 1,060
    The EC can be a bit...wonky.

    Sometimes the targeting system works very well for me, other times not. When I was messing with this macro, smart target was working perfectly. Now, it's not working at all.

    I would follow Mariah's suggestion and use "Target Nearest Mobile" and ignore the smart targeting system.


    ---
    Seth, I'm not sure what you're asking. There is a direct action but you still want to pull and use the gump?
    -Arroth
  • MariahMariah Posts: 3,243Moderator
    I have now added that macro to the page, subject to the site update. I hope I have explained it clearly.
  • SethSeth Posts: 2,926
    edited June 2021
    Yes, same thing. I always use "target nearest mobile" and works ok. For warriors, I use "target nearest hostile".

    Regarding the honor self confirmation gump, currently my macro is:
    1) Activate Honor (its an action in EC)
    2) Wait for cursor
    3) Targetself.

    Ok, after that this confirmation gump pops up and I have to click "OK" to accept.

    So, instead of clicking manually I wish to add a command:
    4) Script to press the "Ok" button in the above gump.

    There are several times when I am in the middle of a messy fight where clicking the Ok button means some delay on my warrior. So when I click the above macro I want honor self automatically, i.e. without the need to press the button manually (edit).

    I recall this function is available in Pinco, but I could not figure out what he did to make this auto-confirm.

    Thanks, much appreciated!

    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • SethSeth Posts: 2,926
    It is probably something like this:
    script GumpsParsing.PressButton(?????,2)

    But I could not locate the ????? ID for the gump.


    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • Arroth_ThaielArroth_Thaiel Posts: 1,060
    edited June 2021
    Seth said:
    @ Arroth_Thaiel
    It is probably something like this:
    script GumpsParsing.PressButton(?????,2)

    But I could not locate the ????? ID for the gump.




     Go put $5 in Pinco's UI project...
    script GumpsParsing.PressButton(9070, 1)

    You may need a Delay after "TargetSelf" and before the Command. Otherwise you might be telling the server to push Okay on a gump that hasn't been registered yet. I went with a 2s Delay, but that can probably be less.
    -Arroth
  • SethSeth Posts: 2,926
    Thanks Arroth, 1 sec delay works, and I will try a shorter one soon. I figured it was some generic gump but could not find any reference to that. It would be good if there is a more detailed reference in his custom UI doc so its easier to find them.
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
Sign In or Register to comment.