Results 1 to 5 of 5

Thread: Potential Antiban

  1. #1
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default Potential Antiban

    Well, made a function that I thought would be useful. Basically I notice that when I'm killing monsters or doing boring bank skills, I tend to have a hand on the keyboard, specifically rotating the camera via the arrow keys.. Which leads me to this suggestion:

    Simba Code:
    //Personally synthesized from work/advice via MasterBB, R1ch, Nebula and Wizzup?
    Procedure AntiBanRandomAngleToggle;
    var
      StartAngle, ttlkeys, clicks, i: integer;
    begin
      FindNormalRandoms;
      StartAngle := round(rs_GetCompassAngleDegrees());
      ttlkeys:= RandomRange(15, 50);
      begin
        repeat
          begin
          i:= random(4);
            case (i) of
             1:  begin
                   KeyDown(VK_Left);
                   Wait(200+random(50));
                   KeyUp(VK_Left);
                   IncEx(clicks, 1);
                 end;
             2:  begin
                   KeyDown(VK_Right);
                   Wait(200+random(50));
                   KeyUp(VK_Right);
                   IncEx(clicks, 1);
                 end;
             3:  begin
                   KeyDown(40);
                   Wait(200+random(50));
                   KeyUp(40);
                   IncEx(clicks, 1);
                 end;
             4:  begin
                   KeyDown(38);
                   Wait(200+random(50));
                   KeyUp(38);
                   IncEx(clicks, 1);
                 end;
            end;
          end;
        until (clicks = ttlkeys)
      if (clicks = ttlkeys) then
        begin
          Wait(100+Random(50));
          MakeCompass(StartAngle);
        end;
      end;
    end;

    Feel free to take a look / test it out and let me know what you think.
    Advice / criticism / comments welcome :>

  2. #2
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    I think there's something similar in the includes.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Well from what I saw, there's RandomMovement and CompassMovement, which are similar, but don't offer just the key movements in either 4 directions.

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Not bad, maybe have total keys a parameter so the scripter choose how many times to press the keys down?

  5. #5
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    So something like this?

    Simba Code:
    (*
    Toggle Screen Angle
    ~~~~~~~~~

    .. code-block:: pascal

        ToggleScreenAngle(TotalKeys: Integer; WaitPeriod: extended);

    Uses the keyboard arrow keys to act like a bored human wanting to adjust thier
    screen via arrow keys.  Will return original start angle.

    .. note::

        by Le Jingle (Ideas/Advice: Coh3n, MasterBB, R1ch, Nebula and Wizzup?)

    Example:

        ToggleScreenAngle(40, 100);

    .. code-block:: pascal

    *)


    Procedure ToggleScreenAngle(TotalKeys, WaitPeriod: Integer);
    var
      StartAngle, clicks, i: integer;
    begin
      FindNormalRandoms;
      StartAngle := round(rs_GetCompassAngleDegrees());
      repeat
        begin
        i:= random(4);
          case (i) of
           1:  begin
                 KeyDown(VK_Left);
                 Wait((WaitPeriod)+random(50));
                 KeyUp(VK_Left);
                 IncEx(clicks, 1);
               end;
           2:  begin
                 KeyDown(VK_Right);
                 Wait((WaitPeriod)+random(50));
                 KeyUp(VK_Right);
                 IncEx(clicks, 1);
               end;
           3:  begin
                 KeyDown(40);
                 Wait((WaitPeriod)+random(50));
                 KeyUp(40);
                 IncEx(clicks, 1);
               end;
           4:  begin
                 KeyDown(38);
                 Wait((WaitPeriod)+random(50));
                 KeyUp(38);
                 IncEx(clicks, 1);
               end;
          end;
        end;
      until (clicks = TotalKeys)
        if (clicks = TotalKeys) then
        Wait(100+Random(50));
        MakeCompass(StartAngle);
    end;

    * Just remembered why I use this, it's convenient for scripts where you rotate the screen often. And works good when the script is set to ClickNorth(SRL_ANGLE_HIGH); after then antiban (given the script works off of being north+high.
    Last edited by Le Jingle; 04-17-2012 at 11:17 PM.

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
  •