Перейти к содержанию

common information/macro key bind

Материал из GravityWiki
Это перевод страницы common information/macro key bind, он готов на 100%.
Macro Key Bind
Версия
1.7.10


Macro Key Bind - a modification added to the 1.7.10 server version of the GravityCraft project, allows you to configure buttons to execute specified commands.

Usage

To start working with Macro Key Bind, open the chat and click on the GUI editor in the lower right corner:

GUI editor

Next, the settings window will open:

Macro Key Bind settings window

There are the following 3 buttons in the lower left corner:

  • Delete object;
  • Edit object (Change button size);
  • Object panel commands (adding and editing buttons).

To create an object and configure it, click the “Button panel commands” button. After clicking this button, the following window will open:

Creating a Macro Key Bind object

First, click on the “Grid Settings” section and configure the workspace. After clicking on the above button, the workspace settings menu will open, where you can specify your settings:

Grid parameters

Next, click “Add button,” after which the object will appear in the chat menu and can be configured and moved as needed.

The button settings menu looks like this:

Button settings menu

The button settings include the following fields:

  • Name - responsible for the button identifier (for more complex scripts);
  • Text - button name (You can also use various text modifiers. For example: &l - Bold and &c - Red);
  • Hide if not related;
  • Do not close the GUI when clicked - the chat will not close after clicking the button;
  • Text color - change the color of the button text;
  • Background color - changes the background color of the buttons.

After creating a button, you can assign commands to it or edit its appearance by pressing the following keys in the Macro Key Bind settings window:

  • Left mouse button on the button - edit macro;
  • Right-click on the button to customize its appearance.

To create a macro, left-click on the button. The following macro settings menu will open:

Macro settings menu

In the lower field, you need to specify a command or message. For example:

  • !Message - send a message to the global chat;
  • @Message - send a message to the trading chat;
  • Message - send a message to the local chat;
  • /command - use the command.

Also, when writing a command, you can specify the following arguments:

  • $$u - displays a list of players who are online (useful for commands such as /tpa, /pay, etc.);
  • $$0−$$9 - displays a screen where you can enter a number of values and insert them by pressing a button;
  • $$[CustomName] - instead of CustomName, you can enter any value, and when executing, you will be prompted for each value separately (if the values are repeated, it is better to use the previous argument).

If you need to write several commands in one button, they must be separated by the symbol “|”. For example: /home | !I'm home

Example of using the $$u argument, which displays a list of online players: Select a player from the list and press Enter.

Using the argument $$u

Example of using the $$[CustomName] argument. In this case, [text1] and [text2]. It requests both arguments in turn:

Entering parameters for the first argument
Entering parameters for the second argument

The result will be as follows:

Example of use