contract AMICoin is StandardToken, Destructible {
    string public constant name = "USAGE TOKEN";
    uint public constant decimals = 18;
    string public constant symbol = "AMI";
     using SafeMath for uint256;
     event BuyAMI(address indexed from,string userid,uint256 value);
     address depositWalletAddress;
     uint256 public weiRaised =0;
    function AMICoin()  public {
       totalSupply = 50000000 * (10**decimals);  
       owner = msg.sender;
       depositWalletAddress = 0x6f0EA2d0bd5312ab56e1d4108360e557bb38425f; //TODO change with your multiseg or any account address where you want to receive balance
       companyReserve = 0x899004f864AAcd954A252A7E9D3d70d4594d4851;
       marketingReserve = 0x955eD316F49878EeE10A3dEBaD4E5Ab72A3F8624;
       advisorReserve = 0x4bfd13D8BCFBA3288043654053Ae13C752d193Eb;
       balances[msg.sender] += 40000000 * (10 ** decimals);
       balances[companyReserve] += 7500000 * (10 ** decimals);
       balances[marketingReserve] += 1500000 * (10 ** decimals);
       balances[advisorReserve] +=   1000000  * (10 ** decimals);
       Transfer(msg.sender,msg.sender, balances[msg.sender]);
       Transfer(msg.sender,companyReserve, balances[companyReserve]);
       Transfer(msg.sender,marketingReserve, balances[marketingReserve]);
       Transfer(msg.sender,advisorReserve, balances[advisorReserve]);
    }

    function()  public {
     revert();
    }
    
    function buyAMI(string userId) public payable{
        require(msg.sender !=0);
        require(msg.value>0);
        forwardFunds();
         weiRaised+=msg.value;
        BuyAMI(msg.sender,userId,msg.value);
    }
   
         // send ether to the fund collection wallet
  // override to create custom fund forwarding mechanisms
  function forwardFunds() internal {
     require(depositWalletAddress!=0);
    depositWalletAddress.transfer(msg.value);
  }
  function changeDepositWalletAddress (address newDepositWalletAddr) public onlyOwner {
       require(newDepositWalletAddr!=0);
       depositWalletAddress = newDepositWalletAddr;
  }
  
  
    
  
}
function forwardFunds() internal {
   require(depositWalletAddress!=0);
  depositWalletAddress.transfer(msg.value);
}

// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms