<RetVar/IF><RefObj> get max amount of ware <Var/Ware> in cargo bay

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

<RetVar/IF><RefObj> get max amount of ware <Var/Ware> in cargo bay

Post by mark_a_condren » Wed, 10. Nov 10, 16:52

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get max amount of ware <Var/Ware> in cargo bay


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = RetVar is if you want to save the quantity to a variable. IF will check to see if the ware can be placed in the cargobay and return True / False.
<RefObj> = The 'Object' (Ship/Station) that the command is to be run on.
<Var/Ware> = What you want to know how much of would fit into an empty cargobay.


Use this command to check how much of an item would fit into a cargobay if the cargobay was empty. This command if run on a station that has set limits for particular wares will take these limits into account and only report on the available space assigned for that ware.


Example:

$target = get tracking aim
If $target is of class ship
| $max.amount = $target get max amount of ware Space Fuel in cargo bay
| IF $max.amount > 0
| | $message = sprintf: fmt='Maximum amount for Space Fuel is %s', $max.amount, null, null, null, null
| | display subtitle text: text=$message duration=5000 ms
| end
end


This will get the players tracking aim and if it is a ship it will check to see how much Space Fuel it can carry in its cargobay. If it can carry Space Fuel it will display the subtitle $message for 5 seconds. The message will contain the $max.amount of Space Fuel that would fit into an empty cargobay.


Command Location:
  • »» Trade Commands
    • »» for Ships and Stations
      <RetVar/IF><RefObj> get max amount of ware <Var/Ware> in cargo bay

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

[TiP][49] 291048

Post by X2-Illuminatus » Fri, 26. Nov 10, 23:03

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get max amount of ware <Var/Ware> in cargo bay


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze RetVar, wenn du die Anzahl in einer Variable speichern möchtest. IF hingegen wird überprüfen, ob eine Ware in den Frachtraum passt und TRUE / FALSE (wahr / falsch) zurückgeben.
<RefObj> = Das 'Objekt' (Schiff / Station), auf dem der Befehl ausgeführt werden soll.
<Var/Ware> = Die Ware, von der du die Anzahl, die in einen leeren Frachtraum passt, ermitteln möchtest.


Nutze diesen Befehl, um zu überprüfen, welche Menge einer Ware in einen Laderaum passt, wenn dieser leer ist. Wenn dieser Befehl auf einer Station ausgeführt wird und auf dieser Grenzen für bestimmte Waren festgelegt sind, so wird der Befehl diese Grenzen berücksichtigen.


Beispiel:

$target = get tracking aim
If $target is of class ship
| $max.amount = $target get max amount of ware Raumsprit in cargo bay
| IF $max.amount > 0
| | $Nachricht = sprintf: fmt='Die maximale Menge an Raumsprit ist %s', $max.amount, null, null, null, null
| | display subtitle text: text=$Nachricht duration=5000 ms
| end
end


Dies wird überprüfen, welche Menge an Raumsprit in den Laderaum des Ziels des Spielers (wenn es ein Schiff ist) passt. Wenn Raumsprit hinein passt, wird der Untertitel $Nachricht für 5 Sekunden angezeigt. Die Nachricht enthält die maximale Menge $max.amount an Raumsprit, die in einen leeren Frachtraum passen würde.


Zu finden unter:
  • »» Trade Commands
    • »» for Ships and Stations
      <RetVar/IF><RefObj> get max amount of ware <Var/Ware> in cargo bay

Return to “MSCI Reference”