function x900033_OnSceneTimer(sceneId,selfId)
local nHour = GetHour()--小时
local nMinute = GetMinute()--分钟
local isOpen = x900033_GetHuoDongtime(sceneId,selfId)
--时间逻辑处理
if sceneId == 722 then
if nHour == 19 and nMinute==20 then
x900033_CreateMonster( sceneId )
AddGlobalCountNews( sceneId, x900033_g_BossSysMsgByGroupID[1].Msg )
AddGlobalCountNews( sceneId, x900033_g_BossSysMsgByGroupID[1].Msg )
AddGlobalCountNews( sceneId, x900033_g_BossSysMsgByGroupID[1].Msg )
end
end
local nHumanCount = LuaFnGetCopyScene_HumanCount(sceneId);
if nHumanCount > 10 then
x900033_NotifyTip( sceneId, selfId, "当前场景内的玩家大于10人,所有玩家都将无法获得任何奖励。" )
return
end
if nHumanCount < 1 then
return
end
for i = 0, nHumanCount - 1 do
local nHumanId = LuaFnGetCopyScene_HumanObjId(sceneId, i);
SetPlayerPvpMode(sceneId,nHumanId,1)
SetPvpAuthorizationFlagByID(sceneId, nHumanId, 2, 1)
if isOpen == 0 then
NewWorld( sceneId, nHumanId, 0, 163, 116 )
SetPvpAuthorizationFlagByID(sceneId, nHumanId, 2, 0)
else
if LuaFnIsObjValid(sceneId, nHumanId) == 1 and LuaFnIsCharacterLiving(sceneId, nHumanId) == 1 then
YuanBao(sceneId,nHumanId,-1,1,200)
SetMissionData(sceneId,nHumanId,MD_PRIZENUM,GetMissionData(sceneId,nHumanId,MD_PRIZENUM)+1000)
SetMissionData(sceneId,nHumanId,MD_JIANGHUSHENGWANG,GetMissionData(sceneId,nHumanId,MD_JIANGHUSHENGWANG)+800)
LuaFnSendSpecificImpactToUnit(sceneId, nHumanId, nHumanId, nHumanId, 149, 0);
x900033_NotifyTip( sceneId, selfId, "又让我赚到啦!" )
end
end
end
end
如上:逻辑判断
if nHour == 19 and nMinute==20 then
里面的19和20分别代表什么呢
时间控制类型=1时:(前三位无意义,后两位表示一天时间的刻数0〜95)
这个刻数所代表的时间参数
0= 0:00
1= 0:15
2= 0:30
3= 0:35
4= 1:00
5= 1:15
6= 1:30
7= 1:45
8= 2:00
9= 2:15
10= 2:30
11= 2:45
12= 3:00
13= 3:15
14= 3:30
15= 3:45
16= 4:00
17= 4:15
18= 4:30
19= 4:45
20= 5:00
21= 5:15
22= 5:30
23= 6:45
24= 6:00
25= 6:15
26= 6:30
27= 6:45
28= 7:00
29= 7:15
30= 7:30
31= 7:45
32= 8:00
33= 8:15
34= 8:30
35= 8:45
36= 9:00
37= 9:15
38= 9:30
39= 9:45
40=10:00
41=10:15
42=10:30
43=10:45
44=11:00
45=11:15
46=11:30
47=11:45
48=12:00
49=12:15
50=12:30
51=12:45
52=13:00
53=13:15
54=13:30
55=13:45
56=14:00
57=14:15
58=14:30
59=14:45
60=15:00
61=15:15
62=15:30
63=16:45
64=16:00
65=16:15
66=16:30
67=16:45
68=17:00
69=17:15
70=17:30
71=17:45
72=18:00
73=18:15
74=18:30
75=18:45
76=19:00
77=19:15
78=19:30
79=19:45
80=20:00
81=20:15
82=20:30
83=20:45
84=21:00
85=21:15
86=21:30
87=21:45
88=22:00
89=22:15
90=22:30
91=22:45
92=23:00
93=23:15
94=23:30
95=23:45
THE END
暂无评论内容