List of commands for version 2024.09.11
Tried to improve descriptions and explanations of commands

keypress_limit=int number
the number of elements that can be repeated in the list when the function runs
keypress_limit=5
keypress=s=robe
if the number of elements is repeated more than 5 in our example, then the function keypress=keyname=regexp will fail with an error. We will consider that we have entered a repeat circle

enable_mount=name
use the fusion beast
Example:
enable_mount=Bluish White Horse

disable_mount
Take down the fusion beast

disable_mount=name
Remove the specified fusion beast
disable_mount=Bluish White Horse


enable_drop_control
allows you to end the script when your farming time is up.. ends the script and closes the game.
You can add it to the script or character config, depending on where you need it

enable_drop_control=1
shuts down the computer. when farming time is over

enable_drop_control=2|scriptname
after the farming time is over, launches the specified script

enable_drop_control=3|blockname
The bot will proceed to execute the specified block when the character has 0 minutes left
example:
enable_drop_control=3|return_to_the_city

disable_drop_control
disable farming time tracking. the bot will not track how much time is left

enable_time_start=2024-08-06 03:00:00
continue script execution after the specified date
You can also use a ready-made function in the bot, just press the F7 key

disable_time_start
disable launch tracking by date


switch=your text=["default": ["default actions"], "if equal to this value": ["action list"], "if this": ["then another list of actions"]]
example:
var=name=test
switch=%name%=["test2": ["speak=test2"], "test": ["speak=ok, true"]]
attribute: "default", will work if more than one option does not match.

action_speak_change=["trigger name", "attribute name", "value"]
changing attribute data in a trigger

var_plus=variable_name=int value
adds value to the value of a variable
example:
var=counter=0
speak=counter: %counter%
sleep=1
var_plus=counter=5
speak=new counter: %counter%

var_minus=variable_name=int value
subtracts value from a variable
var=x=10
var=y=5
var_minus=x=%y%

var_mult=variable_name=int value
function to multiply values
var=x=4
var=y=5
var_mult=x=%y%

var_div=variable_name=int value
Function to divide values
var=x=20
var=y=5
var_div=x=%y%
speak=%x%

if=["cond1", "cond2", "operator", ["true_actions"], ["false_actions"]]
checking conditions, for example:
examples:
if=["10", "3", ">", ["speak=ok, true", "sleep=1", "break"], []]
if=["1", "2", "<", ["speak=1 < 2, ok"], ["no, 1 > 2 :)"]]
Example with counter and variables:
var=counter=0
speak=counter: %counter%
sleep=1
var_plus=counter=1
if=["%counter%", "5", ">=", ["break"], ["go_to_line=2"]]
As soon as the value of the %counter% variable becomes 5 or more, the script will stop executing.
Valid operants:>
< > <= >=
== !=
fragment of script code for improving the specified equipment
keypress=s=(%equip%).*?(level:|nivel)\s(\d+)$
if=["~~3", "%lvl%", "<", ["go_to_block=impr"], ["go_to_line=26"]]
if the improvement level is less than the specified level in the variable, we improve the item (go_to_block=impr), otherwise we continue the search, go to the line keypress=s=(%equip%).*?(level:|nivel)\s(\d+)$
You can find this script in a file exchanger and study it in more detail. upgrading specific items of equipment (english, spanish); Size: 1 KB; User: Nikolaj; Upload date: 30-08-2024 21:51:59

action_speak_generate=your text
generates text for triggers.
add_action_speak=test={"text": ["^event_generate_action:your text"], "execute":....}

stopwall=regexp
instead of writing stop words in the file "stopwallword.txt", you can use this function
example:
stopwall=ice pine
this function works when using random character movement mode (random_going)

block=name
set the anchor marker to a line, analogous to the "go_to_line" function
block=startfarming
speak=hello, we are starting
go_to_block=name
go to the line where you set the "name" marker.
go_to_block=startfarming

action_critical_pet_hp=int hp
set the critical health level for your pet.
When int hp becomes equal or less, an event will be generated for triggers of the form:
event_critical_pet_hp:current hp
which we can process at our discretion.
To disable you need to set a value less than 1 for example
action_critical_pet_hp=0
example:
action_critical_pet_hp=65000
add_action_speak=critPetHP={"text":["^event_critical_pet_hp"], "execute":["disable_attack","disable_nav_attack","sleep=0.4","keypress=lshift+2","sleep=0.4","keypress=y","enable_attack","enable_nav_attack"], "onecopy": 1, "noclear": 1}

