<RetVar/IF><RefObj> get marine buy price

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

<RetVar/IF><RefObj> get marine buy price

Post by X2-Illuminatus » Fri, 25. Feb 11, 18:24

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get marine buy price


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = The variable, where the requested information is stored as an integer .
<RefObj> = The marine you want to know his buying price.


This command returns the as <RefObj> selected marine's buying price. A marines buying price is direct proportional to its overall skill (arithmetic average of the four other skills). So a high buying price means he has a high overall skill.


Example:

$marines.arr = [PLAYERSHIP] -> get marines array
$size.marines.arr = size of array $marines.arr
while $size.marines.arr
|dec $size.marines.arr =
|$marine = $marines.arr[$size.marines.arr]
|$buyprice = $marine -> get marine buy price
|write to player logbook: printf: fmt='marine %s costs %s Cr', $marine, $buyprice, null, null, null
end
return null

This will get each marine's buying price onboard the [PLAYERSHIP] and write it with his name to the logbook.


Command Location:

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

[TiP][49] 297427

Post by X2-Illuminatus » Mon, 28. Feb 11, 19:11

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get marine buy price


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Die Variable, in der die geforderte Information als ganze Zahl gespeichert wird.
<RefObj> = Der Marineinfanterist, dessen Kaufpreis du wissen möchtest.


Dieser Befehl gibt den Kaufpreis des als <RefObj> ausgewählten Marinenfanteristen zurück. Der Kaufpreis eines Marinenfanteristen ist direkt proportional zu seinen gesamten Fähigkeiten (ermittlerter Durchschnitt der vier Einzelwerte). Ein hoher Kaufpreis bedeutet also auch hohe Gesamtfähigkeiten.


Beispiel:

$marines.arr = [PLAYERSHIP] -> get marines array
$size.marines.arr = size of array $marines.arr
while $size.marines.arr
|dec $size.marines.arr =
|$marine = $marines.arr[$size.marines.arr]
|$buyprice = $marine -> get marine buy price
|write to player logbook: printf: fmt='Marineinfanterist %s kostet %s Cr', $marine, $buyprice, null, null, null
end
return null

Dies ermittelt den Kaufpreis jedes Marinenfanteristen an Board des Spielerschiffs [PLAYERSHIP] und schreibt ihn zusammen mit seinem Namen in das Logbuch.


Zu finden unter:

Return to “MSCI Reference”