if(@ptnum==0 || @ptnum==@numpt-1){
    //entrance,groupname,attribut,true,set
    setpointgroup(0,"start_end",@ptnum,1,"set");
}