Beispiel #1
0
        public void Effect( Point3D loc, Map map, bool checkMulti )
        {
            if ( map == null || (!Core.AOS && Caster.Map != map) )
            {
                Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
            }
            else if ( !map.CanFit( loc.X, loc.Y, loc.Z, 16 ) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( !SpellHelper.CheckTravel( Caster, loc, map, TravelType.Gate ) && Caster.AccessLevel == AccessLevel.Player )
            {
                Caster.PlaySound( 0x5C );
            }
            else if ( CheckSequence() )
            {
                Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location

                Effects.PlaySound( Caster.Location, Caster.Map, 0x20E );

                InternalItem firstGate = new InternalItem( loc, map );
                firstGate.MoveToWorld( Caster.Location, Caster.Map );

                Effects.PlaySound( loc, map, 0x20E );

                InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
                secondGate.MoveToWorld( loc, map );
            }

            FinishSequence();
        }
Beispiel #2
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!map.CanFit(loc.X, loc.Y, loc.Z, 16))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (!SpellHelper.CheckTravel(Caster, loc, map, TravelType.Gate) && Caster.AccessLevel == AccessLevel.Player)
            {
                Caster.PlaySound(0x5C);
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #3
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            bool t2aOK = SpellHelper.TravelInsideT2A(loc, Caster);

            if (Factions.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(1005570);                   // You can not gate to another facet.
            }
            else if (!t2aOK && !SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!t2aOK && !SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young)
            {
                Caster.SendLocalizedMessage(1049543);                   // You decide against traveling to Felucca while you are still young.
            }

            /*else if ( Caster.Kills >= 5 && map != Map.Felucca )
             * {
             *      Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
             * }
             * 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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #4
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (Factions.Sigil.ExistsOn(Caster))
            {
                Caster.SendAsciiMessage("You can't do that while carrying the sigil.");
            }
            else if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendAsciiMessage("You can not gate to another facet.");
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young)
            {
                Caster.SendAsciiMessage("You decide against traveling to Felucca while you are still young.");
            }
            else if (Caster.Kills >= 5 && map != Map.Felucca)
            {
                Caster.SendAsciiMessage("You are not allowed to travel there.");
            }
            else if (Caster.Criminal)
            {
                Caster.SendAsciiMessage(0x22, "Thou'rt a criminal and cannot escape so easily.");
            }
            else if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendAsciiMessage(0x22, "Wouldst thou flee during the heat of battle?");
            }
            else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendAsciiMessage("That location is blocked.");
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendAsciiMessage("That location is blocked.");
            }
            else if (CheckSequence())
            {
                Caster.SendAsciiMessage("You open a magical gate to another location.");

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #5
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (Caster.Kills >= 5 && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            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 if( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
            //{
            //    Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            //}
            //else if( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            //{
            //    Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            //}
            else if (Core.AOS && (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location))) // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage(1071242);                                                   // There is already a gate there.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);

                ((Moongate)firstGate).PairedGate  = secondGate;
                ((Moongate)secondGate).PairedGate = firstGate;
            }

            FinishSequence();
        }
Beispiel #6
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                 // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (Caster.Murderer && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                 // You are not allowed to travel there.
            }
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if (SpellHelper.IsSpecialRegion(loc) || SpellHelper.IsSpecialRegion(Caster.Location))
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                 // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #7
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (Worlds.AllowEscape(Caster, Caster.Map, Caster.Location, Caster.X, Caster.Y) == false)
            {
                Caster.SendMessage("That spell does not seem to work in this place.");
            }
            else if (Worlds.RegionAllowedRecall(Caster.Map, Caster.Location, Caster.X, Caster.Y) == false)
            {
                Caster.SendMessage("That spell does not seem to work in this place.");
            }
            else if (Worlds.RegionAllowedTeleport(map, loc, loc.X, loc.Y) == false)
            {
                Caster.SendMessage("The destination seems magically unreachable.");
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                                                   // That location is blocked.
            }
            else if (Core.SE && (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location))) // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage(1071242);                                                  // There is already a gate there.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);
                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.Hue = Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                if (Worlds.RegionAllowedTeleport(Caster.Map, Caster.Location, Caster.X, Caster.Y) == true)
                {
                    Effects.PlaySound(loc, map, 0x20E);
                    InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                    secondGate.Hue = Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0);
                    secondGate.MoveToWorld(loc, map);
                }
            }

            FinishSequence();
        }
Beispiel #8
0
        private void DoTunnel(Mobile combatant)
        {
            PublicOverheadMessage(Network.MessageType.Regular, 0x3B3, false, "* The ant lion begins tunneling into the ground *");
            Effects.SendTargetParticles(this, 0x36B0, 20, 10, 1734, 0, 5044, EffectLayer.Head, 0);

            Frozen          = true;
            _Tunneling      = true;
            _StartTunnelLoc = Location;
            _StartTunnelMap = Map;

            Timer.DelayCall(TimeSpan.FromSeconds(3), () =>
            {
                if (_Tunneling)
                {
                    Hidden  = true;
                    Blessed = true;

                    Item item = new InternalItem(3892);
                    item.MoveToWorld(Location, Map);

                    item = new InternalItem(4967);
                    item.MoveToWorld(Location, Map);

                    Timer.DelayCall(TimeSpan.FromSeconds(3), () =>
                    {
                        Hidden  = false;
                        Blessed = false;

                        if (!combatant.Alive || !combatant.InRange(_StartTunnelLoc, 20) || combatant.Map != _StartTunnelMap)
                        {
                            MoveToWorld(_StartTunnelLoc, _StartTunnelMap);
                        }
                        else
                        {
                            MoveToWorld(combatant.Location, combatant.Map);
                            AOS.Damage(combatant, this, 25, 70, 0, 0, 30, 0);

                            Item item2 = new InternalItem(3892);
                            item2.MoveToWorld(Location, Map);

                            item2 = new InternalItem(4967);
                            item2.MoveToWorld(Location, Map);
                        }

                        _StartTunnelLoc = Point3D.Zero;
                        _StartTunnelMap = null;
                        _Tunneling      = false;
                        Frozen          = false;
                    });
                }
            });
        }
Beispiel #9
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }

            else if (Caster.Kills >= 5 && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            else if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendLocalizedMessage(1005564, "", 0x22);                   // Wouldst thou flee during the heat of battle??
            }
            else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.PublicOverheadMessage(Server.Network.MessageType.Regular, Caster.EmoteHue, true, "*slashes through the air, cutting through the fabric of space and time itself*");

                Effects.PlaySound(Caster.Location, Caster.Map, 476);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.Hue = 1;
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 476);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.Hue = 1;
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #10
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || Caster.Map != map)
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }

            /*else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
             * {
             * }*/
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendLocalizedMessage(1005564, "", 0x22);                   // Wouldst thou flee during the heat of battle??
            }

            /*else if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
             * {
             *      Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
             * }*/
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                double duration = 30.0;

                duration = SpellHelper.AdjustValue(Caster, duration);

                InternalItem firstGate = new InternalItem(loc, map, duration);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map, duration);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
        public virtual void DoTeleport(Mobile m, Point3D loc, Map map)
        {
            if (Charges >= 1)
            {
                m.SendLocalizedMessage(501024); // You open a magical gate to another location

                Effects.PlaySound(m.Location, m.Map, 0x20E);

                var firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(m.Location, m.Map);

                Effects.PlaySound(loc, map, 0x20E);

                Charges--;
            }
            else
            {
                m.SendMessage(54, "The crystal portal needs more charges. Add charges to it by double clicking the crystal.");
            }
        }
Beispiel #12
0
        public void DoCircleOfIce()
        {
            for (int x = -8; x <= 8; ++x)
            {
                for (int y = -8; y <= 8; ++y)
                {
                    double dist = Math.Sqrt(x * x + y * y);

                    if (dist > 7 && dist < 9)
                    {
                        Point3D loc = new Point3D(X + x, Y + y, Z);
                        if (Map.CanFit(loc, 0, true))
                        {
                            Item item = new InternalItem();
                            item.MoveToWorld(loc, Map);
                            Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5029);
                        }
                    }
                }
            }
        }
