Run multiple bots from the same .exe — различия между версиями

Материал из Руководство по OpenKore
Перейти к: навигация, поиск
(Попытка номер раз)
 
м (промежуточный результат)
Строка 4: Строка 4:
 
Если вы запускаете несколько ботов, то было бы неплохо иметь всего одну папку с OpenKore, а не отдельную копию программы для каждого персонажа. Таким образом можно будет уделить больше времени ботоводству, а не заниматься обновлениями и настройкой каждого экземпляра OpenKore.
 
Если вы запускаете несколько ботов, то было бы неплохо иметь всего одну папку с OpenKore, а не отдельную копию программы для каждого персонажа. Таким образом можно будет уделить больше времени ботоводству, а не заниматься обновлениями и настройкой каждого экземпляра OpenKore.
  
Для этого придётся запускать OpenKore с [[https://ro-fan.ru/wiki/Аргументы_командной_строки|аргументами командной строки]]. Как один из вариантов - можно насоздавать ярлыков на OpenKore, а потом зайти в их свойства и прописать там нужные аргументы, о которых мы поговорим ниже.
+
Для этого придётся запускать OpenKore с [[Аргументы_командной_строки|аргументами командной строки]]. Как один из вариантов - можно насоздавать ярлыков на OpenKore, а потом зайти в их свойства и прописать там нужные аргументы, о которых мы поговорим ниже.
  
 
==Командная строка==
 
==Командная строка==
Строка 14: Строка 14:
 
В данном случае OpenKore будет загружать настроечные файлы из указанной папки или файла.
 
В данном случае OpenKore будет загружать настроечные файлы из указанной папки или файла.
  
==Папки==
+
==Папки целиком==
These are the available options which are listed when you run the bot with the --help parameter:
+
Давайте рассмотрим аргументы, которые занимаются перенаправлением папок. Все аргументы можно посмотреть запустив OpenKore с параметром --help.
  
*--control=path <br \>
+
*--control=папка
path is the path for the control folder. Example for the location of control folder D:\Kore\swordsman\control below:
+
путь до новой папки control. Допустим, что настройки лежат в папке D:\Kore\swordsman\control, тогда:
  D:\Kore\start.exe --control=Kore\swordsman\control
+
  D:\Kore\start.exe --control=swordsman\control
  
*--tables=path <br \>
+
*--tables=папка
path is the path for the tables folder. Example for folder D:\Kore\swordsman\control below:
+
путь до новой папки с таблицами. Допустим, что они лежат в папке D:\Kore\swordsman\tables, тогда:
  D:\Kore\start.exe --control=Kore\swordsman\tables
+
  D:\Kore\start.exe --control=swordsman\tables
  
*--logs=path
+
*--logs=папка
path is the path for the logs folder. Example for bot folder D:\Kore\swordsman\logs below:
+
путь до папки с логами. Допустим, что они лежат в папке D:\Kore\swordsman\logs, тогда:
  D:\Kore\start.exe --control=Kore\swordsman\logs
+
  D:\Kore\start.exe --control=swordsman\logs
  
*--plugins=path
+
*--plugins=папка
path is the path for the plugins folder. Example for bot folder D:\Kore\swordsman\plugins below:
+
путь до папки с плагинами. Допустим, что они лежат D:\Kore\swordsman\plugins, тогда:
  D:\Kore\start.exe --control=Kore\swordsman\plugins
+
  D:\Kore\start.exe --control=swordsman\plugins
  
*--fields=path
+
*--fields=папка
path is the path for the fields folder. Example for bot folder D:\Kore\swordsman\fields below:
+
путь до папки с локациями. Допустим, что они лежат в папке D:\Kore\swordsman\fields, тогда:
  D:\Kore\start.exe --control=Kore\swordsman\fields
+
  D:\Kore\start.exe --control=swordsman\fields
  
==Specific file options:==
+
==Отдельные файлы==
  
There are also some specific files which you can specify using the command line:
+
Кроме того есть аргументы для отдельных файлов:
 
*--config=path\file
 
*--config=path\file
path\file specifies which config.txt to use. Example for bot file D:\Kore\control\config_1.txt below:
+
путь до файла config.txt, например D:\Kore\control\config_1.txt:
 
  D:\Kore\start.exe --config=control\config_1.txt
 
  D:\Kore\start.exe --config=control\config_1.txt
  
 
*--mon_control=path\file
 
*--mon_control=path\file
path\file specifies which mon_control.txt to use. Example for bot folder D:\Kore\control\mon_control_2.txt below:
+
путь до файла mon_control.txt, например D:\Kore\control\mon_control_2.txt:
 
  D:\Kore\start.exe --mon_control=control\mon_control_2.txt
 
  D:\Kore\start.exe --mon_control=control\mon_control_2.txt
  
 
*--items_control=path\file
 
*--items_control=path\file
path\file specifies which items_control.txt to use. Example for bot folder D:\Kore\control\items_control_0.txt below:
+
путь до файла items_control.txt, например D:\Kore\control\items_control_0.txt:
 
  D:\Kore\start.exe --items_control=control\items_control_0.txt
 
  D:\Kore\start.exe --items_control=control\items_control_0.txt
  
 
*--pickupitems=path\file
 
*--pickupitems=path\file
path\file specifies which pickupitems.txt to use. Example for bot folder D:\Kore\control\pickupitems_all.txt below:
+
путь до файла pickupitems.txt, например D:\Kore\control\pickupitems_all.txt:
 
  D:\Kore\start.exe --pickupitems=control\pickupitems_all.txt
 
  D:\Kore\start.exe --pickupitems=control\pickupitems_all.txt
  
 
*--chat=path\file
 
*--chat=path\file
path\file specifies which chat.txt to use. Example for bot folder D:\Kore\control\chat_7_25.txt below:
+
путь до файла chat.txt, например D:\Kore\control\chat_7_25.txt:
 
  D:\Kore\start.exe --chat=control\chat_7_25.txt
 
  D:\Kore\start.exe --chat=control\chat_7_25.txt
  
 
*--shop=path\file
 
*--shop=path\file
path\file specifies which shop.txt to use. Example for bot folder D:\Kore\control\shop_merch1.txt below:
+
путь до файла shop.txt, например D:\Kore\control\shop_merch1.txt:
 
  D:\Kore\start.exe --shop=control\shop_merch1.txt
 
  D:\Kore\start.exe --shop=control\shop_merch1.txt
  
 
*--monsters=path\file
 
*--monsters=path\file
path\file specifies which monsters.txt to use. Example for bot folder D:\Kore\control\monsters_iz_dun.txt below:
+
путь до файла monsters.txt, например D:\Kore\control\monsters_iz_dun.txt:
 
  D:\Kore\start.exe --monsters=control\monsters_iz_dun.txt
 
  D:\Kore\start.exe --monsters=control\monsters_iz_dun.txt
  
 
*--items=path\file
 
*--items=path\file
path\file specifies which items.txt to use. Example for bot folder D:\Kore\control\items_in_sphinx below:
+
путь до файла items.txt, например D:\Kore\control\items_in_sphinx.txt:
 
   D:\Kore\start.exe --items=control\items_in_sphinx.txt
 
   D:\Kore\start.exe --items=control\items_in_sphinx.txt
  
==Interface option:==
+
==Выбор интерфейса==
  
 
This command line allows you to specify which interface to use at startup:
 
This command line allows you to specify which interface to use at startup:

Версия 11:04, 16 августа 2023

Информация на этой странице относится только к MSWin32 платформам.

Введение

Если вы запускаете несколько ботов, то было бы неплохо иметь всего одну папку с OpenKore, а не отдельную копию программы для каждого персонажа. Таким образом можно будет уделить больше времени ботоводству, а не заниматься обновлениями и настройкой каждого экземпляра OpenKore.

Для этого придётся запускать OpenKore с аргументами командной строки. Как один из вариантов - можно насоздавать ярлыков на OpenKore, а потом зайти в их свойства и прописать там нужные аргументы, о которых мы поговорим ниже.

Командная строка

Командная строка - это текстовое поле в приведённом ниже снимке. В нём записан путь к исполняемому файлу, после которого можно написать несколько аргументов. Таким образом можно на старте программы передать ей некие данные.

Command Line

В данном случае OpenKore будет загружать настроечные файлы из указанной папки или файла.

Папки целиком

Давайте рассмотрим аргументы, которые занимаются перенаправлением папок. Все аргументы можно посмотреть запустив OpenKore с параметром --help.

  • --control=папка

путь до новой папки control. Допустим, что настройки лежат в папке D:\Kore\swordsman\control, тогда:

D:\Kore\start.exe --control=swordsman\control
  • --tables=папка

путь до новой папки с таблицами. Допустим, что они лежат в папке D:\Kore\swordsman\tables, тогда:

D:\Kore\start.exe --control=swordsman\tables
  • --logs=папка

путь до папки с логами. Допустим, что они лежат в папке D:\Kore\swordsman\logs, тогда:

D:\Kore\start.exe --control=swordsman\logs
  • --plugins=папка

путь до папки с плагинами. Допустим, что они лежат D:\Kore\swordsman\plugins, тогда:

D:\Kore\start.exe --control=swordsman\plugins
  • --fields=папка

путь до папки с локациями. Допустим, что они лежат в папке D:\Kore\swordsman\fields, тогда:

D:\Kore\start.exe --control=swordsman\fields

Отдельные файлы

Кроме того есть аргументы для отдельных файлов:

  • --config=path\file

путь до файла config.txt, например D:\Kore\control\config_1.txt:

D:\Kore\start.exe --config=control\config_1.txt
  • --mon_control=path\file

путь до файла mon_control.txt, например D:\Kore\control\mon_control_2.txt:

D:\Kore\start.exe --mon_control=control\mon_control_2.txt
  • --items_control=path\file

путь до файла items_control.txt, например D:\Kore\control\items_control_0.txt:

D:\Kore\start.exe --items_control=control\items_control_0.txt
  • --pickupitems=path\file

путь до файла pickupitems.txt, например D:\Kore\control\pickupitems_all.txt:

D:\Kore\start.exe --pickupitems=control\pickupitems_all.txt
  • --chat=path\file

путь до файла chat.txt, например D:\Kore\control\chat_7_25.txt:

D:\Kore\start.exe --chat=control\chat_7_25.txt
  • --shop=path\file

путь до файла shop.txt, например D:\Kore\control\shop_merch1.txt:

D:\Kore\start.exe --shop=control\shop_merch1.txt
  • --monsters=path\file

путь до файла monsters.txt, например D:\Kore\control\monsters_iz_dun.txt:

D:\Kore\start.exe --monsters=control\monsters_iz_dun.txt
  • --items=path\file

путь до файла items.txt, например D:\Kore\control\items_in_sphinx.txt:

 D:\Kore\start.exe --items=control\items_in_sphinx.txt

Выбор интерфейса

This command line allows you to specify which interface to use at startup:

  • --interface=module

module is the name of the Perl module for the interface. Check your src\Interface folder for available interface modules. Example: if you want to use the console interface when you run wxstart.exe, put

  • --interface=Console

Note: If you are using the compiled Perl interpreter (e.g. start.exe) you must ensure that the application supports the interface you want to use. For example, wxstart.exe is for Wx, vxstart.exe for Vx, and so on. You can use the "Console" interface using any interpreter.

Usage:

So to use the options just put them into your shortcut. Example:

D:\Kore\start.exe --control=swordsman\control --logs=swordsman\logs

Just make shortcuts like these, each for a different bot settings folder, and you're done. All you really need is control and logs, so I use this with my own bots.

Original Post by hakore [1]. which is based on a post by Joseph

If you have any problems, please post in the forums.