Enhanced Client and Use item by type issues

SarkonSarkon Posts: 61
This might not be a bug, but me just making a mistake.  I have a macro created to use Peacemaking, then use item by type.  I edit the use item by type icon and click drums.  I have lots of drums in my backpack.  All on the first layer, not in another pack.  I have tried placing a wait for target icon in between, but I still can't get the Enhanced Client to target another drum after one runs out of charges.  I have done this before, so I know it is possible, but can't remember how I sat the macro up in order to make the use item type go to the next one.  I would assume the setup is the same if using the provoke or discord mastery in order to make the EC see the other instruments in my pack and switch when one is destroyed.  Any help remembering how this was done is much appreciated.

Comments

  • PawainPawain Posts: 8,802
    dbl clk the one you want to use?
    Focus on what you can do, not what you can't.
  • ForeverFunForeverFun Posts: 771
    You want:
    "Target by type" -> select instrument in pack
    "Use Targeted Object"

    Note the color/hue of the instrument needs to match what was selected at "Target by type".  (This can be used to good effect, e.g. if you are using flutes of renewal, just use dyes on them to differentiate the colors for macro purposes).


  • "Target by type" -> select instrument in pack
    "Use Targeted Object"
    When I put that into a macro and run the macro, I just get a system message saying "Unknown command."
    What am I doing wrong?
  • TimStTimSt Posts: 1,759
    Thrakkar said:
    "Target by type" -> select instrument in pack
    "Use Targeted Object"
    When I put that into a macro and run the macro, I just get a system message saying "Unknown command."
    What am I doing wrong?

    Are you using the targeting actions "Target by type" and "Use Targeted Object" or did you use the "Command" action and type in Target by type and Use Targeted Object?
  • ThrakkarThrakkar Posts: 46
    edited November 2023
    I am using the two actions from the "Targeting" category as listed here:

    I created two macros with those, one targeting an instrument, one targeting a spellbook:
                <UserAction type="Macro" id="7" iconId="0" name="Macro7" repeatEnabled="false" repeatCount="2" binding="">
    <UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="" />
    <UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
    </UserAction>
    <UserAction type="Macro" id="8" iconId="0" name="Macro8" repeatEnabled="false" repeatCount="2" binding="">
    <UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="" />
    <UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
    </UserAction>
    Since both macros look exactly the same, I'm not surprised, it does not work.
  • TimStTimSt Posts: 1,759
    The first action in both macros have no action command in the text field.

    You want something that looks like:
                <UserAction type="Macro" id="1" iconId="0" name="Use Flute by type" repeatEnabled="false" repeatCount="2" binding="">
    <UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="script Actions.TargetByType(10247, 1193)" />
    <UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
    </UserAction>

    <UserAction type="Macro" id="3" iconId="0" name="Use harp by type" repeatEnabled="false" repeatCount="2" binding="">
    <UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="script Actions.TargetByType(3762, 0)" />
    <UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
    </UserAction>




  • Okay.
    That XML I posted was saved by the game. Weird, that the text field was empty...
    Besides, I don't really know all the object type ids, so it probably will be hard for me to manually maintain that property.

    Does look like a bug though, if the value of that property isn't properly set.
  • ForeverFunForeverFun Posts: 771
    edited November 2023
    The simpler way in EC is  ... just drag the instrument (drum, flute, etc) from your main pack to the start of your barding macro.  You'll see a graphic showing the instrument and number of charges remaining.

    The written macro for that action will look something like:

    <UserAction type=UseObjectType ...

  • Arnold7Arnold7 Posts: 1,278
    edited November 2023
    Not an expert macro writer, but do use them some.  Think EC macro actions are set pretty much set in stone and don’t really allow for a lot of flexibility as they can’t be modified.  There are also a limited number of them.  Think your options are to write separate macros one for the drum you want to use and then a second for it’s replacement.  Then when you realize the first drum is gone start using the other one, just use a hot key sequence you can remember.  Or, just edit the first macro when the drum is almost used up and replace it with the second drum.  Don’t think EC’s macro system allows for the use of if statements.  When I was using the in game macro system more, I found the macro system for EC useful but quite limited when it came to writing complex macros as there just were not enough game provided action commands, and trying to modify macros with more than just a few actions was a nightmare as you never knew how the macro would rearrange when you moved or added an action.  Think simplest solution would just be to write two macros and always use the same hot key sequence.                            Have no idea how to access the system the other macro writers are using in this discussion.
  • The simpler way in EC is  ... just drag the instrument (drum, flute, etc) from your main pack to the start of your barding macro.  You'll see a graphic showing the instrument and number of charges remaining.
    OMG, the most simple solutions we never think of :D
    Works like a charm. Thanks!

    Small correction: It is not the number of charges remaining, but the number of items of that type.

  • ThrakkarThrakkar Posts: 46
    edited November 2023
    Arnold7 said:
    you never knew how the macro would rearrange when you moved or added an action
    Hmm, never had this issue.
    Clearing and action never rearranged the remaiing ones for me.
    Also inserting or adding a new action works without issues for me.

    TBH, if I write a more complex macro, I just make sure the individual actions are there. Log out and do the actual writing in Notepad++ ;)

  • Arnold7Arnold7 Posts: 1,278
    edited November 2023
    Really, maybe it’s been fixed or you are just more accurate than I am at inserting actions.  But for me the order of the actions changed quite often so that after adding an action I usually had to rearrange the order back to what it was after making a change.
  • MariahMariah Posts: 2,895Moderator
    Arnold7 said:
    Really, maybe it’s been fixed or you are just more accurate than I am at inserting actions.  But for me the order of the actions changed quite often so that after adding an action I usually had to rearrange the order back to what it was after making a change.

    I think you will find that is a problem in classic client, not enhanced.
Sign In or Register to comment.