PDA

View Full Version : Need some help finishing off my script



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;

The Mayor
04-18-2014, 10:21 AM
Doesn't the fire message appear in the chat box (as opposed to the conversation box).

if chatBox.findTextOnLines(['fire'], [0..3]) then

Although I think with the last RS update the fonts changed and I'm not sure if SRL has been updated.

stu
04-18-2014, 02:27 PM
ohh okay, i didn't know there was a difference. what's the conversation box then?
and yeah they changed the fonts a couple of weeks ago so could be that