~ubuntu-branches/ubuntu/intrepid/enigma/intrepid

« back to all changes in this revision

Viewing changes to data/levels/ss3.lua

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
enigma.ConserveLevel = TRUE
3
 
levelw = 39
4
 
levelh = 25
5
 
 
6
 
create_world(levelw, levelh)
7
 
oxyd_default_flavor = "c"  
8
 
set_actor("ac-blackball", 2.5,2.5)
9
 
draw_border("st-rock1")
10
 
fill_floor("fl-rough", 0,0, levelw,levelh)
11
 
 
12
 
--------------------------------------------------------------------------------------------
13
 
   for x=1,7 do
14
 
        y=5*x
15
 
        set_stone("st-rock1_move",1,y)
16
 
        set_stone("st-rock1_move",37,y)
17
 
        set_stone("st-rock1_move",y,1)
18
 
        set_stone("st-rock1_move",y,23) 
19
 
   end
20
 
   
21
 
set_item("it-floppy",5,1)
22
 
set_item("it-blackbomb",10,1)
23
 
set_item("it-magnet",15,1)
24
 
if difficult then
25
 
            set_item("it-flagblack",20,1)
26
 
      else
27
 
            set_item("it-umbrella",20,1)
28
 
end
29
 
set_item("it-sword",25,1)
30
 
set_item("it-key_a",30,1)
31
 
set_item("it-brush",35,1)
32
 
set_item("it-yinyang",5,23)
33
 
set_item("it-hammer",10,23)
34
 
shogundot3(15,23)
35
 
set_item("it-whitebomb",20,23)
36
 
set_item("it-tinyhollow",25,23)
37
 
set_item("it-spade",30,23)
38
 
set_item("it-key_c",35,23)
39
 
set_item("it-tinyhill",37,5)
40
 
document(37,10,"If I only had a bag")
41
 
set_item("it-hollow",37,15)
42
 
set_item("it-crack3",37,20)
43
 
set_item("it-hill",1,5)
44
 
set_item("it-springboard",1,10)
45
 
set_item("it-key_b",1,15)
46
 
set_item("it-extralife",1,20)
47
 
 
48
 
--------------------------------------------------------------------------------------------
49
 
function draw_border_SS(name,xx0,yy0,w,h)
50
 
draw_stones (name,{xx0,yy0}, {1,0},w)   
51
 
draw_stones (name,{xx0,(yy0+h-1)}, {1,0},w)
52
 
draw_stones (name,{xx0,yy0}, {0,1},h)   
53
 
draw_stones (name,{(xx0+w-1),yy0}, {0,1},h)   
54
 
end
55
 
 
56
 
y0=3
57
 
x0=3
58
 
draw_border_SS("st-rock1",x0,y0,8,8)
59
 
x0=11
60
 
x0=20
61
 
draw_border_SS("st-rock1",x0,y0,8,8)
62
 
x0=28
63
 
draw_border_SS("st-rock1",x0,y0,8,8)
64
 
 
65
 
y0=14
66
 
x0=3
67
 
draw_border_SS("st-rock1",x0,y0,8,8)
68
 
x0=11
69
 
draw_border_SS("st-death",x0,y0,8,8)
70
 
x0=20
71
 
draw_border_SS("st-rock1",x0,y0,8,8)
72
 
x0=28
73
 
draw_border_SS("st-rock1",x0,y0,8,8)
74
 
 
75
 
-----------------------------------------------------------------------------------------
76
 
 
77
 
y0=3
78
 
x0=3
79
 
set_stone("st-bolder-s", x0+4,y0-2, {name="startbolder"}) 
80
 
fakeoxyd(x0+4,y0-1)
81
 
set_stone("st-switch", 0, 14, {action="callback", target="start"})
82
 
 
83
 
function start()
84
 
        kill_stone(7,2) --blocker weg
85
 
end
86
 
 
87
 
kill_stone(x0+4,y0)
88
 
draw_items("it-seed",{x0+4,y0}, {0,1},2)
89
 
