You are on page 1of 27

--This lua script gets loaded when Cheat Engine loads --You can use this to define some

often used functions and libraries you'd like to use require("defines") --[[ List of CE specific functions and variables: TrainerOrigin : A variable that contains the path of the trainer that launched c heat engine (Only set when launched as a trainer) getCEVersion(): Returns a floating point value specifying the version of cheat e ngine fullAccess(address,size): Changes the protection of a block of memory to writabl e and executable loadTable(filename, merge OPTIONAL): Loads a .ct or .cetrainer. If merge is prov ided and set to true it will not clear the old table saveTable(filename, protect OPTIONAL): Saves the current table. If protect is pr ovided and set to true and the filename has the .CETRAINER extension, it will pr otect it from reading normally note: addresses can be strings, they will get interpreted by ce's symbolhandler readBytes(address,bytecount, ReturnAsTable ) : returns the bytes at the given ad dress. If ReturnAsTable is true it will return a table instead of multiple bytes Reads the bytes at the given address and returns a table containing the read o ut bytes writeBytes(address, x,x,x,x,...) : Write the given bytes to the given address fr om a table writeBytes(address, table) : Write the given bytes to the given address from a t able readInteger(address) : Reads an integer from the specified address readQword(address): Reads a 64-bit integer from the specified address readFloat(address) : Reads a single precision floating point value from the spec ified address readDouble(address) : Reads a double precision floating point value from the spe cified address readString(address, maxlength, widechar OPTIONAL) : Reads a string till it encou nters 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 writeInteger(address,value) : Writes an integer to the specified address. Return s true on success writeQword(address, value): Write a 64-bit integer to the specified address writeFloat(address,value) : Writes a single precision floating point to the spec ified address. Returns true on success writeDouble(address,value) : Writes a double precision floating point to the spe cified address. Returns true on success writeString(address,text, widechar OPTIONAL) : Write a string to the specified a ddress. Returns true on success readBytesLocal(address,bytecount, ReturnAsTable) : See readBytes but then it's f or Cheat engine's memory

readIntegerLocal(address) : Reads an integer from the specified address in CE's memory readQwordLocal(address) : Reads a 64-bit integer from the specified address in C E's memory readFloatLocal(address) : Reads a single precision floating point value from the specified address in CE's memory readDoubleLocal(address) : Reads a double precision floating point value from th e specified address in CE's memory readStringLocal(address, maxlength, widechar OPTIONAL) writeIntegerLocal(address,value) : Writes an integer to the specified address in CE's memory. Returns true on success writeQwordLocal(address,value) : Writes a 64-bit integer to the specified addres s in CE's memory. Returns true on success writeFloatLocal(address,value) : Writes a single precision floating point to the specified address in CE's memory. Returns true on success writeDoubleLocal(address,value) : Writes a double precision floating point to th e specified address in CE's memory. Returns true on success writeStringLocal(address,string, widechar OPTIONAL) writeBytesLocal(address, x,x,x,x,...) : See writeBytes but then it's for Cheat E ngine's memory writeBytesLocal(address, table, , count) : See writeBytes but then it's for Chea t Engine's memory ansiToUtf8(string): Converts a string in Ansi encoding to UTF8 utf8ToAnsi(string): Converts a string in UTF8 encoding to Ansi Note: GUI components mainly show in UTF8, some other functions use Ansi, try to find out which ones... getAddress(string, local OPTIONAL): returns the address of a symbol. Can be a mo dulename or an export. set Local to true if you wish to querry the symboltable o f the ce process getModuleSize(modulename): Returns the size of a given module (Use getAddress to get the base address) reinitializeSymbolhandler(): reinitializes the symbolhandler. E.g when new modul es have been loaded errorOnLookupFailure(state): If set to true (default) address lookups in stringf orm will raise an error if it can not be looked up. This includes symbolnames th at are not defined and pointers that are bad. If set to false it will return 0 i n those cases (Useful for pointers that don't work 100% of the time) generateAPIHookScript(address, addresstojumpto, addresstogetnewcalladdress OPT) : Generates an auto assembler script which will hook the given address when exec uted 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) showMessage(text) : shows a messagebox with the given text messageDialog(text, type, buttons...) : pops up a messagebox with a specific ico n/sound with the specified buttons (mbok, mbyes, ....) sleep(milliseconds): pauses for the number of specified milliseconds (1000= 1 se c...) getProcesslist(Strings): Fills a Strings inherited object with the processlist o f the system. Format: %x-pidname getThreadList(List): fills a List object with the threadlist of the currently op ened process. Format: %x

function onOpenProcess(processid): If this function is defined it will be called whenever cheat engine opens a pr ocess.b3. and returns true on success loadPlugin(dllnameorpath): Loads the given plugin.b2 . showcommand OPTIONAL ): Executes a given command getTickCount() : Returns the current tickcount since windows was started. If none is open. parameters OPTIONAL. Returns nil on failure. folder OPTIONAL. bytecount.y) : returns the rgb value of the pixel at the specific screen coordi nate getMousePos: returns the x.b4)" and return an integer as result The value to bytes function should be defined as "function valuetobytes (integ er)" and return the bytes it should write registerCustomTypeAutoAssembler(script) Registers a custom type based on an auto assembler script. Note that the same process might be opened multiple times in a row getOpenedProcessID() : Returns the currently opened process.y coordinates of the mouse setMousePos(x. Each tick is one millisecond processMessages() : Lets the main eventhandler process the new messages (allows for new button clicks) integerToUserData(int): Converts a given integer to a userdata variable userDataToInteger(UserDataVar): Converts a given userdata variable to an intege r writeToClipboard(text): Writes the given text to the clipboard readFromClipboard(): Reads the text from the clipboard speedhack_setSpeed(speed) injectDLL(filename): Injects a dll. re turns 0 getProcessIDFromProcessName(name) : returns a processid openProcess(processid) : causes cheat engine to open the given processid openProcess(processname): causes cheat engine to find and open the given process pause() : pauses the current opened process unpause(): resumes the current opened process getPixel(x. On su ccess returns a value of 0 or greater registerCustomTypeLua(typename. bytestovaluefunction. valuetobytesfun ction) Registers a Custom type based on lua functions The bytes to value function should be defined as "function bytestovalue (b1. The script must all .y): sets the mouse position isKeyPressed(key) : returns true if the specified key is currently pressed keyDown(key) : causes the key to go into down state keyUp(key) :causes the key to go up doKeyPress(key) : simmulates a key press shellExecute(command.

. opcode and extra field getInstructionSize(address): Returns the size of an instruction (basically it di sassembles the instruction and returns the number of bytes for you) getPreviousOpcode(address): Returns the address of the previous opcode (this is just an estimated guess) . If initialized using a function itself it won't be able to get saved in the tabl e allocateSharedMemory(name. It the target process getForegroundProcess() : Returns the processID of the process that is currently on top cheatEngineIs64Bit(): Returns true if CE is 64-bit.opcode : extra" splitDisassembledString(disassembledstring): Returns 4 strings. byt es. size): Creates a shared memory object of the ize is not given and there is no shared ize of 4096 is used It then maps this shared memory block returns the address of mapped region in given size if it doesn't exist yet. You can initialize them using both a string of a functi onname or the function itself.x. If s region with this name then the default s into the currently targeted process. It can be control led with the stringlist_ routines (it's not recommended to destroy this list obj ect) AOBScan(x. If no change.ocate an "ConvertRoutine" and "ConvertBackRoutine" onAutoGuess(function) : Registers an function to be called whenever autoguess is used to predict a var iable type function override (address. false if 32-bit targetIs64Bit(): Returns true if the target process is 64-bit.x. false if 32-bit getCheatEngineDir(): Returns the folder Cheat Engine is located at disassemble(address): Disassembles the given address and returns a string in the format of "address . The address.bytes .x.g trainer table) unhideMainCEwindow() : shows the main cheat engine window getAutoAttachList(): returns the AutoAttach StringList object.. ceguess): Return the variable type you want it to be. don't forget to free this list when done Bytevalue of higher than 255 or anything not an integer will be seen as a wildca rd AOBScan(aobstring): see above but here you just input one string Regarding eventhandlers.): scans the currently opened process and returns a StringList object containing al l the results. just return ceguess closeCE() : just closes ce hideAllCEWindows() : makes all normal ce windows invisible (e..

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) getPropertyList(class) : Returns a stringlist object containing all the publishe d properties of the specified class (free the list when done) (Note. R13.g: You continued from the breakpoint in your script) . RBX. EBX. . R10. R9. E. R15 : The value of the register Debug related routines: function debugger_onBreakpoint(): When a breaking breakpoint hits (that includes single stepping) and the lua func tion debugger_onBreakpoint() is defined it will be called and the global variabl es EAX. RDX. EBP. R8. function): Sets the method property to th e specific function getMethodProperty(Class. propertyvalue) : Sets the value of a published property of a class (Won't work for method properties) getProperty(class. propertyname. RIP. EBX. will be filled in Return 0 if you want the userinterface to be updated and anything else if not (e .g: stringlist) setProperty(class. propertyname) : Gets the value of a published property of a c lass (Won't work for method properties) setMethodProperty(class. There can be multiple memory views. RBP. but this will only find the origina l/base getMainForm() : Returns the main form class object which can be accessed using t he Form_ class methods and the methods of the classes it inherits from getAddressList() : Returns the cheat table addresslist object getFreezeTimer() getUpdateTimer() undefined property functions. EIP 64-bit: RAX. propertyname. R14. R11. RSP. RDI. R12. EBX. Not all properties of all classes have been explic itly exposed to lua.beep() : Plays the fabulous beep/ping sound! getFormCount() : Returns the total number of forms assigned to the main CE appli cation getForm(index): Returns the form at the specific index getMemoryViewForm() : Returns the main memoryview form class object which can be accessed using the Form_ class methods and the methods of the classes it inheri ts from... ESP. not all cla ssed with properties have 'published' properties. propertyname): Returns a function you can use to call t he original function -debugging debug variables EFLAGS 32-bit: EAX. ECX. EDX. RSP. EDI. ESP..

