function Buttons_T(sender,obj_id)
    ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,34,34,sender,"secret_room",false)  
end; 

function gameinput (sender,obj_id,attachedID)  
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID); 
  if sender == 30 then
      DeleteResource("nisha");     
      DeleteResource("nisha4");
      DeleteResource("nisha5");  
      DeleteResource("t_nog");
    setcurentleaf("secret_room",7,0);    
    if flags.cvecha_dop and not flags.cvecha_main then
        flags.cvecha_main = true;        
        speciale_action(2,29);
        AddParticleToObject(29,"svecha_loc",852,421);
        MoveEmiter("svecha_loc",852,421);
        StartEmiter("svecha_loc");        
    end;
    if flags.nisha then
      speciale_action(2,39);
      if not flags.cvecha_main then
      flags.cvecha_main = true;
      speciale_action(2,29);
      AddParticleToObject(29,"svecha_loc",852,421);
      MoveEmiter("svecha_loc",852,421);
      StartEmiter("svecha_loc");
      end;
      StopEmiter("nisha");
      flags.help_gvozdoder = true;
    end;
    Block_Show_Cur(false);
  return;end;
  
  if sender == 1 then

    
    if obj_id == 7 then
      if obj.svgor ~= nil and attachedID == obj.svgor.id then
        RemObjFromMouse()
        UnStoreObj(obj.svgor.id);
        flags.cvecha_dop=true;
        AddParticleToObject(5,"svecha",425,320);
        MoveEmiter("svecha",425,320);
        StartEmiter("svecha");
        ActivateObject(7,false)
        speciale_action(2,7,true);
        speciale_action(2,6,true);
        speciale_action(2,5,true);
        speciale_action(2,obj.gvdre.id,true);
        Set_Anim_Cur(obj.gvdre.id,4);
      return; end;
      if attachedID~=-1 and ((obj.svgor~=nil and attachedID ~= obj.svgor.id) or (obj.svgor==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;          
      CreatePlashechka(900000,"159")
    return; end;
    
    if obj_id == obj.gvdre.id then
        RemObjFromMouse()
        flags.nisha = true;
        StoreObj(obj.scrtng.id,obj_id,"192",285,350,"t_nog",323,217,400000)        
    return; end;
    
  return ;end;
  
  if sender==50 then
      StartTimer(8882,1);
      Block_Show_Cur(true);  
  return;end;
  

  if sender == 36 then
    if obj_id == 8882 then
      Block_Show_Cur(false);
             
      clear_satelite_leaf("secret_room");
    return; end;

  return; end;

end
function SheetSwitched(nCount)
end;