feat: 添加偷窃系统和自己服装备功能

- 新增偷窃系统(Steal)模块及相关UI界面
- 添加自己服(MySelf)装备功能及显示界面
- 在folder-alias.json中添加新系统路径映射
- 为BaseTool_Class添加DrawNineBoxAlpha方法支持透明度
- 修改NewItemInfoWindow装备判断逻辑
- 在FileConfig.json中为多个系统添加Enabled配置项
- 在ObjectConvert.nut中添加装备掉落相关函数
This commit is contained in:
2026-04-08 22:26:57 +08:00
parent fb1309b486
commit feb316d882
8 changed files with 464 additions and 65 deletions

View File

@@ -312,6 +312,50 @@ class Rindro_BaseToolClass {
Rindro_Image_GlobalMap[Img].DrawPng(StartIndex + 8, X + Width - LeftTopW, Y + Height - LeftTopH);
}
function DrawNineBoxAlpha(X, Y, Width, Height, Img, StartIndex, Alpha)
{
//如果没有载入img就载入
if (!Rindro_Image_GlobalMap.rawin(Img)) {
Rindro_Image_GlobalMap[Img] <- Rindro_Image(Img);
}
//绘制左上角
Rindro_Image_GlobalMap[Img].DrawPng(StartIndex, X, Y);
//获取左上角的图片宽高
local LeftTopW = Rindro_Image_GlobalMap[Img].GetPng(StartIndex).GetWidth();
local LeftTopH = Rindro_Image_GlobalMap[Img].GetPng(StartIndex).GetHeight();
//绘制上边
//获取上边的宽
local TopW = Rindro_Image_GlobalMap[Img].GetPng(StartIndex + 1).GetWidth();
Rindro_Image_GlobalMap[Img].DrawExPng(StartIndex + 1, X + LeftTopW, Y, 0, sq_RGBA(255, 255, 255, Alpha), (Width - LeftTopW * 2).tofloat() / TopW, 1.0);
//绘制右上角
Rindro_Image_GlobalMap[Img].DrawPng(StartIndex + 2, X + Width - LeftTopW, Y);
//绘制左边
//获取左边的高
local LeftH = Rindro_Image_GlobalMap[Img].GetPng(StartIndex + 3).GetHeight();
Rindro_Image_GlobalMap[Img].DrawExPng(StartIndex + 3, X, Y + LeftTopH, 0, sq_RGBA(255, 255, 255, Alpha), 1.0, (Height - LeftTopH * 2).tofloat() / LeftH);
//绘制中间
//获取中间的宽高
local MiddleW = Rindro_Image_GlobalMap[Img].GetPng(StartIndex + 4).GetWidth();
local MiddleH = Rindro_Image_GlobalMap[Img].GetPng(StartIndex + 4).GetHeight();
Rindro_Image_GlobalMap[Img].DrawExPng(StartIndex + 4, X + LeftTopW, Y + LeftTopH, 0, sq_RGBA(255, 255, 255, Alpha), (Width - LeftTopW * 2).tofloat() / MiddleW, (Height - LeftTopH * 2).tofloat() / MiddleH);
//绘制右边
Rindro_Image_GlobalMap[Img].DrawExPng(StartIndex + 5, X + Width - LeftTopW, Y + LeftTopH, 0, sq_RGBA(255, 255, 255, Alpha), 1.0, (Height - LeftTopH * 2).tofloat() / LeftH);
//绘制左下角
Rindro_Image_GlobalMap[Img].DrawPng(StartIndex + 6, X, Y + Height - LeftTopH);
//绘制下边
Rindro_Image_GlobalMap[Img].DrawExPng(StartIndex + 7, X + LeftTopW, Y + Height - LeftTopH, 0, sq_RGBA(255, 255, 255, Alpha), (Width - LeftTopW * 2).tofloat() / TopW, 1.0);
//绘制右下角
Rindro_Image_GlobalMap[Img].DrawPng(StartIndex + 8, X + Width - LeftTopW, Y + Height - LeftTopH);
}
//品级颜色
function GetRarityColor(rarity) {
switch (rarity) {

View File

@@ -106,6 +106,7 @@ class Rindro_Item {
function Show(X, Y) {
//背景框
Rindro_BaseToolClass.DrawNineBox(X, Y, 214, DrawInfo.Height + 30, "interface2/common/mypopup/popup.img", 0);
// Rindro_BaseToolClass.DrawNineBox(X, Y, 214, DrawInfo.Height + 30, "sjweapon/sjwindow.img", 0);
// local C_Object = Rindro_Image_GlobalMap["popup"].GetPng(134);
// print(C_Object);
// L_Sq_CallFunc(0x11DF050, "void", FFI_FASTCALL, ["pointer", "int", "int", "int", "int", "int"], C_Object, 0, 10, 10, 10, 10);

View File

@@ -60,6 +60,7 @@
"换装系统": {
"price": 20,
"Private": false,
"Enabled": false,
"Script": [
"Project/OutfitSystem/OutfitSystem_Component.nut",
"Project/OutfitSystem/OutfitSystem.nut"
@@ -116,6 +117,7 @@
},
"黄金哥布林袖珍罐": {
"Private": true,
"Enabled": false,
"Script": [
"Project/TreasureGoblin/TreasureGoblin.nut"
],
@@ -128,6 +130,7 @@
},
"异界装备升级": {
"Private": true,
"Enabled": false,
"Script": [
"Project/ItemTool/ItemOtherWolrdUpgrade/ItemOtherWolrdUpgrade.nut"
],
@@ -140,6 +143,7 @@
},
"誉名录": {
"Private": true,
"Enabled": false,
"Script": [
"Project/NewTitle/TitleButton.nut",
"Project/NewTitle/NewTitle.nut"
@@ -165,6 +169,7 @@
},
"灵魂救赎武器": {
"Private": true,
"Enabled": false,
"Script": [
"Project/SoulSalvation/SoulSalvation.nut",
"Project/SoulSalvation/SoulSalvation_Upgrade.nut",
@@ -1218,6 +1223,7 @@
},
"宽屏UI": {
"Private": true,
"Enabled": false,
"Script": [
"Project/HudUi/HudUi.nut"
],

View File

@@ -53,32 +53,32 @@ function sq_SetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset, Value) {
//[human damage rate]
// print(DATK(AtkC, 0x294).readFloat());
//[human damage rate]
// print(DATK(AtkC, 0x294).readFloat());
//[fort damage rate]
// print(DATK(AtkC, 0x2A0).readFloat());
//[fort damage rate]
// print(DATK(AtkC, 0x2A0).readFloat());
//[monster damage rate]
// print(DATK(AtkC, 0x2AC).readFloat());
//[monster damage rate]
// print(DATK(AtkC, 0x2AC).readFloat());
//[critical hit]
// print(DATK(AtkC, 0x68).readFloat());
//[critical hit]
// print(DATK(AtkC, 0x68).readFloat());
//[damage]
// print(DATK(AtkC, 0x0).readFloat());
//[damage]
// print(DATK(AtkC, 0x0).readFloat());
//[damage bonus]
// print(DATK(AtkC, 0x24).readInt());
//[damage bonus]
// print(DATK(AtkC, 0x24).readInt());
//[absolute damage]
// print(DATK(AtkC, 0x18).readInt());
//[absolute damage]
// print(DATK(AtkC, 0x18).readInt());
//[damage reaction]
// print(NativePointer(AtkC + 0x4C).readInt());
//[damage reaction]
// print(NativePointer(AtkC + 0x4C).readInt());
//[knuck back]
// print(DATK(AtkC, 0x8C).readInt());
//[knuck back]
// print(DATK(AtkC, 0x8C).readInt());
function EncodeAttackMemoryData(AtkC, Offset) {
@@ -130,37 +130,32 @@ function sq_SetCurrentAttackInfoDamage(attackInfo, damage) {
MemoryTool.EncodeMemoryData(AtkC + 0x0, B.readn('i'));
}
function sq_GetCurrentAttackInfoAbsoluteDamage(attackInfo)
{
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)
{
function sq_SetCurrentAttackInfoAbsoluteDamage(attackInfo, damage) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
MemoryTool.EncodeMemoryData(AtkC + 0x18, damage);
}
function sq_GetCurrentAttackInfoBonusRate(attackInfo)
{
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)
{
// 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)
{
function sq_SetCurrentAttackInfoChangeStatus(attackInfo, Data1, Data2, Data3) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(Data1, 'f');
@@ -176,8 +171,7 @@ function sq_SetCurrentAttackInfoChangeStatus(attackInfo, Data1, Data2, Data3)
MemoryTool.EncodeMemoryData(AtkC + 0x234, B.readn('i'));
}
function sq_GetCurrentAttackInfoHumanDamageRate(attackInfo)
{
function sq_GetCurrentAttackInfoHumanDamageRate(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x294);
local B = blob();
@@ -186,8 +180,7 @@ function sq_GetCurrentAttackInfoHumanDamageRate(attackInfo)
return B.readn('f');
}
function sq_SetCurrentAttackInfoHumanDamageRate(attackInfo, rate)
{
function sq_SetCurrentAttackInfoHumanDamageRate(attackInfo, rate) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(rate, 'f');
@@ -195,8 +188,7 @@ function sq_SetCurrentAttackInfoHumanDamageRate(attackInfo, rate)
MemoryTool.EncodeMemoryData(AtkC + 0x294, B.readn('i'));
}
function sq_GetCurrentAttackInfoFortDamageRate(attackInfo)
{
function sq_GetCurrentAttackInfoFortDamageRate(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x2A0);
local B = blob();
@@ -205,8 +197,7 @@ function sq_GetCurrentAttackInfoFortDamageRate(attackInfo)
return B.readn('f');
}
function sq_SetCurrentAttackInfoFortDamageRate(attackInfo, rate)
{
function sq_SetCurrentAttackInfoFortDamageRate(attackInfo, rate) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(rate, 'f');
@@ -214,8 +205,7 @@ function sq_SetCurrentAttackInfoFortDamageRate(attackInfo, rate)
MemoryTool.EncodeMemoryData(AtkC + 0x2A0, B.readn('i'));
}
function sq_GetCurrentAttackInfoMonsterDamageRate(attackInfo)
{
function sq_GetCurrentAttackInfoMonsterDamageRate(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x2AC);
local B = blob();
@@ -224,8 +214,7 @@ function sq_GetCurrentAttackInfoMonsterDamageRate(attackInfo)
return B.readn('f');
}
function sq_SetCurrentAttackInfoMonsterDamageRate(attackInfo, rate)
{
function sq_SetCurrentAttackInfoMonsterDamageRate(attackInfo, rate) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(rate, 'f');
@@ -233,8 +222,7 @@ function sq_SetCurrentAttackInfoMonsterDamageRate(attackInfo, rate)
MemoryTool.EncodeMemoryData(AtkC + 0x2AC, B.readn('i'));
}
function sq_GetCurrentAttackInfoCriticalRate(attackInfo)
{
function sq_GetCurrentAttackInfoCriticalRate(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x68);
local B = blob();
@@ -243,8 +231,7 @@ function sq_GetCurrentAttackInfoCriticalRate(attackInfo)
return B.readn('f');
}
function sq_SetCurrentAttackInfoCriticalRate(attackInfo, rate)
{
function sq_SetCurrentAttackInfoCriticalRate(attackInfo, rate) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(rate, 'f');
@@ -252,35 +239,30 @@ function sq_SetCurrentAttackInfoCriticalRate(attackInfo, rate)
MemoryTool.EncodeMemoryData(AtkC + 0x68, B.readn('i'));
}
function sq_GetCurrentAttackInfoDamageReaction(attackInfo)
{
function sq_GetCurrentAttackInfoDamageReaction(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x4C);
return Res;
}
function sq_GetCurrentAttackeHitStunTime(attackInfo)
{
function sq_GetCurrentAttackeHitStunTime(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x138);
return Res;
}
function sq_GetCurrentAttackInfoKnuckBackType(attackInfo)
{
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)
{
function sq_SetCurrentAttackInfoKnuckBackType(attackInfo, type) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
MemoryTool.EncodeMemoryData(AtkC + 0x8C, type);
}
function sq_GetCurrentAttackInfoStuckRate(attackInfo)
{
function sq_GetCurrentAttackInfoStuckRate(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x74);
local B = blob();
@@ -289,8 +271,7 @@ function sq_GetCurrentAttackInfoStuckRate(attackInfo)
return B.readn('f');
}
function sq_SetCurrentAttackInfoStuckRate(attackInfo, rate)
{
function sq_SetCurrentAttackInfoStuckRate(attackInfo, rate) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local B = blob();
B.writen(rate, 'f');
@@ -298,16 +279,37 @@ function sq_SetCurrentAttackInfoStuckRate(attackInfo, rate)
MemoryTool.EncodeMemoryData(AtkC + 0x74, B.readn('i'));
}
function sq_GetCurrentAttackUpForce(attackInfo)
{
function sq_GetCurrentAttackUpForce(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x5c);
return Res;
}
function sq_GetCurrentAttackBackForce(attackInfo)
{
function sq_GetCurrentAttackBackForce(attackInfo) {
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x50);
return Res;
}
}
function sq_DropEquipmentUnique(id, posX, posY) {
local T = {
op = 21016001,
id = id,
posX = posX,
posY = posY,
}
Rindro_BaseToolClass.SendPackEx(T);
}
function sq_DropEquipment(rarity, posX, posY)
{
local T = {
op = 21016003,
rarity = rarity,
posX = posX,
posY = posY,
}
Rindro_BaseToolClass.SendPackEx(T);
}

View File

@@ -0,0 +1,198 @@
/*
文件名:Equip.nut
路径:Project/MySelf/Equip/Equip.nut
创建日期:2026-03-24 01:54
文件用途:
*/
class MySelfEquipC extends Rindro_BaseToolClass {
constructor() {
local ItemDrawControl = getroottable()["NewItemInfoWindow_Obj"];
ItemDrawControl.AddHookItemId(27572);
}
}
function Lenheart_MySelfEquipC_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("MySelfEquipC_Obj")) {
RootTab.rawset("MySelfEquipC_Obj", MySelfEquipC());
}
}
getroottable()["LenheartFuncTab"].rawset("MySelfEquipCFuncN", Lenheart_MySelfEquipC_Fun);
L_Windows_List <- [];
getroottable().rawdelete("LenheartPluginsInitFlag");
getroottable().rawdelete("EventList_Obj")
getroottable().rawdelete("MySelfEquipC_Obj");
getroottable().rawdelete("L_Each_Obj");
class Rindro_Item_DrawInfo {
//Item对象
Item = null;
//指导信息 (原装备生成的信息)
GuidanceInformation = null;
//指导信息标志位
GuidanceInformationFlag = 0;
//分割线计数
GuidanceDivCount = 0;
//信息
InfoList = null;
Height = 0;
Padding = 8;
Img = Rindro_Image("sjweapon/sjwindow.img");
Img2 = Rindro_Image("soulweapon/main.img");
constructor(gItem) {
Item = gItem;
InfoList = [];
}
//添加指导信息
function AddGuidanceInformation(info) {
GuidanceInformation = info;
}
function Init() {
//读取强化等级
local UpgradeLevel = Item.GetUpgrade();
//读取名字
local Name = "天 · 狂暴之" + Item.GetName();
local UpgradeStr = UpgradeLevel > 0 ? ("+" + UpgradeLevel + " ") : "";
local NameStr = Name.len() > 0 ? (Name + " ") : "未定名";
AddContent((UpgradeStr + Name), Padding, Padding, Rindro_BaseToolClass.GetRarityColor(6));
AddContent("巨剑(英雄级)", Padding, 18, sq_RGBA(176, 138, 44, 250));
// if (isGm()) {
// //读取编号
// local Index = Item.GetIndex();
// //读取uuid
// local Uuid = Item.GetUuid();
// local IndexStr = Index > 0 ? ("编号: [" + Index + "] ") : "";
// local UuidStr = Uuid > 10000 ? ("uid: [" + Uuid + "] ") : "";
// AddContent((IndexStr + UuidStr), Padding, 15, 0xffffffff);
// }
AddDelegate(20, function(X, Y, Item) {
for (local i = 0; i< 10; i++) {
Img.DrawPng(0, X + 7 + i * 16, Y + 19);
}
}.bindenv(this));
AddDividing(26, 15);
AddContent("攻击力", Padding, 18, 0xffffffff);
AddContent("458", 215 - LenheartTextClass.GetStringLength("458") - Padding, 0, 0xffffffff);
AddContent("命中", Padding, 18, 0xffffffff);
AddContent("100", 215 - LenheartTextClass.GetStringLength("100") - Padding, 0, 0xffffffff);
AddContent("暴击", Padding, 18, 0xffffffff);
AddContent("150", 215 - LenheartTextClass.GetStringLength("150") - Padding, 0, 0xffffffff);
AddContent("格挡", Padding, 18, 0xffffffff);
AddContent("150", 215 - LenheartTextClass.GetStringLength("150") - Padding, 0, 0xffffffff);
AddDividing(26, 15);
// AddContent("灵魂刻印率", Padding, 18, sq_RGBA(244, 21, 79, 250));
AddDelegate(20, function(X, Y, Item) {
L_sq_DrawCode("灵魂刻印率", X + 6, Y + 15, sq_RGBA(244, 21, 79, 255), 0, 1);
local Rate = 0.56;
L_sq_DrawCode(format("%.1f%%", Rate * 100.0), X + 180, Y + 15, sq_RGBA(255, 119, 0, 255), 0, 1);
Img2.DrawPng(0, X + 70, Y + 19);
setClip(X + 72, Y + 21, X + 72 + (Rate * 97.0).tointeger(), Y + 40); //开始裁切
Img2.DrawPng(1, X + 72, Y + 21);
releaseClip(); //裁切结束
}.bindenv(this));
AddContent("※ 力量", Padding, 12, sq_RGBA(104, 213, 237, 255));
AddContent("150", 215 - LenheartTextClass.GetStringLength("150") - Padding, 0, sq_RGBA(104, 213, 237, 255));
AddContent("※ 武器伤害增幅", Padding, 18, sq_RGBA(104, 213, 237, 255));
AddContent("16.3", 215 - LenheartTextClass.GetStringLength("16.3") - Padding, 0, sq_RGBA(104, 213, 237, 255));
AddContent("※ 异常属性攻击", Padding, 18, sq_RGBA(104, 213, 237, 255));
AddContent("25", 215 - LenheartTextClass.GetStringLength("25") - Padding, 0, sq_RGBA(104, 213, 237, 255));
AddDividing(26, 15);
AddDelegate(64, function(X, Y, Item) {
local Str = ["生命铭刻 · 1级", "精准铭刻 · 2级", "寒冰铭刻 · 1级", "火焰铭刻 · 3级"]
local Color = [sq_RGBA(120, 255, 30, 255), sq_RGBA(255, 240, 20, 240), sq_RGBA(33, 131, 217, 240), sq_RGBA(230, 34, 34, 240)]
for (local i = 0; i< 4; i++) {
Img.DrawPng(1 + i, X + 7, Y + 19 + i * 18);
L_sq_DrawCode(Str[i], X + (215 - LenheartTextClass.GetStringLength(Str[i]) - Padding), Y + 18 + i * 18, Color[i], 1);
}
}.bindenv(this));
AddDividing(26, 26);
AddContent("激荡 : 生生不息", Padding, 28, sq_RGBA(60, 180, 0, 255));
AddContent("攻击时,以2%的概率使自身回复35%的", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddContent("生命值。", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddContent("效果发动冷却时间: 15秒", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddDividing(26, 15);
AddContent("回响 : 天行健", Padding, 18, sq_RGBA(60, 180, 0, 255));
AddContent("攻击时,以5%的概率使自身进入心流", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddContent("伤害增幅10%,效果持续时间5秒。", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddContent("效果发动冷却时间: 45秒", Padding, 18, sq_RGBA(230, 200, 155, 250));
AddDividing(26, 15);
AddContent("装备需求职业:", Padding, 18, sq_RGBA(255, 255, 255, 255));
AddContent("鬼剑士", 215 - LenheartTextClass.GetStringLength("鬼剑士") - Padding, 0, sq_RGBA(255, 255, 255, 255));
}
//增加内容
function AddContent(Content, X, Y, Color) {
InfoList.append({
Type = 0,
Content = Content,
X = X,
Y = Y + Height,
Color = Color
});
Height += Y;
}
//增加分割线
function AddDividing(X, Y) {
InfoList.append({
Type = 1,
X = X,
Y = Y + Height + 3,
});
Height += 8;
}
//增加自定义代理
function AddDelegate(Y, Func) {
InfoList.append({
Type = 2,
X = 0,
Y = Height,
Func = Func
});
Height += Y;
}
}

View File

@@ -146,7 +146,7 @@ class NewItemInfoWindowC extends Rindro_BaseToolClass {
local EquipmentAddress = NativePointer(Rindro_Haker.CpuContext.ecx).add(0x178).readInt();
//是装备才做这个事
local Id = NativePointer(EquipmentAddress).add(0x1c).readInt();
if (NativePointer(EquipmentAddress).add(0x4).readInt() == 2 || NeedDrawHookList.rawin(Id)) {
if (NeedDrawHookList.rawin(Id)) {
args[2] = 947330670;
args[3] = EquipmentAddress;
return args;

142
Project/Steal/Steal.nut Normal file
View File

@@ -0,0 +1,142 @@
/*
文件名:Steal.nut
路径:Project/Steal/Steal.nut
创建日期:2026-04-07 05:19
文件用途:
*/
class StealC_Password_Box extends LenheartNewUI_CommonUi {
//数字序列
NumberSeq = null;
constructor(X, Y) {
LenheartNewUI_CommonUi.constructor(X, Y, 30, 120);
//生成数字序列
NumberSeq = [];
for (local i = 0; i< 10; i++) {
local Info = {
num = sq_getRandom(0, 9),
CorrectFlag = false,
}
NumberSeq.append(Info);
}
//随机一个正确的数字
local CorrectIndex = sq_getRandom(0, 9);
NumberSeq[CorrectIndex].CorrectFlag = true;
}
function Show(obj) {
local Dt = Parent.Duration;
Parent.Img.DrawExPng(10, X, Y, 0, sq_RGBA(255, 255, 255, 90), 1.0, 1.0);
//绘制数字
for (local i = 0; i< 10; i++) {
local Info = NumberSeq[i];
local Color = Info.CorrectFlag ? sq_RGBA(157, 245, 10, 255) : sq_RGBA(150, 150, 150, 255);
L_sq_DrawCode(Info.num.tostring(), X + 15 - LenheartTextClass.GetStringLength(Info.num.tostring()) / 2, Y + 10 + i * 24, Color, 0, 1);
}
}
}
class StealC extends LenheartNewUI_Windows {
//调试模式
// DeBugMode = true;
//不是窗口
// NoWindow = true;
//是否可见
// Visible = false;
Img = Rindro_Image("steal/widget.img");
//解锁完成度
UnlockComplete = 0.57;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
//注册控件
RegisterWidget();
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
}
function RegisterWidget() {
// //关闭按钮
// local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
// CloseButton.OnClick = function() {
// this.Visible = false;
// }.bindenv(this);
// Childrens.append(CloseButton);
for (local i = 0; i< 8; i++) {
local PasswordBox = StealC_Password_Box(280 + i * 30, 268);
AddChild(PasswordBox);
}
}
//绘制主界面
function DrawMain(obj) {
//灰色背景
DrawNineBoxAlpha(X, Y, 800, 600, "interface2/common/mypopup/popup.img", 0, 150);
//宝箱动画
local Ani = DrawAniEx(X + 425, Y + 230, "npc/animation/storagediamond.ani");
Ani.setImageRateFromOriginal(2.0, 2.0);
//完成度文字
local StealCompleteStr = "解锁完成度: " + UnlockComplete * 100.0 + "%";
L_sq_DrawCode(StealCompleteStr, X + 410 - LenheartTextClass.GetStringLength(StealCompleteStr) / 2, Y + 406, sq_RGBA(255, 255, 255, 255), 0, 1);
//完成度进度条
Img.DrawPng(2, X + 162, Y + 425);
setClip(X + 168, Y + 429, X + 168 + (463 * UnlockComplete).tointeger(), Y + 429 + 6);
Img.DrawPng(3, X + 168, Y + 429);
releaseClip(); //裁切结束
//解锁界面
Img.DrawPng(9, X + 269, Y + 260);
//解锁锁定条
Img.DrawPng(11, X + 269 + 8, Y + 260 + 60);
}
function Show(obj) {
DrawMain(obj);
//裁切遮罩密码框
setClip(X + 280, Y + 268, X + 280 + 8 * 30, Y + 268 + 120);
LenheartNewUI_Windows.Show(obj);
releaseClip(); //裁切结束
}
//逻辑入口
function Proc(obj) {
LenheartNewUI_Windows.SyncPos(X, Y);
}
}
L_Windows_List <- [];
getroottable().rawdelete("LenheartPluginsInitFlag");
getroottable().rawdelete("EventList_Obj")
getroottable().rawdelete("Steal_Obj");
getroottable().rawdelete("L_Each_Obj");
function Lenheart_Steal_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("Steal_Obj")) {
RootTab.rawset("Steal_Obj", true);
LenheartNewUI_CreateWindow(StealC, "偷窃系统窗口", 0, 0, 800, 600, 0);
}
}
getroottable()["LenheartFuncTab"].rawset("StealFuncN", Lenheart_Steal_Fun);

View File

@@ -259,5 +259,11 @@
},
"Project/OutfitSystem": {
"description": "换装系统"
},
"Project/MySelf": {
"description": "自己服"
},
"Project/Steal": {
"description": "偷窃系统"
}
}