stu
04-18-2014, 07:51 AM
Okay I have 2 questions to finish off my script which everyone helped me out with yesterday.
1) Is there a way to make it recognise when some text disappears. for example, I click an arctic pine tree, and then when the "Cut down arctic pine" text disappears (meaning the tree has been cut down), it clicks the next tree.
2) why does it still not recognise when it says "you can not light a fire here" in the chatbox? I have this in the script
var
T, CT: TTimeMarker;
begin
CT.startTime;
while CT.getTime < randomRange(3000, 4000) do
begin
Wait(500);
if conversationBox.findChat(['any more','any']) or conversationBox.findChat(['light a', 'fire']) then
begin
typeByte(VK_ESCAPE);
wait(randomRange(500, 1000));
break;
end;
end;
keyDown(50); //key code for 2 is '50'
T.startTime;
while T.getTime > randomRange(3000, 5000) do
begin
wait(randomRange(50, 100));
if tabBackPack.count() < 12 then
break;
end;
keyUp(50);
end;
1) Is there a way to make it recognise when some text disappears. for example, I click an arctic pine tree, and then when the "Cut down arctic pine" text disappears (meaning the tree has been cut down), it clicks the next tree.
2) why does it still not recognise when it says "you can not light a fire here" in the chatbox? I have this in the script
var
T, CT: TTimeMarker;
begin
CT.startTime;
while CT.getTime < randomRange(3000, 4000) do
begin
Wait(500);
if conversationBox.findChat(['any more','any']) or conversationBox.findChat(['light a', 'fire']) then
begin
typeByte(VK_ESCAPE);
wait(randomRange(500, 1000));
break;
end;
end;
keyDown(50); //key code for 2 is '50'
T.startTime;
while T.getTime > randomRange(3000, 5000) do
begin
wait(randomRange(50, 100));
if tabBackPack.count() < 12 then
break;
end;
keyUp(50);
end;