public override void OnSpeech(SpeechEventArgs e)
 {
     if (!e.Handled && Insensitive.Equals(e.Speech, "report"))
     {
         HenchmanFunctions.ReportStatus(this);
     }
     base.OnSpeech(e);
 }
        public override bool OnBeforeDeath()
        {
            HenchmanFunctions.OnDead(this);
            if (!base.OnBeforeDeath())
            {
                return(false);
            }

            return(true);
        }
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            bool GoAway = HenchmanFunctions.OnMoving(m, oldLocation, this, m_NextMorale);

            if (GoAway == true)
            {
                Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(Delete));
            }
            else
            {
                m_NextMorale = (DateTime.Now + TimeSpan.FromSeconds(60));
            }
        }
示例#4
0
        public static void AddCustomers(Mobile from, BaseShoppe shoppe, int customer)
        {
            string client = shoppe.Customer01;

            if (customer == 1)
            {
                client = shoppe.Customer01;
            }
            else if (customer == 2)
            {
                client = shoppe.Customer02;
            }
            else if (customer == 3)
            {
                client = shoppe.Customer03;
            }
            else if (customer == 4)
            {
                client = shoppe.Customer04;
            }
            else if (customer == 5)
            {
                client = shoppe.Customer05;
            }
            else if (customer == 6)
            {
                client = shoppe.Customer06;
            }
            else if (customer == 7)
            {
                client = shoppe.Customer07;
            }
            else if (customer == 8)
            {
                client = shoppe.Customer08;
            }
            else if (customer == 9)
            {
                client = shoppe.Customer09;
            }
            else if (customer == 10)
            {
                client = shoppe.Customer10;
            }
            else if (customer == 11)
            {
                client = shoppe.Customer11;
            }
            else if (customer == 12)
            {
                client = shoppe.Customer12;
            }

            int exist = Convert.ToInt32(GetDataElement(client, 3));

            if (from != null && exist == 0)
            {
                int repMax = (int)(GetReputation(from, shoppe) / 10);
                int repMin = (int)(repMax / 5);
                if (repMin < 10)
                {
                    repMin = 10;
                }
                if (repMin >= repMax)
                {
                    repMax = repMin + 10;
                }

                int gold = Utility.RandomMinMax(repMin, repMax);

                int fame = Utility.RandomMinMax(((int)(gold / 20)), ((int)(gold / 20) + Utility.RandomMinMax(0, 3)));
                if (fame < 5)
                {
                    fame = 5;
                }
                else if (fame > 50)
                {
                    fame = 50;
                }

                int skill = Utility.RandomMinMax(((int)((gold / 125) + 35)), ((int)((gold / 125) + 35) + Utility.RandomMinMax(0, 5)));
                if (skill < 30)
                {
                    skill = 30;
                }
                else if (skill > 120)
                {
                    skill = 120;
                }

                int tools = Utility.RandomMinMax(((int)(gold / 100)), ((int)(gold / 100) + Utility.RandomMinMax(0, 2)));
                if (tools < 1)
                {
                    tools = 1;
                }
                else if (tools > 10)
                {
                    tools = 10;
                }

                int resource = Utility.RandomMinMax(((int)(gold / 20)), ((int)(gold / 20) + Utility.RandomMinMax(0, 5)));
                if (resource < 5)
                {
                    resource = 5;
                }

                string customerName = NameList.RandomName("male");
                if (Utility.RandomBool())
                {
                    customerName = NameList.RandomName("female");
                }

                string customerTitle = HenchmanFunctions.GetTitle();

                string customerTask = Server.Items.BaseShoppe.MakeTask(shoppe);

                string finalCustomer = customerTask + "#" + customerName + " " + customerTitle + "#";
                finalCustomer = finalCustomer + "1" + "#" + gold + "#" + tools + "#" + resource + "#" + skill + "#" + fame + "";

                if (customer == 1)
                {
                    shoppe.Customer01 = finalCustomer;
                }
                else if (customer == 2)
                {
                    shoppe.Customer02 = finalCustomer;
                }
                else if (customer == 3)
                {
                    shoppe.Customer03 = finalCustomer;
                }
                else if (customer == 4)
                {
                    shoppe.Customer04 = finalCustomer;
                }
                else if (customer == 5)
                {
                    shoppe.Customer05 = finalCustomer;
                }
                else if (customer == 6)
                {
                    shoppe.Customer06 = finalCustomer;
                }
                else if (customer == 7)
                {
                    shoppe.Customer07 = finalCustomer;
                }
                else if (customer == 8)
                {
                    shoppe.Customer08 = finalCustomer;
                }
                else if (customer == 9)
                {
                    shoppe.Customer09 = finalCustomer;
                }
                else if (customer == 10)
                {
                    shoppe.Customer10 = finalCustomer;
                }
                else if (customer == 11)
                {
                    shoppe.Customer11 = finalCustomer;
                }
                else if (customer == 12)
                {
                    shoppe.Customer12 = finalCustomer;
                }
            }
        }
        public static string MakeThisTask()
        {
            string task = null;

            if (Utility.RandomMinMax(1, 4) == 1)
            {
                string bodyName = NameList.RandomName("male");
                if (Utility.RandomBool())
                {
                    bodyName = NameList.RandomName("female");
                }

                string bodyTitle = HenchmanFunctions.GetTitle();

                switch (Utility.RandomMinMax(1, 3))
                {
                case 1: task = "corpse"; break;

                case 2: task = "remains"; break;

                case 3: task = "body"; break;
                }

                switch (Utility.RandomMinMax(1, 5))
                {
                case 1: task = "Do an autopsy on the " + task; break;

                case 2: task = "Do an examination of the " + task; break;

                case 3: task = "Look over the " + task; break;

                case 4: task = "Do a postmortem on the " + task; break;

                case 5: task = "Do a necropsy on the " + task; break;
                }

                task = task + " of " + bodyName + " " + bodyTitle;

                switch (Utility.RandomMinMax(1, 5))
                {
                case 1: task = task + " to determine the cause of death"; break;

                case 2: task = task + " to find the cause of death"; break;

                case 3: task = task + " to identify the murderer"; break;

                case 4: task = task + " to solve who the killer is"; break;

                case 5: task = task + " to see how they died"; break;
                }
            }
            else
            {
                switch (Utility.RandomMinMax(1, 4))
                {
                case 1: task = "Brew"; break;

                case 2: task = "Create"; break;

                case 3: task = "Concoct"; break;

                case 4: task = "Boil"; break;
                }

                switch (Utility.RandomMinMax(1, 5))
                {
                case 1: task = task + " an elixir"; break;

                case 2: task = task + " a potion"; break;

                case 3: task = task + " a draught"; break;

                case 4: task = task + " a mixture"; break;

                case 5: task = task + " a philter"; break;
                }

                switch (Utility.RandomMinMax(1, 4))
                {
                case 1: task = task + " with "; break;

                case 2: task = task + " using "; break;

                case 3: task = task + " mixing "; break;

                case 4: task = task + " combining "; break;
                }

                string[] sWeirds = new string[] { "ant", "ape", "baboon", "badger", "basilisk", "bear", "beaver", "beetle", "beholder", "boar", "brownie", "buffalo", "bull", "camel", "centaur", "centipede", "chimera", "cockatrice", "crocodile", "deer", "demon", "devil", "dinosaur", "djinni", "dog", "dragon", "dryad", "dwarf", "eagle", "efreet", "elemental", "elephant", "elf", "ettin", "frog", "fungi", "gargoyle", "ghast", "ghost", "ghoul", "giant", "gnoll", "gnome", "goat", "goblin", "golem", "gorgon", "griffon", "hag", "halfling", "harpy", "hell hound", "hippogriff", "hippopotamus", "hobgoblin", "horse", "hydra", "hyena", "imp", "jackal", "jaguar", "ki-rin", "kobold", "leopard", "leprechaun", "lich", "lion", "lizard", "lizardman", "lycanthrope", "lynx", "mammoth", "manticore", "mastodon", "medusa", "minotaur", "mule", "mummy", "naga", "nightmare", "ogre", "orc", "owl", "pegasus", "pixie", "porcupine", "ram", "rat", "reaper", "rhinoceros", "roc", "satyr", "scorpion", "serpent", "shadow", "skeleton", "skunk", "snake", "spectre", "sphinx", "spider", "sprite", "stag", "tiger", "titan", "toad", "troglodyte", "troll", "unicorn", "vampire", "weasel", "wight", "wisp", "wolf", "wolverine", "worm", "wraith", "wyvern", "yeti", "zombie", "zorn" };
                string   sWeird  = sWeirds[Utility.RandomMinMax(0, (sWeirds.Length - 1))];

                string[] sFluids = new string[] { "blood ", "eyes ", "skin ", "spit ", "bile ", "secretion ", "ooze ", "pus ", "droppings ", "urine ", "slime ", "salt " };
                string   sFluid  = sFluids[Utility.RandomMinMax(0, (sFluids.Length - 1))];

                string[] sTypes = new string[] { "abysmal essence ", "angelic feathers ", "animal tongues ", "ape ears ", "bat ears ", "bear hairs ", "bird beaks ", "bone powder ", "bony horns ", "cat whiskers ", "centaur fingers ", "cow eyes ", "crab meat ", "crushed gems ", "crushed stone ", "crystal shards ", "cursed leaves ", "darkness ", "dead skin ", "demonic hellfire ", "dog hairs ", "dolphin teeth ", "dragon smoke ", "dried blood ", "dryad tears ", "electricity ", "elemental powder ", "elven blood ", "enchanted frost ", "enchanted sap ", "entrails ", "fish scales ", "frog tongues ", "gargoyle horns ", "gazing eyes ", "ghostly mist ", "giant blood ", "entrails ", "gore ", "hellish smoke ", "horrid breath ", "human blood ", "hydra urine ", "illithid brains ", "imp tails ", "ink ", "insect ichor ", "ivory pieces ", "jade chunks ", "large teeth ", "leech spit ", "liquid fire ", "magical ashes ", "magical dust ", "minotaur hooves ", "mummy wraps ", "mystical air ", "mystical dirt ", "mystical mud ", "ogre thumbs ", "oil ", "oni fur ", "orcish bile ", "ostard scales ", "pig snouts ", "pixie sparkles ", "poisonous gas ", "quills ", "rat tails ", "reptile scales ", "scaly fingers ", "scorpion stingers ", "sea water ", "silver shavings ", "slime ", "sphinx fur ", "spider legs ", "sprite teeth ", "succubus pheromones ", "swamp gas ", "troll claws ", "unicorn teeth ", "vampire fangs ", "wax shavings ", "wisp light ", "wood splinters ", "worm guts ", "wyrm spit ", "wyvern poison ", "yeti claws " };
                string   sType  = sTypes[Utility.RandomMinMax(0, (sTypes.Length - 1))];

                switch (Utility.RandomMinMax(0, 3))
                {
                case 0: task = task + sWeird + " " + sFluid + "and " + sType + "into a vial of "; break;

                case 1: task = task + sWeird + " " + sFluid + "and " + sType + "into a bottle of "; break;

                case 2: task = task + sWeird + " " + sFluid + "and " + sType + "into a flask of "; break;

                case 3: task = task + sWeird + " " + sFluid + "and " + sType + "into a jar of "; break;
                }

                string[] sMixs = new string[] { "Acidic", "Summoning", "Scrying", "Obscure", "Iron", "Ghoulish", "Enfeebling", "Altered", "Secret", "Obscuring", "Irresistible", "Gibbering", "Enlarged", "Confusing", "Analyzing", "Sympathetic", "Secure", "Permanent", "Keen", "Glittering", "Ethereal", "Contacting", "Animal", "Telekinetic", "Seeming", "Persistent", "Lawful", "Evil", "Continual", "Animated", "Telepathic", "Shadow", "Phantasmal", "Legendary", "Good", "Expeditious", "Control", "Antimagic", "Teleporting", "Shattering", "Phantom", "Lesser", "Grasping", "Explosive", "Crushing", "Arcane", "Temporal", "Shocking", "Phasing", "Levitating", "Greater", "Fabricated", "Cursed", "Articulated", "Tiny", "Shouting", "Planar", "Limited", "Guarding", "Faithful", "Dancing", "Binding", "Transmuting", "Shrinking", "Poisonous", "Lucubrating", "Fearful", "Dazzling", "Black", "Undead", "Silent", "Polymorphing", "Magical", "Hallucinatory", "Delayed", "Blinding", "Undetectable", "Slow", "Prismatic", "Magnificent", "Hideous", "Fire", "Demanding", "Blinking", "Unseen", "Solid", "Programmed", "Major", "Holding", "Flaming", "Dimensional", "Vampiric", "Soul", "Projected", "Mass", "Horrid", "Discern", "Burning", "Vanishing", "Spectral", "Mending", "Hypnotic", "Floating", "Disintegrating", "Cat", "Protective", "Mind", "Ice", "Flying", "Disruptive", "Chain", "Spidery", "Prying", "Minor", "Illusionary", "Force", "Dominating", "Changing", "Warding", "Stinking", "Pyrotechnic", "Mirrored", "Improved", "Forceful", "Dreaming", "Chaotic", "Water", "Stone", "Rainbow", "Misdirected", "Incendiary", "Freezing", "Elemental", "Charming", "Watery", "Misleading", "Instant", "Gaseous", "Emotional", "Chilling", "Weird", "Storming", "Resilient", "Mnemonic", "Interposing", "Gentle", "Enduring", "Whispering", "Suggestive", "Reverse", "Moving", "Invisible", "Ghostly", "Energy", "Clenched", "Climbing", "Comprehending", "Colorful", "True", "False" };
                string   sMix  = sMixs[Utility.RandomMinMax(0, (sMixs.Length - 1))];

                string[] sEffects = new string[] { "Acid", "Tentacles", "Sigil", "Plane", "Legend", "Gravity", "Emotion", "Chest", "Alarm", "Terrain", "Simulacrum", "Poison", "Lightning", "Grease", "Endurance", "Circle", "Anchor", "Thoughts", "Skin", "Polymorph", "Lights", "Growth", "Enervation", "Clairvoyance", "Animal", "Time", "Sleep", "Prestidigitation", "Location", "Guards", "Enfeeblement", "Clone", "Antipathy", "Tongues", "Soul", "Projection", "Lock", "Hand", "Enhancer", "Cloud", "Arcana", "Touch", "Sound", "Pyrotechnics", "Lore", "Haste", "Etherealness", "Cold", "Armor", "Transformation", "Spells", "Refuge", "Lucubration", "Hat", "Evil", "Color", "Arrows", "Trap", "Sphere", "Repulsion", "Magic", "Hound", "Evocation", "Confusion", "Aura", "Trick", "Spider", "Resistance", "Mansion", "Hypnotism", "Eye", "Conjuration", "Banishment", "Turning", "Spray", "Retreat", "Mask", "Ice", "Fall", "Contagion", "Banshee", "Undead", "Stasis", "Rope", "Maze", "Image", "Fear", "Creation", "Bear", "Vanish", "Statue", "Runes", "Message", "Imprisonment", "Feather", "Curse", "Binding", "Veil", "Steed", "Scare", "Meteor", "Insanity", "Field", "Dance", "Vision", "Stone", "Screen", "Mind", "Invisibility", "Fireball", "Darkness", "Blindness", "Vocation", "Storm", "Script", "Mirage", "Invulnerability", "Flame", "Daylight", "Blink", "Wail", "Strength", "Scrying", "Misdirection", "Iron", "Flesh", "Dead", "Blur", "Walk", "Strike", "Seeing", "Missile", "Item", "Fog", "Deafness", "Body", "Wall", "Stun", "Self", "Mist", "Jar", "Force", "Death", "Bolt", "Wards", "Suggestion", "Sending", "Monster", "Jaunt", "Foresight", "Demand", "Bond", "Water", "Summons", "Servant", "Mouth", "Jump", "Form", "Disjunction", "Breathing", "Weapon", "Sunburst", "Shadow", "Mud", "Kill", "Freedom", "Disk", "Burning", "Weather", "Swarm", "Shape", "Nightmare", "Killer", "Frost", "Dismissal", "Cage", "Web", "Symbol", "Shelter", "Object", "Knock", "Gate", "Displacement", "Chain", "Wilting", "Sympathy", "Shield", "Page", "Languages", "Good", "Door", "Chaos", "Wind", "Telekinesis", "Shift", "Pattern", "Laughter", "Grace", "Drain", "Charm", "Wish", "Teleport", "Shout", "Person", "Law", "Grasp", "Dream", "Elements", "Edge", "Earth", "Dust" };
                string   sEffect  = sEffects[Utility.RandomMinMax(0, (sEffects.Length - 1))];

                task = task + sMix + " " + sEffect;
            }

            return(task);
        }
