<RefObj> set price of ware <Var/Ware> to <Var/Number> Cr

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

<RefObj> set price of ware <Var/Ware> to <Var/Number> Cr

Post by X2-Illuminatus » Thu, 7. Apr 11, 19:29

<RefObj> set price of ware <Var/Ware> to <Var/Number> Cr


<RefObj> = The station, which uses <Var/Ware>.
<Var/Ware> = The ware you want to set its price.
<Var/Number> = The number of Credits you want to set the price of <Var/Ware>.


This sets the price of the as <Var/Ware> selected ware used by the as <RefObj> selected station to <Var/Number> Credits. This command only works on player own stations.


Example:

$ware = Energy Cells
$station.array = get station array: of race Player class/type=null
$size = size of array $station.array
while $size
|dec $size =
|$station = $station.array[$size]
|if $station -> uses ware $ware as primary resource
||$station -> set price of ware $ware to 19 Cr
|end
end
return null

This gets all player own stations. I case they're using Energy Cells as primary resource, it will set the price of Energy Cells to 19 Credits.


Related Commands:

<RetVar/IF><RefObj> get price of ware <Var/Ware>
<RetVar/IF><RefObj> get average price of ware <Var/Ware>


Command Location:

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

[TiP][49] 299490

Post by X2-Illuminatus » Wed, 4. May 11, 16:37

<RefObj> set price of ware <Var/Ware> to <Var/Number> Cr


<RefObj> = Die Station, die <Var/Ware> anbietet.
<Var/Ware> = Die Ware, deren Preis du verändern möchtest.
<Var/Number> = Die Anzahl an Credits, auf die du den Preis von <Var/Ware> setzen möchtest.


Dies setzt den Preis von der als <Var/Ware> ausgewählten Ware angeboten oder genutzt von der als <RefObj> ausgewählten Station auf <Var/Number> Credits. Dieser Befehl funktioniert nur mit Spielerstationen.


Beispiel:

$ware = Energiezellen
$station.array = get station array: of race Spieler class/type=null
$size = size of array $station.array
while $size
|dec $size =
|$station = $station.array[$size]
|if $station -> uses ware $ware as primary resource
||$station -> set price of ware $ware to 19 Cr
|end
end
return null

Dies erfasst alle spielereignenen Stationen. Im Fall, dass sie Energiezellen als primäre Ressource nutzen, wird deren Preis auf 19 Credits gesetzt.


Verwandte Befehle:

<RetVar/IF><RefObj> get price of ware <Var/Ware>
<RetVar/IF><RefObj> get average price of ware <Var/Ware>


Zu finden unter:

Locked

Return to “MSCI Reference”