SRL Archive - Help and Support

gate finding.


Runescape Pro

2009-06-07 17:08:04

hey guys, long time no talk lol. I've been quite inactive and decided that i want to come back and script again. My first coming back script is a falador cow killer/hide banker with reflection. I think I'll be able to finish this relatively soon, but i cant get the dang gate solver to work. It always clicks right below the gate.
Function HandleGate: boolean;
var
GateInfo: UID;
begin
if not(loggedin) then
begin
exit;
end;
//FindNormalRandoms;
R_FindRandoms;
GateInfo := GetObjectAt(3032, 3313);
if (GateInfo.ObjType = 7050) then
begin
if (ClickDoor(GateInfo.objtype,'w','pen')) then
begin
wait(2000+random(1000));
Inc(GatesOpened);
result := true;
exit;
end;
result := false;
writeln('Failed opening closed gate.');
exit;
end;
result := true;
end;

any help will be appreciated.

~rs2pro

Dynamite

2009-06-07 17:10:04

Maybe use color for finding the gate.

T~M

Runescape Pro

2009-06-07 17:11:37

I'm not that skilled anymore. =\ lol
And i wanna stick with reflection.

noidea

2009-06-07 18:43:10

Look @ Runescapians script in the members wc section an look at his door finding procedure

Runescapian321

2009-06-07 19:09:42

Actually, that is identical to mine :p

I'm not 100% sure mine works. When I made it it did, but I remember the one time it activated it failed. Besides, it's REALLY slow (8-10 sec), so I don't advise making something using ClickDoor. I was going to change it to color (FindObjEx probably) – from what I understand that wouldn't be too hard.

Runescape Pro

2009-06-07 19:20:03

I'll try color finding, wish me luck. =]
Also, Cnr sport gave me the gate finding code.

ShowerThoughts

2009-06-07 20:18:58

Don't try color finding on this even Fawk's wasn't working 100%. Color requires hovering.

Naum

2009-06-07 20:41:47

Yeah, I have problems with it. Heard of Spiral Mouse? Use that.

Home

2009-06-07 21:11:35

Use TileToMS And hoover over that then make some Mouse Offsets so it will hoover over gate and then some Text checking :)


~Home

Runescape Pro

2009-06-08 08:09:31

Wow guys, thanks for believing in me. =]
Got it to work, suprised myself lol.
Here's the code:
Function HandleGate: boolean;
var
G:TPoint;
begin
G:=Point(3032, 3313);
if not(loggedin) then exit;
MyRandoms;
if FindObjectEx(G, 7050, 5) then
begin
Writeln('Attempting to handle gate.');
if FindColorSpiralTolerance(x, y, 5401208, 257, 183, 281, 237, 4) then
begin
MMouse(x, y, 2, 2);
wait(100+Random(75));
if IsUpText('pen') then
begin
Mouse(x, y, 0, 0, false);
wait(100+Random(75));
ChooseOption('pen');
Writeln('Successfully opened gate. =]');
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end;
end else Writeln('Gate already open, walking in the cow pen now.');
end;

I'm coming back! =]

BobboHobbo

2009-06-08 14:22:26

From: Runescape Pro
Wow guys, thanks for believing in me. =]
Got it to work, suprised myself lol.
Here's the code:
Function HandleGate: boolean;
var
G:TPoint;
begin
G:=Point(3032, 3313);
if not(loggedin) then exit;
MyRandoms;
if FindObjectEx(G, 7050, 5) then
begin
Writeln('Attempting to handle gate.');
if FindColorSpiralTolerance(x, y, 5401208, 257, 183, 281, 237, 4) then
begin
MMouse(x, y, 2, 2);
wait(100+Random(75));
if IsUpText('pen') then
begin
Mouse(x, y, 0, 0, false);
wait(100+Random(75));
ChooseOption('pen');
Writeln('Successfully opened gate. =]');
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end;
end else Writeln('Gate already open, walking in the cow pen now.');
end;

I'm coming back! =]


Writeln('Failed to find gate.');
LogOut;
TerminateScript;


Change to Logout; or somethin ;).

Runescape Pro

2009-06-08 18:53:06

Logout is right above terminate script. And I terminate the script if it fails to find the gate because theres no multiplayer YET.

Narcle

2009-06-08 23:30:32

I know u use a color spiral but I did something somewhat similar for barbarian agil courses swing. Used the tile it was at then did a TPA color search then middle tpa'd it to click the swing. Works real well and fast. Probably faster then findobject?

mormonman

2009-06-09 02:46:34

From: Narcle
I know u use a color spiral but I did something somewhat similar for barbarian agil courses swing. Used the tile it was at then did a TPA color search then middle tpa'd it to click the swing. Works real well and fast. Probably faster then findobject?


ya well that is not saying much, seeing as findobject has to search like a 106x106 area.