コード例 #1
0
ファイル: Cartography.cs プロジェクト: zerodowned/Origins
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is BlankMap)
                {
                    Item     item = (Item)target;
                    BaseTool tool = new MapmakersPen();

                    if (item.RootParent != from)
                    {
                        from.SendAsciiMessage("That must be in your pack for you to use it.");
                    }
                    else
                    {
                        from.SendMenu(new CartographyMenu(from, CartographyMenu.Main(from), "Main", tool));
                    }

                    if (tool != null)
                    {
                        tool.Delete();
                    }
                }
                else if (target is WorldMap || target is LocalMap || target is CityMap || target is SeaChart)
                {
                    //from.Send(new AsciiMessage(((Item)target).Serial, ((Item)target).ItemID, MessageType.Regular, 0, 3, "", "You cannot overwrite this carefully hand-drawn map!"));
                    from.SendAsciiMessage("You cannot overwrite this carefully hand-drawn map!");
                }
                else
                {
                    from.SendAsciiMessage("This is not a map.");

                    /*if (target is Item)
                     *  from.Send(new AsciiMessage(((Item)target).Serial, ((Item)target).ItemID, MessageType.Regular, 0, 3, "", "This is not a map."));*/
                }
            }
コード例 #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(BlankMap), BlankMap.GetSBSellValue());
                Add(typeof(MapmakersPen), MapmakersPen.GetSBSellValue());

                //Add( typeof( LocalMap ), 6 );
                //Add( typeof( CityMap ), 8 );
                //Add( typeof( WorldMap ), 12 );
            }
コード例 #5
0
            public InternalBuyInfo()
            {
                //TEST: Determine Map Prices
                //for ( int i = 0; i < PresetMapEntry.Table.Length; ++i )
                //Add( new PresetMapBuyInfo( PresetMapEntry.Table[i], Utility.RandomMinMax( 7, 10 ), 20 ) );

                Add(new GenericBuyInfo("Blank Map", typeof(BlankMap), BlankMap.GetSBPurchaseValue(), 500, 0x14EC, 0));
                Add(new GenericBuyInfo("Mapmaker's Pen", typeof(MapmakersPen), MapmakersPen.GetSBPurchaseValue(), 50, 0x0FBF, 0));
            }
コード例 #6
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);
            }
        }