60 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| /*
 | |
| 文件名:Hacker_Class.nut
 | |
| 路径:Base/_Tool/Hacker_Class.nut
 | |
| 创建日期:2024-09-24	06:25
 | |
| 文件用途:
 | |
| */
 | |
| class _Rindro_Hacker {
 | |
|     HookTable = null;
 | |
| 
 | |
|     constructor() {
 | |
|         HookTable = {};
 | |
|     }
 | |
| 
 | |
|     function UnLoadHook(AddressStr) {
 | |
|         Sq_DeHookFunc(HookTable[AddressStr]);
 | |
|     }
 | |
| 
 | |
|     function LoadHook(AddressStr, ArgumentArr, EnterFunc, LeaveFunc) {
 | |
|         //如果已经HOOK过 需要先卸载原来的HOOK
 | |
|         if (HookTable.rawin(AddressStr)) {
 | |
|             UnLoadHook(AddressStr);
 | |
|             print("地址: " + AddressStr + " 已经装载了Hook,本次操作将会卸载之前的Hook在执行。")
 | |
|         }
 | |
| 
 | |
|         local Controler = Sq_HookFunc(AddressStr, ArgumentArr, EnterFunc, LeaveFunc);
 | |
|         HookTable.rawset(AddressStr, Controler);
 | |
|     }
 | |
| }
 | |
| //初始化Hacker
 | |
| if (!(getroottable().rawin("Rindro_Haker"))) Rindro_Haker <- _Rindro_Hacker();
 | |
| 
 | |
| 
 | |
| //重选角色时触发的回调函数(进入赛利亚房间)
 | |
| OnSetCharacter_Control <- {}
 | |
| Rindro_Haker.LoadHook(0x674350, ["pointer", "int"],
 | |
|     function(args) {
 | |
|         foreach(Func in OnSetCharacter_Control) {
 | |
|             Func();
 | |
|         }
 | |
|         return null;
 | |
|     },
 | |
|     function(args) {
 | |
| 
 | |
|         return null;
 | |
|     });
 | |
| 
 | |
| OnSetCharacter_Control.MarrySystem <- function() {
 | |
|     if (getroottable().rawin("Yosin_14SkillXpos1") &&
 | |
|         getroottable().rawin("Yosin_14SkillXpos2") &&
 | |
|         getroottable().rawin("Yosin_14SkillYpos1") &&
 | |
|         getroottable().rawin("Yosin_14SkillYpos2")
 | |
|     ) {
 | |
|         for (local i = 6; i< 7; i++) {
 | |
|             L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x30 + (i * 0x4)) + 0x14, Yosin_14SkillXpos1 + (i * 31));
 | |
|             L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x30 + (i * 0x4)) + 0x18, Yosin_14SkillYpos1);
 | |
|             L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x60 + (i * 0x4)) + 0x14, Yosin_14SkillXpos2 + (i * 31));
 | |
|             L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x60 + (i * 0x4)) + 0x18, Yosin_14SkillYpos2);
 | |
|         }
 | |
|     }
 | |
| }; |