function mini_create()
  init_mini(true)
  create_mini(8128);
end

miniCreate()
speciale_action(4,25)
for i=30,42 do
  speciale_action(4,i)
end

local n = 0

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID) then
    return
  end
  if sender==1 then
    if obj_id >=13 and obj_id <= 24 then
      playeffect("otlichie")
      speciale_action(2,obj_id-12,true,0.2)
      ActivateObject(obj_id,false)
      set_visible_object((12-n)+30,false)
      n = n + 1
      set_visible_object((12-n)+30,true)
--[[      if obj_id == 14 then
        ActivateObject(17,false)
      elseif obj_id == 17 then
        ActivateObject(14,false)
      elseif obj_id == 16 then
        ActivateObject(18,false)
      elseif obj_id == 18 then
        ActivateObject(16,false)
      end]]
      checkMini()
    end
  end
  if sender == 10 then
    flags.fake = true
    Block_Show_Cur(true)
    neighbors.MidBumagi.lock = true
    neighbors.NotariusHidden.lock = false
    for i=13,24 do

      set_visible_object(i-12,true)
    end;
    StartTimer(timerID,2,"qqqqq")

  end
  if sender == 30 then
    if neighbors.MidBumagi.lock then
    -- CreatePlashechka("492")
      dofile("./data/11/0/comics.lua")
    end
  end
end

function checkMini()
  if n == 12 then
    StartTimer(timerID,1,"close")
  end
end

function qqqqq()
Block_Show_Cur(false)
    playeffect("mini_complete")
    Journal:addText(11,"9020",155,118,330)
    Journal:addText(11,"9021",200,525,330)
    Journal:addPicture(11,"page11",219,71,0,0,694,494);
    
    CloseSatelite()
end;

function close()
  finish_mini_game(true)
end


