添加示例项目

This commit is contained in:
2026-04-16 16:27:53 +08:00
parent 69a2141804
commit 721fb5a992
192 changed files with 10148 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{
"ProjectName": "副本需要持有道具进入",
"ProjectDescribe": "副本需要持有道具进入",
"ProjectAuthor": "凌众",
"ProjectVersion": 1.0,
"ProjectConfig": "副本需要持有道具进入_Lenheart.json",
"ProjectFiles": [
"副本需要持有道具进入.nut"
],
"ProjectRunFunc": "_Dps_MapNeedItem_Main_"
}

View File

@@ -0,0 +1,38 @@
function _Dps_MapNeedItem_Main_() {
// 禁止进入副本
Cb_SelectDungeon_Check_Error_Leave_Func.MapNeedItem <- function (args) {
local Config = GlobalConfig.Get("副本需要持有道具进入_Lenheart.json");
local body = Config["副本需要持有道具才允许进入"];
local SUser = User(args[1]);
local mapid = NativePointer(args[2]).add(13).readShort();
if(body.rawin(mapid.tostring())){
local ItemId = body[mapid.tostring()];
local PartyObj = SUser.GetParty();
if (!PartyObj) {
return;
}
for (local i = 0; i < 4; ++i) {
local PSUser = PartyObj.GetUser(i);
if (PSUser) {
local InvenObj = SUser.GetInven();
local SlotIdx = InvenObj.GetSlotById(ItemId);
if(SlotIdx == -1){
SUser.SendNotiBox(Config["公告"]+PvfItem.GetNameById(ItemId),1);
return 1; // 禁止进入副本
}
}
}
}
}
}

View File

@@ -0,0 +1,7 @@
{
"公告": "缺少进入凭证:",
"副本需要持有道具才允许进入":{
"65":3037,
"64":3038
}
}