當前位置: 首頁>>代碼示例>>C#>>正文


C# Harvest.HarvestVein類代碼示例

本文整理匯總了C#中Server.Engines.Harvest.HarvestVein的典型用法代碼示例。如果您正苦於以下問題:C# HarvestVein類的具體用法?C# HarvestVein怎麽用?C# HarvestVein使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HarvestVein類屬於Server.Engines.Harvest命名空間,在下文中一共展示了HarvestVein類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: HarvestBank

 public HarvestBank( HarvestDefinition def, HarvestVein defaultVein )
 {
     m_Maximum = Utility.RandomMinMax( def.MinTotal, def.MaxTotal );
     m_Current = m_Maximum;
     m_DefaultVein = defaultVein;
     m_Vein = m_DefaultVein;
 }
開發者ID:BackupTheBerlios,項目名稱:sunuo-svn,代碼行數:7,代碼來源:HarvestBank.cs

示例2: HarvestBank

        public HarvestBank( HarvestDefinition def, HarvestVein defaultVein, double chanceToFallback )
        {
            m_Maximum = Utility.RandomMinMax( def.MinTotal, def.MaxTotal );
            m_Current = m_Maximum;
            m_DefaultVein = defaultVein;
            m_Vein = m_DefaultVein;
            m_ChanceToFallback = chanceToFallback;

            m_Definition = def;
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:10,代碼來源:HarvestBank.cs

示例3: OnHarvestFinished

		public override void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested)
		{
/* include this part for rare extras
			// modded by greywolf for random items coming in

			double skillvaluelj = killerguy.Skills[SkillName.Magery].Base;
			int i_itemid = (int)(killerguy.Skills[SkillName.ItemID].Base/10);

			if ((Utility.RandomMinMax( 1, 1500 ) <= (1 + i_itemid)) && (skillvaluelj >= 70.1))
			{
				switch (Utility.RandomMinMax( 0, 10 ))
				{
					case 1 : default:  from.AddToBackpack(new Kindling()); from.SendMessage ("you find something wedged in the tree, a weird peice of wood ");break;
					case 2 : from.AddToBackpack(new BarkFragment()); from.SendMessage ("you find something wedged in the tree, a peice of bark ");break;
					case 3 : from.AddToBackpack(new LuminescentFungi()); from.SendMessage ("you find something wedged in the tree, some fungi ");break;
					case 4 : from.AddToBackpack(new ParasiticPlant()); from.SendMessage ("you find something wedged in the tree, a weird looking plant");break;
					case 5 : from.AddToBackpack(new DiseasedBark()); from.SendMessage ("you find something wedged in the tree, some weird looking bark ");break;
				}
			}
*/
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:21,代碼來源:NecroReagentGathering.cs

示例4: Fishing

        private Fishing()
        {
            HarvestResource[] res;
            HarvestVein[] veins;

            #region Fishing
            HarvestDefinition fish = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            fish.BankWidth = 8;
            fish.BankHeight = 8;

            // Every bank holds from 5 to 15 fish
            fish.MinTotal = 5;
            fish.MaxTotal = 15;

            // A resource bank will respawn its content every 10 to 20 minutes
            fish.MinRespawn = TimeSpan.FromMinutes(10.0);
            fish.MaxRespawn = TimeSpan.FromMinutes(20.0);

            // Skill checking is done on the Fishing skill
            fish.Skill = SkillName.Fishing;

            // Set the list of harvestable tiles
            fish.Tiles = m_WaterTiles;
            fish.RangedTiles = true;

            // Players must be within 4 tiles to harvest
            fish.MaxRange = 4;

            // One fish per harvest action
            fish.ConsumedPerHarvest = 1;
            fish.ConsumedPerFeluccaHarvest = 1;

            // The fishing
            fish.EffectActions = new int[] { 12 };
            fish.EffectSounds = new int[0];
            fish.EffectCounts = new int[] { 1 };
            fish.EffectDelay = TimeSpan.Zero;
            fish.EffectSoundDelay = TimeSpan.FromSeconds(8.0);

            fish.NoResourcesMessage = 503172; // The fish don't seem to be biting here.
            fish.FailMessage = 503171; // You fish a while, but fail to catch anything.
            fish.TimedOutOfRangeMessage = 500976; // You need to be closer to the water to fish!
            fish.OutOfRangeMessage = 500976; // You need to be closer to the water to fish!
            fish.PackFullMessage = 503176; // You do not have room in your backpack for a fish.
            fish.ToolBrokeMessage = 503174; // You broke your fishing pole.

            res = new HarvestResource[]
            {
                new HarvestResource(00.0, 00.0, 100.0, 1043297, typeof(Fish))
            };

            veins = new HarvestVein[]
            {
                new HarvestVein(100.0, 0.0, res[0], null)
            };

            fish.Resources = res;
            fish.Veins = veins;

            if (Core.ML)
            {
                fish.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 99.4, null, null), //set to same chance as mining ml gems
                    new BonusHarvestResource(80.0, .6, 1072597, typeof(WhitePearl))
                };
            }

            this.m_Definition = fish;
            this.Definitions.Add(fish);
            #endregion
        }
