Compare commits
10 Commits
Script1.2
...
1fb970488c
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fb970488c | |||
| 9c6f49d2ea | |||
| be0725b52a | |||
| 17792f354f | |||
| d0822165e6 | |||
| 1194db30b3 | |||
| 2f20020a01 | |||
| 85b66c2cb1 | |||
| f7d6d34c46 | |||
| 9902eaa818 |
@@ -92,8 +92,173 @@ function L_drawMainCustomUI_All() {
|
|||||||
// print(sq_GetObjectId(obj))
|
// print(sq_GetObjectId(obj))
|
||||||
// print(Clock());
|
// print(Clock());
|
||||||
// Rindro_Image_GlobalMap["interface/newstyle/windows/popup/popup.img"].DrawExPng(138, 205, 0, 0, sq_RGBA(255, 255, 255, 250), 13.0, 13.0);
|
// Rindro_Image_GlobalMap["interface/newstyle/windows/popup/popup.img"].DrawExPng(138, 205, 0, 0, sq_RGBA(255, 255, 255, 250), 13.0, 13.0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// local attackInfo = sq_GetCustomAttackInfo(obj, 0);
|
||||||
|
// sq_SetAttackInfoHitDelayRateDamager(attackInfo, 4.2);
|
||||||
|
// // sq_SetCurrentAttackBonusRate(attackInfo, 4812);
|
||||||
|
// // sq_SetCurrentAttacknUpForce(attackInfo, 41918);
|
||||||
|
// // sq_GetAttackInfoHitDelayRateDamager(attackInfo);
|
||||||
|
// local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
|
||||||
|
// sq_SetChangeStatusIntoAttackInfoWithEtc(attackInfo, 0, 10, 50, 150, 140, 49, 0);
|
||||||
|
// print(attackInfo["__ot"][28259608])
|
||||||
|
|
||||||
|
|
||||||
|
// for (local i = 0; i< 8000; i++) {
|
||||||
|
// local Ret = DATK(AtkC, i).readInt();
|
||||||
|
// if (Ret == 21567)
|
||||||
|
// {
|
||||||
|
// print("找到了! " + format("当前遍历: 0x%02x\n", i));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// for (local i = 0; i< 18000; i++) {
|
||||||
|
// local Ret = NativePointer(AtkC + i).readFloat();
|
||||||
|
// if (Ret == 41590.0)
|
||||||
|
// {
|
||||||
|
// print("找到了! " + format("当前遍历: 0x%02x\n", i));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
//[human damage rate]
|
||||||
|
// print(DATK(AtkC, 0x294).readFloat());
|
||||||
|
|
||||||
|
//[fort damage rate]
|
||||||
|
// print(DATK(AtkC, 0x2A0).readFloat());
|
||||||
|
|
||||||
|
//[monster damage rate]
|
||||||
|
// print(DATK(AtkC, 0x2AC).readFloat());
|
||||||
|
|
||||||
|
//[critical hit]
|
||||||
|
// print(DATK(AtkC, 0x68).readFloat());
|
||||||
|
|
||||||
|
//[damage]
|
||||||
|
// print(DATK(AtkC, 0x0).readFloat());
|
||||||
|
|
||||||
|
//[damage bonus]
|
||||||
|
// print(DATK(AtkC, 0x24).readInt());
|
||||||
|
|
||||||
|
//[absolute damage]
|
||||||
|
// print(DATK(AtkC, 0x18).readInt());
|
||||||
|
|
||||||
|
//[damage reaction]
|
||||||
|
// print(NativePointer(AtkC + 0x4C).readInt());
|
||||||
|
|
||||||
|
//[knuck back]
|
||||||
|
// print(DATK(AtkC, 0x8C).readInt());
|
||||||
|
|
||||||
|
//ACTIVESTATUS_SLOW
|
||||||
|
// print(DATK(AtkC, 0x1c8).readFloat());
|
||||||
|
// print(DATK(AtkC, 0x1ec).readInt());
|
||||||
|
// print(DATK(AtkC, 0x234).readInt());
|
||||||
|
|
||||||
|
// print(NativePointer(AtkC + 0x1BC).readInt());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// print(NativePointer(AtkC + 4 * (3 * 0 + 444)).readInt());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// print(DATK(AtkC, 0x234 + 0x4 + 0x4 + 0x4).readInt());
|
||||||
|
// print(DATK(AtkC, 0x19C).readInt());
|
||||||
|
// print(DATK(AtkC, 0x1A4).readInt());
|
||||||
|
|
||||||
|
// local WriteIntData = Memory.alloc(4);
|
||||||
|
// WriteIntData.writeFloat(756.4);
|
||||||
|
|
||||||
|
|
||||||
|
// MemoryTool.EncodeMemoryData(AtkC + 0x294, WriteIntData.readInt());
|
||||||
|
|
||||||
|
// local Ret = MemoryTool.DecodeMemoryDataF(AtkC + 0x10c);
|
||||||
|
// print(Ret)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// // secondTable 是一个指针,需要先读取它的值
|
||||||
|
// local secondTablePtr = 0x1AF8D78 + 4 * tableIndex + 36;
|
||||||
|
// local secondTable = NativePointer(secondTablePtr).readInt();
|
||||||
|
|
||||||
|
// local verifyValueAddr = secondTable + 4 * entryIndex + 0x2114;
|
||||||
|
// local verifyValue = NativePointer(verifyValueAddr).readInt();
|
||||||
|
|
||||||
|
// print("verifyValue: " + verifyValue);
|
||||||
|
|
||||||
|
// local verifyValue = GetObjectVerifyValue(*this_ptr);
|
||||||
|
|
||||||
|
// print(attackInfo["__ot"][28259608]);
|
||||||
|
|
||||||
|
// local Ret = L_Sq_CallFunc(0x5AE1E0, "float", FFI_MS_CDECL, ["int"], AtkC);
|
||||||
|
|
||||||
|
// local result = Memory.alloc(4);
|
||||||
|
// L_Sq_CallFunc(0x1195EB0, "void", FFI_FASTCALL, ["int", "int", "int", "pointer"], AtkC + 0X104, 0, AtkC + 0x10c, result.C_Object);
|
||||||
|
|
||||||
|
// print(result.C_Object);
|
||||||
|
// L_Sq_CallFunc(0x1195E40, "int", FFI_FASTCALL, ["int", "int", "int", "pointer"], AtkC + 0x30, 0, AtkC + 0x38, result.C_Object);
|
||||||
|
|
||||||
|
// print(result.readShort());
|
||||||
|
|
||||||
|
|
||||||
|
// print(result.C_Object);
|
||||||
|
// print(result.readInt());
|
||||||
|
|
||||||
|
// local result = Memory.alloc(4);
|
||||||
|
// L_Sq_CallFunc(0x1195EB0, "void", FFI_FASTCALL, ["int", "int", "int", "pointer", "int"], AtkC + 0x330, 0, AtkC + 0x338, result.C_Object, 0);
|
||||||
|
// print(result.readInt());
|
||||||
|
// print(L_sq_Test(AtkC));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// local keyTable = NativePointer(tableBase + 4 * tableIdx + 36).readInt();
|
||||||
|
|
||||||
|
// print("keyLow: " + keyLow + " xorMask: " + xorMask + " decryptedValue: " + decryptedValue);
|
||||||
|
|
||||||
|
// print(NativePointer(decryptedValue).readFloat());
|
||||||
|
// local decryptedLow = decryptedValue & 0xFFFF;
|
||||||
|
// local decryptedHigh = (decryptedValue >> 16) & 0xFFFF;
|
||||||
|
// local checksum = keyLow ^ (decryptedLow + decryptedHigh);
|
||||||
|
|
||||||
|
// local resultPtr = Memory.alloc(4);
|
||||||
|
// L_Sq_CallFunc(0x1195EB0, "void", FFI_STDCALL, ["int", "pointer"], Data, resultPtr.C_Object);
|
||||||
|
|
||||||
|
// print(resultPtr.readFloat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DATK(AtkC, Offset) {
|
||||||
|
// 读取 ObjectId
|
||||||
|
local ObjectIdPtr = NativePointer(AtkC + Offset);
|
||||||
|
local ObjectId = ObjectIdPtr.readInt();
|
||||||
|
// 读取 base1 (全局表)
|
||||||
|
local base1Ptr = NativePointer(0x1AF8D78);
|
||||||
|
local base1 = base1Ptr.readInt();
|
||||||
|
// 计算并读取二级表
|
||||||
|
local offset_high = 4 * ((ObjectId >> 16) & 0xFFFF);
|
||||||
|
local addr1 = base1 + offset_high + 0x24;
|
||||||
|
local base2Ptr = NativePointer(addr1);
|
||||||
|
local base2 = base2Ptr.readInt();
|
||||||
|
// 计算并读取 verifyValue
|
||||||
|
local offset_low = 4 * (ObjectId & 0xFFFF);
|
||||||
|
local addr2 = base2 + offset_low + 0x2114;
|
||||||
|
local verifyValuePtr = NativePointer(addr2);
|
||||||
|
local verifyValue = verifyValuePtr.readInt();
|
||||||
|
// 读取输入值
|
||||||
|
local inputAddr = AtkC + Offset + 0x8;
|
||||||
|
local inputPtr = NativePointer(inputAddr);
|
||||||
|
local inputValue = inputPtr.readInt();
|
||||||
|
// 解密
|
||||||
|
local lowWord = verifyValue & 0xFFFF;
|
||||||
|
local expanded = (lowWord << 16) | lowWord;
|
||||||
|
local decrypted = inputValue ^ expanded;
|
||||||
|
|
||||||
|
local Res = Memory.alloc(4);
|
||||||
|
Res.writeInt(decrypted);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// for (local i = 0; i < 42; i++) {
|
// for (local i = 0; i < 42; i++) {
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ class Rindro_EventList {
|
|||||||
local Jso = Json.Decode(Chunk);
|
local Jso = Json.Decode(Chunk);
|
||||||
X = Jso.YosinEventIconInfoXpos;
|
X = Jso.YosinEventIconInfoXpos;
|
||||||
Y = Jso.YosinEventIconInfoYpos;
|
Y = Jso.YosinEventIconInfoYpos;
|
||||||
|
|
||||||
|
|
||||||
getroottable()["LenheartEventOffset"] <- {
|
getroottable()["LenheartEventOffset"] <- {
|
||||||
x = X - 456,
|
x = X - 456,
|
||||||
@@ -228,30 +229,6 @@ function Lenheart_EventList_Fun(obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取活动图标坐标 在活动图标变动时会被调用
|
|
||||||
function Sq_Get_Event_Pos_X() {
|
|
||||||
if (getroottable().rawin("LenheartEventOffset")) {
|
|
||||||
return getroottable()["LenheartEventOffset"].x;
|
|
||||||
} else {
|
|
||||||
getroottable()["LenheartEventOffset"] <- {
|
|
||||||
x = 277,
|
|
||||||
y = 530
|
|
||||||
};
|
|
||||||
return getroottable()["LenheartEventOffset"].x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Sq_Get_Event_Pos_Y() {
|
|
||||||
if (getroottable().rawin("LenheartEventOffset")) {
|
|
||||||
return getroottable()["LenheartEventOffset"].y;
|
|
||||||
} else {
|
|
||||||
getroottable()["LenheartEventOffset"] <- {
|
|
||||||
x = 277,
|
|
||||||
y = 530
|
|
||||||
};
|
|
||||||
return getroottable()["LenheartEventOffset"].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -154,6 +154,13 @@ class NativePointer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function readInt() {
|
function readInt() {
|
||||||
|
// if(L_sq_P2I(this.C_Object) < 0x7FFFFFFF && L_sq_P2I(this.C_Object) > 0x400000 && L_sq_P2I(this.C_Object) % 4 == 0) {
|
||||||
|
// if(L_sq_Test(L_sq_P2I(this.C_Object))){
|
||||||
|
// return read('i');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return 0;
|
||||||
|
|
||||||
return read('i');
|
return read('i');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1174,7 +1174,6 @@
|
|||||||
},
|
},
|
||||||
"宽屏UI": {
|
"宽屏UI": {
|
||||||
"Private": true,
|
"Private": true,
|
||||||
"Enabled": false,
|
|
||||||
"Script": [
|
"Script": [
|
||||||
"Project/HudUi/HudUi.nut"
|
"Project/HudUi/HudUi.nut"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -12,4 +12,302 @@ function sq_GetCNRDObjectToPassiveObject(obj) {
|
|||||||
|
|
||||||
function sq_GetCNRDObjectToSQRPassiveObject(obj) {
|
function sq_GetCNRDObjectToSQRPassiveObject(obj) {
|
||||||
return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNSquirrelPassiveObject", 0);
|
return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNSquirrelPassiveObject", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetObjectAbilityInteger(obj, ObjectAddressOffset) {
|
||||||
|
return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetObjectAbilityInteger(obj, ObjectAddressOffset, Value) {
|
||||||
|
NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeInt(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetObjectAbilityFloat(obj, ObjectAddressOffset) {
|
||||||
|
return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readFloat();
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetObjectAbilityFloat(obj, ObjectAddressOffset, Value) {
|
||||||
|
NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeFloat(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset) {
|
||||||
|
return MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset, Value) {
|
||||||
|
MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset) {
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset, Value) {
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Value, 'f');
|
||||||
|
MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//[human damage rate]
|
||||||
|
// print(DATK(AtkC, 0x294).readFloat());
|
||||||
|
|
||||||
|
//[fort damage rate]
|
||||||
|
// print(DATK(AtkC, 0x2A0).readFloat());
|
||||||
|
|
||||||
|
//[monster damage rate]
|
||||||
|
// print(DATK(AtkC, 0x2AC).readFloat());
|
||||||
|
|
||||||
|
//[critical hit]
|
||||||
|
// print(DATK(AtkC, 0x68).readFloat());
|
||||||
|
|
||||||
|
//[damage]
|
||||||
|
// print(DATK(AtkC, 0x0).readFloat());
|
||||||
|
|
||||||
|
//[damage bonus]
|
||||||
|
// print(DATK(AtkC, 0x24).readInt());
|
||||||
|
|
||||||
|
//[absolute damage]
|
||||||
|
// print(DATK(AtkC, 0x18).readInt());
|
||||||
|
|
||||||
|
//[damage reaction]
|
||||||
|
// print(NativePointer(AtkC + 0x4C).readInt());
|
||||||
|
|
||||||
|
//[knuck back]
|
||||||
|
// print(DATK(AtkC, 0x8C).readInt());
|
||||||
|
|
||||||
|
|
||||||
|
function EncodeAttackMemoryData(AtkC, Offset) {
|
||||||
|
// 读取 ObjectId
|
||||||
|
local ObjectIdPtr = NativePointer(AtkC + Offset);
|
||||||
|
local ObjectId = ObjectIdPtr.readInt();
|
||||||
|
// 读取 base1 (全局表)
|
||||||
|
local base1Ptr = NativePointer(0x1AF8D78);
|
||||||
|
local base1 = base1Ptr.readInt();
|
||||||
|
// 计算并读取二级表
|
||||||
|
local offset_high = 4 * ((ObjectId >> 16) & 0xFFFF);
|
||||||
|
local addr1 = base1 + offset_high + 0x24;
|
||||||
|
local base2Ptr = NativePointer(addr1);
|
||||||
|
local base2 = base2Ptr.readInt();
|
||||||
|
// 计算并读取 verifyValue
|
||||||
|
local offset_low = 4 * (ObjectId & 0xFFFF);
|
||||||
|
local addr2 = base2 + offset_low + 0x2114;
|
||||||
|
local verifyValuePtr = NativePointer(addr2);
|
||||||
|
local verifyValue = verifyValuePtr.readInt();
|
||||||
|
// 读取输入值
|
||||||
|
local inputAddr = AtkC + Offset + 0x8;
|
||||||
|
local inputPtr = NativePointer(inputAddr);
|
||||||
|
local inputValue = inputPtr.readInt();
|
||||||
|
// 解密
|
||||||
|
local lowWord = verifyValue & 0xFFFF;
|
||||||
|
local expanded = (lowWord << 16) | lowWord;
|
||||||
|
local decrypted = inputValue ^ expanded;
|
||||||
|
|
||||||
|
local Res = Memory.alloc(4);
|
||||||
|
Res.writeInt(decrypted);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoDamage(attackInfo) {
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x0);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoDamage(attackInfo, damage) {
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(damage, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x0, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoAbsoluteDamage(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x18);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoAbsoluteDamage(attackInfo, damage)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x18, damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoBonusRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x24);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
// print(DATK(AtkC, 0x1c8).readFloat());
|
||||||
|
// print(DATK(AtkC, 0x1ec).readInt());
|
||||||
|
// print(DATK(AtkC, 0x234).readInt());
|
||||||
|
function sq_GetCurrentAttackInfoChangeStatus(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Info = [EncodeAttackMemoryData(AtkC, 0x1c8).readFloat(), EncodeAttackMemoryData(AtkC, 0x1ec).readInt(), EncodeAttackMemoryData(AtkC, 0x234).readInt()];
|
||||||
|
return Info;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoChangeStatus(attackInfo, Data1, Data2, Data3)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Data1, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x1c8, B.readn('i'));
|
||||||
|
B.seek(0);
|
||||||
|
B.writen(Data2, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x1ec, B.readn('i'));
|
||||||
|
B.seek(0);
|
||||||
|
B.writen(Data3, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x234, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoHumanDamageRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x294);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoHumanDamageRate(attackInfo, rate)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(rate, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x294, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoFortDamageRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x2A0);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoFortDamageRate(attackInfo, rate)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(rate, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x2A0, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoMonsterDamageRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x2AC);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoMonsterDamageRate(attackInfo, rate)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(rate, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x2AC, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoCriticalRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x68);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoCriticalRate(attackInfo, rate)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(rate, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x68, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoDamageReaction(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x4C);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackeHitStunTime(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x138);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoKnuckBackType(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x8C);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoKnuckBackType(attackInfo, type)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x8C, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackInfoStuckRate(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x74);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(Res, 'i');
|
||||||
|
B.seek(0);
|
||||||
|
return B.readn('f');
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_SetCurrentAttackInfoStuckRate(attackInfo, rate)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local B = blob();
|
||||||
|
B.writen(rate, 'f');
|
||||||
|
B.seek(0);
|
||||||
|
MemoryTool.EncodeMemoryData(AtkC + 0x74, B.readn('i'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackUpForce(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x5c);
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sq_GetCurrentAttackBackForce(attackInfo)
|
||||||
|
{
|
||||||
|
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||||
|
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x50);
|
||||||
|
return Res;
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
|
|
||||||
//修补内存
|
//修补内存
|
||||||
function FixMemory() {
|
function FixMemory() {
|
||||||
|
|
||||||
L_sq_WAB(0x400E10, 9);
|
L_sq_WAB(0x400E10, 9);
|
||||||
L_sq_WAB(0x400E11, 4);
|
L_sq_WAB(0x400E11, 4);
|
||||||
L_sq_WAB(0x400E12, 7);
|
L_sq_WAB(0x400E12, 7);
|
||||||
@@ -53,30 +53,29 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
L_sq_WAB(0x400E17, 7);
|
L_sq_WAB(0x400E17, 7);
|
||||||
L_sq_WAB(0x400E18, 0);
|
L_sq_WAB(0x400E18, 0);
|
||||||
|
|
||||||
return;
|
|
||||||
// 干掉nut初始化基础技能栏坐标
|
// 干掉nut初始化基础技能栏坐标
|
||||||
L_sq_WAB(0x4B3239, 0xEB);
|
L_sq_WAB(0x4B3239, 0xEB);
|
||||||
|
|
||||||
//右上角绿色小圆球
|
// //右上角绿色小圆球
|
||||||
L_sq_WA(0x00E6D873, 1000);
|
// L_sq_WA(0x00E6D873, 1000);
|
||||||
//广播黑条
|
// //广播黑条
|
||||||
L_sq_WA(0x01AF4968, 0);
|
// L_sq_WA(0x01AF4968, 0);
|
||||||
//格兰背景
|
// //格兰背景
|
||||||
L_sq_WA(0x004CA0B3, 850);
|
// L_sq_WA(0x004CA0B3, 850);
|
||||||
L_sq_WA(0x004BB768, 850);
|
// L_sq_WA(0x004BB768, 850);
|
||||||
//副本名称
|
// //副本名称
|
||||||
L_sq_WA(0x004BB872, 850);
|
// L_sq_WA(0x004BB872, 850);
|
||||||
L_sq_WA(0x004BB850, 850);
|
// L_sq_WA(0x004BB850, 850);
|
||||||
//城镇名称
|
// //城镇名称
|
||||||
L_sq_WA(0x004CA27C, 850);
|
// L_sq_WA(0x004CA27C, 850);
|
||||||
|
|
||||||
//城镇过场Tips背景
|
// //城镇过场Tips背景
|
||||||
L_sq_WA(0x004580FD, 400 + 133);
|
// L_sq_WA(0x004580FD, 400 + 133);
|
||||||
//城镇过场Tips文本
|
// //城镇过场Tips文本
|
||||||
L_sq_WA(0x004581DD, 400 + 133);
|
// L_sq_WA(0x004581DD, 400 + 133);
|
||||||
|
|
||||||
//头顶滚动公告
|
// //头顶滚动公告
|
||||||
L_sq_WAB(0x11FA640, 0xC3);
|
// L_sq_WAB(0x11FA640, 0xC3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +98,6 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (i * 0x4)) + 0x14, 844 + (i * 17));
|
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (i * 0x4)) + 0x14, 844 + (i * 17));
|
||||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (i * 0x4)) + 0x18, 561);
|
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (i * 0x4)) + 0x18, 561);
|
||||||
}
|
}
|
||||||
|
|
||||||
//拍卖行(删除)
|
//拍卖行(删除)
|
||||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (4 * 0x4)) + 0x14, -5000);
|
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x84 + (4 * 0x4)) + 0x14, -5000);
|
||||||
|
|
||||||
@@ -193,7 +191,6 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||||
FixMemory();
|
FixMemory();
|
||||||
|
|
||||||
return;
|
|
||||||
local BallFrameArr = [];
|
local BallFrameArr = [];
|
||||||
for (local i = 0; i< 120; i++) {
|
for (local i = 0; i< 120; i++) {
|
||||||
local T = {
|
local T = {
|
||||||
@@ -213,7 +210,6 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
L_sq_DrawImg("interface2/hud/hpmp_vessel.img", i, -5000, 508);
|
L_sq_DrawImg("interface2/hud/hpmp_vessel.img", i, -5000, 508);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -629,7 +625,6 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
|
|
||||||
|
|
||||||
function TopShow(obj) {
|
function TopShow(obj) {
|
||||||
return;
|
|
||||||
//血蓝球悬停逻辑
|
//血蓝球悬停逻辑
|
||||||
BallRectLogic(obj);
|
BallRectLogic(obj);
|
||||||
//经验条悬停逻辑
|
//经验条悬停逻辑
|
||||||
@@ -638,14 +633,12 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function BottomShow(obj) {
|
function BottomShow(obj) {
|
||||||
return;
|
|
||||||
DrawMain(obj);
|
DrawMain(obj);
|
||||||
LenheartNewUI_Windows.Show(obj);
|
LenheartNewUI_Windows.Show(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
//动态窗口设置逻辑
|
//动态窗口设置逻辑
|
||||||
function Active_Windows_SyncPos() {
|
function Active_Windows_SyncPos() {
|
||||||
return;
|
|
||||||
//任务快捷导航窗口
|
//任务快捷导航窗口
|
||||||
{
|
{
|
||||||
local WindowAddress = L_sq_GetWindowById(1);
|
local WindowAddress = L_sq_GetWindowById(1);
|
||||||
@@ -655,13 +648,44 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||||||
|
|
||||||
//逻辑入口
|
//逻辑入口
|
||||||
function Proc(obj) {
|
function Proc(obj) {
|
||||||
return;
|
|
||||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||||
Active_Windows_SyncPos();
|
Active_Windows_SyncPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取活动图标坐标 在活动图标变动时会被调用
|
||||||
|
function Sq_Get_Event_Pos_X() {
|
||||||
|
if (getroottable().rawin("LenheartEventOffset")) {
|
||||||
|
return getroottable()["LenheartEventOffset"].x;
|
||||||
|
} else {
|
||||||
|
getroottable()["LenheartEventOffset"] <- {
|
||||||
|
x = 275,
|
||||||
|
y = 530
|
||||||
|
};
|
||||||
|
return getroottable()["LenheartEventOffset"].x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sq_Get_Event_Pos_Y() {
|
||||||
|
if (getroottable().rawin("LenheartEventOffset")) {
|
||||||
|
return getroottable()["LenheartEventOffset"].y;
|
||||||
|
} else {
|
||||||
|
getroottable()["LenheartEventOffset"] <- {
|
||||||
|
x = 275,
|
||||||
|
y = 530
|
||||||
|
};
|
||||||
|
return getroottable()["LenheartEventOffset"].y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
L_Windows_List <- [];
|
||||||
|
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||||
|
getroottable().rawdelete("EventList_Obj")
|
||||||
|
getroottable().rawdelete("HudUi_Obj");
|
||||||
|
getroottable().rawdelete("L_Each_Obj");
|
||||||
|
|
||||||
function Lenheart_HudUi_Fun(obj) {
|
function Lenheart_HudUi_Fun(obj) {
|
||||||
local RootTab = getroottable();
|
local RootTab = getroottable();
|
||||||
@@ -672,6 +696,7 @@ function Lenheart_HudUi_Fun(obj) {
|
|||||||
|
|
||||||
getroottable()["LenheartFuncTab"].rawset("HudUiFuncN", Lenheart_HudUi_Fun);
|
getroottable()["LenheartFuncTab"].rawset("HudUiFuncN", Lenheart_HudUi_Fun);
|
||||||
|
|
||||||
|
|
||||||
// L_sq_Test(L_sq_RA(0x01AB7CDC), 0x3DB61400);
|
// L_sq_Test(L_sq_RA(0x01AB7CDC), 0x3DB61400);
|
||||||
// local Ret = L_sq_Test(L_sq_RA(0x01AB7CDC), 10);
|
// local Ret = L_sq_Test(L_sq_RA(0x01AB7CDC), 10);
|
||||||
// local Ret = L_sq_Test(L_sq_RA(0x01A5FA88), 101020037);
|
// local Ret = L_sq_Test(L_sq_RA(0x01A5FA88), 101020037);
|
||||||
|
|||||||
@@ -14,34 +14,6 @@ class OutfitSystemC extends LenheartNewUI_Windows {
|
|||||||
//是否可见
|
//是否可见
|
||||||
Visible = false;
|
Visible = false;
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
武器偏移 "3038"
|
|
||||||
称号偏移 "303C"
|
|
||||||
上衣偏移 "3040"
|
|
||||||
头肩偏移 "3044"
|
|
||||||
裤子偏移 "3048"
|
|
||||||
鞋子偏移 "304C"
|
|
||||||
腰带偏移 "3050"
|
|
||||||
项链偏移 "3054"
|
|
||||||
手镯偏移 "3058"
|
|
||||||
戒指偏移 "305C"
|
|
||||||
左曹偏移 "3060"
|
|
||||||
右曹偏移 "3064"
|
|
||||||
时装帽子偏移 "3008"
|
|
||||||
时装头部偏移 "300C"
|
|
||||||
时装脸部偏移 "3010"
|
|
||||||
时装上衣偏移 "3014"
|
|
||||||
时装下衣偏移 "3018"
|
|
||||||
时装鞋子偏移 "301C" 原来3020正确的是301C
|
|
||||||
时装胸部偏移 "3020"
|
|
||||||
时装腰带偏移 "3024"
|
|
||||||
时装皮肤偏移 "3028"
|
|
||||||
时装光圈偏移 "302C"
|
|
||||||
时装武器偏移 "3030"
|
|
||||||
宠物偏移 "3068"
|
|
||||||
|
|
||||||
*/
|
|
||||||
Img = Rindro_Image("interface2/buffswitching/buffswitching.img");
|
Img = Rindro_Image("interface2/buffswitching/buffswitching.img");
|
||||||
|
|
||||||
ItemSlotPos = [
|
ItemSlotPos = [
|
||||||
@@ -76,6 +48,9 @@ class OutfitSystemC extends LenheartNewUI_Windows {
|
|||||||
//当前选中
|
//当前选中
|
||||||
CurrentSelect = null;
|
CurrentSelect = null;
|
||||||
|
|
||||||
|
//说明是否悬停
|
||||||
|
InstructionsIsHover = true;
|
||||||
|
|
||||||
|
|
||||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||||
Childrens = [];
|
Childrens = [];
|
||||||
@@ -206,6 +181,8 @@ class OutfitSystemC extends LenheartNewUI_Windows {
|
|||||||
L_sq_DrawCode("时装槽位", X + 188, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
|
L_sq_DrawCode("时装槽位", X + 188, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
|
||||||
L_sq_DrawCode("宠物", X + 308, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
|
L_sq_DrawCode("宠物", X + 308, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
|
||||||
|
|
||||||
|
Rindro_Image_GlobalMap["lenheartui"].DrawPng(469 + (InstructionsIsHover ? 1 : 0), X + 335, Y + 266);
|
||||||
|
|
||||||
if (CurrentSelect != null) {
|
if (CurrentSelect != null) {
|
||||||
Rindro_Image_GlobalMap["lenheartui"].DrawPng(425, X + 12 + (CurrentSelect % 10) * 30, Y + 38 + (CurrentSelect / 10) * 30);
|
Rindro_Image_GlobalMap["lenheartui"].DrawPng(425, X + 12 + (CurrentSelect % 10) * 30, Y + 38 + (CurrentSelect / 10) * 30);
|
||||||
}
|
}
|
||||||
@@ -216,9 +193,29 @@ class OutfitSystemC extends LenheartNewUI_Windows {
|
|||||||
LenheartNewUI_Windows.Show(obj);
|
LenheartNewUI_Windows.Show(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function TopShow(obj)
|
||||||
|
{
|
||||||
|
if(InstructionsIsHover){
|
||||||
|
local XOffset = 8;
|
||||||
|
local YOffset = 192;
|
||||||
|
DrawNineBox(X + XOffset, Y + YOffset, 326, 80, "interface/lenheartwindowcommon.img", 213);
|
||||||
|
|
||||||
|
L_sq_DrawCode("①选择对应的标签以配置换装配置", X + XOffset + 8, Y + YOffset + 8, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||||
|
L_sq_DrawCode("②点击记录可以保存当前穿戴的装备,点击重置可以清除配置", X + XOffset + 8, Y + YOffset + 8 + 16, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||||
|
L_sq_DrawCode("③在对话窗口输入//HZ 1 可以换装1号标签的配置", X + XOffset + 8, Y + YOffset + 8 + 32, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||||
|
L_sq_DrawCode("④设置快捷喊话可以方便一键切换", X + XOffset + 8, Y + YOffset + 8 + 48, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//逻辑入口
|
//逻辑入口
|
||||||
function Proc(obj) {
|
function Proc(obj) {
|
||||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||||
|
|
||||||
|
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 335, Y + 266, 16, 16)) {
|
||||||
|
InstructionsIsHover = true;
|
||||||
|
} else {
|
||||||
|
InstructionsIsHover = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//读取自身装备并显示在装备槽位
|
//读取自身装备并显示在装备槽位
|
||||||
@@ -270,7 +267,6 @@ class OutfitSystemC extends LenheartNewUI_Windows {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
L_Windows_List <- [];
|
L_Windows_List <- [];
|
||||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||||
getroottable().rawdelete("EventList_Obj")
|
getroottable().rawdelete("EventList_Obj")
|
||||||
@@ -278,7 +274,6 @@ getroottable().rawdelete("OutfitSystem_Obj");
|
|||||||
getroottable().rawdelete("L_Each_Obj");
|
getroottable().rawdelete("L_Each_Obj");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Lenheart_OutfitSystem_Fun(obj) {
|
function Lenheart_OutfitSystem_Fun(obj) {
|
||||||
local RootTab = getroottable();
|
local RootTab = getroottable();
|
||||||
if (!RootTab.rawin("OutfitSystem_Obj")) {
|
if (!RootTab.rawin("OutfitSystem_Obj")) {
|
||||||
|
|||||||
@@ -256,5 +256,8 @@
|
|||||||
},
|
},
|
||||||
"Project/CustomPlugins": {
|
"Project/CustomPlugins": {
|
||||||
"description": "定制插件"
|
"description": "定制插件"
|
||||||
|
},
|
||||||
|
"Project/OutfitSystem": {
|
||||||
|
"description": "换装系统"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user