HyperScript 1.7.42
Comparisons in words, data kept on things, and three smaller additions.
Added
- Comparisons can be written in words. Beside
==,>=and the other signs, which work as before:
if event.message is "Welcome":
if {_players} bigger than 50:
if level of player is at least 30:
if {%player%.coins} is less than 10:
if y of player's location is between 60 and 80:
bigger than,greater than,more than,larger than,higher thanmean>;smaller than,less than,lower than,fewer thanmean<.at leastandat mostmean>=and<=, as dogreater than or equal toandless than or equal to.is equal tomeans==.is aboveandis below;is between <a> and <b>, where both ends count.- All of them may follow
isor stand without it, andis notturns each around. - NBT: data kept on things. A script can keep values on the item in somebody's hand, on a player or a creature, and on a block that holds something (a chest, a sign, a furnace). The server saves them in the thing's NBT, so they travel with the item and survive a restart:
set nbt "owner" of tool of player to player.name
if nbt "owner" of tool of player is not player.name:
send "&cThis item is not yours."
set nbt "locked" of block at {_chest} to true
delete nbt "tutorial" of player
A key with a colon, such as "otherplugin:level", reads and changes what another plugin keeps under that name. nbt of tool of <who> gives the whole NBT of an item as text.
hide <who> from tab list of <who>takes a player off the list another player sees when they hold Tab, while they stay visible in the world.show <who> in tab list of <who>puts them back. Needs a Paper server, 1.20 or newer.make <who> shoot a <projectile>, withat speed <n>if wanted:make player shoot an arrow at speed 3. It isshoot <projectile> from <who>said the other way round.set <who>'s yaw to <number>andset <who>'s pitch to <number>, the same asset yaw of <who> toandset pitch of <who> to.
Changed
- The VS Code extension is 1.0.5 and knows all of the above.