#(Shree) How to make a conversation between an NPC and a player?

71 messages · Page 1 of 1 (latest)

wooden forum
#

How to make a conversation between an NPC and a player?

silent lintelBOT
#

(Shree) How to make a conversation between an NPC and a player?

silent lintelBOT
#

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>

nova delta
#

!guide

unreal salmonBOT
wooden forum
nova delta
#

Make sure to try out the examples instead of just reading, it can really help with understanding everything

#

After that, feel free to post more information as to what you're trying to do here and we'd love to help

wooden forum
#

thanks

wooden forum
#

@nova delta

#

what does this mean "- zap *"?

#

in this code

bright wasp
#

!c zap

unreal salmonBOT
# bright wasp !c zap
Group

core

Syntax

zap (<script>) [<step>] (<duration>)

Short Description

Changes the current interact script step.

Description

Changes the current interact script step for the linked player.

The step name input should match the name of a step in the interact script.
The step name can be '*' to automatically zap to the default step.

If used inside an interact script, will default to the current interact script.
If used elsewhere, but there is a linked NPC with an assignment and interact, that NPC's interact script will be used.
For anywhere else, you must specify the script by name.

Optionally specify a duration. When...

bright wasp
#

also-

#

!rule 3

unreal salmonBOT
# bright wasp !rule 3
Rule 3

Don't ping for help. https://denizenscript.com/discord_rules#rule3
"Pinging" refers to using an @ to alert somebody to your post.
Generally only ping somebody if your message is very specifically directed at them (meaning, only that person has anything to do with the information in your message, and it would be confusing who it was for without the ping).

If you're asking a question, please just make a forum post and ask.
If you have a bug report or a feature request, please just make a forum post about it.

If this is pulled up for you by a helper, your ping was unneeded.
If you're arguing about it, you're wrong.

wooden forum
#

my bad

wooden forum
#

im so confused

#

how do I get the npc to talk on click

bright wasp
wooden forum
#

I do this in .dsc file

#

and assign

clear hawk
#

Did you install the vscode extension for denizen scripts for vscode

#

!guide setting up your script editor

wooden forum
#

I'm doing it on pterodactyl

#

tho the other script worked

#

this one

wooden forum
#

nvm

#

I figured it out

#

instead of writing

#

my_assignment:
type: assignment
actions:
on assignment:
- trigger name:click state:true
on click:
- chat "Hello <player.name>!"

#

I did

#

my_assignment:
type: assignment
actions:
on assignment:
- trigger name:click state:true
on click:
- narrate "Hello <player.name>!"

#

worked fine

clear hawk
#

Please do not post scripts to discord, they format oddly

#

use the pastesite instead

#

!paste

unreal salmonBOT
wooden forum
#

can I make an if statement on an npc conversation?

#

like

#

if a person replies with "yes", say one thing, if replies with "no" other

#

if so, how

proper nova
unreal salmonBOT
#
Possible Confusion

Did you mean to search for what do i do: interact scripts (partial)?

unreal salmonBOT
proper nova
#

utilizing assignment and interaction scripts can help you run specific script sections based on triggers and what players say or do

wooden forum
#

So, I've got this right.

john:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - johnconvo

johnconvo:
    type: interact
    steps:
        1:
            click trigger:
                script:
                    - narrate "Sailor John: Ahoy! You look lost. Looking for something?"
                    - narrate "<element[§2Reply: §aYeah, I'm looking where I could find some fish.].on_hover[click to reply].on_click[/denizenclickable chat Yeah, I'm looking where I could find some fish.]>"
                    - narrate "<element[§2Reply: §aNo, I'm just wandering around.].on_hover[click to reply].on_click[/denizenclickable chat No, I'm just wandering around.]>"
                    - zap 2
        2:
            chat trigger:
                1:
                    trigger: /Yeah/, I'm looking where I could find some fish.
                    script:
                        - wait 2
                        - narrate "Sailor John: Well, I've heard that there's this pirate selling fish, I suggest finding him."
                        - zap 1
                2:
                    trigger: /No/, I'm just wandering around.
                    script:
                        - wait 2
                        - narrate "Sailor John: Ah, okay, have fun then!"
                        - zap 1
#

And it works fine

#

But

#

The chat trigger 1 doesn't work for some reason

#

The chat trigger 2 finishes up

#

But 1 doesn't

clear hawk
#

Could you provide a debug report please?

#

!debug

unreal salmonBOT
# clear hawk !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!

wooden forum
#

nvm, I fixed it

daring raftBOT
#
Thread Closing Reminder

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

#

@wooden forum