Menu

Join our Discord 0 MEMBERS ONLINE
play.creativefun.net 0 PLAYING NOW

Creating NPC's

Status
Not open for further replies.


Hi everyone,

Rank [$45] can now create up to 5 NPC's on each Creative server! Rank [$55] can now create up to 10 NPC's on each Creative server! This post will explain how to create an NPC, how to change the skin, how to change the name, how to give your NPC a message, how to make your NPC run a command, how to make your NPC head follow other players and how to change your NPC to different mobs in the game. Only the plot owner can create an NPC.

Creating an NPC
In this example I'm going to use /npc create Super
This will create an NPC called Super:


Changing the display name of an NPC

In this example I'm going to use /npc displayname Super <rainbow>Friendly Citizen
If you want to use hex codes for an NPC please use this website to create them in the correct format, &# will not work! This plugin uses a different method for translating hex colors but this website will be able to give you the necessary format: https://webui.advntr.dev/ Example: <color:#70ffcb>
Super is the name of the NPC I created and Friendly Citizen is the display name I want to give it:


Changing the skin of an NPC
In this example I'm going to use /npc skin Super JBerthh
This will set the skin of my NPC to become JBerthh's skin instead:


Making an NPC head follow players
In this example I'm going to use /npc turnToPlayer Super true
This will make the NPC's head follow players who come nearby:


Giving equipment to an NPC
You can customise the chest, feet, head, legs, mainhand and offhand slot of an NPC.
In this example I want the NPC to hold a diamond sword, to achieve this I'm going to hold a diamond sword in my hand and use /npc equipment Super mainhand
This will set the NPC to hold a diamond sword in its mainhand:


Setting the NPC message and command
You can use /npc message <NPC name> add <message> to add the NPC message.
In this example I'm going to add the first message by using /npc message Super add <gray>Hello! I'm your friendly guide to this plot.</gray>
I want to add another message in a new line so I will be using /npc message Super add <color:#58a5aa>Would you like to visit the main hub?</color>
I want to add the last message in a new line so I will be using /npc message Super add <green><hover:show_text:'<green>Yes</green>'><click:run_command:'/waypoint Hub'>[Yes]</click></hover></green> <red>[No]</red>
Use this website to add colour and commands to your NPC's message: https://webui.advntr.dev/
This will make the NPC send the message in chat when a player right clicks on the NPC. I have added click events to my message so clicking on the [Yes] will run the /waypoint Hub command for the player.
When a player right clicks on the NPC it will trigger the NPC messages that you set:


I made it so that clicking on [Yes] in the NPC message will trigger the /waypoint hub command for the player:


If you want to edit a line you have already added you can use /npc message <NPC name> set <line number> <message>
If you want to remove a line you already added you can use /npc message <NPC name> remove <line number>
If you want to clear all the messages you have added you can use /npc message <NPC name> clear

NPC interaction cooldown

You can set a cooldown on how often a player can right click on your NPC using /npc interactionCooldown <NPC name> <time in seconds>


Random NPC messages
You can make your NPC send a random message from a list of messages you have set
In this example I'm going to add this message: /npc message Super add <red>You lost the giveaway, try again tomorrow</red>
I'm going to add another message: <color:#40ff76>You won the giveaway!</color> <color:#80d0ff>Redeem your reward by sending this code:</color> 348734 <color:#80d0ff>to Bob123 on</color> <color:#6e8bff>Discord</color>
Now that the messages are done I want to add an interaction cooldown of 1 day so I will use: /npc interactionCooldown Super 86400
Finally, I want the NPC to send a random message from the messages I've added so I need to use /npc message <NPC name> sendRandomly true





Moving the NPC to a different location

In this example I'm going to use /npc movehere
This will move the NPC to where I'm standing:


NPC attributes
You can adjust the pose of your NPC by using /npc attribute <NPC name> pose <pose>
There are 5 poses you can choose from: crouching, sitting, sleeping, standing and swimming
In this example I want my NPC to crouch so I will use /npc attribute Super pose crouching


Changing the NPC from a player to a mob

In this example I'm going to use /npc type Super ender_dragon
These are the following things you can change your NPC into: allay, armor_stand, axolotl, bat, bee, blaze, boat, camel, cat, cave_spider, chest_boat, chest_minecart, chicken, cod, command_block_minecart, cow, creeper, dolphin, donkey, dragon_fireball, drowned, elder_guardian, end_crystal, ender_dragon, enderman, endermite, evoker, eye_of_ender, fireball, fox, frog, furnace_minecart, ghast, giant, glow_item_frame, glow_squid, goat, guardian, hoglin, hoper_minecart, horse, husk, illusioner, iron_golem, item_frame, leash_knot, llama, magma_cube, minecart, mooshroom, mule, ocelot, panda, parrot, phantom, pig, piglin, piglin_brute, pillager, player, polar_bear
This will change the NPC from being a player and it will now become what I specified, in this example it has become an ender dragon:


Making an NPC glow
In this example I'm going to use /npc glowing super true
This will make the NPC have a glowing effect:


You can change the glowing color of an NPC too, to do this use /npc glowingcolor [npc name] [color]
In this example I'm going to use /npc glowingcolor super green


How to view all of your NPC's

In this example I am going to use /npc list
This will list the names of every NPC I have created:


How to remove an NPC

In this example I am going to use /npc remove Super
This will remove the NPC I created:
 
Status
Not open for further replies.
Top