Page 1 of 2 12 LastLast
Results 1 to 25 of 44

Thread: Bbri06's Catherby Yew Chopper and Banker!

  1. #1
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Bbri06's Catherby Yew Chopper and Banker!

    This is my Christmas gift to SRL . Please post all progress reports but much more importantly, ERRORS. If the script fails, please take a screenshot of where your character is and copy and paste the last few lines of the debug box then post that here along with any other necessary description of the error.

    I intend to keep this updated and progressively make it better and better.

    Please Note: I've noticed that the script runs best at off-peak hours because during peak hours, symbol and DTM finding is occasionally stopped by crowding from the white dots of players.

    Code:
    Bbri06"s Catherby Yew Cutter
    Time running: 3 Hours, 3 Minutes and 49 Seconds
    Logs banked: 540
    Code:
    Bbri06"s Catherby Yew Cutter
    Time running: 2 Hours, 27 Minutes and 10 Seconds
    Logs banked: 459
    Last edited by bbri06; 01-25-2010 at 09:04 PM.

  2. #2
    Join Date
    Nov 2007
    Location
    lol
    Posts
    176
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what is the point of SwitchWorldsProc

  3. #3
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, did I leave that in there? Oops. It was a feature I was working on but decided to save for later and I guess I left it in there lol. When I get it working it will switch worlds while breaking.

  4. #4
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    if(High(CheckPoints)) >= 15 then
      begin
        result := true;
      end else
        result := false;

    // Fixed:
      result := High(CheckPoints) >= 15;

    SCAR Code:
    if(FindSymbol(x, y, 'rare trees'))then
      begin
        for i := 0 to 10 do
        begin
        if(FindDtmRotated(TreesDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.02, ReturnAngle))then
        begin
          writeln('Found trees via symbol and DTM');
          mouse(x - 15 - random(5), y + 7 + random(5), 2, 0, true)
          FFlag(0);
          result := true;
          Exit;
        end;
        end
      end;
    This part in your CheckForTrees function is useless, because it will never be called. You already check "if FindSymbol(x, y, 'rare trees') then" earlier, and if the symbol is found you click it and exit. If the symbol is not found earlier, it will look for it again in this part of the function, which is unnecessary.

    What comes to AdjustableRadialWalk, I suggest you take a look into LinearWalk in file /core/MapWalk.scar.

    SCAR Code:
    Procedure ToTrees;
    begin
      If(not(Loggedin))then
        Exit;
      Writeln('Walking to trees');
      Randoms;
      if(FindStore)then
      begin
        if(not(AdjustableRadialWalk(FindWaterColor, 260, 280, 60, 4, 4, 40, true)))then
        begin
          writeln('failed to walk to trees');
          Players[CurrentPlayer].Active := False;
          LogOut; // You log out here, but you don't exit the procedure
        end else
          FFlag(0);
        repeat // ...and you will start this loop while logged out!
        if(CheckForTrees)then // <- CheckForTrees never returns True if you're logged out
          break;
        if(not(AdjustableRadialWalk(FindWaterColor, 255, 359, 60, 4, 4, 20, true)))then
        begin // Again, you log out while you can already be logged out earlier!
          writeln('failed to walk to trees');
          Players[CurrentPlayer].Active := False;
          LogOut;
        end else
          FFlag(10);
        until(false) // this causes an infinite loop if the first AdjustableRadialWalk after the first FindStore fails!
      end else
      begin
        writeln('Failed to walk to store icon');
        Players[CurrentPlayer].Active := False;
        LogOut;
      end;
    end;
    Same problems that are in ToTrees are also found in ToBank! You should Exit the procedures after logging out.

    -------------------------------
    Nice to see new scripters, and there's always a great need for Yew cutters! You have great potential! Be more careful when you write and check all your loops after finishing them, if they're possibly endless. Also in some functions you Exit before you free your dtms!

    Fix these things and you'll be a SRL Member in no time!

  5. #5
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So, if I simply exit the procedures after logouts, then all the commented problems in ToBank; and ToTrees; are fixed. Correct?

    Edit: I uploaded an edited version with your changes, Marpis. If you could check it out again I would appreciate that a lot.

    Edit2: More accurate banking added!
    Last edited by bbri06; 12-26-2009 at 09:57 AM.

  6. #6
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Glad you made it to members

    Going to try soon. Thank you for your gift ^^
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  7. #7
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks and you're welcome

  8. #8
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The script has had some significant updating!

    -The Script now uses Animation.scar (Thanks marpis ) to check if your character is currently cutting a tree.

    -A failsafe for part of the ToTrees; procedure has been added.

    -Tree colors are now retrieved with an autocolor function.

    -Uptext is now used rather than OptionsExist;

    *Between tomorrow and the 2nd, I will be rewriting the whole banking procedure and most likely some of the ToBank; Procedure. Right now it's functionality is rather sub-par.

    Also, if anyone has a screenshot of a bird's nest on the ground that's a .bmp, I would love to have it.
    Last edited by bbri06; 01-01-2010 at 12:46 AM.

  9. #9
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Hehe, nice to see you find Animation.scar useful!

  10. #10
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    Hey, I decided to give this a whirl.....

    Checks to often and repeats selecting option to chop tree to often....

    Repetitious pattern searching for tree while re-spawning...

    Sorry, had to stop testing, as these changes need to be made before continuing to use...

    However, very good start


  11. #11
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Checks to often and repeats selecting option to chop tree to often....
    I've noticed it does do that. I'm going to play with different animating time and pixel change options to see if I can eliminate that problem.

    edit: Hmm, what axe are you using?

    Repetitious pattern searching for tree while re-spawning...
    Hmm... Never really thought of changing that. I think I have an idea to deal with that.

    Sorry, had to stop testing, as these changes need to be made before continuing to use...

    However, very good start
    Don't apologize, I'm so very thankful you actually tested it. I've been itching to get some real testing based feedback from someone knowledgeable, thanks a ton!

    Edit: Uploaded an edited version. Going to work on making more human like walking procedures later.
    Last edited by bbri06; 01-07-2010 at 01:21 AM.

  12. #12
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    I'm using Dragon Axe, I'll try your updated version when I get a chance....


  13. #13
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, shouldn't be too many problems if you're using a dragon axe. I was actually thinking earlier since I made the script's IsCutting using a dragon axe there might be problems with using a rune one.

    Also, got a 621 logs cut progress report earlier using this.

  14. #14
    Join Date
    Dec 2006
    Location
    Boss central
    Posts
    811
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Will test when i got mem
    Being A Boss

  15. #15
    Join Date
    Jan 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 947: [Error] (22603:1): Invalid number of parameters in script

  16. #16
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oops, left a small thing in there that I shouldn't have. Try the one I just uploaded.

    Edit: Should be releasing a new version with tons more fail safes and SmartColors sometime today. Just running through testing and it seems to be working better than ever.
    Last edited by bbri06; 01-17-2010 at 11:44 AM.

  17. #17
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    Tree Finding and cutting is a bit smoother, but no luck with the banking.



    SRL Compiled in 16 msec
    SMART Initialized.
    Loaded: Server 89, Members: True, Signed: True, Super Detail: False.
    Enrix E B
    Creating the NickTPA.
    Starting cutting procedure
    Banking
    Failed to find the color, no result.
    Walking to bank failed
    NextPlayer
    Successfully executed
    Successfully compiled (5497 ms)
    SRL Compiled in 0 msec
    SMART Initialized.
    Loaded: Server 99, Members: True, Signed: True, Super Detail: False.
    Enrix E B
    Creating the NickTPA.
    Starting cutting procedure
    Banking
    Failed to find the color, no result.
    Walking to bank failed
    NextPlayer


  18. #18
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just passing by to say it ran one load, and got lost on the road to bank on the second...
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  19. #19
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Damn thing works one day then fails the next. I'll try and update it sometime soon and will post when I do.

    Edit: Was it trying to find the bank, Cigue? I've never ever had a problem with it getting near the bank, just finding it.

    Edit2: I just completed a bank finding function that has yet to fail me even once after 500 logs cut. I'm now working on updating some other things and you guys can expect a release soon. Hopefully this one is stable :O
    Last edited by bbri06; 01-23-2010 at 04:13 AM.

  20. #20
    Join Date
    Jan 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For me it finds the tree, but doesnt click to cut. Ahhh

  21. #21
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Releasing an updated version. This new version seems to be working better than ever; hopefully it works for you guys.

    Code:
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Bbri06"s Catherby Yew Cutter
    Time running: 4 Hours, 31 Minutes and 25 Seconds
    Logs banked: 729
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Check the first post for updated version: 1.13.

  22. #22
    Join Date
    Jan 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 615: [Hint] (22043:1): Variable 'NEWCOLOR' never used in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Misc\SmartColors.scar
    Line 615: [Hint] (22043:1): Variable 'CTS' never used in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Misc\SmartColors.scar
    not sure what this means but okayy help?

  23. #23
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm... Are you on SRL open dev ?

    The checkout for it is
    http://www.villavu.com/repositories/srl-opendev
    Last edited by bbri06; 01-25-2010 at 08:58 PM.

  24. #24
    Join Date
    Jan 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    indeed i do. Still not working though. :s

  25. #25
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well I have no idea what-so-ever where those are coming from then, but since they are just hints, they should not technically cause problems with the script running.

Page 1 of 2 12 LastLast

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
  •