Results 1 to 2 of 2

Thread: Script isn't clicking

  1. #1
    Join Date
    Jan 2008
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script isn't clicking

    SCAR Code:
    program AbsTrACtAutoAlcherSmartVersion;//This is my very first script but I believe it is a pretty good one.
     
      {///////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
      { Title:           AbsTrACtAutoAlcher                                                   }
      { Version:         1.01 SMART                                                           }
      { Author:          AbsTrACt'^.|                                                         }
      { Settings:        I don't use colors in this script so it's the same...                }
      { Recommendation:  Use it in Barrows Tombs as there are no randoms there                }
      {although you may find some persons there and I didn't made an AutoResponder yet        }
      { SetUp Lines:                                                                          }
      {///////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
     
      {.include SRL\SRL\Misc\Smart.scar}
      {.include SRL\SRL.scar}
      {.include SRL\SRL\misc\Users.scar}
    var
      Alch: Integer;
      Alchs: Integer;
      Alchspell: Integer;
      AlchLong: Integer;
      x, y: Integer;
     
      {/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
      {                   Begin SetUp                  }
      {\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
    const
     
      RunD           = 'n'; //Direction to run from Attacking Random (n, s, w, e)
      ItemToAlchName = 'yew longbow';
      //Name of the item you are alching (for antiban)
      Alchstodo = 20; //How many alchs the bot should do?
     
    procedure DeclarePlayers; // this procedure is used to log players in
    begin
      HowManyPlayers := 5;               // Set Number of Players here.
      NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
      CurrentPlayer := 0;                // CurrentPlayer = Array Index
     
      Players[0].Name := 'USERNAME';//Your account username
      Players[0].Pass := 'PASSWORD';//Your account password
      Players[0].Nick := 'ser';     //3-4 Small letters of your username
      Players[0].Active := true;
      //Player in use or not in use (True for in use, False for not in use)
     
      Players[1].Name := 'USERNAME';//Your account username
      Players[1].Pass := 'PASSWORD';//Your account password
      Players[1].Nick := 'ser';     //3-4 Small letters of your username
      Players[1].Active := false;
      //Player in use or not in use (True for in use, False for not in use)
     
      Players[2].Name := 'USERNAME';//Your account username
      Players[2].Pass := 'PASSWORD';//Your account password
      Players[2].Nick := 'ser';     //3-4 Small letters of your username
      Players[2].Active := false;
      //Player in use or not in use (True for in use, False for not in use)
     
      Players[3].Name := 'USERNAME';//Your account username
      Players[3].Pass := 'PASSWORD';//Your account password
      Players[3].Nick := 'ser';     //3-4 Small letters of your username
      Players[3].Active := false;
      //Player in use or not in use (True for in use, False for not in use)
     
      Players[4].Name := 'USERNAME';//Your account username
      Players[4].Pass := 'PASSWORD';//Your account password
      Players[4].Nick := 'ser';     //3-4 Small letters of your username
      Players[4].Active := false;
      //Player in use or not in use (True for in use, False for not in use)
    end;
      {/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
      {                     End SetUp                  }
      {\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
      {                Do Not Touch Below              }
      {\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
      {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
     
    procedure Randoms;
    begin
      FindTalk;           //finds talkin randoms
      FindNormalRandoms;  //finds normal randoms
      SolveChatRandom;    //solves chat randoms
      FindLamp('Magic');  //solves lamp and then choses a skill to update
      SolvePinball;       //solves pinball random
      DwarfItem;          //dropes dwarf items
      if (FindFight) then //runs away from fight
      begin
        MakeCompass('n');
        RunTo(RunD, true);
        Wait(3500 + Random(3000));
        RunTo(RunD, true);
      end;
    end;
     
    procedure AntiBan;
    begin
      case Random(3) of
     
        0:
        begin
          Wait(3137 + (Random(1350)));
          HoverSkill('Magic', false);
          Wait(3137 + (Random(711)));
          Randoms;
          KeyDown(118);
          Wait(50 + Random(100));
          KeyUp(118);
        end;
     
        1:
        begin
          Wait(3137 + (Random(1250)));
          AlmostLogout;
          Wait(3137 + (Random(747)));
          Randoms;
          KeyDown(118);
          Wait(50 + Random(100));
          KeyUp(118);
        end;
     
        2:
        begin
          Wait(3000 + (Random(1000)));
          RandomMovement;
          Wait(3000 + (Random(1000)));
          Randoms;
          KeyDown(118);
          Wait(50 + Random(100));
          KeyUp(118);
        end;
      end;
    end;
     
    procedure DTMs;
    begin
      Alchspell := DTMFromString('78DA63E465606010624001BFBEF1806946289' +
        'F1124CFCA80061851D50802092E026AF8895443C82E1120C14F84' +
        '7BB8A9E06651202148408D18901026A006242F46400D1F116A388' +
        '950C342841A6622DCCC4A4438731356030042560420');
     
      AlchLong := DTMFromString('78DA631463606010674001F9497C0CFF81342' +
        '310FF07024690BC06031A604422813427905024428D1A0135DC40' +
        '429D801A4122D4C803094D026A5488700F488D340135AA4042888' +
        '01A5038F31250230724F808A8E123C21C2E202146445CC8E25703' + '0048AA08EE');
    end;
     
    procedure Report;
    begin
      Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      Writeln('| AbsTrACt Auto Alcher Report! Feel free to post');
      Writeln('| Alched ' + IntToStr(Alch) + ' ' + ItemToAlchName + 's.');
      Writeln('| Worked for ' + TimeRunning);
      Writeln('| Exp gained ' + IntToStr(alchs * 65));
      Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      Writeln('Made By AbsTrACt!');
    end;
     
    procedure Finished;
    begin
      if (alchs = alchstodo) then
      begin
        Logout;
        Report;
      end;
    end;
     
    procedure Alching;
    begin
      KeyDown(118)
      Wait(50 + Random(100))
      KeyUp(118)
      repeat
        Wait(500 + Random(150))
        if FindDTM(Alchspell, x, y, MIX1, MIY1, MIX2, MIY2) then
          Mouse(x, y, 10, 10, true);
        if FindDTM(AlchLong, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 10, 10, true);
        end;
        Wait(2000 + Random(100));
        case Random(7) of
          0:
            Wait(150 + (Random(376)));
          1:
            Wait(55 + (Random(10)));
          2:
            Wait(0 + (Random(250)));
          3:
            AntiBan;
          4:
            Wait(0 + (Random(150)));
          5:
            Wait(150 + (Random(100)));
          6:
            Wait(0 + (Random(100)));
        end;
        Finished;
      until alchs = alchstodo;
    end;
     
    procedure Setup;
    begin
      smartSetup('world158', true, true);
      while not (SmartReady) do
        Wait(100);
      SetTargetDC(SmartGetDC);
      if not (LoggedIn) then
        while not (SmartGetColor(386, 249) = 65535) do
          Wait(100);
      SetupSRL;;
      wait(1000)
      ActivateClient;
      wait(1000)
    end;
     
    begin
      SetupSRL;
      Setup;
      DeclarePlayers;
      LoginPlayer;
      DTMs;
      Alching;
      FreeDTM(Alchspell);
      FreeDTM(AlchLong);
      Report;
    end.

    The error is that the script doesn't click on the yew longs when it should. The DTM's are correct.

    Any help?

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add a wait between this lines:
    SCAR Code:
    if FindDTM(Alchspell, x, y, MIX1, MIY1, MIX2, MIY2) then
          Mouse(x, y, 10, 10, true);
        if FindDTM(AlchLong, x, y, MIX1, MIY1, MIX2, MIY2) then
    And delete FindTalk,SolveChat,SolvePinball, and for FindLamp use LampSkill := 'magic'.


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script clicking in top right corner
    By rwj4real in forum OSR Help
    Replies: 4
    Last Post: 02-15-2009, 05:00 AM
  2. clicking on an npc
    By patman16 in forum OSR Help
    Replies: 3
    Last Post: 07-29-2008, 03:19 PM
  3. Dmt clicking help
    By MetalancA in forum OSR Help
    Replies: 7
    Last Post: 06-11-2008, 04:06 AM
  4. Help With Clicking DTM
    By Esteban in forum OSR Help
    Replies: 11
    Last Post: 06-05-2007, 07:54 PM
  5. clicking on a NPC
    By legendaryhero90 in forum OSR Help
    Replies: 9
    Last Post: 02-25-2007, 10:53 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
  •