File: cave3b.lua

package info (click to toggle)
kq 0.99.cvs20070319-1.1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,344 kB
  • ctags: 2,870
  • sloc: ansic: 26,328; sh: 3,737; makefile: 203; perl: 100
file content (50 lines) | stat: -rw-r--r-- 806 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
-- cave3b - "Second part of cave on way to Oracle's tower"

function autoexec()
  refresh()
end


function entity_handler(en)
  return
end


function postexec()
  return
end


function refresh()
  showch("treasure1", 20)
end


-- Show the status of a chest
function showch(which_marker, which_chest)
  -- Set tiles if -1 passed in as 'which_chest' or if chest already opened
  if (which_chest < 0 or get_treasure(which_chest) == 1) then
    set_mtile(which_marker, 95)
    set_zone(which_marker, 0)
  end
end


function zone_handler(zn)
  if (zn == 0) then
--    combat(9)

  elseif (zn == 1) then
    change_map("cave3a", "uldoor1")

  elseif (zn == 2) then
    chest(20, I_B_LIFE, 1)
    refresh()

  elseif (zn == 3) then
    change_map("cave3a", "drdoor1")

  -- zn == 4 is a no-combat tile

  end
end