[skip|else] if [not]|while [not]| = Possible 'conditional' statements that can be used with this command.
<RetVar/IF> = Variable where the requested information is put
<Var/Ware> = The ware the text id is being retrieved for.
Each ware has a corresponding entry in page 17 of the games text files. This command returns the unique id number for this text entry.
Example:
$target = get player tracking aim
If $target is of class Ship
| $tradeable.ware.array = $target get tradeable ware array from ship
| $tradeable.ware.array.count size of array $tradeable.ware.array
| $counter = 0
| while $counter < $tradeable.ware.array.count
|| $ware = $tradeable.ware.array [ $counter ]
|| $t.id get text id: ware = $ware
|| $text = read text: page= 17 id = $t.id
|| write to logfile # 9999 append =[TRUE] value = $text
|| inc $counter =
| end
end
The above example would get the tradeable ware array from the player target if it is a ship. It would then cycle through that array getting the 'text id' for each ware. Then it would retrieve the information for that ware and write it to the specified log file.
Command Location:
- »» Audio Commands
- <RetVar/IF> get text id: ware =<Var/Ware>