//0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 31@
:GetTickCount
0AA2: 2@ = load_library "kernel32.dll" // IF and SET
31@ = 0
if 0AA4: 3@ = get_proc_address "GetTickCount" library 2@ // http://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx
then
0AA7: call_function 3@ num_params 0 pop 0 31@
end
0AA3: free_library 2@
0AB2: ret 1 31@
Thank youmonday said:http://ugbase.eu/Thread-SNIPPET-Date-and-time
http://ugbase.eu/Thread-Tutorial-Using-functions-from-Windows-libraries
For measuring time difference it would be better to use "GetTickCount" function:
Code://0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 31@ :GetTickCount 0AA2: 2@ = load_library "kernel32.dll" // IF and SET 31@ = 0 if 0AA4: 3@ = get_proc_address "GetTickCount" library 2@ // http://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx then 0AA7: call_function 3@ num_params 0 pop 0 31@ end 0AA3: free_library 2@ 0AB2: ret 1 31@
supahdupahnubah said:0xB7CB84 [DWORD] - internal tick counter
Reading this address will be way faster, only cons that it doesn't refresh when your game is paused\alttabed
Nothing bad with it, it will update current tick when you unpause the game, still good for creating timers and shit
Malchik said:supahdupahnubah said:0xB7CB84 [DWORD] - internal tick counter
Reading this address will be way faster, only cons that it doesn't refresh when your game is paused\alttabed
Nothing bad with it, it will update current tick when you unpause the game, still good for creating timers and shit
I just want to force my script work after 1am for example
good to know, grats brosupahdupahnubah said:Malchik said:supahdupahnubah said:0xB7CB84 [DWORD] - internal tick counter
Reading this address will be way faster, only cons that it doesn't refresh when your game is paused\alttabed
Nothing bad with it, it will update current tick when you unpause the game, still good for creating timers and shit
I just want to force my script work after 1am for example
Yea then you can use monday's snippet, since it is more precise
This address is good when you do something fast in loop, especially when it affects something that is binded to this counter, animation time for example, or fire time