用于战神引擎的积分兑换+元宝购买Npc脚本。脚本支持积分兑换,如果没有积分的时候,可以使用元宝直接购买,脚本是明文版的,默认积分是读取充值点的。可以根据自己的要求,任意修改里面的商品内容和购买金额等。自定义NPC素材在public文件,需要自己提取对应的素材。这边没有没有单独整理出来,有点费时间。

部分脚本
procedure _jia;
begin
This_Player.SetV(222,10,This_Player.GetV(222,10)+1);
doMain;
end;
procedure _jian;
begin
This_Player.SetV(222,10,This_Player.GetV(222,10)-1);
doMain;
end;
procedure _jif;
begin
if This_Player.GetV(222,10) > 0 then
begin
if This_Player.MyLFnum >= (This_Player.GetV(222,10)*10) then
begin
This_Player.Give('魂骨碎片',This_Player.GetV(222,10));
This_Player.DecLF(0, This_Player.GetV(222,10)*10, false);
//This_Player.SetV(222,10,1);
ServerSay('恭喜玩家【' + This_Player.Name + '】在积分兑换使用充值积分成功购买魂骨碎片!!',2);
doMain;
end else
This_Npc.NpcDialog(This_Player,
' 对不起你的充值积分不足['+inttostr(This_Player.GetV(222,10)*10)+']个。|'+
'|{cmd} <返回/@main>'
);
end else
This_Npc.NpcDialog(This_Player,
' 对不起你输入的购买数量小于1。|'+
'|{cmd} <返回/@main>'
);
end;
procedure _ybg;
begin
if This_Player.GetV(222,10) > 0 then
begin
if This_Player.YBNum >= (This_Player.GetV(222,10)*2000) then
begin
This_Player.Give('魂骨碎片',This_Player.GetV(222,10));
This_Player.ScriptRequestSubYBNum(This_Player.GetV(222,10)*2000);
//This_Player.SetV(222,10,1);
ServerSay('恭喜玩家【' + This_Player.Name + '】在积分兑换使用元宝成功购买魂骨碎片!!',2);
doMain;
end else
This_Npc.NpcDialog(This_Player,
' 对不起你的元宝不足['+inttostr(This_Player.GetV(222,10)*2000)+']个。|'+
'|{cmd} <返回/@main>'
);
end else
This_Npc.NpcDialog(This_Player,
' 对不起你输入的购买数量小于1。|'+
'|{cmd} <返回/@main>'
);
end;
procedure _jiaa;
begin
This_Player.SetV(222,20,This_Player.GetV(222,20)+1);
doMain;
end;
procedure _jiana;
begin
This_Player.SetV(222,20,This_Player.GetV(222,20)-1);
doMain;
end;








