Command Function help please? Load shuriken belt

Years ago I had a uoa macro to load shuriken into a belt, stacking 5 x 2s then dropping out the 1 x 10 for putting on a vendor. I want to do the same thing with EC.  There's a function listed in 'items and abilities' but I can't make it actually work.

Comments

  • Arroth_ThaielArroth_Thaiel Posts: 1,058
    edited September 2023
    Petra,

    Actions>Items/Abilites>Load Shurikens is designed to work with an equipped ninja belt. It won't do anything with belts in your backpack.

    Equip the belt, have shuriken stacks in your backpack, click "Load Shurikens". It will work fine.


    --
    You can use the context menu on the belt to create macros to load/unload belts. I'll see if I can look up the context menu calls for it later today.



    --
    Context Menu: Load Ninja Belt = 701
    Context Menu: Unload Ninja Belt = 702

    To load a belt in your backpack: have the belt and stacks of shuriken in your backpack, then create and execute the following macro (7 steps):


    Target By Type : Belt
    script RequestContextMenu(TargetWindow.TargetId)
    script ContextMenu.ExecuteMenuItem(701)
    Wait for Target Cursor
    Target By Type : Shuriken
    Delay 1s
    script WindowSetShowing("ContextMenu", false)

    Adjust the delay as needed. Set your repeats to however many stacks you want to load into the belt. If you don't care about the menu being open, you can copy the first six steps over and over, then just close the menu once at the end of the macro.

    The macro should look like something this:




    --
    To unload a belt in your backpack: create and execute the following macro (4 steps):

    Target By Type : Belt
    script RequestContextMenu(TargetWindow.TargetId)
    script ContextMenu.ExecuteMenuItem(702)
    script WindowSetShowing("ContextMenu", false)

    The macro should look something like this:


    You may need to add a Delay prior to closing the context window.
    -Arroth
  • ForeverFunForeverFun Posts: 881
    edited September 2023

    As an optimization, you can specify the objectId's of the belt(s) in question.


    In the examples in that thread,
    change 940 -> 701 (load)
    change 941 -> 702 (unload)

    Your scripts then become one line for each belt to load / unload.  
    you may need to put a delay between each load/unload operation.
  • Petra_FydePetra_Fyde Posts: 1,444
    Thank you!  I should have thought of equipping the belt!  I know a lot about this game, but I am aware I don't know enough. Thank you for adding to my knowledge :D
  • Thank you!  I should have thought of equipping the belt!  I know a lot about this game, but I am aware I don't know enough. Thank you for adding to my knowledge :D
    When I saw your post yesterday, first thing I did was grab a ninja belt (in my backpack) and put Load Shurikens on a hotbar, which did nothing. Then I tried it in a macro, which also did nothing. Then I tried it with some different delays, thinking it might need time to process, but nothing worked. I bet I pushed the button 20 times.

    Then I thought, "what am I doing, why don't I just read the action and see what it does?" DUH!

    Sure enough, one of the first lines of the function is a check to make sure the belt is on your paperdoll. Facepalm.

    So, I equipped the belt and Load Shurikens worked on the first try. Facepalm 2.


    --
    You're not the only one who is still surprised by UO.
    -Arroth
Sign In or Register to comment.