#(nasrulswd) help me
61 messages · Page 1 of 1 (latest)
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.
!e right clicks block
Did you mean to search for player right clicks entity?
!e right|left clicks block
Player
this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
player (right|left) clicks <block>
with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.
when a player clicks on a block or in the air.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Can use with:<item> to match your specific item
i still don't understand how to create the script
!g world script
View the guide page 'Your First World Script' at: https://guide.denizenscript.com/guides/first-steps/world-script.html
You would make a world script with that event to listen to the player right clicking with the item, then open the inventory GUI (or whatever other GUI you have)
!c inventory
item
inventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)
Edits the inventory of a player, NPC, or chest.
Use this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.
If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.
Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.
Using "open", "clear", or "update" only require a destination.
"Update" also req...
if players right click (what can i put in this):
Don't try guessing - the guide explains the syntax, should go through it & try out the examples to get a good grasp over it
^ I linked you a page specifically about using events
@lavish garnet
Thread was closed either automatically by timeout or by the Discord manual close button. If closing was intentional, please use </resolved:1028673926114594866> or </invalid:1028673926898909185>.
Thread closed as invalid.
Thread was manually reopened by @lavish garnet.
Thread closed as resolved.
(Feel free to ask any questions if you're having trouble understanding it, btw)
Thread was manually reopened by @ocean wing.
We're always happy to help with any issues, it's just important the person goes over relevant documentation first, as that'll either help them figure it out, or give them a basic understanding which will help us help them
@lavish garnet ^
i don't understand with the link u give to me
thats why i asking u
can u make the example for me?
like i wanna try make server selector with item in player slot
Don't focus on your specific goal for a second, first of all you need to get a good understanding of how world scripts and events work before trying to use them
That guide page has a few fully functioning examples of using events which you can copy into your test server to see how they work, mess around with them to get a better understanding, etc. - that's always a good first step
i already create this menus with denizen script
but idk how to create the script if player right click the compas and the the menus po up
And I'm trying to help you learn how :p, - you would use a world script container, which can listen to specific things happening using events
But you need to forget about this specific goal for a second and get a good understanding of world scripts and events before trying to use them for this
Which is why I linked you a guide page that explains them and has examples for you to try out - should read through that and test the examples on your test server
And if you run into any part you're having trouble with, feel free to ask here and we'd love to help
survival_menus_item:
type: item
debug: false
material: comnpass
display name: <&a><&l>SURVIVAL MENUS
survival_menus_handler:
type: world
debug: false
events:
on player right click survival_menus_item:
- inventory open d:in@survival_menus_gui
i create this script but not work
!g don't use raw
Did you mean to search for common mistakes - don't compare raw objects?
View the guide page 'Common Mistakes - Don't Compare Raw Objects' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#don-t-compare-raw-objects
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
Content of Denizen Script Paste #115043: Unnamed Denizen Script Paste... pasted 2023/09/10 05:28:44 UTC-07:00, Paste length: 290 characters across 11 lines, Content: survival_menus_item: type: item
!g don't compare raw objects
View the guide page 'Common Mistakes - Don't Compare Raw Objects' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#don-t-compare-raw-objects
Refer to this page ^
They're not comparing raw objects, just inputting one
!g don't type raw
View the guide page 'Common Mistakes - Don't Type Raw Object Notation' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#don-t-type-raw-object-notation
!c inventory usage
item
inventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)
Edits the inventory of a player, NPC, or chest.
- inventory open d:<context.location>
- inventory open d:generic[size=27;title=BestInventory;contents=snowball|stick]
- inventory open d:<[player].inventory>
- inventory keep d:<context.location.inventory> o:snowball|ItemScript
- inventory exclude origin:stick|stone
... and 5 more.
The command has usage examples ^, in this case you'd just d:my_inventory_script
But that's not the main issue, your event line syntax is wrong
^ this is the event you're trying to use player (right|left) clicks <block>, and you have player right click survival_menus_item