예제 #1
0
        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();
        }
예제 #2
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            PlayerMobile pm = Caster as PlayerMobile;

            BaseShip ship = BaseShip.FindShipAt(loc, map);

            WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(Caster, WarpBlockerTotem.MovementMode.RecallIn, loc, map);

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

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

            else if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005569); // You can not recall to another facet.
            }
            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.RecallTo))
            {
                Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
            }
            else if (SpellHelper.IsAnyT2A(map, loc) && pm != null)
            {
            }

            else if (Server.Misc.WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
            }
            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(1019004); // You are not allowed to travel there.
            }
            else if (SpellHelper.IsStarRoom(loc))
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }
            else if (SpellHelper.IsWindLoc(loc))
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }
            else if (ship != null && ship.Owner != Caster)
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }
            else if ((m_Book != null && m_Book.CurCharges <= 0) || (m_RuneTome != null && m_RuneTome.RecallCharges <= 0))
            {
                Caster.SendMessage("There are no recall charges left on that item.");
            }

            else if (CheckSequence())
            {
                if (m_Book != null)
                {
                    --m_Book.CurCharges;
                }

                if (m_RuneTome != null)
                {
                    --m_RuneTome.RecallCharges;
                }

                Point3D sourceLocation = Caster.Location;
                Map     sourceMap      = Caster.Map;

                Point3D targetLocation = loc;
                Map     targetMap      = map;

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

                if (phaseShift)
                {
                    Caster.MoveToWorld(loc, map);

                    Effects.PlaySound(sourceLocation, sourceMap, 0x1FC);
                    Effects.SendLocationEffect(sourceLocation, sourceMap, 0x3967, 30, 15, 2499, 0);

                    Effects.PlaySound(targetLocation, targetMap, 0x1FC);
                    Effects.SendLocationEffect(targetLocation, targetMap, 0x3967, 30, 15, 2499, 0);
                }

                else
                {
                    Caster.PlaySound(0x1FC);
                    Caster.MoveToWorld(loc, map);
                    Caster.PlaySound(0x1FC);
                }
            }

            FinishSequence();
        }
예제 #3
0
        public void Effect(Point3D loc, Map map, bool checkMulti)
        {
            PlayerMobile pm = Caster as PlayerMobile;

            BaseBoat boat = BaseBoat.FindBoatAt(loc, map);

            WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(Caster, WarpBlockerTotem.MovementMode.RecallIn, loc, map);

            if (recallBlocker != null)
            {
                if (recallBlocker.PreventRecallInResponse != "")
                {
                    Caster.SendMessage(recallBlocker.PreventRecallInResponse);
                }
                else
                {
                    Caster.SendMessage(WarpBlockerTotem.DefaultRecallInResponse);
                }
            }

            else if (map == null || (!Core.AOS && Caster.Map != map))
            {
                Caster.SendLocalizedMessage(1005569);                   // You can not recall to another facet.
            }

            else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.RecallTo))
            {
                Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
            }

            else if (SpellHelper.IsAnyT2A(map, loc) && pm != null)
            {
            }

            else if (Server.Misc.WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
            }

            else if (map != Map.Felucca)
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }

            else if (Caster.ShortTermMurders >= 5 && 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(1019004); // You are not allowed to travel there.
            }

            else if (SpellHelper.IsStarRoom(loc))
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }

            else if (SpellHelper.IsWindLoc(loc))
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }

            else if (boat != null && boat.Owner != Caster)
            {
                Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
            }

            else if (m_Book != null && m_Book.CurCharges <= 0)
            {
                Caster.SendLocalizedMessage(502412); // There are no charges left on that item.
            }

            else if (CheckSequence())
            {
                if (m_Book != null)
                {
                    --m_Book.CurCharges;
                }

                var astralLeash = Caster.Backpack.FindItemByType <AstralLeash>();
                if (astralLeash != null && !astralLeash.Deleted && astralLeash.CanConsume() && Caster.Followers > 0)
                {
                    if (BaseCreature.TeleportPets(Caster, loc, map, false))
                    {
                        astralLeash.Consume();
                    }
                }

                Point3D sourceLocation = Caster.Location;
                Map     sourceMap      = Caster.Map;

                Point3D targetLocation = loc;
                Map     targetMap      = map;

                //Player Enhancement Customization: PhaseShift
                bool phaseShift = PlayerEnhancementPersistance.IsCustomizationEntryActive(Caster, CustomizationType.PhaseShift);

                if (phaseShift)
                {
                    Caster.MoveToWorld(loc, map);

                    Effects.PlaySound(sourceLocation, sourceMap, 0x1FC);
                    Effects.SendLocationEffect(sourceLocation, sourceMap, 0x3967, 30, 15, 2499, 0);

                    Effects.PlaySound(targetLocation, targetMap, 0x1FC);
                    Effects.SendLocationEffect(targetLocation, targetMap, 0x3967, 30, 15, 2499, 0);
                }

                else
                {
                    Caster.PlaySound(0x1FC);
                    Caster.MoveToWorld(loc, map);
                    Caster.PlaySound(0x1FC);
                }
            }

            FinishSequence();
        }