Quantcast Item information - LoTROInterface
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Tutorials & Other Helpful Information (L)

Reply
Thread Tools Display Modes
  #1  
Unread 04-26-2017, 05:11 PM
gillothrin gillothrin is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Apr 2017
Posts: 6
Item information

Hello, is there any way of getting the item's name from a

Item Removed: <Examine:IIDDID:0x0000000000000000:0x7002B018>[Medallions]<\Examine>.

chat entry? The problem in this case is the plural form of the names and I would want the singular form of it.
Reply With Quote
  #2  
Unread 04-26-2017, 06:34 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 221
Yes. You already have an item ID, "0x0000000000000000:0x7002B018"
The "0x0000000000000000" is a unique item identifier (in this case not specified) and the "0x7002B018" is the generic item id part.

If the generic part is 0, then the unique part MUST be specified, otherwise you can use the generic part. In this case, the easiest thing to do is just use the entire "0x0000000000000000:0x7002B018".
To use the itemID to create a shortcut, you have to replace the ":" with a "," like "0x0000000000000000,0x7002B018"

You can use that item ID to create a shortcut and then use the getItem method of the shortcut to get an Item. I would not suggest using the GetName method of the Item object, rather use GetItemInfo() to get an ItemInfo structure and use the GetName() from that (the GetName on the Item is a deprecated function and may not be supported at some point).

I will forgo the parsing and just assign the id to a variable, but you should be able to parse it easily enough.

Code:
  local itemId="0x0,0x7002B018"
  local name="undefined"
  local sc=Turbine.UI.Lotro.Shortcut(Turbine.UI.Lotro.ShortcutType.Item,itemId)
  if sc~=nil then
    local item=sc:GetItem()
    if item~=nil then
      local ii=item:GetItemInfo()
      if ii~=nil then
        name=ii:GetName()
      end
    end
  end
In this case, name="Medallion". Of course, you would want some error messages if sc, item or ii were ever nil, etc. but you should get the gist.

Last edited by Garan : 04-26-2017 at 06:45 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modular information display Hyoss General Authoring Discussion (L) 2 12-30-2013 07:59 PM
U7 Item ID Changes detected from Item Scanner lunarwtr General Authoring Discussion (L) 0 05-18-2012 08:10 PM
Additional Information Gathered for submitted Interface Uploads lunarwtr Site help, bugs, suggestions/questions 0 12-27-2011 02:47 PM
Zone & Area Information lunarwtr General Authoring Discussion (L) 1 02-25-2011 11:14 PM
Turbine Advisory: Protect Your Private Information Cairenn News 0 09-11-2007 12:20 AM


All times are GMT -5. The time now is 03:31 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui