linusgr
2010-01-27 14:01:20
I now use DTM so wenn arrow is in middel it prees S but the arrow's use diffrent speed so it prees yellow some times … i need help or ide's how to make so it prees S on green !!

My script i Use now –V
[PHP]program TM;
Var DTM, x, y: Integer;
begin
DTM := DTMFromString('78DA638C666260A86564C00660A28C714035E' +
'504D44410A106645719013551403555A86A2A2A2A50D5C400D554' +
'105003B2AB06558D9B9B1BA69A2E02EE8905AAE925604E04A61AA' +
'CFEEA27C2CD1389888B09F8D50000CA5C1161');
repeat
Wait(10);
until(FindDTM(DTM, x, y,606, 371,616, 405));
KeyDown(GetKeyCode('s'));
wait(50 + random(75));
KeyUp(GetKeyCode('s'));
end.[/PHP]
jimmy_mac
2010-01-27 20:17:15
use color finding. here:
program New;
var CW, CH, x, y : Integer;
begin
repeat
GetClientDimensions(CW, CH);
if findColorTolerance(x, y, 1826902, CW/2 - 200, CH/2 - 200, CW/2 + 200, CH + 200, 15) then
begin
writeln('found green');
if findColorTolerance(x, y, 985856, x - 10, y - 15, x + 10, y-6, 10) then
SendKeys('s');
wait(500);
end;
until(false);
end.
@Yohojo: the bitmap you have given doesn't change on screen its the grey little pointers above and below that move.
linusgr
2010-02-02 12:15:29
This script work but it dosen't make perfect all the time any ide's??
[PHP]program New;
var CW, CH, x, y : Integer;
begin
repeat
GetClientDimensions(CW, CH);
if findColorTolerance(x, y, 323648 , CW/2 - 300, CH/2 - 300, CW/2 + 300, CH + 300, 15) then
begin
writeln('found green');
if findColorTolerance(x, y, 7895160 ,352, 167,352, 167, 10) then
SendKeys('s');
wait(500);
end;
until(false);
end.[/PHP]
linusgr
2010-02-07 19:22:44
LOOk for the big "//———————-Look"
wenn i add that in "—-" then script just freez it say "running script" but it dont do anything
Wenn i add this to script it just freez
[PHP]//——————————————————–START
If Not FindDTM(DTM1, x, y,0, 0,1275, 986) then
begin
KeyDown(GetKeyCode('u'));
wait(25 + random(30)); //———————-Look
KeyUp(GetKeyCode('u'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);//———————-Look
KeyDown(GetKeyCode('i'));
wait(25 + random(30));
KeyUp(GetKeyCode('i'));
wait(30000 + random(30000));//———————-Look
//—————————————————————STOP [/PHP]
[PHP]program TM;
var
x,y,DTM,DTM1,i,r: Integer;
procedure TM;
begin
DTM1 := DTMFromString('78DA85D54F2883611C07F0F7798B28A536856' +
'87F1C365B0E2B3B8832D60A3747174A2E4A71125194838B83A250' +
'AB1517B5C8FCB92C7FB2DA2E6E72C189C39A52B41A51C2F795839' +
'FB79EEF0ECFBEEBF9EC7D7ECF9FDE4799CA30DCA6F1F7D3DA54FD' +
'F3AD7E7FAB20D29312A633E8946602E9449A36EF3FB38C5449C64' +
'A2179A4E90A3448633DC3254D34582BCD0CFA6B4C7DCDEBE87F90' +
'3577B7D449B30A7348E6BE02334FE69E808928FDDCE33045433FD' +
'62DCC9D34A1C60A691E61DCA49E0F9871624A307BC41461DEC8FA' +
'1CC394C8DCD330DB4A3FAF239828192B09F349D66712E68098019' +
'845435FB3B2F65D9A769F439A25A40D6962A17A69FA9152867E9D' +
'5D4869437F563D4853647D76D00C913DBDB7FE484C335280EC971' +
'FE985D43C8AF46AF0770BDBF761A43562AC7A13C414D06C119341' +
'9324268E264DCEFC1CD23931D6F9B922636D227D91FDBA41F2CAF' +
'7E1602C6C3765E4BD7A8D7449F63D8FB44F6A2EC738A764EE5530' +
'79F21C078CD3D4CFDDBA07FCA6FE1CF698B6F5B13DA703FD39B2C' +
'E11980CA9B90FE6999811FBFDD51BF64833867E1FB94F67D15F20' +
'632DC09C91795DC04C937DCFC2EC923DCDDAEF5C5B3D399877BDF' +
'90613275FA3');
DTM := DTMFromString('78DA639CCDC0C020C6C4800CFEFFFF0FA619A' +
'17CC695404201550D5015AA9AC740429680391A4096140135F140' +
'9634116A6450D5B0B0A0A92905B21409B8B908C812C66F1700A2F' +
'E16E8');
If FindDTM(DTM, x, y,0, 0,1275, 986) then
begin
KeyDown(GetKeyCode('q'));
wait(5000 + random(2000));
DTM := DTMFromString('78DA633CC9C4C0500BC448E0DAB56B609A11C' +
'A673C8FA9E6CE462E54358781F2C504D41C00CA17A1AA8101B89A' +
'4340F9725435E1E1E1A86A8E00E52BF1BB1900B47610CC');
If FindDTM(DTM, x, y,0, 0,1275, 986) then
begin
WriteLn('bateri' + IntToStr(i) + '.');
//wait(5000 + random(2000));
//KeyDown(GetKeyCode('q'));
wait(5000 + random(2000));
ClickMouse(x,y,true);
wait(10 + random(20));
ClickMouse(x,y,true);
wait(5000 + random(2000));
KeyUp(GetKeyCode('q'));
wait(5000 + random(2000));
KeyDown(GetKeyCode('d'));
wait(5500 + random(3000));
KeyUp(GetKeyCode('d'));
wait(5000 + random(2000));
KeyDown(GetKeyCode('s'));
wait(2500 + random(3000));
KeyUp(GetKeyCode('s'));
wait(5000 + random(2000));
KeyDown(GetKeyCode('a'));
wait(500 + random(300));
KeyUp(GetKeyCode('a'));
wait(5000 + random(2000));
KeyDown(GetKeyCode('q'));
DTM := DTMFromString('78DA63BCC9C0C010C1C4800CD6426946187D0' +
'F4804A2AA6969694155F31A4884A2AA898A8A4255F30E48841050' +
'F3014804A3AA614077CF534C35FFFFA3A9B90F24C2D0D4A099030' +
'0362F1001');
If FindDTM(DTM, x, y,0, 0,1275, 986) then
begin
wait(5000 + random(20));
ClickMouse(x,y,true);
wait(10 + random(20));
ClickMouse(x,y,true);
wait(5000 + random(2000));
KeyUp(GetKeyCode('q'));
wait(5000 + random(2000));
i:= i + 1;
r:= r - r;
end;
end;
end;
begin
DTM := DTMFromString('78DA637464666098C0C4800C1AA034238C760' +
'7AAE923A026900873FC806A3A50D5383939A1AAC902AAE94555C3' +
'806E4E14504D3FBA39686ABC816A3A0998130A54D38EDF3D00739' +
'F0AB6');
If FindDTM(DTM, x, y,656, 447,910, 873) then
begin
Inc(r);
WriteLn('This is rock ' + IntToStr(r) + '.');
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(GetKeyCode('a'));
wait(10 + random(20));
KeyDown(VK_right);
wait(9000 + random(10000));
KeyUp(VK_right);
wait(150 + random(200));
KeyUp(GetKeyCode('a'));
wait(150 + random(200));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(GetKeyCode('d'));
wait(250 + random(30));
KeyUp(GetKeyCode('d'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(40 + random(50));
KeyDown(VK_left);
wait(50 + random(50));
KeyUp(VK_left);
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(50 + random(75));
KeyDown(GetKeyCode('a'));
wait(50 + random(75));
KeyUp(GetKeyCode('a'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(10 + random(20));
KeyDown(VK_right);
wait(30 + random(10));
KeyUp(VK_right);
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(101+ random(20));
KeyDown(GetKeyCode('d'));
wait(20 + random(30));
KeyUp(GetKeyCode('d'));
//——————————————————–START
If Not FindDTM(DTM1, x, y,0, 0,1275, 986) then
begin
KeyDown(GetKeyCode('u'));
wait(25 + random(30)); //———————-Look
KeyUp(GetKeyCode('u'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);//———————-Look
KeyDown(GetKeyCode('i'));
wait(25 + random(30));
KeyUp(GetKeyCode('i'));
wait(30000 + random(30000));//———————-Look
//—————————————————————STOP
wait(10 + random(20));
KeyDown(VK_right);
wait(10 + random(20));
KeyDown(VK_Down);
wait(200 + random(150)); //UPP!!!
KeyUp(VK_down);
wait(10 + random(20));
Keyup(VK_right);
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(1005 + random(205));
KeyDown(GetKeyCode('a'));
wait(300 + random(20));
KeyDown(VK_right);
wait(9000 + random(1000));
KeyUp(VK_right);
wait(10 + random(200));
KeyUp(GetKeyCode('a'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(50 + random(200));
KeyDown(GetKeyCode('d'));
wait(250 + random(300));
KeyUp(GetKeyCode('d'));
wait(40 + random(50));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(VK_left);
wait(90 + random(40));
KeyUp(VK_left);
wait(30 + random(75));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(GetKeyCode('a'));
wait(30 + random(75));
KeyUp(GetKeyCode('a'));
wait(12 + random(50));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(VK_up);
wait(10 + random(20));
KeyDown(VK_right);
wait(300 + random(150));
KeyUp(VK_up);
wait(10 + random(20));
Keyup(VK_right);
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(250 + random(300));
KeyDown(GetKeyCode('d'));
wait(250 + random(300));
KeyUp(GetKeyCode('d'));
wait(250 + random(300));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
end else
Begin
WriteLn('fail dirl');
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(100 + random(400));
KeyDown(VK_right);
KeyDown(VK_down);
wait(250 + random(150));
KeyUp(VK_down); ///NER!!
wait(20 + random(10));
KeyUp(VK_right);
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
KeyDown(GetKeyCode('d'));
wait(10 + random(100));
KeyUp(GetKeyCode('d'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);
wait(1000 + random(1000));
end;
end;
end;
end;
begin
repeat
TM;
until(r = 400) or (i = 10) ;
begin
WriteLn('Done closing');
ClickMouse(1215, 63,true);
wait(1000 + random(2000));
ClickMouse(674, 564,true);
wait(1000 + random(2000));
ClickMouse(598, 19,true);
wait(1000 + random(2000));
ClickMouse(594, 19,true);
end;
end.[/PHP]
x[Warrior]x3500
2010-02-07 19:49:22
[PHP]If Not FindDTM(DTM1, x, y,0, 0,1275, 986) then
begin
KeyDown(GetKeyCode('u'));
wait(25 + random(30)); //———————-Look
KeyUp(GetKeyCode('u'));
repeat
wait (300);
until FindDTM(DTM1, x, y,6, 9,1272, 980);//———————-Look
KeyDown(GetKeyCode('i'));
wait(25 + random(30));
KeyUp(GetKeyCode('i'));
wait(30000 + random(30000));//———————-Look [/PHP]
i dont know if you need this (i did not go through your whole code) but you are missing an end; to that section. (you might have placed it in later)
also, you are waiting 30secs + random(30 secs)???
EDIT: i still cant find the lumberjack shop :( - if i could find, then i could get a hatchet n help u a lot more
EDIT: only 1 hr of gameplay left :(