private static void DrawWard(Spell spell) { try { if (!Config.WardMenu.CheckboxValue(spell.MenuCode + "draw")) return; if (!Config.WardMenu.CheckboxValue(spell.MenuCode + "ally") && spell.Team == Team.Ally) return; if (!Config.WardMenu.CheckboxValue(spell.MenuCode + "enemy") && spell.Team == Team.Enemy) return; if (spell.FullTime != 77777777) { string text = (spell.GetRemainTime() / 1000).ClockStyle(); Vector2 position = Drawing.WorldToScreen(spell.Object.Position) + new Vector2(-12, 0); SharpDX.Color color = spell.GetColor(); WardFont.DrawText(null, text, (int)position.X, (int)position.Y, color); } if (Config.WardMenu.CheckboxValue(spell.MenuCode + "drawCircle") && DrawWardFix == false) { Circle.Draw(spell.GetColor(), 50, 4, spell.Object.Position); } } catch (Exception e) { /*Console.WriteLine(e); Chat.Print("<font color='#FF0000'>ERROR:</font> CODE DRAW_WARD " + spell.Caster.BaseSkinName + " " + spell.Name, Color.SpringGreen); if (DrawWardFix == false) { Chat.Print("Temporarily Fix Ward Timer", Color.Gold); DrawWardFix = true; } else { Chat.Print("Fixing failed, Disable Ward Timer, Please report bugs with CODE", Color.Gold); Config.Menu["wardTimer"].Cast<CheckBox>().CurrentValue = false; }*/ e.ErrorMessage("DRAW_WARD " + spell.Caster.BaseSkinName + " " + spell.Name); } }
private static void DrawTimerLine(Spell spell) { try { Vector2 centerpos = Drawing.WorldToScreen(spell.GameObject ? spell.Object.Position : spell.SkillShot ? spell.CastPosition : spell.Target.Position) + new Vector2(0, 25); float remain = spell.GetRemainTime(); float full = spell.GetFullTime(); bool dynamic = full >= 3000 ? true : false; float length = dynamic ? remain / full * 70f : remain / full * 55f; if (spell.GetFullTime() >= 3500 && full - remain <= 500) { float length2 = (full - remain) / 500f * length; length = length2; } string text = spell.GetRemainTimeString(); Vector2 textpos = centerpos + new Vector2(-15, -13); SharpDX.Color color = spell.GetColor(); SpellFont.DrawText(null, text, (int)textpos.X, (int)textpos.Y, color); Color barColor = spell.Team == Team.Ally ? Color.LawnGreen : spell.Team == Team.Enemy ? Color.Red : Color.Orange; Vector2 linepos = centerpos + new Vector2(0, 15); Vector2 linestart = linepos - new Vector2(length, 0); Vector2 lineend = linepos + new Vector2(length, 0); Drawing.DrawLine(linestart - new Vector2(1, 0), lineend + new Vector2(1, 0), 6, Color.Black); Drawing.DrawLine(linestart, lineend, 4, barColor); } catch (Exception e) { e.ErrorMessage("DRAW_TIMER_LINE", spell.Caster.BaseSkinName + " " + spell.Name); } }
private static void DrawTimer(Spell spell) { try { string text = spell.GetRemainTimeString(); Vector2 position; if (spell.GameObject) position = Drawing.WorldToScreen(spell.Object.Position); else if (spell.SkillShot) position = Drawing.WorldToScreen(spell.CastPosition); else position = Drawing.WorldToScreen(spell.Target.Position); position += new Vector2(-15, 0); SharpDX.Color color = spell.GetColor(); SpellFont.DrawText(null, text, (int)position.X, (int)position.Y, color); } catch (Exception e) { e.ErrorMessage("DRAW_TIMER", spell.Caster.BaseSkinName + " " + spell.Name); } }
private static void DrawLine(Spell spell) { try { Obj_AI_Base hero = spell.Caster; if (!hero.VisibleOnScreen || !hero.IsHPBarRendered || !hero.IsHero()) return; float length = spell.GetRemainTime() / spell.GetFullTime() * 100f; Vector2 mainpos = hero.HPBarPosition; Vector2 startpos = hero.IsMe ? mainpos + new Vector2(26, 25) : mainpos + new Vector2(1, 30); Vector2 endpos = startpos + new Vector2(length, 0); Vector2 endpos2 = endpos + new Vector2(0, 6); Vector2 textpos = endpos2 + new Vector2(10, 3); Vector2 spritepos = textpos + new Vector2(-18, 0); Color lineColor = spell.GetColor().ConvertColor(); SharpDX.Color textColor = spell.GetColor(); Drawing.DrawLine(startpos, endpos, 1f, lineColor); Drawing.DrawLine(endpos, endpos2, 1f, lineColor); LineFont.DrawText(null, spell.GetRemainTimeString(), (int)textpos.X, (int)textpos.Y, textColor); TextureDraw.DrawSprite(spritepos, spell); } catch (Exception e) { e.ErrorMessage("DRAW_LINE" + spell.Caster.BaseSkinName + " " + spell.Name); } }
private static void DrawBlink(Spell spell) { try { if (!Config.MiscMenu.CheckboxValue("blinkAlly") && spell.Team == Team.Ally) return; if (!Config.MiscMenu.CheckboxValue("blinkEnemy") && spell.Team == Team.Enemy) return; Vector3 startpos = spell.StartPosition; Vector3 endpos = spell.KappaRoss(); Drawing.DrawLine(Drawing.WorldToScreen(startpos), Drawing.WorldToScreen(endpos), 2, spell.Color.ConvertColor()); Drawing.DrawText(Drawing.WorldToScreen(endpos) + new Vector2(-20, 15), Color.White, spell.Caster.BaseSkinName, 10); if (DrawBlinkFix == false) ;Circle.Draw(spell.GetColor(), 30f, endpos); } catch (Exception e) { /*Console.WriteLine(e); Chat.Print("<font color='#FF0000'>ERROR:</font> CODE DRAW_BLINK " + spell.Caster.BaseSkinName, Color.SpringGreen); if (DrawBlinkFix == false) { Chat.Print("Temporarily Fix Blink Tracker", Color.Gold); DrawBlinkFix = true; } else { Chat.Print("Fixing failed, Disable Blink Tracker, Please report bugs with CODE", Color.Gold); Config.Menu["blinkTracker"].Cast<CheckBox>().CurrentValue = false; }*/ e.ErrorMessage("DRAW_BLINK " + spell.Caster.BaseSkinName + " " + spell.Name); } }
private static void DrawTrap(Spell spell) { try { if (!Config.TrapMenu.CheckboxValue(spell.MenuCode + "draw")) return; if (!Config.TrapMenu.CheckboxValue(spell.MenuCode + "ally") && spell.Team == Team.Ally) return; if (!Config.TrapMenu.CheckboxValue(spell.MenuCode + "enemy") && spell.Team == Team.Enemy) return; string text = (spell.GetRemainTime() / 1000).ClockStyle(); Vector2 position = Drawing.WorldToScreen(spell.Object.Position) + new Vector2(-15, 0); SharpDX.Color color = spell.GetColor(); TrapFont.DrawText(null, text, (int)position.X, (int)position.Y, color); if (Config.TrapMenu.CheckboxValue(spell.MenuCode + "drawCircle") && DrawTrapFix == false) { if (spell.Team == Team.Ally && Config.TrapMenu.CheckboxValue("circleOnlyEnemy")) return; // Kappa Circle.Draw(spell.GetColor(), spell.Object.BoundingRadius, 4, spell.Object.Position); } } catch (Exception e) { Console.WriteLine(e); Chat.Print("<font color='#FF0000'>ERROR:</font> CODE DRAW_TRAP " + spell.Caster.BaseSkinName + " " + spell.Name, Color.SpringGreen); if (DrawTrapFix == false) { Chat.Print("Temporarily Fix Trap Timer", Color.Gold); DrawTrapFix = true; } else { Chat.Print("Fixing failed, Disable Trap Timer, Please report bugs with CODE", Color.Gold); Config.Menu["trapTimer"].Cast<CheckBox>().CurrentValue = false; } } }