fight

Private

Content

59 lines
{=(comment):Set up initial tag info}
{=(pref):!}
{=(tagn):fight}

{=(comment):Define role ID for muted role}
{=(role):1134954979111731261}

{=(comment):Define channel ID where this will work}
{=(channel):1145108063569842386}
{=(channelname):#aces-moms-garage}
{=(comment): disabling this for now
{=(comment):Require the specific channel}
{require:{channel}}}

{=(comment):Decide on time muted}
{=(time1):{range:1-60}}

{=(comment):Prepare output strings}
{=(tauntself):Congratulations, you muted yourself...?!}
{=(taunt):Such a weakling!}
{=(syntax.error):Please use command as follows. `{pref}{tagn} <user> OR {pref}{tagn} <user> <Number 1-10>`}

{=(comment):Check if first argument is a user}
{=(firstargcheck):{any({args(1)}=={user(mention)}|{args(1)}=={target(mention)}):true|false}}

{=(comment):Check if second argument is a relevant number}
{=(secondargcheck):{all({2}>0|{2}<=10):true|false}}

{=(comment):Check if second argument exists at all}
{=(secondargexistcheck):{if({args(2+)}!=):true|false}}

{=(iserror):{any({firstargcheck}==false|{if({secondargcheck}=={secondargexistcheck}):true|false}==false):true|false}}

{=(comment):Get optional challenge level and extended time}
{=(chance):{all({secondargcheck}==true|{secondargexistcheck}==true):{2}|0}}
{=(time2):{if({m:{time1}*{chance}}>300):300|{m:{time1}*{chance}}}}

{=(comment):Decide on loser of fight}
{=(userchance):{m:trunc({m:50+{m:{chance}*2}})}}
{=(targetchance):{m:trunc({m:50-{m:{chance}*2}})}}
{=(loser):{#:{userchance}|{user(id)},{targetchance}|{target(id)}}}

{=(comment):Create output for time.}
{=(desc):The mute will last {if({time2}>0):{m:trunc({m:{time2}/60})} Minutes {m:trunc({m:{time2}%60})} Seconds|{time1} Seconds}. Finally some peace!}

{=(comment):Output actual text/results to embed}
{embed(description):{if({iserror}==true):{syntax.error}|{user(mention)} fought {target(mention)} and {if({loser}=={user(id)}):lost|won}! {if({loser}=={user(id)}):{tauntself}|{taunt}} {desc}}}

{=(comment):Create random embed color}
{=(hex):0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}
{embed(color):#{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}}

{=(comment):Actual command block to add muted role to loser}
{=():}
{{if({iserror}==false):c:temprole {if({loser}=={user(id)}):{user(mention)}|{target(mention)}} {if({time2}>0):{time2}|{time1}}s {role}}}

{=(comment):Behaviour fixes. Prevent command block response from displaying, and run with correct permissions.}
{silent}
{override}

Embed

1 line
{"color": 5198940, "description": "Template"}
Raw JSON
{
  "id": 1844452,
  "created_at": "2023-09-30T22:10:30.000Z",
  "tag_name": "fight",
  "nsfw": false,
  "owner_id": "148905756123463680",
  "uses": 1,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "702171264856490044",
  "sharer": "148905756123463680",
  "content": "{=(comment):Set up initial tag info}\n{=(pref):!}\n{=(tagn):fight}\n\n{=(comment):Define role ID for muted role}\n{=(role):1134954979111731261}\n\n{=(comment):Define channel ID where this will work}\n{=(channel):1145108063569842386}\n{=(channelname):#aces-moms-garage}\n{=(comment): disabling this for now\n{=(comment):Require the specific channel}\n{require:{channel}}}\n\n{=(comment):Decide on time muted}\n{=(time1):{range:1-60}}\n\n{=(comment):Prepare output strings}\n{=(tauntself):Congratulations, you muted yourself...?!}\n{=(taunt):Such a weakling!}\n{=(syntax.error):Please use command as follows. `{pref}{tagn} <user> OR {pref}{tagn} <user> <Number 1-10>`}\n\n{=(comment):Check if first argument is a user}\n{=(firstargcheck):{any({args(1)}=={user(mention)}|{args(1)}=={target(mention)}):true|false}}\n\n{=(comment):Check if second argument is a relevant number}\n{=(secondargcheck):{all({2}>0|{2}<=10):true|false}}\n\n{=(comment):Check if second argument exists at all}\n{=(secondargexistcheck):{if({args(2+)}!=):true|false}}\n\n{=(iserror):{any({firstargcheck}==false|{if({secondargcheck}=={secondargexistcheck}):true|false}==false):true|false}}\n\n{=(comment):Get optional challenge level and extended time}\n{=(chance):{all({secondargcheck}==true|{secondargexistcheck}==true):{2}|0}}\n{=(time2):{if({m:{time1}*{chance}}>300):300|{m:{time1}*{chance}}}}\n\n{=(comment):Decide on loser of fight}\n{=(userchance):{m:trunc({m:50+{m:{chance}*2}})}}\n{=(targetchance):{m:trunc({m:50-{m:{chance}*2}})}}\n{=(loser):{#:{userchance}|{user(id)},{targetchance}|{target(id)}}}\n\n{=(comment):Create output for time.}\n{=(desc):The mute will last {if({time2}>0):{m:trunc({m:{time2}/60})} Minutes {m:trunc({m:{time2}%60})} Seconds|{time1} Seconds}. Finally some peace!}\n\n{=(comment):Output actual text/results to embed}\n{embed(description):{if({iserror}==true):{syntax.error}|{user(mention)} fought {target(mention)} and {if({loser}=={user(id)}):lost|won}! {if({loser}=={user(id)}):{tauntself}|{taunt}} {desc}}}\n\n{=(comment):Create random embed color}\n{=(hex):0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}\n{embed(color):#{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}{#:{hex}}}\n\n{=(comment):Actual command block to add muted role to loser}\n{=():}\n{{if({iserror}==false):c:temprole {if({loser}=={user(id)}):{user(mention)}|{target(mention)}} {if({time2}>0):{time2}|{time1}}s {role}}}\n\n{=(comment):Behaviour fixes. Prevent command block response from displaying, and run with correct permissions.}\n{silent}\n{override}",
  "embed": "{\"color\": 5198940, \"description\": \"Template\"}",
  "last_fetched": "2026-10-20T19:24:38.839Z"
}