Exemple #1
0
 private void HomeStoneTeleport()
 {
     if (m_homeStone.Validate(Caster))
     {
         SerpentJawbone.RegisterUse(Caster);
         BaseCreature.TeleportPets(Caster, m_homeStone.home, m_homeStone.homeMap, true);
         Caster.Location      = new Point3D(m_homeStone.home);
         Caster.Map           = m_homeStone.homeMap;
         m_homeStone.LastUsed = DateTime.Now;
         Caster.PlaySound(0x1FC);
         Caster.FixedParticles(0x3709, 10, 30, 1281, 1, 5037, EffectLayer.Waist);
     }
 }
Exemple #2
0
        private bool Validate(Mobile from)
        {
            if (from != owner)
            {
                from.SendMessage("This is not thy jawbone!");
                return(false);
            }

            else if (this.homeMap == null)
            {
                from.SendMessage("Thy jawbone is not yet marked anywhere!");
                return(false);
            }
            //else if ( from.Criminal )
            //{
            //    from.SendLocalizedMessage( 1005561, "", 0x22 ); // your criminal and cannot escape so easily
            //    return false;
            //}
            else if (Server.Spells.SpellHelper.CheckCombat(from))
            {
                from.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
                return(false);
            }
            else if (Server.Factions.Sigil.ExistsOn(from))
            {
                from.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                return(false);
            }
            else if (Server.Misc.WeightOverloading.IsOverloaded(from))
            {
                from.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
                return(false);
            }
            else if (GetRemainingTimeToUse() > TimeSpan.Zero && !noWaitTime)
            {
                from.SendMessage("Thy jawbone will be ready again in {0} minutes!", (int)SerpentJawbone.GetRemainingTimeToUseForMobile(from).TotalMinutes);
                return(false);
            }
            else if (SerpentJawbone.GetRemainingTimeToUseForMobile(from) > TimeSpan.Zero && oneStonePerMobile)
            {
                from.SendMessage("Thou must wait {0} minutes before using thy jawbone.", (int)SerpentJawbone.GetRemainingTimeToUseForMobile(from).TotalMinutes);
                return(false);
            }
            else
            {
                return(true);
            }
        }
Exemple #3
0
            public HomeStoneSpell(SerpentJawbone homeStone, Mobile caster) : base(caster, null, m_Info)
            {
                m_homeStone = homeStone;

                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y, caster.Z + 4 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y, caster.Z ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y, caster.Z - 4 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X, caster.Y + 1, caster.Z + 4 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X, caster.Y + 1, caster.Z ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X, caster.Y + 1, caster.Z - 4 ), caster.Map, 0x3709, 30, 1281, 2 );
                //
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y + 1, caster.Z + 11 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y + 1, caster.Z + 7 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y + 1, caster.Z + 3 ), caster.Map, 0x3709, 30, 1281, 2 );
                //          Effects.SendLocationEffect( new Point3D( caster.X + 1, caster.Y + 1, caster.Z - 1 ), caster.Map, 0x3709, 30, 1281, 2 );
                caster.FixedParticles(0x3709, 10, 30, 1281, 1, 5037, EffectLayer.Waist);
            }
Exemple #4
0
 public override void GetContextMenuEntries(Mobile from, List <ContextMenuEntry> list)
 {
     if (owner == null)
     {
         return;
     }
     else
     {
         if (owner != from)
         {
             from.SendMessage("This is not thine to use.");
             return;
         }
         else
         {
             base.GetContextMenuEntries(from, list);
             SerpentJawbone.GetContextMenuEntries(from, this, list);
         }
     }
 }
Exemple #5
0
 public GoHomeEntry(Mobile from, Item item)
     : base(5134)// uses "Goto Loc" entry 5134
 {
     m_Item   = (SerpentJawbone)item;
     m_Mobile = from;
 }
Exemple #6
0
 public SetHomeEntry(Mobile from, Item item)
     : base(2055)// uses "Mark" entry
 {
     m_Item   = (SerpentJawbone)item;
     m_Mobile = from;
 }