Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Cassiopeia (skrypt?)


Rekomendowane odpowiedzi

Opublikowano

Witam, to chyba do LeagueSharpa?

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

using LeagueSharp;

using LeagueSharp.Math;

 

namespace LeagueCarry.Heroes

{

    class Cassiopeia : IHero

    {

        private SpellDataInst _Q;

        private SpellDataInst _W;

        private SpellDataInst _E;

 

        private SpellData _QSpellData;

        private SpellData _WSpellData;

 

        public Cassiopeia()

        {

            _Q = Unit.Player.Spellbook.Spells[0];

            _W = Unit.Player.Spellbook.Spells[1];

            _E = Unit.Player.Spellbook.Spells[2];

 

            _QSpellData = _Q.SData;

            _WSpellData = _W.SData;

 

            Core.Instance.TargetSelector.Range = 850.0f;

        }

 

        public void OnTick()

        {

            Unit me = Unit.Player;

 

            if (me.IsDead)

                return;

 

            bool successfulCast = false;

 

            if (System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.Space) && MenuGUI.IsChatOpen == false)

            {

                Unit target = Core.Instance.TargetSelector.Target;

 

                if (target != null)

                {

                    bool qReady = _Q.State == SpellState.Ready;

                    bool wReady = _W.State == SpellState.Ready;

                    bool eReady = _E.State == SpellState.Ready;

 

                    if(target.HasBuffOfType(BuffType.Poison) 

                        && eReady

                        && Vector3.Distance(me.Position, target.Position) <= 700

                        && me.Mana >= me.Spellbook.GetManaCost(2))

                    {

                        me.Spellbook.CastSpell(2, target);

                        successfulCast = true;

                    }

 

                    if (successfulCast == false

                        && qReady

                        && Vector3.Distance(me.Position, target.Position) <= 850)

                    {

                        Vector3 pos;

                        if (Core.Instance.Prediction.PredictSkillshot(_QSpellData, target, out pos)

                            && Vector3.Distance(me.Position, pos) <= 850)

                        {

                            me.Spellbook.CastSpell(0, pos);

                            successfulCast = true;

                        }

                    }

 

                    if (successfulCast == false

                        && wReady

                        && Vector3.Distance(me.Position, target.Position) <= 850)

                    {

                        Vector3 pos;

                        if (Core.Instance.Prediction.PredictSkillshot(_WSpellData, target, out pos)

                            && Vector3.Distance(me.Position, pos) <= 850)

                        {

                            me.Spellbook.CastSpell(1, pos);

                            successfulCast = true;

                        }

                    }

                }

 

                if(successfulCast == false)

                {

                    me.IssueOrder(UnitOrder.MoveTo, Game.CursorPos);

                }

            }

        }

 

        public string Name

        {

            get { return "Cassiopeia"; }

        }

 

 

        public void OnDraw()

        {

            Unit target = Core.Instance.TargetSelector.Target;

 

            Drawing.DrawCircle(Unit.Player.Position, _QSpellData.CastRange[0], System.Drawing.Color.White);

            Drawing.DrawCircle(Unit.Player.Position, 700.0f, System.Drawing.Color.Red);

 

            if(target != null)

            {   

                Vector3 pos;

                bool predicted = Core.Instance.Prediction.PredictSkillshot(_QSpellData, target, out pos);

 

                if(predicted)

                {

                    Drawing.DrawCircle(pos, 75.0f, System.Drawing.Color.Red);

                }

            }

        }

    }

}

 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...