Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 10-23-2006, 01:35 PM   #26 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default

I'm having that same issue, I'm testing right now to see if the problem only exists for custom pets, or all pets.
Same problem exists for regular unmodified horses as well.
__________________
In some cases stupid makes you win-Radwen
Johabius is offline   Reply With Quote
Old 10-24-2006, 01:40 AM   #27 (permalink)
Xanthos
Guest
 
Posts: n/a
Default

Ok, I must have a bug - I will look into this soon.
  Reply With Quote
Old 10-25-2006, 06:14 PM   #28 (permalink)
DragonDan
Guest
 
Posts: n/a
Smile Great System

Xanthos you have a great system so don't be sad if there is a few little bugs. We are all human and just have a problem when we try to do things because its inevitable our work will have a bug or two that's computers for you. Now you know why many computer programmers have nervous breakdowns or job burnout after 10 years or so! Keep at it my friend we know you will work it out and we still enjoy your system and will live with a few little quirks. Keep up the good work!
BTW for those of you that get the little ball for a shrunken pet here is an example how to make it all work. PM me if you need help always glad to help. Oh Mabuhay! from the Philippines! This place really is paradise. It was a big move but I love it here! Oh my example follows now
Code:
#ME Mobiles

265	0x2D8B
this is the code for a hydra the 265 is its body code and the 0x2D8B is the item id (don't forget to TAB from the body code to the item id! Have fun everyone!
  Reply With Quote
Old 11-10-2006, 01:08 AM   #29 (permalink)
DragonDan
Guest
 
Posts: n/a
Thumbs up

I think I have kinda sorta solved the issue of not having the pets say more than "a shrunken pet". I could not accomplish this without adding to 2 lines of the script (sorry for altering your work) I have enclosed the following code to show you what I did to get the info gump to show itself. It's very nice now and my players are very happy with the change. I hope you appreciate my help with the quandry of no name for shrunken pet. I love your system and we have not had any problems with the system at all.
In the ShrinkItem.cs file
Look for line 70
Change this:
Code:
Name = "a shrunken pet";
To this:
Code:
Name = m_Name + "a shrunken pet";
Then look at line 240
Change this:
Code:
list.Add( 1060663, "Name\t{0} Breed: {1} Gender: {2}", m_Name,m_IsBonded, m_Breed, m_Gender );
To this:
Code:
list.Add( 1060663, "Name\t{0} Bonded: {1} Breed: {2} Gender: {3}", m_Name,m_IsBonded, m_Breed, m_Gender );
this is so it will display true or false if the pet is bonded.
If the details still don't display make sure this line in ShrinkConfig.xml in the C:\data folder looks like this:
Code:
<ShowPetDetails type="bool">true</ShowPetDetails>
Hope I did a good job. Always glad to help.
Daniel
  Reply With Quote
Old 11-10-2006, 08:05 PM   #30 (permalink)
Forum Newbie
 
Join Date: Oct 2005
Location: Arkansas
Age: 22
Posts: 82
Send a message via MSN to mandys boy Send a message via Yahoo to mandys boy
Default Nice

Nicly Done
__________________
:) :) Thanx Alot:) :)
mandys boy is offline   Reply With Quote
Old 11-11-2006, 09:26 PM   #31 (permalink)
Xanthos
Guest
 
Posts: n/a
Default

Version 2.1 has been posted. This version fixes problems with the display of the pet name and properties.

- Fixed an overwritten value in ShrinkConfig.cs that caused ShowPetDetails to take on the wrong value.
- Bonded status and name now appear in the properties of the ShrinkItem when ShowPetDetails is false, otherwise the full pet details are shown.
  Reply With Quote
Old 04-12-2007, 12:22 AM   #32 (permalink)
Forum Newbie
 
munkie's Avatar
 
Join Date: Jan 2003
Posts: 65
Default

I'm using this on a Pre-AOS shard, and the shrunken pets are only named "a shrunken pet". Is there anyway to make it show its stats? (I also enabled to show them, but i suspect this is aos and higher only?)
munkie is offline   Reply With Quote
Old 04-27-2007, 12:20 AM   #33 (permalink)
Forum Novice
 
ABTOP's Avatar
 
Join Date: Sep 2006
Location: Ukraine
Posts: 930
Default

Hmmm Still bug. Please help fix it.
This lines
Code:
	public class LockShrinkItem : ContextMenuEntry
	{
		private Mobile m_From;
		private ShrinkItem m_ShrinkItem;

		public LockShrinkItem( Mobile from, ShrinkItem shrink ) : base( 2029, 5 )
		{
			m_From = from;
			m_ShrinkItem = shrink;
		}

		public override void OnClick()
		{
			m_ShrinkItem.Locked = true;
			m_From.SendMessage( 38, "You have locked this shrunken pet so only you can reclaim it." );
		}
	}

	public class UnLockShrinkItem : ContextMenuEntry
	{
		private Mobile m_From;
		private ShrinkItem m_ShrinkItem;

		public UnLockShrinkItem( Mobile from, ShrinkItem shrink ) : base( 2033, 5 )
		{
			m_From = from;
			m_ShrinkItem = shrink;
		}

		public override void OnClick()
		{
			m_ShrinkItem.Locked = false;
			m_From.SendMessage( 38, "You have unlocked this shrunken pet, now anyone can reclaim it as theirs." );
		}
	}
Whn i locked shrink pet and then make SingleClick i got menu UnLock but i cant lock when i make SinglClick on Unlocked pet nothing not happen...
So i can UnLock and cant lock....
This is full script
Code:
/**************************************
*Script Name: Xanthos's Shrink System *
*Author: Joeku AKA Demortris          *
*For use with RunUO 2.0               *
*Client Tested with: 5.0.2b           *
*Version: 1.17                        *
*Initial Release: 07/18/06            *
*Revision Date: 07/18/06              *
**************************************/

#region AuthorHeader
//
//	Shrink System version 1.16, by Xanthos
//
//
#endregion AuthorHeader

using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Targeting;
using System.Collections;
using System.Collections.Generic;
using Server.ContextMenus;
using Xanthos.Utilities;
using Xanthos.Interfaces;
using Server.Regions;

namespace Xanthos.Evo
{
	public class ShrinkItem : Item, IShrinkItem
	{
		// Persisted
		private bool m_IsStatuette;
		private bool m_Locked;
		private Mobile m_Owner;
		private BaseCreature m_Pet;

		// Not persisted; lazy loaded.
		private bool m_PropsLoaded;
		private string m_Breed;
		private string m_Gender;
		private bool m_IsBonded;
		private string m_Name;
		private int m_RawStr;
		private int m_RawDex;
		private int m_RawInt;
		private double m_Wrestling;
		private double m_Tactics;
		private double m_Anatomy;
		private double m_Poisoning;
		private double m_Magery;
		private double m_EvalInt;
		private double m_MagicResist;
		private double m_Meditation;
		private double m_Archery;
		private double m_Fencing;
		private double m_Macing;
		private double m_Swords;
		private double m_Parry;
		//private int m_EvoEp;
		//private int m_EvoStage;

		private bool m_IgnoreLockDown;	// Is only ever changed by staff

		[CommandProperty( AccessLevel.GameMaster )]
		public bool IsStatuette
		{
			get { return m_IsStatuette; }
			set
			{
				if ( null == ShrunkenPet )
				{
					ItemID = 0xFAA;
					Name = "unlinked shrink item!";
				}
				else if ( m_IsStatuette = value )
				{
					ItemID = ShrinkTable.Lookup( m_Pet );
					Name = "a shrunken pet";
				}
				else
				{
					ItemID = 0x14EF;
					Name = "a pet deed";
				}
			}
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public bool IgnoreLockDown
		{
			get { return m_IgnoreLockDown; }
			set { m_IgnoreLockDown = value; InvalidateProperties(); }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public bool Locked
		{
			get { return m_Locked; }
			set { m_Locked = value; InvalidateProperties(); }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public Mobile Owner
		{
			get { return m_Owner; }
			set { m_Owner = value; InvalidateProperties(); }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public BaseCreature ShrunkenPet
		{
			get { return m_Pet; }
			set { m_Pet = value; InvalidateProperties(); }
		}

		public ShrinkItem() : base()
		{
		}

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

		public ShrinkItem( BaseCreature pet ) : this()
		{
			ShrinkPet( pet );
			IsStatuette = ShrinkConfig.PetAsStatuette;
			m_IgnoreLockDown = false; // This is only used to allow GMs to bypass the lockdown, one pet at a time.
			Weight = ShrinkConfig.ShrunkenWeight;

			//if ( !( m_Pet is Xanthos.Evo.Mercenary ))
				Hue = m_Pet.Hue;
		}

		public override void OnDoubleClick( Mobile from )
		{
			if ( !m_PropsLoaded )
				PreloadProperties();

			if ( !IsChildOf( from.Backpack ) )
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.

			else if ( m_Pet == null || m_Pet.Deleted || ItemID == 0xFAA )
				from.SendMessage( "Due to unforseen circumstances your pet is lost forever." );

			else if ( m_Locked && m_Owner != from )
			{
				from.SendMessage( "This is locked and only the owner can claim this pet while locked." );
				from.SendMessage( "This item is now being returned to its owner." );
				m_Owner.AddToBackpack( this );
				m_Owner.SendMessage( "Your pet {0} has been returned to you because it was locked and {1} was trying to claim it.", m_Breed, from.Name );
			}
			else if ( from.Followers + m_Pet.ControlSlots > from.FollowersMax )
				from.SendMessage( "You have to many followers to claim this pet." );

			else if ( Server.Spells.SpellHelper.CheckCombat( from ) )
				from.SendMessage( "You cannot reclaim your pet while your fighting." );

			else if ( ShrinkCommands.LockDown == true && !m_IgnoreLockDown )
				from.SendMessage( 54, "The server is on a shrinkitem lockdown. You cannot unshrink your pet at this time." );

			else if ( !m_Pet.CanBeControlledBy( from ))
				from.SendMessage( "You do not have the required skills to control this pet.");

			else
				UnshrinkPet( from );
		}

		private void ShrinkPet( BaseCreature pet )
		{
			m_Pet = pet;
			m_Owner = pet.ControlMaster;
				
			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;

			//if ( pet is IEvoCreature )
				//((IEvoCreature)m_Pet).OnShrink( this );
		}

		private void UnshrinkPet( Mobile from )
		{
			m_Pet.SetControlMaster( from );
			m_Pet.IsStabled = false;
			m_Pet.MoveToWorld( from.Location, from.Map );
			if ( from != m_Owner )
				m_Pet.IsBonded = false;

			m_Pet = null;
			this.Delete();
		}

		// Summoning orb was used so dispose of the shrink item
		public void OnPetSummoned()
		{
			m_Pet = null;
			Delete();
		}

		public override void Delete()
		{
			if ( m_Pet != null )
				m_Pet.Delete();

			base.Delete();
		}

		public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
		{
			base.GetContextMenuEntries( from, list );

			if (( ShrinkConfig.AllowLocking || m_Locked == true ) && from.Alive && m_Owner == from )
			{
				if ( m_Locked == false )
					list.Add( new LockShrinkItem( from, this ) );
				else
					list.Add( new UnLockShrinkItem( from, this ) );
			}
		}

		public override void AddNameProperties( ObjectPropertyList list )
		{
			base.AddNameProperties( list );

			if ( null == m_Pet || m_Pet.Deleted )
				return;

			if ( !m_PropsLoaded )
				PreloadProperties();

			if ( m_IsBonded && ShrinkConfig.BlessStatus.None == ShrinkConfig.LootStatus )	// Only show bonded when the item is not blessed
				list.Add( 1049608 );

			if ( ShrinkConfig.AllowLocking || m_Locked )	// Only show lock status when locking enabled or already locked
				list.Add( 1049644, ( m_Locked == true ) ? "Locked" : "Unlocked" );
		
			if ( ShrinkConfig.ShowPetDetails )
			{
				list.Add( 1060663, "Name\t{0} Breed: {1} Gender: {2}", m_Name, m_Breed, m_Gender );
				list.Add( 1061640, ( null == m_Owner ) ? "nobody" : m_Owner.Name ); // Owner: ~1_OWNER~
				list.Add( 1060659, "Stats\tStrength {0}, Dexterity {1}, Intelligence {2}", m_RawStr, m_RawDex, m_RawInt );
				list.Add( 1060660, "Combat Skills\tWrestling {0}, Tactics {1}, Anatomy {2}, Poisoning {3}", m_Wrestling, m_Tactics, m_Anatomy, m_Poisoning );
				list.Add( 1060661, "Magic Skills\tMagery {0}, Eval Intel {1}, Magic Resist {2}, Meditation {3}", m_Magery, m_EvalInt, m_MagicResist, m_Meditation );
				if ( !( 0 == m_Parry && 0 == m_Archery ))
					list.Add( 1060661, "Weapon Skills\tArchery {0}, Fencing {1}, Macing {2}, Parry {3}, Swords {4}", m_Archery, m_Fencing, m_Macing, m_Parry, m_Swords );
				//if ( m_EvoEp > 0 )
					//list.Add( 1060662, "EP\t{0}, Stage: {1}", m_EvoEp, m_EvoStage + 1 );
			}
		}

		private void PreloadProperties()
		{
			if ( null == m_Pet )
				return;

			m_IsBonded = m_Pet.IsBonded;
			m_Name = m_Pet.Name;
			
			m_Gender = (m_Pet.Female ? "Female" : "Male");
			m_Breed = GetFormattedBreedString( m_Pet ); //m_Breed = Xanthos.Evo.BaseEvo.GetFormattedBreedString( m_Pet );
			m_RawStr = m_Pet.RawStr;
			m_RawDex = m_Pet.RawDex;
			m_RawInt = m_Pet.RawInt;
			m_Wrestling = m_Pet.Skills[SkillName.Wrestling].Base;
			m_Tactics = m_Pet.Skills[SkillName.Tactics].Base;
			m_Anatomy = m_Pet.Skills[SkillName.Anatomy].Base;
			m_Poisoning = m_Pet.Skills[SkillName.Poisoning].Base;
			m_Magery = m_Pet.Skills[SkillName.Magery].Base;
			m_EvalInt = m_Pet.Skills[SkillName.EvalInt].Base;
			m_MagicResist = m_Pet.Skills[SkillName.MagicResist].Base;
			m_Meditation = m_Pet.Skills[SkillName.Meditation].Base;
			m_Parry = m_Pet.Skills[SkillName.Parry].Base;
			m_Archery = m_Pet.Skills[SkillName.Archery].Base;
			m_Fencing = m_Pet.Skills[SkillName.Fencing].Base;
			m_Swords = m_Pet.Skills[SkillName.Swords].Base;
			m_Macing = m_Pet.Skills[SkillName.Macing].Base;

			//Xanthos.Evo.BaseEvo evo = m_Pet as Xanthos.Evo.BaseEvo;

			//if ( null != evo )
			//{
				//m_EvoEp = evo.Ep;
				//m_EvoStage = evo.Stage;
			//}

			m_PropsLoaded = true;
		}

		public static bool IsPackAnimal( BaseCreature pet )
		{
			if ( null == pet || pet.Deleted )
				return false;

			Type breed = pet.GetType();

			foreach ( Type packBreed in ShrinkConfig.PackAnimals )
				if ( packBreed == breed )
					return true;
	
			return false;
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int)0 ); // version
			writer.Write( m_IsStatuette );
			writer.Write( m_Locked );
			writer.Write( (Mobile)m_Owner );
			writer.Write( (Mobile)m_Pet );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			switch ( reader.ReadInt() )
			{
				case 0:
				{
					m_IsStatuette = reader.ReadBool();
					m_Locked = reader.ReadBool();
					m_Owner = (PlayerMobile)reader.ReadMobile();
					m_Pet = (BaseCreature)reader.ReadMobile();

					if (null != m_Pet )
						m_Pet.IsStabled = true;

					break;
				}
			}
		}

		#region JOEKUADDITION
		public static string GetFormattedBreedString( BaseCreature pet )
		{
			string breed = pet.GetType().Name;

			int index = 0;

			while ( index < breed.Length )
			{
				if ( index > 0 && char.IsUpper( breed, index ) )
				{
					breed.Insert( index, " " );
					index++;
				}

				index++;
			}

			return breed;
		}
		#endregion JOEKUADDITION
	}

	public class LockShrinkItem : ContextMenuEntry
	{
		private Mobile m_From;
		private ShrinkItem m_ShrinkItem;

		public LockShrinkItem( Mobile from, ShrinkItem shrink ) : base( 2029, 5 )
		{
			m_From = from;
			m_ShrinkItem = shrink;
		}

		public override void OnClick()
		{
			m_ShrinkItem.Locked = true;
			m_From.SendMessage( 38, "You have locked this shrunken pet so only you can reclaim it." );
		}
	}

	public class UnLockShrinkItem : ContextMenuEntry
	{
		private Mobile m_From;
		private ShrinkItem m_ShrinkItem;

		public UnLockShrinkItem( Mobile from, ShrinkItem shrink ) : base( 2033, 5 )
		{
			m_From = from;
			m_ShrinkItem = shrink;
		}

		public override void OnClick()
		{
			m_ShrinkItem.Locked = false;
			m_From.SendMessage( 38, "You have unlocked this shrunken pet, now anyone can reclaim it as theirs." );
		}
	}

	public class ShrinkTarget : Target
	{
		private IShrinkTool m_ShrinkTool;

		public ShrinkTarget( Mobile from, IShrinkTool shrinkTool ) : base ( 10, false, TargetFlags.None )
		{
			m_ShrinkTool = shrinkTool;
			from.SendMessage( "Target the pet you wish to shrink." );
		}

		protected override void OnTarget( Mobile from, object target )
		{
			BaseCreature pet = target as BaseCreature;

			if ( target == from )
				from.SendMessage( "You cannot shrink yourself!" );

			else if ( target is Item )
				from.SendMessage( "You cannot shrink that!" );

			else if ( target is PlayerMobile )
				from.SendMessage( "That person gives you a dirty look!" );

			else if ( Server.Spells.SpellHelper.CheckCombat( from ) )
				from.SendMessage( "You cannot shrink your pet while you are fighting." );

			else if ( null == pet )
				from.SendMessage( "That is not a pet!" );

			else if (( pet.BodyValue == 400 || pet.BodyValue == 401 ) && pet.Controlled == false )
				from.SendMessage( "That person gives you a dirty look!" );

			else if ( pet.IsDeadPet )
				from.SendMessage( "You cannot shrink the dead!" );

			else if ( pet.Summoned )
				from.SendMessage( "You cannot shrink a summoned creature!" );

			else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map )
				from.SendMessage( "Your pet is fighting; you cannot shrink it yet." );

			else if ( pet.BodyMod != 0 )
				from.SendMessage( "You cannot shrink your pet while it is polymorphed." );

			else if ( pet.Controlled == false )
				from.SendMessage( "You cannot not shrink wild creatures." );

			else if ( pet.ControlMaster != from )
				from.SendMessage( "That is not your pet." );

			else if ( ShrinkItem.IsPackAnimal( pet ) && ( null != pet.Backpack && pet.Backpack.Items.Count > 0 ))
				from.SendMessage( "You must unload this pet's pack before it can be shrunk." );

			else
			{
				if ( pet.ControlMaster != from && !pet.Controlled )
				{
					SpawnEntry se = pet.Spawner as SpawnEntry;
					if ( se != null && se.UnlinkOnTaming )
					{
						pet.Spawner.Remove( this );
						pet.Spawner = null;
					}

					pet.CurrentWayPoint = null;
				
					pet.ControlMaster = from;
					pet.Controlled = true;
					pet.ControlTarget = null;
					pet.ControlOrder = OrderType.Come;
					pet.Guild = null;

					pet.Delta( MobileDelta.Noto );
				}

				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( p2, p1, ShrinkTable.Lookup( pet ), 1, 0, true, false, 0, 3, 1153, 1, 0, EffectLayer.Head, 0x100 );
				from.PlaySound( 492 );
				from.AddToBackpack( new ShrinkItem( pet ) );

				if ( null != m_ShrinkTool && m_ShrinkTool.ShrinkCharges > 0 )
					m_ShrinkTool.ShrinkCharges--;
			}
		}
	}
}
ABTOP is offline   Reply With Quote
Old 08-30-2007, 03:32 PM   #34 (permalink)
Forum Novice
 
Join Date: Feb 2005
Location: Louisiana
Posts: 107
Default Pet Leash

I am having a problem with the leash itself. Players can shrink anything without having to tame them. I think I was lucky and it was an admin playing that realized this. Not sure if any other players have found this. Anyone else using this on their shard may want to check it out. Myself I had never thought of trying to click on an untamed animal with my player char, but another admin did. Can anyone help with this problem. I can't seem to figure out what to do.
AdminZin is offline   Reply With Quote
Old 09-05-2007, 10:54 AM   #35 (permalink)
Forum Novice
 
Join Date: Feb 2005
Location: Louisiana
Posts: 107
Default Please respond

I am posting another thread to get this back to the top of the list. I have not figured out what to do to make the pet leashes not automatically shrink an untamed pet. Please respond to my post. Someone, anyone!
AdminZin is offline   Reply With Quote
Old 10-07-2007, 12:51 AM   #36 (permalink)
Newbie
 
Aaronski's Avatar
 
Join Date: Jul 2003
Age: 22
Posts: 32
Send a message via ICQ to Aaronski Send a message via AIM to Aaronski Send a message via MSN to Aaronski Send a message via Yahoo to Aaronski Send a message via Skype™ to Aaronski
Default making things blessed

i thought i did it right a few times but i cant seem to get it to bless everything that i shrink.Can someone help ive already moved to xml file to the dats folder then change the cs file to say"all" to make everything blessed but it still isnt working but the shard is compiling just fine.
__________________
~Monkey
Aaronski is offline   Reply With Quote
Old 10-18-2007, 05:38 PM   #37 (permalink)
Forum Novice
 
Join Date: Feb 2005
Location: Louisiana
Posts: 107
Default Still waiting for answer

Quote:
Originally Posted by AdminZin View Post
I am having a problem with the leash itself. Players can shrink anything without having to tame them. I think I was lucky and it was an admin playing that realized this. Not sure if any other players have found this. Anyone else using this on their shard may want to check it out. Myself I had never thought of trying to click on an untamed animal with my player char, but another admin did. Can anyone help with this problem. I can't seem to figure out what to do.
I still need an answer for this if anyone is out there. hehe. Please someone check into this. It has to be happening on other shards.
AdminZin is offline   Reply With Quote
Old 10-18-2007, 07:54 PM   #38 (permalink)
Forum Expert
 
Join Date: Nov 2004
Posts: 1,656
Send a message via ICQ to Murzin Send a message via AIM to Murzin Send a message via MSN to Murzin
Default

you are wrong...

it is not a BUG it is a FEATURE purposefully scripted in.

Code:
bool isStaff = from.AccessLevel != AccessLevel.Player;
before you accuse someone of releasing buggy code, verify it is a bug and not a feature.
Murzin is offline   Reply With Quote
Old 10-19-2007, 11:15 AM   #39 (permalink)
Forum Novice
 
Join Date: Feb 2005
Location: Louisiana
Posts: 107
Default

Quote:
Originally Posted by Murzin View Post
you are wrong...

it is not a BUG it is a FEATURE purposefully scripted in.

Code:
bool isStaff = from.AccessLevel != AccessLevel.Player;
before you accuse someone of releasing buggy code, verify it is a bug and not a feature.
This was not an accusation this was just a problem I was having and I wanted some feedback. Sorry you got a problem with it seeing that you didn't even write this script. Get a life!
AdminZin is offline   Reply With Quote
Old 10-26-2007, 10:09 PM   #40 (permalink)
Newbie
 
Join Date: Aug 2007
Age: 33
Posts: 13
Default cant get it to bless

can someone help me? I cant get it to bless pets after they are shrunk.I moved the file to data and changed the cs.file to say all and it still isnt blessing anything.
__________________
ElSagundo is offline   Reply With Quote
Old 10-28-2007, 09:03 AM   #41 (permalink)
Forum Novice
 
Join Date: Feb 2005
Location: Louisiana
Posts: 107
Default

Quote:
Originally Posted by ElSagundo View Post
can someone help me? I cant get it to bless pets after they are shrunk.I moved the file to data and changed the cs.file to say all and it still isnt blessing anything.
Did you change it in the Shrinkconfig.xml file in your Data file. If not you right click on the Shrinkconfig.xml file and click on edit and it will let you change it.

-->
<LootStatus>BlessStatus.BondedOnly</LootStatus>
<TamingRequired type="int">0</TamingRequired>
- <!-- set to zero for no skill requirement to use shrink tools
-->
<ShrinkCharges type="int">50</ShrinkCharges>
- <!-- number of uses; set to -1 for infinite uses
-->
- <PackAnimals type="array">
- <!-- Add all pack animals for your server
-->
<a type="string">Server.Mobiles.PackHorse</a>
<a type="string">Server.Mobiles.PackLlama</a>
<a type="string">Server.Mobiles.Beetle</a>

Last edited by AdminZin; 10-28-2007 at 09:05 AM.
AdminZin is offline   Reply With Quote
Old 01-05-2008, 10:41 AM   #42 (permalink)
Newbie
 
Join Date: Nov 2007
Location: USA, Ohio
Age: 44
Posts: 80
Default Adding Leash to Vendors

I saw someone asked the question about not being able to add the pet leash to vendors. I am having the same problem.. for some reason it's saying that PetLeash can not be found even though the PetLeash.cs file is certainly present. Other then this, the system seems to be working flawlessly.

Here is my vendor file: (edited to save space)
Code:
using System; 
using System.Collections; 
using Server.Items; 

namespace Server.Mobiles 
{ 
	public class SBFarmer : SBInfo 
	{ 
		private ArrayList m_BuyInfo = new InternalBuyInfo(); 
		private IShopSellInfo m_SellInfo = new InternalSellInfo(); 