set_stone("st-rock1",x0+3,y0+3)
90
 
draw_stones("st-rock1",{x0+4,y0+6}, {1,0},3)
91
 
draw_stones("st-rock1",{x0+1,y0+4}, {0,1},3)
92
 
set_stone("st-rock1",x0+4,y0+4)
93
 
draw_stones("st-rock1",{x0+6,y0+1}, {0,1},3)
94
 
 
95
 
set_stone("st-wood",x0+2,y0+2)
96
 
set_stone("st-wood",x0+5,y0+3)
97
 
set_stone("st-wood",x0+2,y0+5)
98
 
oxyd(x0+5,y0+1)
99
 
 
100
 
document(x0+6,y0+5,"shh...listen!")
101
 
 
102
 
set_item("it-trigger", x0+3,y0+1, {invisible=1,action="callback", target="box1trig1"})
103
 
set_item("it-trigger", x0+3,y0+2, {invisible=1,action="callback", target="box1trig2"})
104
 
set_item("it-trigger", x0+4,y0+2, {invisible=1,action="callback", target="box1trig3"})
105
 
 
106
 
local door1 = set_stone("st-door-v", x0+7, y0+5)
107
 
 
108
 
local switchesbox1={0, 0, 0}
109
 
doorsopenbox1=0
110
 
 
111
 
function box1trig1 () triggerbox1(1) end 
112
 
function box1trig2 () triggerbox1(2) end 
113
 
function box1trig3 () triggerbox1(3) end 
114
 
 
115
 
function triggerbox1(num)
116
 
   %switchesbox1[num] = 1-%switchesbox1[num]
117
 
   allbox1=1
118
 
   for x=1,3 do
119
 
      if (%switchesbox1[x]==0) then
120
 
         allbox1 = 0
121
 
      end
122
 
   end
123
 
   if (doorsopenbox1==0 and allbox1==1) then
124
 
      SendMessage(%door1, "open")
125
 
      doorsopenbox1 = 1
126
 
   elseif (doorsopenbox1==1 and allbox1==0) then
127
 
      SendMessage(%door1, "close")
128
 
      doorsopenbox1 = 0
129
 
   end
130
 
end
131
 
-----------------------------------------------------------------------------------------
132
 
y0=3
133
 
x0=11
134
 
fill_stones("st-rock1",x0,y0,8,2)
135
 
fill_stones("st-rock1",x0,y0,2,5)
136
 
fill_stones("st-rock1",x0+6,y0,2,8)
137
 
enigma.KillStone(x0+4, y0)
138
 
enigma.KillStone(x0+4, y0+1)
139
 
draw_stones("st-rock1",{x0,y0+7}, {1,0},8 )
140
 
draw_floor("fl-water",{x0+4,y0}, {0,1},2 )
141
 
set_floor("fl-water",x0,y0+6)
142
 
set_floor("fl-water",x0+4,y0+3)
143
 
 
144
 
set_stone("st-thief",x0+1,y0+1)
145
 
set_stone("st-thief",x0+2,y0+1)
146
 
oxyd(x0,y0+2)
147
 
enigma.KillStone(x0+1, y0+2)
148
 
set_stone("st-thief",x0+1,y0+3)
149
 
set_stone("st-thief",x0+2,y0+3)
150
 
set_stone("st-rock1",x0+2,y0+4)
151
 
 
152
 
set_item("it-magicwand",x0+3,y0+3)
153
 
 
154
 
set_stone("st-wood",x0+3,y0+5)
155
 
set_stone("st-wood",x0+4,y0+5)
156
 
set_stone("st-wood",x0+4,y0+6)
157
 
 
158
 
set_item("it-trigger", x0+5,y0+3, {action="callback", target="box2trig1"})
159
 
set_item("it-trigger", x0+5,y0+4, {action="callback", target="box2trig2"})
160
 
set_item("it-trigger", x0+3,y0+6, {action="callback", target="box2trig3"})
161
 
 
162
 
