var CUserCharacInfo_getCurCharacTradeGoldDaily = new NativeFunction(ptr(0x08696600), 'int', ['pointer'], {"abi": "sysv"});
function SetTradeGoldDaily(tradeGoldLimit) {
Interceptor.attach(ptr(0x08646496), {
onEnter: function(args) {
this.user = args[0];
this.TradeGold = args[1].toInt32(); // 本次交易的金币数量
},
onLeave: function(retval) {
var TradeGoldDaily = CUserCharacInfo_getCurCharacTradeGoldDaily(this.user); // 本日已交易金币数量
if (TradeGoldDaily + this.TradeGold <= tradeGoldLimit) {
retval.replace(1); // 可以交易
}else{
retval.replace(0);// 不可交易
}
}
});
}
start挂载
SetTradeGoldDaily(30000000);//修改此数值更改每日可交易金币数量
function SetTradeGoldDaily(tradeGoldLimit) {
Interceptor.attach(ptr(0x08646496), {
onEnter: function(args) {
this.user = args[0];
this.TradeGold = args[1].toInt32(); // 本次交易的金币数量
},
onLeave: function(retval) {
var TradeGoldDaily = CUserCharacInfo_getCurCharacTradeGoldDaily(this.user); // 本日已交易金币数量
if (TradeGoldDaily + this.TradeGold <= tradeGoldLimit) {
retval.replace(1); // 可以交易
}else{
retval.replace(0);// 不可交易
}
}
});
}
start挂载
SetTradeGoldDaily(30000000);//修改此数值更改每日可交易金币数量