Does anyone have a working Pet Slot Increase deed?

Dvdci84

Gold Donator
Jan 2, 2020
69
6
8
I've been seeing if I can chop one together by modifying another script however it's kicking back some errors for my ServUO server.

Just curious if someone has one working already.

Here is my hack version with errors.

using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;
using Server;

namespace Server.Items
{
public class PetSlotIncDeedTarget : Target
{
private PetSlotIncDeed m_Deed;

public PetSlotIncDeedTarget( PetSlotIncDeed deed ) : base( 1, false, TargetFlags.None )
{
m_Deed = deed;
}

protected override void OnTarget( Mobile from, object target )
{
if ( target is Mobile )

{

int augment = + 1; //, (set max .Attributes.Luck =200);
int augmentper = + 1;

//int augment = ( ( Utility.Random( 2 ) ) /* scalar*/ ) + 25;
//int augmentper = ( ( Utility.Random( 4 ) ) /* scalar*/ ) + 50;

Item item = (Item)target;
if (Mobile)
{
if ( Mobile.m_FollowersMax >= 10 ) from.SendMessage( "You can't add more pet slots!");
else
{
if( item.RootParent != from ) from.SendMessage( "You can't add more pet slots!" );
else
{
Mobile.m_FollowersMax += augmentper;
from.SendMessage( "You magically add unlock another pet slot...." );
m_Deed.Delete();
}
}
}
}
else from.SendMessage( "You can not add pet slots to that" );
}
}

public class PetSlotIncDeed : Item
{
[Constructable]
public PetSlotIncDeed() : base( 0x14F0 )
{
Name = "A Pet Slot Deed +1";
Hue = 1153; //100 luck deed use 1260, for 300+ use 1259
Weight = 1.0;
}
//public override void GetProperties( ObjectPropertyList list )
//{
//base.GetProperties( list );

//list.Add( "<BASEFONT COLOR=#FFC300>\u0022Armor, Weapon and Shields\u0022<BASEFONT COLOR=#FFC300>" );
//}
public PetSlotIncDeed(Serial serial) : base(serial){}
public override void Serialize( GenericWriter writer ) {base.Serialize( writer ); writer.Write( (int) 0 );}
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt();}

public override bool DisplayLootType{ get{ return false; } }

public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) ) from.SendLocalizedMessage( 1042001 );
else
{
from.SendMessage("Target self to add increase your max pet slots." );
from.Target = new PetSlotIncDeedTarget( this );
}
}
}
}

Errors:
+ customs/UOEvolutionBased/PetSlotIncDeed.cs:
CS0119: Line 32: 'Mobile' is a type, which is not valid in the given context
CS0117: Line 34: 'Mobile' does not contain a definition for 'm_FollowersMax'
CS0117: Line 40: 'Mobile' does not contain a definition for 'm_FollowersMax'
Scripts: One or more scripts failed to compile or no script files were found.
 

Tukaram

Squire
Jan 4, 2015
351
53
28
56
Have you looked at the stable slot increase token? It is comes with ServUO and is in scripts/items/storebought. You might be able to tweak that to adjust pet control slots?
 

Visam

Squire
Mar 19, 2015
314
79
28
47
I modified what you had to the following it should work.

C#:
using System;
using Server;
using Server.Mobiles;

namespace Server.Items
{
    public class PetSlotIncDeed: Item
    {
        [Constructable]
        public PetSlotIncDeed() : base(0x14F0)
        {
            Name = "A Pet Slot Deed +1";
            Hue = 1153;
            Weight = 1.0;
        }

        public PetSlotIncDeed(Serial serial) : base(serial) {}

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int) 0);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        }

        public override bool DisplayLootType { get { return false; } }

        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
                from.SendLocalizedMessage(1042001);
            else
            {
                if (from is PlayerMobile)
                {
                    PlayerMobile pm = from as PlayerMobile;
                    if (pm.FollowersMax >= 10) from.SendMessage("You can't add more pet slots!");
                    else
                    {
                            pm.FollowersMax += 1;
                            pm.SendMessage("You magically add unlock another pet slot....");
                            Delete();
                    }
                }
            }
        }
    }
}
 

XenoZHI

Citizen
Feb 20, 2020
4
0
1
C#:
using System;
using Server;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Misc;
using Server.Mobiles;

namespace Server.Items
{
   public class PetSlotDeed : Item
   {
      [Constructable]
      public PetSlotDeed() : base( 5360 )
      {
         base.Weight = 1.0;
         base.Name = "A Pet Slot Deed +1";
                  base.Hue = 0x481;
         LootType = LootType.Blessed;
      }

      public PetSlotDeed( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );
         writer.Write( (int) 0 ); // version
      }

      public override void Deserialize( GenericReader reader )
      {
         base.Deserialize( reader );
         int version = reader.ReadInt();
      }

      public override void OnDoubleClick( Mobile from )
      {
      PlayerMobile mobile = from as PlayerMobile;

                if ( !IsChildOf( from.Backpack ) )
       {
         from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
       }
         else if ( mobile.FollowersMax >= 25 )
         {
            mobile.SendMessage( "You are not allowed more than 25 pet slots." );
         }
         else
         {
                         mobile.FollowersMax += 1;
              mobile.SendMessage( "You have gained +1 to your maximum pet slots." );
            

                              Effects.SendLocationParticles( EffectItem.Create( from.Location, from.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 );
                     Effects.PlaySound( from.Location, from.Map, 0x243 );
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
                     Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 4, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
                     Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 4, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
               Delete();
            }
         }
      }
   }
 

Dvdci84

Gold Donator
Jan 2, 2020
69
6
8
Thanks for the responses....works like a charm
Post automatically merged:

I modified what you had to the following it should work.

C#:
using System;
using Server;
using Server.Mobiles;

namespace Server.Items
{
    public class PetSlotIncDeed: Item
    {
        [Constructable]
        public PetSlotIncDeed() : base(0x14F0)
        {
            Name = "A Pet Slot Deed +1";
            Hue = 1153;
            Weight = 1.0;
        }

        public PetSlotIncDeed(Serial serial) : base(serial) {}

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int) 0);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        }

        public override bool DisplayLootType { get { return false; } }

        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
                from.SendLocalizedMessage(1042001);
            else
            {
                if (from is PlayerMobile)
                {
                    PlayerMobile pm = from as PlayerMobile;
                    if (pm.FollowersMax >= 10) from.SendMessage("You can't add more pet slots!");
                    else
                    {
                            pm.FollowersMax += 1;
                            pm.SendMessage("You magically add unlock another pet slot....");
                            Delete();
                    }
                }
            }
        }
    }
}
FYI, this code allowed for the pet slots to go beyond 10 for some reason.
Post automatically merged:

C#:
using System;
using Server;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Misc;
using Server.Mobiles;

namespace Server.Items
{
   public class PetSlotDeed : Item
   {
      [Constructable]
      public PetSlotDeed() : base( 5360 )
      {
         base.Weight = 1.0;
         base.Name = "A Pet Slot Deed +1";
                  base.Hue = 0x481;
         LootType = LootType.Blessed;
      }

      public PetSlotDeed( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );
         writer.Write( (int) 0 ); // version
      }

      public override void Deserialize( GenericReader reader )
      {
         base.Deserialize( reader );
         int version = reader.ReadInt();
      }

      public override void OnDoubleClick( Mobile from )
      {
      PlayerMobile mobile = from as PlayerMobile;

                if ( !IsChildOf( from.Backpack ) )
       {
         from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
       }
         else if ( mobile.FollowersMax >= 25 )
         {
            mobile.SendMessage( "You are not allowed more than 25 pet slots." );
         }
         else
         {
                         mobile.FollowersMax += 1;
              mobile.SendMessage( "You have gained +1 to your maximum pet slots." );
           

                              Effects.SendLocationParticles( EffectItem.Create( from.Location, from.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 );
                     Effects.PlaySound( from.Location, from.Map, 0x243 );
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
                     Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 4, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
                     Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 4, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
               Delete();
            }
         }
      }
   }

Feedback, this code works and can be set to max out at different level via manipulation of the script. Cap works. Thank you very much!
 
Last edited:

XenoZHI

Citizen
Feb 20, 2020
4
0
1
Feedback, this code works and can be set to max out at different level via manipulation of the script. Cap works. Thank you very much!
Nice, your welcome! :)
 

KelG

Rookie
Apr 1, 2018
55
2
8
35
Is there a downloadable file for this?where do I copy and paste this code to?
 
Jul 16, 2014
57
10
8
42
Parts Unknown
Shard Name
Phoenyx Rising (not public at this time)
Donate
Donate money to this user
checked on my end same result with a few of the account bound tokens unless they are set as a reward then it leaves the accounbt name blank i dont know how to fix this if i figure it out i will post here
 

KelG

Rookie
Apr 1, 2018
55
2
8
35
This might actually just be outdated because I seen there was slot deed already in the system as opposed to the slot token I added...I just typed [add PetSlotDeed and there it was!
 

manwitch

Squire
Jul 13, 2017
266
36
28
56

if you don't want the other scripts you can just throw them out and use the pet slot deed on its own I think.
 

KelG

Rookie
Apr 1, 2018
55
2
8
35
I went to start up server and my it says the petslotdeed.cs is missing... weird. it was there earlier.
Post automatically merged:

Its like it was removed from server items...
Post automatically merged:

Sorry scratch my previous post. I got some things mixed up....
XenoZHI code worked for me! Thanks .Sorry for the mix up
 
Last edited:
Jul 16, 2014
57
10
8
42
Parts Unknown
Shard Name
Phoenyx Rising (not public at this time)
Donate
Donate money to this user
with the account bound items if they are not working try [set account (name of account) hit enter it should set it yo bound to the proper person then
 
  • Like
Reactions: KelG