Pins problems too many shields?

Hello everyone
I am making my R2D2 inside I have:
Arduino mega
ethernet shield
easyVR shield
L298N Motor Driver Controller Arduino shield
plugged in that order.
I have some pins problem between motors control and ethernet
Please let me know how to solve it.
Also if you think so I would connect the motor shield by wiring if you tell me how.
code on next post
Thanks

#include <SPI.h>
#include <Ethernet.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include <SPI.h>
#include <WebServer.h>

//Declaración de la direcciones MAC e IP. También del puerto 80
byte mac[]={
  0xDE,0xAD,0xBE,0xEF,0xFE,0xED}; //MAC
IPAddress ip(192,168,0,110); //IP
EthernetServer servidor(80);


//Motor  LX;
int dir1PinA = 5;// 16 BACKWARD
int dir2PinA = 9;//12( DO NOT USE 4)  LEFT FWD
int speedPinA = A4;

//motor RX;
int dir1PinB = 6;//11  BACKWARD
int dir2PinB = 3;// (do not use 8)    RIGHT FWD
int speedPinB = A3;


//----------------DOME MOTOR-----------------------------

int dir3PinC = 44;
int dir4PinD = 45;
int speedPinC = A15; //PWM
int stbydPinC = 36; // standby


String readString=String(30);
String state=String(3);



void setup()
{
  Ethernet.begin(mac, ip); //Inicializamos con las direcciones asignadas
  servidor.begin();

  pinMode(dir2PinA,OUTPUT);
  digitalWrite(dir2PinA,LOW);
  state="OFF";

  pinMode (dir1PinA, OUTPUT);
  digitalWrite(dir1PinA,LOW);
  state="OFF";
  //pinMode (dir2PinA, OUTPUT);
  pinMode (speedPinA, OUTPUT);
  analogWrite(speedPinA,0);
  state="OFF";

  pinMode (dir1PinB, OUTPUT);
  digitalWrite(dir1PinB,LOW);
  state="OFF";
  pinMode (dir2PinB, OUTPUT);
  digitalWrite(dir2PinB,LOW);
  state="OFF";
  pinMode (speedPinB, OUTPUT);
  analogWrite(speedPinB,0);
  state="OFF";

  // DOME MOTOR
  pinMode (dir3PinC, OUTPUT);
  digitalWrite(dir3PinC,LOW);
  state="OFF";  
  pinMode (dir4PinD, OUTPUT);
  digitalWrite(dir4PinD,LOW);
  state="OFF";
  pinMode (speedPinC, OUTPUT); //PWM
  analogWrite(speedPinC, 0);
  state="OFF";
  pinMode (stbydPinC, OUTPUT); // standby 
  digitalWrite(stbydPinC,LOW);
  state="OFF";

}


//--------------DOME MOTORS FUNCTIONS

void domeright()
{
  analogWrite (speedPinC, 1024);
  digitalWrite(stbydPinC, HIGH);
  digitalWrite (dir3PinC, HIGH);// MOTOR RIGHT
  digitalWrite (dir4PinD, LOW);// MOTOR LEFT
  delay (10);
}


void domeleft()
{

  analogWrite (speedPinC, 1024);
  digitalWrite(stbydPinC, HIGH);
  digitalWrite (dir3PinC, LOW);// MOTOR right 
  digitalWrite (dir4PinD, HIGH);// MOTOR LEFT
  delay (10);
}


void domestop()
{
  analogWrite (speedPinC, 0);
  digitalWrite(stbydPinC,LOW);
  digitalWrite (dir3PinC, LOW);// MOTOR stop 
  digitalWrite (dir4PinD, LOW);// MOTOR stop
  //delay (10);
}




//----------------motors functions

void forward()
{
  //for (int spead = 180; spead < 256; spead++)


  analogWrite(speedPinA, 1024);

  digitalWrite (dir1PinA, LOW);// right motor
  digitalWrite (dir2PinA, HIGH);
  analogWrite(speedPinB, 1024); // lx motor
  digitalWrite (dir1PinB, LOW);
  digitalWrite (dir2PinB, HIGH);
  delay(10);

}

void backward()
{

  analogWrite(speedPinA, 1024);
  analogWrite(speedPinB, 1024);
  digitalWrite (dir1PinA, HIGH);
  digitalWrite (dir2PinA, LOW);
  digitalWrite (dir1PinB, HIGH);
  digitalWrite (dir2PinB, LOW);
  //delay(10);
}


void left()
{
  analogWrite(speedPinA, 1024);
  analogWrite(speedPinB, 0);
  digitalWrite (dir1PinA, LOW);
  digitalWrite (dir2PinA, HIGH);
  digitalWrite (dir1PinB, LOW);
  digitalWrite (dir2PinB, LOW);
  //delay(10);
}

void right()
{
  //analogWrite(speedPinA, 0);
  analogWrite(speedPinB, 1024);
  digitalWrite (dir1PinA, LOW);
  digitalWrite (dir2PinA, LOW);
  digitalWrite (dir1PinB, LOW);
  digitalWrite (dir2PinB, HIGH);
  //delay(10);
}

void stopM()
{
  analogWrite(speedPinA, 0);
  analogWrite(speedPinB, 0);
  digitalWrite (dir1PinA, LOW);
  digitalWrite (dir2PinA, LOW);
  digitalWrite (dir1PinB, LOW);
  digitalWrite (dir2PinB, LOW);
  //delay(10);
}

void rightBACK()// ----------------------BACK RIGHT
{
  analogWrite(speedPinA, 0);
  analogWrite(speedPinB, 1024);
  digitalWrite (dir1PinA, LOW);
  digitalWrite (dir2PinA, LOW);
  digitalWrite (dir1PinB, HIGH);
  digitalWrite (dir2PinB, LOW);
  //delay(10);
}

void leftBACK() //-----------------------BACK LEFT
{
  analogWrite(speedPinA, 1024);
  analogWrite(speedPinB, 0);
  digitalWrite (dir1PinA, HIGH);
  digitalWrite (dir2PinA, LOW);
  digitalWrite (dir1PinB, LOW);
  digitalWrite (dir2PinB, LOW);
  //delay(10);
}

//-----------------end motors function------------------------




void loop()
{
  EthernetClient cliente= servidor.available();

  if(cliente)
  {
    boolean lineaenblanco=true;
    while(cliente.connected())//Cliente conectado
    {
      if(cliente.available())
      {
        char c=cliente.read();
        if(readString.length()<30)//Leemos petición HTTP caracter a caracter
        {
          readString.concat(c); //Almacenar los caracteres en la variable readString
        }
        if(c=='\n' && lineaenblanco)//Si la petición HTTP ha finalizado
        {
          int LED = readString.indexOf("LED=");

          // ----------------------------------------------DOMERX
          if(readString.substring(LED,LED+5)=="LED=R")
          {
            //digitalWrite(dir3PinC,HIGH);
            //analogWrite(speedPinA, 255);
            //digitalWrite(stbydPinC, HIGH);
            domeright();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            //digitalWrite(dir3PinC,LOW);
            //digitalWrite(stbydPinC, LOW);
            domestop();
            state="OFF";
          }

          // ----------------------------------------------DOMELX

          if(readString.substring(LED,LED+5)=="LED=M")
          {
            
            domeleft();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            
            domestop();
            state="OFF";
          }
          //------------------------------------------------------FORWARD


          if(readString.substring(LED,LED+5)=="LED=S")
          {
            forward();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            stopM();
            state="OFF";
          }
          //------------------------------------------------------BACKWARD

          if(readString.substring(LED,LED+5)=="LED=T")
          {
            backward();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            stopM();
            state="OFF"; 
          } 
          //------------------------------------------------------TURN LEFT

          if(readString.substring(LED,LED+5)=="LED=L")
          {
            left();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            stopM();
            state="OFF";    
          }

          //------------------------------------------------------TURN RIGHT

          if(readString.substring(LED,LED+5)=="LED=C")
          {
            right();
            state="ON";

          } 
          else if (readString.substring(LED,LED+5)=="LED=F")
          {
            stopM();
            state="OFF";    


          }     



          //Cabecera HTTP estándar
          cliente.println("HTTP/1.1 200 OK");
          cliente.println("Content-Type: text/html");
          cliente.println();        
          //Página Web en HTML
          cliente.println("<html>");
          cliente.println("<head>");
          cliente.println("<title>R2D2 Control</title>");
          cliente.println("</head>");
          cliente.println("<body width=100% height=100%>");
          cliente.println("<center>");
          cliente.println("<h1>R2D2 Control</h1>");
          cliente.print("

");
          cliente.print("MOTORS: ");
          cliente.print(state);
          cliente.print("

");
          cliente.println("<center>");
          cliente.println("<input type=submit value=DomeLX style=width:150px;height:50px onClick=location.href='./?LED=M\'>");
          cliente.println("<input type=submit value=FWD style=width:150px;height:50px onClick=location.href='./?LED=S\'>");
          cliente.println("<input type=submit value=DomeRX style=width:150px;height:50px onClick=location.href='./?LED=R\'>");
          cliente.print("

");
          cliente.println("<input type=submit value=STOP style=width:150px;height:50px onClick=location.href='./?LED=F\'>");
          cliente.print("

");
          cliente.println("<input type=submit value=LEFT style=width:150px;height:50px onClick=location.href='./?LED=L\'>");
          cliente.println("<input type=submit value=BWD style=width:150px;height:50px onClick=location.href='./?LED=T\'>");
          cliente.println("<input type=submit value=RIGHT style=width:150px;height:50px onClick=location.href='./?LED=C\'>");    
          cliente.print("

");
          
          
          cliente.println("</center>");
          cliente.println("</center>");
          cliente.println("</body>");
          cliente.println("</html>");
          cliente.stop();//Cierro conexión con el cliente
          readString="";
        }
      }
    }
  }
}

GUYS WHAT'S WRONG WITH MY POST?
17 readers no answer?
please tell me I will fix it
Thanks

Look at each shield, determine what pins they are using, and make sure there is no overlap.

Thanks
I did that and seems like there is no pin available
that way I was thinking to connect the motor shield outside using all the extra arduino Mega pins like the 40s
do you think is possible?
Thanks

So identify the conflicting pins and see whether any of the boards allow you to move those functions to different pins. If not, you have the option of substituting one of the boards for a different type using different pins, or using a different board that does not stack on the Arduino, or simply re-routing the connections between adjacent layers of your stack.

I'd try using pins 34-45. They are in the middle of the connector. You probably need to avoid using the ICSP pins 50-53.

You'd have to read through the library files and see which pins are used by the shields. Not the easiest thing to rework without a lot of trial and error.