Exemple #1
0
            public GolemManualGump(Mobile from, GolemManual gBook) : base(100, 100)
            {
                m_Book = gBook;
                GolemManual pedia = (GolemManual)gBook;

                string sExodus = "";

                if (gBook.HaveDarkCore > 0)
                {
                    sExodus = " of Exodus";
                }

                string GolemType = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase((gBook.GolemType).ToLower());

                string sText = "This rare tome contains the knowledge to construct a metal golem. Within its pages you will see what you need to obtain in order to have it constructed. You will need ingots according to the metal construction of the golem noted here. You will also need clockwork assemblies, power crystals, arcane gems, gears, technomancer oils, and gold for the tinker's fee. The tinker that can actually construct this golem is at the location shown at the bottom of the first page. If you have any tinkering skill, they may refund some of the gold for the help you may provide in the construction. There are two types of golems that can be constructed. One is a combatant golem, that will fight along with you. The other is a worker golem, that will carry whatever you wish not to carry yourself. Worker golems cannot be harmed and are ignored from hostile creatures. Along with this, they cannot attack anything either. They require 5 follower slots to accompany you. You will need a combatant golem if you want them to face others in combat. Unlike worker golems, combatant golems only need 3 follower slots to accompany you. The better the metal construction, the stronger the golem. You only need to obtain springs if you are having a combatant golem built. As you find materials, simply drag and drop them onto this book to add to the materials. The first page will track what you have obtained thus far. When every item is acquired (remember, springs are optional), give this tome to a tinker and they will construct your golem. The golem built will be yours alone, and it will have a limited amount of charges. A charge is used whenever you bring the golem forth to travel with you. You will have to obtain more power crystals in order to add more charges, where each power crystal will add 5 more charges to a worker golem and 1 extra charge to a combatant golem. A golem can only hold 100 charges at a time. Golems are controlled just like tamed beasts or summoned creatures. They can be told to follow, stay, or stop. The worker golem will have a pack you can access. You can also dismiss the golem, where the construct item will reappear in your pack. If you dismiss a worker golem, anything carried will be dropped on the ground. They are automatons so they do not need to be fed, other than the power crystals already mentioned. Remember, they are not transferable once constructed. The one giving the tinker the book will own the golem that is constructed.";

                this.Closable   = true;
                this.Disposable = true;
                this.Dragable   = true;
                this.Resizable  = false;

                AddPage(0);
                AddImage(18, 17, 1054);

                AddHtml(88, 48, 266, 26, @"<BODY><BASEFONT Color=Black><BIG>" + GolemType + sExodus + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddHtml(89, 86, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Ingots</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 121, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Clockworks</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 156, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Crystals</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 191, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Arcane Gems</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 226, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Gears</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 261, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Oil</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 296, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Gold</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(89, 331, 120, 25, @"<BODY><BASEFONT Color=Black><BIG>Springs</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddHtml(223, 86, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedMetalQty.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 86, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveMetalQty.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 121, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedClocks.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 121, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveClocks.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 156, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedCrystals.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 156, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveCrystals.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 191, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedGems.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 191, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveGems.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 226, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedGears.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 226, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveGears.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 261, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedOil.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 261, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveOil.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 296, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedGold.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 296, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveGold.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(223, 331, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.NeedSprings.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);
                AddHtml(291, 331, 52, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.HaveSprings.ToString() + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddHtml(89, 367, 258, 25, @"<BODY><BASEFONT Color=Black><BIG>" + gBook.TinkerLocation + "</BIG></BASEFONT></BODY>", (bool)false, (bool)false);

                AddHtml(393, 47, 266, 339, @"<BODY><BASEFONT Color=Black><BIG>" + sText + "</BIG></BASEFONT></BODY>", (bool)false, (bool)true);
            }
Exemple #2
0
        public static bool ProcessGolemBook(Mobile m, Mobile tinker, Item dropped)
        {
            GolemManual book = (GolemManual)dropped;

            if (Server.Misc.Worlds.GetRegionName(tinker.Map, tinker.Location) != book.TinkerLocation)
            {
                return(false);
            }

            int tinkerSkill = (int)(m.Skills[SkillName.Tinkering].Value);

            if (tinkerSkill > 100)
            {
                tinkerSkill = 100;
            }

            int GoldReturn = 0;

            if (tinkerSkill > 0)
            {
                GoldReturn = (int)(book.NeedGold * (tinkerSkill * 0.005));
            }

            int HaveIngredients = 0;

            if (book.HaveClocks >= book.NeedClocks)
            {
                HaveIngredients++;
            }
            if (book.HaveCrystals >= book.NeedCrystals)
            {
                HaveIngredients++;
            }
            if (book.HaveGears >= book.NeedGears)
            {
                HaveIngredients++;
            }
            if (book.HaveGems >= book.NeedGems)
            {
                HaveIngredients++;
            }
            if (book.HaveGold >= book.NeedGold)
            {
                HaveIngredients++;
            }
            if (book.HaveOil >= book.NeedOil)
            {
                HaveIngredients++;
            }
            if (book.HaveMetalQty >= book.NeedMetalQty)
            {
                HaveIngredients++;
            }

            if (HaveIngredients < 7)
            {
                return(false);
            }

            int FighterGolem = 0;

            if (book.HaveSprings >= book.NeedSprings)
            {
                FighterGolem = 1;
            }

            int PortColor   = 0;
            int ExodusBoost = 0;

            if (GoldReturn > 0)
            {
                m.AddToBackpack(new Gold(GoldReturn)); tinker.Say("Here is " + GoldReturn.ToString() + " gold back for all of your help.");
            }

            if (book.GolemType == "a Valorite Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("valorite", "monster", 0); ExodusBoost = 9;
            }
            else if (book.GolemType == "a Verite Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("verite", "monster", 0); ExodusBoost = 8;
            }
            else if (book.GolemType == "an Agapite Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("agapite", "monster", 0); ExodusBoost = 7;
            }
            else if (book.GolemType == "a Golden Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("gold", "monster", 0); ExodusBoost = 6;
            }
            else if (book.GolemType == "a Bronze Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("bronze", "monster", 0); ExodusBoost = 5;
            }
            else if (book.GolemType == "a Copper Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("copper", "monster", 0); ExodusBoost = 4;
            }
            else if (book.GolemType == "a Shadow Iron Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("shadow iron", "monster", 0); ExodusBoost = 3;
            }
            else if (book.GolemType == "a Dull Copper Golem")
            {
                PortColor = MaterialInfo.GetMaterialColor("dull copper", "monster", 0); ExodusBoost = 2;
            }
            else if (book.GolemType == "an Iron Golem")
            {
                PortColor = 0x430; ExodusBoost = 1;
            }

            GolemPorterItem ball = new GolemPorterItem();

            string QuestLog = "had " + (book.GolemType).ToLower() + " built";

            if (book.HaveDarkCore > 0)
            {
                ball.PorterExodus = ExodusBoost; PortColor = 2118; QuestLog = QuestLog + " with the dark core of Exodus";
            }

            ball.PorterOwner = m.Serial;
            ball.PorterHue   = PortColor;
            ball.PorterType  = FighterGolem;
            ball.Hue         = PortColor;

            m.AddToBackpack(ball);

            LoggingFunctions.LogGenericQuest(m, QuestLog);

            m.PrivateOverheadMessage(MessageType.Regular, 1153, false, "My golem has been built.", m.NetState);
            m.PlaySound(0x5C3);

            dropped.Delete();

            return(true);
        }