RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

V2.0 Resources Starter (Ore/Leather/Wood/Granite/Boards/Logs/Crystals)

FingersMcSteal

Sorceror
V2.0 Resources Starter (Ore/Leather/Wood/Granite/Boards/Logs/Crystals)

Update 27(pm)/06/2006(7th file):
Added a few more things, this will probably be last update for a while until i've checked a few things out. Seems some of the files release in RC1 version need some attention but i've repaired things like the back to front elven wash basin i had :)

Updates:
The main change is the new folder 'CraftableAddons'.
Main changes are in the carpentry addon's being able to take the wood hues.
Added a couple of items into the Maisonary crafts (Thanks to the person who created the addon's, do more and i'll add them).
Two addon items added to Furniture in the menus, again, thanks to the person who created these, sorry can't remember names right now.

Same procedure as before, un-zip it all into the scripts folders and remove the same named distro files for this to work.

**************************************************

Update 27/06/2006(6th file):
*EDIT* Forgot to mention, Runic Hammers & Sewingkits for the new resources are in via the bods now.

Added a couple of things in the 6th file...

Powder Crafting:
New resource added, Powder/Essence of Wind.
The system resource is defined as powder in oreinfo.cs, the item labels are using 'Essence of wind' Cliloc numbers, theres no Cliloc number for just 'powder', so i thought Wind=Dust, Dust=powder... you get the idea (hopes).
The Alchemist Vendors SBAlchemist.cs file sells the Powder Crafting Manual (Tool).
The idea for the powders was to be dyes etc etc, theres a couple to get you started in the craft menu so you get the general idea.
You need to add the powders into which ever files you want to get them to drop in your shard (loot drops etc etc).

Bowfletching:
Altered the standard bowfletching definition to include the new woods.
Now when you craft bows or crossbows etc etc from the craft menus, if your using one of the added wood types (frostwood for example), your bow will pick up the Damage type off the resource (I.E. frostwood gives 100% Cold Damage, plus the luck which comes with that resource).
These can be changed in the oreinfo.cs file if you want.

Alchemy:
The Craft definition now has some of the elements of the 'Lost Alchemy' added to the standard menu under the name 'Druids Chemistry'.
I'd like to thank the maker of the lost alchemy package as your original idea was the main reason i've added it to the normal alchemy menu.
I've only added the potions i wanted, you could add others if you like without too much of a problem.
The potion kegs will show a percentage as to how full the kegs are now, i'm planning to maybe change the keg code soon (Not 100% happy with it at the mo but it's in for the moment).

**************************************************

Update 22/06/2006(5th file):
The bod book search is now in for custom ores and leathers.

BOD Filters:
Just another alteration, i've added the custom Ingot & Leather types to the bod book filters, so now if you have bods in the books your able to search through for the resource you want.

**************************************************

Update 22/06/2006(4th file):
The latest addition is now BOD's (Bulk Order Deeds)
Same as before, just un-zip into the script's folder and REMOVE the original files as before to get it to compile.

If you've already added this to your server just un-zip it, the directory structures the same so it should just replace the files from the 3rd set and add the 'Bods&Runics' folder. (Remember to remove the distro files for the BOD system) and you should be good to go.

It works the same way as the normal BOD system (looks the same, works the same) but adds all of the extra ingots & leathers into the standard BOD code, so now you'll have Runic Hammers past Valorite & Runic Sewing kits past Barbed leather.

I've made 2 vendor changes, the Blacksmith & Tailor.
Changed the BOD times to 5, 10 & 15 minutes (depending on skill points), so theres at the most a 15 minute wait until you can do another BOD.

BOD Book:
The BOD book can display the correct resource for each bod in the book.
The sort code for the BOD book has not been changed (On the To Do list).
All this will mean is the bod book filters will only sort and search for the standard ingot & leather types right now but will allow you to put the bods into the books or remove them.

Any problems, post in script support and i'll try to help out...Enjoy.

**************************************************

Update 19/06/2006(3rd file):
I've added the crystal craft code to it now.
The same procedure as before, just download and unzip the contents into the RunUO 2.0 scripts folder, just make sure you remove the old files from your scripts folder (TO A SAFE LOCATION RATHER THAN DELETE) which have the same names to get it working.

Crystals Harvesting:
To use it you'll have to have a crystal hammer in your hand and be next to a big green crystal (The one's in the crystal fens as an example). It's based on the same way lumberjacking works, click tool and aim at the big crystals tho. The crystal hammers can be obtained with the [add crystalpickaxe command or added to your server which ever way you want, vendors or loot drops.
The Alchemy skill is required to harvest crystals.

Crystal Tool Box:
The crystal crafting tool box will work in much the same way as the normal tools and menu's. Same as above to obtain one, [add crystaltoolkit or you can add them to a vendors list of items for sale if you want.
The crystal craft menu layout is the same as the standard craft menus with the option to select which type of crystal you want to craft with, much like selecting the type of ore in the blacksmithing menu's.
One thing you will notice, the craft menu is blank (no items to craft), this was done to allow shard admins to create their own items to be used on this menu, to add your items open the defcrystalcrafting.cs in the craftdef folder and add your items in there.

Additional info:
I'll be adding to this system as it's the basis of the one i use on my shard, when theres enough added to the RunUO 2.0 version i'll put another update on. I'm currently doing alterations to the standard runic code (bod system too) in order to allow the additional resources to be used with runics too so once thats finished and had some testing i'll also drop that in. In addition to runics, i'm working on making the scales a worth while resource to use or collect too and have plans to change the scale armours too, again that will be added to the updates when there in and working.

I hope some find it useful and although theres better systems out there i thought i'd share this one... enjoy.

**************************************************

I've decided to drop this in if people wanted some custom resources for there new RunUO 2.0 Shards.

Included in the ZIP file are the following resources...

20 Ores (inluding the normals, all granite types to go with them too)
7 Leathers (4 normal plus 3 new extra types)
Scales are the same, not touched those yet
Logs... Normal, Oak, Ash, Yew, Heartwood, Bloodwood, Frostwood (Boards are here to go with them too)
20 New Crystal Types (This is an extra which i use on my own shard for crafting)

I've started to move some of my own custom items across to the v2.0 platform so i've decided to drop these on here if anyone wants to use them for there own shards. All you'll get with these are the items on to your v2.0 server, how you choose to use them i'll leave that up to you.

Things like the ore's, logs & Boards are all stackable, the hides for the leathers work in the same way and cut up into the leathers too. If you want them to drop in loot packs etc etc, you'll have to add them yourself, basically this is a resource pack which seems ok on the v2.0 server core. I've only done limited testing since i have alot of work ahead to get other scripts into v2.0 format for my own shard. If you require help please try to use the script section of the site and not in here, thats the right place for questions anyways.

In the ZIP file you will find the following files...

Board.cs
Crystals.cs
Granite.cs
Hides.cs
Ingots.cs
Leathers.cs
Log.cs
Ore.cs
OreInfo.cs

TO INSTALL THESE... You will have to REMOVE the same files from the v2.0 server folders and unzip these files into the script folder in the v2.0 server.

I'll probably add more of the resource & harvest files once i get those into the RunUO 2.0 format.

Hope someone finds them helpful.
 

Attachments

  • V2 Resources (6th).zip
    226.4 KB · Views: 244
  • V2 Resources 7th.zip
    251.6 KB · Views: 368

FingersMcSteal

Sorceror
Because it's from my own shard which is v1.0, it's just been moved to work in v2.0 and i never wrote the code for a runic wood tool.

If you read it i did say it's up to you how you wanted to use this, this only adds a few extra resources, you want runics... start codin :)
 

Karmageddon

Sorceror
Well Fingers I can use the wood part since you have the regular OSI woods. Which I do not have atm, I can add them into my resource package once I figure out what the problem with the logs are.
 

FingersMcSteal

Sorceror
Can you tell me the problem with your logs ?

