void Drawing_OnEndScene(EventArgs args) { if (!IsActive()) { return; } SpellSlot spell = SummonerSpells.GetFlashSlot(); if (ObjectManager.Player.Spellbook.CanUseSpell(spell) != SpellState.Ready) { return; } for (int i = 0; i < spotsStart.Count; i++) { if (ObjectManager.Player.ServerPosition.Distance(spotsStart[i]) < 2000) { if (spotsStart[i].IsOnScreen()) { Utility.DrawCircle(spotsStart[i], 50, System.Drawing.Color.Red); } if (spotsEnd[i].IsOnScreen()) { Utility.DrawCircle(spotsEnd[i], 100, System.Drawing.Color.Green); } if (spotsStart[i].IsOnScreen() || spotsEnd[i].IsOnScreen()) { Drawing.DrawLine(Drawing.WorldToScreen(spotsStart[i]), Drawing.WorldToScreen(spotsEnd[i]), 2, Color.Gold); } } } }
void Game_OnGameUpdate(EventArgs args) { if (!IsActive() || !FlashJukeMisc.GetMenuItem("SAssembliesMiscsFlashJukeKeyActive").GetValue <KeyBind>().Active || lastGameUpdateTime + new Random().Next(500, 1000) > Environment.TickCount) { return; } lastGameUpdateTime = Environment.TickCount; SpellSlot spell = SummonerSpells.GetFlashSlot(); if (ObjectManager.Player.Spellbook.CanUseSpell(spell) != SpellState.Ready) { return; } Vector3 nearestPosStart = GetNearestPos(spotsStart); if (Game.Time > flashedTime + 5) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, nearestPosStart); } if (nearestPosStart.X != 0 && ObjectManager.Player.Distance(nearestPosStart) < 50 && !NavMesh.IsWallOfGrass(ObjectManager.Player.ServerPosition, 10) && Game.Time > flashedTime + 5 && !AnyEnemyInBush()) { Vector3 nearestPosEnd = GetNearestPos(spotsEnd); if (nearestPosEnd.X != 0) { Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(0, spell, -1, nearestPosEnd.X, nearestPosEnd.Y, nearestPosEnd.X, nearestPosEnd.Y)).Send(); ObjectManager.Player.Spellbook.CastSpell(spell, nearestPosEnd); flashedTime = Game.Time; if (FlashJukeMisc.GetMenuItem("SAssembliesMiscsFlashJukeRecall").GetValue <bool>()) { Utility.DelayAction.Add(200, () => { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, nearestPosEnd); Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(0, SpellSlot.Recall)).Send(); ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Recall); }); } } } }