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!

Gems Dragon

lillibeth

Wanderer
Gems Dragon

new mobiles for you. they are drake and dragons that are not flesh and blood but jems. they have gem's hues, particular resitance and special abilities. they are not an easy work to tame, and much expensive to feed....cause they eats only gems....

in your basecreatur afther

[Flags]
public enum FoodType
{
Meat = 0x0001,
FruitsAndVegies = 0x0002,
GrainsAndHay = 0x0004,
Fish = 0x0008,
Eggs = 0x0010,
Gold = 0x0020,
add this

Amethyst = 0x0040,
Sapphire = 0x0050,
StarSapphire = 0x0060,
Emerald = 0x0070,
Ruby = 0x0080,
Diamond = 0x0090

then look for

private static Type[] m_FruitsAndVegies = new Type[]
{
typeof( HoneydewMelon ), typeof( YellowGourd ), typeof( GreenGourd ),
typeof( Banana ), typeof( Bananas ), typeof( Lemon ), typeof( Lime ),
typeof( Dates ), typeof( Grapes ), typeof( Peach ), typeof( Pear ),
typeof( Apple ), typeof( Watermelon ), typeof( Squash ),
typeof( Cantaloupe ), typeof( Carrot ), typeof( Cabbage ),
typeof( Onion ), typeof( Lettuce ), typeof( Pumpkin )
};

private static Type[] m_Gold = new Type[]
{
// white wyrms eat gold..
typeof( Gold )
};

and add

private static Type[] m_Amethyst = new Type[]
{
// amethyst dragon eat amethyst.
typeof( Amethyst )
};

private static Type[] m_Sapphire = new Type[]
{
// Sapphire dragon eat sapphire
typeof( Sapphire )
};

private static Type[] m_StarSapphire = new Type[]
{
// Sapphire dragon eat star sapphire
typeof( StarSapphire )
};

private static Type[] m_Emerald = new Type[]
{
// Emerald Dragons eat emerald
typeof( Emerald )
};

private static Type[] m_Ruby = new Type[]
{
// Ruby dragon eat ruby
typeof( Ruby )
};

private static Type[] m_Diamond = new Type[]
{
// Diamond dragon eat diamond
typeof( Diamond )
};

after

if ( CheckFoodPreference( f, FoodType.FruitsAndVegies, m_FruitsAndVegies ) )
return true;

add

if ( CheckFoodPreference( f, FoodType.Amethyst, m_Amethyst ) )
return true;

if ( CheckFoodPreference( f, FoodType.Sapphire, m_Sapphire ) )
return true;

if ( CheckFoodPreference( f, FoodType.StarSapphire, m_StarSapphire ) )
return true;

if ( CheckFoodPreference( f, FoodType.Emerald, m_Emerald ) )
return true;

if ( CheckFoodPreference( f, FoodType.Ruby, m_Ruby ) )
return true;

if ( CheckFoodPreference( f, FoodType.Diamond, m_Diamond ) )
return true;

then serch this line and replace whit mine

public virtual bool CheckFeed( Mobile from, Item dropped )
{
if ( !IsDeadPet && Controled && (ControlMaster == from || IsPetFriend( from )) && (dropped is Food || dropped is Gold || dropped is CookableFood || dropped is Head || dropped is LeftArm || dropped is LeftLeg || dropped is Torso || dropped is RightArm || dropped is RightLeg || dropped is Amethyst || dropped is Sapphire || dropped is StarSapphire || dropped is Emerald || dropped is Ruby || dropped is Diamond ) )

in animallore .cs look for

int foodPref = 3000340;

than add

#region Gemme
string foodPrefS = null;
#endregion

if ( (c.FavoriteFood & FoodType.FruitsAndVegies) != 0 )
foodPref = 1049565; // Fruits and Vegetables
else if ( (c.FavoriteFood & FoodType.GrainsAndHay) != 0 )
foodPref = 1049566; // Grains and Hay
else if ( (c.FavoriteFood & FoodType.Fish) != 0 )
foodPref = 1049568; // Fish
else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
foodPref = 1049564; // Meat
#region Gemme
else if ( (c.FavoriteFood & FoodType.Amethyst) != 0 )
foodPrefS = "Amethyst";
else if ( (c.FavoriteFood & FoodType.Sapphire) != 0 )
foodPrefS = "Sapphire and Star Sapphire";
else if ( (c.FavoriteFood & FoodType.Emerald) != 0 )
foodPrefS = "Emerald";
else if ( (c.FavoriteFood & FoodType.Ruby) != 0 )
foodPrefS = "Ruby";
else if ( (c.FavoriteFood & FoodType.Diamond) != 0 )
foodPrefS = "Diamonds";
#endregion

#region Gemme

i hope you like my job....now working on scales and hides and gems wyrms ^_^
 

Attachments

  • JewelsDragon.rar
    10.3 KB · Views: 208
Good script. The files that I downloaded and installed needed some work tho. It gave me errors. It was looking for the leather type "Dragon" I changed that, to horned and Barbed (between Dragon and Drake) and it worked fine for me.

Good Script Cant wait for the custom scales and hides.

Hienrich
 
i put in you codes and i got these errors. i've fixed one of my errors, and reposting my last 2. thanks

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0116: (line 70, column
1) A namespace does not directly contain members such as fields or methods
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1022: (line 4815, colum
n 1) Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

link 70
Code:
        }
//Added for Gems Dragon
Amethyst = 0x0040,
Sapphire = 0x0050,
StarSapphire = 0x0060,
Emerald = 0x0070,
Ruby = 0x0080,
Diamond = 0x0090
//Added for Gems Dragon
	}

	[Flags]

and line 4814

Code:
			{
				c.Delete();
			}
		}
	}
}
 

Maverick2002

Wanderer
To Many Errors

Dude i tryed to redo my base creatures and got a message that said if i save it would turn it to a text-oly file now what (-_-") ??
 

lillibeth

Wanderer
their special abilities are thing such as bleedattack and similar. they olso eat gems, and are really hard to tame.

abount the errors reported by WonderlandADnc and Maverick i think it's relatated to some customization in basecrature....as told Hienrich Jager he had to chang hide type 'cause i use dragon hides :)
 

catfish93

Wanderer
Looks like a great script.

However, I keep getting one error and I can't seem to figure out why. Please forgive me if it's a stupid mistake, I'm still learning. Here's the error info:

HTML:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Customs\Modified\Skills\AnimalLore.cs: CS1038: (line 350, colu
mn 2) #endregion directive expected
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit or R to try again.

And here's the script with mod included:
Code:
using System;
using Server;
using Server.Gumps;
using Server.Mobiles;
using Server.Targeting;

namespace Server.SkillHandlers
{
	public class AnimalLore
	{
		public static void Initialize()
		{
			SkillInfo.Table[(int)SkillName.AnimalLore].Callback = new SkillUseCallback( OnUse );
		}

		public static TimeSpan OnUse(Mobile m)
		{
			m.Target = new InternalTarget();

			m.SendLocalizedMessage( 500328 ); // What animal should I look at?

			return TimeSpan.FromSeconds( 1.0 );
		}

		private class InternalTarget : Target
		{
			public InternalTarget() : base( 8, false, TargetFlags.None )
			{
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( !from.Alive )
				{
					from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
				}
				else if ( targeted is BaseCreature )
				{
					BaseCreature c = (BaseCreature)targeted;

					if ( !c.IsDeadPet )
					{
						if ( c.Body.IsAnimal || c.Body.IsMonster || c.Body.IsSea || c.Body > 239 && c.Body < 256 )
						{
							if ( (!c.Controled || !c.Tamable) && from.Skills[SkillName.AnimalLore].Base < 100.0 )
							{
								from.SendLocalizedMessage( 1049674 ); // At your skill level, you can only lore tamed creatures.
							}
							else if ( !c.Tamable && from.Skills[SkillName.AnimalLore].Base < 110.0 )
							{
								from.SendLocalizedMessage( 1049675 ); // At your skill level, you can only lore tamed or tameable creatures.
							}
							else if ( !from.CheckTargetSkill( SkillName.AnimalLore, c, 0.0, 120.0 ) )
							{
								from.SendLocalizedMessage( 500334 ); // You can't think of anything you know offhand.
							}
							else
							{
								from.CloseGump( typeof( AnimalLoreGump ) );
								from.SendGump( new AnimalLoreGump( c ) );
							}
						}
						else
						{
							from.SendLocalizedMessage( 500329 ); // That's not an animal!
						}
					}
					else
					{
						from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
					}
				}
				else
				{
					from.SendLocalizedMessage( 500329 ); // That's not an animal!
				}
			}
		}
	}