debug OPTIONAL. baseaddress) : this routine is called when a module is loaded. if trigger is bptExecute then size is ignored. If trigger is ignored then it will be of type bptExecute. 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 entr ypoint debugProcess(interface OPT): starts the debugger for the currently opened proces s (won't ask the user) Optional interface: 0=default. size OPTIONAL. A dbvm upgrade in the future might make this work for windows vista and later) debug_setLastBranchRecording(boolean): When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens debug_getMaxLastBranchRecord() : Returns the maximum branch record your cpu can store (-1 if none) debug_getLastBranchRecord(index): Returns the value of the Last Branch Record at the given index (when handling a breakpoint) function debugger_onModuleLoad(modulename. co_stepinto(when on top of a call. Use Local memory access functions to rea d and modify xmmregnr can be 0 to 15 (0 to 7 on 32-bit) The following routines describe last branch recording. 3=Kerneldebug debug_setBreakpoint(address. which obviou sly also ignores the size then as well debug_removeBreakpoint(address) : if the given address is a part of a breakpoint it will be removed debug_continueFromBreakpoint(continueMethod) : if the debugger is currently wait ing to continue you can continue with this. parameters OPTIONAL. These functions only work when kernelmode debugging is used and using windows XP (vista and later work le ss effective or not at all because the operating system interferes. Only works for the windows debug ger return 1 if you want to cause the debugger to break Changing registers: When the debugger is waiting to continue you can change the register variables. 1=windows debug. Valid parameters are :co_run (just c ontinue). 2=VEHDebu g. When you continue those register values will be set in the thread's context detachIfPossible() : Detaches the debugger from the target process (if it was at tached) class helper functions . Might also be intel specific. follow it). trigger OPTIONAL) : sets a breakpoin t of a specific size at the given address.createProcess(path. breakonentrypoint OPTIO NAL) : Creates a process. co_stepover (when on to p of a call run till after the call) debug_getXMMPointer(xmmregnr) : Returns the address of the specified xmm register of the thread that is curren tly broken This is a LOCAL Cheat Engine address.

inheritsFromObject(class): Returns true if given any class inheritsFromComponent(class): Returns true if the given object inherits from the Component class inheritsFromControl(class): Returns true if the given object inherits from the C ontrol class inheritsFromWinControl(class): Returns true if the given object inherits from th e WinControl class Class definitions Object class: (Inheritance: ) object_getClassName(object): Returns the classname of the given object object_destroy(object) : Destroys the object (basically everything inherits from this class) Component Class: (Inheritance: Object) component_getComponentCount(Component) : Returns the number of components attach ed to his component component_getComponent(Component. index) : Returns the specific component component_findComponentByName(component. width.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) control_getPosition(contron): returns the x and y position of the object (relati ve to the client array of the owner object) control_setSize(control. functionnameorstring) : Sets the onclick routine control_doClick(control): Executes the current function under onClick . All the gui o bjects fall in this category control_getCaption(control) : Returns the text of the control control_setPosition(control. caption) : sets the text on a control.height) : Sets the width and height of the contro l control_getSize(control) : Sets the size of the control control_setAlign(control. boolean) : sets the visible state of the control control_getColor(control) : gets the color control_setColor(control. boolean) : Sets the enabled state of the control control_getVisible(control) : gets the visible state of the control control_setVisible(control. tagvalue) : Get the tag value component_getOwner(Component) : Returns the owner of this component Control Class: (Inheritance: Component->Object) control_setCaption(control. newname) : Changes the name component_getTag(Component) : Sets an integer value. x. wincontrol) : Sets the parent for this control control_getPopupMenu(control) control_setPopupMenu(control) control_getFont(label): Returns the Font object of this object control_onClick(control. alignmentoption): sets the alignment of the control control_getAlign(control. alignmentoption): gets the alignment of the control control_getEnabled(control) : gets the enabled state of the control control_setEnabled(control. rgb) : Sets the color control_getParent(control) : Returns nil or an object that inherits from the Win control class control_setParent(control. name) : Returns the component with this name component_getName(Component) : Return the name component_setName(Component. You can use this for ID's component_setTag(Component.

menuitem) : Adds a menuItem as a submenu item menuItem_insert(menuitem.index) : Returns a WinControl class object wincontrol_getControlAtPos(wincontrol. x1. y2): Adds a rectangle to the region region_addPolygon(region. x2. {0.y): Gets the control at the given x. function) : Sets an onEnter event. index) : Returns the menuitem object at the given ind ex menuItem_add(menuitem. index) menuItem_onClick(menuitem.100}} for a triangle ) WinControl Class: (Inheritance: Control->Component->Object) wincontrol_getControlCount(wincontrol) Returns the number of Controls attached to this class wincontrol_getControl(wincontrol. x.100}. (Triggered on focus enter) wincontrol_onExit(wincontrol. caption) : Sets the caption of the menu item menuItem_getShortcut(menuitem): Returns the shortcut for this menu item menuItem_setShortcut(menuitem. shortcut): Sets the shortcut for this menuitem. function) : Sets an onClick event menuItem_doClick(menuitem): Executes the onClick method if one is assigned Menu Class: (Inheritance: Component->Object) menu_getItems(menu) : Returns the MenuItem of this Menu MainMenu Class: (Inheritance: Menu->Component->Object) createMainMenu(form) The mainmenu is the menu at the top of a window PopupMenu Class: (Inheritance: Menu->Component->Object) createPopupMenu(owner) The popup menu is the menu that popus up when showing the (rightclick) context of an control Strings Class: (Inheritance : Object) (Mostly an abstract class) strings_clear(list) : Deletes all strings in the list .y position relative to the wincontrol's position wincontrol_canFocus(wincontrol): returns true if the object can be focused wincontrol_focused(wincontrol): returns boolean true when focused wincontrol_setFocus(wincontrol): tries to set keyboard focus the object wincontrol_setShape(wincontrol. menuitem): Adds a menuItem as a submenu item at the given index menuItem_delete(menuitem. tablewithcoordinates): Adds an array of 2D locations. index.0}. Bitmap): wincontrol_onEnter(wincontrol.{100. A shortcut is a string in the form of ("ctrl+x") menuItem_getCount(menuitem) menuItem_getItem(menuitem.Region Class : (Region->GraphicsObject->Object) createRegion(): Created an empty region region_addRectangle(region. Region): Sets the region object as the new shape for this wincontrol wincontrol_setShape(wincontrol. y1. function) : Sets an onExit event. (Triggered on lo st focus) MenuItem class(Inheritance: Component->Object) createMenuItem(ownermenu) : Creates a menu item that gets added to the owner men u menuItem_getCaption(menuitem) : Gets the caption of the menu item menuItem_setCaption(menuitem. (example : {{0.

