黑墨制作的用于战神引擎幸运武器保底恢复Npc脚本。默认消费元宝,单NPC文件,直接添加就行。你们在添加的时候,记得把脚本里面的武器清单换成自己版本里面的。脚本是明文版的,可以任意修改里面消耗元宝的数量。

部分脚本
begin
for ck_kind := 5 to 8 do
begin
if ck_name[ck_kind] = This_Item.ItemName then
begin
ck_num := This_Item.AddPa1; //道术+1
ck_gold := ck_value[ck_kind];
if (ck_num > 7) and (ck_num > 7) then
begin
for i:= 1 to ck_num do
begin
ck_gold := ck_gold*2;
end;
end;
end;
end;
if (This_Item.AddPa4 > 6 )and (This_Player.getv(88,4)= 5) then
begin
This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'成功!5!');
end else
if ck_gold > 0 then
begin
if This_Player.YBNum >= 5 then
begin
ck_rand := random(100);
if ck_rand < 0 then begin This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化'); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'待升级武器:'); end else if ck_rand > 0 then
begin
This_Item.AddPa2 := 10; //幸运+1
This_Item.AddPa3 := 0; //幸运+1
This_Item.AddPa1 := 0; //幸运+1
This_Item.AddPa4 := 7; //幸运+1
ck_str :='道术+1';
ck_red :='红字公告';
This_NPC.Click_CommitItem(This_Player,1,'待升级武器:');
This_Player.ScriptRequestSubYBNum(5);
end;
if ck_str <> '' then
begin
This_Player.NotifyClientCommitItem(0,'成功!');
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'成功!!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级武器:');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足。');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可正确的装备!');
end;
end else
if (This_Player.getv(88,4)= 6 ) and (This_Player.YBNum >= 5) and (This_Item.AddPa1 > 7) then
begin
for ck_kind := 9 to 12 do
begin
This_Player.setv(88,1,6);
if ck_name[ck_kind] = This_Item.ItemName then
begin
ck_num := This_Item.AddPa2;
ck_gold := ck_value[ck_kind];
if (ck_num > 7) and (ck_num > 7) then
begin
for i:= 1 to ck_num do
begin
ck_gold := ck_gold*2;
end;
end;
end;
end;
if (This_Item.AddPa4 > 6 )and (This_Player.getv(88,4)= 6) then
begin
This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'成功!6!');
end else
if ck_gold > 0 then
begin
if This_Player.YBNum >= 5 then
begin
ck_rand := random(100);
if ck_rand < 0 then begin This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化'); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'待升级武器:'); end else if ck_rand > 0 then
begin
This_Item.AddPa1 := 10; //幸运+1
This_Item.AddPa3 := 0; //幸运+1
This_Item.AddPa2 := 0; //幸运+1
This_Item.AddPa4 := 7; //幸运+1
ck_str :='幸运+1';
ck_red :='红字公告';
This_NPC.Click_CommitItem(This_Player,1,'待升级武器:');
This_Player.ScriptRequestSubYBNum(5);
end;
if ck_str <> '' then
begin
This_Player.NotifyClientCommitItem(0,'成功!');
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'成功!!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级武器:');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足。');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可正确的装备!');
end;
end;
end;
function xin(price, num: Integer):boolean;
begin
result := true;
end;
begin
This_Player.SetWeaponLucky(1,false);
This_Npc.NpcDialog(This_Player,
'<保存运7武器/c=red>,<幸运7武器花20元宝保存/SCOLR=253>\'
+'|<恢复幸运7/c=red>,<保存后花5元宝恢复/SCOLR=253>\'
+'|{cmd}<战士保底幸运/@Checkup_1> ^<战士恢复幸运7/@Checkup_4>\'
+'|{cmd}<道士保底幸运/@Checkup_2> ^<道士恢复幸运7/@Checkup_5>\'
+'|{cmd}<法师保底幸运/@Checkup_3> ^<法师恢复幸运7/@Checkup_6>\'
);
end.








