示例#1
0
        public void ItemTarget(Item hench, Mobile from, RodOfResurrection rod)
        {
            if (hench is HenchmanFighterItem)
            {
                HenchmanFighterItem friend = (HenchmanFighterItem)hench;

                if (friend.HenchDead > 0)
                {
                    friend.Name      = "fighter henchman";
                    friend.HenchDead = 0;
                    friend.InvalidateProperties();
                    from.PlaySound(0x214);
                    ConsumeCharge(rod, from);
                }
                else
                {
                    from.SendMessage("They are not dead.");
                }
            }
            else if (hench is HenchmanWizardItem)
            {
                HenchmanWizardItem friend = (HenchmanWizardItem)hench;

                if (friend.HenchDead > 0)
                {
                    friend.Name      = "wizard henchman";
                    friend.HenchDead = 0;
                    friend.InvalidateProperties();
                    from.PlaySound(0x214);
                    ConsumeCharge(rod, from);
                }
                else
                {
                    from.SendMessage("They are not dead.");
                }
            }
            else if (hench is HenchmanArcherItem)
            {
                HenchmanArcherItem friend = (HenchmanArcherItem)hench;

                if (friend.HenchDead > 0)
                {
                    friend.Name      = "archer henchman";
                    friend.HenchDead = 0;
                    friend.InvalidateProperties();
                    from.PlaySound(0x214);
                    ConsumeCharge(rod, from);
                }
                else
                {
                    from.SendMessage("They are not dead.");
                }
            }
            else if (hench is HenchmanMonsterItem)
            {
                HenchmanMonsterItem friend = (HenchmanMonsterItem)hench;

                if (friend.HenchDead > 0)
                {
                    friend.Name      = "creature henchman";
                    friend.HenchDead = 0;
                    friend.InvalidateProperties();
                    from.PlaySound(0x214);
                    ConsumeCharge(rod, from);
                }
                else
                {
                    from.SendMessage("They are not dead.");
                }
            }
            else
            {
                from.SendMessage("This spell didn't seem to work.");
            }
        }
