TomTuff
10-09-2010, 12:14 AM
I'm working on a fisher for karamja, and to detect if the spot has moved, after the script right clicks and gets the right ChooseOption(), it compares the coordinates with the image below. If it's in the right (section1 ), i know to check the tile above the player for the spot uptext while it's fishing, if its in the top section (section 2) i know to check the tile above the player for the uptext, and if it's in the left section (section 3) i know to check the tile to the left of the player for the right uptext. I would use TBoxes or something, but it's 2 trapezoids and a triangle.... how should i do this?
http://i51.tinypic.com/m6hza.jpg
Heysus
10-09-2010, 12:55 AM
remember that stuff you learned in school about the equations of lines? ;)
TRiLeZ
10-09-2010, 01:47 AM
Using FindColorsPie should work.
TomTuff
10-09-2010, 02:17 AM
i decided to use InAbstractBox (got the idea from IRC)
here's what i came up w/ if you guys were curious
function SpotMoved: boolean;
var
RightTile, TopTile, LeftTile, which: TBox;
Q: integer;
begin
RightTile := IntToBox(284, 169, 309, 196);
TopTile := IntToBox(253, 139, 271, 157);
LeftTile := IntToBox(211, 174, 234, 193);
Q := 1
if InAbstractBox(MSCX, MSCY, MSX2, 515, MSX2, MSY2, MSCX, 337, FSX, FSY) then
Q := 0;
if InAbstractBox(MSX1, MSY1, MSCX, MSCY, MSCX, 337, MSX1, 0, FSX, FSY) then
Q := 2;
case Q of
0: which := RightTile;
1: which := TopTile;
2: which := LeftTile;
end;
begin
MMouse(Random(which.x2 - which.x1) + which.x1, Random(which.y2 - which.y1) + which.y1, 0, 0)
if not(WaitUpText('spot', (RandomRange(150, 450)))) then
result := true;
end;
end;
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.