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 0924f07 144/237: ADDED fina


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 0924f07 144/237: ADDED final part to Bjarn's dialogue
Date: Mon, 25 Jul 2016 18:15:07 +0000 (UTC)

tag: Release_0-3-1
commit 0924f07917c5bdc09fa79f16623875b8dcdb341b
Author: adondev <adondev>
Commit: adondev <adondev>

    ADDED final part to Bjarn's dialogue
---
 scripts/dialogues/bjarn_start.py         |  100 ++++++++++++++++++++++++++++--
 scripts/dialogues/jelom_2nd.py           |   30 +++++----
 scripts/schedules/mapcharacters/lucia.py |   19 +++---
 3 files changed, 121 insertions(+), 28 deletions(-)

diff --git a/scripts/dialogues/bjarn_start.py b/scripts/dialogues/bjarn_start.py
index a2f4324..8c39df7 100755
--- a/scripts/dialogues/bjarn_start.py
+++ b/scripts/dialogues/bjarn_start.py
@@ -2,7 +2,7 @@ import adonthell
 
 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 burgled, 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?", "This is  [...]
+       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 burgled, 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?", "This is  [...]
 
        def set_name (self, new_name):
                pass
@@ -17,7 +17,7 @@ class bjarn_start:
                self.the_player = p
                self.the_npc = n
 
-               self.dialogue = [self.start, self.answer0, self.answer1, 
self.answer2, self.answer4, self.answer6, self.answer8, self.answer10, 
self.answer11, self.answer12, self.answer14, self.answer15, self.answer16, 
self.answer18, self.answer22, self.answer23, self.answer25, self.answer26, 
self.answer29, self.answer30, self.answer65, self.answer67, self.answer69, None]
+               self.dialogue = [self.start, self.answer0, self.answer1, 
self.answer2, self.answer4, self.answer6, self.answer8, self.answer10, 
self.answer11, self.answer12, self.answer14, self.answer15, self.answer16, 
self.answer18, self.answer22, self.answer23, self.answer25, self.answer26, 
self.answer29, self.answer30, self.answer33, self.answer34, self.answer35, 
self.answer37, self.answer39, self.answer40, self.answer42, self.answer43, 
self.answer46, self.answer47, self.answer102, None]
 
        def clear (self):
                del self.dialogue
@@ -120,6 +120,10 @@ class bjarn_start:
                self.color = self.the_npc.get_color()
                self.npc.append (13)
                self.cont.append (-1)
+               if adonthell.gamedata_get_quest("demo").get_val 
("gem_worthless") > 0:
+
+                       self.player.append (37)
+                       self.cont.append (23)
                if adonthell.gamedata_get_quest("demo").get_val 
("know_alek_eavesdrop") == 1:
 
                        self.player.append (16)
@@ -128,7 +132,7 @@ class bjarn_start:
 
                        self.player.append (15)
                        self.cont.append (11)
-               if adonthell.gamedata_get_quest("demo").get_val 
("ask_packed_gems") >= 1:
+               if adonthell.gamedata_get_quest("demo").get_val 
("ask_packed_gems") == 1 or adonthell.gamedata_get_quest("demo").get_val 
("ask_packed_gems") == 2:
 
                        self.player.append (14)
                        self.cont.append (10)
@@ -157,22 +161,24 @@ class bjarn_start:
                        self.cont.append (20)
                self.player.append (-1)
 
-       def answer65 (self):
+       def answer33 (self):
                self.color = self.the_npc.get_color()
                self.npc.append (34)
                self.cont.append (21)
                self.player.append (-1)
 
-       def answer67 (self):
+       def answer34 (self):
                self.color = self.the_npc.get_color()
                self.npc.append (35)
                self.cont.append (22)
                self.player.append (-1)
 
-       def answer69 (self):
+       def answer35 (self):
                self.color = self.the_npc.get_color()
                self.npc.append (36)
                self.cont.append (-1)
+               adonthell.gamedata_get_quest("demo").set_val ("ask_packed_gems" 
, 3)
+
                self.player.append (-1)
 
        def answer15 (self):
@@ -230,3 +236,85 @@ class bjarn_start:
                self.npc.append (26)
                self.cont.append (17)
                self.player.append (-1)
