Results 1 to 17 of 17

Thread: help needed with PowerFishing script

  1. #1
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help needed with PowerFishing script

    I did an attempt to make an powerfishing script as i want to level my fishing, and the only script i found didint work...

    but now i have some trouble, the script logged me in, runescape works for a second, and then it acts as if its loading or something,... nothing happnes..
    once i stop script im suddenly logged out. i also dont now how to sight the angle of view to its highest point, wich is neccesary as i made the bitmaps used from that angle...

    Updated the script!

    SCAR Code:
    ///////////////////////////////////////////////////////////////
    //               Phoenix's PowerFisher V1.0                  //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //     //////                                                //
    //     //   //  /////   //      //     //  /////  /////      //
    //     //////  //   //  //     ///     //  //     //  //     //
    //     //      //   //   //   // //   //   /////  /////      //
    //     //      //   //    // //   // //    //     //  //     //
    //     //       /////      ///     ///     /////  //  //     //
    //                                                           //
    //       ///////   //                                        //
    //       //             /////   //  //  /////  /////         //
    //       //////    //  //       //  //  //     //  //        //
    //       //        //   /////   //////  /////  /////         //
    //       //        //       //  //  //  //     //  //        //
    //       //        //   /////   //  //  /////  //  //        //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                     Description                           //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //  This is PowerFisher is my very first script, it will     //
    //  catch fish anywhere close to a fishing spot, and then    //
    //  drop it drops all the fish and repeats it.               //
    //  It can fish all types of fish.                           //
    //  it isn't great but it does work pretty good...           //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                     Instructions                          //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //  Log out with your fishing equipment in you first slot    //
    //  of your inventory and you bait (if bait or flyfishing)   //
    //  is in the second slot. also make sure you are close to   //
    //  a fishingspot, and that the spot appears in the screen.  //
    //                                                           //
    //  Write the data into the procedure of the DeclarePlayers  //
    //  pocedure. further instrunctions out there.               //
    //                                                           //
    //  Important: Change 'FishType' to the right type.          //
    //  so when fishing with a net, it should be...              //
    //  FishType='Net';                                          //
    //                                                           //
    //  Script created by: Phoenix13nl                           //
    //  Special thanks to Tniffoc for his help =)                //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                      Good luck.                           //
    ///////////////////////////////////////////////////////////////


    program PowerFisher;
    {.include srl/srl/misc/smart.scar}
    {.include SRL/SRL.Scar}

    var
       x, y, i : integer;
       smartworld : string;
       
    const
    FishType='WriteFishingTypeHere'; //Net, Bait, Fly, Cage, Harpoon. Example: FishType='Net';

    procedure DeclarePlayers;
    begin
      howmanyplayers:=1;
      numberofplayers(howmanyplayers);
      players[0].name:='WriteUsernameHere';
      players[0].pass:='WritePasswordHere';
      players[0].nick:='WriteNicknameHere';  //Just write 3-4 letters of your username, use correct capitals.
      players[0].Integers[0]:=5;             //this is the number of loads to do before loggin out again.      //Line written by Tniffoc
      players[0].Integers[1]:=0;                                                                               //Line written by Tniffoc
      players[0].active:=true;
      players[0].worked:=0;
    end;

    procedure Init;
    begin
      smartworld:='world63';
    end;

    procedure AntiRandoms;
    begin
      if(not(LoggedIn))then Exit;
      findnormalrandoms;
      if findfight=true then runaway('E',true,1,4000+random(2000));
    end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then Exit;
      case random(4) of
        0: PickUpMouse;
        1: RandomMovement;
        2: RandomRClick;
        3: case random(4) of
          0: HoverSkill('Fishing', false);
          1: HoverSkill('Cooking', false);
          2: HoverSkill('Woodcutting', false);
          3: HoverSkill('Firemaking', false);
          end;
      end;
    end;

    Procedure CatchFish;
    begin
     if FishType='Net' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with net.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Net','et F','t Fi'], [12828090, 11182231], 3) then
          begin
            writeln('Net fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(10000+random(5000));
          end;
        until(InvFull = true)
      end;
     if FishType='Bait' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with fishing rod.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Net','et F','t Fi'], [12828090, 11182231], 3) or FindObjCustom(x, y, ['Lur','ure ','re F'], [12828090, 11182231], 3) then
          begin
            writeln('Bait fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(10000+random(5000));
          end;
        until(InvFull = true)
      end;
     if FishType='Fly' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with flyfishing rod.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Lur','ure ','re F'], [12828090, 11182231], 3) then
          begin
            writeln('Fly fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(10000+random(5000));
          end;
        until(InvFull = true)
      end;
     if FishType='Cage' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with Cage.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Cage','age ','ge F'], [12828090, 11182231], 3) then
          begin
            writeln('Cage fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(10000+random(5000));
          end;
        until(InvFull = true)
      end;
     if FishType='Harpoon' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with Harpoon.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Cage','age ','ge F'], [12828090, 11182231], 3) then
          begin
            writeln('Harpoon fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(10000+random(5000));
          end;
        until(InvFull = true)
      end;
    end;

    procedure DropFish;
    begin
     if not loggedin then exit;
     if (InvFull = true) then
     begin
      writeln('Inventory full.');
        for i := 3 to 28 do
          DropItem(i);
      writeln('All fish dropped.');
     end;
    end;

    begin
      cleardebug;
      init;
      smartsetup(smartworld,false,true,false);
      settargetdc(smartgetdc);
      setupsrl;
      lampskill:='smithing';                  //Change into any skill you want, make sure to write correctly!
      declareplayers;
      currentplayer:=0;
      logout;
      closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
      loginplayer;
      Repeat
        Timerunning;
        CatchFish
        DropFish;
        Cleardebug;
        Writeln('Loop completed.');
        Inc(Players[CurrentPlayer].Integers[1]);                                         //Line written by Tniffoc
      Until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[0]);   //Line written by Tniffoc.
    Cleardebug;
    Writeln('All loops completed, script will stop now,');
    Timerunning;
    end.

    *****Script is about finished now, also contains AntiBan and AntiRandom******

  2. #2
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I don't seem to be having any problems. I have a few comments though. Your standards are just a little off. Here is an example of what an if statement should look like. The second example is what you're doing.
    This is right:
    SCAR Code:
    if(something) then
    begin
      statements;
    end;
    This is what you're doing:
    SCAR Code:
    if(something) then
      begin
        statements;
      end;

    I don't mean to sound mean or anything; I'm just trying to give you some advice. The last thing I noticed was the way you used loggedin=false. Instead of saying if(loggedin=false);, you could say if(! loggedin);.

    !=not

    Therefore, if(loggedin); would be the same as if(loggedin=true). Just a few hints and [ACRONYM="Good Luck"]gl[/ACRONYM]. I think that your problem could be that your computer doesn't have enough memory, so remember to "Free" all of the bitmaps you're using. Here's an example of "freeing" a bitmap.
    SCAR Code:
    FreeBMP(InvDrop);
    There are tons of things that could be re-worked, but this is a really good start!

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  3. #3
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you for your reply, ill do the things you said.
    the standards should be better now
    i have a question about the FreeBMP, how/where should i use it...
    could you give an example by placing it in the right position in script?

    and if some one would know how to set view angle to highest, please tell

  4. #4
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Phoenix13nl View Post
    Thank you for your reply, ill do the things you said.
    the standards should be better now
    i have a question about the FreeBMP, how/where should i use it...
    could you give an example by placing it in the right position in script?
    FreeBMP should be used in a place where you are positive it will be called. Also, make sure you are completely done with the bmp first. In your case, I think it would go at the end of the script. The only problem is, you have a never-ending loop. Therefore, you need to make the never-ending loop stop at one point so that your script will exit. Sorry if I'm confusing, but here is the edited version

    SCAR Code:
    program PowerFisher;
    {.include srl/srl/misc/smart.scar}
    {.include SRL/SRL.Scar}
     
    var
       Ix, Iy, x, y, i, InvShrimp, InvDrop, MapFish, FishSpot, InvAnch, VerifySpot : integer;
       smartworld : string;
     
    procedure declareplayers;
    begin
      howmanyplayers:=1;
      numberofplayers(howmanyplayers);
      players[0].name:='';
      players[0].pass:='';
      players[0].nick:='';
      players[0].active:=true;
      players[0].worked:=0;
      players[0].Integers[0]:=0; //EDITED LINE!!! Number of loads done...
      players[0].Integers[1]:=3; //EDITED LINE!!! NOTE: this is the number of loads to do...
    end;
     
    procedure init;
    begin
      smartworld:='world63';
     
      MapFish := BitmapFromString(10, 10, 'beNpjYGBkZN6y/hAmAoozM' +
           'DBglYIguKzIwkMMfEjifAhZ8Y3/meOgCC47uW8hRBYoyMjAjKyAWe' +
           'A/RJbV8DYQMQrchkhBuEAE1wsXYWQ/A0RAcUbGE3BZkEVsDYxsDRP' +
           '6oIhFEWovfv/iAwAqp3/S');
     
      FishSpot := BitmapFromString(19, 11, 'beNpjYBjkYP2WPVjFd+87' +
           'AkSkakTThdUEXDZiGkW2p8jTS7aNlDiV+gAAuzkagw==');
           
      VerifySpot := BitmapFromString(20, 11, 'beNpjYKAQPHn+CpmNzC' +
           'VG76XLVzDZWFUeOHwAUy8QiUpIE9SLJgsUERAQgGhHcwOaFyCyyFZ' +
           'D9MJth+iF6AK6BIjQfAQUIagXrgxuES43Q9Sg6QWKszBwARFBvUAA' +
           '1wtno3kZzb/4AbLvqAYAHdKnJw==');
     
      InvShrimp := BitmapFromString(27, 21, 'beNpjYBgEgBEVEaMeH6j' +
           'wcGhSZVjQ0LCqoWH5jEb8ipf0NeEwECTYnuRTE+VWHOLYmeI7gyFy' +
           'XmcdUP2inkYgo6uRDZtGxsnZwVjF5xZFovl0AmfQtNzQ2QXhi8qig' +
           'cZ2NXBjaGRsaFDC7V9kccY57TUMCV5AckZ+2JLy2C3NaQs6BDANBA' +
           'oCZYkLZ0TsrKyO39GW0dSYAHQtstyB1QuA4byooWGFCAPR0YcwmZG' +
           'JgcdFAFlo1eT2NRM6FnTXr5jYunFm766FUw4sXHB1Ycu1xe1AhBqG' +
           'WAxMcGH3MdfGdD8wvma0VE6qK+mpzG9JdpiYGQSMJmC0+lvpzunMA' +
           'gbarNZq7GaGuOCyqyYnGYJYEhxaErwa4zyzfG2CbfRJSck4MwLQbb' +
           'n+dolu5uH2hnTJfVRRyXhtaaeosDArE1HGAdM8MLqRzERPq7fWTD4' +
           '+sQCYXMtCnIl0ISSHQpwKyhGoOQ6YnBaURJWFOSc7kBA+wLQBTJAN' +
           'E1pO71h/ZtfGc3u3nN+/7cKBHbsXT5vWVJ4ZHQyMKTLCvYMhs0NBY' +
           'IKiwIJmMWDeZ2J0SAxwdHHzdHRxdfAkPyqrshLr81KbCzNcgrwjfd' +
           '2DPZzITY2DBgAAsBaneA==');
           
        InvAnch := BitmapFromString(27, 21, 'beNpjYBhowIiEiFSPT9bFx' +
           'YGBQSEjoyMhoaGgoJUIYxlxucrFJSU8PC4gIDwuLjU7uzghiSEzsw' +
           'WI0jOa8vK7sZqVkMCDVTw3tzQ9PR/Zs0BDkpKygMYWFlZmZ7cVFfV' +
           'juqGhcSFxwcKYmtbg5RXr4AR0YSHQwJqattLSyZjKgIKJCQxEmglH' +
           'RcXVdXXtHR2Ts7JQ9DIxNReXTASGc1paAykxCDWckZEVTRQYqsBwS' +
           'MtoysntADIqKqfX1c9va184ffpiIAKGId6kwgiMLCYsUoxJCUxJSd' +
           'VxcWVR0YVh4TkJCRnAuABGq6mpZXNzb0oKQ0pKLVYDgVpweSAgIBW' +
           'OYmKSo6ISPT39LCxs8LsQaDsxIePgEOLtHejo6GZt7UAwwdMxnxJQ' +
           'MGvWMlERESAi0lW4MhEEzJ+/uqtrKjDtAaOVSAOBeQqYlVCLFAQCJ' +
           'qf8/PLg4Eg/vxDifQ1MGxBjGxpWdHat6e5e19O7obdvExfXBGCicn' +
           'UNB8aUm5sPqYHp4JDt5CQYESmSlNGQkMDr4pLBwACMa0cLCzcGBhe' +
           'yI8nPLykoOD0kNMvBMdDSwtnMzIXEjDkoAQAHE4zI');
           
          InvDrop := BitmapFromString(28, 15, 'beNrNkksKwDAIROd2vUC3v' +
           'f8x0hLBTCeSlsZAxYUO5hE/wLFvuQ6sYpaCy2uMdKYFK5iTAxkwLa' +
           'Zvo1NaDYuPTDNLzYgAFn0XY6YDPZWFSvFLJrf5gRk2S8PvayAP5eZ' +
           'Bxoos9F7T+PJw4mziw/sfM5iPjCjNTuJhf38=');
    end;
     
    procedure FindFishingSpot;
    begin
     if (not loggedin) then exit;
     if FindBitmapToleranceIn(MapFish, x, y, 520, 0, 760, 170, 25) then
     begin
      wait(100+random(100));
      MMouse(x, y, 5, 5);
      Mouse(x, y, 1, 1, true);
     end;
    end;
     
    procedure FindFish;
    begin
     if (not loggedin) then exit;
     repeat
     if FindBitmapToleranceIn(FishSpot, Ix, Iy, 5, 5, 514, 337, 25) then
     begin
      if FindBitmapToleranceIn(VerifySpot, x, y, 3, 3, 85, 20, 25) then
      begin
       MMouse(Ix, Iy, 5, 5);
       Mouse(Ix, Iy, 1, 1, true);
       wait(5000+random(5000));
      end;
     end;
     until(InvFull = true)
    end;
     
    procedure DumpFish;
    begin
     if (not loggedin) then exit;
     if (InvFull = true) then
     begin
     repeat
      i:= i + 1;
      if FindBitmapToleranceIn(InvShrimp, x, y, 580, 220, 750, 470, 25) or FindBitmapToleranceIn(InvAnch, x, y, 580, 220, 750, 470, 25) then
      begin
       MMouse(x, y, 3, 3);
       Mouse(x, y, 1, 1, false);
       if FindBitmapToleranceIn(InvDrop, x, y, 580, 220, 750, 470, 25) then
       begin
        MMouse(x, y, 3, 3);
        Mouse(x, y, 1, 1, true);
       end;
      end;
     until(i >= 27);
     end;
    end;
     
    begin
     cleardebug;
     init;
     smartsetup(smartworld,false,true,false);
     settargetdc(smartgetdc);
     setupsrl;
     lampskill:='smithing';
     declareplayers;
     currentplayer:=0;
     logout;
     closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
     loginplayer;
     FindFishingSpot;
     Repeat
      FindFish;
      DumpFish;
      Inc(Players[CurrentPlayer].Integers[0]); // EDITED LINE!!! add 1 to the number of loads done.
     Until(Players[CurrentPlayer.Integers[0] >= Players[CurrentPlayer].Integers[1]); // EDITED LINE!!! Until the number of loads done >= loads to do.
    end.

    Please post if you need more help or this was too confusing....

    EDIT: I don't think this is the right way, but I set the view angle by doing something like this...
    SCAR Code:
    KeyDown(VK_UP);
    wait(1500 + random(500));
    KeyUp(VK_UP);

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  5. #5
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, again thank you for your help but when i wrote this:

    SCAR Code:
    FreeBMP(MapFish);

    into the FindFish procedure, it gives error:
    Line 90: [Error] (16304:1): Unknown identifier 'FreeBMP' in script C:\Games\RS\Scar\Scripts\PowerFishingScriptV1.0.sc ar

    but i though my script didint work, if its just something with memory i dont mind that much

    --------------------Edit------------------------
    and the runescape freezes, i just noted, until i end script its not doing anything :S it works all the way until it comes to this line

    SCAR Code:
    if FindBitmapToleranceIn(MapFish, x, y, 520, 0, 760, 170, 25) then

    il try it without that procedure

    --------------------Edit2------------------------
    removing the procedure didint help, it stop doing anything each time it reaches a line containing 'FindBitmapToleranceIn'... and i would prefer not to keep waiting for to long, as im afraid jagex might notice something...
    ill try it with colors....

  6. #6
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok i finaly noticed something, it has nothing to do with the bitmaps, same happens with color, but i removed the words 'if' and 'then' from the lines that should find the bitmaps, and it keeps running...

    but mouse goes to the top left corner of Runescap, so im asking myself, isnt it able to find the bitmaps (and the color which i picked :S)? or is something wrong with the way i used 'if' and 'then'

  7. #7
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Phoenix13nl View Post
    Ok i finaly noticed something, it has nothing to do with the bitmaps, same happens with color, but i removed the words 'if' and 'then' from the lines that should find the bitmaps, and it keeps running...

    but mouse goes to the top left corner of Runescap, so im asking myself, isnt it able to find the bitmaps (and the color which i picked :S)? or is something wrong with the way i used 'if' and 'then'
    I'd need to know exactly what line moves the mouse to that corner in order to know what the problem is, but, I do know that when the mouse moves up there it's because you have called MMouse or Mouse while x and y are zero.

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  8. #8
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dam, that is a stupid mistake then.. lol

    (warning! very noobish question!)
    how to make X and Y the coordinats it found the BMP on?

    ------------
    would it be better to use DTM instead of BMP? (or something else to indentify a specific object in runescape?)

  9. #9
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Phoenix13nl View Post
    dam, that is a stupid mistake then.. lol

    (warning! very noobish question!)
    how to make X and Y the coordinats it found the BMP on?
    It's actually not that stupid at all because when you put x,y in the bmp finding thing, it sets them for you; therefore, because they are not set, it means it didn't find the bitmap but for some reason your script still moves/clicks the mouse. Try putting some Writelns in to find where the MMouse/Mouse that is doing this is located.

    Tniffoc

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  10. #10
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's actually not that stupid at all because when you put x,y in the bmp finding thing, it sets them for you; therefore, because they are not set, it means it didn't find the bitmap but for some reason your script still moves/clicks the mouse. Try putting some Writelns in to find where the MMouse/Mouse that is doing this is located.
    i removedd the 'if when' tags from the bmp finding thing. so it had no 'fail safe' and continued. the 'if, when' should have prevented it but runescape froze when i had those tags so i temporialy removed them...

    ive now changed the FindFishingSpot procedure

    SCAR Code:
    procedure FindFishingSpot;
    begin
     if not loggedin then exit;
     KeyDown(VK_UP);
     wait(1500+random(500));
     KeyUp(VK_UP);
     wait(500+random(500));
     writeln('Angle set.');
     if not FindBitmapToleranceIn(MapFish, x, y, 520, 0, 760, 170, 25) then exit;
     begin
      writeln('Found Fish icon on map.');
      wait(100+random(100));
      MMouse(x, y, 5, 5);
      Mouse(x, y, 1, 1, true);
     end;
    end;

    it wrote 'Angle set.' in debug, but not the next Writeln, so this means it cant find the Bitmap, i believe this is with all of the procdures where its suposded to find the bitmap.. i might have done something wrong with them, but i dont know what... i think ill try DTM's
    btw, it didnt freeze this time but like just said, ill have to find something other then the bitmaps i think

  11. #11
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol youre standards are of not his your supposed to tab after an if statement


  12. #12
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Omg, i deleted all bitmaps and now i use FindObjCustom. for finding the Net Fishing spot and it works!! unfortunatly FindObjCustom doesnt work for dropping the items as it isnt looking for them in my inventory... any solutions?? ill update script in first post...

    and now i go sleeping... its freaking 02:58, got to go to school in 5hours!!! :S

  13. #13
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Phoenix13nl View Post
    Omg, i deleted all bitmaps and now i use FindObjCustom. for finding the Net Fishing spot and it works!! unfortunatly FindObjCustom doesnt work for dropping the items as it isnt looking for them in my inventory... any solutions?? ill update script in first post...

    and now i go sleeping... its freaking 02:58, got to go to school in 5hours!!! :S
    Here, use this function I made, It drops items from position arg0 to position arg1 in your inventory!
    gl
    SCAR Code:
    {*******************************************************************************
    procedure DropTo(arg0, arg1: Integer)
    By: tniffoc
    Description: It will drop items from inventory from
    position # arg0 to arg1
    *******************************************************************************}


    procedure DropTo(arg0, arg1: Integer);
    begin
      repeat
        DropItem(arg0);
        arg0:= arg0 + 1;
      until(arg0 = (arg1 + 1))
    end;

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  14. #14
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Srry for wasting your time Tniffoc, i've discover that function this morning before going to school, and already placed it in script... but i didnt have time to place it online..
    SCAR Code:
    procedure DumpFish;
    begin
     if not loggedin then exit;
     if (InvFull = true) then
     begin
      writeln('Inventory full.');
      for i := 2 to 28 do
        DropItem(i);
      writeln('All fish dropped.');
     end;
    end;

    this script is fully working now
    ill now try creating anti-random and anti-ban...

  15. #15
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, my script is now working, it contains antirandom and antiban, both tested. im not sure if it finds the whirlpools, havent seen one yet... though i somehow lost my net :P but it all works.. ill update the script in first post.
    once im completely sure everything works realy well ill post this in the 'First Script' section... script fill now fish for shirmp, but can veeery easily been modified for i.e. cage fishing, just by changin this
    SCAR Code:
    if FindObjCustom(x, y, ['Net','et F','t Fi',' Fis'], [12828090, 11182231], 3) then
    into:
    SCAR Code:
    if FindObjCustom(x, y, ['Cage','age','ge F',' Fis'], [12828090, 11182231], 3) then
    ill try to make something to set this up very easily tonight... or in a few hours


    **************************EDIT******************** ********


    Script about finished, now supports any kind of fishing.
    not the most efficient way, but i had trouble while trying something shorter... this is ok to me

    Updated script in first post again!

    all i need now is a command to make it log out, because now it stay logged in doining nothing if all loops are finished, once i have that its finished

  16. #16
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just use logout; and make sure you use
    if not(loggedin) then exit;
    in every function that you are supposed to be logged in


  17. #17
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, thank you... here is the final script:

    SCAR Code:
    ///////////////////////////////////////////////////////////////
    //               Phoenix's PowerFisher V1.0                  //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //     //////                                                //
    //     //   //  /////   //      //     //  /////  /////      //
    //     //////  //   //  //     ///     //  //     //  //     //
    //     //      //   //   //   // //   //   /////  /////      //
    //     //      //   //    // //   // //    //     //  //     //
    //     //       /////      ///     ///     /////  //  //     //
    //                                                           //
    //       ///////   //                                        //
    //       //             /////   //  //  /////  /////         //
    //       //////    //  //       //  //  //     //  //        //
    //       //        //   /////   //////  /////  /////         //
    //       //        //       //  //  //  //     //  //        //
    //       //        //   /////   //  //  /////  //  //        //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                     Description                           //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //  This is PowerFisher is my very first script, it will     //
    //  catch fish anywhere close to a fishing spot, and then    //
    //  drop it drops all the fish and repeats it.               //
    //  It can fish all types of fish.                           //
    //  it isn't great but it does work pretty good...           //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                     Instructions                          //
    ///////////////////////////////////////////////////////////////
    //                                                           //
    //  Log out with your fishing equipment in you first slot    //
    //  of your inventory and you bait (if bait or flyfishing)   //
    //  is in the second slot. also make sure you are close to   //
    //  a fishingspot, and that the spot appears in the screen.  //
    //                                                           //
    //  Write the data into the procedure of the DeclarePlayers  //
    //  pocedure. further instrunctions out there.               //
    //                                                           //
    //  Important: Change 'FishType' to the right type.          //
    //  so when fishing with a net, it should be...              //
    //  FishType='Net';                                          //
    //                                                           //
    //  Script created by: Phoenix13nl                           //
    //  Special thanks to Tniffoc for his help =)                //
    //                                                           //
    ///////////////////////////////////////////////////////////////
    //                      Good luck.                           //
    ///////////////////////////////////////////////////////////////


    program PowerFisher;
    {.include srl/srl/misc/smart.scar}
    {.include SRL/SRL.Scar}

    var
       x, y, i : integer;
       smartworld : string;
       
    const
    FishType='WriteFishingTypeHere'; //Net, Bait, Fly, Cage, Harpoon. Example: FishType='Net';

    procedure DeclarePlayers;
    begin
      howmanyplayers:=1;
      numberofplayers(howmanyplayers);
      players[0].name:='WriteUsernameHere';
      players[0].pass:='WritePasswordHere';
      players[0].nick:='WriteNicknameHere';  //Just write 3-4 letters of your username, use correct capitals.
      players[0].Integers[0]:=5;             //this is the number of loads to do before loggin out again.      //Line written by Tniffoc.
      players[0].Integers[1]:=0;                                                                               //Line written by Tniffoc.
      players[0].active:=true;
      players[0].worked:=0;
    end;

    procedure Init;
    begin
      smartworld:='world63';
    end;

    procedure AntiRandoms;
    begin
      if(not(LoggedIn))then Exit;
      findnormalrandoms;
      if findfight=true then runaway('E',true,1,4000+random(2000));
    end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then Exit;
      case random(4) of
        0: PickUpMouse;
        1: RandomMovement;
        2: RandomRClick;
        3: case random(4) of
          0: HoverSkill('Fishing', false);
          1: HoverSkill('Cooking', false);
          2: HoverSkill('Woodcutting', false);
          3: HoverSkill('Firemaking', false);
          end;
      end;
    end;

    Procedure CatchFish;
    begin
     if FishType='Net' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with net.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Net','et F','t Fi'], [12828090, 11182231], 3) then
          begin
            writeln('Net fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(5000+random(2500));
            AntiBan;
            wait(5000+random(2500));
          end;
        until(InvFull = true)
      end;
     if FishType='Bait' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with fishing rod.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Net','et F','t Fi'], [12828090, 11182231], 3) or FindObjCustom(x, y, ['Lur','ure ','re F'], [12828090, 11182231], 3) then
          begin
            writeln('Bait fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(5000+random(2500));
            AntiBan;
            wait(5000+random(2500));
          end;
        until(InvFull = true)
      end;
     if FishType='Fly' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with flyfishing rod.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Lur','ure ','re F'], [12828090, 11182231], 3) then
          begin
            writeln('Fly fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(5000+random(2500));
            AntiBan;
            wait(5000+random(2500));
          end;
        until(InvFull = true)
      end;
     if FishType='Cage' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with Cage.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Cage','age ','ge F'], [12828090, 11182231], 3) then
          begin
            writeln('Cage fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(5000+random(2500));
            AntiBan;
            wait(5000+random(2500));
          end;
        until(InvFull = true)
      end;
     if FishType='Harpoon' then
      begin
      if not loggedin then exit;
        KeyDown(VK_UP);
        wait(1500+random(500));
        KeyUp(VK_UP);
        wait(500+random(500));
        writeln('Angle set.');
        writeln('Fishing with Harpoon.');
        repeat
          AntiRandoms;
          AntiBan;
          if (InvFull = true) then exit;
          if FindObjCustom(x, y, ['Cage','age ','ge F'], [12828090, 11182231], 3) then
          begin
            writeln('Harpoon fishing spot spotted.');
            MMouse(x, y, 5, 5);
            wait(100+random(50));
            Mouse(x, y, 1, 1, true);
            writeln('Fishing...');
            wait(5000+random(2500));
            AntiBan;
            wait(5000+random(2500));
          end;
        until(InvFull = true)
      end;
    end;

    procedure DropFish;
    begin
     if not loggedin then exit;
     if (InvFull = true) then
     begin
      writeln('Inventory full.');
        for i := 3 to 28 do
          DropItem(i);
      writeln('All fish dropped.');
     end;
    end;

    begin
      cleardebug;
      init;
      smartsetup(smartworld,false,true,false);
      settargetdc(smartgetdc);
      setupsrl;
      lampskill:='fishing';  //Change into any skill you want, make sure to write correctly!
      declareplayers;
      currentplayer:=0;
      logout;
      closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
      loginplayer;
      Repeat
        if not loggedin then exit;
        Timerunning;
        CatchFish
        DropFish;
        Cleardebug;
        Inc(Players[CurrentPlayer].Integers[1]);  //Line written by Tniffoc.
        Writeln(IntToStr(Players[CurrentPlayer].Integers[1]) + ' out of ' + IntToStr(Players[CurrentPlayer].Integers[0]) + ' loops completed.')
      Until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[0]);  //Line written by Tniffoc.
    Cleardebug;
    Writeln('All ' + IntToStr(Players[CurrentPlayer].Integers[0]) + ' loops completed, script will stop now,');
    Timerunning;
    logout;
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. help needed for script 55% done
    By sink998 in forum OSR Help
    Replies: 13
    Last Post: 10-09-2008, 04:38 PM
  2. Script Needed ! ! !
    By senteniel in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 07-03-2007, 01:47 AM
  3. Help needed with script!
    By ricardo016 in forum OSR Help
    Replies: 1
    Last Post: 05-31-2007, 05:35 PM
  4. Script Needed.
    By Street Life in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 05-11-2007, 12:21 AM
  5. i have few script that needed help to fix
    By david$ in forum OSR Help
    Replies: 2
    Last Post: 12-12-2006, 04:44 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
  •