Benutzer:Joru Pe/Scripting: Unterschied zwischen den Versionen
K (zur Korrektur) |
K (Korrektur 1) |
||
Zeile 27: | Zeile 27: | ||
025 add money to player: $money.negative | 025 add money to player: $money.negative | ||
026 end | 026 end | ||
027 end | |||
028 end | |||
029 end | |||
030 end | |||
031 return null | |||
==Rettungsskript (Korrektur 1)== | |||
001 $sec = [PLAYERSHIP] -> get sector | |||
002 if [PLAYERSHIP] -> is of type Raumanzug | |||
003 if not find ship: sector=$sec class or type=Moveable Ship race=Player flags=[Find.Nearest] refobj=[PLAYERSHIP] maxdist=1500 maxnum=null refpos=null | |||
004 if find ship: sector=$sec class or type=Moveable Ship race=null flags=[Find.Enemy] refobj=[PLAYERSHIP] maxdist=6000 maxnum=1 refpos=null | |||
005 $x = [PLAYERSHIP] -> get x position | |||
006 $y = [PLAYERSHIP] -> get y position | |||
007 $z = [PLAYERSHIP] -> get z position | |||
008 $x = $x + 75 | |||
009 $y = $y + 75 | |||
010 $z = $z + 75 | |||
011 $new = create ship: type=Goner Schiff owner=Player addto=$sec x=$x y=$y z=$z | |||
012 | |||
013 = $new -> add 1 units of 25 MW Schild | |||
014 $money = get player money | |||
015 if $money >= 500000 | |||
016 = $new -> add 1 units of Sprungantrieb | |||
017 = $new -> add 120 units of Energiezellen | |||
018 add money to player: -500000 | |||
019 else if $money >= 250000 | |||
020 | |||
021 = $new -> add 1 units of Boost Erweiterung | |||
022 add money to player: -250000 | |||
023 else | |||
024 $money.negative = - $money | |||
025 add money to player: $money.negative | |||
026 | |||
027 end | 027 end | ||
028 end | 028 end |
Aktuelle Version vom 8. August 2009, 13:42 Uhr
Rettungsskript (Versuch 1)
001 $sec = [PLAYERSHIP] -> get sector 002 if [PLAYERSHIP] -> is of type Raumanzug 003 if not find ship: sector=$sec class or type=null race=Player flags=null refobj=null maxdist=1500 maxnum=1 refpos=[PLAYERSHIP] 004 if find ship: sector=$sec class or type=null race=Feinde flags=null refobj=null maxdist=6000 maxnum=1 refpos=[PLAYERSHIP] 005 $x = [PLAYERSHIP] -> get x position 006 $y = [PLAYERSHIP] -> get y position 007 $z = [PLAYERSHIP] -> get z position 008 $x = $x + 75 009 $y = $y + 75 010 $z = $z + 75 011 $do = create ship: type=Goner Schiff owner=Player addto=$sec x=$x y=$y z=$z 012 $new = find ship: sector=$sec class or type=Goner Schiff race=Player flags=null refobj=null maxdist=500 maxnum=1 refpos=[PLAYERSHIP] 013 = $new -> add 1 units of 25 MW Schild 014 $money = get player money 015 if $money >= 500000 016 = $new -> add 1 units of Sprungantrieb 017 = $new -> add 120 units of Energiezellen 018 add money to player: -500000 019 else 020 if $money >= 250000 021 = $new -> add 1 units of Boost Erweiterung 022 add money to player: -250000 023 else 024 $money.negative = - $money 025 add money to player: $money.negative 026 end 027 end 028 end 029 end 030 end 031 return null
Rettungsskript (Korrektur 1)
001 $sec = [PLAYERSHIP] -> get sector 002 if [PLAYERSHIP] -> is of type Raumanzug 003 if not find ship: sector=$sec class or type=Moveable Ship race=Player flags=[Find.Nearest] refobj=[PLAYERSHIP] maxdist=1500 maxnum=null refpos=null 004 if find ship: sector=$sec class or type=Moveable Ship race=null flags=[Find.Enemy] refobj=[PLAYERSHIP] maxdist=6000 maxnum=1 refpos=null 005 $x = [PLAYERSHIP] -> get x position 006 $y = [PLAYERSHIP] -> get y position 007 $z = [PLAYERSHIP] -> get z position 008 $x = $x + 75 009 $y = $y + 75 010 $z = $z + 75 011 $new = create ship: type=Goner Schiff owner=Player addto=$sec x=$x y=$y z=$z 012 013 = $new -> add 1 units of 25 MW Schild 014 $money = get player money 015 if $money >= 500000 016 = $new -> add 1 units of Sprungantrieb 017 = $new -> add 120 units of Energiezellen 018 add money to player: -500000 019 else if $money >= 250000 020 021 = $new -> add 1 units of Boost Erweiterung 022 add money to player: -250000 023 else 024 $money.negative = - $money 025 add money to player: $money.negative 026 027 end 028 end 029 end 030 end 031 return null