if flags.svecha then
  speciale_action(2,4)
  for i=6,10 do
    set_visible_object(i,true)
  end
else
  set_visible_object(6,true)
  -- setCursor(6,13)
end
if flags.kandelyabr then
  speciale_action(2,2)
  speciale_action(2,3)
  setCursor(11,2)
  for i=6,10 do
    StartEmiter("svecha_7_"..tostring(i-5))
    set_visible_object(i,false)
  end
  set_visible_object(11,true)
else
  set_visible_object(11,false)
end
-- if not flags.svecha and not flags.kandelyabr then
-- setCursor(6,13)
-- end;
function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID, "svecha_3_1","spichki_5_12") then
    return
  end
  if sender==1 then
    -- if obj_id == 3 then
      -- CreatePlashechka("560","he")
      -- return
    -- end
    if obj_id ==10  then
      if obj.svecha_3_1 and attachedID == obj.svecha_3_1.id then
        removeFromMouse()
        UnStoreObj(obj.svecha_3_1.id)
        flags.svecha = true
        playeffect("candle")
        speciale_action(2,4,true,0.5)
        -- for i=7,10 do
          -- speciale_action(2,i,true,0.1)
        -- end
        -- setCursor(6,4)
      elseif obj.spichki_5_12 and attachedID == obj.spichki_5_12.id then
        if flags.svecha then
          removeFromMouse()
          UnStoreObj(obj.spichki_5_12.id)
          flags.kandelyabr = true
          playeffect("fire_candle")
          AddParticleToObject(10,"svecha_7_1",513,145);
          MoveEmiter("svecha_7_1",513,145);
          StartEmiter("svecha_7_1");          
                
                
                
          neighbors.ZalMuzeyaKandelabr.lock = true
          
          Journal:addText(8,"9015",558,344,330)
          Journal:addPicture(8,"page8",548,82,0,0,339,250);
          setCursor(10,3)
          speciale_action(2,2,true,1)
          speciale_action(2,3,true,1)
          set_visible_object(11,true)
          setCursor(11,2)

        else
          CreatePlashechka("559","he")
          return
        end  
      else
        if not flags.kandelyabr then
        if flags.svecha  then
          CreatePlashechka("558","he")
        else
          CreatePlashechka("557","he")
        end
        end;
      end
    end
    if obj_id == 11 then
      CreatePlashechka("607")
    end
  end
end