#(justacez_) Bow Teleport

63 messages · Page 1 of 1 (latest)

topaz skiff
#

Anyone? This wouldnt work. I tried <context.shooter> <player> <context.player> @s on entity type to event

https://paste.denizenscript.com/View/115738

everything is fine, just the line 24 is the problem. Which, i cant make it work where i get teleported wherever the arrow lands.

raven lanceBOT
#

(justacez_) Bow Teleport

raven lanceBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

topaz skiff
#

!e projectile hits

dark bisonBOT
# topaz skiff !e projectile hits
Group

Entity

Event Lines

<projectile> hits

Switches

entity:<entity> to only process the event if an entity got hit, and it matches the specified EntityTag matcher.
block:<block> to only process the event if a block got hit, and it matches the specified LocationTag matcher.
shooter:<entity> to only process the event if the projectile was shot by an entity, and it matches the specified EntityTag matcher.

Triggers

When a projectile hits a block or an entity.

Has Player

when the entity that was hit is a player, or when the shooter is a player if no entity was hit. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Has NPC

when the entity that was hit is a npc, or when the shooter is a npc if no entity was hit.

Context

<context.projectile> returns an EntityTag of the projectile.
<context.hit_entity> returns an EntityTag of the entity that was hit, if any.
<context.hit_block> returns a LocationTag of the block that was hit, if any.
<context.hit_face> returns a LocationTag vector of the hit normal (like '0,1,0' if the projectile hit the top of a block).
<context.shooter> returns an EntityTag of the entity that shot the projectile, if any.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

topaz skiff
#

nvm i fixed it myself. thanks

dark bisonBOT
# opaque kelp !l command syntax

Almost every Denizen command and requirement has arguments after the command itself.
These arguments are just snippets of text showing what exactly the command should do,
like what the chat command should say, or where the look command should point.
But how do you know what to put in the arguments?

You merely need to look at the command's usage/syntax info.
Let's take for example:


- animatechest [<location>] ({open}/close) (sound:{true}/false)

Obviously, the command is 'animatechest'... but what does the rest of it mean?

Anything in [brackets] is required... you MUST put it there.
Anything in (parenthesis) is optional... you only need to put it there if you want to.
Anything in {braces} is default... the command will just assume this if no argument is actually typed.
Anyth...

Group

Script Command System

opaque kelp
#

That's just syntax, you don't put it in the actual command

solemn juncoBOT
#
Thread Closing Reminder

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.)

#

@topaz skiff

topaz skiff
#

What about, "else"

#

All is well. I just want my script to not run if you don't have permission and say "you dont have enough permission", but if you have-- it'll simply tp u and not send any chat

   after arrow hits block:
   - if <player.has_permission[teleporter.bow]>
   - teleport <context.projectile.location>
   - else if <player.has_permission[teleporter.bow]>
   - narrate "You dont have permission"
dark bisonBOT
opaque kelp
#

See the guide page for the proper syntax

topaz skiff
#

Oh. My code was right, just missing some spaces. Thank you

opaque kelp
#

You don't need the extra check in the else either - the else runs if the if doesn't pass

solemn juncoBOT
#
Thread Closing Reminder

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.)

#

@topaz skiff

topaz skiff
#

!g displayname

dark bisonBOT
#
Possible Confusion

Did you mean to search for this guide?

dark bisonBOT
topaz skiff
#

How do i put a name on the item that are to give @opaque kelp

#

!g item name

dark bisonBOT
#
Possible Confusion

Did you mean to search for an item quest (partial)?

topaz skiff
#

!g name

topaz skiff
#

nvm got it now

dark bisonBOT
# opaque kelp !rule 3
Rule 3

Don't ping for help. https://denizenscript.com/discord_rules#rule3
"Pinging" refers to using an @ to alert somebody to your post.
Generally only ping somebody if your message is very specifically directed at them (meaning, only that person has anything to do with the information in your message, and it would be confusing who it was for without the ping).

If you're asking a question, please just make a forum post and ask.
If you have a bug report or a feature request, please just make a forum post about it.

If this is pulled up for you by a helper, your ping was unneeded.
If you're arguing about it, you're wrong.

opaque kelp
#

If this is resolved then

solemn juncoBOT
#
Thread Closing Reminder

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.)

#

@topaz skiff

#
Resolved

Thread closed as resolved.

topaz skiff
#

sry thanks

solemn juncoBOT
#
Thread Reopened

Thread was manually reopened by @topaz skiff.

#
Resolved

Thread closed as resolved.

topaz skiff
#

Hi. Another question, why does "ex give <player> <item_name> <qty> slot:5" does not work in script?

solemn juncoBOT
#
Thread Reopened

Thread was manually reopened by @topaz skiff.

dark bisonBOT
opaque kelp
#

Please properly follow the guide, you missed a few very important steps there

topaz skiff
#

I don't think it's there though

#

Also, that was through a notepad. My bad, here's one from vscode

#

i suppose what you know what the red line means

opaque kelp
topaz skiff
#

Yes, I know. That's literally what I am asking. How do I make it work, or is there no way to use "ex give" on script?

opaque kelp
#

/ex is just an in-game Minecraft command for debugging, it's not a Denizen script command

opaque kelp
topaz skiff
#

all is good. i fixed them

#

everything is working, had to figure them out myself. thanks

opaque kelp
#

No problem!

#

But for your item check, don't use object hacking that way (!g object hacking) - you can check the item's item script

#

<item> matches <item_script>

opaque kelp
#

(And also should use the proper editor, no reason to use stuff like notepad)

solemn juncoBOT
#
Thread Closing Reminder

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.)

#

@topaz skiff

topaz skiff
#

ok ty