Beispiel #13
0
        protected override void OnTarget(object o)
        {
            IPoint3D p = o as IPoint3D;

            if (p != null && CheckSequence())
            {
                Rectangle2D rec = new Rectangle2D(p.X - 3, p.Y - 3, 6, 6);
                Skulls = new List <Item>();

                Item skull = new InternalItem();
                skull.MoveToWorld(new Point3D(rec.X, rec.Y, Caster.Map.GetAverageZ(rec.X, rec.Y)), Caster.Map);
                Skulls.Add(skull);

                skull = new InternalItem();
                skull.MoveToWorld(new Point3D(rec.X + rec.Width, rec.Y + rec.Height, Caster.Map.GetAverageZ(rec.X + rec.Width, rec.Y + rec.Height)), Caster.Map);
                Skulls.Add(skull);

                skull = new InternalItem();
                skull.MoveToWorld(new Point3D(rec.X + rec.Width, rec.Y, Caster.Map.GetAverageZ(rec.X + rec.Width, rec.Y)), Caster.Map);
                Skulls.Add(skull);

                skull = new InternalItem();
                skull.MoveToWorld(new Point3D(rec.X, rec.Y + rec.Height, Caster.Map.GetAverageZ(rec.X, rec.Y + rec.Height)), Caster.Map);
                Skulls.Add(skull);

                skull = new InternalItem();
                skull.MoveToWorld(new Point3D(rec.X + (rec.Width / 2), rec.Y + (rec.Height / 2), Caster.Map.GetAverageZ(rec.X + (rec.Width / 2), rec.Y + (rec.Height / 2))), Caster.Map);
                Skulls.Add(skull);

                Zone     = rec;
                Strength = (int)((Caster.Skills[CastSkill].Value + Caster.Skills[DamageSkill].Value + (GetMasteryLevel() * 20)) / 3.75);
                Expires  = DateTime.UtcNow + TimeSpan.FromSeconds(6);

                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Conduit, 1155901, 1156053, Strength.ToString())); //Targeted Necromancy spells used on a target within the Conduit field will affect all valid targets within the field at ~1_PERCT~% strength.

                BeginTimer();
            }
        }
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {        /*
                  * if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
                  *     {
                  *             Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
                  *     }*/
            if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #15
0
        public void Effect( Point3D loc, Map map, bool checkMulti )
        {
            if ( Factions.Sigil.ExistsOn( Caster ) )
            {
                Caster.SendAsciiMessage( "You can't do that while carrying the sigil." );
            }
            else if ( map == null || (!Core.AOS && Caster.Map != map) )
            {
                Caster.SendAsciiMessage( "You can not gate to another facet." );
            }
            else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
            {
            }
            else if ( !SpellHelper.CheckTravel( Caster,  map, loc, TravelCheckType.GateTo ) )
            {
            }
            else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young )
            {
                Caster.SendAsciiMessage( "You decide against traveling to Felucca while you are still young." );
            }
            else if ( Caster.Kills >= 5 && map != Map.Felucca )
            {
                Caster.SendAsciiMessage( "You are not allowed to travel there." );
            }
            else if ( Caster.Criminal )
            {
                Caster.SendAsciiMessage( 0x22, "Thou'rt a criminal and cannot escape so easily." );
            }
            else if ( SpellHelper.CheckCombat( Caster ) )
            {
                Caster.SendAsciiMessage( 0x22, "Wouldst thou flee during the heat of battle?" );
            }
            else if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
            {
                Caster.SendAsciiMessage( "That location is blocked." );
            }
            else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            {
                Caster.SendAsciiMessage( "That location is blocked." );
            }
            else if ( CheckSequence() )
            {
                Caster.SendAsciiMessage( "You open a magical gate to another location." );

                Effects.PlaySound( Caster.Location, Caster.Map, 0x20E );

                InternalItem firstGate = new InternalItem( loc, map );
                firstGate.MoveToWorld( Caster.Location, Caster.Map );

                Effects.PlaySound( loc, map, 0x20E );

                InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
                secondGate.MoveToWorld( loc, map );
            }

            FinishSequence();
        }
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                if (this.Scroll != null)
                {
                    Scroll.Consume();
                }
                SpellHelper.Turn(Caster, p);

                SpellHelper.GetSurfaceTop(ref p);

                Effects.PlaySound(p, Caster.Map, 0x2);

                Point3D      loc = new Point3D(p.X, p.Y, p.Z);
                int          grovex;
                int          grovey;
                int          grovez;
                InternalItem groveStone = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex            = loc.X;
                grovey            = loc.Y;
                grovez            = loc.Z;
                groveStone.ItemID = 0x08E3;
                groveStone.Name   = "sacred stone";
                Point3D stonexyz = new Point3D(grovex, grovey, grovez);
                groveStone.MoveToWorld(stonexyz, Caster.Map);

                InternalItem grovea = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X - 2;
                grovey        = loc.Y - 2;
                grovez        = loc.Z;
                grovea.ItemID = 3290;
                Point3D grovexyz = new Point3D(grovex, grovey, grovez);
                grovea.MoveToWorld(grovexyz, Caster.Map);

                InternalItem grovec = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X;
                grovey        = loc.Y - 3;
                grovez        = loc.Z;
                grovec.ItemID = 3293;
                Point3D grovexyzb = new Point3D(grovex, grovey, grovez);
                grovec.MoveToWorld(grovexyzb, Caster.Map);

                InternalItem groved = new InternalItem(Caster.Location, Caster.Map, Caster);
                groved.ItemID = 3290;
                grovex        = loc.X + 2;
                grovey        = loc.Y - 2;
                grovez        = loc.Z;
                Point3D grovexyzc = new Point3D(grovex, grovey, grovez);
                groved.MoveToWorld(grovexyzc, Caster.Map);
                InternalItem grovee = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X + 3;
                grovee.ItemID = 3290;
                grovey        = loc.Y;
                grovez        = loc.Z;
                Point3D grovexyzd = new Point3D(grovex, grovey, grovez);
                grovee.MoveToWorld(grovexyzd, Caster.Map);
                InternalItem grovef = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovef.ItemID = 3293;
                grovex        = loc.X + 2;
                grovey        = loc.Y + 2;
                grovez        = loc.Z;
                Point3D grovexyze = new Point3D(grovex, grovey, grovez);
                grovef.MoveToWorld(grovexyze, Caster.Map);
                InternalItem groveg = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X;
                groveg.ItemID = 3290;
                grovey        = loc.Y + 3;
                grovez        = loc.Z;
                Point3D grovexyzf = new Point3D(grovex, grovey, grovez);
                groveg.MoveToWorld(grovexyzf, Caster.Map);
                InternalItem groveh = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X - 2;
                groveh.ItemID = 3293;
                grovey        = loc.Y + 2;
                grovez        = loc.Z;
                Point3D grovexyzg = new Point3D(grovex, grovey, grovez);
                groveh.MoveToWorld(grovexyzg, Caster.Map);
                InternalItem grovei = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex        = loc.X - 3;
                grovei.ItemID = 3293;
                grovey        = loc.Y;
                grovez        = loc.Z;
                Point3D grovexyzh = new Point3D(grovex, grovey, grovez);
                grovei.MoveToWorld(grovexyzh, Caster.Map);
                InternalItem leavesa = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X - 2;
                grovey         = loc.Y - 2;
                grovez         = loc.Z;
                leavesa.ItemID = 3291;
                Point3D leafxyz = new Point3D(grovex, grovey, grovez);
                leavesa.MoveToWorld(leafxyz, Caster.Map);

                InternalItem leavesc = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X;
                grovey         = loc.Y - 3;
                grovez         = loc.Z;
                leavesc.ItemID = 3294;
                Point3D leafxyzb = new Point3D(grovex, grovey, grovez);
                leavesc.MoveToWorld(leafxyzb, Caster.Map);

                InternalItem leavesd = new InternalItem(Caster.Location, Caster.Map, Caster);
                leavesd.ItemID = 3291;
                grovex         = loc.X + 2;
                grovey         = loc.Y - 2;
                grovez         = loc.Z;
                Point3D leafxyzc = new Point3D(grovex, grovey, grovez);
                leavesd.MoveToWorld(leafxyzc, Caster.Map);
                InternalItem leavese = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X + 3;
                leavese.ItemID = 3291;
                grovey         = loc.Y;
                grovez         = loc.Z;
                Point3D leafxyzd = new Point3D(grovex, grovey, grovez);
                leavese.MoveToWorld(leafxyzd, Caster.Map);
                InternalItem leavesf = new InternalItem(Caster.Location, Caster.Map, Caster);
                leavesf.ItemID = 3294;
                grovex         = loc.X + 2;
                grovey         = loc.Y + 2;
                grovez         = loc.Z;
                Point3D leafxyze = new Point3D(grovex, grovey, grovez);
                leavesf.MoveToWorld(leafxyze, Caster.Map);
                InternalItem leavesg = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X;
                leavesg.ItemID = 3291;
                grovey         = loc.Y + 3;
                grovez         = loc.Z;
                Point3D leafxyzf = new Point3D(grovex, grovey, grovez);
                leavesg.MoveToWorld(leafxyzf, Caster.Map);
                InternalItem leavesh = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X - 2;
                leavesh.ItemID = 3294;
                grovey         = loc.Y + 2;
                grovez         = loc.Z;
                Point3D leafxyzg = new Point3D(grovex, grovey, grovez);
                leavesh.MoveToWorld(leafxyzg, Caster.Map);
                InternalItem leavesi = new InternalItem(Caster.Location, Caster.Map, Caster);
                grovex         = loc.X - 3;
                leavesi.ItemID = 3294;
                grovey         = loc.Y;
                grovez         = loc.Z;
                Point3D leafxyzh = new Point3D(grovex, grovey, grovez);
                leavesi.MoveToWorld(leafxyzh, Caster.Map);
            }

            FinishSequence();
        }
Beispiel #17
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (Worlds.AllowEscape(Caster, Caster.Map, Caster.Location, Caster.X, Caster.Y) == false)
            {
                Caster.SendMessage("That spell does not seem to work in this place.");
            }
            else if (Worlds.RegionAllowedRecall(Caster.Map, Caster.Location, Caster.X, Caster.Y) == false)
            {
                Caster.SendMessage("That potion does not seem to work in this place.");
            }
            else if (Worlds.RegionAllowedTeleport(map, loc, loc.X, loc.Y) == false)
            {
                Caster.SendMessage("The destination seems magically unreachable with this potion.");
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendMessage("You open a mystical portal in a mushroom circle");                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x1);
                int          mushx;
                int          mushy;
                int          mushz;
                InternalItem firstGatea = new InternalItem(loc, map);
                mushx             = Caster.X;
                mushy             = Caster.Y;
                mushz             = Caster.Z;
                firstGatea.ItemID = 0xD10;
                Point3D mushxyz = new Point3D(mushx, mushy, mushz);
                firstGatea.MoveToWorld(mushxyz, Caster.Map);
                InternalItem firstGateb = new InternalItem(loc, map);
                mushx             = Caster.X;
                mushy             = Caster.Y;
                firstGateb.ItemID = 0x373A;
                mushz             = Caster.Z + 1;
                Point3D mushxyza = new Point3D(mushx, mushy, mushz);
                firstGateb.MoveToWorld(mushxyza, Caster.Map);
                InternalItem firstGatec = new InternalItem(loc, map);
                mushx             = Caster.X - 1;
                firstGatec.ItemID = 0xD11;
                mushy             = Caster.Y + 1;
                mushz             = Caster.Z;
                Point3D mushxyzb = new Point3D(mushx, mushy, mushz);
                firstGatec.MoveToWorld(mushxyzb, Caster.Map);
                InternalItem firstGated = new InternalItem(loc, map);
                firstGated.ItemID = 0xD0C;
                mushx             = Caster.X;
                mushy             = Caster.Y + 2;
                mushz             = Caster.Z;
                Point3D mushxyzc = new Point3D(mushx, mushy, mushz);
                firstGated.MoveToWorld(mushxyzc, Caster.Map);
                InternalItem firstGatee = new InternalItem(loc, map);
                mushx             = Caster.X + 1;
                firstGatee.ItemID = 0xD0D;
                mushy             = Caster.Y + 1;
                mushz             = Caster.Z;
                Point3D mushxyzd = new Point3D(mushx, mushy, mushz);
                firstGatee.MoveToWorld(mushxyzd, Caster.Map);
                InternalItem firstGatef = new InternalItem(loc, map);
                firstGatef.ItemID = 0xD0E;
                mushx             = Caster.X + 2;
                mushy             = Caster.Y;
                mushz             = Caster.Z;
                Point3D mushxyze = new Point3D(mushx, mushy, mushz);
                firstGatef.MoveToWorld(mushxyze, Caster.Map);
                InternalItem firstGateg = new InternalItem(loc, map);
                mushx             = Caster.X + 1;
                firstGateg.ItemID = 0xD0F;
                mushy             = Caster.Y - 1;
                mushz             = Caster.Z;
                Point3D mushxyzf = new Point3D(mushx, mushy, mushz);
                firstGateg.MoveToWorld(mushxyzf, Caster.Map);

                if (Worlds.RegionAllowedTeleport(Caster.Map, Caster.Location, Caster.X, Caster.Y) == true)
                {
                    Effects.PlaySound(loc, map, 0x1);
                    InternalItem secondGatea = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X;
                    mushy = loc.Y;
                    mushz = loc.Z;
                    secondGatea.ItemID = 0xD10;
                    Point3D mushaxyz = new Point3D(mushx, mushy, mushz);
                    secondGatea.MoveToWorld(mushaxyz, map);
                    InternalItem secondGateb = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X;
                    mushy = loc.Y;
                    secondGateb.ItemID = 0x373A;
                    mushz = loc.Z + 1;
                    Point3D mushaxyza = new Point3D(mushx, mushy, mushz);
                    secondGateb.MoveToWorld(mushaxyza, map);
                    InternalItem secondGatec = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X - 1;
                    secondGatec.ItemID = 0xD11;
                    mushy = loc.Y + 1;
                    mushz = loc.Z - 1;
                    Point3D mushaxyzb = new Point3D(mushx, mushy, mushz);
                    secondGatec.MoveToWorld(mushaxyzb, map);
                    InternalItem secondGated = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X;
                    mushy = loc.Y + 2;
                    secondGated.ItemID = 0xD0C;
                    mushz = loc.Z;
                    Point3D mushaxyzc = new Point3D(mushx, mushy, mushz);
                    secondGated.MoveToWorld(mushaxyzc, map);
                    InternalItem secondGatee = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X + 1;
                    mushy = loc.Y + 1;
                    mushz = loc.Z;
                    secondGatee.ItemID = 0xD0D;
                    Point3D mushaxyzd = new Point3D(mushx, mushy, mushz);
                    secondGatee.MoveToWorld(mushaxyzd, map);
                    InternalItem secondGatef = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X + 2;
                    mushy = loc.Y;
                    mushz = loc.Z;
                    secondGatef.ItemID = 0xD0E;
                    Point3D mushaxyze = new Point3D(mushx, mushy, mushz);
                    secondGatef.MoveToWorld(mushaxyze, map);
                    InternalItem secondGateg = new InternalItem(Caster.Location, Caster.Map);
                    mushx = loc.X + 1;
                    secondGateg.ItemID = 0xD0F;
                    mushy = loc.Y - 1;
                    mushz = loc.Z;
                    Point3D mushaxyzf = new Point3D(mushx, mushy, mushz);
                    secondGateg.MoveToWorld(mushaxyzf, map);
                }
            }

            FinishSequence();
        }