local switchesbox2={0, 0, 0}
163
 
doorsopenbox2=0
164
 
 
165
 
function box2trig1 () triggerbox2(1) end 
166
 
function box2trig2 () triggerbox2(2) end 
167
 
function box2trig3 () triggerbox2(3) end 
168
 
 
169
 
function triggerbox2(num)
170
 
   %switchesbox2[num] = 1-%switchesbox2[num]
171
 
   allbox2=1
172
 
   for x=1,3 do
173
 
      if (%switchesbox2[x]==0) then
174
 
         allbox2 = 0
175
 
      end
176
 
   end
177
 
   if (doorsopenbox2==0 and allbox2==1) then
178
 
      draw_floor("fl-wood",{15,3}, {0,1},2 )  -- feste Koordinaten
179
 
      doorsopenbox2 = 1
180
 
   elseif (doorsopenbox2==1 and allbox2==0) then
181
 
      draw_floor("fl-water",{15,3}, {0,1},2 )  -- feste Koordinaten
182
 
      doorsopenbox2 = 0
183
 
   end
184
 
end
185
 
-----------------------------------------------------------------------------------------
186
 
y0=3
187
 
x0=20
188
 
fill_stones("st-rock1",x0+1,y0+1,2,3)
189
 
fill_stones("st-rock1",x0+5,y0+1,2,2)
190
 
draw_stones("st-rock1",{x0+1,y0+6}, {1,0},3)
191
 
set_stone("st-rock1",x0+4,y0+4)
192
 
set_stone("st-door",x0+3,y0,{name="door3", type="h"})
193
 
set_stone("st-coinslot",x0+2,y0,{action="openclose", target="door3"})
194
 
 
195
 
oxyd(x0+1,y0+3)
196
 
 
197
 
set_stone("st-wood",x0+3,y0+4)
198
 
set_stone("st-wood",x0+4,y0+5)
199
 
set_stone("st-wood",x0+5,y0+5)
200
 
 
201
 
set_stone("st-bolder-e", x0+11,y0+5, {name="bolder1"}) -- in Box4
202
 
set_stone("st-blocker", x0+7,y0+5, {name="blocker2"})
203
 
set_stone("st-blocker", x0+8,y0+5, {name="blocker3"})
204
 
 
205
 
set_item("it-trigger", x0+4,y0+3, {action="callback", target="box3trig1"})
206
 
set_item("it-trigger", x0+5,y0+3, {action="callback", target="box3trig2"})
207
 
set_item("it-trigger", x0+3,y0+5, {action="callback", target="box3trig3"})
208
 
 
209
 
local switchesbox3={0, 0, 0}
210
 
doorsopenbox3=0
211
 
 
212
 
function box3trig1 () triggerbox3(1) end 
213
 
function box3trig2 () triggerbox3(2) end 
214
 
function box3trig3 () triggerbox3(3) end 
215
 
 
216
 
function triggerbox3(num)
217
 
   %switchesbox3[num] = 1-%switchesbox3[num]
218
 
   allbox3=1
219
 
   for x=1,3 do
220
 
      if (%switchesbox3[x]==0) then
221
 
         allbox3 = 0
222
 
      end
223
 
   end
224
 
   if (doorsopenbox3==0 and allbox3==1) then
225
 
      SendMessage("bolder1", "direction", WEST)
226
 
      doorsopenbox3 = 1
227
 
   elseif (doorsopenbox3==1 and allbox3==0) then
228
 
      SendMessage("bolder1", "direction", EAST)
229
 
      doorsopenbox3 = 0
230
 
   end
231
 
end
232
 
-----------------------------------------------------------------------------------------
233
 
y0=3
234
 
x0=28
235
 
draw_stones("st-rock1",{x0+1,y0+1}, {1,0},2 )
236
 
draw_stones("st-rock1",{x0+6,y0+1}, {0,1},6 )
237
 
set_stone("st-rock1",x0+4,y0+2)
238
 
set_stone("st-rock1",x0+3,y0+4)
239
 
set_stone("st-rock1",x0+4,y0+6)
240
 
set_stone("st-bombs",x0+5,y0+5)
241
 
set_stone("st-bombs",x0+5,y0+6)
242
 
set_stone("st-bombs",x0+5,y0+7)
243
 
set_stone("st-grate2",x0+4,y0+5)
244
 
 
245
 
draw_stones("st-wood",{x0+2,y0+2}, {0,1},2 )
246
 
set_stone("st-wood",x0+3,y0+3)
247
 
oxyd(x0+6,y0+5)
248
 
bomb1 = set_item("it-blackbomb",x0+4,y0+5)
249
 
--draw_items("it-blackbomb",{x0+5,y0+5}, {0,1},3)
250
 
 
251
 
set_item("it-trigger", x0+5,y0+1, {action="callback", target="box4trig1"})
252
 
set_item("it-trigger", x0+4,y0+4, {action="callback", target="box4trig2"})
253
 
set_item("it-trigger", x0+2,y0+3, {action="callback", target="box4trig3"})
254
 
set_item("it-trigger", x0+2,y0+4, {action="callback", target="box4trig4"})
255
 
 
256
 
local switchesbox4={0, 0, 0, 0}
257
 
exploded=0
258
 
 
259
 
function box4trig1 () triggerbox4(1) end 
260
 
function box4trig2 () triggerbox4(2) end 
261
 
function box4trig3 () triggerbox4(3) end    
262
 
function box4trig4 () triggerbox4(4) end 
263
 
 
264
 
function triggerbox4(num)
265
 
   %switchesbox4[num] = 1-%switchesbox4[num]
266
 
   allbox4=1
267
 
   for x=1,4 do
268
 
      if (%switchesbox4[x]==0) then
269
 
         allbox4 = 0
270
 
      end
271
 
   end
272
 
   if (allbox4==1 and exploded==0) then
273
 
      SendMessage(bomb1, "explode")
274
 
      exploded=1
275
 
   end
276
 
end
277
 
-----------------------------------------------------------------------------------------
278
 
y0=14
279
 
x0=3
280
 
enigma.KillStone(x0+3, y0)
281
 
set_stone("st-key_a",x0+2,y0, {action="openclose", target="door4"})
282
 
doorh( x0+3,y0, {name="door4"})
283
 
draw_stones("st-rock1",{x0+3,y0+3}, {0,1},4 )
284
 
draw_stones("st-rock1",{x0+6,y0+1}, {0,1},3 )
285
 
set_stone("st-rock1",x0+1,y0+1)
286
 
set_stone("st-rock1",x0+5,y0+5)
287
 
 
288
 
draw_stones("st-wood",{x0+2,y0+2}, {1,0},3 )
289
 
set_stone("st-wood",x0+1,y0+5)
290
 
 
291
 
set_stone("st-rock1_move",x0+2,y0+5)
292
 
set_item("it-coin1", x0+2,y0+5)
293
 
set_item("it-wormhole", x0+1,y0+5, {name="warp1",targetx="4.5", targety="18.5",strength=5})
294
 
 
295
 
oxyd(x0+3,y0+5)
296
 
 
297
 
set_item("it-trigger", x0+3,y0+1, {action="callback", target="box5trig1"})
298
 
set_item("it-trigger", x0+6,y0+4, {action="callback", target="box5trig2"})
299
 
set_item("it-trigger", x0+4,y0+2, {action="callback", target="box5trig3"})
300
 
 
301
 
local switchesbox5={0, 0, 0}
302
 
doorsopenbox5=0
303
 
 
304
 
function box5trig1 () triggerbox5(1) end 
305
 
function box5trig2 () triggerbox5(2) end 
306
 
function box5trig3 () triggerbox5(3) end 
307
 
 
308
 
function triggerbox5(num)
309
 
   %switchesbox5[num] = 1-%switchesbox5[num]
310
 
   allbox5=1