		public SBFarmer() 
		{ 
		} 

		public override IShopSellInfo SellInfo { get { return m_SellInfo; } } 
		public override ArrayList BuyInfo { get { return m_BuyInfo; } } 

		public class InternalBuyInfo : ArrayList 
		{ 
			public InternalBuyInfo() 
			{ 
				Add( new GenericBuyInfo( typeof( Cabbage ), 5, 20, 0xC7B, 0 ) );
				Add( new GenericBuyInfo( typeof( Cantaloupe ), 6, 20, 0xC79, 0 ) );
				Add( new GenericBuyInfo( typeof( Spinach ), 5, 20, 0xD09, 0 ) );
				Add( new GenericBuyInfo( typeof( SweetPotato ), 5, 20, 0xC64, 0 ) );
                                Add(new GenericBuyInfo( "Pet Leash", typeof( PetLeash ), 10000, 5, 0x1374, 0));
			} 
		} 

		public class InternalSellInfo : GenericSellInfo 
		{ 
			public InternalSellInfo() 
			{ 
				Add( typeof( Pitcher ), 5 );
				Add( typeof( Eggs ), 1 );
				Add( typeof( Apple ), 1 );
				Add( typeof( Grapes ), 1 );
				Add( typeof( Watermelon ), 3 );
				Add( typeof( Lime ), 1 );
				Add( typeof( Peach ), 1 );
				Add( typeof( Pear ), 1 );
				Add( typeof( Hay ), 1 );
			} 
		} 
	} 
}
Here is the error message:
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2907.25659
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...ScriptCompiler: CS1668: Invalid search          

