[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] Release_0-3-1 bf5e61e 123/237: Took care
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] Release_0-3-1 bf5e61e 123/237: Took care of the case when the player takes Erek to Jelom and has not made it into Bjarn's room yet |
Date: |
Mon, 25 Jul 2016 18:15:04 +0000 (UTC) |
tag: Release_0-3-1
commit bf5e61e7983591792a5a81ed1c981fc2bbc963f9
Author: adondev <adondev>
Commit: adondev <adondev>
Took care of the case when the player takes Erek to Jelom and has not made
it into Bjarn's room yet
---
scripts/dialogues/erek_start.py | 7 ++++
scripts/dialogues/jelom_2nd.py | 5 ++-
scripts/schedules/mapcharacters/erek.py | 62 ++++++++++++++++++++++---------
3 files changed, 55 insertions(+), 19 deletions(-)
diff --git a/scripts/dialogues/erek_start.py b/scripts/dialogues/erek_start.py
index 1203822..f4760bf 100755
--- a/scripts/dialogues/erek_start.py
+++ b/scripts/dialogues/erek_start.py
@@ -39,9 +39,16 @@ class erek_start:
if adonthell.gamedata_get_quest("demo").get_val ("bjarn_door_open")
== 2:
erek = adonthell.gamedata_get_character ("Erek Stonebreaker")
from events import switch_submap
+ erek.set_val ("goto", erek.submap ())
switch_submap (self.the_player, 7, 1, 6, 3)
switch_submap (erek, 7, 2, 7, 0)
+ if adonthell.gamedata_get_quest("demo").get_val ("convince_jelom")
== 2:
+ erek = adonthell.gamedata_get_character ("Erek Stonebreaker")
+ erek.set_schedule_active (0)
+ from events import switch_submap
+ switch_submap (self.the_player, 9, 1, 3, 3)
+ switch_submap (erek, 9, 2, 4, 0)
def __getattr__ (self, name):
diff --git a/scripts/dialogues/jelom_2nd.py b/scripts/dialogues/jelom_2nd.py
index a32b22f..1ca7e1d 100644
--- a/scripts/dialogues/jelom_2nd.py
+++ b/scripts/dialogues/jelom_2nd.py
@@ -38,6 +38,7 @@ class jelom_2nd:
player.set_schedule ("to_cellar")
erek = adonthell.gamedata_get_character("Erek Stonebreaker")
+ erek.set_schedule_active (1)
erek.set_schedule ("to_cellar")
erek.set_val ("delay", 45)
@@ -89,11 +90,13 @@ class jelom_2nd:
self.player.append (12)
self.cont.append (7)
self.player.append (-1)
- elif adonthell.gamedata_get_quest("demo").get_val
("convince_jelom") == 2:
+ else:
self.color = self.the_npc.get_color()
self.npc.append (23)
self.cont.append (13)
+ adonthell.gamedata_get_quest("demo").set_val
("convince_jelom" , 3)
+
self.player.append (-1)
def answer23 (self):
diff --git a/scripts/schedules/mapcharacters/erek.py
b/scripts/schedules/mapcharacters/erek.py
index 20c3307..a5d871f 100755
--- a/scripts/schedules/mapcharacters/erek.py
+++ b/scripts/schedules/mapcharacters/erek.py
@@ -28,11 +28,26 @@ class erek:
"This place is so much different from home.", \
"Who could have taken the gems?"]
- self.coords = [(5, 5, STAND_NORTH), \
- (10, 6, STAND_WEST), \
- (5, 3, STAND_NORTH), \
- (4, 5, STAND_SOUTH)]
-
+ # -- the coordinates for normal schedule
+ self.coords = \
+ [(5, 5, STAND_NORTH), \
+ (10, 6, STAND_WEST), \
+ (5, 3, STAND_NORTH), \
+ (4, 5, STAND_SOUTH)]
+
+ # -- the coordinates for getting back to common room
+ self.to_common = \
+ [(0, 7, STAND_WEST), \
+ (6, 1, STAND_NORTH)]
+
+ # -- the coordinates for getting back to the 1st floor
+ self.to_1st = \
+ [(0, 7, STAND_WEST), \
+ (6, 1, STAND_NORTH), \
+ (12, 1, STAND_NORTH), \
+ (2, 4, STAND_SOUTH)]
+
+ self.index = 0
def run (self):
myself = self.myself
@@ -44,26 +59,36 @@ class erek:
fingolson = adonthell.gamedata_get_character ("Bjarn Fingolson")
fingolson.launch_action (adonthell.gamedata_player ())
- # -- leave cellar again
+ # -- help the player with jelom
+ elif adonthell.gamedata_get_quest ("demo").get_val ("convince_jelom")
== 2:
+ myself.set_schedule_active (0)
+ # -- start Jelom's conversation with the player and Erek
+ jelom = adonthell.gamedata_get_character ("Jelom Rasgar")
+ jelom.launch_action (adonthell.gamedata_player ())
+
+ # -- leave Bjarn's room
elif myself.get_val ("leave_bjarn") == 1:
- submap = myself.submap ()
+ goto = myself.get_val ("goto")
+ myself.set_val ("delay", 0)
- # -- in Bjarn's room
- if submap == 7:
- myself.set_val ("delay", 0)
- myself.set_goal (0, 7, STAND_WEST)
- myself.set_val ("leave_bjarn", 2)
+ # -- goto first floor
+ if goto == 9: coords = self.to_1st
+ # -- goto common room
+ else: coords = self.to_common
- # -- in the Cellar
- elif submap == 4:
- myself.set_goal (6, 1, STAND_NORTH)
+ if self.index < len (coords):
myself.set_val ("leave_bjarn", 2)
+ x, y, dir = coords[self.index]
+ myself.set_goal (x, y, dir)
- # -- hopefully in the common room
+ # -- arrived
else:
myself.set_val ("leave_bjarn", 0)
- x, y, dir = self.coords[randint (0, 1)]
- myself.set_goal (x, y, dir)
+ if myself.submap () == 1:
+ x, y, dir = self.coords[randint (0, 1)]
+ myself.set_goal (x, y, dir)
+ else:
+ myself.set_schedule_active (0)
myself.set_val ("todo", 2)
@@ -86,6 +111,7 @@ class erek:
# -- on our way back from bjarn's room
if myself.get_val ("leave_bjarn") == 2:
myself.set_val ("leave_bjarn", 1)
+ self.index = self.index + 1
# -- switch places
else:
- [adonthell-wastesedge-commits] Release_0-3-1 4f7fafa 208/237: Removed useless stuff, (continued)
- [adonthell-wastesedge-commits] Release_0-3-1 4f7fafa 208/237: Removed useless stuff, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 2affe60 115/237: Oops! Forgot that one..., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 365c99f 100/237: Added Alek and Jelom, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 f5cbecf 142/237: FIXED spelling, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 662757a 091/237: FIXED a small bug in the python console, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 af508ec 185/237: ADDED in-game tunes, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 3bca664 054/237: Added new mapcharacters., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ae421bc 146/237: Python scripts files are now compiled by the Adonthell binary., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 3e84510 056/237: Forgot to update the Makefile, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 d6345fa 228/237: REMOVED audio schedule for the extro, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 bf5e61e 123/237: Took care of the case when the player takes Erek to Jelom and has not made it into Bjarn's room yet,
Kai Sterker <=
- [adonthell-wastesedge-commits] Release_0-3-1 1b6640a 151/237: MOVED engine control into seperate script, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7ff9ee3 116/237: FIXED a few spelling errors, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 89d9191 037/237: Added Talan Wendth, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 31f9068 122/237: Schedule to get everybody down the cellar, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ed1c142 160/237: FIXED Makefile.am's, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 6087908 137/237: ADDED Bjarn's schedule, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 69c9103 210/237: Fixed the extro a bit, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 79418df 227/237: ADDED Enter as alternative 'Action' key, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 4f1725f 119/237: FIXED erek and jelom, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 8fdfd66 165/237: Added Barn interior, Kai Sterker, 2016/07/25