|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
mdockz Cheater Reputation: 0
Joined: 24 Feb 2013 Posts: 41
|
Posted: Mon Mar 25, 2013 9:43 am Post subject: Add loadPlugin to trainer. |
|
|
I have my scripts and I clicked generate trainer.
How do I add the loadplugin function to my script so that when i generate the trainer it will load the plugin.
I have generated my cheat table as script and got the lua script but even when i add it there, and then save as exe. it doesnt load the plugin.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Mon Mar 25, 2013 9:56 am Post subject: |
|
|
When you generate the exe trainer you must add the plugin dll to the package. Click add file and select the plugin.
use getCheatEngineDir() to get the path to the plugin
If you place the dll as a separate file next to your trainer you must use the variable TrainerOrigin to get the path of the exe of the trainer used to launch 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 |
|
|
mdockz Cheater Reputation: 0
Joined: 24 Feb 2013 Posts: 41
|
Posted: Mon Mar 25, 2013 11:00 am Post subject: |
|
|
Okay thanks, I added the plugin function to the top of the lua script.
and I clicked add file and added the plugin but now it says access violation.
Here is the code.
Code: |
loadPlugin(getCheatEngineDir() .. 'plugins\\umstealthedit-x86_64.dll')
--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.2
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
closeCE()
end
addresslist=getAddressList()
memrec16=addresslist_getMemoryRecordByID(addresslist,16)
memrec14=addresslist_getMemoryRecordByID(addresslist,14)
memrec1=addresslist_getMemoryRecordByID(addresslist,1)
memrec9=addresslist_getMemoryRecordByID(addresslist,9)
memrec15=addresslist_getMemoryRecordByID(addresslist,15)
memrec13=addresslist_getMemoryRecordByID(addresslist,13)
memrec6=addresslist_getMemoryRecordByID(addresslist,6)
memrec8=addresslist_getMemoryRecordByID(addresslist,8)
memrec16_hotkey0=memoryrecord_getHotkeyByID(memrec16,0)
memrec14_hotkey0=memoryrecord_getHotkeyByID(memrec14,0)
memrec1_hotkey0=memoryrecord_getHotkeyByID(memrec1,0)
memrec9_hotkey0=memoryrecord_getHotkeyByID(memrec9,0)
memrec15_hotkey0=memoryrecord_getHotkeyByID(memrec15,0)
memrec13_hotkey0=memoryrecord_getHotkeyByID(memrec13,0)
memrec6_hotkey0=memoryrecord_getHotkeyByID(memrec6,0)
memrec8_hotkey0=memoryrecord_getHotkeyByID(memrec8,0)
function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
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
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec16_hotkey0,onPostHotkey0)
function onPostHotkey1(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT1, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec14_hotkey0,onPostHotkey1)
function onPostHotkey2(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT2, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec1_hotkey0,onPostHotkey2)
function onPostHotkey3(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT3, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec9_hotkey0,onPostHotkey3)
function onPostHotkey4(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT4, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec15_hotkey0,onPostHotkey4)
function onPostHotkey5(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT5, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec13_hotkey0,onPostHotkey5)
function onPostHotkey6(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT6, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec6_hotkey0,onPostHotkey6)
function onPostHotkey7(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT7, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec8_hotkey0,onPostHotkey7)
control_setVisible(CETrainer_SEPERATOR, false)
strings_add(getAutoAttachList(), "[process hidden]")
gBeepOnAction=false
form_show(CETrainer)
function AboutClick()
showMessage(gAboutText)
end
gAboutText=[[This trainer was made by Cheat Engine
wwwcheatengineorg]]
function CloseClick()
closeCE()
return caFree --onClick doesn't care, but onClose would like a result
end
--TRAINERGENERATORSTOP--
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Mon Mar 25, 2013 12:18 pm Post subject: |
|
|
Did you set the folder of the plugin dll to plugins? If not, the plugins part will have to go from the path
Also, did you add the secondary worker dll of stealthedit as well? (Make sure it's in the appropriate subfolder)
_________________
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 |
|
|
mdockz Cheater Reputation: 0
Joined: 24 Feb 2013 Posts: 41
|
Posted: Mon Mar 25, 2013 3:09 pm Post subject: |
|
|
Yes, that was the problem i didnt set the seworker..
Got it working now Thanks
Only one thing, when i run the trainer theres an error.
it says
Code: |
cannot open
C:\...\appdata\local\temp\cetrainers\randomCTfile
no such file or directory
|
|
|
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
|
|