Run multiple bots from the same .exe

Материал из Руководство по OpenKore
Версия от 10:14, 16 августа 2023; Manticora (обсуждение | вклад) (Попытка номер раз)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

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

Введение

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

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

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

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

Command Line

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

Папки

These are the available options which are listed when you run the bot with the --help parameter:

  • --control=path

path is the path for the control folder. Example for the location of control folder D:\Kore\swordsman\control below:

D:\Kore\start.exe --control=Kore\swordsman\control
  • --tables=path

path is the path for the tables folder. Example for folder D:\Kore\swordsman\control below:

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

path is the path for the logs folder. Example for bot folder D:\Kore\swordsman\logs below:

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

path is the path for the plugins folder. Example for bot folder D:\Kore\swordsman\plugins below:

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

path is the path for the fields folder. Example for bot folder D:\Kore\swordsman\fields below:

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

Specific file options:

There are also some specific files which you can specify using the command line:

  • --config=path\file

path\file specifies which config.txt to use. Example for bot file D:\Kore\control\config_1.txt below:

D:\Kore\start.exe --config=control\config_1.txt
  • --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:

D:\Kore\start.exe --mon_control=control\mon_control_2.txt
  • --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:

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

path\file specifies which pickupitems.txt to use. Example for bot folder D:\Kore\control\pickupitems_all.txt below:

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

path\file specifies which chat.txt to use. Example for bot folder D:\Kore\control\chat_7_25.txt below:

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

path\file specifies which shop.txt to use. Example for bot folder D:\Kore\control\shop_merch1.txt below:

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

path\file specifies which monsters.txt to use. Example for bot folder D:\Kore\control\monsters_iz_dun.txt below:

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

path\file specifies which items.txt to use. Example for bot folder D:\Kore\control\items_in_sphinx below:

 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:

  • --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.