function freeLottery(uint _gid) public isHuman(){
        require(!gamePaused,'Game Pause');
        require(freeLottoActive && lotto[_gid].active,'Free Lotto is closed');
        require(now - lotto[_gid].lastTime[msg.sender] >= lotto[_gid].freezeTimer,'in the freeze time');
        
        uint chancex=1;
        uint winNo = 0;
        if(playerCount[msg.sender]>=3){
            chancex=2;
        }
        if(playerCount[msg.sender]>=6){
            chancex=3;
        }
        
        winNo=uint(keccak256(abi.encodePacked(msg.sender,block.number,block.timestamp, rndSeed,block.difficulty,block.gaslimit))) % (playerCount[msg.sender]>=3?lotto[_gid].prob/chancex:lotto[_gid].prob)+1;

        bool result;
        if(winNo==7){
            result=true;
            msg.sender.transfer(lotto[_gid].prize);
        }else{
            result=false;
            if(playerCount[msg.sender]==0 || lotto[_gid].lastTime[msg.sender] <= now -lotto[_gid].freezeTimer - 15*minute){
                playerCount[msg.sender]+=1;
            }else{
                playerCount[msg.sender]=0;
            }
        }
        
        emit FreeLottery(luid,msg.sender,result?lotto[_gid].prize:0);
        
        rndSeed = keccak256(abi.encodePacked( block.difficulty,block.coinbase,msg.sender,block.timestamp,rndSeed));
        luid=luid+1;
        lotto[_gid].lastTime[msg.sender]=now;
    }