private int m_Charges = ShrinkConfig.ShrinkCharges;
private int m_Charges = 1;
I opened it with a text editor.......worked great......Thanks sooooo much for all the help!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!
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.
// 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);
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.
Look at the top of your Craft file. Did you add . . . using Xanthos.ShrinkSystem;
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
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;
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;
public enum BlessStatus
{
All, // All shrink items are blessed
BondedOnly, // Only shrink items for bonded pets are blessed
None // No shrink items are blessed
}
<LootStatus>BlessStatus.BondedOnly</LootStatus>
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)
else if ( target is Item )
from.SendMessage( "You cannot shrink that!" );
else if ( target == null)
from.SendMessage( "You must specifiy a target." );
I Unfortunately am still experiencing the same problem.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.
Thank you, Lead me straight to Line 112 of ShrinkCommand.cs Wasn't even aware you could do that.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.
We use essential cookies to make this site work, and optional cookies to enhance your experience.