                                   ...<snip>...
Errors:
 + Customs/Vhaerun's CRL Homestead/Distro Modifications/SBFarmer.cs:
    CS0246: Line 82: The type or namespace name 'PetLeash' could not be found (a
re you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Can't figure this out.. any help would be appreciated. Thanks
Shakhan is offline   Reply With Quote
Old 01-05-2008, 10:50 AM   #43 (permalink)
Newbie
 
Join Date: Jun 2007
Age: 25
Posts: 64
Default

I wanted some help making the pet leash avaible for player to buy... i've tried a lot of lines but simply can't make it work...

doesn anyone have one that does so i can put in a vendor?
photopunisher is offline   Reply With Quote
Old 01-05-2008, 11:06 AM   #44 (permalink)
Forum Expert
 
Erica's Avatar
 
Join Date: Jan 2005
Location: Laramie Wyoming
Age: 43
Posts: 1,279
Send a message via ICQ to Erica Send a message via AIM to Erica Send a message via MSN to Erica Send a message via Yahoo to Erica Send a message via Skype™ to Erica
Default

Quote:
Originally Posted by photopunisher View Post
I wanted some help making the pet leash avaible for player to buy... i've tried a lot of lines but simply can't make it work...

doesn anyone have one that does so i can put in a vendor?
You are missing a line add what i added in red to your script.
Code:
using System; 
using System.Collections; 
using Server.Items; 
//EDIT.this line lets you sell petleash//
using Xanthos.ShrinkSystem;
//EDIT.this line lets you sell petleash//


namespace Server.Mobiles 
{ 
	public class SBFarmer : SBInfo 
	{ 
		private ArrayList m_BuyInfo = new InternalBuyInfo(); 
		private IShopSellInfo m_SellInfo = new InternalSellInfo(); 

		public SBFarmer() 
		{ 
		} 

		public override IShopSellInfo SellInfo { get { return m_SellInfo; } } 
		public override ArrayList BuyInfo { get { return m_BuyInfo; } } 

		public class InternalBuyInfo : ArrayList 
		{ 
			public InternalBuyInfo() 
			{ 
				Add( new GenericBuyInfo( typeof( Cabbage ), 5, 20, 0xC7B, 0 ) );
				Add( new GenericBuyInfo( typeof( Cantaloupe ), 6, 20, 0xC79, 0 ) );
				Add( new GenericBuyInfo( typeof( Spinach ), 5, 20, 0xD09, 0 ) );
				Add( new GenericBuyInfo( typeof( SweetPotato ), 5, 20, 0xC64, 0 ) );
                                Add(new GenericBuyInfo( "Pet Leash", typeof( PetLeash ), 10000, 5, 0x1374, 0));
			} 
		} 

		public class InternalSellInfo : GenericSellInfo 
		{ 
			public InternalSellInfo() 
			{ 
				Add( typeof( Pitcher ), 5 );
				Add( typeof( Eggs ), 1 );
				Add( typeof( Apple ), 1 );
				Add( typeof( Grapes ), 1 );
				Add( typeof( Watermelon ), 3 );
				Add( typeof( Lime ), 1 );
				Add( typeof( Peach ), 1 );
				Add( typeof( Pear ), 1 );
				Add( typeof( Hay ), 1 );
			} 
		} 
	} 
}
and that will take care your error and let players buy the pet leash.
__________________
Erica is offline   Reply With Quote
Old 01-05-2008, 01:09 PM   #45 (permalink)
Newbie
 
Join Date: Nov 2007
Location: USA, Ohio
Age: 44
Posts: 80
Default

Thanks that worked great!.. +karma
Shakhan is offline   Reply With Quote
Old 01-05-2008, 01:12 PM   #46 (permalink)
Newbie
 
Join Date: Jun 2007
Age: 25
Posts: 64
Default

one more stupid question... how do i change the charges on the leash?
photopunisher is offline   Reply With Quote
Old 01-05-2008, 01:32 PM   #47 (permalink)
Forum Expert
 
Erica's Avatar
 
Join Date: Jan 2005
Location: Laramie Wyoming
Age: 43
Posts: 1,279
Send a message via ICQ to Erica Send a message via AIM to Erica Send a message via MSN to Erica Send a message via Yahoo to Erica Send a message via Skype™ to Erica
Default

Quote:
Originally Posted by photopunisher View Post
one more stupid question... how do i change the charges on the leash?
Easy Open ShrinkConfig.xml
change the number 50 to what ever charges you want.
Code:
<ShrinkCharges type="int">50</ShrinkCharges>
__________________
Erica is offline   Reply With Quote
Old 01-08-2008, 07:30 AM   #48 (permalink)
Newbie
 
Join Date: Apr 2004
Age: 32
Posts: 9