Results 1 to 20 of 20

Thread: Blaze's Oak Planks

  1. #1
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Blaze's Oak Planks

    Hi, I've been working on this Script that makes oak planks i need some suggestions like how to create a fail safe for walking as it occasionally misses its last point.

    Another issue im having is the pausing in between banking attempts I would love some help on this

    To get it to run have the coins in ur money pouch (or any spot in the inventory other then the first spot)

    Have the oak logs sitting in the top Right corner in your bank and begin in the bank




    Simba Code:
    Program Blazes_Oak_planks;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}

      Var
      myPath:TPointArray;
      myPathOne:TPointArray;
      myPathTwo:TPointArray;
      myPathBackup:TPointArray;
      myPathBack:TPointArray;
      X,Y:Integer;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(8) of
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms
       end;
      end;
    end;
    procedure Walking;
    begin
      SetAngle(0);
      SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas

      SetRun(True);

      myPath := [Point(4851, 2969), Point(4850, 2943), Point(4876, 2936), Point(4915, 2938), Point(4966, 2934), Point(4979, 2884), Point(4984, 2829), Point(5014, 2782), Point(5034, 2737), Point(5047, 2706), Point(5045, 2685)];
      myPathBackup := [Point(4851, 2973), Point(4850, 2941), Point(4887, 2937), Point(4915, 2937), Point(4941, 2936), Point(4967, 2928), Point(4979, 2904), Point(4978, 2875), Point(4987, 2849), Point(4994, 2823), Point(5009, 2806), Point(5014, 2793), Point(5021, 2761), Point(5035, 2740), Point(5047, 2721), Point(5051, 2695), Point(5047, 2686)]

      //myPathBack := [Point(5052, 2689), Point(5039, 2734), Point(5019, 2780), Point(4991, 2816), Point(4977, 2862), Point(4974, 2916), Point(4942, 2935), Point(4881, 2939), Point(4847, 2971)];
      SPS_WalkPath(myPath);
      SPS_WalkPAth(myPathBackup);
      //SPS_WalkPath(myPathBack);

    end;
    Procedure Musician;
    begin
    if FindObj(x, y, 'alk-to',8344390 , 35) then
             Mouse(x,y,5,5, False);
             ChooseOption('isten-to');
             Antiban;
    end;
    procedure WalkBack;
    begin
       SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas


      myPathOne := [Point(5043, 2685), Point(5041, 2703), Point(5031, 2730), Point(5015, 2791), Point(4997, 2826)];
      SPS_WalkPath(myPathOne);
      myPathBack := [Point(5049, 2693), Point(5043, 2715), Point(5028, 2743), Point(5011, 2790), Point(4993, 2831)];
      SPS_WalkPath(myPathBack);
      Wait(2000 + Random(100));
      Musician;
      Wait(10000 + Random(2000));
      myPathTwo := [Point(4985, 2851), Point(4982, 2897), Point(4954, 2937), Point(4902, 2936), Point(4858, 2936), Point(4850, 2970)];
      SPS_WalkPath(myPathTwo);

     end;

    Procedure WithdrawLogs;
    begin
           if not LoggedIn then Exit;

            Mouse(448, 106, 5, 5, False);
            ChooseOption('ithdraw-All');
    end;
    Procedure Bank;
    begin
    repeat
      if not LoggedIn then Exit;
      wait(454+random(158))
      OpenBankFast(Bank_VE);//in the () thats the bank const of Varrock East
      Wait(100 + Random(100));
      if PinScreen then
        InPin(''); // in the () theres the pin.
    Until(BankScreen);


    end;

    Procedure Sawmill;
    begin
    wait(300 + Random(100));
     if FindObj(x, y, 'alk-to',4278091 , 25) then

     if not LoggedIn then Exit;
             Mouse(x,y,5,5, False);
             ChooseOption('uy-plank');
             Wait(2000 + Random(250));
             Mouse(331,115,5,5, False);

              ChooseOption('ll');
    end;
    Procedure DepositPlanks;
    begin
    if not LoggedIn then Exit;
    Mouse(578,230,5,5, False);
    Wait(100 + Random(100));
    ChooseOption('eposit-All');
    end;

    Procedure MainLoop;
    begin
     repeat
     if not LoggedIn then Exit;
      wait(250+random(158));
      Bank;
      DepositPlanks;
      wait(125+random(133));
      WithdrawLogs;
      Antiban;
      Walking;
      Sawmill;
      wait(125+random(133));
      WalkBack;
      Antiban;
     until(false)
    end;
    begin
    MouseSpeed := 10;
    SetupSRL;
    ActivateClient;
    DeclarePlayers;
    LoginPlayer;
    MainLoop;
    end.


    Sorry for the poor readability

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

    Default

    Honestly for a first script, I like what you have done..

    Try considering ACA or more advanced ATPA for the color finding.. Rather than FindObj.. Makes it much easier....

    Standards can be worked on.. but I'm not complaining Glad to see you are contributing and took the time to learn!

    EDIT: The thing I like about you.. Feb 2012: Join Date... And 6Post
    "What can't hurt you, try it. What can kill you, do it!"

    Scripts Completed: 3
    Amount Released : 2

  3. #3
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the input, Ya i been all over the forums the last few days just not posting much

  4. #4
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    For your antiban always hovering woodcutting is suspicious use:

    Simba Code:
    HoverSkill('random', false);
    Current Project: Retired

  5. #5
    Join Date
    Dec 2011
    Posts
    273
    Mentioned
    0 Post(s)
    Quoted
    39 Post(s)

    Default

    For antiban, I wouldn't use HoverSkill, as you are only doing the SawMill plank making... Maybe for AntiBan, move the camera a bit like some little guy would do being bored while walking?

    Or view your friends list :3

    Or Maybe something like this
    Simba Code:
    Procedure AntiBan;
    begin
    Case Random(55);
    1..24 Wait(25+RandomRange(23, 28));
    25..53 GameTab(tab_Friends); // Think thats right?
    end;
    Last edited by VillaVuFTW; 03-04-2012 at 07:39 PM.
    "What can't hurt you, try it. What can kill you, do it!"

    Scripts Completed: 3
    Amount Released : 2

  6. #6
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    or
    Simba Code:
    BoredHuman;
    Current Project: Retired

  7. #7
    Join Date
    Dec 2011
    Posts
    273
    Mentioned
    0 Post(s)
    Quoted
    39 Post(s)

    Default

    ^^ That too... But does that randomly use different things?? If not.. my anti-ban is better ;3
    "What can't hurt you, try it. What can kill you, do it!"

    Scripts Completed: 3
    Amount Released : 2

  8. #8
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    just spins camera and examines something random
    Current Project: Retired

  9. #9
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've been trying to implement DTMs instead of hardcoding for the oakplanks and depositing but i cannot seem to get simba to recognize my commands the tutorial gave me

    Simba Code:
    program BloodRune;
    {$i SRL\SRL.scar}//We need this in all scripts.
    var
      x, y, Blood: Integer;// We Declare our DTM, x and y as Integers.
    begin//Begins program.
      ClearDebug;//Clears debug, keeps it clean.
      SetupSRL; //Enables SRL.
      Blood := DTMFromString('mggAAAHicY2NgYJjOxMAwCYj7gXgOEM9jgo hxMTIwMAMxJxItBMQ1UoIM5UWFDMlxcQxdLc0MDdXVDGFBQQz8 QLOwYUYcGAIAoIoLVw==');
      //With the above, we Defined our DTM with the code the DTM Editor gave us.
      if FindDTM(Blood, x, y, MIX1, MIY1, MIX2, MIY2) then
      //FindDTM(Name(DTM), x, y, xs, ys, xe, ys):Boolean;
      begin
        Mouse(x, y, 4, 4, False);//FindDTM gives (x, y) as the coordinates of the DTM we made it look for.
        ChooseOption('xamine');//Choose Examine in the pop-up.
        Writeln('We have examined a blood rune!');
      end;
      FreeDTM(Blood);//Free the DTM named Blood.
    end.//Ends program.


    and my bot says the {$i SRL\SRL.scar}//We need this in all scripts. isnt recognized? (im trying to test DTMs in smaller programs like this before i go full scale and implement into my planking script)

  10. #10
    Join Date
    Dec 2011
    Posts
    273
    Mentioned
    0 Post(s)
    Quoted
    39 Post(s)

    Default

    Change it to $I SRL\SRL.simba or

    $DEFINE SRL5 <- Believe this is beta..
    "What can't hurt you, try it. What can kill you, do it!"

    Scripts Completed: 3
    Amount Released : 2

  11. #11
    Join Date
    Mar 2012
    Location
    Alberta
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice, you going to want to declare your DTM's as global variables (at the top of the script, usually before declare players) then try something like this:

    Simba Code:
    procedure DTMS;
    begin
      OakPlank := (DTM HERE)
    end;

    Another for freeing:

    Simba Code:
    procedure FrDTM;
    begin
      FreeDTM(OakPlank);
    end;

    And then at the end in the mainloop make ure you declare it like :

    Simba Code:
    begin
    MouseSpeed := 10;
    Smart_Server := 0;
    Smart_Members := True;
    Smart_Signed := True;
    SetupSRL;
    DTMS;
    ActivateClient;
    DeclarePlayers;
    LoginPlayer;
    Wait(4000 + Random(1000));
    Repeat
    MainLoop;
    Until(False)
    FrDTM;
    end.

    Also the declaring at the top you would need:

    Simba Code:
    {$define SMART}
    {$include srl/srl/misc/smart.simba}
    {$I SRL/SRL.simba}
    {$I srl/srl/misc/debug.simba}
    {$I SPS/SPS.simba}

    All of those as the declare smart, srl, and sps for walking
    Last edited by SwagDaddy; 03-04-2012 at 08:58 PM.

  12. #12
    Join Date
    Dec 2011
    Posts
    273
    Mentioned
    0 Post(s)
    Quoted
    39 Post(s)

    Default

    Swag... You do NOT want to declare as global, rather declare as local, as Global Variables tend to cut up your CPU. Where as the locals dont.

    Global Variables are constantly ran, and why would you run a variable that is not being used.

    Declare Locally
    "What can't hurt you, try it. What can kill you, do it!"

    Scripts Completed: 3
    Amount Released : 2

  13. #13
    Join Date
    Mar 2012
    Location
    Alberta
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well if you need to declare in multiple procedures then might as well declare it as a global integer

  14. #14
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by VillaVuFTW View Post
    Swag... You do NOT want to declare as global, rather declare as local, as Global Variables tend to cut up your CPU. Where as the locals dont.

    Global Variables are constantly ran, and why would you run a variable that is not being used.

    Declare Locally
    No.... I use them the way swag said in my maple chopper and it works well, and looking at other scripts using DTM's they also declare globally like teh's super heater for example
    Current Project: Retired

  15. #15
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for all the help everyone I will try some of these methods later

  16. #16
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are DTMs only for inventory or can i use them to get logs out of the bank?

  17. #17
    Join Date
    Mar 2012
    Location
    Alberta
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah you can MSX1, MSY1, MSX2, MSY2 are for main screen.

  18. #18
    Join Date
    Feb 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    gl with fixing it, I was planning on trying out to make one of these myself

  19. #19
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @swagdaddy thanks i will attempt to switch over to DTMs tommorow and get rid of as much hardcoded coords as i can

  20. #20
    Join Date
    Mar 2012
    Location
    Alberta
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem gl with the script

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
  •