protected override void OnTarget( Mobile from, object target ) 
         	{
			if ( target is DNAItem )
			{
				DNAItem dna = (DNAItem)target;
				if ( dna.DNAType != DNAType.None )
				{
					if ( dna.DNAType == DNAType.Prowess && m_VialSet.Prowess == false )
					{
						m_VialSet.Prowess = true;
						from.PlaySound( 0x240 );
						from.SendMessage( "The DNA was successfully added to the DNA Set" );

						m_VialSet.DNAStr = dna.DNAStr;
						m_VialSet.DNAHits = dna.DNAHits;
						m_VialSet.DNAPhysicalResist = dna.DNAPhysicalResist;
						m_VialSet.DNADamageMin = dna.DNADamageMin;
						m_VialSet.DNADamageMax = dna.DNADamageMax;
						m_VialSet.DNAArmor = dna.DNAArmor;

						m_VialSet.DNAAnatomy = dna.DNAAnatomy;
						m_VialSet.DNATactics = dna.DNATactics;
						m_VialSet.DNAWrestling = dna.DNAWrestling;
					
						dna.Delete();
					}
					else if ( dna.DNAType == DNAType.Environment && m_VialSet.Environment == false )
					{
						m_VialSet.Environment = true;
						from.PlaySound( 0x240 );
						from.SendMessage( "The DNA was successfully added to the DNA Set" );

						m_VialSet.DNADex = dna.DNADex;
						m_VialSet.DNAStam = dna.DNAStam;
						m_VialSet.DNAFireResist = dna.DNAFireResist;
						m_VialSet.DNAColdResist = dna.DNAColdResist;

						m_VialSet.DNAPoisoning = dna.DNAPoisoning;
						m_VialSet.DNAMagicResist = dna.DNAMagicResist;

						dna.Delete();
					}
					else if ( dna.DNAType == DNAType.Mental && m_VialSet.Mental == false )
					{
						m_VialSet.Mental = true;
						from.PlaySound( 0x240 );
						from.SendMessage( "The DNA was successfully added to the DNA Set" );

						m_VialSet.DNAInt = dna.DNAInt;
						m_VialSet.DNAMana = dna.DNAMana;
						m_VialSet.DNAEnergyResist = dna.DNAEnergyResist;
						m_VialSet.DNAPoisonResist = dna.DNAPoisonResist;

						m_VialSet.DNAMagery = dna.DNAMagery;
						m_VialSet.DNAEvalInt = dna.DNAEvalInt;
						m_VialSet.DNAMeditation = dna.DNAMeditation;

						dna.Delete();
					}
					else if ( dna.DNAType == DNAType.Mimic && m_VialSet.Mimic == false )
					{
						m_VialSet.Mimic = true;
						from.PlaySound( 0x240 );
						from.SendMessage( "The DNA was successfully added to the DNA Set" );

						m_VialSet.DNABodyValue = dna.DNABodyValue;
						m_VialSet.DNASoundID = dna.DNASoundID;

						m_VialSet.DNABluntAttack = dna.DNABluntAttack;
						m_VialSet.DNAHealAttack = dna.DNAHealAttack;
						m_VialSet.DNAPoisonAttack = dna.DNAPoisonAttack;

						m_VialSet.DNATrialByFire = dna.DNATrialByFire;
						m_VialSet.DNAIceBlast = dna.DNAIceBlast;
						m_VialSet.DNACometAttack = dna.DNACometAttack;
						m_VialSet.DNACallOfNature = dna.DNACallOfNature;
						m_VialSet.DNAAcidRain = dna.DNAAcidRain;

						m_VialSet.MountID = dna.MountID;

						dna.Delete();
					}
					else
					{
						from.SendMessage( "This DNA Set already has this type of DNA." );
					}


					if ( m_VialSet.Prowess == true && m_VialSet.Environment == true && m_VialSet.Mental == true && m_VialSet.Mimic == true )
					{
						m_VialSet.ItemID = 6237;
						from.SendMessage( "You have filled this DNA vial set." );

						m_VialSet.Prowess = false;
						m_VialSet.Environment = false;
						m_VialSet.Mental = false;
						m_VialSet.Mimic = false;

						int qua = m_VialSet.DNAStr + m_VialSet.DNADex + m_VialSet.DNAInt + m_VialSet.DNAHits + m_VialSet.DNAStam + m_VialSet.DNAMana + m_VialSet.DNAPhysicalResist + m_VialSet.DNAFireResist + m_VialSet.DNAColdResist + m_VialSet.DNAEnergyResist + m_VialSet.DNAPoisonResist + m_VialSet.DNADamageMin + m_VialSet.DNADamageMax + m_VialSet.DNAArmor;

						if ( qua <= 250 )
						{
							m_VialSet.DNAQuality = DNAQuality.VeryLow;
							m_VialSet.DNAMinTame = 0;
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 500 )
						{
							m_VialSet.DNAQuality = DNAQuality.Low;
							m_VialSet.DNAMinTame = 0;
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 1250 )
						{
							m_VialSet.DNAQuality = DNAQuality.BelowAverage;
							m_VialSet.DNAMinTame = 0;
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 2500 )
						{
							m_VialSet.DNAQuality = DNAQuality.Average;
							m_VialSet.DNAMinTame = Utility.RandomMinMax( 0, 5 );
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 3500 )
						{
							m_VialSet.DNAQuality = DNAQuality.AboveAverage;
							m_VialSet.DNAMinTame = Utility.RandomMinMax( 0, 25 );
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 4500 )
						{
							m_VialSet.DNAQuality = DNAQuality.High;
							m_VialSet.DNAMinTame = Utility.RandomMinMax( 0, 50 );
							m_VialSet.DNAControlSlots = 3;
						}
						else if ( qua <= 5000000 )
						{
							m_VialSet.DNAQuality = DNAQuality.VeryHigh;
							m_VialSet.DNAMinTame = Utility.RandomMinMax( 0, 100 );
							m_VialSet.DNAControlSlots = 3;
						}

						//Cap Skills if over 100
						if ( m_VialSet.DNAMagery >= 100.0 )
							m_VialSet.DNAMagery = 100.0;

						if ( m_VialSet.DNAEvalInt >= 100.0 )
							m_VialSet.DNAEvalInt = 100.0;

						if ( m_VialSet.DNAMeditation >= 100.0 )
							m_VialSet.DNAMeditation = 100.0;

						if ( m_VialSet.DNAPoisoning >= 100.0 )
							m_VialSet.DNAPoisoning = 100.0;

						if ( m_VialSet.DNAMagicResist >= 100.0 )
							m_VialSet.DNAMagicResist = 100.0;

						if ( m_VialSet.DNAWrestling >= 100.0 )
							m_VialSet.DNAWrestling = 100.0;

						if ( m_VialSet.DNAAnatomy >= 100.0 )
							m_VialSet.DNAAnatomy = 100.0;

						if ( m_VialSet.DNATactics >= 100.0 )
							m_VialSet.DNATactics = 100.0;

						if ( m_VialSet.DNAStr >= FSATS.BioSTR )
							m_VialSet.DNAStr = FSATS.BioSTR;

						if ( m_VialSet.DNADex >= FSATS.BioDEX )
							m_VialSet.DNADex = FSATS.BioDEX;

						if ( m_VialSet.DNAInt >= FSATS.BioINT )
							m_VialSet.DNAInt = FSATS.BioINT;

						if ( m_VialSet.DNAHits >= FSATS.BioHITS )
							m_VialSet.DNAHits = FSATS.BioHITS;

						if ( m_VialSet.DNAStam >= FSATS.BioSTAM )
							m_VialSet.DNAStam = FSATS.BioSTAM;

						if ( m_VialSet.DNAMana >= FSATS.BioMANA )
							m_VialSet.DNAMana = FSATS.BioMANA;

						if ( m_VialSet.DNAFireResist >= 0 && m_VialSet.DNABodyValue == 400 ||m_VialSet.DNABodyValue == 400 )
							m_VialSet.DNAFireResist = 0;
						else if ( m_VialSet.DNAFireResist >= FSATS.BioFire )
							m_VialSet.DNAFireResist = FSATS.BioFire;

						if ( m_VialSet.DNAColdResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400 )
							m_VialSet.DNAColdResist = 0;
						else if ( m_VialSet.DNAColdResist >= FSATS.BioCold )
							m_VialSet.DNAColdResist = FSATS.BioCold;

						if ( m_VialSet.DNAEnergyResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400 )
							m_VialSet.DNAEnergyResist = 0;
						else if ( m_VialSet.DNAEnergyResist >= FSATS.BioEnergy )
							m_VialSet.DNAEnergyResist = FSATS.BioEnergy;

						if ( m_VialSet.DNAPoisonResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400 )
							m_VialSet.DNAPoisonResist = 0;
						else if ( m_VialSet.DNAPoisonResist >= FSATS.BioPoison )
							m_VialSet.DNAPoisonResist = FSATS.BioPoison;

						if ( m_VialSet.DNAPhysicalResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400 )
							m_VialSet.DNAPhysicalResist = 0;
						else if ( m_VialSet.DNAPhysicalResist >= FSATS.BioPhys )
							m_VialSet.DNAPhysicalResist = FSATS.BioPhys;

						if ( m_VialSet.DNADamageMin >= FSATS.BioMinDam )
							m_VialSet.DNADamageMin = FSATS.BioMinDam;

						if ( m_VialSet.DNADamageMax >= FSATS.BioMaxDam )
							m_VialSet.DNADamageMax = FSATS.BioMaxDam;

						if ( m_VialSet.DNAArmor >= FSATS.BioVArmor )
							m_VialSet.DNAArmor = FSATS.BioVArmor;

						m_VialSet.IsFull = true;

						if ( m_VialSet.IsFull == true )
						{
							BioPetItem bio = new BioPetItem();

							bio.DNAStr = m_VialSet.DNAStr;
							bio.DNADex = m_VialSet.DNADex;
							bio.DNAInt = m_VialSet.DNAInt;

							bio.DNAHits = m_VialSet.DNAHits;
							bio.DNAStam = m_VialSet.DNAStam;
							bio.DNAMana = m_VialSet.DNAMana;

							bio.DNADamageMin = m_VialSet.DNADamageMin;
							bio.DNADamageMax = m_VialSet.DNADamageMax;

							bio.DNAArmor = m_VialSet.DNAArmor;

							bio.DNAFireResist = m_VialSet.DNAFireResist;
							bio.DNAColdResist = m_VialSet.DNAColdResist;
							bio.DNAEnergyResist = m_VialSet.DNAEnergyResist;
							bio.DNAPoisonResist = m_VialSet.DNAPoisonResist;
							bio.DNAPhysicalResist = m_VialSet.DNAPhysicalResist;

							bio.DNAMagery = m_VialSet.DNAMagery;
							bio.DNAEvalInt = m_VialSet.DNAEvalInt;
							bio.DNAMeditation = m_VialSet.DNAMeditation;
							bio.DNAMagicResist = m_VialSet.DNAMagicResist;
							bio.DNAPoisoning = m_VialSet.DNAPoisoning;
							bio.DNAAnatomy = m_VialSet.DNAAnatomy;
							bio.DNATactics = m_VialSet.DNATactics;
							bio.DNAWrestling = m_VialSet.DNAWrestling;

							bio.DNABodyValue = m_VialSet.DNABodyValue;
							bio.DNASoundID = m_VialSet.DNASoundID;

							bio.DNABluntAttack = m_VialSet.DNABluntAttack;
							bio.DNAHealAttack = m_VialSet.DNAHealAttack;
							bio.DNAPoisonAttack = m_VialSet.DNAPoisonAttack;

							bio.DNATrialByFire = m_VialSet.DNATrialByFire;
							bio.DNAIceBlast = m_VialSet.DNAIceBlast;
							bio.DNACometAttack = m_VialSet.DNACometAttack;
							bio.DNACallOfNature = m_VialSet.DNACallOfNature;
							bio.DNAAcidRain = m_VialSet.DNAAcidRain;

							bio.DNAControlSlots = 5;
							bio.DNAMinTame = 120.0;

							bio.MountID = m_VialSet.MountID;

							bio.ItemID = ShrinkTable.Lookup( m_VialSet.DNABodyValue );

							bio.Visible = false;
							from.AddToBackpack( bio );
							m_VialSet.Delete();

							from.SendGump( new BioExpGump( -1, from, bio, 0, 0, 0, 0, 0 ) );
							
						}
					}
				}
			}
			else
			{
				from.SendMessage( "That cannot be added to this DNA set." );
			}
		}
예제 #2
0
        protected override void OnTarget(Mobile from, object target)
        {
            if (target is DNAItem)
            {
                DNAItem dna = (DNAItem)target;
                if (dna.DNAType != DNAType.None)
                {
                    if (dna.DNAType == DNAType.Prowess && m_VialSet.Prowess == false)
                    {
                        m_VialSet.Prowess = true;
                        from.PlaySound(0x240);
                        from.SendMessage("The DNA was successfully added to the DNA Set");

                        m_VialSet.DNAStr            = dna.DNAStr;
                        m_VialSet.DNAHits           = dna.DNAHits;
                        m_VialSet.DNAPhysicalResist = dna.DNAPhysicalResist;
                        m_VialSet.DNADamageMin      = dna.DNADamageMin;
                        m_VialSet.DNADamageMax      = dna.DNADamageMax;
                        m_VialSet.DNAArmor          = dna.DNAArmor;

                        m_VialSet.DNAAnatomy   = dna.DNAAnatomy;
                        m_VialSet.DNATactics   = dna.DNATactics;
                        m_VialSet.DNAWrestling = dna.DNAWrestling;

                        dna.Delete();
                    }
                    else if (dna.DNAType == DNAType.Environment && m_VialSet.Environment == false)
                    {
                        m_VialSet.Environment = true;
                        from.PlaySound(0x240);
                        from.SendMessage("The DNA was successfully added to the DNA Set");

                        m_VialSet.DNADex        = dna.DNADex;
                        m_VialSet.DNAStam       = dna.DNAStam;
                        m_VialSet.DNAFireResist = dna.DNAFireResist;
                        m_VialSet.DNAColdResist = dna.DNAColdResist;

                        m_VialSet.DNAPoisoning   = dna.DNAPoisoning;
                        m_VialSet.DNAMagicResist = dna.DNAMagicResist;

                        dna.Delete();
                    }
                    else if (dna.DNAType == DNAType.Mental && m_VialSet.Mental == false)
                    {
                        m_VialSet.Mental = true;
                        from.PlaySound(0x240);
                        from.SendMessage("The DNA was successfully added to the DNA Set");

                        m_VialSet.DNAInt          = dna.DNAInt;
                        m_VialSet.DNAMana         = dna.DNAMana;
                        m_VialSet.DNAEnergyResist = dna.DNAEnergyResist;
                        m_VialSet.DNAPoisonResist = dna.DNAPoisonResist;

                        m_VialSet.DNAMagery     = dna.DNAMagery;
                        m_VialSet.DNAEvalInt    = dna.DNAEvalInt;
                        m_VialSet.DNAMeditation = dna.DNAMeditation;

                        dna.Delete();
                    }
                    else if (dna.DNAType == DNAType.Mimic && m_VialSet.Mimic == false)
                    {
                        m_VialSet.Mimic = true;
                        from.PlaySound(0x240);
                        from.SendMessage("The DNA was successfully added to the DNA Set");

                        m_VialSet.DNABodyValue = dna.DNABodyValue;
                        m_VialSet.DNASoundID   = dna.DNASoundID;

                        m_VialSet.DNABluntAttack  = dna.DNABluntAttack;
                        m_VialSet.DNAHealAttack   = dna.DNAHealAttack;
                        m_VialSet.DNAPoisonAttack = dna.DNAPoisonAttack;

                        m_VialSet.DNATrialByFire  = dna.DNATrialByFire;
                        m_VialSet.DNAIceBlast     = dna.DNAIceBlast;
                        m_VialSet.DNACometAttack  = dna.DNACometAttack;
                        m_VialSet.DNACallOfNature = dna.DNACallOfNature;
                        m_VialSet.DNAAcidRain     = dna.DNAAcidRain;

                        m_VialSet.MountID = dna.MountID;

                        dna.Delete();
                    }
                    else
                    {
                        from.SendMessage("This DNA Set already has this type of DNA.");
                    }


                    if (m_VialSet.Prowess == true && m_VialSet.Environment == true && m_VialSet.Mental == true && m_VialSet.Mimic == true)
                    {
                        m_VialSet.ItemID = 6237;
                        from.SendMessage("You have filled this DNA vial set.");

                        m_VialSet.Prowess     = false;
                        m_VialSet.Environment = false;
                        m_VialSet.Mental      = false;
                        m_VialSet.Mimic       = false;

                        int qua = m_VialSet.DNAStr + m_VialSet.DNADex + m_VialSet.DNAInt + m_VialSet.DNAHits + m_VialSet.DNAStam + m_VialSet.DNAMana + m_VialSet.DNAPhysicalResist + m_VialSet.DNAFireResist + m_VialSet.DNAColdResist + m_VialSet.DNAEnergyResist + m_VialSet.DNAPoisonResist + m_VialSet.DNADamageMin + m_VialSet.DNADamageMax + m_VialSet.DNAArmor;

                        if (qua <= 250)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.VeryLow;
                            m_VialSet.DNAMinTame      = 0;
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 500)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.Low;
                            m_VialSet.DNAMinTame      = 0;
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 1250)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.BelowAverage;
                            m_VialSet.DNAMinTame      = 0;
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 2500)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.Average;
                            m_VialSet.DNAMinTame      = Utility.RandomMinMax(0, 5);
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 3500)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.AboveAverage;
                            m_VialSet.DNAMinTame      = Utility.RandomMinMax(0, 25);
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 4500)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.High;
                            m_VialSet.DNAMinTame      = Utility.RandomMinMax(0, 50);
                            m_VialSet.DNAControlSlots = 3;
                        }
                        else if (qua <= 5000000)
                        {
                            m_VialSet.DNAQuality      = DNAQuality.VeryHigh;
                            m_VialSet.DNAMinTame      = Utility.RandomMinMax(0, 100);
                            m_VialSet.DNAControlSlots = 3;
                        }

                        //Cap Skills if over 100
                        if (m_VialSet.DNAMagery >= 100.0)
                        {
                            m_VialSet.DNAMagery = 100.0;
                        }

                        if (m_VialSet.DNAEvalInt >= 100.0)
                        {
                            m_VialSet.DNAEvalInt = 100.0;
                        }

                        if (m_VialSet.DNAMeditation >= 100.0)
                        {
                            m_VialSet.DNAMeditation = 100.0;
                        }

                        if (m_VialSet.DNAPoisoning >= 100.0)
                        {
                            m_VialSet.DNAPoisoning = 100.0;
                        }

                        if (m_VialSet.DNAMagicResist >= 100.0)
                        {
                            m_VialSet.DNAMagicResist = 100.0;
                        }

                        if (m_VialSet.DNAWrestling >= 100.0)
                        {
                            m_VialSet.DNAWrestling = 100.0;
                        }

                        if (m_VialSet.DNAAnatomy >= 100.0)
                        {
                            m_VialSet.DNAAnatomy = 100.0;
                        }

                        if (m_VialSet.DNATactics >= 100.0)
                        {
                            m_VialSet.DNATactics = 100.0;
                        }

                        if (m_VialSet.DNAStr >= FSATS.BioSTR)
                        {
                            m_VialSet.DNAStr = FSATS.BioSTR;
                        }

                        if (m_VialSet.DNADex >= FSATS.BioDEX)
                        {
                            m_VialSet.DNADex = FSATS.BioDEX;
                        }

                        if (m_VialSet.DNAInt >= FSATS.BioINT)
                        {
                            m_VialSet.DNAInt = FSATS.BioINT;
                        }

                        if (m_VialSet.DNAHits >= FSATS.BioHITS)
                        {
                            m_VialSet.DNAHits = FSATS.BioHITS;
                        }

                        if (m_VialSet.DNAStam >= FSATS.BioSTAM)
                        {
                            m_VialSet.DNAStam = FSATS.BioSTAM;
                        }

                        if (m_VialSet.DNAMana >= FSATS.BioMANA)
                        {
                            m_VialSet.DNAMana = FSATS.BioMANA;
                        }

                        if (m_VialSet.DNAFireResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400)
                        {
                            m_VialSet.DNAFireResist = 0;
                        }
                        else if (m_VialSet.DNAFireResist >= FSATS.BioFire)
                        {
                            m_VialSet.DNAFireResist = FSATS.BioFire;
                        }

                        if (m_VialSet.DNAColdResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400)
                        {
                            m_VialSet.DNAColdResist = 0;
                        }
                        else if (m_VialSet.DNAColdResist >= FSATS.BioCold)
                        {
                            m_VialSet.DNAColdResist = FSATS.BioCold;
                        }

                        if (m_VialSet.DNAEnergyResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400)
                        {
                            m_VialSet.DNAEnergyResist = 0;
                        }
                        else if (m_VialSet.DNAEnergyResist >= FSATS.BioEnergy)
                        {
                            m_VialSet.DNAEnergyResist = FSATS.BioEnergy;
                        }

                        if (m_VialSet.DNAPoisonResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400)
                        {
                            m_VialSet.DNAPoisonResist = 0;
                        }
                        else if (m_VialSet.DNAPoisonResist >= FSATS.BioPoison)
                        {
                            m_VialSet.DNAPoisonResist = FSATS.BioPoison;
                        }

                        if (m_VialSet.DNAPhysicalResist >= 0 && m_VialSet.DNABodyValue == 400 || m_VialSet.DNABodyValue == 400)
                        {
                            m_VialSet.DNAPhysicalResist = 0;
                        }
                        else if (m_VialSet.DNAPhysicalResist >= FSATS.BioPhys)
                        {
                            m_VialSet.DNAPhysicalResist = FSATS.BioPhys;
                        }

                        if (m_VialSet.DNADamageMin >= FSATS.BioMinDam)
                        {
                            m_VialSet.DNADamageMin = FSATS.BioMinDam;
                        }

                        if (m_VialSet.DNADamageMax >= FSATS.BioMaxDam)
                        {
                            m_VialSet.DNADamageMax = FSATS.BioMaxDam;
                        }

                        if (m_VialSet.DNAArmor >= FSATS.BioVArmor)
                        {
                            m_VialSet.DNAArmor = FSATS.BioVArmor;
                        }

                        m_VialSet.IsFull = true;

                        if (m_VialSet.IsFull == true)
                        {
                            BioPetItem bio = new BioPetItem();

                            bio.DNAStr = m_VialSet.DNAStr;
                            bio.DNADex = m_VialSet.DNADex;
                            bio.DNAInt = m_VialSet.DNAInt;

                            bio.DNAHits = m_VialSet.DNAHits;
                            bio.DNAStam = m_VialSet.DNAStam;
                            bio.DNAMana = m_VialSet.DNAMana;

                            bio.DNADamageMin = m_VialSet.DNADamageMin;
                            bio.DNADamageMax = m_VialSet.DNADamageMax;

                            bio.DNAArmor = m_VialSet.DNAArmor;

                            bio.DNAFireResist     = m_VialSet.DNAFireResist;
                            bio.DNAColdResist     = m_VialSet.DNAColdResist;
                            bio.DNAEnergyResist   = m_VialSet.DNAEnergyResist;
                            bio.DNAPoisonResist   = m_VialSet.DNAPoisonResist;
                            bio.DNAPhysicalResist = m_VialSet.DNAPhysicalResist;

                            bio.DNAMagery      = m_VialSet.DNAMagery;
                            bio.DNAEvalInt     = m_VialSet.DNAEvalInt;
                            bio.DNAMeditation  = m_VialSet.DNAMeditation;
                            bio.DNAMagicResist = m_VialSet.DNAMagicResist;
                            bio.DNAPoisoning   = m_VialSet.DNAPoisoning;
                            bio.DNAAnatomy     = m_VialSet.DNAAnatomy;
                            bio.DNATactics     = m_VialSet.DNATactics;
                            bio.DNAWrestling   = m_VialSet.DNAWrestling;

                            bio.DNABodyValue = m_VialSet.DNABodyValue;
                            bio.DNASoundID   = m_VialSet.DNASoundID;

                            bio.DNABluntAttack  = m_VialSet.DNABluntAttack;
                            bio.DNAHealAttack   = m_VialSet.DNAHealAttack;
                            bio.DNAPoisonAttack = m_VialSet.DNAPoisonAttack;

                            bio.DNATrialByFire  = m_VialSet.DNATrialByFire;
                            bio.DNAIceBlast     = m_VialSet.DNAIceBlast;
                            bio.DNACometAttack  = m_VialSet.DNACometAttack;
                            bio.DNACallOfNature = m_VialSet.DNACallOfNature;
                            bio.DNAAcidRain     = m_VialSet.DNAAcidRain;

                            bio.DNAControlSlots = 5;
                            bio.DNAMinTame      = 120.0;

                            bio.MountID = m_VialSet.MountID;

                            bio.ItemID = ShrinkTable.Lookup(m_VialSet.DNABodyValue);

                            bio.Visible = false;
                            from.AddToBackpack(bio);
                            m_VialSet.Delete();

                            from.SendGump(new BioExpGump(-1, from, bio, 0, 0, 0, 0, 0));
                        }
                    }
                }
            }
            else
            {
                from.SendMessage("That cannot be added to this DNA set.");
            }
        }