string): Returns the index of the specified string. filename): Saves a userdefined form. Removes the given string from the list strings_loadFromFile(list. index) : gets the string at the given index strings_setString(list. index. : Places the form at the center of the screen form_hide(form) : Hide the form form_show(form) : show the form form_close(form): Closes the form. Return s -1 if not found strings_insert(list. dupAccept. Without an onClose this will be the same as hide form_showModal(form) : show the form and wait for it to close and get the close result form_isForegroundWindow(form): returns true if the specified form has focus form_onClose(form. borderstyle): Sets the borderstyle of the window form_getBorderStyle form_getDoNotSaveInTable(form): Returns the DoNotSaveInTable property form_setDoNotSaveInTable(form. (DOES NOT WORK ON NOR MAL FORMS LIKE MAINFORM) form_centerScreen(form). Duplicates) : Sets the duplicates property (dupIg nore. boolean): Sets the case sensitive property Form Class: (Inheritance: ScrollingWinControl->CustomControl->WinControl->Contro l->Component->Object) createForm(visible OPT): creates a Form class object(window) and returns the poi nter for it. function) : function (sender) : Return a CloseAction to dete rmine how to close the window form_getMenu(form) : Returns the mainmenu object of this form form_setMenu(form. filename) : Save the strings to a textfile strings_getString(list. index. string) : Replaces the string at the given index Stringlist Class: (Inheritance : Strings->Object) createStringlist() : Creates a stringlist class object (for whatever reason. mainmenu) form_setBorderStyle(form. boolean): Sets the DoNotSaveInTable property . boolean) : Sets the sorted property stringlist_getCaseSensitive(list) : Returns true if the case sensitive property is set stringlist_setCaseSensitive(list. string) : adds a string to the list strings_delete(list. Visible is default true but can be changed createFormFromFile(filename): Returns the generated form form_saveToFile(form.strings_add(list. lua strings are probably easier to use) stringlist_getDuplicates(list) : returns the duplicates property stringlist_setDuplicates(list. string): Inserts a string at a specific spot moving the items after it strings_getCount(list): Returns the number is strings in the list strings_remove(list. filename) : Load the strings from a textfile strings_saveToFile(list. index) : Deletes a string from the list strings_getText(strings) : Returns all the strings as one big string strings_setText(strings) : Sets the strings of the given strings object to the g iven text (can be multiline) strings_indexOf(list. dupError) stringlist_getSorted(list) : returns true if the list has the sorted property stringlist_setSorted(list. string).

Useful for borderless windows (Draggi ng will stop when the mouse button is released) GraphicControl Class: (Inheritance: Control->Component->Object) graphicControl_getCanvas(graphiccontrol) : Returns the Canvas object for the giv en object that has inherited from customControl Label Class: (Inheritance: GraphicControl->Control->Component->Object) createLabel(owner): Creates a Label class object which belongs to the given owne r. Owner can be any object inherited from WinControl image_loadImageFromFile(image. Owner can be any object inherited from WinControl Splitter Class: (Inheritance: CustomControl->WinControl->Control->Component->Obj ect) createSplitter(owner): Creates a Splitter class object which belongs to the give n owner. BevelWidth) panel_getFullRepaint(panel) panel_setFullRepaint(panel. rasterimage): Draws the contents of the form to a rasterimage class object form_dragNow(form): Call this on mousedown on any object if you wish that the m ousemove will drag the whole form arround. filename) image_stretch(image. boolean) image_transparent(image. Owner can be any object inherited from WinControl Panel Class: (Inheritance: CustomControl->WinControl->Control->Component->Object ) createPanel(owner): Creates a Panel class object which belongs to the given owne r. PanelBevel) panel_getBevelOuter(panel) panel_setBevelOuter(panel. alignment) : sets the alignment property panel_getBevelInner(panel) panel_setBevelInner(panel. boolean) image_getCanvas(image) image_getPicture(image) : Returns the Picture object of this image Edit Class: (Inheritance: WinControl->Control->Component->Object) createEdit(owner): Creates an Edit class object which belongs to the given owner . boolean) Image Class: (Inheritance: GraphicControl->Control->Component->Object) createImage(owner): Creates an Image class object which belongs to the given own er. Owner can be any object inherited from WinControl edit_clear(edit) edit_selectAll(edit) edit_clearSelection(edit) edit_copyToClipboard(edit) edit_cutToClipboard(edit) . Owner can be any object inherited from WinControl panel_getAlignment(panel) : gets the alignment property panel_setAlignment(panel.form_printToRasterImage(form. PanelBevel) panel_getBevelWidth(panel) panel_setBevelWidth(panel.

boolean) memo_getWantReturns(memo) memo_setWantReturns(memo. cbC hecked. boolean) checkbox_getState(checkbox): Returns a state for the checkbox. scrollbarenumtype) : Sets the scrollbars.. Horizontal only takes affect when wordwrap is disabled valid enum types: ssNone : No scrollbars ssHorizontal: Has a horizontal scrollbar ssVertical: Has a vertical scrollbar ssBoth: Has both scrollbars ssAutoHorizontal: Same as above but only shows when there actually is someth ing to scroll for ssAutoVertical: " " " " .. function) Memo Class: (Inheritance: Edit->WinControl->Control->Component->Object) createMemo(owner): Creates a Memo class object which belongs to the given owner. mr) CheckBox Class: (Inheritance: ButtonControl->WinControl->Control->Component->Obj ect) createCheckBox(owner): Creates a CheckBox class object which belongs to the give n owner. function) ToggleBox Class: (Inheritance: CheckBox->ButtonControl->WinControl->Control->Com ponent->Object) createToggleBox(owner): Creates a ToggleBox class object which belongs to the gi ven owner. ButtonControl Class: (Inheritance: WinControl->Control->Component->Object) Button Class: (Inheritance: ButtonControl->WinControl->Control->Component->Objec t) createButton(owner): Creates a Button class object which belongs to the given ow ner. boolean) memo_getScrollbars(memo) memo_setScrollbars(memo. (cbUnchecked. ssAutoBoth: " " " " .. Owner can be any object inherited from WinControl button_getModalResult(button) button_setModalResult(button. cbGrayed) checkbox_setState(checkbox.edit_pasteFromClipboard(edit) edit_onChange(edit. Owner can be any object inherited from WinControl memo_append(memo. boolean): Sets the state of the checkbox checkbox_onChange(checkbox. Owner can be any object inherited from WinControl GroupBox Class: (Inheritance: WinControl->Control->Component->Object) createGroupBox(owner): Creates a GroupBox class object which belongs to the give . boolean) memo_getWantTabs(memo) memo_setWantTabs(memo.string) memo_getLines(memo) : returns a Strings class memo_getWordWrap(memo) memo_setWordWrap(memo.. Owner can be any object inherited from WinControl checkbox_getAllowGrayed(CheckBox) checkbox_setAllowGrayed(CheckBox.

integer) progressbar_getPosition(progressbar) progressbar_setPosition(progressbar. function) ListBox Class: (Inheritance: WinControl->Control->Component->Object) createListBox(owner): Creates a ListBox class object which belongs to the given owner. integer) progressbar_getMin(progressbar) progressbar_setMin(progressbar. Owner can be any object inherited from WinControl progressbar_stepIt(progressbar) progressbar_stepBy(progressbar. delta) progressbar_getMax(progressbar) progressbar_setMax(progressbar. Owner can be any object inherited from WinControl radiogroup_getRows(radiogroup): Returns the number of rows radiogroup_getItems(radiogroup): Returns a Strings object radiogroup_getColumns(radiogroup): Returns the nuber of columns radiogroup_setColumns(radiogroup.n owner. integer) TrackBar Class : (Inheritance: WinControl->Control->Component->Object) createTrackBar(owner): Creates a TrackBar class object which belongs to the give n owner. Owner can be any object inherited from WinControl RadioGroup class: (Inheritance: GroupBox->WinControl->Control->Component->Object ) createRadioGroup(owner): Creates a RadioGroup class object which belongs to the given owner. Owner can be any object inherited from WinControl combobox_clear(combobox) combobox_getItems(combobox) combobox_getItemIndex(combobox) combobox_setItemIndex(combobox) combobox_getCanvas(combobox) ProgressBar Class: (Inheritance: WinControl->Control->Component->Object) createProgressBar(owner): Creates a ProgressBar class object which belongs to th e given owner. Owner can be any object inherited from WinControl trackbar_getMax(trackbar) trackbar_setMax(trackbar. count) radiogroup_getItemIndex(radiogroup) radiogroup_setItemIndex(radiogroup) radiogroup_onClick(radiogroup. Owner can be any object inherited from WinControl listbox_clear(listbox) listbox_getItems(listbox): Returns a strings object listbox_getItemIndex(listbox) listbox_setItemIndex(listbox.index) listbox_getCanvas(listbox) ComboBox Class: (Inheritance: WinControl->Control->Component->Object) createComboBox(owner): Creates a ComboBox class object which belongs to the give n owner. integer) trackbar_getPosition(progressbar) . integer) trackbar_getMin(trackbar) trackbar_setMin(trackbar.

index) .trackbar_setPosition(progressbar. index): Returns a ListColum object. function) CollectionItem Class: (Inheritance: Object) usually not used by lua users but just defining it here for future usage ListColumn class: (Inheritance: CollectionItem->Object) listcolumn_setAutosize(listcolumns. index) : Return the listitem object at the given index listitems_add(listitems): Returns a new ListItem object Listview Class : (Inheritance: WinControl->Control->Component->Object) createListView(owner): Creates a ListView class object which belongs to the give n owner. width) Collection Class: (Inheritance: TObject) collection_clear(collection) collection_getCount(collection) collection_delete(collection. Owner can be any object inherited from WinControl listview_clear(listview) listview_getColumns(listview): Returns a ListColumns object listview_getItems(listview) : Returns a ListItems object listview_getItemIndex(listview) listview_setItemIndex(listview. index) ListColumns class : (Inheritance: Collection->Object) listcolumns_add(listcolumns): Returns a new ListColumn object listcolumns_getColumn(listcolumns. width) listcolumn_getWidth(listcolumns) listcolumn_setWidth(listcolumns. state): Sets the checkbox of the listbox to the gi ven state listitem_getSubItems(listitem): Returns a Strings object ListItems class : (Inheritance: TObject) listitems_clear(listitems) listitems_getCount(listitems) listitems_getItem(li. integer) trackbar_onChange(trackbar. string) : Sets the first column string of the list item listitem_getChecked(listitem) : Returns true if the listitem is checked listitem_setChecked(listitem. boolean) listcolumn_getCaption(listcolumns) listcolumn_setCaption(listcolumns. width) listcolumn_getMinWidth(listcolumns) listcolumn_setMinWidth(listcolumns. ListItem Class : (Inheritance: TObject) listitem_delete(listitem) listitem_getCaption(listitem) : Returns the first columns string of the listitem listitem_setCaption(listitem. caption) listcolumn_getMaxWidth(listcolumns) listcolumn_setMaxWidth(listcolumns.

If enabled is not given it will be enabled by default (will start as soon as an onTimer event has been assigned) Owner may be nil.y1.dest_y2. x.y.x2.y2) canvas_textOut(canvas. x1. stopcolor.y) canvas_line(canvas.x2. sourceCanvas. x.y1.y.y1.y2. function) timer_getEnabled(timer) timer_setEnabled(timer. but you will be responsible for destroying it instead of bei ng the responsibility of the owner object) timer_setInterval(timer. x. boolean) CustomControl class (CustomControl->WinControl->Control->Component->Object) customControl_getCanvas(customcontrol) : Returns the Canvas object for the given object that has inherited from customControl Canvas Class : (Inheritance: CustomCanvas->Object) canvas_getBrush(canvas): Returns the brush object of this canvas canvas_getPen(canvas): Returns the pen object of this canvas canvas_getFont(canvas): Returns the font object of this canvas canvas_getWidth(canvas) canvas_getHeight(canvas) canvas_getPenPosition(canvas) canvas_setPenPosition(canvas.y) canvas_ellipse(canvas. sourcex.listview_getCanvas(listview) Timer Class : (Inheritance: Component->object) createTimer(owner. destinationx. x. width) Brush Class : (Inheritance: CustomBrush->CanvasHelper->Object) brush_getColor(brush) brush_setColor(brush) Font Class : (Inheritance: CustomFont->CanvasHelper->Object) . interval) : Sets the speed on how often the timer shoul d trigger. x.dest_x2. graphic) : Draw the image of a specific Graphic class Pen Class : (Inheritance: CustomPen->CanvasHelper->Object) pen_getColor(pen) pen_setColor(pen. color) pen_getWidth(pen) pen_setWidth(pen. x1. dest_x1.y1. In milliseconds (1000=1 second) timer_onTimer(timer. text) canvas_getTextHeight(canvas. sour ce_x1. Direction can be 0 or 1.y) canvas_setPixel(canvas.x2.dest_y1. text) canvas_getPixel(canvas. sourcey. enabled OPT): Creates a timer object.y2) canvas_gradientFill(canvas. direction) : Gra dient fills a rectangle. startcolor. x1. x1. x. 0=Vertical 1=Horizontal canvas_copyRect(dest_canvas. text) canvas_getTextWidth(canvas.source_y2) canvas_draw(canvas.source_y1.y. destinationx.source_x2.color) canvas_floodFill(canvas. destinationy) canvas_rect(canvas. destinationy) canvas_lineTo(canvas.x2.y2) canvas_fillRect(canvas.

pf16bit.. pf32bit (recommended) rasterimage_setTransparent(rasterimage. sourcepicture) picture_getGraphic(picture) : Gets the Graphic object of this picture picture_getPNG(picture): Returns a PortableNetworkGraphic Class object (Can be u sed from scratch) picture_getBitmap(picture): Returns a Bitmap Class object (Can be used from scra tch) picture_getJpeg(picture): Returns a JpegImage Class object (Picture must be init ialized with a jpeg file first) GenericHotkey Class : (Inheritance: Object) createHotkey(function. color): Sets the color that will be rendered as transparent when drawn rasterimage_getTransparentColor(rasterimage): Returns the color set to be trans parent Bitmap class: (Inheritance: CustomBitmap->RasterImage->Graphic->Object) : Bitmap based Graphic object PortableNetworkGraphic Class: (Inheritence: TCustomBitmap->RasterImage->Graphic>Object) JpegImage Class: (Inheritence: TCustomBitmap->RasterImage->Graphic->Object) Picture Class : (Inheritance: Object) : Container for the Graphic class createPicture() : Returns a empty picture object picture_loadFromFile(picture. pf24bit. pf15bit.createFont(): Returns a font object font_getName(font): Gets the fontname of the font font_setName(font): Sets the fontname of the font font_getSize(font): Gets the size of the font font_setSize(font): Sets the size of the font font_getColor(font): Gets the color of the font font_setColor(font): Sets the color of the font Graphic Class : (Inheritance: Object) : Abstract class graphic_getWidth(graphic): Gets the current width in pixels of this graphics obj ect graphic_setWidth(graphic.) : returns an initialized GenericHotkey class ob . height) RasterImage class: (Inheritance: Graphic->Object) : Base class for some graphica l controls rasterimage_getCanvas(RasterImage): Returns the Canvas object for this image rasterimage_getPixelFormat((rasterimage): Returns the current pixelformat rasterimage_setPixelFormat(rasterimage. stream.state): Will set the image to support tr ansparency or not rasterimage_getTransparent(rasterimage): Returns true if the image supports tra nsparency rasterimage_setTransparentColor(rasterimage. originalextension OPTIONAL) picture_assign(picture. . pf8bit. key. width): Sets thw width in pixels graphic_getHeight(graphic) graphic_setHeight(graphic. Will clear the current image if it had one. Supported pixelformats: pf1bit.. filename) picture_loadFromStream(picture. pixelformat): Sets the pixelformat for this image. pf4bit.

(Does not d estroy the old one.x trainers 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 cheatcomponent_setActive(cheatcomponent. sourceaddress. key. OPTIONAL noloop) xmplayer_pause() xmplayer_resume() xmplayer_stop() xmplayer_isPlaying() writeRegionToFile(filename. OPTIONAL noloop) xmplayer_playXM(tablefile.. filename) tablefile_getData(tablefile.) generichotkey_onHotkey(hotkey.size) : Writes the given region to a f ile. . boolean. so memory leak) CheatComponent Class: (Inheritance: WinControl->Control->Component->Object) The cheatcomponent class is the component used in Cheat Engine 5. deactivatetime OPTIONAL) : set s the cheat object's Active color to enabled or disabled.g one hit cheats like increase by) cheatcomponent_getActive(cheatcomponent) cheatcomponent_setDescription(cheatcomponent.. function) OpenDialog Class: (Inheritance: FileDialog->CommonDialog->Component->Object) openDialog_execute(openDialog): Shows the dialog and returns the string to the s elected file SaveDialog Class: (Inheritance: OpenDialog->FileDialog->CommonDialog->Component>Object) MemoryStream Class (Inheritance: Stream->Object) FileStream Class (Inheritance: HandleStream->Stream->Object) TableFile class (Inheritance: Object) tablefile_saveToFile(tablefile. string) cheatcomponent_getHotkey(cheatcomponent) cheatcomponent_setDescriptionLeft(cheatcomponent. integer) cheatcomponent_getHotkeyLeft(cheatcomponent) cheatcomponent_getEditValue(cheatcomponent) : Returns the text from the editbox of this component . destinationaddress) resetLuaState(): This will create a new lua state that will be used. Returns the number of bytes written readRegionFromFile(filename. integer) cheatcomponent_getDescriptionLeft(cheatcomponent) cheatcomponent_setHotkeyLeft(cheatcomponent. filename) : Gets a MemoryStream object findTableFile(filename): Returns the TableFile class object for the saved file xmplayer_playXM(filename. Maximum of 5 keys generichotkey_setKeys(hotkey. string) cheatcomponent_getDescription(cheatcomponent) cheatcomponent_setHotkey(cheatcomponent. OPTIONAL noloop) xmplayer_playXM(Stream.ject.. The deactivatetime par ameter turns the active color off automatically after the given time in millisec onds (e.

If before is true returning false will cause the activa tion to stop memoryrecord_onDeactivate(memoryrecord. 0=freeze. currentstate): boolean. updownfreeze is optional. function): function (memoryrecord. (vtByte to vtCustom) memoryrecord_setType(te. befor e. value): sets the value of a cheat table entry memoryrecord_getScript(te) : If the entry is of type vtAutoAssembler then you ca n get the script with this routine memoryrecord_setScript(te. description): sets the specified description for this entry memoryrecord_getDescription(te): gets the current description of this entry memoryrecord_getAddress(te): returns the address. updownfreeze OPTIONAL): sets the entry to frozen state. hotkeyfunction): function (hotkey) memoryrecordhotkey_getOwner(hotkey): Returns the MemoryRecord this hotkey belong s to memoryrecordhotkey_doHotkey(hotkey): Executes the hotkey as if it got triggered by the keyboard MemoryRecord Class: memoryrecord_getID(memoryrecord) memoryrecord_getHotkeyCount(memoryrecord) memoryrecord_getHotkey(memoryrecord. This way you can always find the hotkey even if the order of hot keys has changed (or deleted) memoryrecord_onActivate(memoryrecord. If before is true returning false will cause the deac tivation to stop memoryrecord_onDestroy(memoryrecord. boolean): memoryrecord_binary_getStartbit(te): . currentstate): boolean. You can give as many offsets as you need memoryrecord_getType(te) : returns the Variable type. colorrgb): Sets the color of the entry memoryrecord_appendToEntry(te. value): Sets the text on an editbox MemoryRecordHotkey Class: (Inheritance: object) memoryrecordhotkey_getDescription(hotkey) memoryrecordhotkey_getHotkeyString(hotkey) memoryrecordhotkey_getID(hotkey) memoryrecordhotkey_onHotkey(hotkey. 2=allow decrease memoryrecord_unfreeze(te) :unfreezes an entry memoryrecord_setColor(te. function): function (memoryrecord) : Called when a memory record is destroyed memoryrecord_setDescription(te. before. integer): memoryrecord_string_getUnicode(te): memoryrecord_string_setUnicode(te. script) memoryrecord_isActive(te) memoryrecord_freeze(te. 1=allow increase.address. vartype) : sets the type of the entry memoryrecord_getValue(te): returns the current value of the cheat table entry as a string memoryrecord_setValue(te. function): function (memoryrecord.offsets OPTIONAL) : Sets the address of a ent ry. ID): Every hotkey in a memoryrecord get s an unique ID.cheatcomponent_setEditValue(cheatcomponent. If it is a pointer it returns a secondary return value which is a table which starts as base address followed by the offset) memoryrecord_setAddress(te.te) : Adds the entry to another entry memoryrecord_string_getSize(te): memoryrecord_string_setSize(te. hotkeyfunction): function (hotkey) memoryrecordhotkey_onPostHotkey(hotkey. index): Returns a memoryrecordhotkey class memoryrecord_getHotkeyByID(memoryrecord.

integer): memoryrecord_aob_getSize(te): memoryrecord_aob_setSize(te. or just a hexadecimal string depending on what add ress inModule(address) : returns true if the given address is inside a module inSystemModule(address) : returns true if the given address is inside a system m odule getCommonModuleList: Returns the commonModuleList stringlist. integer): memoryrecord_binary_getSize(te): memoryrecord_binary_setSize(te. ID) addresslist_createMemoryRecord(addresslist) : createTableEntry: creates an gener ic cheat table entry and add it to the list..memoryrecord_binary_setStartbit(te. integer): memoryrecord_isSelected(te): Returns true or false depending on if it's current ly selected or not memoryrecord_delete(te) : It's unknown what this function does.. index) addresslist_getMemoryRecordByDescription(addresslist. If donotsave is true this symbol will not get saved when the table is s aved unregisterSymbol(symbolname) getNameFromAddress(address): Returns the given address as a string. all that is know n is that after using this command other memrec routines with this table entry v alue don't work anymore. (Do not free this one) . Addresslist Class: addresslist_getCount(addresslist) addresslist_getMemoryRecord(addresslist. This will unselect all other entries registerSymbol(symbolname. Registered s ymbolname. memrec) : Sets the currently selected memoryrecord. Returns a tableentry pointer you ca n use with memrec routines addresslist_getSelectedRecords(Addresslist): Returns a table of all the selecte d records addresslist_doDescriptionChange(addresslist) : Will show the gui window to chang e the description of the selected entry addresslist_doAddressChange(addresslist) : Will show the gui window to change th e address of the selected entry addresslist_doTypeChange(addresslist) : Will show the gui window to change the t ype of the selected entries addresslist_doValueChange(addresslist) : Will show the gui window to change the value of the selected entries addresslist_getSelectedRecord(addresslist) : Gets the main selected memoryrecord addresslist_setSelectedRecord(addresslist. address. modulename+offset. OPTIONAL donotsave): Registers a userdefined symbol. description): getTableEntr y(descriptionname): returns a tableEntry pointer for use with memrec functions addresslist_getMemoryRecordByID(addresslist.

X=Executable W=Writable memory C=Copy On Write. roundingtype..0 to 3. If exact value is "3.0" it includes 2.to indicate that that flag MUST NOT be set. (* sets it to do n't care) Examples: +W-C = Writable memory exluding copy on write and doesn't care about the Exe cutable flag +X-C-W = Find readonly executable memory +W = Finds all writable memory and don't care about copy on write or execute "" = Find everything (is the same as "*X*C*W" ) alignmenttype is an integer: 0=No alignment check 1=Address must be dividable by alignmentparam 2=Address must end with alignmentparam alignmentparam is a string which either holds the value the addresses must be di vidable by or what the last digits of the address must be createMemScan(progressbar OPTIONAL) : Returns a new MemScan class object getCurrentMemscan() : Returns the current memory scan object.00 to 3. If exact value = "3" then it includes 3.99999999. If exact value = "3" then it includes 2. Valid variable types are: vtByte vtWord 2 bytes vtDword 4 bytes vtQword 8 bytes vtSingle float vtDouble vtString vtByteArray vtBinary vtAll roundingtype: Defined the way scans for exact value floating points are handle d rtRounded : Normal rounded scans.AOBScan("aobstring". input1. If exact value is "3.49999999.99999999.0" it includes 3.alignmenttype . iscasesensitive). If exact value = "3" then it includes 3.0 000001 to 3. If tabs are used t he current tab's memscan object MemScan Class (Inheritance: Object) memscan_firstScan(memscan. isunicodescan.900000001 to 3. protectionflags OPTIONAL.0 t o 3.0499999999 rtTruncated: Truncated algoritm. alignmenttype OPTIONAL.00 to 3. Add a + to indicate that flag MUST be set and a .protectionflags .st artAddress .09999 . vartype.isHex adecimalInput . scan vartype: Defines the variable type. Does an initial scan. alignment param HALFOPTIONAL): protectionflags is a string. memscan: The MemScan object created with createMemScan scanOption: Defines what type of scan is done..099999999 rtExtremerounded: Rounded Extreme.. scanoption.. If exact value is "3. Valid values for firstscan are: soUnknownValue: Unknown initial value scan soExactValue: Exact Value scan soValueBetween: Value between scan soBiggerThan: Bigger than . input2 .0" it includes 3.isNotABinaryString."alignmentparam" . scan soSmallerThan: smaller than .stopAddress .

(You want to set this to 0 xffffffffffffffff) protectionflags : See aobscan about protectionflags alignmenttype : Scan alignment type.0" it includes 2.99999999. sav edresultname OPTIONAL).09999 9999 input1: If required by the scanoption this is a string of the given variable t .99999999.00 to 3. If exact value = "3" then it includes 3. Does a next scan based on the current addresslist and values of the previous s can or values of a saved scan memscan: The MemScan object that has previously done a first scan scanoption: soExactValue: Exact Value scan soValueBetween: Value between scan soBiggerThan: Bigger than . isHexadecimal Input.49999999. If exact value = "3" then it includes 3.0 000001 to 3.099999999 rtExtremerounded: Rounded Extreme.9999 input1: If required by the scanoption this is a string of the given variable t ype input2: If requires by the scanoption this is the secondary input startAddress : The start address to scan from. ispercentagescan.00 to 3. If exact value is "3. You want to set this to 0 stopAddress : The address the scan should stop at.0 to 3. iscasesensitive. isunicodescan. If exact value is "3.0 t o 3. isHexadecimalInput: When true this will handle the input field as a hexadecima l string else decimal isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string isunicodescan: When true and the vartype is vtString this will do a unicode (u tf16) string scan else normal utf8 string iscasesensitive : When true and the vartype is vtString this check if the case matches memscan_nextScan(memscan.input2. input1..0" it includes 3. If exact value = "3" then it includes 2. If exact value is "3... scan soSmallerThan: smaller than . isNotABinaryString.0" it includes 3. Valid options are: fsmNotAligned : No alignment check fsmAligned : The address must be dividable by the value in alignmentparam fsmLastDigits : The last digits of the address must end with the digits prov ided by alignmentparam alignmentparam : String that holds the alignment parameter. roundingtype. scanoption..0499999999 rtTruncated: Truncated algoritm.900000001 to 3. scan soIncreasedValue: Increased value scan soIncreasedValueBy: Increased value by scan soDecreasedValue: Decreased value scan soDecreasedValueBy: Decreased value by scan soChanged: Changed value scan soUnchanged: Unchanged value scan roundingtype: Defined the way scans for exact value floating points are handle d rtRounded : Normal rounded scans.

name) memscan_getAttachedFoundlist(memscan) : Returns a FoundList object if one is att ached to this scanresults. address. index) Memoryview class: (Inheritance: Form->ScrollingWinControl->CustomControl->WinCon trol->Control->Component->Object) memoryview_getDisassemblerView(memoryView): Returns the visual disassembler obje ct on the memoryview window memoryview_getHexadecimalView(memoryView): Returns the visual hexadecimal object on the memoryview window Disassemblerview class: (Inheritance: Panel->CustomControl->WinControl->Control>Component->Object) The visual disassembler used on the memory view window disassemblerview_getSelectedAddress(disassemblerview) disassemblerview_setSelectedAddress(disassemblerview. soIncrea sedValueBy or soDecreasedValueBy will cause CE to do a precentage scan instead o f a normal value scan savedResultName: String that holds the name of a saved result list that should be compared against. First scan is called "FIRST" memscan_newscan(memscan) : Clears the current results memscan_waitTillDone(memscan) memscan_saveCurrentResults(memscan.ype input2: If requires by the scanoption this is the secondary input isHexadecimalInput: When true this will handle the input field as a hexadecima l string else decimal isNotABinaryString: When true and the varType is vtBinary this will handle the input field as a decimal instead of a binary string isunicodescan: When true and the vartype is vtString this will do a unicode (u tf16) string scan else normal utf8 string iscasesensitive : When true and the vartype is vtString this check if the case matches ispercentage: When true and the scanoption is of type soValueBetween. else returns the address that was found (integer) FoundList The foundlist is an object that opens the current memscan's result file and prov ides an interface for reading out the addresses createFoundList(memscan) foundlist_initialize(foundlist) foundlist_deinitialize(foundlist) foundlist_getCount(foundlist) foundlist_getAddress(foundlist. address2) . function): function(disasse mblerview. this will cause the scanner to only return one result. Note that it does no t work with a foundlist memscan_getOnlyResult(memscan): Only works if returnOnlyOneResult is true. state): If set to true before you start a s can. Retur ns nil if not found. address) disassemblerview_onSelectionChange(disassemblerview. index) : Returns the address as a string foundlist_getValue(foundlist. Returns nil otherwise memscan_returnOnlyOneResult(memscan.

offset): Returns a structureElement obje ct where the specified offset is at least the requested offset . function): function(hexadecimal view.Hexadecimal class: (Inheritance: Panel->CustomControl->WinControl->Control->Comp onent->Object) The visual hexadecimal object used on the memory view window hexadecimalview_getTopAddress(hexadecimalview) hexadecimalview_setTopAddress(hexadecimalview. state) : When set to true the thread object will free itself when the function ends (de fault=true) Note: Use this only from inside the thread function as the thread might have a lready terminated and freed itself when called thread_synchronize(thread. address) hexadecimalview_onAddressChange(hexadecimalview. This wil cause the tread to get the main thread to execute the given function and wait for it to finish. function): function(hexadecimalvie w.name) structure_getSize(structure): Calculates the size of the structure structure_getElementCount(structure): Returns the number of elements in this str ucture structure_getElement(structure. (Global structures are the visible structures) getStructure(index): Returns the Structure object at the given index createStructure(name): Returns an empty structure object (Not yet added to the G lobal list. address) hexadecimalview_onByteSelect(hexadecimalview. address. address2) Thread Class: (Inheritance: Object) createNativeThread(function) : Executes the given function in another thread using the systems thread mechani sm The function returns the Thread class object function declaration: function (Thread) thread_freeOnTerminate(thread. index): Returns a structureElement object (Chang ing offsets can change the index) structure_getElementByOffset(structure. Call structure_addToGlobalStructureList manually) structure_getName(structure) structure_setName(structure. function) : Called from inside the thread. Usually for gui access function () thread_waitfor(thread) : Waits for the given thread to finish Structure class: (Inheritance: Object) getStructureCount(): Returns the number of Global structures.

except for string and aob structureElement_setBytesize(se. height. 468x60. name): Sets the name of this element (tip: Leave bl ank if you only want to set the name of the variable) structureElement_getVartype(se): Returns the variable type of this element (chec k Variable types in defines. 300x250. position . size): sets the bytesize for types that are aff ected (string. offset) structureElement_getBytesize(se): Gets the bytesize of the element. 728x90 . size) structure_beginUpdate(structure): Call this when you want to make multiple updat es to a structure. extraparameters OPTIONAL. structure) structureElement_getChildStructStart(se) structureElement_setChildStructStart(se.yourur l OPTIONAL. or for updating users about new versions of your trainer or whatever you feel like . vartype) structureElement_getChildStruct(se) structureElement_setChildStruct(se. width. 2=Bottom.But you are free to use different formats Position: Type=integer/enum: The place of the window 0=Top. percentageshown OPTIONAL): Will show an advertising window which will help keep the development of Cheat Engine going. offset): Sets the offset of this element structureElement_getName(se): Returns the name of this element structureElement_setName(se.structure_addElement(structure): Adds a new blank structureElement and returns i t structure_autoGuess(structure. StructureElement class: (Inheritance: Object) structureElement_getOwnerStructure(se): Returns the structure this element belon gs to structureElement_getOffset(se): Returns the offset of this element structureElement_setOffset(se. hasclosebutton. Prefered formats are : 120x600 . height: Type=integer : The client width and height of the window. 3=left Yoururl: Type=string: The url you want to show. (Global structures will get saved to the table) structure_removeFromGlobalStructureList(structure): Remove from the list of stru ctures. aob) supportCheatEngine(attachwindow.lua) structureElement_setVartype(se. baseaddresstoguessfrom. 160x600. It will speed up the update process structure_endUpdate(structure): Call this when done structure_addToGlobalStructureList(structure): Add this to the list of structure s for the user to select from. You can use it for your own income. attachwindow: Type=Form : The form that the ad is attached to hasclosebutton: Type=boolean : If true the window will have a border an a clos e button at top width. offset. Usually retu rns the size of the type. If you provide your own url it will be shown Up to 75% of the time. When given instead of showing CE's ads 100% it will show your url up to 75%. 1=Right.

g 64-bit and not booted with unsigned driver su pport) dbk_useKernelmodeOpenProcess() : Switches the internal pointer of the OpenProces s api to dbk_OpenProcess dbk_useKernelmodeProcessMemoryAccess() : Switches the internal pointer to the Re adProcessMemory and WriteProcessMemory apis to dbk_ReadProcessMemory and dbk_Wri teProcessMemory dbk_useKernelmodeQueryMemoryRegions() : Switches the internal pointer to the Que ryVirtualMemory api to dbk_QueryVirtualMemory dbk_getPEProcess(processid) : Returns the pointer of the EProcess structure of t he selected processid dbk_getPEThread(threadid) : Gets the pointer to the EThread structure dbk_readMSR(msr): Reads the msr dbk_writeMSR(msr. or an address you got from an autoassembler script or injected dll (W hen Cheat Engine itself was targeted) functionid: 0: OpenProcess Known compatible address defines: windows_OpenProcess dbk_OpenProcess 1: ReadProcessMemory Known compatible address defines: windows_ReadProcessMemory dbk_ReadProcessMemory . msrvalue): Writes the msr dbk_executeKernelMemory(address.Extraparameters: Type=String : are url request parameters you can add to the default parameters (e. value): See dbk_writeMSR onAPIPointerChange(function): Registers a callback when an api pointer is change d (can happen when the user clicks ok in settings.g trainername=mytrainer for tracking purposes) PercentageShown: You can change the default of 75% to a smaller value like 50% fuckCheatEngine() : Removes the ad window if it was showing Following are some more internal functions for Cheat Engine dbk_initialize() : Returns true if the dbk driver is loaded in memory. parameter) : Executes a routine from kernelmode (e. D oes NOT happen when setAPIPointer is called) setAPIPointer(functionid. The address can be a predefined address set at initialization by Che at Engine. address): Sets the pointer of the given api to the giv en address.g a routine written there with auto asse mbler) parameter can be a value or an address. or when dbk_use*** is used. It's up to your code how it's handled dbvm_initialize(offloados OPTIONAL) : Initializes the dbvm functions (dbk_initia lize also calls this) offloados is a boolean that when set will offload the syst em onto dbvm if it's not yet running (and only IF the dbk driver is loaded) dbvm_readMSR(msr): See dbk_readMSR dbvm_writeMSR(msr. False if it failed for whatever reason (e.

ss.es. st dbvm_changeselectors(cs.gs: dword): DWORD.fs D3DHOOK_ functions: The d3dhook functions provide a method to render graphics and text inside the ga me.textcontainers or textures. call this function to apply the change s . Otherwise artifacts may occur (sprite 1 might b e drawn at the new location while sprite 2 might still be at the old location wh en a frame is rendered) d3dhook_endUpdate() : When done updating. hookmessages OPTIONAL ): Hooks direct3d and allocates a buffer with given size for storage of for the r endercommand list hookmessages defines if you want to hook the windows message handler for the d irect3d window.ds. auto assembler scripts injected int dbvm_block_interrupts : DWORD. dbvm_restore_interrupts: Address of function dcall. stdc dbvm_raise_privilege : DWORD.dbk_ReadPhysicalMemory dbvm_ReadPhysicalMemory 2: WriteProcessMemory Known compatible address defines: windows_WriteProcessMemory dbk_WriteProcessMemory dbk_WritePhysicalMemory dbvm_WritePhysicalMemory 3: VirtualQueryEx Known compatible address defines: windows_VirtualQueryEx dbk_VirtualQueryEx VirtualQueryExPhysical Extra variables defined: dbk_NtOpenProcess : Address of the NtOpenProcess implementation in DBK32 The dbvm_ addresses should only be used with o Cheat Engine dbvm_block_interrupts : Address of function all. dbvm_changeselectors : Address of function . 10 or 11 d3dhook_initializeHook(textureandcommandlistsize OPTIONAL. as long as it is running in directx9. dbvm_raise_privilege : Address of function ll. stdcall. The d3dhook_onClick function makes use of that If no size is provided 16MB is used and hookmessages is true Note: You can call this only once for a process d3dhook_beginUpdate() : Use this function when you intent to update multiple spr ites. stdca dbvm_restore_interrupts : DWORD.

picture) D3DHook_FontMap Class (Inheritance: D3DHook_Texture->Object) A fontmap is a texture that contains extra data regarding the characters. The given key will bring it up (0xc0=tilde) d3dhook_onClick(function): Registers a function to be called when clicked on an sprite (excluding the mou se) function definition: function d3dclick(d3dhook_spite. "" d3dhook_setDisabledZBuffer(state): When true will disable the Z-Buffer (Depth te sting) d3dhook_setWireframeMode(state): When true will show objects in wireframe mode d3dhook_setMouseClip(state): Requires HookMessages to be true. Without a sprite to use it. transparentColor OPTIONAL): Returns a d3dhook_tex ture object if the picture is not a transparent image the transparentcolor parameter can b e used to make one of it's colors transparent d3dhook_texture_getHeight(d3dhook_texture) d3dhook_texture_getWidth(d3dhook_texture) d3dhook_texture_loadTextureByPicture(d3dhook_texture. font): Changes the fontmap to the se . that don 't support windowed mode or multiple displays ) d3dhook_enableConsole(virtualkey): Adds a (lua)console to the specific game. If sprites overlap the highest zorder sprite will be given.y) x and y are coordinates in the sprite object. Note: At least one frame must have been rendered in the game for this to return anything useful d3dhook_getHeight(): Returns the height of the direct3d window. it won't show d3dhook_createTexture(filename) : Returns a d3dhook_texture object d3dhook_createTexture(picture. When true will ke ep the mouse cursor inside the game. char) : boolean . This c lass is used by the textcontainer Current implementation only supports 96 characters (character 32 to 127) d3dhook_createFontmap(font): Returns a d3dhook_fontmap object d3dhook_fontmap_changeFont(d3dhook_fontmap.d3dhook_getWidth(): Returns the width of the direct3d window. Return false if you do not wish this key eve nt to pass down to the game D3DHook_Texture Class (Inheritance: Object) This class controls the texture in memory. It does NOT care if a transparent part is clicked or not Note: This can cause a slowdown in the game if there are a lot of sprites and you press the left button a lot d3dhook_onKey(function) function(vkey. x. (Handy for certain strategy games.

text): Returns a d3dhook_text Container object d3dhook_textcontainer_getFontMap(d3dhook_textcontainer) d3dhook_textcontainer_setFontMap(d3dhook_textcontainer. width) d3dhook_sprite_getHeight(d3dhook_sprite) d3dhook_sprite_setHeight(d3dhook_sprite.0=invisible d3dhook_renderobject_setAlphablend(d3dhook_renderobject. height) d3dhook_sprite_getTexture(d3dhook_sprite): Returns a d3dhook_texture object d3dhook_sprite_setTexture(d3dhook_sprite. d3dhook_fontmap) d3dhook_textcontainer_getText(d3dhook_textcontainer) d3dhook_textcontainer_setText(d3dhook_textcontainer. The sprite and TextContainer classed inherit from this d3dhook_renderobject_getX(d3dhook_renderobject): Gets the x ject.0 is fully visible and 0. updating a texture in memory is slo w. string) --]] . x) d3dhook_renderobject_getZOrder(d3dhook_renderobject) d3dhook_renderobject_setZOrder(d3dhook_renderobject. y. While you could use a texture with the text. x): Sets the alphablend value. use a textcontainer d3dhook_createTextContainer(d3dhook_fontmap. d3dhook_createSprite(d3dhook_texture): returns a d3dhook_sprite object d3dhook_sprite_getWidth(d3dhook_sprite) d3dhook_sprite_setWidth(d3dhook_sprite. x.lected font d3dhook_fontmap_getTextWidth(d3dhook_fontmap. y): Returns the object coordinate of the ob the x coordinate of coordinate of the ob the y coordinate of d3dhook_renderobject_getAlphablend(d3dhook_renderobject): Returns the current al phablend value. 1. x) D3DHook_Sprite Class (Inheritance: D3DHook_RenderObject->Object) A d3dhook_sprite class is a visible texture on the screen. x): Returns the object d3dhook_renderobject_getY(d3dhook_renderobject): Sets the y ject d3dhook_renderobject_setY(d3dhook_renderobject. d3dhook_renderobject_getVisible(d3dhook_renderobject) d3dhook_renderobject_setVisible(d3dhook_renderobject. So if you wish to do a lot of text updates. d3dhook_texture): Sets the texture to render with this sprite (width and height will get reset) D3Dhook_TextContainer Class (Inheritance: D3DHook_RenderObject->Object) A d3dhook_sprite class draws a piece of text on the screen based on the used fon tmap. string): Returns the width of the given string in pixels D3DHook_RenderObject Class (Inheritance: Object) The renderobject is the abstract class used to control in what manner objects ar e rendered. Floating point d3dhook_renderobject_setX(d3dhook_renderobject.