Results 1 to 5 of 5

Thread: Help with Antirandoms

  1. #1
    Join Date
    Jan 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with Antirandoms

    Recently I have been trying to get some antirandoms running on my scripts, but when I try to add commands like findnormalrandoms; and other things, I continuously get errors. Now I think my problem is because of the format of my script; I didn't use the declare players format (I dont know how to yet). Could someone either explain what I am doing wrong, or direct me to a tutorial that would help me?

  2. #2
    Join Date
    Jan 2009
    Location
    Somewhere
    Posts
    240
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post what you're using. We can help you then

  3. #3
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Warflight View Post
    Recently I have been trying to get some antirandoms running on my scripts, but when I try to add commands like findnormalrandoms; and other things, I continuously get errors. Now I think my problem is because of the format of my script; I didn't use the declare players format (I dont know how to yet). Could someone either explain what I am doing wrong, or direct me to a tutorial that would help me?
    We can't help much without the script posted, but one thing that might help is, did you forget to include srl at the top?

  4. #4
    Join Date
    Jan 2007
    Location
    the middle of know-where
    Posts
    1,308
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hey, I got this from Aser's Tutorial for basic SCAR scripting. It's not a l33t skill level script ... but I think that it will work for what you might be asking for...


    Quote Originally Posted by Aser;
    AntiRandoms


    Anti randoms should be included in every RS script. It is what checks if your character is in a random event and then attempts to solve it or runs/logs out to save you from a ban/death. Without random solving autoing would last about 5 mins before the character got stuck in a random and then just sat there. So include AntiRandoms.

    SCAR Code:
    procedure AntiRandoms;
      if not LoggedIn then
        Exit;
      FindNormalRandoms;
      if InFight then
        RunAway('n', True, 1, 10000);
    end;


    You don’t want it to preform antirandoms while not logged in so you include the if not logged in then part like always. Then you have FindNormalRandoms; This will attempt to solve randoms if they are found.

    InFight checks if your character is under attack. In this case if the character was under attack it would run away

    SCAR Code:
    RunAway(‘direction’,RunFar,Action,Wait time);


    ‘Direction’ is ‘n’ for north, ‘s’ for south and so on. RunFar True makes it run further away. False it doesn’t run as far. Action is in the form of 1, 2, or 3. Wait time is how long to wait before running back.


    SCAR Code:
    Action can be either 1, 2 or 3.
     1: RunAway + Wait(WaitTime) + RunBack
     2: RunAway + Wait(WaitTime)
     3: RunBack


    Obivously you would only use RunAway if you were making a script that did not include fighting (or if your health was low while fighting).

    The AntiRandom procedure should be called whenever you could get a random. Try putting it in your main loop or in you procedure where you are actually doing something. Example--while you are waiting for your character to cut down a tree, or right after the character begins to cut.
    On vacation in NeverLand,
    Code:
    typedef int bool;
    enum { false, true };

  5. #5
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You guys, its the fact he isn't using declareplayers; This is needed for you to detect if a randoms speaking to you...
    I do visit every 2-6 months

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Antirandoms
    By Adamb_135 in forum OSR Help
    Replies: 1
    Last Post: 04-24-2007, 11:58 PM
  2. AntiRandoms
    By antibinki in forum OSR Help
    Replies: 3
    Last Post: 04-02-2007, 01:58 AM
  3. Need help with antirandoms
    By Johura in forum OSR Help
    Replies: 1
    Last Post: 03-28-2007, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •