DEVEX.sk

Created by ShyDoge

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#  ____                        _____            _                                      _
# |  _ \  _____   _______  __ | ____|_ ____   _(_)_ __ ___  _ __  _ __ ___   ___ _ __ | |_
# | | | |/ _ \ \ / / _ \ \/ / |  _| | '_ \ \ / / | '__/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
# | |_| |  __/\ V /  __/>  <  | |___| | | \ V /| | | | (_) | | | | | | | | |  __/ | | | |_
# |____/ \___| \_/ \___/_/\_\ |_____|_| |_|\_/ |_|_|  \___/|_| |_|_| |_| |_|\___|_| |_|\__|
#

# DEV OPTIONS

options:
  permission: "devex"
  version: "A-0002"
  experimental: "false"
  watch-timeout: 6000

# LOAD

on load:

# UPTIME

  set {devex::loadtime} to now

# LOAD MESSAGE

  send "%nl%DEVEX VERSION %{@version}% LOADED%nl%" to console

# RUNTIME ID

  add 1 to {devex::rid}
  log "DEVEX %{@version}% | NEW RUNTIME ID: %{devex::rid}%%nl%" to "devex/sort-by/RID/RID-%{devex::rid}%.log"

# UPTIME

every 1 second:
  set {devex::uptime} to difference between {devex::loadtime} and now

# COMMAND

