Explorar el Código

Data CT now includes scripts from external files properly.

master
hace 4 años
padre
commit
eac608b7aa
Se han modificado 3 ficheros con 183 adiciones y 309 borrados
  1. 137
    274
      DMC4SE-Data&Dev.CT
  2. 7
    3
      luas/autoset.lua
  3. 39
    32
      luas/d3dmenu.lua

+ 137
- 274
DMC4SE-Data&Dev.CT Ver fichero

@@ -1,6 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
<CheatEntries>
<CheatEntry>
<ID>1283</ID>
<Description>"Table Options"</Description>
<Options moHideChildren="1" moManualExpandCollapse="1" moAllowManualCollapseAndExpand="1"/>
<LastState Value="" Activated="0" RealAddress="00000000"/>
<Color>80000008</Color>
<GroupHeader>1</GroupHeader>
<CheatEntries>
<CheatEntry>
<ID>1284</ID>
<Description>"Disable both Automatic Attach and Set Favorites"</Description>
<LastState Activated="1"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[enable]
{$lua}
if attacher ~= nil then
attacher.destroy()
end
{$asm}
[disable]
{$lua}
attacher = createTimer(AutoAttach)
timer_manager(attacher, 500, check_for_DMC4SE, true)
{$asm}
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>1285</ID>
<Description>"Enable In-Game Mini-Menu"</Description>
<Options moHideChildren="1"/>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[enable]
{$lua}
D3D.createD3Dmenu(hook)
hook.OnClick = D3D.option_click
{$asm}
[disable]
{$lua}
D3D.destroyD3Dmenu()
hook.OnClick = nil
{$asm}
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>1286</ID>
<Description>"Toggle Display &lt;&lt;Assign Hotkey&gt;&gt;"</Description>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[enable]
{$lua}
toggle_display()
{$asm}
[disable]
{$lua}
toggle_display()
{$asm}
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>192</Key>
</Keys>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatEntry>
<CheatEntry>
<ID>1380</ID>
<Description>"Game Data"</Description>
@@ -28,7 +107,7 @@
<CheatEntry>
<ID>1358</ID>
<Description>"Simple Press"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="012868AC"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -37,7 +116,7 @@
<CheatEntry>
<ID>1360</ID>
<Description>"Hold"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01286874"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -46,7 +125,7 @@
<CheatEntry>
<ID>1359</ID>
<Description>"Lock-On + Back"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="012867CC"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -55,7 +134,7 @@
<CheatEntry>
<ID>1361</ID>
<Description>"Lock-On + Forward"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01286804"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -64,7 +143,7 @@
<CheatEntry>
<ID>1362</ID>
<Description>"Lock-On + Back to Forward"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01286724"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -73,7 +152,7 @@
<CheatEntry>
<ID>1363</ID>
<Description>"Lock+On + No Sword in Target"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0128667C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -82,7 +161,7 @@
<CheatEntry>
<ID>1364</ID>
<Description>"No Lock + Sword Embedded"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="012866B4"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -91,7 +170,7 @@
<CheatEntry>
<ID>1365</ID>
<Description>"No Lock + No Sword Embedded"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="012866EC"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -210,7 +289,7 @@
<CheatEntry>
<ID>1200</ID>
<Description>"Suspect Base Address"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01323960"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -234,7 +313,7 @@
<CheatEntry>
<ID>1201</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135FCD4"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -253,7 +332,7 @@
<CheatEntry>
<ID>1204</ID>
<Description>"Suspect Base Address "</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135FE34"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -277,7 +356,7 @@
<CheatEntry>
<ID>1205</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135FE78"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -296,7 +375,7 @@
<CheatEntry>
<ID>1209</ID>
<Description>"Suspect Base Address"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135EDE0"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -320,7 +399,7 @@
<CheatEntry>
<ID>1210</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135FE08"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -329,7 +408,7 @@
<CheatEntry>
<ID>1211</ID>
<Description>"Suspect Base Address 3"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01360A7C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -348,7 +427,7 @@
<CheatEntry>
<ID>1246</ID>
<Description>"Suspect Base Address"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135EC78"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -372,7 +451,7 @@
<CheatEntry>
<ID>1247</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01360114"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -391,7 +470,7 @@
<CheatEntry>
<ID>1270</ID>
<Description>"Suspect Base Address"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01360140"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -415,7 +494,7 @@
<CheatEntry>
<ID>1271</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01360278"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -434,7 +513,7 @@
<CheatEntry>
<ID>1274</ID>
<Description>"Suspect Base Address "</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135FFEC"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -458,7 +537,7 @@
<CheatEntry>
<ID>1275</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01328030"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -477,7 +556,7 @@
<CheatEntry>
<ID>1279</ID>
<Description>"Suspect Base Address"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0135DE2C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -501,7 +580,7 @@
<CheatEntry>
<ID>1280</ID>
<Description>"Suspect Base Address 2"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="013601B0"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -510,7 +589,7 @@
<CheatEntry>
<ID>1281</ID>
<Description>"Suspect Base Address 3"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0136094C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -531,7 +610,7 @@
<CheatEntry>
<ID>101</ID>
<Description>"Start of Work Rate Array"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01359F18"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -616,7 +695,7 @@
<CheatEntry>
<ID>463</ID>
<Description>"Style Meter Start"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01359F14"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -840,7 +919,7 @@
<CheatEntry>
<ID>746</ID>
<Description>"N -&gt; D "</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005B0E48"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -849,7 +928,7 @@
<CheatEntry>
<ID>748</ID>
<Description>"D -&gt; C"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005B0E4C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -858,7 +937,7 @@
<CheatEntry>
<ID>749</ID>
<Description>"C -&gt; B"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005B0E50"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -867,7 +946,7 @@
<CheatEntry>
<ID>750</ID>
<Description>"B -&gt; A"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005B0E54"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -938,7 +1017,7 @@
<CheatEntry>
<ID>762</ID>
<Description>"Static Address of Virtual Function Table (Vergil?)"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="010151B8"/>
<ShowAsHex>1</ShowAsHex>
<Color>008000</Color>
<VariableType>4 Bytes</VariableType>
@@ -1031,7 +1110,7 @@
<CheatEntry>
<ID>764</ID>
<Description>"Static Address of Virtual Function Table (Dante)"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01077728"/>
<ShowAsHex>1</ShowAsHex>
<Color>008000</Color>
<VariableType>4 Bytes</VariableType>
@@ -1040,7 +1119,7 @@
<CheatEntry>
<ID>771</ID>
<Description>"Static Address of Virtual Function Table (Nero)"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01078F48"/>
<ShowAsHex>1</ShowAsHex>
<Color>008000</Color>
<VariableType>4 Bytes</VariableType>
@@ -2641,7 +2720,7 @@
<CheatEntry>
<ID>528</ID>
<Description>"Boss Collapse Threshhold (Given 4,0)"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="011C8400"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>DevilMayCry4SpecialEdition.exe+DC83D0+30</Address>
@@ -6207,7 +6286,7 @@
<CheatEntry>
<ID>118</ID>
<Description>"Enemy List Start"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01359E64"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -6259,7 +6338,7 @@
<CheatEntry>
<ID>249</ID>
<Description>"Mission &amp; Bloody Palace Start"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01323F38"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -6582,7 +6661,7 @@
<CheatEntry>
<ID>624</ID>
<Description>"No description"</Description>
<LastState Activated="0" RealAddress="00000000"/>
<LastState Activated="0" RealAddress="00F9B0B8"/>
<Color>80000008</Color>
<VariableType>String</VariableType>
<Length>20</Length>
@@ -6593,7 +6672,7 @@
<CheatEntry>
<ID>625</ID>
<Description>"No description"</Description>
<LastState Activated="0" RealAddress="00000000"/>
<LastState Activated="0" RealAddress="00F9C2CC"/>
<Color>80000008</Color>
<VariableType>String</VariableType>
<Length>10</Length>
@@ -7117,7 +7196,7 @@
<CheatEntry>
<ID>754</ID>
<Description>"Dante"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0059B060"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7126,7 +7205,7 @@
<CheatEntry>
<ID>756</ID>
<Description>"Nero"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0059B064"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7135,7 +7214,7 @@
<CheatEntry>
<ID>757</ID>
<Description>"Vergil"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0059B068"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7144,7 +7223,7 @@
<CheatEntry>
<ID>1193</ID>
<Description>"Trish"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0059B06C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7153,7 +7232,7 @@
<CheatEntry>
<ID>1194</ID>
<Description>"Lady"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0059B070"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7172,7 +7251,7 @@
<CheatEntry>
<ID>766</ID>
<Description>"Case 0 - Dante"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="00516894"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7181,7 +7260,7 @@
<CheatEntry>
<ID>767</ID>
<Description>"Case 1 - Nero"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="00516898"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7190,7 +7269,7 @@
<CheatEntry>
<ID>768</ID>
<Description>"Case 2 - Vergil"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="0051689C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7199,7 +7278,7 @@
<CheatEntry>
<ID>769</ID>
<Description>"Case 3 - Trish"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005168A0"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7208,7 +7287,7 @@
<CheatEntry>
<ID>770</ID>
<Description>"Case 4 - Lady"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="005168A4"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -7347,7 +7426,7 @@
<CheatEntry>
<ID>1376</ID>
<Description>"Player Dead Menu Option I.D"</Description>
<LastState Value="??" Activated="0" RealAddress="00000000"/>
<LastState Value="??" Activated="0" RealAddress="01359EB8"/>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
<Address>DevilMayCry4SpecialEdition.exe+f59eb8</Address>
@@ -39660,11 +39739,16 @@ by Hydris
Thanks to the users and forumgoers.
Feedback is what made this table as it is.
-----------------------------------------------
This file is contains only game data and additional scripts to aid in development.
-----------------------------------------------
</Comments>
<LuaScript>local modulepath = TrainerOrigin.."luas/"
package.path = modulepath .. "?.lua;"
D3D = require "d3dmenu"
auto = require "autoset"
-----------------------------------------------</Comments>
<LuaScript>function symbols()
function symbols()
--Below are symbols I would've just added and not use a script at all
--if not the symbols resetting all the time for some strange reason.
registerSymbol("Dante::UpdateRoyalGauge", "DevilMayCry4SpecialEdition.exe+4DCE20")
@@ -39712,34 +39796,6 @@ function doAOBScan(string) --in-function display
end
end
function autoset(entries, str_entry_description)
local entry = entries.getMemoryRecordByDescription(str_entry_description)
if entry ~= nil then
if entry.Active ~= true then
entry.Active = true
else
--if already active, it needs a toggle otherwise effect won't occur.
--this is only needed for AA scripts and edits directed at the game!
entry.Active = false
entry.Active = true
end
end
end
function autoenable_favorites()
--This means the trainer will read in a text file from the same directory.
--You can edit or append to this if
--you wish to store files in a different folder instead.
local favoritesfile = TrainerOrigin .. "favorites.txt"
local records = getAddressList()
local file = io.open(favoritesfile, "r")
if file ~= nil then
for line in io.lines(favoritesfile) do
autoset(records, line)
end
end
end
function check_for_DMC4SE()
local DMC4SE = "DevilMayCry4SpecialEdition.exe"
local attached = getOpenedProcessID()
@@ -39757,203 +39813,10 @@ end
function onOpenProcess()
reinitializeSymbolhandler() --wait until process is fully attached
autoenable_favorites()
auto.enable_favorites()
hook = createD3DHook()
end
function status_txt(bool)
if bool then
return "ON"
end
return "OFF"
end
function init_options() --default if no file is found
--A bit obtuse, but less so
--Menu options are manually chosen
--Right now adding in stuff from the addreslist by i.d makes a menu I don't really want.
Options = {} --text containers
Options.size = 8
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
selected_option = 1 --used as index
addresses = getAddressList()
local txtheight = fmap.Height
OStrings[1] = 'Disable Camera Events (No "Screen Blink", but Some Issues in Missions)'
OLabels[1] = "Disable Camera Events: "
OStates[1] = addresses.getMemoryRecordByDescription(OStrings[1]).Active
Options[1] = hook.createTextContainer(fmap, 0, 50,
OLabels[1]..status_txt(OStates[1]))
OStrings[2] = 'Auto-Skip Cutscenes (Checking This Enables Everything Under This Section)'
OLabels[2] = "Auto-Skip Cutscenes: "
OStates[2] = addresses.getMemoryRecordByDescription(OStrings[2]).Active
Options[2] = hook.createTextContainer(fmap, 0, 50+txtheight,
OLabels[2]..status_txt(OStates[2]))
OStrings[3] = 'Disable Bloody Palace Timer'
OLabels[3] = "Disable Bloody Palace Timer: "
OStates[3] = addresses.getMemoryRecordByDescription(OStrings[3]).Active
Options[3] = hook.createTextContainer(fmap, 0, 50+txtheight*2,
OLabels[3]..status_txt(OStates[3]))
OStrings[4] = 'No One Dies (Effect Takes Precedence Over Damage Modifiers)'
OLabels[4] = "No One Dies: "
OStates[4] = addresses.getMemoryRecordByDescription(OStrings[4]).Active
Options[4] = hook.createTextContainer(fmap, 0, 50+txtheight*3,
OLabels[4]..status_txt(OStates[4]))
OStrings[5] = 'No One Takes Damage'
OLabels[5] = "No One Takes Damage: "
OStates[5] = addresses.getMemoryRecordByDescription(OStrings[5]).Active
Options[5] = hook.createTextContainer(fmap, 0, 50+txtheight*4,
OLabels[5]..status_txt(OStates[5]))
OStrings[6] = 'Enemy 1-Hit Kill'
OLabels[6] = "Enemy 1-Hit Kill: "
OStates[6] = addresses.getMemoryRecordByDescription(OStrings[6]).Active
Options[6] = hook.createTextContainer(fmap, 0, 50+txtheight*5,
OLabels[6]..status_txt(OStates[6]))
OStrings[7] = 'Allow Trick Down (Air) without DT'
OLabels[7] = "Vergil, No DT - Allow Trick Down: "
OStates[7] = addresses.getMemoryRecordByDescription(OStrings[7]).Active
Options[7] = hook.createTextContainer(fmap, 0, 50+txtheight*6,
OLabels[7]..status_txt(OStates[7]))
OStrings[8] = '"Berial Fire Lost" (Checking this Enables Everything Under This Section)'
OLabels[8] = "Berial Fire Lost: "
OStates[8] = addresses.getMemoryRecordByDescription(OStrings[8]).Active
Options[8] = hook.createTextContainer(fmap, 0, 50+txtheight*7,
OLabels[8]..status_txt(OStates[8]))
end
function finit_options(separator) --from file if found
local filename = TrainerOrigin.."d3dmenu-ops.txt"
local file = io.open(filename, "r")
if file == nil then
return false
end
Options = {} --text containers
Options.size = 0 --how many elements in list
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
selected_option = 1 --used as index
addresses = getAddressList()
local text_height_base = fmap.Height
local text_height_factor = 0
local text_offset = 50
local hit_separator = false
local index = 1
--File Format: Memory Record descriptions first half, labels on the second half.--
for line in io.lines(filename) do
if (not hit_separator) then --read in memory record strings
if (line ~= separator) then--check if separator indicator has been reached
Options.size = Options.size + 1 --nope. no increment in Lua
OStrings[Options.size] = line
OStates[Options.size] = addresses.getMemoryRecordByDescription(OStrings[Options.size]).Active
else
hit_separator = true --mark status for reading displayed labels
end --end check separator string
else --read in displayed labels
OLabels[index] = line
Options[index] = hook.createTextContainer(fmap, 0,
text_offset + (text_height_base * text_height_factor),
OLabels[index]..status_txt(OStates[index]))
index = index + 1 --next iteration; next index
text_height_factor = text_height_factor + 1 --next Option is displayed 1 line down
end --end check hit separator status
end --end for loop
return true
end --end function
function createD3Dmenu()
background = createPicture()
bitmap = background.getBitmap()
bitmap.setHeight(1)
bitmap.setWidth(1)
canvas = bitmap.getCanvas()
canvas.setPixel(0,0, 0xffffff) --White overlay
bgtexture = hook.createTexture(background)
bgsprite = hook.createSprite(bgtexture)
bgsprite.Width = 200
bgsprite.Height = 200
bgsprite.X = 0 --centered horizontally
bgsprite.Alphablend = 0.5
highlight = createPicture()
bitmap = highlight.getBitmap()
bitmap.setHeight(1)
bitmap.setWidth(1)
canvas = bitmap.getCanvas()
canvas.setPixel(0,0, 0x9FB4BA) --highlight color
hltexture = hook.createTexture(highlight)
hlsprite = hook.createSprite(hltexture)
hlsprite.Visible = false --not yet
hlsprite.X = 0 --line up with background
hlsprite.Width = 200
font = createFont()
fmap = hook.createFontmap(font)
hlsprite.Height = fmap.Height
hlsprite.Visible = true
if (not finit_options(":")) then --if file not found
init_options()
end
end
function execute_selected()
OStates[selected_option] = not OStates[selected_option]
addresses.getMemoryRecordByDescription(OStrings[selected_option]).Active = OStates[selected_option]
Options[selected_option].Text = OLabels[selected_option]..status_txt(OStates[selected_option])
end
function option_click(object, x, y)
for i = 1, Options.size do
--see which Option was clicked
if (object == Options[i]) then
selected_option = i
execute_selected()
highlight_selected()
end
end
end
function toggle_display()
bgsprite.Visible = not bgsprite.Visible
hlsprite.Visible = not hlsprite.Visible
for i = 1, Options.size do
Options[i].Visible = not Options[i].Visible
end
end
function highlight_selected()
hlsprite.Y = 50 + (fmap.Height * (selected_option - 1))
end
function destroyD3Dmenu()
--Clean up... everything.
bgsprite.destroy()
bgtexture.destroy()
hlsprite.destroy()
hltexture.destroy()
background.destroy()
highlight.destroy()
bitmap.destroy()
if Options ~= nil then
for i = 1, Options.size do
Options[i].destroy()
end
end
fmap.destroy()
font.destroy()
canvas.destroy()
end
attacher = createTimer(AutoAttach)
timer_manager(attacher, 500, check_for_DMC4SE, true)
</LuaScript>
<DisassemblerComments>
<DisassemblerComment>

