Simba Code:
[1731643360,2547232634,2782989724,2899052740,3489785670,3915285997,547053328,617765920]
The IDs of anything attackable in PC, including portals.
This was my attack procedure, before I update ogLib a bit and started really using the
The Scan and React Method:
Simba Code:
procedure pAttack;
var
funcPointArray:tPointArray;
begin
writeLN('[procedure] pAttack');
if length(funcPointArray:=ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([1731643360,2547232634,2782989724,2899052740,3489785670,3915285997,547053328,617765920])).getVisible())) then
begin
if random(5)=0 then
mouse.rightClickOption(funcPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20),['Attack Brawler','Attack Defiler','Attack Portal','Attack Shifter','Attack Spinner','Attack Splatter','Attack Torcher'])
else
mouse.click(funcPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20));
canAttack.setTime(canWalk.setTime(random(500,1500)));
end
else
canRotate.setTime(0);
end;
Now, for the resolutions that aren't 800x600. If you're using a resolution that's not 800x600, you
might, not always, have to use
glxViewPort().
So to do this...
Simba Code:
//~ Etc...
var
tempX,tempY:int32; {Don't assign any values}
begin
autoUpdateMe();
ogl.setup(1024,640);
glxViewPort(tempX,tempY,tempX,tempY); {This will fix OGL positions}
ogl.setDebugMode(0);
scriptPaintBMP := loadBitmap( AppPath + 'scripts\Adieuxs Pestcontrol\AdieuxsPestcontrolPaint.jpg');
whereAreWe();
//~ Etc...
I made note of your override for clicking the minimap compass. It'll be fixed in the next update.
Keep in mind, you can adjust the vertical height of the camera with mainScreen, just to make it a bit more realistic.
mainScreen.setDegrees(horizontal,vertical). This will change both at the same time. Or, you can set them individually.
A good idea, is get the camera prepared when they're killing the last flag - typically, if I recall, facing randomly between north-west and east was very safe (random(270,405) degrees). To prevent accidentally walking after the game ends, you can also prevent from calling any walk/attack procedure when the last portal is open.
The gangplank model IDs can change. All of them are:
Simba Code:
[1781393848,2892440677,3763942768,4136683396,4168949912]
Since I don't want to completely spoil the one in SRL Members, I'll make this my last comment (since I saw your comment about working on a fix for boots):
Simba Code:
procedure pSelect;
var
funcPointArray:tPointArray;
begin
writeLN('[procedure] pSelect');
if length(funcPointArray:=mouse.getPoint().closest(ogl.getModels(tCardinalArray([940746976,432722987,3341867181])))) then
begin
if random(5)=0 then
mouse.rightClickOption(funcPointArray[0].randomizePointEllipse(30),'Select')
else
mouse.click(funcPointArray[0].randomizePointEllipse(30));
end;
canCross.setTime(random(1500,2500));
end;
Those 3 IDs are the boots. It'll simply select the one closest to the mouse. If you wanted it to select a random one:
Simba Code:
procedure pSelect;
var
funcModelrray:glModelArray;
begin
writeLN('[procedure] pSelect');
if length(funcModelArray:=ogl.getModels(tCardinalArray([940746976,432722987,3341867181]))) then
begin
if random(5)=0 then
mouse.rightClickOption(funcModelArray[random(3)].randomizePointEllipse(30),'Select')
else
mouse.click(funcModelArray[random(3)].randomizePointEllipse(30));
end;
canCross.setTime(random(1500,2500));
end;
+Rep. Great work!