Results 1 to 5 of 5

Thread: Identifier expected in script in scar 1.13

  1. #1
    Join Date
    May 2006
    Posts
    141
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected in script in scar 1.13

    Dont aksy why i made this just i need to know whats wrong dam ive tried get that like many times but nothing.



    SCAR Code:
    program New;
    var phat,des,x,y:integer;

    Procedure LoadBmps;
    begin
      des := BitmapFromString(27, 4,
           '000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFF' +
           '000000000000FFFFFFFFFFFF000000000000000000000000FFFFFF' +
           'FFFFFFFFFFFF000000000000000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000000000FFFFFFFFFFFF' +
           'FFFFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFF' +
           'FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '');
      phat := BitmapFromString(11, 6,
           'E1E100E1E100E1E100E1E100E1E100BABA00E1E100E1E100E1E100' +
           '7B7B00BABA00E1E100E1E100E1E100E1E100E1E100E1E100E1E100' +
           'E1E100E1E1007B7B00BABA00E1E100E1E100E1E100E1E100E1E100' +
           'E1E100E1E100E1E100E1E100BABA00BABA00E1E100E1E100E1E100' +
           'E1E100E1E100E1E100E1E100E1E100E1E100BABA00BABA00E1E100' +
           'E1E100E1E100E1E100E1E100E1E100E1E100E1E100E1E100BABA00' +
           'BABA00E1E100E1E100E1E100E1E100E1E100E1E100E1E100E1E100' +
           'E1E100BABA00BABA00');

    end;

    procedure Mouse(mousex, mousey: Integer; left: Boolean);
    var
      a, b, c: Integer;
      begin
        MoveMouseSmooth(mousex, mousey);
        Wait(60 + Random(30));
        GetMousePos(b, c);
        HoldMouse(b + 1, c, left);
       repeat
        Wait(20 + Random(30));
        a := a + 1;
       until (a > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, left);
    end;

    procedure SendText(Text: string);
    var
      i: Integer;
    begin
      for i := 1 to Length(Text) do
      begin
        SendKeys(Text[i]);
        Wait(50 + Random(100));
      end;
    end;

    function LoggedOut:Boolean;
    var
    des,x,y:integer;
    Log:boolean;
    begin
     if(FindBitmap(des,x,y)) then Log:=True else Log:=False;
    Result:=Log;
    end;

    function Mode:Boolean;
    var
    phat,x,y:integer;
    moda:boolean;
    begin
     if(FindBitmap(phat,x,y)) then moda:=True else moda:=False;
    Result:=moda;
    end;

    Procedure LogIn;
    begin
    status('Logging In');
    Mouse(260,317,true);
    wait(500);
    Mouse(409,273,true);
    Wait(5000);
    Mouse(262,220,true);
    end;

    procedure Fish;
    var
    x,y:integer;
    begin
      status('Fishing');
      x:= 270;
      y:= 150;
      x:= x + Random(30)-15;
      y:= y + Random(30)-15;
      if(FindColorSpiral(x,y,12433592,x-150,y-150,x+150,y+150))then
      begin
       MoveMouseSmoothEx(x,y,20,30,10,10,10);
       Wait(100);
       if(IsTextAt(6,26,'fish: Net '))then
       begin
        MoveMouseSmoothEx(x,y,20,30,1,1,1);
        Mouse(x,y,true);
        Wait(300+random(100));
      end;
     end;
    end;

    Procedure Sleep;
    var s,z:integer;
    begin
    Status('Sleeping!');
    MoveMouseSmoothEx(425,37,20,30,10,10,10);
    if (IsTextInArea(404,81,473,98,s,z,'Fatigue: 85'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 86'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 87'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 88'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 100'))
    then
     begin
      MoveMouseSmoothEx(500,40,20,30,10,10,10);
      MoveMouseSmoothEx(490,80,20,30,10,10,10);
      FindColor(s,z,3036283,267,62,311,88);
      MoveMouseSmoothEx(s,z,20,30,10,10,10);
      Mouse(s,z,True);
      Wait(3000+random(1000));
      end else
      begin
      Fish;
      end;
    end;

    Procedure PlayLegit;
     var TalkBack:integer;
      begin
    TalkBack:= Random(17);
     case TalkBack of
        0: begin
        SendText('Hai');
        end;
        1: SendText('U now what Hai means in estonian? its shark');
        2: SendText('Yo');
        3: SendText('Wazaaaaa ');
        4: SendText('                                im everywhere');
        5: SendText('lol');
        6: SendText('u think mhe hax?');
        7: SendText('...na im away');
        8: SendText('6tz 6tz make the beat pound.');
        9: SendText('owned... lol');
       10: SendText('watta');
       11: SendText('ya');
       12: SendText('yes boss');
       13: SendText('na i play legitos waN TERMITOS');
       14: SendText('no...');
       15: SendText('yo dude');
       16: SendText('ne fish lvls?');
    end;


    begin
    Writeln('Starting script');
    repeat
    Loadbmps;
    if (LoggedOut) then
    begin
    LogIn;
    FreeBitmap(des);
    else
    if (Mode) then
    begin
    PlayLegit;
    FreeBitmap(phat);
    end else
    Fish;
    Wait(10);
    Sleep;
    until(false)
    end.

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is Mouse not an SRL function?
    ~ Metagen

  3. #3
    Join Date
    May 2006
    Posts
    141
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its not That Mouse(x,y,4,4,True)

  4. #4
    Join Date
    Oct 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    {.include SRL\SRL.scar}

  5. #5
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    I know reading is hard, but this is a RSC script and you tell them to use a RS2 Include o.O

    You forgot the end after the case, and the end after some if statement.
    SCAR Code:
    program New;
    var phat,des,x,y:integer;

    Procedure LoadBmps;
    begin
      des := BitmapFromString(27, 4,
           '000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFF' +
           '000000000000FFFFFFFFFFFF000000000000000000000000FFFFFF' +
           'FFFFFFFFFFFF000000000000000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000000000FFFFFFFFFFFF' +
           'FFFFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF' +
           'FFFFFF000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFF' +
           'FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
           '');
      phat := BitmapFromString(11, 6,
           'E1E100E1E100E1E100E1E100E1E100BABA00E1E100E1E100E1E100' +
           '7B7B00BABA00E1E100E1E100E1E100E1E100E1E100E1E100E1E100' +
           'E1E100E1E1007B7B00BABA00E1E100E1E100E1E100E1E100E1E100' +
           'E1E100E1E100E1E100E1E100BABA00BABA00E1E100E1E100E1E100' +
           'E1E100E1E100E1E100E1E100E1E100E1E100BABA00BABA00E1E100' +
           'E1E100E1E100E1E100E1E100E1E100E1E100E1E100E1E100BABA00' +
           'BABA00E1E100E1E100E1E100E1E100E1E100E1E100E1E100E1E100' +
           'E1E100BABA00BABA00');

    end;

    procedure Mouse(mousex, mousey: Integer; left: Boolean);
    var
      a, b, c: Integer;
      begin
        MoveMouseSmooth(mousex, mousey);
        Wait(60 + Random(30));
        GetMousePos(b, c);
        HoldMouse(b + 1, c, left);
       repeat
        Wait(20 + Random(30));
        a := a + 1;
       until (a > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, left);
    end;

    procedure SendText(Text: string);
    var
      i: Integer;
    begin
      for i := 1 to Length(Text) do
      begin
        SendKeys(Text[i]);
        Wait(50 + Random(100));
      end;
    end;

    function LoggedOut:Boolean;
    var
    des,x,y:integer;
    Log:boolean;
    begin
     if(FindBitmap(des,x,y)) then Log:=True else Log:=False;
    Result:=Log;
    end;

    function Mode:Boolean;
    var
    phat,x,y:integer;
    moda:boolean;
    begin
     if(FindBitmap(phat,x,y)) then moda:=True else moda:=False;
    Result:=moda;
    end;

    Procedure LogIn;
    begin
    status('Logging In');
    Mouse(260,317,true);
    wait(500);
    Mouse(409,273,true);
    Wait(5000);
    Mouse(262,220,true);
    end;

    procedure Fish;
    var
    x,y:integer;
    begin
      status('Fishing');
      x:= 270;
      y:= 150;
      x:= x + Random(30)-15;
      y:= y + Random(30)-15;
      if(FindColorSpiral(x,y,12433592,x-150,y-150,x+150,y+150))then
      begin
       MoveMouseSmoothEx(x,y,20,30,10,10,10);
       Wait(100);
       if(IsTextAt(6,26,'fish: Net '))then
       begin
        MoveMouseSmoothEx(x,y,20,30,1,1,1);
        Mouse(x,y,true);
        Wait(300+random(100));
      end;
     end;
    end;

    Procedure Sleepy;
    var s,z:integer;
    begin
    Status('Sleeping!');
    MoveMouseSmoothEx(425,37,20,30,10,10,10);
    if (IsTextInArea(404,81,473,98,s,z,'Fatigue: 85'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 86'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 87'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 88'))
    or (IsTextInArea(404,81,473,98,s,z,'Fatigue: 100'))
    then
     begin
      MoveMouseSmoothEx(500,40,20,30,10,10,10);
      MoveMouseSmoothEx(490,80,20,30,10,10,10);
      FindColor(s,z,3036283,267,62,311,88);
      MoveMouseSmoothEx(s,z,20,30,10,10,10);
      Mouse(s,z,True);
      Wait(3000+random(1000));
      end else
      begin
      Fish;
      end;
    end;

    Procedure PlayLegit;
     var TalkBack:integer;
      begin
    TalkBack:= Random(17);
     case TalkBack of
        0: begin
        SendText('Hai');
        end;
        1: SendText('U now what Hai means in estonian? its shark');
        2: SendText('Yo');
        3: SendText('Wazaaaaa ');
        4: SendText('                                im everywhere');
        5: SendText('lol');
        6: SendText('u think mhe hax?');
        7: SendText('...na im away');
        8: SendText('6tz 6tz make the beat pound.');
        9: SendText('owned... lol');
       10: SendText('watta');
       11: SendText('ya');
       12: SendText('yes boss');
       13: SendText('na i play legitos waN TERMITOS');
       14: SendText('no...');
       15: SendText('yo dude');
       16: SendText('ne fish lvls?');
     end;
    end;


    begin
    {  Writeln('Starting script');
      Loadbmps;
     // repeat
        if (LoggedOut) then
        begin
          LogIn;
          FreeBitmap(des)
        end else
        begin
        if (Mode) then
        begin
          PlayLegit;
          FreeBitmap(phat);
        end //else
      //    Fish;
      //  Wait(10);
        //Sleepy;
     // until(false);    }

    end.
    I made a new script, check it out!.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Identifier Expected in Script?
    By isjusme in forum OSR Help
    Replies: 2
    Last Post: 05-23-2008, 11:42 PM
  2. Replies: 6
    Last Post: 08-06-2007, 09:18 PM
  3. Identifier expected in script?
    By steth1010 in forum OSR Help
    Replies: 6
    Last Post: 05-06-2007, 09:03 PM
  4. Identifier expected in script
    By mariop1 in forum OSR Help
    Replies: 3
    Last Post: 04-05-2007, 12:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •