private static void OnGameLoad(EventArgs args) { if (!ThreshInGame()) { return; } Menu = new Menu("AutoLantern", "AutoLantern", true); Menu.AddItem(new MenuItem("Auto", "Auto-Lantern at Low HP").SetValue(true)); Menu.AddItem(new MenuItem("Low", "Low HP Percent").SetValue(new Slider(20, 10, 50))); Menu.AddItem(new MenuItem("Hotkey", "Hotkey").SetValue(new KeyBind(32, KeyBindType.Press))); Menu.AddItem(new MenuItem("Draw", "Draw Helper Text").SetValue(true)); Menu.AddToMainMenu(); LanternText = new Render.Text( "Click Lantern", Drawing.Width / 2 - Drawing.Width / 3, Drawing.Height / 2 + Drawing.Height / 3, 28, Color.Red, "Verdana") { VisibleCondition = sender => Menu.Item("Draw").IsActive() }; LanternText.Add(); Game.OnUpdate += OnGameUpdate; Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast; }
public HeroHudImage(string name) { this.HeroSprite = new Render.Sprite(ImageLoader.Load(name), new Vector2(0, 0)) { Scale = new Vector2(0.38f, 0.38f), Visible = true, VisibleCondition = delegate { return(HudVariables.ShouldBeVisible); }, }; this.SSSprite = new Render.Sprite(Resources.SSCircle, new Vector2(0, 0)) { Scale = new Vector2(0.38f, 0.38f), Visible = true, }; this.SSText = new Render.Text(new Vector2(0, 0), "", 26, SharpDX.Color.White) { Visible = true, Centered = true }; //image.GrayScale(); HeroSprite.Add(1); SSSprite.Add(2); SSText.Add(3); }
private static void OnGameLoad(EventArgs args) { if (Player.ChampionName != "Riven") return; Game.PrintChat("Hoola Riven - Loaded Successfully, Good Luck! :):)"); Q = new Spell(SpellSlot.Q); W = new Spell(SpellSlot.W); E = new Spell(SpellSlot.E, 300); R = new Spell(SpellSlot.R, 900); R.SetSkillshot(0.25f, 45, 1600, false, SkillshotType.SkillshotCone); OnMenuLoad(); Timer = new Render.Text("Q Expiry => " + ((double)(LastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 140, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.MidnightBlue, "calibri"); Timer2 = new Render.Text("R Expiry => " + (((double)LastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 60, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.IndianRed, "calibri"); Game.OnUpdate += OnTick; Drawing.OnDraw += Drawing_OnDraw; Drawing.OnEndScene += Drawing_OnEndScene; Obj_AI_Base.OnProcessSpellCast += OnCast; Obj_AI_Base.OnDoCast += OnDoCast; Obj_AI_Base.OnDoCast += OnDoCastLC; Obj_AI_Base.OnPlayAnimation += OnPlay; Obj_AI_Base.OnProcessSpellCast += OnCasting; Interrupter2.OnInterruptableTarget += Interrupt; }
public ChampSkin(int id, String name) { Id = id; Name = new Render.Text(0, 0, name, 18, SharpDX.Color.Orange); Name.PositionUpdate = delegate { if (SpriteInfoSmall == null || SpriteInfoSmall.Sprite == null || SpriteInfoBig.Sprite == null) { return(new Vector2(-50, -50)); } if (SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameSplash").GetValue <bool>()) { return(new Vector2(SpriteInfoBig.Sprite.Position.X + SpriteInfoBig.Sprite.Width / 2, SpriteInfoBig.Sprite.Position.Y - 18)); } else { return(new Vector2(SpriteInfoSmall.Sprite.Position.X + SpriteInfoSmall.Sprite.Width / 2, SpriteInfoSmall.Sprite.Position.Y - 18)); } }; Name.VisibleCondition = sender => { return(Misc.Miscs.GetActive() && SkinChangerMisc.GetActive() && SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameLoading").GetValue <bool>() && Active); }; Name.OutLined = true; Name.Centered = true; Name.Add(4); }
private static void Game_OnGameUpdate(EventArgs args) { foreach (var name in Names) { var text = TextDictionary[name]; var unit = FindUnit(name); if (unit == null) { continue; } if (text == null || text.Unit == null) { Utility.DebugMessage("FOUND: " + name); var rText = new Render.Text( unit.Health.ToString(), unit, new Vector2(5, -10), 45, SharpDX.Color.Blue, "Helvetica"); rText.Add(); TextDictionary.Add(name, rText); continue; } if (text.Unit.IsDead) { Utility.DebugMessage("REMOVED: " + name); text.Dispose(); TextDictionary.Remove(name); continue; } text.text = unit.Health.ToString(); } }
private static void Game_OnGameLoad(EventArgs args) { Config = new Menu("TeamStats", "TeamStats", true); Config.AddItem(new MenuItem("X-pos", "X offset").SetValue(new Slider(0, -1500, 400))); Config.AddItem(new MenuItem("Y-pos", "Y offset").SetValue(new Slider(0, 200, -1080))); Config.AddItem(new MenuItem("Range", "Range").SetValue(new Slider(2200, 0, 20000))); Config.AddItem(new MenuItem("Default", "Default").SetValue(false)); Config.AddItem(new MenuItem("Chart", "Chart").SetValue(true)); Config.AddItem(new MenuItem("Small", "Small chart").SetValue(false)); Config.AddItem(new MenuItem("Enabled", "Enabled").SetValue(true)); Config.AddItem(new MenuItem("draw", "Draw range")).SetValue(new Circle(false, Color.LightBlue)); Config.AddToMainMenu(); // frame = loadFrame(); gPower = loadText("", new ColorBGRA(Color.FromArgb(255, 34, 139, 34).ToArgb())); ePower = loadText("", new ColorBGRA(Color.FromArgb(255, 178, 34, 34).ToArgb())); aDmg = loadText("", new ColorBGRA(Color.White.ToArgb())); eDmg = loadText("", new ColorBGRA(Color.White.ToArgb())); aHealt = loadText("", new ColorBGRA(Color.White.ToArgb())); eHealt = loadText("", new ColorBGRA(Color.White.ToArgb())); aNum = loadText("", new ColorBGRA(Color.FromArgb(255, 34, 139, 34).ToArgb())); eNum = loadText("", new ColorBGRA(Color.FromArgb(255, 178, 34, 34).ToArgb())); versus = loadText("", new ColorBGRA(Color.White.ToArgb())); timer.Elapsed += OnTimerTick; timer.Enabled = true; Drawing.OnDraw += Drawing_OnDraw; Game.OnUpdate += Game_OnGameUpdate; Game.PrintChat("<font color='#9933FF'>Soresu </font><font color='#FFFFFF'>- TeamStats</font>"); }
public ChampionTracker(Obj_AI_Hero champion) { Champion = champion; LastPotion = champion.ServerPosition; StartInvisibleTime = Game.ClockTime; var sprite = new Render.Sprite( Helper.ChangeOpacity( ResourceImages.GetChampionSquare(champion.SkinName) ?? ResourceImages.GetChampionSquare("Aatrox"), Opacity), new Vector2(0, 0)); sprite.GrayScale(); sprite.Scale = new Vector2(Scale, Scale); sprite.VisibleCondition = sender => TrackerCondition; sprite.PositionUpdate = () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2)); sprite.Add(0); Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue <Slider>().Value, Color.White) { VisibleCondition = sender => TrackerCondition, PositionUpdate = () => Drawing.WorldToMinimap(LastPotion), TextUpdate = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime), OutLined = true, Centered = true }; Text.Add(0); AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload; AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload; }
private static void Game_OnGameLoad(EventArgs args) { foreach (var c in ControllerArray.Select(controlId => new Controller((UserIndex)controlId)).Where(c => c.IsConnected)) { Controller = new GamepadState(c.UserIndex); } if (Controller == null || !Controller.Connected) { Game.PrintChat("No controller detected!"); return; } Menu = new Menu("ControllerTest", "ControllerTest", true); OrbWalker = new Orbwalking.Orbwalker(Menu); Menu.AddItem(new MenuItem("Draw", "Draw Circle").SetValue(true)); Menu.AddToMainMenu(); if (Menu.Item("Draw").GetValue <bool>()) { CurrentPosition = new Render.Circle(ObjectManager.Player.Position, 100, Color.Red, 2); CurrentPosition.Add(); Text = new Render.Text(new Vector2(50, 50), "MODE: " + CurrentMode, 30, new ColorBGRA(255, 0, 0, 255)); Text.OutLined = true; Text.Add(); } Utility.DebugMessage( "<b><font color =\"#FFFFFF\">ControlSharp by </font><font color=\"#5C00A3\">Trees</font><font color =\"#FFFFFF\"> loaded!</font></b>"); Menu.Item("Draw").ValueChanged += OnValueChanged; Game.OnGameUpdate += Game_OnGameUpdate; }
public RecallInfo(Obj_AI_Hero hero, int index) { _hero = hero; _index = index; _sprite = new Render.Sprite(Properties.Resources.RecallBar, new Vector2(0, 0)) { Scale = new Vector2(Program.Instance().BarScale, Program.Instance().BarScale), VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000, PositionUpdate = () => new Vector2(Program.Instance().X, Program.Instance().Y - (_index * TextFont.Description.Height)) }; _sprite.Add(0); Render.Text heroText = new Render.Text(0, 0, hero.ChampionName, TextFont.Description.Height, Color.White) { OutLined = true, VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000, PositionUpdate = delegate { Rectangle rect = TextFont.MeasureText(null, hero.ChampionName, 0); return(new Vector2(_sprite.X - rect.Width - GapTextBar, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2)); } }; heroText.Add(1); _countdownText = new Render.Text(0, 0, "", TextFont.Description.Height, Color.White) { OutLined = true, VisibleCondition = sender => _active }; _countdownText.Add(1); Game.OnGameUpdate += Game_OnGameUpdate; Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport; }
public PermaMenu(string text, string source) { Source = source; Text = text; RenderTxt = new Render.Text(0, 0, "text", 16, new ColorBGRA(209, 179, 40, 255), "monospace"); MenuItem = new MenuItem(text, text, true).SetValue(true); }
/// <summary> /// Raises the <see cref="E:Ping" /> event. /// </summary> /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param> private void OnPing(GamePingEventArgs args) { if (!args.Source.IsMe && ShouldRun() && (args.Source is Obj_AI_Hero)) { var pingType = args.PingType; var srcHero = args.Source as Obj_AI_Hero; if (pingType == PingCategory.Normal) { var textObject = new Render.Text( srcHero.ChampionName, new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White) { PositionUpdate = () => new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 30), Centered = true }; textObject.Add(0); LeagueSharp.Common.Utility.DelayAction.Add(1000, () => { textObject.Remove(); }); } } }
public static void Game_OnGameLoad() { try { foreach (var sName in SummonersNames) { SummonerTextures.Add(sName, GetSummonerTexture(sName)); } CdFrame = new Render.Sprite(Resources.hudTRACKER, Vector2.Zero); ReadyLine = new Render.Line(Vector2.Zero, Vector2.Zero, 2, Color.Black); Text = new Render.Text("", Vector2.Zero, 13, Color.Black); } catch (Exception e) { Console.WriteLine(@"/ff can't load the textures: " + e); } Drawing.OnPresent += Drawing_OnEndScene; Drawing.OnPreReset += DrawingOnOnPreReset; Drawing.OnPostReset += DrawingOnOnPostReset; // Drawing.OnDraw += Drawing_OnEndScene; AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload; AppDomain.CurrentDomain.ProcessExit += CurrentDomain_DomainUnload; }
private void InitDrawing() { foreach (var h in ObjectManager.Get <Obj_AI_Hero>().Where(h => h.IsEnemy)) { var hero = h; var sprite = new Render.Sprite(Resources.Skull, hero.HPBarPosition); sprite.Scale = new Vector2(0.08f, 0.08f); sprite.PositionUpdate += () => new Vector2(hero.HPBarPosition.X + 140, hero.HPBarPosition.Y + 10); sprite.VisibleCondition += s => Render.OnScreen(Drawing.WorldToScreen(hero.Position)) && GetComboResult(hero).IsKillable&& _config.Item("icon").GetValue <bool>(); sprite.Add(); var text = new Render.Text("", hero, new Vector2(20, 50), 18, new ColorBGRA(255, 255, 255, 255)); text.VisibleCondition += s => Render.OnScreen(Drawing.WorldToScreen(hero.Position)) && _config.Item("text").GetValue <bool>(); text.TextUpdate += () => { var result = GetComboResult(hero); return(result.Text); }; text.OutLined = true; text.Add(); } }
public static void OnGameLoad() { if (Player.ChampionName != "Riven") { return; } Timer = new Render.Text( "Q Expiry => " + ((double)(Logic._lastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 140, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.DodgerBlue, "calibri"); Timer2 = new Render.Text( "R Expiry => " + (((double)Logic._lastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 60, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.DodgerBlue, "calibri"); Spells.Ignite = Player.GetSpellSlot("summonerdot"); MenuConfig.LoadMenu(); Spells.Initialise(); Game.OnUpdate += OnTick; Drawing.OnDraw += Drawing_OnDraw; Obj_AI_Base.OnProcessSpellCast += Logic.OnCast; Obj_AI_Base.OnProcessSpellCast += OnCasting; Obj_AI_Base.OnSpellCast += OnDoCast; Obj_AI_Base.OnSpellCast += OnDoCastLc; Obj_AI_Base.OnPlayAnimation += OnPlay; Interrupter2.OnInterruptableTarget += Interrupt; }
public void DrawCircle() { _circle = new Render.Circle(WardObject.Position, 100, Color, 5, true); _circle.VisibleCondition += sender => WardDetector.IsActive() && Render.OnScreen(Drawing.WorldToScreen(WardObject.Position)); _circle.Add(0); if (Type != WardType.Trap) { _minimapSprite = new Render.Sprite(Bitmap, MinimapPosition) { Scale = new Vector2(Scale, Scale) }; _minimapSprite.Add(0); } if (Duration == int.MaxValue) { return; } _timerText = new Render.Text(10, 10, "t", 18, new ColorBGRA(255, 255, 255, 255)) { OutLined = true, PositionUpdate = () => Drawing.WorldToScreen(WardObject.Position), Centered = true }; _timerText.VisibleCondition += sender => WardDetector.IsActive() && Render.OnScreen(Drawing.WorldToScreen(WardObject.Position)); _timerText.TextUpdate = () => Utils.FormatTime((EndTime - Environment.TickCount) / 1000f); _timerText.Add(2); }
public ChampionTracker(Obj_AI_Hero champion) { Champion = champion; LastPotion = champion.ServerPosition; StartInvisibleTime = Game.ClockTime; var sprite = new Render.Sprite( Helper.ChangeOpacity( Helper.CropCircleImage( (Resources.ResourceManager.GetObject(Champion.ChampionName + "_Square_0") ?? Resources.Katarina_Square_0) as Bitmap), Opacity), new Vector2(0, 0)); sprite.GrayScale(); sprite.Scale = new Vector2(Scale, Scale); sprite.VisibleCondition = sender => TrackerCondition; sprite.PositionUpdate = () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2)); sprite.Add(0); Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue <Slider>().Value, Color.White) { VisibleCondition = sender => TrackerCondition, PositionUpdate = () => Drawing.WorldToMinimap(LastPotion), TextUpdate = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime), OutLined = true, Centered = true }; Text.Add(0); }
public Jungler() { foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>()) { if (hero.IsEnemy && hero.Spellbook.Spells.Find(inst => inst.Name.ToLower().Contains("smite")) != null) { HeroJungler = hero; Render.Text text = new Render.Text(Drawing.Width / 2, Drawing.Height / 2 + 400, "", 20, Color.AliceBlue); text.TextUpdate = delegate { if (targeting) { return(MapPositions.GetRegion(hero.ServerPosition.To2D()).ToString() + "\nJungler is targeting you. CARE!"); } return(MapPositions.GetRegion(hero.ServerPosition.To2D()).ToString()); }; text.VisibleCondition = sender => { return(IsActive() && hero.IsVisible && !hero.IsDead); }; text.OutLined = true; text.Centered = true; text.Add(); } } Obj_AI_Base.OnIssueOrder += Obj_AI_Base_OnIssueOrder; }
public AscensionObject(Obj_AI_Minion obj) { Obj = obj; if (obj != null && obj.IsValid) { Position = obj.Position; } else { Position = new Vector3(); } SpawnTime = (int)Game.ClockTime; MapType = Utility.Map.MapType.CrystalScar; if (obj.Name.Contains("AscRelic")) { RespawnTime = 30; } else if (obj.Name.Contains("OdinShieldRelic")) { RespawnTime = 32; } Locked = false; Called = false; TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White)); Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += HealthObject_ValueChanged; TextMinimap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMinimap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToMinimap(Position); return(new Vector2(sPos.X, sPos.Y)); }; TextMinimap.VisibleCondition = sender => { return(IsActive() && (NextRespawnTime - (int)Game.ClockTime) > 0 && MapType == GMap.Type); }; TextMinimap.OutLined = true; TextMinimap.Centered = true; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White)); TextMap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToScreen(Position); return(new Vector2(sPos.X, sPos.Y)); }; TextMap.VisibleCondition = sender => { return(IsActive() && (NextRespawnTime - (int)Game.ClockTime) > 0 && MapType == GMap.Type); }; TextMap.OutLined = true; TextMap.Centered = true; TextMap.Add(); }
private static Render.Text loadText(string text, ColorBGRA color) { var load = new Render.Text(new Vector2(0, 0), text, 15, color, "Calibri"); load.Add(0); return(load); }
private void Init() { foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>()) { if (!hero.IsEnemy) { continue; } bool hasSmite = false; foreach (SpellDataInst spell in hero.Spellbook.Spells) { if (spell.Slot.HasFlag(SpellSlot.Summoner1 | SpellSlot.Summoner2)) { if (spell.Name.ToLower().Contains("smite")) { hasSmite = true; break; } } } if (hasSmite) { Render.Text text = new Render.Text(new Vector2(0, 0), hero.IsEnemy ? Language.GetString("DETECTORS_GANK_TEXT_JUNGLER_ENEMY") : Language.GetString("DETECTORS_GANK_TEXT_JUNGLER_ALLY"), 28, hero.IsEnemy ? Color.Red : Color.Green); text.PositionUpdate = delegate { return(Drawing.WorldToScreen(ObjectManager.Player.ServerPosition)); }; text.VisibleCondition = sender => { return(IsVisible(hero)); }; text.OutLined = true; text.Centered = true; text.Add(); Render.Line line = new Render.Line(new Vector2(1, 1), new Vector2(1, 1), 4, hero.IsEnemy ? Color.Red : Color.Green); line.StartPositionUpdate = delegate { return(Drawing.WorldToScreen(ObjectManager.Player.ServerPosition)); }; line.EndPositionUpdate = delegate { return(Drawing.WorldToScreen(hero.ServerPosition)); }; line.VisibleCondition = sender => { return(IsVisible(hero)); }; line.Add(); Enemies.Add(hero, new InternalGankDetector(text, line)); } else { Enemies.Add(hero, new InternalGankDetector(null, null)); } } }
private void Init() { if (!IsActive()) { return; } foreach (Obj_BarracksDampener inhibitor in ObjectManager.Get <Obj_BarracksDampener>()) { int health = 0; Render.Text Text = new Render.Text(0, 0, "", 14, new ColorBGRA(Color4.White)); Text.TextUpdate = delegate { if (!inhibitor.IsValid) { return(""); } var mode = Health.Healths.GetMenuItem("SAssembliesHealthsMode") .GetValue <StringList>(); switch (mode.SelectedIndex) { case 0: health = (int)((inhibitor.Health / inhibitor.MaxHealth) * 100); break; case 1: health = (int)inhibitor.Health; break; } return(health.ToString()); }; Text.PositionUpdate = delegate { if (!inhibitor.IsValid) { return(new Vector2(0, 0)); } Vector2 pos = Drawing.WorldToMinimap(inhibitor.Position); return(new Vector2(pos.X, pos.Y)); }; Text.VisibleCondition = sender => { if (!inhibitor.IsValid) { return(false); } return(IsActive() && inhibitor.IsValid && !inhibitor.IsDead && inhibitor.IsValid && inhibitor.Health > 0.1f && ((inhibitor.Health / inhibitor.MaxHealth) * 100) != 100); }; Text.OutLined = true; Text.Centered = true; Text.Add(); healthConf.Add(new Health.HealthConf(inhibitor, Text)); } }
private void InitTurrentHealth() //TODO: Draw HP above BarPos { if (!IsActive()) { return; } foreach (Obj_AI_Turret turret in ObjectManager.Get <Obj_AI_Turret>()) { int health = 0; var mode = Health.Healths.GetMenuItem("SAssembliesHealthsMode") .GetValue <StringList>(); Render.Text Text = new Render.Text(0, 0, "", 14, new ColorBGRA(Color4.White)); Text.TextUpdate = delegate { if (!turret.IsValid) { return(""); } switch (mode.SelectedIndex) { case 0: health = (int)((turret.Health / turret.MaxHealth) * 100); break; case 1: health = (int)turret.Health; break; } return(health.ToString()); }; Text.PositionUpdate = delegate { if (!turret.IsValid) { return(new Vector2(0, 0)); } Vector2 pos = Drawing.WorldToMinimap(turret.Position); return(new Vector2(pos.X, pos.Y)); }; Text.VisibleCondition = sender => { if (!turret.IsValid) { return(false); } return(Health.Healths.GetActive() && TurretHealth.GetActive() && turret.IsValid && !turret.IsDead && turret.IsValid && turret.Health != 9999 && ((turret.Health / turret.MaxHealth) * 100) != 100); }; Text.OutLined = true; Text.Centered = true; Text.Add(); healthConf.Add(new Health.HealthConf(turret, Text)); } }
private static Render.Text GetRenderText(Vector2 pos, bool isMajor) { Vector2 offset = isMajor ? MajorCampTextOffset : MinorCampTextOffset; int size = isMajor ? 48 : 42; var text = new Render.Text("", (int)(pos.X + offset.X), (int)(pos.Y + offset.Y), size, Color.White); text.Add(1); return(text); }
public static void InitDrawing(Spell y) { var text = new Render.Text("", Player, new Vector2(20, 50), 18, new ColorBGRA(255, 255, 255, 255)); if (Render.OnScreen(Drawing.WorldToScreen(Player.Position)) && menu.Item("Enabled").GetValue <bool>() == true) { ; } { text.Visible = true; } text.TextUpdate += () => { if (menu.Item("Enabled").GetValue <bool>() == false) { return(""); } else if (Player.BaseSkinName == "Kennen" && CheckForMinions(y) == false && CheckForEnemies(y)) { return("Enemies have been found!"); } else if (Player.BaseSkinName != "Kennen" && CheckForEnemies(y)) { return("Enemies have been found!"); } else if (y.Level == 0) { if (Player.Level >= 3 && Player.BaseSkinName == "Kennen") { return("You should get your spell."); } if (Player.Level >= 1 && Player.BaseSkinName == "Evelynn") { return("You should get your spell."); } else if (Player.Level > 6) { return("Do you play on getting your damn spell?"); } else { return("Spell not acquired."); } } else { return(""); } }; text.OutLined = true; text.Add(); }
public static void Initialize() { Menu.AddCircle("DrawWolfAARange", "Draw Wolf AA Range", Color.Purple); Menu.AddBool("DrawWolfTime", "Draw Wolf Time"); Menu.AddBool("DrawWStacks", "Draw W Passive (Max Stacks)"); GameObject.OnCreate += GameObject_OnCreate; GameObject.OnDelete += GameObject_OnDelete; Drawing.OnDraw += Drawing_OnDraw; HealText = new Render.Text("", 0, 0, 20, SharpDX.Color.Green); HealText.VisibleCondition += sender => Menu.Item("DrawWStacks").IsActive() && IsWPassiveReady(); HealText.PositionUpdate += () => { var pos = Drawing.WorldToScreen(ObjectManager.Player.Position); if (Wolf != null && Wolf.IsValid && Wolf.IsVisible) { pos = Drawing.WorldToScreen(Wolf.Position); } return(pos + new Vector2(-35, 20)); }; HealText.TextUpdate += () => "Heal Ready (" + GetWPassiveHeal() + ")"; HealText.TextFontDescription = new FontDescription { FaceName = "Calibri", Height = 20, OutputPrecision = FontPrecision.TrueType, Quality = FontQuality.Antialiased }; HealText.Add(); TimeText = new Render.Text("", 0, 0, 40, Color.Purple.ToBGRA()); TimeText.VisibleCondition += sender => Menu.Item("DrawWolfTime").IsActive() && Wolf != null && Wolf.IsValid && Wolf.IsVisible; TimeText.PositionUpdate += () => Wolf.HPBarPosition + new Vector2(30, -10); TimeText.TextUpdate += () => { var timeSpawned = Utils.TickCount - WolfSpawnTime; var timeLeft = Math.Round((8000 - timeSpawned) / 1000f, 1, MidpointRounding.ToEven); if (timeLeft < 0) { return(""); } var time = timeLeft.ToString(); return(time.Substring(0, time.Length > 3 ? 3 : time.Length)); }; TimeText.TextFontDescription = new FontDescription { FaceName = "Calibri", Height = 40, OutputPrecision = FontPrecision.TrueType, Quality = FontQuality.Antialiased }; TimeText.Add(); }
public AltarObject(String name, Obj_AI_Minion obj) { Name = name; Obj = obj; SpawnTime = 185; RespawnTime = 90; Locked = false; NextRespawnTime = 0; MapType = Utility.Map.MapType.TwistedTreeline; Called = false; TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White)); Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += AltarObject_ValueChanged; TextMinimap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMinimap.PositionUpdate = delegate { if (Obj.ServerPosition.Length().Equals(0.0f)) { return(new Vector2(0, 0)); } Vector2 sPos = Drawing.WorldToMinimap(Obj.ServerPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMinimap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && AltarTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type && TextMinimap.X != 0); }; TextMinimap.OutLined = true; TextMinimap.Centered = true; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White)); TextMap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMap.PositionUpdate = delegate { if (Obj.ServerPosition.Length().Equals(0.0f)) { return(new Vector2(0, 0)); } Vector2 sPos = Drawing.WorldToScreen(Obj.ServerPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && AltarTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type && TextMinimap.X != 0); }; TextMap.OutLined = true; TextMap.Centered = true; TextMap.Add(); }
private static void Game_OnGameLoad(EventArgs args) { WardText = new Render.Text( "Ward Count: 0/3", Drawing.Width / 2 + 500, Drawing.Height - 50, 22, Color.Yellow); WardText.Add(); OnWardSound = new SoundObject(Resources.OnWard); Game.OnGameUpdate += Game_OnGameUpdate; GameObject.OnCreate += GameObject_OnCreate; //Game.OnGameNotifyEvent += Game_OnGameNotifyEvent; }
public Status() { status = new Render.Text("", new Vector2(Drawing.Width * 20 / 100, Drawing.Width - 100), (int)12, ColorBGRA.FromRgba(0xFFFFFFFF)) { VisibleCondition = c => true, PositionUpdate = () => new Vector2(Drawing.Width * (getMenuValue("x%") / 100f) + (order * 12), Drawing.Height * (getMenuValue("y%") / 100f)), text = "■", }; status.Add(); }
public Immune() { //Immune Abilities.Add(new Ability("zhonyas_ring_activate", 2.5f, "Zhonyas"), null); Abilities.Add(new Ability("Aatrox_Passive_Death_Activate", 3f, "Aatrox Passive"), null); Abilities.Add(new Ability("LifeAura", 4f, "Ressurection"), null); //Zil und GA Abilities.Add(new Ability("nickoftime_tar", 7f, "Zilean Ult"), null); Abilities.Add(new Ability("eyeforaneye", 2f, "Kayle Ult"), null); Abilities.Add(new Ability("UndyingRage_buf", 5f, "Tryndamere Ult"), null); Abilities.Add(new Ability("EggTimer", 6f, "Anivia Egg"), null); Abilities.Add(new Ability("LOC_Suppress", 1.75f, ""), null); Abilities.Add(new Ability("OrianaVacuumIndicator", 0.50f, "Orianna R"), null); Abilities.Add(new Ability("NocturneUnspeakableHorror_beam", 2f, "Nocturn W"), null); Abilities.Add(new Ability("GateMarker_green", 1.5f, ""), null); Abilities.Add(new Ability("Zed_Ult_TargetMarker_tar", 3.0f, "Zed Ult"), null); foreach (var ability in Abilities.ToList()) { Render.Text text = new Render.Text(new Vector2(0, 0), "", 28, SharpDX.Color.Goldenrod); text.OutLined = true; text.Centered = true; text.TextUpdate = delegate { float endTime = ability.Key.TimeCasted - (int)Game.ClockTime + ability.Key.Delay; var m = (float)Math.Floor(endTime / 60); var s = (float)Math.Ceiling(endTime % 60); return(s < 10 ? m + ":0" + s : m + ":" + s); }; text.PositionUpdate = delegate { Vector2 hpPos = new Vector2(); if (ability.Key.Target != null) { hpPos = ability.Key.Target.HPBarPosition; } if (ability.Key.Owner != null) { hpPos = ability.Key.Owner.HPBarPosition; } hpPos.X = hpPos.X + 80; return(hpPos); }; text.VisibleCondition = delegate { return(Timer.Timers.GetActive() && ImmuneTimer.GetActive() && ability.Key.Casted && ability.Key.TimeCasted > 0); }; text.Add(); Abilities[ability.Key] = text; } GameObject.OnCreate += Obj_AI_Base_OnCreate; Game.OnUpdate += Game_OnGameUpdate; }
private static Render.Text RenderText(string text, bool isTop, int indexof, int toffset, Color2 color) { int ystart = isTop ? 15 + toffset : 411 + toffset; const int size = 20; int xformula = isTop ? 210 + (indexof * 200) : 210 + ((indexof - 5) * 200); var texty = new Render.Text(text, xformula, ystart, size, color); texty.VisibleCondition = sender => !disabletext; texty.Add(1); return(texty); }
public DrawText(JungleCamp pos) { Text = new Render.Text(Drawing.WorldToMinimap(pos.Position), "", 15, SharpDX.Color.White) { VisibleCondition = sender => (pos.NextRespawnTime > 0), TextUpdate = () => FormatTime(pos.NextRespawnTime - (int)Game.ClockTime), }; JungleCamp = pos; Text.Add(_layer); _layer++; }