#(amelia_kaho) Question about NPC custom commands / custom shop

72 messages · Page 1 of 1 (latest)

normal sundial
#

Hello,

I'll like to understand how to work this out a bit better.

In our world, we want to run a server command when a player provides items (2 ghast tears) to the NPC.

I've tried to run it as /npc command and /npc shop but both didnt work.

When using /npc command it doesnt let us click on the npc or provide the items.

When using /npc shop edit after setting up, there is no way for the player to "sell" the items.

Need some help to understand how we can do this better.

Input: 2 ghast tears
Output: a custom command.

midnight pastureBOT
#

(amelia_kaho) Question about NPC custom commands / custom shop

midnight pastureBOT
#

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.

untold plover
#

Can you send your shops.yml

#

@normal sundial

normal sundial
#

oh i'll need to contact the server owner. coz i dont have the access to the files.

I'll check back here when he wakes up. (he's in a different time zone)

normal sundial
#

i realised that all the settings we did on the NPC did not save

untold plover
solar caveBOT
untold plover
#

I can’t open yaml files on mobile

#

Can you put it in our paste bin

#

!pasteyaml

solar caveBOT
untold plover
#

@normal sundial

normal sundial
#

here is the shops.yml content

#
npc:
  50e749bc-9bfa-43e7-ba53-df1ca91d058d:
    title: World Augmentator
    type: SELL
untold plover
#

Where’s the shop then?

#

@normal sundial

#

The shops yml is empty?

#

Have you saved?

normal sundial
#

@untold plover i tried setting up the shop. but this turns out empty. i dont really know what we did wrong as well.

#

i was also surprised when i saw that it was empty

#

i thought i had all the selections done properly

untold plover
#

@normal sundial do you have a set of server logs

normal sundial
#

hang on let me get the owner

jolly radish
#

Hello, we have been trying to setup a player interactive npc, where if they turn in a set of items like lets say for example "1 ghast tear" it would run the command to increase the world border in the world

#

We were thingking of using Citizens for that, but we ran into some issues in which doing the /npc itemcost & being able to leftclick/rightclick was not working

normal sundial
jolly radish
#

We instead decided to use the npc shop, but also had some problems with it and decided to reach out, I'm attaching the files for the config & shops .yml

late delta
#

!pasteyaml

solar caveBOT
jolly radish
untold plover
#

I need the server logs

#

!logs

solar caveBOT
# untold plover !logs
Info: logs

Please post your full latest log file.

Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).

How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.

Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.

untold plover
#

Startup log would be fine

jolly radish
late delta
solar caveBOT
#
Server Version

Paper version git-Paper-381 (MC: 1.20.4)-- (Current build :white_check_mark:)

Plugin Version(s)

Citizens v2.0.33-SNAPSHOT (build 3293) -- (Outdated build, behind by 3)

Checked For

@late delta

Other Noteworthy Plugin(s)

WorldGuard v7.0.9+5934e49

Problematic Plugin(s)

Geyser-Spigot v2.2.0-SNAPSHOT - Bedrock clients are unsupportable. Please do all testing with a Java Edition client.
floodgate v2.2.2-SNAPSHOT (b85-71acc6c)

Possibly Relevant Plugin(s)

ViaVersion v4.9.3-SNAPSHOT - Mixed client vs server versions can sometimes cause packet-related issues.
Multiverse-Core v4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.
GSit v1.7.0 - 'Sit on other players' or 'sit on mobs' plugins sometimes allow players to sit on NPCs.

Potentially Bad Line(s)

[18:01:15] [Server thread/ERROR]: [Essentials] You are running an unsupported server version! :warning: Log contains error messages.

jolly radish
#

Can you explain what this means, is there something that should be changed, or updated?

late delta
#

I'll let it up to fullwall

#

I don't see much issue here. Are you testing on a Java Client?

jolly radish
#

Yes, I am using a Java client, the geyser/ViaVerson are just for other players

#

Ive tested on different versions from 1.20 til 20.4

#

and ive tried to go back from version 20.4, but our server doesn't want to load in older versions, so its currently on the latest stable 20.4 version

#

I also wanted to point out that when we were creating a shop, It didnt seem like it was saving, when we were testing

untold plover
#

So just try /citizens save and send the shops.yml

#

There’s no errors when you try to do that?

jolly radish
#

I did the save commands, and checked on the shops.yml and nothing changed

#

its still the same file

untold plover
#

So what’s actually in the shop then?

#

So I can replicate this

normal sundial
#

Input by user : 2 ghast tears
Output command : increase world border

#

So players pay 2 ghast tears to increase the world border

normal sundial
#

To put things in perspective.
We are running a community server.

So to stop players from running rampant in the nether, we are starting with a small world border in the nether.

So as more and more players start getting into the nether, the nearby structures are all going to be looted clean. So, we want to allow players to buy command worldborder add 16 600 with 2 ghast tears

untold plover
#

@normal sundial I just tried to replicate with the same shop but it saved fine for me

normal sundial
untold plover
#

/npc shop edit
Make an item with two ghast tears
Set item cost to two ghast tears
Set command result to worldborder add 16 600

#

/citizens save

normal sundial
#

@untold plover thanks! let us give it a try and follow back here again

untold plover
#

!rule 3

solar caveBOT
# untold plover !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.

hearty helmBOT
#
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.)

#

@normal sundial