Wir haben festgestellt, dass Euer Browser keine Cookies akzeptiert. Bitte erlaubt die Verwendung von Cookies in den Optionen Eures Browsers, um eine optimale Funktion dieser Webseite zu gewährleisten.
Ergebnis 1 bis 4 von 4
  1. #1
    Registriert seit
    17.06.2009
    Ort
    UK
    Beiträge
    1.463

    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.
    Geändert von Galuhad (30.09.2012 um 21:51 Uhr)
    Galuhad | Narvelan
    Lore Breakers of Eldar

  2. #2
    Registriert seit
    25.03.2007
    Beiträge
    1.212
    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.
    Geändert von Garan (01.10.2012 um 01:09 Uhr)

  3. #3
    Registriert seit
    17.06.2009
    Ort
    UK
    Beiträge
    1.463
    Zitat Zitat von Garan Beitrag anzeigen
    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.
    Galuhad | Narvelan
    Lore Breakers of Eldar

  4. #4
    Registriert seit
    23.05.2008
    Beiträge
    216
    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!

 

 

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

Diese Formular-Sitzung ist abgelaufen. Du musst die Seite neu laden.

Neu laden