SRL Archive - First Scripts

Some reason the script doesn't click properly


nero_dante

2015-06-03 19:49:33

So I got this bit of simba script and for some reason when it clicks the altar and then presses the offer bones, it just clicks ground for some reason. Not sure why. Anyone know the reason for this.



procedure ClickAltar();
var
Burner: Tbox;
begin
wait(gaussRangeInt(3000,3400));
burner := intTobox(200, 157, 245, 183);
mouseBox(burner, MOUSE_RIGHT);
wait(1000);
if chooseOption.select(['ffer Altar']) then
fastClick(MOUSE_LEFT)
else begin
writeLn('Script messed up');
terminateScript();
end;
end;

yourule97

2015-06-03 19:56:39

Hm… I'm not really sure why you have

if chooseOption.select(['ffer Altar']) then
fastClick(MOUSE_LEFT)

chooseOption.select should select the option already. Clicking another time is likely what is making the mistake.

Citrus

2015-06-03 20:04:18

Yup, chooseOption.select() will click the option, so fastClick() will click again.

Another thing to consider: that 1 second wait isn't doing you any good. You can do
chooseOption.select(['ffer Altar'], 1000)
and save yourself some time.

nero_dante

2015-06-03 20:12:42

From: yourule97
Hm… I'm not really sure why you have

if chooseOption.select(['ffer Altar']) then
fastClick(MOUSE_LEFT)

chooseOption.select should select the option already. Clicking another time is likely what is making the mistake.


lol, and so your correct xD Thanks lol. I'm an idiot