Пример #1
0
        private void CheckStuff()
        {
            GetGary();
            GetStatues();
            GetDice();
            GetDoor1();
            GetDoor2();

            if (!FindObject(typeof(UOBoard), _RulesLoc))
            {
                var rules = new UOBoard();
                rules.Movable = false;
                rules.MoveToWorld(_RulesLoc, Map.Malas);
            }

            Point3D p = new Point3D(390, 7, 2);

            if (!FindObject(typeof(Static), p))
            {
                var books = new Static(0x1E22);
                books.MoveToWorld(p, Map.Malas);
            }

            if (!FindObject(typeof(ScribesPen), p))
            {
                var pen = new ScribesPen();
                pen.ItemID  = 4032;
                pen.Movable = false;
                pen.MoveToWorld(p, Map.Malas);
            }
        }
Пример #2
0
            public InternalSellInfo()
            {
                Add(typeof(Pickaxe), Pickaxe.GetSBSellValue());
                Add(typeof(Shovel), Shovel.GetSBSellValue());

                Add(typeof(Lockpick), Lockpick.GetSBSellValue());
                Add(typeof(Scissors), Scissors.GetSBSellValue());

                Add(typeof(Tongs), Tongs.GetSBSellValue());
                Add(typeof(SledgeHammer), SledgeHammer.GetSBSellValue());
                Add(typeof(SmithHammer), SmithHammer.GetSBSellValue());
                Add(typeof(MortarPestle), MortarPestle.GetSBSellValue());
                Add(typeof(TinkerTools), TinkerTools.GetSBSellValue());
                Add(typeof(SewingKit), SewingKit.GetSBSellValue());
                Add(typeof(Skillet), Skillet.GetSBSellValue());
                Add(typeof(RollingPin), RollingPin.GetSBSellValue());
                Add(typeof(MapmakersPen), MapmakersPen.GetSBSellValue());
                Add(typeof(ScribesPen), ScribesPen.GetSBSellValue());
                Add(typeof(Scorp), Scorp.GetSBSellValue());
                Add(typeof(DrawKnife), DrawKnife.GetSBSellValue());
                Add(typeof(Saw), Saw.GetSBSellValue());
                Add(typeof(DovetailSaw), DovetailSaw.GetSBSellValue());
                Add(typeof(Froe), Froe.GetSBSellValue());
                Add(typeof(Hammer), Hammer.GetSBSellValue());
                Add(typeof(Inshave), Inshave.GetSBSellValue());
                Add(typeof(JointingPlane), JointingPlane.GetSBSellValue());
                Add(typeof(WoodenPlane), WoodenPlane.GetSBSellValue());
                Add(typeof(SmoothingPlane), SmoothingPlane.GetSBSellValue());
            }
