装备强化脚本(升级首饰攻击+魔法+道术)

用于战神引擎的装备强化脚本,玩家可以通过NPC脚本,升级首饰的攻击、魔法、道术等属性,脚本默认有6个装备名单,升级需要元宝,你们可以根据自己的需求,任意修改里面升级物品的名单和升级所需要的元宝数量。装备强化脚本(升级首饰攻击+魔法+道术)

部分脚本

procedure _Checkup_1;
begin
   This_Player.setv(88,1,1);
   This_Player.setv(88,2,0);
   This_Player.setv(88,3,0);
   This_Player.setv(88,4,0); 
   This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
end; 
procedure _Checkup_2;
begin
   This_Player.setv(88,1,0);
   This_Player.setv(88,2,1);
   This_Player.setv(88,3,0);
   This_Player.setv(88,4,0);
   This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
end; 
procedure _Checkup_3;
begin
   This_Player.setv(88,1,0);
   This_Player.setv(88,2,0);
   This_Player.setv(88,3,1);
   This_Player.setv(88,4,0);
   This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
end; 
procedure _Checkup_4;
begin
   This_Player.setv(88,1,0);
   This_Player.setv(88,2,0);
   This_Player.setv(88,3,0);
   This_Player.setv(88,4,1);
   This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
end; 
procedure CommitItem(AType:word);
var
i,ck_num,ck_kind,ck_gold,ck_rand:integer; 
ck_str,ck_red:string;
begin
     ck_gold := 0;  //初始化 
     ck_str := '';  //初始化
     ck_red := '';  //初始化
   if This_Player.getv(88,1)= 1 then 
   begin 
    for ck_kind := 1 to 300 do
     begin
       if ck_name[ck_kind] = This_Item.ItemName then 
       begin                             
         ck_num := This_Item.AddPa3; 
         ck_gold := ck_value[ck_kind];
         if (ck_num > 0) and (ck_num < 5) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end; if ck_num > 9 then
     begin
     This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'已激发出所有属性!');  
     end else
     if ck_gold > 0 then
     begin                                                                                             
       if This_Player.YBNum >= ck_gold then
       begin
         ck_rand := random(100);
         if ck_rand < 50 then
         begin 
         This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         end else
         if ck_rand < 100 then
         begin 
         This_Item.AddPa3 := This_Item.AddPa3 + 1;   //攻击+1 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         ck_str :='攻击+1'; 
         ck_red :='红字公告';
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;  
         if ck_str <> '' then 
         begin
         This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升了'+ck_str+'!');
         This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'时提升了'+ck_str+'!');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;   
       end else
       begin
       This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。'); 
       end;
     end else 
     begin
        This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!');   
     end;
   end else  
   if This_Player.getv(88,2)= 1 then 
   begin 
    for ck_kind := 1 to 300 do
     begin
       if ck_name[ck_kind] = This_Item.ItemName then 
       begin                             
         ck_num := This_Item.AddPa4; 
         ck_gold := ck_value[ck_kind];
         if (ck_num > 0) and (ck_num < 5) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end; if ck_num > 9 then
     begin
     This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'已激发出所有属性!');  
     end else
     if ck_gold > 0 then
     begin                                                                                             
       if This_Player.YBNum >= ck_gold then
       begin
         ck_rand := random(100);
         if ck_rand < 50 then
         begin 
         This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         end else
         if ck_rand < 100 then
         begin 
         This_Item.AddPa4 := This_Item.AddPa4 + 1;   //魔法+1 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         ck_str :='魔法+1'; 
         ck_red :='红字公告';
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;  
         if ck_str <> '' then 
         begin
         This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升了'+ck_str+'!');
         This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'时提升了'+ck_str+'!');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;   
       end else
       begin
       This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。'); 
       end;
     end else 
     begin
        This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!');   
     end; 
   end else  
   if This_Player.getv(88,3)= 1 then 
   begin 
    for ck_kind := 1 to 300 do
     begin
       if ck_name[ck_kind] = This_Item.ItemName then 
       begin                             
         ck_num := This_Item.AddPa5; //道术+1 
         ck_gold := ck_value[ck_kind];
         if (ck_num > 0) and (ck_num < 5) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end; if ck_num > 9 then
     begin
     This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'已激发出所有属性!');  
     end else
     if ck_gold > 0 then
     begin                                                                                             
       if This_Player.YBNum >= ck_gold then
       begin
         ck_rand := random(100);
         if ck_rand < 50 then
         begin 
         This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         end else
         if ck_rand < 100 then
         begin 
         This_Item.AddPa5 := This_Item.AddPa5 + 1;   //道术+1 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         ck_str :='道术+1'; 
         ck_red :='红字公告';
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;  
         if ck_str <> '' then 
         begin
         This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升了'+ck_str+'!');
         This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'时提升了'+ck_str+'!');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;   
       end else
       begin
       This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。'); 
       end;
     end else 
     begin
        This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!');   
     end; 
   end else  
   if This_Player.getv(88,4)= 1 then 
   begin 
    for ck_kind := 1 to 300 do
     begin
       if ck_name[ck_kind] = This_Item.ItemName then 
       begin                             
         ck_num := This_Item.AddPa4; 
         ck_gold := ck_value[ck_kind];
         if (ck_num > 0) and (ck_num < 5) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end; if ck_num > 9 then
     begin
     This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'已激发出所有属性!');  
     end else
     if ck_gold > 0 then
     begin                                                                                             
       if This_Player.YBNum >= ck_gold then
       begin
         ck_rand := random(100);
         if ck_rand < 100 then
         begin 
         This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         end else
         if ck_rand < 100 then
         begin 
         This_Item.AddPa4 := This_Item.AddPa4 + 1;   //幸运+1 
         This_Player.PsYBConsum(This_NPC,'xin',20150,ck_gold,1);
         ck_str :='幸运+1'; 
         ck_red :='红字公告';
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;  
         if ck_str <> '' then 
         begin
         This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升了'+ck_str+'!');
         This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在武器升级'+This_Item.ItemName+'时提升了'+ck_str+'!');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'请把首饰拖入:'); 
         end;   
       end else
       begin
       This_Player.NotifyClientCommitItem(0,'无法升级:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。'); 
       end;
     end else 
     begin
        This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!');   
     end;
   end;
end;
function xin(price, num: Integer):boolean; 
begin
   result := true; 
end;
begin
  This_Npc.NpcDialog(This_Player,
   '|可以强化以下首饰 衣服 靴子 腰带及元宝费用:\'+
   '|<荣耀 300 虎威 500 主宰 800/c=254> \'+
   '|<传奇 1500 玉兔 2200 刺影 3000/c=254> \'+
   '|<夺命 5000 追魂 8000 化圣(神)10000/c=254> \'+
   '|属性越高成功几率越低: <提升攻魔道/c=253> \'+
   '|<可以提升攻, 魔, 道最高+10/c=254> \'+
   '|<注意: 每次强化间隔时间请大于5秒/>\'+
   '|<注意: ★请强化到8以下 否则装备绑定用不成★>\'+
   '|<注意: ★强化过头★装备用不成★后果自负★ >\'+
   '|<注意: ★出现装备绑定 请勿找客服 无法解绑★ >\'+
   '|<注意: 建议强化到6,项链建议强化到5/c=250> \'+
  +'|{cmd}<升级攻击/@Checkup_1><升级魔法/@Checkup_2><升级道术/@Checkup_3>  \'
  );
end.
分享到:
赞(0)