示例#6
0
        public HenchmanWizardItem()
        {
            ItemID = 0xE2D;

            if (HenchGearColor > 0)
            {
                Hue = HenchGearColor;
            }
            else
            {
                int color = Utility.Random(19);
                HenchGearColor  = HenchmanFunctions.GetHue(color);
                Hue             = HenchGearColor;
                HenchGloves     = Utility.RandomMinMax(1, 2);
                HenchCloakColor = HenchmanFunctions.GetHue(color);
                HenchCloak      = Utility.RandomMinMax(1, 2);
                HenchRobe       = Utility.RandomMinMax(1, 2);
                if (Utility.Random(2) == 1)
                {
                    HenchHatColor = HenchGearColor;
                }
                else
                {
                    HenchHatColor = HenchCloakColor;
                }
            }

            if (HenchWeaponID > 0)
            {
            }
            else
            {
                switch (Utility.Random(3))
                {
                case 0: HenchWeaponID = 0xE89; break;

                case 1: HenchWeaponID = 0x13F8; break;

                case 2: HenchWeaponID = 0xDF0; break;
                }
            }
            if (HenchHelmID > 0)
            {
            }
            else
            {
                switch (Utility.Random(10))
                {
                case 0: HenchHelmID = 5914; break;

                case 1: HenchHelmID = 5911; break;

                case 2: HenchHelmID = 5910; break;

                case 3: HenchHelmID = 5908; break;

                case 4: HenchHelmID = 5912; break;

                case 5: HenchHelmID = 5907; break;

                case 6: HenchHelmID = 5444; break;

                case 7: HenchHelmID = 0x1540; break;

                case 8: HenchHelmID = 0; break;

                case 9: HenchHelmID = 0x2B6E; break;
                }
            }

            Name = "wizard henchman";
        }
 public override bool OnDragDrop(Mobile from, Item dropped)
 {
     HenchmanFunctions.OnGive(from, dropped, this);
     return(base.OnDragDrop(from, dropped));
 }
 public override void OnGotMeleeAttack(Mobile defender)
 {
     HenchmanFunctions.OnGotAttack(this);
 }
 public override void OnDamagedBySpell(Mobile attacker)
 {
     base.OnDamagedBySpell(attacker);
     HenchmanFunctions.OnSpellAttack(this);
 }
        public HenchmanFighterItem()
        {
            ItemID = 0x1419;

            if (HenchGearColor > 0)
            {
                Hue = HenchGearColor;
            }
            else
            {
                Hue = Utility.RandomList(0, 0x973, 0x966, 0x96D, 0x972, 0x8A5, 0x979, 0x89F, 0x8AB, 0x492, 0x5B4, 0x48F, 0xB93, 0xB92, 0x497, 0x4AC, 0x5B5, 0x5B6, 0x48B, 0x48E); HenchGearColor = Hue;
            }

            if (HenchArmorType > 0)
            {
            }
            else
            {
                HenchArmorType = Utility.RandomMinMax(1, 3);
            }
            if (HenchWeaponType > 0)
            {
            }
            else
            {
                HenchWeaponType = Utility.RandomMinMax(1, 3);
            }

            HenchCloak      = Utility.RandomMinMax(1, 2);
            HenchCloakColor = HenchmanFunctions.GetHue(Utility.Random(19));

            if (HenchWeaponID > 0)
            {
            }
            else
            {
                if (HenchWeaponType != 1)                   // SWORDS
                {
                    switch (Utility.Random(8))
                    {
                    case 0: HenchWeaponID = 0x1441; break;

                    case 1: HenchWeaponID = 0x13FF; break;

                    case 2: HenchWeaponID = 0x1401; break;

                    case 3: HenchWeaponID = 0xF61; break;

                    case 4: HenchWeaponID = 0x13B6; break;

                    case 5: HenchWeaponID = 0x13B8; break;

                    case 6: HenchWeaponID = 0x13B9; break;

                    case 7: HenchWeaponID = 0xF5E; break;
                    }
                }
                else                 // MACES
                {
                    switch (Utility.Random(4))
                    {
                    case 0: HenchWeaponID = 0x1407; break;

                    case 1: HenchWeaponID = 0x143D; break;

                    case 2: HenchWeaponID = 0xF5C; break;

                    case 3: HenchWeaponID = 0x143B; break;
                    }
                }
            }
            if (HenchShieldID > 0)
            {
            }
            else
            {
                switch (Utility.Random(14))
                {
                case 0: HenchShieldID = 0x1BC3; break;

                case 1: HenchShieldID = 0x1B73; break;

                case 2: HenchShieldID = 0x1B72; break;

                case 3: HenchShieldID = 0x1B7A; break;

                case 4: HenchShieldID = 0x1B79; break;

                case 5: HenchShieldID = 0x1BC4; break;

                case 6: HenchShieldID = 0x1B7B; break;

                case 7: HenchShieldID = 0x1B74; break;

                case 8: HenchShieldID = 0x1B76; break;

                case 9: HenchShieldID = 0x2FCB; break;

                case 10: HenchShieldID = 0x2FCA; break;

                case 11: HenchShieldID = 0x2FC9; break;

                case 12: HenchShieldID = 0x2B74; break;

                case 13: HenchShieldID = 0x2B75; break;
                }
            }
            if (HenchHelmID > 0)
            {
            }
            else
            {
                switch (Utility.Random(5))
                {
                case 0: HenchHelmID = 0x1412; break;

                case 1: HenchHelmID = 0x140A; break;

                case 2: HenchHelmID = 0x140C; break;

                case 3: HenchHelmID = 0x1408; break;

                case 4: HenchHelmID = 0; break;
                }
            }

            Name = "fighter henchman";
        }
