Difference between revisions of "Game"

From Vendetta Lua
Jump to: navigation, search
(Added functions without any description)
 
(GetFlightMode)
 
(15 intermediate revisions by 6 users not shown)
Line 20: Line 20:
 
=== EnableInput ===
 
=== EnableInput ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
EnableInput() -> ?
+
EnableInput()
 +
<br><br>
 +
'''Description:''' <br>
 +
 
 +
<br><br>
 +
'''Arguments:''' <br>
 +
none
 +
<br><br>
 +
'''Returns:''' <br>
 +
nothing
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">Game.EnableInput()</source>
 +
<br><br>
 +
 
 +
=== EndPlayback ===
 +
'''Definition:'''<br>
 +
EndPlayback() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 34: Line 51:
 
<br><br>
 
<br><br>
  
 +
=== GetClientBuildNumber ===
 +
'''Definition:'''<br>
 +
GetClientBuildNumber() -> ?
 +
<br><br>
 +
'''Description:''' <br>
  
 +
<br><br>
 +
'''Arguments:''' <br>
 +
?
 +
<br><br>
 +
'''Returns:''' <br>
 +
?
 +
<br><br>
 +
'''Example:'''
 +
<br><br>
  
=== GetCVar ===
+
=== GetClientVersion ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetCVar() -> ?
+
GetClientVersion() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 52: Line 83:
 
<br><br>
 
<br><br>
  
 
+
=== GetCommandForBind ===
 
+
=== GetClientBuildNumber ===
+
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetClientBuildNumber() -> ?
+
GetCommandForBind() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 70: Line 99:
 
<br><br>
 
<br><br>
  
 
+
=== GetCVar ===
 +
'''Definition:'''<br>
 +
GetCVar(string name) -> result<br>
 +
<br>
 +
'''Description:''' <br>
 +
Returns the value of a C variable(?)<br>
 +
I'm assuming that the term CVar refers to an ingame variable not directly accessible by Lua<br>
 +
<br>
 +
'''Arguments:''' <br>
 +
'''name''' name of the variable.<br>
 +
<br>
 +
'''Returns:''' <br>
 +
The value or nil
 +
<br>
 +
'''Example:'''
 +
<source lang="lua">
 +
print(Game.GetCVar("rRenderStationInMenu")) -- output: 1 or 0, ie. true/false
 +
if Game.GetCVar("autoaim") == 1 then print("autoaim is on") end
 +
print(Game.GetCVar("rHUDxscale")) -- output: 900
 +
if Game.GetCVar("filterchannelmsgs") ==  1 then print("Channel Messages are being filtered") end
 +
</source>
  
 
=== GetDesiredSpeed ===
 
=== GetDesiredSpeed ===
Line 87: Line 136:
 
'''Example:'''
 
'''Example:'''
 
<br><br>
 
<br><br>
 
 
  
 
=== GetFlightMode ===
 
=== GetFlightMode ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetFlightMode() -> ?
+
GetFlightMode() -> boolean
 +
<br><br>
 +
'''Description:''' Whether flight-assist mode is active
 +
<br><br>
 +
'''Arguments:''' <br>
 +
?
 +
<br><br>
 +
'''Returns:''' true if flight-assist mode is active, false otherwise
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
local a = Game.GetFlightMode()
 +
print tostring(a).." ("..type(a)..")" -- outputs: true (boolean)
 +
</source>
 +
<br><br>
 +
 
 +
=== GetMaxFramerate ===
 +
'''Definition:'''<br>
 +
GetMaxFramerate() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 105: Line 170:
 
'''Example:'''
 
'''Example:'''
 
<br><br>
 
<br><br>
 
 
  
 
=== GetNFZMode ===
 
=== GetNFZMode ===
Line 128: Line 191:
 
=== GetObjectAtScreenPos ===
 
