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!

[shrink

Packer898

Knight
[shrink

I found a shrink command in Script Submissions but I get alot of errors when I install it. Any help on this since I cant find a good working one for 1.0.

Error:
Code:
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 47, column 13) The type
 or namespace name 'ShrinkItem' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 48, column 6) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 49, column 6) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 50, column 6) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 52, column 16) The type
 or namespace name 'EvolutionDragon' could not be found (are you missing a using
 directive or an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 54, column 7) The type
or namespace name 'EvolutionDragon' could not be found (are you missing a using
directive or an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 55, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 56, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 57, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 58, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 59, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 60, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 61, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 62, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 63, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 64, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 65, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0246: (line 71, column 7) The type
or namespace name 'si' could not be found (are you missing a using directive or
an assembly reference?)
 - Error: Scripts\Custom\ShrinkCommand.cs: CS0103: (line 73, column 33) The name
 'si' does not exist in the class or namespace 'Server.Scripts.Commands.ShrinkCo
mmand.ShrinkTarget'

Script:
Code:
using System;
using Server;
using Server.Mobiles; 
using Server.Gumps; 
using Server.Targeting;
using Server.Scripts.Commands;
using Server.Items;

namespace Server.Scripts.Commands
{
	public class ShrinkCommand
	{
		public static void Initialize()
		{
			Server.Commands.Register( "Shrink", AccessLevel.GameMaster, new CommandEventHandler( Shrink_OnCommand ) );
		}

		[Usage( "Shrink" )]
		[Description( "Removes a player from event/area." )]
		private static void Shrink_OnCommand( CommandEventArgs e )
		{
			if ( e.Mobile is PlayerMobile )
			{
				e.Mobile.Target = new ShrinkTarget();
				e.Mobile.SendMessage("What would you like to Shrink?");
			}
		}
		public class ShrinkTarget : Target
		{

			public ShrinkTarget() : base( -1, true, TargetFlags.None )
			{
			}

			protected override void OnTarget( Mobile from, object o )
			{
				if ( o is Item )
					from.SendMessage( "You cannot shrink that, MOBILES ONLY" );

				else if ( o is PlayerMobile )
					from.SendMessage( "You cannot shrink that, MOBILES ONLY" );

				else if ( o is BaseCreature )
				{
          				BaseCreature c = (BaseCreature)o;
					Type type = c.GetType();
        				ShrinkItem si = new ShrinkItem();
					si.MobType = type;
					si.Pet = c;
					si.PetOwner = from;

					if ( c is EvolutionDragon )
					{
						EvolutionDragon evo = (EvolutionDragon)c;
						si.PetKP = evo.KP;
						si.PetStage = evo.Stage;
						si.PetHasEgg = evo.HasEgg;
						si.PetAllowMating = evo.AllowMating;
						si.PetPregnant = evo.Pregnant;
						si.PetS1 = evo.S1;
						si.PetS2 = evo.S2;
						si.PetS3 = evo.S3;
						si.PetS4 = evo.S4;
						si.PetS5 = evo.S5;
						si.PetS6 = evo.S6;
					}

					if ( c is BaseMount )
					{
						BaseMount mount = (BaseMount)c;
						si.MountID = mount.ItemID;
					}
        				from.AddToBackpack( si );

					c.Delete();
				}
				else
					from.SendMessage( "You cannot shrink that, MOBILES ONLY" );
			}
		}
	}
}

Any ideas what i need to change here? I dont have any Evo's so I could careless if thats in there if it is what is adding to the errors.
 

daat99

Moderator
Staff member
You are missing A LOT of scripts.
This isn't a "standalone" script tha tyou can just take and drop anywhere and it'll work.
You need the full package for it to work.
 

Packer898

Knight
lol bah was kinda afraid of that. I tried adding the shrinkitem.cs and it still errors. =/ Ill just keep looking for a stand alone one then. =)
 

Tannis

Knight
I don't think there are any stand alone versions of any shrink system that are updated for 1.0.0 posted on here, but here's a good one, and probably what you're looking for. http://www.runuo.com/forum/showthread.php?t=31359&highlight=shrink+system As I said, I don't think it's updated for 1.0.0 but try loading it on your shard, it may not really be that hard to fix if it's not updated. We're using this system on our shard, and I can't remember having a problem with coverting it to 1.0.0
 
Top