File: shadow_comm2.lua

package info (click to toggle)
naev 0.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 386,084 kB
  • sloc: ansic: 93,149; xml: 87,292; python: 2,347; sh: 904; makefile: 654; lisp: 162; awk: 4
file content (38 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (2)
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
--[[
<?xml version='1.0' encoding='utf8'?>
<event name="Shadowcomm2">
  <trigger>enter</trigger>
  <chance>3</chance>
  <cond>system.cur():presence("hostile") &lt; 300 and player.misnDone("Shadow Vigil") and not (player.misnDone("Dark Shadow") or var.peek("darkshadow_active") == true)</cond>
  <flags>
  </flags>
  <notes>
   <done_misn name="Shadow Vigil"/>
   <campaign>Shadow</campaign>
  </notes>
 </event>
 --]]
--[[
-- Comm Event for the Shadow missions
--]]

require ("proximity.lua") 

function create ()
    hailie = hook.timer(20000, "hailme")
    
    landhook = hook.land("finish")
    jumpouthook = hook.jumpout("finish")
end

-- Make the ship hail the player
function hailme()
    naev.missionStart("Dark Shadow")
    player.commClose()
    evt.finish()
end

function finish()
    hook.rm(hailie)
    evt.finish()
end