示例#11
0
        public override void OnDoubleClick(Mobile from)
        {
            ArrayList pets = new ArrayList();

            foreach (Mobile m in World.Mobiles.Values)
            {
                if (m is HenchmanMonster || m is HenchmanArcher || m is HenchmanFighter || m is HenchmanWizard)
                {
                    BaseCreature bc = (BaseCreature)m;
                    if (bc.Controlled && bc.ControlMaster == from)
                    {
                        pets.Add(bc);
                    }
                }
            }

            int nFollowers = from.FollowersMax - from.Followers;

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);
            }
            else if (HenchDead > 0)
            {
                from.SendMessage("They are dead and you must hire a healer to resurrect them.");
            }
            else if (pets.Count > 1)
            {
                from.SendMessage("You already have enough henchman in your group.");
            }
            else if (nFollowers < 1)
            {
                from.SendMessage("You already have enough henchman in your group.");
            }
            else if (HenchmanFunctions.IsInRestRegion(from) == true)
            {
                Map map = from.Map;

                int nMounted = 0;
                if (from.Mounted == true)
                {
                    nMounted = 1;
                }

                int nCap   = (int)(from.Skills.Cap / 100);
                int nTotal = from.SkillsTotal;
                if (nTotal > (nCap * 100))
                {
                    nTotal = nCap * 100;
                }

                int nSkills = nTotal / nCap;
                int nStats  = from.RawStr + from.RawDex + from.RawInt;

                BaseCreature friend = new HenchmanWizard(HenchBody, nMounted, nSkills, nStats);
                friend.Delete();

                if (this is HenchmanMonsterItem)
                {
                    friend = new HenchmanMonster(HenchBody, nMounted, nSkills, nStats, HenchWeaponID, HenchShieldID);
                }
                else if (this is HenchmanWizardItem)
                {
                    friend = new HenchmanWizard(HenchBody, nMounted, nSkills, nStats);
                }
                else if (this is HenchmanFighterItem)
                {
                    friend = new HenchmanFighter(HenchBody, nMounted, nSkills, nStats);
                }
                else if (this is HenchmanArcherItem)
                {
                    friend = new HenchmanArcher(HenchBody, nMounted, nSkills, nStats);
                }

                bool    validLocation = false;
                Point3D loc           = from.Location;

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(3) - 1;
                    int y = Y + Utility.Random(3) - 1;
                    int z = map.GetAverageZ(x, y);

                    if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                    {
                        loc = new Point3D(x, y, Z);
                    }
                    else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                    {
                        loc = new Point3D(x, y, z);
                    }
                }

                friend.ControlMaster = from;
                friend.Controlled    = true;
                friend.ControlOrder  = OrderType.Come;
                friend.ControlSlots  = 1;
                friend.Loyalty       = 100;
                friend.Title         = HenchTitle;
                friend.SpeechHue     = HenchSpeech;
                friend.Name          = HenchName;
                friend.Fame          = HenchTimer;
                friend.Hunger        = HenchBandages;

                if (!(this is HenchmanMonsterItem))
                {
                    friend.Hue        = HenchHue;
                    friend.HairItemID = HenchHair;
                    friend.HairHue    = HenchHairHue;
                    HenchmanFunctions.DressUp(this, friend, from);
                    HenchmanFunctions.NormalizeArmor(friend);
                }

                int nTime = (int)(friend.Fame / 5);
                from.SendMessage("" + friend.Name + " will probably adventure with you for another " + nTime.ToString() + " minutes.");

                friend.MoveToWorld(loc, map);
                this.LootType    = LootType.Blessed;
                this.Visible     = false;
                this.HenchSerial = friend.Serial;

                if (!(this is HenchmanMonsterItem))
                {
                    switch (Utility.Random(8))
                    {
                    case 0: friend.Say("I am ready for adventure."); break;

                    case 1: friend.Say("Where are we off to?"); break;

                    case 2: friend.Say("" + from.Name + ", I am here to serve."); break;

                    case 3: friend.Say("May monsters fear our hardy band."); break;

                    case 4: friend.Say("What dungeon do we dare explore?"); break;

                    case 5: friend.Say("I have been waiting here too long."); break;

                    case 6: friend.Say("Hello, " + from.Name + "."); break;

                    case 7: friend.Say("Fame and fortune await!"); break;
                    }
                }
            }
            else
            {
                from.SendMessage("You can only call your henchman from a home, inn, or tavern.");
            }
        }
