HyperScript 1.7.3
Version 1.7.3
Big change
Check your scripts before updating to 1.7.3
- Variables whose name starts with
temp.are no longer saved.{temp.x}lasts until the server stops and{%player%.temp.x}until that player leaves. A script that already used such a name for something it wanted kept must rename it. ask,confirmandformat(...)are now part of the language: a function calledformatmust be renamed, andaskorconfirmat the start of a line is the new statement.- While a script waits for an answer to
askorconfirm, the player's next chat message is taken as the answer and is not shown in chat. on step on ...:is a new kind of event line.- The setting
warn-player-variablesand the note it printed about{player.something}are gone.{player.coins}is still one variable shared by everyone; nothing points it out any more. - A new command,
/hsanswer, belongs to the plugin. Players never need to type it: clicking an offered answer runs it.
Scripts can now ask players questions, keep variables that are never saved, and put player heads in menus. There is a self-test script to run on your own server, eight more ready-made scripts, and a playground on the website that checks a script without a server.
Changed (check existing scripts)
- Variables whose name starts with
temp.are no longer saved.{temp.x}lasts until the server stops and{%player%.temp.x}until that player leaves. A script that already used such a name for something it wanted kept must rename it. ask,confirmandformat(...)are now part of the language: a function calledformatmust be renamed, andaskorconfirmat the start of a line is the new statement.- While a script waits for an answer to
askorconfirm, the player's next chat message is taken as the answer and is not shown in chat. on step on ...:is a new kind of event line.- The setting
warn-player-variablesand the note it printed about{player.something}are gone.{player.coins}is still one variable shared by everyone; nothing points it out any more. - A new command,
/hsanswer, belongs to the plugin. Players never need to type it: clicking an offered answer runs it.
Added
Questions
ask <who> <text> into <variable>waits for the player to answer in chat.for at most 30 secondschanges the wait (a minute by default); with no answer the variable is unset.ask <who> <text> with options "Red", "Blue" into <variable>offers answers to click.confirm <text>:runs its block only if the player answers yes.confirm <text> for <who>:asks someone else.
Variables
- Temporary variables, as described above: nothing to tidy up when a player joins.
Items
player head owned by <name>: a head with that player's skin, as a value. It can be given, saved, and shown in a menu:slot 1 is "player_head" owned by _name.potion with potion <kind>, also for splash and lingering potions and tipped arrows:strength,long_swiftness,strong_healingand the game's other kinds.- An item's name may now come after its other details.
Players and world
location of <who>: where another player is.items in ender chest of <who>,add <item> to ender chest of <who>,clear ender chest of <who>.create hologram ... with lines ... showing <item>: an item floating above the text.create bossbar ... with segments 10: a bar with 6, 10, 12 or 20 notches.
Events
on step on <block>:runs for players standing on that kind of block.
Text and data
format(n, "0.00")writes a number with a pattern.json of <value>writes a list, a local table, a number or text as JSON.
Ready-made scripts (each # Requires: 1.7.3)
SelfTest.hs:/hstestruns about fifty checks on your own server and prints PASS or FAIL for each;/hstest look,askandmenucover what has to be seen or clicked.Auction.hs:/ahand/ah sell <price>, a paged menu of what players are selling.Trade.hs:/trade <player> <coins>offers the item in your hand; the other player is asked yes or no.Clans.hs: found (the name is asked for in chat), invite, join, leave, clan chat.Quests.hs: mining, hunting and fishing jobs with a progress menu and a toast when done.Scoreboard.hs: a sidebar that keeps itself up to date, with/sbto hide it.Parkour.hs: a timed course built from emerald, iron and gold blocks.ServerSelector.hs: a menu to hop between servers; needs the HyperVelocity addon.Afk.hswas rewritten: it now notices movement as it happens instead of comparing positions.
That makes 35 scripts.
Website
- Playground: paste a script and have it checked for mistakes, with the line of the first one. It uses the same reading the plugin does. This needs Java on the machine that runs
app.py; without it the page says the checker is not available. - The home page shows what the newest version brought.
- The Scripts page has tag chips, and a "My HyperScript version" choice that hides scripts needing a newer one.
Not included
- Potions with effects of your own making: only the game's kinds.
- Setting one particular slot of an ender chest.
- Holograms that follow a player.