Boreas
2008-12-15 00:13:40
My attempt at getting back on the horse. Far from done, watch it! Anyone want to help?
ver 0.0000000000000002 :p
Start in build mode, with money, with a larder already in place, with at least 16 free spaces. Ask you butler to get you 16 oak planks, then go stand to the left of the larder before he gets back. When he gets back, accept the goods, and then click on him before walks away. Then run the script.
Yoho: this should work for any house as long as you turn compass so that larder is in bottom right corner of the kitchen. For tab maker however, you need to have it like this:
………………………..- Dining room (bell)
Stairs room (glory)- Study(lectern)
and those 3 have to not be connected to any other rooms with internal doors.
ver 0.0000000000000002 :p
Start in build mode, with money, with a larder already in place, with at least 16 free spaces. Ask you butler to get you 16 oak planks, then go stand to the left of the larder before he gets back. When he gets back, accept the goods, and then click on him before walks away. Then run the script.
program New;
{.include srl\srl.scar}
function FindNPCChatText2(txt: string; Action: fnct_ActionOptions): Boolean;
var
tx, ty, S: Integer;
begin
Result := False;
if txt = '' then
begin
srl_Warn('FindNPCChatText2', 'txt is empty', warn_AllVersions);
Exit;
end;
S := CreateBitmapMaskFromText(txt, UpChars);
if FindBitmapMaskTolerance(S, tx, ty, 9, 348, 523, 471, 50, 10) then
begin
Result := True;
case Action of
Move: MMouse(tx, ty + 2, Random(Length(txt) * 5), 4);
ClickLeft: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, True);
ClickRight: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, False);
end;
end;
FreeBitmap(S);
end;
var t:integer;
function ClickButler:boolean;
begin
result:=true;
end;
function TalkToButler:boolean;
var t:integer;
begin
t:=getsystemtime;
if FindNPCChatText('you do not pay me',Nothing) then
begin
ClickToContinue;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Pay servant', ClickLeft);
ClickButler;
end;
if FindNPCChatText('Your goods, sir',Nothing) then
begin
ClickToContinue;
ClickButler;
end;
if FindNPCChatText('you do not pay me',Nothing) then
begin
ClickToContinue;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Pay servant', ClickLeft);
ClickButler;
end;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('sir',Nothing); ClickToContinue;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Go to the bank', ClickLeft);
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Bring something from', ClickLeft);
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('fetch something',Nothing); ClickToContinue;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Certainly',Nothing); ClickToContinue;
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Oak planks', ClickLeft);
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText2('Enter amount',Nothing); typesend('16');
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Very good, sir',Nothing); ClickToContinue;
result:=true;
end;
function ClickWhiteLarder:boolean;
begin
MouseBox(313,120,341,145, 2);
result:=true;
end;
function ClickBrownLarder:boolean;
begin
MouseBox(313,120,341,145, 2);
result:=true;
end;
function BuildIt:boolean;
var t,x,y:integer;
begin
t:=getsystemtime;
ClickBrownLarder;
ChooseOption('Remove');
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindNPCChatText('Yes', ClickLeft);
wait(300+random(100));
ClickWhiteLarder;
wait(100+random(50));
ChooseOption('uild');
repeat wait(50); if (getsystemtime-t)>60000 then exit; until FindTextTpaEx(2070783,0,66,168,140,210,x,y,'Oak',statchars,Nothing);
MouseBox(40,180,60,200,1);
repeat wait(50); if (getsystemtime-t)>60000 then exit; until not FindTextTpaEx(2070783,0,66,168,140,210,x,y,'Oak',statchars,Nothing);
result:=true;
end;
begin
setupsrl;
TalkToButler;
BuildIt;
BuildIt;
repeat wait(50); until FindNPCChatText('your goods sir',Nothing); ClickToContinue;
end.To do: ClickButler, ClickLarder, failsafes including for when he gets back too soon, arrange for start from anywhere, loop, declareplayers login etc.Yoho: this should work for any house as long as you turn compass so that larder is in bottom right corner of the kitchen. For tab maker however, you need to have it like this:
………………………..- Dining room (bell)
Stairs room (glory)- Study(lectern)
and those 3 have to not be connected to any other rooms with internal doors.