RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Xanthos Shrink System

AdminZin

Wanderer
ElSagundo;721044 said:
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>
 

Shakhan

Wanderer
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
 
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?
 

Erica

Knight
photopunisher;732646 said:
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; 
[COLOR="Red"]//EDIT.this line lets you sell petleash//
using Xanthos.ShrinkSystem;
//EDIT.this line lets you sell petleash//[/COLOR]


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

Knight
photopunisher;732668 said:
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">[COLOR="Red"]50[/COLOR]</ShrinkCharges>
 

indigowulf

Wanderer
Im losing my mind here! Ive tried searching by "utilities", username Xanthos doesnt work, I cant for the life of me find required file xanthos.utilities anywhere in the forums. I want to use this system, someone help?:confused:
 

Zylara

Sorceror
If you have downloaded some of Xanthos scripts then open them up and look in there...the utilities dowload is included with a few of his scripts he has posted.
 

Zylara

Sorceror
If you have not found it yet, it is in his Jail System 2.0.zip script for sure, I still have a zip of it and it is in there.
 

larisa

Wanderer
Hello

I have one question. On our shard players sometime loose their pets when they are shrinked. I try to find them with [getfollowers but that dose not work with shrunken pets. Than I tryed [global interface where ShrinkItem but that gives to big list than tryed [global interface where ShrinkItem ShrunkenPet but that does not work. If someone pease can try that with shrinked mercenary and post here exact global command. Thank you .
 

Johabius

Knight
Here's the utilities folder that I have in both rar and zip format just in case the forums try to mess up the attachments.
 

Attachments

  • Utilities.rar
    29.3 KB · Views: 78
  • Utilities.zip
    30.1 KB · Views: 56

sohtnax

Sorceror
Glad to see my code is still in use - I have been gone for a while. One day I will move them forward again - please let me know what you would like to see.

- Xan
 

fcondon

Sorceror
Great system but 1 question that another person had a issue with and didn't get answered (unless I missed it) and now I'm having the same issue. I tried adding the following code to the AnimalTamer Sbinfo script but it errors out on compiling.

This is the compile error.

Code:
RunUO - [www.runuo.com] Version 2.0, Build 3344.39098
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 + Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs:
    CS0246: Line 31: 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.

and here is my sbinfo for the animal tamer. (the new code is highlighted in red).

Code:
using System;
using System.Collections;
using Server.Items;

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

		public SBAnimalTrainer()
		{
		}

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

		public class InternalBuyInfo : ArrayList
		{
			public InternalBuyInfo()
			{
				Add( new AnimalBuyInfo( 1, typeof( Cat ), 132, 10, 201, 0 ) );
				Add( new AnimalBuyInfo( 1, typeof( Dog ), 170, 10, 217, 0 ) );
				Add( new AnimalBuyInfo( 1, typeof( Horse ), 550, 10, 204, 0 ) );
				Add( new AnimalBuyInfo( 1, typeof( PackHorse ), 631, 10, 291, 0 ) );
				Add( new AnimalBuyInfo( 1, typeof( PackLlama ), 565, 10, 292, 0 ) );
				Add( new AnimalBuyInfo( 1, typeof( Rabbit ), 106, 10, 205, 0 ) );

[COLOR="Red"]	Add( new GenericBuyInfo( typeof( PetLeash ), 10000, 10, 0x1374, 0 ) );[/COLOR]

				if( !Core.AOS )
				{
					Add( new AnimalBuyInfo( 1, typeof( Eagle ), 402, 10, 5, 0 ) );
					Add( new AnimalBuyInfo( 1, typeof( BrownBear ), 855, 10, 167, 0 ) );
					Add( new AnimalBuyInfo( 1, typeof( GrizzlyBear ), 1767, 10, 212, 0 ) );
					Add( new AnimalBuyInfo( 1, typeof( Panther ), 1271, 10, 214, 0 ) );
					Add( new AnimalBuyInfo( 1, typeof( TimberWolf ), 768, 10, 225, 0 ) );
					Add( new AnimalBuyInfo( 1, typeof( Rat ), 107, 10, 238, 0 ) );
				}
					
			}
		}

		public class InternalSellInfo : GenericSellInfo
		{
			public InternalSellInfo()
			{
			}
		}
	}
}

I looked over the leash script countless times, and by my view it looks as though PetLeash is the proper command to call, any suggestions?
 

fcondon

Sorceror
Nevermind it was an easy fix. I had to put

using Xanthos.ShrinkSystem;

at the top of the sbinfo for the Animal Tamer.
 
Top