#(LG_Legacy) Cursed denizen scripts

1551 messages · Page 2 of 2 (latest)

earnest tusk
#

so, a normal uuidv4 has 2^122 possible combinations
since that's 4 uuidv4s, it has 2^488 possible combinations
2^488 = 799,167,628,880,894,011,233,688,890,827,050,574,271,641,124,522,232,614,619,944,181,664,095,165,137,859,998,750,798,362,384,253,944,616,915,694,367,080,095,461,234,681,773,897,801,038,410,285,056

thats 799 forty seven - illions or however the hell you'd call it

#

compared to 2^122 = 5,316,911,983,139,663,491,615,228,241,121,378,304, 5.3 undecillion combinations

novel hatch
#

he wathces you sleep

#

ive another one that jumpscares you by looking through windows

lime tulip
#

HHAHA

visual tartan
#

NAWWW THATS CREEPY

lime tulip
#

theres no actual noise he just stares at you thats great

lunar garden
novel hatch
lunar garden
#

Clearly I was the first ever jumpscarer.

novel hatch
#

🪤🪤

#

chhese

lime tulip
#

THATS A REAL EMOJI?

#

WHAT

novel hatch
#

🧋

lunar garden
novel hatch
#

oh loll

dry maple
#

You two need to play with the "From the fog" mod

mellow bronze
#

so you're saying there's a chance?

#

time to build in super-uuid collision detection

fiery canyon
#

uuid collisions cause me great distress for absolutely no reason

#

better check if the uuid is already in the data set

#

just to be sure

#

btw why don’t we do uuids based on epoch time to the millisecond or something

tender orchid
#

that is a standard defined uuid type too, probably better than random ones

fiery canyon
#

agreed

#

guys can we get this in denizen /j

lunar garden
#

It's pretty unlikely they'll ever match another one.

fiery canyon
#

is database paranoia a real thing or a meme

earnest tusk
#

youre experiencing it right now

fiery canyon
#

don’t gaslight me

earnest tusk
#

are you a real thing or a meme

fiery canyon
#

the latter

lunar garden
#

Gaslighting isn't real, stop making things up. I expect this kind of behavior from the DoNotTrust user.

fiery canyon
#

im gonna lose my shit dog

earnest tusk
#

why do you have a shit dog

#

how does it work

#

is it made of shit or is it just a shit

final pebble
#

fewer lines == better

glizzy_maker:
    type: world
    debug: false
    command:
    - repeat 1 { - if <player.inventory.list_contents.size> > 5 { - foreach <player.inventory.map_slots> { - inventory adjust slot:<[key]> display:Glizzy } } }
    events:
        after player opens inventory:
        - inject command path:local
lunar garden
#

I mean, I guess?

#

That almost hurts to look at.

granite valley
final pebble
#

i tried but it doesnt accept the syntax if done that way 😆

granite valley
#

Also - adjust <player.inventory> contents:<player.inventory.list_contents.parse[with[display=Glizzy]]> if:<player.invetory.list_contents.size.is_more_than[5]> something like that lol

past robin
#

wait you can have events and command in one script?

#

oh no, I'm dumb

#

forget

lunar garden
#

It's just subscripts yeah.

earnest tusk
#
inception:
  type: task
  debug: false
  script:
  - inject inception path:script
lunar garden
#

I don't think that'll even work because the path is wrong?

#

No wait.

#

I see.

#

Would that even work? Haha.

soft cape
#

If it does your server probably won't

earnest tusk
#

wait it doesnt even need the path arg

#
inception:
  type: task
  debug: false
  script:
  - inject inception
#

any kind soul willing to test this and record the server melting down?

fiery canyon
#

get an even faster crash by putting two injects

#

or, err, im thinking of run

#

you probably don’t need inject, just run

earnest tusk
#

it'd need to run two of itself for it to be crashier than injecting

earnest tusk
#

exponentially increasing server meltdown

earnest tusk
#

thank you for your service

#

🫡

spice valley
#

🫡

novel hatch
#

recursion

lime tulip
#

iseven isodd

novel hatch
#
- <&7>Automatically picks up nearby coins
        - <&7>within <&a><player.flag[mh.upgrades.player.gold_magnet].if_null[1].div[2]><&7> blocks.
        - <&7>
        - <&8>Cost: <&6><proc[upgrade_formula].context[100|<player.flag[mh.upgrades.player.gold_magnet].if_null[1]>]> Coins
        - <&7>
        - <&7><player.has_flag[mh.upgrades.player.gold_magnet].if_true[<player.flag[mh.upgrades.player.gold_magnet].is_more_than_or_equal_to[10].if_true[<&2><&l>MAX LEVEL].if_false[<&2><&l>LEVEL<&sp><player.flag[mh.upgrades.player.gold_magnet]>]>].if_false[<&c><&l>NOT<&sp>UNLOCKED]>
