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

function gameinput (sender,obj_id,attachedID) 
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID);   
  if sender == 30 then
      DeleteResource("duplo");   
      DeleteResource("duplo5");   
      DeleteResource("kl3");        
    setcurentleaf("tropa_obryva",16,0);    
    if hint then
      flags.GlobalHint = false;
    end;
    Block_Show_Cur(false);
    if flags.duplo then
      StopEmiter("tiger");
      speciale_action(2,8);
    end;
  return;end;
  
  if sender==50 then
        Block_Show_Cur(true);
      StartTimer(8882,2);
  return;end;
  
  if sender == 1 then

    if obj_id == 3 then
      if obj.svetka ~= nil and attachedID == obj.svetka.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        flags.svet_duplo = true;
        speciale_action(2,3,true);
        Set_Anim_Cur(3,3);
        playeffect("fonar")
        speciale_action(2,obj.keytow.id,true);
        Set_Anim_Cur(obj.keytow.id,4);
      return; end;
      if attachedID~=-1 and ((obj.svetka~=nil and attachedID ~= obj.svetka.id) or (obj.svetka==nil )) then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
      return;end;      
      CreatePlashechka(900000,"358")
    return; end;
    if obj_id == obj.keytow.id then
        RemObjFromMouse()    
        flags.duplo = true;
        StoreObj(obj.keytwo.id,obj_id,"478",335,350,"kl1",290,217)
    return; end;
  return ;end;
  
  if sender == 100 then
    StartTimer(88811,1);
  return; end;
  
  if sender == 36 then
    if obj_id == 88811 then
      Block_Show_Cur(false);
      if not flags.svet_duplo then
        CreatePlashechka(900000,"358")
      end;
    return; end;
    if obj_id == 8882 then
      
      clear_satelite_leaf("tropa_obryva");
    return; end;
  return; end;


end
function SheetSwitched(nCount)
end;