public static bool UseItemType(ItemType type, uint targetUID) { if (Client.InventoryItems.Where(x => x.Value.Type == type).Count() > 0) { SroClient.UseItem(Client.InventoryItems.First(x => x.Value.Type == type).Key, targetUID); return(true); } else { return(false); } }
public static bool UseSkillName(string name, uint target) { if (Client.Skills.Where(x => x.TranslationName == name).Count() > 0) { SroClient.UseSpell(Client.Skills.Single(x => x.TranslationName == name).ObjRefID, target); return(true); } else { return(false); } }
public static bool UseItemType(ItemType type, byte otherItemSlot) { if (Client.InventoryItems.Where(x => x.Value.Type == type).Count() > 0) { SroClient.UseItem(Client.InventoryItems.First(x => x.Value.Type == type).Key, otherItemSlot); return(true); } else { return(false); } }