示例#12
0
        public HenchmanItem() : base(0xE2D)
        {
            if (HenchBody > 0)
            {
            }
            else
            {
                HenchTimer = 300;
            }
            if (HenchBody > 0)
            {
            }
            else
            {
                HenchBody = Utility.RandomList(400, 400, 401);
            }
            if (HenchSpeech > 0)
            {
            }
            else
            {
                HenchSpeech = Utility.RandomDyedHue();
            }
            if (HenchTitle == null)
            {
                HenchTitle = HenchmanFunctions.GetTitle();
            }
            if (HenchHue > 0)
            {
            }
            else
            {
                HenchHue = Utility.RandomSkinHue();
            }
            if (HenchHairHue > 0)
            {
            }
            else
            {
                HenchHairHue = Utility.RandomHairHue();
            }
            if (HenchHair > 0)
            {
            }
            else
            {
                HenchHair = Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A);
            }

            if (HenchName == null)
            {
                if (HenchBody == 400)
                {
                    HenchName = NameList.RandomName("male");
                }
                else
                {
                    HenchName = NameList.RandomName("female");
                }
            }

            Name   = "henchman";
            Weight = 1.0;
        }
示例#13
0
        public override void OnDoubleClick(Mobile from)
        {
            int nFollowers = from.FollowersMax - from.Followers;

            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("This must be in your backpack to use.");
            }
            else if (nFollowers < 1)
            {
                from.SendMessage("You already have enough henchman in your group.");
            }
            else if (HenchmanFunctions.IsInRestRegion(from) == false)
            {
                Map map = from.Map;

                int magery = (int)(from.Skills[SkillName.Magery].Value);

                BaseCreature prisoner = new LockedCreature(this.TrappedAI, this.TrappedSkills, magery, this.TrappedHits, this.TrappedStam, this.TrappedMana, this.TrappedStr, this.TrappedDex, this.TrappedInt, this.TrappedPoison, this.TrappedImmune, this.TrappedAngerSound, this.TrappedIdleSound, this.TrappedDeathSound, this.TrappedAttackSound, this.TrappedHurtSound);

                bool    validLocation = false;
                Point3D loc           = from.Location;

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(3) - 1;
                    int y = Y + Utility.Random(3) - 1;
                    int z = map.GetAverageZ(x, y);

                    if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                    {
                        loc = new Point3D(x, y, Z);
                    }
                    else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                    {
                        loc = new Point3D(x, y, z);
                    }
                }

                prisoner.ControlMaster = from;
                prisoner.Controlled    = true;
                prisoner.ControlOrder  = OrderType.Come;

                prisoner.Name        = this.TrappedName;
                prisoner.Title       = this.TrappedTitle;
                prisoner.Body        = this.TrappedBody;
                prisoner.BaseSoundID = this.TrappedBaseSoundID;
                prisoner.Hue         = this.TrappedHue;
                prisoner.AI          = AIType.AI_Mage; if (this.TrappedAI == 2)
                {
                    prisoner.AI = AIType.AI_Melee;
                }
                prisoner.DamageMin              = this.TrappedDmgMin;
                prisoner.DamageMax              = this.TrappedDmgMax;
                prisoner.ColdDamage             = this.TrappedColdDmg;
                prisoner.EnergyDamage           = this.TrappedEnergyDmg;
                prisoner.FireDamage             = this.TrappedFireDmg;
                prisoner.PhysicalDamage         = this.TrappedPhysicalDmg;
                prisoner.PoisonDamage           = this.TrappedPoisonDmg;
                prisoner.ColdResistSeed         = this.TrappedColdRst;
                prisoner.EnergyResistSeed       = this.TrappedEnergyRst;
                prisoner.FireResistSeed         = this.TrappedFireRst;
                prisoner.PhysicalResistanceSeed = this.TrappedPhysicalRst;
                prisoner.PoisonResistSeed       = this.TrappedPoisonRst;
                prisoner.VirtualArmor           = this.TrappedVirtualArmor;
                prisoner.CanSwim  = this.TrappedCanSwim;
                prisoner.CantWalk = this.TrappedCantWalk;

                from.BoltEffect(0);
                from.PlaySound(0x665);
                from.PlaySound(0x03E);
                prisoner.MoveToWorld(loc, map);
                from.SendMessage("You smash the bottle, releasing " + prisoner.Name + "!");
                this.Delete();
            }
            else
            {
                from.SendMessage("You don't think it would be a good idea to do that here.");
            }
        }
