We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jun 2009

    Item Quickslot from Inventory


    Could anyone explain to me setting a shortcut for an item in your inventory please? I'm finding it increasingly frustrating. Basically I want to check if an item exists in the players backpack by looping through the players inventory, then if the item is found assign it to a quickslot. The code I'm using is below:

    scInvItem:SetShortcut(Turbine.UI.Lotro.Shortcut(Turbine.UI.Lotro.ShortcutType.Item, MYBACKPACK:GetItem(INDEX)));
    However I keep getting the following message:

    ... Rings Online\Plugins\Turbine\UI\Lotr o\Quickslot.lua:11: Invalid shortcut for quickslot specified.

    I have no idea what I'm doing wrong. I can assign a quickslot if I know the items hex ID.. though to my knowledge there is no easy way of getting this without dragging an item to a quickslot and calling GetData(). It doesn't make sense that I for some reason can't pass an Item when the shortcuts type is in fact Item.

    Any ideas anyone please?

    Edit: The SetShortcut is protected by an If..then clause which does a nil check on MYBACKPACK:GetItem() to prevent errors caused by empty inventory positions.
    Last edited by Galuhad; Sep 30 2012 at 09:51 PM.
    Galuhad | Narvelan
    Lore Breakers of Evernight (formally of Eldar) | Plugins



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

This form's session has expired. You need to reload the page.