Results 1 to 16 of 16

Thread: Yew Multi Fletch.

  1. #1
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Thumbs up Yew Multi Fletch.

    Hey Guys.
    This Script was Suggested by a person on the forums and because I wanted to learn more I thought might as well.
    It uses the Tool Belt so it can withdraw 14 of each.
    This is the Method that it uses.

    Sorry For the Size...
    It Cuts Logs then Strings them.
    Instructions
    • Make Sure you Have a Knife in your Bank on Show or in your Tool Belt as this bot checks your belt to see if you have or haven't got one and will add it if necessary.

    • It withdraw 14 Yew Logs and 14 Bow Strings Cuts them and then strings them.

    • Make sure your logs are Visible in the Bank or the Bot will stop.

    • Fill in your Account information so smart can Log you in.

    Things I want to add
    • Paint of some sort.

    • Support for other Logs.

    • Random Human Movements. (Soon)

    Update Log
    • Realised. (16/12/11)

    • V1.01 Modified Mouse speed and wait time. (17/12/11)

    • V1.02 Added RandomFinder and a Form of AnitBan ***Buggy***(17/12/11)

    • V1.03 Fixed Timing Problems. Kanah Helped me with the BitMap Leak Problem (Thanks Man)(17/12/11)



    Thanks Ali
    __________

    Last edited by Mat; 12-18-2011 at 08:05 PM.

  2. #2
    Join Date
    Dec 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    using it now. has been running for over an hour and working fine. well done

  3. #3
    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great first script; however, this script may get you banned. All scripts should include some sort of randomness refered to as AntiBan to simulate a person doing another random activity for a while. You may also consider adding random checks, the SRL include has functions for detecting/solving randoms that would help the longevity of the script (currently if a random occured during cutting your script would be stuck in the random and would not logout since you only call ShutDown inside the bank function after the bank screen is open). You may consider adding more comments to explain what your code is doing.

    Also you have a memory leak in the Cutting procedure; you forgot to free the bitmap YewLongButton. This will cause simba to crash eventually.

    Overall you did a great job. You avoided the trap that most first scripts fall into... "the infinite loop"
    ---- Kanah ----

    “If God did not exist then surely man would create him" - Voltiare

  4. #4
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Hey Kanah Thanks for the Advise and about the BitMap Problem.
    I'm just working on getting a Anti-Ban to work and also getting it to ShutDown if it sees a Random event.
    Thanks again <3
    Ali



    Updated V1.02
    ****RandomFinder****Form of Anti Ban****
    Ali



    Updated V1.03
    -BitMap Leak Problem Sorted Thanks to Kanah.
    -Better timing as it was missing the knife.
    Ali
    Last edited by Mat; 12-18-2011 at 01:14 PM.

  5. #5
    Join Date
    Nov 2011
    Posts
    194
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    does it work at soulwars?

  6. #6
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Yes if you want to use coordinates for the bank, as I don't think the clients Bank methods don't support it.
    But its not that hard to get it to work all you have to do is make it set Compass Point
    and Angle
    This Should be it.
    Simba Code:
    MakeCompass('S');
        SetAngle(True);
        MMouse(250, 200, 12, 12);
        GetMousePos(X, Y);
        Mouse(x, y, 0, 0, True);
        wait(500);
    That's how I got it to bank there when I first started scripting
    Put that
    where this is:
    Simba Code:
    OpenBank('vwb', True, True);
    Ali
    Last edited by Mat; 12-17-2011 at 08:52 PM.

  7. #7
    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You should add some sort of progress report that will print out, in the debug or paint on smart, how long the script has been running, what it is doing, and other things. That way people can easily post their results like:

    Simba Code:
    ** Fletcher **
    Loads done: 3/10
    Time running: 0:12:50
    Current Action: Stringing



    Here's an example from one of my scripts:

    Simba Code:
    procedure ProgressReport(Action: Integer);
    //This prints out the current activity and time running
     var
       Clock: TIntegerArray;
       ActionText: TStringArray;
       x,y, TextSpacing, color: integer;
       Font: String;
       RandomFact: string;
    begin
        ActionText := ['Lost','Walk to Mine','Mine Clay', 'Walk to well',
                      'Soften clay', 'Walk to craft', 'Craft Pots', 'Walk to bank',
                      'Deposit pots', 'Recover', 'Taking Break','Dropping Everything','Walk to mine'];

      SRLRandomsReport;
      Stats_Commit;

      Clock := [0,0,0];
      ConvertTime(GetTimeRunning,Clock[0],Clock[1],Clock[2]);
      writeln('=========== THE Pot Maker =============');
      Writeln('Time Running ' +tostr(Clock[0])+':'+tostr(Clock[1])+':'+tostr(Clock[2]));
      writeln('Current action: '+ActionText[Action]);

      if (Players[CurrentPlayer].Booleans[1]) then
      begin
        writeln('Level Goal: '+tostr(Players[CurrentPlayer].Integers[3])+' / '+tostr(Players[CurrentPlayer].Integers[4]));
      end else
        writeln('Trips completed: '+tostr(Players[CurrentPlayer].Banked)+' / '+tostr(Players[CurrentPlayer].Integers[0]));
      writeln('Mining xp: '+tostr(Players[CurrentPlayer].Integers[1]));
      writeln('Crafting xp: '+tostr(Players[CurrentPlayer].Integers[2]));
      writeln('=======================================');

      TextSpacing := 20;
      x := (MSX1+MSX2)/2;//MIX1;
      y := 5;//MIY1;
      color := 592381;
      Font := 'UpChars';


      //Here it draws on the screen
      ClearRSCanvas(SMART_Canvas.canvas);

      Smart_DrawText(x,y,Font,'=========== THE POTMAKER =======',color);
      IncEx(y,TextSpacing);
      Smart_DrawText(x,y,Font,'Time Running ' +tostr(Clock[0])+':'+tostr(Clock[1])+':'+tostr(Clock[2]),color);
      IncEx(y,TextSpacing);
      Smart_DrawText(x,y,Font,'Current Action: '+ActionText[Action],color);
      IncEx(y,TextSpacing);

      if (Players[CurrentPlayer].Booleans[1]) then
      begin
        Smart_DrawText(x,y,Font,'Level Goal: '+tostr(Players[CurrentPlayer].Integers[3])+' / '+tostr(Players[CurrentPlayer].Integers[4]),color);
      end else
        Smart_DrawText(x,y,Font,'Trips completed: '+tostr(Players[CurrentPlayer].Banked)+' / '+tostr(Players[CurrentPlayer].Integers[0]),color);
      IncEx(y,TextSpacing);
      Smart_DrawText(x,y,Font,'Mining XP: '+tostr(Players[CurrentPlayer].Integers[1]),color);
      IncEx(y,TextSpacing);
      Smart_DrawText(x,y,Font,'Crafting XP: '+tostr(Players[CurrentPlayer].Integers[2]),color);
      IncEx(y,TextSpacing);
    end;
    ---- Kanah ----

    “If God did not exist then surely man would create him" - Voltiare

  8. #8
    Join Date
    Nov 2011
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm glad you went through with this.
    Great job!
    I like making stuff.

  9. #9
    Join Date
    Nov 2011
    Location
    Damascus,Syria
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You should add support for other types of logs eg (willow) Since they are MUCH cheaper. Other than that it's a Great script! Thanks.

  10. #10
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by BuckWild View Post
    I'm glad you went through with this.
    Great job!
    Thanks Man
    Quote Originally Posted by badreddine View Post
    You should add support for other types of logs eg (willow) Since they are MUCH cheaper. Other than that it's a Great script! Thanks.
    I Could but I need to figure out how to make it change depending on what you enter in.
    But I can give it ago.
    Got exams this weeks so I won't be updating till the 23 as that's when I finish for the Christmas Break.
    So Keep your eyes Open on this thread .
    Thank

    Ali
    __________


  11. #11
    Join Date
    Nov 2011
    Location
    Damascus,Syria
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I will Keep my eye's Open I really need a fletcher. Anyways i was wondering if you had an AIM or MSN, if you do Please pm me with it I have some questions. Thanks

  12. #12
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    I'm Back and re Coding the Whole thing.
    Allow the User to choose which Log they want to choose, and whether its a Long or Short Bow.
    I'll Keep a Update Log.
    UpdateLog
    • Added All the Vars Needed.

    • Working Matcher.

    • ***Getting BitMaps*** 1-2Hours(Unless I go Bed Haha)
      • Got all the Images Time To Convert

      • All Converted and Tested

    • Now Adding Withdrawing items etc, and freeing BitMaps as my last Script had Problems with this.

    • Script now works! WOOOOOOT time to add random finder and some anti ban.

    Ali
    __________

    Last edited by Mat; 12-23-2011 at 03:02 PM.

  13. #13
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    keep having Exception in Script: Unable to find file 'SRL/SRL.scar' used from ''
    what is this and what can i do about it ?

  14. #14
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Wow long time since anyone used it:P
    Erm that's to do with at the top of the script:
    Simba Code:
    program YewMultiFletch;
    {$define SMART}
    {.include SRL/SRL.scar}
    Change it to:
    Simba Code:
    program YewMultiFletch;
    {$define SMART}
    {.include SRL/SRL.Simba}



    ^^

  15. #15
    Join Date
    Mar 2011
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just a question does this support SW bank?

  16. #16
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    No but I think you can change where it opens the bank to
    Simba Code:
    OpenBankChest(SRL_BANK_SW);



    ^^

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
  •