panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Mon Nov 30, 2015 10:02 pm Post subject: |
|
|
This is an AA Script Extension to allow Looping.
The related new commands are RepeatWith and RepeatEnd. Unlike other AA command, it is case sensitive. These 2 commands themselves has no functionality, but just for string capture of SYMBOL, LUA-EXPRESSION, TEMPLATE-BLOCK. Format:
Code: | RepeatWith(SYMBOL,"--Lua-expression-to-be-return-a-table-or-StringList( AOBScan returned object )--")
// template block with SYMBOL as looping variable
RepeatEnd()
|
NOTE:
1.The Looping Symbol should not use outside the template block;
2.The Looping Symbol in a template block is unrelated to other template block (kind of 'i' in a 'for i=..' loops, which is LOCAL Variable);
3.The Lua Expression returned Table(or StringList) should contain Integer or Symbol-String or Hex-String (AOBScan return this contained type);
4.If the returned value is a Table but no content, ie. zero length, error may or may not occurs, the effect is same as removing the text between RepeatWith...Template-Block..RepeatEnd;
5. One Level of Looping Only, nesting loop will not work;
6. In the template block, if the symbol may need to 'touch' other alphabet, for example, use a double quote around the symbol. See the following example plz.
The Lua expression must be contain in 2 double quote, so it itself cannot contain double quote, Lua can use single quote ' for string literal.
To enable the AA Script use the Extension function, but not inference normal AA if need, the script need to use RepeatWith has to be start the very beginning line with "///CUSTOM"
This is example script in the attached CT:
Code: | ///CUSTOM <== this is to use our Custom PreProcessor,
// w/o this it will run as normal AA
[ENABLE]
RepeatWith(symbol,"AOBScan('11 22 FF 77 55 ?? 99')") //??? comments..
symbol+08:
readmem(symbol+05,1)
RepeatEnd()
RepeatWith(symbol," -- from here to next _DOUBLE_QOUTE_ is Lua expression
-- multi-line possible, AA may complaint for syntax error,
-- but it should work, as long as there is no Lua syntax error ;)
(function() -- use this function block to allow local vars
local a = 5
return {1,readBytes('__+10')+3,3,a}
-- RETURN Value must be of type TABLE or StringList,
-- StringList has to manually/externally destroy if need.
end)() -- function block end
") //???
__+1symbol:
db symbol
__+"symbol"0:
db symbol
RepeatEnd()
[DISABLE]
|
To test, attach ce to itself, activate 'setup' script then go to Memory View at '__' (double underscore, it is a registered symbol) then activate 'test' script (same as above).
The actual Lua script to extent AA Script function is in a Table File.
The Table File can be save to disk, then copy & paste to work with your setup. Or it can be load from Table File as in the 'setup' script.
bye~
Description: |
AA Repeat Script Extension |
|
 Download |
Filename: |
01_aaRepeat.CT |
Filesize: |
3.71 KB |
Downloaded: |
864 Time(s) |
_________________
- Retarded. |
|