Results 1 to 5 of 5

Thread: New member New to scripting QUESTION

  1. #1
    Join Date
    Jul 2016
    Posts
    2
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default New member New to scripting QUESTION

    hello all im very new to this and have tried making a few scripts already but i always get stuck on the same problem. i was wondering what is the best current way for a script to detect your player is already chopping a tree. the scripts i have made will just spam a tree even after im already chopping at it. i have tried pixleshift with no luck, and i may just not be entering it into my script correctly, im not really sure. could anybody please help me?

  2. #2
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Which include are you using??

    Possibly post what you have?

    <------------------>



  3. #3
    Join Date
    Mar 2016
    Location
    Scandinavia
    Posts
    138
    Mentioned
    3 Post(s)
    Quoted
    46 Post(s)

    Default

    Hi, welcome to SRL @jint; ! Before I used to detect experience to if the player was chopping trees, I don't think this works anymore though due to the 'RuneScape layout update'.
    You could simply just detect if your getting any logs using DTM's I guess.

    Tell me if you want any kind of help with how the code is suppose to look but as you're new and everything I would recommend that if you get stuck you look it up through the SRL-6 documents. Link: http://docs.villavu.com/srl-6/index.html
    Another tip is if you are stuck with something you could always look how others did it. Example being @KeepBotting;.

    His way of doing it.
    Simba Code:
    function isStillChopping():boolean;//Credit to Keepbotting
    var
      pxShift, startCount, i:integer;
    begin
      case (usePixelShift) of

      TRUE:
      begin
        if (not (isLoggedIn())) then
         exit;
        if tabBackpack.isFull() then
         exit(false);
        smartImage.drawBox(mainScreen.playerBox, false, clRed);
        pxShift := getPixelShiftAverage(mainScreen.playerBox, 50, 500); //should probably use isPlayerAnimating but whatever
        result := (pxShift > 150); //100 returns false-positive, 250 returns false-negative,
                                 //150 and 200 seems good I'm just still deciding which to use
        writeDebug('Still chopping? ' + lowercase(toStr(result)) + ', with an average pixel shift of ' + toStr(pxShift));
      end;

      FALSE:
      begin
        if (not isLoggedIn()) then
         exit;
        if tabBackpack.isFull() then
         exit(false);

        startCount := tabBackpack.count();

        for i := 0 to (randomRange(minWait, maxWait)) do
         begin
           if tabBackpack.isFull() then
            exit(false);
           wait(randomRange(800, 1200));
         end;

        if (tabBackpack.count() <> startCount) then
         begin
           result := true;
         end else
           result := false;

        writeDebug('Still chopping? ' + lowercase(toStr(result)));
      end;

    end;
    end;

    Note: This is for SRL-6.
    Last edited by Lemon star; 07-22-2016 at 07:30 AM. Reason: Note added
    Make sure to checkout this awesome thinggy too. Great alternative to wasting resources "securing" the bitcoin network.
    https://boinc.tacc.utexas.edu/team_d....php?teamid=28

  4. #4
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Welcome to forum.

    <------------------>



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
  •