scripting help needed

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
harag9
Posts: 421
Joined: Tue, 4. Mar 03, 17:51
x2

scripting help needed

Post by harag9 » Tue, 10. Feb 04, 12:31

HI all.

I know there is a command that will find a stations that sells a resource

$station = find station sells: resource $ware with min. jumps: max.price=null, amount=$amount, max.jumps=null, startsector=[SECTOR], trader=[THIS]

I was wondering is they a command that returns an array of all stations that require a certain resource.

eg if I specify D.Wheat as the ware and max jumps as 3 I would like the script to return all the factories that need the wheat within the jump range

If you can tell the difference between 1st & 2ndary resources that would be nice as I want something like this returned

D.WHEAT REQUIRED REPORT:
1 stations within 0 jumps - primary
2 stations within 1 jumps - primary
1 stations within 1 jumps - secondary
3 stations within 3 jumps - secondary

failinng the above report just a
3 stations within 3 jumps require D.Wheat - primary
4 stations within 3 jumps require D.Wheat - secondary.

Script arguments.
select sector (central point)
select ware
select MAX jumps

thanks for any help.

Al.

merle
Posts: 48
Joined: Sun, 2. Nov 03, 15:57
x3tc

Post by merle » Tue, 10. Feb 04, 19:22

I was wondering is they a command that returns an array of all stations that require a certain resource.
No, you have to make that one yourself.

The only command that returns multible stations is "find station: sector", use it for getting all stations in a given sector, and then proceed to check if they use a specific resource. You have to use this command for all the sectors in your jumprange.

/Merle

Post Reply

Return to “X²: The Threat - Scripts and Modding”