protected override void OnTick() { if (m_Item.Deleted) { return; } Mobile spawn; switch (Utility.Random(10)) { default: case 0: spawn = new AirElemental(); break; case 1: spawn = new EarthElemental(); break; case 2: spawn = new WaterElemental(); break; case 3: spawn = new FireElemental(); break; case 4: spawn = new IceElemental(); break; case 5: spawn = new SnowElemental(); break; case 6: spawn = new Efreet(); break; case 7: spawn = new BloodElemental(); break; case 8: spawn = new PoisonElemental(); break; } spawn.MoveToWorld(m_Item.Location, m_Item.Map); m_Item.Delete(); }
public Rotation(ShamanTalents talents, SpellBox spellBox, IRotationOptions rotOpt) : this() { Talents = talents; LB = spellBox.LB; CL = spellBox.CL; LvB = spellBox.LvB; LvBFS = spellBox.LvBFS; FS = spellBox.FS; ES = spellBox.ES; FrS = spellBox.FrS; FN = spellBox.FN; ST = spellBox.ST; MT = spellBox.MT; FE = spellBox.FE; useDpsFireTotem = rotOpt.UseDpsFireTotem; CalculateRotation(rotOpt.UseFireNova, rotOpt.UseChainLightning, rotOpt.UseDpsFireTotem, rotOpt.UseFireEle); }
public bool SpawnPortal() { bool success = false; bool CanFit = false; Map map = Map.Felucca; int count = 0; if (PortalItem != null) { return(true); } while (!CanFit) { int x = Utility.Random(0, 5072); int y = Utility.Random(0, 4072); int z = map.GetAverageZ(x, y); CanFit = map.CanSpawnMobile(new Point3D(x, y, z)); Region region = Region.Find(new Point3D(x, y, z), map); if (CanFit && !(region is HouseRegion || region is GuardedRegion)) { PortalEntrance = new Point3D(x, y, z); PortalItem = new PortalItem(DungeonEntrance, DungeonMap) { _PortalSerial = UID }; PortalItem.MoveToWorld(PortalEntrance, map); PortalItem2 = new PortalItem(PortalEntrance, map); PortalItem2.MoveToWorld(DungeonEntrance, DungeonMap); Anim1 = new FireElemental { CantWalk = true, Blessed = true, Direction = Direction.Mask, IgnoreMobiles = true, Name = "" }; Anim2 = new FireElemental { CantWalk = true, Blessed = true, Direction = Direction.Mask, IgnoreMobiles = true, Name = "a mysterious gate" }; Anim1.MoveToWorld(PortalEntrance, map); Anim2.MoveToWorld(PortalEntrance, map); success = true; } else { CanFit = false; } count++; if (count >= 10000) { break; } } return(success); }