添加示例项目

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": "通过指定ID的宝珠道具跨界你的装备和附魔一样。",
"ProjectAuthor": "Pluto",
"ProjectVersion": 1.0,
"ProjectConfig": "更加优雅的跨界石_Pluto.json",
"ProjectFiles": [
"更加优雅的跨界石.nut"
],
"ProjectRunFunc": "_Dps_Crossover_Main_"
}

View File

@@ -0,0 +1,76 @@
/*
文件名:更加优雅的跨界石.nut
路径:MyProject/更加优雅的跨界石/更加优雅的跨界石.nut
创建日期:2026-03-23
文件用途:使用附魔宝珠指针进行跨界
作者:Pluto
*/
function _Dps_Crossover_Main_() {
Cb_ExpertOnEnchantByBead_Enter_Func.Crossover <- function (args) {
local cfg = GlobalConfig.Get("更加优雅的跨界石_Pluto.json");
local SUser = User(args[1]);
local beadSlot = args[3];
local equipSlot = args[5];
local inven = SUser.GetInven();
local bead = inven.GetSlot(1,beadSlot);
local bead_id = bead.GetIndex();
local bead_add_info = bead.GetAdd_Info();
if(bead_id == cfg["功能配置"]["跨界石ID"])
{
Sq_WriteByteArr(S_Ptr("0x0849ED23"), Haker.AsmGenerateMcd(
"add esp, 0x6C",
"pop ebx",
"pop esi",
"pop edi",
"pop ebp",
"xor eax, eax", //返回值 0
"ret"
));
local equ = inven.GetSlot(1,equipSlot);
local equ_id = equ.GetIndex();
//print("[Enchant Hook] 玩家正在使用道具 ID: " + bead_id + " 装备 ID: " + equ_id + " 宝珠数量: " + bead_add_info);
//禁止跨界物品的id
local forbiddenItemIds = [27601, 27602];
//获取账号金库对象
local CargoObj = SUser.GetAccountCargo();
//获取账号金库中的一个空格子
local EmptySlot = CargoObj.GetEmptySlot();
//禁止跨界
if (cfg["功能配置"]["禁止跨界装备ID"].find(equ_id) != null) {
SUser.SendNotiBox("该装备无法跨界!", 1);
return;
}
//账号金库已满
if(EmptySlot == -1) {
SUser.SendNotiBox("账号金库已满!", 1);
return;
}
//跨界
local Flag = CargoObj.InsertItem(equ, EmptySlot);
if(Flag == -1) {
SUser.SendNotiBox("跨界失败!", 1);
return;
}else{
//销毁装备栏中的道具
equ.Delete();
//宝珠数量减一
if(bead_add_info == 1) {
bead.Delete();
}else{
bead.SetAdd_Info(bead_add_info - 1);
bead.Flush();
}
//刷新玩家装备列表
SUser.SendUpdateItemList(1, 0, equipSlot);
//刷新玩家道具列表
SUser.SendUpdateItemList(1, 0, beadSlot);
//刷新账号金库列表
CargoObj.SendItemList();
SUser.SendNotiBox("跨界成功!", 1);
}
}
}
}

View File

@@ -0,0 +1,9 @@
{
"功能配置": {
"跨界石ID": 12600294,
"禁止跨界装备ID": [27601, 27602]
},
"提示1":"跨界石类型为宝珠",
"提示2":"请自行修改跨界石宝珠图标、描述",
"提示3":"注意宝珠可以附魔的装备类型可以直接影响可跨界的装备类型"
}