protected override void OnTarget( Mobile from, object target ) { if ( target is BaseChampion ) { from.SendMessage( "You cannot extract DNA from a champion." ); } else if ( target is BaseVendor ) { from.SendMessage( "You cannot extract DNA from a vendor." ); } else if ( target is PlayerVendor ) { from.SendMessage( "You cannot extract DNA from a vendor." ); } else if ( target is DemonKnight || target is AbysmalHorror || target is DarknightCreeper || target is FleshRenderer || target is ShadowKnight || target is Impaler ) { from.SendMessage( "You cannot extract DNA from a doom boss." ); } else if ( target is BaseCreature ) { BaseCreature bc = (BaseCreature)target; if ( !from.InRange( ((Mobile)bc).Location, 1 ) ) { from.SendMessage( "You are to far away to do that." ); } else if ( bc.Blessed != false ) { from.SendMessage( "They cannot be harmed." ); } else if ( bc.BodyValue == 400 || bc.BodyValue == 401 ) { from.SendMessage( "You cannot extract DNA from a human. " ); } else if ( bc.Controlled != true ) { int qua = bc.Str + bc.HitsMax + bc.PhysicalResistance + bc.DamageMin + bc.DamageMax + bc.VirtualArmor; int chance = qua; if ( chance <= 500 ) chance = 499; if ( Utility.Random( chance ) < 500 ) { DNAItem dna = new DNAItem(); dna.DNAName = bc.Name; dna.DNAStr = bc.Str; dna.DNAHits = bc.HitsMax; dna.DNAPhysicalResist = bc.PhysicalResistance; dna.DNADamageMin = bc.DamageMin; dna.DNADamageMax = bc.DamageMax; dna.DNAArmor = bc.VirtualArmor; dna.DNAType = DNAType.Prowess; dna.DNAAnatomy = bc.Skills[SkillName.Anatomy].Base; dna.DNAWrestling = bc.Skills[SkillName.Wrestling].Base; dna.DNATactics = bc.Skills[SkillName.Tactics].Base; if ( qua <= 200 ) { dna.DNAQuality = DNAQuality.VeryLow; } else if ( qua <= 350 ) { dna.DNAQuality = DNAQuality.Low; } else if ( qua <= 450 ) { dna.DNAQuality = DNAQuality.BelowAverage; } else if ( qua <= 600 ) { dna.DNAQuality = DNAQuality.Average; } else if ( qua <= 900 ) { dna.DNAQuality = DNAQuality.AboveAverage; } else if ( qua <= 2000 ) { dna.DNAQuality = DNAQuality.High; } else if ( qua <= 4500 || qua >= 4500 ) { dna.DNAQuality = DNAQuality.VeryHigh; } from.AddToBackpack( dna ); from.PlaySound( 0x240 ); switch ( Utility.Random( 3 ) ) { case 0: bc.Combatant = from; from.Combatant = bc; from.SendMessage( "You successfully sample the creatures dna, but anger the creature in the progress." ); bc.Emote( "You have angered the creature" ); break; case 1: from.SendMessage( "You successfully sample the creatures dna, but the tramua of the sample was to great for the creature." ); bc.Kill(); if ( bc.Corpse != null ) bc.Corpse.Delete(); break; case 2: from.SendMessage( "You successfully sample the creatures dna." ); break; } if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } } else { switch ( Utility.Random( 2 ) ) { case 0: from.SendMessage( "You fail to sample this creatures dna." ); bc.Combatant = from; from.Combatant = bc; bc.Emote( "You have angered the creature" ); if ( Utility.Random( 100 ) < 35 ) { if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } from.PlaySound( Utility.RandomList( 62, 63 ) ); from.SendMessage( "The vial has broken." ); } break; case 1: from.SendMessage( "You fail to sample this creatures dna." ); from.SendMessage( "The creature has died due to the tramua from the dna sample." ); bc.Kill(); if ( bc.Corpse != null ) bc.Corpse.Delete(); if ( Utility.Random( 100 ) < 35 ) { if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } from.PlaySound( Utility.RandomList( 62, 63 ) ); from.SendMessage( "The vial has broken." ); } break; } } } else { from.SendMessage( "You cannot sample dna from a tamed creature." ); } } }
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."); } }
protected override void OnTarget( Mobile from, object target ) { if ( target is BaseChampion ) { from.SendMessage( "You cannot extract DNA from a champion." ); } else if ( target is BaseVendor ) { from.SendMessage( "You cannot extract DNA from a vendor." ); } else if ( target is PlayerVendor ) { from.SendMessage( "You cannot extract DNA from a vendor." ); } else if ( target is DemonKnight || target is AbysmalHorror || target is DarknightCreeper || target is FleshRenderer || target is ShadowKnight || target is Impaler ) { from.SendMessage( "You cannot extract DNA from a doom boss." ); } else if ( target is BaseCreature ) { BaseCreature bc = (BaseCreature)target; if ( !from.InRange( ((Mobile)bc).Location, 1 ) ) { from.SendMessage( "You are to far away to do that." ); } else if ( bc.Blessed != false ) { from.SendMessage( "They cannot be harmed." ); } else if ( bc.BodyValue == 400 || bc.BodyValue == 401 ) { from.SendMessage( "You cannot extract DNA from a human. " ); } else if ( bc.Controlled != true ) { DNAItem dna = new DNAItem(); dna.DNAName = bc.Name; dna.DNAType = DNAType.Mimic; dna.DNABodyValue = bc.BodyValue; dna.DNASoundID = bc.BaseSoundID; if ( bc is BaseMount ) { BaseMount bm = (BaseMount)bc; dna.MountID = bm.ItemID; } if ( Utility.Random( 100 ) < 15 ) { switch ( Utility.Random( 3 ) ) { case 0: dna.DNABluntAttack = true; break; case 1: dna.DNAHealAttack = true; break; case 2: dna.DNAPoisonAttack = true; break; } } if ( Utility.Random( 100 ) < 15 ) { switch ( Utility.Random( 5 ) ) { case 0: dna.DNATrialByFire = true; break; case 1: dna.DNAIceBlast = true; break; case 2: dna.DNACometAttack = true; break; case 3: dna.DNACallOfNature = true; break; case 4: dna.DNAAcidRain = true; break; } } from.AddToBackpack( dna ); from.PlaySound( 0x240 ); switch ( Utility.Random( 3 ) ) { case 0: bc.Combatant = from; from.Combatant = bc; from.SendMessage( "You successfully sample the creatures dna, but anger the creature in the progress." ); bc.Emote( "You have angered the creature" ); break; case 1: from.SendMessage( "You successfully sample the creatures dna, but the tramua of the sample was to great for the creature." ); bc.Kill(); if ( bc.Corpse != null ) bc.Corpse.Delete(); break; case 2: from.SendMessage( "You successfully sample the creatures dna." ); break; } if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } } else { switch ( Utility.Random( 2 ) ) { case 0: from.SendMessage( "You fail to sample this creatures dna." ); bc.Combatant = from; from.Combatant = bc; bc.Emote( "You have angered the creature" ); if ( Utility.Random( 100 ) < 35 ) { if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } from.PlaySound( Utility.RandomList( 62, 63 ) ); from.SendMessage( "The vial has broken." ); } break; case 1: from.SendMessage( "You fail to sample this creatures dna." ); from.SendMessage( "The creature has died due to the tramua from the dna sample." ); bc.Kill(); if ( bc.Corpse != null ) bc.Corpse.Delete(); if ( Utility.Random( 100 ) < 35 ) { if ( m_Vial.Amount >= 1 ) { m_Vial.Amount -= 1; if ( m_Vial.Amount == 0 ) m_Vial.Delete(); } from.PlaySound( Utility.RandomList( 62, 63 ) ); from.SendMessage( "The vial has broken." ); } break; } } } else { from.SendMessage( "You cannot sample dna from a tamed creature." ); } }
public EvilGenetecist() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 ) { SpeechHue = Utility.RandomDyedHue(); Title = "the evil genetecist"; Hue = Utility.RandomSkinHue(); if ( this.Female = Utility.RandomBool() ) { Body = 0x191; Name = NameList.RandomName( "female" ); } else { Body = 0x190; Name = NameList.RandomName( "male" ); } SetStr( 200, 275 ); SetDex( 115, 125 ); SetInt( 200, 275 ); SetHits( 1900, 2100 ); SetMana( 1000 ); SetDamage( 10, 23 ); SetSkill( SkillName.Fencing, 66.0, 97.5 ); SetSkill( SkillName.Macing, 65.0, 87.5 ); SetSkill( SkillName.MagicResist, 25.0, 47.5 ); SetSkill( SkillName.Swords, 65.0, 87.5 ); SetSkill( SkillName.Tactics, 65.0, 87.5 ); SetSkill( SkillName.Wrestling, 15.0, 37.5 ); SetSkill( SkillName.EvalInt, 55.0, 67.5 ); SetSkill( SkillName.Magery, 90.0, 105.5 ); Fame = 5000; Karma = -5000; AddItem( new Boots() ); int hue = Utility.RandomMinMax( 1410, 1450 ); //Random Zog Green Item robe = new Robe(); robe.Hue = hue; AddItem( robe ); Item chest = new LeatherChest(); chest.Hue = hue; AddItem( chest ); Item gloves = new LeatherGloves(); gloves.Hue = hue; AddItem( gloves ); Item gorget = new LeatherGorget(); gorget.Hue = hue; AddItem( gorget ); Item legs = new LeatherLegs(); legs.Hue = hue; AddItem( legs ); Item arms = new LeatherArms(); arms.Hue = hue; AddItem( arms ); Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) ); hair.Hue = Utility.RandomNondyedHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); PackItem( new Organics( Utility.RandomMinMax( 250, 400 ) ) ); if ( Utility.Random( 100 ) < 35 ) { switch ( Utility.Random( 2 )) { case 0: PackItem( new EmptyDNAVial() ); break; case 1: PackItem( new EmptyDNAVialSet() ); break; } } if ( Utility.Random( 500 ) < 3 ) { DNAItem dna = new DNAItem(); switch ( Utility.Random( 4 ) ) { case 0: dna.DNAName = "a dark father"; dna.DNAType = DNAType.Prowess; dna.DNAQuality = DNAQuality.VeryHigh; dna.DNAStr = 500; dna.DNAHits = 30000; dna.DNADamageMin = 17; dna.DNADamageMax = 21; dna.DNAArmor = 64; dna.DNAPhysicalResist = 30; dna.DNATactics = 100; dna.DNAWrestling = 100; PackItem( dna ); break; case 1: dna.DNAName = "a fox guardian"; dna.DNAType = DNAType.Environment; dna.DNAQuality = DNAQuality.VeryHigh; dna.DNADex = 275; dna.DNAStam = 300; dna.DNAColdResist = 30; dna.DNAFireResist = 60; dna.DNAPoisoning = 100; PackItem( dna ); break; case 2: dna.DNAName = "Mondain The Wizard"; dna.DNAType = DNAType.Mental; dna.DNAQuality = DNAQuality.VeryHigh; dna.DNAInt = 415; dna.DNAMana = 1000; dna.DNAEnergyResist = 70; dna.DNAPoisonResist = 70; dna.DNAMagery = 100; dna.DNAEvalInt = 100; PackItem( dna ); break; case 3: dna.DNAName = "a hell chicken"; dna.DNAType = DNAType.Mimic; dna.DNABodyValue = 208; dna.DNASoundID = 110; dna.DNAHealAttack = true; dna.DNATrialByFire = true; PackItem( dna ); break; } } }