添加示例项目

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": "副本使用道具奖励.json",
"ProjectFiles": [
"副本使用道具奖励.nut"
],
"ProjectRunFunc": "_Dps_ReturnDuplicateItems_Main_"
}

View File

@@ -0,0 +1,7 @@
{
"副本返还配置列表": [
[1,1106,3037,10],
[2,1108,3038,10]
],
"提示": "第一个为副本id 第二个为使用的道具id 第三个为返还的道具id 第四个为返还的数量"
}

View File

@@ -0,0 +1,32 @@
function _Dps_ReturnDuplicateItems_Main_() {
local Config = GlobalConfig.Get("副本使用道具奖励.json");
//分解券
Cb_History_ItemDown_Func.DWSSSS <- function(user, date) {
local itemId = date[15].tointeger();
local PartyObj = user.GetParty();
if (date[18].tointeger()!= 3) return;
if (PartyObj) {
local Bfobj = PartyObj.GetBattleField();
local DgnObj = Bfobj.GetDgn();
if (DgnObj) {
local Dungeon_Id = DgnObj.GetId();
local FBSYDJ = Config["副本返还配置列表"];
foreach(ints in FBSYDJ) {
if (ints[0] == Dungeon_Id && itemId == ints[1]) {
user.GiveItem(ints[2].tointeger(), ints[3].tointeger());
}
}
}
}
}
}