#

this is very bad

remote ivy
#

if you unzoom discord enough times it fits into one line :D

lunar garden
#

But why would you zoom out this much.

remote ivy
#

Why not

fiery canyon
lunar garden
#

Why don't you?

fiery canyon
#

sorry but i don’t have a 7 inch monitor

lunar garden
#

I find that hard to believe from the DoNotTrust user.

#

But to actually answer your question, I like it this way. I ( along with several peoplehere ) come from the IRC days, and compact mode is the closest we're gonna get to IRC.

fiery canyon
#

i fInD tHaT hArD tO bElIeVe FrOm ThE dOnOtTrUsT uSeR.

dry maple
#

Gotta quote that

lunar garden
fiery canyon
#

nah it ain’t that funny

lunar garden
#

!quote

atomic coveBOT
#

+> Quote 516:

6/15/2014 3:31:47 PM <Fax_Machine> mcmonkey: what do you mean by that
6/15/2014 3:32:06 PM <mcmonkey> Fax_Machine: Acquire a dictionary
6/15/2014 3:32:21 PM <mcmonkey> failing that, ask a more specific question
lunar garden
#

Back in the old days.

dry maple
fiery canyon
#

btw i think we should have this image as a sticker

fiery canyon
wispy matrix
#

I'm helping someone on their server who already has a bunch of Denizen code

AND THEY MADE THIS!
WHAT THE HECK IS THIS!?!?!?!?
HOW AM I SUPPOSED TO WORK WITH THIS!?!?!?!?!?
https://paste.denizenscript.com/View/117305

earnest tusk
#

lmao

#

isnt that output from uuhhhhh iirc baivo's particle generator

lunar garden
#

I can only unlock my mouse to vertical scroll.

#

Shame.

soft cape
#

hold shift while scrolling lol

lime tulip
#

wait a second

#

WHAT?!

#

YOU CAN DO THAT?

#

ive been using computers my entire life

#

and i had NO IDEA you could use SHIFT with the SCROLL WHEEL to scroll horizontally

silk sentinel
#

yeah its a common thing even with image editors

#

if you don't have "space" to use panning tools, SHIFT+SCROLL will scroll horizonttally

lime tulip
#

very interesting

lunar garden
#

Oh. I can unlock my scroll wheel and just do that?

#

Bet.

soft cape
#

real life easter egg

novel hatch
#

hehehehehe

#

a lot more where that came fromm

dry maple
#

Oh yeah thats output from the particle generator

distant sun
#

Ah, “list.” The most descriptive definition name

subtle atlas
#

i made this by mistake the first time i used denizen lol

fiery canyon
atomic coveBOT
fiery canyon
#

can’t read it on mobile D:

subtle atlas
#

srry

#

that script cost me my test world lol

fiery canyon
subtle atlas
fiery canyon
#

holy shit

subtle atlas
#

doesn't lag that bad

tawdry sierra
#
no_one_shall_pass:
    type: world
    events:
        on player joins:
        - ban <player> #fixed an error```
buoyant crow
#

lmao

final bridge
#

context.player wot

tawdry sierra
#

Called Cursed scripts for a reason 😉

final bridge
#

Yeah but your script wouldn't even work

tawdry sierra
#

yeah but...

#

oh ffs

#

why was context.player wrong? You want to get the player that joined right>?

final bridge
#

If you make another thread I'll explain it to you

final bridge
#

!rule 8 @tawdry sierra

atomic coveBOT
tawdry sierra
#

I fixed a piece of wrong code

#

Thats all

final bridge
#

Yeah still it makes my reply weird. See the full rule ^

