添加示例项目
This commit is contained in:
11
示例项目/深渊模式称号/Proj.ifo
Normal file
11
示例项目/深渊模式称号/Proj.ifo
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ProjectName": "深渊模式称号",
|
||||
"ProjectDescribe": "指定称号ID并且佩戴可不用每次都点开启挑战深渊派对按钮,进入默认深渊模式(需要完成深渊任务,拥有深渊票),另外还有一个小功能,深渊次次非常困难。",
|
||||
"ProjectAuthor": "Pluto",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "深渊模式功能_Pluto.json",
|
||||
"ProjectFiles": [
|
||||
"深渊模式称号.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_hellParty_Main_"
|
||||
}
|
||||
5
示例项目/深渊模式称号/深渊模式功能_Pluto.json
Normal file
5
示例项目/深渊模式称号/深渊模式功能_Pluto.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"称号ID":26697,
|
||||
"非常困难":0,
|
||||
"次次都是非常困难开关":"开=1,关=0"
|
||||
}
|
||||
47
示例项目/深渊模式称号/深渊模式称号.nut
Normal file
47
示例项目/深渊模式称号/深渊模式称号.nut
Normal file
@@ -0,0 +1,47 @@
|
||||
//尊贵的客人:26700
|
||||
//称号位:11
|
||||
function _Dps_hellParty_Main_() {
|
||||
//深渊模式开关
|
||||
local hellPartyTag = false;
|
||||
//主逻辑
|
||||
Cb_CParty_DungeonStart_Enter_Func.hellparty <- function(args) {
|
||||
if (hellPartyTag == false) {
|
||||
return;
|
||||
}
|
||||
args[3] = 1;
|
||||
return args;
|
||||
}
|
||||
//获取玩家称号
|
||||
Cb_StartGame_check_error_Leave_Func.hellparty <- function(args) {
|
||||
local Config = GlobalConfig.Get("深渊模式功能_Pluto.json");
|
||||
local VipID = Config["称号ID"];
|
||||
local SUser = User(args[1]);
|
||||
local cid = SUser.GetCID();
|
||||
print("cid = " + cid + "称号ID = " + VipID);
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (InvenObj) {
|
||||
local ItemObj = InvenObj.GetSlot(0, 11);
|
||||
local item_id = ItemObj.GetIndex(); // 获取物品ID
|
||||
//print(item_id);
|
||||
if(item_id == VipID) {
|
||||
hellPartyTag = true;
|
||||
}else{
|
||||
hellPartyTag = false;
|
||||
}
|
||||
print("hellPartyTag = " + hellPartyTag);
|
||||
}
|
||||
}
|
||||
|
||||
//==================================================
|
||||
// 获取地狱派对难度功能
|
||||
Cb_GetHellPartyDifficulty_Leave_Func.abc <- function (args) {
|
||||
local Config = GlobalConfig.Get("深渊模式功能_Pluto.json");
|
||||
local GetHellPartyDifficulty = Config["非常困难"];
|
||||
print("难度开关 " + GetHellPartyDifficulty);
|
||||
if (GetHellPartyDifficulty == 1) {
|
||||
local retval = args.pop();
|
||||
print("获取地狱派对难度 " + retval);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user