Originally Posted by
.Zer0
Could you post The output you get with this ?
Pure just item names or also The item ids
Well it's dependent on what character you click.. not sure I understand what ya mean?
To get an item name etc. you simply
Code:
private static void fillInvList()
{
if (SelectedEntity == null || SelectedEntity.Controller.Id == ServerID)
return;
Entity player = SelectedEntity;
Container playerInv = player.GetContainerOfType(CollectionTypes.Inventory);
playerInventory = playerInv.Contents.ToList();
int count = 0;
foreach (var item in playerInventory)
{
if (item != null && item.Name != null)
{
GUI.Label(new Rect(0, (20 * count), 195, 20), string.Format("{0} : {1}", item.Name, item.StackAmount), PlayerListBtnStyle);
count++;
}
}
}
Above makes a list of selected entities inventory, "ItemName : StackAmount".
Etc. "Stone : 159"
Output
Sometimes I get empty fields, not entirely sure why..
Edit: Likely due to empty stacks that used to be items in the player's inventory. Changed for loop to foreach.
As for your Data question
From what I can see everything appear to be stored in .dat files
In the location: <Username>\AppData\LocalLow\CodeHatch\Reign Of Kings\Slot0