Advanced NPC Click Commands

Scripts that are ready to be just dropped-in and used! Exclusively high-quality scripts selected by the Denizen team.
Post Reply
User avatar
mcmonkey
Site Admin
Site Admin
Posts: 299
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Advanced NPC Click Commands

Post by mcmonkey » March 1st, 2019, 8:42 am

A drop-in script that lets you add automatic command execution to NPCs when right-clicked! With bonus advanced features!

Hastebin: https://one.denizenscript.com/haste/64128 <-- Most users, just click here and click "Download the script"

GitHub current version: https://github.com/mcmonkeyprojects/Den ... ommand.dsc


NOTE TO USERS COMING FROM CITIZENS:
This is a Denizen script! Denizen is a scripting engine that functions as a plugin for Spigot, and deeply integrates into Citizens to add a lot of extra features to your NPCs. Download Denizen here: https://ci.citizensnpcs.co/job/Denizen/ or learn more about Denizen here: https://guide.denizenscript.com/guides/ ... nizen.html

# Installation:
# Just put the script in your scripts folder and reload.
#
# Usage:
# Select an NPC and use command "/npccommand"
# You can do:
# /npccommand - Display help info
# /npccommand off - Disables command running
# /npccommand set [command] - Sets the NPC to run a specific command
# /npccommand add [command] - Adds a command for the NPC to randomly execute
# You can prefix commands with "player:" to execute as the player, otherwise will execute as the server.
# Use prefix "op:" to execute the command as the player (with operator privileges).
# Add multiple commands to execute at the same time via " - "
# For example: /npccommand set player:summon lightning_bolt - say "shocking!" - player:summon bat
#
# You can use tags. For example: /npccommand add effect give <player.name> speed
#
# Players can right-click the NPC at any time to have a command run.

Also, if you have a Bungee network and want an equivalent to "/server" to use,
The "/server" command exists at the proxy level, not the Spigot server level, and so cannot be accessed directly. A Denizen command script to do basically the same thing is fairly easy to make, and so a sample script of that exact idea is available:
Hastebin: https://one.denizenscript.com/haste/67017 <-- Most users, just click here and click "Download the script"
GitHub current version: https://github.com/mcmonkeyprojects/Den ... ommand.dsc
This adds the command /sendplayer <player> <server>
With that script added, you can do "/npccommand set sendplayer <player.name> myservernamehere"
Denizen lead developer. On Discord as mcmonkey#6666.

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 299
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: NPC Click Commands

Post by mcmonkey » September 24th, 2019, 4:29 am

This is now outdated/irrelevantized thanks to base Citizens "/npc command [add/remove]"

EDIT: actually this still has way more features n stuff.
Denizen lead developer. On Discord as mcmonkey#6666.

polarassassin
New
New
Posts: 1
Joined: August 5th, 2020, 8:07 am

Re: Advanced NPC Click Commands

Post by polarassassin » August 5th, 2020, 8:09 am

made an account to say im using this script now in 2020, super useful thank you so much for the scripts you have made!♥♥♥♥

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests