Results 1 to 9 of 9

Thread: Sorry me again (Type mismatch in script)

  1. #1
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Sorry me again (Type mismatch in script)

    SCAR Code:
    procedure chopdemwillows;
    begin
      if not loggedin then Exit;
     
     if (FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo'))then
     Mouse(x, y, 5, 5, True);
     wait(3000);

     if (not(FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo'))) then

     begin
        Logout;
       writeln('Cant find willows');
      Exit;
      end;
    end;

    this is the whole script
    SCAR Code:
    //Thanks to
    //Negaal
    //EvilChicken
    //and people i have i cant remember

    program StrikerzWillowWhacker;
    {.include SRL/SRL.scar}
    Const

    SRLStatsID = '3682';
    SRLStatsPass = 'bjrobman';
    LoadsPerPlayer = 10;// how many loads you want it to do.....
    {==============================================================================}
    var
     i, x, y, bank, rock, tree, brokenaxe, loads, Xp : integer;



    {==============================================================================}
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'username';//Runescape Username
      Players[0].Pass := 'password';//Runescape Password
      Players[0].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[0].Active := True;// Use this Dude?.?.?

      {Players[1].Name := 'username';//Runescape Username
      Players[1].Pass := 'password';//Runescape Password
      Players[1].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[1].Active := True;// Use this Dude?.?.?

      Players[2].Name := 'username';//Runescape Username
      Players[2].Pass := 'password';//Runescape Password
      Players[2].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[2].Active := True;// Use this Dude?.?.?}

    end;
    {==============================================================================}
    Procedure Antirandoms;
    begin
     FindTalk;
     FindNormalRandoms;
     SolveChatRandom;
     FindLamp('woodcutting');
     SolvePinball;
     DwarfItem;
      If(FindFight)Then
      Begin
      MakeCompass('N');
      RunTo('S', True);
      Wait(10000 +Random(3000));
      RunTo('N', True);
     end;
    end;
    {==============================================================================}
    Procedure AntiBan;
    begin
      case Random(20) of
        0: begin
             RandomRClick;
             Wait(40 + Random(20));
             Mouse(40 - Random(20), 30 + Random(20), 5, 5, False);
             Wait(10 + Random(55));
             MMouse(5 + Random(60),5 + Random(60),5,5);
           end;
        1: begin
             BoredHuman;
             Wait(40 + Random(30));
             MMouse(20,49,10,10);
           end;
        2: begin
             RandomMovement;
             Wait(40 + Random(25));
             MMouse(403 - Random(45), 200 - Random(35), 5, 5);
           end;
        3: AlmostLogout;
        4: begin
             PickUpMouse;
             Wait(30 + Random(40));
             HoverSkill('random', False);
           end;
        5: begin
             HoverSkill('mining', False);
           end;
       end;
    end;
    {==============================================================================}
    Procedure Responder;
    begin
      if InChat('yo') or InChat('hello') or InChat('hats') or InChat('ell')
      or InChat('assu') or InChat('sup') or InChat('h ey') or InChat('h ello')
      or InChat('hi') or InChat('was up') or InChat('w hats up') then

      case Random(5) of
      0 : Typesend('hi');
      1 : Typesend('hello:)');
      2 : Typesend('hi...ima turn chat off');
      3 : Typesend('Cant talk busy.....soz');
      4 : Typesend('Wassup');
      end;
      if InChat('auto') or InChat('macro') or InChat('cheater') or InChat('otte') or InChat('bot') then
      case Random(6) of
       0: Typesend('who me?');
       1: Typesend('Sure.....');
       2: Typesend('hmm...am i?');
       3: Typesend('Takes one to know one:P');
       4: Typesend('i hate autoers...they runined the game');{-------- not really :P}
       5: Typesend('no bots anymore dummy jagex killed them all');
      end;
    end;
    {==============================================================================}
    procedure walktotrees;
    begin
      if FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if(Not(FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2))) then

    if  FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if (not(FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2))) then

    begin
         Logout;
        writeln('We''re lost!');
       Exit;
      end;
    end;
    {==============================================================================}
    Procedure Walktobank;
    begin
      if FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);


      if (not(FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2))) then

      if FindSymbol(x, y, 'fish') then
        Mouse(x, y, 5, 5, True);
        FFlag(0);

      if (Not(FindSymbol(x, y, 'fish'))) then

      begin
        Logout;
        writeln('Were lost!');
        Exit;
      end;
    end;
    {==============================================================================}
    function CheckAxe: boolean;
    begin
        if Pos('an axe', GetBlackChatMessage) = 17 then
        begin
            writeln('You do not have a suitable axe....');
            result := false;
        end else result := true;
    end;
    {==============================================================================}
    procedure CheckEnt;//Thank choo Hy71195
    var
      eex, eey : integer;
    begin
      if FindColorTolerance(eex, eey, 388075, 85, 15, 115, 15, 30) then
      begin
        WriteLn('Ent Found! ~Advoiding~');
        Wait(7000+random(2548));
      end;
    end;
    {==============================================================================}
    procedure chopdemwillows;
    begin
      if not loggedin then Exit;
     
     if (FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo'))then
     Mouse(x, y, 5, 5, True);
     wait(3000);

     if (not(FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo'))) then

     begin
        Logout;
       writeln('Cant find willows');
      Exit;
      end;
    end;
    {==============================================================================}
    procedure FindBirdsNest;
    var
      tries, x, y: Integer;
      s: string;
    begin
      if (not (GetLastChatText(s))) then
        LastChatter(s);
      if (Pos(s, 'A bird') <> 0) then
      begin
        repeat
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            KeyDown(VK_LEFT);
            Wait(700 + Random(500));
            KeyUp(VK_LEFT);
            Wait(400 + Random(300));
          end;
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            x := 648;
            y := 83;
            tries := tries + 1;
            FindColorSpiral(x, y, 241, 570, 5, 725, 155);
            Mouse(x + 3, y + 3, 2, 2, True);
            FFlag(0);
            Wait(200 + Random(100));
          end;
          if (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            WriteLn('Birds Nest Found');
            Wait(450 + Random(400));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            FFlag(0);
            Wait(500 + Random(300));
            if (Screenshots) then
              SaveScreenshot('Birds Nest - SRL - ' + IntToStr(GetTimeRunning) + '.bmp');
            tries := tries + 100;
            Birdsnest := Birdsnest + 1;
            Mouse(583, 226, 2, 2, False);
            Wait(100 + Random(100));
            ChooseOption('Examine');
            Exit;
          end;
        until (FindObj(x, y, 'Take Bird', 3952984, 10)) or
          (FindObj(x, y, 'Take Bird', 1713706, 10)) or
          (FindObj(x, y, 'Take Bird', 1581604, 10)) or (tries > 5)
      end;
    end;
    {==============================================================================}
    procedure BankDaShite;
    begin
     if (not(Loggedin)) then  exit;
     OpenBankFast('db');
     wait(856)
     Deposit(2, 28, 2);
     Loads := Loads + 1;
     Xp := Xp + 30 *28; // Change the 30 to however much xp a willow gives
     CloseBank;
     end;
    {==============================================================================}
    procedure AntiNoob;
    begin
      If SRLStatsID ='' then
      begin
        WriteLn('Hmm Please Get a Stats Account');
      end;
      If SRLStatsPass ='' then
      Begin
        WriteLn('Umm....You forgot your PW in stats')
      end;
    end;
    {==============================================================================}
    procedure ProgressReport;
    var
     i: integer;
    begin
      WriteLn('~~~~~~~~~~~~~~~~~~~~ Strikers Willow Killer ~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('~ Worked for     : ' + TimeRunning);
      WriteLn('~ banked         : '+ IntToStr(Loads));
      WriteLn('~ gained         : ' + IntToStr(Xp));
      WriteLn('+IntToStr(i) + players[i].nick + players[i].active');
    end;
    {==============================================================================}
    procedure LoadDTMS;
    begin

      Bank := DTMFromString('78DA637CC7C8C0709D010594E6E6816946289' +
           'F91998981E124AA9A172FDFA2AA790D641D25A0E63990F580809A' +
           'FF40D663026A1881EEB98A5F0D00FCA317DB');

      Rock := DTMFromString('78DA637CC9C8C0F087010504FB8530FC07D28' +
           'C503EE37320EB07AA1A77470F881C4CCD0B46241E0418EB9AA0AA' +
           '79826917869AD7986A6CCCEC50D4000070610D20');

      Tree := DTMFromString('78DA63BCCDC8C0F0910103FC076246100D048' +
           'CB780ACAFA8F2C632CC609A11CA67BC06647D4655236AC489AAE6' +
           '2E90F585809A3B40D60754355A2EBCA86AAE0359EFF19B030060C' +
           '61192');

      BrokenAxe := DTMFromString('78DA6364646660D8C480029A920419FE03694' +
           '6289F910FA86605031A60442281F41F2606868304D43011610E33' +
           '50CD66026AD8099B030019A3074C');
    {==============================================================================}
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
      walktotrees;
      chopdemwillows
      Walktobank
      fixbank;
      BankDaShite until (false)
    end.

    and sorry for posting in the help section so much i really want to release my script to the public thanks in advance
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

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

    Default

    just need to put square brakets [ ] around 'illo' as it takes in a TStringArray and not just a String (the only difference if you put multiple strings into a TStringArray by separating them with a comma, such as ['illo', 'ill', 'llow] so you can make it more accurate or find different objects or just to make sure it doesn't miss it )
    Edit: Don't worry about posting a lot in the help section, it just means you're trying to script and we (well, me atleast) appreciate that
    Also, you need to add a begin and eng to your if so it runs the mouse and the wait and you can add else instead of making it do the not(FindObjTPA) as that means it will run the Mouse and Wait if it does find it, if it doesn't then it will run the logout etc.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Feb 2008
    Location
    In the woods of Finland
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure chopdemwillows;
    begin
      if not loggedin then Exit;
     
     if (FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, ['illo']))then  // []'s needed
     Mouse(x, y, 5, 5, True);
     wait(3000);
     
     if (not(FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, ['illo']))) then // same
     
     begin
        Logout;
       writeln('Cant find willows');
      Exit;
      end;
    end;

    Edit: Mixster ftw
    Cut & Drop or Stock Powerchonker


    Teh 3vil Oar H1t5 Chuck Norris Stone c0ld

  4. #4
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Is that piece of code what i posted?
    What i posted was no error!

    And FindObjTPA doesnt have a TStringArray.. just 'UpText : String;'

    Once again, this works for me:

    SCAR Code:
    //Thanks to
    //Negaal
    //EvilChicken
    //Floor66
    //and people i have i cant remember

    program StrikerzWillowWhacker;
    {.include SRL/SRL.scar}
    Const

    SRLStatsID = '3682';
    SRLStatsPass = 'bjrobman';
    LoadsPerPlayer = 10;// how many loads you want it to do.....
    {==============================================================================}
    var
     x, y, bank, rock, tree, brokenaxe, loads, Xp : integer;
     WillowXP : Extended; //Added this! Willow XP count is 37.5!



    {==============================================================================}
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'username';//Runescape Username
      Players[0].Pass := 'password';//Runescape Password
      Players[0].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[0].Active := True;// Use this Dude?.?.?

      {Players[1].Name := 'username';//Runescape Username
      Players[1].Pass := 'password';//Runescape Password
      Players[1].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[1].Active := True;// Use this Dude?.?.?

      Players[2].Name := 'username';//Runescape Username
      Players[2].Pass := 'password';//Runescape Password
      Players[2].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[2].Active := True;// Use this Dude?.?.?}

    end;
    {==============================================================================}
    Procedure Antirandoms;
    begin
     FindTalk;
     FindNormalRandoms;
     SolveChatRandom;
     FindLamp('woodcutting');
     SolvePinball;
     DwarfItem;
      If(FindFight)Then
      Begin
      MakeCompass('N');
      RunTo('S', True);
      Wait(10000 +Random(3000));
      RunTo('N', True);
     end;
    end;
    {==============================================================================}
    Procedure AntiBan;
    begin
      case Random(20) of
        0: begin
             RandomRClick;
             Wait(40 + Random(20));
             Mouse(40 - Random(20), 30 + Random(20), 5, 5, False);
             Wait(10 + Random(55));
             MMouse(5 + Random(60),5 + Random(60),5,5);
           end;
        1: begin
             BoredHuman;
             Wait(40 + Random(30));
             MMouse(20,49,10,10);
           end;
        2: begin
             RandomMovement;
             Wait(40 + Random(25));
             MMouse(403 - Random(45), 200 - Random(35), 5, 5);
           end;
        3: AlmostLogout;
        4: begin
             PickUpMouse;
             Wait(30 + Random(40));
             HoverSkill('random', False);
           end;
        5: begin
             HoverSkill('mining', False);
           end;
       end;
    end;
    {==============================================================================}
    Procedure Responder;
    begin
      if InChat('yo') or InChat('hello') or InChat('hats') or InChat('ell')
      or InChat('assu') or InChat('sup') or InChat('h ey') or InChat('h ello')
      or InChat('hi') or InChat('was up') or InChat('w hats up') then

      case Random(5) of
      0 : Typesend('hi');
      1 : Typesend('hello:)');
      2 : Typesend('hi...ima turn chat off');
      3 : Typesend('Cant talk busy.....soz');
      4 : Typesend('Wassup');
      end;
      if InChat('auto') or InChat('macro') or InChat('cheater') or InChat('otte') or InChat('bot') then
      case Random(6) of
       0: Typesend('who me?');
       1: Typesend('Sure.....');
       2: Typesend('hmm...am i?');
       3: Typesend('Takes one to know one:P');
       4: Typesend('i hate autoers...they runined the game');{-------- not really :P}
       5: Typesend('no bots anymore dummy jagex killed them all');
      end;
    end;
    {==============================================================================}
    procedure walktotrees;
    begin
      if FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if(Not(FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2))) then

    if  FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if (not(FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2))) then

    begin
         Logout;
        writeln('We''re lost!');
       Exit;
      end;
    end;
    {==============================================================================}
    Procedure Walktobank;
    begin
      if FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);


      if (not(FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2))) then

      if FindSymbol(x, y, 'fish') then
        Mouse(x, y, 5, 5, True);
        FFlag(0);

      if (Not(FindSymbol(x, y, 'fish'))) then

      begin
        Logout;
        writeln('Were lost!');
        Exit;
      end;
    end;
    {==============================================================================}
    function CheckAxe: boolean;
    begin
        if Pos('an axe', GetBlackChatMessage) = 17 then
        begin
            writeln('You do not have a suitable axe....');
            result := false;
        end else result := true;
    end;
    {==============================================================================}
    procedure CheckEnt;//Thank choo Hy71195
    var
      eex, eey : integer;
    begin
      if FindColorTolerance(eex, eey, 388075, 85, 15, 115, 15, 30) then
      begin
        WriteLn('Ent Found! ~Advoiding~');
        Wait(3000+random(4000));
      end;
    end;
    {==============================================================================}
    procedure chopdemwillows;
    begin
     if not Loggedin then Exit;

     if (FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo')) then
     Mouse(x, y, 5, 5, True);
     wait(3000);

     if (not(FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, 'illo'))) then

     begin
        Logout;
       writeln('Cant find willows');
      Exit;
      end;
    end;
    {==============================================================================}
    procedure FindBirdsNest;
    var
      tries, x, y: Integer;
      s: string;
    begin
      if (not (GetLastChatText(s))) then
        LastChatter(s);
      if (Pos(s, 'A bird') <> 0) then
      begin
        repeat
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            KeyDown(VK_LEFT);
            Wait(700 + Random(500));
            KeyUp(VK_LEFT);
            Wait(400 + Random(300));
          end;
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            x := 648;
            y := 83;
            tries := tries + 1;
            FindColorSpiral(x, y, 241, 570, 5, 725, 155);
            Mouse(x + 3, y + 3, 2, 2, True);
            FFlag(0);
            Wait(200 + Random(100));
          end;
          if (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            WriteLn('Birds Nest Found');
            Wait(450 + Random(400));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            FFlag(0);
            Wait(500 + Random(300));
            if (Screenshots) then
              SaveScreenshot('Birds Nest - SRL - ' + IntToStr(GetTimeRunning) + '.bmp');
            tries := tries + 100;
            Birdsnest := Birdsnest + 1;
            Mouse(583, 226, 2, 2, False);
            Wait(100 + Random(100));
            ChooseOption('Examine');
            Exit;
          end;
        until (FindObj(x, y, 'Take Bird', 3952984, 10)) or
          (FindObj(x, y, 'Take Bird', 1713706, 10)) or
          (FindObj(x, y, 'Take Bird', 1581604, 10)) or (tries > 5)
      end;
    end;
    {==============================================================================}
    procedure BankDaShite;
    begin
     if (not(Loggedin)) then  exit;
     OpenBankFast('db');
     wait(856)
     Deposit(2, 28, 2);
     Loads := Loads + 1;
     WillowXP := 37.5;
     Xp := Xp + WillowXP * 28; // Change the 30 to however much xp a willow gives
     CloseBank;
     end;
    {==============================================================================}
    procedure AntiNoob;
    begin
      If SRLStatsID ='' then
      begin
        WriteLn('Hmm Please Get a Stats Account');
      end;
      If SRLStatsPass ='' then
      Begin
        WriteLn('Umm....You forgot your PW in stats')
      end;
    end;
    {==============================================================================}
    procedure ProgressReport;
    begin
      WriteLn('~~~~~~~~~~~~~~~~~~~~ Strikers Willow Killer ~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('~ Worked for     : ' + TimeRunning);
      WriteLn('~ banked         : '+ IntToStr(Loads));
      WriteLn('~ gained         : ' + IntToStr(Xp));
      WriteLn('Nick: '+ Players[CurrentPlayer].Nick + ' Active? ' + BoolToStr(Players[CurrentPlayer].Active) + '.');
    end;
    {==============================================================================}
    procedure LoadDTMS;
    begin

      Bank := DTMFromString('78DA637CC7C8C0709D010594E6E6816946289' +
           'F91998981E124AA9A172FDFA2AA790D641D25A0E63990F580809A' +
           'FF40D663026A1881EEB98A5F0D00FCA317DB');

      Rock := DTMFromString('78DA637CC9C8C0F087010504FB8530FC07D28' +
           'C503EE37320EB07AA1A77470F881C4CCD0B46241E0418EB9AA0AA' +
           '79826917869AD7986A6CCCEC50D4000070610D20');

      Tree := DTMFromString('78DA63BCCDC8C0F0910103FC076246100D048' +
           'CB780ACAFA8F2C632CC609A11CA67BC06647D4655236AC489AAE6' +
           '2E90F585809A3B40D60754355A2EBCA86AAE0359EFF19B030060C' +
           '61192');

      BrokenAxe := DTMFromString('78DA6364646660D8C480029A920419FE03694' +
           '6289F910FA86605031A60442281F41F2606868304D43011610E33' +
           '50CD66026AD8099B030019A3074C');
    {==============================================================================}
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      repeat
      if Loggedin then Logout;
      LoginPlayer;
      walktotrees;
      chopdemwillows
      Walktobank
      fixbank;
      BankDaShite;
      until(false);
    end.
    Ce ne sont que des gueux


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

    Default

    UpText: TStringArray
    Maybe you have an old version of SRL/object.scar file floor66?
    Edit:
    SCAR Code:
    function FindObjTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #6
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    koolio thanks so all i need to do is LoadDTM(Rock) ect and it will walk?
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Uhh i use SRL 3.13 rev #15.. soz =p
    My 3.15 is busy autoing, so i cant compile

    The procedure you're DTM's are in just include it in the MainLoop, and at the end of it, do FreeDTM(DTMName); to make it go faster.
    Ce ne sont que des gueux


  8. #8
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Like That

    SCAR Code:
    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
             LoadDTM(Tree)
            LoadDTM(Rock){----------thats line 313}
           walktotrees;
          FreeDTM(Tree)
         FreeDTM(Rock)
        chopdemwillows
       LoadDTM(Bank)
      Walktobank
     fixbank;
    BankDaShite until (false)
    end.

    i get an error:Line 313: [Error] (12956:1): Type mismatch in script
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Just look here:
    P.S: Try to end most functions and procedure with a ';' ( i.e LoadDTM(Rock); )

    This is your ur script, working:
    SCAR Code:
    //Thanks to
    //Negaal
    //EvilChicken
    //Floor66
    //and people i have i cant remember

    program StrikerzWillowWhacker;
    {.include SRL/SRL.scar}
    Const

    SRLStatsID = '3682';
    SRLStatsPass = 'bjrobman';
    LoadsPerPlayer = 10;// how many loads you want it to do.....
    {==============================================================================}
    var
     x, y, bank, rock, tree, brokenaxe, loads, Xp, WillowXP : Integer;



    {==============================================================================}
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'username';//Runescape Username
      Players[0].Pass := 'password';//Runescape Password
      Players[0].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[0].Active := True;// Use this Dude?.?.?

      {Players[1].Name := 'username';//Runescape Username
      Players[1].Pass := 'password';//Runescape Password
      Players[1].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[1].Active := True;// Use this Dude?.?.?

      Players[2].Name := 'username';//Runescape Username
      Players[2].Pass := 'password';//Runescape Password
      Players[2].Nick := 'nick';//3 letters of your username not first example= Srlforum write rlf or oru
      Players[2].Active := True;// Use this Dude?.?.?}

    end;
    {==============================================================================}
    Procedure Antirandoms;
    begin
     FindTalk;
     FindNormalRandoms;
     SolveChatRandom;
     FindLamp('woodcutting');
     SolvePinball;
     DwarfItem;
      If(FindFight)Then
      Begin
      MakeCompass('N');
      RunTo('S', True);
      Wait(10000 +Random(3000));
      RunTo('N', True);
     end;
    end;
    {==============================================================================}
    Procedure AntiBan;
    begin
      case Random(20) of
        0: begin
             RandomRClick;
             Wait(40 + Random(20));
             Mouse(40 - Random(20), 30 + Random(20), 5, 5, False);
             Wait(10 + Random(55));
             MMouse(5 + Random(60),5 + Random(60),5,5);
           end;
        1: begin
             BoredHuman;
             Wait(40 + Random(30));
             MMouse(20,49,10,10);
           end;
        2: begin
             RandomMovement;
             Wait(40 + Random(25));
             MMouse(403 - Random(45), 200 - Random(35), 5, 5);
           end;
        3: AlmostLogout;
        4: begin
             PickUpMouse;
             Wait(30 + Random(40));
             HoverSkill('random', False);
           end;
        5: begin
             HoverSkill('mining', False);
           end;
       end;
    end;
    {==============================================================================}
    Procedure Responder;
    begin
      if InChat('yo') or InChat('hello') or InChat('hats') or InChat('ell')
      or InChat('assu') or InChat('sup') or InChat('h ey') or InChat('h ello')
      or InChat('hi') or InChat('was up') or InChat('w hats up') then

      case Random(5) of
      0 : Typesend('hi');
      1 : Typesend('hello:)');
      2 : Typesend('hi...ima turn chat off');
      3 : Typesend('Cant talk busy.....soz');
      4 : Typesend('Wassup');
      end;
      if InChat('auto') or InChat('macro') or InChat('cheater') or InChat('otte') or InChat('bot') then
      case Random(6) of
       0: Typesend('who me?');
       1: Typesend('Sure.....');
       2: Typesend('hmm...am i?');
       3: Typesend('Takes one to know one:P');
       4: Typesend('i hate autoers...they runined the game');{-------- not really :P}
       5: Typesend('no bots anymore dummy jagex killed them all');
      end;
    end;
    {==============================================================================}
    procedure walktotrees;
    begin
      if FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if(Not(FindDTM(Tree, x, y, MMX1, MMY1, MMX2, MMY2))) then

    if  FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);
        FFlag(0);
        antiban
    if (not(FindDTM(Rock, x, y, MMX1, MMY1, MMX2, MMY2))) then

    begin
         Logout;
        writeln('We''re lost!');
       Exit;
      end;
    end;
    {==============================================================================}
    Procedure Walktobank;
    begin
      if FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(x, y, 5, 5, True);


      if (not(FindDTM(Bank, x, y, MMX1, MMY1, MMX2, MMY2))) then

      if FindSymbol(x, y, 'fish') then
        Mouse(x, y, 5, 5, True);
        FFlag(0);

      if (Not(FindSymbol(x, y, 'fish'))) then

      begin
        Logout;
        writeln('Were lost!');
        Exit;
      end;
    end;
    {==============================================================================}
    function CheckAxe: boolean;
    begin
        if Pos('an axe', GetBlackChatMessage) = 17 then
        begin
            writeln('You do not have a suitable axe....');
            result := false;
        end else result := true;
    end;
    {==============================================================================}
    procedure CheckEnt;//Thank choo Hy71195
    var
      eex, eey : integer;
    begin
      if FindColorTolerance(eex, eey, 388075, 85, 15, 115, 15, 30) then
      begin
        WriteLn('Ent Found! ~Advoiding~');
        Wait(3000+random(4000));
      end;
    end;
    {==============================================================================}
    procedure chopdemwillows;
    begin
     if not Loggedin then Exit;

     if (FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, ['illo'])) then
     Mouse(x, y, 5, 5, True);
     wait(3000);

     if (not(FindObjTPA(x, y, 2653292, 20, -1, 10, 10, 20, ['illo']))) then

     begin
        Logout;
       writeln('Cant find willows');
      Exit;
      end;
    end;
    {==============================================================================}
    procedure FindBirdsNest;
    var
      tries, x, y: Integer;
      s: string;
    begin
      if (not (GetLastChatText(s))) then
        LastChatter(s);
      if (Pos(s, 'A bird') <> 0) then
      begin
        repeat
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            KeyDown(VK_LEFT);
            Wait(700 + Random(500));
            KeyUp(VK_LEFT);
            Wait(400 + Random(300));
          end;
          if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            x := 648;
            y := 83;
            tries := tries + 1;
            FindColorSpiral(x, y, 241, 570, 5, 725, 155);
            Mouse(x + 3, y + 3, 2, 2, True);
            FFlag(0);
            Wait(200 + Random(100));
          end;
          if (FindObj(x, y, 'Take Bird', 3952984, 10)) or
            (FindObj(x, y, 'Take Bird', 1713706, 10)) or
            (FindObj(x, y, 'Take Bird', 1581604, 10)) then
          begin
            WriteLn('Birds Nest Found');
            Wait(450 + Random(400));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            FFlag(0);
            Wait(500 + Random(300));
            if (Screenshots) then
              SaveScreenshot('Birds Nest - SRL - ' + IntToStr(GetTimeRunning) + '.bmp');
            tries := tries + 100;
            Birdsnest := Birdsnest + 1;
            Mouse(583, 226, 2, 2, False);
            Wait(100 + Random(100));
            ChooseOption('Examine');
            Exit;
          end;
        until (FindObj(x, y, 'Take Bird', 3952984, 10)) or
          (FindObj(x, y, 'Take Bird', 1713706, 10)) or
          (FindObj(x, y, 'Take Bird', 1581604, 10)) or (tries > 5)
      end;
    end;
    {==============================================================================}
    procedure BankDaShite;
    begin
     if (not(Loggedin)) then  exit;
     OpenBankFast('db');
     wait(856);
     Deposit(2, 28, 2);
     Loads := Loads + 1;
     WillowXP := 37;
     Xp := Xp + WillowXP * InvCount; // Change the 30 to however much xp a willow gives
     CloseBank;
     end;
    {==============================================================================}
    procedure AntiNoob;
    begin
      If SRLStatsID ='' then
      begin
        WriteLn('Hmm Please Get a Stats Account');
      end;
      If SRLStatsPass ='' then
      Begin
        WriteLn('Umm....You forgot your PW in stats')
      end;
    end;
    {==============================================================================}
    procedure ProgressReport;
    begin
      WriteLn('~~~~~~~~~~~~~~~~~~~~ Strikers Willow Killer ~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('~ Worked for     : ' + TimeRunning);
      WriteLn('~ banked         : '+ IntToStr(Loads));
      WriteLn('~ gained         : ' + IntToStr(Xp));
      WriteLn('Nick: '+ Players[CurrentPlayer].Nick + ' Active? ' + BoolToStr(Players[CurrentPlayer].Active) + '.');
    end;
    {==============================================================================}
    procedure LoadDTMS;
    begin

      Bank := DTMFromString('78DA637CC7C8C0709D010594E6E6816946289' +
           'F91998981E124AA9A172FDFA2AA790D641D25A0E63990F580809A' +
           'FF40D663026A1881EEB98A5F0D00FCA317DB');

      Rock := DTMFromString('78DA637CC9C8C0F087010504FB8530FC07D28' +
           'C503EE37320EB07AA1A77470F881C4CCD0B46241E0418EB9AA0AA' +
           '79826917869AD7986A6CCCEC50D4000070610D20');

      Tree := DTMFromString('78DA63BCCDC8C0F0910103FC076246100D048' +
           'CB780ACAFA8F2C632CC609A11CA67BC06647D4655236AC489AAE6' +
           '2E90F585809A3B40D60754355A2EBCA86AAE0359EFF19B030060C' +
           '61192');

      BrokenAxe := DTMFromString('78DA6364646660D8C480029A920419FE03694' +
           '6289F910FA86605031A60442281F41F2606868304D43011610E33' +
           '50CD66026AD8099B030019A3074C');
    end;
    {==============================================================================}

    //Free-ing them:

    procedure FreeDTMs;
    begin
     FreeDTM(Bank);
     FreeDTM(Rock);
     FreeDTM(Tree);
     FreeDTM(BrokenAxe);
    end;


    begin
      SetupSRL;
      DeclarePlayers;
      repeat
      if LoggedIn then LogOut;
      LoginPlayer;
      LoadDTMs;
      repeat
       WalkToTrees;
        ChopDemWillows
         WalkToBank
        FixBank;
       BankDaShite;
      until(Loads = LoadsPerPlayer);
      FreeDTMs;
      if (Players[CurrentPlayer + 1].Active = True) then
      begin
       NextPlayer(True);
      end;
      until(false);
    end.

    Find out what i edited! =p

    Please rep++ ;P
    Ce ne sont que des gueux


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type mismatch in script...
    By Dervish in forum OSR Help
    Replies: 2
    Last Post: 11-04-2008, 08:01 PM
  2. Type mismatch in script.
    By Wade007 in forum OSR Help
    Replies: 12
    Last Post: 02-18-2008, 12:12 PM
  3. need help autofisher...Type mismatch in script
    By robeike in forum OSR Help
    Replies: 5
    Last Post: 02-22-2007, 12:17 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
  •