Function Index: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
No edit summary
Line 4,198: Line 4,198:
'''Example:'''
'''Example:'''
<br><br>
<br><br>
== Tables ==
=== Buddy ===
'''Description:'''<br>
conatins functions to manipulate the characters buddylist
'''Details:'''<br>
[[Buddy]]

Revision as of 20:16, 6 July 2007

Functions

AbortMission

Definition:
AbortMission() -> nil

Description:
Abort the currently running mission.

Arguments:

Returns:

Example:

Article

Definition:
Article(string word) -> string out

Description:
prepends the appropriate article to the string word

Arguments:
word string to prepend an article to.

Returns:
out the string with an article prepended.

Example:
Article("apple") -> "an apple"

CanUseAddon

Definition:
CanUseAddon(string itemid) -> bool ret1 {string l1 ..}

Description:
check if the player can equip the addon itemid

Arguments:
itemid itemid of addon to check

Returns:
ret1 true or false depending on equipability
l1 license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with the station)

Example:
CanUseAddon(12345) -> true {1, 2, 2, 2, 2}

CanUseMerchandise

Definition:

Description:

Arguments:

Returns:

Example:

CancelPurchaseShipLayout

Definition:

Description:

Arguments:

Returns:

Example:

ClearGeneralChatLog

Definition:

Description:
doesn't seem to do anything ...

Arguments:

Returns:

Example:

ClearLastShipLoadout

Definition:
ClearLastShipLoadout() -> nil

Description:
clear last shiploadout. prevents client from asking to rebuy ship after destruction

Arguments:

Returns:

Example:

ClearMissionChatLog

Definition:

Description:
does nothing..

Arguments:

Returns:

Example:

ClearProximityCache

Definition:

Description:
I guess it clears the proximity cache?

Arguments:

Returns:

Example:

ClearStationChatLog

Definition:

Description:
does nothing...

Arguments:

Returns:

Example:

ConfigureMultipleWeaponGroups

Definition: ConfigureMultipleWeaponGroups{table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}

Description:
configures weapon groups according to given tables

Arguments:
group*key* each table seems to represent one group key to which a group of ports can be assigned. Members of the tables contain boolean values where each index represents a port. the first index seems to switch the whole group on or off depending on its value. that kind of works for the first table at least ..

Returns:

Example: ConfigureMultipleWeaponGroups


ConfigureWeaponGroup

Definition:

Description:

Arguments:

Returns:

Example:


ConnectAddon

Definition:
ConnectAddon(int portid, int itemid) -> bool canconnect

Description:
Attaches the addon itemid to the active ship in port portid

Arguments:
portid portid of the the port
1 = battery
2-n = s-ports
n+1-m = l-ports
itemid itemid of the addon

Returns:
canconnect returns true if the player is docked and has an active ship otherwise nil

Example:
ConnectAddon(2, 123) -> true
put the addon 123 into port 2 while the player is docked to a station


CreateCharacter

Definition:
CreateCharacter(int name, int nation) -> nil

Description:
Creates the character of the given nation

Arguments:
name name of character
nation nation of character

Returns:

Example:

DeleteCharacter

Definition:
DeleteCharacter(int slot) -> nil

Description:
Deletes the character in the character slot slot

Arguments:
slot which character to delete

Returns:

Example:


DisableProximityWarning

Definition:
DisableProximityWarning() -> nil

Description:
disable the proximity warning ...

Arguments:

Returns:

Example:

DisconnectAddon

Definition:
DisconnectAddon(int itemid) -> bool ret1

Description:
detaches the addon itemid and stores it in the station
Note: detached items will likely have a different itemid in the station

Arguments:
itemid id of the item to detach

Returns:
ret1 returns true if the player is docked and has an active ship otherwise nil

Example:
DisconnectAddon(123) -> true remove the item 123 from the active ship while the player is docked to a station


DisconnectAllAddons

Definition: DisconnectAllAddons() -> nil

Description:
Detach all addons from the active ship and store them in the current station

Arguments:

Returns:

Example:


EnableProximityWarning

Definition:
DisableProximityWarning() -> nil

Description:
enable the proximity warning ...

Arguments:

Returns:

Example:


FindAndReplaceTags

Definition:
FindAndReplaceTags(string text, table matches) -> string ret1

Description:
Replaces all occurances of with < and > enclosed substrings in text with matching values from the provided table

Arguments:
test string to replace tags in
matches table with tags/replacement pairs

Returns:
ret1: converted text

Example:
FindAndReplaceTags("hi this is a <br> linebreak", {br="\n"})
-> "hi this is a
linebreak"


FindAndReplaceTagsCB

Definition:

Description:

Arguments:

Returns:

Example:


FindMissionByID

Definition:

Description:

Arguments:

Returns:

Example:


ForEachBuddy

Definition:
ForEachBuddy(function func(string name, bool isonline, int pos)) -> nil

Description:
calls func with the name, if the player is online for each of your buddies as well as his position if the player is currently online

Arguments:
func gets called for each buddy
name name of the buddy
isonline true if the player is online else false
pos id of sector in which the player is located

Returns:

Example:
ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)
prints a list with your buddies and their status

ForEachPlayer

Definition:
ForEachPlayer(function func(int charid)) -> nil

Description:
calls func with the character id of each player in the sector. that includes bots and the sector thingy itself

This function is called by the toplist when you open it.

Arguments:
func gets called for each buddy
ncharid character id


Returns:

Example:
ForEachPlayer(function (id) print(id) end)
prints a list with all players in the sector

GetAccomplishmentLevels

Definition:
GetAccomplishmentLevels(int accomid) -> int curlevel int reqlevel

Description:
returns the current and the required level for the selected accomplishment

Arguments:
accomid id of the accomplishment

Returns:
curlevel current level of the accomplishment
reqlevel what is required to get the accomplishment


Example: GetAccomplishmentLevels(9) -> 34 50
assuming 9 is busskills this player has 34 kills of the 500 required


GetAccomplishmentType

Definition:
GetAccomplishmentType(int accomid) -> int ret1 int ret2

Description:
returns some numbers..

Arguments:
accomid id of the accomplishment

Returns:
ret1 same as accomid?
ret2 some number. possibly if it's of the combat/economic class


Example:


GetActiveChatChannel

Definition:
GetActiveChatChannel() -> int channel

Description:
returns the active channel

Arguments:

Returns:
channel active chat channel

Example: GetActiveChatChannel() -> 1
you are currently in channel 1

GetActiveMissionInfo

Definition:
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid

Description:
Get information about the selcted active mission

Arguments:
num index of active mission (always 1)

Returns:
mname string containing name of active mission
mmsg array where each index contains a mission log entry + optional interface elements and their properties
itemid itemid of the mission

Example: GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234
The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234


GetActiveShipCargoCount

Definition:
GetActiveChatChannel() -> int cargocount

Description:
returns amount of cargo in the ship

Arguments:

Returns:
cargocount amount of cargo in the ship

Example:

GetActiveShipEnergy

Definition:
GetActiveShipEnergy() -> float eng fraction

Description:
returns the energy level of the active ship

Arguments:

Returns:
eng energy level in game units 0-<battery capacacity> fraction energy level as float from 0.0-1.0

Example: GetActiveShipEnergy() -> 150.0 0.5
the battery of this ship is half empty and has a capacity of 300


GetActiveShipHealth

Definition:
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max

Description:
returns information about the active ships health

Arguments:

Returns:
d? damage to subsection 0 = no damage dmg accumulated damage of subsections max max health of ship

Example: GetActiveShipHealth() -> 500 10 10 0 0 0 520 10000
ship has 500 damagei n frontal region 520 dmg overall and a max health of 10000


GetActiveShipID

Definition:
GetActiveShipID() -> int itemid

Description:
returns itemid of active ship

Arguments:

Returns:
itemid item id of active ship

Example:


GetActiveShipItemIDAtPort

Definition:
GetActiveShipItemIDAtPort(int portid) -> int itemid

Description:
returns itemid of addon in selected port

Arguments:
portid id of port

Returns:
itemid itemid of addon in port

Example: GetActiveChatChannel(1) -> 1234
addon in port 1 has itemid 1234


GetActiveShipMass

Definition:
GetActiveShipMass() -> int mass

Description:
returns mass of active ship

Arguments:

Returns:
mass mass of active ship

Example: GetActiveShipMAss() -> 15.0000
ship weights 15000kg


GetActiveShipMaxCargo

Definition:
GetActiveShipMaxCargo() -> int cargo

Description:
returns amount of cargo space of the active ship in cu

Arguments:

Returns:
cargo cargospace

Example:


GetActiveShipMaxSpeed

Definition:
GetActiveShipMaxSpeed() -> int speed

Description:
returns max nonturbo speed of active ship

Arguments:

Returns:
speed ...

Example:


GetActiveShipName

Definition:
GetActiveShipName() -> string name

Description:
returns a string with the active ships name

Arguments:

Returns:
name ...

Example:


GetActiveShipNumAddonPorts

Definition:
GetActiveShipNumAddonPorts() -> int ports

Description:
returns number of ports in active ship

Arguments:

Returns:
ports number of ports, including engine and battery

Example: GetActiveShipNumAddonPorts() -> 4 this ship has 3 ports


GetActiveShipPortIDOfItem

Definition:
GetActiveShipPortIDOfItem(int itemid) -> int portid

Description:
returns port if of the given addon in active ship

Arguments:
itemid itemid of an addon

Returns:
portid portid of selected addon

Example:

GetActiveShipPortInfo

Definition:
GetActiveShipPortInfo(int portid) -> table portinfo

Description:
returns information about the given port

Arguments:
portid a port of the active ship

Returns:
portinfo table with port info
fields include:
type: int holding the type of port
name string describing port
position: vector with port position on ship
orientation: quaternion holding orientation of port


Example: GetActiveShipPortInfo(1) -> {type=4 name="PowerCell" position=(0, 0, 0) orientation=(0.000 0.000 0.000 1.000)} portinfo of a ragnaroks battery port


GetActiveShipSelectedWeaponGroupIDs

Definition:
GetActiveShipSelectedWeaponGroupIDs() -> int id1 id2 id3

Description:
returns ids of the selected weapon groups ...

Arguments:

Returns:
id? id's of weapon groups. Probably mapping to those key buttons.

Example: GetActiveShipSelectedWeaponGroupIDs() -> 0 6 12 default mapping

GetActiveShipSpeed

Definition:
GetActiveShipSpeed() -> int speed

Description:
returns current speed of active ship

Arguments:

Returns:
speed ...

Example:

GetActiveShipWeaponGroup

Definition:
GetActiveShipWeaponGroup(int id) -> table group

Description:
return which ports are enabled in the provided group

Arguments:
id id of weapon group correspondents to group key[0-5] + (trigger group[0-2] * 6)

Returns:
port table where the indexes are the port ids and values bools that are true when the port is active

Example:
GetActiveShipWeaponGroup(6) -> {2=true 3=true} 6 -> 6 % 6 = 1 R 0 thus 6 represents first group key and and second trigger group. port 2 and 3 are active for example this could be the 2 s ports on a vult


GetAddonItemInfo

Definition:
GetAddonItemInfo(int itemid) -> int ret1 ret2

Description:
returns some numbers ..

Arguments:
itemid itemid of an addon(?)

Returns:
ret? -1 if a valid itemid is passed to it(?)

Example:


GetAvailableMissionInfo

Definition:
GetAvailableMissionInfo(int midx) -> {int itemtype, string name, bool active, string icon, string desc}

Description:
Returns information about the mission with the provided index

Arguments:
midx index of mission in missionlist

Returns:
itemtype no idea
name name of mission
active is this mission active
icon path to icon
desc mission description

Example:


GetBarPatrons

Definition:
GetBarPatrons() -> {[charid1], [charid2]...}

Description:
get people in the current station bar

Arguments:

Returns:
charid? index of returned table are charids of characters in the bar

Example:


GetBuddyInfo

Definition:
GetBuddyInfo() -> ???

Description:
not figured out yet

Arguments:

Returns:

Example:


GetCharacterDescription

Definition:
GetCharacterDescription() -> string desc

Description:
Get the character description for your and possibly other chars. It just returns an empty string when an argument is passed to it, which suggests that it accepts one or more unknown arguments.

Arguments:
???

Returns:
desc your character description text whne no argument is provided

Example:


GetCharacterID

Definition:
GetCharacterID(int nodeid) -> int charid

Description:
returns character id of the provided node id

Arguments:
nodeid node id of one of the characters in the sector

Returns:
charid character id of the given node if a valid nodeid is valid otherwise the players charid

Example:


GetCharacterIDByName

Definition:
GetCharacterIDByName(string name) -> int charid

Description:
get character id by name

Arguments:
name name of a character

Returns:
charid a character id or nil

Example:


GetCharacterInfo

Definition:
GetCharacterInfo(int cslot) -> string name faction int money kills deaths loc home cl ll hl tl ml

Description:
Get information about your characters

Arguments:
cslot a character slot (1-6)

Returns:
name
faction
money
kills all kills
deaths
loc sector id of current location
home sector id of characters homestation
cl combat level
ll light weapon level
hl heavy weapon level
tl trade level
ml mining level

Example:
GetCharacterInfo(1) -> "Dude" "Corvus" 10000 10 100 4444 4444 1 1 1 0 0
This players first character is called "Dude" is of the "Corvus" faction has 10000c killed 10 things died 100 times is in sector 4444, homed in 4444 and has level 1/1/1/0/0


GetCharacterKillDeaths

Definition:
GetCharacterKillDeaths(int charid) -> int kills deaths pks

Description:
get info about kills and deaths. returns your own info if no charid given or a lua error if an invalid one ...

Arguments:
charid character id or nil

Returns:
kills total kills deaths total deaths pks player kills

Example:


GetCurrentChatTab

Definition:

Description:
no idea maybe unused. always returns 2 here

Arguments:

Returns:

Example:

GetCurrentSectorid

Definition: GetCurrentSectorid() -> int sectorid

Description:
get current sector id

Arguments:

Returns:
sectorid id of current sector

Example:

GetCurrentStationType

Definition: GetCurrentStationType() -> int type

Description:
return the current station type..

Arguments:

Returns:
type current station type. seems be usually 0 except when docked to a capship then 1

Example:

GetCurrentSystemid

Definition: GetCurrentSystemid() -> int systemid

Description:
get current system id..

Arguments:

Returns:
systemid id of current system

Example:

GetEULA

Definition: GetEULA() -> string eula

Description:
return eula

Arguments:

Returns:
eula string containing the eula

Example:

GetFactionInfo

Definition: GetFactionInfo(int faction) -> string info

Description:
get faction info text for the provided faction

Arguments:
faction id of a faction

Returns:
info string containing faction info

Example:

GetFinishedMissionInfo

Definition: GetFinishedMissionInfo() -> string name table msg int itemid

Description:
see GetActiveMissionInfo

Arguments:

Returns:

Example:


GetFullPath

Definition:

Description:
sounds obvious but it isn't

Arguments:

Returns:

Example:


GetGeneralChatLog

Definition: GetGeneralChatLog() -> string log

Description:
returns the chatlog

Arguments:

Returns:
log stirng containing chatlog

Example:


GetGroupMemberID

Definition: GetGroupMemberID(int index) -> int charid

Description:
get charid of group member with given index

Arguments:
index group member index (1-8)

Returns:
charid character id

Example:


GetGroupMemberLocation

Definition: GetGroupMemberLocation(int charid) -> int loc

Description:
get location of a groupmember

Arguments:
charid character ids of a groupmember

Returns:
loc sectorid of groupmember or 0 for yourself

Example:


GetGroupOwnerID

Definition: GetGroupOwnerID() -> int charid

Description:
get charid of group owner

Arguments:

Returns:
charid character id

Example:



GetGuildAcronym

Definition:
GetGuildAcronym() -> string acronym

Description:
get your guilds acronym

Arguments:

Returns:
acronym string containing guild acronym

Example:


GetGuildMOTD

Definition:
GetGuildMOTD() -> string motd

Description:
get your guilds message of the day

Arguments:

Returns:
motd string containing the motd

Example:


GetGuildMemberInfo

Definition: GetGuildMemberInfo(int index) -> int charid ret1 string name

Description:
get information about the guildmember of the given index

Arguments:
index index of online guildmembers 1-n

Returns:
charid character id ret1 maybe the rank? name name of member

Example:


GetGuildMemberInfobyCharID

Definition: GetGuildMemberInfoByCharID(int charid) -> int charid ret1 string name

Description:
get information about the guildmember of the given index

Arguments:
charid charid of online guildmember

Returns:
charid character id ret1 maybe the rank? name name of member

Example:



GetGuildName

Definition: GetGuildName() -> string name

Description:
get guild name

Arguments:

Returns:
name string containing guild name

Example:


GetGuildTag

Definition: GetGuildTag(int charid) -> sring tag

Description:
get guild tag of another character. not 100% sure about this

Arguments:
charid character id(?)

Returns:
tag string containing guild tag or empty string if character not known

Example:


GetHomeStation

Definition: GetHomeStation() -> int sectorid

Description:
get sector id of home station

Arguments:

Returns:
sectorid sectorid of home station

Example:


GetInventoryItemClassSubType

Definition: GetInventoryItemClassSubType(int itemid) -> int subtype

Description:
get subclass of an item

Arguments:
itemid inventory item

Returns:
subtype sub type of item
known types:
0 = light weapon or ship
1 = heavy weapon
3 = engine
4 = battery
10 = trade goods

Example:


GetInventoryItemClassType

Definition: GetInventoryItemClassType(int itemid) -> int type

Description:
get class of an item

Arguments:
itemid inventory item

Returns:
type type of item
known types:
0 = trade goods
1 = ship
3 = addon

Example:


GetInventoryItemContainerID

Definition: GetInventoryItemContainerID(int itemid) -> int container

Description:
get container of item

Arguments:
itemid inventory item

Returns:
container itemid of container of or null if it's not in one (a ship)

Example:


GetInventoryItemExtendedDesc

Definition: GetInventoryItemExtendedDesc(int itemid) -> string desc

Description:
get description of item

Arguments:
itemid inventory item

Returns:
desc item description text.

Example:


GetInventoryItemIcon

Definition: GetInventoryItemIcon(int itemid) -> string path

Description:
get path to icon of inventory item

Arguments:
itemid inventory item

Returns:
path path to icon

Example:


GetInventoryItemInfo

Definition: GetInventoryItemInfo(int itemid) -> string ipath name int quant float mass string sdesc desc1 desc2 int container class subtype

Description:
get most info about inventory item

Arguments:
itemid inventory item

Returns:
ipath icon path
name name or item
quant amount of items
mass per item mass as float in tons
sdesc short description
desc1 long description
desc2 long description again, sometimes omitted don't know what's the difference
container itemid of container this item is in
class type of item (see GetInventoryItemClassType)
subtype subtype of item (see GetInventoryItemClassSubType)

Example:


GetInventoryItemMass

Definition: GetInventoryItemMass(int itemid) -> float mass

Description:
get mass of inventory item

Arguments:
itemid inventory item

Returns:
path mass of item as float in tons

Example:
GetInventoryItemMass(1234) -> 4.000
the mass of item 1234 is 4000kg


GetInventoryItemName

Definition: GetInventoryItemName(int itemid) -> string name

Description:
get name of inventory item

Arguments:
itemid inventory item

Returns:
name name

Example:


GetInventoryItemQuantity

Definition: GetInventoryItemQuantity(int itemid) -> int quant

Description:
get quantity of inventory item..

Arguments:
itemid inventory item

Returns:
quant quantity

Example:


GetInventoryItemType

Definition: GetInventoryItemType(int itemid) -> int type

Description:
get item type

Arguments:
itemid inventory item

Returns:
type type

Example:


GetLastAggressor

Definition: GetLastAggressor(int itemid) -> int nodeid ret1

Description:
get node id of last aggressor and some number

Arguments:

Returns:
nodeid node id of last aggressor ret1 no clue

Example:


GetLastPrivateSpeaker

Definition: GetLastPrivateSpeaker(int itemid) -> string name

Description:
get name of last character that pmed you

Arguments:

Returns:
name last messager

Example:


GetLastShipLoadout

Definition: GetLastShipLoadout() -> {groups = {1 = group1 .. 18 = group18}, int ship, ports= {1 = port1 ..}, int shipcolor}