開發者ID:Tukaramdas,項目名稱:ServUO-EC-Test-Fork,代碼行數:74,代碼來源:Fishing.cs

示例5: TreasureHunting

        private TreasureHunting()
        {
            HarvestResource[] res;
            HarvestVein[] veins;

            #region TreasureHunting for treasures and trinkets
            HarvestDefinition treasuresAndTrinkets = m_treasuresAndTrinkets = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            treasuresAndTrinkets.BankWidth = 8;
            treasuresAndTrinkets.BankHeight = 8;

            // Every bank holds from 10 to 34 ore
            treasuresAndTrinkets.MinTotal = 0;
            treasuresAndTrinkets.MaxTotal = 2;

            // A resource bank will respawn its content every 1 hour
            treasuresAndTrinkets.MinRespawn = TimeSpan.FromHours( 1.0 );
            treasuresAndTrinkets.MaxRespawn = TimeSpan.FromHours( 1.0 );

            // Skill checking is done on the Mining skill
            treasuresAndTrinkets.Skill = SkillName.Mining;

            // Set the list of harvestable tiles
            treasuresAndTrinkets.Tiles = m_grassAndDirtTiles;

            // Players must be within 2 tiles to harvest
            treasuresAndTrinkets.MaxRange = 2;

            // One ore per harvest action
            treasuresAndTrinkets.ConsumedPerHarvest = 1;
            treasuresAndTrinkets.ConsumedPerFeluccaHarvest = 1;

            // The digging effect
            treasuresAndTrinkets.EffectActions = new int[]{ 11 };
            treasuresAndTrinkets.EffectSounds = new int[]{ 0x125, 0x126 };
            treasuresAndTrinkets.EffectCounts = new int[]{ 1 };
            treasuresAndTrinkets.EffectDelay = TimeSpan.FromSeconds( 1.6 );
            treasuresAndTrinkets.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );

            treasuresAndTrinkets.NoResourcesMessage = "You have already dug enough in this area.";
            treasuresAndTrinkets.DoubleHarvestMessage = "Someone has beaten you to the loot.";
            treasuresAndTrinkets.TimedOutOfRangeMessage = "You have moved too far away to continue digging.";
            treasuresAndTrinkets.OutOfRangeMessage = 500446; // That is too far away.
            treasuresAndTrinkets.FailMessage = "You dig into the ground, but find nothing interesting.";
            treasuresAndTrinkets.PackFullMessage = "Your pack is full, so you leave the finds behind.";
            treasuresAndTrinkets.ToolBrokeMessage = 1044038; // You have worn out your tool!

            res = new HarvestResource[]
                {
                    // Required skill, min skill, max skill, message, type(s)
                    new HarvestResource( 00.0, 00.0, 00.0, "You didn't find anything useful.", typeof( FertileDirt ) ),
                    new HarvestResource( 00.0, 00.0, 00.0, "You found a seed.", typeof( Seed ) )
                };

            veins = new HarvestVein[]
                {
                    // Chance, fallback chance, type, fallback type
                    new HarvestVein( 90.0, 00.0, res[0], null ),
                    new HarvestVein( 10.0, 00.0, res[1], null ) // Seed
                };

            treasuresAndTrinkets.Resources = res;
            treasuresAndTrinkets.Veins = veins;

            treasuresAndTrinkets.BonusResources = new BonusHarvestResource[] { };

            treasuresAndTrinkets.RandomizeVeins = true;

            Definitions.Add( treasuresAndTrinkets );
            #endregion
        }
