Jump to content
wundertüte

Release Raidmapbot

Recommended Posts

i have this setting, but bot doesn't click on "reconnect" or "repair" after restart or after getting sunk, that's my problem

 

has anybody have a clue what's wrong with my settings?

it's really bad to put up the alarm clock just for server restart :D

i want to sleep the whole night so please help me :-P

Link to comment
Share on other sites

u have to renew your bmp like verbinde (connect)

they all are called in the

Function gamemessages : Boolean;

 

optional u can integrate a refresh procedure in script

that count 9 min after the last event the refresh funktion

var Refreshtime: Integer;

procedure Refresccccch ;
begin
time:=GetTimeRunning;

if (time>Refreshtime+500000) then //=500 sek
begin
  // writeln('Refresch');
 KeyDown(116);
 Wait(100 + Random(50));
 KeyUp(116);
 Refreshtime:=time;
 wait(20000);
 if (FindBitmapTolerance(annehmen, xx, yy, 25)=true) then
  begin
   writeln('nach Refresh annehmen gefunden: '+inttostr(xx)+' /'+inttostr(yy));
   mouse(xx,yy);
  end;
 end;
end;

 

if u want u call it in every loop

if you want to u can call after a event (maybe.... finish shoot a leviatan or end shoot behemod or repair .....) insert the option

Refreshtime:=time;

it renew the countdown and the 500 sekonds start at that moment again

Link to comment
Share on other sites

Function gamemessages : Boolean;

begin

result:=false;

dead;

if (FindBitmapTolerance(neulogin, xx, yy, schliessen_tolerance)=false) then begin

if (FindBitmapTolerance(verbinde, xx, yy, schliessen_tolerance)=false) then begin

if (FindBitmapToleranceIN(schliessen, xx, yy, skx1, sky1 + 40, skx2, sky2, schliessen_tolerance)=True) then begin

result:=true;

writeln('schliessen(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

end;

end;

if (result=false) then begin

if (FindBitmapTolerance(neulogin, xx, yy, schliessen_tolerance)=True) then begin

result:=true; wait(20000);

writeln('wait(20000); neulogin(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

end;

if (result=false) then begin

if (FindBitmapTolerance(ok, xx, yy, ok_tolerance)=True) then begin

result:=true;

writeln('ok(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

end;

if (result=false) then begin

if (FindBitmapTolerance(verbinde, xx, yy, schliessen_tolerance)=True) then begin

result:=true; wait(20000);

writeln('wait(20000); verbinde(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

end;

if (result=false) then begin

if (FindBitmapTolerance(close, xx, yy, close_tolerance)=True) then begin

result:=true;

writeln('close(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

//mouse(xx,yy);

reload;

wait(newlife);

end;

end;

if (result=false) then begin

if (FindBitmapTolerance(weltkarteoffen, xx, yy, weltkarteoffen_tolerance)=True) then begin

result:=true;

writeln('weltkarte(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=mmx1+45; yy:=mmy1-21;

mouse(xx,yy);

end;

end;

 

 

if (FindBitmapTolerance(neulogin, xx, yy, schliessen_tolerance)=false) then begin

if (FindBitmapTolerance(verbinde, xx, yy, schliessen_tolerance)=false) then begin

if (FindBitmapToleranceIN(schliessen, xx, yy, skx1, sky1 + 40, skx2, sky2, schliessen_tolerance)=True) then begin

result:=true;

writeln('schliessen(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

end;

end;

 

if (FindBitmapTolerance(neulogin, xx, yy, schliessen_tolerance)=True) then begin

result:=true; wait(20000);

writeln('wait(20000); neulogin(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

 

 

if (FindBitmapTolerance(ok, xx, yy, ok_tolerance)=True) then begin

result:=true;

writeln('ok(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

 

if (FindBitmapTolerance(verbinde, xx, yy, schliessen_tolerance)=True) then begin

result:=true; wait(20000);

writeln('wait(20000); verbinde(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=xx+2+random(2); yy:=yy+2+random(2);

mouse(xx,yy);

end;

if (FindBitmapTolerance(close, xx, yy, close_tolerance)=True) then begin

result:=true;

writeln('close(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

//mouse(xx,yy);

reload;

wait(newlife);

end;

if (FindBitmapTolerance(weltkarteoffen, xx, yy, weltkarteoffen_tolerance)=True) then begin

result:=true;

writeln('weltkarte(xx/yy)'+inttostr(xx)+'/'+inttostr(yy));

xx:=mmx1+45; yy:=mmy1-21;

mouse(xx,yy);

end;

 

 

 

 

if (result=false) then writeln('keine gamemessage gefunden');

 

end;

 

what should i change here?

that's what i have in gamemessages

if i would understand something in changing or writing scripts i would do it on my own but i have nearly no clue with that :/

Link to comment
Share on other sites

no problem

read how findbitmap works here

http://wiki.scar-divi.com/index.php?title=Category:Color_Functions

the function gammessages find the bitmaps like ok button or close button or reconect

if a gamemessage is open in sf and scar dont close it u have to renew the bitmap......

like dont close gamemessage "ok".... look in gammessage ... ok button is ok..... verbinde is the conect button ...

make a new bmp and go to funktion loadbmp.......... override and see what happen

make a copy before ^^

have fun

Link to comment
Share on other sites

then u have to write a little and include some functions

procedure findRightWindow; // finds windows
begin
 if FindWindowTitlePart('seafight.com',true)  then
 begin
 SM := GetClientWindowHandle;
 Writeln('SeamapHandle found: '+inttostr(SM));
 end;
 wait(100);
end;

procedure SeaMap;
begin
 writeln('kontrollpunt Seamap');
 SetClientWindowHandle(SM);
 GetClientDimensions(resolution_x, resolution_y);
 ActivateClient;
 Writeln('Seamap_y2: '+inttostr(resolution_x)+'x '+inttostr(resolution_y));
end;

and call both in the main loop and add to global var SM to integer vars

delete in script this part

SetDesktopAsClient;GetClientDimensions(resolution_x, resolution_y);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
  • Create New...