=== GetObjectAtScreenPos ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetObjectAtScreenPos() -> ?
+
GetObjectAtScreenPos(float x, y) -> int [[nodeid]], [[objectid]]
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
 
+
Returns nodeid and objectid of a targetable object at specified screen coordinates
 
<br><br>
 
<br><br>
 
'''Arguments:''' <br>
 
'''Arguments:''' <br>
?
+
''x'',''y'' - screen coordinates, range from 0 to 1 where 0,0 is top left corner of screen and 1,1 is bottom right
 
<br><br>
 
<br><br>
 
'''Returns:''' <br>
 
'''Returns:''' <br>
?
+
[[nodeid]], [[objectid]] - ids, as used by radar functions
 
<br><br>
 
<br><br>
 
'''Example:'''
 
'''Example:'''
<br><br>
+
<br>
 
+
<source lang="lua">
 
+
radar.SetRadarSelection(Game.GetObjectAtPos(0.5, 0.5)) -- will target object directly in front (also stuff not normally targettable, like station parts)
 +
</source>
  
 +
=== GetScreenSize ===
 
=== GetTurretHealth ===
 
=== GetTurretHealth ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
Line 178: Line 243:
 
<br><br>
 
<br><br>
  
 +
=== IsInstalledFromMarket ===
 +
'''Definition:'''<br>
 +
IsInstalledFromMarket() -> ?
 +
<br><br>
 +
'''Description:''' <br>
  
 +
<br><br>
 +
'''Arguments:''' <br>
 +
?
 +
<br><br>
 +
'''Returns:''' <br>
 +
?
 +
<br><br>
 +
'''Example:'''
 +
<br><br>
  
=== Quit ===
+
=== IsMobiHandServiceInstalled ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
Quit() -> ?
+
IsMobiHandServiceInstalled() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 196: Line 275:
 
<br><br>
 
<br><br>
  
 +
=== OpenWebBrowser ===
 +
'''Definition:'''<br>
 +
OpenWebBrowser(string link) -> ?
 +
<br><br>
 +
'''Description:''' <br>
  
 +
<br><br>
 +
'''Arguments:''' <br>
 +
'''link''' link for the web browser
 +
?
 +
<br><br>
 +
'''Returns:''' <br>
 +
?
 +
<br><br>
 +
'''Example:'''
 +
<br><br>
  
=== SetCVar ===
+
=== PerformGoogleBilling ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
SetCVar() -> ?
+
PerformGoogleBilling() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 214: Line 308:
 
<br><br>
 
<br><br>
  
 +
=== PerformMobiBilling ===
 +
'''Definition:'''<br>
 +
PerformMobiBilling() -> ?
 +
<br><br>
 +
'''Description:''' <br>
  
 +
<br><br>
 +
'''Arguments:''' <br>
 +
?
 +
<br><br>
 +
'''Returns:''' <br>
 +
?
 +
<br><br>
 +
'''Example:'''
 +
<br><br>
 +
 +
 +
=== Quit ===
 +
'''Definition:'''<br>
 +
Quit()
 +
<br><br>
 +
'''Description:''' <br>
 +
 +
<br><br>
 +
'''Arguments:''' <br>
 +
none
 +
<br><br>
 +
'''Returns:''' <br>
 +
nothing
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">Game.Quit()</source>
 +
<br><br>
 +
 +
=== SetCVar ===
 +
'''Definition:'''<br>
 +
SetCVar(string name, string value) -> ?
 +
<br><br>
 +
'''Description:''' <br>
 +
 +
<br><br>
 +
'''Arguments:''' <br>
 +
 +
string name - name of existing cvar
 +
string value - value to set it to
 +
 +
<br><br>
 +
'''Returns:''' <br>
 +
 +
true - if the cvar is valid, false otherwise
 +
 +
<br><br>
 +
'''Example:'''
 +
 +
<source lang="lua">
 +
if(Game.SetCVar("fov", "95") == true) then print "fov set to 95" end
 +