예제 #3
0
		public BioExpGump( int points, Mobile from, BioPetItem pet, int cs, int tn, int p, int e, int m ) : base( 75, 75 )
		{
			m_ExpPoints = points;
			m_From = from;
			m_Pet = pet;

			m_CSTotal = cs;
			m_TNTotal = tn;
			m_PTotal = p;
			m_ETotal = e;
			m_MTotal = m;

			if ( m_ExpPoints < 0 )
			{
				int newPoints;

				if ( m_From.Hunger <= 0 )
					newPoints = 1;
				else
					newPoints = 3;

				if ( m_From.Int >= 100 )
					newPoints += 1;

				if ( m_From.Int >= 105 )
					newPoints += 1;

				if ( m_From.Int >= 110 )
					newPoints += 1;

				if ( m_From.Int >= 115 )
					newPoints += 1;

				if ( m_From.Int >= 120 )
					newPoints += 1;

				if ( m_From.Int >= 125 )
					newPoints += 1;

				if ( m_From.Int >= 130 )
					newPoints += 2;

				if ( m_From.Int >= 140 )
					newPoints += 3;

				if ( m_From.Hunger >= 5 )
					newPoints += 1;

				if ( m_From.Hunger >= 10 )
					newPoints += 2;

				if ( m_From.Hunger >= 15 )
					newPoints += 3;

				if ( m_From.Hunger >= 20 )
					newPoints += 4;

				if ( m_From.Luck > 0 )
				{
					int luckBonus = m_From.Luck / 500;

					if ( luckBonus > 6 )
						newPoints += 6;
					else if ( luckBonus > 0 )
						newPoints += luckBonus;
				}

				m_ExpPoints = newPoints;
			}

			string remain = "<BASEFONT COLOR=WHITE><CENTER>You have " + m_ExpPoints + " experimentation points remaining.</CENTER></BASEFONT>";

			Closable = false;
			Disposable = false;
			Dragable = true;
			Resizable = false;

			AddPage(0);

			int CSLimit = 4;
			int TNLimit = 4;
			int PLimit = 7;
			int ELimit = 7;
			int MLimit = 7;

			int csmath = 100 * m_CSTotal;
			int cspercent = csmath / CSLimit;

			int tnmath = 100 * m_TNTotal;
			int tnpercent = tnmath / TNLimit;

			int pmath = 100 * m_PTotal;
			int ppercent = pmath / PLimit;

			int emath = 100 * m_ETotal;
			int epercent = emath / ELimit;

			int mmath = 100 * m_MTotal;
			int mpercent = mmath / MLimit;

			AddBackground(12, 9, 365, 355, 9200);
			AddImageTiled(16, 14, 355, 18, 10100);
			AddImageTiled(16, 342, 355, 18, 10100);
			AddHtml( 16, 35, 355, 28, @"<BASEFONT COLOR=WHITE><CENTER>Bio-Engineer Experimentation Menu</CENTER></BASEFONT>", (bool)false, (bool)false);
			AddHtml( 16, 70, 355, 28, remain, (bool)false, (bool)false);
			AddButton(20, 150, 4006, 4005, 1, GumpButtonType.Reply, 0);
			AddButton(20, 180, 4006, 4005, 2, GumpButtonType.Reply, 0);
			AddButton(20, 210, 4006, 4005, 3, GumpButtonType.Reply, 0);
			AddButton(20, 240, 4006, 4005, 4, GumpButtonType.Reply, 0);
			AddButton(20, 270, 4006, 4005, 5, GumpButtonType.Reply, 0);
			AddButton(20, 315, 4012, 4011, 6, GumpButtonType.Reply, 0);
			AddLabel(55, 150, 1149, @"Control Slots");
			AddLabel(55, 180, 1149, @"Taming Needed");
			AddLabel(55, 210, 1149, @"Prowess DNA");
			AddLabel(55, 240, 1149, @"Environment DNA");
			AddLabel(55, 270, 1149, @"Mental DNA");
			AddLabel(55, 315, 1149, @"Create Bio Pet Now");
			AddLabel(325, 150, 1149, cspercent.ToString() + "%" );
			AddLabel(325, 180, 1149, tnpercent.ToString() + "%" );
			AddLabel(325, 210, 1149, ppercent.ToString() + "%" );
			AddLabel(325, 240, 1149, epercent.ToString() + "%" );
			AddLabel(325, 270, 1149, mpercent.ToString() + "%" );
			AddHtml( 16, 110, 355, 28, @"<BASEFONT COLOR=WHITE><CENTER>Please choose an Experimentation below or create pet now</CENTER></BASEFONT>", (bool)false, (bool)false);

		}