#(floofykun) issues running

117 messages · Page 1 of 1 (latest)

sturdy cosmosBOT
#

(floofykun) issues running

#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

desert linden
#

You run task scripts, assignements script are meant to be assigned to NPCs

noble crane
#

how do i assign it ?

desert linden
#

!g assignment

eager furnaceBOT
noble crane
#

how do i make it activate with the golden apple ?

desert linden
noble crane
#

but nothing happens when i click it with a golden apple

desert linden
#

Did you assign the script to them?

noble crane
#

yes i did ex set name

desert linden
#

While you had the NPC selected?

noble crane
#

ex assignment set name*

#

yes

desert linden
#

And did you see output in chat saying it was set and all?

#

If so, first of all

#

!debug

eager furnaceBOT
# desert linden !debug
Info: 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!

desert linden
#

Post a debug of you setting it on the NPC

noble crane
desert linden
#

What were you doing during that debug? clicking it?

noble crane
#

yes

desert linden
eager furnaceBOT
# desert linden !logcheck https://paste.denizenscript.com/View/112670
Server Version

Paper version git-Paper-84 (MC: 1.20.1)-- (Outdated build, behind by 11... Current build is 95)

Plugin Version(s)

Citizens: 2.0.32-SNAPSHOT (build 3169) -- (Outdated build, behind by 1)
Denizen: 1.2.8-SNAPSHOT (build 6830-DEV) -- (Current build :white_check_mark:)

Checked For

@desert linden

UUID Version

0 (:triangular_flag_on_post: Hacked or Invalid ID)

Java Version

17.0.5 :white_check_mark:

Other Noteworthy Plugin(s)

WorldGuard: 7.0.9-beta1+2249-223b80c, ProtocolLib: 5.0.0, Quests: 3.14.2-3345d07

Problematic Plugin(s)

Geyser-Spigot: 2.1.2-SNAPSHOT - Bedrock clients are unsupportable. Please do all testing with a Java Edition client.
floodgate: 2.2.2-SNAPSHOT (b59-2278589)

Possibly Relevant Plugin(s)

CMI: 9.6.1.3 - CMI tends to mess with a large variety of server features and often gets in the way of issue debugging.

desert linden
#

Are you sure the version of the script that's on your server is updated? according to that debug it looks like your click trigger ran properly

noble crane
#

did i do the script wrong ?

#

yeah but its supposed to say stuff which it isnt

desert linden
#

E.g. if you check with /ex narrate <script[Kin_no_Ringo_interact].to_yaml>, can you see the - chat bit there?

noble crane
#

yes

teal stag
#

Last reload: 1h 48m ago I can't say I've ever reached that time whilst actively testing.

desert linden
#

!l click trigger

eager furnaceBOT
# desert linden !l click trigger

Click Triggers are triggered when a player right clicks the NPC.

These are very basic with no extraneous complexity.


click trigger:
    script:
    - narrate "hi <player.name>"

They can optionally have an item matcher with multiple triggers, for the item in the player's hand. For example:


click trigger:
    1:
        trigger: my_item_script
        script:
        - narrate "Nice item script"
    2:
        trigger: stone
        script:
        - narrate "Nice vanilla item"
    3:
        script:
        - narrate "I don't recognize your held item"

Group

NPC Interact Scripts

desert linden
#

I believe you'd need the format in the second example there for the item checks

noble crane
#

So the click triggers they are sequential and not this or that?

#

What's the difference between chat and narrate?

desert linden
#

!c chat

eager furnaceBOT
# desert linden !c chat
Required Plugins or Platforms

Citizens

Group

player

Syntax

chat [<text>] (no_target/targets:<entity>|...) (talkers:<entity>|...) (range:<#.#>)

Short Description

Causes an NPC/NPCs to send a chat message to nearby players.

Description

Chat uses an NPC's speech controller provided by Denizen, typically inside 'interact' or 'task' script-containers.
Typically there is already player and NPC context inside a queue that is using the 'chat' command.
In this case, only a text input is required.
Alternatively, target entities can be specified to have any Entity chat to a different target/targets,
or specify 'no_target' to not send the message to any specific target.

Chat from an NPC is formatted by the settings present in Denizen's...

desert linden
#

!c narrate

eager furnaceBOT
# desert linden !c narrate
Group

player

Syntax

narrate [<text>] (targets:<player>|...) (format:<script>) (per_player) (from:<uuid>)

Short Description

Shows some text to the player.

Description

Prints some text into the target's chat area. If no target is specified it will default to the attached player or the console.

Accepts the 'format:<script>' argument, which will reformat the text according to the specified format script. See !language Format Script Containers.

Optionally use 'per_player' with a list of player targets, to have the tags in the text input be reparsed for each and every player.
So, for example, "- narrate 'hello <player.name>' targets:<server.online_players...

noble crane
#
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - Kin_no_Ringo_interact
Kin_no_Ringo_interact:
    type: interact
    steps:
        click trigger:
            1:
                trigger: item:golden_apple
                script:
                - chat "Wow! My heirloom!"
                - take item:golden_apple
                - narrate "<&7>[<&b><bold>Priceless Family Heirloom<&7> removed]"
                - chat "Thank you adventurer! Here's your reward!```
#

this is my script

#

it doesnt work

teal stag
#

Out of interest, are you reloading every time you make changes?

#

Using /ex reload

noble crane
#

/ex reload

#

im trying to make it such that when a player clicks a panda with a goldenapple they get a reward

#

something like a secret easter egg

noble crane
#

also dies trigger: check for something or trigger something ?

heady canopyBOT
noble crane
#

cause im lookin for a check command

desert linden
#

trigger: item:golden_apple you don't need the item: there

desert linden
noble crane
#

nope clicking him with the golden apple doesnt work

#

like how u check logs here can u also test scripts on discord ?

desert linden
noble crane
#

i did

#
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - Kin_no_Ringo_interact
Kin_no_Ringo_interact:
    type: interact
    steps:
        click trigger:
                trigger: golden_apple
                script:
                - chat "Wow! My heirloom!"
                - take item:golden_apple
                - narrate "<&7>[<&b><bold>Priceless Family Heirloom<&7> removed]"
                - chat "Thank you adventurer! Here's your reward!"```
desert linden
#

Oh, you're missing the key under steps now

noble crane
#

where i add that ?

desert linden
#

You had it earlier - you need to define it as the first step in the interaction, e.g. a 1:

noble crane
#

oh yeah i was tweaking around with that

#

so after steps i put 1 ?

#

or after click trigger?

desert linden
#

(Also for anyone looking in the future, they didn't delete the first message in the thread, I mis-clicked; it's [here](#edit-logs message))

desert linden
noble crane
#

ty!

#

how do i make it trigger only once ?

#

per player

iron light
#

you can use flags! you can flag the player who clicked with a name like given_heirloom and then if they try clicking again, use an if check using .has_flag and then deny it if they do have the flag already

#

!c flag

eager furnaceBOT
# iron light !c flag
Group

core

Syntax

flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)

Short Description

Sets or modifies a flag on any flaggable object.

Description

The flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also !language flag system.

This command supports data actions, see !language data actions.

Flags by default are added permanently (or for the lifetime of the object they're attached to).
You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag.
If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]>

iron light
#

!t playertag.has_flag

eager furnaceBOT
noble crane
#

how do i make a flag

#

it refers me to items but there dont say much

iron light
#

the flag command will create a flag if it isn't there already

#

if you are new to flags, i would reccommend looking at the guide page about flags

#

!g long term memory flags

eager furnaceBOT
#
Possible Confusion

Did you mean to search for long term memory: flags?

eager furnaceBOT
noble crane
#

so flag name i declare in the lore ?

#

item script*

#

?

#

how do i make it un-useable ?

#

like only to collect and then later give an npc for a custom title

desert linden
#

You want every player to only be able to give that item to that NPC once?

#

If so, as bread said - you'd flag the player when they do that, then check for that flag before giving them the item

desert linden
# eager furnace

^ check out the guide page for info about flagging things / checking things for flags

noble crane
#

so for the thingy do i set it up - if <player.has_flag[flahg name]>: do nothing ?

desert linden
#

Yep

noble crane
#

what the tag for never expire ?

iron light
# eager furnace

by default flags don't expire. they'll only expire if you add an expiration using the command

steep holly
#

Don't delete original messages :(
threads can be helpful for people that will come here with the same problem or question, deleting messages will make it harder (or even impossible) to understood what was that discussion about

steep holly
#

Didn't noticed, sorry and thanks ^^'

noble crane
#

how do i remove flags ?

desert linden
#

!c flag usage

eager furnaceBOT
# desert linden !c flag usage
Group

core

Syntax

flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)

Short Description

Sets or modifies a flag on any flaggable object.

Use to create or set a flag on a player.
- flag <player> playstyle:aggressive
Use to set a temporary flag for five minutes on a player.
- flag <player> just_did_something expire:5m
Use to flag an npc with a given tag value.
- flag <npc> location:<npc.location>
Use to apply mathematical changes to a flag's value on a unique object.
- flag <context.damager> damage_dealt:+:<context.damage>
Use to add an item to a server flag as a new value without removing existing values.
- flag server cool_people:->:<[player]>
Additional Usage Examples

... and 4 more.

desert linden
#

Or the meta examples, click the blue link on top to open the full page

noble crane
#

Yeah it's .y fault

#

My*

#

The guide says 'player'

#

I thought it meant playername and not literally player

#

Sorted now