Claymore
2008-10-09 01:52:58
procedure PlayerIsMoving;
var
A, B, C, D: Integer;
Timer: LongInt;
Tries: Byte;
begin
MarkTime(Timer);
Tries := 0;
repeat
A := GetColor(MSCX - 25, MSCY - 25);
B := GetColor(MSCX + 25, MSCY + 25);
Wait(RandomRange(750, 1000));
C := GetColor(MSCX - 25, MSCY - 25);
D := GetColor(MSCX + 25, MSCY + 25);
if (C = A) and (D = B) then
Inc(Tries)
else
Tries := 0;
until (TimeFromMark(Timer) > (30000)) or (Tries = 5);
end;
This is just a general idea, nothing new but as you can see, it uses fail safe, etc.
How-It-Works.
1. Grabs the colors in the mainscreen.
2. Waits for like milli-seconds.
3. Grabs the colors in the mainscreen like before.
4. It will find out wether they match.
5. Then it will add up the count.
6. Repeat 1 - 5 untill the count = 5.
7. There you go, the playerIsMoving.
Concerns….
If place is crowded, than this function is completely usless…