Skip to content

Commit aa1b128

Browse files
author
qiuapeng
committed
替换漂移call,会导致游戏崩溃
1 parent 01ff78a commit aa1b128

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

game/call.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ def drift_call(ptr, x, y, z, speed):
160160
:param speed: int 速度
161161
:return:
162162
"""
163+
coordinate_move(x, y)
164+
return
163165
shell_code = [72, 129, 236, 0, 8, 0, 0]
164166
shell_code = helper.add_list(shell_code, [185, 240, 0, 0, 0])
165167
shell_code = helper.add_list(shell_code, [72, 184], helper.int_to_bytes(address.SqNcCallAddr, 8))
@@ -352,3 +354,20 @@ def cool_down_call(skill_addr):
352354
helper.add_list(shell_code, [72, 131, 196, 32])
353355
compile_call(shell_code)
354356
return mem.read_int(empty_addr) < 1
357+
358+
359+
# 坐标移动
360+
def coordinate_move(x: int, y: int):
361+
# .常量 人物坐标_1, "328", , , 0x148 创新中心获取
362+
# .常量 人物坐标_2, "69", , , 0x45 创新中心获取
363+
364+
# 获取人物指针
365+
addr = person_ptr()
366+
# 读取坐标指针
367+
coordinate_ptr = mem.read_long(mem.read_long(addr + 0x148) + 8)
368+
# 计算坐标偏移量
369+
offset = coordinate_ptr + 0x45
370+
371+
# 写入坐标值
372+
mem.write_float(offset, float(x))
373+
mem.write_float(offset + 4, float(y))

gui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def add_func_content(self, msg):
132132
if __name__ == '__main__':
133133
try:
134134
globle.cmd = "gui"
135-
init_driver("LoveRw")
135+
# init_driver("LoveRw")
136136
app = XApp()
137137
win = AppWindow()
138138
globle.win_app = win

0 commit comments

Comments
 (0)