lua tics instead of a timer.
lua tics instead of a timer.
Hey all I was just wondering if it was possible in scripting lua to use tics instead of a timer. Thank you in advance.
Re: lua tics instead of a timer.
As in getTickCount? If so:
Code: Select all
local tickCount = getTickCount()
Re: lua tics instead of a timer.
As in
But using ticks in stead of creating a timer
Code: Select all
healthTimer = createTimer()
healthTimer.Interval = 1000
Re: lua tics instead of a timer.
I'm not really sure why you want to use ticks instead of milliseconds that the timer offers but perhaps using either:
would be of use.
Code: Select all
os.clock()
os.difftime()
Re: lua tics instead of a timer.
The game writes way faster than millisecond more like microseconds so I want to use ticks then the cheat can keep up with the games writing.
Re: lua tics instead of a timer.
I should have stated that the interval is at 1 not 1000 and it still can't keep up with the games check and (re)write speeds.
Re: lua tics instead of a timer.
I think you require a hi-resolution timer for this. The code provided will return the QueryPerformanceCounter value:
Note: works only on 64-bit and version CE 6.5+
Credit: DarkByte
Perhaps these links will provide further insight:
[Link]
[Link]
Code: Select all
if qpccallerRegistered ~= true then
qpccallerRegistered = autoAssemble([[
alloc(qpccaller, 1024)
registersymbol(qpccaller)
qpccaller:
sub rsp,30
lea rcx,[rsp+28]
mov [rcx],0
call QueryPerformanceCounter
mov rax,[rsp+28]
add rsp,30
ret
]],
true)
end
return executeCodeLocal("qpccaller")
Credit: DarkByte
Perhaps these links will provide further insight:
[Link]
[Link]
Who is online
Users browsing this forum: No registered users