Advertisement
num6456

Untitled

Apr 12th, 2018
1,684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 105.20 KB | None | 0 0
  1. --This lua script gets loaded when Cheat Engine loads
  2. --You can use this to define some often used functions and libraries you'd like to use
  3.  
  4. require("defines")
  5.  
  6.  
  7.  
  8. --[[
  9.  
  10. List of CE specific functions and variables:
  11.  
  12. TrainerOrigin : A variable that contains the path of the trainer that launched cheat engine (Only set when launched as a trainer)
  13. getCEVersion(): Returns a floating point value specifying the version of cheat engine
  14.  
  15.  
  16. activateProtection(): Prevents basic memory scanners from opening the cheat engine process
  17. fullAccess(address,size): Changes the protection of a block of memory to writable and executable
  18.  
  19. loadTable(filename, merge OPTIONAL): Loads a .ct or .cetrainer. If merge is provided and set to true it will not clear the old table
  20. saveTable(filename, protect OPTIONAL): Saves the current table. If protect is provided and set to true and the filename has the .CETRAINER extension, it will protect it from reading normally
  21.  
  22. note: addresses can be strings, they will get interpreted by ce's symbolhandler
  23.  
  24. readBytes(address,bytecount, ReturnAsTable ) : returns the bytes at the given address. If ReturnAsTable is true it will return a table instead of multiple bytes
  25. Reads the bytes at the given address and returns a table containing the read out bytes
  26.  
  27. writeBytes(address, x,x,x,x,...) : Write the given bytes to the given address from a table
  28. writeBytes(address, table) : Write the given bytes to the given address from a table
  29.  
  30.  
  31. readInteger(address) : Reads an integer from the specified address
  32. readQword(address): Reads a 64-bit integer from the specified address
  33. readPointer(address): In a 64-bit target this equals readQword, in a 32-bit target readInteger()
  34. readFloat(address) : Reads a single precision floating point value from the specified address
  35. readDouble(address) : Reads a double precision floating point value from the specified address
  36. readString(address, maxlength, widechar OPTIONAL) : Reads a string till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting
  37. writeInteger(address,value) : Writes an integer to the specified address. Returns true on success
  38. writeQword(address, value): Write a 64-bit integer to the specified address
  39. writeFloat(address,value) : Writes a single precision floating point to the specified address. Returns true on success
  40. writeDouble(address,value) : Writes a double precision floating point to the specified address. Returns true on success
  41. writeString(address,text, widechar OPTIONAL) : Write a string to the specified address. Returns true on success
  42.  
  43. readBytesLocal(address,bytecount, ReturnAsTable) : See readBytes but then it's for Cheat engine's memory
  44. readIntegerLocal(address) : Reads an integer from the specified address in CE's memory
  45. readQwordLocal(address) : Reads a 64-bit integer from the specified address in CE's memory
  46. readPointerLocal(address) : ReadQwordLocal/ReadIntegerLocal depending on the cheat engine build
  47. readFloatLocal(address) : Reads a single precision floating point value from the specified address in CE's memory
  48. readDoubleLocal(address) : Reads a double precision floating point value from the specified address in CE's memory
  49. readStringLocal(address, maxlength, widechar OPTIONAL)
  50. writeIntegerLocal(address,value) : Writes an integer to the specified address in CE's memory. Returns true on success
  51. writeQwordLocal(address,value) : Writes a 64-bit integer to the specified address in CE's memory. Returns true on success
  52. writeFloatLocal(address,value) : Writes a single precision floating point to the specified address in CE's memory. Returns true on success
  53. writeDoubleLocal(address,value) : Writes a double precision floating point to the specified address in CE's memory. Returns true on success
  54. writeStringLocal(address,string, widechar OPTIONAL)
  55. writeBytesLocal(address, x,x,x,x,...) : See writeBytes but then it's for Cheat Engine's memory
  56. writeBytesLocal(address, table, , count) : See writeBytes but then it's for Cheat Engine's memory
  57.  
  58.  
  59. wordToByteTable(number): {} - Converts a word to a bytetable
  60. dwordToByteTable(number): {} - Converts a dword to a bytetable
  61. qwordToByteTable(number): {} - Converts a qword to a bytetable
  62. floatToByteTable(number): {} - Converts a float to a bytetable
  63. doubleToByteTable(number): {} - Converts a double to a bytetable
  64. stringToByteTable(string): {} - Converts a string to a bytetable
  65. wideStringToByteTable(string): {} - Converts a string to a widestring and converts that to a bytetable
  66.  
  67. byteTableToWord(table): number - Converts a bytetable to a word
  68. byteTableToDword(table): number - Converts a bytetable to a dword
  69. byteTableToQword(table): number - Converts a bytetable to a qword
  70. byteTableToFloat(table): number - Converts a bytetable to a float
  71. byteTableToDouble(table): number - Converts a bytetable to a double
  72. byteTableToString(table): string - Converts a bytetable to a string
  73. byteTableToWideString(table): string - Converts a bytetable to a widestring and convets that to a string
  74.  
  75. bOr(int1, int2) : Binary Or
  76. bXor(int1, int2) : Binary Xor
  77. bAnd(int1, int2) : Binary And
  78. bShl(int, int2) : Binary shift left
  79. bShr(int, int2) : Binary shift right
  80. bNot(int) : Binary not
  81.  
  82.  
  83. writeRegionToFile(filename, sourceaddress,size) : Writes the given region to a file. Returns the number of bytes written
  84. readRegionFromFile(filename, destinationaddress)
  85.  
  86. resetLuaState(): This will create a new lua state that will be used. (Does not destroy the old one, so memory leak)
  87.  
  88. createRef(...): integer - Returns an integer reference that you can use with getRef. Useful for objects that can only store integers and need to reference lua objects. (Component.Tag...)
  89. getRef(integer): ... - Returns whatever the reference points out
  90. destroyRef(integer) - Removes the reference
  91.  
  92. reloadSettingsFromRegistry(): This will cause cheat engine to reload the settings from the registry and apply them
  93.  
  94.  
  95. ansiToUtf8(string): Converts a string in Ansi encoding to UTF8
  96. utf8ToAnsi(string): Converts a string in UTF8 encoding to Ansi
  97. Note: GUI components mainly show in UTF8, some other functions use Ansi, try to find out which ones...
  98.  
  99. enumModules(processid OPTIONAL):
  100. Returns a table containing information about each module in the current process, or the specified processid
  101. Each entry is a table with fields
  102. Name : String containing the modulename Address: Integer representing the address the module is loaded
  103. Is64Bit: Boolean set to true if it's a 64-bit module
  104. PathToFile: String to the location this module is loaded
  105.  
  106.  
  107. getAddress(string, local OPTIONAL): returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process
  108. getSymbolInfo(symbolname): Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)
  109. getModuleSize(modulename): Returns the size of a given module (Use getAddress to get the base address)
  110. reinitializeSymbolhandler(waittilldone: BOOLEAN OPTIONAL, default=TRUE): reinitializes the symbolhandler. E.g when new modules have been loaded
  111. reinitializeDotNetSymbolhandler(modulename OPTIONAL): Reinitializes only the DotNet part of the symbol list. (E.g After an ILCode has been JITed) (6.4+)
  112.  
  113. errorOnLookupFailure(state): If set to true (default) address lookups in stringform will raise an error if it can not be looked up. This includes symbolnames that are not defined and pointers that are bad. If set to false it will return 0 in those cases
  114. (Useful for pointers that don't work 100% of the time)
  115. 6.4+:Returns the original state
  116.  
  117. generateAPIHookScript(address, addresstojumpto, addresstogetnewcalladdress OPT) : Generates an auto assembler script which will hook the given address when executed
  118. autoAssemble(text, targetself OPTIONAL) : runs the auto assembler with the given text. Returns true on success (if targetself is set it will assemble into Cheat Engine itself)
  119.  
  120. registerAutoAssemblerCommand(command, function(parameters, syntaxcheckonly)): Registers an auto assembler command to call the specified function. The command will be replaced by the string this function returns when executed. The function can be called twice. Once for syntax check and symbol lookup(1), and the second time for actual execution by the assembler(2) if it has not been removed in phase1.
  121. Note: The callback function can return multiple values
  122. Nil, <String>: Will raise an error with the given string
  123. MultilineString: Replaces the line in the script with the given strings.
  124.  
  125.  
  126. If the function returns nil, and as secondary parameter a string, this will make the auto assembler fail with that error
  127.  
  128. unregisterAutoAssemblerCommand(command)
  129.  
  130.  
  131. registerSymbolLookupCallback(function(string):integer, location): ID 6.4+
  132. Registers a function to be called when a a symbol is parsed
  133. Location determines at what part of the symbol lookup the function is called
  134. slStart: The very start of a symbol lookup. Before tokenization
  135. slNotInt: Called when it has been determined it's not a hexadecimal only string. Before tokenization
  136. --The following locations can be called multiple times for one string as they are called for each token and appended token
  137. slNotModule: Called when it has been determined the current token is not a modulename
  138. slNotUserdefinedSymbol: Called when it has been determined it's not a userdefined symbol
  139. slNotSymbol: Called when it has been determined it's not a symbol in the symbollist
  140. slFailure: Called when it has no clue what the given string is
  141.  
  142. Note: slNotSymbol and slFailure are similar, but failure comes only if there's no token after the current token that can be concatenated. Else slNotSymbol will loop several times till all tokens make up the full string
  143.  
  144.  
  145. Return an Integer with the corresponding address if you found it. Nil or 0 if you didn't.
  146.  
  147. unregisterSymbolLookupCallback(ID): Removes the callback
  148.  
  149.  
  150. registerAddressLookupCallback(function(integer):string): ID
  151. Registers a function to be called when the name of an address is requested
  152.  
  153. unregisterAddressLookupCallback(ID): Removes the callback
  154.  
  155.  
  156. registerStructureDissectOverride(function(structure, baseaddress): table):
  157. same as onAutoGuess, but is called by the structure dissect window when the user chooses to let cheat engine guess the structure for him.
  158. Use the structure object to fill it in
  159. Return true if you have filled it in, or false or nil if you did not
  160.  
  161. Tip: Use inputQuery to ask the user the size if your function doesn't do that automatically
  162.  
  163.  
  164. unregisterStructureDissectOverride(ID)
  165.  
  166. registerStructureNameLookup(function(address): name, address OPTIONAL):
  167. Registers a function to be called when dissect data asks the user for the name of a new structure define. If you have code that can look up the name of a structure, and perhaps also the real starting point, you can use this to improve the data dissection.
  168.  
  169. unregisterStructureNameLookup(ID)
  170.  
  171. registerAssembler(function(address, instruction):bytetable)
  172. Registers a function to be called when the single line assembler is invoked to convert an instruction to a list of bytes
  173. Return a bytetable with the specific bytes, or nil if you wish to let another function, or the original x86 assembler to assemble it
  174.  
  175. unregisterAssembler(ID): Unregisters the registered assembler
  176.  
  177. registerAutoAssemblerPrologue(function(script, syntaxcheck))
  178. Registers a function to be called when the auto assembler is about to parse an auto assembler script. The script you get is after the [ENABLE] and [DISABLE] tags have been used to strip the script to the according one, but before comment stripping and trimming has occured
  179.  
  180. script is a Strings object which when changed has direct effect to the script
  181.  
  182. unregisterAutoAssemblerPrologue(ID)
  183.  
  184.  
  185. showMessage(text) : shows a messagebox with the given text
  186. inputQuery(caption, prompt, initialstring): Shows a dialog where the user can input a string. This function returns the given string, or nil on cancel CE6.4+
  187. messageDialog(text, type, buttons...) : pops up a messagebox with a specific icon/sound with the specified buttons (mbok, mbyes, ....)
  188. sleep(milliseconds): pauses for the number of specified milliseconds (1000= 1 sec...)
  189.  
  190. getProcesslist(Strings): Fills a Strings inherited object with the processlist of the system. Format: %x-pidname
  191. getThreadlist(List): fills a List object with the threadlist of the currently opened process. Format: %x
  192.  
  193.  
  194. function onOpenProcess(processid):
  195. If this function is defined it will be called whenever cheat engine opens a process.
  196. Note: The the same process might be opened multiple times in a row internally
  197. Note 2: This function is called before attachment is fully done. You can call reinitializeSymbolhandler() to force the open to complete, but it will slow down process opens. Alternatively, you could launch a timer which will run when the opening has finished
  198.  
  199.  
  200. getOpenedProcessID() : Returns the currently opened process. If none is open, returns 0
  201. getProcessIDFromProcessName(name) : returns a processid
  202. openProcess(processid) : causes cheat engine to open the given processid
  203. openProcess(processname): causes cheat engine to find and open the given process
  204. pause() : pauses the current opened process
  205. unpause(): resumes the current opened process
  206.  
  207.  
  208. getPixel(x,y) : returns the rgb value of the pixel at the specific screen coordinate
  209. getMousePos: returns the x,y coordinates of the mouse
  210. setMousePos(x,y): sets the mouse position
  211.  
  212. isKeyPressed(key) : returns true if the specified key is currently pressed
  213. keyDown(key) : causes the key to go into down state
  214. keyUp(key) :causes the key to go up
  215. doKeyPress(key) : simmulates a key press
  216.  
  217. shortCutToText(shortcut): Returns the textual representation of the given shortut value (integer) (6.4+)
  218. textToShortCut(shortcutstring): Returns an shortcut integer that the given string represents. (6.4+)
  219.  
  220. convertKeyComboToString(key1,...): Returns a string representation of the given keys like the hotkey handler does
  221. convertKeyComboToString({key1,...}): ^
  222.  
  223.  
  224. outputDebugString(text): Outputs a message using the windows OutputDebugString message. You can use tools like dbgview to read this. Useful for testing situations where the gui freezes
  225.  
  226. shellExecute(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL): Executes a given command
  227.  
  228. getTickCount() : Returns the current tickcount since windows was started. Each tick is one millisecond
  229. processMessages() : Lets the main eventhandler process the new messages (allows for new button clicks)
  230. inMainThread(): Returns true if the current code is running inside the main thread (6.4+)
  231. integerToUserData(int): Converts a given integer to a userdata variable
  232. userDataToInteger(UserDataVar): Converts a given userdata variable to an integer
  233.  
  234. synchronize(function(...), ...): Calls the given function from the main thread. Returns the return value of the given function
  235. checkSynchronize(): Calls this from an infinite loop in the main thread when using threading and synchronize calls. This will execute any queued synchronize calls
  236.  
  237. writeToClipboard(text): Writes the given text to the clipboard
  238. readFromClipboard(): Reads the text from the clipboard
  239.  
  240. speedhack_setSpeed(speed)
  241. injectDLL(filename): Injects a dll, and returns true on success
  242.  
  243. loadPlugin(dllnameorpath): Loads the given plugin. Returns nil on failure. On success returns a value of 0 or greater
  244.  
  245.  
  246.  
  247. registerCustomTypeLua(typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)
  248. Registers a Custom type based on lua functions
  249. The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result
  250. The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write
  251.  
  252.  
  253. registerCustomTypeAutoAssembler(script)
  254. Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine"
  255.  
  256. onAutoGuess(function) :
  257. Registers an function to be called whenever autoguess is used to predict a variable type
  258. function override (address, ceguess): Return the variable type you want it to be. If no change, just return ceguess
  259.  
  260.  
  261.  
  262.  
  263. closeCE() : just closes ce
  264. hideAllCEWindows() : makes all normal ce windows invisible (e.g trainer table)
  265. unhideMainCEwindow() : shows the main cheat engine window
  266.  
  267. getAutoAttachList(): returns the AutoAttach StringList object. It can be controlled with the stringlist_ routines (it's not recommended to destroy this list object)
  268.  
  269.  
  270. AOBScan(x,x,x,x,...):
  271. scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done
  272. Bytevalue of higher than 255 or anything not an integer will be seen as a wildcard
  273. AOBScan(aobstring): see above but here you just input one string
  274.  
  275.  
  276.  
  277.  
  278. Regarding eventhandlers. You can initialize them using both a string of a functionname or the function itself.
  279. If initialized using a function itself it won't be able to get saved in the table
  280.  
  281. allocateSharedMemory(name, size):
  282. Creates a shared memory object of the given size if it doesn't exist yet. If size is not given and there is no shared region with this name then the default size of 4096 is used
  283. It then maps this shared memory block into the currently targeted process. It returns the address of mapped region in the target process
  284.  
  285.  
  286. getForegroundProcess() : Returns the processID of the process that is currently on top
  287.  
  288. cheatEngineIs64Bit(): Returns true if CE is 64-bit, false if 32-bit
  289. targetIs64Bit(): Returns true if the target process is 64-bit, false if 32-bit
  290.  
  291.  
  292. getCheatEngineDir(): Returns the folder Cheat Engine is located at
  293.  
  294. disassemble(address): Disassembles the given address and returns a string in the format of "address - bytes - opcode : extra"
  295. splitDisassembledString(disassembledstring): Returns 4 strings. The address, bytes, opcode and extra field
  296.  
  297. getInstructionSize(address): Returns the size of an instruction (basically it disassembles the instruction and returns the number of bytes for you)
  298. getPreviousOpcode(address): Returns the address of the previous opcode (this is just an estimated guess)
  299.  
  300.  
  301. beep() : Plays the fabulous beep/ping sound!
  302. playSound(stream, waittilldone OPTIONAL): Plays the given memorystream containing a .WAV formatted memory object. If waittilldone is true the script will stop executing till the sound has stopped
  303. playSound(tablefile, waittilldone OPTIONAL) : Takes the memorystream from the tablefile and plays it.
  304. There are two tablefiles predeclared inside cheat engine "Activate" and "Deactivate" . You are free to use or override them
  305.  
  306. getUserRegistryEnvironmentVariable(name): string - Returns the environment variable stored in the user registry environment
  307. setUserRegistryEnvironmentVariable(name, string) - Sets the environment variable stored in the user registry environment
  308. broadcastEnvironmentUpdate() : Call this when you've changed the environment variables in the registry. This will cause at least the shell to update so you don't have to reboot. (It's always recommended to reboot though)
  309.  
  310. stringToMD5String(string): Returns an md5 hash string from the provided string
  311.  
  312.  
  313. getFormCount() : Returns the total number of forms assigned to the main CE application
  314. getForm(index): Returns the form at the specific index
  315.  
  316. registerFormAddNotification(function(form)): Registers a function to be called when a form is attached to ce's form list. This is useful for extentions that add new functionality to certain existing forms. It returns an object you can use with unregisterFormAddNotification
  317. unregisterFormAddNotification(Object)
  318.  
  319.  
  320. getSettingsForm(): Returns the main settings form
  321. getMemoryViewForm() : Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from. There can be multiple memory views, but this will only find the original/base
  322. getMainForm() : Returns the main form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from
  323. getLuaEngine() : Returns the lua engine form object (Creates it if needed)
  324. getApplication() : Returns the application object. (the titlebar)
  325. getAddressList() : Returns the cheat table addresslist object
  326. getFreezeTimer() : Returns the freeze timer object
  327. getUpdateTimer() : Returns the update timer object
  328.  
  329. setGlobalKeyPollInterval(integer): Sets the global keypoll interval. The interval determines the speed of how often CE checks if a key has been pressed or not. Lower is more accurate, but eats more cpu power
  330. setGlobalDelayBetweenHotkeyActivation(integer): Sets the minimum delay between the activation of the same hotey in milliseconds. Affects all hotkeys that do not set their own minimum delay
  331.  
  332.  
  333.  
  334. undefined property functions. Not all properties of all classes have been explicitly exposed to lua, but if you know the name of a property of a specific class you can still access them (assuming they are declared as published in the pascal class declaration)
  335. getPropertyList(class) : Returns a stringlist object containing all the published properties of the specified class (free the list when done) (Note, not all classed with properties have 'published' properties. E.g: stringlist)
  336. setProperty(class, propertyname, propertyvalue) : Sets the value of a published property of a class (Won't work for method properties)
  337. getProperty(class, propertyname) : Gets the value of a published property of a class (Won't work for method properties)
  338. setMethodProperty(class, propertyname, function): Sets the method property to the specific function
  339. getMethodProperty(Class, propertyname): Returns a function you can use to call the original function
  340.  
  341.  
  342.  
  343. registerSymbol(symbolname, address, OPTIONAL donotsave): Registers a userdefined symbol. If donotsave is true this symbol will not get saved when the table is saved
  344. unregisterSymbol(symbolname)
  345.  
  346. getNameFromAddress(address): Returns the given address as a string. Registered symbolname, modulename+offset, or just a hexadecimal string depending on what address
  347. inModule(address) : returns true if the given address is inside a module
  348. inSystemModule(address) : returns true if the given address is inside a system module
  349. getCommonModuleList: Returns the commonModuleList stringlist. (Do not free this one)
  350.  
  351.  
  352.  
  353. AOBScan("aobstring", protectionflags OPTIONAL, alignmenttype OPTIONAL, alignmentparam HALFOPTIONAL):
  354. protectionflags is a string.
  355. X=Executable W=Writable memory C=Copy On Write. Add a + to indicate that flag MUST be set and a - to indicate that that flag MUST NOT be set. (* sets it to don't care)
  356. Examples:
  357. +W-C = Writable memory exluding copy on write and doesn't care about the Executable flag
  358. +X-C-W = Find readonly executable memory
  359. +W = Finds all writable memory and don't care about copy on write or execute
  360. "" = Find everything (is the same as "*X*C*W" )
  361.  
  362.  
  363. alignmenttype is an integer:
  364. 0=No alignment check
  365. 1=Address must be dividable by alignmentparam
  366. 2=Address must end with alignmentparam
  367. alignmentparam is a string which either holds the value the addresses must be dividable by or what the last digits of the address must be
  368.  
  369.  
  370.  
  371.  
  372. -debugging
  373.  
  374. debug variables
  375. EFLAGS
  376. 32-bit: EAX, EBX, ECX, EDX, EDI, ESP, EBP, ESP, EIP
  377. 64-bit: RAX, EBX, RBX, RDX, RDI, RSP, RBP, RSP, RIP, R8, R9, R10, R11, R12, R13, R14, R15 : The value of the register
  378.  
  379. Debug related routines:
  380. function debugger_onBreakpoint():
  381. When a breaking breakpoint hits (that includes single stepping) and the lua function debugger_onBreakpoint() is defined it will be called and the global variables EAX, EBX, .... will be filled in
  382. Return 0 if you want the userinterface to be updated and anything else if not (e.g: You continued from the breakpoint in your script)
  383.  
  384.  
  385.  
  386. createProcess(path, parameters OPTIONAL, debug OPTIONAL, breakonentrypoint OPTIONAL) : Creates a process. If debug is true it will be created using the windows debugger and if breakonentry is true it will cause a breakpoint to occur on entrypoint
  387.  
  388. debugProcess(interface OPT): starts the debugger for the currently opened process (won't ask the user) Optional interface: 0=default, 1=windows debug, 2=VEHDebug, 3=Kerneldebug
  389.  
  390. debug_isDebugging(): Returns true if the debugger has been started
  391. debug_canBreak(): Returns true if there is a possibility the target can stop in a breakpoint. 6.4+
  392. debug_getBreakpointList(): Returns a lua table containing all the breakpoint addresses
  393.  
  394. debug_setBreakpoint(address, size OPTIONAL, trigger OPTIONAL) : sets a breakpoint of a specific size at the given address. if trigger is bptExecute then size is ignored. If trigger is ignored then it will be of type bptExecute, which obviously also ignores the size then as well
  395. debug_removeBreakpoint(address) : if the given address is a part of a breakpoint it will be removed
  396. debug_continueFromBreakpoint(continueMethod) : if the debugger is currently waiting to continue you can continue with this. Valid parameters are :co_run (just continue), co_stepinto(when on top of a call, follow it), co_stepover (when on top of a call run till after the call)
  397. debug_getXMMPointer(xmmregnr) :
  398. Returns the address of the specified xmm register of the thread that is currently broken
  399. This is a LOCAL Cheat Engine address. Use Local memory access functions to read and modify
  400. xmmregnr can be 0 to 15 (0 to 7 on 32-bit)
  401.  
  402.  
  403. The following routines describe last branch recording. These functions only work when kernelmode debugging is used and using windows XP (vista and later work less effective or not at all because the operating system interferes. Might also be intel specific. A dbvm upgrade in the future might make this work for windows vista and later)
  404. debug_setLastBranchRecording(boolean): When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens
  405. debug_getMaxLastBranchRecord() : Returns the maximum branch record your cpu can store (-1 if none)
  406. debug_getLastBranchRecord(index): Returns the value of the Last Branch Record at the given index (when handling a breakpoint)
  407.  
  408.  
  409. function debugger_onModuleLoad(modulename, baseaddress) :
  410. this routine is called when a module is loaded. Only works for the windows debugger
  411. return 1 if you want to cause the debugger to break
  412.  
  413.  
  414. Changing registers:
  415. When the debugger is waiting to continue you can change the register variables. When you continue those register values will be set in the thread's context
  416.  
  417.  
  418. detachIfPossible() : Detaches the debugger from the target process (if it was attached)
  419.  
  420. getComment(address) : Gets the userdefined comment at the specified address
  421. setComment(address, text) : Sets a userdefined comment at the specifried address. %s is used to display the autoguess value if there is one
  422. getHeader(address) : Gets the userdefined header at the specified address
  423. setHeader(address) : Sets the userdefined header at the specified address
  424.  
  425.  
  426.  
  427. class helper functions
  428. inheritsFromObject(object): Returns true if given any class
  429. inheritsFromComponent(object): Returns true if the given object inherits from the Component class
  430. inheritsFromControl(object): Returns true if the given object inherits from the Control class
  431. inheritsFromWinControl(object): Returns true if the given object inherits from the WinControl class
  432.  
  433. createClass(classname): Creates an object of the specified class (Assuming it's a registered class and has a default constructor)
  434.  
  435.  
  436. Class definitions
  437. Object class: (Inheritance: )
  438. Properties:
  439. ClassName: String - The name of class (Read only)
  440. Methods:
  441. getClassName(): Returns the classname
  442. destroy(): Destroys the object
  443.  
  444.  
  445.  
  446. Component Class: (Inheritance: Object)
  447. properties
  448. ComponentCount: Integer - Number of child components . Readonly
  449. Component[int]: Component - Array containing the child components. Starts at 0. Readonly
  450. ComponentByName[string]: Component - Returns a component based on the name. Readonly
  451. Name: string - The name of the component
  452. Tag: integer - Free to use storage space. (Usefull for id's)
  453. Owner: Component - Returns the owner of this object. Nil if it has none
  454.  
  455. methods
  456. getComponentCount() : Returns the number of components attached to his component
  457. getComponent(index) : Returns the specific component
  458. findComponentByName(name) : Returns the component with this name
  459. getName() : Return the name
  460. setName(newname) : Changes the name
  461. getTag() : Sets an integer value. You can use this for ID's
  462. setTag(tagvalue) : Get the tag value
  463. getOwner() : Returns the owner of this component
  464.  
  465.  
  466.  
  467. Control Class: (Inheritance: Component->Object)
  468. properties:
  469. Caption: string - The text of a control
  470. Top : integer - The x position
  471. Left : integer - The y position
  472. Width : integer - The width of the control
  473. Height : integer - The height of the control
  474. ClientWidth: integer - The usable width inside the control (minus the borders)
  475. ClientHeight: integer - The usable height the control (minus the borders)
  476. Align: AlignmentOption - Alignment of the control
  477. Enabled: boolean - Determines if the object is usable or greyed out
  478. Visible: boolean - Determines if the object is visible or not
  479. Color: ColorDefinition/RGBInteger - The color of the object. Does not affect the caption
  480. Parent: WinControl - The owner of this control
  481. PopupMenu: PopupMenu - The popup menu that shows when rightclicking the control
  482. Font: Font - The font class associated with the control
  483. OnClick: function - The function to call when a button is pressed
  484.  
  485.  
  486. methods:
  487. getLeft()
  488. setLeft(integer)
  489. getTop()
  490. setTop(integer)
  491. getWidth()
  492. setWidth(integer)
  493. getHeight()
  494. setHeight()
  495. setCaption(caption) : sets the text on a control. All the gui objects fall in this category
  496. getCaption() : Returns the text of the control
  497. setPosition(x,y): sets the x and y position of the object base don the top left position (relative to the client array of the owner object)
  498. getPosition(): returns the x and y position of the object (relative to the client array of the owner object)
  499. setSize(width,height) : Sets the width and height of the control
  500. getSize() : Gets the size of the control
  501. setAlign(alignmentoption): sets the alignment of the control
  502. getAlign(alignmentoption): gets the alignment of the control
  503. getEnabled() : gets the enabled state of the control
  504. setEnabled(boolean) : Sets the enabled state of the control
  505. getVisible() : gets the visible state of the control
  506. setVisible(boolean) : sets the visible state of the control
  507. getColor() : gets the color
  508. setColor(rgb) : Sets the color
  509. getParent() : Returns nil or an object that inherits from the Wincontrol class
  510. setParent(wincontrol) : Sets the parent for this control
  511. getPopupMenu()
  512. setPopupMenu()
  513. getFont(): Returns the Font object of this object
  514. setFont(): Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts)
  515. repaint(): Invalidates the graphical area of the control and forces and update
  516. update() : Only updates the invalidated areas
  517. setOnClick(functionnameorstring) : Sets the onclick routine
  518. getOnClick(): Gets the onclick function
  519. doClick(): Executes the current function under onClick
  520.  
  521. GraphicsObject : (GraphicsObject->Object)
  522.  
  523.  
  524.  
  525. Region Class : (Region->GraphicsObject->Object)
  526. createRegion(): Created an empty region
  527.  
  528. properties
  529. -
  530. methods
  531. addRectangle(x1, y1, x2, y2): Adds a rectangle to the region
  532. addPolygon(tablewithcoordinates): Adds an array of 2D locations. (example : {{0,0},{100,100}, {0,100}} for a triangle )
  533.  
  534.  
  535.  
  536. WinControl Class: (Inheritance: Control->Component->Object)
  537. properties
  538. DoubleBuffered: boolean - Graphical updates will go to a offscreen bitmap which will then be shown on the screen instead of directly to the screen. May reduce flickering
  539. ControlCount : integer - The number of child controls of this wincontrol
  540. Control[] : Control - Array to access a child control
  541. OnEnter : function - Function to be called when the WinControl gains focus
  542. OnExit : function - Function to be called when the WinControl loses focus
  543.  
  544. methods
  545. getControlCount() Returns the number of Controls attached to this class
  546. getControl(index) : Returns a WinControl class object
  547. getControlAtPos(x,y): Gets the control at the given x,y position relative to the wincontrol's position
  548. canFocus(): returns true if the object can be focused
  549. focused(): returns boolean true when focused
  550. setFocus(): tries to set keyboard focus the object
  551. setShape(Region): Sets the region object as the new shape for this wincontrol
  552. setShape(Bitmap):
  553. setOnEnter(function) : Sets an onEnter event. (Triggered on focus enter)
  554. getOnEnter()
  555. setOnExit(function) : Sets an onExit event. (Triggered on lost focus)
  556. getOnExit()
  557.  
  558.  
  559. MenuItem class(Inheritance: Component->Object)
  560. createMenuItem(ownermenu) : Creates a menu item that gets added to the owner menu
  561.  
  562. properties
  563. Caption : String - Text of the menu item
  564. Shortcut : string - Shortcut in textform to trigger the menuitem
  565. Count : integer - Number of children attached to this menuitem
  566. Menu: Menu - The menu this item resides in
  567. Parent: MenuItem - The menuitem this item hangs under
  568. Item[] : Array to access each child menuitem
  569. [] : Item[]
  570. OnClick: Function to call when the menu item is activated
  571.  
  572. methods
  573. getCaption() : Gets the caption of the menu item
  574. setCaption(caption) : Sets the caption of the menu item
  575. getShortcut(): Returns the shortcut for this menu item
  576. setShortcut(shortcut): Sets the shortcut for this menuitem. A shortcut is a string in the form of ("ctrl+x")
  577. getCount()
  578. getItem(index) : Returns the menuitem object at the given index
  579. add(menuitem) : Adds a menuItem as a submenu item
  580. insert(index, menuitem): Adds a menuItem as a submenu item at the given index
  581. delete(index)
  582. setOnClick(function) : Sets an onClick event
  583. getOnClick()
  584. doClick(): Executes the onClick method if one is assigned
  585.  
  586.  
  587.  
  588. Menu Class: (Inheritance: Component->Object)
  589. properties
  590. Items : MenuItem - The base MenuItem class of this menu (readonly)
  591. methods
  592. getItems() : Returns the main MenuItem of this Menu
  593.  
  594. MainMenu Class: (Inheritance: Menu->Component->Object)
  595. createMainMenu(form)
  596. The mainmenu is the menu at the top of a window
  597.  
  598. PopupMenu Class: (Inheritance: Menu->Component->Object)
  599. createPopupMenu(owner)
  600. The popup menu is the menu that pops up when showing the (rightclick) context of an control
  601.  
  602.  
  603. Strings Class: (Inheritance : Object) (Mostly an abstract class)
  604. properties
  605. Text : String - All the strings in one string
  606. Count: Integer - The number of strings in this list
  607. String[]: String - Array to access one specific string in the list
  608. [] = String[]
  609.  
  610. methods
  611. clear() : Deletes all strings in the list
  612. add(string) : adds a string to the list
  613. delete(index) : Deletes a string from the list
  614. getText() : Returns all the strings as one big string
  615. setText() : Sets the strings of the given strings object to the given text (can be multiline)
  616. indexOf(string): Returns the index of the specified string. Returns -1 if not found
  617. insert(index, string): Inserts a string at a specific spot moving the items after it
  618.  
  619. getCount(): Returns the number is strings in the list
  620. remove(string); Removes the given string from the list
  621. loadFromFile(filename) : Load the strings from a textfile
  622. saveToFile(filename) : Save the strings to a textfile
  623.  
  624. getString(index) : gets the string at the given index
  625. setString(index, string) : Replaces the string at the given index
  626.  
  627.  
  628.  
  629. Stringlist Class: (Inheritance : Strings->Object)
  630. createStringlist() : Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)
  631.  
  632. properties
  633. Duplicates : DuplicatesType - Determines how duplicates should be handled
  634. Sorted : boolean - Determines if the list should be sorted
  635. CaseSensitive: boolean - Determines if the list is case sensitive or not.
  636.  
  637. methods
  638. getDuplicates() : returns the duplicates property
  639. setDuplicates(Duplicates) : Sets the duplicates property (dupIgnore, dupAccept, dupError)
  640. getSorted() : returns true if the list has the sorted property
  641. setSorted(boolean) : Sets the sorted property
  642. getCaseSensitive() : Returns true if the case sensitive property is set
  643. setCaseSensitive(boolean): Sets the case sensitive property
  644.  
  645. Application Class: (Inheritance: CustomApplication->Component->Object)
  646. properties
  647. Title: The title of cheat engine in the bar
  648.  
  649. methods
  650. bringToFront(): Shows the cheat engine app
  651.  
  652.  
  653. Form Class: (Inheritance: ScrollingWinControl->CustomControl->WinControl->Control->Component->Object)
  654. properties
  655. AllowDropFiles: boolean - Allows files to be dragged into the form
  656. ModalResult: integer - The current ModalResult value of the form. Note: When this value gets set the modal form will close
  657. Menu: MainMenu - The main menu of the form
  658.  
  659. OnClose: function(sender) - The function to call when the form gets closed
  660. OnDropFiles: function(sender, {filenames}) - Called when files are dragged on top of the form. Filenames is an arraytable with the files
  661.  
  662.  
  663. methods
  664. centerScreen(); : Places the form at the center of the screen
  665. hide() : Hide the form
  666. show() : show the form
  667. close(): Closes the form. Without an onClose this will be the same as hide
  668. bringToFront(): Brings the form to the foreground
  669. showModal() : show the form and wait for it to close and get the close result
  670. isForegroundWindow(): returns true if the specified form has focus
  671. setOnClose(function) : function (sender) : Return a CloseAction to determine how to close the window
  672. getOnClose() : Returns the function
  673. getMenu() : Returns the mainmenu object of this form
  674. setMenu(mainmenu)
  675.  
  676. setBorderStyle( borderstyle): Sets the borderstyle of the window
  677. getBorderStyle()
  678.  
  679. printToRasterImage(rasterimage): Draws the contents of the form to a rasterimage class object
  680. dragNow(): Call this on mousedown on any object if you wish that the mousemove will drag the whole form arround. Useful for borderless windows (Dragging will stop when the mouse button is released)
  681.  
  682.  
  683. CEForm Class: (Inheritance: Form->ScrollingWinControl->CustomControl->WinControl->Control->Component->Object)
  684. createForm(visible OPT): creates a CEForm class object(window) and returns the pointer for it. Visible is default true but can be changed
  685. createFormFromFile(filename): Returns the generated CEform
  686.  
  687. properties
  688. DoNotSaveInTable: boolean - Set this if you do not wish to save the forms in the table
  689. methods
  690. saveToFile(filename): Saves a userdefined form
  691. getDoNotSaveInTable(): Returns the DoNotSaveInTable property
  692. setDoNotSaveInTable(boolean): Sets the DoNotSaveInTable property
  693.  
  694.  
  695. GraphicControl Class: (Inheritance: Control->Component->Object)
  696. properties
  697. Canvas: Canvas - The canvas for rendering this control
  698.  
  699. methods
  700. getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
  701.  
  702.  
  703. PaintBox class: (Inheritance: GraphicControl->Control->Component->Object)
  704. createPaintBox(owner): Creates a Paintbox class object
  705.  
  706.  
  707. Label Class: (Inheritance: GraphicControl->Control->Component->Object)
  708. createLabel(owner): Creates a Label class object which belongs to the given owner. Owner can be any object inherited from WinControl
  709.  
  710.  
  711. Splitter Class: (Inheritance: CustomControl->WinControl->Control->Component->Object)
  712. createSplitter(owner): Creates a Splitter class object which belongs to the given owner. Owner can be any object inherited from WinControl
  713.  
  714.  
  715. Panel Class: (Inheritance: CustomControl->WinControl->Control->Component->Object)
  716. createPanel(owner): Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl
  717.  
  718. properties
  719. Alignment: alignment
  720. BevelInner: panelBevel
  721. BevelOuter: panelBevel
  722. BevelWidth: Integer
  723. FullRepaint: boolean
  724. methods
  725. getAlignment() : gets the alignment property
  726. setAlignment(alignment) : sets the alignment property
  727. getBevelInner()
  728. setBevelInner(PanelBevel)
  729. getBevelOuter()
  730. setBevelOuter(PanelBevel)
  731. getBevelWidth()
  732. setBevelWidth(BevelWidth)
  733. getFullRepaint()
  734. setFullRepaint(boolean)
  735.  
  736.  
  737.  
  738. Image Class: (Inheritance: GraphicControl->Control->Component->Object)
  739. createImage(owner): Creates an Image class object which belongs to the given owner. Owner can be any object inherited from WinControl
  740.  
  741. properties
  742. Canvas: Canvas - The canvas object to access the picture of the image
  743. Transparent: boolean - Determines if some parts of the picture are see through (usually based on the bottomleft corner)
  744. Stretch: boolean - Determines if the picture gets stretched when rendered in the image component
  745. Picture: Picture - The picture to render
  746.  
  747. methods
  748. loadImageFromFile(filename)
  749. getStretch()
  750. setStretch(boolean)
  751. getTransparent()
  752. setTransparent(boolean)
  753. getCanvas()
  754. setPicture(picture)
  755. getPicture() : Returns the Picture object of this image
  756.  
  757.  
  758. Edit Class: (Inheritance: WinControl->Control->Component->Object)
  759. createEdit(owner): Creates an Edit class object which belongs to the given owner. Owner can be any object inherited from WinControl
  760.  
  761. properties
  762. Text: string - The current contents of the editfield
  763. OnChange: function - The function to call when the editfield is changed
  764.  
  765. methods
  766. clear()
  767. selectAll()
  768. clearSelection()
  769. copyToClipboard()
  770. cutToClipboard()
  771. pasteFromClipboard()
  772. onChange(function)
  773.  
  774.  
  775. Memo Class: (Inheritance: Edit->WinControl->Control->Component->Object)
  776. createMemo(owner): Creates a Memo class object which belongs to the given owner. Owner can be any object inherited from WinControl
  777.  
  778. properties
  779. Lines: Strings - Strings object for this memo
  780. WordWrap: boolean - Set if words at the end of the control should go to the next line
  781. WantTabs: Boolean - Set if tabs will add a tab to the memo. False if tab will go to the next control
  782. WantReturns: Boolean - Set if returns will send a event or not
  783. Scrollbars: Scrollstyle - Set the type of ascrollbars to show (ssNone, ssHorizontal, ssVertical, ssBoth,
  784. ssAutoHorizontal, ssAutoVertical, ssAutoBoth)
  785.  
  786.  
  787. methods
  788. append(string)
  789. getLines() : returns a Strings class
  790. getWordWrap()
  791. setWordWrap(boolean)
  792. getWantTabs()
  793. setWantTabs(boolean)
  794. getWantReturns()
  795. setWantReturns(boolean)
  796. getScrollbars()
  797. setScrollbars(scrollbarenumtype) :
  798. Sets the scrollbars. Horizontal only takes affect when wordwrap is disabled
  799. valid enum types:
  800. ssNone : No scrollbars
  801. ssHorizontal: Has a horizontal scrollbar
  802. ssVertical: Has a vertical scrollbar
  803. ssBoth: Has both scrollbars
  804. ssAutoHorizontal: Same as above but only shows when there actually is something to scroll for
  805. ssAutoVertical: " " " " ...
  806. ssAutoBoth: " " " " ...
  807.  
  808.  
  809.  
  810.  
  811.  
  812. ButtonControl Class: (Inheritance: WinControl->Control->Component->Object)
  813.  
  814.  
  815. Button Class: (Inheritance: ButtonControl->WinControl->Control->Component->Object)
  816. createButton(owner): Creates a Button class object which belongs to the given owner. Owner can be any object inherited from WinControl
  817.  
  818. properties
  819. ModalResult: ModalResult - The result this button will give the modalform when clicked
  820.  
  821. methods
  822. getModalResult(button)
  823. setModalResult(button, mr)
  824.  
  825. CheckBox Class: (Inheritance: ButtonControl->WinControl->Control->Component->Object)
  826. createCheckBox(owner): Creates a CheckBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  827.  
  828. properties
  829. Checked: boolean - True if checked
  830. AllowGrayed: boolean - True if it can have 3 states. True/False/None
  831. State: checkboxstate - The state. (cbUnchecked=0, cbChecked=1, cbGrayed=2)
  832. OnChange: function - Function to call when the state it changed
  833.  
  834. methods
  835. getAllowGrayed()
  836. setAllowGrayed(boolean)
  837. getState(): Returns a state for the checkbox. (cbUnchecked, cbChecked, cbGrayed)
  838. setState(boolean): Sets the state of the checkbox
  839. onChange(function)
  840.  
  841. ToggleBox Class: (Inheritance: CheckBox->ButtonControl->WinControl->Control->Component->Object)
  842. createToggleBox(owner): Creates a ToggleBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  843.  
  844. GroupBox Class: (Inheritance: WinControl->Control->Component->Object)
  845. createGroupBox(owner): Creates a GroupBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  846.  
  847.  
  848. RadioGroup class: (Inheritance: GroupBox->WinControl->Control->Component->Object)
  849. createRadioGroup(owner): Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl
  850.  
  851. properties
  852. Items: Strings - Strings derived object containings all the items in the list
  853. Columns: Integer - The number of columns to split the items into
  854. ItemIndex: Integer - The currently selected item
  855. OnClick: Called when the control is clicked
  856.  
  857. methods
  858. getRows(): Returns the number of rows
  859. getItems(): Returns a Strings object
  860. getColumns(): Returns the nuber of columns
  861. setColumns(integer)
  862. getItemIndex()
  863. setItemIndex(integer)
  864. setOnClick(function)
  865. getOnClick()
  866.  
  867.  
  868. ListBox Class: (Inheritance: WinControl->Control->Component->Object)
  869. createListBox(owner): Creates a ListBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  870.  
  871. properties
  872. MultiSelect: boolean - When set to true you can select multiple items
  873. Items: Strings - Strings derived object containings all the items in the list
  874. Selected[] - Returns true if the given line is selected. Use Items.Count-1 to find out the max index
  875. ItemIndex: integer - Get selected index. -1 is nothing selected
  876. Canvas: Canvas - The canvas object used to render on the object
  877.  
  878. methods
  879. clear()
  880. clearSelection() : Deselects all items in the list
  881. selectAll(): Selects all items in the list
  882. getItems(): Returns a strings object
  883. setItems(Strings): sets a strings object to the listbox
  884. getItemIndex()
  885. setItemIndex(integer)
  886. getCanvas()
  887.  
  888.  
  889. Calendar Class: (Inheritance: WinControl->Control->Component->Object)
  890. createCalendar(owner): Creates a Calendar class object which belongs to the given owner. Owner can be any object inherited from WinControl. Valid date is between "September 14, 1752" and "December 31, 9999"
  891.  
  892. properties
  893. Date: string - current date of the Calendar, format: yyyy-mm-dd
  894. DateTime: number - days since December 30, 1899
  895.  
  896. methods
  897. getDateLocalFormat - returns current date of the Calendar, format: ShortDateFormat from OS local settings
  898.  
  899.  
  900. ComboBox Class: (Inheritance: WinControl->Control->Component->Object)
  901. createComboBox(owner): Creates a ComboBox class object which belongs to the given owner. Owner can be any object inherited from WinControl
  902.  
  903. properties
  904. Items: Strings - Strings derived object containings all the items in the list
  905. ItemIndex: integer - Get selected index. -1 is nothing selected
  906. Canvas: Canvas - The canvas object used to render on the object
  907.  
  908. methods
  909. clear()
  910. getItems()
  911. setItems()
  912. getItemIndex()
  913. setItemIndex(integer)
  914. getCanvas()
  915.  
  916.  
  917.  
  918.  
  919. ProgressBar Class: (Inheritance: WinControl->Control->Component->Object)
  920. createProgressBar(owner): Creates a ProgressBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
  921.  
  922. properties
  923. Min: integer - The minimum positionvalue the progressbar can have (default 0)
  924. Max: integer - The maximum positionvalue the progressbar can have (default 100
  925. Position: integer - The position of the progressbar
  926. Step: integer- The stepsize to step by when stepIt() is called
  927.  
  928. methods
  929. stepIt() - Increase position with "Step" size
  930. stepBy(integer) - increase the position by the given integer value
  931. getMax() - returns the Max property
  932. setMax(integer) - sets the max property
  933. getMin() - returns the min property
  934. setMin(integer)- sets the min property
  935. getPosition() - returns the current position
  936. setPosition(integer) - sets the current position
  937.  
  938.  
  939.  
  940.  
  941. TrackBar Class : (Inheritance: WinControl->Control->Component->Object)
  942. createTrackBar(owner): Creates a TrackBar class object which belongs to the given owner. Owner can be any object inherited from WinControl
  943.  
  944. properties
  945. Min: integer - Minimal value for the trackbar
  946. Max: integer - Maximum value for the trackbar
  947. Position: integer - The current position
  948. OnChange: function - Function to call when
  949.  
  950. methods
  951. getMax()
  952. setMax(integer)
  953. getMin(trackbar)
  954. setMin(trackbar, integer)
  955. getPosition(progressbar)
  956. setPosition(progressbar, integer)
  957. getOnChange(function)
  958. setOnChange()
  959.  
  960.  
  961. CollectionItem Class: (Inheritance: Object)
  962. Base class for some higher level classes. Often used for columns
  963.  
  964. properties
  965. ID: integer
  966. Index: integer - The index in the array this item belong to
  967. DisplayName: string
  968.  
  969. methods
  970. getID()
  971. getIndex()
  972. setIndex()
  973. getDisplayName()
  974. setDisplayName()
  975.  
  976.  
  977.  
  978.  
  979.  
  980. ListColumn class: (Inheritance: CollectionItem->Object)
  981. properties
  982. AutoSize: boolean
  983. Caption: string
  984. MaxWidth: integer
  985. MinWidth: integer
  986. Width: integer
  987. Visible: boolean
  988. methods
  989. getAutosize()
  990. setAutosize(boolean)
  991. getCaption()
  992. setCaption(caption)
  993. getMaxWidth()
  994. setMaxWidth(width)
  995. getMinWidth()
  996. setMinWidth(width)
  997. getWidth()
  998. setWidth(width)
  999.  
  1000.  
  1001. Collection Class: (Inheritance: TObject)
  1002.  
  1003. properties
  1004. Count: integer
  1005.  
  1006. methods
  1007. clear(collection)
  1008. getCount(collection)
  1009. delete(collection, index)
  1010.  
  1011.  
  1012. ListColumns class : (Inheritance: Collection->Object)
  1013. properties
  1014. Columns[]: Array to access a column
  1015. [] = Columns[]
  1016.  
  1017. methods
  1018. add(): Returns a new ListColumn object
  1019. getColumn(index): Returns a ListColum object;
  1020. setColumn(index, listcolumns): Sets a ListColum object (not recomended, use add instead)
  1021.  
  1022. ListItem Class : (Inheritance: TObject)
  1023. properties
  1024. Caption: boolean - The text of this listitem
  1025. Checked: boolean - Determines if the checkbox is checked (if it has a checkbox)
  1026. SubItems: Strings - The Strings object that hold the subitems
  1027. Selected: boolean - Returns true if selected
  1028. Index: integer - The index in the Items object of the owner of this listitem (readonly)
  1029. Owner: ListItems - The ListItems object that owns this ListItem (readonly)
  1030.  
  1031. methods
  1032. delete()
  1033. getCaption() : Returns the first columns string of the listitem
  1034. setCaption(string) : Sets the first column string of the listitem
  1035. getChecked() : Returns true if the listitem is checked
  1036. setChecked(boolean): Sets the checkbox of the listbox to the given state
  1037. getSubItems(): Returns a Strings object
  1038. makeVisible(partial): Scrolls the listview so this item becomes visible (Cheat Engine 6.4 and later)
  1039.  
  1040.  
  1041. ListItems class : (Inheritance: TObject)
  1042. properties
  1043. Count : Integer - The number of ListItems this object holds (Normally read only, but writable if OwnerData is true in the listview)
  1044. Item[]: ListItem[] - Array to access each ListItem object
  1045. [] = Item[]
  1046. methods
  1047. clear()
  1048. getCount()
  1049. getItem(integer) : Return the listitem object at the given index
  1050. add(): Returns a new ListItem object
  1051.  
  1052.  
  1053.  
  1054. Listview Class : (Inheritance: WinControl->Control->Component->Object)
  1055. createListView(owner): Creates a ListView class object which belongs to the given owner. Owner can be any object inherited from WinControl
  1056.  
  1057. properties
  1058. Columns: ListColumns - The Listcolumns object of the listview (Readonly)
  1059. Items: ListItems - The ListItems objects of the listview
  1060. ItemIndex: integer - The currently selected index in the Items object (-1 if nothing is selected)
  1061. Selected: ListItem - The currently selected listitem (nil if nothing is selected)
  1062. Canvas: Canvas - The canvas object used to render the listview (Readonly)
  1063. AutoWidthLastColumn: Boolean - When set to true the last column will resize when the control resizes
  1064. HideSelection: Boolean - When set to true the selection will not hide when the focus leaves the control
  1065. RowSelect: Boolean - When set to true the whole row will be selected instead of just the first column
  1066. OwnerData: Boolean - When set to true the listview will call the onData function for every line being displayed. Use Items.Count to set the number of virtual lines
  1067.  
  1068. OnData: function(sender, ListItem) - Called when a listview with OwnerData true renders a line
  1069.  
  1070. methods
  1071. clear()
  1072. getColumns() : ListColumns - Returns a ListColumns object
  1073. getItems(): ListItems - Returns a ListItems object
  1074. getItemIndex(): integer - Returns the currently selected index in the Items object
  1075. setItemIndex(index: integer)- Sets the current itemindex
  1076. getCanvas() : Canvas - Returns the canvas object used to render the listview
  1077.  
  1078.  
  1079. TreeNode clasS : (Inheritance: TObject)
  1080. properties
  1081. Text: string - The text of the treenode
  1082. Parent: Treenode - The treenode this object is a child of. (can be nil) (ReadOnly)
  1083. Level: Integer - The level this node is at
  1084. HasChildren: boolean - Set to true if it has children, or you wish it to have an expand sign
  1085. Count : Integer - The number of children this node has
  1086. Items[]: Treenode - Array to access the child nodes of this node
  1087. Index: Integer - The index based on the parent
  1088. AbsoluteIndex: Integer - The index based on the TreeView's Treenodes object (Items)
  1089. Selected: Boolean - Set to true if currently selected
  1090. MultiSelected: Boolean - Set to true if selected as well, but not the main selected object
  1091. Data: Pointer - Space to store 4 or 8 bytes depending on which version of CE is used
  1092. methods
  1093. delete()
  1094. deleteChildren()
  1095. makeVisible()
  1096. expand(recursive:boolean=TRUE OPTIONAL) : Expands the given node
  1097. collapse(recursive:boolean=TRUE OPTIONAL) : collapses the given node
  1098. getNextSibling(): Returns the treenode object that's behind this treenode on the same level
  1099. add(text:string): Returns a Treenode object that is a child of the treenode used to create it
  1100.  
  1101.  
  1102.  
  1103.  
  1104. TreeNodes class : (Inheritance: TObject)
  1105. properties
  1106. Count : Integer - The total number of Treenodes this object has
  1107. Item[]: TreeNode - Array to access each node
  1108. [] = Item[]
  1109. methods
  1110. clear()
  1111. getCount()
  1112. getItem(integer) : Return the listitem object at the given index
  1113. add(text:string): Returns a new root Treenode object
  1114. insert(treenode, string): Returns a new treenode object that has been inserted before the given treenode
  1115. insertBehind(treenode, string): Returns a new treenode object that has been inserted after the given treenode
  1116.  
  1117.  
  1118.  
  1119. Treeview Class : (Inheritance: CustomControl->WinControl->Control->Component->Object)
  1120. createTreeView(owner)
  1121.  
  1122. properties
  1123. Items: TreeNodes - The Treenodes object of the treeview (ReadOnly)
  1124. Selected: TreeNode - The currently selected treenode
  1125.  
  1126. methods
  1127. getItems()
  1128. getSelected()
  1129. setSelected()
  1130. fullCollapse() : Collapses all the nodes, including the children's nodes
  1131. fullExpand() : Expands all the nodes and all their children
  1132. saveToFile(filename): Saves the contents of the treeview to disk
  1133.  
  1134.  
  1135.  
  1136. Timer Class : (Inheritance: Component->object)
  1137. createTimer(owner OPT, enabled OPT):
  1138. Creates a timer object. If enabled is not given it will be enabled by default (will start as soon as an onTimer event has been assigned)
  1139. Owner may be nil, but you will be responsible for destroying it instead of being the responsibility of the owner object)
  1140.  
  1141. properties
  1142. Interval: integer - The number of milliseconds (1000=1 second) between executions
  1143. Enabled: boolean
  1144. OnTimer: function - The function to call when the timer triggers
  1145.  
  1146. methods
  1147. getInterval()
  1148. setInterval(interval) : Sets the speed on how often the timer should trigger. In milliseconds (1000=1 second)
  1149. getOnTimer()
  1150. setOnTimer(function)
  1151. getEnabled()
  1152. setEnabled()boolean)
  1153.  
  1154. CustomControl class (CustomControl->WinControl->Control->Component->Object)
  1155. properties
  1156. Canvas : The canvas object for drawing on the control/. Readonly
  1157. methods
  1158. getCanvas() : Returns the Canvas object for the given object that has inherited from customControl
  1159.  
  1160.  
  1161. Canvas Class : (Inheritance: CustomCanvas->Object)
  1162. properties
  1163. Brush: Brush - The brush object
  1164. Pen: Pen - The pen object
  1165. Font: Font - The font object
  1166. Width: integer - Width of the canvas
  1167. Height: integer - Height of the canvas
  1168.  
  1169.  
  1170.  
  1171. methods
  1172. getBrush(): Returns the brush object of this canvas
  1173. getPen(): Returns the pen object of this canvas
  1174. getFont(): Returns the font object of this canvas
  1175. getWidth()
  1176. getHeight()
  1177. getPenPosition()
  1178. setPenPosition(x,y)
  1179. clear() - Clears the canvas
  1180. line(sourcex, sourcey, destinationx, destinationy)
  1181. lineTo(destinationx, destinationy)
  1182. rect(x1,y1,x2,y2)
  1183. fillRect(x1,y1,x2,y2)
  1184. textOut(x,y, text)
  1185. getTextWidth(text)
  1186. getTextHeight(text)
  1187. getPixel(x,y)
  1188. setPixel(x,y,color)
  1189. floodFill(x,y)
  1190. ellipse(x1,y1,x2,y2)
  1191. gradientFill(x1,y1,x2,y2, startcolor, stopcolor, direction) : Gradient fills a rectangle. Direction can be 0 or 1. 0=Vertical 1=Horizontal
  1192. copyRect(dest_x1,dest_y1,dest_x2,dest_y2, sourceCanvas, source_x1,source_y1,source_x2,source_y2) : Draws an image from one source to another. Usefull in cases of doublebuffering
  1193. draw(x,y, graphic) : Draw the image of a specific Graphic class
  1194. getClipRect() : Returns a table containing the fields Left, Top, Right and Bottom, which define the invalidated region of the graphical object. Use this to only render what needs to be rendered in the onPaint event of objects
  1195.  
  1196. Pen Class : (Inheritance: CustomPen->CanvasHelper->Object)
  1197. properties
  1198. Color: Integer - The color of the pen
  1199. Width: integer - Thickness of the pen
  1200. methods
  1201. getColor()
  1202. setColor(color)
  1203. getWidth()
  1204. setWidth(width)
  1205.  
  1206.  
  1207. Brush Class : (Inheritance: CustomBrush->CanvasHelper->Object)
  1208. properties
  1209. Color : Integer
  1210. methods
  1211. getColor()
  1212. setColor()
  1213.  
  1214. Font Class : (Inheritance: CustomFont->CanvasHelper->Object)
  1215. createFont(): Returns a font object (default initialized based on the main ce window)
  1216.  
  1217. properties
  1218. Name: string
  1219. Size: integer
  1220. Color: integer
  1221.  
  1222. methods
  1223. getName(): Gets the fontname of the font
  1224. setName(string): Sets the fontname of the font
  1225. getSize(): Gets the size of the font
  1226. setSize(integer): Sets the size of the font
  1227. getColor(): Gets the color of the font
  1228. setColor(integer): Sets the color of the font
  1229. assign(font): Copies the contents of the font given as parameter to this font
  1230.  
  1231.  
  1232. Graphic Class : (Inheritance: Object) : Abstract class
  1233. properties
  1234. Width: integer
  1235. Height: integer
  1236. Transparent: boolean
  1237.  
  1238. methods
  1239. getWidth(graphic): Gets the current width in pixels of this graphics object
  1240. setWidth(graphic, width): Sets thw width in pixels
  1241. getHeight(graphic)
  1242. setHeight(graphic, height)
  1243.  
  1244. RasterImage class: (Inheritance: Graphic->Object) : Base class for some graphical controls
  1245. properties
  1246. Canvas: Canvas
  1247. PixelFormat: PixelFormat - the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
  1248. TransparentColor: integer
  1249.  
  1250. methods
  1251. getCanvas(): Returns the Canvas object for this image
  1252. getPixelFormat(): Returns the current pixelformat
  1253. getPixelFormat(pixelformat): Sets the pixelformat for this image. Will clear the current image if it had one. Supported pixelformats: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit (recommended)
  1254. setTransparentColor(integer): Sets the color that will be rendered as transparent when drawn
  1255. getTransparentColor(): Returns the color set to be transparent
  1256.  
  1257.  
  1258. Bitmap class: (Inheritance: CustomBitmap->RasterImage->Graphic->Object) : Bitmap based Graphic object
  1259. createBitmap(width, height) - Returns a Bitmap object
  1260.  
  1261. PortableNetworkGraphic Class: (Inheritence: CustomBitmap->RasterImage->Graphic->Object)
  1262. createPNG(width, height) - Returns a PortableNetworkGraphic object
  1263.  
  1264. JpegImage Class: (Inheritence: CustomBitmap->RasterImage->Graphic->Object)
  1265. createJpeg(width, height) - Returns a Jpeg object
  1266.  
  1267.  
  1268.  
  1269. Picture Class : (Inheritance: Object) : Container for the Graphic class
  1270. createPicture() : Returns a empty picture object
  1271.  
  1272. properties
  1273. Graphic
  1274. PNG
  1275. Bitmap
  1276. Jpeg
  1277.  
  1278. methods
  1279. loadFromFile(filename)
  1280. saveToFile(filename)
  1281. loadFromStream(stream, originalextension OPTIONAL) : Loads a picture from a stream. Note that the stream position must be set to the start of the picture
  1282. assign(sourcepicture)
  1283. getGraphic() : Gets the Graphic object of this picture
  1284. getPNG(): Returns a PortableNetworkGraphic Class object (Can be used from scratch)
  1285. getBitmap(): Returns a Bitmap Class object (Can be used from scratch)
  1286. getJpeg(): Returns a JpegImage Class object (Picture must be initialized with a jpeg file first)
  1287.  
  1288.  
  1289.  
  1290.  
  1291. GenericHotkey Class : (Inheritance: Object)
  1292. createHotkey(function, keys, ...) : returns an initialized GenericHotkey class object. Maximum of 5 keys
  1293. createHotkey(function, {keys, ...}) : ^
  1294.  
  1295. properties
  1296. DelayBetweenActivate: integer - Interval in milliseconds that determines the minimum time between hotkey activations. If 0, the global delay is used
  1297. onHotkey: The function to call when the hotkey is pressed
  1298.  
  1299. methods
  1300. getKeys()
  1301. setKeys(key, ....)
  1302. setOnHotkey(table)
  1303. getOnHotkey
  1304.  
  1305.  
  1306. CommonDialog class:
  1307. properties
  1308. OnShow: function(sender)
  1309. OnClose: function(sender)
  1310. Title: string - The caption at top of the dialog
  1311. methods
  1312. Execute() : Shows the dialog and return true/false depending on the dialog
  1313.  
  1314. FindDialog Class: (Inheritance: CommonDialog->Component->Object)
  1315. properties
  1316. FindText: String - The text the user wishes to find
  1317. Options: Enum - Find Options
  1318. { frDown, frFindNext, frHideMatchCase, frHideWholeWord,
  1319. frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown,
  1320. frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp,
  1321. frEntireScope, frHideEntireScope, frPromptOnReplace, frHidePromptOnReplace }
  1322. OnFind: function (sender) - Called when the find button has been clicked
  1323. OnHelp: function (sender) - Called when the help button is visible (see Options) and clicked
  1324. methods
  1325.  
  1326.  
  1327. FileDialog Class: (Inheritance: CommonDialog->Component->Object)
  1328. properties
  1329.  
  1330. DefaultExt: string - When not using filters this will be the default extention used if no extension is given
  1331. Files: Strings - Stringlist containing all seleced files if multiple files are selected
  1332. FileName: string - The filename that was selected
  1333. Filter: string - A filter formatted string
  1334. FilterIndex: integer - The index of which filter to use
  1335.  
  1336. InitialDir: string - Sets the folder the filedialog will show first
  1337. methods
  1338.  
  1339.  
  1340.  
  1341. OpenDialog Class: (Inheritance: FileDialog->CommonDialog->Component->Object)
  1342. createOpenDialog(owner) : Creates an opendialog object
  1343.  
  1344. properties
  1345. Options: String
  1346. A string formatted as "[param1, param2, param3]" to set OpenDialogs options
  1347. Valid parameters are:
  1348. ofReadOnly,
  1349. ofOverwritePrompt : if selected file exists shows a message, that file will be overwritten
  1350. ofHideReadOnly : hide read only file
  1351. ofNoChangeDir : do not change current directory
  1352. ofShowHelp : show a help button
  1353. ofNoValidate
  1354. ofAllowMultiSelect : allow multiselection
  1355. ofExtensionDifferent
  1356. ofPathMustExist : shows an error message if selected path does not exist
  1357. ofFileMustExist : shows an error message if selected file does not exist
  1358. ofCreatePrompt
  1359. ofShareAware
  1360. ofNoReadOnlyReturn : do not return filenames that are readonly
  1361. ofNoTestFileCreate
  1362. ofNoNetworkButton
  1363. ofNoLongNames
  1364. ofOldStyleDialog
  1365. ofNoDereferenceLinks : do not expand filenames
  1366. ofEnableIncludeNotify
  1367. ofEnableSizing : dialog can be resized, e.g. via the mouse
  1368. ofDontAddToRecent : do not add the path to the history list
  1369. ofForceShowHidden : show hidden files
  1370. ofViewDetail : details are OS and interface dependent
  1371. ofAutoPreview : details are OS and interface dependent
  1372.  
  1373.  
  1374. methods
  1375. -
  1376.  
  1377.  
  1378. SaveDialog Class: (Inheritance: OpenDialog->FileDialog->CommonDialog->Component->Object)
  1379. createSaveDialog(owner)
  1380.  
  1381. SelectDirectoryDialog Class: (Inheritance: OpenDialog->FileDialog->CommonDialog->Component->Object)
  1382. createSelectDirectoryDialog(owner)
  1383.  
  1384.  
  1385. Stream Class
  1386.  
  1387. properties
  1388. Size: integer
  1389. Position: integer
  1390.  
  1391. methods
  1392. copyFrom(stream, count) - Copies count bytes from the given stream to this stream
  1393. read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the posion
  1394. write(bytetable, count OPTIONAL)- Writes the given bytetable to the stream
  1395.  
  1396.  
  1397. MemoryStream Class (Inheritance: Stream->Object)
  1398. createMemoryStream()
  1399.  
  1400. properties
  1401. Memory: Integer - The address in Cheat Engine's memory this stream is loaded (READONLY, tends to change)
  1402.  
  1403. methods
  1404. loadFromFile(filename) : Replaces the contents in the memory stream with the contents of a file on disk
  1405. saveToFile(filename) : Writes the contents of the memory stream to the specified file
  1406.  
  1407.  
  1408. FileStream Class (Inheritance: HandleStream->Stream->Object)
  1409. createFileStream(filename, mode)
  1410.  
  1411.  
  1412. TableFile class (Inheritance: Object)
  1413. findTableFile(filename): Returns the TableFile class object for the saved file
  1414.  
  1415. properties
  1416. Name: string
  1417. Stream: MemoryStream
  1418.  
  1419. methods
  1420. saveToFile(filename)
  1421. getData() : Gets a MemoryStream object
  1422.  
  1423.  
  1424. xmplayer class.
  1425. The xmplayer class has already been defined as xmplayer, no need to create it manually
  1426.  
  1427. properties
  1428. IsPlaying : boolean - Indicator that the xmplayer is currently playing a xm file
  1429. Initialized: boolean - Indicator that the xmplayer is actually actively loaded in memory
  1430.  
  1431. methods
  1432. playXM(filename, OPTIONAL noloop)
  1433. playXM(tablefile, OPTIONAL noloop)
  1434. playXM(Stream, OPTIONAL noloop)
  1435. pause()
  1436. resume()
  1437. stop()
  1438.  
  1439.  
  1440. CheatComponent Class: (Inheritance: WinControl->Control->Component->Object)
  1441. The cheatcomponent class is the component used in Cheat Engine 5.x trainers
  1442. Most people will probably want to design their own components but for those that don't know much coding and use the autogenerated trainer this will be used
  1443.  
  1444. properties
  1445. Color: Integer - background color
  1446. Textcolor: integer - text color
  1447. Activationcolor: integer - The textcolor to show when activated is true
  1448. Activated: boolean - Toggles between the ActivationColor and the TextColor
  1449. Editleft:integer - The x position of the optional edit field
  1450. Editwidth: integer - the width of the optional edit field
  1451. Editvalue:string - The string of the optional edit field
  1452. Hotkey:string read - The hotkeypart of the cheat line
  1453. Description:string - Description part of the cheat line
  1454. Hotkeyleft: integer - The x position of the hotkey line
  1455. Descriptionleft:integer - The x position of the Description line
  1456.  
  1457.  
  1458. ShowHotkey: boolean - Decides if the hotkey label should be shown
  1459. HasEditBox: boolean - Decides if the editbox should be shown
  1460. HasCheckbox: boolean - Decides if the checkbox should be shown
  1461. Font: Font - The font to use to render the text
  1462.  
  1463. methods
  1464. -
  1465.  
  1466.  
  1467.  
  1468. MemoryRecordHotkey Class: (Inheritance: object)
  1469. The memoryrecord hotkey class is mainly readonly with the exception of the event properties to be used to automatically create trainers
  1470. Use the genreric hotkey class if you wish to create your own hotkeys
  1471.  
  1472. properties
  1473. Owner: MemoryRecord - The memoryrecord this hotkey belongs to (ReadOnly)
  1474. ID: integer - Unique id of this hotkey (ReadOnly)
  1475. Description: string - The description of this hotkey (ReadOnly)
  1476. HotkeyString: string - The hotkey formatted as a string (ReadOnly)
  1477. OnHotkey: function(sender) - Function to be called when a hotkey has just been pressed
  1478. OnPostHotkey: function(sender) - Function to be called when a hotkey has been pressed and the action has been performed
  1479.  
  1480. methods
  1481. doHotkey: Executes the hotkey as if it got triggered by the keyboard
  1482.  
  1483.  
  1484. MemoryRecord Class:
  1485. The memoryrecord objects are the entries you see in the addresslist
  1486.  
  1487. properties
  1488. ID: Integer - Unique ID
  1489. Index: Integer - The index ID for this record. 0 is top. (ReadOnly)
  1490. Description: string- The description of the memory record
  1491. Address: string - Get/set the interpretable address string. Usefull for simple address settings.
  1492. OffsetCount: integer - The number of offsets. Set to 0 for a normal address
  1493. Offset[] : integer - Array to access each offset
  1494. CurrentAddress: integer - The address the memoryrecord points to
  1495. Type: ValueType - The variable type of this record. See vtByte to vtCustom
  1496. If the type is vtString then the following properties are available:
  1497. String.Size: Number of characters in the string
  1498. String.Unicode: boolean
  1499.  
  1500. If the type is vtBinary then the following properties are available
  1501. Binary.Startbit: First bit to start reading from
  1502. Binary.Size : Number of bits
  1503.  
  1504. If the type is vtByteArray then the following propertes are available
  1505. Aob.Size : Number of bytes
  1506.  
  1507. CustomTypeName: String - If the type is vtCustomType this will contain the name of the CustomType
  1508. Script: String - If the type is vtAutoAssembler this will contain the auto assembler script
  1509. Value: string - The value in stringform.
  1510. Selected: boolean - Set to true if selected (ReadOnly)
  1511. Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze
  1512. Color: integer
  1513.  
  1514. Count: Number of children
  1515. Child[index] : Array to access the child records
  1516. [index] = Child[index]
  1517.  
  1518. HotkeyCount: integer - Number of hotkeys attached to this memory record
  1519. Hotkey[] : Array to index the hotkeys
  1520.  
  1521. OnActivate: function()
  1522. OnDeactivate: function()
  1523. OnDestroy: function()
  1524. methods
  1525. getDescription()
  1526. setDescription()
  1527. getAddress() : Returns the interpretable addressstring of this record. If it is a pointer, it returns a second result as a table filled with the offsets
  1528. setAddress(string) : Sets the interpretable address string, and if offsets are provided make it a pointer
  1529.  
  1530. getOffsetCount(): Returns the number of offsets for this memoryrecord
  1531. setOffsetCount(integer): Lets you set the number of offsets
  1532.  
  1533. getOffset(index) : Gets the offset at the given index
  1534. setOffset(index, value) : Sets the offset at the given index
  1535.  
  1536. getCurrentAddress(): Returns the current address as an integer (the final result of the interpretable address and pointer offsets)
  1537.  
  1538. appendToEntry(memrec): Appends the current memory record to the given memory record
  1539.  
  1540. getHotkey(index): Returns the hotkey from the hotkey array
  1541. getHotkeyByID(integer): Returns the hotkey with the given id
  1542.  
  1543.  
  1544. Addresslist Class: (Inheritance: Panel->WinControl->Control->Component->Object)
  1545. properties
  1546. Count: Integer - The number of records in the table
  1547. SelCount: integer- The number of records that are selected
  1548. SelectedRecord: MemoryRecord - The main selected record
  1549. MemoryRecord[]: MemoryRecord - Array to access the individial memory records
  1550. [] = MemoryRecord - Default accessor
  1551.  
  1552. methods
  1553. getCount()
  1554. getMemoryRecord(index)
  1555. getMemoryRecordByDescription(description): returns a MemoryRecord object
  1556. getMemoryRecordByID(ID)
  1557. createMemoryRecord() : creates an generic cheat table entry and add it to the list
  1558.  
  1559. getSelectedRecords(): Returns a table containing all the selected records
  1560.  
  1561. doDescriptionChange() : Will show the gui window to change the description of the selected entry
  1562. doAddressChange() : Will show the gui window to change the address of the selected entry
  1563. doTypeChange() : Will show the gui window to change the type of the selected entries
  1564. doValueChange() : Will show the gui window to change the value of the selected entries
  1565.  
  1566. getSelectedRecord() : Gets the main selected memoryrecord
  1567. setSelectedRecord(memrec) : Sets the currently selected memoryrecord. This will unselect all other entries
  1568.  
  1569.  
  1570.  
  1571.  
  1572. MemScan Class (Inheritance: Object)
  1573. getCurrentMemscan() : Returns the current memory scan object. If tabs are used the current tab's memscan object
  1574. createMemScan(progressbar OPTIONAL) : Returns a new MemScan class object
  1575.  
  1576. properties
  1577. OnScanDone: function(memscan) - Set a function to be called when the scan has finished
  1578. FoundList: FoundList - The foundlist currently attached to this memscan object
  1579. OnlyOneResult: boolean - If this is set to true memscan will stop scanning after having found the first result, and written the address to "Result"
  1580. Result: Integer - If OnlyOneResult is used this will contain the address after a scan has finished
  1581.  
  1582.  
  1583. methods
  1584.  
  1585. firstScan(scanoption, vartype, roundingtype, input1, input2 ,startAddress ,stopAddress ,protectionflags ,alignmenttype ,"alignmentparam" ,isHexadecimalInput ,isNotABinaryString, isunicodescan, iscasesensitive);
  1586. Does an initial scan.
  1587. memscan: The MemScan object created with createMemScan
  1588. scanOption: Defines what type of scan is done. Valid values for firstscan are:
  1589. soUnknownValue: Unknown initial value scan
  1590. soExactValue: Exact Value scan
  1591. soValueBetween: Value between scan
  1592. soBiggerThan: Bigger than ... scan
  1593. soSmallerThan: smaller than ... scan
  1594.  
  1595. vartype: Defines the variable type. Valid variable types are:
  1596. vtByte
  1597. vtWord 2 bytes
  1598. vtDword 4 bytes
  1599. vtQword 8 bytes
  1600. vtSingle float
  1601. vtDouble
  1602. vtString
  1603. vtByteArray
  1604. vtGrouped
  1605. vtBinary
  1606. vtAll
  1607.  
  1608. roundingtype: Defined the way scans for exact value floating points are handled
  1609. rtRounded : Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
  1610. rtTruncated: Truncated algoritm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
  1611. rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
  1612.  
  1613. input1: If required by the scanoption this is a string of the given variable type
  1614. input2: If requires by the scanoption this is the secondary input
  1615.  
  1616. startAddress : The start address to scan from. You want to set this to 0
  1617. stopAddress : The address the scan should stop at. (You want to set this to 0xffffffffffffffff)
  1618.  
  1619. protectionflags : See aobscan about protectionflags
  1620. alignmenttype : Scan alignment type. Valid options are:
  1621. fsmNotAligned : No alignment check
  1622. fsmAligned : The address must be dividable by the value in alignmentparam
  1623. fsmLastDigits : The last digits of the address must end with the digits provided by alignmentparam
  1624.  
  1625. alignmentparam : String that holds the alignment parameter.
  1626.  
  1627. isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
  1628. isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
  1629. isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
  1630. iscasesensitive : When true and the vartype is vtString this check if the case matches
  1631.  
  1632.  
  1633.  
  1634.  
  1635. nextScan(scanoption, roundingtype, input1,input2, isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive, ispercentagescan, savedresultname OPTIONAL);
  1636. Does a next scan based on the current addresslist and values of the previous scan or values of a saved scan
  1637. memscan: The MemScan object that has previously done a first scan
  1638. scanoption:
  1639. soExactValue: Exact Value scan
  1640. soValueBetween: Value between scan
  1641. soBiggerThan: Bigger than ... scan
  1642. soSmallerThan: smaller than ... scan
  1643. soIncreasedValue: Increased value scan
  1644. soIncreasedValueBy: Increased value by scan
  1645. soDecreasedValue: Decreased value scan
  1646. soDecreasedValueBy: Decreased value by scan
  1647. soChanged: Changed value scan
  1648. soUnchanged: Unchanged value scan
  1649.  
  1650. roundingtype: Defined the way scans for exact value floating points are handled
  1651. rtRounded : Normal rounded scans. If exact value = "3" then it includes 3.0 to 3.49999999. If exact value is "3.0" it includes 3.00 to 3.0499999999
  1652. rtTruncated: Truncated algoritm. If exact value = "3" then it includes 3.0 to 3.99999999. If exact value is "3.0" it includes 3.00 to 3.099999999
  1653. rtExtremerounded: Rounded Extreme. If exact value = "3" then it includes 2.0000001 to 3.99999999. If exact value is "3.0" it includes 2.900000001 to 3.099999999
  1654.  
  1655. input1: If required by the scanoption this is a string of the given variable type
  1656. input2: If requires by the scanoption this is the secondary input
  1657.  
  1658. isHexadecimalInput: When true this will handle the input field as a hexadecimal string else decimal
  1659. isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string
  1660. isunicodescan: When true and the vartype is vtString this will do a unicode (utf16) string scan else normal utf8 string
  1661. iscasesensitive : When true and the vartype is vtString this check if the case matches
  1662. ispercentage: When true and the scanoption is of type soValueBetween, soIncreasedValueBy or soDecreasedValueBy will cause CE to do a precentage scan instead of a normal value scan
  1663. savedResultName: String that holds the name of a saved result list that should be compared against. First scan is called "FIRST"
  1664.  
  1665. newScan() : Clears the current results
  1666. waitTillDone() : Waits for the memscan thread(s) to finish scanning. Always use this
  1667. saveCurrentResults(name) : Save the current scanresults to a unique name for this memscan. This save can be used to compare against in a subsequent next scan
  1668. getAttachedFoundlist() : Returns a FoundList object if one is attached to this scanresults. Returns nil otherwise
  1669.  
  1670.  
  1671. setOnlyOneResult(state): If set to true before you start a scan, this will cause the scanner to only return one result. Note that it does not work with a foundlist
  1672. getOnlyResult(): Only works if returnOnlyOneResult is true. Returns nil if not found, else returns the address that was found (integer)
  1673.  
  1674.  
  1675.  
  1676. FoundList
  1677. The foundlist is an object that opens the current memscan's result file and provides an interface for reading out the addresses
  1678.  
  1679. createFoundList(memscan)
  1680.  
  1681. properties
  1682. Count: integer;
  1683. Address[index]
  1684. Value[index]
  1685.  
  1686. methods
  1687. initialize() : Call this when a memscan has finished scanning. This will open the results for reading
  1688. deinitialize() : Release the results
  1689. getCount()
  1690. getAddress(index) : Returns the address as a string
  1691. getValue(index) : Returs the value as a string
  1692.  
  1693.  
  1694. Memoryview class: (Inheritance: Form->ScrollingWinControl->CustomControl->WinControl->Control->Component->Object)
  1695. createMemoryView() - Creates a new memoryview window. This window will not receive debug events. Use getMemoryViewForm() function to get the main memoryview window
  1696. properties
  1697. DisassemblerView: The disassemblerview class of this memoryview object
  1698. HexadecimalView: The hexadecimalview class of this memoryview object
  1699. methods
  1700. -
  1701.  
  1702. DisassemblerviewLine class: (Inheritance: Object)
  1703. properties
  1704. Address: The current address of this line
  1705. Owner: The Disassemblerview that owns this line
  1706.  
  1707. methods
  1708. -
  1709.  
  1710. Disassemblerview class: (Inheritance: Panel->CustomControl->WinControl->Control->Component->Object)
  1711. The visual disassembler used on the memory view window
  1712. properties
  1713. SelectedAddress: integer - The currently selected address in the disassemblerview
  1714. SelectedAddress2: integer - The secondary selected address in the disassemblerview
  1715. TopAddress: Integer - The first address to show
  1716. ShowJumplines: boolean - Determines if the jumplines should be shown
  1717. OnSelectionChange: function(sender, address, address2) - Function to call when the selection has changed
  1718. OnExtraLineRender: function(sender, Address, AboveInstruction, Selected): RasterImage OPTIONAL, x OPTIONAL, y OPTIONAL
  1719. Function to call when you wish to provide the disassembler view with an extra image containing data you wish to show.
  1720. This function is called once to get an image to show above the instruction, and once to get an image to show under the instruction and optional comments.
  1721. The image for both calls must be different objects as rendering will only be done when both calls have been completed
  1722.  
  1723. Sender is a DisassemblerviewLine object
  1724. If no coordinates are given the image will be centered above/below the instruction
  1725.  
  1726.  
  1727. methods
  1728. -
  1729.  
  1730.  
  1731. Hexadecimal class: (Inheritance: Panel->CustomControl->WinControl->Control->Component->Object)
  1732. The visual hexadecimal object used on the memory view window
  1733. properties
  1734. OnAddressChange(hexadecimalview, function): function(hexadecimalview, address)
  1735. OnByteSelect(hexadecimalview, function): function(hexadecimalview, address, address2)
  1736.  
  1737. methods
  1738. -
  1739.  
  1740.  
  1741. Thread Class: (Inheritance: Object)
  1742. createNativeThread(function(Thread,...), ...) :
  1743. Executes the given function in another thread using the systems thread mechanism
  1744. The function returns the Thread class object
  1745. function declaration: function (Thread, ...)
  1746.  
  1747. properties
  1748. name: string - This name will be shown when the thread terminated abnormally
  1749.  
  1750. methods
  1751. freeOnTerminate(state) :
  1752. When set to true the thread object will free itself when the function ends (default=true)
  1753. Note: Use this only from inside the thread function as the thread might have already terminated and freed itself when called
  1754.  
  1755. synchronize(function(thread, ...), ...) :
  1756. Called from inside the thread. This wil cause the tread to get the main thread to execute the given function and wait for it to finish.
  1757. Usually for gui access
  1758. Returns the return value of the given function
  1759.  
  1760. waitfor() :
  1761. Waits for the given thread to finish (Not recommended to call this from inside the thread itself)
  1762.  
  1763.  
  1764.  
  1765. Structure class related functions:
  1766. getStructureCount(): Returns the number of Global structures. (Global structures are the visible structures)
  1767. getStructure(index): Returns the Structure object at the given index
  1768. createStructure(name): Returns an empty structure object (Not yet added to the Global list. Call structure.addToGlobalStructureList manually)
  1769.  
  1770.  
  1771.  
  1772. structure class: (Inheritance: Object)
  1773. Properties:
  1774. Name: String - The name of the structure
  1775. Size: Integer - The number of bytes between the last element and the start. ReadOnly
  1776. Count: Integer - Number of elements in the structure. ReadOnly
  1777. Element[]: structureElement - Returns the structure element at the given index. Readonly
  1778. Methods:
  1779. getName(): Returns the name
  1780. setName(name): Sets the name
  1781. getElement(index): Returns a structureElement object (Changing offsets can change the index)
  1782. getElementByOffset(offset): Returns a structureElement object where the specified offset is at least the requested offset
  1783. addElement(): Adds a new blank structureElement and returns it
  1784. autoGuess(baseaddresstoguessfrom, offset, size)
  1785. fillFromDotNetAddress(address, changeName): Fills the structure with the layout gathered from querying .NET. If changeName is true, the structure will take the name of the .NET class. (6.4+)
  1786.  
  1787. beginUpdate(): Call this when you want to make multiple updates to a structure. It will speed up the update process
  1788. endUpdate(): Call this when done
  1789. addToGlobalStructureList(): Add this to the list of structures for the user to select from. (Global structures will get saved to the table)
  1790. removeFromGlobalStructureList(): Remove from the list of structures.
  1791.  
  1792.  
  1793. StructureElement class: (Inheritance: Object)
  1794. Properties:
  1795. Owner: structure - The structure this element belongs to. Readonly
  1796. Offset: integer - The offset of this element
  1797. Name: string - The name of this element
  1798. Vartype: integer - The variable type of this element
  1799. ChildStruct: structure - If not nil this element is a pointer to the structure defined here
  1800. ChildStructStart: integer - The number of bytes inside the provided childstruct. (E.g: It might point to offset 10 of a certain structure)
  1801. Bytesize: integer - The number of bytes of this element. Readonly for basic types, writable for types that require a defined length like strings and array of bytes
  1802.  
  1803. Methods:
  1804. getOwnerStructure(): Returns the structure this element belongs to
  1805. getOffset(): Returns the offset of this element
  1806. setOffset(offset): Sets the offset of this element
  1807. getName(): Returns the name of this element
  1808. setName(name): Sets the name of this element (tip: Leave blank if you only want to set the name of the variable)
  1809. getVartype(): Returns the variable type of this element (check Variable types in defines.lua)
  1810. setVartype(vartype)
  1811. getChildStruct()
  1812. setChildStruct(structure)
  1813. getChildStructStart()
  1814. setChildStructStart(offset)
  1815. getBytesize(): Gets the bytesize of the element. Usually returns the size of the type, except for string and aob
  1816. setBytesize(size): sets the bytesize for types that are affected (string, aob)
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822. supportCheatEngine(attachwindow, hasclosebutton, width, height, position ,yoururl OPTIONAL, extraparameters OPTIONAL, percentageshown OPTIONAL):
  1823. Will show an advertising window which will help keep the development of Cheat Engine going.
  1824. If you provide your own url it will be shown Up to 75% of the time.
  1825.  
  1826. attachwindow: Type=Form : The form that the ad is attached to
  1827. hasclosebutton: Type=boolean : If true the window will have a border an a close button at top
  1828. width, height: Type=integer :
  1829. The client width and height of the window.
  1830. Prefered formats are : 120x600 , 160x600, 300x250, 468x60, 728x90 ,But you are free to use different formats
  1831.  
  1832. Position: Type=integer/enum: The place of the window
  1833. 0=Top, 1=Right, 2=Bottom, 3=left
  1834.  
  1835. Yoururl: Type=string: The url you want to show. When given instead of showing CE's ads 100% it will show your url up to 75%.
  1836. You can use it for your own income, or for updating users about new versions of your trainer or whatever you feel like
  1837.  
  1838. Extraparameters: Type=String : are url request parameters you can add to the default parameters (e.g trainername=mytrainer for tracking purposes)
  1839.  
  1840. PercentageShown: You can change the default of 75% to a smaller value like 50%
  1841.  
  1842.  
  1843. fuckCheatEngine() : Removes the ad window if it was showing
  1844.  
  1845.  
  1846. Following are some more internal functions for Cheat Engine
  1847.  
  1848. dbk_initialize() : Returns true if the dbk driver is loaded in memory. False if it failed for whatever reason (e.g 64-bit and not booted with unsigned driver support)
  1849. dbk_useKernelmodeOpenProcess() : Switches the internal pointer of the OpenProcess api to dbk_OpenProcess
  1850. dbk_useKernelmodeProcessMemoryAccess() : Switches the internal pointer to the ReadProcessMemory and WriteProcessMemory apis to dbk_ReadProcessMemory and dbk_WriteProcessMemory
  1851. dbk_useKernelmodeQueryMemoryRegions() : Switches the internal pointer to the QueryVirtualMemory api to dbk_QueryVirtualMemory
  1852. dbk_getPEProcess(processid) : Returns the pointer of the EProcess structure of the selected processid
  1853. dbk_getPEThread(threadid) : Gets the pointer to the EThread structure
  1854. dbk_readMSR(msr): Reads the msr
  1855. dbk_writeMSR(msr, msrvalue): Writes the msr
  1856. dbk_executeKernelMemory(address, parameter) :
  1857. Executes a routine from kernelmode (e.g a routine written there with auto assembler)
  1858. parameter can be a value or an address. It's up to your code how it's handled
  1859.  
  1860.  
  1861. dbvm_initialize(offloados OPTIONAL) : Initializes the dbvm functions (dbk_initialize also calls this) offloados is a boolean that when set will offload the system onto dbvm if it's not yet running (and only IF the dbk driver is loaded)
  1862. dbvm_readMSR(msr): See dbk_readMSR
  1863. dbvm_writeMSR(msr, value): See dbk_writeMSR
  1864.  
  1865.  
  1866.  
  1867. onAPIPointerChange(function): Registers a callback when an api pointer is changed (can happen when the user clicks ok in settings, or when dbk_use*** is used. Does NOT happen when setAPIPointer is called)
  1868.  
  1869.  
  1870. setAPIPointer(functionid, address): Sets the pointer of the given api to the given address. The address can be a predefined address set at initialization by Cheat Engine, or an address you got from an autoassembler script or injected dll (When Cheat Engine itself was targeted)
  1871.  
  1872. functionid:
  1873. 0: OpenProcess
  1874. Known compatible address defines:
  1875. windows_OpenProcess
  1876. dbk_OpenProcess
  1877.  
  1878. 1: ReadProcessMemory
  1879. Known compatible address defines:
  1880. windows_ReadProcessMemory
  1881. dbk_ReadProcessMemory
  1882. dbk_ReadPhysicalMemory
  1883. dbvm_ReadPhysicalMemory
  1884.  
  1885. 2: WriteProcessMemory
  1886. Known compatible address defines:
  1887. windows_WriteProcessMemory
  1888. dbk_WriteProcessMemory
  1889. dbk_WritePhysicalMemory
  1890. dbvm_WritePhysicalMemory
  1891.  
  1892.  
  1893. 3: VirtualQueryEx
  1894. Known compatible address defines:
  1895. windows_VirtualQueryEx
  1896. dbk_VirtualQueryEx
  1897. VirtualQueryExPhysical
  1898.  
  1899. Extra variables defined:
  1900. dbk_NtOpenProcess : Address of the NtOpenProcess implementation in DBK32
  1901.  
  1902.  
  1903. The dbvm_ addresses should only be used with auto assembler scripts injected into Cheat Engine
  1904. dbvm_block_interrupts : Address of function dbvm_block_interrupts : DWORD; stdcall;
  1905. dbvm_raise_privilege : Address of function dbvm_raise_privilege : DWORD; stdcall;
  1906. dbvm_restore_interrupts: Address of function dbvm_restore_interrupts : DWORD; stdcall;
  1907. dbvm_changeselectors : Address of function dbvm_changeselectors(cs,ss,ds,es,fs,gs: dword): DWORD; stdcall;
  1908.  
  1909.  
  1910. D3DHOOK class:
  1911. The d3dhook functions provide a method to render graphics and text inside the game, as long as it is running in directx9, 10 or 11
  1912.  
  1913. createD3DHook(textureandcommandlistsize OPTIONAL, hookmessages OPTIONAL)
  1914. Hooks direct3d and allocates a buffer with given size for storage of for the rendercommand list
  1915.  
  1916. hookmessages defines if you want to hook the windows message handler for the direct3d window. The d3dhook_onClick function makes use of that
  1917.  
  1918.  
  1919. If no size is provided 16MB is used and hookmessages is true
  1920.  
  1921. Note: You can call this only once for a process
  1922.  
  1923. It returns a d3dhook object
  1924.  
  1925. properties
  1926. Width: Integer : The width of the screen (readonly)
  1927. Height: integer: The height of the screen (readonly)
  1928. DisabledZBuffer: boolean : Set this to true if you don't want previously rendered walls to overlap a newly rendered object (e.g map is rendered first, then the players are rendered)
  1929. WireframeMode: boolean : Set this to true if you don't want the faces of 3d objects to be filled
  1930. MouseClip: boolean : Set this if to true if you have one of those games where your mouse can go outside of the gamewindow and you don't want that.
  1931. OnClick: function(d3dhook_sprite, x, y)
  1932. A function to be called when clicked on an sprite (excluding the mouse)
  1933. x and y are coordinates in the sprite object. If sprites overlap the highest zorder sprite will be given. It does NOT care if a transparent part is clicked or not
  1934.  
  1935. Note: If you set this it can cause a slowdown in the game if there are a lot of sprites and you press the left button a lot
  1936.  
  1937. OnKeyDown: function(virtualkey, char)
  1938. function(vkey, char) : boolean
  1939. A function to be called when a key is pressed in the game window (Not compatible with DirectInput8)
  1940. Return false if you do not wish this key event to pass down to the game
  1941.  
  1942.  
  1943. methods
  1944. beginUpdate() : Use this function when you intent to update multiple sprites,textcontainers or textures. Otherwise artifacts may occur (sprite 1 might be drawn at the new location while sprite 2 might still be at the old location when a frame is rendered)
  1945. endUpdate() : When done updating, call this function to apply the changes
  1946. enableConsole(virtualkey): Adds a (lua)console to the specific game. The given key will bring it up (0xc0=tilde)
  1947. createTexture(filename) : Returns a d3dhook_texture object
  1948. createTexture(picture, transparentColor OPTIONAL): Returns a d3dhook_texture object
  1949. if the picture is not a transparent image the transparentcolor parameter can be used to make one of it's colors transparent
  1950.  
  1951. createFontmap(font) : Returns a d3dhook_fontmap object created from the given font
  1952. createSprite(d3dhook_texture): returns a d3dhook_sprite object that uses the given texture for rendering
  1953. createTextContainer(d3dhook_fontmap, x, y, text): Returns a d3dhook_textContainer object
  1954.  
  1955.  
  1956. D3DHook_Texture Class (Inheritance: Object)
  1957. This class controls the texture in memory. Without a sprite to use it, it won't show
  1958.  
  1959. properties
  1960. Height: integer (ReadOnly)
  1961. Width: integer (ReadOnly)
  1962. methods
  1963. loadTextureByPicture(picture)
  1964.  
  1965.  
  1966.  
  1967. D3DHook_FontMap Class (Inheritance: D3DHook_Texture->Object)
  1968. A fontmap is a texture that contains extra data regarding the characters. This class is used by the textcontainer
  1969. Current implementation only supports 96 characters (character 32 to 127)
  1970.  
  1971. properties
  1972. -
  1973. methods
  1974. changeFont(font): Changes the fontmap to the selected font
  1975. getTextWidth(string): Returns the width of the given string in pixels
  1976.  
  1977.  
  1978. D3DHook_RenderObject Class (Inheritance: Object)
  1979. The renderobject is the abstract class used to control in what manner objects are rendered.
  1980. The sprite and TextContainer classed inherit from this
  1981.  
  1982. properties
  1983. X: Float - The x-coordinate of the object on the screen
  1984. Y: Float - The y-coordinate of the object on the screen
  1985. CenterX: Float - X coordinate inside the object. It defines the rotation spot and affects the X position
  1986. CenterY: Float - Y " "
  1987. Rotation: Float - Rotation value in degrees (0 and 360 are the same)
  1988. Alphablend: Float - Alphablend value. 1.0 is fully visible, 0.0=invisible
  1989. Visible: boolean - Set to false to hide the object
  1990. ZOrder: integer - Determines if the object will be shown in front or behind another object
  1991. methods
  1992. -
  1993.  
  1994.  
  1995.  
  1996. D3DHook_Sprite Class (Inheritance: D3DHook_RenderObject->Object)
  1997. A d3dhook_sprite class is a visible texture on the screen.
  1998.  
  1999.  
  2000. properties
  2001. Width: Integer - The width of the sprite in pixels. Default is the initial texture width
  2002. Height: Integer - The height of the sprite in pixels. Default is the initial texture height
  2003. Texture: d3dhook_texture - The texture to show on the screen
  2004.  
  2005. methods
  2006. -
  2007.  
  2008.  
  2009. D3Dhook_TextContainer Class (Inheritance: D3DHook_RenderObject->Object)
  2010. A d3dhook_sprite class draws a piece of text on the screen based on the used fontmap.
  2011. While you could use a texture with the text, updating a texture in memory is slow. So if you wish to do a lot of text updates, use a textcontainer
  2012.  
  2013. properties
  2014. FontMap : The D3DHook_FontMap object to use for rendering text
  2015. Text : The text to render
  2016. methods
  2017. -
  2018.  
  2019.  
  2020.  
  2021.  
  2022. Disassembler Class (Inheritance: Object)
  2023.  
  2024.  
  2025.  
  2026. createDisassembler() - Creates a disassembler object that can be used to disassemble an instruction and at the same time get more data
  2027. getDefaultDisassembler() - Returns the default disassembler object used by a lot of ce's disassembler routines
  2028. getVisibleDisassembler() - Returns the disassembler used by the disassemblerview. Special codes are: {H}=Hex value {R}=Register {S}=Symbol {N}=Nothing special
  2029.  
  2030. registerGlobalDisassembleOverride(function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description): Same as Disassembler.OnDisassembleOverride, but does it for all disassemblers, including newly created ones. Tip: Check the sender to see if you should use syntax highlighting codes or not
  2031. This function returns an ID you can pass on to unregisterGlobalDisassembleOverride() 6.4+
  2032.  
  2033. unregisterGlobalDisassembleOverride(id)
  2034.  
  2035. properties
  2036. LastDisassembleData : Table
  2037. OnDisassembleOverride: function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description
  2038. syntaxhighlighting: boolean : This property is set if the syntax highlighting codes are accepted or not
  2039.  
  2040. Methods
  2041. disassemble(address): Disassembles the given instruction and returns the opcode. It also fills in a LastDisassembleData record
  2042. decodeLastParametersToString() : Returns the unedited "Comments" information. Does not display userdefined comments
  2043. getLastDisassembleData() : Returns the LastDisassembleData table.
  2044. The table is build-up as follow:
  2045. address: integer - The address that was disassembled
  2046. opcode: string - The opcode without parameters
  2047. parameters: string - The parameters
  2048. description: string - The description of this opcode
  2049. bytes: table - A table containing the bytes this instruction consists of (1.. )
  2050.  
  2051. modrmValueType: DisAssemblerValueType - Defines the type of the modrmValue field (dvtNone=0, dvtAddress=1, dvtValue=2)
  2052. modrmValue: Integer - The value that the modrm specified. modrmValueType defines what kind of value
  2053.  
  2054. parameterValueType: DisAssemblerValueType
  2055. parameterValue: Integer - The value that the parameter part specified
  2056.  
  2057. isJump: boolean - Set to true if the disassembled instruction can change the EIP/RIP (not ret)
  2058. isCall: boolean - Set to true if it's a Call
  2059. isRet: boolean - Set to true if it's a Ret
  2060. isConditionalJump: boolean - Set to true if it's a conditional jump
  2061.  
  2062.  
  2063.  
  2064. DissectCode class: (Inheritance: Object)
  2065. getDissectCode() : Created or returns the current code DissectCode object
  2066.  
  2067. properties:
  2068. methods:
  2069. clear() : Clears all data
  2070. dissect(modulename) : Dissects the memory of a module
  2071. dissect(base,size) : Dissect the specified memory region
  2072.  
  2073. addReference(fromAddress, ToAddress, type, OPTIONAL isstring):
  2074. Adds a reference. Type can be jtCall, jtUnconditional, jtConditional, jtMemory
  2075. In case of rtMemory setting isstring to true will add it to the referenced strings list
  2076.  
  2077. deleteReference(fromAddress, ToAddress)
  2078.  
  2079.  
  2080. getReferences(address) : Returns a table containing the addresses that reference this address and the type
  2081. getReferencedStrings(): Returns a table of addresses and their strings that have been referenced. Use getReferences to find out which addresses that are
  2082.  
  2083. saveToFile(filename)
  2084. loadFromFile(filename)
  2085.  
  2086.  
  2087.  
  2088. LuaPipe class: (Inheritance: Object)
  2089. Abstract class that LuaPipeServer and LuaPipeclient inherit from. It implements the data transmission methods
  2090.  
  2091. properties
  2092. Connected: boolean: True if the pipe is connected
  2093.  
  2094. methods
  2095. lock() : Acquire a lick on this pipe till unlock is called. If lock can not be acquired, wait. Recursive calls are allowed
  2096. unlock()
  2097. writeBytes(ByteTable, size OPTIONAL): Writes the provided byte table to the pipe. if size is not provided, the whole table is sent. Returns the number of bytes sent, or nil on failure
  2098. readBytes(size: integer): returns a byte table from the pipe, or nil on failure
  2099.  
  2100. readDouble(): Read a double from the pipe, nil on failure
  2101. readFloat(): Read a float from the pipe, nil on failure
  2102. readQword(): Read an 8 byte value from the pipe, nil on failure
  2103. readDword(): Read a 4 byte value from the pipe, nil on failure
  2104. readWord(): Read a 2 byte value from the pipe, nil on failure
  2105. readByte(): Read a byte from the pipe, nil on failure
  2106.  
  2107. readString(size: integer): Reads a string from the pipe, nil on failure. (Can support 0-byte chars)
  2108. readWideString(size: integer): Reads a widestring from the pipe, nil on failure
  2109.  
  2110. writeDouble(v: double): Writes a double to the pipe. Returns the number of bytes sent, nil on failure
  2111. writeFloat(v: single): writes a float to the pipe. Returns the number of bytes sent, nil on failure
  2112. writeQword(v: qword): writes an 8 byte value to the pipe. Returns the number of bytes sent, nil on failure
  2113. writeDword(v: dword): writes a 4 byte value to the pipe. Returns the number of bytes sent, nil on failure
  2114. writeWord(v: word): writes a word to the pipe. Returns the number of bytes sent, nil on failure
  2115. writeByte(v: byte): writes a byte to the pipe. Returns the number of bytes sent, nil on failure
  2116.  
  2117. writeString(str: string; include0terminator: boolean OPTIONAL); Writes a string to the pipe. If include0terminator is false or not provided it will not write the 0 terminator byte. Returns the number of bytes written, or nil on failure
  2118. writeWideString(str: widestring; include0terminator: boolean OPTIONAL); Writes a widestring to the pipe. If include0terminator is false or not provided it will not write the 0 terminator bytes. Returns the number of bytes written, or nil on failure
  2119.  
  2120. LuaPipeClient class: (Inheritance: LuaPipe>Object)
  2121. Class implementing a client that connects to a pipe
  2122.  
  2123. connectToPipe(pipename): Returns a LuaPipeClient connected to the given pipename. Nil if the connection fails
  2124.  
  2125. properties:
  2126. methods:
  2127. -
  2128.  
  2129. LuaPipeServer Class: (Inheritance: LuaPipe>Object)
  2130. Class launching the server side of a pipe
  2131.  
  2132. createPipe(pipename, inputsize OPTIONAL, outputsize OPTIONAL) : Creates a LuaPipeServer which can be connected to by a pipe client. InputSize and Outputsize define buffers how much data can be in the specific buffer before the writer halts. Default input and output size is 4096 for both
  2133.  
  2134. properties
  2135. valid: boolean - Returns true if the pipe has been created properly. False on failure (e.g wrong pipename)
  2136.  
  2137. methods
  2138. acceptConnection() - Waits for a client to connect to this pipe (Warning: Freezes the thread this is executed in)
  2139.  
  2140.  
  2141.  
  2142. openLuaServer(Name):
  2143. Opens a pipe with the given name. The LuaClient dll needs this name to connect to ce
  2144.  
  2145.  
  2146. LuaClient.dll functions:
  2147. BOOL CELUA_Initialize(char *name) : Initializes
  2148. UINT_PTR CELUA_ExecuteFunction(char *luacode, UINT_PTR parameter)
  2149. This function executes a lua function with parameters (parameter) and with the luacode as body Parameter will be treated as an integer
  2150. In short:
  2151. function(parameter)
  2152. <luacode>
  2153. end
  2154.  
  2155.  
  2156. the return value of this function is the return value of the lua function (integer)
  2157.  
  2158.  
  2159. Settings class
  2160. This class can be used to read out and set settings of cheat engine and of plugins, and store your own data
  2161.  
  2162. global functions
  2163. getSettings(path Optional): Settings - Returns a settings object. If path is nil it will points to the Cheat Engine main settings (Registry) . If name is provides the settings currently accessed will be the one at the subkey provided
  2164. Note: Keep in mind that it returns a new object each call, even if he same name is used multiple times
  2165.  
  2166.  
  2167. properties
  2168. Path: string - Gets/Sets the current subkey (nil if main)
  2169. Value[]: A table access into the settings. e.g: Value["Count"]=12
  2170.  
  2171. methods
  2172.  
  2173.  
  2174.  
  2175.  
  2176. SymbolList class
  2177. This class can be used to look up an address to a symbolname, and a symbolname to an address
  2178. It can also be registered with the internal symbol handler of cheat engine
  2179.  
  2180. This class makes use of a special "Symbol" table construction that contains size and optionally other data
  2181. Symbol Table:
  2182. modulename: string
  2183. searchkey: string
  2184. address: integer
  2185. symbolsize: integer
  2186.  
  2187. Global functions
  2188. createSymbolList() : Creates an empty symbollist
  2189.  
  2190.  
  2191.  
  2192.  
  2193. Properties
  2194. Methods
  2195. clear()
  2196. getSymbolFromAddress(address) : Searches the list for the given address. The address does not have to match the exact address. As long as it falls withing the range
  2197. getSymbolFromString(searchkey)
  2198. addSymbol(modulename, searchkey, address, symbolsize, skipAddressToSymbolLookup OPTIONAL, extradata OPTIONAL)
  2199. Adds a symbol to the symbollist
  2200. extradata is a table which can be used to fill in a return type and parameters for function calls. It has the following fields:
  2201. returntype: string
  2202. parameters: string
  2203.  
  2204.  
  2205.  
  2206. deleteSymbol(searchkey)
  2207. deleteSymbol(address)
  2208. register() : Registers the current symbol list with the symbol handler
  2209. unregister(): Unregisters the current symbol list from the symbol handler
  2210.  
  2211.  
  2212. Pagecontrol Class (WinControl->Control->Component->Object)
  2213. This is an object that can hold multiple pages
  2214.  
  2215. global functions
  2216. createPageControl(owner)
  2217. properties
  2218. ShowTabs: boolean - Shows the tabs
  2219. TabIndex: integer - Gets and sets the current tab
  2220. ActivePage: TabSheet - Returns the current tabsheet.
  2221. PageCount: integer - Gets the number of pages
  2222. Page[]: TabSheet - Get a specific page (TabSheet)
  2223. methods
  2224. addTab() : TabSheet - Creates a new TabSheet
  2225.  
  2226. TabSheet class (WinControl->Control->Component->Object)
  2227. Part of a page control. This object can contain other objects
  2228. properties
  2229. TabIndex: integer - the current index in the pagelist of the owning pagecontrol
  2230. methods
  2231.  
  2232.  
  2233. --]]
  2234.  
  2235. --[[
  2236. getSettingsForm(): Returns the main settings form
  2237. getMemoryViewForm() : Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from. There can be multiple memory views, but this will only find the original/base
  2238. getMainForm() : Returns the main form class object which can be accessed using the Form_ class methods and the methods of the classes it inherits from
  2239. getLuaEngine() : Returns the lua engine form object (Creates it if needed)
  2240. getApplication() : Returns the application object. (the titlebar)
  2241. getAddressList() : Returns the cheat table addresslist object
  2242. getFreezeTimer() : Returns the freeze timer object
  2243. getUpdateTimer() : Returns the update timer object
  2244. ]]
  2245.  
  2246. showMessage([[
  2247. CHECK CASHED V3 Beta
  2248. by Stromae
  2249.  
  2250. Changelog:
  2251. - DBVM! Few fixes are already included if you got errors -- see the "if you got problems" folder.
  2252. - Half-way getting full CE table support.
  2253. - Major changes: Full Cheat Engine recompilation and editing straight from the source code! Now that's something Nopde doesn't do :)
  2254.  
  2255. Any issues? Contact "Stromae" on V3rmillion with detailed information about the issue.
  2256. ]])
  2257.  
  2258. hideAllCEWindows()
  2259. if getProcessIDFromProcessName("RobloxPlayerBeta.exe") then
  2260. local engine = getLuaEngine();
  2261. engine:setCaption("CCv3 Lua | by Stromae");
  2262. engine:setVisible(true);
  2263. local mem = getMemoryViewForm();
  2264. mem:setCaption("CCv3 Memory Viewer | by Stromae")
  2265. activateProtection()
  2266. unhideMainCEwindow()
  2267. pause()
  2268. openProcess("RobloxPlayerBeta.exe")
  2269. unpause()
  2270. else
  2271. showMessage("Roblox is not opened :(")
  2272. closeCE()
  2273. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement