Command Helpers¶
API reference for the routines defined in core.command.
Command(bot, init_handler=False)
¶
Facade that exposes quest, item, map, combat, player, and utility helpers.
Source code in core\command.py
96 97 98 99 100 101 | |
accept_quest(quest_id)
async
¶
Send a single quest accept packet and wait briefly for the response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to accept. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine simply delays to allow server processing. |
Source code in core\command.py
149 150 151 152 153 154 155 156 157 158 159 160 | |
accept_quest_bulk(quest_id, increment, ensure=False)
async
¶
Accept a range of quests sequentially.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Starting quest identifier. |
required |
increment
|
int
|
Number of consecutive quest ids to process. |
required |
ensure
|
bool
|
Use ensure-accept logic for each quest when True. |
False
|
Source code in core\command.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
add_drop(itemName)
¶
Add items to the drop whitelist handled by the bot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemName
|
Union[str, List[str]]
|
Single name or list of names to whitelist. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Extends the whitelist in place. |
Source code in core\command.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
bank_to_inv(itemNames)
async
¶
Move items from the bank to the inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemNames
|
Union[str, List[str]]
|
Single name or list of names to transfer. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine issues move requests for each item. |
Source code in core\command.py
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
buy_item(shop_id, item_name, qty=1)
async
¶
Buy an item, loading the shop if it is not cached.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shop_id
|
int
|
Identifier of the shop containing the item. |
required |
item_name
|
str
|
Name of the item to purchase. |
required |
qty
|
int
|
Quantity to purchase in a single request. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Sends the buy packet once the shop data is available. |
Source code in core\command.py
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | |
buy_item_cmd(item_name, shop_id, qty=1)
async
¶
Buy an item from a shop, loading data when necessary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_name
|
str
|
Name of the shop item to purchase. |
required |
shop_id
|
int
|
Identifier of the shop to query. |
required |
qty
|
int
|
Quantity to purchase in a single request. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine sends the purchase packet asynchronously. |
Source code in core\command.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
can_turnin_quest(questId)
¶
Delegate to the bot helper that checks quest completion requirements.
Source code in core\command.py
188 189 190 | |
check_is_skill_safe(skill)
¶
Return whether a skill is safe to use at the current HP threshold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skill
|
int
|
Skill slot that is about to be executed. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the skill can be used safely for the equipped class. |
Source code in core\command.py
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | |
do_pwd(monster_id)
¶
Send a raw PWD packet to the server for a specific monster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monster_id
|
str
|
Monster identifier to include in the packet payload. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The message is sent and no value is returned. |
Source code in core\command.py
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 | |
ensure_accept_quest(quest_id)
async
¶
Keep accepting a quest until it is in progress or the client disconnects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to accept. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Exits once the quest is tracked or a failure is recorded. |
Source code in core\command.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
ensure_load_shop(shop_id)
async
¶
Keep loading a shop until it is present in the cache.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shop_id
|
int
|
Identifier of the shop to ensure. |
required |
Source code in core\command.py
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 | |
ensure_turn_in_quest(quest_id, item_id=-1, amount=1)
async
¶
Attempt to turn in a quest until it completes or the client disconnects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to complete. |
required |
item_id
|
int
|
Required item id for turn-in when applicable. |
-1
|
amount
|
int
|
Quantity of the required item. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Stops when the quest leaves the progress list or fails. |
Source code in core\command.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
equip_item(item_name)
async
¶
Equip an inventory item if it is present and not already equipped.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_name
|
str
|
Name of the item to equip. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Updates the equipped state and sends the equip packet. |
Source code in core\command.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |
equip_item_by_enhancement(enh_id)
async
¶
Equip the item that matches a specific enhancement identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enh_id
|
int
|
Enhancement identifier bound to the desired item. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Calls :meth: |
Source code in core\command.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
equip_scroll(item_name, item_type=ScrollType.SCROLL)
async
¶
Equip a scroll or potion from the player's inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_name
|
str
|
Name of the scroll or potion to equip. |
required |
item_type
|
ScrollType
|
Scroll category to include in the packet. |
SCROLL
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Sends the equip packet when the item is found. |
Source code in core\command.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
farming_logger(item_name, item_qty=1, is_temp=False)
¶
Log farming progress for a specific item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_name
|
str
|
Name of the item being farmed. |
required |
item_qty
|
int
|
Target quantity for the farming session. |
1
|
is_temp
|
bool
|
Whether to read from the temporary inventory. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Prints progress information to the console. |
Source code in core\command.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
get_equipped_class()
¶
Return the currently equipped class inventory item, or None.
Source code in core\command.py
1170 1171 1172 1173 | |
get_farm_class()
¶
Return the configured farming class name, or None when unset.
Source code in core\command.py
1162 1163 1164 | |
get_followed_player()
¶
Return username of registered followed player username.
Source code in core\command.py
1150 1151 1152 | |
get_loaded_shop(shop_id)
¶
Return a loaded shop instance when available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shop_id
|
int
|
Identifier of the shop to look up. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Shop]
|
Shop | None: Cached shop instance, or None if it has not been loaded. |
Source code in core\command.py
556 557 558 559 560 561 562 563 564 565 566 567 568 569 | |
get_map_item(map_item_id, qty=1)
async
¶
Collect a map item multiple times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
map_item_id
|
int
|
Map item identifier to pick up. |
required |
qty
|
int
|
Number of pickup attempts. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Sends the pickup packet for each requested iteration. |
Source code in core\command.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
get_monster(monster)
¶
Return the monster object that matches the provided identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monster
|
str
|
Name or |
required |
Returns:
| Type | Description |
|---|---|
Optional[Monster]
|
Monster or None: Monster instance when found, otherwise None. |
Source code in core\command.py
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | |
get_monster_hp(monster)
¶
Get the current HP of the requested monster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monster
|
str
|
Name or |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Current HP, or -1 when the monster is not found. |
Source code in core\command.py
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | |
get_monster_hp_percentage(monster)
¶
Get the remaining HP of a monster as a percentage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monster
|
str
|
Name or |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Rounded HP percentage, or -1 when the monster is missing. |
Source code in core\command.py
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | |
get_player()
¶
Return current player instance.
Source code in core\command.py
1146 1147 1148 | |
get_player_cell()
¶
Return the local player's current cell name.
Source code in core\command.py
1175 1176 1177 | |
get_player_in_map(name)
¶
Return the area record for a player in the current map, if present.
Source code in core\command.py
652 653 654 655 656 657 | |
get_player_pad()
¶
Return the local player's current pad identifier.
Source code in core\command.py
1179 1180 1181 | |
get_player_position_xy()
¶
Return the local player's map coordinates as an [x, y] list.
Source code in core\command.py
1183 1184 1185 | |
get_quant_item(itemName)
¶
Return the current quantity of an item in the inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemName
|
str
|
Name of the inventory item. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Quantity of the item, or 0 when the item is missing. |
Source code in core\command.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |
get_slaves()
¶
Return list of registered Slaves username
Source code in core\command.py
1154 1155 1156 | |
get_solo_class()
¶
Return the configured solo class name, or None when unset.
Source code in core\command.py
1166 1167 1168 | |
get_user_id()
¶
Return current player user ID.
Source code in core\command.py
1142 1143 1144 | |
goto_player(player_name)
async
¶
Jump to another player on the current server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_name
|
str
|
Target player name to follow. |
required |
Source code in core\command.py
666 667 668 669 670 671 672 673 674 675 676 677 678 679 | |
hp_below_percentage(percent)
¶
Check if the player HP is below the requested percentage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
percent
|
int
|
HP threshold to compare against. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the player HP percentage is lower than the threshold. |
Source code in core\command.py
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 | |
inv_to_bank(itemNames)
async
¶
Move items from the inventory to the bank.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemNames
|
Union[str, List[str]]
|
Single name or list of names to transfer. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine issues transfer packets for each item. |
Source code in core\command.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
is_completed_before(quest_id)
async
¶
Determine whether the quest has been completed previously.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to inspect. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the server indicates prior completion. |
Source code in core\command.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
is_green_quest(quest_id)
async
¶
Check whether a quest is marked green (ready to turn in).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to inspect. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the server reports the quest as green. |
Source code in core\command.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
is_in_bank(itemName, itemQty=1, operator='>=')
¶
Check whether the bank holds a given quantity of an item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemName
|
str
|
Name of the item to inspect. |
required |
itemQty
|
int
|
Quantity threshold to test. |
1
|
operator
|
str
|
Comparison operator understood by the bot API. |
'>='
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the bank fulfils the requested quantity test. |
Source code in core\command.py
287 288 289 290 291 292 293 294 295 296 297 298 299 | |
is_in_inventory(itemName, itemQty=1, operator='>=', isTemp=False)
¶
Check whether the inventory (temp or permanent) has enough items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemName
|
str
|
Name of the item to inspect. |
required |
itemQty
|
int
|
Quantity threshold to test. |
1
|
operator
|
str
|
Comparison operator understood by the bot API. |
'>='
|
isTemp
|
bool
|
When True, inspect the temporary inventory. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the inventory satisfies the quantity requirement. |
Source code in core\command.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
is_in_inventory_or_bank(itemName, itemQty=1, operator='>=', isTemp=False)
¶
Check whether an item is available in bank or inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
itemName
|
str
|
Name of the item to inspect. |
required |
itemQty
|
int
|
Quantity threshold to test. |
1
|
operator
|
str
|
Comparison operator understood by the bot API. |
'>='
|
isTemp
|
bool
|
When True, include the temporary inventory. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when either storage location satisfies the check. |
Source code in core\command.py
316 317 318 319 320 321 322 323 324 325 326 327 328 | |
is_in_map(mapName)
¶
Return True when the player is currently in the given map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapName
|
str
|
Map identifier to compare. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the current map matches |
Source code in core\command.py
734 735 736 737 738 739 740 741 742 743 | |
is_monster_alive(monster='*')
¶
Check whether a monster is alive in the player's current cell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monster
|
str
|
Name or |
'*'
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when a matching live monster is found in the cell. |
Source code in core\command.py
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 | |
is_not_in_cell(cell)
¶
Check whether the player is standing in a different cell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell
|
str
|
Cell name to compare with the current position. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the active cell does not match |
Source code in core\command.py
761 762 763 764 765 766 767 768 769 770 | |
is_not_in_map(mapName)
¶
Return True when the player is not currently in the given map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapName
|
str
|
Map identifier to compare. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True when the current map differs from |
Source code in core\command.py
723 724 725 726 727 728 729 730 731 732 | |
is_player_alive()
¶
Return True when the local player is not dead.
Source code in core\command.py
1158 1159 1160 | |
is_player_in_cell(name, cell)
¶
Return True when a named player is currently in the given cell.
Source code in core\command.py
659 660 661 662 663 664 | |
is_still_connected()
¶
Check whether the client connection is still active.
Source code in core\command.py
103 104 105 106 | |
is_valid_json(s)
¶
Return True when the provided string parses as JSON.
Source code in core\command.py
108 109 110 111 112 113 114 | |
join_house(houseName, safeLeave=True)
async
¶
Join a player house while optionally leaving combat safely.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
houseName
|
str
|
Name of the house to join. |
required |
safeLeave
|
bool
|
Leave combat via spawn before issuing the join request. |
True
|
Source code in core\command.py
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |
join_map(mapName, roomNumber=None, safeLeave=True)
async
¶
Join a map instance, picking the appropriate room.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapName
|
str
|
Map identifier to join. |
required |
roomNumber
|
int | None
|
Specific room number to target when provided. |
None
|
safeLeave
|
bool
|
Leave combat before transferring maps. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Records join state and sends the transfer packet. |
Source code in core\command.py
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | |
jump_cell(cell, pad)
async
¶
Jump to a specific cell and pad if not already positioned there.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell
|
str
|
Cell name to move to. |
required |
pad
|
str
|
Pad identifier within the cell. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Executes a jump command and waits briefly for sync. |
Source code in core\command.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | |
jump_to_monster(monsterName, byMostMonster=True, byAliveMonster=False)
async
¶
Jump to the cell that currently hosts the requested monster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monsterName
|
str
|
Display name or |
required |
byMostMonster
|
bool
|
Prefer the cell with the highest monster population when True. |
True
|
byAliveMonster
|
bool
|
Prefer a cell that still has the monster alive when True. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine adjusts player position and exits. |
Source code in core\command.py
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | |
leave_combat(safeLeave=True)
async
¶
Leave combat and optionally jump back to spawn.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
safeLeave
|
bool
|
Jump to the Enter/Spawn cell after leaving combat when True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Always returns None; the bot actions run asynchronously. |
Source code in core\command.py
828 829 830 831 832 833 834 835 836 837 838 839 840 | |
load_shop(shop_id)
async
¶
Request shop data from the server and wait for the response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shop_id
|
int
|
Identifier of the shop to load. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Awaits for a short delay to let the data load. |
Source code in core\command.py
542 543 544 545 546 547 548 549 550 551 552 553 554 | |
quest_in_progress(quest_id)
¶
Return True when the quest is present in the in-progress list.
Source code in core\command.py
183 184 185 186 | |
quest_not_in_progress(quest_id)
¶
Return True when the quest is not currently tracked in progress.
Source code in core\command.py
178 179 180 181 | |
register_quest(questId)
async
¶
Register a quest for auto accept and complete system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
questId
|
int
|
Identifier of the quest to register. |
required |
Source code in core\command.py
247 248 249 250 251 252 253 254 255 | |
rest()
async
¶
Request the rest action.
Source code in core\command.py
1197 1198 1199 | |
sell_item(item_name, qty=1)
async
¶
Sell an item from the inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_name
|
str
|
Name of the item to sell. |
required |
qty
|
int
|
Quantity to sell in a single transaction. |
1
|
Source code in core\command.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | |
send_chat(message)
async
¶
Send a zone chat message through the server packet API.
Source code in core\command.py
1193 1194 1195 | |
send_packet(packet)
async
¶
Send a raw packet to the server after validating connectivity.
Source code in core\command.py
1214 1215 1216 1217 1218 1219 | |
sleep(milliseconds)
async
¶
Asynchronously sleep for the requested number of milliseconds.
Source code in core\command.py
1201 1202 1203 1204 | |
start_aggro(mons_id, delay_ms=500)
¶
Enable the aggro handler for the supplied monster identifiers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mons_id
|
list[str]
|
Monster identifiers to keep aggroed. |
required |
delay_ms
|
int
|
Delay between aggro ticks in milliseconds. |
500
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Updates the bot state and starts the aggro task. |
Source code in core\command.py
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 | |
start_aggro_by_cell(cells, delay_ms=500)
¶
Start aggroing every monster found in the provided cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cells
|
list[str]
|
Cell names to scan for monsters. |
required |
delay_ms
|
int
|
Delay between aggro commands in milliseconds. |
500
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Delegates to start_aggro when monsters are present. |
Source code in core\command.py
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | |
stop_aggro()
¶
Stop the aggro handler and clear tracked monsters.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Clears aggro state without returning a value. |
Source code in core\command.py
819 820 821 822 823 824 825 826 | |
stop_bot(msg='')
¶
Print a stop message and terminate the bot session.
Source code in core\command.py
1187 1188 1189 1190 1191 | |
subscribe(callback)
¶
Register a server message/response handler.
Source code in core\command.py
1206 1207 1208 | |
turn_in_quest(quest_id, item_id=-1, qty=1)
async
¶
Submit quest completion requirements and leave combat if needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quest_id
|
int
|
Identifier of the quest to turn in. |
required |
item_id
|
int
|
Required item id for the submission. |
-1
|
qty
|
int
|
Quantity of the required item. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Updates quest tracking state and delays for server processing. |
Source code in core\command.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
unsubscribe(callback)
¶
Remove server message/response handler.
Source code in core\command.py
1210 1211 1212 | |
use_skill(index=0, target_monsters='*', hunt=False, skill_mode=SkillMode.ALL, reload_delay=500)
async
¶
Execute a skill with optional hunting, targeting, and cooldown handling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index
|
int
|
Skill slot that should be triggered. |
0
|
target_monsters
|
str
|
Target filter, |
'*'
|
hunt
|
bool
|
When True, jump to the monster before casting. |
False
|
skill_mode
|
SkillType
|
Defines which types of skills (buff, attack, all, none) can be used. |
ALL
|
reload_delay
|
int
|
Cooldown buffer in milliseconds after casting. |
500
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine schedules the skill usage and exits. |
Source code in core\command.py
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 | |
wait_count_player(player_count)
¶
Check if the current map has at least the requested player count.
Source code in core\command.py
635 636 637 | |
wait_count_player_in_cell(cell, player_count)
¶
Check if a cell hosts at least the requested number of players.
Source code in core\command.py
639 640 641 642 643 644 645 646 647 648 649 650 | |
wait_use_skill(index, target_monsters='*')
async
¶
Wait until a skill is ready before casting it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index
|
int
|
Skill slot to trigger. |
required |
target_monsters
|
str
|
Comma-separated monster names or |
'*'
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The coroutine finishes once the skill has been used. |
Source code in core\command.py
880 881 882 883 884 885 886 887 888 889 890 891 892 893 | |
walk_to(X, Y, speed=8)
async
¶
Walk to a coordinate within the current map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
int
|
Target X coordinate. |
required |
Y
|
int
|
Target Y coordinate. |
required |
speed
|
int
|
Movement speed for the walk animation. |
8
|
Source code in core\command.py
772 773 774 775 776 777 778 779 780 781 | |