Example #1
0
        public override void InitOutfit()
        {
            AddItem(new FancyShirt());
            AddItem(new LongPants(0x66D));
            AddItem(new ThighBoots());
            AddItem(new TricorneHat(0x1));
            AddItem(new BodySash(0x66D));

            LeatherGloves gloves = new LeatherGloves
            {
                Hue = 0x66D
            };

            AddItem(gloves);

            FacialHairItemID = 0x203E; // Long Beard
            FacialHairHue    = 0x455;

            Item sword = new Cutlass
            {
                Movable = false
            };

            AddItem(sword);
        }
Example #2
0
        private static void OnTick(EventArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            var target = Orbwalker.LastTarget as AIHeroClient;

            if (target == null)
            {
                return;
            }

            if (Cutlass.IsOwned())
            {
                UseItem3(Cutlass, target);
            }
            if (Hextech.IsOwned())
            {
                UseItem4(Hextech, target);
            }
            if (Omen.IsOwned())
            {
                UseItem5(Omen);
            }
            if (Glory.IsOwned())
            {
                UseItem6(Glory);
            }
            if (Solari.IsOwned())
            {
                UseItem7(Solari);
            }
        }
Example #3
0
        private static float DamageToUnit(Obj_AI_Hero hero)
        {
            float dmg = 0;

            var spells = new List <Spell> {
                Q, W, E, R
            };

            foreach (var spell in spells.Where(x => x.IsReady()))
            {
                // Account for each blade
                if (spell.Slot == SpellSlot.R)
                {
                    dmg += spell.GetDamage(hero) * 4;
                }
                else
                {
                    dmg += spell.GetDamage(hero);
                }
            }

            if (Botrk.IsReady())
            {
                dmg += (float)Player.GetItemDamage(hero, Damage.DamageItems.Botrk);
            }

            if (Cutlass.IsReady())
            {
                dmg += (float)Player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
            }

            return(dmg);
        }
Example #4
0
        private static void ItemUse()
        {
            var TG = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);

            if (TG == null)
            {
                return;
            }

            if (DFG.IsReady() && Menu.Item("DFG1").GetValue <bool>())
            {
                DFG.Cast(TG);
            }
            if (Cutlass.IsReady() && Menu.Item("Cutlass1").GetValue <bool>())
            {
                Cutlass.Cast(TG);
            }
            if (Hextech.IsReady() && Menu.Item("Hextech1").GetValue <bool>())
            {
                Hextech.Cast(TG);
            }
            if (Frostclaim.IsReady() && Menu.Item("Frostclaim1").GetValue <bool>())
            {
                Frostclaim.Cast(TG);
            }
            if (Botrk.IsReady() && Menu.Item("Botrk1").GetValue <bool>())
            {
                Botrk.Cast(TG);
            }
            if (Youmuus.IsReady() && Menu.Item("Youmuus1").GetValue <bool>())
            {
                Youmuus.Cast();
            }
        }
Example #5
0
        public Sailor() : base(AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.45, 0.8)
        {
            Female = Utility.RandomBool();
            Body   = Female ? 401 : 400;
            Title  = "the sailor";
            Name   = NameList.RandomName(Female ? "female" : "male");
            Hue    = Utility.RandomSkinHue();
            SetStr(66, 80);
            SetDex(66, 80);
            SetInt(41, 55);
            Karma = Utility.RandomMinMax(13, -45);


            SetSkill(SkillName.Tactics, 45, 67.5);
            SetSkill(SkillName.MagicResist, 45, 67.5);
            SetSkill(SkillName.Parry, 45, 67.5);
            SetSkill(SkillName.Swords, 15, 37.5);
            SetSkill(SkillName.Macing, 15, 37.5);
            SetSkill(SkillName.Fencing, 15, 37.5);
            SetSkill(SkillName.Wrestling, 15, 37.5);


            Item item = null;

            if (!Female)
            {
                item     = AddRandomHair();
                item.Hue = Utility.RandomHairHue();
                item     = AddRandomFacialHair(item.Hue);
                item     = new Shirt();
                item.Hue = 2301;
                AddItem(item);
                item     = new ShortPants();
                item.Hue = 2301;
                AddItem(item);
                item = new Cutlass();
                AddItem(item);
                item     = new Shoes();
                item.Hue = Utility.RandomNeutralHue();
                AddItem(item);
                PackGold(15, 100);
            }
            else
            {
                item     = AddRandomHair();
                item.Hue = Utility.RandomHairHue();
                item     = new Shirt();
                item.Hue = 2301;
                AddItem(item);
                item     = new ShortPants();
                item.Hue = 2301;
                AddItem(item);
                item = new Cutlass();
                AddItem(item);
                item     = new Shoes();
                item.Hue = Utility.RandomNeutralHue();
                AddItem(item);
                PackGold(15, 100);
            }
        }
Example #6
0
        public Mercenary(string name) : base(name, AIType.AI_Melee, 0.01)
        {
            SpeechHue = Utility.RandomDyedHue();
            Hue       = Utility.RandomSkinHue();
            Item hair = new Item(Utility.RandomList(0x203B, 0x2049, 0x2048, 0x204A));

            hair.Hue     = Utility.RandomNondyedHue();
            hair.Layer   = Layer.Hair;
            hair.Movable = false;
            PassiveSpeed = 0.4;
            ActiveSpeed  = 0.2;
            AddItem(hair);

            if (Female = Utility.RandomBool())
            {
                Body = 0x191;
            }
            else
            {
                Body = 0x190;
                if (Utility.RandomBool())
                {
                    Item beard = new Item(Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D));
                    beard.Hue     = hair.Hue;
                    beard.Layer   = Layer.FacialHair;
                    beard.Movable = false;
                    AddItem(beard);
                }
            }

            if (!(this is IEvoGuardian))
            {
                Item weapon;
                switch (Utility.Random(6))
                {
                case 0: weapon = new Kryss(); break;

                case 1: weapon = new Scimitar(); break;

                case 2: weapon = new WarAxe(); break;

                case 3: weapon = new Cutlass(); break;

                case 4: weapon = new HammerPick(); break;

                default: weapon = new WarFork(); break;
                }
                AddItem(weapon);
                AddItem(new Robe());
            }

            if (null == Backpack)
            {
                Container pack = new Backpack();
                pack.Movable = false;
                AddItem(pack);
            }
        }
Example #7
0
        public override void InitOutfit()
        {
            WipeLayers();

            switch (Utility.Random(2))
            {
            case 0: AddItem(new SkullCap(Utility.RandomRedHue())); break;

            case 1: AddItem(new TricorneHat(Utility.RandomRedHue())); break;
            }


            if (Utility.RandomBool())
            {
                Item shirt = new Shirt(Utility.RandomRedHue());
                AddItem(shirt);
            }

            Item sash  = new BodySash(0x85);
            Item hair  = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A));
            Item pants = new LongPants(Utility.RandomRedHue());
            Item boots = new Boots(Utility.RandomRedHue());

            hair.Hue     = Utility.RandomHairHue();
            hair.Layer   = Layer.Hair;
            hair.Movable = false;

            Item sword;

            if (Utility.RandomBool())
            {
                sword = new Scimitar();
            }
            else
            {
                sword = new Cutlass();
            }

            sword.LootType = LootType.Newbied;
            sword.Movable  = false;                                     // casts with it equiped

            AddItem(hair);
            AddItem(sash);
            AddItem(pants);
            AddItem(boots);
            AddItem(sword);

            if (!this.Female)
            {
                Item beard = new Item(Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D));
                beard.Hue     = hair.Hue;
                beard.Layer   = Layer.FacialHair;
                beard.Movable = false;
                AddItem(beard);
            }
        }
