战神引擎武器升级20点失败1点完美Npc脚本

整理: 黑墨,qq :1797962565,用于战神引擎武器升级20点失败1点完美Npc脚本。

部分脚本

     if ck_num > 6 then
     begin
     This_Player.NotifyClientCommitItem(0,'无法升级:你的'+This_Item.ItemName+'已激发出所有属性!');  
     end else
     if ck_gold > 0 then
     begin                                                                                             
       if This_Player.GoldNum >= ck_gold then
       begin
         ck_rand := random(100);
         if ck_rand < 80 then begin if This_Item.AddPa3 > 0 then This_Item.AddPa3 := This_Item.AddPa3 - 1;   //1 
       if This_Item.AddPa3 > 0 then This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性降低1点');
	   if This_Item.AddPa3 = 0 then This_Player.NotifyClientCommitItem(0,'升级失败,你的武器属性未发生变化');
         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
         This_NPC.Click_CommitItem(This_Player,1,'待升级武器:'); 
                           This_Player.DecGold(ck_gold);  
         end else
         if ck_rand < 100 then
         begin 
         This_Item.AddPa3 := This_Item.AddPa3 + 1;   //道术+1 
                           This_Player.DecGold(ck_gold);  
         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
//if This_Player.GMLevel > 0 then
//begin
  This_Npc.NpcDialog(This_Player,
 '|‘<沃玛武器、祖玛武器、终极系列/c=180> 成功率:<%20/c=249>’ \ \'+
   '|<升级条件/SCOLOR=223>:<第1点10万金币,依次升级翻倍扣费/SCOLOR=70>\'+
   '|<升级失败/SCOLOR=223>:<武器属性降低1点,最多升级20点/SCOLOR=70>\'+  
  +'|<注意:每次升级间隔时间请大于5秒!!/c=245>\'
    +'|<注意:否则会出现点击多次没反映!!/c=245>\'
  +'|{cmd}<升级攻击/@Checkup_1>    ^<升级魔法/@Checkup_2>    ^<升级道术/@Checkup_3>\'
  +'|{cmd}<关闭/@doexit>\'   
  );
 //end; 
end.
分享到:
赞(0)