開發者ID:jsrn,項目名稱:MidnightWatchServer,代碼行數:72,代碼來源:Treasure.cs

示例6: MutateVein

 public override HarvestVein MutateVein( Mobile from, Item tool, HarvestDefinition def, HarvestBank bank, object toHarvest, HarvestVein vein )
 {
     return base.MutateVein( from, tool, def, bank, toHarvest, vein );
 }
開發者ID:jsrn,項目名稱:MidnightWatchServer,代碼行數:4,代碼來源:Treasure.cs

示例7: Fishing

		private Fishing()
		{
			HarvestResource[] res;
			HarvestVein[] veins;

			#region Fishing
			HarvestDefinition fish = new HarvestDefinition();

			// Resource banks are every 8x8 tiles
			fish.BankWidth = 8;
			fish.BankHeight = 8;

			// Every bank holds from 5 to 15 fish
			fish.MinTotal = 5;
			fish.MaxTotal = 15;

			// A resource bank will respawn its content every 10 to 20 minutes
			fish.MinRespawn = TimeSpan.FromMinutes( 10.0 );
			fish.MaxRespawn = TimeSpan.FromMinutes( 20.0 );

			// Skill checking is done on the Fishing skill
			fish.Skill = SkillName.Fishing;

			// Set the list of harvestable tiles
			fish.Tiles = m_WaterTiles;
			fish.RangedTiles = true;

			// Players must be within 4 tiles to harvest
			fish.MaxRange = 4;

			// One fish per harvest action
			fish.ConsumedPerHarvest = 1;
			fish.ConsumedPerFeluccaHarvest = 1;

			// The fishing
			fish.EffectActions = new int[] { 12 };
			fish.EffectSounds = new int[0];
			fish.EffectCounts = new int[] { 1 };
			fish.EffectDelay = TimeSpan.Zero;
			fish.EffectSoundDelay = TimeSpan.FromSeconds( 8.0 );

			fish.NoResourcesMessage = 503172; // The fish don't seem to be biting here.
			fish.FailMessage = 503171; // You fish a while, but fail to catch anything.
			fish.TimedOutOfRangeMessage = 500976; // You need to be closer to the water to fish!
			fish.OutOfRangeMessage = 500976; // You need to be closer to the water to fish!
			fish.PackFullMessage = 503176; // You do not have room in your backpack for a fish.
			fish.ToolBrokeMessage = 503174; // You broke your fishing pole.

			res = new HarvestResource[]
				{
					new HarvestResource( 00.0, 00.0, 100.0, 1043297, typeof( Fish ) )
				};

			veins = new HarvestVein[]
				{
					new HarvestVein( 100.0, 0.0, res[0], null )
				};

			fish.Resources = res;
			fish.Veins = veins;

			fish.BonusResources = new BonusHarvestResource[]
				{
					new BonusHarvestResource( 20.0, 45.0, "You pull up a large, black oyster!", typeof( PearlOyster ) ),
					new BonusHarvestResource( 40.0, 10.0, "You pull up a bone shard!", typeof( BoneShards ) ),
					new BonusHarvestResource( 40.0, 10.0, "You pull up a rib cage!", typeof( RibCage ) ),
					new BonusHarvestResource( 65.0, 5.0, "You pull up a piece of silverware!", typeof( Fork ) ),
					new BonusHarvestResource( 65.0, 5.0, "You pull up a piece of silverware!", typeof( Spoon ) ),
					new BonusHarvestResource( 90.0, 5.0, "You pull up a bale of wire!", typeof( IronWire ) ),
					new BonusHarvestResource( 90.0, 5.0, "You pull up a bale of wire!", typeof( CopperWire ) ),
					new BonusHarvestResource( 95.0, 2.0, "You pull up a bale of wire!", typeof( GoldWire ) ),
					new BonusHarvestResource( 100.0, 0.10, "You pull up an oddly shaped key!", typeof( Server.Items.SkullKey ) ),
				};

			m_Definition = fish;
			Definitions.Add( fish );
			#endregion
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:78,代碼來源:Fishing.cs

示例8: Lumberjacking

        private Lumberjacking()
        {
            HarvestResource[] res;
            HarvestVein[] veins;

            #region Lumberjacking
            HarvestDefinition lumber = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            lumber.BankWidth = 4;
            lumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            lumber.MinTotal = 20;
            lumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            lumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            lumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            lumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            lumber.Tiles = m_TreeTiles;

            // Players must be within 2 tiles to harvest
            lumber.MaxRange = 2;

            // Ten logs per harvest action
            lumber.ConsumedPerHarvest = 10;
            lumber.ConsumedPerFeluccaHarvest = 20;

            // The chopping effect
            lumber.EffectActions = new int[] { 13 };
            lumber.EffectSounds = new int[] { 0x13E };
            lumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            lumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            lumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            lumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            lumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            lumber.OutOfRangeMessage = 500446; // That is too far away.
            lumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            lumber.ToolBrokeMessage = 500499; // You broke your axe.

            if (Core.ML)
            {
                res = new HarvestResource[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                    new HarvestResource(65.0, 25.0, 105.0, 1072541, typeof(OakLog)),
                    new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
                    new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog)),
                };

                veins = new HarvestVein[]
                {
                    new HarvestVein(49.0, 0.0, res[0], null), // Ordinary Logs
                    new HarvestVein(30.0, 0.5, res[1], res[0]), // Oak
                    new HarvestVein(10.0, 0.5, res[2], res[0]), // Ash
                    new HarvestVein(05.0, 0.5, res[3], res[0]), // Yew
                    new HarvestVein(03.0, 0.5, res[4], res[0]), // Heartwood
                    new HarvestVein(02.0, 0.5, res[5], res[0]), // Bloodwood
                    new HarvestVein(01.0, 0.5, res[6], res[0]), // Frostwood
                };

                lumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };
            }
            else
            {
                res = new HarvestResource[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 500498, typeof(Log))
                };

                veins = new HarvestVein[]
                {
                    new HarvestVein(100.0, 0.0, res[0], null)
                };
            }

            lumber.Resources = res;
            lumber.Veins = veins;

            lumber.RaceBonus = Core.ML;
            lumber.RandomizeVeins = Core.ML;

            this.m_Definition = lumber;
//.........這裏部分代碼省略.........
開發者ID:FreeReign,項目名稱:forkuo,代碼行數:101,代碼來源:Lumberjacking.cs

示例9: OnHarvestFinished

		public override void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
		{
			if ( tool is GargoylesPickaxe && def == m_OreAndStone && 0.1 > Utility.RandomDouble() )
			{
				HarvestResource res = vein.PrimaryResource;

				if ( res == resource && res.Types.Length >= 3 )
				{
					try
					{
						Map map = from.Map;

						if ( map == null )
							return;

						BaseCreature spawned = Activator.CreateInstance( res.Types[2], new object[]{ 25 } ) as BaseCreature;

						if ( spawned != null )
						{
							int offset = Utility.Random( 8 ) * 2;

							for ( int i = 0; i < m_Offsets.Length; i += 2 )
							{
								int x = from.X + m_Offsets[(offset + i) % m_Offsets.Length];
								int y = from.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];

								if ( map.CanSpawnMobile( x, y, from.Z ) )
								{
									spawned.MoveToWorld( new Point3D( x, y, from.Z ), map );
									spawned.Combatant = from;
									return;
								}
								else
								{
									int z = map.GetAverageZ( x, y );

									if ( map.CanSpawnMobile( x, y, z ) )
									{
										spawned.MoveToWorld( new Point3D( x, y, z ), map );
										spawned.Combatant = from;
										return;
									}
								}
							}

							spawned.MoveToWorld( from.Location, from.Map );
							spawned.Combatant = from;
						}
					}
					catch
					{
					}
				}
			}
		}
開發者ID:brodock,項目名稱:genova-project,代碼行數:55,代碼來源:Mining.cs

示例10: ClayMining

        private ClayMining()
		{
			HarvestResource[] res;
			HarvestVein[] veins;

            #region Mining for Clay
            HarvestDefinition Clay = m_Clay = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            Clay.BankWidth = 8;
            Clay.BankHeight = 8;

            // Every bank holds from 6 to 12 Clay
            Clay.MinTotal = 5;
            Clay.MaxTotal = 8;

            // A resource bank will respawn its content every 10 to 20 minutes
            Clay.MinRespawn = TimeSpan.FromMinutes(10.0);
            Clay.MaxRespawn = TimeSpan.FromMinutes(20.0);

            // Skill checking is done on the Mining skill
            Clay.Skill = SkillName.Mining;

            // Set the list of harvestable tiles
            Clay.Tiles = m_SwampTiles;

            // Players must be within 2 tiles to harvest
            Clay.MaxRange = 2;

            // One Clay per harvest action
            Clay.ConsumedPerHarvest = 1;
            Clay.ConsumedPerFeluccaHarvest = 1;

            // The digging effect
            Clay.EffectActions = new int[] { 11 };
            Clay.EffectSounds = new int[] { 0x125, 0x126 };
            Clay.EffectCounts = new int[] { 1 };
            Clay.EffectDelay = TimeSpan.FromSeconds(1.6);
            Clay.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            Clay.NoResourcesMessage = "There is no Clay here to mine."; // There is no Clay here to mine.
            Clay.DoubleHarvestMessage = "There is no Clay here to mine."; // There is no Clay here to mine.
            Clay.TimedOutOfRangeMessage = "You have moved too far away to continue mining."; // You have moved too far away to continue mining.
            Clay.OutOfRangeMessage = "That is too far away."; // That is too far away.
            Clay.FailMessage = "You dig for a while but fail to find any Clay."; // You dig for a while but fail to find any Clay.
            Clay.PackFullMessage = "Your backpack can't hold the Clay, and it is lost!"; // Your backpack can't hold the Clay, and it is lost!
            Clay.ToolBrokeMessage = 1044038; // You have worn out your tool!

            res = new HarvestResource[]
				{
                    new HarvestResource( 100.0, 85.0, 400.0, "You dig some Clay and put it in your backpack", typeof (Clay)),
				
				};

            veins = new HarvestVein[]
				{
                    new HarvestVein( 100.0, 0.0, res[0], null   ),//Clay
				};

            Clay.Resources = res;
            Clay.Veins = veins;

            Definitions.Add(Clay);
            #endregion
		}
開發者ID:FreeReign,項目名稱:imaginenation,代碼行數:65,代碼來源:ClayMining.cs

示例11: MutateResource

        public virtual HarvestResource MutateResource( Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc, HarvestVein vein, HarvestResource primary, HarvestResource fallback )
        {
            if ( vein.ChanceToFallback > Utility.RandomDouble() )
                return fallback;

            double skillValue = from.Skills[def.Skill].Value;

            if ( fallback != null && (skillValue < primary.ReqSkill || skillValue < primary.MinSkill) )
                return fallback;

            return primary;
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:12,代碼來源:HarvestSystem.cs

示例12: OnHarvestFinished

		public override void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
		{
			base.OnHarvestFinished( from, tool, def, vein, bank, resource, harvested );

			if( tool is YewAxe && def == m_Definition && 0.10 >= Utility.RandomDouble() )
			{
				HarvestResource res = vein.PrimaryResource;

				if( res == resource )
				{
					try
					{
						Map map = from.Map;

						if( map == null || map == Map.Internal )
							return;

						BaseCreature spawned = Activator.CreateInstance( typeof( Reaper ) ) as BaseCreature;

						if( spawned != null )
						{
							int offset = Utility.Random( 4 ) * 2;

							for( int i = 0; i < m_Offsets.Length; i++ )
							{
								int x = from.X + m_Offsets[(offset + i) % m_Offsets.Length];
								int y = from.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
								int z = (map.CanSpawnMobile( x, y, from.Z ) ? from.Z : map.GetAverageZ( x, y ));

								if( !map.CanSpawnMobile( x, y, z ) )
								{
									x = from.X;
									y = from.Y;
									z = from.Z;
								}

								if( map.CanSpawnMobile( x, y, z ) )
								{
									spawned.OnBeforeSpawn( new Point3D( x, y, z ), map );
									spawned.MoveToWorld( new Point3D( x, y, z ), map );
									spawned.Combatant = from;

									from.SendMessage( "You have awoken a spirit tree!" );
									break;
								}
							}
						}
					}
					catch { }
				}
			}
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:52,代碼來源:Lumberjacking.cs

示例13: Lumberjacking

		private Lumberjacking()
		{
			HarvestResource[] res;
			HarvestVein[] veins;

			#region Lumberjacking
			HarvestDefinition lumber = new HarvestDefinition();

			// Resource banks are every 4x3 tiles
			lumber.BankWidth = 4;
			lumber.BankHeight = 3;

			// Every bank holds from 20 to 45 logs
			lumber.MinTotal = 20;
			lumber.MaxTotal = 45;

			// A resource bank will respawn its content every 20 to 30 minutes
			lumber.MinRespawn = TimeSpan.FromMinutes( 20.0 );
			lumber.MaxRespawn = TimeSpan.FromMinutes( 30.0 );

			// Skill checking is done on the Lumberjacking skill
			lumber.Skill = SkillName.Lumberjacking;

			// Set the list of harvestable tiles
			lumber.Tiles = m_TreeTiles;

			// Players must be within 2 tiles to harvest
			lumber.MaxRange = 2;

			// Ten logs per harvest action
			lumber.ConsumedPerHarvest = 10;
			lumber.ConsumedPerFeluccaHarvest = 20;

			// The chopping effect
			lumber.EffectActions = new int[]{ 13 };
			lumber.EffectSounds = new int[]{ 0x13E };
			lumber.EffectCounts = new int[]{ 1, 2, 2, 2, 3 };
			lumber.EffectDelay = TimeSpan.FromSeconds( 1.6 );
			lumber.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );

			lumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
			lumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
			lumber.OutOfRangeMessage = 500446; // That is too far away.
			lumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
			lumber.ToolBrokeMessage = 500499; // You broke your axe.

			res = new HarvestResource[]
				{
					new HarvestResource( 00.0, 00.0, 100.0, 500498, typeof( Log ) )
				};

			veins = new HarvestVein[]
				{
					new HarvestVein( 100.0, 0.0, res[0], null )
				};

			lumber.Resources = res;
			lumber.Veins = veins;

			m_Definition = lumber;
			Definitions.Add( lumber );
			#endregion
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:63,代碼來源:Lumberjacking.cs

示例14: NecroReagentGathering

		private NecroReagentGathering()
		{
			HarvestResource[] res;
			HarvestVein[] veins;

			#region NecroReagentGathering
			HarvestDefinition reagent = new HarvestDefinition();

			// Resource banks are every 4x3 tiles
			reagent.BankWidth = 2;
			reagent.BankHeight = 2;

			// Every bank holds from 20 to 45 logs
			reagent.MinTotal = 0;
			reagent.MaxTotal = 4;

			// A resource bank will respawn its content every 20 to 30 minutes
			reagent.MinRespawn = TimeSpan.FromMinutes( 20.0 );
			reagent.MaxRespawn = TimeSpan.FromMinutes( 40.0 );

			// Skill checking is done on the Magery skill
			reagent.Skill = SkillName.Necromancy;

			// Set the list of harvestable tiles
			reagent.Tiles = m_TreeTiles;

			// Players must be within 2 tiles to harvest
			reagent.MaxRange = 3;

			// Ten logs per harvest action
			reagent.ConsumedPerHarvest = 1;
			reagent.ConsumedPerFeluccaHarvest = 1;

			// The chopping effect
			reagent.EffectActions = new int[]{ 13 };
			reagent.EffectSounds = new int[]{ 0x13E };
			reagent.EffectCounts = new int[]{ 1, 2 };
			reagent.EffectDelay = TimeSpan.FromSeconds( 1.3 );
			reagent.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );

			reagent.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
			reagent.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
			reagent.OutOfRangeMessage = 500446; // That is too far away.
			reagent.PackFullMessage = 500497; // You can't place any wood into your backpack!
			reagent.ToolBrokeMessage = 500499; // You broke your axe.

			res = new HarvestResource[]
				{
                    // NUMBERS BELOW ARE...
                    // 1st Required Skill Needed
                    // 2nd Min Skill Needed
                    // 3rd Max Skill Needed
                    // 4th Success Message CLI No

				new HarvestResource( 000.0, 000.0, 010.0, "You put some Kindling in your backpack",		typeof( Kindling ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Grave Dust in your backpack",		typeof( GraveDust ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Daemon Blood in your backpack",		typeof( DaemonBlood ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Nox Crystal in your backpack",		typeof( NoxCrystal  ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Pig Iron Root in your backpack",		typeof( PigIron ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Bat Wing  in your backpack",		typeof( BatWing ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Grave Dust in your backpack",		typeof( GraveDust ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Daemon Blood in your backpack",		typeof( DaemonBlood ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Nox Crystal in your backpack",		typeof( NoxCrystal ) ),
				new HarvestResource( 50.0, 50.0, 50.0, "You put some Pig Iron in your backpack",		typeof( PigIron ) )
				};

			veins = new HarvestVein[]
				{
                    // NUMBERS BELOW ARE...
                    // 1ST Vein Chance
                    // 2ND Chance To Fallback
                    // 3RD Primary Resource
                    // 4TH Fallback Resource
				new HarvestVein( 10.0, 0.0, res[0], null ), 	// Kindling
				new HarvestVein( 10.0, 0.2, res[1], res[0] ), 	// GraveDust
				new HarvestVein( 10.0, 0.2, res[2], res[0] ), 	// DaemonBlood
				new HarvestVein( 10.0, 0.2, res[3], res[0] ), 	// NoxCrystal
				new HarvestVein( 10.0, 0.2, res[4], res[0] ), 	// MandrakeRoot
				new HarvestVein( 10.0, 0.2, res[5], res[0] ), 	// PigIron
				new HarvestVein( 10.0, 0.2, res[6], res[0] ), 	// BatWing 
				new HarvestVein( 10.0, 0.2, res[7], res[0] ), 	// DaemonBlood
				new HarvestVein( 10.0, 0.2, res[8], res[0] ), 	// NoxCrystal
				new HarvestVein( 10.0, 0.2, res[9], res[0] )	// PigIron 
			};

			reagent.Resources = res;
			reagent.Veins = veins;

			m_Definition = reagent;
			Definitions.Add( reagent );
			#endregion
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:92,代碼來源:NecroReagentGathering.cs

示例15: Mining

        private Mining()
        {
            HarvestResource[] res;
            HarvestVein[] veins;

            #region Mining for ore and stone
            HarvestDefinition oreAndStone = m_OreAndStone = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            oreAndStone.BankWidth = 4;
            oreAndStone.BankHeight = 4;

            // Every bank holds from 10 to 34 ore
            oreAndStone.MinTotal = 8;
            oreAndStone.MaxTotal = 25;

            // A resource bank will respawn its content every 10 to 20 minutes
            oreAndStone.MinRespawn = TimeSpan.FromMinutes( 10.0 );
            oreAndStone.MaxRespawn = TimeSpan.FromMinutes( 20.0 );

            // Skill checking is done on the Mining skill
            oreAndStone.Skill = SkillName.Mining;

            // Set the list of harvestable tiles
            oreAndStone.Tiles = m_MountainAndCaveTiles;

            // Players must be within 2 tiles to harvest
            oreAndStone.MaxRange = 2;

            // One ore per harvest action
            oreAndStone.ConsumedPerHarvest = 1;
            oreAndStone.ConsumedPerFeluccaHarvest = 1;

            // The digging effect
            oreAndStone.EffectActions = new int[]{ 11 };
            oreAndStone.EffectSounds = new int[]{ 0x125, 0x126 };
            oreAndStone.EffectCounts = new int[]{ 1 };
            oreAndStone.EffectDelay = TimeSpan.FromSeconds( 1.6 );
            oreAndStone.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );

            oreAndStone.NoResourcesMessage = 503040; // There is no metal here to mine.
            oreAndStone.DoubleHarvestMessage = 503042; // Someone has gotten to the metal before you.
            oreAndStone.TimedOutOfRangeMessage = 503041; // You have moved too far away to continue mining.
            oreAndStone.OutOfRangeMessage = 500446; // That is too far away.
            oreAndStone.FailMessage = 503043; // You loosen some rocks but fail to find any useable ore.
            oreAndStone.PackFullMessage = 1010481; // Your backpack is full, so the ore you mined is lost.
            oreAndStone.ToolBrokeMessage = 1044038; // You have worn out your tool!

            res = new HarvestResource[]
                {
                    new HarvestResource( 00.0, 00.0, 50.0, 1007075, typeof( CopperOre ),		typeof( Coal ),				typeof( Bat ) ),
                    new HarvestResource( 00.0, 00.0, 50.0, 1007073, typeof( TinOre ),			typeof( Granite ),			typeof( Bat ) ),
                    new HarvestResource( 60.0, 40.0, 100.0, 1007072, typeof( IronOre ),			typeof( Granite ),			typeof( Bat ) ),
                    new HarvestResource( 85.0, 50.0, 100.0, 1007078, typeof( SilverOre ),		typeof( Granite ),			typeof( Bat ) ),
                    new HarvestResource( 95.0, 55.0, 100.0, 1007077, typeof( GoldOre ),			typeof( Granite ),			typeof( Bat ) ),

                };

            veins = new HarvestVein[]
                {
                    new HarvestVein( 45.0, 0.5, res[0], res[0] ),  // Copper
                    new HarvestVein( 30.0, 0.5, res[1], res[0] ),  // Tin
                    new HarvestVein( 24.0, 0.5, res[2], res[0] ),  // Iron
                    new HarvestVein( 0.9, 0.5, res[3], res[0] ),   // Silver
                    new HarvestVein( 0.1, 0.5, res[4], res[0] ),   // Gold
                };

            oreAndStone.Resources = res;
            oreAndStone.Veins = veins;

            Definitions.Add( oreAndStone );
            #endregion

            #region Mining for sand
            HarvestDefinition sand = m_Sand = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            sand.BankWidth = 2;
            sand.BankHeight = 2;

            // Every bank holds from 6 to 12 sand
            sand.MinTotal = 10;
            sand.MaxTotal = 18;

            // A resource bank will respawn its content every 10 to 20 minutes
            sand.MinRespawn = TimeSpan.FromMinutes( 10.0 );
            sand.MaxRespawn = TimeSpan.FromMinutes( 20.0 );

            // Skill checking is done on the Mining skill
            sand.Skill = SkillName.Mining;

            // Set the list of harvestable tiles
            sand.Tiles = m_SandTiles;

            // Players must be within 2 tiles to harvest
            sand.MaxRange = 2;

            // One sand per harvest action
            sand.ConsumedPerHarvest = 1;
            sand.ConsumedPerFeluccaHarvest = 1;
//.........這裏部分代碼省略.........
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:101,代碼來源:Mining.cs


注:本文中的Server.Engines.Harvest.HarvestVein類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。