private static void PlaceFakeGate_Callback(object m)
		{
			Mobile from = m as Mobile;
			if ( from == null || from.Deleted )
				return;

			Item gate = new Item();
			gate.ItemID = 3948;
			gate.Hue = 37;
			gate.Movable = false;
			gate.MoveToWorld(from.Location, from.Map);

			if (from.Hidden)
				Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(ComeOutOfGate_Callback), new object[] { from, gate });
			else
				Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(ChangeDirection_Callback), new object[] { from, gate });
		}
 public static Item AddLeverPuzzlePart(int[] Loc, Item newitem)
 {
     if (newitem == null || newitem.Deleted)
     {
         installed = false;
     }
     else
     {
         newitem.MoveToWorld(new Point3D(Loc[0], Loc[1], Loc[2]), Map.Malas);
     }
     return newitem;
 }
Beispiel #3
0
        public static void AddRug_Callback(Mobile from, Map map, Point3D start, Point3D end, object state)
        {
            Rug tr = (Rug)state;

            int height = end.Y - start.Y + 1;
            int width = end.X - start.X + 1;

            Item item;

            for (int x = 0; x < width; x++)
            {
                int xcord = start.X + x;

                for (int y = 0; y < height; y++)
                {
                    int ycord = start.Y + y;

                    item = new Item();

                    if (xcord == start.X)
                    {
                        if (ycord == start.Y)
                            item.ItemID = tr.Top;
                        else if (ycord == end.Y)
                            item.ItemID = tr.Left;
                        else
                            item.ItemID = tr.West;
                    }
                    else if (ycord == start.Y)
                    {
                        if (xcord == end.X)
                            item.ItemID = tr.Right;
                        else
                            item.ItemID = tr.North;
                    }
                    else if (xcord == end.X)
                    {
                        if (ycord == end.Y)
                            item.ItemID = tr.Bottom;
                        else
                            item.ItemID = tr.East;
                    }
                    else if (ycord == end.Y)
                        item.ItemID = tr.South;
                    else
                        item.ItemID = tr.Center;

                    item.Movable = false;
                    item.MoveToWorld(new Point3D(xcord, ycord, start.Z), map);
                }
            }
        }