screenreader=eci
Include support for IBM eci  screen readers
This parameter must be added to config.ini and the bot restarted. Then you can use the bot without NVDA.
Attention! The bot does not support SAPI5 speech synthesizers, you must use IBM eci speech synthesizers.

setIntervalFunction=timername=timeperiod=["cmd1","cmd2","cmd3"]
Periodically execute functions by timer.
A few examples:
setIntervalFunction=equip=600=["badequipment=; comon"]
setIntervalFunction=bag=1800=["clearbag=1"]

delIntervalFunction=timername
Delete timer timername.
delIntervalFunction=bag

clearIntervalFunction
Clear all interval timers.

pet_regen_timeout=float seconds, default 30 seconds
time to check the pet's mana and health indicators
pet_regen_timeout=300
the bot will check your pet's health every 5 minutes

pet_reload_bank_hp=int timeout
Cooldown for pet's health potion.
pet_reload_bank_hp=10

pet_reload_bank_mp=int timeout
Cooldown for pet's mana potion.
pet_reload_bank_mp=10

badequipment=regexp
Drop equipment according to regular expression.
badequipment=; common$|; crude$|superior$

setpause
Set the bot on pause.

unpause
Take the bot off pause.

exit
Close the bot and the game.

gameexit
Function to exit the game. If enable_restart is enabled, the game will restart.

botexit
Exit the bot.

action_critical_hp=int hp
Set critical health level. When int hp becomes equal to or less than this value, an event will be generated for triggers of the form: event_critical_hp:current hp. To disable, set a value less than 1, for example action_critical_hp=0
example:
action_critical_hp=25000
add_action_speak=critHP={"text":["^event_critical_hp"], "execute":["sleep=1","keypress=i","sleep=1","keypress=y","sleep=1","keypress=y"], "onecopy": 1, "noclear": 1, "timeout": 60}
my trigger goes off no more than once every 60 seconds, because the priest’s absolute defense skill can be used once per minute. to use examples you should edit this according to your preferences.

mortalmap=filename
Run script after character's death. Default is map/mortal.
mortalmap=resurrect with crystal script

no_mortal
Do not run script after character's death.
the character will die and will not be resurrected

obstacles_default_key=keyname
Default key for obstacle avoidance.
obstacles_default_key=d
deprecated feature, probably no longer relevant, but you can use it in case of precise routes

ignore_speaking=regexp
Ignore in-game text.
ignore_speaking=^global|^nearby
This way the bot will not process information received from two channels

clear_ignore_speaking
Clear ignore_speaking string.

goposition_max_time=float seconds
Set maximum movement time in goposition function in a straight line without checking coordinates.
goposition_max_time=10

hotrepair=1 or 0
Set when to repair, before battle or after battle. The script does not guarantee this sequence but will try to execute them. 1 - as soon as it receives a phrase indicating repair is needed; 0 - after battle. Default is 0.
hotrepair=1

writechannel_timeout=float seconds
Set time to search for the required channel for writing.
writechannel_timeout=2

var=varname=varvalue
Set variable varname with content varvalue.
var=charname=Zlata

enable_time_exit=datetime
Exit bot and game at specified time: 
enable_time_exit=2024-04-26 15:00:00

disable_time_exit
Turn off time_exit.

makesocket=color1|color2|color3
Punch necessary holes in equipment. Specify colors separated by |.
makesocket=Crimson|Dark Yellow

search_object_timeout=float seconds
Time waiting for phrase when searching for object.
search_object_timeout=0.2

wait
Simple placeholder function for infinite waiting.
open_game_window
loadoptions=my.conf
wait
With this script you can control your character with one hand, just move him by pressing a s d w, and the bot will kill monsters, heal, and so on.

skip_keypress_error
Allows ignoring one-time triggering of errors in keypress=keyname=text function.
skip_keypress_error
keypress=s=log in
if when you press the s key the bot does not find the phrase "log in", the script will not break thanks to skip_keypress_error

