added a powerup object that can be placed in levels and represent various powerups...
[supertux.git] / data / levels / test / script.stl
index 3c207ea..5b40451 100644 (file)
@@ -2,14 +2,11 @@
 (supertux-level
   (version 2)
   (name   (_ "Scripting Test"))
-  (author "Matthias Braun")
+  (author "Development Team")
   (sector
     (name  "main")
     (music  "salcon.mod")
     (gravity 10.000000)
-    (init-script "wait(2);
-print(\"Hello from the script\\n\");
-")
     (tilemap
       (layer  "background")
       (solid #f)
@@ -27,16 +24,16 @@ print(\"Hello from the script\\n\");
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 124 125 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 124 125 0 0 0 0 0 0 0 0 124 210 210 125 0 0 124 125 0 0 0 0 0 
-        0 0 124 125 0 0 25 0 0 0 24 0 124 210 210 125 0 0 124 125 0 0 24 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+        1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
         ))
     (tilemap
       (layer  "interactive")
@@ -55,16 +52,16 @@ print(\"Hello from the script\\n\");
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 122 209 209 123 0 0 0 0 0 0 0 0 0 
+        0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0 
+        0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0 
+        0 0 122 123 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 1348 0 0 0 
+        0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 122 123 0 79 0 0 0 
+        0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 124 125 0 79 0 0 0 
+        0 0 1345 1344 0 0 0 0 0 0 0 0 1345 1346 1346 1344 0 0 1345 1344 0 1349 0 0 0 
+        1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 
+        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 122 123 0 0 0 0 0 0 0 0 0 0 402 403 404 405 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 406 407 408 409 122 123 0 0 0 0 0 
-        0 403 404 0 0 0 0 0 0 0 0 0 0 0 410 451 412 413 0 0 0 0 0 0 0 
-        8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 
-        14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
         ))
     (tilemap
       (layer  "foreground")
@@ -85,12 +82,12 @@ print(\"Hello from the script\\n\");
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 402 403 404 405 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 406 407 408 409 0 0 0 0 0 0 0 
-        0 403 404 0 0 0 0 0 0 0 0 0 0 0 410 411 412 413 0 0 0 0 0 0 0 
-        0 407 408 0 0 0 0 0 0 0 0 0 0 0 414 423 416 425 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+        0 1321 1322 1323 1324 0 0 0 0 0 0 0 0 0 1321 1322 1323 1324 0 0 0 0 0 0 0 
+        0 1325 1326 1327 1328 0 0 0 0 0 0 0 0 0 1325 1326 1327 1328 0 0 0 0 0 0 0 
+        0 1329 1330 1331 1332 0 0 0 0 0 0 0 0 0 1329 1330 1331 1332 0 0 0 0 0 0 0 
+        0 1333 1334 1335 1336 0 0 0 0 0 0 0 0 0 1333 1334 1335 1336 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         ))
@@ -102,9 +99,79 @@ print(\"Hello from the script\\n\");
          (image "semi_arctic.jpg")
          (speed 0.500000)
        )
-       (spawnpoint (name "main") (x 320) (y 384))
+       (spawnpoint (name "main") (x 320) (y 416))
        (particles-snow
        )
+      (infoblock (x 674) (y 390)
+        (message (_ "-VoiceMail
+#
+#(Play phone digit noises)
+#(Play Nolok Sound)
+#(Display text)
+#Tux, I have captured 
+#Penny.
+# 
+"))
+      )
+  (scriptedobject
+         (name "TUX")
+         (x 160)
+         (y 448)
+         (sprite "dummyguy")
+       )
+       (scriptedobject
+         (name "PENNY")
+         (x 390)
+         (y 448)
+         (sprite "dummyguy")
+       )
+       (scriptedobject
+         (name "NOLOK")
+         (x 420)
+         (y 94)
+         (sprite "dummyguy")
+         (visible #f)
+         (physic-enabled #f)
+         (solid #f)
+       )
+       (init-script "
+function wait(time) {
+    set_wakeup_time(time);
+    suspend();
+}
+Text.set_text(translate(\"The Crazy Nolok Dance\"));
+Text.fade_in(2);
+TUX.set_animation(\"jump\");
+wait(4);
+Text.fade_out(1);
+wait(1);
+NOLOK.set_visible(true);
+tuxjumps <- 2;
+while(true) {
+  wait(0.8);
+  Sound.play_sound(\"jump\");
+  if(tuxjumps >= 0) {
+    TUX.set_velocity(50, 300);
+  } else {
+    TUX.set_velocity(-50, 300);
+    if(tuxjumps < -2)
+      tuxjumps = 3;
+  }
+  tuxjumps--;
+  wait(0.5);
+  if(PENNY.get_animation() == \"stand\") {
+    PENNY.set_animation(\"throw\");
+  } else if(PENNY.get_animation() == \"throw\") {
+    PENNY.set_animation(\"jump\");
+  } else if(PENNY.get_animation() == \"jump\") {
+    PENNY.set_animation(\"dead\");
+  } else {
+    Sound.play_sound(\"grow\");
+    PENNY.set_animation(\"stand\");
+    PENNY.set_velocity(0, 900);
+  }
+}
+")
    )
  )