Hi all
I need lua script to read value from address then speak it once it reach the value I specify.
for example once money in game reach 100 then speak "hundred"
Can anyone please help.
Question: Read value then Speak
-
- Noobzor
- Posts: 14
- Joined: Wed Jul 17, 2019 8:07 pm
- Reputation: 0
-
- Expert Cheater
- Posts: 242
- Joined: Mon Aug 06, 2018 6:00 pm
- Reputation: 208
Re: Question: Read value then Speak
Assuming money is 4 bytes type:
if readInteger(address) == 100 then speak(“hundred”) end
if readInteger(address) == 100 then speak(“hundred”) end
Re: Question: Read value then Speak
Hope that helpsBlackrosemmt wrote: ↑Sun Mar 17, 2024 2:49 pmHi all
I need lua script to read value from address then speak it once it reach the value I specify.
for example once money in game reach 100 then speak "hundred"
Can anyone please help.
Spoiler
Code: Select all
{$lua}
if syntaxcheck then return end
[ENABLE]
runTimer = true
local interval = 5000
local addressToRead = 0xDEADBEEF -- replace with your Money Address
local valToCheck = 100
local function ReadAddress()
local addressResult = readInteger(addressToRead)
if type(addressResult) == 'number' and addressResult >= valToCheck then
speakEnglish(tostring(addressResult),true)
end
end
local timer = createTimer(GetMainForm(true))
timer.Interval = interval
timer.OnTimer = function()
if runTimer ~= true then
timer.Destroy()
timer = nil
end
ReadAddress()
end
[DISABLE]
runTimer = nil
Who is online
Users browsing this forum: No registered users