def __del__(self): oliver = adonthell.gamedata_get_character("Oliver Redwyne") if self.goto_players_room == 1: import events events.switch_submap(self.the_player, 12, 5, 3, 1) oliver.stop_moving() oliver.set_offset(0, 0) events.switch_submap(oliver, 12, 5, 4, 0)
def __del__(self): oliver = adonthell.gamedata_get_character ("Oliver Redwyne") if self.goto_players_room == 1: import events events.switch_submap (self.the_player, 12, 5, 3, 1) oliver.stop_moving () oliver.set_offset (0, 0) events.switch_submap (oliver, 12, 5, 4, 0)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) # -- bjarn's door closed? open = adonthell.gamedata_get_quest ("demo").get_val("bjarn_door_open") if open == 0 or open == 1: if p.get_name () == adonthell.gamedata_player ().get_name (): adonthell.gamedata_get_character ("Bjarn Fingolson").launch_action (p) p.stand () p.go_west () else: events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) free = adonthell.gamedata_get_quest ("demo").get_val("silverhair_free") # -- Jelom not convinced of Silverhair's innocence if p.get_val ("came_from_barn") == 1 and not free: p.stand () p.go_south () p.speak (_("I better leave the way I came.")) else: events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background (500)
def run (self, submap, x, y, dir, name): # -- just arrived -> do nothing if dir == adonthell.STAND_WEST: return p = adonthell.gamedata_get_character (name) if p.get_val ("came_from_barn") == 1: p.set_val ("came_from_barn", 0) p.set_val ("on_veranda", 1) events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background (500)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) # -- pantry door closed? locked = adonthell.gamedata_get_quest ("demo").get_val("pantry_locked") if locked == 0 or locked == 1: adonthell.gamedata_get_quest ("demo").set_val("pantry_locked", 1) p.stand () p.go_east () p.speak (_("The door to the pantry is locked.")) else: events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir)
def run(self): # -- deactivate game controls if self.index == 0: adonthell.gamedata_engine().set_control_active(0) # -- Bjarn walks up to chest elif self.index == 20: bjarn = self.text[3][0] if self.done == 0: bjarn.set_goal(7, 3, adonthell.STAND_NORTH) self.done = 1 if (bjarn.follow_path() == 0): return else: adonthell.gamedata_player().set_schedule_active(0) self.index = self.index + 1 self.zoom_to_chest() return # -- Talan bursts in elif self.index == 25 and self.done == 0: bjarn = self.text[3][0] bjarn.go_south() bjarn.load('bjarn_crying.mchar') talan = adonthell.gamedata_get_character('Talan Wendth') talan.load("talan_beaten.mchar") events.switch_submap(talan, 7, 1, 6, adonthell.STAND_EAST) # -- everyone look at Talan adonthell.gamedata_get_character("Erek Stonebreaker").stand_west() adonthell.gamedata_get_character("Jelom Rasgar").stand_west() adonthell.gamedata_get_character("Imoen Silverhair").stand_west() adonthell.gamedata_player().stand_west() talan.go_east() talan.stand_south() self.done = 1 elif self.index == 36 and self.bubble == None: # -- shutdown the mapview, it's no longer needed adonthell.gamedata_player().set_schedule_active(0) adonthell.gamedata_engine().fade_out() adonthell.gamedata_engine().mapview_stop() self.fade_to_forest() return if self.bubble == None: self.index = self.index + 1 self.bubble = self.make_bubble() self.done = 0
def run (self): # -- deactivate game controls if self.index == 0: adonthell.gamedata_engine ().set_control_active (0) # -- Bjarn walks up to chest elif self.index == 20: bjarn = self.text[3][0] if self.done == 0: bjarn.set_goal (7, 3, adonthell.STAND_NORTH) self.done = 1 if (bjarn.follow_path () == 0): return else: adonthell.gamedata_player ().set_schedule_active (0) self.index = self.index + 1 self.zoom_to_chest () return # -- Talan bursts in elif self.index == 25 and self.done == 0: bjarn = self.text[3][0] bjarn.go_south () bjarn.load ('bjarn_crying.mchar') talan = adonthell.gamedata_get_character ('Talan Wendth') talan.load ("talan_beaten.mchar") events.switch_submap (talan, 7, 1, 6, adonthell.STAND_EAST) # -- everyone look at Talan adonthell.gamedata_get_character ("Erek Stonebreaker").stand_west () adonthell.gamedata_get_character ("Jelom Rasgar").stand_west () adonthell.gamedata_get_character ("Imoen Silverhair").stand_west () adonthell.gamedata_player ().stand_west () talan.go_east () talan.stand_south () self.done = 1 elif self.index == 36 and self.bubble == None: # -- shutdown the mapview, it's no longer needed adonthell.gamedata_player ().set_schedule_active (0) adonthell.gamedata_engine ().fade_out () adonthell.gamedata_engine ().mapview_stop () self.fade_to_forest () return if self.bubble == None: self.index = self.index + 1 self.bubble = self.make_bubble () self.done = 0
def run(self, submap, x, y, dir, name): p = adonthell.gamedata_get_character(name) # -- bjarn's door closed? open = adonthell.gamedata_get_quest("demo").get_val("bjarn_door_open") if open == 0 or open == 1: if p.get_name() == adonthell.gamedata_player().get_name(): adonthell.gamedata_get_character( "Bjarn Fingolson").launch_action(p) p.stand() p.go_west() else: events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir)
def run(self, submap, x, y, dir, name): p = adonthell.gamedata_get_character(name) free = adonthell.gamedata_get_quest("demo").get_val("silverhair_free") # -- Jelom not convinced of Silverhair's innocence if p.get_val("came_from_barn") == 1 and not free: p.stand() p.go_south() p.speak(_("I better leave the way I came.")) else: events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background(500)
def run(self, submap, x, y, dir, name): # -- just arrived -> do nothing if dir == adonthell.STAND_WEST: return p = adonthell.gamedata_get_character(name) if p.get_val("came_from_barn") == 1: p.set_val("came_from_barn", 0) p.set_val("on_veranda", 1) events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background(500)
def run(self, submap, x, y, dir, name): p = adonthell.gamedata_get_character(name) # -- pantry door closed? locked = adonthell.gamedata_get_quest("demo").get_val("pantry_locked") if locked == 0 or locked == 1: adonthell.gamedata_get_quest("demo").set_val("pantry_locked", 1) p.stand() p.go_east() p.speak(_("The door to the pantry is locked.")) else: events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) p.set_val ("came_from_barn", 1) p.set_val ("on_veranda", 0) events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background (500) p.stand () p.go_west () silverhair = adonthell.gamedata_get_character ("Imoen Silverhair") # -- only initiate dialogue the first time the player enters if silverhair.get_val ("talked_to") == 0: silverhair.launch_action (p)
def run(self, submap, x, y, dir, name): p = adonthell.gamedata_get_character(name) p.set_val("came_from_barn", 1) p.set_val("on_veranda", 0) events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background(500) p.stand() p.go_west() silverhair = adonthell.gamedata_get_character("Imoen Silverhair") # -- only initiate dialogue the first time the player enters if silverhair.get_val("talked_to") == 0: silverhair.launch_action(p)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) free = adonthell.gamedata_get_quest ("demo").get_val("silverhair_free") # -- Jelom not convinced of Silverhair's innocence if not free and p.get_name () == adonthell.gamedata_player ().get_name (): # -- we only need that for the dialogue, ... p.set_val ("at_silverhairs_door", 1) p.stand () p.go_north () adonthell.gamedata_get_character ("Jelom Rasgar").launch_action (p) # -- ... so remove it again afterwards p.set_val ("at_silverhairs_door", 0) else: events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir) adonthell.audio_fade_out_background (500)
def __del__(self): # -- 'teleport' to Bjarn's room if adonthell.gamedata_get_quest("demo").get_val ("bjarn_door_open") == 2: bjarn = adonthell.gamedata_get_character ("Bjarn Fingolson") bjarn.do_stuff ("await_player") bjarn.time_callback_string ("1t", "start_talking") erek = adonthell.gamedata_get_character ("Erek Stonebreaker") import events erek.set_val ("goto", erek.submap ()) events.switch_submap (self.the_player, 7, 1, 6, 3) events.switch_submap (erek, 7, 2, 7, 0) # -- Teleport to Jelom if adonthell.gamedata_get_quest("demo").get_val ("convince_jelom") == 2: jelom = adonthell.gamedata_get_character ("Jelom Rasgar") jelom.jump_to (9, 2, 3, 1) jelom.time_callback_string ("1t", "start_talking") erek = adonthell.gamedata_get_character ("Erek Stonebreaker") erek.set_schedule_active (0) import events events.switch_submap (self.the_player, 9, 1, 3, 3) events.switch_submap (erek, 9, 2, 4, 0)
def run(self, submap, x, y, dir, name): events.switch_submap(adonthell.gamedata_get_character(name), self.smdest, self.xdest, self.ydest, self.destdir)
def run (self, submap, x, y, dir, name): p = adonthell.gamedata_get_character (name) p.set_val ("on_veranda", 0) events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir)
def run (self, submap, x, y, dir, name): events.switch_submap (adonthell.gamedata_get_character (name), self.smdest, self.xdest, self.ydest, self.destdir)
def run(self, submap, x, y, dir, name): p = adonthell.gamedata_get_character(name) p.set_val("on_veranda", 1) events.switch_submap(p, self.smdest, self.xdest, self.ydest, self.destdir)