Results 1 to 8 of 8

Thread: Don't Know What I'm Doing

  1. #1
    Join Date
    Dec 2006
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Don't Know What I'm Doing

    Yeah I made this auto looter based on some tutorials and some info this dude gave me, i dont know what the hell i'm doing but when i look at it it seems like it should work. But it never compiles and after fucking with it for like an hour changing stuff to see what the problem is i still don't have any result so could somebody tell me exactly what im doing wrong so i can learn this? because none of the tutorials cover syntax and i dont know what the hell i'm doing. Anyway heres the script:

    SCAR Code:
    program Looter;
    {.include SRL\SRL.Scar}

    begin
    SetupSRL;

    function Eat;
    GameTab(4);
      lob:= BitmapFromString(8, 8, 'beNpLlNibKlHsKLA1UQKIjmVKXCs' +
           'EoeeVEgIiAj2+IHGgAoj481oQWhopsDQUXfx7myJQHMgFCkLEsy04' +
           'gOIMDAxALlDNvUqoONBYCAKygYLvwXqByno8BaYECgANASpDCPoKz' +
           'AELbo0VYICBFleBOaFgQaCbASPcQw0=');
    if FindBitmapSpiralTolerance(lob,x,y,563,219,729,457,10) then
       Mouse(x,y,5,5,true)
       Writeln('Ate A Lobster')
       end else
         tuna:= BitmapFromString(11, 10, 'beNp9jTsKgDAQRPconkuwkGAh' +
           'YiGLhYR0qSRYSEpbS+/ofswiCMIrlnmTCcDQ1P+g0TJxHJR37junp' +
           'OmxljC9i4TkWqCQlin0guZEDphm1JttJ696d66RMGXYJtm8IBPwCJ' +
           '6bc5mS49q4ABW8eZ4I15a0kIP/Wi7spVB26C+zcAPD/IfJ');
       if FindBitmapSpiralTolerance(tuna,x,y,563,219,729,457,10)then
       Mouse(x,y,5,5,true)
       Writeln('Ate A Tuna')
       end else
         salmon:= BitmapFromString(8, 10, 'beNpjYACCFh2BHgOBKUBkIjD' +
           'HRGCphcBWRwlkkbVgkWOuEudcJRBqbAQgItc8QWgtWGSvI1Tkni8I' +
           'PQ+U2AvWCBF5DhZ5D0ShilARCDdQ4nuoIhD9TzQ811YMFIQjiOz/Q' +
           'i+gOFA9UNex2uxjtcUg1FQMdPy1tmqIXXsrs/eWZoPIymyQeFc1RC' +
           '9QGVBka2n21sJkBgDcBGC9');
       if FindBitmapSpiralTolerance(salmon,x,y,563,219,729,457,10)then
       Mouse(x,y,5,5,true)
       Writeln('Ate A Salmon')
       end else
         pike:= BitmapFromString(11, 7, 'beNp1jq0OwzAMhPN8g4GhRpNRd' +
           'WgKm6KCKSoYKCgIKAgoKBjY883XtNMGan3s/uyc7y7h5uXutQ86CE' +
           'aJRVNFWpBW5BWn0ivmN9GnkJEGTEr1y9aAq2JWFDWVhgrr2VMt2NQ' +
           'DTlTYojy4y+nyZ8hbrQXp6YPBhlmjUdG+cr/3AVuvatI=');
       if FindBitmapSpiralTolerance(trout,x,y,563,219,729,457,10)then
       Mouse(x,y,5,5,true)
       Writeln('Ate A Trout')
       end else
         trout:= BitmapFromString(12, 6, 'beNorLWZgYIjy9UoODMqODCqO' +
           'jSpOjKpOTW7Jze4pzO4pLQaiKZXFyaFQWaBUdSZCFigFQrXVcyCoC' +
           'Yzaqpe2tQARRDvcECACqinOzF7b17O0qwWCgOYATUPWC2QjK4CoAS' +
           'KgLWC7QNYBFazta0FGUPPbqoGyIBsBK8FqGg==');
       if FindBitmapSpiralTolerance(pike,x,y,563,219,729,457,10)then
       Mouse(x,y,5,5,true)
       Writeln('Ate A Pike')
       end else
         cake:= BitmapFromString(13, 10, 'beNrLFTg3S+LaIol7yySer0NC' +
           'q6Do3DyJvX0Sa5sQyu6tAqNlUAQUBKoByu6dBFY2D6oMSIIQWOrYN' +
           'BACKgAatbVNAIiOaUgc05EAkRoSe2Foq4bAVhWBtSoCS8FojoLA/9' +
           '//QeD3/+9A8Pn7eyB4/f754+fP79+7d/vevevX7l2+du38OSKVQdx' +
           '2DtNJXSBXAR2/tFZgaaXANQxlx9CUVQrMKYUqg3gQohLuQYhRQDVT' +
           'ClGUIYxCVTMFAGsv1sA=');
       if FindBitmapSpiralTolerance(cake,x,y,563,219,729,457,10)then
       Mouse(x,y,5,5,true)
       Writeln('Ate Some Cake')
       end else
       Writeln('Dont think I have any food. Fuck It.');
       end;

       
    function HealthCheck;
    if FindColor(x,y,65535,737,26,741,37)then
    Writeln('Health is yellow. Trying To Eat Something.');
    Mouse(660,141,10,10, true);
    Eat;
    Mouse(640,122,10,10, true) else
    if FindColor(x,y,255,737,26,741,37)then
    Writeln('Im about to die! Running.');
    Mouse(660,141,10,10, true);
    Wait(1000)+ random(3000));
    end;

    function Loot;
    if(FindObjCustom(x, y, ['mul', 'oin', 'une', 'rrow', 'rout', 'ike', 'ice', 'word', 'itar', 'xe', 'ace', 'ow', 'hield', 'taf', 'obst', 'mon', 'ion', 'ial'],[9705488,530539,1055884,1076661,1605070,14032920,3258037,2213871,1610421,7568788,14079966,1080741,1091237,11909821,1075596,9712689,1597877,6515067,8096470,6510914,7052923,3756345,7040388,1583293], 10))then
    begin
      Mouse(x, y, 5, 5, false);
      ChooseOption('ake');
      Writeln('Looting Something')
      Wait(RandomRange(100, 400));
    end;

    function Look;
             wait(1000)+ random(800));
             HealthCheck;
             Loot;
    end;

      Repeat
        Wait(1000);
        if IsFKeyDown(2)then
        begin
          Writeln('Looting.');
          Look;
        end;
      Until(IsFkeyDown(4));

    end.

    Oh yeah and before my version of SCAR wouldn't compile right (even when it did on somebody elses') so i was wondering what version i need so I dont have to do all this extra stuff and change syntax to more complicated to get it working right. Sorry for all the questions but I don't know what to do. Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    You missing begins and end;'s

    Like

    SCAR Code:
    If FindBitmapMapSprialTolerance()then
    begin
      mmouse(x, y, 3, 3);
      wait(100+random(100));
      if isuptext('lol')then
      begin
        getmousepos(x, y);
        mouse(x, y, 0, 0, true);
        writeln('Clicked item');
      end else
        writeln('wrong uptext');
    end else
      writeln('doidnt find bitmap');

    Just an example
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  3. #3
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    add

    SCAR Code:
    var
      Lob,tuna,salmon,trout,pike,cake : Integer;

    To the beginning of the script.

    After an If/Then statement to make it work if it is more than 1 line you have to put a begin/end.

    I will edit with some tuts

    Edit:
    AntiRandoms/AntiBan

    Loops

    DTM's

    If/Then,Cases

  4. #4
    Join Date
    Dec 2006
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks guys ill do all of that. also i wanted to know why im getting error on line 10 it says line 10 (16216:1): Identifier expected in script do i have to fix the whole script or is the problem on that line?

  5. #5
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    After function put a begin

    Edit 1: here ill edit it for you

  6. #6
    Join Date
    Dec 2006
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok i added the begins and ends right i think, but its still giving me the same error and i cant find it. Maybe its the end elses? i dont know. heres the changed script:
    SCAR Code:
    program Looter;
    {.include SRL\SRL.Scar}

    var
      lob,tuna,salmon,trout,pike,cake : Integer;

    begin
    SetupSRL;

    function Eat;
    begin
    Wait(100)+ random(800));
    GameTab(4);
      lob:= BitmapFromString(8, 8, 'beNpLlNibKlHsKLA1UQKIjmVKXCs' +
           'EoeeVEgIiAj2+IHGgAoj481oQWhopsDQUXfx7myJQHMgFCkLEsy04' +
           'gOIMDAxALlDNvUqoONBYCAKygYLvwXqByno8BaYECgANASpDCPoKz' +
           'AELbo0VYICBFleBOaFgQaCbASPcQw0=');
    if FindBitmapSpiralTolerance(lob,x,y,563,219,729,457,10)then
    begin
       Mouse(x,y,5,5,true);
       Writeln('Ate A Lobster');
       end else
         tuna:= BitmapFromString(11, 10, 'beNp9jTsKgDAQRPconkuwkGAh' +
           'YiGLhYR0qSRYSEpbS+/ofswiCMIrlnmTCcDQ1P+g0TJxHJR37junp' +
           'OmxljC9i4TkWqCQlin0guZEDphm1JttJ696d66RMGXYJtm8IBPwCJ' +
           '6bc5mS49q4ABW8eZ4I15a0kIP/Wi7spVB26C+zcAPD/IfJ');
       if FindBitmapSpiralTolerance(tuna,x,y,563,219,729,457,10)then
       begin
       Mouse(x,y,5,5,true);
       Writeln('Ate A Tuna');
       end else
         salmon:= BitmapFromString(8, 10, 'beNpjYACCFh2BHgOBKUBkIjD' +
           'HRGCphcBWRwlkkbVgkWOuEudcJRBqbAQgItc8QWgtWGSvI1Tkni8I' +
           'PQ+U2AvWCBF5DhZ5D0ShilARCDdQ4nuoIhD9TzQ811YMFIQjiOz/Q' +
           'i+gOFA9UNex2uxjtcUg1FQMdPy1tmqIXXsrs/eWZoPIymyQeFc1RC' +
           '9QGVBka2n21sJkBgDcBGC9');
       if FindBitmapSpiralTolerance(salmon,x,y,563,219,729,457,10)then
       begin
       Mouse(x,y,5,5,true);
       Writeln('Ate A Salmon');
       end else
         pike:= BitmapFromString(11, 7, 'beNp1jq0OwzAMhPN8g4GhRpNRd' +
           'WgKm6KCKSoYKCgIKAgoKBjY883XtNMGan3s/uyc7y7h5uXutQ86CE' +
           'aJRVNFWpBW5BWn0ivmN9GnkJEGTEr1y9aAq2JWFDWVhgrr2VMt2NQ' +
           'DTlTYojy4y+nyZ8hbrQXp6YPBhlmjUdG+cr/3AVuvatI=');
       if FindBitmapSpiralTolerance(trout,x,y,563,219,729,457,10)then
       begin
       Mouse(x,y,5,5,true);
       Writeln('Ate A Trout');
       end else
         trout:= BitmapFromString(12, 6, 'beNorLWZgYIjy9UoODMqODCqO' +
           'jSpOjKpOTW7Jze4pzO4pLQaiKZXFyaFQWaBUdSZCFigFQrXVcyCoC' +
           'Yzaqpe2tQARRDvcECACqinOzF7b17O0qwWCgOYATUPWC2QjK4CoAS' +
           'KgLWC7QNYBFazta0FGUPPbqoGyIBsBK8FqGg==');
       if FindBitmapSpiralTolerance(pike,x,y,563,219,729,457,10)then
       begin
       Mouse(x,y,5,5,true);
       Writeln('Ate A Pike');
       end else
         cake:= BitmapFromString(13, 10, 'beNrLFTg3S+LaIol7yySer0NC' +
           'q6Do3DyJvX0Sa5sQyu6tAqNlUAQUBKoByu6dBFY2D6oMSIIQWOrYN' +
           'BACKgAatbVNAIiOaUgc05EAkRoSe2Foq4bAVhWBtSoCS8FojoLA/9' +
           '//QeD3/+9A8Pn7eyB4/f754+fP79+7d/vevevX7l2+du38OSKVQdx' +
           '2DtNJXSBXAR2/tFZgaaXANQxlx9CUVQrMKYUqg3gQohLuQYhRQDVT' +
           'ClGUIYxCVTMFAGsv1sA=');
       if FindBitmapSpiralTolerance(cake,x,y,563,219,729,457,10)then
       begin
       Mouse(x,y,5,5,true);
       Writeln('Ate Some Cake');
       end else
       Writeln('Dont think I have any food. Fuck It.');
       end;

       
    function HealthCheck;
    if FindColor(x,y,65535,737,26,741,37)then
    begin
    Writeln('Health is yellow. Trying To Eat Something.');
    Mouse(660,141,10,10, true);
    Eat;
    Mouse(640,122,10,10, true)end else
    if FindColor(x,y,255,737,26,741,37)then
    begin
    Writeln('Im about to die! Running.');
    Mouse(660,141,10,10, true);
    Wait(1000)+ random(3000));
    end;

    function Loot;
    if(FindObjCustom(x, y, ['mul', 'oin', 'une', 'rrow', 'rout', 'ike', 'ice', 'word', 'itar', 'xe', 'ace', 'ow', 'hield', 'taf', 'obst', 'mon', 'ion', 'ial'],[9705488,530539,1055884,1076661,1605070,14032920,3258037,2213871,1610421,7568788,14079966,1080741,1091237,11909821,1075596,9712689,1597877,6515067,8096470,6510914,7052923,3756345,7040388,1583293], 10))then
    begin
      Mouse(x, y, 5, 5, false);
      ChooseOption('ake');
      Writeln('Looting Something')
      Wait(RandomRange(100, 400));
    end;

    function Look;
             wait(1000)+ random(800));
             HealthCheck;
             Loot;
    end;

      Repeat
        Wait(1000);
        if IsFKeyDown(2)then
        begin
          Writeln('Looting.');
          Look;
        end;
      Until(IsFkeyDown(4));

    end.

  7. #7
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Looter;
    {.include SRL\SRL.Scar}

    Var
      lob,tuna,salmon,pike,trout,cake,x,y : Integer;

    Procedure Eat; //A function returns a variable, a procedure just does something
    begin
      GameTab(4);
        lob:= BitmapFromString(8, 8, 'beNpLlNibKlHsKLA1UQKIjmVKXCs' +
          'EoeeVEgIiAj2+IHGgAoj481oQWhopsDQUXfx7myJQHMgFCkLEsy04' +
          'gOIMDAxALlDNvUqoONBYCAKygYLvwXqByno8BaYECgANASpDCPoKz' +
          'AELbo0VYICBFleBOaFgQaCbASPcQw0=');
      if FindBitmapSpiralTolerance(lob,x,y,563,219,729,457,10) then
      begin
        Mouse(x,y,5,5,true)
        Writeln('Ate A Lobster')
        FreeDTM(lob);
      end;
      tuna:= BitmapFromString(11, 10, 'beNp9jTsKgDAQRPconkuwkGAh' +
        'YiGLhYR0qSRYSEpbS+/ofswiCMIrlnmTCcDQ1P+g0TJxHJR37junp' +
        'OmxljC9i4TkWqCQlin0guZEDphm1JttJ696d66RMGXYJtm8IBPwCJ' +
        '6bc5mS49q4ABW8eZ4I15a0kIP/Wi7spVB26C+zcAPD/IfJ');
      if FindBitmapSpiralTolerance(tuna,x,y,563,219,729,457,10)then
      begin
        Mouse(x,y,5,5,true)
        Writeln('Ate A Tuna');
        FreeDTM(Tuna);
      end;
      salmon:= BitmapFromString(8, 10, 'beNpjYACCFh2BHgOBKUBkIjD' +
        'HRGCphcBWRwlkkbVgkWOuEudcJRBqbAQgItc8QWgtWGSvI1Tkni8I' +
        'PQ+U2AvWCBF5DhZ5D0ShilARCDdQ4nuoIhD9TzQ811YMFIQjiOz/Q' +
        'i+gOFA9UNex2uxjtcUg1FQMdPy1tmqIXXsrs/eWZoPIymyQeFc1RC' +
        '9QGVBka2n21sJkBgDcBGC9');
      if FindBitmapSpiralTolerance(salmon,x,y,563,219,729,457,10)then
      begin
        Mouse(x,y,5,5,true)
        Writeln('Ate A Salmon')
        FreeDTM(salmon);
      end;
      pike:= BitmapFromString(11, 7, 'beNp1jq0OwzAMhPN8g4GhRpNRd' +
        'WgKm6KCKSoYKCgIKAgoKBjY883XtNMGan3s/uyc7y7h5uXutQ86CE' +
        'aJRVNFWpBW5BWn0ivmN9GnkJEGTEr1y9aAq2JWFDWVhgrr2VMt2NQ' +
        'DTlTYojy4y+nyZ8hbrQXp6YPBhlmjUdG+cr/3AVuvatI=');
      if FindBitmapSpiralTolerance(trout,x,y,563,219,729,457,10)then
      begin
        Mouse(x,y,5,5,true)
        Writeln('Ate A Trout')
        FreeDTM(trout);
      end;
      trout:= BitmapFromString(12, 6, 'beNorLWZgYIjy9UoODMqODCqO' +
        'jSpOjKpOTW7Jze4pzO4pLQaiKZXFyaFQWaBUdSZCFigFQrXVcyCoC' +
        'Yzaqpe2tQARRDvcECACqinOzF7b17O0qwWCgOYATUPWC2QjK4CoAS' +
        'KgLWC7QNYBFazta0FGUPPbqoGyIBsBK8FqGg==');
      if FindBitmapSpiralTolerance(pike,x,y,563,219,729,457,10)then
      begin
       Mouse(x,y,5,5,true)
       Writeln('Ate A Pike');
        FreeDTM(pike);
      end;
      cake:= BitmapFromString(13, 10, 'beNrLFTg3S+LaIol7yySer0NC' +
        'q6Do3DyJvX0Sa5sQyu6tAqNlUAQUBKoByu6dBFY2D6oMSIIQWOrYN' +
        'BACKgAatbVNAIiOaUgc05EAkRoSe2Foq4bAVhWBtSoCS8FojoLA/9' +
        '//QeD3/+9A8Pn7eyB4/f754+fP79+7d/vevevX7l2+du38OSKVQdx' +
        '2DtNJXSBXAR2/tFZgaaXANQxlx9CUVQrMKYUqg3gQohLuQYhRQDVT' +
        'ClGUIYxCVTMFAGsv1sA=');
      if FindBitmapSpiralTolerance(cake,x,y,563,219,729,457,10)then
      begin
        Mouse(x,y,5,5,true)
        Writeln('Ate Some Cake')
        FreeDTM(cake);
      end;
      Writeln('Dont think I have any food.');
    end;


    Procedure HealthCheck;
    begin
      if FindColor(x,y,65535,737,26,741,37)then
      begin
        Writeln('Health is yellow. Trying To Eat Something.');
        Mouse(660,141,10,10, true);
        Eat;
        Mouse(640,122,10,10, true);
      end;
      if FindColor(x,y,255,737,26,741,37)then
      begin
        Writeln('Im about to die! Running.');
        Mouse(660,141,10,10, true);
        Wait(1000+random(3000));
      end;
    end;

    procedure Loot;
    begin
      if(FindObjCustom(x, y, ['mul', 'oin', 'une', 'rrow', 'rout', 'ike', 'ice', 'word', 'itar', 'xe', 'ace', 'ow', 'hield', 'taf', 'obst', 'mon', 'ion', 'ial'],[9705488,530539,1055884,1076661,1605070,14032920,3258037,2213871,1610421,7568788,14079966,1080741,1091237,11909821,1075596,9712689,1597877,6515067,8096470,6510914,7052923,3756345,7040388,1583293], 10))then
      begin
        Mouse(x, y, 5, 5, false);
        ChooseOption('ake');
        Writeln('Looting Something')
        Wait(RandomRange(100, 400));
      end;
    end;

    Procedure Look;
    begin
      wait(1000+ random(800));
      HealthCheck;
      Loot;
    end;

    begin
      Repeat
        Wait(1000);
        if IsFKeyDown(2)then
        begin
          Writeln('Looting.');
          Look;
        end;
      Until(IsFkeyDown(4));
    end.

    As a general rule of thumb, say what error you are getting, it helps us a lot. Read those tutorials those should give you the basics, for the rest look in the SRL include itself and the SRL manual.

  8. #8
    Join Date
    Dec 2006
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks alot man.

    EDIT:nvm it works! hell yeah. thanks and +repped

Thread Information

Users Browsing this Thread

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

Posting Permissions

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