#(funnyxaddi) i m new to this wand to learn
97 messages · Page 1 of 1 (latest)
(funnyxaddi) i m new to this wand to learn
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.
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
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!
Content of Denizen Script Paste #115746: waling around... pasted 2023/09/28 12:38:30 UTC-07:00, Paste length: 2164 characters across 68 lines, Content: work_pleas: type: format
uhh alright, so
ln. 6,8 => You misspelled assignment
ln. 27-31 => ^ prefix is ancient, it does nothing
ln. 29 => <server.flag.online_players.exclude[<player>]> this is invalid
!t server.online_players
ln 30 => You pass the linked npc as a definition, then overwrite it with the newly created npc? (ln. 43)
You can rewrite the whole npc_path script to just loop through the anchors
#loop though the npc's anchors
- foreach <npc.anchors>:
#walk to the current anchor in the loop
- ~walk <npc.anchor[<[value]>]> auto_range
- narrate "Here is a spot I want to show you!"
#you can have this here instead of the npc_trypause script
- while <npc.location.distance[<player.location>]> > 5:
- narrate "Try to keep up"
- wait 2s
- wait 10t```
also ln. 22 => it's just chat trigger: (no underscore)
If you're new to denizen I'd suggest going through the guide
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
You can also search any tags/mechanisms/language explanations on the meta
!lang assignment script container
Assignment script-containers provide functionality to NPCs by 'assignment' of the container. Assignment
scripts are meant to be used when customizing the normal behavior of NPCs. This can be used on a 'per-NPC' basis,
but the encouraged approach is to design assignment scripts in a way that they can be used for multiple NPCs,
perhaps with the use of constants or flags to determine specific information required by the scripts.
Features unique to assignment script-containers include 'actions' and 'interact script' assignment.
Like any script, the ability to run local utility scripts can be accomplished as well. This allows fully
interactive NPCs to be built purely with Assignment Scripts, and for advanced situations, world scripts and
interact scripts can provide more functionality.
See als...
Script Container System
i went througt the guide but jumpt a head a bit (im to inpationt) thx for the help im dong the schanges you sergested gonne se if it works
how do you mean ?
take away the whole npc_path script ?
Unrelated is english not your primary language?
nopp and dislactik so besecly f from the start
Ay, dyslexic. I was wondering why your words seemed different.
yea fom nl live in swe never had eng in school so only leard from movies and games
Here's an example, I took the original script you posted and simplified(?) it
The way it works is, if the player accepts the tour thing, you loop through the original npc's anchors, so in order for the script to work the original npc has to have anchors set
https://paste.denizenscript.com/View/115752
I added comments so you can understand what does what (it's pretty similar to the original script), but feel free to ask any questions if something isn't clear!
Content of Denizen Script Paste #115752: Tour Thingy... pasted 2023/09/28 19:54:54 UTC-07:00, Paste length: 2419 characters across 62 lines, Content: fnpc_format: type: format
It's important to read the guide to better understand how everything works
I Will try it out thx you already
is it your video ?
Yeah why?
fery helpful 🙂 i tryd it and try to give him more ancor point but now he walk to pos1 then pos2 and then pos1 and then pos2 and tyhen it is fincht why dus it do that?
yes but twice
How many anchors do you have set for the npc?
2
run /npc anchor and it'll give you a list
i have 2 ancors set but i walks to them twice
after the 2 one it dus not end and it start again but the second time it comes to the 2 ancor then it ends
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!
how did you input more ancors i can heva don that wrong
Content of Denizen Script Paste #115766: 1123... pasted 2023/09/29 02:36:31 UTC-07:00, Paste length: 3106 characters across 74 lines, Content: fnpc_format: type: format
/npc anchor --save anchorname
you have to have the npc selected
yea i heve don that it walks to the points but it stil walks to them 2 times
record a debug
/denizen debug -r, start the tour, let it finish, run /denizen submit and paste the link
Content of Server Log Paste #115767: Denizen Debug Logs From A Minecraft Server... pasted 2023/09/29 02:42:48 UTC-07:00, Paste length: 17562 characters across 154 lines, Content: Java Version: 17.0.2Up-time: 26m
line 51-61
foreach basically means for each item in this list, that's why we're looping though each anchor of the npc
<npc.list_anchors> will list every anchor the npc has, anything under the foreach will then run for each anchor it has set
Delete the second foreach and you're good to go
aa okaay thx you sorry for wasting your time
it's no problem you're here to learn :D
You can leave it as it is
but now it dus not reconice the in put pos2 richt ?
i got it to move from 1 to 2 but now it says the same ting on both places
Do you want it to say different things for different places?
yea like you had in the vidoe
I just had the anchor names as the area names, it'll narrate the name of the anchor it walks to
so instead of pos1 the anchor name is books
(in my example)
no, there's already a narrate in the foreach that runs for each anchor
im lost now sorry
- foreach 1|2|3:
- narrate <[value]>```
This will narrate three things `1`, `2` and `3`
In the example, you loop though each anchor, and there's
` - narrate "This is the <&c><[id]> <&a>area." format:fnpc_format`
The `<[id]>` is the value currently in the loop, that narrate will run for each anchor, narrating each anchor name
!c foreach
queue
foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>]
Loops through a ListTag, running a set of commands for each item.
Loops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.
Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>.
Specify "key:<name>" to set the key definition name (if unset, will be "key").
Specify "as:<name>" to set the value definition name (if unset, will be "value").
Use "as:__player" to change the queue's player link, or "as:__npc" t...
Specify "as:<name>" to set the value definition name (if unset, will be "value").
That's just setting the definition name
You dont have to change anything in the script, you just need to name your anchors a different name
i got it now tank you, im more of a visial learner so a lot of texst and im geing confused
okay a new problem has come along, i added that you can click in the chat to give your yes or no anser. but no if i click it i skips to walk to pos1 an and just talks on the spot for pos1 and then walks to pos2 as normal. now the intresting part if i type yes in chat to anser it dus efry ting like it is ment to work? any ides
paste the updated script
Content of Denizen Script Paste #115770: 1123... pasted 2023/09/29 04:45:30 UTC-07:00, Paste length: 2548 characters across 61 lines, Content: fnpc_format: type: format
I'm unsure why that happens, just add a - wait 1t at the start of the yes click trigger
seems to fix it
^ here
okay thx again
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
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.)
@drifting kindle