示例#2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Bandage.Deleted)
                {
                    return;
                }

                if (targeted is Mobile)
                {
                    if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range))
                    {
                        if (BandageContext.BeginHeal(from, (Mobile)targeted) != null)
                        {
                            m_Bandage.Consume();
                            Server.Gumps.QuickBar.RefreshQuickBar(from);
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(500295);                           // You are too far away to do that.
                    }
                }
                else if (targeted is HenchmanFighterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80)
                {
                    HenchmanFighterItem friend = (HenchmanFighterItem)targeted;

                    if (friend.HenchDead > 0)
                    {
                        friend.Name      = "fighter henchman";
                        friend.HenchDead = 0;
                        friend.InvalidateProperties();
                        m_Bandage.Consume();
                    }
                    else
                    {
                        from.SendMessage("They are not dead.");
                    }
                }
                else if (targeted is HenchmanWizardItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80)
                {
                    HenchmanWizardItem friend = (HenchmanWizardItem)targeted;

                    if (friend.HenchDead > 0)
                    {
                        friend.Name      = "wizard henchman";
                        friend.HenchDead = 0;
                        friend.InvalidateProperties();
                        m_Bandage.Consume();
                    }
                    else
                    {
                        from.SendMessage("They are not dead.");
                    }
                }
                else if (targeted is HenchmanArcherItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80)
                {
                    HenchmanArcherItem friend = (HenchmanArcherItem)targeted;

                    if (friend.HenchDead > 0)
                    {
                        friend.Name      = "archer henchman";
                        friend.HenchDead = 0;
                        friend.InvalidateProperties();
                        m_Bandage.Consume();
                    }
                    else
                    {
                        from.SendMessage("They are not dead.");
                    }
                }
                else if (targeted is HenchmanMonsterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80)
                {
                    HenchmanMonsterItem friend = (HenchmanMonsterItem)targeted;

                    if (friend.HenchDead > 0)
                    {
                        friend.Name      = "creature henchman";
                        friend.HenchDead = 0;
                        friend.InvalidateProperties();
                        m_Bandage.Consume();
                    }
                    else
                    {
                        from.SendMessage("They are not dead.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500970);                       // Bandages can not be used on that.
                }
            }
示例#3
0
        public void BuildPrisoner()
        {
            int monster = Utility.RandomMinMax(1, 47);

            switch (Utility.RandomMinMax(0, 9))
            {
            case 0: monster = Utility.RandomMinMax(1, 12); break;

            case 1: monster = Utility.RandomMinMax(13, 22); break;

            case 2: monster = Utility.RandomMinMax(23, 30); break;

            case 3: monster = Utility.RandomMinMax(31, 34); break;

            case 4: monster = Utility.RandomMinMax(35, 41); break;

            case 5: monster = Utility.RandomMinMax(42, 47); break;

            case 6: monster = 48; break;

            case 7: monster = 49; break;

            case 8: monster = 50; break;
            }

            switch (monster)
            {
            case 1: PrisonerTitle = "the bugbear"; PrisonerName = NameList.RandomName("giant"); PrisonerBody = 343; PrisonerSound = 427; PrisonerType = 1; break;

            case 2: PrisonerTitle = "the morlock"; PrisonerName = NameList.RandomName("savage"); PrisonerBody = 332; PrisonerSound = 427; PrisonerType = 1; break;

            case 3: PrisonerTitle = "the mind flayer"; PrisonerName = NameList.RandomName("vampire"); PrisonerBody = 768; PrisonerSound = 898; PrisonerType = 3; break;

            case 4: PrisonerTitle = "the hobgoblin"; PrisonerName = NameList.RandomName("giant"); PrisonerBody = 11; PrisonerSound = 1114; PrisonerType = 1; break;

            case 5: PrisonerTitle = "the goblin"; PrisonerName = NameList.RandomName("goblin"); PrisonerBody = 647; PrisonerSound = 0x543; PrisonerType = 2; break;

            case 6: PrisonerTitle = "the goblin"; PrisonerName = NameList.RandomName("goblin"); PrisonerBody = 632; PrisonerSound = 0x543; PrisonerType = 1; break;

            case 7: PrisonerTitle = "the gnoll"; PrisonerName = NameList.RandomName("urk"); PrisonerBody = 510; PrisonerSound = 1114; PrisonerType = 1; break;

            case 8: PrisonerTitle = "the satyr"; PrisonerName = NameList.RandomName("elf_male"); PrisonerBody = 271; PrisonerSound = 1414; PrisonerType = 1; break;

            case 9: PrisonerTitle = "the centaur"; PrisonerName = NameList.RandomName("centaur"); PrisonerBody = 101; PrisonerSound = 679; PrisonerType = 2; break;

            case 10: PrisonerTitle = "the pixie"; PrisonerName = NameList.RandomName("pixie"); PrisonerBody = 128; PrisonerSound = 1127; PrisonerType = 3; break;

            case 11: PrisonerTitle = "the minotaur"; PrisonerName = NameList.RandomName("greek"); PrisonerBody = 78; PrisonerSound = 1358; PrisonerType = 1; break;

            case 12: PrisonerTitle = "the minotaur"; PrisonerName = NameList.RandomName("greek"); PrisonerBody = 650; PrisonerSound = 1358; PrisonerType = 1; break;

            case 13: PrisonerTitle = "the sleestax"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 541; PrisonerSound = 417; PrisonerType = 1; break;

            case 14: PrisonerTitle = "the sakkhra"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 326; PrisonerSound = 417; PrisonerType = 3; break;

            case 15: PrisonerTitle = "the sakkhra"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 333; PrisonerSound = 417; PrisonerType = 1; break;

            case 16: PrisonerTitle = "the sakkhra"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 324; PrisonerSound = 417; PrisonerType = 1; break;

            case 17: PrisonerTitle = "the lizardman"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 33; PrisonerSound = 417; PrisonerType = 1; break;

            case 18: PrisonerTitle = "the lizardman"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 35; PrisonerSound = 417; PrisonerType = 1; break;

            case 19: PrisonerTitle = "the lizardman"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 36; PrisonerSound = 417; PrisonerType = 1; break;

            case 20: PrisonerTitle = "the kobold"; PrisonerName = NameList.RandomName("goblin"); PrisonerBody = 253; PrisonerSound = 0x543; PrisonerType = 3; break;

            case 21: PrisonerTitle = "the kobold"; PrisonerName = NameList.RandomName("goblin"); PrisonerBody = 245; PrisonerSound = 0x543; PrisonerType = 1; break;

            case 22: PrisonerTitle = "the grathek"; PrisonerName = NameList.RandomName("lizardman"); PrisonerBody = 534; PrisonerSound = 417; PrisonerType = 1; break;

            case 23: PrisonerTitle = "the orx"; PrisonerName = NameList.RandomName("ork"); PrisonerBody = 107; PrisonerSound = 1114; PrisonerType = 1; break;

            case 24: PrisonerTitle = "the orx"; PrisonerName = NameList.RandomName("ork"); PrisonerBody = 108; PrisonerSound = 1114; PrisonerType = 1; break;

            case 25: PrisonerTitle = "the orc"; PrisonerName = NameList.RandomName("orc"); PrisonerBody = 17; PrisonerSound = 1114; PrisonerType = 3; break;

            case 26: PrisonerTitle = "the orc"; PrisonerName = NameList.RandomName("orc"); PrisonerBody = 7; PrisonerSound = 1114; PrisonerType = 1; break;

            case 27: PrisonerTitle = "the orc"; PrisonerName = NameList.RandomName("orc"); PrisonerBody = 182; PrisonerSound = 1114; PrisonerType = 1; break;

            case 28: PrisonerTitle = "the urc"; PrisonerName = NameList.RandomName("urk"); PrisonerBody = 20; PrisonerSound = 1114; PrisonerType = 1; break;

            case 29: PrisonerTitle = "the urc"; PrisonerName = NameList.RandomName("urk"); PrisonerBody = 252; PrisonerSound = 1114; PrisonerType = 2; break;

            case 30: PrisonerTitle = "the urc"; PrisonerName = NameList.RandomName("urk"); PrisonerBody = 157; PrisonerSound = 1114; PrisonerType = 3; break;

            case 31: PrisonerTitle = "the tritun"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 690; PrisonerSound = 1363; PrisonerType = 1; break;

            case 32: PrisonerTitle = "the tritun"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 678; PrisonerSound = 1363; PrisonerType = 3; break;

            case 33: PrisonerTitle = "the neptar"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 677; PrisonerSound = 1363; PrisonerType = 3; break;

            case 34: PrisonerTitle = "the neptar"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 676; PrisonerSound = 1363; PrisonerType = 1; break;

            case 35: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 42; PrisonerSound = 437; PrisonerType = 2; break;

            case 36: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 44; PrisonerSound = 437; PrisonerType = 1; break;

            case 37: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 45; PrisonerSound = 437; PrisonerType = 1; break;

            case 38: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 163; PrisonerSound = 437; PrisonerType = 1; break;

            case 39: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 164; PrisonerSound = 437; PrisonerType = 1; break;

            case 40: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 165; PrisonerSound = 437; PrisonerType = 1; break;

            case 41: PrisonerTitle = "the ratman"; PrisonerName = NameList.RandomName("ratman"); PrisonerBody = 73; PrisonerSound = 437; PrisonerType = 3; break;

            case 42: PrisonerTitle = "the serpyn"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 143; PrisonerSound = 634; PrisonerType = 1; break;

            case 43: PrisonerTitle = "the serpyn"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 145; PrisonerSound = 634; PrisonerType = 1; break;

            case 44: PrisonerTitle = "the serpyn"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 144; PrisonerSound = 644; PrisonerType = 3; break;

            case 45: PrisonerTitle = "the ophidian"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 85; PrisonerSound = 639; PrisonerType = 3; break;

            case 46: PrisonerTitle = "the ophidian"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 86; PrisonerSound = 634; PrisonerType = 1; break;

            case 47: PrisonerTitle = "the ophidian"; PrisonerName = NameList.RandomName("drakkul"); PrisonerBody = 87; PrisonerSound = 644; PrisonerType = 3; break;

            case 48:
                HenchmanItem fighter = new HenchmanFighterItem();
                PrisonerName  = fighter.HenchName;
                PrisonerTitle = fighter.HenchTitle;
                PrisonerBody  = fighter.HenchBody;
                PrisonerSound = 0;
                PrisonerType  = 97;
                fighter.Delete();
                break;

            case 49:
                HenchmanItem archer = new HenchmanArcherItem();
                PrisonerName  = archer.HenchName;
                PrisonerTitle = archer.HenchTitle;
                PrisonerBody  = archer.HenchBody;
                PrisonerSound = 0;
                PrisonerType  = 98;
                archer.Delete();
                break;

            case 50:
                HenchmanItem wizard = new HenchmanWizardItem();
                PrisonerName  = wizard.HenchName;
                PrisonerTitle = wizard.HenchTitle;
                PrisonerBody  = wizard.HenchBody;
                PrisonerSound = 0;
                PrisonerType  = 97;
                wizard.Delete();
                break;
            }

            int reward = Utility.RandomMinMax(10, 20);
            int join   = Utility.RandomMinMax(50, 100);

            if (PrisonerType == 1)
            {
                PrisonerTitle = PrisonerTitle + " " + GetMeleeTitle(); PrisonerReward = (reward * 100); PrisonerJoin = (join * 100);
            }
            else if (PrisonerType == 2)
            {
                PrisonerTitle = PrisonerTitle + " " + GetArcherTitle(); PrisonerReward = (reward * 125); PrisonerJoin = (join * 125);
            }
            else if (PrisonerType == 3)
            {
                PrisonerTitle = PrisonerTitle + " " + GetMageTitle(); PrisonerReward = (reward * 150); PrisonerJoin = (join * 150);
            }
            else if (PrisonerType == 97)
            {
                PrisonerReward = (reward * 150); PrisonerJoin = (4000 + (10 * Utility.RandomMinMax(10, 100)));
            }
            else if (PrisonerType == 98)
            {
                PrisonerReward = (reward * 150); PrisonerJoin = (5000 + (10 * Utility.RandomMinMax(10, 100)));
            }
            else if (PrisonerType == 99)
            {
                PrisonerReward = (reward * 150); PrisonerJoin = (6000 + (10 * Utility.RandomMinMax(10, 100)));
            }
        }
示例#4
0
        public static void ResurrectHenchman(Mobile from)
        {
            if (from is PlayerMobile && from.Alive)
            {
                bool giveMessage = false;
                foreach (Item i in from.Backpack.Items)
                {
                    if (i is HenchmanFighterItem)
                    {
                        HenchmanFighterItem friend = (HenchmanFighterItem)i;
                        if (friend.HenchDead > 0)
                        {
                            friend.Name      = "fighter henchman";
                            friend.HenchDead = 0;
                            friend.InvalidateProperties();
                            giveMessage = true;
                        }
                    }
                    else if (i is HenchmanWizardItem)
                    {
                        HenchmanWizardItem friend = (HenchmanWizardItem)i;
                        if (friend.HenchDead > 0)
                        {
                            friend.Name      = "wizard henchman";
                            friend.HenchDead = 0;
                            friend.InvalidateProperties();
                            giveMessage = true;
                        }
                    }
                    else if (i is HenchmanArcherItem)
                    {
                        HenchmanArcherItem friend = (HenchmanArcherItem)i;
                        if (friend.HenchDead > 0)
                        {
                            friend.Name      = "archer henchman";
                            friend.HenchDead = 0;
                            friend.InvalidateProperties();
                            giveMessage = true;
                        }
                    }
                    else if (i is HenchmanMonsterItem)
                    {
                        HenchmanMonsterItem friend = (HenchmanMonsterItem)i;
                        if (friend.HenchDead > 0)
                        {
                            friend.Name      = "creature henchman";
                            friend.HenchDead = 0;
                            friend.InvalidateProperties();
                            giveMessage = true;
                        }
                    }
                }

                if (giveMessage)
                {
                    from.SendMessage("Your henchmen have been resurrected.");
                    from.PlaySound(0x214);
                    from.FixedEffect(0x376A, 10, 16);
                }
            }
        }
示例#5
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                Mobile from = sender.Mobile;

                if (info.ButtonID == 1)
                {
                    from.AddToBackpack(new Gold(m_Jail.PrisonerReward));
                    from.SendSound(0x0EF);
                    from.SendMessage("You free " + m_Jail.PrisonerName + " from their prison.");
                    LoggingFunctions.LogStandard(from, "has freed " + m_Jail.PrisonerName + " " + m_Jail.PrisonerTitle + ".");

                    Titles.AwardFame(from, ((int)((m_Jail.PrisonerReward) / 100)), true);
                    if (((PlayerMobile)from).KarmaLocked == true)
                    {
                        Titles.AwardKarma(from, -((int)((m_Jail.PrisonerReward) / 100)), true);
                    }
                    else
                    {
                        Titles.AwardKarma(from, ((int)((m_Jail.PrisonerReward) / 100)), true);
                    }

                    m_Jail.Delete();
                }
                else if (info.ButtonID == 2)
                {
                    int  gold    = from.TotalGold;
                    int  join    = m_Jail.PrisonerJoin;
                    bool begging = false;

                    if (Server.Mobiles.BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING
                    {
                        int cut = (int)(from.Skills[SkillName.Begging].Value * 25);
                        if (cut > 3000)
                        {
                            cut = 3000;
                        }
                        join    = join - cut;
                        begging = true;
                    }

                    if (gold >= join)
                    {
                        Container cont = from.Backpack;
                        cont.ConsumeTotal(typeof(Gold), join);
                        from.SendSound(0x0EF);

                        if (begging)
                        {
                            from.SendMessage("You beg " + m_Jail.PrisonerName + " to join you as a henchman for only " + join + " gold.");
                        }
                        else
                        {
                            from.SendMessage("" + m_Jail.PrisonerName + " has joined you as a henchman.");
                        }

                        if (m_Jail.PrisonerType == 97)
                        {
                            HenchmanFighterItem fighter = new HenchmanFighterItem();
                            fighter.HenchName  = m_Jail.PrisonerName;
                            fighter.HenchTitle = m_Jail.PrisonerTitle;
                            fighter.HenchBody  = m_Jail.PrisonerBody;
                            from.AddToBackpack(fighter);
                        }
                        else if (m_Jail.PrisonerType == 98)
                        {
                            HenchmanArcherItem archer = new HenchmanArcherItem();
                            archer.HenchName  = m_Jail.PrisonerName;
                            archer.HenchTitle = m_Jail.PrisonerTitle;
                            archer.HenchBody  = m_Jail.PrisonerBody;
                            from.AddToBackpack(archer);
                        }
                        else if (m_Jail.PrisonerType == 99)
                        {
                            HenchmanWizardItem wizard = new HenchmanWizardItem();
                            wizard.HenchName  = m_Jail.PrisonerName;
                            wizard.HenchTitle = m_Jail.PrisonerTitle;
                            wizard.HenchBody  = m_Jail.PrisonerBody;
                            from.AddToBackpack(wizard);
                        }
                        else
                        {
                            HenchmanMonsterItem item = new HenchmanMonsterItem();

                            item.HenchTimer      = 300;
                            item.HenchWeaponID   = m_Jail.PrisonerType;
                            item.HenchShieldID   = m_Jail.PrisonerSound;
                            item.HenchHelmID     = 0;
                            item.HenchArmorType  = 0;
                            item.HenchWeaponType = 0;
                            item.HenchCloakColor = 0;
                            item.HenchCloak      = 0;
                            item.HenchRobe       = 0;
                            item.HenchHatColor   = 0;
                            item.HenchGloves     = 0;
                            item.HenchSpeech     = Utility.RandomDyedHue();
                            item.HenchDead       = 0;
                            item.HenchBody       = m_Jail.PrisonerBody;
                            item.HenchHue        = 0;
                            item.HenchHair       = 0;
                            item.HenchHairHue    = 0;
                            item.HenchGearColor  = 0;
                            item.HenchName       = m_Jail.PrisonerName;
                            item.HenchTitle      = m_Jail.PrisonerTitle;
                            item.HenchBandages   = 0;
                            from.AddToBackpack(item);
                        }

                        m_Jail.Delete();
                    }
                    else
                    {
                        from.SendMessage("You do not have enough gold to convince them to join you.");
                    }
                }
                else if (info.ButtonID == 3)
                {
                    switch (Utility.RandomMinMax(0, 4))
                    {
                    case 0: from.Say("I will leave you to your fate, " + m_Jail.PrisonerName + "!"); break;

                    case 1: from.Say("" + m_Jail.PrisonerName + ", stay here and rot!"); break;

                    case 2: from.Say("" + m_Jail.PrisonerName + ", the world is better with you in here!"); break;

                    case 3: from.Say("You are not the sort I wish to free, " + m_Jail.PrisonerName + "."); break;

                    case 4: from.Say("You must be here for a reason, " + m_Jail.PrisonerName + "."); break;
                    }
                }
            }