I downloaded this script and it works okay but my questions are how can I fix it to bank? Because as of now it right clicks and then selects walk here. How would I take out the unnecessary walking? It wouldn't be so hard but the script just seems out of whack to me.
Code:
program silktrader;

{$DEFINE SMART8}
{$I SRL-OSR/SRL.simba}

procedure MyFlag;
begin
    wait(1250);
    Flag;
end;

function FindVendor(var fx, fy: Integer): Boolean;var
    arP: TPointArray;
    ararP: T2DPointArray;
    tmpCTS, i, arL: Integer;
    P: TPoint;
begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.02, 0.44);

    if not(FindColorsTolerance(arP, 9323663, MSX1, MSY1, MSX2, MSY2, 21)) then
    begin
        Writeln('Failed to find the vendor, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
    end;

    SortTPAFrom(arP, Point(MSCX, MSCY));
    ararP := SplitTPAEx(arP, 10, 10);
    arL := High(ararP);

    for i := 0 to arL do
    begin
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
            Result := True;
            Break;
    end;

    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);

    if (i = arL + 1) then
    begin
        Writeln('FindVendor could not find vendor.');
        Exit;
    end;

    GetMousePos(fx, fy);
end;

function FindVendorPants(var fx, fy: Integer): Boolean;
var
    arP: TPointArray;
    ararP: T2DPointArray;
    tmpCTS, i, arL: Integer;
    P: TPoint;
begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.06, 0.27);

    if not(FindColorsTolerance(arP, 10121596, MSx1, MSY1, MSx2, MSY2, 22)) then
    begin
        Writeln('Failed to find the vendor, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
    end;

    SortTPAFrom(arP, Point(MSCX, MSCY));
    ararP := SplitTPAEx(arP, 10, 10);
    arL := High(ararP);

    for i := 0 to arL do
    begin
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
            Result := True;
            Break;
    end;

    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);

    if (i = arL + 1) then
    begin
        Writeln('FindVendorPants could not find vendor pants.');
        Exit;
    end;

    GetMousePos(fx, fy);
end;

Procedure Path;
var
    x, y : Integer;
    contin : boolean;
begin
    MakeCompass('n');

    If FindSymbol(x, y, Symbol_Bank) then
    begin
        writeln('Im at the bank');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the bank');
    end;

    x := MMCX + 25;
    y := MMY1 + 23;
    MMouse(x, y, 3, 3);
    ClickMouse2(Mouse_Left);
        MyFlag;

    If FindSymbol(x, y, Symbol_Cookery) or FindSymbol(x, y, Symbol_KebabShop) or FindSymbol(x, y, Symbol_Furnace) then
    begin
        writeln('Walking to first spot');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the first spot');
        x := MMCX + 15;
        y := MMY1 + 30;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    If FindSymbol(x, y, Symbol_Tanner) then
    begin
        writeln('Walking to tanner');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        wait(7000);
        writeln('lolol');
        x := MMCX + 30;
        y := MMY1 + 30;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    If false and FindSymbol(x, y, Symbol_ScimitarShop) then     //always false
    begin
        writeln('Walking to the scimitar shop');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        x := MMCX + 50;
        y := MMY1 + 70;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    x := MMCX + 30;
    y := MMY1 + 30;
    MMouse(x, y, 3, 3);
    ClickMouse2(Mouse_Left);
        MyFlag;

    If FindSymbol(x, y, Symbol_Cookery) then
    begin
        writeln('Walking to the Cookery');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the Cookery');
    end;

    contin := false;
    Repeat
    If FindSymbol(x, y, Symbol_SilkStall) then
    begin
        writeln('Walking to the SilkStall');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
        contin := false;
    end else
    begin
        writeln('I cant find the SilkStall');
        contin := true;
    end;
    Until not contin;

end;

Procedure PathReversed;
var
    x, y : Integer;
    contin : boolean;
