用于战神引擎的勋章合成Npc脚本,脚本是单文件的,添加起来非常的简单,合成的过程中需要扣除玩家身上的元宝和声望,把勋章放到背包里面就行,脚本是明文版的,可以任意修改里面合成的物品、扣除货币的数量等。

部分脚本
procedure _hecheng(lv:string);
begin
//strtoint(lv);
if strtoint(lv) = 1 then begin
if (This_Player.YBNum >= strtoint(yb(strtoint(lv)))) and (This_Player.MyShengwan>= strtoint(jgs(strtoint(lv)))) then begin
This_Player.ScriptRequestSubYBNum(strtoint(yb(strtoint(lv))));
//This_Player.Take('勋章碎片',strtoint(suipian(strtoint(lv))));
This_Player.MyShengwan := This_Player.MyShengwan - strtoint(jgs(strtoint(lv)));
This_Player.Give(dengji(strtoint(lv)),1);
This_Player.PlayerNotice('恭喜您,成功合成'+dengji(strtoint(lv)),2);
domain;
end else This_Player.PlayerNotice('对不起,材料不足无法合成',2);
end else begin
if (This_Player.YBNum >= strtoint(yb(strtoint(lv)))) and (This_Player.MyShengwan>= strtoint(jgs(strtoint(lv)))) and (This_Player.GetBagItemCount(dengji(strtoint(lv)-1))>= 1) then begin
This_Player.ScriptRequestSubYBNum(strtoint(yb(strtoint(lv))));
//This_Player.Take('勋章碎片',strtoint(suipian(strtoint(lv))));
This_Player.MyShengwan := This_Player.MyShengwan - strtoint(jgs(strtoint(lv)));
This_Player.Take(dengji(strtoint(lv)-1),1);
This_Player.Give(dengji(strtoint(lv)),1);
This_Player.PlayerNotice('恭喜您,成功合成'+dengji(strtoint(lv)),2);
domain;
end else This_Player.PlayerNotice('对不起,材料不足无法合成',2);
end;
end;
procedure _buysuipian;
begin
This_NPC.NpcDialog(This_Player,
'| <★/fcolor=69> <★/fcolor=222> <★/fcolor=147> <【'+'血量勋章'+'/fcolor=5><】/fcolor=5> <★/fcolor=147> <★/fcolor=222> <★/fcolor=69>\'
+'|<【费用】:每个碎片1万元宝/fcolor=249>\'
+'|{cmd}<购买10个碎片/@buy~10> \'
+'|{cmd}<购买50个碎片/@buy~50> \'
+'|{cmd}<购买100个碎片/@buy~100> \'
);
end;
procedure _buy(sum : string);
begin
if (This_Player.YBNum >= strtoint(sum)*10000) then begin
This_Player.ScriptRequestSubYBNum(strtoint(sum)*10000);
This_Player.PlayerNotice('恭喜您,成功合成购买'+sum+'个勋章碎片',2);
This_Player.Give('勋章碎片',strtoint(sum));
end else This_Player.PlayerNotice('对不起,元宝不足无法购买',2);
end;
Begin
domain;
end.