	public class AnimalLoreGump : Gump
	{
		private static string FormatSkill( BaseCreature c, SkillName name )
		{
			Skill skill = c.Skills[name];

			if ( skill.Base < 10.0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0:F1}</div>", skill.Base );
		}

		private static string FormatAttributes( int cur, int max )
		{
			if ( max == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}/{1}</div>", cur, max );
		}

		private static string FormatStat( int val )
		{
			if ( val == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}</div>", val );
		}

		private static string FormatElement( int val )
		{
			if ( val <= 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}%</div>", val );
		}

		private const int LabelColor = 0x24E5;

		public AnimalLoreGump( BaseCreature c ) : base( 250, 50 )
		{
			AddPage( 0 );

			AddImage( 100, 100, 2080 );
			AddImage( 118, 137, 2081 );
			AddImage( 118, 207, 2081 );
			AddImage( 118, 277, 2081 );
			AddImage( 118, 347, 2083 );

			AddHtml( 147, 108, 210, 18, String.Format( "<center><i>{0}</i></center>", c.Name ), false, false );

			AddButton( 240, 77, 2093, 2093, 2, GumpButtonType.Reply, 0 );

			AddImage( 140, 138, 2091 );
			AddImage( 140, 335, 2091 );

			int pages = ( Core.AOS ? 5 : 3 );
			int page = 0;


			#region Attributes
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049593, 200, false, false ); // Attributes

			AddHtmlLocalized( 153, 168, 160, 18, 1049578, LabelColor, false, false ); // Hits
			AddHtml( 280, 168, 75, 18, FormatAttributes( c.Hits, c.HitsMax ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1049579, LabelColor, false, false ); // Stamina
			AddHtml( 280, 186, 75, 18, FormatAttributes( c.Stam, c.StamMax ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1049580, LabelColor, false, false ); // Mana
			AddHtml( 280, 204, 75, 18, FormatAttributes( c.Mana, c.ManaMax ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1028335, LabelColor, false, false ); // Strength
			AddHtml( 320, 222, 35, 18, FormatStat( c.Str ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 3000113, LabelColor, false, false ); // Dexterity
			AddHtml( 320, 240, 35, 18, FormatStat( c.Dex ), false, false );

			AddHtmlLocalized( 153, 258, 160, 18, 3000112, LabelColor, false, false ); // Intelligence
			AddHtml( 320, 258, 35, 18, FormatStat( c.Int ), false, false );

			if ( Core.AOS )
			{
				AddImage( 128, 278, 2086 );
				AddHtmlLocalized( 147, 276, 160, 18, 1049594, 200, false, false ); // Loyalty Rating

				AddHtmlLocalized( 153, 294, 160, 18, (!c.Controled || c.Loyalty == PetLoyalty.None) ? 1061643 : 1049594 + (int)c.Loyalty, LabelColor, false, false );
			}
			else
			{
				AddImage( 128, 278, 2086 );
				AddHtmlLocalized( 147, 276, 160, 18, 3001016, 200, false, false ); // Miscellaneous

				AddHtmlLocalized( 153, 294, 160, 18, 1049581, LabelColor, false, false ); // Armor Rating
				AddHtml( 320, 294, 35, 18, FormatStat( c.VirtualArmor ), false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, pages );
			#endregion

			#region Resistances
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1061645, 200, false, false ); // Resistances

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalResistance ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireResistance ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdResistance ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonResistance ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyResistance ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Damage
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1017319, 200, false, false ); // Damage

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalDamage ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireDamage ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdDamage ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonDamage ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyDamage ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Skills
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 3001030, 200, false, false ); // Combat Ratings

			AddHtmlLocalized( 153, 168, 160, 18, 1044103, LabelColor, false, false ); // Wrestling
			AddHtml( 320, 168, 35, 18, FormatSkill( c, SkillName.Wrestling ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1044087, LabelColor, false, false ); // Tactics
			AddHtml( 320, 186, 35, 18, FormatSkill( c, SkillName.Tactics ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1044086, LabelColor, false, false ); // Magic Resistance
			AddHtml( 320, 204, 35, 18, FormatSkill( c, SkillName.MagicResist ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1044061, LabelColor, false, false ); // Anatomy
			AddHtml( 320, 222, 35, 18, FormatSkill( c, SkillName.Anatomy ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 1044090, LabelColor, false, false ); // Poisoning
			AddHtml( 320, 240, 35, 18, FormatSkill( c, SkillName.Poisoning ), false, false );

			AddImage( 128, 260, 2086 );
			AddHtmlLocalized( 147, 258, 160, 18, 3001032, 200, false, false ); // Lore & Knowledge

			AddHtmlLocalized( 153, 276, 160, 18, 1044085, LabelColor, false, false ); // Magery
			AddHtml( 320, 276, 35, 18, FormatSkill( c, SkillName.Magery ), false, false );

			AddHtmlLocalized( 153, 294, 160, 18, 1044076, LabelColor, false, false ); // Evaluating Intelligence
			AddHtml( 320, 294, 35, 18,FormatSkill( c, SkillName.EvalInt ), false, false );

			AddHtmlLocalized( 153, 312, 160, 18, 1044106, LabelColor, false, false ); // Meditation
			AddHtml( 320, 312, 35, 18, FormatSkill( c, SkillName.Meditation ), false, false );

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			#endregion

			#region Misc
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049563, 200, false, false ); // Preferred Foods

			int foodPref = 3000340;			
			#region Gemme
			string foodPrefS = null;
			#endregion

			if ( (c.FavoriteFood & FoodType.FruitsAndVegies) != 0 )
				foodPref = 1049565; // Fruits and Vegetables
			else if ( (c.FavoriteFood & FoodType.GrainsAndHay) != 0 )
				foodPref = 1049566; // Grains and Hay
			else if ( (c.FavoriteFood & FoodType.Fish) != 0 )
				foodPref = 1049568; // Fish
			else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
				foodPref = 1049564; // Meat
			#region Gemme
			else if ( (c.FavoriteFood & FoodType.Amethyst) != 0 )
				foodPrefS = "Amethyst";
			else if ( (c.FavoriteFood & FoodType.Sapphire) != 0 )
				foodPrefS = "Sapphire and Star Sapphire";
			else if ( (c.FavoriteFood & FoodType.Emerald) != 0 )
				foodPrefS = "Emerald";
			else if ( (c.FavoriteFood & FoodType.Ruby) != 0 )
				foodPrefS = "Ruby";
			else if ( (c.FavoriteFood & FoodType.Diamond) != 0 )
				foodPrefS = "Diamonds";
			#endregion

			#region Gemme
			
			AddHtmlLocalized( 153, 168, 160, 18, foodPref, LabelColor, false, false );

			AddImage( 128, 188, 2086 );
			AddHtmlLocalized( 147, 186, 160, 18, 1049569, 200, false, false ); // Pack Instincts

			int packInstinct = 3000340;

			if ( (c.PackInstinct & PackInstinct.Canine) != 0 )
				packInstinct = 1049570; // Canine
			else if ( (c.PackInstinct & PackInstinct.Ostard) != 0 )
				packInstinct = 1049571; // Ostard
			else if ( (c.PackInstinct & PackInstinct.Feline) != 0 )
				packInstinct = 1049572; // Feline
			else if ( (c.PackInstinct & PackInstinct.Arachnid) != 0 )
				packInstinct = 1049573; // Arachnid
			else if ( (c.PackInstinct & PackInstinct.Daemon) != 0 )
				packInstinct = 1049574; // Daemon
			else if ( (c.PackInstinct & PackInstinct.Bear) != 0 )
				packInstinct = 1049575; // Bear
			else if ( (c.PackInstinct & PackInstinct.Equine) != 0 )
				packInstinct = 1049576; // Equine
			else if ( (c.PackInstinct & PackInstinct.Bull) != 0 )
				packInstinct = 1049577; // Bull

			AddHtmlLocalized( 153, 204, 160, 18, packInstinct, LabelColor, false, false );

			if ( !Core.AOS )
			{
				AddImage( 128, 224, 2086 );
				AddHtmlLocalized( 147, 222, 160, 18, 1049594, 200, false, false ); // Loyalty Rating

				AddHtmlLocalized( 153, 240, 160, 18, (!c.Controled || c.Loyalty == PetLoyalty.None) ? 1061643 : 1049594 + (int)c.Loyalty, LabelColor, false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			#endregion
		}
	}
}

Am I correct in assuming that according to the error info given, it's telling me that there is an "#endregion" missing on line 350, which is the line that houses the closing bracket of the script? Any help would be greatly appreciated, and if I'm making any stupid mistakes please inform me as to where I've gone astray so I won't make the same mistake again.

Thanks guys.
 

Lubomir

Wanderer
Edit to show preferred food in aniaml lore gump?

It appears that the edits in the first post are not complete. The one for the animal lore script does not show the edits to allow the preferred food type to show in the gump.

The #region Gemme at the bottom of that section is the beginning of that part of the script. The rest is missing and if that is included then the script will not complile.

Otherwise, this is a great set of scripts and very accurate installation instructions. :)

Please, post the rest of the misssing edits.

Thank you,

Lubomir
 

Lubomir

Wanderer
Edit to show preferred food in aniaml lore gump

Nevermind, I used the following code to get the food prefs to show. the label color is wrong for the gems dragons but otherwise it works.

Code:
#region Gemme
			
    if ( foodPrefS != null )
        AddHtml( 153, 168, 160, 18, foodPrefS, (bool)false, (bool)false );
    else
        AddHtmlLocalized( 153, 168, 160, 18, foodPref, LabelColor, false, false );

#endregion

Again, thank you for a very interesting addition to the game. ;)

Lubomir
 
Sorry for new Post but thought it would be nice for newbies to have a good fix

Problems Fixed: changes AS Follows
Not tryin to take credit on this just just fixing for the new people hope you dont mind.

For Those wishing to Add this Script Pack to there Shard please do the following

in your basecreature after

[Flags]
public enum FoodType
{
Meat = 0x0001,
FruitsAndVegies = 0x0002,
GrainsAndHay = 0x0004,
Fish = 0x0008,
Eggs = 0x0010,
Gold = 0x0020,
add this

Amethyst = 0x0040,
Sapphire = 0x0050,
StarSapphire = 0x0060,
Emerald = 0x0070,
Ruby = 0x0080,
Diamond = 0x0090

then look for

private static Type[] m_FruitsAndVegies = new Type[]
{
typeof( HoneydewMelon ), typeof( YellowGourd ), typeof( GreenGourd ),
typeof( Banana ), typeof( Bananas ), typeof( Lemon ), typeof( Lime ),
typeof( Dates ), typeof( Grapes ), typeof( Peach ), typeof( Pear ),
typeof( Apple ), typeof( Watermelon ), typeof( Squash ),
typeof( Cantaloupe ), typeof( Carrot ), typeof( Cabbage ),
typeof( Onion ), typeof( Lettuce ), typeof( Pumpkin )
};

private static Type[] m_Gold = new Type[]
{
// white wyrms eat gold..
typeof( Gold )
};

and add

private static Type[] m_Amethyst = new Type[]
{
// amethyst dragon eat amethyst.
typeof( Amethyst )
};

private static Type[] m_Sapphire = new Type[]
{
// Sapphire dragon eat sapphire
typeof( Sapphire )
};

private static Type[] m_StarSapphire = new Type[]
{
// Sapphire dragon eat star sapphire
typeof( StarSapphire )
};

private static Type[] m_Emerald = new Type[]
{
// Emerald Dragons eat emerald
typeof( Emerald )
};

private static Type[] m_Ruby = new Type[]
{
// Ruby dragon eat ruby
typeof( Ruby )
};

private static Type[] m_Diamond = new Type[]
{
// Diamond dragon eat diamond
typeof( Diamond )
};

after

if ( CheckFoodPreference( f, FoodType.FruitsAndVegies, m_FruitsAndVegies ) )
return true;

add

if ( CheckFoodPreference( f, FoodType.Amethyst, m_Amethyst ) )
return true;

if ( CheckFoodPreference( f, FoodType.Sapphire, m_Sapphire ) )
return true;

if ( CheckFoodPreference( f, FoodType.StarSapphire, m_StarSapphire ) )
return true;

if ( CheckFoodPreference( f, FoodType.Emerald, m_Emerald ) )
return true;

if ( CheckFoodPreference( f, FoodType.Ruby, m_Ruby ) )
return true;

if ( CheckFoodPreference( f, FoodType.Diamond, m_Diamond ) )
return true;

then serch this line and replace whit mine

public virtual bool CheckFeed( Mobile from, Item dropped )
{
if ( !IsDeadPet && Controled && (ControlMaster == from || IsPetFriend( from )) && (dropped is Food || dropped is Gold || dropped is CookableFood || dropped is Head || dropped is LeftArm || dropped is LeftLeg || dropped is Torso || dropped is RightArm || dropped is RightLeg || dropped is Amethyst || dropped is Sapphire || dropped is StarSapphire || dropped is Emerald || dropped is Ruby || dropped is Diamond ) )


In animallore .cs look for

int foodPref = 3000340;

Add This under

string foodPrefS = null;

Find this

if ( (c.FavoriteFood & FoodType.FruitsAndVegies) != 0 )
foodPref = 1049565; // Fruits and Vegetables
else if ( (c.FavoriteFood & FoodType.GrainsAndHay) != 0 )
foodPref = 1049566; // Grains and Hay
else if ( (c.FavoriteFood & FoodType.Fish) != 0 )
foodPref = 1049568; // Fish
else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
foodPref = 1049564; // Meat

right under it add

else if ( (c.FavoriteFood & FoodType.Amethyst) != 0 )
foodPrefS = "Amethyst";
else if ( (c.FavoriteFood & FoodType.Sapphire) != 0 )
foodPrefS = "Sapphire and Star Sapphire";
else if ( (c.FavoriteFood & FoodType.Emerald) != 0 )
foodPrefS = "Emerald";
else if ( (c.FavoriteFood & FoodType.Ruby) != 0 )
foodPrefS = "Ruby";
else if ( (c.FavoriteFood & FoodType.Diamond) != 0 )
foodPrefS = "Diamonds";

All dragons fixed with Horned And Barbed fix

Hope this helps out a bit

Thanks to wonder for bring to my attion yes Base creature still must be fixed as above
 

Attachments

  • JewelsDragon.zip
    40.1 KB · Views: 38

princess

Wanderer
WonderlandADnc said:
do yuo have to add the basecreature part as well. supernova72611
thanks

The zip supernova included is the complete file with all the fixes. Not sure if it is going to work now though. I am having a hard time getting some of my things to complile right so......

try it on a test of runuo 2.0
 

catfish93

Wanderer
Perfect!!

OK, kiddies...here's my experience. If I say something stupid and think I'm cool for finding some of this stuff (even though some of the more experienced people probably already knew it), it's because I'm actually proud of myself for being able to figure out the error codes that I get with some scripts without having to ask for help. Yeah...I'm still pretty wet behind the ears.

First off, if you don't have Daat99's OWLTR and don't have some sort of animal husbandry system, don't replace the Basecreature.cs with the one you unzip. You can just go ahead and use it as a template for your current one. Thank you very much for marking the places where the additions are, btw. However, there was a couple of problems:
1. (Self made) When I copy/pasted I forgot a comma on Line 60.
2. Line 2206 needs another "l" in controlled.
3. Don't need to add the necro_AI portion. There's no Necro_AI in Scripts/Engines/AI/AI.

I didn't change animallore.cs and it compiled fine. When you modify it according to your specs, it'll give an error saying something along the lines of "cannot be used in that context" (change foodprefS = n to foodpref = n, n = type of jewel). However when you do that, the error changes to "cannot change from 'string' to 'int'". I'm going to work on it some more and see if I can't get it to work somehow. If I can't I'll probably just change to Fish or Meat.
 
Ok first your tryin to change something that has been fixed and it works fine in my server and then probs your havin are

1. (Self made) When I copy/pasted I forgot a comma on Line 60.
2. Line 2206 needs another "l" in controlled.
3. Don't need to add the necro_AI portion. There's no Necro_AI in Scripts/Engines/AI/AI.

1. well you know what you did wrong
2. only if 2.0 RC1
3. just coment out the Necro AI part and go on
4. You must have in Edits for animal lore.cs
5. if not running daats then must change horned and barbed unless its stock which i think it is not sure

hope that helps

But these changes were RunUo 1.0.0 anyway

or if you want to keep in Necro AI pm Me and i'll send you the file, or just do a search

And i had just put above to just edit your files unless you have daat and fs tamming
 
Top