Help!!

Discussion in 'Scar/Simba Help' started by Firefox5330, Oct 18, 2007.

Help!!
  1. Unread #1 - Oct 18, 2007 at 7:24 PM
  2. Firefox5330
    Referrals:
    1

    Firefox5330 Guest

    Help!!

    Im new to scar and i was just playing around with the Unmatched Scar Scripting Tutorial For Beginners by WhoCares357 and i made my own script to just drop all coal in my invy again i wouldnt drop my coal just a test but when i run the script it just drop everything but keeps going and the script doesnt stop... heres the script. You probally cant run it because it has a bmp in it but that just drops it. I used

    procedure FindCoal;
    begin
    if(findcolor(z,c,coal,550,200,740,465)) then
    begin
    writeln('Found color.');
    MoveMouse(z,c);
    wait(200+random(100));
    ClickMouse(z,c,false);
    wait(200+random(100));
    FindBMP;
    end else
    writeln('Didn''t find color.');
    wait(200)
    i:= i + 1
    writeln('I equals ' + inttostr(i) + '.')
    end;



    begin
    LoadBMP;
    repeat
    FindCoal
    wait(200);
    until(i = 1)
    end.

    and it just keeps going so plz write back. Also can u give me hints to make it more efficiant later on. thx

    Code:
    program coalDropper;
    
    var
    x,y,z,c,i,drop:Integer;
    
    const
    coal= 2571067;
    
    procedure LoadBMP;
    begin
      Drop := BitmapFromString2(False, 'aC9C8378DAED93410AC0200C0' +
           '4BF946A12EDB1B5F8FF27D558288228112F169AC3A2610D23AE00' +
           '00874F021492D853D66C65CD9B111501E3512CD94391DF3EE6BED' +
           'B65E3288ABA6798380D87D828BA08D1ADA3251BE45A93B6E6ACFB' +
           '5FE12CFB5FE1D4E77934F97DFF3C2714D53ADB4FBEC63FC35913C' +
           'EDF5DF37633337F4E4D69B237FA2FFA335BFE1B2B0');
    end;
    
    procedure FindBMP;
    begin
     if(findBitmap(drop,x,y)) then
     begin
      MoveMouse(x,y)
      wait(200+random(100));
      ClickMouse(x,y,true);
     end else
      writeln('Didn''t find BMP.');
      wait(200);
    end;
    
    procedure FindCoal;
    begin
     if(findcolor(z,c,coal,550,200,740,465)) then
      begin
       writeln('Found color.');
        MoveMouse(z,c);
        wait(200+random(100));
        ClickMouse(z,c,false);
        wait(200+random(100));
        FindBMP;
      end else
       writeln('Didn''t find color.');
       wait(200)
       i:= i + 1
       writeln('I equals ' + inttostr(i) + '.')
    end;
    
    begin
     LoadBMP;
     repeat
      FindCoal
      wait(200);
     until(i = 1)
    end.
     
  3. Unread #2 - Oct 18, 2007 at 7:38 PM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Help!!

    How's this:

    Code:
    program coalDropper;
    
    var
    x,y,z,c,i,drop:Integer;
    
    const
    coal= 2571067;
    
    procedure LoadBMP;
    begin
      Drop := BitmapFromString2(False, 'aC9C8378DAED93410AC0200C0' +
           '4BF946A12EDB1B5F8FF27D558288228112F169AC3A2610D23AE00' +
           '00874F021492D853D66C65CD9B111501E3512CD94391DF3EE6BED' +
           'B65E3288ABA6798380D87D828BA08D1ADA3251BE45A93B6E6ACFB' +
           '5FE12CFB5FE1D4E77934F97DFF3C2714D53ADB4FBEC63FC35913C' +
           'EDF5DF37633337F4E4D69B237FA2FFA335BFE1B2B0');
    end;
    
    procedure FindBMP;
    begin
     if(findBitmap(drop,x,y)) then
     begin
      MoveMouse(x,y)
      wait(200+random(100));
      ClickMouse(x,y,true);
     end else
     begin
      writeln('Didn''t find BMP.');
      wait(200);
      end;
    end;
    
    function FindCoal: Boolean;
    begin
     if(findcolor(z,c,coal,550,200,740,465)) then
      begin
       writeln('Found color.');
        MoveMouse(z,c);
        wait(200+random(100));
        ClickMouse(z,c,false);
        wait(200+random(100));
        FindBMP;
      end else
      begin
       writeln('Didn''t find color.');
       wait(200)
       Result := True; // Result is a variable that is inherited when the function is called, this function inherits a boolean
      end;
    end;
    
    begin
     LoadBMP;
     repeat
      if (FindCoal) then Break; // Breaks out of the loop if FindCoal resulted true
      wait(200);
     until(false) // Will go on forever, which doesn't matter because you will automatically break the loop if FindCoal results true
    end.
     
< Am I finished? | Can somebody please help me >

Users viewing this thread
1 guest


 
 
Adblock breaks this site