ich sitze nun seit Tagen an diesem Script hier und komme einfach nicht weiter, selbst Lucike weiß nicht so richtig Rat (nichts gegen ihn

Vielleicht könnt ihr mir ja helfen, also, das Script soll alle Sektoren nach Schiffen durchsuchen und auf den Schiffen dann ein Script starten, hier erstmal der Ausschnitt:
Code: Select all
[...]
100 $TypeM1 = $ShipTypes[0]
101 $TypeM2 = $ShipTypes[1]
102 $TypeM3 = $ShipTypes[2]
103 $TypeM4 = $ShipTypes[3]
104 $TypeM5 = $ShipTypes[4]
105 $TypeM6 = $ShipTypes[5]
106
107 $CounterX = 0
108 $CounterY = 0
109 $ZCounterM1 = 0
110 $ZCounterM2 = 0
111 $ZCounterM3 = 0
112 $ZCounterM4 = 0
113 $ZCounterM5 = 0
114 $ZCounterM6 = 0
115 $SektorX = get max sectors in x direction
116 $SektorY = get max sectors in y direction
117
118 while $ZCounterM1 < $CounterM1
119 $Schiff = create ship: type=$TypeM1 owner=$AttackierendesVolk addto=$ErstellungsSektor x=0 y=100000 z=0
120 $Schiff -> add default items to ship
121 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=Unbekannter Sektor
122 inc $ZCounterM1 =
123 end
124
125 while $ZCounterM2 < $CounterM2
126 $Schiff = create ship: type=$TypeM2 owner=$AttackierendesVolk addto=$ErstellungsSektor x=0 y=100000 z=0
127 $Schiff -> add default items to ship
128 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=Unbekannter Sektor
129 inc $ZCounterM2 =
130 end
131
132 while $CounterX <= $SektorX
133 while $CounterY <= $SektorY
134
135 $SektorA = get sector from universe index: x=$CounterX, y=$CounterY
136
137 $CounterA = 0
138 while $ZCounterM3 <= $CounterM3 AND $CounterA <= 25
139 $Schiff = find ship: sector=$SektorA class or type=$TypeM3 race=$AttackierendesVolk flags=[Find.Random] refobj=null maxdist=null maxnum=null refpos=null
140 if $Schiff != null
141 $Schiff -> add default items to ship
142 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=$SektorA
143 inc $ZCounterM3 =
144 else if not $Schiff
145 inc $CounterA =
146 end
147 end
148
149 $CounterA = 0
150 while $ZCounterM4 <= $CounterM4 AND $CounterA <= 25
151 $Schiff = find ship: sector=$SektorA class or type=$TypeM4 race=$AttackierendesVolk flags=[Find.Random] refobj=null maxdist=null maxnum=null refpos=null
152 if $Schiff != null
153 $Schiff -> add default items to ship
154 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=$SektorA
155 inc $ZCounterM4 =
156 else if not $Schiff
157 inc $CounterA =
158 end
159 end
160
161 $CounterA = 0
162 while $ZCounterM5 <= $CounterM5 AND $CounterA <= 25
163 $Schiff = find ship: sector=$SektorA class or type=$TypeM5 race=$AttackierendesVolk flags=[Find.Random] refobj=null maxdist=null maxnum=null refpos=null
164 if $Schiff != null
165 $Schiff -> add default items to ship
166 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=$SektorA
167 inc $ZCounterM5 =
168 else if not $Schiff
169 inc $CounterA =
170 end
171 end
172
173 $CounterA = 0
174 while $ZCounterM6 <= $CounterM6 AND $CounterA <= 25
175 $Schiff = find ship: sector=$SektorA class or type=$TypeM6 race=$AttackierendesVolk flags=[Find.Random] refobj=null maxdist=null maxnum=null refpos=null
176 if $Schiff != null
177 $Schiff -> add default items to ship
178 @ START [THIS] -> call script 'al.invasion.stm.attacker.cmd' : Ship=$Schiff Sector=$Sektor Home=$SektorA
179 inc $ZCounterM6 =
180 else if not $Schiff
181 inc $CounterA =
182 end
183 end
184
185 inc $CounterY =
186 end
187 inc $CounterX =
188 end
189
190 * Script by StarTrekMarc
[...]

Ich danke euch schonmal

Gruß
Marc