Janilabo

Janilabo | RS07 Capture Main Screen [SCAR Divi]

Mar 29th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.73 KB | None | 0 0
  1. {$DEFINE RS07}
  2. {$I MSSL\MSSL.scar}
  3.  
  4. const
  5.   LOGIN = ''; // You can leave these empty if you dont wish to use login (if you login yourself)
  6.   PASSWORD = '';                                                        
  7.   QUICK_LOGIN = False; // Use quick login (enters username and password really quick at login details)
  8.   REFRESH = False; // Logout AND refresh (F5) the browser after taking the screenshot?
  9.   NAME = ''; // Name of the path where the screenshots will be saved to in script's path?
  10.   COMPASS = -1; // Compass angle (0.0 - 360.0)? Keep as -1 (or below), if you dont want the script to change it.
  11.   CAMERA_HIGH = False; // Set camera to highest angle before capturing?
  12.  
  13. procedure ScriptTerminate;
  14. begin
  15.   MSSL_Unsetup;
  16. end;
  17.  
  18. var
  19.   b: Boolean;
  20.  
  21. begin
  22.   RS07_QuickLogin := QUICK_LOGIN;
  23.   MSSL_Setup;
  24.   b := (RS07_LoggedIn or ((LOGIN = '') or (PASSWORD = '') and RS07_LoggedIn) or RS07_LogIn(LOGIN, PASSWORD));  
  25.   if b then
  26.   begin                        
  27.     if CAMERA_HIGH then
  28.       RS07_SetCameraAngleH;
  29.     if MSSL_InRangeE(COMPASS, 0.0, 360.0) then
  30.       RS07_SetCompass(COMPASS);
  31.     case MSSL_SaveScreenshotEx((ScriptPath + NAME + '\bitmap'), RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, False) of
  32.       True:
  33.       begin
  34.         Status(MSSL_TheTime + ': We got it, yeah!');
  35.         if REFRESH then
  36.         begin
  37.           RS07_Logout;
  38.           ClickMouse((RS07_APPLET_AREA_XS + 10), (RS07_APPLET_AREA_YE + 5), mbLeft);
  39.           Wait(25);
  40.           PressVKey(VK_F5);
  41.         end;
  42.       end;
  43.       False: Status(MSSL_TheTime + ': Failed to capture the bitmap. :(');    
  44.     end;
  45.   end else
  46.     Status(MSSL_TheTime + ': Failed to capture the bitmap. :(');
  47. end.
Advertisement
Add Comment
Please, Sign In to add comment