# +------------------- # | # | NPC Skin Save/Load # | # | A drop-in helper for saving/loading skins for reuse. # | # +------------------- # # @author mcmonkey # @date 2019/08/26 # @denizen-build REL-1700 # @script-version 1.0 # # Installation: # Just put the script in your scripts folder and reload. # # Usage: # Select an NPC and use command "/saveskin" or "/loadskin" # You can do: # /saveskin [name] - Saves the NPC's skin to the name you specify. # /loadskin [name] - Gives the NPC the skin saved for the name you used. # # Uses permission "denizen.saveskin" # # ---------------------------- END HEADER ---------------------------- npc_skin_save_command: type: command debug: false name: saveskin usage: /saveskin [name] description: Saves ye skin permission: denizen.saveskin script: - inject npc_saveskin_command_validate - flag server npc_skins.:; - narrate "Skin saved." npc_skin_load_command: type: command debug: false name: loadskin usage: /loadskin [name] description: Loads ye skin permission: denizen.saveskin script: - inject npc_saveskin_command_validate - if !]>: - narrate "No skin found for the name specified." - stop - adjust skin_blob:]> - narrate "Skin loaded!" npc_saveskin_command_validate: type: task debug: false script: - if == 0: - narrate "Must specify a skin name." - stop - if == null: - narrate "Must select an NPC!" - stop