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

function gameinput (sender,obj_id,attachedID) 
Buttons_T(sender,obj_id)   
 CursorTreatment(obj_id,sender,attachedID);  
  if sender == 30 then
      DeleteResource("stenka_2");
      DeleteResource("stenka_all");   
      DeleteResource("stenka_6");  
    StopAllEffects()      
    setcurentleaf("turma",14,0);    
    Block_Show_Cur(false);
    if flags.stenka then
      speciale_action(2,5);
      StopEmiter("stenka");
    end;
  return;end;
  
  if sender == 1 then

    if obj_id == 4 or obj_id == 5 or obj_id == 6 then
      if obj.kyst ~= nil and attachedID == obj.kyst.id then
        speciale_action(2,obj_id,true);
        Set_Anim_Cur(obj_id,3)
        if obj_id == 4  then
            playeffect("kist_t")
            flags.brush_4=true
        end;
        if obj_id == 5  then
            playeffect("kist_t")
            flags.brush_5=true
        end;
        if obj_id == 6  then
            playeffect("kist_t")
            flags.brush_6=true
        end;        
        if flags.brush_4 and flags.brush_5 and flags.brush_6 then
            StopAllEffects()
            RemObjFromMouse()
            UnStoreObj(attachedID);    
            Block_Show_Cur(true)    
            flags.stenka = true;
            CreatePlashechka(900000,"3036")            
            StartTimer(8882,3);
        end;
      return; end;
      if attachedID~=-1 and ((obj.kyst~=nil and attachedID ~= obj.kyst.id) or (obj.kyst==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
        CreatePlashechka(900000,"406")      
    return; end;
  return ;end;
  
  if sender == 36 then
    if obj_id == 8882 then
        
        Block_Show_Cur(false)    
        clear_satelite_leaf("turma");
    return; end;
  return; end;


end
function SheetSwitched(nCount)
end;