Results 1 to 8 of 8

Thread: HighAlcher getting stuck help m3h :D

  1. #1
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default HighAlcher getting stuck help m3h :D

    here is the code:
    Code:
    program HighAlcher;
    {.include srl/srl.scar}
    {.include SRL/SRL/skill/Magic.scar}
    var
      Alchs, x, y, TimesSlepted, utoh, LaLa  : integer;
    
    const
      DirectionToSprint = 'W';//direction to run from fight?
      Your_SRL_ID   = '';  // don't have this? go to:
      Your_SRL_Pass = '';  // http://www.stats.srl-forums.com/
      //Note the above is uneeded but very nice!
      
    ////////////////////////////////////////////////////////////////////////////////
    procedure SetupPlayers;
    begin
      NumberOfPlayers(1);//Don't Change This
      CurrentPlayer          := 0;//Int!
      Players[0].Name        := 'Username'; //UserName
      Players[0].Pass        := 'Password'; //Password
      Players[0].Nick        := 'sern';     //Nick Name
      Players[0].Active      := True;       //Use This Player [ True / False ]
      Players[0].Integers[1] := 25;         //Sleep Every How Many Minutes?
      Players[0].Integers[2] := 1;          //Sleep For How Long? [ Minutes ]
      Players[0].Booleans[1] := False;      //Use Sleeps? [True | False]
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    procedure ProgressReport; forward;
    
    ////////////////////////////////////////////////////////////////////////////////
    procedure ScriptTerminate;
    begin
      ProgressReport;
      SendSRLReport;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    function Stop : boolean;
    begin
      Result := False;
      if not(LoggedIn) then Result := True;
      if utoh >= 5 then
      begin
        Writeln('utoh');
        Result := True;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    procedure WaitAround;
    var
      I : integer;
    begin
      if not(LoggedIn) then TerminateScript;
      repeat
        Wait(100);
        Inc(i);
      until FindColor(x, y, 1778795, 732, 178, 732, 178) or (I >= 10);
      for I := 0 to 2 do
      begin
        wait(550 + random(40));
        if FindTalk then
        begin
          SRLRandomsReport;
          break;
        end;
      end;
      if FindNonInventoryRandoms then SRLRandomsReport;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    function AntiBan : boolean;
    begin
      if not(LoggedIn) then TerminateScript;
      case random(200) of
        4, 5, 6: Begin
         KeyDown(VK_Left);
         Wait(random(1000));
         KeyUp(VK_Left);
         WaitARound;
         Result := True;
        end;
        7, 8, 9: Begin
         KeyDown(VK_Right);
         Wait(random(1000));
         KeyUp(VK_Right);
         WaitAround;
         Result := True;
        end;
        10, 11, 12: begin
                      KeyDown(VK_Down);
                      Wait(235+ random(235));
                      KeyUp(VK_Down);
                      KeyDown(VK_Up);
                      KeyDown(VK_Left);
                      Wait(1000 + random(1000));
                      KeyUp(VK_Up);
                      Wait(500 + random(800));
                      KeyUp(VK_Left);
                      if FindNonInventoryRandoms then SRLRandomsReport;
                      Result := True;
                    end;
        13, 14, 15, 16: begin
              HoverSkill('magic', False);
              if FindNonInventoryRandoms then SRLRandomsReport;
              Result := True;
            end;
        17: begin
              BoredHuman;
              if FindNonInventoryRandoms then SRLRandomsReport;
              Result := True;
            end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    {Nice little funct to find if there are noted yew longs}
    function NotesThere : boolean;
    var
      yewnote : integer;
    begin
      yewnote := DTMFromString('78DA63B4676260F0666440058C4824903605A' +
           'AF14515C350630E54E347408D2D504D0C0135AE4035B104D4F803' +
           'D5441350E307541344404D00C2EFB8D40000EEF504E9');
      result := (GetCurrentTab = 4) and FindDTM(yewnote, x, y, 562, 320, 594, 355);
      freedtm(yewnote);
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    function FindIvenRands : boolean;
    begin
      Result := False;
      if not(LoggedIn) then TerminateScript;
      if (FindInventoryRandoms) then
      begin
        MouseBox(738, 208, 756, 463, 1);
        wait(50+random(50));
        if (SolveBox) then
        begin
          Result := True;
          SRLRandomsReport;
        end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    function CastHAlch : boolean;
    var
      Halch :integer;
      foundit :boolean;
    begin
      if not(GetCurrentTab = 7) then
      begin
        GameTab(7);
        wait(400+random(200));
      end;
      if not(GetCurrentTab = 7) then EXIT;
      Halch := DTMFromString('78DA63B465626048606440058C482490B606A' +
           'A894315C350E304541343408D11504D320135AE84D500004B8A03' +
           '34');
      foundit := FindDTM(Halch, x, y, 559, 338, 584, 361);
      freedtm(Halch);
      if foundit then
      begin
        MouseBox(567, 342, 578, 352, 1);
      end;
      result := foundit;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    function OnLongbows : boolean;
    var
      I : integer;
    begin
      wait(300+random(50));
      if not(LoggedIn) then TerminateScript;
      if (FindIvenRands) then
      begin
        SRLRandomsReport;
        EXIT;
      end;
      if not(NotesThere) then
      begin
        Writeln('No Notes That Time');
        EXIT;
      end;
      getMousePos(x, y);
      Mouse(x, y, 0, 0, true);
      Alchs := Alchs + 1;
      ReportVars[0] := ReportVars[0] + 65;
      ReportVars[1] := ReportVars[1] + 1;
      Result := True;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    procedure WaitWhileAlching;
    begin
      if not(LoggedIn) then TerminateScript;
      if AntiBan then EXIT;
      WaitAround;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    procedure SleepTime;
    begin
      if not(TimeFromMark(Lala) >= Players[CurrentPlayer].Integers[1] * (60000))
        or not Players[CurrentPlayer].Booleans[1] = True then EXIT;
      Writeln('Sleeping For Anti-BAN');
      Logout;
      MarkTime(LaLa);
      wait((Players[CurrentPlayer].Integers[2] * 60000) + random(60000));
      LoginPlayer;
      Writeln('Just Took A break for: ' + IntToStr(Players[CurrentPlayer].Integers[2] * 60000));
      inc(TimesSlepted);
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    Var LRT : Integer;
    
    Procedure ProgressReport;
    begin
      if (TimeFromMark(LRT) >= 310000) then
      begin
        SendSRLReport;
        MarkTime(LRT);
      end;
      Writeln('==========================================');
      Writeln(' -§ Longbow High Alchemy: FootBalljds §-  ');
      Writeln('-           Thanks SRL Team!!!           -');
      Writeln('==========================================');
      Writeln('Been High Alching For You For             ');
      Writeln(TimeRunning                                 );
      if (TimesSlepted > 0) then Writeln('Slepted: ' + IntToStr(TimesSlepted) + ' Times');
      Writeln('High Alched ' + IntToStr(Alchs)            );
      Writeln('Gained ' + IntToStr(Alchs * 65) + ' Exp   ');
      Writeln('==========================================');
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    procedure MainLoop;
    begin
      if not LoggedIn then
      begin
        LoginPlayer;
        SetAngle(True);
        FindNormalRandoms;
        Writeln('just logged in, waiting 2-5 seconds');
        wait(randomRange(2000, 5000));
      end;
      repeat
        MouseSpeed := 12 + random(3) + random(-2);
        if FindFight then
        begin
          RunAway(DirectionToSprint, True, 1, 5000);
          SRLRandomsReport;
        end;
        if (FindNonInventoryRandoms) then SRLRandomsReport;
        if CastHAlch then
        begin
          Status('Casting HighAlch');
          if OnLongbows then WaitWhileAlching else Inc(utoh);
          utoh := 0;
          Status('Casting HighAlch: on longbows');
        end else Inc(utoh);
        ProgressReport;
        SleepTime;
      until Stop;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    
    ////////////////////////////////////////////////////////////////////////////////
    begin
      SetupSRL;
      {SmartSetupEx(144, true, true, false);
      wait(10000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);}
      ActivateClient;
      ScriptId := '549';
      SRLID := Your_SRL_ID;
      SRLPassword := Your_SRL_Pass;
      wait(500);
      SetupPlayers;
      MarkTime(LRT);
      MarkTime(LaLa);
      MainLoop;
      Logout;
    end.
    ////////////////////////////////////////////////////////////////////////////////
    my problem is itl run but it after 0-6 alchs it moves the mouse outside of rs and stucks lol.... help would be nice

  2. #2
    Join Date
    Aug 2008
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Imo put in some writelns, see where it crashes and then try using a replacement code.

  3. #3
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    did that rofl
    try using it imo lol

  4. #4
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    i beleive i fixed the problem
    i changed
    SCAR Code:
    MouseSpeed := 12 + random(3) + random(-2);
    to
    SCAR Code:
    MouseSpeed := 12 - random(2);
    and it works. i guess thats a mouse speed weirdness

  5. #5
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    random(-2) = epic glitch
    I made a new script, check it out!.

  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    i realized... but why?

    also srls login seems to not work atm... it logs in then waits at the click to play button.
    il see what i can do about that quick

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

    Default

    Quote Originally Posted by footballjds View Post
    i realized... but why?

    also srls login seems to not work atm... it logs in then waits at the click to play button.
    il see what i can do about that quick
    antti mies fixed it http://www.villavu.com/forum/showthread.php?t=43917

  8. #8
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    I was to interested to stop, so i then did a writeln on what random(-anynumber) is
    lol!
    its either -124823yt812y34123512342341243123412341235123463686 7
    or 43572346582337645872634506230456203456928346587234
    not exactly as an int cannot be that long but you get the point

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
  •