Agma Chat Command Settings

Configure your settings using the chat.

Mint 2021.12.27.. Lásd a legutóbbi verzió

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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

var de=Object.create;var E=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty;var ye=e=>E(e,"__esModule",{value:!0});var l=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),we=(e,n)=>{for(var t in n)E(e,t,{get:n[t],enumerable:!0})},_e=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of me(n))!pe.call(e,a)&&(t||a!=="default")&&E(e,a,{get:()=>n[a],enumerable:!(i=fe(n,a))||i.enumerable});return e},I=(e,n)=>_e(ye(E(e!=null?de(he(e)):{},"default",!n&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var M=l(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.ChatContext=C.createChatContext=void 0;function ve(e){return new k(e)}C.createChatContext=ve;var k=function(){function e(n){this._chatElement=document.querySelector(n)}return e.prototype.value=function(n){if(typeof n=="undefined")return this._chatElement.value;this._chatElement.value=n},e.prototype.clear=function(){this.value("")},e.prototype.focus=function(){this._chatElement.focus()},e}();C.ChatContext=k});var $=l(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.DEFAULT_COMMAND=O.DEFAULT_OPTIONS=void 0;O.DEFAULT_OPTIONS={prefix:"/"};O.DEFAULT_COMMAND={clearChat:!0}});var W=l(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.debug=_.error=_.warn=_.log=void 0;function be(e){console.log("[io-scripts (LOG)]: ".concat(e))}_.log=be;function ge(e){console.warn("[io-scripts (WARN)]: ".concat(e))}_.warn=ge;function Se(e){console.error("[io-scripts (ERROR)]: ".concat(e))}_.error=Se;function Ce(e){console.log("[io-scripts (DEBUG)]: ".concat(e))}_.debug=Ce});var z=l((ot,Oe)=>{Oe.exports={name:"io-scripts",private:!1,version:"2.3.14",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",esbuild:"^0.14.8",fs:"^0.0.1-security",kolorist:"^1.5.1",path:"^0.12.7","prepend-file":"^2.0.0"},devDependencies:{"@types/node":"^16.11.10",typescript:"^4.5.2"}}});var q=l(u=>{"use strict";var v=u&&u.__assign||function(){return v=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},v.apply(this,arguments)},Ne=u&&u.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Ae=u&&u.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),Pe=u&&u.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&Ne(n,e,t);return Ae(n,e),n},Ee=u&&u.__awaiter||function(e,n,t,i){function a(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function c(d){try{o(i.next(d))}catch(w){s(w)}}function m(d){try{o(i.throw(d))}catch(w){s(w)}}function o(d){d.done?r(d.value):a(d.value).then(c,m)}o((i=i.apply(e,n||[])).next())})},Me=u&&u.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(o){return function(d){return m([o,d])}}function m(o){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,a&&(r=o[0]&2?a.return:o[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;switch(a=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,a=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){t.label=o[1];break}if(o[0]===6&&t.label<r[1]){t.label=r[1],r=o;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(o);break}r[2]&&t.ops.pop(),t.trys.pop();continue}o=n.call(e,t)}catch(d){o=[6,d],a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},A=u&&u.__read||function(e,n){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var i=t.call(e),a,r=[],s;try{for(;(n===void 0||n-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(c){s={error:c}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return r},F=u&&u.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var i=0,a=n.length,r;i<a;i++)(r||!(i in n))&&(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(u,"__esModule",{value:!0});u.Script=u.createScript=void 0;var Fe=M(),Z=$(),b=Pe(W()),je=z();function Le(e){return new Y(e)}u.createScript=Le;var Y=function(){function e(n){this._initialized=!1,this._commands=new Map,this._plugins=new Set,this._ioScriptsVersion=je.version,this.options=v(v({},Z.DEFAULT_OPTIONS),n),this._init(),this.options.exposeToWindowObject&&(window.$script?b.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(n,t){if(t){var i=this._commands.get(n)||F([],A(this._commands.values()),!1).find(function(s){var c;return(c=s.aliases)===null||c===void 0?void 0:c.includes(n)});if(i){this.options.silent||b.warn('Command with name or alias "'.concat(n,'" has already been registered.'));return}var a=t.aliases&&Array.isArray(t.aliases)&&F([],A(this._commands.values()),!1).find(function(s){var c;return s.aliases&&Array.isArray(s.aliases)&&!!((c=s.aliases)===null||c===void 0?void 0:c.filter(function(m){var o;return(o=t.aliases)===null||o===void 0?void 0:o.indexOf(m)}))});if(a){this.options.silent||b.warn('Command with name "'.concat(n,'" has a duplicate alias conflict with another command.'));return}return this._commands.set(n,v(v(v({},Z.DEFAULT_COMMAND),t),{name:n})),this}var r=this._commands.get(n)||F([],A(this._commands.values()),!1).find(function(s){return s.aliases&&typeof s.aliases=="string"?s.aliases===n:Array.isArray(s.aliases)&&s.aliases.includes(n)});if(r)return r;if(!this.options.silent){b.warn('Command "'.concat(n,'" not found.'));return}},e.prototype.use=function(n){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return this._plugins.has(n)?!this.options.silent&&b.warn("Plugin has already been applied."):n&&typeof n=="function"?(this._plugins.add(n),n.apply(void 0,F([this],A(t),!1))):this.options.silent||b.error("A plugin must be a function."),this},e.prototype._init=function(){var n=this;if(!this._initialized){var t=this.options,i=t.chatElementSelector,a=t.prefix;if(!(!i||!a)){var r=document.querySelector(i);if(!r){b.error('Given chatElementSelector "'.concat(i,'" not found as an element.'));return}r.addEventListener("keydown",function(s){return Ee(n,void 0,void 0,function(){var c,m,o,d,w,P;return Me(this,function(B){switch(B.label){case 0:return s.code!=="Enter"?[3,2]:(c=r.value,c.startsWith(a)?(m=A(c.trim().slice(a.length).split(/ +/g)),o=m[0],d=m.slice(1),w=this.command(o.toLowerCase()),w?w.disabled?[2]:(P=(0,Fe.createChatContext)(i),w.clearChat&&P.clear(),[4,w.run(this,P,d)]):[3,2]):[2]);case 1:B.sent(),w.focusChatAfterRun&&P.focus(),B.label=2;case 2:return[2]}})})}),this._initialized=!0}}},e}();u.Script=Y});var H=l(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.defineCommand=void 0;function Te(e){return e}j.defineCommand=Te});var K=l(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.definePlugin=void 0;function De(e){return e}L.definePlugin=De});var Q=l(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.Script=void 0;var Ge=q();Object.defineProperty(T,"Script",{enumerable:!0,get:function(){return Ge.Script}})});var X=l(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0})});var te=l(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0})});var ne=l(p=>{"use strict";var Be=p&&p.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),x=p&&p.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&Be(n,e,t)};Object.defineProperty(p,"__esModule",{value:!0});p.ChatContext=void 0;var Ie=M();Object.defineProperty(p,"ChatContext",{enumerable:!0,get:function(){return Ie.ChatContext}});x(Q(),p);x(X(),p);x(te(),p)});var R=l(f=>{"use strict";var qe=f&&f.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),xe=f&&f.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&qe(n,e,t)};Object.defineProperty(f,"__esModule",{value:!0});f.definePlugin=f.defineCommand=f.createScript=f.createChatContext=void 0;var Re=M();Object.defineProperty(f,"createChatContext",{enumerable:!0,get:function(){return Re.createChatContext}});var Ue=q();Object.defineProperty(f,"createScript",{enumerable:!0,get:function(){return Ue.createScript}});var Ve=H();Object.defineProperty(f,"defineCommand",{enumerable:!0,get:function(){return Ve.defineCommand}});var ke=K();Object.defineProperty(f,"definePlugin",{enumerable:!0,get:function(){return ke.definePlugin}});xe(ne(),f)});var re=l(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0})});var ae=l(g=>{"use strict";var $e=g&&g.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),We=g&&g.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&$e(n,e,t)};Object.defineProperty(g,"__esModule",{value:!0});We(re(),g)});var U=l(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.Colors=S.DEFAULT_OPTIONS=void 0;S.DEFAULT_OPTIONS={textColor:"#ffffff",visibilityTime:5e3};var ze;(function(e){e.WHITE="#FFFFFF",e.SILVER="#C0C0C0",e.GRAY="#808080",e.GREY="#808080",e.BLACK="#000000",e.RED="#FF0000",e.MAROON="#800000",e.YELLOW="#FFF000",e.OLIVE="#808000",e.LIME="#00FF00",e.GREEN="#008000",e.AQUA="#00FFFF",e.TEAL="#008080",e.BLUE="#0000FF",e.NAVY="#000080",e.FUCHSIA="#FF00FF",e.PURPLE="#800080"})(ze=S.Colors||(S.Colors={}))});var oe=l(N=>{"use strict";var D=N&&N.__assign||function(){return D=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},D.apply(this,arguments)};Object.defineProperty(N,"__esModule",{value:!0});N.useAlert=void 0;var Ze=U();function Ye(e,n){n=D(D({},Ze.DEFAULT_OPTIONS),n);var t=document.querySelector(n.alertElementSelector),i=n.textColor,a=n.visibilityTime;i&&(t.style.color=i),t.style.fontSize="24px",t.textContent=e,t.style.display="block",setTimeout(function(){t.style.display="none"},a)}N.useAlert=Ye});var se=l(y=>{"use strict";var He=y&&y.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Ke=y&&y.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&He(n,e,t)};Object.defineProperty(y,"__esModule",{value:!0});y.Colors=y.useAlert=void 0;Ke(ae(),y);var Qe=oe();Object.defineProperty(y,"useAlert",{enumerable:!0,get:function(){return Qe.useAlert}});var Je=U();Object.defineProperty(y,"Colors",{enumerable:!0,get:function(){return Je.Colors}})});var le=I(R());var G={};we(G,{setting:()=>ue});var ce=I(R()),h=I(se());var Xe=[{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"}],et=[{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"},{displayName:"Large Render Distance",name:["largerenderdistance","lrenderdistance","renderdistance"],function:window.setRenderDistance,id:"cRenderDistance"}],V=[...Xe,...et];var ue=(0,ce.defineCommand)({name:"setting",aliases:["s"],run:(e,n,t)=>{if(t.length==1){let i=V.find(c=>c?Array.isArray(c.name)?c.name.find(m=>m==t[0]):c.name==t[0]:!1);if(!i){(0,h.useAlert)(`No setting found with name "${t[0]}"`,{alertElementSelector:"#curser",textColor:h.Colors.RED});return}let{displayName:a,id:r}=i,s=document.getElementById(r);(0,h.useAlert)(`The setting "${a}" is turned ${s.checked?"on":"off"}`,{alertElementSelector:"#curser",textColor:s.checked?h.Colors.LIME:h.Colors.RED})}if(t.length==2&&(t[1]=="on"||t[1]=="off")){let i=t[1]==="on",a=V.find(o=>o?Array.isArray(o.name)?o.name.find(d=>d==t[0]):o.name==t[0]:!1);if(!a){(0,h.useAlert)(`No setting found with name "${t[0]}"`,{alertElementSelector:"#curser",textColor:h.Colors.RED});return}let{displayName:r,function:s,id:c}=a,m=document.getElementById(c);s(i),m.checked=i,(0,h.useAlert)(`The setting "${r}" has been turned ${i?"on":"off"}`,{alertElementSelector:"#curser",textColor:i?h.Colors.LIME:h.Colors.RED})}}});var tt=(0,le.createScript)({chatElementSelector:"#chtbox",silent:!0});for(let e in G){let n=G[e];tt.command(n.name,n)}