Epic Script
Epic Script
import System.Web;
import System.Windows.Forms;
import Fiddler;
class Handlers
{
static var SquadPlayground = true;
static var RegionOverride = "NAE";
if (oSession.HostnameIs("fortnite-public-service-prod11.ol.epicgames.com"))
{
// A fix for profile0 error, etc...
if (oSession.PathAndQuery.Contains("/QueryProfile?profileId=profile0"))
{
oSession.url =
oSession.url.Replace("profileId=profile0","profileId=athena");
}
else if
(oSession.PathAndQuery.StartsWith("/fortnite/api/game/v2/matchmakingservice/ticket/
player/")) {
// TODO: Clean up this code
var uriSplit = (oSession.url + "?").split("?");
var queryString = HttpUtility.ParseQueryString(uriSplit[1]);
var bucketSplit = queryString.Get("bucketId").split(":");
// 2 = Solo
// 10 = Duo
// 9 = Squad
switch (bucketSplit[3]) {
case "2": bucketSplit[3] = "playlist_defaultsolo"; break;
case "10": bucketSplit[3] = "playlist_defaultduo"; break;
case "9":
if (SquadPlayground) {
bucketSplit[3] = "playlist_playground";
}
else {
bucketSplit[3] = "playlist_defaultsquad";
}
break;
oSession.oResponse.headers.Remove("X-Epic-Error-Code");
oSession.oResponse.headers.Remove("X-Epic-Error-Name");
oSession.utilSetResponseBody("{\"type\":\"OK\"}");
}
else if (oSession.PathAndQuery.Contains("/RefreshExpeditions")
||
oSession.PathAndQuery.Contains("/IncrementNamedCounterStat") ||
oSession.PathAndQuery.Contains("/GetMcpTimeForLogin")) {
oSession.oResponse.headers.HTTPResponseCode = 200;
oSession.oResponse.headers.HTTPResponseStatus = "200 OK";
oSession.oResponse.headers.Remove("X-Epic-Error-Code");
oSession.oResponse.headers.Remove("X-Epic-Error-Name");
oSession.utilSetResponseBody("{}");
}
}
}
}