private static bool checkItemcount(ItemToShop its) { bool[] usedItems = new bool[7]; int itemsMatch = 0; foreach (int t in its.itemsMustHave) { //Game.PrintChat(t.ToString()); for (int i = 0; i < ObjectManager.Player.InventoryItems.Count(); i++) { if (usedItems[i]) { continue; } if (t != (decimal)ObjectManager.Player.InventoryItems[i].Id) { continue; } usedItems[i] = true; //Game.PrintChat("iasdgfasd"); itemsMatch++; break; } } return(itemsMatch == its.itemsMustHave.Count); }
public static bool hasAllItems(ItemToShop its) { try { bool[] usedItems = new bool[15]; int itemsMatch = 0; for (int j = 0; j < its.itemsMustHave.Count; j++) { for (int i = 0; i < player.InventoryItems.Count(); i++) { if (usedItems[i]) { continue; } if (its.itemsMustHave[j] == (int)player.InventoryItems[i].Id) { usedItems[i] = true; itemsMatch++; break; } } } return(itemsMatch == its.itemsMustHave.Count); } catch (Exception) { return(false); } }
public static void checkItems() { for (int i = defBuyThings.Count - 1; i >= 0; i--) { if (hasAllItems(defBuyThings[i])) { nextItem = defBuyThings[i]; return; } } }
public static void checkItemInventory() { if (!canBuyItems) { return; } for (int i = buyThings.Count - 1; i >= 0; i--) { if (!checkItemcount(buyThings[i])) { continue; } nextItem = buyThings[i]; if (i == buyThings.Count - 1) { canBuyItems = false; } return; } }
public void checkItems() { getItemPassiveBoostDps(); if (!canBuyItems) { return; } for (int i = buyThings.Count - 1; i >= 0; i--) { if (hasAllItems(buyThings[i])) { nextItem = buyThings[i]; if (i == buyThings.Count - 1) { canBuyItems = false; } return; } } }
public static void checkItemInventory() { if (!canBuyItems) { return; } for (int i = buyThings.Count - 1; i >= 0; i--) { //Game.PrintChat(i.ToString()); if (!checkItemcount(buyThings[i])) { continue; } nextItem = buyThings[i]; // Game.PrintChat("in"); if (i == buyThings.Count - 1) { canBuyItems = false; } return; } }
private static bool checkItemcount(ItemToShop its) { bool[] usedItems = new bool[7]; int itemsMatch = 0; foreach (int t in its.itemsMustHave) { for (int i = 0; i < Player.InventoryItems.Count(); i++) { if (usedItems[i]) { continue; } if (t != (decimal)Player.InventoryItems[i].Id) { continue; } usedItems[i] = true; itemsMatch++; break; } } return(itemsMatch == its.itemsMustHave.Count); }
public bool hasAllItems(ItemToShop its) { bool[] usedItems = new bool[7]; int itemsMatch = 0; for (int j = 0; j < its.itemsMustHave.Count; j++) { for (int i = 0; i < player.InventoryItems.Count(); i++) { if (usedItems[i]) continue; if (its.itemsMustHave[j] == (int)player.InventoryItems[i].Id) { usedItems[i] = true; itemsMatch++; break; } } } return itemsMatch == its.itemsMustHave.Count; }
public void checkItems() { getItemPassiveBoostDps(); if (!canBuyItems) return; for (int i = buyThings.Count - 1; i >= 0; i--) { if (hasAllItems(buyThings[i])) { nextItem = buyThings[i]; if (i == buyThings.Count - 1) { canBuyItems = false; } return; } } }
private static void Game_OnGameLoad(EventArgs args) { if (ObjectManager.Player.ChampionName != "Soraka") { return; } //InitializeSafeWardSpots(); //InitializeWardSpots(); allies = new List <Obj_AI_Hero>(); //BushRevealer c = new BushRevealer(); Q = new Spell(SpellSlot.Q, 970); W = new Spell(SpellSlot.W, 550); E = new Spell(SpellSlot.E, 925); R = new Spell(SpellSlot.R); //Game.PrintChat("in1"); ts = new TargetSelector(1025, TargetSelector.TargetingMode.AutoPriority); stufftosay = new[] { "brb", "need to b", "sec" }; deaths = new[] { "oops", "lol", "rip", "laggg" }; spawn = ObjectManager.Get <GameObject>() .First(x => x.Type == GameObjectType.obj_SpawnPoint && x.Team == ObjectManager.Player.Team) .Position; menu = new Menu("Soraka Slack", "slack", true); menu.AddItem(new MenuItem("on", "Start Slacking!").SetValue(new KeyBind(32, KeyBindType.Toggle))); menu.AddItem(new MenuItem("user", "Use R?").SetValue(true)); menu.AddItem(new MenuItem("usew", "Use W?").SetValue(true)); menu.AddItem(new MenuItem("allyhpw", "Ally % HP for W").SetValue(new Slider(30, 0, 93))); menu.AddItem(new MenuItem("wabovehp", "Use W when my hp > x%").SetValue(new Slider(20, 0, 99))); menu.AddItem(new MenuItem("allyhpr", "Ally % HP for R").SetValue(new Slider(30, 0, 50))); menu.AddItem(new MenuItem("hpb", "B if hp < %").SetValue(new Slider(15, 0, 80))); //Game.PrintChat("in2"); menu.AddSubMenu(new Menu("Follow:", "follower")); foreach (var ally in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsAlly && !x.IsMe)) { allies.Add(ally); if (ad.Contains(ally.ChampionName)) { menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(true)); } else { menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(false)); } } // Game.PrintChat("hi"); buyThings = new List <ItemToShop> { new ItemToShop() { goldReach = 500, itemsMustHave = new List <int> { 3301 }, itemIds = new List <int> { 3096 } }, new ItemToShop() { goldReach = 360, itemsMustHave = new List <int> { 3096 }, itemIds = new List <int> { 1004, 1004 } }, new ItemToShop() { goldReach = 500, itemsMustHave = new List <int> { 1004, 1004 }, itemIds = new List <int> { 1033 } }, new ItemToShop() { goldReach = 180, itemsMustHave = new List <int> { 1033, 1004, 1004 }, itemIds = new List <int> { 3028 } }, new ItemToShop() { goldReach = 325, itemsMustHave = new List <int> { 3028 }, itemIds = new List <int> { 1001 } }, new ItemToShop() { goldReach = 675, itemsMustHave = new List <int> { 1001 }, itemIds = new List <int> { 3009 } }, new ItemToShop() { goldReach = 400, itemsMustHave = new List <int> { 3009 }, itemIds = new List <int> { 1028 } }, new ItemToShop() { goldReach = 450, itemsMustHave = new List <int> { 1028 }, itemIds = new List <int> { 3067 } }, new ItemToShop() { goldReach = 400, itemsMustHave = new List <int> { 3067 }, itemIds = new List <int> { 1028 } }, new ItemToShop() { goldReach = 800, itemsMustHave = new List <int> { 1028 }, itemIds = new List <int> { 3211 } }, new ItemToShop() { goldReach = 700, itemsMustHave = new List <int> { 3211 }, itemIds = new List <int> { 3065 } }, new ItemToShop() { goldReach = 2900, itemsMustHave = new List <int> { 3065 }, itemIds = new List <int> { 3116 } } }; //Game.PrintChat("hi2"); // Game.PrintChat("in3"); var sequence = new[] { 1, 2, 3, 2, 2, 4, 2, 1, 2, 3, 4, 3, 3, 1, 1, 4, 1, 3 }; var level = new AutoLevel(sequence); gamestart = Game.Time; menu.AddToMainMenu(); nextItem = buyThings[0]; //Game.PrintChat("in4"); //ids = new[] { 3096, 1004, 1004, 1033, 1001, 3028, 3174, 3009, 1028, 3067, 1028, 3211, 3065, 3069, 1028, 2049, 2045 }; //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && menu.Item(x.ChampionName).GetValue<bool>()); //?? // ObjectManager.Get<Obj_AI_Hero>().First(x => !x.IsMe && x.IsAlly && ap.Contains(x.ChampionName)) ?? // ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && !x.IsMe); //if (follow != null) // followpos = follow.Position; followtime = Game.Time; //Game.PrintChat("in5"); //int counter = 0; //foreach (var item in ids) //{ // if (Items.HasItem(item) && counter > index) // { // index = counter; // Game.PrintChat(index.ToString()); // } // counter++; //} // Game.PrintChat("in6"); if (Game.Time < 300) { Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3301)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3340)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); } //Game.OnGameNotifyEvent += Game_OnGameNotifyEvent; Game.OnGameProcessPacket += Game_OnGameProcessPacket; Game.OnGameUpdate += Game_OnGameUpdate; //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => ad.Contains(x.ChampionName)); //Obj_AI_Base.OnCreate += Obj_AI_Base_OnCreate; }
private static void Game_OnGameLoad(EventArgs args) { if (ObjectManager.Player.ChampionName != "Soraka") return; //InitializeSafeWardSpots(); //InitializeWardSpots(); allies = new List<Obj_AI_Hero>(); //BushRevealer c = new BushRevealer(); Q = new Spell(SpellSlot.Q, 970); W = new Spell(SpellSlot.W, 550); E = new Spell(SpellSlot.E, 925); R = new Spell(SpellSlot.R); //Game.PrintChat("in1"); ts = new TargetSelector(1025, TargetSelector.TargetingMode.AutoPriority); // stufftosay = new[] { "brb", "need to b", "sec" }; // deaths = new[] {"oops", "lol", "rip", "laggg"}; spawn = ObjectManager.Get<GameObject>() .First(x => x.Type == GameObjectType.obj_SpawnPoint && x.Team == ObjectManager.Player.Team) .Position; menu = new Menu("Soraka Slack", "slack", true); menu.AddItem(new MenuItem("on", "Start Slacking!").SetValue(new KeyBind(32, KeyBindType.Toggle))); menu.AddItem(new MenuItem("user", "Use R?").SetValue(true)); menu.AddItem(new MenuItem("usew", "Use W?").SetValue(true)); menu.AddItem(new MenuItem("allyhpw", "Ally % HP for W").SetValue(new Slider(30, 0, 93))); menu.AddItem(new MenuItem("wabovehp", "Use W when my hp > x%").SetValue(new Slider(20, 0, 99))); menu.AddItem(new MenuItem("allyhpr", "Ally % HP for R").SetValue(new Slider(30, 0, 50))); menu.AddItem(new MenuItem("hpb", "B if hp < %").SetValue(new Slider(15, 0, 80))); //Game.PrintChat("in2"); menu.AddSubMenu(new Menu("Follow:", "follower")); foreach (var ally in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsAlly && !x.IsMe)) { allies.Add(ally); if (ad.Contains(ally.ChampionName)) menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(true)); else { menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(false)); } } // Game.PrintChat("hi"); buyThings = new List<ItemToShop> { new ItemToShop() { goldReach = 500, itemsMustHave = new List<int>{3301}, itemIds = new List<int>{3096} }, new ItemToShop() { goldReach = 360, itemsMustHave = new List<int>{3096}, itemIds = new List<int>{1004,1004} }, new ItemToShop() { goldReach = 500, itemsMustHave = new List<int>{1004,1004}, itemIds = new List<int>{1033} }, new ItemToShop() { goldReach = 180, itemsMustHave = new List<int>{1033,1004,1004}, itemIds = new List<int>{3028} }, new ItemToShop() { goldReach = 325, itemsMustHave = new List<int>{3028}, itemIds = new List<int>{1001} }, new ItemToShop() { goldReach = 675, itemsMustHave = new List<int>{1001}, itemIds = new List<int>{3009} }, new ItemToShop() { goldReach = 400, itemsMustHave = new List<int>{3009}, itemIds = new List<int>{1028} }, new ItemToShop() { goldReach = 450, itemsMustHave = new List<int>{1028}, itemIds = new List<int>{3067} }, new ItemToShop() { goldReach = 400, itemsMustHave = new List<int>{3067}, itemIds = new List<int>{1028} }, new ItemToShop() { goldReach = 800, itemsMustHave = new List<int>{1028}, itemIds = new List<int>{3211} }, new ItemToShop() { goldReach = 700, itemsMustHave = new List<int>{3211}, itemIds = new List<int>{3065} }, new ItemToShop() { goldReach = 2900, itemsMustHave = new List<int>{3065}, itemIds = new List<int>{3116} } }; //Game.PrintChat("hi2"); // Game.PrintChat("in3"); var sequence = new[] { 1, 2, 3, 2, 2, 4, 2, 1, 2, 3, 4, 3, 3, 1, 1, 4, 1, 3 }; var level = new AutoLevel(sequence); gamestart = Game.Time; menu.AddToMainMenu(); nextItem = buyThings[0]; //Game.PrintChat("in4"); //ids = new[] { 3096, 1004, 1004, 1033, 1001, 3028, 3174, 3009, 1028, 3067, 1028, 3211, 3065, 3069, 1028, 2049, 2045 }; //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && menu.Item(x.ChampionName).GetValue<bool>()); //?? // ObjectManager.Get<Obj_AI_Hero>().First(x => !x.IsMe && x.IsAlly && ap.Contains(x.ChampionName)) ?? // ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && !x.IsMe); //if (follow != null) //followpos = follow.Position; followtime = Game.Time; //Game.PrintChat("in5"); //int counter = 0; //foreach (var item in ids) //{ // if (Items.HasItem(item) && counter > index) // { // index = counter; // Game.PrintChat(index.ToString()); // } // counter++; //} // Game.PrintChat("in6"); if (Game.Time < 300) { Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3301)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3340)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send(); } //Game.OnGameNotifyEvent += Game_OnGameNotifyEvent; Game.OnGameProcessPacket += Game_OnGameProcessPacket; Game.OnGameUpdate += Game_OnGameUpdate; //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => ad.Contains(x.ChampionName)); //Obj_AI_Base.OnCreate += Obj_AI_Base_OnCreate; }
public static void checkItemInventory() { if (!canBuyItems) return; for (int i = buyThings.Count - 1; i >= 0; i--) { //Game.PrintChat(i.ToString()); if (!checkItemcount(buyThings[i])) continue; nextItem = buyThings[i]; // Game.PrintChat("in"); if (i == buyThings.Count - 1) { canBuyItems = false; } return; } }
private static bool checkItemcount(ItemToShop its) { bool[] usedItems = new bool[7]; int itemsMatch = 0; foreach (int t in its.itemsMustHave) { //Game.PrintChat(t.ToString()); for (int i = 0; i < ObjectManager.Player.InventoryItems.Count(); i++) { if (usedItems[i]) continue; if (t != (decimal)ObjectManager.Player.InventoryItems[i].Id) continue; usedItems[i] = true; //Game.PrintChat("iasdgfasd"); itemsMatch++; break; } } return itemsMatch == its.itemsMustHave.Count; }
private static void Game_OnGameLoad(EventArgs args) { if (!(Player.ChampionName.ToUpper() == "SORAKA")) { return; } if (Player.Team.ToString() == "Chaos") { spawn = new Vector3(14318f, 14354, 171.97f); Game.PrintChat("Set PurpleTeam Spawn"); } else { spawn = new Vector3(415.33f, 453.38f, 182.66f); Game.PrintChat("Set BlueTeam Spawn"); } allies = new List <Obj_AI_Hero>(); Q = new Spell(SpellSlot.Q, 970); W = new Spell(SpellSlot.W, 550); E = new Spell(SpellSlot.E, 925); R = new Spell(SpellSlot.R); menu = new Menu("JeonAutoSoraka", "JeonAutoSoraka", true); menu.AddItem(new MenuItem("user", "Use R?").SetValue(true)); menu.AddItem(new MenuItem("usew", "Use W?").SetValue(true)); menu.AddItem(new MenuItem("allyhpw", "Ally % HP for W").SetValue(new Slider(50, 0, 93))); menu.AddItem(new MenuItem("wabovehp", "Use W when my hp > x%").SetValue(new Slider(20, 0, 99))); menu.AddItem(new MenuItem("allyhpr", "Ally % HP for R").SetValue(new Slider(15, 0, 50))); menu.AddItem(new MenuItem("hpb", "B if hp < %").SetValue(new Slider(15, 0, 100))); foreach (var ally in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsAlly && !x.IsMe)) { allies.Add(ally); fllowlist.Add(ally.ChampionName); } #region 아이템 트리 buyThings = new List <ItemToShop> { new ItemToShop() { goldReach = 500, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3301) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3096) } }, new ItemToShop() { goldReach = 180, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3096) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(1004) } }, new ItemToShop() { goldReach = 500 + 180, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(1004) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(1033) } }, new ItemToShop() { goldReach = 180 + 180, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(1033), JeonItem.GetItemIdbyInt(1004) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3028) } }, new ItemToShop() { goldReach = 325, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3028) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(1001) } }, new ItemToShop() { goldReach = 675, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(1001) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3009) } }, new ItemToShop() { goldReach = 400, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3009) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(1028) } }, new ItemToShop() { goldReach = 450, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(1028) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3067) } }, new ItemToShop() { goldReach = 400, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3067) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(1028) } }, new ItemToShop() { goldReach = 800, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(1028) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3211) } }, new ItemToShop() { goldReach = 700, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3211) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3065) } }, new ItemToShop() { goldReach = 2900, itemsMustHave = new List <ItemId> { JeonItem.GetItemIdbyInt(3065) }, itemIds = new List <ItemId> { JeonItem.GetItemIdbyInt(3116) } } }; #endregion var myAutoLevel = new AutoLevel(new[] { 1, 2, 3, 2, 2, 4, 2, 1, 2, 3, 4, 3, 3, 1, 1, 4, 1, 3 }); gamestart = Game.Time; menu.AddToMainMenu(); nextItem = buyThings[0]; followtime = Game.Time; Game.OnProcessPacket += Game_OnGameProcessPacket; Game.OnUpdate += Game_OnGameUpdate; Drawing.OnEndScene += OnDraw_EndScene; }