okokokok
2013-05-15 06:53:48
Hello VillaVu,
I'm making a little script for a text based rpg game I used to play.
Now I seem to have a problem.
I tried to make a DTM of the action the script needs to click, but it can't find it.
The code is as following:
The part it should click is as following:
[ATTACH=CONFIG]21242[/ATTACH]
Can anyone tell me what is wrong with my code?
Thanks in advance
I'm making a little script for a text based rpg game I used to play.
Now I seem to have a problem.
I tried to make a DTM of the action the script needs to click, but it can't find it.
The code is as following:
program SMScript;
{$DEFINE SRL5}
{$i SRL\SRL.simba}
Procedure ZoekMisdaad;
var x,y, i: Integer;
MisdaadDTM: Array [0..2] of Integer;
aFound: Extended;
begin
Writeln('Going for da XPz');
For i := 0 to 2 do
MisdaadDTM[0] := DTMFromString('mKgEAAHic42NgYPjGzMDAzQLBHEDMCMS/mSHi74H4ORA/gOKXQPyZGaKGg5GBgRWIOYGYG4h5sGAuIGYHYhYoZgZiQx4eBh4gzjfmgbDDVjAYFh9gWLzqDJieMnsaULyCIb94GlgdDJMLGMnEqAAAhmoU+Q==');
MisdaadDTM[1] := DTMFromString('mPwEAAHic42dgYPjOzMDwBYh/ATEjCwMDExT/Z4bIPQfiJ1AahN8BMTsLhM3JyMDAC8VcQMwGxD+BZn4A4ndA/BmI/zJA5H4A6fdAzMgIwYtXnWHg4eEB48XtFXC2sWclg7l3LYNDUCmYP2X2NIbA+EYGfecauBpKACMFGA0AAIYWHTA=');
MisdaadDTM[2] := DTMFromString('mKgEAAHic42NgYHjBzMBwF4hfA/EPIGZgYWBgAmJmIP4F5H9ihqi5D8Q3gfgKEF8HYg5GBoanQOWPgfg5EH8FYlagmAAQiwGxFBDLQGlhIGZhhKgxDFvBcOHzfwZn7x6G////M6g5pjDw8PCgYEMgzp99hoGbm5uBlZWVQcMpjYFcwEgmRgUAAsob7A==');
If FindDTM(MisdaadDTM[i],x,y,MSX1,MSY1,MSX2,MSY2) then
Writeln('Found da crimez');
begin
MMouse(x,y,0,0);
Mouse(x,y,0,0,true);
Wait(100000 + random(10));
end;
FreeDTM(MisdaadDTM[0]);
FreeDTM(MisdaadDTM[1]);
FreeDTM(MisdaadDTM[2]);
end;
procedure OneRun;
begin
repeat
ZoekMisdaad;
until (Not(LoggedIn));
end;
begin
clearDebug();
setupSRL;
OneRun;
end. The part it should click is as following:
[ATTACH=CONFIG]21242[/ATTACH]
Can anyone tell me what is wrong with my code?
Thanks in advance