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

common information/macro key bind/en: различия между версиями

Материал из GravityWiki
Новая страница: «Also, when writing a command, you can specify the following arguments: <ul> <li>$$u - displays a list of players who are online (useful for commands such as /tpa, /pay, etc.);</li>»
Новая страница: «<li>$$0−$$9 - displays a screen where you can enter a number of values and insert them by pressing a button;</li>»
Строка 78: Строка 78:
<li>$$u - displays a list of players who are online (useful for commands such as /tpa, /pay, etc.);</li>
<li>$$u - displays a list of players who are online (useful for commands such as /tpa, /pay, etc.);</li>


<div lang="ru" dir="ltr" class="mw-content-ltr">
<li>$$0−$$9 - displays a screen where you can enter a number of values and insert them by pressing a button;</li>
<li>$$0−$$9 - выводит экран в который вы можете вписать некоторое количество значений и вставлять их нажатием кнопки;</li>
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
<div lang="ru" dir="ltr" class="mw-content-ltr">

Версия от 17:10, 28 октября 2025

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:

Файл:key2.png
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:

Файл:key3.png
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:

Файл:key4.png
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:

Файл:key5.png
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:

Файл:key6.png
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] - вместо CustomName можно вписать любое значение и при выполнении у вас будет запрашивать значение для каждого значения отдельно (если значения повторяются лучше использовать предыдущий аргумент).

Если нужно написать несколько команд в одну кнопку то их нужно разделать символом ” | “. Например: /home | !Я дома

Пример использования аргумента $$u который выводит список игроков онлайн: Выбираем игрока в списке и нажимаем Enter

Файл:key7.png
Использование аргумента $$u

Пример использования аргумента $$[CustomName]. В данном случае [text1]и[text2]. Он запрашивает оба аргумента по очереди:

Файл:key8.png
Ввод параметров для первого аргумента
Файл:key9.png
Ввод параметров для второго аргумента

Получится следующее:

Файл:key10.png
Пример использования