#(Joshie) Denizen item code but using a mythic crucible furniture?
1435 messages ยท Page 2 of 2 (latest)
12.03 00:02:11 [Server] INFO ERROR in script 'lantern_of_warding' in queue 'LANTERN_OF_WARDING_741309_0TickAccredited' while executing command 'FLAG' in file 'scripts/warding.dsc' on line '61'!
12.03 00:02:11 [Server] INFO Error Message: Cannot flag 'context.entity.location': that does not appear to be an object! Only objects (like an EntityTag) and special keyword 'server' are flaggable!
12.03 00:02:11 [Server] INFO +- Queue 'LANTERN_OF_WARDING_741309_0TickAccredited' Executing: (line 62) remove <context.entity> ---------+
12.03 00:02:11 [Server] INFO ERROR in script 'lantern_of_warding' in queue 'LANTERN_OF_WARDING_741309_0TickAccredited' while executing command 'REMOVE' in file 'scripts/warding.dsc' on line '62'!
12.03 00:02:11 [Server] INFO Error Message: Invalid context ID 'entity'!
12.03 00:02:11 [Server] INFO Additional Error Info: Tag-base 'context' returned null.
12.03 00:02:11 [Server] INFO Additional Error Info: Tag <context.entity> is invalid!
12.03 00:02:11 [Server] INFO Additional Error Info: Unfilled or unrecognized sub-tag(s) 'context.entity' for tag <context.entity>!
12.03 00:02:11 [Server] INFO Additional Error Info: 'context.entity' is an unknown argument! This was probably caused by a tag not parsing properly.
12.03 00:02:11 [Server] INFO Additional Error Info: Woah! Invalid arguments were specified!
12.03 00:02:11 [Server] INFO Must specify entity/entities!
12.03 00:02:11 [Server] INFO +> [CommandExecutor] Usage: remove [<entity>|...] (world:<world>)
12.03 00:02:11 [Server] INFO +> [CommandExecutor] (Attempted: REMOVE <context.entity>)
12.03 00:02:11 [Server] INFO +---------------------+
12.03 00:02:11 [Server] INFO +- Queue 'LANTERN_OF_WARDING_741309_0TickAccredited' Executing: (line 63) determine NOTHING ---------+
Clearly, I need to do that more
๐
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
!paste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
If you going to post scripts / debugs, please use the proper tools for it.
Content of Denizen Script Paste #107226: Unnamed Denizen Script Paste... pasted 2023/03/11 16:03:05 UTC-08:00, Paste length: 3358 characters across 73 lines, Content: wardinglantern: type: item
Here we go
Oh wrong thing jesus I need some sleep soon ๐
But yeah console should help me clear it up
<context.entity> is not a valid context for the hanging breaks event
!e hanging breaks
Entity
<hanging> breaks (because <cause>)
when a hanging entity (painting, item_frame, or leash_hitch) is broken.
<context.cause> returns the cause of the entity breaking. Causes: <@link url https://hub.spigotmc....
<context.entity> returns the EntityTag that broke the hanging entity, if any.
<context.hanging> returns the EntityTag of the hanging.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Filled tag <context.hanging.location.has_flag[lantern_of_warding]> with 'false'.
wait i'm confused
Its just the flag not passing it seems
entity breaks
oh my god
on hanging breaks:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- remove <context.hanging.entity>
- determine passively cancelled
entity breaks hanging on that one and entity breaks on the other one
So this is borked?
my bad ๐ซค
It works without the if statement lol
yeah no i was wrong
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Record a debug of it
kk uno momento
thank you for clearing that up haha i was so confused
Content of Server Log Paste #107227: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 16:14:24 UTC-08:00, Paste length: 19852 characters across 173 lines, Content: Java Version: 17.0.5Up-time: 19h 13m
Here is me placing one on a block, breaking the block
then gravity doing its thing
00:14:19 Filled tag <context.hanging.location.has_flag[lantern_of_warding]> with 'false'.
00:14:19 No part of the if command passed, no block will run.
Full script
Content of Denizen Script Paste #107228: Unnamed Denizen Script Paste... pasted 2023/03/11 16:15:46 UTC-08:00, Paste length: 3364 characters across 73 lines, Content: wardinglantern: type: item
You should read further
https://paste.denizenscript.com/View/107227#134
you missed this
Content of Server Log Paste #107227: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 16:14:24 UTC-08:00, Paste length: 19852 characters across 173 lines, Content: Java Version: 17.0.5Up-time: 19h 13m
Bruh
Yeah thats broken but the if isn't even passing xD
but i'll fix that โค๏ธ ty
Must specify entity/entities!
thonk
<context.hanging.entity>
I'm so sure i tried it i'll give it a shot ty
Oh my fking god
I was editing the flag line
Wow the if command works now..
So i guess that broken part broke the whole if command?
Is that how denizen works?
on hanging breaks:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- remove <context.hanging>
- determine passively cancelled
Now! The issue is, It kills itself before it pops out the item eeek, And i can't do 'after' because it can't kill itself before the frame breaks (lol)
I guess i could just drop the item in that spot?
aka spawn it there.
little nitpick but determine passively cancelled isn't needed in this case. because the determine is at the end of the line, you can just leave it as determine cancelled
Now then, I guess I need to find a way to randomly make the item 'appear' at a location
aka a 'floating' item waiting to be picked up
entity
spawn [<entity>|...] (<location>) (target:<entity>) (persistent) (reason:<reason>)
Spawns a list of entities at a certain location.
Spawn an entity or list of entities at the specified location.
Accepts the 'target:<entity>' argument which will cause all spawned entities to follow and attack the targeted entity.
If the persistent argument is present, the entity will not despawn when no players are within range, causing the entity to remain until killed.
Optionally specify 'reason:<reason>' (Paper only) to specify the reason an entity is spawning for the 'entity spawns' event,
using any reason from <@link url https://hub.s...
or you could just give the item to the player directly, up to you
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- remove <context.hanging>
- spawn dropped_item[item=wardinglantern] <context.hanging.location>
- determine cancelled
Something like dis?
looks right
nevermind my bad, that spawns an entity not an item, unless there's a workaround that im not seeing lol
a dropped item is an entity though right
dropped_item is an entity
lel
Yeah nothings dropping, Odd
i didn't have the location in on my side, ignore that entirely ๐
don't worry i've made like what? 4 or 5 blunders already in this one thread lol
Wait.. if i'm removing the context hanging then trying to get it's location
that wont work will it
derp
key word 
Nope nothing xD
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- spawn [item=wardinglantern] <context.hanging.location>
- remove <context.hanging>
- determine cancelled
wardinglantern:
type: item
debug: true
material: PAPER
Oh wait a damn min
Got it
Yep forgot the dropped_item line
yeah i was about to say haha
Now lets see what other functions broke during that eventful 4 hours
lmao
Oh snap almost forgot
need to remove the bounding box and stuff during that special break event
Now i'm lost xD
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- spawn dropped_item[item=wardinglantern] <context.hanging.location>
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[index]>
- foreach stop
- define index <[index].add[1]>
- remove <context.hanging>
- determine cancelled
There is a chance I have done some indent issues here and confused the code along with myself
Yeah i have i think
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- spawn dropped_item[item=wardinglantern] <context.hanging.location>
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[index]>
- foreach stop
- define index <[index].add[1]>
- remove <context.hanging>
- determine cancelled
Yeah that's super odd
I should use the real paste thingy sorry
you dont need to use ``define index index.add[1]~`
foreach already has that built in
!c foreach
queue
foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>]
Loops through a ListTag, running a set of commands for each item.
Loops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.
Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>.
Specify "key:<name>" to set the key definition name (if unset, will be "key").
Specify "as:<name>" to set the value definition name (if unset, will be "value").
Use "as:__player" to change the queue's player link, or "as:__npc" t...
yep already brought this up :/
<[loop_index]>
oh ight
its good, a reminder is helpful
Yeah i screwed something just gotta figure out what
yeah, all of the code should be inside your first if
gone back to what i thought was my original code and its still not breaking due to gravity lmao
it pops out, so it runs on everything
on hanging breaks:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- spawn dropped_item[item=wardinglantern] <context.hanging.location>
- remove <context.hanging>
- determine cancelled
Gotta figure out what iv broke again here
Dear lord xD
To the debug we go
yeah post it here
Content of Server Log Paste #107236: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 16:56:26 UTC-08:00, Paste length: 13141 characters across 112 lines, Content: Java Version: 17.0.5Up-time: 19h 55m
Thats placing one letting it float for like 20seconds when it should have broke
Hold up a fking min
The only difference is i'm now in my base testing not my unclaimed testing area.
and i'm in a worldguard region lmao let me try something
if this is it i'm going to bed
im so angry right now xD
I forgot I used worldguard to claim my base as I needed a large area...
https://paste.denizenscript.com/View/107237
Here we have the final (rough) working script! I can't seem to find any bugs or issues but will defo do some cleanup
Content of Denizen Script Paste #107237: Unnamed Denizen Script Paste... pasted 2023/03/11 17:09:53 UTC-08:00, Paste length: 4203 characters across 87 lines, Content: wardinglantern: type: item
Odd question but..
in order to handle explosions and stuff
on hanging breaks because PHYSICS:
Can i change this to because 'anything BUT player'
you are missing the dropped_item again https://paste.denizenscript.com/View/107237#62
Content of Denizen Script Paste #107237: Unnamed Denizen Script Paste... pasted 2023/03/11 17:09:53 UTC-08:00, Paste length: 4203 characters across 87 lines, Content: wardinglantern: type: item
also again, if you are doing some cleanup, you can do this
an idea that I tested out, is to remove because PHYSICS (because that only accounts for physics) and add an if statement that checks if <context.entity> is not null (meaning there is no entity breaking it. for this i used .is_truthy), but also check if the entity is not a player using <context.entity.is_player>.
!t objecttag.is_truthy
Returns true if the object is 'truthy'. An object is 'truthy' if it exists and is valid, and does not represent a concept like emptiness.
An empty list or an air item will return 'false'. Plaintext "null" or "false", an empty element, or a numeric zero will return 'false' as well.
Some object types may have their own logical implementations, for examples an EntityTag value is 'truthy' only if the entity it represents is spawned.
Errored/broken/invalid tags are also considered 'false' by this log...
ElementTag(Boolean)
!t entitytag.is_player
Returns whether the entity is a player.
Works with offline players.
data
ElementTag(Boolean)
it should run for anything but a player breaking it the way i did it
actually, instead of this, you can use .if_null[false]
that works too
yeah .if_null is more readable in my opinion
Man
I don't know whats happened but my damn stuff is broke again >.>
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- flag <context.hanging.location> lantern_of_warding:!
- spawn [item=wardinglantern] <context.hanging.location>
- remove <context.hanging>
- determine cancelled
- flag <context.entity.location> lantern_of_warding:!
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[index]>
- foreach stop
- define index <[index].add[1]>
- remove <context.entity>
- determine NOTHING
Specifically this
Will debug and check console again
Content of Server Log Paste #107254: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 19:02:30 UTC-08:00, Paste length: 16601 characters across 149 lines, Content: Java Version: 17.0.5Up-time: 22h 1m
Been going for an hour or so tryna 'refix'
it's only breaking on the hanging event
This flag passes '<context.hanging.location.has_flag[lantern_of_warding]>:' in the log
Content of Denizen Script Paste #107255: Unnamed Denizen Script Paste... pasted 2023/03/11 19:08:26 UTC-08:00, Paste length: 4140 characters across 82 lines, Content: wardinglantern: type: item
Wait it's not qs is it
Content of Denizen Script Paste #107255: Unnamed Denizen Script Paste... pasted 2023/03/11 19:08:26 UTC-08:00, Paste length: 4140 characters across 82 lines, Content: wardinglantern: type: item
Content of Server Log Paste #107256: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 19:09:56 UTC-08:00, Paste length: 22387 characters across 200 lines, Content: Java Version: 17.0.5Up-time: 22h 8m
Okay cleaned that lot up but still being funky
Content of Server Log Paste #107258: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/11 19:15:00 UTC-08:00, Paste length: 15076 characters across 137 lines, Content: Java Version: 17.0.5Up-time: 22h 13m
Clear log
Fixed, used another technique lol!
while im here, is there anyway to hide the name that shows when it's inside of the item frame?
Can probably just remove the item's display name
!m display_name
Did you mean to search for command displayitem?
!m ItemTag.display
Changes the item's display name.
Give no input to remove the item's display name.
ItemTag
ElementTag
<ItemTag.display> Returns the display name of the item, as set by plugin or an anvil.
Oh sweet!
- spawn item_frame[rotation=up;framed=wardinglantern;visible=false] <context.location.add[0,1,0]>
I only what it removed when it's in the item frame though hmm
I could make a dummy item that has no display name
If it i leave display name: blank on the item 'script' it doesn't like it
Ah got it display name: <empty>
Hey bread ๐ im back to here with some math confusion xD
So i have
- define cuboid <cuboid[<[loc].world.name>,<[loc].x.add[15]>,<[loc].y>,<[loc].z.add[15]>,<[loc].x.add[-15]>,<[loc].y>,<[loc].z.add[-15]>]>
and this is a flat 1 block thick
The only ones untouched are both <[loc].y>
If i do .add[15= on them it seems to be the same?
So that turns into
- define cuboid <cuboid[<[loc].world.name>,<[loc].x.add[15]>,<[loc].y.add[15]>,<[loc].z.add[15]>,<[loc].x.add[-15]>,<[loc].y.add[15]>,<[loc].z.add[-15]>]>
you want it to go 15 up and 15 down right?
the second y add is adding positive 15
yeah negative y is down
Yeah sorry maths isnt my strong suit lol
thanks man
Also how can i stack the reasons into 1 event here?
on hanging breaks because PHYSICS:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- determine cancelled
on hanging breaks because ENTITY:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- determine cancelled
on hanging breaks because EXPLOSION:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- determine cancelled
on hanging breaks because OBSTRUCTION:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- determine cancelled
I assume I don't need 4 events for this lmao
I tried a few varients
you are checking if it breaks for anything but the player, right?
^^^
if you can't figure it out, let me know and i can walk you through it
but try it yourself first ;)
Wait a second
I got an idea.
The only reason I didn't do just
'on hanging breaks'
is because of the event
on item_frame damaged by player:
- if <context.entity.location.has_flag[lantern_of_warding].if_null[false]>:
- actionbar "<&c>Warding Beacon Broken - Area unsafe"
- spawn dropped_item[item=wardinglantern] <context.entity.location>
- flag <context.entity.location> lantern_of_warding:!
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[index]>
- foreach stop
- define index <[index].add[1]>
- remove <context.entity>
- determine cancelled
But they shouldnt run into each other should they?
Yeah i derped there, I think just on hanging breaks is fine lol
on item_frame damaged by player:
- if <context.entity.location.has_flag[lantern_of_warding].if_null[false]>:
- actionbar "<&c>Warding Beacon Broken - Area unsafe"
- spawn dropped_item[item=wardinglantern] <context.entity.location>
- flag <context.entity.location> lantern_of_warding:!
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[index]>
- foreach stop
- define index <[index].add[1]>
- remove <context.entity>
- determine cancelled
Just cleaning up here
was told I don't need - define index <[index].add[1]>
Safe to remove? or do i need to put something else in
you can remove it, but you will still need to replace it with <[loop_index]>
it's a special definition from the foreach command
no
Yeah I didn't think so xD
you can remove this entire line,
you can remove the - define index 1 above the if
you can replace remove_member:<[index]> with remove_member:<[loop_index]>
on item_frame damaged by player:
- if <context.entity.location.has_flag[lantern_of_warding].if_null[false]>:
- actionbar "<&c>Warding Beacon Broken - Area unsafe"
- spawn dropped_item[item=wardinglantern] <context.entity.location>
- flag <context.entity.location> lantern_of_warding:!
- define index 1
- if <cuboid[lantern_of_warding_<player.world.name>].members_size> == 1:
- note remove as:lantern_of_warding_<player.world.name>
- else:
- foreach <cuboid[lantern_of_warding_<player.world.name>].list_members> as:entry:
- if <[entry]> == <context.entity.location.flag[cuboid]>:
- adjust <cuboid[lantern_of_warding_<context.entity.location.world.name>]> remove_member:<[loop_index]>
- foreach stop
- remove <context.entity>
- determine cancelled
how we looking chief?
you can remove the - define index 1 because it is not needed anymore now that you are using <[loop_index]>
Perfecto!
Now a question about indents
on hanging breaks:
- if <context.hanging.location.has_flag[lantern_of_warding]>:
- determine cancelled
on entity spawns in:lantern_of_warding_*:
- if !<context.entity.is_monster>:
- stop
- playeffect effect:END_ROD at:<context.location> quantity:5 data:0.1
- determine cancelled
Does the code operate differently on these 2 events? *based on the if indents
And does it matter using different indent methods in a whole file?
I know indents are important more so when inside of an if statement itself but i mean, like how the initial if is indented per event here.
it doesn't matter what kind of indentation you use, as long as you indent things inside if, foreach, repeat, etc. more than the statement
# do this
- if <[test]>:
- narrate yay
# not this (this will error
- if <[test]>:
- narrate yay
Yeah that makes sense, But for sense of code clarity, It would make sense to indent my ifs the same across events lol
the initial indentation does not matter and it is up to personal taste
but it would probably look a lot cleaner if you stuck to the same initial indentation throughout the whole file
You should not intent after an event label
So the on entity spawns is the correct way?
here
Content of Denizen Script Paste #107291: Unnamed Denizen Script Paste... pasted 2023/03/12 11:48:13 UTC-07:00, Paste length: 3412 characters across 72 lines, Content: wardinglantern: type: item
also should any of this be rate limited?
oh, i thought it didn't matter which way you did it :/
https://paste.denizenscript.com/View/107292
So this is alot better?
Content of Denizen Script Paste #107292: Unnamed Denizen Script Paste... pasted 2023/03/12 11:50:23 UTC-07:00, Paste length: 3317 characters across 72 lines, Content: wardinglantern: type: item
Ye
Had an interesting idea to add to my item :3
If a player right clicks the placed item. can i add particles around the borders of this bounding box?
so they can see the 'protected' area
Returns each block location on the 3D outer shell of the area.
This tag is useful for displaying particles or blocks to mark the boundary of the area.
ListTag(LocationTag)
# Spawns a hollow sphere of fire around the player.
- playeffect effect:flame at:<player.location.to_ellipsoid[5,5,5].shell> offset:0
So they right click it and it shows up for like 1 min
so they can double check where the protection goes to
oh nice
I'll do it on crouch right click as that doesn't 'change' it in anyway
Assuming thats possible too
on player right clicks item_frame:
!e sneak
Player
player toggles|starts|stops sneaking
when a player starts or stops sneaking.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.state> returns an ElementTag(Boolean) with a value of "true" if the player is now sneaking and "false" otherwise.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
you can use this event with the is_sneaking tag to check if they are sneaking when they click it
!t playertag.is_sneaking
Returns whether the player is currently sneaking.
ElementTag(Boolean)
on player right clicks item_frame:
- if <context.entity.location.has_flag[lantern_of_warding].if_null[false]> & <player.is_sneaking>:
So if it's the correct item, and if they are sneaking?
Wait &&
Yup that works all good
you can use the with:<item> switch to check if they are using the right item
Oh they dont hold the item it's already on the floor
oh mb
above code seems to work good ๐
misread it :P
Now the event is good time to hurt my brain xD
If this exists. it means i am 100% inside of a bounding box
Oh wait
I already know the bounding box exact size from that point lol
So i don't need to 'access' the box, just do a particle effect of the same size lol
- define cuboid <cuboid[<[loc].world.name>,<[loc].x.add[15]>,<[loc].y.add[15]>,<[loc].z.add[15]>,<[loc].x.add[-15]>,<[loc].y.add[-15]>,<[loc].z.add[-15]>]>
- playeffect effect:flame at:<context.entity.location.to_ellipsoid[15,15,15].shell> offset:0
Time to figure out how to make these the same lol
this is not the way lol
yeah but do you know how to replace it lol
- playeffect effect:flame at:<context.entity.location.to_ellipsoid[15,15,15].shell> offset:0
Need to make this stay longer so i can actually SEE it
lmao
you just need to run it every so often
particles have a fixed lifetime
btw, those 2 tags aren't equivalent
if the ellipsoid works for you, that's great, but it's not the same shape as the cuboid
You can add and substract from all x,y,z coordinates directly
- playeffect effect:flame at:<context.entity.location.to_cuboid[5,5,5].shell> offset:0
this shows me nothing?
Tag parse results for <world[world].spawn_location.add[50,0,50]>: https://paste.denizenscript.com/View/107294
l@194,70,290,world
Adds 50 to x and z
The heck
Tag parse results for <world[world].spawn_location.sub[15,15,15].to_cuboid[<world[world].spawn_location.add[15,15,15]>]>: https://paste.denizenscript.com/View/107295
cu@world,129,55,225,159,85,255
This creates a cuboid around the spawn location
of 15 in each direction?
^ talking about that here btw
My poor brain
- playeffect effect:flame at:<context.entity.location.to_cuboid[129,55,225,159,85,255].shell> offset:0
Surely not xD
to_cuboid takes 2 locations
Oh each far corner?
umm
so you feed it one corner, and then the block 15 blocks away
and that makes the box
So
- playeffect effect:flame at:<context.entity.location.to_cuboid[15,-15].shell> offset:0
something like this?
<context.entity.location. this is your first location
Yeah
Returns a cuboid from this location to the specified location.
areas
CuboidTag
Isnt that what im doing with [15,-15].shell>
That's not a valid locationtag, no
Click the blueish title
meta has an example which might make it clear
- note <player.location.to_cuboid[<npc.location>]> as:my_new_cuboid
So i have to feed it 2 tags?
for each corner?
opposite corner*
2 tags, that return a location ye
!t location.add
Returns the location with the specified coordinates added to it.
math
LocationTag
I need a quick break I can't do math xD
That's might be confusing for you now, but ye, you have to specify x,y,z
^
- playeffect effect:flame at:<context.entity.location.to_cuboid[<context.entity.location.add[50,0,50]>,<context.entity.location.add[-50,0,-50]>].shell> offset:0
WHAT HAVE I DONE XD
You're typing before your brain process
this is enough to make the brain stop processing
- playeffect effect:flame at:<context.entity.location.sub[15,15,15].to_cuboid[<context.entity.location.add[15,15,15]>]>
Wait no
Be back in a while, appreciate the patience ๐
- playeffect effect:flame at:<context.entity.location.to_cuboid[<context.entity.location.add[5,0,5]>,<context.entity.location.sub[5,0,5]>].shell> offset:0
In my head, im playing a particle effect starting from the entity location(as a cuboid)
Then i'm specifying the 2 locations based on the entitys location
Did you test that
Yeah couldnt see anything
I ran it on 5,5,5 so it was closer too
But couldnt see it
Did you check your console?
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Content of Server Log Paste #107296: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/12 12:41:07 UTC-07:00, Paste length: 29517 characters across 219 lines, Content: Java Version: 17.0.5Up-time: 14h 39m
That's not nothing
At line 55 you see that it successfully creates a cuboid, so that part works
The console tells you what the issue is
holy crap you can specify a line when sharing pastebin 
19:41:02 ERROR in script 'lantern_of_warding' in queue 'LANTERN_OF_WARDING_565909_IeeeMost' while executing command 'PLAYEFFECT' in file 'scripts/warding.dsc' on line '68' with player 'JoshJustGames'!
Error Message: Woah! Invalid arguments were specified!
Missing location argument!
- playeffect effect:flame at:<context.entity.location.sub[15,15,15].to_cuboid[<context.entity.location.add[15,15,15]>]>
Do you see what the issue is?
Well yeah i gathered this line is my issue but I dont see it lol
- playeffect effect:flame at:<context.entity.location.to_cuboid[<context.entity.location.add[5,0,5]>,<context.entity.location.sub[5,0,5]>].shell> offset:0
This is 2 locations
Delete that from your head, that's not relevant
Okay so back onto this line
- playeffect effect:flame at:<context.entity.location.sub[15,15,15].to_cuboid[<context.entity.location.add[15,15,15]>]>
!t location.to_cuboid
Returns a cuboid from this location to the specified location.
areas
CuboidTag
That's the tag you've used here, what does it return?
..
Returns a cuboid from this location to the specified location.
lmao
Oh wait
Right
So this is setting up the first position
- playeffect effect:flame at:<context.entity.location.sub[15,15,15].to_cuboid
am i just missing .to_cuboid on the end of the last location?
<context.entity.location.sub[15,15,15] this is the first location you're providing here yes. But that's not the answer to the question.
Nah i'm lost bro
!guide first tags
Think I over thought the whole thing
View the guide page 'Your First Tags' at: https://guide.denizenscript.com/guides/first-steps/tags.html
Must have read that 5 times xD
Read it slowly, and also TEST the examples
My brain decided it was probably too much for the item anyway tbh
#1082790105162461294 message The as: needs a LocationTag and you are putting in a CuboidTag.
Bit confused here
I need to give this denizen item as a crate command
I can run it via console but i can't figure out how to do that
I normally get the item with /ex give magnet
but as i'm the player running the command it works
Ah
- 'exs give magnet player:%player%'
!guide ex command
View the guide page 'The Ex Command' at: https://guide.denizenscript.com/guides/first-steps/ex-command.html
!guide testing only
View the guide page 'Common Mistakes - The Ex Command Is For Testing Only' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#the-ex-command-is-for-testing-only
!c give
item
give [xp/<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>) (allowed_slots:<slot-matcher>) (ignore_leftovers)
Gives the player an item or xp.
Gives the linked player inventory items or xp.
Optionally specify a slot to put the items into. If the slot is already filled, the next available slot will be used.
If the inventory is full, the items will be dropped on the ground at the inventory's location.
For player inventories, only the storage contents are valid - to equip armor or an offhand item, use !command equip.
Specifying "unlimit_stack_size" will allow an item to stack up to 64. This is useful for stacking items
with a max...
I overlooked one thing..
events:
on player right clicks block with:item_flagged:lantern type:!air:
- if <context.relative> == <context.location.add[0,1,0]> && !<context.location.add[0,1,0].has_flag[lantern_of_warding]>:
- determine passively cancelled
This wont respect landclaims
F
Now that i think about it, they might even be able to do this in spawn lol
Yeah oof..
So i should be able to lock out the spawn world easily but
I need to find out if they own the claim or have build rights through GP plugin
Mechanism search for 'griefpreventionclaimtag.owner'
Will handle worlds first
Okay worlds sorted, just the GP thing now
Actually yeah just need if the claim they are in = the name of whoever does this on player right clicks block
on player right clicks block with:item_flagged:lantern type:!air in:Nearlands:
- if <context.location.griefprevention.claim.owner> != <player>:
- stop
I did a thing
Ran into some bizzare issue
Content of Server Log Paste #107307: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/12 16:42:55 UTC-07:00, Paste length: 7062 characters across 72 lines, Content: Java Version: 17.0.5Up-time: 10m
Some blocks I click and it won't place? when it does place on a block there is no error
but when it wont place i get that error
- if !<cuboid[lantern_of_warding_<player.world.name>].exists>:
- note <[cuboid]> as:lantern_of_warding_<player.world.name>
- else:
- note <cuboid[lantern_of_warding_<player.world.name>].add_member[<[cuboid]>]> as:lantern_of_warding_<player.world.name>
- note <[cuboid]> as:lantern_of_warding_<player.world.name>
Eh only happens in my testing ground when i was working with the script all messed up so probably some left over stuff
Holy cow has this thread really 1420 messages lol
Anyway, per your debug record it shows that you're using a definition <[cuboid]> that weren't defined yet
So you probably want to define it first?
this is the longest help thread Iโve ever participated in ๐
great practice for me
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@plain laurel