MrRiots

Self-proclaimed Legend
Moderator
ServUO Version
Publish 57
Ultima Expansion
Mondain's Legacy
C#:
 public class SmallShop : BaseHouse
    {
        public static Rectangle2D[] AreaArray1 = new Rectangle2D[] { new Rectangle2D(-3,-3,7,7), new Rectangle2D(-1, 4, 4, 1) };
        public static Rectangle2D[] AreaArray2 = new Rectangle2D[] { new Rectangle2D(-3,-3,7,7), new Rectangle2D(-2, 4, 3, 1) };
        public SmallShop(Mobile owner, int id)
            : base(id, owner, 425, 3)
        {
            uint keyValue = CreateKeys(owner);

            BaseDoor door = MakeDoor(false, DoorFacing.EastCW);

            door.KeyValue = keyValue;

            if (door is BaseHouseDoor)
                ((BaseHouseDoor)door).Facing = DoorFacing.EastCCW;

            AddDoor(door, -2, 0, id == 0xA2 ? 24 : 27);

            //AddSouthDoor( false, -2, 0, 27 - (id == 0xA2 ? 3 : 0), keyValue );
            
            SetSign(3, 4, 7 - (id == 0xA2 ? 2 : 0));
        }


So if I make my own Multi (house) How do I know in an easy way where to place the sign / and doors.
I mean, I understand this part:
AddDoor(door, -2, 0, id == 0xA2 ? 24 : 27);

But, it still I dont understand it.
 
AddDoor(door, -2, 0, id == 0xA2 ? 24 : 27);
These params are offsets (X, Y, Z) from cetral point of house. (id == 0xA2 ? 24 : 27) - they're just Z -cases for different door ItemIDs
For example, you can place a multi in the game, such as a scripted house, and check the center point with the following command: [area interface where BaseHouse
after you can calculate all the offsets from the center points, for example for doors or signs.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back