How do you detect text like, you right click, then click Attack...? Also, if Attack isn't there it clicks cancel or moves the mouse away so the right-clicked box goes away.
How do you detect text like, you right click, then click Attack...? Also, if Attack isn't there it clicks cancel or moves the mouse away so the right-clicked box goes away.
i think it would be:
If (findtext(attack)) then
clicktext('attack')
else
clicktext('cancel')
Ok, I am just trying to see if it right clicks a monk, then clicks attack, else cancel. Heres what I have:
And I get this error:Code:program Fighter; const Monster=12172221; Betweentime = 3; Var x,y:Integer; Procedure FindColor; begin; FindColorSpiral(x,y,Monster,5,5,760,495); end; Begin FindColor; wait((Betweentime * 1000) + random(300)) If (findtext(attack)) then getmousepos(x,y); clickmouse(x,y,False); clicktext('attack') else clicktext('cancel') end.
What do I change?Code:Line 12: [Error] (12:5): Unknown identifier 'findtext' in script XXXXXXXXXXXXXXX
How bout looking in TEXT.scar??????????????????
Hint:
ClickOption
ChooseOption
popup
{.include srl\srl.scar}
SetupSRL;
And if this is the case just find use
IsUpText('Attack Monk');
Where do I put IsUpText('Attack Monk');Code:program Fighter; {.include srl\srl.scar} SetupSRL; const Monster=12172221; Betweentime = 3; Var x,y:Integer; Procedure FindColor; begin; FindColorSpiral(x,y,Monster,5,5,760,495); end; Begin FindColor; wait((Betweentime * 1000) + random(300)) If (findtext(attack)) then getmousepos(x,y); clickmouse(x,y,False); clicktext('attack') else clicktext('cancel') end.
(I am newb at SCAR... but not scripting)
SCAR Code:program Fighter;
{.include srl\srl.scar}
const
Monster=12172221;
Betweentime = 3;
var
x,y:Integer;
function FindMonk: Boolean;
begin;
if(FindColorSpiral(x,y,Monster,5,5,760,495)) then
Result:= True;
else
Result:= False;
end;
Begin
SetupSRL;
ActivateClient;
repeat
wait((Betweentime * 1000) + random(300));
if(FindMonk) then
begin
if (IsUpText('Attack Monk')) then
Mouse(x, y, 10, 10, True);
end;
until(not(LoggedIn))
end.
New error:Code:program Fighter; {.include srl\srl.scar} Const Monster=12172221; Betweentime = 3; Var x,y:Integer; Procedure FindColor; function FindMonk: Boolean; begin if(FindColorSpiral(x,y,Monster,5,5,760,495)) then Result:= True; else Result:= False; Begin SetupSRL; ActivateClient; repeat Begin FindColor; wait((Betweentime * 1000) + random(300)) if(FindMonk) then if (IsUpText('Attack Monk') then Mouse(x, y, 10, 10, True); until (not(LoggedIn)) end.
TY for help aswell.Code:Line 8: [Error] (8:1): 'BEGIN' expected in script
Fixed.
PHP Code:program Fighter;
{.include srl\srl.scar}
Const
Monster=12172221;
Betweentime = 3;
Var x,y:Integer;
function FindMonk: Boolean;
begin
if(FindColorSpiral(x,y,Monster,5,5,760,495)) then
Result:= True;
else
Result:= False;
Begin
SetupSRL;
ActivateClient;
repeat
Begin FindColor;
wait((Betweentime * 1000) + random(300)) if(FindMonk) then if (IsUpText('Attack Monk') then
Mouse(x, y, 10, 10, True);
until (not(LoggedIn))
end.
Kaldo, here is my version(this time fixed IN SCAR) make sure you delete all of your old one and paste this in exactly(which you failed to do the first time.)
arr0w your's is broken toCode:program Fighter; {.include srl\srl.scar} const Monster = 12172221; Betweentime = 3; function FindMonk: Boolean; begin; if(FindColorSpiral(x,y,Monster,5,5,760,495)) then Result:= True end; Begin SetupSRL; ActivateClient; repeat wait((Betweentime * 1000) + random(300)); if(FindMonk) then begin if (IsUpText('Attack Monk')) then Mouse(x, y, 10, 10, True); end; until(not(LoggedIn)) end.![]()
Sorry, that won't work either. How is the UpText supposed to show 'Attack Monk' if you never move the mouse over there?
Code:program Fighter; {.include srl\srl.scar} const Monster = 12172221; Betweentime = 3; function FindMonk: Boolean; begin; if(FindColorSpiral(x,y,Monster,5,5,760,495)) then Result:= True end; Begin SetupSRL; ActivateClient; repeat wait((Betweentime * 1000) + random(300)); if(FindMonk) then begin MMouse(x,y,2,2); Wait(50); if (IsUpText('Attack Monk')) then Mouse(x, y, 10, 10, True); end; until(not(LoggedIn)) end.
Try "popup". Thats what I use.
Yea I said that as soon I read "you right click, then click Attack" but nobody listens lol.
There are currently 1 users browsing this thread. (0 members and 1 guests)