[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] Release_0-3-1 0933dbf 063/237: How could
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] Release_0-3-1 0933dbf 063/237: How could I forget them ... ? ; ) |
Date: |
Mon, 25 Jul 2016 18:14:57 +0000 (UTC) |
tag: Release_0-3-1
commit 0933dbfb54a5644046d437acf0eb39560c0c8ed0
Author: adondev <adondev>
Commit: adondev <adondev>
How could I forget them ... ? ;)
---
scripts/dialogues/jelom_start.py | 283 ++++++++++++++++++++++++++++++++++++++
scripts/schedules/jelom.py | 58 ++++++++
2 files changed, 341 insertions(+)
diff --git a/scripts/dialogues/jelom_start.py b/scripts/dialogues/jelom_start.py
new file mode 100644
index 0000000..9b8ba45
--- /dev/null
+++ b/scripts/dialogues/jelom_start.py
@@ -0,0 +1,283 @@
+class jelom_start:
+ loop = []
+ strings = ["Halt there! No-one is allowed into the prisoner's room!",
"Stop right there, half-elf! You know that you are not allowed in there!",
"No-one is allowed into the prisoner's room, so please leave this hallway!",
"You again, half-elf? What do you want this time?", "Ah, you must be Jelom.
Talan told me that I could find you here.", "And just who are you to prevent me
from entering, sir?", "Nice to see you again, Jelom. Look, I have some more
questions for you.", "Look, Jelom, [...]
+
+ 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.answer4, self.answer5, self.answer6,
self.answer7, self.answer10, self.answer13, self.answer15, self.answer17,
self.answer19, self.answer21, self.answer23, self.answer24, self.answer27,
self.answer29, self.answer31, self.answer32, self.answer34, self.answer36,
self.answer38, self.answer40, 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):
+ if the_player.get_val ("at_silverhairs_door") == 1 and
quests["demo"].get_val ("know_jelom") != 2:
+
+
+ self.color = the_npc.get_color()
+ self.npc.append (0)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_jelom" ) == 1:
+
+ self.player.append (4)
+ self.cont.append (1)
+ else:
+
+ self.player.append (5)
+ self.cont.append (2)
+ self.player.append (-1)
+ elif the_player.get_val( "at_silverhairs_door" ) == 1:
+
+ self.color = the_npc.get_color()
+ self.npc.append (1)
+ self.cont.append (-1)
+ if quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (6)
+ self.cont.append (3)
+ elif quests["demo"].get_val ("know_talan_singing") == 2:
+
+ self.player.append (7)
+ self.cont.append (4)
+ self.player.append (-1)
+ elif the_player.get_val ("at_silverhairs_door") != 1 and
quests["demo"].get_val ("know_jelom") != 2:
+
+ self.color = the_npc.get_color()
+ self.npc.append (2)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_jelom" ) == 1:
+
+ self.player.append (4)
+ self.cont.append (1)
+ else:
+
+ self.player.append (5)
+ self.cont.append (2)
+ self.player.append (-1)
+ else:
+
+
+ self.color = the_npc.get_color()
+ self.npc.append (3)
+ self.cont.append (-1)
+ if quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (6)
+ self.cont.append (3)
+ elif quests["demo"].get_val ("know_talan_singing") == 2:
+
+ self.player.append (7)
+ self.cont.append (4)
+ self.player.append (-1)
+
+ def answer7 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (12)
+ self.cont.append (-1)
+ self.player.append (13)
+ self.cont.append (6)
+ self.player.append (-1)
+
+ def answer13 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (14)
+ self.cont.append (-1)
+ self.player.append (15)
+ self.cont.append (7)
+ self.player.append (-1)
+
+ def answer15 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (16)
+ self.cont.append (-1)
+ self.player.append (17)
+ self.cont.append (8)
+ self.player.append (-1)
+
+ def answer17 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (18)
+ self.cont.append (-1)
+ self.player.append (19)
+ self.cont.append (9)
+ self.player.append (-1)
+
+ def answer19 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (20)
+ self.cont.append (-1)
+ self.player.append (21)
+ self.cont.append (10)
+ self.player.append (-1)
+
+ def answer21 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (22)
+ self.cont.append (-1)
+ self.player.append (23)
+ self.cont.append (11)
+ self.player.append (24)
+ self.cont.append (12)
+ self.player.append (-1)
+
+ def answer24 (self):
+ quests["demo"].set_val( "told_on_talan", 1 );
+
+ self.color = the_npc.get_color()
+ self.npc.append (26)
+ self.cont.append (-1)
+ self.player.append (27)
+ self.cont.append (13)
+ 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 (14)
+ self.player.append (-1)
+
+ def answer29 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (30)
+ self.cont.append (-1)
+ quests["demo"].set_val( "silverhair_free", 1 );
+
+ self.player.append (-1)
+
+ def answer23 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (25)
+ self.cont.append (-1)
+ self.player.append (27)
+ self.cont.append (13)
+ self.player.append (-1)
+
+ def answer6 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (11)
+ self.cont.append (-1)
+ if quests["demo"].get_val ("know_alek_eavesdrop") == 1 and
quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (32)
+ self.cont.append (16)
+ if quests["demo"].get_val ("ask_packed_gems") == 1 and
quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (31)
+ self.cont.append (15)
+ elif quests["demo"].get_val ("know_talan_singing") == 2:
+
+ self.player.append (7)
+ self.cont.append (4)
+ else:
+
+ self.player.append (38)
+ self.cont.append (19)
+ self.player.append (-1)
+
+ def answer38 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (39)
+ self.cont.append (-1)
+ self.player.append (40)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer40 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (37)
+ self.cont.append (-1)
+ quests["demo"].set_val ("know_jelom" , 2)
+
+ self.player.append (-1)
+
+ def answer31 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (33)
+ self.cont.append (-1)
+ self.player.append (34)
+ self.cont.append (17)
+ self.player.append (-1)
+
+ def answer34 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (35)
+ self.cont.append (-1)
+ self.player.append (36)
+ self.cont.append (18)
+ self.player.append (-1)
+
+ def answer36 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (37)
+ self.cont.append (-1)
+ quests["demo"].set_val ("know_jelom" , 2)
+
+ self.player.append (-1)
+
+ def answer32 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (35)
+ self.cont.append (-1)
+ self.player.append (36)
+ self.cont.append (18)
+ self.player.append (-1)
+
+ def answer5 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (8)
+ self.cont.append (-1)
+ self.player.append (10)
+ self.cont.append (5)
+ self.player.append (-1)
+
+ def answer10 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (11)
+ self.cont.append (-1)
+ if quests["demo"].get_val ("know_alek_eavesdrop") == 1 and
quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (32)
+ self.cont.append (16)
+ if quests["demo"].get_val ("ask_packed_gems") == 1 and
quests["demo"].get_val ("know_talan_singing") != 2:
+
+ self.player.append (31)
+ self.cont.append (15)
+ elif quests["demo"].get_val ("know_talan_singing") == 2:
+
+ self.player.append (7)
+ self.cont.append (4)
+ else:
+
+ self.player.append (38)
+ self.cont.append (19)
+ self.player.append (-1)
+
+ def answer4 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (9)
+ self.cont.append (-1)
+ self.player.append (10)
+ self.cont.append (5)
+ self.player.append (-1)
diff --git a/scripts/schedules/jelom.py b/scripts/schedules/jelom.py
new file mode 100644
index 0000000..715ce7a
--- /dev/null
+++ b/scripts/schedules/jelom.py
@@ -0,0 +1,58 @@
+#
+# (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 Jelom Rasgar
+#
+# He guards the door to Lady Silverhair's room
+
+speech = ["Someone fetch me a drink!", \
+ "That'll teach them fancy Elves a lesson!", \
+ "Send them to the cursed island, I say!"]
+
+todo = myself.get_val ("todo")
+
+# If standing
+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:
+ # Choose where to move, if destination is already occupied we'll
+ # fall into the wait state (0) again automatically next time
+ if myself.posy () == 3:
+ myself.set_goal (2, 6, STAND_NORTH)
+ else:
+ myself.set_goal (2, 3, STAND_SOUTH)
+
+ # Next time we'll actually move!
+ myself.set_val ("todo", 2)
+
+# Moving, follow the path until it is reached.
+elif todo == 2:
+ # Reached the goal? Wait a while then...
+ if myself.follow_path ():
+ myself.set_val ("delay", randint (30, 60) * 20)
+ 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:
+ schedules.speak (myself, speech[randint (0, 2)])
+ delay = randint (75, 150) * 20
+ myself.set_val ("say_something", delay)
- [adonthell-wastesedge-commits] Release_0-3-1 9d5c3db 072/237: Continued furniturizing, (continued)
- [adonthell-wastesedge-commits] Release_0-3-1 9d5c3db 072/237: Continued furniturizing, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 9a51967 079/237: Continued map., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7a8047a 075/237: Moved transition files to their real place., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 91abdcd 136/237: FIXED Makefile.am (intro.py was missing), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 30316f6 132/237: ADDED initial dialogue with Talan to get into the inn, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7a0f9fe 050/237: Minor changes to the map., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 21f36d0 059/237: Slight fix., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 b40a92e 134/237: ADDED Lucia's schedule and furnitures, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 64e91d5 033/237: UPDATE to some schedules and dialogues, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 d6dfa6e 064/237: Added characters portraits, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 0933dbf 063/237: How could I forget them ... ? ; ),
Kai Sterker <=
- [adonthell-wastesedge-commits] Release_0-3-1 a681af9 028/237: Modularized event scripts, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 18d2266 131/237: FIXED installation, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7b028da 127/237: UPDATED intro sequence, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 290bfde 086/237: ADDED portraits of Talan and Player, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 f3b822a 070/237: Furniturized the houses., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 dfdc8cc 035/237: Finished Orloth's dialogue, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 398bec8 143/237: IMPROVED Bjarn's dialogue and text bubbles, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 c0d92f8 138/237: Further cleaning up of dialogues, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 a1e51e2 061/237: ADDED Jelom, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 c8dd4ff 133/237: Finished map forest., Kai Sterker, 2016/07/25