oh ok well w/e y go advance if it works
dont fix somthing that isnt broke
oh ok well w/e y go advance if it works
dont fix somthing that isnt broke
whoa lol turning a little of topic and into an argument... sheesh who cares? just teach me...
im no tpa expert but, i broke down one of my old tpointarrays to help u understand
SCAR Code:{*******************************************************************************
function OpenTrapdoor: Boolean;
by: Smarter Child
description: Opens the trapdoor(entering the dungeon), if so it results true.
*******************************************************************************}
function OpenTrapdoor: Boolean; //function name, it will result as true or false
var //variables
x, y: integer; //x and y are the co-ordinates
TPA: TPointArray; //an Array of a TPoint or more than one tpoint
i: integer; // ull see later on
aTPA: T2DPointArray; //an array of 2 dimensional points
Colors: TIntegerArray; //an array of numbers in this case the colors
begin
Result := False; //not needed :p
if not LoggedIn then exit; //just in case
Colors := [2112071, 5071986, 2112071, 4868688, 6118756]; //Declares all the colors of the trapdoor
for i := 0 to 4 do //i is the amount of the array..like the amount of colors color 0, 1, 2, 3, 4
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, 7); //Finds a color with tolerance using a spiral, starts at centre of screen
if Length(TPA) = 0 then Continue; //if the tpa length is 0 continue script
ATPA := SplitTPA(TPA, 22); //splits the TPA, with the distances in pixels (coords)
for i := 0 to High(ATPA) do //if i is 0 to the highest index
begin
MiddleTPAEx(ATPA[i], x, y); //middle tpoints
MMouse(x, y, 3, 3); //moves mouse
if IsUpText('apdoor') then //checks uptext
begin
Wait(100 + Random(200)); //random wait
Mouse(x, y, 4, 4, False); //right clicks
Wait(400 + Random(200)); //random wait
ChooseOption('pen'); //chooses option
WriteLn('Opening Door'); //reports in debug
Result:= True; //everything worked!, results true
end;
end;
end;
end;
Check me on msn for more help: wowplayermaster@hotmail.com
Edit: some brief explanation-
-
TpointArrays are great for tons of things, its one of my main ways to detect rocks/tree that you want to mine in the runescape client. Although TpointArrays may seem advanced they really aren't, like J_Pizzle, it doesn't matter if its an advanced TPA, the mains question is: Does it work most of the time?
Theres also a kinda premade tPa in objects.scar called FindObjTPA: http://freddy1990.com/srlmanual/SRL/core/Object.html
Scroll down. Also check in scar folder, and go to scripting tools, open up Auto Color Aid2.exe , it helps with TPointArrays and create ones for you, if you need examples.
Last edited by Smarter Child; 07-29-2009 at 09:21 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)