战神引擎开区等待脚本(任意设置开区时间)

战神引擎开区等待脚本

战神引擎开区等待脚本(任意设置开区时间)

program mir2;

procedure _letgo;

var i:integer;

begin


   i := Random(5);

    This_Player.Flyto('3', 330+i, 330+i);

This_Player.ScriptRequestAddYBNum(5);

end;



procedure _waiting;

var

Y,M,D,H,Min: integer;

begin

Y:=GetG(7,1);//开区年

M:=GetG(7,2);//开区月

D:=GetG(7,3);//开区日

H:=GetG(7,4);//小时

Min:=GetG(7,5);//分钟


if GetYear > Y then

begin

_letgo;

end else

begin

if (GetYear = Y) and (GetMonth > M) then

begin

_letgo;

end else

begin

if (GetMonth = M) and (GetDay > D) then

begin

_letgo;

end else

begin

if GetDay = D then

begin

if (GetHour > H ) or ((GetHour = H) and (GetMin >= Min)) then

begin

_letgo;

end else

begin

This_Npc.NpcDialog(This_Player,'还没到开区时间,再等等吧!');

This_Player.PlayerNotice('本服将于'+inttostr(M)+'月'+inttostr(D)+'号'+inttostr(H)+'点'+inttostr(Min)+'分正式开区,届时你才可以离开,请耐心等待!', 0);

end

end else

begin

This_Npc.NpcDialog(This_Player,'还没到开区时间,再等等吧!');

This_Player.PlayerNotice('本服将于'+inttostr(M)+'月'+inttostr(D)+'号'+inttostr(H)+'点'+inttostr(Min)+'分正式开区,届时你才可以离开,请耐心等待!', 0);

end

end

end

end

end;