示例#14
0
        public HenchmanArcherItem() : base()
        {
            ItemID = 0xF50;

            if (HenchGearColor > 0)
            {
                Hue = HenchGearColor;
            }
            else
            {
                Hue = Utility.RandomList(0, 0x8AC, 0x845, 0x851, 0x47E, 0x4AA, 0xB85, 0x497, 0x89F, 0x483); HenchGearColor = Hue;
            }

            HenchCloak      = Utility.RandomMinMax(1, 2);
            HenchCloakColor = HenchmanFunctions.GetHue(Utility.Random(19));

            if (HenchArmorType > 0)
            {
            }
            else
            {
                HenchArmorType = Utility.RandomMinMax(1, 2);
            }
            if (HenchWeaponType > 0)
            {
            }
            else
            {
                HenchWeaponType = Utility.RandomMinMax(1, 2);
            }

            if (HenchWeaponID > 0)
            {
            }
            else
            {
                if (HenchWeaponType != 1)                   // BOW
                {
                    switch (Utility.Random(4))
                    {
                    case 0: HenchWeaponID = 0x13B2; break;

                    case 1: HenchWeaponID = 0x2D2B; break;

                    case 2: HenchWeaponID = 0x26C2; break;

                    case 3: HenchWeaponID = 0x2D1E; break;
                    }
                }
                else                 // CROSSBOW
                {
                    switch (Utility.Random(3))
                    {
                    case 0: HenchWeaponID = 0x26C3; break;

                    case 1: HenchWeaponID = 0xF50; break;

                    case 2: HenchWeaponID = 0x13FD; break;
                    }
                }
            }
            if (HenchHelmID > 0)
            {
            }
            else
            {
                switch (Utility.Random(5))
                {
                case 0: HenchHelmID = 0x2B6E; break;

                case 1: HenchHelmID = 0x13BB; break;

                case 2: HenchHelmID = 0x1DB9; break;

                case 3: HenchHelmID = 0x1DB9; break;

                case 4: HenchHelmID = 0; break;
                }
            }

            Name = "archer henchman";
        }