Code: Select all
Script 1 (int SectorTag, int Speed)
{
    int Value;
    switch (SectorTag)
    {
        case 1: if (GetSectorFloorZ(4, 0, 0) != GetSectorFloorZ(1, 0, 0))
                {
                    Value = GetSectorFloorZ(4, 0, 0) - GetSectorFloorZ(1, 0, 0);
                    Floor_LowerByValue(4, Speed, Value >> 16);
                    Ceiling_LowerByValue(4, Speed, Value >> 16);
                }
                break;
        case 2: if (GetSectorFloorZ(4, 0, 0) < GetSectorCeilingZ(2, 0, 0))
                {
                    Value = GetSectorCeilingZ(2, 0, 0) - GetSectorFloorZ(4, 0, 0);
                    Floor_RaiseByValue(4, Speed, Value >> 16);
                    Ceiling_RaiseByValue(4, Speed, Value >> 16);
                }
                else if (GetSectorFloorZ(4, 0, 0) > GetSectorCeilingZ(2, 0, 0))
                {
                    Value = GetSectorFloorZ(4, 0, 0) - GetSectorCeilingZ(2, 0, 0)
                    Floor_LowerByValue(4, Speed, Value >> 16);
                    Ceiling_LowerByValue(4, Speed, Value >> 16);
                }
                break;
        case 3: if (GetSectorFloorZ(4, 0, 0) != GetSectorCeilingZ(3, 0, 0))
                {
                   Value = GetSectorCeilingZ(3, 0, 0) - GetSectorFloorZ(4, 0, 0);
                   Floor_RaiseByValue(4, Speed, Value >> 16);
                   Ceiling_RaiseByValue(4, Speed, Value >> 16);
                }
                break;
    }
}


 I did miss something important out though, so it's updated above.
  I did miss something important out though, so it's updated above.