Description:
get last ship loadout, color and weapon groups. this function only works in space

Arguments:

Returns:
groups table containing the weapon group setup group? group information. array indices correspondent to ports, is the value of an index set to true the port is enabled ship type of ship ports array indices correspondent to ports, value of index is the type of addon shipcolor ship color 1-255(?)

Example:


GetLastShipLoadoutPurchaseCost

Definition: GetLastShipLoadoutPurchaseCost() -> int cost

Description:
what you payed for your last ship(?)

Arguments:

Returns:
cost

Example:

GetLicenseLevel

Definition: GetLicenseLevel(int type) -> int level

Description:
get the level of the provided license

Arguments:<be> type type of license (1-5)

Returns:
level license level or 0 if invalid type given

Example:


GetLicenseRequirement

Definition: GetLicenseRequirement(int level) -> int xp

Description:
get xp required for given level

Arguments:<be> level license level

Returns:
xp

Example:


GetMaxRadarDistance

Definition: GetMaxRadarDistance() -> int dist

Description:
get current(?) max radar range

Arguments:

Returns:
dist max radar range

Example:


GetMinJumpDistance

Definition: GetMinJumpDistance() -> int dist

Description:
get minimum distance from large objects to jump

Arguments:

Returns:
dist min jump distance

Example:


GetMissionChatLog

Definition: GetMissionChatLog() -> {bool updated, string 1.. }

Description:
get advancement log

Arguments:

Returns:
1-n advancement log updated no clue

Example:


GetMissionTimers

Definition: GetMissionTimers() -> int time

Description:
get time left on the current mission. may have some functionality for multiple missions

Arguments:

Returns:
time time left on this timer in 1000th seconds

Example:


GetMoney

Definition: GetMoney() -> int money

Description:
get how many credits you own

Arguments:

Returns:
money

Example:


GetNationKills

Definition: GetNationKills(int nation) -> int kills

Description:
get number of player kills for the given nation

Arguments:
nation id of nation (1-3)

Returns:
kills number of player kills or 0 if invalid nation

Example:

GetNewsHeadline

Definition: GetNewsHeadline(int index) -> string title int time ret1

Description:
get headline, post time and some number

Arguments:
index index of headline newest is 1

Returns:
title the headline time post date in unix time ret1 no clue, always 1

Example:

GetNumAccomplishments

Definition: GetNumAccomplishments(int charid) -> int accomplishments

Description:
get number of accomplishmeants for given character(?). not well tested, may require caching of the char info

Arguments:
charid character id (?)

Returns:
accomplishments number of accomplishments

Example:


GetNumAvailableMissions

Definition: GetNumAvailableMissions() -> int missions

Description:
get number of available missions

Arguments:

Returns:
missions

Example:


GetNumCharacters

Definition: GetNumCharacters() -> int chars

Description:
get number of characters you have defined

Arguments:

Returns:
chars

Example:


GetNumCompletedMissions

Definition: GetNumCompletedMissions() -> int missions

Description:
get number of missions you'Ve completed

Arguments:

Returns:
missions

Example:


GetNumGroupMembers

Definition: GetNumCharacters() -> int chars

Description:
get number of characters in your group

Arguments:

Returns:
chars number of characters in your group or 0 if player is not in group

Example:

GetNumGuildMembers

Definition: GetNumGuidMembers() -> int chars

Description:
get number of online guildmembers

Arguments:

Returns:
chars number of guildmembers currently online or 0 if player is not in a guild

Example:


GetNumNewsHeadlines

Definition: GetNumNewsHeadlines() -> int num

Description:
get number of news headlines..

Arguments:

Returns:
num

Example:


GetNumStationAmmo

Definition: GetNumStationAmmo() -> int ret1

Description:
returns a number

Arguments:

Returns:
ret1 ??

Example:


GetNumStationDesiredItems

Definition: GetNumStationAmmo() -> int num

Description:
get number of items this station desires

Arguments:

Returns:
num

Example:

GetNumStationMerch

Definition: GetNumStationMerch() -> int num

Description:
get number of addons, ships an cargo this station sells

Arguments:

Returns:
num

Example:


GetNumStationSellableInventory

Definition: GetNumStationSellableInventory() -> int num

Description:
get number of items from your inventory that can be sold at this station

Arguments:

Returns:
num

Example:

GetNumStationTurrets

Definition: GetNumStationTurrets() -> int num

Description:
get number of turrets on this station or ship

Arguments:

Returns:
num number of turrets attached to this station or ship. 0 if not docked

Example:


GetNumTips

Definition: GetNumTips() -> int num

Description:
get size of load screen tips pool

Arguments:

Returns:
num

Example:


GetParentHealth

Definition: GetParentHealth() -> float ret1 ret2

Description:
get health of object this one is attached to (turret to capship). untested!

Arguments:

Returns:
ret1 health in percent(?) ret2 health as float (1-0)(?)

Example:


GetPlayerDistance

Definition: GetPlayerDistance(int charid) -> float distance

Description:
get distance to another character

Arguments:
charid character id of another character in this sector

Returns:
distance distance to character in m

Example:


GetPlayerFaction

Definition: GetPlayerFaction(int charid) -> int factionid

Description:
get nation of a player

Arguments:
charid character id or nil

Returns:
factionid number representing the faction (1-9)(?)

Example:

GetPlayerFactionStanding

Definition: GetPlayerFactionStanding(int factionid) -> int standing

Description:
get your standing with provided faction

Arguments:
factionid number representing a faction

Returns:
standing number representing faction standing 0-65535

Example:


GetPlayerHealth

Definition: GetPlayerHealth(int charid) -> float health

Description:
get health of provided character

Arguments:
charid character id

Returns:
health health of character in percent

Example:


GetPlayerHealth

Definition: GetPlayerHealth(int charid) -> float health

Description:
get health of provided character

Arguments:
charid character id

Returns:
health health of character in percent or -1 if character is not in the current sector

Example:


GetPlayerName

Definition: GetPlayerName(int charid) -> string name

Description:
get name of character

Arguments:
charid character id

Returns:
name

Example:


GetPrimaryShipIDOfPlayer

Definition: GetPrimaryShipIDOfPlayer(int charid) -> int shipid

Description:
get shipid of a character (= objectid?)

Arguments:
charid character id

Returns:
shipid

Example:


GetPrimaryShipNameOfPlayer

Definition: GetPrimaryShipNameOfPlayer(int charid) -> string name

Description:
get ship name (type) of provided character

Arguments:
charid character id

Returns:
name

Example:


GetProximityWarningDistance

Definition: GetProximityWarningDistance() -> int dist

Description:
get proxy warnign distance
Note: even returns the distance when proxy warning is disabled

Arguments:

Returns:
dist proxy distance.

Example:


GetShipCargoCount

Definition: GetShipCargoCount(int itemid) -> int num

Description:
get amount of cargo in the ship

