Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3afd68ea59 | |||
| 326149ba8d | |||
| f12db16ab0 | |||
| 39fefdae43 | |||
| 77202bfdb7 | |||
| 78c8449b9f | |||
| 42fa6a03ef | |||
| 4e2fd47d4b | |||
| 25d40bd78d | |||
| 073daec3fb | |||
| e0ec5e1637 | |||
| 0df49590af | |||
| f99456b18e | |||
| 4ae8117485 | |||
| a1adcb89b4 | |||
| d9aad4d06a | |||
| a11458d226 | |||
| 66a3e9f49b | |||
| 6c982f6889 | |||
| 6a78b74479 |
@@ -99,7 +99,11 @@ function L_drawMainCustomUI_All() {
|
||||
// MemoryTool.EncodeMemoryData(0x304bdc00+0x1054,7);
|
||||
// TTTAAA <- null;
|
||||
|
||||
// L_NewWindows("Lenheart", 56, 0x1);
|
||||
|
||||
|
||||
// L_NewWindows("Lenheart", 412, 0x1);
|
||||
|
||||
|
||||
// L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], 0x01ADE090, 56, 0, 0);
|
||||
// getroottable().Lsnzz <- Clock();
|
||||
|
||||
|
||||
@@ -342,6 +342,26 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
//绘制道具带道具信息
|
||||
function DrawItemObject(X, Y, Object) {
|
||||
if (!Object) return;
|
||||
L_Sq_DrawItem(X, Y, Object.ItemId, Object.Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 30, 30)) {
|
||||
//打开道具信息窗口
|
||||
if (!ItemInfoDrawS) {
|
||||
ItemInfoDrawS = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Object.ItemAddress, 41);
|
||||
//校准道具信息窗口位置
|
||||
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoDrawS, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
|
||||
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
} else {
|
||||
if (ItemInfoDrawS) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoDrawS = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制标题
|
||||
function DrawWindowTitle(Width) {
|
||||
@@ -1478,3 +1498,74 @@ class Yosin_ScrollBar {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class LenheartNewUI_ItemSlot extends LenheartNewUI_CommonUi {
|
||||
|
||||
ItemId = null;
|
||||
ItemCount = null;
|
||||
ItemObject = null;
|
||||
ItemInfoWindow = null;
|
||||
|
||||
//禁止点击
|
||||
NoClick = false;
|
||||
|
||||
RemoveCallBack = null;
|
||||
|
||||
constructor(X, Y) {
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, 30, 30);
|
||||
}
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
if (ItemObject) {
|
||||
L_Sq_DrawItem(X, Y, ItemId, ItemCount, 0, 0, 0);
|
||||
if (isInRect) {
|
||||
//打开道具信息窗口
|
||||
if (!ItemInfoWindow) {
|
||||
ItemInfoWindow = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, ItemObject.C_Object, 41);
|
||||
//校准道具信息窗口位置
|
||||
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoWindow, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
|
||||
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
} else {
|
||||
if (ItemInfoWindow) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoWindow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SetItem(item) {
|
||||
ItemObject = item;
|
||||
ItemId = item.GetIndex();
|
||||
ItemCount = 1;
|
||||
}
|
||||
|
||||
function RemoveItem()
|
||||
{
|
||||
ItemObject = null;
|
||||
ItemId = null;
|
||||
ItemCount = null;
|
||||
}
|
||||
|
||||
function SetRemoveCallBack(Func){
|
||||
RemoveCallBack = Func;
|
||||
}
|
||||
|
||||
//鼠标右键按下回调
|
||||
function OnMouseRbDown(MousePos_X, MousePos_Y) {
|
||||
if(NoClick)return;
|
||||
if (isInRect) {
|
||||
if(ItemObject){
|
||||
RemoveItem();
|
||||
}
|
||||
if (ItemInfoWindow) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoWindow = null;
|
||||
}
|
||||
if(RemoveCallBack)RemoveCallBack(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,3 +430,18 @@ function sq_GetCharacterAttribute(address) {
|
||||
function sq_GetCharacterEquipAttribute(offest, Slot) {
|
||||
return L_sq_GetCharacterAttribute(offest, Slot);
|
||||
}
|
||||
|
||||
function sq_SetCharacterAttribute(address, Value) {
|
||||
L_sq_SetCharacterAttribute(address, Value);
|
||||
}
|
||||
|
||||
function sq_SetCharacterEquipAttribute(offest, Slot, Value) {
|
||||
L_sq_SetCharacterAttribute(offest, Slot, Value);
|
||||
}
|
||||
|
||||
//设置装备APD给对象
|
||||
function sq_setEquipAppendage(obj, ApdListId, Time) {
|
||||
local ObjAddress = L_Sq_GetObjectAddress(obj);
|
||||
local APD = L_Sq_CallFunc(0x9E5130, "int", FFI_MS_CDECL, ["int", "int", "int"], ApdListId, ObjAddress, ObjAddress);
|
||||
L_Sq_CallFunc(0x4041c0, "int", FFI_THISCALL, ["int", "int", "int"], APD + 44, 0, Time);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
/*
|
||||
文件名:Hacker_RegApi.nut
|
||||
路径:Base/_Tool/Hacker_RegApi.nut
|
||||
创建日期:2024-09-25 18:31
|
||||
文件用途:注册API
|
||||
*/
|
||||
//工具类
|
||||
class R_Utils {
|
||||
|
||||
String = {
|
||||
FindLastSubstring = function(str, substring) {
|
||||
local strLen = str.len();
|
||||
local subLen = substring.len();
|
||||
local lastIndex = -1;
|
||||
for (local i = 0; i <= strLen - subLen; i++) {
|
||||
local found = true;
|
||||
for (local j = 0; j< subLen; j++) {
|
||||
if (str[i + j] != substring[j]) {
|
||||
found = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
lastIndex = i;
|
||||
}
|
||||
}
|
||||
return lastIndex;
|
||||
}
|
||||
}
|
||||
//播放音效
|
||||
function PlaySound(SoundName) {
|
||||
L_Sq_CallFunc(0x75BD70, "void", FFI_MS_CDECL, ["pointer", "int", "int", "int"], Memory.allocUtf8String(SoundName).C_Object, -1, 0, 0);
|
||||
}
|
||||
|
||||
//读取文件内容
|
||||
function ReadScript(Path, Size, CodePage) {
|
||||
local ReadPath = L_sq_P2I(Memory.allocUtf8String(Path).C_Object);
|
||||
local Reader = Memory.alloc(Size);
|
||||
local ReadBuffer = L_sq_P2I(Reader.C_Object);
|
||||
L_Sq_CallFunc(0x11A2030, "int", FFI_FASTCALL, ["int", "int", "int", "int", "int", "int"], 0x1D17638, 0, ReadPath, ReadBuffer, 0x100000, 0x19DAF4);
|
||||
|
||||
|
||||
if (CodePage == "utf8")
|
||||
return Reader.readUtf8String();
|
||||
if (CodePage == "unicode")
|
||||
return Reader.readUnicodeString();
|
||||
if (CodePage == "big5")
|
||||
return Reader.readBig5String();
|
||||
}
|
||||
|
||||
//读取文件
|
||||
function GetScriptFileReader(Path, ...) {
|
||||
local AllocSize = 102400;
|
||||
if (vargc > 0) AllocSize = vargv[0];
|
||||
//读取路径
|
||||
local ReadPath = L_sq_P2I(Memory.allocUtf8String(Path).C_Object);
|
||||
//读取缓存
|
||||
local Reader = Memory.alloc(AllocSize);
|
||||
local ReadBuffer = L_sq_P2I(Reader.C_Object);
|
||||
//实际读取大小
|
||||
local ReadSizeer = Memory.alloc(4);
|
||||
local ReadSizeBuffer = L_sq_P2I(ReadSizeer.C_Object);
|
||||
|
||||
local Flag = L_Sq_CallFunc(0x59E3D0, "bool", FFI_MS_CDECL, ["int", "int", "int", "int"], ReadPath, ReadBuffer, AllocSize, ReadSizeBuffer);
|
||||
if (Flag) {
|
||||
return {
|
||||
Buffer = Reader,
|
||||
Size = ReadSizeer.readInt()
|
||||
};
|
||||
} else return null;
|
||||
}
|
||||
|
||||
//读取配置表
|
||||
function ReadScriptConfig(Path, Size, ...) {
|
||||
local CodePage = "utf8";
|
||||
if (vargc > 0) CodePage = vargv[0];
|
||||
local Script = R_Utils.ReadScript(Path, Size, CodePage);
|
||||
local Func = compilestring("return " + Script);
|
||||
local Ret = Func();
|
||||
return Ret;
|
||||
}
|
||||
|
||||
//获取一个指定装备的角色对象
|
||||
function GetCharacByEqu(Job, GrowType, Equ) {
|
||||
local Obj = sq_CreateCharacter(Job, GrowType);
|
||||
local ObjAddress = L_Sq_GetObjectAddress(Obj);
|
||||
foreach(value in Equ) {
|
||||
local ItemObject = L_sq_GetItem(value);
|
||||
// L_Sq_CallFunc(0x825570, "void", FFI_THISCALL, ["int", "int"], ObjAddress, ItemObject);
|
||||
L_Sq_CallFunc(0x8265A0, "void", FFI_THISCALL, ["int", "int", "int"], ObjAddress, ItemObject, -1);
|
||||
}
|
||||
return sq_GetCNRDObjectToSQRCharacter(Obj);
|
||||
}
|
||||
|
||||
//获取装备编号的得文件路径
|
||||
function GetEquPath(Equ) {
|
||||
local EquPathAddress = L_Sq_CallFunc(0x1219E80, "int", FFI_THISCALL, ["int", "int"], 0x1d7993c, Equ);
|
||||
if (EquPathAddress) {
|
||||
return NativePointer(EquPathAddress).readUnicodeString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//获取Lst文件的返回Array
|
||||
function GetLstArr(Path, Header) {
|
||||
local Arr = [];
|
||||
local LstBuf = R_Utils.GetScriptFileReader(Path);
|
||||
if (LstBuf) {
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(LstBuf.Buffer.C_Object), LstBuf.Size);
|
||||
local i = 2;
|
||||
while (i< LstBuf.Size) {
|
||||
if ((LstBuf.Size - i) >= 10) {
|
||||
IO.seek(i + 6); //内容指示位
|
||||
local FindKey = IO.readn('i');
|
||||
local Key = Rindro_Script.GetBinString(FindKey);
|
||||
if (Key) {
|
||||
local StrFilePath = Header + Key.tolower();
|
||||
Arr.append(StrFilePath);
|
||||
}
|
||||
} else break;
|
||||
i += 10;
|
||||
}
|
||||
}
|
||||
return Arr;
|
||||
}
|
||||
|
||||
//通过处理函数获取文件Table
|
||||
function GetFileTableByHandle(Path, Func) {
|
||||
local Data = {};
|
||||
local FileData = R_Utils.GetScriptFileReader(Path);
|
||||
if (FileData) {
|
||||
if (FileData.Size >= 7) {
|
||||
//创建Blob对象
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(FileData.Buffer.C_Object), FileData.Size);
|
||||
//以5为单步从第二位开始遍历字节
|
||||
local i = 2;
|
||||
while (true) {
|
||||
if (i< FileData.Size && FileData.Size - i >= 5) {
|
||||
i = Func(Data, IO, i);
|
||||
} else break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//根据List读取文件地址
|
||||
// Rindro_Haker.LoadHook(0x1219E80, ["int", "int", "int"],
|
||||
// function(args) {
|
||||
// // print(format("%02x", args[0]));
|
||||
|
||||
// // print(args[2]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
|
||||
|
||||
// // local Path = NativePointer(L_sq_I2P(args.pop())).readUnicodeString();
|
||||
// // if (Path != "character/swordman/weapon/katana/kat_lowkogaras.equ" && Path != "new_elvengard.twn") {
|
||||
// // print(args[0]);
|
||||
// // print(args[1]);
|
||||
// // // print(format("%02x", args[1]));
|
||||
// // print(Path);
|
||||
// // }
|
||||
// return null;
|
||||
// });
|
||||
|
||||
//可能是构造装备以及构造其他东西
|
||||
// Rindro_Haker.LoadHook(0x972220, ["int", "int", "int", "int"],
|
||||
// function(args) {
|
||||
// // print(format("%02x", args[0]));
|
||||
// // local AniPath = NativePointer(L_sq_I2P(args[0])).readUnicodeString();
|
||||
// if (args[0] == 10402) {
|
||||
// print(args[0]);
|
||||
// print(args[1]);
|
||||
// print(args[2]);
|
||||
// }
|
||||
// // print(args[2]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
|
||||
//绘制字符
|
||||
getroottable().DrawCodeCallBackFunc <- {};
|
||||
getroottable().DrawCodeChangeMap <- {};
|
||||
// Rindro_Haker.LoadHook(0x1206BD0, ["int", "int", "int", "pointer", "int", "void"],
|
||||
// function(args) {
|
||||
// // print("nut:" + format("%02x", args[3]));
|
||||
|
||||
// if (args[3]) {
|
||||
// // for (local i = 0; i< 10000; i++) {
|
||||
// local DrawCode = NativePointer(args[3]).readUnicodeString();
|
||||
|
||||
// if (DrawCode.find("^1^") != null) {
|
||||
|
||||
// args[3] = Str_Ptr("AAAAAA");
|
||||
// args[2] = sq_RGBA(255, 0, 240, 255);;
|
||||
// return args;
|
||||
// }
|
||||
// else if (DrawCode.find("^2^") != null) {
|
||||
// print(DrawCode);
|
||||
|
||||
// args[3] = Str_Ptr("BBBBBB");
|
||||
// args[2] = sq_RGBA(200, 100, 20, 255);;
|
||||
// return args;
|
||||
// }
|
||||
// // if (DrawCode in DrawCodeCallBackFunc)
|
||||
// // DrawCodeCallBackFunc[DrawCode](args);
|
||||
// // }
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
//绘制城镇回调
|
||||
getroottable().DrawTownCallBackFunc <- {};
|
||||
Rindro_Haker.LoadHook(0x1108700, ["int", "void"],
|
||||
function(args) {
|
||||
// print("nut:" + format("%02x", args[3]));
|
||||
// print(format("%02x", args[0]));
|
||||
foreach(Func in DrawTownCallBackFunc) {
|
||||
Func();
|
||||
}
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
// print(666);
|
||||
// print(format("%02x", args.pop()));
|
||||
// TTTAni <- args.pop();
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
//顺图
|
||||
function Rindro_Gm_MoveMap(obj) {
|
||||
if (sq_IsKeyDown(OPTION_HOTKEY_PAUSE_IN_TOWER, ENUM_SUBKEY_TYPE_ALL) && RINDROLOCAL) {
|
||||
if (KeyPress.isKeyPress(0)) L_sq_MoveMap(2);
|
||||
if (KeyPress.isKeyPress(1)) L_sq_MoveMap(0);
|
||||
if (KeyPress.isKeyPress(2)) L_sq_MoveMap(3);
|
||||
if (KeyPress.isKeyPress(3)) L_sq_MoveMap(1);
|
||||
}
|
||||
}
|
||||
getroottable()["LenheartFuncTab"].rawset("Rindro_Gm_MoveMapFuncN", Rindro_Gm_MoveMap);
|
||||
|
||||
|
||||
//丢弃物品回调
|
||||
getroottable().DiscardItemCallBackFunc <- {};
|
||||
|
||||
function Sq_DiscardItem(Item) {
|
||||
local Flag = true;
|
||||
foreach(Func in DiscardItemCallBackFunc) {
|
||||
local Ret = Func(Item);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
|
||||
//从exe获取字符串
|
||||
getroottable()["Sq_GetExeStr_Map"] <- {};
|
||||
|
||||
function Sq_GetExeStr_Event(Index) {
|
||||
if (Index in getroottable()["Sq_GetExeStr_Map"]) {
|
||||
return getroottable()["Sq_GetExeStr_Map"][Index](Index);
|
||||
}
|
||||
return Index;
|
||||
}
|
||||
|
||||
getroottable().DrawAppendCallBackFunc <- {};
|
||||
Rindro_Haker.LoadHook(0x67C560, ["pointer", "int", "int", "int", "int", "void"],
|
||||
function(args) {
|
||||
foreach(Func in DrawAppendCallBackFunc) {
|
||||
Func(args);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
local Flag = L_Sq_CallFunc(0x59E3D0, "bool", FFI_MS_CDECL, ["int", "int", "int", "int"], ReadPath, ReadBuffer, AllocSize, ReadSizeBuffer);
|
||||
if (Flag) {
|
||||
return {
|
||||
Buffer = Reader,
|
||||
Size = ReadSizeer.readInt()
|
||||
};
|
||||
} else return null;
|
||||
*/
|
||||
|
||||
// HOOK读取AP脚本
|
||||
// Rindro_Haker.LoadHook(0x121A100, ["int", "int", "int", "int", "int","bool"],
|
||||
// function(args) {
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// print(NativePointer(L_sq_I2P(args[1])).readUnicodeString());
|
||||
// if (NativePointer(L_sq_I2P(args[1])).readUnicodeString() == "SQR/../etc/rindro/ancientrelic/ancientrelic.nut") {
|
||||
// printf("加载AP脚本");
|
||||
// local str = "function sq_AddFunctionName(appendage)\n{\n}\n print(778899);";
|
||||
// NativePointer(L_sq_I2P(args[4])).writeInt(str.len());
|
||||
// NativePointer(L_sq_I2P(args[2])).writeByteArray(str);
|
||||
// }
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// getroottable().onAttackParentCallBackFunc <- {};
|
||||
// Rindro_Haker.LoadHook(0x9CFF50, ["pointer", "int", "int", "int", "int", "int"],
|
||||
// function(args) {
|
||||
// foreach(Func in onAttackParentCallBackFunc) {
|
||||
// Func(args);
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
// //hook打开窗口
|
||||
// Rindro_Haker.LoadHook(0xE6E070, ["int","int","int","int","void"],
|
||||
// function(args) {
|
||||
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0xE6E070, ["int", "int", "int", "int", "int"],
|
||||
// function(args) {
|
||||
// print("nut:" + format("%02x", args[0]));
|
||||
// print("nut:" + format("%02x", args[1]));
|
||||
// print("nut:" + format("%02x", args[2]));
|
||||
// print("nut:" + format("%02x", args[3]));
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
@@ -40,4 +40,4 @@ function _Hook_Register_Currency_Func_(AddressString, ArgRetArr, TableName) {
|
||||
);
|
||||
}
|
||||
|
||||
_Hook_Register_Currency_Func_(0xE6E070, ["int", "int", "int", "int"], "Cb_OpenWindow_");
|
||||
// _Hook_Register_Currency_Func_(0xE6E070, ["int", "int", "int", "int"], "Cb_OpenWindow_");
|
||||
|
||||
67
Base/_Tool/Item_Class.nut
Normal file
67
Base/_Tool/Item_Class.nut
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
class Rindro_Item {
|
||||
C_Object = null;
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
function LoadById(Index) {
|
||||
local itemBuffer = Memory.alloc(0xD0);
|
||||
L_Sq_CallFunc(0x65DE50, "pointer", FFI_FASTCALL, ["pointer", "int"], itemBuffer.C_Object, 0); //Fastcall 补位
|
||||
C_Object = L_Sq_CallFunc(0x972220, "int", FFI_MS_CDECL, ["int", "pointer", "int"], Index, itemBuffer.C_Object, 1); //ID 后面的1未知
|
||||
}
|
||||
|
||||
function LoadByAddress(Address) {
|
||||
C_Object = Address;
|
||||
}
|
||||
|
||||
//获取ID
|
||||
function GetIndex() {
|
||||
return NativePointer(C_Object).add(0x1C).readInt();
|
||||
}
|
||||
//设置ID
|
||||
function SetIndex(Index) {
|
||||
NativePointer(C_Object).add(0x1C).writeInt(Index);
|
||||
}
|
||||
//获取强化值
|
||||
function GetUpgrade() {
|
||||
return MemoryTool.DecodeMemoryData(C_Object + 0x1054);
|
||||
}
|
||||
//设置强化值
|
||||
function SetUpgrade(Upgrade) {
|
||||
MemoryTool.EncodeMemoryData(C_Object + 0x1054, Upgrade);
|
||||
}
|
||||
//获取增幅属性
|
||||
function GetAmplification() {
|
||||
return MemoryTool.DecodeMemoryData(C_Object + 0x10A8);
|
||||
}
|
||||
//设置增幅属性
|
||||
function SetAmplification(Amplification) {
|
||||
MemoryTool.EncodeMemoryData(C_Object + 0x10A8, Amplification);
|
||||
}
|
||||
//获取锻造等级
|
||||
function GetForging() {
|
||||
return MemoryTool.DecodeMemoryData(C_Object + 0x10E8);
|
||||
}
|
||||
//设置锻造等级
|
||||
function SetForging(Forging) {
|
||||
MemoryTool.EncodeMemoryData(C_Object + 0x10E8, Forging);
|
||||
}
|
||||
//获取锻造属性
|
||||
function GetForgingAttribute() {
|
||||
return MemoryTool.DecodeMemoryData(C_Object + 0xE1C);
|
||||
}
|
||||
//设置锻造属性
|
||||
function SetForgingAttribute(ForgingAttribute) {
|
||||
MemoryTool.EncodeMemoryData(C_Object + 0xE1C, ForgingAttribute);
|
||||
}
|
||||
//获取附魔卡片ID
|
||||
function GetEnchanting() {
|
||||
return MemoryTool.DecodeMemoryData(C_Object + 0x1084);
|
||||
}
|
||||
//设置附魔卡片ID
|
||||
function SetEnchanting(Enchanting) {
|
||||
MemoryTool.EncodeMemoryData(C_Object + 0x1084, Enchanting);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
"Base/_Tool/Script_Class.nut",
|
||||
"Base/_Tool/Image_Class.nut",
|
||||
"Base/_Tool/Animation_Class.nut",
|
||||
"Base/_Tool/Item_Class.nut",
|
||||
"Base/CallBack/PackControl.nut",
|
||||
"Base/CallBack/DrawMain.nut",
|
||||
"Base/CallBack/DrawHudMain.nut",
|
||||
@@ -289,6 +290,36 @@
|
||||
},
|
||||
"imgPath": "WorldBoss"
|
||||
},
|
||||
"世界BOSS毁梦": {
|
||||
"Private": true,
|
||||
"price": 100,
|
||||
"Script": [
|
||||
"Project/WorldBoss/WorldBoss_HM.nut"
|
||||
],
|
||||
"info": {
|
||||
"ProjectAuthor": "100",
|
||||
"ProjectVersion": "1.0.0",
|
||||
"ProjectDescribe": "🔥 打破原版桎梏,重塑世界 BOSS 核心乐趣",
|
||||
"ProjectDetails": [
|
||||
]
|
||||
},
|
||||
"imgPath": "WorldBoss"
|
||||
},
|
||||
"仓库锁": {
|
||||
"Private": true,
|
||||
"price": 100,
|
||||
"Script": [
|
||||
"Project/WarehouseLock/WarehouseLock.nut"
|
||||
],
|
||||
"info": {
|
||||
"ProjectAuthor": "100",
|
||||
"ProjectVersion": "1.0.0",
|
||||
"ProjectDescribe": "🔥 打破原版桎梏,重塑世界 BOSS 核心乐趣",
|
||||
"ProjectDetails": [
|
||||
]
|
||||
},
|
||||
"imgPath": "WorldBoss"
|
||||
},
|
||||
"圣者遗物箱": {
|
||||
"price": 30,
|
||||
"Script": [
|
||||
|
||||
@@ -113,8 +113,8 @@ class CumulativeRewardC extends LenheartNewUI_Windows {
|
||||
local Arr = Jso.info;
|
||||
NextRewardItem = Arr[0];
|
||||
CurrentStage = Arr[1];
|
||||
if (CurrentStage >= 3) {
|
||||
CurrentStage = 3;
|
||||
if (CurrentStage >= 4) {
|
||||
CurrentStage = 4;
|
||||
AllFinish = true;
|
||||
}
|
||||
CurrentStageTime = Arr[2];
|
||||
@@ -160,13 +160,14 @@ class CumulativeRewardC extends LenheartNewUI_Windows {
|
||||
DrawItemBase(X + 6, Y + 6, NextRewardItem, 1);
|
||||
//绘制盖子
|
||||
Img1.DrawPng(19, X, Y);
|
||||
|
||||
//绘制阶段文字
|
||||
Img1.DrawExPng(25 + CurrentStage, X + 46, Y + 3, 0, sq_RGBA(255, 255, 255, 250), 0.85, 0.85);
|
||||
Img1.DrawExPng(25 + (CurrentStage >= 4 ? 3 : CurrentStage), X + 46, Y + 3, 0, sq_RGBA(255, 255, 255, 250), 0.85, 0.85);
|
||||
|
||||
|
||||
if (IsOpen) {
|
||||
if (CurrentStage != null) {
|
||||
local StageText = "累计在线得好礼 (" + (CurrentStage + 1) + "/4 阶段)";
|
||||
local StageText = "累计在线得好礼 (" + ((CurrentStage >= 4 ? 3 : CurrentStage) + 1) + "/4 阶段)";
|
||||
L_sq_DrawCode(StageText, X + 6, Y + 42, sq_RGBA(255, 177, 0, 255), 1, 1);
|
||||
if (AllFinish) {
|
||||
local Str = "今天的累计在线活动已完成!";
|
||||
|
||||
@@ -188,7 +188,7 @@ class CustomizeWeapon_AncientRelic {
|
||||
if (MagicEnergyValue > 0) {
|
||||
if (MagicEnergyState) {
|
||||
//检测魔能变更时间
|
||||
if (Clock() - MagicEnergyTimer >= 1000) {
|
||||
if (Clock() - MagicEnergyTimer >= 7000) {
|
||||
MagicEnergyTimer = Clock();
|
||||
MagicEnergyStage++;
|
||||
EffectSetFlag = 7 + MagicEnergyStage;
|
||||
|
||||
@@ -30,6 +30,7 @@ class ItemCrossoverC extends LenheartNewUI_Windows {
|
||||
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
@@ -164,28 +165,6 @@ class ItemCrossoverC extends LenheartNewUI_Windows {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemObject(X, Y, Object) {
|
||||
if (!Object) return;
|
||||
L_Sq_DrawItem(X, Y, Object.ItemId, Object.Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 30, 30)) {
|
||||
//打开道具信息窗口
|
||||
if (!ItemInfoDrawS) {
|
||||
ItemInfoDrawS = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Object.ItemAddress, 41);
|
||||
//校准道具信息窗口位置
|
||||
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoDrawS, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
|
||||
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
} else {
|
||||
if (ItemInfoDrawS) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoDrawS = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
@@ -310,11 +289,11 @@ class ItemCrossoverC extends LenheartNewUI_Windows {
|
||||
}
|
||||
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("ItemCrossover_Obj");
|
||||
getroottable().rawdelete("L_Each_Obj");
|
||||
// L_Windows_List <- [];
|
||||
// getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
// getroottable().rawdelete("EventList_Obj")
|
||||
// getroottable().rawdelete("ItemCrossover_Obj");
|
||||
// getroottable().rawdelete("L_Each_Obj");
|
||||
|
||||
function Lenheart_ItemCrossover_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
|
||||
@@ -5,84 +5,76 @@
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class ItemFusionC_ItemSlot extends LenheartNewUI_CommonUi {
|
||||
class ItemFusionC_ItemSlot extends LenheartNewUI_ItemSlot {
|
||||
|
||||
MyIndex = null;
|
||||
WindowImg = Rindro_Image("interface2/itemtoolwindow/itemfusion/itemfusion.img");
|
||||
|
||||
Item = null;
|
||||
ItemInfo = null;
|
||||
|
||||
//覆写悬停Flag
|
||||
HoverFlag = false;
|
||||
|
||||
//UseFlag
|
||||
UseFlag = true;
|
||||
|
||||
<<<<<<< HEAD
|
||||
constructor(X, Y, Index) {
|
||||
MyIndex = Index;
|
||||
=======
|
||||
constructor(X, Y) {
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, 46, 47);
|
||||
>>>>>>> a11458d226ec41caa22d30b6d76893362389e3e1
|
||||
LenheartNewUI_ItemSlot.constructor(X, Y);
|
||||
}
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
WindowImg.DrawPng(9, X, Y);
|
||||
WindowImg.DrawPng(9, X - 9, Y - 10);
|
||||
LenheartNewUI_ItemSlot.Show(obj);
|
||||
|
||||
|
||||
//如果槽里面有道具 绘制道具
|
||||
if (Item) {
|
||||
if (Item.rawin("itemAddress")) Parent.TemporaryDrawItemAddress = Item.itemAddress;
|
||||
Parent.DrawItemBase(X + 9, Y + 10, Item.itemId, 1);
|
||||
}
|
||||
// //如果槽里面有道具 绘制道具
|
||||
// if (Item) {
|
||||
// if (Item.rawin("itemAddress")) Parent.TemporaryDrawItemAddress = Item.itemAddress;
|
||||
// Parent.DrawItemBase(X + 9, Y + 10, Item.itemId, 1);
|
||||
// if (Item.rawin("itemAddress")) Parent.TemporaryDrawItemAddress = null;
|
||||
// }
|
||||
|
||||
CheckInRect();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function CheckInRect() {
|
||||
local MousePos_X = IMouse.GetXPos();
|
||||
local MousePos_Y = IMouse.GetYPos();
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X + 9, Y + 10, 24, 24)) {
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y, 30, 30)) {
|
||||
//绘制悬停框
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
Rindro_Image_GlobalMap["lenheartui"].DrawPng(353, X + 8, Y + 8);
|
||||
Rindro_Image_GlobalMap["lenheartui"].DrawPng(353, X, Y);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
HoverFlag = true;
|
||||
} else HoverFlag = false;
|
||||
}
|
||||
|
||||
//override
|
||||
function OnMouseProc(Flag, MousePos_X, MousePos_Y) {
|
||||
if (!Visible) return;
|
||||
//调用原生方法
|
||||
LenheartNewUI_CommonUi.OnMouseProc(Flag, MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
function DiscardItem(info) {
|
||||
if (HoverFlag) {
|
||||
if (info) {
|
||||
Item = info;
|
||||
|
||||
local ItemObject = Rindro_Item();
|
||||
ItemObject.LoadByAddress(info.itemAddress);
|
||||
ItemInfo = info;
|
||||
SetItem(ItemObject);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function RemoveItem() {
|
||||
LenheartNewUI_ItemSlot.RemoveItem();
|
||||
ItemInfo = null;
|
||||
|
||||
//鼠标右键按下回调
|
||||
function OnMouseRbDown(MousePos_X, MousePos_Y) {
|
||||
if (!UseFlag) return;
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X + 9, Y + 10, 24, 24)) {
|
||||
Item = null;
|
||||
if (Parent.ItemInfoDrawS) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
Parent.ItemInfoDrawS = null;
|
||||
Parent.ResetFocus();
|
||||
}
|
||||
if (Parent.Slot[2].Item != null) {
|
||||
Parent.Msg = 0;
|
||||
Parent.Slot[2].Item = null;
|
||||
}
|
||||
if (MyIndex != 2) {
|
||||
Parent.Slot[2].ItemInfo = null;
|
||||
Parent.Slot[2].RemoveItem();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ItemFusionC extends LenheartNewUI_Windows {
|
||||
@@ -93,7 +85,7 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
Visible = false;
|
||||
// Visible = false;
|
||||
|
||||
Slot = null;
|
||||
|
||||
@@ -125,9 +117,26 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Msg = Jso.msg;
|
||||
if (Jso.rawin("value")) {
|
||||
Slot[2].Item = {
|
||||
itemId = Jso.value[0]
|
||||
}
|
||||
//构造一个新装备
|
||||
local ItemObject = Rindro_Item();
|
||||
ItemObject.LoadById(Jso.value[0]);
|
||||
|
||||
//读取
|
||||
local MaterialItemObject = Slot[0].ItemObject;
|
||||
local Upgrade = MaterialItemObject.GetUpgrade();
|
||||
local Amplification = MaterialItemObject.GetAmplification();
|
||||
local Forging = MaterialItemObject.GetForging();
|
||||
local ForgingAttribute = MaterialItemObject.GetForgingAttribute();
|
||||
local Enchanting = MaterialItemObject.GetEnchanting();
|
||||
|
||||
ItemObject.SetUpgrade(Upgrade);
|
||||
ItemObject.SetAmplification(Amplification);
|
||||
ItemObject.SetForging(Forging);
|
||||
ItemObject.SetForgingAttribute(ForgingAttribute);
|
||||
ItemObject.SetEnchanting(Enchanting);
|
||||
|
||||
// Item = ItemObject;
|
||||
Slot[2].SetItem(ItemObject);
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
@@ -190,11 +199,11 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
AddChild(ConfirmButton);
|
||||
|
||||
//创建槽
|
||||
Slot = [ItemFusionC_ItemSlot(49, 58), ItemFusionC_ItemSlot(150, 58), ItemFusionC_ItemSlot(99, 182)];
|
||||
Slot = [ItemFusionC_ItemSlot(58, 68, 0), ItemFusionC_ItemSlot(159, 68, 1), ItemFusionC_ItemSlot(108, 192, 2)];
|
||||
foreach(value in Slot) {
|
||||
AddChild(value);
|
||||
}
|
||||
Slot[2].UseFlag = false;
|
||||
Slot[2].NoClick = true;
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
@@ -212,7 +221,7 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
local SlotEnableCount = 0;
|
||||
for (local i = 0; i< 2; i++) {
|
||||
local value = Slot[i];
|
||||
if (value.Item != null) SlotEnableCount++;
|
||||
if (value.ItemInfo != null) SlotEnableCount++;
|
||||
}
|
||||
WindowImg.DrawPng(0 + SlotEnableCount, X + 8, Y + 30);
|
||||
WindowImg.DrawPng(3, X + 8, Y + 32);
|
||||
@@ -279,11 +288,11 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
local Ret = Value.DiscardItem(info);
|
||||
if (Ret) {
|
||||
R_Utils.PlaySound("CHANGE_ALERT");
|
||||
if (Slot[0].Item && Slot[1].Item) {
|
||||
if (Slot[0].ItemInfo && Slot[1].ItemInfo) {
|
||||
local T = {
|
||||
op = 21006001,
|
||||
item1 = Slot[0].Item,
|
||||
item2 = Slot[1].Item,
|
||||
item1 = Slot[0].ItemInfo,
|
||||
item2 = Slot[1].ItemInfo,
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
@@ -360,6 +369,9 @@ class ItemFusionC extends LenheartNewUI_Windows {
|
||||
}
|
||||
|
||||
function InitWindow() {
|
||||
foreach (obj in Slot) {
|
||||
obj.RemoveItem();
|
||||
}
|
||||
Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
创建日期:2025-12-15 15:03
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class ItemInheritC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
@@ -18,25 +19,58 @@ class ItemInheritC extends LenheartNewUI_Windows {
|
||||
|
||||
Img = Rindro_Image("interface2/ui/newitemtool/newitemtool.img");
|
||||
|
||||
//材料装备
|
||||
MaterialItem = null;
|
||||
MaterialItemSlot = null;
|
||||
//目标装备
|
||||
TargetItem = null;
|
||||
TargetItemSlot = null;
|
||||
//继承结果装备
|
||||
ResultItem = null;
|
||||
ResultItemSlot = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
DiscardItemCallBackFunc.rawset("ItemCrossoverC", DiscardItem.bindenv(this));
|
||||
}
|
||||
|
||||
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);
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(274, 4, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
||||
|
||||
MaterialItemSlot = LenheartNewUI_ItemSlot(56, 87);
|
||||
MaterialItemSlot.SetRemoveCallBack(function(obj) {
|
||||
MaterialItem = null;
|
||||
PlaceItem();
|
||||
}.bindenv(this));
|
||||
AddChild(MaterialItemSlot);
|
||||
|
||||
TargetItemSlot = LenheartNewUI_ItemSlot(211, 87);
|
||||
TargetItemSlot.SetRemoveCallBack(function(obj) {
|
||||
TargetItem = null;
|
||||
PlaceItem();
|
||||
}.bindenv(this));
|
||||
AddChild(TargetItemSlot);
|
||||
|
||||
ResultItemSlot = LenheartNewUI_ItemSlot(133, 132);
|
||||
ResultItemSlot.NoClick = true;
|
||||
// ResultItemSlot.SetItem(ItemR);
|
||||
AddChild(ResultItemSlot);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//背景框
|
||||
@@ -57,7 +91,6 @@ class ItemInheritC extends LenheartNewUI_Windows {
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
@@ -65,15 +98,100 @@ class ItemInheritC extends LenheartNewUI_Windows {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
//遍历背包查找Item
|
||||
function FindItemPosByForeachInven(FindAddress) {
|
||||
local Inven = L_sq_RA(0x1A5FB24);
|
||||
local InvenAdd = L_sq_RA(Inven + 56);
|
||||
InvenAdd += 36;
|
||||
for (local z = 0; z< 5; z++) {
|
||||
for (local i = 0; i< 48; i++) {
|
||||
local ItemAdd = L_sq_RA(InvenAdd + ((i + (z * 48)) * 4));
|
||||
if (ItemAdd == FindAddress) {
|
||||
local NamePointer = L_sq_RA(FindAddress + 0x20);
|
||||
if (z != 0) {
|
||||
if (ItemInfoDrawS) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoDrawS = null;
|
||||
ResetFocus();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
Type = z,
|
||||
Pos = i,
|
||||
Vis = false,
|
||||
Count = MemoryTool.DecodeMemoryData(FindAddress + 0x1A4),
|
||||
ItemId = L_sq_RA(FindAddress + 0x1c),
|
||||
ItemAddress = FindAddress,
|
||||
Name = NativePointer(L_sq_I2P(NamePointer)).readUnicodeString()
|
||||
Rarity = L_sq_RA(FindAddress + 0xF4),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("ItemInherit_Obj");
|
||||
getroottable().rawdelete("L_Each_Obj");
|
||||
//回收道具回调
|
||||
function DiscardItem(ItemAddress) {
|
||||
local MousePos_X = IMouse.GetXPos();
|
||||
local MousePos_Y = IMouse.GetYPos();
|
||||
if (!sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y, Width, Height)) return true;
|
||||
if (!Visible) return true;
|
||||
else {
|
||||
local ItemInfo = FindItemPosByForeachInven(ItemAddress);
|
||||
local ItemObject = Rindro_Item();
|
||||
ItemInfo.ItemObject <- ItemObject;
|
||||
ItemObject.LoadByAddress(ItemInfo.ItemAddress);
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X + 56, Y + 87, 30, 30)) {
|
||||
MaterialItem = ItemInfo;
|
||||
MaterialItemSlot.SetItem(ItemObject);
|
||||
} else if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X + 211, Y + 87, 30, 30)) {
|
||||
TargetItem = ItemInfo;
|
||||
TargetItemSlot.SetItem(ItemObject);
|
||||
}
|
||||
|
||||
PlaceItem();
|
||||
}
|
||||
}
|
||||
|
||||
//物品被放置的回调
|
||||
function PlaceItem() {
|
||||
//两个都放上去了
|
||||
if (MaterialItem && TargetItem) {
|
||||
//获取材料装备的强化 增幅 附魔 锻造
|
||||
local MaterialItemObject = MaterialItem.ItemObject;
|
||||
local Upgrade = MaterialItemObject.GetUpgrade();
|
||||
local Amplification = MaterialItemObject.GetAmplification();
|
||||
local Forging = MaterialItemObject.GetForging();
|
||||
local ForgingAttribute = MaterialItemObject.GetForgingAttribute();
|
||||
local Enchanting = MaterialItemObject.GetEnchanting();
|
||||
|
||||
//创建一个目标装备
|
||||
ResultItem = Rindro_Item();
|
||||
ResultItem.LoadById(TargetItem.ItemObject.GetIndex());
|
||||
ResultItem.SetUpgrade(Upgrade);
|
||||
ResultItem.SetAmplification(Amplification);
|
||||
ResultItem.SetForging(Forging);
|
||||
ResultItem.SetForgingAttribute(ForgingAttribute);
|
||||
ResultItem.SetEnchanting(Enchanting);
|
||||
ResultItemSlot.SetItem(ResultItem);
|
||||
} else {
|
||||
ResultItem = null;
|
||||
ResultItemSlot.RemoveItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// L_Windows_List <- [];
|
||||
// getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
// getroottable().rawdelete("EventList_Obj")
|
||||
// getroottable().rawdelete("ItemInherit_Obj");
|
||||
// getroottable().rawdelete("L_Each_Obj");
|
||||
|
||||
function Lenheart_ItemInherit_Fun(obj) {
|
||||
|
||||
// sq_IsValidActiveStatus(obj, 1);
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("ItemInherit_Obj")) {
|
||||
RootTab.rawset("ItemInherit_Obj", true);
|
||||
|
||||
@@ -364,11 +364,11 @@ class NpcTransactionC extends LenheartNewUI_Windows {
|
||||
}
|
||||
}
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("NpcTransaction_Obj");
|
||||
getroottable().rawdelete("L_Each_Obj");
|
||||
// L_Windows_List <- [];
|
||||
// getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
// getroottable().rawdelete("EventList_Obj")
|
||||
// getroottable().rawdelete("NpcTransaction_Obj");
|
||||
// getroottable().rawdelete("L_Each_Obj");
|
||||
|
||||
function Lenheart_NpcTransaction_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
|
||||
114
Project/WarehouseLock/WarehouseLock.nut
Normal file
114
Project/WarehouseLock/WarehouseLock.nut
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
文件名:WarehouseLock.nut
|
||||
路径:Project/WarehouseLock/WarehouseLock.nut
|
||||
创建日期:2025-12-20 02:08
|
||||
文件用途:仓库锁
|
||||
*/
|
||||
class WarehouseLockC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
Visible = false;
|
||||
|
||||
Img = Rindro_Image("safety/warehouse.img");
|
||||
|
||||
//输入框
|
||||
InputObject = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
|
||||
|
||||
Pack_Control.rawset(21008010, function(Chunk) {
|
||||
Visible = true;
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xFCF380), [0xC3]);
|
||||
}.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(21008002, function(Chunk) {
|
||||
Visible = false;
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xFCF380), [0x55]);
|
||||
}.bindenv(this));
|
||||
|
||||
SendPackEx({
|
||||
op = 21008009,
|
||||
});
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(322, 4, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
InputObject = LenheartNewUI_BaseInput(88, 126, 152, 20);
|
||||
AddChild(InputObject);
|
||||
|
||||
//确认按钮
|
||||
local ConfirmButton = LenheartNewUI_ButtonText(131, 156, 15, "验证");
|
||||
ConfirmButton.DWidth = 18;
|
||||
ConfirmButton.Width = 74;
|
||||
ConfirmButton.SetTextOffset(7, 1);
|
||||
ConfirmButton.OnClickEx = function(Btn) {
|
||||
local T = {
|
||||
op = 21008001,
|
||||
passwd = InputObject.str
|
||||
}
|
||||
SendPackEx(T);
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
AddChild(ConfirmButton);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//背景框
|
||||
DrawNineBox(X, Y, 336, 206, "interface/lenheartwindowcommon.img", 213);
|
||||
//标题
|
||||
DrawWindowTitle(339);
|
||||
//绘制标题名
|
||||
L_sq_DrawCode("公告", X + 156, Y + 5, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
|
||||
|
||||
Img.DrawPng(0, X + 8, Y + 32);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("WarehouseLock_Obj");
|
||||
|
||||
|
||||
function Lenheart_WarehouseLock_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("WarehouseLock_Obj")) {
|
||||
RootTab.rawset("WarehouseLock_Obj", true);
|
||||
LenheartNewUI_CreateWindow(WarehouseLockC, "仓库锁窗口", ((getroottable().Rindro_Scr_Width - 336) / 2).tointeger(), 180, 336, 206, 28);
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("WarehouseLockFuncN", Lenheart_WarehouseLock_Fun);
|
||||
578
Project/WorldBoss/WorldBoss_HM.nut
Normal file
578
Project/WorldBoss/WorldBoss_HM.nut
Normal file
@@ -0,0 +1,578 @@
|
||||
/*
|
||||
文件名:WorldBoss.nut
|
||||
路径:Project/WorldBoss/WorldBoss.nut
|
||||
创建日期:2025-05-01 23:54
|
||||
文件用途:世界BOSS
|
||||
*/
|
||||
|
||||
class WorldBossC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
Visible = false;
|
||||
|
||||
WindowImg = Rindro_Image("hud/worldboss.img");
|
||||
WindowTimeImg = Rindro_Image("hud/worldboss_time.img");
|
||||
WindowTimeNumImg = Rindro_Image("hud/worldboss_timenum.img");
|
||||
WindowLogoImg = Rindro_Image("hud/worldboss_logo.img");
|
||||
WindowInfoImg = Rindro_Image("hud/worldboss_info.img");
|
||||
|
||||
//基础信息
|
||||
BaseInfo = null;
|
||||
|
||||
//Pvf信息
|
||||
PvfInfo = null;
|
||||
|
||||
//伤害列表
|
||||
RankList = null;
|
||||
|
||||
//标题栏
|
||||
Title = null;
|
||||
//组队榜单按钮
|
||||
TeamRankBtn = null;
|
||||
//个人榜单按钮
|
||||
PersonalRankBtn = null;
|
||||
|
||||
|
||||
|
||||
//页面
|
||||
Page = 0;
|
||||
//查询排名
|
||||
CheckType = 0; //0组队 1个人
|
||||
RankPage = 0; //当前页数
|
||||
MaxRankPage = 1; //最大页数
|
||||
|
||||
//奖励
|
||||
RewardList = null;
|
||||
RewardType = 0;
|
||||
RewardSubType = 0;
|
||||
|
||||
//排行榜
|
||||
RankObject = null;
|
||||
MyRankObject = null;
|
||||
|
||||
|
||||
//计时器
|
||||
TiemrCache = null;
|
||||
Timer = null;
|
||||
|
||||
//累计伤害
|
||||
TotalDamage = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
|
||||
Pack_Control.rawset(20060002, function(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
BaseInfo = Jso;
|
||||
RegisterBossPage();
|
||||
ChangePage(0);
|
||||
}.bindenv(this));
|
||||
|
||||
//获取奖励
|
||||
Pack_Control.rawset(20060012, function(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
RewardList = [];
|
||||
RewardList.append(Jso.rewards);
|
||||
RewardList.append(Jso.rewards2);
|
||||
if (Jso.rawin("rewards3"))
|
||||
RewardList.append(Jso.rewards3);
|
||||
}.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(20060006, function(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
MaxRankPage = Jso.maxPage;
|
||||
RankObject = [];
|
||||
foreach(Info in Jso.list) {
|
||||
local T = {
|
||||
idx = Info.rank,
|
||||
name = Info.name,
|
||||
time = Info.time,
|
||||
damage = Info.damage,
|
||||
teamid = Info.teamId,
|
||||
};
|
||||
local Buffer = WorldBossC_Item(this, T);
|
||||
RankObject.append(Buffer);
|
||||
}
|
||||
|
||||
//我的排名
|
||||
if (Jso.rawin("myteam")) {
|
||||
MyRankObject = WorldBossC_Item(this, {
|
||||
idx = Jso.myteam.rank,
|
||||
name = "我的队伍",
|
||||
time = Jso.myteam.time,
|
||||
damage = Jso.myteam.damage,
|
||||
teamid = Jso.myteam.teamId,
|
||||
self = true
|
||||
})
|
||||
} else {
|
||||
MyRankObject = WorldBossC_Item(this, {
|
||||
idx = "∞",
|
||||
name = "我的队伍",
|
||||
time = "0:0",
|
||||
damage = "0",
|
||||
teamid = 0,
|
||||
self = true
|
||||
})
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(20060026, function(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
MaxRankPage = Jso.maxPage;
|
||||
RankObject = [];
|
||||
foreach(Info in Jso.list) {
|
||||
local T = {
|
||||
idx = Info.rank,
|
||||
name = Info.name,
|
||||
time = Info.time,
|
||||
damage = Info.damage,
|
||||
};
|
||||
local Buffer = WorldBossC_Item(this, T);
|
||||
RankObject.append(Buffer);
|
||||
}
|
||||
if (Jso.rawin("myteam")) {
|
||||
MyRankObject = WorldBossC_Item(this, {
|
||||
idx = Jso.myteam.rank,
|
||||
name = "我的队伍",
|
||||
time = Jso.myteam.time,
|
||||
damage = Jso.myteam.damage,
|
||||
self = true
|
||||
})
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(20060014, function(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Timer = Clock();
|
||||
TiemrCache = Jso.endTime;
|
||||
}.bindenv(this));
|
||||
|
||||
PushDamageFontFuncTab.rawset("DamagePerSecondCFunc", function(ObjAddress, MySelfAddress, Value) {
|
||||
if (!SendDamagePackFlag) return;
|
||||
if (ObjAddress == 0 || ObjAddress == MySelfAddress) {
|
||||
if (!TotalDamage) TotalDamage = longlong(0);
|
||||
TotalDamage += longlong(Value);
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
// RankObject = [];
|
||||
// for (local i = 0; i< 7; i++) {
|
||||
// local Buffer = WorldBossC_Item(this, {
|
||||
// idx = i,
|
||||
// name = "倾泪寒的队伍" + i,
|
||||
// time = "15:20",
|
||||
// damage = Clock().tostring(),
|
||||
// });
|
||||
// RankObject.append(Buffer);
|
||||
// }
|
||||
// MyRankObject = WorldBossC_Item(this, {
|
||||
// idx = 56,
|
||||
// name = "我的队伍",
|
||||
// time = "15:20",
|
||||
// damage = Clock().tostring(),
|
||||
// self = true
|
||||
// });
|
||||
}
|
||||
|
||||
//请求奖励信息
|
||||
function RequestRewardInformation() {
|
||||
if (Page == null) return;
|
||||
local T = {
|
||||
op = 20060001,
|
||||
index = Page
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
|
||||
|
||||
function ChangePage(ToPage) {
|
||||
Page = ToPage;
|
||||
RankPage = 0; //重置页数
|
||||
CheckRank();
|
||||
RequestRewardInformation();
|
||||
}
|
||||
|
||||
function CheckRank() {
|
||||
local T = {
|
||||
//0查组队 否则查个人
|
||||
op = (CheckType == 0 ? 20060005 : 20060025),
|
||||
index = Page,
|
||||
page = RankPage
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
|
||||
function RegisterBossPage() {
|
||||
Title = [];
|
||||
|
||||
local LogicFunc = function(Btn) {
|
||||
foreach(Pos, obj in Title) {
|
||||
if (obj != Btn) obj.State = 0;
|
||||
else {
|
||||
obj.State = 1;
|
||||
ChangePage(Pos);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//遍历有多少个Boss
|
||||
foreach(Pos, Info in BaseInfo.info) {
|
||||
local Tabbars1 = LenheartNewUI_TabbarsText(6 + (Pos * 61), 23, Info.name);
|
||||
if (Pos == 0) Tabbars1.State = 1;
|
||||
Tabbars1.SetTextOffset(31 - LenheartTextClass.GetStringLength(Info.name) / 2, 4);
|
||||
AddChild(Tabbars1);
|
||||
Tabbars1.OnClickEx = LogicFunc.bindenv(this);
|
||||
Title.append(Tabbars1);
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(738, 3, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
local RankingRewardsButton = LenheartNewUI_ButtonText(106, 472, 40, "排名奖励");
|
||||
RankingRewardsButton.SetTextOffset(6, 1);
|
||||
RankingRewardsButton.OnClickEx = function(Btn) {
|
||||
RewardType = 0;
|
||||
}.bindenv(this);
|
||||
AddChild(RankingRewardsButton);
|
||||
|
||||
// local BasicRewardsButton = LenheartNewUI_ButtonText(170, 472, 40, "基础奖励");
|
||||
// BasicRewardsButton.SetTextOffset(6, 1);
|
||||
// BasicRewardsButton.OnClickEx = function(Btn) {
|
||||
// RewardType = 1;
|
||||
// }.bindenv(this);
|
||||
// AddChild(BasicRewardsButton);
|
||||
|
||||
local PurchaseTicketsButton = LenheartNewUI_ButtonText(420, 478, 150, "开始挑战");
|
||||
PurchaseTicketsButton.SetTextOffset(59, 1);
|
||||
PurchaseTicketsButton.OnClickEx = function(Btn) {
|
||||
local T = {
|
||||
op = 20060007,
|
||||
index = Page
|
||||
}
|
||||
SendPackEx(T);
|
||||
}.bindenv(this);
|
||||
AddChild(PurchaseTicketsButton);
|
||||
|
||||
|
||||
TeamRankBtn = LenheartNewUI_TabbarsText(305, 84, "组队榜单");
|
||||
TeamRankBtn.State = 1;
|
||||
TeamRankBtn.SetTextOffset(7, 4);
|
||||
TeamRankBtn.OnClickEx = function(Btn) {
|
||||
if (Btn.State == 1) return;
|
||||
PersonalRankBtn.State = 0;
|
||||
Btn.State = 1;
|
||||
CheckType = 0;
|
||||
RewardSubType = 0;
|
||||
CheckRank();
|
||||
}.bindenv(this);
|
||||
AddChild(TeamRankBtn);
|
||||
|
||||
PersonalRankBtn = LenheartNewUI_TabbarsText(366, 84, "个人榜单");
|
||||
PersonalRankBtn.SetTextOffset(7, 4);
|
||||
PersonalRankBtn.OnClickEx = function(Btn) {
|
||||
if (Btn.State == 1) return;
|
||||
TeamRankBtn.State = 0;
|
||||
Btn.State = 1;
|
||||
CheckType = 1;
|
||||
RewardSubType = 1;
|
||||
CheckRank();
|
||||
}.bindenv(this);
|
||||
AddChild(PersonalRankBtn);
|
||||
|
||||
//左翻页按钮
|
||||
local LeftButton = LenheartNewUI_BaseButton(480, 416, 15, 15, "interface/lenheartwindowcommon.img", 34);
|
||||
LeftButton.OnClick = function() {
|
||||
if (RankPage > 0) {
|
||||
RankPage--;
|
||||
CheckRank();
|
||||
}
|
||||
}.bindenv(this);
|
||||
AddChild(LeftButton);
|
||||
|
||||
//右翻页按钮
|
||||
local RightButton = LenheartNewUI_BaseButton(550, 416, 15, 15, "interface/lenheartwindowcommon.img", 38);
|
||||
RightButton.OnClick = function() {
|
||||
if (RankPage<(MaxRankPage - 1)) {
|
||||
RankPage++;
|
||||
CheckRank();
|
||||
}
|
||||
}.bindenv(this);
|
||||
AddChild(RightButton);
|
||||
|
||||
for (local i = 0; i< 8; i++) {
|
||||
local ButtonBuffer = LenheartNewUI_BaseButton(700, 139 + (i * 40), 25, 25, "interface/lenheartwindowcommon.img", 362);
|
||||
ButtonBuffer.Data = i;
|
||||
ButtonBuffer.OnClickEx = function(Btn) {
|
||||
if (RankObject && Btn.Data< RankObject.len()) {
|
||||
local T = {
|
||||
op = 20060003,
|
||||
index = Page,
|
||||
teamId = RankObject[Btn.Data].Info.teamid
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
}.bindenv(this);
|
||||
ButtonBuffer.SetCallBackFunc(function(Btn) {
|
||||
if (RankObject && Btn.Data< RankObject.len() && CheckType == 0) Btn.Visible = true;
|
||||
else Btn.Visible = false;
|
||||
}.bindenv(this));
|
||||
Childrens.append(ButtonBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
//悬停层绘制Flag
|
||||
HoverFlag = null;
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
|
||||
if (Page != null) {
|
||||
WindowLogoImg.DrawExPng(Page, X + 1, Y + 19, 0, sq_RGBA(255, 255, 255, 250), 1.0, 1.0);
|
||||
}
|
||||
|
||||
WindowImg.DrawPng(0, X, Y);
|
||||
|
||||
if (Page != null) {
|
||||
WindowInfoImg.DrawExPng(Page, X + 19, Y + 66, 0, sq_RGBA(255, 255, 255, 250), 1.0, 1.0);
|
||||
}
|
||||
|
||||
DrawNineBox(X + 26, Y + 416, 260, 42, "interface/lenheartwindowcommon.img", 213); //背景框
|
||||
DrawNineBox(X + 308, Y + 106, 433, 26, "interface/lenheartwindowcommon.img", 213); //榜单表头
|
||||
L_sq_DrawCode("名次", X + 330, Y + 113, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
L_sq_DrawCode(CheckType == 0 ? "队伍名称" : "玩家名称", X + 408, Y + 113, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
L_sq_DrawCode("战斗时长", X + 510, Y + 113, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
L_sq_DrawCode("总伤害", X + 604, Y + 113, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
L_sq_DrawCode("详细", X + 700, Y + 113, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
|
||||
local RankPageStr = (RankPage + 1) + "/" + MaxRankPage;
|
||||
L_sq_DrawCode(RankPageStr, X + 524 - LenheartTextClass.GetStringLength(RankPageStr) / 2, Y + 418, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
if (RewardList) {
|
||||
local Typep = RewardType;
|
||||
if (Typep == 0 && RewardSubType == 1 && RewardList.len() == 3) Typep = 2;
|
||||
foreach(Pos, ItemId in RewardList[Typep]) {
|
||||
DrawItemEx(X + 34 + (Pos * 36), Y + 423, ItemId, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (RankObject) {
|
||||
foreach(Pos, Object in RankObject) {
|
||||
Object.Show(X + 309, Y + 132 + (Pos * 40));
|
||||
}
|
||||
}
|
||||
if (MyRankObject) {
|
||||
MyRankObject.Show(X + 309, Y + 434);
|
||||
}
|
||||
}
|
||||
|
||||
function TopShow(obj) {
|
||||
LenheartNewUI_Windows.TopShow(obj);
|
||||
local MousePos_X = IMouse.GetXPos();
|
||||
local MousePos_Y = IMouse.GetYPos();
|
||||
if (RankObject) {
|
||||
foreach(Pos, Object in RankObject) {
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X + 309, Y + 131 + (Pos * 39), 433, 39)) {
|
||||
Object.HoverShow(X + 309, Y + 132 + (Pos * 40));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DrawTime(obj);
|
||||
}
|
||||
|
||||
|
||||
function DrawTime(obj) {
|
||||
if (!TiemrCache || !Timer) return;
|
||||
local CountdownX = 300;
|
||||
local CountdownY = 0;
|
||||
local DrawX = CountdownX;
|
||||
local DrawY = CountdownY;
|
||||
//背景绘制
|
||||
WindowTimeImg.DrawPng(1, DrawX, DrawY);
|
||||
WindowTimeImg.DrawPng(0, DrawX, DrawY + 2);
|
||||
|
||||
//时间绘制
|
||||
local DrawTime = TiemrCache - (Clock() - Timer);
|
||||
local TotalSeconds = DrawTime / 1000;
|
||||
local Minutes = (TotalSeconds % 3600) / 60;
|
||||
local Seconds = (TotalSeconds % 3600) % 60;
|
||||
local Millisecond = DrawTime % 1000 / 10;
|
||||
|
||||
local Offset = 43;
|
||||
DrawNum(format("%02d", Minutes), Offset);
|
||||
Offset += 40;
|
||||
WindowTimeNumImg.DrawPng(10, DrawX + Offset - 5, DrawY + 27);
|
||||
DrawNum(format("%02d", Seconds), Offset);
|
||||
Offset += 40;
|
||||
WindowTimeNumImg.DrawPng(10, DrawX + Offset - 5, DrawY + 27);
|
||||
DrawNum(format("%02d", Millisecond), Offset);
|
||||
}
|
||||
|
||||
function DrawNum(time, Xoffset) {
|
||||
if (!TiemrCache || !Timer) return;
|
||||
local CountdownX = 300;
|
||||
local CountdownY = 0;
|
||||
local DrawX = CountdownX;
|
||||
local DrawY = CountdownY;
|
||||
for (local i = 0; i< time.len(); i++) {
|
||||
local DrawNum = time.slice(i, i + 1);
|
||||
WindowTimeNumImg.DrawPng(DrawNum.tointeger(), DrawX + Xoffset + (i * 15), DrawY + 21);
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
|
||||
//进入副本初始化包Flag
|
||||
EnterMapPackFlag = false;
|
||||
//发送伤害包Flag
|
||||
SendDamagePackFlag = false;
|
||||
|
||||
//副本逻辑
|
||||
function DungeonLogic() {
|
||||
local stage = sq_GetGlobaludpModuleStage();
|
||||
local mapIndex = sq_GetMapIndex(stage);
|
||||
if (mapIndex == -1) {
|
||||
SendDamagePackFlag = false;
|
||||
EnterMapPackFlag = false;
|
||||
TiemrCache = null;
|
||||
Timer = null;
|
||||
}
|
||||
local dungeon = sq_GetDungeonByStage(stage);
|
||||
local dungeonIndex = sq_GetDuegonIndex(dungeon);
|
||||
if (dungeonIndex == BaseInfo.info[Page].dgn && mapIndex == BaseInfo.info[Page].map) {
|
||||
if (!EnterMapPackFlag) {
|
||||
EnterMapPackFlag = true;
|
||||
SendPackEx({
|
||||
op = 20060013,
|
||||
index = Page
|
||||
})
|
||||
}
|
||||
SendDamagePackFlag = true;
|
||||
} else {
|
||||
SendDamagePackFlag = false;
|
||||
EnterMapPackFlag = false;
|
||||
TiemrCache = null;
|
||||
Timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
//发送伤害计时器
|
||||
SendDamageT = 0;
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
if (!BaseInfo) return;
|
||||
DungeonLogic();
|
||||
DrawTime(obj);
|
||||
|
||||
//在副本中需要发送伤害的时候
|
||||
if (TotalDamage) {
|
||||
if (SendDamagePackFlag) {
|
||||
SendDamageT += Rindro_Duration;
|
||||
if (SendDamageT > 5000) {
|
||||
// SendDamageT = 0;
|
||||
// SendPackEx({
|
||||
// op = 20060017,
|
||||
// Damage = TotalDamage.Value
|
||||
// })
|
||||
// TotalDamage = null;
|
||||
}
|
||||
}
|
||||
//结束时再发一次
|
||||
else {
|
||||
SendPackEx({
|
||||
op = 20060017,
|
||||
index = Page,
|
||||
Damage = TotalDamage.Value
|
||||
})
|
||||
// print("发送伤害: " + TotalDamage.Value)
|
||||
|
||||
TotalDamage = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function OpenCallBack() {
|
||||
Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Lenheart_WorldBoss_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("WorldBoss_Obj")) {
|
||||
RootTab.rawset("WorldBoss_Obj", true);
|
||||
local Win = LenheartNewUI_CreateWindow(WorldBossC, "阿拉德守卫战窗口", ((getroottable().Rindro_Scr_Width - 753) / 2).tointeger(), 40, 753, 518, 20);
|
||||
EventList_Obj.AddEvent("阿拉德守卫战", 1001, Win);
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("WorldBossFuncN", Lenheart_WorldBoss_Fun);
|
||||
|
||||
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("WorldBoss_Obj");
|
||||
|
||||
class WorldBossC_Item {
|
||||
//Img
|
||||
Img = null;
|
||||
//父对象
|
||||
Parent = null;
|
||||
//信息
|
||||
Info = null;
|
||||
|
||||
constructor(Window, Info) {
|
||||
Parent = Window;
|
||||
Img = Window.WindowImg;
|
||||
this.Info = Info;
|
||||
}
|
||||
|
||||
function Show(X, Y) {
|
||||
if (!Info.rawin("self")) Img.DrawPng(1, X, Y);
|
||||
else Parent.DrawNineBox(X + 0, Y + 2, 432, 35, "interface/lenheartwindowcommon.img", 204);
|
||||
|
||||
local IdxStr = Info.idx.tostring();
|
||||
L_sq_DrawCode(IdxStr, X + 32 - LenheartTextClass.GetStringLength(IdxStr) / 2, Y + 10, sq_RGBA(230, 200, 155, 255), 2, 1);
|
||||
|
||||
|
||||
L_sq_DrawCode(Info.name, X + 125 - LenheartTextClass.GetStringLength(Info.name) / 2, Y + 14, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
|
||||
L_sq_DrawCode(Info.time.tostring(), X + 230 - LenheartTextClass.GetStringLength(Info.time.tostring()) / 2, Y + 14, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
|
||||
L_sq_DrawCode(Info.damage, X + 313 - LenheartTextClass.GetStringLength(Info.damage) / 2, Y + 14, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
}
|
||||
|
||||
|
||||
function HoverShow(X, Y) {
|
||||
Img.DrawPng(2, X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// L_sq_GoDungeon(20501);
|
||||
@@ -217,5 +217,8 @@
|
||||
},
|
||||
"Project/ItemTool/ItemInherit": {
|
||||
"description": "装备继承"
|
||||
},
|
||||
"Project/WarehouseLock": {
|
||||
"description": "仓库锁"
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ function illusionBomb_bykk(obj)
|
||||
|
||||
|
||||
|
||||
function onSetState_IllusionBomb(obj, state, datas, isResetTimer)
|
||||
function onSetState_IllusionBomb_old(obj, state, datas, isResetTimer)
|
||||
{
|
||||
if(!obj) return;
|
||||
local subState = obj.sq_GetVectorData(datas, 0);
|
||||
|
||||
@@ -1650,11 +1650,13 @@ function onSetState_BlackMantle_bykk(obj, state, datas, isResetTimer)
|
||||
//
|
||||
local Ani = obj.sq_GetThrowChargeAni(0);
|
||||
obj.setCurrentAnimation(Ani);
|
||||
obj.sq_SetStaticSpeedInfo(SPEED_TYPE_CAST_SPEED, SPEED_TYPE_CAST_SPEED,SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0);
|
||||
break;
|
||||
case 11:
|
||||
// obj.sq_PlaySound("WZ_ACID_CLOUD");
|
||||
local Ani = obj.sq_GetThrowShootAni(0);
|
||||
obj.setCurrentAnimation(Ani);
|
||||
obj.sq_SetStaticSpeedInfo(SPEED_TYPE_CAST_SPEED, SPEED_TYPE_CAST_SPEED,SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0);
|
||||
|
||||
//local AddAppendage = CNSquirrelAppendage.sq_GetAppendage(obj, "ui/ap/ap_character.nut");
|
||||
//if(AddAppendage) print(1);
|
||||
|
||||
@@ -465,7 +465,7 @@ function setCustomData_po_summoners(obj, receiveData)
|
||||
case 1:
|
||||
//?嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭
|
||||
local totalDamage = receiveData.readDword();
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 26));
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 27));
|
||||
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||||
//?嚙踝蕭ANI
|
||||
local ani = sq_CreateAnimation("","passiveobject/madeby_k_k/animation/spikeking/attack.ani");
|
||||
@@ -474,7 +474,7 @@ function setCustomData_po_summoners(obj, receiveData)
|
||||
case 2:
|
||||
//?嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭
|
||||
local totalDamage = receiveData.readDword();
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 29));
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 30));
|
||||
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||||
//?嚙踝蕭ANI
|
||||
local ani = sq_CreateAnimation("","passiveobject/madeby_k_k/animation/spikeking/grandwave1.ani");
|
||||
@@ -495,7 +495,7 @@ function setCustomData_po_summoners(obj, receiveData)
|
||||
case 5:
|
||||
//?嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭
|
||||
local totalDamage = receiveData.readDword();
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 30));
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 31));
|
||||
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||||
//?嚙踝蕭ANI
|
||||
local ani = sq_CreateAnimation("","passiveobject/madeby_k_k/animation/spikeking/dummy2.ani");
|
||||
@@ -543,14 +543,14 @@ function setCustomData_po_summoners(obj, receiveData)
|
||||
//?嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭
|
||||
local eclipsehive_bonus = sqrChr.getVar("eclipsehive_bonus").getInt(10).tofloat() / 100.0;
|
||||
local totalDamage = sq_GetBonusRateWithPassive(sqrChr, 47, 47, 11, eclipsehive_bonus) + 100;
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 29));
|
||||
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||||
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||||
break;
|
||||
case 51:
|
||||
//?嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭
|
||||
local totalDamage = receiveData.readDword();
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 30));
|
||||
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 31));
|
||||
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||||
//?嚙踝蕭ANI
|
||||
local ani = sq_CreateAnimation("","passiveobject/madeby_k_k/animation/spikeking/newlaser/uhdlaserbombmagicsquare.ani");
|
||||
|
||||
@@ -891,6 +891,9 @@ function onSourceKeyFrameFlag_appendage_spirit_bykk(appendage,flagIndex)
|
||||
}
|
||||
}
|
||||
|
||||
local skillLevel = sq_GetSkillLevel(sqrChr, 151);
|
||||
eclipsehive_bonus = eclipsehive_bonus * (1 + skillLevel * 0.1);
|
||||
|
||||
switch(flagIndex){
|
||||
case 101://嚙踝蕭1
|
||||
local pAni = parentObj.getCurrentAnimation();
|
||||
@@ -2750,6 +2753,7 @@ function summoners_kuk_setbonusRate(obj)
|
||||
print("bonusRate2 = "+bonusRate);
|
||||
if(sq_GetSkillLevel(obj, SKILL_BYKK_COMMUNION) > 0) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_BYKK_COMMUNION, 0, sq_GetSkillLevel(obj, SKILL_BYKK_COMMUNION))) / 1000;
|
||||
print("bonusRate3 = "+bonusRate);
|
||||
if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/mage/k_k_made/appendage/aptosummoner/ap_masterreckless.nut")) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, 81, 5, sq_GetSkillLevel(obj, 81))) / 1000;
|
||||
//if(obj.getVar("summoners_bonusRate").getBool(0)) bonusRate = bonusRate + sq_GetLevelData(obj, 81, 5, sq_GetSkillLevel(obj, 81));
|
||||
// print("bonusRate4 = "+bonusRate);
|
||||
if(obj.getVar("echeverra_buff").getBool(0)){
|
||||
@@ -3083,8 +3087,9 @@ function onAfterSetState_Throw_summoner_bykk(obj, state, datas, isResetTimer)
|
||||
if (obj.getThrowState() == 1){
|
||||
if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/mage/k_k_made/appendage/aptosummoner/ap_masterreckless.nut")) CNSquirrelAppendage.sq_RemoveAppendage(obj, "character/mage/k_k_made/appendage/aptosummoner/ap_masterreckless.nut");
|
||||
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, 81, false, "character/mage/k_k_made/appendage/aptosummoner/ap_masterreckless.nut", true);
|
||||
local rad = sq_GetLevelData(obj, 81, 5, sq_GetSkillLevel(obj, 81)) / 10;
|
||||
obj.getVar("apGetSetbyKK").setInt(0, rad);
|
||||
//local rad = sq_GetLevelData(obj, 81, 5, sq_GetSkillLevel(obj, 81)) / 10;
|
||||
//obj.getVar("apGetSetbyKK").setInt(0, rad);
|
||||
summoners_kuk_setbonusRate(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user