Full Version : Need Help On Shrink Little Glitch
xmlspawner >>Scripting Support >>Need Help On Shrink Little Glitch
<< Prev | Next >>
Erica- 03-27-2007
Hi im having this problem with shrink ok it works and all but the problem is this .
When you tame a pet without you shrinking it lets say your pets name is gizmo so you would say this command gizmo drop and what ever items or loot it has would drop on ground now the problem is this lets say you dont say that command to drop but you tame it shrink it and unshrink it again then you decide to say the command gizmo drop it will not drop cause was shrunk so not sure what to fix or add on the shrink system but heres the script.

CODE
using System; using Server.Items; using Server.Mobiles; using Server.Network; using Server.ContextMenus;
using System.Collections.Generic;
namespace Server.Items
{
public class ShrinkItem : Item
{
private bool m_IsDeed = false; // Set True for all shrunken pets to be in deed form.
private BaseCreature m_Mob;
private int m_PetHue = 0;
private bool m_PetBonded;
private Mobile m_PetOwner;
private bool m_IsFemale;
private string m_PetTitle;
private bool m_BardingExceptional;
private Mobile m_BardingCrafter;
private int m_BardingHP;
private bool m_HasBarding;
private CraftResource m_BardingResource;
private int m_PetHitsNow;
private int m_PetStamNow;
private int m_PetManaNow;
private int m_PetKP;
private int m_PetStage;
private bool m_PetHasEgg;
private bool m_PetAllowMating;
private bool m_PetPregnant;
private bool m_PetS1;
private bool m_PetS2;
private bool m_PetS3;
private bool m_PetS4;
private bool m_PetS5;
private bool m_PetS6;
private int m_MountID;
private Type m_MobType;
private String m_MobTypeString;
private bool m_Locked;
private Double m_PetMinTame;
private int m_PetControlSlots;
private string m_PetName;
private int m_PetMinDamage;
private int m_PetMaxDamage;
private int m_PetBody;
private int m_PetSound;
private int m_PetVArmor;
private int m_PetStr;
private int m_PetDex;
private int m_PetInt;
private int m_PetHits;
private int m_PetStam;
private int m_PetMana;
private int m_PetPhysicalResist;
private int m_PetColdResist;
private int m_PetFireResist;
private int m_PetPoisonResist;
private int m_PetEnergyResist;
private int m_PetPhysicalDamage;
private int m_PetColdDamage;
private int m_PetFireDamage;
private int m_PetPoisonDamage;
private int m_PetEnergyDamage;
private Double m_PetWrestling;
private Double m_PetTactics;
private Double m_PetResist;
private Double m_PetAnatomy;
private Double m_PetPoisoning;
private Double m_PetMagery;
private Double m_PetEvalInt;
private Double m_PetMed;
[CommandProperty( AccessLevel.GameMaster )]
public bool IsDeed
{
get{ return m_IsDeed; }
set
{
m_IsDeed = value;
if ( m_IsDeed == true )
{
if ( m_Mob != null )
{
ItemID = 0x14EF;
Name = "a pet deed";
}
else
{
ItemID = 0xFAA;
Name = "Unlinked Shrink Item!";
}
}
else
{
if ( m_Mob != null )
{
ItemID = ShrinkTable.Lookup( m_Mob );
Name = "a shrunken pet";
}
else
{
ItemID = 0xFAA;
Name = "Unlinked Shrink Item!";
}
}
}
}
[CommandProperty( AccessLevel.GameMaster )]
public BaseCreature Pet
{
get{ return m_Mob; }
set
{
m_Mob = value;
if ( m_IsDeed != true )
{
ItemID = ShrinkTable.Lookup( m_Mob );
Name = "a shrunken pet";
}
else
{
ItemID = 0x14EF;
Name = "a pet deed";
}
if ( m_Mob is SwampDragon )
{
SwampDragon sd = (SwampDragon)m_Mob;
m_BardingExceptional = sd.BardingExceptional;
m_BardingCrafter = sd.BardingCrafter;
m_BardingHP = sd.BardingHP;
m_HasBarding = sd.HasBarding;
m_BardingResource = sd.BardingResource;
}
m_PetTitle = m_Mob.Title;
m_PetHitsNow = m_Mob.Hits;
m_PetStamNow = m_Mob.Stam;
m_PetManaNow = m_Mob.Mana;
m_PetName = m_Mob.Name;
m_PetHue = m_Mob.Hue;
this.Hue = m_PetHue;
m_PetBody = m_Mob.BodyValue;
m_PetSound = m_Mob.BaseSoundID;
m_PetVArmor = m_Mob.VirtualArmor;
m_PetMinTame = m_Mob.MinTameSkill;
m_PetControlSlots = m_Mob.ControlSlots;
m_IsFemale = m_Mob.Female;
m_PetMinDamage = m_Mob.DamageMin;
m_PetMaxDamage = m_Mob.DamageMax;
if ( m_Mob.IsBonded == true )
m_PetBonded = true;
else
m_PetBonded = false;
m_PetStr = m_Mob.RawStr;
m_PetDex = m_Mob.RawDex;
m_PetInt = m_Mob.RawInt;
m_PetHits = m_Mob.HitsMax;
m_PetStam = m_Mob.StamMax;
m_PetMana = m_Mob.ManaMax;
m_PetPhysicalResist = m_Mob.PhysicalResistance;
m_PetColdResist = m_Mob.ColdResistance;
m_PetFireResist = m_Mob.FireResistance;
m_PetPoisonResist = m_Mob.PoisonResistance;
m_PetEnergyResist = m_Mob.EnergyResistance;
m_PetPhysicalDamage = m_Mob.PhysicalDamage;
m_PetColdDamage = m_Mob.ColdDamage;
m_PetFireDamage = m_Mob.FireDamage;
m_PetPoisonDamage = m_Mob.PoisonDamage;
m_PetEnergyDamage = m_Mob.EnergyDamage;
m_PetWrestling = m_Mob.Skills[SkillName.Wrestling].Base;
m_PetTactics = m_Mob.Skills[SkillName.Tactics].Base;
m_PetResist = m_Mob.Skills[SkillName.MagicResist].Base;
m_PetAnatomy = m_Mob.Skills[SkillName.Anatomy].Base;
m_PetPoisoning = m_Mob.Skills[SkillName.Poisoning].Base;
m_PetMagery= m_Mob.Skills[SkillName.Magery].Base;
m_PetEvalInt = m_Mob.Skills[SkillName.EvalInt].Base;
m_PetMed = m_Mob.Skills[SkillName.Meditation].Base;
}
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetHue
{
get{ return m_PetHue; }
set
{
m_PetHue = value;
Hue = m_PetHue;
}
}
[CommandProperty( AccessLevel.GameMaster )]
public Type MobType
{
get{ return m_MobType; }
set
{
m_MobType = value;
m_MobTypeString = m_MobType.Name;
}
}
[CommandProperty( AccessLevel.GameMaster )]
public String MobTypeString
{
get{ return m_MobTypeString; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetBonded
{
get{ return m_PetBonded; }
set{ m_PetBonded = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile PetOwner
{
get{ return m_PetOwner; }
set{ m_PetOwner = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool Lock
{
get{ return m_Locked; }
set{ m_Locked = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetBodyValue
{
get{ return m_PetBody; }
set{ m_PetBody = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetSoundID
{
get{ return m_PetSound; }
set{ m_PetSound = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetVirtualArmor
{
get{ return m_PetVArmor; }
set{ m_PetVArmor = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double PetMinTame
{
get{ return m_PetMinTame; }
set{ m_PetMinTame = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatStr
{
get{ return m_PetStr; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatDex
{
get{ return m_PetDex; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatInt
{
get{ return m_PetInt; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatHits
{
get{ return m_PetHits; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatStam
{
get{ return m_PetStam; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int StatMana
{
get{ return m_PetMana; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ResistPhysical
{
get{ return m_PetPhysicalResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ResistCold
{
get{ return m_PetColdResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ResistFire
{
get{ return m_PetFireResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ResistPoison
{
get{ return m_PetPoisonResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ResistEnergy
{
get{ return m_PetEnergyResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int DamageTypePhysical
{
get{ return m_PetPhysicalDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int DamageTypeCold
{
get{ return m_PetColdDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int DamageTypeFire
{
get{ return m_PetFireDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int DamageTypePoison
{
get{ return m_PetPoisonDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int DamageTypeEnergy
{
get{ return m_PetEnergyDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillWrestling
{
get{ return m_PetWrestling; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillTactics
{
get{ return m_PetTactics; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillMagicResist
{
get{ return m_PetResist; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillAnatomy
{
get{ return m_PetAnatomy; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillPoisoning
{
get{ return m_PetPoisoning; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillMagery
{
get{ return m_PetMagery; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillEvalInt
{
get{ return m_PetEvalInt; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Double SkillMeditation
{
get{ return m_PetMed; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetMinDamage
{
get{ return m_PetMinDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetMaxDamage
{
get{ return m_PetMaxDamage; }
}
[CommandProperty( AccessLevel.GameMaster )]
public string PetName
{
get{ return m_PetName; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetKP
{
get{ return m_PetKP; }
set{ m_PetKP = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetStage
{
get{ return m_PetStage; }
set{ m_PetStage = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetHasEgg
{
get{ return m_PetHasEgg; }
set{ m_PetHasEgg = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetPregnant
{
get{ return m_PetPregnant; }
set{ m_PetPregnant = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetAllowMating
{
get{ return m_PetAllowMating; }
set{ m_PetAllowMating = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int MountID
{
get{ return m_MountID; }
set{ m_MountID = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetHitsNow
{
get{ return m_PetHitsNow; }
set{ m_PetHitsNow = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetStamNow
{
get{ return m_PetStamNow; }
set{ m_PetStamNow = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int PetManaNow
{
get{ return m_PetManaNow; }
set{ m_PetManaNow = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS1
{
get{ return m_PetS1; }
set{ m_PetS1 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS2
{
get{ return m_PetS2; }
set{ m_PetS2 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS3
{
get{ return m_PetS3; }
set{ m_PetS3 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS4
{
get{ return m_PetS4; }
set{ m_PetS4 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS5
{
get{ return m_PetS5; }
set{ m_PetS5 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool PetS6
{
get{ return m_PetS6; }
set{ m_PetS6 = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile BardingCrafter
{
get{ return m_BardingCrafter; }
set{ m_BardingCrafter = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool BardingExceptional
{
get{ return m_BardingExceptional; }
set{ m_BardingExceptional = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public int BardingHP
{
get{ return m_BardingHP; }
set{ m_BardingHP = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool HasBarding
{
get{ return m_HasBarding; }
set{ m_HasBarding = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public CraftResource BardingResource
{
get{ return m_BardingResource; }
set{ m_BardingResource = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public string PetTitle
{
get{ return m_PetTitle; }
set{ m_PetTitle = value; }
}
[Constructable]
public ShrinkItem() : base()
{
if ( m_Mob != null )
{
if ( m_IsDeed != false )
{
ItemID = 0x14EF;
Name = "a pet deed";
}
else
{
ItemID = ShrinkTable.Lookup( m_Mob );
Name = "a shrunken pet";
}
Movable = true;
LootType=LootType.Blessed;
Hue = m_PetHue;
}
else
{
ItemID = 0xFAA;
Movable = true;
Name = "Unlinked Shirnk Item!";
LootType=LootType.Blessed;
Weight = 10.0;
}
}
public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
}
else if ( m_MobTypeString == null || m_PetOwner == null || this.ItemID == 0xFAA )
{
from.SendMessage( 38, "You have encountered an error trying to reclaim your pet, Please contact a gamemaster and tell them about this error, It could still be possible to reclaim your pet." );
}
else if ( m_Locked != false && m_PetOwner != from )
{
from.SendMessage( 38, "This is locked and only the owner can claim this pet while locked." );
from.SendMessage( 38, "This item is now being returned to its owner." );
m_PetOwner.AddToBackpack( this );
m_PetOwner.SendMessage( 38, "You pet {0} has been returned to you because it was locked and {1} was trying to claim the pet.", m_MobTypeString, from.Name );
}
else if ( from.Skills[SkillName.AnimalTaming].Value < m_PetMinTame )
{
from.SendMessage( 38, "You do not have the required taming to control this pet.");
from.SendMessage( 38, "You must have {0} to reclaim this pet.", m_PetMinTame );
}
else if ( from.Followers + m_PetControlSlots > from.FollowersMax )
{
from.SendMessage( 38, "You have to many followers to claim this pet." );
}
else if ( Server.Spells.SpellHelper.CheckCombat( from ) )
{
from.SendMessage( 38, "You cannot reclaim your pet while your fighting." );
}
else if ( from is PlayerMobile && m_MobTypeString != null && m_PetOwner != null )
{
BaseCreature pet = null;
if( m_MobTypeString != null )
{
Type type = SpawnerType.GetType( m_MobTypeString );
if( type != null )
{
object o = Activator.CreateInstance( type );
pet = o as BaseCreature;
}
}
if ( pet == null )
{
from.SendMessage( 38, "Pet could not be claimed due to an internal error. Please contact a member of the staff." );
}
else
{
if ( pet is SwampDragon )
{
SwampDragon sd = (SwampDragon)pet;
sd.BardingExceptional = m_BardingExceptional;
sd.BardingCrafter = m_BardingCrafter;
sd.BardingHP = m_BardingHP;
sd.HasBarding = m_HasBarding;
sd.BardingResource = m_BardingResource;
}
if ( pet is EvolutionDragon )
{
EvolutionDragon evo = pet as EvolutionDragon;
evo.KP = m_PetKP;
evo.Stage = m_PetStage;
//evo.HasEgg = m_PetHasEgg;
//evo.AllowMating = m_PetAllowMating;
//evo.Pregnant = m_PetPregnant;
evo.S1 = m_PetS1;
evo.S2 = m_PetS2;
evo.S3 = m_PetS3;
evo.S4 = m_PetS4;
evo.S5 = m_PetS5;
evo.S6 = m_PetS6;
pet.BaseSoundID = m_PetSound;
//if ( m_PetPregnant == true )
//{
// evo.Blessed = false;
//}
//else if ( m_PetHasEgg == true )
//{
// evo.Blessed = false;
//}
}
if ( pet is BaseMount )
{
BaseMount mount = pet as BaseMount;
if ( m_MountID >= 0 )
mount.ItemID = m_MountID;
}
if ( m_PetBonded == true && m_PetOwner == from )
{
pet.IsBonded = true;
}
else if ( m_PetBonded == true && m_PetOwner != from )
{
from.SendMessage( 38, "This pet has lost its bonded status since you are not the original owner." );
pet.IsBonded = false;
}
else
{
pet.IsBonded = false;
}
pet.Title = m_PetTitle;
pet.Name = m_PetName;
pet.Female = m_IsFemale;
if ( m_PetBody >= 0 )
pet.BodyValue = m_PetBody;
if ( m_PetHue >= 0 )
pet.Hue = m_PetHue;
if ( m_PetSound >= 0 )
pet.BaseSoundID = m_PetSound;
if ( m_PetVArmor >= 0 )
pet.VirtualArmor = m_PetVArmor;
if ( m_PetMinDamage >= 0 )
pet.DamageMin = m_PetMinDamage;
if ( m_PetMaxDamage >= 0 )
pet.DamageMax = m_PetMaxDamage;
//Start Pet Stats
if ( m_PetStr >= 0 )
pet.RawStr = m_PetStr;
if ( m_PetDex >= 0 )
pet.RawDex = m_PetDex;
if ( m_PetInt >= 0 )
pet.RawInt = m_PetInt;
if ( m_PetHits >= 0 )
pet.HitsMaxSeed = m_PetHits;
if ( m_PetStam >= 0 )
pet.StamMaxSeed = m_PetStam;
if ( m_PetMana >= 0 )
pet.ManaMaxSeed = m_PetMana;
pet.Hits = m_PetHitsNow;
pet.Stam = m_PetStamNow;
pet.Mana = m_PetManaNow;
// End Pet Stats
// Start Resist Setting
if ( m_PetPhysicalResist >= 0 )
pet.PhysicalResistanceSeed = m_PetPhysicalResist;
if ( m_PetColdResist >= 0 )
pet.ColdResistSeed = m_PetColdResist;
if ( m_PetFireResist >= 0 )
pet.FireResistSeed = m_PetFireResist;
if ( m_PetPoisonResist >= 0 )
pet.PoisonResistSeed = m_PetPoisonResist;
if ( m_PetEnergyResist >= 0 )
pet.EnergyResistSeed = m_PetEnergyResist;
//End Resist Setting
//Start Damage Type Setting
if ( m_PetPhysicalDamage >= 0 )
pet.PhysicalDamage = m_PetPhysicalDamage;
if ( m_PetColdDamage >= 0 )
pet.ColdDamage = m_PetColdDamage;
if ( m_PetFireDamage >= 0 )
pet.FireDamage = m_PetFireDamage;
if ( m_PetPoisonDamage >= 0 )
pet.PoisonDamage = m_PetPoisonDamage;
if ( m_PetEnergyDamage >= 0 )
pet.EnergyDamage = m_PetEnergyDamage;
//End Damage Type Setting
//Start Setting Skills
if ( m_PetWrestling >= 0 )
pet.Skills[SkillName.Wrestling].Base = m_PetWrestling;
if ( m_PetTactics >= 0 )
pet.Skills[SkillName.Tactics].Base = m_PetTactics;
if ( m_PetResist >= 0 )
pet.Skills[SkillName.MagicResist].Base = m_PetResist;
if ( m_PetAnatomy >= 0 )
pet.Skills[SkillName.Anatomy].Base = m_PetAnatomy;
if ( m_PetPoisoning >= 0 )
pet.Skills[SkillName.Poisoning].Base = m_PetPoisoning;
if ( m_PetMagery >= 0 )
pet.Skills[SkillName.Magery].Base = m_PetMagery;
if ( m_PetEvalInt >= 0 )
pet.Skills[SkillName.EvalInt].Base = m_PetEvalInt;
if ( m_PetMed >= 0 )
pet.Skills[SkillName.Meditation].Base = m_PetMed;
//End Setting Skills
if ( m_PetOwner == from )
{
from.SendMessage( 38, "You have claimed your pet {0}.", m_PetName );
}
else if ( m_PetOwner != from )
{
from.SendMessage( 38, "You have claimed a {0}, Named {1}.", m_MobTypeString, m_PetName );
m_PetOwner.SendMessage( "{0} has claimed your old pet {1}.", from.Name, m_PetName );
}
IEntity p1 = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z ), from.Map );
IEntity p2 = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z + 50 ), from.Map );
Effects.SendMovingParticles( p1, p2, ShrinkTable.Lookup( m_PetBody ), 1, 0, true, false, 0, 3, 1153, 1, 0, EffectLayer.Head, 0x100 );
from.PlaySound( 492 );
pet.Controlled = true;
pet.ControlMaster = from;
pet.Location = from.Location;
pet.ControlOrder = OrderType.Follow;
pet.ControlTarget = from;
pet.Map = from.Map;
bool packanimal = false;
foreach ( string ispack in FSATS.PackAnimals )
{
if ( ispack == m_MobTypeString )
packanimal = true;
}
if ( packanimal == true )
{
}
else
{
List<Item> equipitems = new List<Item>( pet.Items );
foreach (Item item in equipitems)
{
if ( ( item.Layer != Layer.Bank ) && ( item.Layer != Layer.Hair ) && ( item.Layer != Layer.FacialHair ) )
{
item.Delete();
}
}
}
World.AddMobile( pet );
this.Delete();
}
}
}
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
if ( from.Alive )
{
if ( m_Locked == false && m_PetOwner == from )
{
list.Add( new ContextMenus.LockShrinkItem( from, this ) );
}
else if ( m_Locked == true && m_PetOwner == from )
{
list.Add( new ContextMenus.UnLockShrinkItem( from, this ) );
}
}
}
public override void AddNameProperties( ObjectPropertyList list )
{
base.AddNameProperties( list );
if ( m_MobTypeString != null )
{
if ( m_PetBonded != false )
list.Add( 1049608 );
if ( m_Locked == true )
{
list.Add( 1049644, "Locked" );
}
else
{
list.Add( 1049644, "Unlocked" );
}
list.Add( 1060663, "Name\t{0} Breed: {1}", m_PetName, m_MobTypeString );
list.Add( 1061640, (m_PetOwner == null ) ? "nobody" : m_PetOwner.Name ); // Owner: ~1_OWNER~
list.Add( 1060659, "Stats\tStrength {0}, Dexterity {1}, Intelligence {2}", m_PetStr, m_PetDex, m_PetInt );
list.Add( 1060660, "Combat Skills\tWrestling {0}, Tactics {1}, Anatomy {2}, Poisoning {3}", m_PetWrestling, m_PetTactics, m_PetAnatomy, m_PetPoisoning );
list.Add( 1060661, "Magic Skills\tMagery {0}, Eval Intel {1}, Magic Resist {2}, Meditation {3}", m_PetMagery, m_PetEvalInt, m_PetResist, m_PetMed );
if ( m_PetStage != 0 )
list.Add( 1060662, "KP\t{0}, Stage: {1}", m_PetKP, m_PetStage );
}
}
public ShrinkItem( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 7 ); // version
writer.Write( m_BardingExceptional );
writer.Write( m_BardingCrafter );
writer.Write( m_HasBarding );
writer.Write( m_BardingHP );
writer.Write( (int) m_BardingResource );
writer.Write( m_PetTitle );
writer.Write( m_PetS1 );
writer.Write( m_PetS2 );
writer.Write( m_PetS3 );
writer.Write( m_PetS4 );
writer.Write( m_PetS5 );
writer.Write( m_PetS6 );
writer.Write( m_IsFemale );
writer.Write( m_PetHitsNow );
writer.Write( m_PetStamNow );
writer.Write( m_PetManaNow );
writer.Write( m_MountID );
writer.Write( m_PetKP );
writer.Write( m_PetStage );
writer.Write( m_PetHasEgg );
writer.Write( m_PetAllowMating );
writer.Write( m_PetPregnant );
writer.Write( m_IsDeed );
writer.Write( m_Mob );
writer.Write( m_PetHue );
writer.Write( m_PetBonded );
writer.Write( m_PetOwner );
writer.Write( m_MobTypeString );
writer.Write( m_Locked );
writer.Write( m_PetMinTame );
writer.Write( m_PetControlSlots );
writer.Write( m_PetName );
writer.Write( m_PetMinDamage );
writer.Write( m_PetMaxDamage );
writer.Write( m_PetBody );
writer.Write( m_PetSound );
writer.Write( m_PetVArmor );
writer.Write( m_PetStr );
writer.Write( m_PetDex );
writer.Write( m_PetInt );
writer.Write( m_PetHits );
writer.Write( m_PetStam );
writer.Write( m_PetMana );
writer.Write( m_PetPhysicalResist );
writer.Write( m_PetColdResist );
writer.Write( m_PetFireResist );
writer.Write( m_PetPoisonResist );
writer.Write( m_PetEnergyResist );
writer.Write( m_PetPhysicalDamage );
writer.Write( m_PetColdDamage );
writer.Write( m_PetFireDamage );
writer.Write( m_PetPoisonDamage );
writer.Write( m_PetEnergyDamage );
writer.Write( m_PetWrestling );
writer.Write( m_PetTactics );
writer.Write( m_PetResist );
writer.Write( m_PetAnatomy );
writer.Write( m_PetPoisoning );
writer.Write( m_PetMagery );
writer.Write( m_PetEvalInt );
writer.Write( m_PetMed );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 7: // Swamp Dragon Armor Fix
{
m_BardingExceptional = reader.ReadBool();
m_BardingCrafter = reader.ReadMobile();
m_HasBarding = reader.ReadBool();
m_BardingHP = reader.ReadInt();
m_BardingResource = (CraftResource) reader.ReadInt();
goto case 6;
}
case 6:
{
m_PetTitle = reader.ReadString();
goto case 5;
}
case 5:
{
m_PetS1 = reader.ReadBool();
m_PetS2 = reader.ReadBool();
m_PetS3 = reader.ReadBool();
m_PetS4 = reader.ReadBool();
m_PetS5 = reader.ReadBool();
m_PetS6 = reader.ReadBool();
goto case 4;
}
case 4:
{
m_IsFemale = reader.ReadBool();
goto case 3;
}
case 3:
{
m_PetHitsNow = reader.ReadInt();
m_PetStamNow = reader.ReadInt();
m_PetManaNow = reader.ReadInt();
goto case 2;
}
case 2:
{
m_MountID = reader.ReadInt();
goto case 1;
}
case 1:
{
m_PetKP = reader.ReadInt();
m_PetStage = reader.ReadInt();
m_PetHasEgg = reader.ReadBool();
m_PetAllowMating = reader.ReadBool();
m_PetPregnant = reader.ReadBool();
goto case 0;
}
case 0:
{
m_IsDeed = reader.ReadBool();
m_Mob = (BaseCreature)reader.ReadMobile();
m_PetHue = reader.ReadInt();
m_PetBonded = reader.ReadBool();
m_PetOwner = reader.ReadMobile();
m_MobTypeString = reader.ReadString();
m_Locked = reader.ReadBool();
m_PetMinTame = reader.ReadDouble();
m_PetControlSlots = reader.ReadInt();
m_PetName = reader.ReadString();
m_PetMinDamage = reader.ReadInt();
m_PetMaxDamage = reader.ReadInt();
m_PetBody = reader.ReadInt();
m_PetSound = reader.ReadInt();
m_PetVArmor = reader.ReadInt();
m_PetStr = reader.ReadInt();
m_PetDex = reader.ReadInt();
m_PetInt = reader.ReadInt();
m_PetHits = reader.ReadInt();
m_PetStam = reader.ReadInt();
m_PetMana = reader.ReadInt();
m_PetPhysicalResist = reader.ReadInt();
m_PetColdResist = reader.ReadInt();
m_PetFireResist = reader.ReadInt();
m_PetPoisonResist = reader.ReadInt();
m_PetEnergyResist = reader.ReadInt();
m_PetPhysicalDamage = reader.ReadInt();
m_PetColdDamage = reader.ReadInt();
m_PetFireDamage = reader.ReadInt();
m_PetPoisonDamage = reader.ReadInt();
m_PetEnergyDamage = reader.ReadInt();
m_PetWrestling = reader.ReadDouble();
m_PetTactics = reader.ReadDouble();
m_PetResist = reader.ReadDouble();
m_PetAnatomy = reader.ReadDouble();
m_PetPoisoning = reader.ReadDouble();
m_PetMagery = reader.ReadDouble();
m_PetEvalInt = reader.ReadDouble();
m_PetMed = reader.ReadDouble();
break;
}
}
}
}
}

Also any pack animal thats got stuff in there backpack like llama or beetle if you try to shrink it will give you this message you must first unload pet before shrinking
heres that part of script that makes that work like that.

CODE
using System; using Server; namespace Server { /*
* Custom Mod Of The FS-ATS by. RoninGT
* Converted by. RoninGT
*/
public class FSATS
{
//Add all pets that do not require any tameing to control/ride
public static string[] NoTamingNeeded = new string[]
{
"Horse",
"RidableLlama",
"ForestOstard",
"DesertOstard",
"SwampDragon",
"Ridgeback",
"PackHorse",
"PackLlama",
"Beetle",
"FireBeetle"
};
//Add all pack animals for your server here.
public static string[] PackAnimals = new string[]
{
"PackHorse",
"PackLlama",
"Beetle"
};
}
}

Question is how can i fix this issue on the mounts that you tame so when i shrink it and unshrink can say gizmo drop and drops what ever it got also wanna make sure that if this can get fixed that after i make it drop and i shrink him back and unshrink him again that if i said gizmo drop shouldnt drop either just incase Thank You.
ArteGordon- 03-27-2007
in general, this is not a good way to shrink creatures. The right way to do this is to simply internalize it, and then when you unshrink it, you just move it off of the internal map. That way you dont have to try to restore all of the settings when you unshrink by making a new creature which is how this system does it.
I would look at Xanthos' shrink system that I believe uses the internalizing approach.
Does the creature respond to any command after unshrinking? I think the problem is that it doesnt restore the AI of the creature.
After you unshrink it, try setting the ai by doing
[xmlset AI AI_Animal
and if it responds to commands after that, then the problem is the ai.
Erica- 03-27-2007

QUOTE (ArteGordon @ March 27, 2007 09:45 am)
in general, this is not a good way to shrink creatures. The right way to do this is to simply internalize it, and then when you unshrink it, you just move it off of the internal map. That way you dont have to try to restore all of the settings when you unshrink by making a new creature which is how this system does it.
I would look at Xanthos' shrink system that I believe uses the internalizing approach.
Does the creature respond to any command after unshrinking? I think the problem is that it doesnt restore the AI of the creature.
After you unshrink it, try setting the ai by doing
[xmlset AI AI_Animal
and if it responds to commands after that, then the problem is the ai.

Thanks his works changed to xantho's shrink his works the way it should Thanks Again ArteGordon.