public override bool CheckCast() { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return(false); } if (!Caster.CanBeginAction <PolymorphSpell>()) { Caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed. return(false); } if (AnimalForm.UnderTransformation(Caster)) { Caster.SendLocalizedMessage(1063218); // You cannot use that ability in this form. return(false); } if (Caster.Flying) { Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying. return(false); } return(base.CheckCast()); }
public static int Get(OpCode op, Sigil.Label[] labels = null) { var baseSize = op.Size; int operandSize; switch (op.OperandType) { case OperandType.InlineBrTarget: operandSize = 4; break; case OperandType.InlineField: operandSize = 4; break; case OperandType.InlineI: operandSize = 4; break; case OperandType.InlineI8: operandSize = 8; break; case OperandType.InlineMethod: operandSize = 4; break; case OperandType.InlineNone: operandSize = 0; break; case OperandType.InlineR: operandSize = 8; break; case OperandType.InlineSig: operandSize = 4; break; case OperandType.InlineString: operandSize = 4; break; case OperandType.InlineSwitch: operandSize = 4 + labels.Length * 4; break; case OperandType.InlineTok: operandSize = 4; break; case OperandType.InlineType: operandSize = 4; break; case OperandType.InlineVar: operandSize = 2; break; case OperandType.ShortInlineBrTarget: operandSize = 1; break; case OperandType.ShortInlineI: operandSize = 1; break; case OperandType.ShortInlineR: operandSize = 4; break; case OperandType.ShortInlineVar: operandSize = 1; break; default: throw new Exception("Unexpected operand type [" + op.OperandType + "]"); } return baseSize + operandSize; }
public override bool CheckCast() { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return(false); } if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. return(false); } if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? return(false); } if (WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. return(false); } return(SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom)); }
public void NewBanner( ) { CreatingNewBanner = true; selectedRowIndex = -1; selectedItemIndex = -1; Banner = new Sigil(); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return(false); } if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. return(false); } if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1061282); // You cannot use the Sacred Journey ability to flee from combat. return(false); } if (WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. return(false); } return(SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom)); }
public override void OnResponse(NetState state, RelayInfo info) { StopClose(); if (Sigil.ExistsOn(m_Mobile)) { m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (info.ButtonID == 0) { if (m_Mobile == m_Sender) { m_Mobile.SendLocalizedMessage(1010588); // You choose not to go to any city. } } else { var index = info.ButtonID - 1; var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries; if (index >= 0 && index < entries.Length) { Teleport(entries[index]); } } }
/// <inheritdoc /> public UpgradeComponent Convert(ItemDTO value, object state) { var entity = new Sigil(); this.Merge(entity, value, state); return(entity); }
public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation) { if (m.Player && Sigil.ExistsOn(m)) { m.SendMessage(0x22, "You are holding a sigil and cannot enter this zone."); return(false); } PlayerMobile pm = m as PlayerMobile ?? (m is BaseCreature bc && bc.Summoned ? bc.SummonMaster as PlayerMobile : null); if (pm?.DuelContext?.StartedBeginCountdown == true) { return(true); } if (DuelContext.CheckCombat(m)) { m.SendMessage(0x22, "You have recently been in combat and cannot enter this zone."); return(false); } return(base.OnMoveInto(m, d, newLocation, oldLocation)); }
protected override void OnTick() { if (DateTime.UtcNow < m_End) { m_Mobile.Frozen = true; } else { m_Mobile.Frozen = false; Stop(); if (Sigil.ExistsOn(m_Mobile)) { m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return; } int idx = Utility.Random(m_Destination.Locations.Length); Point3D dest = m_Destination.Locations[idx]; Map destMap = Map.Felucca; /* * if ( m_Mobile.Map == Map.Trammel ) * destMap = Map.Trammel; * else if ( m_Mobile.Map == Map.Felucca ) * destMap = Map.Felucca; * else * destMap = m_Mobile.Kills >= Mobile.MurderCount ? Map.Felucca : Map.Trammel; */ BaseCreature.TeleportPets(m_Mobile, dest, destMap); m_Mobile.MoveToWorld(dest, destMap); } }
public void Target(IPoint3D p) { IPoint3D orig = p; Map map = Caster.Map; SpellHelper.GetSurfaceTop(ref p); Point3D from = Caster.Location; Point3D to = new Point3D(p); PlayerMobile pm = Caster as PlayerMobile; // IsStealthing should be moved to Server.Mobiles if (!pm.IsStealthing) { Caster.SendLocalizedMessage(1063087); // You must be in stealth mode to use this ability. } else if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.TeleportFrom) || !SpellHelper.CheckTravel(Caster, map, to, TravelCheckType.TeleportTo)) { } else if (map?.CanSpawnMobile(p.X, p.Y, p.Z) != true) { Caster.SendLocalizedMessage(502831); // Cannot teleport to that spot. } else if (SpellHelper.CheckMulti(to, map, true, 5)) { Caster.SendLocalizedMessage(502831); // Cannot teleport to that spot. } else if (Region.Find(to, map).IsPartOf <HouseRegion>()) { Caster.SendLocalizedMessage(502829); // Cannot teleport to that spot. } else if (CheckSequence()) { SpellHelper.Turn(Caster, orig); Mobile m = Caster; m.Location = to; m.ProcessDelta(); Effects.SendLocationParticles(EffectItem.Create(from, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023); m.PlaySound(0x512); Stealth.OnUse(m); // stealth check after the a jump } FinishSequence(); }
public virtual void UseGate(Mobile m) { //ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags; Region region = Region.Find(m_Target, m_TargetMap); var champregion = region.GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion; var customRegion = region as CustomRegion; if (Sigil.ExistsOn(m)) { m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (SpellHelper.CheckCombat(m)) { m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (SpellHelper.IsWind(m_Target, m_TargetMap) && m.Skills[SkillName.Magery].Base < 70.0) { m.SendLocalizedMessage(503382); // You are not worthy of entrance to the city of Wind! } else if (m.Spell != null) { m.SendLocalizedMessage(1049616); // You are too busy to do that at the moment. } else if ((!m.Alive || (m is PlayerMobile && ((PlayerMobile)m).Young)) && champregion != null && !champregion.CanSpawn()) { m.SendLocalizedMessage(501942); // That location is blocked. } else if (customRegion != null && customRegion.Controller != null && (!customRegion.Controller.AllowGateIn || !customRegion.Controller.CanEnter)) { m.SendLocalizedMessage(501942); // That location is blocked. } else if (customRegion != null && customRegion.Controller != null && customRegion.Controller.NoMounts && m.Mounted) { m.SendMessage("Your mount refuses to go into the gate!"); } else if (customRegion != null && customRegion.Controller != null && customRegion.Controller.NoPets && m.Followers > 0) { m.SendMessage("Sorry, but no pets are allowed in that region at this time (including your mount)."); } else if (m_TargetMap != null && m_TargetMap != Map.Internal) { BaseCreature.TeleportPets(m, m_Target, m_TargetMap); m.MoveToWorld(m_Target, m_TargetMap); if (m.AccessLevel == AccessLevel.Player || !m.Hidden) { m.PlaySound(0x1FE); } OnGateUsed(m); } else { m.SendMessage("This moongate does not seem to go anywhere."); } }
public override bool CheckCast() { if (Caster.Flying) { Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying. return(false); } if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1010521); // You cannot polymorph while you have a Town Sigil return(false); } if (TransformationSpellHelper.UnderTransformation(Caster)) { Caster.SendLocalizedMessage(1061633); // You cannot polymorph while in that form. return(false); } if (DisguiseTimers.IsDisguised(Caster)) { Caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised. return(false); } if (Caster.BodyMod == 183 || Caster.BodyMod == 184) { Caster.SendLocalizedMessage(1042512); // You cannot polymorph while wearing body paint return(false); } if (!Caster.CanBeginAction(typeof(PolymorphSpell))) { if (Core.ML) { EndPolymorph(Caster); } else { Caster.SendLocalizedMessage(1005559); // This spell is already in effect. } return(false); } if (m_NewBody == 0) { Gump gump; if (Core.SE) { gump = new NewPolymorphGump(Caster, Scroll); } else { gump = new PolymorphGump(Caster, Scroll); } Caster.SendGump(gump); return(false); } return(true); }
public void AddSigil(Sigil sigil) { if (sigils.Contains(sigil)) { return; } sigils.Add(sigil); }
public void AddToFirstEmpty(Sigil itemToAdd) { for (int i = 0; i < _slots.Count; i++) { if (_slots[i].Value == null) { _slots[i].Value = itemToAdd; } } }
public bool SelectSigil(Sigil sigil) { bool isCorrect = IsCorrectSigil(sigil); if (isCorrect) { _correctAnswers += 1; } NextRound(); return(isCorrect); }
public virtual void UseGate(Mobile m) { var flags = m.NetState?.Flags ?? ClientFlags.None; if (Sigil.ExistsOn(m)) { m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (TargetMap == Map.Felucca && m is PlayerMobile mobile && mobile.Young) { mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. }
public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (from.Mounted) { from.SendLocalizedMessage(1005399); // You can not bury a stone while you sit on a mount. } else if (!from.Body.IsHuman) { from.SendLocalizedMessage(1005400); // You can not bury a stone in this form. } else if (Sigil.ExistsOn(from)) { from.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (from.Map == GetTargetMap() || (from.Map != Map.Trammel && from.Map != Map.Felucca)) { from.SendLocalizedMessage(1005401); // You cannot bury the stone here. } else if (from is PlayerMobile && ((PlayerMobile)from).Young) { from.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. } else if (Misc.NotorietyHandlers.IsGuardCandidate(from)) { from.SendLocalizedMessage(1005402); // The magic of the stone cannot be evoked by someone with blood on their hands. } else if (from.Criminal) { from.SendLocalizedMessage(1005403); // The magic of the stone cannot be evoked by the lawless. } else if (!Region.Find(from.Location, from.Map).IsDefault || !Region.Find(from.Location, GetTargetMap()).IsDefault) { from.SendLocalizedMessage(1005401); // You cannot bury the stone here. } else if (!GetTargetMap().CanFit(from.Location, 16)) { from.SendLocalizedMessage(1005408); // Something is blocking the facet gate exit. } else { Movable = false; MoveToWorld(from.Location, from.Map); from.Animate(32, 5, 1, true, false, 0); new SettleTimer(this, from.Location, from.Map, GetTargetMap(), from).Start(); } }
public bool ValidateUse(Mobile from) { var pm = from as PlayerMobile; if (!IsChildOf(from.Backpack)) { // That must be in your pack for you to use it. from.SendLocalizedMessage(1042001); } else if (pm == null || pm.NpcGuild != NpcGuild.ThievesGuild) { // Only Members of the thieves guild are trained to use this item. from.SendLocalizedMessage(501702); } else if (Stealing.SuspendOnMurder && pm.Kills > 0) { // You are currently suspended from the thieves guild. They would frown upon your actions. from.SendLocalizedMessage(501703); } else if (!from.CanBeginAction(typeof(IncognitoSpell))) { // You cannot disguise yourself while incognitoed. from.SendLocalizedMessage(501704); } else if (Sigil.ExistsOn(from)) { from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil } else if (TransformationSpellHelper.UnderTransformation(from)) { // You cannot disguise yourself while in that form. from.SendLocalizedMessage(1061634); } else if (from.BodyMod == 183 || from.BodyMod == 184) { // You cannot disguise yourself while wearing body paint from.SendLocalizedMessage(1040002); } else if (!from.CanBeginAction(typeof(PolymorphSpell)) || from.IsBodyMod) { // You cannot disguise yourself while polymorphed. from.SendLocalizedMessage(501705); } else { return(true); } return(false); }
public override int LabelNumber => 1040000; // savage kin paint public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (Sigil.ExistsOn(from)) { from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil. } else if (!from.CanBeginAction <IncognitoSpell>()) { from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed. } else if (!from.CanBeginAction <PolymorphSpell>()) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (TransformationSpellHelper.UnderTransformation(from)) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (AnimalForm.UnderTransformation(from)) { from.SendLocalizedMessage(1061634); // You cannot disguise yourself while in that form. } else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask) { from.SendLocalizedMessage(501605); // You are already disguised. } else { from.BodyMod = from.Female ? 184 : 183; from.HueMod = 0; if (from is PlayerMobile mobile) { mobile.SavagePaintExpiration = TimeSpan.FromDays(7.0); } from.SendLocalizedMessage( 1042537 ); // You now bear the markings of the savage tribe. Your body paint will last about a week or you can remove it with an oil cloth. Consume(); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (Sigil.ExistsOn(from)) { from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil. } else if (!from.CanBeginAction(typeof(IncognitoSpell))) { from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed. } else if (!from.CanBeginAction(typeof(PolymorphSpell))) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (TransformationSpellHelper.UnderTransformation(from)) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask) { from.SendLocalizedMessage(501605); // You are already disguised. } else { from.BodyMod = (from.Female ? 184 : 183); from.HueMod = Hue; if (from is PlayerMobile && Hue == 1175) { ((PlayerMobile)from).BattlePaintExpirationShadow = TimeSpan.FromDays(7.0); } else { ((PlayerMobile)from).BattlePaintExpirationRed = TimeSpan.FromDays(7.0); } from.SendMessage("You now bear the savage markings of the battleborn."); // You now bear the markings of the savage tribe. Your body paint will last about a week or you can remove it with an oil cloth. Consume(); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (Sigil.ExistsOn(from)) { from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil. } else if (!from.CanBeginAction(typeof(IncognitoSpell))) { from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed. } else if (!from.CanBeginAction(typeof(PolymorphSpell))) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (TransformationSpellHelper.UnderTransformation(from)) { from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed. } else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask) { from.SendLocalizedMessage(501605); // You are already disguised. } else { from.BodyMod = (from.Female ? 184 : 183); from.HueMod = Hue; if (from is PlayerMobile && Hue == 61) { ((PlayerMobile)from).ZombiePaintExperationBooger = TimeSpan.FromDays(7.0); } else { ((PlayerMobile)from).ZombiePaintExperationVesper = TimeSpan.FromDays(7.0); } from.SendMessage("You have painted yourself with zombie juices. Yuck."); Consume(); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
public override bool CheckCast() { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return(false); } if (WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. return(false); } return(SpellHelper.CheckTravel(Caster, TravelCheckType.TeleportFrom)); }
public virtual void UseGate(Mobile m) { //ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags; Region region = Region.Find(m_Target, m_TargetMap); var champregion = region.GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion; var customRegion = region as CustomRegion; if (Sigil.ExistsOn(m)) { m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (SpellHelper.CheckCombat(m)) { m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (m.Spell != null) { m.SendLocalizedMessage(1049616); // You are too busy to do that at the moment. } else if (m.IsYoung()) { m.SendMessage(54, "You are too young to go in such a dangerous place!"); // That location is blocked. } else if (m.Mounted) { m.SendMessage("Your mount refuses to go into the gate!"); } else if (m_TargetMap != null && m_TargetMap != Map.Internal) { BaseCreature.TeleportPets(m, m_Target, m_TargetMap); m.MoveToWorld(m_Target, m_TargetMap); if (m.AccessLevel == AccessLevel.Player || !m.Hidden) { m.PlaySound(0x1FE); } OnGateUsed(m); } else { m.SendMessage("This gate does not seem to go anywhere."); } }
public static Material GetComponentMaterial(Sigil sigil) { Material material; switch (sigil) { case Sigil.Fire: material = Resources.Load <Material>("Materials/Sigils/Fire_Sigil"); break; case Sigil.Earth: material = Resources.Load <Material>("Materials/Sigils/Earth_Sigil"); break; case Sigil.Water: material = Resources.Load <Material>("Materials/Sigils/Water_Sigil"); break; case Sigil.Air: material = Resources.Load <Material>("Materials/Sigils/Air_Sigil"); break; case Sigil.Candle: material = Resources.Load <Material>("Materials/Sigils/Candle_Sigil"); break; case Sigil.Hearth: material = Resources.Load <Material>("Materials/Sigils/Hearth_Sigil"); break; case Sigil.Crystal: material = Resources.Load <Material>("Materials/Sigils/Crystal_Sigil"); break; default: material = new Material(Shader.Find("Incant/Seal")) { color = new Color(1, 1, 1, 0) }; break; } return(material); }
public static Report CompileSigilReport() { Report report = new Report("Faction Town Sigils", "50%"); report.Columns.Add("35%", "center", "Town"); report.Columns.Add("35%", "center", "Controller"); report.Columns.Add("30%", "center", "Capturable"); SigilCollection sigils = Sigil.Sigils; for (int i = 0; i < sigils.Count; ++i) { Sigil sigil = sigils[i]; string controller = "Unknown"; Mobile mob = sigil.RootParent as Mobile; if (mob != null) { Faction faction = Faction.Find(mob); if (faction != null) { controller = faction.Definition.FriendlyName; } } else if (sigil.LastMonolith != null && sigil.LastMonolith.Faction != null) { controller = sigil.LastMonolith.Faction.Definition.FriendlyName; } ReportItem item = new ReportItem(); item.Values.Add(sigil.Town == null ? "" : sigil.Town.Definition.FriendlyName); item.Values.Add(controller); item.Values.Add(sigil.IsPurifying ? "No" : "Yes"); report.Items.Add(item); } return(report); }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (map == null || !Core.AOS && Caster.Map != map) { Caster.SendLocalizedMessage(1005569); // You can not recall to another facet. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom)) { } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.RecallTo)) { } else if (map == Map.Felucca && Caster is PlayerMobile mobile && mobile.Young) { mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. }
public static string SigilToChar(this Sigil sigil) { switch (sigil) { case Sigil.Diamond: return("<sprite name=\"Sym0\">"); case Sigil.Heart: return("<sprite name=\"Sym1\">"); case Sigil.Clover: return("<sprite name=\"Sym2\">"); case Sigil.Spade: return("<sprite name=\"Sym3\">"); default: return("?"); } }
public override bool CheckCast() { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else { return(SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom)); } return(false); }
public override bool CheckCast() { if (Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1010445); // You cannot incognito if you have a sigil return(false); } if (!Caster.CanBeginAction <IncognitoSpell>()) { Caster.SendLocalizedMessage(1005559); // This spell is already in effect. return(false); } if (Caster.BodyMod == 183 || Caster.BodyMod == 184) { Caster.SendLocalizedMessage(1042402); // You cannot use incognito while wearing body paint return(false); } return(true); }
protected override void OnTick() { if (Core.Now < m_End) { m_Mobile.Frozen = true; } else { m_Mobile.Frozen = false; Stop(); if (Sigil.ExistsOn(m_Mobile)) { m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. return; } var dest = m_Destination.Locations.RandomElement(); Map destMap; if (m_Mobile.Map == Map.Trammel) { destMap = Map.Trammel; } else if (m_Mobile.Map == Map.Felucca) { destMap = Map.Felucca; } else { destMap = m_Mobile.Kills >= 5 ? Map.Felucca : Map.Trammel; } BaseCreature.TeleportPets(m_Mobile, dest, destMap); m_Mobile.MoveToWorld(dest, destMap); } }
public override void OnResponse(NetState state, RelayInfo info) { StopClose(); var pm = m_Mobile as PlayerMobile; if (Sigil.ExistsOn(m_Mobile)) { m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (pm != null && pm.PokerGame != null) { pm.SendMessage(61, "You cannot use this while taking part in a poker game."); } else if (info.ButtonID == 0) { if (m_Mobile == m_Sender) { m_Mobile.SendLocalizedMessage(1010588); // You choose not to go to any city. } } else { int index = info.ButtonID - 1; var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries; if (m_Mobile.Kills >= 5) { entries = m_MurdererEntries; } if (index >= 0 && index < entries.Length) { Teleport(entries[index]); } } }
protected override void DoApply(Coord tile) { Level.CurrentLevel.AddPromise(_pr = new Promise()); Debug.Log("ritual..."); _s = (Sigil)Level.CurrentLevel.Get(tile).AgentsOnTile(agent => agent is Sigil)[0]; _s.Activated += OnActivated; _s.Activate(); Source.GetComponentInChildren<SkeletonAnimation>().AnimationName = "ritual_1"; }
private void OnActivated(Sigil sigil) { Source.GetComponentInChildren<SkeletonAnimation>().AnimationName = "idle"; _s.Activated -= OnActivated; _pr.Fulfill(); _pr = null; }