更新进入副本回调
This commit is contained in:
parent
3ac1fa3ff4
commit
51a5665176
182
MyProject/A.nut
182
MyProject/A.nut
|
|
@ -110,165 +110,47 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
|
Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
|
||||||
local count = -1;
|
|
||||||
local pos = 0;
|
|
||||||
local handler = [];
|
|
||||||
do {
|
|
||||||
local start = pos;
|
|
||||||
pos = CmdString.find(" ", pos + 1);
|
|
||||||
if (pos != null) {
|
|
||||||
handler.append(CmdString.slice(start + 1, pos));
|
|
||||||
} else
|
|
||||||
handler.append(CmdString.slice(start + 1));
|
|
||||||
count = count + 1
|
|
||||||
} while (pos != null)
|
|
||||||
|
|
||||||
//得到空格数量
|
local Gm = GameManager();
|
||||||
if (count == 1) {
|
local PartyObj = Gm.GetParty();
|
||||||
SUser.DropItem(3038, 300, 300);
|
PartyObj.Create(SUser);
|
||||||
}
|
Sq_CallFunc(S_Ptr("0x859D718"), "int", ["pointer", "pointer"], PartyObj.C_Object, SUser.C_Object);
|
||||||
|
Sq_CallFunc(S_Ptr("0x85A0954"), "int", ["pointer", "pointer", "int", "int"], PartyObj.C_Object, S_Ptr("2"), 0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Timer.SetTimeOut(function() {
|
Timer.SetTimeOut(function() {
|
||||||
|
|
||||||
// Haker.LoadHook("0x0830ADF6", ["pointer", "pointer", "pointer", "pointer", "int", "int", "int", "int", "int", "pointer", "float", "int", "void"],
|
|
||||||
// function(args) {
|
|
||||||
// local SParty = Party(NativePointer(args[0]).readPointer());
|
|
||||||
// local map_monster_param = NativePointer(Haker.CpuContext.ebp).add(0x10).readPointer();
|
|
||||||
// local monster_uid = NativePointer(NativePointer(Haker.CpuContext.ebp).add(0x18).readPointer()).readU16();
|
|
||||||
|
|
||||||
// SParty.ForeachMember(function(SUser, Index) {
|
|
||||||
// local user_item_list = Memory.alloc(8);
|
|
||||||
// Sq_CallFunc(S_Ptr("0x08152A2C"), "pointer", ["pointer"], user_item_list.C_Object);
|
|
||||||
|
|
||||||
// Sq_CallFunc(S_Ptr("0x0830ADF6"), "void", ["pointer", "pointer", "pointer", "pointer", "int", "int", "int", "int", "int", "pointer", "float", "int"], args[0], user_item_list.C_Object, args[2], args[3], Index + 1, 1, args[6], args[7], args[8], args[9], args[10], args[11]);
|
|
||||||
|
|
||||||
// api_copy_mapinfo_items_between_lists(NativePointer(args[1]), user_item_list);
|
|
||||||
|
|
||||||
// local Pack = Packet();
|
|
||||||
// Sq_CallFunc(S_Ptr("0x0830B8CC"), "pointer", ["pointer", "pointer", "pointer", "int", "int", "pointer", "pointer"], args[0], Pack.C_Object, user_item_list.C_Object, monster_uid, Index + 1, args[3], map_monster_param);
|
|
||||||
// SUser.Send(Pack);
|
|
||||||
// Pack.Delete();
|
|
||||||
|
|
||||||
// Sq_CallFunc(S_Ptr("0x08151F6E"), "pointer", ["pointer"], user_item_list.C_Object);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //跳过原逻辑
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x830ADFC"), Haker.AsmGenerateMcd(
|
|
||||||
// "pop ebx",
|
|
||||||
// "pop esi",
|
|
||||||
// "pop edi",
|
|
||||||
// "pop ebp",
|
|
||||||
// "ret"));
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// //还原
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x830ADFC"), [0x81, 0xec, 0x7c, 0x01, 0x00, 0x00, 0x8B, 0x55, 0x18]);
|
|
||||||
// return null;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //跳过原本的怪物死亡掉落包构造
|
|
||||||
// Haker.LoadHook("0x0830B8CC", ["pointer", "pointer", "pointer", "int", "int", "pointer", "pointer", "pointer"],
|
|
||||||
// function(args) {
|
|
||||||
// if (Haker.NextReturnAddress == "0x830CE08") {
|
|
||||||
// print(12313);
|
|
||||||
// local v109 = NativePointer(NativePointer(Haker.CpuContext.ebp).sub(0x90).readPointer());
|
|
||||||
// local v106 = NativePointer(Haker.CpuContext.ebp).sub(0x96)
|
|
||||||
// if (v109.add(44).readU32() == 100 && v106.readU8() != 1 && NativePointer(args[0]).add(109 * 4).readU32() != 1) {
|
|
||||||
// //跳过原逻辑
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x830B8D3"), Haker.AsmGenerateMcd(
|
|
||||||
// "add esp , 64",
|
|
||||||
// "pop ebx",
|
|
||||||
// "pop ebp",
|
|
||||||
// "ret"));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// if (Haker.NextReturnAddress == "0x830CE08") {
|
|
||||||
// local v109 = NativePointer(NativePointer(Haker.CpuContext.ebp).sub(0x90).readPointer());
|
|
||||||
// local v106 = NativePointer(Haker.CpuContext.ebp).sub(0x96)
|
|
||||||
// if (v109.add(44).readU32() == 100 && v106.readU8() != 1 && NativePointer(args[0]).add(109 * 4).readU32() != 1) {
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x830B8D3"), [0x8B, 0x45, 0x18, 0x66, 0x89, 0x45, 0xB4, 0x8B, 0x45, 0x0C]);
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //跳过原本的怪物死亡掉落包队伍发包
|
|
||||||
// Haker.LoadHook("0x0859d14e", ["pointer", "pointer", "int"],
|
|
||||||
// function(args) {
|
|
||||||
// if (Haker.NextReturnAddress == "0x85a39db" && Sq_CallFunc(S_Ptr("0x0848F438"), "int", ["pointer"], args[1]) == 0) {
|
|
||||||
// //跳过原逻辑
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x859D154"), Haker.AsmGenerateMcd(
|
|
||||||
// "add esp , 28",
|
|
||||||
// "pop ebp",
|
|
||||||
// "ret"));
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// if (Haker.NextReturnAddress == "0x85a39db" && Sq_CallFunc(S_Ptr("0x0848F438"), "int", ["pointer"], args[1]) == 0) {
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x859D154"), [0xC7, 0x45, 0xF4, 0x00, 0x00, 0x00, 0x00]);
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //DisPatcher_GetItem::check_error 校验用户是否非法捡取物品
|
|
||||||
// Haker.LoadHook("0x081C35AC", ["int"],
|
|
||||||
// function(args) {
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// local user = NativePointer(Haker.CpuContext.ebp).add(0xc).readPointer();
|
|
||||||
// local msg_base = NativePointer(Haker.CpuContext.ebp).add(0x10).readPointer();
|
|
||||||
// local drop_id = NativePointer(msg_base).add(13).readU16();
|
|
||||||
// local res = validate_pickup_permission(user, drop_id);
|
|
||||||
// return res;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //跳过物品掷点
|
|
||||||
// Haker.LoadHook("0x0850D756", ["pointer", "bool"],
|
|
||||||
// function(args) {
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// return false;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //取消队友分金币
|
|
||||||
// Haker.LoadHook("0x0859A918", ["pointer", "int"],
|
|
||||||
// function(args) {
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// return 1;
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// //SS免确认
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x085A56D0"), [9]);
|
|
||||||
// Haker.LoadHook("0x08150f18", ["pointer", "int"],
|
|
||||||
// function(args) {
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// function(args) {
|
|
||||||
// return 0;
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// Sq_WriteByteArr(S_Ptr("0x085A41D1"), [0xB8, 0x00, 0x00, 0x00, 0x00, 0x90]);
|
|
||||||
// }, 1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Cb_SelectDungeon_Check_Error_Leave_Func.Check_TicketByMaomi <- function(args) {
|
||||||
|
|
||||||
|
// // local Config = sq_ReadJsonFile("/dp_s/OfficialConfig" + "/" + "门票进入副本配置_Maomi.json");
|
||||||
|
// local SUser = User(args[1]);
|
||||||
|
// local msg_base = args[2];
|
||||||
|
// local dgn_id = NativePointer(msg_base).add(13).readU16(); // 获取副本ID
|
||||||
|
// local dgn_diff = NativePointer(msg_base).add(15).readU8(); // 获取副本难度
|
||||||
|
// local PartyObj = SUser.GetParty();
|
||||||
|
|
||||||
|
// if (dgn_id == 40) {
|
||||||
|
// Timer.SetTimeOut(function() {
|
||||||
|
// print(12313);
|
||||||
|
|
||||||
|
// local Gm = GameManager();
|
||||||
|
// local PartyObj = Gm.GetParty();
|
||||||
|
// PartyObj.Create(SUser);
|
||||||
|
// Sq_CallFunc(S_Ptr("0x859D718"), "int", ["pointer", "pointer"], PartyObj.C_Object, SUser.C_Object);
|
||||||
|
// Sq_CallFunc(S_Ptr("0x85A0954"), "int", ["pointer", "pointer", "int", "int"], PartyObj.C_Object, S_Ptr("2"), 0, 0);
|
||||||
|
// // // SUser.
|
||||||
|
// }, 10);
|
||||||
|
|
||||||
|
// return 1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}, 1)
|
||||||
|
|
@ -623,39 +623,44 @@ _Hook_Register_Currency_Func_("0x0859A918", ["pointer", "int"], Cb_CParty_get_li
|
||||||
//新增字节初始化 BindCube_ScriptData
|
//新增字节初始化 BindCube_ScriptData
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_Enter_Func <- {};
|
Cb_ExtreamDungeon_BindCube_ScriptData_Enter_Func <- {};
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_Leave_Func <- {};
|
Cb_ExtreamDungeon_BindCube_ScriptData_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832E058", "void", ["pointer"],
|
_Hook_Register_Currency_Func_("0x0832E058", ["pointer", "void"], Cb_ExtreamDungeon_BindCube_ScriptData_Enter_Func, Cb_ExtreamDungeon_BindCube_ScriptData_Leave_Func);
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_Enter_Func, Cb_ExtreamDungeon_BindCube_ScriptData_Leave_Func);
|
|
||||||
|
|
||||||
//新增字节清理 ~BindCube_ScriptData
|
//新增字节清理 ~BindCube_ScriptData
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_free_Enter_Func <- {};
|
Cb_ExtreamDungeon_BindCube_ScriptData_free_Enter_Func <- {};
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_free_Leave_Func <- {};
|
Cb_ExtreamDungeon_BindCube_ScriptData_free_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832E220", "void", ["pointer"],
|
_Hook_Register_Currency_Func_("0x0832E220", ["pointer", "void"],
|
||||||
Cb_ExtreamDungeon_BindCube_ScriptData_free_Enter_Func, Cb_ExtreamDungeon_BindCube_ScriptData_free_Leave_Func);
|
Cb_ExtreamDungeon_BindCube_ScriptData_free_Enter_Func, Cb_ExtreamDungeon_BindCube_ScriptData_free_Leave_Func);
|
||||||
|
|
||||||
//装备列表校验 ExtreamDungeon::CCompound_ExtreamDun_Item::_isPossibleResultItem 0x0832DB4E
|
//装备列表校验 ExtreamDungeon::CCompound_ExtreamDun_Item::_isPossibleResultItem 0x0832DB4E
|
||||||
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Enter_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Enter_Func <- {};
|
||||||
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Leave_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832DB4E", "int", ["pointer", "pointer"],
|
_Hook_Register_Currency_Func_("0x0832DB4E", ["pointer", "pointer", "int"],
|
||||||
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Leave_Func);
|
Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_isPossibleResultItem_Leave_Func);
|
||||||
|
|
||||||
//装备列表添加装备 ExtreamDungeon::CCompound_ExtreamDun_Item::_AddItem 0x0832DD1C
|
//装备列表添加装备 ExtreamDungeon::CCompound_ExtreamDun_Item::_AddItem 0x0832DD1C
|
||||||
Cb_CCompound_ExtreamDun_Item_AddItem_Enter_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_AddItem_Enter_Func <- {};
|
||||||
Cb_CCompound_ExtreamDun_Item_AddItem_Leave_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_AddItem_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832DD1C", "int", ["pointer", "pointer"],
|
_Hook_Register_Currency_Func_("0x0832DD1C", ["pointer", "pointer", "int"],
|
||||||
Cb_CCompound_ExtreamDun_Item_AddItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_AddItem_Leave_Func);
|
Cb_CCompound_ExtreamDun_Item_AddItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_AddItem_Leave_Func);
|
||||||
|
|
||||||
//合成器装备校验 ExtreamDungeon::CCompound_ExtreamDun_Item::checkCompoundable 0x0832D7D6
|
//合成器装备校验 ExtreamDungeon::CCompound_ExtreamDun_Item::checkCompoundable 0x0832D7D6
|
||||||
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Enter_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Enter_Func <- {};
|
||||||
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Leave_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832D7D6", "int", ["pointer", "pointer", "pointer", "int"],
|
_Hook_Register_Currency_Func_("0x0832D7D6", ["pointer", "pointer", "pointer", "int", "int"],
|
||||||
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Enter_Func, Cb_CCompound_ExtreamDun_Item_checkCompoundable_Leave_Func);
|
Cb_CCompound_ExtreamDun_Item_checkCompoundable_Enter_Func, Cb_CCompound_ExtreamDun_Item_checkCompoundable_Leave_Func);
|
||||||
|
|
||||||
//合成器结果生成 ExtreamDungeon::CCompound_ExtreamDun_Item::makeCompoundItem 0x0832CCC0
|
//合成器结果生成 ExtreamDungeon::CCompound_ExtreamDun_Item::makeCompoundItem 0x0832CCC0
|
||||||
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Enter_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Enter_Func <- {};
|
||||||
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Leave_Func <- {};
|
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Leave_Func <- {};
|
||||||
_Hook_Register_Currency_Func_("0x0832CCC0", "int", ["pointer", "pointer", "int", "pointer", "int"],
|
_Hook_Register_Currency_Func_("0x0832CCC0", ["pointer", "pointer", "int", "pointer", "int", "int"],
|
||||||
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Leave_Func);
|
Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Enter_Func, Cb_CCompound_ExtreamDun_Item_makeCompoundItem_Leave_Func);
|
||||||
|
|
||||||
|
//队伍进入副本时
|
||||||
|
Cb_CParty_dungeon_start_Enter_Func <- {};
|
||||||
|
Cb_CParty_dungeon_start_Leave_Func <- {};
|
||||||
|
_Hook_Register_Currency_Func_("0x085A0954", ["pointer", "pointer", "char", "int", "int"],
|
||||||
|
Cb_CParty_dungeon_start_Enter_Func, Cb_CParty_dungeon_start_Leave_Func);
|
||||||
|
|
||||||
|
|
||||||
function _Hook_Register_Currency_DelayHook_() {
|
function _Hook_Register_Currency_DelayHook_() {
|
||||||
//五国时的热点函数
|
//五国时的热点函数
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue