Results 1 to 11 of 11

Thread: Need help...

  1. #1
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help...

    More like im working on homework majorly at the moment and need someone to do something for me! :P

    I need someone to find a color on the ghouls to the west of canifis, the color cannot get confused wiht bones or the color on the ground! :P

    Simple task im just heavy in homework atm, ill give you credit in my script and the thread for finding a working colors. either 2 or 3. so please help!

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    How about I get you the best color as well as the Hue and Sat modifiers for for CTS2?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol sure, that works. I hate english class!!!!!!!!!

    I havent used the hue and Sat modifiers for CTS2 yet so i dont know how they work.

    And something you repeated for for 2 times. And i didnt realize until i read it throught the second time!
    Last edited by laakerules; 01-31-2012 at 03:10 AM.

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default



    Simba Code:
    CTS := GetColorToleranceSpeed;

      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(HueMod, SatMod);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tolerance);
      ColorToleranceSpeed(CTS);

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And how would i add that to my script? :O never even seen that before only heard of it.

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Simba Code:
    Function FindGhoul(Var X,Y: Integer): Boolean;
      var
        CTS: Integer;
        TPA: TPointArray;
      begin
        Result := False;
        CTS := GetColorToleranceSpeed;

      {Set our CTS to 2}
        ColorToleranceSpeed(2);

      {Add in the Hue and Sat modifiers}
        SetColorSpeed2Modifiers(Hue, Sat);

      {Search for the color (9877428) starting at MSCX,MSCY within the area of the main screen, with a set color tolerance}
        FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tolerance);
        ColorToleranceSpeed(CTS);

      {If no color points were found, exit the function}
        if (Length(TPA) < 1) then
          Exit;

      {[0] means it's the first in an array, and because the array starts at our play and moves outward, 0 would be the closest}
        MMouse(TPA[0].X, TPA[0].Y, 5, 5);

        if WaitUpText('ck Gh', 400) then
        begin
          GetMousePos(X, Y);  //Get the mouse X/Y coordinate and set them to return as X/Y for this function
          Result := True;
          Exit;
        end;

      end;

    Simba Code:
    Var
        X,Y: Integer;
      begin
        if FindGhoul(X, Y) then
          Writeln('Found a ghoul at Point('+IntToStr(X)+', '+IntToStr(Y)+')');
      end;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  7. #7
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So would it look like this then inside the script?

    Simba Code:
    //credits to Flight
    Function FindGhoul(Var X,Y: Integer): Boolean;
      var
        CTS: Integer;
        TPA: TPointArray;
      begin
        Result := False;
        CTS := GetColorToleranceSpeed;

        ColorToleranceSpeed(2);

        SetColorSpeed2Modifiers('0.12', '0.79');

         FindColorsSpiralTolerance(MSCX, MSCY, TPA, (9877428, More colors if wanted?), MSX1, MSY1, MSX2, MSY2, 5);
        ColorToleranceSpeed(CTS);

        if (Length(TPA) < 1) then
          Exit;

        MMouse(TPA[0].X, TPA[0].Y, 5, 5);

        if WaitUpText('ck Gh', 400) then
        begin
          GetMousePos(X, Y);
          ClickMouse2(True);        
          Result := True;
          Exit;
        end;

      end;
    Last edited by laakerules; 01-31-2012 at 03:58 AM.

  8. #8
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    FindColorsSpiralTolerance only searches for one color, so use that one color I provided you with. Also, as shown in the above picture, you'd want to use 16 as the tolerance, not 5.

    That was only an example, if I were you I'd split those TPAs into ATPAs and search each TPA[] for the ghoul's uptext.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  9. #9
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, well i got it working really well now!

    what thing was that you used to find the DATA?

  10. #10
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's ACAv2, look around it's a must-have

  11. #11
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nevermind i found it in the tutorial island under auto color aid! :P
    Last edited by laakerules; 01-31-2012 at 05:40 AM.

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
  •