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 0e77bb6 032/237: ADDED dial


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 0e77bb6 032/237: ADDED dialogues of Oliver and Bjarn
Date: Mon, 25 Jul 2016 18:14:54 +0000 (UTC)

tag: Release_0-3-1
commit 0e77bb6738e2118de6aefe60b8975058fb9ba111
Author: adondev <adondev>
Commit: adondev <adondev>

    ADDED dialogues of Oliver and Bjarn
---
 scripts/dialogues/Makefile.am     |    3 +-
 scripts/dialogues/bjarn_start.py  |  196 +++++++++++++++++++++++++++++++++++++
 scripts/dialogues/oliver_start.py |  154 +++++++++++++++++++++++++++++
 scripts/init.py                   |    1 +
 4 files changed, 353 insertions(+), 1 deletion(-)

diff --git a/scripts/dialogues/Makefile.am b/scripts/dialogues/Makefile.am
index 4d31fd9..970c05f 100755
--- a/scripts/dialogues/Makefile.am
+++ b/scripts/dialogues/Makefile.am
@@ -1,6 +1,7 @@
 pkgdatadir = $(gamedatadir)/scripts/dialogues
 
 pkgdata_DATA = orloth_start.py lucia_start.py sarin_start.py \
-    janesta_start.py erek_start.py
+    janesta_start.py erek_start.py oliver_start.py bjarn_start.py
 
 EXTRA_DIST = $(pkgdata_DATA)
