Please proofread my script
Posted: Thu Nov 16, 2017 3:08 pm
The script appears to work as it should but I have just a bit of experience with lua and almost no experience using it in CE.
So if anyone has the time to look it over I'd appreciate it.
The "bpointer" was found using a AA script beforehand.
So if anyone has the time to look it over I'd appreciate it.
The "bpointer" was found using a AA script beforehand.
Code: Select all
[ENABLE]
{$lua}
errorOnLookupFailure(false)
isAlly = "[bpointer]+30"
maxTroops = "[bpointer]+38"
curTroops = "[bpointer]+3C"
function GodMode()
unitAlly = readBytes(isAlly, 1)
unitMaxTroops = readInteger(maxTroops)
unitCurTroops = readInteger(curTroops)
if (unitAlly and unitMaxTroops and unitCurTroops) then
if (unitAlly == 1)
then writeInteger(curTroops, unitMaxTroops)
end
end
end
RepeatTimer = createTimer(nil,true)
RepeatTimer.Interval = 250
RepeatTimer.onTimer = GodMode
{$asm}
[DISABLE]
{$lua}
RepeatTimer.enabled = false
{$asm}