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("luk_turma");
    DeleteResource("luk_turma_2");    
    DeleteResource("luk_turma_5");     
    DeleteResource("luk_turma_8");      
    DeleteResource("kl2");    
    setcurentleaf("turma",14,0);    
    Block_Show_Cur(false);
    if flags.luk_turma_open and not flags.luk_turma_openM then
        flags.luk_turma_openM=true;
        speciale_action(2,1);
        speciale_action(10,1);
    end;
    if flags.luk_turma then
      StopEmiter("luk_john");
      if not flags.luk_turma_openM then
          flags.luk_turma_openM=true;
          speciale_action(2,1);
      end;
      Set_Anim_Cur(2,3);
      speciale_action(2,2);
    end;
  return;end;
  
  if sender==50 then
        StartTimer(8882,1);
        Block_Show_Cur(true);
  return;end;
  
  if sender == 1 then

    if obj_id==obj.iskeoy.id then
        RemObjFromMouse()
         flags.luk_turma = true;
        StoreObj(obj.iskeyo.id,obj_id,"478",335,350,"kl2",290,217)
        speciale_action(2,10)
    end;
    
    if obj_id == 6 then
      if (obj.medal ~= nil and attachedID == obj.medal.id) or (obj.meddwa ~= nil and attachedID == obj.meddwa.id) then
        if not flags.is_medal_one then
          RemObjFromMouse()
          UnStoreObj(attachedID);
          playeffect("statue")
          flags.is_medal_one = true;
          speciale_action(2,4,true);
        return; end;
        if flags.is_medal_one then
          RemObjFromMouse()
          UnStoreObj(attachedID);
          playeffect("statue")
          Block_Show_Cur(true);
          speciale_action(2,5,true);
        return; end;
      return; end;
      if attachedID~=-1 and (((obj.medal~=nil and attachedID ~= obj.medal.id) or (obj.medal==nil )) or ((obj.meddwa~=nil and attachedID ~= obj.meddwa.id) or (obj.meddwa==nil )) ) then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;          
      CreatePlashechka(900000,"475")
    return; end;
  return ;end;
  
  if sender == 16 then

    if obj_id == 5 then
      speciale_action(2,4,true);
      speciale_action(2,5,true);
      speciale_action(2,6,true);
      speciale_action(2,7,true);
             -- flags.luk_turma = true;
        -- StoreObj(obj.iskeyo.id,obj_id,"478",335,350,"kl2",290,217)
      playeffect("luk")
      flags.luk_turma_open=true;
      Set_Anim_Cur(obj.iskeoy.id,4)
    return; end;
  return; end;
  
  if sender == 15 then
    if obj_id == 6 then
        Block_Show_Cur(false)
    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;