public override void OnDoubleClick(Mobile from) { RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger; bool alter = false; foreach (Item item in GetItemsInRange(5)) { if (item is ExodusTomeAltar) { alter = true; break; } } if (robe != null && dagger != null && alter) { from.SendLocalizedMessage(1153604); // Target the summoning tome or yourself to declare your intentions for performing this ritual... ExodusTomeAltar.RitualTarget(this, from, null); } else { base.OnDoubleClick(from); } }
public virtual void SendBattleground(Mobile from) { if (VerLorRegController.Active && VerLorRegController.Mobile != null && ExodusSummoningAlter.CheckExodus()) { // teleport party member from.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist); from.PlaySound(0x1FE); from.MoveToWorld(m_TeleportDest, Map.Ilshenar); BaseCreature.TeleportPets(from, m_TeleportDest, Map.Ilshenar); // Robe of Rite Delete RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; if (robe != null) { robe.Delete(); } // Altar Delete Timer.DelayCall(TimeSpan.FromSeconds(2), new TimerCallback(Delete)); } else { from.SendLocalizedMessage(1075213); // The master of this realm has already been summoned and is engaged in combat. Your opportunity will come after he has squashed the current batch of intruders! } }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger; if (robe != null && dagger != null) { if (robe.CoolDown != TimeSpan.Zero) { from.SendLocalizedMessage(1153599); // You've already used this item in another ritual. return; } if (PeerlessExodusAltar.m_Rituals != null) { if (PeerlessExodusAltar.m_Rituals.Count != 0) { from.SendLocalizedMessage(1153600); // Which Summoning Tome do you wish to use this on? ExodusTomeAltar.RitualTarget(this, from, robe); } } } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
public static Target RitualTarget(Item item, Mobile from, RobeofRite robe) { Target t = new InternalTarget(item, from, robe); from.Target = t; return(t); }
public InternalTarget(Item item, Mobile from, RobeofRite robe) : base(-1, true, TargetFlags.None) { m_Item = item; m_Mobile = from; m_Robe = robe; m_First_Ritual_Mobile = m_Rituals.First().RitualMobile; m_Ritual_Mobile = m_Rituals.Count(s => s.RitualMobile == m_Mobile); }
public override void OnDoubleClick(Mobile from) { RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger; if (robe != null && dagger != null) { if (PeerlessExodusAltar.m_Rituals != null) { if (PeerlessExodusAltar.m_Rituals.Count != 0) { from.SendLocalizedMessage(1153604); // Target the summoning tome or yourself to declare your intentions for performing this ritual... ExodusTomeAltar.RitualTarget(this, from, null); } } } else { base.OnDoubleClick(from); } }
public override void OnDoubleClick(Mobile from) { RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger; if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1054107); // This item must be in your backpack. } else if (Party.Get(from) == null) { from.SendLocalizedMessage(1153596); // You must join a party with the players you wish to perform the ritual with. } else if (robe == null || dagger == null) { from.SendLocalizedMessage(1153591); // Thou art not properly attired to perform such a ritual. } else { from.SendLocalizedMessage(1153600); // Which Summoning Tome do you wish to use this on? from.Target = new RiteTarget(this); } }
public override void OnDoubleClick(Mobile from) { RobeofRite robe = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite; ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger; if (Party.Get(from) == null) { from.SendLocalizedMessage(1153596); // You must join a party with the players you wish to perform the ritual with. } else if (robe == null || dagger == null) { from.SendLocalizedMessage(1153591); // Thou art not properly attired to perform such a ritual. } else if (!((PlayerMobile)from).UseSummoningRite) { from.SendLocalizedMessage(1153603); // You must first use the Summoning Rite on a Summoning Tome. } else { from.SendLocalizedMessage(1153604); // Target the summoning tome or yourself to declare your intentions for performing this ritual... from.Target = new SacrificalTarget(this); } }
public InternalTarget(Item item, Mobile from, RobeofRite robe) : base(-1, true, TargetFlags.None) { m_Item = item; m_Mobile = from; m_Robe = robe; }