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] FS: Animal Taming Systems Gen2

RoninGT

Sorceror
Yes i think i have found the problems between the 2 ver of BaseCreature.cs. I am working on a patch file for it as we speak. I think it was covered in a older thread but i am half asleep atm (Just woke up) so ill review the post and make use.

Ronin
 

RoninGT

Sorceror
Ok someone try this and see if the error goes away i have not had time for a proper test. iczweb found this. Since i added 3 new veriables. Replace your BaseCreature.cs with this one if you were using ManOfWars ver prior to mine.

Someone let me know if it works ill add to main download.

Ronin
 

Attachments

  • ManOfWar2RoninGT Patch.zip
    27.6 KB · Views: 166
reinstalled my server in a new folder and started with daats token theninstalled fs tamer with no problems. Think i must have lost track of an edit or 2 :( thanks for all the responses. I really have no clue what i am doing as i just jumped into the self server thing feet first and learning as i go. I still havent figured out hot to change the name of my server :). Oh by the way there is a typo in the playermobile file. says "edtis" instead of edits. dunno if that causes an issue or not but i fixed mine.
 

manofwar

Sorceror
Ronin i Notice 2 things.........

I noticed a couple of scripts from old to new are different.

First in BaseCreature.cs,

Code:
		//Advanced Pet System
		public void DoDeathCheck()
		{
			Mobile cm = this.ControlMaster;

			if ( cm != null && this.Controled == true && Tamable == true )
			{
				if ( this.IsBonded == true )
				{
					if ( this.AbilityPoints >= 0 && Utility.Random( 100 ) < 25 )
					{
						this.AbilityPoints = this.AbilityPoints / 2;
						cm.SendMessage( 38, "Your pet has lost half of thier ability points due to its untimely death." );
					}
					else if ( this.Exp >= 0 && Utility.Random( 100 ) < 25 )
					{
						this.Exp = this.Exp / 2;
						cm.SendMessage( 38, "Your pet has lost half of thier exp due to its untimely death." );
					}
					else if ( Utility.Random( 100 ) < 25 )
					{
						int strloss = this.Str / 20;
						int dexloss = this.Dex / 20;
						int intloss = this.Int / 20;
						int hitsloss = this.Hits / 20;
						int stamloss = this.Stam / 20;
						int manaloss = this.Mana / 20;
						int physloss = this.PhysicalResistance / 20;
						int fireloss = this.FireResistance / 20;
						int coldloss = this.ColdResistance / 20;
						int energyloss = this.EnergyResistance / 20;
						int poisonloss = this.PoisonResistance / 20;
						int dminloss = this.DamageMin / 20;
						int dmaxloss = this.DamageMax / 20;

						this.Str -= strloss;
						this.Dex -= dexloss;
						this.Int -= intloss;
						
						if ( this.HitsMaxSeed >= 0 )
							this.HitsMaxSeed -= hitsloss;
						if ( this.StamMaxSeed >= 0 )
							this.StamMaxSeed -= stamloss;
						if ( this.ManaMaxSeed >= 0 )
							this.ManaMaxSeed -= manaloss;

						if ( this.PhysicalResistanceSeed >= 0 )
							this.PhysicalResistanceSeed -= physloss;
						if ( this.FireResistSeed >= 0 )
							this.FireResistSeed -= fireloss;
						if ( this.ColdResistSeed >= 0 )
							this.ColdResistSeed -= coldloss;
						if ( this.EnergyResistSeed >= 0 )
							this.EnergyResistSeed -= energyloss;
						if ( this.PoisonResistSeed >= 0 )
							this.PoisonResistSeed -= poisonloss;

						this.DamageMin -= dminloss;
						this.DamageMax -= dmaxloss;

						cm.SendMessage( 38, "Your pet has suffered a 5% stat lose due to its untimely death." );
					}

					cm.SendMessage( 64, "Your pet has been killed!" );
				}
				else
				{
					cm.SendMessage( 64, "Your pet has been killed!" );
				}
			}
		}

		public void DoBioDeath()
		{
			Mobile cm = this.ControlMaster;

			if ( cm != null && this.Controled == true && Tamable == true )
			{
				if ( this.IsBonded == true )
				{
					if ( Utility.Random( 100 ) < 25 )
					{
						int strloss = this.Str / 20;
						int dexloss = this.Dex / 20;
						int intloss = this.Int / 20;
						int hitsloss = this.Hits / 20;
						int stamloss = this.Stam / 20;
						int manaloss = this.Mana / 20;
						int physloss = this.PhysicalResistance / 20;
						int fireloss = this.FireResistance / 20;
						int coldloss = this.ColdResistance / 20;
						int energyloss = this.EnergyResistance / 20;
						int poisonloss = this.PoisonResistance / 20;
						int dminloss = this.DamageMin / 20;
						int dmaxloss = this.DamageMax / 20;

						this.Str -= strloss;
						this.Dex -= dexloss;
						this.Int -= intloss;
						
						if ( this.HitsMaxSeed >= 0 )
							this.HitsMaxSeed -= hitsloss;
						if ( this.StamMaxSeed >= 0 )
							this.StamMaxSeed -= stamloss;
						if ( this.ManaMaxSeed >= 0 )
							this.ManaMaxSeed -= manaloss;

						if ( this.PhysicalResistanceSeed >= 0 )
							this.PhysicalResistanceSeed -= physloss;
						if ( this.FireResistSeed >= 0 )
							this.FireResistSeed -= fireloss;
						if ( this.ColdResistSeed >= 0 )
							this.ColdResistSeed -= coldloss;
						if ( this.EnergyResistSeed >= 0 )
							this.EnergyResistSeed -= energyloss;
						if ( this.PoisonResistSeed >= 0 )
							this.PoisonResistSeed -= poisonloss;

						this.DamageMin -= dminloss;
						this.DamageMax -= dmaxloss;

						cm.SendMessage( 38, "Your pet has suffered a 5% stat lose due to its untimely death." );
					}

					cm.SendMessage( 64, "Your pet has been killed!" );
				}
				else
				{
					cm.SendMessage( 64, "Your pet has been killed!" );
				}
			}
		}

		public void CheckLevel( Mobile defender )
		{
			int expgainmin, expgainmax;

			if ( this is BaseBioCreature )
			{
			}
			else if ( defender is BaseCreature )
			{
				if ( this.Controled == true && this.ControlMaster != null && Summoned == false )
				{
					BaseCreature bc = (BaseCreature)defender;

					expgainmin = 5 + ( bc.HitsMax ) / 10;
					expgainmax = 5 + ( bc.HitsMax ) / 5;

					if ( m_Level <= m_MaxLevel - 1 )
						m_Exp += Utility.RandomList( expgainmin, expgainmax );
			
					int nextLevel = m_NextLevel * m_Level;

					if ( m_Exp >= nextLevel && m_Level <= m_MaxLevel - 1 )
					{
						Mobile cm = this.ControlMaster;
						m_Level += 1;
						m_Exp = 0;
						this.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
						this.PlaySound( 503 );
						cm.SendMessage( 38, "Your pets level has increased to {0}.", m_Level );

						int gain = Utility.RandomList( 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6 );

						int random = Utility.Random( 100 );

						if ( random < 2 )
							gain = gain * 10;
						else if ( random < 4 )
							gain = gain * 5;
						else if ( random < 6 )
							gain = gain * 4;
						else if ( random < 8 )
							gain = gain * 3;
						else if ( random < 10 )
							gain = gain * 2;
						else
							gain = gain;

						this.AbilityPoints += gain;

						if ( this.ControlMaster != null )
						{
							this.ControlMaster.SendMessage( 38, "Your pet {0} has gained some ability points, Goto your pets 'NPC Info' and click the red diamond to apply these points." );
							//this.ControlMaster.CloseGump( typeof( LevelGump ) );
							//this.ControlMaster.CloseGump( typeof( PetLevelGump ) );
							//this.ControlMaster.SendGump( new LevelGump( this ) );
						}

						if ( m_Level == 9 )
						{
							m_AllowMating = true;
							cm.SendMessage( 1161, "Your pet is now at the level to mate." );
						}
						if ( m_Evolves == true )
						{
							if ( UsesForm1 == true && F0 == true )
							{
								this.BodyValue = m_Form1;
								this.BaseSoundID = m_Sound1;
								m_F1 = true;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm1 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm2 == true && F1 == true )
							{
								this.BodyValue = m_Form2;
								this.BaseSoundID = m_Sound2;
								m_F1 = false;
								m_F2 = true;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm2 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm3 == true && F2 == true )
							{
								this.BodyValue = m_Form3;
								this.BaseSoundID = m_Sound3;
								m_F1 = false;
								m_F2 = false;
								m_F3 = true;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm3 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm4 == true && F3 == true )
							{
								this.BodyValue = m_Form4;
								this.BaseSoundID = m_Sound4;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = true;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm4 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm5 == true && F4 == true )
							{
								this.BodyValue = m_Form5;
								this.BaseSoundID = m_Sound5;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = true;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm5 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm6 == true && F5 == true )
							{
								this.BodyValue = m_Form6;
								this.BaseSoundID = m_Sound6;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = true;
								m_F7 = false;
								m_F8 = false;
								m_F9 = false;
								UsesForm6 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm7 == true && F6 == true )
							{
								this.BodyValue = m_Form7;
								this.BaseSoundID = m_Sound7;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = true;
								m_F8 = false;
								m_F9 = false;
								UsesForm7 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm8 == true && F7 == true )
							{
								this.BodyValue = m_Form8;
								this.BaseSoundID = m_Sound8;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = true;
								m_F9 = false;
								UsesForm8 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( UsesForm9 == true && F8 == true )
							{
								this.BodyValue = m_Form9;
								this.BaseSoundID = m_Sound9;
								m_F1 = false;
								m_F2 = false;
								m_F3 = false;
								m_F4 = false;
								m_F5 = false;
								m_F6 = false;
								m_F7 = false;
								m_F8 = false;
								m_F9 = true;
								UsesForm9 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}	
						}
					}
				}
			}
		}
		//End Advanced Pet System

You had this in old code but not in new code, Also this,
Code:
			if ( FSATS.EnablePetLeveling == true )
			{
				bool nolevel = false;
				Type typ = this.GetType();
				string nam = typ.Name;

				foreach ( string check in FSATS.NoLevelCreatures )
				{
  					if ( check == nam )
    						nolevel = true;
				}

				if ( nolevel != true )
					CheckLevel( defender );
			}

Dont know if these were left out for reason or not. Plus you rewrote a couple of parts of your edits but didnt see anything in BaseCreature.cs that would give those errors. Now to the PlayerMobile.cs edits,

Code:
		private DateTime m_NextTamingBulkOrder;
		private bool m_Bioenginer;

I Really think this is where the errors are coming from. This is from the old version i had done but in the Gen2 This is not in the playermobile Edits. Hope this Helps you out some.

The above code goes under this code,
Code:
		private SkillName m_Learning = (SkillName)(-1);

Again hope this helps you out RoninGT. Oh Also i have been keeping up with the SVN versions and so far this script package works with the few things i have pointed out added in.
 

RoninGT

Sorceror
The parts in base creature that are missing are now in PetLeveling.cs in the Core folder. Ill look over what you posted thank you for the info.

Also has anyone confirmed if the patch i posted works? I have not had time myself to test.

Ronin
 

Tee312

Wanderer
lol, not sure if there is where to post it, but i found a minor, erm maybe call it a bug lol. everytime your pet levels up, it says "Your pet *here it says the number of ability points it gained that level* has gained some ability points. I do like the idea of knowing how much ability points my pet gets each lvl, but i cant tell which pet lvled :p

Example : "Your pet 37 has gained some ability points" (i was testing with "A Hydra" was testing out some abilitys with hydra when i noticed it :p)
Great script though! runs fine for me, and i love it, i think overall this is my favorite system on any shard :)
 

