EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[Scripts] Apricot Mapping Service Scripts, MD and mini-mods [APv2.5.1/TCv3]
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... 59, 60, 61, 62  Next
View previous topic :: View next topic
Author Message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Wed, 21. Oct 15, 10:06    Post subject: Reply with quote Print

If you want it all to cost money, then remove the * from the front of the money lines. At the moment they are commented out so wont execute. I forget which key does this, but look it up in the editor help screen.

When you add a negative number to credits, the amount goes down.

But beware, there is no testing to check if your credits goes below zero. It can happen easily if you are not careful, and I dont know what the consequences will be in the game.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Wed, 21. Oct 15, 10:30    Post subject: Reply with quote Print

Thank you

Back to top
View user's profile Send private message
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Sat, 31. Oct 15, 19:24    Post subject: Reply with quote Print

Where is wrong?
Add new primary resource to NPC factory
Code:
$race = [Argon]
$ware = {Microchips}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$factory = find station in galaxy: startsector=$psec class or type=[Factory] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $factory-> exists
$factory-> add primary resource to factory: $ware
$c = $factory-> get amount of ware $ware in cargo bay
skip if $c > 0
= $factory-> add 1 units of $ware
end
inc $i
end


Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 19853 on topic

Thank you for registering your game
PostPosted: Sat, 31. Oct 15, 21:59    Post subject: Reply with quote Print

caishow2 wrote:
Where is wrong?


Depends. What are you trying to do?

Executing the code you posted will search 40 times for a random Argon factory in the whole universe, add Microchips as a primary resource and add one Microchip to the factory's cargo room. As there are no further checks, and you're looking for a random factory, there's the chance that you will find a factory more than once.

Also, does this question have anything to do with one of apricotslice's scripts/mods? If not, I would move it to an own topic.


_________________
Ab sofort verfügbar: Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov
Back to top
View user's profile Send private message Visit poster's website
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 03:04    Post subject: Reply with quote Print

This is apricotslice script
The modified
Please give a correct code

Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 04:22    Post subject: Reply with quote Print

caishow2 wrote:
This is apricotslice script
The modified
Please give a correct code


Please let me know the exact script name this code is from. Off hand, I dont know which one it is.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 04:33    Post subject: Reply with quote Print

setup.apricot.PHQ.MO.xml

Code:
$race = [Boron]
$ship = {Yaki Headquarters}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$dock = find station in galaxy: startsector=$psec class or type=[Shipyard] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $dock-> exists
$dock-> add product to factory or dock: $ship
$c = $dock-> get amount of ware $ship in cargo bay
skip if $c > 0
= $dock-> add 1 units of $ship
end
inc $i
end


Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 04:43    Post subject: Reply with quote Print

caishow2 wrote:
setup.apricot.PHQ.MO.xml

Code:
$race = [Boron]
$ship = {Yaki Headquarters}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$dock = find station in galaxy: startsector=$psec class or type=[Shipyard] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $dock-> exists
$dock-> add product to factory or dock: $ship
$c = $dock-> get amount of ware $ship in cargo bay
skip if $c > 0
= $dock-> add 1 units of $ship
end
inc $i
end


No, wont work for what you want to do. This script adds the Military Outpost for sale at a Boron shipyard.

I doubt its designed for the modifications you have made.

I cant help you with this one. My scripting isn't that good, and I'm very rusty these days.

Mods, best remove and make its own thread, so a scripter can help.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 05:31    Post subject: Reply with quote Print

Add new primary resource to NPC factory

You can write a code?

Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 05:38    Post subject: Reply with quote Print

caishow2 wrote:
Add new primary resource to NPC factory

You can write a code?


No. I think its been done, but I've no idea how you would do that.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caishow2





Joined: 03 Jun 2015
Posts: 78 on topic
Location: china
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 05:52    Post subject: Reply with quote Print

No way?

Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sun, 1. Nov 15, 05:56    Post subject: Reply with quote Print

caishow2 wrote:
No way?


My scripting ability is basic at best. A lot of scripts in my mods were first written by others.

You need your own thread, asking for a good scripter to help you.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CassCE





Joined: 11 Mar 2014
Posts: 29 on topic

Thank you for registering your game
PostPosted: Mon, 23. Nov 15, 00:31    Post subject: Reply with quote Print

Hey, I can't get the X3:AP downloads page on Apricot's page to load in any browser. I'm trying to get the AP-compatible Expanded PHQ, which is v5.3 I believe. Is there another way to get it, either from a different site or a direct link? I guessed various URL's based on the TC page's naming structure, but none worked.

Back to top
View user's profile Send private message
apricotslice





Joined: 16 May 2004
Posts: 13627 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Mon, 23. Nov 15, 02:52    Post subject: Reply with quote Print

CassCE wrote:
Hey, I can't get the X3:AP downloads page on Apricot's page to load in any browser. I'm trying to get the AP-compatible Expanded PHQ, which is v5.3 I believe. Is there another way to get it, either from a different site or a direct link? I guessed various URL's based on the TC page's naming structure, but none worked.


Weird.

I fixed something so its working now, but for the life of me I dont know why it wasn't working.

The only thing I can think of was the server got changed again, so the way the link worked before, stopped working.

Should be ok now.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CassCE





Joined: 11 Mar 2014
Posts: 29 on topic

Thank you for registering your game
PostPosted: Mon, 23. Nov 15, 06:46    Post subject: Reply with quote Print

Thanks for the quick reply! It's amazing you're still so responsive after all these years, glad you're still around.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... 59, 60, 61, 62  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sat, 29. Apr 17, 15:20

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.36807 seconds, sql queries = 29