public void Activate() { if (active) return; active = true; g = null; Game.OnTick += Game_OnTick; }
public void RemoveObject(GrassObject obj) { if (trackObjects.Contains(obj)) { trackObjects.Remove(obj); } }
public void AddObject(GrassObject obj) { if (trackObjects.Contains(obj) == false) { trackObjects.Add(obj); } }
private void GrassUpdate(int _chunkWidth, int _chunkDepth, int _count) { for (int i = 0; i < _grassChunk.OneChunkTipNum; i++) { Vector2 _index = _maptipsIndices[_chunkDepth, _chunkWidth, i]; GrassDummyPoint _dummyPoint = _maptipsDummyPoint[(int)_index.x, (int)_index.y]; GrassObject _targetObj = _pooledObjects[_count][i]; if (!_dummyPoint.CanGrow) { _targetObj.Object.transform.SetPositionAndRotation(new Vector3(50000, -100, 0), _dummyPoint.Rotation * _targetObj.Object.transform.rotation); continue; } if (_dummyPoint.HasGrown) { _targetObj.Controller.Growth(); } else { _targetObj.Controller.ForceScaleZero(); } _targetObj.Object.transform.SetPositionAndRotation(_dummyPoint.Position, _dummyPoint.Rotation * _targetObj.Rotation); _matPropBlock.SetTexture("_MainTex", _textures[_dummyPoint.TexIndex]); _targetObj.Controller.ChangeMaterials(_matPropBlock); } }
public void Activate() { if (active) return; lastRecallGold = AutoWalker.p.Gold; active = true; g = null; Game.OnUpdate += Game_OnUpdate; }
public void Activate() { if (active) { return; } active = true; g = null; Game.OnTick += Game_OnTick; }
public void Activate() { if (active) { return; } active = true; g = null; Game.OnTick += Game_OnTick; //Chat.Print("Recall Activated"); }
private void Game_OnTick(EventArgs args) { AutoWalker.SetMode(Orbwalker.ActiveModes.Combo); if (ObjectManager.Player.Distance(spawn) < 400 && ObjectManager.Player.HealthPercent() > 85 && ( ObjectManager.Player.Mana == 0 || ObjectManager.Player.ManaPercent > 80 || ObjectManager.Player.PARRegenRate <= .0001 )) { current.SetLogic(LogicSelector.MainLogics.PushLogic); } else if (ObjectManager.Player.Distance(spawn) < 2000) { AutoWalker.WalkTo(spawn.Position); } else if (!ObjectManager.Player.IsRecalling() && Game.Time > lastRecallTime) { Obj_AI_Turret nearestTurret = ObjectManager.Get <Obj_AI_Turret>() .Where(t => t.Team == ObjectManager.Player.Team && !t.IsDead()) .OrderBy(t => t.Distance(ObjectManager.Player)) .First(); Vector3 recallPos = nearestTurret.Position.Extend(spawn, 300).To3DWorld(); if (AutoWalker.p.HealthPercent() > 35) { if (g == null) { g = ObjectManager.Get <GrassObject>() .Where(gr => gr.Distance(AutoWalker.MyNexus) < AutoWalker.p.Distance(AutoWalker.MyNexus) && gr.Distance(AutoWalker.p) > Orbwalker.HoldRadius) .OrderBy(gg => gg.Distance(AutoWalker.p)).FirstOrDefault(gr => ObjectManager.Get <GrassObject>().Count(gr2 => gr.Distance(gr2) < 65) >= 4); } if (g != null && g.Distance(AutoWalker.p) < nearestTurret.Position.Distance(AutoWalker.p)) { AutoWalker.SetMode(Orbwalker.ActiveModes.Flee); recallPos = g.Position; } } if ((!AutoWalker.p.IsMoving && ObjectManager.Player.Distance(recallPos) < Orbwalker.HoldRadius + 50) || (AutoWalker.p.IsMoving && ObjectManager.Player.Distance(recallPos) < 50)) { CastRecall(); } else { AutoWalker.WalkTo(recallPos); } } }
//working and tested public static void AutoBarrel() { if (didActionThisTick || !Program.E.IsReady() || Program.E.AmmoQuantity != 3) { return; } GrassObject bush = ObjectManager.Get <GrassObject>().Where( a => a.Distance(Gangplank) <= Program.E.Range && a.NearbyBarrelCount(Program.barrelDiameter) == 0).OrderBy(a => a.Distance(Gangplank)).FirstOrDefault(); if (bush != null) { CastE(bush.Position); } }
private void Game_OnTick(EventArgs args) { AutoWalker.SetMode(Orbwalker.ActiveModes.Combo); if (ObjectManager.Player.Distance(spawn) < 400 && ObjectManager.Player.HealthPercent() > 85 && (ObjectManager.Player.ManaPercent > 80 || ObjectManager.Player.PARRegenRate <= .0001)) current.SetLogic(LogicSelector.MainLogics.PushLogic); else if (ObjectManager.Player.Distance(spawn) < 2000) AutoWalker.WalkTo(spawn.Position); else if (!ObjectManager.Player.IsRecalling() && Game.Time > lastRecallTime) { Obj_AI_Turret nearestTurret = ObjectManager.Get<Obj_AI_Turret>() .Where(t => t.Team == ObjectManager.Player.Team && !t.IsDead()) .OrderBy(t => t.Distance(ObjectManager.Player)) .First(); Vector3 recallPos = nearestTurret.Position.Extend(spawn, 300).To3DWorld(); if (AutoWalker.p.HealthPercent() > 35) { if (g == null) { g = ObjectManager.Get<GrassObject>() .Where(gr => gr.Distance(AutoWalker.MyNexus) < AutoWalker.p.Distance(AutoWalker.MyNexus)&&gr.Distance(AutoWalker.p)>Orbwalker.HoldRadius) .OrderBy(gg => gg.Distance(AutoWalker.p)).FirstOrDefault(gr => ObjectManager.Get<GrassObject>().Count(gr2=>gr.Distance(gr2)<65)>=4); } if (g != null && g.Distance(AutoWalker.p) < nearestTurret.Position.Distance(AutoWalker.p)) { AutoWalker.SetMode(Orbwalker.ActiveModes.Flee); recallPos = g.Position; } } if ((!AutoWalker.p.IsMoving && ObjectManager.Player.Distance(recallPos) < Orbwalker.HoldRadius + 50) || (AutoWalker.p.IsMoving && ObjectManager.Player.Distance(recallPos) < 50)) { CastRecall(); } else AutoWalker.WalkTo(recallPos); } }
public static int NearbyBarrelCount(this GrassObject self, float range) { return(Program.barrels.Where(a => a.barrel.MeetsCriteria() && self.IsInRange(a.barrel, range)).Count()); }
public void Activate() { if (active) return; active = true; RecallBlock.Recalling = true; g = null; Game.OnTick += Game_OnTick; }
private void Game_OnUpdate(EventArgs args) { Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.Combo; if (ObjectManager.Player.Distance(spawn) < 400 && ObjectManager.Player.HealthPercent > 85 && (ObjectManager.Player.ManaPercent > 80||ObjectManager.Player.PARRegenRate<=.0001)) current.SetLogic(LogicSelector.MainLogics.PushLogic); else if (ObjectManager.Player.Distance(spawn) < 1000) AutoWalker.WalkTo(spawn.Position); else if (!ObjectManager.Player.IsRecalling() && Game.Time > lastRecallTime) { Obj_AI_Turret nearestTurret = ObjectManager.Get<Obj_AI_Turret>() .Where(t => t.Team == ObjectManager.Player.Team && !t.IsDead) .OrderBy(t => t.Distance(ObjectManager.Player)) .First(); Vector3 recallPos = nearestTurret.Position.Extend(spawn, 300).To3DWorld(); if (AutoWalker.p.HealthPercent > 35) { if (g == null) { g = ObjectManager.Get<GrassObject>() .Where(gr => gr.Distance(AutoWalker.myNexus) < AutoWalker.p.Distance(AutoWalker.myNexus)) .OrderBy(gg => gg.Distance(AutoWalker.p)).ElementAt(3); } if (g != null && g.Distance(AutoWalker.p) < nearestTurret.Position.Distance(AutoWalker.p)) { Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None; recallPos = g.Position; } } if (ObjectManager.Player.Distance(recallPos) < 70) { CastRecall(); } else AutoWalker.WalkTo(recallPos); } }