I'm working on the conversion on the lumberjacking to get the frostwood, but on my shard i had like a wood element too for each wood type (Bit like a gargoyle pick axe idea which worked with the axe), wasn't sure if anyone wanted this part, but i'll post it once i get it working (Just busy with work at the mo, so i just got back in the house).

The 'DefCarpentry.cs' aint been changed just yet to allow the other woods and colours to crafted items so i'll be working on that today, hoping to post that sometime today tho.
 

FingersMcSteal

Sorceror
This has a few more changes in it this time...

Lumberjacking...
Lumberjacking now cuts all the woods off the trees Up to frostwood depending on skill.
Also it spawns Tree Fellow Elementals from the trees Randomly.
Carpentry menu has the new woods and also retains the wood colours on crafted items.
One thing i'm not happy with is the logs to boards idea i had but it's there so you can make the boards for each wood, sorry it's just one log at a time tho (maybe macro crafters will be ok). I did have plans for a saw mill addon later.

Granites...
All the granites are in on the Stonecrafting menus, and it retains the colours on crafted items.

Armour & Weapons...
The basearmour & baseweapon files are the new RunUO 2.0 files with the usual changes in to reflect the material names on your crafted armour & weapons.

Tailoring...
The tailor craft menu has the extra leathers in the menus now, also retains the leather colours on crafted items.

Mining...
Working and can dig up the new ores and granites, also done the prospector tool to work with the new ores.

This time i've zipped it so it creates the folders (Doh... i overlooked this the last time). Same as before, just replace the distro's with these files and you should be ok.

The leathers & ores were already setup to give as much of a balanced spread of resists and weapon stats etc etc, if you want to alter them for better armor & weapon stats there setup through the oreinfo.cs file.

I would have put this in the first post as an edit & update, but i'm at a loss about how to do that... couldn't see any options for the file so i've posted it here again in a ZIP file.
 

Attachments

  • V2 Resources 2nd.zip
    111.3 KB · Views: 105

Lifegranter

Sorceror
Hey, I think there was a problem with the mining special ores system. It seems you can mine them, but if you wanted to do anything with the new ingots, you couldn't. In the blacksmithy gump, there is no choice to work with any of the custom ores.
 

Devarious

Wanderer
A word of advice.

Do NOT -DELETE-the ORIGINAL distro files! -DO NOT!-

Backup. The. Files. -NEVER DELETE/OVERWRITE THEM!-

That tends to.. *Cough* cause alot of problems, and ALOT of time extracting the basic files and all...

Never...... delete the original distros, and never overwrite them. Thats just a sign for disaster. :p
 

FingersMcSteal

Sorceror
Lifegranter said:
Hey, I think there was a problem with the mining special ores system. It seems you can mine them, but if you wanted to do anything with the new ingots, you couldn't. In the blacksmithy gump, there is no choice to work with any of the custom ores.

It should be ok now, the first set of files only added resources to the system so shard admins/scripters could use them if they wanted to.

Most of the additions in the 3rd set of files are like this too for the crystal crafting side of it, it's like a blank setup type of thing, all you have to do is use it to create new items if you wanted to.

I've done the scripts to allow users to have the ability to dig the crystals up, it's up to you to decide what items you'd like in there or you could always wait until i've added more to it and get the next updates.

It was done this way so if you did use this resource system all the normal stuff was still in and avaliable in the normal ways, but you always have the option to use the additional resources if you wanted it.

Kind of a thing for people who are new to scripting to mess with, saying that i'll be adding to it myself and releasing the extra things as i go along plus when i do add to it i'll just keep it in the same format so it should just replace the files with the newer versions each time it's un-zipped and carry on working as before. (Famous last words).
 

Vhaerun

Sorceror
Looks great. I'm just wondering, though, is the crystal harvesting completely seperate? Can it be updated by itself without going through and modifying the distro files such as ore.cs and oreinfo.cs?

Suppose I'll probably find out, but thought I'd ask since you probably know better than I would.
 

FingersMcSteal

Sorceror
It works in much the same way as the normal crafting definitions, the crystals have been added as a resource through the oreinfo.cs file, so no it's not a stand alone extra unfortuantly, it will need those edited resource files to work but i think i understand what your getting at, which would have been good if it would work that way.

