gh-pages
peshomir 2024-01-31 18:50:35 +00:00
commit 886ba39f7c
11 changed files with 8177 additions and 0 deletions

0
.nojekyll 100644
View File

32
404.html 100644
View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 Not Found</title>
<style>
body {
background-color: #000;
color: #fff;
text-decoration: none;
text-align: center;
font-family: 'Courier New', Courier, monospace;
font-size: 30px;
}
a {
color: red;
text-decoration: none;
transition: 0.4s;
}
a:hover {
color: darkgreen;
}
</style>
</head>
<body>
<p>404, Not Found</p>
<a href="https://fxclient.cf"><p>Visit FXclient.cf</p></a>
</body>
</html>

View File

@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FX Client - Cookie Policy</title>
<style>
body {
text-align: center;
background-color: #fff;
color: #000;
font-size: 25px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
display: block;
}
#dd {
text-align: center;
background-color: #fff;
color: #000;
font-size: 40px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
display: block;
}
a {
text-decoration: none;
}
</style>
</head>
<body>
<span id="dd">Cookie Policy</span>
<p>Last Update: 25 December 2022</p>
<p>1. General Information
<br />
fxclient.cf uses cookies to improve the user experience. You can find out more about cookies in the sections below.
You don't have to accept cookies in order to use fxclient.cf. We recommend cookies as they will improve your gaming experience.
To understand how we use your information, you may also check out our privacy policy: https://fxclient.cf/privacy_policy
</p>
<hr />
<p>2. What is a cookie?
<br />
Cookies are small text files that are stored on your computer. For example, a cookie can be used to remember your username.
</p>
<hr />
<p>
3. What types of cookies do we use?
<br />
We use functionality cookies to store your preferences:
<br>
your username;
a boolean, indicating if your interface is magnified or not;
the password of your one-vs-one account;
the color of your country;
selected emojis;
<br>
Furthermore, we use a cookie that assigns a random number to your device.
<br />
</p>
<hr />
<p>
4. How do our servers handle cookies transmitted by users?
<br />
We do not store and process cookies on our servers. Cookies on the client side will be deleted after one year of inactivity. Cookies will not be shared with third parties.
</p>
<hr />
<p>
5. More information about cookies
<br />
If you want to know how to delete or manage cookies, the following links may be helpful:
<br />
Cookie settings in Chrome and Android: https://support.google.com/chrome/answer/95647
<br />
Cookie settings in Firefox: https://support.mozilla.org/en-US/kb/cookies-information-websites-store-on-your-computer
<br />
Cookie settings in iOS: http://support.apple.com/kb/PH5042
<br />
If you need more information about cookies, you may check out this link: http://www.allaboutcookies.org/
</p>
<hr/>
<p>
6. Contact Information
<br />
If you have more questions, please contact us at this discord server: https://discord.gg/JEwYWGraj7
</p>
</body>
</html>

BIN
favicon.ico 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

140
fx_core.js 100644
View File

@ -0,0 +1,140 @@
const fx_version = '0.6'; // FX Client Version
const fx_update = 'Jan 31'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0;
console.log('Couldn\'t find a saved win data. creating one...');
} else if (localStorage.getItem("fx_winCount") != undefined || localStorage.getItem("fx_winCount") != null) {
var wins_counter = localStorage.getItem("fx_winCount");
}
var settings = {
"fontName": "Trebuchet MS",
"showBotDonations": false,
"hideAllLinks": false,
"realisticNames": false,
//"customMapFileBtn": true
};
var settingsManager = new (function() {
var inputFields = {
fontName: document.getElementById("settings_fontname")
};
var checkboxFields = {
showBotDonations: document.getElementById("settings_donations_bots"),
hideAllLinks: document.getElementById("settings_hidealllinks"),
realisticNames: document.getElementById("settings_realisticnames"),
//customMapFileBtn: document.getElementById("settings_custommapfileinput")
};
this.save = function() {
Object.keys(inputFields).forEach(function(key) { settings[key] = inputFields[key].value.trim(); });
Object.keys(checkboxFields).forEach(function(key) { settings[key] = checkboxFields[key].checked; });
this.applySettings();
WindowManager.closeWindow("settings");
localStorage.setItem("fx_settings", JSON.stringify(settings));
// should probably firgure out a way to do this without reloading - // You can't do it, localstorages REQUIRE you to reload
window.location.reload();
};
this.syncFields = function() {
Object.keys(inputFields).forEach(function(key) { inputFields[key].value = settings[key]; });
Object.keys(checkboxFields).forEach(function(key) { checkboxFields[key].checked = settings[key]; });
};
this.resetAll = function() {
if (!confirm("Are you Really SURE you want to RESET ALL SETTINGS back to the default?")) return;
localStorage.removeItem("fx_settings");
window.location.reload();
};
this.applySettings = function() {
//setVarByName("bu", "px " + settings.fontName);
};
});
function removeWins() {
var confirm1 = confirm('Do you really want to reset your Wins?');
if (confirm1) {
wins_counter = 0;
localStorage.removeItem('fx_winCount');
alert("Successfully reset wins");
}
}
var WindowManager = new (function() {
var windows = {};
this.add = function(newWindow) {
windows[newWindow.name] = newWindow;
windows[newWindow.name].isOpen = false;
};
this.openWindow = function(windowName, ...args) {
if (windows[windowName].isOpen === true) return;
if (windows[windowName].beforeOpen !== undefined) windows[windowName].beforeOpen(...args);
windows[windowName].isOpen = true;
windows[windowName].element.style.display = null;
};
this.closeWindow = function(windowName) {
if (windows[windowName].isOpen === false) return;
windows[windowName].isOpen = false;
windows[windowName].element.style.display = "none";
};
this.closeAll = function() {
Object.values(windows).forEach(function(windowObj) {
WindowManager.closeWindow(windowObj.name);
});
};
});
WindowManager.add({
name: "settings",
element: document.querySelector(".settings"),
beforeOpen: function() { settingsManager.syncFields(); }
});
WindowManager.add({
name: "donationHistory",
element: document.querySelector("#donationhistory"),
beforeOpen: function(isSingleplayer) {
document.getElementById("donationhistory_note").style.display = ((settings.showBotDonations || /*getVarByName("dt")*/ isSingleplayer) ? "none" : "block");
}
});
document.getElementById("canvasA").addEventListener("mousedown", WindowManager.closeAll);
document.getElementById("canvasA").addEventListener("touchstart", WindowManager.closeAll);
var settingsGearIcon = document.createElement('img');
settingsGearIcon.setAttribute('src', 'geari_white.png');
var donationsTracker = new (function(){
this.donationHistory = Array();
// fill the array with empty arrays with length of 3
for (var i = 0; i < 512; i++) this.donationHistory.push([]);
// from inside of game:
// ((!gE[g].startsWith("[Bot] ") || settings.showBotDonations) && donationsTracker.logDonation(g,k,x))
this.logDonation = function(senderID, receiverID, amount) {
this.donationHistory[receiverID].push([senderID,amount]);
};
this.getRecipientHistoryOf = function(playerID) {
return this.donationHistory[playerID];
};
});
// usage from inside: displayDonationsHistory(Y, gE);
function displayDonationsHistory(playerID, playerNames, isSingleplayer) {
var history = donationsTracker.getRecipientHistoryOf(playerID);
console.log("History for " + playerNames[playerID] + ":");
console.log(history);
document.querySelector("#donationhistory h1").innerHTML = "Donation history for " + playerNames[playerID];
var historyText = "";
history.reverse();
if (history.length > 0) history.forEach(function(historyItem, index) {
historyText += (history.length - index) + ". Received " + historyItem[1] + " resources from " + playerNames[historyItem[0]] + "<br>";
});
else historyText = "Nothing to display";
document.querySelector("#donationhistory p#donationhistory_text").innerHTML = historyText;
WindowManager.openWindow("donationHistory", isSingleplayer);
}
var utils = new (function() {
this.getMaxTroops = function(playerTerritories, playerID) { return playerTerritories[playerID]*150; };
this.getDensity = function(playerBalances, playerTerritories, playerID) {
return (Math.floor((playerBalances[playerID] / ((playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID]) * 150)) * 100) + "%");
};
});
if (localStorage.getItem("fx_settings") !== null) {
settings = {...settings, ...JSON.parse(localStorage.getItem("fx_settings"))};
}
//settingsManager.applySettings();
console.log('Successfully loaded FX Client');

