I have two separate Lua scripts. One of the scripts is supposed to run on a timer when a byte address value is set to 0, and the other script is supposed to run on a timer when the value is set to 1. I already have the timers and scripts set up correctly, but the issue is I don't know how to set it up so that the scripts will only run when the value is set to specifically 1 or 0.
This is the address that will have a value of either 1 or 0: [pCubic]+4C0
This is the script that should run when the value is 0
Code: Select all
function CETrainer_CETimer1Timer(sender)
sleep(1500)
writeInteger("Cubic.exe+311B0A", 128)
writeInteger("Cubic.exe+311D0D", 128)
sleep(1125)
writeInteger("Cubic.exe+311B0A", 0)
writeInteger("Cubic.exe+311D0D", 0)
end
Code: Select all
function CETrainer_CETimer3Timer(sender)
writeInteger("Cubic.exe+311B0A", 128)
writeInteger("Cubic.exe+311D0D", 128)
sleep(100)
writeInteger("Cubic.exe+311B0A", 0)
writeInteger("Cubic.exe+311D0D", 0)
end