I have requested for it to be in the beginner or intermediate...
Btw, can the Jrs see only beginner section?
I have requested for it to be in the beginner or intermediate...
Btw, can the Jrs see only beginner section?
I'm not sure i completly understood SplitTPA. if you use SplitTPA an array will be created from each TPoing the other array had?
so...
SCAR Code:ThisTPA[0].x := 20; ThisTPA[0].y := 50;
ThisTPA[1].x := 30; ThisTPA[1].y := 40;
ThisTPA[2].x := 40; ThisTPA[2].y := 30;
ThisTPA[3].x := 50; ThisTPA[3].y := 20;
test:= SplitTPA(thisTPA);
test[0][0].x = 20; ?
test[0][1].x = 0; ?
test[1][0].x = 30; ?
test[1][1].x = 0?
test[1][2].x = 0?
would the test ATPA have the values i showed there?
and waht exactly will MiddleTPA do? it'll analyse all the TPA points and find out the exact middle? so...
SCAR Code:ThisTPA[0].x := 0; ThisTPA[0].y := 0;
ThisTPA[1].x := 0; ThisTPA[1].y := 100;
ThisTPA[2].x := 100; ThisTPA[2].y := 0;
ThisTPA[3].x := 100; ThisTPA[3].y := 100;
{100*100 square}
ThisTPoint := MidleTPA(ThisTPA);
ThisTPoint.x = 50?
ThisTPoint.y = 50?
and what the hell does TPAA := TPAToATPA(TPA, Distance) do? I'll make an ATPA with the TPoints of distance x, but how does it know which color we want?
great tut, maybe a few more explained examples?
~RM
Don't mix TPAs and colors - you get the TPA with the colors you want with FindColorsSpiralTolerance.and what the hell does TPAA := TPAToATPA(TPA, Distance) do? I'll make an ATPA with the TPoints of distance x, but how does it know which color we want?
TPAToATPA splits a TPointArray to multiple TPointArrays by the areas they are in, like:
Point1-pixel-pixel-pixel-Point2
TPAToATPA(TPA, 3) wouldn't count the Point in because its a "two", only Point1, pixel, pixel would go there.
I think you just overthink it...
and I have no idea wtf were you talking about SplitTPA? SplitTPA(TPA), or nowadays SplitTPA(TPA, 1) puts the points that are connected to eachother to their separate tpas.
i dont know anythign at all i dont even know what it means
so i would appreciate it if you would like 1st start out by telling what is it for/definition
thanks
Evil -
SCAR Code:Function OgreFound(Var Ox, Oy: Integer): Boolean;
Var
BmX, BmY, R, CTS, I: Integer;
TPAA: Array of TPointArray;
TPA, TPAb: TPointArray;
B: TBox;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
Ox := MSCX;
Oy := MSCY;
FindColorsSpiralTolerance(MSCX, MSCY, TPAb, 8365756, 30, 30, 470, 293, 10);
For I := 0 To High(TPAb) Do
Begin
Ox := TPAb[i].x;
Oy := TPAb[i].y;
B := IntToBox(Ox - 20, Oy - 20, Ox + 20, Oy + 20);
BmX := B.x2 - B.x1 shr 1;
BmY := B.y2 - B.y1 shr 1;
FindColorsSpiralTolerance(BmX, BmY, TPA, 8365756, B.x1, B.y1, B.x2, B.y2, 10);
If GetArrayLength(TPA) > 100 Then
Begin
TPAA := TPAToATPA(TPA, 17);
R := Random(GetArrayLength(TPAA));
SetArrayLength(TPA, GetArrayLength(TPAA[r]));
TPA := TPAA[r];
MiddleTPAEx(TPA, Ox, Oy);
Result := Not(BusyAt(Ox, Oy));
Break;
End;
End;
ColorToleranceSpeed(CTS);
End;
Go to SRL Members Forum -> SRL New Functions and go through until you find
"SCAR code of mine", there is few more.
this and neegal's tutorials helped me a lot thanks
Props on the tut, that was a great refresher.
on one of your examples,
"For I := 0 To High(PlayerDots) Do"
did you mean
"For i := 0 To High(PlayerDots) Do"?
[IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]
wat was this --> "Omfgz0r m003vfmouse d00z not fawnd me objz0r"
l0l p10X 0Mg!! =p
very nice tut..short..but detailed..thanx
im going to put it into my miner for V3.0
INACTIVE
How-to: Make S.M.A.R.T. less laggy
Sell me your Maple Shieldbows (u)! Up to 95gp ea!
My Scripts:
Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
99 x78 | 99 x10 | 99 x2 | 99 x12
Use the REPORT tags when posting progress reports to make life easier (:
[REPORT]Put progress report in here![/REPORT]
Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]
thanks is not enough, ive been going through these tutorials for a while. among all the tpa tutorials this has been the most helpful. before sitting down and reading the tutorial from top to bottom, i did not know how a tpa could be used to find anything.
now to criticism:
there are a lot of grammatical errors on the tut. its hard to for some including me, to try and deduce what your trying to say.
the only thing i could think of that could be missing is using an array of T2DPA to find areas that have certain colors. im going to embrace this project tomorrow.
Hehe, I made this some time ago, I think it would be different if I would write one now, but I hope you get atleast a basic understanding...
Only part people actually need to learn there is to learn use an array.
Using a FindColors(Spiral)Tolerance doesn't differ from using any other function, the purpose of it does but like writing the params etc...
If you know how to use an array, which shouldn't be very hard, you won't have much trouble using a 2D -Array either, and then you need only to find functions that fit your purpose...
I'm afraid I don't get why people make tutorials on how to add '.x' or '.y' to something.
What you should teach is how to use them....
The jealous temper of mankind, ever more disposed to censure than
to praise the work of others, has constantly made the pursuit of new
methods and systems no less perilous than the search after unknown
lands and seas.
Wow im afraid this stuff is way over my head... Idk why i just dont seem to get it... i really wanna learn it too
I reccomend u read the TPA made easy guide on the Intermediates section. Otherwise try finding scripts that use these functions and study it. BUT DONT STEAL IT AND SAY ITS YOURS! Your cheating yourself, u lose respect, u know the deal...
Woo, I'm gonna use this in my Monk Killer + Healer *sets bar to 80%*
nice tutorial man, helped me to understand some stuff of TPA/ATPA, Thanks!! =D
+Rep
wow, powerful shit
my own count-the-players-on-the-minimap function (made it for practice and because his seemed a little outdated--calling SplitTPA with only 1 arg?)
is the if-then necessary or will FindColorsTolerance just return an array with a high of 0?Code:function CountPlayers : Integer; var WhiteDots : TPointArray; PlayerDots : T2DPointArray; SingleDot : TPoint; I, ArrayHigh : Integer; begin if FindColorsTolerance(WhiteDots, 16777215, MMX1, MMY1, MMX2, MMY2, 3) then begin PlayerDots := SplitTPA(WhiteDots, 9); ArrayHigh := High(PlayerDots); for I := 0 to ArrayHigh do begin SingleDot := MiddleTPA(PlayerDots[I]); MoveMouse(SingleDot.x, SingleDot.y); Wait(500); end; Result := High(PlayerDots) + 1; end else begin WriteLn('No players found'); Result := 0; end; end;
Last edited by LolL; 12-20-2010 at 10:39 PM. Reason: redid code
Great tut, really helped me understand how everything really works instead of just using it and hoping it's right =p
Simply a GOD beast...
My Tutorials
Yeah that was what i did ytd, there was no observable difference with anything below 100 (empty) loops (both took 0 milliseconds). Just tried again increasing the loop to 10k and there is actually a difference of ~15000 milliseconds in total, of which the increasing difficulty of High functions to count a larger number also attributes to its increasing significance.
So basically dont bother with declaring another variable if your loop is under 100. Not common for a RS script to go over even 20 anyway. (and even if it's at 10k, it will only save u 1.5milliseconds/loop)
There are currently 1 users browsing this thread. (0 members and 1 guests)