7582
game.js 100644

File diff suppressed because one or more lines are too long

BIN
geari_white.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

95
index.html 100644
View File

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q96FGB3L05"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-Q96FGB3L05');
</script>
<meta charset="utf-8" />
<title>FX Client</title>
<meta name="description" content="Modified Version of Territorial.io - FX Client">
<meta name="keywords"
content="territorial.io,territory games,territorial io,map games,conquest games,conquest game,david tschacher,territorial,territory game,io game,io games,territory.io,territory io,territory games io">
<meta name="author" content="MohsenEMX, peshomir,orlemley1, David Tschacher">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<meta name="og:image" content="https://fxclient.cf/logo.png" />
<meta property="og:url" content="https://fxclient.cf">
<meta property="og:type" content="website">
<meta property="og:title" content="FXclient.cf">
<meta property="og:description" content="Modified Version of Territorial.io - FX Client">
<meta property="og:image" content="https://fxclient.cf/logo.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="FX Client">
<meta name="twitter:description" content="Modified Version of Territorial.io - FX Client">
<meta name="twitter:image" content="https://fxclient.cf/logo.png">
<meta itemprop="name" content="FXclient.cf">
<meta itemprop="description" content="Modified Version of Territorial.io - FX Client">
<meta itemprop="image" content="https://fxclient.cf/logo.png">
<!-- FX Client CSS -->
<link rel="stylesheet" href="main.css">
<!-- Game CSS -->
<style>
html,
body {
overflow: hidden;
padding: 0;
margin: 0;
background: rgb(0, 0, 0);
touch-action: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<body onload="aiCommand746(0);">
<canvas id="canvasA" width="128" height="128"></canvas>
<div class="window flex settings" style="display:none">
<h1>Settings</h1>
<div class="scrollable">
<label title="Name of the font to be used for rendering. For example: Arial, Georgia, sans-serif, serif, Comic Sans MS, ...">
Font name: <input id="settings_fontname" placeholder="Enter font name" value="Arial"></label><br>
<br><button onclick="removeWins()">Reset Wins Counter</button><br><br>
<label for="settings_donations_bots" class="checkbox">
Display donations from bots in donation history viewer (applies to multiplayer only)
<input type="checkbox" id="settings_donations_bots"><span class="checkmark"></span>
</label><br>
<label for="settings_hidealllinks" class="checkbox">
Hide Links option also hides app store links
<input type="checkbox" id="settings_hidealllinks"><span class="checkmark"></span>
</label><br>
<label for="settings_realisticnames" class="checkbox">
Realistic Bot Names
<input type="checkbox" id="settings_realisticnames"><span class="checkmark"></span>
</label><br>
<!--<label for="settings_custommapfileinput" class="checkbox">
Bring back the custom map file button after the creator removed it in 1.83.0
<input type="checkbox" id="settings_custommapfileinput"><span class="checkmark"></span>
</label>-->
</div>
<hr>
<footer>
<button onclick="settingsManager.resetAll()">Reset Settings</button>
<button onclick="settingsManager.save()">Save Settings</button>
</footer>
</div>
<div class="window scrollable" id="donationhistory" style="display:none">
<h1>Donation history for </h1>
<p id="donationhistory_note">Note: donations from bots are not shown here</p>
<p id="donationhistory_text"></p>
</div>
<script src="variables.js"></script>
<script src="fx_core.js"></script>
<script src="game.js"></script>
</body>
</html>

149
main.css 100644
View File

@ -0,0 +1,149 @@
.scrollable {
overflow-y: auto;
}
.window {
position : fixed;
background-color: rgba(0, 0, 0, 0.7);
width : 90%;
top : 0;
color : white;
font-family : 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
margin : auto;
margin-top : 20px;
right : 0;
left : 0;
padding : 15px;
box-sizing : border-box;
border-color : white;
border-style : solid;
border-width : 2px;
border-width : calc(0.15 * (1vw + 1vh));
font-size : 20px;
font-size : calc(14px + ((0.4 * (0.8vw + 1vh)) + 0.15rem));
max-height : 90%;
transition : 0.2s;
z-index : 10;
}
.window.flex {
display : flex;
flex-direction: column;
}
hr {
width: 100%;
}
.window button,
.window input {
background-color: rgba(0, 0, 0, 0.7);
color : white;
font-size : 20px;
font-size : 0.9em;
padding : 0.4rem;
transition : 0.2s;
border : 1px solid #fff;
border-radius : 5px;
}
h1 {
font-weight : normal;
margin-block-start: 0.5em;
margin-block-end : 0.5em;
transition : 0.2s;
}
canvas {
transition: 0.2s;
}
button:hover {
background-color: rgba(222, 222, 222, 0.52);
border-radius : 8px;
}
.window input:focus {
background-color: rgba(222, 222, 222, 0.36);
border-radius : 8px;
}
input#userna,
input#inputfilebtn {
transition: 0.2s
}
/* Checkbox */
label.checkbox {
display : block;
position : relative;
padding-left : 35px;
/*margin-bottom: 12px;*/
cursor : pointer;
}
label.checkbox input {
position: absolute;
opacity : 0;
cursor : pointer;
height : 0;
width : 0;
}
.checkmark {
position : absolute;
top : 0;
left : 0;
height : 25px;
width : 25px;
/*background-color: #eee;*/
background-color : rgb(255 255 255 / 70%);
}
label.checkbox:hover .checkmark {
background-color: #ccc;
}
label.checkbox input:checked~.checkmark {
/*background-color: #2196F3;*/
background-color: rgba(0, 255, 0, 0.5);
}
.checkmark::after {
content : "";
position: absolute;
display : none;
}
label.checkbox input:checked~.checkmark:after {
display: block;
}
label.checkbox .checkmark:after {
left : 9px;
top : 5px;
width : 5px;
height : 10px;
border : solid white;
border-width : 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform : rotate(45deg);
transform : rotate(45deg);
}
/* Custom Map Button */
::-webkit-file-upload-button {
color : white;
background-color: #120076;
border : 2px solid #fff;
top : 0;
bottom : 0;
padding-top : 20px;
padding-bottom : 20px;
padding-left : 20px;
padding-right : 20px;
font-family : 'Trebuchet MS', 'Arial Narrow', Arial, sans-serif;
text-align : center;
}

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FX Client - Privacy Policy</title>
<style>
body {
text-align: center;
background-color: #fff;
color: #000;
font-size: 25px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
display: block;
}
#dd {
text-align: center;
background-color: #fff;
color: #000;
font-size: 40px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
display: block;
}
a {
text-decoration: none;
}
</style>
</head>
<body>
<span id="dd">Privacy Policy</span>
<p>Last Update: 25 December 2022</p>
<p>1. General Notes
<br />
Unless otherwise indicated, this privacy policy applies for the website (www.fxclient.cf).
In this policy, "fxclient.cf", "we" or "us" refers to a group of developers scattered around the world. The
contact information of the owner of this enterprise can be found below.
</p>
<hr />
<p>2. Third Parties
<br />
We don't share your information with any 3rd parties.
</p>
<hr />
<p>
3. What information do we collect?
<br />
We do not collect any user information. Information is collected by territorial.io. The privacy policy for
territorial.io can be found at <a href="https://territorial.io/privacy_policy">
https://territorial.io/privacy_policy </a>
<br />
On the website we collect cookies: If you need more information about our cookies, you may check out our cookie
policy: <a href="https://fxclient.cf/cookie_policy">https://fxclient.cf/cookie_policy</a>
</p>
<hr />
<p>
4. How do we collect and use your information?
<br />
Information is sent to and used by Territorial.io and not encrypted in transit. Your information is used to
improve the game and to prevent fraud. Collection and usage of the data by Territorial.io is explained in more
detail at <a href="https://territorial.io/privacy_policy"> https://territorial.io/privacy_policy </a>
Usernames and rankings are publicly available. Statistical and anonymous game data are shown on Territorial.io
(https://territorial.io/players and https://territorial.io/clans) and the Territorial.io Discord server
(https://discord.gg/pa5TH6hZrv).
</p>
<hr />
<p>
5. How can you delete your information?
<br />
You can ask us to delete your data at the discord server shown below.
</p>
<hr />
<p>
6. Contact Information
<br />
If you have more questions, please contact us at this discord server: https://discord.gg/JEwYWGraj7
</p>
</body>
</html>

1
variables.js 100644

File diff suppressed because one or more lines are too long