prof_skill_timeout=float seconds
Time to go to killed mob for butchering.
prof_skill_timeout=3

enable_prof_skill=keyname
Enable butchering corpses.
enable_prof_skill=c

disable_prof_skill
Disable butchering corpses.

mapwall=filename
Specify obstacle file. File must be in map/map.wall/filename directory.
mapwall=underground
Some area maps have the same names, so in some cases you need to connect terrain maps manually

intervalPause
Pause timers.

intervalStart
Start stopped timers.

setInterval=keyname=float seconds
Press keyname every float seconds.
setInterval=y=121

delInterval=keyname
Delete timer for keyname.
delInterval=y

clearInterval
Clear all timers.

masterweapons=int lvl
Upgrade equipment to lvl level.
masterweapons=7

no_regen_data=int number
If unable to get hp/mp values number times in a row, consider the game frozen and terminate the process with the game.
no_regen_data=8

keyboard_delay=int ms1|int ms2
ms1 - delay in milliseconds before pressing the key. ms2 - delay in milliseconds before releasing the key.
If it seems to you that the bot is not working correctly, perhaps not processing some phrase, try using this parameter, perhaps by slowing down the keystrokes, you can solve your problem.
keyboard_delay=10|30

enable_search_object=regexp=count
Search object to count depth. Default depth is 1.
enable_search_object=Gem Craftsman=4

disable_search_object
Turn off search.

break
Quit script

goposition_speed=float number
Presumed character movement speed per 1 second while bot is active.
goposition_speed=8
If you are having trouble finding the endpoint, you can calibrate this using this option

fragstor=level 1 fragname|level 1 fragname2..
Sell fragments separated by |.
fragstor=Level 1 Turquoise Shard|Level 1 Moonstone Shard|Level 1 Sunlight Stone Shard|Level 1 Obsidian Shard|Level 1 Topaz Shard|Level 1 Olivine Shard|Level 1 Grape Stone Shard|Level 1 Blond Jade Shard|Level 1 Aquamarine Shard|Level 1 Spinel Shard|Level 1 Tiger Eye Stone Shard|Level 1 Sapphire Shard|Weapon Enhance Crystal Shard|Equipment Enhance Crystal Shard|Level 1 Opal Shard|Level 1 Garnet Shard

add_action_speak=name=json text
add trigger name with instructions text
example: add_action_speak=test={"text": ["^(\\d+); (\\d+)$"], "execute": ["sleep=1", "speak=your indicators: %%1; %%2"]}
if you press the (r) key, you can find out the hp/mp indicators. then this trigger will work according to the "text" condition
The bot generates some events such as at the time of health check: event_hp:123
When running text search:
keypress=left=items
When it finds: event_keypress_ok:text and event_keypress_ok_on what line did keypress work?
and when the phrase is not found: event_keypress_error:text and event_keypress_error_line where keypress was not found
event_mortal:text - at the moment of character's death
event_baf:text
at the moment when the bot checks your HP and there is data on buffs/debuffs, an event is generated: event_baf: line up to the sign ; when checking HP.

Attributes for json string:
"timeout": time after which we will be able to launch this trigger again.
"onecopy": 1 - enable execution of one copy of the trigger without duplication. 1 copy will be executed without repeated launches.
noclear - if this attribute exists, then this trigger will not be cleared when calling the function: clear_action_speak, it can only be deleted using the del_action_speak=name function
text - list of regular expressions to track
"text": ["regexp1", "regexp2"]
command - execute commands
available commands:
go_to_line - go to line to execute
go_to_block - go to block to execute
playfile - play a file from the sounds folder
speak - speak the text
"command": ["go_to_line", 123]
is_count - count the number of times
that is, the trigger will fire after is_count triggers
"is_count": 3
execute - execute a list of commands as in a normal script
"execute":["sleep=1", "speak=Hello", "waitspeak=.*", "go_to_line=123"]
add_action_speak=map2={"text": ["^Polson Wetland;Northwest;mud$|.*?\\d+;Polson Wetland$"], "command": ["go_to_block", "map2"]}
Using this trigger I track the transition to the swamp map, I also detect the swamp map when checking the coordinates. The bot understands that the character is in the swamp and goes to the map2 block.

del_action_speak=name
Delete trigger name.
del_action_speak=map2

clear_action_speak
Remove all triggers

write=text
Write string to input field.
var=count=10
write=%count%
keypress=enter

writechannel_waitwindow=float seconds
Time to wait for text input window to appear.
writechannel_waitwindow=1

writechannel=channel name=text
Write text to channel name.
writechannel=global channel=Hello World

searchitems=regexp
Search market item. Open the required category. When the item is found, the bot will pause. Press F2 to continue searching.
searchitems=Brilliant

goposition=int pos1|int pos2
Send character to coordinates pos1;pos2.
goposition=200|200

mastersynthfrag
Create level 1 gems from fragments

sellcollection
Sell collections. Focus should be on the right buyer.

mastersynth=int lvl
Create stones of lvl+1 level.
mastersynth=2

pet_name=name1|name2|name3
Which pets to summon in priority order.
pet_name=Shorthair Cat|Cattle|Frog|Wild Hound

loadoptions=filename
Load configuration. filename should be in map/filename directory.
loadoptions=my.conf
If you use other people's scripts, do not forget to change the name of the configuration file. almost every day someone tells me that a character walks around but doesn't kill monsters. after 20-30 minutes I understand that the user simply did not connect his character config. Please be careful.

enable_obstacles
Enable obstacle avoidance system. By default, it avoids only players. Class display of players must be enabled.

speak=text
Make NVDA speak text.
This command is mostly for testing purposes, but you can also use this if you want. nvda will speak the text you write

disable_key_esc
Disable periodic pressing of escape key, which is used to monitor game freeze.
This should be disabled when the bot is working with the menu, so that errors do not occur and the menu does not close.

enable_key_esc
Enable periodic pressing of escape key. Enabled by default.

enable_melee
Indicate that the character is melee. When using skills, it will also hold down the left Alt key.
check the topic for melee settings on the website

disable_melee
Turn off melee mode.

key_repair=keyname
Specify key for repair.. repair box or pliers
key_repair=0

enable_clearbag
Enable bag clearance. When the bot receives a phrase about overload, it will attempt to discard items specified in clearbag.txt file. Items should be specified one per line.

disable_clearbag
Turn off bag clearance function.

clearbag
Initiate bag clearance immediately.
clearbag=waiting time
after pressing the key: lshift+delete|waiting time after the bot enters the quantity and before pressing enter
clearbag=1
this parameter is needed if your script gets stuck while executing a function.

timewait=float seconds
Non-blocking wait before executing the next instruction.
timewait=10
for example, you can stop at an intersection and the bot will kill monsters for 10 seconds.

enable_xp_control=int xp|int seconds
Enable experience control. xp - amount of experience. seconds - how often to check stats.
enable_xp_control=100000|600
The bot will check the character's experience every 10 minutes and if there are less than 100000 left until the next level, the bot will close the game. This is necessary, for example, if your character is level 69 and you do not want to go to level 70.

disable_xp_control
Turn off experience control.

obstacles_key_timeout=float seconds
Key press time when avoiding obstacles.
obstacles_key_timeout=0.1
the bot will press a key to avoid the obstacle until it gets around it

clear_obstacles
Clear obstacle list.

ignore_mob=regexp
Specify list of mobs not to attack.
ignore_mob=lich

clear_ignore_mob
Clear list of mobs to ignore.

regen_timeout=float seconds
How often to check hp/mp stats.
regen_timeout=2

reload_bank_hp=int seconds
Cooldown time for hp potions. 
reload_bank_hp=1

reload_bank_mp=int seconds
Cooldown time for MP banks.
reload_bank_mp=6

min_banks_hp=int number
Minimum number of HP bottles. When the limit is reached, the bot will close.
To disable, specify the value: -1
min_banks_hp=1

min_banks_mp=int number
Minimum number of MP bottles. When the limit is reached, the bot will close.
To disable, specify the value: -1
min_banks_mp=1

ignore_personal_banks=1 or 0
1 - ignore tracking personal bottles
0 - do not ignore
Bottles obtained from the gang's warehouse, during a game event, and so on.

key_regen_hp=keyname
Key to regenerate char HP.
key_regen_hp=1

key_regen_mp=keyname
Key to regenerate char MP.
key_regen_mp=2

key_pet_regen_hp=keyname
Key to regenerate HP of the pet.
key_pet_regen_hp=3

key_pet_regen_mp=keyname
Key to regenerate MP of the pet.
key_pet_regen_mp=4

key_pet_regen_food=keyname
Key to regenerate pet's hunger.
key_pet_regen_food=5

openmap=filename
Run a new scenario.
The filename must be located in the folder: map/filename.
openmap=gofishing

enable_repair=int number
Enable equipment repair.
-1 - ignore repair notifications
0 - close the bot upon notification
1 - repair using boxes
2 - repair using pliers
enable_repair=2
The bot will repair equipment using pliers

disable_repair
Disable equipment repair.

enable_pet
Enable pet usage.

disable_pet
Disable pet usage.

min_hp=int number
Minimum HP level to start regeneration.
min_hp=10000

min_mp=int number
Minimum MP level to start regeneration.
min_mp=10000

pet_min_hp=int number
Minimum pet's HP level to start regeneration.
pet_min_hp=10000

pet_min_mp=int number
Minimum pet's MP level to start regeneration.
pet_min_mp=10000

pet_min_food=int number
Minimum pet's hunger level.
pet_min_food=40

direction_update_time=float seconds
Time interval to change movement direction in random_going mode.
direction_update_time=7

random_going
Enable random movement on the map.
Don't forget to set up a list of obstacles

disable_random_going
Disable random movement on the map.

stop_go
Stop character movement.

start_go
Resume character movement after stop.

x=int number1-int number2
Set boundary for movement along the x coordinate in random movement mode.

y=int number1-int number2
Set boundary for movement along the y coordinate in random movement mode.

enable_restart
Attempt to restart the game when it is closed.

disable_restart
Turn off the game restart function.

keys_attack=key1|key2|key3...
Keys for attack.
keys_attack=j|h|/|.|n

speed_attack=float seconds
Pause between attack key presses.
speed_attack=0.06

attack_type=1 or 0
1 - attack while moving
0 - character will stop to attack
attack_type=0
do not use value 1 if your character is weak, otherwise you will gather a crowd of monsters and they will kill your character.

enable_attack
Enable character skill usage feature

disable_attack
Disable combat actions.

nav_keys=k|o|;|l
Keys to search for targets.
nav_keys=lshift+5|lshift+6|k|;
You can specify key combinations to search for a target, for example, set the focus on the one who is attacking you. you can experiment

enable_pet_regen
Enable control over pet's HP/MP.

disable_pet_regen
Disable control over pet's HP/MP.

enable_pet_food
Enable control over pet's hunger.

disable_pet_food
Disable control over pet's hunger.

enable_regen
Enable control over character's HP/MP.

disable_regen
Disable control over character's HP/MP.

go_to_line=int number
Jump to the specified script line for execution.
go_to_line=10
the bot will start executing the script from line 10

enable_nav_attack=float timeout
Enable target searching.
If timeout is specified, it will wait for the specified time after pressing a key to receive text.
Default is 0.05 seconds.
enable_nav_attack=0.1

disable_nav_attack
Disable target searching.

disable_obstacles
Disable obstacle tracking.

obstacles=regexp
String to track specified obstacles.
obstacles=stone|tree

sleep=float seconds
Sleep for specified time.
sleep=3
if your computer is not powerful, use this when the character moves to a new map. this way the bot falls asleep for 3 seconds, does not perform any actions, and this reduces the risk that the game will close

open_game_window
The bot will automatically set focus to the game window

keydown=keyname
Press down the specified key.
keydown=s
the bot will hold the key pressed until the next event is executed

keyup=keyname
Release the specified key.
keyup=s

keypress=keyname
Press and release the specified key.
keypress=s
short key press s

keypress=number of times|key name
press a specific key a specified number of times. For example: 
keypress=4|down
the bot will press the down arrow 4 times

keypress=keyname=text
Press the specified key until the text is encountered.
keypress=s=horse
this way the bot will press the s key until it encounters the word "horse"

waitspeak=regexp
Wait for the required phrase before moving to the next instruction.
exampple:
waitspeak=^Welcome to Shard  Market
The bot waits until the game says this phrase and then continues to carry out the following instructions

start_game
Start the game.