专属行会捐献Npc脚本(得倍攻属性+地图)

用于战神引擎的专属行会捐献Npc脚本,捐献的玩家必须要已经创建或者参加了行会才行,捐献默认是用充值点,并不是元宝什么的。捐献以后,可以领取倍攻属性,并且进入专属捐献地图,脚本是明文版的,可以任意修改捐献的条件和货币,还有地图号、坐标等信息。行会捐献.txt文件放到D:\mud2.0\Mir200\Share\config文件夹下面。

专属行会捐献Npc脚本(得倍攻属性+地图)

部分脚本

program Mir2;
{$I gaojishuxing.pas}
{$I fh.pas}
Const FMNO1 = 30;    //第一名防御魔防
      GJNO1 = 5;     //第一名攻魔道
      FMNO2 = 10;    //第二名防御魔防
procedure _exit;
begin
	This_Npc.CloseDialog(This_Player);
end;
procedure _domain;
var i,j,x,temp:integer;
temp_str,show_p_name,show_yb_num,show_str,GM_str:string;
rankName : Array [1..100] of String;
rankYb:Array [1..100] of Integer;
begin
	for i:=1 to 100 do
	begin		
		if ReadIniSectionStr('行会捐献.txt','捐献列表',inttostr(i)) <> '' then
		begin
		show_p_name:=ReadIniSectionStr('行会捐献.txt','捐献列表',inttostr(i));
		show_yb_num:=ReadIniSectionStr('行会捐献.txt','行会捐献',show_p_name);
		rankYb[i]:=strtoint(show_yb_num); 
		rankName[i]:=show_p_name;	
		end
		else
		break;
	end
	
	if show_p_name <> '' then
	begin
		for i:=1 to 100 do
		begin
			
			if rankYb[i] <= 0 then
			break;
			for j:=1 to 100 do
			begin	
			x:=j+1;
			
			if (rankYb[j] <= 0) or (rankYb[x] <= 0) then
			break;
				if (rankYb[j] < rankYb[x]) and (rankYb[x] > 0) then	
				begin
					
					temp := rankYb[j];
					rankYb[j] := rankYb[x];
					rankYb[x] := temp;
					temp_str:=rankName[j];
					rankName[j] := rankName[x];
					rankName[x] := temp_str;
					
				end
			end
		end
	end
	for i:=1 to 6 do
	begin		
		if rankName[i] = '' then
		begin
		temp_str:='|第< '+inttostr(i)+' >名:<虚位已待/fcolor=7>';
		end
		else		
		temp_str:='|第< '+inttostr(i)+' >名:<' + rankName[i] + ' /fcolor=251>^<' + inttostr(rankYb[i])+'/fcolor=250>^';	
		
		show_str:=show_str+temp_str;
	end
	if rankName[1] <> '' then WriteIniSectionStr('行会捐献.txt','捐献排名','1',rankName[1]);
	if rankName[2] <> '' then WriteIniSectionStr('行会捐献.txt','捐献排名','2',rankName[2]);
	if rankName[3] <> '' then WriteIniSectionStr('行会捐献.txt','捐献排名','3',rankName[3]);
	if rankName[4] <> '' then WriteIniSectionStr('行会捐献.txt','捐献排名','4',rankName[4]);
	if rankName[5] <> '' then WriteIniSectionStr('行会捐献.txt','捐献排名','5',rankName[5]);
	
	if This_Player.GMLevel >= 5 then GM_str:='1:Cmd:480:330:16:@252:GM一键清理@GMPage|';	
	This_Npc.NpcDialog(This_Player,
   'Bg:juanxian:37|'+	
   'Exit:juanxian:38:38:610:55|'+
   '1:Spr:juanxian:1:30:180:230:0.1:1|'+  
   '1:Text:450:170:14:行会排名      倍攻属性      捐献数量      行会名字@251|'+  
   '1:Text:440:190:14:第'+inttostr(1)+'名:          1.5倍            '+inttostr(rankYb[1])+'            '+rankName[1]+'@94|'+   
   '1:Text:440:210:14:第'+inttostr(2)+'名:          1.4倍            '+inttostr(rankYb[2])+'            '+rankName[2]+'@94|'+  	
   '1:Text:440:230:14:第'+inttostr(3)+'名:          1.3倍            '+inttostr(rankYb[3])+'            '+rankName[3]+'@94|'+  	   
   '1:Text:440:250:14:第'+inttostr(4)+'名:          1.2倍            '+inttostr(rankYb[4])+'            '+rankName[4]+'@94|'+  	
   '1:Text:440:270:14:第'+inttostr(5)+'名:          1.1倍            '+inttostr(rankYb[5])+'            '+rankName[5]+'@94|'+ 	
   '1:Text:430:320:14:捐献第一名行会全体成员可进入专属地图@251|'+     
   '1:RCmd:340:380:16:@252:捐献充值点@StarDona|'+   
   '1:RCmd:430:380:16:@252:领取属性@DonaAbil|'+	   
   '1:RCmd:530:380:16:@252:专属地图@GoGuildMap|'+	   
   ''+GM_str+''+	   
	'{cmd}</@StarDona></@DonaAbil></@GoGuildMap></@GMPage>');
end;
分享到:
赞(0)