private static void PredictionMenuPage() { Prediction = _myMenu.AddSubMenu("Prediction settings", "Prediction"); Prediction.AddGroupLabel("Prediction Settings:"); Prediction.Add("predq", new Slider("Prediction Hitchange Q {0}(%)", 70)); Prediction.Add("predw", new Slider("Prediction Hitchange W {0}(%)", 70)); Prediction.Add("prede", new Slider("Prediction Hitchange E {0}(%)", 70)); }
public static void ini() { Menu = MainMenu.AddMenu("Lux", "luxe"); Menu.AddGroupLabel("Lux By Modziux"); Prediction = Menu.AddSubMenu("Prediction", "spejimai"); Prediction.Add("q.prediction", new Slider("Q Prediction", 80, 0, 100)); Prediction.Add("e.prediction", new Slider("E Prediction", 80, 0, 100)); Prediction.Add("r.prediction", new Slider("R Prediction", 80, 0, 100)); Combo = Menu.AddSubMenu("Combo", "combolux"); Combo.Add("combo.q", new CheckBox("Use Q")); Combo.AddSeparator(); Combo.Add("combo.e", new CheckBox("Use E")); Combo.Add("combo.e.enemies", new Slider("Min enemies hit", 1, 1, 5)); Combo.Add("e.slow", new CheckBox("Use E to Slow")); Combo.Add("e.detonate", new CheckBox("Auto Detonate E")); Combo.AddSeparator(); Combo.Add("combo.r", new CheckBox("Use R")); Combo.Add("combo.r.logic", new ComboBox("R Logic", 2, "R only on killable", "R only on hit x target", "Both")); Combo.Add("combo.r.min", new Slider("Min enemies to use R", 2, 1, 5)); Harras = Menu.AddSubMenu("Harass", "harassmenu"); Harras.Add("harass.q", new CheckBox("Use Q")); Harras.AddSeparator(); Harras.Add("harass.e", new CheckBox("Use E")); Harras.Add("harass.e.enemies", new Slider("Min enemies hit", 1, 1, 5)); Laneclear = Menu.AddSubMenu("LaneClear", "Valiklis"); Laneclear.Add("laneclear.e", new CheckBox("Use E")); Laneclear.Add("laneclear.e.min", new Slider("Cast E only if hit x minion", 3, 1, 10)); Laneclear.AddSeparator(); Laneclear.Add("laneclear.q", new CheckBox("Use Q")); Jungleclear = Menu.AddSubMenu("JungleClear", "Jungliu_Valiklis"); Jungleclear.Add("jungleclear.e", new CheckBox("Use E")); Jungleclear.AddSeparator(); Jungleclear.Add("jungleclear.q", new CheckBox("Use Q")); Drawing = Menu.AddSubMenu("Drawing", "piesimas"); Drawing.Add("draw.q", new CheckBox("Draw Q Range")); Drawing.Add("draw.E", new CheckBox("Draw E Range")); Drawing.Add("draw.R", new CheckBox("Draw R Range")); Drawing.Add("indicator", new CheckBox("Show Damage Indicator")); Drawing.Add("percent.indicator", new CheckBox("Show damage Percent")); Drawing.Add("draw.r.a", new CheckBox("Draw Killable Champion name on screen")); Misc = Menu.AddSubMenu("Misc", "miscmenu"); Misc.Add("auto.q", new CheckBox("Auto Q if Can hit 2 Champions")); Misc.Add("auto.q.imo", new CheckBox("Auto Q on Imobile target")); Misc.AddSeparator(); Misc.Add("auto.e.min", new Slider("Auto E on X targets", 3, 1, 5)); Misc.Add("auto.e.imo", new CheckBox("Auto E on Imobile target")); Misc.AddSeparator(); Misc.Add("auto.r", new CheckBox("Auto R on killable")); Misc.AddSeparator(); Misc.Add("use.ignite", new CheckBox("Use Ignite")); Misc.AddSeparator(); Junglesteal = Menu.AddSubMenu("JungleSteal", "steal"); Junglesteal.AddGroupLabel("Mobs"); foreach (var name in Extension.exclusive) { Junglesteal.Add(name, new CheckBox(name)); } Shield = Menu.AddSubMenu("W Shield", "w.usage"); foreach (var ally in EntityManager.Heroes.Allies) { Shield.Add(ally.ChampionName, new CheckBox("Use shield on " + ally.ChampionName)); } foreach (AIHeroClient client in EntityManager.Heroes.Enemies) { foreach (SpellInfo info in SpellDatabase.SpellList) { if (info.ChampionName == client.ChampionName) { logic.Wlogic.EnemyProjectileInformation.Add(info); } } } foreach (AIHeroClient client in EntityManager.Heroes.Enemies) { foreach (SpellInfo info in SpellDatabase.SpellList) { if (info.ChampionName == client.ChampionName) { logic.Wlogic.EnemyProjectileInformation.Add(info); } } } }
// Update is called once per frame void Update() { if (frameCount <= 0) { frameCount = 1; } sendFrequency = 1.0f / frameCount; timeSinceLastCall += Time.deltaTime; if (serverOrClient == ServerOrClient.Client) { Vector2 predPos = Prediction.GetQuadratic(timeSinceLastCall); ball.position = new Vector3(predPos.x, predPos.y, 0); Debug.Log("Pred:" + ball.position.x + "," + ball.position.y + " dt:" + timeSinceLastCall); } if (RemoteUpdateBall) { if (serverOrClient == ServerOrClient.Client) { Prediction.Add(ballpos, timeSinceLastCall); timeSinceLastCall = 0; ball.position = new Vector3(ballpos.x, ballpos.y, 0); } else { RemoteUpdateBall = false; } } if (RemoteUpdateSliderL) { if (serverOrClient == ServerOrClient.Server) { sliderL.position = new Vector3(sliderL.position.x, sliderLY, sliderL.position.z); } RemoteUpdateSliderL = false; } if (RemoteUpdateSliderR) { if (serverOrClient == ServerOrClient.Server) { sliderR.position = new Vector3(sliderR.position.x, sliderRY, sliderR.position.z); } RemoteUpdateSliderR = false; } if (gameEvent == GameEvent.Start) { if (serverOrClient == ServerOrClient.Client) { SetStage(); } if (serverOrClient == ServerOrClient.Server) { UpdateServerStage(); } } if (gameEvent == GameEvent.Play) { if (serverOrClient == ServerOrClient.Server) { SendBallPos(); MoveBall.moveable = true; } else if (serverOrClient == ServerOrClient.Client) { SendSliderPos(); } } }