烈阳武器附魔自定义描述
2022年9月13日 更新
开启更多功能,提升办公效能

效果如下(目前只支持武器):

服务端配置

先说服务端配置,需要有“烈阳武器附魔”脚本配合,服务端要改3个地方:

一、RunMailQuest.pas

增加如下代码:

if This_Player.GetEquipmentBreakLevel(1, false) > 0 then
begin
This_Player.PlayerNotice('FM='+inttostr(splitInt(This_Player.GetEquipmentBreakLevel(1, false),1))+':'+inttostr(splitInt(This_Player.GetEquipmentBreakLevel(1,false), 2) * 2),2);
end else
This_Player.PlayerNotice('FM=0',2);

具体来说,客户端感知的指令就是 FM=key:value

比如,附魔id为5,值为10,则下发指令为

FM=5:10

注意,value是非必填的。这个value可以在客户端直接展示出来。

需要将splitInt函数,增加到RunMailQuest里。

function splitInt(value, idx:integer):integer;
var
   outINum: array[1..2] of integer;
begin
    if length(inttostr(value)) < idx then
begin
    result := 0;
exit;
    end;
if length(inttostr(value)) = 1 then
begin
    result := value;
exit;
end
else
    OutINum[1] := value div 10;
    OutINum[2] := value mod 10;
    result := OutINum[idx];
exit;
end;

二、RunQuest.pas

在盘古穿戴触发中,增加如下代码:

if This_Player.GetEquipmentBreakLevel(1,false) > 0 then
begin
This_Player.PlayerNotice('FM='+inttostr(splitInt(This_Player.GetEquipmentBreakLevel(1,false),1))+':'+inttostr(splitInt(This_Player.GetEquipmentBreakLevel(1,false), 2) * 2),2);
end else
This_Player.PlayerNotice('FM=0',2);

代码逻辑和RunMailQuest里一样

三、武器附魔npc文件

找到函数:SetWeaponBreakLevel

大概在第 169 行插入如下代码:

This_Player.PlayerNotice('FM='+inttostr(splitInt(BuffPoint, 1))+':'+inttostr(splitInt(BuffPoint, 2) * 2),2);

客户端配置

客户端主要通过修改 buff.json 实现展示

"breaklevel_Show": {
"title": "[附魔属性]",
"[木剑][乌木剑]": {
"BL_1": "buff$6$0.8$☆附魔☆{v1}%几率增加自身50%生命值10秒(30秒冷却)@215",
"BL_2": "buff$7$0.8$☆附魔☆{v1}%几率提高自身50%双抗8秒(30秒冷却)@215",
"BL_3": "buff$8$0.8$☆附魔☆{v1}%几率使敌人持续流血5秒(60秒冷却)@215",
"BL_4": "buff$8$0.8$☆附魔☆{v1}%几率死亡原地复活(无冷却)@215",
"BL_5": "buff$8$0.8$☆附魔☆{v1}%几率使敌人红名(120秒冷却)@215",
"BL_6": "buff$8$0.8$☆附魔☆{v1}%几率使敌人武器报废(120秒冷却)@215",
"BL_7": "buff$8$0.8$☆附魔☆{v1}%几率使敌人定身3秒(60秒冷却)@215",
"BL_8": "buff$8$0.8$☆附魔☆{v1}%几率免疫一切伤害3秒(60秒冷却)@215",
"BL_9": "buff$8$0.8$☆附魔☆{v1}%几率提高自身1.1倍伤害持续8秒(60秒冷却)@215"
}
},

title:为表示,可以增加 @色彩值

BL_1:下划线后的数字代表烈阳的附魔值

{v1}:表示烈阳附魔value值,与服务端下发的指令对应

物品可以配置多个,每个物品名称用 [] 括号括起来,表示一件物品