Results 1 to 11 of 11

Thread: stuck with first script

  1. #1
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default stuck with first script

    im stilling working on my first script(water rune crafter) but i just cant make it work well maby im picking the wrong spots/colors to walk to i dont knowif there is someone who can help me with the script picking the right color and spot i would really appreciate that add me on msn or just pm me
    but if u add me on msn i could explain you where it picks his color ect. ect.

    here is my script..and yeah my standers SUCKS need to fix them :$
    oyeah dont mind the writeln its just to let me know where the script is :P

    SCAR Code:
    {=========================================================================]
    [                       ~dushii's water rune crafter~                     ]
    [                           ~Version: 0.1~                                ]
    [=========================================================================]
    |~Description:                                                            |
    |   A script that crafts waterrune                                        |                                                     |
    |~Instructions:                                                           |
    |   1. Set the Runescape brightness to V-bright,                          |
    |   2. Set the Runescape quality to LOW,                                  |
    |   3. Need SCAR version 3.11                                             |
    |   4. Need SRL version 4.                                                |
    |   5. Setup Lines 30-37.                                                 |
    |   6. All players must be in draynorbank.                                |
    |   7. Start with a water tiara wielded.                                  |
    |   8. have your essence in he first bank slot                            |                            |
    |                                                                         |
    |                                                                         |
    |                                                                         |
    [=========================================================================]
    |                                                                         |
    |                                                                         |
    |                                                                         |
    [=========================================================================}

    program New;
    {.Include SRL/SRL.SCAR}


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    {------------------------------------------------------------------------------}
    {                                                                              }
    {------------------------------------------------------------------------------}
    function RadialToleranceWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
      Radius: Integer; Xmod, Ymod, Tol: Integer): Boolean; // By Wizzup? and WT-Fakawi.
    var
      i, X1, Y1, x, y: Integer;
    begin
      if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
      if (StartRadial = EndRadial) then
      begin
        WriteLn('Using LinearRoadWalk, equal values.')
          if LinearRoadWalk(TheColor, StartRadial, Radius, Xmod, Ymod) then
          Result := True;
      end
      else if (StartRadial < EndRadial) then
      begin
        repeat
          for i := StartRadial to EndRadial do
          begin
            x1 := Round(Radius * Sine(i)) + 646;
            y1 := Round(-Radius * Cose(i)) + 84;
            if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
            begin
              MouseFindNoFlag(X,Y,Xmod,Ymod);
              Result := True;
              CountFlag(10);
              Exit;
            end;
          end;
          Radius := Radius - 4;
        until (Radius <= 1);
      end else
        if (StartRadial > EndRadial) then
        begin
          repeat
            for i := StartRadial downto EndRadial do
            begin
              x1 := Round(Radius * Sine(i)) + 646;
              y1 := Round(-Radius * Cose(i)) + 84;
              if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
              begin
                MouseFindNoFlag(X,Y,Xmod,Ymod);
                Result := True;
                CountFlag(10);
                Exit;
              end;
            end;
            Radius := Radius - 4;
          until (Radius <= 1);
        end
    end;

    function FindFastRandoms: Boolean; // By WT-Fawki
    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;
                WriteLn('No gametab');
                Exit;
              end;
            end;
          8: begin
              if InBlack then
              begin
                status('In black');
              end;
            end;
          9: RC;
        end;
        Wait(1);
      end;
    end;

    {------------------------------------------------------------------------------}
    {                        open bank and get essence                             }
    {------------------------------------------------------------------------------}
    procedure bank;
    var RuneEssence: Integer;
     Tries , x1, y1: Integer;
    begin
      Repeat
        MakeCompass('N');
        PerfectNorth;
        HighestAngle;
        OpenBankQuiet('db');
        Flag;
        Wait(500 + random(500));
        FixBank;
        Tries := Tries + 1;
        if (Tries = 25) then
        begin
          Exit;
        end;
      Until (BankScreen)
      begin
      RuneEssence := DTMFromString('78DA634C626060506100036608C5101F19C92' +
        '007A41981F83F1030660319D2A86AA67675C1D58000630A903040' +
        '55E3EEE484AA260C48281250130124B451D538DAD8A0AAC90712A' +
        'AA86A1A2B2A50D400006E2C0E77');
      if (FindDTM(RuneEssence, x1, y1, 45, 30, 115, 95)) then
      begin
        DepositAll;
        Mouse(x1, y1, 1, 1, false);
        if (chooseOption('All')) then
          wait(1000 + random(100));
      end;
      FreeDTM(RuneEssence);
      closebank;
      Wait(500 + random(500));
    end;
    end;
    {------------------------------------------------------------------------------}
    {                           walking to altar                                   }
    {------------------------------------------------------------------------------}
    procedure walktoaltar;

    begin
    FindroadColor;
    findwatercolor;
    if(RadialroadWalk(6186331, 190, 160, 70, 40, -10))then
    begin
      flag;
      Writeln('Used primary RRW')
    end else
    begin
    if(RadialroadWalk(roadColor, 120, 80, 70, -15, 5))then
    begin
       flag;
       Writeln('Used secondary RRW')
    end else
        Writeln('Did not use either.')
    end;

    if RadialRoadWalk(RoadColor, 165, 120, 60, 2,2) then
    WriteLn('step 0');
    flag;

    if (RadialRoadWalk(RoadColor, 150, 175, 65, -5, 5))then
    begin
      flag;
      WriteLn('step 1')
    end else
    begin
    if (RadialRoadWalk(RoadColor, 175, 140, 70, 10, 1))then
    begin
    flag;
    WriteLn('step 1.5');
    end else Writeln('did none')
    end

    findwatercolor;
    if RadialWalk(waterColor, 90, 150, 70, 1, 1)  then
    WriteLn('step 2');
    flag;

    if RadialWalk(waterColor, 80, 200, 60, 1, 1) then
    WriteLn('step 3');
    flag;

    if RadialWalk(waterColor, 80, 200, 60, 1, 1) then
    WriteLn('step 3');
    flag;

    if RadialToleranceWalk(2180703, 95, 130, 55, 10, 1, 30) then
    WriteLn('step 4');
    flag;



    if RadialToleranceWalk(3047040, 93, 120, 60, 6, 1, 30) then
    WriteLn('step 6');
    flag;

    if RadialToleranceWalk(3047497, 110, 130, 50, 6, 3, 30)  then
    WriteLn('step 7');
    flag;


    if (RadialToleranceWalk(6186331, 100, 150, 50, -10, -25, 30))  then
    begin
      flag;
      WriteLn('step 8')
    end else
        begin
         if(RadialToleranceWalk(6186331, 180, 210, 50, -10, -25, 30))  then
        begin
          writeln('step8.5')
        end else
          writeln('lost near altar')
          exit;
        end
    end;
    {------------------------------------------------------------------------------}
    {                             finding altar                                    }
    {------------------------------------------------------------------------------}
    procedure FindAltar;
    var
    x, y : Integer;
    begin
    repeat
      If FindObj(X, Y, 'ruins', 5266277, 5) Then
       begin
       MMouse(X,Y,0,0)
       writeln('Entering');
       Flag;
       Wait(500 + Random(350)); end;
      until (FindObj(X, Y, 'ruins', 5266277, 5));
      begin    Mouse(x, y, 0, 0,True);
        Wait(150 + Random(350));
        ChooseOption('Enter');
        flag;
        wait(2000+random(1000))
      end
    end;
    {------------------------------------------------------------------------------}
    {                           craft and tele back                                }
    {------------------------------------------------------------------------------}
    procedure CraftAndTele;
    var
    x,y :integer;
    begin
    wait(2500+random(500))
    RadialToleranceWalk(1665632,  290, 330, 35, 1, 1, 40);
         begin
         If FindObj(X, Y, 'raft', 5659999, 30) Then
           begin
           Mouse(x,y,0,0,true)
           Wait(500+random(200))
            if(IsUpText('raft'))then
            begin
            GetMousePos(x,y)
            Writeln('Crafted runes')
            Wait(2500+random(200))
            end;
         end;
    end;
    Wait(1500+random(200))
    begin
    findwatercolor;
    RadialWalk( watercolor , 120, 85, 70, 0, 0);
    flag;
    Wait(800+random(200))

    begin
     If FindObj(X, Y, 'ortal', 13942453, 30) Then
       wait(500)
       begin
       Mouse(x,y,0,0,true)
       Wait(500+random(200))
       flag;
            if(IsUpText('port'))then
            Wait(1000+random(200))
            begin
            GetMousePos(x,y)
            Writeln('teleporting ')
            flag;
            wait(2000+random(500))
            end;
       end;
    end;
    end;
    end;
    {------------------------------------------------------------------------------}
    {                             walk to bank                                     }
    {------------------------------------------------------------------------------}
    procedure walktobank;
    var
    x,y: integer;
    begin
    Wait(1000+random(200))
    WriteLn('step 1');
    flag;


    if (RadialToleranceWalk(3166312,  310, 360, 60, 1, 1, 30))  then
    begin
    WriteLn('step 2')
    flag;
    end else
    begin
    findwatercolor;
    if (RadialWalk( watercolor , 0, 30, 30, 0, 0)) then
    begin
    If FindObj(X, Y, 'ortal', 13942453, 30) Then
       wait(500)
       begin
       Mouse(x,y,0,0,true)
       Wait(500+random(200))
       flag;
            if(IsUpText('port'))then
            Wait(1000+random(200))
            begin
            GetMousePos(x,y)
            Writeln('teleporting ')
            flag;
            wait(2000+random(500))
            begin
            if (RadialToleranceWalk(3166312,  310, 360, 60, 1, 1, 30))  then
              begin
                WriteLn('step 2')
                flag;
       end
        end

          end
       end

    end else
    writeln('lost in water altar')
    end;

    if RadialToleranceWalk(2981695,  300, 350, 70, 1, 1, 30)  then
    WriteLn('step 3');
    flag;

    if RadialToleranceWalk(2196599,  270, 290, 70, 1, 1, 30)   then
    WriteLn('step 4');
    flag;

    findwatercolor;
    if RadialWalk(watercolor,  270, 330, 63, 1, 1)    then
    WriteLn('step 5');
    flag;

    if RadialWalk(watercolor,  300, 360, 60, 1, 1)   then
    WriteLn('step 6');
    flag;

    if RadialWalk(watercolor,  330, 360, 50, -5, -5)   then
    WriteLn('step 7');
    Flag;
    findroadcolor;

    if RadialToleranceWalk(6184027,  260, 360, 50, 0, -20,30)   then
    WriteLn('step 7');
    Flag;
    findroadcolor;

    if (RadialRoadWalk(RoadColor, 280, 350, 70, 1, 1))then
    begin
      flag;
      WriteLn('step 8')
    end else
    begin
    if (RadialWalk(watercolor,  265, 360, 50, -5, -5))then
    begin
      flag;
      findroadcolor;
      WriteLn('step 7.5')
    if (RadialRoadWalk(RoadColor, 330, 360, 70, 1, 1))then
    flag;
    WriteLn('step 8 again')
    end
    end;

    if (RadialRoadWalk(RoadColor, 330, 360, 50, 1, 1))then
    flag;
    WriteLn('step 8 again')

    if RadialToleranceWalk(2397582, 320, 360, 60, -5, 1,30)  then
    WriteLn('step 11');
    flag;

    end;
    {------------------------------------------------------------------------------}
    {                              mainloop                                        }
    {------------------------------------------------------------------------------}
    begin
      SetUpSRL;
      DeclarePlayers;
      LoginPlayer;
       HighestAngle;
       MakeCompass('W')
       MakeCompass('N')
       Repeat
       bank;
       walktoaltar;
       findaltar;
       craftandtele;
       walktobank;
     Until(false);
    end.
    ....

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

    Default

    What is your problem? What is the script doing wrong/not doing?

    -Knives

  3. #3
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    What is your problem? What is the script doing wrong/not doing?

    -Knives
    well if you test it u know what i mean
    it doesnt always walk to the right spot cuase the mm changes al the time same as the colors means you get lots moest of the time useing my script
    i tried to fix it but it didnt work out so i need someone who can help me change/fix a few thing and give me some advice for picking colors/objects to walk to
    ....

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

    Default

    Save the RoadColor in a var in your script. Like SomeInteger: FindRoadColor;
    Then it will auto-update itself when the procedure is run again.

    And to get it walking in the swamp, I would try to use GetColor, and then use SimilarColor(NewColor,SwampColor,40). Would compare if the new color is within tolerance 40 of a default SwampColor. If it isn't then pick the color from a new place.

    That's all help I can give, so far.

    -Knives

  5. #5
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    Save the RoadColor in a var in your script. Like SomeInteger: FindRoadColor;
    Then it will auto-update itself when the procedure is run again.

    And to get it walking in the swamp, I would try to use GetColor, and then use SimilarColor(NewColor,SwampColor,40). Would compare if the new color is within tolerance 40 of a default SwampColor. If it isn't then pick the color from a new place.

    That's all help I can give, so far.

    -Knives
    i dont know how to make a findroadcolor in a var (could you shome me an exaple

    and how do i use similarcolor in a radialwalk
    im really really confused now tnx to my water crafter <.<
    ....

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

    Default

    This is just an idea:
    SCAR Code:
    Function SwampColor(Defx,Defy: Integer): Integer;
    begin
      Result:= GetColor(702+Defx,70+DefY)
      if SimilarColors(Result,5402920,20) or SimilarColors(Result,3503146,20) or SimilarColors(Result,8162898,20) then
      begin
        Result:= Result;
      end else
      Result:= 0;
    end;

    Function FindSwampColor: Integer;
    var I: Integer;
    begin
      for I:= 0 to 100 do
      begin
        if(SwampColor(0,0)=0)then
        begin
          Result:= SwampColor(0,I)
        end;
        if Result <> 0 then Break;
      end;
    end;

    Try it

    -Knives

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

    Default

    Quote Originally Posted by King of Knives View Post
    Save the RoadColor in a var in your script. Like SomeInteger: FindRoadColor;
    Then it will auto-update itself when the procedure is run again.

    And to get it walking in the swamp, I would try to use GetColor, and then use SimilarColor(NewColor,SwampColor,40). Would compare if the new color is within tolerance 40 of a default SwampColor. If it isn't then pick the color from a new place.

    That's all help I can give, so far.

    -Knives
    why you didnt told me that when i was making my restlesghoster quester through lumby swamp i stopped because it was to hard
    ~Hermen

  8. #8
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    This is just an idea:
    SCAR Code:
    Function SwampColor(Defx,Defy: Integer): Integer;
    begin
      Result:= GetColor(702+Defx,70+DefY)
      if SimilarColors(Result,5402920,20) or SimilarColors(Result,3503146,20) or SimilarColors(Result,8162898,20) then
      begin
        Result:= Result;
      end else
      Result:= 0;
    end;

    Function FindSwampColor: Integer;
    var I: Integer;
    begin
      for I:= 0 to 100 do
      begin
        if(SwampColor(0,0)=0)then
        begin
          Result:= SwampColor(0,I)
        end;
        if Result <> 0 then Break;
      end;
    end;

    Try it

    -Knives
    ty
    ill try it right away...oke..oke tomorow hope it works
    ....

  9. #9
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just use an auto color? or find color tolerance? Lumby swamp is hard to walk through... you might want to try using the puddles or follow the water down the side
    The truth finally came out...


  10. #10
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mat_de_b View Post
    Just use an auto color? or find color tolerance? Lumby swamp is hard to walk through... you might want to try using the puddles or follow the water down the side
    thats what im doin
    got the idea from a miner :P but the color near the altar the colors change alot..sometimes me script work and sometime it doesnt so i want to make work all the time
    ....

  11. #11
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    srry knives it didnt work for me
    ....

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. stuck on error
    By yakkyigooconroy in forum OSR Help
    Replies: 3
    Last Post: 01-22-2008, 09:11 PM
  2. Stuck
    By RS Rebel in forum OSR Help
    Replies: 9
    Last Post: 07-03-2007, 09:27 AM
  3. I did the tutorial... now i'm stuck
    By Matteoke in forum OSR Help
    Replies: 12
    Last Post: 12-31-2006, 11:05 AM

Posting Permissions

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