private static void DecorateTOL_OnCommand(CommandEventArgs e) { e.Mobile.SendMessage("Generating Time Of Legends world decoration, please wait."); Decorate.Generate("tol", "Data/Decoration/TimeOfLegends/TerMur", Map.TerMur); Decorate.Generate("tol", "Data/Decoration/TimeOfLegends/Felucca", Map.Felucca); ChampionSpawn sp = new ChampionSpawn(); sp.Type = ChampionSpawnType.DragonTurtle; sp.MoveToWorld(new Point3D(451, 1696, 65), Map.TerMur); sp.Active = true; WeakEntityCollection.Add("tol", sp); sp = new ChampionSpawn(); sp.SpawnRadius = 35; sp.Type = ChampionSpawnType.DragonTurtle; sp.MoveToWorld(new Point3D(7042, 1889, 60), Map.Felucca); sp.Active = true; WeakEntityCollection.Add("tol", sp); PublicMoongate gate = new PublicMoongate(); gate.MoveToWorld(new Point3D(719, 1863, 40), Map.TerMur); ShadowguardController.SetupShadowguard(e.Mobile); Server.Engines.MyrmidexInvasion.GenerateMyrmidexQuest.Generate(); MacawSpawner.Generate(); CommandSystem.Handle(e.Mobile, Server.Commands.CommandSystem.Prefix + "XmlLoad Spawns/Eodon.xml"); e.Mobile.SendMessage("Time Of Legends world generating complete."); }
private bool IsHerdable(BaseCreature bc) { if (bc.IsParagon) { return(false); } if (bc.Tamable) { return(true); } Map map = bc.Map; if (Region.Find(bc.Home, map) is ChampionSpawnRegion region) { ChampionSpawn spawn = region.ChampionSpawn; if (spawn?.IsChampionSpawn(bc) == true) { Type t = bc.GetType(); foreach (Type type in m_ChampTamables) { if (type == t) { return(true); } } } } return(false); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); Spawn = reader.ReadItem <ChampionSpawn>(); }
public static void CheckDropSOT(BaseCreature bc) { if (bc == null) { return; } var killer = bc.FindMostRecentDamager(false); var creature = killer as BaseCreature; if (creature != null) { killer = creature.GetMaster(); } if (killer is PlayerMobile && Utility.RandomDouble() < ChampionSystem.ScrollChance * 10) { PlayerMobile pm = (PlayerMobile)killer; if (Utility.RandomDouble() < ChampionSystem.TranscendenceChance) { ChampionSpawn.GiveScrollTo(pm, ChampionSpawn.CreateRandomSoT(bc.Map != null && bc.Map.Rules == MapRules.FeluccaRules)); } } }
private static void GenerateChampionSpawns_OnCommand(CommandEventArgs e) { foreach (ChampionSpawnDefinition definition in _definitions) { // Remove existing IEnumerable <Item> existing = definition.Map .GetItemsInRange(new Point3D(definition.X, definition.Y, definition.Z), 0) .Where(i => i is ChampionSpawn); foreach (Item item in existing) { item.Delete(); } ChampionSpawn spawn = new ChampionSpawn { Active = false, Type = definition.RandomizeType ? Utility.RandomList(new[] { ChampionSpawnType.VerminHorde, ChampionSpawnType.Abyss, ChampionSpawnType.Arachnid, ChampionSpawnType.ColdBlood, ChampionSpawnType.UnholyTerror }) : definition.Type, SpawnSzMod = 0, SpawnArea = new Rectangle2D( new Point2D(definition.X - definition.Radius / 2, definition.Y - definition.Radius / 2), new Point2D(definition.X + definition.Radius / 2, definition.Y + definition.Radius / 2)), RandomizeType = definition.RandomizeType }; spawn.MoveToWorld(new Point3D(definition.X, definition.Y, definition.Z), definition.Map); spawn.Active = true; } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); if (Name != "Idol Of The Champion") { Name = "Idol Of The Champion"; } switch (version) { case 0: { m_Spawn = reader.ReadItem() as ChampionSpawn; if (m_Spawn == null) { Delete(); } break; } } }
public ChampionIdol(ChampionSpawn spawn) : base(0x1F18) { m_Spawn = spawn; Name = "Idol Of The Champion"; Movable = false; }
public static void Generate() { if (KhaldunResearcher.InstanceTram == null && !Siege.SiegeShard) { KhaldunResearcher.InstanceTram = new KhaldunResearcher(); KhaldunResearcher.InstanceTram.MoveToWorld(new Point3D(6009, 3771, 21), Map.Trammel); } if (KhaldunResearcher.InstanceFel == null) { KhaldunResearcher.InstanceFel = new KhaldunResearcher(); KhaldunResearcher.InstanceFel.MoveToWorld(new Point3D(6009, 3771, 21), Map.Felucca); } if (LeadInvestigator.InstanceTram == null && !Siege.SiegeShard) { LeadInvestigator.InstanceTram = new LeadInvestigator(); LeadInvestigator.InstanceTram.MoveToWorld(new Point3D(6010, 3776, 19), Map.Trammel); } if (LeadInvestigator.InstanceFel == null) { LeadInvestigator.InstanceFel = new LeadInvestigator(); LeadInvestigator.InstanceFel.MoveToWorld(new Point3D(6010, 3776, 19), Map.Felucca); } if (CaddelliteVendor.InstanceTram == null && !Siege.SiegeShard) { CaddelliteVendor.InstanceTram = new CaddelliteVendor(); CaddelliteVendor.InstanceTram.MoveToWorld(new Point3D(6018, 3749, 21), Map.Trammel); } if (CaddelliteVendor.InstanceFel == null) { CaddelliteVendor.InstanceFel = new CaddelliteVendor(); CaddelliteVendor.InstanceFel.MoveToWorld(new Point3D(6018, 3749, 21), Map.Felucca); } ChampionSpawn champ = null; if (!Siege.SiegeShard) { champ = new ChampionSpawn(); champ.Type = ChampionSpawnType.Khaldun; champ.MoveToWorld(new Point3D(5469, 1461, 20), Map.Trammel); ChampionSystem.AllSpawns.Add(champ); } champ = new ChampionSpawn(); champ.Type = ChampionSpawnType.Khaldun; champ.MoveToWorld(new Point3D(5469, 1461, 20), Map.Felucca); ChampionSystem.AllSpawns.Add(champ); }
public override void OnCast() { ChampionSpawn altar = null; foreach (Item item in Caster.GetItemsInRange(Range)) { if (item is ChampionSpawn) { altar = (ChampionSpawn)item; break; } } if (altar == null) { Caster.SendLocalizedMessage(1072111); // You are not in a valid exorcism region. } else if (CheckSequence()) { Map map = Caster.Map; if (map != null) { List <Mobile> targets = new List <Mobile>(); foreach (Mobile m in altar.GetMobilesInRange(Range)) { if (IsValidTarget(m)) { targets.Add(m); } } for (int i = 0; i < targets.Count; ++i) { Mobile m = targets[i]; // Suprisingly, no sparkle type effects m.Location = GetNearestShrine(m); } } } FinishSequence(); }
private static bool IsHerdable(BaseCreature bc) { if (bc.IsParagon) { return(false); } if (bc.Tamable) { return(true); } Map map = bc.Map; ChampionSpawnRegion region = Region.Find(bc.Home, map) as ChampionSpawnRegion; if (region != null) { ChampionSpawn spawn = region.ChampionSpawn; if (spawn != null && spawn.IsChampionSpawn(bc)) { Type t = bc.GetType(); foreach (Type type in m_ChampTamables) { if (type == t) { return(true); } } } } return(false); }
public static bool CheckValor(ChampionSpawn spawn, Mobile from) { VirtueLevel level = VirtueHelper.GetLevel(from, VirtueName.Valor); if (spawn != null && VirtueHelper.HasAny(from, VirtueName.Valor)) { if (level <= VirtueLevel.Seeker && spawn.Level < 5) { return(true); } if (level <= VirtueLevel.Follower && spawn.Level < 10) { return(true); } if (level <= VirtueLevel.Knight && spawn.Level < 15) { return(true); } } return(false); }
public override void OnChampPopped(ChampionSpawn spawn) { Blessed = true; Spawn = spawn; }
public virtual void OnChampPopped(ChampionSpawn spawn) { }
public override Item CreateRandomPowerScroll() { return(ChampionSpawn.CreateRandomSoT(Map != null && Map.Rules == MapRules.FeluccaRules)); }
public Corpse(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> equipItems) : base(0x2006) { // To supress console warnings, stackable must be true Stackable = true; Amount = owner.Body; // protocol defines that for itemid 0x2006, amount=body Stackable = false; Movable = false; Hue = owner.Hue; Direction = owner.Direction; Name = owner.Name; BaseCreature bc = owner as BaseCreature; m_Owner = owner; m_CorpseName = GetCorpseName(owner); m_TimeOfDeath = DateTime.Now; m_AccessLevel = owner.AccessLevel; m_Guild = owner.Guild as Guild; m_Kills = bc != null && bc.AlwaysMurderer ? 100 : owner.Kills; SetFlag(CorpseFlag.Criminal, owner.Criminal); m_Hair = hair; m_FacialHair = facialhair; // This corpse does not turn to bones if: the owner is not a player SetFlag(CorpseFlag.NoBones, !owner.Player); m_BloodHue = owner.BloodHue; m_Looters = new List <Mobile>(); m_EquipItems = equipItems; m_Aggressors = new List <Mobile>(owner.Aggressors.Count + owner.Aggressed.Count); bool addToAggressors = bc == null; TimeSpan lastTime = TimeSpan.MaxValue; for (int i = 0; i < owner.Aggressors.Count; ++i) { AggressorInfo info = owner.Aggressors[i]; if ((DateTime.Now - info.LastCombatTime) < lastTime) { m_Killer = info.Attacker; lastTime = (DateTime.Now - info.LastCombatTime); } if (addToAggressors && !info.CriminalAggression) { m_Aggressors.Add(info.Attacker); } } for (int i = 0; i < owner.Aggressed.Count; ++i) { AggressorInfo info = owner.Aggressed[i]; if ((DateTime.Now - info.LastCombatTime) < lastTime) { m_Killer = info.Defender; lastTime = (DateTime.Now - info.LastCombatTime); } if (addToAggressors) { m_Aggressors.Add(info.Defender); } } if (!addToAggressors) { Mobile master = bc.GetMaster(); if (master != null) { m_Aggressors.Add(master); } List <DamageStore> rights = BaseCreature.GetLootingRights(bc.DamageEntries, bc.HitsMax); for (int i = 0; i < rights.Count; ++i) { DamageStore ds = rights[i]; if (ds.m_HasRight) { m_Aggressors.Add(ds.m_Mobile); } } } TimeSpan decayTime = m_DefaultDecayTime; if (bc != null) { ChampionSpawnRegion region = Region.Find(Location, Map) as ChampionSpawnRegion; if (region != null) { ChampionSpawn spawn = region.Spawn; if (spawn != null && spawn.IsChampionSpawn(bc)) { decayTime = spawn.DecayTime; } } } BeginDecay(decayTime); DevourCorpse(); }
public static void Champ_OnCommand(CommandEventArgs e) { Map map1 = Map.Ilshenar; Map map2 = Map.Felucca; //Map map3 = Map.Maps[4]; e.Mobile.SendMessage("Generating Champions spawns..."); // -ILSHENAR----------------------------------------------------------- ChampionSpawn valor = new ChampionSpawn(); ChampionSpawn humility = new ChampionSpawn(); ChampionSpawn forest = new ChampionSpawn(); // -FELUCCA------------------------------------------------------------ ChampionSpawn Despise = new ChampionSpawn(); ChampionSpawn Deceit = new ChampionSpawn(); ChampionSpawn Destard = new ChampionSpawn(); ChampionSpawn Fire = new ChampionSpawn(); ChampionSpawn TerathanKeep = new ChampionSpawn(); ChampionSpawn LostLands1 = new ChampionSpawn(); ChampionSpawn LostLands2 = new ChampionSpawn(); ChampionSpawn LostLands3 = new ChampionSpawn(); ChampionSpawn LostLands4 = new ChampionSpawn(); ChampionSpawn LostLands5 = new ChampionSpawn(); ChampionSpawn LostLands6 = new ChampionSpawn(); ChampionSpawn LostLands7 = new ChampionSpawn(); ChampionSpawn LostLands8 = new ChampionSpawn(); ChampionSpawn LostLands9 = new ChampionSpawn(); ChampionSpawn LostLands10 = new ChampionSpawn(); ChampionSpawn LostLands11 = new ChampionSpawn(); ChampionSpawn LostLands12 = new ChampionSpawn(); // -TOKUNO------------------------------------------------------------- //ChampionSpawn isamu = new ChampionSpawn(); // -------------------------------------------------------------------- valor.RandomizeType = true; valor.Active = true; valor.SpawnRange = 24; valor.RestartDelay = TimeSpan.FromMinutes(10.0); valor.ExpireDelay = TimeSpan.FromMinutes(20.0); valor.MoveToWorld(new Point3D(382, 328, -30), map1); humility.RandomizeType = true; humility.Active = true; humility.SpawnRange = 24; humility.RestartDelay = TimeSpan.FromMinutes(10.0); humility.ExpireDelay = TimeSpan.FromMinutes(20.0); humility.MoveToWorld(new Point3D(462, 926, -67), map1); forest.Active = true; forest.SpawnRange = 24; forest.RestartDelay = TimeSpan.FromMinutes(10.0); forest.ExpireDelay = TimeSpan.FromMinutes(20.0); forest.RandomizeType = false; forest.Type = ChampionSpawnType.ForestLord; forest.MoveToWorld(new Point3D(1645, 1107, 8), map1); e.Mobile.SendMessage("Ilshenar Champions Complete."); Despise.Active = true; Despise.SpawnRange = 24; Despise.RestartDelay = TimeSpan.FromMinutes(10.0); Despise.ExpireDelay = TimeSpan.FromMinutes(20.0); Despise.RandomizeType = false; Despise.Type = ChampionSpawnType.VerminHorde; Despise.MoveToWorld(new Point3D(5557, 824, 65), map2); Deceit.Active = true; Deceit.SpawnRange = 24; Deceit.RestartDelay = TimeSpan.FromMinutes(10.0); Deceit.ExpireDelay = TimeSpan.FromMinutes(20.0); Deceit.RandomizeType = false; Deceit.Type = ChampionSpawnType.UnholyTerror; Deceit.MoveToWorld(new Point3D(5178, 708, 20), map2); Destard.Active = true; Destard.SpawnRange = 24; Destard.RestartDelay = TimeSpan.FromMinutes(10.0); Destard.ExpireDelay = TimeSpan.FromMinutes(20.0); Destard.RandomizeType = false; Destard.Type = ChampionSpawnType.ColdBlood; Destard.MoveToWorld(new Point3D(5259, 837, 61), map2); Fire.Active = true; Fire.SpawnRange = 24; Fire.RestartDelay = TimeSpan.FromMinutes(10.0); Fire.ExpireDelay = TimeSpan.FromMinutes(20.0); Fire.RandomizeType = false; Fire.Type = ChampionSpawnType.Abyss; Fire.MoveToWorld(new Point3D(5814, 1350, 2), map2); TerathanKeep.Active = true; TerathanKeep.SpawnRange = 24; TerathanKeep.RestartDelay = TimeSpan.FromMinutes(10.0); TerathanKeep.ExpireDelay = TimeSpan.FromMinutes(20.0); TerathanKeep.RandomizeType = false; TerathanKeep.Type = ChampionSpawnType.Arachnid; TerathanKeep.MoveToWorld(new Point3D(5190, 1605, 20), map2); e.Mobile.SendMessage("Felucca Dungeon Champions complete"); LostLands1.Active = true; LostLands1.SpawnRange = 24; LostLands1.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands1.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands1.RandomizeType = true; LostLands1.MoveToWorld(new Point3D(5511, 2360, 40), map2); LostLands2.Active = true; LostLands2.SpawnRange = 24; LostLands2.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands2.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands2.RandomizeType = true; LostLands2.MoveToWorld(new Point3D(6038, 2400, 45), map2); LostLands3.Active = true; LostLands3.SpawnRange = 24; LostLands3.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands3.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands3.RandomizeType = true; LostLands3.MoveToWorld(new Point3D(5549, 2640, 18), map2); LostLands4.Active = true; LostLands4.SpawnRange = 24; LostLands4.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands4.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands4.RandomizeType = true; LostLands4.MoveToWorld(new Point3D(5636, 2916, 38), map2); LostLands5.Active = true; LostLands5.SpawnRange = 24; LostLands5.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands5.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands5.RandomizeType = true; LostLands5.MoveToWorld(new Point3D(6035, 2943, 50), map2); LostLands6.Active = true; LostLands6.SpawnRange = 24; LostLands6.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands6.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands6.RandomizeType = true; LostLands6.MoveToWorld(new Point3D(5265, 3171, 107), map2); LostLands7.Active = true; LostLands7.SpawnRange = 24; LostLands7.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands7.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands7.RandomizeType = true; LostLands7.MoveToWorld(new Point3D(5282, 3368, 50), map2); LostLands8.Active = true; LostLands8.SpawnRange = 24; LostLands8.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands8.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands8.RandomizeType = true; LostLands8.MoveToWorld(new Point3D(5954, 3475, 25), map2); LostLands9.Active = true; LostLands9.SpawnRange = 24; LostLands9.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands9.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands9.RandomizeType = true; LostLands9.MoveToWorld(new Point3D(5207, 3637, 20), map2); LostLands10.Active = true; LostLands10.SpawnRange = 24; LostLands10.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands10.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands10.RandomizeType = true; LostLands10.MoveToWorld(new Point3D(5559, 3757, 21), map2); LostLands11.Active = true; LostLands11.SpawnRange = 24; LostLands11.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands11.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands11.RandomizeType = true; LostLands11.MoveToWorld(new Point3D(5982, 3882, 20), map2); LostLands12.Active = true; LostLands12.SpawnRange = 24; LostLands12.RestartDelay = TimeSpan.FromMinutes(10.0); LostLands12.ExpireDelay = TimeSpan.FromMinutes(20.0); LostLands12.RandomizeType = true; LostLands12.MoveToWorld(new Point3D(5724, 3991, 41), map2); e.Mobile.SendMessage("Felucca - Lost Lands Champions complete"); /* * isamu.Active = true; * isamu.SpawnRange = 24; * isamu.RestartDelay = TimeSpan.FromMinutes( 10.0 ); * isamu.ExpireDelay = TimeSpan.FromMinutes( 20.0 ); * isamu.RandomizeType = false; * isamu.Type = ChampionSpawnType.?; * isamu.MoveToWorld( new Point3D( 948, 434, 29 ), map3 ); * * e.Mobile.SendMessage( "Tokuno Champion complete" ); */ e.Mobile.SendMessage("Generation Complete."); }