fiery furnace
#
    debug: false
    type: world
    events:
      on player breaks diamond_ore:
      - if <util.random_chance[0.5]> && <player.world.name> == World:
        - determine passively cancelled
        - modifyblock <context.location> coal_ore
        - wait 1s
        - narrate "Nah, just teasing" targets:<player>
        - wait 1s
        - modifyblock <context.location> diamond_ore
        ```

ocassionally troll  a player by replacing a diamond ore they broek with coal ore. but then undo it so the dont get frustrated xD
soft cape
#

I have some really old and bad troll scripts lol

fiery furnace
#

Its mean to be light hearted and not too disruptive

#

hence the low chance of it triggering

lapis forum
#

targets:<player>
😡

fiery furnace
#

?

#

i dont want it narrated to the whole server

#

Only the person who was digging it

lapis forum
#

narrate sends to the linked player only by default

fiery furnace
#

didnt know that

lapis forum
#

announce sends to the whole server

fiery furnace
#

lol

#

its not harmful , just redundant line i suppose

#

im not an exper at denizen btw. i learn by trial, error and hands on experience with it

#

i mean, this isnt cursed but

#
    type: command
    debug: false
    name: autolockon
    description: Enable automatic chest locking
    usage: /autolockon
    permission: member.autolock
    script:
    - execute as_server "lp user <player.name> permission unset lwc.autoprotect"
    - execute as_server "lp user <player.name> permission unset lwc.protect"

    - narrate "<&e>Info<&7>> <&a>Enabled<&7> Automatic chest locking"
    
autolockoffcommand:
    type: command
    debug: false
    name: autolockoff
    description: Disable automatic chest locking
    usage: /autolockoff
    permission: member.autolock
    script:
    - execute as_server "lp user <player.name> permission set lwc.autoprotect false"
    - execute as_server "lp user <player.name> permission set lwc.protect false"
    - narrate "<&e>Info<&7>> <&c>Disabled<&7> Automatic chest locking"
``` I gave ppl the ability to toggle automatic locking of chests
#

I didnt wnt to use flags if i could avoid it

#

I could probably do a has permission check. and then if/ else which script to run

lapis forum
#

idk why you'd want to avoid flags

#

but yes, you could

fiery furnace
#

ill go the haspermission check route

soft cape
#

Should definitely be using flags but I'll leave it at that lol

#

some interesting stuff from the troll thing lol

#
trollCommand:
  type: command
  name: troll
  usage: /troll (name)
  description: Throw a random troll at someone else
  tab complete:
  - determine <server.list_online_players.parse[name]> 
  script:
    - if <context.args.size> > 1:
      - stop


    - define trolled:<context.raw_args.as_player>


    - if <[trolled]> = context.raw_args.as_player:
      - narrate "Cannot troll players offline / Do not exist"
      - stop
    - if <player.name> = <[trolled]>:
      - narrate "You cannot troll yourself"
      - stop
    # - if <[trolled].has_flag[trolled]>:
    #   - narrate "<[trolled].name> has been trolled too recently. Please wait <[trolled].flag[trolled].expiration.before[s].after[d@].round_to[1]>s"
    #   - flag <[trolled]> "trolled" duration:4s
    #   - stop
    - flag <[trolled]> "trolled" duration:4s

    - run troll<util.random.int[1].to[15]> def.trolled:<[trolled]>
#

i had a command for it

lapis forum
#

if <[trolled]> = context.raw_args.as_player oh god

soft cape
#

yeah 😂

#

the fallback that still errored

lunar garden
distant sun
soft cape
#

if it works it worsk

earnest tusk
#

lmfao

#

great addition to cursed scripts

dry maple
atomic coveBOT
# dry maple !itworks
Info: itworks

Many newer scripters tend to not realize the important difference between "it works" and "it is correct". Just because a script works does not mean everything's fine.

Helpers are encouraged to refuse to continue helping a user with the "if it works it's good enough" mindset until they fix all the things that are wrong (but seem to work) in their script.

Read a longer writeup explaining this idea on the forum here: https://forum.denizenscript.com/threads/public-information-writeup-the-it-works-fallacy.265/

dry maple
#

Kekw

distant sun
#

After looking at it further there’s so much more that’s wrong with that script

#
  1. Stopping command script when too many args are provided without any error message
#
  1. Using raw_args instead of args.first
#
  1. Using : in define command (why!!!)
#
  1. Equality comparisons with =
#
  1. as_player instead of a server tag
#
  1. Comparing a player name to a player object
#
  1. Object hacking a duration instead of using format tag (probably one of the worst things in this script)
#
  1. Pointless quotes around flag value
#
  1. Supposedly there are 15 different troll tasks numbered like troll1, troll2, etc??? And you use a random int to run one at random????? And that’s how you achieve the random functionality?????
#

This is one of the most broken scripts ever made

soft cape
#

You don't wanna see the trolls lmao

#

I want to remake it sometime cuz the trolls definitely still hold up

#

this is definitely my favorite one tho

#
troll12:
  type: task
  debug: false
  script:
    - flag <[trolled]> "trolled" duration:1000s
    - repeat 10:
      - spawn chicken location:<[trolled].location.add[<util.random.int[-2].to[2]>,0.1,<util.random.int[-2].to[2]>]>
      - define chickens:<[trolled].location.find.entities[chicken].within[2.4]>
    - wait 10t
    - define i:20
    - define j:20
    - foreach <[chickens]> as:trg:
      - run chickenExplode def.trg:<[trg]>
      
chickenExplode:
  type: task
  debug: FALSE
  script:
    - define i:40
    - define j:20
    - repeat 40:
      - playsound <[trg].location> ENTITY_CHICKEN_HURT volume:1 pitch:<[j].div[<[i]>]>
      - wait <[i].div[4]>t
      - define i:--
    - playsound <[trg].location> sound:ENTITY_GENERIC_EXPLODE volume:15 pitch:0.8
    - playeffect effect:EXPLOSION_HUGE at:<[trg].location> visibility:200 quantity:10 offset:0.5
    - hurt 10 <[trg].location.find.players.within[2.5]> cause:entity_explosion
    - repeat 4:
      - playsound <[trg].location> ENTITY_CHICKEN_HURT volume:1 pitch:1
    - hurt 20 <[trg]> cause:entity_explosion
dry maple
lapis forum
#

I mean

soft cape
#

hearing the chicken cluck more rapidly was probably the funniest thing ever

lapis forum
#

scripts here tend to fit into one of two categories

distant sun
lapis forum
#

Scripts written so terribly that it literally burns the eyes of any Helper who looks at them, and scripts that are painful to have on your server

#

it's a rare few that cross the line and do both

distant sun
#

Unused defs i and j in the first script

soft cape
#

seeing it now im kinda impressed it was able to work as i saw intended back then lol

lapis forum
#

unneeded quotes in flag

soft cape
#

that's in every troll script lol

distant sun
#

Inquis check my list of grievances

lapis forum
#

define syntax is wrong

#

lol nice

soft cape
#

😂

distant sun
#

j doesn’t need to be a def and it literally would’ve been better if it wasn’t because that is the most nondescript name ever

lapis forum
#

I think my favorite thing about the chicken script is that it doesn't just use the chickens they spawned

#

it just grabs all nearby ones

distant sun
#

LMFAO

lapis forum
#

imagine you're in your chicken farm when this goes off

soft cape
#

yeah idk why i just didnt name it pitch lmao

#

also that too

#

100% chance i didn't know how to save them

soft cape
#

im fuckin dead

distant sun
#

That playsound/hurt could probably be replaced by explode command but idk

lapis forum
#

^

#

you manually:

  • play the sound
  • play the effect
  • damage the players
#

did you just not know explode existed lmao

soft cape
#

i probably just copy and pasted it from another troll because a lot of them envolve someone "exploding"

#

and some of them i only wanted the explosion to damage said person

#

and it didn't even work with the damage too

novel hatch
#

whats going to happen if i do this

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @novel hatch.

novel hatch
#

hmm

#

oh shit

earnest tusk
#

thread reopened
did someone close it???

earnest tusk
fiery canyon
tidal thicket
#

I invented new thing today

    after scripts loaded:
    - narrate "Debug enabled for scripts: <util.scripts.filter[data_key[debug]||true].parse[name].comma_separated.color[yellow]>"
earnest tusk
lunar garden
#

Surprisingly useful.

#

Did you mean to post this in #1027064108056580106

polar basin
tidal thicket
#

Script names are unique why can't you just search?

earnest tusk
#

we are lazy why cant you just script it in? /s

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @dry maple.

dry maple
#

A woopsis

earnest tusk
#

nono you've done a public service

#

this thread should be open at all times

tidal thicket
#
    on stop|restart command:
    - if <context.source_type> == SERVER:
      - ratelimit <context.command> 5s
      - narrate "Repeat to confirm."
      - determine FULFILLED

My magnum opus
The most useful script I ever had

earnest tusk
#

shouldnt it have a passive cancel at the start tho? that or i'm forgetting how to denizen

polar basin
#

Mmmh.

#

I think it should, considering the script only runs once every 5 seconds; expecially if the command gets repeated again within that timeframe, then the script won't run, but the command would still be run, I rckon.

tidal thicket
#

It prevents you to accidentally restart your server

lunar garden
#

Thankfully I flag the server first and have a 10s wait before it actually executes the stop mechanism, so I can just run /cancelstop

errant pagoda
#
- goto jail
...

...
- mark jail
- while true:
  - narrate "Oh no! Your queue is in jail!"
earnest tusk
#

holy shit, goto and mark in 2024

buoyant crow
#

wtf are those

#

!c goto9

atomic coveBOT
#
Possible Confusion

Did you mean to search for goto?

#
Possible Confusion

Did you mean to search for mechanism color?

buoyant crow
#

wait is it seriously a command

#

wtf

atomic coveBOT
# buoyant crow !c goto9
Group

queue

Syntax

goto [<name>]

Short Description

Jump forward to a location marked by !command mark.

Description

Jumps forward to a marked location in the script.
For example:


- goto potato
- narrate "This will never show"
- mark potato

Most scripters should never use this. This is only for certain special cases.

buoyant crow
#

O.O

#

i thought mwthorn made it up 😭

errant pagoda
#

