// ==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 // @downloadURL https://update.greasyfork.cloud/scripts/389548/Agma%20Chat%20Command%20Settings.user.js // @updateURL https://update.greasyfork.cloud/scripts/389548/Agma%20Chat%20Command%20Settings.meta.js // ==/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;t0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]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{"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{"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)}