<RetVar/IF><RefObj> get ware storage percentage: 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 ware storage percentage: ware <Var/Ware> in cargo bay

Post by mark_a_condren » Wed, 10. Nov 10, 17:36

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get ware storage percentage: 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 exists in the cargobay and is taking up room (cargo units) 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 there is of.


Use this command to check how much of the room a ware is taking up in a cargobay as a percentage of the max cargo space. This command will NOT find wares that are 'Installed' on a ship, eg: guns, shields or 'Built In' components.


Example:

$target = get tracking aim
If $target is of class ship
| $store.percentage = $target get ware storage percentage: ware Energy Cells in cargo bay
| IF $store.percentage > 0
| | $message = sprintf: fmt='Storage space used by Energy Cells is %s%', $store.percentage, 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 if Energy Cells are present in the cargobay and if so, how much room they are taking up as a percentage of the total storage space. If Energy Cells are present in the cargobay it will display the subtitle $message for 5 seconds. The $message will contain the percentage of room taken up by Energy Cells in the cargobay.


Command Location:
  • »» Trade Commands
    • »» for Ships and Stations
      <RetVar/IF><RefObj> get ware storage percentage: 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] 291052

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

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get ware storage percentage: 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 Platz (Laderaumeinheiten) beansprucht und TRUE / FALSE (wahr / falsch) zurückgeben.
<RefObj> = Das 'Objekt' (Schiff / Station), auf dem der Befehl ausgeführt werden soll.
<Var/Ware> = Die Ware, deren Menge im Frachtraum du ermitteln möchtest.


Nutze diesen Befehl, um zu überprüfen, wie viel Platz eine Ware im Frachtraum, als Prozentzahl des maximalen Frachtraums, beansprucht. Diese Befehl wird KEINE auf einem Schiff installierten Waren, wie Schilde, Waffen oder Eingebaute Komponenten finden.


Beispiel:

$target = get tracking aim
If $target is of class ship
| $store.percentage = $target get ware storage percentage: ware Energiezellen in cargo bay
| IF $store.percentage > 0
| | $Nachricht = sprintf: fmt='Frachtraum, der von Energiezellen belegt wird, ist %s%', $store.percentage, null, null, null, null
| | display subtitle text: text=$nachricht duration=5000 ms
| end
end


Dies wird überprüfen, ob Energiezellen im Laderaum des Ziels des Spielers (wenn es ein Schiff ist) vorhanden sind und wenn ja, wie viel Platz, als Prozentzahl vom gesamten Frachtraum, sie beanspruchen. Wenn Energiezellen im Frachtraum vorhanden sind, wird der Untertitel $Nachricht für 5 Sekunden angezeigt. Die $Nachricht enthält den Prozentwert des von den Energiezellen benötigten Platzes im Frachtraum.


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

Return to “MSCI Reference”