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 835df8f 083/237: ADDED Jane


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 835df8f 083/237: ADDED Janesta's schedule
Date: Mon, 25 Jul 2016 18:14:58 +0000 (UTC)

tag: Release_0-3-1
commit 835df8ff94518d8cf81a2a4e4470e184e2e62235
Author: adondev <adondev>
Commit: adondev <adondev>

    ADDED Janesta's schedule
    CHANGED delay for bubbles in Silverhair's room
    FIXED a typo in Lucia's dialogue
---
 scripts/dialogues/lucia_start.py |    6 ++--
 scripts/init.py                  |    5 +--
 scripts/schedules/Makefile.am    |    2 +-
 scripts/schedules/janesta.py     |   62 ++++++++++++++++++++++++++++++++++++++
 scripts/schedules/sarin.py       |    2 +-
 scripts/schedules/silverhair.py  |    2 +-
 6 files changed, 71 insertions(+), 8 deletions(-)

diff --git a/scripts/dialogues/lucia_start.py b/scripts/dialogues/lucia_start.py
index fe27aab..2313ad7 100755
--- a/scripts/dialogues/lucia_start.py
+++ b/scripts/dialogues/lucia_start.py
@@ -1,6 +1,6 @@
 class lucia_start:
     loop = []
-    strings = ["There is little doubt that this busy-looking woman is the 
unchallenged mistress of the Redwyne household. As she spots you, a look of 
resignation flashes across her face.", "You young people never learn to keep 
out of my kitchen, do you?", "Sorry madam, I did not mean to trespass, but do I 
need to talk to you.", "I have no time for this, woman! I have some questions 
for you.", "What questions? Don't you see I'm busy? Who's going to put the food 
on the table, if I'm going  [...]
+    strings = ["There is little doubt that this busy-looking woman is the 
unchallenged mistress of the Redwyne household. As she spots you, a look of 
resignation flashes across her face.", "You young people never learn to keep 
out of my kitchen, do you?", "Sorry madam, I did not mean to trespass, but I 
need to talk to you.", "I have no time for this, woman! I have some questions 
for you.", "What questions? Don't you see I'm busy? Who's going to put the food 
on the table, if I'm going to  [...]
 
     def set_name (self, new_name):
         pass
@@ -12,7 +12,7 @@ class lucia_start:
         pass
 
     def __init__(self):
-        self.dialogue = [self.start, self.answer0, self.answer2, self.answer3, 
self.answer6, self.answer8, self.answer10, self.answer11, self.answer13, 
self.answer15, self.answer16, self.answer18, self.answer19, self.answer21, 
self.answer22, self.answer23, self.answer24, self.answer25, self.answer27, 
self.answer29, self.answer30, self.answer32, self.answer33, self.answer35, 
self.answer36, self.answer38, self.answer40, self.answer41, self.answer42, 
self.answer44, self.answer46, self.answe [...]
+        self.dialogue = [self.start, self.answer0, self.answer2, self.answer3, 
self.answer6, self.answer8, self.answer10, self.answer11, self.answer13, 
self.answer15, self.answer16, self.answer18, self.answer19, self.answer21, 
self.answer22, self.answer23, self.answer24, self.answer25, self.answer27, 
self.answer29, self.answer30, self.answer32, self.answer33, self.answer35, 
self.answer36, self.answer38, self.answer40, self.answer41, self.answer42, 
self.answer44, self.answer46, self.answe [...]
 
     def clear (self):
         del self.dialogue
@@ -115,7 +115,7 @@ class lucia_start:
             self.cont.append (60)
         self.player.append (-1)
 
-    def answer201 (self):
+    def answer98 (self):
         self.color = the_npc.get_color()
         self.npc.append (85)
         self.cont.append (-1)
diff --git a/scripts/init.py b/scripts/init.py
index 675d033..3bd67c2 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -754,9 +754,10 @@ if retval < 5:
         janesta.set_dialogue ("dialogues/janesta_start")
         janesta.load ("servant1.mchar")
         janesta.set_map (map_engine.get_landmap ())
-        janesta.jump_to (13, 1, 4)
+        janesta.jump_to (13, 6, 3)
         janesta.set_action ("action_talk")
-        janesta.stand_east ()
+        janesta.stand_north ()
+        janesta.set_schedule ("janesta")
 
         # Once we want to generate the data context files,
         # just call gamedata::save (1) and copy the .data files
diff --git a/scripts/schedules/Makefile.am b/scripts/schedules/Makefile.am
index 4592ef8..800e8d5 100755
--- a/scripts/schedules/Makefile.am
+++ b/scripts/schedules/Makefile.am
@@ -2,6 +2,6 @@ pkgdatadir = $(gamedatadir)/scripts/schedules
 
 pkgdata_DATA = action_talk.py center_player.py keyboard_control.py orloth.py \
     sarin.py frostbloom.py silverhair.py oliver.py erek.py talan.py \
-    alek.py jelom.py
+    alek.py jelom.py janesta.py
 
 EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/schedules/janesta.py b/scripts/schedules/janesta.py
new file mode 100644
index 0000000..3cbfa91
--- /dev/null
+++ b/scripts/schedules/janesta.py
@@ -0,0 +1,62 @@
+#
+#  (C) Copyright 2001 Kai Sterker <address@hidden>
+#  Part of the Adonthell Project http://adonthell.linuxgames.com
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License.
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY.
+#
+#  See the COPYING file for more details
+#
+
+# -- Movement schedule for Janesta Skywind
+#
+#    She'll busy herself in Silverhair's room
+
+
+speech = ["Oh, dear. Oh, dear.", \
+          "What will happen to us if they take the Mistress?", \
+          "I must do something about this awful room.", \
+          "Oh, how do they expect us to live decently in a place like this?"]
+
+coords = [(1, 3, STAND_NORTH), \
+          (6, 3, STAND_NORTH), \
+          (1, 5, STAND_SOUTH), \
+          (4, 2, STAND_WEST)]
+
+todo = myself.get_val ("todo")
+
+# -- waiting
+if todo == 0:
+    delay = myself.get_val ("delay")
+    # If standing delay expired, move around next time
+    if delay == 0:
+        myself.set_val ("todo", 1)
+    else:
+        myself.set_val ("delay", delay - 1)
+
+# -- engage a new movement
+elif todo == 1:
+    x, y, dir = coords[randint (0, 3)]
+
+    myself.set_goal (x, y, dir)
+    myself.set_val ("todo", 2)
+
+# -- moving
+elif todo == 2:
+    if myself.follow_path () == 1:
+        # -- the time we stay at the same place
+        delay = randint (20, 60) * 10
+
+        myself.set_val ("delay", delay)
+        myself.set_val ("todo", 0)
+
+
+# -- utter a random remark
+tmp = myself.get_val ("say_something")
+myself.set_val ("say_something", tmp - 1)
+if tmp == 0:
+    myself.speak (speech[randint (0, 3)])
+    delay = randint (50, 75) * 35
+    myself.set_val ("say_something", delay)
diff --git a/scripts/schedules/sarin.py b/scripts/schedules/sarin.py
index d7ac3aa..71cb176 100755
--- a/scripts/schedules/sarin.py
+++ b/scripts/schedules/sarin.py
@@ -104,5 +104,5 @@ tmp = myself.get_val ("say_something")
 myself.set_val ("say_something", tmp - 1)
 if tmp == 0:
     myself.speak (speech[randint (0, 3)])
-    delay = randint (50, 150) * 10
+    delay = randint (50, 150) * 15
     myself.set_val ("say_something", delay)
diff --git a/scripts/schedules/silverhair.py b/scripts/schedules/silverhair.py
index 3944ec6..4deebee 100755
--- a/scripts/schedules/silverhair.py
+++ b/scripts/schedules/silverhair.py
@@ -65,5 +65,5 @@ if say == 0:
     else:
         myself.speak (speech[randint (0, 2)])
 
-    say = randint (50, 150) * 20
+    say = randint (60, 180) * 20
     myself.set_val ("say_something", say)



reply via email to

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