function SelectRandom()
    if not obj.tabura.is_collapsed then
       selectrandomobject1(1.5,4,false);
    return;end;    
    if not flags.hidden_ugol then
       selectrandomobject1(1.5,13,false);
    return;end;    
    if not flags.cep_krugka and obj.rubil~=nil and obj.rubil.is_collapsed then
       selectrandomobject1(1.5,6,false);
    return;end;        
    if not flags.kirpich and obj.lomato~=nil and obj.lomato.is_collapsed then
       if flags.vilamato then
        selectrandomobject1(1.5,15,false);
       else
       selectrandomobject1(1.5,10,false);
       end;
    return;end;  
 not_hint=true	
CreatePlashechka(900000,"10005")
return;end;

function SetCursors()
    ItemsCur={}
    PointingItems={}
    if not flags.hidden_ugol then
        Set_Anim_Cur(13,2);
    end;
    -- if not flags.kandaly_bolty then
        -- Set_Anim_Cur(1,2);
    -- end;
    if not obj.tabura.is_collapsed then
    Set_Anim_Cur(4,4);
    end;
    if not flags.perepilM or not flags.cep_krugka then
        Set_Anim_Cur(5,2);
    end;
    if not flags.cep_krugka then
        Set_Anim_Cur(6,2);
    end;
    if not flags.kirpich then
        Set_Anim_Cur(10,2);
    end;
    if not flags.kirpich and flags.vilamato then
        Set_Anim_Cur(15,2)
    end;
    Set_Anim_Cur(12,11);
end;

function SetParticles()
    if not obj.tabura.is_collapsed  then
      AddParticleToObject(4,"taburetochka",416,508);
      MoveEmiter("taburetochka",416,508);
      StartEmiter("taburetochka");
    end;
    if not flags.hidden_ugol  then
      AddParticleToObject(13,"ugol",659,358);
      MoveEmiter("ugol",659,358);
      StartEmiter("ugol");
    end;
    if not flags.cep_krugka  then
      AddParticleToObject(6,"cep_krugka",409,394);
      MoveEmiter("cep_krugka",409,394);
      StartEmiter("cep_krugka");
    end;
    if not flags.kirpich  then
    if flags.vilamato then
      AddParticleToObject(15,"kirpich",100,421);
      MoveEmiter("kirpich",100,421);
      StartEmiter("kirpich");
    else
      AddParticleToObject(10,"kirpich",100,421);
      MoveEmiter("kirpich",100,421);
      StartEmiter("kirpich");    
    end;
    end;
    -- if not flags.kandaly_bolty then
      -- AddParticleToObject(1,"kamin_stat",100,421);
      -- MoveEmiter("kamin_stat",653,588);
      -- StartEmiter("kamin_stat");    
    -- end;    
end;

function ActionsJump ()
    
end;

function gameinput (sender,obj_id,attachedID)  
CursorTreatment(obj_id,sender,attachedID);
  if sender==100 then
    SetParticles()
    SetCursors()
    BlockCursor(false)
      playeffect("fon_dark",true);
      -- if frombolty then
        -- frombolty=false
        -- Block_Show_Cur(true);    
        -- add_free_leaf("Root","comics9",18,50);
        -- set_satelite_leaf("kamera");
        -- DoFile(18,50)    
      -- end;
      if flags.is_hidden_finish then
        flags.is_hidden_finish=false
        ActivateObject(13,false);
        Set_Anim_Cur(13,3);
      end;
      -- if not flags.comics8 and flags.is_jumping then
        -- Block_Show_Cur(true)
        -- StartTimer(87641,0.1)
      -- return; end;  
  return;end;
  if sender==6 then
    if have_to_start_mini then
        have_to_start_mini=false
    end;
  return;end;
  if sender==33 then
      Block_Show_Cur(false);
    if     frombolty then
        WaitRender()
    end
  return;end; 
  if sender == 1 then
    g_attachedID = attachedID;
    if obj_id == 12 then
        playeffect("step_room")
        RemObjFromMouse()    
        jump("kamera","turma",14,0);
    return; end;
    if obj_id == 4 then
        StartEmiter("taburetochka");
        StoreObj(obj.tabura.id,obj_id,"410",335,350,"tabur",290,217)
    return; end;
    if obj_id == 1 then
      if not flags.kandaly_bolty then
        RemObjFromMouse()
        s_obj=attachedID     
        Set_Sat("kandaly_bolty",18,4,"kamera")        
      return; end;
        RemObjFromMouse()
        IsMiniGame=true                
        Set_Sat("kandaly_magic",18,11,"kamera")    
    return; end;
    if obj_id == 10 or obj_id==15 then
        RemObjFromMouse()
        s_obj=attachedID    
        Set_Sat("kirpich",18,3,"kamera")    
    return; end;
    if obj_id == 13 then
    if not flags.hidden_ugol then
        flags.is_hidden_loc = true;
        RemObjFromMouse()            
        jump("kamera","ugol",18,1);
    return; end;  
    return; end;
    if obj_id == 5 or obj_id == 6 or obj_id == 14 then
        RemObjFromMouse()
        s_obj=attachedID      
        Set_Sat("cep_krugka",18,2,"kamera")    
    return; end;
  return; end;
 
  if sender==41 then
    if obj_id==60 then
        speciale_action(2,obj_id)
        StartTimer(6219999,2)
    end;
    if obj_id==61 then
        speciale_action(2,obj_id)
        StartTimer(6229999,4)
    end;    
    if obj_id==62 then
        speciale_action(2,obj_id)
        StartTimer(6239999,5)
    end;        
  return;end;
 
  if sender == 36 then  
    -- if obj_id==87641 then
        -- add_free_leaf("Root","comics8",14,50);
        -- set_satelite_leaf("kamera");
        -- DoFile(14,50)
        -- flags.comics8 = true;    
    -- return;end;
    if obj_id==6219999 then
        speciale_action(2,60)
        StartTravel(60,1,nil,nil,k1_gad1);
    end;    
    if obj_id==6229999 then
        speciale_action(2,61)
        StartTravel(61,1,nil,nil,k1_gad2);
    end;
    if obj_id==6239999 then
        speciale_action(2,62)
        StartTravel(62,1,nil,nil,k1_gad3);
    end;      
    if obj_id==1222 then
        StartTravel(122,1,nil,nil,flyRat1);
        StartTimer(1222,20)    
    return;end;  
    if obj_id == 88810 then
    return; end;
  return; end;
  
  if sender == 26 then
    if obj_id == 5 then
        Block_Show_Cur(true);
        RemObjFromMouse()
        IsMiniGame=true        
        Set_Sat("kandaly_magic",18,11,"kamera")    
    return; end;
  return; end;
  
  if sender == 15 then
  if not flags.comixJones_complete then
    if obj_id == 3 then
      speciale_action(2,3,true,3);
      JonesVisible=true
    return; end;
  return; end;    
  return; end;
  
  if sender == 16 then
  if not flags.comixJones_complete or JonesVisible then  
    if obj_id == 3 then
      speciale_action(2,3,true,3);
      JonesVisible=false
    return; end;
  return; end;        
  return; end;
  
 
end
function SheetSwitched(nCount)
end;