#(nasrulswd) help me

61 messages · Page 1 of 1 (latest)

thorn thunderBOT
#

(nasrulswd) help me

#

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.

ocean wing
#

!e right clicks block

charred reefBOT
#
Possible Confusion

Did you mean to search for player right clicks entity?

ocean wing
#

!e right|left clicks block

charred reefBOT
# ocean wing !e right|left clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

Event Lines

player (right|left) clicks <block>

Switches

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.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

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

Has Known Location

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

Cancellable

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

ocean wing
#

Can use with:<item> to match your specific item

lavish garnet
#

i still don't understand how to create the script

ocean wing
charred reefBOT
ocean wing
#

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

charred reefBOT
# ocean wing !c inventory
Group

item

Syntax

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

Short Description

Edits the inventory of a player, NPC, or chest.

Description

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

lavish garnet
#
if players right click (what can i put in this):
ocean wing
#

Don't try guessing - the guide explains the syntax, should go through it & try out the examples to get a good grasp over it

ocean wing
olive pastureBOT
#

@lavish garnet

Thread Close Blocked

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

#
Marked Invalid

Thread closed as invalid.

#
Thread Reopened

Thread was manually reopened by @lavish garnet.

#
Resolved

Thread closed as resolved.

ocean wing
olive pastureBOT
#
Thread Reopened

Thread was manually reopened by @ocean wing.

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 ^

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

ocean wing
#

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

lavish garnet
#

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

ocean wing
#

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

lavish garnet
#
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

charred reefBOT
#
Possible Confusion

Did you mean to search for common mistakes - don't compare raw objects?

thorn merlin
#

Also paste your script

#

!paste

charred reefBOT
lavish garnet
thorn merlin
#

!g don't compare raw objects

thorn merlin
#

Refer to this page ^

ocean wing
#

!g don't type raw

ocean wing
#

!c inventory usage

charred reefBOT
# ocean wing !c inventory usage
Group

item

Syntax

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

Short Description

Edits the inventory of a player, NPC, or chest.

Use to open a chest inventory, at a location.
- inventory open d:<context.location>
Use to open a virtual inventory with a title and some items.
- inventory open d:generic[size=27;title=BestInventory;contents=snowball|stick]
Use to open another player's inventory.
- inventory open d:<[player].inventory>
Use to remove all items from a chest, except any items in the specified list.
- inventory keep d:<context.location.inventory> o:snowball|ItemScript
Use to remove all sticks and stones from the player's inventory.
- inventory exclude origin:stick|stone
Additional Usage Examples

... and 5 more.

thorn merlin
#

Why are there 2 pages for almost the same thing? 😂

ocean wing
#

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

ocean wing
# charred reef

^ this is the event you're trying to use player (right|left) clicks <block>, and you have player right click survival_menus_item