Page 1 of 3 123 LastLast
Results 1 to 25 of 63

Thread: 400K Combat XP/Hr Free [Easy method]

  1. #1
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default 400K Combat XP/Hr Free [Easy method]

    Hey, I have recently discovered a method of obtaining 400k melee xp/hr which would require a simple script. Basically, all the script has to do is turn on protect from magic, teleport to a gate stone, create and drop a new one and activate momentum when its lit up.

    This method involved finding a Skeletal Horde boss in dungeoneering in floor 12. Before starting the script the user would have to sell the resources and buy bulk astral runes to be in the 1st inv spot. They would then go to the boss room, turn on protect from magic and autoretaliate and drop a gatestone. Once they have died the script could start.

    All the script needs to do is a) wait to the player has died and then double click the quick prayer icon, cast teleport to group gatestone, create a new gatestone in inv spot 2 and then drop it and b) click momentum when it is able to be reactivated.

    The reason for creating new gatestones is because once every five minutes they disappear and recreating them each time keeps the script running smoothly. ATM I am doing this with ghost-mouse but it is fairly unstable as there is a leeway in the amount of time your character lasts in the boss room. Doing this generates 400k xp/hr melee, 250k xp/hr range and 150k xp/hr mage at no cost at all and can be done in ftp and p2p.

    If anyone could be bothered to make this (it seems fairly easy) then I would be highly grateful and if it was SRL members only then I would understand. Cheers, mxtrix.

  2. #2
    Join Date
    May 2012
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Do the skeletons keep spawning if you don't block off the corrididors?
    Currently Working on:
    Mining:77/80
    Herblore:55/80

  3. #3
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    Yes, you just afk while you are in the room. I have done it legit for a few hours so it seems there is no time limit, the only limit which comes to mind would be the six hour relog but im sure if you gain 400k xp/hr logging it every six hours manually would not be an issue. If you want I can lend you my account.

  4. #4
    Join Date
    Apr 2012
    Posts
    3,356
    Mentioned
    34 Post(s)
    Quoted
    218 Post(s)

    Default

    Wow nice method. This would be pretty beaut.

  5. #5
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    You meant stocking up cosmic runes instead of astral? And single clicking on quick prayer turns protect from mage on. Double clicking would turn it on and off. I'll look into this later today

    Script source code available here: Github

  6. #6
    Join Date
    May 2012
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You know I thought about doing this legit once, didn't think it would get that much xp though! How does your character die with the skinweaver healing you?

  7. #7
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    I have a few more ideas on how to script it now I have had a good think about it. You could recognize when you are in the starting room by the minimap only having one yellow dot in the center of the you are dead text in the chatbox. I assume you could script it so when it identifies that the momentum symbol is lit up it clicks it or presses a key to activate it. I have my last exam tomorrow for the year and if nobody has started on it I might give it a go and learn how to script myself.

    EDIT: And for the quick prayers when you die it appears as activated but no prayers are in use. It might be a bug or something but to reactivate your prayers you have to click it twice.

  8. #8
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    And you get dragged towards the edges of the room with auto-retaliate set on. It would be easier to script it to teleport back and drop a new gate-stone then repetitively trying to walk back near the healer.

  9. #9
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    I have a few more ideas on how to script it now I have had a good think about it. You could recognize when you are in the starting room by the minimap only having one yellow dot in the center of the you are dead text in the chatbox. I assume you could script it so when it identifies that the momentum symbol is lit up it clicks it or presses a key to activate it. I have my last exam tomorrow for the year and if nobody has started on it I might give it a go and learn how to script myself.

    EDIT: And for the quick prayers when you die it appears as activated but no prayers are in use. It might be a bug or something but to reactivate your prayers you have to click it twice.
    Very possible to detect the boss room and starting room.
    Ill test it in like 2 hours from now, if it gets good xp then I will make the script.

    Script source code available here: Github

  10. #10
    Join Date
    Mar 2012
    Location
    Runescape, G.E
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    interesting i think i might try it out.

  11. #11
    Join Date
    May 2012
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This script would be as simple as clicking the dark area here on the mini-map whenever health was low.



    Unfortunately it appears that auto-retaliate has an anti-afk feature which will sometimes not initiate combat on its own when you run back to the healer.



    To be honest I didn't see how it could get anywhere near the xp you've stated anyway, but then again I'm a bit farther from max combat than you are (80's stats) and I didn't know the xp drops rise up to those amounts.
    Last edited by The_Dude; 11-26-2012 at 02:15 PM.

  12. #12
    Join Date
    May 2012
    Location
    Draynor Willows
    Posts
    498
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    I never Dung so I have no idea what this horde thing is, however it sounds promising.

  13. #13
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    Yes, you just afk while you are in the room. I have done it legit for a few hours so it seems there is no time limit, the only limit which comes to mind would be the six hour relog but im sure if you gain 400k xp/hr logging it every six hours manually would not be an issue. If you want I can lend you my account.
    I actually was thinking of making this when I was dunging the other day..

  14. #14
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    The XP is so high because the monsters are extremely weak for their level. Some of the 130's give you 2k xp per kill. The XP is relative to your combat level. I was doing this on my main which is 93/94/93, I am unsure on how much the XP varies with your combat level. It should be relatively high though, as you get more xp when the things you kill are higher leveled and dung automatically creates enemies with combat levels suited to your stats.
    Last edited by mxtrix; 11-26-2012 at 09:59 AM.

  15. #15
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    The XP is so high because the monsters are extremely weak for their level. Some of the 130's give you 2k xp per kill. The XP is relative to your combat level. I was doing this on my main which is 93/94/93, I am unsure on how much the XP varies with your combat level. It should be relatively high though, as you get more xp when the things you kill are higher leveled and dung automatically creates enemies with combat levels suited to your stats.
    Currently training prayer from 1 to 43 on my main.. He is 200 combat though, used to be my staking account. Now with the EOC I'm 200 combat anyways so I might aswell get summoning and prayer

    About to test this, 39 prayer currently. This account has a prom 2h/plate so we will see how much xp/h it can get. I'll update this post later

    EDIT: Got 43 prayer and nearly finished dung but realised I can do 3 binds now and that my prom spear is pretty bad now. So I'm getting a prom 2h/legs now (already have prom pl8)

    Edit 2: 12 runecrafting so I can't make cosmics, I'll write the script to act like we have cosmics. Then I'll make cosmics on another acc and bind them :P

    Edit 3: Started a complexity 6 dungeon going to try out the group gatestone.

    Edit 4: Done 3 dungs so far no skeletal horde

    Edit 5: Got it now getting some nice 700 xp drops sometimes. Can start scripting now

    Edit 6: Detection of starting room done
    Simba Code:
    program SkeletalHordeAbuser;
    {$DEFINE SMART}
    {$i srl/srl.simba}

    {* Instructions
    - Start a Floor 12 Dungeon
    - Finish the floor and make as much cosmics as possible
    - Make sure you have protect from magic set as quick prayer
    - Drop a gatestone in the boss room with the Skeletal Horde
    *}


    function SmugglerRoom: boolean;
    var
      NPCs: TPointArray;
      L, i: Integer;
      s: String;
      DeadText: boolean;

    begin
      NPCs := GetMiniMapDots('npc');
      L := Length(NPCs);

      for i:= 8 downto 1 do
      begin
        s := GetChatBoxText(i, clBlack);
        if Pos('dead', s) > 0 then
        begin
          DeadText := True;
          break;
        end;
      end;

      Result := (L = 1) and (DeadText);
    end;

    begin
      SetupSRL;
      if SmugglerRoom then writeln('in the starting room');
    end.

    Edit 5?: Can now debug our own room
    Last edited by J J; 11-26-2012 at 11:44 AM.

    Script source code available here: Github

  16. #16
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    All good, if you want I can lend you my main to try it on. I just found a thread about using abilities http://villavu.com/forum/showthread.php?p=1130640.
    Last edited by mxtrix; 11-26-2012 at 11:09 AM.

  17. #17
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    Usually it takes ~3 dungeons to get him, just make sure you are on floor 12. I love when you get a 2.5k xp drop

    EDIT: Wow, nice work. I am off for the night, better get a good nights sleep before my final exam. After I am done tomorrow I should be able to help out (if needed).
    Last edited by mxtrix; 11-26-2012 at 11:47 AM.

  18. #18
    Join Date
    Oct 2012
    Location
    Singapore
    Posts
    163
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Cool thing to know... Script development... Eta... Soon hopefully.
    Perfection is not attainable, but if we chase perfection we can catch excellence.
    Vince Lombardi
    http://villavu.com/forum/showthread....t=newbie+guide
    Read through and followed all steps 3 times. Still doesn't get Simba scripting or any form of scripting for that matter. *retard*

  19. #19
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

  20. #20
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    Usually it takes ~3 dungeons to get him, just make sure you are on floor 12. I love when you get a 2.5k xp drop

    EDIT: Wow, nice work. I am off for the night, better get a good nights sleep before my final exam. After I am done tomorrow I should be able to help out (if needed).
    Okay, I have around 1,5 hours of script time until I have to leave for school so we'll see how far I can get :P

    Script so far:
    Simba Code:
    program SkeletalHordeAbuser;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SRL/srl/misc/smartgraphics.simba}

    {* Instructions
    - Start a Floor 12 Dungeon
    - Finish the floor and make as much cosmics as possible
    - Make sure you have protect from magic set as quick prayer
    - Drop a gatestone in the boss room with the Skeletal Horde
    *}


    // Gets all the points from our dungeoneering room
    function GetRoom: TPointArray;
    var
      i, j, X, Y, nearest, room: Integer;
      dist: Extended;
      Rooms: T2DPointArray;

    begin
      for i:=MMX1 to MMX2  do
        for j:=MMY1 to MMY2 do
        begin
          dist := Pow((MMCX-i), 2) + Pow((MMCY-j), 2);
          if (dist < Pow(((MMX2-MMX1)/2), 2)) then
            if not(FindColorTolerance(X, Y, 0, i, j, i, j, 10)) then
            begin
              SetLength(Result, Length(Result)+1);
              Result[Length(Result)-1] := Point(i, j);
            end;
        end;

      nearest := 1000;
      Rooms := SplitTPA(Result, 3);
      if (Length(Rooms) > 0) then
        for i := 0 to high(Rooms) do
        begin
          MiddleTPAEx(Rooms[i], X, Y)
          dist := Abs(MMCX - X) + Abs(MMCY - Y);
          if (dist < nearest) then
          begin
            nearest := Round(dist);
            room := i;
          end;
        end;

      SetLength(Result, Length(Rooms[room]));
      Result := Rooms[room];
      SMART_DrawDotsEx(True, Result, clRed);
    end;

    // Checks if there are any npc's in our room
    function NPCInRoom: boolean;
    var
      NPCs, RoomPoints: TPointArray;
      L, i: Integer;
      B: TBox;

    begin
      NPCs := GetMiniMapDots('npc');
      L := Length(NPCs);
      if L > 0 then
      begin
         RoomPoints := GetRoom;
         B := GetTPABounds(RoomPoints);
         for i:=0 to L do
           if PointInBox(NPCs[i], B) then
           begin
             Result := True;
             break;
           end;
      end;
    end;

    // Checks if we died
    function WeDied: boolean;
    var
      i: Integer;
      s: String;
      DeadText: boolean;

    begin
      for i:=8 downto 1 do
      begin
        s := GetChatBoxText(i, clBlack);
        if Pos('dead', s) > 0 then
        begin
          Result := True;
          break;
        end;
      end;
    end;

    // Checks if you are in the starting room
    function StartingRoom: boolean;
    begin
      Result := NPCInRoom and WeDied;
      writeln('Are we in the starting room? ' + BoolToStr(Result));
    end;

    // Searches for the gatestone portal
    function GatestonePortal: boolean;
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      i, L, LL: Integer;
      P: TPoint;

    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.01, 0.61);

      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 12041486, MSX1, MSY1, MSX2, MSY2, 17);
      L := Length(TPA);
      if L > 0 then
      begin
        SplitTPAWrap(TPA, 5, ATPA);
        SortATPASize(ATPA, True);
        LL := Length(ATPA[0]);
        if LL > 50 then
        begin
          P := MiddleTPA(ATPA[0]);
          MMouse(P.x, P.y, RandomRange(-5, 5), RandomRange(-5, 5));
          //ClickMouse2(1);
          Result := True;
          writeln('Did we find the portal? ' + BoolToStr(Result));
        end;
      end;
    end;

    // Checks if we can use Momentum
    function FullAdrenaline: boolean;
    var
      Percent: Integer;

    begin
      Percent := GetAdrenalinePercent;
      writeln('Our adrenaline: ' + IntToStr(Percent));
      Result := GetAdrenalinePercent >= 98;
      writeln('Can we use our ultimate ability? ' + BoolToStr(Result));
    end;



    begin
      SetupSRL;
      StartingRoom;
      FullAdrenaline;
      GatestonePortal;
    end.

    Result:


    Debug:
    Paired with SMART[8132]
    Are we in the starting room? True
    Our adrenaline: 0
    Can we use our ultimate ability? False
    Did we find the portal? True
    Successfully executed.

    EDIT: Can now find the gatestone portal and enter it, took me longer than expected :O
    Simba Code:
    program SkeletalHordeAbuser;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SRL/srl/misc/smartgraphics.simba}

    {* Instructions
    - Start a Floor 12 Dungeon
    - Finish the floor and make as much cosmics as possible
    - Make sure you have protect from magic set as quick prayer
    - Drop a gatestone in the boss room with the Skeletal Horde
    *}


    // Gets all the points from our dungeoneering room
    function GetRoom: TPointArray;
    var
      Nearest, Room, C1, C2, i, L: Integer;
      Dist: Extended;
      RoomATPA: T2DPointArray;
      MMBox, MMCircle, RoomTPA: TPointArray;
      P: TPoint;

    begin
      MMBox := TPAFromBox(IntToBox(MMX1, MMY1, MMX2, MMY2));
      MMCircle := RemoveDistTPointArray(MMCX, MMCY, 75, MMBox, True);

      C2 := clBlack;
      for i:=0 to high(MMCircle) do
      begin
        P := MMCircle[i];
        C1 := GetColor(P.x, P.y);
        if not(SimilarColors(C1, C2, 10)) then
        begin
          L := Length(RoomTPA);
          SetLength(RoomTPA, L+1);
          RoomTPA[L] := P;
        end;
      end;

      Nearest := 1000;
      RoomATPA := SplitTPA(RoomTPA, 2);
      if Length(RoomATPA) > 0 then
        for i:=0 to high(RoomATPA) do
        begin
          P := MiddleTPA(RoomATPA[i]);
          //SMART_DrawDot(False, P, clRed);
          Dist := Distance(MMCX, MMCY, P.x, P.y);
          writeln('Room ' + IntToStr(i) + ' distance: ' + ToStr(Dist));
          if (Dist < Nearest) then
          begin
            Nearest := Round(Dist);
            Room := i;
          end;
        end;

      Result := RoomATPA[room];
      SMART_DrawDotsEx(True, Result, clGreen);
    end;

    // Checks if there are any npc's in our room
    function NPCInRoom: boolean;
    var
      NPCs, RoomPoints: TPointArray;
      L, i: Integer;

    begin
      NPCs := GetMiniMapDots('npc');
      L := Length(NPCs);
      if L > 0 then
      begin
         RoomPoints := GetRoom;
         for i:=0 to L-1 do
           if PointInTPA(NPCs[i], RoomPoints) then
           begin
             Result := True;
             break;
           end;
      end;
    end;

    // Checks if we died
    function WeDied: boolean;
    var
      i: Integer;
      s: String;

    begin
      for i:=8 downto 1 do
      begin
        s := GetChatBoxText(i, clBlack);
        if Pos('dead', s) > 0 then
        begin
          Result := True;
          break;
        end;
      end;
    end;

    // Checks if you are in the starting room
    function StartingRoom: boolean;
    begin
      Result := NPCInRoom and WeDied;
      writeln('Are we in the starting room? ' + BoolToStr(Result));
      Result := True;
    end;

    // Searches for the gatestone portal
    function GatestonePortal: boolean;
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      L, LL: Integer;
      P: TPoint;

    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.01, 0.61);

      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 12041486, MSX1, MSY1, MSX2, MSY2, 17);
      L := Length(TPA);
      writeln('Portal color matches: ' + IntToStr(L));
      if L > 0 then
      begin
        SplitTPAWrap(TPA, 5, ATPA);
        SortATPASize(ATPA, True);
        LL := Length(ATPA[0]);
        writeln('Portal points: ' + IntToStr(LL));
        if LL > 250 then
        begin
          P := MiddleTPA(ATPA[0]);
          MMouse(P.x, P.y, RandomRange(-5, 5), RandomRange(-5, 5));
          ClickMouse2(1);
          Wait(RandomRange(3000, 4000));
          Result := True;
        end;
      end;

      writeln('Did we find the portal? ' + BoolToStr(Result));
    end;

    // Checks if we can use Momentum
    function FullAdrenaline: boolean;
    var
      Percent: Integer;

    begin
      Percent := GetAdrenalinePercent;
      writeln('Our adrenaline: ' + IntToStr(Percent));
      Result := GetAdrenalinePercent >= 98;
      writeln('Can we use our ultimate ability? ' + BoolToStr(Result));
    end;

    // Walks around the room trying to find the portal, time out after 30 secs
    function FindPortal: boolean;
    var
      RoomPoints: TPointArray;
      P: TPoint;
      T, R, Dg: Integer;

    begin
      if StartingRoom then
      begin
        MarkTime(T);
        SetAngle(SRL_ANGLE_LOW);
        while not(Result) do
        begin
          Dg := Round(rs_GetCompassAngleDegrees);
          MakeCompass(RandomRange(Dg, Dg+90));
          writeln('TimeFromMark(T) => ' + IntToStr(TimeFromMark(T)));
          if (TimeFromMark(T) > 60000) then
            break;

          writeln('Possibly walking to the middle of the room');
          RoomPoints := GetRoom;
          P := MiddleTPA(RoomPoints);
          writeln('P: ' + ToStr(P));
          if Distance(P.x, P.y, MMCX, MMCY) > 10 then
          begin
            writeln('We are not near the middle, walking there');
            MMouse(P.x, P.y, RandomRange(-3, 3), RandomRange(-3, 3));
            ClickMouse2(1);
            while IsMoving do
              Wait(RandomRange(300, 600));
            Wait(RandomRange(1000, 2000));
          end;

          if GatestonePortal then
            Result := True;
        end;
        Writeln('Did we find the portal? ' + BoolToStr(Result));
      end;

      ClickNorth(SRL_ANGLE_HIGH);
    end;



    begin
      SetupSRL;
      ClickNorth(SRL_ANGLE_HIGH);
      //GetRoom;
      //StartingRoom;
      //FullAdrenaline;
      //GatestonePortal;
      FindPortal;
    end.
    Last edited by J J; 11-26-2012 at 12:46 PM.

    Script source code available here: Github

  21. #21
    Join Date
    May 2012
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by J J View Post
    Okay, I have around 1,5 hours of script time until I have to leave for school so we'll see how far I can get :P
    Haha J J! Fix the GOP script :P

  22. #22
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by The_Dude View Post
    Haha J J! Fix the GOP script :P
    Forgot about that, it's just a simple DTM change most likely :P

    This does work pretty well already:
    Kills skeletons if we are in the boss room.
    If we are in the starting room then it will try to find the group gatestone portal.

    Simba Code:
    program SkeletalHordeAbuser;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SRL/srl/misc/smartgraphics.simba}

    {* Instructions
    - You need to get the boss "Skeletal Skinweaver", the following way:
      = Start a floor 12 complexity 6 dungeon
      = Complete the floor and if you have the boss then enter the room and drop
        your gatestone somewhere
      = Make sure that:
        ~ Your auto retaliate is ON
        ~ Your quick prayer is set to protect from magic
        ~ Your action bar is open
        ~ You have the constitution ability "Momentum" set in the action bar
      = Once everything is setup wait until you die

    - Edit the keys below to make sure they match your ability's
      = DO NOT ADD MOMENTUM

    - Once you have set everything up, start the script
    *}


    // Gets all the points from our dungeoneering room
    function GetRoom: TPointArray;
    var
      Nearest, Room, C1, C2, i, L: Integer;
      Dist: Extended;
      RoomATPA: T2DPointArray;
      MMBox, MMCircle, RoomTPA: TPointArray;
      P: TPoint;

    begin
      MMBox := TPAFromBox(IntToBox(MMX1, MMY1, MMX2, MMY2));
      MMCircle := RemoveDistTPointArray(MMCX, MMCY, 75, MMBox, True);

      C2 := clBlack;
      for i:=0 to high(MMCircle) do
      begin
        P := MMCircle[i];
        C1 := GetColor(P.x, P.y);
        if not(SimilarColors(C1, C2, 10)) then
        begin
          L := Length(RoomTPA);
          SetLength(RoomTPA, L+1);
          RoomTPA[L] := P;
        end;
      end;

      Nearest := 1000;
      RoomATPA := SplitTPA(RoomTPA, 2);
      if Length(RoomATPA) > 0 then
        for i:=0 to high(RoomATPA) do
        begin
          P := MiddleTPA(RoomATPA[i]);
          //SMART_DrawDot(False, P, clRed);
          Dist := Distance(MMCX, MMCY, P.x, P.y);
          //writeln('Room ' + IntToStr(i) + ' distance: ' + ToStr(Dist));
          if (Dist < Nearest) then
          begin
            Nearest := Round(Dist);
            Room := i;
          end;
        end;

      Result := RoomATPA[room];
      SMART_DrawDotsEx(True, Result, clGreen);
    end;

    // Checks if there is one NPC in our room
    function SmugglerInRoom: boolean;
    var
      NPCs, RoomPoints: TPointArray;
      L, i, Count: Integer;

    begin
      NPCs := GetMiniMapDots('npc');
      L := Length(NPCs);
      if L > 0 then
      begin
        RoomPoints := GetRoom;
        for i:=0 to L-1 do
          if PointInTPA(NPCs[i], RoomPoints) then
            Inc(Count);
      end;

      Result := Count = 1;
    end;

    // Checks if we died
    function WeDied: boolean;
    var
      i: Integer;
      s: String;

    begin
      for i:=8 downto 1 do
      begin
        s := GetChatBoxText(i, clBlack);
        if Pos('dead', s) > 0 then
        begin
          Result := True;
          break;
        end;
      end;
    end;

    // Checks if you are in the starting room
    function StartingRoom: boolean;
    begin
      Result := (SmugglerInRoom and WeDied);
      writeln('Are we in the starting room? ' + BoolToStr(Result));
    end;

    // Searches for the gatestone portal
    function GatestonePortal: boolean;
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      L, LL: Integer;
      P: TPoint;

    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.01, 0.61);

      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 12041486, MSX1, MSY1, MSX2, MSY2, 17);
      L := Length(TPA);
      writeln('Portal color matches: ' + IntToStr(L));
      if L > 0 then
      begin
        SplitTPAWrap(TPA, 5, ATPA);
        SortATPASize(ATPA, True);
        LL := Length(ATPA[0]);
        writeln('Portal points: ' + IntToStr(LL));
        if LL > 250 then
        begin
          P := MiddleTPA(ATPA[0]);
          MMouse(P.x, P.y, RandomRange(-5, 5), RandomRange(-5, 5));
          ClickMouse2(1);
          Wait(RandomRange(3000, 4000));
          Result := True;
        end;
      end;

      writeln('Did we find the portal? ' + BoolToStr(Result));
    end;

    // Checks if we can use Momentum
    function UseMomentum: boolean;
    var
      L, LL: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      P: TPoint;

    begin
      FindColorsTolerance(TPA, 66, 47, 345 - SRL_NAVBAR_INGAME_Y, 478, 379 - SRL_NAVBAR_INGAME_Y, 25);
      L := Length(TPA);
      if L > 0 then
      begin
        SplitTPAWrap(TPA, 5, ATPA);
        SortATPASize(ATPA, True);
        LL := Length(ATPA[0]);
        writeln('Momentum colors: ' + IntToStr(LL));
        if LL > 100 then
        begin
          P := MiddleTPA(ATPA[0]);
          MMouse(P.x, P.y, 10, 10);
          ClickMouse2(1);
          Result := True;
        end;
      end;
    end;

    // Walks around the room trying to find the portal, time out after 30 secs
    function FindPortal: boolean;
    var
      RoomPoints: TPointArray;
      P: TPoint;
      T, Dg: Integer;

    begin
      if StartingRoom then
      begin
        MarkTime(T);
        SetAngle(SRL_ANGLE_LOW);
        while not(Result) do
        begin
          Dg := Round(rs_GetCompassAngleDegrees);
          MakeCompass(RandomRange(Dg, Dg+90));
          writeln('TimeFromMark(T) => ' + IntToStr(TimeFromMark(T)));
          if (TimeFromMark(T) > 60000) then
            break;

          writeln('Possibly walking to the middle of the room');
          RoomPoints := GetRoom;
          P := MiddleTPA(RoomPoints);
          writeln('P: ' + ToStr(P));
          if Distance(P.x, P.y, MMCX, MMCY) > 10 then
          begin
            writeln('We are not near the middle, walking there');
            MMouse(P.x, P.y, RandomRange(-3, 3), RandomRange(-3, 3));
            ClickMouse2(1);
            while IsMoving do
              Wait(RandomRange(300, 600));
            Wait(RandomRange(1000, 2000));
          end;

          if GatestonePortal then
            Result := True;
        end;
        Writeln('Did we find the portal? ' + BoolToStr(Result));
      end;

      ClickNorth(SRL_ANGLE_HIGH);
    end;

    procedure UseRandomAbility;
    begin
      TypeSendEx(IntToStr(Random(11)), False);
    end;

    // MAINLOOP
    begin
      SetupSRL;
      ClickNorth(SRL_ANGLE_HIGH);
      repeat
        case StartingRoom of
          false: begin
                   writeln('Fighting skeletons...');
                   UseMomentum;
                   UseRandomAbility;
                   Wait(RandomRange(1000, 2000));
                 end;
          true: if not(FindPortal) then
                begin
                  WriteLn('We failed to find the gatestone portal');
                  WriteLn('Terminating the script');
                  TerminateScript;
                end;
        end;
      until(false);
    end.

    Still in bèta, if anyone feels like finishing it:
    - Add proper ability using
    - Add quick prayer
    - More failsafes

    I'm off to college now, will be back in around 5 hours from now.

    Let me know if you decide to finish it in the meantime.

    Script source code available here: Github

  23. #23
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    For the whole gatestone thing its easier to use the spell, as its on the same tab in which you cast the spell to create a new one.

  24. #24
    Join Date
    Jul 2007
    Location
    Finland
    Posts
    304
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for sharing i will abuse this tomorrow

  25. #25
    Join Date
    Jul 2012
    Location
    London
    Posts
    1,549
    Mentioned
    0 Post(s)
    Quoted
    86 Post(s)

    Default

    I've never known what those gatestones are for? Only started dunging

Page 1 of 3 123 LastLast

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
  •