AmyGrrl Cheater
Reputation: 0
Joined: 15 Dec 2016 Posts: 31
|
Posted: Tue Jun 11, 2024 12:06 am Post subject: How to import lua script file and add it to the cheat table |
|
|
I have an Auto Assemble Script stored as a file. Code1.lua Code2.lua, etc.
I can open the file with io.open("Code1.lua") and I can read the code out.
But I'm not sure how to add it to the Cheat Table so it shows up like Code1 <>script<> so I can just enable/disable it using the checkbox.
Thanks for any help given.
I figured it out. I can now open Code1.lua and use .Script to import it to an empty script entry on the table. So that part is working. I also figured out how to generate a new entry and import everything. I'm good now!
| Code: | local ImportLUA = io.open(TrainerOrigin .. GameVersion.Value .. ".lua")
local CreateLUAEntry = AddressList.createMemoryRecord()
CreateLUAEntry.Description = "Name"
CreateLUAEntry.Type = vtAutoAssembler
CreateLUAEntry.Script = ImportLUA:read("*a") |
|
|