Jump to content


Photo

LUA: Equip an item with ID=X to a Slot


    4 replies to this topic

    #1 Skyrant

    Skyrant

      Member

    • Members
    • PipPip
    • 27 posts

      Posted 30 October 2014 - 10:19 PM

      How do i equip an item to a slot? Let's say i want to change ammo for ranger.

       



      #2 Iryoku

      Iryoku

        Advanced Member

      • Windower Staff
      • 488 posts

        Posted 31 October 2014 - 12:40 AM

        The function you're looking for is windower.ffxi.set_equip. However, the function takes an inventory index, not an item id, so you'll need to search the inventory for the item you want to equip.

         

        In most cases you should probably just use gear swap though, which abstracts away most of the messy details.



        #3 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 31 October 2014 - 06:16 AM

        I don't even think set_equip was adjusted to work with the Wardrobe yet... I'll have to add that functionality today.



        #4 Iryoku

        Iryoku

          Advanced Member

        • Windower Staff
        • 488 posts

          Posted 31 October 2014 - 07:30 AM

          I don't even think set_equip was adjusted to work with the Wardrobe yet... I'll have to add that functionality today.

           

          It's documented that it does, and I'm pretty sure I remember discussing wardrobe support the day of that update.



          #5 Arcon

          Arcon

            Advanced Member

          • Windower Staff
          • 1189 posts
          • LocationMunich, Germany

          Posted 31 October 2014 - 09:30 AM

          Less work for me!






          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users