<RetVar/IF><RefObj> get money

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar/IF><RefObj> get money

Post by mark_a_condren » Thu, 28. Oct 10, 13:00

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get money


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = If the command is to 'return' information.
<RefObj> = The 'Object' that the command is to be run on. 'Valid' objects can be a 'Ship or Station'.


Gets the amount of credits available to a ship or station. This can be player owned or NPC. NPC stations have a credit balance of 2,000,000,000 cr that is regularly topped up by the game engine.

It should return the amount of money by:
1. If it is a station, return the stations money.
2. If it is a ship, that has a homebase, return the homebases money.
3. If it is a ship, with no homebase, return the race's money (i.e. the player account).

"Valid" npc ships or stations return the standard 2,000,000,000 amount, home based or not.

'Invalid' objects, asteroids, gates etc return '0' not 'null'


Example:

$station.credits = $station get money

This will return they amount of credits available to the selected station, $station, as an integer.


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24950
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 290139

Post by X2-Illuminatus » Sat, 6. Nov 10, 16:23

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get money


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Variable, in der die geforderte Information gespeichert wird.
<RefObj> = Das 'Objekt', auf dem der Befehl ausgeführt werden soll. Dieses Objekt kann ein Schiff oder eine Station sein.


Gibt die Anzahl der auf einer Station oder einem Schiff verfügbaren Credits zurück. Diese(s) kann spielereigen oder NPC (nicht spielereigen) sein. NPC Stationen haben 2.000.000.000 Credits auf ihrem Konto, das immer wieder von der Spielengine aufgefüllt wird.

Die folgenden Rückgabewerte sind, abhängig vom Referenzobjekt, möglich:
1. Wenn es eine Station ist, wird das Geld auf dem Stationskonto zurückgegeben.
2. Wenn es ein Schiff mit einer Heimatbasis ist, wird das Geld auf dem Konto der Heimatbasis zurückgegeben.
3. Wenn es ein Schiff ohne Heimatbasis ist, wird das Geld, das der Besitzerrasse (bspw. dem Spieler) gehört, zurückgegeben.

"Gültige" NPC Schiffe oder Stationen geben den Standardwert von 2.000.000.000 zurück, egal ob mit oder ohne Heimatbasis.

"Ungültige" Objekte, Asteroiden, Tore etc. geben '0' oder 'null' zurück.

Beispiel:

$station.credits = $station get money

Dies wird die verfügbare Anzahl an Credits auf der ausgewählten Station $station als ganze Zahl zurückgeben.


Den Befehl findet man unter:

Locked

Return to “MSCI Reference”