expressioninvite <who> to partysince 1.7.17example
The player invites someone. Whoever invites without a party becomes the leader of a new one when the first invitation is accepted. An invitation stands for a minute
command /invite <player>:
players only: true
trigger:
invite arg.1 to party
send "&7%player% invites you to a party." to arg.1
A list of the names of everyone in their party, the leader first; empty for someone without one. It can be sent to: send "..." to party of player reaches every member who is online
on chat:
if message starts with "!":
cancel event
send "&d[Party] &f%player%: %message%" to party of player
A party is a group of players with a leader. HyperScript keeps track of who is in which; what being in one means (a shared chat, teleporting together, friendly fire) is up to your scripts.
command /party <invite|accept|leave> [player]:
players only: true
trigger:
if arg.1 is "invite":
invite arg.2 to party
send "&7%player% invites you to a party. &f/party accept" to arg.2
else if arg.1 is "accept":
accept party invite
send "&a%player% joined the party." to party of player
else:
leave party
Syntax
Meaning
invite <who> to party
The player invites someone. Whoever invites without a party becomes the leader of a new one when the first invitation is accepted. An invitation stands for a minute
accept party invite / decline party invite
The player answers the newest invitation they have; add from <who> to answer a particular one
leave party
The player leaves. If they led it, whoever joined after them leads; a party of one is no party
remove <who> from party
The leader takes someone out
disband party
The leader ends it
party of <who>
A list of the names of everyone in their party, the leader first; empty for someone without one. It can be sent to: send "..." to party of player reaches every member who is online
party leader of <who>
The leader's name; unset without a party
party invites of <who>
The names of those who have invited them
<who> is in a party
A condition; is not in a party likewise
A queue collects players until there are enough, and then runs a block with them:
on queue "duels" of 2:
set {_a} to item 1 of {_players}
set {_b} to item 2 of {_players}
broadcast "&6%{_a}% &7fights &6%{_b}%&7!"
command /duel:
players only: true
trigger:
add player to queue "duels"
send "&7Waiting for an opponent..."
Syntax
Meaning
on queue <name> of <n>:
At the left margin: runs each time n players are waiting. They are taken out of the queue and handed over as the list {_players}, first come first
add <who> to queue <name>
Put someone in the line; nothing happens if they are in it already
remove <who> from queue <name>
Take them out. remove <who> from all queues for every queue at once
queue <name>
A list of the names of those waiting
<who> is in queue <name>
A condition
Parties and queues last while the server runs. A player who leaves the server leaves their party and every queue.
A queue's block runs as the console, since it is about several players: say who a line is for (send "..." to {_a}, or loop over {_players}).