File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -708,6 +708,7 @@ ALERegister<Player> PlayerMethods[] =
708708 { " CanTeleport" , &LuaPlayer::CanTeleport },
709709 { " IsSpectator" , &LuaPlayer::IsSpectator },
710710 { " HasKnownTaxiNode" , &LuaPlayer::HasKnownTaxiNode },
711+ { " IsBot" , &LuaPlayer::IsBot },
711712 // { "HasSpellMod", &LuaPlayer::HasSpellMod },
712713
713714 // Gossip
Original file line number Diff line number Diff line change @@ -5009,6 +5009,22 @@ namespace LuaPlayer
50095009 ALE::Push (L, player->m_taxi .IsTaximaskNodeKnown (nodeId));
50105010 return 1 ;
50115011 }
5012+
5013+ /* *
5014+ * Returns `true` if the [Player] is a Playerbot/RNDBot, `false` otherwise.
5015+ *
5016+ * @return bool isBot
5017+ */
5018+ int IsBot (lua_State* L, Player* player)
5019+ {
5020+ #if defined(MOD_PLAYERBOTS)
5021+ ALE::Push (L, player->GetSession ()->IsBot ());
5022+ #else
5023+ (void )player;
5024+ ALE::Push (L, false );
5025+ #endif
5026+ return 1 ;
5027+ }
50125028};
50135029#endif
50145030
You can’t perform that action at this time.
0 commit comments