111
This commit is contained in:
@@ -193,6 +193,7 @@ Gm_InputFunc_Handle.T <- function(SUser, CmdString) {
|
||||
SUser.SendNotiPacketMessage("GetCharacCount: " + SUser.GetCharacCount(), 8);
|
||||
SUser.SendNotiPacketMessage("GetUID: " + SUser.GetUID(), 8);
|
||||
SUser.SendNotiPacketMessage("GetCID: " + SUser.GetCID(), 8);
|
||||
SUser.SendNotiPacketMessage("GetUni: " + SUser.GetUniqueId(), 8);
|
||||
SUser.SendNotiPacketMessage("GetCharacJob: " + SUser.GetCharacJob(), 8);
|
||||
SUser.SendNotiPacketMessage("GetCharacName: " + SUser.GetCharacName(), 8);
|
||||
SUser.SendNotiPacketMessage("GetCharacLevel: " + SUser.GetCharacLevel(), 8);
|
||||
@@ -245,22 +246,242 @@ function TestThread(coro) {
|
||||
}
|
||||
|
||||
|
||||
function TestL() {
|
||||
print("注册 1 秒后执行")
|
||||
Timer.SetTimeOut(TestL, 1);
|
||||
function TestCronTask(str) {
|
||||
print(str);
|
||||
print("定时任务已执行一次");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
|
||||
// Timer.SetCronTask(TestCronTask, "1/0/0/0", "测试字符串参数");
|
||||
// print("注册任务");
|
||||
|
||||
// Sq_AutoReload("/dp_s/MyProject");
|
||||
|
||||
// local ms = 2000;
|
||||
// local minutes = ms / 60000;
|
||||
// local seconds = (ms % 60000) / 1000;
|
||||
// local milliseconds = (ms % 1000) / 10;
|
||||
// if (minutes > 0) {
|
||||
// str = minutes + "分" +
|
||||
// (seconds< 10 ? "0" : "") + seconds + "秒" +
|
||||
// (milliseconds< 10 ? "0" : "") + milliseconds; // 补全毫秒数为两位
|
||||
// } else {
|
||||
// str = seconds + "秒" +
|
||||
// (milliseconds< 10 ? "0" : "") + milliseconds; // 补全毫秒数为两位
|
||||
// }
|
||||
|
||||
// print(str);
|
||||
|
||||
// User.SendItemMail(1, 7, [{
|
||||
// itemId = 3037,
|
||||
// num = 100
|
||||
// }, {
|
||||
// itemId = 3038,
|
||||
// num = 100
|
||||
// }], "给你", "东西");
|
||||
|
||||
// Sq_CallFunc(S_Ptr("0x86C5A84"), "pointer", ["pointer", "pointer", "int", "int", "int", "int", "int", "int", "int", "int", "int"], Sq_Get_GameWorld(), SUser.C_Object, 1, 1, 200, 200, 0, 0, 0, 0, 0);
|
||||
|
||||
// Haker.LoadHook(S_Ptr("0x86C5A84"),
|
||||
// ["pointer", "pointer", "int", "int", "int", "int", "int", "int", "int", "int", "int", "pointer"],
|
||||
// function(args) {
|
||||
// print(args[0]);
|
||||
// print(Sq_Get_GameWorld());
|
||||
// print(args[2]);
|
||||
// print(args[3]);
|
||||
// print(args[4]);
|
||||
// print(args[5]);
|
||||
// print(args[6]);
|
||||
// print(args[7]);
|
||||
// print(args[8]);
|
||||
// print(args[9]);
|
||||
// print(args[10]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
local md5 = MD5.GetFile("/dp_s/a.txt");
|
||||
print("Md5文本值: " + md5);
|
||||
local Arr = [];
|
||||
foreach(char in md5) {
|
||||
Arr.append(char.tointeger());
|
||||
}
|
||||
print("Md5字符值>>>");
|
||||
printT(Arr);
|
||||
// local Sm = Memory.alloc(200);
|
||||
// Sq_CallFunc(S_Ptr("0x8AA5CBA"), "int", ["pointer", "int", "pointer"], S_Ptr("0x949B140"), 7, Sm.C_Object);
|
||||
// local Bsa = Sq_Point2Blob(Sm.C_Object, 120);
|
||||
// local str = "["
|
||||
// foreach(value in Bsa) {
|
||||
// str += value;
|
||||
// str += ","
|
||||
// }
|
||||
// str += "]";
|
||||
// print(str);
|
||||
// print("字符串: " + Sm.readUtf8String());
|
||||
|
||||
// getroottable()._nut_file_md5_table.rawset(file_name, file_md5_string);
|
||||
|
||||
// local opendirAddr = Module.getExportByName(null, "opendir");
|
||||
|
||||
// function open_dir(dir_path) {
|
||||
// local path_ptr = Memory.allocUtf8String(dir_path).C_Object;
|
||||
// return Sq_CallFunc(opendirAddr, "pointer", ["pointer"], path_ptr);
|
||||
// }
|
||||
// local dir_pointer = open_dir("/dp_s/");
|
||||
// print("dir_pointer = " + dir_pointer);
|
||||
|
||||
// local Pack = Packet();
|
||||
// Pack.Put_Header(1, 83);
|
||||
// Pack.Put_Byte(1);
|
||||
// Pack.Put_Byte(11)
|
||||
// Pack.Put_Short(8195);
|
||||
// Pack.Put_Int(1);
|
||||
// Pack.Put_Short(65535);
|
||||
// Pack.Put_Byte(1);
|
||||
// Pack.Put_Byte(12);
|
||||
// Pack.Put_Byte(1);
|
||||
// Pack.Put_Byte(13);
|
||||
// Pack.Put_Byte(25);
|
||||
// Pack.Finalize(true);
|
||||
// SUser.Send(Pack);
|
||||
// Pack.Delete();
|
||||
|
||||
|
||||
|
||||
// GameManager.SetGameMaxLevel(95);
|
||||
|
||||
// Sq_HookFunc();
|
||||
|
||||
// Sq_HookFunc(S_Ptr("0x8678526"),
|
||||
// 2,
|
||||
// function(a,args) {
|
||||
// print("AAA动态HOOK成功 城镇移动HOOK");
|
||||
// print(CUser);
|
||||
// print(id);
|
||||
// },
|
||||
// function(a,args) {
|
||||
// print("AAA动态HOOK成功 城镇移动HOOK");
|
||||
// print(CUser);
|
||||
// print(id);
|
||||
// });
|
||||
|
||||
|
||||
//给角色发消息var CUser_SendNotiPacketMessage = new NativeFunction(ptr(0x86886CE), 'int', ['pointer', 'pointer', 'int'], { "abi": "sysv" });
|
||||
|
||||
// Sq_CallFunc(S_Ptr("0x86886CE"), "int", ["pointer", "pointer","int"], SUser.C_Object, Memory.allocUtf8String("测试信息"),14);
|
||||
// Sq_HookFunc(S_Ptr("0x8678526"),
|
||||
|
||||
/*
|
||||
// 发包
|
||||
Haker.LoadHook("0x86485BA", ["pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
print(args[0]);
|
||||
local Pack = NativePointer(args[1]);
|
||||
Pack = NativePointer(Pack.readPointer());
|
||||
local headIndex = Pack.add(0x19).readU16();
|
||||
if (headIndex == 83) {
|
||||
print("发了83包");
|
||||
|
||||
// local Bo = Sq_Point2Blob(args[1], 100);
|
||||
|
||||
// local Str = "[";
|
||||
// foreach(Value in Bo) {
|
||||
// Str = format("%s%02X", Str, Value);
|
||||
// Str += ",";
|
||||
// }
|
||||
// Str += "]";
|
||||
// print(Str);
|
||||
|
||||
// local bufftype = Pack.add(0x28).readU8();
|
||||
// local itemSlot = Pack.add(0x29).readU16();
|
||||
// local itemCount = Pack.add(0x2B).readU32();
|
||||
// local upType = Pack.add(0x31).readU8();
|
||||
// local ret = Pack.add(0x33).readU8();
|
||||
// local newUpLevel = Pack.add(0x34).readU8();
|
||||
// local equSlot = Pack.add(0x35).readU16();
|
||||
// print("bufftype: " + bufftype);
|
||||
// print("itemSlot: " + itemSlot);
|
||||
// print("itemCount: " + itemCount);
|
||||
// print("upType: " + upType);
|
||||
// print("ret: " + ret);
|
||||
// print("newUpLevel: " + newUpLevel);
|
||||
// print("equSlot: " + equSlot);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
Haker.LoadHook("0x080FC850", ["pointer", "pointer", "pointer", "int", "void"],
|
||||
function(args) {
|
||||
// local Arr = [0x95, 0xDA, 0xF6, 0x12, 0x25, 0xDF, 0xE0, 0x0B, 0x48, 0xDF, 0xCC, 0xC6, 0x95, 0xDA, 0x31, 0x3F, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0xBE, 0x6B, 0x00, 0x00, 0xFF, 0xFF, 0x3C, 0x00, 0x00, 0x00, 0x00, 0xE5, 0xB9, 0xB8, 0xE5, 0xAD, 0x98, 0xE8, 0x80, 0x85, 0xE7, 0x9A, 0x84, 0xE5, 0xA5, 0xA7, 0xE7, 0xA5, 0x95];
|
||||
|
||||
// Sq_Memory_WriteByteArr(args[2], Arr);
|
||||
|
||||
// local Address = NativePointer(args[2]).add(35);
|
||||
// NativePointer(Address).writeU8(0x3c);
|
||||
// // local Address2 = NativePointer(args[2]).add(36);
|
||||
// NativePointer(Address).writeShort(65535);
|
||||
// NativePointer(Address2).writeShort(0x3E);
|
||||
|
||||
local Bo = Sq_Point2Blob(args[2], 100);
|
||||
|
||||
local Str = "[";
|
||||
foreach(Value in Bo) {
|
||||
Str = format("%s%02X", Str, Value);
|
||||
Str += ",";
|
||||
}
|
||||
Str += "]";
|
||||
print(Str);
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
local Pos = NativePointer(args[2]).add(27).readU16();
|
||||
local SUser = User(args[1]);
|
||||
SUser.SendUpdateItemList(1, 0, Pos);
|
||||
|
||||
// local Pack = Packet();
|
||||
// Pack.Put_Header(1, 83);
|
||||
// Pack.Put_Byte(1);
|
||||
// Pack.Put_Byte(11)
|
||||
// Pack.Put_Short(8195);
|
||||
// Pack.Put_Int(0);
|
||||
// Pack.Put_Short(65535);
|
||||
// Pack.Put_Byte(0);
|
||||
// Pack.Put_Byte(30);
|
||||
// Pack.Put_Byte(0);
|
||||
// Pack.Put_Byte(31);
|
||||
// Pack.Put_Byte(25);
|
||||
// Pack.Finalize(true);
|
||||
// SUser.Send(Pack);
|
||||
// Pack.Delete();
|
||||
|
||||
return null;
|
||||
});
|
||||
*/
|
||||
|
||||
// Sq_CallFunc(S_Ptr("0x84ECAA2"), "pointer", ["pointer", "float"], SUser.C_Object, 5.5);
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
function(args) {
|
||||
print("AAA动态HOOK成功 城镇移动HOOK");
|
||||
print(CUser);
|
||||
print(id);
|
||||
}
|
||||
|
||||
*/
|
||||
// local md5 = MD5.GetFile("/dp_s/a.txt");
|
||||
// print("Md5文本值: " + md5);
|
||||
// local Arr = [];
|
||||
// foreach(char in md5) {
|
||||
// Arr.append(char.tointeger());
|
||||
// }
|
||||
// print("Md5字符值>>>");
|
||||
// printT(Arr);
|
||||
|
||||
|
||||
// local Io = IO("/dp_s/a.txt", "r+");
|
||||
@@ -336,19 +557,34 @@ Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
|
||||
// Timer.SetTimeOut(function() {
|
||||
// print("注册 2 秒后执行")
|
||||
// }, 2);
|
||||
|
||||
};
|
||||
|
||||
Gm_InputFunc_Handle.AAA <- function(SUser, CmdString) {
|
||||
|
||||
//查询的sql语句
|
||||
local sql = "SELECT m_id,charac_name,lev,village,job,exp,Hp FROM charac_info WHERE charac_no = 1;";
|
||||
//查询的元素类型,按sql中的顺序
|
||||
local column_type_list = ["int", "string", "int", "int", "int", "int", "int"];
|
||||
// //查询的sql语句
|
||||
// local sql = "SELECT m_id,charac_name,lev,village,job,exp,Hp FROM charac_info WHERE charac_no = 1;";
|
||||
// //查询的元素类型,按sql中的顺序
|
||||
// local column_type_list = ["int", "string", "int", "int", "int", "int", "int"];
|
||||
// local SqlObj = MysqlPool.GetInstance().GetConnect();
|
||||
// local result = SqlObj.Select(sql, column_type_list);
|
||||
|
||||
// printT(result);
|
||||
|
||||
// MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
|
||||
|
||||
//从池子拿连接
|
||||
local SqlObj = MysqlPool.GetInstance().GetConnect();
|
||||
|
||||
//建库
|
||||
local sql = "SELECT slot FROM frida.setCharacSlotLimit WHERE account_id = " + account_id + ";";
|
||||
local column_type_list = ["int"];
|
||||
local result = SqlObj.Select(sql, column_type_list);
|
||||
if (result.len() > 0) {
|
||||
|
||||
printT(result);
|
||||
}
|
||||
|
||||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user