SRL Archive - OSR Help

Help?


davx

2012-01-01 13:57:53

program DTMTTEST;
{$i srl/srl.scar}


Var
CoalBag, X, Y: Integer;




begin
SetupSrl;
CoalBag := DTMFromString('mlwAAAHicY2dgYOAGYnYgFgViHgYIYAViISDmhfL5gVgCiAWhajmAeG55BJBkwopFGDDBfyhmxIOhAAAp8QQ3');
If FindDTM(CoalBag, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('We Found it');
MMouse(x, y, 7, 7);
If IsUpText('oal') then
Mouse(x, y, 0, 0, False);
End;

FreeDTM(CoalBag);


end.

Basically it 'Should' find the coalbag and click on it however it fails to.
It runs goes to the item and well doesn't click
Any Help?

PatDuffy

2012-01-01 14:04:25

does it say "we found it" ?

Currently with your code it would right click on the coal bag, not left click (I'm not sure what you want)

Grihmm

2012-01-01 14:05:26

You are searching the Main Screen, not the inventory.

davx

2012-01-01 14:06:12

When i run it say ''we found it'' how it doesnt want to do anything it just stay over the item
its an item in the bank
I changed it to true like this
program DTMTTEST;
{$i srl/srl.scar}


Var
CoalBag, X, Y: Integer;




begin
SetupSrl;
CoalBag := DTMFromString('mlwAAAHicY2dgYOAGYnYgFgViHgYIYAViISDmhfL5gVgCiAWhajmAeG55BJBkwopFGDDBfyhmxIOhAAAp8QQ3');
If FindDTM(CoalBag, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('We Found it');
MMouse(x, y, 7, 7);
If IsUpText('oal') then
Mouse(x, y, 0, 0, True);
End;

FreeDTM(CoalBag);


end.

Failure

2012-01-01 14:14:58

From: Grihmm
You are searching the Main Screen, not the inventory.


You're right.

@OP you should change the

MSX1, MSY1, MSX2, MSY2
MainScreen

To

MIX1, MIY1, MIX2, MIY2
MainInventory

davx

2012-01-01 14:16:14

The Item is in the bank which is in the main screen? it finds the item fine just doesn't click it

Failure

2012-01-01 14:18:34

From: davx
The Item is in the bank which is in the main screen? it finds the item fine just doesn't click it


Try to make a DTM, might that works…

And maybe try
MBX1, MBY1, MBX2, MBY2 //MainBank

I can't make something to find the CoalBag since I don't have it :p

davx

2012-01-01 14:21:44

Hmmmm i tryed that
Compiled successfully in 1391 ms.
SRL Compiled in 15 msec
We Found it
Successfully executed.
its not like its not compiling its just doesnt click the item
:/ Feel like a noob now

Failure

2012-01-01 14:24:25

From: davx
Hmmmm i tryed that
Compiled successfully in 1391 ms.
SRL Compiled in 15 msec
We Found it
Successfully executed.
its not like its not compiling its just doesnt click the item
:/ Feel like a noob now


Try to Target the screen again, else try to make a new DTM (Make sure to Target the client again, for some reason I also had trouble today with DTM's)

davx

2012-01-01 14:25:58

Hmmm targeted the screen every time ill try making new DTM
Okay made new DTM still doesn't wanna Work :/
Gonna try find pendrive see if it my computer
Current Simba code
program DTMTTEST;
{$i srl/srl.scar}


Var
CoalBag, X, Y: Integer;




begin
SetupSrl;
CoalBag := DTMFromString('mlwAAAHicY2dgYOAEYiEg5gNiZgYIYAdiQSQsBcV8UHkQXRZkAiSZcGDcgBEPhgIAtkUBzQ==');
If FindDTM(CoalBag, X, Y, MBX1, MBY1, MBX2, MBY2) then
begin
WriteLn('We Found it');
MMouse(x, y, 7, 7);
If IsUpText('oal') then
Mouse(x, y, 0, 0, True);
End;

FreeDTM(CoalBag);


end.

Failure

2012-01-01 14:42:09

This should work you needed a timer! :P

program DTMTTEST;
{$i srl/srl.scar}


Var
CoalBag, X, Y: Integer;




begin
SetupSrl;
CoalBag := DTMFromString('maQEAAHicrcxPCkBgEIfh4QZOg2RBUuIATuIyDsbCQhSiiBN4v5qd5edXzzR/ajwRSV2RBJEK4SNArLccBSpV6mz2GTb+dBgwY8WBCzceZfoTOxZMGNGjbWqqa8k+zg8+eQGPxRWP');
If FindDTM(CoalBag, X, Y, MBX1, MBY1, MBX2, MBY2) then
begin
WriteLn('We Found it');
MMouse(x, y, 7, 7);
Wait(50);
If IsUpText('oal') then
Mouse(x, y, 0, 0, True);
End;

FreeDTM(CoalBag);


end.

Spent my 10k Tokens on your Coal Bag to help you :)

6k Left though xd

You can also use this

program DTMTTEST;
{$i srl/srl.scar}


Var
CoalBag, X, Y: Integer;




begin
SetupSrl;
CoalBag := DTMFromString('maQEAAHicrcxPCkBgEIfh4QZOg2RBUuIATuIyDsbCQhSiiBN4v5qd5edXzzR/ajwRSV2RBJEK4SNArLccBSpV6mz2GTb+dBgwY8WBCzceZfoTOxZMGNGjbWqqa8k+zg8+eQGPxRWP');
If FindDTM(CoalBag, X, Y, MBX1, MBY1, MBX2, MBY2) then
begin
WriteLn('We Found it');
MMouse(x, y, 7, 7);
WaitUptext('oal', 200); //Not really safe now but you'll have to make it safer yourself, now it waits 200 Milliseconds for the text once it moved the mouse.
Mouse(x, y, 0, 0, True);
End;

FreeDTM(CoalBag);


end.

Grihmm

2012-01-01 14:49:53

Lol you better +1 him. ^

davx

2012-01-01 14:51:38

:P Dont worry ;)

Failure

2012-01-01 14:52:34

From: davx
:P Dont worry ;)


Did it worked? :)

shnk

2012-01-01 15:22:03

derp you could make a bitmap and do findbitmaptolerancein (bitmap, x, y, xs, ys, xe, ye, tol). i think that would be more accurate.