HyperScript
Docs

← All of the Docs HyperVotes

When somebody votes HyperVotes

eventon vote:HyperVotes

Runs when a player who is online votes, and for a kept vote when its player joins. player is the voter

on vote:
    give 3 diamond to player
    add 50 to {%player%.coins}
    if {_late} is true:
        send "&7Thanks for voting while you were away!"
    else:
        broadcast "&a%player.name% &7voted on &f%{_service}%&7."

What this event gives a script

In the blockWhat it is
{_voter}The voter's name
{_service}The voting site
{_votes}How often they have voted
{_streak}Their streak in days
{_late}True for a vote that waited for its player
structureon vote "<site>":HyperVotes

The same for votes from one voting site only, by the name the site gives itself

on vote "PlanetMinecraft":
    give 1 emerald to player
eventon offline vote:HyperVotes

Runs at once when a vote comes for someone who is not online. There is no player; {_voter} is the name

on offline vote:
    broadcast "&a%{_voter}% &7voted while offline. Vote too with &f/vote&7!"

What this event gives a script

In the blockWhat it is
{_voter}The name
{_service}The voting site
{_votes}How often they have voted
{_streak}Their streak in days
{_late}True for a vote that waited for its player
eventon vote reminder:HyperVotes

Runs every remind-every minutes for each player who is on the server and has not voted yet today. player is who is reminded; {_votes} and {_streak} are theirs

What this event gives a script

In the blockWhat it is
{_votes}And
{_streak}Theirs
{_voter}The voter's name
{_service}The voting site
{_late}True for a vote that waited for its player
eventon vote party:HyperVotes

Runs every party-every votes. There is no player

on vote party:
    broadcast "&d&lVote party! &7%{_votes}% votes reached."
    loop all players:
        give 5 diamond to loop-player

What this event gives a script

In the blockWhat it is
{_voter}The voter's name
{_service}The voting site
{_votes}How often they have voted
{_streak}Their streak in days
{_late}True for a vote that waited for its player
Guide and examples
on vote:
    give 3 diamond to player
    add 50 to {%player%.coins}
    if {_late} is true:
        send "&7Thanks for voting while you were away!"
    else:
        broadcast "&a%player.name% &7voted on &f%{_service}%&7."

on vote "PlanetMinecraft":
    give 1 emerald to player

on offline vote:
    broadcast "&a%{_voter}% &7voted while offline. Vote too with &f/vote&7!"

on vote party:
    broadcast "&d&lVote party! &7%{_votes}% votes reached."
    loop all players:
        give 5 diamond to loop-player
SyntaxEffect
on vote:Runs when a player who is online votes, and for a kept vote when its player joins. player is the voter
on vote "<site>":The same for votes from one voting site only, by the name the site gives itself
on offline vote:Runs at once when a vote comes for someone who is not online. There is no player; {_voter} is the name
on vote reminder:Runs every remind-every minutes for each player who is on the server and has not voted yet today. player is who is reminded; {_votes} and {_streak} are theirs
on vote party:Runs every party-every votes. There is no player
  • Inside the blocks: {_voter} is the voter's name, {_service} the voting site, {_votes} how often they have voted, {_streak} their streak in days, and {_late} is true for a vote that waited for its player.
  • A reward belongs in on vote:. With keep-offline-votes on, every vote reaches it exactly once: at once, or when the player next joins.
  • A voting site sends the name the player typed. A vote for a name nobody has is counted under that name and waits for a player who never comes.