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
  1. #1
    Join Date
    Jun 2009
    Location
    UK
    Posts
    1,461

    Item Quickslot from Inventory

    Hi,

    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:

    Code:
    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 08:51 PM.
    [CENTER][SIZE=3][B]Galuhad | Narvelan[/B]
    Lore Breakers of Eldar[/SIZE]

    [URL="http://www.lotrointerface.com/list.php?skinnerid=3762"]Plugins[/URL] | [URL="https://www.lotro.com/forums/showthread.php?538975-Accounts-for-New-Players"]New Player Guide[/URL] | [URL="http://www.twitch.tv/galuhad"]Twitch[/URL]
    [/CENTER]

  2. #2
    Join Date
    Mar 2007
    Posts
    1,174
    Unfortunately, you can not at this time programatically populate a quickslot strictly from the information exposed by the backpack. You can use ItemControls using the SetItem() method to create UI elements for backpack items. After RoR is released, you can use ItemInfoControls which may eliminate some of the ItemControl issues but still require an actual Item from which the ItemInfo object is derived.

    There are already several threads in the Future API Request & Discussion forum requesting the ability to either retrieve ItemIDs from Item objects or create a Shortcut to an Item via a SetItem method or something similar in order to bridge this gap in functionality. My request was back in Feb 2011, http://forums.lotro.com/showthread.p...Item-GetData() You actually made a request that included this back in January of this year, http://forums.lotro.com/showthread.p...Class-Requests, another thread is from Stever1388,http://forums.lotro.com/showthread.p...e-the-Shortcut and I'm pretty sure there are others. Bottom line is that it is a known issue and the best we can do is keep reminding the devs that it is a desired functionality.
    Last edited by Garan; Oct 01 2012 at 12:09 AM.

  3. #3
    Join Date
    Jun 2009
    Location
    UK
    Posts
    1,461
    Quote Originally Posted by Garan View Post
    Unfortunately, you can not at this time programatically populate a quickslot strictly from the information exposed by the backpack. You can use ItemControls using the SetItem() method to create UI elements for backpack items. After RoR is released, you can use ItemInfoControls which may eliminate some of the ItemControl issues but still require an actual Item from which the ItemInfo object is derived.

    There are already several threads in the Future API Request & Discussion forum requesting the ability to either retrieve ItemIDs from Item objects or create a Shortcut to an Item via a SetItem method or something similar in order to bridge this gap in functionality. My request was back in Feb 2011, http://forums.lotro.com/showthread.p...Item-GetData() You actually made a request that included this back in January of this year, http://forums.lotro.com/showthread.p...Class-Requests, another thread is from Stever1388,http://forums.lotro.com/showthread.p...e-the-Shortcut and I'm pretty sure there are others. Bottom line is that it is a known issue and the best we can do is keep reminding the devs that it is a desired functionality.
    Thank you for replying. I do remember the post I made, but I was more confused this time that creating an item shortcut didn't seem to be accepting an item in its parameters - which does in itself seem really odd. But I suppose I'll have to find some alternative way of presenting the information I need until they fix this.
    [CENTER][SIZE=3][B]Galuhad | Narvelan[/B]
    Lore Breakers of Eldar[/SIZE]

    [URL="http://www.lotrointerface.com/list.php?skinnerid=3762"]Plugins[/URL] | [URL="https://www.lotro.com/forums/showthread.php?538975-Accounts-for-New-Players"]New Player Guide[/URL] | [URL="http://www.twitch.tv/galuhad"]Twitch[/URL]
    [/CENTER]

  4. #4
    I wish they would finally add a MYBACKPACK:GetItem(index):GetD ata() so you could populate quickslots from the backpack without having to first have the user move the item from the backpack to the quickslot. This would make creating different quickslots a lot easier (morale/power/ailment bars for example), and would also finally allow us to fix the bug where an item from the backpack runs out, and a new stack of the item is reintroduced to the backpack, but the quickslot no longer works (or will only work after clicking it a few times).

    Or if they would just fix that bug, that would be an acceptable alternative. I'm not holding my breath though!

 

 

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.

Reload