mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
* [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
55 lines
2.0 KiB
C++
55 lines
2.0 KiB
C++
#ifdef BOTS
|
|
#ifndef EQEMU_LUA_BOT_H
|
|
#define EQEMU_LUA_BOT_H
|
|
#ifdef LUA_EQEMU
|
|
|
|
#include "lua_mob.h"
|
|
|
|
class Bot;
|
|
class Lua_Bot;
|
|
class Lua_Mob;
|
|
|
|
namespace luabind {
|
|
struct scope;
|
|
}
|
|
|
|
luabind::scope lua_register_bot();
|
|
|
|
class Lua_Bot : public Lua_Mob
|
|
{
|
|
typedef Bot NativeType;
|
|
public:
|
|
Lua_Bot() { SetLuaPtrData(nullptr); }
|
|
Lua_Bot(Bot *d) { SetLuaPtrData(reinterpret_cast<Entity*>(d)); }
|
|
virtual ~Lua_Bot() { }
|
|
|
|
operator Bot*() {
|
|
return reinterpret_cast<Bot*>(GetLuaPtrData());
|
|
}
|
|
|
|
void AddBotItem(uint16 slot_id, uint32 item_id);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four, uint32 augment_five);
|
|
void AddBotItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four, uint32 augment_five, uint32 augment_six);
|
|
uint32 CountBotItem(uint32 item_id);
|
|
Lua_ItemInst GetBotItem(uint16 slot_id);
|
|
uint32 GetBotItemIDBySlot(uint16 slot_id);
|
|
int GetExpansionBitmask();
|
|
Lua_Mob GetOwner();
|
|
bool HasBotItem(uint32 item_id);
|
|
void OwnerMessage(std::string message);
|
|
void RemoveBotItem(uint32 item_id);
|
|
void SetExpansionBitmask(int expansion_bitmask);
|
|
void SetExpansionBitmask(int expansion_bitmask, bool save);
|
|
void SignalBot(int signal_id);
|
|
};
|
|
|
|
#endif
|
|
#endif
|
|
#endif
|