adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] Release_0-3-1 00147c0 211/237: IMPROVED S


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 00147c0 211/237: IMPROVED Silverhair's schedule
Date: Mon, 25 Jul 2016 18:15:13 +0000 (UTC)

tag: Release_0-3-1
commit 00147c0645a122de384f7e2902aad64a20718645
Author: adondev <adondev>
Commit: adondev <adondev>

    IMPROVED Silverhair's schedule
    IMPORVED events.py
    FIXED audio schedule
---
 scripts/init.py                               |    1 -
 scripts/modules/events.py                     |    4 ++--
 scripts/schedules/audio/in_game.py            |   28 +++++++++++--------------
 scripts/schedules/mapcharacters/extro.py      |    9 +++++++-
 scripts/schedules/mapcharacters/silverhair.py |    3 ++-
 5 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/scripts/init.py b/scripts/init.py
index e22dfb5..1c1198d 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -808,7 +808,6 @@ class title_screen:
         ev.set_script ("teleport", (0, 20, 12, STAND_EAST))
         lm.add_event (ev)
 
-
         # From veranda to silverhair
         ev = enter_event ()
         ev.thisown = C
diff --git a/scripts/modules/events.py b/scripts/modules/events.py
index 60b5d6e..b98ebba 100755
--- a/scripts/modules/events.py
+++ b/scripts/modules/events.py
@@ -22,8 +22,8 @@ def switch_submap (mychar, x, y, submap, dir):
     else:
         schedule_active = 0
 
-    # -- comparing mychar and player directly does not work (???)
-    if mychar.get_name () == adonthell.gamedata_player ().get_name ():
+    # -- only fade for the player
+    if mychar.get_id () == "Player":
         # -- fade the new submap in if we teleport the player
         adonthell.gamedata_engine ().fade_out ()
         mychar.jump_to (x, y, submap, dir)
diff --git a/scripts/schedules/audio/in_game.py 
b/scripts/schedules/audio/in_game.py
index 43ae5fb..7490063 100644
--- a/scripts/schedules/audio/in_game.py
+++ b/scripts/schedules/audio/in_game.py
@@ -18,31 +18,27 @@ import adonthell
 
 class in_game:
     def __init__ (self):
-        self.next_song = -1
+        pass
 
     # -- method called everytime a song has finished playing
     #    load song before playing, as the mixer seems to discard it
     #    after it's been played once
     def music_finished (self, song):
+        music = adonthell.gamedata_get_quest ("demo").get_val ("music")
+        
         # -- if we're in Silverhair's room, play special tune
         if adonthell.gamedata_player ().submap () == 13:
-            # -- resume with the song that played before entering
-            if self.next_song != 2 and song != 2: self.next_song = song
-
             adonthell.audio_load_background (2, "audio/at-demo-7.ogg")
             adonthell.audio_play_background (2)
 
-        # -- right after leaving Silverhair's room
-        elif self.next_song >= 0:
-            adonthell.audio_fade_in_background (self.next_song, 500)
-            self.next_song = -1
-
-        # -- otherwise just loop at-demo-5 and at-demo-6
+        # -- otherwise
+        elif music == 0:
+            adonthell.gamedata_get_quest ("demo").set_val ("music", 1)
+            adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
+            adonthell.audio_play_background (1)
+        
         else:
-            if song == 0:
-                adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
-                adonthell.audio_play_background (1)
-            else:
-                adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
-                adonthell.audio_play_background (0)
+            adonthell.gamedata_get_quest ("demo").set_val ("music", 0)
+            adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
+            adonthell.audio_play_background (0)
             
diff --git a/scripts/schedules/mapcharacters/extro.py 
b/scripts/schedules/mapcharacters/extro.py
index 1ca2944..3d6ee9f 100644
--- a/scripts/schedules/mapcharacters/extro.py
+++ b/scripts/schedules/mapcharacters/extro.py
@@ -164,7 +164,7 @@ class extro:
             ("Ogg Vorbis Stereo", 1), \
             ("(where available)", 15), \
             ("The END", 6), \
-            ("Joel, you're fired! ;)", -1)]
+            ("Joel, you are fired! ;)", -1)]
             
         # -- text colors
         self.colors = ["white", "yellow", "red", "violet", "blue", "green"]
@@ -233,6 +233,13 @@ class extro:
             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
diff --git a/scripts/schedules/mapcharacters/silverhair.py 
b/scripts/schedules/mapcharacters/silverhair.py
index b237b12..50dc591 100755
--- a/scripts/schedules/mapcharacters/silverhair.py
+++ b/scripts/schedules/mapcharacters/silverhair.py
@@ -56,7 +56,8 @@ class silverhair:
             else:
                 say = randint (33, 66) * 10
                 delay = randint (100, 200) * 35
-                myself.set_goal (4, 4, STAND_SOUTH)
+                if myself.set_goal (4, 4, STAND_SOUTH) == 0:
+                    return
 
             myself.set_val ("say_something", say)
             myself.set_val ("delay", delay)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]