It sounds like ShrinkConfig.xml isn't opening in a text editor. I think the default Windows option makes it open in a web browser.

Right-click the file and choose "Open with" and pick a text editor there. Then you should be able to change the ShrinkCharges variable and save the file.

Or, if that just won't work, just edit the petleash.cs and hitchingpost.cs files directly to change
Code:
private int m_Charges = ShrinkConfig.ShrinkCharges;

to

Code:
private int m_Charges = 1;

and enjoy. After all, you aren't going to be changing these options frequently!
 
It sounds like ShrinkConfig.xml isn't opening in a text editor. I think the default Windows option makes it open in a web browser.

Right-click the file and choose "Open with" and pick a text editor there. Then you should be able to change the ShrinkCharges variable and save the file.

Or, if that just won't work, just edit the petleash.cs and hitchingpost.cs files directly to change
Code:
private int m_Charges = ShrinkConfig.ShrinkCharges;

to

Code:
private int m_Charges = 1;

and enjoy. After all, you aren't going to be changing these options frequently!
I opened it with a text editor.......worked great......Thanks sooooo much for all the help!
 
You should be able to use a text editor to open and change the .xml file unless you computer has changed the 'Permissions' on the file or the folder it is in.
 
You also need to add using Xanthos.ShrinkSystem; at the top area of SBProvisioner


OOPS! sorry . . looks like you got it solved. As a side note I added the pet leash to the Tailor Craft menu so Tailors could make and sell them to other players.

How did you get it to name as pet leash?

I did this and see the errors below

C#:
// HitchingPost
            
            index = AddCraft(typeof(HitchingPostEastAddon), 1011173, "Hitching Post (east)", 100.0, 120.0, typeof(IronIngot), 1044036, 100, 1044253);
            AddRes(index, typeof(SmallPieceofBlackrock), 1150016, 10, 1044253);
            AddRes(index, typeof(Board), 1044041, 50, 1044351);
            AddSkill(index, SkillName.Carpentry, 70.0, 100.0);
            
            index = AddCraft(typeof(HitchingPostSouth), 1011173, "Hitching Post (south)", 100.0, 120.0, typeof(IronIngot), 1044036, 100, 1044253);
            AddSkill(index, SkillName.Carpentry, 70.0, 100.0);
            AddRes(index, typeof(SmallPieceofBlackrock), 1150016, 10, 1044253);
            AddRes(index, typeof(Board), 1044041, 50, 1044351);
            
            
            // Pet Leash
            index = AddCraft(typeof(PetLeash), 1011173, "Pet Leash", 100.0, 120.0, typeof(Leather), 1044462, 10, 1044463);
            AddSkill(index, SkillName.Tailoring, 70.0, 100.0);
            AddRes(index, typeof(Cloth), 1044455, 30, 1044287);
            AddRes(index, typeof(SmallPieceofBlackrock), 1150016, 10, 1044253);

My Errors:
Errors:
 + Services/Craft/DefBlacksmithy.cs:
    CS0246: Line 812: The type or namespace name `HitchingPostSouthDeed' could not be found. Are you missing `Xanthos.ShrinkSystem' using directive?
    CS0246: Line 817: The type or namespace name `HitchingPostEastDeed' could not be found. Are you missing `Xanthos.ShrinkSystem' using directive?
    CS0246: Line 824: The type or namespace name `PetLeash' could not be found. Are you missing `Xanthos.ShrinkSystem' using directive?
Scripts: One or more scripts failed to compile or no script files were found.
 
So, I am having issues where the shrunken pets will not bless. I have it set to ALL but this is still not blessing the statue of the pet. Here is what I have below

