法术冷却速度

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,$1000,"b1-Win64-Shipping.exe"+2BDEB42)
registersymbol(SpellRecoverySpeed) //注册
label(returnhere)
label(originalcode)
label(SpellRecoverySpeed)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
movss xmm2,[SpellRecoverySpeed]
//相乘
mulss xmm1, xmm2
subss xmm0,xmm1
mov rcx,r15

exit:
jmp returnhere

SpellRecoverySpeed:
dd (float)1.0 //默认1.0

"b1-Win64-Shipping.exe"+2BDEB42:
jmp newmem
nop 2
returnhere:



[DISABLE]
//code from here till the end of the code will be used to disable the cheat
unregistersymbol(*)
dealloc(*)
"b1-Win64-Shipping.exe"+2BDEB42:
//subss xmm0,xmm1
//mov rcx,r15
db F3 0F 5C C1 49 8B CF

编辑框&按钮

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
-- 功能1
topPosition = topPosition + verticalSpacing
lbl1 = createLabel(form)
lbl1.Caption = '法术恢复速度倍率:'
lbl1.Left = leftPosition
lbl1.Top = topPosition

edt1 = createEdit(form)
edt1.Left = leftPosition + 190
edt1.Top = topPosition
edt1.Width = 50
edt1.Text = '2.0'

btn1 = createButton(form)
btn1.Caption = '修改'
btn1.Left = leftPosition + 250
btn1.Top = topPosition
btn1.Width = 60
-- 执行的函数
btn1.OnClick = function()
local SpellRecovery = getAddressList().getMemoryRecordByDescription("法术恢复速度")
if not SpellRecovery.active then
SpellRecovery.active = true
end

local speedAddress = getAddressSafe("SpellRecoverySpeed")

-- 获取并验证用户输入
local inputText = edt1.Text:match("^%s*(.-)%s*$") -- 去除首尾空格

if inputText == "" then
showMessage("请输入法术恢复速度倍率!")
return
end

local inputValue = tonumber(inputText)
if not inputValue then
showMessage("错误:必须输入有效数字(例如2.5)")
edt1.clear()
return
end

-- 写入内存(单精度浮点数)
writeFloat(speedAddress, inputValue)

local value = edt1.Text
memo1.Lines.add(lbl1.Caption .. ' 已修改: ' .. value)
end

回蓝

Timer实现:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{$lua}
if syntaxcheck then return end --语法检查(syntax check)
[ENABLE]
if manaTimer ~= nil then
manaTimer.destroy()
manaTimer = nil
end
-- 创建一个定时器
manaTimer = createTimer()
manaTimer.setInterval(1000) -- 设置定时器每秒触发一次

-- 定义定时器的回调函数
manaTimer.onTimer = function()
-- 安全获取 pbase2 的地址
-- 获取并验证用户输入
local inputText = UDF1.CEEdit2.Text:match("^%s*(.-)%s*$") -- 去除首尾空格
local blueValue = tonumber(inputText)
local pbase2 = getAddressSafe('[pbase2]')
if pbase2 ~= nil then
-- 逐层获取内存地址
local offset28 = getAddressSafe('[[pbase2]+28]')
if offset28 ~= nil then
local offset18 = getAddressSafe('[[[pbase2]+28]+18]')
if offset18 ~= nil then
local offset38 = getAddressSafe('[[[[pbase2]+28]+18]+38]')
if offset38 ~= nil then
-- 蓝的上限值
local staen = readFloat('[[[[pbase2]+28]+18]+38]+28')
-- 从指定地址读取浮点数
local currentValue = readFloat('[[[[pbase2]+28]+18]+38]+280')
currentValue = math.min(currentValue + blueValue, staen)

-- 将更新后的值写入内存
writeFloat('[[[[pbase2]+28]+18]+38]+280', currentValue)
end
end
end
end
end



[DISABLE]
manaTimer.destroy()