SRL Archive - Help

Lol, Won't click a dtm


rj

2012-12-31 01:43:03

I am testing out includes and my script will not click a DTM:(THIS IS 100% OF THE CODE)

Program Test;
{$i srl/srl.simba}
{$i SoulSplit/SoulInclude.simba}
var
x:y:integer
Procedure ClickManta;
begin
if FindDTM(Raw_Manta, x, y, MSX, MSY, MSSX2, MSSY2) then
MouseSpeed := 15
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
end;
Begin
ClickManta;
end.

Any idea what the problem could be? I'm not getting any errors or anything. IF you need to see include folders ill post code not sure if it would help

Wardancer

2012-12-31 01:45:50

What are these coordinates? MSX, MSY, MSSX2, MSSY2. Are those global variables you made by yourself and use for the ps?

It's usually MSX1, MSY1, MSX2, MSY2.

Only other possibility I can think of is that the DTM isn't well made.

rj

2012-12-31 01:50:27

From: Wardancer
What are these coordinates? MSX, MSY, MSSX2, MSSY2. Are those global variables you made by yourself and use for the ps?

It's usually MSX1, MSY1, MSX2, MSY2.

Only other possibility I can think of is that the DTM isn't well made.


Yea they are the main screen I tried Re-making the DTM, Fishing include looks like
var
Raw_Shark, Raw_RockTail, Raw_Manta: Integer;

procedure CallFish;
begin
Raw_Shark := DTMFromString('mrAAAAHic42BgYDjLxMBwGoiPA/ExID4FxJeB+AIQXwPip4wMDG+A+C0QPwfih0D8CIhfQsVm9PYwFGRkMOSlpTHUlpSAaRC/va6WYVpPNwMn0A58mJEAhgEAVzIZUA==');
Raw_RockTail := DTMFromString('mlwAAAHicY2dgYPjJxMDwA4j/QTGI/xmKXzEyMDwC4qdA/BKIPwHxOyhbT0Wewd5UhUFDXpDBO86bYfWJNQxa8lIMhfH2DJxAc3FhRjwYCgAdQxN4');
Raw_Manta := DTMFromString('mggAAAHicY2NgYFjKxMCwFojXAPESIF4AxIuA+AUjA8NbIH4GxI+A+AkQvwHi5IzJDBGxTQze/gUMmQWzGfLLloDFeIBmYcOMODAEAADh3RGy');
end;

begin
repeat
CallFish Freedtm(Raw_Shark);
Freedtm(Raw_RockTail);
Freedtm(Raw_Manta);
until false
end.

If theres anything wrong with that.

rj

2012-12-31 01:55:45

Well I thought I found the solution to the problem, I was using main screen variables when i was supposed to be using inventory variables:
Program Test;
{$i srl/srl.simba}
{$i SoulSplit/SoulInclude.simba}
Procedure ClickManta;
var
x:y:integer
begin
if FindDTM(Raw_Manta, x, y, SSIX, SSIY, SSIX2, SSIY2) then
MouseSpeed := 15
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
end;
Begin
ClickManta;
end.

BUT it still does not click so I'm not sure what the problem is

Wardancer

2012-12-31 02:03:48

Does the mouse move at all?

Also, the way you did your if then condition, only the MouseSpeed is affected whether it's found or not. You'd need a begin and end.

Finally, are you -sure- that your DTM is correctly made?

Flight

2012-12-31 02:04:59

Try this:

Program Test;
{$i srl/srl.simba}
{$i SoulSplit/SoulInclude.simba}

Procedure ClickManta;
var
x,y: integer
begin
if FindDTM(Raw_Manta, x, y, SSIX, SSIY, SSIX2, SSIY2) then
begin
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse2(mouse_left);
end else
Writeln('DTM not found!');
end;

Begin
MouseSpeed := 15;
ClickManta;
end.

If the DTM itself is not found in the (SSIX,SSIY,SSIX2,SSIY2) the script will tell you.

rj

2012-12-31 02:06:31

From: Wardancer
Does the mouse move at all?

Also, the way you did your if then condition, only the MouseSpeed is affected whether it's found or not. You'd need a begin and end.

Finally, are you -sure- that your DTM is correctly made?


Yes I'm sure, maybe I'm not doing the includes correctly because i noticed when I run the script it lets me getaway with errors such as:


Program Test;
{$i srl/srl.simba}
{$i SoulSplit/SoulInclude.simba}
Procedure ClickManta;
var
x,y:integer; sjglklgs
begin
if FindDTM(Raw_Manta, x, y, SSIX, SSIY, SSIX2, SSIY2) then
MouseSpeed := 15; look what i can type without getting an error
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
end;
Begin
ClickManta;
end.


Flight, when I use your code it gives no response I think I did something wrong with include

Flight

2012-12-31 02:11:36

rjj95, what are your coordinates for (SSIX,SSIY,SSIX2,SSIY2)?

rj

2012-12-31 02:14:22

From: Flight
rjj95, what are your coordinates for (SSIX,SSIY,SSIX2,SSIY2)?


SSIX := 558;
SSIY := 205;
SSIX2 := 738;
SSIY2 := 462;

I think the problem lies in the include which Maybe I didn't do correctly:
First
{$i SoulSplit/SoulInclude.simba} 
Calls this:
{$i SoulSplit/Calls/SkillsInclude.simba}
{$i SoulSplit/Calls/CombatInclude.simba}
procedure CallVar;
var
MSX, MSY, MSSX2, MSSY2: Integer;
SSIX, SSIY, SSIX2, SSIY2: Integer;
WSX, WSY, WSX2, WSY2: Integer;
MMX, MMY, MMX2, MMY2: Integer;
begin
SSIX := 558;
SSIY := 205;
SSIX2 := 738;
SSIY2 := 462;
WSX := 0;
WSY := 0;
WSX2 := 761;
WSY2 := 501;
MSX := 4;
MSY := 4;
MSSX2 := 520;
MSSY2 := 338;
MMX := 627;
MMY := 268;
MMX2 := 842;
MMY2 := 426;
end;

begin
repeat
CallVar;
until (false)
end.

Which calls this:
{$i SoulSplit/Calls/SkillsInclude.simba}
Which calls this:
{$i SoulSplit/Skills/Fishing.simba}
{$i SoulSplit/Skills/WoodCutting.simba}
{$i SoulSplit/Skills/Mining.simba}
{$i SoulSplit/Skills/Herblore.simba}
{$i SoulSplit/Skills/Cooking.simba}
Begin
end.

Which then calls the fishing include which is:

var
Raw_Shark, Raw_RockTail, Raw_Manta: Integer;

procedure CallFish;
begin
Raw_Shark := DTMFromString('mrAAAAHic42BgYDjLxMBwGoiPA/ExID4FxJeB+AIQXwPip4wMDG+A+C0QPwfih0D8CIhfQsVm9PYwFGRkMOSlpTHUlpSAaRC/va6WYVpPNwMn0A58mJEAhgEAVzIZUA==');
Raw_RockTail := DTMFromString('mlwAAAHicY2dgYPjJxMDwA4j/QTGI/xmKXzEyMDwC4qdA/BKIPwHxOyhbT0Wewd5UhUFDXpDBO86bYfWJNQxa8lIMhfH2DJxAc3FhRjwYCgAdQxN4');
Raw_Manta := DTMFromString('mQwAAAHicY2ZgYDjLxMBwFYhPA7EOEBsAsSkQZxcvYPAPLmVIzpjMIAJUB8OMSBgIADjtB0A=');
end;

begin
repeat
CallFish Freedtm(Raw_Shark);
Freedtm(Raw_RockTail);
Freedtm(Raw_Manta);
until false
end.

Flight

2012-12-31 02:22:41

If you'd like I could properly fix your include for you and give you an example of how to include it in your scripts. If you'd like me to do that then put what you have so far in a zipped folder and send it to me in PM if you'd prefer. Let me know ASAP.

Wardancer

2012-12-31 02:22:59

Add a "writeln(IntToStr(SSIX);" to see how it goes. However, it would give you a message like unknown variable when trying to compile if it really wasn't there… Try it anyway. Never know.

rj

2012-12-31 02:24:24

Nvm attachment below


From: Wardancer
Add a "writeln(IntToStr(SSIX);" to see how it goes. However, it would give you a message like unknown variable when trying to compile if it really wasn't there… Try it anyway. Never know.


What ever I put in the script procedures no result. I can littery look put:

Program Test;
{$i srl/srl.simba}
{$i SoulSplit/SoulInclude.simba}

Procedure ClickManta;
var
x,y: integer
begin
if FindDTM(Raw_Manta, x, y, SSIX, SSIY, SSIX2, SSIY2) then
begin
write i like cheese
mmouse(x, y, 1, 1);
weeeeeeee

wait(randomrange(150, 250));
ClickMouse2(mouse_left);
end else
Writeln('DTM not found!'); !#$%&()(*&^%$#@
end;

Begin
MouseSpeed := 15;
ClickManta;
end.

And it will produce no errors as long as I have the
{$i SoulSplit/SoulInclude.simba}  
Include

Ian

2012-12-31 02:25:25

I don't think you can, not as a Jr at least.

Justin

2012-12-31 02:26:09


repeat
CallVar;
until (false)
Why?

rj

2012-12-31 02:33:12

From: [J]ustin

repeat
CallVar;
until (false)
Why?


Just started this project so I have no idea how to properly add this since what I tried did not work

Oh and the ssinclude variables arnt very clear:

  SSIX := 558;  // inventory
SSIY := 205; // inventory
SSIX2 := 738; // inventory
SSIY2 := 462; // inventory
WSX := 0; //Whole Screen
WSY := 0; //Whole Screen
WSX2 := 761; //Whole Screen
WSY2 := 501; //Whole Screen
MSX := 4; // main screen
MSY := 4; // main screen
MSSX2 := 520; // main screen
MSSY2 := 338; // main screen
MMX := 627; //Minimap
MMY := 268; //Minimap
MMX2 := 842; //Minimap
MMY2 := 426; //Minimap

Justin

2012-12-31 02:45:32

From: rjj95
Just started this project so I have no idea how to properly add this since what I tried did not work

Oh and the ssinclude variables arnt very clear:

  SSIX := 558;  // inventory
SSIY := 205; // inventory
SSIX2 := 738; // inventory
SSIY2 := 462; // inventory
WSX := 0; //Whole Screen
WSY := 0; //Whole Screen
WSX2 := 761; //Whole Screen
WSY2 := 501; //Whole Screen
MSX := 4; // main screen
MSY := 4; // main screen
MSSX2 := 520; // main screen
MSSY2 := 338; // main screen
MMX := 627; //Minimap
MMY := 268; //Minimap
MMX2 := 842; //Minimap
MMY2 := 426; //Minimap


If you have a repeat until(false) and you run that, you are in a infinite loop. You just want to call it once and not loop\repeat it

rj

2012-12-31 02:47:44

From: [J]ustin
If you have a repeat until(false) and you run that, you are in a infinite loop. You just want to call it once and not loop\repeat it


I removed all the Loops and it produced the same result no mouse movement at all

CRASH_OVERRIDE

2012-12-31 03:03:20

var
x:y:integer ?

var
x, y: integer; ?