dragonlady

Sorceror
I have a ? I'm trying to add this in but i had to merge my playermobile and basecreatures, can u tell me what im doing wrong, i hate that i can't read the error's ty
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 37 warnings)
Warnings:
+ Items/Custom Script/Custom Commands/ShardInfo.cs:
CS0105: Line 13: The using directive for 'Server.Network' appeared previousl
y in this namespace
+ Items/Custom Script/Custom Crafting/Publisher/Publisher/Publisher.cs:
CS0108: Line 18: 'Server.Mobiles.Publisher.PlaySound' hides inherited member
'Server.Mobile.PlaySound(int)'. Use the new keyword if hiding was intended.
+ Items/Custom Script/Custom Quest/VampireQuest/VampQuestItems/Drac Required it
ems/DraculasTeleporter.cs:
CS0114: Line 21: 'Server.Items.DraculasTeleporter.Location' hides inherited
member 'Server.Item.Location'. To make the current member override that implemen
tation, add the override keyword. Otherwise add the new keyword.
CS0108: Line 28: 'Server.Items.DraculasTeleporter.Map' hides inherited membe
r 'Server.Item.Map'. Use the new keyword if hiding was intended.
Error:
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Path.GetFullPath(String path)
at Server.ScriptCompiler.Display(CompilerResults results)
at Server.ScriptCompiler.CompileCSScripts(Boolean debug, Assembly& assembly)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit
 

Red_Satiin

Sorceror
Bulk Experience

Is there a way to have the pets gain experience before the death of their opponent? I noticed you changed it from the previous version. However we have trainers that allow for training pets however the pets will not gain levels when training on them.. Can I possibly change it back to the previous method of leveling? And if so... How?
 

Red_Satiin

Sorceror
anyone know what file I would look in to find this? I'm looking in PetLeveling and in BaseCreaature but I see no correlation between OnDeath and Gaining Exp.. :( Now I assume the DoLevelBonus is where the leveling is started? But I can't find how it's done OnDeath of others..

Anyone help me here?
 

Tee312

Wanderer
hail ronin, i love the taming system :p it so rocks :p but i have a suggestion, dont know if you'd like it or not, and ive tried myself but cant script it. My suggestion is, maybe pet ability scrolls that can be rewards or something, or maybe drop like powerscrolls. just a thought, i might try to work on t and post and get help on the forums
 

RoninGT

Sorceror
Red_Satiin said:
Is there a way to have the pets gain experience before the death of their opponent? I noticed you changed it from the previous version. However we have trainers that allow for training pets however the pets will not gain levels when training on them.. Can I possibly change it back to the previous method of leveling? And if so... How?

You can change it back if you want. However the "Trainer" thing is the reason i changed it to begain with. It seemed to me to be a cheat to have a pet level in 30 mins. This make it more RPGish if the player has to work for it. However you can look at a ver of the older code and change it back if you wish.

Ronin
 

Tee312

Wanderer
ya i liked the idea ronin, was gonna cange it then im like "no older way was to easy" so i left it the same :) I did tweak the ap gains though, was like 3-50 each level. :p And beleive the friend figured out the ap scrolls. Did you see my post on the issue with the leveling?
 

LordHogFred

Knight
Don't suppose you have it documented exactly what changes are made to basecreature and the other distro files do you?
It'd be really helpful cos Im just starting up a new server and so have tons of additions and changes to make and as a result can't really just replace me current distro files with the ones in the pack.
Chz :),
 

Ravenloff

Wanderer
I notice in this version there is no using human dna for mimic for making bio pets like brigs ect..... which is cool with me but was wondering if you notice that players can still use savage dna for mimic to make bio pets still.

Awesome script as always Ronin :) Thanx
 

Xanorin

Wanderer
I have the system installed looks good just wondering where or if there is a guardian evo dragon that players can kill to get eggs and or dust same with other evo types or can I use something from another system?
 

RoninGT

Sorceror
First i am working on docs for the scripts however busy real life + plus a new server of my own is keeping me busy. I will get the docs out ASAP for you all.

No i removed human bios due to many balance issues they can be made to work again however.

Also if there are any bugs you notice please post them i check the forums every few days when i get a chance and ill address them as i or you find them.

My ver does not have guardian evos. That script belongs to someone else. However my system has normal evo bases for you to build from they are just simply tamable pets however can be made to do other things :)

Ronin
 

LordHogFred

Knight
Sorry Ronin I was being a tit I downloaded the RUo 1.0 version, I double checked and got this one and just used winmerge. Sorry:eek:
 
Top