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 


Cheat Engine Forum Index
PostGo back to topic
panraven
Grandmaster Cheater
Reputation: 54
Joined: 01 Oct 2008
Posts: 941

PostPosted: Wed Nov 09, 2016 4:28 pm    Post subject: Simple CT Deploy script for Large Size file

CE's Table File has good compression ratio (x2~10+).
It may save some future forum attachment file size limit if the original ct can pack into a table file.

The follow script is an example using phokz and others' DS3 table http://forum.cheatengine.org/viewtopic.php?t=589191 (1.6M to 140k)


Sometime, after add file to table file, the new ct may not able to save, try check and edit the added table file name, it may help.

Code:

{$lua}

function Deploy(tblFileName, mrdesc_to_active)
  if getCEVersion()<6.6 then error"Need CE 6.6+" end
  local tblFile = findTableFile(tblFileName)
  if not tblFile then
    print("Can't find table file:"..tostring(tblFileName)..'.\nTry add it using MENU/Table/Add file')
  else
    local tm = createTimer()
    tm.Interval = 1000;
    tm.OnTimer = function(t)
      t.Destroy()
      local al = GetAddressList()
      while al.Count>0 do al[0].Destroy()end
      loadTable(tblFile.Stream ,false, false) -- not merge, not ignore lua error
      if mrdesc_to_active then
        local mr = al.getMemoryRecordByDescription(mrdesc_to_active)
        if mr then mr.Active = true end
      end
    end
  end
end

if not syntaxcheck then
  -- example, load Ds3 and active the 'Open' memory record
  Deploy('DS3.CT','Open')
end


{$asm}

[ENABLE]

 
[DISABLE]


bye~
_________________
- Retarded.


Last edited by panraven on Thu Nov 10, 2016 9:12 am; edited 5 times in total
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
ParkourPenguin
Review: Approve
Post reference:
ReviewPosted: Mon Nov 14, 2016 8:08 pm


Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites