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.
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.