Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Can you place pointers in a Trainer?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Reclaimer Shawn
Advanced Cheater
Reputation: 0

Joined: 09 Jun 2015
Posts: 77

PostPosted: Tue Jun 09, 2015 4:41 am    Post subject: Can you place pointers in a Trainer? Reply with quote

Hi people of Cheat Engine forums. I wouldn't say I'm new to Cheat Engine, but I will say that I am new to scripting when it comes to Lua(or any programming language at all as a matter of fact...) and I ran across a problem... I have a base address that is used by several different values, which is then offset by another value. I've used a pointerscan, and I've turned out every value I wanted to include. However, most of these values share the same base address. The game I'm modifying is Team Fortress 2.
I don't have a lot on the trainer I'm making as of right now, but I'm making a basic makeup of it as I go along.
This is what I have as of right now:
Code:

AboutText=[[Thank you for downloading my trainer. This is actually the first trainer I've ever made, so I appreciate any use that others put into it. This trainer is for offline use ONLY! This trainer will only work on an offline Training Session or an Online server privately hosted by you. The purpose of this trainer is only to mess around with offline play or play isolated to your server only. After you've finished use with this trainer, please restart your computer before going on any VAC(Valve Anti-Cheat) server, or you will incur a permanent ban! When hosting an online server when this process is hooked into the server, please set it to VAC-Insecure, or you will risk banning not only yourself, but any other client on the server! Each hack on here comes with a guide on how to use them, so you will get the most use out of it. Other than that, please enjoy the use of this software! DISCLAIMER: I WILL NOT TAKE RESPONSIBILITY FOR HOW YOU MAY USE THIS SOFTWARE! WHAT YOU DO WITH IT IS YOUR FAULT AND YOUR'S ALONE!]]
CreditsText=[[Still in Aplha Phase of Development]]
NotesText=[[Before using this Custom Trainer, please close any other games that are associated with the hl2.exe process! This trainer hooks that process, and any interference will cause issues and eliminate the efficacy of this trainer! On other note, enjoy the software!]]
HelpCoordinateText=[[To get the coordinate to see your current position, go into the TF2 console, enable cheats, and type in cl_showpos 1 NOTE: For the Y-Axis, please minus -75 from the Y-Coordinate. This calculation must've been placed to confuse future hackers]]

form_show(UDF1)
getAutoAttachList().add("hl2.exe")

function CloseClick()
  closeCE()
  return caFree
end

UDF1.OnClose = CloseClick

addresslist=getAddressList()

function CEButton1Click(sender)
  showMessage(CreditsText)
end

function CEButton2Click(sender)
  showMessage(AboutText)
end

function CEButton3Click(sender)
  showMessage(NotesText)
end

function CEButton4Click(sender)
  setProperty(UDF1.CoordinateX,"Text", readFloat(""))
  setProperty(UDF1.CoordinateY,"Text", readFloat(""))
  setProperty(UDF1.CoordinateZ,"Text", readFloat(""))
end

function CEButton5Click(sender)
  writeFloat("", getProperty(UDF1.CoordinateX,"Text"))
  writeFloat("", getProperty(UDF1.CoordinateY,"Text"))
  writeFloat("", getProperty(UDF1.CoordinateZ,"Text"))
end

function CEButton6Click(sender)
  showMessage(HelpCoordinateText)
end

As you can see(from the attachments below), these values use the same base address("server.dll"+008BF16C) and yet they are offset once again afterward. So, exactly how would I incorporate this in a script? I know that if I had just a base address that centered in on these without pointing, then I would be in business. Say my value for game gravity. It accesses an in-game CVAR(Console Variable) that is server based, and then writes to it. If I put it into my trainer, it works perfectly. I can read it, and write to it. I will have pictures showing this entire thing as I read it out, so you can get a good picture of what I may be doing wrong. Also, considering I'm putting a credits list in, I will make sure to include your name if you do decide to help me. By the way, to learn the way I currently am, I'm using Rydian's tutorial on Lua Scripting and Trainers(I can't post links yet apparently...)



Untitled3.png
 Description:
Cheat with Base Address Without Pointer(Working)
 Filesize:  614.02 KB
 Viewed:  4771 Time(s)

Untitled3.png



Untitled2.png
 Description:
Cheat with Same Base Address and Different Offset
 Filesize:  513.65 KB
 Viewed:  4771 Time(s)

Untitled2.png



Untitled1.png
 Description:
Cheat with Base Address and Offset
 Filesize:  1008.94 KB
 Viewed:  4771 Time(s)

Untitled1.png



Team Fortress 2.CT
 Description:
My TF2 Cheat Table for Reference

Download
 Filename:  Team Fortress 2.CT
 Filesize:  8.93 KB
 Downloaded:  606 Time(s)

Back to top
View user's profile Send private message
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Tue Jun 09, 2015 9:45 am    Post subject: Reply with quote

Code:
[[BaseAddress]+Offset1]+Offset2


The Image Should Make It Clear For You

Back to top
View user's profile Send private message
Reclaimer Shawn
Advanced Cheater
Reputation: 0

Joined: 09 Jun 2015
Posts: 77

PostPosted: Tue Jun 09, 2015 10:12 pm    Post subject: Reply with quote

Thank you! Helped me out a lot, and I can cow get back to work on the trainer. Thank you once again, and if you wish, I can list you in the credits. It's not exactly going to be a wide release or anything special, but like a trinket of some sort. I will put it on here later if I get finished though.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Wed Jun 10, 2015 2:35 am    Post subject: Reply with quote

You can also access the addresslist and set the .Value property of the memoryrecord containing the pointer
_________________
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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites