[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] Release_0-3-1 89d9191 037/237: Added Tala
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] Release_0-3-1 89d9191 037/237: Added Talan Wendth |
Date: |
Mon, 25 Jul 2016 18:14:55 +0000 (UTC) |
tag: Release_0-3-1
commit 89d9191783a51adf3d16cde78023ca3fe5efcd22
Author: adondev <adondev>
Commit: adondev <adondev>
Added Talan Wendth
---
scripts/dialogues/Makefile.am | 2 +-
scripts/dialogues/talan_start.py | 373 ++++++++++++++++++++++++++++++++++++++
scripts/init.py | 12 ++
scripts/schedules/Makefile.am | 2 +-
scripts/schedules/talan.py | 57 ++++++
5 files changed, 444 insertions(+), 2 deletions(-)
diff --git a/scripts/dialogues/Makefile.am b/scripts/dialogues/Makefile.am
index 417e187..941182d 100755
--- a/scripts/dialogues/Makefile.am
+++ b/scripts/dialogues/Makefile.am
@@ -2,7 +2,7 @@ pkgdatadir = $(gamedatadir)/scripts/dialogues
pkgdata_DATA = orloth_start.py lucia_start.py sarin_start.py \
janesta_start.py erek_start.py oliver_start.py bjarn_start.py \
- frostbloom_start.py
+ frostbloom_start.py talan_start.py
EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/dialogues/talan_start.py b/scripts/dialogues/talan_start.py
new file mode 100755
index 0000000..3af738f
--- /dev/null
+++ b/scripts/dialogues/talan_start.py
@@ -0,0 +1,373 @@
+class talan_start:
+ loop = []
+ strings = ["Oh, hullo again, $name.", "Listen, I really am sorry about
that fuss at the gate. I hope you will not hold it against me.", "Please, my
good man, do not mention it again. I assure you that I hold no grudge against
you. Now, if we may go on to the business at hand?", "Oh... that. Yes, how may
I help you?", "Hello, Talan. Look, I have a couple questions about the theft.",
"Well, can you tell me what happened on the night of the theft?", "Sure, but
there is not much to tell. [...]
+
+ 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.answer2, self.answer4, self.answer5,
self.answer7, self.answer8, self.answer11, self.answer12, self.answer14,
self.answer16, self.answer18, self.answer20, self.answer22, self.answer24,
self.answer26, self.answer28, self.answer30, self.answer32, self.answer33,
self.answer35, self.answer37, self.answer39, self.answer40, self.answer42,
self.answer44, self.answer45, self.answer48, self.answer53, self.answer57,
self.answer59, self.answer61, self.answe [...]
+
+ 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_npc.get_val( "apologised" ) != 1:
+
+ self.color = the_npc.get_color()
+ self.npc.append (1)
+ self.cont.append (-1)
+ the_npc.set_val( "apologised", 1 );
+
+ self.player.append (2)
+ self.cont.append (1)
+ self.player.append (-1)
+ elif quests["demo"].get_val( "silverhair_free" ) != 1:
+
+ self.color = the_npc.get_color()
+ self.npc.append (0)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_talan_singing" ) == 1:
+
+ self.player.append (14)
+ self.cont.append (8)
+ if quests["demo"].get_val( "know_talan_singing" ) != 1:
+
+ self.player.append (4)
+ self.cont.append (2)
+ self.player.append (-1)
+ else:
+
+ self.color = the_npc.get_color()
+ self.npc.append (52)
+ self.cont.append (-1)
+ self.player.append (53)
+ self.cont.append (27)
+ self.player.append (-1)
+
+ def answer53 (self):
+ if quests["demo"].get_val( "told_on_talan" ) != 1:
+
+ self.color = the_npc.get_color()
+ self.npc.append (54)
+ self.cont.append (-1)
+ self.player.append (57)
+ self.cont.append (28)
+ self.player.append (-1)
+ else:
+
+ self.color = the_npc.get_color()
+ self.npc.append (55)
+ self.cont.append (-1)
+ self.player.append (56)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer56 (self):
+ pass
+
+ def answer57 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (58)
+ self.cont.append (-1)
+ self.player.append (59)
+ self.cont.append (29)
+ self.player.append (-1)
+
+ def answer59 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (60)
+ self.cont.append (-1)
+ self.player.append (61)
+ self.cont.append (30)
+ self.player.append (-1)
+
+ def answer61 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (62)
+ self.cont.append (31)
+ self.player.append (-1)
+
+ def answer62 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (63)
+ self.cont.append (32)
+ self.player.append (-1)
+
+ def answer63 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (64)
+ self.cont.append (-1)
+ self.player.append (65)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer65 (self):
+ pass
+
+ def answer4 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (3)
+ self.cont.append (-1)
+ self.player.append (5)
+ self.cont.append (3)
+ if quests["demo"].get_val( "know_alek_eavesdrop" ) == 1:
+
+ 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 (7)
+ self.player.append (-1)
+
+ def answer12 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (13)
+ self.cont.append (-1)
+ self.player.append (10)
+ self.cont.append (-1)
+ self.player.append (5)
+ self.cont.append (3)
+ self.player.append (-1)
+
+ def answer10 (self):
+ pass
+
+ def answer5 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (6)
+ self.cont.append (-1)
+ self.player.append (7)
+ self.cont.append (4)
+ self.player.append (28)
+ self.cont.append (15)
+ self.player.append (-1)
+
+ def answer28 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (29)
+ self.cont.append (-1)
+ self.player.append (30)
+ self.cont.append (16)
+ self.player.append (-1)
+
+ def answer30 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (31)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_jelom" ) != 2:
+
+
+ self.player.append (33)
+ self.cont.append (18)
+ else:
+
+ self.player.append (32)
+ self.cont.append (17)
+ self.player.append (-1)
+
+ def answer32 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (36)
+ self.cont.append (-1)
+ self.player.append (37)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer37 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (38)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_bjarns_insult" ) == 1:
+
+ self.player.append (40)
+ self.cont.append (22)
+ if quests["demo"].get_val( "know_bjarns_insult" ) != 1:
+
+ self.player.append (39)
+ self.cont.append (21)
+ self.player.append (-1)
+
+ def answer39 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (41)
+ self.cont.append (-1)
+ self.player.append (42)
+ self.cont.append (23)
+ self.player.append (-1)
+
+ def answer42 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (43)
+ self.cont.append (-1)
+ self.player.append (44)
+ self.cont.append (24)
+ self.player.append (-1)
+
+ def answer44 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (45)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer45 (self):
+ if quests["demo"].get_val( "know_jelom" ) != 2:
+
+ self.color = the_npc.get_color()
+ self.npc.append (46)
+ self.cont.append (-1)
+ self.player.append (48)
+ self.cont.append (26)
+ self.player.append (-1)
+ else:
+
+ self.color = the_npc.get_color()
+ self.npc.append (47)
+ self.cont.append (-1)
+ self.player.append (49)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer49 (self):
+ pass
+
+ def answer48 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (50)
+ self.cont.append (-1)
+ self.player.append (51)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer51 (self):
+ pass
+
+ def answer40 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (43)
+ self.cont.append (-1)
+ self.player.append (44)
+ self.cont.append (24)
+ self.player.append (-1)
+
+ def answer33 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (34)
+ self.cont.append (-1)
+ quests["demo"].set_val( "know_jelom", 1 );
+
+ self.player.append (35)
+ self.cont.append (19)
+ self.player.append (-1)
+
+ def answer35 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (36)
+ self.cont.append (-1)
+ self.player.append (37)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer7 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (8)
+ self.cont.append (5)
+ self.player.append (-1)
+
+ def answer8 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (9)
+ self.cont.append (-1)
+ self.player.append (28)
+ self.cont.append (15)
+ self.player.append (10)
+ self.cont.append (-1)
+ if quests["demo"].get_val( "know_alek_eavesdrop" ) == 1:
+
+ self.player.append (11)
+ self.cont.append (6)
+ self.player.append (-1)
+
+ def answer14 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (15)
+ self.cont.append (-1)
+ self.player.append (16)
+ self.cont.append (9)
+ self.player.append (-1)
+
+ def answer16 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (17)
+ self.cont.append (-1)
+ self.player.append (18)
+ self.cont.append (10)
+ 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 (11)
+ self.player.append (-1)
+
+ def answer20 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (21)
+ self.cont.append (-1)
+ self.player.append (22)
+ self.cont.append (12)
+ self.player.append (-1)
+
+ def answer22 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (23)
+ self.cont.append (-1)
+ self.player.append (24)
+ self.cont.append (13)
+ self.player.append (-1)
+
+ def answer24 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (25)
+ self.cont.append (-1)
+ self.player.append (26)
+ self.cont.append (14)
+ self.player.append (-1)
+
+ def answer26 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (27)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer2 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (3)
+ self.cont.append (-1)
+ self.player.append (5)
+ self.cont.append (3)
+ if quests["demo"].get_val( "know_alek_eavesdrop" ) == 1:
+
+ self.player.append (11)
+ self.cont.append (6)
+ self.player.append (-1)
diff --git a/scripts/init.py b/scripts/init.py
index d3d9edf..6ecfda4 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -148,6 +148,8 @@ if retval < 5:
# Creates the context for the game start
map_engine.load_map ("test.map")
lm = map_engine.get_landmap ()
+ the_player.set_val ("gender", MALE)
+ the_player.set_val ("race", HALFELF)
the_player.load ("player.mchar")
the_player.set_map (lm)
the_player.jump_to (0, 11, 18, STAND_EAST)
@@ -480,6 +482,16 @@ if retval < 5:
erek.stand_north ()
erek.set_schedule ("erek")
+ # -- that's a clone for now
+ talan = characters ["Talan Wendth"]
+ talan.set_dialogue ("dialogues/talan_start")
+ talan.load ("servant2.mchar")
+ talan.set_map (map_engine.get_landmap ())
+ talan.jump_to (0, 11, 20)
+ talan.set_action ("action_talk")
+ talan.stand_north ()
+ talan.set_schedule ("talan")
+
oliver = characters ["Oliver Redwyne"]
oliver.set_dialogue ("dialogues/oliver_start")
oliver.load ("oliver.mchar")
diff --git a/scripts/schedules/Makefile.am b/scripts/schedules/Makefile.am
index 7ec83bd..bec143d 100755
--- a/scripts/schedules/Makefile.am
+++ b/scripts/schedules/Makefile.am
@@ -1,6 +1,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
+ sarin.py frostbloom.py silverhair.py oliver.py erek.py talan.py
EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/schedules/talan.py b/scripts/schedules/talan.py
new file mode 100755
index 0000000..8d54f70
--- /dev/null
+++ b/scripts/schedules/talan.py
@@ -0,0 +1,57 @@
+#
+# (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 Talan Wendth
+#
+# He guards the gate
+
+import schedules
+import random
+
+speech = ["Halt! Who goes there?", \
+ "\"Ai! laurie lantar lassi surinen ...\"", \
+ "Nobody may pass through the gate!"]
+
+todo = myself.get_val ("switch_direction")
+
+# -- calculate a new direction
+if todo == 0:
+ # -- the time we stay at one side of the gata
+ delay = random.randint (25, 50) * 20
+
+ # -- walk downwards
+ if myself.posy () == 17:
+ myself.set_val ("switch_direction", -delay)
+
+ # -- walk upwards
+ else:
+ myself.set_val ("switch_direction", delay)
+
+# -- walk downwards
+elif todo < 0:
+ myself.set_val ("switch_direction", todo + 1)
+ if schedules.simple_goto_xy (myself, 11, 20) == 1:
+ myself.stand_north ()
+
+# -- walk upwards
+else:
+ myself.set_val ("switch_direction", todo - 1)
+ if schedules.simple_goto_xy (myself, 11, 17) == 1:
+ myself.stand_south ()
+
+# -- utter a random remark
+tmp = myself.get_val ("say_something")
+myself.set_val ("say_something", tmp - 1)
+if tmp == 0:
+ schedules.speak (myself, speech[random.randint (0, 2)])
+ delay = random.randint (40, 120) * 15
+ myself.set_val ("say_something", delay)
- [adonthell-wastesedge-commits] Release_0-3-1 f5cbecf 142/237: FIXED spelling, (continued)
- [adonthell-wastesedge-commits] Release_0-3-1 f5cbecf 142/237: FIXED spelling, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 662757a 091/237: FIXED a small bug in the python console, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 af508ec 185/237: ADDED in-game tunes, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 3bca664 054/237: Added new mapcharacters., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ae421bc 146/237: Python scripts files are now compiled by the Adonthell binary., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 3e84510 056/237: Forgot to update the Makefile, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 d6345fa 228/237: REMOVED audio schedule for the extro, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 bf5e61e 123/237: Took care of the case when the player takes Erek to Jelom and has not made it into Bjarn's room yet, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 1b6640a 151/237: MOVED engine control into seperate script, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7ff9ee3 116/237: FIXED a few spelling errors, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 89d9191 037/237: Added Talan Wendth,
Kai Sterker <=
- [adonthell-wastesedge-commits] Release_0-3-1 31f9068 122/237: Schedule to get everybody down the cellar, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ed1c142 160/237: FIXED Makefile.am's, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 6087908 137/237: ADDED Bjarn's schedule, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 69c9103 210/237: Fixed the extro a bit, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 79418df 227/237: ADDED Enter as alternative 'Action' key, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 4f1725f 119/237: FIXED erek and jelom, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 8fdfd66 165/237: Added Barn interior, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 48053be 090/237: Updated the init script, so you can skip the title sequence, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 547a59d 130/237: FIXED the mess I made ; P, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 b1a1e7a 154/237: ADDED extro dialogue, Kai Sterker, 2016/07/25