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!

Parrot and Perch

Parrot and Perch

I hope this is where i can ask this question.

I'm running a 2.0 rc2 server, and i was just wondering what i would have to change in ML parrot scripts to make them work. Because so far they are not. I've been adding some of the peerless and that's how i discovered the parrots. I would really like to use these on my shard, if anyone can tell me what to change I'd appreciate it.

Thank you.
 

milva

Sorceror
Do you mean the little statue parrot, which when you click it - then click on a perch, the parrot then attaches to it?
We have them and they seem to work great, they display how old they are, with other players coming around the parrot will then repeat the words.
 
Yes....that is the one i would like to have....but it doesnt seem to be in Runuo 2.0 r2, the only place i found it is in SVN versions with Mondains.... what i was wondering about is would it be possible to change those scripts so they will work in 2.0, because as of now they don't seem to be working
 

Hammerhand

Knight
Mondains requires core edits to make the ML creatures work properly if I'm not mistaken. Making them work right for RC2 would probably require core edits as well. Whether its possible to have them working on an RC2 shard I dont know. Someone may have done it.
 

jokik

Sorceror
Hammerhand;811854 said:
The Pet Parrot (while on the perch) has 6 sayings it will randomly repeat when someone approaches.

haha i know what it does , its the way he put it , i think i have an extremely dirty mind :)
 
ok...here is what my server errors are concerning the parrot:

RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ CUSTOM/Parrot.cs:
CS0117: Line 79: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
CS0117: Line 79: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
CS0246: Line 81: The type or namespace name 'PetParrot' could not be found (
are you missing a using directive or an assembly reference?)
CS0117: Line 86: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.


And the Parrot.cs //i added a lot of using statements to see if it'd work

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

namespace Server.Items
{
	public class ParrotItem : Item
	{		
		public override int LabelNumber{ get{ return 1074281; } } // pet parrot
	
		private static int[] m_Hues = new int[] 
		{
			0x3, 0xD, 0x13, 0x1C, 0x21, 0x30, 0x3F, 0x44, 0x59, 0x62, 0x71
		};
		
		[Constructable]
		public ParrotItem() : base( 0x20EE )
		{
			Weight = 1;								
			Hue = Utility.RandomList( m_Hues );
		}

		public ParrotItem( Serial serial ) : base( serial )
		{
		}	
		
		public override void OnDoubleClick( Mobile from )
		{
			if ( IsChildOf ( from.Backpack ) )
			{
				from.Target = new InternalTarget( this );
				from.SendLocalizedMessage( 1072612 ); // Target the Parrot Perch you wish to place this Parrot upon.
			}	
			else
				from.SendLocalizedMessage( 1042004 ); // That must be in your pack for you to use it.
		}

		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();
		}
		
		public class InternalTarget : Target
		{
			private ParrotItem m_Parrot;
		
			public InternalTarget( ParrotItem parrot ) : base( 2, false, TargetFlags.None )
			{
				m_Parrot = parrot;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( targeted is AddonComponent )
				{
					AddonComponent component = (AddonComponent) targeted;		
					
					if ( component.Addon is ParrotPerchAddon )
					{
						ParrotPerchAddon perch = (ParrotPerchAddon) component.Addon;
												
						BaseHouse house = BaseHouse.FindHouseAt( perch );
						
						if ( house != null && house.IsCoOwner( from ) )
						{
							if ( perch.Parrot == null || perch.Parrot.Deleted )
							{							
								Parrot parrot = new PetParrot();				
								parrot.Hue = m_Parrot.Hue;					
								parrot.MoveToWorld( perch.Location, perch.Map );
								parrot.Z += 12;
								
								perch.Parrot = parrot;
								m_Parrot.Delete();
							}
							else
								from.SendLocalizedMessage( 1072616 ); //That Parrot Perch already has a Parrot.
						}
						else
							from.SendLocalizedMessage( 1072618 ); //Parrots can only be placed on Parrot Perches in houses where you are an owner or co-owner.	
					}				
					else
						from.SendLocalizedMessage( 1072614 ); //You must place the Parrot on a Parrot Perch.
				}
				else
					from.SendLocalizedMessage( 1072614 ); //You must place the Parrot on a Parrot Perch.
			}
			
			protected override void OnTargetOutOfRange( Mobile from, object targeted )
			{
				base.OnTargetOutOfRange( from, targeted );
				
				from.SendLocalizedMessage( 1072613 ); //You must be closer to the Parrot Perch to place the Parrot upon it.
			}
		}
	}
}

and the perchaddon:

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

namespace Server.Items
{
	public class ParrotPerchAddon : BaseAddon
	{
		public override BaseAddonDeed Deed{ get{ return new ParrotPerchDeed(); } }

		[Constructable]
		public ParrotPerchAddon()
		{
			AddComponent( new AddonComponent( 0x2FF4 ), 0, 0, 0 );
		}

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

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.WriteEncodedInt( 0 ); // version
		}

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

			int version = reader.ReadEncodedInt();
		}
	}

	public class ParrotPerchDeed : BaseAddonDeed
	{
		public override BaseAddon Addon{ get{ return new ParrotPerchAddon(); } }
		public override int LabelNumber{ get{ return 1072617; } } // parrot perch

		[Constructable]
		public ParrotPerchDeed()
		{
		}

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

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.WriteEncodedInt( 0 ); // version
		}

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

			int version = reader.ReadEncodedInt();
		}
	}
}

I can't run my server unless i get these fixed, please help....(i could take the scripts out i guess), but would really like to make them work
 

Hammerhand

Knight
Try adding this into your scripts folder.. I'm adding this script because of this error..
Code:
CS0246: Line 81: The type or namespace name 'PetParrot' could not be found (
are you missing a using directive or an assembly reference?)
Its basically saying that you dont have the PetParrot.cs. Download this one and try it. Not sure if it will work or not.
 

Attachments

  • PetParrot.cs
    4 KB · Views: 34
I added the new parrot script....but it still isnt letting me dclick the parrot to go on the perch. hmm. AND when i shrink him he turns into a little ball instead of a bird statue....which i thought had to be wrong too. It's weird
 

Hammerhand

Knight
The pet parrot is the one that gets dbl clicked if I remember correctly. As for the ball, thats because there isnt any artwork for a shrunken parrot. Other pets have looked that way in the past when shrunken.
 

Orbit Storm

Sorceror
Just wondering if a fix was ever found for:

Code:
 + Customs/Parrot/Parrot.cs:
    CS0117: Line 77: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
    CS0117: Line 77: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
    CS0117: Line 84: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'

Yes, I have PetParrot, but that is completely unrelated to these errors. Any idea?
 

dazedmouse

Sorceror
Try these I used them on my old server Runuo 2.. Cant remember which perch they work with but try them both. Also you have to feed it the Parrot waffer for it to talk. I didnt have ml installed in this server.
 

Attachments

  • Parrot.rar
    2.3 KB · Views: 22

KnitePrince

Sorceror
Sorry for another Necro.. but I am trying to understand why its calling the Parrot.cs and then says that the problem is in the perch addon.....
Same errors as OrbitStorm;
I downloaded the rar but that addon is exactly the same as mine, the only reason I can see it might have worked is because that parrot does not have the ability to be dbl clicked and added to the perch.....
that rar has the petparrot, perch, perchaddon and parrot wafer, but it has no parrot item.. in this case the deed where the problem originates.. from the ML set. I can "[add" the petparrot but has no way to get it to the perch that I can see in the script or in game without the" petitem" (deed) to dbl click and target the perch.. for the life of me I cant figure out what it is I am missing.. probably simple but I am old deaf and half blind so please have patience...
KP
 

KnitePrince

Sorceror
OK, have been tinkering with this way too long. I am about to try removing the addon Perch from the game completely.

This is the Parrot.cs actually parrotitem;

Code:
using System;

   And, This is the Parrot Perch Addon that is supposedly causing the problem. lines 77 and 84;

[CODE]using System;
I'd appreciate someone aiming me in the right direction here.. This isnt terribly important, but it has got my dander all in an uproar trying to figure it out.   Thx!
   KP
 
Top