添加示例项目
This commit is contained in:
11
示例项目/副本使用道具奖励/Proj.ifo
Normal file
11
示例项目/副本使用道具奖励/Proj.ifo
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ProjectName": "副本使用道具奖励",
|
||||
"ProjectDescribe": "特定副本使用特定道具会返还自定义的奖励",
|
||||
"ProjectAuthor": "至尚 & 倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "副本使用道具奖励.json",
|
||||
"ProjectFiles": [
|
||||
"副本使用道具奖励.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_ReturnDuplicateItems_Main_"
|
||||
}
|
||||
7
示例项目/副本使用道具奖励/副本使用道具奖励.json
Normal file
7
示例项目/副本使用道具奖励/副本使用道具奖励.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"副本返还配置列表": [
|
||||
[1,1106,3037,10],
|
||||
[2,1108,3038,10]
|
||||
],
|
||||
"提示": "第一个为副本id 第二个为使用的道具id 第三个为返还的道具id 第四个为返还的数量"
|
||||
}
|
||||
32
示例项目/副本使用道具奖励/副本使用道具奖励.nut
Normal file
32
示例项目/副本使用道具奖励/副本使用道具奖励.nut
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user