function mini_create()
  init_mini(1)
  create_mini(19,15,1,382,179,636,434,1,2,10,0,-1)
end;

if flags.persten then
  setcolor(50,1,1,1,1)
  setCursor(50,3)
  ActivateObject(50,false)
end

if flags.persten then
  if not flags.besedkakniga then
    miniCreate()
  else
    speciale_action(2,obj.golub_12_13.id)
    speciale_action(2,101)
    setCursor(obj.golub_12_13.id,4)
  end
else
  NOW_MINI = true
  mini_create()
end

function rasstavit()
--SkipMini()
speciale_action(2,103,true)
SetObjectPosition(1,433,179)
SetObjectPosition(2,483,179)
SetObjectPosition(3,534,179)
SetObjectPosition(4,433,230)
SetObjectPosition(5,483,230)
SetObjectPosition(6,534,230)
SetObjectPosition(7,433,281)
SetObjectPosition(8,483,281)
SetObjectPosition(9,534,281)
SetObjectPosition(10,433,332)
SetObjectPosition(11,483,332)
SetObjectPosition(12,534,332)
SetObjectPosition(13,433,383)
SetObjectPosition(14,483,383)
SetObjectPosition(15,534,383)
end;

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id, attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID, "persten_2_1") then
    return
  end
  -- Write("sender="..sender.."; obj_id="..obj_id.."; attachedID="..attachedID.."\n")
  if sender==33 then
    if obj_id==50 then
      speciale_action(2,50,true,1.4)
      speciale_action(2,102,true,1.5)
    return;end;
  return;end;
  if sender==16 then
    if obj_id==102 then
      speciale_action(2,102,true,1.4)
      speciale_action(2,103,true,1.5)
    return;end;
    if obj_id==103 then
        flags.persten = true
        CreateMiniOutfit()
        CreatePlashechka(helpID)
Block_Show_Cur(false)        
    return;end;    
  return;end;
  if sender==1 then
    if obj_id >= 1 and obj_id <= 15 then
      if flags.persten then
        playeffect("bl_rot")
        check_mini_game_puzzle(obj_id,7)
      else
        CreatePlashechka("553","he")
      end
    end
    if obj_id == 50 then
      if obj.persten_2_1 and attachedID == obj.persten_2_1.id then
        removeFromMouse(attachedID)
        UnStoreObj(attachedID)
        SetAlfa(50,0.01,1,1)
        setCursor(50,3)
        playeffect("gol_ins")
        ActivateObject(50,false)
Block_Show_Cur(true)  
      else
        CreatePlashechka("552","he")
      end
    end
    if obj_id == obj.golub_12_13.id then
      StoreObj(obj.golub_12_13.id)
      neighbors.BesedkaKniga.lock = true
    end
  end
  if sender == 10 then
    flags.besedkakniga = true
    Block_Show_Cur(true)
    playeffect("mini_complete")
    rasstavit()
    StartTimer(timerID,2.1,"frame1")
    speciale_action(2,obj.golub_12_13.id,true,2)
    speciale_action(2,101,true,2)
  end
  if sender == 26 then
  --  CloseSatelite()
  end
end

function frame1()
  Block_Show_Cur(false)
  setCursor(obj.golub_12_13.id,4)
end