##################################################################### #| |# #| dCommands |# #| |# #| A script that adds highly customizable commands. |# #| |# ##################################################################### #| |# #| Author: Bill Gates Denizen Build: REL1779 |# #| Date: 2022/11/02 Script Version: 1.01 |# #| |# ##################################################################### # # ---------------------------- CONFIG START --------------------------- dcommands_config: type: data ## DON'T CHANGE DATA NAMES, ONLY THEIR VALUES! ## FOR SPECIAL CHARACTERS LIKE [] OR <>, USE THEIR RESPECTIVE TAGS ## ALL COLOR INPUTS NEED TO BE A VALID COLORTAG! If invalid, they'll default to white. server: # Name of your server here. Use to not have one. name: dCommands # This will appear before the name of your server. Use to not have one. prefix: <&lb> # This will appear after the name of your server. Use to not have one. suffix: <&rb> # This will be the color of your server's name. color: # This is the color that global messages will have. # So far, all commands that use this color are /save, /restart and /clearchat. global_message_color: private: # This is the color that private messages will have. message: # These are the colors that player names will have in private messages. Their names are self-explanatory. sender: receiver: ban: # This is the color ban messages will have. message: # These are the messages that'll be shown when kicking a banned player from the server. perma: You're permanently banned from this server! temp: header: You're temporarily banned from this server! # The duration of the player's ban is automatically added after your footer message. ## Don't try to input the duration yourself, it WILL break. footer: Your ban lasts until<&co> # You can use here. If you do, it'll use the same color as the server color. color: # This is the color ban reasons and durations will have. value: # - These colors will also be used when preventing a banned user from joining the server! unban: # This is the color that the unban announcement message will have. message: # OPTIONAL: This is the color the unbanned player's name will have. # You can use to default to the message's color. player: # These are the colors for the command /dcommands, which lists all available dCommands. dcommands: header: # This will be the text before the list of commands. # Be careful with what you put in here, and remember to always use symbols' respective tags. text: All available dCommands<&co> # This is the color of the header text. color: # This is the color that commands will have. If invalid, will defualt to the header color. commands: separator: # This is the symbol that'll appear before a command. # Be careful with what you put in here, and remember to always use symbols' respective tags. symbol: → # This is the color that the symbol will use. color: # Will narrate a separate list containing all disabled dCommands if the player is opped. show_disabled_dcommands: true # These are the configurations for the /heal command. heal: message: # Message sent to you, when you heal yourself. self: You healed yourself! another: # Message sent to the player you healed. theirs: You've been healed by a higher power! # Message sent to yourself after healing someone else. The next word will be the player's name. # This would mean that a 'You just healed' input, would actually produce 'You just healed PoopSlayer69!' yours: You just healed # This is the color that the messages above will be. color: # This is the color that /heal's numbers will have. numbers: separator: # This will appear in between the old health and the new health. # Example: 10 → 20 symbol: → # You can use here. If you do, it'll use the same color as the message color. color: # These are the configuration for the /feed command. feed: message: # Message sent to you, when you feed yourself. self: You fed yourself! # Message sent to the player you fed. another: You've been fed by a higher power! # This is the color the messages above will use. color: # For more advanced users: # Every script has it's own usage and description data args, they're used whenever you use the commands wrong # So if you want to change the messages that are shown there, edit them to whatever you want. # If you're feeling extra smart today, L944 has the injectable tasks that take care of that. # Please don't change anything after this config section if you're not 200% sure of what you are doing, as changes may create conflicts with other commands or the entire script. # ---------------------------- CONFIG END ---------------------------- # ----------------- DONT TOUCH FILE AFTER THIS POINT ----------------- dcommands_save: type: command name: save description: Saves denizen files and world files. usage: /save permission: dcommands.save data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - inject dcommands_server_definitions - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Saving world files.." - announce to_console "<&ss>bSaving world files.." - foreach as:world: - wait 0.01s - adjust <[world]> save - adjust server save - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> World files saved." - announce to_console "<&ss>bWorld files saved." dcommands_restart: type: command name: restart description: Restarts the server after given DurationTag input. If no DurationTag is given, defaults to 30 seconds. usage: /restart (DurationTag) permission: dcommands.restart tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - narrate "<&[error]>Server is already restarting!" - stop - flag server restarting - inject dcommands_server_definitions - if : - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Restarting server in 30 seconds." - announce to_console "<&ss>4Restarting server in 30 seconds." - wait 20s - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Restarting server in 10 seconds." - announce to_console "<&ss>4Restarting server in 10 seconds." - wait 5s - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Restarting server in 5 seconds." - announce to_console "<&ss>4Restarting server in 5 seconds." - wait 5s - adjust server restart - stop - define duration ].if_null[null]> - if <[duration]> == null: - narrate "<&[error]>Not a valid DurationTag! Examples of valid DurationTags:" - narrate "<&[error]>15s, 15m, 15h." - stop - repeat 20: - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Restarting server in <[duration].formatted_words>." - announce to_console "<&ss>4Restarting server in <[duration].formatted_words>." - define duration <[duration].in_seconds.div[2]> - if <[duration]> > 10: - define duration <[duration].round_up_to_precision[10]> - else: - define duration <[duration].round_up_to_precision[0.1]> - if <[duration]> <= 1: - wait 1s - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Restarting server." - announce to_console "<&ss>4Restarting server." - wait 1s - adjust server restart - stop - define duration ]> - wait <[duration]> dcommands_enchant: type: command name: enchant description: Enchants the item in your hand up to level 255, or removes enchantments from it. usage: /enchant [enchantment] (level / remove) permission: dcommands.enchant tab completions: 1: 2: remove data: arguments: minimum: 1 maximum: 2 debug: false script: - inject dcommands_inject_arguments - define enchantraw - define enchant ].if_null[null]> - if <[enchant]> == null: - narrate "<&[error]>This enchantment does not exist!" - stop - define arg - if <[arg].is_integer>: - narrate "<&[emphasis]>Enchanting with <[enchant].full_name[<[arg]>].strip_color>." - inventory adjust slot:hand enchantments:<[enchantraw]>,<[arg]> - else: - if <[arg]> == remove: - define level ]> - inventory adjust slot:hand remove_enchantments:<[enchantraw]> - narrate "<&[emphasis]>Removed <[enchant].full_name[<[level]>].strip_color> from ." - else: - narrate "<&[error]>Incorrect usage!" - narrate <&[error]> - stop dcommands_ban_handler: type: world debug: false events: on player prelogin flagged:banned: - determine kicked+]> dcommands_ban_proc: type: procedure definitions: player debug: false script: - define reason <[player].flag[banned.reason]> - inject dcommands_server_definitions - inject dcommands_ban_definitions - if <[player].has_flag[banned.duration]>: - define duration <[player].flag[banned.duration]> - determine "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.header]><&nl><&nl><&color[<[ban.message.color]>]>Reason: <&color[<[ban.value]>]><[reason]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.footer]> <&color[<[ban.value]>]><[duration].formatted_words>" - else: - determine "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&nl><&color[<[ban.message.color]>]><[ban.message.perma]><&nl><&nl><&color[<[ban.message.color]>]>Reason: <&color[<[ban.value]>]><[reason]>" dcommands_ban: type: command name: ban description: Bans someone. usage: /ban [name] [reason] permission: dcommands.ban tab completions: 1: data: arguments: minimum: 2 maximum: 999 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - narrate "<&[error]>You cannot ban yourself!" - stop - if <[player].has_flag[banned]>: - narrate "<&[error]>This player is already banned!" - stop - inject dcommands_server_definitions - inject dcommands_ban_definitions - define reason ].substring[2]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[ban.message.color]>]>Player <[name]> has been permanently banned for <&dq><&color[<[ban.value]>]><[reason]><&color[<[ban.message.color]>]><&dq>." - announce to_console "<&ss>4 has permanently banned <[name]> for <&dq><[reason]><&dq>." - flag <[player]> banned.reason:<[reason]> - kick <[player]> reason:]> dcommands_ban_definitions: type: task debug: false script: - define ban.message.perma - define ban.message.temp.header - define ban.message.temp.footer - define ban.message.color - define ban.value dcommands_tempban: type: command name: tempban description: Bans someone temporarily. usage: /tempban [name] [duration] [reason] permission: dcommands.tempban tab completions: 1: data: arguments: minimum: 3 maximum: 999 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - narrate "<&[error]>You cannot ban yourself!" - stop - define duration - if ].exists>: - if <[player].has_flag[banned]>: - narrate "<&[error]>This player is already banned!" - stop - inject dcommands_server_definitions - inject dcommands_ban_definitions - define reason ].substring[2]> - define duration ]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[ban.message.color]>]>Player <[name]> has been temporarily banned for <&color[<[ban.value]>]><[duration].formatted_words><&color[<[ban.message.color]>]>, for <&dq><&color[<[ban.value]>]><[reason]><&color[<[ban.message.color]>]><&dq>." - announce to_console "<&ss>4 has temporarily banned <[name]> for <[duration].formatted_words>, for <&dq><[reason]><&dq>." - flag <[player]> banned.reason:<[reason]> expire:<[duration]> - flag <[player]> banned.duration:<[duration]> expire:<[duration]> - kick <[player]> reason:]> - else: - narrate "<&[error]>Invalid duration! Examples of valid durations:" - narrate "<&[error]>1d, 5m, 30s" dcommands_unban: type: command name: unban description: Does something usage: /unban [name] permission: dcommands.unban tab completions: 1: data: arguments: minimum: 1 maximum: 1 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player].has_flag[banned]>: - flag <[player]> banned:! - inject dcommands_server_definitions - define unban.message - define unban.player - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[unban.player]>]><[player].name> <&color[<[unban.message]>]>has been unbanned!" - announce to_console "<&ss>b has unbanned <[player].name>." - else: - narrate "<&[error]>This player is not banned!" dcommands_invsee: type: command name: invsee description: Looks at the desired player's inventory. Works with offline players. usage: /invsee [name] permission: dcommands.invsee tab completions: 1: data: arguments: minimum: 1 maximum: 1 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - inventory open d: - stop - narrate "<&[warning]>Opening <[player].name>'s inventory.." - inventory open d:<[player].inventory> dcommands_enderchest: type: command name: enderchest description: Opens someone's enderchest. If no name given, opens yours. Works with offline players. usage: /enderchest (name) permission: dcommands.enderchest aliases: - ec - echest tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - inventory open d: - stop - inject dcommands_inject_player - if <[player]> == : - inventory open d: - stop - narrate "<&[warning]>Opening <[player].name>'s enderchest.." - inventory open d:<[player].enderchest> dcommands_private: type: command name: tell description: Sends private messages to another player. usage: /tell [player] [message] permission: dcommands.tell aliases: - msg - message tab completions: 1: data: arguments: minimum: 2 debug: false script: - if < : - narrate "<&[error]>You can't send an empty message!" - narrate <&[error]> - stop - inject dcommands_inject_player - define receiver <[player]> - define sender - if <[sender]> == <[receiver]>: - narrate "<&[error]>You can't send messages to yourself!" - stop - define message ]> - flag <[sender]> dcommands.private.last:<[receiver]> - flag <[receiver]> dcommands.private.last:<[sender]> - define private.message - define private.sender - define private.receiver - narrate "<&7>[<&color[<[private.sender]>]><[sender].name> <&7>⇒ <&color[<[private.receiver]>]>You<&7>]<&color[<[private.message]>]><[message]>" targets:<[receiver]> - narrate "<&7>[<&color[<[private.receiver]>]>You <&7>⇒ <&color[<[private.sender]>]><[receiver].name><&7>]<&color[<[private.message]>]><[message]>" targets:<[sender]> - announce to_console "<&ss>3<[sender].name> <&ss>7-<>> <&ss>3<[receiver].name><&ss>7:<&ss>b<[message]>" dcommands_private_reply: type: command name: r description: Replies to the latest message received. usage: /r [message] permission: dcommands.reply tab completions: 1: debug: false script: - if !: - narrate "<&[error]>You don't have anyone to reply!" - stop - define receiver - define sender - if !<[receiver].is_online>: - narrate "<&[error]>The last player to message you isn't online anymore!" - stop - if : - narrate "<&[error]>Your message cannot be empty!" - stop - define message - flag <[sender]> dcommands.private.last:<[receiver]> - flag <[receiver]> dcommands.private.last:<[sender]> - define private.message - define private.sender - define private.receiver - narrate "<&7>[<&color[<[private.sender]>]><[sender].name> <&7>⇒ <&color[<[private.receiver]>]>You<&7>]<&color[<[private.message]>]> <[message]>" targets:<[receiver]> - narrate "<&7>[<&color[<[private.receiver]>]>You <&7>⇒ <&color[<[private.sender]>]><[receiver].name><&7>]<&color[<[private.message]>]> <[message]>" targets:<[sender]> - announce to_console "<&ss>3<[sender].name> <&ss>7-<>> <&ss>3<[receiver].name><&ss>7:<&ss>b <[message]>" dcommands_reply_cleaner: type: world debug: false events: on player quits: - flag dcommands.private.last:! dcommands_clearchat: type: command name: clearchat description: Does something usage: /clearchat permission: dcommands.clearchat tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - repeat 10: - announce <&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl><&nl> - inject dcommands_server_definitions - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[global_message_color]>]> Chat was cleared." - announce to_console "<&ss>bChat was cleared by ." dcommands_dcommands: type: command name: dcommands description: Lists all available dCommands. usage: /dcommands permission: dcommands.dcommands tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - define commands - define path - define dcommands.disabled <[commands].filter[data_key[enabled].equals[false]]> - define dcommands.raw <[commands].filter[relative_filename.equals[<[path]>]].exclude[<[dcommands.disabled]>]> - define dcommands.name <[dcommands.raw].parse[data_key[name]]> - define dcommands.header.text - define dcommands.header.color - define dcommands.separator.symbol - define dcommands.separator.color - define dcommands.commands - narrate <&color[<[dcommands.header.color]>]><[dcommands.header.text]> - narrate "<&color[<[dcommands.separator.color]>]><[dcommands.separator.symbol]> <&color[<[dcommands.commands]>]><[dcommands.name].alphabetical.separated_by[<&nl><&color[<[dcommands.separator.color]>]><[dcommands.separator.symbol]> <&color[<[dcommands.commands]>]>]>" - if : - if : - if <[dcommands.disabled].is_empty>: - stop - narrate "<&7>Disabled dCommands:" - narrate "<&8><[dcommands.separator.symbol]> <&7><[dcommands.disabled].parse[data_key[name]].alphabetical.separated_by[<&nl><&8><[dcommands.separator.symbol]> <&7>]>" dcommands_load_definitions: type: world debug: false events: after scripts loaded: - flag server restarting:! - flag server dcommands:! - flag server dcommands.server.prefix: - flag server dcommands.server.suffix: - flag server dcommands.server.name: - flag server dcommands.server.color:].if_null[]> - flag server dcommands.global_message_color:].if_null[]> - flag server dcommands.ban.message.perma: - flag server dcommands.ban.message.temp.header: - flag server dcommands.ban.message.temp.footer: - flag server dcommands.ban.message.color:].if_null[]> - flag server dcommands.ban.value:].if_null[]> - flag server dcommands.unban.message:].if_null[]> - flag server dcommands.unban.player:].if_null[]>]> - flag server dcommands.private.message:].if_null[]> - flag server dcommands.private.sender:].if_null[]> - flag server dcommands.private.receiver:].if_null[]> - wait 0.01s - flag server dcommands.dcommands.header.text: - flag server dcommands.dcommands.header.color:].if_null[]> - flag server dcommands.dcommands.separator.symbol: - flag server dcommands.dcommands.separator.color:].if_null[]> - flag server dcommands.dcommands.commands:].if_null[]> - flag server dcommands.heal.message.self: - flag server dcommands.heal.message.another.theirs: - flag server dcommands.heal.message.another.yours: - flag server dcommands.heal.message.color:].if_null[]> - flag server dcommands.heal.numbers:].if_null[]> - flag server dcommands.heal.separator.symbol: - flag server dcommands.heal.separator.color:].if_null[]> - flag server dcommands.feed.color:].if_null[]> - flag server dcommands.feed.message.self: - flag server dcommands.feed.message.another: dcommands_server_definitions: type: task debug: false script: - define server.prefix - define server.suffix - define server.name - define server.color - define global_message_color dcommands_gmc: type: command name: gmc description: Creative mode. usage: /gmc (player) permission: dcommands.gmc tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - if == creative: - stop - else: - adjust gamemode:creative - narrate "<&[warning]>Gamemode set to creative." - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:creative - narrate "<&[warning]>Gamemode set to creative." - stop - if <[player].gamemode> == creative: - stop - else: - adjust <[player]> gamemode:creative - narrate "<&[warning]>Set <[player].name>'s gamemode to creative." - narrate "<&[warning]>Gamemode set to creative by an admin." targets:<[player]> dcommands_gms: type: command name: gms description: Survival mode. usage: /gms (player) permission: dcommands.gms tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - if == survival: - stop - else: - adjust gamemode:survival - narrate "<&[warning]>Gamemode set to survival." - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:survival - narrate "<&[warning]>Gamemode set to survival." - stop - if <[player].gamemode> == survival: - stop - else: - adjust <[player]> gamemode:survival - narrate "<&[warning]>Set <[player].name>'s gamemode to survival." - narrate "<&[warning]>Gamemode set to survival by an admin." targets:<[player]> dcommands_gmsp: type: command name: gmsp description: Spectator mode. usage: /gmsp (player) permission: dcommands.gmsp tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - if == spectator: - stop - else: - adjust gamemode:spectator - narrate "<&[warning]>Gamemode set to spectator." - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:spectator - narrate "<&[warning]>Gamemode set to spectator." - stop - if <[player].gamemode> == spectator: - stop - else: - adjust <[player]> gamemode:spectator - narrate "<&[warning]>Set <[player].name>'s gamemode to spectator." - narrate "<&[warning]>Gamemode set to spectator by an admin." targets:<[player]> dcommands_gma: type: command name: gma description: Adventure mode. usage: /gma (player) permission: dcommands.gma tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - if == adventure: - stop - else: - adjust gamemode:adventure - narrate "<&[warning]>Gamemode set to adventure." - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:adventure - narrate "<&[warning]>Gamemode set to adventure." - stop - if <[player].gamemode> == adventure: - stop - else: - adjust <[player]> gamemode:adventure - narrate "<&[warning]>Set <[player].name>'s gamemode to adventure." - narrate "<&[warning]>Gamemode set to adventure by an admin." targets:<[player]> dcommands_heal: type: command name: heal description: Heals yourself or another player. usage: /heal (player) permission: dcommands.heal tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define heal.message.self - define heal.message.color - define heal.numbers - define heal.separator.symbol - define heal.separator.color - if : - define health - define maxhealth - adjust fire_time:1t - heal - narrate <&color[<[heal.message.color]>]><[heal.message.self]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" - stop - inject dcommands_inject_player - if <[player]> == : - define health - define maxhealth - adjust fire_time:1t - heal - narrate <&color[<[heal.message.color]>]><[heal.message.self]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" - stop - else: - define heal.message.another.theirs - define heal.message.another.yours - define health <[player].health.round_to_precision[0.5]> - define maxhealth <[player].health_max> - heal <[player]> - adjust <[player]> fire_time:1t - narrate "<&color[<[heal.message.color]>]><[heal.message.another.yours]> <[player].name>!" - narrate <&color[<[heal.message.color]>]><[heal.message.another.theirs]> targets:<[player]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" dcommands_feed: type: command name: feed description: Feeds yourself or another player. usage: /feed (player) permission: dcommands.feed tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define feed.color - define feed.message.self - define feed.message.another - if : - feed - narrate <&color[<[feed.color]>]><[feed.message.self]> - stop - inject dcommands_inject_player - if <[player]> == : - feed - narrate <&color[<[feed.color]>]><[feed.message.self]> - stop - else: - feed <[player]> - narrate <&color[<[feed.color]>]><[feed.message.another]> targets:<[player]> dcommands_vanish: type: command name: vanish description: Makes yourself invisible and invulnerable. usage: /vanish | invis | v permission: dcommands.vanish aliases: - invis - v tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - if : - narrate "<&[warning]>You are now vanished." - adjust visible:false - adjust invulnerable:true - else: - narrate "<&[warning]>You are no longer vanished." - adjust visible:true - adjust invulnerable:false dcommands_fly: type: command name: fly description: Allows the user to fly, even in survival mode. usage: /fly permission: dcommands.fly tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - if !: - narrate "<&[warning]>Fly mode turned on, at speed ." - adjust can_fly:true - else: - narrate "<&[warning]>Fly mode turned off." - adjust can_fly:false dcommands_inject_arguments: type: task debug: false script: - define minarg - define maxarg - define single - if <[single]> != null: - if !: - narrate "<&[error]>Incorrect usage!" - inject dcommands_inject_message - stop - else: - if < <[minarg]>: - narrate "<&[error]>Not enough arguments! Correct usage:" - inject dcommands_inject_message - stop - if > <[maxarg]>: - narrate "<&[error]>Too many arguments! Correct usage:" - inject dcommands_inject_message - stop dcommands_inject_message: type: task debug: false script: - narrate <&[error]> - narrate <&[base]> - define message - if <[message]> != null: - narrate <&[emphasis]><[message].parsed> dcommands_inject_player: type: task debug: false script: - define name - define player ].if_null[null]> - if ( <[player]> == null ) || ( <[player].name> != <[name]> ): - narrate "<&[error]>Player not found!" - stop dcommands_smite: type: command name: smite description: Spawns lightning bolts on whoever you want. Use high quantities at your own risk. usage: /smite [player] (quantity) (delay) permission: dcommands.smite tab completions: 1: data: arguments: minimum: 1 maximum: 3 message: Delay is given in seconds. debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - define quantity - if !<[quantity].is_decimal>: - narrate "<&[error]>Quantity must be a number!" - stop - define delay - if !<[delay].is_decimal>: - narrate "<&[error]>Delay must be a number!" - stop - define delay ]> - narrate <[quantity]> - narrate <[delay]> - repeat <[quantity]>: - strike <[player].location> - wait <[delay]> dcommands_godmode: type: command name: godmode description: Turns godmode on and off. usage: /godmode | god aliases: - god - invulnerable permission: dcommands.godmode tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - if !: - narrate "<&[warning]>God mode turned on." - adjust invulnerable:true - else: - narrate "<&[warning]>God mode turned off." - adjust invulnerable:false dcommands_speed: type: command name: speed description: Changes your walking or flying speed. Default speed for both is 1. usage: /speed [fly | walk] (speed) permission: dcommands.speed tab completions: 1: fly|walk 2: data: arguments: minimum: 1 maximum: 2 debug: false script: - inject dcommands_inject_arguments - choose : - case walk: - define type walk_speed - define msg Walk - case fly: - define type fly_speed - define msg Flying - default: - inject dcommands_inject_message - stop - if == 1: - choose <[msg]>: - case Walk: - narrate "<&[base]>Your walking speed is set at <&[emphasis]><&[base]>!" - case fly: - narrate "<&[base]>Your walking speed is set at <&[emphasis]><&[base]>!" - default: - narrate "<&[error]>If you saw this message, the author did a fuckie wuckie somewhere! Please contact!" - else: - define speed - if !<[speed].is_decimal>: - narrate "<&[error]>Speed input must be a number!" - stop - define speed <[speed].round_to_precision[0.1]> - narrate "<&[warning]><[msg]> speed changed to <[speed]>" - adjust <[type]>:<[speed].div[10]>