Saying that, the crystals.cs file is the main file which holds the BaseCrystal code in it (and the 20 crystal types or items) so this could in theory be stripped out of the zip file on it's own and dropped into a servers script folder if you wanted just the crystals (just like adding a new item to a server) for something else, but if you want to craft with them you'd need them to go through the oreinfo.cs file for the craft system to work with them.

It's a bit like the lost alchemy, if you've notice with those potions you can't put them into the potion kegs (maybe thats changed now tho), unless you send them into the main potion system and make them work the way the normal ones do.

I've gone this way with it to keep some form of a standard feel to it so players can pick up on how it works without too much explaining, but it's always something for me to consider (the standalone approach).
 

Vhaerun

Sorceror
I've actually got it (somewhat) working with a different OWL system, and everything compiles, but I'm having a difficult time in actually mining the crystals. Malas is a little screwed up, but I have some static crystals in other places for testing and when I try to use the crystal pickaxe on it, I get the message "You Can't harvest that."

I had to modify the pickaxe itself a bit to fit the shard. Went through oreinfo, craftitem, and harvesttarget to make sure everything worked through those, but still can't get the harvesting done. I know they've been modified from the original, but you might be able to see what the problem is easier than I could.

(crystalgathering.cs)

Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Targeting;

// from.SendLocalizedMessage(500422); // You can't work on that item. // You can't use an axe on that.
// (502641); // You must equip this item to use it.

namespace Server.Engines.Harvest
{
	public class CrystalGathering : HarvestSystem
	{
		private static CrystalGathering m_System;

		public static CrystalGathering System
		{
			get
			{
				if ( m_System == null )
					m_System = new CrystalGathering();

				return m_System;
			}
		}

		// private HarvestDefinition m_Definition;
        private HarvestDefinition m_Crystals;

        public HarvestDefinition Crystals
        {
            get { return m_Crystals; }
        }

		// public HarvestDefinition Definition
		// {
        //    get { return m_Crystals; }
		// }

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

            #region CrystalGathering
            // HarvestDefinition crystals = new HarvestDefinition();
            HarvestDefinition crystals = m_Crystals = new HarvestDefinition();

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

			// Every bank holds from 20 to 45 logs
            crystals.MinTotal = 10;
            crystals.MaxTotal = 150;

			// A resource bank will respawn its content every 20 to 30 minutes
            crystals.MinRespawn = TimeSpan.FromMinutes(5.0);
            crystals.MaxRespawn = TimeSpan.FromMinutes(10.0);

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

			// Set the list of harvestable tiles
            crystals.Tiles = m_CrystalTiles;

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

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

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

