2
# (C) Copyright 2001 Kai Sterker <kaisterker@linuxgames.com>
3
# Part of the Adonthell Project http://adonthell.linuxgames.com
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License.
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY.
10
# See the COPYING file for more details
13
# -- Map Event to teleport a character from the veranda into
19
class brn_to_silverhair:
22
# smdest: destination submap
23
# xdest: X position on smdest
24
# ydest: Y position on smdest
25
# destdir: direction where to look at after the teleport
26
def __init__ (self, eventinstance, smdest, xdest, ydest, destdir):
30
self.destdir = destdir
32
def run (self, submap, x, y, dir, name):
33
p = adonthell.gamedata_get_character (name)
34
p.set_val ("came_from_barn", 1)
35
p.set_val ("on_veranda", 0)
37
events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir)
38
adonthell.audio_fade_out_background (500)
43
silverhair = adonthell.gamedata_get_character ("Imoen Silverhair")
45
# -- only initiate dialogue the first time the player enters
46
if silverhair.get_val ("talked_to") == 0:
47
silverhair.launch_action (p)