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!

Druid Vendor & SBDruid & Druid Spell System

Darkness_PR

Wanderer
ssalter said:
I'll just disable the spell for now until I have time to troubleshoot it. Same thing happened for me with latest client version.
do you have the SE client like the acutal system?
 

ssalter

Account Terminated
It would be simplest for you just to take a look at DruidSpellBookGump.cs. Starting at line 155 is a listing of all druid spells and a description of what they do as well as reagent requirements, required mana and skill.
 

stormwolff

Knight
ssalter said:
It would be simplest for you just to take a look at DruidSpellBookGump.cs. Starting at line 155 is a listing of all druid spells and a description of what they do as well as reagent requirements, required mana and skill.

That will do. thanks :)
 
Firefly recall fix

To fix the client crash recall problem I changed from Basecreature to BaseFamiliar. (since the script is titled fireflyfamiliar, I assume that was the original intention)

I also added a control slot of 1 since there is no check to see if a familiar exists upon casting (which should be fine since 5 of these little guys dont do much damage)

Now, when you recall, you lose your familiar (again, following current familiar rules)

Simply replace your FireflyFamiliar.cs code with the code below.


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

namespace Server.Mobiles
{
	[CorpseName( "a firefly corpse" )]
	public class FireflyFamiliar : BaseFamiliar
	{
	public override double DispelDifficulty{ get{ return 75.0; } }
	
		public FireflyFamiliar()
		{
			Name = "a firefly";
			Body = 495;
			Hue = 0x0;
			BaseSoundID = 466;

			SetStr( 5 );
			SetDex( 6 );
			SetInt( 10 );

			SetHits( 10 );
			SetStam( 10 );
			SetMana( 0 );

			SetDamage( 1, 2 );

			SetDamageType( ResistanceType.Fire, 100 );

			SetResistance( ResistanceType.Physical, 10, 15 );
			SetResistance( ResistanceType.Fire, 75, 99 );
			SetResistance( ResistanceType.Cold, 10, 15 );
			SetResistance( ResistanceType.Poison, 10, 15 );
			SetResistance( ResistanceType.Energy, 0, 3 );

			SetSkill( SkillName.Wrestling, 10, 11 );
			SetSkill( SkillName.Tactics, 10 );
			
			AddItem( new LightSource() );
			AddItem( new LightSource() );

			ControlSlots = 1;
		}

		private DateTime m_NextRestore;

		public override void OnThink()
		{
			base.OnThink();

			if ( DateTime.Now < m_NextRestore )
				return;

			m_NextRestore = DateTime.Now + TimeSpan.FromSeconds( 2.0 );

			Mobile caster = ControlMaster;

			if ( caster == null )
				caster = SummonMaster;

			if ( caster != null )
				++caster.Stam;
		}

		public FireflyFamiliar( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}
 

Darkness_PR

Wanderer
camberman2003 said:
To fix the client crash recall problem I changed from Basecreature to BaseFamiliar. (since the script is titled fireflyfamiliar, I assume that was the original intention)

I also added a control slot of 1 since there is no check to see if a familiar exists upon casting (which should be fine since 5 of these little guys dont do much damage)

Now, when you recall, you lose your familiar (again, following current familiar rules)

Simply replace your FireflyFamiliar.cs code with the code below.


Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Network;
 
namespace Server.Mobiles
{
	[CorpseName( "a firefly corpse" )]
	public class FireflyFamiliar : BaseFamiliar
	{
	public override double DispelDifficulty{ get{ return 75.0; } }
 
		public FireflyFamiliar()
		{
			Name = "a firefly";
			Body = 495;
			Hue = 0x0;
			BaseSoundID = 466;
 
			SetStr( 5 );
			SetDex( 6 );
			SetInt( 10 );
 
			SetHits( 10 );
			SetStam( 10 );
			SetMana( 0 );
 
			SetDamage( 1, 2 );
 
			SetDamageType( ResistanceType.Fire, 100 );
 
			SetResistance( ResistanceType.Physical, 10, 15 );
			SetResistance( ResistanceType.Fire, 75, 99 );
			SetResistance( ResistanceType.Cold, 10, 15 );
			SetResistance( ResistanceType.Poison, 10, 15 );
			SetResistance( ResistanceType.Energy, 0, 3 );
 
			SetSkill( SkillName.Wrestling, 10, 11 );
			SetSkill( SkillName.Tactics, 10 );
 
			AddItem( new LightSource() );
			AddItem( new LightSource() );
 
			ControlSlots = 1;
		}
 
		private DateTime m_NextRestore;
 
		public override void OnThink()
		{
			base.OnThink();
 
			if ( DateTime.Now < m_NextRestore )
				return;
 
			m_NextRestore = DateTime.Now + TimeSpan.FromSeconds( 2.0 );
 
			Mobile caster = ControlMaster;
 
			if ( caster == null )
				caster = SummonMaster;
 
			if ( caster != null )
				++caster.Stam;
		}
 
		public FireflyFamiliar( Serial serial ) : base( serial )
		{
		}
 
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
 
			writer.Write( (int) 0 );
		}
 
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
 
			int version = reader.ReadInt();
		}
	}
}

Oh allright thanks for the update in the familiar im making the update right now....Thanks camberman2003
 

ssalter

Account Terminated
That still crashes the client.

as a quick fix when this first was noticed, I just did this to prevent client crashes. it isn't a perfect fix but it works. Basically all I did was change the bodyvalue, plus a couple other tweaks.


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

namespace Server.Mobiles
{
	[CorpseName( "a firefly corpse" )]
	public class FireflyFamiliar : BaseCreature
	{
	
		public FireflyFamiliar(): base( AIType.AI_Animal, FightMode.Agressor, 10, 1, 0.2, 0.4 )
		{
			Name = "a firefly";
			Body = 165;
			Hue = 0x481;
			BaseSoundID = 466;

			SetStr( 50 );
			SetDex( 60 );
			SetInt( 100 );

			SetHits( 50 );
			SetStam( 60 );
			SetMana( 0 );

			SetDamage( 5, 10 );

			SetDamageType( ResistanceType.Energy, 100 );

			SetResistance( ResistanceType.Physical, 10, 15 );
			SetResistance( ResistanceType.Fire, 10, 15 );
			SetResistance( ResistanceType.Cold, 10, 15 );
			SetResistance( ResistanceType.Poison, 10, 15 );
			SetResistance( ResistanceType.Energy, 99 );

			SetSkill( SkillName.Wrestling, 40.0 );
			SetSkill( SkillName.Tactics, 40.0 );
			AddItem( new LightSource() );
			ControlSlots = 1;
		}


		public FireflyFamiliar( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}
 

Darkness_PR

Wanderer
ssalter said:
That still crashes the client.

as a quick fix when this first was noticed, I just did this to prevent client crashes. it isn't a perfect fix but it works. Basically all I did was change the bodyvalue, plus a couple other tweaks.


Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Network;
 
namespace Server.Mobiles
{
	[CorpseName( "a firefly corpse" )]
	public class FireflyFamiliar : BaseCreature
	{
 
		public FireflyFamiliar(): base( AIType.AI_Animal, FightMode.Agressor, 10, 1, 0.2, 0.4 )
		{
			Name = "a firefly";
			Body = 165;
			Hue = 0x481;
			BaseSoundID = 466;
 
			SetStr( 50 );
			SetDex( 60 );
			SetInt( 100 );
 
			SetHits( 50 );
			SetStam( 60 );
			SetMana( 0 );
 
			SetDamage( 5, 10 );
 
			SetDamageType( ResistanceType.Energy, 100 );
 
			SetResistance( ResistanceType.Physical, 10, 15 );
			SetResistance( ResistanceType.Fire, 10, 15 );
			SetResistance( ResistanceType.Cold, 10, 15 );
			SetResistance( ResistanceType.Poison, 10, 15 );
			SetResistance( ResistanceType.Energy, 99 );
 
			SetSkill( SkillName.Wrestling, 40.0 );
			SetSkill( SkillName.Tactics, 40.0 );
			AddItem( new LightSource() );
			ControlSlots = 1;
		}
 
 
		public FireflyFamiliar( Serial serial ) : base( serial )
		{
		}
 
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
 
			writer.Write( (int) 0 );
		}
 
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
 
			int version = reader.ReadInt();
		}
	}
}

If you want you may want to make the bodyvalue has a Wisp....thats if you want of course, some how when i cast it, it dosent crash my client =/...
 
Ok, I think my GM and I figured it out (well, mostly him, hehe). We disabled the lightsource and it seemed to work fine. The reason I thought it was working this morning was because I had been recalling to an area that had the same day or night level that I was in. When recalling/gating to an area with a different light level, it crashed the client.

I like the idea of having a lightsource to be able to 'see' the firefly, but there must be a way to add it without crashing, hehe.
 

ssalter

Account Terminated
Darkness_PR said:
If you want you may want to make the bodyvalue has a Wisp....thats if you want of course, some how when i cast it, it dosent crash my client =/...

As I mentioned, that is basically what I did. Also added the firefly to a slot. and standardized the code to agree with other summoned creatures.
 

ssalter

Account Terminated
Lucid Nagual said:
How could we go about deleting the fireflies just before recall?

You really want to modify recall to check to see if a firefly is present? Try moving the light to a different layer as Voran suggested or just change the bodytype to a wisp as I did as a quick hack. Voran's suggestion would be a more elegant way of doing it.

As to disabling the lightsource, that is what the "firefly" is all about. :)
 
Light

One prob I don't understand what u mean by layer. Sry I'm an idiot. What would be really neat would be the body MODs rotating between wisp and firefly. Cause then it would be like the real thing. The light would go on and off. How do I change layers?
 

Darkness_PR

Wanderer
Mmm...im gonna try work on it my self...the only thing is we are selling the house and im moving like in a week or two to a diff house and I have being rushed lately and only came in for new scripts and support of any sort i have being looking around the FireFlyFamiliar.cs but no answer yet, when i finally fix it ill let you all know, if someone has a fix for it plz let us know, it would be very usefull. Thanks
 
ok what files in the pack are the ones that are supposed to replace the distro files you listed in teh installation instruction, im getting mound of errors
 
Code:
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Enchan
tedGrove.cs: CS0117: (line 20, column 13) 'Server.Spells.Reagent' does not conta
in a definition for 'PetrafiedWood'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Enchan
tedGrove.cs: CS0117: (line 21, column 13) 'Server.Spells.Reagent' does not conta
in a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Graspi
ngRootsSpell.cs: CS0117: (line 17, column 13) 'Server.Spells.Reagent' does not c
ontain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\LureSt
oneSpell.cs: CS0117: (line 22, column 16) 'Server.Spells.Reagent' does not conta
in a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Mushro
omCircleSpell.cs: CS0117: (line 23, column 13) 'Server.Spells.Reagent' does not
contain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Mushro
omGatewaySpell.cs: CS0117: (line 20, column 5) 'Server.Spells.Reagent' does not
contain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\PackOf
BeastSpell.cs: CS0117: (line 18, column 13) 'Server.Spells.Reagent' does not con
tain a definition for 'PetrafiedWood'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Restor
ativeSoilSpell.cs: CS0117: (line 20, column 13) 'Server.Spells.Reagent' does not
 contain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Shield
OfEarthSpell.cs: CS0117: (line 18, column 13) 'Server.Spells.Reagent' does not c
ontain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Spring
OfLifeSpell.cs: CS0117: (line 18, column 13) 'Server.Spells.Reagent' does not co
ntain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Spring
OfLifeSpell.cs: CS0117: (line 19, column 13) 'Server.Spells.Reagent' does not co
ntain a definition for 'SpringWater'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Summon
FireflySpell.cs: CS0117: (line 17, column 15) 'Server.Spells.Reagent' does not c
ontain a definition for 'DestroyingAngel'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Swarmo
fInsectsSpell.cs: CS0117: (line 19, column 13) 'Server.Spells.Reagent' does not
contain a definition for 'DestroyingAngel'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Treefe
llowSpell.cs: CS0117: (line 18, column 15) 'Server.Spells.Reagent' does not cont
ain a definition for 'PetrafiedWood'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\Druid Spells\Volcan
icEruption.cs: CS0117: (line 18, column 13) 'Server.Spells.Reagent' does not con
tain a definition for 'DestroyingAngel'
 - Error: Scripts\customs\druidsys\Druid System\Druid System\DruidicSpellBook.cs
: CS0117: (line 10, column 64) 'Server.Items.SpellbookType' does not contain a d
efinition for 'Druidic'

these are the errors that i get
 
Top