Hello All
I am trying to custom my NPC'S to loot body's and then Equated if its batter then what they have on.
I got it to loot but its not looting all items at ones

public override bool CanRummageCorpses{ get{ return true; } }

But cant get the Auto Equated right

base.OnThink();
EquipItem(new WarAxe());

All that do is Spawn the item in there hand.

Any ideas
Thanks for looking
 
You''ll need to do a check on items in backpack and compare them then give the item that you want to equip, cast to a reference and use that reference to be called in the EquipItem(CastedItem);

To get all items into a list so you can evaluate, you use something like this
List<Item> searcheditems = mobile.Backpack.Items;

then check each item against your item, if better cast it and equip it!
 
Back