Results 1 to 4 of 4

Thread: Not really a request but...

  1. #1
    Join Date
    Oct 2007
    Posts
    302
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Not really a request but...

    I'm currently making a script that's NEVER been done before, i'm experianced in using scar, but i still need a little bit more help.

    I was wondering if anyone could help by giving me their msn user, so i can ask them some questions every now in again, or ask what's better for doing this or that.

    In particular, what's the best way of finding if a door is open or closed?
    Or checking for a custom symbol, atm i use bitmap but it's pretty bad.

    To show i know what i'm doing this is what i ahve so far :


    SCAR Code:
    program New;
    {.include SRL/SRL.Scar}

    var
    x,y, NotFoundHim,    (REMOVED) - I don't want script idea stealers :D: integer;



    const
    color1 = 7510470;
    color2 = 2108229;
    color3 = 3822649;
    load = 1;

    Procedure DeclarePlayers;
    Begin
      NumberOfPlayers(4);
      CurrentPlayer := 0;

      Players[0].Name        := '
    dddd';       // Player Name
      Players[0].Pass        := dddd'
    ;       // Player Pass
      Players[0].Nick        := 'ddddd;       // Player Nick (if your name is 'macroman' then your nick should be 'acro')
      Players[0].Active      := true;     // Is this player active? (True / False)

      Case Random(6) of
        0 : Disguise('
    iTunes');
        1 : Disguise('
    Windows Live Messenger');
        2 : Disguise('
    FileZilla');
        3 : Disguise('
    RuneScape - the massive online adventure game by Jagex Ltd - Mozzila Firefox');
        4 : Disguise('
    iTunes');
        5 : Disguise('
    iTunes');
        6 : Disguise('
    iTunes');
      end;

           (REMOVED) - I don'
    t want script idea stealers :D := BitmapFromString(15, 15, 'beNpjYMAEjEiAAS/Ysm' +
           '8bMsKqBSgCV5BVkgNByFqwqiwJUcrPDASimLQ4IIKLYyoGqkz2EfQ' +
           'xYPYO9YUgNMXIKqMtuYEqp8ybClEJZCC7H64YWSUcYfUskAGxHa6m' +
           'vLEC6EE0Z8MVAxGaSrhiuHpkxXAElIWrRHY8JADR1KOphCiGBzVWw' +
           '4Fq3Dwd0IzFqh4tTLDGOKYV+JMTIypAkQMAvWPn/Q==');

    end;






    function AutoColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(7.18, 0.10);

      if not (FindColorsTolerance(arP, 6382170, MMX1, MMY1, MMX2, MMY2, 7)) 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
        if (rs_OnMinimap(arP[i].x, arP[i].y)) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 6.94) and (X <= 15.05) and (Y >= 7.06) and (Y <= 15.26) and (Z >= 7.28) and (Z <= 16.35) then
          begin
            Result := arC[i];
            Writeln('AutoColor = ' + IntToStr(arC[i]));
            Break;
          end;
        end;
      end;

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

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






    procedure walktoshop;
    begin
      RoadColor := AutoColor;
      repeat
        RadialRoadWalk(RoadColor , 100, 120, 50, 1, 1);
      until(FindSymbol(X,Y,'farming spot'));
      writeln('finding farm');
      repeat
        RadialRoadWalk(RoadColor , 180, 220, 50, 1, 1);
      Until(FindBitmap(   (REMOVED) - I don't want script idea stealers :D, x, y));
      writeln('
    found the bastard');
      Mouse(x, y - 15, 1, 1, true);
      flag;
    end;



    procedure walkfromshop;
    begin
      RoadColor := FindRoadColor;
      repeat
      RadialRoadWalk(RoadColor , 350, 10, 50, 1, 1);
       until(FindSymbol(X,Y,'
    farming spot'));
          writeln('
    finding farm');
      repeat
        writeln('
    walking back')
        RadialRoadWalk(RoadColor , 270, 330, 50, 1, 1);
      Until(Findsymbol(x, y, '
    bank'));
      Mouse(x, y, 1, 1, true);
      flag;
    end;


    procedure door;
    var
      i: Integer;
    begin
      SetAngle(False);
      makecompass('
    s');
      i:= 0;
      if(FindObjCustom(x, y, ['
    oor'], [5788242,4873581,3622225,1387833], 10))then
      repeat
        i:= i + 1;
        writeln('
    finding door close/ open');
        if(IsUpText('
    pen'))then
        begin
          Mouse(x, y, 5, 5, false);
          writeln('
    door found');
          if(ChooseOption('
    Open'))then
        end else
        if(IsUpText('
    los'))then
        Exit;
      until(i >= 10);
      if findbitmap(   (REMOVED) - I don'
    t want script idea stealers :D x, y) then
      mouse(x, y, 2, 2, true);
    end;

    procedure banking;
    var
      b: Integer;
    begin
      b:= 0;
      repeat
        if (FindSymbol(x,y,'bank')) then
        b:= b + 1;
        until(b >= 10);
        begin
          wait(100+random(600));
          if(not(OpenBankQuiet('veb')))then
          begin
            if(FindColorSpiral(x, y, 7107700, 547, 206, 734, 464))then
            begin
              Mouse(x, y, 4, 3, false);
              ChooseOption('All');
            end;
            fixbank;
            MakeCompass('S');
            SetAngle(False);
            wait(100+random(400));
            OpenBankQuiet('veb');
            wait(200+random(400));
            Withdraw(-1, 1, 588);
          end else
          fixbank;
          if(FindColorSpiral(x, y, 7107700, 547, 206, 734, 464))then
          begin
            Mouse(x, y, 4, 3, false);
            ChooseOption('All');
          end;
          Withdraw(-1, 1, 588);
        end;
    end;

    procedure BuyStuff;
    begin
      if shopscreen then
      begin
        mouse(76,115,10,10, false);
        if ChooseOption('Buy X') then
        begin
          typesend('28');
          Wait(1000 + Random(500));
          mouse(485,40,7,7, true);
        end;
      end;
    end;

    Function FindTheDude(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
    var
      a, b, c, i, x1, y1, x2, y2, x3, y3: Integer;
      Start: Boolean;
    begin
      For b := 0 to (GetArrayLength(Color)-1) do
      Begin
        if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
        Begin
          Start := True;
          Break;
        end;
      end;
      If(Start)then
      Begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        repeat
          If not(LoggedIn)then
            break;
          a := a + 1;
          If (a = 1) then
            c := c + 1
          else If (a = 3) then
            c := c + 1;
          For i := 1 to c do
          Begin
            If (a = 1) then
            Begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            end else
            If (a = 2) then
            Begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            end else
            If (a = 3) then
            Begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            end else
            If (a = 4) then
            Begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            end;
            If (x1 = 485) and (x2 = 517) then
              x2 := x2 - 2;
            If (y1 = 325) and (y2 = 345) then
              y2 := y2 - 7;
            If (x2 > 515) then
              Break;
            For b := 0 to (GetArrayLength(Color)-1) do
            Begin
              If (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
              Begin
                if not FindColorTolerance(x3, y3, Color3, (cx - 5), (cy - 5), (cx + 5), (cy + 5), 5) then
                begin
                  Result := False;
                end else
                begin
                  MMouse(cx, cy, 0, 0);
                  Wait(50 + random(100));
                  if (IsUpTextMultiCustom(Text)) then
                  Begin
                    Result := True;
                    Exit;
                  end;
                end;
              end;
            end;
          end;
          if (a = 4) then a := 0;
        until (x2 > 515) or (Result = True);
      end;
    end;



    procedure findNtrade;
    begin
      repeat
        case random(5)of
          0: MakeCompass('S');
          1: wait(random(100));
          2: MakeCompass('W');
          3: MakeCompass('N');
          4: MakeCompass('E');
          5: wait(random(200));
        end;
       (REMOVED) - I don't want script idea stealers :D
        begin
          Mouse(X, Y, 1, 1, false);
          Wait(20 + Random(70));
          if ChooseOption('
    rade') then
          Wait(700 + Random(200));
          BuyStuff;
          MakeCompass('
    N');
        end else
        NotFoundHim := NotFoundHim+1;
        FindNTrade;
        wait(500+random(200));
      until(shopscreen) or (NotFoundHim > 20);
      if (notFoundHim > 20) or (ShopScreen = False) then
      begin
        writeln('
    Failed while finding the shopkeeper');
        logout;
        terminatescript;
      end;
    end;








    begin
      SetupSRL;
      activateclient;

      DeclarePlayers;
      if (not(LoggedIn)) then
      LoginPlayer;
      repeat
      autocolor;
      // banking;
      // walktoshop;
       //door;
        //FindNTrade;
       // walkfromshop;
       // load:=load+1;
      until(false);
      //until (load=20);
      //if(load = 20) then logout;
    end.
    Previously known as boxcrop.


  2. #2
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    im always willing to help ppl on MSN, ill be gone for a week starting sunday... so i wont be able to help right away but im always willing to

    as for opening the door, just use an object finder to search for the door, then check the uptext for if it is open or closed. I have door handling in both my cooker and my eye of newter, check them out in my sig if you want an example.
    METAL HEAD FOR LIFE!!!

  3. #3
    Join Date
    Oct 2007
    Posts
    302
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay tyvm, i reallly would like it if someone else could also help !!
    Previously known as boxcrop.


  4. #4
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Case Random(6) of
        0,4,5,6 : Disguise('iTunes');
        1 : Disguise('Windows Live Messenger');
        2 : Disguise('FileZilla');
        3 : Disguise('RuneScape - the massive online adventure game by Jagex Ltd - Mozzila Firefox');
      end;

    Just to start...
    Project: Welcome To Rainbow

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [REQUEST]Fall For You By Secondhand Serenade [REQUEST]
    By P1nky in forum Music, Movies and TV
    Replies: 0
    Last Post: 08-22-2008, 06:22 AM
  2. [REQUEST]Randoms Updated.[REQUEST]
    By P1nky in forum SRL Site Discussion
    Replies: 18
    Last Post: 04-04-2008, 08:23 PM
  3. Read - "To request or not to request?"
    By n3ss3s in forum RS3 Script Requests
    Replies: 9
    Last Post: 03-21-2008, 03:20 PM
  4. [request]Mind Crafter[request]
    By alex s in forum RS3 Outdated / Broken Scripts
    Replies: 6
    Last Post: 04-17-2007, 12:10 PM
  5. [REQUEST]Green Dragon Raper[REQUEST]
    By Zodia in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 04-06-2007, 10:10 PM

Posting Permissions

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