was macht denn deine Variable $d = 10000....?
Sie wird zwar überall in deinen Scripten angelegt, scheint aber keine weitere Funktion zu haben?

Wenn Du die nicht benötigst, dann entferne Sie mal.
Moderators: Moderatoren für Deutsches X-Forum, Scripting / Modding Moderators
Code: Select all
Script plugin.aj.svp.hbships
Version: 0
for Script Engine Version: 25
Description
SVP find all ships asigned to a station
Arguments
1: Homebase , Var/Station , 'Homebase'
Source Text
001 $shiparray = array alloc: size=0
002 $X = get max sectors in x direction
003 while $X
004 dec $X =
005 $Y = get max sectors in y direction
006 while $Y
007 dec $Y =
008 $sector = get sector from universe index: x=$X, y=$Y
009 skip if $sector
010 continue
011 * Setup- and init-scripts must return without delay!
012 *= wait 5 ms
013 $stationlist = find station: sector=$sector class or type=null race=null flags=[Find.Multiple] refobj=null maxdist=999999 maxnum=5000 refpos=null
014 skip if $stationlist
015 $stationlist = array alloc: size=0
016 append $sector to array $stationlist
017 $stationlist.size = size of array $stationlist
018 $Bigshiplist = find ship: sector=$sector class or type=Big Ship race=null flags=[Find.Multiple] refobj=null maxdist=null maxnum=1000 refpos=null
019 if $Bigshiplist
020 $bigship.size = size of array $Bigshiplist
021 $resize.size = $stationlist.size + $bigship.size
022 resize array $stationlist to $resize.size
023 copy array $Bigshiplist index 0 ... $bigship.size into array $stationlist at index $stationlist.size
024 end
025 $stationlist.size = size of array $stationlist
026 while $stationlist.size
027 dec $stationlist.size =
028 $station = $stationlist[$stationlist.size]
029 $tmp.shiplist = $station -> find ship: class or type=Ship race=Player flags=[Find.Multiple] refobj=null maxnum=1000 with homebase=$Homebase
030 skip if $tmp.shiplist
031 continue
032 $tmp.shiplist.size = size of array $tmp.shiplist
033 while $tmp.shiplist.size
034 dec $tmp.shiplist.size =
035 $ship = $tmp.shiplist[$tmp.shiplist.size]
036 append $ship to array $shiparray
037
038 end
039 end
040 end
041 end
042 return $shiparray
Code: Select all
*hier war mal ein Script
Code: Select all
*hier war mal ein Script
Code: Select all
*hier war mal ein Script
Code: Select all
1: I.Station , Var/Station owned by Player , 'Station 1'
Source Text
001 $Umbenenn = array alloc: size=0
002 $Min.P = 0
003 $i = 0
004
F 005 @ = [THIS] -> call script 'rundruf.schiffe.schleife' : Homebase=$Station
006 @ = wait 750 ms
007 $Schiffe.i = get global variable: name='Schiffe'
F 008 $Max.P = size of array $Schiffe.i
009
010 if $I.Station != null
011 $Min.P = 0
F 012 while $Min.P <= $Max.P
013 $Schiff = $Schiffe.i[$Min.P]
F 014 $Schiff = $Umbenenn[$i]
015 inc $i =
016 inc $Min.P =
017 end
018 end
019
020 set global variable: name='Umbenenn' value=$Umbenenn
021 @ = wait 750 ms
022 @ = [THIS] -> call script 'rundruf.station.umbenenn' :
023
024 return null
Code: Select all
Script rundruf.station.umbenenn
Version: 1
for Script Engine Version: 25
Description
EHN - Teilscript der EHN - StationUmbenennung
Arguments
Source Text
001 @ = wait 750 ms
002 $Min = 0
003 $Umbenenn = get global variable: name='Umbenenn'
F 004 $Size = size of array $Umbenenn
F 005 while $Min <= $Size
F 006 $Umbenenn[$Min] = $Schiff
007 $Name = $Schiff -> get name
008 $Heimat = $Schiff -> get homebase
009 $Free = $Schiff -> get free volume of cargo bay
010 $HSektor = $Heimat -> get sector
011 $Sektor = $Schiff -> get sector
012 $Class = $Schiff -> get object class
013 $Schilde = $Schiff -> get current shield strength
0... ...
018 $NewName = *das schema verrate ich noch net*
019 $Schiff -> set name to $NewName
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 020 end
021 return null
Spezialbefehle
COMMAND_TYPE_SPECIAL_08 . . . . . StarTrekMarc, Umbenennungssoftware MK1
COMMAND_TYPE_SPECIAL_09 . . . . . MODIFIED, Stationsversetzung
COMMAND_TYPE_SPECIAL_10 . . . . . Orka, CMD_COLLECT_FIX_SHIP
COMMAND_TYPE_SPECIAL_11 . . . . . Orka, CMD_EXPLORE_X
COMMAND_TYPE_SPECIAL_12 . . . . . Orka, CMD_SET_NAVSAT_ON_ROUTE
COMMAND_TYPE_SPECIAL_13 . . . . . Orka, CMD_SET_NAVSAT
COMMAND_TYPE_SPECIAL_14 . . . . . StarTrekMarc, AktionMod + HandelsMod + ScriptPaketMod
COMMAND_TYPE_SPECIAL_15 . . . . . StarTrekMarc, AktionMod + HandelsMod + ScriptPaketMod
COMMAND_TYPE_SPECIAL_16 . . . . . StarTrekMarc, AktionMod + HandelsMod + ScriptPaketMod
COMMAND_TYPE_SPECIAL_17 . . . . . StarTrekMarc, AktionMod + HandelsMod + ScriptPaketMod
COMMAND_TYPE_SPECIAL_18 . . . . . StarTrekMarc, AktionMod + HandelsMod + ScriptPaketMod
COMMAND_TYPE_SPECIAL_19 . . . . . gsl, Energieversorgung
COMMAND_TYPE_SPECIAL_20 . . . . . ArcaJeth[D6a], Stationsverwaltungsprotokoll v2
COMMAND_TYPE_SPECIAL_21 . . . . . ArcaJeth[D6a], Stationsverwaltungsprotokoll v2
COMMAND_TYPE_SPECIAL_22 . . . . . ArcaJeth[D6a], Stationsverwaltungsprotokoll v2
COMMAND_TYPE_SPECIAL_23 . . . . . MrMilti, Credit Verwalter
COMMAND_TYPE_SPECIAL_24 . . . . . MrMilti, ReturnToSender
COMMAND_TYPE_SPECIAL_25 . . . . . ArcaJeth[D6a], Stationsverwaltungsprotokoll v2
COMMAND_TYPE_SPECIAL_26 . . . . . Metuelisator, Frachterversicherung
COMMAND_TYPE_SPECIAL_27 . . . . . Lucike FZ, Verwaltungssoftware MK1 und MK2
COMMAND_TYPE_SPECIAL_28 . . . . . Lucike FZ, AD Schiffsversorgungsfrachter und -schiffe
COMMAND_TYPE_SPECIAL_29 . . . . . Lucike FZ, AD Schiffsversorgungsfrachter und -schiffe
COMMAND_TYPE_SPECIAL_30 . . . . . MrMilti, Verbindungsmanager
COMMAND_TYPE_SPECIAL_31 . . . . . MrMilti, Verbindungsmanager