Soulninja How do I cheat? Reputation: 0
Joined: 09 Nov 2018 Posts: 1
|
Posted: Fri Nov 09, 2018 8:43 pm Post subject: coding issues with CETrainer |
|
|
I KNOW i have to be a little close lol...i'v managed to find my pointers i need and created a small trainer with them, but i have recently found the pointer for the enemy health value. My goal is to make a Label (CELabel3 in this case) and a progress bar that will empty as the enemy HP goes down. I have the label and the value does indeed try to change but it never actually shows me anything, and since i havent even managed to get the label working yet i havent even started on the progress bar sadly... I REALLY want to learn! if i post my code i really hope somebody could explain what im doing wrong, i am a complete noob at this but i have been doing my homework but i feel like im not making any progress (BTW i have done this by auto-generating the trainer and then manually tweaking the lua from the table)
Quote: | --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.81
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
closeCE()
end
addresslist=getAddressList()
memrec30=addresslist.getMemoryRecordByID(30)
memrec31=addresslist.getMemoryRecordByID(31)
memrec32=addresslist.getMemoryRecordByID(32)
memrec33=addresslist.getMemoryRecordByID(33)
memrec45=addresslist.getMemoryRecordByID(45)
memrec30_hotkey0=memrec30.getHotkeyByID(0)
memrec30_hotkey1=memrec30.getHotkeyByID(1)
memrec30_hotkey2=memrec30.getHotkeyByID(2)
memrec30_hotkey3=memrec30.getHotkeyByID(3)
memrec31_hotkey0=memrec31.getHotkeyByID(0)
memrec31_hotkey1=memrec31.getHotkeyByID(1)
memrec31_hotkey2=memrec31.getHotkeyByID(2)
memrec31_hotkey3=memrec31.getHotkeyByID(3)
memrec31_hotkey4=memrec31.getHotkeyByID(4)
memrec32_hotkey0=memrec32.getHotkeyByID(0)
memrec32_hotkey1=memrec32.getHotkeyByID(1)
memrec32_hotkey2=memrec32.getHotkeyByID(2)
memrec32_hotkey3=memrec32.getHotkeyByID(3)
memrec32_hotkey4=memrec32.getHotkeyByID(4)
memrec32_hotkey5=memrec32.getHotkeyByID(5)
memrec33_hotkey0=memrec33.getHotkeyByID(0)
memrec33_hotkey1=memrec33.getHotkeyByID(1)
memrec33_hotkey2=memrec33.getHotkeyByID(2)
memrec33_hotkey3=memrec33.getHotkeyByID(3)
memrec33_hotkey4=memrec33.getHotkeyByID(4)
memrec45_hotkey0=memrec45.getHotkeyByID(0)
memrec45_hotkey1=memrec45.getHotkeyByID(1)
memrec45_hotkey2=memrec45.getHotkeyByID(2)
memrec45_hotkey3=memrec45.getHotkeyByID(3)
startup = createTimer(nil, false)
startup.Interval = 500
startup.OnTimer = function(timer)
CETrainer.CELabel3.Caption = readFloat("[[[[[[[[Game.exe+0388A4E0] +30] +530] +70] +240] +150] +0] +30]")
end
startup.Enabled = true
function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
CETrainer.CHEAT0.setActive(isActive) --gui update, nothing else
if gPlaySoundOnAction then
if isActive then
playSound(gActivateSound)
else
playSound(gDeactivateSound)
end
end
end
memrec30_hotkey0.onPostHotkey=onPostHotkey0
function onHotkey3(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT3.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec30_hotkey3.onHotkey=onHotkey3
function onHotkey4(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT4.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec31_hotkey0.onHotkey=onHotkey4
function onHotkey5(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT5.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec31_hotkey1.onHotkey=onHotkey5
function onHotkey8(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT8.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec31_hotkey4.onHotkey=onHotkey8
function onHotkey9(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT9.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec32_hotkey0.onHotkey=onHotkey9
function onHotkey10(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT10.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec32_hotkey1.onHotkey=onHotkey10
function onHotkey13(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT13.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gDeactivateSound)
end
end
memrec32_hotkey4.onHotkey=onHotkey13
function onHotkey14(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT14.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec32_hotkey5.onHotkey=onHotkey14
function onHotkey15(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT15.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec33_hotkey0.onHotkey=onHotkey15
function onHotkey16(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT16.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec33_hotkey1.onHotkey=onHotkey16
function onHotkey17(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT17.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gActivateSound)
end
end
memrec33_hotkey2.onHotkey=onHotkey17
function onHotkey18(Hotkey)
--Executed before the hotkey is handled
CETrainer.CHEAT18.setActive(true, 1500)
if gPlaySoundOnAction then
playSound(gDeactivateSound)
end
end
memrec33_hotkey3.onHotkey=onHotkey18
getAutoAttachList().add("Game.exe")
function popupTrainerHotkeyFunction()
CETrainer.show()
end
createHotkey(popupTrainerHotkeyFunction, 45)
getFreezeTimer().Interval=200
gPlaySoundOnAction=false
CETrainer.show()
function AboutClick()
showMessage(gAboutText)
end
gAboutText=[[This trainer was made by Cheat Engine]]
function CloseClick()
--called by the close button onClick event, and when closing the form
closeCE()
return caFree --onClick doesn't care, but onClose would like a result
end
--TRAINERGENERATORSTOP-- |
figured it was time to talk to the source of the knowledge lol, all i can find about linking a "value" from a pointer to the GUI is just confusing me a little
UPDATE: so, i did manage to get the label to display a value, but its not the same as my pointer in my table, i know offsets go from bottom to top in order but i cant figure out what this thing is pointing to
|
|