begin
    SetAngle(SRL_ANGLE_HIGH);
    MakeCompass('n');

    wait(1500);

    If FindSymbol(x, y, Symbol_SilkStall) then
    begin
        writeln('Walking to the SilkStall');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
        contin := false;
    end else
    begin
        writeln('I cant find the SilkStall');
        contin := true;
    end;

    If FindSymbol(x, y, Symbol_Cookery) then
    begin
        writeln('Walking to the Cookery');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the Cookery');
    end;

    x := MMCX - 30;
    y := MMY2 - 30;
    MMouse(x, y, 3, 3);
    ClickMouse2(Mouse_Left);
    MyFlag;

    If false and FindSymbol(x, y, Symbol_ScimitarShop) then     //always false
    begin
        writeln('Walking to the scimitar shop');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        x := MMCX - 50;
        y := MMY2 - 70;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    If FindSymbol(x, y, Symbol_Tanner) then
    begin
        writeln('Walking to tanner');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        wait(7000);
        writeln('lolol');
        x := MMCX - 30;
        y := MMY2 - 30;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    If FindSymbol(x, y, Symbol_Cookery) or FindSymbol(x, y, Symbol_KebabShop) or FindSymbol(x, y, Symbol_Furnace) then
    begin
        writeln('Walking to first spot');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the first spot');
        x := MMCX - 15;
        y := MMY2 - 30;
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end;

    x := MMCX - 25;
    y := MMY2 - 23;
    MMouse(x, y, 3, 3);
    ClickMouse2(Mouse_Left);
    MyFlag;

    If FindSymbol(x, y, Symbol_Bank) then
    begin
        writeln('Im at the bank');
        MMouse(x, y, 3, 3);
        ClickMouse2(Mouse_Left);
        MyFlag;
    end else
    begin
        writeln('I cant find the bank');
    end;

end;

function BankBoothColor: Integer;
var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.06, 0.41);

    if not (FindColorsTolerance(arP, 4220043, MSX1, MSY1, MSX2, MSY2, 2)) then
    begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
    end;

    arC := GetColors(arP);
    ClearSameIntegers(arC);
    arL := High(arC);

    for i := 0 to arL do
    begin
        Result := arC[i];
        Writeln('BankBoothColor = ' + IntToStr(arC[i]));
        Break;
    end;

    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);

    if (i = arL + 1) then
        Writeln('BankBoothColor failed in finding the color.');
end;

function FaceColor: Integer;
var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.04, 0.10);

    if not (FindColorsTolerance(arP, 3890561, MCx1, MCy1, MCx2, MCy2, 16)) then
    begin
        Writeln('Failed to find the face in the dialog, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
    end;

    arC := GetColors(arP);
    ClearSameIntegers(arC);
    arL := High(arC);

    for i := 0 to arL do
    begin
        Result := arC[i];
        Writeln('FaceColor = ' + IntToStr(arC[i]));
        Break;
    end;

    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);

    if (i = arL + 1) then
        Writeln('FaceColor failed in finding the face in the dialog.');
end;

function isopenchat : boolean;
var
    temp : boolean;
    x, y : integer;
begin
    temp := false;

    if (not(FaceColor = 0)) and FindColorTolerance(x, y, FaceColor, 0, 338, 519, 478, 8) then
        temp := true;

    result := temp;
end;


function MoneyColorBank: Integer;
var
  arP: TPointArray;
  arC: TIntegerArray;
  tmpCTS, i, arL: Integer;
begin
  tmpCTS := GetColorToleranceSpeed;
  ColorToleranceSpeed(2);
  SetColorSpeed2Modifiers(0.03, 0.62);

  if not (FindColorsTolerance(arP, 1294063, MSX1, MSY1, MSX2, MSY2, 15)) then
  begin
    Writeln('Failed to find the color, no result.');
    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);
    Exit;
  end;

  arC := GetColors(arP);
  ClearSameIntegers(arC);
  arL := High(arC);

  for i := 0 to arL do
  begin
    Result := arC[i];
    Writeln('MoneyColorBank = ' + IntToStr(arC[i]));
    Break;
  end;

  ColorToleranceSpeed(tmpCTS);
  SetColorSpeed2Modifiers(0.2, 0.2);

  if (i = arL + 1) then
    Writeln('MoneyColorBank failed in finding the color.');
end;

Procedure DeclarePlayers;
Begin
  HowManyPlayers := 1;
  NumberOfPlayers(HowManyPlayers);
    Players[0].Name :='Your Username';
    Players[0].Pass :='Your Password';
End;

