#(kinglamp) Selecting NPC's with commands in quests

106 messages · Page 1 of 1 (latest)

hollow steeple
#

I am trying to make an arena that uses quests to select NPC's and respawn them. The commands don't work if the player is not an op and doesnt work if it is used as a console command.

I have tried various different ways of doing this, including:

  • Creating and spawning a new npc every time the quest is started (Doesnt work because you cannot set sentinel or similar things within the npc spawn command

  • Copying an NPC everytime the quest is started (Doesnt work because the 'npc select' cannot be used by a non op player, and you cannot choose where the npc spawns

I have tried so many different ways of doing this and im kinda running out of ideas, some help would be appreciated.

Below I have provided videos on how it works so that someone may be of aid

random jacinthBOT
#

(kinglamp) Selecting NPC's with commands in quests

random jacinthBOT
#

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.

analog moss
#

Sounds like what you're looking for is the template command

#

/npc template

hollow steeple
analog moss
#

!logs

sudden windBOT
# analog moss !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.

hollow steeple
#

I hope this works?

analog moss
sudden windBOT
# analog moss !logcheck https://paste.denizenscript.com/View/124436
Server Version

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

Plugin Version(s)

Citizens v2.0.33-SNAPSHOT (build 3362) -- (:warning:Outdated build, behind by 111)
Sentinel v2.8.1-SNAPSHOT (build 513) -- (Outdated build, behind by 9)

Checked For

@analog moss

UUID Version

4 (:white_check_mark: Online)

Java Version

17.0.9 :white_check_mark:

Other Noteworthy Plugin(s)

WorldGuard v7.0.9+5934e49, BeautyQuests v1.0.2

Problematic Plugin(s)

CommandNPC v1.9.1 - :warning: NPC Command plugins have never had a valid reason to exist, as there have always been better ways to do that. The modern way is https://wiki.citizensnpcs.co/NPC_Commands.

Potentially Bad Line(s)

[23:18:13] [Server thread/ERROR]: [BeautyQuests] Error when deserializing the stage 2 for the quest 22 :warning: Log contains error messages.

analog moss
#

Uhm, yeah 1.20.4 is no longer supported

hollow steeple
#

rip

analog moss
#

You need 1.20.6 or 1.21

hollow steeple
#

Is it just that those versions arent getting updates anymore?

analog moss
#

Yep

hollow steeple
#

I had assumed

analog moss
#

!patchversions

sudden windBOT
# analog moss !patchversions
Info: patchversions

We support only the latest patch-version of Minecraft for any recent main version (and Mojang, Spigot, Paper, etc. all generally also follow the same rule).

"Patch version" means the last number in a version label, for example in 1.18.2, the main version is 1.18, and the patch version is .2.
So if 1.18.2 is the latest patch version, then 1.18.1, and 1.18(.0) are all outdated patch versions, and therefore are unsupported.

Note that we do still support recent older main versions (such as 1.17 and 1.16) so long as you are on the latest patch-version of those main versions (like 1.17.1 and 1.16.5).

hollow steeple
#

Understandable

#

What sucks is that some of my plugins arent combatible with 1.20.6

analog moss
#

If you need asssistance updating we could give it

#

Which plugins?

hollow steeple
#

Let me see

#

I have a testrealm server that I can safely update to 1.20.6 to test plugins but I know for sure Blockregen isnt being updated anymore to support future versions

#

I need to test every plugin I use to see which ones break in 1.20.6

#

And find replacements

#

I could show you my plugin list if you would like

hollow steeple
#

I updated all of my plugins in the teastrealm, and the template command still isnt here (plugin version is 2.0.35) (version is 1.20.6)

brittle spruce
#

It's /template, not /npc template

#

Can generate a template and then use /template apply or /npc create --template

#

You will need to edit the generated template however

hollow steeple
#

I see

#

I will need to learn this cmd to see if it will work

#

Thank you 👍

hollow steeple
brittle spruce
#

In the future, I am planning to add simplified template commands to more easily customise the template

hollow steeple
#

I see

#

If you could please, could you see how I would use it in the situation above?

hollow steeple
#

Still tryna wrap my head around it yaknow

#

Sorry if thats a dumb question

brittle spruce
#

You could run /template apply or /npc create --template

#

With the quests

hollow steeple
#

Im just afraid that stuff wont run because a player isnt an op

brittle spruce
#

For copying etc you can do it without needing the player to run the command but I am not at home yet so I will address that later

hollow steeple
#

Thats alright

brittle spruce
#

Why can't you run commands as an op?

#

Or server?

hollow steeple
#

I can, but not all players will be op

#

The current way im doing it is by

brittle spruce
#

Why not run as server then?

hollow steeple
#

The way im doing it rn is

brittle spruce
hollow steeple
#

uhmm

#

I think im getting confused

#

lol

brittle spruce
#

The server can select an npc

hollow steeple
#

U mean like

#

The console?

brittle spruce
#

Yes

#

Just use the --id argument

#

Or --uuid

hollow steeple
#

Alright let me try it

brittle spruce
#

Can also run /npc select --id xx

hollow steeple
#

Thanks for the help btw

#

This is how im doing it rn (not console)

brittle spruce
#

I don't recognise this interface (is it betonquests?)

hollow steeple
#

if the server can select npcs, can it run commands on them afterwards?

hollow steeple
#

Sorry I had assumed there was only one quest plugin 🤦‍♂️

#

lol

brittle spruce
#

That way the right npc is always selected

hollow steeple
#

Right

#

First cmd

hollow steeple
brittle spruce
#

For safety I would probably just say /npc respawn --id <id>

hollow steeple
#

Ive always been confused about this 🤔

brittle spruce
#

You can set it to auto respawn after x ticks

hollow steeple
#

Is there a way to not do that?

brittle spruce
#

By default it will not do that

hollow steeple
#

Cool

brittle spruce
#

If you just want to spawn it use /npc despawn and /npc spawn

#

/npc respawn is for automatic respawning

hollow steeple
#

ah I see

#

I will change all of the sentinel respawn commands and see if it works

#

oh btw

#

What does parse placeholders do?

#

Now the only issue is that the npc is respawning wherever it last died instead of at a specific spot

#

Its also not despawning for some reason, and keeps randomly respawning instantly after its killed

brittle spruce
brittle spruce
hollow steeple
pale onyxBOT
hollow steeple
#

It all works perfectly now, let me try in unopped

#

It works perfectly :D

#

Thank you your amazing!!!

brittle spruce
#

Np

hollow steeple
#

I will return if I have more questions but thank you :D