Commit Graph

198 Commits

Author SHA1 Message Date
nytmyr bd97453852 Implement ^spellannouncecasts to toggle announcing casts of spell types 2025-01-31 14:31:48 -06:00
nytmyr e039ce2e37 Move functions out of mob.h and cleanup 2025-01-30 22:25:54 -06:00
nytmyr 9b72672945 Implement missing ^spellresistlimits/^resistlimits command 2025-01-30 22:24:33 -06:00
nytmyr fbb2341fca Correct DoLosChecks 2025-01-26 10:21:56 -06:00
nytmyr 01afd68230 Remove bcspells, fix helper_send_usage_required_bots 2025-01-11 01:40:32 -06:00
nytmyr f34a9470a8 code cleanup 4 2025-01-10 12:23:40 -06:00
nytmyr 95c1bb6883 code cleanup 2 2025-01-10 11:45:00 -06:00
nytmyr 40b676c320 code cleanup 1 2025-01-09 23:01:48 -06:00
nytmyr 61a3987d25 Remove plural on ^spelltypeidsand ^spelltypenames 2024-12-30 22:54:00 -06:00
nytmyr 2d7d58b4ef remove ^aggressive/^defensive 2024-12-29 20:18:12 -06:00
nytmyr a0c2abfedf Implement ^discipline 2024-12-29 20:01:18 -06:00
nytmyr ef983c3d47 Move bot_list from std::list to std::unordered_map like other entities 2024-12-23 20:50:36 -06:00
nytmyr 600376274f correct name checking to match players 2024-12-21 23:47:30 -06:00
nytmyr e220163153 Implement blocked_buffs and blocked_pet_buffs 2024-12-15 23:09:32 -06:00
nytmyr 9207be96d3 Rewrite ^pull logic and handling. **MORE**
Add ^setassistee command to set who your bots will assist. Bots will always assist you first before anyone else.

If the rule Bots, AllowCrossGroupRaidAssist is enabled bots will assist the group or raid main assists.