311
 
   for x=1,3 do
312
 
      if (%switchesbox5[x]==0) then
313
 
         allbox5 = 0
314
 
      end
315
 
   end
316
 
   if (doorsopenbox5==0 and allbox5==1) then
317
 
      set_attribs(enigma.GetNamedObject("warp1"), {targetx="12.5", targety="19.5",strength=0})   
318
 
      doorsopenbox5 = 1
319
 
   elseif (doorsopenbox5==1 and allbox5==0) then
320
 
        set_attribs(enigma.GetNamedObject("warp1"), {targetx="4.5", targety="18.5",strength=5})
321
 
      doorsopenbox5 = 0
322
 
   end
323
 
end
324
 
-----------------------------------------------------------------------------------------
325
 
y0=14
326
 
x0=11
327
 
enigma.KillStone(x0+5, y0)
328
 
oxyd(x0,y0+4)
329
 
local laser1 = laser(x0+6,y0+1,TRUE,WEST)
330
 
draw_stones("st-death",{x0+4,y0+2}, {1,0},3 )
331
 
draw_stones("st-death",{x0+1,y0+6}, {1,0},4 )
332
 
set_stone("st-death",x0+1,y0+2)
333
 
set_stone("st-death",x0+2,y0+4)
334
 
set_stone("st-death",x0+4,y0+5)
335
 
 
336
 
draw_stones("st-wood",{x0+3,y0+3}, {0,1},2 )
337
 
set_stone("st-wood",x0+5,y0+4)
338
 
 
339
 
set_item("it-trigger", x0+1,y0+3, {action="callback", target="box6trig1"})
340
 
set_item("it-trigger", x0+2,y0+3, {action="callback", target="box6trig2"})
341
 
set_item("it-trigger", x0+6,y0+3, {action="callback", target="box6trig3"})
342
 
set_item("it-extralife", x0+2,y0+5)
343
 
 
344
 
local switchesbox6={0, 0, 0}
345
 
doorsopenbox6=0
346
 
 
347
 
function box6trig1 () triggerbox6(1) end 
348
 
function box6trig2 () triggerbox6(2) end 
349
 
function box6trig3 () triggerbox6(3) end 
350
 
 
351
 
function triggerbox6(num)
352
 
   %switchesbox6[num] = 1-%switchesbox6[num]
353
 
   allbox6=1
354
 
   for x=1,3 do
355
 
      if (%switchesbox6[x]==0) then
356
 
         allbox6 = 0
357
 
      end
358
 
   end
359
 
   if (doorsopenbox6==0 and allbox6==1) then
360
 
      SendMessage(%laser1, "off")
361
 
      doorsopenbox6 = 1
362
 
   elseif (doorsopenbox6==1 and allbox6==0) then
363
 
        SendMessage(%laser1, "on")
364
 
      doorsopenbox6 = 0
365
 
   end
366
 
end
367
 
-----------------------------------------------------------------------------------------
368
 
y0=14
369
 
x0=20
370
 
fill_stones("st-glass1",x0+1,y0+1,3,2)
371
 
draw_stones("st-glass1",{x0+6,y0+4}, {0,1},3 )
372
 
draw_stones("st-glass1",{x0+5,y0+5}, {0,1},2 )
373
 
set_stone("st-glass1",x0+6,y0+1)
374
 
set_stone("st-glass1",x0+3,y0+3)
375
 
set_stone("st-glass1",x0+1,y0+6)
376
 
 
377
 
local door2 = set_stone("st-door-v",x0+7,y0+3)
378
 
 
379
 
set_stone("st-glass1",x0+4,y0)
380
 
 
381
 
set_stone("st-wood",x0+4,y0+3)
382
 
set_stone("st-wood",x0+5,y0+3)
383
 
set_stone("st-wood",x0+4,y0+5)
384
 
 
385
 
kill_stone(x0+5,y0)
386
 
set_item("it-crack3", x0+5,y0)
387
 
set_stone("st-glass1_hole",x0+5,y0)
388
 
 
389
 
oxyd(x0+2,y0+2)
390
 
 
391
 
set_item("it-trigger", x0+1,y0+3, {action="callback", target="box7trig1"})
392
 
set_item("it-trigger", x0+1,y0+5, {action="callback", target="box7trig2"})
393
 
set_item("it-trigger", x0+2,y0+6, {action="callback", target="box7trig3"})         
394
 
 
395
 
local switchesbox7={0, 0, 0}
396
 
doorsopenbox7=0
397
 
 
398
 
function box7trig1 () triggerbox7(1) end 
399
 
function box7trig2 () triggerbox7(2) end 
400
 
function box7trig3 () triggerbox7(3) end 
401
 
 
402
 
function triggerbox7(num)
403
 
   %switchesbox7[num] = 1-%switchesbox7[num]
404
 
   allbox7=1
405
 
   for x=1,3 do
406
 
      if (%switchesbox7[x]==0) then
407
 
         allbox7 = 0
408
 
      end
409
 
   end     
410
 
   if (doorsopenbox7==0 and allbox7==1) then
411
 
      set_stone("st-glass1_hole",24,14)
412
 
      SendMessage(%door2, "open")
413
 
      doorsopenbox7 = 1
414
 
   elseif (doorsopenbox7==1 and allbox7==0) then
415
 
      set_stone("st-glass1",24,14)
416
 
      SendMessage(%door2, "close")
417
 
      doorsopenbox7 = 0
418
 
   end
419
 
end
420
 
-----------------------------------------------------------------------------------------
421
 
y0=14
422
 
x0=28
423
 
draw_stones("st-rock1",{x0+1,y0+1}, {1,0},6 )
424
 
draw_stones("st-rock1",{x0+1,y0+5}, {1,0},4 )
425
 
set_stone("st-rock1",x0+4,y0+6)
426
 
set_stone("st-glass",x0+2,y0+3)
427
 
set_stone("st-glass",x0+4,y0+3)
428
 
 
429
 
kill_stone(x0,y0+3)
430
 
 
431
 
set_stone("st-rock1_move",x0+2,y0+4)
432
 
set_stone("st-rock1_move",x0+5,y0+4)
433
 
set_stone("st-rock1_move",x0+6,y0+5)
434
 
 
435
 
set_item("it-trigger", x0+1,y0+2, {action="callback", target="box8trig1"})
436
 
set_item("it-trigger", x0+5,y0+2, {action="callback", target="box8trig2"})
437
 
set_item("it-trigger", x0+6,y0+4, {action="callback", target="box8trig3"})
438
 
set_item("it-trigger", x0,y0+3, {action="callback", target="box8trig4"})
439
 
 
440
 
local laser2 = laser(x0+1,y0+6,FALSE,EAST)
441
 
oxyd(x0+3,y0+6)
442
 
 
443
 
local switchesbox8={0, 0, 0, 0}
444
 
doorsopenbox8=0
445
 
 
446
 
function box8trig1 () triggerbox8(1) end 
447
 
function box8trig2 () triggerbox8(2) end 
448
 
function box8trig3 () triggerbox8(3) end 
449
 
function box8trig4 () triggerbox8(4) end 
450
 
 
451
 
function triggerbox8(num)
452
 
   %switchesbox8[num] = 1-%switchesbox8[num]
453
 
   allbox8=1
454
 
   for x=1,4 do
455
 
      if (%switchesbox8[x]==0) then
456
 
         allbox8 = 0
457
 
      end
458
 
   end
459
 
   if (doorsopenbox8==0 and allbox8==1) then
460
 
      SendMessage(%laser2, "on")
461
 
      doorsopenbox8 = 1
462
 
   elseif (doorsopenbox8==1 and allbox8==0) then
463
 
      SendMessage(%laser2, "off")
464
 
      doorsopenbox8 = 0
465
 
   end
466
 
end
467
 
 
468
 
oxyd_shuffle()