Results 1 to 5 of 5

Thread: TPA Maker!

  1. #1
    Join Date
    May 2008
    Location
    Here :p
    Posts
    194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default TPA Maker!

    NOTE: I realy dident know were to post this i hope this is right XD

    this script acuretly and fully makes a function that will search the screen for a TPA a return were abouts it is (thats wat x and y are for)
    all you enter is:
    3 colours
    weather to clear the debug and teh text at the top for checking that ur on teh right thing

    for those of you who dnt know wat a TPA is it searches for a colour with a tolerance (made by the script so its acureter than normal ) and then checks to make sure your clicking on the right thing
    (eg it searches for a rock (the colour being the ore colour) checks to make sure your on the right thing and returns were it is)

    with special thank to Mastaraymond and ProphesyOfWolf! who's guide thaught me this and for making all of this soooo easy

    EDIT :thx for editing it i looked at it and though i realy cba and dnt know enough about colours to figure out wat i need and wat i dnt so i just put all of it in and edited the bits i needed afterwards and if it wasent for u id still b using crappy findcolor XD
    SCAR Code:
    program TPAFinderMaker;
    const
      //Fill in this bit:
      //the already filled in values is an exsample for an oak tree
      colour1 = 2715745;// Pick 3 colours of the thing you whant to click
      colour2 = 3439726;// Place them respectively in colour 1, 2 & 3
      colour3 = 6467489;
      TheUpText = 'Oak';//when it checks to see what your clicking this is
      //what is in the top right hand courner (only use the important bit)
      //eg Chop down Oak  - the important bit is oak..
      DoClearDebug = true;//sould it clear the debug when it runs
      //Well done now press run and dont alter anything below this..
    var
      H, S, L, HueMod, SatMod, tolerance :extended;
      midcolor: integer;
      HueString, SatString:string;
      I,II : integer;
      HSLColor : Array[1..3] of Extended;
      HSL: Array[0..1] of Array[1..3] of Extended;
      Colors : TIntegerArray;
     
    procedure Print;
    begin
      if docleardebug then cleardebug;
      writeln('Function TPAFinder(var x, y: Integer): Boolean;');
      writeln('  //Made by Bazzbarretts TPA Maker!');
      writeln('  //with special thank to Mastaraymond and ProphesyOfWolf!');
      writeln('Var');
      writeln('  CTS, I: Integer;');
      writeln('  TPA: TPointArray;');
      writeln('  ATPA: Array of TPointArray;');
      writeln('begin');
      writeln('  CTS := GetColorToleranceSpeed;');
      writeln('  ColorToleranceSpeed(2);');
      writeln('  SetColorSpeed2Modifiers('+ HueString +', ' + satstring +');');
      writeln('  FindColorsSpiralTolerance(MSCX, MSCY, TPA, ' + inttostr(midcolor) +' , MSX1, MSY1, MSX2, MSY2, ' + inttostr(round(tolerance+0.5)) + ');');
      writeln('  ColorToleranceSpeed(CTS);');
      writeln('  ATPA := TPAToATPAEx(TPA, 15, 15);');
      writeln('  For I := 0 to High(ATPA) do');
      writeln('  begin');
      writeln('    MiddleTPAEx(ATPA[i], x, y);');
      writeln('    MMouse(x, y, 2, 2);');
      writeln('    If(IsUpTextMultiCustom(['''+ TheUpText +'''])) then');
      writeln('    begin');
      writeln('      Result := True;');
      writeln('      GetMousePos(x, y);');
      writeln('      Break;');
      writeln('    end;');
      writeln('  end;');
      writeln('end;');
      writeln('');
      writeln('');
    end;
     
    procedure dotheworkingout;//This Bit is By Mastaraymond
    //(but i modded it so we just get the stuf we whant XD)
    //hope u dont mind if you do just pm me and i will have the whole thing removed
    begin
      colors := [colour1, colour2, colour3]
      For I:= 1 to 3 do
      begin;
        HSL[0][i] := 255; //Max is 240?
      end;
      For I:= 0 to High(Colors) do
      begin;
        ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
        For II:= 1 to 3 do
        begin;
          HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
          HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
        end;
      end;
      For I:= 0 to 9 do
      begin;
      end;
      H := HSL[1][1] - HSL[0][1];
      S := HSL[1][2] - HSL[0][2];
      L := HSL[1][3] - HSL[0][3];
      midcolor := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
      HueMod := (H/L);
      SatMod := (S/L);
      tolerance := L;
      Huestring := floattostr(HueMod);
      SatString := floattostr(SatMod);
      setlength(HueString,4);
      setlength(SatString,4);
    end;
     
    begin
    dotheworkingout;
    Print;
    end.

  2. #2
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow well done mate you should get some sort of reward for this rep++ and 5 stared keep poping thi stuff out and you could ge srl member with out having to create a rs script

    wd

    also 45 posts and alot being fuctions and games and stuff chances are high you could get usefull poster cup but thats not upto me
    Blank!

  3. #3
    Join Date
    Apr 2007
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    very useful XD

  4. #4
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Wow keep it up, making it really easier for beginners!

  5. #5
    Join Date
    Dec 2007
    Location
    Middle of Here and There
    Posts
    417
    Mentioned
    6 Post(s)
    Quoted
    25 Post(s)

    Default



    Thanks for crediting me! First time I've been a "special thanks". *tear falls*

    Really, good job. I'm proud of ya!~ =P

    EDIT: I started something similar to this after making my tutorial (Started Friday.) It's odd that you're using alot of the stuff I used (But not quite! ^.^).

    Take out (from your script) :

    Anything to do with RGB,
    Anything to do with XYZ,
    and the Strings array. They aren't needed ^.^

    Again, good job.

    EDIT AGAIN!: I did it for you ^.^

    SCAR Code:
    program TPAFinderMaker;
    const
      //Fill in this bit:
      //the already filled in values is an exsample for an oak tree
      colour1 = 2715745;// Pick 3 colours of the thing you whant to click
      colour2 = 3439726;// Place them respectively in colour 1, 2 & 3
      colour3 = 6467489;
      TheUpText = 'Oak';//when it checks to see what your clicking this is
      //what is in the top right hand courner (only use the important bit)
      //eg Chop down Oak  - the important bit is oak..
      DoClearDebug = true;//sould it clear the debug when it runs
      //Well done now press run and dont alter anything below this..
    var
      H, S, L, HueMod, SatMod, tolerance :extended;
      midcolor: integer;
      HueString, SatString:string;
      I,II : integer;
      HSLColor : Array[1..3] of Extended;
      HSL: Array[0..1] of Array[1..3] of Extended;
      Colors : TIntegerArray;

    procedure Print;
    begin
      if docleardebug then cleardebug;
      writeln('Function TPAFinder(var x, y: Integer): Boolean;');
      writeln('  //Made by Bazzbarretts TPA Maker!');
      writeln('  //with special thank to Mastaraymond and ProphesyOfWolf!');
      writeln('Var');
      writeln('  CTS, I: Integer;');
      writeln('  TPA: TPointArray;');
      writeln('  ATPA: Array of TPointArray;');
      writeln('begin');
      writeln('  CTS := GetColorToleranceSpeed;');
      writeln('  ColorToleranceSpeed(2);');
      writeln('  SetColorSpeed2Modifiers('+ HueString +', ' + satstring +');');
      writeln('  FindColorsSpiralTolerance(MSCX, MSCY, TPA, ' + inttostr(midcolor) +' , MSX1, MSY1, MSX2, MSY2, ' + inttostr(round(tolerance+0.5)) + ');');
      writeln('  ColorToleranceSpeed(CTS);');
      writeln('  ATPA := TPAToATPAEx(TPA, 15, 15);');
      writeln('  For I := 0 to High(ATPA) do');
      writeln('  begin');
      writeln('    MiddleTPAEx(ATPA[i], x, y);');
      writeln('    MMouse(x, y, 2, 2);');
      writeln('    If(IsUpTextMultiCustom(['''+ TheUpText +'''])) then');
      writeln('    begin');
      writeln('      Result := True;');
      writeln('      GetMousePos(x, y);');
      writeln('      Break;');
      writeln('    end;');
      writeln('  end;');
      writeln('end;');
      writeln('');
      writeln('');
    end;

    procedure dotheworkingout;//This Bit is By Mastaraymond
    //(but i modded it so we just get the stuf we whant XD)
    //hope u dont mind if you do just pm me and i will have the whole thing removed
    begin
      colors := [colour1, colour2, colour3]
      For I:= 1 to 3 do
      begin;
        HSL[0][i] := 255; //Max is 240?
      end;
      For I:= 0 to High(Colors) do
      begin;
        ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
        For II:= 1 to 3 do
        begin;
          HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
          HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
        end;
      end;
      For I:= 0 to 9 do
      begin;
      end;
      H := HSL[1][1] - HSL[0][1];
      S := HSL[1][2] - HSL[0][2];
      L := HSL[1][3] - HSL[0][3];
      midcolor := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
      HueMod := (H/L);
      SatMod := (S/L);
      tolerance := L;
      Huestring := floattostr(HueMod);
      SatString := floattostr(SatMod);
      setlength(HueString,4);
      setlength(SatString,4);
    end;

    begin
    dotheworkingout;
    Print;
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ok lil help on my (unf) maker?
    By mikevskater in forum OSR Help
    Replies: 4
    Last Post: 03-17-2008, 12:23 PM
  2. New Air Rune Maker
    By Pura in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 01-12-2008, 10:24 AM
  3. money maker!
    By s1cky in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 10-10-2007, 11:54 AM
  4. Looking for sig maker!
    By kooldude in forum Semi Stupid Pictures
    Replies: 7
    Last Post: 08-12-2007, 03:43 PM
  5. Best money maker
    By nhstarter10 in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 06-16-2007, 12:13 AM

Posting Permissions

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