Bebe
2006-06-01 00:42:26
Another Construction function by me.
(Uses my other function http://82.92.130.193/forums/showthread.php?t=1783)
(Uses my other function http://82.92.130.193/forums/showthread.php?t=1783)
{*******************************************************************************
function BuildingMode(TurnedOn:string):boolean;
by: Bebemycat2
Description: Will turn on or off Building Mode in "House Options"
*******************************************************************************}
function BuildingMode(TurnedOn:string):boolean;
var
SRLConstructionBuildingModeOff,SRLConstructionBuildingModeOn: integer;
Bx,By,BMIX1,BMIY1,BMIX2,BMIY2 :integer;
begin
SRLConstructionBuildingModeOn := BitmapFromString(14, 10, 'z78DA3330400067' +
'2070738390063800F1B2982A71E9C56F2F79AE22C62583CD4C5CB' +
'68C1C33719946AA5EE25311B5D23C005CB1B401');
SRLConstructionBuildingModeOff := BitmapFromString(19, 10, 'z78DA333040006' +
'72070738390063800B21A4C9254359826E3B2D1002F20C6CDC4CB' +
'8E1C1BF1C7387E35A3A14A0B1BE99F3B0CC82A0128B111002B09E' +
'E21');
gametab(12);
if(openHouseOptions)then
begin
BMIX1:= Trunc(MIX1*0.90);
BMIY1:= MIY1;
BMIX2:= MIX2;
BMIY2:= Trunc(MIY2*0.70);
case Lowercase(TurnedOn) of
'on':
begin
if(FindBitmapIn(SRLConstructionBuildingModeOn,Bx, By, BMIX1,BMIY1,BMIX2,BMIY2))then
MMouse(BX,By,12,12);
case random(2) of
1: wait(70+random(40));
2: wait(70+random(50)+random(40));
end;
Mouse(Bx,By,1,1,true);
result:=true;
end;
'off':
begin
if(FindBitmapIn(SRLConstructionBuildingModeOff,Bx, By, BMIX1,BMIY1,BMIX2,BMIY2))then
MMouse(BX,By,12,12);
case random(2) of
1: wait(70+random(40));
2: wait(70+random(50)+random(40));
end;
Mouse(Bx,By,1,1,true);
result:=true;
end;
end;
freebitmap(SRLConstructionBuildingModeOn);
freebitmap(SRLConstructionBuildingModeOff);
end;