Example #8
0
 /// <summary>
 /// Gets the damage to a specific unit.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns>The damage that the combo will deal to a target.</returns>
 private static float DamageToUnit(Obj_AI_Hero target)
 {
     return
         ((float)
          ((Q.IsReady() ? Q.GetDamage(target) : 0) + (E.IsReady() ? E.GetDamage(target) : 0)
           + (R.IsReady() ? R.GetDamage(target) : 0) + Player.GetAutoAttackDamage(target) * 2
           + (Botrk.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Botrk) : 0)
           + (Hydra.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Hydra) : 0)
           + (Cutlass.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Bilgewater) : 0)));
 }
Example #9
0
        private static void OffensiveItems()
        {
            if (Botrk.IsReady() && Value.Use("activator.botrk"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Value.Use("activator.botrk.ks") &&
                        Player.Instance.CalculateDamageOnUnit(t, DamageType.Physical, t.MaxHealth * (float)0.1) >
                        t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.botrk.lifesave") &&
                        Player.Instance.HealthPercent < Value.Get("activator.botrk.hp"))
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.botrk.combo") &&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Cutlass.IsReady() && Value.Use("activator.bilgewater"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Value.Use("activator.bilgewater.ks") &&
                        Player.Instance.CalculateDamageOnUnit(t, DamageType.Physical, 100) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.bilgewater.combo") &&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo &&
                Value.Use("activator.youmus"))
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget(Player.Instance.AttackRange) && t is AIHeroClient)
                {
                    Youmuus.Cast();
                }
            }
        }
Example #10
0
        public override void InitOutfit()
        {
            WipeLayers();

            // black captain's hat
            TricorneHat hat = CaptainsHat();

            hat.LootType = LootType.Newbied;
            AddItem(hat);

            if (Utility.RandomBool())
            {
                Item shirt = new Shirt(Utility.RandomRedHue());
                AddItem(shirt);
            }

            Item sash  = new BodySash(0x85);
            Item hair  = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A));
            Item pants = new LongPants(Utility.RandomRedHue());
            Item boots = new Boots(Utility.RandomRedHue());

            hair.Hue     = Utility.RandomHairHue();
            hair.Layer   = Layer.Hair;
            hair.Movable = false;

            Item sword;

            if (Utility.RandomBool())
            {
                sword = new Scimitar();
            }
            else
            {
                sword = new Cutlass();
            }

            sword.LootType = LootType.Newbied;

            AddItem(hair);
            AddItem(sash);
            AddItem(pants);
            AddItem(boots);
            AddItem(sword);

            if (!this.Female)
            {
                Item beard = new Item(Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D));
                beard.Hue     = hair.Hue;
                beard.Layer   = Layer.FacialHair;
                beard.Movable = false;
                AddItem(beard);
            }
        }
Example #11
0
        public MilitiaFighter() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            InitStats(40, 30, 5);
            Title = "the Militia Fighter";

            SpeechHue = Utility.RandomDyedHue();

            Hue = Utility.RandomSkinHue();

            Female = false;
            Body   = 0x190;
            Name   = NameList.RandomName("male");

            Utility.AssignRandomHair(this);
            Utility.AssignRandomFacialHair(this, HairHue);

            AddItem(new ThighBoots(0x1BB));
            AddItem(new LeatherChest());
            AddItem(new LeatherArms());
            AddItem(new LeatherLegs());
            AddItem(new LeatherCap());
            AddItem(new LeatherGloves());
            AddItem(new LeatherGorget());

            Item weapon;

            switch (Utility.Random(6))
            {
            case 0: weapon = new Broadsword(); break;

            case 1: weapon = new Cutlass(); break;

            case 2: weapon = new Katana(); break;

            case 3: weapon = new Longsword(); break;

            case 4: weapon = new Scimitar(); break;

            default: weapon = new VikingSword(); break;
            }
            weapon.Movable = false;
            AddItem(weapon);

            Item shield = new BronzeShield
            {
                Movable = false
            };

            AddItem(shield);

            SetSkill(SkillName.Swords, 20.0);
        }
Example #12
0
        public FighterPeacemaker() : base(AIType.AI_Melee, 1)
        {
            SetStr(220, 300);
            SetDex(40, 60);
            SetInt(40, 60);

            Item weapon;

            switch (Utility.Random(6))
            {
            case 0:
                weapon = new Broadsword();
                break;

            case 1:
                weapon = new Cutlass();
                break;

            case 2:
                weapon = new Katana();
                break;

            case 3:
                weapon = new Longsword();
                break;

            case 4:
                weapon = new Scimitar();
                break;

            default:
                weapon = new VikingSword();
                break;
            }
            AddItem(weapon);

            AddItem(new MetalShield());

            SetDamageType(ResistanceType.Physical, 100);

            SetSkill(SkillName.Tactics, 70, 95);
            SetSkill(SkillName.Swords, 70, 100);
            SetSkill(SkillName.Fencing, 65, 100);
            SetSkill(SkillName.MagicResist, 80, 110);
            SetSkill(SkillName.Macing, 75, 100);
            SetSkill(SkillName.Wrestling, 65, 100);
            SetSkill(SkillName.Parry, 70, 100);
            SetSkill(SkillName.Healing, 65, 75);
            SetSkill(SkillName.Anatomy, 80, 90);
        }
