I do believe this kind of thing goes here.
Anyways, hi
I've put together a few simi-useful procedures here, and decided to share them with the rest of this community
SCAR Code:procedure ClickToContinueEx(Times:Integer);
var
Done : Integer;
begin
repeat
ClickToContinue;
Wait(500 + Random(500));
Done := Done + 1;
until(Times = Done);
end;
Well, I got tired of typing in "ClickToContinue" over and over again, so I made a procedure for multiples of that command.
SCAR Code:procedure NPCFinder(NPCColor, Tol: Integer; Name: String);
var
Tries : Integer;
begin
repeat
if(FindColorSpiralTolerance(x, y, NPCColor, MSX1, MSY1, MSX2, MSY2, Tol))then
Wait(500 + Random(100));
MMouse(x, y, 1, 1);
Tries := Tries + 1;
if(Tries >= 5)then
begin
KeyDown(37);
Wait(1000 + Random(500));
KeyUp(37);
Tries := 0;
end;
until(IsUpText(Name));
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 'Talk');
end;
This one and the next are pretty much in the same boat. They're just very simple ways of opening doors/talking to NPCs.
SCAR Code:procedure DoorOpener(DoorColor, Tol:Integer);
var
Tries : Integer;
begin
repeat
Wait(500 + Random(100));
if(FindColorSpiralTolerance(x, y, DoorColor, MSX1, MSY1, MSX2, MSY2, Tol))then
MMouse(x, y, 1, 1);
Tries := Tries + 1;
if(Tries >= 5)then
begin
KeyDown(37);
Wait(1000 + Random(1000));
KeyUp(37);
Tries := 0;
end;
until(IsUpText('Door') or IsUpText('Gate'));
if(IsUpText('Open'))then
begin
Writeln('Found a door.');
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 'Open');
Writeln('Opened door.');
end;
if(IsUpText('Close'))then
begin
Writeln('Door was already open.');
Exit;
end;
end;
Enjoy! Tell me what you think them.
I'll add more later on![]()









Reply With Quote







owell it still works



