Skip to content

Commit e4e3095

Browse files
committed
Merge branch 'master' of github.com:JasonGoemaat/CheatEngineMonoHelper
2 parents 38e4bec + 9d2f5b1 commit e4e3095

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

docs/Releases/index.md

+36
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,42 @@ Save file as 'monohelper.lua' in the 'autorun' directory where CE is installed
44

55
* delete forms and unselect image on reload (mostly nicety for making changes during development of this)
66
* fixed parameter detection of 'single' and 'double' for XMM registers
7+
* TODO: Figure out way to hook the right overloaded method
8+
* Could be pretty short AA script looking for parameter signatures
9+
* TODO: Add static fields as option to search?
10+
* Filter for 'Static Fields Only'? - works as default shows all classes/fields/methods
11+
* Filter classes as classes that contain static fields (and/or methods?)
12+
* Filter static methods too? How do static methods work?
13+
* TODO: DblClick on static field generates script with {$lua} code to find it and define?
14+
* Alternate: LUA code to get base address for static class and define? - doesn't work with mono generate struct due to conflicting offsets, maybe CLASS_FIELD as define?
15+
* TODO: uncheck 'HideSelection' on forms so you can see the selected items in listViews after they've lost focus
16+
* TODO: popup on method -> generate 'find pointer' script
17+
* Actually adds a new memrec to CE with a script doing my standard stuff to find the pointer
18+
* Method 'PlayerController:Update' will globalalloc 'pPlayerController_Update'
19+
* push rax
20+
* mov rax,pPlayerController_Update
21+
* inc dword ptr [rax] // counter
22+
* mov [rax+8], rcx // parameter 1
23+
* mov [rax+10], rdx // parameter 2
24+
* movss [rax+18], xmm3 // parameter 3
25+
* pop rax
26+
* Table entries under script as a group header for counter and parameters
27+
* TODO: Alternate for having memrecs for script and pointers - more difficult but cooler
28+
* Able to hook methods from window, list in separate window and enable/disable/remove
29+
* LUA could keep track of a 'globals' memory region and where the pointers for each method are
30+
* LUA could show count, pointers, etc in it's own window
31+
* LUA could open structure dissect and generate structure using it's information for names
32+
* TODO: generate script inside mono method, not at start - three options:
33+
1. Simple inject - use bytes being replaced and exact address
34+
2. AOB - use AOB search to find point in code, bytes must remain the same
35+
3. Advanced AOB - allow hooking code with offset of field
36+
* One option would be to identify the field and change the value based on mono dissect
37+
* Example: 'movss [rax+5c],xmm0 // set current health'
38+
* 5c is offset of 'currentHealth' field, look for that offset in the type the method belongs on
39+
* LUA code in top of script will alter the AOB to search for
40+
* LUA code in top of script will search for AOB only inside method boundaries (or start of method + x + 100) for instance where x is offset we're hooking, or will stop when it finds another 'push rbp; mov rbp, rsp', or when it finds a ret (though there could be more than one of these)
41+
* use readmem/writemem to replace with exact code, or use AOB found in step 1 that we're replacing (how? separate enable/disable sections)
42+
743

844
## [Current Release 1.1.0](monohelper-1.1.0.lua)
945

src/lua/snippets/Popups.lua

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
-- this works for changing the pop-up to have only the new menu item you add!
2+
--[[ this works for changing the pop-up to have only the new menu item you add!
3+
4+
local mi = createMenuItem(formMonoClass.popupMethods.Items)
5+
mi.Caption = "Click me!"
6+
mi.OnClick = function()
7+
showMessage("You clicked me, silly goose!")
8+
end
9+
mi.name = 'miClickMe'
10+
formMonoClass.popupMethods.Items:clear()
11+
formMonoClass.popupMethods.Items.add(mi)
12+
13+
--]]
14+
15+
16+
--------- TEMP
17+
formMonoClass.popupMethods.Items:clear()
18+
local mi = createMenuItem(formMonoClass.popupMethods.Items)
19+
mi.Caption = "Click me again!"
20+
mi.OnClick = function()
21+
print('you clicked the popup!')
22+
showMessage("You clicked me, silly goose!")
23+
end
24+
mi.name = 'miClickMe'
25+
formMonoClass.popupMethods.Items.add(mi)
26+
27+
--]]
28+
29+
formMonoClass.popupMethods.Items.OnClick = function(sender) print('You clicked the popup!') end
30+
formMonoClass.popupMethods.Items.setOnClick(function(sender) print('You clicked the popup!') end)
31+
formMonoClass.popupMethods.OnPopup = function(sender) print('OnPopup!') end
32+
33+
formMonoClass.listMethods.OnSelectItem = function(sender)
34+
showMessage("You selected something!")
35+
end
36+
37+
38+
39+
--------- set popup menu when it is clicked
40+
formMonoClass.popupMethods.OnPopup = function(sender)
41+
formMonoClass.popupMethods.Items:clear()
42+
43+
local mi
44+
45+
mi = createMenuItem(formMonoClass.popupMethods.Items)
46+
mi.Caption = "Say hello"
47+
mi.OnClick = function()
48+
showMessage("Hello, world!")
49+
end
50+
mi.name = 'miSayHello'
51+
formMonoClass.popupMethods.Items.add(mi)
52+
53+
mi = createMenuItem(formMonoClass.popupMethods.Items)
54+
mi.Caption = "CLICK ME!"
55+
mi.OnClick = function()
56+
showMessage("Thank you so much for clicking me!")
57+
end
58+
mi.name = 'miClickMe'
59+
formMonoClass.popupMethods.Items.add(mi)
60+
end
61+

0 commit comments

Comments
 (0)