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

 

Bot change history

Started by Nikolaj, 30 December 2024, 13:02

Previous topic - Next topic

Nikolaj

For lazy people, for those who do not know how to use a translator, for those who do not have a bot, but want to follow the development of the bot, I created this topic. I'll try to update the topic.
I remind you that after each update, you can find a list of all changes in the root of the bot folder, in a file called new.txt.
There the list of changes is written in Russian.

2024.12.31
1. new feature: goposition_stop
copyright Dippydippy
stop movement to a specified point
2. Quickly switch focus to the bot window: lalt+b
change the key in the config.ini file
parameter: start_bot=key combination
3. nvda passive mode is set as the default mode.

2024.12.29-1
1. Fixed update retrieval and unpacking.
2. Fixed sending empty messages.

2024.12.29
1. Rewritten functions for searching and identifying the necessary window for both the bot and the game.
2. Now, the correct line is displayed in the script error log.
3. Edited keys for stopping the script. You can now use both the left and right Ctrl keys. For pausing, you can also use both the left and right Alt keys.
4. Renamed keys: numpad+, numpad-
New names: numpadplus, numpadminus

2024.12.28
1. Redesigned the sleep function mechanism.
2. Developed a custom Windows global key interceptor. Now it bypasses restrictions on keypress tracking in the game.
3. If the text field contains text and you select a user using Alt+Enter, pressing Enter on the selected nickname will send the message to the chosen user.
4. New trigger system attribute: main_stream.
Ensures that instructions from "execute" are executed in the bot's main thread instead of a parallel thread.
Example:
add_action_speak=test={"text": ["debug"], "execute": ["sleep=1.1", "lshift+."], "main_stream": 1}
Default: main_stream = 0.
5. Expanded functionality of the setonkey function.
New attribute: pass = 1 | 0.
Allows passing triggered keys to the game or blocking their transmission. Default: pass = 1.
Example:
setonkey=test={"keys": "j", "execute": ["playfile=start.wav"], "pass": 0}
Pressing key j will play a sound, but no attack will occur. If "pass": 1 is set, the keypress will also be transmitted to the game.
6. Extended setonkey function.
You can now specify alternative keys for triggering. Previously, only one combination could be specified; now, multiple are supported.
Example:
setonkey=test={"keys": "f3", "execute": ["playfile=click.wav"]}
Triggers only when f3 is pressed.
setonkey=test={"keys": ["f3", "lctrl+f4"], "execute": ["playfile=click.wav"]}
In this example, it triggers on f3 or lctrl+f4.
7. New default variable: %LASTSERVERBOTTIME%.
Indicates how many seconds ago a message was received from the control server ("server_bot_connect").
Default value: -1.
8. Fixed time display in the private message list when pressing f3.
9. Fixed an error when appending a character to the end of a variable
var_append=text=
10. New default variable: %SCRIPTNAME%.
The name of the current script.
11. New function: wlog.
Writes the processed string to mw.log.
Example:
wlog=Current script: %SCRIPTNAME%

2024.12.05
1. Added variable with the current date: %CURRENTDATE% in the format yyyy-mm-dd.
2. Fixed keyboard operation with keyboard_type=1.

2024.12.04
1. Fixed filedelete function.
2. New function: goposition_diagonal_mode enables or disables diagonal movement mode.
Example:
goposition_diagonal_mode=1  // enable
goposition_diagonal_mode=0  // disable
By default, this function is always disabled.
3. Simultaneous key presses now available through the keydown function.
Example:
keydown=s+d
sleep=4
keyup=s+d
4. Now, when the script execution is complete, all sound playback also stops.
5. Fixed functions: var_minus, var_plus, var_div, var_mult.
6. Fixed temporary files cleanup.
7. New default variables: CURRENTMICROTIME, CURRENTTIME.
Retrieve 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
8. 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 value: 0.
9. Fixed bot interface.

2024.11.26
1. Implemented functionality for playing sounds from the network.
Example:
playfile=https://mwbot.org/1.mp3
2. New function: playfile_stop stops playback.
Example:
playfile_stop
3. Display of private messages:
• In the "Write a message" or "Message list" tabs, press f3 to access the private message list.
• The private messages list will be displayed.
• Pressing tab moves to the input field. Write a message there and press enter to send it to the selected user.
• To clear the private messages list, while in the "All messages" list or input field, press shift+f3.
4. The text translation system now works when sending private messages.

2024.11.24
1. New function: var_replace replaces text in a variable.
Example:
var=text=hello 
var_replace=text=["llo", "y"] 
speak=%text% 
Result => hey 
Another example:
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 
2. Updated tools for updates.
3. New function: nvda_mode switches NVDA modes from scripts.
Example:
nvda_mode=0  // Normal mode
nvda_mode=1  // Passive mode
nvda_mode=2  // Silent mode