            crystals.NoResourcesMessage = 500333; // You are to weary to discern anything useful. //  There's not enough wood here to harvest.
            crystals.FailMessage = 1072558; // The crystal patterns shift dramatically!
            crystals.OutOfRangeMessage = 500446; // That is too far away.
            crystals.PackFullMessage = 502868; // Your backpack is too full. // You can't place any wood into your backpack!
            crystals.ToolBrokeMessage = 1005152; // something broke SEVERELY!!!! // 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( 00.0, 05.0, 040.0, ( string.Format( "You chip away some Normal Crystal and put it in your bag" )),         typeof( Crystal ),          typeof ( CrystalElemental) ),
                    new HarvestResource( 02.5, 10.0, 045.0, ( string.Format( "You chip away some Amazonite Crystal and put it in your bag" )),      typeof( AmazoniteCrystal ), typeof ( AmazoniteCrystalElemental) ),
                    new HarvestResource( 05.0, 15.0, 050.0, ( string.Format( "You chip away some Amber Crystal and put it in your bag" )),          typeof( AmberCrystal ),     typeof ( AmberCrystalElemental) ),
                    new HarvestResource( 10.0, 20.0, 055.0, ( string.Format( "You chip away some Amethyst Crystal and put it in your bag" )),       typeof( AmethystCrystal ),  typeof ( AmethystCrystalElemental) ),
                    new HarvestResource( 15.0, 25.0, 060.0, ( string.Format( "You chip away some Aragonite Crystal and put it in your bag" )),      typeof( AragoniteCrystal ), typeof ( AragoniteCrystalElemental) ),
                    new HarvestResource( 20.0, 30.0, 065.0, ( string.Format( "You chip away some Bixbite Crystal and put it in your bag" )),        typeof( BixbiteCrystal ),   typeof ( BixbiteCrystalElemental) ),
                    new HarvestResource( 25.9, 35.0, 070.0, ( string.Format( "You chip away some Feetite Crystal and put it in your bag" )),     typeof( FeetiteCrystal ),    typeof ( FeetiteCrystalElemental) ),
                    new HarvestResource( 30.0, 40.0, 075.0, ( string.Format( "You chip away some Calcite Crystal and put it in your bag" )),        typeof( CalciteCrystal ),   typeof ( CalciteCrystalElemental) ),
                    new HarvestResource( 35.0, 45.0, 080.0, ( string.Format( "You chip away some GoldStone Crystal and put it in your bag" )),      typeof( GoldStoneCrystal ), typeof ( GoldStoneCrystalElemental) ),
                    new HarvestResource( 40.0, 50.0, 085.0, ( string.Format( "You chip away some Labradorite Crystal and put it in your bag" )),    typeof( LabradoriteCrystal ),   typeof ( LabradoriteCrystalElemental) ),
                    new HarvestResource( 45.0, 55.0, 090.0, ( string.Format( "You chip away some Moldavite Crystal and put it in your bag" )),      typeof( MoldaviteCrystal ),     typeof ( MoldaviteCrystalElemental) ),
                    new HarvestResource( 50.0, 60.0, 095.0, ( string.Format( "You chip away some Morganite Crystal and put it in your bag" )),      typeof( MorganiteCrystal ), typeof ( MorganiteCrystalElemental) ),
                    new HarvestResource( 55.0, 65.0, 100.0, ( string.Format( "You chip away some Quartz Crystal and put it in your bag" )),         typeof( QuartzCrystal ),    typeof ( QuartzCrystalElemental) ),
                    new HarvestResource( 60.0, 70.0, 105.0, ( string.Format( "You chip away some Rhodonite Crystal and put it in your bag" )),      typeof( RhodoniteCrystal ), typeof ( RhodoniteCrystalElemental) ),
                    new HarvestResource( 65.0, 75.0, 110.0, ( string.Format( "You chip away some Ruby Crystal and put it in your bag" )),           typeof( RubyCrystal ),      typeof ( RubyCrystalElemental) ),
                    new HarvestResource( 70.0, 80.0, 115.0, ( string.Format( "You chip away some Sapphire Crystal and put it in your bag" )),       typeof( SapphireCrystal ),  typeof ( SapphireCrystalElemental) ),
                    new HarvestResource( 75.0, 85.0, 120.0, ( string.Format( "You chip away some Sapphire Crystal and put it in your bag" )),       typeof( SugiliteCrystal ),  typeof ( SugiliteCrystalElemental) ),
                    new HarvestResource( 80.0, 90.0, 125.0, ( string.Format( "You chip away some Tanzanite Crystal and put it in your bag" )),      typeof( TanzaniteCrystal ), typeof ( TanzaniteCrystalElemental) ),
                    new HarvestResource( 85.0, 95.0, 130.0, ( string.Format( "You chip away some Turquoise Crystal and put it in your bag" )),      typeof( TurquoiseCrystal ), typeof ( TurquoiseCrystalElemental) ),
                    new HarvestResource( 90.0, 99.0, 135.0, ( string.Format( "You chip away some Varisite Crystal and put it in your bag" )),       typeof( VarisiteCrystal ),  typeof ( VarisiteCrystalElemental) )
				};

