Results 1 to 13 of 13

Thread: 2 new functions, could be useful for your scripts!

  1. #1
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default 2 new functions, could be useful for your scripts!

    Well, here are 2 functions I have recently wrote. Feel free to use any of them in your own scripts or modify them a bit as long as you give credits to me for it

    Here they are, read descriptions for info on how to use.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    {*************************************************************
    function HoverPrayer(What, HowLong: Integer; RandomPrayer: Boolean): Boolean;
    By: JAD
    Description: Hovers over specified prayer and waits for set
    amount of time. If RandomPrayer chosen will choose a random
    prayer to hover. The prayers are by skill level, so 01 would
    hover Thick Skin, and 49 would hover Redemption...etc.
    *************************************************************}


    function HoverPrayer(What, HowLong: Integer; RandomPrayer: Boolean): Boolean;
    var JX1, JY1, JX2, JY2: Integer;

    begin
      if(not(LoggedIn))then
        Exit;
      GameTab(6);
      wait(500+random(500));
      if(RandomPrayer)then
      begin
        case random(23) of

          0:begin
              JX1 := 581;
              JY1 := 218;
              JX2 := 588;
              JY2 := 239;
            end;

          1:begin
              JX1 := 618;
              JY1 := 220;
              JX2 := 631;
              JY2 := 234;
            end;

          2:begin
              JX1 := 659;
              JY1 := 221;
              JX2 := 675;
              JY2 := 234;
            end;

          3:begin
              JX1 := 699;
              JY1 := 223;
              JX2 := 715;
              JY2 := 235;
            end;

          4:begin
              JX1 := 578;
              JY1 := 262;
              JX2 := 586;
              JY2 := 273;
            end;

          5:begin
              JX1 := 622;
              JY1 := 254;
              JX2 := 630;
              JY2 := 278;
            end;

          6:begin
              JX1 := 660;
              JY1 := 260;
              JX2 := 671;
              JY2 := 273;
            end;

          7:begin
              JX1 := 698;
              JY1 := 259;
              JX2 := 716;
              JY2 := 272;
            end;

          8:begin
              JX1 := 574;
              JY1 := 296;
              JX2 := 592;
              JY2 := 310;
            end;

          9:begin
              JX1 := 615;
              JY1 := 296;
              JX2 := 632;
              JY2 := 310;
            end;

          10:begin
               JX1 := 658;
               JY1 := 295;
               JX2 := 676;
               JY2 := 311;
             end;

          11:begin
               JX1 := 699;
               JY1 := 299;
               JX2 := 715;
               JY2 := 311;
             end;

          12:begin
               JX1 := 577;
               JY1 := 339;
               JX2 := 588;
               JY2 := 351;
             end;

          13:begin
               JX1 := 622;
               JY1 := 332;
               JX2 := 629;
               JY2 := 354;
             end;

          14:begin
               JX1 := 660;
               JY1 := 337;
               JX2 := 672;
               JY2 := 350;
             end;

          15:begin
               JX1 := 699;
               JY1 := 336;
               JX2 := 717;
               JY2 := 349;
             end;

          16:
            begin
               JX1 := 572;
               JY1 := 382;
               JX2 := 584;
               JY2 := 390;
             end;

          17:begin
               JX1 := 619;
               JY1 := 370;
               JX2 := 636;
               JY2 := 380;
             end;

          18:begin
               JX1 := 658;
               JY1 := 370;
               JX2 := 676;
               JY2 := 382;
             end;

          19:begin
               JX1 := 698;
               JY1 := 374;
               JX2 := 716;
               JY2 := 387;
             end;

          20:begin
               JX1 := 577;
               JY1 := 411;
               JX2 := 590;
               JY2 := 426;
             end;

          21:begin
               JX1 := 614;
               JY1 := 417;
               JX2 := 638;
               JY2 := 431;
             end;

          22:begin
               JX1 := 657;
               JY1 := 409;
               JX2 := 674;
               JY2 := 425;
             end;

          23:begin
               JX1 := 696;
               JY1 := 416;
               JX2 := 719;
               JY2 := 430;
             end;
        end;
      end;

      if(not(RandomPrayer))then
      begin
        case What of

          01:begin
               JX1 := 581;
               JY1 := 218;
               JX2 := 588;
               JY2 := 239;
             end;

          04:begin
               JX1 := 618;
               JY1 := 220;
               JX2 := 631;
               JY2 := 234;
             end;

          07:begin
               JX1 := 659;
               JY1 := 221;
               JX2 := 675;
               JY2 := 234;
             end;

          08:begin
               JX1 := 699;
               JY1 := 223;
               JX2 := 715;
               JY2 := 235;
             end;

          09:begin
               JX1 := 578;
               JY1 := 262;
               JX2 := 586;
               JY2 := 273;
             end;

          10:begin
               JX1 := 622;
               JY1 := 254;
               JX2 := 630;
               JY2 := 278;
             end;

          13:begin
               JX1 := 660;
               JY1 := 260;
               JX2 := 671;
               JY2 := 273;
             end;

          16:begin
               JX1 := 698;
               JY1 := 259;
               JX2 := 716;
               JY2 := 272;
             end;

          19:begin
               JX1 := 574;
               JY1 := 296;
               JX2 := 592;
               JY2 := 310;
             end;

          22:begin
               JX1 := 615;
               JY1 := 296;
               JX2 := 632;
               JY2 := 310;
             end;

          25:begin
               JX1 := 658;
               JY1 := 295;
               JX2 := 676;
               JY2 := 311;
             end;

          26:begin
               JX1 := 699;
               JY1 := 299;
               JX2 := 715;
               JY2 := 311;
             end;

          27:begin
               JX1 := 577;
               JY1 := 339;
               JX2 := 588;
               JY2 := 351;
             end;

          28:begin
               JX1 := 622;
               JY1 := 332;
               JX2 := 629;
               JY2 := 354;
             end;

          31:begin
               JX1 := 660;
               JY1 := 337;
               JX2 := 672;
               JY2 := 350;
             end;

          34:begin
               JX1 := 699;
               JY1 := 336;
               JX2 := 717;
               JY2 := 349;
             end;

          37:begin
               JX1 := 572;
               JY1 := 382;
               JX2 := 584;
               JY2 := 390;
             end;

          40:begin
               JX1 := 619;
               JY1 := 370;
               JX2 := 636;
               JY2 := 380;
             end;

          43:begin
               JX1 := 658;
               JY1 := 370;
               JX2 := 676;
               JY2 := 382;
             end;

          44:begin
               JX1 := 698;
               JY1 := 374;
               JX2 := 716;
               JY2 := 387;
             end;

          45:begin
               JX1 := 577;
               JY1 := 411;
               JX2 := 590;
               JY2 := 426;
             end;

          46:begin
               JX1 := 614;
               JY1 := 417;
               JX2 := 638;
               JY2 := 431;
             end;

          49:begin
               JX1 := 657;
               JY1 := 409;
               JX2 := 674;
               JY2 := 425;
             end;

          52:begin
               JX1 := 696;
               JY1 := 416;
               JX2 := 719;
               JY2 := 430;
             end;
          else
          begin
            Writeln('Please pick a valid prayer level to hover...');
            Result := False;
            Exit;
          end;
        end;
      end;
      MouseBox(JX1,JY1,JX2,JY2,3);
      wait(HowLong+random(500));
    end;





    begin
      SetupSRL;
      ActivateClient;
      wait(500+random(500));
      HoverPrayer(0,3000+random(1000),true);
    end.









    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
     
     
    {********************************************************
    function ReportPlayer(Who, ForWhat: String): Boolean;
    By: JAD
    Description: Reports player. Capital letters and spacing don't matter
    for what you put in ForWhat, just needs to be proper spelling.
     
    ********************************************************}

    function ReportPlayer(Who, ForWhat: String): Boolean;
    var JADX, JADY: Integer;
        JX1,JY1,JX2,JY2: Integer;
    begin
      if(not(LoggedIn))then
      Exit;
      MouseBox(428,477,493,490,1);
      wait(500+random(500));
      SendText((Who))
      wait(500+random(500));
     
      Trim(ForWhat);
     
      case LowerCase(ForWhat) of
     
        'offensivelanguage':
        begin
          JX1:=56;
          JY1:=214;
          JX2:=139;
          JY2:=218;
        end;
                             
        'itemscamming':
        begin
          JX1:=64;
          JY1:=229;
          JX2:=112;
          JY2:=233;
        end;
       
        'passwordscamming':
        begin
          JX1:=70;
          JY1:=244;
          JX2:=125;
          JY2:=247;
        end;
       
        'bugabuse':
        begin
          JX1:=62;
          JY1:=259;
          JX2:=93;
          JY2:=262;
        end;
       
        'jagexstaffimpersonation':
        begin
          JX1:=75;
          JY1:=274;
          JX2:=145;
          JY2:=278;
        end;
       
        'accountsharing/trading':
        begin
          JX1:=57;
          JY1:=288;
          JX2:=116;
          JY2:=193;
        end;
       
        'macroing':
        begin
          JX1:=61;
          JY1:=304;
          JX2:=90;
          JY2:=309;
        end;
       
        'multipleloggingin':
        begin
          JX1:=278;
          JY1:=213;
          JX2:=323;
          JY2:=218;
        end;
       
        'encouragingotherstobreakrules':
        begin
          JX1:=284;
          JY1:=229;
          JX2:=338;
          JY2:=232;
        end;
       
        'misuseofcustomersupport':
        begin
          JX1:=275;
          JY1:=244;
          JX2:=318;
          JY2:=248;
        end;
       
        'advertising/website':
        begin
          JX1:=270;
          JY1:=258;
          JX2:=313;
          JY2:=263;
        end;
       
        'realworlditemtrading':
        begin
          JX1:=273;
          JY1:=274;
          JX2:=326;
          JY2:=278;
        end;
       
        'askingforpersonaldetails':
        begin
          JX1:=273;
          JY1:=289;
          JX2:=328;
          JY2:=293;
        end;
        else
        begin
          Writeln('Invalid ForWhat option..');
          Exit;
        end;
      end;
     
      MouseBox(JX1,JY1,JX2,JY2,3);
      wait(500+random(500));
      if(FindColor(x,y,255,JX1,JY1,JX2,JY2))then
      begin
        Result := True;
        GetMousePos(JADX,JADY);
        Mouse(JADX,JADY,0,0,true);
        wait(500+random(500));
      end else
      begin
        if(LoggedIn)then
        MouseBox(480,35,493,48,1);
        Writeln('Failed to report..');
        Result := False;
      end;
    end;
     
    begin
      SetupSRL;
      ActivateClient;
      ReportPlayer('Zezima','macroing');
    end.

    There you go. Enjoy!

    Note: I put them in a program and had it setup in the main loops how they should be used. If you are going to put any of these in your scripts, just copy the function, not the whole thing

  2. #2
    Join Date
    Jul 2006
    Posts
    152
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hover prayer will be a great addition to some antibans. You should probably have it check the level of prayer first, if it is worked into antiban, because someone with level 1 prayer who is mining isn't going to hover over the effects.

    Still, looks good, I might use it in my next script credits of course...

  3. #3
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by seaking View Post
    Hover prayer will be a great addition to some antibans. You should probably have it check the level of prayer first, if it is worked into antiban, because someone with level 1 prayer who is mining isn't going to hover over the effects.

    Still, looks good, I might use it in my next script credits of course...
    Thanks! And thanks for the suggestions, can't wait to see it being used in your scripts if you decide to use it.

  4. #4
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, reporting zezima isnt going to help you much...

    false reports abuse maybe...

  5. #5
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by synesthetics View Post
    well, reporting zezima isnt going to help you much...

    false reports abuse maybe...
    I just put that in as an example.. He's the most popular person in runescape so I was just showing how it worked.

  6. #6
    Join Date
    Oct 2006
    Posts
    585
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice ideas ... i really like the hover prayer one

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  7. #7
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Failed when compiling
    Line 6: [Error] (6:8): Unknown identifier 'LoggedIn' in script

    help plz
    p.s. its in the report 1

  8. #8
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Elkins121 View Post
    Failed when compiling
    Line 6: [Error] (6:8): Unknown identifier 'LoggedIn' in script

    help plz
    p.s. its in the report 1
    works for me.. trying recopying it again... or post ur SRL version and scar version

  9. #9
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    srl v370, scar divi 3.06

  10. #10
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    works fine for me.. make sure you copy the whole script or if it still doesn't work redownload SRL by going into SCAR DIVI -> Download SRL. i havn't tested Divi 3.06 only 3.05.. but it still should work.

  11. #11
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol 2 funny funcitons, you really have much insperation, isn't it?
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  12. #12
    Join Date
    Aug 2006
    Posts
    408
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow I love the hoverprayer one. SRL antiban is incredible.

    The report function is cool, but I can't think of many applications other than an bot reporter.

  13. #13
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by wired16 View Post
    nice ideas ... i really like the hover prayer one
    Thanks a lot

    Quote Originally Posted by alach11 View Post
    Wow I love the hoverprayer one. SRL antiban is incredible.

    The report function is cool, but I can't think of many applications other than an bot reporter.
    Thanks And yeah, I didn't think of many people that would use it, which is why I was thinking of adding something to report a lvl 3/default clothing person if it finds one when you call for the function.


    Thanks all

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. More functions
    By Cazax in forum Research & Development Lounge
    Replies: 0
    Last Post: 04-19-2008, 07:13 PM
  2. Help with some functions
    By Pinqvin in forum OSR Help
    Replies: 6
    Last Post: 03-06-2007, 01:34 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
  •