Results 1 to 3 of 3

Thread: Rsps ( Near reality ) - Basilisk killer

  1. #1
    Join Date
    Jan 2012
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Rsps ( Near reality ) - Basilisk killer

    Outdated and wont update.

    This is the first real script i am fully making. I had to write a function to check if the player is in combat since "srl_infight" doesn't work in Near-Reality. All it does is attack a basilisk when ever you are not attacking one. It doesn't work with food, only with prayer. It will check prayer each time it kills a basilisk and if your prayer is in the orange it will drink a pray pot. If it can,t find a pray pot, it will automatically click on the invent button and recheck for pray pot. If it can,t find one again, it will simply do ::home and to tele to edgeville.

    Any comments are welcome. Even if you dont play this Rsps, you can still help me commenting the way i scripted this shit !

    Oh yea and the "ClickInShit" procedure is just to get on the client after i click run in simba.

    And something else, i used "movemouse" cause it a Rsps ^^

    Code:
    program Basilisk;
    {$i srl/srl.simba}
    
    var
    count:integer;
    stopitnow:boolean;
    
    procedure ClickInShit;
    begin
    movemouse(743,106)
    wait(200)
    clickmouse(743,106,1)
    end;
    
    function BasiliskColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.06, 0.16);
    
      if not (FindColorsTolerance(arP, 2702708, MSX1, MSY1, MSX2, MSY2, 3)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        Result := arC[i];
       // Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;
    
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    end;
    
    procedure CheckPrayer;
    var
    x,y,w,h,PrayerPotColor:integer;
    begin
    PrayerPotColor := 9886755
    GetClientDimensions(w,h);
    if FindColor(x,y,501500,700,50,764,81)then
    begin
    if FindColor(x,y,9293346,546,200,w-1,h-1) or
     FindColor(x,y,9686837,546,200,w-1,h-1)then
    begin
    wait(200)
    writeln('pray pot found')
    movemouse(x,y)
    wait(200)
    clickmouse(x,y,1)
    end else
    begin
     wait(100);
     writeln('clicking on invent to recheck');
     if FindColor(x,y,1986182,620,168,662,200) then
     begin
     wait(100);
     movemouse(x,y);
     wait(200);
     clickmouse(x,y,1);
     wait(500)
     if FindColor(x,y,9293346,546,200,w-1,h-1) or
     FindColor(x,y,9686837,546,200,w-1,h-1)then
      begin
      wait(200);
      writeln('pray pot found, we were not in invent');
      movemouse(x,y);
      wait(200);
      clickmouse(x,y,1);
    end else
    begin
     wait(100);
     TypeSend('::home');
     stopitnow:=true
    end;
    end;
    end;
    end;
    end;
    
    function IsPlayerInFight: Boolean;
    var
    green,red,x,y:integer;
    begin
    green:= 50820;
    red:= 590010;
    if findcolor(x,y,green,160,80,360,210) or
       findcolor(x,y,red,160,80,360,210) then
    begin
    result := true
    end else
    result := false
    end;
    
    
    
    procedure AttackBasilisk;
    var
    x,y,h,w:integer;
    infight:boolean;
    
    begin
     GetClientDimensions(w,h);
     wait(300);
     if FindColor(x,y,BasiliskColor,0,0,w-1,h-1) then
     begin
     wait(200);
     movemouse(x,y);
     wait(200);
     clickmouse(x,y,1);
     wait(3000);
     repeat
     wait(1000);
     if IsPlayerInFight = false then
     begin
     writeln('not in fight anymore');
     infight:=true;
     end;
     until(infight=true);
     end;
    end;
    
    
    begin
    ClickInShit;
    repeat
    AttackBasilisk;
    inc(count);
    writeln(count);
    CheckPrayer;
    until(stopitnow=true);
    end.
    Last edited by marc2333; 01-08-2013 at 03:00 AM.

  2. #2
    Join Date
    Nov 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    well done man!

  3. #3
    Join Date
    Nov 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you possible make an Iron miner, on this server?
    I'd be very greatful if it would be possible.

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
  •