private void LoadBuild() { if (!File.Exists(buildFile)) { if (!sugBuild.Equals(string.Empty)) { LoadInternalBuild(); } return; } try { string s = File.ReadAllText(buildFile); if (s.Equals(string.Empty)) { Chat.Print("Auto Buddy Plus: the build is empty."); LoadInternalBuild(); return; } foreach (ItemAction ac in DeserializeBuild(s)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); } } catch (Exception e) { Chat.Print("Auto Buddy Plus: couldn't load the build."); LoadInternalBuild(); Console.WriteLine(e.Message); } }
private void Chat_OnInput(ChatInputEventArgs args) { if (args.Input.ToLower().StartsWith("/b ")) { args.Process = false; string itemName = args.Input.Substring(2); LoLItem i = BrutalItemInfo.FindBestItem(itemName); Chat.Print("Buy " + i.name); if (myBuild.Count == 0 && !i.groups.Equals("RelicBase")) { AddElement(BrutalItemInfo.GetItemByID(3340), ShopActionType.Buy); Chat.Print("Added also warding totem."); } AddElement(i, ShopActionType.Buy); SaveBuild(); } else if (args.Input.ToLower().StartsWith("/s ")) { args.Process = false; string itemName = args.Input.Substring(2); LoLItem i = BrutalItemInfo.FindBestItemAll(itemName); Chat.Print("Sell " + i.name); AddElement(i, ShopActionType.Sell); SaveBuild(); } else if (args.Input.ToLower().Equals("/buyhp")) { if (myBuild.Count == 0) { AddElement(BrutalItemInfo.GetItemByID(3340), ShopActionType.Buy); Chat.Print("Added also warding totem."); } AddElement(BrutalItemInfo.GetItemByID(2003), ShopActionType.StartHpPot); SaveBuild(); args.Process = false; } else if (args.Input.ToLower().Equals("/stophp")) { if (myBuild.Count == 0) { AddElement(BrutalItemInfo.GetItemByID(3340), ShopActionType.Buy); Chat.Print("Added also warding totem."); } AddElement(BrutalItemInfo.GetItemByID(2003), ShopActionType.StopHpPot); SaveBuild(); args.Process = false; } }
private void LoadInternalBuild() { try { if (sugBuild.Equals(string.Empty)) { Chat.Print("Auto Buddy Plus: internal build is empty."); return; } foreach (ItemAction ac in DeserializeBuild(sugBuild)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); } } catch (Exception e) { Chat.Print("Auto Buddy Plus: internal build load failed."); Console.WriteLine(e.Message); } Chat.Print("Auto Buddy Plus: loaded internal build(change it if you want!)."); }
private void LoadInternalBuild() { try { if (sugBuild.Equals(string.Empty)) { Chat.Print("AutoBuddy: mevcut build yok."); return; } foreach (var ac in DeserializeBuild(sugBuild)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); } } catch (Exception e) { Chat.Print("AutoBuddy: mevcut build yuklemesi basarisiz."); Console.WriteLine(e.Message); } Chat.Print("AutoBuddy: mevcut build yuklendi."); }
private void LoadInternalBuild() { try { if (sugBuild.Equals(string.Empty)) { Chat.Print("AutoBuddy (LegendaryBot Custom by James): internal build is empty."); return; } foreach (var ac in DeserializeBuild(sugBuild)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); } } catch (Exception e) { Chat.Print("AutoBuddy (LegendaryBot Custom by James): internal build load failed."); Console.WriteLine(e.Message); } Chat.Print("AutoBuddy (LegendaryBot Custom by James): Internal build loaded."); }
private void LoadBuild() { LoadInternalBuild(); return; if (!File.Exists(buildFile)) { Chat.Print("Custom build doesn't exist: " + buildFile); if (!sugBuild.Equals(string.Empty)) { LoadInternalBuild(); } return; } try { var s = File.ReadAllText(buildFile); if (s.Equals(string.Empty)) { Chat.Print("AutoBuddy: the build is empty."); LoadInternalBuild(); return; } foreach (var ac in DeserializeBuild(s)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); Console.Write("Custom Build Loading "); } Chat.Print("Loaded build from: " + buildFile); } catch (Exception e) { Chat.Print("AutoBuddy: couldn't load the build."); LoadInternalBuild(); Console.WriteLine(e.Message); } }
private void LoadBuild() { if (!File.Exists(buildFile)) { Chat.Print("Ozel build yok: " + buildFile); if (!sugBuild.Equals(string.Empty)) { LoadInternalBuild(); } return; } try { var s = File.ReadAllText(buildFile); if (s.Equals(string.Empty)) { Chat.Print("AutoBuddy: build yok."); LoadInternalBuild(); return; } foreach (var ac in DeserializeBuild(s)) { AddElement(BrutalItemInfo.GetItemByID(ac.item), ac.t); Console.Write("Ozel Build Yukleniyor "); } Chat.Print("Yuklu build: " + buildFile); } catch (Exception e) { Chat.Print("AutoBuddy: build yuklenemedi."); LoadInternalBuild(); Console.WriteLine(e.Message); } }