[Bots] Add Bot scripting capabilities to the source. (#1378)

- This will allow server operators to interact with bots within a script in Perl or Lua.
This commit is contained in:
Alex
2021-06-11 14:46:30 -04:00
committed by GitHub
parent d54cd08560
commit d9d6a64941
14 changed files with 338 additions and 0 deletions
+15
View File
@@ -7,6 +7,9 @@
class EntityList;
class Lua_Mob;
class Lua_Client;
#ifdef BOTS
class Lua_Bot;
#endif
class Lua_NPC;
class Lua_Door;
class Lua_Corpse;
@@ -16,6 +19,9 @@ class Lua_Raid;
class Lua_Spawn;
struct Lua_Mob_List;
struct Lua_Client_List;
#ifdef BOTS
struct Lua_Bot_List;
#endif
struct Lua_NPC_List;
struct Lua_Corpse_List;
struct Lua_Object_List;
@@ -35,6 +41,10 @@ luabind::scope lua_register_object_list();
luabind::scope lua_register_door_list();
luabind::scope lua_register_spawn_list();
#ifdef BOTS
luabind::scope lua_register_bot_list();
#endif
class Lua_EntityList : public Lua_Ptr<EntityList>
{
typedef EntityList NativeType;
@@ -110,6 +120,11 @@ public:
Lua_Spawn_List GetSpawnList();
void SignalAllClients(int signal);
void ChannelMessage(Lua_Mob from, int channel_num, int language, const char *message);
#ifdef BOTS
Lua_Bot GetBotByID(uint32 bot_id);
Lua_Bot GetBotByName(std::string bot_name);
Lua_Bot_List GetBotList();
#endif
};
#endif