Пример #3
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Pickaxe", typeof(Pickaxe), Pickaxe.GetSBPurchaseValue(), 50, 0xE86, 0));
                Add(new GenericBuyInfo("Shovel", typeof(Shovel), Shovel.GetSBPurchaseValue(), 50, 0xF39, 0));
                Add(new GenericBuyInfo("Hatchet", typeof(Hatchet), Hatchet.GetSBPurchaseValue(), 50, 0xF43, 0));

                Add(new GenericBuyInfo("Lockpick", typeof(Lockpick), Lockpick.GetSBPurchaseValue(), 250, 0x14FC, 0));
                Add(new GenericBuyInfo("Scissors", typeof(Scissors), Scissors.GetSBPurchaseValue(), 50, 0xF9F, 0));

                Add(new GenericBuyInfo("Tongs", typeof(Tongs), Tongs.GetSBPurchaseValue(), 50, 0xFBB, 0));
                Add(new GenericBuyInfo("SledgeHammer", typeof(SledgeHammer), SledgeHammer.GetSBPurchaseValue(), 50, 0xFB5, 0));
                Add(new GenericBuyInfo("SmithHammer", typeof(SmithHammer), SmithHammer.GetSBPurchaseValue(), 50, 0x13E3, 0));
                Add(new GenericBuyInfo("MortarPestle", typeof(MortarPestle), MortarPestle.GetSBPurchaseValue(), 50, 0xE9B, 0));
                Add(new GenericBuyInfo("TinkerTools", typeof(TinkerTools), TinkerTools.GetSBPurchaseValue(), 50, 0x1EB8, 0));
                Add(new GenericBuyInfo("SewingKit", typeof(SewingKit), SewingKit.GetSBPurchaseValue(), 50, 0xF9D, 0));
                Add(new GenericBuyInfo("Skillet", typeof(Skillet), Skillet.GetSBPurchaseValue(), 50, 0x97F, 0));
                Add(new GenericBuyInfo("RollingPin", typeof(RollingPin), RollingPin.GetSBPurchaseValue(), 50, 0x1043, 0));
                Add(new GenericBuyInfo("MapmakersPen", typeof(MapmakersPen), MapmakersPen.GetSBPurchaseValue(), 50, 0x0FBF, 0));
                Add(new GenericBuyInfo("ScribesPen", typeof(ScribesPen), ScribesPen.GetSBPurchaseValue(), 50, 0x0FBF, 0));
                Add(new GenericBuyInfo("Scorp", typeof(Scorp), Scorp.GetSBPurchaseValue(), 50, 0x10E7, 0));
                Add(new GenericBuyInfo("DrawKnife", typeof(DrawKnife), DrawKnife.GetSBPurchaseValue(), 50, 0x10E4, 0));
                Add(new GenericBuyInfo("Saw", typeof(Saw), Saw.GetSBPurchaseValue(), 50, 0x1034, 0));
                Add(new GenericBuyInfo("DovetailSaw", typeof(DovetailSaw), DovetailSaw.GetSBPurchaseValue(), 50, 0x1028, 0));
                Add(new GenericBuyInfo("Froe", typeof(Froe), Froe.GetSBPurchaseValue(), 50, 0x10E5, 0));
                Add(new GenericBuyInfo("Hammer", typeof(Hammer), Hammer.GetSBPurchaseValue(), 50, 0x102A, 0));
                Add(new GenericBuyInfo("Inshave", typeof(Inshave), Inshave.GetSBPurchaseValue(), 50, 0x10E6, 0));
                Add(new GenericBuyInfo("JointingPlane", typeof(JointingPlane), JointingPlane.GetSBPurchaseValue(), 50, 0x1030, 0));
                Add(new GenericBuyInfo("WoodenPlane", typeof(WoodenPlane), WoodenPlane.GetSBPurchaseValue(), 50, 0x102C, 0));
                Add(new GenericBuyInfo("SmoothingPlane", typeof(SmoothingPlane), SmoothingPlane.GetSBPurchaseValue(), 50, 0x1032, 0));
            }
Пример #4
0
            public InternalSellInfo()
            {
                Add(typeof(RecallRune), RecallRune.GetSBSellValue());
                Add(typeof(BlankScroll), BlankScroll.GetSBSellValue());
                Add(typeof(Spellbook), Spellbook.GetSBSellValue());
                Add(typeof(ScribesPen), ScribesPen.GetSBSellValue());

                Add(typeof(BrownBook), BrownBook.GetSBSellValue());
                Add(typeof(TanBook), TanBook.GetSBSellValue());
                Add(typeof(BlueBook), BlueBook.GetSBSellValue());
                Add(typeof(RedBook), RedBook.GetSBSellValue());
            }