Beispiel #18
0
        public void Effect( Point3D loc, Map map, bool checkMulti )
        {
            if ( map == null || (!Core.AOS && Caster.Map != map) )
            {
                Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
            }
            else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
            {
            }
            else if ( !SpellHelper.CheckTravel( Caster,  map, loc, TravelCheckType.GateTo ) )
            {
            }
            else if ( Caster.Kills >= 5 && map != Map.Felucca )
            {
                Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
            }
            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 if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( CheckSequence() )
            {
                Caster.SendMessage( "The clouds open a magical gate to another place" ); // You open a magical gate to another location

                Effects.PlaySound( Caster.Location, Caster.Map, 0x482 );
                int gravx;
                int gravy;
                int gravz;

                InternalItem firstGatea = new InternalItem( loc, map ); //Top Middle item
                gravx=Caster.X-1;
                gravy=Caster.Y-1;
                gravz=Caster.Z;
                firstGatea.ItemID=14138;
                firstGatea.Hue = 1174;
                Point3D gravxyz = new Point3D(gravx,gravy,gravz);
                firstGatea.MoveToWorld( gravxyz, Caster.Map );
                InternalItem firstGateb = new InternalItem( loc, map );
                gravx=Caster.X;
                gravy=Caster.Y;
                firstGateb.ItemID=6899; //Moongate
                firstGateb.Hue=1153;
                gravz=Caster.Z;
                Point3D gravxyza = new Point3D(gravx,gravy,gravz);
                firstGateb.MoveToWorld( gravxyza, Caster.Map );
                InternalItem firstGatec = new InternalItem( loc, map );
                gravx=Caster.X-1;
                firstGatec.ItemID=14138;
                firstGatec.Hue = 1174;
                gravy=Caster.Y+1;
                gravz=Caster.Z;
                Point3D gravxyzb = new Point3D(gravx,gravy,gravz);
                firstGatec.MoveToWorld( gravxyzb, Caster.Map );
                InternalItem firstGateg = new InternalItem( loc, map );
                gravx=Caster.X+1;
                firstGateg.ItemID=14138;
                firstGateg.Hue = 1174;
                gravy=Caster.Y-1;
                gravz=Caster.Z;
                Point3D gravxyzf = new Point3D(gravx,gravy,gravz);
                firstGateg.MoveToWorld( gravxyzf, Caster.Map );
                InternalItem firstGatee = new InternalItem( loc, map );
                gravx=Caster.X+1;
                firstGatee.ItemID=14170;
                firstGatee.Hue = 1174;
                gravy=Caster.Y+1;
                gravz=Caster.Z;
                Point3D gravxyzd = new Point3D(gravx,gravy,gravz);
                firstGatee.MoveToWorld( gravxyzd, Caster.Map );

                //Effects.PlaySound( loc, map, 0x482 );
                Caster.PlaySound( 0x212 );
                Caster.PlaySound( 0x206 );

                InternalItem secondGatea = new InternalItem( Caster.Location, Caster.Map );
                gravx=loc.X-1;
                gravy=loc.Y-1;
                gravz=loc.Z;
                secondGatea.ItemID=14138;
                secondGatea.Hue = 1151;
                Point3D gravaxyz = new Point3D(gravx,gravy,gravz);
                secondGatea.MoveToWorld( gravaxyz, map);
                InternalItem secondGateb = new InternalItem( Caster.Location, Caster.Map );
                gravx=loc.X;
                gravy=loc.Y;
                secondGateb.ItemID=6899; //Moongate
                secondGateb.Hue = 1153;
                gravz=loc.Z;
                Point3D gravaxyza = new Point3D(gravx,gravy,gravz);
                secondGateb.MoveToWorld( gravaxyza, map);
                InternalItem secondGatec = new InternalItem( Caster.Location, Caster.Map );
                gravx=loc.X-1;
                secondGatec.ItemID=14138;
                secondGatec.Hue = 1151;
                gravy=loc.Y+1;
                gravz=loc.Z;
                Point3D gravaxyzb = new Point3D(gravx,gravy,gravz);
                secondGatec.MoveToWorld( gravaxyzb, map);
                InternalItem secondGatee = new InternalItem( Caster.Location, Caster.Map );
                gravx=loc.X+1;
                gravy=loc.Y+1;
                gravz=loc.Z;
                secondGatee.ItemID=14138;
                secondGatee.Hue = 1151;
                Point3D gravaxyzd = new Point3D(gravx,gravy,gravz);
                secondGatee.MoveToWorld( gravaxyzd, map);
                InternalItem secondGateg = new InternalItem( Caster.Location, Caster.Map );
                gravx=loc.X+1;
                secondGateg.ItemID=14138;
                secondGateg.Hue = 1151;
                gravy=loc.Y-1;
                gravz=loc.Z;
                Point3D gravaxyzf = new Point3D(gravx,gravy,gravz);
                secondGateg.MoveToWorld( gravaxyzf, map);
            }

            FinishSequence();
        }
           public void Target( IPoint3D p )
      {
         if ( !Caster.CanSee( p ) )
         {
            Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
         }
         else if ( /*SpellHelper.CheckTown( p, Caster ) &&*/ CheckSequence() )
         {
            SpellHelper.Turn( Caster, p );

            SpellHelper.GetSurfaceTop( ref p );


            Effects.PlaySound( p, Caster.Map, 0x222 );

            
              Point3D loc = new Point3D( p.X, p.Y, p.Z );
               	int mushx;
				int mushy;
				int mushz;
				

              	InternalItem firstFlamea = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-2;
				mushy=loc.Y-2;
				mushz=loc.Z;
				Point3D mushxyz = new Point3D(mushx,mushy,mushz);
				firstFlamea.MoveToWorld( mushxyz, Caster.Map );
         	
			InternalItem firstFlamec = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X;
				mushy=loc.Y-3;
				mushz=loc.Z;
				Point3D mushxyzb = new Point3D(mushx,mushy,mushz);
         	firstFlamec.MoveToWorld( mushxyzb, Caster.Map );
         	
InternalItem firstFlamed = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+2;
				mushy=loc.Y-2;
				mushz=loc.Z;
				Point3D mushxyzc = new Point3D(mushx,mushy,mushz);
				firstFlamed.MoveToWorld( mushxyzc, Caster.Map );
         	
         	InternalItem hiddenflame = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+2;
				mushy=loc.Y-1;
				mushz=loc.Z;
				Point3D mushxyzhid = new Point3D(mushx,mushy,mushz);
				hiddenflame.MoveToWorld( mushxyzhid, Caster.Map );
         	InternalItem hiddenrock = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+2;
				mushy=loc.Y+1;
				mushz=loc.Z;
				Point3D rockaxyz = new Point3D(mushx,mushy,mushz);
				hiddenrock.MoveToWorld( rockaxyz, Caster.Map );
         	InternalItem hiddenflamea = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-2;
				mushy=loc.Y-1;
				mushz=loc.Z;
				Point3D mushxyzhida = new Point3D(mushx,mushy,mushz);
				hiddenflamea.MoveToWorld( mushxyzhida, Caster.Map );
         	InternalItem hiddenrocks = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-2;
				mushy=loc.Y+1;
				mushz=loc.Z;
				Point3D rocksaxyz = new Point3D(mushx,mushy,mushz);
				hiddenrocks.MoveToWorld( rocksaxyz, Caster.Map );
         	InternalItem hiddenrocka = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+1;
				mushy=loc.Y+2;
				mushz=loc.Z;
				Point3D rockbxyz = new Point3D(mushx,mushy,mushz);
				hiddenrocka.MoveToWorld( rockbxyz, Caster.Map );
         	InternalItem hiddenrockb = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+1;
				mushy=loc.Y-2;
				mushz=loc.Z;
				Point3D rockcxyz = new Point3D(mushx,mushy,mushz);
				hiddenrockb.MoveToWorld( rockcxyz, Caster.Map );
         	InternalItem hiddenrockc = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-1;
				mushy=loc.Y-2;
				mushz=loc.Z;
				Point3D rockdxyz = new Point3D(mushx,mushy,mushz);
				hiddenrockc.MoveToWorld( rockdxyz, Caster.Map );
         	InternalItem hiddenrockd = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-1;
				mushy=loc.Y+2;
				mushz=loc.Z;
				Point3D rockexyz = new Point3D(mushx,mushy,mushz);
				hiddenrockd.MoveToWorld( rockexyz, Caster.Map );
InternalItem firstFlamee = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+3;
				mushy=loc.Y;
				mushz=loc.Z;
				Point3D mushxyzd = new Point3D(mushx,mushy,mushz);
				firstFlamee.MoveToWorld( mushxyzd, Caster.Map );
InternalItem firstFlamef = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X+2;
				mushy=loc.Y+2;
				mushz=loc.Z;
				Point3D mushxyze = new Point3D(mushx,mushy,mushz);
				firstFlamef.MoveToWorld( mushxyze, Caster.Map );
InternalItem firstFlameg = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X;
				mushy=loc.Y+3;
				mushz=loc.Z;
				Point3D mushxyzf = new Point3D(mushx,mushy,mushz);
				firstFlameg.MoveToWorld( mushxyzf, Caster.Map );
         	InternalItem firstFlameh = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-2;
				mushy=loc.Y+2;
				mushz=loc.Z;
				Point3D mushxyzg = new Point3D(mushx,mushy,mushz);
				firstFlameh.MoveToWorld( mushxyzg, Caster.Map );
         		InternalItem firstFlamei = new InternalItem( Caster.Location, Caster.Map, Caster );
				mushx=loc.X-3;
				mushy=loc.Y;
				mushz=loc.Z;
				Point3D mushxyzh = new Point3D(mushx,mushy,mushz);
				firstFlamei.MoveToWorld( mushxyzh, Caster.Map );


            	
            	
            	

              
            }
         

         FinishSequence();
      }
Beispiel #20
0
        public void Effect(Point3D loc, Map map, bool checkMulti, bool isboatkey = false)
        {
            if (Factions.Sigil.ExistsOn(this.Caster))
            {
                this.Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (map == null || (!Core.AOS && this.Caster.Map != map))
            {
                this.Caster.SendLocalizedMessage(1005570); // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(this.Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(this.Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (map == Map.Felucca && this.Caster is PlayerMobile && ((PlayerMobile)this.Caster).Young)
            {
                this.Caster.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
            }
            else if (this.Caster.Kills >= 5 && map != Map.Felucca)
            {
                this.Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }
            else if (this.Caster.Criminal)
            {
                this.Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily.
            }
            else if (SpellHelper.CheckCombat(this.Caster))
            {
                this.Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
            }
            else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z) && !isboatkey)
            {
                this.Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)) && !isboatkey)
            {
                this.Caster.SendLocalizedMessage(501942);                                                                  // That location is blocked.
            }
            else if (Core.SE && (this.GateExistsAt(map, loc) || this.GateExistsAt(this.Caster.Map, this.Caster.Location))) // SE restricted stacking gates
            {
                this.Caster.SendLocalizedMessage(1071242);                                                                 // There is already a gate there.
            }
            else if (Server.Engines.CityLoyalty.CityTradeSystem.HasTrade(Caster))
            {
                Caster.SendLocalizedMessage(1151733); // You cannot do that while carrying a Trade Order.
            }
            else if (this.CheckSequence())
            {
                this.Caster.SendLocalizedMessage(501024); // You open a magical gate to another location

                Effects.PlaySound(this.Caster.Location, this.Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(this.Caster.Location, this.Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(this.Caster.Location, this.Caster.Map);
                secondGate.MoveToWorld(loc, map);

                firstGate.LinkedGate  = secondGate;
                secondGate.LinkedGate = firstGate;

                firstGate.BoatGate  = BaseBoat.FindBoatAt(firstGate, firstGate.Map) != null;
                secondGate.BoatGate = BaseBoat.FindBoatAt(secondGate, secondGate.Map) != null;
            }

            this.FinishSequence();
        }
Beispiel #21
0
        public void Effect(Point3D loc, Map map, bool checkMulti, bool isboatkey = false)
        {
            if (Server.Engines.VvV.VvVSigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (map == null)
            {
                Caster.SendLocalizedMessage(1005570); // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young)
            {
                Caster.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
            }
            else if (SpellHelper.RestrictRedTravel && Caster.Murderer && map.Rules != MapRules.FeluccaRules && !Siege.SiegeShard)
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z) && !isboatkey)
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)) && !isboatkey)
            {
                Caster.SendLocalizedMessage(501942);                                      // That location is blocked.
            }
            else if (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location)) // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage(1071242);                                     // There is already a gate there.
            }
            else if (Engines.CityLoyalty.CityTradeSystem.HasTrade(Caster))
            {
                Caster.SendLocalizedMessage(1151733); // You cannot do that while carrying a Trade Order.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);

                if (SpellHelper.CheckMulti(Caster.Location, Caster.Map))
                {
                    /*secondGate.Target = Point3D.Zero;
                     * secondGate.TargetMap = null;*/
                    secondGate.MultiDestination = true;
                    secondGate.Hue = 0x3B2;
                    Caster.LocalOverheadMessage(MessageType.Emote, 0x3B2, false, "The strength imbued in this structure prevents the summoning of a return gate. If you go in, you will not be able to return.");
                }

                secondGate.MoveToWorld(loc, map);
            }

            FinishSequence();
        }
Beispiel #22
0
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                if (this.Scroll != null)
                {
                    Scroll.Consume();
                }
                SpellHelper.Turn(Caster, p);

                SpellHelper.GetSurfaceTop(ref p);

                Effects.PlaySound(p, Caster.Map, 0x1DD);

                Point3D loc = new Point3D(p.X, p.Y, p.Z);
                int     mushx;
                int     mushy;
                int     mushz;

                InternalItem firstFlamea = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D mushxyz = new Point3D(mushx, mushy, mushz);
                firstFlamea.MoveToWorld(mushxyz, Caster.Map);

                InternalItem firstFlamec = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X;
                mushy = loc.Y - 3;
                mushz = loc.Z;
                Point3D mushxyzb = new Point3D(mushx, mushy, mushz);
                firstFlamec.MoveToWorld(mushxyzb, Caster.Map);

                InternalItem firstFlamed = new InternalItem(Caster.Location, Caster.Map, Caster);
                firstFlamed.ItemID = 0x3709;
                mushx = loc.X + 2;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D mushxyzc = new Point3D(mushx, mushy, mushz);
                firstFlamed.MoveToWorld(mushxyzc, Caster.Map);
                InternalItem firstFlamee = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 3;
                firstFlamee.ItemID = 0x3709;
                mushy = loc.Y;
                mushz = loc.Z;
                Point3D mushxyzd = new Point3D(mushx, mushy, mushz);
                firstFlamee.MoveToWorld(mushxyzd, Caster.Map);
                InternalItem firstFlamef = new InternalItem(Caster.Location, Caster.Map, Caster);
                firstFlamef.ItemID = 0x3709;
                mushx = loc.X + 2;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D mushxyze = new Point3D(mushx, mushy, mushz);
                firstFlamef.MoveToWorld(mushxyze, Caster.Map);
                InternalItem firstFlameg = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X;
                firstFlameg.ItemID = 0x3709;
                mushy = loc.Y + 3;
                mushz = loc.Z;
                Point3D mushxyzf = new Point3D(mushx, mushy, mushz);
                firstFlameg.MoveToWorld(mushxyzf, Caster.Map);
                InternalItem firstFlameh = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                firstFlameh.ItemID = 0x3709;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D mushxyzg = new Point3D(mushx, mushy, mushz);
                firstFlameh.MoveToWorld(mushxyzg, Caster.Map);
                InternalItem firstFlamei = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 3;
                firstFlamei.ItemID = 0x3709;
                mushy = loc.Y;
                mushz = loc.Z;
                Point3D mushxyzh = new Point3D(mushx, mushy, mushz);
                firstFlamei.MoveToWorld(mushxyzh, Caster.Map);
            }

            FinishSequence();
        }
Beispiel #23
0
        public override void OnDoubleClick(Mobile from)
        {
            bool inCombat = (from.Combatant != null && from.InRange(from.Combatant.Location, 20) && from.Combatant.InLOS(from));

            CharacterDatabase DB = Server.Items.CharacterDatabase.GetDB(from);

            int CanUseTent = 0;

            if (from.Skills[SkillName.Camping].Value < 40)
            {
                from.SendMessage("You must be a novice explorer to use this tent.");
                return;
            }
            else if (from.Region.IsPartOf(typeof(PublicRegion)))
            {
                from.SendMessage("This is a really nice camping tent.");
                return;
            }
            else if (Server.Misc.Worlds.IsOnBoat(from))
            {
                from.SendMessage("You cannot setup this tent near a boat.");
                return;
            }
            else if (Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map))
            {
                from.SendMessage("You don't have anywhere to setup camp in this strange place.");
                return;
            }
            else if (inCombat)
            {
                from.SendMessage("You cannot setup a tent while in combat.");
                return;
            }
            else if ((from.Region.IsPartOf(typeof(BardDungeonRegion)) || from.Region.IsPartOf(typeof(DungeonRegion))) && from.Skills[SkillName.Camping].Value >= 90)
            {
                CanUseTent = 1;
            }
            else if (from.Skills[SkillName.Camping].Value < 90 &&
                     !Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) &&
                     !from.Region.IsPartOf(typeof(OutDoorRegion)) &&
                     !from.Region.IsPartOf(typeof(OutDoorBadRegion)) &&
                     !from.Region.IsPartOf(typeof(VillageRegion)))
            {
                from.SendMessage("You are only skilled enough to use this tent outdoors.");
                return;
            }
            else if (from.Skills[SkillName.Camping].Value >= 90 &&
                     !from.Region.IsPartOf(typeof(DungeonRegion)) &&
                     !from.Region.IsPartOf(typeof(BardDungeonRegion)) &&
                     !Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) &&
                     !from.Region.IsPartOf(typeof(OutDoorRegion)) &&
                     !from.Region.IsPartOf(typeof(OutDoorBadRegion)) &&
                     !from.Region.IsPartOf(typeof(VillageRegion)))
            {
                from.SendMessage("You can only use this tent outdoors or in dungeons.");
                return;
            }
            else
            {
                CanUseTent = 1;
            }

            if (CanUseTent > 0 && from.CheckSkill(SkillName.Camping, 0.0, 125.0))
            {
                if (IsChildOf(from.Backpack) && Charges > 0)
                {
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    ConsumeCharge(from);

                    PlayerMobile pc    = (PlayerMobile)from;
                    string       sX    = from.X.ToString();
                    string       sY    = from.Y.ToString();
                    string       sZ    = from.Z.ToString();
                    string       sMap  = Worlds.GetMyMapString(from.Map);
                    string       sZone = "the Camping Tent";
                    if (from.Region.IsPartOf(typeof(DungeonRegion)) || from.Region.IsPartOf(typeof(BardDungeonRegion)))
                    {
                        sZone = "the Dungeon Room";
                    }

                    string doors = sX + "#" + sY + "#" + sZ + "#" + sMap + "#" + sZone;

                    DB.CharacterPublicDoor = doors;

                    Point3D loc = new Point3D(3709, 3974, 0);
                    if (from.Region.IsPartOf(typeof(DungeonRegion)))
                    {
                        loc = new Point3D(3686, 3330, 0);
                    }
                    else if (from.Region.IsPartOf(typeof(BardDungeonRegion)))
                    {
                        loc = new Point3D(3686, 3330, 0);
                    }
                    else if (from.Skills[SkillName.Camping].Value > 66)
                    {
                        loc = new Point3D(3790, 3966, 0);
                    }

                    TentTeleport(from, loc, Map.Trammel, 0x057, sZone, "enter");
                    return;
                }
                else if (from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
                {
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    from.CheckSkill(SkillName.Camping, 0, 125);
                    ConsumeCharge(from);

                    PlayerMobile pc    = (PlayerMobile)from;
                    string       sX    = from.X.ToString();
                    string       sY    = from.Y.ToString();
                    string       sZ    = from.Z.ToString();
                    string       sMap  = Worlds.GetMyMapString(from.Map);
                    string       sZone = "the Camping Tent";
                    if (from.Region.IsPartOf(typeof(DungeonRegion)) || from.Region.IsPartOf(typeof(BardDungeonRegion)))
                    {
                        sZone = "the Dungeon Room";
                    }

                    string doors = sX + "#" + sY + "#" + sZ + "#" + sMap + "#" + sZone;

                    DB.CharacterPublicDoor = doors;

                    Point3D loc = new Point3D(3709, 3974, 0);
                    if (from.Region.IsPartOf(typeof(DungeonRegion)))
                    {
                        loc = new Point3D(3686, 3330, 0);
                    }
                    else if (from.Region.IsPartOf(typeof(BardDungeonRegion)))
                    {
                        loc = new Point3D(3686, 3330, 0);
                    }
                    else if (from.Skills[SkillName.Camping].Value > 66)
                    {
                        loc = new Point3D(3790, 3966, 0);
                    }

                    InternalItem builtTent = new InternalItem();
                    builtTent.Name = "camping tent";
                    PublicDoor publicTent = (PublicDoor)builtTent;
                    publicTent.m_PointDest = loc;
                    publicTent.m_MapDest   = Map.Trammel;
                    builtTent.MoveToWorld(this.Location, this.Map);
                    from.AddToBackpack(this);

                    TentTeleport(from, loc, Map.Trammel, 0x057, sZone, "enter");
                    return;
                }
                else if (!from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
                {
                    from.SendLocalizedMessage(502138);                       // That is too far away for you to use
                    return;
                }
                else
                {
                    from.SendMessage("This tent is too worn from over use, and is no longer of any good.");
                    this.Delete();
                    return;
                }
            }
            else if (CanUseTent > 0)
            {
                from.SendMessage("Your tent is a bit more worn out as you fail to set it up properly.");
                from.CheckSkill(SkillName.Camping, 0, 125);
                from.CheckSkill(SkillName.Camping, 0, 125);
                from.CheckSkill(SkillName.Camping, 0, 125);
                ConsumeCharge(from);

                if (Charges < 1)
                {
                    from.SendMessage("This tent is too worn from over use, and is no longer of any good.");
                    this.Delete();
                    return;
                }

                return;
            }
        }
           public void Target( IPoint3D p )
      {
         if ( !Caster.CanSee( p ) )
         {
            Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
         }
         else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
         {
         		if(this.Scroll!=null)
				Scroll.Consume();
            SpellHelper.Turn( Caster, p );

            SpellHelper.GetSurfaceTop( ref p );


            Effects.PlaySound( p, Caster.Map, 0x2 );

            
               Point3D loc = new Point3D( p.X, p.Y, p.Z );
               	int grovex;
				int grovey;
				int grovez;
					InternalItem groveStone = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X;
				grovey=loc.Y;
				grovez=loc.Z;
         	groveStone.ItemID=0x08E3;
         	groveStone.Name="sacred stone";
				Point3D stonexyz = new Point3D(grovex,grovey,grovez);
				groveStone.MoveToWorld( stonexyz, Caster.Map );

              	InternalItem grovea = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-2;
				grovey=loc.Y-2;
				grovez=loc.Z;
         	grovea.ItemID=3290;
				Point3D grovexyz = new Point3D(grovex,grovey,grovez);
				grovea.MoveToWorld( grovexyz, Caster.Map );
         	
			InternalItem grovec = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X;
				grovey=loc.Y-3;
				grovez=loc.Z;
         	grovec.ItemID=3293;
				Point3D grovexyzb = new Point3D(grovex,grovey,grovez);
         	grovec.MoveToWorld( grovexyzb, Caster.Map );
         	
InternalItem groved = new InternalItem( Caster.Location, Caster.Map, Caster );
				groved.ItemID=3290;
				grovex=loc.X+2;
				grovey=loc.Y-2;
				grovez=loc.Z;
				Point3D grovexyzc = new Point3D(grovex,grovey,grovez);
				groved.MoveToWorld( grovexyzc, Caster.Map );
InternalItem grovee = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X+3;
				grovee.ItemID=3290;
				grovey=loc.Y;
				grovez=loc.Z;
				Point3D grovexyzd = new Point3D(grovex,grovey,grovez);
				grovee.MoveToWorld( grovexyzd, Caster.Map );
InternalItem grovef = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovef.ItemID=3293;
				grovex=loc.X+2;
				grovey=loc.Y+2;
				grovez=loc.Z;
				Point3D grovexyze = new Point3D(grovex,grovey,grovez);
				grovef.MoveToWorld( grovexyze, Caster.Map );
InternalItem groveg = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X;
				groveg.ItemID=3290;
				grovey=loc.Y+3;
				grovez=loc.Z;
				Point3D grovexyzf = new Point3D(grovex,grovey,grovez);
				groveg.MoveToWorld( grovexyzf, Caster.Map );
         	InternalItem groveh = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-2;
				groveh.ItemID=3293;
				grovey=loc.Y+2;
				grovez=loc.Z;
				Point3D grovexyzg = new Point3D(grovex,grovey,grovez);
				groveh.MoveToWorld( grovexyzg, Caster.Map );
         		InternalItem grovei = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-3;
				grovei.ItemID=3293;
				grovey=loc.Y;
				grovez=loc.Z;
				Point3D grovexyzh = new Point3D(grovex,grovey,grovez);
				grovei.MoveToWorld( grovexyzh, Caster.Map );
         		InternalItem leavesa = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-2;
				grovey=loc.Y-2;
				grovez=loc.Z;
				leavesa.ItemID=3291;
				Point3D leafxyz = new Point3D(grovex,grovey,grovez);
				leavesa.MoveToWorld( leafxyz, Caster.Map );
         	
			InternalItem leavesc = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X;
				grovey=loc.Y-3;
				grovez=loc.Z;
				leavesc.ItemID=3294;
				Point3D leafxyzb = new Point3D(grovex,grovey,grovez);
         	leavesc.MoveToWorld( leafxyzb, Caster.Map );
         	
InternalItem leavesd = new InternalItem( Caster.Location, Caster.Map, Caster );
				leavesd.ItemID=3291;
				grovex=loc.X+2;
				grovey=loc.Y-2;
				grovez=loc.Z;
				Point3D leafxyzc = new Point3D(grovex,grovey,grovez);
				leavesd.MoveToWorld( leafxyzc, Caster.Map );
InternalItem leavese = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X+3;
				leavese.ItemID=3291;
				grovey=loc.Y;
				grovez=loc.Z;
				Point3D leafxyzd = new Point3D(grovex,grovey,grovez);
				leavese.MoveToWorld( leafxyzd, Caster.Map );
InternalItem leavesf = new InternalItem( Caster.Location, Caster.Map, Caster );
				leavesf.ItemID=3294;
				grovex=loc.X+2;
				grovey=loc.Y+2;
				grovez=loc.Z;
				Point3D leafxyze = new Point3D(grovex,grovey,grovez);
				leavesf.MoveToWorld( leafxyze, Caster.Map );
InternalItem leavesg = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X;
				leavesg.ItemID=3291;
				grovey=loc.Y+3;
				grovez=loc.Z;
				Point3D leafxyzf = new Point3D(grovex,grovey,grovez);
				leavesg.MoveToWorld( leafxyzf, Caster.Map );
         	InternalItem leavesh = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-2;
				leavesh.ItemID=3294;
				grovey=loc.Y+2;
				grovez=loc.Z;
				Point3D leafxyzg = new Point3D(grovex,grovey,grovez);
				leavesh.MoveToWorld( leafxyzg, Caster.Map );
         		InternalItem leavesi = new InternalItem( Caster.Location, Caster.Map, Caster );
				grovex=loc.X-3;
				leavesi.ItemID=3294;
				grovey=loc.Y;
				grovez=loc.Z;
				Point3D leafxyzh = new Point3D(grovex,grovey,grovez);
				leavesi.MoveToWorld( leafxyzh, Caster.Map );

            	
            	
            	

              
            }
         

         FinishSequence();
      }
Beispiel #25
0
		public void Effect(Point3D loc, Map map, bool checkMulti)
		{
			var champregion = Region.Find(loc, map).GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion;

			if (Sigil.ExistsOn(Caster))
			{
				Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
			}
			else if (map == null || (!Caster.EraAOS && Caster.Map != map))
			{
				Caster.SendLocalizedMessage(1005570); // You can not gate to another facet.
			}
			else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
			{ }
			else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
			{ }
				//else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young )
				//{
				//	Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
				//}
				//else if ( Caster.Kills >= Mobile.MurderCount && map != Map.Felucca )
				//{
				//	Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
				//}
			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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
			{
				Caster.SendLocalizedMessage(501942); // That location is blocked.
			}
			else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
			{
				Caster.SendLocalizedMessage(501942); // That location is blocked.
			}
			else if ((!Caster.Alive || (Caster is PlayerMobile && ((PlayerMobile)Caster).Young)) && champregion != null &&
					 !champregion.CanSpawn())
			{
				Caster.SendLocalizedMessage(501942); // That location is blocked.
			}
            else if ((Region.Find(loc, map).IsPartOf(typeof(GuardedRegion))) && Caster.InCombat(TimeSpan.FromSeconds(60.0)) && Caster.Kills >= 5 && Faction.Find(Caster) != null && Caster.AccessLevel == AccessLevel.Player)
            {
                Caster.SendMessage(54, "You cannot enter town as a murderer and having recently been in combat!");
            }
			else if ( /*Core.SE &&*/ (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location)))
				// SE restricted stacking gates
			{
				Caster.SendLocalizedMessage(1071242); // There is already a gate there.
			}
			else if (CheckSequence())
			{
				Caster.SendLocalizedMessage(501024); // You open a magical gate to another location

				Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

				var firstGate = new InternalItem(loc, map);
				firstGate.MoveToWorld(Caster.Location, Caster.Map);

				Effects.PlaySound(loc, map, 0x20E);

				var secondGate = new InternalItem(Caster.Location, Caster.Map);
				secondGate.MoveToWorld(loc, map);

				firstGate.Link = secondGate;
				secondGate.Link = firstGate;
			}

			FinishSequence();
		}
Beispiel #26
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (Factions.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(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            //else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young )
            //{
            //	Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
            //}
            //else if ( Caster.Kills >= Mobile.MurderCount && map != Map.Felucca )
            //{
            //	Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
            //}
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                                                   // That location is blocked.
            }
            else if (Core.SE && (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location))) // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage(1071242);                                                  // There is already a gate there.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                InternalItem firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);

                firstGate.Link  = secondGate;
                secondGate.Link = firstGate;
            }

            FinishSequence();
        }
        public virtual void DoTeleport(Mobile m, Point3D loc, Map map)
        {
            if (Charges >= 1)
            {
                m.SendLocalizedMessage(501024); // You open a magical gate to another location

                Effects.PlaySound(m.Location, m.Map, 0x20E);

                var firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(m.Location, m.Map);

                Effects.PlaySound(loc, map, 0x20E);

                Charges--;
            }
            else
            {
                m.SendMessage(54, "The crystal portal needs more charges. Add charges to it by double clicking the crystal.");
            }
        }
Beispiel #28
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (m_Book != null && m_Book.CurCharges <= 0 && m_Scroll != null)
            {
                Caster.SendLocalizedMessage(502412); // There are no charges left on that item.
            }
            else if (CheckSequence())
            {
                /*if (m_Entry != null && m_Book != null && m_Scroll == null)
                 *  --m_Entry.ChargesLeft;
                 * else */
                if (SphereSpellTarget is RecallRune)
                {
                    RecallRune rune = (RecallRune)SphereSpellTarget;

                    if (rune.ChargesLeft > 0)
                    {
                        --rune.ChargesLeft;
                    }
                    else if (rune.ChargesLeft == 0)
                    {
                        FinishSequence();
                        return;
                    }
                }
                else if (SphereSpellTarget is Runebook)
                {
                    RunebookEntry e = ((Runebook)SphereSpellTarget).Default;

                    /*if (e.ChargesLeft > 0)
                     *  --e.ChargesLeft;
                     * else*/
                    if (e.ChargesLeft == 0)
                    {
                        FinishSequence();
                        return;
                    }
                }

                CustomRegion cR;
                ISpell       markSpell = new Sixth.MarkSpell(Caster, null);

                if ((cR = Caster.Region as CustomRegion) != null && cR.Controller.IsRestrictedSpell(this))
                {
                    Caster.SendAsciiMessage("You can't gate here.");
                }
                else if (Region.Find(loc, map) is HouseRegion || ((cR = Region.Find(loc, map) as CustomRegion) != null && (cR.Controller.IsRestrictedSpell(this) || cR.Controller.IsRestrictedSpell(markSpell))))
                {
                    Caster.SendAsciiMessage("You can't gate to that spot.");
                }
                else
                {
                    InternalItem firstGate  = new InternalItem(loc, map);
                    InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);

                    firstGate.MoveToWorld(Caster.Location, Caster.Map);
                    Effects.PlaySound(Caster.Location, Caster.Map, Sound);
                    secondGate.MoveToWorld(loc, map);
                    Effects.PlaySound(loc, map, Sound);
                }
            }

            FinishSequence();
        }
Beispiel #29
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (Caster.Kills >= 5 && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendMessage("The clouds open a magical gate to another place");                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x482);
                int gravx;
                int gravy;
                int gravz;


                InternalItem firstGatea = new InternalItem(loc, map);                   //Top Middle item
                gravx             = Caster.X - 1;
                gravy             = Caster.Y - 1;
                gravz             = Caster.Z;
                firstGatea.ItemID = 14138;
                firstGatea.Hue    = 1174;
                Point3D gravxyz = new Point3D(gravx, gravy, gravz);
                firstGatea.MoveToWorld(gravxyz, Caster.Map);
                InternalItem firstGateb = new InternalItem(loc, map);
                gravx             = Caster.X;
                gravy             = Caster.Y;
                firstGateb.ItemID = 6899;               //Moongate
                firstGateb.Hue    = 1153;
                gravz             = Caster.Z;
                Point3D gravxyza = new Point3D(gravx, gravy, gravz);
                firstGateb.MoveToWorld(gravxyza, Caster.Map);
                InternalItem firstGatec = new InternalItem(loc, map);
                gravx             = Caster.X - 1;
                firstGatec.ItemID = 14138;
                firstGatec.Hue    = 1174;
                gravy             = Caster.Y + 1;
                gravz             = Caster.Z;
                Point3D gravxyzb = new Point3D(gravx, gravy, gravz);
                firstGatec.MoveToWorld(gravxyzb, Caster.Map);
                InternalItem firstGateg = new InternalItem(loc, map);
                gravx             = Caster.X + 1;
                firstGateg.ItemID = 14138;
                firstGateg.Hue    = 1174;
                gravy             = Caster.Y - 1;
                gravz             = Caster.Z;
                Point3D gravxyzf = new Point3D(gravx, gravy, gravz);
                firstGateg.MoveToWorld(gravxyzf, Caster.Map);
                InternalItem firstGatee = new InternalItem(loc, map);
                gravx             = Caster.X + 1;
                firstGatee.ItemID = 14170;
                firstGatee.Hue    = 1174;
                gravy             = Caster.Y + 1;
                gravz             = Caster.Z;
                Point3D gravxyzd = new Point3D(gravx, gravy, gravz);
                firstGatee.MoveToWorld(gravxyzd, Caster.Map);

                //Effects.PlaySound( loc, map, 0x482 );
                Caster.PlaySound(0x212);
                Caster.PlaySound(0x206);

                InternalItem secondGatea = new InternalItem(Caster.Location, Caster.Map);
                gravx = loc.X - 1;
                gravy = loc.Y - 1;
                gravz = loc.Z;
                secondGatea.ItemID = 14138;
                secondGatea.Hue    = 1151;
                Point3D gravaxyz = new Point3D(gravx, gravy, gravz);
                secondGatea.MoveToWorld(gravaxyz, map);
                InternalItem secondGateb = new InternalItem(Caster.Location, Caster.Map);
                gravx = loc.X;
                gravy = loc.Y;
                secondGateb.ItemID = 6899;               //Moongate
                secondGateb.Hue    = 1153;
                gravz = loc.Z;
                Point3D gravaxyza = new Point3D(gravx, gravy, gravz);
                secondGateb.MoveToWorld(gravaxyza, map);
                InternalItem secondGatec = new InternalItem(Caster.Location, Caster.Map);
                gravx = loc.X - 1;
                secondGatec.ItemID = 14138;
                secondGatec.Hue    = 1151;
                gravy = loc.Y + 1;
                gravz = loc.Z;
                Point3D gravaxyzb = new Point3D(gravx, gravy, gravz);
                secondGatec.MoveToWorld(gravaxyzb, map);
                InternalItem secondGatee = new InternalItem(Caster.Location, Caster.Map);
                gravx = loc.X + 1;
                gravy = loc.Y + 1;
                gravz = loc.Z;
                secondGatee.ItemID = 14138;
                secondGatee.Hue    = 1151;
                Point3D gravaxyzd = new Point3D(gravx, gravy, gravz);
                secondGatee.MoveToWorld(gravaxyzd, map);
                InternalItem secondGateg = new InternalItem(Caster.Location, Caster.Map);
                gravx = loc.X + 1;
                secondGateg.ItemID = 14138;
                secondGateg.Hue    = 1151;
                gravy = loc.Y - 1;
                gravz = loc.Z;
                Point3D gravaxyzf = new Point3D(gravx, gravy, gravz);
                secondGateg.MoveToWorld(gravaxyzf, map);
            }

            FinishSequence();
        }
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(Caster, WarpBlockerTotem.MovementMode.GateIn, loc, map);

            if (recallBlocker != null)
            {
                if (recallBlocker.PreventGateOutResponse != "")
                {
                    Caster.SendMessage(recallBlocker.PreventGateOutResponse);
                }

                else
                {
                    Caster.SendMessage(WarpBlockerTotem.DefaultGateOutResponse);
                }
            }

            else if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
                Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
            }
            else if (map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            else if (Caster.MurderCounts >= Mobile.MurderCountsRequiredForMurderer && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            else if (!SpellHelper.CheckIfOK(Caster.Map, loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (SpellHelper.IsSolenHiveLoc(loc))
            {
                Caster.SendLocalizedMessage(501802);                   // Thy spell doth not appear to work...
            }
            else if (SpellHelper.IsStarRoom(loc))
            {
                Caster.SendLocalizedMessage(501802);                   // Thy spell doth not appear to work...
            }
            else if (SpellHelper.IsWindLoc(Caster.Location))
            {
                Caster.SendLocalizedMessage(501802);                   // Thy spell doth not appear to work...
            }
            else if (SpellHelper.IsWindLoc(loc))
            {
                Caster.SendLocalizedMessage(501802);                   // Thy spell doth not appear to work...
            }
            else if (BaseShip.FindShipAt(loc, map) != null)
            {
                Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
            }
            else if (m_RuneTome != null && m_RuneTome.GateCharges <= 0)
            {
                Caster.SendMessage("There are no gate charges left on that item.");
            }

            else if (CheckSequence() && CheckCast())
            {
                if (m_RuneTome != null)
                {
                    --m_RuneTome.GateCharges;
                }

                Caster.SendLocalizedMessage(501024);                   // You open a magical gate to another location

                //Player Enhancement Customization: Traveler
                bool traveler = false; //PlayerEnhancementPersistance.IsCustomizationEntryActive(Caster, CustomizationType.Traveler);

                if (traveler)
                {
                    //First Gate
                    Effects.PlaySound(Caster.Location, Caster.Map, 0x5CE);
                    Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, TimeSpan.FromSeconds(0.5)), 6899, 10, 30, 0, 0, 5029, 0);

                    InternalItem firstGate = new InternalItem(loc, map);
                    firstGate.Visible = false;
                    firstGate.MoveToWorld(Caster.Location, Caster.Map);

                    //Second Gate
                    Effects.PlaySound(loc, map, 0x5CE);
                    Effects.SendLocationParticles(EffectItem.Create(loc, map, TimeSpan.FromSeconds(0.5)), 6899, 10, 30, 0, 0, 5029, 0);

                    InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                    secondGate.Visible = false;
                    secondGate.MoveToWorld(loc, map);

                    Timer.DelayCall(TimeSpan.FromSeconds(1.25), delegate
                    {
                        if (firstGate != null)
                        {
                            if (!firstGate.Deleted)
                            {
                                firstGate.Visible = true;
                            }
                        }

                        if (secondGate != null)
                        {
                            if (!secondGate.Deleted)
                            {
                                secondGate.Visible = true;
                            }
                        }
                    });
                }

                else
                {
                    Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                    InternalItem firstGate = new InternalItem(loc, map);
                    firstGate.MoveToWorld(Caster.Location, Caster.Map);

                    Effects.PlaySound(loc, map, 0x20E);

                    InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);
                    secondGate.MoveToWorld(loc, map);
                }
            }

            FinishSequence();
        }
Beispiel #31
0
        public override void OnDoubleClick(Mobile from)
        {
            string GoToWorld = Worlds.GetMyWorld(m_MapDest, m_PointDest, m_PointDest.X, m_PointDest.Y);

            bool CanUseMap = false;

            if (GoToWorld == "the Land of Sosaria")
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Island of Umber Veil" && CharacterDatabase.GetDiscovered(from, "the Island of Umber Veil"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Land of Ambrosia" && CharacterDatabase.GetDiscovered(from, "the Land of Ambrosia"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Land of Lodoria" && CharacterDatabase.GetDiscovered(from, "the Land of Lodoria"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Serpent Island" && CharacterDatabase.GetDiscovered(from, "the Serpent Island"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Isles of Dread" && CharacterDatabase.GetDiscovered(from, "the Isles of Dread"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Savaged Empire" && CharacterDatabase.GetDiscovered(from, "the Savaged Empire"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Bottle World of Kuldar" && CharacterDatabase.GetDiscovered(from, "the Bottle World of Kuldar"))
            {
                CanUseMap = true;
            }

            if (from.Skills[SkillName.Tracking].Value < 80 && from.Skills[SkillName.Cartography].Value < 80)
            {
                from.SendMessage("You must be a adept ranger or cartographer to use this map.");
                return;
            }
            else if (from.Region.IsPartOf(typeof(BardTownRegion)) ||
                     from.Region.IsPartOf(typeof(BardDungeonRegion)))
            {
                from.SendMessage("This won't lead you out of this place.");
                return;
            }
            else if (!Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) &&
                     !from.Region.IsPartOf(typeof(OutDoorRegion)) &&
                     !from.Region.IsPartOf(typeof(OutDoorBadRegion)) &&
                     !from.Region.IsPartOf(typeof(VillageRegion)) &&
                     !from.Region.IsPartOf(typeof(PublicRegion)))
            {
                from.SendMessage("You can only use this map outdoors.");
                return;
            }
            else if (CanUseMap == false)
            {
                from.SendMessage("Not knowing how to get to this world, you throw the map away.");
                this.Delete();
                return;
            }
            else if (IsChildOf(from.Backpack) && Charges > 0)
            {
                ConsumeCharge(from);
                MapTeleport(from, m_PointDest, m_MapDest);
                return;
            }
            else if (from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
            {
                ConsumeCharge(from);
                InternalItem builtMap = new InternalItem();
                builtMap.Name   = this.Name;
                builtMap.ItemID = this.ItemID;
                MapRangerDoor rangerDoor = (MapRangerDoor)builtMap;
                rangerDoor.m_PointDest = m_PointDest;
                rangerDoor.m_MapDest   = m_MapDest;
                builtMap.MoveToWorld(this.Location, this.Map);
                from.AddToBackpack(this);
                MapTeleport(from, m_PointDest, m_MapDest);
            }
            else if (!from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
            {
                from.SendLocalizedMessage(502138);                   // That is too far away for you to use
                return;
            }
            else
            {
                from.SendMessage("This map is too worn from over use, and is no longer of any good.");
                this.Delete();
                return;
            }
        }
Beispiel #32
0
        public WraithJailEffect(PlayerMobile prisoner, PlayerMobile jailor)
        {
            m_jailor   = jailor;
            m_prisoner = prisoner;
            ((Mobile)m_prisoner).CantWalk  = true;
            ((Mobile)m_prisoner).Squelched = true;
            Effects.PlaySound(jailor.Location, jailor.Map, 0x1DD);

            Point3D loc = new Point3D(prisoner.X, prisoner.Y, prisoner.Z);
            int     mushx;
            int     mushy;
            int     mushz;


            InternalItem firstFlamea = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X - 2;
            mushy = loc.Y - 2;
            mushz = loc.Z;
            Point3D mushxyz = new Point3D(mushx, mushy, mushz);

            firstFlamea.MoveToWorld(mushxyz, prisoner.Map);

            InternalItem firstFlamec = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X;
            mushy = loc.Y - 3;
            mushz = loc.Z;
            Point3D mushxyzb = new Point3D(mushx, mushy, mushz);

            firstFlamec.MoveToWorld(mushxyzb, prisoner.Map);

            InternalItem firstFlamed = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            firstFlamed.ItemID = 0x3709;
            mushx = loc.X + 2;
            mushy = loc.Y - 2;
            mushz = loc.Z;
            Point3D mushxyzc = new Point3D(mushx, mushy, mushz);

            firstFlamed.MoveToWorld(mushxyzc, prisoner.Map);
            InternalItem firstFlamee = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X + 3;
            firstFlamee.ItemID = 0x3709;
            mushy = loc.Y;
            mushz = loc.Z;
            Point3D mushxyzd = new Point3D(mushx, mushy, mushz);

            firstFlamee.MoveToWorld(mushxyzd, prisoner.Map);
            InternalItem firstFlamef = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            firstFlamef.ItemID = 0x3709;
            mushx = loc.X + 2;
            mushy = loc.Y + 2;
            mushz = loc.Z;
            Point3D mushxyze = new Point3D(mushx, mushy, mushz);

            firstFlamef.MoveToWorld(mushxyze, prisoner.Map);
            InternalItem firstFlameg = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X;
            firstFlameg.ItemID = 0x3709;
            mushy = loc.Y + 3;
            mushz = loc.Z;
            Point3D mushxyzf = new Point3D(mushx, mushy, mushz);

            firstFlameg.MoveToWorld(mushxyzf, prisoner.Map);
            InternalItem firstFlameh = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X - 2;
            firstFlameh.ItemID = 0x3709;
            mushy = loc.Y + 2;
            mushz = loc.Z;
            Point3D mushxyzg = new Point3D(mushx, mushy, mushz);

            firstFlameh.MoveToWorld(mushxyzg, prisoner.Map);
            InternalItem firstFlamei = new InternalItem(prisoner.Location, prisoner.Map, jailor);

            mushx = loc.X - 3;
            firstFlamei.ItemID = 0x3709;
            mushy = loc.Y;
            mushz = loc.Z;
            Point3D mushxyzh = new Point3D(mushx, mushy, mushz);

            firstFlamei.MoveToWorld(mushxyzh, prisoner.Map);
            new JailWraith(this, prisoner.X + 15, prisoner.Y + 15, m_jailor);
        }
Beispiel #33
0
        public void Target( IPoint3D p )
        {
            if ( !Caster.CanSee( p ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
            {
                if(this.Scroll!=null)
                    Scroll.Consume();
                SpellHelper.Turn( Caster, p );
                SpellHelper.GetSurfaceTop( ref p );
                Effects.PlaySound( p, Caster.Map, 0x474 );

                Point3D loc = new Point3D( p.X, p.Y, p.Z );
                int mushx;
                int mushy;
                int mushz;
                InternalItem firstFlamea = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X-2;
                mushy=loc.Y-2;
                mushz=loc.Z;
                Point3D mushxyz = new Point3D(mushx,mushy,mushz);
                firstFlamea.MoveToWorld( mushxyz, Caster.Map );
                firstFlamea.ItemID = 3267;
                InternalItem firstFlamec = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X;
                mushy=loc.Y-3;
                mushz=loc.Z;
                Point3D mushxyzb = new Point3D(mushx,mushy,mushz);
                firstFlamec.MoveToWorld( mushxyzb, Caster.Map );
                firstFlamec.ItemID = 3267;
                InternalItem firstFlamed = new InternalItem( Caster.Location, Caster.Map, Caster );
                firstFlamed.ItemID = 3267;
                mushx=loc.X+2;
                mushy=loc.Y-2;
                mushz=loc.Z;
                Point3D mushxyzc = new Point3D(mushx,mushy,mushz);
                firstFlamed.MoveToWorld( mushxyzc, Caster.Map );
                InternalItem firstFlamee = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X+3;
                firstFlamee.ItemID = 3267;
                mushy=loc.Y;
                mushz=loc.Z;
                Point3D mushxyzd = new Point3D(mushx,mushy,mushz);
                firstFlamee.MoveToWorld( mushxyzd, Caster.Map );
                InternalItem firstFlamef = new InternalItem( Caster.Location, Caster.Map, Caster );
                firstFlamef.ItemID = 3267;
                mushx=loc.X+2;
                mushy=loc.Y+2;
                mushz=loc.Z;
                Point3D mushxyze = new Point3D(mushx,mushy,mushz);
                firstFlamef.MoveToWorld( mushxyze, Caster.Map );
                InternalItem firstFlameg = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X;
                firstFlameg.ItemID = 3267;
                mushy=loc.Y+3;
                mushz=loc.Z;
                Point3D mushxyzf = new Point3D(mushx,mushy,mushz);
                firstFlameg.MoveToWorld( mushxyzf, Caster.Map );
                InternalItem firstFlameh = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X-2;
                firstFlameh.ItemID = 3267;
                mushy=loc.Y+2;
                mushz=loc.Z;
                Point3D mushxyzg = new Point3D(mushx,mushy,mushz);
                firstFlameh.MoveToWorld( mushxyzg, Caster.Map );
                InternalItem firstFlamei = new InternalItem( Caster.Location, Caster.Map, Caster );
                mushx=loc.X-3;
                firstFlamei.ItemID = 3267;
                mushy=loc.Y;
                mushz=loc.Z;
                Point3D mushxyzh = new Point3D(mushx,mushy,mushz);
                firstFlamei.MoveToWorld( mushxyzh, Caster.Map );
            }
            FinishSequence();
        }
Beispiel #34
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (m_Book != null && m_Book.CurCharges <= 0 && m_Scroll != null)
            {
                Caster.SendLocalizedMessage(502412); // There are no charges left on that item.
            }
            else if (CheckSequence())
            {
                /*if (m_Entry != null && m_Book != null && m_Scroll == null)
                    --m_Entry.ChargesLeft;
                else */
                if (SphereSpellTarget is RecallRune)
                {
                    RecallRune rune = (RecallRune)SphereSpellTarget;

                    if (rune.ChargesLeft > 0)
                        --rune.ChargesLeft;
                    else if (rune.ChargesLeft == 0)
                    {
                        FinishSequence();
                        return;
                    }
                }
                else if (SphereSpellTarget is Runebook)
                {
                    RunebookEntry e = ((Runebook)SphereSpellTarget).Default;

                    /*if (e.ChargesLeft > 0)
                        --e.ChargesLeft;
                    else*/
                    if (e.ChargesLeft == 0)
                    {
                        FinishSequence();
                        return;
                    }
                }

                CustomRegion cR;
                ISpell markSpell = new Sixth.MarkSpell(Caster, null); 
                
                if ((cR = Caster.Region as CustomRegion) != null && cR.Controller.IsRestrictedSpell(this))
                    Caster.SendAsciiMessage("You can't gate here.");
                else if (Region.Find(loc, map) is HouseRegion || ((cR = Region.Find(loc, map) as CustomRegion) != null && (cR.Controller.IsRestrictedSpell(this) || cR.Controller.IsRestrictedSpell(markSpell))))
                    Caster.SendAsciiMessage("You can't gate to that spot.");
                else
                {
                    InternalItem firstGate = new InternalItem(loc, map);
                    InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map);

                    firstGate.MoveToWorld(Caster.Location, Caster.Map);
                    Effects.PlaySound(Caster.Location, Caster.Map, Sound);
                    secondGate.MoveToWorld(loc, map);
                    Effects.PlaySound(loc, map, Sound);
                }
            }

            FinishSequence();
        }
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                SpellHelper.Turn(Caster, p);

                SpellHelper.GetSurfaceTop(ref p);

                Effects.PlaySound(p, Caster.Map, 0x222);

                Point3D loc = new Point3D(p.X, p.Y, p.Z);
                int     mushx;
                int     mushy;
                int     mushz;

                InternalItem firstFlamea = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D mushxyz = new Point3D(mushx, mushy, mushz);
                firstFlamea.MoveToWorld(mushxyz, Caster.Map);

                InternalItem firstFlamec = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X;
                mushy = loc.Y - 3;
                mushz = loc.Z;
                Point3D mushxyzb = new Point3D(mushx, mushy, mushz);
                firstFlamec.MoveToWorld(mushxyzb, Caster.Map);

                InternalItem firstFlamed = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 2;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D mushxyzc = new Point3D(mushx, mushy, mushz);
                firstFlamed.MoveToWorld(mushxyzc, Caster.Map);

                InternalItem hiddenflame = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 2;
                mushy = loc.Y - 1;
                mushz = loc.Z;
                Point3D mushxyzhid = new Point3D(mushx, mushy, mushz);
                hiddenflame.MoveToWorld(mushxyzhid, Caster.Map);
                InternalItem hiddenrock = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 2;
                mushy = loc.Y + 1;
                mushz = loc.Z;
                Point3D rockaxyz = new Point3D(mushx, mushy, mushz);
                hiddenrock.MoveToWorld(rockaxyz, Caster.Map);
                InternalItem hiddenflamea = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                mushy = loc.Y - 1;
                mushz = loc.Z;
                Point3D mushxyzhida = new Point3D(mushx, mushy, mushz);
                hiddenflamea.MoveToWorld(mushxyzhida, Caster.Map);
                InternalItem hiddenrocks = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                mushy = loc.Y + 1;
                mushz = loc.Z;
                Point3D rocksaxyz = new Point3D(mushx, mushy, mushz);
                hiddenrocks.MoveToWorld(rocksaxyz, Caster.Map);
                InternalItem hiddenrocka = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 1;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D rockbxyz = new Point3D(mushx, mushy, mushz);
                hiddenrocka.MoveToWorld(rockbxyz, Caster.Map);
                InternalItem hiddenrockb = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 1;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D rockcxyz = new Point3D(mushx, mushy, mushz);
                hiddenrockb.MoveToWorld(rockcxyz, Caster.Map);
                InternalItem hiddenrockc = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 1;
                mushy = loc.Y - 2;
                mushz = loc.Z;
                Point3D rockdxyz = new Point3D(mushx, mushy, mushz);
                hiddenrockc.MoveToWorld(rockdxyz, Caster.Map);
                InternalItem hiddenrockd = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 1;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D rockexyz = new Point3D(mushx, mushy, mushz);
                hiddenrockd.MoveToWorld(rockexyz, Caster.Map);
                InternalItem firstFlamee = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 3;
                mushy = loc.Y;
                mushz = loc.Z;
                Point3D mushxyzd = new Point3D(mushx, mushy, mushz);
                firstFlamee.MoveToWorld(mushxyzd, Caster.Map);
                InternalItem firstFlamef = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X + 2;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D mushxyze = new Point3D(mushx, mushy, mushz);
                firstFlamef.MoveToWorld(mushxyze, Caster.Map);
                InternalItem firstFlameg = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X;
                mushy = loc.Y + 3;
                mushz = loc.Z;
                Point3D mushxyzf = new Point3D(mushx, mushy, mushz);
                firstFlameg.MoveToWorld(mushxyzf, Caster.Map);
                InternalItem firstFlameh = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 2;
                mushy = loc.Y + 2;
                mushz = loc.Z;
                Point3D mushxyzg = new Point3D(mushx, mushy, mushz);
                firstFlameh.MoveToWorld(mushxyzg, Caster.Map);
                InternalItem firstFlamei = new InternalItem(Caster.Location, Caster.Map, Caster);
                mushx = loc.X - 3;
                mushy = loc.Y;
                mushz = loc.Z;
                Point3D mushxyzh = new Point3D(mushx, mushy, mushz);
                firstFlamei.MoveToWorld(mushxyzh, Caster.Map);
            }

            FinishSequence();
        }
Beispiel #36
0
		public void Effect( Point3D loc, Map map, bool checkMulti )
		{
			if( map == null || (!Core.AOS && Caster.Map != map) )
			{
				Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
			}
			else if( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
			{
			}
			else if( !SpellHelper.CheckTravel( Caster, map, loc, TravelCheckType.GateTo ) )
			{
			}

			else if( Caster.Kills >= 5 && map != Map.Felucca )
			{
				Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
			}
			else if( SpellHelper.CheckCombat( Caster ) )
			{
				Caster.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
			}
			else if( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if( CheckSequence() )
			{
				Caster.PublicOverheadMessage( Server.Network.MessageType.Regular, Caster.EmoteHue, true, "*slashes through the air, cutting through the fabric of space and time itself*" );

				Effects.PlaySound( Caster.Location, Caster.Map, 476 );

				InternalItem firstGate = new InternalItem( loc, map );
				firstGate.Hue = 1;
				firstGate.MoveToWorld( Caster.Location, Caster.Map );

				Effects.PlaySound( loc, map, 476 );

				InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
				secondGate.Hue = 1;
				secondGate.MoveToWorld( loc, map );
			}

			FinishSequence();
		}
Beispiel #37
0
        public void Effect( Point3D loc, Map map, bool checkMulti )
        {
            if( map == null || (Core.AOS && Caster.Map != map) )
            {
                Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
            }
            else if( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
            {
            }
            else if( !SpellHelper.CheckTravel( Caster, map, loc, TravelCheckType.GateTo ) )
            {
            }
            else if( Caster.Kills >= 5 && map != Map.Felucca )
            {
                Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
            }
            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 if( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
            //{
            //    Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            //}
            //else if( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            //{
            //    Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            //}
            else if ( Core.AOS && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there.
            }
            else if( CheckSequence() )
            {
                Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location

                Effects.PlaySound( Caster.Location, Caster.Map, 0x20E );

                InternalItem firstGate = new InternalItem( loc, map );
                firstGate.MoveToWorld( Caster.Location, Caster.Map );

                Effects.PlaySound( loc, map, 0x20E );

                InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
                secondGate.MoveToWorld( loc, map );

                ((Moongate)firstGate).PairedGate = secondGate;
                ((Moongate)secondGate).PairedGate = firstGate;
            }

            FinishSequence();
        }
		public void Effect( Point3D loc, Map map, bool checkMulti )
		{
			if ( map == null || (!Core.AOS && Caster.Map != map) )
			{
				Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
			}
			else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
			{
			}
			else if ( !SpellHelper.CheckTravel( Caster,  map, loc, TravelCheckType.GateTo ) )
			{
			}
			else if ( Caster.Kills >= 5 && map != Map.Felucca )
			{
				Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
			}
			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 if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if ( CheckSequence() )
			{
				Caster.SendMessage( "You open a mystical portal in a mushroom circle" ); // You open a magical gate to another location

				Effects.PlaySound( Caster.Location, Caster.Map, 0x1 );
				int mushx;
				int mushy;
				int mushz;
				
				
				InternalItem firstGatea = new InternalItem( loc, map );
				mushx=Caster.X;
				mushy=Caster.Y;
				mushz=Caster.Z;
				firstGatea.ItemID=0xD10;
				Point3D mushxyz = new Point3D(mushx,mushy,mushz);
				firstGatea.MoveToWorld( mushxyz, Caster.Map );
				InternalItem firstGateb = new InternalItem( loc, map );
				mushx=Caster.X;
				mushy=Caster.Y;
				firstGateb.ItemID=0x373A;
				mushz=Caster.Z+1;
				Point3D mushxyza = new Point3D(mushx,mushy,mushz);
				firstGateb.MoveToWorld( mushxyza, Caster.Map );
				InternalItem firstGatec = new InternalItem( loc, map );
				mushx=Caster.X-1;
				firstGatec.ItemID=0xD11;
				mushy=Caster.Y+1;
				mushz=Caster.Z;
				Point3D mushxyzb = new Point3D(mushx,mushy,mushz);
				firstGatec.MoveToWorld( mushxyzb, Caster.Map );
InternalItem firstGated = new InternalItem( loc, map);
				firstGated.ItemID=0xD0C;
				mushx=Caster.X;
				mushy=Caster.Y+2;
				mushz=Caster.Z;
				Point3D mushxyzc = new Point3D(mushx,mushy,mushz);
				firstGated.MoveToWorld( mushxyzc, Caster.Map );
InternalItem firstGatee = new InternalItem( loc, map );
				mushx=Caster.X+1;
				firstGatee.ItemID=0xD0D;
				mushy=Caster.Y+1;
				mushz=Caster.Z;
				Point3D mushxyzd = new Point3D(mushx,mushy,mushz);
				firstGatee.MoveToWorld( mushxyzd, Caster.Map );
InternalItem firstGatef = new InternalItem( loc, map );
				firstGatef.ItemID=0xD0E;
				mushx=Caster.X+2;
				mushy=Caster.Y;
				mushz=Caster.Z;
				Point3D mushxyze = new Point3D(mushx,mushy,mushz);
				firstGatef.MoveToWorld( mushxyze, Caster.Map );
InternalItem firstGateg = new InternalItem( loc, map );
				mushx=Caster.X+1;
				firstGateg.ItemID=0xD0F;
				
				mushy=Caster.Y-1;
				mushz=Caster.Z;
				Point3D mushxyzf = new Point3D(mushx,mushy,mushz);
				firstGateg.MoveToWorld( mushxyzf, Caster.Map );



				Effects.PlaySound( loc, map, 0x1 );

					InternalItem secondGatea = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X;
				mushy=loc.Y;
				mushz=loc.Z;
				secondGatea.ItemID=0xD10;
				
				Point3D mushaxyz = new Point3D(mushx,mushy,mushz);
				secondGatea.MoveToWorld( mushaxyz, map);
				InternalItem secondGateb = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X;
				mushy=loc.Y;
				secondGateb.ItemID=0x373A;
				mushz=loc.Z+1;
				Point3D mushaxyza = new Point3D(mushx,mushy,mushz);
				secondGateb.MoveToWorld( mushaxyza, map);
				InternalItem secondGatec = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X-1;
				secondGatec.ItemID=0xD11;
				mushy=loc.Y+1;
				mushz=loc.Z-1;
				Point3D mushaxyzb = new Point3D(mushx,mushy,mushz);
				secondGatec.MoveToWorld( mushaxyzb, map);
InternalItem secondGated = new InternalItem( Caster.Location, Caster.Map);
				mushx=loc.X;
				mushy=loc.Y+2;
								secondGated.ItemID=0xD0C;
				mushz=loc.Z;
				Point3D mushaxyzc = new Point3D(mushx,mushy,mushz);
				secondGated.MoveToWorld( mushaxyzc, map);
InternalItem secondGatee = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X+1;
				mushy=loc.Y+1;
				mushz=loc.Z;
								secondGatee.ItemID=0xD0D;
				Point3D mushaxyzd = new Point3D(mushx,mushy,mushz);
				secondGatee.MoveToWorld( mushaxyzd, map);
InternalItem secondGatef = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X+2;
				mushy=loc.Y;
				mushz=loc.Z;
								secondGatef.ItemID=0xD0E;
				Point3D mushaxyze = new Point3D(mushx,mushy,mushz);
				secondGatef.MoveToWorld( mushaxyze, map);
InternalItem secondGateg = new InternalItem( Caster.Location, Caster.Map );
				mushx=loc.X+1;
								secondGateg.ItemID=0xD0F;
				mushy=loc.Y-1;
				mushz=loc.Z;
				Point3D mushaxyzf = new Point3D(mushx,mushy,mushz);
				secondGateg.MoveToWorld( mushaxyzf, map);
			}

			FinishSequence();
		}
Beispiel #39
0
		public void Effect( Point3D loc, Map map, bool checkMulti )
		{
			if ( Factions.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( 1005570 ); // You can not gate to another facet.
			}
			else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) )
			{
			}
			else if ( !SpellHelper.CheckTravel( Caster,  map, loc, TravelCheckType.GateTo ) )
			{
			}
			else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young )
			{
				Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
			}
			else if ( Caster.Kills >= 5 && map != Map.Felucca )
			{
				Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
			}
			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 if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
			{
				Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
			}
			else if ( Core.SE && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates
			{
				Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there.
			}
			else if ( CheckSequence() )
			{
				Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location

				Effects.PlaySound( Caster.Location, Caster.Map, 0x20E );

				InternalItem firstGate = new InternalItem( loc, map );
				firstGate.MoveToWorld( Caster.Location, Caster.Map );

				Effects.PlaySound( loc, map, 0x20E );

				InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
				secondGate.MoveToWorld( loc, map );
			}

			FinishSequence();
		}
Beispiel #40
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            var champregion = Region.Find(loc, map).GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion;

            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632);                 // You can't do that while carrying the sigil.
            }
            else if (map == null || (!Caster.EraAOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                 // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            //else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young )
            //{
            //	Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
            //}
            //else if ( Caster.Kills >= Mobile.MurderCount && map != Map.Felucca )
            //{
            //	Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
            //}
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if ((!Caster.Alive || (Caster is PlayerMobile && ((PlayerMobile)Caster).Young)) && champregion != null &&
                     !champregion.CanSpawn())
            {
                Caster.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if ((Region.Find(loc, map).IsPartOf(typeof(GuardedRegion))) && Caster.InCombat(TimeSpan.FromSeconds(60.0)) && Caster.Kills >= 5 && Faction.Find(Caster) != null && Caster.AccessLevel == AccessLevel.Player)
            {
                Caster.SendMessage(54, "You cannot enter town as a murderer and having recently been in combat!");
            }
            else if (/*Core.SE &&*/ (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location)))
            // SE restricted stacking gates
            {
                Caster.SendLocalizedMessage(1071242);                 // There is already a gate there.
            }
            else if (CheckSequence())
            {
                Caster.SendLocalizedMessage(501024);                 // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x20E);

                var firstGate = new InternalItem(loc, map);
                firstGate.MoveToWorld(Caster.Location, Caster.Map);

                Effects.PlaySound(loc, map, 0x20E);

                var secondGate = new InternalItem(Caster.Location, Caster.Map);
                secondGate.MoveToWorld(loc, map);

                firstGate.Link  = secondGate;
                secondGate.Link = firstGate;
            }

            FinishSequence();
        }
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005570);                   // You can not gate to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo))
            {
            }
            else if (Caster.Kills >= 5 && map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004);                   // You are not allowed to travel there.
            }
            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 if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if ((checkMulti && SpellHelper.CheckMulti(loc, map)))
            {
                Caster.SendLocalizedMessage(501942);                   // That location is blocked.
            }
            else if (CheckSequence())
            {
                Caster.SendMessage("You open a mystical portal in a mushroom circle");                   // You open a magical gate to another location

                Effects.PlaySound(Caster.Location, Caster.Map, 0x1);
                int mushx;
                int mushy;
                int mushz;


                InternalItem firstGatea = new InternalItem(loc, map);
                mushx             = Caster.X;
                mushy             = Caster.Y;
                mushz             = Caster.Z;
                firstGatea.ItemID = 0xD10;
                Point3D mushxyz = new Point3D(mushx, mushy, mushz);
                firstGatea.MoveToWorld(mushxyz, Caster.Map);
                InternalItem firstGateb = new InternalItem(loc, map);
                mushx             = Caster.X;
                mushy             = Caster.Y;
                firstGateb.ItemID = 0x373A;
                mushz             = Caster.Z + 1;
                Point3D mushxyza = new Point3D(mushx, mushy, mushz);
                firstGateb.MoveToWorld(mushxyza, Caster.Map);
                InternalItem firstGatec = new InternalItem(loc, map);
                mushx             = Caster.X - 1;
                firstGatec.ItemID = 0xD11;
                mushy             = Caster.Y + 1;
                mushz             = Caster.Z;
                Point3D mushxyzb = new Point3D(mushx, mushy, mushz);
                firstGatec.MoveToWorld(mushxyzb, Caster.Map);
                InternalItem firstGated = new InternalItem(loc, map);
                firstGated.ItemID = 0xD0C;
                mushx             = Caster.X;
                mushy             = Caster.Y + 2;
                mushz             = Caster.Z;
                Point3D mushxyzc = new Point3D(mushx, mushy, mushz);
                firstGated.MoveToWorld(mushxyzc, Caster.Map);
                InternalItem firstGatee = new InternalItem(loc, map);
                mushx             = Caster.X + 1;
                firstGatee.ItemID = 0xD0D;
                mushy             = Caster.Y + 1;
                mushz             = Caster.Z;
                Point3D mushxyzd = new Point3D(mushx, mushy, mushz);
                firstGatee.MoveToWorld(mushxyzd, Caster.Map);
                InternalItem firstGatef = new InternalItem(loc, map);
                firstGatef.ItemID = 0xD0E;
                mushx             = Caster.X + 2;
                mushy             = Caster.Y;
                mushz             = Caster.Z;
                Point3D mushxyze = new Point3D(mushx, mushy, mushz);
                firstGatef.MoveToWorld(mushxyze, Caster.Map);
                InternalItem firstGateg = new InternalItem(loc, map);
                mushx             = Caster.X + 1;
                firstGateg.ItemID = 0xD0F;

                mushy = Caster.Y - 1;
                mushz = Caster.Z;
                Point3D mushxyzf = new Point3D(mushx, mushy, mushz);
                firstGateg.MoveToWorld(mushxyzf, Caster.Map);



                Effects.PlaySound(loc, map, 0x1);

                InternalItem secondGatea = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X;
                mushy = loc.Y;
                mushz = loc.Z;
                secondGatea.ItemID = 0xD10;

                Point3D mushaxyz = new Point3D(mushx, mushy, mushz);
                secondGatea.MoveToWorld(mushaxyz, map);
                InternalItem secondGateb = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X;
                mushy = loc.Y;
                secondGateb.ItemID = 0x373A;
                mushz = loc.Z + 1;
                Point3D mushaxyza = new Point3D(mushx, mushy, mushz);
                secondGateb.MoveToWorld(mushaxyza, map);
                InternalItem secondGatec = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X - 1;
                secondGatec.ItemID = 0xD11;
                mushy = loc.Y + 1;
                mushz = loc.Z - 1;
                Point3D mushaxyzb = new Point3D(mushx, mushy, mushz);
                secondGatec.MoveToWorld(mushaxyzb, map);
                InternalItem secondGated = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X;
                mushy = loc.Y + 2;
                secondGated.ItemID = 0xD0C;
                mushz = loc.Z;
                Point3D mushaxyzc = new Point3D(mushx, mushy, mushz);
                secondGated.MoveToWorld(mushaxyzc, map);
                InternalItem secondGatee = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X + 1;
                mushy = loc.Y + 1;
                mushz = loc.Z;
                secondGatee.ItemID = 0xD0D;
                Point3D mushaxyzd = new Point3D(mushx, mushy, mushz);
                secondGatee.MoveToWorld(mushaxyzd, map);
                InternalItem secondGatef = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X + 2;
                mushy = loc.Y;
                mushz = loc.Z;
                secondGatef.ItemID = 0xD0E;
                Point3D mushaxyze = new Point3D(mushx, mushy, mushz);
                secondGatef.MoveToWorld(mushaxyze, map);
                InternalItem secondGateg = new InternalItem(Caster.Location, Caster.Map);
                mushx = loc.X + 1;
                secondGateg.ItemID = 0xD0F;
                mushy = loc.Y - 1;
                mushz = loc.Z;
                Point3D mushaxyzf = new Point3D(mushx, mushy, mushz);
                secondGateg.MoveToWorld(mushaxyzf, map);
            }

            FinishSequence();
        }
        public WraithJailEffect(PlayerMobile prisoner, PlayerMobile jailor)
        {
            m_jailor = jailor;
            m_prisoner = prisoner;
            ((Mobile)m_prisoner).CantWalk = true;
            ((Mobile)m_prisoner).Squelched = true;
            Effects.PlaySound(jailor.Location, jailor.Map, 0x1DD);

            Point3D loc = new Point3D(prisoner.X, prisoner.Y, prisoner.Z);
            int mushx;
            int mushy;
            int mushz;


            InternalItem firstFlamea = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X - 2;
            mushy = loc.Y - 2;
            mushz = loc.Z;
            Point3D mushxyz = new Point3D(mushx, mushy, mushz);
            firstFlamea.MoveToWorld(mushxyz, prisoner.Map);

            InternalItem firstFlamec = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X;
            mushy = loc.Y - 3;
            mushz = loc.Z;
            Point3D mushxyzb = new Point3D(mushx, mushy, mushz);
            firstFlamec.MoveToWorld(mushxyzb, prisoner.Map);

            InternalItem firstFlamed = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            firstFlamed.ItemID = 0x3709;
            mushx = loc.X + 2;
            mushy = loc.Y - 2;
            mushz = loc.Z;
            Point3D mushxyzc = new Point3D(mushx, mushy, mushz);
            firstFlamed.MoveToWorld(mushxyzc, prisoner.Map);
            InternalItem firstFlamee = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X + 3;
            firstFlamee.ItemID = 0x3709;
            mushy = loc.Y;
            mushz = loc.Z;
            Point3D mushxyzd = new Point3D(mushx, mushy, mushz);
            firstFlamee.MoveToWorld(mushxyzd, prisoner.Map);
            InternalItem firstFlamef = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            firstFlamef.ItemID = 0x3709;
            mushx = loc.X + 2;
            mushy = loc.Y + 2;
            mushz = loc.Z;
            Point3D mushxyze = new Point3D(mushx, mushy, mushz);
            firstFlamef.MoveToWorld(mushxyze, prisoner.Map);
            InternalItem firstFlameg = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X;
            firstFlameg.ItemID = 0x3709;
            mushy = loc.Y + 3;
            mushz = loc.Z;
            Point3D mushxyzf = new Point3D(mushx, mushy, mushz);
            firstFlameg.MoveToWorld(mushxyzf, prisoner.Map);
            InternalItem firstFlameh = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X - 2;
            firstFlameh.ItemID = 0x3709;
            mushy = loc.Y + 2;
            mushz = loc.Z;
            Point3D mushxyzg = new Point3D(mushx, mushy, mushz);
            firstFlameh.MoveToWorld(mushxyzg, prisoner.Map);
            InternalItem firstFlamei = new InternalItem(prisoner.Location, prisoner.Map, jailor);
            mushx = loc.X - 3;
            firstFlamei.ItemID = 0x3709;
            mushy = loc.Y;
            mushz = loc.Z;
            Point3D mushxyzh = new Point3D(mushx, mushy, mushz);
            firstFlamei.MoveToWorld(mushxyzh, prisoner.Map);
            new JailWraith(this, prisoner.X + 15, prisoner.Y + 15, m_jailor);
        }