View previous topic :: View next topic |
Author |
Message |
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Tue Apr 24, 2012 4:44 am Post subject: How do i assign editbox to specific hack ? |
|
|
exactly what title says.
when i disign interface. i can add a button and editbox, but how can i add specific hack to it?
for example lets say i have "ammo" hack in my cheatlist.
i want to set specific value to ammo, like 9000 bullets.
how can i assign editbox + button to it ?
so i can write 9000 into editbox and then hit the button and it sets the value to 9000.
i don't want an example table or .cetrainer, i need someone to tell me steps how i can do that.
like:
1. in formdesigner click on "button" and place it into trainer
2. in formdesigner click on "editbox" and place it into trainer
3. < this is where im stuck. i dont know how to assign editbox and button to existing hack.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Tue Apr 24, 2012 5:18 am Post subject: |
|
|
I'm assuming this is a hack that doesn't rely on a cheat table with a hotkey assigned, if it is look at the example the trainerscript generator makes: register an onPostHotkey and set the value after the hack is enabled
But back to the button and editbox:
Place the button
Place the editbox
click the button, go to he event list, select onClick and click the button with "..." (twice so it pops up the editor for you if it wasn't open already)
now inside that function write:
Code: |
writeInteger("00400500", getProperty(FORMNAME_EDITNAME,"Text"))
|
(FORMNAME_EDITNAME example: UDF1_CEEdit1 )
If a pointer give as address:
"[[base]+offset1]+offset2"
click execute
done.
You can then close the formdesigner and test it out.
If it functions as you like, save your table as a .ct and then save your table as a cetrainer or .exe (never forget to save as a .ct as you won't be able to load .exe's or protected .cetrainer's back)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Wed Apr 25, 2012 3:33 am Post subject: |
|
|
didn't get it working. i got the idea, but obviously im doing something wrong.
this is what i wrote in the lua script when clicking on the "button onclick"
Code: | function CEButton1Click(sender)
writeInteger("[[game.exe]+00E2563]+2CC+41+38+42+C8", getProperty(FORMNAME_CEEdit1,"Text"))
end |
I used button and editbox, when i write something into editbox and click button it says "access violation"
Pointer itself looks like this:
Code: |
offset C8
offset 42
offset 38
offset 41
"game.exe"+00E2563 offset 2CC |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Apr 25, 2012 4:45 am Post subject: |
|
|
Change it to this:
writeInteger("[[[[[game.exe+00E2563]+2cc]+41]+38]+42]+c8", getProperty(FORMNAME_CEEdit1,"Text"))
also, are you sure the name of your form is FORMNAME ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Fri Apr 27, 2012 8:42 am Post subject: |
|
|
I will try, but what is FORMNAME exactly?
im starting to understand the system behind it, but still not quite sure what assigns the button to editbox and vise versa.
i thought it was the string in the "onclick" box. where i have to write the stuff into lua script. i thought tht name in that box like "CEEdit1" is what makes button choose editbox.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Fri Apr 27, 2012 10:05 am Post subject: |
|
|
When you create your first form, the initial name it gets is "UDF1"
so in hat case the name would be : UDF1_CEEdit1
You can rename that form to anything you wish, the objectnames will change as well
It is the string in the onclick box, but it needs to be case sensitive, AND the function must exist in the script when you fill it in. (easiest is just to use the drop down menu)
If you just click the button it will generate the function for you if it doesn't exist and will base the functionname on the object's name
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Sat Apr 28, 2012 7:35 am Post subject: |
|
|
sry i still don't understand how i assign button to editbox.
i can't see UDF1 anywhere. it won't appear. it doesn't exist in lua script either.
1. i place button
2. i place editbox
3. i click on button
4. go to event "onclick"
5. double click ...
6. lua script pops up and it sets "onclick" name to "CEButton1Click"
7. in lua i write what you showed me
i generate trainer and nothing happens.
shouldn't i do something with editbox's "onclick" too ?
edit
here's what i have in lua:
function CEEdit1Click(sender)
writeInteger("[[[[[game.exe+00C2463]+1]+2]+3]+4]+5", getProperty(UDF1_blah,"Text"))
end
function CEButton1Click(sender)
writeInteger("[[[[[game.exe+00C2463]+1]+2]+3]+4]+5", getProperty(UDF2_blah2,"Text"))
end
I know that what im doing wrong is the part with formname and editname. What should i put there exactly? sry for confusiong im just missing something here.
Last edited by mordax on Sat Apr 28, 2012 7:41 am; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Apr 28, 2012 7:40 am Post subject: |
|
|
You do not generate a trainer until you have confirmed everything works
Close the form and the designer (toolbar), execute the script, and check what happens.
If the form doesn't show, you forgot to add a form_show command for the form you've designed
If the buttons do no work, check again if the onclick is still set properly (go into edit mode for the form)
Now once everything works, only then, generate the exe
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Sat Apr 28, 2012 7:43 am Post subject: |
|
|
executing a script does nothing. it wont open a working trainer.
only when i press generate trainer, window appears, i close window and then i have working trainer i can still edit when i click on "go back to generate designer"
i updated the last post, can you please check and tell me what's wrong with it ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Apr 28, 2012 7:57 am Post subject: |
|
|
If you designed your own form, never touch the generate trainer option
Let's just start from the beginning
start ce
go to table->create form
Go to the name property of the created form and change it to MyForm
Add 3 buttons and editboxes
Change the name property of the buttons to bt1, bt2, and bt3
change the name property of the editboxes to edt1, edt2, edt3
Optional: Change the caption of the buttons to what you want them to be and clear the text properties of the editboxes
click bt1, go to events, click twice on the ... button, make the function look like:
Code: |
function bt1Click(sender)
writeInteger("[[[[[game.exe+00C2463]+1]+2]+3]+4]+5", getProperty(MyForm_edt1,"Text"))
end
|
click bt2, go to events, click twice on the ... button, make the function look like:
Code: |
function bt2Click(sender)
writeInteger("[[[[[game.exe+00C2463]+1]+2]+3]+4]+5", getProperty(MyForm_edt2,"Text"))
end
|
click bt3, go to events, click twice on the ... button, make the function look like:
Code: |
function bt3Click(sender)
writeInteger("[[[[[game.exe+00C2463]+1]+2]+3]+4]+5", getProperty(MyForm_edt3,"Text"))
end
|
(tip: Adjust the pointer...)
Now go to the bottom of the script, and add this (not between a begin/end, just at the bottom)
And if you wish that the trainer attaches to game.exe when it starts then add
Code: |
strings_add(getAutoAttachList(), "game.exe")
|
Now close the toolbar and the form
And click on the execute button in the script.
confirm that the form is showing, ce automatically attaches to game.exe and that clicking the button does what needs to be done
Now, when that is working, click on the file save button, and save it as gametrainer.exe (NOT as game.exe)
then give your trainer an icon and save
Also, save as .CT so you can make edits at a later date
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Sat Apr 28, 2012 8:56 am Post subject: |
|
|
Now im having another issue.
i have a working "trainer" how do i generate it ?
i made it in form maker as you said, closed the editor and it works nicely, how can i save it as trainer.exe now ?
when i click on generate trainer, it opens a new empty trainer template.
very nice, gave you rep up for that one.
cheat engine is quite good tool, however it is very hard to understand at first.
now once i have done it once, it seems simple enought.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Apr 28, 2012 9:08 am Post subject: |
|
|
NEVER click on generate trainer from table
Just save like you save tables, but just write .exe behind it
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Sat Apr 28, 2012 9:20 am Post subject: |
|
|
ok that's confusing. why would you have it in first place then?
guess it's only for table then, but still it is extremely odd method to replace CT with EXE. I had no idea that it works this way.
thanks for explaining. again a simple thing that is almost impossible to figure out.
Now everything works. awesome tutorial.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Apr 28, 2012 9:30 am Post subject: |
|
|
That options is there for those that have no clue about lua and only have a table with hotkeys they wish to make a trainer of and don't care how it looks.
This feature will build a lua script for them and give them a generic trainer form that can make some slight adjustments to (not too many)
For the normal user with basic know knowledge of ce's lua features this option is not needed. They are better of adding this to their main.lua file: (under require defines)
Code: |
mf=getMainForm()
mi=component_findComponentByName(mf, "MenuItem9")
object_destroy(mi)
mi=component_findComponentByName(mf, "MenuItem5")
object_destroy(mi)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mordax Expert Cheater Reputation: 1
Joined: 16 Apr 2010 Posts: 121
|
Posted: Sun Apr 29, 2012 8:59 am Post subject: |
|
|
is there a way of showing the original values in editbox? that CE would read the value from game and shows it in editbox?
sorry for offtopic, but what is the lua code for close button?
when i close trainer using x then it wont go away. interface disappears but process remains running.
|
|
Back to top |
|
|
|