Benutzer:Joru Pe/Scripting

Aus X-Lexikon
< Benutzer:Joru Pe
Version vom 6. August 2009, 23:37 Uhr von Joru Pe (Diskussion | Beiträge) (zur Korrektur)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springenZur Suche springen

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