			veins = new HarvestVein[]
				{
                    // NUMBERS BELOW ARE...
                    // 1ST Vein Chance
                    // 2ND Chance To Fallback
                    // 3RD Primary Resource
                    // 4TH Fallback Resource

					new HarvestVein( 36.0, 0.0, res[0], null   ),
                    new HarvestVein( 20.0, 0.2, res[1], res[0] ),
                    new HarvestVein( 10.0, 0.2, res[2], res[0] ),
                    new HarvestVein( 05.0, 0.2, res[3], res[0] ),
                    new HarvestVein( 04.0, 0.2, res[4], res[0] ),
                    new HarvestVein( 04.0, 0.2, res[5], res[0] ),
                    new HarvestVein( 03.0, 0.2, res[6], res[0] ),
                    new HarvestVein( 03.0, 0.2, res[7], res[0] ),
                    new HarvestVein( 03.0, 0.2, res[8], res[0] ),
                    new HarvestVein( 03.0, 0.2, res[9], res[0] ),
                    new HarvestVein( 02.0, 0.2, res[10], res[0] ),
                    new HarvestVein( 02.0, 0.2, res[11], res[0] ),
                    new HarvestVein( 02.0, 0.2, res[12], res[0] ),
                    new HarvestVein( 01.0, 0.2, res[13], res[0] ),
                    new HarvestVein( 01.0, 0.2, res[14], res[0] ),
                    new HarvestVein( 00.0, 0.2, res[15], res[0] ),
                    new HarvestVein( 00.4, 0.2, res[16], res[0] ),
                    new HarvestVein( 00.3, 0.2, res[17], res[0] ),
                    new HarvestVein( 00.2, 0.2, res[18], res[0] ),
                    new HarvestVein( 00.1, 0.2, res[19], res[0] ),
				};

            crystals.Resources = res;
            crystals.Veins = veins;

            // m_Definition = crystals;
            Definitions.Add(crystals);
			#endregion
		}

        // ADDED FOR THE ELLIES
        public override Type GetResourceType(Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc, HarvestResource resource)
        {
            if (def == m_Crystals)
            {
                if (from is PlayerMobile && from.Skills[SkillName.Alchemy].Base >= 100.0 && 0.1 > Utility.RandomDouble())
                    return resource.Types[1];

                return resource.Types[0];
            }

            return base.GetResourceType(from, tool, def, map, loc, resource);
        }

        public override bool CheckHarvest(Mobile from, Item tool)
        {
            if (!base.CheckHarvest(from, tool))
                return false;

            if (from.Mounted)
            {
                from.SendLocalizedMessage(501864); // You can't mine while riding.
                return false;
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(501865); // You can't mine while polymorphed.
                return false;
            }

            return true;
        }

        public override void SendSuccessTo(Mobile from, Item item, HarvestResource resource)
        {
            if (item is BaseGranite)
                from.SendLocalizedMessage(1044606); // You carefully extract some workable stone from the ore vein!
            else
                base.SendSuccessTo(from, item, resource);
        }

        public override bool CheckHarvest(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
        {
            if (!base.CheckHarvest(from, tool, def, toHarvest))
                return false;

            // if (def == m_Sand && !(from is PlayerMobile && from.Skills[SkillName.Mining].Base >= 100.0 && ((PlayerMobile)from).SandMining))
            // {
            //     OnBadHarvestTarget(from, tool, toHarvest);
            //    return false;
            // }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(501864); // You can't mine while riding.
                return false;
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(501865); // You can't mine while polymorphed.
                return false;
            }

            return true;
        }

        public override HarvestVein MutateVein(Mobile from, Item tool, HarvestDefinition def, HarvestBank bank, object toHarvest, HarvestVein vein)
        {
            if (tool is CrystalPickaxe && def == m_Crystals)
            {
                int veinIndex = Array.IndexOf(def.Veins, vein);

                if (veinIndex >= 0 && veinIndex < (def.Veins.Length - 1))
                    return def.Veins[veinIndex + 1];
            }

            return base.MutateVein(from, tool, def, bank, toHarvest, vein);
        }

        private static int[] m_Offsets = new int[]
			{
				-1, -1,
				-1,  0,
				-1,  1,
				 0, -1,
				 0,  1,
				 1, -1,
				 1,  0,
				 1,  1
			};

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

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

                        if (map == null)
                            return;

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

                        if (spawned != null)
                        {
                            int offset = Utility.Random(8) * 2; // THIS WAS SET TO 8 NOT 14

                            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
                    {
                    }
                }
            }
        }

        public override bool BeginHarvesting(Mobile from, Item tool)
        {
            if (!base.BeginHarvesting(from, tool))
                return false;

            // from.SendLocalizedMessage(503033); // Where do you wish to dig?
            from.SendMessage(62, "Which crystal do you wish to work on ?");
            return true;
        }

             public override void OnBadHarvestTarget(Mobile from, Item tool, object toHarvest)
        {
            if (toHarvest is LandTarget)
                // from.SendLocalizedMessage(501862); // You can't mine there.
                from.SendMessage(32, "You can't harvest there.");
            else
                //from.SendLocalizedMessage(501863); // You can't mine that.
                from.SendMessage(32, "You Can't harvest that.");
        }

		#region Tile lists
		private static int[] m_CrystalTiles = new int[]
			{
                0x6206, 0x6207, 0x6208, 0x6209, 0x620A, 0x620B, 0x620C, 0x620D,
                0x620E, 0x6210, 0x6211, 0x6212, 0x6213, 0x6214, 0x6215, 0x6216,
                0x6217, 0x6218, 0x621A, 0x621B, 0x621C, 0x621D, 0x621E, 0x621F,
                0x6220, 0x6221, 0x6222, 0x6224, 0x6225, 0x6226, 0x6227, 0x6228,
                0x6229, 0x622A, 0x622B, 0x622C
			};
		#endregion
	}
}

