mwBot
Get test api key
English zone
sección española
MW Bot Usage Calculator
Download bot
last update files

 

List of commands for version 2024.12.31

Started by Nikolaj, 20 July 2024, 12:10

Previous topic - Next topic

Nikolaj

List of commands for version 2024.12.31
------
Tried to improve descriptions and explanations of commands


------
function: goposition_stop
stop movement to a specified point


------
New attribute for the trigger system: main_stream
Forces instructions from "execute" to be executed in the bot's main thread, rather than in a parallel one.
Example:
add_action_speak=test={"text": ["debug"], "execute": ["sleep=1.1", "lshift+."], "main_stream": 1}
Default: main_stream = 0.


------
Extending the functionality of the function setonkey.
New attribute: pass = 1 | 0.
Allows you to transfer triggered keys to the game or block their transfer. Default: pass = 1.
Example:
setonkey=test={"keys": "j", "execute": ["playfile=start.wav"], "pass": 0}
Pressing the j key will play a sound, but will not attack.
If you set "pass": 1, then the keystroke will be transmitted to the game.


------
Function extension setonkey.
You can now specify alternative keys to trigger.
Previously, you could only specify one combination, now there are several.
Example:
setonkey=test={"keys": "f3", "execute": ["playfile=click.wav"]}
Only fires when the f3 key is pressed.
setonkey=test={"keys": ["f3", "lctrl+f4"], "execute": ["playfile=click.wav"]}
In this example, both f3 and lctrl+f4 fire.


------
New default variable: %LASTSERVERBOTTIME%
Indicates how many seconds ago a message was received from the management server "server_bot_connect".
Returns -1 by default.
example
open_game_window
var=server_name=blablablablablcbsjlcbjslbcjslcbjsabcjsalbcjksabxchjsabjh
server_bot_connect=%server_name%
block=send
server_bot_write=["keypress=j","playfile=click.wav"]
timewait=2
go_to_block=send
setIntervalFunction=dd=10=["if=[\"%LASTSERVERBOTTIME%\", \"20\", \"<=\", [\"speak=the last message from the server was %LASTSERVERBOTTIME% seconds ago, Everything is fine\"], [\"Speak=bullshit.  we received the last message from the server %LASTSERVERBOTTIME% seconds ago\", \"delIntervalFunction=dd\", \"go_to_block=finish\"]]"]
wait
block=finish
speak=turn off the script
break


-----
New default variable: %SCRIPTNAME%
This variable contains the name of the script.


------
New feature: wlog
Writes the processed string to the mw.log log.
Example:
wlog=current script: %SCRIPTNAME%


-----
Temporarily disabling triggers
The example below demonstrates disabling a trigger that controls a pet's critical health level.
When the character meets the boss, he will not heal the pet with skills; the critPetHP trigger will be turned on after the death of the boss.
example
action_critical_pet_hp=150000
add_action_speak=critPetHP={"text":["^event_critical_pet_hp"], "execute":["disable_attack","disable_nav_attack","sleep=0.4","keypress=lshift+2","sleep=0.5","keypress=i","enable_attack","enable_nav_attack"], "noclear": 1}
add_action_speak=boss={"text": ["^Monkey King"], "execute": ["del_action_speak=boss","playfile=1userOnline.wav","action_speak_change=[\"critPetHP\", \"enable\", \"n\"]"], "noclear":1}
add_action_speak=bossdied={"text": ["^System, the monkey king is killed blablabla"], "execute": ["playfile=1userOffline.wav","action_speak_change=[\"critPetHP\", \"enable\", \"y\"]"], "noclear":1}


-------
added variable with current date
%CURRENTDATE%
format: yyyy-mm-dd
example
open_game_window
timewait=1
var=time=%CURRENTDATE%
speak=%time%
break


-----
function: goposition_diagonal_mode
Enables or disables diagonal movement mode
Example:
enable mode
goposition_diagonal_mode=1
disable mode
goposition_diagonal_mode=0
write this in the script code where you need it
By default, the feature is always disabled.


-----
You can press several keys simultaneously through the function keydown
Example:
keydown=s+d
sleep=4
keyup=s+d


-----
new default variables: CURRENTMICROTIME, CURRENTTIME
getting the current time in milliseconds and seconds in Unix format.
Example:
open_game_window
var=start=%CURRENTTIME%
sleep=2
var=end=%CURRENTTIME%
var_minus=end=%start%
speak=time: %end%
sleep=2


-----
new parameter: goposition_stop_get_coords
in goposition mode, stop movement while checking coordinates?
Example:
goposition_stop_get_coords=1
stop
goposition_stop_get_coords=0
don't stop
default 0


------
The ability to play sound files from the internet
an example
playfile=https://mwbot.org/1.mp3


-----
New function: playfile_stop
Stop playback
example:
playfile_stop


-----
function: nvda_mode
switching nvda modes in scripts.
Example:
nvda_mode=0 - normal mode
nvda_mode=1 - passive mode
nvda_mode=2 - silent mode
demonstration
open_game_window
add_action_speak=nvda={"text":["event_generate_action:(.*?)$"], "execute": ["if=[\"%%1\",\"on\",\"==\",[\"playfile=click.wav\",\"nvda_mode=0\",\"speak=enable mode\"], [\"playfile=click.wav\",\"speak=disable mode\",\"nvda_mode=2\"]]"], "noclear":1}
block=switch
action_speak_generate=on
sleep=2
action_speak_generate=off
sleep=2
go_to_block=switch


------
New feature: var_replace
replacing text in a variable
Example:
var=text=hello
var_replace=text=["llo", "y"]
speak=%text%
result=>hey
or
var=text=ring (left)
var_replace=text=[["(",")"], ["\\(","\\)"]]
speak=%text%
result=>ring \(left\)
or
var=text=hello
var_replace=text=[["l","o"], ["","y"]]
speak=%text%
result=>hey


-----
New event: event_attack
allows you to roughly track the beginning and end of the battle
event_attack:0
The fight is over
event_attack:1
The fight has begun
event_attack:2
The target exists
example. after the end of the battle, the witch uses the healing burst skill
add_action_speak=tttt={"text":["^event_attack:0"], "execute": ["sleep=1.5", "keypress=lshift+i", "speak=finish"], "timeout": 2}


-----
repair_max_retries
indicate the number of attempts to repair equipment
repair_max_retries=5
the bot will try to carry out repairs 5 times, if it fails 5 times, the game and the bot will be closed


-----
Now pause and run the script after the pause using the f2 key!
By default, the timeout when pressing the f2 key again becomes 0.3 seconds.
To change the data, set the setting in the script: pause_timeout = float(seconds)
or specify this parameter in your bot configuration in the config.ini file
pause_timeout=float seconds


------
var_random
generating random values
example:
var_random=variable=1,300
generates a random value into the variable %variable% from 1 to 300
another example:
var_random=variable=["b1", "b2","b3","b4","b5"]
go_to_block=%variable%
makes a random sample from the provided list


------
new attribute for the trigger system: ignorepause
continue trigger operation even when script paused
Example:
add_action_speak=lack of={"text": ["^lack of vitality"], "execute": ["gameexit"], "ignorepause":1, "noclear":1}


-----
function: var_exists
checks if a variable exists
example:
var_exists=varname={"true": ["speak=yes, variable exists"], "false": ["speak=no, empty variable"]}
var_exists=varname={"false": ["var=varname=1"]}


-----
working with files


function: filedelete
deleting a file:
filedelete=filename

function: filerename
renaming a file
example:
filerename=old name=new name

function: fileexists
checking file existence
example:
fileexists=filename={"true": ["speak=file exists"], "false": ["speak=no find file"]}
fileexists=filename1={"false": ["fileopen=filename1=w=100"]}

fileopen=filename=mode=value
filename - file name, files are created along the path: temp/fileopen/filename
mode - Available modes with open file
a - append data [value] to the end of the file
w - overwrite data [value] to file
r - read data into the value variable, value should be without %variablename% tags, just variable
r+ - append data to the end of the value variable
example:
open_game_window
var=count=0
block=count
fileopen=counter=r=count
var_plus=count=1
fileopen=counter=w=%count%
speak=count: %count%
sleep=2
go_to_block=count



-----
copytext=your text
Copies text to the clipboard
Example:
copytext=your text
copytext=%variablename%


-----
var_append=variablename=text
appending text to the end of the variable's contents %variablename%


-----
a new system for exchanging data between different bots at the script level.
Attention! don't use it if you don't understand why it's needed.
server_bot_connect=string
string - the name of your channel, come up with a complex line so that strangers do not come to your channel.
server_bot_disconnect
disconnect from the channel
server_bot_write=string | json
write to the channel
if it is a regular string, then all participants will receive an event like:
event_server_message:text
add_action_speak=server_message={"text": ["^event_server_message:hello"], "execute": ["speak=say hello"]}
if a json line is transmitted, a list of functions will be executed for everyone connected to this channel
server_bot_write=["speak=hello", "playfile=click.wav"]
or you can specify a specific recipient by specifying his nickname. Nickname is the name in the bot system.
server_bot_write={"nick": "Eugen", "execute": ["speak=hello", "playfile=click.wav"]}
so that various dangerous functions cannot be performed, we indicate which functions can be performed. If you do not specify, we will assume that you can perform any bot functions.
server_bot_allowed_functions=["speak", "playfile"]


-----
count_attack=int count
the number of repetitions of the attack when performing an attack. default 2 times


