[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, it will return 1 in case of succes and 0 in case of failure.
<RefObj> = The station, which you want to check, if it sells the <Var/Ware>.
<Var/Ware> = The ware, which you want to check, if it's sold by the <RefObj>.
This will check, if the as <Var/Ware> selected ware is sold by the as <RefObj> selected station.
Example:
$ware = BoFu
$station = get player tracking aim
$result = $station -> uses ware $ware as product
if $result == 1
|write to player logbook: printf: fmt='%s is sold at %s', $ware, $station, null, null, null
else
|write to player logbook: printf: fmt='%s isn't sold at %s', $ware, $station, null, null, null
end
return null
This will check, if the ware BoFu is sold by the current player's target. An appropriate message will be written to the logbook.
Related Commands:
<RetVar/IF><RefObj> get products
Command Location:
- »» Trade Commands
- »» for Stations
<RetVar/IF><RefObj> uses ware <Var/Ware> as product
- »» for Stations