聚灵珠(大+中+小)兑换英雄经验脚本

用于战神引擎的聚灵珠兑换经验脚本,支持大+中+小三种类型的聚灵珠,兑换以后,可以直接吃掉给英雄增加经验值,脚本文件是单文本,添加起来非常的简单。

聚灵珠(大+中+小)兑换英雄经验脚本

聚灵珠(大+中+小)兑换英雄经验脚本

聚灵珠(大+中+小)兑换英雄经验脚本

部分脚本

program Mir2;
procedure _DoExit;
begin
  This_Npc.CloseDialog(This_Player);
end;
 procedure _dhd;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 1) then
   begin
        This_Player.Take('聚灵珠(大)',1);
        This_Player.Give('英雄聚灵珠(大)',1);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要1个聚灵珠(大)!'); 
  end;
 procedure _dhd1;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 1) then
   begin
        This_Player.Take('聚灵珠(大)',1);
        This_Player.Give('英雄聚灵珠(大)',1);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要1个聚灵珠(大)!'); 
  end;
   procedure _dhd2;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 2) then
   begin
        This_Player.Take('聚灵珠(大)',2);
        This_Player.Give('英雄聚灵珠(大)',2);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要2个聚灵珠(大)!'); 
  end;
   procedure _dhd5;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 5) then
   begin
        This_Player.Take('聚灵珠(大)',5);
        This_Player.Give('英雄聚灵珠(大)',5);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要5个聚灵珠(大)!'); 
  end;
   procedure _dhd10;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 10) then
   begin
        This_Player.Take('聚灵珠(大)',10);
        This_Player.Give('英雄聚灵珠(大)',10);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要10个聚灵珠(大)!'); 
  end; 
   procedure _dhd20;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 20) then
   begin
        This_Player.Take('聚灵珠(大)',20);
        This_Player.Give('英雄聚灵珠(大)',20);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要20个聚灵珠(大)!'); 
  end;   
    procedure _dhd50;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(大)') >= 50) then
   begin
        This_Player.Take('聚灵珠(大)',50);
        This_Player.Give('英雄聚灵珠(大)',50);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(大)不够,至少需要50个聚灵珠(大)!'); 
  end;  
 procedure _jlzd;
 begin
   This_Npc.NpcDialog(This_Player,
   '|少侠,如果你手上有<聚灵珠(大)/c=red>\'+
   '|我可以免费帮你兑换成<英雄聚灵珠(大)/c=red>\'+
   '|{cmd}<【兑换1个】/@dhd1><【兑换2个】/@dhd2>\' +
   '|                  \'+
   '|{cmd}<【兑换5个】/@dhd5><【兑换10个】/@dhd10>\' +
   '|                  \'+
   '|{cmd}<【兑换20个】/@dhd20><【兑换50个】/@dhd50>\' +
   '|                  \'
    ); 
end; 
  procedure _dhz1;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 1) then
   begin
        This_Player.Take('聚灵珠(中)',1);
        This_Player.Give('英雄聚灵珠(中)',1);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要1个聚灵珠(中)!'); 
  end;
   procedure _dhz2;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 2) then
   begin
        This_Player.Take('聚灵珠(中)',2);
        This_Player.Give('英雄聚灵珠(中)',2);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要2个聚灵珠(中)!'); 
  end;
   procedure _dhz5;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 5) then
   begin
        This_Player.Take('聚灵珠(中)',5);
        This_Player.Give('英雄聚灵珠(中)',5);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要5个聚灵珠(中)!'); 
  end;
   procedure _dhz10;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 10) then
   begin
        This_Player.Take('聚灵珠(中)',10);
        This_Player.Give('英雄聚灵珠(中)',10);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要10个聚灵珠(中)!'); 
  end; 
  procedure _dhz20;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 20) then
   begin
        This_Player.Take('聚灵珠(中)',20);
        This_Player.Give('英雄聚灵珠(中)',20);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要20个聚灵珠(中)!'); 
  end;  
    procedure _dhz50;
 begin
 if (This_Player.GetBagItemCount ('聚灵珠(中)') >= 50) then
   begin
        This_Player.Take('聚灵珠(中)',50);
        This_Player.Give('英雄聚灵珠(中)',50);
    end
	else
        This_NPC.NpcDialog(This_Player,
		'你的聚灵珠(中)不够,至少需要50个聚灵珠(中)!'); 
  end;
分享到:
赞(1)