Dim
A,X地址,Y地址,摇杆X地址,摇杆Y地址,当前X,当前Y
Dim
目标X=
50.
0
Dim
目标Y=
30.
0
A =
Sys.
MemorySearch
(
"com.ztgame.bob"
,
True
,
"0x0"
, {{
"lv"
:2143289344},{
"lv"
:1065353216,
"offset"
:16},{
"lv"
:55650815,
"offset"
:160}},
"i32"
,0,1)
X地址 =
"0x"
&
Hex
(
CLng
(
"0x"
&
Right
(A(0),
Len
(A(0)) - 2)) - 60)
Y地址 =
"0x"
&
Hex
(
CLng
(
"0x"
&
Right
(A(0),
Len
(A(0)) - 2)) - 56)
A =
Sys.
MemorySearch
(
"com.ztgame.bob"
,
True
,
"0x0"
, {{
"lv"
:1034147594}, {
"lv"
:1039516303,
"offset"
:40}},
"i32"
,0,1)
摇杆X地址 =
"0x"
&
Hex
(
CLng
(
"0x"
&
Right
(A(0),
Len
(A(0)) - 2)) - 44)
摇杆Y地址 =
"0x"
&
Hex
(
CLng
(
"0x"
&
Right
(A(0),
Len
(A(0)) - 2)) - 40)
当前X =
CDbl
(
Sys.
MemoryRead
(
"com.ztgame.bob"
, X地址,
"f32"
))
当前Y =
CDbl
(
Sys.
MemoryRead
(
"com.ztgame.bob"
, Y地址,
"f32"
))
Sys.
MemoryWrite
(
"com.ztgame.bob"
,摇杆X地址,
Cstr
(目标X - 当前X),
"f32"
)
Sys.
MemoryWrite
(
"com.ztgame.bob"
,摇杆Y地址,
Cstr
(目标Y - 当前Y),
"f32"
)