public override void Damage(Mobile m) { base.Damage(m); if (m.Alive) { Item item = m.FindItemOnLayer(Layer.OuterTorso); if (item is GMRobe) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); } else if (item is GMRobeExplosion) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); m.PlaySound(Utility.RandomList(0x307, 0x308)); } else if (item is GMRobeHoly) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); m.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head); m.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head); m.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist); m.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist); } else if (item is GMRobeFarts) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); m.PlaySound(Utility.RandomList(792, 1064)); } else if (item is GMRobeTrailfire) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); m.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); } else { if (m.Title == "the Running Pants") { if (m.Str <= 100) { if (Utility.RandomDouble() < 0.0003) { m.Str += 1; m.BoltEffect(0x480); m.PlaySound(0x5CE); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } } } // Wind if (Utility.RandomDouble() < 0.002) { m.PlaySound(Utility.RandomList(0x014, 0x15, 0x016, 0x5C7)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } if (Utility.RandomDouble() < 0.002) { m.PlaySound(Utility.RandomList(0x014, 0x15, 0x016, 0x5C7)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } if (m.Kills >= 5) { // Wasteland Mercenary Ambush if (Utility.RandomDouble() < 0.005) { if (m.Map == Map.Malas) { int x1 = m.X + 20; int y1 = m.Y + 20; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature wastelandmercenary = new WastelandMercenary(); wastelandmercenary.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); wastelandmercenary.Combatant = m; wastelandmercenary.PlaySound(0x220); // Earthquake m.PlaySound(0x5CE); wastelandmercenary.BoltEffect(0x480); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(30.0), new TimerStateCallback(DeleteWastelandMercenary), wastelandmercenary); } } // Wasteland Mercenary 2 if (Utility.RandomDouble() < 0.005) { if (m.Map == Map.Malas) { int x2 = m.X - 20; int y2 = m.Y - 20; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature wastelandmercenary = new WastelandMercenary(); wastelandmercenary.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); wastelandmercenary.Combatant = m; wastelandmercenary.PlaySound(0x220); // Earthquake m.PlaySound(0x5CE); wastelandmercenary.BoltEffect(0x480); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(30.0), new TimerStateCallback(DeleteWastelandMercenary), wastelandmercenary); } } } } } // Dragon Encounter 1 if (Utility.RandomDouble() < 0.0001) { if (m.Map == Map.Malas) { int x1 = m.X + 15; int y1 = m.Y + 15; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature dragonencounter; switch (Utility.Random(2)) { default: case 0: dragonencounter = new BlackDragon(); break; case 1: dragonencounter = new BlackDragon(); break; } dragonencounter.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); dragonencounter.Combatant = m; m.PlaySound(0x656); // risingColossus AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(30.0), new TimerStateCallback(DeleteDragonEncounter), dragonencounter); } } } // Dragon Encounter 2 if (Utility.RandomDouble() < 0.0001) { if (m.Map == Map.Malas) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature dragonencounter; switch (Utility.Random(8)) { default: case 0: dragonencounter = new BlackDragon(); break; case 1: dragonencounter = new BlackDragon(); break; } dragonencounter.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); dragonencounter.Combatant = m; m.PlaySound(0x656); // risingColossus AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(30.0), new TimerStateCallback(DeleteDragonEncounter), dragonencounter); } } } // Random Encounter 1 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature encountera; switch (Utility.Random(15)) { default: case 0: encountera = new Almiraj(); break; case 1: encountera = new BlackAntAmbusher(); break; case 2: encountera = new FaerieBeetleCollector(); break; case 3: encountera = new GazerLarva(); break; case 4: encountera = new Gizzard(); break; case 5: encountera = new GreenSlime(); break; case 6: encountera = new HordeMinion(); break; case 7: encountera = new Mongbat(); break; case 8: encountera = new Orc(); break; case 9: encountera = new Ratman(); break; case 10: encountera = new StreamingWisp(); break; case 11: encountera = new SwampVine(); break; case 12: encountera = new Tokoloshe(); break; case 13: encountera = new VerdantSprite(); break; case 14: encountera = new WaterLizard(); break; } encountera.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteEncounterA), encountera); } } } // Random Encounter 2 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature encountera; switch (Utility.Random(15)) { default: case 0: encountera = new Almiraj(); break; case 1: encountera = new BlackAntAmbusher(); break; case 2: encountera = new FaerieBeetleCollector(); break; case 3: encountera = new GazerLarva(); break; case 4: encountera = new Gizzard(); break; case 5: encountera = new GreenSlime(); break; case 6: encountera = new HordeMinion(); break; case 7: encountera = new Mongbat(); break; case 8: encountera = new Orc(); break; case 9: encountera = new Ratman(); break; case 10: encountera = new StreamingWisp(); break; case 11: encountera = new SwampVine(); break; case 12: encountera = new Tokoloshe(); break; case 13: encountera = new VerdantSprite(); break; case 14: encountera = new WaterLizard(); break; } encountera.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteEncounterA), encountera); } } } // Tamable Encounter 1 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature tameable; switch (Utility.Random(23)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new Boar(); break; case 2: tameable = new BrownBear(); break; case 3: tameable = new Bull(); break; case 4: tameable = new Chicken(); break; case 5: tameable = new Cow(); break; case 6: tameable = new ForestBat(); break; case 7: tameable = new Goat(); break; case 8: tameable = new GreatHart(); break; case 9: tameable = new GreenSlime(); break; case 10: tameable = new GreySquirrel(); break; case 11: tameable = new GreyWolfPup(); break; case 12: tameable = new Hind(); break; case 13: tameable = new Horse(); break; case 14: tameable = new LargeFrog(); break; case 15: tameable = new Ogumo(); break; case 16: tameable = new Panther(); break; case 17: tameable = new Pig(); break; case 18: tameable = new Rabbit(); break; case 19: tameable = new Rat(); break; case 20: tameable = new RhinoBeetle(); break; case 21: tameable = new RunningPants(); break; case 22: tameable = new Sheep(); break; } tameable.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTameable), tameable); } } } // Tamable Encounter 2 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature tameable; switch (Utility.Random(23)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new Boar(); break; case 2: tameable = new BrownBear(); break; case 3: tameable = new Bull(); break; case 4: tameable = new Chicken(); break; case 5: tameable = new Cow(); break; case 6: tameable = new ForestBat(); break; case 7: tameable = new Goat(); break; case 8: tameable = new GreatHart(); break; case 9: tameable = new GreenSlime(); break; case 10: tameable = new GreySquirrel(); break; case 11: tameable = new GreyWolfPup(); break; case 12: tameable = new Hind(); break; case 13: tameable = new Horse(); break; case 14: tameable = new LargeFrog(); break; case 15: tameable = new Ogumo(); break; case 16: tameable = new Panther(); break; case 17: tameable = new Pig(); break; case 18: tameable = new Rabbit(); break; case 19: tameable = new Rat(); break; case 20: tameable = new RhinoBeetle(); break; case 21: tameable = new RunningPants(); break; case 22: tameable = new Sheep(); break; } tameable.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTameable), tameable); } } } // Random Adventurer 1 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x1 = m.X + 15; int y1 = m.Y + 15; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature friendlyencounter; switch (Utility.Random(2)) { default: case 0: friendlyencounter = new ZaythalorHuman(); break; case 1: friendlyencounter = new ZaythalorSunElf(); break; case 2: friendlyencounter = new ZaythalorMoonElf(); break; } friendlyencounter.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteFriendlyEncounter), friendlyencounter); } } } // Random Adventurer 2 if (Utility.RandomDouble() < 0.00002) { if (m.Map == Map.Malas) { int x2 = m.X - 15; int y2 = m.Y - 15; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature friendlyencounter; switch (Utility.Random(2)) { default: case 0: friendlyencounter = new ZaythalorHuman(); break; case 1: friendlyencounter = new ZaythalorSunElf(); break; case 2: friendlyencounter = new ZaythalorMoonElf(); break; } friendlyencounter.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteFriendlyEncounter), friendlyencounter); } } } // Random Treasure Chest 1 if (Utility.RandomDouble() < 0.0005) { if (m.Map == Map.Malas) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseContainer treasurechest; if (m.Skills.Tracking.Base > 4.9) { switch (Utility.Random(2)) { default: case 0: treasurechest = new ZaythalorForestTreasureChest1(); break; case 1: treasurechest = new ZaythalorForestTreasureChest1(); break; } treasurechest.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteTreasureChest), treasurechest); } } } } // Random Treasure Chest 2 if (Utility.RandomDouble() < 0.0005) { if (m.Map == Map.Malas) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseContainer treasurechest; if (m.Skills.Tracking.Base > 4.9) { switch (Utility.Random(2)) { default: case 0: treasurechest = new ZaythalorForestTreasureChest1(); break; case 1: treasurechest = new ZaythalorForestTreasureChest1(); break; } treasurechest.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteTreasureChest), treasurechest); } } } } // Random Dead Body 1 if (Utility.RandomDouble() < 0.0003) { if (m.Map == Map.Malas) { int x1 = m.X + 10; int y1 = m.Y + 10; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseContainer deadbody; switch (Utility.Random(4)) { default: case 0: deadbody = new UnknownBardSkeletonZaythalor(); break; case 1: deadbody = new UnknownMageSkeletonZaythalor(); break; case 2: deadbody = new UnknownRogueSkeletonZaythalor(); break; case 3: deadbody = new UnknownRogueSkeletonZaythalor(); break; } deadbody.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteDeadBody), deadbody); } } } // Random Dead Body 2 if (Utility.RandomDouble() < 0.0003) { if (m.Map == Map.Malas) { int x2 = m.X - 10; int y2 = m.Y - 10; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseContainer deadbody; switch (Utility.Random(4)) { default: case 0: deadbody = new UnknownBardSkeletonZaythalor(); break; case 1: deadbody = new UnknownMageSkeletonZaythalor(); break; case 2: deadbody = new UnknownRogueSkeletonZaythalor(); break; case 3: deadbody = new UnknownRogueSkeletonZaythalor(); break; } deadbody.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteDeadBody), deadbody); } } } PlayerMobile player1 = m as PlayerMobile; QuestSystem qs1 = player1.Quest; if (qs1 is StolenNecklaceQuest) { if (qs1.IsObjectiveInProgress(typeof(ReturnStolenNecklaceObjective))) { m.Send(Network.PlayMusic.GetInstance(MusicName.StygianAbyss)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } } PlayerMobile player = m as PlayerMobile; QuestSystem qs = player.Quest; if (qs is StolenNecklaceQuest) { if (qs.IsObjectiveInProgress(typeof(ReturnStolenNecklaceObjective))) { // Brigand Ambush if (Utility.RandomDouble() < 0.015) { if (m.Map == Map.Malas) { int x1 = m.X + 20; int y1 = m.Y + 20; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature brigandmale = new BrigandMaleQuest(); brigandmale.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); brigandmale.Combatant = m; m.Send(Network.PlayMusic.GetInstance(MusicName.StygianAbyss)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteBrigandMale), brigandmale); } } } // Brigand Ambush 2 if (Utility.RandomDouble() < 0.015) { if (m.Map == Map.Malas) { int x2 = m.X - 20; int y2 = m.Y - 20; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature brigandfemale = new BrigandFemaleQuest(); brigandfemale.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); brigandfemale.Combatant = m; m.Send(Network.PlayMusic.GetInstance(MusicName.StygianAbyss)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteBrigandFemale), brigandfemale); } } } } } else if (qs is StaffOfFlyingMonkeysQuest) { if (qs.IsObjectiveInProgress(typeof(EscapeObjective))) { // Mongbat Ambush if (Utility.RandomDouble() < 0.015) { if (m.Map == Map.Malas) { int x1 = m.X + 20; int y1 = m.Y + 20; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature cavernmongbatberserker = new CavernMongbatBerserkerQuest(); cavernmongbatberserker.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); cavernmongbatberserker.Combatant = m; m.Send(Network.PlayMusic.GetInstance(MusicName.Medieval)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteCavernMongbatBerserkerQuest), cavernmongbatberserker); } } } // Mongbat Ambush 2 if (Utility.RandomDouble() < 0.015) { if (m.Map == Map.Malas) { int x2 = m.X - 20; int y2 = m.Y - 20; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature cavernmongbatberserker = new CavernMongbatBerserkerQuest(); cavernmongbatberserker.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); cavernmongbatberserker.Combatant = m; m.Send(Network.PlayMusic.GetInstance(MusicName.Medieval)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteCavernMongbatBerserkerQuest), cavernmongbatberserker); } } } } } } } }
public override void Damage(Mobile m) { base.Damage(m); if (m.Alive) { Item item = m.FindItemOnLayer(Layer.OuterTorso); if (item is GMRobe) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); } else { // Bank Music if (Utility.RandomDouble() < 0.001) { m.Send(Network.PlayMusic.GetInstance(MusicName.Stones2)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Flamestrike if (Utility.RandomDouble() < 0.01) { m.Stam -= 20; m.Mana -= 25; m.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); m.PlaySound(0x208); m.PlaySound(m.Female ? 814 : 1088); m.Say("*ahhhh!*"); AOS.Damage(m, Utility.Random(15, 25), 0, 100, 0, 0, 0); } // Forest Music if (Utility.RandomDouble() < 0.001) { m.Send(Network.PlayMusic.GetInstance(MusicName.Linelle)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Greater Heal if (Utility.RandomDouble() < 0.01) { m.Hits += (Utility.Random(250, 300)); m.Stam += (Utility.Random(250, 300)); m.Mana += (Utility.Random(250, 300)); m.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head); m.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head); m.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist); m.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist); m.PlaySound(0x202); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Ice Blast if (Utility.RandomDouble() < 0.01) { m.Stam -= 10; m.Mana -= 20; m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist); m.PlaySound(0x0FC); AOS.Damage(m, Utility.Random(15, 25), 0, 0, 100, 0, 0); } // Lightning Strike if (Utility.RandomDouble() < 0.01) { m.PlaySound(Utility.RandomList(0x5CE)); m.BoltEffect(0x480); AOS.Damage(m, Utility.RandomMinMax(12, 35), 0, 0, 0, 0, 100); } // Random Encounter 1 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Tokuno) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Tokuno.GetAverageZ(x1, y1); if (Map.Tokuno.CanSpawnMobile(x1, y1, z1)) { BaseCreature encountera; switch (Utility.Random(3)) { default: case 0: encountera = new RunningPants(); break; case 1: encountera = new RunningPants(); break; case 2: encountera = new RunningPants(); break; } encountera.MoveToWorld(new Point3D(x1, y1, z1), Map.Tokuno); encountera.Combatant = m; IceFieldIceFlame ice = new IceFieldIceFlame(); ice.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icea = new IceFieldIceFlame(); icea.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceb = new IceFieldIceFlame(); iceb.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icec = new IceFieldIceFlame(); icec.MoveToWorld(new Point3D(encountera.X, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iced = new IceFieldIceFlame(); iced.MoveToWorld(new Point3D(encountera.X, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icee = new IceFieldIceFlame(); icee.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icef = new IceFieldIceFlame(); icef.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceg = new IceFieldIceFlame(); iceg.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceh = new IceFieldIceFlame(); iceh.ItemID = 0x8e1; iceh.MoveToWorld(new Point3D(encountera.X, encountera.Y, encountera.Z + 19), encountera.Map); m.PlaySound(0x208); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteEncounterA), encountera); } } } // Random Encounter 2 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Tokuno) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Tokuno.GetAverageZ(x2, y2); if (Map.Tokuno.CanSpawnMobile(x2, y2, z2)) { BaseCreature encountera; switch (Utility.Random(3)) { default: case 0: encountera = new RunningPants(); break; case 1: encountera = new RunningPants(); break; case 2: encountera = new RunningPants(); break; } encountera.MoveToWorld(new Point3D(x2, y2, z2), Map.Tokuno); encountera.Combatant = m; IceFieldIceFlame ice = new IceFieldIceFlame(); ice.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icea = new IceFieldIceFlame(); icea.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceb = new IceFieldIceFlame(); iceb.MoveToWorld(new Point3D(encountera.X + 5, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icec = new IceFieldIceFlame(); icec.MoveToWorld(new Point3D(encountera.X, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iced = new IceFieldIceFlame(); iced.MoveToWorld(new Point3D(encountera.X, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icee = new IceFieldIceFlame(); icee.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame icef = new IceFieldIceFlame(); icef.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y - 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceg = new IceFieldIceFlame(); iceg.MoveToWorld(new Point3D(encountera.X - 5, encountera.Y + 5, encountera.Z), encountera.Map); m.PlaySound(0x208); IceFieldIceFlame iceh = new IceFieldIceFlame(); iceh.ItemID = 0x8e1; iceh.MoveToWorld(new Point3D(encountera.X, encountera.Y, encountera.Z + 19), encountera.Map); m.PlaySound(0x208); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteEncounterA), encountera); } } } // Tamable Encounter 1 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Tokuno) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Tokuno.GetAverageZ(x1, y1); if (Map.Tokuno.CanSpawnMobile(x1, y1, z1)) { BaseCreature tameable; switch (Utility.Random(5)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new BlackBear(); break; case 2: tameable = new DireWolf(); break; case 3: tameable = new Goat(); break; case 4: tameable = new Horse(); break; } tameable.MoveToWorld(new Point3D(x1, y1, z1), Map.Tokuno); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteTameable), tameable); } } } // Tamable Encounter 2 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Tokuno) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Tokuno.GetAverageZ(x2, y2); if (Map.Tokuno.CanSpawnMobile(x2, y2, z2)) { BaseCreature tameable; switch (Utility.Random(5)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new BlackBear(); break; case 2: tameable = new DireWolf(); break; case 3: tameable = new Goat(); break; case 4: tameable = new Horse(); break; } tameable.MoveToWorld(new Point3D(x2, y2, z2), Map.Tokuno); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerStateCallback(DeleteTameable), tameable); } } } } } }
public override void Damage(Mobile m) { base.Damage(m); if (m.Alive) { Item item = m.FindItemOnLayer(Layer.OuterTorso); if (item is GMRobe) { AOS.Damage(m, 0, 0, 0, 0, 0, 0); } else { // Forest noises if (Utility.RandomDouble() < 0.008) { m.PlaySound(Utility.RandomList(0x000, 0x001, 0x002)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Bird chirps if (Utility.RandomDouble() < 0.002) { m.PlaySound(Utility.RandomList(0x094, 0x095, 0x096, 0x097, 0x0D1, 0x0D2)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Cricket noises if (Utility.RandomDouble() < 0.003) { m.PlaySound(Utility.RandomList(0x00A, 0x00B)); AOS.Damage(m, 0, 0, 0, 0, 0, 0); } // Turdy Encounter 1 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Malas) { int x1 = m.X + 8; int y1 = m.Y + 8; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature turdyencounter; switch (Utility.Random(2)) { default: case 0: turdyencounter = new Turdy(); break; case 1: turdyencounter = new Turdy(); break; } turdyencounter.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); turdyencounter.Combatant = m; AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTurdyEncounter), turdyencounter); } } } // Turdy Encounter 2 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Malas) { int x2 = m.X - 8; int y2 = m.Y - 8; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature turdyencounter; switch (Utility.Random(2)) { default: case 0: turdyencounter = new Turdy(); break; case 1: turdyencounter = new Turdy(); break; } turdyencounter.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); turdyencounter.Combatant = m; AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTurdyEncounter), turdyencounter); } } } // Random Encounter 1 if (Utility.RandomDouble() < 0.0002) { if (m.Map == Map.Malas) { int x1 = m.X + 8; int y1 = m.Y + 8; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature encounterb; switch (Utility.Random(2)) { default: case 0: encounterb = new AutumnwoodAdventurer(); break; case 1: encounterb = new AutumnwoodAdventurer(); break; } encounterb.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteEncounterB), encounterb); } } } // Random Encounter 2 if (Utility.RandomDouble() < 0.0002) { if (m.Map == Map.Malas) { int x2 = m.X - 8; int y2 = m.Y - 8; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature encounterb; switch (Utility.Random(2)) { default: case 0: encounterb = new AutumnwoodAdventurer(); break; case 1: encounterb = new AutumnwoodAdventurer(); break; } encounterb.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteEncounterB), encounterb); } } } // Tamable Encounter 1 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Malas) { int x1 = m.X + 8; int y1 = m.Y + 8; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseCreature tameable; switch (Utility.Random(23)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new Boar(); break; case 2: tameable = new BlackBear(); break; case 3: tameable = new Bull(); break; case 4: tameable = new Chicken(); break; case 5: tameable = new Cow(); break; case 6: tameable = new ForestBat(); break; case 7: tameable = new Goat(); break; case 8: tameable = new GreatHart(); break; case 9: tameable = new GreenSlime(); break; case 10: tameable = new GreySquirrel(); break; case 11: tameable = new GreyWolfPup(); break; case 12: tameable = new Hind(); break; case 13: tameable = new Horse(); break; case 14: tameable = new LargeFrog(); break; case 15: tameable = new Ogumo(); break; case 16: tameable = new Panther(); break; case 17: tameable = new Pig(); break; case 18: tameable = new Rabbit(); break; case 19: tameable = new Rat(); break; case 20: tameable = new RhinoBeetle(); break; case 21: tameable = new RunningPants(); break; case 22: tameable = new Sheep(); break; } tameable.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTameable), tameable); } } } // Tamable Encounter 2 if (Utility.RandomDouble() < 0.002) { if (m.Map == Map.Malas) { int x2 = m.X - 8; int y2 = m.Y - 8; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseCreature tameable; switch (Utility.Random(23)) { default: case 0: tameable = new Bird(); break; case 1: tameable = new Boar(); break; case 2: tameable = new BlackBear(); break; case 3: tameable = new Bull(); break; case 4: tameable = new Chicken(); break; case 5: tameable = new Cow(); break; case 6: tameable = new ForestBat(); break; case 7: tameable = new Goat(); break; case 8: tameable = new GreatHart(); break; case 9: tameable = new GreenSlime(); break; case 10: tameable = new GreySquirrel(); break; case 11: tameable = new GreyWolfPup(); break; case 12: tameable = new Hind(); break; case 13: tameable = new Horse(); break; case 14: tameable = new LargeFrog(); break; case 15: tameable = new Ogumo(); break; case 16: tameable = new Panther(); break; case 17: tameable = new Pig(); break; case 18: tameable = new Rabbit(); break; case 19: tameable = new Rat(); break; case 20: tameable = new RhinoBeetle(); break; case 21: tameable = new RunningPants(); break; case 22: tameable = new Sheep(); break; } tameable.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerStateCallback(DeleteTameable), tameable); } } } // Random Treasure Chest 1 if (Utility.RandomDouble() < 0.0005) { if (m.Map == Map.Malas) { int x1 = m.X + 12; int y1 = m.Y + 12; int z1 = Map.Malas.GetAverageZ(x1, y1); if (Map.Malas.CanSpawnMobile(x1, y1, z1)) { BaseContainer treasurechest; if (m.Skills.Tracking.Base > 14.9) { switch (Utility.Random(2)) { default: case 0: treasurechest = new AutumnwoodTreasureChest1(); break; case 1: treasurechest = new AutumnwoodTreasureChest1(); break; } treasurechest.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteTreasureChest), treasurechest); } } } } // Random Treasure Chest 2 if (Utility.RandomDouble() < 0.0005) { if (m.Map == Map.Malas) { int x2 = m.X - 12; int y2 = m.Y - 12; int z2 = Map.Malas.GetAverageZ(x2, y2); if (Map.Malas.CanSpawnMobile(x2, y2, z2)) { BaseContainer treasurechest; if (m.Skills.Tracking.Base > 14.9) { switch (Utility.Random(2)) { default: case 0: treasurechest = new AutumnwoodTreasureChest1(); break; case 1: treasurechest = new AutumnwoodTreasureChest1(); break; } treasurechest.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas); AOS.Damage(m, 0, 0, 0, 0, 0, 0); Timer.DelayCall(TimeSpan.FromMinutes(5.0), new TimerStateCallback(DeleteTreasureChest), treasurechest); } } } } } } }