command /devex [<string>] [<string>] [<string>] [<string>]:
  permission: {@permission}
  aliases: dx, devx, dex
  trigger:
    if arg-1 is not set:
      send "&8[&cERROR&8]&f Could not find argument 1."
      stop

    if arg-1 is "reload":
      send "&8[&aDEVEX&8]&f Reloading the script."
      reload script "DEVEX"
      stop

    if arg-1 is "online-players":
      send "&8[&aDEVEX&8]&f Sending all online players.%nl%    &8[&aPLAYERS&8]&f %all players%%nl%    &8[&aCOUNT&8]&f %amount of all players%"
      stop

    if arg-1 is "offline-players":
      send "&8[&aDEVEX&8]&f Sending all offline players.%nl%    &8[&aPLAYERS&8]&f %offline players%%nl%    &8[&aCOUNT&8]&f %amount of offline players%"
      stop

    if arg-1 is "help":
      send "&8[&aDEVEX&8]&f Sending command list.%nl%    &8- &fhelp%nl%    &8- &freload%nl%    &8- &finfo-server%nl%    &8- &finfo-devex%nl%    &8- &finfo-plugin [plugin-name]%nl%    &8- &finfo-skript%nl%    &8- &fonline-players%nl%    &8- &foffline-players%nl%    &8- &fread-variable [variable-name]%nl%    &8- &fwatch-variable [variable-name]%nl%    &8- &fwrite-variable [variable-name] [type] [value]%nl%    &8- &finfo-player [player-name]"
      stop

    if arg-1 is "info-server":
      send "&8[&aDEVEX&8]&f Sending server information.%nl%    &8[&aTPS&8] &f%tps%%nl%    &8[&aONLINE&8] &f%amount of all players% / &f%max player count%%nl%    &8[&aTIME&8] &f%now%%nl%    &8[&aMCV&8] &f%minecraft version%%nl%    &8[&aSKV&8] &f%skript version%"
      stop

    if arg-1 is "info-devex":
      send "&8[&aDEVEX&8]&f Sending devex information.%nl%    &8[&aVersion&8] &f%{@version}%%nl%    &8[&aEXP&8] &f%{@experimental}%%nl%    &8[&aRID&8] &f%{devex::rid}%%nl%    &8[&aUPTIME&8] &f%{devex::uptime}%"
      stop

    if arg-1 is "info-skript":
      send "&8[&aDEVEX&8]&f Sending skript information.%nl%    &8[&aVersion&8] &f%skript version%%nl%    &8[&aCMD LIST&8] &f%all script commands%%nl%    &8[&aCMD COUNT&8] &f%amount of all script commands%"
      stop

    if arg-1 is "info-plugin":
      if arg-2 is not set:
        send "&8[&cERROR&8]&f Could not find argument 2."
        stop
      if plugin arg-2 is enabled:
        send "&8[&aDEVEX&8]&f Sending plugin information for %arg-2%.%nl%    &8[&aENABLED&8] &ftrue"
      else:
        send "&8[&aDEVEX&8]&f Sending plugin information for %arg-2%.%nl%    &8[&aENABLED&8] &ffalse"
      stop

    if arg-1 is "info-player":
      if all players does not contain arg-2:
        send "&8[&cERROR&8]&f Could not find argument 2."
        stop
      set {_plr} to arg-2 parsed as a player
      send "&8[&aDEVEX&8]&f Sending player information for %{_plr}%.%nl%    &8[&aGAMEMODE&8] &f%{_plr}'s gamemode%%nl%    &8[&aHEALTH&8] &f%{_plr}'s health% / %{_plr}'s max health%%nl%    &8[&aFOOD&8] &f%{_plr}'s food% / 10%nl%    &8[&aUUID&8] &f%{_plr}'s uuid%%nl%    &8[&aBAL&8] &f%{_plr}'s balance%%nl%    &8[&aIP&8] &f%{_plr}'s ip%%nl%    &8[&aCOORDS&8] &f%{_plr}'s x-coordinate%, %{_plr}'s y-coordinate%, %{_plr}'s z-coordinate%%nl%    &8[&aWORLD&8] &f%player's world%%nl%    &8[&aYAW&8] &f%yaw of player%%nl%    &8[&aPITCH&8] &f%pitch of player%"
      stop

    if arg-1 is "read-variable":
      if {%arg-2%} is not set:
        send "&8[&cERROR&8]&f Could not find argument 2."
        stop
      add "variable" to {_types::*}
      if {%arg-2%} is a number:
        add "number" to {_types::*}
      if {%arg-2%} is a player:
        add "player" to {_types::*}
      if {%arg-2%} is a object:
        add "object" to {_types::*}
      if {%arg-2%} is a string:
        add "string" to {_types::*}
      send "&8[&aDEVEX&8]&f Sending variable info.%nl%    &8[&aVALUE&8] &f%{%arg-2%}%%nl%    &8[&aTYPE&8] &f%{_types::*}%"
      stop

    if arg-1 is "write-variable":
      if {%arg-2%} is not set:
        send "&8[&cERROR&8]&f Could not find argument 2."
        stop
      if arg-3 is not "string" or "integer" or "number" or "player":
        send "&8[&cERROR&8]&f Could not find argument 3."
        stop
      if arg-4 is not set:
        send "&8[&cERROR&8]&f Could not find argument 4."
        stop
      if arg-3 is "string":
        set {%arg-2%} to arg-4
      if arg-3 is "integer":
        set {%arg-2%} to arg-4 parsed as a integer
      if arg-3 is "number":
        set {%arg-2%} to arg-4 parsed as a number
      if arg-3 is "player":
        set {%arg-2%} to arg-4 parsed as a player
      add "variable" to {_types::*}
      if {%arg-2%} is a number:
        add "number" to {_types::*}
      if {%arg-2%} is a player:
        add "player" to {_types::*}
      if {%arg-2%} is a object:
        add "object" to {_types::*}
      if {%arg-2%} is a string:
        add "string" to {_types::*}
      send "&8[&aDEVEX&8]&f Variable info updated.%nl%    &8[&aVALUE&8] &f%{%arg-2%}%%nl%    &8[&aTYPE&8] &f%{_types::*}%"
      stop

    if arg-1 is "watch-variable":
      if {%arg-2%} is not set:
        send "&8[&cERROR&8]&f Could not find argument 2."
        stop
      set {_value} to {%arg-2%}
      send "&8[&aDEVEX&8]&f Watching variable {%arg-2%}."
      set {_timeout} to 0
      set {_met} to false
      set {_type} to 0
      while {_met} is false:
        add 1 to {_timeout}
        if {_timeout} >= {@watch-timeout}:
          set {_met} to true
          set {_type} to 2
        if {%arg-2%} is not {_value}:
          set {_met} to true
          set {_type} to 1
        wait 1 tick
      if {_type} is 2:
        send "&8[&aDEVEX&8]&f Request timed out."
        stop
      add "variable" to {_types::*}
      if {%arg-2%} is a number:
        add "number" to {_types::*}
      if {%arg-2%} is a player:
        add "player" to {_types::*}
      if {%arg-2%} is a object:
        add "object" to {_types::*}
      if {%arg-2%} is a string:
        add "string" to {_types::*}
      send "&8[&aDEVEX&8]&f Variable change detected.%nl%    &8[&aPREVALUE&8] &f%{_value}%%nl%    &8[&aVALUE&8] &f%{%arg-2%}%%nl%    &8[&aTYPE&8] &f%{_types::*}%"
      stop

# TAB COMPLETE

on tab complete of "/devex":
	set tab completions for position 1 to "help", "reload", "info-server", "read-variable", "write-variable", "watch-variable", "info-devex", "info-plugin", "info-skript", "online-players", "offline-players" and "info-player"