BigRedJapan
2014-10-01 00:14:41
What is the best Method for Walking, Ive tried SPS, but its been failing on me, I do not know if radial is good, and dtm objects isnt that great. Im on Old School.
2014-10-01 00:14:41
2014-10-01 02:25:46
2014-10-01 11:53:32
procedure WaitHumanClick;
begin
case random(600) of
1..450: Wait(RandomRange(600, 800));
451..570: Wait(RandomRange(800, 900));
571..590: Wait(RandomRange(900, 1000));
591..600: Wait(RandomRange(1000, 1200));
end;
end;
function Clickobject(Objpoint: tpoint; Uptext: TStringArray; MaxDistance, RunOffSetX, RunOffsetY: integer): Boolean;
var
Bp, Booth: TPoint;
begin
if (not LoggedIn) then // Failsafe.
Exit; // If not loggedin then it exists the loop.
if R_DistanceFromTile(Objpoint) > MaxDistance then // If your current location is further than the Max distance point for the destination.
begin
Bp.x := Objpoint.x + RunOffsetX; // Grabs the X and Y coords for the object/destination and adds offset to them
Bp.Y := Objpoint.y + RunOffsetY;
R_WalkPath([Bp]); // waits the path.
WaitHumanClick; // Waits a random range..
end;
if R_DistanceFromTile(Objpoint) < 5 then // But if its closer to the obj then it just initiates the click.
begin
Booth := R_TileToMs(ObjPoint); // converts the obj into a coordinate.
MMouse(Booth.X, Booth.Y, 3, 3); // Moves mouse to the coord..
waithumanclick; // waits..
if (R_IsUpTextMulti(Uptext)) then // if uptext..
begin
result := true; // then its true.
end;
end;
end;
procedure test1;
begin
if Clickobject(point(CofferX, CofferY), ['Unlock'], randomrange(5,7), randomrange(-2,2),randomrange(2,- 2) then
clickmouse2(mouse_left);
end;
2014-10-01 14:35:48
R_WalkPath(Path: TPointArray): boolean; this function will walk along a path designated by the TPointArray in the parameters. In order to know the points in order to walk, we can use a great tool written by @Turpinator. This tool can be found it reflection/tools. What this does, is when the script is started, each time you enable SMART, a new point is made.R_WalkPath([Point(3245, 3429), Point(3231, 3429), Point(3216, 3428), Point(3206, 3428), Point(3195, 3429), Point(3185, 3429), Point(3184, 3437)]);R_BlindWalk(P: TPoint): Boolean; This simply, makes a array of points from our current location to the final point, and walks it using R_WalkPath. This is great to use when you need to walk a straight line. It will NOT go around walls/obstacles.R_TileOnMM(Tile: TPoint): boolean; This returns true if the given point is on the Minimap. Usefull mainly for Failsafes.[/INDENT]2014-10-01 15:17:58
From: elfyyy
It is VERY important to know, each point must be showing on the minimap from the previous point, so you can't "skip" points when making a path.
2014-10-03 01:43:05
2014-10-03 18:09:04
procedure R_BlindWalkToTileEx(dest: TPoint; maxdist: Integer);
var
start, middle, P : TPoint;
X, Y : Integer;
begin
if (R_DistanceFromTile(dest) < maxdist+1) then Exit;
repeat
if not LoggedIn then Exit;
if (R_DistanceFromTile(dest) < maxdist+1) then Exit;
P := R_TileToMS(dest);
if not ((P.X = -1) and (P.Y = -1)) then
begin
Wait(RandomRange(500, 1000));
R_WalkToTileMS(dest);
Wait(RandomRange(500, 1000));
end;
if (R_DistanceFromTile(dest) < maxdist+1) then Exit;
P := R_TileToMS(dest);
if (P.X = -1) and (P.Y = -1) then
begin
start := R_GetTileGlobal;
X := dest.X - start.X;
Y := dest.Y - start.Y;
//Writeln('X: ' + ToStr(X));
//Writeln('Y: ' + ToStr(Y));
repeat
if not LoggedIn then Exit;
if (X > 0) then X := X-1;
if (X < 0) then X := X+1;
if (Y > 0) then Y := Y-1;
if (Y < 0) then Y := Y+1;
if (R_WalkToTileMM(Point(start.X+X, start.Y+Y))) then
begin
Flag;
Break;
end;
until False
end;
until False
end;
2014-11-02 21:04:25
if R_TiletoMM([Point(2037204196 + RandomRange(-1, 1), 185627106 + RandomRange(-1, 1))]) then 2014-11-02 21:27:43
From: Rules of Joe
I am at a this Destination.if R_TiletoMM([Point(2037204196 + RandomRange(-1, 1), 185627106 + RandomRange(-1, 1))]) then
And I want the script to wait until its at this destination before it continues to make its command, but the codeis giving me a mismatch error.
2014-11-02 21:31:31
if R_NearTile(Point(2037204196, 185627106), true) then
2014-11-02 21:58:36
From: Rules of Joe
okay thank you.
So something like this??if R_NearTile(Point(2037204196, 185627106), true) then
if R_NearTile(Point(6575, 4234), 10) then