Get item name from ID

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Liposo
Plain Yogurt
Plain Yogurt
Posts: 59
Joined: 20 May 2013, 02:00
Noob?: No

Get item name from ID

#1 Post by Liposo »

How can I get the item name from item ID?

For example, I got this variable:

Code: Select all

$args->{player}{weapon}
But

Code: Select all

$args->{player}{weapon}{name}
Gives me error about strict refs.

vitriol
Plain Yogurt
Plain Yogurt
Posts: 61
Joined: 19 Apr 2011, 23:26
Noob?: No

Re: Get item name from ID

#2 Post by vitriol »

does $args->{player}{weapon} refer to an inventory index, an item ID number, or an item name?

you can use Data::Dumper and watch your console to see the contents

use Data::Dumper;
message (Dumper(\%args),'test',0);


If it is an item ID, and if I am not mistaken, you can use this from InventoryList.pm :

Actor::Item $InventoryList->getByNameID(Bytes nameID)

Post Reply