</source>
 +
 +
<br><br>
  
 
=== SetDesiredSpeed ===
 
=== SetDesiredSpeed ===
Line 231: Line 383:
 
'''Example:'''
 
'''Example:'''
 
<br><br>
 
<br><br>
 
 
  
 
=== SetInputMode ===
 
=== SetInputMode ===
Line 254: Line 404:
 
=== SetJumpDest ===
 
=== SetJumpDest ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
SetJumpDest() -> ?
+
SetJumpDest([[sectorid]])
 +
<br><br>
 +
'''Description:''' <br>
 +
 
 +
<br><br>
 +
'''Arguments:''' <br>
 +
sectorid -- [[sectorid]] of jump destination.
 +
<br><br>
 +
'''Returns:''' <br>
 +
nothing
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">Game.SetJumpDest(2902)</source>
 +
<br><br>
 +
 
 +
=== SetMaxFramerate ===
 +
'''Definition:'''<br>
 +
SetMaxFramerate() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 267: Line 434:
 
'''Example:'''
 
'''Example:'''
 
<br><br>
 
<br><br>
 
  
  
 
=== StartLoginCinematic ===
 
=== StartLoginCinematic ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
StartLoginCinematic() -> ?
+
StartLoginCinematic()
 +
<br><br>
 +
'''Description:''' <br>
 +
 
 +
<br><br>
 +
'''Arguments:''' <br>
 +
none
 +
<br><br>
 +
'''Returns:''' <br>
 +
none
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">Game.StartLoginCinematic()</source>
 +
<br><br>
 +
 
 +
=== StartPlayback ===
 +
'''Definition:'''<br>
 +
StartPlayback() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 286: Line 469:
 
<br><br>
 
<br><br>
  
 +
=== StartRecording ===
 +
'''Definition:'''<br>
 +
StartRecording() -> ?
 +
<br><br>
 +
'''Description:''' <br>
  
 +
<br><br>
 +
'''Arguments:''' <br>
 +
?
 +
<br><br>
 +
'''Returns:''' <br>
 +
?
 +
<br><br>
 +
'''Example:'''
 +
<br><br>
  
 
=== StopLoginCinematic ===
 
=== StopLoginCinematic ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
StopLoginCinematic() -> ?
+
StopLoginCinematic()
 +
<br><br>
 +
'''Description:''' <br>
 +
 
 +
<br><br>
 +
'''Arguments:''' <br>
 +
none
 +
<br><br>
 +
'''Returns:''' <br>
 +
none
 +
<br><br>
 +
'''Example:'''<br>
 +
<source lang="lua">Game.StopLoginCinematic()</source>
 +
<br><br>
 +
 
 +
=== StopRecording ===
 +
'''Definition:'''<br>
 +
StopRecording() -> ?
 
<br><br>
 
<br><br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Line 303: Line 517:
 
'''Example:'''
 
'''Example:'''
 
<br><br>
 
<br><br>
 +
 +
[[Category:Tables]]

Latest revision as of 00:29, 2 August 2023

Functions

DisableInput

Definition:
DisableInput() -> ?

Description:



Arguments:
?

Returns:
?

Example:


EnableInput

Definition:
EnableInput()

Description:



Arguments:
none

Returns:
nothing

Example:

Game.EnableInput()



EndPlayback

Definition:
EndPlayback() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetClientBuildNumber

Definition:
GetClientBuildNumber() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetClientVersion

Definition:
GetClientVersion() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetCommandForBind

Definition:
GetCommandForBind() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetCVar

Definition:
GetCVar(string name) -> result

Description:
Returns the value of a C variable(?)
I'm assuming that the term CVar refers to an ingame variable not directly accessible by Lua

Arguments:
name name of the variable.

Returns:
The value or nil
Example:

print(Game.GetCVar("rRenderStationInMenu")) -- output: 1 or 0, ie. true/false
if Game.GetCVar("autoaim") == 1 then print("autoaim is on") end
print(Game.GetCVar("rHUDxscale")) -- output: 900
if Game.GetCVar("filterchannelmsgs") ==  1 then print("Channel Messages are being filtered") end

GetDesiredSpeed

Definition:
GetDesiredSpeed() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetFlightMode

Definition:
GetFlightMode() -> boolean

Description: Whether flight-assist mode is active

Arguments:
?

Returns: true if flight-assist mode is active, false otherwise

Example:

local a = Game.GetFlightMode()
print tostring(a).." ("..type(a)..")" -- outputs: true (boolean)



GetMaxFramerate

Definition:
GetMaxFramerate() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetNFZMode

Definition:
GetNFZMode() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetObjectAtScreenPos

Definition:
GetObjectAtScreenPos(float x, y) -> int nodeid, objectid

Description:
Returns nodeid and objectid of a targetable object at specified screen coordinates

Arguments:
x,y - screen coordinates, range from 0 to 1 where 0,0 is top left corner of screen and 1,1 is bottom right

Returns:
nodeid, objectid - ids, as used by radar functions

Example:

radar.SetRadarSelection(Game.GetObjectAtPos(0.5, 0.5)) -- will target object directly in front (also stuff not normally targettable, like station parts)

GetScreenSize

GetTurretHealth

Definition:
GetTurretHealth() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetTurretObjectID

Definition:
GetTurretObjectID() -> ?

Description:



Arguments:
?

Returns:
?

Example:

IsInstalledFromMarket

Definition:
IsInstalledFromMarket() -> ?

Description:



Arguments:
?

Returns:
?

Example:

IsMobiHandServiceInstalled

Definition:
IsMobiHandServiceInstalled() -> ?

Description:



Arguments:
?

Returns:
?

Example:

OpenWebBrowser

Definition:
OpenWebBrowser(string link) -> ?

Description:



Arguments:
link link for the web browser ?

Returns:
?

Example:

PerformGoogleBilling

Definition:
PerformGoogleBilling() -> ?

Description:



Arguments:
?

Returns:
?

Example:

PerformMobiBilling

Definition:
PerformMobiBilling() -> ?

Description:



Arguments:
?

Returns:
?

Example:


Quit

Definition:
Quit()

Description:



Arguments:
none

Returns:
nothing

Example:

Game.Quit()



SetCVar

Definition:
SetCVar(string name, string value) -> ?

Description:



Arguments:

string name - name of existing cvar string value - value to set it to



Returns:

true - if the cvar is valid, false otherwise



Example:

if(Game.SetCVar("fov", "95") == true) then print "fov set to 95" end



SetDesiredSpeed

Definition:
SetDesiredSpeed() -> ?

Description:



Arguments:
?

Returns:
?

Example:

SetInputMode

Definition:
SetInputMode() -> ?

Description:



Arguments:
?

Returns:
?

Example:


SetJumpDest

Definition:
SetJumpDest(sectorid)

Description:



Arguments:
sectorid -- sectorid of jump destination.

Returns:
nothing

Example:

Game.SetJumpDest(2902)



SetMaxFramerate

Definition:
SetMaxFramerate() -> ?

Description:



Arguments:
?

Returns:
?

Example:


StartLoginCinematic

Definition:
StartLoginCinematic()

Description:



Arguments:
none

Returns:
none

Example:

Game.StartLoginCinematic()



StartPlayback

Definition:
StartPlayback() -> ?

Description:



Arguments:
?

Returns:
?

Example:

StartRecording

Definition:
StartRecording() -> ?

Description:



Arguments:
?

Returns:
?

Example:

StopLoginCinematic

Definition:
StopLoginCinematic()

Description:



Arguments:
none

Returns:
none

Example:

Game.StopLoginCinematic()



StopRecording

Definition:
StopRecording() -> ?

Description:



Arguments:
?

Returns:
?

Example: