add merchant <Var/String> base=<RefObj> wanted wares=<Var/Array> owned wares=<Var/Arr

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

add merchant <Var/String> base=<RefObj> wanted wares=<Var/Array> owned wares=<Var/Arr

Post by mark_a_condren »

add merchant <Var/String> base= <RefObj> wanted wares= <Var/Array> owned wares= <Var/Array> cash= <Var/Number>


<Var/String> = This is the Merchants name, what is displayed in the list of merchants at a Trading Station.
<RefObj> = The Trading Station you want this Merchant to appear at.
<Var/Array> = The array containing the list of wares this merchant wishes to buy.
<Var/Array> = The array containing the list of wares owned by this merchant.
<Var/Number> = The amount of credits this Merchant starts with.


This command adds a merchant to the barter list in trading stations.
The first string is the Merchants name, what is displayed in the list.
Base is the station they are at and wanted wares and owned wares are arrays of wares that they have.


Examples:

The structure for the wanted and owned ware arrays, each ware is an array of 2 elements, ware and amount.

$wanted.ware.array = alloc array: size = 0
$ware = alloc array: size = 2
$ware[0] = Energy Cells
$ware[1] = 100
append $ware to array $wanted.ware.array

Then to add the merchant to the Trading Station,

add merchant $merchant.name base= $station wanted wares=$wanted.ware.array owned wares=$owned.ware.array cash=$credits

This will add the merchant $merchant.name to the Trading Station specified by $station with the owned and wanted wares in the ware arrays. The merchants credits will alter with their transactions but they will start with the amount you provide at $credits.


Command Location:
  • »» Trade Commands
    • »» Merchants
      add merchant <Var/String> base= <RefObj> wanted wares= <Var/Array> owned wares= <Var/Array> cash= <Var/Number>
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25043
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 287999

Post by X2-Illuminatus »

add merchant <Var/String> base= <RefObj> wanted wares= <Var/Array> owned wares= <Var/Array> cash= <Var/Number>


<Var/String> = Dies ist der Händlername, der in der Liste der Händler in einer Handelsstation angezeigt wird.
<RefObj> = Die Handelsstation, an der dieser Händler erscheinen soll.
<Var/Array> = Das Array der Waren, die der Händler kaufen möchte.
<Var/Array> = Das Array mit der Liste an Waren, die der Händler besitzt.
<Var/Number> = Die Menge an Credits, mit der der Händler starten soll.


Dies fügt einen Händler zur Tauschhandelsliste in einer Handelsstation hinzu.


Beispiel:

Die Struktur der gesuchten und eigenen Warenarrays. Jede Ware ist ein Array bestehend aus 2 Elementen: Ware und Menge.

$wanted.ware.array = alloc array: size = 0
$ware = alloc array: size = 2
$ware[0] = Energy Cells
$ware[1] = 100
append $ware to array $wanted.ware.array

Dann um den Händler zur Handelsstation hinzuzufügen:

add merchant $merchant.name base= $station wanted wares=$wanted.ware.array owned wares=$owned.ware.array cash=$credits

Dies wird den Händler $merchant.name zur ausgewälten Handelsstation $station mit den eigenen und gewünschten Warenarrays hinzufügen. Die Menge an Credits $credits kann im Befehl angegeben werden, wird sich aber mit Transaktionen verändern.


Zu finden unter:
  • »» Trade Commands
    • »» Merchants
      add merchant <Var/String> base= <RefObj> wanted wares= <Var/Array> owned wares= <Var/Array> cash= <Var/Number>
Locked

Return to “MSCI Reference”