Пример #5
0
            public InternalSellInfo()
            {
                //TEST: FIX THIS !!!!!

                //TEST: DETERMINE SPELL SCROLL PRICES

                /*
                 * Type[] types = Loot.RegularScrollTypes;
                 *
                 * for (int i = 0; i < types.Length; ++i)
                 * {
                 *  Type type = types[i];
                 *
                 *  var ci = Server.Engines.Craft.DefInscription.CraftSystem.CraftItems.SearchFor(type);
                 *
                 *  if (ci == null)
                 *      continue;
                 *
                 *  var res = ci.Resources;
                 *
                 *  int cost = 0;
                 *
                 *  foreach (CraftRes c in ci.Resources)
                 *      cost += CostOfResource(c.ItemType);
                 *
                 *  int level = ((i + 1) / 8) / 2;
                 *
                 *  cost += LevelBonusFor(level);
                 *
                 *  cost *= 3;
                 *
                 *  int count = res.Count;
                 *
                 *  //TEST: DETERMINE SCROLL SELL PRICES
                 *  Add(type, Math.Min(6 + ((i / 8) * 5), cost));
                 * }
                 */

                Add(typeof(BlackPearl), BlackPearl.GetSBSellValue());
                Add(typeof(Bloodmoss), Bloodmoss.GetSBSellValue());
                Add(typeof(MandrakeRoot), MandrakeRoot.GetSBSellValue());
                Add(typeof(Garlic), Garlic.GetSBSellValue());
                Add(typeof(Ginseng), Ginseng.GetSBSellValue());
                Add(typeof(Nightshade), Nightshade.GetSBSellValue());
                Add(typeof(SpidersSilk), SpidersSilk.GetSBSellValue());
                Add(typeof(SulfurousAsh), SulfurousAsh.GetSBSellValue());

                Add(typeof(RecallRune), RecallRune.GetSBSellValue());
                Add(typeof(BlankScroll), BlankScroll.GetSBSellValue());
                Add(typeof(Spellbook), Spellbook.GetSBSellValue());
                Add(typeof(ScribesPen), ScribesPen.GetSBSellValue());
                Add(typeof(MagicWizardsHat), MagicWizardsHat.GetSBSellValue());
            }
