示例#1
0
        //---------------------------------------------------------------------------------------------

        public static CastResultInfo CastBishopGreaterHeal(bool useScrool, Serial target, bool silence)
        {
            CastResultInfo info    = new CastResultInfo();
            UOItem         scrools = World.Player.Backpack.AllItems.FindType(Magery.SpellScrool[StandardSpell.GreaterHeal]);

            info.Spell = StandardSpell.GreaterHeal;

            if (useScrool && scrools.Exist)
            {
                Journal.Clear();
                scrools.Use();
                if (Journal.WaitForText(true, 250, "You activated KVM", "You can't cast this spell yet"))
                {
                    if (!Journal.Contains(true, "You activated KVM"))
                    {
                        UOCharacter ch  = new UOCharacter(target);
                        double      dmg = ch.MaxHits - ch.Hits;

                        if (ch.ExistCust() && dmg < 25)
                        {
                            info.Spell = StandardSpell.Heal;
                        }
                    }
                }
            }

            info = Magery.Current.CastSpell(info.Spell, target, false, false, silence, false);
            return(info);
        }
示例#2
0
        public static void UseKPZ(StandardSpell spell, string target)
        {
            UOItem kpz = World.Player.Backpack.AllItems.FindType(0x09B0, 0x0493);

            if (!kpz.Exist)
            {
                kpz = World.Player.Backpack.AllItems.FindType(0x09B0, 0x0494);
            }
            else
            {
                kpz.Use();
                Game.Wait(150);
            }

            if (kpz.Exist)
            {
                if (spell == StandardSpell.Heal || spell == StandardSpell.GreaterHeal)
                {
                    World.Player.PrintMessage("[KPZ << k sobe ]", Game.Val_LightGreen);
                }
                else if (spell == StandardSpell.Protection)
                {
                    World.Player.PrintMessage("[KPZ >> k nemu]", Game.Val_LightGreen);
                }
                else if (spell == StandardSpell.ReactiveArmor)
                {
                    World.Player.PrintMessage("[KPZ <> vymena]", Game.Val_LightGreen);
                }
                else
                {
                    Game.PrintMessage("KPZ invalid spell!", MessageType.Error);
                    return;
                }

                TargetInfo info = Targeting.GetTarget(target);
                if (info.Success && info.TargetType == TargetType.Object && info.Character.Exist)
                {
                    info.Object.PrintMessage("[> KPZ <]", Game.Val_LightGreen);
                    CastResultInfo castInfo = Magery.Current.CastSpell(spell, info, false, false);
                    if (castInfo.Success)
                    {
                        Healing.LastCharacter = info.Character;
                        Game.Wait(250);
                        info.Character.RequestStatus(250);
                    }
                }
            }
            else
            {
                Game.PrintMessage("Nemas u sebe KPZ");
            }
        }