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 


Newbie/need help ._.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
nigh7walker
How do I cheat?
Reputation: 0

Joined: 31 Dec 2014
Posts: 1

PostPosted: Wed Dec 31, 2014 10:20 pm    Post subject: Newbie/need help ._. Reply with quote

Hello guys! Apologies if this is not the correct section for this thread/if asking such thing is not allowed, but I desperately need some information about Cheat Engine, I really hope you guys can help me.

I was wondering if it is possible to make a value change automatically every x seconds to a specified value.

For example, I hack my ping value in an fps game (the visual, of course) and I change it to 1000, so I look like a lagger.
Now, if I don't freeze it, it'll go back to normal once it changes, but if I freeze it, it won't be changing by itself, and they will know it's fake.
Is it possible to have something like a number randomizer that will change the ping value into a random number between 900~1000 every <x> seconds for example?

Thanks in advance and Happy New Year to everyone! :3
Back to top
View user's profile Send private message
Krampus
Cheater
Reputation: 0

Joined: 22 Nov 2014
Posts: 41

PostPosted: Wed Dec 31, 2014 10:42 pm    Post subject: Reply with quote

I'm not sure without C++, though I'd guess there's a way to do so with Lua and the trainer maker(?). Do you have any coding experience?
_________________
There is no spoon.
Back to top
View user's profile Send private message
nigh7walker
How do I cheat?
Reputation: 0

Joined: 31 Dec 2014
Posts: 1

PostPosted: Wed Dec 31, 2014 10:48 pm    Post subject: Reply with quote

GingerBreadMan wrote:
I'm not sure without C++, though I'd guess there's a way to do so with Lua and the trainer maker(?). Do you have any coding experience?


Unfortunately not :/ Guess I'll have to stick with a trainer and changing my ping manually with hotkeys to make it look real. Thank you for your reply!
Back to top
View user's profile Send private message
Krampus
Cheater
Reputation: 0

Joined: 22 Nov 2014
Posts: 41

PostPosted: Wed Dec 31, 2014 11:20 pm    Post subject: Reply with quote

Glad I could be of some little help Razz. Happy new years to you as well!
_________________
There is no spoon.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 941

PostPosted: Sun Jan 04, 2015 4:40 am    Post subject: Reply with quote

This should do the job.

First Paste this code in Menu:'Table'/'Show Cheat Table Lua Script'.

Code:
local ptsd = PERSISTENCE_SESSION_DATA or {} --
local function killTimer(t)
  if t ~= nil and t.ClassName == 'TTimer' then
    if t.Enabled then t.Enabled = false end
    if t.destroy then t.destroy() end
  end
  return nil
end
local function randomMR(mrDescOrID,interval,startRnd,endRnd)
  local mr = type(mrDescOrID) == 'string' and getAddressList().getMemoryRecordByDescription(mrDescOrID) or type(mrDescOrID) == 'number' and getAddressList().getMemoryRecordByID(mrDescOrID) or mrDescOrID
  if ptsd.mrtimer == nil or type(ptsd.mrtimer) ~= 'table' then ptsd.mrtimer = {} end
  if mr ~= nil and mr.ClassName =='TMemoryRecord' then
    local mid = mr.ID
    if interval == 0 then
      if ptsd.mrtimer[mid] ~= nil then
        ptsd.mrtimer[mid] = killTimer(ptsd.mrtimer[mid]) -- return nil, remove mid from mrtimer
      end
    else
      if ptsd.mrtimer[mid] == nil or ptsd.mrtimer[mid].ClassName ~= 'TTimer' then
        ptsd.mrtimer[mid] = createTimer()
      end
      startRnd = startRnd~=nil and type(startRnd)=='number' and startRnd or 1
      endRnd = endRnd~=nil and type(endRnd)=='number' and endRnd or 1 --
      if startRnd > endRnd then startRnd,endRnd = endRnd,startRnd end
      ptsd.mrtimer[mid].Interval = interval
      ptsd.mrtimer[mid].OnTimer = function()
        if mr ~= nil and mr.Active == true then
           local ok,v = pcall(math.random,startRnd,endRnd)
           if ok then
             mr.Value = v
           else
             ptsd.mrtimer[mid]=killTimer(ptsd.mrtimer[mid])
             error('Invalid random range:'..tostring(startRnd)..'<->'..tostring(endRnd))
           end
        end
      end
      ptsd.mrtimer[mid].Enabled = true
    end
    return mid
  elseif type(mr) == 'number' and interval == 0 and ptsd.mrtimer[mr] ~= nil then
    ptsd.mrtimer[mr] = killTimer(ptsd.mrtimer[mr])
    return mr
  else
    error('Cannot find the MemoryRecord with Description or ID:'.. tostring(mrDescOrID))
    return nil
  end
end

randomMR('Random Value',2000,100,200) -- start/change the timer
--randomMR('Random Value',0) -- remove the timer


note: 'Random Value' is the description of the memoryRecord's description.

This should be able to start the timer.

However if it is in Cheat Table (CT) environment, ie. not in cetrainer, the timer will be lost tracked after execution, that means the timer cannot be kill or change.
The reason I guess is that the lua script in CT environment is run in a sand-box, everything inside sand-box will lose after execution.

To keep track of the timer, try make a *.lua file with the following content at the folder 'autorun' under the CE Install Directory. (ce version 6.4+)
Code:
PERSISTENCE_SESSION_DATA={}


This provide a global storage outside the sand-box so that the timer can be keep tracked.

The folder 'autorun' may need administrative right to make change depending on your os.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Sun Jan 04, 2015 4:09 pm    Post subject: Reply with quote

Moved as this is not a tutorial.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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