Пример #6
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Recall Rune", typeof(RecallRune), RecallRune.GetSBPurchaseValue(), 50, 0x1f14, 0));
                Add(new GenericBuyInfo("Spellbook", typeof(Spellbook), Spellbook.GetSBPurchaseValue(), 25, 0xEFA, 0));
                Add(new GenericBuyInfo("Blank Scroll", typeof(BlankScroll), BlankScroll.GetSBPurchaseValue(), 500, 0x0E34, 0));
                Add(new GenericBuyInfo("Scribe's Pen", typeof(ScribesPen), ScribesPen.GetSBPurchaseValue(), 50, 0xFBF, 0));

                Add(new GenericBuyInfo("Book", typeof(RedBook), RedBook.GetSBPurchaseValue(), 50, 0xFF1, 0));
                Add(new GenericBuyInfo("Book", typeof(BrownBook), BrownBook.GetSBPurchaseValue(), 50, 0xFEF, 0));
                Add(new GenericBuyInfo("Book", typeof(TanBook), TanBook.GetSBPurchaseValue(), 50, 0xFF0, 0));
                Add(new GenericBuyInfo("Book", typeof(BlueBook), BlueBook.GetSBPurchaseValue(), 50, 0xFF2, 0));

                //TEST: DETERMINE SCROLLS

                //Add( new GenericBuyInfo( typeof( BladeSpiritsScroll ), 350, 5, 0x1F4D, 0 ) );
                Add(new GenericBuyInfo(typeof(IncognitoScroll), 450, 5, 0x1F4F, 0));
                Add(new GenericBuyInfo(typeof(MagicReflectScroll), 500, 5, 0x1F50, 0));
                Add(new GenericBuyInfo(typeof(MindBlastScroll), 350, 5, 0x1F51, 0));
                Add(new GenericBuyInfo(typeof(ParalyzeScroll), 550, 5, 0x1F52, 0));
                Add(new GenericBuyInfo(typeof(PoisonFieldScroll), 450, 5, 0x1F53, 0));
                Add(new GenericBuyInfo(typeof(SummonCreatureScroll), 450, 5, 0x1F54, 0));
                Add(new GenericBuyInfo(typeof(DispelScroll), 800, 4, 0x1F55, 0));
                Add(new GenericBuyInfo(typeof(EnergyBoltScroll), 900, 4, 0x1F56, 0));
                Add(new GenericBuyInfo(typeof(ExplosionScroll), 1050, 4, 0x1F57, 0));
                Add(new GenericBuyInfo(typeof(InvisibilityScroll), 900, 4, 0x1F58, 0));
                Add(new GenericBuyInfo(typeof(MarkScroll), 600, 4, 0x1F59, 0));
                Add(new GenericBuyInfo(typeof(MassCurseScroll), 700, 4, 0x1F5A, 0));
                Add(new GenericBuyInfo(typeof(ParalyzeFieldScroll), 700, 4, 0x1F5B, 0));
                Add(new GenericBuyInfo(typeof(RevealScroll), 800, 4, 0x1F5C, 0));
                //Add( new GenericBuyInfo( typeof( ChainLightningScroll ), 1500, 3, 0x1F5D, 0 ) );
                //Add( new GenericBuyInfo( typeof( EnergyFieldScroll ),1500, 3, 0x1F5E, 0 ) );
                //Add( new GenericBuyInfo( typeof( FlamestrikeScroll ), 1750, 3, 0x1F5F, 0 ) );
                //Add( new GenericBuyInfo( typeof( GateTravelScroll ), 1950, 3, 0x1F60, 0 ) );
                //Add( new GenericBuyInfo( typeof( ManaVampireScroll ), 1550, 3, 0x1F61, 0 ) );
                //Add( new GenericBuyInfo( typeof( MassDispelScroll ), 1500, 3, 0x1F62, 0 ) );
                //Add( new GenericBuyInfo( typeof( MeteorSwarmScroll ), 1050, 3, 0x1F63, 0 ) );
                //Add( new GenericBuyInfo( typeof( PolymorphScroll ), 1000, 3, 0x1F64, 0 ) );
                //Add( new GenericBuyInfo( typeof( EarthquakeScroll ), 5500, 2, 0x1F65, 0 ) );
                //Add( new GenericBuyInfo( typeof( EnergyVortexScroll ), 2500, 2, 0x1F66, 0 ) );
                //Add( new GenericBuyInfo( typeof( ResurrectionScroll ), 6575, 2, 0x1F67, 0 ) );
                //Add( new GenericBuyInfo( typeof( SummonAirElementalScroll ), 2000, 2, 0x1F68, 0 ) );
                //Add( new GenericBuyInfo( typeof( SummonDaemonScroll ), 2500, 2, 0x1F69, 0 ) );
                //Add( new GenericBuyInfo( typeof( SummonEarthElementalScroll ), 2000, 2, 0x1F6A, 0 ) );
                //Add( new GenericBuyInfo( typeof( SummonFireElementalScroll ), 2000, 2, 0x1F6B, 0 ) );
                //Add( new GenericBuyInfo( typeof( SummonWaterElementalScroll ), 2000, 2, 0x1F6C, 0 ) );
                //Add( new GenericBuyInfo( typeof( DispelFieldScroll ), 500, 5, 0x1F4E, 0 ) );
            }
