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 836cc1a 077/237: Updated Or


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 836cc1a 077/237: Updated Orloth
Date: Mon, 25 Jul 2016 18:14:58 +0000 (UTC)

tag: Release_0-3-1
commit 836cc1a1435abbd0c355647247ec5dc197fe3ac6
Author: adondev <adondev>
Commit: adondev <adondev>

    Updated Orloth
---
 scripts/dialogues/orloth_start.py |   10 +++++--
 scripts/schedules/orloth.py       |   52 ++++++++++++++++++++++++++++++-------
 2 files changed, 51 insertions(+), 11 deletions(-)

diff --git a/scripts/dialogues/orloth_start.py 
b/scripts/dialogues/orloth_start.py
index 564c551..f4c5513 100755
--- a/scripts/dialogues/orloth_start.py
+++ b/scripts/dialogues/orloth_start.py
@@ -1,6 +1,6 @@
 class orloth_start:
     loop = []
-    strings = ["This is seemingly the Innkeeper and owner of the place. He 
appears to be lost in thought and from his eyes you can see that he hasn't 
slept much lately. His worried face brightens up though as you approach, and 
his voice is warm and friendly:", "Welcome to Waste's Edge, traveller. Here you 
shall find the pleasures of a hot meal and bath if you desire. And safe and 
comfortable lodging. Although, I fear, this is no longer granted for sure. 
You've chosen troublesome times fo [...]
+    strings = ["This is seemingly the Innkeeper and owner of the place. He 
appears to be lost in thought and from his eyes you can see that he hasn't 
slept much lately. His worried face brightens up though as you approach, and 
his voice is warm and friendly:", "Welcome to Waste's Edge, traveller. Here you 
shall find the pleasures of a hot meal and bath if you desire. And safe and 
comfortable lodging. Although, I fear, this is no longer granted for sure. 
You've chosen troublesome times fo [...]
 
     def set_name (self, new_name):
         pass
@@ -12,7 +12,7 @@ class orloth_start:
         pass
 
     def __init__(self):
-        self.dialogue = [self.start, self.answer0, self.answer1, self.answer3, 
self.answer4, self.answer6, self.answer7, self.answer9, self.answer10, 
self.answer11, self.answer13, self.answer15, self.answer16, self.answer17, 
self.answer18, self.answer20, self.answer21, self.answer22, self.answer24, 
self.answer28, self.answer29, self.answer30, self.answer32, self.answer33, 
self.answer35, self.answer37, self.answer38, self.answer40, self.answer42, 
self.answer43, self.answer45, self.answer4 [...]
+        self.dialogue = [self.start, self.answer0, self.answer1, self.answer3, 
self.answer4, self.answer6, self.answer7, self.answer9, self.answer10, 
self.answer11, self.answer13, self.answer15, self.answer16, self.answer17, 
self.answer18, self.answer20, self.answer21, self.answer22, self.answer24, 
self.answer28, self.answer29, self.answer30, self.answer32, self.answer33, 
self.answer35, self.answer37, self.answer38, self.answer40, self.answer42, 
self.answer43, self.answer45, self.answer4 [...]
 
     def clear (self):
         del self.dialogue
@@ -390,6 +390,12 @@ class orloth_start:
 
     def answer9 (self):
         self.color = the_npc.get_color()
+        self.npc.append (116)
+        self.cont.append (86)
+        self.player.append (-1)
+
+    def answer116 (self):
+        self.color = the_npc.get_color()
         self.npc.append (13)
         self.cont.append (10)
         self.player.append (-1)
diff --git a/scripts/schedules/orloth.py b/scripts/schedules/orloth.py
index caaa1d4..5cdf638 100755
--- a/scripts/schedules/orloth.py
+++ b/scripts/schedules/orloth.py
@@ -19,11 +19,15 @@ speech = ["I gotta clean this mug!", \
           "That barrel is leaking.", \
           "I hope they'll find the thief!"]
 
-coords = [(3, 5, STAND_SOUTH), \
+coords = [(10, 3, STAND_NORTH), \
+          (3, 5, STAND_SOUTH), \
           (7, 6, STAND_EAST), \
           (12, 3, STAND_SOUTH), \
           (7, 4, STAND_WEST), \
-          (10, 3, STAND_NORTH)]
+          (3, 7, 0), \
+          (9, 7, 0), \
+          (12, 5, 0), \
+          (6, 5, 0)]
 
 todo = myself.get_val ("todo")
 
@@ -35,22 +39,52 @@ if todo == 0:
     if delay == 0:
         myself.set_val ("todo", 1)
     else:
+        # -- put/take the first mug
+        if delay == 100:
+            index = myself.get_val ("table_num")
+            if index > 0:
+                key = "table%i_set" % index
+                val = myself.get_val (key)
+
+                x, y = coords[index+4][:2]
+                if val == 0:
+                    map_engine.get_landmap ().put_mapobject (1,x,y,106)
+                else:
+                    map_engine.get_landmap ().remove_mapobject (1,x,y,106)
+
+        # -- put/take the second mug
+        elif delay == 50:
+            index = myself.get_val ("table_num")
+            if index > 0:
+                key = "table%i_set" % index
+                val = myself.get_val (key)
+                myself.set_val (key, ~val)
+
+                x, y = coords[index+4][:2]
+                if val == 0:
+                    map_engine.get_landmap ().put_mapobject (1,x,y,107)
+                else:
+                    map_engine.get_landmap ().remove_mapobject (1,x,y,107)
+
         myself.set_val ("delay", delay - 1)
 
 # -- engage a new movement
 elif todo == 1:
     # -- when we are at the bar, then wait a while before
     #    moving again
-    if myself.posx () == 2:
-        x, y, dir = coords[randint (0, 4)]
-        myself.set_goal (x, y, dir)
-        myself.set_val ("delay", 150)
-
-    # -- otherwise only wait a little
-    else:
+    if myself.posx () != 2:
         delay = randint (40, 120) * 20
         myself.set_val ("delay", delay)
         myself.set_goal (2, 2, STAND_SOUTH)
+        myself.set_val ("table_num", 0)
+
+    # -- otherwise only wait a little
+    else:
+        index = randint (0, 4)
+        x, y, dir = coords[index]
+        myself.set_goal (x, y, dir)
+        myself.set_val ("delay", 150)
+        myself.set_val ("table_num", index)
 
     myself.set_val ("todo", 2)
 



reply via email to

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