Arguments:
itemid item id of a ship

Returns:
num amount of argo in ship in cu

Example:


GetShipInventory

Definition: GetShipInventory(int itemid) -> {cargo = {int cargoitemid ..}, addons = {int addonitemid ..}}

Description:
get itemids of items attached to a ship

Arguments:
itemid item id of a ship

Returns:
cargo array with cargo items
addons array with addons
cargoitemid itemids of cargo items addonitemid itemids of addons

Example:


GetShipList

Definition: GetShipList() -> {int itemid ..}

Description:
get list of your ships in the current station. produces error when called outside station..

Arguments:

Returns:
itemid itemid of a ship

Example:


GetShipPortIDOfItem

Definition: GetShipPortIDOfItem(int itemid1, int itemid2) -> int portid

Description:
get port of weapon in one of your ships

Arguments:
itemid1 itemid of one of your ships itemid2 itemid of a weapon or nil

Returns:
portid port of a wweapon or first free port if itemid2 is nil

Example:

GetShipPurchaseColor

Definition: GetShipPurchaseColor() -> int color

Description:
get selected color from the color picker

Arguments:

Returns:
colorid number representing color (0-255)

Example:


GetSkillLevel

Definition: GetSkillLevel(int licenseid) -> int current next

Description:
get current and required xp for next level or provided skill

Arguments:
licenseid type of license (1-5)

Returns:
current current xp next xp required for next level

Example:


GetStationAmmoInfo

Definition: GetStationAmmoInfo(int index) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, bool locallyproduced, int itemid, string icon}

Description:
get info about ammo based weapons by station inventory index (i think)

Arguments:
index index of ammo based weapons in the station, includes weapons on ships

Returns:

Example:


GetStationAmmoInfoByID

Definition: GetStationAmmoByID(int itemid) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, bool locallyproduced, int itemid, string icon}

Description:
get info about ammo based weapons in the station by item id

Arguments:
itemid itemid

Returns:

Example:


GetStationCargoList

Definition: GetStationCargoList() -> {int itemid ..}

Description:
get list of cargo items in the current station. produces error when called outside station..

Arguments:

Returns:
itemid itemid of a trade item

Example:


GetStationChatLog

Definition: GetStationChatLog() -> {string msg ..}

Description:
get messages in the station chat

Arguments:

Returns:
msg chat message

Example:


GetStationDesiredItem

Definition: GetStationDesiredItem(int index) -> string ditem

Description:
get item that this station desires ...

Arguments:
index index in list of strings

Returns:
ditems desired item

Example:


GetStationFaction

Definition: GetStationFaction() -> int factionid

Description:
get faction of current station. if an argument is supplied it returns 0 which may suggest that the faction of other stations can be queried too

Arguments:

Returns:
factionid daction of current station

Example:

GetStationLocation

Definition: GetStationLocation() -> int ret1

Description:
returns a number!

Arguments:

Returns:
ret1

Example:

GetStationMerchInfo

Definition: GetStationMerchInfo(int merchid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }

Description:
get info about items this station sells

Arguments:
merchid id of sold items (1-n)

Returns:


Example:


GetStationMerchInfoByID

Definition: GetStationMerchInfoByID(int itemid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }

Description:
get info about items this station sells by itemid

Arguments:
itemid itemid of sold items

Returns:


Example:



GetStationMerchPriceByID

Definition: GetStationMerchInfoByID(int itemid) -> int price

Description:
get price of an item this station sells

Arguments:
itemid itemid of sold items

Returns:
price price of an item or 0 if this item isn't sold

Example:


GetStationSellableInventoryInfo

Definition: GetStationSellableInventoryInfo() -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, string name, bool locallyproduced, neededlevels = {string l1 .. l5}, int itemid, string icon }

Description:
get info about sellable inventory by index 1-n

Arguments:

Returns:

Example:


GetStationSellableInventoryInfoByID

Definition: GetStationSellableInventoryInfoByID() -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, string name, bool locallyproduced, neededlevels = {string l1 .. l5}, int itemid, string icon }

Description:
get sellable inventory info by id ...

Arguments:

Returns:

Example:


GetStationShipList

Definition: GetStationShipList(int itemid) -> {int itemid1 ..}

Description:
get array of your ships in the current station

Arguments:

Returns:
itemid? itemid of ship in the current station

Example:


GetStationTurretInfo

Definition: GetStationTurretInfo(int turretid) -> {int objectid, int nodeid, float armorpercent, int itemid}

Description:
get information about a stations or ships turrets

Arguments:
turretid' id of a turret

Returns:
objectid
nodeid
armorpercent armor level
itemid

Example:


GetStationType

Definition: GetStationType() -> string stype

Description:
get station type

Arguments:

Returns:
stype station type. returns "frigate" when docked to a cruiser otherwise nil

Example:


GetStorageItemInfo

Definition: GetStorageItemInfo() -> ??

Description:
no clue. can't make it return anything

Arguments:

Returns:

Example:


GetStorageLocationSector

Definition: GetStorageLocationSector(int arg1) -> int ret1

Description:
returns some number when fed with an itemid

Arguments:

Returns:

Example:

GetSurveyChoices

Definition: GetSurveyChoices() -> {}

Description:
returns an empty table!

Arguments:

Returns:

Example:


GetSurveyChoices

Definition: GetSurveyChoices() -> {}

Description:
returns an empty table!

Arguments:

Returns:

Example:


GetSurveyQuestion

Definition: GetSurveyQuestion() -> string ret1

Description:
returns an empty string!

Arguments:

Returns:
ret1 an empty string!

Example:


GetTargetDistance

Definition: GetTargetDistance() -> float dist

Description:
get distance to target

Arguments:

Returns:
dist distance to target in m

Example:


GetTargetFriendlyStatus

Definition: GetTargetFriendlyStatus() -> int fstatus

Description:
get friendlyness of target

Arguments:

Returns:
fstatus Returns 0 to 3. Target is friendly if 3, unfriendly otherwise

Example:

GetTargetInfo

Definition: GetTargetInfo() -> string name float health dist int factionid string guild ship

Description:
get info about target

Arguments:

Returns:
name
health health in percent
dist distance in m
factionid faction of target
guild guild tag of target
ship name of targets ship

Example:

GetTip

Definition: GetTip(int tipid) -> string tip

Description:
get loading screen with given index

Arguments:
tipid tip id (1-n)

Returns:
tip loading screen tip

Example:

GetTurretNameByStationType

Definition: GetTurretNameByStationType(string stype) -> {string tur1 ..}

Description:
get turret name of provided station type

Arguments:
stype station type

Returns:
tur1 turret name (2-n)(?)

Example:
GetTurretNameByStationType("frigate") -> {2 = "LeftAft", 3 = "Left Front", 4 = "Left Lower Fin" ..}


GetTutorialLevel

Definition: GetTutorialLevel() -> int num

Description:
return if the player has done the tutorial(?)