Example #13
0
        public DrownedPirate() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();
            Title     = "the drowned pirate";
            Hue       = Utility.RandomSkinHue();

            Body = 0x190;
            Name = NameList.RandomName("male");
            Hue  = 0x2B8;

            SetStr(120, 170);
            SetDex(800, 115);
            SetInt(20, 35);
            SetHits(520, 1050);

            SetDamage(20, 32);

            SetDamageType(ResistanceType.Physical, 40);
            SetDamageType(ResistanceType.Cold, 60);

            Cutlass cutlass = new Cutlass();

            cutlass.Movable = false;
            cutlass.Skill   = SkillName.Wrestling;
            AddItem(cutlass);

            AddItem(new Shirt(Utility.RandomNeutralHue()));
            AddItem(new ShortPants(Utility.RandomNeutralHue()));
            AddItem(new SkullCap(Utility.RandomRedHue()));

            Utility.AssignRandomHair(this);

            SetSkill(SkillName.Fencing, 90.5, 115.0);
            SetSkill(SkillName.Healing, 60.3, 90.0);
            SetSkill(SkillName.Macing, 90.5, 115.0);
            SetSkill(SkillName.Poisoning, 60.0, 82.5);
            SetSkill(SkillName.MagicResist, 72.5, 95.0);
            SetSkill(SkillName.Swords, 90.5, 115.0);
            SetSkill(SkillName.Tactics, 90.5, 115.0);

            Fame  = 3000;
            Karma = -3000;

            PackItem(new Bandage(Utility.RandomMinMax(1, 15)));
        }
        public override void InitOutfit()
        {
            Name             = "Erik Sullivan";
            Body             = 400;
            Female           = false;
            Race             = Race.Human;
            Hue              = 0x83F3;
            HairItemID       = 8251;
            HairHue          = 1741;
            FacialHairItemID = 0;
            FacialHairHue    = 0;

            Cutlass weapon = new Cutlass();

            weapon.Movable = true;
            AddItem(weapon);

            NorseHelm helm = new NorseHelm();

            helm.Movable = true;
            AddItem(helm);

            LeatherGloves gloves = new LeatherGloves();

            gloves.Movable = true;
            AddItem(gloves);

            RingmailChest chest = new RingmailChest();

            chest.Movable = true;
            AddItem(chest);

            RingmailLegs legs = new RingmailLegs();

            legs.Movable = true;
            AddItem(legs);

            AddItem(new BodySash(944));
            AddItem(new HighBoots());
            AddItem(new Kilt(944));
            AddItem(new PlumeCloak(944));
        }
        public override void InitOutfit()
        {
            AddItem(new FancyShirt());
            AddItem(new LongPants(0x66D));
            AddItem(new ThighBoots());
            AddItem(new TricorneHat(0x1));
            AddItem(new BodySash(0x66D));

            LeatherGloves gloves = new LeatherGloves();

            gloves.Hue = 0x66D;
            AddItem(gloves);

            AddItem(new LongBeard(0x455));

            Item sword = new Cutlass();

            sword.Movable = false;
            AddItem(sword);
        }
            public InternalSellInfo()
            {
                Add(typeof(Dagger), Dagger.GetSBSellValue());
                Add(typeof(Kryss), Kryss.GetSBSellValue());
                Add(typeof(WarFork), WarFork.GetSBSellValue());
                Add(typeof(ShortSpear), ShortSpear.GetSBSellValue());
                Add(typeof(Pitchfork), Pitchfork.GetSBSellValue());
                Add(typeof(Spear), Spear.GetSBSellValue());

                Add(typeof(HammerPick), HammerPick.GetSBSellValue());
                Add(typeof(WarAxe), WarAxe.GetSBSellValue());
                Add(typeof(Mace), Mace.GetSBSellValue());
                Add(typeof(Maul), Maul.GetSBSellValue());
                Add(typeof(WarHammer), WarHammer.GetSBSellValue());
                Add(typeof(WarMace), WarMace.GetSBSellValue());

                Add(typeof(ButcherKnife), ButcherKnife.GetSBSellValue());
                Add(typeof(SkinningKnife), SkinningKnife.GetSBSellValue());
                Add(typeof(Cleaver), Cleaver.GetSBSellValue());
                Add(typeof(Cutlass), Cutlass.GetSBSellValue());
                Add(typeof(Katana), Katana.GetSBSellValue());
                Add(typeof(Scimitar), Scimitar.GetSBSellValue());
                Add(typeof(Broadsword), Broadsword.GetSBSellValue());
                Add(typeof(Longsword), Longsword.GetSBSellValue());
                Add(typeof(VikingSword), VikingSword.GetSBSellValue());
                Add(typeof(Axe), Axe.GetSBSellValue());
                Add(typeof(BattleAxe), BattleAxe.GetSBSellValue());
                Add(typeof(DoubleAxe), DoubleAxe.GetSBSellValue());
                Add(typeof(ExecutionersAxe), ExecutionersAxe.GetSBSellValue());
                Add(typeof(LargeBattleAxe), LargeBattleAxe.GetSBSellValue());
                Add(typeof(TwoHandedAxe), TwoHandedAxe.GetSBSellValue());
                Add(typeof(Bardiche), Bardiche.GetSBSellValue());
                Add(typeof(Halberd), Halberd.GetSBSellValue());

                Add(typeof(Bow), Bow.GetSBSellValue());
                Add(typeof(Crossbow), Crossbow.GetSBSellValue());
                Add(typeof(HeavyCrossbow), HeavyCrossbow.GetSBSellValue());
            }
        public DrunkenPirate() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();
            Title     = "the drunken pirate";
            Hue       = Utility.RandomSkinHue();

            Body = 0x190;
            Name = NameList.RandomName("male");

            SetStr(220, 430);
            SetDex(100, 115);
            SetInt(20, 45);
            SetHits(3500, 6050);

            SetDamage(10, 32);

            Cutlass cutlass = new Cutlass();

            cutlass.Movable = false;
            cutlass.Skill   = SkillName.Wrestling;
            AddItem(cutlass);

            AddItem(new FancyShirt(Utility.RandomNeutralHue()));
            AddItem(new LongPants(Utility.RandomNeutralHue()));
            AddItem(new Boots(Utility.RandomNeutralHue()));
            AddItem(new BodySash(Utility.RandomRedHue()));
            AddItem(new SkullCap(Utility.RandomRedHue()));

            Utility.AssignRandomHair(this);

            SetSkill(SkillName.MagicResist, 65.0, 67.5);
            SetSkill(SkillName.Swords, 85.0, 117.5);
            SetSkill(SkillName.Tactics, 75.0, 147.5);
            SetSkill(SkillName.Wrestling, 100.0, 139.3);

            Fame  = 8000;
            Karma = -10000;
        }
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));
                Add(new GenericBuyInfo("Kryss", typeof(Kryss), Kryss.GetSBPurchaseValue(), 25, 0x1401, 0));
                Add(new GenericBuyInfo("War Fork", typeof(WarFork), WarFork.GetSBPurchaseValue(), 25, 0x1405, 0));
                Add(new GenericBuyInfo("Short Spear", typeof(ShortSpear), ShortSpear.GetSBPurchaseValue(), 25, 0x1403, 0));
                Add(new GenericBuyInfo("Pitchfork", typeof(Pitchfork), Pitchfork.GetSBPurchaseValue(), 25, 0xE87, 0));
                Add(new GenericBuyInfo("Spear", typeof(Spear), Spear.GetSBPurchaseValue(), 25, 0xF62, 0));

                Add(new GenericBuyInfo("Hammer Pick", typeof(HammerPick), HammerPick.GetSBPurchaseValue(), 25, 0x143D, 0));
                Add(new GenericBuyInfo("War Axe", typeof(WarAxe), WarAxe.GetSBPurchaseValue(), 25, 0x13B0, 0));
                Add(new GenericBuyInfo("Mace", typeof(Mace), Mace.GetSBPurchaseValue(), 25, 0xF5C, 0));
                Add(new GenericBuyInfo("Maul", typeof(Maul), Maul.GetSBPurchaseValue(), 25, 0x143B, 0));
                Add(new GenericBuyInfo("WarHammer", typeof(WarHammer), WarHammer.GetSBPurchaseValue(), 25, 0x1439, 0));
                Add(new GenericBuyInfo("War Mace", typeof(WarMace), WarMace.GetSBPurchaseValue(), 25, 0x1407, 0));

                Add(new GenericBuyInfo("Butcher Knife", typeof(ButcherKnife), ButcherKnife.GetSBPurchaseValue(), 25, 0x13F6, 0));
                Add(new GenericBuyInfo("Skinning Knife", typeof(SkinningKnife), SkinningKnife.GetSBPurchaseValue(), 25, 0xEC4, 0));
                Add(new GenericBuyInfo("Cleaver", typeof(Cleaver), Cleaver.GetSBPurchaseValue(), 25, 0xEC3, 0));
                Add(new GenericBuyInfo("Cutlass", typeof(Cutlass), Cutlass.GetSBPurchaseValue(), 25, 0x1441, 0));
                Add(new GenericBuyInfo("Katana", typeof(Katana), Katana.GetSBPurchaseValue(), 25, 0x13FF, 0));
                Add(new GenericBuyInfo("Scimitar", typeof(Scimitar), Scimitar.GetSBPurchaseValue(), 25, 0x13B6, 0));
                Add(new GenericBuyInfo("Broadsword", typeof(Broadsword), Broadsword.GetSBPurchaseValue(), 25, 0xF5E, 0));
                Add(new GenericBuyInfo("Longsword", typeof(Longsword), Longsword.GetSBPurchaseValue(), 25, 0xF61, 0));
                Add(new GenericBuyInfo("Viking Sword", typeof(VikingSword), VikingSword.GetSBPurchaseValue(), 25, 0x13B9, 0));
                Add(new GenericBuyInfo("Axe", typeof(Axe), Axe.GetSBPurchaseValue(), 25, 0xF49, 0));
                Add(new GenericBuyInfo("Battle Axe", typeof(BattleAxe), BattleAxe.GetSBPurchaseValue(), 25, 0xF47, 0));
                Add(new GenericBuyInfo("Double Axe", typeof(DoubleAxe), DoubleAxe.GetSBPurchaseValue(), 25, 0xF4B, 0));
                Add(new GenericBuyInfo("Executioner's Axe", typeof(ExecutionersAxe), ExecutionersAxe.GetSBPurchaseValue(), 25, 0xF45, 0));
                Add(new GenericBuyInfo("Large Battle Axe", typeof(LargeBattleAxe), LargeBattleAxe.GetSBPurchaseValue(), 25, 0x13FB, 0));
                Add(new GenericBuyInfo("Two-Handed Axe", typeof(TwoHandedAxe), TwoHandedAxe.GetSBPurchaseValue(), 25, 0x1443, 0));
                Add(new GenericBuyInfo("Bardiche", typeof(Bardiche), Bardiche.GetSBPurchaseValue(), 25, 0xF4D, 0));
                Add(new GenericBuyInfo("Halberd", typeof(Halberd), Halberd.GetSBPurchaseValue(), 25, 0x143E, 0));

                Add(new GenericBuyInfo("Bow", typeof(Bow), Bow.GetSBPurchaseValue(), 25, 0x13B2, 0));
                Add(new GenericBuyInfo("Crossbow", typeof(Crossbow), Crossbow.GetSBPurchaseValue(), 25, 0xF50, 0));
                Add(new GenericBuyInfo("Heavy Crossbow", typeof(HeavyCrossbow), HeavyCrossbow.GetSBPurchaseValue(), 25, 0x13FD, 0));
            }
