--meceniy_work.mainc() --/сон НПс
meceniy_work.mains() --/обьекты
meceniy_work.mainw() --/Зомбирование
end
и для уверенности в meceniy_work.script вот так:
-------------------------------------
--Сон НПС(попытатся уменьшить время сна)
-------------------------------------
--function mainc()
--npc_sleep()
--end
--function npc_sleep()
--local htime = level.get_time_hours()
--local mtime = level.get_time_minutes()
--local Shans = 0.85
--if ((htime > 1) and (htime < 6)) then
--for id=1,65535 do
--local npc = level.object_by_id(id)
--if npc ~= nil and npc:alive() == true and IsStalker(npc) then
--state_mgr.set_state(npc, "sleep", nil, nil, {look_position = position})
--end
--end
--end
--for id=1,65535 do
--local npc = level.object_by_id(id)
--if npc ~= nil and npc:alive() == true and IsStalker(npc) then
-- if ((htime == 0) and (mtime>7)) then
--state_mgr.set_state(npc, "sleep_sit", nil, nil, {look_position = position})
--end
--if ((htime == 6) and (mtime<8)) then
--state_mgr.set_state(npc, "sleep", nil, nil, {look_position = position})
--end
--end
--end
--end
meceniy_work.mains() --/обьекты
meceniy_work.mainw() --/Зомбирование
end
и для уверенности в meceniy_work.script вот так:
-------------------------------------
--Сон НПС(попытатся уменьшить время сна)
-------------------------------------
--function mainc()
--npc_sleep()
--end
--function npc_sleep()
--local htime = level.get_time_hours()
--local mtime = level.get_time_minutes()
--local Shans = 0.85
--if ((htime > 1) and (htime < 6)) then
--for id=1,65535 do
--local npc = level.object_by_id(id)
--if npc ~= nil and npc:alive() == true and IsStalker(npc) then
--state_mgr.set_state(npc, "sleep", nil, nil, {look_position = position})
--end
--end
--end
--for id=1,65535 do
--local npc = level.object_by_id(id)
--if npc ~= nil and npc:alive() == true and IsStalker(npc) then
-- if ((htime == 0) and (mtime>7)) then
--state_mgr.set_state(npc, "sleep_sit", nil, nil, {look_position = position})
--end
--if ((htime == 6) and (mtime<8)) then
--state_mgr.set_state(npc, "sleep", nil, nil, {look_position = position})
--end
--end
--end
--end
ни фига в этом не пойму посоветуйте как всех разбудить