Rewrites logic in handling of pull and returning to ensure bots make it back to their location.
2024-12-12 22:14:04 -06:00
nytmyr 3302869e29 implement depart to use spell lists 2024-12-12 22:14:01 -06:00
nytmyr 2f4d5ebde9 more command cleanup 2024-12-12 22:13:25 -06:00
nytmyr ee9651b4f1 implement commanded cast types 2024-12-12 22:13:18 -06:00
nytmyr 3d67009de5 Command help cleanup 2024-12-12 22:13:05 -06:00
nytmyr 11859769a6 Make command errors/failures yellow 2024-12-12 22:13:03 -06:00
nytmyr ec89a65aeb remove circle/teleport, tweak depart 2024-12-12 22:13:00 -06:00
nytmyr e73f1259be bot movement cleanup and tweaks, move casterrange to distanceranged 2024-12-12 22:11:27 -06:00
nytmyr 6574f780db Bot Rework 2024-12-12 22:10:36 -06:00
Alex King 3f46210639 [Bots] Cleanup empty bot_commands files (#4095)
* [Bots] Cleanup empty `bot_commands` files

# Notes
- These files were part of the conversion of bot commands to individual files, these commands are part of overarching commands and therefore do not have their own files.
- These were not removed when initially committed.

* Update bot_command.cpp

* Update bot_command.cpp
2024-02-19 02:19:56 -06:00
Alex King 6297c56db2 [Bot Commands] Separate Bot Commands into Individual Files (#4035)
# Notes
- Separate all bot commands into individual files like regular commands.

# Images
2024-02-01 04:35:33 -06:00
Alex King ce907c9519 [Bots] Convert Bot Database Methods to Repositories (#4023)
* [Bots] Convert Bot Database Methods to Repositories

* Final push.

* Cleanup.

* Cleanup.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp
2024-01-28 20:23:31 -06:00
dariusuknuis fbc2b7c152 [Bot] ^mez command spell list fix (#3998)
This change will allow necros to cast mez spells when ^mez command is used.
2024-01-19 16:39:14 -05:00
Alex King 1227f35382 [Cleanup] Remove bot-based saylink method (#3852)
# Notes
- With the new saylink functionality, bots no longer need their own saylink method.
2024-01-06 23:48:37 -06:00
Alex King 259add68f5 [Commands] Cleanup #appearance Command (#3827)
* [Commands] Cleanup #appearance Command

# Notes
- Cleanup messages and logic.
- Cleanup appearance type constants to use a namespace with constexpr instead.
- Cleanup animation constants to use a namespace with constexpr instead.

* Update emu_constants.cpp

* Cleanup
2024-01-06 22:24:32 -06:00
dariusuknuis c4da9766a4 [Bots] Resist Spell Fix (#3840)
Bots were not casting the highest level spell with ^resist. Base_value was being used to compare resist spells, but this is typically the same value for all resist spells. This fix should be easier than calculating the caster bots level adjusted "resist_total".
2024-01-06 21:04:33 -05:00
Alex King 4712ca471b [Cleanup] Gender constants cleanup (#3817)
* [Cleanup] Gender constants cleanup

# Notes
- Convert to a `Gender` namespace using `constexpr`.
- Cleanup spots where we were using magic numbers for gender values.

* Cleanup
2023-12-30 11:22:09 -05:00
Chris Miles 4fa9e1d66f [Code Cleanup] Race constants refactor (#3782)
* [Code Cleanup] Race constants refactor

* Update races.h
2023-12-22 21:34:55 -06:00
nytmyr 933b83add6 [Bots] Fix ^defensive from checking aggressive disciplines. (#3787)
Bots were checking for aggressive disciplines with both ^aggressive and ^defensive.
2023-12-18 15:38:37 -06:00
nytmyr bdf5f8b4a3 [Bots] [Quest API] Add ^clickitem, ^timer, fix GetBestBotSpellForCure (#3755)
* [Bots][Quest API] Add ^clickitem, ^timer, revamp bot timers, fix GetBestBotSpellForCure

This adds the command **^clickitem** for bots.
Bots can click items they are wearing with the provided slot ID, players can use **^invlist** on their bots to see items and slot IDs.
This supports actionables.
**^itemclick 13 byclass 11** would command all Necromancer bots to attempt to click their Primary item.

This adds and supports charges for items to bots, when an item is used, it will lose a charge and cannot be clicked once no charges remain.

This adds the following rules:
**Bots, BotsClickItemsMinLvl** - Minimum level bots can use **^clickitem**.
**Bots, BotsCanClickItems** - Whether or not **^clickitem** is allowed for bots.
**Bots, CanClickMageEpicV1** - Whether or not players are allowed to command their bots to use the Magician Epic 1.0

This adds quest methods to Perl/Lua for:
ClearDisciplineReuseTimer, ClearItemReuseTimer, ClearSpellRecastTimer
GetDisciplineReuseTimer, GetItemReuseTimer, GetSpellRecastTimer
SetDisciplineReuseTimer, SetItemReuseTimer, SetSpellRecastTimer

Discipline and Spell methods use the spell_id to check, get and set. Item uses the item_id.
Clear and Get support wildcards (no spell/item id) to clear all timers of the type or get the first timer of the type.
Get will return the remaining time on the chosen timer, if any.
Set supports a wildcard (no recast/reuse provided) to use the default of the provided type, you can also specify a recast/reuse timer to set that timer to the chosen value.

**^timer** has been added as a bot command, defaulted for GM access.
This can be used to set, get and clear timers of different types. Use **^timer help** for info.

This revamps the way timers are set, stored, loaded for bots.

**GetBestBotSpellForCure** was previously checking only the first spell found and not properly iterating through the checks.

This requires modifications to the **bot_timers** table and is included in this commit.

* Rebase Conflicts

* Update queries to use repositories

* Minor adjustment

* Formatting

* Handle delete as well

* Cleanup.

* Adjust primary keys to prevent conflicts

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2023-12-17 14:53:34 -05:00
Akkadius 33adb9bcc1 [Hotfix] Fix bad merge 2023-12-16 21:06:36 -06:00
nytmyr 2e8bf82861 [Bots] Expand ^itemuse options (#3756)
Adds additional options to **^itemuse** to narrow down the list of accepting bots.

You can now specify by class, casters, hybrids, melee, WIS caster, INT caster or plate/chain/leather/cloth wearing.
2023-12-16 20:54:23 -05:00
Alex King aeeb350068 [Cleanup] Cleanup classes.cpp/classes.h (#3752)
* [Cleanup] Cleanup classes.cpp/classes.h

# Notes
- Remove unused methods and cleanup logic.

* Update classes.cpp

* Final push.
2023-12-13 18:38:45 -05:00
nytmyr a1f1f11940 [Bots] Add ownerraid, byclass and byrace actionables and fix group-based arguments for raids. (#3680)
This adds raid support to actionables for bot commands.

This also addresses Issue #3567

If in a group, group based commands will function as normal, however if in a raid they will support raids and use the group of the bot that fits  the criteria.

This adds new actionables as well; namely, **ownerraid**, **byclass** and **byrace**.

**byclass** and **byrace** use the int of the chosen class/race. IE Shadowknight is 5, Barbarian is 2. **^create help** is an easy way for players to identify numbers associated with classes and races.

**targetgroup** will now select all bots that meet the criteria within a raid group in addition to the current functionality of groups.
**namesgroup** will now select all bots that meet the criteria within a raid group in addition to the current functionality of groups.
**ownerraid** will select all bots in the raid owned by the player.
**byclass** will selects all bots in the group or raid owned by the player that match the class.
**byrace** will selects all bots in the group or raid owned by the player that match the race

This adds actionables to **^casterrange** and **^camp** as well.
2023-11-18 23:24:49 -05:00
nytmyr 2702485206 [Bots] Fix invalid races from being created (#3681)
Previously this check allowed bots of invalid races to be created. If a race was neither a valid combination or a valid player race, it would pass the check and allow bots of any race to be created.

**^create 1 123 0** could create a Male Innoruuk Warrior
2023-11-06 17:03:34 -05:00
Alex King a4f2ed28f1 [Feature] Add Bot Starting Items (#3634)
* [Feature] Add Bot Starting Items

# Notes
- This table is similar to the player starting items table, however it uses bitmasks.
- Allows operators to give bots gear on creation.
- `races` of `0` for all races.
- `classes` of `0` for all classes.

* Update bot.cpp

* Update database_update_manifest_bots.cpp
2023-10-17 18:00:41 -04:00
Aeadoin 919a92bda3 [Bots] Remove In-Game Command References to Bot Groups (#3545) 2023-08-13 15:41:30 -04:00
Alex King fb20d92166 [Bug Fix] Fix Appearance Issues (#3520)
* [Bug Fix] Fix Appearance Issues

# Notes
- Changing race, gender, or texture of a Mob could result in it changing sizes due to use not sending the size as part of the appearance packet.
- Also converts the parameterized method to a struct parameter so that we can optionally send things without back-filling multiple arguments.

* Gender cleanup.

* Fix.

* Formatting.
2023-07-31 20:15:13 -05:00
Jonathan Sider 70ce81fb0a [Bug Fix] Fix rule check and add rule for pickpocket command (#3492)
* Fix bugs in skills

-Add rule for allowing pickpocket
-Fix method that is supposed to check rule
-Changed Z axis range for pickpocket (was failing on giants)

* Add zoffset to account for taller models
2023-07-15 21:46:26 -05:00
Jonathan Sider 50ce99ce3e [Bug Fix] Update bot naming check and add more explanation (#3491)
* Refactor my original PR

Block all puncation,numbers, and _

* Add error message
2023-07-12 21:59:17 -05:00
Jonathan Sider c81d05940a [Bots] Remove orphaned commands related to botgroup (#3489) 2023-07-09 00:00:28 -04:00
Jonathan Sider f06c7e8834 [Bots] Add Pickpocket Command (#3484)
* Add Pickpocket Command

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-07-08 16:51:52 -05:00
Alex King a1f2764978 [Cleanup/Feature] Add support for bots to #showstats/#mystats (#3427)
* Initial Push

* Update classes.cpp

* Update mob.cpp

* Update mob.cpp

* Update showstats.cpp

* Update mystats.cpp

* Remove unused variables.

* Update mob.cpp

* Update class.cpp

* Update race.cpp

* Update mob.h
2023-07-01 19:47:54 -04:00
Jonathan Sider 927d379e75 [Bug Fix] Add check for underscores in botcreate command (#3458)
* Update bot_command.cpp with botcreate check

Check for underscores in bot names as the server will replace with a space and add to the database. The bot can't be deleted/summoned or changed except by editing the database

* Update bot_command.cpp

* Update bot_command.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2023-06-28 20:18:44 -04:00
Alex King e939c82717 [Cleanup] Convert equipable_slot_list to std::vector from std::list in bot_command.cpp (#3253)
# Notes
- No need to use a `std::list` here.
2023-04-05 11:35:04 -04:00
Alex King 2a094e8792 [Cleanup] Use variable for c->GetTarget() instead of calling multiple times in bot_command.cpp (#3254)
# Notes
- Calling multiple times is less performant than using a variable.
2023-04-05 10:09:19 -04:00