Mator

Set PC Level Mult

Aug 18th, 2016
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.42 KB | None | 0 0
  1. unit UserScript;
  2.  
  3. procedure SetFlag(element: IInterface; index: Integer; state: boolean);
  4. var
  5.   mask: Integer;
  6. begin
  7.   mask := 1 shl index;
  8.   if state then
  9.     SetNativeValue(element, GetNativeValue(element) or mask)
  10.   else
  11.     SetNativeValue(element, GetNativeValue(element) and not mask);
  12. end;
  13.  
  14. function Process(e: IInterface): Integer;
  15. begin
  16.   SetFlag(ElementByPath(e, 'ACBS\Flags'), 7, true);
  17. end;
  18.  
  19. end.
Advertisement
Add Comment
Please, Sign In to add comment