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 


how to add custom tool? [help]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Fri Jul 13, 2018 9:02 am    Post subject: how to add custom tool? [help] Reply with quote

Hi, how to add custom tool like TheyCallMeTim & Corroder Form to Lua
thanks

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Jul 13, 2018 1:27 pm    Post subject: This post has 1 review(s) Reply with quote

For Lua extensions/tools you just put it in the CE "autorun" folder.

i.e.: "C:\Program Files (x86)\Cheat Engine 6.8.1\autorun"

_________________
Back to top
View user's profile Send private message Visit poster's website
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Fri Jul 13, 2018 5:22 pm    Post subject: Reply with quote

TheyCallMeTim13 wrote:
For Lua extensions/tools you just put it in the CE "autorun" folder.

i.e.: "C:\Program Files (x86)\Cheat Engine 6.8.1\autorun"

oooo thanks
and how to make like a new MenuStrip?

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Jul 13, 2018 8:29 pm    Post subject: Reply with quote

This is the code that creates or adds to the tools menu on the main form.

Code:

local format = string.format
local strE = string.empty or STRING_EMPTY or ''
local t = translate


local LineEnd = '\r\n'

local CreateMainFormMenuItems = true
local MainMenuItemName = 'ools1' --'miTools' -- 'ools1'
local MainMenuItemCaption = t('Tools')
local ToolMenuItemCaption = t('CE Form to LUA')
local ToolFormCaption = t('Convert CE Form to Lua script')

-- ...

--
----
---- Setup and load
local function addMenuItem(parent, caption)
   if parent == nil then return nil end
   local newItem = createMenuItem(parent)
   parent.add(newItem)
   newItem.Caption = caption
   return newItem
end

local function createMainFormMenu()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTools = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == MainMenuItemName then
         miTools = menuItems[i]
         miTools.visible = true
         -- addMenuItem(miTools, '-')
      end
   end
   if miTools == nil then
      miTools = createMenuItem(MainForm)
      miTools.Name = MainMenuItemName
      miTools.Caption = MainMenuItemCaption
      menuItems.insert(menuItems.Count - 2, miTools)
   end
   return miTools
end

local function loadMenuAddCEForm2Lua()
   local function loadloadMenuAddCEForm2LuaTimer_tick(timer)
      timer.destroy()
      if CreateMainFormMenuItems then
         local miTools = createMainFormMenu()
         addMenuItem(miTools, t(ToolMenuItemCaption)).setOnClick(form2LuaTool)
      end
   end
   local intervals = 100
   local timer = createTimer(MainForm)
   timer.Interval = intervals
   timer.OnTimer = loadloadMenuAddCEForm2LuaTimer_tick
end

loadMenuAddCEForm2Lua()

_________________
Back to top
View user's profile Send private message Visit poster's website
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Sat Jul 14, 2018 4:47 am    Post subject: Reply with quote

TheyCallMeTim13 wrote:
This is the code that creates or adds to the tools menu on the main form.

Code:

local format = string.format
local strE = string.empty or STRING_EMPTY or ''
local t = translate


local LineEnd = '\r\n'

local CreateMainFormMenuItems = true
local MainMenuItemName = 'ools1' --'miTools' -- 'ools1'
local MainMenuItemCaption = t('Tools')
local ToolMenuItemCaption = t('CE Form to LUA')
local ToolFormCaption = t('Convert CE Form to Lua script')

-- ...

--
----
---- Setup and load
local function addMenuItem(parent, caption)
   if parent == nil then return nil end
   local newItem = createMenuItem(parent)
   parent.add(newItem)
   newItem.Caption = caption
   return newItem
end

local function createMainFormMenu()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTools = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == MainMenuItemName then
         miTools = menuItems[i]
         miTools.visible = true
         -- addMenuItem(miTools, '-')
      end
   end
   if miTools == nil then
      miTools = createMenuItem(MainForm)
      miTools.Name = MainMenuItemName
      miTools.Caption = MainMenuItemCaption
      menuItems.insert(menuItems.Count - 2, miTools)
   end
   return miTools
end

local function loadMenuAddCEForm2Lua()
   local function loadloadMenuAddCEForm2LuaTimer_tick(timer)
      timer.destroy()
      if CreateMainFormMenuItems then
         local miTools = createMainFormMenu()
         addMenuItem(miTools, t(ToolMenuItemCaption)).setOnClick(form2LuaTool)
      end
   end
   local intervals = 100
   local timer = createTimer(MainForm)
   timer.Interval = intervals
   timer.OnTimer = loadloadMenuAddCEForm2LuaTimer_tick
end

loadMenuAddCEForm2Lua()


thanky youuu <3

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 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