Adblock breaks this site

What's Scar/SRL written in?

Discussion in 'Scar/Simba General Discussion' started by diablo1730, Mar 10, 2007.

  1. diablo1730

    diablo1730 Guest

    Referrals:
    0
    What's Scar/SRL written in?

    I can already see being called every name in the book... Please don't be an ass I'm just asking a question. Also where would I find tutorials/lessons on the basics of that language, thanks to the people who awnser nicley :) .
     
  2. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    What's Scar/SRL written in?

    Scar is a language itself, though many of the procedures are similar to Pascal. There is a great guide by Who Cares357 in the Scar Help Forum.
     
  3. diablo1730

    diablo1730 Guest

    Referrals:
    0
    What's Scar/SRL written in?

    Thanks alot, I appreciate the awnser. I'll look into that.
     
  4. maximus

    maximus Active Member

    Joined:
    Apr 22, 2005
    Posts:
    216
    Referrals:
    0
    Sythe Gold:
    0
    What's Scar/SRL written in?

    I beileve it was written in pascal.
     
  5. Gofez0r

    Gofez0r Guru

    Joined:
    Jan 21, 2007
    Posts:
    1,820
    Referrals:
    1
    Sythe Gold:
    0
    What's Scar/SRL written in?

    Yea.. SCAR is some kinda variation of pascal, but quite different actually.. SCAR is simple when compared to some actual pascal stuff, but SCAR is mostly used to make color click macros, so u dont really need to know pascal that much to be able to make scripts.. This is a part from a pascal supermario game source i found.

    EDIT: And i think SCAR (the program) is made with delphi (well, atleast AR was if i remember right)

    Code:
    begin
      New(Image);
      Assign(Source, Filename);
      {$I-} Reset(Source); {$I+}
      if IOResult = 0 then begin
        if MaxSize < FileSize(Source) then Error(1);
        BlockRead(Source, bmpHeader, SizeOf(bmpHeader)); { Let's read the header }
        Seek(Source, 0);
        BlockRead(Source, icoHeader, SizeOf(icoHeader));
        Seek(Source, 0);
        BlockRead(Source, Image^, FileSize(Source)); { Now the image itself }
        Close(Source);
      end else Error(2);
      if GraphResult <> grOK then Error(3);
      {------------Now let's draw the image------------}
      if bmpHeader.Ch = 'BM' then
        with bmpHeader do begin
          if Odd(Width) then Inc(Width); { Only even nos are accepted }
          case Offset of
            118: begin { 16-colors }
              SetThePalette(Filename, 16, Offset);
              if BitsPerPixels = 4 then begin
                I := Offset;
                for Y := YPos + Height - 1 downto YPos do begin
                  X := XPos;
                  while X < XPos + Width do begin
                    PutPixel(X, Y, Image^[I] div 16);
                    PutPixel(X + 1, Y, Image^[I] mod 16);
                    Inc(I);
                    Inc(X, 2);
                  end;
                end;
              end else if BitsPerPixels = 8 then begin
                for I := 0 to (Width * Height) - 1 do
                  PutPixel(XPos + I mod Width, YPos + Height - 1 -
                          (I div Width), Image^[Offset + I]);
              end;
            end;
            1078: begin { 256 colors }
              SetThePalette(Filename, 256, Offset);
              for I := 0 to (Width * Height) - 1 do
                PutPixel(XPos + I mod Width, YPos + Height - 1 -
                        (I div Width), Image^[Offset + I]);
            end;
            54: { 24-bit }
              for I := 0 to (Width * Height) - 1 do
                PutPixel(XPos + I mod width, YPos + Height - 1 -
                        (I div Width), Image^[Offset + I * 3 + 1] shr 4 + 17);
          end; { Case }
        end { With }
      else with icoHeader do begin { The image is an icon }
        case Unknown4[6] of
          80, 108: Inc(Width, 2);
          104: Inc(Width, 3);
        end;
        case BitsPerPixels of
          4: begin
            SetThePalette(Filename, 16, 126);
            I := 126;
            for Y := YPos + 31 downto YPos do begin
              X := XPos;
              while X < XPos + 32 do begin
                PutPixel(X, Y, Image^[I] div 16);
                PutPixel(X + 1, Y, Image^[I] mod 16);
                Inc(I);
                Inc(X, 2);
              end;
            end;
          end;
          8: begin
            SetThePalette(Filename, 256, 1086);
            for I := 0 to (Width * Height) - 1 do
              PutPixel(XPos + I mod Width, YPos + Height - (I div Width), Image^[1086 + I]);
          end;
        end; { Case }
      end; { With }
      Dispose(Image);
    end;
    
    And this is SCAR (from a default script that comes with SCAR)

    Code:
    program GoldFishSaver;
    var
      x, y, x1, y1: Integer;
    begin
      repeat
        if(FindcolorTolerance(x,y,869629,40,150,290,240,20))
          or(FindcolorTolerance(x,y,736209,40,150,290,240,20))
          or(FindcolorTolerance(x,y,172287,40,150,290,240,20))then
        begin
            HoldMouse(x,y,true);
            wait(50);
            x1:= 360+random(80);
            y1:= 50;
            MoveMouse(x1, y1);
            ReleaseMouse(x1,y1,true);
        end;
      until(false);
    end.
    
    ...
     
  6. Starblaster100

    Starblaster100 Forum Addict

    Joined:
    Apr 21, 2005
    Posts:
    335
    Referrals:
    2
    Sythe Gold:
    0
    What's Scar/SRL written in?

    SCAR is written in Delphi, and is scripted in a mixture of Pascal and Delphi.
     
  7. cocomonkilla

    cocomonkilla Active Member

    Joined:
    Jul 17, 2006
    Posts:
    154
    Referrals:
    0
    Sythe Gold:
    1
    Discord Unique ID:
    809221934587183144
    Discord Username:
    cocomonkilla
    What's Scar/SRL written in?

    SRL is an addition to SCAR, written in SCAR...
     
< lol im such a noob | when i try to start a specific script >


 
 
Adblock breaks this site