59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
Gm_InputFunc_Handle["给"] <- 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)
|
|
|
|
//得到空格数量
|
|
if (count == 1) {
|
|
local Ret = SUser.GiveItem(handler[1].tointeger(), 1);
|
|
if (!Ret) SUser.SendNotiPacketMessage("发送失败背包是不是满了", 8);
|
|
} else if (count == 2) {
|
|
local Ret = SUser.GiveItem(handler[1].tointeger(), handler[2].tointeger());
|
|
if (!Ret) SUser.SendNotiPacketMessage("发送失败背包是不是满了", 8);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
Sq_WriteByteArr(S_Ptr("0x830ADFB"), Haker.AsmGenerateMcd(
|
|
"pop esi",
|
|
"pop edi",
|
|
"pop ebp",
|
|
"ret"));
|
|
return null;
|
|
},
|
|
function(args) {
|
|
//还原
|
|
Sq_WriteByteArr(S_Ptr("0x830ADFB"), [0x53, 0x81, 0xec, 0x7c, 0x01]);
|
|
return null;
|
|
});
|
|
}, 1)
|
|
|
|
|
|
|
|
Timer.SetTimeOut(function() {
|
|
local Config = sq_ReadJsonFile("/dp_s/OfficialConfig" + "/" + "门票进入副本配置_Maomi.json");
|
|
// local Config = GlobalConfig.Get("门票进入副本配置_Maomi.json");
|
|
print(Config);
|
|
}, 1);
|
|
|