Could anyone hlep show me how to make a TPA to find , lets say, an iron rock?
I've read a couple tutorials on them but still do not quite understand how to use them, thanks.
Could anyone hlep show me how to make a TPA to find , lets say, an iron rock?
I've read a couple tutorials on them but still do not quite understand how to use them, thanks.
Current Script: Al-Kharid Fighter and Banker
Status : Just Started
What dont you understand? post it here.
btw, negaal tuts explain everything*most of them*.
Finding ore itself is not hard. Hard is to make youre mouse to click center of ore.
See my TPA tutorial in my signature. There is example script at the end. just change the uptext and color.
I'm not really sure what can't you understand. Maybe explain & ask more?
[CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]
Wrong.Hard is to make youre mouse to click center of ore.
MiddleTPAEx(veinTPA, X, Y);
There, you have the middle of the ore.
I don't understand how Tpa's actually work. =\
Current Script: Al-Kharid Fighter and Banker
Status : Just Started
Middle of vein, but vein isn't spreaded exactly all over the rock. there might be no vein on one side etc. You know what I mean. and you knew that I know middletpa
...
See, it find all coordinates of color given in params x1, y1, x2, y2.
And saves list of x's and y's to TPointArray.
You did read my tutorial ?
[CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]
Yeah I read your tut and tried to make one, but I failed and got tons of errors.
Current Script: Al-Kharid Fighter and Banker
Status : Just Started
I think the one whats built in scar or SRL plugins looks like this:
SCAR Code:program Lolol;
function FindTPA(var TPA : TPointArray; Color, x1, y1, x2, y2, tolerance : integer) : boolean;
var
x, y, c : integer;
begin
SetArraylength(tpa,(x2-x1)*(y2 - y1))
for y:=y1 to y2 do
for x:=x1 to x2 do
if similarcolors(getcolor(x,y), color, tolerance) then
begin
tpa[c].x := x;
tpa[c].y := y;
inc(c)
end;
SetArrayLength(TPA, C)
Result := Length(tpa) > 0;
end;
var
tpa : tpointarray;
i, t : integer;
begin
t := getsystemtime;
findtpa(tpa, 255, 0, 0, 100, 100, 0)
writeln(inttostr(getsystemtime - t));
if length(tpa) > 0 then
for i:=0 to high(tpa) do
begin
movemousesmooth(tpa[i].x,tpa[i].y);
wait(100);
end;
end.
Because it's in script it's very slow. it took me almost 300 ms to scar 100 * 100 area.
I hope you can understand what function does.
Edit, to test, do draw something with red, you'll see it moves trough all the red pixels. note that you have to set you're x2 and y2.
[CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]
There are currently 1 users browsing this thread. (0 members and 1 guests)