-----
drop_end_offset=int time seconds
specify how many seconds before the script should be stopped, clarifies the operation of the enable_drop_control function.
Example:
drop_end_offset=600
enable_drop_control
the script will exit 10 minutes before the end of farming time


-----
mapwall_reset
clear data about the connected map in the mapwall=filename function
this is necessary for the bot to automatically begin to determine the map on which the character is located


-----
setonkey=string name={"keys": "lalt+f4", "execute": ["playfile=click.wav", "gameexit"]}
installs a controller with the name "string name" and monitors when the left alt+f4 keys are pressed, then it will perform a list of actions from the "execute" attribute
For example, you can set the block to be executed when hotkeys are pressed, this is convenient when debugging a script.


-----
delonkey=string name
removing a controller key named "string name"


-----
clear_var_action
cleans tags %%1, %%2.... for triggers
If you have a lot of triggers whose values ��you process, clear the tag values ��to avoid errors.


------
last_login=your@mail.com
writes in the file: config/public.ini as the last authorization e-mail
this is useful for changing account by bot. you can hard set your email address and restart the game. this way it is more reliable and you will open character you want.
example
last_login=zlata@gmail.com

------
Working with variables in triggers
To get the values ��we need from the trigger, for example we want to know the number of bottles we have left, we need to take this string fragment in parentheses.
()
For example
big red bottle: 20
regular expression for trigger
big red bottle: (\\d+)
To process the required value we use a construction like
%%trigger fragment serial number, in parentheses
in our example it is
%%1
To assign this value to a variable we write
var=count=%%1


-----
working with values ��when pressing keys keypress=keyname=text
Using the same principle, we can receive and write the values ��we need by pressing keys.
keypress=s=(\d+) red bottles
to interact with the value we use the construction
~~string fragment serial number in parentheses
in our case it is
~~1
for example this example
keypress=s=(%bottle%).*?(\d+)
To write the number of bottles in a variable, we write
var=countbottles=~~2
because \d+ is written in the second block, which we put in parentheses


-----
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
It is not necessary to specify an "else" block if there are no actions in it. You can simplify the writing:
if=["2", "2", "==", ["speak=yes"]]

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


-----
While the script is running, some errors may occur, for example, the menu has not loaded and the bot is trying to find a line, in which case the script will end with an error.
Also, the script will break if it doesn't find the line you need, for example, you want the bot to take a blue bottle from the warehouse, but it's not there, in which case the script will exit and throw an error.
For such cases, the bot provides the following event handlers
the line below will process a whole block of keystrokes and in case of an error, the bot will proceed to executing the script from line 20:. You can write the name of the event handler arbitrarily.

add_action_speak=error={"text":["^event_keypress_error"], "command":["go_to_line", 20]}

the line below will process the error point by point; in this example, the error may occur on line 20, in which case the bot will proceed to executing the script from line 10.

add_action_speak=k_error1={"text":["^event_keypress_error_20"], "command": ["go_to_line", 10]}

the line below will work if the condition is met and there is no error, so the bot will execute the script from line 32.

add_action_speak=k_ok={"text":["^event_keypress_ok"], "command":["go_to_line", 32]}

the line below will work if the condition is met on line 29, so the bot will proceed to executing the script from line 32.

add_action_speak=k_ok1={"text":["^event_keypress_ok_29"], "command":["go_to_line", 32]}
You can find more details on the website:
https://mwbot.org/index.php?topic=55.0


-----
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
You can also specify the accuracy of the final position (does not work on intermediate turns)
goposition=int x|int y=details
default 0 - exact match
if we provide data for example:
goposition=100|100=5
and our character will come to coordinates: 102|96
then this will be considered the desired point.
so to speak, we have indicated the permissible deviation from the end point


-----
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
https://mwbot.org/index.php?topic=58.0


-----
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.
This function can be used with the parameter
enable_xp_control=int xp|int seconds=block name
enable_xp_control=10000|600=xpminus
When a critical amount of experience is gained, the bot will not close the game, but will move to the specified block for execution.
This is useful, for example, if you want your character to automatically go and kill himself against a guard so as not to gain the next level.
You can find an example script in the bot's file exchange:
script name: desert non stop english; Size: 3 KB; User: Nikolaj; Upload date: 22-09-2024 14:03:55
This script works in the desert, obtaining equipment. if there is less experience left until the next level than specified in the script settings, the character will return to the village and will be killed by the guard the specified number of times, after which the character will continue to kill monsters in the desert.


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


-----
disable_pet=recall
Turn off pet use
if =recall is specified
it will also recall the summoned pet
This is useful, for example, if your bot goes fishing after the experience cave, this way you will call off the pet and you won't have to feed it.


-----
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.
x=1-200


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


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