Results 1 to 8 of 8

Thread: Test AutoCurser

  1. #1
    Join Date
    Aug 2007
    Posts
    213
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Test AutoCurser

    I put together this little script for some much needed practice in SCAR scripting. Obviously not a very great script, but whatever Tell me anything that should/could be included within the script. All constructive criticism and help is appreciated.

    Code:
    program Auotcurser;
    {.include srl/srl.scar}
    {.include srl/srl/skill/magic.scar}
    
    Const
     Spells = 3;// how many times you want it cast?
     
    Var
    Ax, Ay, i : Integer;
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      CurrentPlayer:= 0;
      NumberOfPlayers(HowManyPlayers);
    
    
      Players[0].Name := '';             // Username.
      Players[0].Pass := '';             // Password.
      Players[0].Nick := '';             // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := True;
    end;
    
    Procedure OnceloggedIn;
    
    Begin
      makecompass('w');
      setAngle(true);
    end;
    
    Procedure CastCurse;
    
    Begin
     Begin
     i:=0
     GameTab(7);
     Wait(500+Random(600))
     Cast('curse');
     wait(1000+random(500))
     ;FindObjCustom(Ax, Ay,  ['onk, orak'], [3752096], 10)
       Mouse(Ax, Ay, 4, 4, true);
     i:=i+1
     wait(1000+random(3000))
     If i = Spells Then
     Logout;
     end;
    end;
    
    
    Procedure Logsout;
     Begin
     If (i=Spells) Then WriteLn('Finished casting spells... logging out...');
     Logout;
    end;
    
    Procedure Randoms;
     Begin
     FindNormalRandoms;
    end;
    
    Procedure AntiBan;
    begin
      case random(100) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Magic', False);
        3:
          Begin
          Logout;
          Writeln('Status : Sleeping for a few minutes')
          Wait(60000+random(300000))
          LoginPlayer;
          End;
        4: PickUpMouse;
     end;
    end;
    
    
    Procedure Proggy;
    Begin
     WriteLn('[-------------------------------------]')
     WriteLn('[-----Zertunami"s Test AutoCurser-----]')
     WriteLn('[-------------------------------------]')
     WriteLn('[  Ran for ' + TimeRunning + '        ]')
     WriteLn('[ Cast ' + IntToStr(i) + ' Curses     ]')
     WriteLn('[-------------------------------------]')
    End;
    
    Begin
     SetupSRL;
     DeclarePlayers;
     ActivateClient;
     LoginPlayer;
     OnceloggedIn;
     repeat
     CastCurse;
     until(i=Spells)
     Randoms;
     AntiBan;
     Logsout;
     Proggy;
    end.
    
    Procedure FeedBack;
    Begin
      WriteLn(' Please send me a message about any advice, bugs, suggestions,etc... about the script. Thanks!');
    end;

  2. #2
    Join Date
    Dec 2007
    Location
    UK
    Posts
    479
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your procedure FeedBack needs to go before the mainloop before you can call it. Otherwise, a very good start. Needs some standards however!
    I don't play runescape. I auto it

  3. #3
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, good start but look up some tutorials on correct standards, maybe work on a more elaborate anti-randoms and anti-ban functions, see if there are any spots failsafes can be put into place, and add multiplayer support since it looks like it only supports one player.

    One big problem though!! You want to put Randoms, AntiBan, and probabaly Proggy inside your main loop.

  4. #4
    Join Date
    Dec 2007
    Location
    Middle of Here and There
    Posts
    417
    Mentioned
    6 Post(s)
    Quoted
    25 Post(s)

    Default

    you have it repeat, casting, then do anti randoms after you're done working the script O.o

    Let me explain...

    You have:

    SCAR Code:
    repeat
     CastCurse;
     until(i=Spells)
     Randoms;
     AntiBan;

    When you should have...

    SCAR Code:
    repeat
        CastCurse;
        Randoms;
        AntiBan;
      until(i = Spells)

    I hope it helps =\

  5. #5
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If (i=Spells) Then WriteLn('Finished casting spells... logging out...');

    The best is >= because you could also do more >= or => not sure?
    But if you do = it could be running for ever without runes
    ~Hermen

  6. #6
    Join Date
    Dec 2007
    Location
    Middle of Here and There
    Posts
    417
    Mentioned
    6 Post(s)
    Quoted
    25 Post(s)

    Default

    True, because if it miscounts even once and goes over, you've got some problems.

    With the one I made, I make it look for the Cast spell with a DTM, and would log off when it couldn't cast anymore (hence no more runes)

    But yeah, using >= would ensure that when it is more than or equal to Spells, then it would stop.

    <3 Hermpie

  7. #7
    Join Date
    Aug 2008
    Location
    Planet Earth.
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, I've modified your script a tiny bit just to what other peoples recommendations were and I've also added SMART for you. .

    SCAR Code:
    program Auotcurser;
      {.include SRL/SRL/Misc/Smart.scar}
      {.include srl/srl.scar}
      {.include srl/srl/skill/magic.scar}

    const
      Spells = 3;         // how many times you want it cast?
      World  = 'world29'; //World that SMART enters .
      Signed = true;      //Client signed or unsigned . I prefer signed .

    var
      Ax, Ay, i: Integer;

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


      Players[0].Name := '';             // Username.
      Players[0].Pass := '';             // Password.
      Players[0].Nick := '';             // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := true;
    end;

    procedure OnceloggedIn;
    begin
      makecompass('w');
      setAngle(true);
    end;

    procedure CastCurse;
    begin
      begin
        i := 0 GameTab(7);
        Wait(500 + Random(600))
        Cast('curse');
        wait(1000 + Random(500));
        FindObjCustom(Ax, Ay, ['onk, orak'], [3752096], 10)
        Mouse(Ax, Ay, 4, 4, true);
        i := i + 1 wait(1000 + Random(3000)) if i = Spells then Logout;
      end;
    end;


    procedure Logsout;
    begin
      if (i = Spells) then
        Writeln('Finished casting spells... logging out...');
      Logout;
    end;

    procedure Randoms;
    begin
      FindNormalRandoms;
    end;

    procedure AntiBan;
    begin
      case Random(100) of
        0:
          RandomRClick;
        1:
          BoredHuman;
        2:
          HoverSkill('Magic', false);
        3:
        begin
          Logout;
          Writeln('Status : Sleeping for a few minutes')
          Wait(60000 + Random(300000))
          LoginPlayer;
        end;
        4:
          PickUpMouse;
      end;
    end;


    procedure Proggy;
    begin
      Writeln('[-------------------------------------]')
      Writeln('[-----Zertunami"s Test AutoCurser-----]')
      Writeln('[-------------------------------------]')
      Writeln('[  Ran for ' + TimeRunning + '        ]')
      Writeln('[ Cast ' + IntToStr(i) + ' Curses     ]')
      Writeln('[-------------------------------------]')
    end;

    begin
      SmartSetup(World, false, Signed, false);
      SetTargetDC(SmartGetDC);
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      LoginPlayer;
      OnceloggedIn;
      repeat
        CastCurse;
        Randoms;
        AntiBan;
      until (i = Spells)
        Logsout;
      Proggy;
    end.procedure FeedBack;
    begin
      Writeln(' Please send me a message about any advice, bugs, suggestions,etc... about the script. Thanks!');
    end;
    Learning: Italian!
    Code:
    <Jason2G's> I just sprayed WD-40 on my dog's nuts. He was sleeping. And now he can't get back to sleep ^_^

  8. #8
    Join Date
    Sep 2008
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need SUPER BASIC autocurser help
    By Main in forum OSR Help
    Replies: 13
    Last Post: 03-06-2009, 01:50 AM
  2. Replies: 13
    Last Post: 07-26-2008, 05:00 AM
  3. Speed Test [Test your connection and share!]
    By yanix in forum News and General
    Replies: 2
    Last Post: 12-17-2007, 09:27 PM
  4. Simple Autocurser (for the zammy monk in Varrock)
    By Klaust in forum First Scripts
    Replies: 39
    Last Post: 12-06-2007, 06:16 AM
  5. so im making an autocurser :) but,....
    By ShowerThoughts in forum News and General
    Replies: 4
    Last Post: 10-27-2007, 06:47 PM

Posting Permissions

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