Sax
2012-11-20 18:18:16
I know it is a noob question. But could someone make an example using ChooseOption or other function like this? It's just that it is not working for me… So could anyone do me this?
2012-11-20 18:18:16
2012-11-20 18:21:08
From: Nirvana
I know it is a noob question. But could someone make an example using ChooseOption or other function like this? It's just that it is not working for me… So could anyone do me this?
if(FindColorTolerance(x, y, 2279655 , MCX1, MCY1, MCX2, MCY2, 32)) then
begin
mouse(x, y, 5, 5, false);
wait(200+random(150));
WaitOption('e All', 500);
end;
OptionsExist(['e all'], false); // false does nothing if option found it returns TRUE, if you change it to (next line)
OptionsExist(['e all'], true); // if found option it moves mouse on that option but do not click (i guess) not tested though. still should return true.
// in both way if not find option returns false
2012-11-20 18:43:13
2012-11-20 18:47:41
From: Nirvana
Well I was doing it correctly I dont know why but it doesn't work for me. I mean the mouse moves but when it is supposed to cchoose the option the script stops. And it says successfully executed.
program NoName;
{$DEFINE SMART}
{$i srl/srl.Simba} //here
procedure mainloop;
var x, y:integer;
begin
if(FindColorTolerance(x, y, 2279655 , MSX1, MSY1, MSX2, MSY2, 32)) then
begin
mouse(x, y, 5, 5, false);
wait(200+random(150));
WaitOption('here', 500);//walk here option
end;
end;
begin
Smart_FixSpeed := true;//if smart loads quite too long.. :)
SetupSRL; //here
wait(20000); wait 20sec till you manually login.
repeat
mainloop; //this will repeat searching for 2279655 color, and if finds it,
// right clicks it and chooses "walk here"; if starts to walk it works well though..
until(false);
end;2012-11-21 13:12:38
2012-11-21 13:38:41
if not WaitOptionMulti(['ttack', 'tack', 'Att'], RandomRange(300,600)) then
Writeln('Failed!')
else Writeln('Success!');
2012-11-21 18:22:44
2012-11-21 18:42:27
From: Nirvana
Sorry didn't reply cuz I have been busy. Thank you all for your reply. I knew the functions and how to use them it just didnt work for some reason. Well I ran the script in smart and worked fine.
Now Im getting a problem in uptext detection. Sometimes it detects but other times it doesn't even though it is always the same item.