
if  %EnPared = N/A
  {
    Set %EnPared Sur
    if #charposy > 3955
      {
       Set %EnPared Norte     
       }
 }

if #charposx > 5288
  {
    Set %EnPared Norte
    move 5287 3958 25s
    move 5287 3958 a 5s
  }

if #charposx < 5253
  {
    Set %EnPared Sur
    move 5253 3960 25s
    move 5253 3960 a 5s

  }



;Parte norte de delucia
if %EnPared = NORTE
  {
   set %ZonaAPicar NORTE
   set %prevx #charposx 
   set %prevy #charposy

   set %nextx %prevx 
   set %nexty %prevy - 1
   move %nextx %nexty a 1s
   wait 1s
  if %prevx = #charposx 
   {
    if  %prevy = #charposy
      {
                    call keepalive
        set %nextx %prevx - 1
        move %prevx %nexty a 1s
        move %nextx %nexty a 1s   

        if %prevx = #charposx 
          {
             if  %prevy = #charposy
             {
              set %nextx %prevx - 1
              set %nexty %prevy + 1
              move %nextx %prevy a 2s
             move %nextx %nexty a 2s
            }
         }
      }
    }
  exit
 }



;Parte sur de delucia
if %EnPared = Sur
  {
   set %ZonaAPicar Sur
   set %prevx #charposx 
   set %prevy #charposy

   set %nextx %prevx 
   set %nexty %prevy + 1
   move %nextx %nexty a 2s
   wait 1s
  if %prevx = #charposx 
   {
    if  %prevy = #charposy
      {
                    call keepalive
        set %nextx %prevx + 1
        move %prevx %nexty a 1s
        move %nextx %nexty a 1s   

        if %prevx = #charposx 
          {
             if  %prevy = #charposy
             {
              set %nextx %prevx + 1
              set %nexty %prevy - 1
              move %nextx %prevy a 2s
             move %nextx %nexty a 2s
           }
         }
      }
   }
 exit
}
