Results 1 to 9 of 9

Thread: Mouse trouble

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Mouse trouble(not solved)

    All of a sudden my mouse doesnt respond. I start it up, checks graphics, fight mode, retaliate, set run, highest angle. Finds and clicks the mouse great, gets the bone and moves the mouse to a random spot and moves it pixel by pixel. I dont understand why this happens.

    Help and Advice appreciated.

    SCAR Code:
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    ///////////////////////////////////////////////////////////////////
    //                            JUNK's LRK
    //bitmap eating procedure           infight to keep fighting if not done
    //antirandoms
    //failsafes                         Boner picker and burrier
    //////////////////////////////V3.00////////////////////////////////


    program LRK;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}


    var
    x, y, foodbmp, kill,bonesb,pick,bone : integer;

    /////////////////////fill this in/////////////////////////////////////////////

    const
      mousecolor= 12961212;// your mouse color
      eat= true; //Cooked meat can only be eaten thanks to jad(boolean)
                 //cook raw beef from a cow and get Cook it to get cooked meat
      howmanykills= 10; //how many do you want to kill
      skiller= 'attack';    //which skill? defence attack strength or shared?
                            //full names only

    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1; //how many players does not support mutiple acounts
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;   //your current player

      Players[0].Name    := '';  //username
      Players[0].Pass    := '';  //password
      Players[0].Nick    := 'arfl';  //3-4 letters of your name, no first letter
      Players[0].Active  := True;//wanna use? this is why its true
    end;
    ////////////////////////////////////////////////////////////dont touch the rest
    //////////////////////////////////////////////////////////////////////////////
    procedure LoadDTM;
    begin
     bone := DTMFromString('78DA637CC6C4C0708A910106803C86FAB2520' +
           '611200D1365FC88AA062A8A4402E94740358708A8B94384394F80' +
           '6A2EE1570300705B0A09');
    end;

    function FindBone : Boolean;
    begin
      Result:= FindDTM(bone, X, Y, MIX1, MIY1, MIX2, MIY2);
    end;

    Procedure Boner; //LOLZER
    begin
     if(findbone)then
     begin
      repeat
      mouse(x,y,3,3,true);
       bonesb:=bonesb+1
        Writeln('Burried');
       wait(2000+random(500));
      until not findbone;
       if not findbone then
        Writeln('Done with bones');
       end else
      if not findbone then
      Writeln('Did not find the bone Dtm in your inventory.');
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure EatFood;
    begin
      foodbmp := BitmapFromString(13, 12, 'beNpzMpoV7zEpyqU/0rnWV' +
         '2BAENBqZERdZbhUEmkaJagn3KkxwGZqjCseK7pCHer8rEs9zBal+A' +
         'AjAqvi9mB7oDkQZSsz/Zek+cIVQyIOiIDmAJW1BNlV+1hmAwB9+ZV' +
         'I');
      if(hppercent<20)then
      begin
        if eat then
        begin
          Writeln('said yes to eat.');
          GameTab(tab_Inv);
          wait(100+random(20));
          if (FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20)) then
          begin
            Mouse(x, y, 2, 2, true);
            writeln('Ate food successfully!');
            wait(1500+random(200));
          end else
          if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
          begin
            writeln('Could not find food running and waiting to restore hp');
            runaway('n',false,1,60000)
          end;
        end else
        begin
          Writeln('Said no to eat');
          exit;
        end;
      end;
     end;
    //////////////////////////////////////////////////////////////////////////////
    procedure Bonepick;
    begin
     If(findcolorspiraltolerance(x,y,12763850, msx1,msy1,msx2,msy2,20))then
     begin
      mouse(x,y,3,3,false);
       chooseoption('ones');
       pick:=pick+1
       Writeln('Picked up bones');
       end else
       if(invfull)then
       begin
        boner;
       writeln('Inventory full burying bones...');
       end else
      if not findcolorspiraltolerance(x,y,123123, msx1,msy1,msx2,msy2,20)then
      writeln('Did not fine bones, moving on');
    end;
    //////////////////////////////////////////////////////////////////////////////
    Procedure Anti;
    begin
      case random(6) of

        0:Sleepandmovemouse(5000+random(1000));

        1:Boredhuman;

        2:begin
            Case random(4) of
           0: HoverSkill('strength', false);
             
           1: HoverSkill('attack', false);
             
           2: HoverSkill('defence', false);
             
           3: HoverSkill('prayer', false);
             
          end;
          end;

        3:Pickupmouse;

        4:Begin
            Makecompass('w')
            wait(1000+random(500))
            makecompass('e')
            wait(1000+random(500))
            Makecompass('w')
          end;
           
         5:randomrclick;
           
       end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure waitinfight;
    begin
      while infight do anti;
    end;
    //////////////////////////////////////////////////////////////////////////////
    function findmouse : boolean;
    var
    tpa : tpointarray; I : integer;
    begin
      if findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20) then
        for i:= 0 to high(tpa) do
        begin
          mmouse(tpa[i].x, tpa[i].y, 3, 3);
          Wait(500);
          if isuptext('ttack') then
          begin
            result := true;
            mouse(tpa[i].x, tpa[i].y, 3, 3, false);
            chooseoption('ttack');
            Writeln('Mouse is found');
            wait(5000+random(1000))
            if(infight)then
            begin
            repeat
            waitinfight;
            until not infight;
            If not infight then
            writeln('Picking bone...');
            bonepick;
          end else
            if(not(findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20))) then
            begin
              Writeln('Mouse is not found, logging out.');
              logout;
              terminatescript;
            end;
         end;
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure proggy;
    begin
      writeln('---------------------=Proggy=---------------------');
      writeln('|------------------------------------------------|');
      writeln('|Killed aprroximitely ' + inttostr(kill)+'       |');
      writeln('|ran for '+ (timerunning)+ '                     |');
      writeln('|Picked up '+ inttostr(pick) + ' bones           |');
      writeln('|burried '+ inttostr(bonesb) + ' bones           |');
      writeln('|Junkjs Lumbridge Rat Killer                     |');
      writeln('|end of the script                               |');
      writeln('|Make sure you post a proggy or suggestion       |');
      writeln('==================================================');
      Writeln('Skills are below. Att, Str, Def, and prayer.');
      getxp('attack');
      getxp('strength');
      getxp('defence');
      getxp('prayer');
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure death;
    begin
      if(finddead)then
      begin;
        logout;
        proggy;
        Writeln('you died')
        terminatescript;
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    Procedure setskiller;
    begin
      if(LowerCase(skiller) = 'attack')then
      SetFightMode(1)
      else
      if(lowercase(skiller) = 'strength') then
      SetFightMode(2)
      else
      if(lowercase(skiller) = 'shared') then
      SetFightMode(3)
      else
      if(lowercase(skiller) = 'defence') then
      SetFightMode(4)
    end;
    //////////////////////////////////////////////////////////////////////////////
    begin;
      setupsrl;
      DeclarePlayers;
      cleardebug;
      activateclient;
      if(not(loggedin))then
      Loginplayer;
      setrun(true)
      makecompass('w');
      Setangle(true);
      Setskiller;
      Retaliate(true);
      repeat
        Findnormalrandoms;
        makecompass('w');
        findmouse;
      //mousecheck;
        EatFood;
        FreeBitmap(foodbmp);
        finddead;
      until(kill >=howmanykills)
      if(kill >=howmanykills)then
      begin
        logout;
        proggy;
        terminatescript;
      end;
    end.
    //////////////////////////////////////////////////////////////////////////////
    //CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS
    // JAD       Feroc1ty
    // Marpis    Baked                And others as well....
    // Esteban   Tarajunky
    // MasterBB  Awkwardsaw
    //////////////////////////////////////////////////////////////////////////////

    Finally know the scar tags.
    Last edited by Mr. Doctor; 08-24-2009 at 12:58 AM.

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What exactly are you having problems with? Burying the bones? Picking them up?

    Please be more specific and I'll help you

    Tell me the procedure it's screwing up in too if you know which.

    ~JAD

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nothing with the bones, i fixed it. when its done taking the bones it just moves pixel by pixel. not clicking anything and not finding anything.im pretty sure its in my mousefind function.

  4. #4
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh. You never break out of the loop once you find the rat/mouse:

    SCAR Code:
    function findmouse : boolean;
    var
    tpa : tpointarray; I : integer;
    begin
      if findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20) then
        for i:= 0 to high(tpa) do
        begin
          mmouse(tpa[i].x, tpa[i].y, 3, 3);
          Wait(500);
          if isuptext('ttack') then
          begin
            result := true;
            mouse(tpa[i].x, tpa[i].y, 3, 3, false);
            chooseoption('ttack');
            Writeln('Mouse is found');
            wait(5000+random(1000))
            if(infight)then
            begin
            repeat
            waitinfight;
            until not infight;
            If not infight then
            writeln('Picking bone...');
            bonepick;
            break; //get out of the for loop because you already found the mouse
          end else
            if(not(findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20))) then
            begin
              Writeln('Mouse is not found, logging out.');
              logout;
              terminatescript;
            end;
         end;
      end;
    end;


    You are really moving along great JunkJ Keep it up!

  5. #5
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks jad.

    Edit: That doesn't work either.
    Last edited by Mr. Doctor; 08-21-2009 at 10:30 AM.

  6. #6
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Try exit;
    Its a better option
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  7. #7
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Try exit;
    Its a better option
    Why?

    In this case they would do the same thing anyways. And if he ever added anything below that (where the break would go to), then this would save him the headache of wondering why it wasn't doing that piece of code.


  8. #8
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by JAD View Post
    Why?

    In this case they would do the same thing anyways. And if he ever added anything below that (where the break would go to), then this would save him the headache of wondering why it wasn't doing that piece of code.

    Afaik it would be fast for SCAR if he just exits the procedure.
    But yea I guess you're right about him wondering about the code
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  9. #9
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The problem persists. Any ideas?

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
  •