function RedButtonColor: Integer;
var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.03, 0.11);

    if not (FindColorsTolerance(arP, 1908867, MIx1, MIY1, MIx2, MIy2, 8)) then
    begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
    end;

    arC := GetColors(arP);
    ClearSameIntegers(arC);
    arL := High(arC);

    for i := 0 to arL do
    begin
        Result := arC[i];
        Writeln('RedButtonColor = ' + IntToStr(arC[i]));
        Break;
    end;

    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);

    if (i = arL + 1) then
        Writeln('RedButtonColor failed in finding the color.');
end;

Procedure CheckRun;
var
    x,y : Integer;
begin

    GameTab(12);

    if FindColorTolerance(x, y, RedButtonColor, 615,407, 670,458, 8) then
    begin
    end else
    begin
        MMouse(643, 433,3,3);
        ClickMouse2(Mouse_Left);
    end;


    GameTab(4);
end;

var
    x, y : Integer;
    SilkDTM : Integer;
Begin

  SetupSRL;
    DeclarePlayers;
    ActivateClient;
    Wait(2000);
    If (Not LoggedIn) Then
        LogInPlayer;
    SetAngle(SRL_ANGLE_HIGH);
    MakeCompass('n');
    //SetupSRL;

while(true) do
BEGIN

    Wait(750);

    CheckRun;
    Path;

    wait(750);

    While not InvFull do
    Begin
    Repeat
    if FindVendor(x,y) then
    begin

        MMouse(x, y, 3, 3);
        if(pos('an',GetUpText)=0) then
            ClickMouse2(Mouse_left);
        wait(150);
        if isopenchat then
        begin
            break;
        end
        else
            continue;
  SetupSRL;
    end;
    until false;

    //Wait(400);


	// one                                      Do you want to buy any fine silks?
	x := 300;
	y := 450;
	MMouse(x,y, 3,3);
  Wait(1000);
	ClickMouse2(Mouse_left);
	// two     Select an Option [ How much are they? | No. Silk doesn't suit me. ]
	x := 300;
	y := 400;

	MMouse(x,y, 3,3);
  Wait(1000);
	ClickMouse2(Mouse_left);
	// three                                                    How much are they?
	x := 215;
	y := 450;
	MMouse(x,y, 3,3);
  Wait(1002);
	ClickMouse2(Mouse_left);
	// four                                                                    3gp
	x := 300;
	y := 450;
	MMouse(x,y, 3,3);
  Wait(1003);
	ClickMouse2(Mouse_left);
	// five Select an Option [ No. That's too much for me. | Okay, that sounds good. ]
	x := 250;
	y := 435;
	MMouse(x,y, 4,4);
  Wait(1003);
	ClickMouse2(Mouse_left);
	// six                                                 Okay, that sounds good.
	x := 215;
	y := 450;
	MMouse(x,y, 3,3);
  Wait(1004);
	ClickMouse2(Mouse_left);
	// seven                                            You buy some silk for 3gp.
	x := 215;
	y := 450;
	MMouse(x,y, 3,3);
  Wait(1004);
	ClickMouse2(Mouse_left);

    End;

    SetAngle(SRL_ANGLE_HIGH);
    MakeCompass('n');

    CheckRun;
    PathReversed;

    Wait(1500);

    //x := 124;
    //y := 234+20;

    If FindColorTolerance(x, y, BankBoothColor, MSX1, MSy1, MSX2, MSY2, 3) then
    begin
        wait(750);
        MMouse(x + 35,y, 3,3);
        wait(750);
        ClickMouse2(Mouse_right);
        wait(750);
        MMouse(x, y + 40, 3, 3);
        wait(750);
        ClickMouse2(Mouse_left);
    end;

    SilkDTM := DTMFromString('mlwAAAHicY2dgYMhjYmBIBuICIC4D4gogTgfiDCB+BpR/D8XPgfguED8B4ltAvHZRJ5BkxIr5gSQrDoxdBwRDAQDymgts');

    Wait(2500);

    if FindDTM(SilkDTM, x, y, 546, 200, 736, 466) then
    begin
        MMouse(x,y, 3,3);
        ClickMouse2(Mouse_Right);
        MMouse(x, y + 67, 3, 3);
        ClickMouse2(Mouse_Left);
    end;
    end;
End.