SHOW:
|
|
- or go back to the newest paste.
1 | - | <?xml version="1.0" encoding="utf-8"?> |
1 | + | [ENABLE] |
2 | - | <CheatTable> |
2 | + | |
3 | - | <CheatEntries> |
3 | + | |
4 | - | <CheatEntry> |
4 | + | |
5 | - | <ID>198</ID> |
5 | + | |
6 | - | <Description>"Generate step 2 aob record"</Description> |
6 | + | error("failed to find aob") |
7 | - | <LastState/> |
7 | + | |
8 | - | <VariableType>Auto Assembler Script</VariableType> |
8 | + | |
9 | - | <AssemblerScript>[ENABLE] |
9 | + | |
10 | for i=0, results.Count-1 do | |
11 | -- AA script didn't like parsing [ENALBE] and [DISABLE] so... format to the rescue lol | |
12 | local script = [[ | |
13 | // nop step 2 sub instruction | |
14 | - | return nil, "failed to find aob" |
14 | + | |
15 | define(INJECT, %s) | |
16 | INJECT: | |
17 | db 90 90 | |
18 | registersymbol(INJECT) | |
19 | [%s] | |
20 | INJECT: | |
21 | db 29 D0 | |
22 | unregistersymbol(INJECT) | |
23 | ]] | |
24 | script = string.format(script, "ENABLE", results[i], "DISABLE") | |
25 | ||
26 | mr = al.createMemoryRecord() | |
27 | mr.Type = vtAutoAssembler | |
28 | mr.Script = script | |
29 | mr.Description = "Autogenerated aob script" | |
30 | if memrec then -- if in CE 6.7 then nest generated scripts | |
31 | mr.appendToEntry(memrec) | |
32 | end | |
33 | end | |
34 | results.destroy() | |
35 | ||
36 | -- auto disable this script if in CE 6.7+ | |
37 | if memrec then | |
38 | local timer = createTimer() | |
39 | timer.Interval = 100 | |
40 | timer.OnTimer = function(timer) | |
41 | memrec.Active = false | |
42 | timer.destroy() | |
43 | end | |
44 | end | |
45 | ||
46 | [DISABLE] |