Vortaka Advanced Cheater Reputation: 0
Joined: 18 Nov 2009 Posts: 74
|
Posted: Thu Aug 08, 2019 7:34 am Post subject: Help! Lua script creation instructions |
|
|
Hi all! Ok, first, even if I know a lot about PC's, I'm not really that great with programming and dunno much about LUA scripting...
So...
What I want:
A lua script (hotkey) that speaks a the value number... So, I press a specific hotkey and it tells me the Tales of Symphonia "grade" value... Dark Byte wrote to another person to CreateHotKey in lua and in the hotkeycode have speak(memrec.Description..' is '..memrec.Value)
and that he'll add MRvalue to next version (thanks!)
The thing is, I dunno where to start! I already have some lua coding (for auto attack) and, well, I'd like to know what to do next... Where to place the CreateHotKey, what to write itself... Anyway, if anyone as a minute or two to spare, thanks! My code is just below!
Code: | -- getAutoAttachList().add("BloodstainedRotN-Win64-Shipping.exe")
PROCESS_NAME = 'TOS.exe'
--------
-------- Auto Attach
--------
local autoAttachTimer = nil ---- variable to hold timer object
local autoAttachTimerInterval = 1000 ---- Timer intervals are in milliseconds
local autoAttachTimerTicks = 0 ---- variable to count number of times the timer has run
local autoAttachTimerTickMax = 5000 ---- Set to zero to disable ticks max
local function autoAttachTimer_tick(timer) ---- Timer tick call back
---- Destroy timer if max ticks is reached
if autoAttachTimerTickMax > 0 and autoAttachTimerTicks >= autoAttachTimerTickMax then
timer.destroy()
end
---- Check if process is running
if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then
timer.destroy() ---- Destroy timer
openProcess(PROCESS_NAME) ---- Open the process
end
autoAttachTimerTicks = autoAttachTimerTicks + 1 ---- Increase ticks
end
autoAttachTimer = createTimer(getMainForm()) ---- Create timer with the main form as it's parent
autoAttachTimer.Interval = autoAttachTimerInterval ---- Set timer interval
autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back |
Vortaka
|
|