Results 1 to 25 of 25

Thread: [SRL-6] Wu-Tang Clan Fight Caves [DirectX Compatible]

  1. #1
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Cool [SRL-6] Wu-Tang Clan Fight Caves [DirectX Compatible]

    I could not take it any longer. I just have to get this material out. I want to stress that this script is pretty messy at the moment. I mostly want to release this in a beta sort of thing- so I want to get feedback on how to optimize the script for best xp. I used it on myself for some pretty harsh range xp, but I remember DannyRS had a badass fightcaver that got like 60k/hr.
    I have to give credit to my breh @Spartan 117 for his fantastic ability bar user, also thanks to @The Mayor for his help as well. I made too many help threads and thanks to everyone who helped out in those. But just a quick note before you start this script:
    - Have auto-retaliate on. Without that the script will not do anything in the cave.
    - I always manually log in, so I don't think I even set up declareplayers to work... but if you log it in, the setupcharacter will optimize you to run for hours Manual login will work, but I got login working smoothly.
    - No 6 hour restart, but can run for well over 6 hours. SixHourFix(); implemented.
    - Have your abilities ranging from highest cooldown to lowest followed by thresholds then ultimates, and read the const to set up everything else.
    - Start at the entrance of the fight caves. Can start at entrance or inside the fightcaves.
    - If you want to use @Brandon's DirectX plugin, then set it up here:
    - http://villavu.com/forum/showthread.php?t=107256
    - If you've already done that, then go to the mainloop at the end of the script and remove the "//" from the call before SetupSRL();
    - Live your life to the fullest; fortune favors the brave.

    Simba Code:
    program CaveFighter;
    {$DEFINE SMART}
    {$i srl-6/srl.simba}
    //{$I SPS/lib/SPS-RS3.Simba}

    var
      InTheCave,InTheLobby: TPointArray;
      r: Integer;

    const
      basic = [1,2,3,4,5,6];  //Which actionbar slots do you have a basic ability in?
      threshold = [7,8];    //Which actionbar slots do you have a threshold ability in?
      UseUltimate = True;
      ultimate = [9];       //Which actionbar slots do you have an ultimate ability in?

    procedure DeclarePlayers;
    // I stole this off some random script... logs you in and stuff.
    begin
      setLength(players, 1);
      currentPlayer := 0;

      with players[0] do
      begin
        loginName := '';
        password := '';
        isMember := True;
        isActive := true;
        world := -1;
      end;
    end;

    function WhereAreWe(): String;
    var
      p: Tpoint;
    begin
      if (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) or (minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds)) then
          Result := 'Lobby';

      if not (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) and not (minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds)) then
          Result := 'Cave';
    end;

    procedure SetUpCharacter;
    // Sets up the character to the script specifications
    var
      p: tpoint;
    begin
      Wait(3000+Random(300));
        minimap.setAngle(MM_DIRECTION_EAST);
      Wait(1000+Random(500));
        TRSMainscreen.setAngle(MS_ANGLE_LOW);
        mouseScroll(p, 50, False);
        //WhereAreWe;
    end;


    function FindOpening: Boolean;
    var
      i, s, h: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      t: TTimeMarker;
      p: Tpoint;
    begin
      WhereAreWe;
        if (WhereAreWe = 'Cave') then
          begin
            Exit;
          end;
        if (WhereAreWe = 'Lobby') then
      begin
        mouse(p, MOUSE_LEFT);
        FindColorsTolerance(TPA, 65793,MainScreen.GetBounds, 0, ColorSetting(2, 0.0, 0.0));
        //FindColorsTolerance(TPA, 7449049,inttobox(65,267,520,333), 4, ColorSetting(2, 0.3, 0.3));
        if (Length(TPA) < 1) then
        begin
          Writeln('nope');
          Exit;
        end;

        ATPA := TPA.ToATPA(20, 20);
        SortATPAFromMidPoint(ATPA, Point(randomRange(mainscreen.playerpoint.x - 100, mainscreen.playerpoint.x + 100), mainscreen.playerpoint.y));

        h := High(ATPA);

        for i := 0 to h do
          begin
            if (Length(ATPA[i]) < 50) then
              Continue;

            Mouse(ATPA[i][random(High(ATPA[i]))], MOUSE_MOVE, MOUSE_HUMAN);
            if IsMouseOverText(['ave', 'nter', 'ntrance'], 500) then
              begin
                fastclick(mouse_right);
                  Wait(500+Random(100));
                chooseOption.select(['nter']);
                  Exit();
              end;
          end;
      end;
    end;

    procedure NiceConvo;
    begin
        if (conversationBox.areTalking()) then
          conversationBox.continue(true, true);
            Wait(200+Random(100));
    end;

    function abilityReady(slot: integer): boolean;
    begin
      if not isLoggedIn then Exit;

      result := false;

      if actionBar.getAbilityCooldown(slot) = 1 then
        result := true;
    end;

    function chooseAbility : integer;
    begin
      if not isLoggedIn then Exit;

      if ((actionBar.getAdrenalinePercent() < 50) or (not (abilityready(threshold[0]) or abilityready(threshold[1])))) then
      begin
        for r := 0 to high(basic) do
        begin
          if abilityready(basic[r]) then
          begin
            result := basic[r];
            wait(randomrange(50, 75));
            break;
          end;
        end;
        Exit;
      end;
      if (actionBar.getAdrenalinePercent() >= 50) then
      begin
        for r := 0 to high(threshold) do
        begin
          if abilityready(threshold[r]) then
          begin
            result := threshold[r];
            wait(randomrange(50, 75));
            break;
          end;
        end;
        Exit;
      end;
      if useUltimate then
      begin
        if (actionBar.getAdrenalinePercent() = 100) then
        begin
          for r:= 0 to high(ultimate) do
          begin
            if abilityready(ultimate[r]) then
            begin
              result := ultimate[r];
              wait(randomrange(50, 75));
              break;
            end;
          end;
          Exit;
        end;
      end;
    end;

    function InitQPrayer(): Boolean;
    // If the prayer percent is lower than 90 percent, it will not toggle them as a failsafe. Otherwise it will toggle them.
    begin
      if (actionBar.getPrayerPercent()) < 99 then
        begin
          WriteLn('Prayer below 90%, not using Quickprayers');
          Exit;
        end;

      MouseOval(306,323,3,3,Mouse_Left);
    end;

    procedure Fight;
    var
      NotFightingYet: Integer;
    begin
      if (WhereAreWe = 'Lobby') then
        begin
          Exit;
        end;
      repeat
        actionbar.clickslot(chooseAbility);

        writeln('Hitpoints %: ' +IntToStr(actionBar.getHPPercent()));
        writeln('Adrenaline %: ' +IntToStr(actionBar.getAdrenalinePercent()));
        writeln('Prayer %: ' +IntToStr(actionBar.getPrayerPercent()));
        if (actionBar.getHPPercent()) = 100 then
          begin
            NotFightingYet := NotFightingYet+1; // Failsafe so that you don't get stuck out of a fight in fight mode with full health
          end;
      until actionBar.getHPPercent() < 2 or (NotFightingYet >= 100) or (WhereAreWe = 'Lobby');
        if (NotFightingYet >= 100) then
          begin
            WriteLn('We were stuck in the lobby waiting to fight');
          end;
        Wait(6000+Random(1000));
    end;

    begin
      smartPlugins := ['d3d9.dll'];
      SetupSRL();
      DeclarePlayers;
        If Not Players[CurrentPlayer].Login Then
          Players[CurrentPlayer].Login;
      SetupCharacter;
        repeat
          FindOpening;
            Wait(8000+Random(1000));
          NiceConvo;
            Wait(1000+Random(100));
          InitQPrayer;
          Fight;
            Wait(6000+Random(300));
          NiceConvo;
        until not (isLoggedIn);
      sixhourfix();
    end.
    Once the script is well ironed out, then I'll send it out as a download .simba file. Just for now you can read through it without having to download it and possibly learn something from it. If you got questions just ask me.

    ~Wu-Tang forever.
    You have permission to steal anything I've ever made...

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Did you get my pm about making p global? The actual coords will be stored in the 'p' in whereAreWe, and the 'p' in findOpening will be empty

  3. #3
    Join Date
    Dec 2011
    Location
    Lubbock, Texas
    Posts
    225
    Mentioned
    3 Post(s)
    Quoted
    93 Post(s)

    Default

    Congratz on pre-release!

    Simba Code:
    PiercingShot,BindingShot,Snipe,FragmentationShot,Ricochet,NeedleStrike: Integer;

    None of these seem to be used. (I'm guessing they were DTMs for action bar? haha)
    Also should check out my chooseAbility update. It's quite a bit faster, has an added failsafe, and is much more human like. I think you'll like it!

    Also when using my ability system, you will have to add an extra bit for snipe. It needs to hold for 3 seconds and the way it is set up is it will click snipe, wait for another ability to be ready, then click that ability. Therefore, it is a waste of snipe. Snipe has a neat little thing that pops up on the main screen while it is charging. You can add
    Simba Code:
    if findDTM(snipeIcon, x, y, mainScreen.getBounds()) then
      waitthecooldowntime;
    or if you wanted to get fancy you can have this function:
    Simba Code:
    function notUsingSnipe : boolean;
    begin
      result := not findDTM((snipeIcon, x, y, mainScreen.getBounds());
    end;
    then make this your fight loop
    Simba Code:
    repeat
        if not notUsingSnipe then
          waitfunc(@notUsingSnipe, 50, 3000); //I made it notUsingSnipe because I don't know if you could do waitfunc(not @usingSnipe, 50, 3000);

        actionbar.clickslot(chooseAbility);

        writeln('Hitpoints %: ' +IntToStr(actionBar.getHPPercent()));
        writeln('Adrenaline %: ' +IntToStr(actionBar.getAdrenalinePercent()));
        writeln('Prayer %: ' +IntToStr(actionBar.getPrayerPercent()));
        if (actionBar.getHPPercent()) = 100 then
          begin
            NotFightingYet := NotFightingYet+1; // Failsafe so that you don't get stuck out of a fight in fight mode with full health
          end;
      until actionBar.getHPPercent() < 2 or (NotFightingYet >= 100) or (WhereAreWe = 'Lobby');

    The snipeIcon DTM might be tricky to catch, because it disappears so quickly, so you could alt+printscrn then paste into paint and find your dam that way.

    Good looking script though! I love the simplicity!

    EDIT: Also I think you forgot to post the SPS map
    Previously known as grahambr*SigPic compliments of Clarity
    Spartan Scripts

    Scripts: AutoPlankMake **** AIOEdgeSmelter

  4. #4
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by Spartan 117 View Post
    Congratz on pre-release!

    Simba Code:
    PiercingShot,BindingShot,Snipe,FragmentationShot,Ricochet,NeedleStrike: Integer;

    None of these seem to be used. (I'm guessing they were DTMs for action bar? haha)
    Also should check out my chooseAbility update. It's quite a bit faster, has an added failsafe, and is much more human like. I think you'll like it!

    Also when using my ability system, you will have to add an extra bit for snipe. It needs to hold for 3 seconds and the way it is set up is it will click snipe, wait for another ability to be ready, then click that ability. Therefore, it is a waste of snipe. Snipe has a neat little thing that pops up on the main screen while it is charging. You can add
    Simba Code:
    if findDTM(snipeIcon, x, y, mainScreen.getBounds()) then
      waitthecooldowntime;
    or if you wanted to get fancy you can have this function:
    Simba Code:
    function notUsingSnipe : boolean;
    begin
      result := not findDTM((snipeIcon, x, y, mainScreen.getBounds());
    end;
    then make this your fight loop
    Simba Code:
    repeat
        if not notUsingSnipe then
          waitfunc(@notUsingSnipe, 50, 3000); //I made it notUsingSnipe because I don't know if you could do waitfunc(not @usingSnipe, 50, 3000);

        actionbar.clickslot(chooseAbility);

        writeln('Hitpoints %: ' +IntToStr(actionBar.getHPPercent()));
        writeln('Adrenaline %: ' +IntToStr(actionBar.getAdrenalinePercent()));
        writeln('Prayer %: ' +IntToStr(actionBar.getPrayerPercent()));
        if (actionBar.getHPPercent()) = 100 then
          begin
            NotFightingYet := NotFightingYet+1; // Failsafe so that you don't get stuck out of a fight in fight mode with full health
          end;
      until actionBar.getHPPercent() < 2 or (NotFightingYet >= 100) or (WhereAreWe = 'Lobby');

    The snipeIcon DTM might be tricky to catch, because it disappears so quickly, so you could alt+printscrn then paste into paint and find your dam that way.

    Good looking script though! I love the simplicity!

    EDIT: Also I think you forgot to post the SPS map
    Wow I would expect this kind of critique from SSRL+, but to get it from a Jr member is just incredible! Great work man you are really becoming a good scripter and member of the community. I'll be sure to fix all of that and get it out again when I have some time. And yes I forgot to add in the maps, but they aren't even used, so sps is kind of useless in here.
    You have permission to steal anything I've ever made...

  5. #5
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    grats on release, mr. Wu-Tang

    EDIT: does directx uses the same colours as opengl?
    Last edited by Sjoe; 01-28-2014 at 06:04 PM.

    Creds to DannyRS for this wonderful sig!

  6. #6
    Join Date
    Mar 2013
    Posts
    222
    Mentioned
    3 Post(s)
    Quoted
    143 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    grats on release, mr. Wu-Tang

    EDIT: does directx uses the same colours as opengl?
    I believe it does.
    Pulled from the Direct X Beta thread.

    Quote Originally Posted by sdf View Post
    It's just part of my script. Plays an alarm if new chat is detected. Colours on all utilities/menus are the same, the only noticable variance I've found is in the way water and fishing spots are rendered.

  7. #7
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Ok time for TK's input :P
    Firstly, You don't seem to use everything in declare players.
    Simba Code:
    integers[0] := 50;
        integers[1] := 25;
        booleans[0] := true;
    Are not used. Like you say, you just took it from another script. So you might aswell go ahead and delete those.


    Simba Code:
    function WhereAreWe(): String;
    var
      p: Tpoint;
    begin
      if (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) or (minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds)) then
          Result := 'Lobby';

      if not (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) or not (minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds)) then
          Result := 'Cave';
    end;
    This is a little confusing for me. So I'm going to break it down a little.
    Firstly, the function looks to see if it can find eithier symbol. If it finds ONE of the two, it sets the result to the lobby.
    Then we have another statement which again looks for the symbols (we're already repeating code unnecessarily). As you have used "or" and two nots, if it does not find ONE of the two it sets the location to the cave. This is wrong. You should have used a AND instead as if it finds one (like the first part) it will set the result to cave. I'll come back to this.


    Simba Code:
    procedure SetUpCharacter;
    // Sets up the character to the script specifications
    var
      p: tpoint;
    begin
      Wait(3000+Random(300));
        minimap.setAngle(MM_DIRECTION_EAST);
      Wait(1000+Random(500));
        TRSMainscreen.setAngle(MS_ANGLE_LOW);
        mouseScroll(p, 50, False);
        WhereAreWe;
    end;
    This is indented incorrectly. Look up standards mate. Also why is "wherearewe" called like that there? It looks to me like its being miss used or shouldn't be there at all.


    Simba Code:
    procedure Fight;
    var
      NotFightingYet: Integer;
    begin
      if (WhereAreWe = 'Lobby') then
        begin
          Exit;
        end;
    Ok now back to the wherearewe function. You don't need to wrap that exit with begin end, as it is on its own. You only need begin end when theres multiple lines going in if the statement is true.

    Personally, I would of set it to a boolean and rename it to InLobby. Although a string would be useful for if you were having a lot of different locations and using a case statement. Here it just adds a little bit of extra typing.

    So it would look a little like this:

    Simba Code:
    function InLobby(): Boolean;
    var
      p: Tpoint;
    begin
      Result := minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) or (minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds);
    end;



    //and then when you call it
    if InLobby then
      Exit;


    Hope you take my feedback onboard. Sorry if any of what I said is incorrect (I haven't actually caught up with srl6 yet). Don't get down because of a few mistake either :P

  8. #8
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Updated my baby a little bit, now should run for just about anybody. I've gotten some half decent xp with it
    You have permission to steal anything I've ever made...

  9. #9
    Join Date
    Dec 2013
    Location
    UK
    Posts
    106
    Mentioned
    4 Post(s)
    Quoted
    61 Post(s)

    Default

    any updates?

  10. #10
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by nutta124 View Post
    any updates?
    My brother had it working last night, should be good without any changes..
    You have permission to steal anything I've ever made...

  11. #11
    Join Date
    Dec 2013
    Location
    UK
    Posts
    106
    Mentioned
    4 Post(s)
    Quoted
    61 Post(s)

    Default

    inventory setup? and what about prayer?

  12. #12
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by nutta124 View Post
    inventory setup? and what about prayer?
    Nothing in inventory needed... bring what you want but the inventory isn't used at all
    Set up quick prayers- a button that allows you to toggle multiple preset prayers at once.
    You have permission to steal anything I've ever made...

  13. #13
    Join Date
    Feb 2013
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    Definitely put this script to good use over the double xp weekend. It works reasonably well as long as you babysit it. You just have to worry about health bars in the minimap making the script think you are logged out (stops using abilities)and occasionally spamming a threshold ability when you don't have the adrenaline to use it.

    Major combat update...
    Revolution just spams basic abilities, so I think it might make the code for this script simpler.

  14. #14
    Join Date
    Aug 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Hi, So I found an issue that you should look at. If someone or you has a familiar out with the option to "interact" the script will click on interact because of the "nter"
    This happened to me because of a clan avatar someone else had.

  15. #15
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by warhawk881 View Post
    Hi, So I found an issue that you should look at. If someone or you has a familiar out with the option to "interact" the script will click on interact because of the "nter"
    This happened to me because of a clan avatar someone else had.
    You could add a capital E to "nter" or you could put a space after = "nter "
    You have permission to steal anything I've ever made...

  16. #16
    Join Date
    Sep 2014
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    any chance this one will be coming back?

  17. #17
    Join Date
    Apr 2012
    Posts
    96
    Mentioned
    1 Post(s)
    Quoted
    52 Post(s)

    Default

    ^I second this. Would be fantastic
    99's using SRL bots: Mining, Smithing, Magic, Cooking, Firemaking, Fletching, Hunting, Divination, Fishing, Woodcutting, Defense, Attack, Strenght, Constitution, Contruction, Ranged.
    Thanks to: Ashaman, DannyRS, The Mayor, footballjds, KeepBotting, Press Play, bonsai, Clarity, BANNED ON jonesy259 JASTRALS

  18. #18
    Join Date
    Mar 2015
    Location
    C:\
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thanks for this!

  19. #19
    Join Date
    Mar 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Ty for this. Gonna try it out.

  20. #20
    Join Date
    Aug 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    gonna try it out ty

  21. #21
    Join Date
    May 2012
    Location
    Texas
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Does anyone know if this script works?
    ------------------------------------------------------------------------------------------------------------------
    Fimmy Jallon is here ! Lets get Fimmy!

  22. #22
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by destinyxx View Post
    Does anyone know if this script works?
    Best bet is that it doesn't... I haven't played in forever
    if theres been any updates in like the last year or so this is probably broken
    You have permission to steal anything I've ever made...

  23. #23
    Join Date
    Jan 2015
    Location
    Straya
    Posts
    87
    Mentioned
    1 Post(s)
    Quoted
    34 Post(s)

    Default

    would be very grateful if this script got revisited

  24. #24
    Join Date
    May 2015
    Posts
    31
    Mentioned
    1 Post(s)
    Quoted
    13 Post(s)

    Default

    ------ TRSLobby.findPlayButton(): result = False ?

  25. #25
    Join Date
    Apr 2013
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Same problem here

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
  •