Kinglykrab 856aa51cb8
[Bots] Add support for Bot scripting. (#2515)
* [Bots] Add support for Bot scripting.

# Perl
- Add support for `zone/bot.pl` and `zone/bot_v#.pl`.
- Add support for `global/global_bot.pl`.
- Add `$bot->SignalBot(signal_id)` to Perl.
- Add `$bot->OwnerMessage(message)` to Perl.
- Add `$entity_list->SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotID(bot_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotName(bot_name, signal_id)` to Perl.
- Add `EVENT_SPELL_EFFECT_BOT` to Perl.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Perl.

# Lua
- Add support for `zone/bot.lua` and `zone/bot_v#.lua`.
- Add support for `global/global_bot.lua`.
- Add `bot:SignalBot(signal_id)` to Lua.
- Add `bot:OwnerMessage(message)` to Lua.
- Add `entity_list:SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotID(bot_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotName(bot_name, signal_id)` to Lua.
- Add `EVENT_SPELL_EFFECT_BOT` to Lua.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Lua.

# Supported Bot Events
1. `EVENT_CAST`
2. `EVENT_CAST_BEGIN`
3. `EVENT_CAST_ON`
4. `EVENT_COMBAT`
5. `EVENT_DEATH`
6. `EVENT_DEATH_COMPLETE`
7. `EVENT_SAY`
8. `EVENT_SIGNAL`
9. `EVENT_SLAY`
10. `EVENT_SLAY_NPC`
11. `EVENT_SPAWN`
12. `EVENT_TARGET_CHANGE`
13. `EVENT_TIMER`
14. `EVENT_USE_SKILL`

# Common
- Convert NPC pointers in common events to Mob pointers so bots are supported.
- Convert signal IDs to `int` where it wasn't already, allowing negative signals to be sent properly.

* Add EVENT_POPUP_RESPONSE.

* Cleanup and fix EVENT_COMBAT/EVENT_SLAY/EVENT_NPC_SLAY.

* Fix DoNPCEmote calls.

* Update attack.cpp

* Update event_codes.h

* Update bot_command.cpp
2022-11-16 21:02:16 -06:00
..
2020-07-07 02:09:39 -05:00
2013-02-16 16:14:39 -08:00
2014-08-21 16:44:02 -07:00
2014-08-21 17:26:32 -07:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:13:16 -04:00
2016-05-30 06:52:25 -04:00
2013-05-09 11:37:51 -04:00
2017-01-22 22:26:34 -08:00
2014-08-21 19:33:02 -07:00
2014-08-21 19:33:02 -07:00
2014-08-21 17:26:32 -07:00
2016-05-25 16:10:28 -04:00
2014-08-21 17:26:32 -07:00
2015-12-17 14:14:04 -08:00
2015-12-17 14:14:04 -08:00
2013-05-09 11:37:51 -04:00
2018-04-27 21:41:52 -04:00
2018-04-27 21:41:52 -04:00
2016-05-25 02:38:06 -04:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:37:51 -04:00
2020-01-16 17:17:31 -05:00
2013-05-09 11:13:16 -04:00
2013-02-16 16:14:39 -08:00
2014-08-21 19:36:50 -07:00
2013-05-09 11:13:16 -04:00
2020-05-09 14:40:33 -05:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:37:51 -04:00
2021-07-16 21:50:46 -04:00
2014-12-15 22:42:59 -06:00
2013-05-09 11:37:51 -04:00
2015-01-19 04:02:45 -06:00
2019-04-16 01:09:25 -07:00
2019-04-16 01:09:25 -07:00
2019-09-01 23:54:24 -05:00
2016-10-16 21:36:39 -04:00
2019-09-01 23:41:26 -05:00
2018-07-14 17:41:42 -04:00
2013-05-09 11:37:51 -04:00
2014-08-21 19:33:02 -07:00
2022-10-15 15:17:50 -05:00
2022-10-15 15:17:50 -05:00