Results 1 to 7 of 7

Thread: Even more help for my auto-alcher :D

  1. #1
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default Even more help for my auto-alcher :D

    Yes, I'm back with yet another problem with my script, I've managed to get it to compile and work quite well... for about 5 alchs. Because I set my script to tell me various stuff I found that the problem is that after those few alchs it can't find the yew long. If anyone could have a look at the script and see whats going on here, i would apreciate it alot.

    SCAR Code:
    //                    Auto-alcher v1.0                  //

    //                   Made by: dude_richard              //
    //               Description: alches yew longs in       //
    //                            any inventory slot        //
    //                      Made: 27/01/2008                //

    //                      Instructons                     //

    //       Fill out your player information in lines      //
    //       26-28. Then drag the cross-hair onto your      //
    //       runescape client and click run script.         //
    //       This should then let you alch perfectly fine!  //                 //

    //       Please post progress reports on the thread.    //

    Program AutoAlcher;
    {.include SRL/SRL.scar}

    Var
      AlchesDone, x,y, :integer;

    Const
      NumberOfAlches = 87; //How many alches you want to do
      Magelvl = '1'; //Type your mage lvl in for auto-respond

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';//Your runescape username
      Players[0].Pass := '';//Your runescape password
      Players[0].Nick := '';//3 letter of your runescape username
      Players[0].Active := True;
    End;

    Var
    YewLong
    , Highalch: integer;

    Procedure DeclareBMPs;
    Begin
         YewLong := BitmapFromString(19, 15, 'beNqV0sFKAlEUxnFdFCSWD' +
           '9OihW1a+ATtxKBySMoUFUFwExQEFhKikRoiEohESOAL+pcPPoabLY' +
           'TLYe6Z8+Oee2ZmjVmvNOlG49fisHPFSiSSUaFA/PmsEi/PD4h6NX2' +
           '7mb/ffY8qWoK2ZKi8zueJlBEFeRtA8mTicDmp2bJyp/tEwcVHOX7i' +
           'XxjYs5ONpfI/yDLUHW2zx3t6kOKtoCyL5O+0DoxfVkNjLXoZWUEfS' +
           'jSkK7a2NEN8aR1uhV/92zgko7Pc8P1FSpACig01bUGeBQM7fDwiGs' +
           'pSTA+C5P1XqE/9GIOH3SCnyzajVLe9uSkF7tZQd7cSpExWI9oKuSn' +
           'bAGoCkKda+rmZZutumaShJyMlqAJNSVDW0N8igPqCFKzWr2VuTw==' +
           '');

         Highalch := BitmapFromString(1, 19, 'beNqzNnS2hiJHSz04G6sIC' +
           'hcAdhAM6Q==');

    End;


    Procedure Alch;
    Begin
      Gametab(7);
    if (FindBitmap(Highalch, x, y)) then
    Mouse(x, y, 1, 1, True)
    if not (FindBitmap(Highalch, x, y)) then
    begin
    WriteLN('Couldnt find alch button...');
    WriteLN('Logging out and terminating script');
    Logout;
    TerminateScript;
    end;
    wait(800 + random(500));
    if (FindBitmap(YewLong, x, y)) then
    Mouse(x, y, 1, 1, True)
    if not (Findbitmap(YewLong, x, y)) then
    Begin
    WriteLN('Couldnt find any Yew Longs...');
    WriteLN('Logging out and terminating script');
    Logout;
    TerminateScript;
    End;
      AlchesDone := AlchesDone + 1;
    End;

    Function InChatLine(myString: string): Boolean;
    Begin
    Result := ( pos(myString, TheLine) <> 0 );
    End;

    Function ChatBack: Boolean; //originally by Lorax(SL Scripts)
    Begin
      SaveToChatLog;

      If ( OldLine = TheLine ) or ( pos(Players[CurrentPlayer].Nick, TheName) <> 0 ) then
        Exit;

      If InChatLine(Players[CurrentPlayer].Nick) then
      Begin
        Wait(1000 + Random(500));
        Case Random(6) of
          0: TypeSend('hello');
          1: TypeSend('hi');
          2: TypeSend('hey');
          3: TypeSend('hey you');
          4: TypeSend('yo');
          5: TypeSend('sup?');
        End;

        Result := True;
        Exit;
      End;

      If ( InChatLine('mage') or InChatLine('magic') or InChatLine('age') ) and
         ( InChatLine('lv') or InChatLine('leve') ) then
      Begin
        Wait(1000 + Random(500));
        case Random(2) of
          0: TypeSend ('im '+(magelvl)+'');
          1: Typesend ('me,'+(magelvl)+'.');
        End;

        Result := True;
        Exit;
      End;

      If InChatLine('hi ') or InChatLine('ello') or InChatLine('sup') or
         InChatLine('whats up') then
      Begin
        Wait(1000 + Random(500));
        case Random(4) of
          0: TypeSend('hello');
          1: TypeSend('hey');
          2: TypeSend('hey there');
          3: TypeSend('hi');
        End;

        Result := True;
        Exit;
      End;

      If InChatLine('lol') or InChatLine('hehe') or InChatLine('hihi') or
         InChatLine('haha') then
      Begin
        Wait(1000 + Random(500));
        case Random(4) of
          0: TypeSend('...');
          1: TypeSend('lool');
          2: TypeSend('rofl');
        End;

        Result := True;
        Exit;
      End;

        Result := True;
        Exit;
      End;

    Function FindFastRandoms: Boolean; //originally made by WT-Fakawi.
    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;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          7: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          8: RC;
          9: FindLamp(Players[CurrentPlayer].Skill);
          10: if FindTalk then
              Result := True;
          11: ClickToContinue;
        End;
        wait(1);
      End;
    End;

    Procedure ProgressReport;
     Begin
      ClearDebug
      WriteLn('<<<<<<<<<<<<Auto Alcher v1.0>>>>>>>>>>>>');
      WriteLn('Alched for ' + TimeRunning + ' ');
      WriteLn('Did ' + IntToStr(AlchesDone) + ' High Alches ');
      WriteLn('Earnt ' + IntToStr(AlchesDone * 65) + ' XP');
      WriteLn('<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>');
      WriteLn(' ');
      WriteLN('Please post progress reports on thread')
      WriteLn(' ')
      Wait(2000 + random(200))
    End;

    Procedure AntiRandoms;
     Begin
      ChatBack;
      FindNormalRandoms;
      FindFastRandoms;
      FindTalk;
     End;

    Procedure Prepare;
    Begin
     SetupSRL;
     ClearDebug;
     DeclareBMPs;
     ActivateClient;
     DeclarePlayers;
     LoginPlayer;
     SRLRandomsReport;
     GameTab(7);
    End;

    Begin
    Prepare;
    Repeat
     Alch;
     AntiRandoms;
     ProgressReport;
     Until (ALchesDone >= NumberOfAlches);
     If (ALchesDone >= NumberOfAlches) then
     Logout;
     ProgressReport;
     FreeBitmap(YewLong);
     FreeBitmap(Highalch);
    End.


    Thanks to all

  2. #2
    Join Date
    Sep 2006
    Location
    My Computer
    Posts
    149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just have one quick question when this script is done what will it alch just to be sure will it alch just yew longs or could it also alch steel plates?

    EDIT: and something you might want to take out of the auto talk is the age question because they might report you for asking personal information

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Have you made sure that the script always presses the Alch button, as if it doesn't, then it doesn't go to the inventory gametab, so can't find the bitmap, thus it exits.
    Also, since you're using Bitmaps for to look through your inventory, try using a low level tolerance (or switch to DTM's) as I'm guessing the bitmap involves part of the inventory, so if it can't find Longbow AND the same part of the inventory, then it would think the Longbow isn't there.

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by mixster05 View Post
    Have you made sure that the script always presses the Alch button, as if it doesn't, then it doesn't go to the inventory gametab, so can't find the bitmap, thus it exits.
    Also, since you're using Bitmaps for to look through your inventory, try using a low level tolerance (or switch to DTM's) as I'm guessing the bitmap involves part of the inventory, so if it can't find Longbow AND the same part of the inventory, then it would think the Longbow isn't there.
    Alright, I'll try using a lwer level tolerance but since last time I try to use DTMs it terribly messed up ill stick with bitmaps

    Thanks though

    Quote Originally Posted by eurostylz View Post
    Just have one quick question when this script is done what will it alch just to be sure will it alch just yew longs or could it also alch steel plates?

    EDIT: and something you might want to take out of the auto talk is the age question because they might report you for asking personal information

    It doesn't alch steel plates but I'm adding it into later versions, when it actually decides to work.

  5. #5
    Join Date
    Sep 2006
    Location
    My Computer
    Posts
    149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How about the time between alches im still learning scar by try changing the wait time to around 4 second, if that helps

  6. #6
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by eurostylz View Post
    How about the time between alches im still learning scar by try changing the wait time to around 4 second, if that helps
    Nah, the time I've used has worked perfectly for me when I'm just using coordinates ones, and I don't think time would effect whether it found the bitmap or not (unless it had like 10 milliseconds)

    Good job trying to help others though, I found it a great way to get well at scripting

  7. #7
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ive looked a bit and try to add some wait before bitmap search..
    Took a look at your script posting some fixed stuff in 2 min

    SCAR Code:
    //                    Auto-alcher v1.0                  //

    //                   Made by: dude_richard              //
    //               Description: alches yew longs in       //
    //                            any inventory slot        //
    //                      Made: 27/01/2008                //

    //                      Instructons                     //

    //       Fill out your player information in lines      //
    //       26-28. Then drag the cross-hair onto your      //
    //       runescape client and click run script.         //
    //       This should then let you alch perfectly fine!  //                 //

    //       Please post progress reports on the thread.    //

    Program AutoAlcher;
    {.include SRL/SRL.scar}

    Var
      AlchesDone, x,y, :integer;

    Const
      NumberOfAlches = 87; //How many alches you want to do
      Magelvl = '1'; //Type your mage lvl in for auto-respond
      // Theres a function that results your Skill level!!

       // GetLevelSkill or something like that!
       // Look in manual or in Includes..

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';//Your runescape username
      Players[0].Pass := '';//Your runescape password
      Players[0].Nick := '';//3 letter of your runescape username
      Players[0].Active := True;
     
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      // Idk if thats needed! Have been away for sometime..
    End;

    Var
    YewLong, Highalch : integer;

    Procedure DeclareBMPs;
    Begin
         YewLong := BitmapFromString(19, 15, 'beNqV0sFKAlEUxnFdFCSWD' +
           '9OihW1a+ATtxKBySMoUFUFwExQEFhKikRoiEohESOAL+pcPPoabLY' +
           'TLYe6Z8+Oee2ZmjVmvNOlG49fisHPFSiSSUaFA/PmsEi/PD4h6NX2' +
           '7mb/ffY8qWoK2ZKi8zueJlBEFeRtA8mTicDmp2bJyp/tEwcVHOX7i' +
           'XxjYs5ONpfI/yDLUHW2zx3t6kOKtoCyL5O+0DoxfVkNjLXoZWUEfS' +
           'jSkK7a2NEN8aR1uhV/92zgko7Pc8P1FSpACig01bUGeBQM7fDwiGs' +
           'pSTA+C5P1XqE/9GIOH3SCnyzajVLe9uSkF7tZQd7cSpExWI9oKuSn' +
           'bAGoCkKda+rmZZutumaShJyMlqAJNSVDW0N8igPqCFKzWr2VuTw==' +
           '');

         Highalch := BitmapFromString(1, 19, 'beNqzNnS2hiJHSz04G6sIC' +
           'hcAdhAM6Q==');

    End;


    Procedure Alch;
    Begin
      Gametab(7);
      Wait(RandomRange(300, 500);
      if (FindBitmap(Highalch, x, y)) then
       Mouse(x, y, 1, 1, True)
       Wait(RandomRange(300, 500);
         if not (FindBitmap(Highalch, x, y)) then
         begin
           WriteLN('Couldnt find alch button...');
           WriteLN('Logging out and terminating script');
           Logout;
           TerminateScript;
         end;
         Wait(RandomRange(300, 500);
         if (FindBitmap(YewLong, x, y)) then
           Mouse(x, y, 1, 1, True)
           Wait(RandomRange(300, 500);
             if not (Findbitmap(YewLong, x, y)) then
             Begin
               WriteLN('Couldnt find any Yew Longs...');
               WriteLN('Logging out and terminating script');
               Logout;
               TerminateScript;
             End;
         AlchesDone := AlchesDone + 1;
    End;

    Function InChatLine(myString: string): Boolean;
    Begin
    Result := ( pos(myString, TheLine) <> 0 );
    End;

    Function ChatBack: Boolean; //originally by Lorax(SL Scripts)
    Begin
      SaveToChatLog;

      If ( OldLine = TheLine ) or ( pos(Players[CurrentPlayer].Nick, TheName) <> 0 ) then
        Exit;

      If InChatLine(Players[CurrentPlayer].Nick) then
      Begin
        Wait(1000 + Random(500));
        Case Random(6) of
          0: TypeSend('hello');
          1: TypeSend('hi');
          2: TypeSend('hey');
          3: TypeSend('hey you');
          4: TypeSend('yo');
          5: TypeSend('sup?');
        End;

        Result := True;
        Exit;
      End;

      If ( InChatLine('mage') or InChatLine('magic') or InChatLine('age') ) and
         ( InChatLine('lv') or InChatLine('leve') ) then
      Begin
        Wait(1000 + Random(500));
        case Random(2) of
          0: TypeSend ('im '+(magelvl)+'');
          1: Typesend ('me,'+(magelvl)+'.');
        End;

        Result := True;
        Exit;
      End;

      If InChatLine('hi ') or InChatLine('ello') or InChatLine('sup') or
         InChatLine('whats up') then
      Begin
        Wait(1000 + Random(500));
        case Random(4) of
          0: TypeSend('hello');
          1: TypeSend('hey');
          2: TypeSend('hey there');
          3: TypeSend('hi');
        End;

        Result := True;
        Exit;
      End;

      If InChatLine('lol') or InChatLine('hehe') or InChatLine('hihi') or
         InChatLine('haha') then
      Begin
        Wait(1000 + Random(500));
        case Random(4) of
          0: TypeSend('...');
          1: TypeSend('lool');
          2: TypeSend('rofl');
        End;

        Result := True;
        Exit;
      End;

        Result := True;
        Exit;
      End;

    Procedure ProgressReport;
     Begin
      ClearDebug
      WriteLn('<<<<<<<<<<<<Auto Alcher v1.0>>>>>>>>>>>>');
      WriteLn('Alched for ' + TimeRunning + ' ');
      WriteLn('Did ' + IntToStr(AlchesDone) + ' High Alches ');
      WriteLn('Earnt ' + IntToStr(AlchesDone * 65) + ' XP');
      WriteLn('<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>');
      WriteLn(' ');
      WriteLN('Please post progress reports on thread')
      WriteLn(' ')
    End;

    procedure AntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      if FindFight then
      begin
        RunTo(WhatDirection,True);
      end
    end;

    Procedure Prepare;
    Begin
     SetupSRL;
     ClearDebug;
     DeclareBMPs;
     ActivateClient;
     DeclarePlayers;
     LoginPlayer;
     SRLRandomsReport;
     GameTab(7);
    End;

    Begin
    Prepare;
    Repeat
     Alch;
     AntiRandoms;
     ProgressReport;
     Until (ALchesDone >= NumberOfAlches);    // <--- Not accepable!
     If (ALchesDone >= NumberOfAlches) then  // <--- Not needed!
     Logout;
     ProgressReport;
     FreeBitmap(YewLong);
     FreeBitmap(Highalch);
    End.

    Fix your standarts and i be happy to read more..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto Alcher
    By earspam in forum OSR Help
    Replies: 10
    Last Post: 12-25-2008, 12:04 AM
  2. AbsTrACt Auto Alcher! The Ultimate Alcher!
    By AbsTrACt'^.| in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 05-24-2008, 05:52 PM
  3. [SRL] [RS2] Auto-Alcher
    By enoyhs in forum RS3 Outdated / Broken Scripts
    Replies: 13
    Last Post: 08-16-2007, 06:19 PM
  4. [RS2] New Auto Alcher!
    By Syrex in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 03-03-2007, 10:18 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
  •