Il semble que les cookies ne soient pas activés dans votre navigateur. Veuillez activer les cookies pour garantir une expérience du site optimale.
Affichage des résultats 1 à 4 sur 4
  1. #1
    Date d'inscription
    juin 2009
    Localisation
    UK
    Messages
    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.
    Dernière modification par Galuhad ; 30/09/2012 à 20h51.
    [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
    Date d'inscription
    mars 2007
    Messages
    1 171
    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.
    Dernière modification par Garan ; 01/10/2012 à 00h09.

  3. #3
    Date d'inscription
    juin 2009
    Localisation
    UK
    Messages
    1 461
    Citation Envoyé par Garan Voir le message
    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
    Date d'inscription
    mai 2008
    Messages
    215
    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!

 

 

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •  

La session de ce formulaire a expiré. Vous devez recharger la page.

Recharger