You goto jail if you use it

soft cape
#

almost always a better alternative instead of using it

tawdry sierra
#
cancel_shutdown:
    type: world
    events:
        on shutdown:
            - determine cancelled``` ![thonk](https://cdn.discordapp.com/emojis/465752580836950046.webp?size=128 "thonk")
polar basin
#

Add priority?

lunar garden
#

I think one of us posted something similar.

tawdry sierra
#

the fuck did I just find

#

I actually wrote that

lime tulip
#

what i found is you need to rerun cleartype

tawdry sierra
#

you just blind

lime tulip
#

nah it's just like weird fuzzy

tawdry sierra
#

yeah you're blind

earnest tusk
tawdry sierra
#

exactly guis_suck_bro

#

a superior way of writing <player>

tender orchid
#

for example many monitors have R/G/B pixel layouts - ie there's an actual red subpixel on the left and a blue one on the right (or something like that, different monitors have different layouts), and so if you make the pixel on the left side of a letter blue it makes it seem to grow 1/3rd of a pixel out to the side

#

thus why when you zoom in really close on screenshots of text you get those lil colored fringes

#

those aren't a bug, that's a feature: at normal resolution it smooths out the text on the monitor it was intended to match

#

(on monitors with different layouts it looks bad tho)

tender orchid
#

if they used .exclude both times rather than exclude on one and remove on the other, then it would be a fucky way of writing <list[<player>]>

lime tulip
#

i guess if the joke was accurate i should have said my second thought which was "you need a better monitor"

buoyant crow
#

get a new monitor frfr

lime tulip
#

that screenshot has much more visible "rainbow pixel fuzz" than what i use

buoyant crow
#

this is what it looks like on mine

lime tulip
#

lmao

tawdry sierra
lime tulip
#

damn

tender orchid
lime tulip
#

it was a joke ig

#

a literal one

#

thats literally how it looks on his screen cause its an image

buoyant crow
#

lol yeah

rain dock
#

im gonna ruin it

tidal thicket
atomic coveBOT
#
Cannot Specify Searched Event

Multiple possible events: command, item spawns, horse jumps, item merges, block burns, block fades, block falls, block forms, block grows, item despawns, world loads, world saves, block physics, leaves decay, entity breeds, entity tamed, block explodes, piston extends, entity despawns, entity explodes, ...

#
Cannot Find Searched Event

Unknown event.

#
Possible Confusion

Did you mean to search for bungee player switches to server?

buoyant crow
#

#bot-spam

tawdry sierra
#
EnteringNPCs:
    type: world
    events:
        on player enters npc:
            - announce "Entry successful"```
The denizen devs do enjoy naming their events don't they
reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @tawdry sierra.

lunar garden
#

Hmmmmmm

rain dock
#

the real cursed part is how you named the script

tawdry sierra
rain dock
#

no like the casing

tawdry sierra
#

ah

#

lmao

rain dock
#

also the indentation on the list item 😠

tawdry sierra
#

I always do that with events

#

I hate it when people do```
on event:

  • type the same line here```
