Originally Posted by
ottizy
Is your Move method working?
probably; I think I know the problem with it. I put a number before the bp name when I assign the bp to the item, but I don't change the actual bp's name. So, that's probably why it's not moving. And, would something like this work?
Code:
Private Function Lootitems()
My.Settings.deadlocs.Clear()
For Each dead As Creature In c.BattleList.GetCreatures
If dead.HPBar = 0 Then
My.Settings.deadlocs.Add(dead.Location.ToString)
For Each bodyloc As String In My.Settings.deadlocs
For Each square As Tile In c.Map.GetTiles
If square.Location.ToString = bodyloc Then
For Each deadbody As Item In square.Items
If deadbody.Name.Contains("Dead") Or deadbody.Name.Contains("Slain") Or deadbody.Name.Contains("Remains") Then
p.Walk(bodyloc)
c.Inventory.UseItemOnTile(deadbody.Id, square)
End If
Next
End If
Next
Next
End If
Next
For Each body As Container In inventory.GetContainers
If body.Name.Contains("Dead") Or body.Name.Contains("Slain") Or body.Name.Contains("Remains") Then
For Each loooot As Item In body.GetItems
For Each poo As LootItem In ListBox3.Items
If poo.Text = loooot.Id Then
For Each bp As Container In inventory.GetContainers
If poo.BP = bp.Name Then
tobp.ContainerId = bp.Id
loooot.Move(tobp)
End If
Next
End If
Next
Next
End If
Next
Return True
End Function