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!

Exchange Stone

etherkye

Wanderer
change
Code:
from.AddToBackpack( new ShadowHorse() );code]

to

[code]Add( new AnimalBuyInfo( 1, typeof( ShadowHorse ),  ) );[code] 

above edited from animal trainer so it should add animal next to you.
 

Shadow_2004

Wanderer
hmmm

i get this error

- Error: Scripts\Custom\Town Quests\Reward Quest 1.cs: CS1525: (line 29, column
55) Invalid expression term ')'
- Error: Scripts\Custom\Town Quests\Reward Quest 1.cs: CS1026: (line 29, column
58) ) expected

it mite start to work :D thx

Code:
public override void GetProperties( ObjectPropertyList list ) 
		{ 
			base.GetProperties( list ); 
			list.Add( "The Evil Mage Ring for The Shadow Horse"); 
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			Container pack = from.Backpack; 
			if ( from.Backpack.ConsumeTotal( typeof( Qoner ), 1  ) )
			{ 
				Add( new AnimalBuyInfo( 1, typeof(  ShadowHorse ), ) );
				from.SendMessage("You Exchange The Ring For The Horse."); 
			} 
			else
			{
				from.SendMessage("You do not have The Ring."); 
			}
		}
 

etherkye

Wanderer
Code:
				Add( new AnimalBuyInfo( 1, typeof(  ShadowHorse ), ) );
change to

Code:
				Add( new AnimalBuyInfo( 1, typeof(  ShadowHorse ), ));
 

Phantom

Knight
etherkye said:
Code:
				Add( new AnimalBuyInfo( 1, typeof(  ShadowHorse ), ) );
change to

Code:
				Add( new AnimalBuyInfo( 1, typeof(  ShadowHorse ), ));

You posted the exact samething....You also already posted that solution but the first time it was correct...

I cannot post the solution till the author posts the entire class.
 

Shadow_2004

Wanderer
k

the ntire class the whole script?

Errors im getting
- Error: Scripts\Custom\Town Quests\Reward Quest 1.cs: CS1525: (line 29, column
55) Invalid expression term ')'
- Error: Scripts\Custom\Town Quests\Reward Quest 1.cs: CS1026: (line 29, column
57) ) expected

the script
Code:
using System; 
using Server.Items;
using Server.Mobiles;

namespace Server.Items
{ 
	[Serializable()] 
	public class Qone : Item 
	{ 
		[Constructable] 
		public Qone() : base( 0xED4 ) 
		{ 
			Movable = false; 
			Hue = 0x85; 
			Name = "A Quest 1 Exchange Stone"; 
		} 

		public override void GetProperties( ObjectPropertyList list ) 
		{ 
			base.GetProperties( list ); 
			list.Add( "The Evil Mage Ring for The Shadow Horse"); 
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			Container pack = from.Backpack; 
			if ( from.Backpack.ConsumeTotal( typeof( Qoner ), 1  ) )
			{ 
				Add( new AnimalBuyInfo( 1, typeof( ShadowHorse ), ));
				from.SendMessage("You Exchange The Ring For The Horse."); 
			} 
			else
			{
				from.SendMessage("You do not have The Ring."); 
			}
		} 

		public Qone( 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(); 
		} 
	}
}
 

Phantom

Knight
Don't offer people money on this forum to help you.

If somebody chooses to help you they will, bumping your post is against the rules.

I need you to post the following file.

Reward Quest 1.cs

I am not going to download a zip file, end of story.
 

etherkye

Wanderer
well i downloaded it and i know what the problem is, in the SBanimal trainer script you get

Code:
Add( new AnimalBuyInfo( 1, typeof( Horse ), 602, 10, 204, 0 ) );

yours has

Code:
Add( new AnimalBuyInfo( 1, typeof( ShadowHorse ), ) );

the server.exe is looking for that list for 4 numbers, unfortnunalty i don't nkow what numbers you need to put as they are different for every animal.
 

UOT

Knight
I think the animal buy info is the wrong way to go. Why not change
Code:
			if ( from.Backpack.ConsumeTotal( typeof( Qoner ), 1  ) )
			{ 
				Add( new AnimalBuyInfo( 1, typeof( ShadowHorse ), ));
				from.SendMessage("You Exchange The Ring For The Horse."); 
			}
to
Code:
			if ( from.Backpack.ConsumeTotal( typeof( Qoner ), 1  ) )
			{ 
				BaseCreature horse = new ShadowHorse();
				horse.MoveToWorld( from.Location, from.Map );
				horse.Controled = true;
				horse.ControlMaster = from;
				from.SendMessage("You Exchange The Ring For The Horse."); 
			}
 
Top