MoveToWorld() public méthode

public MoveToWorld ( Point3D loc, Map map ) : void
loc Point3D
map Map
Résultat void
Exemple #1
0
        private void Teleport()
        {
            System.Collections.Generic.List <PlayerMobile> toTele = SpellHelper.AcquireIndirectTargets(this, Location, Map, StrikingRange).OfType <PlayerMobile>().ToList();

            if (toTele.Count > 0)
            {
                PlayerMobile from = toTele[Utility.Random(toTele.Count)];

                if (from != null)
                {
                    Combatant = from;

                    from.MoveToWorld(GetSpawnPosition(1), Map);
                    from.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                    from.PlaySound(0x1FE);

                    from.ApplyPoison(this, HitPoison);
                }
            }

            ColUtility.Free(toTele);
            m_Teleport = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(40, 60));
        }
Exemple #2
0
        public static void JailPlayer( PlayerMobile criminal, JailCell cell, TimeSpan length, string reason, PlayerMobile jailer )
        {
            Point3D jailedFromPoint = criminal.Location;
            Map jailedFromMap = criminal.Map;

            if ( Settings.AutoSquelch && !criminal.Squelched )
            {
                criminal.Squelched = true;
                criminal.SendMessage( "You have been squelched." );
            }

            if ( criminal.Mounted )
            {
                if ( criminal.Mount is BaseMount )
                {
                    BaseMount pet = (BaseMount)criminal.Mount;
                    pet.Rider = null;
                    StablePet( criminal, pet );
                }
            }

            foreach ( Mobile mobile in World.Mobiles.Values )
            {
                if ( mobile is BaseCreature )
                {
                    BaseCreature creature = (BaseCreature)mobile;

                    if ( creature.Controlled && creature.ControlMaster == criminal )
                    {
                        StablePet( criminal, creature );
                    }
                }
            }

            criminal.MoveToWorld( GetCellLocation( cell ), Settings.SendToMap );

            JailedPlayers.Add( new JailedPlayer( criminal, jailedFromPoint, jailedFromMap, length, jailer.Name, reason ) );

            criminal.SendGump( new JailInfoGump( jailer.Name, length, reason ) );

            criminal.SendMessage( String.Format( "You have been jailed by {0} for {1} day{2}, {3} hour{4}, and {5} minute{6}.",
                criminal == jailer ? "yourself" : jailer.Name,
                length.Days, length.Days == 1 ? "" : "s",
                length.Hours, length.Hours == 1 ? "" : "s",
                length.Minutes, length.Minutes == 1 ? "" : "s" ) );
            criminal.SendMessage( String.Format( "Reason: {0}", reason ) );

            WriteLine( String.Format( "{0} has been jailed for {1} day{2}, {3} hour{4}, and {5} minute{6} for {7} by {8}.",
                criminal.Name,
                length.Days, length.Days == 1 ? "" : "s",
                length.Hours, length.Hours == 1 ? "" : "s",
                length.Minutes, length.Minutes == 1 ? "" : "s",
                reason,
                jailer.Name ) );
        }
		public static void FreeThem( PlayerMobile player )
		{
			if ( null == player )
				return;

			// Take away any JailRock
			// No need to recurse containers since all their items were removed when jailed
			RemoveRockFromList( new ArrayList( player.Items ) ); 
			RemoveRockFromList( new ArrayList( player.Backpack.Items ) ); 

			// Restore their access level
			JailHammer hammer = player.FindItemOnLayer( Layer.OneHanded ) as JailHammer;

			if ( null != hammer )
			{
				player.AccessLevel = hammer.PlayerAccessLevel;
				hammer.Delete();
			}

			if ( player.Kills >= 5 )
				player.MoveToWorld( JailConfig.FreeMurdererLocation, JailConfig.FreeMurdererMap );
			else
				player.MoveToWorld( JailConfig.FreeLocation, JailConfig.FreeMap );
			player.SendMessage( "You have been released from Jail!" );
		}
		public void AddParticipant (PlayerMobile participant)
		{
			if (participant != null && !m_Participants.Contains(participant))
			{
				m_Participants.Add(participant);
				int startloc = Utility.RandomMinMax(0, m_StartLocations.Count-1);
				participant.MoveToWorld((Point3D)m_StartLocations[startloc], this.Map);
				participant.SendMessage("You joined the Bomber Man Game.");

				if (m_AutoStart && FreePlayerSlots == 0)
					this.StartGame(null);

			}
		}
Exemple #5
0
        public static void DoStep( PlayerMobile pm )
        {
            switch ( pm.KRStartingQuestStep )
            {
                case 0:
                    {
                        pm.MoveToWorld( new Point3D( 3503, 2574, 14 ), Map.Trammel );

                        break;
                    }
                case 1:
                    {
                        pm.MoveToWorld( new Point3D( 3648, 2678, -2 ), Map.Trammel );

                        /*
                         * Introduction
                         *
                         * Greetings, Traveler! Welcome to
                         * the world of Ultima Online.
                         *
                         * I am Gwen. I am here to help
                         * you learn the basic skills
                         * needed to thrive in your travels
                         * to come.
                         *
                         * Left click on the Next button
                         * to continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078606, 1077642, true ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 2:
                    {
                        /*
                         * Movement
                         *
                         * Movement is controlled with the mouse.
                         *
                         * Do you see the glowing light?
                         *
                         * Right click and hold over it
                         * to walk in that direction.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077643, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2674, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 3:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2666, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078267 ) ); // Run Toward Here

                        /*
                         * Movement
                         *
                         * Very good!
                         *
                         * Right click and hold, further
                         * away, to run to the glowing light.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077644, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 4:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2655, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078268 ) ); // Pathfind Toward Here

                        /*
                         * Movement
                         *
                         * Very good!
                         *
                         * Good!
                         *
                         * Do you see the glowing light?
                         *
                         * Right click and hold over it to
                         * run in that direction.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077645, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 5:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * Inventory
                         *
                         * Alright! Now you have your footing.
                         *
                         * Many things you find in the world,
                         * you will be able to pick up and carry.
                         *
                         * You have been given a backpack to carry
                         * all your belongings in.
                         *
                         * Left click on the Backpack Icon in
                         * the lower right corner of your screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077646, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleInventory", 100000 ) );

                        pm.Send( new ContinueHighlightKRUIElement( pm.Serial, 0x7919, pm.Backpack.Serial ) );

                        break;
                    }
                case 6:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleInventory", 0 ) );

                        /*
                         * Inventory
                         *
                         * This is where you will carry items.
                         *
                         * Up ahead are some crates. There are
                         * supplies in them you may need.
                         *
                         * To open the crates, mouse over them
                         * until you see their item properties.
                         *
                         * Double Left click on it to see
                         * what's inside.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077647, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 7:
                    {
                        /*
                         * Inventory
                         *
                         * To pick up an object, Left click
                         * and drag it into your backpack
                         * window.
                         *
                         * There are other goodies in the
                         * crates and barrels, go ahead and
                         * grab some for yourself.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077648, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 8:
                    {
                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3672, 2653, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        /*
                         * Equipment
                         *
                         * Excellent!
                         *
                         * Now approach Hogarth the Keeper
                         * of Old Haven in the building to
                         * the East of you. He is the Keeper
                         * of Old Haven, and he has a task
                         * for you.
                         *
                         * A glowing light toward the East
                         * marks his location.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077649, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 9:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * Equipment
                         *
                         * To speak with the Keeper, Double
                         * Left click on him.
                         *
                         * Please read the quest text and
                         * accept the quest to proceed.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077650, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 10:
                    {
                        /*
                         * Equipment
                         *
                         * Great! You are on your first quest.
                         *
                         * It's a small one, but I'm sure you
                         * will be rewarded nonetheless.
                         *
                         * Remember to pick up the Worn Katana
                         * and then talk to the Keeper to
                         * complete the quest.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077651, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 11:
                    {
                        /*
                         * Equipment
                         *
                         * You found the Worn Katana.
                         * You need to toggle it as a
                         * quest item.
                         *
                         * Hold down the Shift key, Right
                         * click on yourself, and select
                         * 'Toggle Quest Item' from the
                         * context menu. A 'Targeting
                         * Cursor' will appear.
                         *
                         * Left click on the Worn Katana,
                         * press the Esc key, and then
                         * talk to Hogarth.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077652, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 12:
                    {
                        /*
                         * Equipment
                         *
                         * Great! The Keeper has given you
                         * a weapon. You need to equip it.
                         *
                         * Left click on the Paperdoll icon
                         * on the lower right of your screen.
                         *
                         * Drag the Worn Katana from your
                         * backpack to your hand slot in the
                         * Paperdoll.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077653, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "TogglePaperdoll", 100000 ) );

                        break;
                    }
                case 13:
                    {
                        /*
                         * Equipment
                         *
                         * You will use this same method to
                         * put on weapons, armor, and
                         * clothing. The slot has to be
                         * clear of any other items. So if
                         * you are wearing a hat, and want
                         * to put on a helmet, you will
                         * have to take off the hat, first.
                         *
                         * Left click the Next button to
                         * continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077654, true ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "TogglePaperdoll", 0 ) );

                        break;
                    }
                case 14:
                    {
                        /*
                         * Navigation
                         *
                         * Alright, looks like you're ready
                         * to go.
                         *
                         * Before you can start your
                         * adventures, you'll have to complete
                         * a few challenges.
                         *
                         * Open your map at the bottom of
                         * the screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078238, 1078246, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3665, 2630, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleMap", 100000 ) );
                        pm.Send( new ContinueHighlightKRUIElement( pm.Serial, 31007, pm.Serial ) );

                        break;
                    }
                case 15:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleMap", 0 ) );

                        /*
                         * Navigation
                         *
                         * You'll notice a little marker
                         * on the map. That's a waypoint.
                         * This waypoint shows you where
                         * a gate is.
                         *
                         * Follow the alley towards the
                         * marker, and head through the
                         * gate.
                         *
                         * Once you arrive at the gate,
                         * Double Left click on it.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078238, 1078247, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 16:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * First Combat
                         *
                         * This is the town of Old Haven,
                         * or what remains of it. The
                         * former residents have been
                         * reanimated from the dead.
                         *
                         * Your first challenge is to
                         * return just one of these
                         * skeletons to the grave.
                         *
                         * Left click on the War/Peace
                         * button on the bar at the
                         * bottom left of your screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078248, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31009, "", 100000 ) );

                        break;
                    }
                case 17:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31009, "", 0 ) );

                        /*
                         * First Combat
                         *
                         * Great, now you are in an
                         * aggressive stance. Perfect
                         * for fighting.
                         *
                         * Now remember to toggle back
                         * into Peace mode before you
                         * try to interact with friendly
                         * townsfolk. They don't usually
                         * take kindly to being attacked.
                         *
                         * Left click on the Next button
                         * to continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078249, true ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 18:
                    {
                        /*
                         * First Combat
                         *
                         * Now, let's slay a skeleton.
                         *
                         * Left click on the skeleton,
                         * and move within reach.
                         *
                         * Once you begin attacking, you
                         * will continue to do so until
                         * the skeleton is laid to rest.
                         *
                         * You may need to kill more than
                         * one skeleton if another
                         * adventurer is also attacking it.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078320, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 19:
                    {
                        /*
                         * First Loot
                         *
                         * You destroyed the skeleton!
                         * Nice work!
                         *
                         * Now you can check it to see if
                         * it was carrying anything of
                         * value.
                         *
                         * Double Left click on its corpse.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078251, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 20:
                    {
                        /*
                         * First Loot
                         *
                         * This is what the poor thing was
                         * carrying, remnants of its life
                         * long past. It's sad, really.
                         *
                         * Anyway, drag all of these items
                         * to your inventory. You can right
                         * click on each item to loot as well.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078252, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 21:
                    {
                        /*
                         * First Loot
                         *
                         * Well done! When you have taken
                         * any damage, it's a good idea to
                         * heal up before going into battle
                         * again.
                         *
                         * You have a Potion of Healing in
                         * your inventory. To drink the
                         * potion, Double Left click on it
                         * and you will drink it.
                         *
                         * Even if you are not injured, try
                         * and drink the potion now.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078253, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 22:
                    {
                        /*
                         * First Loot
                         *
                         * Very good!
                         *
                         * You should have a scroll of
                         * Magic Arrow in your backpack.
                         *
                         * Scrolls, and other items, like
                         * the healing potion or bandages,
                         * can be put into your hotbar on
                         * the bottom left of your screen.
                         *
                         * Drag the scroll of Magic Arrow
                         * from your inventory to an open
                         * slot on the hotbar.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078254, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31005, "", 100000 ) );

                        pm.Send( EnableKRHotbar.Enable );

                        break;
                    }
                case 23:
                    {
                        /*
                         * First Loot
                         *
                         * Don't use that scroll yet. You
                         * will need it against your next
                         * opponent.
                         *
                         * Let's head to the next waypoint
                         * on your map. Head Northwest,
                         * then North, and follow path to
                         * the East.
                         *
                         * I'm waiting for you to approach
                         * the next gate.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078255, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3655, 2604, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31005, "", 0 ) );

                        pm.Send( EnableKRHotbar.Enable );

                        break;
                    }
                case 24:
                    {
                        /*
                         * Zombies
                         *
                         * Alright, the zombies beyond this
                         * gate are tough, but you have
                         * proven to be pretty good with a
                         * weapon thus far.
                         *
                         * Head through the gate and take
                         * one of those zombies out.
                         *
                         * When you have a zombie targeted,
                         * Left click on the Magic Arrow
                         * scroll icon in the hotbar to cast
                         * the spell.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078241, 1078256, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        break;
                    }
                case 25:
                    {
                        /*
                         * The Healer
                         *
                         * Oh No! They got you.
                         *
                         * Death in the world of Sosaria
                         * is not a trivial thing, but
                         * neither is it the end of your
                         * adventures.
                         *
                         * You now exist in a ghostly state,
                         * and cannot interact with the
                         * world of the living.
                         *
                         * The location of the nearest
                         * Healer appears on your map.
                         * Go to the location marked
                         * Resurrection on your map.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078242, 1078257, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3623, 2611, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 26:
                    {
                        /*
                         * Your Corpse
                         *
                         * Good! You are back among the
                         * living.
                         *
                         * Once you are resurrected you
                         * will have only 15 minutes to
                         * return to your body and collect
                         * your equipment from your corpse.
                         * Your corpse location is now
                         * marked on the map.
                         *
                         * Double Left click on your corpse
                         * to retrieve your items.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078243, 1078258, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 27:
                    {
                        /*
                         * Your Corpse
                         *
                         * Good job! You have retrieved
                         * your items. Take a look in your
                         * backpack and re-equip your
                         * weapon. You will also find a
                         * small gift from me.
                         *
                         * The Token of Passage will allow
                         * you to get through a gate
                         * protected by an energy field.
                         * I have marked the gate on your
                         * map.
                         *
                         * Head to the gate and pass through
                         * the energy field.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078243, 1078259, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3632, 2578, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Backpack.DropItem( new TokenOfPassage() );

                        break;
                    }
                case 28:
                    {
                        /*
                         * A Challenge
                         *
                         * Uh oh. It's the Dark Knight.
                         * I don't see a way to slip
                         * past him.
                         *
                         * So, it looks like you're
                         * going to have to talk to him.
                         *
                         * Double Left click on the Dark
                         * Knight to speak with him, and
                         * let's hope he's in a good mood.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078244, 1078260, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 29:
                    {
                        pm.SendGump( new DarkKnightGump() );

                        pm.AddToBackpack( new DarkKnightRune() );

                        break;
                    }
                case 30:
                    {
                        /*
                         * To New Haven
                         *
                         * This gate will lead you out of
                         * here, and on the road to New
                         * Haven. It's a town of learning,
                         * a place where you will get trained
                         * and learn how to advance in all
                         * of the skills vital to your
                         * prosperity in the world of
                         * Sosaria.
                         *
                         * Follow the path to the West.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078608, 1078261, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3540, 2568, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 31:
                    {
                        pm.SendGump( new KRStartingQuestGumpGoodbye() );

                        pm.PlaySound( 0x505 );

                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.FinishKRStartingQuest();

                        break;
                    }
            }
        }