Results 1 to 8 of 8

Thread: double check!

  1. #1
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default double check!

    hi there

    i want(asking) of people want to check my script and maybe give critism and that stuff and say wat could be better etc pls test it to if not your not supporting srl(lol)
    here it is

    SCAR Code:
    program HideTannerAndCrafter;
    {.include srl/srl.scar}

    var
      CactusColor, Thread, Needle, SoftLeather, HardLeather, CowHide, HideText, Loads, Load, Coin, HardLeather, EndSkill, StartSkill, Cash, AlKharidDTM, x, y: Integer;
      AlKharidMP: TDTMPointDef;
      AlKharidSP: array[0..4] of TDTMPointDef;
      AlKharidDTMSkel: TDTM;

    const
      //set this or it wont work
      RockColor = 4088977; //the red/brown rock outside bank(north)(for accurety:))
      RoadColor1 = 6003906; //road color the yellow one
      CraftLeather = false; //is in testing stage
      Whichleather = 'hardleather'; //you can choose on off: hardleather,softleather.

    procedure DeclarePlayers;
    begin

      HowManyPlayers := 1; // Set Number of Players here.
      NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
      CurrentPlayer := 0; // CurrentPlayer - Player That Will Login First

      Players[0].Name := 'secret ore'; //Player Username.
      Players[0].Pass := 'chiron'; //Player Password.
      Players[0].Nick := 'ecre'; //3 or 4 Letters From The Username Of This Player.
      Players[0].Active := True; //Will You Be Using This Player?
      Players[0].Integers[0] := 5; //How Much Loads To Do?



      writeln(inttostr(HowManyPlayers) + ' Players');

    end;

    {=====================================================================================]
                DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
    [=====================================================================================}


    {===============================================]
        this function finds randoms by:wt-fawaki
    [===============================================}


    function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 9 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;

              end;
            end;
          8: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          9: begin
              if FindFight then
              begin
                RunTo('N', False);
              end;
            end;
        end;

      end;
    end;


    procedure LoadRoadDDtms;
    var
      Tol: integer;
    begin
      Tol := 30;


      AlKharidMP.x := 675;
      AlKharidMP.y := 123;
      AlKharidMP.areasize := 1;
      AlKharidMP.areashape := 0;
      AlKharidMP.color := RoadColor1;
      AlKharidMP.tolerance := 255;

      AlKharidSP[0].x := 671;
      AlKharidSP[0].y := 122;
      AlKharidSP[0].areasize := 1;
      AlKharidSP[0].areashape := 0;
      AlKharidSP[0].color := RoadColor1;
      AlKharidSP[0].tolerance := Tol;

      AlKharidSP[1].x := 681;
      AlKharidSP[1].y := 121;
      AlKharidSP[1].areasize := 1;
      AlKharidSP[1].areashape := 0;
      AlKharidSP[1].color := RoadColor1;
      AlKharidSP[1].tolerance := Tol;

      AlKharidSP[2].x := 674;
      AlKharidSP[2].y := 125;
      AlKharidSP[2].areasize := 1;
      AlKharidSP[2].areashape := 0;
      AlKharidSP[2].color := RoadColor1;
      AlKharidSP[2].tolerance := Tol;

      AlKharidSP[3].x := 680;
      AlKharidSP[3].y := 124;
      AlKharidSP[3].areasize := 1;
      AlKharidSP[3].areashape := 0;
      AlKharidSP[3].color := RoadColor1;
      AlKharidSP[3].tolerance := Tol;

      AlKharidDTMSkel.MainPoint := AlKharidMP;
      AlKharidDTMSkel.SubPoints := AlKharidSP;
      AlKharidDTM := AddDTM(AlKharidDTMSkel);
    end;

    procedure LoadDTMs;
    begin
      {HideText := DTMFromString('78DA633CCFC8C0D00CC458004C94F10890D54' +
           '4849A3A026A761261CE7620AB910835AD04D4DC24C29C9744B8E7' +
           '19116A1E03590DA86A7EA0ABD90B64F51350738C08351731D560B' +
           '8E73A903599809A0340D624026AF6629A83E19EF544F87D139055' +
           '4F40CD6622D2CF66C2691500FDE0200E'); }

      Thread := DTMFromString('78DA63CC63666068656440061B972E65F80FA' +
        '441A2FF81803111A86622AA1A882C8C04D22073A6105053095453' +
        '4D404D2E504D250135A9986EC650530A54D349404D01504D1F11E' +
        '634E157030022330FD3');

      HardLeather := DTMFromString('78DA63F4626260F8C08002CC0D6419B880342' +
        '310FF0702C620A09ABF0C6880118904D20E40353F08A8B103AA79' +
        '47404D2850CD73026AC231DD8CA1C61DA8E60F01357E40354F08A' +
        '8B105AAF948408D2F50CD3FFC6A0056DD111A');

      Needle := DTMFromString('78DA638C666460F8C1800296CD9AC5F01F480' +
        '36518FE0301632890F587010D302291403A02C8FA47404D3C90F5' +
        '05B71A26109D0E643D22A02603C87A4C404D2290F58A801A907BD' +
        'E12501381193E186AC281AC9F04D480C2F92F01357140D677FC6A' +
        '0022B416DC');

      SoftLeather := DTMFromString('78DA6394666260F8C880027C3C3819B880342' +
        '310FF0702460D4C3510591809A465816AFE1150C30F54F38D801A' +
        '41A09A3704D42803D53C23A04613A8E6250135AA4035BF09A8112' +
        '1428D1450CD63FC6A00167F0F5E');

      HideText := DTMFromString('78DA63DCCBC0C0B08101159CF8C1C005A4188' +
        '1F83F103082D4AC63C00A1861F47E20B19E801A90395B8930670B' +
        '7E350056450CFC');

      HardLeather := DTMFromString('78DA633CCCCCC07098910119EC5ABF8EE13F9' +
        '00689FE0702C61D4035BB51D540646124903E0954B393809AB340' +
        '352708A8D909547396809A2D40354708A8390E547311BF1A001AC' +
        'D11E9');

      CowHide := DTMFromString('78DA63E4656060006124B06BE346062E20CD0' +
        '8C4FF81809119C8606740038C48249006A91121A0860F48481150' +
        '2301249809A891041202F8D50000C82E06DB');

    end;

    procedure GetCactusColor;
    var
      Cactus: Integer;
    begin
      if not LoggedIn then Exit;
      Cactus := BitmapFromString2(False, 'aB199078DA1DCCC911C0200' +
        'C43D1960C5E732404FA2F297C2E6F3492C722225F3F488D830E74' +
        '5B18E4F0C208349A5EC6EA13F7EDEF034B2567C3879C2F97391D0' +
        '78DA85F97564C6D3F568');

      CactusColor := AutoColorThis(Cactus, 200, MMX1, MMY1, MMX2, MMY2);
      WriteLn('//CactusColor: ' + IntToStr(CactusColor));
      FreeBitmap(Cactus);
    end;


    procedure WithDrawCraftStuff;
    begin
      if not LoggedIn then Exit;
      if craftleather then
      begin
        LoadDtms;
        writeln('//going to craft tha leather')
          if (bankscreen = false) then
        begin
          openbankfast('akb');

        end else
          depositall;
        if (FindDTM(Needle, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Mouse(x, y, 5, 5, false);
          if (ChooseOption('1')) then
          begin
            writeln('//whitdrawing needle');
          end else
            writeln('//could find needle');
        end;
        if (FindDTM(Thread, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Mouse(x, y, 5, 5, false);
          if (ChooseOption('ll')) then
          begin
            writeln('//whitdrawing Thread');
          end else
            writeln('//could find thread');
        end;
        if (WhichLeather = 'HardLeather') then
        begin
          if (FindDTM(HardLeather, x, y, MSX1, MSY1, MSX2, MSY2)) then
          begin
            Mouse(x, y, 5, 5, false);
            if (ChooseOption('ll')) then
            begin
              writeln('//whitdrawing Hardleather');
            end else
              writeln('//could find Hardleather');
          end;
        end else
          if (WhichLeather = 'SoftLeather') then
          begin
            if (FindDTM(SoftLeather, x, y, MSX1, MSY1, MSX2, MSY2)) then
            begin
              Mouse(x, y, 5, 5, false);
              if (ChooseOption('ll')) then
              begin
                writeln('//whitdrawing Softleather');
              end else
                writeln('//could find Softleather');
            end;
            wait(100 + random(((((50))))));
            closebank;
            freedtm(hardleather);
            freedtm(Softleather);
            freedtm(thread);
            freedtm(Needle);
          end;
      end;
    end;

    procedure BankAndWithdraw;
    begin
      loaddtms;
      openbankfast('akb');
      deposit(3, 28, 2);
      case Lowercase(WhichLeather) of
        'hardleather': begin
                         if (FindDTM(HardLeather, x, y, MSX1, MSY1, MSX2, MSY2)) then
                         begin
                           Mouse(x, y, 5, 5, false);
                           if (ChooseOption('ll')) then
                           begin
                             writeln('//whitdrawing Hardleather');
                           end else
                             writeln('//could find Hardleahter');
                         end;
                       end;
        'softleather': begin
                         if (FindDTM(SoftLeather, x, y, MSX1, MSY1, MSX2, MSY2)) then
                         begin
                           Mouse(x, y, 5, 5, false);
                           if (ChooseOption('ll')) then
                           begin
                             writeln('//whitdrawing Softleather');
                           end else
                             writeln('//could find Softleahter');
                         end;
                       end;
      end;
      wait(100 + random(((((50))))));
      closebank;
      freedtm(hardleather);
      freedtm(Softleather);
    end;

    procedure CraftingLeather;
    begin
      WithdrawCraftStuff;
      LoadDTMs;
      case Lowercase(WhichLeather) of
        'hardleather': begin
                         if (FindDTM(Needle, x, y, MIX1, MIY1, MIX2, MIY2)) then
                           Mouse(x, y, 3, 2, True);
                         if (FindDTM(HardLeather, x, y, MIX1, MIY1, MIX2, MIY2)) then
                           Mouse(x, y, 3, 2, True);
                       end;
        'softleather': begin
                         if (FindDTM(Needle, x, y, MIX1, MIY1, MIX2, MIY2)) then
                           Mouse(x, y, 3, 2, True);
                         if (FindDTM(SoftLeather, x, y, MIX1, MIY1, MIX2, MIY2)) then
                           Mouse(x, y, 3, 2, True);
                       end;
      end;
    end;

    function GetSkillStartEnd(Skill: string; Option: boolean): integer;
    begin
      if not LoggedIn then Exit;
      if (Option = True) then
      begin
        GameTab(2);
        StartSkill := GetSkillLevel(Skill);
      end else
      begin
        GameTab(2);
        EndSkill := GetSkillLevel(Skill);
      end;
    end;

    procedure proggy;
    begin
      WriteLn('//////////////////////////////////////////////////////////////');
      WriteLn('//   Thanks for using my HideTanner and Leathercrafter.     //');
      WriteLn('//                post Proggy,s and bugs.                   //');
      WriteLn('//////////////////////////////////////////////////////////////');
      WriteLn('// Ran for ' + (timerunning) + '                                        ');
      WriteLn('// Did ' + inttostr(load) + ' load(s) out of ' + inttostr(Players[CurrentPlayer].Integers[0]) + ' loads set on this player ');
      WriteLn('// You started with crafting level : ' + inttostr(startskill) + '');
      WriteLn('// You ended with crafting level   : ' + inttostr(startskill) + '');
      WriteLn('//////////////////////////////////////////////////////////////');
    end;


    function ToTanRoom: boolean;
    var x, y, tried, Room: integer;
    var WhichAngle: extended;
    begin
      if not LoggedIn then Exit;
      MakeCompass('N')
        HighestAngle;
      Room := DTMFromString('78DA632C606260D06440013D49EE0CFF81342' +
        '310FF0702C65AA01A155435137B131924A16A4000ACC688809A56' +
        'A01A4B026AD602D5181350930D54938DAAA6C1D71C450D0034651' +
        '223');
      repeat
        tried := tried + 1
          if (FindDTMRotated(Room, x, y, MMX1, MMY1, MMX2, MMY2, -pi * 2, pi * 2, 0.2, WhichAngle)) then
        begin
          wait(1000 + random(500));
          Mouse(x, y, 3, 3, True);
          flag;
          break;
        end;
      until (tried = 10)
        freeDTM(room);
    end;

    procedure bankclick;
    begin
      if not LoggedIn then Exit;
      GetCactusColor;
      RadialRoadWalk(CactusColor, 150, 270, 65, -30, +10);
      Flag;
    end;

    procedure ToBank;
    begin
      if not loggedin then exit;
      setrun(true);
      LoadRoadDDtms;
      if (FindDTM(AlKharidDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
      begin
        MouseFlag(x - 14, y + 10, 1, 1);
        Writeln('//Walking to bank 1.');
        bankclick;
      end;
      FreeDTM(AlKharidDTM);
    end;

    function FindHideText: Boolean;
    var
      LoopInteger: Integer;

    begin
      if not LoggedIn then Exit;
      loaddtms;
      LoopInteger := 0;
      repeat
        Wait(50 + Random(50));
        LoopInteger := LoopInteger + 1
          if (FindDTM(HideText, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Mouse(x, y - 10, 0, 0, False);
          Result := True;
          break;
        end;
      until (LoopInteger >= 15)
        if (LoopInteger >= 15) then
      begin
        Logout;
        Result := False;
        Exit;
      end;
      FreeDTM(HideText);
    end;


    procedure GetHides;
    var
      LoopInteger: Integer;

    begin
      if not LoggedIn then Exit;
      loaddtms;
      MakeCompass('N')
        HighestAngle;
      GetSkillStartEnd('crafting', True);
      Wait(1 + random(2));
      OpenBankFast('akb');
      Wait(10 + random(5));
      FixBank;
      Deposit(2, 28, 2);
      LoopInteger := 0;
      repeat
        Wait(50 + Random(50));
        LoopInteger := LoopInteger + 1;
        if (FindDTM(CowHide, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Mouse(x, y, 5, 5, false);
          if (ChooseOption('ll')) then
          begin
            WriteLn('//Taking Hides from Bank.');
            CloseBank;
            findtalk;
            Wait(500 + Random(100));
            Load := load + 1
              break;
          end;
        end;
      until (LoopInteger >= 10)
        if (LoopInteger >= 10) then
      begin
        Logout;
        exit;
      end;
      FreeDTM(CowHide);
    end;


    procedure GetCoinsAndHides;
    var
      LoopInteger: Integer;

    begin
      if not LoggedIn then Exit;
      LoadDTMs;
      HighestAngle;
      Cash := ((Players[CurrentPlayer].Integers[0]) * 81);
      Wait(1 + random(2));
      OpenBankFast('akb');
      Wait(10 + random(5));
      FixBank;
      LoopInteger := 0;
      Coin := DTMFromString('78DA637CC5C0C0709001057C3B21CBF01F483' +
        '302F17F2060BC0B64EC6140038C482490BE03244E1250F31348EC' +
        '2742CD19FC6A0078830F4B');
      repeat
        LoopInteger := LoopInteger + 1
          if (FindDTM(Coin, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Wait(100 + Random(50));
          Mouse(x, y, 0, 0, False);
          Wait(100 + Random(50));
        end;
        if (ChooseOption('X')) then
        begin
          Wait(1000 + random(100));
          WriteLn('//taking money from bank');
          TypeSend(inttostr(cash));
          break;
        end;
        Wait(1000 + random(500));
      until (LoopInteger >= 10)
        if (LoopInteger >= 10) then
      begin
        Logout;
        Exit;
      end;
      LoopInteger := 0;
      repeat
        Wait(50 + Random(50));
        LoopInteger := LoopInteger + 1;
        if (FindDTM(CowHide, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          Mouse(x, y, 5, 5, false);
          if (ChooseOption('ll')) then
          begin
            WriteLn('//Taking Hides from Bank.');
            CloseBank;
            findtalk;
            break;
            Wait(500 + Random(100))
          end;
        end;
      until (LoopInteger >= 10)
        if (LoopInteger >= 10) then
      begin
        Logout;
        exit;
      end;
      FreeDTM(Coin);
      FreeDTM(Cowhide);
      MakeCompass('N');
    end;



    function WalkingOne: boolean;
    begin
      if not LoggedIn then Exit;
      WriteLn('//To Hide Tanner Walking 1');
      SetRun(True);
      GetCactusColor;
      RadialRoadWalk(CactusColor, 50, 120, 60, 1, -35);
      Flag;
      ToTanRoom;
      if ToTanRoom then
      begin
        WriteLn('//Clicked TanRoom');
        result := true
      end;
    end;

    function WalkingTwo: boolean;
    begin
      if not LoggedIn then Exit;
      WriteLn('//To Hide Tanner Walking 2');
      SetRun(True);
      if FindColorTolerance(x, y, RockColor, MMX1, MMY1, MMX2, MMY2, 25) then
      begin
        Mouse(x + 20, y - 15, 0, 0, true);
        flag;
        wait(1000);
        ToTanRoom;
      end;
      if ToTanRoom then
      begin
        WriteLn('//Clicked TanRoom');
        result := true
      end;
    end;

    function WalkingThree: boolean;
    begin
      if not LoggedIn then Exit;
      WriteLn('//To Hide Tanner Walking 3');
      SetRun(True);
      GetCactusColor;
      RadialRoadWalk(CactusColor, 50, 120, 60, 2, -25);
      Flag;
      ToTanRoom;
      if ToTanRoom then
      begin
        WriteLn('//Clicked TanRoom');
        result := true
      end;
    end;

    procedure ToHideTanner;
    begin
      if not LoggedIn then Exit;
      case Random(3) of
        0: WalkingOne;
        1: WalkingTwo;
        2: WalkingThree;
      end;
    end;


    procedure TalkToEllis;
    var
      LoopInteger: Integer;
    begin
      if not LoggedIn then Exit;
      LoopInteger := 0;
      repeat
        FindTalk;
        LoopInteger := LoopInteger + 1
          Wait(50 + Random(50));
        if (FindColorTolerance(x, y, 5208536, MSX1, MSY1, MSX2, MSY2, 10)) then
        begin
          Mouse(x, y, 6, 6, false);
          Wait(100 + Random(300));
          if ChooseOption('ade') then
            WriteLn('//Trading To Ellis');
          Wait(3000 + Random(1000));
        end;
      until ((FindHideText) or (LoopInteger >= 50))
        if (LoopInteger >= 50) then
      begin
        Logout;
        exit;
      end else
        if ChooseOption('ll') then
          closebank;
    end;


    procedure SetupClient;
    begin
      ActivateClient;
      wait(1);
      DeclarePlayers;
      wait(1);
      LoginPlayer;
      wait(1+random(50))
    end;

    {====================]
          Main-Loop
    [====================}

    begin
      SetUpSRL;
      SetUpClient;
      repeat
        GetCoinsAndHides;
        repeat
          ToHideTanner;
          TalkToEllis;
          ToBank;
          Gethides;
          proggy;
        until ((Load >= Players[CurrentPlayer].Integers[0]) or (not (LoggedIn)))
          Loads := 0;
        if (Load >= Players[CurrentPlayer].Integers[0]) then
        begin
          logout;
          NextPlayer(True);
        end else
        begin
          logout;
          NextPlayer(False);
        end;
      until (false);
    end.
    ~Hermen

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Left your pass in; Pm'ing it to you
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i knew that -_- but thanks to...
    and anything to say about it
    ~Hermen

  4. #4
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Just that you use
    SCAR Code:
    until (false);
    in your main loop..

    So it will be an endless loop when the players are all false.

    Maybe do
    SCAR Code:
    until (CurrentPlayer > HowManyPlayers - 1)

    But lookin good=]

  5. #5
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i didnt know how to do that thanks! thats the stuff i am talkign about thanks!

    hermpie
    ~Hermen

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    bump!
    pls check it again i need all the scripting bugs like potse above^^ out of the

    script pls check it or try it.

    thanks
    ~Hermen

  7. #7
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    if (WhichLeather = 'HardLeather') then
    Make that
    SCAR Code:
    if(Lowercase(WhichLeather) = 'hardleather')then

    -Knives

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    k thanks..
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can Some1 double check this
    By psychoson in forum OSR Help
    Replies: 6
    Last Post: 06-24-2007, 02:32 AM
  2. just need somone to double check...
    By Team_epic in forum OSR Help
    Replies: 10
    Last Post: 06-19-2007, 06:03 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
  •