View previous topic :: View next topic |
Author |
Message |
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 21, 2013 5:32 pm Post subject: cetrainer and exe trainer, nice GUI |
|
|
My latest creation. I was inspired by AikonCWD and his VB GUI.
It isn't real trainer, just GUI made with CE6.2 and LUA. Probably will not work correctly for all - blinking, etc. Could someone test it?
PLEASE DO NOT QUOTE
I will post full script and sources when ready. Currently script is quite messy.
[_] - minimize
[M] - mute
[X] - close
Used images:
image1 - used for rendering stars (not uploaded, because it is only CEImage object)
image2 - for transparency gradient
image3 - most important, it contains "buttons" and other stuff
image2 (PNG, 8KB):
image3 (gimp + fonts, PNG, 17KB):
music (XM, 564KB):
from http://nesdev.com/music/ (Blaster Master third area BGM mix .IT, by Protocol)
cetrainer without music is only 35KB big.
PLEASE DO NOT QUOTE
CPU usage should be: 0.1% up to 2%. There are 400 stars. Main rendering loop has 20 milliseconds interval.
*nice - yeah, you probably saw better GUIs, I know.
Description: |
moving stars algorithm only |
|
Download |
Filename: |
moving stars algo.lua |
Filesize: |
2.62 KB |
Downloaded: |
1352 Time(s) |
Description: |
|
Download |
Filename: |
starsAnimation__.cetrainer |
Filesize: |
423.79 KB |
Downloaded: |
1376 Time(s) |
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Feb 21, 2013 6:41 pm Post subject: |
|
|
the cetrainer opens a "Error:Unable to open file """ error, but that might be because .cetrainers execute my current build
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 21, 2013 6:59 pm Post subject: |
|
|
True. I think there are still many LUA bugs in the current SVN build. I noticed it on the day I posted revision 1676. I tried TechnoJacker Borderlands2 cetrainer and my cetrainers also. Many "access violation" or CE just freeze. When I find some time I will try to find out what's wrong.
With official ce6.2 cetrainer works for you?
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Feb 21, 2013 7:31 pm Post subject: |
|
|
yes, seems to work fine in the official 6.2 build. No flickering and the alphablending works as well (hardly noticeable though)
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 21, 2013 7:42 pm Post subject: |
|
|
Nice. When I clean my script I will post it. Maybe I will add NFO viewer...
Quote: | alphablending (......) hardly noticeable though |
With "AlphaBlendValue'=210 it looks like this:
I prefer this value: 'AlphaBlendValue'=240 (94%-95%)
_________________
|
|
Back to top |
|
|
aikoncwd Grandmaster Cheater Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Fri Feb 22, 2013 2:56 am Post subject: |
|
|
Oh man, you have all my respects. You did a great job, seriously Your GUI runs faster than my shitty VB6 GUI, I know that working over VB6 on 2013 is stupid, but this is the only languaje I know, maybe I need to start learning some LUA.
Congrats
EDIT:
For the NFO viewer you only need to make a routine that checks if fileexists App.Path + "\myinfo.nfo" then load the file and show on a label using "Terminal 9" font, apply some routines to make a gradient color effect and thats all. (You can add a *.png image over the label to make dark at the corner, for example)
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Feb 22, 2013 12:02 pm Post subject: |
|
|
Quote: | you only need to make a routine that checks if fileexists App.Path + "\myinfo.nfo" |
Or we can just paste text into LUA script. For example at the end:
Code: | (...)
nfoTEXT = [[
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ This trainer was made by _/
_/ mgr.inz.Player (aka YourEnemy) _/
_/ _/
_/ Homepage: _/
_/ http://forum.cheatengine.org/viewtopic.php?t=560250 _/
_/ _/
_/ Game version: _/
_/ Don't Starve, Steam, BETA _/
_/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Trainer Info/Options: _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/
_/ - Stomach Always Full - self explanatory _/
(...)
]]
(...)
|
But I don't know what would be better: animation or just simple scrollbar.
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Feb 22, 2013 11:40 pm Post subject: |
|
|
I made something slightly different. Of course only LUA code and only one image (1px X 150px PNG file, 3KB).
Currently I implemented those:
1) it automatically uses internal text when nfo file doesn't exist.
2) we can set scrollDistance, font size
3) it automatically adjust window size - window width is the same as widest line, window height is maximum 400px
4) mousemove (on any object) will drag the whole form around
5) PAGE UP, PAGE DOWN to scroll, and ESC key to exit. Press and hold, so it will scroll faster.
Try this nfo or this, download it, rename to "nfo.nfo" and put in the same directory, then double click nfoReader.
Could someone test? Thank you.
Then I will combine those two into one project. After "cleaning" I'll give full source code.
EDIT:
attachment deleted. Reason: old script.
_________________
Last edited by mgr.inz.Player on Sun Feb 24, 2013 7:45 pm; edited 2 times in total |
|
Back to top |
|
|
Alice0725 Expert Cheater Reputation: 11
Joined: 24 Jul 2012 Posts: 145
|
Posted: Sat Feb 23, 2013 4:54 am Post subject: |
|
|
I gues should set a specific font or encode or sth.
Description: |
|
Filesize: |
30.12 KB |
Viewed: |
32738 Time(s) |
|
_________________
|
|
Back to top |
|
|
aikoncwd Grandmaster Cheater Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Sat Feb 23, 2013 5:47 am Post subject: |
|
|
This is how I see.
I can't scroll because I see all the nfo, so scroll is not needed?
On your screen I see you use Terminal 9, but on my screen I see Terminal 6, why?
btw the rainbow effect is nice, great job, again.
EDIT
I tried your code using a custom nfo.nfo file from sixteencolors.net (http://sixteencolors.net/pack/cro-22)
Now, with a bigger file I can scroll, but every time the text scrolls... my window blinks a bit
PD: Looks nice Yoda?
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Feb 23, 2013 7:21 am Post subject: |
|
|
@Alice0725
Hmm, I used this:
Code: | fontsize = 9
(...)
font = canvas_getFont(canvas)
font_setName(font,'Terminal')
setProperty(font,'CharSet','OEM_CHARSET')
font_setSize(font,fontsize) |
I'm confused a bit:
http://lists.lazarus.freepascal.org/pipermail/lazarus/2009-May/042820.html
Font.Size = -Font.Height * 72 / Font.PixelsPerInch
Font.Height * 72 = - Font.PixelsPerInch * Font.Size
Font.Height = - Font.PixelsPerInch * Font.Size / 72
For me, pixelPerInch is 96, because under Windows settings, my screen has 96dpi, so:
Font.Height = 96 * 9 / -72
Font.Height = -12
Maybe I should do this:
Code: | fontHeight = -12
(...)
font = canvas_getFont(canvas)
font_setName(font,'Terminal')
setProperty(font,'CharSet','OEM_CHARSET')
setProperty(font,'Height',fontHeight) |
Could you try again?
@AikonCWD
"I can't scroll because I see all the nfo, so scroll is not needed?"
Yes, if whole nfo text has less than 30 lines.
"my window blinks a bit"
Could you try this again with original CE6.2 release? What OS you have?
Description: |
|
Download |
Filename: |
nfoReader.cetrainer |
Filesize: |
6.25 KB |
Downloaded: |
1220 Time(s) |
_________________
|
|
Back to top |
|
|
aikoncwd Grandmaster Cheater Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Sat Feb 23, 2013 1:41 pm Post subject: |
|
|
I only have the oficial CE 6.2, running Windows 7 32bits (I have another computer with W7 64bits).
But I know where is the problem: I like to work with the classic Windows Theme (not aero), on this theme, the window blinks. If I switch to standar Windows 7 aero theme, the program flows without blinks
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Feb 23, 2013 2:20 pm Post subject: |
|
|
Indeed, you are right. Tried it myself. This occurs under winxp too. When I switch to classic theme.
With "Luna" enabled everything is OK.
Now, how to fix this
_________________
|
|
Back to top |
|
|
aikoncwd Grandmaster Cheater Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Sat Feb 23, 2013 4:44 pm Post subject: |
|
|
mgr.inz.Player wrote: | Indeed, you are right. Tried it myself. This occurs under winxp too. When I switch to classic theme.
With "Luna" enabled everything is OK.
Now, how to fix this |
On my VB6 GUI y use 2 API's:
SetPixelV (gdi32.dll) -> To draw stars for the starfield effect
DraxText (user32.dll) -> To write text for the NFO viewer.
I will modify my VB6 code to use user's keyboard for scroll text (like you) instead an automatic-scroll timer.
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Feb 24, 2013 7:41 pm Post subject: |
|
|
Still working on that NFOWindow. Made few changes. Now it can be used like plugin (more or less).
I post it as Lua file - NFOWindow.lua
So, here
nfoWindow Demo (it contains NFOWindow.lua)
I used this trick to "load plugin":
Code: | -- load plugin
filename = os.getenv("TEMP")..'\\NFOWindow.lua'
tablefile_saveToFile(findTableFile('NFOWindow.lua'),filename)
file = assert(loadfile(filename))
file()
os.remove(filename)
-- ^^load plugin |
Available settings (as Lua table):
Code: | NFOWindowClassOptions =
{
nfo=NFO, -- mandatory
windowCaption='NFOWindow testing',
Button=ButtonFromYourWindow,
fontSize=10, -- (default 10)
windowMaximumHeight=420, -- 420 / 12 = about 35 lines (default: 600, about 50 lines)
scrollLines=5 -- (default: 9)
} |
Method 1 (using existing button):
Code: | NFOWCO = {nfo=NFO,windowCaption='NFOWindow testing. Does it work?',Button=UDF1_CEButton1}
NFOWindowClass.Init(NFOWCO) -- init
-- Note: UDF1_CEButton1 has changed onClick now |
Method 2 Code: |
NFOWCO2 = {nfo=NFO,windowCaption='NFOWindow testing. Does it work?'}
NFOWindowClass.Init(NFOWCO2) -- init
NFOWindowClass.ShowWindow() -- show nfo window. You can use this instruction inside another function. |
Description: |
|
Download |
Filename: |
nfoWindow Demo.ct |
Filesize: |
14.45 KB |
Downloaded: |
1454 Time(s) |
Description: |
|
Download |
Filename: |
NFOWindow.lua |
Filesize: |
14.39 KB |
Downloaded: |
1154 Time(s) |
_________________
|
|
Back to top |
|
|
|