Stream to earn placeholders

Mob generator Minecraft server Setup

Sashavovo

Administrator
Staff member

About Commands for Custom Functions

In the custom command system, you can create your own commands in a format that is standard for the Minecraft server and beyond. In StreamToEarn, there are additional variables you can use in place of certain parameters for commands.
  • {playername} - substitutes the name of your character that you specified in the system settings.
  • {nickname} - the name of the viewer on the broadcast.
  • {giftname} - the name of the gift that was sent.
  • {giftcount} - the number of gifts that were sent, for example, 10 roses.
  • {repetition} - the number of times a function is called for each gift as specified in the function.
  • {comment} - the text of the comment sent by the viewer.
  • {index} - indexing number in the loop from 1 to N-repetitions of the function. For example, if 10 roses are gifted, then in the tenth command index will be replaced with 10, in 9th with 9, etc.
  • {random:X Y} - generates a random number in the range from X to Y, for example {random:-3 3} - will be replaced by a random number between -3 and 3.
  • {random:N X Y} - generates a random number in the range from X to Y and adds to N, for example {random:20 -3 3} - if the random number is 2, then it will replace with 23.
  • {mult:X Y} - generates the result of multiplying number X by Y - {mult:2 3} - the result will be 6.
  • {plus:X Y} - generates the result of adding number X to Y - {plus:2 3} - the result will be 5.
  • win 1 - add +1 to the Win widget
  • loss 1 - add -1 to the Win widget
  • set 0 - set win to 0
Also, some variables can be used together, for example, to set the duration of the effect given to the player depending on the number of roses received from one viewer, we can create a command:

Give night vision effect to the player for each gift multiplied by 15 seconds
effect give {playername} minecraft:night_vision {mult:15 {repeatcount}} 1 - thus the player will receive a bonus of 15 seconds multiplied by the number of the gift he received from the viewer.

Generating zombies at a radius from the player
execute at {playername} run summon zombie ~{random:-3 3} ~ ~{random:-3 3} - generates a zombie at random location by coordinates from -3 to 3 along the X and Z axes

Generating zombies at a player position with viewer nickname
execute at {playername} run summon zombie ~ ~ ~ {CustomName:"\"{nickname}\""}
 
Last edited:
1729536977321.webp

You can use the placeholders to display the name of the gifter as well as the name of the gift in Minecraft

1729537013768.webp

title @a title "Hi, Aurelien"
title @a subtitle "It`s easy"
title @a title "{nickname} Send {giftname}"
It's very easy, create an additional command and show the title and subtitles directly in Minecraft
1729537153479.webp

Use this service to choose a color. Subtitles will not be displayed if there is no Title.
1729539652302.webp

1729629999886.webp
 
Last edited:
Back
Top