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!

TM Skill System 3.0

TMSTKSBK

Lord
In response to these lines:

-TMSS|3|- Debug/Error Code: Found Directory for skp.
-TMSS|3|- Debug/Error Code: foreaching

Those are normal, and should happen every time you start the server, if the server is in debug mode. I forgot to turn it off for this release, but it won't harm anything, you'll just see some stuff you wouldn't otherwise. To fix this, open the SkillSettings.cs file, and set DebugMode to false.
 

Scripture

Wanderer
TMSTKSBK said:
Ah. I see the problem.

At the top of the file, add a "using TMSS;"

Bugs are always welcome. They let me know people are using the system :p.

Thank you for that information. I'll revise the drop-in code.


Ok i've tried that numerous different ways, and it keeps giving me the error of
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Misc\CharacterCreation.cs: CS0246: (line 1, column 7) The type
 or namespace name 'TMSS' could not be found (are 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.

I've tried doing using Server.TMSS, just the plain using TMSS, i even tried renaming TMSS to what the actual folder was called. So basically i think it comes down too, what file should this be exactly linked to? Here is the beginning lines of character creation.

Code:
using TMSS;
using Server.Engines.XmlSpawner2;
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Accounting;


namespace Server.Misc
{
	public class CharacterCreation
	{
		public static void Initialize()
		{
			// Register our event handler
			EventSink.CharacterCreated += new CharacterCreatedEventHandler( EventSink_CharacterCreated );
		}

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
				PackItem( new RedBook( "a book", m.Name, 20, true ) );
			PackItem( new BankCheck( 10000 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			
		}		
				
	private static void AddSkillTicket( Mobile m )
	{
		string name = "My Profile";
		if( SkillProfileHelper.ProfileExists(name) )
		{
			SkillProfile prof = SkillProfileHelper.GetProfile( name );
			SkillTicket ticket = new SkillTicket( m, prof );
			ticket.Owner = m;
				
			PackItem( ticket );
		}
	}

Any help would be greatly appreciated, been anxious to try it out, but suprised no one else has run into these problems.

EDIT: Also the fix for the debug code worked, thanks.
 

TMSTKSBK

Lord
what he said >_< Server.TMSS should work.

and as for the "why has no one else had this problem"...not many people are using 3 yet.
 

Scripture

Wanderer
But I already said I even tried that, and still didnt work


EDIT: The error i get with using the "using Server.TMSS;" is a little different though, it goes like this:

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (4 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS0117: (line 44, column 24) 'Serve
r.TMSS.SkillProfileHelper' does not contain a definition for 'GetProfile'
 - Error: Scripts\Misc\CharacterCreation.cs: CS1502: (line 45, column 25) The be
st overloaded method match for 'Server.Items.SkillTicket.SkillTicket(int, int)'
has some invalid arguments
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 45, column 42) Argume
nt '1': cannot convert from 'Server.Mobile' to 'int'
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 45, column 45) Argume
nt '2': cannot convert from 'Server.TMSS.SkillProfile' to 'int'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

A_Li_N

Knight
Scripture said:
But I already said I even tried that, and still didnt work


EDIT: The error i get with using the "using Server.TMSS;" is a little different though, it goes like this:

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (4 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS0117: (line 44, column 24) 'Serve
r.TMSS.SkillProfileHelper' does not contain a definition for 'GetProfile'
 - Error: Scripts\Misc\CharacterCreation.cs: CS1502: (line 45, column 25) The be
st overloaded method match for 'Server.Items.SkillTicket.SkillTicket(int, int)'
has some invalid arguments
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 45, column 42) Argume
nt '1': cannot convert from 'Server.Mobile' to 'int'
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 45, column 45) Argume
nt '2': cannot convert from 'Server.TMSS.SkillProfile' to 'int'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

SkillProfile prof = SkillProfileHelper.GetProfile( name );
needs to be
SkillProfile prof = SkillProfileHelper.getProfile( SkillProfileHelper.getProfileID( name ) );
*Why did you do it this way TMS? Should have a method for GetProfile( string name)*

Also, if you want a SkillTicket created from a string 'name', which is the name of a profile, do only this:
string name = "My Profile";
SkillTicket t = new SkillTicket( name );


If you want to make a SkillTicket and you have a SkillProfile already, do:
SkillProfile p = SkillProfileHelper.getProfile( someID );
SkillTicket t = new SkillTicket( p );


On a side note, I'd like to let you know that I have not actually used this system. I therefore do not actually know this system. I find all this information by opening the scripts and finding what the calls are. You can do this to :)
 

Scripture

Wanderer
I really appreciate you helping me, it means a lot, I'm trying to figure some of this out, and trying different things, but I will tell you straight up I am a noob to this.

The error code I am now getting is this:
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (3 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS1502: (line 46, column 25) The be
st overloaded method match for 'Server.Items.SkillTicket.SkillTicket(int, int)'
has some invalid arguments
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 46, column 42) Argume
nt '1': cannot convert from 'Server.Mobile' to 'int'
 - Error: Scripts\Misc\CharacterCreation.cs: CS1503: (line 46, column 45) Argume
nt '2': cannot convert from 'Server.TMSS.SkillProfile' to 'int'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


And that is with the following script:

Code:
using Server.Engines.XmlSpawner2;
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Accounting;
using Server.TMSS;

namespace Server.Misc
{
	public class CharacterCreation
	{
		public static void Initialize()
		{
			// Register our event handler
			EventSink.CharacterCreated += new CharacterCreatedEventHandler( EventSink_CharacterCreated );
		}

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
			PackItem( new SkillBallBag() ); // <--- SkillBallBag
			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			PackItem( new BankCheck( 10000 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );
			
		}		
				
					private static void AddSkillTicket( Mobile m )
	{
			string name = "My Profile";
			SkillTicket t = new SkillTicket( name );
		{
		    			
			SkillProfile prof = SkillProfileHelper.getProfile( SkillProfileHelper.getProfileID( name ) );
			SkillTicket ticket = new SkillTicket( m, prof );
			ticket.Owner = m;
				
			PackItem( ticket );
		}
	}
 

Scripture

Wanderer
Actually, since there is a file called skillprofile that came with this, should my code look more like this?

Code:
	private static void AddSkillTicket( Mobile m )
	{
		{
	
			SkillProfile p = SkillProfileHelper.getProfile( someID );
			SkillTicket t = new SkillTicket( p );
			ticket.Owner = m;
					
			PackItem( ticket );
		}
	}


Sorry if I appear to be lost, since i'm kind of bordering it.


EDIT: I guess not since I was getting this mesage when I tried that:

Code:
Scripts: Compiling C# scripts...failed (3 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS0103: (line 43, column 52) The na
me 'someID' does not exist in the class or namespace 'Server.Misc.CharacterCreat
ion'
 - Error: Scripts\Misc\CharacterCreation.cs: CS0246: (line 45, column 4) The typ
e or namespace name 'ticket' could not be found (are you missing a using directi
ve or an assembly reference?)
 - Error: Scripts\Misc\CharacterCreation.cs: CS0103: (line 47, column 14) The na
me 'ticket' does not exist in the class or namespace 'Server.Misc.CharacterCreat
ion'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

A_Li_N

Knight
Code:
using Server.Engines.XmlSpawner2;
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Accounting;
using Server.TMSS;

namespace Server.Misc
{
	public class CharacterCreation
	{
		public static void Initialize()
		{
			// Register our event handler
			EventSink.CharacterCreated += new CharacterCreatedEventHandler( EventSink_CharacterCreated );
		}

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
			PackItem( new SkillBallBag() ); // <--- SkillBallBag
			PackItem( new RedBook( "a book", m.Name, 20, true ) );
			PackItem( new BankCheck( 10000 ) ); // Starting gold can be customized here
			PackItem( new Dagger() );
			PackItem( new Candle() );

		}

		private static void AddSkillTicket( Mobile m )
		{
			string name = "My Profile";

			SkillTicket t = new SkillTicket( name );

			ticket.Owner = m;

			PackItem( ticket );
		}
	}
 

Scripture

Wanderer
Didnt work, i got this mesage:

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (2 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS0246: (line 45, column 4) The typ
e or namespace name 'ticket' could not be found (are you missing a using directi
ve or an assembly reference?)
 - Error: Scripts\Misc\CharacterCreation.cs: CS0103: (line 47, column 14) The na
me 'ticket' does not exist in the class or namespace 'Server.Misc.CharacterCreat
ion'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


I tried renaming it to SkillTicket instead of ticket since i figured it was simply trying to reference itself to a file, but that didnt work either. I really appreciate you trying to help, even though it seems to be moving in baby steps, it definately seems like progress is gettin made.
 

Scripture

Wanderer
A_Li_N said:
t.Owner instead of ticket.owner.

This is what i changed it to:
Code:
		private static void AddSkillTicket( Mobile m )
		{
			string name = "My Profile";

			SkillTicket t = new SkillTicket( name );

			t.Owner = m;

			PackItem( t );
		}

It didnt like it if line with PackItem( t ); was spelled out to ticket. Now I dont get any errors, BUT IT DOESNT ADD ANYTHING TO THE PACK :confused:

Again though, I really appreciate you trying to work with me on this, I just want this to work like it was intended.

Also, if it is labelled as PackItem( SkillTicket ) i get the following error:


Code:
Scripts: Compiling C# scripts...failed (1 errors, 1 warnings)
 - Warning: Scripts\Customs\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs:
CS0162: (line 15, column 19) Unreachable code detected
 - Error: Scripts\Misc\CharacterCreation.cs: CS0118: (line 47, column 14) 'Serve
r.Items.SkillTicket' denotes a 'class' where a 'variable' was expected
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

A_Li_N

Knight
Make sure there is a 'My Profile' profile for the system to load. If there's not, it won't create the ticket.
 

Scripture

Wanderer
for the "string name = "My Profile";" line, I have tried the My Profile part as, Profile, Default Profile, SkillProfile and none of them work :mad:
 

Scripture

Wanderer
I dont know what you mean by that? i've posted what I entered into character creation, if there's another file you'd like me to post please let me know.
 

TMSTKSBK

Lord
Did you see the biiiiiggg note under the function in SkillTicket.cs?

Read it again. Especially:

I call it from around line 685 -- the first line inside the SetSkills method. Here is the call: AddSkillTicket( m );

Did you make that call from line 685ish?
 
Top