2024.11.23
1. Fixed filedelete function.
2. Critical changes!
• The file storage system for language adaptation has been redesigned. Translation files for the game and bot interface are now stored in the lang/ folder.
Example:
english.bot.txt  // Bot interface translation
english.game.txt  // Game interface adaptation
• The scripts folder is now named scripts, reflecting its current use.
The directory for location walls is now at scripts/wall.
3. New event: event_attack.
• Allows tracking the start and end of battles.
event_attack:0  // Battle ended
event_attack:1  // Battle started
event_attack:2  // Target exists
4. NVDA mode selection via alt+n keys:
• Normal mode (default).
• Passive mode (NVDA tries not to interrupt speech).
• Silent mode (NVDA goes completely silent in the game).

2024.11.10
1. Fixed fileexists function.
2. Fixed the ability to open the English or Spanish help versions using the ctrl+h keys.

2024.11.09
1. Fixed fileexists function.
2. Conducted optimization of script execution and code refactoring. Script execution speed has been improved.
3. New parameter: repair_max_retries.
Sets the number of repair attempts:
repair_max_retries=5 
The bot will attempt repair 5 times. If unsuccessful, both the game and the bot will close.
4. Critical change!
• Script pause and resumption after pause now use the f2 key!
Default timeout for re-pressing f2 is 0.3 seconds.
To change this, set the following in your script:
pause_timeout = float(seconds) 
Or specify the parameter in the bot's configuration file: config.ini.
pause_timeout=float seconds 
5. Added navigation through blocks in the script editor:
alt+b: move to the next line starting with block= 
alt+shift+b: move to the previous line starting with block= 
When a line is found, its content is announced, e.g., block=city.
6. New function: var_random.
Generates random values.
Example:
var_random=variable=1,300 
Generates a random value between 1 and 300 and stores it in %variable%.
Another example:
var_random=variable=["b1", "b2", "b3", "b4", "b5"] 
go_to_block=%variable% 
Selects a random value from the provided list.
7. New trigger system attribute: ignorepause.
Allows the trigger to continue working even during a pause.
Example:
add_action_speak=lack_of={"text": ["^lack of vitality"], "execute": ["gameexit"], "ignorepause":1, "noclear":1} 
8. Fixed fileexists function.
9. Other minor edits.

2024.10.20
1. New function: filedelete.
Deletes a file:
filedelete=filename 
2. New function: filerename.
Renames a file.
Example:
filerename=old_name=new_name 
3. New function: fileexists.
Checks for file existence.
Example:
fileexists=filename={"true": ["speak=file exists"], "false": ["speak=no find file"]} 
Another example:
fileexists=filename1={"false": ["fileopen=filename1=w=100"]} 
4. New function: var_exists.
Checks whether a variable exists.
Example:
var_exists=varname={"true": ["speak=yes, variable exists"], "false": ["speak=no, empty variable"]} 
Another example:
var_exists=varname={"false": ["var=varname=1"]} 
5. Updated "playfile" player functionality.
MP3 sounds can now also be played.

2024.10.13
1. Fixed data recording for the email address that was last authorized.
2. Fixed access to editor fields for entering messages and chat message lists.
3. Fixed enable_xp_control function.
4. Fixed global keypress tracking with the onkey function.
5. Fixed if function:
• It is now not mandatory to specify the "else" block if no actions are present. Writing has been simplified:
if=["2", "2", "==", ["speak=yes"]] 
6. New function: mapwall_reset.
Clears data about the connected map in mapwall=filename.
7. In the chat input field, press alt+enter to see a list of online users. Select a user and press enter to auto-fill /p nickname in the input field for sending a private message.
8. New function: drop_end_offset.
Specifies how many seconds before the script should stop working.
Example:
drop_end_offset=600  // Stops the script 10 minutes before the farm ends. 
enable_drop_control 
9. New parameter: count_attack.
Number of attack repetitions. Default: 2 times.
10. New system for data exchange between different bots at the script level.
Example:
server_bot_connect=string  // Channel name, use a complex string for security. 
server_bot_disconnect  // Disconnects from the channel. 
server_bot_write=string | json  // Sends a message to the channel. 
If the string is JSON, all connected users execute the function list.
server_bot_write=["speak=hello", "playfile=click.wav"] 
Or specify a recipient:
server_bot_write={"nick": "Eugen", "execute": ["speak=hello", "playfile=click.wav"]} 
Allowed functions:
server_bot_allowed_functions=["speak", "playfile"] 
11. New function: copytext.
Copies text to the clipboard.
Example:
copytext=your text 
copytext=%variablename% 
12. New function: var_append.
Adds text to the end of a variable:
var_append=variablename=text 
13. Fixed: When a script is running and no pause is set, messages cannot be sent to the bot chat.
14. File operations implemented:
fileopen=filename=mode=value 
Modes:
• a: Append [value] to the end of the file.
• w: Overwrite file with [value].
• r: Read file contents into a variable.

2024.09.22
1. New function: clear_var_action.
Clears trigger tag data: %%1, %%2, and so on.
Thanks to users: Jgonzalezh, Cassius.
2. Extended functionality of the enable_xp_control function:
enable_xp_control=int xp|time period=block name 
• int xp - experience limit.
• time period - how often to check experience level.
• block name - block to execute when the experience is gained.
3. Now, when calling the disable_pet function with the recall parameter:
disable_pet=recall 
• If the enable_pet function was previously called, the pet will be recalled.
• If simply calling disable_pet, pet management will be disabled, but the pet itself will not be recalled.
4. To have the bot launch the game with a specific email, use the command:
start_game=your@mail.com 
5. New function: last_login=your@mail.com.
Sets the last login email.
• To apply these changes, restart the game.
6. Added a dialog for selecting game adaptation files.
• Press alt+l to choose the game language in the bot.
• If lang=... is missing in config.ini during the first launch, this dialog will also appear.
7. Before using the bot, you must read the manual and agree to the terms. A button is provided to access the manual.
8. New functions: setonkey, delonkey.
Example:
setonkey=name={"keys": "lalt+f4", "execute": ["playfile=click.wav", "sleep=1", "speak=game exit", "gameexit"]} 
Pressing the specified keys will execute actions listed in the execute attribute.
delonkey=name  // Removes the keypress controller with the specified name. 

2024.09.15
1. Fixed: When the attack was disabled with disable_attack, target search keys enable_nav_attack did not work.
2. Added the ability to change hotkeys for launching and closing the game.
To change the default keys, add the following lines to your config.ini file:
Launch game or expand game window: 
start_game=lalt+g 
Close game: 
quit_game=lalt+q 
3. Adjusted key release behavior in the random_going mode.
4. Extended functionality of the goposition function:
goposition=int x|int y=details 
• By default: 0 (exact match).
• Example:
goposition=100|100=5 
If the character reaches 102|96, it will be considered the target point.

2024.09.11
1. Fixed mastersynthfrag function.
2. Translated some messages into English.
3. Added additional translatable messages in the language.ini file.
4. New functions:
var_div=variable=value  // Divide variable value by specified value. 
var_mult=variable=value  // Multiply variable value by specified value. 
5. Implemented script start timer via the f7 key.
6. If the game crashes, the bot will not restart automatically on subsequent launches.
7. Enhanced functionality of the badequipment function:
badequipment=regexp 
The bot now logs items being discarded in log/badequipment.txt.

2024.09.04
1. Fixed playfile=filename function.
2. Conducted system optimization.

2024.08.21
1. New parameter:
keypress_limit=int number 
• Default: 5.
• If the same phrase appears number times in the keypress=keyname=regexp function, the bot will detect circular menu scrolling and stop working.
2. Migrated to a new server in Frankfurt am Main.

2024.08.18
1. For the new trigger add_action_speak, the onecopy attribute is now 1 by default.
2. New function:
enable_mount=name  // The character will attempt to use the specified mount. 
disable_mount  // Optional value to dismount. 
If no value is provided, the name from the previous enable_mount step will be used.

2024.08.16
1. Added a switch for starting a block after a specified time:
enable_drop_control=3|blockname 

2024.08.14
1. Extended functionality of the enable_drop_control function.
• Thanks to user: Jgonzalezh.
Example:
enable_drop_control=3|blockname 
When farm time expires, the script moves to the specified block.

2024.08.13
1. Added new function: enable_drop_control.
• Ends the script when your farm time runs out.

enable_drop_control 
• Variants:
enable_drop_control=1  // Shuts down the computer. 
enable_drop_control=2|scriptname  // Runs the specified script. 
2. Fixed key_open_profile parameter in config.ini.

2024.08.08
1. Added release date indication for updates to improve clarity.
2. Fixed clearbag function when timeout data was missing.

99.11
1. Implemented script continuation after the specified date:
enable_time_start=2024-08-06 03:00:00 
• The bot will execute the next script instructions only after the specified time.
• To disable this:
disable_time_start 
2. Added timeout functionality to the clearbag function.

99.10
1. Fixed clear_action_speak.
2. Save translation state in config.ini.

99.9
1. Added alt+r hotkey for program reload.

