This commit is contained in:
2024-09-27 14:04:23 +08:00
parent 39d60b284e
commit b2133d8463
25 changed files with 1170 additions and 128 deletions

View File

@@ -6,56 +6,54 @@
*/
if (!getroottable().rawin("Rindro_ItemInfoObject")) Rindro_ItemInfoObject <- {};
if (!getroottable().rawin("Rindro_ItemInfoBuf")) Rindro_ItemInfoBuf <- "";
if (!getroottable().rawin("RINDRO_INIT_FLAG")) RINDRO_INIT_FLAG <- false;
if (!getroottable().rawin("RINDRO_INIT_FLAG")) RINDRO_INIT_FLAG <- true;
//获取本地配置
function Rindro_GetLocalConfig() {
local Buf = L_sq_GetLocalConfig();
if (!Buf) {
return {
md5 = -1
};
} else return Json.Decode(Buf);
// local Buf = L_sq_GetLocalConfig();
// if (!Buf) {
// return {
// md5 = -1
// };
// } else return dofile("Rindro_Config.cfg");
}
// if (!getroottable().rawin("RINDRO_CONFIG"))
RINDRO_CONFIG <- Rindro_GetLocalConfig();
//获取本地信息版本
function Rindro_GetMd5() {
return RINDRO_CONFIG.md5;
// return RINDRO_CONFIG.md5;
return -1;
}
//初始化各种信息
function Rindro_Init() {
//道具信息
local ItemArray = getroottable().RINDRO_CONFIG.itemInfo;
Rindro_ItemInfoBuf = "";
foreach(Value in ItemArray) {
if (Value.Name2.len() == 0)
Value.Name2 = "Rindro-Team";
getroottable().Rindro_ItemInfoObject[Value.Id] <- Value;
}
RINDRO_INIT_FLAG = true;
// //道具信息
// local ItemArray = getroottable().RINDRO_CONFIG.itemInfo;
// Rindro_ItemInfoBuf = "";
// foreach(Value in ItemArray) {
// if (Value.Name2.len() == 0)
// Value.Name2 = "Rindro-Team";
// getroottable().Rindro_ItemInfoObject[Value.Id] <- Value;
// }
// RINDRO_INIT_FLAG = true;
}
//更新本地配置
function Rindro_ItemInfoCallBack(Chunk) {
local Jso = Json.Decode(Chunk);
if ("ZipSEnd" in Jso) {
getroottable().Rindro_ItemInfoObject <- {};
Rindro_ItemInfoBuf += Jso.ZipS;
local ZlibStrBuf = L_sq_Dezlib(Rindro_ItemInfoBuf);
if (ZlibStrBuf == "null") {
Rindro_ItemInfoBuf = "";
return;
}
L_sq_SetLocalConfig(ZlibStrBuf);
getroottable().RINDRO_CONFIG <- Json.Decode(ZlibStrBuf);
Rindro_Init();
} else {
Rindro_ItemInfoBuf += Jso.ZipS;
}
// local Jso = Json.Decode(Chunk);
// if ("ZipSEnd" in Jso) {
// getroottable().Rindro_ItemInfoObject <- {};
// Rindro_ItemInfoBuf += Jso.ZipS;
// local ZlibStrBuf = L_sq_Dezlib(Rindro_ItemInfoBuf);
// if (ZlibStrBuf == "null") {
// Rindro_ItemInfoBuf = "";
// return;
// }
// ZlibStrBuf = L_sq_DecondeJson(ZlibStrBuf);
// L_sq_SetLocalConfig("return " + ZlibStrBuf);
// getroottable().RINDRO_CONFIG <- dofile("Rindro_Config.cfg");
// Rindro_Init();
// } else {
// Rindro_ItemInfoBuf += Jso.ZipS;
// }
}
Pack_Control.rawset(20240422, Rindro_ItemInfoCallBack);
//无需更新本地配置
@@ -299,4 +297,110 @@ class ItemInfoClass {
}
}
}
}
}
// local ReadPath = L_sq_P2I(Memory.allocUtf8String("etc/rindro/horseguessing/horseguessing.dat").C_Object);
// print(format("%02x", ReadPath));
// local Reader = Memory.alloc(1024);
// local ReadBuffer = L_sq_P2I(Reader.C_Object);
// print(format("%02x", ReadBuffer));
// L_Sq_CallFunc(0x11A2030, "int", FFI_FASTCALL, ["int", "int", "int", "int", "int", "int"], 0x1D17638, 0, ReadPath, ReadBuffer, 0x100000, 0x19DAF4);
// // print(Reader.readUtf8String());
// local Func = compilestring(Reader.readUtf8String());
// local Ret = Func();
// print(Ret);
// local Tabs = dofile("aw.nut");
// print(Tabs.itemInfo.len());
// local Address = L_Sq_GetExportByName("fopen");
// print(Address);
// L_Sq_CallFunc(0xE6E070, "void", 4, ["int", "int", "int", "int", "char"], L_sq_RA(0x1A5FB20), 0, 33, "", 0x65535);
// Rindro_Haker.LoadHook(0x4C9FA0, ["pointer", "int", "void"],
// function(args) {
// // print(555);
// return null;
// },
// function(args) {
// // print(666);
// return null;
// });
// print(L_sq_StringBinById(435110));
// Rindro_Haker.LoadHook(0x4017F0, ["int", "int", "int", "int"],
// function(args) {
// print(args[0]);
// print(args[1]);
// print(args[2]);
// return null;
// },
// function(args) {
// return null;
// });
// 0x121a1e2
//this 0x1D17638
// local Read = Memory.alloc(10000);
// print(Read);
// L_Sq_CallFunc(0x11A2030, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], 0x1D17638, Memory.allocUtf8String("sqr/a.nut").C_Object, Read.C_Object, 0x100000,0x19DAF4);
// local Str = Read.readUtf8String();
// print(Str);
// local A = IRDSQRCharacter.pushScriptFiles("a.nut");
// local Read = Memory.alloc(10000);
// print(Read);
// L_Sq_CallFunc(0x121A100, "char", FFI_MS_CDECL, ["int", "int", "int", "int", "int"], Memory.allocUtf8String("").C_Object, Memory.allocUtf8String("sqr/a.nut").C_Object, Read.C_Object, 0x100000,0x19DAF4);
// local Str = Read.readUtf8String();
// print(Str);
// L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 79, 0, 0);
// local Old = L_sq_RA(0x1AB7CDC);
// Old = L_sq_RA(Old + 0x3038);
// local ItemObject = L_sq_GetItem(27582);
// //移除
// L_Sq_CallFunc(0x825AD0, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),Old);
// //移除Ani
// L_Sq_CallFunc(0x84CD10, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),Old);
// //穿戴
// L_Sq_CallFunc(0x825570, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),ItemObject);
// local ItemObject = L_sq_GetItem(101020037);
// // print(ItemObject);
// // L_Sq_CallFunc(0x4B0F10, "int", FFI_THISCALL, ["int"], L_sq_RA(0x1AE45B4));
// local Hs = L_Sq_CallFunc(0x779EB0, "pointer", FFI_THISCALL, ["int"], L_sq_RA(0x1AE45B4));
// print(Hs);
// Hs = L_sq_P2I(Hs);
// print(format("%02x", Hs));
// L_Sq_CallFunc(0x825AD0, "void", FFI_THISCALL, ["int","int"], Hs, ItemObject);
// L_Sq_CallFunc(0x84CD10, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC), ItemObject);
// local PP = L_Sq_CallFunc(0x65DE50, "pointer", FFI_THISCALL, ["pointer"], 0xE8675E97, 0);
// print("PP: " + PP);
// local WuseAdd = L_Sq_CallFunc(0x972220, "int", FFI_MS_CDECL, ["int", "int", "int"], 27582, 0x19E990, 0);
// print("MY: " + WuseAdd);
// print(L_sq_Test());
// local Address = L_sq_Test(26058);
// print(Address);
// local Ret = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Address, 41);
// print(Ret);
// L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], Ret, 600, 200, 28, 28);
// Rindro_Haker.LoadHook(0x11C0410, ["int", "int", "int", "int"],
// function(args) {
// // print(args[0]);
// return null;
// },
// function(args) {
// // print(args.pop());
// // print(">>>>>>");
// return null;
// });