|
Cheat Engine The Official Site of Cheat Engine
|
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 Jun 13, 2013 8:41 pm Post subject: "customSound" for CT,CETRAINER,EXE [CE6.3 + ] |
|
|
My first attempt here: http://forum.cheatengine.org/viewtopic.php?t=559298
With current CE6.3 we can make it even easier.
What to do:
1) add WAV file to table, as many as you want. Before, you can convert them to 22050Hz, mono format. (this is beep sound after all, not real music). For example you added two wave files: ON.wav and OFF.wav
2) add this at the end (or at the beginning) of your script:
soundTable = { "ON.wav", "OFF.wav" }
customSound.Init(soundTable)
3) to play first track use this:
customSound.PlaySound(1)
to play second, this
customSound.PlaySound(2)
example:
Code: | function onPostHotkey0(Hotkey)
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT0, isActive)
if gBeepOnAction then
if isActive then customSound.PlaySound(1) end
if not isActive then customSound.PlaySound(2) end
end
end |
4) move attached customSound.lua file into C:\Program Files (x86)\Cheat Engine 6.3\autorun dir
From now on, you can use CT, CETRAINER with custom Beep sound.
If you want to distribute CT, CETRAINER or EXE with your custom Beeps, just paste text from attached customSound.lua file.
Paste it at the beginning of your Lua script.
"example only" trainer (you don't need the game) http://www.mediafire.com/?agkv68ke66hhx8r
Description: |
Example CT.
After executng Lua script press:
ctrl+shift+F2 or ctrl+shift+F3 |
|
Download |
Filename: |
customSound_example.CT |
Filesize: |
37.19 KB |
Downloaded: |
1322 Time(s) |
Description: |
|
Download |
Filename: |
customSound.lua |
Filesize: |
2.61 KB |
Downloaded: |
1061 Time(s) |
_________________
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Sep 17, 2013 4:11 pm Post subject: |
|
|
Time to change the beep sound :p
It gets annoying D: .
Thanks for sharing, I'll rep you soon (When I'll be able again).
P.S
Bump.
_________________
|
|
Back to top |
|
|
DTeCH Newbie cheater Reputation: 0
Joined: 19 Jul 2013 Posts: 23 Location: Cayman Islands
|
Posted: Thu Oct 03, 2013 4:32 am Post subject: |
|
|
Forgive my nooooobish ways
I added the contents of the CustomSound LUA file just under the start of my Lua script...
Code: | --TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code
--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()
RequiredCEVersion=6.3
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
closeCE()
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
customSound = {}
customSound.numberOfTracks = 0
customSound.everythingOK = false
customSound.by = 'mgr.inz.Player'
function customSound.Init(soundTable)
if soundTable==nil or type(soundTable)~="table" then return false end
customSound.numberOfTracks = 0
local addresses=''
for index,tableFile... |
Then under that I added the soundTable thingy:
Code: | ...onOpenProcess=old_onOpenProcess
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
soundTable = { "t1.wav", "t2.wav", "t3.wav", "t4.wav" }
customSound.Init(soundTable) |
All locations of previous Beep() calls are now replaced with customSound.PlaySound(4)
It doesn't work. Now let me just explain what i DIDN'T do that might be my cause of it not working.
I don't know how to add the wav files to the table. (don't laugh lol) When making the EXE, I chose to try adding them from there (Extra Files)... doesn't work. Then I tried adding them from the main cheat engine window (Menu Button "Table">Add File). After doing that, every time I try to save to .CT, .CETrainer, or .EXE, I get an error "EDOMError in DOMDocument.CreateElement".
So I have no idea how to add the audio files to the table properly
Instructions please?
Oh... also I didn't convert them to 22050Hz because it's default windows wav files which may already be in the correct format. My $$$ Monster development machines are down right now due to lightening, & this stupid P4 P.O.S is just barely working so I won't be installing too much crap like audio convertors, or whatever on it.
Not sure if it matters, or not, but the form is not attached to any process yet until the user selects a "Browser... not stand-alone game", so If that's also a problem, then I guess I'm out of luck.
ps: CE 6.3
_________________
Hitler... When all else fails, you'll be in the right state of mind. Jesus Saves. |
|
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 Oct 03, 2013 11:34 am Post subject: |
|
|
DTeCH wrote: | I added the contents of the CustomSound LUA file just under the start of my Lua script... |
mgr.inz.Player wrote: | If you want to distribute CT, CETRAINER or EXE with your custom Beeps, just paste text from attached customSound.lua file.
Paste it at the beginning of your Lua script. |
DTeCH wrote: | Then I tried adding them from the main cheat engine window (Menu Button "Table">Add File). After doing that, every time I try to save to .CT, .CETrainer, or .EXE, I get an error "EDOMError in DOMDocument.CreateElement". |
Yes, you add them with "table"->"add file".
the error, I don't know. Could you upload those t1.wav t2.wav t3.wav t4.wav files (packed with winrar).
_________________
|
|
Back to top |
|
|
DTeCH Newbie cheater Reputation: 0
Joined: 19 Jul 2013 Posts: 23 Location: Cayman Islands
|
|
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 Oct 03, 2013 5:10 pm Post subject: |
|
|
Glad you could make it.
_________________
|
|
Back to top |
|
|
xXxShotzZxXx How do I cheat? Reputation: 0
Joined: 29 Jan 2015 Posts: 1
|
Posted: Thu Jan 29, 2015 4:21 pm Post subject: |
|
|
That trainer looks amazing,I wanna make something similar to that although I am new to it can you help?I want to make a trainer like you did
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|