+
+       def answer37 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (38)
+               self.cont.append (-1)
+               self.player.append (39)
+               self.cont.append (24)
+               self.player.append (40)
+               self.cont.append (25)
+               self.player.append (-1)
+
+       def answer40 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (41)
+               self.cont.append (-1)
+               if adonthell.gamedata_get_quest("demo").get_val 
("gem_worthless") & 1 == 1:
+
+                       self.player.append (43)
+                       self.cont.append (27)
+               if adonthell.gamedata_get_quest("demo").get_val 
("gem_worthless") & 2 == 2:
+
+                       self.player.append (42)
+                       self.cont.append (26)
+               self.player.append (-1)
+
+       def answer42 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (44)
+               self.cont.append (-1)
+               self.player.append (46)
+               self.cont.append (28)
+               self.player.append (47)
+               self.cont.append (29)
+               self.player.append (-1)
+
+       def answer47 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (48)
+               self.cont.append (-1)
+               adonthell.gamedata_get_quest("demo").set_val ("bjarn_lies" , 1)
+
+               self.player.append (-1)
+
+       def answer46 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (48)
+               self.cont.append (-1)
+               adonthell.gamedata_get_quest("demo").set_val ("bjarn_lies" , 1)
+
+               self.player.append (-1)
+
+       def answer43 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (45)
+               self.cont.append (-1)
+               self.player.append (46)
+               self.cont.append (28)
+               self.player.append (47)
+               self.cont.append (29)
+               self.player.append (-1)
+
+       def answer39 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (49)
+               self.cont.append (-1)
+               self.player.append (50)
+               self.cont.append (30)
+               self.player.append (-1)
+
+       def answer102 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (41)
+               self.cont.append (-1)
+               if adonthell.gamedata_get_quest("demo").get_val 
("gem_worthless") & 1 == 1:
+
+                       self.player.append (43)
+                       self.cont.append (27)
+               if adonthell.gamedata_get_quest("demo").get_val 
("gem_worthless") & 2 == 2:
+
+                       self.player.append (42)
+                       self.cont.append (26)
+               self.player.append (-1)
diff --git a/scripts/dialogues/jelom_2nd.py b/scripts/dialogues/jelom_2nd.py
index d3f014f..41d269e 100644
--- a/scripts/dialogues/jelom_2nd.py
+++ b/scripts/dialogues/jelom_2nd.py
@@ -103,19 +103,15 @@ class jelom_2nd:
                        self.color = self.the_npc.get_color()
                        self.npc.append (37)
                        self.cont.append (-1)
-                       self.player.append (33)
-                       self.cont.append (19)
                        if adonthell.gamedata_get_quest("demo").get_val 
("bjarn_door_open") < 3:
 
                                self.player.append (38)
                                self.cont.append (22)
-                       self.player.append (-1)
+                       if bjarn_lies == 1:
 
-       def answer38 (self):
-               self.color = self.the_npc.get_color()
-               self.npc.append (39)
-               self.cont.append (-1)
-               self.player.append (-1)
+                               self.player.append (33)
+                               self.cont.append (19)
+                       self.player.append (-1)
 
        def answer33 (self):
                self.color = self.the_npc.get_color()
@@ -140,6 +136,12 @@ class jelom_2nd:
 
                self.player.append (-1)
 
+       def answer38 (self):
+               self.color = self.the_npc.get_color()
+               self.npc.append (39)
+               self.cont.append (-1)
+               self.player.append (-1)
+
        def answer23 (self):
                self.set_npc ("Erek Stonebreaker")
                self.color = adonthell.gamedata_get_character("Erek 
Stonebreaker").get_color()
@@ -164,8 +166,10 @@ class jelom_2nd:
                self.cont.append (-1)
                self.player.append (31)
                self.cont.append (18)
-               self.player.append (33)
-               self.cont.append (19)
+               if bjarn_lies == 1:
+
+                       self.player.append (33)
+                       self.cont.append (19)
                self.player.append (-1)
 
        def answer31 (self):
@@ -186,8 +190,10 @@ class jelom_2nd:
                self.cont.append (-1)
                self.player.append (31)
                self.cont.append (18)
-               self.player.append (33)
-               self.cont.append (19)
+               if bjarn_lies == 1:
+
+                       self.player.append (33)
+                       self.cont.append (19)
                self.player.append (-1)
 
        def answer12 (self):
diff --git a/scripts/schedules/mapcharacters/lucia.py 
b/scripts/schedules/mapcharacters/lucia.py
index fa92e19..4bee07c 100644
--- a/scripts/schedules/mapcharacters/lucia.py
+++ b/scripts/schedules/mapcharacters/lucia.py
@@ -16,20 +16,19 @@
 # complaining about her life.
 
 import adonthell
-from adonthell import STAND_NORTH, STAND_SOUTH, STAND_WEST, STAND_EAST
-from random import randint
+import random
 
 class lucia:
 
     def __init__ (self, mapcharacterinstance):
         self.myself = mapcharacterinstance
         
-        self.speech = ["When could I finally rest a bit?", \
-                       "I told Orloth this place would bring us problems!", \
+        self.speech = ["When can I finally rest a bit?", \
+                       "I told Orloth this place would bring us nothing but 
trouble!", \
                        "This smoke! I'm dying!"]
 
-        self.coords = [(3, 3, STAND_NORTH), \
-                  (6, 3, STAND_EAST)]
+        self.coords = [(3, 3, adonthell.STAND_NORTH), \
+                  (6, 3, adonthell.STAND_EAST)]
 
     def run (self):
         myself = self.myself
@@ -51,7 +50,7 @@ class lucia:
             if myself.posx () != 3:
                 x, y, dir = self.coords[0]
             else:
-                x, y, dir = self.coords[randint(0, 1)]
+                x, y, dir = self.coords[random.randint(0, 1)]
             myself.set_goal (x, y, dir)
             myself.set_val ("todo", 2)
 
@@ -67,7 +66,7 @@ class lucia:
                     myself.set_val ("delay", 300)
 
                 else:
-                    myself.set_val ("delay", 1000 + randint (0, 2000))
+                    myself.set_val ("delay", 1000 + random.randint (0, 2000))
                                     
                 myself.set_val ("todo", 0)
 
@@ -77,6 +76,6 @@ class lucia:
         tmp = myself.get_val ("say_something")
         myself.set_val ("say_something", tmp - 1)
         if tmp == 0:
-            myself.speak (self.speech[randint (0, 2)])
-            delay = randint (50, 100) * 20
+            myself.speak (self.speech[random.randint (0, 2)])
+            delay = random.randint (50, 100) * 20
             myself.set_val ("say_something", delay)



reply via email to

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