No Carga el Juego? intenta Parar la Carga! (Puede no Funcionar correctamente el juego)
Shop
Games My Games
Profile Storage Info Updates Notify Update:
Beta Version Enable:
Storage
DELETE DATA: DELETE ALL Nickname:
Credits: Graphic design: Samurai97, ManuelmcYOUTUBE and zNOoBy_ Programmer and Owner: Trollhunters501 They helped with the Code: Daxolomeo, RextDev, Devcheck, Bing Chat, Bard By Google and Aldo_Rodrigo349 Scripts Used in the Game: API's Google By Google, Google Fonts API By Google, Clipboard.js By zenorocha, JQuery By JQuery, jquery-migrate by JQuery, imagesloaded By desandro, Glide By Glide, masonry By David DeSandro, Loadash by Loadash, AMP JS by AMP JS, TypeScript by Microsoft, Material-UI, Babel by Babel, css-Polifill by philschatz, Axios, JSZip by JSZip, CodeMirrior by CodeMirrior, PyScript by PyScript, CoffeeScript by CoffeeScript, SCSS by SCSS, LatinoScript by Creadores Program, Lenguaje Latino by Latino, Marked by markedjs, Three.js by Three.js, PHP-wasm by PHP-wasm, Ruby wasm-wasi 3.3 by Ruby, WebPerl by haukex, Lua.vm by Lua.vm, Polyfill.io by Financial-Times. Global Chat: Discord Y Widget Bot. Login: Discord. Game Music: Epic Boss Fight, Don't Rush Inst., Rush 2, Combat Zone, Arcade Center, Maybe Not., My Galaxy, Comic Book, Neon Cityscape, Retro, Uncoventioal Inst. Some Designs created with: Canva 8 Bit Sound Effects created by: Kinemaster Special Credits to: PaleoStudio Games ©2024 Creadores Program ©2024
EN: Complete Missions to earn CREA Coins SP: Completa Misiones Para ganar CREA Coins!
SP: Adivina un número del 1 al 100! Creditos: zNOoBy_ PaleoStudio Games ©2024 EN: Guess a Number from 1 to 100! Credits: zNOoBy_ PaleoStudio Games ©2024
SP: Juega el Juego clásico de 3 en raya, el gato o como lo conozcas en tu país! pero con colores! EN: Play the classic game of 3 in a row, TikTakToe, the jack or as you know it in your country! but with colors!
SP: Dibuja y Colorea lo Que Quieras! EN: Draw and Color what you want!
SP: El Juego Clásico del Ahorcado! con más de 100 palabras en Inglés y Español. EN: The Classic Game of Hangman! with more than 100 words in English and Spanish.
Chat Global
Back
Chat
Send Message
Credits to: zNOoBy_ PaleoStudio Games ©2024
Reset
") != -1){
throw "ilegal access";
}
}
function JSmoduleLoad(text){
mainJSmodule += text;
if(mainJS.trim().indexOf("") != -1){
throw "ilegal access";
}
}
function LSLoad(text){
mainLS += text;
if(mainLS.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += '") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function CSSLoad(text){
mainCSS += text;
if(mainCSS.trim().indexOf("") != -1){
throw "ilegal access";
}
}
function SCSSLoad(Text){
mainSCSS += Text;
if(mainSCSS.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function RubyLoad(text){
mainRuby += text;
if(mainRuby.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function LuaLoad(text){
mainLua += text;
if(mainLua.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function PerlLoad(text){
mainPerl += text;
if(mainPerl.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function PHPLoad(text){
mainPHP += text;
if(mainPHP.trim().indexOf("") != -1){
throw "ilegal access";
}
if(((CustomGameManifest.configPHP == null || CustomGameManifest.configPHP.input == null) || (CustomGameManifest.configPHP.output == null)) || (CustomGameManifest.customPHP.error == null)){
throw "configPHP not found";
}
CustomScripts += "";
}
function PythonLoad(text){
mainPy += text;
if(mainPy.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "
";
}
function WebALoad(text){
mainWebAssembly += text;
if(mainWebAssembly.trim().indexOf("") != -1){
throw "ilegal access";
}
}
function CoffeeScriptLoad(text){
mainCoffeeScript += text;
if(mainCoffeeScript.trim().indexOf("") != -1){
throw "ilegal access";
}
CustomScripts += "";
}
function LatinoLoad(text){
mainLatino += text;
if(mainLatino.trim().indexOf("") != -1){
throw "ilegal access";
}
}
function LatinoScriptLoad(text){
mainLatJS += text;
if(mainLatJS.trim().indexOf("") != -1 || mainLatJS.trim().indexOf("";
}else{
HomeCode += "
";
}
HomeCode += "
"+CustomGameManifest.name+" "+CustomGameManifest.description+"
v"+CustomGameManifest.version+"
";
$("#imgMultiplayerServers").hide();
$("#addServerBtn").hide();
$("#defaultServers").hide();
$("#CreadoresGamesServerBtn").hide();
$("#ServerCode").html(HomeCode);
$("#ServerCode").show();
let StartGameCustomBtn = document.getElementById("StartGameCustomBtn");
StartGameCustomBtn.onclick = function(){
let confirmEntryGameC = confirm("Are you sure you want to enter the Game?\nSeguro que quieres entrar al Juego?");
if(confirmEntryGameC){
properties.soundClickStart.play();
DoneGameCustomLoad(zip, {
manifest: CustomGameManifest,
ScriptsDef: CustomScripts,
mains: {
Python: mainPy,
Html: mainHtml,
CSS: mainCSS,
SCSS: mainSCSS,
JS: mainJS,
CoffeeScript: mainCoffeeScript,
LatinoScript: mainLatJS,
WebAssembly: mainWebAssembly,
TS: mainTS,
LS: mainLS,
JSmodule: mainJSmodule,
PHP: mainPHP,
Ruby: mainRuby,
Lua: mainLua,
Perl: mainPerl,
Latino: mainLatino
}
});
$("#home").hide();
}
};
$("#GlobalChatBtn").hide();
$(".loader").fadeOut();
}
}
function DoneGameCustomLoad(zip, gamePropsC){
$(".loader").fadeIn();
$("#ServerCode").html("
");
$("#pauseChatBtn").show();
$("#playBtn").hide();
$("#stopBtn").hide();
properties.soundMenu.pause();
let AllGameCode = "";
AllGameCode += gamePropsC.ScriptsDef;
let CreadorCraftScripts = "";
CreadorCraftScripts += "
";
let CreadorCraftAPI = "var GameProps = {}; window.onDataPacket = function(event){ let datapacket = JSON.parse(event.data); switch(datapacket.type){ case 'login': try{ event.source.onDataPacket({ data: JSON.stringify({ type: 'login', status: 'ready' }), source: window }); GameProps.status = 'ready'; GameProps.CreadorCraftWindow = event.source; GameProps.sendDataPacket = function(datapack){ return event.source.onDataPacket({ data: JSON.stringify(datapack), source: window }); }; GameProps.getFileGame = function(){ return event.source.CustomGameFile; }; console.info('The game has been connected to CreadorCraft!', 'info'); } catch(err){ alert('A corrupt datapacket was sent'); } break; case 'dataLogin': try{ GameProps.isDiscordPlayer = function(){ return datapacket.discordAuht; }; GameProps.getPlayerId = function(){ return datapacket.playerID; }; GameProps.getPlayerName = function(){ return datapacket.playerName; }; GameProps.getGame = function(){ let game = { getVersion: function(){ return datapacket.Game.version; }, isBeta: function(){ return datapacket.BetaEnable; }, getBetaVersion: function(){ return datapacket.Game.getBetaVersion } }; return game; }; }catch(err){ alert('A corrupt datapacket was sent'); } break; case 'messageEvent': $$PlayerMessageEvent$$(datapacket.playerMessage); break; } }; if(GameProps.status == null){ window.top.onDataPacket({ data: JSON.stringify({ type: 'login', status: 'false' }), source: window }); } var $$AllPayerMessageEvent$$ = []; function $$PlayerMessageEvent$$(msg){ for(var event in $$AllPayerMessageEvent$$){ $$AllPayerMessageEvent$$[event](msg); } } var $$AllPauseEvents$$ = []; function $$PauseEvent$$(){ for(var iks in $$AllPauseEvents$$){ $$AllPauseEvents$$[iks](); } } var $$AllResumeEvens$$ = []; function $$ResumeEvents$$(){ for(var ik in $$AllResumeEvens$$){ $$AllResumeEvens$$[ik](); } } window.onResumeEvent = $$ResumeEvents$$; window.onPauseEvent = $$PauseEvent$$; window.onPlayerMessageEvent = $$PlayerMessageEvent$$; GameProps.addEventListener = function(event, callbacks){ switch(event){ case'resumeEvent': $$AllResumeEvens$$[$$AllResumeEvens$$.length] = callbacks; break; case 'playerMessageEvent': $$AllPayerMessageEvent$$[$$AllPayerMessageEvent$$.length] = callbacks; break; case 'pauseEvent': $$AllPauseEvents$$[$$AllPauseEvents$$.length] = callbacks; break; } }; GameProps.sendPlayerMessage = function(msg){ GameProps.sendDataPacket({ type: 'playerMessage', getMessage: msg }); }; GameProps.exitGame = function(){ window.top.reloadCG(); };";
CreadorCraftAPI += "GameProps.getClickSound = function(){ return GameProps.CreadorCraftWindow.getClickSound; }; GameProps.getGameMusic = function(){ return GameProps.CreadorCraftWindow.getGameMusic; }; GameProps.getWarnSound = function(){ return GameProps.CreadorCraftWindow.getWarnSound; }; GameProps.getWinSound = function(){ return GameProps.CreadorCraftWindow.getWinSound; }; GameProps.getClickStartSound = function(){ return GameProps.CreadorCraftWindow.getClickStartSound; }; delete window.localStorage; GameProps.getStorage = function(){ let subS = { set: function(id, objE){ window.top.StorageCGset(id, objE); }, get: function(id){ window.top.StorageCGget(id); }, delete: function(id){ window.top.StorageCGdele(id); } }; return subS; };";
AllGameCode += CreadorCraftScripts;
if(gamePropsC.manifest.onMarkdown != null && gamePropsC.manifest.onMarkdown){
AllGameCode += "";
}
if(gamePropsC.manifest.on3Dengine != null && gamePropsC.manifest.on3Dengine){
AllGameCode += "";
}
if(gamePropsC.manifest.onServerWebGamePost){
AllGameCode += "";
}
if(gamePropsC.manifest.importJSmap != null){
let importJSmapString;
try{
importJSmapString = JSON.stringify(gamePropsC.manifest.importJSmap);
}catch(err){
importJSmapString = "{}";
}
if(importJSmapString != null && importJSmapString.trim().length != 0){
AllGameCode += "";
}
}
AllGameCode += "";
if(gamePropsC.mains.CSS != null && gamePropsC.mains.CSS.trim().length != 0){
AllGameCode += "";
}
AllGameCode += gamePropsC.mains.Html;
if(gamePropsC.mains.SCSS != null && gamePropsC.mains.SCSS.trim().length != 0){
AllGameCode += "";
}
AllGameCode += "";
if(gamePropsC.mains.JSmodule != null && gamePropsC.mains.JSmodule.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.TS != null && gamePropsC.mains.TS.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.LS != null && gamePropsC.mains.LS.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.CoffeeScript != null && gamePropsC.mains.CoffeeScript.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.PHP != null && gamePropsC.mains.PHP.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.Python != null && gamePropsC.mains.Python.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.Ruby != null && gamePropsC.mains.Ruby.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.Lua != null && gamePropsC.mains.Lua.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.Perl != null && gamePropsC.mains.Perl.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.WebAssembly != null && gamePropsC.mains.WebAssembly.trim().length != 0){
AllGameCode += "";
}
if(gamePropsC.mains.Latino != null && gamePropsC.mains.Latino.trim().length != 0){
AllGameCode += "";
AllGameCode += "";
AllGameCode += "";
}
if(gamePropsC.mains.LatinoScript != null && gamePropsC.mains.LatinoScript.trim().length != 0){
AllGameCode += "
"+gamePropsC.mains.LatinoScript+" ";
}
window.CustomGameFile = zip;
let StatusAPI = "false";
window.reloadCG = function(){
window.onbeforeunload = null;
window.location.reload();
}
window.onDataPacket = function(event){
try{
let datapacket = JSON.parse(event.data);
switch(datapacket.type){
case "login":
try{
if(datapacket.status != StatusAPI){
StatusAPI = datapacket.status;
}
if(datapacket.status == "false"){
event.source.onDataPacket({ data: JSON.stringify({ type: "login", status: StatusAPI }), source: window });
}else if(datapacket.status == 'ready'){
window.getGameMusic = properties.soundMusicGame;
window.getClickSound = properties.soundClick;
window.getWinSound = properties.soundWin;
window.getClickStartSound = properties.soundClickStart;
window.getWarnSound = properties.soundWarning;
event.source.onDataPacket({ data: JSON.stringify({ type: 'dataLogin', discordAuht: properties.discordAuth, playerID: properties.playerID, playerName: properties.playerName, Beta: properties.BetaEnable, Game: { version: properties.getGame.getVersion, beta: properties.getGame.getBetaVersion } }), source: window });
}
}catch(err){
alert("A corrupt datapacket was sent");
}
break;
case "playerMessage":
try{
if(datapacket.getMessage == null){
throw "undefined Message";
}
let ShowMessage = document.getElementById("messageSent");
ShowMessage.innerHTML += "\n" + datapacket.getMessage;
}catch(err){
alert("A corrupt datapacket was sent");
}
break;
}
}catch(er){
//ignore
return;
}
};
let LocalCopyStorage = window.localStorage;
window.localStorage = window.sessionStorage;
window.StorageCGget = function(id){
LocalCopyStorage.getItem(gamePropsC.manifest.name+"|"+id);
};
window.StorageCGset = function(id, objG){
LocalCopyStorage.setItem(gamePropsC.manifest.name+"|"+id, objG);
};
window.StorageCGdele = function(id){
LocalCopyStorage.removeItem(gamePropsC.manifest.name+"|"+id);
};
let FrameCustomG = document.getElementById("GameS");
FrameCustomG.name = gamePropsC.manifest.name;
FrameCustomG.title = gamePropsC.manifest.name;
FrameCustomG.srcdoc = AllGameCode;
window.onEventMsgP = function(msg){
FrameCustomG.contentWindow.onPlayerMessageEvent(msg);
};
pauseGameBtn.addEventListener("click", function(){
FrameCustomG.contentWindow.onPauseEvent();
});
ResumeGame.addEventListener("click", function(){
FrameCustomG.contentWindow.onResumeEvent();
});
$(".loader").fadeOut();
}
GlobalChatBtn.addEventListener("click", ()=> {
properties.soundClick.play();
$("#ChatGlobalGame").show();
$("#GlobalChatBtn").hide();
$("#CreadoresGamesServerBtn").hide();
$("#defaultServers").hide();
$("#addServerBtn").hide();
$("#imgMultiplayerServers").hide();
});
//End Button Code Multiplayer.
//Game Audio Code!
properties.soundMenu.load();
properties.soundMenu.loop = true;
properties.soundMenu.controls = false;
properties.TimeoutGame.loop = true;
properties.TimeoutGame.load();
properties.soundMenu.controls = false;
properties.soundClick.controls = false;
properties.soundWarning.controls = false;
properties.soundClickStart.controls = false;
properties.soundMusicGame.controls = false;
properties.soundMenu.autoplay = true;
properties.soundMenu.addEventListener("canplaythrough", ()=>{
properties.soundMenu.done = true;
});
properties.soundClick.load();
properties.soundWarning.load();
properties.soundClickStart.load();
properties.soundMusicGame.load();
properties.soundMusicGame.loop = true;
$('#stopBtn').hide();
$("#playGameMusicBtn").hide();
$("#stopGameMusicBtn").hide();
playBtn.addEventListener('click', ()=> {
properties.soundClick.play();
properties.soundMenu.loop = true;
properties.soundMenu.play();
$('#playBtn').hide();
$('#stopBtn').show();});
stopBtn.addEventListener('click', ()=> {
properties.soundClick.play();
properties.soundMenu.pause();
$("#stopBtn").hide();
$('#playBtn').show();});
function click(){
properties.soundClick.pause();
properties.soundClick.currentTime = 0;
properties.soundClick.play();
}
playGameMusicBtn.addEventListener('click', ()=> {
click();
$("#playGameMusicBtn").hide();
properties.soundMusicGame.play();
$("#stopGameMusicBtn").show();});
stopGameMusicBtn.addEventListener('click', ()=> {
click();
$("#stopGameMusicBtn").hide();
properties.soundMusicGame.pause();
$("#playGameMusicBtn").show();});
function resetTimeoutPlayer(){
let timeoutGamePlayer = setTimeout(function () {
properties.TimeoutGame.currentTime = 0;
properties.TimeoutGame.play();
}, 1500000);
}
resetTimeoutPlayer();
document.addEventListener("mousemove", ()=> {
resetTimeoutPlayer();
properties.TimeoutGame.pause();
});
document.addEventListener("touchmove", ()=> {
resetTimeoutPlayer();
properties.TimeoutGame.pause();
});
//End of Game Audio Code.
//Code to Force screen size!
window.addEventListener('resize', function(){
let fixedWidth = 220;
let fixedHeight = 280;
window.resizeTo(fixedWidth, fixedHeight);});
//End Code to Force screen size.
//Code to finish loading the page.
function finishloading(){
console.info(send.Info + 'Done! Game Loaded!');
}
if("serviceWorker" in navigator){
navigator.serviceWorker.register("https://cdn.jsdelivr.net/gh/Creadores-Program/CreadorCraft-Arcade/sw.js").then(
(registration) => {
console.info(send.Info + "SW.js loaded!: ", registration);
},
(error) => {
let err = error.stack || error;
console.error(send.Err + "Error SW.js not loaded! error: " + err);
exceptionArrow("Error from SW.js: " + err);
});
}else{
console.warn(send.Warning + "Service worker not supported!");
}
//End Code to finish loading the page.
//Offline mode Code!
window.addEventListener('online', ()=> {
$("#Game").show();
$("#GameOffline").hide();});
window.addEventListener('offline', ()=> {
$("#Game").hide();
$("#GameOffline").show();
properties.soundWarning.play();});
if("serviceWorker" in navigator){
self.addEventListener('fetch', function(event) {
event.respondWith(
fetch(event.request)
.then(function(response) {
if (response.status === 200) {
caches.open('offline').then(function(cache) {
cache.put(event.request, response);
});
}
return response;
})
.catch(function(error) {
exceptionArrow(error);
})
);
});
}
//End Offline mode Code.
//Money Code
if(properties.money == null){
if(!localStorage.getItem("playerMoney")){
localStorage.setItem("playerMoney", 1000);
properties.money = localStorage.getItem("playerMoney");
}else{
properties.money = localStorage.getItem("playerMoney");
}
}
//Login Code!
if(!localStorage.getItem("DiscordAuth")){
localStorage.setItem("DiscordAuth", "false")
}
properties.discordAuth = localStorage.getItem("DiscordAuth");
window.addEventListener("load", ()=>{
$("#loadernotloadbtncon").hide();
clearTimeout(noloadg);
if(properties.BetaEnable == "true"){
if(!localStorage.getItem("updateAdBeta") || localStorage.getItem("updateAdBeta") != properties.getGame.getBetaVersion){
localStorage.setItem("updateAdBeta", properties.getGame.getBetaVersion);
alert("Novedades de CreadorCraft V." + properties.getGame.getVersion + " Beta " + properties.getGame.getBetaVersion + "\n•Se elimino RushKart y CreadorCraft modo Historia, y mas...");
alert("What's New in CreatorCraft V." + properties.getGame.getVersion + "." + properties.getGame.getBetaVersion + "\n•RushKart and CreadorCraft Story Mode have been removed and more..");
}
}
if(!localStorage.getItem("updateAd") || localStorage.getItem("updateAd") != properties.getGame.getVersion){
localStorage.setItem("updateAd", properties.getGame.getVersion);
alert("Novedades de CreadorCraft V." + properties.getGame.getVersion + "\n•Se añadio el lenguaje SCSS!\n•Se arreglaron errores!\n•Agregar API de almacenamiento\nDisfruta la Actualización!");
alert("What's New in CreatorCraft V." + properties.getGame.getVersion + "\n•SCSS language were added!\n•Bugs fixed!\n•Add Storage API\nEnjoy the Update!");
}
if(properties.playerName == null){
if(localStorage.getItem("DiscordAuth") != "true"){
if(confirm("Login\n¿Quieres iniciar sesión con Discord?/Do you want to log in with Discord?")){
return window.location.replace("https://discord.com/api/oauth2/authorize?client_id=1180242084049985577&response_type=token&redirect_uri=https%3A%2F%2Fcreadorcraftcp.blogspot.com%2F&scope=identify");
}
}
if(!localStorage.getItem("playerName")){
properties.playerName = prompt("Login \n¿Cuál es tu nombre/What's your name?", "");
}else{
properties.playerName = localStorage.getItem("playerName");
}
}
if (localStorage.getItem("DiscordAuth") == "false" && properties.playerName != null && properties.playerName.length < 20 && properties.playerName.length > 4 && !properties.playerName.isspace() && properties.playerName.replaceAll('-', '').length != 0){
if(properties.playerName.indexOf(" ") != -1){
properties.playerName = properties.playerName.replaceAll(" ", "-");
}
if(!localStorage.getItem("playerName")){
localStorage.setItem("playerName", properties.playerName);
}else if(localStorage.getItem("playerName") != properties.playerName){
localStorage.setItem("playerName", properties.playerName);
}
console.info(send.Info + properties.playerName + " Logged In! (No Account)");
if(window.location.pathname == "/b/blog-preview"){
alert("Inicio Sesión con Cuenta Debug Name: " + properties.playerName + " (No Account)");
}else{
alert ("Welcome " + properties.playerName + "!\nA Successfully Logged In! (No Account)");
nicknameConfig.innerHTML = properties.playerName;
}
}else{
if(localStorage.getItem("DiscordAuth") == "true"){
console.info(send.Info + properties.playerName + " Logged In!");
if(window.location.pathname == "/b/blog-preview"){
alert("Inicio Sesión con Cuenta Debug Name: " + properties.playerName);
}else{
alert ("Welcome " + properties.playerName + "!\nA Successfully Logged In!");
nicknameConfig.innerHTML = properties.playerName;
var LoginServer = "https://discord.com/api/webhooks/1099430259180453961/_UYMBAdB4ug4_09j1tXi5xORUq6wq0u8Z0WZZHyy_-29LW41K4FpFk7Z9DbFDnQobntE";
fetch(LoginServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: properties.playerName + ' Logged In!'
})
});
}
return;
}
if(window.location.pathname == "/b/blog-preview"){
alert("Debug Mode: Player Name Invalid");
}
if(properties.playerName != null && properties.playerName.length < 20){
alert("Error! you need a longer name the minimum is 4!\nError! Necesitas un nombre más largo, el mínimo es 4!");
properties.playerName = prompt("Login \n¿Cuál es tu nombre/What's your name?", "");
}
if(properties.playerName != null && properties.playerName.isspace() && properties.playerName.replaceAll('-', '').length == 0 && properties.playerName.replaceAll('.', '').length != 0 && properties.playerName.replaceAll(',', '').length != 0 && properties.playerName.replaceAll('_', '').length != 0){
alert("Error! You can't just have spaces!\nError no puedes tener solo espacios!");
properties.playerName = prompt("Login \n¿Cuál es tu nombre/What's your name?", properties.playerName);
}
if(properties.playerName != null && properties.playerName.length > 4){
alert("Error! you have exceeded the character limit the limit is 20!\nError! has excedido el límite de caracteres, el límite es 20!");
properties.playerName = prompt("Login \n¿Cuál es tu nombre/What's your name?", "");
}
console.info(send.Info + "User not logged in!");
properties.playerName = "Player" + ~~(Math.random() * (99999 - 1) + 1);
console.info(send.Info + "Random login Name: " + properties.playerName + " Logged In!");
nicknameConfig.innerHTML = properties.playerName;
alert("Error! You did not choose any name! or exceeded the limit\nYou will have a random Name: " + properties.playerName + "!");
} });
//Sign off code:
window.addEventListener("close", ()=>{
console.info(send.Info + properties.playerName + " Logged out!");
if(!localStorage.getItem("playerName") || localStorage.getItem("DiscordAuth") == "false"){
return;
}
if(window.location.pathname == "/b/blog-preview"){
return;
}
var LoginServer = "https://discord.com/api/webhooks/1099430259180453961/_UYMBAdB4ug4_09j1tXi5xORUq6wq0u8Z0WZZHyy_-29LW41K4FpFk7Z9DbFDnQobntE";
fetch(LoginServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: properties.playerName + " Logged out!"
})
});
});
window.addEventListener("pagehide", (event)=>{
if(event.persisted){
return;
}
console.info(send.Info + properties.playerName + " Logged out!");
if(!localStorage.getItem("playerName") || localStorage.getItem("DiscordAuth") == "false"){
return;
}
if(window.location.pathname == "/b/blog-preview"){
return;
}
var LoginServer = "https://discord.com/api/webhooks/1099430259180453961/_UYMBAdB4ug4_09j1tXi5xORUq6wq0u8Z0WZZHyy_-29LW41K4FpFk7Z9DbFDnQobntE";
fetch(LoginServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: properties.playerName + " Logged out!"
})
});
});
window.addEventListener("unload", ()=>{
console.info(send.Info + properties.playerName + " Logged out!");
if(!localStorage.getItem("playerName") || localStorage.getItem("DiscordAuth") == "false"){
return;
}
if(window.location.pathname == "/b/blog-preview"){
return;
}
var LoginServer = "https://discord.com/api/webhooks/1099430259180453961/_UYMBAdB4ug4_09j1tXi5xORUq6wq0u8Z0WZZHyy_-29LW41K4FpFk7Z9DbFDnQobntE";
fetch(LoginServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: properties.playerName + " Logged out!"
})
});
});
window.onbeforeunload = areYouSure;
var domainVerify = window.location.host;
if(domainVerify != "creadorcraftcp.blogspot.com"){
alert("NO ESTA PERMITIDO LA PIRATERIA!!\n\nPIRACY IS NOT ALLOWED!!");
console.error(send.Err + "PIRACY IS NOT ALLOWED!!");
console.error(send.Err + "Disable Game CreadorCraft...");
$("#Game").hide();
properties.soundMenu.pause();
properties.soundWarning.play();
var piracyReportServer = 'https://discord.com/api/webhooks/1099426737852530848/bztX5tvJ1El0kmMl3kVjSXZSZ392BQ8xafaSETKRbt6mzN0LpshRbEG56ko7mAz4BYav';
var MessagePiracy = "Alguien intenta piratear el Juego! dominio: ";
fetch(piracyReportServer, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: MessagePiracy + domainVerify + "Url: " + window.location.href
})
});
}
setTimeout ('$("#removeBugHome").fadeOut()', 1500);
//End Login Code
var senderr = send;