Results 1 to 9 of 9

Thread: Getting sick of this :'(

  1. #1
    Join Date
    Apr 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Getting sick of this :'(

    SCAR Code:
    Procedure Alch;
      begin
      repeat
      if (not(LoggedIn)) then
      LoginPlayer;
      FindNonInventoryRandoms;
      begin
        if (FirstCast = true) then
    begin
    if (GetCurrentTab <> 7) then
      begin
        GameTab(7);
        Wait(500 + Random(500));
    if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
    begin
             Status('alching.');
             MMouse(cx,cy,0,0);
             wait(random(100));
             if (IsUpText('ast')) then
             begin
             mouse(cx,cy,0,0,true);
             FirstCast := false;
             end;
             end;
             end;
     begin
      findcolortolerance(a,b,1749707,555,213,722,453,5);
      mmouse(a+random(5),b+random(5),0,0)
      wait(1600+random(100));
      if not findcolortolerance(a,b,1749707,555,213,722,453,5) then
      begin
      buyrings;
      end
      else
      begin
      getmousepos(a,b);
      mouse(a,b,1,1,true);
      end;
      checkrunes;
      exp:= exp + 65;
      counter:= counter + 1;
      progress;
    end;
    end;
    end;
    end;

    Can somebody please fix it for me ? i just can't get those begins and ends right =(
    Jaghax FTW

  2. #2
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's been a long time since i last scripted, but ill give it a try
    Im just finished commenting my DirectX game engine anyway!
    Busy working on realtime C# ray tracer

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    SCAR Code:
    Procedure Alch;
    begin
      repeat
        if (not(LoggedIn)) then
        LoginPlayer;
        FindNonInventoryRandoms;
        begin
          if (FirstCast = true) then
          begin
            if (GetCurrentTab <> 7) then
            begin
              GameTab(7);
              Wait(500 + Random(500));
              if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
              begin
                Status('alching.');
                MMouse(cx,cy,0,0);
                wait(random(100));
                if (IsUpText('ast')) then
                begin
                  mouse(cx,cy,0,0,true);
                  FirstCast := false;
                end;
              end;
            end;
            begin
              findcolortolerance(a,b,1749707,555,213,722,453,5);
              mmouse(a+random(5),b+random(5),0,0)
              wait(1600+random(100));
              if not findcolortolerance(a,b,1749707,555,213,722,453,5) then
              begin
                buyrings;
              end else
              begin
                getmousepos(a,b);
                mouse(a,b,1,1,true);
              end;
              checkrunes;
              exp:= exp + 65;
              counter:= counter + 1;
              progress;
            end;
          end;
        end;
      end;
    end;
    i fixed the standards at the same time

    ~shut

  4. #4
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    1,124
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I would help you if you had a real problem, but being lazy and having someone else fix simple misplacements of ends and begins because your lack of standards will not help you at all.

    http://www.kaitnieks.com/scar/scriptingsta/

    Edit: Lucky Shuttleu isn't as lazy as I am.

  5. #5
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure Alch;
    begin
      if (not (LoggedIn)) then
        LoginPlayer;
        FindNonInventoryRandoms;
      begin
        if (FirstCast = true) then
        begin
          if (GetCurrentTab <> 7) then
          begin
            GameTab(7);
            Wait(500 + Random(500));
            if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
            begin
              repeat
                Status('alching.');
                MMouse(cx, cy, 0, 0);
                Wait(random(100));
                if (IsUpText('ast')) then
                begin
                  Mouse(x, y, 0, 0, true);
                  FirstCast := false;
                end;
                begin
                  FindColorTolerance(a, b, 1749707, 555, 213, 722, 453, 5);
                  MMouse(a + random(5), b + random(5), 0, 0)
                  Wait(1600 + random(100));
                  if not FindColorTolerance(x, y, 1749707, 555, 213, 722, 453, 5) then
                  begin
                    BuyRings;
                  end else
                  begin
                    Getmousepos(a, b);
                    Mouse(a, b, 1, 1, true);
                  end;
                    Checkrunes;
                    IncEx(lol, 28);
                    Inc(Counter)
                    Progress;
                end;
              until (False);
            end;
          end;
        end;
      end;
    end;
    I think this works and I fixed standards too.

    Edit: Looks like someone beaten me

  6. #6
    Join Date
    Apr 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    SCAR Code:
    Procedure Alch;
    begin
      repeat
        if (not(LoggedIn)) then
        LoginPlayer;
        FindNonInventoryRandoms;
        begin
          if (FirstCast = true) then
          begin
            if (GetCurrentTab <> 7) then
            begin
              GameTab(7);
              Wait(500 + Random(500));
              if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
              begin
                Status('alching.');
                MMouse(cx,cy,0,0);
                wait(random(100));
                if (IsUpText('ast')) then
                begin
                  mouse(cx,cy,0,0,true);
                  FirstCast := false;
                end;
              end;
            end;
            begin
              findcolortolerance(a,b,1749707,555,213,722,453,5);
              mmouse(a+random(5),b+random(5),0,0)
              wait(1600+random(100));
              if not findcolortolerance(a,b,1749707,555,213,722,453,5) then
              begin
                buyrings;
              end else
              begin
                getmousepos(a,b);
                mouse(a,b,1,1,true);
              end;
              checkrunes;
              exp:= exp + 65;
              counter:= counter + 1;
              progress;
            end;
          end;
        end;
      end;
    end;
    i fixed the standards at the same time

    ~shut
    Thanks alot ! =D

    EDIT
    Capricorn, i was trying to get it to work for like an hour Ö even remade the whole thing lol

    EDIT2
    So the problem was just end else and end; ? =D

    EDIT3

    Line 118: [Error] (16976:1): Identifier expected in script still =(
    Last edited by sleziak; 05-04-2009 at 04:43 PM.
    Jaghax FTW

  7. #7
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, I've done my best but I keep getting
    [Error] (16253:1): Identifier expected, without a line so I cant find it.

    And concidering that some way more experienced scripters helped you I guess you no-longer need, it. anyway, ill submit it here :P

    Code:
    Procedure Alch;
    begin
      repeat  if (not(LoggedIn)) then  LoginPlayer;
      FindNonInventoryRandoms;
      begin
        if (FirstCast = true) then
        begin
          if (GetCurrentTab <> 7) then
          begin
            GameTab(7);
            Wait(500 + Random(500));
            if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
            begin
              Status('alching.');
              MMouse(cx, cy, 0, 0);
              wait(random(100));
              if (IsUpText('ast')) then
              begin
                mouse(cx, cy, 0, 0, true);
                FirstCast := false;
              end;
            end;
          end;
          begin
            findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5);
            mmouse(a + random(5), b + random(5), 0, 0);
            wait(1600 + random(100));
            if not findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5) then
            begin
              buyrings;
            end else
            begin
              getmousepos(a, b);
              mouse(a, b, 1, 1, true);
            end;
            checkrunes;
            exp := exp + 65;
            counter:= counter + 1;
            progress;
          end;
        end;
      end;
    end;
    EDIT: error came from this piece of code :

    "repeat if (not(LoggedIn)) then LoginPlayer;"

    The rest seems to work fine.

    EDIT2:
    ow, i took a look at what Wizup wrote, and I think that matches better what you are looking for, you wrote the same as me however,
    and "if (not(LoggedIn)) then LoginPlayer;" works fine, something wrong with repeat statement :S

    EDIT3: Changed "repeat" by "while (true) do" and it works, here's what i have now:

    Code:
    Procedure Alch;
    begin
      while (true) do
      begin
        if (not(LoggedIn)) then  LoginPlayer;
        FindNonInventoryRandoms;
        begin
          if (FirstCast = true) then
          begin
            if (GetCurrentTab <> 7) then
            begin
              GameTab(7);
              Wait(500 + Random(500));
              if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
              begin
                Status('alching.');
                MMouse(cx, cy, 0, 0);
                wait(random(100));
                if (IsUpText('ast')) then
                begin
                  mouse(cx, cy, 0, 0, true);
                  FirstCast := false;
                end;
              end;
            end;
            begin
              findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5);
              mmouse(a + random(5), b + random(5), 0, 0);
              wait(1600 + random(100));
              if not findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5) then
              begin
                buyrings;
              end else
              begin
                getmousepos(a, b);
                mouse(a, b, 1, 1, true);
              end;
              checkrunes;
              exp := exp + 65;
              counter:= counter + 1;
              progress;
            end;
          end;
        end;
      end;
    end;
    That should work fine I think.
    Last edited by Phoenix13nl; 05-04-2009 at 05:10 PM.
    Busy working on realtime C# ray tracer

  8. #8
    Join Date
    Apr 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I can't test it now ... i just fucked up my script and it freezes when i start it xD


    Edit:
    it's the alch procedure that freezes but you've atleast fixed the main thing, thx!
    Jaghax FTW

  9. #9
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    In the Alch procedure it makes an endless loop, I'm not sure if that's what you wanted, but that might cause it to free I think.

    Good luck with it, I can't help you any further I think, my scripting knowledge is very basic ATM.
    Busy working on realtime C# ray tracer

Thread Information

Users Browsing this Thread

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

Posting Permissions

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