Пример #7
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            PlayerMobile m = m_user; ToolBox box = i_box; BaseTool tool; BaseHarvestTool toola; Hatchet toolh; Container pack = m.Backpack;

            switch (info.ButtonID)
            {
            default: { break; }

            case 2: { box.OW(m); break; }

            case 3: { tool = new Tongs(); tool.UsesRemaining = box.i_S; pack.DropItem(tool); box.i_S = 0; break; }

            case 4: { tool = new MouldingPlane(); tool.UsesRemaining = box.i_C; pack.DropItem(tool); box.i_C = 0; break; }

            case 5: { tool = new TinkerTools(); tool.UsesRemaining = box.i_Ti; pack.DropItem(tool); box.i_Ti = 0; break; }

            case 6: { tool = new SewingKit(); tool.UsesRemaining = box.i_T; pack.DropItem(tool); box.i_T = 0; break; }

            case 7: { toolh = new Hatchet(); toolh.UsesRemaining = box.i_L; pack.DropItem(toolh); box.i_L = 0; break; }

            case 8: { tool = new ScribesPen(); tool.UsesRemaining = box.i_Sc; pack.DropItem(tool); box.i_Sc = 0; break; }

            case 9: { toola = new Shovel(); toola.UsesRemaining = box.i_M; pack.DropItem(toola); box.i_M = 0; break; }

            case 10: { tool = new Skillet(); tool.UsesRemaining = box.i_Co; pack.DropItem(tool); box.i_Co = 0; break; }

            case 11: { tool = new FletcherTools(); tool.UsesRemaining = box.i_F; pack.DropItem(tool); box.i_F = 0; break; }

            case 12: { tool = new MortarPestle(); tool.UsesRemaining = box.i_A; pack.DropItem(tool); box.i_A = 0; break; }

            case 13: { tool = new MalletAndChisel(); tool.UsesRemaining = box.i_St; pack.DropItem(tool); box.i_St = 0; break; }

            case 14: { tool = new MapmakersPen(); tool.UsesRemaining = box.i_Ca; pack.DropItem(tool); box.i_Ca = 0; break; }

            case 15: { GargoylesPickaxe item = new GargoylesPickaxe(); item.UsesRemaining = box.i_Garg; pack.DropItem(item); box.i_Garg = 0; break; }

            case 16: { ProspectorsTool item = new ProspectorsTool(); item.UsesRemaining = box.i_Pros; pack.DropItem(item); box.i_Pros = 0; break; }

            case 17: { Blowpipe item = new Blowpipe(); item.UsesRemaining = box.i_G; pack.DropItem(item); box.i_G = 0; break; }
            }
            if (info.ButtonID > 2)
            {
                box.NG(m, box);
            }
        }
Пример #8
0
            public InternalBuyInfo()
            {
                //TEST: FIX THIS!!!!


                /*
                 *              Type[] types = Loot.RegularScrollTypes;
                 *
                 *              //for ( int i = 0; i < types.Length; ++i )
                 *              for ( int i = 0; i < 32; ++i )
                 *
                 *              {
                 *                      int itemID = 0x1F2E + i;
                 *
                 *                      if ( i == 6 )
                 *                              itemID = 0x1F2D;
                 *
                 *                      else if ( i > 6 )
                 *                              --itemID;
                 *
                 *  //TEST: DETERMINE SCROLL PRICES
                 *                      Add( new GenericBuyInfo( types[i], 12 + ((i / 3) * 10), 20, itemID, 0 ) );
                 *              }
                 */

                Add(new GenericBuyInfo("Black Pearl", typeof(BlackPearl), BlackPearl.GetSBPurchaseValue(), 500, 0xF7A, 0));
                Add(new GenericBuyInfo("Bloodmoss", typeof(Bloodmoss), Bloodmoss.GetSBPurchaseValue(), 500, 0xF7B, 0));
                Add(new GenericBuyInfo("Mandrake Root", typeof(MandrakeRoot), MandrakeRoot.GetSBPurchaseValue(), 500, 0xF86, 0));
                Add(new GenericBuyInfo("Garlic", typeof(Garlic), Garlic.GetSBPurchaseValue(), 500, 0xF84, 0));
                Add(new GenericBuyInfo("Ginseng", typeof(Ginseng), Ginseng.GetSBPurchaseValue(), 500, 0xF85, 0));
                Add(new GenericBuyInfo("Nightshade", typeof(Nightshade), Nightshade.GetSBPurchaseValue(), 500, 0xF88, 0));
                Add(new GenericBuyInfo("Spider Silk", typeof(SpidersSilk), SpidersSilk.GetSBPurchaseValue(), 500, 0xF8D, 0));
                Add(new GenericBuyInfo("Sulfurous Ash", typeof(SulfurousAsh), SulfurousAsh.GetSBPurchaseValue(), 500, 0xF8C, 0));

                Add(new GenericBuyInfo("Recall Rune", typeof(RecallRune), RecallRune.GetSBPurchaseValue(), 50, 0x1f14, 0));
                Add(new GenericBuyInfo("Spellbook", typeof(Spellbook), Spellbook.GetSBPurchaseValue(), 25, 0xEFA, 0));
                Add(new GenericBuyInfo("Blank Scroll", typeof(BlankScroll), BlankScroll.GetSBPurchaseValue(), 500, 0x0E34, 0));
                Add(new GenericBuyInfo("Scribe's Pen", typeof(ScribesPen), ScribesPen.GetSBPurchaseValue(), 50, 0xFBF, 0));
                Add(new GenericBuyInfo("Magical Wizard's Hat", typeof(MagicWizardsHat), MagicWizardsHat.GetSBPurchaseValue(), 25, 0x1718, 0));
            }
Пример #9
0
        private static void InvokeReward(Mobile from, SkillInfo skillInfo)
        {
            //Gump is problematic, would need to track if they have recieved their
            //reward for each skill, and recheck each login incase they closed the gump without accepting etc
            //Just give them a reward directly for now.
            Item rewardItem = null;

            switch (skillInfo.SkillID)
            {
            case 0:     // alchemy
                rewardItem = new MortarPestle();
                break;

            case 7:     // Blacksmithy
                rewardItem = new SmithHammer();
                break;

            case 8:     // Bowcraft/fletching
                rewardItem = new Bow();
                break;

            case 11:     // Carpentry
                rewardItem = new SmoothingPlane();
                break;

            case 23:     // Inscription
                rewardItem = new ScribesPen();
                break;

            case 25:     // Magery
                rewardItem = new Spellbook();
                (rewardItem as Spellbook).Content = ulong.MaxValue;
                break;

            case 34:     // Tailoring
                rewardItem = new SewingKit();
                break;

            case 35:     // Animal Taming
                rewardItem = new ShepherdsCrook();
                break;

            /* case 44: //Lumberjacking
             *   rewardItem = new Hatchet();
             *   break;
             * case 45: // Mining
             *   rewardItem = new Pickaxe();
             *   break;*/

            //Bardic skills
            case 9:
            case 15:
            case 22:
            case 29:
                rewardItem = new Drums();
                break;

            //"Thieving" skills
            case 21:
            case 28:
            case 33:
            case 47:
                rewardItem = new Cloak();
                break;
            }
            if (rewardItem != null)
            {
                rewardItem.Hue      = MythikStaticValues.GetGMRewardHue();
                rewardItem.LootType = LootType.Blessed;
                if (rewardItem.DefaultName != null)
                {
                    rewardItem.Name = from.RawName + "'s " + rewardItem.DefaultName;
                }
                from.PlaceInBackpack(rewardItem);
                from.SendAsciiMessage("You have recieved an item for becoming a Grand Master.");
            }
            else
            {
                from.SendAsciiMessage("You have recieved nothing but a sense of self worth for your efforts becoming a Grand Master.");
            }
        }
