添加示例项目
This commit is contained in:
11
示例项目/红字自动取消和道具自动打上全身红字/Proj.ifo
Normal file
11
示例项目/红字自动取消和道具自动打上全身红字/Proj.ifo
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ProjectName": "红字自动取消和道具自动打上全身红字",
|
||||
"ProjectDescribe": "红字自动取消和道具自动打上全身红字",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectConfig": "红字自动取消和道具自动打上全身红字.json",
|
||||
"ProjectFiles": [
|
||||
"红字自动取消和道具自动打上全身红字.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_HZZDQXHDJZDDSQSHZ_Main_"
|
||||
}
|
||||
9
示例项目/红字自动取消和道具自动打上全身红字/红字自动取消和道具自动打上全身红字.json
Normal file
9
示例项目/红字自动取消和道具自动打上全身红字/红字自动取消和道具自动打上全身红字.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"全身红字道具": [
|
||||
75771,
|
||||
7588,
|
||||
7589,
|
||||
7590
|
||||
],
|
||||
"提示": "道具请用7577复制出来的道具 第一个体力 第二个精神 第三个力量 第四个 智力"
|
||||
}
|
||||
85
示例项目/红字自动取消和道具自动打上全身红字/红字自动取消和道具自动打上全身红字.nut
Normal file
85
示例项目/红字自动取消和道具自动打上全身红字/红字自动取消和道具自动打上全身红字.nut
Normal file
@@ -0,0 +1,85 @@
|
||||
function _Dps_HZZDQXHDJZDDSQSHZ_Main_() {
|
||||
local Config = GlobalConfig.Get("红字自动取消和道具自动打上全身红字.json");
|
||||
Cb_Use_Item_Sp_Func[Config["全身红字道具"][0]] <- function(SUser, ItemId) {
|
||||
qsdshz(SUser, 1281);
|
||||
}
|
||||
|
||||
Cb_Use_Item_Sp_Func[Config["全身红字道具"][1]] <- function(SUser, ItemId) {
|
||||
qsdshz(SUser, 1282);
|
||||
}
|
||||
|
||||
Cb_Use_Item_Sp_Func[Config["全身红字道具"][2]] <- function(SUser, ItemId) {
|
||||
qsdshz(SUser, 1283);
|
||||
}
|
||||
|
||||
Cb_Use_Item_Sp_Func[Config["全身红字道具"][3]] <- function(SUser, ItemId) {
|
||||
qsdshz(SUser, 1284);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//自动取消红字
|
||||
Cb_User_Insert_Item_Leave_Func.hzzdqc <- function(args) {
|
||||
local SUser = User(NativePointer(args[0]).readPointer());
|
||||
local InvenObj = SUser.GetInven();
|
||||
local idx = args.pop();
|
||||
if (idx > 0) {
|
||||
local inven_item = InvenObj.GetSlot(1, idx);
|
||||
local item_id = inven_item.GetIndex();
|
||||
local pvfitem = PvfItem.GetPvfItemById(item_id);
|
||||
if (Sq_CallFunc(S_Ptr("0x08150812"), "int", ["pointer"], inven_item.C_Object)) {
|
||||
if(inven_item.GetAmplification() >=1281 &&inven_item.GetAmplification()<= 1284){
|
||||
|
||||
inven_item.SetAmplification(0);
|
||||
inven_item.Flush();
|
||||
SUser.SendUpdateItemList(1, 0, idx);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function qsdshz(SUser, type) {
|
||||
|
||||
local InvenObj = SUser.GetInven();
|
||||
//遍历身上的每一件装备
|
||||
/*
|
||||
for (local u = 10; u <= 21; u++) {
|
||||
if (u != 11) {
|
||||
|
||||
local EquObj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_BODY, u);
|
||||
if (EquObj && !EquObj.IsEmpty) {
|
||||
local ItemId1 = EquObj.GetIndex();
|
||||
|
||||
EquObj.SetAmplification(type);
|
||||
EquObj.Flush();
|
||||
SUser.SendUpdateItemList(1, 3, u);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
for (local u = 9; u <= 56; u++) {
|
||||
|
||||
|
||||
local EquObj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, u);
|
||||
if (EquObj && !EquObj.IsEmpty) {
|
||||
local ItemId1 = EquObj.GetIndex();
|
||||
|
||||
EquObj.SetAmplification(type);
|
||||
EquObj.Flush();
|
||||
SUser.SendUpdateItemList(1, 0, u);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user