Awkwardsaw
2009-07-03 08:37:59
hobbit told me to post these ;)
yes i know most of these are simple, and any one that knows how to script can do 'em, but no one has so far(that im aware of) :p
also if your wondering, the only "hard" part about making a construction script is making sure the room is where you need it to be. this can easily be done by making sure that the specified room is next to the entrance, or use reflection, go into building mode(where there aren't any doors) and have the use put in they're own path.
yes i know most of these are simple, and any one that knows how to script can do 'em, but no one has so far(that im aware of) :p
{*******************************************************************************
function inhouseoptions: boolean;
By: akwardsaw
Description: It simply checks if your in the house options.
*******************************************************************************}
function inhouseoptions: boolean;
begin
result:= (getcolor(653, 280) = 2070783)
end;
{*******************************************************************************
procedure Houseoptions(onoroff: boolean);
By: akwardsaw
Description: It either turns house options on, or off. true = on.
*******************************************************************************}
procedure Houseoptions(onoroff: string);
begin
gametab(11);
case onoroff of
true: begin
case random(3) of
0..1: mousebox(685, 417, 711, 442, 1);
2: begin
mousebox(685, 417, 711, 442, 2);
chooseoption('Open House Options');
end;
end;
while not getcolor(657, 283) = 2070783 do wait(10 + random(30));
end;
false: case random(3) of
0..1: mousebox(714, 226, 728, 240, 1);
2: begin
mousebox(714, 226, 728, 240, 2);
chooseoption('Close');
end;
end;
end;
end;
{*******************************************************************************
procedure buildingmode(onoroff: boolean);
By: akwardsaw
Description: It either turns building mode on, or off. must be in house options
*******************************************************************************}
procedure buildingmode(onoroff: string);
begin
if not inhouseoptions then Houseoptions('on');
case onoroff of
true: mousebox(657, 283, 602, 298, 1);
false: mousebox(655, 300, 682, 325, 1);
end;
end;
{*******************************************************************************
procedure leavehouse;
By: akwardsaw
Description: It leaves the house. must be in house options
*******************************************************************************}
procedure leavehouse;
begin
if not inhouseoptions then Houseoptions('on');
mousebox(563, 384, 718, 408, 1);
end;
{*******************************************************************************
procedure almostleavehouse;
By: akwardsaw
Description: It almost leaves the house, just like almostlogout, almost logs out. must be in house options
*******************************************************************************}
procedure almostleavehouse;
var a, b: integer;
begin
if not inhouseoptions then Houseoptions('on');
getmousepos(a, b);
mousebox(563, 384, 718, 408, 3);
wait(100 + random(4000));
mmouse(a, b, 20, 20);
end;
{*******************************************************************************
function Findpohportal(var x, y: integer): boolean;
By: akwardsaw
Description: It *hopefully* finds the poh portal. it returns the x and y coords.
a better way to do this would be nice :)
*******************************************************************************}
function Findpohportal(var x, y: integer): boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.94, 33.16);
FindColorsSpiralTolerance(mscx, mscy, TPA, 7478100, msx1, msy1, msx2, msy2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
wait(10 + random(30));
if IsUpTextMultiCustom(['Enter', 'Portal', 'nter', 'ortal', 'ter', 'ort']) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
{*******************************************************************************
Function FindPlank(var x, y: integer; plank: string; cx, cy, cx2, cy2: integer):Boolean;
By: akwardsaw
Description: it finds a dtm of the planks, and returns the x and y coords.
*******************************************************************************}
Function FindPlank(var x, y: integer; plank: string; cx, cy, cx2, cy2: integer):Boolean;
var plank: integer;
begin
case plank of
'plank': plankdtm := DTMFromString('78DA63CC63606010634001595136609A11CA6' +
'72CC654039385ABA90012BC04D41402092E026AB28084280135C9' +
'404281809A1C20A1825F0D00F2AD04B4');
'oak': plankdtm := DTMFromString('78DA639CCEC0C020CE80021A333DC1342394C' +
'F380B487031A0014654357381841801357D404289809A29404295' +
'809A49986E46570300EC66055C');
'teak': plankdtm := DTMFromString('78DA6394606060B0664001996106609A11CA6' +
'79401127A0C688011558D32903026A0461648D81150230A243C09' +
'A8E107122E04D40803095BFC6A0023B50353');
'mahogany': plankdtm := DTMFromString('78DA6374616060B0664001C10EFA609A11CA6' +
'77403127A0C688011558D1F903024A0C60348D81250E308243C09' +
'A8B10212CE04D4D861FA0B5D0D00A14D044E');
end;
Result := finddtm(plankdtm, x, y, cx, cy, cx2, cy2);
If not(Result) then
writeln('Plank not found');
freedtm(plankDTM);
end;also if your wondering, the only "hard" part about making a construction script is making sure the room is where you need it to be. this can easily be done by making sure that the specified room is next to the entrance, or use reflection, go into building mode(where there aren't any doors) and have the use put in they're own path.