+
diff --git a/scripts/dialogues/bjarn_start.py b/scripts/dialogues/bjarn_start.py
new file mode 100755
index 0000000..f0192a3
--- /dev/null
+++ b/scripts/dialogues/bjarn_start.py
@@ -0,0 +1,196 @@
+class bjarn_start:
+    loop = []
+    strings = ["You try the door, but find it locked. From within the room you 
hear a deep voice.", "At the door to their room, Erek produces a key and 
unlocks it.", "Maybe I should not be doing this, but I do want my master to get 
his stones back.", "I do not wish to be disturbed right now, so please go away! 
First I am burglarised, and now I can get no peace with all the busybodies 
running around, making my tragedy their business!", "Erek, who is this, and why 
have you let him in?", "T [...]
+
+    def set_name (self, new_name):
+        pass
+
+    def set_npc (self, new_npc):
+        pass
+
+    def set_portrait (self, new_portrait):
+        pass
+
+    def __init__(self):
+        self.dialogue = [self.start, self.answer0, self.answer1, self.answer2, 
self.answer4, self.answer6, self.answer8, self.answer10, self.answer12, 
self.answer14, self.answer15, self.answer16, self.answer18, self.answer20, 
self.answer23, self.answer25, self.answer27, self.answer29, None]
+
+    def clear (self):
+        del self.dialogue
+
+        quests["demo"].set( "bjarn_door_open", 2 );
+        quests["demo"].set( "ask_packed_gems", 1 );
+        quests["demo"].set( "know_alek_eavesdrop", 1 );
+        quests["demo"].set( "know_bjarns_insult", 1 );
+        
+
+
+    def __getattr__ (self, name):
+        return 0
+
+    def run (self, answer):
+        self.npc = []
+        self.player = []
+        self.cont = []
+        self.dialogue[answer]()
+
+    def start (self):
+        if quests["demo"].get("bjarn_door_open") == 3:
+
+            self.color = 0
+            self.npc.append (12)
+            self.cont.append (8)
+            self.player.append (-1)
+        if quests["demo"].get("bjarn_door_open") == 2:
+
+            self.color = 0
+            self.npc.append (1)
+            self.cont.append (2)
+            quests["demo"].set( "bjarn_door_open", 3 )
+
+            self.player.append (-1)
+        if quests["demo"].get("bjarn_door_open") == 0:
+
+            self.color = 0
+            self.npc.append (0)
+            self.cont.append (1)
+            quests.get ("demo").set ("bjarn_door_open" , 1)
+
+            self.player.append (-1)
+
+    def answer0 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (3)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer1 (self):
+        self.set_npc ("Erek Stonebreaker")
+        self.color = characters["Erek Stonebreaker"].get_color()
+        self.npc.append (2)
+        self.cont.append (3)
+        self.player.append (-1)
+
+    def answer2 (self):
+        self.set_npc (the_npc.get_name())
+        self.color = the_npc.get_color()
+        self.npc.append (4)
+        self.cont.append (4)
+        self.player.append (-1)
+
+    def answer4 (self):
+        self.set_npc ("Erek Stonebreaker")
+        self.color = characters["Erek Stonebreaker"].get_color()
+        self.npc.append (5)
+        self.cont.append (-1)
+        self.player.append (6)
+        self.cont.append (5)
+        self.player.append (-1)
+
+    def answer6 (self):
+        self.set_npc (the_npc.get_name())
+        self.color = the_npc.get_color()
+        self.npc.append (7)
+        self.cont.append (-1)
+        self.player.append (8)
+        self.cont.append (6)
+        self.player.append (-1)
+
+    def answer8 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (9)
+        self.cont.append (-1)
+        self.player.append (10)
+        self.cont.append (7)
+        self.player.append (-1)
+
+    def answer10 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (11)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer12 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (13)
+        self.cont.append (-1)
+        if quests["demo"].get( "know_alek_eavesdrop" ) == 1:
+
+            self.player.append (16)
+            self.cont.append (11)
+        if quests["demo"].get( "know_bjarns_insult" ) == 1:
+
+            self.player.append (15)
+            self.cont.append (10)
+        if quests["demo"].get( "ask_packed_gems" ) == 1:
+
+            self.player.append (14)
+            self.cont.append (9)
+        self.player.append (-1)
+
+    def answer14 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (17)
+        self.cont.append (-1)
+        self.player.append (18)
+        self.cont.append (12)
+        self.player.append (-1)
+
+    def answer18 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (19)
+        self.cont.append (-1)
+        self.player.append (20)
+        self.cont.append (13)
+        self.player.append (-1)
+
+    def answer20 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (24)
+        self.cont.append (-1)
+        self.player.append (25)
+        self.cont.append (15)
+        self.player.append (-1)
+
+    def answer25 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (26)
+        self.cont.append (-1)
+        self.player.append (27)
+        self.cont.append (16)
+        self.player.append (-1)
+
+    def answer27 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (28)
+        self.cont.append (-1)
+        self.player.append (29)
+        self.cont.append (17)
+        self.player.append (-1)
+
+    def answer29 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (30)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer15 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (21)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer16 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (22)
+        self.cont.append (-1)
+        self.player.append (23)
+        self.cont.append (14)
+        self.player.append (-1)
+
+    def answer23 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (24)
+        self.cont.append (-1)
+        self.player.append (25)
+        self.cont.append (15)
+        self.player.append (-1)
diff --git a/scripts/dialogues/oliver_start.py 
b/scripts/dialogues/oliver_start.py
new file mode 100755
index 0000000..5056051
--- /dev/null
+++ b/scripts/dialogues/oliver_start.py
@@ -0,0 +1,154 @@
+class oliver_start:
+    loop = []
+    strings = ["As he notices you, the boy stops whatever he's been doing. 
With a cheerful grin on his face, he turns towards you.", "Hello sir! Welcome 
to Waste's Edge.", "Oh! I am Oliver, sir. I help Mum and Dad with the Inn. 
Looking after the stables and such.", "Why yes! Would you belive that we have 
an actual Elven Lady staying at the Inn?", "Really? An Elven Lady?", "Yes, sir. 
Lady Silverbeard. From Cirdanth. And her two servants! She frightened me a bit, 
but now she's locked up in [...]
+
+    def set_name (self, new_name):
+        pass
+
+    def set_npc (self, new_npc):
+        pass
+
+    def set_portrait (self, new_portrait):
+        pass
+
+    def __init__(self):
+        self.dialogue = [self.start, self.answer0, self.answer4, self.answer6, 
self.answer7, self.answer8, self.answer11, self.answer13, self.answer15, 
self.answer16, self.answer18, self.answer19, self.answer21, None]
+
+    def clear (self):
+        del self.dialogue
+
+    def __getattr__ (self, name):
+        return 0
+
+    def run (self, answer):
+        self.npc = []
+        self.player = []
+        self.cont = []
+        self.dialogue[answer]()
+
+    def start (self):
+        self.color = 0
+        self.npc.append (0)
+        self.cont.append (1)
+        self.player.append (-1)
+
+    def answer0 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (1)
+        self.cont.append (-1)
+        self.player.append (6)
+        self.cont.append (3)
+        self.player.append (-1)
+
+    def answer6 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (2)
+        self.cont.append (-1)
+        self.player.append (7)
+        self.cont.append (4)
+        self.player.append (8)
+        self.cont.append (5)
+        self.player.append (10)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer10 (self):
+        pass
+
+    def answer8 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (9)
+        self.cont.append (-1)
+        self.player.append (13)
+        self.cont.append (7)
+        self.player.append (-1)
+
+    def answer13 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (14)
+        self.cont.append (-1)
+        self.player.append (19)
+        self.cont.append (11)
+        self.player.append (18)
+        self.cont.append (10)
+        self.player.append (-1)
+
+    def answer18 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (20)
+        self.cont.append (-1)
+        self.player.append (21)
+        self.cont.append (12)
+        self.player.append (-1)
+
+    def answer21 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (22)
+        self.cont.append (-1)
+        quests.get ("demo").set ("know_olivers_noise" , 1)
+
+        self.player.append (23)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer23 (self):
+        pass
+
+    def answer19 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (22)
+        self.cont.append (-1)
+        quests.get ("demo").set ("know_olivers_noise" , 1)
+
+        self.player.append (23)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer7 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (3)
+        self.cont.append (-1)
+        self.player.append (4)
+        self.cont.append (2)
+        self.player.append (11)
+        self.cont.append (6)
+        self.player.append (-1)
+
+    def answer11 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (12)
+        self.cont.append (-1)
+        self.player.append (16)
+        self.cont.append (9)
+        self.player.append (17)
+        self.cont.append (-1)
+        self.player.append (-1)
+
+    def answer17 (self):
+        pass
+
+    def answer16 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (5)
+        self.cont.append (-1)
+        self.player.append (15)
+        self.cont.append (8)
+        self.player.append (-1)
+
+    def answer15 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (14)
+        self.cont.append (-1)
+        self.player.append (19)
+        self.cont.append (11)
+        self.player.append (18)
+        self.cont.append (10)
+        self.player.append (-1)
+
+    def answer4 (self):
+        self.color = the_npc.get_color()
+        self.npc.append (5)
+        self.cont.append (-1)
+        self.player.append (15)
+        self.cont.append (8)
+        self.player.append (-1)
diff --git a/scripts/init.py b/scripts/init.py
index 0b94dde..3ae2928 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -479,6 +479,7 @@ if retval < 5:
         # erek.stand_north ()
 
         oliver = characters ["Oliver Redwyne"]
+        oliver.set_dialogue ("dialogues/oliver_start")
         oliver.load ("oliver.mchar")
         oliver.set_map (map_engine.get_landmap ())
         oliver.jump_to (0, 25, 15)



reply via email to

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