~ubuntu-branches/ubuntu/edgy/enigma/edgy

« back to all changes in this revision

Viewing changes to data/levels/ss_pox11.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
 
levelw = 58
3
 
levelh = 37
4
 
 
5
 
create_world(levelw, levelh)
6
 
 
7
 
oxyd_default_flavor = "a"
8
 
fill_floor("fl-metal", 0, 0, levelw,levelh)
9
 
set_actor("ac-blackball", 32.5,18.5)
10
 
 
11
 
function renderLine( line, pattern)
12
 
    for i=1, strlen(pattern) do
13
 
      local c = strsub( pattern, i, i)
14
 
      if c == "#" then
15
 
         set_stone("st-rock2",i-1,line)
16
 
      elseif c == "D" then                      
17
 
         set_stone("st-death", i-1,line)
18
 
      elseif c=="d" then
19
 
         doorh( i-1,line, {name="door"})
20
 
         set_floor("fl-space", i-1,line)
21
 
      elseif c == "C" then                      
22
 
         set_stone("st-coinslot", i-1,line,{target="door", action="openclose"})
23
 
      elseif c=="1" then        
24
 
         set_item("it-coin1", i-1,line)
25
 
      elseif c=="2" then        
26
 
         set_item("it-coin2", i-1,line)
27
 
      elseif c=="4" then        
28
 
         set_item("it-coin4", i-1,line)
29
 
      elseif c=="s" then        
30
 
         set_item("it-spring1", i-1,line)
31
 
      elseif c=="c" then        
32
 
         set_item("it-coffee", i-1,line)
33
 
      elseif c=="a" then        
34
 
         set_floor("fl-abyss", i-1,line)
35
 
      elseif c=="0" then        
36
 
         set_floor("fl-space", i-1,line)         
37
 
      elseif c=="W" then                                                                
38
 
         set_item("it-magnet",i-1,line,{name="magnetW", on=0})
39
 
         set_floor("fl-space",i-1,line)  
40
 
      elseif c=="X" then                                                                
41
 
         set_item("it-magnet",i-1,line,{name="magnetX", on=0})
42
 
         set_floor("fl-space",i-1,line)
43
 
      elseif c=="Y" then                                                                
44
 
         set_item("it-magnet",i-1,line,{name="magnetY", on=0})
45
 
         set_floor("fl-space",i-1,line)
46
 
      elseif c=="Z" then                                                                
47
 
         set_item("it-magnet",i-1,line,{name="magnetZ", on=0})
48
 
         set_floor("fl-space",i-1,line)
49
 
      elseif c=="w" then
50
 
         set_item("it-trigger",i-1,line, {action="onoff", target="magnetW"})         
51
 
      elseif c=="x" then
52
 
         set_item("it-trigger",i-1,line, {action="onoff", target="magnetX"})   
53
 
      elseif c=="y" then
54
 
         set_item("it-trigger",i-1,line, {action="onoff", target="magnetY"})             
55
 
      elseif c=="z" then
56
 
         set_item("it-trigger",i-1,line, {action="onoff", target="magnetZ"})
57
 
      elseif c=="n" then
58
 
         document(i-1,line,"Rest on the bright spot for a minute")
59
 
      elseif c=="+" then                                                                
60
 
         set_item("it-trigger",i-1,line, {invisible=1, action="callback", target="s1"})
61
 
         set_floor("fl-light",i-1,line)
62
 
      elseif c=="~" then                                                                
63
 
         set_item("it-crack0",i-1,line)
64
 
      elseif c=="-" then                                                                
65
 
         --set_item("it-calculator",i-1,line)
66
 
      elseif c == "O" then
67
 
         oxyd( i-1, line)
68
 
        end
69
 
    end
70
 
end
71
 
 
72
 
renderLine(00, "##########################################################")
73
 
renderLine(01, "#                                                        #")
74
 
renderLine(02, "#                                                        #")
75
 
renderLine(03, "#                                                        #")
76
 
renderLine(04, "#                                                        #")
77
 
renderLine(05, "#                  D######################################")
78
 
renderLine(06, "#                  00000000000WwXxYyZz000000000000000000O#")
79
 
renderLine(07, "#                  D######################################")
80
 
renderLine(08, "#                                                        #")
81
 
renderLine(09, "#                                                        #")
82
 
renderLine(10, "#                                                        #")
83
 
renderLine(11, "#                                                        #")
84
 
renderLine(12, "#                  ####################                  #")
85
 
renderLine(13, "#                  #                  #                Dd#")
86
 
renderLine(14, "#                  #                  #                C0#")
87
 
renderLine(15, "#                  #                  #               s#0#")
88
 
renderLine(16, "#                  #     +            #                #0#")
89
 
renderLine(17, "#                  #                  #                #0#")
90
 
renderLine(18, "#                  # -      n         #                #0#")
91
 
renderLine(19, "#                  #                  #                #0#")
92
 
renderLine(20, "#                  #                  #                #0#")
93
 
renderLine(21, "#                  #                  #                #0#")
94
 
renderLine(22, "#                  #                  #                #0#")
95
 
renderLine(23, "#                  #                  #                #0#")
96
 
renderLine(24, "#                  ####################                #0#")
97
 
renderLine(25, "#                                                      #0#")
98
 
renderLine(26, "#                                                      #0#")
99
 
renderLine(27, "#                                                      #0#")
100
 
renderLine(28, "#                                                      #0#")
101
 
renderLine(29, "# ~                                                    #0#")
102
 
renderLine(30, "#  ~  ~                                                #0#")
103
 
renderLine(31, "#aaaaaaa                                               #0#")
104
 
renderLine(32, "# 4    a                                               #0#")
105
 
renderLine(33, "#   c  a                                               #0#")
106
 
renderLine(34, "# 1  1 a                                               #0#")
107
 
renderLine(35, "#1 2   a                                               #O#")
108
 
renderLine(36, "##########################################################")
109
 
 
110
 
flag = 1
111
 
time_old = 3600
112
 
 
113
 
function s1()
114
 
flag = 1 - flag
115
 
time = enigma.date("%S") + enigma.date("%M")*60
116
 
a = (time-time_old) * flag -- only when waiting ON the trigger
117
 
if a > 60 then
118
 
 set_stone("st-rock2_hole",19,18)
119
 
 document(19,18,"You'll do anything you're told!")
120
 
 end
121
 
time_old=time
122
 
end
123
 
 
124
 
oxyd_shuffle()