frida_epic_potion(史诗药剂)@青梅煮酒¥

原帖:epic_potion(史诗药剂)——frida【台服dnf吧】_百度贴吧

const CUser_CheckCoolTimeItem = new NativeFunction(ptr(0x865E994), 'int', ['pointer', 'int'], {"abi": "sysv"});
const CParty_checkValidUser = new NativeFunction(ptr(0x8145868), 'int', ['pointer', 'int'], {"abi": "sysv"});
const CLuckPoint_getItemRarity = new NativeFunction(ptr(0x8550BE4), 'int', ['pointer', 'pointer', 'int', 'int'], {"abi": "sysv"});
function api_GetPartyMemberNumber(Party) {
if (Party.isNull()) return 1;
let memberCount = 0;
for (let i = 0; i <= 3; i++) {
memberCount += CParty_checkValidUser(Party, i);
}
return memberCount;
}
function epic_potion() {
let user = null;
Interceptor.attach(ptr(0x81EB0C4), {
onEnter: function (args) {
user = args[1];
}
});
Interceptor.attach(ptr(0x85B2412), {
onEnter: function (args) {
user = args[1];
}
});
Interceptor.replace(ptr(0x8550BE4), new NativeCallback(function (a1, a2, roll, a4) {
if (user == null) {
return CLuckPoint_getItemRarity(a1, a2, roll, a4);
}
const Party = CUser_getParty(user);
// 只在单人深渊模式且使用药剂的状态下生效
if (this.returnAddress == 0x853583a && CUser_CheckCoolTimeItem(user, 2600010) && api_GetPartyMemberNumber(Party) == 1) {
const MaxRoll = a2.add(16).readU32();
// 概率
const odds = 0.1;
const MyRoll = Math.floor(Math.min(roll + roll * odds, MaxRoll));
return CLuckPoint_getItemRarity(a1, a2, MyRoll, a4);
}
return CLuckPoint_getItemRarity(a1, a2, roll, a4);
}, 'int', ['pointer', 'pointer', 'int', 'int']));
}

 

给TA打赏
共{{data.count}}人
人已打赏
圣狐教程教学资源

[圣狐天国]NUT伤害整合

2024-12-18 18:22:36

圣狐教程教学资源

[圣狐天国]如何DIY自己的技能树

2024-12-18 18:22:39

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索