#(floofykun) issues running
117 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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
You run task scripts, assignements script are meant to be assigned to NPCs
how do i assign it ?
idk what i doing wrong
!g assignment
View the guide page 'Who Am I: Assignment Scripts (PARTIAL)' at: https://guide.denizenscript.com/guides/npcs/assignment-scripts.html
how do i make it activate with the golden apple ?
That's what you already have, a click trigger for clicks with a golden apple
but nothing happens when i click it with a golden apple
Did you assign the script to them?
yes i did ex set name
While you had the NPC selected?
And did you see output in chat saying it was set and all?
If so, first of all
!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!
Post a debug of you setting it on the NPC
Content of Server Log Paste #112670: Denizen Debug Logs From Consent is sexy ~ Have fun!... pasted 2023/07/23 06:40:04 UTC-07:00, Paste length: 1535 characters across 23 lines, Content: Java Version: 17.0.5Up-time: 3h 37m
What were you doing during that debug? clicking it?
yes
Content of Server Log Paste #112670: Denizen Debug Logs From Consent is sexy ~ Have fun!... pasted 2023/07/23 06:40:04 UTC-07:00, Paste length: 1535 characters across 23 lines, Content: Java Version: 17.0.5Up-time: 3h 37m
Paper version git-Paper-84 (MC: 1.20.1)-- (Outdated build, behind by 11... Current build is 95)
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:)
@desert linden
0 (:triangular_flag_on_post: Hacked or Invalid ID)
17.0.5 :white_check_mark:
WorldGuard: 7.0.9-beta1+2249-223b80c, ProtocolLib: 5.0.0, Quests: 3.14.2-3345d07
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)
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.
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
E.g. if you check with /ex narrate <script[Kin_no_Ringo_interact].to_yaml>, can you see the - chat bit there?
Last reload: 1h 48m ago I can't say I've ever reached that time whilst actively testing.
!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"
NPC Interact Scripts
I believe you'd need the format in the second example there for the item checks
So the click triggers they are sequential and not this or that?
What's the difference between chat and narrate?
!c chat
Citizens
player
chat [<text>] (no_target/targets:<entity>|...) (talkers:<entity>|...) (range:<#.#>)
Causes an NPC/NPCs to send a chat message to nearby players.
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...
!c narrate
player
narrate [<text>] (targets:<player>|...) (format:<script>) (per_player) (from:<uuid>)
Shows some text to the player.
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...
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
/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
do i have to manually reload ?
also dies trigger: check for something or trigger something ?
cause im lookin for a check command
trigger: item:golden_apple you don't need the item: there
^ look at the examples
nope clicking him with the golden apple doesnt work
like how u check logs here can u also test scripts on discord ?
^ did you fix that? if so, post your updated script + a debug of you trying to click with it
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!"```
Content of Server Log Paste #112684: Denizen Debug Logs From Consent is sexy ~ Have fun!... pasted 2023/07/23 09:38:22 UTC-07:00, Paste length: 1939 characters across 28 lines, Content: Java Version: 17.0.5Up-time: 6h 35m
Oh, you're missing the key under steps now
where i add that ?
You had it earlier - you need to define it as the first step in the interaction, e.g. a 1:
oh yeah i was tweaking around with that
so after steps i put 1 ?
or after click trigger?
(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))
You need both
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
core
flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Sets or modifies a flag on any flaggable object.
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>]>
!t playertag.has_flag
Returns true if the flaggable object has the specified flag, otherwise returns false.
See !language flag system.
ElementTag(Boolean)
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
Did you mean to search for long term memory: flags?
View the guide page 'Long Term Memory: Flags' at: https://guide.denizenscript.com/guides/basics/flags.html
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
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
^ check out the guide page for info about flagging things / checking things for flags
yes
so for the thingy do i set it up - if <player.has_flag[flahg name]>: do nothing ?
Yep
what the tag for never expire ?
by default flags don't expire. they'll only expire if you add an expiration using the command
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
^
Didn't noticed, sorry and thanks ^^'
how do i remove flags ?
core
flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Sets or modifies a flag on any flaggable object.
- flag <player> playstyle:aggressive
- flag <player> just_did_something expire:5m
- flag <npc> location:<npc.location>
- flag <context.damager> damage_dealt:+:<context.damage>
- flag server cool_people:->:<[player]>
... and 4 more.
Or the meta examples, click the blue link on top to open the full page