Arguments:

Returns:
num 0 if tutorial wasn'T done -1 if it was, I think ...

Example:


GiveMoney

Definition: GiveMoney(string char, int amount) -> nil

Description:
transfer money to a character

Arguments:
char name of a character within the sector amount amount of money to transfer

Returns:

Example:


HasActiveShip

Definition: HasActiveShip() -> bool aship

Description:
return true if the player has an active ship

Arguments:

Returns:
aship true if the player has an activer ship otherwise false

Example:

HasLastShipLoadout

Definition: HasLastShipLoadout() -> bool loadout

Description:
return true if the player has a last ship loadout saved. (see ClearLastShipLoadout)

Arguments:

Returns:
loadout true if the player has a last shiploadout saved otherwise false

Example:

IsConnected

Definition: IsConnected() -> bool connected

Description:
return true if the player is connected to the game

Arguments:

Returns:
connected true if the player is connected otherwise false

Example:

IsEnemy

Definition: IsEnemy(charid) -> bool enemy

Description:
Part of the base radar functionality. Used in conjunction with GetFriendlyStatus.

Arguments:

Returns:
enemy returns true if someone is an enemy, otherwise false. Totally unreliable.

Example:

IsGroupMember

Definition: IsGroupMember(int charid) -> bool grmember

Description:
tell if the provided character is a group member

Arguments:
charid character id

Returns:
grmember true if character is a groupmember false if not or you aren't member of a group

Example:


IsGuildMember

Definition: IsGuildMember(int charid) -> bool gumember

Description:
tell if the provided character is a guild member

Arguments:
charid character id

Returns:
gumember true if character is a guildmember false if not or you aren't member of a guild

Example:


IsInDuel

Definition: IsInDuel(charid) -> bool

Description:
Returns true if charid is in a duel, otherwise false.

Arguments:

Returns:

Example:

IsPlayerRequestingBuddy

Definition: IsPlayerRequestingBuddy(?) -> ?

Description:
not tried. sounds obvious though

Arguments:

Returns:

Example:

IsPlayerRequestingDuel

Definition: IsPlayerRequestingDuel(?) -> ?

Description:
not tried. sounds obvious though

Arguments:

Returns:

Example:


IsPlayerRequestingGroupInvite

Definition: IsPlayerRequestingGroupInvite(?) -> ?

Description:
not tried. sounds obvious though

Arguments:

Returns:

Example:


IsProximityWarningEnabled

Definition: IsProximityWarningEnabled() -> bool isproxy

Description:
tell if proximity warning is enabled

Arguments:

Returns:
isproxy true if proximity warning is enabled otherwise false

Example:



IsStormPresent

Definition: IsStormPresent() -> bool isstorm

Description:
tell if there's a storm in the current sector

Arguments:

Returns:
isstorm true if storm is present otherwise false

Example:


JettisonAll

Definition: JettisonAll() -> nil

Description:
Jettison all of your ships cargo

Arguments:

Returns:

Example:


JettisonMultiple

Definition: JettisonMultiple{item1 = {int id, int quantity} ..} -> nil

Description:
Jettison cargo items and quantitiss according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo to jettison id itemid of cargo item quantity amount of this cargo to jettison

Returns:

Example:
JettisonMultiple{{id=1234, quantity=2}, {id=1235, quantity=3}}
jettison 2 untis of the cargo with the itemid 1234 and 3 with the id 1235



JettisonSingle

Definition: JettisonSingle(int itemid, int quantity) -> nil

Description:
Jettison provided type and amount of cargo

Arguments:
itemid itemid of cargo item quantity amount of cargo to jettison

Returns:

Example:
JettisonMultiple(1234, 2)
jettison 2 units of the cargo with the itemid 1234


JoinChannel

Definition: JoinChannel{channelid1 ..} -> nil

Description:
join the provided channels without leaving existing channels

Arguments:
channelid1 channel number (1 - 2^32) the last index is the active channel

Returns:

Example:


LeaveChannel

Definition: LeaveChannel{channelid1 ..} -> nil

Description:
leave the provided channels

Arguments:
channelid1 channel number (1 - 2^32)

Returns:

Example:


ListChannels

Definition: ListChannels() -> nil

Description:
print list of currently joined channels and usage info to the chatarea

Arguments:

Returns:

Example:


LoadCargo

Definition: LoadCargo{item1 = {int itemid, int quantity} ..} -> nil

Description:
Load cargo items and quantitiss according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo itemid itemid of cargo item quantity amount of this cargo to load

Returns:

Example:
LoadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}
load 2 units of the cargo with the itemid 1234 and 3 with the id 1235


LoadChannels

Definition: LoadChannels() -> nil

Description:
restore chat channels from config file(?)

Arguments:

Returns:

Example:

LoadNotes

Definition: LoadNotes() -> string notes

Description:
read and return players notes from playernotes.txt

Arguments:

Returns:
notes mission notes text

Example:


LoadNavpath

Definition: LoadNavpath(string navpath) -> {int sectorid1 ..}

Description:
load navroute by name and return array with hops

Arguments:

Returns:
sectorid1 sector id of a hop on this navroute first index is first hop (1-n)

Example:


LocationStr

Definition: LocationStr(int sectorid) -> string sname

Description:
translate a sectorid into a sector name. error if no argument provided

Arguments:
sectorid sector id

Returns:
sname sector name

Example:
LocationStr(5000) -> "Sedina System, Sector H-9"


Login

Definition: Login(string username, string password) -> nil

Description:
Login to the game. crashes game when arguments are missing...

Arguments:
username vendetta account name
password password

Returns:

Example:

Logout

Definition: Logout() -> nil

Description:
Inititate logout sequence.

Arguments:

Returns:

Example:


MakeBotName

Definition: MakeBotName(string arg1, int arg2) -> string bname

Description:
no clue. returns the string that's passed to it and requires an int as second argument

Arguments:

Returns:

Example:


NPlural

Definition: NPlural(string arg1, string arg2) -> string pstring

Description:
concaterates the two provided strings together and pluralizes the result

Arguments:
arg1 first substring
arg2 second substring


Returns:
pstring concaterated and pluralized string

Example:
NPlural("Serco", "Cookie") -> "Serco Cookies"


ParseXML

Definition: ParseXML(string xmlstring) -> {dom}

Description:
returns the provided string as a collection of substrings and nodes as subtables ..see example

Arguments:
xmlstring string containing xml tags

Returns:
dom table with xml nodes and substrings

Example:
ParseXML("a <xml>test</xml>woohoo<tag>subtext<bla>subsubtext</bla></tag>") -> {"a ", {"test", "xml"}, "woohoo", {"subtext", {"subsubtext", "bla" }, "tag"}}


PlayerInStation

Definition: PlayerInStation() -> bool instation

Description:
tell if the player is in a station or capship

Arguments:

Returns:
instation true if the player is in a station otherwise false

Example:


PlayerInventoryIterator

Definition: PlayerInventoryIterator() -> func ret1

Description:
returns a function. otherwise no clue

Arguments:

Returns:

Example:


PrintJoinUsage

Definition: PrintJoinUsage() -> nil

Description:
prints how to use /join to the chatarea

Arguments:

Returns:

Example:


PrintLeaveUsage

Definition: PrintLeaveUsage() -> nil

Description:
prints how to use /leave to the chatarea

Arguments:

Returns:

Example:

ProcessEvent

Definition: ProcessEvent(eventtype, event) -> ??

Description:
Processes various events.

Arguments: eventtype is a string indicating which type of event is being processed(Whether you're sending a chat message, or changing sectors)

event varies depending on eventtype. Sometimes it's a table, sometimes it's a string.

Returns:

Example:




PurchaseMerchandiseItem

Definition: PurchaseMerchandiseItem(int itemid, int amount) -> nil

Description:
buy the provided item

Arguments:
itemid itemid of cargo merch item

Returns:

Example:


PurchaseMerchandiseItem

Definition: PurchaseMerchandiseItem(int itemid, int amount) -> nil

Description:
buy the provided item

Arguments:
itemid itemid of merch item

Returns:

Example:


PurchaseShipLoadout

Definition: PurchaseShipLoadout(func arg1) -> ??

Description:
no clue takes function as first argument

Arguments:

Returns:

Example:


RegisterEvent

Definition: RegisterEvent({func OnEvent}, string etype) -> nil

Description:
hook up object to event

Arguments:
OnEvent function to run when event is triggered
etype event type

Returns:

Example:


ReloadInterface

Definition: ReloadInterface() -> nil

Description:
Reload lua interface (or just iup?)

Arguments:

Returns:

Example:


RepairShip

Definition: RepairShip() -> ??

Description:
not tested

Arguments:

Returns:

Example:

ReplenishAll

Definition: ReplenishAll(int itemid) -> nil

Description:
replenish all weapons on provided ship

Arguments:
itemid itemid of ship

Returns:

Example:

ReplenishWeapon

Definition: ReplenishWeapon() -> ??

Description:
not tested

Arguments:

Returns:

Example:


RequestCharacterStats

Definition: RequestCharacterStats() -> nil

Description:
no clue

Arguments:

Returns:

Example:


RequestLaunch

Definition: RequestLaunch() -> bool ret

Description:
Launches from the station. Any issues preventing launch are reported via pop-up window. Otherwise, the player's ship undocks.

Arguments:

Returns:
ret always true (?)

Example:

RequestMissionDetails

Definition: RequestMissionDetails(int missionid) -> nil

Description:
Request information about the given mission (aka the info button) and pop up the info dialog if id is valid

Arguments:
missionid mission id (1-n)

Returns:

Example:

RequestMissionList

Definition: RequestMissionList() -> nil

Description:
no clue. maybe used by /updatestation

Arguments:

Returns:

Example:


RequestNewsArticle

Definition: RequestNewsArticle() -> nil

Description:
ask server for news item?

Arguments:

Returns:

Example:


RequestNewsHeadlines

Definition: RequestNewsHeadlines() -> nil

Description:
ask server for news item list?

Arguments:

Returns:

Example:


RequestTargetStats

Definition: RequestTargetStats() -> int charid

Description:
get character id of target (considreing the name maybe more?)

Arguments:

Returns:
charid character id of torgat or yours if no target selected

Example:

ResetTutorial

Definition: ResetTutorial() -> nil

Description:
Reset the tutorial flag. the player will have to go through it again after docking.

Arguments:

Returns:

Example:

SaveChannels

Definition: SaveChannels() -> nil

Description:
Save joined channels(?). Kinda useless since trhat's done as soon as you join one

Arguments:

Returns:

Example:

SaveMissionNotes

Definition: SaveMissionNotes(string notes) -> nil

Description:
Save the provided string to the characters mission notes file.

Arguments:
notes text to be saved in the notes file

Returns:

Example:


SaveNavpath

Definition: SaveNavpath({int sectorid1 ..}, string name) -> nil

Description:
Save the provided navroute

Arguments:
sectorid1 sectorid of one of each hop
name name of this route

Returns:

Example:
SaveNavpath({5000, 5001, 5002}, "sedina") -> nil
a route that hops around in sedina called "sedina"

SaveShipLoadout

Definition: SaveShipLoadout() -> ??

Description:
save shiploadout? after a ClearLastShipLoadout() this function causes the buy back dialog to pop up again but the ship won't be rebought.. maybe it needs a loadout as arg

Arguments:

Returns:

Example:

SelectActiveShip

Definition: SelectActiveShip(int itemid) -> nil

Description:
Set the given ship active

Arguments:
itemid itemid of ship in the current station

Returns:

Example:


SelectCharacter

Definition: SelectCharacter(int charslot) -> nil

Description:
Select characteri in given slot and enter the game with it (only "works" when you haven'T one selected yet)

Arguments:
charslot a character slot (1-5)

Returns:

Example:

SellInventoryItem

Definition: SellInventoryItem(int itemid, int amount) -> nil

Description:
Sell the provided amount of an inventory item from the current station or ship when docked to a station

Arguments:
itemid itemid of an item at the current station
amount how many to sell

Returns:

Example:


SendChat

Definition: SendChat(string msg, string dst, string char) -> nil

Description:
Send a message to the provided destination.

Arguments:
msg the message
dst destination
known destinations:
"SECTOR" sector chat
"PRIVATE" private chat. requires char parameter
"CHANNEL" chat chat
"SYSTEM" system chat
"GROUP" group chat
"GUILD" guild chat
"MISSION" mission chat. to active reply buttons in the mission log send numbers where 1 correspondends to the top most button
char in case of dst = PRIVATE, the player to send the message

Returns:

Example:
SendChat("Hi", "PRIVATE", "dude") -> nil
send the message "Hi" to player dude

SendMissionQuestionReply

Definition: SendMissionQuestionReply(int num) -> nil

Description:
called by the initial info dialog 1 = accept, 0 = decline

Arguments:
num 1 or 0

Returns:

Example:


SetCurrentChatTab

Definition: SetCurrentChatTab() -> ??

Description:
does nothing. maybe a leftover from the general/mission chat system

Arguments:

Returns:

Example:


SetHomeStation

Definition: SetHomeStation() -> nil

Description:
set current station as your home station

Arguments:

Returns:

Example:

SetProximityWarningDistance

Definition: SetProximityWarningDistance(int dist) -> nil

Description:
set proximity warning distance ..

Arguments:
dist proximity distance

Returns:

Example:


SetShipPurchaseColor

Definition: SetShipPurchaseColor(int color) -> nil

Description:
color of the next ship the player will buy

Arguments:
color color value (0-255)

Returns:

Example:


SetShipPurchaseColor

Definition: SetShipPurchaseColor(int color) -> nil

Description:
color of the next ship the player will buy

Arguments:
color color value (0-255)

Returns:

Example:


ShortLocationStr

Definition: ShortLocationStr(int sectorid) -> string loc

Description:
string representing the provided sector

Arguments:
sectorid sector id

Returns:
loc short sector description

Example:
ShortLocationStr(5000) -> "Sedina H-9"


SetShipPurchaseColor

Definition: SetShipPurchaseColor(int color) -> nil

Description:
color of the next ship the player will buy

Arguments:
color color value (0-255)

Returns:

Example:

ShouldTutorialRun

Definition: ShouldTutorialRun() -> bool tut

Description:
tell if the player has done the tutorial

Arguments:

Returns:
tut true if the player still has to do the tutorial otherwise false

Example:




SplitSectorID

Definition: SplitSectorID(int sectorid) -> int systemid sectorh sectorv

Description:
split up a sectorid into systemid and axis on the system grid

Arguments:
sectorid a sectorid

Returns:
systemid
sectorh horizonatal axis
sectorv vertical axis

Example:
SplitSectorID(5000) -> 20 8 9
Sedina h9


SplitSectorID

Definition: SplitSectorID(int sectorid) -> int systemid sectorh sectorv

Description:
split up a sectorid into systemid and axis on the system grid

Arguments:
sectorid a sectorid

Returns:
systemid
sectorh horizonatal axis
sectorv vertical axis

Example:
SplitSectorID(5000) -> 20 8 9
Sedina h9


SplitStationID

Definition: SplitStationID(int stationid) -> int systemidl sectorhv

Description:
split up a stationid into systemid -1 and sector in system. this may be totally wrong

Arguments:
stationid a stationid

Returns:
systemidl systemid - 1
secttorhv sector in system

Example:


StopTutorial

Definition: StopTutorial() -> nil

Description:
does nothing..

Arguments:

Returns:

Example:

StrTable

Definition: StopTutorial() -> nil

Description:
seems to be another serialisation function. similar (the same?) to splickle

Arguments:

Returns:

Example:


SubmitSurvey

Definition: SubmitSurvey() -> nil

Description:
does nothing..

Arguments:

Returns:

Example:



TabCompleteName

Definition: TabCompleteName(string name) -> string completename

Description:
Attempts to fill out name with the best match the client has seen since startup. If TabCompleteName cannot find a match for name it returns nil, otherwise, completename will be a string containing the best match completed name.

Arguments:
name name to be completed

Returns:
completename completed name

Example:

UnloadCargo

Definition: UnloadCargo{item1 = {int itemid, int quantity} ..} -> nil

Description:
Unload cargo items and quantities according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo itemid itemid of cargo item quantity amount of this cargo to unload

Returns:

Example:
UnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}
unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235


UnloadSellCargo

Definition: UnloadSellCargo{item1 = {int itemid, int quantity} ..} -> nil

Description:
Unload and sell cargo items and quantities according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo itemid itemid of cargo item quantity amount of this cargo to unload and sell

Returns:

Example:
UnloadSellCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}
unload and sell 2 units of the cargo with the itemid 1234 and 3 with the id 1235


XMLTagToString

Definition: XMLTagToString() -> nil

Description:
might the reverse of ParseXML

Arguments:

Returns:

Example:


_ERRORMESSAGE

Definition: _ERRORMESSAGE(string msg) -> nil

Description:
creates an error message with the provided string. probably more

Arguments:
msg a message

Returns:

Example:


clearscene

Definition: clearscene() -> nil

Description:
removes al objects from the game world

Arguments:

Returns:

Example:

collectgarbage

Definition:

Description:
[1]

Arguments:

Returns:

Example:


debugprint

Definition: debugprint() -> ??

Description:
does nothing..

Arguments:

Returns:

Example:


dostuff

Definition: dostuff() -> ??

Description:
no clue. tries to open a nonexistant file

Arguments:

Returns:

Example:


collectgarbage

Definition:

Description:


Arguments:

Returns:

Example:


filter_colorcodes

Definition: filter_colorcodes(string in) -> string out

Description:
strips colorcodes from the provided string

Arguments:
in inputstring

Returns:
out outputstring

Example:


format_time

Definition: format_time(int msecs) -> string tstring

Description:
get string representation of the provided time

Arguments:
msecs time in microseconds

Returns:
tstring time string

Example:
format_time(60001) -> "01:00.001"


gcinfo

Definition:

Description:
[2]

Arguments:

Returns:

Example:


ipairs

Definition:

Description:
[3]

Arguments:

Returns:

Example:


loadscene

Definition: loadscene(string scene) -> ??

Description:
load a scene(?). don't know how it works though

Arguments:
scene filename of a scene

Returns:

Example:


log_print

Definition: loadscene(string str) -> nil

Description:
Writes string to the errors.log

Arguments:
str string to write to log

Returns:

Example:


next

Definition:

Description:
[4]

Arguments:

Returns:

Example:


oper

Definition:

Description:
not gonna bother

Arguments:

Returns:

Example:


pairs

Definition:

Description:
[5]

Arguments:

Returns:

Example:


printtable

Definition: printtable{in} -> nil

Description:
print contents of a table to the console

Arguments:
in table to print

Returns:

Example:

rawget

Definition:

Description:
[6]

Arguments:

Returns:

Example:


rawset

Definition:

Description:
[7]

Arguments:

Returns:

Example:


roper

Definition:

Description:
not gonna bother

Arguments:

Returns:

Example:


strip_whitespace

Definition: strip_whitespace(string in) -> string out

Description:
strip whitespace from beginning and end of string

Arguments:
int input string

Returns:
out output string

Example:


substitute_vars

Definition: substitute_vars(string in) -> string out

Description:
replace variables like %target% in input with their corresponding value

Arguments:
int input string

Returns:
out output string

Example:


type

Definition:

Description:
[8]

Arguments:

Returns:

Example:




spickle

Definition: spickle(table intab) -> string

Description:
Converts a table into a string roughly of the format "value","value",{"tablevalue","tablevalue";tablekey="value"};key="value",key="value"

Arguments:
intab input table

Returns:
The spickled string

Example:
Given table blah with index 1 and 3 containing strings, index 2 containing an empty table, key "apple" containing the string "orange", and key fulltable containing a table with two ints and a string
spickle(blah) returns "string1",{},"string2";apple="orange",fulltable={3,4,"string3"}


tonumber

Definition:

Description:
[9]

Arguments:

Returns:

Example:


tostring

Definition:

Description:
[10]

Arguments:

Returns:

Example:

unpack

Definition:

Description:
[11]

Arguments:

Returns:

Example:


unspickle

Definition: unspickle(string in) -> table outtab

Description:
Converts a spickled string into a table

Arguments:
in input string

Returns:
outtab The unspickled table

Example:

Tables

Buddy

Description:
conatins functions to manipulate the characters buddylist Details:
Buddy