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!

Xml spawner2 & UOT's plantsystem help...

Ymerej

Wanderer
Xml spawner2 & UOT's plantsystem help...

I could use some simplification as to how i go about implementing these two systems.
Because of some previous problems, I am now running a fresh install of b36.
I would really appreciate some help with this, thanks.
 

ArteGordon

Wanderer
describe your problems. These two systems should work fine together (I use both). The installation for xmlspawner2 is fairly simple when starting from scratch, just unzip the contents of the package into your custom directory and you're done. There are two optional things you can change after that, if you like, for support of its kill-quests and rares stealing.
UOTs system requires a few changes to be made to playermobile.cs if you want orange petals to work (described in the readme that is included), but otherwise you also just unzip the files into your custom directory.
 

Ymerej

Wanderer
Ok, great! For some reason it seemed like I'd have to do a lot more. As for the rares stealing, orange petals, etc you spoke of above, what changes do I have to make?
 

ArteGordon

Wanderer
best thing is to look at the readme files that come with each. They describe exactly what to do. The modifications involve changes to distribution scripts so read the directions carefully and make backups of the original distribution files before making changes. The changes are fairly minor so it shouldnt prove to be a problem as long as you follow the directions closely.
 

Ymerej

Wanderer
Ok, I put the xmlspawner script into my customs folder, started up the server and got several errors. Is there a way to get a copy of them w/o typing it all? Or is that what my Server.exe config is for?

And no, I haven't made any script changes as of yet, just using the base script.
 

ArteGordon

Wanderer
yes, you can copy the text from the console window by right clicking on the menu bar and selecting, edit, select all, then right click, edit, copy, then just do a paste.
 

Ymerej

Wanderer
Ok, thanks. Here's the errors:

Scripts: Compiling C# scripts...failed (15 errors, 0 warnings)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 777, column 44) The type
or namespace name 'XmlQuestToken' could not be found (are you missing a using di
rective or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 778, column 33) The type
or namespace name 'XmlQuestToken' could not be found (are you missing a using di
rective or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 779, column 36) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 787, column 61) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 790, column 59) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 793, column 59) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 796, column 59) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 799, column 59) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 828, column 44) The type
or namespace name 'XmlQuestToken' could not be found (are you missing a using di
rective or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 829, column 33) The type
or namespace name 'XmlQuestToken' could not be found (are you missing a using di
rective or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 837, column 56) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 840, column 54) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 843, column 54) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 846, column 54) The type
or namespace name 'token' could not be found (are you missing a using directive
or an assembly reference?)
- Error: Scripts\Custom\XmlSpawner2.cs: CS0246: (line 849, column 54) The type
or namespace name 'token' 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.
 

ArteGordon

Wanderer
you need to extract the other archive that is part of the package, xmlspawner2-support.zip which contains the rest of the installation (look at the attached files list in the submission).
Sorry, its because the board doesnt support single files of more than 100K so it had to be split over 2 zip files.
 

Ymerej

Wanderer
Well, I got the XmlSpawner to work, but now the PlantSystem is giving me a few errors w/ the petals:

Scripts: Compiling C# scripts...failed (3 errors, 0 warnings)
- Error: Scripts\Custom\PlantSystemFinal\PlantResources.cs: CS0117: (line 585,
column 8) 'Server.Mobiles.PlayerMobile' does not contain a definition for 'Petal
s'
- Error: Scripts\Custom\PlantSystemFinal\PlantResources.cs: CS0117: (line 592,
column 4) 'Server.Mobiles.PlayerMobile' does not contain a definition for 'Petal
s'
- Error: Scripts\Custom\PlantSystemFinal\PlantResources.cs: CS0117: (line 615,
column 6) 'Server.Mobiles.PlayerMobile' does not contain a definition for 'Petal
s'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

ArteGordon

Wanderer
sounds like you didnt make the modifications to playermobile.cs that are described in the readme file.
readme.txt said:
add the following piece of code to PlayerMobile.cs:


//ADDED for Orange Petals
public bool Petals;

public override bool CheckPoisonImmunity( Mobile from, Poison poison )
{
if (Petals)
return (poison.Level < 3);
return base.CheckPoisonImmunity( from, poison );
}

public override void OnPoisonImmunity(Mobile from, Poison poison)
{
if (Petals)
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
return;
}
base.OnPoisonImmunity( from,poison );
}

public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison)
{
if (Petals && (poison != oldPoison))
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
return;
}
base.OnPoisoned( from, poison, oldPoison);
}
// End added Orange Petals

For those unsure where to add it just copy it and paste it at line 51. For those with modified
versions of PlayerMobile just add it anywhere within the PlayerMobile class like right after this:

public class PlayerMobile : Mobile
{
 

Ymerej

Wanderer
Sounds easy enough, but once again I get errors. I added the code to line 51 like so:

Code:
                           FishermensGuild,
		BardsGuild,
		BlacksmithsGuild
		}
	//ADDED for Orange Petals
		public bool Petals;

		public override bool CheckPoisonImmunity( Mobile from, Poison poison )
		{
		if (Petals)
			return (poison.Level < 3);
		return base.CheckPoisonImmunity( from, poison );
		}

		public override void OnPoisonImmunity(Mobile from, Poison poison) 
		{
		if (Petals)
			{
			this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
			return;
			}		
		base.OnPoisonImmunity( from,poison ); 
		}

		public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison) 
		{
		if (Petals && (poison != oldPoison))
			{
			this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
			return;
			}
		base.OnPoisoned( from, poison, oldPoison);
		}
		// End added Orange Petals
	public class PlayerMobile : Mobile
		{
		private class CountAndTimeStamp
		{
			private int m_Count;
			private DateTime m_Stamp;

			public CountAndTimeStamp()



And these are the errors I receive on startup:

Scripts: Compiling C# scripts...failed (4 errors, 0 warnings)
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 51, column 10) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 53, column 19) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 60, column 19) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 70, column 19) Expected
class, delegate, enum, interface, or struct
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Ymerej

Wanderer
Ok, I seemed to have gotten it to work! Here is what I did, I'm supposing since I didn't get any errors it's correct, but I'd love to be 100% certain.

Code:
public class PlayerMobile : Mobile
	{
		//ADDED for Orange Petals
		public bool Petals;

		public override bool CheckPoisonImmunity( Mobile from, Poison poison )
		{
		if (Petals)
			return (poison.Level < 3);
		return base.CheckPoisonImmunity( from, poison );
		}

		public override void OnPoisonImmunity(Mobile from, Poison poison) 
		{
		if (Petals)
			{
			this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
			return;
			}		
		base.OnPoisonImmunity( from,poison ); 
		}

		public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison) 
		{
		if (Petals && (poison != oldPoison))
			{
			this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
			return;
			}
		base.OnPoisoned( from, poison, oldPoison);
		}
		// End added Orange Petals
		
		private class CountAndTimeStamp
 
Top