Quick navigation

Go to

client runtime · Lua API

Open77.playerInteractions

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

client runtime9 functionsOpen in explorerMarkdown
On this page9 sections

accept

NETWORK
Signaturelua
Open77.playerInteractions.accept(interactionId)

Queue acceptance of the local player's offered invitation.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Resolving a request ID means queued, not accepted by the server. Observe onPlayerInteractionResult or result(requestId), then lifecycle state events.

Parameters 1

Parameters of Open77.playerInteractions.accept
NameTypeUseDefault
interactionIdstringrequired—

Returns

  • Open77.Promise resolving to request ID; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.accept(interactionId)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

cancel

NETWORK
Signaturelua
Open77.playerInteractions.cancel([interactionId])

Queue cancellation of an action the local player participates in; defaults to their current action.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Resolving a request ID means queued, not accepted by the server. Observe onPlayerInteractionResult or result(requestId), then lifecycle state events.

Parameters 1

Parameters of Open77.playerInteractions.cancel
NameTypeUseDefault
interactionIdstringoptional—

Returns

  • Open77.Promise resolving to request ID; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.cancel(interactionId)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

current

NETWORK
Signaturelua
Open77.playerInteractions.current([playerId])

Read a player's active reservation; defaults to the local player.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Client observations are not authority for inventory, healing or rewards.

Parameters 1

Parameters of Open77.playerInteractions.current
NameTypeUseDefault
playerIdintegeroptional—

Returns

  • Open77.Promise resolving to state or nil; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.current()
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

decline

NETWORK
Signaturelua
Open77.playerInteractions.decline(interactionId)

Queue refusal of the local player's offered invitation.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Resolving a request ID means queued, not accepted by the server. Observe onPlayerInteractionResult or result(requestId), then lifecycle state events.

Parameters 1

Parameters of Open77.playerInteractions.decline
NameTypeUseDefault
interactionIdstringrequired—

Returns

  • Open77.Promise resolving to request ID; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.decline(interactionId)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

get

NETWORK
Signaturelua
Open77.playerInteractions.get(interactionId)

Read one visible active interaction; missing is not an error.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Client observations are not authority for inventory, healing or rewards.

Parameters 1

Parameters of Open77.playerInteractions.get
NameTypeUseDefault
interactionIdstringrequired—

Returns

  • Open77.Promise resolving to state or nil; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.get(interactionId)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

isReserved

NETWORK
Signaturelua
Open77.playerInteractions.isReserved([playerId])

Check the visible reservation cache; defaults to the local player.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Client observations are not authority for inventory, healing or rewards.

Parameters 1

Parameters of Open77.playerInteractions.isReserved
NameTypeUseDefault
playerIdintegeroptional—

Returns

  • Open77.Promise resolving to boolean; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.isReserved()
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

list

NETWORK
Signaturelua
Open77.playerInteractions.list()

Read copied active states visible in this routing bucket.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Client observations are not authority for inventory, healing or rewards.

Returns

  • Open77.Promise resolving to state[]; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.list()
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

respond

NETWORK
Signaturelua
Open77.playerInteractions.respond(interactionId, accepted)

Queue acceptance or refusal of the local player's offered invitation. Only the target may respond.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Resolving a request ID means queued, not accepted by the server. Observe onPlayerInteractionResult or result(requestId), then lifecycle state events.

Parameters 2

Parameters of Open77.playerInteractions.respond
NameTypeUseDefault
interactionIdstringrequired—
acceptedbooleanrequired—

Returns

  • Open77.Promise resolving to request ID; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.respond(interactionId, true)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

result

NETWORK
Signaturelua
Open77.playerInteractions.result(requestId)

Read a cached server acknowledgement for a queued request; acknowledgements expire after30seconds.

Declare dependency 'open77_player_interactions >=1.0.0'. This is an asynchronous resource-export facade: call from a managed coroutine and await the Promise; nil plus reason indicates dispatch/rejection. No presentation capability is required for consumers. Client observations are not authority for inventory, healing or rewards.

Parameters 1

Parameters of Open77.playerInteractions.result
NameTypeUseDefault
requestIdstringrequired—

Returns

  • Open77.Promise resolving to result table or nil; nil, reason on rejection

Example

example.lualua
CreateThread(function()
    local pending, err = Open77.playerInteractions.result(requestId)
    if not pending then print(err); return end
    local value, rejected = pending:await()
    if rejected then print(rejected); return end
    print(value)
end)

Player interactions guide · Registered in ResourceHost.cpp as LuaPlayerInteractionExport (line 24704).

// For agents & LLMsthis page as Markdownllms.txtllms-full.txt

// Guides · Lua API

Search the docs

1,905 guides and functions indexed

Try