Page 5 of 8 FirstFirst ... 34567 ... LastLast
Results 101 to 125 of 200

Thread: All-In-One RS3 and SRL6 Scripting Tutorial!

  1. #101
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by slushpuppy View Post
    If my walking path is too long, I guess i have to splice the images ?
    Yeah. You should read the SPS section of this tutorial - there is a link to Google's tutorial for splicing maps.

  2. #102
    Join Date
    Nov 2007
    Location
    Norway
    Posts
    178
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    What happens if I tell SPS to walk to x, and the player is already at position x, will it try to walk to x or detect that the player already is at position x and then just be done?

  3. #103
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Cerium View Post
    What happens if I tell SPS to walk to x, and the player is already at position x, will it try to walk to x or detect that the player already is at position x and then just be done?
    No you won't walk, as that is botty. The SPS functions have a line something like this:

    Simba Code:
    // if distance is less than 10 then there is no real point walking.
    if (distance(destinationPoint, minimap.getCenterPoint()) < 10) then
      exit;

  4. #104
    Join Date
    Feb 2013
    Location
    Belgium
    Posts
    86
    Mentioned
    6 Post(s)
    Quoted
    35 Post(s)

    Default

    I just finished my first fully working script!
    Thanks for the awesome guide!

  5. #105
    Join Date
    Oct 2014
    Location
    Europe
    Posts
    98
    Mentioned
    4 Post(s)
    Quoted
    55 Post(s)

    Default

    Very good guide, it's useful for those who never saw a code before too. Thanks!

  6. #106
    Join Date
    Oct 2014
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    I have read this tutorial nearly three times and it is an amazing resource to start scripting; however, it's missing an important section.. Implementation of Antiban. You briefly cover case statements, but don't include a scripting example using them. This is where the antiban section comes. I am curious on a few various ways to actually trigger a basic antiban every cycle. This could be an invaluable resource for this guide. Kudos Mayor! Thank you for this.

  7. #107
    Join Date
    Oct 2014
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    Like Quentini said,

    I'm affraid to get banned without anti-ban

  8. #108
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by Quentini View Post
    I have read this tutorial nearly three times and it is an amazing resource to start scripting; however, it's missing an important section.. Implementation of Antiban. You briefly cover case statements, but don't include a scripting example using them. This is where the antiban section comes. I am curious on a few various ways to actually trigger a basic antiban every cycle. This could be an invaluable resource for this guide. Kudos Mayor! Thank you for this.
    Quote Originally Posted by xCrazyGuyNL View Post
    Like Quentini said,

    I'm affraid to get banned without anti-ban
    Anti-ban is actually very easy to implement depending on how basic or advanced you want to go. You should just do a Google search for any old anti-ban tutorials or look at other people's scripts to see how they implemented theirs.

    @The Mayor - That is something to add to your list though.



    New to scripting? Procedures & Functions for Beginners
    Do you use your computer at night? Just get f.lux

  9. #109
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Quentini View Post
    I have read this tutorial nearly three times and it is an amazing resource to start scripting; however, it's missing an important section.. Implementation of Antiban. You briefly cover case statements, but don't include a scripting example using them. This is where the antiban section comes. I am curious on a few various ways to actually trigger a basic antiban every cycle. This could be an invaluable resource for this guide. Kudos Mayor! Thank you for this.
    Quote Originally Posted by xCrazyGuyNL View Post
    Like Quentini said,

    I'm affraid to get banned without anti-ban
    Quote Originally Posted by Incurable View Post
    Anti-ban is actually very easy to implement depending on how basic or advanced you want to go. You should just do a Google search for any old anti-ban tutorials or look at other people's scripts to see how they implemented theirs.

    @The Mayor - That is something to add to your list though.

    just read antiban.simba and throw it in a case statement

  10. #110
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by Quentini View Post
    I have read this tutorial nearly three times and it is an amazing resource to start scripting; however, it's missing an important section.. Implementation of Antiban. You briefly cover case statements, but don't include a scripting example using them. This is where the antiban section comes. I am curious on a few various ways to actually trigger a basic antiban every cycle. This could be an invaluable resource for this guide. Kudos Mayor! Thank you for this.
    Quote Originally Posted by xCrazyGuyNL View Post
    Like Quentini said,

    I'm affraid to get banned without anti-ban
    More specifically, add in whatever procedures/functions you want to activate during an "antiban" within a random output case statement procedure like so:
    Simba Code:
    procedure antiban;
    var
      i: integer;
    begin
      i := random(100);
      case i of
        0..10: doSomething;
        11..20: doSomethingElse;
        21..50: doSomethingElseElse;
        51..100: doSomethingElseElse;
      end;
    end;

    Every time antiban; is called, the integer i will be assigned a random number between 0 and 100, and then based on that random number, the case statement will pick something to do. As you can see, you can adjust the ranges of each antiban however you like, or even increase the range from 100 to 1000 or anything.

    Here's a more complex example from one of my scripts:
    Simba Code:
    {PROCEDURE -- antiBan
      Purpose:  Make us look more like a human and less like a bot.
      Comments: None.}

    procedure antiBan;
    var
      i, afk, idle, mSpeed: integer;
    begin
      if not isLoggedIn then
        exit;
      i := random(antibanThreshold);  //Rather than have a definite range for i, like 0 to 100, I allow the user to set the range themselves, customizing the frequencies
      afk := (AFKTime + random(1500));
      idle := (idleTime + random(500));
      mSpeed := mouseSpeed;
      failsafe.pause;
      case i of
        1..100:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - Small Random Mouse');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - Small Random Mouse');
            smallRandomMouse();
          end;
        101..200:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - Pick Up Mouse');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - Pick Up Mouse');
            pickUpMouse();
          end;
        201..300:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - Sleep and Move Mouse');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - Sleep and Move Mouse');
            sleepAndMoveMouse(random(2000) + 500);
          end;
        301..380:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - Idling for ' + toStr(idle) + 'ms');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - Idling for ' + toStr(idle) + 'ms');
            case i of
              301..350:
                begin
                  mouseOffClient(OFF_CLIENT_RANDOM);
                  wait(idle);
                end;
              351..400: sleepAndMoveMouse(idle + 500);
            end;
            recalcAB;
          end;
        381..420:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - Hover Skill');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - Hover Skill');
            if not gameTabs.isTabActive(TAB_BACKPACK) then
              exit;
            hoverSkill(SKILL_RUNECRAFTING);
            sleepAndMoveMouse(random(50, 450));
          end;
        421..428:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - AFKing for ' + toStr(afk) + 'ms');
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - AFKing for ' + toStr(afk) + 'ms');
            mouseOffClient(OFF_CLIENT_RANDOM);
            wait(afk);
            mouseSpeed := mspeed;
            ClarityDebug('New mouse speed - ' + toStr(mspeed));
            scriptStatus('New mouse speed - ' + toStr(mspeed));
            recalcAB;
          end;
        429..450:
          begin
            ClarityDebug('Performing antiban. (' + ToStr(i) + ') - New mouse speed of ' + toStr(mspeed));
            scriptStatus('Performing antiban. (' + ToStr(i) + ') - New mouse speed of ' + toStr(mspeed));
            mouseSpeed := mspeed;
          end;
        451..antibanThreshold:
          begin
            failsafe.start;
            exit;
          end;
      end;
      failsafe.start;
    end;
    As you can see, I made events such as going AFK or idle less common than random mouse movement events. As mentioned by Inc and Mayor, you can also look at other scripts for examples.

    If you want, you can and should write custom antiban procedures that are relevant to your script's activity! In my opinion, just a few random mouse movements and camera rotations is not very effective.
    Last edited by Clarity; 11-14-2014 at 04:49 AM.

  11. #111
    Join Date
    Nov 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great tutorial.

    I'll see what I can make.

  12. #112
    Join Date
    Oct 2014
    Location
    Europe
    Posts
    98
    Mentioned
    4 Post(s)
    Quoted
    55 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    TBoxArray

    Here is a TBoxArray that consists of 28 backpack slot boxes:

    I'm thinking about making a TBoxArray from these slots:



    But I can't manage to do it. I have the slot's margin color (from ACA) and the size (48x52 px) but I don't know how to code it. Could someone help me with this?

    Edit: What measurement does simba use as "distance"? I thought it was pixels, but as I tested-tried various funtions, like SplitTPAEx, now I don't get it. BTW it works now with SplitTPAEx(TPA, w:=2, h:=2).
    Last edited by Torol; 11-17-2014 at 09:39 PM.

  13. #113
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Torol View Post
    I'm thinking about making a TBoxArray from these slots:



    But I can't manage to do it. I have the slot's margin color (from ACA) and the size (48x52 px) but I don't know how to code it. Could someone help me with this?

    Edit: What measurement does simba use as "distance"? I thought it was pixels, but as I tested-tried various funtions, like SplitTPAEx, now I don't get it. BTW it works now with SplitTPAEx(TPA, w:=2, h:=2).
    You can use a grid( ) for that, so look up that function. If you need help with it, post in help section.

  14. #114
    Join Date
    Feb 2012
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    I have been abusing these forums too long without any contribution. But after reading your informative thread, I think it's time to start. I have got some ideas for small projects and I will start from there!

    Thanks for your guide.

  15. #115
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Hey wait a minute, that gets nearly 200k per hour on f2p, should I put this in the junior members section
    Dat cliffhanger.

    Anyway thanks for giving an old timer a rerun on Simba. Cheers!

  16. #116
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Ecer View Post
    I have been abusing these forums too long without any contribution. But after reading your informative thread, I think it's time to start. I have got some ideas for small projects and I will start from there!

    Thanks for your guide.
    Good luck

    Quote Originally Posted by Claymore View Post
    Dat cliffhanger.

    Anyway thanks for giving an old timer a rerun on Simba. Cheers!
    It was more "i cbf writing a proper conclusion"

  17. #117
    Join Date
    Feb 2012
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Thanks again for such an extensive tutorial. I have finally made a decent first script as a result.

    I have one question though, I cannot find the DTM Editor in the Tools tab anymore? Can you point me to a direction to where I can create my own DTM?

    Cheers, Ecer.

  18. #118
    Join Date
    Nov 2014
    Posts
    104
    Mentioned
    12 Post(s)
    Quoted
    59 Post(s)

    Default

    Quote Originally Posted by Ecer View Post
    Thanks again for such an extensive tutorial. I have finally made a decent first script as a result.

    I have one question though, I cannot find the DTM Editor in the Tools tab anymore? Can you point me to a direction to where I can create my own DTM?

    Cheers, Ecer.
    I had to do this:
    1. View -> Extensions
    2. Select 'dtm_editor.sex' and check the extension on
    3. Tools -> DTM Editor


    Hopefully it works for you.

  19. #119
    Join Date
    Feb 2012
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by akarigar View Post
    I had to do this:
    1. View -> Extensions
    2. Select 'dtm_editor.sex' and check the extension on
    3. Tools -> DTM Editor


    Hopefully it works for you.
    Oh yeah, I feel like an idiot. I forgot about extensions. Haha Thanks buddy!

  20. #120
    Join Date
    Oct 2014
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Time to get back into learning to script again!

  21. #121
    Join Date
    Mar 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Amazingly informative. I'm pretty proficient in Java and a lot of this seems similar. Although I'm pretty sure that's a bad thing because I feel like I'm gonna type java if else statements. Also the lack of "{" and "}" is messing with me. Thanks for the tutorial!

  22. #122
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Eoan View Post
    Amazingly informative. I'm pretty proficient in Java and a lot of this seems similar. Although I'm pretty sure that's a bad thing because I feel like I'm gonna type java if else statements. Also the lack of "{" and "}" is messing with me. Thanks for the tutorial!
    Had the same, came from developing Android applications. But you'll get pretty fast familiar with this language.

  23. #123
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Eoan View Post
    Amazingly informative. I'm pretty proficient in Java and a lot of this seems similar. Although I'm pretty sure that's a bad thing because I feel like I'm gonna type java if else statements. Also the lack of "{" and "}" is messing with me. Thanks for the tutorial!
    Quote Originally Posted by Suikerwafel View Post
    Had the same, came from developing Android applications. But you'll get pretty fast familiar with this language.
    Yeah everything is pretty similar and you will used to using begins and ends for nested code instead of { }

  24. #124
    Join Date
    May 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Thanks for the awesome tutorial, I think i'm gonna scripting for simba/srl a shot. I've been stuck in the .NET/javascript/css world for a long time now and this might be a nice break.

  25. #125
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by jrtsoget View Post
    Thanks for the awesome tutorial, I think i'm gonna scripting for simba/srl a shot. I've been stuck in the .NET/javascript/css world for a long time now and this might be a nice break.
    Good luck. If you need any help, just post in the help section!

Page 5 of 8 FirstFirst ... 34567 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •