
Ich wollte mal fragen, ob jemand von euch schon mal ne Station mit Ressourcen gescriptet hat. Ich weiß nämlich nicht wie das geht! Ich schaff es nur, dass die was ohne Ressourcen herstellt. Kann mir jemand helfen? Ich würde mich sehr darüber freuen!
Moderators: Scripting / Modding Moderators, Moderatoren für Deutsches X-Forum
Code: Select all
$station -> create station type <stationstyp> sector <sector> x <xpos> y <ypos> z <zpos>
$station = add product <ware>
$station = add primary resource <ware>
$station = add secondary resource <ware>
$station = add 5 unit 125MW Schild
$station = start station and produktion task TRUE
Bedanke mich mal freundlich, wusste echt nichtmehr wie der befehl nun genau heisst, hab aber extra druntergeschrieben "oder so ähnlich"Silberglanz Hydrim wrote:So viel Faulheit in einem Forum... die einen benutzen nur Copy&Past, die anderen lassen die SuchFunktion links liegen... ts.
Und ich mache mir auch noch die Mühe, und suche das Kommando aus der 490001.xml heraus! Die Freundlichkeit liegt halt in meiner Natur, hihi.
Glück und Gesundheit!
Code: Select all
Arguments
1: posit , Var/Sector Position , 'position'
Source Text
001 $x = $posit[0]
002 $y = $posit[1]
003 $z = $posit[2]
004 $Sector = $posit[3]
005
006 $newfab = create station: type=Argonen Alpha E.P.W Schmiede owner=Player addto=$Sector x=$x y=$y z=$z
007 $dummy = $newfab -> install 5 units of 125 MW Schild
008
009 $newfab -> add product to factory or dock: Alpha Energieplasma-Werfer
010
011 $newfab -> add primary resource to factory: Energiezellen
012 $newfab -> add primary resource to factory: Cahoona Fleischblöcke
013 $newfab -> add primary resource to factory: Erz
014
015 $newfab -> station trade and production tasks: on=[TRUE]
016
017 return null
wenn du damit den resourcenverbrauch pro erstelltem produkt meinst, das geht nicht.Julian_Gardna wrote:Danke Leute!
Es funktioniert jetzt wie ich es wollte! Weiß noch jemand wie man die Anzahl an Ressourcen für die Produktion verändern kann? Wenn einer von euch das weiß, dann ist mein Script perfekt!
Code: Select all
station erstellen
001 $station = THIS -> create station Argon CahoonaPresse add to ArgonPrime x 32000 y 8000 z 0
002 $station add 5 unit of 125MW schild
003 $station add produkt cahoona fleichblöcke
004 $station add resource Energiezellen
005 $station add resource Argnufleisch
006 $station = START Task 0 with script Produktscript and prio 0
Produktscript
000 $produktiontime = 10000
001 Produkt:
002 $argnu = THIS -> get true amount of Argnufleisch in cargobay
003 $ezell = THIS -> get true amount of Energiezellen in cargobay
004 skip if $argnu < 10 or $ezell < 30
005 goto lable no.recource
006 THIS -> add 10 unit of cahoona Fleischblöcke
007 THIS -> add -10 unit of Argnufleich
008 THIS -> add -30 unit of Energiezellen
009 wait $produktiontime ms
010 goto lable Produkt
011
012 no.resource
013 wait randomly from 5000 to 10000 ms
014 goto lable Produkt