99.8
1. Added key reassignment for basic functions:
key_open_profile=` 
key_open_chat=backslash 
key_get_hp=r 
key_get_pet_hp=lshift+r 

99.7
• Fixed assignment and launching of hot scripts.

99.6
• Implemented the function for quickly uploading scripts to the exchange using the ctrl+u hotkey.
To use: select the desired script and press ctrl+u.
• Fixed disabling keys f10, f11, f12.

99.5
• Changed the hotkey for launching the game to alt+g.
• Added a hotkey combination for closing the game: alt+q.
Note: The hotkey for closing the game may not work when the game window is active.
• Removed hotkeys: f10, f11, f12.
• Added the ability to assign hotkeys to scripts:
To assign a hotkey to a script, select the script and press alt+shift+ followed by a number from 1 to 9.
To call the script, use the combination alt+ followed by the assigned number.

99.4
• ctrl+h opens the help section in the language set for the bot.
If the language is not set, it opens the help section in English.
• Modified the game launch function.
• Adjusted logging output.
• Game can now be launched using the global hotkey: left alt + left shift + g.
If the game is already running, this combination brings the game window to the foreground.
Note: This hotkey is global and can be used outside the bot window.

99.3
• Added the ability to open the help section using the ctrl+h key.
• New function:
action_speak_change=["trigger name", "attribute name", "value"] 
Example:
add_action_speak=critical={"text": ["^crit"], "is_count": 2, "execute":["keypress=n"], "onecopy":1}
action_speak_change=["critical", "text", "no crit"] 
• It is now possible to launch a script via a chat command:
/map script name
• Other minor edits.

99.2
• New function: switch.
Syntax:
switch=string={"default": ["default actions"], "value 1": ["actions list"], "string 2": ["actions list"]} 
Example:
var=counter=0 
switch=%counter%={"default": ["speak=default case: %counter%"], "1": ["speak=case 1"], "2": ["speak=case 2"]} 
var_plus=counter=1 
sleep=1 
go_to_line=2 

99.1
• Attempted to identify keyboard error.

99.0
• Fixed logging data in logerror when a file is missing in the mapwall=filename construction.
• New function:
var_plus=variable_name=int value  // Adds the value to the variable. 
Example:
var=counter=0 
speak=counter: %counter% 
sleep=1 
var_plus=counter=5 
speak=new counter: %counter% 
• New function:
var_minus=variable_name=int value  // Subtracts the value from the variable. 
• New function: if.
Syntax:
if=["cond1", "cond2", "operator", ["true_action"], ["false_action"]] 
Example:
if=["1", "2", "<", ["speak=1 < 2, ok"], ["no, 1 > 2 :)"]] 
Example with variables:
var=counter=0 
speak=counter: %counter% 
sleep=1 
var_plus=counter=1 
if=["%counter%", "5", ">=", ["break"], ["go_to_line=2"]] 
The script will stop when the variable %counter% reaches 5 or more.
Supported operators:
• >
• <
• <=
• >=
• ==
• !=
For questions, visit the forum at https://mwbot.org/ or use the /report command.

98.9
• Added functionality to open the bot directory using the ctrl+e hotkey.
Idea by user: Jgonzalezh.

98.8
• Optimized the sellcollection function.
• Preparation for migration to a new address (not a bot function).

98.7
• Added the ability in the target search function to specify key combinations like:
lshift+5|lshift+6 
Example:
nav_keys=lshift+5|lshift+6|k|; 
• Fixed key replacement behavior in the config.ini file.
Example:
kbr_rctrl=space 
This makes the bot press space instead of the right ctrl.

98.6
• Fixed go_to_line function.
Thanks to user: Jgonzalezh.

98.5
• Fixed incorrect behavior of the go_to_line function in some situations.
Thanks to user: Jgonzalezh.

98.4
• Added event generation function:
action_speak_generate=your text 
To capture the event, use the text:
add_action_speak=test={"text": ["^event_generate_action:your text"], "execute":...} 

98.3
• Fixed go_to_block function.

98.2
• Fixed the onecopy attribute in triggers.
• Added new attribute timeout:
timeout: 123  // Sets how often a trigger can activate. 
Example:
add_action_speak=testTimeout={"text":["^(\\d+); (\\d+)$"], "execute":["sleep=1", "speak=hp: %%1; mp: %%2"], "onecopy":1, "timeout": 5} 
When pressing r to check stats, the trigger will only activate once every 5 seconds.
• Added function:
stopwall=regexp 
Instead of adding stop phrases of walls to the stopwallword.txt file, you can now enter phrases using a regular expression directly in your script, the work of data from the stopwallword.txt file is also taken into account.
command added: execute=["cmd1", "cmd2", "cmd3"]
execution of commands in one line, intended to be used to set settings
fixed using the go_to_block function in triggers in the execute attribute.