Help with *eval* [specific responses]

Hey @loldest159!

Pretty sure you’re talking about this post:

It’s pretty simple, create a Pastebin (create an account first so you can go back an edit the paste later) with the following data:

{
  "die": 100,
  "responses": {
    "0": "response a",
    "50": "response b",
    "66": "response c",
    "77": "response d",
    "99": "response e",
    "100": "response f"
  }
}

Then copy/paste the command they wrote, replacing XXXXXXXX with the id of your paste.

$(eval z=decodeURIComponent;const a=z("$(querystring $(user))"),{die:b,responses:c}=JSON.parse(z("$(querystring $(urlfetch json https://pastebin.com/raw/XXXXXXXX))")),d=(a=>Math.ceil(Math.random()*a))(b),e=((a,b)=>{const c=Object.keys(a).map(Number).sort((c,a)=>a-c);for(const d of c)if(b>=d)return a[d];throw new Error("responses")})(c,d);`${a} rolls the D${b} and hits a ${d}. ${e}`)
1 Like