+ 7
- 3
luas/autoset.lua Ver fichero

@@ -1,5 +1,7 @@
local auto = {}
--Inputs: (Address list of Cheat Engine, Entry description)
function autoset(entries, str_entry_description)
function auto.set(entries, str_entry_description)
local entry = entries.getMemoryRecordByDescription(str_entry_description)
if entry ~= nil then
if entry.Active ~= true then
@@ -12,7 +14,7 @@ function autoset(entries, str_entry_description)
end
end
function autoenable_favorites()
function auto.enable_favorites()
--This means the trainer will read in a text file from the same directory.
--You can edit or append to this if
--you wish to store files in a different folder instead.
@@ -21,7 +23,9 @@ function autoenable_favorites()
local file = io.open(favoritesfile, "r")
if file ~= nil then
for line in io.lines(favoritesfile) do
autoset(records, line)
auto.set(records, line)
end
end
end
return auto

+ 39
- 32
luas/d3dmenu.lua Ver fichero

@@ -1,11 +1,13 @@
function status_txt(bool)
local d3dmenu = {}
function d3dmenu.status_txt(bool)
if bool then
return "ON"
end
return "OFF"
end
function init_options() --default if no file is found
function d3dmenu.init_options(hook) --default if no file is found
--A bit obtuse, but less so
--Menu options are manually chosen
--Right now adding in stuff from the addreslist by i.d makes a menu I don't really want.
@@ -66,17 +68,17 @@ function init_options() --default if no file is found
OLabels[8]..status_txt(OStates[8]))
end
function finit_options(separator) --from file if found
function d3dmenu.finit_options(separator, hook) --from file if found
local filename = TrainerOrigin.."d3dmenu-ops.txt"
local file = io.open(filename, "r")
if file == nil then
return false
end
Options = {} --text containers
Options.size = 0 --how many elements in list
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
Options = {} --text containers
Options.size = 0 --how many elements in list
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
selected_option = 1 --used as index
addresses = getAddressList()
local text_height_base = fmap.Height
@@ -84,37 +86,40 @@ function finit_options(separator) --from file if found
local text_offset = 50
local hit_separator = false
local index = 1
--File Format: Memory Record descriptions first half, labels on the second half.--
local mrecord = nil --result from CE's get MemoryRecordByDescription
--File Format: Memory Record descriptions first half, labels on the second half.
-- IF the separator has not been hit, and neither is current like the separator mark
for line in io.lines(filename) do
if (not hit_separator) then --read in memory record strings
if (line ~= separator) then--check if separator indicator has been reached
Options.size = Options.size + 1 --nope. no increment in Lua
if (not hit_separator) and (line ~= separator) then --read in memory record strings
mrecord = addresses.getMemoryRecordByDescription(line)
if mrecord then --must be valid result
Options.size = Options.size + 1
OStrings[Options.size] = line
OStates[Options.size] = addresses.getMemoryRecordByDescription(OStrings[Options.size]).Active
else
hit_separator = true --mark status for reading displayed labels
end --end check separator string
else --read in displayed labels
OStates[Options.size] = mrecord.Active
end
elseif (not hit_separator) and line == separator then
hit_separator = true --mark status for reading displayed labels
else --read in displayed labels
OLabels[index] = line
Options[index] = hook.createTextContainer(fmap, 0,
text_offset + (text_height_base * text_height_factor),
OLabels[index]..status_txt(OStates[index]))
index = index + 1 --next iteration; next index
OLabels[index]..d3dmenu.status_txt(OStates[index]))
index = index + 1 --next iteration; next index
text_height_factor = text_height_factor + 1 --next Option is displayed 1 line down
end --end check hit separator status
end --end for loop
return true
end --end function
function createD3Dmenu()
function d3dmenu.createD3Dmenu(CE_hook)
background = createPicture()
bitmap = background.getBitmap()
bitmap.setHeight(1)
bitmap.setWidth(1)
canvas = bitmap.getCanvas()
canvas.setPixel(0,0, 0xffffff) --White overlay
bgtexture = hook.createTexture(background)
bgsprite = hook.createSprite(bgtexture)
bgtexture = CE_hook.createTexture(background)
bgsprite = CE_hook.createSprite(bgtexture)
bgsprite.Width = 200
bgsprite.Height = 200
bgsprite.X = 0 --centered horizontally
@@ -126,28 +131,28 @@ function createD3Dmenu()
bitmap.setWidth(1)
canvas = bitmap.getCanvas()
canvas.setPixel(0,0, 0x9FB4BA) --highlight color
hltexture = hook.createTexture(highlight)
hlsprite = hook.createSprite(hltexture)
hltexture = CE_hook.createTexture(highlight)
hlsprite = CE_hook.createSprite(hltexture)
hlsprite.Visible = false --not yet
hlsprite.X = 0 --line up with background
hlsprite.Width = 200
font = createFont()
fmap = hook.createFontmap(font)
fmap = CE_hook.createFontmap(font)
hlsprite.Height = fmap.Height
hlsprite.Visible = true
if (not finit_options(":")) then --if file not found
init_options()
if (not d3dmenu.finit_options(":", CE_hook)) then --if file not found
d3dmenu.init_options(CE_hook)
end
end
function execute_selected()
function d3dmenu.execute_selected()
OStates[selected_option] = not OStates[selected_option]
addresses.getMemoryRecordByDescription(OStrings[selected_option]).Active = OStates[selected_option]
Options[selected_option].Text = OLabels[selected_option]..status_txt(OStates[selected_option])
end
function option_click(object, x, y)
function d3dmenu.option_click(object, x, y)
for i = 1, Options.size do
--see which Option was clicked
if (object == Options[i]) then
@@ -158,7 +163,7 @@ function option_click(object, x, y)
end
end
function toggle_display()
function d3dmenu.toggle_display()
bgsprite.Visible = not bgsprite.Visible
hlsprite.Visible = not hlsprite.Visible
for i = 1, Options.size do
@@ -166,11 +171,11 @@ function toggle_display()
end
end
function highlight_selected()
function d3dmenu.highlight_selected()
hlsprite.Y = 50 + (fmap.Height * (selected_option - 1))
end
function destroyD3Dmenu()
function d3dmenu.destroyD3Dmenu()
--Clean up... everything.
bgsprite.destroy()
bgtexture.destroy()
@@ -188,3 +193,5 @@ function destroyD3Dmenu()
font.destroy()
canvas.destroy()
end
return d3dmenu

Cargando…
Cancelar
Guardar