Example #19
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (GLP800.IsReady() && Config.Item("GLP800").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(GLP800.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("GLP800KS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 200 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        GLP800.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("GLP800Combo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        GLP800.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Protobelt.IsReady() && Config.Item("Protobelt").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Protobelt.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("ProtobeltKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Protobelt.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("ProtobeltCombo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        Protobelt.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>() && Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>() && Program.Combo)
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>())
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #20
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            PlayerMobile player = from as PlayerMobile;

            if (player != null)
            {
                QuestSystem qs = player.Quest;

                if (qs is UzeraanTurmoilQuest)
                {
                    if (dropped is UzeraanTurmoilHorn)
                    {
                        if (player.Young)
                        {
                            UzeraanTurmoilHorn horn = (UzeraanTurmoilHorn)dropped;

                            if (horn.Charges < 10)
                            {
                                this.SayTo(from, 1049384); // I have recharged the item for you.
                                horn.Charges = 10;
                            }
                            else
                            {
                                this.SayTo(from, 1049385); // That doesn't need recharging yet.
                            }
                        }
                        else
                        {
                            player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
                        }

                        return(false);
                    }

                    if (dropped is SchmendrickScrollOfPower)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnScrollOfPowerObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();

                            cont.DropItem(new TreasureMap(player.Young ? 0 : 1, Map.Trammel));
                            cont.DropItem(new Shovel());
                            cont.DropItem(new UzeraanTurmoilHorn());

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestFertileDirt)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnFertileDirtObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();

                            if (player.Profession == 2) // magician
                            {
                                cont.DropItem(new BlackPearl(20));
                                cont.DropItem(new Bloodmoss(20));
                                cont.DropItem(new Garlic(20));
                                cont.DropItem(new Ginseng(20));
                                cont.DropItem(new MandrakeRoot(20));
                                cont.DropItem(new Nightshade(20));
                                cont.DropItem(new SulfurousAsh(20));
                                cont.DropItem(new SpidersSilk(20));

                                for (int i = 0; i < 3; i++)
                                {
                                    cont.DropItem(Loot.RandomScroll(0, 23, SpellbookType.Regular));
                                }
                            }
                            else
                            {
                                cont.DropItem(new Gold(300));
                                cont.DropItem(new Bandage(25));

                                for (int i = 0; i < 5; i++)
                                {
                                    cont.DropItem(new LesserHealPotion());
                                }
                            }

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestDaemonBlood)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBloodObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Item reward;

                            if (player.Profession == 2) // magician
                            {
                                Container cont = GetNewContainer();

                                cont.DropItem(new ExplosionScroll(4));
                                cont.DropItem(new MagicWizardsHat());

                                reward = cont;
                            }
                            else
                            {
                                BaseWeapon weapon;
                                switch (Utility.Random(6))
                                {
                                case 0:
                                    weapon = new Broadsword();
                                    break;

                                case 1:
                                    weapon = new Cutlass();
                                    break;

                                case 2:
                                    weapon = new Katana();
                                    break;

                                case 3:
                                    weapon = new Longsword();
                                    break;

                                case 4:
                                    weapon = new Scimitar();
                                    break;

                                default:
                                    weapon = new VikingSword();
                                    break;
                                }

                                if (Core.AOS)
                                {
                                    BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
                                }
                                else
                                {
                                    weapon.DamageLevel     = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                    weapon.AccuracyLevel   = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                    weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                }

                                weapon.Slayer = SlayerName.Silver;

                                reward = weapon;
                            }

                            if (!player.PlaceInBackpack(reward))
                            {
                                reward.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestDaemonBone)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBoneObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();
                            cont.DropItem(new BankCheck(2000));
                            cont.DropItem(new EnchantedSextant());

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                }
            }

            return(base.OnDragDrop(from, dropped));
        }
Example #21
0
        public Mercenary()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Title = "the Mercenary";

            this.SpeechHue = Utility.RandomDyedHue();

            this.Hue = Utility.RandomSkinHue();

            this.Female = false;
            this.Body   = 0x190;
            this.Name   = NameList.RandomName("male");

            Utility.AssignRandomHair(this);
            Utility.AssignRandomFacialHair(this, this.HairHue);

            this.AddItem(new ThighBoots(0x1BB));
            this.AddItem(new LeatherChest());
            this.AddItem(new LeatherArms());
            this.AddItem(new LeatherLegs());
            this.AddItem(new LeatherCap());
            this.AddItem(new LeatherGloves());
            this.AddItem(new LeatherGorget());

            Item weapon;

            switch (Utility.Random(6))
            {
            case 0:
                weapon = new Broadsword();
                break;

            case 1:
                weapon = new Cutlass();
                break;

            case 2:
                weapon = new Katana();
                break;

            case 3:
                weapon = new Longsword();
                break;

            case 4:
                weapon = new Scimitar();
                break;

            default:
                weapon = new VikingSword();
                break;
            }
            weapon.Movable = false;
            this.AddItem(weapon);

            Item shield = new BronzeShield();

            shield.Movable = false;
            this.AddItem(shield);

            this.SetStr(150);
            this.SetDex(100);
            this.SetInt(25);

            this.SetHits(150);

            this.SetDamage(8, 15);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 50, 60);
            this.SetResistance(ResistanceType.Fire, 45, 55);
            this.SetResistance(ResistanceType.Cold, 50, 60);
            this.SetResistance(ResistanceType.Poison, 40, 50);
            this.SetResistance(ResistanceType.Energy, 45, 55);

            this.SetSkill(SkillName.MagicResist, 65.1, 80.0);
            this.SetSkill(SkillName.Anatomy, 65.1, 80.0);
            this.SetSkill(SkillName.Healing, 65.1, 80.0);
            this.SetSkill(SkillName.Swords, 65.1, 80.0);
            this.SetSkill(SkillName.Tactics, 65.1, 80.0);
            this.SetSkill(SkillName.Parry, 65.1, 80.0);

            this.Fame  = 3000;
            this.Karma = 3000;

            this.VirtualArmor = 25;

            new InternalTimer(this).Start();
        }
Example #22
0
        public CursedPirateKing() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "Bart Roberts";
            Title       = "The Cursed Pirate King";
            Body        = 0x190;
            Hue         = Utility.RandomMinMax(0x8596, 0x8599);
            BaseSoundID = 0x165;

            Cutlass cutlass = new Cutlass();

            cutlass.Movable = false;
            cutlass.Hue     = 0x497;
            cutlass.Skill   = SkillName.Swords;
            AddItem(cutlass);

            FancyShirt shirt = new FancyShirt();

            shirt.Movable = false;
            shirt.Hue     = 1153;
            AddItem(shirt);

            LongPants pants = new LongPants();

            pants.Movable = false;
            pants.Hue     = 0x497;
            AddItem(pants);

            ThighBoots boots = new ThighBoots();

            boots.Movable = false;
            boots.Hue     = 0x497;
            AddItem(boots);

            GoldEarrings earrings = new GoldEarrings();

            earrings.Movable = false;
            earrings.Hue     = 0x35;
            AddItem(earrings);

            TricorneHat hat = new TricorneHat();

            hat.Movable = false;
            hat.Hue     = 0x497;
            AddItem(hat);

            SetStr(400, 560);
            SetDex(90, 120);
            SetInt(300, 460);

            SetHits(6000, 12000);
            SetMana(5000);

            SetDamage(16, 34);

            SetDamageType(ResistanceType.Physical, 75);
            SetDamageType(ResistanceType.Poison, 25);

            SetResistance(ResistanceType.Physical, 40, 60);
            SetResistance(ResistanceType.Fire, 60, 80);
            SetResistance(ResistanceType.Cold, 40, 60);
            SetResistance(ResistanceType.Poison, 40, 60);
            SetResistance(ResistanceType.Energy, 40, 65);

            SetSkill(SkillName.Anatomy, 120.0);
            SetSkill(SkillName.EvalInt, 100.0);
            SetSkill(SkillName.Magery, 100.0);
            SetSkill(SkillName.Meditation, 120.0);
            SetSkill(SkillName.MagicResist, 100.0);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.Wrestling, 120.0);
            SetSkill(SkillName.Swords, 160.0);

            Fame  = 20000;
            Karma = -20000;

            VirtualArmor = 60;
        }
Example #23
0
        private void Offensive()
        {
            var botrk = Config["activator"]["offensives"]["botrk"];

            if (Botrk.IsReady && botrk.GetValue <MenuBool>("Botrk").Value)
            {
                var t = Variables.TargetSelector.GetTarget(Botrk.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (botrk.GetValue <MenuBool>("BotrkKS").Value&& Player.CalculateDamage(t, DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (botrk.GetValue <MenuBool>("BotrkCombo").Value&& Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            var glp800 = Config["activator"]["offensives"]["glp800"];

            if (GLP800.IsReady && glp800.GetValue <MenuBool>("GLP800").Value)
            {
                var t = Variables.TargetSelector.GetTarget(GLP800.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (glp800.GetValue <MenuBool>("GLP800KS").Value&& Player.CalculateDamage(t, DamageType.Magical, 100 + 100f / 17 * (Player.Level - 1) + 0.2 * Player.TotalMagicalDamage) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        GLP800.Cast(Movement.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (glp800.GetValue <MenuBool>("GLP800Combo").Value&& Program.Combo)
                    {
                        GLP800.Cast(Movement.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            var protobelt = Config["activator"]["offensives"]["protobelt"];

            if (Protobelt.IsReady && protobelt.GetValue <MenuBool>("Protobelt").Value)
            {
                var t = Variables.TargetSelector.GetTarget(Protobelt.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (protobelt.GetValue <MenuBool>("ProtobeltKS").Value&& Player.CalculateDamage(t, DamageType.Magical, 75 + 75f / 17 * (Player.Level - 1) + 0.25 * Player.TotalMagicalDamage) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Protobelt.Cast(Movement.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (protobelt.GetValue <MenuBool>("ProtobeltCombo").Value&& Program.Combo)
                    {
                        Protobelt.Cast(Movement.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            var hextech = Config["activator"]["offensives"]["hextech"];

            if (Hextech.IsReady && hextech.GetValue <MenuBool>("Hextech").Value)
            {
                var t = Variables.TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (hextech.GetValue <MenuBool>("HextechKS").Value&& Player.CalculateDamage(t, DamageType.Magical, 175 + 78f / 17 * (Player.Level - 1) + 0.3 * Player.TotalMagicalDamage) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (hextech.GetValue <MenuBool>("HextechCombo").Value&& Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            var cutlass = Config["activator"]["offensives"]["cutlass"];

            if (Cutlass.IsReady && cutlass.GetValue <MenuBool>("Cutlass").Value)
            {
                var t = Variables.TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (cutlass.GetValue <MenuBool>("CutlassKS").Value&& Player.CalculateDamage(t, DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (cutlass.GetValue <MenuBool>("CutlassCombo").Value&& Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            var youmuus = Config["activator"]["offensives"]["youmuus"];

            if (Youmuus.IsReady && youmuus.GetValue <MenuBool>("Youmuus").Value&& Program.Combo)
            {
                var t = Variables.Orbwalker.GetTarget();
                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (youmuus.GetValue <MenuBool>("YoumuusKS").Value&& t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (youmuus.GetValue <MenuBool>("YoumuusCombo").Value)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config["activator"]["offensives"]["hydra"].GetValue <MenuBool>("Hydra").Value)
            {
                if (Hydra.IsReady && Player.CountEnemyHeroesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady && Player.CountEnemyHeroesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #24
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(FrostQueen.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    var predInput2 = new Core.PredictionInput
                    {
                        Aoe       = true,
                        Collision = false,
                        Speed     = 1200,
                        Delay     = 0.25f,
                        Range     = FrostQueen.Range,
                        From      = Player.ServerPosition,
                        Radius    = 200,
                        Unit      = t,
                        Type      = Core.SkillshotType.SkillshotCircle
                    };
                    var poutput2 = Core.Prediction.GetPrediction(predInput2);

                    if (poutput2.Hitchance >= Core.HitChance.High)
                    {
                        FrostQueen.Cast(poutput2.CastPosition);
                    }
                }
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #25
0
        public static void Init()
        {
            if (Botrk.IsOwned())
            {
                UtilityMenu.Activator.AddCheckBox("activator.botrk", "Use BOTRK");
                UtilityMenu.Activator.AddSeparator();
                UtilityMenu.Activator.AddGroupLabel("Blade of The Ruined King Manager:",
                                                    "activator.label.utilitymenu.botrk", true);
                UtilityMenu.Activator.AddCheckBox("activator.botrk.combo", "Use BOTRK (COMBO Mode)", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.botrk.ks", "Use BOTRK (KS Mode)", false, true);
                UtilityMenu.Activator.AddCheckBox("activator.botrk.lifesave", "Use BOTRK (LifeSave)", false, true);
                UtilityMenu.Activator.AddSlider("activator.botrk.hp", "Use BOTRK (LifeSave) if HP are under {0}", 20, 0,
                                                100, true);
                UtilityMenu.Activator.AddSeparator();
            }
            if (Cutlass.IsOwned())
            {
                UtilityMenu.Activator.AddCheckBox("activator.bilgewater", "Use BC");
                UtilityMenu.Activator.AddSeparator();
                UtilityMenu.Activator.AddGroupLabel("Bilgewater Cutlass Manager:",
                                                    "activator.label.utilitymenu.bilgewater", true);
                UtilityMenu.Activator.AddCheckBox("activator.bilgewater.combo", "Use BC (COMBO Mode)", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.bilgewater.ks", "Use BC (KS Mode)", false, true);
                UtilityMenu.Activator.AddSeparator();
            }

            if (Youmuus.IsOwned())
            {
                UtilityMenu.Activator.AddCheckBox("activator.youmus", "Use Youmus");
                UtilityMenu.Activator.AddSeparator();
                UtilityMenu.Activator.AddGroupLabel("Youmus Manager:", "activator.label.utilitymenu.youmus", true);
                UtilityMenu.Activator.AddCheckBox("activator.youmusspellonly", "Use Youmus only on spell cast", false,
                                                  true);
                UtilityMenu.Activator.AddSeparator();
            }

            if (Hunter.IsOwned() || Refillable.IsOwned() || Potion.IsOwned() || Biscuit.IsOwned() ||
                Corrupting.IsOwned())
            {
                UtilityMenu.Activator.AddCheckBox("activator.potions", "Use Potions");
                UtilityMenu.Activator.AddSeparator();
                UtilityMenu.Activator.AddGroupLabel("Potions Manager:", "activator.label.utilitymenu.potions", true);
                UtilityMenu.Activator.AddSlider("activator.potions.hp", "Use POTIONS if HP are under {0}", 20, 0, 100,
                                                true);
                UtilityMenu.Activator.AddSlider("activator.potions.mana", "Use POTIONS if mana is under {0}", 20, 0, 100,
                                                true);
                UtilityMenu.Activator.AddSeparator();
            }

            if (Mercurial.IsOwned() || Qss.IsOwned())
            {
                UtilityMenu.Activator.AddCheckBox("activator.qss", "Use QSS - Mercurial");
                UtilityMenu.Activator.AddCheckBox("activator.qss.ulti", "Prevent ultimates");
                UtilityMenu.Activator.AddCheckBox("activator.qss.bonus", "Use on bonus");
                UtilityMenu.Activator.AddSeparator();
                UtilityMenu.Activator.AddGroupLabel("Anti Cloud-Control Manager:", "activator.label.utilitymenu.qss",
                                                    true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.1", "Use it on Airborne", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.2", "Use it on Blind", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.3", "Use it on Disarm", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.4", "Use it on Forced Action", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.5", "Use it on Root", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.6", "Use it on Silence", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.7", "Use it on Slow", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.8", "Use it on Stasis", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.9", "Use it on Stun", true, true);
                UtilityMenu.Activator.AddCheckBox("activator.qss.cc.10", "Use it on Suppression", true, true);
                UtilityMenu.Activator.AddSeparator();

                if (Value.Use("activator.qss.ulti"))
                {
                    UtilityMenu.Activator.AddGroupLabel("Anti Ultimate Manager:",
                                                        "activator.label.utilitymenu.qss.antiulti", true);

                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Fiora"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.1", "Prevent Fiora Ultimate", true, true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Fizz"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.2", "Prevent Fizz Ultimate", true, true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Lissandra"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.4", "Prevent Lissandra Ultimate", true,
                                                          true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Mordekaiser"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.5", "Prevent Mordekaiser Ultimate", true,
                                                          true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Thresh"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.7", "Prevent Thresh Q", true, true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Vladimir"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.8", "Prevent Vladimir", true, true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Zed"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.ulti.9", "Prevent Zed Ultimate", true, true);
                    }
                }

                UtilityMenu.Activator.AddSeparator();

                if (Value.Use("activator.qss.bonus"))
                {
                    UtilityMenu.Activator.AddGroupLabel("Anti Cloud-Control Bonus Manager:",
                                                        "activator.label.utilitymenu.qss.bonus", true);

                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Vayne"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.bonus.1", "Prevent Vayne Stacks", false, true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Darius"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.bonus.2", "Prevent Darius BloodStacks", false,
                                                          true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Kalista"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.bonus.3", "Prevent Kalista EStacks", false,
                                                          true);
                    }
                    if (EntityManager.Heroes.Enemies.Any(a => a.ChampionName == "Tristana"))
                    {
                        UtilityMenu.Activator.AddCheckBox("activator.qss.bonus.4", "Prevent Tristana EStacks", false,
                                                          true);
                    }
                }

                UtilityMenu.Activator.AddSlider("activator.qss.prevent.enemies",
                                                "Prevent to use QSS if there are less then {0} enemies", 3, 0, 5, true);
                UtilityMenu.Activator.AddSlider("activator.qss.hp", "Use QSS if HP are under {0}", 20, 0, 100, true);
                UtilityMenu.Activator.AddSeparator();
            }

            if (MainMenu._menu["useonupdate"].Cast <CheckBox>().CurrentValue)
            {
                Game.OnUpdate += GameOnUpdate;
            }
            else
            {
                Game.OnTick += GameOnUpdate;
            }

            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Shop.OnBuyItem         += Shop_OnBuyItem;
            Obj_AI_Base.OnBuffGain += BuffGain;
        }
        public UndeadBlackBart() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.175, 0.2)
        {
            Body      = 400;
            Team      = 1;
            Kills     = 10;
            Hue       = Utility.RandomSkinHue();
            SpeechHue = 1153;
            this.Body = 0x190;
            Name      = NameList.RandomName("Male");
            SetStr(100);
            SetDex(100);
            SetInt(20);

            SetSkill(SkillName.Archery, 100.0);
            SetSkill(SkillName.MagicResist, 100.0);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.Healing, 100.0);
            SetSkill(SkillName.Anatomy, 100.0);
            SetSkill(SkillName.Swords, 100.0);
            SetSkill(SkillName.Hiding, 120.0, 180.0);
            SetSkill(SkillName.Stealth, 120.0, 180.0);

            Fame  = 4500;
            Karma = -4500;

            VirtualArmor = 0;

            Item hair = new LongHair();

            hair.Hue     = 1175;
            hair.Layer   = Layer.Hair;
            hair.Movable = false;
            AddItem(hair);
            Item beard = new MediumLongBeard();

            beard.Hue     = 1175;
            beard.Layer   = Layer.FacialHair;
            beard.Movable = false;
            AddItem(beard);
            PackGold(120, 160);
            PackItem(new Bandage(100));

            Item fancyshirt = new FancyShirt();

            EquipItem(fancyshirt);
            Item necklace = new Necklace();

            EquipItem(necklace);
            Item goldring = new GoldRing();

            EquipItem(goldring);
            Item longpants = new LongPants();

            longpants.Hue = Utility.RandomNeutralHue();
            EquipItem(longpants);
            Item boots = new Boots();

            EquipItem(boots);
            Item gloves = new LeatherGloves();

            EquipItem(gloves);
            Item hat = new TricorneHat();

            hat.Hue = 1;
            EquipItem(hat);

            switch (Utility.Random(2))
            {
            case 0:
            {
                Item scimitar = new Scimitar();
                EquipItem(scimitar);
                break;
            }

            case 1:
            {
                Item cutlass = new Cutlass();
                EquipItem(cutlass);
                break;
            }
            }
        }
Example #27
0
        private static void Offensive()
        {
            if (Botrk.IsReady() && OffensivesMenu["botrk"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["botrkks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Physical, t.MaxHealth * (float)0.1) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (OffensivesMenu["botrkls"].Cast <CheckBox>().CurrentValue&& Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (OffensivesMenu["botrkc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && OffensivesMenu["hex"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["hexks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Magical, 150 + Player.FlatMagicDamageMod * (float)0.4) >
                        t.Health)
                    {
                        Hextech.Cast(t);
                    }
                    if (OffensivesMenu["hexc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo && FrostQueen.IsReady() &&
                OffensivesMenu["fq"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(FrostQueen.Range, DamageType.Magical);
                if (t.IsValidTarget() && t.Distance(Player) < 1500)
                {
                    FrostQueen.Cast();
                }
            }

            if (Cutlass.IsReady() && OffensivesMenu["cut"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["cutks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Magical, 100) > t.Health)
                    {
                        Cutlass.Cast(t);
                    }
                    if (OffensivesMenu["cutc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && OffensivesMenu["gb"].Cast <CheckBox>().CurrentValue&&
                Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget(Player.AttackRange) && t is AIHeroClient)
                {
                    Youmuus.Cast();
                }
            }

            if ((OffensivesMenu["tmat"].Cast <CheckBox>().CurrentValue ||
                 OffensivesMenu["rh"].Cast <CheckBox>().CurrentValue) && (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo || Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Harass))
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Tiamat.IsReady() && Player.CountEnemiesInRange(Tiamat.Range) > 0)
                {
                    Tiamat.Cast();
                }
            }
        }
Example #28
0
        public void HandleInput(GameTime gameTime, Cutlass.GameComponents.Input input, Vector2 playerScreenPosition)
        {
            KeyboardState keyboardState = input.CurrentKeyboardState;
            MouseState mouseState = input.CurrentMouseState;
            GamePadState gamePadState = input.CurrentGamePadState;

            //Keyboard Input
            _IsJumpingDown = false;
            _WalkDirection = 0;

            if (keyboardState.IsKeyDown(GameSettingsManager.Default.LeftKey))
            {
                _WalkDirection = _WalkDirection - 1;
                _Velocity.X = Math.Max(_Velocity.X - (0.1f * (float)gameTime.ElapsedGameTime.TotalMilliseconds), -MAX_PLAYER_HORIZONTAL_SPEED);
            }

            if (keyboardState.IsKeyDown(GameSettingsManager.Default.RightKey))
            {
                _WalkDirection = _WalkDirection + 1;
                _Velocity.X = Math.Min(_Velocity.X + (0.1f * (float)gameTime.ElapsedGameTime.TotalMilliseconds), MAX_PLAYER_HORIZONTAL_SPEED);
            }

            if (keyboardState.IsKeyDown(GameSettingsManager.Default.JumpKey) && _IsOnGround)
            {
                _IsOnGround = false;

                if (keyboardState.IsKeyDown(GameSettingsManager.Default.DownKey))
                {
                    _IsJumpingDown = true;
                    _Velocity.Y += 1.0f;
                }
                else
                {
                    _Velocity.Y = _Velocity.Y - (6.0f);
                }
            }

            //Mouse Input
            Vector2 mousePosition = new Vector2(mouseState.X, mouseState.Y);
            _LookDirection = mousePosition - (playerScreenPosition);// + new Vector2(Width / 2, Height / 2));
            _LookDirection.Normalize();

            //Looking Right
            if (_LookDirection.X >= 0)
            {
                //On the ground
                if (_WasOnGround)
                {
                    //Walking forward
                    if (_WalkDirection > 0)
                    {
                        _CurrentTexture = _Player_TexId_Walking_R;
                    }
                    //Walking backward
                    else if (_WalkDirection < 0)
                    {
                        _CurrentTexture = _Player_TexId_Walking_Reverse_R;
                    }
                    //Standing
                    else
                    {
                        _CurrentTexture = _Player_TexId_Standing_R;
                    }
                }
                //Jumping
                else
                {
                    _CurrentTexture = _Player_TexId_Jumping_R;
                }
            }
            //Looking Left
            else
            {
                //On the ground
                if (_WasOnGround)
                {
                    //Walking forward
                    if (_WalkDirection < 0)
                    {
                        _CurrentTexture = _Player_TexId_Walking_L;
                    }
                    //Walking backward
                    else if (_WalkDirection > 0)
                    {
                        _CurrentTexture = _Player_TexId_Walking_Reverse_L;
                    }
                    //Standing
                    else
                    {
                        _CurrentTexture = _Player_TexId_Standing_L;
                    }
                }
                //Jumping
                else
                {
                    _CurrentTexture = _Player_TexId_Jumping_L;
                }
            }
        }
Example #29
0
        private void Offensive()
        {
            if (Botrk.IsReady() && getCheckBoxItem("Botrk"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("BotrkKS") &&
                        Player.CalcDamage(t, DamageType.Physical, t.MaxHealth * 0.1) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkLS") &&
                        Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkCombo") && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && getCheckBoxItem("Hextech"))
            {
                var t = TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("HextechKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (getCheckBoxItem("HextechCombo") && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && getCheckBoxItem("FrostQueen") &&
                Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && getCheckBoxItem("Cutlass"))
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("CutlassKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (getCheckBoxItem("CutlassCombo") && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && getCheckBoxItem("Youmuus"))
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (getCheckBoxItem("YoumuusKS") && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (getCheckBoxItem("YoumuusCombo") && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (getCheckBoxItem("Hydra"))
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #30
0
        private static void Combo()
        {
            var useQ         = Menu.Item("useQ").GetValue <bool>();
            var useW         = Menu.Item("useW").GetValue <bool>();
            var useE         = Menu.Item("useE").GetValue <bool>();
            var useR         = Menu.Item("useR").GetValue <bool>();
            var minQRange    = Menu.Item("minQRange").GetValue <Slider>().Value;
            var useEStun     = Menu.Item("useEStun").GetValue <bool>();
            var useQGapclose = Menu.Item("useQGapclose").GetValue <bool>();
            var useWBeforeQ  = Menu.Item("useWBeforeQ").GetValue <bool>();
            var procSheen    = Menu.Item("procSheen").GetValue <bool>();
            var useIgnite    = Menu.Item("useIgnite").GetValue <bool>();
            var useRGapclose = Menu.Item("useRGapclose").GetValue <bool>();

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (target == null && useQGapclose)
            {
                var minionQ =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(x => x.IsValidTarget())
                    .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .FirstOrDefault(
                        x =>
                        x.Distance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) <
                        Q.Range);

                if (minionQ != null)
                {
                    Q.CastOnUnit(minionQ, Packets);
                    return;
                }

                if (useRGapclose)
                {
                    var minionR =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidTarget())
                        .Where(x => x.Distance(Player) < Q.Range)     // Use Q.Range so we follow up with a Q
                        .Where(x => x.CountEnemiesInRange(Q.Range) >= 1)
                        .FirstOrDefault(
                            x =>
                            x.Health - Player.GetSpellDamage(x, SpellSlot.R) <
                            Player.GetSpellDamage(x, SpellSlot.Q));

                    if (minionR != null)
                    {
                        R.Cast(minionR, Packets);
                    }
                }
            }

            if (!target.IsValidTarget())
            {
                return;
            }

            if (Botrk.IsReady())
            {
                Botrk.Cast(target);
            }

            if (Cutlass.IsReady())
            {
                Cutlass.Cast(target);
            }

            if (Omen.IsReady() && Omen.IsInRange(target) &&
                target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
            {
                Omen.Cast();
            }

            if (useIgnite && target != null && target.IsValidTarget(600) &&
                (IgniteSlot.IsReady() &&
                 Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health))
            {
                Player.Spellbook.CastSpell(IgniteSlot, target);
            }

            if (useWBeforeQ)
            {
                if (useW && W.IsReady())
                {
                    W.Cast(Packets);
                }

                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target, Packets);
                }
            }
            else
            {
                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target, Packets);
                }

                if (useW && W.IsReady())
                {
                    W.Cast(Packets);
                }
            }

            if (useEStun)
            {
                if (target.CanStunTarget() && useE && E.IsReady())
                {
                    E.Cast(target, Packets);
                }
            }
            else
            {
                if (useE && E.IsReady())
                {
                    E.Cast(target, Packets);
                }
            }

            if (useR && R.IsReady() && !UltActivated)
            {
                R.Cast(target, Packets);
            }

            // Get target that is in the R range
            var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (useR && UltActivated)
            {
                if (!procSheen)
                {
                    return;
                }

                // Fire Ult if player is out of AA range, with Q not up or not in range
                if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
                {
                    R.Cast(rTarget, Packets);
                }
                else
                {
                    if (!HasSheenBuff)
                    {
                        R.Cast(rTarget, Packets);
                    }
                }
            }
            else
            {
                R.Cast(rTarget, Packets);
            }
        }
Example #31
0
        public MilitiaFighter() : base(AIType.AI_Melee, FightMode.All | FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            InitStats(40, 30, 5);
            Title = "the Militia Fighter";

            SpeechHue = Utility.RandomDyedHue();

            Hue = Utility.RandomSkinHue();

            Female = false;
            Body   = 0x190;
            Name   = NameList.RandomName("male");

            Item hair = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A));

            hair.Hue     = Utility.RandomHairHue();
            hair.Layer   = Layer.Hair;
            hair.Movable = false;
            AddItem(hair);

            Item beard = new Item(Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D));

            beard.Hue     = hair.Hue;
            beard.Layer   = Layer.FacialHair;
            beard.Movable = false;
            AddItem(beard);

            AddItem(new ThighBoots(0x1BB));
            AddItem(new LeatherChest());
            AddItem(new LeatherArms());
            AddItem(new LeatherLegs());
            AddItem(new LeatherCap());
            AddItem(new LeatherGloves());
            AddItem(new LeatherGorget());

            Item weapon;

            switch (Utility.Random(6))
            {
            case 0: weapon = new Broadsword(); break;

            case 1: weapon = new Cutlass(); break;

            case 2: weapon = new Katana(); break;

            case 3: weapon = new Longsword(); break;

            case 4: weapon = new Scimitar(); break;

            default: weapon = new VikingSword(); break;
            }
            weapon.Movable = false;
            AddItem(weapon);

            Item shield = new BronzeShield();

            shield.Movable = false;
            AddItem(shield);

            SetSkill(SkillName.Swords, 20.0);
        }
Example #32
0
        /// <summary>
        /// Lets the game respond to player input. Unlike the Update method,
        /// this will only be called when the gameplay screen is active.
        /// </summary>
        public override void HandleInput(GameTime gameTime, Cutlass.GameComponents.Input input)
        {
            if (input == null)
                throw new ArgumentNullException("input");

            GamePadState gamePadState = input.CurrentGamePadState;

            // The game pauses either if the user presses the pause button, or if
            // they unplug the active gamepad. This requires us to keep track of
            // whether a gamepad was ever plugged in, because we don't want to pause
            // on PC if they are playing with a keyboard and have no gamepad at all!
            bool gamePadDisconnected = !gamePadState.IsConnected &&
                                       input.GamePadWasConnected;

            if (input.PauseGame || gamePadDisconnected)
            {
                ScreenManager.AddScreen(new PauseMenuScreen());
            }
            else
            {
                Player.HandleInput(gameTime, input, _Player.Position - _VisibleArea.Min);
            }
        }