Пример #10
0
        private void Process(Mobile from)
        {
            Item rewardItem;

            switch (m_Skill.SkillID)
            {
            case 0:                     // alchemy
                rewardItem = new MortarPestle();
                break;

            case 7:                     // Blacksmithy
                rewardItem = new GMSmithHammer();
                break;

            case 8:                     // Bowcraft/fletching
                rewardItem = new Bow();
                break;

            case 11:                     // Carpentry
                switch (m_Itemid)
                {
                case 4138:
                    rewardItem = new Hammer();
                    break;

                case 4148:
                    rewardItem = new Saw();
                    break;

                case 4146:
                    rewardItem = new SmoothingPlane();
                    break;

                case 4325:
                    rewardItem = new Froe();
                    break;

                case 4326:
                    rewardItem = new Inshave();
                    break;

                case 4324:
                    rewardItem = new DrawKnife();
                    break;

                default:
                    return;
                }
                break;

            case 23:                     // Inscription
                rewardItem = new ScribesPen();
                break;

            case 25:                     // Magery
                rewardItem = new Spellbook();
                (rewardItem as Spellbook).Content  = ulong.MaxValue;
                (rewardItem as Spellbook).LootType = LootType.Blessed;
                break;

            case 34:                     // Tailoring
                rewardItem = new RewardDyeTub();
                break;

            case 35:                     // Animal Taming
                rewardItem = new ShepherdsCrook();
                break;

            case 44:     //Lumberjacking
                rewardItem = new Hatchet();
                break;

            case 45:     // Mining
                rewardItem = new Pickaxe();
                break;

            //Bardic skills
            case 9:
            case 15:
            case 22:
            case 29:
                switch (m_Itemid)
                {
                case 3740:
                    rewardItem = new Drums();
                    break;

                case 3761:
                    rewardItem = new Harp();
                    break;

                case 3762:
                    rewardItem = new LapHarp();
                    break;

                case 3763:
                    rewardItem = new Lute();
                    break;

                case 3741:
                    rewardItem = new Tambourine();
                    break;

                case 3742:
                    rewardItem = new TambourineTassel();
                    break;

                default:
                    return;
                }
                break;

            //"Thieving" skills
            case 21:
            case 28:
            case 33:
            case 47:
                rewardItem = new Cloak();
                break;

            default:
                return;
            }

            rewardItem.Hue      = m_CurrentHue;
            rewardItem.LootType = LootType.Blessed;

            if (m_Name != "")
            {
                rewardItem.Name = m_Name;
            }

            if (rewardItem is RewardDyeTub)
            {
                var tub = (RewardDyeTub)rewardItem;
                tub.DyedHue  = rewardItem.Hue;
                tub.Redyable = false;
                tub.LootType = LootType.Blessed;
                tub.Owner    = from;
            }
            else if (rewardItem is GMSmithHammer)
            {
                var hammer = (GMSmithHammer)rewardItem;
                hammer.Owner = from;
            }

            from.AddToBackpack(rewardItem);

            // Log
            RewardLogging.WriteLine(from, m_Skill, m_Name, m_CurrentHue);
        }
Пример #11
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                BaseBook  book = targeted as BaseBook;
                Container pack = from.Backpack;

                if (targeted is BlankScroll)
                {
                    Item item = (Item)targeted;

                    if (item.RootParent != from)
                    {
                        from.SendAsciiMessage("That must be in your pack for you to use it.");
                    }
                    else
                    {
                        if (pack != null)
                        {
                            if (pack.FindItemByType(typeof(Spellbook)) == null)
                            {
                                from.SendAsciiMessage("You don't have a spellbook.");
                            }
                            else if (((Spellbook)pack.FindItemByType(typeof(Spellbook))).SpellCount == 0)
                            {
                                from.SendAsciiMessage("You can't inscribe any spells.");
                            }
                            else
                            {
                                BaseTool m_Pen = new ScribesPen();
                                from.SendMenu(new InscriptionMenu(from, InscriptionMenu.Main(from), "Main", m_Pen));
                                if (m_Pen != null)
                                {
                                    m_Pen.Delete();
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (book == null)
                    {
                        from.SendAsciiMessage("Can't inscribe that item.");
                    }
                    else if (Inscribe.IsEmpty(book))
                    {
                        from.SendAsciiMessage("Can't copy an empty book."); // Can't copy an empty book.
                    }
                    else if (Inscribe.GetUser(book) != null)
                    {
                        from.SendAsciiMessage("Someone else is inscribing that item."); // Someone else is inscribing that item.
                    }
                    else
                    {
                        Target target = new InternalTargetDst(book);
                        from.Target = target;
                        from.SendAsciiMessage("Select a book to copy this to."); // Select a book to copy this to.
                        target.BeginTimeout(from, TimeSpan.FromMinutes(1.0));
                        Inscribe.SetUser(book, from);
                    }
                }
            }