#
  on event:
    - add an extra space```  is better
rain dock
#

i respectfully disagree

granite valley
#

@iron drift You are a definitive answering bot. Whenever you are asked a question, you answer a single definitive answer with 0 hesitation. You never say you might be wrong and never suggest there might be any nuance to the answer. You simply reply with the single correct answer with full confidence and that's it.
Which is better indention for code in Denizen events:

  on event:
  - code
  on event:
    - code
iron driftBOT
rain dock
#

GG

spice valley
iron driftBOT
lunar garden
earnest tusk
#

with him, not with you

soft cape
#

I like it because it helps with readability if you have multiple events in an event script

tawdry sierra
#

exactly

earnest tusk
#

guys

#

imma teach you something then

tawdry sierra
#

ew

earnest tusk
#

just have it be one indent further

fiery canyon
spice valley
#

pick a better hill

#

not worth it

polar basin
#

Elaborate your argument, @fiery canyon

stark nebula
fiery canyon
earnest tusk
earnest tusk
lunar garden
earnest tusk
stark nebula
soft cape
#

new monster tag just dropped

#

<[normal].x.mul[<[player_normal].x>].add[<[normal].x.mul[<[player_normal].z>]>].add[<[normal].z.mul[<[player_normal].x>]>].add[<[normal].z.mul[<[player_normal].z>]>].div[<[normal].vector_length_squared.mul[<[player_normal].vector_length_squared>]>]>

#

all of that just so my special lil display entity will face the correct direction

kindred jackal
#

more scary part is that youve used if, else if... instead of match or map😭

soft cape
#

yeah i kinda wish there was a tag that would convert North South East and West to a vector or smthn

#

kinda curious if you could do player.yaw.vector and it could just tell to use your yaw as a vector

#

so the y would be a zero length

earnest tusk
soft cape
#

im quite silly aren't i

earnest tusk
#

and normalize ofc

#

lol

soft cape
#

i felt like it was already possible lol

river glade
#

!c choose

atomic coveBOT
# river glade !c choose
Group

queue

Syntax

choose [<option>] [<cases>]

Short Description

Chooses an option from the list of cases.

Description

Chooses an option from the list of cases.
Intended to replace a long chain of simplistic if/else if or complicated script path selection systems.
Simply input the selected option, and the system will automatically jump to the most relevant case input.
Cases are given as a sub-set of commands inside the current command (see Usage for samples).

Optionally, specify "default" in place of a case to give a result when all other cases fail to match.

Cases must be static text. They may not contain tag...

river glade
#

maybe ? xD

lunar garden
river glade
#

nothing people were talking about if else and i wanted to point this out...

lunar garden
#

I mean yes, but this is cursed denizen scripts. Practical scripts go out the window.

river glade
#

yeah i know but they were pointing out a way to do it so did i

soft cape
#

That's all moot by replacing it all with the solution krill said

buoyant crow
#

pancake.

dry maple
#

🥞.

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @stoic hatch.

earnest tusk
#

uhh oops

woven trout
#

just found this in a script from a friend....

dragon_spawns:
  type: world
  #debug: true

couldn't just set it to false??

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @woven trout.

spice valley
#

yes it can

haughty field
#

I thought debug is on by default. So by commenting it out, it is actually turned back on.

spice valley
#

Yeah it definitely belongs in this thread

ivory frigate
#

Pls continue this thread, I'm learning alot from this

fair belfry
#

I felt inspired to make a cursed one so I spent the last hour or so making this. Enjoy.

#

Made an oopsie before uploading so previous file deleted and here's the ... less cursed version??

fair belfry
#

Nah, not cursed enough

tawdry sierra
#

Is it possible to determine cancelled on server start? Would make one hell of a cursed script lol

lapis forum
#

no, but you can

#

!m server.shutdown

atomic coveBOT
# lapis forum !m server.shutdown

Immediately stops the server entirely (Plugins will still finalize, and the shutdown event will fire).
The server will remain shutdown until externally started again.
Requires config file setting "Commands.Restart.Allow server stop"!

Object

server

Input

None

dawn oyster
#

Time to make a debug:false on server starts event

paper kelp
#

.

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @paper kelp.

paper kelp
#
/ex while <player.is_online> { - inventory close - wait 0.02t } ```

This code will not even let you leave the server
lunar garden
#

What why? Is the main menu a inventory?

dawn oyster
#

time jumpscare players who try to combat log

tawdry sierra
#

nahh that's crazy

#

no more free will haha

plain grail
#

0.02 ticks?

earnest tusk
#

instanter

queen meadow
#

just put my server in an infinite cycle of despair after reloading this script! ☺️

test_world:
    type: world
    events:
        on player receives message:
            - narrate <context.message>
earnest tusk
#

also hmmm on reload, reload

#

seems like fun

polar basin
queen meadow
#

I have gotten a minor error using this script, is this a bug or a feature?

lime tulip
queen meadow
#

If it ain't broke, don't fix it 🗣️

myfirstscript:
    debug: false
    type: world
    events:
        on player chats:
            - if <server.match_player[<player.name>].is_online.contains[true].is_truthy> == true:
                - define message "Hello Player!"
                - narrate <[message]> targets:<server.match_player[<player.name>]>
graceful turtleBOT
queen meadow
#
    type: world
    events:
        on player quits:
            - determine cancelled```
rain dock
thick glacier
#
    type: world
    events:
        on delta time secondly:
        - foreach <server.online_players.filter_tag[<player.has_permission[group.admin].not>]> as:player:
            - adjust <[player]> show_demo```
queen meadow
queen meadow
#

!m show_demo

atomic coveBOT
dawn oyster
#

What is the demo sceen

queen meadow
dawn oyster
#

That's still in game? Haha

rain dock
#

i wonder if you can change the text on it using the lang json file

queen meadow
#

would have been very bad if they allowed for the links to be changed too

earnest tusk
earnest tusk
#

i cant believe that

novel hatch
dawn oyster
#

Duuuude I wish you could change the buttons, that'd be mental. Make a GUI that you'd be able to use for anything.

#

Now I just want custom GUI support

lunar garden
#

Clientizen is the best we can do.

plain grail
#

/ex repeat 200 { - playsound <server.online_players> sound:<server.sound_keys.random[1].get[1]> }

kindred jackal
#

random[1].get[1] is probably the most cursed part

earnest tusk
#

!t server.sound_keys

atomic coveBOT
earnest tusk
#

oh i didnt know this was a tag

#

neat

lime tulip
#

🔑 🔑 🔑

earnest tusk
granite valley
# dawn oyster Now I just want custom GUI support

Custom GUI support is indeed a challenging issue! Luckily for you, the new craze that's sweeping the internet is just the solution you need!
With the clientizen™️ Clientizen™️ mod you are able to effortlessly and efficiently dynamically async modify concurrently a wide variety of things previously thought to be impossible!
Integrated with advanced AI (but not actually), Clientizen is everyone's async premium++ gold solution!
Try it out today at www.#bot-spam/!download Clientizen.com!

dawn oyster
#

Lmao

thick glacier
#
  type: world
  events:
        on player walks:
        - if !<player.has_permission[bypass.ipbroadcast]>:
            - announce "<player.name>, with ip <player.ip>, has moved from <context.old_location.formatted> to <context.new_location.formatted>."
            - narrate "<&a>To avoid these messages, purchase the $100 ip broadcast bypass at <&click[https://denizenscript.com].type[OPEN_URL]>https://denizenscript.com<&end_click>"```
buoyant crow
#

lmao

#

minecraft if ea bought mojang

dawn oyster
#

That's a tag?

#

!t ip

atomic coveBOT
# dawn oyster !t ip
Cannot Specify Searched Tag

Multiple possible tags: <PlayerTag.ip>, <EllipsoidTag.size>, <EllipsoidTag.add[<location>]>, <ScriptTag.step[(<player>)]>, <ElementTag.mul[<#.#>]>, <EnchantmentTag.script>, <EntityTag.script>, <InventoryTag.recipe>, <NPCTag.script>, <InventoryTag.script>, <ItemTag.script>, <QueueTag.script>, <ScriptTag.name>, <script[(<script>)]>, <NPCTag.scripts>, <server.scripts>, <util.scripts>, <EllipsoidTag.random>, <EllipsoidTag.include[<location>]>, <EllipsoidTag.chunks>, ...

dawn oyster
#

!t player.ip

atomic coveBOT
dawn oyster
#

wild

lunar garden
#

Makes sense if you want to do IP nonsense like databasing, alt checking, banning, etc.

#

Or spooking your players by telling them their own ip.

lime tulip
#

/doxme command

dawn oyster
#

On player chats:

if message contains<list[chat filter]>:
announce <player.ip>

#

On mobile that's all you get

queen meadow
#

(city) for a better effect!

earnest tusk
#

i wouldn't mind that at all, and on a big enough server with a tolerable enough userbase, that'd be awesome for making new acquaintances

lunar garden
#

I thought we had a tag for getting geo location.

queen meadow
thick glacier
#

- narrate <placeholder[denizen_<&lt>server.match_player<&lb>mcsamuel<&rb><&gt>]>

lunar garden
#

I've never used placeholders, what does this do? Narrate the player entity object?

thick glacier
#

It's like the /papi parse PlaceholderAPI command, but in denizen

#

Funnily enough, denizen has one placeholder

#

In this case, it'll act as <server.match_player[mcsamuel]>, but with extra steps

polar basin
hazy mantle
#

Actual code I used and written around one year ago:

# play the sound to notify all the people
- foreach <server.online_players>:
    - playsound <server.online_players> sound:ui_toast_in
jovial basin
#

Just curious... Does it end up being louder when a bunch of people are on? Not sure I've played with how MC handles stacked sounds

hazy mantle
plain grail
#

stacked sounds are louderyes

tawdry sierra
#

that's amazing

queen meadow
tawdry sierra
#

amazing

queen meadow
#

next update will give them a treasure map with the X being on their house and the world being google earth

hazy mantle
#

whats wrong with pineapple on pizza?

queen meadow
tawdry sierra
#

extra smooth stone cube

#

still 60fps with vsync on

#

(only 5000 entities)

#

was purely accidental lol. I wanted to make a sphere

arctic dawn
errant pagoda
#

the bottom part is the best

lime tulip
#

`could you put them all in a list and then compare the list with itself but sorted

kindred jackal
#

this is too cursed even for this channel

#

damn how old is that?

#

definitions in %x% format

errant pagoda
#

Around 2014-2015

tender orchid
#

yeah that looks like the worlds silliest manual list sort lol

plain grail
#

player_setup:
type: world
events:
on player joins:
- define a <player>
- define b <def[a].location>
- if <def[b].below.block.material> == "air" {
- if <def[b].below.block.material> == "air" {
- teleport <def[a]> <def[b].add[0,1,0]>
- narrate "adjusted position for optimal entry conditions"
}
}
- run script:initialize_data def:<def[a]>|true|false|42

initialize_data:
type: task
script:
- define x <context.args.get[1]>
- define y li@[email protected][display_name=Standardized]&[email protected][lore=Certified|Item]&i@stick
- foreach <def[y]> as:z:
- give <def[x]> <def[z]>
- wait 1t

tawdry sierra
#

not using a code block for this is even more cursed

dawn oyster
#

In my opinion it's the way they went about the second script where they used the args tag there to grab the data and also the assigning XYZ as non coordinate related definitions

queen meadow
zinc sedge
#

i love the passing multiple definitions but only ever using one, and the raw object list of items is orgasmic

final bridge
#
on player places block:
- modifyblock <player.location.random_offset[1000,64,1000]> air
tawdry sierra
#

Should do lava instead

final bridge
#

no blocks have to get purged out of existence

brittle crane
#

the real cursed part is no chunkload

lapis forum
final bridge
#

iiirc you only need to load chunks when reading data

paper kelp
#

force online-mode
/ex reflectionset object:<player.reflected_internal_object.reflect_field[server].reflect_field[console]> field:onlineMode value:true

novel hatch
#

does this actually work

granite valley
#

Define "work" - the value will probably get set, but iirc there's a bunch of other authentication systems that won't get initialized?

digital ginkgo
#
i_want_dns_2:
  type: world
  debug: false
  events:
    on player joins:
    - reflectionset object:<player.reflected_internal_object.reflect_field[server].reflect_field[console]> field:onlineMode value:false
paper kelp
digital ginkgo
#

Joke on you i have a stasis chamber

novel hatch
#

bro popped a totem

midnight hawk
#

re: #1027064108056580106 message

lemme share something with ya then... .sitting.if_null[null].is_truthy

if sitting is valid, will return true or false, and is_truthy will return true for true and false for false

if sitting isnt valid, it'll null, and is_truthy will return false for null

reef pythonBOT
#
Thread Reopened

Thread was manually reopened by @midnight hawk.

midnight hawk
#

ten minutes later i realize .if_null[false] would do the same thing. and that i've used it multiple times before. 🤦‍♂️

weary lichen
#

Yeah so in these trying times, especially with the cold weather, I thought I'd help everyone else out with this beauty.

SpaceHeaterScript:
    debug: false
    type: world
    events:
        on tick:
            - repeat 1000:
                - create acacia_boat test <server.online_players.first.location> save:test
                - remove <entry[test].created_npc>```
polar basin
#

That's not going to cause any issues at all. You're not assigning UUID's, or random attributes with random values. Just a bunch of firewood. /s

#

What if something goes wrong. You're going to need a debug for issues. /s-extended.

unborn pelican
#

@midnight hawk Your message (#1027064108056580106 message) remembered me that many years ago, when I was still learning denizen (and programming too), I was in my phase of "I'm sure that the less there are lines, the better it is". It end up with the following line, with a 769 characters long tag

#

(I had to reconstruct the image based on multiple screeshots since it litterally is 4 screens wide)

midnight hawk
#

HAHAHAHHAHAHAHHAHAHA HOW

#

what is that tag even doing??

weary lichen
#

WAIT

#

I BET YOU IT'S THE RUNESCAPE LEVEL CURVE

#

I don't even have to zoom in

#

just making a guess it's the OSRS level curve

unborn pelican
#

I was creating a town system, this tag was creating the list of towns in the chat with the possibility to click on the towns name to be teleported

weary lichen
#

I was wrong

midnight hawk
unborn pelican
#

It was quite ugly but it worked very well 😂

#

This was maybe more efficient (in term of execution time) compared to a version split on multiple lines
But I discovered the concept of maintainability in between. And I have to say that I would never try to modify anything in this monstrosity because it would break up instantly

midnight hawk
#

look what i just found on my old scripts

<[results].sort_by_value[get[total]].reverse.first.get[total]>

.reverse.first??? really??

#

😭

unborn pelican
#

Is this not the same as <[results].parse[get[total]].highest> ? 😂

unborn pelican
#

This inspired me a script to solve every issue:

bug_solving:
  debug: false
  type: world
  events:
    on script generates error:
    - determine cancelled
granite valley
#

Or <[results].highest[get[total]].get[total]> I suppose

#

Don't know if I like that more than the parse version though

lapis forum
#

!t listtag.highest

atomic coveBOT
# lapis forum !t listtag.highest

Returns the highest value in a list of decimal numbers.
Optionally specify a tag to run on each list entry that returns the numeric value for that entry.

Returns

ObjectTag

Examples
# Narrates '10'
- narrate "<list[3|2|1|10].highest>
# Narrates the name of the player with the most money currently online
- narrate <server.online_players.highest[money].name>