ich habe ein problem beim scripten:
ich wollte für mich eine Fabrik für Enterkapseln scripten und habe dafür eines von cyrows Cheatscripten abgewandelt.
das sieht jetzt wiefolgt aus:
Code: Select all
003 $text = read text: page=$page.id id=1027
004 $shiptype = [THIS] -> get user input: type=Var/Station Type, title=$text
005 skip if $shiptype
006 |return null
007
008 $text = read text: page=$page.id id=1028
009 $pos = [THIS] -> get user input: type=Var/Sector Position, title=$text
010 skip if $pos
011 |return null
012
013 $text = read text: page=$page.id id=1029
014 $owner = [THIS] -> get user input: type=Var/Race, title=$text
015 skip if $owner
016 |return null
017
018 $x = $pos[0]
019 $y = $pos[1]
020 $z = $pos[2]
021 $sector = $pos[3]
022
023 $station = create station: type=$shiptype owner=$owner addto=$sector x=$x y=$y z=$z
024 if $station -> exists
025 |$station -> add product to factory or dock: Enterkapsel
026 |$station -> add primary resource to factory: Erz
027 |$station -> add primary resource to factory: Energiezellen
028 |$station = $text -> get number of products per cycle
029 |$station = $text -> get number of resources per cycle for ware Erz
030 |$station = $text -> get number of resources per cycle for ware Energiezellen
031 |$station = $text -> add 5 units of 2 GJ Schild
032 end
033
034 return $station
nun weiß ich aber nicht wie ich den cyclusverbrauch und die produktionszahl anpassen kann denn wenn ich die Station unter Player erstelle, steht überall null!
Darum habe ich diesen teil eingefügt:
Code: Select all
028 |$station = $text -> get number of products per cycle
029 |$station = $text -> get number of resources per cycle for ware Erz
030 |$station = $text -> get number of resources per cycle for ware Energiezellen
ich hoffe ihr könnt mit helfen.
mfg
E.
PS:
wird bei KI Fabriken dann auch nichts produziert?
Oder sind diese auf die Angaben nicht angewiesen??