Function: SendStateCommand(spawn, new_state, player)
Description: Updates the state of the Spawn and it's behavior, can optionally be sent to a single Player. The new_state is based on the Appearance ID's https://www.eq2emu.com/developers/references by client version.
Parameters:
spawn(Spawn) - Spawn object representingspawn.new_state(int32) - Integer valuenew_state.player(Spawn) - Spawn object representingplayer.
Returns: None.
Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.