SRL Archive - OSR Help

DTMWalking Help :(


VillaVuFTW

2012-01-07 21:22:21

program PortalToShop;
//{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
var
x, y: Integer;
Q: Array [0..2] of Integer;//DTM Declaring procedure.
aFound: Extended;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

procedure SetDTM;//DTM Defining procedure.
begin
Q[0] := DTMFromString('mlwAAAHicY2dgYHjCyMBwCYgPAPE7IP4MxMeA+CwQ3wfKPwbiW0D8FIl+CMRF2dkMBZl2cLok14GhIBdC4wOMeDAUAAAzwhQ8');
Q[1] := DTMFromString('mggAAAHicY2NgYHjLyMBwHYgvAvEqIF4DxL+AeDNQbhcQrwXiDUC8E0oXZWczFGTaMZTkOsDZZfmODLgAIw4MAQCaNxAw');
Q[2] := DTMFromString('mlwAAAHicY2dgYLjNyMBwEYgPA/EFIL4LxPeA+BYIA+V3AvEdIL4ExI+g7PtAXBRnz1BTbMYQEKrGEJWgzdCa78XQXezLUJPuyoAPMOLBUAAA2pITXQ==');
end;

procedure FrDTM;//DTM Freeing procedure.
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
FreeDTM(Q[2]);
end;

begin
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
SetDTM; //Set DTM's before code.
MouseSpeed := 18;//This makes it move faster but still undetectable, it makes DTM walking even more human-like.
MakeCompass('N');//We agreed we'd have camera facing North.
SetAngle(SRL_ANGLE_HIGH);//Does not matter but it looks cooler from above.
if FindDTMRotated(Q[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, true);
FFlag(6);
repeat
Wait(50 + Random(25));
until FindDTMRotated(Q[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
end;
if FindDTMRotated(Q[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, true);
FFlag(6);
repeat
Wait(50 + Random(25));
until FindDTMRotated(Q[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
end;
if FindDTMRotated(Q[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
writeln('Path Successful');
end;
// No loop for the last point in the walk.
FrDTM; //Free DTM's after Code.
end.

Hey Guys…was just testing this code I used from Demise's Guide, and I set my paths to what I wanted..

Here's what happens though
``````````````````````````
It will move the mouse to the DTM Coordinate, but won't click.. Can somebody tell me why it won't click?


Before you say
"//" before the ($i SRL/SRL/misc/SMART.simba) remvoe those and it fixes.. I'm using the Client Window method to test it on Smart client, just don't want to have to restart the SIMBA CLIENT everytime

Grihmm

2012-01-07 21:27:24

If you keep the SMART server the same, you can keep the same SMART window open for multiple runs. However memory builds up I am told so it is better to just restart it every time.

Kyle Undefined

2012-01-07 21:28:18

Try doing "Mouse(x, y, 3, 3, mouse_Left);" instead of the True option.

VillaVuFTW

2012-01-07 21:28:49

Will try Kyle, Thanks man! :)

I'm working on that script I told you about :)

Kyle Undefined

2012-01-07 21:29:56

Ah ok, good luck! :D Also, only if the SMART window closes without a Simba restart will memory build up. You can leave the SMART window open while you make changes and it will work just fine.

VillaVuFTW

2012-01-07 21:32:46

Hmmphh…

Now it won't even load my script, it Executes

And stops :(

Don't know what I did .. guess DTM Error, created new DTM, and PATH Successful :)

This will be fun to code now :3

Tickyy

2012-01-07 21:58:19

From: VillaVuFTW
Hmmphh…

Now it won't even load my script, it Executes

And stops :(

Don't know what I did .. guess DTM Error, created new DTM, and PATH Successful :)

This will be fun to code now :3


Try to increase Area size, if it keeps failing.

Kyle Undefined

2012-01-07 21:59:07

So, is it working? Are you doing the SMART window? Sorry, a little confused by your post.

VillaVuFTW

2012-01-07 22:09:50

Yes Kyle.. It's working (: Idk what was wrong.. I think I had to {$DEFINE SMART}, or something xD IDK but the walking is working

What I've Done :)

Actually my progress won't be on there because if I tell about it, the idea is released >.<