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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
-- grotto2 - "Second, larger part of grotto north of Ekla"
function autoexec()
refresh()
end
function entity_handler(en)
return
end
function postexec()
return
end
function refresh()
if (get_progress(37) > 0) then
set_mtile("cancel", 265)
set_zone("cancel", 0)
end
if (get_treasure(48) == 1) then
set_mtile("treasure1", 265)
set_zone("treasure1", 0)
end
if (get_treasure(49) == 1) then
set_mtile("treasure2", 265)
set_zone("treasure2", 0)
end
end
function zone_handler(zn)
if (zn == 0) then
combat(24)
elseif (zn == 1) then
change_map("grotto", "portal")
elseif (zn == 2) then
if (get_progress(110) == 3) then
msg("$0 fits the rusty key into the lock.", 255, 0)
set_progress(110, 4)
elseif (get_progress(110) == 4) then
bubble(200, "Something's supposed to happen here... it hasn't been programmed yet.")
else
bubble(200, "This door is stuck tight.")
end
elseif (zn == 3) then
if (get_progress(37) == 0) then
set_progress(37, 1)
sfx(5)
msg("Rod of Cancellation procured", 255, 0)
refresh()
end
elseif (zn == 4) then
chest(48, 103, 1)
refresh()
elseif (zn == 5) then
chest(49, 50, 1)
refresh()
end
end
|