ShrinkConfig.cs section lines 23-39:
public class ShrinkConfig
    {
        public enum BlessStatus
        {
            All,        // All shrink items are blessed
            BondedOnly,    // Only shrink items for bonded pets are blessed
            None        // No shrink items are blessed
        }

        public static bool PetAsStatuette = true;        // Deed or statuette form
        public static bool AllowLocking = false;        // Allow players to lock the shrunken pet or not
        public static bool ShowPetDetails = true;        // Show stats and skills on the properties of the shrunken pet
        public static double ShrunkenWeight = 10.0;
        public static bool BlessedLeash = true;
        public static BlessStatus LootStatus = BlessStatus.All;    // How the shruken pet should be as loot
        public static double TamingRequired = 0;        // set to zero for no skill requirement to use shrink tools
        public static int ShrinkCharges = -1;            // set to -1 for infinite uses

not sure why this commit will not allow "Blessed"
 
I don't know if you solved this or even if the following will help but I checked over my Shrink Files for 'Blessed' and found it in four places. You might want to look at yours.

FIRST - In ShrinkCommand.cs . . look under the section:
protected override void OnTarget( Mobile from, object target )

and look for something like this:
*********************************
Code:
else if ( !(target is BaseEvo || target is BaseEvoMount) )
    from.SendMessage( "You can only use this on Evolution creatures!" );
else
{
    pet.Loyalty = BaseCreature.MaxLoyalty;
    pet.Blessed = true;


SECOND - In ShrinkItem.cs . . look under the section:
private void ShrinkPet( BaseCreature pet )

and look for something like this:
*********************************
Code:
            if ( ShrinkConfig.LootStatus == ShrinkConfig.BlessStatus.All
                || ( m_Pet.IsBonded && ShrinkConfig.LootStatus == ShrinkConfig.BlessStatus.BondedOnly ))
                LootType = LootType.Blessed;
            else
                LootType = LootType.Regular;

            m_Pet.Internalize();
            m_Pet.SetControlMaster( null );
            m_Pet.ControlOrder = OrderType.Stay;
            m_Pet.SummonMaster = null;
            m_Pet.IsStabled = true;

THIRD - In ShrinkCinfig.cs . . look under the section:
public class ShrinkConfig

and look for something like this:
*********************************
Code:
        public enum BlessStatus
        {
            All,        // All shrink items are blessed
            BondedOnly,    // Only shrink items for bonded pets are blessed
            None        // No shrink items are blessed
        }

Fourth (and final) . . In your Data folder in ShrinkConfig.xml . .

and look for something like this:
*********************************
Code:
        <LootStatus>BlessStatus.BondedOnly</LootStatus>

It is possible you overlooked the ShrinkConfig.xml in your Data folder.

I hope this helps.
 
I'm having an Issue where Players who mis-click (Missing their pet) and clicking the ground causes a Crash.

C#:
Server Crash Report
===================

ServUO Version 0.5, Build 7637.18660
Operating System: Microsoft Windows NT 6.2.9200.0
.NET Framework: 4.0.30319.42000
Time: 1/4/2021 3:49:36 AM
Mobiles: 77708
Items: 254566
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Xanthos.ShrinkSystem.ShrinkTarget.OnTarget(Mobile from, Object target)
   at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
   at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

Would Naturally Assume Im missing an "If Else or Else" Catch somewhere but not sure where
 

Attachments

  • XantosShrink.rar
    21.4 KB · Views: 13
Targeting anything other than a mobile (aka an item) would trigger this part:
Code:
            else if ( target is Item )
                from.SendMessage( "You cannot shrink that!" );

and clicking the ground would result in no target -- and no targeting action, not a null target. Still, we all know nulls can happen and it's better to have a provision for them that never gets used than to need one and not have it!

As a quick fix I'd just add:
Code:
            else if ( target == null)
                from.SendMessage( "You must specifiy a target." );

to that part of ShrinkCommand.cs just to cover all the bases.
 
Targeting anything other than a mobile (aka an item) would trigger this part:
Code:
            else if ( target is Item )
                from.SendMessage( "You cannot shrink that!" );

and clicking the ground would result in no target -- and no targeting action, not a null target. Still, we all know nulls can happen and it's better to have a provision for them that never gets used than to need one and not have it!

As a quick fix I'd just add:
Code:
            else if ( target == null)
                from.SendMessage( "You must specifiy a target." );

to that part of ShrinkCommand.cs just to cover all the bases.
I Unfortunately am still experiencing the same problem.
 
Run your server in debug mode so the error will tell you the exact line it's happening on. Otherwise we're just guessing at where the null reference is being made.
 
Run your server in debug mode so the error will tell you the exact line it's happening on. Otherwise we're just guessing at where the null reference is being made.
Thank you, Lead me straight to Line 112 of ShrinkCommand.cs Wasn't even aware you could do that.
Thank you very much.
 
just tried the petleash works great thank you
Post automatically merged:

now if i can figure out how to get a vender stone going ill be golden:)
 
Back