Results 1 to 7 of 7

Thread: *** ! AIO Stronghold Script ! ***

  1. #1
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Lightbulb *** ! AIO Stronghold Script ! ***



    Yup it's me again! Since this weekend there'll be double drops in the stronghold of security, I've decided to make a script to kill and loot monsters down there. So far I've made quite a bit of progress and am looking into a lot more. Like all of my scripts, it will be public. If you have any suggestions for the script, please post them- just note that I am not a member, but if you wish to have members capabilities, then please lend me an account. I don't have any plans for the May 24 weekend, so I should be done fairly quickly. I know Putonajonny is also making an AIO Stronghold script, but there can never be too many scripts.

    So far I've scripted down the fighter testing for minotaurs, since they are the toughest colors to get. I've managed to get it to attack them almost nonstop- no problems. I have a skeleton for the entire script which is so far resting at 600 lines, but the Minotaur BETA is quite a bit less due to the fact that it is only login, fight procedure, and mainloop. There is no pickups yet, I just want you guys to see that it works.

    Like I said, if you want something added, post it and if it's popular enough or just sounds good in general I'll most likely add it to the script.

    Go ahead, test out the Minotaurs BETA!

    For those of you testing it out, the best room is probably the very large one with both wolves and minotaurs (the level 27 ones). It works, got me a good chunk of XP for 1/2 hour. I'm proud of it.

    ~Joe

    Alright, so I finished it! It has bone burying, attacking, and looting options. I'll make new post in the fighting section, since that is where it belongs. I will also include it here. Enjoy!
    Last edited by Joe; 05-19-2012 at 03:46 PM.

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

    Default

    I would definately use TPA's etc. you can use the horns and split them into ATPA. Then you can sort them on size and it will find the minotaurs horns instead of the goblins staff

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

      // This is the initial test for the Stronghold AIO I'm making, just to see if it works. Give feedback!
     // It doesn't have pickups yet because it's just an attack BETA, will release another BETA soon

    {================================ ! FILL THIS OUT ! ==========================================}
    {=============================================================================================}
    {_____________________________________________________________________________________________}
    {=============================================================================================}
    {=============================================================================================}
    procedure DeclarePlayers;  // Login information. You want to play, dont you? Fancy Shmancy
    begin
      HowManyPlayers := 2; // You can add more if you want, Just copy and paste a Player Section and write a different number in the [0], [1], [2] Box
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0; // Starts at Players[0]


      with Players[0] do
        begin
          Name        := '';  // Enter your username in the blue things
          Pass        := ''; // Enter your password in the blue things
          Nick        := '';
          Pin         := '';
          Active      := True;
          BoxRewards := ['Xp', 'ostume', 'aphire'];
        end;

      with Players[1] do // Multiplayer!
        begin
          Name        := '';  // Enter your username in the blue things
          Pass        := ''; // Enter your password in the blue things
          Nick        := '';
          Pin         := '';
          Active      := True;
          BoxRewards := ['Xp', 'ostume'];
        end;
    end;
    {=============================================================================================}
    {=============================================================================================}
    {_____________________________________________________________________________________________}
    {=============================================================================================}
    {=============================================================================================}

    // No antiban because it's a BETA

    function InFight: Boolean;
    begin
      Result := srl_InFight;
    end;

    procedure WaitUntilWalking;
    begin
      Wait(300 + Random(300));
      if (IsMoving=True) then
        begin
          repeat
            Wait(50 + Random(100));
          until(IsMoving=False);
        end;
      Wait(300 + Random(300));
    end;

    procedure Kill;
    var
      X, Y, i: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;

    begin
      begin
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.15, 0.25);
        if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10134949, MSX1, MSY1, MSX2, MSY2, 19) then
          begin
            SplitTPAExWrap(TPA, 4, 4, ATPA);
            if Length(ATPA) > 0 then
              begin
                SortATPASize(ATPA, True);
                MiddleTPAEx(ATPA[0], X, Y);
                MMouse(X, Y, RandomRange(-2, 2), RandomRange(-2, 10));
                if WaitUpTextMulti(['ino', 'taur', 'Minotaur'], 500) then
                  begin
                    case Random(7) of
                      0..4: ClickMouse2(1);
                      5..6: begin
                              ClickMouse2(0);
                              WaitOptionMulti(['tta', 'tack', 'Attack'], 500);
                            end;
                    end;
                    WaitUntilWalking;
                    repeat
                      Wait(100 + Random(200));
                    until not(InFight);
                  end;
              end;
            end;
       end;
    end;

    begin
      Smart_server := 11;
      Smart_Signed := TRUE;
      Smart_Members := FALSE;
      Smart_SuperDetail := FALSE;

      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      Wait(2000);
      GameTab(tab_Inv);

      if (not(LoggedIn)) then
        if Players[CurrentPlayer].Active then
            LoginPlayer;

      repeat
        repeat
          if (not InFight) then
            Kill;
        until (not LoggedIn);
          NextPlayer(Players[CurrentPlayer].Active = False);
      until AllPlayersInactive;
    end.

    // Script completed in 25 minutes and 34 seconds =Þ

    {           ***************               Color Log                *****************
    2697257, tolerance 1 (Minotaur Back)
    4868426, tolerance 1 (Chest Area)
    1579032, tolerance 1 (Hooves)
    2171937, tolerance 1 (Sidish Area)
    }

    Running your script gave me this
    Simba Code:
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Successfully executed.

    Try running my example, hope it helps.
    Last edited by J J; 05-19-2012 at 08:56 AM.

    Script source code available here: Github

  3. #3
    Join Date
    Jun 2006
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    will try this out when i need to get 30-90 range , btw how was it the xp down there ?

  4. #4
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    For pickups I'm adding other peoples charm parts

  5. #5
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    are you adding banking to yours? or is it just looting until inventory is full?

  6. #6
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    are you adding banking to yours? or is it just looting until inventory is full?
    I haven't decided yet.. banking is gonna be a real @#%* to get out of the stronghold- not to mention getting back in. I think I'll just keep it with looting until the inventory is full. It's nearly finished, just gotta do some testing.

    @JJ: I was thinking about TPAs.. I honestly did, but the fact that the colors down there are so common, findobjcustom just works better since you can have multiple colors and then it just splits them all up until it finds something with all of them. I spent about a half hour trying to use TPAs on various monsters that even had unique colors and it was just clicking on the walls.

    I'm pretty sure you get that error because there is no terrain recognition in my BETA. If I had SPS recognition to find where the person is, then you won't get that error (I'm pretty sure) and I tested for 2 hours+ with my debug getting spammed with that message, but it just kept attacking.

    The XP in the stronghold is pretty beast. I would testify that it has the best XP in F2P, possibly better than quite a bit P2P XP as well. For the first release I won't have a proggy because I want to spit this one out into the public as soon as possible so I can get feedback on my pickup and attack. It'll probably be ready by tonight.

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

    Default

    Quote Originally Posted by JOEbot View Post
    @JJ: I was thinking about TPAs.. I honestly did, but the fact that the colors down there are so common, findobjcustom just works better since you can have multiple colors and then it just splits them all up until it finds something with all of them. I spent about a half hour trying to use TPAs on various monsters that even had unique colors and it was just clicking on the walls
    This is perfect for minotaurs.

    villavu.com/forum/showthread.php?p=1019191

    It finds a cluster of multiple colors. You can input the horn colors and the gray colors of it's body and I'm sure it will accurately find them

    Script source code available here: Github

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •