[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:
Script:
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.
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.