Agma Chat Command Settings

Configure your settings using the chat.

Από την 25/12/2021. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Agma Chat Command Settings
// @namespace    agma-chat-command-settings
// @version      2.3.4
// @description  Configure your settings using the chat.
// @author       CodingWithNuke
// @license      MIT
// @match        *://agma.io/*
// @grant        none
// ==/UserScript==

(()=>{var e={456:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Colors=t.DEFAULT_OPTIONS=void 0,t.DEFAULT_OPTIONS={textColor:"#ffffff",visibilityTime:5e3},(n=t.Colors||(t.Colors={})).WHITE="#FFFFFF",n.SILVER="#C0C0C0",n.GRAY="#808080",n.GREY="#808080",n.BLACK="#000000",n.RED="#FF0000",n.MAROON="#800000",n.YELLOW="#FFF000",n.OLIVE="#808000",n.LIME="#00FF00",n.GREEN="#008000",n.AQUA="#00FFFF",n.TEAL="#008080",n.BLUE="#0000FF",n.NAVY="#000080",n.FUCHSIA="#FF00FF",n.PURPLE="#800080"},451:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useAlert=void 0;var o=n(456);t.useAlert=function(e,t){t=i(i({},o.DEFAULT_OPTIONS),t);var n=document.querySelector(t.alertElementSelector),r=t.textColor,a=t.visibilityTime;r&&(n.style.color=r),n.style.fontSize="24px",n.textContent=e,n.style.display="block",setTimeout((function(){n.style.display="none"}),a)}},347:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Colors=t.useAlert=void 0,o(n(221),t);var r=n(451);Object.defineProperty(t,"useAlert",{enumerable:!0,get:function(){return r.useAlert}});var a=n(456);Object.defineProperty(t,"Colors",{enumerable:!0,get:function(){return a.Colors}})},705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},221:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(705),t)},458:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatContext=t.createChatContext=void 0,t.createChatContext=function(e){return new n(e)};var n=function(){function e(e){this._chatElement=document.querySelector(e)}return e.prototype.value=function(e){if(void 0===e)return this._chatElement.value;this._chatElement.value=e},e.prototype.clear=function(){this.value("")},e.prototype.focus=function(){this._chatElement.focus()},e}();t.ChatContext=n},778:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},s=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}},l=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},d=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Script=t.createScript=void 0;var u=n(458),f=n(565),p=a(n(230)),m=n(793);t.createScript=function(e){return new y(e)};var y=function(){function e(e){this._initialized=!1,this._commands=new Map,this._plugins=new Set,this._ioScriptsVersion=m.version,this.options=i(i({},f.DEFAULT_OPTIONS),e),this._init(),this.options.exposeToWindowObject&&(window.$script?p.error('Unable to expose script to "window.$script". "window.$script" is already in use by another script.'):window.$script=this)}return e.prototype.command=function(e,t){if(t){var n=this._commands.get(e)||d([],l(this._commands.values()),!1).find((function(t){return t.aliases&&"string"==typeof t.aliases?t.aliases===e:Array.isArray(t.aliases)&&t.aliases.includes(e)}));return n?void(this.options.silent||p.warn('Command with name or alias "'.concat(e,'" has already been registered.'))):(this._commands.set(e,i(i(i({},f.DEFAULT_COMMAND),t),{name:e})),this)}var o=this._commands.get(e)||d([],l(this._commands.values()),!1).find((function(t){return t.aliases&&"string"==typeof t.aliases?t.aliases===e:Array.isArray(t.aliases)&&t.aliases.includes(e)}));if(o)return o;this.options.silent||p.warn('Command "'.concat(e,'" not found.'))},e.prototype.use=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this._plugins.has(e)?!this.options.silent&&p.warn("Plugin has already been applied."):e&&"function"==typeof e?(this._plugins.add(e),e.apply(void 0,d([this],l(t),!1))):this.options.silent||p.error("A plugin must be a function."),this},e.prototype._init=function(){var e=this;if(!this._initialized){var t=this.options,n=t.chatElementSelector,i=t.prefix;if(n&&i){var o=document.querySelector(n);o?(o.addEventListener("keydown",(function(t){return s(e,void 0,void 0,(function(){var e,r,a,s,d,f;return c(this,(function(c){switch(c.label){case 0:return"Enter"!==t.code?[3,2]:(e=o.value).startsWith(i)?(r=l(e.trim().slice(i.length).split(/ +/g)),a=r[0],s=r.slice(1),(d=this.command(a.toLowerCase()))?d.disabled?[2]:(f=(0,u.createChatContext)(n),d.clearChat&&f.clear(),[4,d.run(this,f,s)]):[3,2]):[2];case 1:c.sent(),d.focusChatAfterRun&&f.focus(),c.label=2;case 2:return[2]}}))}))})),this._initialized=!0):p.error('Given chatElementSelector "'.concat(n,'" not found as an element.'))}}},e}();t.Script=y},927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineCommand=void 0,t.defineCommand=function(e){return e}},914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definePlugin=void 0,t.definePlugin=function(e){return e}},709:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.definePlugin=t.defineCommand=t.createScript=t.createChatContext=void 0;var r=n(458);Object.defineProperty(t,"createChatContext",{enumerable:!0,get:function(){return r.createChatContext}});var a=n(778);Object.defineProperty(t,"createScript",{enumerable:!0,get:function(){return a.createScript}});var s=n(927);Object.defineProperty(t,"defineCommand",{enumerable:!0,get:function(){return s.defineCommand}});var c=n(914);Object.defineProperty(t,"definePlugin",{enumerable:!0,get:function(){return c.definePlugin}}),o(n(892),t)},426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},892:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ChatContext=void 0;var r=n(458);Object.defineProperty(t,"ChatContext",{enumerable:!0,get:function(){return r.ChatContext}}),o(n(807),t),o(n(426),t),o(n(832),t)},832:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Script=void 0;var i=n(778);Object.defineProperty(t,"Script",{enumerable:!0,get:function(){return i.Script}})},565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COMMAND=t.DEFAULT_OPTIONS=void 0,t.DEFAULT_OPTIONS={info:{version:"1.0.0"},prefix:"/"},t.DEFAULT_COMMAND={clearChat:!0}},230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.error=t.warn=t.log=void 0,t.log=function(e){console.log("[io-scripts (LOG)]: ".concat(e))},t.warn=function(e){console.warn("[io-scripts (WARN)]: ".concat(e))},t.error=function(e){console.error("[io-scripts (ERROR)]: ".concat(e))},t.debug=function(e){console.log("[io-scripts (DEBUG)]: ".concat(e))}},675:(e,t,n)=>{e.exports=[n(320)]},320:(e,t,n)=>{const{defineCommand:i}=n(709),{useAlert:o,Colors:r}=n(347),{availableSettings:a}=n(279);e.exports=i({name:"setting",aliases:["s"],run:(e,t,n)=>{if(1==n.length){const e=a.find((e=>!!e&&(Array.isArray(e.name)?e.name.find((e=>e==n[0])):e.name==n[0])));if(!e)return void o(`No setting found with name "${n[0]}"`,{alertElementSelector:"#curser",textColor:r.RED});const{displayName:t,id:i}=e,s=document.getElementById(i);o(`The setting "${t}" is turned ${s.checked?"on":"off"}`,{alertElementSelector:"#curser",textColor:s.checked?r.LIME:r.RED})}if(2==n.length&&("on"==n[1]||"off"==n[1])){const e="on"===n[1],t=a.find((e=>!!e&&(Array.isArray(e.name)?e.name.find((e=>e==n[0])):e.name==n[0])));if(!t)return void o(`No setting found with name "${n[0]}"`,{alertElementSelector:"#curser",textColor:r.RED});const{displayName:i,function:s,id:c}=t,l=document.getElementById(c);s(e),l.checked=e,o(`The setting "${i}" has been turned ${e?"on":"off"}`,{alertElementSelector:"#curser",textColor:e?r.LIME:r.RED})}}})},279:(e,t)=>{const n=[{displayName:"Dark Theme",name:"darktheme",function:window.setDark,id:"cDark"},{displayName:"Fancy Grid",name:"fancygrid",function:window.setFancyGrid,id:"cFancyGrid"},{displayName:"Section Grid",name:"sectiongrid",function:window.setSectionGrid,id:"cSectionGrid"},{displayName:"Gridlines",name:["gridline","gridlines"],function:window.setGrid,id:"cGrid"},{displayName:"Skins",name:["skin","skins"],function:window.setSkins,id:"cSkins"},{displayName:"Wearables",name:["wearable","wearables"],function:window.setWearables,id:"cWearables"},{displayName:"Show Names",name:["name","names"],function:window.setNames,id:"cNames"},{displayName:"Minion Names",name:["minionname","minionnames"],function:window.setMinionNames,id:"cMinionNames"},{displayName:"Large Names",name:["largename","largenames"],function:window.setLargeNames,id:"cLargeNames"},{displayName:"Name Outlines",name:["nameoutline","nameoutlines"],function:window.setNameOutlines,id:"cNameOutlines"},{displayName:"Show Mass",name:"mass",function:window.setMass,id:"cMass"},{displayName:"Show Food",name:"food",function:window.setFood,id:"cFood"},{displayName:"Cell Animations",name:["cellanimation","cellanimations"],function:window.setCellAnimations,id:"cCellAnimations"},{displayName:"Skin Animations",name:["skinanimation","skinanimations"],function:window.setSkinAnimations,id:"cSkinAnimations"},{displayName:"Map Border",name:"mapborder",function:window.setMapBorder,id:"cMapBorder"},{displayName:"Sounds",name:["sound","sounds"],function:window.setSounds,id:"cSounds"},{displayName:"Infinite Zoom",name:"infinitezoom",function:window.setZoom,id:"cZoom"},{displayName:"Fixed Zoom",name:"fixedzoom",function:window.setFixedZoom,id:"cFixedZoom"},{displayName:"Slow Motion",name:"slowmotion",function:window.setSlowMotion,id:"cSlowMotion"},{displayName:"Minion Panel",name:"minionpanel",function:window.setMinionUi,id:"cMinionUi"},{displayName:"Leaderboard",name:"leaderboard",function:window.setLeaderboard,id:"cLeaderboard"},{displayName:"Chat",name:"chat",function:window.setChat,id:"cChat"},{displayName:"Minimap",name:"minimap",function:window.setMinimap,id:"cMinimap"},{displayName:"FPS / Ping / Stats",name:["fps","ping","stats"],function:window.setFPS,id:"cFPS"},{displayName:"Cell Colors",name:["color","colors","cellcolor","cellcolors"],function:window.setColors,id:"cColors"},{displayName:"Cell Borders",name:["cellborder","cellborders"],function:window.setCellBorders,id:"cCellBorders"},{displayName:"Cell Spikes",name:["cellspike","cellspikes"],function:window.setCellSpikes,id:"cCellSpikes"},{displayName:"Classic Virus Look",name:"classicvirus",function:window.setClassicViruses,id:"cClassicViruses"},{displayName:"Polygon Shapes",name:["polygonshape","polygonshapes"],function:window.setPolygonShapes,id:"cPolygonShapes"},{displayName:"Line Shapes",name:["lineshape","lineshapes"],function:window.setLineShapes,id:"cLineShapes"},{displayName:"Bubble Cells",name:["bubblecell","bubblecells"],function:window.setBubbleCells,id:"cBubbleCells"}],i=[{displayName:"Online Status",name:"onlinestatus",function:window.setFriendlistOnline,id:"cVisibilityStatus"},{displayName:"Allow Party Invitations",name:"partyinvite",function:window.showPartyInvite,id:"cAllowPartyInvite"},{displayName:"Allow Party Animations",name:["partyanimation","partyanimations"],function:window.setPartyAnimations,id:"cAllowPartyAnimations"},{displayName:"Auto Feed",name:"autofeed",function:window.setAutoFeedEnabled,id:"cAutoFeed"},{displayName:"Gold Nickname",name:["goldnick","goldnickname"],function:window.setGoldNickname,id:"cGoldName"},{displayName:"Gold Crown in Chat",name:"goldcrown",function:window.setGoldCrownChat,id:"cGoldCrownChat"},{displayName:"Set Skins on Minions",name:["minionskin","minionskins"],function:window.setMinionSkins,id:"cMinionSkinStatus"},{displayName:"Video Ads",name:["videoad","videoads"],function:window.setVideoAds,id:"cVideoAds"}];t.availableSettings=[...n,...i]},793:e=>{"use strict";e.exports=JSON.parse('{"name":"io-scripts","private":false,"version":"2.3.4","description":"io-scripts is an easy-to-use library to create scripts for any kind of .io game.","bin":"./dist/src/bin/io-scripts.js","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc"},"author":"CodingWithNuke","license":"MIT","keywords":["io-scripts",".io","scripts","userscripts","userscript","agar.io","agma.io"],"dependencies":{"commander":"^8.3.0","fs":"^0.0.1-security","kolorist":"^1.5.1","path":"^0.12.7","prepend-file":"^2.0.0","ts-loader":"^9.2.6","webpack":"^5.65.0"},"devDependencies":{"@types/node":"^16.11.10","typescript":"^4.5.2"}}')}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}(()=>{const{createScript:e}=n(709),t=e({chatElementSelector:"#chtbox",silent:!0});n(675).forEach((e=>t.command(e.name,e)))})()})();