(crystalpickaxe.cs)

Code:
using System;
using Server.Items;
using Server.Network;
using Server.Engines.Harvest;

namespace Server.Items
{
    [FlipableAttribute(0xE86, 0xE85)]
	public class CrystalPickaxe : BaseAxe
	{
        	public override HarvestSystem HarvestSystem { get { return CrystalGathering.System; } }

		public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.DoubleStrike; } }
		public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.Disarm; } }

		public override int AosStrengthReq{ get{ return 50; } }
		public override int AosMinDamage{ get{ return 13; } }
		public override int AosMaxDamage{ get{ return 15; } }
		public override int AosSpeed{ get{ return 35; } }

		public override int OldStrengthReq{ get{ return 25; } }
		public override int OldMinDamage{ get{ return 1; } }
		public override int OldMaxDamage{ get{ return 15; } }
		public override int OldSpeed{ get{ return 35; } }

		public override int InitMinHits{ get{ return 31; } }
		public override int InitMaxHits{ get{ return 60; } }

		[Constructable]
       		public CrystalPickaxe() : base( 0xE86 )
		{
           		Name = "Crystal Pickaxe";
			Weight = 11.0;
			UsesRemaining = 50;
			ShowUsesRemaining = true;
		}

        	public CrystalPickaxe(Serial serial) : base(serial)
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			ShowUsesRemaining = true;
		}
	}
}

I am getting the message from this part of crystalgathering.cs:

Code:
             public override void OnBadHarvestTarget(Mobile from, Item tool, object toHarvest)
        {
            if (toHarvest is LandTarget)
                // from.SendLocalizedMessage(501862); // You can't mine there.
                from.SendMessage(32, "You can't harvest there.");
            else
                //from.SendLocalizedMessage(501863); // You can't mine that.
                from.SendMessage(32, "You Can't harvest that.");
        }

The specific message I'm getting is: "You Can't harvest that." With the "Can't" being capitalized, so I know it's that part that is stopping me. Not sure what I'm missing or doing wrong. Any ideas?


EDIT: Figured out the problem. Was trying to use statics that weren't frozen into the statics file. I really should learn to check all alternatives before posting. Heh.
 
It works in much the same way as the normal crafting definitions, the crystals have been added as a resource through the oreinfo.cs

I do not see the crystals at all in the new oreinfo.cs file?

am i missing something? i downloaded the latest one after that had been posted
 
Top